veryfront 0.1.558 → 0.1.560
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/esm/cli/commands/doctor/version-checks.d.ts.map +1 -1
- package/esm/cli/commands/doctor/version-checks.js +3 -1
- package/esm/deno.d.ts +1 -0
- package/esm/deno.js +5 -4
- package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts +3 -0
- package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/browser-chunk-encoder.js +1 -0
- package/esm/src/agent/ag-ui/browser-encoder.d.ts +8 -0
- package/esm/src/agent/ag-ui/browser-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/browser-encoder.js +4 -0
- package/esm/src/agent/ag-ui/browser-finalize-tracker.d.ts +3 -0
- package/esm/src/agent/ag-ui/browser-finalize-tracker.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/browser-finalize-tracker.js +1 -0
- package/esm/src/agent/ag-ui/browser-response-stream.d.ts +5 -0
- package/esm/src/agent/ag-ui/browser-response-stream.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/browser-response-stream.js +1 -0
- package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.d.ts +9 -0
- package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.js +6 -0
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.d.ts +3 -0
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.js +1 -0
- package/esm/src/agent/ag-ui/detached-start.d.ts +13 -2
- package/esm/src/agent/ag-ui/detached-start.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/detached-start.js +9 -2
- package/esm/src/agent/ag-ui/forwarded-context.d.ts +8 -0
- package/esm/src/agent/ag-ui/forwarded-context.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/forwarded-context.js +7 -0
- package/esm/src/agent/ag-ui/handler.d.ts +4 -0
- package/esm/src/agent/ag-ui/handler.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/handler.js +1 -0
- package/esm/src/agent/ag-ui/host-support.d.ts +13 -1
- package/esm/src/agent/ag-ui/host-support.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/host-support.js +11 -3
- package/esm/src/agent/ag-ui/run-control.d.ts +8 -1
- package/esm/src/agent/ag-ui/run-control.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/run-control.js +5 -1
- package/esm/src/agent/ag-ui/runtime-browser-response.d.ts +2 -0
- package/esm/src/agent/ag-ui/runtime-browser-response.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/runtime-browser-response.js +1 -0
- package/esm/src/agent/ag-ui/runtime-chat-stream-encoder.d.ts +4 -0
- package/esm/src/agent/ag-ui/runtime-chat-stream-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/runtime-chat-stream-encoder.js +1 -0
- package/esm/src/agent/ag-ui/runtime-event-encoder.d.ts +3 -0
- package/esm/src/agent/ag-ui/runtime-event-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/runtime-event-encoder.js +1 -0
- package/esm/src/agent/ag-ui/runtime-handler.d.ts +7 -0
- package/esm/src/agent/ag-ui/runtime-handler.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/runtime-handler.js +1 -0
- package/esm/src/agent/ag-ui/runtime-support.d.ts +1 -0
- package/esm/src/agent/ag-ui/runtime-support.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/runtime-support.js +1 -0
- package/esm/src/agent/ag-ui/tool-shared.d.ts +1 -0
- package/esm/src/agent/ag-ui/tool-shared.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/tracked-browser-response.d.ts +2 -0
- package/esm/src/agent/ag-ui/tracked-browser-response.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/tracked-browser-response.js +1 -0
- package/esm/src/agent/artifacts/default-research-artifact-policy.d.ts +5 -0
- package/esm/src/agent/artifacts/default-research-artifact-policy.d.ts.map +1 -1
- package/esm/src/agent/artifacts/default-research-artifact-policy.js +4 -0
- package/esm/src/agent/artifacts/default-research-artifact-support.d.ts +10 -0
- package/esm/src/agent/artifacts/default-research-artifact-support.d.ts.map +1 -1
- package/esm/src/agent/artifacts/default-research-artifact-support.js +7 -0
- package/esm/src/agent/artifacts/slash-command-artifact-policy.d.ts +4 -0
- package/esm/src/agent/artifacts/slash-command-artifact-policy.d.ts.map +1 -1
- package/esm/src/agent/artifacts/slash-command-artifact-policy.js +2 -0
- package/esm/src/agent/child-run/execution-cleanup.d.ts +4 -0
- package/esm/src/agent/child-run/execution-cleanup.d.ts.map +1 -1
- package/esm/src/agent/child-run/execution-cleanup.js +2 -0
- package/esm/src/agent/child-run/execution-snapshot.d.ts +13 -0
- package/esm/src/agent/child-run/execution-snapshot.d.ts.map +1 -1
- package/esm/src/agent/child-run/execution-snapshot.js +7 -0
- package/esm/src/agent/child-run/execution-support.d.ts +4 -0
- package/esm/src/agent/child-run/execution-support.d.ts.map +1 -1
- package/esm/src/agent/child-run/execution-support.js +4 -0
- package/esm/src/agent/child-run/final-step-support.d.ts +3 -0
- package/esm/src/agent/child-run/final-step-support.d.ts.map +1 -1
- package/esm/src/agent/child-run/final-step-support.js +3 -0
- package/esm/src/agent/child-run/invoke-agent-child-runs.d.ts +21 -3
- package/esm/src/agent/child-run/invoke-agent-child-runs.d.ts.map +1 -1
- package/esm/src/agent/child-run/invoke-agent-child-runs.js +16 -3
- package/esm/src/agent/child-run/result-summary.d.ts +5 -0
- package/esm/src/agent/child-run/result-summary.d.ts.map +1 -1
- package/esm/src/agent/child-run/result-summary.js +5 -0
- package/esm/src/agent/composition/composition.d.ts +9 -0
- package/esm/src/agent/composition/composition.d.ts.map +1 -1
- package/esm/src/agent/composition/composition.js +6 -0
- package/esm/src/agent/conversation/bootstrap.d.ts +21 -2
- package/esm/src/agent/conversation/bootstrap.d.ts.map +1 -1
- package/esm/src/agent/conversation/bootstrap.js +16 -2
- package/esm/src/agent/conversation/delegation-policy.d.ts +32 -0
- package/esm/src/agent/conversation/delegation-policy.d.ts.map +1 -1
- package/esm/src/agent/conversation/delegation-policy.js +30 -0
- package/esm/src/agent/conversation/durable.d.ts +59 -6
- package/esm/src/agent/conversation/durable.d.ts.map +1 -1
- package/esm/src/agent/conversation/durable.js +44 -6
- package/esm/src/agent/conversation/hosted-lifecycle.d.ts +6 -0
- package/esm/src/agent/conversation/hosted-lifecycle.d.ts.map +1 -1
- package/esm/src/agent/conversation/hosted-lifecycle.js +3 -0
- package/esm/src/agent/conversation/hosted-terminal.d.ts +15 -0
- package/esm/src/agent/conversation/hosted-terminal.d.ts.map +1 -1
- package/esm/src/agent/conversation/hosted-terminal.js +9 -0
- package/esm/src/agent/conversation/root-run-context.d.ts +6 -0
- package/esm/src/agent/conversation/root-run-context.d.ts.map +1 -1
- package/esm/src/agent/conversation/root-run-context.js +4 -0
- package/esm/src/agent/conversation/root-run-lifecycle.d.ts +7 -0
- package/esm/src/agent/conversation/root-run-lifecycle.d.ts.map +1 -1
- package/esm/src/agent/conversation/root-run-lifecycle.js +2 -0
- package/esm/src/agent/conversation/run-chunk-mirror.d.ts +13 -0
- package/esm/src/agent/conversation/run-chunk-mirror.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-chunk-mirror.js +2 -0
- package/esm/src/agent/conversation/run-context.d.ts +2 -0
- package/esm/src/agent/conversation/run-context.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-context.js +1 -0
- package/esm/src/agent/conversation/run-event-normalization.d.ts +3 -0
- package/esm/src/agent/conversation/run-event-normalization.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-event-normalization.js +3 -0
- package/esm/src/agent/conversation/run-event-preparation.d.ts +4 -0
- package/esm/src/agent/conversation/run-event-preparation.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-event-preparation.js +4 -0
- package/esm/src/agent/conversation/run-events.d.ts +8 -1
- package/esm/src/agent/conversation/run-events.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-events.js +7 -1
- package/esm/src/agent/conversation/run-mirror.d.ts +5 -0
- package/esm/src/agent/conversation/run-mirror.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-mirror.js +1 -0
- package/esm/src/agent/conversation/run-stream-mirror.d.ts +2 -0
- package/esm/src/agent/conversation/run-stream-mirror.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-stream-mirror.js +1 -0
- package/esm/src/agent/factory.d.ts +1 -0
- package/esm/src/agent/factory.d.ts.map +1 -1
- package/esm/src/agent/factory.js +1 -0
- package/esm/src/agent/hosted/ag-ui-chat-request.d.ts +11 -1
- package/esm/src/agent/hosted/ag-ui-chat-request.d.ts.map +1 -1
- package/esm/src/agent/hosted/ag-ui-chat-request.js +7 -1
- package/esm/src/agent/hosted/agent-project-steering.d.ts +6 -0
- package/esm/src/agent/hosted/agent-project-steering.d.ts.map +1 -1
- package/esm/src/agent/hosted/agent-project-steering.js +2 -0
- package/esm/src/agent/hosted/agent-run-lifecycle.d.ts +9 -0
- package/esm/src/agent/hosted/agent-run-lifecycle.d.ts.map +1 -1
- package/esm/src/agent/hosted/agent-run-lifecycle.js +2 -0
- package/esm/src/agent/hosted/chat-execution-lifecycle-types.d.ts +1 -0
- package/esm/src/agent/hosted/chat-execution-lifecycle-types.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-execution-runtime.d.ts +17 -0
- package/esm/src/agent/hosted/chat-execution-runtime.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-execution-runtime.js +8 -0
- package/esm/src/agent/hosted/chat-preparation.d.ts +14 -0
- package/esm/src/agent/hosted/chat-preparation.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-preparation.js +4 -0
- package/esm/src/agent/hosted/chat-request-parser.d.ts +8 -0
- package/esm/src/agent/hosted/chat-request-parser.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-request-parser.js +3 -0
- package/esm/src/agent/hosted/chat-request.d.ts +14 -3
- package/esm/src/agent/hosted/chat-request.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-request.js +12 -3
- package/esm/src/agent/hosted/chat-runtime-agent-adapter.d.ts +4 -0
- package/esm/src/agent/hosted/chat-runtime-agent-adapter.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-runtime-agent-adapter.js +1 -0
- package/esm/src/agent/hosted/chat-runtime-contract.d.ts +9 -0
- package/esm/src/agent/hosted/chat-runtime-contract.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts +6 -0
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.js +2 -0
- package/esm/src/agent/hosted/child-artifact-support.d.ts +9 -0
- package/esm/src/agent/hosted/child-artifact-support.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-artifact-support.js +5 -0
- package/esm/src/agent/hosted/child-bootstrap.d.ts +5 -0
- package/esm/src/agent/hosted/child-bootstrap.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-bootstrap.js +2 -0
- package/esm/src/agent/hosted/child-execution-logging.d.ts +8 -0
- package/esm/src/agent/hosted/child-execution-logging.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-execution-logging.js +5 -0
- package/esm/src/agent/hosted/child-fork-execution-runner.d.ts +10 -0
- package/esm/src/agent/hosted/child-fork-execution-runner.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-execution-runner.js +7 -0
- package/esm/src/agent/hosted/child-fork-instructions.d.ts +3 -0
- package/esm/src/agent/hosted/child-fork-instructions.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-instructions.js +2 -0
- package/esm/src/agent/hosted/child-fork-run-context.d.ts +16 -0
- package/esm/src/agent/hosted/child-fork-run-context.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-run-context.js +5 -0
- package/esm/src/agent/hosted/child-fork-runtime-start.d.ts +4 -0
- package/esm/src/agent/hosted/child-fork-runtime-start.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-runtime-start.js +1 -0
- package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts +5 -0
- package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-step-message-preparation.js +2 -0
- package/esm/src/agent/hosted/child-fork-stream-execution.d.ts +10 -0
- package/esm/src/agent/hosted/child-fork-stream-execution.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-stream-execution.js +4 -0
- package/esm/src/agent/hosted/child-fork-tool-sources.d.ts +6 -0
- package/esm/src/agent/hosted/child-fork-tool-sources.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-tool-sources.js +2 -0
- package/esm/src/agent/hosted/child-invoke-tool.d.ts +3 -0
- package/esm/src/agent/hosted/child-invoke-tool.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-invoke-tool.js +1 -0
- package/esm/src/agent/hosted/child-lifecycle.d.ts +9 -0
- package/esm/src/agent/hosted/child-lifecycle.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-lifecycle.js +3 -0
- package/esm/src/agent/hosted/child-mirror.d.ts +10 -0
- package/esm/src/agent/hosted/child-mirror.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-mirror.js +6 -0
- package/esm/src/agent/hosted/child-pending-tool-lifecycle.d.ts +11 -0
- package/esm/src/agent/hosted/child-pending-tool-lifecycle.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-pending-tool-lifecycle.js +2 -0
- package/esm/src/agent/hosted/child-requested-tools.d.ts +18 -0
- package/esm/src/agent/hosted/child-requested-tools.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-requested-tools.js +13 -0
- package/esm/src/agent/hosted/child-status.d.ts +11 -0
- package/esm/src/agent/hosted/child-status.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-status.js +6 -0
- package/esm/src/agent/hosted/child-steering-tools.d.ts +6 -0
- package/esm/src/agent/hosted/child-steering-tools.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-steering-tools.js +2 -0
- package/esm/src/agent/hosted/child-stream-watchdog.d.ts +8 -0
- package/esm/src/agent/hosted/child-stream-watchdog.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-stream-watchdog.js +6 -0
- package/esm/src/agent/hosted/child-tool-input.d.ts +9 -1
- package/esm/src/agent/hosted/child-tool-input.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-tool-input.js +6 -1
- package/esm/src/agent/hosted/cloud-chat-execution-preparation.d.ts +4 -0
- package/esm/src/agent/hosted/cloud-chat-execution-preparation.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-chat-execution-preparation.js +2 -0
- package/esm/src/agent/hosted/cloud-prepared-chat-execution-runtime.d.ts +2 -0
- package/esm/src/agent/hosted/cloud-prepared-chat-execution-runtime.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-prepared-chat-execution-runtime.js +1 -0
- package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts +3 -0
- package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-runtime-system-messages.js +2 -0
- package/esm/src/agent/hosted/default-chat-runtime.d.ts +10 -0
- package/esm/src/agent/hosted/default-chat-runtime.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-chat-runtime.js +1 -0
- package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts +17 -2
- package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-invoke-agent-tool.js +8 -2
- package/esm/src/agent/hosted/default-project-steering-refresh.d.ts +7 -0
- package/esm/src/agent/hosted/default-project-steering-refresh.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-project-steering-refresh.js +2 -0
- package/esm/src/agent/hosted/durable-chat-run-start.d.ts +9 -0
- package/esm/src/agent/hosted/durable-chat-run-start.d.ts.map +1 -1
- package/esm/src/agent/hosted/durable-chat-run-start.js +2 -0
- package/esm/src/agent/hosted/durable-child-fork-execution.d.ts +22 -0
- package/esm/src/agent/hosted/durable-child-fork-execution.d.ts.map +1 -1
- package/esm/src/agent/hosted/durable-child-fork-execution.js +6 -0
- package/esm/src/agent/hosted/finalized-message.d.ts +10 -0
- package/esm/src/agent/hosted/finalized-message.d.ts.map +1 -1
- package/esm/src/agent/hosted/finalized-message.js +4 -0
- package/esm/src/agent/hosted/form-input-tool.d.ts +2 -0
- package/esm/src/agent/hosted/form-input-tool.d.ts.map +1 -1
- package/esm/src/agent/hosted/form-input-tool.js +1 -0
- package/esm/src/agent/hosted/lifecycle.d.ts +6 -0
- package/esm/src/agent/hosted/lifecycle.d.ts.map +1 -1
- package/esm/src/agent/hosted/lifecycle.js +1 -0
- package/esm/src/agent/hosted/prepared-chat-execution.d.ts +6 -0
- package/esm/src/agent/hosted/prepared-chat-execution.d.ts.map +1 -1
- package/esm/src/agent/hosted/prepared-chat-execution.js +2 -0
- package/esm/src/agent/hosted/project-remote-tool-source.d.ts +8 -0
- package/esm/src/agent/hosted/project-remote-tool-source.d.ts.map +1 -1
- package/esm/src/agent/hosted/project-remote-tool-source.js +2 -0
- package/esm/src/agent/hosted/project-steering-adapter.d.ts +5 -0
- package/esm/src/agent/hosted/project-steering-adapter.d.ts.map +1 -1
- package/esm/src/agent/hosted/project-steering-adapter.js +1 -0
- package/esm/src/agent/hosted/response-stream.d.ts +4 -0
- package/esm/src/agent/hosted/response-stream.d.ts.map +1 -1
- package/esm/src/agent/hosted/response-stream.js +1 -0
- package/esm/src/agent/hosted/runtime-request-config.d.ts +8 -0
- package/esm/src/agent/hosted/runtime-request-config.d.ts.map +1 -1
- package/esm/src/agent/hosted/runtime-request-config.js +4 -0
- package/esm/src/agent/hosted/runtime-state-resolver.d.ts +7 -0
- package/esm/src/agent/hosted/runtime-state-resolver.d.ts.map +1 -1
- package/esm/src/agent/hosted/runtime-state-resolver.js +1 -0
- package/esm/src/agent/hosted/stream-finalization.d.ts +7 -0
- package/esm/src/agent/hosted/stream-finalization.d.ts.map +1 -1
- package/esm/src/agent/hosted/stream-finalization.js +2 -0
- package/esm/src/agent/hosted/stream-terminal-error.d.ts +4 -0
- package/esm/src/agent/hosted/stream-terminal-error.d.ts.map +1 -1
- package/esm/src/agent/hosted/stream-terminal-error.js +3 -0
- package/esm/src/agent/hosted/trace-attributes.d.ts +9 -0
- package/esm/src/agent/hosted/trace-attributes.d.ts.map +1 -1
- package/esm/src/agent/hosted/trace-attributes.js +6 -0
- package/esm/src/agent/hosted/veryfront-cloud-agent-service.d.ts +13 -0
- package/esm/src/agent/hosted/veryfront-cloud-agent-service.d.ts.map +1 -1
- package/esm/src/agent/hosted/veryfront-cloud-agent-service.js +4 -0
- package/esm/src/agent/input/human-input.d.ts +22 -0
- package/esm/src/agent/input/human-input.d.ts.map +1 -1
- package/esm/src/agent/input/human-input.js +10 -0
- package/esm/src/agent/input/request-protocol.d.ts +14 -0
- package/esm/src/agent/input/request-protocol.d.ts.map +1 -1
- package/esm/src/agent/input/request-protocol.js +12 -0
- package/esm/src/agent/memory/memory-interface.d.ts +3 -0
- package/esm/src/agent/memory/memory-interface.d.ts.map +1 -1
- package/esm/src/agent/memory/memory.d.ts +4 -0
- package/esm/src/agent/memory/memory.d.ts.map +1 -1
- package/esm/src/agent/memory/memory.js +4 -0
- package/esm/src/agent/memory/redis.d.ts +2 -0
- package/esm/src/agent/memory/redis.d.ts.map +1 -1
- package/esm/src/agent/memory/redis.js +2 -0
- package/esm/src/agent/project/agent-runtime.d.ts +10 -0
- package/esm/src/agent/project/agent-runtime.d.ts.map +1 -1
- package/esm/src/agent/project/agent-runtime.js +7 -0
- package/esm/src/agent/project/context.d.ts +3 -0
- package/esm/src/agent/project/context.d.ts.map +1 -1
- package/esm/src/agent/project/context.js +2 -0
- package/esm/src/agent/project/live-studio-mcp-tools.d.ts +3 -0
- package/esm/src/agent/project/live-studio-mcp-tools.d.ts.map +1 -1
- package/esm/src/agent/project/live-studio-mcp-tools.js +2 -0
- package/esm/src/agent/project/steering-mutation.d.ts +7 -0
- package/esm/src/agent/project/steering-mutation.d.ts.map +1 -1
- package/esm/src/agent/project/steering-mutation.js +4 -0
- package/esm/src/agent/react/use-agent.d.ts +3 -0
- package/esm/src/agent/react/use-agent.d.ts.map +1 -1
- package/esm/src/agent/react/use-agent.js +1 -0
- package/esm/src/agent/react/use-chat/types.d.ts +7 -2
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-completion.d.ts +2 -0
- package/esm/src/agent/react/use-completion.d.ts.map +1 -1
- package/esm/src/agent/react/use-streaming.d.ts +3 -0
- package/esm/src/agent/react/use-streaming.d.ts.map +1 -1
- package/esm/src/agent/react/use-streaming.js +1 -0
- package/esm/src/agent/react/use-voice-input.d.ts +3 -0
- package/esm/src/agent/react/use-voice-input.d.ts.map +1 -1
- package/esm/src/agent/react/use-voice-input.js +1 -0
- package/esm/src/agent/runtime/ag-ui-contract.d.ts +11 -0
- package/esm/src/agent/runtime/ag-ui-contract.d.ts.map +1 -1
- package/esm/src/agent/runtime/ag-ui-contract.js +9 -2
- package/esm/src/agent/runtime/agent-definition-files.d.ts +7 -0
- package/esm/src/agent/runtime/agent-definition-files.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-definition-files.js +5 -0
- package/esm/src/agent/runtime/agent-definition.d.ts +19 -3
- package/esm/src/agent/runtime/agent-definition.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-definition.js +15 -3
- package/esm/src/agent/runtime/agent-invocation-contract.d.ts +52 -13
- package/esm/src/agent/runtime/agent-invocation-contract.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-invocation-contract.js +45 -15
- package/esm/src/agent/runtime/agent-markdown-adapter.d.ts +3 -0
- package/esm/src/agent/runtime/agent-markdown-adapter.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-markdown-adapter.js +3 -0
- package/esm/src/agent/runtime/builtin-skill-files.d.ts +10 -0
- package/esm/src/agent/runtime/builtin-skill-files.d.ts.map +1 -1
- package/esm/src/agent/runtime/builtin-skill-files.js +9 -0
- package/esm/src/agent/runtime/client-profile.d.ts +17 -3
- package/esm/src/agent/runtime/client-profile.d.ts.map +1 -1
- package/esm/src/agent/runtime/client-profile.js +14 -3
- package/esm/src/agent/runtime/index.d.ts +1 -0
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +1 -0
- package/esm/src/agent/runtime/load-skill-tool.d.ts +11 -0
- package/esm/src/agent/runtime/load-skill-tool.d.ts.map +1 -1
- package/esm/src/agent/runtime/load-skill-tool.js +3 -0
- package/esm/src/agent/runtime/message-adapter.d.ts +9 -0
- package/esm/src/agent/runtime/message-adapter.d.ts.map +1 -1
- package/esm/src/agent/runtime/message-adapter.js +7 -0
- package/esm/src/agent/runtime/message-file-url-refresh.d.ts +3 -0
- package/esm/src/agent/runtime/message-file-url-refresh.d.ts.map +1 -1
- package/esm/src/agent/runtime/message-file-url-refresh.js +1 -0
- package/esm/src/agent/runtime/message-preparation.d.ts +2 -0
- package/esm/src/agent/runtime/message-preparation.d.ts.map +1 -1
- package/esm/src/agent/runtime/message-preparation.js +1 -0
- package/esm/src/agent/runtime/project-files-client.d.ts +18 -2
- package/esm/src/agent/runtime/project-files-client.d.ts.map +1 -1
- package/esm/src/agent/runtime/project-files-client.js +10 -2
- package/esm/src/agent/runtime/project-skill-catalog.d.ts +6 -0
- package/esm/src/agent/runtime/project-skill-catalog.d.ts.map +1 -1
- package/esm/src/agent/runtime/project-skill-catalog.js +3 -0
- package/esm/src/agent/runtime/project-skill-loader.d.ts +6 -0
- package/esm/src/agent/runtime/project-skill-loader.d.ts.map +1 -1
- package/esm/src/agent/runtime/project-skill-loader.js +1 -0
- package/esm/src/agent/runtime/prompt-block.d.ts +2 -0
- package/esm/src/agent/runtime/prompt-block.d.ts.map +1 -1
- package/esm/src/agent/runtime/prompt-block.js +1 -0
- package/esm/src/agent/runtime/provider-native-tool-inventory.d.ts +4 -0
- package/esm/src/agent/runtime/provider-native-tool-inventory.d.ts.map +1 -1
- package/esm/src/agent/runtime/provider-native-tool-inventory.js +3 -0
- package/esm/src/agent/runtime/provider-tool-compat.d.ts +7 -0
- package/esm/src/agent/runtime/provider-tool-compat.d.ts.map +1 -1
- package/esm/src/agent/runtime/provider-tool-compat.js +4 -0
- package/esm/src/agent/runtime/resume-session.d.ts +9 -0
- package/esm/src/agent/runtime/resume-session.d.ts.map +1 -1
- package/esm/src/agent/runtime/resume-session.js +7 -0
- package/esm/src/agent/runtime/skill-metadata.d.ts +14 -1
- package/esm/src/agent/runtime/skill-metadata.d.ts.map +1 -1
- package/esm/src/agent/runtime/skill-metadata.js +8 -1
- package/esm/src/agent/runtime/skill-prompt.d.ts +3 -0
- package/esm/src/agent/runtime/skill-prompt.d.ts.map +1 -1
- package/esm/src/agent/runtime/skill-prompt.js +3 -0
- package/esm/src/agent/runtime/tool-inventory.d.ts +2 -0
- package/esm/src/agent/runtime/tool-inventory.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-inventory.js +2 -0
- package/esm/src/agent/runtime/upload-url-client.d.ts +4 -0
- package/esm/src/agent/runtime/upload-url-client.d.ts.map +1 -1
- package/esm/src/agent/runtime/upload-url-client.js +1 -0
- package/esm/src/agent/schemas/agent.schema.d.ts +14 -0
- package/esm/src/agent/schemas/agent.schema.d.ts.map +1 -1
- package/esm/src/agent/service/abort-rejection-guard.d.ts +8 -0
- package/esm/src/agent/service/abort-rejection-guard.d.ts.map +1 -1
- package/esm/src/agent/service/abort-rejection-guard.js +2 -0
- package/esm/src/agent/service/auth.d.ts +16 -0
- package/esm/src/agent/service/auth.d.ts.map +1 -1
- package/esm/src/agent/service/auth.js +4 -0
- package/esm/src/agent/service/before-stream.d.ts +4 -0
- package/esm/src/agent/service/before-stream.d.ts.map +1 -1
- package/esm/src/agent/service/bootstrap.d.ts +7 -0
- package/esm/src/agent/service/bootstrap.d.ts.map +1 -1
- package/esm/src/agent/service/bootstrap.js +2 -0
- package/esm/src/agent/service/config.d.ts +11 -0
- package/esm/src/agent/service/config.d.ts.map +1 -1
- package/esm/src/agent/service/config.js +10 -0
- package/esm/src/agent/service/definition.d.ts +5 -0
- package/esm/src/agent/service/definition.d.ts.map +1 -1
- package/esm/src/agent/service/detached-run-tracker.d.ts +8 -0
- package/esm/src/agent/service/detached-run-tracker.d.ts.map +1 -1
- package/esm/src/agent/service/detached-run-tracker.js +2 -0
- package/esm/src/agent/service/env-files.d.ts +6 -0
- package/esm/src/agent/service/env-files.d.ts.map +1 -1
- package/esm/src/agent/service/env-files.js +2 -0
- package/esm/src/agent/service/external-worker-client.d.ts +16 -0
- package/esm/src/agent/service/external-worker-client.d.ts.map +1 -1
- package/esm/src/agent/service/external-worker-client.js +5 -0
- package/esm/src/agent/service/node-runtime-infrastructure.d.ts +6 -0
- package/esm/src/agent/service/node-runtime-infrastructure.d.ts.map +1 -1
- package/esm/src/agent/service/node-runtime-infrastructure.js +2 -0
- package/esm/src/agent/service/node-telemetry.d.ts +18 -0
- package/esm/src/agent/service/node-telemetry.d.ts.map +1 -1
- package/esm/src/agent/service/node-telemetry.js +4 -0
- package/esm/src/agent/service/registration.d.ts +16 -0
- package/esm/src/agent/service/registration.d.ts.map +1 -1
- package/esm/src/agent/service/registration.js +10 -0
- package/esm/src/agent/service/request-auth-cache.d.ts +4 -0
- package/esm/src/agent/service/request-auth-cache.d.ts.map +1 -1
- package/esm/src/agent/service/request-auth-cache.js +1 -0
- package/esm/src/agent/service/response-like.d.ts +1 -0
- package/esm/src/agent/service/response-like.d.ts.map +1 -1
- package/esm/src/agent/service/response-like.js +1 -0
- package/esm/src/agent/service/routes.d.ts +15 -0
- package/esm/src/agent/service/routes.d.ts.map +1 -1
- package/esm/src/agent/service/routes.js +1 -0
- package/esm/src/agent/service/runtime.d.ts +21 -0
- package/esm/src/agent/service/runtime.d.ts.map +1 -1
- package/esm/src/agent/service/runtime.js +5 -0
- package/esm/src/agent/service/server.d.ts +9 -0
- package/esm/src/agent/service/server.d.ts.map +1 -1
- package/esm/src/agent/service/server.js +3 -0
- package/esm/src/agent/streaming/chat-ui-message-stream.d.ts +4 -0
- package/esm/src/agent/streaming/chat-ui-message-stream.d.ts.map +1 -1
- package/esm/src/agent/streaming/chat-ui-message-stream.js +1 -0
- package/esm/src/agent/streaming/data-stream.d.ts +6 -0
- package/esm/src/agent/streaming/data-stream.d.ts.map +1 -1
- package/esm/src/agent/streaming/data-stream.js +6 -0
- package/esm/src/agent/streaming/fork-runtime-stream.d.ts +41 -4
- package/esm/src/agent/streaming/fork-runtime-stream.d.ts.map +1 -1
- package/esm/src/agent/streaming/fork-runtime-stream.js +25 -3
- package/esm/src/agent/streaming/mirrored-tool-chunk-state.d.ts +15 -0
- package/esm/src/agent/streaming/mirrored-tool-chunk-state.d.ts.map +1 -1
- package/esm/src/agent/streaming/mirrored-tool-chunk-state.js +8 -0
- package/esm/src/agent/streaming/tool-execution-data-event-bridge.d.ts +3 -0
- package/esm/src/agent/streaming/tool-execution-data-event-bridge.d.ts.map +1 -1
- package/esm/src/agent/streaming/tool-execution-data-event-bridge.js +1 -0
- package/esm/src/agent/testing/agent-tester.d.ts +8 -0
- package/esm/src/agent/testing/agent-tester.d.ts.map +1 -1
- package/esm/src/agent/testing/agent-tester.js +5 -0
- package/esm/src/agent/testing/durable-run-canaries/cli-runner.d.ts +3 -0
- package/esm/src/agent/testing/durable-run-canaries/cli-runner.d.ts.map +1 -1
- package/esm/src/agent/testing/durable-run-canaries/cli-runner.js +1 -0
- package/esm/src/agent/testing/durable-run-canaries/environment.d.ts +3 -0
- package/esm/src/agent/testing/durable-run-canaries/environment.d.ts.map +1 -1
- package/esm/src/agent/testing/durable-run-canaries/environment.js +2 -0
- package/esm/src/agent/testing/durable-run-canaries/runner.d.ts +16 -0
- package/esm/src/agent/testing/durable-run-canaries/runner.d.ts.map +1 -1
- package/esm/src/agent/testing/durable-run-canaries/runner.js +5 -0
- package/esm/src/agent/testing/durable-run-canaries/validation.d.ts +5 -0
- package/esm/src/agent/testing/durable-run-canaries/validation.d.ts.map +1 -1
- package/esm/src/agent/testing/durable-run-canaries/validation.js +5 -0
- package/esm/src/agent/testing/live-evals/api-client.d.ts +24 -0
- package/esm/src/agent/testing/live-evals/api-client.d.ts.map +1 -1
- package/esm/src/agent/testing/live-evals/api-client.js +11 -0
- package/esm/src/agent/testing/live-evals/cli-runner.d.ts +4 -0
- package/esm/src/agent/testing/live-evals/cli-runner.d.ts.map +1 -1
- package/esm/src/agent/testing/live-evals/cli-runner.js +1 -0
- package/esm/src/agent/testing/live-evals/environment.d.ts +3 -0
- package/esm/src/agent/testing/live-evals/environment.d.ts.map +1 -1
- package/esm/src/agent/testing/live-evals/environment.js +2 -0
- package/esm/src/agent/testing/live-evals/formatting.d.ts +4 -0
- package/esm/src/agent/testing/live-evals/formatting.d.ts.map +1 -1
- package/esm/src/agent/testing/live-evals/formatting.js +4 -0
- package/esm/src/agent/testing/live-evals/metadata.d.ts +8 -0
- package/esm/src/agent/testing/live-evals/metadata.d.ts.map +1 -1
- package/esm/src/agent/testing/live-evals/metadata.js +4 -0
- package/esm/src/agent/testing/live-evals/performance.d.ts +4 -0
- package/esm/src/agent/testing/live-evals/performance.d.ts.map +1 -1
- package/esm/src/agent/testing/live-evals/performance.js +1 -0
- package/esm/src/agent/testing/live-evals/preflight.d.ts +3 -0
- package/esm/src/agent/testing/live-evals/preflight.d.ts.map +1 -1
- package/esm/src/agent/testing/live-evals/preflight.js +2 -0
- package/esm/src/agent/testing/live-evals/report.d.ts +9 -0
- package/esm/src/agent/testing/live-evals/report.d.ts.map +1 -1
- package/esm/src/agent/testing/live-evals/report.js +6 -0
- package/esm/src/agent/testing/live-evals/request.d.ts +2 -0
- package/esm/src/agent/testing/live-evals/request.d.ts.map +1 -1
- package/esm/src/agent/testing/live-evals/request.js +2 -0
- package/esm/src/agent/testing/live-evals/result.d.ts +4 -0
- package/esm/src/agent/testing/live-evals/result.d.ts.map +1 -1
- package/esm/src/agent/testing/live-evals/result.js +3 -0
- package/esm/src/agent/testing/live-evals/runner.d.ts +11 -0
- package/esm/src/agent/testing/live-evals/runner.d.ts.map +1 -1
- package/esm/src/agent/testing/live-evals/runner.js +5 -0
- package/esm/src/agent/types.d.ts +18 -0
- package/esm/src/agent/types.d.ts.map +1 -1
- package/esm/src/agent/types.js +4 -0
- package/esm/src/channels/control-plane.d.ts +32 -0
- package/esm/src/channels/control-plane.d.ts.map +1 -1
- package/esm/src/channels/control-plane.js +22 -0
- package/esm/src/channels/invoke.d.ts +24 -0
- package/esm/src/channels/invoke.d.ts.map +1 -1
- package/esm/src/channels/invoke.js +18 -0
- package/esm/src/chat/ag-ui.d.ts +37 -5
- package/esm/src/chat/ag-ui.d.ts.map +1 -1
- package/esm/src/chat/ag-ui.js +25 -5
- package/esm/src/chat/chat-ui-message-helpers.d.ts +7 -0
- package/esm/src/chat/chat-ui-message-helpers.d.ts.map +1 -1
- package/esm/src/chat/chat-ui-message-helpers.js +6 -0
- package/esm/src/chat/conversation.d.ts +52 -5
- package/esm/src/chat/conversation.d.ts.map +1 -1
- package/esm/src/chat/conversation.js +42 -5
- package/esm/src/chat/final-step-fallback.d.ts +20 -0
- package/esm/src/chat/final-step-fallback.d.ts.map +1 -1
- package/esm/src/chat/final-step-fallback.js +14 -0
- package/esm/src/chat/hosted-ui-chunk-mapping.d.ts +3 -0
- package/esm/src/chat/hosted-ui-chunk-mapping.d.ts.map +1 -1
- package/esm/src/chat/hosted-ui-chunk-mapping.js +1 -0
- package/esm/src/chat/message-prep.d.ts +18 -0
- package/esm/src/chat/message-prep.d.ts.map +1 -1
- package/esm/src/chat/message-prep.js +18 -0
- package/esm/src/chat/protocol.d.ts +25 -0
- package/esm/src/chat/protocol.d.ts.map +1 -1
- package/esm/src/chat/provider-errors.d.ts +6 -0
- package/esm/src/chat/provider-errors.d.ts.map +1 -1
- package/esm/src/chat/provider-errors.js +5 -0
- package/esm/src/chat/stream-watchdog.d.ts +11 -0
- package/esm/src/chat/stream-watchdog.d.ts.map +1 -1
- package/esm/src/chat/stream-watchdog.js +8 -0
- package/esm/src/chat/types.d.ts +71 -7
- package/esm/src/chat/types.d.ts.map +1 -1
- package/esm/src/chat/types.js +35 -7
- package/esm/src/config/define-config.d.ts +1 -0
- package/esm/src/config/define-config.d.ts.map +1 -1
- package/esm/src/config/define-config.js +1 -0
- package/esm/src/data/helpers.d.ts +2 -0
- package/esm/src/data/helpers.d.ts.map +1 -1
- package/esm/src/data/helpers.js +2 -0
- package/esm/src/data/schemas/data.schema.d.ts +2 -0
- package/esm/src/data/schemas/data.schema.d.ts.map +1 -1
- package/esm/src/embedding/react/use-uploads.d.ts +3 -1
- package/esm/src/embedding/react/use-uploads.d.ts.map +1 -1
- package/esm/src/embedding/types.d.ts +15 -0
- package/esm/src/embedding/types.d.ts.map +1 -1
- package/esm/src/extensions/contracts.d.ts +5 -0
- package/esm/src/extensions/contracts.d.ts.map +1 -1
- package/esm/src/extensions/contracts.js +5 -0
- package/esm/src/extensions/errors.d.ts +4 -0
- package/esm/src/extensions/errors.d.ts.map +1 -1
- package/esm/src/extensions/errors.js +4 -0
- package/esm/src/extensions/llm/llm-provider-registry.d.ts +1 -0
- package/esm/src/extensions/llm/llm-provider-registry.d.ts.map +1 -1
- package/esm/src/extensions/llm/llm-provider-registry.js +1 -0
- package/esm/src/extensions/loader.d.ts +1 -0
- package/esm/src/extensions/loader.d.ts.map +1 -1
- package/esm/src/extensions/loader.js +1 -0
- package/esm/src/extensions/observability/node-telemetry-provider.d.ts +4 -0
- package/esm/src/extensions/observability/node-telemetry-provider.d.ts.map +1 -1
- package/esm/src/extensions/parser/code-parser.d.ts +2 -1
- package/esm/src/extensions/parser/code-parser.d.ts.map +1 -1
- package/esm/src/extensions/recommendations.d.ts +1 -0
- package/esm/src/extensions/recommendations.d.ts.map +1 -1
- package/esm/src/extensions/recommendations.js +1 -0
- package/esm/src/extensions/sandbox/shell-tools.d.ts +7 -0
- package/esm/src/extensions/sandbox/shell-tools.d.ts.map +1 -1
- package/esm/src/extensions/sandbox/shell-tools.js +1 -0
- package/esm/src/extensions/types.d.ts +8 -0
- package/esm/src/extensions/types.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/prod-scripts.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/prod-scripts.js +1 -0
- package/esm/src/html/hydration-script-builder/templates/renderer.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/templates/renderer.js +26 -14
- package/esm/src/integrations/index.d.ts +4 -0
- package/esm/src/integrations/index.d.ts.map +1 -1
- package/esm/src/integrations/index.js +4 -0
- package/esm/src/integrations/schema.d.ts +14 -0
- package/esm/src/integrations/schema.d.ts.map +1 -1
- package/esm/src/integrations/schema.js +7 -0
- package/esm/src/integrations/types.d.ts +4 -0
- package/esm/src/integrations/types.d.ts.map +1 -1
- package/esm/src/internal-agents/schema.js +2 -2
- package/esm/src/jobs/jobs-client.d.ts +15 -0
- package/esm/src/jobs/jobs-client.d.ts.map +1 -1
- package/esm/src/jobs/jobs-client.js +2 -0
- package/esm/src/jobs/schemas.d.ts +53 -0
- package/esm/src/jobs/schemas.d.ts.map +1 -1
- package/esm/src/jobs/schemas.js +28 -0
- package/esm/src/mcp/elicitation.d.ts +5 -0
- package/esm/src/mcp/elicitation.d.ts.map +1 -1
- package/esm/src/mcp/elicitation.js +2 -0
- package/esm/src/mcp/registry.d.ts +6 -0
- package/esm/src/mcp/registry.d.ts.map +1 -1
- package/esm/src/mcp/registry.js +6 -0
- package/esm/src/mcp/schemas/mcp.schema.d.ts +2 -0
- package/esm/src/mcp/schemas/mcp.schema.d.ts.map +1 -1
- package/esm/src/mcp/server.d.ts +3 -0
- package/esm/src/mcp/server.d.ts.map +1 -1
- package/esm/src/mcp/server.js +2 -0
- package/esm/src/mcp/sse.d.ts +2 -0
- package/esm/src/mcp/sse.d.ts.map +1 -1
- package/esm/src/mcp/sse.js +2 -0
- package/esm/src/mcp/task-store.d.ts +1 -0
- package/esm/src/mcp/task-store.d.ts.map +1 -1
- package/esm/src/mcp/task-store.js +2 -0
- package/esm/src/middleware/builtin/logger.d.ts +5 -0
- package/esm/src/middleware/builtin/logger.d.ts.map +1 -1
- package/esm/src/middleware/builtin/logger.js +3 -0
- package/esm/src/middleware/builtin/security/rate-limit.d.ts +3 -0
- package/esm/src/middleware/builtin/security/rate-limit.d.ts.map +1 -1
- package/esm/src/middleware/builtin/security/rate-limit.js +2 -0
- package/esm/src/middleware/builtin/security/redis-rate-limit.d.ts +2 -0
- package/esm/src/middleware/builtin/security/redis-rate-limit.d.ts.map +1 -1
- package/esm/src/middleware/builtin/security/redis-rate-limit.js +1 -0
- package/esm/src/middleware/builtin/security/types.d.ts +1 -0
- package/esm/src/middleware/builtin/security/types.d.ts.map +1 -1
- package/esm/src/middleware/builtin/timeout.d.ts +1 -0
- package/esm/src/middleware/builtin/timeout.d.ts.map +1 -1
- package/esm/src/middleware/builtin/types.d.ts +1 -0
- package/esm/src/middleware/builtin/types.d.ts.map +1 -1
- package/esm/src/middleware/core/context.d.ts +1 -0
- package/esm/src/middleware/core/context.d.ts.map +1 -1
- package/esm/src/middleware/core/context.js +1 -0
- package/esm/src/middleware/core/pipeline/pipeline.d.ts +1 -0
- package/esm/src/middleware/core/pipeline/pipeline.d.ts.map +1 -1
- package/esm/src/middleware/core/pipeline/pipeline.js +1 -0
- package/esm/src/middleware/core/pipeline/types.d.ts +1 -0
- package/esm/src/middleware/core/pipeline/types.d.ts.map +1 -1
- package/esm/src/middleware/core/types.d.ts +5 -0
- package/esm/src/middleware/core/types.d.ts.map +1 -1
- package/esm/src/oauth/handlers/callback-handler.d.ts +3 -1
- package/esm/src/oauth/handlers/callback-handler.d.ts.map +1 -1
- package/esm/src/oauth/handlers/callback-handler.js +1 -0
- package/esm/src/oauth/handlers/init-handler.d.ts +7 -3
- package/esm/src/oauth/handlers/init-handler.d.ts.map +1 -1
- package/esm/src/oauth/handlers/init-handler.js +3 -0
- package/esm/src/oauth/providers/atlassian.d.ts +3 -0
- package/esm/src/oauth/providers/atlassian.d.ts.map +1 -1
- package/esm/src/oauth/providers/atlassian.js +3 -0
- package/esm/src/oauth/providers/base.d.ts +2 -0
- package/esm/src/oauth/providers/base.d.ts.map +1 -1
- package/esm/src/oauth/providers/base.js +2 -0
- package/esm/src/oauth/providers/common.d.ts +26 -0
- package/esm/src/oauth/providers/common.d.ts.map +1 -1
- package/esm/src/oauth/providers/common.js +26 -0
- package/esm/src/oauth/providers/google.d.ts +4 -0
- package/esm/src/oauth/providers/google.d.ts.map +1 -1
- package/esm/src/oauth/providers/google.js +4 -0
- package/esm/src/oauth/providers/microsoft.d.ts +4 -0
- package/esm/src/oauth/providers/microsoft.d.ts.map +1 -1
- package/esm/src/oauth/providers/microsoft.js +4 -0
- package/esm/src/oauth/schemas/oauth.schema.d.ts +7 -0
- package/esm/src/oauth/schemas/oauth.schema.d.ts.map +1 -1
- package/esm/src/observability/auto-instrument/http-instrumentation.d.ts +2 -0
- package/esm/src/observability/auto-instrument/http-instrumentation.d.ts.map +1 -1
- package/esm/src/observability/auto-instrument/http-instrumentation.js +2 -0
- package/esm/src/observability/auto-instrument/orchestrator.d.ts +2 -0
- package/esm/src/observability/auto-instrument/orchestrator.d.ts.map +1 -1
- package/esm/src/observability/auto-instrument/orchestrator.js +2 -0
- package/esm/src/observability/auto-instrument/react-instrumentation.d.ts +2 -0
- package/esm/src/observability/auto-instrument/react-instrumentation.d.ts.map +1 -1
- package/esm/src/observability/auto-instrument/react-instrumentation.js +2 -0
- package/esm/src/observability/auto-instrument/types.d.ts +1 -0
- package/esm/src/observability/auto-instrument/types.d.ts.map +1 -1
- package/esm/src/observability/auto-instrument/wrappers.d.ts +3 -0
- package/esm/src/observability/auto-instrument/wrappers.d.ts.map +1 -1
- package/esm/src/observability/auto-instrument/wrappers.js +3 -0
- package/esm/src/observability/error-collector.d.ts +8 -0
- package/esm/src/observability/error-collector.d.ts.map +1 -1
- package/esm/src/observability/error-collector.js +4 -0
- package/esm/src/observability/file-log-subscriber.d.ts +4 -0
- package/esm/src/observability/file-log-subscriber.d.ts.map +1 -1
- package/esm/src/observability/file-log-subscriber.js +3 -0
- package/esm/src/observability/log-buffer.d.ts +8 -0
- package/esm/src/observability/log-buffer.d.ts.map +1 -1
- package/esm/src/observability/log-buffer.js +4 -0
- package/esm/src/observability/metrics/index.d.ts +22 -0
- package/esm/src/observability/metrics/index.d.ts.map +1 -1
- package/esm/src/observability/metrics/index.js +22 -0
- package/esm/src/observability/metrics/types.d.ts +1 -0
- package/esm/src/observability/metrics/types.d.ts.map +1 -1
- package/esm/src/observability/tracing/index.d.ts +14 -0
- package/esm/src/observability/tracing/index.d.ts.map +1 -1
- package/esm/src/observability/tracing/index.js +14 -0
- package/esm/src/observability/tracing/otlp-setup.d.ts +15 -0
- package/esm/src/observability/tracing/otlp-setup.d.ts.map +1 -1
- package/esm/src/observability/tracing/otlp-setup.js +14 -0
- package/esm/src/observability/tracing/service-tracer.d.ts +15 -0
- package/esm/src/observability/tracing/service-tracer.d.ts.map +1 -1
- package/esm/src/observability/tracing/service-tracer.js +1 -0
- package/esm/src/observability/tracing/span-names.d.ts +1 -0
- package/esm/src/observability/tracing/span-names.d.ts.map +1 -1
- package/esm/src/observability/tracing/span-names.js +1 -0
- package/esm/src/observability/tracing/types.d.ts +2 -0
- package/esm/src/observability/tracing/types.d.ts.map +1 -1
- package/esm/src/platform/compat/fs.d.ts +15 -0
- package/esm/src/platform/compat/fs.d.ts.map +1 -1
- package/esm/src/platform/compat/fs.js +14 -0
- package/esm/src/platform/compat/http/responses.d.ts +7 -0
- package/esm/src/platform/compat/http/responses.d.ts.map +1 -1
- package/esm/src/platform/compat/http/responses.js +7 -0
- package/esm/src/platform/compat/path/basic-operations.d.ts +4 -0
- package/esm/src/platform/compat/path/basic-operations.d.ts.map +1 -1
- package/esm/src/platform/compat/path/basic-operations.js +4 -0
- package/esm/src/platform/compat/path/resolution.d.ts +1 -0
- package/esm/src/platform/compat/path/resolution.d.ts.map +1 -1
- package/esm/src/platform/compat/path/resolution.js +1 -0
- package/esm/src/platform/compat/process/env.d.ts +4 -0
- package/esm/src/platform/compat/process/env.d.ts.map +1 -1
- package/esm/src/platform/compat/process/env.js +4 -0
- package/esm/src/platform/compat/process/lifecycle.d.ts +1 -0
- package/esm/src/platform/compat/process/lifecycle.d.ts.map +1 -1
- package/esm/src/platform/compat/process/lifecycle.js +1 -0
- package/esm/src/prompt/factory.d.ts +1 -0
- package/esm/src/prompt/factory.d.ts.map +1 -1
- package/esm/src/prompt/factory.js +1 -0
- package/esm/src/prompt/registry.d.ts +1 -0
- package/esm/src/prompt/registry.d.ts.map +1 -1
- package/esm/src/prompt/registry.js +1 -0
- package/esm/src/prompt/schemas/prompt.schema.d.ts +1 -0
- package/esm/src/prompt/schemas/prompt.schema.d.ts.map +1 -1
- package/esm/src/prompt/types.d.ts +1 -0
- package/esm/src/prompt/types.d.ts.map +1 -1
- package/esm/src/provider/model-registry.d.ts +1 -0
- package/esm/src/provider/model-registry.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/provider-embedding-responses.d.ts +1 -0
- package/esm/src/provider/runtime-loader/provider-embedding-responses.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/provider-embedding-responses.js +1 -0
- package/esm/src/provider/runtime-loader/provider-endpoints.d.ts +7 -0
- package/esm/src/provider/runtime-loader/provider-endpoints.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/provider-endpoints.js +7 -0
- package/esm/src/provider/runtime-loader/provider-http.d.ts +3 -0
- package/esm/src/provider/runtime-loader/provider-http.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/provider-http.js +3 -0
- package/esm/src/provider/runtime-loader/provider-records.d.ts +1 -0
- package/esm/src/provider/runtime-loader/provider-records.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/provider-records.js +1 -0
- package/esm/src/provider/runtime-loader/provider-request-init.d.ts +3 -0
- package/esm/src/provider/runtime-loader/provider-request-init.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/provider-request-init.js +3 -0
- package/esm/src/provider/runtime-loader/provider-sse.d.ts +1 -0
- package/esm/src/provider/runtime-loader/provider-sse.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/provider-sse.js +1 -0
- package/esm/src/provider/runtime-loader/provider-usage.d.ts +2 -0
- package/esm/src/provider/runtime-loader/provider-usage.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/provider-usage.js +1 -0
- package/esm/src/provider/runtime-loader/tool-input-status.d.ts +1 -0
- package/esm/src/provider/runtime-loader/tool-input-status.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/tool-input-status.js +2 -0
- package/esm/src/provider/runtime-loader.d.ts +10 -0
- package/esm/src/provider/runtime-loader.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader.js +7 -0
- package/esm/src/provider/types.d.ts +1 -0
- package/esm/src/provider/types.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/context.d.ts +3 -0
- package/esm/src/provider/veryfront-cloud/context.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/context.js +2 -0
- package/esm/src/provider/veryfront-cloud/model-catalog.d.ts +16 -0
- package/esm/src/provider/veryfront-cloud/model-catalog.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/model-catalog.js +14 -0
- package/esm/src/provider/veryfront-cloud/shared.d.ts +1 -0
- package/esm/src/provider/veryfront-cloud/shared.d.ts.map +1 -1
- package/esm/src/react/compat/ssr-adapter/string-renderer.d.ts.map +1 -1
- package/esm/src/react/compat/ssr-adapter/string-renderer.js +3 -2
- package/esm/src/react/components/MDXProvider.d.ts +3 -0
- package/esm/src/react/components/MDXProvider.d.ts.map +1 -1
- package/esm/src/react/components/MDXProvider.js +2 -0
- package/esm/src/react/components/chat/agent-card.d.ts +2 -0
- package/esm/src/react/components/chat/agent-card.d.ts.map +1 -1
- package/esm/src/react/components/chat/agent-card.js +1 -0
- package/esm/src/react/components/chat/chat/components/animations.d.ts +3 -0
- package/esm/src/react/components/chat/chat/components/animations.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/animations.js +3 -0
- package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts +3 -0
- package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/attachment-pill.js +1 -0
- package/esm/src/react/components/chat/chat/components/branch-picker.d.ts +2 -0
- package/esm/src/react/components/chat/chat/components/branch-picker.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/branch-picker.js +1 -0
- package/esm/src/react/components/chat/chat/components/code-block.d.ts +2 -0
- package/esm/src/react/components/chat/chat/components/code-block.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/code-block.js +1 -0
- package/esm/src/react/components/chat/chat/components/drop-zone.d.ts +2 -0
- package/esm/src/react/components/chat/chat/components/drop-zone.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/drop-zone.js +1 -0
- package/esm/src/react/components/chat/chat/components/empty-state.d.ts +8 -0
- package/esm/src/react/components/chat/chat/components/empty-state.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/empty-state.js +4 -0
- package/esm/src/react/components/chat/chat/components/inference-badge.d.ts +2 -0
- package/esm/src/react/components/chat/chat/components/inference-badge.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/inference-badge.js +1 -0
- package/esm/src/react/components/chat/chat/components/inline-citation.d.ts +2 -0
- package/esm/src/react/components/chat/chat/components/inline-citation.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/inline-citation.js +1 -0
- package/esm/src/react/components/chat/chat/components/message-actions.d.ts +2 -0
- package/esm/src/react/components/chat/chat/components/message-actions.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-actions.js +1 -0
- package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts +2 -0
- package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-edit-form.js +1 -0
- package/esm/src/react/components/chat/chat/components/message-feedback.d.ts +3 -0
- package/esm/src/react/components/chat/chat/components/message-feedback.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-feedback.js +1 -0
- package/esm/src/react/components/chat/chat/components/quick-actions.d.ts +3 -0
- package/esm/src/react/components/chat/chat/components/quick-actions.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/quick-actions.js +1 -0
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts +1 -0
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/reasoning.js +1 -0
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts +2 -0
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sidebar.js +1 -0
- package/esm/src/react/components/chat/chat/components/skill-badge.d.ts +2 -0
- package/esm/src/react/components/chat/chat/components/skill-badge.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/skill-badge.js +1 -0
- package/esm/src/react/components/chat/chat/components/sources.d.ts +3 -0
- package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sources.js +1 -0
- package/esm/src/react/components/chat/chat/components/step-indicator.d.ts +2 -0
- package/esm/src/react/components/chat/chat/components/step-indicator.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/step-indicator.js +1 -0
- package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts +3 -0
- package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/tab-switcher.js +1 -0
- package/esm/src/react/components/chat/chat/components/tool-ui.d.ts +1 -0
- package/esm/src/react/components/chat/chat/components/tool-ui.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/tool-ui.js +1 -0
- package/esm/src/react/components/chat/chat/components/upgrade-cta.d.ts +2 -0
- package/esm/src/react/components/chat/chat/components/upgrade-cta.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/upgrade-cta.js +1 -0
- package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts +3 -0
- package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/uploads-panel.js +1 -0
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +2 -0
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.js +1 -0
- package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts +2 -0
- package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty.js +1 -0
- package/esm/src/react/components/chat/chat/composition/chat-if.d.ts +2 -0
- package/esm/src/react/components/chat/chat/composition/chat-if.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-if.js +1 -0
- package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts +2 -0
- package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-message-list.js +1 -0
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +2 -0
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-root.js +1 -0
- package/esm/src/react/components/chat/chat/composition/error-banner.d.ts +2 -0
- package/esm/src/react/components/chat/chat/composition/error-banner.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/error-banner.js +1 -0
- package/esm/src/react/components/chat/chat/composition/message.d.ts +2 -0
- package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/message.js +1 -0
- package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts +2 -0
- package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/model-avatar.js +1 -0
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +4 -0
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/chat-context.js +3 -0
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts +4 -0
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/composer-context.js +3 -0
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts +4 -0
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/message-context.js +3 -0
- package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts +4 -0
- package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/thread-list-context.js +3 -0
- package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts +4 -0
- package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-threads.js +1 -0
- package/esm/src/react/components/chat/chat/index.d.ts +3 -0
- package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/index.js +2 -0
- package/esm/src/react/components/chat/chat-with-sidebar.d.ts +12 -0
- package/esm/src/react/components/chat/chat-with-sidebar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat-with-sidebar.js +1 -0
- package/esm/src/react/components/chat/error-boundary.d.ts +3 -0
- package/esm/src/react/components/chat/error-boundary.d.ts.map +1 -1
- package/esm/src/react/components/chat/error-boundary.js +2 -0
- package/esm/src/react/components/chat/markdown.d.ts +3 -0
- package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
- package/esm/src/react/components/chat/markdown.js +1 -0
- package/esm/src/react/components/chat/message.d.ts +4 -0
- package/esm/src/react/components/chat/message.d.ts.map +1 -1
- package/esm/src/react/components/chat/message.js +2 -0
- package/esm/src/react/components/chat/model-selector.d.ts +2 -1
- package/esm/src/react/components/chat/model-selector.d.ts.map +1 -1
- package/esm/src/react/components/chat/model-selector.js +1 -0
- package/esm/src/react/components/chat/theme.d.ts +2 -0
- package/esm/src/react/components/chat/theme.d.ts.map +1 -1
- package/esm/src/react/fonts/index.d.ts +3 -0
- package/esm/src/react/fonts/index.d.ts.map +1 -1
- package/esm/src/react/fonts/index.js +1 -0
- package/esm/src/react/runtime/core.d.ts +38 -0
- package/esm/src/react/runtime/core.d.ts.map +1 -1
- package/esm/src/react/runtime/core.js +6 -0
- package/esm/src/rendering/rsc/client-boot.ts +50 -5
- package/esm/src/resource/factory.d.ts +1 -0
- package/esm/src/resource/factory.d.ts.map +1 -1
- package/esm/src/resource/factory.js +1 -0
- package/esm/src/resource/registry.d.ts +1 -0
- package/esm/src/resource/registry.d.ts.map +1 -1
- package/esm/src/resource/registry.js +1 -0
- package/esm/src/resource/types.d.ts +2 -0
- package/esm/src/resource/types.d.ts.map +1 -1
- package/esm/src/routing/api/context-builder.d.ts +1 -0
- package/esm/src/routing/api/context-builder.d.ts.map +1 -1
- package/esm/src/routing/api/handler.d.ts +2 -0
- package/esm/src/routing/api/handler.d.ts.map +1 -1
- package/esm/src/routing/api/module-loader/types.d.ts +1 -0
- package/esm/src/routing/api/module-loader/types.d.ts.map +1 -1
- package/esm/src/runtime/runtime-bridge.d.ts +1 -0
- package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
- package/esm/src/runtime/runtime-bridge.js +1 -0
- package/esm/src/sandbox/agent-service-tools.d.ts +16 -0
- package/esm/src/sandbox/agent-service-tools.d.ts.map +1 -1
- package/esm/src/sandbox/agent-service-tools.js +6 -0
- package/esm/src/sandbox/lazy-sandbox.d.ts +2 -0
- package/esm/src/sandbox/lazy-sandbox.d.ts.map +1 -1
- package/esm/src/sandbox/lazy-sandbox.js +1 -0
- package/esm/src/sandbox/shell-tools.d.ts +3 -0
- package/esm/src/sandbox/shell-tools.d.ts.map +1 -1
- package/esm/src/sandbox/shell-tools.js +3 -0
- package/esm/src/security/http/cors/middleware.d.ts +1 -0
- package/esm/src/security/http/cors/middleware.d.ts.map +1 -1
- package/esm/src/security/http/cors/middleware.js +1 -0
- package/esm/src/security/input-validation/handler.d.ts +2 -0
- package/esm/src/security/input-validation/handler.d.ts.map +1 -1
- package/esm/src/security/input-validation/parsers.d.ts +3 -0
- package/esm/src/security/input-validation/parsers.d.ts.map +1 -1
- package/esm/src/security/input-validation/parsers.js +3 -0
- package/esm/src/server/build-types.d.ts +1 -0
- package/esm/src/server/build-types.d.ts.map +1 -1
- package/esm/src/server/dev-server/index.d.ts +1 -0
- package/esm/src/server/dev-server/index.d.ts.map +1 -1
- package/esm/src/server/dev-server/index.js +1 -0
- package/esm/src/server/dev-server/server.d.ts +2 -1
- package/esm/src/server/dev-server/server.d.ts.map +1 -1
- package/esm/src/server/dev-server/server.js +2 -1
- package/esm/src/server/dev-server/types.d.ts +3 -0
- package/esm/src/server/dev-server/types.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +75 -0
- package/esm/src/server/index.d.ts +3 -0
- package/esm/src/server/index.d.ts.map +1 -1
- package/esm/src/server/index.js +1 -0
- package/esm/src/server/node-handler.d.ts +1 -0
- package/esm/src/server/node-handler.d.ts.map +1 -1
- package/esm/src/server/node-handler.js +1 -0
- package/esm/src/server/production-server.d.ts +3 -0
- package/esm/src/server/production-server.d.ts.map +1 -1
- package/esm/src/server/production-server.js +1 -0
- package/esm/src/server/reload-notifier.d.ts +1 -0
- package/esm/src/server/reload-notifier.d.ts.map +1 -1
- package/esm/src/server/reload-notifier.js +1 -0
- package/esm/src/server/service-server.d.ts +14 -0
- package/esm/src/server/service-server.d.ts.map +1 -1
- package/esm/src/server/service-server.js +3 -0
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +1 -1
- package/esm/src/testing/assert.d.ts +18 -0
- package/esm/src/testing/assert.d.ts.map +1 -1
- package/esm/src/testing/assert.js +17 -0
- package/esm/src/testing/bdd.d.ts +8 -0
- package/esm/src/testing/bdd.d.ts.map +1 -1
- package/esm/src/testing/bdd.js +8 -0
- package/esm/src/testing/deno-compat.d.ts +8 -0
- package/esm/src/testing/deno-compat.d.ts.map +1 -1
- package/esm/src/testing/deno-compat.js +8 -0
- package/esm/src/testing/isolation.d.ts +1 -0
- package/esm/src/testing/isolation.d.ts.map +1 -1
- package/esm/src/testing/isolation.js +1 -0
- package/esm/src/testing/timing.d.ts +3 -0
- package/esm/src/testing/timing.d.ts.map +1 -1
- package/esm/src/testing/timing.js +3 -0
- package/esm/src/testing/utils.d.ts +1 -0
- package/esm/src/testing/utils.d.ts.map +1 -1
- package/esm/src/testing/utils.js +1 -0
- package/esm/src/tool/context7.d.ts +2 -0
- package/esm/src/tool/context7.d.ts.map +1 -1
- package/esm/src/tool/context7.js +1 -0
- package/esm/src/tool/executor.d.ts +1 -0
- package/esm/src/tool/executor.d.ts.map +1 -1
- package/esm/src/tool/executor.js +1 -0
- package/esm/src/tool/factory.d.ts +3 -0
- package/esm/src/tool/factory.d.ts.map +1 -1
- package/esm/src/tool/factory.js +2 -0
- package/esm/src/tool/host-tools.d.ts +5 -0
- package/esm/src/tool/host-tools.d.ts.map +1 -1
- package/esm/src/tool/host-tools.js +1 -0
- package/esm/src/tool/project-scoped-remote-tools.d.ts +15 -0
- package/esm/src/tool/project-scoped-remote-tools.d.ts.map +1 -1
- package/esm/src/tool/project-scoped-remote-tools.js +7 -0
- package/esm/src/tool/registry.d.ts +1 -0
- package/esm/src/tool/registry.d.ts.map +1 -1
- package/esm/src/tool/registry.js +1 -0
- package/esm/src/tool/remote-mcp.d.ts +2 -0
- package/esm/src/tool/remote-mcp.d.ts.map +1 -1
- package/esm/src/tool/remote-mcp.js +1 -0
- package/esm/src/tool/remote-source-tools.d.ts +3 -0
- package/esm/src/tool/remote-source-tools.d.ts.map +1 -1
- package/esm/src/tool/remote-source-tools.js +2 -0
- package/esm/src/tool/result.d.ts +2 -0
- package/esm/src/tool/result.d.ts.map +1 -1
- package/esm/src/tool/result.js +2 -0
- package/esm/src/tool/sleep.d.ts +6 -0
- package/esm/src/tool/sleep.d.ts.map +1 -1
- package/esm/src/tool/sleep.js +2 -0
- package/esm/src/tool/tracing.d.ts +5 -0
- package/esm/src/tool/tracing.d.ts.map +1 -1
- package/esm/src/tool/tracing.js +1 -0
- package/esm/src/tool/types.d.ts +2 -1
- package/esm/src/tool/types.d.ts.map +1 -1
- package/esm/src/types/index.d.ts +2 -0
- package/esm/src/types/index.d.ts.map +1 -1
- package/esm/src/utils/bundle-manifest.d.ts +3 -0
- package/esm/src/utils/bundle-manifest.d.ts.map +1 -1
- package/esm/src/utils/bundle-manifest.js +1 -0
- package/esm/src/utils/constants/build.d.ts +2 -0
- package/esm/src/utils/constants/build.d.ts.map +1 -1
- package/esm/src/utils/constants/build.js +2 -0
- package/esm/src/utils/constants/cache.d.ts +4 -0
- package/esm/src/utils/constants/cache.d.ts.map +1 -1
- package/esm/src/utils/constants/cache.js +4 -0
- package/esm/src/utils/constants/cdn.d.ts +4 -0
- package/esm/src/utils/constants/cdn.d.ts.map +1 -1
- package/esm/src/utils/constants/cdn.js +4 -0
- package/esm/src/utils/constants/hash.d.ts +2 -0
- package/esm/src/utils/constants/hash.d.ts.map +1 -1
- package/esm/src/utils/constants/hash.js +2 -0
- package/esm/src/utils/constants/hmr.d.ts +7 -0
- package/esm/src/utils/constants/hmr.d.ts.map +1 -1
- package/esm/src/utils/constants/hmr.js +7 -0
- package/esm/src/utils/constants/html.d.ts +6 -0
- package/esm/src/utils/constants/html.d.ts.map +1 -1
- package/esm/src/utils/constants/html.js +6 -0
- package/esm/src/utils/constants/http.d.ts +23 -0
- package/esm/src/utils/constants/http.d.ts.map +1 -1
- package/esm/src/utils/constants/http.js +23 -0
- package/esm/src/utils/constants/network.d.ts +3 -0
- package/esm/src/utils/constants/network.d.ts.map +1 -1
- package/esm/src/utils/constants/network.js +3 -0
- package/esm/src/utils/constants/security.d.ts +3 -0
- package/esm/src/utils/constants/security.d.ts.map +1 -1
- package/esm/src/utils/constants/security.js +3 -0
- package/esm/src/utils/constants/server.d.ts +1 -0
- package/esm/src/utils/constants/server.d.ts.map +1 -1
- package/esm/src/utils/constants/server.js +1 -0
- package/esm/src/utils/feature-flags.d.ts +1 -0
- package/esm/src/utils/feature-flags.d.ts.map +1 -1
- package/esm/src/utils/feature-flags.js +1 -0
- package/esm/src/utils/hash-utils.d.ts +5 -0
- package/esm/src/utils/hash-utils.d.ts.map +1 -1
- package/esm/src/utils/hash-utils.js +4 -0
- package/esm/src/utils/import-lockfile.d.ts +3 -0
- package/esm/src/utils/import-lockfile.d.ts.map +1 -1
- package/esm/src/utils/import-lockfile.js +2 -0
- package/esm/src/utils/logger/logger.d.ts +7 -0
- package/esm/src/utils/logger/logger.d.ts.map +1 -1
- package/esm/src/utils/logger/logger.js +6 -0
- package/esm/src/utils/logger/request-context.d.ts +2 -0
- package/esm/src/utils/logger/request-context.d.ts.map +1 -1
- package/esm/src/utils/logger/request-context.js +1 -0
- package/esm/src/utils/memoize.d.ts +3 -0
- package/esm/src/utils/memoize.d.ts.map +1 -1
- package/esm/src/utils/memoize.js +3 -0
- package/esm/src/utils/parallel.d.ts +1 -0
- package/esm/src/utils/parallel.d.ts.map +1 -1
- package/esm/src/utils/parallel.js +1 -0
- package/esm/src/utils/path-utils.d.ts +1 -0
- package/esm/src/utils/path-utils.d.ts.map +1 -1
- package/esm/src/utils/path-utils.js +1 -0
- package/esm/src/utils/perf-timer.d.ts +5 -0
- package/esm/src/utils/perf-timer.d.ts.map +1 -1
- package/esm/src/utils/perf-timer.js +5 -0
- package/esm/src/utils/runtime-guards.d.ts +6 -0
- package/esm/src/utils/runtime-guards.d.ts.map +1 -1
- package/esm/src/utils/runtime-guards.js +3 -0
- package/esm/src/utils/version-constant.d.ts +2 -1
- package/esm/src/utils/version-constant.d.ts.map +1 -1
- package/esm/src/utils/version-constant.js +2 -1
- package/esm/src/workflow/api/workflow-client.d.ts +3 -0
- package/esm/src/workflow/api/workflow-client.d.ts.map +1 -1
- package/esm/src/workflow/api/workflow-client.js +2 -0
- package/esm/src/workflow/backends/memory.d.ts +1 -0
- package/esm/src/workflow/backends/memory.d.ts.map +1 -1
- package/esm/src/workflow/backends/memory.js +1 -0
- package/esm/src/workflow/backends/redis/index.d.ts +1 -0
- package/esm/src/workflow/backends/redis/index.d.ts.map +1 -1
- package/esm/src/workflow/backends/redis/index.js +1 -0
- package/esm/src/workflow/backends/types.d.ts +3 -0
- package/esm/src/workflow/backends/types.d.ts.map +1 -1
- package/esm/src/workflow/backends/types.js +1 -0
- package/esm/src/workflow/claude-code/event-publisher.d.ts +1 -0
- package/esm/src/workflow/claude-code/event-publisher.d.ts.map +1 -1
- package/esm/src/workflow/claude-code/event-publisher.js +1 -0
- package/esm/src/workflow/dsl/branch.d.ts +1 -0
- package/esm/src/workflow/dsl/branch.d.ts.map +1 -1
- package/esm/src/workflow/dsl/loop.d.ts +4 -0
- package/esm/src/workflow/dsl/loop.d.ts.map +1 -1
- package/esm/src/workflow/dsl/loop.js +3 -0
- package/esm/src/workflow/dsl/map.d.ts +2 -0
- package/esm/src/workflow/dsl/map.d.ts.map +1 -1
- package/esm/src/workflow/dsl/map.js +1 -0
- package/esm/src/workflow/dsl/parallel.d.ts +1 -0
- package/esm/src/workflow/dsl/parallel.d.ts.map +1 -1
- package/esm/src/workflow/dsl/step.d.ts +4 -0
- package/esm/src/workflow/dsl/step.d.ts.map +1 -1
- package/esm/src/workflow/dsl/step.js +3 -0
- package/esm/src/workflow/dsl/sub-workflow.d.ts +1 -0
- package/esm/src/workflow/dsl/sub-workflow.d.ts.map +1 -1
- package/esm/src/workflow/dsl/wait.d.ts +2 -0
- package/esm/src/workflow/dsl/wait.d.ts.map +1 -1
- package/esm/src/workflow/dsl/workflow.d.ts +5 -0
- package/esm/src/workflow/dsl/workflow.d.ts.map +1 -1
- package/esm/src/workflow/dsl/workflow.js +4 -0
- package/esm/src/workflow/executor/workflow-executor.d.ts +1 -3
- package/esm/src/workflow/executor/workflow-executor.d.ts.map +1 -1
- package/esm/src/workflow/react/use-approval.d.ts +3 -3
- package/esm/src/workflow/react/use-approval.d.ts.map +1 -1
- package/esm/src/workflow/react/use-approval.js +1 -3
- package/esm/src/workflow/react/use-workflow-list.d.ts +2 -0
- package/esm/src/workflow/react/use-workflow-list.d.ts.map +1 -1
- package/esm/src/workflow/react/use-workflow-start.d.ts +3 -0
- package/esm/src/workflow/react/use-workflow-start.d.ts.map +1 -1
- package/esm/src/workflow/react/use-workflow-start.js +1 -0
- package/esm/src/workflow/react/use-workflow.d.ts +3 -0
- package/esm/src/workflow/react/use-workflow.d.ts.map +1 -1
- package/esm/src/workflow/react/use-workflow.js +1 -0
- package/esm/src/workflow/schemas/workflow.schema.d.ts +1 -0
- package/esm/src/workflow/schemas/workflow.schema.d.ts.map +1 -1
- package/esm/src/workflow/worker/dynamic-job-entrypoint.d.ts +1 -0
- package/esm/src/workflow/worker/dynamic-job-entrypoint.d.ts.map +1 -1
- package/esm/src/workflow/worker/dynamic-job-entrypoint.js +1 -0
- package/esm/src/workflow/worker/job-entrypoint.d.ts +1 -0
- package/esm/src/workflow/worker/job-entrypoint.d.ts.map +1 -1
- package/esm/src/workflow/worker/job-entrypoint.js +1 -0
- package/esm/src/workflow/worker/workflow-worker.d.ts +1 -0
- package/esm/src/workflow/worker/workflow-worker.d.ts.map +1 -1
- package/esm/src/workflow/worker/workflow-worker.js +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineSchema, lazySchema } from "../schemas/index.js";
|
|
2
|
+
/** Zod schema for get message part. */
|
|
2
3
|
export const getMessagePartSchema = defineSchema((v) => v.discriminatedUnion("type", [
|
|
3
4
|
v.object({ type: v.literal("text"), text: v.string() }),
|
|
4
5
|
v.object({
|
|
@@ -47,14 +48,23 @@ export const getMessagePartSchema = defineSchema((v) => v.discriminatedUnion("ty
|
|
|
47
48
|
}),
|
|
48
49
|
v.object({ type: v.literal("data"), name: v.string(), value: v.unknown() }),
|
|
49
50
|
]));
|
|
50
|
-
/**
|
|
51
|
+
/** Schema for message part.
|
|
52
|
+
* @deprecated Use getMessagePartSchema()
|
|
53
|
+
*/
|
|
51
54
|
export const messagePartSchema = lazySchema(getMessagePartSchema);
|
|
55
|
+
/** Zod schema for get conversation type. */
|
|
52
56
|
export const getConversationTypeSchema = defineSchema((v) => v.enum(["chat", "agent_task", "support", "channel", "project_agent"]));
|
|
53
|
-
/**
|
|
57
|
+
/** Schema for conversation type.
|
|
58
|
+
* @deprecated Use getConversationTypeSchema()
|
|
59
|
+
*/
|
|
54
60
|
export const conversationTypeSchema = lazySchema(getConversationTypeSchema);
|
|
61
|
+
/** Zod schema for get message status. */
|
|
55
62
|
export const getMessageStatusSchema = defineSchema((v) => v.enum(["pending", "streaming", "completed", "error", "failed", "cancelled", "stopped"]));
|
|
56
|
-
/**
|
|
63
|
+
/** Schema for message status.
|
|
64
|
+
* @deprecated Use getMessageStatusSchema()
|
|
65
|
+
*/
|
|
57
66
|
export const messageStatusSchema = lazySchema(getMessageStatusSchema);
|
|
67
|
+
/** Zod schema for get API conversation. */
|
|
58
68
|
export const getApiConversationSchema = defineSchema((v) => v.object({
|
|
59
69
|
id: v.string(),
|
|
60
70
|
projectId: v.string().nullable().optional(),
|
|
@@ -71,8 +81,11 @@ export const getApiConversationSchema = defineSchema((v) => v.object({
|
|
|
71
81
|
createdAt: v.string(),
|
|
72
82
|
updatedAt: v.string(),
|
|
73
83
|
}));
|
|
74
|
-
/**
|
|
84
|
+
/** Schema for API conversation.
|
|
85
|
+
* @deprecated Use getApiConversationSchema()
|
|
86
|
+
*/
|
|
75
87
|
export const apiConversationSchema = lazySchema(getApiConversationSchema);
|
|
88
|
+
/** Zod schema for get API message. */
|
|
76
89
|
export const getApiMessageSchema = defineSchema((v) => v.object({
|
|
77
90
|
id: v.string(),
|
|
78
91
|
conversationId: v.string(),
|
|
@@ -92,16 +105,22 @@ export const getApiMessageSchema = defineSchema((v) => v.object({
|
|
|
92
105
|
createdAt: v.string(),
|
|
93
106
|
updatedAt: v.string().nullable(),
|
|
94
107
|
}));
|
|
95
|
-
/**
|
|
108
|
+
/** Schema for API message.
|
|
109
|
+
* @deprecated Use getApiMessageSchema()
|
|
110
|
+
*/
|
|
96
111
|
export const apiMessageSchema = lazySchema(getApiMessageSchema);
|
|
112
|
+
/** Shared UUID pattern value. */
|
|
97
113
|
export const UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\b/i;
|
|
114
|
+
/** Check whether a value is a UUID. */
|
|
98
115
|
export function isUuid(value) {
|
|
99
116
|
return typeof value === "string" && UUID_PATTERN.test(value);
|
|
100
117
|
}
|
|
118
|
+
/** Extract upload ID. */
|
|
101
119
|
export function extractUploadId(url) {
|
|
102
120
|
const match = url.match(UUID_PATTERN);
|
|
103
121
|
return match ? match[0] : null;
|
|
104
122
|
}
|
|
123
|
+
/** State for map tool. */
|
|
105
124
|
export function mapToolState(sdkState) {
|
|
106
125
|
switch (sdkState) {
|
|
107
126
|
case "input-streaming":
|
|
@@ -120,9 +139,11 @@ export function mapToolState(sdkState) {
|
|
|
120
139
|
return "pending";
|
|
121
140
|
}
|
|
122
141
|
}
|
|
142
|
+
/** Record shape for is. */
|
|
123
143
|
export function isRecord(value) {
|
|
124
144
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
125
145
|
}
|
|
146
|
+
/** Return string field. */
|
|
126
147
|
export function getStringField(value, field, fallback) {
|
|
127
148
|
if (!isRecord(value) || typeof value[field] !== "string") {
|
|
128
149
|
return fallback;
|
|
@@ -143,6 +164,7 @@ function getNonEmptyStringField(value, key) {
|
|
|
143
164
|
function toRecord(value) {
|
|
144
165
|
return isRecord(value) ? Object.fromEntries(Object.entries(value)) : {};
|
|
145
166
|
}
|
|
167
|
+
/** Stringify unknown helper. */
|
|
146
168
|
export function stringifyUnknown(value) {
|
|
147
169
|
if (typeof value === "string")
|
|
148
170
|
return value;
|
|
@@ -154,14 +176,17 @@ export function stringifyUnknown(value) {
|
|
|
154
176
|
return String(value);
|
|
155
177
|
}
|
|
156
178
|
}
|
|
179
|
+
/** Check whether a chat part is a custom data part. */
|
|
157
180
|
export function isDataUiPart(part) {
|
|
158
181
|
return part.type.startsWith("data-") && "data" in part;
|
|
159
182
|
}
|
|
183
|
+
/** Check whether a chat part is a tool UI part. */
|
|
160
184
|
export function isToolUiPart(part) {
|
|
161
185
|
return ((part.type === "dynamic-tool" || part.type.startsWith("tool-")) &&
|
|
162
186
|
typeof getOptionalStringField(part, "toolCallId") === "string" &&
|
|
163
187
|
typeof getOptionalStringField(part, "state") === "string");
|
|
164
188
|
}
|
|
189
|
+
/** Return UI tool name. */
|
|
165
190
|
export function getUiToolName(part) {
|
|
166
191
|
const explicitToolName = getOptionalStringField(part, "toolName");
|
|
167
192
|
if (explicitToolName) {
|
|
@@ -169,6 +194,7 @@ export function getUiToolName(part) {
|
|
|
169
194
|
}
|
|
170
195
|
return part.type.startsWith("tool-") ? part.type.replace(/^tool-/, "") : undefined;
|
|
171
196
|
}
|
|
197
|
+
/** Push tool parts. */
|
|
172
198
|
export function pushToolParts(parts, toolName, toolCallId, state, part) {
|
|
173
199
|
const input = toRecord(part.input);
|
|
174
200
|
const isErroredState = state === "output-error" || state === "error" || state === "output-denied";
|
|
@@ -220,6 +246,7 @@ function pushFileConversationPart(parts, part) {
|
|
|
220
246
|
...(part.url ? { url: part.url } : {}),
|
|
221
247
|
});
|
|
222
248
|
}
|
|
249
|
+
/** Message shape for to conversation parts from UI. */
|
|
223
250
|
export function toConversationPartsFromUiMessage(message) {
|
|
224
251
|
const parts = [];
|
|
225
252
|
for (const part of message.parts) {
|
|
@@ -280,12 +307,15 @@ function isToolComplete(part) {
|
|
|
280
307
|
return part.state === "output-available" || part.state === "output-error" ||
|
|
281
308
|
part.state === "output-denied";
|
|
282
309
|
}
|
|
310
|
+
/** Check whether incomplete tool parts is present. */
|
|
283
311
|
export function hasIncompleteToolParts(message) {
|
|
284
312
|
return message.parts.some((part) => isToolUiPart(part) && !isToolComplete(part));
|
|
285
313
|
}
|
|
314
|
+
/** Mark incomplete tool parts as stopped. */
|
|
286
315
|
export function markIncompleteToolPartsAsStopped(message) {
|
|
287
316
|
return markIncompleteToolPartsAsErrored(message, "Stopped by user");
|
|
288
317
|
}
|
|
318
|
+
/** Mark incomplete tool parts as errored. */
|
|
289
319
|
export function markIncompleteToolPartsAsErrored(message, errorText) {
|
|
290
320
|
let mutated = false;
|
|
291
321
|
const parts = message.parts.map((part) => {
|
|
@@ -323,24 +353,29 @@ function markToolPartAsErrored(part, errorText) {
|
|
|
323
353
|
errorText,
|
|
324
354
|
};
|
|
325
355
|
}
|
|
356
|
+
/** Check whether a value is a tool-call part. */
|
|
326
357
|
export function isToolCallPart(value) {
|
|
327
358
|
return (isRecord(value) &&
|
|
328
359
|
value.type === "tool-call" &&
|
|
329
360
|
typeof value.toolCallId === "string" &&
|
|
330
361
|
typeof value.toolName === "string");
|
|
331
362
|
}
|
|
363
|
+
/** Check whether a value is a tool-result part. */
|
|
332
364
|
export function isToolResultPart(value) {
|
|
333
365
|
return (isRecord(value) &&
|
|
334
366
|
value.type === "tool-result" &&
|
|
335
367
|
typeof value.toolCallId === "string" &&
|
|
336
368
|
typeof value.toolName === "string");
|
|
337
369
|
}
|
|
370
|
+
/** Check whether a value is a text part. */
|
|
338
371
|
export function isTextPart(value) {
|
|
339
372
|
return isRecord(value) && value.type === "text" && typeof value.text === "string";
|
|
340
373
|
}
|
|
374
|
+
/** Check whether a value is a reasoning part. */
|
|
341
375
|
export function isReasoningPart(value) {
|
|
342
376
|
return isRecord(value) && value.type === "reasoning" && typeof value.text === "string";
|
|
343
377
|
}
|
|
378
|
+
/** Message shape for extract text from. */
|
|
344
379
|
export function extractTextFromMessage(message) {
|
|
345
380
|
if (!message || !message.content)
|
|
346
381
|
return "";
|
|
@@ -642,6 +677,7 @@ function convertAssistantMessage(message) {
|
|
|
642
677
|
flushAssistantMessage(deferredAssistantContent);
|
|
643
678
|
return messages;
|
|
644
679
|
}
|
|
680
|
+
/** Convert UI messages to provider model messages. */
|
|
645
681
|
export function convertUiMessagesToProviderModelMessages(messages) {
|
|
646
682
|
return messages.flatMap((message) => {
|
|
647
683
|
switch (message.role) {
|
|
@@ -659,4 +695,5 @@ export function convertUiMessagesToProviderModelMessages(messages) {
|
|
|
659
695
|
/**
|
|
660
696
|
* @deprecated Use convertUiMessagesToProviderModelMessages for provider-facing model payloads.
|
|
661
697
|
*/
|
|
698
|
+
/** Shared convert UI messages to model messages value. */
|
|
662
699
|
export const convertUiMessagesToModelMessages = convertUiMessagesToProviderModelMessages;
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import type { ChatUiMessage, ChatUiMessageChunk, MessageMetadata } from "./types.js";
|
|
2
|
+
/** Default value for stream promise timeout ms. */
|
|
2
3
|
export declare const DEFAULT_STREAM_PROMISE_TIMEOUT_MS = 10000;
|
|
4
|
+
/** Public API contract for chat fallback part. */
|
|
3
5
|
export type ChatFallbackPart = ChatUiMessage["parts"][number];
|
|
6
|
+
/** Public API contract for chat part. */
|
|
4
7
|
type ChatPart = ChatFallbackPart;
|
|
8
|
+
/** Public API contract for final step tool call. */
|
|
5
9
|
export interface FinalStepToolCall {
|
|
6
10
|
toolCallId: string;
|
|
7
11
|
toolName: string;
|
|
8
12
|
input: unknown;
|
|
9
13
|
}
|
|
14
|
+
/** Result returned from final step tool. */
|
|
10
15
|
export interface FinalStepToolResult {
|
|
11
16
|
toolCallId: string;
|
|
12
17
|
toolName: string;
|
|
13
18
|
input: unknown;
|
|
14
19
|
output: unknown;
|
|
15
20
|
}
|
|
21
|
+
/** State for fallback tool chunk. */
|
|
16
22
|
export interface FallbackToolChunkState {
|
|
17
23
|
startedToolCallIds: ReadonlySet<string>;
|
|
18
24
|
inputAvailableToolCallIds: ReadonlySet<string>;
|
|
@@ -20,29 +26,43 @@ export interface FallbackToolChunkState {
|
|
|
20
26
|
outputErrorToolCallIds?: ReadonlySet<string>;
|
|
21
27
|
outputDeniedToolCallIds?: ReadonlySet<string>;
|
|
22
28
|
}
|
|
29
|
+
/** Error shape for final step terminal. */
|
|
23
30
|
interface FinalStepTerminalError {
|
|
24
31
|
code: string;
|
|
25
32
|
message: string;
|
|
26
33
|
}
|
|
34
|
+
/** Return last stream step. */
|
|
27
35
|
export declare function getLastStreamStep(result: {
|
|
28
36
|
steps: PromiseLike<readonly unknown[]>;
|
|
29
37
|
}, timeoutMs?: number): Promise<unknown | null>;
|
|
38
|
+
/** Return stream steps. */
|
|
30
39
|
export declare function getStreamSteps(result: {
|
|
31
40
|
steps: PromiseLike<readonly unknown[]>;
|
|
32
41
|
}, timeoutMs?: number): Promise<{
|
|
33
42
|
steps: readonly unknown[];
|
|
34
43
|
lastStep: unknown | null;
|
|
35
44
|
}>;
|
|
45
|
+
/** Extract final step finish reason. */
|
|
36
46
|
export declare function extractFinalStepFinishReason(step: unknown): string | null;
|
|
47
|
+
/** Extract final step text. */
|
|
37
48
|
export declare function extractFinalStepText(step: unknown): string;
|
|
49
|
+
/** Extract final step tool calls. */
|
|
38
50
|
export declare function extractFinalStepToolCalls(step: unknown): FinalStepToolCall[];
|
|
51
|
+
/** Extract final step tool results. */
|
|
39
52
|
export declare function extractFinalStepToolResults(step: unknown): FinalStepToolResult[];
|
|
53
|
+
/** Error shape for extract final step terminal. */
|
|
40
54
|
export declare function extractFinalStepTerminalError(step: unknown): FinalStepTerminalError | null;
|
|
55
|
+
/** Builds fallback UI message parts. */
|
|
41
56
|
export declare function buildFallbackUiMessageParts(step: unknown): ChatPart[];
|
|
57
|
+
/** Append missing fallback text part. */
|
|
42
58
|
export declare function appendMissingFallbackTextPart(parts: readonly ChatPart[], step: unknown): ChatPart[];
|
|
59
|
+
/** Builds fallback UI message chunks. */
|
|
43
60
|
export declare function buildFallbackUiMessageChunks(step: unknown, messageId: string): ChatUiMessageChunk<MessageMetadata>[];
|
|
61
|
+
/** Builds missing fallback tool chunks. */
|
|
44
62
|
export declare function buildMissingFallbackToolChunks(step: unknown, state?: Partial<FallbackToolChunkState>): ChatUiMessageChunk<MessageMetadata>[];
|
|
63
|
+
/** Builds missing fallback tool chunks from parts. */
|
|
45
64
|
export declare function buildMissingFallbackToolChunksFromParts(parts: readonly ChatPart[], state?: Partial<FallbackToolChunkState>): ChatUiMessageChunk<MessageMetadata>[];
|
|
65
|
+
/** Builds missing fallback text chunks. */
|
|
46
66
|
export declare function buildMissingFallbackTextChunks(parts: readonly ChatPart[], step: unknown, messageId: string): ChatUiMessageChunk<MessageMetadata>[];
|
|
47
67
|
export {};
|
|
48
68
|
//# sourceMappingURL=final-step-fallback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"final-step-fallback.d.ts","sourceRoot":"","sources":["../../../src/src/chat/final-step-fallback.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAGV,aAAa,EACb,kBAAkB,EAClB,eAAe,EAChB,MAAM,YAAY,CAAC;AAQpB,eAAO,MAAM,iCAAiC,QAAS,CAAC;AAIxD,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAC9D,KAAK,QAAQ,GAAG,gBAAgB,CAAC;AAGjC,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAA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6
|
const STREAM_PROMISE_TIMEOUT_TOKEN = Symbol("stream-promise-timeout");
|
|
7
|
+
/** Default value for stream promise timeout ms. */
|
|
7
8
|
export const DEFAULT_STREAM_PROMISE_TIMEOUT_MS = 10_000;
|
|
8
9
|
function isToolUiPart(part) {
|
|
9
10
|
return isRecord(part) && typeof Reflect.get(part, "toolCallId") === "string" && "state" in part;
|
|
@@ -531,26 +532,31 @@ async function resolveStreamPromiseWithTimeout(promise, timeoutMs, fallback) {
|
|
|
531
532
|
}
|
|
532
533
|
}
|
|
533
534
|
}
|
|
535
|
+
/** Return last stream step. */
|
|
534
536
|
export async function getLastStreamStep(result, timeoutMs = DEFAULT_STREAM_PROMISE_TIMEOUT_MS) {
|
|
535
537
|
const steps = await resolveStreamPromiseWithTimeout(result.steps, timeoutMs, []);
|
|
536
538
|
return steps.at(-1) ?? null;
|
|
537
539
|
}
|
|
540
|
+
/** Return stream steps. */
|
|
538
541
|
export async function getStreamSteps(result, timeoutMs = DEFAULT_STREAM_PROMISE_TIMEOUT_MS) {
|
|
539
542
|
const steps = await resolveStreamPromiseWithTimeout(result.steps, timeoutMs, []);
|
|
540
543
|
return { steps, lastStep: steps.at(-1) ?? null };
|
|
541
544
|
}
|
|
545
|
+
/** Extract final step finish reason. */
|
|
542
546
|
export function extractFinalStepFinishReason(step) {
|
|
543
547
|
if (!isRecord(step) || typeof step.finishReason !== "string") {
|
|
544
548
|
return null;
|
|
545
549
|
}
|
|
546
550
|
return step.finishReason;
|
|
547
551
|
}
|
|
552
|
+
/** Extract final step text. */
|
|
548
553
|
export function extractFinalStepText(step) {
|
|
549
554
|
if (isRecord(step) && typeof step.text === "string" && step.text.trim().length > 0) {
|
|
550
555
|
return step.text.trim();
|
|
551
556
|
}
|
|
552
557
|
return extractTextFromResponseMessages(step);
|
|
553
558
|
}
|
|
559
|
+
/** Extract final step tool calls. */
|
|
554
560
|
export function extractFinalStepToolCalls(step) {
|
|
555
561
|
if (!isRecord(step) || !Array.isArray(step.toolCalls)) {
|
|
556
562
|
return [];
|
|
@@ -569,6 +575,7 @@ export function extractFinalStepToolCalls(step) {
|
|
|
569
575
|
];
|
|
570
576
|
});
|
|
571
577
|
}
|
|
578
|
+
/** Extract final step tool results. */
|
|
572
579
|
export function extractFinalStepToolResults(step) {
|
|
573
580
|
if (!isRecord(step) || !Array.isArray(step.toolResults)) {
|
|
574
581
|
return [];
|
|
@@ -604,6 +611,7 @@ function parseProblemBody(body) {
|
|
|
604
611
|
}
|
|
605
612
|
return { code: match.code, message: match.message };
|
|
606
613
|
}
|
|
614
|
+
/** Error shape for extract final step terminal. */
|
|
607
615
|
export function extractFinalStepTerminalError(step) {
|
|
608
616
|
const responseBody = parseFinalStepResponseBody(step);
|
|
609
617
|
if (responseBody == null) {
|
|
@@ -618,6 +626,7 @@ export function extractFinalStepTerminalError(step) {
|
|
|
618
626
|
}
|
|
619
627
|
return parseProblemBody(responseBody);
|
|
620
628
|
}
|
|
629
|
+
/** Builds fallback UI message parts. */
|
|
621
630
|
export function buildFallbackUiMessageParts(step) {
|
|
622
631
|
return buildFallbackUiMessagePartsFromInput({
|
|
623
632
|
step,
|
|
@@ -626,6 +635,7 @@ export function buildFallbackUiMessageParts(step) {
|
|
|
626
635
|
extractFinalStepToolResults,
|
|
627
636
|
});
|
|
628
637
|
}
|
|
638
|
+
/** Append missing fallback text part. */
|
|
629
639
|
export function appendMissingFallbackTextPart(parts, step) {
|
|
630
640
|
return appendMissingFallbackTextPartFromInput({
|
|
631
641
|
parts,
|
|
@@ -633,6 +643,7 @@ export function appendMissingFallbackTextPart(parts, step) {
|
|
|
633
643
|
extractFinalStepText,
|
|
634
644
|
});
|
|
635
645
|
}
|
|
646
|
+
/** Builds fallback UI message chunks. */
|
|
636
647
|
export function buildFallbackUiMessageChunks(step, messageId) {
|
|
637
648
|
const chunks = buildMissingFallbackToolChunks(step);
|
|
638
649
|
const text = extractFinalStepText(step);
|
|
@@ -653,6 +664,7 @@ export function buildFallbackUiMessageChunks(step, messageId) {
|
|
|
653
664
|
}
|
|
654
665
|
return chunks;
|
|
655
666
|
}
|
|
667
|
+
/** Builds missing fallback tool chunks. */
|
|
656
668
|
export function buildMissingFallbackToolChunks(step, state) {
|
|
657
669
|
return buildMissingFallbackToolChunksFromInput({
|
|
658
670
|
step,
|
|
@@ -661,12 +673,14 @@ export function buildMissingFallbackToolChunks(step, state) {
|
|
|
661
673
|
extractFinalStepToolResults,
|
|
662
674
|
});
|
|
663
675
|
}
|
|
676
|
+
/** Builds missing fallback tool chunks from parts. */
|
|
664
677
|
export function buildMissingFallbackToolChunksFromParts(parts, state) {
|
|
665
678
|
if (parts.length === 0 && (!state || Object.keys(state).length === 0)) {
|
|
666
679
|
return [];
|
|
667
680
|
}
|
|
668
681
|
return buildMissingFallbackToolChunksFromPartsFromInput(parts, state);
|
|
669
682
|
}
|
|
683
|
+
/** Builds missing fallback text chunks. */
|
|
670
684
|
export function buildMissingFallbackTextChunks(parts, step, messageId) {
|
|
671
685
|
return buildMissingFallbackTextChunksFromInput({
|
|
672
686
|
parts,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ChatMessageMetadata, ChatUiMessageChunk } from "./protocol.js";
|
|
2
|
+
/** Options accepted by hosted UI chunk mapping. */
|
|
2
3
|
export type HostedUiChunkMappingOptions = {
|
|
3
4
|
messageId?: string | null;
|
|
4
5
|
reasoningMessageId?: string | null;
|
|
@@ -20,6 +21,7 @@ export type HostedStreamSourcePart = {
|
|
|
20
21
|
title?: string;
|
|
21
22
|
filename?: string;
|
|
22
23
|
};
|
|
24
|
+
/** Public API contract for hosted stream part for UI chunk mapping. */
|
|
23
25
|
export type HostedStreamPartForUiChunkMapping = {
|
|
24
26
|
type: "start";
|
|
25
27
|
} | {
|
|
@@ -107,5 +109,6 @@ export type HostedStreamPartForUiChunkMapping = {
|
|
|
107
109
|
} | {
|
|
108
110
|
type: "raw";
|
|
109
111
|
};
|
|
112
|
+
/** Map hosted stream part to chat UI chunks. */
|
|
110
113
|
export declare function mapHostedStreamPartToChatUiChunks(part: HostedStreamPartForUiChunkMapping, options?: HostedUiChunkMappingOptions): ChatUiMessageChunk<ChatMessageMetadata>[];
|
|
111
114
|
//# sourceMappingURL=hosted-ui-chunk-mapping.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-ui-chunk-mapping.d.ts","sourceRoot":"","sources":["../../../src/src/chat/hosted-ui-chunk-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE7E,MAAM,MAAM,2BAA2B,GAAG;IACxC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAC9B;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,KAAK,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACC;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEJ,MAAM,MAAM,iCAAiC,GACzC;IACA,IAAI,EAAE,OAAO,CAAC;CACf,GACC;IACA,IAAI,EAAE,YAAY,CAAC;CACpB,GACC;IACA,IAAI,EAAE,aAAa,CAAC;CACrB,GACC;IACA,IAAI,EAAE,QAAQ,CAAC;IACf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AE,KAAK,CAAC;CACjB,GACC;IACA,IAAI,EAAE,uBAAuB,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,GACC;IACA,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CACjB,GACC;IACA,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,GACC;IACA,IAAI,EAAE,oBAAoB,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;CACpB,GACC;IACA,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB,GACC;IACA,IAAI,EAAE,gBAAgB,CAAC;CACxB,GACC;IACA,IAAI,EAAE,KAAK,CAAC;CACb,CAAC;AA4EJ,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,iCAAiC,EACvC,OAAO,GAAE,2BAAgC,GACxC,kBAAkB,CAAC,mBAAmB,CAAC,EAAE,CAsF3C"}
|
|
1
|
+
{"version":3,"file":"hosted-ui-chunk-mapping.d.ts","sourceRoot":"","sources":["../../../src/src/chat/hosted-ui-chunk-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE7E,mDAAmD;AACnD,MAAM,MAAM,2BAA2B,GAAG;IACxC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,C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ACC;IACA,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB,GACC;IACA,IAAI,EAAE,gBAAgB,CAAC;CACxB,GACC;IACA,IAAI,EAAE,KAAK,CAAC;CACb,CAAC;AA4EJ,gDAAgD;AAChD,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,iCAAiC,EACvC,OAAO,GAAE,2BAAgC,GACxC,kBAAkB,CAAC,mBAAmB,CAAC,EAAE,CAsF3C"}
|
|
@@ -56,6 +56,7 @@ function mapToolErrorPartToUiChunks(part, onError) {
|
|
|
56
56
|
},
|
|
57
57
|
];
|
|
58
58
|
}
|
|
59
|
+
/** Map hosted stream part to chat UI chunks. */
|
|
59
60
|
export function mapHostedStreamPartToChatUiChunks(part, options = {}) {
|
|
60
61
|
const onError = options.onError ?? defaultOnError;
|
|
61
62
|
const sendReasoning = options.sendReasoning ?? true;
|
|
@@ -1,26 +1,44 @@
|
|
|
1
1
|
import { type ChatUiMessage, type ProviderModelMessage } from "./types.js";
|
|
2
|
+
/** Estimate tokens. */
|
|
2
3
|
export declare function estimateTokens(value: unknown): number;
|
|
4
|
+
/** Compress turn. */
|
|
3
5
|
export declare function compressTurn(messages: ProviderModelMessage[], startIdx: number, endIdx: number): ProviderModelMessage[];
|
|
6
|
+
/** Enforce token budget with turn compression. */
|
|
4
7
|
export declare function enforceTokenBudgetWithTurnCompression(messages: ProviderModelMessage[], budget: number, overhead: number): ProviderModelMessage[];
|
|
8
|
+
/** Check whether the model supports the file media type. */
|
|
5
9
|
export declare function isModelSupportedFileMediaType(mediaType: string): boolean;
|
|
10
|
+
/** Normalizes message file part media types. */
|
|
6
11
|
export declare function normalizeMessageFilePartMediaTypes(messages: ChatUiMessage[]): ChatUiMessage[];
|
|
12
|
+
/** Rewrite unsupported file parts as annotations. */
|
|
7
13
|
export declare function rewriteUnsupportedFilePartsAsAnnotations(messages: ChatUiMessage[]): ChatUiMessage[];
|
|
14
|
+
/** Strip pending tool parts. */
|
|
8
15
|
export declare function stripPendingToolParts(messages: ChatUiMessage[]): ChatUiMessage[];
|
|
16
|
+
/** Sanitize provider model messages. */
|
|
9
17
|
export declare function sanitizeProviderModelMessages(messages: ProviderModelMessage[]): ProviderModelMessage[];
|
|
10
18
|
/**
|
|
11
19
|
* @deprecated Use sanitizeProviderModelMessages for provider-facing model payloads.
|
|
12
20
|
*/
|
|
21
|
+
/** Shared sanitize model messages value. */
|
|
13
22
|
export declare const sanitizeModelMessages: typeof sanitizeProviderModelMessages;
|
|
23
|
+
/** Prepare provider model messages from UI messages. */
|
|
14
24
|
export declare function prepareProviderModelMessagesFromUiMessages(messages: ChatUiMessage[]): ProviderModelMessage[];
|
|
25
|
+
/** Mask old tool outputs. */
|
|
15
26
|
export declare function maskOldToolOutputs(messages: ProviderModelMessage[]): ProviderModelMessage[];
|
|
27
|
+
/** Repair tool pairs. */
|
|
16
28
|
export declare function repairToolPairs(messages: ProviderModelMessage[]): ProviderModelMessage[];
|
|
29
|
+
/** Estimate overhead. */
|
|
17
30
|
export declare function estimateOverhead(instructions: unknown, toolCount: number): number;
|
|
31
|
+
/** Ensure tool call inputs helper. */
|
|
18
32
|
export declare function ensureToolCallInputs(messages: ProviderModelMessage[]): ProviderModelMessage[];
|
|
33
|
+
/** Compact for step. */
|
|
19
34
|
export declare function compactForStep(messages: ProviderModelMessage[], overhead?: number): ProviderModelMessage[];
|
|
35
|
+
/** Dedupe tool history. */
|
|
20
36
|
export declare function dedupeToolHistory(messages: ProviderModelMessage[]): ProviderModelMessage[];
|
|
37
|
+
/** Enforce token budget. */
|
|
21
38
|
export declare function enforceTokenBudget(messages: ProviderModelMessage[], budget?: number, overhead?: number): ProviderModelMessage[];
|
|
22
39
|
/**
|
|
23
40
|
* @deprecated Use prepareProviderModelMessagesFromUiMessages for provider-facing model payloads.
|
|
24
41
|
*/
|
|
42
|
+
/** Shared prepare model messages from UI messages value. */
|
|
25
43
|
export declare const prepareModelMessagesFromUiMessages: typeof prepareProviderModelMessagesFromUiMessages;
|
|
26
44
|
//# sourceMappingURL=message-prep.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-prep.d.ts","sourceRoot":"","sources":["../../../src/src/chat/message-prep.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAQjC,OAAO,EAKL,KAAK,aAAa,EAGlB,KAAK,oBAAoB,EAE1B,MAAM,YAAY,CAAC;AAIpB,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAErD;AAOD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,oBAAoB,EAAE,EAChC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,oBAAoB,EAAE,CAiCxB;AAqCD,wBAAgB,qCAAqC,CACnD,QAAQ,EAAE,oBAAoB,EAAE,EAChC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,oBAAoB,EAAE,CAiExB;AA+BD,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAGxE;AAED,wBAAgB,kCAAkC,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CAwB7F;AAED,wBAAgB,wCAAwC,CACtD,QAAQ,EAAE,aAAa,EAAE,GACxB,aAAa,EAAE,CAmDjB;AAiBD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CAiBhF;AA6CD,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,oBAAoB,EAAE,GAC/B,oBAAoB,EAAE,CAwBxB;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,sCAAgC,CAAC;AAYnE,wBAAgB,0CAA0C,CACxD,QAAQ,EAAE,aAAa,EAAE,GACxB,oBAAoB,EAAE,CAcxB;AA4FD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,oBAAoB,EAAE,GAAG,oBAAoB,EAAE,CAsE3F;AAWD,wBAAgB,eAAe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,kBAAkB,CAChC,QAAQ,EAAE,oBAAoB,EAAE,EAChC,MAAM,GAAE,MAA6B,EACrC,QAAQ,GAAE,MAAU,GACnB,oBAAoB,EAAE,CAMxB;AAED;;GAEG;AACH,4DAA4D;AAC5D,eAAO,MAAM,kCAAkC,mDAA6C,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { convertUiMessagesToProviderModelMessages, getStringField, isReasoningPart, isToolCallPart, isToolResultPart, } from "./conversation.js";
|
|
2
2
|
import { buildDataFileAnnotation, normalizeInlineAttachmentMediaType, } from "./types.js";
|
|
3
3
|
const CHARS_PER_TOKEN = 4;
|
|
4
|
+
/** Estimate tokens. */
|
|
4
5
|
export function estimateTokens(value) {
|
|
5
6
|
return Math.ceil(JSON.stringify(value ?? "").length / CHARS_PER_TOKEN);
|
|
6
7
|
}
|
|
@@ -9,6 +10,7 @@ function truncate(text, maxLen) {
|
|
|
9
10
|
return text;
|
|
10
11
|
return `${text.slice(0, maxLen)}…`;
|
|
11
12
|
}
|
|
13
|
+
/** Compress turn. */
|
|
12
14
|
export function compressTurn(messages, startIdx, endIdx) {
|
|
13
15
|
let userQuery = "";
|
|
14
16
|
const toolNames = [];
|
|
@@ -68,6 +70,7 @@ function collectTurns(messages) {
|
|
|
68
70
|
}
|
|
69
71
|
return turns;
|
|
70
72
|
}
|
|
73
|
+
/** Enforce token budget with turn compression. */
|
|
71
74
|
export function enforceTokenBudgetWithTurnCompression(messages, budget, overhead) {
|
|
72
75
|
const effectiveBudget = budget - overhead;
|
|
73
76
|
let totalTokens = messages.reduce((sum, message) => sum + estimateTokens(message.content), 0);
|
|
@@ -149,10 +152,12 @@ function tryParseJson(value) {
|
|
|
149
152
|
function isRecord(value) {
|
|
150
153
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
151
154
|
}
|
|
155
|
+
/** Check whether the model supports the file media type. */
|
|
152
156
|
export function isModelSupportedFileMediaType(mediaType) {
|
|
153
157
|
return mediaType.startsWith("image/") || mediaType === "application/pdf" ||
|
|
154
158
|
mediaType === "text/plain";
|
|
155
159
|
}
|
|
160
|
+
/** Normalizes message file part media types. */
|
|
156
161
|
export function normalizeMessageFilePartMediaTypes(messages) {
|
|
157
162
|
return messages.map((message) => {
|
|
158
163
|
if (!message.parts.some((part) => part.type === "file")) {
|
|
@@ -174,6 +179,7 @@ export function normalizeMessageFilePartMediaTypes(messages) {
|
|
|
174
179
|
return { ...message, parts };
|
|
175
180
|
});
|
|
176
181
|
}
|
|
182
|
+
/** Rewrite unsupported file parts as annotations. */
|
|
177
183
|
export function rewriteUnsupportedFilePartsAsAnnotations(messages) {
|
|
178
184
|
return messages.map((message) => {
|
|
179
185
|
if (message.parts.length === 0) {
|
|
@@ -231,6 +237,7 @@ function isPendingToolPart(part) {
|
|
|
231
237
|
}
|
|
232
238
|
return part.type === "dynamic-tool" || part.type === "tool_call" || part.type.startsWith("tool-");
|
|
233
239
|
}
|
|
240
|
+
/** Strip pending tool parts. */
|
|
234
241
|
export function stripPendingToolParts(messages) {
|
|
235
242
|
return messages.flatMap((message) => {
|
|
236
243
|
if (message.role !== "assistant" || message.parts.length === 0) {
|
|
@@ -287,6 +294,7 @@ function cleanContent(content) {
|
|
|
287
294
|
const hasSubstantiveContent = content.some((part) => isKeepableModelPart(part, false));
|
|
288
295
|
return content.filter((part) => isKeepableModelPart(part, hasSubstantiveContent));
|
|
289
296
|
}
|
|
297
|
+
/** Sanitize provider model messages. */
|
|
290
298
|
export function sanitizeProviderModelMessages(messages) {
|
|
291
299
|
const result = [];
|
|
292
300
|
for (const message of messages) {
|
|
@@ -317,6 +325,7 @@ export function sanitizeProviderModelMessages(messages) {
|
|
|
317
325
|
/**
|
|
318
326
|
* @deprecated Use sanitizeProviderModelMessages for provider-facing model payloads.
|
|
319
327
|
*/
|
|
328
|
+
/** Shared sanitize model messages value. */
|
|
320
329
|
export const sanitizeModelMessages = sanitizeProviderModelMessages;
|
|
321
330
|
function filterValidMessages(messages) {
|
|
322
331
|
return messages.filter((message) => {
|
|
@@ -330,6 +339,7 @@ function filterValidMessages(messages) {
|
|
|
330
339
|
return true;
|
|
331
340
|
});
|
|
332
341
|
}
|
|
342
|
+
/** Prepare provider model messages from UI messages. */
|
|
333
343
|
export function prepareProviderModelMessagesFromUiMessages(messages) {
|
|
334
344
|
const validMessages = messages.filter((message) => message && typeof message === "object" && "role" in message);
|
|
335
345
|
const normalizedMessages = normalizeMessageFilePartMediaTypes(validMessages);
|
|
@@ -422,6 +432,7 @@ function wrapToolResultOutput(original, newValue) {
|
|
|
422
432
|
}
|
|
423
433
|
return original;
|
|
424
434
|
}
|
|
435
|
+
/** Mask old tool outputs. */
|
|
425
436
|
export function maskOldToolOutputs(messages) {
|
|
426
437
|
let lastUserIdx = -1;
|
|
427
438
|
for (let i = messages.length - 1; i >= 0; i--) {
|
|
@@ -492,6 +503,7 @@ function createSyntheticToolResult(toolCallId, toolName) {
|
|
|
492
503
|
output: { type: "text", value: "[tool result unavailable]" },
|
|
493
504
|
};
|
|
494
505
|
}
|
|
506
|
+
/** Repair tool pairs. */
|
|
495
507
|
export function repairToolPairs(messages) {
|
|
496
508
|
const result = [...messages];
|
|
497
509
|
let mutated = false;
|
|
@@ -599,10 +611,12 @@ export function repairToolPairs(messages) {
|
|
|
599
611
|
}
|
|
600
612
|
return mutated ? result : messages;
|
|
601
613
|
}
|
|
614
|
+
/** Estimate overhead. */
|
|
602
615
|
export function estimateOverhead(instructions, toolCount) {
|
|
603
616
|
const instructionTokens = estimateTokens(instructions);
|
|
604
617
|
return instructionTokens + toolCount * TOKENS_PER_TOOL;
|
|
605
618
|
}
|
|
619
|
+
/** Ensure tool call inputs helper. */
|
|
606
620
|
export function ensureToolCallInputs(messages) {
|
|
607
621
|
let mutated = false;
|
|
608
622
|
const result = messages.map((msg) => {
|
|
@@ -627,6 +641,7 @@ export function ensureToolCallInputs(messages) {
|
|
|
627
641
|
});
|
|
628
642
|
return mutated ? result : messages;
|
|
629
643
|
}
|
|
644
|
+
/** Compact for step. */
|
|
630
645
|
export function compactForStep(messages, overhead = 0) {
|
|
631
646
|
const compacted = enforceTokenBudget(maskOldToolOutputs(messages), DEFAULT_TOKEN_BUDGET, overhead);
|
|
632
647
|
let end = compacted.length;
|
|
@@ -636,6 +651,7 @@ export function compactForStep(messages, overhead = 0) {
|
|
|
636
651
|
const trimmed = end < compacted.length ? compacted.slice(0, end) : compacted;
|
|
637
652
|
return ensureToolCallInputs(repairToolPairs(dedupeToolHistory(trimmed)));
|
|
638
653
|
}
|
|
654
|
+
/** Dedupe tool history. */
|
|
639
655
|
export function dedupeToolHistory(messages) {
|
|
640
656
|
const seenToolCallIds = new Set();
|
|
641
657
|
const seenToolResultIds = new Set();
|
|
@@ -697,6 +713,7 @@ export function dedupeToolHistory(messages) {
|
|
|
697
713
|
}
|
|
698
714
|
return mutated ? deduped : messages;
|
|
699
715
|
}
|
|
716
|
+
/** Enforce token budget. */
|
|
700
717
|
export function enforceTokenBudget(messages, budget = DEFAULT_TOKEN_BUDGET, overhead = 0) {
|
|
701
718
|
if (messages.length === 0) {
|
|
702
719
|
return messages;
|
|
@@ -706,4 +723,5 @@ export function enforceTokenBudget(messages, budget = DEFAULT_TOKEN_BUDGET, over
|
|
|
706
723
|
/**
|
|
707
724
|
* @deprecated Use prepareProviderModelMessagesFromUiMessages for provider-facing model payloads.
|
|
708
725
|
*/
|
|
726
|
+
/** Shared prepare model messages from UI messages value. */
|
|
709
727
|
export const prepareModelMessagesFromUiMessages = prepareProviderModelMessagesFromUiMessages;
|