agy checks each call against the tools it listed before the prompt began. After ToolSearch loads a deferred tool, the client's next request declares it, and the bridge sent tools/list_changed and then continued the same session/prompt. agy's validator still answered `unknown tool: "<name>" — check spelling` for the rest of that prompt. When the tool-result request declares a tool the process has not listed (Proc.toolsGrew), the bridge now takes the existing changed-context path: it drops the process without resolving its calls and replays the history, the ToolSearch tool_use and its tool_result included, in a new session/prompt, where agy lists the full catalog first. The user's turn is in the replayed history once. The new process starts with the grown catalog, so the next result continues it live and nothing loops. A catalog that only loses or changes tools still continues the live turn. Tests (test/smoke.mjs, fake agy): TOOLSEARCHGROW checks calls against the tools listed at prompt start, like agy 1.5.3. The new block checks that the grown catalog starts a new session/prompt, that it replays the ToolSearch round with the user's ask once, that the old prompt never reaches the validator with the new tool, that the loaded tool's call reaches the client, and that its result continues the new session with no second replay. The "live tools change" case now removes a tool instead of adding one. Run on mote (Bun 1.4.2), at this tree: - packages/agy-cli `bun test`: 8 pass, 0 fail; smoke.mjs ALL OK (319 checks). - `bun scripts/check.mjs agy-cli`: registry.json and agy-cli ok. Broken by hand: sed removed `|| proc.toolsGrew(tools)` from the condition; smoke.mjs went 5 FAILURES (319 checks), the five new checks; restored, ALL OK. Not run: the root `bun test`. It waited behind about 20 queued suites on mote's suite.lock for over an hour, and WSL answered E_UNEXPECTED. Not tried: a real agy 1.5.3 run. Version 0.1.4. Reported-by: chrisjian <chrisjian@users.noreply.github.com>
45 lines
968 B
JSON
45 lines
968 B
JSON
{
|
|
"name": "@magpie-community/opencode-agy-cli-auth",
|
|
"version": "0.1.4",
|
|
"description": "Magpie/OpenCode model provider that connects your local agy CLI through the Agent Client Protocol (agy acp), so Antigravity subscription models run through the real CLI",
|
|
"type": "module",
|
|
"main": "./opencode.mjs",
|
|
"exports": {
|
|
".": "./opencode2.mjs"
|
|
},
|
|
"files": [
|
|
"index.mjs",
|
|
"opencode.mjs",
|
|
"opencode2.mjs",
|
|
"platform.mjs",
|
|
"login.mjs",
|
|
"mcp-server.mjs",
|
|
"usage.mjs",
|
|
"README.md",
|
|
"README.en.md",
|
|
"LICENSE",
|
|
"NOTICE.md"
|
|
],
|
|
"keywords": [
|
|
"magpie",
|
|
"magpie-plugin",
|
|
"opencode",
|
|
"opencode-plugin",
|
|
"antigravity",
|
|
"agy",
|
|
"acp"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/agy-cli"
|
|
},
|
|
"scripts": {
|
|
"test": "bun test"
|
|
},
|
|
"magpie": {
|
|
"maxConcurrency": 16
|
|
}
|
|
}
|