Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ MCP server. The control port listens on loopback only, with a token per process.
own tools (shell, file edits, browser) is refused. A request for one of the
client's tools on the bridge's `ide-tools` server is allowed once, since that
tool runs in the client under the client's own permissions. Real actions
happen on the client side.
happen on the client side. Set `AGY_BRIDGE_ALLOW_AGY_TOOLS=1` to instead start
agy with `--dangerously-skip-permissions` and let its own tools through.
- **Assistant prefill**: requests that end with a text-only assistant message
(SillyTavern presets, "continue"/"impersonate", bot frameworks) are served
instead of rejected; the session ledger stays aligned across turns. See
Expand Down Expand Up @@ -282,6 +283,7 @@ account", which keeps its sign-in in a file.
| `AGY_BRIDGE_EFFORT` | unset | Force a thinking level: `minimal`, `low`, `medium`, `high`, `xhigh` or `max` |
| `AGY_BRIDGE_MINIMAL_AGENT` | off | Set to `1` to drop agy's own prompt components; see "Minimal agent" below |
| `AGY_BRIDGE_TELEMETRY` | off (agy reports nothing) | The bridge starts agy with `--disable-telemetry` when agy's `acp --help` lists it; set to `1` to keep agy's own reporting |
| `AGY_BRIDGE_ALLOW_AGY_TOOLS` | off | Set to `1` to start every `agy acp` with `--dangerously-skip-permissions`, so agy's own tools (shell, file edits, browser) auto-approve instead of the bridge refusing each `session/request_permission`. Client `ide-tools` still run under the client's own permissions. agy's tools run on the computer magpie runs on, with your user's rights, for every request that reaches this provider: a client on another machine, or anyone holding a gateway key, can run commands there. Leave off unless only you use it |
| `AGY_BRIDGE_SYSTEM_APPEND` | off | Set to `1` to append the client's system prompt to agy's own instead of putting it in the first prompt; see below |
| `AGY_BRIDGE_IDLE_MS` | 600000 | How long a process may sit idle before it is reclaimed; the session can still resume |
| `AGY_BRIDGE_SPARE` | on | Keeps one spare agy per account, started but with no session and no request sent, so a new conversation skips agy's start; set to `0` to turn it off |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ macOS 上,以 LaunchDaemon 方式运行的 Magpie 不在你的登录会话里
| `AGY_BRIDGE_EFFORT` | 未设置 | 强制思考等级:`minimal` / `low` / `medium` / `high` / `xhigh` / `max` |
| `AGY_BRIDGE_MINIMAL_AGENT` | 关闭 | 设为 `1` 去掉 agy 自带的提示组件,见下文「精简 agent」 |
| `AGY_BRIDGE_TELEMETRY` | 关闭(agy 不上报) | 插件启动 agy 时带上 `--disable-telemetry`(agy 的 `acp --help` 没这个开关就带不上);设成 `1` 保留 agy 自己的上报 |
| `AGY_BRIDGE_ALLOW_AGY_TOOLS` | 关闭 | 设为 `1` 让每个 `agy acp` 带 `--dangerously-skip-permissions` 启动,agy 自带的工具(shell、改文件、浏览器)自动放行,不再由 bridge 逐个拒绝 `session/request_permission`。客户端 `ide-tools` 仍在客户端自己的权限下运行。agy 的工具在 magpie 所在的电脑上以你的用户权限运行,凡是到达这个 provider 的请求都能用:另一台机器上的客户端、或持有网关密钥的任何人,都能在这台电脑上执行命令。只有你自己用时才打开 |
| `AGY_BRIDGE_SYSTEM_APPEND` | 关闭 | 设为 `1` 把客户端的系统提示词附加到 agy 自己的系统提示词后面,而不是放进第一条提示词,见下文 |
| `AGY_BRIDGE_IDLE_MS` | 600000 | 进程空闲多久后回收(会话仍可续接) |
| `AGY_BRIDGE_SPARE` | 开启 | 每个账号预先启动一个备用 agy(只启动、不建会话,不发任何请求),新对话直接用它,省掉 agy 的启动时间;设为 `0` 关闭 |
Expand Down
10 changes: 10 additions & 0 deletions agy-cli.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ for (const [name, mocks] of [
["step-usage.mjs", false],
["tool-schema.mjs", false],
["tool-summary.mjs", false],
["call-mcp-tool.mjs", false],
["usage-settlement.mjs", false],
["steer-in-session.mjs", false],
["dropped-call.mjs", false],
Expand All @@ -36,6 +37,9 @@ for (const [name, mocks] of [
["tools-listed.mjs", false],
["concurrent-convs.mjs", false],
["masking-drift.mjs", false],
["spilled-output.mjs", false],
["tool-result-prefill.mjs", false],
["image-bytes.mjs", false],
]) {
test(`test/${name}`, () => {
// bun's 5s default per test is a fixed wait these process-spawning tests
Expand All @@ -53,6 +57,12 @@ test("test/re2-pattern-unit.mjs", () => {
expect(code).toBe(0)
}, 70_000)

test("test/image-signature-unit.mjs", () => {
const { code, output } = run([path.join(dir, "image-signature-unit.mjs")], 60_000)
expect(output).toMatch(/ALL OK/)
expect(code).toBe(0)
}, 70_000)

test("test/smoke.mjs against a fake agy", () => {
const { code, output } = run([path.join(dir, "smoke.mjs")], 240_000)
expect(output).toMatch(/ALL OK \(\d+ checks\)/)
Expand Down
Loading
Loading