veryfront 0.1.516 → 0.1.518
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/deno.js +3 -3
- package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts +14 -0
- package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/browser-chunk-encoder.js +31 -0
- package/esm/src/agent/ag-ui/browser-encoder.d.ts +32 -0
- package/esm/src/agent/ag-ui/browser-encoder.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/browser-encoder.js +405 -0
- package/esm/src/agent/ag-ui/browser-finalize-tracker.d.ts +12 -0
- package/esm/src/agent/ag-ui/browser-finalize-tracker.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/browser-finalize-tracker.js +42 -0
- package/esm/src/agent/ag-ui/browser-response-stream.d.ts +28 -0
- package/esm/src/agent/ag-ui/browser-response-stream.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.d.ts +20 -0
- package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.js +108 -0
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.d.ts +11 -0
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.js +9 -0
- package/esm/src/agent/ag-ui/detached-start.d.ts +158 -0
- package/esm/src/agent/ag-ui/detached-start.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/detached-start.js +256 -0
- package/esm/src/agent/ag-ui/forwarded-context.d.ts +14 -0
- package/esm/src/agent/ag-ui/forwarded-context.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/forwarded-context.js +56 -0
- package/esm/src/agent/ag-ui/handler.d.ts +14 -0
- package/esm/src/agent/ag-ui/handler.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/handler.js +244 -0
- package/esm/src/agent/ag-ui/host-support.d.ts +131 -0
- package/esm/src/agent/ag-ui/host-support.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/host-support.js +179 -0
- package/esm/src/agent/ag-ui/request-shared.d.ts +4 -0
- package/esm/src/agent/ag-ui/request-shared.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/request-shared.js +56 -0
- package/esm/src/agent/ag-ui/run-control.d.ts +39 -0
- package/esm/src/agent/ag-ui/run-control.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/run-control.js +84 -0
- package/esm/src/agent/ag-ui/runtime-browser-response.d.ts +18 -0
- package/esm/src/agent/ag-ui/runtime-browser-response.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/runtime-browser-response.js +15 -0
- package/esm/src/agent/ag-ui/runtime-chat-stream-encoder.d.ts +17 -0
- package/esm/src/agent/ag-ui/runtime-chat-stream-encoder.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/runtime-chat-stream-encoder.js +304 -0
- package/esm/src/agent/ag-ui/runtime-event-encoder.d.ts +11 -0
- package/esm/src/agent/ag-ui/runtime-event-encoder.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/runtime-event-encoder.js +37 -0
- package/esm/src/agent/ag-ui/runtime-handler.d.ts +44 -0
- package/esm/src/agent/ag-ui/runtime-handler.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/runtime-handler.js +301 -0
- package/esm/src/agent/ag-ui/runtime-support.d.ts +4 -0
- package/esm/src/agent/ag-ui/runtime-support.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/sse-parser.d.ts +57 -0
- package/esm/src/agent/ag-ui/sse-parser.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/sse-parser.js +227 -0
- package/esm/src/agent/ag-ui/tool-shared.d.ts +15 -0
- package/esm/src/agent/ag-ui/tool-shared.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/tool-shared.js +48 -0
- package/esm/src/agent/ag-ui/tracked-browser-response.d.ts +9 -0
- package/esm/src/agent/ag-ui/tracked-browser-response.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/tracked-browser-response.js +19 -0
- package/esm/src/agent/agent-runtime-message-adapter.js +1 -1
- package/esm/src/agent/chat-ui-message-stream.js +1 -1
- package/esm/src/agent/child-run/execution-cleanup.d.ts +14 -0
- package/esm/src/agent/child-run/execution-cleanup.d.ts.map +1 -0
- package/esm/src/agent/child-run/execution-snapshot.d.ts +70 -0
- package/esm/src/agent/child-run/execution-snapshot.d.ts.map +1 -0
- package/esm/src/agent/child-run/execution-support.d.ts +5 -0
- package/esm/src/agent/child-run/execution-support.d.ts.map +1 -0
- package/esm/src/agent/child-run/final-step-support.d.ts +18 -0
- package/esm/src/agent/child-run/final-step-support.d.ts.map +1 -0
- package/esm/src/agent/child-run/result-summary.d.ts +14 -0
- package/esm/src/agent/child-run/result-summary.d.ts.map +1 -0
- package/esm/src/agent/conversation/bootstrap.d.ts +94 -0
- package/esm/src/agent/conversation/bootstrap.d.ts.map +1 -0
- package/esm/src/agent/conversation/bootstrap.js +210 -0
- package/esm/src/agent/conversation/delegation-policy.d.ts +53 -0
- package/esm/src/agent/conversation/delegation-policy.d.ts.map +1 -0
- package/esm/src/agent/conversation/delegation-policy.js +192 -0
- package/esm/src/agent/conversation/hosted-lifecycle.d.ts +39 -0
- package/esm/src/agent/conversation/hosted-lifecycle.d.ts.map +1 -0
- package/esm/src/agent/conversation/hosted-lifecycle.js +138 -0
- package/esm/src/agent/conversation/hosted-terminal.d.ts +46 -0
- package/esm/src/agent/conversation/hosted-terminal.d.ts.map +1 -0
- package/esm/src/agent/conversation/hosted-terminal.js +138 -0
- package/esm/src/agent/conversation/root-run-context.d.ts +57 -0
- package/esm/src/agent/conversation/root-run-context.d.ts.map +1 -0
- package/esm/src/agent/conversation/root-run-context.js +79 -0
- package/esm/src/agent/conversation/root-run-lifecycle.d.ts +61 -0
- package/esm/src/agent/conversation/root-run-lifecycle.d.ts.map +1 -0
- package/esm/src/agent/conversation/root-run-lifecycle.js +94 -0
- package/esm/src/agent/conversation/run-chunk-mirror.d.ts +74 -0
- package/esm/src/agent/conversation/run-chunk-mirror.d.ts.map +1 -0
- package/esm/src/agent/conversation/run-chunk-mirror.js +188 -0
- package/esm/src/agent/conversation/run-context.d.ts +19 -0
- package/esm/src/agent/conversation/run-context.d.ts.map +1 -0
- package/esm/src/agent/conversation/run-event-normalization.d.ts +8 -0
- package/esm/src/agent/conversation/run-event-normalization.d.ts.map +1 -0
- package/esm/src/agent/conversation/run-event-preparation.d.ts +7 -0
- package/esm/src/agent/conversation/run-event-preparation.d.ts.map +1 -0
- package/esm/src/agent/conversation/run-event-preparation.js +48 -0
- package/esm/src/agent/conversation/run-events.d.ts +34 -0
- package/esm/src/agent/conversation/run-events.d.ts.map +1 -0
- package/esm/src/agent/conversation/run-events.js +200 -0
- package/esm/src/agent/conversation/run-mirror.d.ts +43 -0
- package/esm/src/agent/conversation/run-mirror.d.ts.map +1 -0
- package/esm/src/agent/conversation/run-mirror.js +157 -0
- package/esm/src/agent/conversation/run-stream-mirror.d.ts +21 -0
- package/esm/src/agent/conversation/run-stream-mirror.d.ts.map +1 -0
- package/esm/src/agent/conversation/run-stream-mirror.js +31 -0
- package/esm/src/agent/data-stream.d.ts +1 -1
- package/esm/src/agent/default-hosted-chat-runtime.d.ts +5 -5
- package/esm/src/agent/default-hosted-chat-runtime.d.ts.map +1 -1
- package/esm/src/agent/default-hosted-chat-runtime.js +3 -3
- package/esm/src/agent/default-hosted-invoke-agent-tool.d.ts +7 -7
- package/esm/src/agent/default-hosted-invoke-agent-tool.d.ts.map +1 -1
- package/esm/src/agent/default-hosted-invoke-agent-tool.js +13 -13
- package/esm/src/agent/default-hosted-project-steering-refresh.d.ts +4 -4
- package/esm/src/agent/default-hosted-project-steering-refresh.js +1 -1
- package/esm/src/agent/default-research-artifact-support.js +2 -2
- package/esm/src/agent/fork-runtime-stream.d.ts +1 -1
- package/esm/src/agent/fork-runtime-stream.js +1 -1
- package/esm/src/agent/hosted/ag-ui-chat-request.d.ts +56 -0
- package/esm/src/agent/hosted/ag-ui-chat-request.d.ts.map +1 -0
- package/esm/src/agent/hosted/ag-ui-chat-request.js +112 -0
- package/esm/src/agent/hosted/agent-project-steering.d.ts +33 -0
- package/esm/src/agent/hosted/agent-project-steering.d.ts.map +1 -0
- package/esm/src/agent/hosted/agent-project-steering.js +73 -0
- package/esm/src/agent/hosted/agent-run-lifecycle.d.ts +60 -0
- package/esm/src/agent/hosted/agent-run-lifecycle.d.ts.map +1 -0
- package/esm/src/agent/hosted/agent-run-lifecycle.js +72 -0
- package/esm/src/agent/hosted/chat-execution-runtime.d.ts +127 -0
- package/esm/src/agent/hosted/chat-execution-runtime.d.ts.map +1 -0
- package/esm/src/agent/hosted/chat-execution-runtime.js +400 -0
- package/esm/src/agent/hosted/chat-preparation.d.ts +105 -0
- package/esm/src/agent/hosted/chat-preparation.d.ts.map +1 -0
- package/esm/src/agent/hosted/chat-preparation.js +156 -0
- package/esm/src/agent/hosted/chat-request-parser.d.ts +53 -0
- package/esm/src/agent/hosted/chat-request-parser.d.ts.map +1 -0
- package/esm/src/agent/hosted/chat-request-parser.js +105 -0
- package/esm/src/agent/hosted/chat-request.d.ts +305 -0
- package/esm/src/agent/hosted/chat-request.d.ts.map +1 -0
- package/esm/src/agent/hosted/chat-request.js +68 -0
- package/esm/src/agent/hosted/chat-runtime-agent-adapter.d.ts +14 -0
- package/esm/src/agent/hosted/chat-runtime-agent-adapter.d.ts.map +1 -0
- package/esm/src/agent/hosted/chat-runtime-agent-adapter.js +48 -0
- package/esm/src/agent/hosted/chat-runtime-contract.d.ts +86 -0
- package/esm/src/agent/hosted/chat-runtime-contract.d.ts.map +1 -0
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts +51 -0
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts.map +1 -0
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.js +84 -0
- package/esm/src/agent/hosted/child-artifact-support.d.ts +25 -0
- package/esm/src/agent/hosted/child-artifact-support.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-artifact-support.js +121 -0
- package/esm/src/agent/hosted/child-bootstrap.d.ts +40 -0
- package/esm/src/agent/hosted/child-bootstrap.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-bootstrap.js +44 -0
- package/esm/src/agent/hosted/child-execution-logging.d.ts +35 -0
- package/esm/src/agent/hosted/child-execution-logging.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-execution-logging.js +69 -0
- package/esm/src/agent/hosted/child-fork-execution-runner.d.ts +101 -0
- package/esm/src/agent/hosted/child-fork-execution-runner.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-fork-execution-runner.js +205 -0
- package/esm/src/agent/hosted/child-fork-instructions.d.ts +8 -0
- package/esm/src/agent/hosted/child-fork-instructions.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-fork-run-context.d.ts +88 -0
- package/esm/src/agent/hosted/child-fork-run-context.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-fork-run-context.js +144 -0
- package/esm/src/agent/hosted/child-fork-runtime-start.d.ts +18 -0
- package/esm/src/agent/hosted/child-fork-runtime-start.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-fork-runtime-start.js +41 -0
- package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts +19 -0
- package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-fork-step-message-preparation.js +52 -0
- package/esm/src/agent/hosted/child-fork-stream-execution.d.ts +153 -0
- package/esm/src/agent/hosted/child-fork-stream-execution.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-fork-stream-execution.js +416 -0
- package/esm/src/agent/hosted/child-fork-tool-sources.d.ts +46 -0
- package/esm/src/agent/hosted/child-fork-tool-sources.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-fork-tool-sources.js +132 -0
- package/esm/src/agent/hosted/child-invoke-tool.d.ts +20 -0
- package/esm/src/agent/hosted/child-invoke-tool.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-invoke-tool.js +49 -0
- package/esm/src/agent/hosted/child-lifecycle.d.ts +63 -0
- package/esm/src/agent/hosted/child-lifecycle.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-lifecycle.js +192 -0
- package/esm/src/agent/hosted/child-mirror.d.ts +108 -0
- package/esm/src/agent/hosted/child-mirror.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-pending-tool-lifecycle.d.ts +50 -0
- package/esm/src/agent/hosted/child-pending-tool-lifecycle.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-pending-tool-lifecycle.js +119 -0
- package/esm/src/agent/hosted/child-requested-tools.d.ts +109 -0
- package/esm/src/agent/hosted/child-requested-tools.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-requested-tools.js +233 -0
- package/esm/src/agent/hosted/child-status.d.ts +39 -0
- package/esm/src/agent/hosted/child-status.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-status.js +98 -0
- package/esm/src/agent/hosted/child-steering-tools.d.ts +20 -0
- package/esm/src/agent/hosted/child-steering-tools.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-steering-tools.js +53 -0
- package/esm/src/agent/hosted/child-stream-watchdog.d.ts +27 -0
- package/esm/src/agent/hosted/child-stream-watchdog.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-stream-watchdog.js +95 -0
- package/esm/src/agent/hosted/child-tool-input.d.ts +44 -0
- package/esm/src/agent/hosted/child-tool-input.d.ts.map +1 -0
- package/esm/src/agent/hosted/child-tool-input.js +44 -0
- package/esm/src/agent/hosted/durable-chat-run-start.d.ts +46 -0
- package/esm/src/agent/hosted/durable-chat-run-start.d.ts.map +1 -0
- package/esm/src/agent/hosted/durable-chat-run-start.js +148 -0
- package/esm/src/agent/hosted/durable-child-fork-execution.d.ts +159 -0
- package/esm/src/agent/hosted/durable-child-fork-execution.d.ts.map +1 -0
- package/esm/src/agent/hosted/durable-child-fork-execution.js +324 -0
- package/esm/src/agent/hosted/finalized-message.d.ts +44 -0
- package/esm/src/agent/hosted/finalized-message.d.ts.map +1 -0
- package/esm/src/agent/hosted/finalized-message.js +67 -0
- package/esm/src/agent/hosted/form-input-tool.d.ts +85 -0
- package/esm/src/agent/hosted/form-input-tool.d.ts.map +1 -0
- package/esm/src/agent/hosted/form-input-tool.js +88 -0
- package/esm/src/agent/hosted/lifecycle.d.ts +41 -0
- package/esm/src/agent/hosted/lifecycle.d.ts.map +1 -0
- package/esm/src/agent/hosted/project-remote-tool-source.d.ts +46 -0
- package/esm/src/agent/hosted/project-remote-tool-source.d.ts.map +1 -0
- package/esm/src/agent/hosted/project-remote-tool-source.js +147 -0
- package/esm/src/agent/hosted/project-steering-adapter.d.ts +34 -0
- package/esm/src/agent/hosted/project-steering-adapter.d.ts.map +1 -0
- package/esm/src/agent/hosted/project-steering-adapter.js +82 -0
- package/esm/src/agent/hosted/response-stream.d.ts +22 -0
- package/esm/src/agent/hosted/response-stream.d.ts.map +1 -0
- package/esm/src/agent/hosted/response-stream.js +52 -0
- package/esm/src/agent/hosted/runtime-request-config.d.ts +27 -0
- package/esm/src/agent/hosted/runtime-request-config.d.ts.map +1 -0
- package/esm/src/agent/hosted/runtime-request-config.js +54 -0
- package/esm/src/agent/hosted/runtime-state-resolver.d.ts +28 -0
- package/esm/src/agent/hosted/runtime-state-resolver.d.ts.map +1 -0
- package/esm/src/agent/hosted/runtime-state-resolver.js +71 -0
- package/esm/src/agent/hosted/stream-finalization.d.ts +61 -0
- package/esm/src/agent/hosted/stream-finalization.d.ts.map +1 -0
- package/esm/src/agent/hosted/stream-terminal-error.d.ts +16 -0
- package/esm/src/agent/hosted/stream-terminal-error.d.ts.map +1 -0
- package/esm/src/agent/hosted/stream-terminal-error.js +54 -0
- package/esm/src/agent/hosted/veryfront-api-tool-access.d.ts +49 -0
- package/esm/src/agent/hosted/veryfront-api-tool-access.d.ts.map +1 -0
- package/esm/src/agent/hosted/veryfront-api-tool-access.js +182 -0
- package/esm/src/agent/human-input.js +1 -1
- package/esm/src/agent/index.d.ts +108 -107
- package/esm/src/agent/index.d.ts.map +1 -1
- package/esm/src/agent/index.js +106 -105
- package/esm/src/agent/live-studio-mcp-tools.d.ts +1 -1
- package/esm/src/agent/live-studio-mcp-tools.js +1 -1
- package/esm/src/agent/prepared-hosted-chat-execution.d.ts +2 -2
- package/esm/src/agent/prepared-hosted-chat-execution.js +3 -3
- package/esm/src/agent/project-agent-runtime.d.ts +25 -0
- package/esm/src/agent/project-agent-runtime.d.ts.map +1 -0
- package/esm/src/agent/project-agent-runtime.js +84 -0
- package/esm/src/agent/runtime/ag-ui-contract.d.ts +213 -0
- package/esm/src/agent/runtime/ag-ui-contract.d.ts.map +1 -0
- package/esm/src/agent/runtime/ag-ui-contract.js +134 -0
- package/esm/src/agent/runtime/agent-definition-files.d.ts +23 -0
- package/esm/src/agent/runtime/agent-definition-files.d.ts.map +1 -0
- package/esm/src/agent/runtime/agent-definition-files.js +79 -0
- package/esm/src/agent/runtime/agent-definition.d.ts +60 -0
- package/esm/src/agent/runtime/agent-definition.d.ts.map +1 -0
- package/esm/src/agent/runtime/agent-definition.js +105 -0
- package/esm/src/agent/runtime/agent-invocation-contract.d.ts +326 -0
- package/esm/src/agent/runtime/agent-invocation-contract.d.ts.map +1 -0
- package/esm/src/agent/runtime/agent-invocation-contract.js +212 -0
- package/esm/src/agent/runtime/agent-markdown-adapter.d.ts +6 -0
- package/esm/src/agent/runtime/agent-markdown-adapter.d.ts.map +1 -0
- package/esm/src/agent/runtime/agent-markdown-adapter.js +20 -0
- package/esm/src/agent/runtime/builtin-skill-files.d.ts +18 -0
- package/esm/src/agent/runtime/builtin-skill-files.d.ts.map +1 -0
- package/esm/src/agent/runtime/builtin-skill-files.js +82 -0
- package/esm/src/agent/runtime/client-profile.d.ts +26 -0
- package/esm/src/agent/runtime/client-profile.d.ts.map +1 -0
- package/esm/src/agent/runtime/client-profile.js +82 -0
- package/esm/src/agent/runtime/load-skill-tool.d.ts +43 -0
- package/esm/src/agent/runtime/load-skill-tool.d.ts.map +1 -0
- package/esm/src/agent/runtime/load-skill-tool.js +115 -0
- package/esm/src/agent/runtime/message-file-url-refresh.d.ts +9 -0
- package/esm/src/agent/runtime/message-file-url-refresh.d.ts.map +1 -0
- package/esm/src/agent/runtime/message-preparation.d.ts +10 -0
- package/esm/src/agent/runtime/message-preparation.d.ts.map +1 -0
- package/esm/src/agent/runtime/message-preparation.js +34 -0
- package/esm/src/agent/runtime/project-files-client.d.ts +50 -0
- package/esm/src/agent/runtime/project-files-client.d.ts.map +1 -0
- package/esm/src/agent/runtime/project-files-client.js +143 -0
- package/esm/src/agent/runtime/project-skill-catalog.d.ts +26 -0
- package/esm/src/agent/runtime/project-skill-catalog.d.ts.map +1 -0
- package/esm/src/agent/runtime/project-skill-catalog.js +148 -0
- package/esm/src/agent/runtime/project-skill-loader.d.ts +28 -0
- package/esm/src/agent/runtime/project-skill-loader.d.ts.map +1 -0
- package/esm/src/agent/runtime/project-skill-loader.js +122 -0
- package/esm/src/agent/runtime/prompt-block.d.ts +7 -0
- package/esm/src/agent/runtime/prompt-block.d.ts.map +1 -0
- package/esm/src/agent/runtime/skill-metadata.d.ts +75 -0
- package/esm/src/agent/runtime/skill-metadata.d.ts.map +1 -0
- package/esm/src/agent/runtime/skill-metadata.js +159 -0
- package/esm/src/agent/runtime/skill-prompt.d.ts +5 -0
- package/esm/src/agent/runtime/skill-prompt.d.ts.map +1 -0
- package/esm/src/agent/runtime/skill-prompt.js +40 -0
- package/esm/src/agent/runtime/tool-inventory.d.ts +4 -0
- package/esm/src/agent/runtime/tool-inventory.d.ts.map +1 -0
- package/esm/src/agent/runtime/upload-url-client.d.ts +13 -0
- package/esm/src/agent/runtime/upload-url-client.d.ts.map +1 -0
- package/esm/src/agent/runtime/upload-url-client.js +54 -0
- package/esm/src/agent/service/auth.d.ts +81 -0
- package/esm/src/agent/service/auth.d.ts.map +1 -0
- package/esm/src/agent/service/bootstrap.d.ts +23 -0
- package/esm/src/agent/service/bootstrap.d.ts.map +1 -0
- package/esm/src/agent/service/bootstrap.js +38 -0
- package/esm/src/agent/service/config.d.ts +140 -0
- package/esm/src/agent/service/config.d.ts.map +1 -0
- package/esm/src/agent/service/definition.d.ts +87 -0
- package/esm/src/agent/service/definition.d.ts.map +1 -0
- package/esm/src/agent/service/env-files.d.ts +13 -0
- package/esm/src/agent/service/env-files.d.ts.map +1 -0
- package/esm/src/agent/service/env-files.js +34 -0
- package/esm/src/agent/service/mcp-server-config.d.ts +33 -0
- package/esm/src/agent/service/mcp-server-config.d.ts.map +1 -0
- package/esm/src/agent/service/mcp-server-config.js +49 -0
- package/esm/src/agent/service/node-runtime-infrastructure.d.ts +26 -0
- package/esm/src/agent/service/node-runtime-infrastructure.d.ts.map +1 -0
- package/esm/src/agent/service/node-runtime-infrastructure.js +30 -0
- package/esm/src/agent/service/node-telemetry.d.ts +44 -0
- package/esm/src/agent/service/node-telemetry.d.ts.map +1 -0
- package/esm/src/agent/service/registration.d.ts +110 -0
- package/esm/src/agent/service/registration.d.ts.map +1 -0
- package/esm/src/agent/service/registration.js +228 -0
- package/esm/src/agent/service/routes.d.ts +81 -0
- package/esm/src/agent/service/routes.d.ts.map +1 -0
- package/esm/src/agent/service/routes.js +204 -0
- package/esm/src/agent/service/runtime.d.ts +73 -0
- package/esm/src/agent/service/runtime.d.ts.map +1 -0
- package/esm/src/agent/service/runtime.js +118 -0
- package/esm/src/agent/service/server.d.ts +30 -0
- package/esm/src/agent/service/server.d.ts.map +1 -0
- package/esm/src/agent/service/server.js +47 -0
- package/esm/src/agent/veryfront-cloud-agent-service.d.ts +8 -7
- package/esm/src/agent/veryfront-cloud-agent-service.d.ts.map +1 -1
- package/esm/src/agent/veryfront-cloud-agent-service.js +17 -72
- package/esm/src/agent/veryfront-cloud-hosted-chat-execution-preparation.d.ts +3 -3
- package/esm/src/agent/veryfront-cloud-hosted-chat-execution-preparation.js +1 -1
- package/esm/src/agent/veryfront-cloud-prepared-hosted-chat-execution-runtime.d.ts +1 -1
- package/esm/src/agent/veryfront-cloud-runtime-system-messages.d.ts +3 -3
- package/esm/src/agent/veryfront-cloud-runtime-system-messages.js +2 -2
- package/esm/src/discovery/handlers/runtime-agent-markdown-handler.js +2 -2
- package/esm/src/internal-agents/ag-ui-sse.d.ts +2 -2
- package/esm/src/internal-agents/ag-ui-sse.js +1 -1
- package/esm/src/internal-agents/run-stream.js +1 -1
- package/esm/src/internal-agents/schema.d.ts +2 -2
- package/esm/src/internal-agents/schema.js +2 -2
- package/esm/src/tool/project-scoped-remote-tools.d.ts +6 -0
- package/esm/src/tool/project-scoped-remote-tools.d.ts.map +1 -1
- package/esm/src/tool/project-scoped-remote-tools.js +15 -4
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +3 -3
- package/src/deno.js +3 -3
- package/src/deps/esm.sh/@types/react-dom@19.2.3/client.d.ts +1 -1
- package/src/deps/esm.sh/@types/react@19.2.14/global.d.ts +166 -0
- package/src/deps/esm.sh/@types/react@19.2.14/index.d.ts +4370 -0
- package/src/deps/esm.sh/react-dom@19.2.4/client.d.ts +1 -1
- package/src/src/agent/ag-ui/browser-chunk-encoder.ts +58 -0
- package/src/src/agent/ag-ui/browser-encoder.ts +538 -0
- package/src/src/agent/ag-ui/browser-finalize-tracker.ts +65 -0
- package/src/src/agent/ag-ui/browser-response-stream.ts +175 -0
- package/src/src/agent/ag-ui/chat-ui-chunk-browser-encoder.ts +172 -0
- package/src/src/agent/ag-ui/chunk-encoder-bridge.ts +34 -0
- package/src/src/agent/ag-ui/detached-start.ts +425 -0
- package/src/src/agent/ag-ui/forwarded-context.ts +83 -0
- package/src/src/agent/ag-ui/handler.ts +388 -0
- package/src/src/agent/ag-ui/host-support.ts +244 -0
- package/src/src/agent/ag-ui/request-shared.ts +76 -0
- package/src/src/agent/ag-ui/run-control.ts +145 -0
- package/src/src/agent/ag-ui/runtime-browser-response.ts +41 -0
- package/src/src/agent/ag-ui/runtime-chat-stream-encoder.ts +359 -0
- package/src/src/agent/ag-ui/runtime-event-encoder.ts +71 -0
- package/src/src/agent/ag-ui/runtime-handler.ts +510 -0
- package/src/src/agent/ag-ui/runtime-support.ts +64 -0
- package/src/src/agent/ag-ui/sse-parser.ts +306 -0
- package/src/src/agent/ag-ui/tool-shared.ts +80 -0
- package/src/src/agent/ag-ui/tracked-browser-response.ts +42 -0
- package/src/src/agent/agent-runtime-message-adapter.ts +1 -1
- package/src/src/agent/chat-ui-message-stream.ts +1 -1
- package/src/src/agent/conversation/bootstrap.ts +335 -0
- package/src/src/agent/conversation/delegation-policy.ts +299 -0
- package/src/src/agent/conversation/hosted-lifecycle.ts +215 -0
- package/src/src/agent/conversation/hosted-terminal.ts +235 -0
- package/src/src/agent/conversation/root-run-context.ts +143 -0
- package/src/src/agent/conversation/root-run-lifecycle.ts +184 -0
- package/src/src/agent/conversation/run-chunk-mirror.ts +350 -0
- package/src/src/agent/conversation/run-context.ts +22 -0
- package/src/src/agent/conversation/run-event-preparation.ts +76 -0
- package/src/src/agent/conversation/run-events.ts +242 -0
- package/src/src/agent/conversation/run-mirror.ts +235 -0
- package/src/src/agent/conversation/run-stream-mirror.ts +56 -0
- package/src/src/agent/data-stream.ts +1 -1
- package/src/src/agent/default-hosted-chat-runtime.ts +6 -6
- package/src/src/agent/default-hosted-invoke-agent-tool.ts +19 -19
- package/src/src/agent/default-hosted-project-steering-refresh.ts +5 -5
- package/src/src/agent/default-research-artifact-support.ts +2 -2
- package/src/src/agent/fork-runtime-stream.ts +2 -2
- package/src/src/agent/hosted/ag-ui-chat-request.ts +197 -0
- package/src/src/agent/hosted/agent-project-steering.ts +129 -0
- package/src/src/agent/hosted/agent-run-lifecycle.ts +161 -0
- package/src/src/agent/hosted/chat-execution-runtime.ts +703 -0
- package/src/src/agent/hosted/chat-preparation.ts +357 -0
- package/src/src/agent/hosted/chat-request-parser.ts +209 -0
- package/src/src/agent/hosted/chat-request.ts +112 -0
- package/src/src/agent/hosted/chat-runtime-agent-adapter.ts +88 -0
- package/src/src/agent/hosted/chat-runtime-contract.ts +101 -0
- package/src/src/agent/hosted/chat-runtime-tool-assembly.ts +183 -0
- package/src/src/agent/hosted/child-artifact-support.ts +201 -0
- package/src/src/agent/hosted/child-bootstrap.ts +75 -0
- package/src/src/agent/hosted/child-execution-logging.ts +114 -0
- package/src/src/agent/hosted/child-fork-execution-runner.ts +396 -0
- package/src/src/agent/hosted/child-fork-run-context.ts +309 -0
- package/src/src/agent/hosted/child-fork-runtime-start.ts +84 -0
- package/src/src/agent/hosted/child-fork-step-message-preparation.ts +96 -0
- package/src/src/agent/hosted/child-fork-stream-execution.ts +626 -0
- package/src/src/agent/hosted/child-fork-tool-sources.ts +231 -0
- package/src/src/agent/hosted/child-invoke-tool.ts +90 -0
- package/src/src/agent/hosted/child-lifecycle.ts +352 -0
- package/src/src/agent/hosted/child-mirror.ts +272 -0
- package/src/src/agent/hosted/child-pending-tool-lifecycle.ts +191 -0
- package/src/src/agent/hosted/child-requested-tools.ts +411 -0
- package/src/src/agent/hosted/child-status.ts +167 -0
- package/src/src/agent/hosted/child-steering-tools.ts +92 -0
- package/src/src/agent/hosted/child-stream-watchdog.ts +146 -0
- package/src/src/agent/hosted/child-tool-input.ts +91 -0
- package/src/src/agent/hosted/durable-chat-run-start.ts +246 -0
- package/src/src/agent/hosted/durable-child-fork-execution.ts +597 -0
- package/src/src/agent/hosted/finalized-message.ts +170 -0
- package/src/src/agent/hosted/form-input-tool.ts +128 -0
- package/src/src/agent/hosted/project-remote-tool-source.ts +279 -0
- package/src/src/agent/hosted/project-steering-adapter.ts +184 -0
- package/src/src/agent/hosted/response-stream.ts +87 -0
- package/src/src/agent/hosted/runtime-request-config.ts +112 -0
- package/src/src/agent/hosted/runtime-state-resolver.ts +133 -0
- package/src/src/agent/hosted/stream-finalization.ts +188 -0
- package/src/src/agent/hosted/stream-terminal-error.ts +81 -0
- package/src/src/agent/hosted/veryfront-api-tool-access.ts +293 -0
- package/src/src/agent/human-input.ts +1 -1
- package/src/src/agent/index.ts +120 -107
- package/src/src/agent/live-studio-mcp-tools.ts +1 -1
- package/src/src/agent/prepared-hosted-chat-execution.ts +4 -4
- package/src/src/agent/project-agent-runtime.ts +139 -0
- package/src/src/agent/runtime/ag-ui-contract.ts +216 -0
- package/src/src/agent/runtime/agent-definition-files.ts +128 -0
- package/src/src/agent/runtime/agent-definition.ts +163 -0
- package/src/src/agent/runtime/agent-invocation-contract.ts +355 -0
- package/src/src/agent/runtime/agent-markdown-adapter.ts +31 -0
- package/src/src/agent/runtime/builtin-skill-files.ts +122 -0
- package/src/src/agent/runtime/client-profile.ts +123 -0
- package/src/src/agent/runtime/load-skill-tool.ts +239 -0
- package/src/src/agent/runtime/message-file-url-refresh.ts +120 -0
- package/src/src/agent/runtime/message-preparation.ts +58 -0
- package/src/src/agent/runtime/project-files-client.ts +256 -0
- package/src/src/agent/runtime/project-skill-catalog.ts +238 -0
- package/src/src/agent/runtime/project-skill-loader.ts +217 -0
- package/src/src/agent/runtime/skill-metadata.ts +260 -0
- package/src/src/agent/runtime/skill-prompt.ts +61 -0
- package/src/src/agent/runtime/tool-inventory.ts +46 -0
- package/src/src/agent/runtime/upload-url-client.ts +95 -0
- package/src/src/agent/service/bootstrap.ts +79 -0
- package/src/src/agent/service/definition.ts +386 -0
- package/src/src/agent/service/env-files.ts +60 -0
- package/src/src/agent/service/mcp-server-config.ts +112 -0
- package/src/src/agent/service/node-runtime-infrastructure.ts +71 -0
- package/src/src/agent/service/registration.ts +320 -0
- package/src/src/agent/service/routes.ts +386 -0
- package/src/src/agent/service/runtime.ts +303 -0
- package/src/src/agent/service/server.ts +98 -0
- package/src/src/agent/veryfront-cloud-agent-service.ts +37 -115
- package/src/src/agent/veryfront-cloud-hosted-chat-execution-preparation.ts +3 -3
- package/src/src/agent/veryfront-cloud-prepared-hosted-chat-execution-runtime.ts +1 -1
- package/src/src/agent/veryfront-cloud-runtime-system-messages.ts +4 -4
- package/src/src/discovery/handlers/runtime-agent-markdown-handler.ts +2 -2
- package/src/src/internal-agents/ag-ui-sse.ts +2 -2
- package/src/src/internal-agents/run-stream.ts +1 -1
- package/src/src/internal-agents/schema.ts +2 -2
- package/src/src/tool/project-scoped-remote-tools.ts +23 -4
- package/src/src/utils/version-constant.ts +1 -1
- package/esm/src/agent/ag-ui-browser-chunk-encoder.d.ts +0 -14
- package/esm/src/agent/ag-ui-browser-chunk-encoder.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-browser-chunk-encoder.js +0 -31
- package/esm/src/agent/ag-ui-browser-encoder.d.ts +0 -32
- package/esm/src/agent/ag-ui-browser-encoder.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-browser-encoder.js +0 -405
- package/esm/src/agent/ag-ui-browser-finalize-tracker.d.ts +0 -12
- package/esm/src/agent/ag-ui-browser-finalize-tracker.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-browser-finalize-tracker.js +0 -42
- package/esm/src/agent/ag-ui-browser-response-stream.d.ts +0 -28
- package/esm/src/agent/ag-ui-browser-response-stream.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-chat-ui-chunk-browser-encoder.d.ts +0 -20
- package/esm/src/agent/ag-ui-chat-ui-chunk-browser-encoder.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-chat-ui-chunk-browser-encoder.js +0 -108
- package/esm/src/agent/ag-ui-chunk-encoder-bridge.d.ts +0 -11
- package/esm/src/agent/ag-ui-chunk-encoder-bridge.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-chunk-encoder-bridge.js +0 -9
- package/esm/src/agent/ag-ui-detached-start.d.ts +0 -158
- package/esm/src/agent/ag-ui-detached-start.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-detached-start.js +0 -256
- package/esm/src/agent/ag-ui-forwarded-context.d.ts +0 -14
- package/esm/src/agent/ag-ui-forwarded-context.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-forwarded-context.js +0 -56
- package/esm/src/agent/ag-ui-handler.d.ts +0 -14
- package/esm/src/agent/ag-ui-handler.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-handler.js +0 -244
- package/esm/src/agent/ag-ui-host-support.d.ts +0 -131
- package/esm/src/agent/ag-ui-host-support.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-host-support.js +0 -179
- package/esm/src/agent/ag-ui-request-shared.d.ts +0 -4
- package/esm/src/agent/ag-ui-request-shared.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-request-shared.js +0 -56
- package/esm/src/agent/ag-ui-run-control.d.ts +0 -39
- package/esm/src/agent/ag-ui-run-control.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-run-control.js +0 -84
- package/esm/src/agent/ag-ui-runtime-browser-response.d.ts +0 -18
- package/esm/src/agent/ag-ui-runtime-browser-response.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-runtime-browser-response.js +0 -15
- package/esm/src/agent/ag-ui-runtime-chat-stream-encoder.d.ts +0 -17
- package/esm/src/agent/ag-ui-runtime-chat-stream-encoder.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-runtime-chat-stream-encoder.js +0 -304
- package/esm/src/agent/ag-ui-runtime-event-encoder.d.ts +0 -11
- package/esm/src/agent/ag-ui-runtime-event-encoder.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-runtime-event-encoder.js +0 -37
- package/esm/src/agent/ag-ui-runtime-handler.d.ts +0 -44
- package/esm/src/agent/ag-ui-runtime-handler.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-runtime-handler.js +0 -301
- package/esm/src/agent/ag-ui-runtime-support.d.ts +0 -4
- package/esm/src/agent/ag-ui-runtime-support.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-sse-parser.d.ts +0 -57
- package/esm/src/agent/ag-ui-sse-parser.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-sse-parser.js +0 -227
- package/esm/src/agent/ag-ui-tool-shared.d.ts +0 -15
- package/esm/src/agent/ag-ui-tool-shared.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-tool-shared.js +0 -48
- package/esm/src/agent/ag-ui-tracked-browser-response.d.ts +0 -9
- package/esm/src/agent/ag-ui-tracked-browser-response.d.ts.map +0 -1
- package/esm/src/agent/ag-ui-tracked-browser-response.js +0 -19
- package/esm/src/agent/agent-service-auth.d.ts +0 -81
- package/esm/src/agent/agent-service-auth.d.ts.map +0 -1
- package/esm/src/agent/agent-service-bootstrap.d.ts +0 -23
- package/esm/src/agent/agent-service-bootstrap.d.ts.map +0 -1
- package/esm/src/agent/agent-service-bootstrap.js +0 -38
- package/esm/src/agent/agent-service-config.d.ts +0 -140
- package/esm/src/agent/agent-service-config.d.ts.map +0 -1
- package/esm/src/agent/agent-service-env-files.d.ts +0 -13
- package/esm/src/agent/agent-service-env-files.d.ts.map +0 -1
- package/esm/src/agent/agent-service-env-files.js +0 -34
- package/esm/src/agent/agent-service-mcp-server-config.d.ts +0 -33
- package/esm/src/agent/agent-service-mcp-server-config.d.ts.map +0 -1
- package/esm/src/agent/agent-service-mcp-server-config.js +0 -49
- package/esm/src/agent/agent-service-registration.d.ts +0 -110
- package/esm/src/agent/agent-service-registration.d.ts.map +0 -1
- package/esm/src/agent/agent-service-registration.js +0 -228
- package/esm/src/agent/agent-service-routes.d.ts +0 -81
- package/esm/src/agent/agent-service-routes.d.ts.map +0 -1
- package/esm/src/agent/agent-service-routes.js +0 -204
- package/esm/src/agent/agent-service-runtime.d.ts +0 -73
- package/esm/src/agent/agent-service-runtime.d.ts.map +0 -1
- package/esm/src/agent/agent-service-runtime.js +0 -118
- package/esm/src/agent/agent-service-server.d.ts +0 -30
- package/esm/src/agent/agent-service-server.d.ts.map +0 -1
- package/esm/src/agent/agent-service-server.js +0 -47
- package/esm/src/agent/agent-service.d.ts +0 -87
- package/esm/src/agent/agent-service.d.ts.map +0 -1
- package/esm/src/agent/child-run-execution-cleanup.d.ts +0 -14
- package/esm/src/agent/child-run-execution-cleanup.d.ts.map +0 -1
- package/esm/src/agent/child-run-execution-snapshot.d.ts +0 -70
- package/esm/src/agent/child-run-execution-snapshot.d.ts.map +0 -1
- package/esm/src/agent/child-run-execution-support.d.ts +0 -5
- package/esm/src/agent/child-run-execution-support.d.ts.map +0 -1
- package/esm/src/agent/child-run-final-step-support.d.ts +0 -18
- package/esm/src/agent/child-run-final-step-support.d.ts.map +0 -1
- package/esm/src/agent/child-run-result-summary.d.ts +0 -14
- package/esm/src/agent/child-run-result-summary.d.ts.map +0 -1
- package/esm/src/agent/conversation-bootstrap.d.ts +0 -94
- package/esm/src/agent/conversation-bootstrap.d.ts.map +0 -1
- package/esm/src/agent/conversation-bootstrap.js +0 -210
- package/esm/src/agent/conversation-delegation-policy.d.ts +0 -53
- package/esm/src/agent/conversation-delegation-policy.d.ts.map +0 -1
- package/esm/src/agent/conversation-delegation-policy.js +0 -192
- package/esm/src/agent/conversation-hosted-lifecycle.d.ts +0 -39
- package/esm/src/agent/conversation-hosted-lifecycle.d.ts.map +0 -1
- package/esm/src/agent/conversation-hosted-lifecycle.js +0 -138
- package/esm/src/agent/conversation-hosted-terminal.d.ts +0 -46
- package/esm/src/agent/conversation-hosted-terminal.d.ts.map +0 -1
- package/esm/src/agent/conversation-hosted-terminal.js +0 -138
- package/esm/src/agent/conversation-root-run-context.d.ts +0 -57
- package/esm/src/agent/conversation-root-run-context.d.ts.map +0 -1
- package/esm/src/agent/conversation-root-run-context.js +0 -79
- package/esm/src/agent/conversation-root-run-lifecycle.d.ts +0 -61
- package/esm/src/agent/conversation-root-run-lifecycle.d.ts.map +0 -1
- package/esm/src/agent/conversation-root-run-lifecycle.js +0 -94
- package/esm/src/agent/conversation-run-chunk-mirror.d.ts +0 -74
- package/esm/src/agent/conversation-run-chunk-mirror.d.ts.map +0 -1
- package/esm/src/agent/conversation-run-chunk-mirror.js +0 -188
- package/esm/src/agent/conversation-run-context.d.ts +0 -19
- package/esm/src/agent/conversation-run-context.d.ts.map +0 -1
- package/esm/src/agent/conversation-run-event-normalization.d.ts +0 -8
- package/esm/src/agent/conversation-run-event-normalization.d.ts.map +0 -1
- package/esm/src/agent/conversation-run-event-preparation.d.ts +0 -7
- package/esm/src/agent/conversation-run-event-preparation.d.ts.map +0 -1
- package/esm/src/agent/conversation-run-event-preparation.js +0 -48
- package/esm/src/agent/conversation-run-events.d.ts +0 -34
- package/esm/src/agent/conversation-run-events.d.ts.map +0 -1
- package/esm/src/agent/conversation-run-events.js +0 -200
- package/esm/src/agent/conversation-run-mirror.d.ts +0 -43
- package/esm/src/agent/conversation-run-mirror.d.ts.map +0 -1
- package/esm/src/agent/conversation-run-mirror.js +0 -157
- package/esm/src/agent/conversation-run-stream-mirror.d.ts +0 -21
- package/esm/src/agent/conversation-run-stream-mirror.d.ts.map +0 -1
- package/esm/src/agent/conversation-run-stream-mirror.js +0 -31
- package/esm/src/agent/hosted-ag-ui-chat-request.d.ts +0 -56
- package/esm/src/agent/hosted-ag-ui-chat-request.d.ts.map +0 -1
- package/esm/src/agent/hosted-ag-ui-chat-request.js +0 -112
- package/esm/src/agent/hosted-agent-project-steering.d.ts +0 -33
- package/esm/src/agent/hosted-agent-project-steering.d.ts.map +0 -1
- package/esm/src/agent/hosted-agent-project-steering.js +0 -73
- package/esm/src/agent/hosted-agent-run-lifecycle.d.ts +0 -60
- package/esm/src/agent/hosted-agent-run-lifecycle.d.ts.map +0 -1
- package/esm/src/agent/hosted-agent-run-lifecycle.js +0 -72
- package/esm/src/agent/hosted-chat-execution-runtime.d.ts +0 -127
- package/esm/src/agent/hosted-chat-execution-runtime.d.ts.map +0 -1
- package/esm/src/agent/hosted-chat-execution-runtime.js +0 -400
- package/esm/src/agent/hosted-chat-preparation.d.ts +0 -105
- package/esm/src/agent/hosted-chat-preparation.d.ts.map +0 -1
- package/esm/src/agent/hosted-chat-preparation.js +0 -156
- package/esm/src/agent/hosted-chat-request-parser.d.ts +0 -53
- package/esm/src/agent/hosted-chat-request-parser.d.ts.map +0 -1
- package/esm/src/agent/hosted-chat-request-parser.js +0 -105
- package/esm/src/agent/hosted-chat-request.d.ts +0 -305
- package/esm/src/agent/hosted-chat-request.d.ts.map +0 -1
- package/esm/src/agent/hosted-chat-request.js +0 -68
- package/esm/src/agent/hosted-chat-runtime-agent-adapter.d.ts +0 -14
- package/esm/src/agent/hosted-chat-runtime-agent-adapter.d.ts.map +0 -1
- package/esm/src/agent/hosted-chat-runtime-agent-adapter.js +0 -48
- package/esm/src/agent/hosted-chat-runtime-contract.d.ts +0 -86
- package/esm/src/agent/hosted-chat-runtime-contract.d.ts.map +0 -1
- package/esm/src/agent/hosted-chat-runtime-tool-assembly.d.ts +0 -51
- package/esm/src/agent/hosted-chat-runtime-tool-assembly.d.ts.map +0 -1
- package/esm/src/agent/hosted-chat-runtime-tool-assembly.js +0 -84
- package/esm/src/agent/hosted-child-artifact-support.d.ts +0 -25
- package/esm/src/agent/hosted-child-artifact-support.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-artifact-support.js +0 -121
- package/esm/src/agent/hosted-child-bootstrap.d.ts +0 -40
- package/esm/src/agent/hosted-child-bootstrap.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-bootstrap.js +0 -44
- package/esm/src/agent/hosted-child-execution-logging.d.ts +0 -35
- package/esm/src/agent/hosted-child-execution-logging.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-execution-logging.js +0 -69
- package/esm/src/agent/hosted-child-fork-execution-runner.d.ts +0 -101
- package/esm/src/agent/hosted-child-fork-execution-runner.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-fork-execution-runner.js +0 -205
- package/esm/src/agent/hosted-child-fork-instructions.d.ts +0 -8
- package/esm/src/agent/hosted-child-fork-instructions.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-fork-run-context.d.ts +0 -88
- package/esm/src/agent/hosted-child-fork-run-context.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-fork-run-context.js +0 -144
- package/esm/src/agent/hosted-child-fork-runtime-start.d.ts +0 -18
- package/esm/src/agent/hosted-child-fork-runtime-start.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-fork-runtime-start.js +0 -41
- package/esm/src/agent/hosted-child-fork-step-message-preparation.d.ts +0 -19
- package/esm/src/agent/hosted-child-fork-step-message-preparation.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-fork-step-message-preparation.js +0 -52
- package/esm/src/agent/hosted-child-fork-stream-execution.d.ts +0 -153
- package/esm/src/agent/hosted-child-fork-stream-execution.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-fork-stream-execution.js +0 -416
- package/esm/src/agent/hosted-child-fork-tool-sources.d.ts +0 -46
- package/esm/src/agent/hosted-child-fork-tool-sources.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-fork-tool-sources.js +0 -124
- package/esm/src/agent/hosted-child-invoke-tool.d.ts +0 -20
- package/esm/src/agent/hosted-child-invoke-tool.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-invoke-tool.js +0 -49
- package/esm/src/agent/hosted-child-lifecycle.d.ts +0 -63
- package/esm/src/agent/hosted-child-lifecycle.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-lifecycle.js +0 -192
- package/esm/src/agent/hosted-child-mirror.d.ts +0 -108
- package/esm/src/agent/hosted-child-mirror.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-pending-tool-lifecycle.d.ts +0 -50
- package/esm/src/agent/hosted-child-pending-tool-lifecycle.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-pending-tool-lifecycle.js +0 -119
- package/esm/src/agent/hosted-child-requested-tools.d.ts +0 -109
- package/esm/src/agent/hosted-child-requested-tools.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-requested-tools.js +0 -233
- package/esm/src/agent/hosted-child-status.d.ts +0 -39
- package/esm/src/agent/hosted-child-status.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-status.js +0 -98
- package/esm/src/agent/hosted-child-steering-tools.d.ts +0 -20
- package/esm/src/agent/hosted-child-steering-tools.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-steering-tools.js +0 -53
- package/esm/src/agent/hosted-child-stream-watchdog.d.ts +0 -27
- package/esm/src/agent/hosted-child-stream-watchdog.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-stream-watchdog.js +0 -95
- package/esm/src/agent/hosted-child-tool-input.d.ts +0 -44
- package/esm/src/agent/hosted-child-tool-input.d.ts.map +0 -1
- package/esm/src/agent/hosted-child-tool-input.js +0 -44
- package/esm/src/agent/hosted-durable-chat-run-start.d.ts +0 -46
- package/esm/src/agent/hosted-durable-chat-run-start.d.ts.map +0 -1
- package/esm/src/agent/hosted-durable-chat-run-start.js +0 -148
- package/esm/src/agent/hosted-durable-child-fork-execution.d.ts +0 -159
- package/esm/src/agent/hosted-durable-child-fork-execution.d.ts.map +0 -1
- package/esm/src/agent/hosted-durable-child-fork-execution.js +0 -324
- package/esm/src/agent/hosted-finalized-message.d.ts +0 -44
- package/esm/src/agent/hosted-finalized-message.d.ts.map +0 -1
- package/esm/src/agent/hosted-finalized-message.js +0 -67
- package/esm/src/agent/hosted-form-input-tool.d.ts +0 -85
- package/esm/src/agent/hosted-form-input-tool.d.ts.map +0 -1
- package/esm/src/agent/hosted-form-input-tool.js +0 -88
- package/esm/src/agent/hosted-lifecycle.d.ts +0 -41
- package/esm/src/agent/hosted-lifecycle.d.ts.map +0 -1
- package/esm/src/agent/hosted-project-remote-tool-source.d.ts +0 -45
- package/esm/src/agent/hosted-project-remote-tool-source.d.ts.map +0 -1
- package/esm/src/agent/hosted-project-remote-tool-source.js +0 -135
- package/esm/src/agent/hosted-project-steering-adapter.d.ts +0 -34
- package/esm/src/agent/hosted-project-steering-adapter.d.ts.map +0 -1
- package/esm/src/agent/hosted-project-steering-adapter.js +0 -82
- package/esm/src/agent/hosted-response-stream.d.ts +0 -22
- package/esm/src/agent/hosted-response-stream.d.ts.map +0 -1
- package/esm/src/agent/hosted-response-stream.js +0 -52
- package/esm/src/agent/hosted-runtime-request-config.d.ts +0 -27
- package/esm/src/agent/hosted-runtime-request-config.d.ts.map +0 -1
- package/esm/src/agent/hosted-runtime-request-config.js +0 -54
- package/esm/src/agent/hosted-runtime-state-resolver.d.ts +0 -28
- package/esm/src/agent/hosted-runtime-state-resolver.d.ts.map +0 -1
- package/esm/src/agent/hosted-runtime-state-resolver.js +0 -71
- package/esm/src/agent/hosted-stream-finalization.d.ts +0 -61
- package/esm/src/agent/hosted-stream-finalization.d.ts.map +0 -1
- package/esm/src/agent/hosted-stream-terminal-error.d.ts +0 -16
- package/esm/src/agent/hosted-stream-terminal-error.d.ts.map +0 -1
- package/esm/src/agent/hosted-stream-terminal-error.js +0 -54
- package/esm/src/agent/node-agent-service-runtime-infrastructure.d.ts +0 -26
- package/esm/src/agent/node-agent-service-runtime-infrastructure.d.ts.map +0 -1
- package/esm/src/agent/node-agent-service-runtime-infrastructure.js +0 -30
- package/esm/src/agent/node-agent-service-telemetry.d.ts +0 -44
- package/esm/src/agent/node-agent-service-telemetry.d.ts.map +0 -1
- package/esm/src/agent/runtime-ag-ui-contract.d.ts +0 -213
- package/esm/src/agent/runtime-ag-ui-contract.d.ts.map +0 -1
- package/esm/src/agent/runtime-ag-ui-contract.js +0 -134
- package/esm/src/agent/runtime-agent-definition-files.d.ts +0 -23
- package/esm/src/agent/runtime-agent-definition-files.d.ts.map +0 -1
- package/esm/src/agent/runtime-agent-definition-files.js +0 -79
- package/esm/src/agent/runtime-agent-definition.d.ts +0 -60
- package/esm/src/agent/runtime-agent-definition.d.ts.map +0 -1
- package/esm/src/agent/runtime-agent-definition.js +0 -105
- package/esm/src/agent/runtime-agent-invocation-contract.d.ts +0 -326
- package/esm/src/agent/runtime-agent-invocation-contract.d.ts.map +0 -1
- package/esm/src/agent/runtime-agent-invocation-contract.js +0 -212
- package/esm/src/agent/runtime-agent-markdown-adapter.d.ts +0 -6
- package/esm/src/agent/runtime-agent-markdown-adapter.d.ts.map +0 -1
- package/esm/src/agent/runtime-agent-markdown-adapter.js +0 -20
- package/esm/src/agent/runtime-builtin-skill-files.d.ts +0 -18
- package/esm/src/agent/runtime-builtin-skill-files.d.ts.map +0 -1
- package/esm/src/agent/runtime-builtin-skill-files.js +0 -82
- package/esm/src/agent/runtime-client-profile.d.ts +0 -26
- package/esm/src/agent/runtime-client-profile.d.ts.map +0 -1
- package/esm/src/agent/runtime-client-profile.js +0 -82
- package/esm/src/agent/runtime-load-skill-tool.d.ts +0 -43
- package/esm/src/agent/runtime-load-skill-tool.d.ts.map +0 -1
- package/esm/src/agent/runtime-load-skill-tool.js +0 -115
- package/esm/src/agent/runtime-message-file-url-refresh.d.ts +0 -9
- package/esm/src/agent/runtime-message-file-url-refresh.d.ts.map +0 -1
- package/esm/src/agent/runtime-message-preparation.d.ts +0 -10
- package/esm/src/agent/runtime-message-preparation.d.ts.map +0 -1
- package/esm/src/agent/runtime-message-preparation.js +0 -34
- package/esm/src/agent/runtime-project-files-client.d.ts +0 -50
- package/esm/src/agent/runtime-project-files-client.d.ts.map +0 -1
- package/esm/src/agent/runtime-project-files-client.js +0 -143
- package/esm/src/agent/runtime-project-skill-catalog.d.ts +0 -26
- package/esm/src/agent/runtime-project-skill-catalog.d.ts.map +0 -1
- package/esm/src/agent/runtime-project-skill-catalog.js +0 -148
- package/esm/src/agent/runtime-project-skill-loader.d.ts +0 -28
- package/esm/src/agent/runtime-project-skill-loader.d.ts.map +0 -1
- package/esm/src/agent/runtime-project-skill-loader.js +0 -122
- package/esm/src/agent/runtime-prompt-block.d.ts +0 -7
- package/esm/src/agent/runtime-prompt-block.d.ts.map +0 -1
- package/esm/src/agent/runtime-skill-metadata.d.ts +0 -75
- package/esm/src/agent/runtime-skill-metadata.d.ts.map +0 -1
- package/esm/src/agent/runtime-skill-metadata.js +0 -159
- package/esm/src/agent/runtime-skill-prompt.d.ts +0 -5
- package/esm/src/agent/runtime-skill-prompt.d.ts.map +0 -1
- package/esm/src/agent/runtime-skill-prompt.js +0 -40
- package/esm/src/agent/runtime-tool-inventory.d.ts +0 -4
- package/esm/src/agent/runtime-tool-inventory.d.ts.map +0 -1
- package/esm/src/agent/runtime-upload-url-client.d.ts +0 -13
- package/esm/src/agent/runtime-upload-url-client.d.ts.map +0 -1
- package/esm/src/agent/runtime-upload-url-client.js +0 -54
- package/src/deps/esm.sh/@types/react@19.2.3/global.d.ts +0 -165
- package/src/deps/esm.sh/@types/react@19.2.3/index.d.ts +0 -4301
- package/src/src/agent/ag-ui-browser-chunk-encoder.ts +0 -58
- package/src/src/agent/ag-ui-browser-encoder.ts +0 -538
- package/src/src/agent/ag-ui-browser-finalize-tracker.ts +0 -65
- package/src/src/agent/ag-ui-browser-response-stream.ts +0 -175
- package/src/src/agent/ag-ui-chat-ui-chunk-browser-encoder.ts +0 -172
- package/src/src/agent/ag-ui-chunk-encoder-bridge.ts +0 -34
- package/src/src/agent/ag-ui-detached-start.ts +0 -425
- package/src/src/agent/ag-ui-forwarded-context.ts +0 -83
- package/src/src/agent/ag-ui-handler.ts +0 -388
- package/src/src/agent/ag-ui-host-support.ts +0 -244
- package/src/src/agent/ag-ui-request-shared.ts +0 -76
- package/src/src/agent/ag-ui-run-control.ts +0 -145
- package/src/src/agent/ag-ui-runtime-browser-response.ts +0 -41
- package/src/src/agent/ag-ui-runtime-chat-stream-encoder.ts +0 -359
- package/src/src/agent/ag-ui-runtime-event-encoder.ts +0 -71
- package/src/src/agent/ag-ui-runtime-handler.ts +0 -510
- package/src/src/agent/ag-ui-runtime-support.ts +0 -64
- package/src/src/agent/ag-ui-sse-parser.ts +0 -306
- package/src/src/agent/ag-ui-tool-shared.ts +0 -80
- package/src/src/agent/ag-ui-tracked-browser-response.ts +0 -42
- package/src/src/agent/agent-service-bootstrap.ts +0 -79
- package/src/src/agent/agent-service-env-files.ts +0 -60
- package/src/src/agent/agent-service-mcp-server-config.ts +0 -112
- package/src/src/agent/agent-service-registration.ts +0 -320
- package/src/src/agent/agent-service-routes.ts +0 -389
- package/src/src/agent/agent-service-runtime.ts +0 -303
- package/src/src/agent/agent-service-server.ts +0 -98
- package/src/src/agent/agent-service.ts +0 -386
- package/src/src/agent/conversation-bootstrap.ts +0 -335
- package/src/src/agent/conversation-delegation-policy.ts +0 -299
- package/src/src/agent/conversation-hosted-lifecycle.ts +0 -215
- package/src/src/agent/conversation-hosted-terminal.ts +0 -235
- package/src/src/agent/conversation-root-run-context.ts +0 -143
- package/src/src/agent/conversation-root-run-lifecycle.ts +0 -184
- package/src/src/agent/conversation-run-chunk-mirror.ts +0 -353
- package/src/src/agent/conversation-run-context.ts +0 -22
- package/src/src/agent/conversation-run-event-preparation.ts +0 -76
- package/src/src/agent/conversation-run-events.ts +0 -242
- package/src/src/agent/conversation-run-mirror.ts +0 -235
- package/src/src/agent/conversation-run-stream-mirror.ts +0 -59
- package/src/src/agent/hosted-ag-ui-chat-request.ts +0 -197
- package/src/src/agent/hosted-agent-project-steering.ts +0 -129
- package/src/src/agent/hosted-agent-run-lifecycle.ts +0 -161
- package/src/src/agent/hosted-chat-execution-runtime.ts +0 -703
- package/src/src/agent/hosted-chat-preparation.ts +0 -357
- package/src/src/agent/hosted-chat-request-parser.ts +0 -209
- package/src/src/agent/hosted-chat-request.ts +0 -112
- package/src/src/agent/hosted-chat-runtime-agent-adapter.ts +0 -88
- package/src/src/agent/hosted-chat-runtime-contract.ts +0 -101
- package/src/src/agent/hosted-chat-runtime-tool-assembly.ts +0 -183
- package/src/src/agent/hosted-child-artifact-support.ts +0 -201
- package/src/src/agent/hosted-child-bootstrap.ts +0 -75
- package/src/src/agent/hosted-child-execution-logging.ts +0 -114
- package/src/src/agent/hosted-child-fork-execution-runner.ts +0 -393
- package/src/src/agent/hosted-child-fork-run-context.ts +0 -312
- package/src/src/agent/hosted-child-fork-runtime-start.ts +0 -84
- package/src/src/agent/hosted-child-fork-step-message-preparation.ts +0 -96
- package/src/src/agent/hosted-child-fork-stream-execution.ts +0 -626
- package/src/src/agent/hosted-child-fork-tool-sources.ts +0 -223
- package/src/src/agent/hosted-child-invoke-tool.ts +0 -90
- package/src/src/agent/hosted-child-lifecycle.ts +0 -352
- package/src/src/agent/hosted-child-mirror.ts +0 -272
- package/src/src/agent/hosted-child-pending-tool-lifecycle.ts +0 -191
- package/src/src/agent/hosted-child-requested-tools.ts +0 -411
- package/src/src/agent/hosted-child-status.ts +0 -167
- package/src/src/agent/hosted-child-steering-tools.ts +0 -92
- package/src/src/agent/hosted-child-stream-watchdog.ts +0 -146
- package/src/src/agent/hosted-child-tool-input.ts +0 -91
- package/src/src/agent/hosted-durable-chat-run-start.ts +0 -246
- package/src/src/agent/hosted-durable-child-fork-execution.ts +0 -597
- package/src/src/agent/hosted-finalized-message.ts +0 -170
- package/src/src/agent/hosted-form-input-tool.ts +0 -128
- package/src/src/agent/hosted-project-remote-tool-source.ts +0 -262
- package/src/src/agent/hosted-project-steering-adapter.ts +0 -184
- package/src/src/agent/hosted-response-stream.ts +0 -87
- package/src/src/agent/hosted-runtime-request-config.ts +0 -112
- package/src/src/agent/hosted-runtime-state-resolver.ts +0 -133
- package/src/src/agent/hosted-stream-finalization.ts +0 -188
- package/src/src/agent/hosted-stream-terminal-error.ts +0 -81
- package/src/src/agent/node-agent-service-runtime-infrastructure.ts +0 -71
- package/src/src/agent/runtime-ag-ui-contract.ts +0 -216
- package/src/src/agent/runtime-agent-definition-files.ts +0 -128
- package/src/src/agent/runtime-agent-definition.ts +0 -163
- package/src/src/agent/runtime-agent-invocation-contract.ts +0 -355
- package/src/src/agent/runtime-agent-markdown-adapter.ts +0 -31
- package/src/src/agent/runtime-builtin-skill-files.ts +0 -122
- package/src/src/agent/runtime-client-profile.ts +0 -123
- package/src/src/agent/runtime-load-skill-tool.ts +0 -239
- package/src/src/agent/runtime-message-file-url-refresh.ts +0 -120
- package/src/src/agent/runtime-message-preparation.ts +0 -58
- package/src/src/agent/runtime-project-files-client.ts +0 -256
- package/src/src/agent/runtime-project-skill-catalog.ts +0 -238
- package/src/src/agent/runtime-project-skill-loader.ts +0 -217
- package/src/src/agent/runtime-skill-metadata.ts +0 -260
- package/src/src/agent/runtime-skill-prompt.ts +0 -61
- package/src/src/agent/runtime-tool-inventory.ts +0 -46
- package/src/src/agent/runtime-upload-url-client.ts +0 -95
- /package/esm/src/agent/{ag-ui-browser-response-stream.js → ag-ui/browser-response-stream.js} +0 -0
- /package/esm/src/agent/{ag-ui-runtime-support.js → ag-ui/runtime-support.js} +0 -0
- /package/esm/src/agent/{child-run-execution-cleanup.js → child-run/execution-cleanup.js} +0 -0
- /package/esm/src/agent/{child-run-execution-snapshot.js → child-run/execution-snapshot.js} +0 -0
- /package/esm/src/agent/{child-run-execution-support.js → child-run/execution-support.js} +0 -0
- /package/esm/src/agent/{child-run-final-step-support.js → child-run/final-step-support.js} +0 -0
- /package/esm/src/agent/{child-run-result-summary.js → child-run/result-summary.js} +0 -0
- /package/esm/src/agent/{conversation-run-context.js → conversation/run-context.js} +0 -0
- /package/esm/src/agent/{conversation-run-event-normalization.js → conversation/run-event-normalization.js} +0 -0
- /package/esm/src/agent/{hosted-chat-runtime-contract.js → hosted/chat-runtime-contract.js} +0 -0
- /package/esm/src/agent/{hosted-child-fork-instructions.js → hosted/child-fork-instructions.js} +0 -0
- /package/esm/src/agent/{hosted-child-mirror.js → hosted/child-mirror.js} +0 -0
- /package/esm/src/agent/{hosted-lifecycle.js → hosted/lifecycle.js} +0 -0
- /package/esm/src/agent/{hosted-stream-finalization.js → hosted/stream-finalization.js} +0 -0
- /package/esm/src/agent/{runtime-message-file-url-refresh.js → runtime/message-file-url-refresh.js} +0 -0
- /package/esm/src/agent/{runtime-prompt-block.js → runtime/prompt-block.js} +0 -0
- /package/esm/src/agent/{runtime-tool-inventory.js → runtime/tool-inventory.js} +0 -0
- /package/esm/src/agent/{agent-service-auth.js → service/auth.js} +0 -0
- /package/esm/src/agent/{agent-service-config.js → service/config.js} +0 -0
- /package/esm/src/agent/{agent-service.js → service/definition.js} +0 -0
- /package/esm/src/agent/{node-agent-service-telemetry.js → service/node-telemetry.js} +0 -0
- /package/src/src/agent/{child-run-execution-cleanup.ts → child-run/execution-cleanup.ts} +0 -0
- /package/src/src/agent/{child-run-execution-snapshot.ts → child-run/execution-snapshot.ts} +0 -0
- /package/src/src/agent/{child-run-execution-support.ts → child-run/execution-support.ts} +0 -0
- /package/src/src/agent/{child-run-final-step-support.ts → child-run/final-step-support.ts} +0 -0
- /package/src/src/agent/{child-run-result-summary.ts → child-run/result-summary.ts} +0 -0
- /package/src/src/agent/{conversation-run-event-normalization.ts → conversation/run-event-normalization.ts} +0 -0
- /package/src/src/agent/{hosted-child-fork-instructions.ts → hosted/child-fork-instructions.ts} +0 -0
- /package/src/src/agent/{hosted-lifecycle.ts → hosted/lifecycle.ts} +0 -0
- /package/src/src/agent/{runtime-prompt-block.ts → runtime/prompt-block.ts} +0 -0
- /package/src/src/agent/{agent-service-auth.ts → service/auth.ts} +0 -0
- /package/src/src/agent/{agent-service-config.ts → service/config.ts} +0 -0
- /package/src/src/agent/{node-agent-service-telemetry.ts → service/node-telemetry.ts} +0 -0
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import * as dntShim from "../../_dnt.shims.js";
|
|
2
|
-
import { isResponseLike } from "./response-like.js";
|
|
3
|
-
import { getAgent } from "./composition/index.js";
|
|
4
|
-
import { AgentRuntime, RunAlreadyExistsError, } from "./runtime/index.js";
|
|
5
|
-
import { createStreamTransformState, finalizeRunEvents, formatAgUiEvent, mapRuntimeEventToAgUi, } from "../internal-agents/ag-ui-sse.js";
|
|
6
|
-
import { streamDataStreamEvents } from "./data-stream.js";
|
|
7
|
-
import { normalizeAgUiMessages, parseAgUiRequestOrError, } from "./ag-ui-host-support.js";
|
|
8
|
-
import { extractRequest } from "./ag-ui-request-shared.js";
|
|
9
|
-
import { buildMergedAgUiTools } from "./ag-ui-tool-shared.js";
|
|
10
|
-
export { AgUiContextItemSchema, AgUiInjectedToolSchema, AgUiRequestSchema, } from "./ag-ui-host-support.js";
|
|
11
|
-
const AG_UI_HEADERS = {
|
|
12
|
-
"Content-Type": "text/event-stream",
|
|
13
|
-
"Cache-Control": "no-cache",
|
|
14
|
-
Connection: "keep-alive",
|
|
15
|
-
};
|
|
16
|
-
function generateRunId() {
|
|
17
|
-
return `run_${dntShim.crypto.randomUUID().replaceAll("-", "")}`;
|
|
18
|
-
}
|
|
19
|
-
function buildStreamContext(request, baseContext, threadId, runId) {
|
|
20
|
-
return {
|
|
21
|
-
...baseContext,
|
|
22
|
-
threadId,
|
|
23
|
-
runId,
|
|
24
|
-
agUi: {
|
|
25
|
-
context: request.context,
|
|
26
|
-
forwardedProps: request.forwardedProps,
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function closeController(controller) {
|
|
31
|
-
try {
|
|
32
|
-
controller.close();
|
|
33
|
-
}
|
|
34
|
-
catch {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
function enqueueEvent(controller, event, payload) {
|
|
39
|
-
try {
|
|
40
|
-
controller.enqueue(formatAgUiEvent(event, payload));
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
catch {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
async function createAgUiStreamResponse(options) {
|
|
48
|
-
const { agentId, request, runId, threadId, upstreamBody, upstreamStatus, upstreamStatusText, onFinish, onError, onToolCallSeen, } = options;
|
|
49
|
-
const stream = new ReadableStream({
|
|
50
|
-
start: async (controller) => {
|
|
51
|
-
const state = createStreamTransformState();
|
|
52
|
-
const prepareToolResultIfNeeded = (event, payload) => {
|
|
53
|
-
if (event !== "ToolCallStart" && event !== "ToolCallArgs" &&
|
|
54
|
-
event !== "ToolCallEnd") {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
const toolCallId = typeof payload.toolCallId === "string" ? payload.toolCallId : null;
|
|
58
|
-
if (toolCallId) {
|
|
59
|
-
onToolCallSeen?.(toolCallId);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
if (!enqueueEvent(controller, "RunStarted", { runId, threadId, agentId })) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
if (!enqueueEvent(controller, "StateSnapshot", { snapshot: {} })) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
if (!enqueueEvent(controller, "MessagesSnapshot", { messages: request.messages })) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
try {
|
|
72
|
-
if (!upstreamBody) {
|
|
73
|
-
for (const event of finalizeRunEvents(state, null)) {
|
|
74
|
-
if (!enqueueEvent(controller, event.event, event.payload)) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
onFinish?.();
|
|
79
|
-
closeController(controller);
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
for await (const event of streamDataStreamEvents(upstreamBody)) {
|
|
83
|
-
for (const mapped of mapRuntimeEventToAgUi(state, event)) {
|
|
84
|
-
prepareToolResultIfNeeded(mapped.event, mapped.payload);
|
|
85
|
-
if (!enqueueEvent(controller, mapped.event, mapped.payload)) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
for (const event of finalizeRunEvents(state, null)) {
|
|
91
|
-
if (!enqueueEvent(controller, event.event, event.payload)) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
onFinish?.();
|
|
96
|
-
}
|
|
97
|
-
catch (error) {
|
|
98
|
-
onError?.(error);
|
|
99
|
-
enqueueEvent(controller, "RunError", {
|
|
100
|
-
message: error instanceof Error ? error.message : "Agent run failed",
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
finally {
|
|
104
|
-
closeController(controller);
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
});
|
|
108
|
-
return new Response(stream, {
|
|
109
|
-
status: upstreamStatus,
|
|
110
|
-
statusText: upstreamStatusText,
|
|
111
|
-
headers: { ...AG_UI_HEADERS },
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
async function createAgUiDirectStreamResponse(agent, request, baseContext) {
|
|
115
|
-
const threadId = request.threadId ?? dntShim.crypto.randomUUID();
|
|
116
|
-
const runId = request.runId ?? generateRunId();
|
|
117
|
-
await agent.clearMemory();
|
|
118
|
-
const result = await agent.stream({
|
|
119
|
-
messages: normalizeAgUiMessages(request.messages),
|
|
120
|
-
context: buildStreamContext(request, baseContext, threadId, runId),
|
|
121
|
-
...(request.model ? { model: request.model } : {}),
|
|
122
|
-
...(request.maxOutputTokens ? { maxOutputTokens: request.maxOutputTokens } : {}),
|
|
123
|
-
});
|
|
124
|
-
const upstream = result.toDataStreamResponse();
|
|
125
|
-
return await createAgUiStreamResponse({
|
|
126
|
-
agentId: agent.id,
|
|
127
|
-
request,
|
|
128
|
-
runId,
|
|
129
|
-
threadId,
|
|
130
|
-
upstreamBody: upstream.body,
|
|
131
|
-
upstreamStatus: upstream.status,
|
|
132
|
-
upstreamStatusText: upstream.statusText,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
async function createAgUiInjectedToolsStreamResponse(agent, request, baseContext, sessionManager) {
|
|
136
|
-
const threadId = request.threadId ?? dntShim.crypto.randomUUID();
|
|
137
|
-
const runId = request.runId ?? generateRunId();
|
|
138
|
-
try {
|
|
139
|
-
sessionManager.startRun({ runId, threadId });
|
|
140
|
-
}
|
|
141
|
-
catch (error) {
|
|
142
|
-
if (error instanceof RunAlreadyExistsError) {
|
|
143
|
-
return Response.json({ error: "Run already active" }, { status: 409 });
|
|
144
|
-
}
|
|
145
|
-
throw error;
|
|
146
|
-
}
|
|
147
|
-
const runtime = new AgentRuntime(agent.id, {
|
|
148
|
-
...agent.config,
|
|
149
|
-
tools: buildMergedAgUiTools(agent, runId, request.tools, sessionManager),
|
|
150
|
-
});
|
|
151
|
-
let upstreamBody;
|
|
152
|
-
try {
|
|
153
|
-
upstreamBody = await runtime.stream(normalizeAgUiMessages(request.messages), buildStreamContext(request, baseContext, threadId, runId), undefined, request.model, request.maxOutputTokens);
|
|
154
|
-
}
|
|
155
|
-
catch (error) {
|
|
156
|
-
sessionManager.failRun(runId);
|
|
157
|
-
throw error;
|
|
158
|
-
}
|
|
159
|
-
return await createAgUiStreamResponse({
|
|
160
|
-
agentId: agent.id,
|
|
161
|
-
request,
|
|
162
|
-
runId,
|
|
163
|
-
threadId,
|
|
164
|
-
upstreamBody,
|
|
165
|
-
upstreamStatus: 200,
|
|
166
|
-
onFinish: () => {
|
|
167
|
-
sessionManager.completeRun(runId);
|
|
168
|
-
},
|
|
169
|
-
onError: () => {
|
|
170
|
-
sessionManager.failRun(runId);
|
|
171
|
-
},
|
|
172
|
-
onToolCallSeen: (toolCallId) => {
|
|
173
|
-
sessionManager.prepareForSignal(runId, toolCallId);
|
|
174
|
-
},
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
function mergeConfig(config, options) {
|
|
178
|
-
if (!options)
|
|
179
|
-
return config;
|
|
180
|
-
return { ...options, ...config };
|
|
181
|
-
}
|
|
182
|
-
export function createAgUiHandler(agentIdOrConfig, options) {
|
|
183
|
-
return async function POST(requestOrCtx) {
|
|
184
|
-
const request = extractRequest(requestOrCtx);
|
|
185
|
-
let agent;
|
|
186
|
-
if (typeof agentIdOrConfig === "object" &&
|
|
187
|
-
agentIdOrConfig !== null &&
|
|
188
|
-
"agent" in agentIdOrConfig) {
|
|
189
|
-
const config = mergeConfig(agentIdOrConfig, options);
|
|
190
|
-
agent = config.agent;
|
|
191
|
-
options = config;
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
const agentId = agentIdOrConfig;
|
|
195
|
-
try {
|
|
196
|
-
agent = getAgent(agentId);
|
|
197
|
-
}
|
|
198
|
-
catch {
|
|
199
|
-
return Response.json({ error: "Agent not found" }, { status: 404 });
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
if (!agent) {
|
|
203
|
-
return Response.json({ error: "Agent not found" }, { status: 404 });
|
|
204
|
-
}
|
|
205
|
-
try {
|
|
206
|
-
const parsed = await parseAgUiRequestOrError(request);
|
|
207
|
-
if (isResponseLike(parsed)) {
|
|
208
|
-
return parsed;
|
|
209
|
-
}
|
|
210
|
-
if (parsed.tools.length > 0) {
|
|
211
|
-
if (!options?.sessionManager) {
|
|
212
|
-
return Response.json({
|
|
213
|
-
error: "Injected AG-UI tools require a public RunResumeSessionManager on createAgUiHandler().",
|
|
214
|
-
}, { status: 501 });
|
|
215
|
-
}
|
|
216
|
-
const context = typeof options?.context === "function"
|
|
217
|
-
? await options.context(request)
|
|
218
|
-
: options?.context ?? {};
|
|
219
|
-
return await createAgUiInjectedToolsStreamResponse(agent, parsed, context, options.sessionManager);
|
|
220
|
-
}
|
|
221
|
-
const context = typeof options?.context === "function"
|
|
222
|
-
? await options.context(request)
|
|
223
|
-
: options?.context ?? {};
|
|
224
|
-
return await createAgUiDirectStreamResponse(agent, parsed, context);
|
|
225
|
-
}
|
|
226
|
-
catch (error) {
|
|
227
|
-
if (error instanceof Error &&
|
|
228
|
-
"issues" in error &&
|
|
229
|
-
Array.isArray(error.issues)) {
|
|
230
|
-
const issues = error.issues;
|
|
231
|
-
return Response.json({
|
|
232
|
-
error: "Invalid AG-UI request",
|
|
233
|
-
details: issues.map((issue) => ({
|
|
234
|
-
path: issue.path,
|
|
235
|
-
message: issue.message,
|
|
236
|
-
})),
|
|
237
|
-
}, { status: 400 });
|
|
238
|
-
}
|
|
239
|
-
return Response.json({
|
|
240
|
-
error: error instanceof Error ? error.message : "Internal server error",
|
|
241
|
-
}, { status: 500 });
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import type { InferSchema } from "../extensions/schema/index.js";
|
|
2
|
-
import type { Message } from "./types.js";
|
|
3
|
-
export interface AgUiSseEvent {
|
|
4
|
-
event: string;
|
|
5
|
-
payload: Record<string, unknown>;
|
|
6
|
-
}
|
|
7
|
-
export declare const getAgUiInjectedToolSchema: () => import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
8
|
-
name: import("../internal-agents/schema.js").Schema<string>;
|
|
9
|
-
description: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
10
|
-
parameters: import("../internal-agents/schema.js").Schema<Record<string, unknown> | undefined>;
|
|
11
|
-
}>>;
|
|
12
|
-
export declare const getAgUiContextItemSchema: () => import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
13
|
-
type: import("../internal-agents/schema.js").Schema<"text">;
|
|
14
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
15
|
-
text: import("../internal-agents/schema.js").Schema<string>;
|
|
16
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
17
|
-
type: import("../internal-agents/schema.js").Schema<"json">;
|
|
18
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
19
|
-
data: import("../internal-agents/schema.js").Schema<Record<string, unknown>>;
|
|
20
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
21
|
-
type: import("../internal-agents/schema.js").Schema<"resource">;
|
|
22
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
23
|
-
uri: import("../internal-agents/schema.js").Schema<string>;
|
|
24
|
-
mimeType: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
25
|
-
text: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
26
|
-
}>>;
|
|
27
|
-
export declare const getAgUiRequestSchema: () => import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
28
|
-
threadId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
29
|
-
runId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
30
|
-
messages: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
31
|
-
id: import("../internal-agents/schema.js").Schema<string>;
|
|
32
|
-
role: import("../internal-agents/schema.js").Schema<string>;
|
|
33
|
-
parts: import("../internal-agents/schema.js").Schema<({
|
|
34
|
-
type: string;
|
|
35
|
-
} & {} & Record<string, unknown>)[]>;
|
|
36
|
-
metadata: import("../internal-agents/schema.js").Schema<Record<string, unknown> | undefined>;
|
|
37
|
-
createdAt: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
38
|
-
}>[]>;
|
|
39
|
-
tools: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
40
|
-
name: import("../internal-agents/schema.js").Schema<string>;
|
|
41
|
-
description: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
42
|
-
parameters: import("../internal-agents/schema.js").Schema<Record<string, unknown> | undefined>;
|
|
43
|
-
}>[]>;
|
|
44
|
-
context: import("../internal-agents/schema.js").Schema<(import("../extensions/schema/schema-validator.js").InferShape<{
|
|
45
|
-
type: import("../internal-agents/schema.js").Schema<"text">;
|
|
46
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
47
|
-
text: import("../internal-agents/schema.js").Schema<string>;
|
|
48
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
49
|
-
type: import("../internal-agents/schema.js").Schema<"json">;
|
|
50
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
51
|
-
data: import("../internal-agents/schema.js").Schema<Record<string, unknown>>;
|
|
52
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
53
|
-
type: import("../internal-agents/schema.js").Schema<"resource">;
|
|
54
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
55
|
-
uri: import("../internal-agents/schema.js").Schema<string>;
|
|
56
|
-
mimeType: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
57
|
-
text: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
58
|
-
}>)[]>;
|
|
59
|
-
forwardedProps: import("../internal-agents/schema.js").Schema<Record<string, unknown> | undefined>;
|
|
60
|
-
model: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
61
|
-
maxOutputTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
62
|
-
}>>;
|
|
63
|
-
/** @deprecated Use getAgUiInjectedToolSchema() */
|
|
64
|
-
export declare const AgUiInjectedToolSchema: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
65
|
-
name: import("../internal-agents/schema.js").Schema<string>;
|
|
66
|
-
description: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
67
|
-
parameters: import("../internal-agents/schema.js").Schema<Record<string, unknown> | undefined>;
|
|
68
|
-
}>>;
|
|
69
|
-
/** @deprecated Use getAgUiContextItemSchema() */
|
|
70
|
-
export declare const AgUiContextItemSchema: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
71
|
-
type: import("../internal-agents/schema.js").Schema<"text">;
|
|
72
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
73
|
-
text: import("../internal-agents/schema.js").Schema<string>;
|
|
74
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
75
|
-
type: import("../internal-agents/schema.js").Schema<"json">;
|
|
76
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
77
|
-
data: import("../internal-agents/schema.js").Schema<Record<string, unknown>>;
|
|
78
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
79
|
-
type: import("../internal-agents/schema.js").Schema<"resource">;
|
|
80
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
81
|
-
uri: import("../internal-agents/schema.js").Schema<string>;
|
|
82
|
-
mimeType: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
83
|
-
text: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
84
|
-
}>>;
|
|
85
|
-
/** @deprecated Use getAgUiRequestSchema() */
|
|
86
|
-
export declare const AgUiRequestSchema: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
87
|
-
threadId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
88
|
-
runId: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
89
|
-
messages: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
90
|
-
id: import("../internal-agents/schema.js").Schema<string>;
|
|
91
|
-
role: import("../internal-agents/schema.js").Schema<string>;
|
|
92
|
-
parts: import("../internal-agents/schema.js").Schema<({
|
|
93
|
-
type: string;
|
|
94
|
-
} & {} & Record<string, unknown>)[]>;
|
|
95
|
-
metadata: import("../internal-agents/schema.js").Schema<Record<string, unknown> | undefined>;
|
|
96
|
-
createdAt: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
97
|
-
}>[]>;
|
|
98
|
-
tools: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
99
|
-
name: import("../internal-agents/schema.js").Schema<string>;
|
|
100
|
-
description: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
101
|
-
parameters: import("../internal-agents/schema.js").Schema<Record<string, unknown> | undefined>;
|
|
102
|
-
}>[]>;
|
|
103
|
-
context: import("../internal-agents/schema.js").Schema<(import("../extensions/schema/schema-validator.js").InferShape<{
|
|
104
|
-
type: import("../internal-agents/schema.js").Schema<"text">;
|
|
105
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
106
|
-
text: import("../internal-agents/schema.js").Schema<string>;
|
|
107
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
108
|
-
type: import("../internal-agents/schema.js").Schema<"json">;
|
|
109
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
110
|
-
data: import("../internal-agents/schema.js").Schema<Record<string, unknown>>;
|
|
111
|
-
}> | import("../extensions/schema/schema-validator.js").InferShape<{
|
|
112
|
-
type: import("../internal-agents/schema.js").Schema<"resource">;
|
|
113
|
-
title: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
114
|
-
uri: import("../internal-agents/schema.js").Schema<string>;
|
|
115
|
-
mimeType: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
116
|
-
text: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
117
|
-
}>)[]>;
|
|
118
|
-
forwardedProps: import("../internal-agents/schema.js").Schema<Record<string, unknown> | undefined>;
|
|
119
|
-
model: import("../internal-agents/schema.js").Schema<string | undefined>;
|
|
120
|
-
maxOutputTokens: import("../internal-agents/schema.js").Schema<number | undefined>;
|
|
121
|
-
}>>;
|
|
122
|
-
export type AgUiInjectedTool = InferSchema<ReturnType<typeof getAgUiInjectedToolSchema>>;
|
|
123
|
-
export type AgUiContextItem = InferSchema<ReturnType<typeof getAgUiContextItemSchema>>;
|
|
124
|
-
export type AgUiRequest = InferSchema<ReturnType<typeof getAgUiRequestSchema>>;
|
|
125
|
-
export declare function parseAgUiRequest(request: Request): Promise<AgUiRequest>;
|
|
126
|
-
export declare function parseAgUiRequestOrError(request: Request): Promise<AgUiRequest | Response>;
|
|
127
|
-
export declare function normalizeAgUiMessages(messages: AgUiRequest["messages"]): Message[];
|
|
128
|
-
export declare function createAgUiRunErrorEvent(message: string, code?: string): AgUiSseEvent;
|
|
129
|
-
export declare function createAgUiSseErrorResponse(event: AgUiSseEvent, status: number): Response;
|
|
130
|
-
export declare function createAgUiSseResponse(stream: ReadableStream<Uint8Array>): Response;
|
|
131
|
-
//# sourceMappingURL=ag-ui-host-support.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ag-ui-host-support.d.ts","sourceRoot":"","sources":["../../../src/src/agent/ag-ui-host-support.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAa1C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAgBD,eAAO,MAAM,yBAAyB;;;;GASrC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;GAuBpC,CAAC;AAgBF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiBhC,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,sBAAsB;;;;GAA8B,CAAC;AAClE,iDAAiD;AACjD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;GAA6B,CAAC;AAChE,6CAA6C;AAC7C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyB,CAAC;AAExD,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,CAAC;AACzF,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC;AACvF,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC;AA0E/E,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAE7E;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,WAAW,GAAG,QAAQ,CAAC,CAKjC;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,GAAG,OAAO,EAAE,CAUlF;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAQpF;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,CAUxF;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,QAAQ,CASlF"}
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { defineSchema } from "../schemas/index.js";
|
|
2
|
-
import { formatAgUiEvent } from "../internal-agents/ag-ui-sse.js";
|
|
3
|
-
import { parseAgUiJsonRequestOrError } from "./ag-ui-request-shared.js";
|
|
4
|
-
const AGENT_ID_PATTERN = /^[a-zA-Z0-9_-]+$/;
|
|
5
|
-
const MAX_TOOL_PARAMETERS_BYTES = 16_384;
|
|
6
|
-
const MAX_CONTEXT_ITEM_BYTES = 16_384;
|
|
7
|
-
const MAX_CONTEXT_TOTAL_BYTES = 65_536;
|
|
8
|
-
const MAX_FORWARDED_PROPS_BYTES = 65_536;
|
|
9
|
-
const MAX_TEXT_PART_LENGTH = 10_000;
|
|
10
|
-
const MAX_MESSAGES_PER_REQUEST = 100;
|
|
11
|
-
const encoder = new TextEncoder();
|
|
12
|
-
const decoder = new TextDecoder();
|
|
13
|
-
function isWithinJsonSizeLimit(value, maxBytes) {
|
|
14
|
-
try {
|
|
15
|
-
return encoder.encode(JSON.stringify(value)).byteLength <= maxBytes;
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function isRecord(value) {
|
|
22
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
23
|
-
}
|
|
24
|
-
const getAgUiRunIdSchema = defineSchema((v) => v.string().min(1).max(128).regex(AGENT_ID_PATTERN));
|
|
25
|
-
export const getAgUiInjectedToolSchema = defineSchema((v) => v.object({
|
|
26
|
-
name: v.string().min(1).max(128),
|
|
27
|
-
description: v.string().max(1024).optional(),
|
|
28
|
-
parameters: v.record(v.string(), v.unknown()).optional().refine((value) => value === undefined || isWithinJsonSizeLimit(value, MAX_TOOL_PARAMETERS_BYTES), { message: "Tool parameters must be less than 16 KB" }),
|
|
29
|
-
}));
|
|
30
|
-
export const getAgUiContextItemSchema = defineSchema((v) => v.discriminatedUnion("type", [
|
|
31
|
-
v.object({
|
|
32
|
-
type: v.literal("text"),
|
|
33
|
-
title: v.string().max(256).optional(),
|
|
34
|
-
text: v.string().max(MAX_CONTEXT_ITEM_BYTES),
|
|
35
|
-
}),
|
|
36
|
-
v.object({
|
|
37
|
-
type: v.literal("json"),
|
|
38
|
-
title: v.string().max(256).optional(),
|
|
39
|
-
data: v.record(v.string(), v.unknown()).refine((value) => isWithinJsonSizeLimit(value, MAX_CONTEXT_ITEM_BYTES), { message: "JSON context item must be less than 16 KB" }),
|
|
40
|
-
}),
|
|
41
|
-
v.object({
|
|
42
|
-
type: v.literal("resource"),
|
|
43
|
-
title: v.string().max(256).optional(),
|
|
44
|
-
uri: v.string().max(2048),
|
|
45
|
-
mimeType: v.string().max(256).optional(),
|
|
46
|
-
text: v.string().max(MAX_CONTEXT_ITEM_BYTES).optional(),
|
|
47
|
-
}),
|
|
48
|
-
]));
|
|
49
|
-
const getAgUiMessagePartSchema = defineSchema((v) => v.object({ type: v.string().min(1) }).passthrough());
|
|
50
|
-
const getAgUiMessageSchema = defineSchema((v) => v.object({
|
|
51
|
-
id: v.string().min(1),
|
|
52
|
-
role: v.enum(["user", "assistant", "system", "tool"]),
|
|
53
|
-
parts: v.array(getAgUiMessagePartSchema()).default([]),
|
|
54
|
-
metadata: v.record(v.string(), v.unknown()).optional(),
|
|
55
|
-
createdAt: v.string().optional(),
|
|
56
|
-
}));
|
|
57
|
-
export const getAgUiRequestSchema = defineSchema((v) => v.object({
|
|
58
|
-
threadId: v.string().uuid().optional(),
|
|
59
|
-
runId: getAgUiRunIdSchema().optional(),
|
|
60
|
-
messages: v.array(getAgUiMessageSchema()).min(1).max(MAX_MESSAGES_PER_REQUEST),
|
|
61
|
-
tools: v.array(getAgUiInjectedToolSchema()).max(50).default([]),
|
|
62
|
-
context: v.array(getAgUiContextItemSchema()).max(10).default([]).refine((value) => isWithinJsonSizeLimit(value, MAX_CONTEXT_TOTAL_BYTES), { message: "context must be less than 64 KB total" }),
|
|
63
|
-
forwardedProps: v.record(v.string(), v.unknown()).optional().refine((value) => value === undefined || isWithinJsonSizeLimit(value, MAX_FORWARDED_PROPS_BYTES), { message: "forwardedProps must be less than 64 KB" }),
|
|
64
|
-
model: v.string().optional(),
|
|
65
|
-
maxOutputTokens: v.number().int().positive().optional(),
|
|
66
|
-
}));
|
|
67
|
-
/** @deprecated Use getAgUiInjectedToolSchema() */
|
|
68
|
-
export const AgUiInjectedToolSchema = getAgUiInjectedToolSchema();
|
|
69
|
-
/** @deprecated Use getAgUiContextItemSchema() */
|
|
70
|
-
export const AgUiContextItemSchema = getAgUiContextItemSchema();
|
|
71
|
-
/** @deprecated Use getAgUiRequestSchema() */
|
|
72
|
-
export const AgUiRequestSchema = getAgUiRequestSchema();
|
|
73
|
-
function normalizeToolArgs(part) {
|
|
74
|
-
if (isRecord(part.args))
|
|
75
|
-
return part.args;
|
|
76
|
-
if (isRecord(part.input))
|
|
77
|
-
return part.input;
|
|
78
|
-
return {};
|
|
79
|
-
}
|
|
80
|
-
function normalizeMessagePart(part) {
|
|
81
|
-
if (part.type === "text" && typeof part.text === "string" &&
|
|
82
|
-
part.text.length <= MAX_TEXT_PART_LENGTH) {
|
|
83
|
-
return { type: "text", text: part.text };
|
|
84
|
-
}
|
|
85
|
-
if (part.type === "tool_call" && typeof part.id === "string" && typeof part.name === "string") {
|
|
86
|
-
return {
|
|
87
|
-
type: "tool-call",
|
|
88
|
-
toolCallId: part.id,
|
|
89
|
-
toolName: part.name,
|
|
90
|
-
args: normalizeToolArgs(part),
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
if (part.type === "tool-call" &&
|
|
94
|
-
typeof part.toolCallId === "string" &&
|
|
95
|
-
typeof part.toolName === "string") {
|
|
96
|
-
return {
|
|
97
|
-
type: "tool-call",
|
|
98
|
-
toolCallId: part.toolCallId,
|
|
99
|
-
toolName: part.toolName,
|
|
100
|
-
args: normalizeToolArgs(part),
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
if (typeof part.type === "string" &&
|
|
104
|
-
part.type.startsWith("tool-") &&
|
|
105
|
-
part.type !== "tool-result" &&
|
|
106
|
-
typeof part.toolCallId === "string" &&
|
|
107
|
-
typeof part.toolName === "string") {
|
|
108
|
-
return {
|
|
109
|
-
type: part.type,
|
|
110
|
-
toolCallId: part.toolCallId,
|
|
111
|
-
toolName: part.toolName,
|
|
112
|
-
args: normalizeToolArgs(part),
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
if (part.type === "tool_result" && typeof part.tool_call_id === "string") {
|
|
116
|
-
return {
|
|
117
|
-
type: "tool-result",
|
|
118
|
-
toolCallId: part.tool_call_id,
|
|
119
|
-
toolName: typeof part.tool_name === "string" ? part.tool_name : "unknown",
|
|
120
|
-
result: "output" in part ? part.output : undefined,
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
if (part.type === "tool-result" && typeof part.toolCallId === "string") {
|
|
124
|
-
return {
|
|
125
|
-
type: "tool-result",
|
|
126
|
-
toolCallId: part.toolCallId,
|
|
127
|
-
toolName: typeof part.toolName === "string" ? part.toolName : "unknown",
|
|
128
|
-
result: "result" in part ? part.result : undefined,
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
return null;
|
|
132
|
-
}
|
|
133
|
-
export async function parseAgUiRequest(request) {
|
|
134
|
-
return getAgUiRequestSchema().parse(await request.json());
|
|
135
|
-
}
|
|
136
|
-
export async function parseAgUiRequestOrError(request) {
|
|
137
|
-
return await parseAgUiJsonRequestOrError(() => parseAgUiRequest(request), "Invalid AG-UI request");
|
|
138
|
-
}
|
|
139
|
-
export function normalizeAgUiMessages(messages) {
|
|
140
|
-
return messages.map((message) => ({
|
|
141
|
-
id: message.id,
|
|
142
|
-
role: message.role,
|
|
143
|
-
parts: message.parts
|
|
144
|
-
.map((part) => normalizeMessagePart(part))
|
|
145
|
-
.filter((part) => part !== null),
|
|
146
|
-
...(message.createdAt ? { timestamp: Date.parse(message.createdAt) || undefined } : {}),
|
|
147
|
-
...(message.metadata ? { metadata: message.metadata } : {}),
|
|
148
|
-
}));
|
|
149
|
-
}
|
|
150
|
-
export function createAgUiRunErrorEvent(message, code) {
|
|
151
|
-
return {
|
|
152
|
-
event: "RunError",
|
|
153
|
-
payload: {
|
|
154
|
-
message,
|
|
155
|
-
...(code ? { code } : {}),
|
|
156
|
-
},
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
export function createAgUiSseErrorResponse(event, status) {
|
|
160
|
-
return new Response(decoder.decode(formatAgUiEvent(event.event, event.payload)), {
|
|
161
|
-
status,
|
|
162
|
-
headers: {
|
|
163
|
-
"Content-Type": "text/event-stream; charset=utf-8",
|
|
164
|
-
"Cache-Control": "no-cache, no-transform",
|
|
165
|
-
"Connection": "keep-alive",
|
|
166
|
-
"X-Accel-Buffering": "no",
|
|
167
|
-
},
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
export function createAgUiSseResponse(stream) {
|
|
171
|
-
return new Response(stream, {
|
|
172
|
-
headers: {
|
|
173
|
-
"Content-Type": "text/event-stream; charset=utf-8",
|
|
174
|
-
"Cache-Control": "no-cache, no-transform",
|
|
175
|
-
"Connection": "keep-alive",
|
|
176
|
-
"X-Accel-Buffering": "no",
|
|
177
|
-
},
|
|
178
|
-
});
|
|
179
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare function isRequest(value: unknown): value is Request;
|
|
2
|
-
export declare function extractRequest(requestOrCtx: unknown): Request;
|
|
3
|
-
export declare function parseAgUiJsonRequestOrError<T>(parseRequest: () => Promise<T>, errorLabel: string): Promise<T | Response>;
|
|
4
|
-
//# sourceMappingURL=ag-ui-request-shared.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ag-ui-request-shared.d.ts","sourceRoot":"","sources":["../../../src/src/agent/ag-ui-request-shared.ts"],"names":[],"mappings":"AAiBA,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,CAW1D;AAED,wBAAgB,cAAc,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAW7D;AAED,wBAAsB,2BAA2B,CAAC,CAAC,EACjD,YAAY,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAC9B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,CAAC,GAAG,QAAQ,CAAC,CA6BvB"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { INVALID_ARGUMENT } from "../errors/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Detects a validation error thrown by a `Schema.parse()` call. Works with
|
|
4
|
-
* both the contract-DSL adapter (ext-zod wraps `ZodError` and sets `issues`)
|
|
5
|
-
* and raw zod errors.
|
|
6
|
-
*/
|
|
7
|
-
function isSchemaValidationError(error) {
|
|
8
|
-
return (error instanceof Error &&
|
|
9
|
-
"issues" in error &&
|
|
10
|
-
Array.isArray(error.issues));
|
|
11
|
-
}
|
|
12
|
-
export function isRequest(value) {
|
|
13
|
-
return (typeof value === "object" &&
|
|
14
|
-
value !== null &&
|
|
15
|
-
"json" in value &&
|
|
16
|
-
typeof value.json === "function" &&
|
|
17
|
-
"url" in value &&
|
|
18
|
-
typeof value.url === "string" &&
|
|
19
|
-
"method" in value &&
|
|
20
|
-
typeof value.method === "string");
|
|
21
|
-
}
|
|
22
|
-
export function extractRequest(requestOrCtx) {
|
|
23
|
-
if (isRequest(requestOrCtx))
|
|
24
|
-
return requestOrCtx;
|
|
25
|
-
if (typeof requestOrCtx === "object" && requestOrCtx !== null && "request" in requestOrCtx) {
|
|
26
|
-
const candidate = requestOrCtx.request;
|
|
27
|
-
if (isRequest(candidate))
|
|
28
|
-
return candidate;
|
|
29
|
-
}
|
|
30
|
-
throw INVALID_ARGUMENT.create({
|
|
31
|
-
detail: "Invalid handler argument: expected Request or APIContext",
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
export async function parseAgUiJsonRequestOrError(parseRequest, errorLabel) {
|
|
35
|
-
try {
|
|
36
|
-
return await parseRequest();
|
|
37
|
-
}
|
|
38
|
-
catch (error) {
|
|
39
|
-
if (isSchemaValidationError(error)) {
|
|
40
|
-
return Response.json({
|
|
41
|
-
error: errorLabel,
|
|
42
|
-
details: error.issues.map((issue) => ({
|
|
43
|
-
path: issue.path,
|
|
44
|
-
message: issue.message,
|
|
45
|
-
})),
|
|
46
|
-
}, { status: 400 });
|
|
47
|
-
}
|
|
48
|
-
if (error instanceof SyntaxError || error instanceof TypeError) {
|
|
49
|
-
return Response.json({
|
|
50
|
-
error: errorLabel,
|
|
51
|
-
details: [{ path: [], message: "Malformed JSON request body" }],
|
|
52
|
-
}, { status: 400 });
|
|
53
|
-
}
|
|
54
|
-
throw error;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { InferSchema } from "../extensions/schema/index.js";
|
|
2
|
-
import { RunResumeSessionManager } from "./runtime/resume-session.js";
|
|
3
|
-
export declare const getAgUiResumeSignalSchema: () => import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
4
|
-
type: import("../internal-agents/schema.js").Schema<"tool_result">;
|
|
5
|
-
toolCallId: import("../internal-agents/schema.js").Schema<string>;
|
|
6
|
-
result: import("../internal-agents/schema.js").Schema<unknown>;
|
|
7
|
-
isError: import("../internal-agents/schema.js").Schema<boolean>;
|
|
8
|
-
}>>;
|
|
9
|
-
/** @deprecated Use getAgUiResumeSignalSchema() */
|
|
10
|
-
export declare const AgUiResumeSignalSchema: import("../internal-agents/schema.js").Schema<import("../extensions/schema/schema-validator.js").InferShape<{
|
|
11
|
-
type: import("../internal-agents/schema.js").Schema<"tool_result">;
|
|
12
|
-
toolCallId: import("../internal-agents/schema.js").Schema<string>;
|
|
13
|
-
result: import("../internal-agents/schema.js").Schema<unknown>;
|
|
14
|
-
isError: import("../internal-agents/schema.js").Schema<boolean>;
|
|
15
|
-
}>>;
|
|
16
|
-
export type AgUiResumeSignal = InferSchema<ReturnType<typeof getAgUiResumeSignalSchema>>;
|
|
17
|
-
type ResumeValue = {
|
|
18
|
-
result: unknown;
|
|
19
|
-
isError: boolean;
|
|
20
|
-
};
|
|
21
|
-
export interface AgUiRunControlHandlerOptions {
|
|
22
|
-
resolveRunId?: ((input: {
|
|
23
|
-
request: Request;
|
|
24
|
-
requestOrCtx: unknown;
|
|
25
|
-
}) => string | null) | ((input: {
|
|
26
|
-
request: Request;
|
|
27
|
-
requestOrCtx: unknown;
|
|
28
|
-
}) => Promise<string | null>);
|
|
29
|
-
}
|
|
30
|
-
export interface AgUiResumeHandlerOptions extends AgUiRunControlHandlerOptions {
|
|
31
|
-
sessionManager: RunResumeSessionManager<ResumeValue>;
|
|
32
|
-
}
|
|
33
|
-
export interface AgUiCancelHandlerOptions<T = unknown> extends AgUiRunControlHandlerOptions {
|
|
34
|
-
sessionManager: RunResumeSessionManager<T>;
|
|
35
|
-
}
|
|
36
|
-
export declare function createAgUiResumeHandler(options: AgUiResumeHandlerOptions): (requestOrCtx: unknown) => Promise<Response>;
|
|
37
|
-
export declare function createAgUiCancelHandler<T = unknown>(options: AgUiCancelHandlerOptions<T>): (requestOrCtx: unknown) => Promise<Response>;
|
|
38
|
-
export {};
|
|
39
|
-
//# sourceMappingURL=ag-ui-run-control.d.ts.map
|