@agent-link/agent 0.1.204 → 0.1.207
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/backends/claude.d.ts +90 -0
- package/dist/backends/claude.js +356 -0
- package/dist/backends/claude.js.map +1 -0
- package/dist/backends/index.d.ts +27 -0
- package/dist/backends/index.js +52 -0
- package/dist/backends/index.js.map +1 -0
- package/dist/backends/types.d.ts +379 -0
- package/dist/backends/types.js +120 -0
- package/dist/backends/types.js.map +1 -0
- package/dist/claude.d.ts +22 -2
- package/dist/claude.js +54 -6
- package/dist/claude.js.map +1 -1
- package/dist/cli.js +62 -2
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +5 -0
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/connection.d.ts +4 -1
- package/dist/connection.js +304 -136
- package/dist/connection.js.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/recap.d.ts +1 -0
- package/dist/recap.js.map +1 -1
- package/dist/runtime.d.ts +176 -0
- package/dist/runtime.js +286 -0
- package/dist/runtime.js.map +1 -0
- package/package.json +1 -1
package/dist/runtime.js
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentRuntime — facade in front of the AgentBackend implementation.
|
|
3
|
+
*
|
|
4
|
+
* PR3 strategy: claude.ts stays unchanged. ClaudeBackend wraps it for the
|
|
5
|
+
* AgentBackend interface (used by future Codex backend). connection.ts no
|
|
6
|
+
* longer imports claude.ts directly — it goes through runtime.ts.
|
|
7
|
+
*
|
|
8
|
+
* The current runtime is a thin re-export of claude.ts's surface. Both the
|
|
9
|
+
* legacy `ChatFile` type (from claude.ts) and the backend-neutral
|
|
10
|
+
* `BackendFileAttachment` type are exported side-by-side; PR4+ will collapse
|
|
11
|
+
* `ChatFile` into an alias once connection.ts stops referencing it. The
|
|
12
|
+
* AgentBackend instance is constructed lazily on first import so that:
|
|
13
|
+
*
|
|
14
|
+
* 1) tests can `vi.mock('./claude.js', ...)` without forcing a backend
|
|
15
|
+
* construction order, and
|
|
16
|
+
* 2) connection.ts can swap in a different backend (Codex) in PR4 by
|
|
17
|
+
* changing only this file — connection.ts stays untouched.
|
|
18
|
+
*
|
|
19
|
+
* Future evolution: replace the direct re-export shim with NormalizedEvent
|
|
20
|
+
* subscription + outbound translation. As of PR3, claude.ts → ClaudeBackend
|
|
21
|
+
* already round-trips frames losslessly via `process_output` raw fanout, so
|
|
22
|
+
* the additional translation layer would be pure overhead. Adding Codex
|
|
23
|
+
* (PR4) is the natural trigger to flip this from re-export to translate.
|
|
24
|
+
*
|
|
25
|
+
* NOTE (PR3 → PR4 boundary): connection.ts currently still imports the
|
|
26
|
+
* legacy claude.ts surface through this file's re-exports and calls
|
|
27
|
+
* `claudeHandleChat` etc. directly — it does NOT yet go through
|
|
28
|
+
* `getBackend().startTurn(...)`. This is intentional for PR3: the
|
|
29
|
+
* AgentBackend boundary is in place and contract-tested via mocked
|
|
30
|
+
* unit tests (see test/agent/backends/contract-claude.test.ts), but
|
|
31
|
+
* production code still uses the legacy path. PR4 will rewire connection.ts
|
|
32
|
+
* to call `getBackend()` methods so the boundary is exercised end-to-end,
|
|
33
|
+
* at which point the re-exports below can be removed.
|
|
34
|
+
*/
|
|
35
|
+
import { createBackend } from './backends/index.js';
|
|
36
|
+
/**
|
|
37
|
+
* Instance-based runtime that owns the public conversationId↔BackendSessionRef
|
|
38
|
+
* mapping. Created and owned by `connection.ts` per connection lifecycle.
|
|
39
|
+
*
|
|
40
|
+
* Tests construct fresh instances against a stub backend directly. See
|
|
41
|
+
* docs/2026-05-11-pr4b-agent-runtime.md for the full design.
|
|
42
|
+
*/
|
|
43
|
+
export class AgentRuntime {
|
|
44
|
+
backend;
|
|
45
|
+
/** Public mapping. Backend keeps its own internal copy (legacy adaptation)
|
|
46
|
+
* until NormalizedEvent carries conversationId (PR-W1). */
|
|
47
|
+
convToSession = new Map();
|
|
48
|
+
convToWorkDir = new Map();
|
|
49
|
+
/** PR4-D: cache of session-id → full BackendSessionRef populated by
|
|
50
|
+
* listHistory(). Lets readHistory/rename/delete pass the real ref to
|
|
51
|
+
* the backend instead of synthesizing one from a bare id (which would
|
|
52
|
+
* be Claude-only). */
|
|
53
|
+
historyRefs = new Map();
|
|
54
|
+
constructor(backend) {
|
|
55
|
+
this.backend = backend;
|
|
56
|
+
}
|
|
57
|
+
/** Sync — no async work today. Kept sync to match index.ts signal handler. */
|
|
58
|
+
start() { }
|
|
59
|
+
/**
|
|
60
|
+
* Canonical async shutdown path. Called by `disconnect()` (which awaits).
|
|
61
|
+
*
|
|
62
|
+
* PR4-B note: we intentionally do NOT call `backend.shutdown()` here. The
|
|
63
|
+
* backend is a process-wide singleton (see `getBackend()` below) shared
|
|
64
|
+
* across reconnects within the same process — tearing it down on every
|
|
65
|
+
* disconnect would leave subsequent `connect()` calls holding a dead
|
|
66
|
+
* instance with detached subscribers and cleared maps. This matches the
|
|
67
|
+
* legacy claude.ts lifetime (also process-wide). PR-W1 will move backend
|
|
68
|
+
* ownership into AgentRuntime per-connection, at which point this can
|
|
69
|
+
* call `backend.shutdown()` and reset the singleton in lockstep.
|
|
70
|
+
* (Codex review #2, medium.)
|
|
71
|
+
*/
|
|
72
|
+
async shutdown() {
|
|
73
|
+
this.convToSession.clear();
|
|
74
|
+
this.convToWorkDir.clear();
|
|
75
|
+
this.historyRefs.clear();
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Sync best-effort path — only for the SIGINT/SIGTERM handler in index.ts
|
|
79
|
+
* which calls process.exit(0) immediately after. Currently equivalent to
|
|
80
|
+
* shutdown() for the Claude backend; kept as a distinct entry point so
|
|
81
|
+
* future async-cleanup backends (Codex) have a sync escape hatch wired
|
|
82
|
+
* from the signal handler.
|
|
83
|
+
*/
|
|
84
|
+
shutdownSyncBestEffort() {
|
|
85
|
+
this.convToSession.clear();
|
|
86
|
+
this.convToWorkDir.clear();
|
|
87
|
+
this.historyRefs.clear();
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Ensure a backend session exists for `convId`. Returns the cached ref
|
|
91
|
+
* unless it's still a `pending:` placeholder, in which case we re-call
|
|
92
|
+
* `backend.ensureSession` so the backend can return a now-resolved ref.
|
|
93
|
+
*/
|
|
94
|
+
async ensureConversation(convId, opts) {
|
|
95
|
+
this.convToWorkDir.set(convId, opts.workDir);
|
|
96
|
+
const cached = this.convToSession.get(convId);
|
|
97
|
+
if (cached && !cached.backendSessionId.startsWith('pending:'))
|
|
98
|
+
return cached;
|
|
99
|
+
const ref = await this.backend.ensureSession({
|
|
100
|
+
conversationId: convId,
|
|
101
|
+
workDir: opts.workDir,
|
|
102
|
+
resumeSessionId: opts.resumeSessionId,
|
|
103
|
+
});
|
|
104
|
+
this.convToSession.set(convId, ref);
|
|
105
|
+
return ref;
|
|
106
|
+
}
|
|
107
|
+
async startTurn(convId, input, opts) {
|
|
108
|
+
const ref = await this.ensureConversation(convId, opts);
|
|
109
|
+
await this.backend.startTurn(ref, input);
|
|
110
|
+
}
|
|
111
|
+
async interruptTurn(convId) {
|
|
112
|
+
const ref = this.convToSession.get(convId);
|
|
113
|
+
if (!ref)
|
|
114
|
+
return; // quiet no-op
|
|
115
|
+
await this.backend.interruptTurn(ref);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Evict the cached session ref + workDir for `convId`. Call this whenever
|
|
119
|
+
* the conversation is being reset (e.g. `new_conversation` handler) so the
|
|
120
|
+
* next `startTurn` calls `backend.ensureSession` fresh instead of reusing
|
|
121
|
+
* the stale ref — which would cause ClaudeBackend to compute
|
|
122
|
+
* `baseOptions.resumeSessionId` from the old session id and resume the
|
|
123
|
+
* just-cleared conversation. (Copilot review round 3.)
|
|
124
|
+
*/
|
|
125
|
+
evictConversation(convId) {
|
|
126
|
+
this.convToSession.delete(convId);
|
|
127
|
+
this.convToWorkDir.delete(convId);
|
|
128
|
+
}
|
|
129
|
+
// Funnelled through the runtime so we stay rooted on a single backend
|
|
130
|
+
// instance (Codex review #3). The runtime doesn't need convId here —
|
|
131
|
+
// requestId is globally unique in claude.ts.
|
|
132
|
+
answerUserInput(requestId, answers) {
|
|
133
|
+
this.backend.answerUserInput({ requestId, answers });
|
|
134
|
+
}
|
|
135
|
+
answerApproval(requestId, decision) {
|
|
136
|
+
this.backend.answerApproval({ requestId, decision });
|
|
137
|
+
}
|
|
138
|
+
// ── PR4-C: per-conversation user-action surface ─────────────────────────
|
|
139
|
+
// Backend methods are keyed by conversationId (not BackendSessionRef) so
|
|
140
|
+
// claude.ts can populate `pendingModels` for not-yet-started conversations
|
|
141
|
+
// (Codex finding B). Restart/mode setters use `hasConversation()` as the
|
|
142
|
+
// sole control-flow signal — runtime never inspects its own map for branch
|
|
143
|
+
// decisions (Codex finding A).
|
|
144
|
+
setModel(convId, model) {
|
|
145
|
+
this.backend.setModel?.(convId, model);
|
|
146
|
+
}
|
|
147
|
+
getEffectiveModel(convId) {
|
|
148
|
+
return this.backend.getEffectiveModel?.(convId) ?? null;
|
|
149
|
+
}
|
|
150
|
+
isCompacting(convId) {
|
|
151
|
+
return this.backend.isCompacting?.(convId) ?? false;
|
|
152
|
+
}
|
|
153
|
+
restartConversation(convId, opts) {
|
|
154
|
+
const result = this.backend.restartSession?.(convId, opts)
|
|
155
|
+
?? { claudeSessionId: null, wasTurnActive: false };
|
|
156
|
+
this.evictConversation(convId);
|
|
157
|
+
return result;
|
|
158
|
+
}
|
|
159
|
+
setPlanMode(convId, enabled, workDir) {
|
|
160
|
+
return this.applyModeOrPlaceholder(convId, workDir, { planMode: enabled });
|
|
161
|
+
}
|
|
162
|
+
setBrainMode(convId, enabled, workDir) {
|
|
163
|
+
return this.applyModeOrPlaceholder(convId, workDir, { brainMode: enabled });
|
|
164
|
+
}
|
|
165
|
+
setPermissionMode(convId, mode, workDir) {
|
|
166
|
+
return this.applyModeOrPlaceholder(convId, workDir, {
|
|
167
|
+
permissionMode: mode,
|
|
168
|
+
planMode: mode === 'plan', // mirrors connection.ts:972 derivation
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
applyModeOrPlaceholder(convId, workDir, opts) {
|
|
172
|
+
if (this.backend.hasConversation?.(convId)) {
|
|
173
|
+
const result = this.backend.restartSession?.(convId, opts)
|
|
174
|
+
?? { claudeSessionId: null, wasTurnActive: false };
|
|
175
|
+
this.evictConversation(convId);
|
|
176
|
+
return result;
|
|
177
|
+
}
|
|
178
|
+
this.backend.createPlaceholderSession?.(convId, workDir, opts);
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
// ── PR4-D: history surface ────────────────────────────────────────────────
|
|
182
|
+
// Returns backend-native rows; protocol mapping to legacy SessionInfo /
|
|
183
|
+
// HistoryMessage shapes happens at the connection.ts boundary.
|
|
184
|
+
/** List sessions in `workDir`. Caches each row's BackendSessionRef keyed
|
|
185
|
+
* by `session.backendSessionId` so subsequent read/rename/delete calls
|
|
186
|
+
* can use the real ref instead of a Claude-only synthesized one. */
|
|
187
|
+
async listHistory(workDir) {
|
|
188
|
+
const rows = await this.backend.listSessions(workDir);
|
|
189
|
+
for (const row of rows) {
|
|
190
|
+
this.historyRefs.set(row.session.backendSessionId, row.session);
|
|
191
|
+
}
|
|
192
|
+
return rows;
|
|
193
|
+
}
|
|
194
|
+
async readHistory(workDir, sessionId) {
|
|
195
|
+
return this.backend.readSession(workDir, this.refForHistory(sessionId));
|
|
196
|
+
}
|
|
197
|
+
/** Returns false if the backend has no rename capability OR the session
|
|
198
|
+
* was not found in `workDir`. connection.ts uses this to drive the
|
|
199
|
+
* BRAIN_DATA_DIR fallback + 1500 ms retry policy. */
|
|
200
|
+
async renameHistorySession(workDir, sessionId, title) {
|
|
201
|
+
if (!this.backend.renameSession)
|
|
202
|
+
return false;
|
|
203
|
+
return this.backend.renameSession(workDir, this.refForHistory(sessionId), title);
|
|
204
|
+
}
|
|
205
|
+
async deleteHistorySession(workDir, sessionId) {
|
|
206
|
+
if (!this.backend.deleteSession)
|
|
207
|
+
return false;
|
|
208
|
+
const ok = await this.backend.deleteSession(workDir, this.refForHistory(sessionId));
|
|
209
|
+
if (ok)
|
|
210
|
+
this.historyRefs.delete(sessionId);
|
|
211
|
+
return ok;
|
|
212
|
+
}
|
|
213
|
+
/** Look up the cached ref; fall back to a Claude-shaped one if we've
|
|
214
|
+
* never seen this id (e.g. web client resumes by sessionId before
|
|
215
|
+
* list_sessions ran). The fallback is Claude-only safe — ClaudeBackend's
|
|
216
|
+
* read/rename/delete consult only `backendSessionId`. A future Codex
|
|
217
|
+
* backend that needs `backendThreadId !== backendSessionId` MUST require
|
|
218
|
+
* list_sessions first and reject the synthesized fallback (PR6). */
|
|
219
|
+
refForHistory(sessionId) {
|
|
220
|
+
const cached = this.historyRefs.get(sessionId);
|
|
221
|
+
if (cached)
|
|
222
|
+
return cached;
|
|
223
|
+
return {
|
|
224
|
+
backendType: this.backend.type,
|
|
225
|
+
backendSessionId: sessionId,
|
|
226
|
+
backendThreadId: sessionId,
|
|
227
|
+
providerSessionId: sessionId,
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
// ── Backend instance (singleton for this process) ───────────────────────────
|
|
232
|
+
let backendInstance = null;
|
|
233
|
+
/**
|
|
234
|
+
* Get (or lazily construct) the runtime's backend. The backend type is
|
|
235
|
+
* fixed at 'claude' for PR3; PR4 will add a config knob.
|
|
236
|
+
*/
|
|
237
|
+
export function getBackend() {
|
|
238
|
+
if (!backendInstance) {
|
|
239
|
+
backendInstance = createBackend('claude');
|
|
240
|
+
}
|
|
241
|
+
return backendInstance;
|
|
242
|
+
}
|
|
243
|
+
/** Test-only: reset the backend singleton between specs.
|
|
244
|
+
* Awaits shutdown() on the existing instance before nulling it out so the
|
|
245
|
+
* ClaudeBackend's addSendFn / addOnSessionStarted subscriptions are detached
|
|
246
|
+
* — otherwise stale instances keep receiving events and tests double-fire. */
|
|
247
|
+
export async function _resetBackendForTests() {
|
|
248
|
+
if (backendInstance) {
|
|
249
|
+
try {
|
|
250
|
+
await backendInstance.shutdown();
|
|
251
|
+
}
|
|
252
|
+
catch { /* ignore */ }
|
|
253
|
+
}
|
|
254
|
+
backendInstance = null;
|
|
255
|
+
}
|
|
256
|
+
// ── Re-exports from claude.ts ────────────────────────────────────────────────
|
|
257
|
+
//
|
|
258
|
+
// During PR3, claude.ts remains the source of truth for the Claude driver.
|
|
259
|
+
// connection.ts imports these from runtime.ts so a future Codex backend can
|
|
260
|
+
// drop in without changing connection.ts.
|
|
261
|
+
export { handleChat, // TODO(PR-W1): unused after PR4-B chat migration; keep for team.ts/scheduler.ts until they migrate to runtime.startTurn
|
|
262
|
+
setSendFn, // TODO(PR-W1): replace with getBackend().on(listener)
|
|
263
|
+
addSendFn, // TODO(PR-W1): replace with getBackend().on(listener)
|
|
264
|
+
abort, // TODO(PR-W1): folded into runtime.interruptTurn / shutdown
|
|
265
|
+
abortAll, // TODO(PR-W1): folded into runtime.shutdown
|
|
266
|
+
cancelExecution, // TODO(PR-W1): unused after PR4-B cancel migration; keep for team.ts/scheduler.ts
|
|
267
|
+
handleBtwQuestion, // TODO(PR-W1): plan-mode follow-up answer; deferred — requires backend.on() to replace addSendFn so workDir + fallback session id can flow through a typed answer payload (see docs/2026-05-11-pr4c-runtime-user-actions.md Codex finding #3)
|
|
268
|
+
getConversation, // TODO(PR-W2): replace with backend.readSession / listSessions
|
|
269
|
+
getConversations, // TODO(PR-W2): same
|
|
270
|
+
clearSessionId, // TODO(PR-W2): backend-internal once history surface migrates
|
|
271
|
+
evictByClaudeSessionId, // TODO(PR-W2): same
|
|
272
|
+
rebindConversation, // TODO(PR-W2): same
|
|
273
|
+
addOutputObserver, // TODO(PR-Team/Loop): team.ts/scheduler.ts inject observers; replace with runtime.subscribe(filter)
|
|
274
|
+
removeOutputObserver, // TODO(PR-Team/Loop): same
|
|
275
|
+
addCloseObserver, // TODO(PR-Team/Loop): same
|
|
276
|
+
removeCloseObserver, // TODO(PR-Team/Loop): same
|
|
277
|
+
setOutputObserver, // TODO(PR-Team/Loop): same
|
|
278
|
+
clearOutputObserver, // TODO(PR-Team/Loop): same
|
|
279
|
+
setCloseObserver, // TODO(PR-Team/Loop): same
|
|
280
|
+
clearCloseObserver, // TODO(PR-Team/Loop): same
|
|
281
|
+
getPendingQuestions, // TODO(PR-W2): expose via runtime.getPending(convId)
|
|
282
|
+
getPendingToolPermissions, // TODO(PR-W2): same
|
|
283
|
+
setOnSessionStarted, // TODO(PR-W1): replace with on(filter session_started)
|
|
284
|
+
addOnSessionStarted, // TODO(PR-W1): same
|
|
285
|
+
} from './claude.js';
|
|
286
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,aAAa,EAAiD,MAAM,qBAAqB,CAAC;AAwBnG;;;;;;GAMG;AACH,MAAM,OAAO,YAAY;IAWM;IAV7B;gEAC4D;IAC3C,aAAa,GAAG,IAAI,GAAG,EAA6B,CAAC;IACrD,aAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC3D;;;2BAGuB;IACN,WAAW,GAAG,IAAI,GAAG,EAA6B,CAAC;IAEpE,YAA6B,OAAqB;QAArB,YAAO,GAAP,OAAO,CAAc;IAAG,CAAC;IAEtD,8EAA8E;IAC9E,KAAK,KAAmE,CAAC;IAEzE;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,QAAQ;QACZ,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAC3B,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAC3B,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;IAED;;;;;;OAMG;IACH,sBAAsB;QACpB,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAC3B,IA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