@linnlabs/linnkit 0.32.0 → 0.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/cli.cjs +35 -14
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +35 -14
- package/dist/cli.js.map +1 -1
- package/dist/context-manager/features/context-compaction/definitions/contextCheckpointFormat.d.cts +3 -0
- package/dist/context-manager/features/context-compaction/definitions/contextCheckpointFormat.d.ts +3 -0
- package/dist/context-manager/features/context-compaction/definitions/historySummaryDraft.d.cts +22 -0
- package/dist/context-manager/features/context-compaction/definitions/historySummaryDraft.d.ts +22 -0
- package/dist/context-manager/profiles/agent/config.d.cts +33 -0
- package/dist/context-manager/profiles/agent/config.d.ts +33 -0
- package/dist/context-manager/profiles/agent/context/AgentContextManager.d.cts +132 -0
- package/dist/context-manager/profiles/agent/context/AgentContextManager.d.ts +132 -0
- package/dist/context-manager/profiles/agent/context/ConversationSession.d.cts +131 -0
- package/dist/context-manager/profiles/agent/context/ConversationSession.d.ts +131 -0
- package/dist/context-manager/profiles/agent/context/config.d.cts +191 -0
- package/dist/context-manager/profiles/agent/context/config.d.ts +191 -0
- package/dist/context-manager/profiles/agent/context/index.d.cts +8 -0
- package/dist/context-manager/profiles/agent/context/index.d.ts +8 -0
- package/dist/context-manager/profiles/agent/context/providers/AgentCoreContextProvider.d.cts +52 -0
- package/dist/context-manager/profiles/agent/context/providers/AgentCoreContextProvider.d.ts +52 -0
- package/dist/context-manager/profiles/agent/context/providers/AgentWorkingMemoryProvider.d.cts +50 -0
- package/dist/context-manager/profiles/agent/context/providers/AgentWorkingMemoryProvider.d.ts +50 -0
- package/dist/context-manager/profiles/agent/context/providers/base.d.cts +11 -0
- package/dist/context-manager/profiles/agent/context/providers/base.d.ts +11 -0
- package/dist/context-manager/profiles/agent/context/providers/index.d.cts +12 -0
- package/dist/context-manager/profiles/agent/context/providers/index.d.ts +12 -0
- package/dist/context-manager/profiles/agent/contracts.d.cts +27 -0
- package/dist/context-manager/profiles/agent/contracts.d.ts +27 -0
- package/dist/context-manager/profiles/agent/orchestration/AgentMessageOrchestrator.d.cts +140 -0
- package/dist/context-manager/profiles/agent/orchestration/AgentMessageOrchestrator.d.ts +140 -0
- package/dist/context-manager/profiles/agent/orchestration/index.d.cts +1 -0
- package/dist/context-manager/profiles/agent/orchestration/index.d.ts +1 -0
- package/dist/context-manager/profiles/agent/preprocessors/base.d.cts +17 -0
- package/dist/context-manager/profiles/agent/preprocessors/base.d.ts +17 -0
- package/dist/context-manager/profiles/agent/preprocessors/index.d.cts +117 -0
- package/dist/context-manager/profiles/agent/preprocessors/index.d.ts +117 -0
- package/dist/context-manager/profiles/agent/preprocessors/toolHistoryCompressor.d.cts +47 -0
- package/dist/context-manager/profiles/agent/preprocessors/toolHistoryCompressor.d.ts +47 -0
- package/dist/context-manager/profiles/agent/preprocessors/toolReplayProtocolGuard.d.cts +27 -0
- package/dist/context-manager/profiles/agent/preprocessors/toolReplayProtocolGuard.d.ts +27 -0
- package/dist/context-manager/profiles/agent/tasks/BaseAgentTask.d.cts +43 -0
- package/dist/context-manager/profiles/agent/tasks/BaseAgentTask.d.ts +43 -0
- package/dist/context-manager/profiles/agent/tasks/base.d.cts +18 -0
- package/dist/context-manager/profiles/agent/tasks/base.d.ts +18 -0
- package/dist/context-manager/profiles/agent/tasks/index.d.cts +2 -0
- package/dist/context-manager/profiles/agent/tasks/index.d.ts +2 -0
- package/dist/context-manager/profiles/agent/tools/ToolManager.d.cts +27 -0
- package/dist/context-manager/profiles/agent/tools/ToolManager.d.ts +27 -0
- package/dist/context-manager/profiles/agent/tools/index.d.cts +1 -0
- package/dist/context-manager/profiles/agent/tools/index.d.ts +1 -0
- package/dist/context-manager/profiles/agent/utils/eventConverter.d.cts +15 -0
- package/dist/context-manager/profiles/agent/utils/eventConverter.d.ts +15 -0
- package/dist/context-manager/profiles/agent/utils/index.d.cts +2 -0
- package/dist/context-manager/profiles/agent/utils/index.d.ts +2 -0
- package/dist/context-manager/profiles/agent/utils/toolOutputSummarizer.d.cts +26 -0
- package/dist/context-manager/profiles/agent/utils/toolOutputSummarizer.d.ts +26 -0
- package/dist/context-manager/shared/MessageFormatter.d.cts +55 -0
- package/dist/context-manager/shared/MessageFormatter.d.ts +55 -0
- package/dist/context-manager/shared/agentSpecAdapter.d.cts +63 -0
- package/dist/context-manager/shared/agentSpecAdapter.d.ts +63 -0
- package/dist/context-manager/shared/context-manager-base.d.cts +102 -0
- package/dist/context-manager/shared/context-manager-base.d.ts +102 -0
- package/dist/context-manager/shared/context-pipeline.d.cts +42 -0
- package/dist/context-manager/shared/context-pipeline.d.ts +42 -0
- package/dist/context-manager/shared/context-trace.d.cts +102 -0
- package/dist/context-manager/shared/context-trace.d.ts +102 -0
- package/dist/context-manager/shared/contextPolicyMerge.d.cts +19 -0
- package/dist/context-manager/shared/contextPolicyMerge.d.ts +19 -0
- package/dist/context-manager/shared/contracts/chatLineMessage.d.cts +15 -0
- package/dist/context-manager/shared/contracts/chatLineMessage.d.ts +15 -0
- package/dist/context-manager/shared/fences/FenceRegistry.d.cts +24 -0
- package/dist/context-manager/shared/fences/FenceRegistry.d.ts +24 -0
- package/dist/context-manager/shared/image-input-estimation.d.cts +16 -0
- package/dist/context-manager/shared/image-input-estimation.d.ts +16 -0
- package/dist/context-manager/shared/policies/MustKeepPolicy.d.cts +19 -0
- package/dist/context-manager/shared/policies/MustKeepPolicy.d.ts +19 -0
- package/dist/context-manager/shared/preprocessors/base.d.cts +43 -0
- package/dist/context-manager/shared/preprocessors/base.d.ts +43 -0
- package/dist/context-manager/shared/preprocessors/currentTurnMessageAssembler.d.cts +26 -0
- package/dist/context-manager/shared/preprocessors/currentTurnMessageAssembler.d.ts +26 -0
- package/dist/context-manager/shared/preprocessors/fenceLifetimeManager.d.cts +18 -0
- package/dist/context-manager/shared/preprocessors/fenceLifetimeManager.d.ts +18 -0
- package/dist/context-manager/shared/preprocessors/historyPurification.d.cts +19 -0
- package/dist/context-manager/shared/preprocessors/historyPurification.d.ts +19 -0
- package/dist/context-manager/shared/preprocessors/priority.d.cts +17 -0
- package/dist/context-manager/shared/preprocessors/priority.d.ts +17 -0
- package/dist/context-manager/shared/providers/base.d.cts +106 -0
- package/dist/context-manager/shared/providers/base.d.ts +106 -0
- package/dist/context-manager/shared/providers/registry.d.cts +11 -0
- package/dist/context-manager/shared/providers/registry.d.ts +11 -0
- package/dist/context-manager/shared/token-calibration.d.cts +25 -0
- package/dist/context-manager/shared/token-calibration.d.ts +25 -0
- package/dist/context-manager.d.cts +34 -1559
- package/dist/context-manager.d.ts +34 -1559
- package/dist/contracts/agentSpec.d.cts +869 -0
- package/dist/contracts/agentSpec.d.ts +869 -0
- package/dist/{audit-XsNMTt0-.d.cts → contracts/audit.d.cts} +7 -7
- package/dist/{audit-XsNMTt0-.d.ts → contracts/audit.d.ts} +7 -7
- package/dist/contracts/constants.d.cts +3 -0
- package/dist/contracts/constants.d.ts +3 -0
- package/dist/contracts/contextCompaction.d.cts +43 -0
- package/dist/contracts/contextCompaction.d.ts +43 -0
- package/dist/contracts/contextPolicy.d.cts +1121 -0
- package/dist/contracts/contextPolicy.d.ts +1121 -0
- package/dist/{final-answer-B0_kx5_U.d.cts → contracts/events.d.cts} +422 -425
- package/dist/{final-answer-oOQ_7nPt.d.ts → contracts/events.d.ts} +422 -425
- package/dist/{execution-B7e01ZjW.d.cts → contracts/execution.d.cts} +13 -13
- package/dist/{execution-B7e01ZjW.d.ts → contracts/execution.d.ts} +13 -13
- package/dist/contracts/final-answer.d.cts +7 -0
- package/dist/contracts/final-answer.d.ts +7 -0
- package/dist/contracts/identity/definitions.d.cts +70 -0
- package/dist/contracts/identity/definitions.d.ts +70 -0
- package/dist/contracts/identity/generators.d.cts +33 -0
- package/dist/contracts/identity/generators.d.ts +33 -0
- package/dist/contracts/identity/invariants.d.cts +24 -0
- package/dist/contracts/identity/invariants.d.ts +24 -0
- package/dist/contracts/json.d.cts +12 -0
- package/dist/contracts/json.d.ts +12 -0
- package/dist/{provider-continuation-CTZdCB--.d.cts → contracts/messages.d.cts} +11 -758
- package/dist/{provider-continuation-CTZdCB--.d.ts → contracts/messages.d.ts} +11 -758
- package/dist/contracts/provider-continuation.d.cts +609 -0
- package/dist/contracts/provider-continuation.d.ts +609 -0
- package/dist/contracts/reasoning.d.cts +77 -0
- package/dist/contracts/reasoning.d.ts +77 -0
- package/dist/contracts/resource-ref.d.cts +73 -0
- package/dist/contracts/resource-ref.d.ts +73 -0
- package/dist/contracts/runtime-status.d.cts +8 -0
- package/dist/contracts/runtime-status.d.ts +8 -0
- package/dist/contracts/sse-framing.d.cts +28 -0
- package/dist/contracts/sse-framing.d.ts +28 -0
- package/dist/{index-Cp1_oUj0.d.ts → contracts/sse.d.cts} +455 -811
- package/dist/{index-JYf6n2Ik.d.cts → contracts/sse.d.ts} +455 -811
- package/dist/contracts/sub-run-trace-payload.d.cts +187 -0
- package/dist/contracts/sub-run-trace-payload.d.ts +187 -0
- package/dist/{summarization-CMMLhaCe.d.ts → contracts/summarization.d.cts} +2 -2
- package/dist/{summarization-kLeweZ5-.d.cts → contracts/summarization.d.ts} +2 -2
- package/dist/contracts/token-accounting.d.cts +1177 -0
- package/dist/contracts/token-accounting.d.ts +1177 -0
- package/dist/{token-calibration-GtFyMJtM.d.cts → contracts/token-calibration.d.cts} +1 -42
- package/dist/{token-calibration-GtFyMJtM.d.ts → contracts/token-calibration.d.ts} +1 -42
- package/dist/{reasoning-bffu9R2B.d.cts → contracts/token-usage.d.cts} +9 -84
- package/dist/{reasoning-bffu9R2B.d.ts → contracts/token-usage.d.ts} +9 -84
- package/dist/contracts.d.cts +24 -10
- package/dist/contracts.d.ts +24 -10
- package/dist/index.cjs +35 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -77
- package/dist/index.d.ts +14 -77
- package/dist/index.js +35 -14
- package/dist/index.js.map +1 -1
- package/dist/ports/agent-invocation.d.cts +42 -0
- package/dist/ports/agent-invocation.d.ts +42 -0
- package/dist/{audit-DnuOSwWE.d.ts → ports/audit.d.cts} +2 -2
- package/dist/{audit-C9LPbPib.d.cts → ports/audit.d.ts} +2 -2
- package/dist/ports/canonical-inference.d.cts +135 -0
- package/dist/ports/canonical-inference.d.ts +135 -0
- package/dist/ports/llm-call.d.cts +109 -0
- package/dist/ports/llm-call.d.ts +109 -0
- package/dist/ports/llm-input-materialization.d.cts +69 -0
- package/dist/ports/llm-input-materialization.d.ts +69 -0
- package/dist/{token-counter-BjiHQEJ-.d.ts → ports/token-counter.d.cts} +3 -3
- package/dist/{token-counter-DiGIoaq2.d.cts → ports/token-counter.d.ts} +3 -3
- package/dist/{tokenizer-yIFTTc-W.d.ts → ports/tokenizer.d.cts} +2 -2
- package/dist/{tokenizer-Dz5Y3KT0.d.cts → ports/tokenizer.d.ts} +2 -2
- package/dist/ports/tool-schema.d.cts +30 -0
- package/dist/ports/tool-schema.d.ts +30 -0
- package/dist/ports/usage-normalizer.d.cts +16 -0
- package/dist/ports/usage-normalizer.d.ts +16 -0
- package/dist/ports.d.cts +10 -9
- package/dist/ports.d.ts +10 -9
- package/dist/quickstart/defineAgent.d.cts +12 -0
- package/dist/quickstart/defineAgent.d.ts +12 -0
- package/dist/quickstart/defineConfig.d.cts +7 -0
- package/dist/quickstart/defineConfig.d.ts +7 -0
- package/dist/quickstart/runAgent.d.cts +12 -0
- package/dist/quickstart/runAgent.d.ts +12 -0
- package/dist/quickstart/toolRuntime.d.cts +14 -0
- package/dist/quickstart/toolRuntime.d.ts +14 -0
- package/dist/{runAgent-jxZ0uNto.d.ts → quickstart/types.d.cts} +10 -28
- package/dist/{runAgent-QiBiFXHR.d.cts → quickstart/types.d.ts} +10 -28
- package/dist/quickstart.cjs +35 -14
- package/dist/quickstart.cjs.map +1 -1
- package/dist/quickstart.d.cts +5 -23
- package/dist/quickstart.d.ts +5 -23
- package/dist/quickstart.js +35 -14
- package/dist/quickstart.js.map +1 -1
- package/dist/runtime-kernel/audit/compositeAudit.d.cts +23 -0
- package/dist/runtime-kernel/audit/compositeAudit.d.ts +23 -0
- package/dist/runtime-kernel/audit/consoleAudit.d.cts +10 -0
- package/dist/runtime-kernel/audit/consoleAudit.d.ts +10 -0
- package/dist/runtime-kernel/audit/emitAudit.d.cts +31 -0
- package/dist/runtime-kernel/audit/emitAudit.d.ts +31 -0
- package/dist/runtime-kernel/audit/eventStoreAudit.d.cts +27 -0
- package/dist/runtime-kernel/audit/eventStoreAudit.d.ts +27 -0
- package/dist/runtime-kernel/audit/fileAudit.d.cts +22 -0
- package/dist/runtime-kernel/audit/fileAudit.d.ts +22 -0
- package/dist/runtime-kernel/audit/index.d.cts +6 -0
- package/dist/runtime-kernel/audit/index.d.ts +6 -0
- package/dist/runtime-kernel/audit/noopAudit.d.cts +5 -0
- package/dist/runtime-kernel/audit/noopAudit.d.ts +5 -0
- package/dist/runtime-kernel/child-run-trace/childRunParentTraceProjection.d.cts +26 -0
- package/dist/runtime-kernel/child-run-trace/childRunParentTraceProjection.d.ts +26 -0
- package/dist/runtime-kernel/child-run-trace/index.d.cts +4 -0
- package/dist/runtime-kernel/child-run-trace/index.d.ts +4 -0
- package/dist/runtime-kernel/child-run-trace/projectChildRuntimeEventToSubRunTrace.d.cts +10 -0
- package/dist/runtime-kernel/child-run-trace/projectChildRuntimeEventToSubRunTrace.d.ts +10 -0
- package/dist/runtime-kernel/child-run-trace/runtimeEventSubRunTracePublisher.d.cts +47 -0
- package/dist/runtime-kernel/child-run-trace/runtimeEventSubRunTracePublisher.d.ts +47 -0
- package/dist/runtime-kernel/child-run-trace/subrunTrace.types.d.cts +81 -0
- package/dist/runtime-kernel/child-run-trace/subrunTrace.types.d.ts +81 -0
- package/dist/runtime-kernel/child-runs/childRunInvoker.d.cts +101 -0
- package/dist/runtime-kernel/child-runs/childRunInvoker.d.ts +101 -0
- package/dist/runtime-kernel/child-runs/historyPolicy.d.cts +9 -0
- package/dist/runtime-kernel/child-runs/historyPolicy.d.ts +9 -0
- package/dist/runtime-kernel/child-runs/index.d.cts +3 -0
- package/dist/runtime-kernel/child-runs/index.d.ts +3 -0
- package/dist/runtime-kernel/child-runs/types.d.cts +82 -0
- package/dist/runtime-kernel/child-runs/types.d.ts +82 -0
- package/dist/runtime-kernel/enrichment/index.d.cts +2 -0
- package/dist/runtime-kernel/enrichment/index.d.ts +2 -0
- package/dist/runtime-kernel/enrichment/registry.d.cts +25 -0
- package/dist/runtime-kernel/enrichment/registry.d.ts +25 -0
- package/dist/runtime-kernel/enrichment/types.d.cts +83 -0
- package/dist/runtime-kernel/enrichment/types.d.ts +83 -0
- package/dist/runtime-kernel/events/agent-to-runtime.d.cts +6 -0
- package/dist/runtime-kernel/events/agent-to-runtime.d.ts +6 -0
- package/dist/{agentEvents-yvamy9xt.d.cts → runtime-kernel/events/agentEvents.d.cts} +33 -32
- package/dist/{agentEvents-DhXdKeXD.d.ts → runtime-kernel/events/agentEvents.d.ts} +33 -32
- package/dist/runtime-kernel/events/eventGovernance.d.cts +47 -0
- package/dist/runtime-kernel/events/eventGovernance.d.ts +47 -0
- package/dist/runtime-kernel/events/eventMappers.d.cts +41 -0
- package/dist/runtime-kernel/events/eventMappers.d.ts +41 -0
- package/dist/runtime-kernel/events/finalAnswerAssembler.d.cts +27 -0
- package/dist/runtime-kernel/events/finalAnswerAssembler.d.ts +27 -0
- package/dist/runtime-kernel/events/finalAnswerCompletion.d.cts +6 -0
- package/dist/runtime-kernel/events/finalAnswerCompletion.d.ts +6 -0
- package/dist/runtime-kernel/events/provider-sidecar.d.cts +33 -0
- package/dist/runtime-kernel/events/provider-sidecar.d.ts +33 -0
- package/dist/runtime-kernel/events/runtime-to-ai-message.d.cts +14 -0
- package/dist/runtime-kernel/events/runtime-to-ai-message.d.ts +14 -0
- package/dist/runtime-kernel/events.d.cts +7 -5
- package/dist/runtime-kernel/events.d.ts +7 -5
- package/dist/runtime-kernel/execution/event-bus.d.cts +52 -0
- package/dist/runtime-kernel/execution/event-bus.d.ts +52 -0
- package/dist/runtime-kernel/execution/eventBusEventPersistence.d.cts +40 -0
- package/dist/runtime-kernel/execution/eventBusEventPersistence.d.ts +40 -0
- package/dist/runtime-kernel/execution/index.d.cts +5 -0
- package/dist/runtime-kernel/execution/index.d.ts +5 -0
- package/dist/runtime-kernel/execution/runtimeErrorEventFactory.d.cts +46 -0
- package/dist/runtime-kernel/execution/runtimeErrorEventFactory.d.ts +46 -0
- package/dist/runtime-kernel/execution/runtimeEventPublisher.d.cts +34 -0
- package/dist/runtime-kernel/execution/runtimeEventPublisher.d.ts +34 -0
- package/dist/runtime-kernel/execution/sequencer.d.cts +69 -0
- package/dist/runtime-kernel/execution/sequencer.d.ts +69 -0
- package/dist/runtime-kernel/graph-engine/checkpointer/base.d.cts +59 -0
- package/dist/runtime-kernel/graph-engine/checkpointer/base.d.ts +59 -0
- package/dist/runtime-kernel/graph-engine/checkpointer/memoryCheckpointer.d.cts +14 -0
- package/dist/runtime-kernel/graph-engine/checkpointer/memoryCheckpointer.d.ts +14 -0
- package/dist/runtime-kernel/graph-engine/definitions/primaryPromptCapacityError.d.cts +22 -0
- package/dist/runtime-kernel/graph-engine/definitions/primaryPromptCapacityError.d.ts +22 -0
- package/dist/runtime-kernel/graph-engine/engine.d.cts +64 -0
- package/dist/runtime-kernel/graph-engine/engine.d.ts +64 -0
- package/dist/runtime-kernel/graph-engine/event-store/base.d.cts +26 -0
- package/dist/runtime-kernel/graph-engine/event-store/base.d.ts +26 -0
- package/dist/runtime-kernel/graph-engine/event-store/memoryEventStore.d.cts +14 -0
- package/dist/runtime-kernel/graph-engine/event-store/memoryEventStore.d.ts +14 -0
- package/dist/runtime-kernel/graph-engine/executor.d.cts +59 -0
- package/dist/runtime-kernel/graph-engine/executor.d.ts +59 -0
- package/dist/runtime-kernel/graph-engine/executorContextBuilder.d.cts +104 -0
- package/dist/runtime-kernel/graph-engine/executorContextBuilder.d.ts +104 -0
- package/dist/runtime-kernel/graph-engine/functions/createHostToolCallBootstrap.d.cts +41 -0
- package/dist/runtime-kernel/graph-engine/functions/createHostToolCallBootstrap.d.ts +41 -0
- package/dist/runtime-kernel/graph-engine/functions/engineStateSnapshot.d.cts +23 -0
- package/dist/runtime-kernel/graph-engine/functions/engineStateSnapshot.d.ts +23 -0
- package/dist/runtime-kernel/graph-engine/functions/evaluatePrimaryPromptCapacity.d.cts +15 -0
- package/dist/runtime-kernel/graph-engine/functions/evaluatePrimaryPromptCapacity.d.ts +15 -0
- package/dist/runtime-kernel/graph-engine/functions/runtimeFailureFact.d.cts +7 -0
- package/dist/runtime-kernel/graph-engine/functions/runtimeFailureFact.d.ts +7 -0
- package/dist/runtime-kernel/graph-engine/index.d.cts +18 -0
- package/dist/runtime-kernel/graph-engine/index.d.ts +18 -0
- package/dist/runtime-kernel/graph-engine/nodes/llmNode.d.cts +26 -0
- package/dist/runtime-kernel/graph-engine/nodes/llmNode.d.ts +26 -0
- package/dist/runtime-kernel/graph-engine/nodes/llmNode.eventBridge.d.cts +6 -0
- package/dist/runtime-kernel/graph-engine/nodes/llmNode.eventBridge.d.ts +6 -0
- package/dist/runtime-kernel/graph-engine/nodes/toolNode.d.cts +44 -0
- package/dist/runtime-kernel/graph-engine/nodes/toolNode.d.ts +44 -0
- package/dist/runtime-kernel/graph-engine/nodes/userNode.d.cts +8 -0
- package/dist/runtime-kernel/graph-engine/nodes/userNode.d.ts +8 -0
- package/dist/runtime-kernel/graph-engine/nodes/waitUserNode.d.cts +15 -0
- package/dist/runtime-kernel/graph-engine/nodes/waitUserNode.d.ts +15 -0
- package/dist/runtime-kernel/graph-engine/tick-pipeline/types.d.cts +57 -0
- package/dist/runtime-kernel/graph-engine/tick-pipeline/types.d.ts +57 -0
- package/dist/runtime-kernel/graph-engine/types.d.cts +143 -0
- package/dist/runtime-kernel/graph-engine/types.d.ts +143 -0
- package/dist/runtime-kernel/llm/caller.d.cts +50 -0
- package/dist/runtime-kernel/llm/caller.d.ts +50 -0
- package/dist/runtime-kernel/llm/canonical-inference/definitions/canonicalInferenceStreamState.d.cts +28 -0
- package/dist/runtime-kernel/llm/canonical-inference/definitions/canonicalInferenceStreamState.d.ts +28 -0
- package/dist/runtime-kernel/llm/canonical-inference/functions/advanceCanonicalInferenceStreamState.d.cts +6 -0
- package/dist/runtime-kernel/llm/canonical-inference/functions/advanceCanonicalInferenceStreamState.d.ts +6 -0
- package/dist/runtime-kernel/llm/canonical-inference/orchestration/consumeCanonicalInferenceStream.d.cts +6 -0
- package/dist/runtime-kernel/llm/canonical-inference/orchestration/consumeCanonicalInferenceStream.d.ts +6 -0
- package/dist/runtime-kernel/llm/definitions/llmCallInvocationContext.d.cts +29 -0
- package/dist/runtime-kernel/llm/definitions/llmCallInvocationContext.d.ts +29 -0
- package/dist/runtime-kernel/llm/definitions/llmFallbackObserver.d.cts +26 -0
- package/dist/runtime-kernel/llm/definitions/llmFallbackObserver.d.ts +26 -0
- package/dist/runtime-kernel/llm/functions/evaluateFallbackPromptCapacity.d.cts +9 -0
- package/dist/runtime-kernel/llm/functions/evaluateFallbackPromptCapacity.d.ts +9 -0
- package/dist/runtime-kernel/llm/index.d.cts +22 -0
- package/dist/runtime-kernel/llm/index.d.ts +22 -0
- package/dist/runtime-kernel/llm/input-capabilities/definitions/modelInputCapability.d.cts +24 -0
- package/dist/runtime-kernel/llm/input-capabilities/definitions/modelInputCapability.d.ts +24 -0
- package/dist/runtime-kernel/llm/input-capabilities/definitions/modelInputCapabilityError.d.cts +31 -0
- package/dist/runtime-kernel/llm/input-capabilities/definitions/modelInputCapabilityError.d.ts +31 -0
- package/dist/runtime-kernel/llm/input-capabilities/functions/createModelInputCompatibilityError.d.cts +13 -0
- package/dist/runtime-kernel/llm/input-capabilities/functions/createModelInputCompatibilityError.d.ts +13 -0
- package/dist/runtime-kernel/llm/input-capabilities/functions/deriveModelInputRequirement.d.cts +6 -0
- package/dist/runtime-kernel/llm/input-capabilities/functions/deriveModelInputRequirement.d.ts +6 -0
- package/dist/runtime-kernel/llm/input-capabilities/functions/evaluateModelInputCompatibility.d.cts +7 -0
- package/dist/runtime-kernel/llm/input-capabilities/functions/evaluateModelInputCompatibility.d.ts +7 -0
- package/dist/runtime-kernel/llm/input-capabilities/orchestration/assertModelInputCompatibility.d.cts +10 -0
- package/dist/runtime-kernel/llm/input-capabilities/orchestration/assertModelInputCompatibility.d.ts +10 -0
- package/dist/runtime-kernel/llm/modelCatalog.d.cts +62 -0
- package/dist/runtime-kernel/llm/modelCatalog.d.ts +62 -0
- package/dist/runtime-kernel/llm/modelResolver.d.cts +40 -0
- package/dist/runtime-kernel/llm/modelResolver.d.ts +40 -0
- package/dist/runtime-kernel/llm/policies/defaultPolicyEngine.d.cts +15 -0
- package/dist/runtime-kernel/llm/policies/defaultPolicyEngine.d.ts +15 -0
- package/dist/runtime-kernel/llm/policies/policyEngine.d.cts +18 -0
- package/dist/runtime-kernel/llm/policies/policyEngine.d.ts +18 -0
- package/dist/runtime-kernel/llm/policies/types.d.cts +27 -0
- package/dist/runtime-kernel/llm/policies/types.d.ts +27 -0
- package/dist/runtime-kernel/llm/request-builder.d.cts +22 -0
- package/dist/runtime-kernel/llm/request-builder.d.ts +22 -0
- package/dist/runtime-kernel/llm/usage-telemetry.d.cts +17 -0
- package/dist/runtime-kernel/llm/usage-telemetry.d.ts +17 -0
- package/dist/runtime-kernel/run-context/index.d.cts +1 -0
- package/dist/runtime-kernel/run-context/index.d.ts +1 -0
- package/dist/runtime-kernel/run-context/types.d.cts +44 -0
- package/dist/runtime-kernel/run-context/types.d.ts +44 -0
- package/dist/runtime-kernel/run-supervisor/definitions/runSupervisorContracts.d.cts +131 -0
- package/dist/runtime-kernel/run-supervisor/definitions/runSupervisorContracts.d.ts +131 -0
- package/dist/runtime-kernel/run-supervisor/index.d.cts +6 -0
- package/dist/runtime-kernel/run-supervisor/index.d.ts +6 -0
- package/dist/runtime-kernel/run-supervisor/memoryRunRegistryStore.d.cts +15 -0
- package/dist/runtime-kernel/run-supervisor/memoryRunRegistryStore.d.ts +15 -0
- package/dist/runtime-kernel/run-supervisor/runErrors.d.cts +24 -0
- package/dist/runtime-kernel/run-supervisor/runErrors.d.ts +24 -0
- package/dist/runtime-kernel/run-supervisor/runHandle.d.cts +155 -0
- package/dist/runtime-kernel/run-supervisor/runHandle.d.ts +155 -0
- package/dist/runtime-kernel/run-supervisor/runRegistryStorePort.d.cts +47 -0
- package/dist/runtime-kernel/run-supervisor/runRegistryStorePort.d.ts +47 -0
- package/dist/runtime-kernel/run-supervisor/runSupervisor.d.cts +57 -0
- package/dist/runtime-kernel/run-supervisor/runSupervisor.d.ts +57 -0
- package/dist/runtime-kernel/system-reminder/apply.d.cts +38 -0
- package/dist/runtime-kernel/system-reminder/apply.d.ts +38 -0
- package/dist/runtime-kernel/system-reminder/helpers.d.cts +11 -0
- package/dist/runtime-kernel/system-reminder/helpers.d.ts +11 -0
- package/dist/runtime-kernel/system-reminder/index.d.cts +7 -0
- package/dist/runtime-kernel/system-reminder/index.d.ts +7 -0
- package/dist/runtime-kernel/system-reminder/registry.d.cts +17 -0
- package/dist/runtime-kernel/system-reminder/registry.d.ts +17 -0
- package/dist/runtime-kernel/system-reminder/rules.d.cts +20 -0
- package/dist/runtime-kernel/system-reminder/rules.d.ts +20 -0
- package/dist/runtime-kernel/system-reminder/templates.d.cts +10 -0
- package/dist/runtime-kernel/system-reminder/templates.d.ts +10 -0
- package/dist/runtime-kernel/system-reminder/triggers.d.cts +10 -0
- package/dist/runtime-kernel/system-reminder/triggers.d.ts +10 -0
- package/dist/runtime-kernel/system-reminder/types.d.cts +46 -0
- package/dist/runtime-kernel/system-reminder/types.d.ts +46 -0
- package/dist/runtime-kernel/telemetry/index.d.cts +3 -0
- package/dist/runtime-kernel/telemetry/index.d.ts +3 -0
- package/dist/runtime-kernel/telemetry/noopTelemetry.d.cts +5 -0
- package/dist/runtime-kernel/telemetry/noopTelemetry.d.ts +5 -0
- package/dist/runtime-kernel/telemetry/telemetryEvents.d.cts +5 -0
- package/dist/runtime-kernel/telemetry/telemetryEvents.d.ts +5 -0
- package/dist/runtime-kernel/telemetry/telemetryPort.d.cts +95 -0
- package/dist/runtime-kernel/telemetry/telemetryPort.d.ts +95 -0
- package/dist/runtime-kernel/testkit/defaultGraphExecutor.d.cts +23 -0
- package/dist/runtime-kernel/testkit/defaultGraphExecutor.d.ts +23 -0
- package/dist/runtime-kernel/testkit/graphLoopHarness.d.cts +49 -0
- package/dist/runtime-kernel/testkit/graphLoopHarness.d.ts +49 -0
- package/dist/runtime-kernel/token-accounting/functions.d.cts +27 -0
- package/dist/runtime-kernel/token-accounting/functions.d.ts +27 -0
- package/dist/runtime-kernel/token-accounting/index.d.cts +1 -0
- package/dist/runtime-kernel/token-accounting/index.d.ts +1 -0
- package/dist/runtime-kernel/tools/argNormalizer.d.cts +10 -0
- package/dist/runtime-kernel/tools/argNormalizer.d.ts +10 -0
- package/dist/runtime-kernel/tools/conversationView.d.cts +22 -0
- package/dist/runtime-kernel/tools/conversationView.d.ts +22 -0
- package/dist/runtime-kernel/tools/idempotency/toolIdempotency.d.cts +25 -0
- package/dist/runtime-kernel/tools/idempotency/toolIdempotency.d.ts +25 -0
- package/dist/runtime-kernel/tools/index.d.cts +15 -0
- package/dist/runtime-kernel/tools/index.d.ts +15 -0
- package/dist/runtime-kernel/tools/model-input/definitions/toolModelInput.d.cts +51 -0
- package/dist/runtime-kernel/tools/model-input/definitions/toolModelInput.d.ts +51 -0
- package/dist/runtime-kernel/tools/model-input/definitions/toolModelInputPolicy.d.cts +17 -0
- package/dist/runtime-kernel/tools/model-input/definitions/toolModelInputPolicy.d.ts +17 -0
- package/dist/runtime-kernel/tools/model-input/functions/parseToolModelInputDeclaration.d.cts +17 -0
- package/dist/runtime-kernel/tools/model-input/functions/parseToolModelInputDeclaration.d.ts +17 -0
- package/dist/runtime-kernel/tools/model-input/orchestration/resolveToolModelInput.d.cts +16 -0
- package/dist/runtime-kernel/tools/model-input/orchestration/resolveToolModelInput.d.ts +16 -0
- package/dist/runtime-kernel/tools/ports.d.cts +119 -0
- package/dist/runtime-kernel/tools/ports.d.ts +119 -0
- package/dist/runtime-kernel/tools/schema/functions/assertToolParameterSchema.d.cts +15 -0
- package/dist/runtime-kernel/tools/schema/functions/assertToolParameterSchema.d.ts +15 -0
- package/dist/runtime-kernel/tools/toolContextPatch.d.cts +14 -0
- package/dist/runtime-kernel/tools/toolContextPatch.d.ts +14 -0
- package/dist/runtime-kernel/tools/toolContextRuntime.d.cts +37 -0
- package/dist/runtime-kernel/tools/toolContextRuntime.d.ts +37 -0
- package/dist/runtime-kernel/tools/toolContracts.d.cts +109 -0
- package/dist/runtime-kernel/tools/toolContracts.d.ts +109 -0
- package/dist/runtime-kernel/tools/toolExecutionContext.d.cts +104 -0
- package/dist/runtime-kernel/tools/toolExecutionContext.d.ts +104 -0
- package/dist/runtime-kernel/tools/ui-types.d.cts +72 -0
- package/dist/runtime-kernel/tools/ui-types.d.ts +72 -0
- package/dist/runtime-kernel.cjs +35 -14
- package/dist/runtime-kernel.cjs.map +1 -1
- package/dist/runtime-kernel.d.cts +106 -20
- package/dist/runtime-kernel.d.ts +106 -20
- package/dist/runtime-kernel.js +35 -14
- package/dist/runtime-kernel.js.map +1 -1
- package/dist/shared/defaultTokenizerPort.d.cts +29 -0
- package/dist/shared/defaultTokenizerPort.d.ts +29 -0
- package/dist/shared/errorClassifier.d.cts +42 -0
- package/dist/shared/errorClassifier.d.ts +42 -0
- package/dist/shared/llmAuditProjection.d.cts +11 -0
- package/dist/shared/llmAuditProjection.d.ts +11 -0
- package/dist/shared/llmAuditRecorder.d.cts +44 -0
- package/dist/shared/llmAuditRecorder.d.ts +44 -0
- package/dist/shared/llmImageInputError.d.cts +34 -0
- package/dist/shared/llmImageInputError.d.ts +34 -0
- package/dist/shared/llmTelemetryContext.d.cts +52 -0
- package/dist/shared/llmTelemetryContext.d.ts +52 -0
- package/dist/shared/logger.d.cts +12 -0
- package/dist/shared/logger.d.ts +12 -0
- package/dist/{prompt-budget-yciFkC9U.d.cts → shared/prompt-budget.d.cts} +2 -1
- package/dist/{prompt-budget-yciFkC9U.d.ts → shared/prompt-budget.d.ts} +2 -1
- package/dist/testkit/agent-harness/assertions.d.cts +10 -0
- package/dist/testkit/agent-harness/assertions.d.ts +10 -0
- package/dist/testkit/agent-harness/scriptedInferenceHarness.d.cts +52 -0
- package/dist/testkit/agent-harness/scriptedInferenceHarness.d.ts +52 -0
- package/dist/testkit/context-harness/invariants/index.d.cts +7 -0
- package/dist/testkit/context-harness/invariants/index.d.ts +7 -0
- package/dist/testkit/context-harness/invariants/types.d.cts +32 -0
- package/dist/testkit/context-harness/invariants/types.d.ts +32 -0
- package/dist/testkit/context-harness/replayHarness.d.cts +18 -0
- package/dist/testkit/context-harness/replayHarness.d.ts +18 -0
- package/dist/testkit/mocks/tokenizerPort.d.cts +17 -0
- package/dist/testkit/mocks/tokenizerPort.d.ts +17 -0
- package/dist/testkit/run-harness/collectingAuditPort.d.cts +21 -0
- package/dist/testkit/run-harness/collectingAuditPort.d.ts +21 -0
- package/dist/testkit/run-harness/invariants/index.d.cts +7 -0
- package/dist/testkit/run-harness/invariants/index.d.ts +7 -0
- package/dist/testkit/run-harness/invariants/types.d.cts +48 -0
- package/dist/testkit/run-harness/invariants/types.d.ts +48 -0
- package/dist/testkit/run-harness/mockTelemetryPort.d.cts +35 -0
- package/dist/testkit/run-harness/mockTelemetryPort.d.ts +35 -0
- package/dist/testkit/run-harness/runSupervisorHarness.d.cts +60 -0
- package/dist/testkit/run-harness/runSupervisorHarness.d.ts +60 -0
- package/dist/testkit/tool-fixtures/toolContext.d.cts +19 -0
- package/dist/testkit/tool-fixtures/toolContext.d.ts +19 -0
- package/dist/testkit.cjs +35 -14
- package/dist/testkit.cjs.map +1 -1
- package/dist/testkit.d.cts +17 -277
- package/dist/testkit.d.ts +17 -277
- package/dist/testkit.js +35 -14
- package/dist/testkit.js.map +1 -1
- package/package.json +6 -4
- package/dist/base-DRRrRhxS.d.cts +0 -216
- package/dist/base-DVyQIl_d.d.ts +0 -216
- package/dist/defaultGraphExecutor-Chr16eYO.d.cts +0 -914
- package/dist/defaultGraphExecutor-hT7dchpC.d.ts +0 -914
- package/dist/index-1pE6gSpV.d.cts +0 -172
- package/dist/index-C2PSqU1I.d.cts +0 -1971
- package/dist/index-CZMXtw4h.d.ts +0 -1971
- package/dist/index-D_csW7Zl.d.ts +0 -172
- package/dist/index-DpSWZ1L6.d.ts +0 -67
- package/dist/index-oCM3XEu2.d.cts +0 -67
- package/dist/llm-input-materialization-Vce5Swvc.d.ts +0 -366
- package/dist/llm-input-materialization-r-V3n9U-.d.cts +0 -366
- package/dist/runHandle--l0kE205.d.cts +0 -490
- package/dist/runHandle-ouLd6Tgp.d.ts +0 -490
- package/dist/token-accounting-19cXG7hM.d.cts +0 -3342
- package/dist/token-accounting-CVW37Uri.d.ts +0 -3342
- package/dist/toolContracts--KrHHNCY.d.cts +0 -424
- package/dist/toolContracts-BQ4kIso_.d.ts +0 -424
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { SerializableJsonValue } from '../../contracts/json.cjs';
|
|
3
3
|
|
|
4
4
|
declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
5
5
|
timestamp: z.ZodNumber;
|
|
@@ -17,18 +17,18 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
17
17
|
content: string;
|
|
18
18
|
timestamp: number;
|
|
19
19
|
is_complete: boolean;
|
|
20
|
+
thought_message_id?: string | undefined;
|
|
20
21
|
delta?: string | undefined;
|
|
21
22
|
meta?: Record<string, unknown> | undefined;
|
|
22
|
-
thought_message_id?: string | undefined;
|
|
23
23
|
}, {
|
|
24
24
|
id: string;
|
|
25
25
|
type: "thought";
|
|
26
26
|
content: string;
|
|
27
27
|
timestamp: number;
|
|
28
28
|
is_complete: boolean;
|
|
29
|
+
thought_message_id?: string | undefined;
|
|
29
30
|
delta?: string | undefined;
|
|
30
31
|
meta?: Record<string, unknown> | undefined;
|
|
31
|
-
thought_message_id?: string | undefined;
|
|
32
32
|
}>, z.ZodObject<{
|
|
33
33
|
timestamp: z.ZodNumber;
|
|
34
34
|
id: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -329,6 +329,7 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
329
329
|
}[] | undefined;
|
|
330
330
|
}>]>, "many">>;
|
|
331
331
|
}, "strict", z.ZodTypeAny, {
|
|
332
|
+
tool_calls?: unknown[] | undefined;
|
|
332
333
|
provider_continuations?: {
|
|
333
334
|
kind: string;
|
|
334
335
|
schema_version: 2;
|
|
@@ -341,7 +342,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
341
342
|
};
|
|
342
343
|
payload: SerializableJsonValue;
|
|
343
344
|
}[] | undefined;
|
|
344
|
-
tool_calls?: unknown[] | undefined;
|
|
345
345
|
assistant_replay_parts?: ({
|
|
346
346
|
type: "text";
|
|
347
347
|
text: string;
|
|
@@ -390,6 +390,7 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
390
390
|
})[] | undefined;
|
|
391
391
|
args?: Record<string, unknown> | undefined;
|
|
392
392
|
}, {
|
|
393
|
+
tool_calls?: unknown[] | undefined;
|
|
393
394
|
provider_continuations?: {
|
|
394
395
|
kind: string;
|
|
395
396
|
schema_version: 2;
|
|
@@ -402,7 +403,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
402
403
|
};
|
|
403
404
|
payload: SerializableJsonValue;
|
|
404
405
|
}[] | undefined;
|
|
405
|
-
tool_calls?: unknown[] | undefined;
|
|
406
406
|
assistant_replay_parts?: ({
|
|
407
407
|
type: "text";
|
|
408
408
|
text: string;
|
|
@@ -460,7 +460,9 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
460
460
|
timestamp: number;
|
|
461
461
|
phase: "error" | "start" | "update" | "complete";
|
|
462
462
|
tool_args: Record<string, unknown>;
|
|
463
|
+
tool_calls?: unknown[] | undefined;
|
|
463
464
|
payload?: {
|
|
465
|
+
tool_calls?: unknown[] | undefined;
|
|
464
466
|
provider_continuations?: {
|
|
465
467
|
kind: string;
|
|
466
468
|
schema_version: 2;
|
|
@@ -473,7 +475,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
473
475
|
};
|
|
474
476
|
payload: SerializableJsonValue;
|
|
475
477
|
}[] | undefined;
|
|
476
|
-
tool_calls?: unknown[] | undefined;
|
|
477
478
|
assistant_replay_parts?: ({
|
|
478
479
|
type: "text";
|
|
479
480
|
text: string;
|
|
@@ -522,7 +523,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
522
523
|
})[] | undefined;
|
|
523
524
|
args?: Record<string, unknown> | undefined;
|
|
524
525
|
} | undefined;
|
|
525
|
-
tool_calls?: unknown[] | undefined;
|
|
526
526
|
meta?: Record<string, unknown> | undefined;
|
|
527
527
|
}, {
|
|
528
528
|
id: string;
|
|
@@ -533,7 +533,9 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
533
533
|
timestamp: number;
|
|
534
534
|
phase: "error" | "start" | "update" | "complete";
|
|
535
535
|
tool_args: Record<string, unknown>;
|
|
536
|
+
tool_calls?: unknown[] | undefined;
|
|
536
537
|
payload?: {
|
|
538
|
+
tool_calls?: unknown[] | undefined;
|
|
537
539
|
provider_continuations?: {
|
|
538
540
|
kind: string;
|
|
539
541
|
schema_version: 2;
|
|
@@ -546,7 +548,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
546
548
|
};
|
|
547
549
|
payload: SerializableJsonValue;
|
|
548
550
|
}[] | undefined;
|
|
549
|
-
tool_calls?: unknown[] | undefined;
|
|
550
551
|
assistant_replay_parts?: ({
|
|
551
552
|
type: "text";
|
|
552
553
|
text: string;
|
|
@@ -595,7 +596,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
595
596
|
})[] | undefined;
|
|
596
597
|
args?: Record<string, unknown> | undefined;
|
|
597
598
|
} | undefined;
|
|
598
|
-
tool_calls?: unknown[] | undefined;
|
|
599
599
|
meta?: Record<string, unknown> | undefined;
|
|
600
600
|
}>, z.ZodObject<{
|
|
601
601
|
timestamp: z.ZodNumber;
|
|
@@ -619,8 +619,8 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
619
619
|
timestamp: number;
|
|
620
620
|
phase: "error" | "start" | "update" | "complete";
|
|
621
621
|
tool_args: Record<string, unknown>;
|
|
622
|
-
payload?: Record<string, unknown> | undefined;
|
|
623
622
|
tool_calls?: unknown[] | undefined;
|
|
623
|
+
payload?: Record<string, unknown> | undefined;
|
|
624
624
|
meta?: Record<string, unknown> | undefined;
|
|
625
625
|
}, {
|
|
626
626
|
id: string;
|
|
@@ -631,8 +631,8 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
631
631
|
timestamp: number;
|
|
632
632
|
phase: "error" | "start" | "update" | "complete";
|
|
633
633
|
tool_args: Record<string, unknown>;
|
|
634
|
-
payload?: Record<string, unknown> | undefined;
|
|
635
634
|
tool_calls?: unknown[] | undefined;
|
|
635
|
+
payload?: Record<string, unknown> | undefined;
|
|
636
636
|
meta?: Record<string, unknown> | undefined;
|
|
637
637
|
}>, z.ZodObject<{
|
|
638
638
|
timestamp: z.ZodNumber;
|
|
@@ -703,8 +703,8 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
703
703
|
fileName?: string | undefined;
|
|
704
704
|
label?: string | undefined;
|
|
705
705
|
}[] | undefined;
|
|
706
|
-
duration_ms?: number | undefined;
|
|
707
706
|
error_code?: string | undefined;
|
|
707
|
+
duration_ms?: number | undefined;
|
|
708
708
|
}, {
|
|
709
709
|
id: string;
|
|
710
710
|
type: "observation";
|
|
@@ -727,8 +727,8 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
727
727
|
fileName?: string | undefined;
|
|
728
728
|
label?: string | undefined;
|
|
729
729
|
}[] | undefined;
|
|
730
|
-
duration_ms?: number | undefined;
|
|
731
730
|
error_code?: string | undefined;
|
|
731
|
+
duration_ms?: number | undefined;
|
|
732
732
|
}>, z.ZodObject<{
|
|
733
733
|
timestamp: z.ZodNumber;
|
|
734
734
|
id: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -1025,10 +1025,10 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1025
1025
|
}, "strict", z.ZodTypeAny, {
|
|
1026
1026
|
id: string;
|
|
1027
1027
|
type: "final_answer";
|
|
1028
|
-
|
|
1029
|
-
completion_reason: "terminal" | "tool_call" | "interrupted";
|
|
1028
|
+
completion_reason: "tool_call" | "terminal" | "interrupted";
|
|
1030
1029
|
timestamp: number;
|
|
1031
1030
|
answer_id: string;
|
|
1031
|
+
answer: string;
|
|
1032
1032
|
provider_continuations?: {
|
|
1033
1033
|
kind: string;
|
|
1034
1034
|
schema_version: 2;
|
|
@@ -1091,10 +1091,10 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1091
1091
|
}, {
|
|
1092
1092
|
id: string;
|
|
1093
1093
|
type: "final_answer";
|
|
1094
|
-
|
|
1095
|
-
completion_reason: "terminal" | "tool_call" | "interrupted";
|
|
1094
|
+
completion_reason: "tool_call" | "terminal" | "interrupted";
|
|
1096
1095
|
timestamp: number;
|
|
1097
1096
|
answer_id: string;
|
|
1097
|
+
answer: string;
|
|
1098
1098
|
provider_continuations?: {
|
|
1099
1099
|
kind: string;
|
|
1100
1100
|
schema_version: 2;
|
|
@@ -1312,9 +1312,9 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1312
1312
|
content: string;
|
|
1313
1313
|
timestamp: number;
|
|
1314
1314
|
is_complete: boolean;
|
|
1315
|
+
thought_message_id?: string | undefined;
|
|
1315
1316
|
delta?: string | undefined;
|
|
1316
1317
|
meta?: Record<string, unknown> | undefined;
|
|
1317
|
-
thought_message_id?: string | undefined;
|
|
1318
1318
|
} | {
|
|
1319
1319
|
id: string;
|
|
1320
1320
|
status: "error" | "loading" | "success";
|
|
@@ -1324,7 +1324,9 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1324
1324
|
timestamp: number;
|
|
1325
1325
|
phase: "error" | "start" | "update" | "complete";
|
|
1326
1326
|
tool_args: Record<string, unknown>;
|
|
1327
|
+
tool_calls?: unknown[] | undefined;
|
|
1327
1328
|
payload?: {
|
|
1329
|
+
tool_calls?: unknown[] | undefined;
|
|
1328
1330
|
provider_continuations?: {
|
|
1329
1331
|
kind: string;
|
|
1330
1332
|
schema_version: 2;
|
|
@@ -1337,7 +1339,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1337
1339
|
};
|
|
1338
1340
|
payload: SerializableJsonValue;
|
|
1339
1341
|
}[] | undefined;
|
|
1340
|
-
tool_calls?: unknown[] | undefined;
|
|
1341
1342
|
assistant_replay_parts?: ({
|
|
1342
1343
|
type: "text";
|
|
1343
1344
|
text: string;
|
|
@@ -1386,7 +1387,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1386
1387
|
})[] | undefined;
|
|
1387
1388
|
args?: Record<string, unknown> | undefined;
|
|
1388
1389
|
} | undefined;
|
|
1389
|
-
tool_calls?: unknown[] | undefined;
|
|
1390
1390
|
meta?: Record<string, unknown> | undefined;
|
|
1391
1391
|
} | {
|
|
1392
1392
|
id: string;
|
|
@@ -1397,8 +1397,8 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1397
1397
|
timestamp: number;
|
|
1398
1398
|
phase: "error" | "start" | "update" | "complete";
|
|
1399
1399
|
tool_args: Record<string, unknown>;
|
|
1400
|
-
payload?: Record<string, unknown> | undefined;
|
|
1401
1400
|
tool_calls?: unknown[] | undefined;
|
|
1401
|
+
payload?: Record<string, unknown> | undefined;
|
|
1402
1402
|
meta?: Record<string, unknown> | undefined;
|
|
1403
1403
|
} | {
|
|
1404
1404
|
id: string;
|
|
@@ -1422,15 +1422,15 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1422
1422
|
fileName?: string | undefined;
|
|
1423
1423
|
label?: string | undefined;
|
|
1424
1424
|
}[] | undefined;
|
|
1425
|
-
duration_ms?: number | undefined;
|
|
1426
1425
|
error_code?: string | undefined;
|
|
1426
|
+
duration_ms?: number | undefined;
|
|
1427
1427
|
} | {
|
|
1428
1428
|
id: string;
|
|
1429
1429
|
type: "final_answer";
|
|
1430
|
-
|
|
1431
|
-
completion_reason: "terminal" | "tool_call" | "interrupted";
|
|
1430
|
+
completion_reason: "tool_call" | "terminal" | "interrupted";
|
|
1432
1431
|
timestamp: number;
|
|
1433
1432
|
answer_id: string;
|
|
1433
|
+
answer: string;
|
|
1434
1434
|
provider_continuations?: {
|
|
1435
1435
|
kind: string;
|
|
1436
1436
|
schema_version: 2;
|
|
@@ -1534,9 +1534,9 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1534
1534
|
content: string;
|
|
1535
1535
|
timestamp: number;
|
|
1536
1536
|
is_complete: boolean;
|
|
1537
|
+
thought_message_id?: string | undefined;
|
|
1537
1538
|
delta?: string | undefined;
|
|
1538
1539
|
meta?: Record<string, unknown> | undefined;
|
|
1539
|
-
thought_message_id?: string | undefined;
|
|
1540
1540
|
} | {
|
|
1541
1541
|
id: string;
|
|
1542
1542
|
status: "error" | "loading" | "success";
|
|
@@ -1546,7 +1546,9 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1546
1546
|
timestamp: number;
|
|
1547
1547
|
phase: "error" | "start" | "update" | "complete";
|
|
1548
1548
|
tool_args: Record<string, unknown>;
|
|
1549
|
+
tool_calls?: unknown[] | undefined;
|
|
1549
1550
|
payload?: {
|
|
1551
|
+
tool_calls?: unknown[] | undefined;
|
|
1550
1552
|
provider_continuations?: {
|
|
1551
1553
|
kind: string;
|
|
1552
1554
|
schema_version: 2;
|
|
@@ -1559,7 +1561,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1559
1561
|
};
|
|
1560
1562
|
payload: SerializableJsonValue;
|
|
1561
1563
|
}[] | undefined;
|
|
1562
|
-
tool_calls?: unknown[] | undefined;
|
|
1563
1564
|
assistant_replay_parts?: ({
|
|
1564
1565
|
type: "text";
|
|
1565
1566
|
text: string;
|
|
@@ -1608,7 +1609,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1608
1609
|
})[] | undefined;
|
|
1609
1610
|
args?: Record<string, unknown> | undefined;
|
|
1610
1611
|
} | undefined;
|
|
1611
|
-
tool_calls?: unknown[] | undefined;
|
|
1612
1612
|
meta?: Record<string, unknown> | undefined;
|
|
1613
1613
|
} | {
|
|
1614
1614
|
id: string;
|
|
@@ -1619,8 +1619,8 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1619
1619
|
timestamp: number;
|
|
1620
1620
|
phase: "error" | "start" | "update" | "complete";
|
|
1621
1621
|
tool_args: Record<string, unknown>;
|
|
1622
|
-
payload?: Record<string, unknown> | undefined;
|
|
1623
1622
|
tool_calls?: unknown[] | undefined;
|
|
1623
|
+
payload?: Record<string, unknown> | undefined;
|
|
1624
1624
|
meta?: Record<string, unknown> | undefined;
|
|
1625
1625
|
} | {
|
|
1626
1626
|
id: string;
|
|
@@ -1644,15 +1644,15 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1644
1644
|
fileName?: string | undefined;
|
|
1645
1645
|
label?: string | undefined;
|
|
1646
1646
|
}[] | undefined;
|
|
1647
|
-
duration_ms?: number | undefined;
|
|
1648
1647
|
error_code?: string | undefined;
|
|
1648
|
+
duration_ms?: number | undefined;
|
|
1649
1649
|
} | {
|
|
1650
1650
|
id: string;
|
|
1651
1651
|
type: "final_answer";
|
|
1652
|
-
|
|
1653
|
-
completion_reason: "terminal" | "tool_call" | "interrupted";
|
|
1652
|
+
completion_reason: "tool_call" | "terminal" | "interrupted";
|
|
1654
1653
|
timestamp: number;
|
|
1655
1654
|
answer_id: string;
|
|
1655
|
+
answer: string;
|
|
1656
1656
|
provider_continuations?: {
|
|
1657
1657
|
kind: string;
|
|
1658
1658
|
schema_version: 2;
|
|
@@ -1754,4 +1754,5 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1754
1754
|
type AgentEvent = z.infer<typeof AgentEventSchema>;
|
|
1755
1755
|
type AnyAgentEvent = AgentEvent;
|
|
1756
1756
|
|
|
1757
|
-
export
|
|
1757
|
+
export { AgentEventSchema };
|
|
1758
|
+
export type { AgentEvent, AnyAgentEvent };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { SerializableJsonValue } from '../../contracts/json.js';
|
|
3
3
|
|
|
4
4
|
declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
5
5
|
timestamp: z.ZodNumber;
|
|
@@ -17,18 +17,18 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
17
17
|
content: string;
|
|
18
18
|
timestamp: number;
|
|
19
19
|
is_complete: boolean;
|
|
20
|
+
thought_message_id?: string | undefined;
|
|
20
21
|
delta?: string | undefined;
|
|
21
22
|
meta?: Record<string, unknown> | undefined;
|
|
22
|
-
thought_message_id?: string | undefined;
|
|
23
23
|
}, {
|
|
24
24
|
id: string;
|
|
25
25
|
type: "thought";
|
|
26
26
|
content: string;
|
|
27
27
|
timestamp: number;
|
|
28
28
|
is_complete: boolean;
|
|
29
|
+
thought_message_id?: string | undefined;
|
|
29
30
|
delta?: string | undefined;
|
|
30
31
|
meta?: Record<string, unknown> | undefined;
|
|
31
|
-
thought_message_id?: string | undefined;
|
|
32
32
|
}>, z.ZodObject<{
|
|
33
33
|
timestamp: z.ZodNumber;
|
|
34
34
|
id: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -329,6 +329,7 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
329
329
|
}[] | undefined;
|
|
330
330
|
}>]>, "many">>;
|
|
331
331
|
}, "strict", z.ZodTypeAny, {
|
|
332
|
+
tool_calls?: unknown[] | undefined;
|
|
332
333
|
provider_continuations?: {
|
|
333
334
|
kind: string;
|
|
334
335
|
schema_version: 2;
|
|
@@ -341,7 +342,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
341
342
|
};
|
|
342
343
|
payload: SerializableJsonValue;
|
|
343
344
|
}[] | undefined;
|
|
344
|
-
tool_calls?: unknown[] | undefined;
|
|
345
345
|
assistant_replay_parts?: ({
|
|
346
346
|
type: "text";
|
|
347
347
|
text: string;
|
|
@@ -390,6 +390,7 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
390
390
|
})[] | undefined;
|
|
391
391
|
args?: Record<string, unknown> | undefined;
|
|
392
392
|
}, {
|
|
393
|
+
tool_calls?: unknown[] | undefined;
|
|
393
394
|
provider_continuations?: {
|
|
394
395
|
kind: string;
|
|
395
396
|
schema_version: 2;
|
|
@@ -402,7 +403,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
402
403
|
};
|
|
403
404
|
payload: SerializableJsonValue;
|
|
404
405
|
}[] | undefined;
|
|
405
|
-
tool_calls?: unknown[] | undefined;
|
|
406
406
|
assistant_replay_parts?: ({
|
|
407
407
|
type: "text";
|
|
408
408
|
text: string;
|
|
@@ -460,7 +460,9 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
460
460
|
timestamp: number;
|
|
461
461
|
phase: "error" | "start" | "update" | "complete";
|
|
462
462
|
tool_args: Record<string, unknown>;
|
|
463
|
+
tool_calls?: unknown[] | undefined;
|
|
463
464
|
payload?: {
|
|
465
|
+
tool_calls?: unknown[] | undefined;
|
|
464
466
|
provider_continuations?: {
|
|
465
467
|
kind: string;
|
|
466
468
|
schema_version: 2;
|
|
@@ -473,7 +475,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
473
475
|
};
|
|
474
476
|
payload: SerializableJsonValue;
|
|
475
477
|
}[] | undefined;
|
|
476
|
-
tool_calls?: unknown[] | undefined;
|
|
477
478
|
assistant_replay_parts?: ({
|
|
478
479
|
type: "text";
|
|
479
480
|
text: string;
|
|
@@ -522,7 +523,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
522
523
|
})[] | undefined;
|
|
523
524
|
args?: Record<string, unknown> | undefined;
|
|
524
525
|
} | undefined;
|
|
525
|
-
tool_calls?: unknown[] | undefined;
|
|
526
526
|
meta?: Record<string, unknown> | undefined;
|
|
527
527
|
}, {
|
|
528
528
|
id: string;
|
|
@@ -533,7 +533,9 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
533
533
|
timestamp: number;
|
|
534
534
|
phase: "error" | "start" | "update" | "complete";
|
|
535
535
|
tool_args: Record<string, unknown>;
|
|
536
|
+
tool_calls?: unknown[] | undefined;
|
|
536
537
|
payload?: {
|
|
538
|
+
tool_calls?: unknown[] | undefined;
|
|
537
539
|
provider_continuations?: {
|
|
538
540
|
kind: string;
|
|
539
541
|
schema_version: 2;
|
|
@@ -546,7 +548,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
546
548
|
};
|
|
547
549
|
payload: SerializableJsonValue;
|
|
548
550
|
}[] | undefined;
|
|
549
|
-
tool_calls?: unknown[] | undefined;
|
|
550
551
|
assistant_replay_parts?: ({
|
|
551
552
|
type: "text";
|
|
552
553
|
text: string;
|
|
@@ -595,7 +596,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
595
596
|
})[] | undefined;
|
|
596
597
|
args?: Record<string, unknown> | undefined;
|
|
597
598
|
} | undefined;
|
|
598
|
-
tool_calls?: unknown[] | undefined;
|
|
599
599
|
meta?: Record<string, unknown> | undefined;
|
|
600
600
|
}>, z.ZodObject<{
|
|
601
601
|
timestamp: z.ZodNumber;
|
|
@@ -619,8 +619,8 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
619
619
|
timestamp: number;
|
|
620
620
|
phase: "error" | "start" | "update" | "complete";
|
|
621
621
|
tool_args: Record<string, unknown>;
|
|
622
|
-
payload?: Record<string, unknown> | undefined;
|
|
623
622
|
tool_calls?: unknown[] | undefined;
|
|
623
|
+
payload?: Record<string, unknown> | undefined;
|
|
624
624
|
meta?: Record<string, unknown> | undefined;
|
|
625
625
|
}, {
|
|
626
626
|
id: string;
|
|
@@ -631,8 +631,8 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
631
631
|
timestamp: number;
|
|
632
632
|
phase: "error" | "start" | "update" | "complete";
|
|
633
633
|
tool_args: Record<string, unknown>;
|
|
634
|
-
payload?: Record<string, unknown> | undefined;
|
|
635
634
|
tool_calls?: unknown[] | undefined;
|
|
635
|
+
payload?: Record<string, unknown> | undefined;
|
|
636
636
|
meta?: Record<string, unknown> | undefined;
|
|
637
637
|
}>, z.ZodObject<{
|
|
638
638
|
timestamp: z.ZodNumber;
|
|
@@ -703,8 +703,8 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
703
703
|
fileName?: string | undefined;
|
|
704
704
|
label?: string | undefined;
|
|
705
705
|
}[] | undefined;
|
|
706
|
-
duration_ms?: number | undefined;
|
|
707
706
|
error_code?: string | undefined;
|
|
707
|
+
duration_ms?: number | undefined;
|
|
708
708
|
}, {
|
|
709
709
|
id: string;
|
|
710
710
|
type: "observation";
|
|
@@ -727,8 +727,8 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
727
727
|
fileName?: string | undefined;
|
|
728
728
|
label?: string | undefined;
|
|
729
729
|
}[] | undefined;
|
|
730
|
-
duration_ms?: number | undefined;
|
|
731
730
|
error_code?: string | undefined;
|
|
731
|
+
duration_ms?: number | undefined;
|
|
732
732
|
}>, z.ZodObject<{
|
|
733
733
|
timestamp: z.ZodNumber;
|
|
734
734
|
id: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -1025,10 +1025,10 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1025
1025
|
}, "strict", z.ZodTypeAny, {
|
|
1026
1026
|
id: string;
|
|
1027
1027
|
type: "final_answer";
|
|
1028
|
-
|
|
1029
|
-
completion_reason: "terminal" | "tool_call" | "interrupted";
|
|
1028
|
+
completion_reason: "tool_call" | "terminal" | "interrupted";
|
|
1030
1029
|
timestamp: number;
|
|
1031
1030
|
answer_id: string;
|
|
1031
|
+
answer: string;
|
|
1032
1032
|
provider_continuations?: {
|
|
1033
1033
|
kind: string;
|
|
1034
1034
|
schema_version: 2;
|
|
@@ -1091,10 +1091,10 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1091
1091
|
}, {
|
|
1092
1092
|
id: string;
|
|
1093
1093
|
type: "final_answer";
|
|
1094
|
-
|
|
1095
|
-
completion_reason: "terminal" | "tool_call" | "interrupted";
|
|
1094
|
+
completion_reason: "tool_call" | "terminal" | "interrupted";
|
|
1096
1095
|
timestamp: number;
|
|
1097
1096
|
answer_id: string;
|
|
1097
|
+
answer: string;
|
|
1098
1098
|
provider_continuations?: {
|
|
1099
1099
|
kind: string;
|
|
1100
1100
|
schema_version: 2;
|
|
@@ -1312,9 +1312,9 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1312
1312
|
content: string;
|
|
1313
1313
|
timestamp: number;
|
|
1314
1314
|
is_complete: boolean;
|
|
1315
|
+
thought_message_id?: string | undefined;
|
|
1315
1316
|
delta?: string | undefined;
|
|
1316
1317
|
meta?: Record<string, unknown> | undefined;
|
|
1317
|
-
thought_message_id?: string | undefined;
|
|
1318
1318
|
} | {
|
|
1319
1319
|
id: string;
|
|
1320
1320
|
status: "error" | "loading" | "success";
|
|
@@ -1324,7 +1324,9 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1324
1324
|
timestamp: number;
|
|
1325
1325
|
phase: "error" | "start" | "update" | "complete";
|
|
1326
1326
|
tool_args: Record<string, unknown>;
|
|
1327
|
+
tool_calls?: unknown[] | undefined;
|
|
1327
1328
|
payload?: {
|
|
1329
|
+
tool_calls?: unknown[] | undefined;
|
|
1328
1330
|
provider_continuations?: {
|
|
1329
1331
|
kind: string;
|
|
1330
1332
|
schema_version: 2;
|
|
@@ -1337,7 +1339,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1337
1339
|
};
|
|
1338
1340
|
payload: SerializableJsonValue;
|
|
1339
1341
|
}[] | undefined;
|
|
1340
|
-
tool_calls?: unknown[] | undefined;
|
|
1341
1342
|
assistant_replay_parts?: ({
|
|
1342
1343
|
type: "text";
|
|
1343
1344
|
text: string;
|
|
@@ -1386,7 +1387,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1386
1387
|
})[] | undefined;
|
|
1387
1388
|
args?: Record<string, unknown> | undefined;
|
|
1388
1389
|
} | undefined;
|
|
1389
|
-
tool_calls?: unknown[] | undefined;
|
|
1390
1390
|
meta?: Record<string, unknown> | undefined;
|
|
1391
1391
|
} | {
|
|
1392
1392
|
id: string;
|
|
@@ -1397,8 +1397,8 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1397
1397
|
timestamp: number;
|
|
1398
1398
|
phase: "error" | "start" | "update" | "complete";
|
|
1399
1399
|
tool_args: Record<string, unknown>;
|
|
1400
|
-
payload?: Record<string, unknown> | undefined;
|
|
1401
1400
|
tool_calls?: unknown[] | undefined;
|
|
1401
|
+
payload?: Record<string, unknown> | undefined;
|
|
1402
1402
|
meta?: Record<string, unknown> | undefined;
|
|
1403
1403
|
} | {
|
|
1404
1404
|
id: string;
|
|
@@ -1422,15 +1422,15 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1422
1422
|
fileName?: string | undefined;
|
|
1423
1423
|
label?: string | undefined;
|
|
1424
1424
|
}[] | undefined;
|
|
1425
|
-
duration_ms?: number | undefined;
|
|
1426
1425
|
error_code?: string | undefined;
|
|
1426
|
+
duration_ms?: number | undefined;
|
|
1427
1427
|
} | {
|
|
1428
1428
|
id: string;
|
|
1429
1429
|
type: "final_answer";
|
|
1430
|
-
|
|
1431
|
-
completion_reason: "terminal" | "tool_call" | "interrupted";
|
|
1430
|
+
completion_reason: "tool_call" | "terminal" | "interrupted";
|
|
1432
1431
|
timestamp: number;
|
|
1433
1432
|
answer_id: string;
|
|
1433
|
+
answer: string;
|
|
1434
1434
|
provider_continuations?: {
|
|
1435
1435
|
kind: string;
|
|
1436
1436
|
schema_version: 2;
|
|
@@ -1534,9 +1534,9 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1534
1534
|
content: string;
|
|
1535
1535
|
timestamp: number;
|
|
1536
1536
|
is_complete: boolean;
|
|
1537
|
+
thought_message_id?: string | undefined;
|
|
1537
1538
|
delta?: string | undefined;
|
|
1538
1539
|
meta?: Record<string, unknown> | undefined;
|
|
1539
|
-
thought_message_id?: string | undefined;
|
|
1540
1540
|
} | {
|
|
1541
1541
|
id: string;
|
|
1542
1542
|
status: "error" | "loading" | "success";
|
|
@@ -1546,7 +1546,9 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1546
1546
|
timestamp: number;
|
|
1547
1547
|
phase: "error" | "start" | "update" | "complete";
|
|
1548
1548
|
tool_args: Record<string, unknown>;
|
|
1549
|
+
tool_calls?: unknown[] | undefined;
|
|
1549
1550
|
payload?: {
|
|
1551
|
+
tool_calls?: unknown[] | undefined;
|
|
1550
1552
|
provider_continuations?: {
|
|
1551
1553
|
kind: string;
|
|
1552
1554
|
schema_version: 2;
|
|
@@ -1559,7 +1561,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1559
1561
|
};
|
|
1560
1562
|
payload: SerializableJsonValue;
|
|
1561
1563
|
}[] | undefined;
|
|
1562
|
-
tool_calls?: unknown[] | undefined;
|
|
1563
1564
|
assistant_replay_parts?: ({
|
|
1564
1565
|
type: "text";
|
|
1565
1566
|
text: string;
|
|
@@ -1608,7 +1609,6 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1608
1609
|
})[] | undefined;
|
|
1609
1610
|
args?: Record<string, unknown> | undefined;
|
|
1610
1611
|
} | undefined;
|
|
1611
|
-
tool_calls?: unknown[] | undefined;
|
|
1612
1612
|
meta?: Record<string, unknown> | undefined;
|
|
1613
1613
|
} | {
|
|
1614
1614
|
id: string;
|
|
@@ -1619,8 +1619,8 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1619
1619
|
timestamp: number;
|
|
1620
1620
|
phase: "error" | "start" | "update" | "complete";
|
|
1621
1621
|
tool_args: Record<string, unknown>;
|
|
1622
|
-
payload?: Record<string, unknown> | undefined;
|
|
1623
1622
|
tool_calls?: unknown[] | undefined;
|
|
1623
|
+
payload?: Record<string, unknown> | undefined;
|
|
1624
1624
|
meta?: Record<string, unknown> | undefined;
|
|
1625
1625
|
} | {
|
|
1626
1626
|
id: string;
|
|
@@ -1644,15 +1644,15 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1644
1644
|
fileName?: string | undefined;
|
|
1645
1645
|
label?: string | undefined;
|
|
1646
1646
|
}[] | undefined;
|
|
1647
|
-
duration_ms?: number | undefined;
|
|
1648
1647
|
error_code?: string | undefined;
|
|
1648
|
+
duration_ms?: number | undefined;
|
|
1649
1649
|
} | {
|
|
1650
1650
|
id: string;
|
|
1651
1651
|
type: "final_answer";
|
|
1652
|
-
|
|
1653
|
-
completion_reason: "terminal" | "tool_call" | "interrupted";
|
|
1652
|
+
completion_reason: "tool_call" | "terminal" | "interrupted";
|
|
1654
1653
|
timestamp: number;
|
|
1655
1654
|
answer_id: string;
|
|
1655
|
+
answer: string;
|
|
1656
1656
|
provider_continuations?: {
|
|
1657
1657
|
kind: string;
|
|
1658
1658
|
schema_version: 2;
|
|
@@ -1754,4 +1754,5 @@ declare const AgentEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.
|
|
|
1754
1754
|
type AgentEvent = z.infer<typeof AgentEventSchema>;
|
|
1755
1755
|
type AnyAgentEvent = AgentEvent;
|
|
1756
1756
|
|
|
1757
|
-
export
|
|
1757
|
+
export { AgentEventSchema };
|
|
1758
|
+
export type { AgentEvent, AnyAgentEvent };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { RuntimeEvent, RoutedRuntimeEvent } from '../../contracts/events.cjs';
|
|
2
|
+
|
|
3
|
+
type RuntimeEventUiProjectionKind = 'hidden' | 'user_input' | 'thought' | 'final_answer' | 'final_answer_chunk' | 'final_answer_reset' | 'tool_call_decision' | 'tool_process' | 'tool_output' | 'requires_user_interaction' | 'audit_envelope' | 'subrun_trace' | 'error' | 'context_usage_snapshot' | 'run_execution_metrics' | 'history_summary' | 'unsupported';
|
|
4
|
+
type RuntimeEventRealtimeChannel = 'event_bus_sse' | 'none';
|
|
5
|
+
interface RuntimeEventLifecycleDecision {
|
|
6
|
+
uiProjectionKind: RuntimeEventUiProjectionKind;
|
|
7
|
+
persist: boolean;
|
|
8
|
+
replayToUi: boolean;
|
|
9
|
+
enterAgentContext: boolean;
|
|
10
|
+
realtimeChannel: RuntimeEventRealtimeChannel;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 类型级永不回放到 UI 的 RuntimeEvent。
|
|
14
|
+
*
|
|
15
|
+
* 中文备注:
|
|
16
|
+
* - 这里只能放“仅凭 type 就能确定永不进入 UI 历史回放”的事件;
|
|
17
|
+
* - `hidden user_input` 这类需要看 payload / metadata 的逐事件规则不能放进来;
|
|
18
|
+
* - UI 历史分页会把这份清单下推到 SQL 层,避免巨型隐藏事件被 JSON.parse / 序列化。
|
|
19
|
+
*/
|
|
20
|
+
declare const RUNTIME_EVENT_TYPES_NEVER_REPLAYED_TO_UI: readonly ["audit_envelope", "final_answer_chunk", "final_answer_reset", "subrun_trace", "context_usage_snapshot"];
|
|
21
|
+
declare function isToolCallDecisionEvent<T extends {
|
|
22
|
+
type: string;
|
|
23
|
+
}>(event: T): event is T & {
|
|
24
|
+
type: 'tool_call_decision';
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Conversation 主时间线只接纳 foreground run 明确声明为 conversation 可见的事实。
|
|
28
|
+
*
|
|
29
|
+
* child / auxiliary facts 仍可持久化并进入各自的消费链,但不能因为共用
|
|
30
|
+
* conversation_id 就被 durable UI read model 当作正文恢复。
|
|
31
|
+
*/
|
|
32
|
+
declare function isConversationUiRuntimeEvent(event: RuntimeEvent): boolean;
|
|
33
|
+
declare function shouldPersistRuntimeEvent(event: RuntimeEvent): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* EventStore 是 durable fact 边界。调用方若把实时进度直接写入存储,必须立即失败,
|
|
36
|
+
* 不能静默忽略,否则真实发布链的旁路会被掩盖。
|
|
37
|
+
*/
|
|
38
|
+
declare function requirePersistableRuntimeEvent<T extends RuntimeEvent>(event: T): T;
|
|
39
|
+
declare function requirePersistableRoutedRuntimeEvent(event: RuntimeEvent): RoutedRuntimeEvent;
|
|
40
|
+
declare function shouldReplayRuntimeEventToUi(event: RuntimeEvent): boolean;
|
|
41
|
+
declare function shouldEnterAgentContext(event: RuntimeEvent): boolean;
|
|
42
|
+
declare function getRuntimeEventUiProjectionKind(event: RuntimeEvent): RuntimeEventUiProjectionKind;
|
|
43
|
+
declare function describeRuntimeEventLifecycle(event: RuntimeEvent): RuntimeEventLifecycleDecision;
|
|
44
|
+
declare function shouldEmitRuntimeEventToSse(event: RuntimeEvent): boolean;
|
|
45
|
+
|
|
46
|
+
export { RUNTIME_EVENT_TYPES_NEVER_REPLAYED_TO_UI, describeRuntimeEventLifecycle, getRuntimeEventUiProjectionKind, isConversationUiRuntimeEvent, isToolCallDecisionEvent, requirePersistableRoutedRuntimeEvent, requirePersistableRuntimeEvent, shouldEmitRuntimeEventToSse, shouldEnterAgentContext, shouldPersistRuntimeEvent, shouldReplayRuntimeEventToUi };
|
|
47
|
+
export type { RuntimeEventLifecycleDecision, RuntimeEventRealtimeChannel, RuntimeEventUiProjectionKind };
|