@kodax-ai/kodax 0.7.84 → 0.7.86

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 (93) hide show
  1. package/CHANGELOG.md +218 -5
  2. package/README.md +1888 -1850
  3. package/README_CN.md +1146 -1137
  4. package/dist/chunks/agent-IO6TXNCV.js +2 -0
  5. package/dist/chunks/argument-completer-JMICSGL6.js +2 -0
  6. package/dist/chunks/chunk-2RAXDUC7.js +379 -0
  7. package/dist/chunks/chunk-A5VQGXH2.js +2 -0
  8. package/dist/chunks/{chunk-OHZFGQEH.js → chunk-AAFFS6RU.js} +2 -2
  9. package/dist/chunks/chunk-B36G256E.js +679 -0
  10. package/dist/chunks/chunk-G5FGIRDJ.js +1278 -0
  11. package/dist/chunks/chunk-GVGLYVG4.js +5 -0
  12. package/dist/chunks/chunk-MFCPQZ7E.js +519 -0
  13. package/dist/chunks/chunk-Q6UAGROD.js +415 -0
  14. package/dist/chunks/chunk-R4EHASEN.js +319 -0
  15. package/dist/chunks/chunk-U6HNMLNN.js +410 -0
  16. package/dist/chunks/chunk-UH5WNJXF.js +92 -0
  17. package/dist/chunks/{chunk-WTYAZOWO.js → chunk-UKCDCVMD.js} +1 -1
  18. package/dist/chunks/chunk-XA4ENCAH.js +412 -0
  19. package/dist/chunks/{chunk-ZVPTDYDI.js → chunk-XUKLF26Q.js} +2 -2
  20. package/dist/chunks/compaction-config-5RMG22CY.js +2 -0
  21. package/dist/chunks/{construction-bootstrap-EVQ6VWSX.js → construction-bootstrap-4DGAYOWH.js} +1 -1
  22. package/dist/chunks/dist-DFW7MXT7.js +2 -0
  23. package/dist/chunks/host-6MMHYTI5.js +2 -0
  24. package/dist/chunks/run-manager-ISQSWCAM.js +2 -0
  25. package/dist/chunks/utils-LV7FHKYN.js +2 -0
  26. package/dist/index.d.ts +17 -15
  27. package/dist/index.js +2 -2
  28. package/dist/kodax_bootstrap.js +1 -1
  29. package/dist/kodax_cli.js +2074 -1615
  30. package/dist/kodax_resume.js +271 -90
  31. package/dist/runtime-worker.js +1812 -1359
  32. package/dist/sandbox-workspace-session.js +1069 -112
  33. package/dist/sdk-a2a.d.ts +11 -10
  34. package/dist/sdk-a2a.js +9 -8
  35. package/dist/sdk-agent.d.ts +39 -299
  36. package/dist/sdk-agent.js +1 -1
  37. package/dist/sdk-coding.d.ts +103 -16
  38. package/dist/sdk-coding.js +1 -1
  39. package/dist/sdk-experimental-memory.d.ts +7 -20
  40. package/dist/sdk-experimental-memory.js +1 -1
  41. package/dist/sdk-mcp.js +1 -1
  42. package/dist/sdk-media.js +1 -1
  43. package/dist/sdk-repl.d.ts +14 -15
  44. package/dist/sdk-repl.js +2 -2
  45. package/dist/sdk-runtime.d.ts +73 -24
  46. package/dist/sdk-runtime.js +1 -1
  47. package/dist/sdk-sandbox.d.ts +1 -1
  48. package/dist/sdk-sandbox.js +1 -1
  49. package/dist/sdk-session.d.ts +7 -6
  50. package/dist/sdk-session.js +1 -1
  51. package/dist/sdk-skills.d.ts +2 -2
  52. package/dist/sdk-skills.js +1 -1
  53. package/dist/semantic-worker.js +250 -64
  54. package/dist/types-chunks/{bash-prefix-extractor.d-CkdGL4rM.d.ts → bash-prefix-extractor.d-QqKtuLZm.d.ts} +137 -14
  55. package/dist/types-chunks/{capsule.d-7wQ_kM1C.d.ts → capsule.d-CN_iMqAS.d.ts} +2 -1
  56. package/dist/types-chunks/controller.d-A73Kf6tH.d.ts +105 -0
  57. package/dist/types-chunks/{controller.d-CesRxFL5.d.ts → controller.d-Dzxz22X-.d.ts} +26 -1020
  58. package/dist/types-chunks/{guardrail.d-KaIeVree.d.ts → guardrail.d-Y_AIh8-I.d.ts} +21 -21
  59. package/dist/types-chunks/{history-retrieval.d-CbCls7r0.d.ts → history-retrieval.d-Debbzn1z.d.ts} +1 -1
  60. package/dist/types-chunks/{public-api.d-DpRj8b7d.d.ts → public-api.d-Cg-4GTbK.d.ts} +3 -2
  61. package/dist/types-chunks/{repl.d-DWeC3PLW.d.ts → repl.d-Bhrbueab.d.ts} +5 -5
  62. package/dist/types-chunks/review-inbox.d-DuZqFX-z.d.ts +221 -0
  63. package/dist/types-chunks/{run-manager.d-BXBkLT0A.d.ts → run-manager.d-BS4lJfL3.d.ts} +1 -1
  64. package/dist/types-chunks/{sdk-session-DEtS6u20.d.ts → sdk-session-fQ_KENev.d.ts} +2 -2
  65. package/dist/types-chunks/{shell-command-sets.d-P2h4_KKL.d.ts → shell-command-sets.d-DRGjd_7Q.d.ts} +3 -2
  66. package/dist/types-chunks/{types-Bf3Y3mW-.d.ts → types-PHjfwebT.d.ts} +62 -190
  67. package/dist/types-chunks/{types.d-0m3PS7Ng.d.ts → types.d-BRrJU4pb.d.ts} +2 -2
  68. package/dist/types-chunks/{types.d-BbtGlKZu.d.ts → types.d-BSPlmJqf.d.ts} +25 -6
  69. package/dist/types-chunks/{types.d-CUtMr2IG.d.ts → types.d-Bo4fyMLu.d.ts} +1 -1
  70. package/dist/types-chunks/types.d-DlLBRqZ9.d.ts +1057 -0
  71. package/dist/types-chunks/{utils.d-C-eSIZ9n.d.ts → utils.d-BIhh_BqE.d.ts} +7 -4
  72. package/package.json +4 -2
  73. package/dist/chunks/agent-VMXNVYRK.js +0 -2
  74. package/dist/chunks/argument-completer-QCS6GUAE.js +0 -2
  75. package/dist/chunks/chunk-4ZI2CPUQ.js +0 -885
  76. package/dist/chunks/chunk-6UENDY33.js +0 -89
  77. package/dist/chunks/chunk-726WJGGY.js +0 -2
  78. package/dist/chunks/chunk-A7L7XTUH.js +0 -292
  79. package/dist/chunks/chunk-BBBS644N.js +0 -319
  80. package/dist/chunks/chunk-E7C4DRD2.js +0 -5
  81. package/dist/chunks/chunk-ET2BMEQQ.js +0 -655
  82. package/dist/chunks/chunk-EVXIJPZ6.js +0 -218
  83. package/dist/chunks/chunk-F44YYR6Z.js +0 -479
  84. package/dist/chunks/chunk-GRLC3N46.js +0 -385
  85. package/dist/chunks/chunk-KHEFUT6O.js +0 -5
  86. package/dist/chunks/chunk-TDJS5SFS.js +0 -348
  87. package/dist/chunks/chunk-WXHHZZRJ.js +0 -379
  88. package/dist/chunks/compaction-config-QTMFP7AF.js +0 -2
  89. package/dist/chunks/dist-XRH6CRLL.js +0 -2
  90. package/dist/chunks/host-F4TPD6WY.js +0 -2
  91. package/dist/chunks/run-manager-PYD46OGY.js +0 -2
  92. package/dist/chunks/utils-TOTTXU2I.js +0 -2
  93. package/docs/SDK_EMBEDDER_GUIDE.md +0 -5752
@@ -1,708 +1,5 @@
1
- import { k as KodaXMessage, a2 as KodaXToolDefinition, G as KodaXReasoningMode, aa as KodaXWireReasoningEffort, a4 as KodaXToolResultContentItem, Z as KodaXThinkingBlock, J as KodaXRedactedThinkingBlock } from './types.d-CgrXrFrq.js';
2
-
3
- type AgentActorState = 'running' | 'idle' | 'closed';
4
- type AgentTurnState = 'accepted' | 'running' | 'completed' | 'failed' | 'interrupted';
5
- type AgentExecutionKind = 'native' | 'constructed' | 'workflow' | 'external';
6
- type AgentForkTurns = 'all' | 'none' | number;
7
- type AgentDataClassification = 'public' | 'internal' | 'sensitive';
8
- type AgentProgressKind = 'status' | 'tool' | 'assistant';
9
- type AgentInterruptScope = 'turn' | 'subtree';
10
- type AgentMetadataValue = string | number | boolean | null | readonly AgentMetadataValue[] | {
11
- readonly [key: string]: AgentMetadataValue;
12
- };
13
- interface AgentCapabilities {
14
- readonly tools: readonly string[];
15
- readonly filesystem: 'none' | 'read' | 'write';
16
- readonly network: boolean;
17
- readonly providers: readonly string[];
18
- readonly canAskUser: boolean;
19
- /** Backend operation support. Omitted means the complete native contract. */
20
- readonly control?: {
21
- readonly followup: boolean;
22
- readonly interrupt: boolean;
23
- readonly streaming: boolean;
24
- readonly artifacts: boolean;
25
- };
26
- }
27
- interface AgentActor {
28
- readonly path: string;
29
- readonly taskName: string;
30
- readonly parentPath?: string;
31
- readonly kind: AgentExecutionKind;
32
- readonly state: AgentActorState;
33
- readonly capabilities: AgentCapabilities;
34
- readonly turnIds: readonly string[];
35
- readonly currentTurnId?: string;
36
- readonly mailboxCursor: number;
37
- readonly createdAt: string;
38
- readonly updatedAt: string;
39
- readonly revision: number;
40
- }
41
- /** Executor-neutral artifact metadata retained beside the legacy string reference. */
42
- interface AgentArtifactDescriptor {
43
- readonly name: string;
44
- readonly uri?: string;
45
- readonly mimeType?: string;
46
- readonly size?: number;
47
- readonly hash?: string;
48
- readonly provenance?: string;
49
- readonly producingAgentId?: string;
50
- readonly remoteTaskId?: string;
51
- }
52
- interface AgentTurn {
53
- readonly turnId: string;
54
- readonly actorPath: string;
55
- readonly sequence: number;
56
- readonly state: AgentTurnState;
57
- readonly objective: string;
58
- readonly forkTurns: AgentForkTurns;
59
- readonly metadata?: Readonly<Record<string, AgentMetadataValue>>;
60
- readonly createdAt: string;
61
- readonly startedAt?: string;
62
- readonly completedAt?: string;
63
- readonly output?: string;
64
- readonly artifacts?: readonly string[];
65
- readonly artifactDetails?: readonly AgentArtifactDescriptor[];
66
- readonly structured?: AgentMetadataValue;
67
- readonly error?: string;
68
- /** Bounded Runtime-owned activity projection; full transcripts remain executor-owned. */
69
- readonly progress?: readonly AgentProgressItem[];
70
- readonly revision: number;
71
- }
72
- interface AgentProgressUpdate {
73
- readonly kind: AgentProgressKind;
74
- readonly summary: string;
75
- }
76
- interface AgentProgressItem extends AgentProgressUpdate {
77
- readonly sequence: number;
78
- readonly createdAt: string;
79
- }
80
- interface AgentMailboxMessage {
81
- readonly messageId: string;
82
- readonly sequence: number;
83
- readonly senderPath: string;
84
- readonly recipientPath: string;
85
- readonly turnId?: string;
86
- readonly kind: 'message' | 'followup' | 'completion';
87
- readonly classification: AgentDataClassification;
88
- /** Canonical actors that handled this chain; absent only on pre-hardening schema-v1 snapshots. */
89
- readonly lineage?: readonly string[];
90
- readonly forwardedMessageId?: string;
91
- readonly content: string;
92
- readonly createdAt: string;
93
- }
94
- type AgentEventKind = 'actor_spawned' | 'turn_started' | 'message_delivered' | 'turn_progress' | 'turn_completed' | 'turn_failed' | 'turn_interrupted' | 'actor_closed';
95
- interface AgentEvent {
96
- readonly sequence: number;
97
- readonly kind: AgentEventKind;
98
- readonly actorPath: string;
99
- readonly turnId?: string;
100
- readonly parentPath?: string;
101
- readonly progress?: AgentProgressItem;
102
- readonly createdAt: string;
103
- }
104
- interface AgentSpawnInput {
105
- readonly taskName: string;
106
- readonly objective: string;
107
- readonly kind?: AgentExecutionKind;
108
- readonly forkTurns?: AgentForkTurns;
109
- readonly capabilities?: Partial<AgentCapabilities>;
110
- readonly metadata?: Readonly<Record<string, AgentMetadataValue>>;
111
- }
112
- interface AgentTurnRef {
113
- readonly actorPath: string;
114
- readonly turnId: string;
115
- readonly state: 'accepted' | 'running';
116
- }
117
- interface AgentFollowupResult {
118
- readonly delivery: 'started_turn' | 'current_turn';
119
- readonly turn: AgentTurnRef;
120
- }
121
- interface AgentTreeSnapshot {
122
- readonly rootPath: '/root';
123
- readonly actors: readonly AgentListEntry[];
124
- readonly activeNonRootTurns: number;
125
- readonly maxConcurrentThreads: number;
126
- readonly revision: number;
127
- /** Turn-admission state revision; absent only on older/custom clients. */
128
- readonly admissionRevision?: number;
129
- }
130
- interface AgentTurnSummary {
131
- readonly turnId: string;
132
- readonly state: AgentTurnState;
133
- readonly summary: string;
134
- readonly summaryTruncated: boolean;
135
- readonly recentActivity: readonly AgentProgressItem[];
136
- }
137
- interface AgentListEntry extends AgentActor {
138
- readonly latestTurn?: AgentTurnSummary;
139
- }
140
- interface AgentDetail {
141
- readonly actor: AgentActor;
142
- readonly turns: readonly AgentTurn[];
143
- readonly mailbox: readonly AgentMailboxMessage[];
144
- }
145
- interface AgentOutput {
146
- readonly actorPath: string;
147
- readonly turnId: string;
148
- readonly state: AgentTurnState;
149
- readonly output?: string;
150
- readonly outputTruncated?: boolean;
151
- readonly artifacts: readonly string[];
152
- readonly artifactDetails?: readonly AgentArtifactDescriptor[];
153
- readonly progress: readonly AgentProgressItem[];
154
- readonly structured?: AgentMetadataValue;
155
- readonly error?: string;
156
- }
157
- interface AgentLimitReached {
158
- readonly code: 'agent_limit_reached';
159
- readonly maxConcurrentThreads: number;
160
- readonly activeNonRootTurns: number;
161
- readonly availableNonRootSlots: 0;
162
- readonly retryable: true;
163
- }
164
- interface AgentBudgetExhausted {
165
- readonly code: 'agent_budget_exhausted';
166
- readonly retryable: false;
167
- readonly reason: string;
168
- }
169
- interface AgentBudgetAdmissionInput {
170
- readonly actorPath: string;
171
- readonly parentPath: string;
172
- readonly turnId: string;
173
- readonly kind: AgentExecutionKind;
174
- readonly units: 1;
175
- }
176
- type AgentBudgetAdmission = {
177
- readonly admitted: true;
178
- } | {
179
- readonly admitted: false;
180
- readonly fact: AgentBudgetExhausted;
181
- };
182
- interface AgentBudgetPort {
183
- admit(input: AgentBudgetAdmissionInput): Promise<AgentBudgetAdmission>;
184
- refund?(turnId: string): Promise<void>;
185
- snapshot?(): unknown;
186
- }
187
- interface AgentExecutionInput {
188
- readonly actor: AgentActor;
189
- readonly turn: AgentTurn;
190
- readonly priorTurns: readonly AgentTurn[];
191
- readonly signal: AbortSignal;
192
- drainMailbox(): Promise<readonly AgentMailboxMessage[]>;
193
- reportProgress(update: AgentProgressUpdate): Promise<void>;
194
- }
195
- interface AgentExecutionResult {
196
- readonly output: string;
197
- readonly artifacts?: readonly string[];
198
- readonly artifactDetails?: readonly AgentArtifactDescriptor[];
199
- readonly structured?: AgentMetadataValue;
200
- /** Runtime-observed completion facts merged into the durable Turn metadata. */
201
- readonly turnMetadata?: Readonly<Record<string, AgentMetadataValue>>;
202
- }
203
- interface AgentMutationOptions {
204
- /** Optimistic Actor revision checked inside the serialized durable mutation. */
205
- readonly expectedRevision?: number;
206
- /** Optimistic tree revision checked inside the serialized durable mutation. */
207
- readonly expectedTreeRevision?: number;
208
- /** Optimistic turn-admission revision, excluding progress and mailbox writes. */
209
- readonly expectedAdmissionRevision?: number;
210
- }
211
- interface AgentTurnExecutor {
212
- execute(input: AgentExecutionInput): Promise<AgentExecutionResult>;
213
- }
214
- interface AgentActorSnapshotContents {
215
- readonly revision: number;
216
- /** Added after schema v2; legacy snapshots derive it from revision on load. */
217
- readonly admissionRevision?: number;
218
- readonly maxConcurrentThreads: number;
219
- readonly actors: readonly AgentActor[];
220
- readonly turns: readonly AgentTurn[];
221
- readonly mailboxes: Readonly<Record<string, readonly AgentMailboxMessage[]>>;
222
- /** Terminal child turns explicitly observed by their direct parent. */
223
- readonly acknowledgedCompletionTurnIds?: readonly string[];
224
- /** Root completion notifications that must survive process-local queue loss. */
225
- readonly pendingRootCompletionTurnIds?: readonly string[];
226
- readonly events: readonly AgentEvent[];
227
- }
228
- /** Runtime process/controller identity that exclusively owns one durable Actor tree. */
229
- interface AgentActorOwner {
230
- readonly ownerId: string;
231
- readonly runtimeId: string;
232
- readonly pid: number;
233
- readonly startedAt: string;
234
- /** Opaque host identity for proving that this exact Runtime, not only its PID, remains alive. */
235
- readonly livenessId?: string;
236
- /** Loopback challenge endpoint paired with livenessId. */
237
- readonly livenessPort?: number;
238
- }
239
- interface AgentActorSnapshotV1 extends AgentActorSnapshotContents {
240
- readonly schemaVersion: 1;
241
- }
242
- interface AgentActorSnapshotV2 extends AgentActorSnapshotContents {
243
- readonly schemaVersion: 2;
244
- readonly owner?: AgentActorOwner;
245
- }
246
- type AgentActorSnapshot = AgentActorSnapshotV1 | AgentActorSnapshotV2;
247
- interface AgentActorStore {
248
- load(): Promise<AgentActorSnapshot | undefined>;
249
- /** CAS save. Implementations must throw actor_snapshot_conflict on a revision mismatch. */
250
- save(snapshot: AgentActorSnapshot, expectedRevision: number): Promise<void>;
251
- }
252
- /** Runtime-bound actor control surface. The caller path is minted by Runtime. */
253
- interface AgentActorClient {
254
- readonly callerPath: string;
255
- /** Stable in-process identity shared by clients bound to the same Actor tree. */
256
- readonly admissionScope?: object;
257
- spawn(input: AgentSpawnInput, options?: AgentMutationOptions): Promise<AgentTurnRef>;
258
- send(targetPath: string, content: string, classification?: AgentDataClassification, forwardedMessageId?: string): Promise<AgentMailboxMessage>;
259
- followup(targetPath: string, objective: string, metadata?: Readonly<Record<string, AgentMetadataValue>>, options?: AgentMutationOptions): Promise<AgentFollowupResult>;
260
- interrupt(targetPath: string, reason?: string, scope?: AgentInterruptScope): Promise<void>;
261
- acknowledgeCompletions(turnIds: readonly string[]): Promise<number>;
262
- list(): AgentTreeSnapshot;
263
- get(targetPath: string): AgentDetail;
264
- output(targetPath: string, turnId?: string): AgentOutput;
265
- eventSnapshot(afterSequence?: number): readonly AgentEvent[];
266
- wait(afterSequence?: number, timeoutMs?: number, signal?: AbortSignal): Promise<AgentEvent | undefined>;
267
- }
268
-
269
- /**
270
- * @kodax-ai/agent Types
271
- *
272
- * 通用 Agent 类型定义
273
- */
274
-
275
- type KodaXJsonPrimitive = string | number | boolean | null;
276
- type KodaXJsonValue = KodaXJsonPrimitive | KodaXJsonValue[] | {
277
- [key: string]: KodaXJsonValue;
278
- };
279
- /**
280
- * Session error metadata - 会话错误元数据
281
- * Used for error recovery and session cleanup - 用于错误恢复和会话清理
282
- */
283
- interface SessionErrorMetadata {
284
- /** Last error message - 最后的错误消息 */
285
- lastError?: string;
286
- /** Last error timestamp - 最后错误时间戳 */
287
- lastErrorTime?: number;
288
- /** Consecutive error count - 连续错误计数 */
289
- consecutiveErrors: number;
290
- }
291
- interface KodaXExtensionSessionRecord {
292
- id: string;
293
- extensionId: string;
294
- type: string;
295
- ts: number;
296
- data?: KodaXJsonValue;
297
- dedupeKey?: string;
298
- }
299
- type KodaXExtensionSessionState = Record<string, Record<string, KodaXJsonValue>>;
300
- interface KodaXSessionEntryBase {
301
- id: string;
302
- parentId: string | null;
303
- timestamp: string;
304
- /**
305
- * Stable logical identity for this transcript item. Cloned/forked entries get
306
- * a fresh physical `id` but keep their source entry's `logicalId`, allowing
307
- * SDK hosts to group or fold cloned history without comparing content.
308
- */
309
- logicalId?: string;
310
- /** Root physical entry id this item was cloned from, when it is a clone. */
311
- sourceEntryId?: string;
312
- }
313
- interface KodaXSessionMessageEntry extends KodaXSessionEntryBase {
314
- type: 'message';
315
- message: KodaXMessage;
316
- }
317
- interface KodaXSessionCompactionEntry extends KodaXSessionEntryBase {
318
- type: 'compaction';
319
- summary: string;
320
- firstKeptEntryId?: string;
321
- tokensBefore?: number;
322
- tokensAfter?: number;
323
- artifactLedgerId?: string;
324
- reason?: string;
325
- details?: KodaXJsonValue;
326
- memorySeed?: KodaXCompactMemorySeed;
327
- /**
328
- * FEATURE_072: post-compact ledger summary + file-content messages that
329
- * are inlined after the compaction summary at slicer time
330
- * (`getSessionMessagesFromLineage`). Stored here so they leave the active
331
- * path automatically when a new compaction entry is appended.
332
- *
333
- * NOTE: attachments are emitted by the slicer, NOT by `getContextMessagesForEntry`
334
- * — preserving the latter's 1-to-1 contract that `entryMatchesContextMessage`
335
- * and FEATURE_073's future slicing both depend on.
336
- */
337
- postCompactAttachments?: readonly KodaXMessage[];
338
- }
339
- interface KodaXSessionBranchSummaryEntry extends KodaXSessionEntryBase {
340
- type: 'branch_summary';
341
- summary: string;
342
- fromId?: string;
343
- details?: KodaXJsonValue;
344
- }
345
- interface KodaXSessionLabelEntry extends KodaXSessionEntryBase {
346
- type: 'label';
347
- targetId: string;
348
- label?: string;
349
- }
350
- interface KodaXSessionArchiveMarkerEntry extends KodaXSessionEntryBase {
351
- type: 'archive_marker';
352
- /** Links to the corresponding batch in the .archive.jsonl sidecar file */
353
- archiveBatchId: string;
354
- /** Number of entries that were archived in this batch */
355
- archivedEntryCount: number;
356
- /** Brief summary of the archived content */
357
- summary: string;
358
- }
359
- interface KodaXSessionRewindMarkerEntry extends KodaXSessionEntryBase {
360
- type: 'rewind_marker';
361
- targetId: string;
362
- fromId?: string;
363
- truncatedCount: number;
364
- summary: string;
365
- }
366
- interface KodaXSessionClientNoticeEntry extends KodaXSessionEntryBase {
367
- type: 'client_notice';
368
- source: string;
369
- content: string;
370
- turnId?: string;
371
- payload?: KodaXJsonValue;
372
- }
373
- interface KodaXMemoryOutcomeDigest {
374
- readonly id: string;
375
- readonly reviewKey: string;
376
- /** Stable root-episode identity; absent on pre-F263 digests. */
377
- readonly episodeId?: string;
378
- readonly sessionId: string;
379
- readonly branchId: string;
380
- readonly sequence: number;
381
- readonly objective: string;
382
- readonly actionSignature?: string;
383
- readonly approach: string;
384
- /**
385
- * `cancelled` is reserved for a host-bound explicit Memory intent. Ordinary
386
- * cancelled episodes do not produce an outcome digest.
387
- */
388
- readonly outcome: 'succeeded' | 'failed' | 'cancelled';
389
- readonly summary: string;
390
- readonly preconditions?: string;
391
- readonly lesson?: string;
392
- readonly evidenceRefs: readonly string[];
393
- readonly evidence?: readonly KodaXMemoryOutcomeEvidence[];
394
- /**
395
- * Explicit durable intent captured from the Action LLM and bound by the
396
- * host to an exact quote in the current user turn. It is evidence for the
397
- * governed reviewer, never proof that Memory was queued or applied.
398
- */
399
- readonly memoryIntent?: KodaXMemoryIntent;
400
- readonly memoryInfluence?: readonly KodaXMemoryInfluenceRef[];
401
- readonly visibility: 'prompt_safe' | 'private' | 'sensitive';
402
- readonly createdAt: string;
403
- }
404
- interface KodaXMemoryIntent {
405
- readonly operation: 'remember' | 'correct';
406
- readonly evidenceRef: string;
407
- /** Sanitized model-derived claim proposed for governed review. */
408
- readonly candidateStatement: string;
409
- /** Sanitized representation of the exact current-user quote verified by the host. */
410
- readonly userQuote: string;
411
- }
412
- interface KodaXMemoryOutcomeEvidence {
413
- readonly ref: string;
414
- readonly grade: 'authoritative' | 'verified' | 'corroborated' | 'observed' | 'inferred';
415
- readonly source: 'user' | 'host' | 'tool' | 'environment' | 'agent';
416
- readonly verdict?: 'passed' | 'failed' | 'inconclusive';
417
- readonly observedAt: string;
418
- }
419
- interface KodaXMemoryInfluenceRef {
420
- readonly decisionReceiptRef: string;
421
- readonly grade: 'direct' | 'supporting' | 'exposed' | 'unknown';
422
- }
423
- interface KodaXSessionMemoryOutcomeDigestEntry extends KodaXSessionEntryBase {
424
- readonly type: 'memory_outcome_digest';
425
- readonly digest: KodaXMemoryOutcomeDigest;
426
- /** Durable F263 review job identity. Absent on pre-F263 lineage records. */
427
- readonly jobId?: string;
428
- }
429
- interface KodaXSessionMemoryReviewReceiptEntry extends KodaXSessionEntryBase {
430
- readonly type: 'memory_review_receipt';
431
- /** Distinguishes repeated review keys across branch epochs. */
432
- readonly jobId?: string;
433
- readonly reviewKey: string;
434
- readonly proposalIds: readonly string[];
435
- readonly status: 'completed' | 'no_action';
436
- readonly completedAt: string;
437
- }
438
- type KodaXGoalStatus = 'active' | 'paused' | 'budget_limited' | 'blocked' | 'complete';
439
- /**
440
- * Persistent user-set goal state. v0.7.44 FEATURE_192 — backs the
441
- * `/goal` slash command and the get_goal / create_goal / update_goal
442
- * tools.
443
- *
444
- * Persistence model: each lifecycle event (create / update / pause /
445
- * resume / clear / budget_limited / blocked / complete) appends a
446
- * `KodaXSessionGoalEntry` carrying a frozen `KodaXGoalState` snapshot
447
- * to the session lineage. `readLatestGoalFromBranch` walks the active
448
- * branch's message-entry IDs and returns the latest goal entry whose
449
- * parentId belongs to that branch — so forks and rewinds naturally
450
- * drop goals attached to abandoned message paths.
451
- */
452
- interface KodaXGoalState {
453
- readonly version: 1;
454
- /** `${createdAt}-${rand}` — stable across updates of the same goal. */
455
- readonly id: string;
456
- readonly objective: string;
457
- readonly status: KodaXGoalStatus;
458
- /** Optional explicit token budget; null when the user did not set one. */
459
- readonly tokenBudget: number | null;
460
- readonly tokensUsed: number;
461
- readonly timeUsedSeconds: number;
462
- /** Consecutive turns the model has reported the same blocker. */
463
- readonly blockerTurnCount: number;
464
- /** The blocker_kind string the model last reported, or null. */
465
- readonly lastBlockerKind: string | null;
466
- readonly createdAt: number;
467
- readonly updatedAt: number;
468
- }
469
- type KodaXGoalEventType = 'created' | 'updated' | 'paused' | 'resumed' | 'cleared' | 'budget_limited' | 'blocked' | 'complete';
470
- interface KodaXSessionGoalEntry extends KodaXSessionEntryBase {
471
- type: 'goal';
472
- /** Snapshot at time of event; `null` only when `event === 'cleared'`. */
473
- goal: KodaXGoalState | null;
474
- event: KodaXGoalEventType;
475
- }
476
- type KodaXSessionEntry = KodaXSessionMessageEntry | KodaXSessionCompactionEntry | KodaXSessionBranchSummaryEntry | KodaXSessionLabelEntry | KodaXSessionArchiveMarkerEntry | KodaXSessionRewindMarkerEntry | KodaXSessionClientNoticeEntry | KodaXSessionMemoryOutcomeDigestEntry | KodaXSessionMemoryReviewReceiptEntry | KodaXSessionGoalEntry;
477
- interface KodaXSessionArtifactLedgerEntry {
478
- id: string;
479
- kind: 'file_read' | 'file_modified' | 'file_created' | 'file_deleted' | 'path_scope' | 'search_scope' | 'command_scope' | 'check_result' | 'decision' | 'image_input' | 'tombstone';
480
- sourceTool?: string;
481
- action?: string;
482
- target: string;
483
- displayTarget?: string;
484
- summary?: string;
485
- sessionEntryId?: string;
486
- timestamp: string;
487
- metadata?: Record<string, KodaXJsonValue>;
488
- }
489
- interface KodaXCompactMemoryProgress {
490
- completed: string[];
491
- inProgress: string[];
492
- blockers: string[];
493
- }
494
- interface KodaXCompactMemorySeed {
495
- objective?: string;
496
- constraints: string[];
497
- progress: KodaXCompactMemoryProgress;
498
- keyDecisions: string[];
499
- nextSteps: string[];
500
- keyContext: string[];
501
- importantTargets: string[];
502
- tombstones: string[];
503
- }
504
- interface KodaXSessionLineage {
505
- version: 2;
506
- activeEntryId: string | null;
507
- entries: KodaXSessionEntry[];
508
- }
509
- interface KodaXSessionNavigationOptions {
510
- summarizeCurrentBranch?: boolean;
511
- }
512
- interface KodaXSessionTreeNode {
513
- entry: Exclude<KodaXSessionEntry, KodaXSessionLabelEntry | KodaXSessionGoalEntry | KodaXSessionClientNoticeEntry | KodaXSessionRewindMarkerEntry | KodaXSessionMemoryOutcomeDigestEntry | KodaXSessionMemoryReviewReceiptEntry>;
514
- children: KodaXSessionTreeNode[];
515
- label?: string;
516
- active: boolean;
517
- }
518
- type KodaXSessionScope = 'user' | 'managed-task-worker';
519
- type KodaXSessionUiTextHistoryItemType = 'user' | 'assistant' | 'system' | 'thinking' | 'error' | 'event' | 'info' | 'hint' | 'sidecar';
520
- type KodaXSessionUiHistoryItemType = KodaXSessionUiTextHistoryItemType | 'tool_group';
521
- interface KodaXSessionUiTextHistoryItem {
522
- type: KodaXSessionUiTextHistoryItemType;
523
- text: string;
524
- /** Original UI event time in epoch milliseconds. Absent on older sessions. */
525
- timestamp?: number;
526
- icon?: string;
527
- compactText?: string;
528
- }
529
- type KodaXSessionUiToolCallStatus = 'success' | 'error' | 'cancelled' | 'awaiting_approval';
530
- interface KodaXSessionUiToolCall {
531
- id: string;
532
- name: string;
533
- status: KodaXSessionUiToolCallStatus;
534
- input?: {
535
- [key: string]: KodaXJsonValue;
536
- };
537
- preview?: string;
538
- output?: string;
539
- error?: string;
540
- startTime?: number;
541
- endTime?: number;
542
- }
543
- interface KodaXSessionUiToolGroupHistoryItem {
544
- type: 'tool_group';
545
- /** Original UI event time in epoch milliseconds. Absent on older sessions. */
546
- timestamp?: number;
547
- tools: KodaXSessionUiToolCall[];
548
- }
549
- type KodaXSessionUiHistoryItem = KodaXSessionUiTextHistoryItem | KodaXSessionUiToolGroupHistoryItem;
550
- type KodaXSessionWorkspaceKind = 'detected' | 'managed';
551
- interface KodaXSessionRuntimeInfo {
552
- canonicalRepoRoot?: string;
553
- workspaceRoot?: string;
554
- executionCwd?: string;
555
- branch?: string;
556
- workspaceKind?: KodaXSessionWorkspaceKind;
557
- /** SDK consumer surface/profile label, e.g. `'code'` | `'partner'`. */
558
- surface?: string;
559
- /** SDK consumer profile id (stable name or UUID). */
560
- profileId?: string;
561
- /** SDK consumer profile version. */
562
- profileVersion?: string;
563
- /** LLM provider alias active at session start, e.g. `'anthropic'`. */
564
- provider?: string;
565
- /** Model identifier active at session start. */
566
- model?: string;
567
- /** Reasoning mode active at session start. */
568
- reasoningMode?: string;
569
- /** Permission mode active at session start, e.g. `'auto'` | `'plan'`. */
570
- permissionMode?: string;
571
- /** Agent mode active at session start, e.g. `'sa'` | `'ama'`. */
572
- agentMode?: string;
573
- }
574
- interface KodaXSessionData {
575
- messages: KodaXMessage[];
576
- title: string;
577
- gitRoot: string;
578
- /** Consumer-owned private string persisted with the session. */
579
- tag?: string;
580
- runtimeInfo?: KodaXSessionRuntimeInfo;
581
- scope?: KodaXSessionScope;
582
- uiHistory?: KodaXSessionUiHistoryItem[];
583
- errorMetadata?: SessionErrorMetadata;
584
- extensionState?: KodaXExtensionSessionState;
585
- extensionRecords?: KodaXExtensionSessionRecord[];
586
- lineage?: KodaXSessionLineage;
587
- artifactLedger?: KodaXSessionArtifactLedgerEntry[];
588
- /** Runtime-owned F270 Actor tree snapshot; persisted with the session owner. */
589
- actorSnapshot?: AgentActorSnapshot;
590
- }
591
- interface KodaXSessionMeta {
592
- _type: 'meta';
593
- title: string;
594
- id: string;
595
- gitRoot: string;
596
- /** Consumer-owned private string persisted with the session. */
597
- tag?: string;
598
- runtimeInfo?: KodaXSessionRuntimeInfo;
599
- createdAt: string;
600
- scope?: KodaXSessionScope;
601
- uiHistory?: KodaXSessionUiHistoryItem[];
602
- extensionState?: KodaXExtensionSessionState;
603
- extensionRecordCount?: number;
604
- artifactLedgerCount?: number;
605
- /** Runtime-owned F270 Actor tree snapshot; absent on pre-v0.7.72 sessions. */
606
- actorSnapshot?: AgentActorSnapshot;
607
- lineageVersion?: 2;
608
- activeEntryId?: string | null;
609
- lineageEntryCount?: number;
610
- activeMessageCount?: number;
611
- /** Error metadata for recovery - 错误元数据用于恢复 */
612
- errorMetadata?: SessionErrorMetadata;
613
- }
614
- /**
615
- * Extension-scoped persistence entry.
616
- *
617
- * Each entry belongs to a namespace (extensionId) and carries
618
- * a string key, a JSON-safe value, and an opaque version tag
619
- * used for optimistic concurrency control.
620
- */
621
- interface KodaXExtensionStoreEntry {
622
- key: string;
623
- value: KodaXJsonValue;
624
- version: string;
625
- updatedAt: number;
626
- }
627
- /**
628
- * Extension persistence store interface (FEATURE_034 manual persistence).
629
- *
630
- * Implementations provide a durable key-value store scoped to a single
631
- * extension identity. The store is independent of session lifecycle —
632
- * data survives across sessions and restarts.
633
- */
634
- interface KodaXExtensionStore {
635
- /**
636
- * Read a single key.
637
- * Returns `undefined` when the key does not exist.
638
- */
639
- get(key: string): Promise<KodaXExtensionStoreEntry | undefined>;
640
- /**
641
- * Write a key-value pair.
642
- *
643
- * When `expectedVersion` is provided the write only succeeds when the
644
- * stored entry's version still matches (optimistic concurrency).
645
- * Returns the new entry on success, or `false` on version mismatch.
646
- */
647
- put(key: string, value: KodaXJsonValue, options?: {
648
- expectedVersion?: string;
649
- }): Promise<KodaXExtensionStoreEntry | false>;
650
- /**
651
- * Remove a key.
652
- * Returns `true` when the key existed and was removed.
653
- */
654
- delete(key: string): Promise<boolean>;
655
- /**
656
- * List all keys (optionally filtered by prefix).
657
- */
658
- list(options?: {
659
- prefix?: string;
660
- }): Promise<string[]>;
661
- /**
662
- * Clear all keys (optionally filtered by prefix).
663
- * Returns the number of entries removed.
664
- */
665
- clear(options?: {
666
- prefix?: string;
667
- }): Promise<number>;
668
- }
669
- interface KodaXSessionStorage {
670
- save(id: string, data: KodaXSessionData): Promise<void>;
671
- load(id: string): Promise<KodaXSessionData | null>;
672
- /**
673
- * Atomically mutates context-silent lineage state against the latest
674
- * persisted session. Hosts that own session persistence may expose this
675
- * without allowing the runner to write a stale full snapshot. Returns
676
- * true when the session existed and the callback was evaluated, including
677
- * an idempotent no-op; false only when the session was not found.
678
- */
679
- mutateLineage?(id: string, mutation: (lineage: KodaXSessionLineage) => KodaXSessionLineage): Promise<boolean>;
680
- getLineage?(id: string): Promise<KodaXSessionLineage | null>;
681
- /** Exact lineage merged from the active session file and island sidecars. */
682
- loadFullLineage?(id: string): Promise<KodaXSessionLineage | null>;
683
- setActiveEntry?(id: string, selector: string, options?: KodaXSessionNavigationOptions): Promise<KodaXSessionData | null>;
684
- setLabel?(id: string, selector: string, label?: string): Promise<KodaXSessionData | null>;
685
- rewind?(id: string, selector?: string): Promise<KodaXSessionData | null>;
686
- fork?(id: string, selector?: string, options?: {
687
- sessionId?: string;
688
- title?: string;
689
- }): Promise<{
690
- sessionId: string;
691
- data: KodaXSessionData;
692
- } | null>;
693
- list?(gitRoot?: string, options?: {
694
- limit?: number;
695
- includeArchived?: boolean;
696
- }): Promise<Array<{
697
- id: string;
698
- title: string;
699
- msgCount: number;
700
- tag?: string;
701
- runtimeInfo?: KodaXSessionRuntimeInfo;
702
- }>>;
703
- delete?(id: string): Promise<void>;
704
- deleteAll?(gitRoot?: string): Promise<void>;
705
- }
1
+ import { a2 as KodaXToolDefinition, k as KodaXMessage, G as KodaXReasoningMode, aa as KodaXWireReasoningEffort, a4 as KodaXToolResultContentItem, Z as KodaXThinkingBlock, J as KodaXRedactedThinkingBlock } from './types.d-CgrXrFrq.js';
2
+ import { b1 as MemoryReviewModelInput, $ as KodaXMemoryOutcomeDigest, b4 as MemoryReviewPlan, P as KodaXCompactMemorySeed, a2 as KodaXSessionArtifactLedgerEntry, m as AgentCapabilities, K as AgentTurnExecutor, s as AgentExecutionKind, l as AgentBudgetPort, g as AgentActorStore, b as AgentActorOwner, p as AgentEvent, z as AgentMailboxMessage, a as AgentActorClient, t as AgentExecutionResult, H as AgentSpawnInput, C as AgentMutationOptions, L as AgentTurnRef, n as AgentDataClassification, B as AgentMetadataValue, u as AgentFollowupResult, w as AgentInterruptScope, I as AgentTreeSnapshot, o as AgentDetail, D as AgentOutput } from './types.d-DlLBRqZ9.js';
706
3
 
707
4
  /**
708
5
  * Layer A Primitive: Agent / Handoff / Guardrail / AgentReasoningProfile
@@ -1902,6 +1199,8 @@ interface RunnerToolObserver {
1902
1199
  readonly beforeTool?: (call: RunnerToolCall) => Promise<boolean | string | undefined>;
1903
1200
  readonly onToolCall?: (call: RunnerToolCall) => void;
1904
1201
  readonly onToolResult?: (call: RunnerToolCall, result: RunnerToolResult) => void;
1202
+ readonly onToolExecutionStart?: (call: RunnerToolCall) => void;
1203
+ readonly onToolExecutionEnd?: (call: RunnerToolCall) => void;
1905
1204
  }
1906
1205
  /**
1907
1206
  * Context passed to a RunnableTool's `execute` function.
@@ -3029,319 +2328,6 @@ interface DiscoveryOptions {
3029
2328
  */
3030
2329
  declare function discoverInstances(options?: DiscoveryOptions): DiscoveredInstance[];
3031
2330
 
3032
- interface MemoryContextIdentity {
3033
- /** Explicit owner home for durable runtime state; never persisted in review envelopes. */
3034
- readonly configHome?: string;
3035
- readonly tenantId: string;
3036
- readonly workspaceId?: string;
3037
- readonly userId?: string;
3038
- readonly agentId: string;
3039
- readonly projectId?: string;
3040
- readonly sessionId: string;
3041
- }
3042
- interface MemoryApplicability {
3043
- readonly tenantId: string;
3044
- readonly workspaceId?: string;
3045
- readonly userId?: string;
3046
- readonly agentId?: string;
3047
- readonly projectId?: string;
3048
- readonly sessionId?: string;
3049
- }
3050
- declare function matchesMemoryApplicability(identity: MemoryContextIdentity, applicability: MemoryApplicability): boolean;
3051
- declare function hashMemoryIdentityComponent(kind: string, canonicalId: string): string;
3052
- declare function memoryApplicabilityFingerprint(applicability: MemoryApplicability): string;
3053
-
3054
- type MemoryRefKind = 'working_context' | 'session_trace' | 'artifact_ledger' | 'learning_proposal' | 'memdir' | 'skill' | 'workflow_run' | 'reasoning_report' | 'self_manual' | 'project_doc';
3055
-
3056
- type MemoryScope = 'turn' | 'session' | 'project' | 'workspace' | 'agent' | 'user' | 'builtin';
3057
- type MemoryClaimKind = 'fact' | 'policy' | 'preference' | 'procedure' | 'episode';
3058
- type MemoryLifecycle = 'pending' | 'active' | 'provisional' | 'trusted' | 'stale' | 'quarantined' | 'archived' | 'readonly';
3059
- type MemoryAuthority = 'read_only' | 'proposal_only' | 'approved_write';
3060
- type MemoryVisibility = 'prompt_safe' | 'private' | 'sensitive';
3061
- interface MemoryItemRef {
3062
- readonly kind: MemoryRefKind;
3063
- readonly id: string;
3064
- readonly scope: MemoryScope;
3065
- readonly scopeId?: string;
3066
- readonly applicability?: MemoryApplicability;
3067
- readonly claimKind?: MemoryClaimKind;
3068
- readonly claimKey?: string;
3069
- readonly actionSignature?: string;
3070
- readonly title?: string;
3071
- readonly owner: 'user' | 'project' | 'kodax' | 'external';
3072
- readonly lifecycle: MemoryLifecycle;
3073
- readonly authority: MemoryAuthority;
3074
- readonly visibility: MemoryVisibility;
3075
- readonly sourceRefs: readonly string[];
3076
- readonly relatedRefs: readonly string[];
3077
- readonly version?: string;
3078
- readonly bodyFingerprint?: string;
3079
- readonly storageUri?: string;
3080
- readonly createdAt?: string;
3081
- readonly updatedAt?: string;
3082
- readonly lastUsedAt?: string;
3083
- readonly pinned?: boolean;
3084
- readonly applyReceiptRef?: string;
3085
- readonly expectedFingerprint?: string;
3086
- readonly resultingFingerprint?: string;
3087
- }
3088
- interface MemoryRefFilter {
3089
- readonly kinds?: readonly MemoryRefKind[];
3090
- readonly scopes?: readonly MemoryScope[];
3091
- readonly lifecycles?: readonly MemoryLifecycle[];
3092
- readonly includePrivate?: boolean;
3093
- readonly includeSensitive?: boolean;
3094
- readonly query?: string;
3095
- }
3096
- interface MemoryBodySnapshot {
3097
- readonly ref: MemoryItemRef;
3098
- readonly body: string;
3099
- readonly bodyFingerprint: string;
3100
- readonly frontmatter?: Readonly<Record<string, string>>;
3101
- readonly readAt: string;
3102
- readonly warnings: readonly string[];
3103
- }
3104
- type MemoryProposalAction = 'no_op' | 'link_refs' | 'write_memdir' | 'patch_memdir' | 'handoff_to_skill_loop' | 'quarantine' | 'archive' | 'conflict_report';
3105
- interface MemoryApplyPreview {
3106
- readonly summary: string;
3107
- readonly changedRefs: readonly MemoryItemRef[];
3108
- readonly changedPaths: readonly string[];
3109
- readonly beforeFingerprints: Readonly<Record<string, string>>;
3110
- readonly afterFingerprints?: Readonly<Record<string, string>>;
3111
- readonly diff?: string;
3112
- readonly warnings: readonly string[];
3113
- }
3114
- interface MemoryActionProposal {
3115
- readonly id: string;
3116
- readonly action: MemoryProposalAction;
3117
- readonly targetRefs: readonly MemoryItemRef[];
3118
- readonly sourceRefs: readonly MemoryItemRef[];
3119
- readonly expectedFingerprints: Readonly<Record<string, string>>;
3120
- readonly rationale: string;
3121
- readonly risk: 'low' | 'medium' | 'high';
3122
- readonly preview: MemoryApplyPreview;
3123
- readonly requiresApproval: true;
3124
- readonly createdAt: string;
3125
- }
3126
- interface MemoryApproval {
3127
- readonly proposalId: string;
3128
- readonly approvedBy: 'user' | 'host';
3129
- readonly approvedAt: string;
3130
- readonly expectedFingerprints: Readonly<Record<string, string>>;
3131
- readonly policyId?: string;
3132
- readonly policyReason?: string;
3133
- readonly revalidateAuthority?: () => Promise<void>;
3134
- }
3135
- interface MemoryApplyResult {
3136
- readonly proposalId: string;
3137
- readonly applied: boolean;
3138
- readonly changedRefs: readonly MemoryItemRef[];
3139
- readonly changedPaths: readonly string[];
3140
- readonly skippedReason?: string;
3141
- readonly warnings: readonly string[];
3142
- }
3143
- interface MemoryRejectResult {
3144
- readonly proposalId: string;
3145
- readonly rejected: boolean;
3146
- readonly skippedReason?: string;
3147
- readonly review?: MemoryReviewPlan;
3148
- readonly warnings: readonly string[];
3149
- }
3150
- interface MemoryLifecycleOperationResult {
3151
- readonly refId: string;
3152
- readonly operation: 'archive' | 'forget' | 'purge';
3153
- readonly acknowledged: boolean;
3154
- readonly residualSourceRefs: readonly string[];
3155
- readonly warnings: readonly string[];
3156
- }
3157
- interface MemorySourceAdapter {
3158
- readonly kind: MemoryRefKind;
3159
- listRefs(filter?: MemoryRefFilter): Promise<readonly MemoryItemRef[]>;
3160
- readRef(ref: MemoryItemRef): Promise<MemoryBodySnapshot>;
3161
- previewProposal(proposal: MemoryActionProposal): Promise<MemoryApplyPreview>;
3162
- applyProposal(proposal: MemoryActionProposal, approval: MemoryApproval): Promise<MemoryApplyResult>;
3163
- }
3164
- interface MemoryCuratorInput {
3165
- readonly includePrivate?: boolean;
3166
- readonly includeSensitive?: boolean;
3167
- }
3168
- interface MemoryAutoCuratorInput extends MemoryCuratorInput {
3169
- readonly enabled?: boolean;
3170
- readonly intervalMs?: number;
3171
- readonly minRefs?: number;
3172
- }
3173
- type MemoryAutoCuratorSkipReason = 'disabled' | 'not_due' | 'insufficient_refs';
3174
- interface MemoryAutoCuratorResult {
3175
- readonly ran: boolean;
3176
- readonly skippedReason?: MemoryAutoCuratorSkipReason;
3177
- readonly report?: MemoryGovernanceReport;
3178
- readonly reportPath?: string;
3179
- readonly nextEligibleAt?: string;
3180
- }
3181
- type MemoryGovernanceFindingKind = 'duplicate' | 'conflict' | 'stale' | 'quarantined' | 'orphaned' | 'no_op';
3182
- interface MemoryGovernanceFinding {
3183
- readonly kind: MemoryGovernanceFindingKind;
3184
- readonly severity: 'info' | 'warning' | 'error';
3185
- readonly refIds: readonly string[];
3186
- readonly summary: string;
3187
- readonly suggestedAction: MemoryProposalAction;
3188
- }
3189
- interface MemoryGovernanceReport {
3190
- readonly reportId: string;
3191
- readonly generatedAt: string;
3192
- readonly findings: readonly MemoryGovernanceFinding[];
3193
- readonly warnings: readonly string[];
3194
- }
3195
- interface MemoryPackInput {
3196
- readonly task: string;
3197
- readonly identity?: MemoryContextIdentity;
3198
- readonly decisionIntent?: string;
3199
- readonly actionSignature?: string;
3200
- readonly maxCandidates?: number;
3201
- readonly maxHints?: number;
3202
- readonly includePrivate?: boolean;
3203
- readonly includeSensitive?: boolean;
3204
- readonly includeSnippets?: boolean;
3205
- readonly ignoreMemory?: boolean;
3206
- readonly purpose?: 'automatic' | 'deliberate_query' | 'intervention';
3207
- }
3208
- interface MemoryPackHint {
3209
- readonly ref: MemoryItemRef;
3210
- readonly hook: string;
3211
- readonly reason: string;
3212
- readonly bodySnippet?: string;
3213
- readonly bodyFingerprint?: string;
3214
- }
3215
- interface MemoryPack {
3216
- readonly generatedAt: string;
3217
- readonly taskFingerprint: string;
3218
- readonly memoryRevision: string;
3219
- readonly candidates: readonly MemoryPackHint[];
3220
- readonly promptHints: readonly MemoryPackHint[];
3221
- /** @deprecated Use promptHints. Retained for F228 source compatibility. */
3222
- readonly hints: readonly MemoryPackHint[];
3223
- readonly omitted: readonly string[];
3224
- readonly traceMetadata: MemoryPackTraceMetadata;
3225
- }
3226
- interface MemoryPackTraceMetadata {
3227
- readonly selectedRefIds: readonly string[];
3228
- readonly omittedRefIds: readonly string[];
3229
- readonly taskFingerprint: string;
3230
- readonly suppressed: boolean;
3231
- }
3232
- type MemoryReviewTrigger = 'user_correction' | 'explicit_remember' | 'explicit_forget' | 'proposal_rejected' | 'conflict_detected' | 'episode_completed';
3233
- interface MemoryReviewCandidateRef {
3234
- readonly ref: MemoryItemRef;
3235
- readonly bodySnippet?: string;
3236
- readonly bodyFingerprint?: string;
3237
- readonly warnings: readonly string[];
3238
- }
3239
- interface MemoryReviewInput {
3240
- readonly trigger: MemoryReviewTrigger;
3241
- readonly userFeedback?: string;
3242
- readonly episodeDigest?: KodaXMemoryOutcomeDigest;
3243
- readonly task?: string;
3244
- readonly sourceRefs?: readonly string[];
3245
- readonly candidateRefIds?: readonly string[];
3246
- readonly includePrivate?: boolean;
3247
- readonly includeSensitive?: boolean;
3248
- readonly maxRefs?: number;
3249
- }
3250
- interface MemoryReviewModelInput {
3251
- readonly trigger: MemoryReviewTrigger;
3252
- readonly userFeedback: string;
3253
- readonly task?: string;
3254
- readonly sourceRefs: readonly string[];
3255
- readonly candidateRefs: readonly MemoryReviewCandidateRef[];
3256
- readonly warnings: readonly string[];
3257
- }
3258
- interface MemoryReviewDraftAction {
3259
- readonly action: MemoryProposalAction;
3260
- readonly targetRefIds: readonly string[];
3261
- readonly summary: string;
3262
- readonly rationale: string;
3263
- readonly confidence: 'low' | 'medium' | 'high';
3264
- readonly risk: 'low' | 'medium' | 'high';
3265
- readonly requiresApproval: true;
3266
- readonly proposedBody?: string;
3267
- readonly claimKind?: MemoryClaimKind;
3268
- readonly claimKey?: string;
3269
- readonly actionSignature?: string;
3270
- readonly preconditions?: string;
3271
- readonly counterexamples?: readonly string[];
3272
- readonly relationship?: 'same_claim' | 'condition_refinement' | 'conflict';
3273
- }
3274
- interface MemoryReviewPlan {
3275
- readonly trigger: MemoryReviewTrigger;
3276
- readonly createdAt: string;
3277
- readonly sourceRefs: readonly string[];
3278
- readonly candidateRefs: readonly MemoryReviewCandidateRef[];
3279
- readonly actions: readonly MemoryReviewDraftAction[];
3280
- readonly warnings: readonly string[];
3281
- readonly episodeDigest?: KodaXMemoryOutcomeDigest;
3282
- }
3283
- interface MemoryEpisodeReviewResult {
3284
- readonly plan: MemoryReviewPlan;
3285
- readonly proposalIds: readonly string[];
3286
- readonly appliedProposalIds: readonly string[];
3287
- readonly decisions: readonly MemoryReviewPersistenceDecision[];
3288
- readonly warnings: readonly string[];
3289
- }
3290
- type MemoryReviewPersistenceKind = 'create' | 'evidence_update' | 'condition_refinement' | 'conflict' | 'no_action' | 'reject' | 'quarantine';
3291
- interface MemoryReviewPersistenceDecision {
3292
- readonly actionIndex: number;
3293
- readonly kind: MemoryReviewPersistenceKind;
3294
- readonly reason: string;
3295
- readonly existingRefId?: string;
3296
- readonly proposalId?: string;
3297
- }
3298
- type MemoryReviewRunner = (input: MemoryReviewModelInput) => Promise<MemoryReviewPlan>;
3299
- interface MemoryController {
3300
- listInbox(): Promise<readonly MemoryActionProposal[]>;
3301
- showProposal(id: string): Promise<MemoryActionProposal | undefined>;
3302
- approveProposal(id: string, expectedFingerprints: Readonly<Record<string, string>>): Promise<MemoryApplyResult>;
3303
- rejectProposal(id: string, reason?: string): Promise<MemoryRejectResult>;
3304
- listRefs(filter?: MemoryRefFilter): Promise<readonly MemoryItemRef[]>;
3305
- readRef(ref: MemoryItemRef): Promise<MemoryBodySnapshot>;
3306
- runCurator(input?: MemoryCuratorInput): Promise<MemoryGovernanceReport>;
3307
- maybeRunAutoCurator(input?: MemoryAutoCuratorInput): Promise<MemoryAutoCuratorResult>;
3308
- buildMemoryPack(input: MemoryPackInput): Promise<MemoryPack>;
3309
- reviewMemoryFeedback(input: MemoryReviewInput): Promise<MemoryReviewPlan>;
3310
- prepareEpisodeReview?(digest: KodaXMemoryOutcomeDigest): Promise<MemoryReviewModelInput>;
3311
- applyReviewedEpisode?(plan: MemoryReviewPlan, digest: KodaXMemoryOutcomeDigest, signal?: AbortSignal, revalidateAuthority?: () => Promise<void>): Promise<MemoryEpisodeReviewResult>;
3312
- persistReviewPlan(plan: MemoryReviewPlan): Promise<readonly string[]>;
3313
- /**
3314
- * Resolves which episode-review proposals were actually auto-applied by the
3315
- * governed host policy. Used to keep durable receipts complete while user
3316
- * notices remain truthful.
3317
- */
3318
- listHostAppliedEpisodeProposalIds?(proposalIds: readonly string[]): Promise<readonly string[]>;
3319
- reviewEpisode(digest: KodaXMemoryOutcomeDigest, signal?: AbortSignal): Promise<MemoryEpisodeReviewResult>;
3320
- archiveRef(id: string): Promise<MemoryLifecycleOperationResult>;
3321
- forgetRef(id: string): Promise<MemoryLifecycleOperationResult>;
3322
- purgeRef(id: string): Promise<MemoryLifecycleOperationResult>;
3323
- }
3324
- type MemoryEvent = {
3325
- readonly type: 'proposal.created';
3326
- readonly proposalId: string;
3327
- } | {
3328
- readonly type: 'proposal.approved';
3329
- readonly proposalId: string;
3330
- } | {
3331
- readonly type: 'proposal.rejected';
3332
- readonly proposalId: string;
3333
- } | {
3334
- readonly type: 'curator.completed';
3335
- readonly reportId: string;
3336
- } | {
3337
- readonly type: 'pack.selected';
3338
- readonly refIds: readonly string[];
3339
- } | {
3340
- readonly type: 'review.completed';
3341
- readonly trigger: MemoryReviewTrigger;
3342
- readonly actionCount: number;
3343
- };
3344
-
3345
2331
  type LearnedCapabilityCarrier = 'skill' | 'extension' | 'workflow_handoff';
3346
2332
  type LearnedCapabilityLifecycle = 'opportunity' | 'drafting' | 'ready' | 'testing' | 'active_learned' | 'promoted_user' | 'quarantined' | 'archived' | 'rejected';
3347
2333
  type LearningEventKind = 'opportunity' | 'drafting' | 'ready' | 'testing' | 'activated' | 'promoted' | 'attention' | 'archived' | 'rejected';
@@ -3698,6 +2684,12 @@ interface LearningReviewQualification {
3698
2684
  readonly independentEpisodeCount: number;
3699
2685
  readonly verifiedOutcome: boolean;
3700
2686
  readonly exactSkillInvoked: boolean;
2687
+ /**
2688
+ * FEATURE_290 §3.3: additive admission signal
2689
+ * (`outcome === 'failed' && lesson !== undefined`). No existing predicate
2690
+ * reads it; absent on pre-F290 frozen inputs.
2691
+ */
2692
+ readonly failedWithLesson?: boolean;
3701
2693
  }
3702
2694
  interface LearningReviewEvidencePacket {
3703
2695
  readonly outcomeDigest: KodaXMemoryOutcomeDigest;
@@ -4814,11 +3806,15 @@ declare class AgentActorController {
4814
3806
  private readonly waiters;
4815
3807
  private readonly pendingSettlements;
4816
3808
  private readonly settlementRecoveryMessages;
3809
+ private pendingProgress;
4817
3810
  private readonly scheduler;
4818
3811
  private readonly budget;
4819
3812
  private readonly now;
4820
3813
  private readonly admissionScope;
4821
3814
  private mutationTail;
3815
+ private activeProgress?;
3816
+ private progressMutation?;
3817
+ private progressDrainScheduled;
4822
3818
  private revision;
4823
3819
  private admissionRevision;
4824
3820
  private snapshotSchemaVersion;
@@ -4826,6 +3822,9 @@ declare class AgentActorController {
4826
3822
  private initialized;
4827
3823
  private ownershipLost;
4828
3824
  private settlementPersistenceUnknown;
3825
+ private readonly pendingSettlementIntents;
3826
+ private unknownQuiesceIntent?;
3827
+ private unknownSettlementReconciliation?;
4829
3828
  private ownershipReleased;
4830
3829
  private closing;
4831
3830
  private settlementGeneration;
@@ -4883,10 +3882,14 @@ declare class AgentActorController {
4883
3882
  private setHealth;
4884
3883
  private publishSettlementHealth;
4885
3884
  private finishTurn;
3885
+ private applySettlementIntent;
4886
3886
  private appendCompletion;
4887
3887
  private drainMailbox;
4888
3888
  private unreadMailbox;
4889
3889
  private recordProgress;
3890
+ private scheduleProgressDrain;
3891
+ private startProgressDrain;
3892
+ private applyProgressBatch;
4890
3893
  private resolveForwarding;
4891
3894
  private appendMessage;
4892
3895
  private appendEvent;
@@ -4914,7 +3917,10 @@ declare class AgentActorController {
4914
3917
  private assertWritableOwner;
4915
3918
  private fenceUnknownSettlement;
4916
3919
  private reconcileUnknownSettlement;
3920
+ private performUnknownSettlementReconciliation;
3921
+ private requireSameDurableOwner;
4917
3922
  private stopLocalWork;
3923
+ private rejectProgressWaiters;
4918
3924
  private fenceAfterSnapshotConflict;
4919
3925
  private isInterruptionDurable;
4920
3926
  private notify;
@@ -4927,5 +3933,5 @@ declare class AgentActorController {
4927
3933
  }
4928
3934
  declare function createAgentActorController(options?: AgentControllerOptions): Promise<AgentActorController>;
4929
3935
 
4930
- export { ASK_USER_BACK_SIGNAL as A, ASK_USER_CUSTOM_INPUT_SIGNAL as a, DEFAULT_SYSTEM_CAP as b2, GuardrailBlockedError as bm, GuardrailEscalateError as bo, InvariantSession as bz, MAX_TOOL_LOOP_ITERATIONS as c$, LearningCapabilityError as cK, LearnedAreaStore as cn, Runner as dY, RunnerIterationLimitError as d_, Tracer as eD, WorkflowEventRecorder as eR, SpanImpl as ej, eventFromCapability as f$, _resetPresetDispatchers as fA, admitAndRecordLearnedSkillInvocation as fB, admitLearnedSkillBinding as fC, asSingleSelection as fD, assertLearnedCapabilityTransition as fE, attachRunnerRecoveryTranscript as fF, buildAssistantMessageFromLlmResult as fG, buildSystemPrompt as fH, buildToolResultMessage as fI, canTransitionLearnedCapability as fJ, collectGuardrails as fK, commitLearnedSkillRevision as fL, completeLearnedSkillOutcome as fM, completeLearnedSkillSessionOutcomes as fN, createAgent as fO, createAgentActorController as fP, createHandoff as fQ, createInMemorySession as fR, createInvariantSessionForAgent as fS, createLearnedCapabilityScope as fT, createLearnedSkillRecord as fU, createStateWriter as fV, createTrace as fW, createWorkflowProcessTracker as fX, defaultTracer as fY, detectInstructionsInjection as fZ, discoverInstances as f_, _resetAdmittedAgentBindings as fz, exactInvokedSkillSnapshotForSession as g0, executeRunnerToolCall as g1, extractAssistantTextFromMessage as g2, getActiveUserInteraction as g3, getAdmittedAgentBindings as g4, hashMemoryIdentityComponent as g5, invokeLearnedSkillCanary as g6, isAskUserCustomInputAnswer as g7, isFinalWorkflowProcessStatus as g8, isLearnedCapabilityRecordV2 as g9, setActiveUserInteraction as gA, setAdmittedAgentBindings as gB, slugifyLearnedCapabilityName as gC, stageLearnedSkillRevision as gD, validateDeclarativeSkillSpec as gE, isRunnableTool as ga, isRunnerIterationLimitError as gb, isRunnerLlmResult as gc, isUnifiedLearningReviewModelInput as gd, learningEventIdFor as ge, learningEventKindForLifecycle as gf, listLearnedSkillUsageReceipts as gg, matchesMemoryApplicability as gh, memoryApplicabilityFingerprint as gi, normalizeHostMetadata as gj, normalizeUnifiedLearningReview as gk, quarantineLearnedSkillRevision as gl, readRunnerRecoveryTranscript as gm, reconcileLearnedSkillBindingOutcomes as gn, recordLearnedSkillOffered as go, registerPresetDispatcher as gp, releaseLearnedSkillBinding as gq, renderDeclarativeSkill as gr, resolveLearnedAreaPaths as gs, resolveProjectLearnedAreaRoot as gt, runAdmissionAudit as gu, runInputGuardrails as gv, runOutputGuardrails as gw, runToolAfterGuardrails as gx, runToolBeforeGuardrails as gy, sanitizeUnifiedLearningReviewInput as gz, AgentActorController as i };
4931
- export type { AgentExecutorPlaneBinding as $, AgentCapabilityRequirements as B, AgentContinuationInput as C, AgentControllerHealth as D, AgentControllerOptions as E, AgentCredentialBroker as F, AgentDataClassification as G, AgentDetail as H, AgentDispatchContext as I, AgentDispatchPolicy as J, AgentDispatchPolicyDecision as K, AgentDispatchPolicyInput as L, AgentDispatchabilitySnapshot as M, AgentDispatchabilityStatus as N, AgentEffectDeclaration as O, AgentEvent as P, AgentEventKind as Q, AgentExecutionInput as R, AgentExecutionKind as S, AgentExecutionResult as T, AgentExecutor as U, AgentExecutorEvent as V, AgentExecutorFactory as W, AgentExecutorFactoryContext as X, AgentExecutorPlane as Y, AgentExecutorPlaneBackgroundErrorContext as Z, AgentExecutorPlaneBackgroundErrorHandler as _, CreateAgentExecutorPlaneOptions as a$, AgentExecutorPlaneStore as a0, AgentExecutorPreflightResult as a1, AgentExecutorProtocol as a2, AgentExecutorTaskReference as a3, AgentExecutorTaskSnapshot as a4, AgentFollowupResult as a5, AgentForkTurns as a6, AgentInterruptScope as a7, AgentJsonObject as a8, AgentJsonValue as a9, AgentTaskService as aA, AgentTaskSnapshot as aB, AgentTaskStartInput as aC, AgentTaskState as aD, AgentTaskUsage as aE, AgentTool as aF, AgentTreeSnapshot as aG, AgentTurn as aH, AgentTurnExecutor as aI, AgentTurnRef as aJ, AgentTurnState as aK, AgentTurnSummary as aL, AskUserAnswer as aM, AskUserCustomInputAnswer as aN, AskUserMultiOptions as aO, AskUserQuestionItem as aP, AskUserQuestionOptions as aQ, AskUserSelectionAnswer as aR, CapabilitySupport as aS, CommitLearnedSkillRevisionInput as aT, CompactionAnchor as aU, CompactionConfig as aV, CompactionDetails as aW, CompactionReport as aX, CompactionResult as aY, CompactionSpanData as aZ, CompactionUpdate as a_, AgentLimitReached as aa, AgentListEntry as ab, AgentMailboxMessage as ac, AgentManifest as ad, AgentMessage as ae, AgentMetadataValue as af, AgentMiddlewareDeclaration as ag, AgentMutationOptions as ah, AgentOutput as ai, AgentPreflightInput as aj, AgentPreflightResult as ak, AgentProgressItem as al, AgentProgressKind as am, AgentProgressUpdate as an, AgentReasoningProfile as ao, AgentRegistrationEnabledMutationOptions as ap, AgentRegistrationMutationOptions as aq, AgentRegistrationService as ar, AgentSpanData as as, AgentSpawnInput as at, AgentTaskCancellation as au, AgentTaskCorrelation as av, AgentTaskEvent as aw, AgentTaskFilter as ax, AgentTaskProgress as ay, AgentTaskRegistrationSnapshot as az, AdmissionAuditOptions as b, KodaXSessionGoalEntry as b$, CreateLearnedSkillRecordInput as b0, CurrentTodoSummary as b1, DeclarativeSkillSpec as b3, Deliverable as b4, DiscoveredInstance as b5, DiscoveryOptions as b6, DispatchableAgentDescriptor as b7, DispatchableAgentListing as b8, DispatchableAgentOrigin as b9, KodaXCompactMemoryProgress as bA, KodaXCompactMemorySeed as bB, KodaXExtensionSessionRecord as bC, KodaXExtensionSessionState as bD, KodaXExtensionStore as bE, KodaXExtensionStoreEntry as bF, KodaXFileInputArtifact as bG, KodaXGoalEventType as bH, KodaXGoalState as bI, KodaXGoalStatus as bJ, KodaXImageInputArtifact as bK, KodaXImageMediaType as bL, KodaXInputArtifact as bM, KodaXInputArtifactSource as bN, KodaXJsonValue as bO, KodaXMemoryInfluenceRef as bP, KodaXMemoryIntent as bQ, KodaXMemoryOutcomeDigest as bR, KodaXMemoryOutcomeEvidence as bS, KodaXSessionArchiveMarkerEntry as bT, KodaXSessionArtifactLedgerEntry as bU, KodaXSessionBranchSummaryEntry as bV, KodaXSessionClientNoticeEntry as bW, KodaXSessionCompactionEntry as bX, KodaXSessionData as bY, KodaXSessionEntry as bZ, KodaXSessionEntryBase as b_, DispatchableAgentQuery as ba, EvidenceSpanData as bb, ExactInvokedSkillSnapshot as bc, ExternalAgentEffectDeclaration as bd, ExternalAgentHealth as be, ExternalAgentProtocol as bf, ExternalAgentRegistration as bg, ExternalAgentRegistrationSummary as bh, FanoutSpanData as bi, FileOperations as bj, GenerationSpanData as bk, Guardrail as bl, GuardrailContext as bn, GuardrailPermissionIntent as bp, GuardrailSpanData as bq, GuardrailVerdict as br, Handoff as bs, HandoffSpanData as bt, InMemorySessionOptions as bu, InputGuardrail as bv, InstanceDiscoveryFs as bw, InvariantId as bx, InvariantResult as by, AdmissionCtx as c, KodaXSessionLabelEntry as c0, KodaXSessionLineage as c1, KodaXSessionMemoryOutcomeDigestEntry as c2, KodaXSessionMemoryReviewReceiptEntry as c3, KodaXSessionMessageEntry as c4, KodaXSessionMeta as c5, KodaXSessionNavigationOptions as c6, KodaXSessionRewindMarkerEntry as c7, KodaXSessionRuntimeInfo as c8, KodaXSessionScope as c9, LearnedSkillBindingAdmission as cA, LearnedSkillCanaryOutcome as cB, LearnedSkillDecisionDisposition as cC, LearnedSkillInvocationAdmission as cD, LearnedSkillInvokedReceipt as cE, LearnedSkillOfferedReceipt as cF, LearnedSkillOutcomeReceipt as cG, LearnedSkillUsageReceipt as cH, LearningAction as cI, LearningActionDriver as cJ, LearningCapabilityErrorCode as cL, LearningClientEventState as cM, LearningClientRecord as cN, LearningEvent as cO, LearningEventKind as cP, LearningExplicitUserAuthority as cQ, LearningNotificationState as cR, LearningPage as cS, LearningQuery as cT, LearningReviewEvidencePacket as cU, LearningReviewQualification as cV, LearningReviewVerifierFact as cW, LearningSubscribeOptions as cX, LearningSurfaceSnapshot as cY, LocalAgentTaskInput as cZ, LocalAgentTaskUpdate as c_, KodaXSessionStorage as ca, KodaXSessionTreeNode as cb, KodaXSessionUiHistoryItem as cc, KodaXSessionUiHistoryItemType as cd, KodaXSessionUiTextHistoryItem as ce, KodaXSessionUiTextHistoryItemType as cf, KodaXSessionUiToolCall as cg, KodaXSessionUiToolCallStatus as ch, KodaXSessionUiToolGroupHistoryItem as ci, KodaXSessionWorkspaceKind as cj, KodaXVideoInputArtifact as ck, KodaXVideoMediaType as cl, LearnedAreaPaths as cm, LearnedCapabilityArtifact as co, LearnedCapabilityCanary as cp, LearnedCapabilityCanaryBinding as cq, LearnedCapabilityCanaryInvocation as cr, LearnedCapabilityCarrier as cs, LearnedCapabilityLifecycle as ct, LearnedCapabilityProvenance as cu, LearnedCapabilityRecord as cv, LearnedCapabilityRecordV1 as cw, LearnedCapabilityRecordV2 as cx, LearnedCapabilityScope as cy, LearnedCapabilitySource as cz, AdmissionVerdict as d, RunnerLlmResult as d$, ManifestPatch as d0, MemoryActionProposal as d1, MemoryApplicability as d2, MemoryApplyPreview as d3, MemoryApplyResult as d4, MemoryApproval as d5, MemoryAuthority as d6, MemoryAutoCuratorInput as d7, MemoryAutoCuratorResult as d8, MemoryBodySnapshot as d9, MemoryReviewPersistenceDecision as dA, MemoryReviewPersistenceKind as dB, MemoryReviewPlan as dC, MemoryReviewRunner as dD, MemoryReviewTrigger as dE, MemoryScope as dF, MemorySourceAdapter as dG, MemoryVisibility as dH, MessageEntry as dI, NormalizedLearnedSkillDecision as dJ, ObserveCtx as dK, OutputGuardrail as dL, PersistedSessionState as dM, PresetDispatcher as dN, PresetTracingContext as dO, QualityInvariant as dP, ReadonlyMutationTracker as dQ, ReadonlyRecorder as dR, ReasoningDepth as dS, RecentlyModifiedFile as dT, RunEvent as dU, RunOptions as dV, RunResult as dW, RunnableTool as dX, RunnerEvent as dZ, MemoryClaimKind as da, MemoryContextIdentity as db, MemoryController as dc, MemoryCuratorInput as dd, MemoryDecisionTraceReceipt as de, MemoryEpisodeReviewResult as df, MemoryEvent as dg, MemoryGovernanceFinding as dh, MemoryGovernanceFindingKind as di, MemoryGovernanceReport as dj, MemoryItemRef as dk, MemoryLifecycle as dl, MemoryLifecycleOperationResult as dm, MemoryPack as dn, MemoryPackHint as dp, MemoryPackInput as dq, MemoryPackTraceMetadata as dr, MemoryProposalAction as ds, MemoryRefFilter as dt, MemoryRefKind as du, MemoryRejectResult as dv, MemoryReviewCandidateRef as dw, MemoryReviewDraftAction as dx, MemoryReviewInput as dy, MemoryReviewModelInput as dz, AdmittedHandle as e, WorkflowOutcomeResult as e$, RunnerLlmReturn as e0, RunnerRecoveryTranscriptCarrier as e1, RunnerToolCall as e2, RunnerToolContext as e3, RunnerToolObserver as e4, RunnerToolResult as e5, RunnerToolResultBatch as e6, RunnerToolResultBatchTransform as e7, Session as e8, SessionDispatchResult as e9, ToolPermission as eA, Trace as eB, TraceOptions as eC, TracerOptions as eE, UnifiedLearningReviewModelInput as eF, UnifiedLearningReviewResult as eG, UnifiedLearningReviewRunner as eH, UserInteraction as eI, WorkflowAgentBackend as eJ, WorkflowApi as eK, WorkflowApproval as eL, WorkflowApprovalSummary as eM, WorkflowArtifactRef as eN, WorkflowBudget as eO, WorkflowEvent as eP, WorkflowEventCorrelation as eQ, WorkflowEventType as eS, WorkflowIsolation as eT, WorkflowLimits as eU, WorkflowLogEvent as eV, WorkflowMeta as eW, WorkflowModelHint as eX, WorkflowModule as eY, WorkflowOutcome as eZ, WorkflowOutcomeError as e_, SessionEntry as ea, SessionErrorMetadata as eb, SessionExtension as ec, SessionForkOptions as ed, SessionMeta as ee, SessionStateSnapshot as ef, Span as eg, SpanData as eh, SpanError as ei, SpanImplOptions as ek, StagedLearnedSkillArtifact as el, StartTraceOptions as em, StateWriter as en, StateWriterFs as eo, StateWriterOptions as ep, StopHookContext as eq, StopHookFn as er, StopHookResult as es, StopHookSpanData as et, SystemCap as eu, TerminalCtx as ev, ToolBeforeOutcome as ew, ToolCallSpanData as ex, ToolCapability as ey, ToolGuardrail as ez, Agent as f, WorkflowOutcomeStatus as f0, WorkflowOutcomeUsage as f1, WorkflowParallelOptions as f2, WorkflowProcessArtifact as f3, WorkflowProcessCounts as f4, WorkflowProcessEvent as f5, WorkflowProcessItem as f6, WorkflowProcessItemKind as f7, WorkflowProcessItemOrigin as f8, WorkflowProcessItemStatus as f9, WorkflowProcessProgress as fa, WorkflowProcessSnapshot as fb, WorkflowProcessSource as fc, WorkflowProcessStatus as fd, WorkflowProcessSummaryStatus as fe, WorkflowProcessTokenUsage as ff, WorkflowProcessTracker as fg, WorkflowProcessTrackerOptions as fh, WorkflowRun as fi, WorkflowRunState as fj, WorkflowRunStatus as fk, WorkflowSpawnAgentInput as fl, WorkflowSynthesis as fm, WorkflowSynthesizeInput as fn, WorkflowTaskHandle as fo, WorkflowTaskResult as fp, WorkflowTaskSnapshot as fq, WorkflowTaskStatus as fr, WorkflowTaskSummaryEventUpdate as fs, WorkflowTaskSummaryKind as ft, WorkflowTaskSummaryUpdate as fu, WorkflowTaskUsage as fv, WorkflowTaskVerification as fw, WorkflowTaskVerificationResult as fx, WorkflowWaitOptions as fy, AgentActor as g, AgentActorClient as h, AgentActorOwner as j, AgentActorSnapshot as k, AgentActorSnapshotV1 as l, AgentActorSnapshotV2 as m, AgentActorState as n, AgentActorStore as o, AgentArtifactDescriptor as p, AgentArtifactPolicy as q, AgentArtifactPolicyDecision as r, AgentArtifactPolicyInput as s, AgentArtifactReference as t, AgentBudgetAdmission as u, AgentBudgetAdmissionInput as v, AgentBudgetExhausted as w, AgentBudgetPort as x, AgentCapabilities as y, AgentCapabilityDeclaration as z };
3936
+ export { ASK_USER_BACK_SIGNAL as A, ASK_USER_CUSTOM_INPUT_SIGNAL as a, GuardrailBlockedError as aK, GuardrailEscalateError as aM, InvariantSession as aX, DEFAULT_SYSTEM_CAP as aq, Runner as b$, LearnedAreaStore as b4, MAX_TOOL_LOOP_ITERATIONS as bI, LearningCapabilityError as br, RunnerIterationLimitError as c1, Tracer as cF, WorkflowEventRecorder as cT, SpanImpl as cl, defaultTracer as d$, _resetAdmittedAgentBindings as dC, _resetPresetDispatchers as dD, admitAndRecordLearnedSkillInvocation as dE, admitLearnedSkillBinding as dF, asSingleSelection as dG, assertLearnedCapabilityTransition as dH, attachRunnerRecoveryTranscript as dI, buildAssistantMessageFromLlmResult as dJ, buildSystemPrompt as dK, buildToolResultMessage as dL, canTransitionLearnedCapability as dM, collectGuardrails as dN, commitLearnedSkillRevision as dO, completeLearnedSkillOutcome as dP, completeLearnedSkillSessionOutcomes as dQ, createAgent as dR, createAgentActorController as dS, createHandoff as dT, createInMemorySession as dU, createInvariantSessionForAgent as dV, createLearnedCapabilityScope as dW, createLearnedSkillRecord as dX, createStateWriter as dY, createTrace as dZ, createWorkflowProcessTracker as d_, detectInstructionsInjection as e0, discoverInstances as e1, eventFromCapability as e2, exactInvokedSkillSnapshotForSession as e3, executeRunnerToolCall as e4, extractAssistantTextFromMessage as e5, getActiveUserInteraction as e6, getAdmittedAgentBindings as e7, invokeLearnedSkillCanary as e8, isAskUserCustomInputAnswer as e9, setActiveUserInteraction as eA, setAdmittedAgentBindings as eB, slugifyLearnedCapabilityName as eC, stageLearnedSkillRevision as eD, validateDeclarativeSkillSpec as eE, isFinalWorkflowProcessStatus as ea, isLearnedCapabilityRecordV2 as eb, isRunnableTool as ec, isRunnerIterationLimitError as ed, isRunnerLlmResult as ee, isUnifiedLearningReviewModelInput as ef, learningEventIdFor as eg, learningEventKindForLifecycle as eh, listLearnedSkillUsageReceipts as ei, normalizeHostMetadata as ej, normalizeUnifiedLearningReview as ek, quarantineLearnedSkillRevision as el, readRunnerRecoveryTranscript as em, reconcileLearnedSkillBindingOutcomes as en, recordLearnedSkillOffered as eo, registerPresetDispatcher as ep, releaseLearnedSkillBinding as eq, renderDeclarativeSkill as er, resolveLearnedAreaPaths as es, resolveProjectLearnedAreaRoot as et, runAdmissionAudit as eu, runInputGuardrails as ev, runOutputGuardrails as ew, runToolAfterGuardrails as ex, runToolBeforeGuardrails as ey, sanitizeUnifiedLearningReviewInput as ez, AgentActorController as g };
3937
+ export type { AgentTaskFilter as $, AgentExecutorFactory as B, AgentExecutorFactoryContext as C, AgentExecutorPlane as D, AgentExecutorPlaneBackgroundErrorContext as E, AgentExecutorPlaneBackgroundErrorHandler as F, AgentExecutorPlaneBinding as G, AgentExecutorPlaneStore as H, AgentExecutorPreflightResult as I, AgentExecutorProtocol as J, AgentExecutorTaskReference as K, AgentExecutorTaskSnapshot as L, AgentJsonObject as M, AgentJsonValue as N, AgentManifest as O, AgentMessage as P, AgentMiddlewareDeclaration as Q, AgentPreflightInput as R, AgentPreflightResult as S, AgentReasoningProfile as T, AgentRegistrationEnabledMutationOptions as U, AgentRegistrationMutationOptions as V, AgentRegistrationService as W, AgentSpanData as X, AgentTaskCancellation as Y, AgentTaskCorrelation as Z, AgentTaskEvent as _, KodaXInputArtifact as a$, AgentTaskProgress as a0, AgentTaskRegistrationSnapshot as a1, AgentTaskService as a2, AgentTaskSnapshot as a3, AgentTaskStartInput as a4, AgentTaskState as a5, AgentTaskUsage as a6, AgentTool as a7, AskUserAnswer as a8, AskUserCustomInputAnswer as a9, ExactInvokedSkillSnapshot as aA, ExternalAgentEffectDeclaration as aB, ExternalAgentHealth as aC, ExternalAgentProtocol as aD, ExternalAgentRegistration as aE, ExternalAgentRegistrationSummary as aF, FanoutSpanData as aG, FileOperations as aH, GenerationSpanData as aI, Guardrail as aJ, GuardrailContext as aL, GuardrailPermissionIntent as aN, GuardrailSpanData as aO, GuardrailVerdict as aP, Handoff as aQ, HandoffSpanData as aR, InMemorySessionOptions as aS, InputGuardrail as aT, InstanceDiscoveryFs as aU, InvariantId as aV, InvariantResult as aW, KodaXFileInputArtifact as aY, KodaXImageInputArtifact as aZ, KodaXImageMediaType as a_, AskUserMultiOptions as aa, AskUserQuestionItem as ab, AskUserQuestionOptions as ac, AskUserSelectionAnswer as ad, CapabilitySupport as ae, CommitLearnedSkillRevisionInput as af, CompactionAnchor as ag, CompactionConfig as ah, CompactionDetails as ai, CompactionReport as aj, CompactionResult as ak, CompactionSpanData as al, CompactionUpdate as am, CreateAgentExecutorPlaneOptions as an, CreateLearnedSkillRecordInput as ao, CurrentTodoSummary as ap, DeclarativeSkillSpec as ar, Deliverable as as, DiscoveredInstance as at, DiscoveryOptions as au, DispatchableAgentDescriptor as av, DispatchableAgentListing as aw, DispatchableAgentOrigin as ax, DispatchableAgentQuery as ay, EvidenceSpanData as az, AdmissionAuditOptions as b, KodaXInputArtifactSource as b0, KodaXVideoInputArtifact as b1, KodaXVideoMediaType as b2, LearnedAreaPaths as b3, LearnedCapabilityArtifact as b5, LearnedCapabilityCanary as b6, LearnedCapabilityCanaryBinding as b7, LearnedCapabilityCanaryInvocation as b8, LearnedCapabilityCarrier as b9, LearningQuery as bA, LearningReviewEvidencePacket as bB, LearningReviewQualification as bC, LearningReviewVerifierFact as bD, LearningSubscribeOptions as bE, LearningSurfaceSnapshot as bF, LocalAgentTaskInput as bG, LocalAgentTaskUpdate as bH, ManifestPatch as bJ, MemoryDecisionTraceReceipt as bK, MessageEntry as bL, NormalizedLearnedSkillDecision as bM, ObserveCtx as bN, OutputGuardrail as bO, PersistedSessionState as bP, PresetDispatcher as bQ, PresetTracingContext as bR, QualityInvariant as bS, ReadonlyMutationTracker as bT, ReadonlyRecorder as bU, ReasoningDepth as bV, RecentlyModifiedFile as bW, RunEvent as bX, RunOptions as bY, RunResult as bZ, RunnableTool as b_, LearnedCapabilityLifecycle as ba, LearnedCapabilityProvenance as bb, LearnedCapabilityRecord as bc, LearnedCapabilityRecordV1 as bd, LearnedCapabilityRecordV2 as be, LearnedCapabilityScope as bf, LearnedCapabilitySource as bg, LearnedSkillBindingAdmission as bh, LearnedSkillCanaryOutcome as bi, LearnedSkillDecisionDisposition as bj, LearnedSkillInvocationAdmission as bk, LearnedSkillInvokedReceipt as bl, LearnedSkillOfferedReceipt as bm, LearnedSkillOutcomeReceipt as bn, LearnedSkillUsageReceipt as bo, LearningAction as bp, LearningActionDriver as bq, LearningCapabilityErrorCode as bs, LearningClientEventState as bt, LearningClientRecord as bu, LearningEvent as bv, LearningEventKind as bw, LearningExplicitUserAuthority as bx, LearningNotificationState as by, LearningPage as bz, AdmissionCtx as c, WorkflowOutcome as c$, RunnerEvent as c0, RunnerLlmResult as c2, RunnerLlmReturn as c3, RunnerRecoveryTranscriptCarrier as c4, RunnerToolCall as c5, RunnerToolContext as c6, RunnerToolObserver as c7, RunnerToolResult as c8, RunnerToolResultBatch as c9, ToolCapability as cA, ToolGuardrail as cB, ToolPermission as cC, Trace as cD, TraceOptions as cE, TracerOptions as cG, UnifiedLearningReviewModelInput as cH, UnifiedLearningReviewResult as cI, UnifiedLearningReviewRunner as cJ, UserInteraction as cK, WorkflowAgentBackend as cL, WorkflowApi as cM, WorkflowApproval as cN, WorkflowApprovalSummary as cO, WorkflowArtifactRef as cP, WorkflowBudget as cQ, WorkflowEvent as cR, WorkflowEventCorrelation as cS, WorkflowEventType as cU, WorkflowIsolation as cV, WorkflowLimits as cW, WorkflowLogEvent as cX, WorkflowMeta as cY, WorkflowModelHint as cZ, WorkflowModule as c_, RunnerToolResultBatchTransform as ca, Session as cb, SessionDispatchResult as cc, SessionEntry as cd, SessionExtension as ce, SessionForkOptions as cf, SessionMeta as cg, SessionStateSnapshot as ch, Span as ci, SpanData as cj, SpanError as ck, SpanImplOptions as cm, StagedLearnedSkillArtifact as cn, StartTraceOptions as co, StateWriter as cp, StateWriterFs as cq, StateWriterOptions as cr, StopHookContext as cs, StopHookFn as ct, StopHookResult as cu, StopHookSpanData as cv, SystemCap as cw, TerminalCtx as cx, ToolBeforeOutcome as cy, ToolCallSpanData as cz, AdmissionVerdict as d, WorkflowOutcomeError as d0, WorkflowOutcomeResult as d1, WorkflowOutcomeStatus as d2, WorkflowOutcomeUsage as d3, WorkflowParallelOptions as d4, WorkflowProcessArtifact as d5, WorkflowProcessCounts as d6, WorkflowProcessEvent as d7, WorkflowProcessItem as d8, WorkflowProcessItemKind as d9, WorkflowTaskVerificationResult as dA, WorkflowWaitOptions as dB, WorkflowProcessItemOrigin as da, WorkflowProcessItemStatus as db, WorkflowProcessProgress as dc, WorkflowProcessSnapshot as dd, WorkflowProcessSource as de, WorkflowProcessStatus as df, WorkflowProcessSummaryStatus as dg, WorkflowProcessTokenUsage as dh, WorkflowProcessTracker as di, WorkflowProcessTrackerOptions as dj, WorkflowRun as dk, WorkflowRunState as dl, WorkflowRunStatus as dm, WorkflowSpawnAgentInput as dn, WorkflowSynthesis as dp, WorkflowSynthesizeInput as dq, WorkflowTaskHandle as dr, WorkflowTaskResult as ds, WorkflowTaskSnapshot as dt, WorkflowTaskStatus as du, WorkflowTaskSummaryEventUpdate as dv, WorkflowTaskSummaryKind as dw, WorkflowTaskSummaryUpdate as dx, WorkflowTaskUsage as dy, WorkflowTaskVerification as dz, AdmittedHandle as e, Agent as f, AgentArtifactPolicy as h, AgentArtifactPolicyDecision as i, AgentArtifactPolicyInput as j, AgentArtifactReference as k, AgentCapabilityDeclaration as l, AgentCapabilityRequirements as m, AgentContinuationInput as n, AgentControllerHealth as o, AgentControllerOptions as p, AgentCredentialBroker as q, AgentDispatchContext as r, AgentDispatchPolicy as s, AgentDispatchPolicyDecision as t, AgentDispatchPolicyInput as u, AgentDispatchabilitySnapshot as v, AgentDispatchabilityStatus as w, AgentEffectDeclaration as x, AgentExecutor as y, AgentExecutorEvent as z };