@corenel/tools-web 0.1.0 → 0.2.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.
Files changed (48) hide show
  1. package/dist/budgetGate.d.ts +21 -0
  2. package/dist/budgetGate.d.ts.map +1 -0
  3. package/dist/budgetGate.js +41 -0
  4. package/dist/budgetGate.js.map +1 -0
  5. package/dist/contextDocs.d.ts +54 -0
  6. package/dist/contextDocs.d.ts.map +1 -0
  7. package/dist/contextDocs.js +145 -0
  8. package/dist/contextDocs.js.map +1 -0
  9. package/dist/core/protocol.d.ts +32 -2
  10. package/dist/core/protocol.d.ts.map +1 -1
  11. package/dist/idb.d.ts +9 -0
  12. package/dist/idb.d.ts.map +1 -1
  13. package/dist/idb.js +15 -0
  14. package/dist/idb.js.map +1 -1
  15. package/dist/memory/local.d.ts.map +1 -1
  16. package/dist/memory/local.js.map +1 -1
  17. package/dist/prompts/history.d.ts.map +1 -1
  18. package/dist/prompts/history.js +11 -6
  19. package/dist/prompts/history.js.map +1 -1
  20. package/dist/runWatchdog.d.ts +20 -0
  21. package/dist/runWatchdog.d.ts.map +1 -0
  22. package/dist/runWatchdog.js +66 -0
  23. package/dist/runWatchdog.js.map +1 -0
  24. package/dist/runtime.d.ts +355 -0
  25. package/dist/runtime.d.ts.map +1 -0
  26. package/dist/runtime.js +711 -0
  27. package/dist/runtime.js.map +1 -0
  28. package/dist/runtime.testHost.d.ts +9 -0
  29. package/dist/runtime.testHost.d.ts.map +1 -0
  30. package/dist/runtime.testHost.js +53 -0
  31. package/dist/runtime.testHost.js.map +1 -0
  32. package/dist/storageQuota.d.ts +25 -0
  33. package/dist/storageQuota.d.ts.map +1 -0
  34. package/dist/storageQuota.js +89 -0
  35. package/dist/storageQuota.js.map +1 -0
  36. package/dist/storageRegistry.d.ts +53 -0
  37. package/dist/storageRegistry.d.ts.map +1 -0
  38. package/dist/storageRegistry.js +40 -0
  39. package/dist/storageRegistry.js.map +1 -0
  40. package/dist/workerClient.d.ts +43 -3
  41. package/dist/workerClient.d.ts.map +1 -1
  42. package/dist/workerClient.js +72 -5
  43. package/dist/workerClient.js.map +1 -1
  44. package/dist/workerHandler.d.ts +7 -0
  45. package/dist/workerHandler.d.ts.map +1 -1
  46. package/dist/workerHandler.js +46 -7
  47. package/dist/workerHandler.js.map +1 -1
  48. package/package.json +19 -29
@@ -0,0 +1,66 @@
1
+ export const WATCHDOG_SOFT_MS = 45000;
2
+ export const WATCHDOG_TOOL_HARD_MS = 10 * 60 * 1000;
3
+ export function createRunWatchdog(onTimeout, opts) {
4
+ const softMs = opts?.softMs ?? WATCHDOG_SOFT_MS;
5
+ const hardMs = opts?.hardMs ?? WATCHDOG_TOOL_HARD_MS;
6
+ const toolsInFlight = new Set();
7
+ let soft;
8
+ let hard;
9
+ let paused = false;
10
+ let done = false;
11
+ const fire = (reason) => {
12
+ if (done)
13
+ return;
14
+ done = true;
15
+ if (soft)
16
+ clearTimeout(soft);
17
+ if (hard)
18
+ clearTimeout(hard);
19
+ onTimeout(reason);
20
+ };
21
+ const bump = () => {
22
+ if (soft)
23
+ clearTimeout(soft);
24
+ if (done || paused)
25
+ return;
26
+ if (toolsInFlight.size > 0) {
27
+ // Soft timer stays down mid-tool; the hard cap (armed on tool-call) guards.
28
+ return;
29
+ }
30
+ soft = setTimeout(() => fire('silent'), softMs);
31
+ };
32
+ return {
33
+ onEvent(e) {
34
+ if (e.type === 'tool-call' && e.id != null) {
35
+ if (toolsInFlight.size === 0)
36
+ hard = setTimeout(() => fire('tool-hard-cap'), hardMs);
37
+ toolsInFlight.add(e.id);
38
+ }
39
+ else if (e.type === 'tool-result' && e.id != null) {
40
+ toolsInFlight.delete(e.id);
41
+ if (toolsInFlight.size === 0 && hard) {
42
+ clearTimeout(hard);
43
+ hard = undefined;
44
+ }
45
+ }
46
+ bump();
47
+ },
48
+ pause() {
49
+ paused = true;
50
+ if (soft)
51
+ clearTimeout(soft);
52
+ },
53
+ bump() {
54
+ paused = false;
55
+ bump();
56
+ },
57
+ clear() {
58
+ done = true;
59
+ if (soft)
60
+ clearTimeout(soft);
61
+ if (hard)
62
+ clearTimeout(hard);
63
+ },
64
+ };
65
+ }
66
+ //# sourceMappingURL=runWatchdog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runWatchdog.js","sourceRoot":"","sources":["../runWatchdog.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AACtC,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEpD,MAAM,UAAU,iBAAiB,CAC/B,SAAuD,EACvD,IAA2C;IAE3C,MAAM,MAAM,GAAG,IAAI,EAAE,MAAM,IAAI,gBAAgB,CAAC;IAChD,MAAM,MAAM,GAAG,IAAI,EAAE,MAAM,IAAI,qBAAqB,CAAC;IACrD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAU,CAAC;IACxC,IAAI,IAA+C,CAAC;IACpD,IAAI,IAA+C,CAAC;IACpD,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,IAAI,GAAG,KAAK,CAAC;IAEjB,MAAM,IAAI,GAAG,CAAC,MAAkC,EAAE,EAAE;QAClD,IAAI,IAAI;YAAE,OAAO;QACjB,IAAI,GAAG,IAAI,CAAC;QACZ,IAAI,IAAI;YAAE,YAAY,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,IAAI;YAAE,YAAY,CAAC,IAAI,CAAC,CAAC;QAC7B,SAAS,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,MAAM,IAAI,GAAG,GAAG,EAAE;QAChB,IAAI,IAAI;YAAE,YAAY,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,IAAI,IAAI,MAAM;YAAE,OAAO;QAC3B,IAAI,aAAa,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAC3B,4EAA4E;YAC5E,OAAO;QACT,CAAC;QACD,IAA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 import { createWorkerAgent, type WorkerAgent } from './workerClient';
3
+ import type { ConversationTurn } from '@corenel/harness/conversation';
4
+ import type { AskQuestion, AskAnswers, SessionSurface, AgentSession, FileService, Usage } from '@corenel/protocol';
5
+ import { allTools } from '@corenel/harness/tools/builtins';
6
+ import type { AgentConstraints, AgentBreachAction, Breach } from '@corenel/harness/core/budget';
7
+ import type { CompressionMode } from '@corenel/harness/compression';
8
+ import type { GuardVerdict } from '@corenel/harness/guards';
9
+ import { type SystemParts } from '@corenel/harness/systemParts';
10
+ /** The worker deps bundle minus getFileService (the runtime supplies that). */
11
+ export type RuntimeWorkerDeps = Omit<Parameters<typeof createWorkerAgent>[0], 'getFileService'>;
12
+ /** What the engine needs of the host workspace. Generic W lets a host expose
13
+ * its richer workspace type through runtime.workspace() without the engine
14
+ * depending on it. */
15
+ export interface RuntimeWorkspace {
16
+ get(): FileService | null;
17
+ whenReady(): Promise<void>;
18
+ }
19
+ /** The session persistence port — structurally satisfied by the host's
20
+ * JsonlSessionStore instance. */
21
+ export interface SessionStorePort {
22
+ list(surface: SessionSurface): Promise<AgentSession[]>;
23
+ get(id: string): Promise<AgentSession | null>;
24
+ create(title: string, surface: SessionSurface): Promise<AgentSession>;
25
+ save(s: AgentSession): Promise<void>;
26
+ delete(id: string): Promise<void>;
27
+ }
28
+ export interface ModelInfo {
29
+ provider: string;
30
+ label: string;
31
+ inPrice: number;
32
+ outPrice: number;
33
+ contextWindow?: number;
34
+ }
35
+ /** Injectable capability registries. Defaults preserve today's globals.
36
+ * (MCP server management stays a host UI concern — its Clerk-authed service
37
+ * functions live host-side; Phase 3's AgentChat receives them via its own
38
+ * props. Deliberate narrowing of the spec's Capabilities sketch.) */
39
+ export interface RuntimeCapabilities {
40
+ /** The tool set this runtime advertises in its system prompt AND (when it
41
+ * differs from the builtin registry) restricts the worker run to. */
42
+ tools?: () => ReturnType<typeof allTools>;
43
+ /** Installed skills, for surfaces that list them (Phase 3 consumers; no engine default yet). */
44
+ skills?: () => Promise<import('@corenel/harness/skills').InstalledSkill[]>;
45
+ }
46
+ /** The AgentEvent union as the worker client emits it — derived from RunOpts. */
47
+ type RunOptsOf = NonNullable<Parameters<WorkerAgent['run']>[1]>;
48
+ export type RuntimeAgentEvent = Parameters<NonNullable<RunOptsOf['onEvent']>>[0];
49
+ type HealRecordOf = Extract<RuntimeAgentEvent, {
50
+ type: 'heal';
51
+ }>['record'];
52
+ /** The recorded-event union: real AgentEvents plus a replay-only `user` marker
53
+ * the runtime injects at each follow-up turn so multi-turn sessions replay the
54
+ * user's prompts as bubbles (the loop itself never emits `user`). Named
55
+ * distinctly from RuntimeAgentEvent because the brief's RuntimeHost.recorder
56
+ * sketch under-typed this field as RuntimeAgentEvent alone, which doesn't
57
+ * admit the synthetic `user` event the class actually pushes — mechanical fix,
58
+ * mirroring the pre-extraction module's AgentRecordedEvent. */
59
+ export type RuntimeRecordedEvent = RuntimeAgentEvent | {
60
+ type: 'user';
61
+ content: string;
62
+ images?: string[];
63
+ };
64
+ /** Breach policy bundle signatures — copied verbatim from src/prompd/agentBreach.ts. */
65
+ export interface BreachCtx {
66
+ currentModel: string;
67
+ ask: (msg: string) => Promise<boolean>;
68
+ warn: (msg: string) => void;
69
+ cheaperModel: (current: string) => string | null;
70
+ }
71
+ export type BreachDecide = (action: AgentBreachAction, breach: Breach, ctx: BreachCtx) => Promise<{
72
+ continue: boolean;
73
+ model?: string;
74
+ }>;
75
+ export type CheaperModelFactory = (recentUsage: () => {
76
+ promptTokens: number;
77
+ completionTokens: number;
78
+ cachedTokens?: number;
79
+ }) => (current: string) => string | null;
80
+ export type BreachDescribe = (b: Breach) => string;
81
+ export interface RuntimeHost {
82
+ workerDeps: RuntimeWorkerDeps;
83
+ workspace: () => RuntimeWorkspace;
84
+ /** Install the module-global active-files resolver the host's session/recall
85
+ * stores read (stateFs seam). The runtime calls this from ws() AND from every
86
+ * session-store entry point (the craft direct-load regression, commit 4559050). */
87
+ installFilesResolver: (fn: () => Promise<FileService | null>) => void;
88
+ sessions: SessionStorePort;
89
+ modelInfo: (id: string) => ModelInfo;
90
+ price: (usage: Usage, model: string) => number;
91
+ guard: (feature: string) => Promise<GuardVerdict>;
92
+ recordUsage: (u: {
93
+ surface: SessionSurface;
94
+ provider: string;
95
+ model: string;
96
+ modelLabel: string;
97
+ inEst: number | null;
98
+ inTok: number;
99
+ outTok: number;
100
+ cost: number;
101
+ }) => void;
102
+ constraints: (surface: string) => AgentConstraints;
103
+ compression: () => CompressionMode;
104
+ /** Composer mode id that new sessions start in (folder-driven id: 'auto',
105
+ * 'plan', or a custom mode). Omit -> 'auto'. Read once per session at mint time. */
106
+ defaultMode?: () => string;
107
+ /** Session replay recording sink (host recordings store). */
108
+ recorder?: {
109
+ newId(): string;
110
+ save(rec: {
111
+ kind: 'agent';
112
+ id: string;
113
+ title: string;
114
+ at: number;
115
+ ok: boolean;
116
+ prompt: string;
117
+ promptImages?: string[];
118
+ events: {
119
+ at: number;
120
+ ev: RuntimeRecordedEvent;
121
+ }[];
122
+ }): void;
123
+ };
124
+ suggestFollowups?: (a: {
125
+ messages: ChatCompletionMessageParam[];
126
+ model: string;
127
+ signal: AbortSignal;
128
+ }) => Promise<string[]>;
129
+ /** Live "Recovering…" note for a heal event's record (host healStore). */
130
+ healNote?: (record: HealRecordOf) => string | null;
131
+ /** Breach policy bundle — signatures copied verbatim from src/prompd/agentBreach.ts
132
+ * (decideBreach / cheaperModelFactory / describeBreach). */
133
+ breach?: {
134
+ decide: BreachDecide;
135
+ cheaperModel: CheaperModelFactory;
136
+ describe: BreachDescribe;
137
+ };
138
+ /** Extra system-context blocks (project instructions, memory, editor buffer …),
139
+ * resolved per send against the active FileService. Nulls are skipped. */
140
+ contextProviders?: Array<(files: FileService | null) => Promise<string | null>>;
141
+ /** Per-filetype system prompt path (systemForFile) — editor host only. */
142
+ systemPath?: (files: FileService | null) => string | undefined;
143
+ /** Extra template params for the composed system prompt (e.g. the editor host
144
+ * passes `{ fileName }` so per-filetype system templates can use `{{ fileName }}`). */
145
+ systemParams?: () => Record<string, unknown> | undefined;
146
+ capabilities?: RuntimeCapabilities;
147
+ /** Merged memory index (both scopes) — passed through to composeAgentSystem so
148
+ * every session sees what it can recall. */
149
+ memoryIndex?: () => Promise<string>;
150
+ }
151
+ type PolicyName = string;
152
+ /** Per-send options `send`/`retry` accept — all optional beyond the two the
153
+ * pre-extraction class always took, so /agent and /craft (which pass none of
154
+ * these) are unaffected. */
155
+ export interface SendOpts {
156
+ persona: string;
157
+ policyName: PolicyName;
158
+ /** Per-run constraints override. Callers pass `mergeOverride(savedDefault,
159
+ * emitted)`'s output (mergeOverride stays a UI-side concern, exported from
160
+ * this module) — the engine spreads it over the host's saved default:
161
+ * `{ ...host.constraints(surface), ...(opts.constraints ?? {}) }`. */
162
+ constraints?: AgentConstraints;
163
+ /** Workspace-relative path of the editor buffer the agent edits — forwarded
164
+ * verbatim to the worker so propose_edit can validate a proposal before
165
+ * surfacing the diff. */
166
+ editorFile?: string;
167
+ /** Await the user's verdict on a propose_edit. The engine adapts this to
168
+ * RunOpts' single-arg `onEditReview(callId)` form, closing over its own
169
+ * AbortController and pausing/bumping the run watchdog around the await
170
+ * (mirrors AgentPanel.tsx's awaitEditDecision wiring). */
171
+ onEditReview?: (callId: string, signal: AbortSignal) => ReturnType<NonNullable<RunOptsOf['onEditReview']>>;
172
+ /** Node-tagged events from the run's sub-agents (the DAG canvas stream) —
173
+ * forwarded verbatim. */
174
+ onNodeEvent?: RunOptsOf['onNodeEvent'];
175
+ /** Which composed parts of the system prompt to include for this run.
176
+ * Defaults to the persisted `getSystemParts()` when omitted. */
177
+ partsOverride?: SystemParts;
178
+ /** Every raw agent event, in emission order, for a host side-channel (the
179
+ * editor panel drives its todo list from tool-call events here — todos stay
180
+ * host-side, this is just the feed). */
181
+ onRunEvent?: (e: RuntimeAgentEvent) => void;
182
+ /** Where budget-breach notices (soft `warn` + `budget-stop`) land. Default
183
+ * `'transcript'` appends BOTH a transcript `note()` turn and a `policyNotes`
184
+ * entry — the /agent and /craft behavior from before this opt existed, kept
185
+ * byte-identical since neither surface renders policyNotes. `'notes'` skips
186
+ * the `note()` call and appends to policyNotes only — for a surface (the
187
+ * editor drawer) that renders the policyNotes banner itself, so a
188
+ * transcript turn would double the message. */
189
+ budgetNotices?: 'notes' | 'transcript';
190
+ }
191
+ export interface LiveTool {
192
+ id: string;
193
+ name: string;
194
+ args?: Record<string, unknown>;
195
+ result?: string;
196
+ isError?: boolean;
197
+ done?: boolean;
198
+ ms?: number;
199
+ }
200
+ export interface LiveState {
201
+ text: string;
202
+ tools: LiveTool[];
203
+ }
204
+ export interface PendingPerm {
205
+ tool: string;
206
+ summary: string;
207
+ resolve: (b: boolean) => void;
208
+ }
209
+ export interface PendingAsk {
210
+ questions: AskQuestion[];
211
+ resolve: (a: AskAnswers | null) => void;
212
+ }
213
+ export type SessionStatus = 'idle' | 'running' | 'waiting';
214
+ /** A runtime-agnostic composer mode id — the host UI owns the concrete union. */
215
+ export type RuntimeAgentMode = string;
216
+ /** The slice of a session the view renders. */
217
+ export interface SessionState {
218
+ turns: ConversationTurn[];
219
+ live: LiveState | null;
220
+ running: boolean;
221
+ error: string;
222
+ mode: RuntimeAgentMode;
223
+ input: string;
224
+ attachments: string[];
225
+ pendingPerm: PendingPerm | null;
226
+ pendingAsk: PendingAsk | null;
227
+ loaded: boolean;
228
+ /** Click-to-fill follow-up prompts for the latest assistant turn (empty while a
229
+ * run is in flight; populated best-effort after it completes). */
230
+ suggestions: string[];
231
+ /** Live self-heal status while a run recovers from a blip ("Recovering — retrying…"),
232
+ * or null. Cleared once output resumes or the turn ends. */
233
+ recovery: string | null;
234
+ /** Bumped once per `'offload'` event — the editor panel's context drawer uses
235
+ * this to know when to re-read the session's offloaded blobs. */
236
+ offloadTick: number;
237
+ /** Policy-notice banner entries (breach warn/stop + guard `policy-violation`
238
+ * events). Reset at the start of every run. The editor panel renders these
239
+ * (and passes `budgetNotices: 'notes'` so budget warn/stop skip the
240
+ * transcript turn); the standalone /agent page keeps rendering the same
241
+ * budget notices via `note()` (a transcript turn) instead, per
242
+ * SendOpts.budgetNotices. */
243
+ policyNotes: {
244
+ kind: string;
245
+ message: string;
246
+ action: string;
247
+ }[];
248
+ /** The model a `degrade` breach switched the run onto, or null. Reset at the
249
+ * start of every run. */
250
+ degradedModel: string | null;
251
+ /** Raw per-session event stream (this session's turns, one entry per event with
252
+ * wall-clock `at`), for the live scrubber. Accumulated in send(); reset on clear. */
253
+ recEvents: {
254
+ at: number;
255
+ ev: RuntimeRecordedEvent;
256
+ }[];
257
+ }
258
+ /** Merge a form's freshly-emitted envelope into a per-run override, against the
259
+ * currently saved default. The form only emits the keys it still wants set — a
260
+ * cleared field (e.g. "No limit") is simply ABSENT from `emitted`, not `undefined`.
261
+ * A plain `{...savedDefault, ...emitted}` merge at read time would then silently
262
+ * fall back to the saved default for that field, so "No limit" could never
263
+ * actually clear a saved cap. Fix: for every key present in `savedDefault` but
264
+ * absent from `emitted`, materialize an explicit `undefined` in the returned
265
+ * override so the read-time spread masks it (`{...{maxUsd:2}, ...{maxUsd:undefined}}`
266
+ * -> `maxUsd: undefined`, which all `!= null` consumers treat as no limit). Keys the
267
+ * form already sends as `undefined` (its own internal clears) pass through unchanged. */
268
+ export declare function mergeOverride(savedDefault: AgentConstraints, emitted: AgentConstraints): AgentConstraints;
269
+ export declare class AgentRuntime {
270
+ private readonly host;
271
+ private readonly surface;
272
+ private readonly systemExtra;
273
+ /** Resolves the model id for each run — the host factory always passes one
274
+ * (Corenel's agent model, or Craft's own surface getter). */
275
+ private readonly getModel;
276
+ /** `surface` namespaces this runtime's sessions in the store (so /agent and /craft
277
+ * never list each other's chats). `systemExtra` is prepended to every run's system
278
+ * context — Craft uses it to carry the document-creation directive. */
279
+ constructor(host: RuntimeHost, surface: SessionSurface | undefined, systemExtra: string | undefined,
280
+ /** Resolves the model id for each run — the host factory always passes one
281
+ * (Corenel's agent model, or Craft's own surface getter). */
282
+ getModel: () => string);
283
+ private map;
284
+ private subs;
285
+ private globalSubs;
286
+ private _ws;
287
+ private worker;
288
+ private ws;
289
+ private getWorker;
290
+ /** The active file workspace (the page shows its label as a context chip). */
291
+ fileService(): FileService | null;
292
+ workspace(): RuntimeWorkspace;
293
+ private ensure;
294
+ private notify;
295
+ private notifyGlobal;
296
+ /** Mutate a session and notify its view; `global` also pokes the running-badge subscribers. */
297
+ private patch;
298
+ subscribe(id: string, cb: () => void): () => void;
299
+ subscribeGlobal(cb: () => void): () => void;
300
+ getState(id: string): SessionState;
301
+ status(id: string): SessionStatus;
302
+ /** The session store reads through the module-global active-files resolver
303
+ * (stateFs), which only THIS runtime's ws() installs. Every session-store
304
+ * entry point must assert it first — a page that never touches
305
+ * workspace()/fileService() before its mount effect (CraftPage direct load)
306
+ * otherwise hits the default null resolver and the store throws
307
+ * "No file workspace is connected". */
308
+ /** Lazily load a session's turns from the store the first time it's focused. */
309
+ load(id: string): Promise<void>;
310
+ /** Reuse the most-recent empty session if there is one, else create a fresh one.
311
+ * Returns the id to focus on page open — keeps a single throwaway "New chat"
312
+ * around instead of breeding empties. Concurrent calls are deduped (React
313
+ * StrictMode double-invokes the mount effect) so the page never opens two. */
314
+ private initInFlight;
315
+ openInitial(): Promise<string>;
316
+ newSession(): Promise<string>;
317
+ deleteSession(id: string): Promise<void>;
318
+ setInput(id: string, v: string): void;
319
+ setMode(id: string, m: RuntimeAgentMode): void;
320
+ /** Clear the conversation (keep the session) — empties the visible transcript and
321
+ * starts a fresh recording stream for what follows. */
322
+ clear(id: string): void;
323
+ /** Append a local assistant-style notice turn (e.g. a /model confirmation) — not
324
+ * sent to the model, just shown in the transcript. */
325
+ note(id: string, text: string): void;
326
+ setAttachments(id: string, fn: (a: string[]) => string[]): void;
327
+ toggleInclude(id: string, turnId: string): void;
328
+ resolvePerm(id: string, allow: boolean, always?: boolean): void;
329
+ resolveAsk(id: string, answers: AskAnswers | null): void;
330
+ stop(id: string): void;
331
+ private persist;
332
+ private composeSystem;
333
+ /** Send a message and run the agent for `id`. Concurrent with other sessions:
334
+ * each run is its own AbortController + watchdog and streams into its own slice. */
335
+ send(id: string, text: string, images: string[], opts: SendOpts): Promise<void>;
336
+ /** A host-driven turn: appends the user message, then awaits a host-supplied
337
+ * `produce` (e.g. the /strategy command's own completion) instead of running
338
+ * the worker agent. Same running/live/error/abort shape as `send`, minus
339
+ * tool calls — used by surfaces that render a live "thinking" placeholder for
340
+ * work the engine itself doesn't perform. */
341
+ hostTurn(id: string, userText: string, produce: (signal: AbortSignal) => Promise<string>): Promise<void>;
342
+ /** Replace the offload stub for `blobId` inside turn `turnId` (session `id`)
343
+ * with the full content — the context drawer's per-item Restore, transplanted
344
+ * from the harness/conversation.ts singleton (same marker-matching and
345
+ * identity-swap semantics; see that module for the rationale). Returns false
346
+ * (state untouched, no persist) when the turn or the matching stub is absent. */
347
+ restoreToolResult(id: string, turnId: string, blobId: string, content: string): boolean;
348
+ /** Re-run a prior user turn: drop it and everything after, then resend it. */
349
+ retry(id: string, turnId: string, opts: SendOpts): Promise<void>;
350
+ /** Drop all in-memory state and abort every run — called on a scope change so
351
+ * one identity's sessions and runs never carry into another's. */
352
+ reset(): void;
353
+ }
354
+ export {};
355
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../runtime.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAA6B,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/G,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG3D,OAAO,KAAK,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