@linnlabs/linnkit 0.9.0 → 0.21.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 (102) hide show
  1. package/CHANGELOG.md +168 -0
  2. package/bin/linnkit.cjs +7 -0
  3. package/dist/{agent-invocation-BHcNfrBV.d.cts → agent-invocation-CAlm9qOw.d.cts} +1 -1
  4. package/dist/{agent-invocation-BznDaXDs.d.ts → agent-invocation-DKoEDLkl.d.ts} +1 -1
  5. package/dist/{ai-engine.types-vZRnQcJa.d.ts → ai-engine.types-CeLoM624.d.cts} +9 -1
  6. package/dist/{ai-engine.types-BpeU_XQG.d.cts → ai-engine.types-LqmnfR2W.d.ts} +9 -1
  7. package/dist/{audit-CtcfART1.d.ts → audit-BuWHoMEr.d.ts} +4 -2
  8. package/dist/{audit-LeOrm2hX.d.cts → audit-DnzNQzwq.d.cts} +4 -2
  9. package/dist/cli.cjs +682 -258
  10. package/dist/cli.cjs.map +1 -1
  11. package/dist/cli.js +682 -258
  12. package/dist/cli.js.map +1 -1
  13. package/dist/context-manager.cjs +823 -57
  14. package/dist/context-manager.cjs.map +1 -1
  15. package/dist/context-manager.d.cts +132 -18
  16. package/dist/context-manager.d.ts +132 -18
  17. package/dist/context-manager.js +823 -58
  18. package/dist/context-manager.js.map +1 -1
  19. package/dist/{context-trace-HE2qY5Q-.d.cts → context-trace-DrtvKac4.d.cts} +37 -4
  20. package/dist/{context-trace-DRi5M4lX.d.ts → context-trace-WV1HAZeB.d.ts} +37 -4
  21. package/dist/contracts.cjs +225 -2
  22. package/dist/contracts.cjs.map +1 -1
  23. package/dist/contracts.d.cts +6 -4
  24. package/dist/contracts.d.ts +6 -4
  25. package/dist/contracts.js +205 -3
  26. package/dist/contracts.js.map +1 -1
  27. package/dist/{defaultGraphExecutor-BIjJj7WF.d.cts → defaultGraphExecutor-L1ri3oij.d.cts} +48 -19
  28. package/dist/{defaultGraphExecutor-BBswR8wn.d.ts → defaultGraphExecutor-QzzdudLQ.d.ts} +48 -19
  29. package/dist/{index-BanRABEt.d.cts → index-BeQO0rx2.d.cts} +345 -268
  30. package/dist/{index-Cvr23YCl.d.cts → index-CDofGr_4.d.ts} +24 -6
  31. package/dist/{index-Dl5PLgAv.d.cts → index-Crl5E4eF.d.cts} +27 -4
  32. package/dist/{index-CJeWHopy.d.ts → index-DWGKvssS.d.ts} +3 -3
  33. package/dist/{index-CHqwkvGp.d.ts → index-X5lYU1Lj.d.ts} +27 -4
  34. package/dist/{index-DDzuSb0n.d.ts → index-uCNCpJBg.d.cts} +24 -6
  35. package/dist/{index-Z8NXKNwI.d.ts → index-wOZD-p2-.d.ts} +345 -268
  36. package/dist/{index-DO4dQgf2.d.cts → index-wXVAHZ0D.d.cts} +3 -3
  37. package/dist/index.cjs +1011 -329
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.d.cts +19 -16
  40. package/dist/index.d.ts +19 -16
  41. package/dist/index.js +1011 -329
  42. package/dist/index.js.map +1 -1
  43. package/dist/{messages-XthmnHZ3.d.cts → messages-Br5SiLD3.d.cts} +706 -1
  44. package/dist/{messages-XthmnHZ3.d.ts → messages-Br5SiLD3.d.ts} +706 -1
  45. package/dist/{ports-DnLuKfpE.d.ts → ports-Dugizzje.d.cts} +6 -2
  46. package/dist/{ports-DaatKJXp.d.cts → ports-fhp84x_C.d.ts} +6 -2
  47. package/dist/ports.d.cts +8 -5
  48. package/dist/ports.d.ts +8 -5
  49. package/dist/quickstart.cjs +683 -258
  50. package/dist/quickstart.cjs.map +1 -1
  51. package/dist/quickstart.d.cts +11 -10
  52. package/dist/quickstart.d.ts +11 -10
  53. package/dist/quickstart.js +683 -258
  54. package/dist/quickstart.js.map +1 -1
  55. package/dist/{runAgent-CPj_9e58.d.ts → runAgent-BmMSju8I.d.ts} +6 -6
  56. package/dist/{runAgent-HYKlXbVr.d.cts → runAgent-CKgcRSRH.d.cts} +6 -6
  57. package/dist/{runHandle-D3gPsD7B.d.cts → runHandle-DH4VmQx6.d.cts} +6 -4
  58. package/dist/{runHandle-CyXvzgzk.d.ts → runHandle-o3p06Nva.d.ts} +6 -4
  59. package/dist/runtime-kernel/events.cjs +202 -1
  60. package/dist/runtime-kernel/events.cjs.map +1 -1
  61. package/dist/runtime-kernel/events.d.cts +5 -5
  62. package/dist/runtime-kernel/events.d.ts +5 -5
  63. package/dist/runtime-kernel/events.js +202 -1
  64. package/dist/runtime-kernel/events.js.map +1 -1
  65. package/dist/runtime-kernel.cjs +999 -340
  66. package/dist/runtime-kernel.cjs.map +1 -1
  67. package/dist/runtime-kernel.d.cts +16 -14
  68. package/dist/runtime-kernel.d.ts +16 -14
  69. package/dist/runtime-kernel.js +990 -341
  70. package/dist/runtime-kernel.js.map +1 -1
  71. package/dist/testkit.cjs +1003 -321
  72. package/dist/testkit.cjs.map +1 -1
  73. package/dist/testkit.d.cts +16 -14
  74. package/dist/testkit.d.ts +16 -14
  75. package/dist/testkit.js +1003 -321
  76. package/dist/testkit.js.map +1 -1
  77. package/dist/{todo-B1PmDlp3.d.cts → todo-Ca8llpRQ.d.cts} +1 -1
  78. package/dist/{todo-B1PmDlp3.d.ts → todo-Ca8llpRQ.d.ts} +1 -1
  79. package/dist/{agentSpec-EkmviZjy.d.cts → token-accounting-CwpSPg4y.d.cts} +1280 -1
  80. package/dist/{agentSpec-EkmviZjy.d.ts → token-accounting-CwpSPg4y.d.ts} +1280 -1
  81. package/dist/token-calibration-Cxv6dDYF.d.cts +327 -0
  82. package/dist/token-calibration-Cxv6dDYF.d.ts +327 -0
  83. package/dist/token-counter-CFfP8PQb.d.cts +26 -0
  84. package/dist/token-counter-SFyyTeaG.d.ts +26 -0
  85. package/dist/token-usage-CqwT7-5K.d.cts +133 -0
  86. package/dist/token-usage-CqwT7-5K.d.ts +133 -0
  87. package/dist/{tokenizer-DFL4I7-I.d.ts → tokenizer-BFJNCHFX.d.ts} +1 -1
  88. package/dist/{tokenizer-DH_JXv-H.d.cts → tokenizer-DoGsBE3A.d.cts} +1 -1
  89. package/dist/{toolContracts-CLkQmhTG.d.cts → toolContracts-Bm3EZ1UM.d.cts} +13 -2
  90. package/dist/{toolContracts-Blll0241.d.ts → toolContracts-f8lzZBNa.d.ts} +13 -2
  91. package/docs/README.md +1 -1
  92. package/docs/integration/README.md +3 -3
  93. package/docs/integration/agent-registration-guide.md +3 -1
  94. package/docs/integration/child-runs.md +4 -1
  95. package/docs/integration/context-engineering.md +83 -16
  96. package/docs/integration/context-fences.md +44 -3
  97. package/docs/integration/llm-provider.md +1 -1
  98. package/docs/integration/persistence.md +1 -0
  99. package/docs/integration/run-supervisor.md +3 -0
  100. package/docs/integration/tool-development-guide.md +7 -5
  101. package/docs/integration/tool-history.md +43 -17
  102. package/package.json +4 -3
package/dist/contracts.js CHANGED
@@ -33,6 +33,12 @@ var ToolOutputMeta = z.object({
33
33
  args: z.record(z.unknown()).optional(),
34
34
  tool_call_id: z.string()
35
35
  });
36
+ var ObservationTruncationMeta = z.object({
37
+ originalChars: z.number().int().nonnegative(),
38
+ previewChars: z.number().int().nonnegative(),
39
+ originalLines: z.number().int().nonnegative().optional(),
40
+ previewLines: z.number().int().nonnegative().optional()
41
+ });
36
42
  var ImageInfoMeta = z.object({
37
43
  url: z.string().optional(),
38
44
  width: z.number().int().positive().optional(),
@@ -64,6 +70,7 @@ var PersistentMetadata = z.object({
64
70
  tool_name: z.string().optional(),
65
71
  args: z.record(z.unknown()).optional(),
66
72
  tool_call_id: z.string().optional(),
73
+ observationTruncation: ObservationTruncationMeta.optional(),
67
74
  raw_output: z.string().optional(),
68
75
  image_info: ImageInfoMeta.optional(),
69
76
  taskType: z.string().optional(),
@@ -235,6 +242,7 @@ var AgentSpecBudgetPolicy = z.object({
235
242
  });
236
243
  var AgentSpecToolHistoryPolicy = z.object({
237
244
  strategy: z.enum(["per-pair", "per-run", "none"]).optional(),
245
+ retentionMode: z.enum(["drop", "compress"]).optional(),
238
246
  keepLatestToolPairs: z.number().int().nonnegative().optional(),
239
247
  keepLatestRuns: z.number().int().nonnegative().optional(),
240
248
  maxInteractionGroups: z.number().int().nonnegative().optional(),
@@ -287,7 +295,17 @@ var AgentSpecReasoningRetentionPolicy = z.object({
287
295
  var AgentSpecTokenEstimationPolicy = z.object({
288
296
  encoding: z.string().min(1).optional(),
289
297
  avgCharsPerToken: z.number().positive().optional(),
290
- toolCallOverhead: z.number().int().nonnegative().optional()
298
+ toolCallOverhead: z.number().int().nonnegative().optional(),
299
+ calibration: z.object({
300
+ enabled: z.boolean().optional(),
301
+ minSamples: z.number().int().positive().optional(),
302
+ minCoefficient: z.number().positive().optional(),
303
+ maxCoefficient: z.number().positive().optional()
304
+ }).optional(),
305
+ remoteCount: z.object({
306
+ enabled: z.boolean().optional(),
307
+ failureBehavior: z.enum(["use-local-estimate", "fail-fast"]).optional()
308
+ }).optional()
291
309
  });
292
310
  var SYSTEM_REMINDER_BUILTIN_TRIGGER_KINDS = [
293
311
  "phase-equals",
@@ -357,12 +375,13 @@ var AgentSpecContextPolicy = z.object({
357
375
  var DEFAULT_CONTEXT_POLICY = {
358
376
  profileId: "agent",
359
377
  budget: {
360
- maxTokens: 12e4,
378
+ maxTokens: 232e3,
361
379
  reservedForResponse: 2400,
362
380
  workingMemoryBudgetPercentage: 0.7
363
381
  },
364
382
  toolHistory: {
365
383
  strategy: "per-run",
384
+ retentionMode: "drop",
366
385
  keepLatestToolPairs: 2,
367
386
  keepLatestRuns: 1,
368
387
  maxInteractionGroups: 12,
@@ -1208,7 +1227,190 @@ var createSSEHistorySummaryEvent = (id, conversationId, turnId, summaryId, conte
1208
1227
  summary_seq: summarySeq,
1209
1228
  ...options
1210
1229
  });
1230
+ var TokenCountSource = z.enum([
1231
+ "local-estimate",
1232
+ "provider-preflight-count",
1233
+ "provider-response-usage",
1234
+ "host-supplied",
1235
+ "test-fixture"
1236
+ ]);
1237
+ var TokenCountConfidence = z.enum([
1238
+ "estimate",
1239
+ "provider-estimate",
1240
+ "actual"
1241
+ ]);
1242
+ var TokenRouteCapabilities = z.object({
1243
+ supportsRemoteTokenCount: z.boolean().optional(),
1244
+ supportsResponseUsage: z.boolean().optional(),
1245
+ supportsImageInput: z.boolean().optional(),
1246
+ supportsCachedInputBilling: z.boolean().optional(),
1247
+ supportsReasoningTokens: z.boolean().optional()
1248
+ });
1249
+ var TokenRoute = z.object({
1250
+ providerId: z.string().describe("host \u4FA7 provider \u6807\u8BC6\uFF1Aopenai / anthropic / openrouter / siliconflow / zai ..."),
1251
+ baseURL: z.string().optional().describe("\u4E2D\u8F6C\u5E73\u53F0\u6216\u79C1\u6709 endpoint\uFF1B\u7528\u4E8E\u533A\u5206\u540C\u540D\u6A21\u578B\u7684\u4E0D\u540C route"),
1252
+ modelId: z.string().describe("host \u4FA7\u6A21\u578B id"),
1253
+ providerModelId: z.string().optional().describe("provider \u5B9E\u9645\u6A21\u578B\u540D\uFF08\u4E0E host modelId \u53EF\u80FD\u4E0D\u540C\uFF09"),
1254
+ capabilities: TokenRouteCapabilities.optional()
1255
+ });
1256
+ var tokenCount = z.number().int().nonnegative();
1257
+ var CanonicalLlmUsage = z.object({
1258
+ inputTokens: tokenCount.describe("\u975E\u7F13\u5B58\u666E\u901A\u8F93\u5165 token"),
1259
+ outputTokens: tokenCount.describe("\u8F93\u51FA token"),
1260
+ reasoningTokens: tokenCount.optional().describe("\u63A8\u7406 token\uFF1Bundefined=\u672A\u5355\u5217\uFF0C0=\u62A5\u544A\u4E3A 0"),
1261
+ cacheReadTokens: tokenCount.optional().describe("\u7F13\u5B58\u547D\u4E2D\u8BFB\u53D6 token"),
1262
+ cacheWriteTokens: tokenCount.optional().describe("\u7F13\u5B58\u5199\u5165 token"),
1263
+ totalTokens: tokenCount.optional().describe("provider \u62A5\u544A\u7684\u603B\u91CF\uFF1B\u53EF\u7F3A\u5931\uFF0C\u4E14\u4E0D\u4FDD\u8BC1\u7B49\u4E8E\u5404\u9879\u4E4B\u548C"),
1264
+ source: TokenCountSource,
1265
+ confidence: TokenCountConfidence,
1266
+ rawUsage: z.unknown().optional().describe("\u539F\u59CB provider usage\uFF0C\u4EC5\u4F9B\u5BA1\u8BA1")
1267
+ });
1268
+ var tokenCount2 = z.number().int().nonnegative();
1269
+ var tokenPrice = z.number().finite().nonnegative();
1270
+ var TokenLedgerEntryKind = z.enum([
1271
+ "llm-usage",
1272
+ "context-component"
1273
+ ]);
1274
+ var ContextTokenComponentKind = z.enum([
1275
+ "system",
1276
+ "user",
1277
+ "assistant",
1278
+ "tool",
1279
+ "context-injection",
1280
+ "history-summary",
1281
+ "working-memory",
1282
+ "fence",
1283
+ "system-reminder",
1284
+ "other"
1285
+ ]);
1286
+ var TokenUsageTotals = z.object({
1287
+ inputTokens: tokenCount2,
1288
+ outputTokens: tokenCount2,
1289
+ reasoningTokens: tokenCount2.optional(),
1290
+ cacheReadTokens: tokenCount2.optional(),
1291
+ cacheWriteTokens: tokenCount2.optional(),
1292
+ totalTokens: tokenCount2.optional(),
1293
+ usageCount: z.number().int().nonnegative()
1294
+ });
1295
+ var ContextTokenComponent = z.object({
1296
+ componentId: z.string().min(1),
1297
+ kind: ContextTokenComponentKind,
1298
+ tokens: tokenCount2,
1299
+ source: TokenCountSource,
1300
+ confidence: TokenCountConfidence,
1301
+ label: z.string().optional(),
1302
+ messageId: z.string().optional(),
1303
+ role: z.string().optional(),
1304
+ action: z.string().optional(),
1305
+ kept: z.boolean().optional(),
1306
+ truncatedAtExecution: z.boolean().optional(),
1307
+ originalTokensEstimate: tokenCount2.optional(),
1308
+ droppedTokensEstimate: tokenCount2.optional()
1309
+ });
1310
+ var TokenLedgerEntryBase = z.object({
1311
+ id: z.string().min(1),
1312
+ runId: z.string().optional(),
1313
+ parentRunId: z.string().optional(),
1314
+ conversationId: z.string().optional(),
1315
+ turnId: z.string().optional(),
1316
+ stepId: z.string().optional(),
1317
+ route: TokenRoute.optional(),
1318
+ createdAt: z.number().int().nonnegative().optional()
1319
+ });
1320
+ var LlmUsageTokenLedgerEntry = TokenLedgerEntryBase.extend({
1321
+ kind: z.literal("llm-usage"),
1322
+ modelId: z.string().optional(),
1323
+ usage: CanonicalLlmUsage
1324
+ });
1325
+ var ContextComponentTokenLedgerEntry = TokenLedgerEntryBase.extend({
1326
+ kind: z.literal("context-component"),
1327
+ components: z.array(ContextTokenComponent),
1328
+ totalTokens: tokenCount2
1329
+ });
1330
+ var TokenLedgerEntry = z.discriminatedUnion("kind", [
1331
+ LlmUsageTokenLedgerEntry,
1332
+ ContextComponentTokenLedgerEntry
1333
+ ]);
1334
+ var TokenLedgerAggregate = z.object({
1335
+ llmUsage: TokenUsageTotals.optional(),
1336
+ contextTokens: tokenCount2,
1337
+ entryCount: z.number().int().nonnegative(),
1338
+ llmCallCount: z.number().int().nonnegative(),
1339
+ contextComponentCount: z.number().int().nonnegative()
1340
+ });
1341
+ var RunTokenUsageAggregate = z.object({
1342
+ /**
1343
+ * 父 run 自己产生的 usage;子 run 必须放到 children,避免展示或计费时重复相加。
1344
+ */
1345
+ own: TokenLedgerAggregate,
1346
+ children: TokenLedgerAggregate.optional()
1347
+ });
1348
+ var TokenCostComponent = z.enum([
1349
+ "input",
1350
+ "output",
1351
+ "reasoning",
1352
+ "cacheRead",
1353
+ "cacheWrite"
1354
+ ]);
1355
+ var TokenPricing = z.object({
1356
+ currency: z.string().min(1),
1357
+ unit: z.literal("per_1m_tokens"),
1358
+ input: tokenPrice.optional(),
1359
+ output: tokenPrice.optional(),
1360
+ reasoning: tokenPrice.optional(),
1361
+ cacheRead: tokenPrice.optional(),
1362
+ cacheWrite: tokenPrice.optional()
1363
+ });
1364
+ var CostBreakdown = z.object({
1365
+ status: z.enum(["computed", "unknown"]),
1366
+ currency: z.string().optional(),
1367
+ inputCost: tokenPrice.optional(),
1368
+ outputCost: tokenPrice.optional(),
1369
+ reasoningCost: tokenPrice.optional(),
1370
+ cacheReadCost: tokenPrice.optional(),
1371
+ cacheWriteCost: tokenPrice.optional(),
1372
+ totalCost: tokenPrice.optional(),
1373
+ missingPriceComponents: z.array(TokenCostComponent).optional()
1374
+ });
1375
+ var tokenCount3 = z.number().int().nonnegative();
1376
+ var actualCalibrationSource = z.enum([
1377
+ "provider-response-usage",
1378
+ "host-supplied",
1379
+ "test-fixture"
1380
+ ]);
1381
+ var TokenUsageCalibrationSample = z.object({
1382
+ route: TokenRoute,
1383
+ localEstimateTokens: tokenCount3,
1384
+ actualInputTokens: tokenCount3,
1385
+ source: actualCalibrationSource,
1386
+ confidence: z.literal("actual"),
1387
+ observedAt: z.number().int().nonnegative().optional(),
1388
+ runId: z.string().optional(),
1389
+ ledgerEntryId: z.string().optional()
1390
+ });
1391
+ var TokenUsageCalibrationTrace = z.object({
1392
+ enabled: z.boolean(),
1393
+ applied: z.boolean(),
1394
+ route: TokenRoute.optional(),
1395
+ sampleCount: z.number().int().nonnegative(),
1396
+ coefficient: z.number().positive().optional(),
1397
+ minSamples: z.number().int().positive().optional(),
1398
+ minCoefficient: z.number().positive().optional(),
1399
+ maxCoefficient: z.number().positive().optional(),
1400
+ localEstimateTokens: tokenCount3.optional(),
1401
+ calibratedEstimateTokens: tokenCount3.optional(),
1402
+ deltaTokens: z.number().int().optional(),
1403
+ sampleLedgerEntryIds: z.array(z.string()).optional()
1404
+ });
1405
+ var ContextBuildTokenEstimate = z.object({
1406
+ route: TokenRoute.optional(),
1407
+ localEstimateTokens: tokenCount3,
1408
+ calibratedEstimateTokens: tokenCount3,
1409
+ finalTokens: tokenCount3,
1410
+ source: z.literal("local-estimate"),
1411
+ confidence: z.literal("estimate")
1412
+ });
1211
1413
 
1212
- export { AUDIT_ACTIONS, AUDIT_DECISION_OUTCOMES, AgentCapability, AgentSpec, AgentSpecAuditConfig, AgentSpecBudgetPolicy, AgentSpecCheckpointPolicy, AgentSpecContextPolicy, AgentSpecContextTracePolicy, AgentSpecMessageType, AgentSpecModelHints, AgentSpecMustKeepPolicy, AgentSpecMustKeepTruncationRule, AgentSpecProviderReplayPolicy, AgentSpecReasoningRetentionPolicy, AgentSpecSummarizationPolicy, AgentSpecSystemReminderExtraRule, AgentSpecSystemReminderPolicy, AgentSpecSystemReminderTrigger, AgentSpecTokenEstimationPolicy, AgentSpecToolHistoryPolicy, AgentSpecToolObservationGovernancePolicy, AgentSpecToolOutputPolicy, AgentSpecWorkingMemoryPolicy, AgentTodoItem, AgentTodoStatus, AiMessage, AssistantMessage, AuditActor, AuditCostDelta, AuditDecision, AuditEnvelope, AuditEvidence, AuditScope, BaseEvent, BaseSSEEvent, DEFAULT_MAX_STEPS, EventEnvelope, ExecutionTraceContext, HistorySummaryMeta, ImageInfoMeta, PersistentMetadata, ProviderReasoningDetails, ProviderReasoningDetailsPayload, RuntimeEvent, SSEErrorEvent, SSEEvent, SSEFinalAnswerChunkEvent, SSEFinalAnswerEvent, SSEHistorySummaryEvent, SSEMarkdownChunkEvent, SSERequiresUserInteractionEvent, SSEStreamEndEvent, SSESubRunTraceEvent, SSESummarizationEndEvent, SSESummarizationErrorEvent, SSESummarizationStartEvent, SSEThoughtEvent, SSETodoUpdatedEvent, SSEToolCallDecisionEvent, SSEToolOutputEvent, SSEToolProcessEvent, SYSTEM_REMINDER_BUILTIN_TRIGGER_KINDS, Status, SystemMessage, TaskTrackingMeta, ToolBindingSpec, ToolCallDecisionPayload, ToolCallExtraContent, ToolCallPhase, ToolCallWire, ToolCallsMeta, ToolMessage, ToolOutputMeta, UserMessage, createAssistantMessage, createAuditEnvelopeEvent, createErrorEvent, createFinalAnswerChunkEvent, createFinalAnswerEvent, createHistorySummaryEvent, createHistorySummaryMessage, createSSEErrorEvent, createSSEFinalAnswerChunkEvent, createSSEFinalAnswerEvent, createSSEHistorySummaryEvent, createSSEMarkdownChunkEvent, createSSERequiresUserInteractionEvent, createSSEStreamEndEvent, createSSESubRunTraceEvent, createSSEThoughtEvent, createSSETodoUpdatedEvent, createSSEToolCallDecisionEvent, createSSEToolOutputEvent, createSSEToolProcessEvent, createStreamEndEvent, createSubRunTraceEvent, createSystemMessage, createThoughtEvent, createTodoUpdatedEvent, createToolCallDecisionEvent, createToolMessage, createToolOutputEvent, createToolProcessEvent, createUserInputEvent, createUserMessage, defineContextPolicy, hasToolCalls, isAssistantMessage, isHistorySummaryMessage, isSystemMessage, isToolMessage, isUserMessage, validateAiMessage, validateHistorySummaryMeta, validateRuntimeEvent, validateRuntimeEvents, validateSSEEvent };
1414
+ export { AUDIT_ACTIONS, AUDIT_DECISION_OUTCOMES, AgentCapability, AgentSpec, AgentSpecAuditConfig, AgentSpecBudgetPolicy, AgentSpecCheckpointPolicy, AgentSpecContextPolicy, AgentSpecContextTracePolicy, AgentSpecMessageType, AgentSpecModelHints, AgentSpecMustKeepPolicy, AgentSpecMustKeepTruncationRule, AgentSpecProviderReplayPolicy, AgentSpecReasoningRetentionPolicy, AgentSpecSummarizationPolicy, AgentSpecSystemReminderExtraRule, AgentSpecSystemReminderPolicy, AgentSpecSystemReminderTrigger, AgentSpecTokenEstimationPolicy, AgentSpecToolHistoryPolicy, AgentSpecToolObservationGovernancePolicy, AgentSpecToolOutputPolicy, AgentSpecWorkingMemoryPolicy, AgentTodoItem, AgentTodoStatus, AiMessage, AssistantMessage, AuditActor, AuditCostDelta, AuditDecision, AuditEnvelope, AuditEvidence, AuditScope, BaseEvent, BaseSSEEvent, CanonicalLlmUsage, ContextBuildTokenEstimate, ContextComponentTokenLedgerEntry, ContextTokenComponent, ContextTokenComponentKind, CostBreakdown, DEFAULT_MAX_STEPS, EventEnvelope, ExecutionTraceContext, HistorySummaryMeta, ImageInfoMeta, LlmUsageTokenLedgerEntry, ObservationTruncationMeta, PersistentMetadata, ProviderReasoningDetails, ProviderReasoningDetailsPayload, RunTokenUsageAggregate, RuntimeEvent, SSEErrorEvent, SSEEvent, SSEFinalAnswerChunkEvent, SSEFinalAnswerEvent, SSEHistorySummaryEvent, SSEMarkdownChunkEvent, SSERequiresUserInteractionEvent, SSEStreamEndEvent, SSESubRunTraceEvent, SSESummarizationEndEvent, SSESummarizationErrorEvent, SSESummarizationStartEvent, SSEThoughtEvent, SSETodoUpdatedEvent, SSEToolCallDecisionEvent, SSEToolOutputEvent, SSEToolProcessEvent, SYSTEM_REMINDER_BUILTIN_TRIGGER_KINDS, Status, SystemMessage, TaskTrackingMeta, TokenCostComponent, TokenCountConfidence, TokenCountSource, TokenLedgerAggregate, TokenLedgerEntry, TokenLedgerEntryKind, TokenPricing, TokenRoute, TokenRouteCapabilities, TokenUsageCalibrationSample, TokenUsageCalibrationTrace, TokenUsageTotals, ToolBindingSpec, ToolCallDecisionPayload, ToolCallExtraContent, ToolCallPhase, ToolCallWire, ToolCallsMeta, ToolMessage, ToolOutputMeta, UserMessage, createAssistantMessage, createAuditEnvelopeEvent, createErrorEvent, createFinalAnswerChunkEvent, createFinalAnswerEvent, createHistorySummaryEvent, createHistorySummaryMessage, createSSEErrorEvent, createSSEFinalAnswerChunkEvent, createSSEFinalAnswerEvent, createSSEHistorySummaryEvent, createSSEMarkdownChunkEvent, createSSERequiresUserInteractionEvent, createSSEStreamEndEvent, createSSESubRunTraceEvent, createSSEThoughtEvent, createSSETodoUpdatedEvent, createSSEToolCallDecisionEvent, createSSEToolOutputEvent, createSSEToolProcessEvent, createStreamEndEvent, createSubRunTraceEvent, createSystemMessage, createThoughtEvent, createTodoUpdatedEvent, createToolCallDecisionEvent, createToolMessage, createToolOutputEvent, createToolProcessEvent, createUserInputEvent, createUserMessage, defineContextPolicy, hasToolCalls, isAssistantMessage, isHistorySummaryMessage, isSystemMessage, isToolMessage, isUserMessage, validateAiMessage, validateHistorySummaryMeta, validateRuntimeEvent, validateRuntimeEvents, validateSSEEvent };
1213
1415
  //# sourceMappingURL=contracts.js.map
1214
1416
  //# sourceMappingURL=contracts.js.map