@linnlabs/linnkit 0.32.0 → 0.32.1
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 +14 -0
- 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} +33 -33
- package/dist/{audit-XsNMTt0-.d.ts → contracts/audit.d.ts} +33 -33
- 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-oOQ_7nPt.d.ts → contracts/events.d.cts} +1219 -1222
- package/dist/{final-answer-B0_kx5_U.d.cts → contracts/events.d.ts} +1219 -1222
- package/dist/{execution-B7e01ZjW.d.cts → contracts/execution.d.cts} +21 -21
- package/dist/{execution-B7e01ZjW.d.ts → contracts/execution.d.ts} +21 -21
- 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} +210 -957
- package/dist/{provider-continuation-CTZdCB--.d.ts → contracts/messages.d.ts} +210 -957
- 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} +1218 -1574
- package/dist/{index-JYf6n2Ik.d.cts → contracts/sse.d.ts} +1218 -1574
- 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.d.cts +14 -77
- package/dist/index.d.ts +14 -77
- 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.d.cts +5 -23
- package/dist/quickstart.d.ts +5 -23
- 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} +127 -126
- package/dist/{agentEvents-DhXdKeXD.d.ts → runtime-kernel/events/agentEvents.d.ts} +127 -126
- 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.d.cts +106 -20
- package/dist/runtime-kernel.d.ts +106 -20
- 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.d.cts +17 -277
- package/dist/testkit.d.ts +17 -277
- 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
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ToolModelInputDeclaration } from './model-input/definitions/toolModelInput.js';
|
|
2
|
+
|
|
3
|
+
/** 工具结果中由 runtime 解释或转交给 Host 的显式合同。 */
|
|
4
|
+
interface ToolObservationPreviewMeta {
|
|
5
|
+
filename?: string;
|
|
6
|
+
doc_name?: string;
|
|
7
|
+
document_name?: string;
|
|
8
|
+
/** 宿主或插件拥有的文档类型;runtime-kernel 只透传,不维护产品类型枚举。 */
|
|
9
|
+
doc_type?: string;
|
|
10
|
+
}
|
|
11
|
+
interface ToolResultImageMedia {
|
|
12
|
+
path: string;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}
|
|
16
|
+
interface ToolControlInfo {
|
|
17
|
+
requireUser?: boolean;
|
|
18
|
+
questionnaireId?: string;
|
|
19
|
+
resumeStrategy?: 'continue';
|
|
20
|
+
terminateRun?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 将工具产物投影为本轮最终答案。
|
|
23
|
+
*
|
|
24
|
+
* 中文说明:
|
|
25
|
+
* - 这是通用工具输出契约,不绑定具体工具名;
|
|
26
|
+
* - 适用于“工具是最终产物出口”的场景,例如报告写入、子任务汇总等;
|
|
27
|
+
* - ToolNode 只解释该控制字段,不内置宿主业务工具名。
|
|
28
|
+
*/
|
|
29
|
+
finalAnswer?: string;
|
|
30
|
+
reason?: string;
|
|
31
|
+
}
|
|
32
|
+
interface StructuredToolResult<T = Record<string, unknown>> {
|
|
33
|
+
data: T;
|
|
34
|
+
/**
|
|
35
|
+
* 唯一进入 AI 上下文的业务结果视图。
|
|
36
|
+
*
|
|
37
|
+
* 中文说明:
|
|
38
|
+
* - Agent 工具必须返回包含非空白字符的纯文本 observation;正文自然首尾空白可以保留;
|
|
39
|
+
* - data 只服务 UI、审计和程序化消费,工具不得假设模型能读取 data;
|
|
40
|
+
* - ToolNode 会在运行时校验该合同,缺失或空 observation 会被判为工具实现错误。
|
|
41
|
+
*/
|
|
42
|
+
observation: string;
|
|
43
|
+
/**
|
|
44
|
+
* 工具结果的展示元数据。
|
|
45
|
+
*
|
|
46
|
+
* 中文说明:
|
|
47
|
+
* - `data` 仍是唯一业务数据,产物创建、摘要和后续工具链不得依赖 media;
|
|
48
|
+
* - media 只服务 UI 占位、预估高度、预览等展示场景;
|
|
49
|
+
* - 图片宽高必须成对出现,缺失时工具不要写入对应 entry。
|
|
50
|
+
*/
|
|
51
|
+
media?: ToolResultImageMedia[];
|
|
52
|
+
/**
|
|
53
|
+
* 工具希望交给下一轮模型的资源选择。
|
|
54
|
+
*
|
|
55
|
+
* 中文说明:
|
|
56
|
+
* - 这是未验证的声明,不是 durable resource ref;
|
|
57
|
+
* - ToolNode 必须经 host resolver 授权和完整性校验后才能写入 runtime event;
|
|
58
|
+
* - 与只服务 UI 的 media 完全独立。
|
|
59
|
+
*/
|
|
60
|
+
modelInput?: ToolModelInputDeclaration;
|
|
61
|
+
/**
|
|
62
|
+
* observation 被落盘/预览时传给 host 的轻量展示元数据。
|
|
63
|
+
*
|
|
64
|
+
* 中文说明:
|
|
65
|
+
* - 由工具自己声明,runtime-kernel 不按具体工具名猜测业务字段;
|
|
66
|
+
* - host 可用它给大段输出预览命名或选择展示样式。
|
|
67
|
+
*/
|
|
68
|
+
observationPreviewMeta?: ToolObservationPreviewMeta;
|
|
69
|
+
control?: ToolControlInfo;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type { StructuredToolResult, ToolControlInfo, ToolObservationPreviewMeta, ToolResultImageMedia };
|
|
@@ -1,20 +1,106 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import './
|
|
12
|
-
|
|
13
|
-
import './
|
|
14
|
-
|
|
15
|
-
import './
|
|
16
|
-
|
|
17
|
-
import './
|
|
18
|
-
|
|
19
|
-
import './
|
|
20
|
-
|
|
1
|
+
import * as index$5 from './runtime-kernel/graph-engine/index.cjs';
|
|
2
|
+
export { index$5 as graph };
|
|
3
|
+
import * as index$c from './runtime-kernel/tools/index.cjs';
|
|
4
|
+
export { index$c as tools };
|
|
5
|
+
import * as index$4 from './runtime-kernel/execution/index.cjs';
|
|
6
|
+
export { index$4 as execution };
|
|
7
|
+
import * as runtimeKernel_events from './runtime-kernel/events.cjs';
|
|
8
|
+
export { runtimeKernel_events as events };
|
|
9
|
+
import * as index$7 from './runtime-kernel/run-context/index.cjs';
|
|
10
|
+
export { index$7 as runContext };
|
|
11
|
+
import * as index$6 from './runtime-kernel/llm/index.cjs';
|
|
12
|
+
export { index$6 as llm };
|
|
13
|
+
import * as index$2 from './runtime-kernel/child-runs/index.cjs';
|
|
14
|
+
export { index$2 as childRuns };
|
|
15
|
+
import * as index$1 from './runtime-kernel/child-run-trace/index.cjs';
|
|
16
|
+
export { index$1 as childRunTrace };
|
|
17
|
+
import * as index$3 from './runtime-kernel/enrichment/index.cjs';
|
|
18
|
+
export { index$3 as enrichment };
|
|
19
|
+
import * as index$8 from './runtime-kernel/run-supervisor/index.cjs';
|
|
20
|
+
export { index$8 as runSupervisor };
|
|
21
|
+
import * as index$a from './runtime-kernel/telemetry/index.cjs';
|
|
22
|
+
export { index$a as telemetry };
|
|
23
|
+
import * as index from './runtime-kernel/audit/index.cjs';
|
|
24
|
+
export { index as audit };
|
|
25
|
+
import * as index$9 from './runtime-kernel/system-reminder/index.cjs';
|
|
26
|
+
export { index$9 as systemReminder };
|
|
27
|
+
import * as index$b from './runtime-kernel/token-accounting/index.cjs';
|
|
28
|
+
export { index$b as tokenAccounting };
|
|
29
|
+
export { ENGINE_ERROR_CODES, ErrorClassification } from './shared/errorClassifier.cjs';
|
|
30
|
+
export { GraphLoopHarness, GraphLoopHarnessOptions, GraphLoopHarnessRunResult, GraphLoopLlmNodeFactoryParams, createGraphLoopHarness } from './runtime-kernel/testkit/graphLoopHarness.cjs';
|
|
31
|
+
export { DefaultGraphExecutorOptions, createDefaultGraphExecutor } from './runtime-kernel/testkit/defaultGraphExecutor.cjs';
|
|
32
|
+
export { AdapterInputSupport, EMPTY_MODEL_INPUT_REQUIREMENT, MODEL_INPUT_PLACEMENTS, ModelInputCompatibility, ModelInputIncompatibilityReason, ModelInputPlacement, ModelInputRequirement } from './runtime-kernel/llm/input-capabilities/definitions/modelInputCapability.cjs';
|
|
33
|
+
export { AgentTool, BaseTool, CommonParameterTypes, FunctionToolSchema, ToolArgs, ToolCallResult, ToolCallStreamingPolicy, ToolRegistryEntry, ToolResult, UnifiedToolResult } from './runtime-kernel/tools/toolContracts.cjs';
|
|
34
|
+
export { AuditEnvelopePersistenceError, EventStoreAuditOptions, EventStoreAuditPort, createEventStoreAudit } from './runtime-kernel/audit/eventStoreAudit.cjs';
|
|
35
|
+
export { BUILTIN_SYSTEM_REMINDER_TEMPLATES, hostReminderTextTemplate, lastStepsHintTemplate, maxStepsForceFinalAnswerTemplate, periodicProgressReflectionTemplate, toolCallStreakTemplate } from './runtime-kernel/system-reminder/templates.cjs';
|
|
36
|
+
export { BUILTIN_SYSTEM_REMINDER_TRIGGERS, agentHasToolTrigger, phaseEqualsTrigger, remainingStepsLeqTrigger, stepCountModuloTrigger, toolCallStreakTrigger } from './runtime-kernel/system-reminder/triggers.cjs';
|
|
37
|
+
export { CanonicalInferenceStreamState, CanonicalInferenceTerminal, INITIAL_CANONICAL_INFERENCE_STREAM_STATE } from './runtime-kernel/llm/canonical-inference/definitions/canonicalInferenceStreamState.cjs';
|
|
38
|
+
export { CheckpointListFilter, CheckpointMeta, CheckpointSummary, Checkpointer, summarizeCheckpoint } from './runtime-kernel/graph-engine/checkpointer/base.cjs';
|
|
39
|
+
export { ChildRunParentTraceProjection, ChildRunParentTraceProjectionOptions } from './runtime-kernel/child-run-trace/childRunParentTraceProjection.cjs';
|
|
40
|
+
export { CompleteToolModelInputParams, ResolveToolModelInputParams, ToolModelInputAttachmentSelection, ToolModelInputDeclaration, ToolModelInputResolutionError, ToolModelInputResolverPort } from './runtime-kernel/tools/model-input/definitions/toolModelInput.cjs';
|
|
41
|
+
export { CompositeAuditOptions, CompositeAuditPort, createCompositeAudit } from './runtime-kernel/audit/compositeAudit.cjs';
|
|
42
|
+
export { ConsoleAuditOptions, consoleAudit, createConsoleAudit } from './runtime-kernel/audit/consoleAudit.cjs';
|
|
43
|
+
export { CreateContextComponentLedgerEntryInput, CreateLlmUsageLedgerEntryInput, addLedgerAggregate, addUsageTotals, aggregateCanonicalUsage, aggregateTokenLedgerEntries, computeCost, createContextComponentLedgerEntry, createLlmUsageLedgerEntry, createRunTokenUsageAggregate } from './runtime-kernel/token-accounting/functions.cjs';
|
|
44
|
+
export { DefaultTokenizerPort, DefaultTokenizerPortConfig, createDefaultTokenizerPort } from './shared/defaultTokenizerPort.cjs';
|
|
45
|
+
export { ENGINE_STATE_SCHEMA_VERSION, EngineState, ExecutorLlmInvocationKind, ExecutorLocalPatch, ExecutorLocalState, GraphNode, RuntimeEventCommitPort, RuntimeEventSink, RuntimeFailureFact, RuntimeFailureFactSink, ToolBatchCompletionMode } from './runtime-kernel/graph-engine/types.cjs';
|
|
46
|
+
export { EffectivePromptBudget, ResolveEffectivePromptBudgetInput, resolveEffectivePromptBudget } from './shared/prompt-budget.cjs';
|
|
47
|
+
export { EmitAuditEnvelopeParams, emitAuditEnvelope, emitSandboxDecisionAudit } from './runtime-kernel/audit/emitAudit.cjs';
|
|
48
|
+
export { EnrichmentContext, EnrichmentResult, RegistryEnrichmentResult, RequestEnricher } from './runtime-kernel/enrichment/types.cjs';
|
|
49
|
+
export { EventRangeOptions, EventStore, PersistedEvent, createMonotonicEventStoreIdFactory, requireEventStoreId } from './runtime-kernel/graph-engine/event-store/base.cjs';
|
|
50
|
+
export { FileAuditOptions, FileAuditPort, createFileAudit } from './runtime-kernel/audit/fileAudit.cjs';
|
|
51
|
+
export { GraphAgentExecutor, GraphAgentExecutorDependencies } from './runtime-kernel/graph-engine/executor.cjs';
|
|
52
|
+
export { GraphContextCompactionCandidate, GraphExecutorContextApplyInput, GraphExecutorContextApplyOutput, GraphExecutorContextBuildInput, GraphExecutorContextBuildOutput, GraphExecutorContextBuilder, GraphExecutorOutputProcessor } from './runtime-kernel/graph-engine/executorContextBuilder.cjs';
|
|
53
|
+
export { GraphExecutor } from './runtime-kernel/graph-engine/engine.cjs';
|
|
54
|
+
export { HostToolCallBootstrap, HostToolCallBootstrapInput, HostToolCallBootstrapLocalPatch, createHostToolCallBootstrap } from './runtime-kernel/graph-engine/functions/createHostToolCallBootstrap.cjs';
|
|
55
|
+
export { JsonSchemaValue, ToolParameterProperty, ToolParameterSchema, ToolParameterType } from './ports/tool-schema.cjs';
|
|
56
|
+
export { LLMPolicy, LLMPolicyErrorDecision, LLMPolicyMatchContext } from './runtime-kernel/llm/policies/types.cjs';
|
|
57
|
+
export { LLMPolicyEngine } from './runtime-kernel/llm/policies/policyEngine.cjs';
|
|
58
|
+
export { LLM_IMAGE_INPUT_ERROR_CODES, LlmImageInputError, LlmImageInputErrorCode, LlmImageInputErrorMetadata, LlmImageInputLimitKind } from './shared/llmImageInputError.cjs';
|
|
59
|
+
export { LLM_MODEL_ELIGIBILITY_ERROR_CODE, LlmModelEligibilityError, MODEL_INPUT_ERROR_CODES, ModelInputCapabilityError, ModelInputErrorCode, ModelInputErrorMetadata } from './runtime-kernel/llm/input-capabilities/definitions/modelInputCapabilityError.cjs';
|
|
60
|
+
export { LlmCallInvocationContext } from './runtime-kernel/llm/definitions/llmCallInvocationContext.cjs';
|
|
61
|
+
export { LlmCallOptions, LlmRequestMessage, LlmRetryConfig, ToolCall } from './ports/llm-call.cjs';
|
|
62
|
+
export { LlmCaller } from './runtime-kernel/llm/caller.cjs';
|
|
63
|
+
export { LlmFallbackObserver, ModelFallbackAppliedInfo, ModelFallbackPolicy, ModelFallbackRejectedInfo } from './runtime-kernel/llm/definitions/llmFallbackObserver.cjs';
|
|
64
|
+
export { LlmNode } from './runtime-kernel/graph-engine/nodes/llmNode.cjs';
|
|
65
|
+
export { MemoryCheckpointer } from './runtime-kernel/graph-engine/checkpointer/memoryCheckpointer.cjs';
|
|
66
|
+
export { MemoryEventStore } from './runtime-kernel/graph-engine/event-store/memoryEventStore.cjs';
|
|
67
|
+
export { ModelCatalogEntry, ModelCatalogLike, createFixedChatModelCatalog } from './runtime-kernel/llm/modelCatalog.cjs';
|
|
68
|
+
export { ModelReasoningConfig, REASONING_EFFORTS, ReasoningEffort, isValidReasoningEffort, resolveEffectiveEffort } from './contracts/reasoning.cjs';
|
|
69
|
+
export { ModelResolver } from './runtime-kernel/llm/modelResolver.cjs';
|
|
70
|
+
export { ObservationPreviewContext, ObservationPreviewMeta, ObservationPreviewPort, ObservationPreviewResult, ToolCatalogPort, ToolExecutionPort, ToolExecutionResult, ToolModelInputCapabilityValidatorPort, ToolRuntimeDefinition, ToolRuntimePort, ToolSchemaBuildRequest } from './runtime-kernel/tools/ports.cjs';
|
|
71
|
+
export { PRIMARY_PROMPT_CAPACITY_ERROR_CODE, PrimaryPromptCapacityError, PrimaryPromptCapacityErrorMetadata } from './runtime-kernel/graph-engine/definitions/primaryPromptCapacityError.cjs';
|
|
72
|
+
export { PrimaryPromptCapacityAdmission, evaluatePrimaryPromptCapacity } from './runtime-kernel/graph-engine/functions/evaluatePrimaryPromptCapacity.cjs';
|
|
73
|
+
export { ProviderContinuation } from './contracts/provider-continuation.cjs';
|
|
74
|
+
export { RuntimeEventSubRunTracePublisher, RuntimeEventSubRunTracePublisherOptions } from './runtime-kernel/child-run-trace/runtimeEventSubRunTracePublisher.cjs';
|
|
75
|
+
export { SYSTEM_REMINDER_RULES, createSystemReminderRules } from './runtime-kernel/system-reminder/rules.cjs';
|
|
76
|
+
export { StructuredToolResult, ToolControlInfo, ToolObservationPreviewMeta, ToolResultImageMedia } from './runtime-kernel/tools/ui-types.cjs';
|
|
77
|
+
export { SubRunTraceEnvelope, SubRunTracePublisher } from './runtime-kernel/child-run-trace/subrunTrace.types.cjs';
|
|
78
|
+
export { SystemReminderContentTemplate, SystemReminderContext, SystemReminderRule, SystemReminderRuleDefinition, SystemReminderTriggerEvaluator } from './runtime-kernel/system-reminder/types.cjs';
|
|
79
|
+
export { SystemReminderRegistry, createDefaultSystemReminderRegistry, defaultSystemReminderRegistry } from './runtime-kernel/system-reminder/registry.cjs';
|
|
80
|
+
export { ToolContextConversationView } from './runtime-kernel/tools/conversationView.cjs';
|
|
81
|
+
export { ToolContextPatch } from './runtime-kernel/tools/toolContextPatch.cjs';
|
|
82
|
+
export { ToolExecutionContext } from './runtime-kernel/tools/toolExecutionContext.cjs';
|
|
83
|
+
export { ToolModelInputAdmission, ToolModelInputDelivery } from './runtime-kernel/tools/model-input/definitions/toolModelInputPolicy.cjs';
|
|
84
|
+
export { ToolModelInputDeclarationValidation, parseToolModelInputDeclaration } from './runtime-kernel/tools/model-input/functions/parseToolModelInputDeclaration.cjs';
|
|
85
|
+
export { ToolNode } from './runtime-kernel/graph-engine/nodes/toolNode.cjs';
|
|
86
|
+
export { ToolParameterSchemaError, assertToolParameterSchema } from './runtime-kernel/tools/schema/functions/assertToolParameterSchema.cjs';
|
|
87
|
+
export { UserNode } from './runtime-kernel/graph-engine/nodes/userNode.cjs';
|
|
88
|
+
export { WaitUserNode } from './runtime-kernel/graph-engine/nodes/waitUserNode.cjs';
|
|
89
|
+
export { advanceCanonicalInferenceStreamState } from './runtime-kernel/llm/canonical-inference/functions/advanceCanonicalInferenceStreamState.cjs';
|
|
90
|
+
export { applySystemReminders } from './runtime-kernel/system-reminder/apply.cjs';
|
|
91
|
+
export { assertModelInputCompatibility } from './runtime-kernel/llm/input-capabilities/orchestration/assertModelInputCompatibility.cjs';
|
|
92
|
+
export { computeToolIdempotencyKey, findCachedToolOutputByIdempotencyKey } from './runtime-kernel/tools/idempotency/toolIdempotency.cjs';
|
|
93
|
+
export { consumeCanonicalInferenceStream } from './runtime-kernel/llm/canonical-inference/orchestration/consumeCanonicalInferenceStream.cjs';
|
|
94
|
+
export { copyToolContextRuntimeCapability, ensureToolContextRuntimeCapability, getToolContextRuntimeBinding, readToolContextPersistedHistory, readToolContextWorkingHistory, stripRuntimeReservedToolContextPatch } from './runtime-kernel/tools/toolContextRuntime.cjs';
|
|
95
|
+
export { countToolCallsInCurrentRequest, readNonEmptyStrings, toDisplayStep } from './runtime-kernel/system-reminder/helpers.cjs';
|
|
96
|
+
export { createModelInputCompatibilityError } from './runtime-kernel/llm/input-capabilities/functions/createModelInputCompatibilityError.cjs';
|
|
97
|
+
export { defaultPolicyEngine } from './runtime-kernel/llm/policies/defaultPolicyEngine.cjs';
|
|
98
|
+
export { deriveModelInputRequirement } from './runtime-kernel/llm/input-capabilities/functions/deriveModelInputRequirement.cjs';
|
|
99
|
+
export { evaluateModelInputCompatibility, listCompatibleModelIds } from './runtime-kernel/llm/input-capabilities/functions/evaluateModelInputCompatibility.cjs';
|
|
100
|
+
export { isRuntimeFailureFact } from './runtime-kernel/graph-engine/functions/runtimeFailureFact.cjs';
|
|
101
|
+
export { noopAudit } from './runtime-kernel/audit/noopAudit.cjs';
|
|
102
|
+
export { normalizeToolArgs } from './runtime-kernel/tools/argNormalizer.cjs';
|
|
103
|
+
export { projectChildRuntimeEventToSubRunTrace } from './runtime-kernel/child-run-trace/projectChildRuntimeEventToSubRunTrace.cjs';
|
|
104
|
+
export { readCheckpointContextUsage } from './runtime-kernel/graph-engine/functions/engineStateSnapshot.cjs';
|
|
105
|
+
export { requestEnricherRegistry } from './runtime-kernel/enrichment/registry.cjs';
|
|
106
|
+
export { resolveToolModelInput } from './runtime-kernel/tools/model-input/orchestration/resolveToolModelInput.cjs';
|
package/dist/runtime-kernel.d.ts
CHANGED
|
@@ -1,20 +1,106 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import './
|
|
12
|
-
|
|
13
|
-
import './
|
|
14
|
-
|
|
15
|
-
import './
|
|
16
|
-
|
|
17
|
-
import './
|
|
18
|
-
|
|
19
|
-
import './
|
|
20
|
-
|
|
1
|
+
import * as index$5 from './runtime-kernel/graph-engine/index.js';
|
|
2
|
+
export { index$5 as graph };
|
|
3
|
+
import * as index$c from './runtime-kernel/tools/index.js';
|
|
4
|
+
export { index$c as tools };
|
|
5
|
+
import * as index$4 from './runtime-kernel/execution/index.js';
|
|
6
|
+
export { index$4 as execution };
|
|
7
|
+
import * as runtimeKernel_events from './runtime-kernel/events.js';
|
|
8
|
+
export { runtimeKernel_events as events };
|
|
9
|
+
import * as index$7 from './runtime-kernel/run-context/index.js';
|
|
10
|
+
export { index$7 as runContext };
|
|
11
|
+
import * as index$6 from './runtime-kernel/llm/index.js';
|
|
12
|
+
export { index$6 as llm };
|
|
13
|
+
import * as index$2 from './runtime-kernel/child-runs/index.js';
|
|
14
|
+
export { index$2 as childRuns };
|
|
15
|
+
import * as index$1 from './runtime-kernel/child-run-trace/index.js';
|
|
16
|
+
export { index$1 as childRunTrace };
|
|
17
|
+
import * as index$3 from './runtime-kernel/enrichment/index.js';
|
|
18
|
+
export { index$3 as enrichment };
|
|
19
|
+
import * as index$8 from './runtime-kernel/run-supervisor/index.js';
|
|
20
|
+
export { index$8 as runSupervisor };
|
|
21
|
+
import * as index$a from './runtime-kernel/telemetry/index.js';
|
|
22
|
+
export { index$a as telemetry };
|
|
23
|
+
import * as index from './runtime-kernel/audit/index.js';
|
|
24
|
+
export { index as audit };
|
|
25
|
+
import * as index$9 from './runtime-kernel/system-reminder/index.js';
|
|
26
|
+
export { index$9 as systemReminder };
|
|
27
|
+
import * as index$b from './runtime-kernel/token-accounting/index.js';
|
|
28
|
+
export { index$b as tokenAccounting };
|
|
29
|
+
export { ENGINE_ERROR_CODES, ErrorClassification } from './shared/errorClassifier.js';
|
|
30
|
+
export { GraphLoopHarness, GraphLoopHarnessOptions, GraphLoopHarnessRunResult, GraphLoopLlmNodeFactoryParams, createGraphLoopHarness } from './runtime-kernel/testkit/graphLoopHarness.js';
|
|
31
|
+
export { DefaultGraphExecutorOptions, createDefaultGraphExecutor } from './runtime-kernel/testkit/defaultGraphExecutor.js';
|
|
32
|
+
export { AdapterInputSupport, EMPTY_MODEL_INPUT_REQUIREMENT, MODEL_INPUT_PLACEMENTS, ModelInputCompatibility, ModelInputIncompatibilityReason, ModelInputPlacement, ModelInputRequirement } from './runtime-kernel/llm/input-capabilities/definitions/modelInputCapability.js';
|
|
33
|
+
export { AgentTool, BaseTool, CommonParameterTypes, FunctionToolSchema, ToolArgs, ToolCallResult, ToolCallStreamingPolicy, ToolRegistryEntry, ToolResult, UnifiedToolResult } from './runtime-kernel/tools/toolContracts.js';
|
|
34
|
+
export { AuditEnvelopePersistenceError, EventStoreAuditOptions, EventStoreAuditPort, createEventStoreAudit } from './runtime-kernel/audit/eventStoreAudit.js';
|
|
35
|
+
export { BUILTIN_SYSTEM_REMINDER_TEMPLATES, hostReminderTextTemplate, lastStepsHintTemplate, maxStepsForceFinalAnswerTemplate, periodicProgressReflectionTemplate, toolCallStreakTemplate } from './runtime-kernel/system-reminder/templates.js';
|
|
36
|
+
export { BUILTIN_SYSTEM_REMINDER_TRIGGERS, agentHasToolTrigger, phaseEqualsTrigger, remainingStepsLeqTrigger, stepCountModuloTrigger, toolCallStreakTrigger } from './runtime-kernel/system-reminder/triggers.js';
|
|
37
|
+
export { CanonicalInferenceStreamState, CanonicalInferenceTerminal, INITIAL_CANONICAL_INFERENCE_STREAM_STATE } from './runtime-kernel/llm/canonical-inference/definitions/canonicalInferenceStreamState.js';
|
|
38
|
+
export { CheckpointListFilter, CheckpointMeta, CheckpointSummary, Checkpointer, summarizeCheckpoint } from './runtime-kernel/graph-engine/checkpointer/base.js';
|
|
39
|
+
export { ChildRunParentTraceProjection, ChildRunParentTraceProjectionOptions } from './runtime-kernel/child-run-trace/childRunParentTraceProjection.js';
|
|
40
|
+
export { CompleteToolModelInputParams, ResolveToolModelInputParams, ToolModelInputAttachmentSelection, ToolModelInputDeclaration, ToolModelInputResolutionError, ToolModelInputResolverPort } from './runtime-kernel/tools/model-input/definitions/toolModelInput.js';
|
|
41
|
+
export { CompositeAuditOptions, CompositeAuditPort, createCompositeAudit } from './runtime-kernel/audit/compositeAudit.js';
|
|
42
|
+
export { ConsoleAuditOptions, consoleAudit, createConsoleAudit } from './runtime-kernel/audit/consoleAudit.js';
|
|
43
|
+
export { CreateContextComponentLedgerEntryInput, CreateLlmUsageLedgerEntryInput, addLedgerAggregate, addUsageTotals, aggregateCanonicalUsage, aggregateTokenLedgerEntries, computeCost, createContextComponentLedgerEntry, createLlmUsageLedgerEntry, createRunTokenUsageAggregate } from './runtime-kernel/token-accounting/functions.js';
|
|
44
|
+
export { DefaultTokenizerPort, DefaultTokenizerPortConfig, createDefaultTokenizerPort } from './shared/defaultTokenizerPort.js';
|
|
45
|
+
export { ENGINE_STATE_SCHEMA_VERSION, EngineState, ExecutorLlmInvocationKind, ExecutorLocalPatch, ExecutorLocalState, GraphNode, RuntimeEventCommitPort, RuntimeEventSink, RuntimeFailureFact, RuntimeFailureFactSink, ToolBatchCompletionMode } from './runtime-kernel/graph-engine/types.js';
|
|
46
|
+
export { EffectivePromptBudget, ResolveEffectivePromptBudgetInput, resolveEffectivePromptBudget } from './shared/prompt-budget.js';
|
|
47
|
+
export { EmitAuditEnvelopeParams, emitAuditEnvelope, emitSandboxDecisionAudit } from './runtime-kernel/audit/emitAudit.js';
|
|
48
|
+
export { EnrichmentContext, EnrichmentResult, RegistryEnrichmentResult, RequestEnricher } from './runtime-kernel/enrichment/types.js';
|
|
49
|
+
export { EventRangeOptions, EventStore, PersistedEvent, createMonotonicEventStoreIdFactory, requireEventStoreId } from './runtime-kernel/graph-engine/event-store/base.js';
|
|
50
|
+
export { FileAuditOptions, FileAuditPort, createFileAudit } from './runtime-kernel/audit/fileAudit.js';
|
|
51
|
+
export { GraphAgentExecutor, GraphAgentExecutorDependencies } from './runtime-kernel/graph-engine/executor.js';
|
|
52
|
+
export { GraphContextCompactionCandidate, GraphExecutorContextApplyInput, GraphExecutorContextApplyOutput, GraphExecutorContextBuildInput, GraphExecutorContextBuildOutput, GraphExecutorContextBuilder, GraphExecutorOutputProcessor } from './runtime-kernel/graph-engine/executorContextBuilder.js';
|
|
53
|
+
export { GraphExecutor } from './runtime-kernel/graph-engine/engine.js';
|
|
54
|
+
export { HostToolCallBootstrap, HostToolCallBootstrapInput, HostToolCallBootstrapLocalPatch, createHostToolCallBootstrap } from './runtime-kernel/graph-engine/functions/createHostToolCallBootstrap.js';
|
|
55
|
+
export { JsonSchemaValue, ToolParameterProperty, ToolParameterSchema, ToolParameterType } from './ports/tool-schema.js';
|
|
56
|
+
export { LLMPolicy, LLMPolicyErrorDecision, LLMPolicyMatchContext } from './runtime-kernel/llm/policies/types.js';
|
|
57
|
+
export { LLMPolicyEngine } from './runtime-kernel/llm/policies/policyEngine.js';
|
|
58
|
+
export { LLM_IMAGE_INPUT_ERROR_CODES, LlmImageInputError, LlmImageInputErrorCode, LlmImageInputErrorMetadata, LlmImageInputLimitKind } from './shared/llmImageInputError.js';
|
|
59
|
+
export { LLM_MODEL_ELIGIBILITY_ERROR_CODE, LlmModelEligibilityError, MODEL_INPUT_ERROR_CODES, ModelInputCapabilityError, ModelInputErrorCode, ModelInputErrorMetadata } from './runtime-kernel/llm/input-capabilities/definitions/modelInputCapabilityError.js';
|
|
60
|
+
export { LlmCallInvocationContext } from './runtime-kernel/llm/definitions/llmCallInvocationContext.js';
|
|
61
|
+
export { LlmCallOptions, LlmRequestMessage, LlmRetryConfig, ToolCall } from './ports/llm-call.js';
|
|
62
|
+
export { LlmCaller } from './runtime-kernel/llm/caller.js';
|
|
63
|
+
export { LlmFallbackObserver, ModelFallbackAppliedInfo, ModelFallbackPolicy, ModelFallbackRejectedInfo } from './runtime-kernel/llm/definitions/llmFallbackObserver.js';
|
|
64
|
+
export { LlmNode } from './runtime-kernel/graph-engine/nodes/llmNode.js';
|
|
65
|
+
export { MemoryCheckpointer } from './runtime-kernel/graph-engine/checkpointer/memoryCheckpointer.js';
|
|
66
|
+
export { MemoryEventStore } from './runtime-kernel/graph-engine/event-store/memoryEventStore.js';
|
|
67
|
+
export { ModelCatalogEntry, ModelCatalogLike, createFixedChatModelCatalog } from './runtime-kernel/llm/modelCatalog.js';
|
|
68
|
+
export { ModelReasoningConfig, REASONING_EFFORTS, ReasoningEffort, isValidReasoningEffort, resolveEffectiveEffort } from './contracts/reasoning.js';
|
|
69
|
+
export { ModelResolver } from './runtime-kernel/llm/modelResolver.js';
|
|
70
|
+
export { ObservationPreviewContext, ObservationPreviewMeta, ObservationPreviewPort, ObservationPreviewResult, ToolCatalogPort, ToolExecutionPort, ToolExecutionResult, ToolModelInputCapabilityValidatorPort, ToolRuntimeDefinition, ToolRuntimePort, ToolSchemaBuildRequest } from './runtime-kernel/tools/ports.js';
|
|
71
|
+
export { PRIMARY_PROMPT_CAPACITY_ERROR_CODE, PrimaryPromptCapacityError, PrimaryPromptCapacityErrorMetadata } from './runtime-kernel/graph-engine/definitions/primaryPromptCapacityError.js';
|
|
72
|
+
export { PrimaryPromptCapacityAdmission, evaluatePrimaryPromptCapacity } from './runtime-kernel/graph-engine/functions/evaluatePrimaryPromptCapacity.js';
|
|
73
|
+
export { ProviderContinuation } from './contracts/provider-continuation.js';
|
|
74
|
+
export { RuntimeEventSubRunTracePublisher, RuntimeEventSubRunTracePublisherOptions } from './runtime-kernel/child-run-trace/runtimeEventSubRunTracePublisher.js';
|
|
75
|
+
export { SYSTEM_REMINDER_RULES, createSystemReminderRules } from './runtime-kernel/system-reminder/rules.js';
|
|
76
|
+
export { StructuredToolResult, ToolControlInfo, ToolObservationPreviewMeta, ToolResultImageMedia } from './runtime-kernel/tools/ui-types.js';
|
|
77
|
+
export { SubRunTraceEnvelope, SubRunTracePublisher } from './runtime-kernel/child-run-trace/subrunTrace.types.js';
|
|
78
|
+
export { SystemReminderContentTemplate, SystemReminderContext, SystemReminderRule, SystemReminderRuleDefinition, SystemReminderTriggerEvaluator } from './runtime-kernel/system-reminder/types.js';
|
|
79
|
+
export { SystemReminderRegistry, createDefaultSystemReminderRegistry, defaultSystemReminderRegistry } from './runtime-kernel/system-reminder/registry.js';
|
|
80
|
+
export { ToolContextConversationView } from './runtime-kernel/tools/conversationView.js';
|
|
81
|
+
export { ToolContextPatch } from './runtime-kernel/tools/toolContextPatch.js';
|
|
82
|
+
export { ToolExecutionContext } from './runtime-kernel/tools/toolExecutionContext.js';
|
|
83
|
+
export { ToolModelInputAdmission, ToolModelInputDelivery } from './runtime-kernel/tools/model-input/definitions/toolModelInputPolicy.js';
|
|
84
|
+
export { ToolModelInputDeclarationValidation, parseToolModelInputDeclaration } from './runtime-kernel/tools/model-input/functions/parseToolModelInputDeclaration.js';
|
|
85
|
+
export { ToolNode } from './runtime-kernel/graph-engine/nodes/toolNode.js';
|
|
86
|
+
export { ToolParameterSchemaError, assertToolParameterSchema } from './runtime-kernel/tools/schema/functions/assertToolParameterSchema.js';
|
|
87
|
+
export { UserNode } from './runtime-kernel/graph-engine/nodes/userNode.js';
|
|
88
|
+
export { WaitUserNode } from './runtime-kernel/graph-engine/nodes/waitUserNode.js';
|
|
89
|
+
export { advanceCanonicalInferenceStreamState } from './runtime-kernel/llm/canonical-inference/functions/advanceCanonicalInferenceStreamState.js';
|
|
90
|
+
export { applySystemReminders } from './runtime-kernel/system-reminder/apply.js';
|
|
91
|
+
export { assertModelInputCompatibility } from './runtime-kernel/llm/input-capabilities/orchestration/assertModelInputCompatibility.js';
|
|
92
|
+
export { computeToolIdempotencyKey, findCachedToolOutputByIdempotencyKey } from './runtime-kernel/tools/idempotency/toolIdempotency.js';
|
|
93
|
+
export { consumeCanonicalInferenceStream } from './runtime-kernel/llm/canonical-inference/orchestration/consumeCanonicalInferenceStream.js';
|
|
94
|
+
export { copyToolContextRuntimeCapability, ensureToolContextRuntimeCapability, getToolContextRuntimeBinding, readToolContextPersistedHistory, readToolContextWorkingHistory, stripRuntimeReservedToolContextPatch } from './runtime-kernel/tools/toolContextRuntime.js';
|
|
95
|
+
export { countToolCallsInCurrentRequest, readNonEmptyStrings, toDisplayStep } from './runtime-kernel/system-reminder/helpers.js';
|
|
96
|
+
export { createModelInputCompatibilityError } from './runtime-kernel/llm/input-capabilities/functions/createModelInputCompatibilityError.js';
|
|
97
|
+
export { defaultPolicyEngine } from './runtime-kernel/llm/policies/defaultPolicyEngine.js';
|
|
98
|
+
export { deriveModelInputRequirement } from './runtime-kernel/llm/input-capabilities/functions/deriveModelInputRequirement.js';
|
|
99
|
+
export { evaluateModelInputCompatibility, listCompatibleModelIds } from './runtime-kernel/llm/input-capabilities/functions/evaluateModelInputCompatibility.js';
|
|
100
|
+
export { isRuntimeFailureFact } from './runtime-kernel/graph-engine/functions/runtimeFailureFact.js';
|
|
101
|
+
export { noopAudit } from './runtime-kernel/audit/noopAudit.js';
|
|
102
|
+
export { normalizeToolArgs } from './runtime-kernel/tools/argNormalizer.js';
|
|
103
|
+
export { projectChildRuntimeEventToSubRunTrace } from './runtime-kernel/child-run-trace/projectChildRuntimeEventToSubRunTrace.js';
|
|
104
|
+
export { readCheckpointContextUsage } from './runtime-kernel/graph-engine/functions/engineStateSnapshot.js';
|
|
105
|
+
export { requestEnricherRegistry } from './runtime-kernel/enrichment/registry.js';
|
|
106
|
+
export { resolveToolModelInput } from './runtime-kernel/tools/model-input/orchestration/resolveToolModelInput.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LlmRequestMessage } from '../ports/llm-call.cjs';
|
|
2
|
+
import { TokenizerPort } from '../ports/tokenizer.cjs';
|
|
3
|
+
|
|
4
|
+
interface DefaultTokenizerPortConfig {
|
|
5
|
+
/** Host 显式选择的 tiktoken encoding 名;未提供时使用字符/token 粗估。 */
|
|
6
|
+
encoding?: string;
|
|
7
|
+
/** tiktoken 不可用或不指定 encoding 时的字符/token 兜底比。 */
|
|
8
|
+
avgCharsPerToken?: number;
|
|
9
|
+
/** 单个 tool_call 的额外 token 开销估算。 */
|
|
10
|
+
toolCallOverhead?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* linnkit 默认 tokenizer。
|
|
14
|
+
*
|
|
15
|
+
* 中文备注:
|
|
16
|
+
* - 这是 TokenCalculator 的薄包装,保持 0.7.x 默认行为;
|
|
17
|
+
* - host 不注入 TokenizerPort 时,context-manager 自动使用该实现;
|
|
18
|
+
* - 只用于上下文 budget 估算,不用于计费。
|
|
19
|
+
*/
|
|
20
|
+
declare class DefaultTokenizerPort implements TokenizerPort {
|
|
21
|
+
private readonly config;
|
|
22
|
+
constructor(config?: DefaultTokenizerPortConfig);
|
|
23
|
+
estimateText(text: string, _modelId?: string): number;
|
|
24
|
+
estimateMessage(message: LlmRequestMessage, _modelId?: string): number;
|
|
25
|
+
}
|
|
26
|
+
declare function createDefaultTokenizerPort(config?: DefaultTokenizerPortConfig): TokenizerPort;
|
|
27
|
+
|
|
28
|
+
export { DefaultTokenizerPort, createDefaultTokenizerPort };
|
|
29
|
+
export type { DefaultTokenizerPortConfig };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LlmRequestMessage } from '../ports/llm-call.js';
|
|
2
|
+
import { TokenizerPort } from '../ports/tokenizer.js';
|
|
3
|
+
|
|
4
|
+
interface DefaultTokenizerPortConfig {
|
|
5
|
+
/** Host 显式选择的 tiktoken encoding 名;未提供时使用字符/token 粗估。 */
|
|
6
|
+
encoding?: string;
|
|
7
|
+
/** tiktoken 不可用或不指定 encoding 时的字符/token 兜底比。 */
|
|
8
|
+
avgCharsPerToken?: number;
|
|
9
|
+
/** 单个 tool_call 的额外 token 开销估算。 */
|
|
10
|
+
toolCallOverhead?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* linnkit 默认 tokenizer。
|
|
14
|
+
*
|
|
15
|
+
* 中文备注:
|
|
16
|
+
* - 这是 TokenCalculator 的薄包装,保持 0.7.x 默认行为;
|
|
17
|
+
* - host 不注入 TokenizerPort 时,context-manager 自动使用该实现;
|
|
18
|
+
* - 只用于上下文 budget 估算,不用于计费。
|
|
19
|
+
*/
|
|
20
|
+
declare class DefaultTokenizerPort implements TokenizerPort {
|
|
21
|
+
private readonly config;
|
|
22
|
+
constructor(config?: DefaultTokenizerPortConfig);
|
|
23
|
+
estimateText(text: string, _modelId?: string): number;
|
|
24
|
+
estimateMessage(message: LlmRequestMessage, _modelId?: string): number;
|
|
25
|
+
}
|
|
26
|
+
declare function createDefaultTokenizerPort(config?: DefaultTokenizerPortConfig): TokenizerPort;
|
|
27
|
+
|
|
28
|
+
export { DefaultTokenizerPort, createDefaultTokenizerPort };
|
|
29
|
+
export type { DefaultTokenizerPortConfig };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file src/agent/shared/errorClassifier.ts
|
|
3
|
+
*
|
|
4
|
+
* @brief Agent runtime 自己拥有的错误分类器
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* 错误分类与重试策略属于 Agent runtime 的执行协议,不应该继续由 app shared owner 持有。
|
|
8
|
+
*/
|
|
9
|
+
declare enum ErrorCategory {
|
|
10
|
+
RETRYABLE = "retryable",
|
|
11
|
+
NON_RETRYABLE = "non_retryable",
|
|
12
|
+
RATE_LIMIT = "rate_limit"
|
|
13
|
+
}
|
|
14
|
+
declare const ENGINE_ERROR_CODES: {
|
|
15
|
+
readonly LLM_RATE_LIMIT: "llm.rate_limit";
|
|
16
|
+
readonly LLM_INVALID_TOOL_ARGS: "llm.invalid_tool_args";
|
|
17
|
+
readonly LLM_PROVIDER_DOWN: "llm.provider_down";
|
|
18
|
+
readonly LLM_UNSUPPORTED_CAPABILITY: "llm.unsupported_capability";
|
|
19
|
+
readonly LLM_AUTH_FAILED: "llm.auth_failed";
|
|
20
|
+
readonly LLM_INVALID_REQUEST: "llm.invalid_request";
|
|
21
|
+
readonly LLM_RESOURCE_NOT_FOUND: "llm.resource_not_found";
|
|
22
|
+
readonly LLM_OUTPUT_LIMIT_REACHED: "llm.output_limit_reached";
|
|
23
|
+
readonly LLM_CONTENT_FILTERED: "llm.content_filtered";
|
|
24
|
+
readonly TOOL_TIMEOUT: "tool.timeout";
|
|
25
|
+
readonly TOOL_PROTOCOL_FUSE: "tool.protocol_fuse";
|
|
26
|
+
readonly ENGINE_DELEGATE_DEPTH: "engine.delegate_depth_exceeded";
|
|
27
|
+
readonly ENGINE_BUDGET_EXHAUSTED: "engine.budget_exhausted";
|
|
28
|
+
readonly ENGINE_UNKNOWN: "engine.unknown";
|
|
29
|
+
};
|
|
30
|
+
interface ErrorClassification {
|
|
31
|
+
category: ErrorCategory;
|
|
32
|
+
reason: string;
|
|
33
|
+
suggestedDelay: number | null;
|
|
34
|
+
errorCode: string;
|
|
35
|
+
recoverable: boolean;
|
|
36
|
+
retryAfterMs?: number;
|
|
37
|
+
hint?: string;
|
|
38
|
+
metadata?: Record<string, unknown>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { ENGINE_ERROR_CODES, ErrorCategory };
|
|
42
|
+
export type { ErrorClassification };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file src/agent/shared/errorClassifier.ts
|
|
3
|
+
*
|
|
4
|
+
* @brief Agent runtime 自己拥有的错误分类器
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* 错误分类与重试策略属于 Agent runtime 的执行协议,不应该继续由 app shared owner 持有。
|
|
8
|
+
*/
|
|
9
|
+
declare enum ErrorCategory {
|
|
10
|
+
RETRYABLE = "retryable",
|
|
11
|
+
NON_RETRYABLE = "non_retryable",
|
|
12
|
+
RATE_LIMIT = "rate_limit"
|
|
13
|
+
}
|
|
14
|
+
declare const ENGINE_ERROR_CODES: {
|
|
15
|
+
readonly LLM_RATE_LIMIT: "llm.rate_limit";
|
|
16
|
+
readonly LLM_INVALID_TOOL_ARGS: "llm.invalid_tool_args";
|
|
17
|
+
readonly LLM_PROVIDER_DOWN: "llm.provider_down";
|
|
18
|
+
readonly LLM_UNSUPPORTED_CAPABILITY: "llm.unsupported_capability";
|
|
19
|
+
readonly LLM_AUTH_FAILED: "llm.auth_failed";
|
|
20
|
+
readonly LLM_INVALID_REQUEST: "llm.invalid_request";
|
|
21
|
+
readonly LLM_RESOURCE_NOT_FOUND: "llm.resource_not_found";
|
|
22
|
+
readonly LLM_OUTPUT_LIMIT_REACHED: "llm.output_limit_reached";
|
|
23
|
+
readonly LLM_CONTENT_FILTERED: "llm.content_filtered";
|
|
24
|
+
readonly TOOL_TIMEOUT: "tool.timeout";
|
|
25
|
+
readonly TOOL_PROTOCOL_FUSE: "tool.protocol_fuse";
|
|
26
|
+
readonly ENGINE_DELEGATE_DEPTH: "engine.delegate_depth_exceeded";
|
|
27
|
+
readonly ENGINE_BUDGET_EXHAUSTED: "engine.budget_exhausted";
|
|
28
|
+
readonly ENGINE_UNKNOWN: "engine.unknown";
|
|
29
|
+
};
|
|
30
|
+
interface ErrorClassification {
|
|
31
|
+
category: ErrorCategory;
|
|
32
|
+
reason: string;
|
|
33
|
+
suggestedDelay: number | null;
|
|
34
|
+
errorCode: string;
|
|
35
|
+
recoverable: boolean;
|
|
36
|
+
retryAfterMs?: number;
|
|
37
|
+
hint?: string;
|
|
38
|
+
metadata?: Record<string, unknown>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { ENGINE_ERROR_CODES, ErrorCategory };
|
|
42
|
+
export type { ErrorClassification };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare class LlmAuditProjectionError extends Error {
|
|
2
|
+
readonly valuePath: string;
|
|
3
|
+
constructor(valuePath: string, message: string);
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* durable audit 必须保留完整文本和工具协议,但不能接收物化 bytes 或 provider 图片 part。
|
|
7
|
+
* attachments 只能通过 RuntimeResourceRef 严格 schema,借此阻断 resolved attachment 混入。
|
|
8
|
+
*/
|
|
9
|
+
declare function projectDurableLlmAuditValue<T>(value: T): T;
|
|
10
|
+
|
|
11
|
+
export { LlmAuditProjectionError, projectDurableLlmAuditValue };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare class LlmAuditProjectionError extends Error {
|
|
2
|
+
readonly valuePath: string;
|
|
3
|
+
constructor(valuePath: string, message: string);
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* durable audit 必须保留完整文本和工具协议,但不能接收物化 bytes 或 provider 图片 part。
|
|
7
|
+
* attachments 只能通过 RuntimeResourceRef 严格 schema,借此阻断 resolved attachment 混入。
|
|
8
|
+
*/
|
|
9
|
+
declare function projectDurableLlmAuditValue<T>(value: T): T;
|
|
10
|
+
|
|
11
|
+
export { LlmAuditProjectionError, projectDurableLlmAuditValue };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file src/agent/shared/llmAuditRecorder.ts
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* Agent runtime 对 LLM 审计的最小记录协议。
|
|
6
|
+
*
|
|
7
|
+
* 说明:
|
|
8
|
+
* - runtime-kernel 只需要“记录”审计片段;
|
|
9
|
+
* - AsyncLocalStorage、落盘、Documents 路径等都属于宿主实现,不应反向依赖到 agent package。
|
|
10
|
+
*/
|
|
11
|
+
interface ContextManagerAuditRecordInput {
|
|
12
|
+
payload?: unknown;
|
|
13
|
+
contextMessages?: unknown[];
|
|
14
|
+
llmMessages?: unknown[];
|
|
15
|
+
toolNames?: string[];
|
|
16
|
+
systemReminder?: {
|
|
17
|
+
ruleIds?: string[];
|
|
18
|
+
};
|
|
19
|
+
contextTrace?: unknown;
|
|
20
|
+
}
|
|
21
|
+
interface ToolProtocolErrorAuditInput {
|
|
22
|
+
toolName: string;
|
|
23
|
+
toolCallId?: string;
|
|
24
|
+
rawArguments?: string;
|
|
25
|
+
parsedArguments?: Record<string, unknown>;
|
|
26
|
+
error: string;
|
|
27
|
+
}
|
|
28
|
+
interface RunTranscriptAuditInput {
|
|
29
|
+
transcriptMessages: unknown[];
|
|
30
|
+
toolset?: {
|
|
31
|
+
availableTools?: string[];
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
interface LlmAuditRecorder {
|
|
35
|
+
recordBeforeContextManager?(params: ContextManagerAuditRecordInput): void;
|
|
36
|
+
recordAfterContextManager?(params: ContextManagerAuditRecordInput): void;
|
|
37
|
+
recordAfterContextManagerOnSystemReminderHit?(params: ContextManagerAuditRecordInput): void;
|
|
38
|
+
recordToolProtocolError?(params: ToolProtocolErrorAuditInput): void;
|
|
39
|
+
recordRunTranscript?(params: RunTranscriptAuditInput): void;
|
|
40
|
+
}
|
|
41
|
+
declare function setLlmAuditRecorder(next: LlmAuditRecorder | null): void;
|
|
42
|
+
|
|
43
|
+
export { setLlmAuditRecorder };
|
|
44
|
+
export type { ContextManagerAuditRecordInput, LlmAuditRecorder, RunTranscriptAuditInput, ToolProtocolErrorAuditInput };
|