@platless/axom-cli 0.1.0 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/authScopes.js +19 -0
- package/dist/axom-patch/cli/README.md +132 -0
- package/dist/axom-patch/cli/account-limits/README.md +27 -0
- package/dist/axom-patch/cli/account-limits/antigravity-proxy.mjs +47 -0
- package/dist/axom-patch/cli/account-limits/antigravity-read.mjs +90 -0
- package/dist/axom-patch/cli/account-limits/antigravity.mjs +46 -0
- package/dist/axom-patch/cli/account-limits/generate.py +120 -0
- package/dist/axom-patch/cli/account-limits/kimi-proxy.mjs +64 -0
- package/dist/axom-patch/cli/account-limits/normalize.mjs +151 -0
- package/dist/axom-patch/cli/claude-account-limits.json +37 -0
- package/dist/axom-patch/cli/codex-account-limits.json +37 -0
- package/dist/axom-patch/cli/commandcode-account-limits.json +30 -0
- package/dist/axom-patch/cli/nightly-task.md +152 -0
- package/dist/axom-patch/cli/pi-steering.json +37 -0
- package/dist/axom-patch/cli/pi-subagent-subwork.json +23 -0
- package/dist/axom-patch/cli/probes/claude-late-async-terminal.mjs +38 -0
- package/dist/axom-patch/cli/probes/pi-steering.mjs +80 -0
- package/dist/axom-patch/cli/probes/pi-subagent-subwork.mjs +211 -0
- package/dist/axom-patch/cli/probes/qoder-steering.mjs +89 -0
- package/dist/axom-patch/cli/probes/qoder-subagent-origin.mjs +61 -0
- package/dist/axom-patch/cli/probes/zcode-subagent-subwork.mjs +257 -0
- package/dist/axom-patch/cli/qoder-background-terminal.md +82 -0
- package/dist/axom-patch/cli/qoder-foreground-output.md +42 -0
- package/dist/axom-patch/cli/qoder-steering.json +52 -0
- package/dist/axom-patch/cli/qoder-steering.md +30 -0
- package/dist/axom-patch/cli/qoder-subagent-origin.json +73 -0
- package/dist/axom-patch/cli/qoder-subagent-subwork.md +73 -0
- package/dist/axom-patch/cli/runtime.json +63 -0
- package/dist/axom-patch/cli/steering/claude-steering-js.patch +89 -0
- package/dist/axom-patch/cli/steering/claude-steering-types.patch +28 -0
- package/dist/axom-patch/cli/steering/codex-steering.patch +57 -0
- package/dist/axom-patch/cli/steering/pi-steering.js +79 -0
- package/dist/axom-patch/cli/zcode-account-limits.json +31 -0
- package/dist/axom-patch/cli/zcode-models.json +38 -0
- package/dist/axom-patch/cli/zcode-subagent-subwork.json +73 -0
- package/dist/cli.js +36 -1
- package/dist/commands/auth.js +4 -13
- package/dist/commands/execute.js +4 -4
- package/dist/commands/record.js +6 -6
- package/dist/commands/struct.js +4 -4
- package/dist/commands/workstation.js +2 -2
- package/dist/credentials.js +2 -2
- package/dist/install/claude/commands.js +13 -13
- package/dist/keepers/acp/keeper.mjs +3083 -0
- package/dist/keepers/acp/manifest.json +9 -0
- package/dist/keepers/terminal/keeper.mjs +8469 -0
- package/dist/keepers/terminal/manifest.json +9 -0
- package/dist/keepers/terminal/node_modules/node-pty/lib/conpty_console_list_agent.js +25 -0
- package/dist/keepers/terminal/node_modules/node-pty/lib/eventEmitter2.js +47 -0
- package/dist/keepers/terminal/node_modules/node-pty/lib/index.js +52 -0
- package/dist/keepers/terminal/node_modules/node-pty/lib/interfaces.js +7 -0
- package/dist/keepers/terminal/node_modules/node-pty/lib/shared/conout.js +10 -0
- package/dist/keepers/terminal/node_modules/node-pty/lib/terminal.js +190 -0
- package/dist/keepers/terminal/node_modules/node-pty/lib/types.js +7 -0
- package/dist/keepers/terminal/node_modules/node-pty/lib/unixTerminal.js +351 -0
- package/dist/keepers/terminal/node_modules/node-pty/lib/utils.js +38 -0
- package/dist/keepers/terminal/node_modules/node-pty/lib/windowsConoutConnection.js +131 -0
- package/dist/keepers/terminal/node_modules/node-pty/lib/windowsPtyAgent.js +344 -0
- package/dist/keepers/terminal/node_modules/node-pty/lib/windowsTerminal.js +209 -0
- package/dist/keepers/terminal/node_modules/node-pty/lib/worker/conoutSocketWorker.js +22 -0
- package/dist/keepers/terminal/node_modules/node-pty/package.json +66 -0
- package/dist/keepers/terminal/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
- package/dist/keepers/terminal/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/dist/keepers/terminal/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
- package/dist/keepers/terminal/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
- package/dist/keepers/terminal/node_modules/node-pty/prebuilds/linux-arm64/pty.node +0 -0
- package/dist/keepers/terminal/node_modules/node-pty/prebuilds/linux-x64/pty.node +0 -0
- package/dist/mcp.js +32 -14
- package/dist/runtime-deps/qoder-sdk/package-lock.json +1189 -0
- package/dist/runtime-deps/qoder-sdk/package.json +8 -0
- package/dist/test/keeperKit.js +67 -0
- package/dist/workstation/acp/acpAgents.js +2514 -681
- package/dist/workstation/acp/acpClient.js +95 -318
- package/dist/workstation/acp/activityBusy.js +43 -0
- package/dist/workstation/acp/activityReporting.js +54 -0
- package/dist/workstation/acp/adoption.js +28 -356
- package/dist/workstation/acp/authUrlSniffer.js +36 -0
- package/dist/workstation/acp/binaryInstall.js +100 -27
- package/dist/workstation/acp/builds/gc.js +245 -0
- package/dist/workstation/acp/builds/install/binary.js +28 -0
- package/dist/workstation/acp/builds/install/npm.js +235 -0
- package/dist/workstation/acp/builds/install/uv.js +254 -0
- package/dist/workstation/acp/builds/migrate.js +195 -0
- package/dist/workstation/acp/builds/model.js +128 -0
- package/dist/workstation/acp/builds/nodeGate.js +100 -0
- package/dist/workstation/acp/builds/store.js +352 -0
- package/dist/workstation/acp/commandTableProbe.js +68 -0
- package/dist/workstation/acp/configOptions.js +103 -1
- package/dist/workstation/acp/delegationMcp.js +24 -0
- package/dist/workstation/acp/envSecrets.js +27 -0
- package/dist/workstation/acp/initializeResponse.js +285 -0
- package/dist/workstation/acp/installErrors.js +12 -2
- package/dist/workstation/acp/installProbe.js +1 -1
- package/dist/workstation/acp/managedPatches.js +144 -0
- package/dist/workstation/acp/outbox.js +330 -0
- package/dist/workstation/acp/patchAssets.js +80 -0
- package/dist/workstation/acp/permission.js +335 -37
- package/dist/workstation/acp/processor/checkpoint.js +87 -0
- package/dist/workstation/acp/processor/commands.js +35 -0
- package/dist/workstation/acp/processor/control.js +355 -0
- package/dist/workstation/acp/processor/emit.js +26 -0
- package/dist/workstation/acp/processor/jsonrpc.js +172 -0
- package/dist/workstation/acp/processor/memoryLog.js +49 -0
- package/dist/workstation/acp/processor/origins.js +48 -0
- package/dist/workstation/acp/processor/output.js +67 -0
- package/dist/workstation/acp/processor/projection.js +42 -0
- package/dist/workstation/acp/processor/record.js +128 -0
- package/dist/workstation/acp/processor/runtime.js +181 -0
- package/dist/workstation/acp/processor/sdkSchemas.js +61 -0
- package/dist/workstation/acp/processor/session.js +525 -0
- package/dist/workstation/acp/processor/sideChannel.js +80 -0
- package/dist/workstation/acp/processor/state.js +74 -0
- package/dist/workstation/acp/processor/step.js +459 -0
- package/dist/workstation/acp/processor/test/fixtureLog.js +65 -0
- package/dist/workstation/acp/processor/test/harness.js +120 -0
- package/dist/workstation/acp/processor/test/largeIdEcho.js +50 -0
- package/dist/workstation/acp/processor/test/rawAgent.js +70 -0
- package/dist/workstation/acp/processor/transport/generations.js +76 -0
- package/dist/workstation/acp/processor/transport/keeper.js +130 -0
- package/dist/workstation/acp/processor/transport/local.js +269 -0
- package/dist/workstation/acp/processor/transport/types.js +78 -0
- package/dist/workstation/acp/processor/updates.js +364 -0
- package/dist/workstation/acp/processorSession.js +1512 -0
- package/dist/workstation/acp/qoderStartup.js +45 -0
- package/dist/workstation/acp/registry/catalog.js +385 -4
- package/dist/workstation/acp/registry/detect.js +55 -0
- package/dist/workstation/acp/registry/launch.js +61 -119
- package/dist/workstation/acp/sessionUpdateMapper.js +56 -27
- package/dist/workstation/acp/steering.js +58 -0
- package/dist/workstation/acp/switching.js +114 -0
- package/dist/workstation/acp/terminalLogin.js +171 -0
- package/dist/workstation/acp/terminalLoginSpec.js +41 -0
- package/dist/workstation/acp/test/adapterFixtures.js +256 -0
- package/dist/workstation/acp/test/daemonLife.js +106 -0
- package/dist/workstation/acp/test/fakeAgent.js +185 -9
- package/dist/workstation/acp/test/keeperWorld.js +267 -0
- package/dist/workstation/acp/test/memoryOutbox.js +55 -0
- package/dist/workstation/acp/test/raw/fixtures.js +196 -0
- package/dist/workstation/acp/test/raw/qoderCaptures.js +125 -0
- package/dist/workstation/acp/test/raw/sanitize.js +344 -0
- package/dist/workstation/acp/test/raw/sources.js +249 -0
- package/dist/workstation/acp/test/realAdapter.js +377 -0
- package/dist/workstation/acp/test/scriptAgent.js +206 -0
- package/dist/workstation/acp/test/sessionFrames.js +42 -0
- package/dist/workstation/acp/timedCommand.js +4 -2
- package/dist/workstation/acp/uvxInstall.js +72 -122
- package/dist/workstation/acp/validate.js +33 -5
- package/dist/workstation/agentFlow.js +103 -0
- package/dist/workstation/agentSessions.js +1686 -348
- package/dist/workstation/channels/agent.js +14 -6
- package/dist/workstation/channels/computer.js +203 -7
- package/dist/workstation/channels/computerExecs.js +200 -0
- package/dist/workstation/channels/management.js +86 -6
- package/dist/workstation/config.js +3 -1
- package/dist/workstation/connection/encryptedChannel.js +88 -21
- package/dist/workstation/daemon.js +309 -6
- package/dist/workstation/daemonctl.js +28 -2
- package/dist/workstation/desktop/binding.js +36 -0
- package/dist/workstation/desktop/bridge.js +212 -0
- package/dist/workstation/desktop/flow-control.js +52 -0
- package/dist/workstation/desktop/focused-text.js +130 -0
- package/dist/workstation/desktop/protocol.js +35 -0
- package/dist/workstation/exec/attach.js +126 -0
- package/dist/workstation/exec/command.js +40 -0
- package/dist/workstation/exec/durable.js +517 -0
- package/dist/workstation/exec/fallback.js +106 -0
- package/dist/workstation/exec/policy.js +837 -0
- package/dist/workstation/exec/shaping.js +211 -0
- package/dist/workstation/exec.js +3 -112
- package/dist/workstation/files/adapters/computerFileFrames.js +51 -0
- package/dist/workstation/files/adapters/toolRequests.js +121 -0
- package/dist/workstation/files/client.js +455 -0
- package/dist/workstation/files/errors.js +28 -0
- package/dist/workstation/files/fence.js +350 -0
- package/dist/workstation/files/find/fileIndex.js +153 -0
- package/dist/workstation/files/find/fuzzy.js +155 -0
- package/dist/workstation/files/host.js +122 -0
- package/dist/workstation/files/hostProtocol.js +2 -0
- package/dist/workstation/files/media/cache.js +620 -0
- package/dist/workstation/files/media/encoding.js +308 -0
- package/dist/workstation/files/media/estimator.js +100 -0
- package/dist/workstation/files/media/media.js +325 -0
- package/dist/workstation/files/media/packedAudio.js +23 -0
- package/dist/workstation/files/media/scheduler.js +551 -0
- package/dist/workstation/files/media/types.js +5 -0
- package/dist/workstation/files/scope.js +45 -0
- package/dist/workstation/files/structured.js +284 -0
- package/dist/workstation/files/text.js +356 -0
- package/dist/workstation/files/uploads.js +351 -0
- package/dist/workstation/journal.js +65 -236
- package/dist/workstation/keepers/acp/client.js +101 -0
- package/dist/workstation/keepers/acp/envelope.js +62 -0
- package/dist/workstation/keepers/acp/host.js +419 -0
- package/dist/workstation/keepers/acp/main.js +18 -0
- package/dist/workstation/keepers/acp/memoryStream.js +121 -0
- package/dist/workstation/keepers/acp/params.js +137 -0
- package/dist/workstation/keepers/acp/protocol.js +66 -0
- package/dist/workstation/keepers/acp/recover.js +120 -0
- package/dist/workstation/keepers/acp/session.js +584 -0
- package/dist/workstation/keepers/acp/stderr.js +154 -0
- package/dist/workstation/keepers/kit/activity.js +103 -0
- package/dist/workstation/keepers/kit/bootstrap.js +164 -0
- package/dist/workstation/keepers/kit/buildVersion.js +51 -0
- package/dist/workstation/keepers/kit/bundle.js +120 -0
- package/dist/workstation/keepers/kit/client.js +432 -0
- package/dist/workstation/keepers/kit/identity.js +21 -0
- package/dist/workstation/keepers/kit/ipc.js +112 -0
- package/dist/workstation/keepers/kit/launchConfig.js +8 -0
- package/dist/workstation/keepers/kit/launcher.js +249 -0
- package/dist/workstation/keepers/kit/lock.js +123 -0
- package/dist/workstation/keepers/kit/orphanSweep.js +86 -0
- package/dist/workstation/keepers/kit/paths.js +75 -0
- package/dist/workstation/keepers/kit/protocol.js +43 -0
- package/dist/workstation/keepers/kit/server.js +518 -0
- package/dist/workstation/keepers/kit/streamLog.js +697 -0
- package/dist/workstation/keepers/legacy.js +296 -0
- package/dist/workstation/keepers/policy.js +576 -0
- package/dist/workstation/keepers/stop.js +34 -0
- package/dist/workstation/keepers/terminal/client.js +213 -0
- package/dist/workstation/keepers/terminal/exec.js +981 -0
- package/dist/workstation/keepers/terminal/generations.js +129 -0
- package/dist/workstation/keepers/terminal/keeper.js +62 -0
- package/dist/workstation/keepers/terminal/main.js +43 -0
- package/dist/workstation/keepers/terminal/orphanSweep.js +3 -0
- package/dist/workstation/keepers/terminal/params.js +27 -0
- package/dist/workstation/keepers/terminal/protocol.js +56 -0
- package/dist/workstation/keepers/terminal/pty.js +330 -0
- package/dist/workstation/oauth/deviceAuthorization.js +21 -12
- package/dist/workstation/protocol/accountLimits.js +47 -0
- package/dist/workstation/protocol/agent.js +201 -8
- package/dist/workstation/protocol/common.js +36 -0
- package/dist/workstation/protocol/computer.js +107 -7
- package/dist/workstation/protocol/management.js +50 -2
- package/dist/workstation/qoderAdapter/backgroundProcess.js +118 -0
- package/dist/workstation/qoderAdapter/backgroundTerminal.js +193 -0
- package/dist/workstation/qoderAdapter/backgroundTerminalFold.js +372 -0
- package/dist/workstation/qoderAdapter/callbackContext.js +76 -0
- package/dist/workstation/qoderAdapter/completedContinuation.js +139 -0
- package/dist/workstation/qoderAdapter/contract.js +78 -0
- package/dist/workstation/qoderAdapter/foregroundOutput.js +36 -0
- package/dist/workstation/qoderAdapter/history.js +85 -0
- package/dist/workstation/qoderAdapter/identityIndex.js +191 -0
- package/dist/workstation/qoderAdapter/inputQueue.js +42 -0
- package/dist/workstation/qoderAdapter/main.js +95 -0
- package/dist/workstation/qoderAdapter/mapper.js +117 -0
- package/dist/workstation/qoderAdapter/observerPlugin.js +245 -0
- package/dist/workstation/qoderAdapter/observerReceiver.js +187 -0
- package/dist/workstation/qoderAdapter/permissions.js +61 -0
- package/dist/workstation/qoderAdapter/profile.js +93 -0
- package/dist/workstation/qoderAdapter/sdkDriver.js +48 -0
- package/dist/workstation/qoderAdapter/sdkRuntime.js +93 -0
- package/dist/workstation/qoderAdapter/sdkRuntimeInstall.js +145 -0
- package/dist/workstation/qoderAdapter/session.js +319 -0
- package/dist/workstation/qoderAdapter/subagentMeta.js +28 -0
- package/dist/workstation/qoderAdapter/subwork.js +85 -0
- package/dist/workstation/qoderAdapter/taskControl.js +38 -0
- package/dist/workstation/qoderAdapter/taskLedger.js +163 -0
- package/dist/workstation/qoderAdapter/types.js +1 -0
- package/dist/workstation/qoderAdapter/usage.js +37 -0
- package/dist/workstation/register.js +4 -0
- package/dist/workstation/systemMetrics.js +110 -1
- package/dist/workstation/tools/browser.js +394 -0
- package/dist/workstation/tools/client.js +277 -0
- package/dist/workstation/tools/info.js +50 -0
- package/dist/workstation/tools/keeperProcess.js +124 -0
- package/dist/workstation/tools/router.js +55 -0
- package/dist/workstation/tools/terminalRouter.js +222 -0
- package/dist/workstation/tools/validation.js +86 -0
- package/dist/workstation/update/coordinator.js +32 -0
- package/dist/workstation/update/npmInstaller.js +2 -0
- package/dist/workstation/update/ptyPreflight.js +45 -0
- package/dist/workstation/update/taskRegistry.js +141 -23
- package/dist/workstation/update/watchdog.js +66 -0
- package/package.json +20 -7
- package/skills/axom/SKILL.md +55 -17
- package/skills/axom-definition/SKILL.md +32 -32
- package/skills/axom-platform/SKILL.md +39 -39
- package/dist/workstation/acp/acpSession.js +0 -1047
- package/dist/workstation/acp/contract.js +0 -494
- package/dist/workstation/acp/draftInterceptor.js +0 -154
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
2
|
+
import { chmod, mkdtemp, rm, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { buildSessionMcpServers } from './delegationMcp.js';
|
|
6
|
+
export const QODER_MANAGED_VERSION = '1.1.61';
|
|
7
|
+
/** Owned by one process; the bearer is never an argument or environment variable. */
|
|
8
|
+
export async function prepareQoderStartup(launch, lease, cwd, env, agentEnv) {
|
|
9
|
+
buildSessionMcpServers([], lease);
|
|
10
|
+
if (launch.args.some((arg) => arg === '--' || /^(--mcp-config|--strict-mcp-config|--settings|--setting-sources)(=|$)/.test(arg))) {
|
|
11
|
+
throw new Error('Managed Qoder startup has conflicting configuration arguments');
|
|
12
|
+
}
|
|
13
|
+
const version = await new Promise((resolve, reject) => {
|
|
14
|
+
execFile(launch.command, [...launch.args, '--version'], {
|
|
15
|
+
cwd, env: { ...process.env, ...launch.env, ...env, ...agentEnv },
|
|
16
|
+
encoding: 'utf8', timeout: 10_000, maxBuffer: 64 * 1024, windowsHide: true,
|
|
17
|
+
}, (error, stdout) => error ? reject(new Error('Managed Qoder version could not be verified')) : resolve(stdout.trim()));
|
|
18
|
+
});
|
|
19
|
+
if (version !== QODER_MANAGED_VERSION)
|
|
20
|
+
throw new Error('Managed Qoder version is not certified');
|
|
21
|
+
const dir = await mkdtemp(join(tmpdir(), 'axom-qoder-mcp-'));
|
|
22
|
+
let disposal;
|
|
23
|
+
const dispose = () => disposal ??= rm(dir, { recursive: true, force: true });
|
|
24
|
+
try {
|
|
25
|
+
await chmod(dir, 0o700);
|
|
26
|
+
const config = join(dir, 'mcp.json');
|
|
27
|
+
const authorization = Object.values(lease.headers)[0];
|
|
28
|
+
await writeFile(config, JSON.stringify({ mcpServers: {
|
|
29
|
+
'axom-delegation': { type: 'http', url: lease.url, headers: { Authorization: authorization } },
|
|
30
|
+
} }), { mode: 0o600, flag: 'wx' });
|
|
31
|
+
// Validate again after the asynchronous version probe; an expired lease cannot start a process.
|
|
32
|
+
buildSessionMcpServers([], lease);
|
|
33
|
+
return {
|
|
34
|
+
launch: { ...launch, args: [...launch.args, '--strict-mcp-config', '--mcp-config', config,
|
|
35
|
+
'--setting-sources', '', '--settings', '{"autoMemoryEnabled":false}',
|
|
36
|
+
'--disallowed-tools', 'Agent', '--cwd', cwd,
|
|
37
|
+
'--append-system-prompt', 'Use the axom-delegation MCP tools for delegation. Native Agent execution is disabled in this session.'] },
|
|
38
|
+
secrets: [authorization, authorization.slice('Bearer '.length)], dir, dispose,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
await dispose();
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -1,18 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Axom 认证过的 agent 清单 —— 取代 `officialCli.ts`。
|
|
3
|
+
*
|
|
4
|
+
* ## 它是什么:Axom 对官方 registry 的本地扩展层
|
|
5
|
+
*
|
|
6
|
+
* 一个 agent 在本清单里,就是我们真机验证过(roster 的 `curated`),设置页把它放进展开区;其余官方
|
|
7
|
+
* 条目进折叠的 "Unverified Agents"。本清单能做的事,各有一节在下面:
|
|
8
|
+
*
|
|
9
|
+
* - **推荐**:`recommended` 是静态的,只给愿意向任何一台新机器推荐的(pi)。
|
|
10
|
+
* - **本地检测**(`detect`,见 `detect.ts`):PATH 上的命令或固定文件位置,只看文件在不在、不起进程。
|
|
11
|
+
* 检测到 = 这台机器的用户自己在用它,于是它也进推荐位,原因写"本机在用"。
|
|
12
|
+
* - **前置依赖**(`prerequisite`):适配器之外、它起得来所必需的本体(Pi 的 CLI、ZCode 桌面应用),
|
|
13
|
+
* 同样靠 `detect` 判断在不在;有 `install` 就由 Install 先装,没有就只告诉用户怎么办。
|
|
14
|
+
* - **补充、取代与钉版本**:`supplement` / `supersedes` / `distribution`,以及 `launchEnv`。
|
|
15
|
+
*
|
|
16
|
+
* ## 托管与检测是两件事
|
|
17
|
+
*
|
|
18
|
+
* Axom 启动的**一律是 Axom 托管的那份**——`<config dir>/acp-adapters` 里我们(npm、uv、binary 各按版本)
|
|
19
|
+
* 自己装的、钉了版本的副本,与用户自己的安装隔离、独立升级。`adapterInstalled` 只回答这一份在不在。
|
|
20
|
+
* 用户 PATH 上的 `kimi`、`command-code` **不算** Axom 已安装,也从不被拿来启动:它只是 `detect` 的
|
|
21
|
+
* 推荐信号。两份共用数据目录(`~/.kimi-code`、`~/.commandcode`),所以登录是共享的。
|
|
22
|
+
*
|
|
23
|
+
* ## 它与被它取代的那张表不是一回事
|
|
24
|
+
*
|
|
25
|
+
* `officialCli.ts` 断言的是"这个 agent 的官方 CLI 在不在 PATH",而那个信号既不决定能否启动
|
|
26
|
+
* (npx 适配器多数自带引擎),也不决定能否使用(凭据才是),于是它撑起来的 `Installed` 徽章
|
|
27
|
+
* 是一句没人能负责的话。本清单不做任何这类断言:它只提供**我们自己认证过**的三样东西 ——
|
|
28
|
+
* 用户友好的默认名字、这个 agent 除适配器之外还需要什么、以及它是否进推荐位;本地检测也只回答
|
|
29
|
+
* "用户自己装了没有",从不替 Axom 托管的那份作答。
|
|
30
|
+
*
|
|
31
|
+
* ## 为什么不为全部 39 个 agent 建表
|
|
32
|
+
*
|
|
33
|
+
* 见 spec §2.3:适配器需不需要本机 vendor CLI 是**版本级**属性,只能靠扒依赖树猜,而且完全
|
|
34
|
+
* 没有必要 —— 试跑失败时 agent 自己那句话(`Pi needs to be installed. Install it via …`)
|
|
35
|
+
* 带着确切的安装命令,且永远与它自身版本同步。本清单只覆盖我们真机验证过的少数几个。
|
|
36
|
+
*
|
|
37
|
+
* ## `prerequisite.install` 是安全边界
|
|
38
|
+
*
|
|
39
|
+
* 它会在工作站上**直接执行**,不弹二次确认。所以它只能是本文件里的字面量参数数组,永远不接受
|
|
40
|
+
* 来自 registry、agent 响应、网络内容或用户输入的字符串;以 argv 形式交给 execFile,不经 shell。
|
|
41
|
+
* `catalog.test.ts` 有一条机械守卫盯着这件事。
|
|
42
|
+
*
|
|
43
|
+
* ## `distribution` 覆盖 registry 的安装来源
|
|
44
|
+
*
|
|
45
|
+
* 这里写下的来源**整个替换** registry 的 `version` 与 `distribution`,id 与展示名仍是 registry 的,
|
|
46
|
+
* 于是已有的配置条目、roster、安装、启动、更新都不用知道发生过替换(见 {@link withCatalogOverrides})。
|
|
47
|
+
* 本文件的 distribution 用于长期策略;Qoder 等临时的钉版本放在
|
|
48
|
+
* axom-patch/cli/runtime.json,按 registry 版本挑选(`when_registry_version` / `until_registry_version`,
|
|
49
|
+
* 见 `patchAssets.ts`),registry 一到就自己让位。两者与上面的 `install` 是同一条安全边界:只能是
|
|
50
|
+
* 随 CLI 发布、钉死版本、由真机验证过的可信配置。
|
|
51
|
+
*
|
|
52
|
+
* ## `supplement` 与 `supersedes`:registry 缺的条目、registry 不肯撤的条目
|
|
53
|
+
*
|
|
54
|
+
* registry 的 `kimi` 跟的是 `MoonshotAI/kimi-cli`,那个仓库已归档,停在 1.52.0;继任者 Kimi Code
|
|
55
|
+
* (`MoonshotAI/kimi-code`)的条目 `kimi-code` 还在 registry#458 里等审核。Command Code 与社区的
|
|
56
|
+
* ZCode 适配器(registry#566、#650)也都还没进 registry。registry 没有「已停止维护」这样的字段
|
|
57
|
+
* (agent.schema.json 只有 `preview` 渠道),所以由本清单声明:
|
|
58
|
+
*
|
|
59
|
+
* - `supplement`:registry 里**没有**这个 id 时由我们补上的整条条目,钉死版本。registry 一收录这个 id
|
|
60
|
+
* 就用 registry 的,之后的版本由 registry 的机器人每小时跟进,补充条目不再生效。
|
|
61
|
+
* - `supersedes`:被这个条目取代的 registry id,从列表里隐藏。Kimi Code 装上后会把旧版的数据目录
|
|
62
|
+
* 迁走,旧适配器从此看不见用户的登录(2026-09-25 实测),两个并列只会让人选错。
|
|
63
|
+
*
|
|
64
|
+
* ## `launchEnv`:Axom 启动适配器时带的环境变量
|
|
65
|
+
*
|
|
66
|
+
* 经 ACP 适配器拉起的 agent 跑在无头/SDK 模式,它们的默认工具集与用户在终端里交互使用时**不同**,
|
|
67
|
+
* 而差出来的恰好是我们要的东西。2026-09-30 实测:claude-agent-acp 0.84.0 拉起的 Claude Code 没有
|
|
68
|
+
* TaskCreate/TaskUpdate/TodoWrite(ToolSearch 答 "No matching deferred tools found"),codex-acp
|
|
69
|
+
* 2.0.1 拉起的 Codex 0.159.2 没有 `update_plan`(问它自己答 "NO")——于是这两个 agent 从不发 ACP
|
|
70
|
+
* `plan`,生产上三天 218 个外部会话一张计划卡都没有。各自打开一个开关后同一段提示词分别发出 14 次与
|
|
71
|
+
* 4 次 `plan`。
|
|
72
|
+
*
|
|
73
|
+
* 这里写下的变量并进 registry 条目的 `distribution.*.env`,所以它是**最底下的一层**:registry
|
|
74
|
+
* 自己声明的 env、工作站配置、用户按 agent 配的 `agentEnv` 都能覆盖它(见 `connectAgent`)。一个
|
|
75
|
+
* 用户自己配了 `CODEX_CONFIG` 的 Codex 因此会整份替换掉这里的值——那是显式配置,按它来;要保留计划
|
|
76
|
+
* 工具,把 `tools.update_plan.enabled` 写进自己那份里。
|
|
77
|
+
*
|
|
78
|
+
* 这些开关不是上游文档化的稳定接口,适配器升级时要复核仍然生效(上面那段实测的做法:直接用 ACP
|
|
79
|
+
* 客户端拉起适配器,问它有没有计划工具)。
|
|
80
|
+
*/
|
|
81
|
+
import { patchOverridesFor } from '../patchAssets.js';
|
|
82
|
+
// Temporary distribution/environment overrides are bundled from axom-patch/cli/runtime.json.
|
|
1
83
|
export const AXOM_AGENT_CATALOG = [
|
|
2
|
-
{
|
|
3
|
-
|
|
84
|
+
{
|
|
85
|
+
registryAgent: 'claude-acp',
|
|
86
|
+
defaultName: 'claude-agent',
|
|
87
|
+
defaultLabel: 'Claude Agent',
|
|
88
|
+
detect: { commands: ['claude'] },
|
|
89
|
+
// 钉版本的唯一理由是补丁:claude-account-limits 的配方只核验过 0.90.0(runtime.json 的
|
|
90
|
+
// package_patches)。不钉的话 registry 一发新版,Install/Update 就装上一个配方不覆盖的包,
|
|
91
|
+
// 账号配额扩展静默消失——2026-10-14 的 antigravity(registry 已到 1.4.0、native extension
|
|
92
|
+
// 只认 1.3.0)就是这个缺口的实例。钉住后 scan 的 Update 比对(installedVersion vs 本清单的
|
|
93
|
+
// version)只在落后于钉住版本时才成立,上游新版要等 nightly 核验移植配方后再 bump。
|
|
94
|
+
// 周期核验步骤见 axom-patch/cli/nightly-task.md。
|
|
95
|
+
distribution: { version: '0.90.0', npx: { package: '@agentclientprotocol/claude-agent-acp@0.90.0' } },
|
|
96
|
+
launchEnv: {
|
|
97
|
+
// Axom 拉起的 Claude Code——会话进程、配额读的 /usage、auth status 探针、terminalLogin 代跑的
|
|
98
|
+
// `--cli auth login`——一律使用独立的 OAuth 凭据槽,与用户终端 `claude login` 写进默认槽
|
|
99
|
+
// (macOS keychain `Claude Code-credentials`)的那份互不轮换。Claude 的 refresh token 单次
|
|
100
|
+
// 轮换,多进程共享一份凭据时并发刷新会互相作废、进而被 Claude Code 清除(全员登出;
|
|
101
|
+
// anthropics/claude-code#54443,2026-10 本机实测每日复现)。
|
|
102
|
+
//
|
|
103
|
+
// CLAUDE_SECURESTORAGE_CONFIG_DIR 只改槽位命名,不把存储切到目录:macOS 上 keychain 条目变为
|
|
104
|
+
// `Claude Code-credentials-<sha256(路径)前8位>`,明文回退文件在 <路径>/.credentials.json(仅当
|
|
105
|
+
// keychain 写入失败时才落)。前导 `~` 由 `registry/launch.ts` 在 launch env 边界展开为绝对路径——
|
|
106
|
+
// Claude 把这个值按字面路径使用,不展开 `~`。
|
|
107
|
+
//
|
|
108
|
+
// **共享/独立凭据的开关收敛在这一个键上**:删除它(或将来的用户开关通过 workstation 配置的
|
|
109
|
+
// 同名变量覆盖)即回到与终端 CLI 共享默认槽的旧行为,判定点只此一处。路径一旦发布永不改名——
|
|
110
|
+
// 换字符串等于强制所有人重新登录。
|
|
111
|
+
CLAUDE_SECURESTORAGE_CONFIG_DIR: '~/.axom/auth/secures/claude',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
registryAgent: 'codex-acp',
|
|
116
|
+
defaultName: 'codex',
|
|
117
|
+
defaultLabel: 'Codex',
|
|
118
|
+
detect: { commands: ['codex'] },
|
|
119
|
+
// 与 claude-acp 同一条规则:codex-account-limits 只核验过 2.2.2,钉住直到配方随新版本移植。
|
|
120
|
+
distribution: { version: '2.2.2', npx: { package: '@agentclientprotocol/codex-acp@2.2.2' } },
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
registryAgent: 'qoder',
|
|
124
|
+
defaultName: 'qoder',
|
|
125
|
+
defaultLabel: 'Qoder',
|
|
126
|
+
detect: { commands: ['qodercli'] },
|
|
127
|
+
// The temporary registry catch-up pin lives in axom-patch/cli/runtime.json so a newer
|
|
128
|
+
// upstream release can take over without another Axom release.
|
|
129
|
+
},
|
|
4
130
|
// `gemini` was here and is deliberately gone. `@google/gemini-cli --acp` now refuses `session/new`
|
|
5
131
|
// outright ("This client is no longer supported for Gemini Code Assist for individuals … migrate
|
|
6
132
|
// to the Antigravity suite"), so recommending it puts an agent in the popover's top tier that
|
|
7
133
|
// cannot open a session for whoever takes the recommendation. It stays in the ACP registry and can
|
|
8
134
|
// still be added by hand from the collapsed section; what is withdrawn is Axom's own endorsement,
|
|
9
135
|
// which is the only thing this file publishes.
|
|
136
|
+
{
|
|
137
|
+
registryAgent: 'kimi-code',
|
|
138
|
+
defaultName: 'kimi-code',
|
|
139
|
+
defaultLabel: 'Kimi Code',
|
|
140
|
+
// Kimi Code 发布独立二进制(GitHub release,6 平台 tar.gz,各带 `.sha256`;归档根目录就是 `kimi`,
|
|
141
|
+
// Windows 是 `kimi.exe`),不依赖本机 Node —— npm 包 `@moonshot-ai/kimi-code` 要 Node >= 22.19,
|
|
142
|
+
// 会把 Node 版本变成又一个"装好了却起不来"的理由。`acp` 子命令是它的 ACP 服务端;凭据在
|
|
143
|
+
// `~/.kimi-code`,与用户自己装的那份共用——实测把二进制挪到别的目录照样免登录开会话。
|
|
144
|
+
// 其余字段照 registry#458 的条目写。
|
|
145
|
+
supplement: {
|
|
146
|
+
name: 'Kimi Code',
|
|
147
|
+
version: '2.1.1',
|
|
148
|
+
description: "Moonshot AI's next-gen coding agent",
|
|
149
|
+
repository: 'https://github.com/MoonshotAI/kimi-code',
|
|
150
|
+
website: 'https://moonshotai.github.io/kimi-code/',
|
|
151
|
+
authors: ['Moonshot AI'],
|
|
152
|
+
license: 'MIT',
|
|
153
|
+
icon: 'https://cdn.agentclientprotocol.com/registry/v1/latest/kimi.svg',
|
|
154
|
+
distribution: {
|
|
155
|
+
binary: kimiCodeBinary('2.1.1', {
|
|
156
|
+
'darwin-aarch64': ['darwin-arm64', '8c3bad99571b16abd113ab5d511a98a36b852c0d5493991842a67b8c2bc4ecd0'],
|
|
157
|
+
'darwin-x86_64': ['darwin-x64', 'f6dc0289112c24119d070f9203d44bcd53580e380819db25b58be65643b75bd4'],
|
|
158
|
+
'linux-aarch64': ['linux-arm64', '5c68d74b139b47fb3457f3805a159cdfa942a6a98a159ab158a1baf93b024bbd'],
|
|
159
|
+
'linux-x86_64': ['linux-x64', 'b66cc3787bc9dfa6a06761305dc8878f98e7a24f79fa4494c00714229a1486e8'],
|
|
160
|
+
'windows-aarch64': ['win32-arm64', '72bb17fef0d165a5f61905ede7e57c552791905d605a778967d054fe702873d4'],
|
|
161
|
+
'windows-x86_64': ['win32-x64', '87756a53a9bb0915842d884eaf43f69a06b2e404bcbb05d41c519c12d4b410cb'],
|
|
162
|
+
}),
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
supersedes: ['kimi'],
|
|
166
|
+
// 官方安装器把二进制放在 `~/.kimi-code/bin`,不一定进了 daemon 看得见的 PATH。
|
|
167
|
+
detect: {
|
|
168
|
+
commands: ['kimi'],
|
|
169
|
+
locations: everyPlatform(['~/.kimi-code/bin/kimi'], ['~/.kimi-code/bin/kimi.exe']),
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
registryAgent: 'command-code',
|
|
174
|
+
defaultName: 'command-code',
|
|
175
|
+
defaultLabel: 'Command Code',
|
|
176
|
+
// registry 没有它。1.66.0 还没有 `acp` 子命令,1.74.3 起有、真机试跑通过;2026-10-14 nightly
|
|
177
|
+
// 升到 1.82.1:`acp` 子命令仍在(四个 bin 不变),commandcode-account-limits 配方已随
|
|
178
|
+
// generate.py 移植(handler map 换了名字 u/dn→m/hn,锚点已跟)。包里有 `cmd`、`cmdc`、
|
|
179
|
+
// `commandcode`、`command-code` 四个 bin,npx 挑与包名同名的那个。没有 ACP 登录方法,只有一句
|
|
180
|
+
// 说明(终端里跑 `cmd login`);凭据在 `~/.commandcode`,与用户自己装的那份共用。npm 上的许可证
|
|
181
|
+
// 写的是 UNLICENSED(专有)。
|
|
182
|
+
supplement: {
|
|
183
|
+
name: 'Command Code',
|
|
184
|
+
version: '1.82.1',
|
|
185
|
+
description: 'Command Code, coding agent that continuously learns your coding taste.',
|
|
186
|
+
website: 'https://commandcode.ai',
|
|
187
|
+
authors: ['Command Code'],
|
|
188
|
+
license: 'UNLICENSED',
|
|
189
|
+
icon: 'https://commandcode.ai/favicon.ico',
|
|
190
|
+
distribution: { npx: { package: 'command-code@1.82.1', args: ['acp'] } },
|
|
191
|
+
},
|
|
192
|
+
detect: { commands: ['command-code', 'commandcode'] },
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
registryAgent: 'zcode-acp',
|
|
196
|
+
defaultName: 'zcode',
|
|
197
|
+
defaultLabel: 'ZCode',
|
|
198
|
+
// 社区适配器(registry#566、#650 都还没合),驱动的是 ZCode 桌面应用自带的 `zcode app-server`,
|
|
199
|
+
// 所以 ZCode 本体是前置依赖,而且没有一条我们能替用户跑的安装命令 —— 只能告诉他去装。
|
|
200
|
+
// 凭据:legacy `~/.zcode/v2/config.json`,但 ZCode 桌面 3.14.x 起不再写它;适配器 0.68.1+(上游
|
|
201
|
+
// #320)在 config.json 缺席时改读加密凭据库 `~/.zcode/v2/credentials.json`(桌面登录时写下)取
|
|
202
|
+
// individual coding-plan 的 api-key。Linux 上本体没有固定路径,只认 PATH。
|
|
203
|
+
// 2026-10-13 真机验证(ZCode 桌面 3.14.5 + 0.69.3):initialize → session/new → 首轮 prompt 通过,
|
|
204
|
+
// 日志 "serving the coding-plan API key (config.json or store)"。0.63/0.64 那轮不兼容(模型只剩
|
|
205
|
+
// 无授权的 builtin:bigmodel-coding-plan\GLM-5.3,首轮 CONFIGURATION_ERROR "Model creation failed",
|
|
206
|
+
// 2026-10-06 两台机器复现)自 0.68.1 起修复。2026-10-14 nightly 升到 0.69.4:三份配方的目标文件
|
|
207
|
+
// 与 0.69.3 字节一致(配方 versions 同时覆盖两版),subagent 探针在 0.69.4 补丁副本上通过、
|
|
208
|
+
// pristine 证实上游仍未原生发出 subagent/async 变体。
|
|
209
|
+
supplement: {
|
|
210
|
+
name: 'ZCode',
|
|
211
|
+
version: '0.69.4',
|
|
212
|
+
description: 'Community bridge that drives the real ZCode app-server (GLM) over ACP.',
|
|
213
|
+
repository: 'https://github.com/william0wang/zcode-acp',
|
|
214
|
+
website: 'https://github.com/william0wang/zcode-acp',
|
|
215
|
+
authors: ['William Wang'],
|
|
216
|
+
license: 'Apache-2.0',
|
|
217
|
+
icon: 'https://raw.githubusercontent.com/william0wang/zcode-acp/main/registry/zcode-acp/icon.svg',
|
|
218
|
+
distribution: { npx: { package: 'zcode-acp-server@0.69.4' } },
|
|
219
|
+
},
|
|
220
|
+
prerequisite: {
|
|
221
|
+
label: 'ZCode',
|
|
222
|
+
detect: {
|
|
223
|
+
commands: ['zcode'],
|
|
224
|
+
locations: {
|
|
225
|
+
'darwin-aarch64': ['/Applications/ZCode.app/Contents/Resources/glm/zcode.cjs'],
|
|
226
|
+
'darwin-x86_64': ['/Applications/ZCode.app/Contents/Resources/glm/zcode.cjs'],
|
|
227
|
+
'windows-aarch64': ['%LOCALAPPDATA%/Programs/ZCode/resources/glm/zcode.cjs'],
|
|
228
|
+
'windows-x86_64': ['%LOCALAPPDATA%/Programs/ZCode/resources/glm/zcode.cjs'],
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
hint: 'Install the ZCode desktop app (https://zcode.z.ai) and sign in once.',
|
|
232
|
+
},
|
|
233
|
+
},
|
|
10
234
|
{
|
|
11
235
|
registryAgent: 'pi-acp',
|
|
12
236
|
defaultName: 'pi',
|
|
13
237
|
defaultLabel: 'Pi',
|
|
14
|
-
|
|
15
|
-
|
|
238
|
+
recommended: true,
|
|
239
|
+
// pi-steering 与 pi-subagent-subwork 两份配方只核验过 0.0.34。registry 今天也在 0.0.34,
|
|
240
|
+
// 但那是巧合而不是保护:上游一发 0.0.35,未钉版本的 Install 就会装上一个 steering/子代理
|
|
241
|
+
// 归一都不生效的包。钉住后版本只随配方移植走(nightly-task.md)。
|
|
242
|
+
distribution: { version: '0.0.34', npx: { package: 'pi-acp@0.0.34' } },
|
|
243
|
+
prerequisite: {
|
|
244
|
+
label: 'Pi',
|
|
245
|
+
detect: { commands: ['pi'] },
|
|
16
246
|
// 不用 `curl -fsSL https://pi.dev/install.sh | sh`:读过那个脚本,它最终跑的就是这一条
|
|
17
247
|
// (`npm install -g --ignore-scripts @earendil-works/pi-coding-agent`),装出来的是同一个
|
|
18
248
|
// npm 包 —— pi 没有原生分发。脚本唯一的增值是 Node 不够新时帮你装 Node,而那一步是交互式的
|
|
@@ -22,8 +252,159 @@ export const AXOM_AGENT_CATALOG = [
|
|
|
22
252
|
requiresNode: '>=22.19.0',
|
|
23
253
|
},
|
|
24
254
|
},
|
|
255
|
+
{
|
|
256
|
+
// 推荐位第二名(pi 之后的第一个):真机验证记录见 2026-10-13 genius 站验证(scan/verify/会话/审批
|
|
257
|
+
// 全链路)。hermes 不在公开 ACP registry(41 个 agent 里没有),本条同时是 supplement —— registry
|
|
258
|
+
// 一旦收录这个 id 就整体让位。PyPI 上的 `hermes-agent`(0.19.0,requires_python <3.14)是过时的
|
|
259
|
+
// 次要通道,官方分发是 `curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash`(git
|
|
260
|
+
// clone + pm bootstrap,写 ~/.local/bin/{hermes,hermes-acp}),所以走 pathLaunch 而不是 uvx:
|
|
261
|
+
// 启动用户自己装的那份,本机只有一份,与 pi 的本体同款哲学。`hermes-acp` 是官方 wheel/git 都
|
|
262
|
+
// 声明的 ACP console script;不要用 `hermes-agent`(那是 demo runner)或裸 `hermes`(CLI 主入口,
|
|
263
|
+
// acp 只是它的子命令 —— 两者都不带 ACP 语义的入口保障)。
|
|
264
|
+
registryAgent: 'hermes-acp',
|
|
265
|
+
defaultName: 'hermes',
|
|
266
|
+
defaultLabel: 'Hermes',
|
|
267
|
+
recommended: true,
|
|
268
|
+
detect: {
|
|
269
|
+
commands: ['hermes'],
|
|
270
|
+
locations: everyPlatform(['~/.local/bin/hermes-acp'], ['~/.local/bin/hermes-acp.exe']),
|
|
271
|
+
},
|
|
272
|
+
pathLaunch: { command: 'hermes-acp', hint: 'Install Hermes Agent with the official installer (curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash), then scan again.' },
|
|
273
|
+
supplement: {
|
|
274
|
+
name: 'Hermes',
|
|
275
|
+
version: '0.21.7',
|
|
276
|
+
description: "Nous Research's self-improving coding agent — native ACP server (hermes acp).",
|
|
277
|
+
repository: 'https://github.com/NousResearch/hermes-agent',
|
|
278
|
+
website: 'https://hermes-agent.nousresearch.com',
|
|
279
|
+
authors: ['Nous Research'],
|
|
280
|
+
license: 'Apache-2.0',
|
|
281
|
+
icon: 'https://hermes-agent.nousresearch.com/favicon.ico',
|
|
282
|
+
// supplement 必须给一条 distribution 才能在 registry 类型里站得住;hermes 没有任何可安装产物,
|
|
283
|
+
// 留空 distribution 由 pathLaunch 接管 available(见 acpAgents.ts 的 roster)。
|
|
284
|
+
distribution: {},
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
// registry 自己的条目(binary .par),我们只补名字与本机检测;`agy` 是 Antigravity 装好后放进 PATH 的命令。
|
|
288
|
+
// distribution 钉住:antigravity 的账号配额靠 native extension(runtime.json
|
|
289
|
+
// native_extensions,account-limits/antigravity-proxy.mjs),proxy 是 stdio sidecar,只在核验过的
|
|
290
|
+
// 版本上声明能力。2026-10-14 nightly 升到 1.4.0:真实 1.4.0 .par 经 proxy 拉起,initialize 透传无损、
|
|
291
|
+
// `axom/accountRateLimits` 能力注入成功(本地实测;配额 READ 属于用户凭据路径,留给真机冒烟)。
|
|
292
|
+
// 归档 URL 抄自 registry 的 1.4.0 条目;registry 本身不给这个条目发 sha256,这里同样不发,校验语义与
|
|
293
|
+
// registry 直装一致(binaryInstall:无 sha256 即不校验)。上游发新版时按 nightly-task.md 核验后同升。
|
|
294
|
+
{
|
|
295
|
+
registryAgent: 'antigravity-acp',
|
|
296
|
+
defaultName: 'google-antigravity',
|
|
297
|
+
defaultLabel: 'Google Antigravity',
|
|
298
|
+
detect: { commands: ['agy'] },
|
|
299
|
+
distribution: {
|
|
300
|
+
version: '1.4.0',
|
|
301
|
+
binary: {
|
|
302
|
+
'darwin-aarch64': { archive: 'https://dl.google.com/agy-extensions/releases/macos/agy-acp-server-1.4.0-darwin-arm64.zip', cmd: './agy_acp_server.par' },
|
|
303
|
+
'darwin-x86_64': { archive: 'https://dl.google.com/agy-extensions/releases/macos/agy-acp-server-1.4.0-darwin-x86_64.zip', cmd: './agy_acp_server.par' },
|
|
304
|
+
'linux-x86_64': { archive: 'https://dl.google.com/agy-extensions/releases/linux/agy-acp-server-1.4.0-linux-x86_64.zip', cmd: './agy_acp_server.par', args: ['--uid='] },
|
|
305
|
+
'linux-aarch64': { archive: 'https://dl.google.com/agy-extensions/releases/linux/agy-acp-server-1.4.0-linux-arm64.zip', cmd: './agy_acp_server.par', args: ['--uid='] },
|
|
306
|
+
'windows-x86_64': { archive: 'https://dl.google.com/agy-extensions/releases/windows/agy-acp-server-1.4.0-windows-x86_64.zip', cmd: './agy_acp_server.exe' },
|
|
307
|
+
'windows-aarch64': { archive: 'https://dl.google.com/agy-extensions/releases/windows/agy-acp-server-1.4.0-windows-arm64.zip', cmd: './agy_acp_server.exe' },
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
},
|
|
25
311
|
];
|
|
312
|
+
/**
|
|
313
|
+
* Kimi Code 的六个平台归档:GitHub release `@moonshot-ai/kimi-code@<version>` 下的
|
|
314
|
+
* `kimi-code-<target>.tar.gz`,`sha256` 抄自同名 `.sha256` 资产。版本升级时三样一起换。
|
|
315
|
+
*/
|
|
316
|
+
function kimiCodeBinary(version, targets) {
|
|
317
|
+
const release = `https://github.com/MoonshotAI/kimi-code/releases/download/@moonshot-ai/kimi-code@${version}`;
|
|
318
|
+
return Object.fromEntries(Object.entries(targets).map(([triple, [target, sha256]]) => [triple, {
|
|
319
|
+
archive: `${release}/kimi-code-${target}.tar.gz`,
|
|
320
|
+
sha256,
|
|
321
|
+
cmd: triple.startsWith('windows-') ? './kimi.exe' : './kimi',
|
|
322
|
+
args: ['acp'],
|
|
323
|
+
}]));
|
|
324
|
+
}
|
|
325
|
+
/** 同一组位置用于全部平台(Windows 三元组用 `windows` 那组)。 */
|
|
326
|
+
function everyPlatform(unix, windows) {
|
|
327
|
+
return {
|
|
328
|
+
'darwin-aarch64': unix, 'darwin-x86_64': unix, 'linux-aarch64': unix, 'linux-x86_64': unix,
|
|
329
|
+
'windows-aarch64': windows, 'windows-x86_64': windows,
|
|
330
|
+
};
|
|
331
|
+
}
|
|
26
332
|
const BY_ID = new Map(AXOM_AGENT_CATALOG.map((entry) => [entry.registryAgent, entry]));
|
|
333
|
+
/**
|
|
334
|
+
* 静态推荐条目的展示序(目录数组序):推荐层的排序依据,用户可指定(2026-10-13:pi 第一、hermes
|
|
335
|
+
* 第二)。名册序做不到这件事 —— supplement 追加在 registry 之后,字母序又与本意相反(H < P),
|
|
336
|
+
* 所以显式带一个序号,roster 经 `recommendedRank` 下发、推荐层按它排。非静态推荐的 detected 卡
|
|
337
|
+
* ("本机在用")没有序号,排在静态推荐之后、按 label 字母序。
|
|
338
|
+
*/
|
|
339
|
+
export const RECOMMENDED_RANK = new Map(AXOM_AGENT_CATALOG
|
|
340
|
+
.map((entry, index) => [entry.registryAgent, index])
|
|
341
|
+
.filter(([id]) => catalogEntryFor(id)?.recommended === true)
|
|
342
|
+
.map(([id], rank) => [id, rank]));
|
|
27
343
|
export function catalogEntryFor(registryAgent) {
|
|
28
344
|
return BY_ID.get(registryAgent);
|
|
29
345
|
}
|
|
346
|
+
/** The CLI-owned launch environment for one agent at one registry version: catalog `launchEnv`, then runtime.json `env`. */
|
|
347
|
+
export function catalogLaunchEnv(agentId, registryVersion) {
|
|
348
|
+
return { ...catalogEntryFor(agentId)?.launchEnv, ...patchOverridesFor(agentId, registryVersion).env };
|
|
349
|
+
}
|
|
350
|
+
export function effectiveEntry(agent, supplemented = false) {
|
|
351
|
+
const entry = catalogEntryFor(agent.id);
|
|
352
|
+
const patch = patchOverridesFor(agent.id, agent.version);
|
|
353
|
+
const pinned = patch.distribution ?? entry?.distribution;
|
|
354
|
+
const pinnedBy = patch.distribution ? 'runtime-override'
|
|
355
|
+
: entry?.distribution || supplemented ? 'catalog' : undefined;
|
|
356
|
+
let effective = agent;
|
|
357
|
+
if (pinned) {
|
|
358
|
+
const { version, ...distribution } = pinned;
|
|
359
|
+
effective = { ...effective, version, distribution };
|
|
360
|
+
}
|
|
361
|
+
return {
|
|
362
|
+
agent: effective,
|
|
363
|
+
registryVersion: agent.version,
|
|
364
|
+
launchEnv: { ...entry?.launchEnv, ...patch.env },
|
|
365
|
+
...(pinnedBy ? { pinnedBy } : {}),
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
/** {@link withCatalogEntries} then {@link effectiveEntry} over a whole registry document, supplements marked as catalog pins. */
|
|
369
|
+
export function effectiveEntries(agents) {
|
|
370
|
+
const published = new Set(agents.map((agent) => agent.id));
|
|
371
|
+
return withCatalogEntries(agents).map((agent) => effectiveEntry(agent, !published.has(agent.id)));
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* The registry entry as Axom will actually install and launch it: unchanged unless something
|
|
375
|
+
* overrides it. A distribution replaces the registry's `version` and `distribution` — a runtime.json
|
|
376
|
+
* override that applies at this registry version first, else this catalog's own. Launch env is merged
|
|
377
|
+
* under every distribution's own `env` (the registry's declared variables win over ours). Identity
|
|
378
|
+
* and the registry's own words never move (see the file header).
|
|
379
|
+
*/
|
|
380
|
+
export function applyCatalogOverrides(agent) {
|
|
381
|
+
const { agent: effective, launchEnv } = effectiveEntry(agent);
|
|
382
|
+
if (!Object.keys(launchEnv).length)
|
|
383
|
+
return effective;
|
|
384
|
+
return { ...effective, distribution: withLaunchEnv(effective.distribution, launchEnv) };
|
|
385
|
+
}
|
|
386
|
+
/** The registry's list with this catalog's supplements added where the registry lacks them and superseded ids removed. */
|
|
387
|
+
export function withCatalogEntries(agents) {
|
|
388
|
+
const published = new Set(agents.map((agent) => agent.id));
|
|
389
|
+
const superseded = new Set(AXOM_AGENT_CATALOG.flatMap((entry) => entry.supersedes ?? []));
|
|
390
|
+
const supplements = AXOM_AGENT_CATALOG.flatMap((entry) => entry.supplement && !published.has(entry.registryAgent) ? [{ ...entry.supplement, id: entry.registryAgent }] : []);
|
|
391
|
+
return [...agents.filter((agent) => !superseded.has(agent.id)), ...supplements];
|
|
392
|
+
}
|
|
393
|
+
function withLaunchEnv(distribution, launchEnv) {
|
|
394
|
+
const under = (target) => ({ ...target, env: { ...launchEnv, ...(target.env ?? {}) } });
|
|
395
|
+
return {
|
|
396
|
+
...distribution,
|
|
397
|
+
...(distribution.npx && { npx: under(distribution.npx) }),
|
|
398
|
+
...(distribution.uvx && { uvx: under(distribution.uvx) }),
|
|
399
|
+
...(distribution.binary && {
|
|
400
|
+
binary: Object.fromEntries(Object.entries(distribution.binary).map(([platform, target]) => [platform, target && under(target)])),
|
|
401
|
+
}),
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* {@link withCatalogEntries} then {@link applyCatalogOverrides} over a whole registry. `AcpAgents` reads the registry through this
|
|
406
|
+
* and nothing else, so roster, install, launch and update all see the same effective entries.
|
|
407
|
+
*/
|
|
408
|
+
export function withCatalogOverrides(registry) {
|
|
409
|
+
return { load: async () => withCatalogEntries(await registry.load()).map(applyCatalogOverrides) };
|
|
410
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 本地检测:这台机器上**用户自己**有没有装某个 agent(或它的前置依赖)。
|
|
3
|
+
*
|
|
4
|
+
* ## 它回答的不是"Axom 装好了没有"
|
|
5
|
+
*
|
|
6
|
+
* Axom 启动的一律是自己托管的那份(npx 缓存、`uv tool dir`、`<config dir>/acp-adapters`),
|
|
7
|
+
* 那是 `acpAgents.ts` 的 `adapterInstalled` 的事。这里看的是用户在终端里用的那份:PATH 上的命令、
|
|
8
|
+
* 厂商安装器放下的固定文件。它只有两个用途(见 `catalog.ts` 文件头):
|
|
9
|
+
*
|
|
10
|
+
* - **推荐信号**:检测到 = 这台机器的用户在用它,于是设置页把它排进推荐位,原因写"本机在用"。
|
|
11
|
+
* - **前置依赖**:ZCode、Pi 这类适配器自己不带引擎,检测不到本体就起不来。
|
|
12
|
+
*
|
|
13
|
+
* ## 只看文件在不在,不起进程
|
|
14
|
+
*
|
|
15
|
+
* 与 `installProbe.ts` 的 `findOnPath` 同一条规矩:roster 一次要对 registry 里全部 agent 回答,
|
|
16
|
+
* 一个会执行东西的探针就是每次扫描几十个子进程。`--version` 回答的是另一个更贵的问题。
|
|
17
|
+
*/
|
|
18
|
+
import { statSync } from 'node:fs';
|
|
19
|
+
import path from 'node:path';
|
|
20
|
+
import { findOnPath } from '../installProbe.js';
|
|
21
|
+
/**
|
|
22
|
+
* 按 `spec` 在这台机器上找:PATH 上的任一命令,或本机三元组下的任一文件位置。
|
|
23
|
+
*
|
|
24
|
+
* `triple` 是 `binaryInstall.ts` 的 `platformTriple` 算出来的本机三元组;落在 registry 六个三元组
|
|
25
|
+
* 之外的机器传 `undefined`,此时只看 `commands`。
|
|
26
|
+
*/
|
|
27
|
+
export function detected(spec, probe, triple) {
|
|
28
|
+
if (!spec)
|
|
29
|
+
return false;
|
|
30
|
+
if (spec.commands?.some((command) => findOnPath(command, probe) !== undefined))
|
|
31
|
+
return true;
|
|
32
|
+
const locations = triple ? spec.locations?.[triple] : undefined;
|
|
33
|
+
return locations?.some((location) => {
|
|
34
|
+
const resolved = resolveLocation(location, probe);
|
|
35
|
+
return resolved !== undefined && isFile(resolved);
|
|
36
|
+
}) ?? false;
|
|
37
|
+
}
|
|
38
|
+
/** 展开 `~/` 与 `%LOCALAPPDATA%/`;对应的目录未知时返回 `undefined`(这条线索查不了,不是命中)。 */
|
|
39
|
+
export function resolveLocation(location, probe) {
|
|
40
|
+
if (location.startsWith('~/'))
|
|
41
|
+
return probe.home ? path.join(probe.home, location.slice(2)) : undefined;
|
|
42
|
+
if (location.startsWith('%LOCALAPPDATA%/')) {
|
|
43
|
+
return probe.localAppData ? path.join(probe.localAppData, location.slice('%LOCALAPPDATA%/'.length)) : undefined;
|
|
44
|
+
}
|
|
45
|
+
return location;
|
|
46
|
+
}
|
|
47
|
+
// `statSync` 而不是 `lstatSync`:与 `findOnPath` 同理,厂商安装器常放符号链接。
|
|
48
|
+
function isFile(candidate) {
|
|
49
|
+
try {
|
|
50
|
+
return statSync(candidate).isFile();
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
}
|