@agent-deck/backend 2.1.1 → 2.2.1
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/dist/.tsbuildinfo +1 -1
- package/dist/agent-run/adapter.d.ts +134 -0
- package/dist/agent-run/adapter.d.ts.map +1 -0
- package/dist/agent-run/adapter.js +70 -0
- package/dist/agent-run/adapter.js.map +1 -0
- package/dist/agent-run/claude-probe.d.ts +30 -0
- package/dist/agent-run/claude-probe.d.ts.map +1 -0
- package/dist/agent-run/claude-probe.js +85 -0
- package/dist/agent-run/claude-probe.js.map +1 -0
- package/dist/agent-run/claude.d.ts +49 -0
- package/dist/agent-run/claude.d.ts.map +1 -0
- package/dist/agent-run/claude.js +104 -0
- package/dist/agent-run/claude.js.map +1 -0
- package/dist/agent-run/codex.d.ts +86 -0
- package/dist/agent-run/codex.d.ts.map +1 -0
- package/dist/agent-run/codex.js +377 -0
- package/dist/agent-run/codex.js.map +1 -0
- package/dist/agent-run/cursor.d.ts +80 -0
- package/dist/agent-run/cursor.d.ts.map +1 -0
- package/dist/agent-run/cursor.js +462 -0
- package/dist/agent-run/cursor.js.map +1 -0
- package/dist/agent-run/index.d.ts +15 -0
- package/dist/agent-run/index.d.ts.map +1 -0
- package/dist/agent-run/index.js +31 -0
- package/dist/agent-run/index.js.map +1 -0
- package/dist/agent-run/muse.d.ts +134 -0
- package/dist/agent-run/muse.d.ts.map +1 -0
- package/dist/agent-run/muse.js +512 -0
- package/dist/agent-run/muse.js.map +1 -0
- package/dist/agent-run/provenance.d.ts +28 -0
- package/dist/agent-run/provenance.d.ts.map +1 -0
- package/dist/agent-run/provenance.js +118 -0
- package/dist/agent-run/provenance.js.map +1 -0
- package/dist/agent-run/records.d.ts +182 -0
- package/dist/agent-run/records.d.ts.map +1 -0
- package/dist/agent-run/records.js +359 -0
- package/dist/agent-run/records.js.map +1 -0
- package/dist/agent-run/service.d.ts +206 -0
- package/dist/agent-run/service.d.ts.map +1 -0
- package/dist/agent-run/service.js +503 -0
- package/dist/agent-run/service.js.map +1 -0
- package/dist/agent-run-api/auth.d.ts +22 -0
- package/dist/agent-run-api/auth.d.ts.map +1 -0
- package/dist/agent-run-api/auth.js +54 -0
- package/dist/agent-run-api/auth.js.map +1 -0
- package/dist/agent-run-api/finalization-store.d.ts +62 -0
- package/dist/agent-run-api/finalization-store.d.ts.map +1 -0
- package/dist/agent-run-api/finalization-store.js +126 -0
- package/dist/agent-run-api/finalization-store.js.map +1 -0
- package/dist/agent-run-api/git-finalize.d.ts +98 -0
- package/dist/agent-run-api/git-finalize.d.ts.map +1 -0
- package/dist/agent-run-api/git-finalize.js +639 -0
- package/dist/agent-run-api/git-finalize.js.map +1 -0
- package/dist/agent-run-api/host.d.ts +10 -0
- package/dist/agent-run-api/host.d.ts.map +1 -0
- package/dist/agent-run-api/host.js +27 -0
- package/dist/agent-run-api/host.js.map +1 -0
- package/dist/agent-run-api/run-index.d.ts +40 -0
- package/dist/agent-run-api/run-index.d.ts.map +1 -0
- package/dist/agent-run-api/run-index.js +69 -0
- package/dist/agent-run-api/run-index.js.map +1 -0
- package/dist/audit/store.d.ts +22 -3
- package/dist/audit/store.d.ts.map +1 -1
- package/dist/audit/store.js +67 -6
- package/dist/audit/store.js.map +1 -1
- package/dist/auth/client-grants.d.ts +28 -3
- package/dist/auth/client-grants.d.ts.map +1 -1
- package/dist/auth/client-grants.js +40 -10
- package/dist/auth/client-grants.js.map +1 -1
- package/dist/auth/hosted-mode.d.ts +2 -0
- package/dist/auth/hosted-mode.d.ts.map +1 -1
- package/dist/auth/hosted-mode.js +27 -1
- package/dist/auth/hosted-mode.js.map +1 -1
- package/dist/mcp-server.d.ts +6 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +33 -0
- package/dist/mcp-server.js.map +1 -1
- package/dist/mcp-session-binding.d.ts +15 -0
- package/dist/mcp-session-binding.d.ts.map +1 -1
- package/dist/mcp-session-binding.js +29 -0
- package/dist/mcp-session-binding.js.map +1 -1
- package/dist/routes/agent-grants.d.ts.map +1 -1
- package/dist/routes/agent-grants.js +63 -1
- package/dist/routes/agent-grants.js.map +1 -1
- package/dist/routes/agent-runs.d.ts +40 -0
- package/dist/routes/agent-runs.d.ts.map +1 -0
- package/dist/routes/agent-runs.js +755 -0
- package/dist/routes/agent-runs.js.map +1 -0
- package/dist/routes/scope.d.ts.map +1 -1
- package/dist/routes/scope.js +7 -1
- package/dist/routes/scope.js.map +1 -1
- package/dist/routes/websocket.d.ts +31 -1
- package/dist/routes/websocket.d.ts.map +1 -1
- package/dist/routes/websocket.js +71 -52
- package/dist/routes/websocket.js.map +1 -1
- package/dist/scope/display.d.ts +8 -0
- package/dist/scope/display.d.ts.map +1 -1
- package/dist/scope/display.js +39 -0
- package/dist/scope/display.js.map +1 -1
- package/dist/scope/live-display-registry.d.ts +5 -0
- package/dist/scope/live-display-registry.d.ts.map +1 -1
- package/dist/scope/live-display-registry.js +3 -0
- package/dist/scope/live-display-registry.js.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +25 -13
- package/dist/server/index.js.map +1 -1
- package/dist/services/health-reprobe.d.ts +54 -0
- package/dist/services/health-reprobe.d.ts.map +1 -0
- package/dist/services/health-reprobe.js +145 -0
- package/dist/services/health-reprobe.js.map +1 -0
- package/dist/services/service-manager.d.ts +15 -0
- package/dist/services/service-manager.d.ts.map +1 -1
- package/dist/services/service-manager.js +39 -2
- package/dist/services/service-manager.js.map +1 -1
- package/dist/trusted-session/auth.d.ts +12 -1
- package/dist/trusted-session/auth.d.ts.map +1 -1
- package/dist/trusted-session/auth.js +1 -0
- package/dist/trusted-session/auth.js.map +1 -1
- package/dist/trusted-session/policy-hook.d.ts.map +1 -1
- package/dist/trusted-session/policy-hook.js +25 -9
- package/dist/trusted-session/policy-hook.js.map +1 -1
- package/dist/trusted-session/route-policy-registry.d.ts.map +1 -1
- package/dist/trusted-session/route-policy-registry.js +11 -0
- package/dist/trusted-session/route-policy-registry.js.map +1 -1
- package/package.json +13 -2
- package/static-ui/assets/{index-ynIby2JK.js → index-CnXSzXCn.js} +58 -58
- package/static-ui/index.html +1 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client adapters for the host-local agent run service (NOT-404, NOT-479).
|
|
3
|
+
*
|
|
4
|
+
* All client-specific launching lives behind {@link ClientAdapter}; the run,
|
|
5
|
+
* log, and status code only sees normalized events. New clients plug in by
|
|
6
|
+
* adding an adapter plus a registry entry in `service.ts` — the run record
|
|
7
|
+
* and status paths need no changes.
|
|
8
|
+
*
|
|
9
|
+
* Tool profiles (`readonly`/`edit`) and meta.json stay owned by the shared run
|
|
10
|
+
* service: adapters receive the profile name and map it to client flags.
|
|
11
|
+
*/
|
|
12
|
+
import type { RunResumeOrigin } from './records';
|
|
13
|
+
/** Read-only profile: exactly the botmancers prototype allowlist. */
|
|
14
|
+
export declare const RUN_READONLY_TOOLS: readonly string[];
|
|
15
|
+
/**
|
|
16
|
+
* Edit profile: readonly plus file writes and git-scoped Bash. No `git push`,
|
|
17
|
+
* no unscoped `Bash`, no network tools. One-line reason per git entry:
|
|
18
|
+
* - `git diff` reviews local changes before staging or committing;
|
|
19
|
+
* - `git add` stages the files the session created or edited;
|
|
20
|
+
* - `git commit` records the work as a commit for handoff;
|
|
21
|
+
* - `git checkout -b` starts delegated work on a fresh branch.
|
|
22
|
+
*/
|
|
23
|
+
export declare const RUN_EDIT_TOOLS: readonly string[];
|
|
24
|
+
/** Both profiles run with `acceptEdits`; `bypassPermissions` is never used. */
|
|
25
|
+
export declare const RUN_PERMISSION_MODE = "acceptEdits";
|
|
26
|
+
/** Setting sources copied from the prototype. */
|
|
27
|
+
export declare const RUN_SETTING_SOURCES: readonly string[];
|
|
28
|
+
export declare const RUN_TOOL_PROFILES: readonly ["readonly", "edit"];
|
|
29
|
+
export type RunToolsProfile = (typeof RUN_TOOL_PROFILES)[number];
|
|
30
|
+
export declare function allowedToolsForProfile(profile: RunToolsProfile): readonly string[];
|
|
31
|
+
/** Clients with a working adapter. */
|
|
32
|
+
export declare const RUN_SUPPORTED_CLIENTS: readonly ["claude", "codex", "cursor", "muse"];
|
|
33
|
+
export type RunClient = (typeof RUN_SUPPORTED_CLIENTS)[number];
|
|
34
|
+
/** Clients with a ticket but no adapter yet (separate tickets, blocked by NOT-404). */
|
|
35
|
+
export declare const RUN_FUTURE_CLIENTS: readonly [];
|
|
36
|
+
export declare function isSupportedRunClient(value: string): value is RunClient;
|
|
37
|
+
export declare function isFutureRunClient(value: string): boolean;
|
|
38
|
+
export declare function missingRunClientMessage(): string;
|
|
39
|
+
export declare function runClientMessage(client: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Normalized session event. Adapters map client-specific streams onto this
|
|
42
|
+
* envelope; only the envelope is shared (text/tool names stay client-native).
|
|
43
|
+
* `sessionId` carries the client session id (Claude session id, Codex
|
|
44
|
+
* thread id) whenever the adapter learns it. A `success` result carries the
|
|
45
|
+
* final assistant answer as a string for claude, codex, and muse; token
|
|
46
|
+
* usage, when the client reports it, travels in `usage`, never in `result`.
|
|
47
|
+
*/
|
|
48
|
+
export type NormalizedEvent = {
|
|
49
|
+
kind: 'text';
|
|
50
|
+
text: string;
|
|
51
|
+
sessionId?: string;
|
|
52
|
+
} | {
|
|
53
|
+
kind: 'tool';
|
|
54
|
+
name: string;
|
|
55
|
+
sessionId?: string;
|
|
56
|
+
} | {
|
|
57
|
+
kind: 'result';
|
|
58
|
+
subtype: string;
|
|
59
|
+
result: unknown;
|
|
60
|
+
usage?: unknown;
|
|
61
|
+
sessionId?: string;
|
|
62
|
+
} | {
|
|
63
|
+
kind: 'notice';
|
|
64
|
+
message: string;
|
|
65
|
+
sessionId?: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Which tool profiles a client can enforce on a fresh start and on a resume
|
|
69
|
+
* (NOT-481 capability discovery). Mirrors each adapter's `planStart` gates;
|
|
70
|
+
* `same_profile_provenance` means a resume continues only a session an Agent
|
|
71
|
+
* Deck run on this host started with the same client, deck, cwd, and tools.
|
|
72
|
+
*/
|
|
73
|
+
export type RunClientProfiles = {
|
|
74
|
+
start: readonly RunToolsProfile[];
|
|
75
|
+
resume: readonly RunToolsProfile[];
|
|
76
|
+
resumeRequires: 'none' | 'same_profile_provenance';
|
|
77
|
+
};
|
|
78
|
+
export declare const RUN_CLIENT_PROFILES: Record<RunClient, RunClientProfiles>;
|
|
79
|
+
/**
|
|
80
|
+
* Process ownership for one run (NOT-481). When present, an adapter spawns
|
|
81
|
+
* its client as the leader of a new process group and reports the group id,
|
|
82
|
+
* so cancellation can stop the client and everything it started — and
|
|
83
|
+
* nothing else. In-process clients (the Claude SDK) honor `signal` instead.
|
|
84
|
+
* The CLI omits this, so foreground runs keep receiving the terminal's ^C.
|
|
85
|
+
*/
|
|
86
|
+
export type RunProcessControl = {
|
|
87
|
+
signal: AbortSignal;
|
|
88
|
+
onProcessGroup(pgid: number): void;
|
|
89
|
+
};
|
|
90
|
+
export type AdapterStartArgs = {
|
|
91
|
+
cwd: string;
|
|
92
|
+
prompt: string;
|
|
93
|
+
tools: RunToolsProfile;
|
|
94
|
+
resumeId?: string;
|
|
95
|
+
/**
|
|
96
|
+
* The trusted run that started `resumeId`, resolved by the run service for
|
|
97
|
+
* clients whose resume cannot re-apply the profile (codex; NOT-484).
|
|
98
|
+
*/
|
|
99
|
+
resumedFrom?: RunResumeOrigin;
|
|
100
|
+
control?: RunProcessControl;
|
|
101
|
+
};
|
|
102
|
+
export type AdapterPreflight = {
|
|
103
|
+
ok: true;
|
|
104
|
+
} | {
|
|
105
|
+
ok: false;
|
|
106
|
+
remedy: string;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Pure start plan, computed before any model call. `trustOverride` records
|
|
110
|
+
* whether the launch bypasses a client workspace-trust guard (Codex
|
|
111
|
+
* `--skip-git-repo-check`); `{ ok: false }` fails closed with a remedy and
|
|
112
|
+
* the run exits before spawning anything.
|
|
113
|
+
*/
|
|
114
|
+
export type AdapterStartPlan = {
|
|
115
|
+
ok: true;
|
|
116
|
+
trustOverride: boolean;
|
|
117
|
+
} | {
|
|
118
|
+
ok: false;
|
|
119
|
+
remedy: string;
|
|
120
|
+
};
|
|
121
|
+
export type ClientAdapter = {
|
|
122
|
+
readonly id: RunClient;
|
|
123
|
+
/** Binary/auth checks. Must make no model call and spawn no session. */
|
|
124
|
+
preflight(): Promise<AdapterPreflight>;
|
|
125
|
+
/** Pure per-start plan (sandbox mapping, trust decision, fail-closed gates). */
|
|
126
|
+
planStart(args: AdapterStartArgs): AdapterStartPlan;
|
|
127
|
+
/**
|
|
128
|
+
* Stream normalized events for one session. Rejects (or the iterator
|
|
129
|
+
* throws) when the client process fails, so the shared run code marks the
|
|
130
|
+
* run `error`. A stream that ends without a `result` event is also `error`.
|
|
131
|
+
*/
|
|
132
|
+
start(args: AdapterStartArgs): AsyncIterable<NormalizedEvent>;
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/agent-run/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,qEAAqE;AACrE,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAQ/C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAQ3C,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAEjD,iDAAiD;AACjD,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAwB,CAAC;AAE1E,eAAO,MAAM,iBAAiB,+BAAgC,CAAC;AAC/D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,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exports, "__esModule", { value: true });
|
|
3
|
+
exports.RUN_CLIENT_PROFILES = exports.RUN_FUTURE_CLIENTS = exports.RUN_SUPPORTED_CLIENTS = exports.RUN_TOOL_PROFILES = exports.RUN_SETTING_SOURCES = exports.RUN_PERMISSION_MODE = exports.RUN_EDIT_TOOLS = exports.RUN_READONLY_TOOLS = void 0;
|
|
4
|
+
exports.allowedToolsForProfile = allowedToolsForProfile;
|
|
5
|
+
exports.isSupportedRunClient = isSupportedRunClient;
|
|
6
|
+
exports.isFutureRunClient = isFutureRunClient;
|
|
7
|
+
exports.missingRunClientMessage = missingRunClientMessage;
|
|
8
|
+
exports.runClientMessage = runClientMessage;
|
|
9
|
+
/** Read-only profile: exactly the botmancers prototype allowlist. */
|
|
10
|
+
exports.RUN_READONLY_TOOLS = [
|
|
11
|
+
'mcp__agent-deck__*',
|
|
12
|
+
'Read',
|
|
13
|
+
'Glob',
|
|
14
|
+
'Grep',
|
|
15
|
+
'Bash(git log:*)',
|
|
16
|
+
'Bash(git status:*)',
|
|
17
|
+
'Bash(ls:*)',
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* Edit profile: readonly plus file writes and git-scoped Bash. No `git push`,
|
|
21
|
+
* no unscoped `Bash`, no network tools. One-line reason per git entry:
|
|
22
|
+
* - `git diff` reviews local changes before staging or committing;
|
|
23
|
+
* - `git add` stages the files the session created or edited;
|
|
24
|
+
* - `git commit` records the work as a commit for handoff;
|
|
25
|
+
* - `git checkout -b` starts delegated work on a fresh branch.
|
|
26
|
+
*/
|
|
27
|
+
exports.RUN_EDIT_TOOLS = [
|
|
28
|
+
...exports.RUN_READONLY_TOOLS,
|
|
29
|
+
'Edit',
|
|
30
|
+
'Write',
|
|
31
|
+
'Bash(git diff:*)',
|
|
32
|
+
'Bash(git add:*)',
|
|
33
|
+
'Bash(git commit:*)',
|
|
34
|
+
'Bash(git checkout -b:*)',
|
|
35
|
+
];
|
|
36
|
+
/** Both profiles run with `acceptEdits`; `bypassPermissions` is never used. */
|
|
37
|
+
exports.RUN_PERMISSION_MODE = 'acceptEdits';
|
|
38
|
+
/** Setting sources copied from the prototype. */
|
|
39
|
+
exports.RUN_SETTING_SOURCES = ['project', 'user'];
|
|
40
|
+
exports.RUN_TOOL_PROFILES = ['readonly', 'edit'];
|
|
41
|
+
function allowedToolsForProfile(profile) {
|
|
42
|
+
return profile === 'edit' ? exports.RUN_EDIT_TOOLS : exports.RUN_READONLY_TOOLS;
|
|
43
|
+
}
|
|
44
|
+
/** Clients with a working adapter. */
|
|
45
|
+
exports.RUN_SUPPORTED_CLIENTS = ['claude', 'codex', 'cursor', 'muse'];
|
|
46
|
+
/** Clients with a ticket but no adapter yet (separate tickets, blocked by NOT-404). */
|
|
47
|
+
exports.RUN_FUTURE_CLIENTS = [];
|
|
48
|
+
function isSupportedRunClient(value) {
|
|
49
|
+
return exports.RUN_SUPPORTED_CLIENTS.includes(value);
|
|
50
|
+
}
|
|
51
|
+
function isFutureRunClient(value) {
|
|
52
|
+
return exports.RUN_FUTURE_CLIENTS.includes(value);
|
|
53
|
+
}
|
|
54
|
+
function missingRunClientMessage() {
|
|
55
|
+
return '--client is required: pass --client claude, --client codex, --client cursor, or --client muse';
|
|
56
|
+
}
|
|
57
|
+
function runClientMessage(client) {
|
|
58
|
+
if (isFutureRunClient(client)) {
|
|
59
|
+
return `Client adapter "${client}" is not available yet (supported clients: claude, codex, cursor, muse)`;
|
|
60
|
+
}
|
|
61
|
+
return `--client must be one of: claude, codex, cursor, muse (got "${client}")`;
|
|
62
|
+
}
|
|
63
|
+
exports.RUN_CLIENT_PROFILES = {
|
|
64
|
+
claude: { start: exports.RUN_TOOL_PROFILES, resume: exports.RUN_TOOL_PROFILES, resumeRequires: 'none' },
|
|
65
|
+
// `codex exec resume` accepts no sandbox flag, so resume keeps the origin run's sandbox.
|
|
66
|
+
codex: { start: exports.RUN_TOOL_PROFILES, resume: exports.RUN_TOOL_PROFILES, resumeRequires: 'same_profile_provenance' },
|
|
67
|
+
cursor: { start: exports.RUN_TOOL_PROFILES, resume: exports.RUN_TOOL_PROFILES, resumeRequires: 'none' },
|
|
68
|
+
muse: { start: exports.RUN_TOOL_PROFILES, resume: exports.RUN_TOOL_PROFILES, resumeRequires: 'none' },
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../src/agent-run/adapter.ts"],"names":[],"mappings":";;;AAmDA,wDAEC;AASD,oDAEC;AAED,8CAEC;AAED,0DAEC;AAED,4CAKC;AAlED,qEAAqE;AACxD,QAAA,kBAAkB,GAAsB;IACnD,oBAAoB;IACpB,MAAM;IACN,MAAM;IACN,MAAM;IACN,iBAAiB;IACjB,oBAAoB;IACpB,YAAY;CACb,CAAC;AAEF;;;;;;;GAOG;AACU,QAAA,cAAc,GAAsB;IAC/C,GAAG,0BAAkB;IACrB,MAAM;IACN,OAAO;IACP,kBAAkB;IAClB,iBAAiB;IACjB,oBAAoB;IACpB,yBAAyB;CAC1B,CAAC;AAEF,+EAA+E;AAClE,QAAA,mBAAmB,GAAG,aAAa,CAAC;AAEjD,iDAAiD;AACpC,QAAA,mBAAmB,GAAsB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAE7D,QAAA,iBAAiB,GAAG,CAAC,UAAU,EAAE,MAAM,CAAU,CAAC;AAG/D,SAAgB,sBAAsB,CAAC,OAAwB;IAC7D,OAAO,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,sBAAc,CAAC,CAAC,CAAC,0BAAkB,CAAC;AAClE,CAAC;AAED,sCAAsC;AACzB,QAAA,qBAAqB,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;AAGpF,uFAAuF;AAC1E,QAAA,kBAAkB,GAAG,EAAW,CAAC;AAE9C,SAAgB,oBAAoB,CAAC,KAAa;IAChD,OAAQ,6BAA2C,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACtE,CAAC;AAED,SAAgB,iBAAiB,CAAC,KAAa;IAC7C,OAAQ,0BAAwC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC;AAED,SAAgB,uBAAuB;IACrC,OAAO,+FAA+F,CAAC;AACzG,CAAC;AAED,SAAgB,gBAAgB,CAAC,MAAc;IAC7C,IAAI,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9B,OAAO,mBAAmB,MAAM,yEAAyE,CAAC;IAC5G,CAAC;IACD,OAAO,8DAA8D,MAAM,IAAI,CAAC;AAClF,CAAC;AA4BY,QAAA,mBAAmB,GAAyC;IACvE,MAAM,EAAE,EAAE,KAAK,EAAE,yBAAiB,EAAE,MAAM,EAAE,yBAAiB,EAAE,cAAc,EAAE,MAAM,EAAE;IACvF,yFAAyF;IACzF,KAAK,EAAE,EAAE,KAAK,EAAE,yBAAiB,EAAE,MAAM,EAAE,yBAAiB,EAAE,cAAc,EAAE,yBAAyB,EAAE;IACzG,MAAM,EAAE,EAAE,KAAK,EAAE,yBAAiB,EAAE,MAAM,EAAE,yBAAiB,EAAE,cAAc,EAAE,MAAM,EAAE;IACvF,IAAI,EAAE,EAAE,KAAK,EAAE,yBAAiB,EAAE,MAAM,EAAE,yBAAiB,EAAE,cAAc,EAAE,MAAM,EAAE;CACtF,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Outcome of the Claude Code client probe: installed and signed in, or why not. */
|
|
2
|
+
export type ClaudeClientStatus = {
|
|
3
|
+
ok: true;
|
|
4
|
+
} | {
|
|
5
|
+
ok: false;
|
|
6
|
+
reason: 'not-installed' | 'not-signed-in';
|
|
7
|
+
};
|
|
8
|
+
export type ClaudeClientProbe = () => Promise<ClaudeClientStatus> | ClaudeClientStatus;
|
|
9
|
+
/** The one fix command both preflight remedies name. Verified against `claude auth --help`. */
|
|
10
|
+
export declare const CLAUDE_AUTH_LOGIN_COMMAND = "claude auth login";
|
|
11
|
+
export declare const RUN_CLAUDE_NOT_INSTALLED_ERROR = "Claude Code is not installed (no `claude` on PATH). Install Claude Code, then run `claude auth login` to sign in, then retry.";
|
|
12
|
+
export declare const RUN_CLAUDE_NOT_SIGNED_IN_ERROR = "Claude Code is not signed in. Run `claude auth login` to sign in with your own account, then retry.";
|
|
13
|
+
/** First executable `name` on `pathEnv`, or null. Pure apart from the fs check. */
|
|
14
|
+
export declare function findExecutableOnPath(name: string, pathEnv?: string): string | null;
|
|
15
|
+
/**
|
|
16
|
+
* True only when `claude auth status` JSON reports a login. Never throws:
|
|
17
|
+
* garbage, an empty string, or a logged-out report all read as signed out.
|
|
18
|
+
*/
|
|
19
|
+
export declare function claudeAuthStatusShowsLogin(stdout: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Default Claude Code preflight: the `claude` CLI must be on PATH and
|
|
22
|
+
* `claude auth status` must report a login. Local only — no model call.
|
|
23
|
+
* An explicit ANTHROPIC_API_KEY passes without the OAuth check once the
|
|
24
|
+
* `claude` CLI is found on PATH (API-key onboarding stays out of scope;
|
|
25
|
+
* the friend path signs in via `claude auth login`). Any other failure —
|
|
26
|
+
* logged out, unparseable output, a hung or crashed `claude` — reads as
|
|
27
|
+
* not signed in; re-running the login is the remedy in every case.
|
|
28
|
+
*/
|
|
29
|
+
export declare function defaultClaudeClientProbe(): Promise<ClaudeClientStatus>;
|
|
30
|
+
//# sourceMappingURL=claude-probe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-probe.d.ts","sourceRoot":"","sources":["../../src/agent-run/claude-probe.ts"],"names":[],"mappings":"AAQA,oFAAoF;AACpF,MAAM,MAAM,kBAAkB,GAC1B;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GACZ;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAAA;CAAE,CAAC;AAE7D,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAC;AAEvF,+FAA+F;AAC/F,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;AAE7D,eAAO,MAAM,8BAA8B,kIACqG,CAAC;AAEjJ,eAAO,MAAM,8BAA8B,wGACyE,CAAC;AAErH,mFAAmF;AACnF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,SAAyB,GAAG,MAAM,GAAG,IAAI,CAclG;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAMlE;AAED;;;;;;;;GAQG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAwB5E"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.RUN_CLAUDE_NOT_SIGNED_IN_ERROR = exports.RUN_CLAUDE_NOT_INSTALLED_ERROR = exports.CLAUDE_AUTH_LOGIN_COMMAND = void 0;
|
|
7
|
+
exports.findExecutableOnPath = findExecutableOnPath;
|
|
8
|
+
exports.claudeAuthStatusShowsLogin = claudeAuthStatusShowsLogin;
|
|
9
|
+
exports.defaultClaudeClientProbe = defaultClaudeClientProbe;
|
|
10
|
+
/**
|
|
11
|
+
* Claude Code client probe (NOT-405): the `claude` CLI must be installed and
|
|
12
|
+
* signed in before any Claude run starts. Local only — no model call.
|
|
13
|
+
*/
|
|
14
|
+
const node_child_process_1 = require("node:child_process");
|
|
15
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
16
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
17
|
+
/** The one fix command both preflight remedies name. Verified against `claude auth --help`. */
|
|
18
|
+
exports.CLAUDE_AUTH_LOGIN_COMMAND = 'claude auth login';
|
|
19
|
+
exports.RUN_CLAUDE_NOT_INSTALLED_ERROR = `Claude Code is not installed (no \`claude\` on PATH). Install Claude Code, then run \`${exports.CLAUDE_AUTH_LOGIN_COMMAND}\` to sign in, then retry.`;
|
|
20
|
+
exports.RUN_CLAUDE_NOT_SIGNED_IN_ERROR = `Claude Code is not signed in. Run \`${exports.CLAUDE_AUTH_LOGIN_COMMAND}\` to sign in with your own account, then retry.`;
|
|
21
|
+
/** First executable `name` on `pathEnv`, or null. Pure apart from the fs check. */
|
|
22
|
+
function findExecutableOnPath(name, pathEnv = process.env.PATH ?? '') {
|
|
23
|
+
for (const dir of pathEnv.split(node_path_1.default.delimiter)) {
|
|
24
|
+
if (!dir) {
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
const candidate = node_path_1.default.join(dir, name);
|
|
28
|
+
try {
|
|
29
|
+
node_fs_1.default.accessSync(candidate, node_fs_1.default.constants.X_OK);
|
|
30
|
+
return candidate;
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
// Not here; keep scanning.
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* True only when `claude auth status` JSON reports a login. Never throws:
|
|
40
|
+
* garbage, an empty string, or a logged-out report all read as signed out.
|
|
41
|
+
*/
|
|
42
|
+
function claudeAuthStatusShowsLogin(stdout) {
|
|
43
|
+
try {
|
|
44
|
+
return JSON.parse(stdout).loggedIn === true;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Default Claude Code preflight: the `claude` CLI must be on PATH and
|
|
52
|
+
* `claude auth status` must report a login. Local only — no model call.
|
|
53
|
+
* An explicit ANTHROPIC_API_KEY passes without the OAuth check once the
|
|
54
|
+
* `claude` CLI is found on PATH (API-key onboarding stays out of scope;
|
|
55
|
+
* the friend path signs in via `claude auth login`). Any other failure —
|
|
56
|
+
* logged out, unparseable output, a hung or crashed `claude` — reads as
|
|
57
|
+
* not signed in; re-running the login is the remedy in every case.
|
|
58
|
+
*/
|
|
59
|
+
async function defaultClaudeClientProbe() {
|
|
60
|
+
const claudePath = findExecutableOnPath('claude');
|
|
61
|
+
if (!claudePath) {
|
|
62
|
+
return { ok: false, reason: 'not-installed' };
|
|
63
|
+
}
|
|
64
|
+
if ((process.env.ANTHROPIC_API_KEY ?? '').trim()) {
|
|
65
|
+
return { ok: true };
|
|
66
|
+
}
|
|
67
|
+
try {
|
|
68
|
+
const out = (0, node_child_process_1.execFileSync)(claudePath, ['auth', 'status'], {
|
|
69
|
+
encoding: 'utf8',
|
|
70
|
+
timeout: 15_000,
|
|
71
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
72
|
+
});
|
|
73
|
+
return claudeAuthStatusShowsLogin(out)
|
|
74
|
+
? { ok: true }
|
|
75
|
+
: { ok: false, reason: 'not-signed-in' };
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
// The binary vanished between the PATH scan and the exec.
|
|
79
|
+
if (error?.code === 'ENOENT') {
|
|
80
|
+
return { ok: false, reason: 'not-installed' };
|
|
81
|
+
}
|
|
82
|
+
return { ok: false, reason: 'not-signed-in' };
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=claude-probe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-probe.js","sourceRoot":"","sources":["../../src/agent-run/claude-probe.ts"],"names":[],"mappings":";;;;;;AAyBA,oDAcC;AAMD,gEAMC;AAWD,4DAwBC;AAtFD;;;GAGG;AACH,2DAAkD;AAClD,sDAAyB;AACzB,0DAA6B;AAS7B,+FAA+F;AAClF,QAAA,yBAAyB,GAAG,mBAAmB,CAAC;AAEhD,QAAA,8BAA8B,GACzC,yFAAyF,iCAAyB,4BAA4B,CAAC;AAEpI,QAAA,8BAA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AM,GAAG,GAAG,IAAA,iCAAY,EAAC,UAAU,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE;YACvD,QAAQ,EAAE,MAAM;YAChB,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;SACpC,CAAC,CAAC;QACH,OAAO,0BAA0B,CAAC,GAAG,CAAC;YACpC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE;YACd,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;IAC7C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,0DAA0D;QAC1D,IAAK,KAA+B,EAAE,IAAI,KAAK,QAAQ,EAAE,CAAC;YACxD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;QAChD,CAAC;QACD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;IAChD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude adapter for `agent-deck run` (NOT-404).
|
|
3
|
+
*
|
|
4
|
+
* Moved verbatim out of the CLI run.ts (NOT-400): same SDK `query()` params, same
|
|
5
|
+
* message mapping, same missing-SDK remedy. No behavior change.
|
|
6
|
+
*/
|
|
7
|
+
import { type ClientAdapter } from './adapter';
|
|
8
|
+
/** Minimal structural view of the SDK `query()` surface (the SDK loads lazily). */
|
|
9
|
+
export type RunQueryMessage = {
|
|
10
|
+
type?: string;
|
|
11
|
+
subtype?: string;
|
|
12
|
+
session_id?: string;
|
|
13
|
+
result?: unknown;
|
|
14
|
+
message?: {
|
|
15
|
+
content?: Array<{
|
|
16
|
+
type?: string;
|
|
17
|
+
text?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type RunQueryOptions = {
|
|
23
|
+
cwd: string;
|
|
24
|
+
resume?: string;
|
|
25
|
+
settingSources: readonly string[];
|
|
26
|
+
permissionMode: string;
|
|
27
|
+
allowedTools: readonly string[];
|
|
28
|
+
/** Aborts the SDK session when the run is canceled (NOT-481). */
|
|
29
|
+
abortController?: AbortController;
|
|
30
|
+
};
|
|
31
|
+
export type RunQueryFn = (params: {
|
|
32
|
+
prompt: string;
|
|
33
|
+
options: RunQueryOptions;
|
|
34
|
+
}) => AsyncIterable<RunQueryMessage>;
|
|
35
|
+
/**
|
|
36
|
+
* Resolve the SDK from `searchPaths` (the CLI passes its own package root,
|
|
37
|
+
* which declares the SDK dependency) or, when omitted, from this module.
|
|
38
|
+
*/
|
|
39
|
+
export declare function loadClaudeSdkQuery(searchPaths?: readonly string[]): RunQueryFn;
|
|
40
|
+
export type ClaudeAdapterDeps = {
|
|
41
|
+
/** Injected in tests; production lazily requires the Claude Agent SDK. */
|
|
42
|
+
query?: RunQueryFn;
|
|
43
|
+
/** Override the SDK loader (tests use this to fail preflight deterministically). */
|
|
44
|
+
loadQuery?: () => RunQueryFn;
|
|
45
|
+
/** Where the default loader resolves the SDK from (see {@link loadClaudeSdkQuery}). */
|
|
46
|
+
sdkSearchPaths?: readonly string[];
|
|
47
|
+
};
|
|
48
|
+
export declare function createClaudeAdapter(deps?: ClaudeAdapterDeps): ClientAdapter;
|
|
49
|
+
//# sourceMappingURL=claude.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/agent-run/claude.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAKL,KAAK,aAAa,EAEnB,MAAM,WAAW,CAAC;AAEnB,mFAAmF;AACnF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAClE,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,iEAAiE;IACjE,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,eAAe,CAAC;CAC1B,KAAK,aAAa,CAAC,eAAe,CAAC,CAAC;AAErC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,CAiB9E;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,0EAA0E;IAC1E,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,UAAU,CAAC;IAC7B,uFAAuF;IACvF,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,iBAAsB,GAAG,aAAa,CA0E/E"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadClaudeSdkQuery = loadClaudeSdkQuery;
|
|
4
|
+
exports.createClaudeAdapter = createClaudeAdapter;
|
|
5
|
+
/**
|
|
6
|
+
* Claude adapter for `agent-deck run` (NOT-404).
|
|
7
|
+
*
|
|
8
|
+
* Moved verbatim out of the CLI run.ts (NOT-400): same SDK `query()` params, same
|
|
9
|
+
* message mapping, same missing-SDK remedy. No behavior change.
|
|
10
|
+
*/
|
|
11
|
+
const adapter_1 = require("./adapter");
|
|
12
|
+
/**
|
|
13
|
+
* Resolve the SDK from `searchPaths` (the CLI passes its own package root,
|
|
14
|
+
* which declares the SDK dependency) or, when omitted, from this module.
|
|
15
|
+
*/
|
|
16
|
+
function loadClaudeSdkQuery(searchPaths) {
|
|
17
|
+
try {
|
|
18
|
+
const sdkPath = require.resolve('@anthropic-ai/claude-agent-sdk', searchPaths ? { paths: [...searchPaths] } : undefined);
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
20
|
+
const sdk = require(sdkPath);
|
|
21
|
+
if (typeof sdk.query !== 'function') {
|
|
22
|
+
throw new Error('unexpected SDK shape');
|
|
23
|
+
}
|
|
24
|
+
return sdk.query;
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
throw new Error('The Claude Agent SDK is not installed. Reinstall the CLI (`agent-deck upgrade` or `npm install -g @agent-deck/cli@latest`) so @anthropic-ai/claude-agent-sdk is present, then retry.');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function createClaudeAdapter(deps = {}) {
|
|
31
|
+
let cachedQuery = deps.query;
|
|
32
|
+
const loadQuery = deps.loadQuery ?? (() => loadClaudeSdkQuery(deps.sdkSearchPaths));
|
|
33
|
+
const getQuery = () => {
|
|
34
|
+
if (!cachedQuery) {
|
|
35
|
+
cachedQuery = loadQuery();
|
|
36
|
+
}
|
|
37
|
+
return cachedQuery;
|
|
38
|
+
};
|
|
39
|
+
return {
|
|
40
|
+
id: 'claude',
|
|
41
|
+
async preflight() {
|
|
42
|
+
try {
|
|
43
|
+
getQuery();
|
|
44
|
+
return { ok: true };
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
return { ok: false, remedy: error instanceof Error ? error.message : String(error) };
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
planStart() {
|
|
51
|
+
return { ok: true, trustOverride: false };
|
|
52
|
+
},
|
|
53
|
+
async *start(args) {
|
|
54
|
+
const query = getQuery();
|
|
55
|
+
let abortController;
|
|
56
|
+
if (args.control) {
|
|
57
|
+
abortController = new AbortController();
|
|
58
|
+
const controller = abortController;
|
|
59
|
+
if (args.control.signal.aborted) {
|
|
60
|
+
controller.abort();
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
args.control.signal.addEventListener('abort', () => controller.abort(), { once: true });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const stream = query({
|
|
67
|
+
prompt: args.prompt,
|
|
68
|
+
options: {
|
|
69
|
+
cwd: args.cwd,
|
|
70
|
+
...(args.resumeId ? { resume: args.resumeId } : {}),
|
|
71
|
+
settingSources: [...adapter_1.RUN_SETTING_SOURCES],
|
|
72
|
+
permissionMode: adapter_1.RUN_PERMISSION_MODE,
|
|
73
|
+
allowedTools: [...(0, adapter_1.allowedToolsForProfile)(args.tools)],
|
|
74
|
+
...(abortController ? { abortController } : {}),
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
for await (const message of stream) {
|
|
78
|
+
const sessionId = typeof message.session_id === 'string' && message.session_id
|
|
79
|
+
? message.session_id
|
|
80
|
+
: undefined;
|
|
81
|
+
const withSession = sessionId ? { sessionId } : {};
|
|
82
|
+
if (message.type === 'assistant') {
|
|
83
|
+
for (const block of message.message?.content ?? []) {
|
|
84
|
+
if (block.type === 'text' && typeof block.text === 'string') {
|
|
85
|
+
yield { kind: 'text', text: block.text, ...withSession };
|
|
86
|
+
}
|
|
87
|
+
else if (block.type === 'tool_use' && typeof block.name === 'string') {
|
|
88
|
+
yield { kind: 'tool', name: block.name, ...withSession };
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else if (message.type === 'result') {
|
|
93
|
+
yield {
|
|
94
|
+
kind: 'result',
|
|
95
|
+
subtype: message.subtype ?? '',
|
|
96
|
+
result: message.result,
|
|
97
|
+
...withSession,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=claude.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/agent-run/claude.ts"],"names":[],"mappings":";;AA6CA,gDAiBC;AAWD,kDA0EC;AAnJD;;;;;GAKG;AACH,uCAOmB;AA4BnB;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,WAA+B;IAChE,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAC7B,gCAAgC,EAChC,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CACtD,CAAC;QACF,iEAAiE;QACjE,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAwB,CAAC;QACpD,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,GAAG,CAAC,KAAmB,CAAC;IACjC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,sLAAsL,CACvL,CAAC;IACJ,CAAC;AACH,CAAC;AAWD,SAAgB,mBAAmB,CAAC,OAA0B,EAAE;IAC9D,IAAI,WAAW,GAA2B,IAAI,CAAC,KAAK,CAAC;IACrD,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;IACpF,MAAM,QAAQ,GAAG,GAAe,EAAE;QACh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I,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,WAAW,EAAE,CAAC;wBAC3D,CAAC;oBACH,CAAC;gBACH,CAAC;qBAAM,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;oBACrC,MAAM;wBACJ,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,EAAE;wBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;wBACtB,GAAG,WAAW;qBACf,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type ClientAdapter, type NormalizedEvent, type RunProcessControl, type RunToolsProfile } from './adapter';
|
|
2
|
+
/** Tool-profile mapping: readonly is `-s read-only`, edit is `-s workspace-write`. */
|
|
3
|
+
export declare const CODEX_SANDBOX_FOR_PROFILE: Record<RunToolsProfile, 'read-only' | 'workspace-write'>;
|
|
4
|
+
export declare const CODEX_JSONL_VERSION_NOTE = "codex-cli 0.157.1";
|
|
5
|
+
export declare function resolveCodexBin(): string;
|
|
6
|
+
export type CodexArgvArgs = {
|
|
7
|
+
prompt: string;
|
|
8
|
+
tools: RunToolsProfile;
|
|
9
|
+
resumeId?: string;
|
|
10
|
+
insideGitRepo: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Resume ids are codex thread ids (UUIDs); a leading `-` is never legitimate
|
|
14
|
+
* and would be parsed as a resume option (resume accepts
|
|
15
|
+
* `--dangerously-bypass-approvals-and-sandbox`, `-c`, ...), so it fails
|
|
16
|
+
* closed in planStart and throws here. Belt and suspenders with the `--`
|
|
17
|
+
* placement below: this builder never emits a dash-leading id at all.
|
|
18
|
+
*/
|
|
19
|
+
export declare function assertSafeResumeId(resumeId: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Pure argv builder (everything after the `codex` binary). Start:
|
|
22
|
+
* `exec --json [--skip-git-repo-check] -s <mode> -- <prompt>`; resume:
|
|
23
|
+
* `exec resume --json [--skip-git-repo-check] -- <thread> <prompt>`
|
|
24
|
+
* (`codex exec resume [OPTIONS] [SESSION_ID] [PROMPT]` takes both positionals
|
|
25
|
+
* after `--`; verified `--help` after `--` is treated as a positional, not
|
|
26
|
+
* the help flag, on codex-cli 0.157.1).
|
|
27
|
+
* Resume takes no `-s`: the thread keeps its original sandbox.
|
|
28
|
+
* The `--` terminator keeps dash-leading prompts (markdown bullets, YAML
|
|
29
|
+
* frontmatter, or a literal `--dangerously-...` string) from being parsed
|
|
30
|
+
* as codex options.
|
|
31
|
+
*/
|
|
32
|
+
export declare function buildCodexArgv(args: CodexArgvArgs): string[];
|
|
33
|
+
export declare function defaultIsGitRepo(cwd: string): boolean;
|
|
34
|
+
export type CodexProbeResult = {
|
|
35
|
+
code: number;
|
|
36
|
+
stdout: string;
|
|
37
|
+
stderr: string;
|
|
38
|
+
};
|
|
39
|
+
export type CodexProbe = (bin: string, argv: string[]) => CodexProbeResult;
|
|
40
|
+
export declare function defaultCodexProbe(bin: string, argv: string[]): CodexProbeResult;
|
|
41
|
+
export type CodexChild = {
|
|
42
|
+
/** Stdout split into lines (without line terminators). */
|
|
43
|
+
stdout: AsyncIterable<string>;
|
|
44
|
+
wait: () => Promise<{
|
|
45
|
+
code: number | null;
|
|
46
|
+
stderrTail: string;
|
|
47
|
+
}>;
|
|
48
|
+
};
|
|
49
|
+
/** `control` (NOT-481): spawn as a new process-group leader and report its id. */
|
|
50
|
+
export type CodexSpawnOptions = {
|
|
51
|
+
cwd: string;
|
|
52
|
+
control?: RunProcessControl;
|
|
53
|
+
};
|
|
54
|
+
export type CodexSpawn = (bin: string, argv: string[], opts: CodexSpawnOptions) => CodexChild;
|
|
55
|
+
export declare function defaultCodexSpawn(bin: string, argv: string[], opts: CodexSpawnOptions): CodexChild;
|
|
56
|
+
export type CodexLineContext = {
|
|
57
|
+
threadId: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Text of the latest `agent_message` in the current turn. Codex emits
|
|
60
|
+
* commentary and the final answer as the same item type, so the last one
|
|
61
|
+
* before `turn.completed` is the final answer.
|
|
62
|
+
*/
|
|
63
|
+
lastAgentMessage?: string | null;
|
|
64
|
+
};
|
|
65
|
+
export declare const CODEX_NO_FINAL_MESSAGE = "codex turn completed without a final assistant message: re-run the prompt, or read the text and tool lines above for what the session did.";
|
|
66
|
+
/**
|
|
67
|
+
* Map one `codex exec --json` stdout line onto normalized events:
|
|
68
|
+
* `thread.started.thread_id` becomes the session id (no log line);
|
|
69
|
+
* `agent_message` items become `text`; command/tool items become `tool`;
|
|
70
|
+
* `turn.completed` becomes `result` (subtype `success`) whose `result` is the
|
|
71
|
+
* last `agent_message` text of the turn and whose `usage` is the codex usage
|
|
72
|
+
* object. A turn that completes with no agent message becomes a `failed`
|
|
73
|
+
* result, never an empty success. Provider `error`
|
|
74
|
+
* events become `notice` (non-fatal). Unknown kinds are ignored so a newer
|
|
75
|
+
* CLI cannot break the log. Never throws: unparseable lines become `notice`.
|
|
76
|
+
*/
|
|
77
|
+
export declare function codexEventsFromLine(line: string, ctx: CodexLineContext): NormalizedEvent[];
|
|
78
|
+
export declare function codexTrustOverride(cwd: string, isGitRepo: (cwd: string) => boolean): boolean;
|
|
79
|
+
export type CodexAdapterDeps = {
|
|
80
|
+
bin?: string;
|
|
81
|
+
probe?: CodexProbe;
|
|
82
|
+
spawn?: CodexSpawn;
|
|
83
|
+
isGitRepo?: (cwd: string) => boolean;
|
|
84
|
+
};
|
|
85
|
+
export declare function createCodexAdapter(deps?: CodexAdapterDeps): ClientAdapter;
|
|
86
|
+
//# sourceMappingURL=codex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/agent-run/codex.ts"],"names":[],"mappings":"AA2BA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,K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