@zgeoff/atc 2.10.4 → 2.12.0
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 +3 -3
- package/package.json +1 -1
- package/src/agents/agent-adapter.ts +72 -0
- package/src/agents/atc-bridge-files.ts +1 -1
- package/src/agents/build-args-without-flags.ts +25 -0
- package/src/agents/build-claude-override-args.ts +26 -0
- package/src/agents/claude-adapter.ts +52 -1
- package/src/agents/claude-effort-levels.ts +5 -0
- package/src/agents/codex-adapter.ts +46 -1
- package/src/agents/find-flag-value.ts +27 -0
- package/src/agents/gateway-adapter.ts +75 -1
- package/src/agents/grok-adapter.ts +22 -0
- package/src/cli.ts +22 -0
- package/src/client/boot-daemon.ts +6 -0
- package/src/client/daemon-client.ts +14 -2
- package/src/client/spawn-picker.ts +27 -4
- package/src/daemon/build-agent-list.ts +94 -0
- package/src/daemon/build-config-revision.ts +27 -0
- package/src/daemon/build-execution-targets.ts +34 -0
- package/src/daemon/build-fleet-events.ts +2 -1
- package/src/daemon/build-payload-hash.ts +31 -0
- package/src/daemon/build-scoped-context.ts +232 -0
- package/src/daemon/build-target-access.ts +33 -0
- package/src/daemon/build-target-forbidden-error.ts +13 -0
- package/src/daemon/build-target-identity.ts +22 -0
- package/src/daemon/build-target-list.ts +50 -0
- package/src/daemon/daemon-connection.ts +371 -99
- package/src/daemon/daemon.ts +537 -90
- package/src/daemon/effect-remains-error.ts +13 -0
- package/src/daemon/execution-provider.ts +103 -0
- package/src/daemon/find-execution-refusal.ts +104 -0
- package/src/daemon/idempotency-ledger.ts +164 -0
- package/src/daemon/local-pty-provider.ts +83 -0
- package/src/daemon/mint-session-id.ts +5 -5
- package/src/daemon/parse-report.ts +29 -3
- package/src/daemon/parse-spawn-overrides.ts +94 -0
- package/src/daemon/permission-registry.ts +14 -4
- package/src/daemon/restore-fleet.ts +66 -19
- package/src/daemon/session-runtime.ts +10 -0
- package/src/daemon/sessions.ts +287 -65
- package/src/daemon/start-headless-run.ts +11 -0
- package/src/daemon/start-headless-turn.ts +11 -2
- package/src/daemon/target-access.ts +36 -0
- package/src/mcp/answer-mcp-request.ts +12 -4
- package/src/mcp/answer-rpc-request.ts +40 -6
- package/src/mcp/build-principal-caller.ts +15 -0
- package/src/mcp/build-spawn-descriptions.ts +45 -0
- package/src/mcp/build-tool-list.ts +88 -7
- package/src/mcp/mcp-tools.ts +245 -24
- package/src/mcp/parse-idempotency-key.ts +29 -0
- package/src/mcp/reconnecting-caller.ts +77 -15
- package/src/mcp/require-daemon-features.ts +40 -0
- package/src/mcp/run-tool.ts +139 -35
- package/src/mcp/start-mcp-http-server.ts +130 -24
- package/src/mcp/types.ts +9 -1
- package/src/mcp-http-server.ts +6 -1
- package/src/mcp-server.ts +13 -1
- package/src/protocol/daemon-error.ts +5 -1
- package/src/protocol/daemon-features.ts +47 -0
- package/src/protocol/parse-daemon-features.ts +19 -0
- package/src/protocol/protocol.ts +44 -11
- package/src/protocol/request-param-schemas.ts +78 -12
- package/src/report.ts +20 -3
- package/src/shared/agent-session-id.ts +1 -1
- package/src/shared/collect-principals.ts +51 -0
- package/src/shared/collect-targets.ts +144 -0
- package/src/shared/config.ts +139 -14
- package/src/shared/daemon-id.ts +8 -0
- package/src/shared/format-json-kind.ts +21 -0
- package/src/shared/sort-json-keys.ts +19 -0
- package/src/shared/to-daemon-id.ts +11 -0
- package/src/store/fleet-entry.ts +42 -9
- package/src/store/idempotency-record.ts +48 -0
- package/src/store/message-owner.ts +1 -1
- package/src/store/message-record.ts +3 -0
- package/src/store/run-migrations.ts +272 -7
- package/src/store/state-store.ts +503 -34
- package/src/workspace/check-workspace-completeness.ts +90 -0
- package/src/workspace/create-workspace-clone.ts +239 -0
- package/src/workspace/normalize-git-url.ts +59 -0
- package/src/workspace/read-workspace-tar.ts +38 -0
- package/src/workspace/resolve-path-source.ts +170 -0
- package/src/workspace/run-git.ts +103 -0
- package/src/workspace/sanitize-workspace-clone.ts +146 -0
- package/src/workspace/workspace-provenance.ts +11 -0
- package/src/workspace/workspace-source.ts +8 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ExecutionTarget } from './build-execution-targets';
|
|
2
|
+
import type { ExecutionCapabilities } from './execution-provider';
|
|
3
|
+
|
|
4
|
+
export interface TargetEntry {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
|
|
7
|
+
// The provider kind the config selects for the target.
|
|
8
|
+
readonly provider: string;
|
|
9
|
+
|
|
10
|
+
// The identity a session spawned on the target binds to.
|
|
11
|
+
readonly identity: string;
|
|
12
|
+
|
|
13
|
+
// Whether this daemon has a provider of that kind, so a spawn can run there.
|
|
14
|
+
readonly available: boolean;
|
|
15
|
+
readonly default: boolean;
|
|
16
|
+
readonly capabilities: ExecutionCapabilities;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// What a target without a provider can do: nothing.
|
|
20
|
+
const NO_CAPABILITIES: ExecutionCapabilities = {
|
|
21
|
+
spawn: false,
|
|
22
|
+
attach: false,
|
|
23
|
+
input: false,
|
|
24
|
+
resize: false,
|
|
25
|
+
kill: false,
|
|
26
|
+
transfer: false,
|
|
27
|
+
run: false,
|
|
28
|
+
headless: false,
|
|
29
|
+
suspend: false,
|
|
30
|
+
destroy: false,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* One `agents.list` target entry per configured target, in config order.
|
|
35
|
+
* An entry holds the target's id, provider kind, and capabilities, never its
|
|
36
|
+
* options, since those can hold a host's address or an account.
|
|
37
|
+
*/
|
|
38
|
+
export function buildTargetList(
|
|
39
|
+
targets: readonly ExecutionTarget[],
|
|
40
|
+
defaultTarget: string | null,
|
|
41
|
+
): TargetEntry[] {
|
|
42
|
+
return targets.map((target) => ({
|
|
43
|
+
id: target.id,
|
|
44
|
+
provider: target.kind,
|
|
45
|
+
identity: target.identity,
|
|
46
|
+
available: target.provider !== null,
|
|
47
|
+
default: target.id === defaultTarget,
|
|
48
|
+
capabilities: target.provider?.capabilities ?? NO_CAPABILITIES,
|
|
49
|
+
}));
|
|
50
|
+
}
|