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,68 +0,0 @@
|
|
|
1
|
-
import { getChatRequestContextSchema, getChatUiMessagesSchema } from "../chat/types.js";
|
|
2
|
-
import { defineSchema } from "../schemas/index.js";
|
|
3
|
-
const getDurableRootRunIdSchema = defineSchema((v) => v.string().min(1).max(128).regex(/^[a-zA-Z0-9_-]+$/));
|
|
4
|
-
export const getHostedDurableRootRunDescriptorSchema = defineSchema((v) => v.object({
|
|
5
|
-
runId: getDurableRootRunIdSchema(),
|
|
6
|
-
messageId: v.string().uuid(),
|
|
7
|
-
latestEventId: v.number().int().nonnegative().optional(),
|
|
8
|
-
latestExternalEventSequence: v.number().int().nonnegative().optional(),
|
|
9
|
-
parentConversationId: v.string().uuid().optional(),
|
|
10
|
-
parentRunId: getDurableRootRunIdSchema().optional(),
|
|
11
|
-
spawnedFromToolCallId: v.string().min(1).max(256).optional(),
|
|
12
|
-
}).strict());
|
|
13
|
-
/** @deprecated Use getHostedDurableRootRunDescriptorSchema() */
|
|
14
|
-
export const hostedDurableRootRunDescriptorSchema = getHostedDurableRootRunDescriptorSchema();
|
|
15
|
-
export const getHostedChatRuntimeOverridesSchema = defineSchema((v) => v.object({
|
|
16
|
-
allowedTools: v.array(v.string().min(1)).max(100).optional(),
|
|
17
|
-
thinking: v.union([v.literal(false), v.number().int().positive()]).optional(),
|
|
18
|
-
maxSteps: v.number().int().positive().optional(),
|
|
19
|
-
}).strip());
|
|
20
|
-
/** @deprecated Use getHostedChatRuntimeOverridesSchema() */
|
|
21
|
-
export const hostedChatRuntimeOverridesSchema = getHostedChatRuntimeOverridesSchema();
|
|
22
|
-
export const getHostedChatRequestSchema = defineSchema((v) => v.object({
|
|
23
|
-
messages: getChatUiMessagesSchema(),
|
|
24
|
-
context: getChatRequestContextSchema(),
|
|
25
|
-
model: v.string().optional(),
|
|
26
|
-
allowDelegation: v.boolean().optional(),
|
|
27
|
-
forwardedProps: v.record(v.string(), v.unknown()).optional(),
|
|
28
|
-
runtimeOverrides: getHostedChatRuntimeOverridesSchema().optional(),
|
|
29
|
-
durableRootRun: getHostedDurableRootRunDescriptorSchema().optional(),
|
|
30
|
-
}));
|
|
31
|
-
/** @deprecated Use getHostedChatRequestSchema() */
|
|
32
|
-
export const hostedChatRequestSchema = getHostedChatRequestSchema();
|
|
33
|
-
function isRecord(value) {
|
|
34
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
35
|
-
}
|
|
36
|
-
export function buildHostedChatRequestForwardedPropsFromRuntimeAgentInvocation(input) {
|
|
37
|
-
const forwardedProps = isRecord(input.forwardedProps)
|
|
38
|
-
? { ...input.forwardedProps }
|
|
39
|
-
: {};
|
|
40
|
-
if (input.context.length > 0) {
|
|
41
|
-
forwardedProps.runtimeContext = input.context;
|
|
42
|
-
}
|
|
43
|
-
if (input.tools.length > 0) {
|
|
44
|
-
forwardedProps.runtimeTools = input.tools;
|
|
45
|
-
}
|
|
46
|
-
return Object.keys(forwardedProps).length > 0 ? forwardedProps : undefined;
|
|
47
|
-
}
|
|
48
|
-
export function buildHostedChatRequestInputFromRuntimeAgentInvocation(input) {
|
|
49
|
-
return {
|
|
50
|
-
messages: input.messages,
|
|
51
|
-
context: {
|
|
52
|
-
conversationId: input.run.conversationId,
|
|
53
|
-
projectId: input.run.project.projectId,
|
|
54
|
-
branchId: input.run.project.runtimeTargetBranchId ?? null,
|
|
55
|
-
},
|
|
56
|
-
forwardedProps: buildHostedChatRequestForwardedPropsFromRuntimeAgentInvocation(input),
|
|
57
|
-
durableRootRun: {
|
|
58
|
-
runId: input.run.runId,
|
|
59
|
-
messageId: input.run.messageId,
|
|
60
|
-
parentConversationId: input.run.parentConversationId ?? undefined,
|
|
61
|
-
parentRunId: input.run.parentRunId ?? undefined,
|
|
62
|
-
spawnedFromToolCallId: input.run.spawnedFromToolCallId ?? undefined,
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
export function buildHostedChatRequestFromRuntimeAgentInvocation(input) {
|
|
67
|
-
return getHostedChatRequestSchema().parse(buildHostedChatRequestInputFromRuntimeAgentInvocation(input));
|
|
68
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { HostedChatRuntimeAgent } from "./hosted-chat-runtime-contract.js";
|
|
2
|
-
import type { Agent } from "./types.js";
|
|
3
|
-
export type HostedChatRuntimeAgentAdapterRunner = <TResult>(operation: () => Promise<TResult>) => Promise<TResult>;
|
|
4
|
-
export type HostedChatRuntimeAgentAdapterWarning = {
|
|
5
|
-
toolCallId: string;
|
|
6
|
-
inputPreview: string;
|
|
7
|
-
};
|
|
8
|
-
export type HostedChatRuntimeAgentAdapterInput = {
|
|
9
|
-
runtimeAgent: Pick<Agent, "stream">;
|
|
10
|
-
runStream?: HostedChatRuntimeAgentAdapterRunner;
|
|
11
|
-
warnOrphanedToolInput?: (message: string, metadata: HostedChatRuntimeAgentAdapterWarning) => void;
|
|
12
|
-
};
|
|
13
|
-
export declare function createHostedChatRuntimeAgentAdapter(input: HostedChatRuntimeAgentAdapterInput): HostedChatRuntimeAgent;
|
|
14
|
-
//# sourceMappingURL=hosted-chat-runtime-agent-adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-chat-runtime-agent-adapter.d.ts","sourceRoot":"","sources":["../../../src/src/agent/hosted-chat-runtime-agent-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,sBAAsB,EAEvB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,MAAM,mCAAmC,GAAG,CAAC,OAAO,EACxD,SAAS,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,KAC9B,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtB,MAAM,MAAM,oCAAoC,GAAG;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAC/C,YAAY,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,mCAAmC,CAAC;IAChD,qBAAqB,CAAC,EAAE,CACtB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,oCAAoC,KAC3C,IAAI,CAAC;CACX,CAAC;AAMF,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,kCAAkC,GACxC,sBAAsB,CAsDxB"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { createChatUiMessageStreamFromDataStream } from "./chat-ui-message-stream.js";
|
|
2
|
-
import { createToolExecutionDataEventBridgeStream } from "./tool-execution-data-event-bridge.js";
|
|
3
|
-
function previewToolInput(inputText) {
|
|
4
|
-
return inputText.length > 500 ? `${inputText.slice(0, 500)}...` : inputText;
|
|
5
|
-
}
|
|
6
|
-
export function createHostedChatRuntimeAgentAdapter(input) {
|
|
7
|
-
const runStream = input.runStream ?? ((operation) => operation());
|
|
8
|
-
return {
|
|
9
|
-
stream: async (streamInput) => {
|
|
10
|
-
let publishDataEvent = (_event) => { };
|
|
11
|
-
const response = await runStream(() => input.runtimeAgent.stream({
|
|
12
|
-
messages: streamInput.messages,
|
|
13
|
-
context: {
|
|
14
|
-
abortSignal: streamInput.abortSignal,
|
|
15
|
-
publishDataEvent: (event) => publishDataEvent(event),
|
|
16
|
-
},
|
|
17
|
-
}));
|
|
18
|
-
const streamResponse = response.toDataStreamResponse();
|
|
19
|
-
if (!streamResponse.body) {
|
|
20
|
-
throw new Error("Agent runtime returned an empty stream body");
|
|
21
|
-
}
|
|
22
|
-
const stream = createToolExecutionDataEventBridgeStream({
|
|
23
|
-
baseStream: streamResponse.body,
|
|
24
|
-
installPublisher: (nextPublishDataEvent) => {
|
|
25
|
-
publishDataEvent = nextPublishDataEvent;
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
return {
|
|
29
|
-
steps: Promise.resolve([]),
|
|
30
|
-
toUIMessageStream(options = {}) {
|
|
31
|
-
return createChatUiMessageStreamFromDataStream({ stream }, {
|
|
32
|
-
generateMessageId: options.generateMessageId,
|
|
33
|
-
sendReasoning: options.sendReasoning,
|
|
34
|
-
onError: options.onError,
|
|
35
|
-
messageMetadata: options.messageMetadata,
|
|
36
|
-
onFinish: options.onFinish,
|
|
37
|
-
onOrphanedToolInput: ({ toolCallId, inputText }) => {
|
|
38
|
-
input.warnOrphanedToolInput?.("Dropping orphan AG-UI runtime tool-input-delta stream without a matching lifecycle", {
|
|
39
|
-
toolCallId,
|
|
40
|
-
inputPreview: previewToolInput(inputText),
|
|
41
|
-
});
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import type { ChatFinishReason } from "../chat/protocol.js";
|
|
2
|
-
import type { ChatSystemMessage, ChatUiMessage, ChatUiMessageChunk, MessageMetadata } from "../chat/types.js";
|
|
3
|
-
import type { AgentRuntimeMessage } from "./agent-runtime-message-adapter.js";
|
|
4
|
-
import type { ConversationRunEvent } from "./conversation-run-events.js";
|
|
5
|
-
import type { RuntimeClientProfile } from "./runtime-client-profile.js";
|
|
6
|
-
import type { RuntimeSkillDefinition } from "./runtime-skill-metadata.js";
|
|
7
|
-
export type HostedChatRuntimeFinishPart = {
|
|
8
|
-
type: "finish";
|
|
9
|
-
finishReason: ChatFinishReason;
|
|
10
|
-
rawFinishReason?: string;
|
|
11
|
-
totalUsage: {
|
|
12
|
-
inputTokens?: number;
|
|
13
|
-
outputTokens?: number;
|
|
14
|
-
totalTokens?: number;
|
|
15
|
-
reasoningTokens?: number;
|
|
16
|
-
cachedInputTokens?: number;
|
|
17
|
-
inputTokenDetails?: {
|
|
18
|
-
noCacheTokens?: number;
|
|
19
|
-
cacheReadTokens?: number;
|
|
20
|
-
cacheWriteTokens?: number;
|
|
21
|
-
};
|
|
22
|
-
outputTokenDetails?: {
|
|
23
|
-
textTokens?: number;
|
|
24
|
-
reasoningTokens?: number;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export type HostedChatRuntimeOnFinishEvent<TMessageMetadata = MessageMetadata> = {
|
|
29
|
-
messages: Array<ChatUiMessage<TMessageMetadata>>;
|
|
30
|
-
isContinuation: boolean;
|
|
31
|
-
responseMessage: ChatUiMessage<TMessageMetadata>;
|
|
32
|
-
isAborted: boolean;
|
|
33
|
-
finishReason: ChatFinishReason;
|
|
34
|
-
};
|
|
35
|
-
export type HostedChatRuntimeToUiMessageStreamOptions<TMessageMetadata = MessageMetadata> = {
|
|
36
|
-
sendReasoning?: boolean;
|
|
37
|
-
originalMessages?: Array<ChatUiMessage<TMessageMetadata>>;
|
|
38
|
-
generateMessageId?: () => string;
|
|
39
|
-
onError?: (error: unknown) => string;
|
|
40
|
-
onFinish?: (event: HostedChatRuntimeOnFinishEvent<TMessageMetadata>) => void | Promise<void>;
|
|
41
|
-
messageMetadata?: (input: {
|
|
42
|
-
part: HostedChatRuntimeFinishPart;
|
|
43
|
-
}) => TMessageMetadata | undefined;
|
|
44
|
-
};
|
|
45
|
-
export type HostedChatRuntimeStreamInput = {
|
|
46
|
-
messages: AgentRuntimeMessage[];
|
|
47
|
-
abortSignal: AbortSignal;
|
|
48
|
-
};
|
|
49
|
-
export type HostedChatRuntimeStreamResult<TMessageMetadata = MessageMetadata> = {
|
|
50
|
-
steps: PromiseLike<readonly unknown[]>;
|
|
51
|
-
toUIMessageStream: (options?: HostedChatRuntimeToUiMessageStreamOptions<TMessageMetadata>) => AsyncIterable<ChatUiMessageChunk<TMessageMetadata>>;
|
|
52
|
-
};
|
|
53
|
-
export type HostedChatRuntimeAgent<TMessageMetadata = MessageMetadata> = {
|
|
54
|
-
stream: (input: HostedChatRuntimeStreamInput) => Promise<HostedChatRuntimeStreamResult<TMessageMetadata>>;
|
|
55
|
-
};
|
|
56
|
-
export type HostedChatRuntimeCreationResult<TMessageMetadata = MessageMetadata> = {
|
|
57
|
-
runtimeKind: "framework";
|
|
58
|
-
agent: HostedChatRuntimeAgent<TMessageMetadata>;
|
|
59
|
-
modelId: string;
|
|
60
|
-
cleanup: () => Promise<void>;
|
|
61
|
-
};
|
|
62
|
-
export type HostedChatRuntimeProjectSteering<TRuntimeAgentDefinition> = {
|
|
63
|
-
agent: TRuntimeAgentDefinition;
|
|
64
|
-
environmentContext?: string;
|
|
65
|
-
initialProjectInstructions?: string;
|
|
66
|
-
initialSkills?: RuntimeSkillDefinition[];
|
|
67
|
-
};
|
|
68
|
-
export type HostedChatRuntimeCreationOptions<TRuntimeAgentDefinition, TThinkingConfig> = {
|
|
69
|
-
projectId: string | null;
|
|
70
|
-
branchId?: string | null;
|
|
71
|
-
authToken: string;
|
|
72
|
-
instructions: string | ChatSystemMessage[];
|
|
73
|
-
model?: string;
|
|
74
|
-
maxSteps?: number;
|
|
75
|
-
allowedTools?: string[];
|
|
76
|
-
allowDelegation?: boolean;
|
|
77
|
-
thinking?: TThinkingConfig;
|
|
78
|
-
conversationId?: string;
|
|
79
|
-
parentRunId?: string;
|
|
80
|
-
parentMessageId?: string;
|
|
81
|
-
availableSkillIds?: string[];
|
|
82
|
-
publishParentRunEvents?: (events: ConversationRunEvent[]) => Promise<void>;
|
|
83
|
-
clientProfile?: RuntimeClientProfile | null;
|
|
84
|
-
liveProjectSteering?: HostedChatRuntimeProjectSteering<TRuntimeAgentDefinition>;
|
|
85
|
-
};
|
|
86
|
-
//# sourceMappingURL=hosted-chat-runtime-contract.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-chat-runtime-contract.d.ts","sourceRoot":"","sources":["../../../src/src/agent/hosted-chat-runtime-contract.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { ChatSystemMessage } from "../chat/types.js";
|
|
2
|
-
import { type HostToolSet, type HostToolTraceAttributes, type ProjectScopedRemoteToolOptions, type RemoteMCPToolSourceConfig, type RemoteToolSource, type ToolSet, type TraceHostToolsOptions } from "../tool/index.js";
|
|
3
|
-
import { type DefaultResearchArtifactContext } from "./default-research-artifact-support.js";
|
|
4
|
-
import { type AgentServiceMcpServerConfig } from "./agent-service-mcp-server-config.js";
|
|
5
|
-
import { type HostedProjectRemoteToolSourceMutationHandler, type HostedProjectRemoteToolSourcePrepareToolInput, type HostedProjectRemoteToolSourceProjectSwitchHandler, type HostedProjectRemoteToolSourceRetryPolicy } from "./hosted-project-remote-tool-source.js";
|
|
6
|
-
import { type RuntimeClientProfile } from "./runtime-client-profile.js";
|
|
7
|
-
export type HostedChatRuntimeToolAssemblyContext = DefaultResearchArtifactContext & {
|
|
8
|
-
authToken: string;
|
|
9
|
-
projectId?: string | null;
|
|
10
|
-
branchId?: string | null;
|
|
11
|
-
model?: string;
|
|
12
|
-
clientProfile?: RuntimeClientProfile | null;
|
|
13
|
-
availableToolNames?: string[];
|
|
14
|
-
};
|
|
15
|
-
export type HostedChatRuntimeAllowedToolNames = readonly string[] | ReadonlySet<string> | null;
|
|
16
|
-
export type HostedChatRuntimeToolAssemblyResult = {
|
|
17
|
-
runtimeTools: ToolSet;
|
|
18
|
-
remoteToolSources: RemoteToolSource[];
|
|
19
|
-
localToolNames: string[];
|
|
20
|
-
remoteToolNames: string[];
|
|
21
|
-
availableToolNames: string[];
|
|
22
|
-
compatibleRemoteToolNames: string[];
|
|
23
|
-
systemInstructions: string;
|
|
24
|
-
};
|
|
25
|
-
export type PrepareHostedChatRuntimeToolAssemblyInput<TTraceAttributes extends HostToolTraceAttributes = HostToolTraceAttributes> = {
|
|
26
|
-
taskContext: HostedChatRuntimeToolAssemblyContext;
|
|
27
|
-
instructions: string | readonly ChatSystemMessage[];
|
|
28
|
-
localTools: HostToolSet;
|
|
29
|
-
apiUrl: string;
|
|
30
|
-
apiMcpUrl: string;
|
|
31
|
-
studioMcpUrl?: string | null;
|
|
32
|
-
mcpServers?: readonly AgentServiceMcpServerConfig[];
|
|
33
|
-
conversationId?: string;
|
|
34
|
-
allowedToolNames?: HostedChatRuntimeAllowedToolNames;
|
|
35
|
-
projectScopedRemoteToolOptions?: ProjectScopedRemoteToolOptions;
|
|
36
|
-
createRemoteToolSource?: (config: RemoteMCPToolSourceConfig) => RemoteToolSource;
|
|
37
|
-
traceLocalTools?: TraceHostToolsOptions<TTraceAttributes>;
|
|
38
|
-
getProjectId?: () => string | null | undefined;
|
|
39
|
-
getActiveBranchId?: () => string | null | undefined;
|
|
40
|
-
prepareRemoteToolInput?: HostedProjectRemoteToolSourcePrepareToolInput;
|
|
41
|
-
shouldRetryWithRemoteTool?: HostedProjectRemoteToolSourceRetryPolicy;
|
|
42
|
-
onSteeringMutation?: HostedProjectRemoteToolSourceMutationHandler;
|
|
43
|
-
onStudioProjectSwitch?: HostedProjectRemoteToolSourceProjectSwitchHandler;
|
|
44
|
-
preloadLatestConversationUserText?: boolean;
|
|
45
|
-
};
|
|
46
|
-
export declare function filterHostedChatRuntimeLocalTools(input: {
|
|
47
|
-
tools: HostToolSet;
|
|
48
|
-
allowedToolNames?: HostedChatRuntimeAllowedToolNames;
|
|
49
|
-
}): HostToolSet;
|
|
50
|
-
export declare function prepareHostedChatRuntimeToolAssembly<TTraceAttributes extends HostToolTraceAttributes = HostToolTraceAttributes>(input: PrepareHostedChatRuntimeToolAssemblyInput<TTraceAttributes>): Promise<HostedChatRuntimeToolAssemblyResult>;
|
|
51
|
-
//# sourceMappingURL=hosted-chat-runtime-tool-assembly.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-chat-runtime-tool-assembly.d.ts","sourceRoot":"","sources":["../../../src/src/agent/hosted-chat-runtime-tool-assembly.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { createRemoteMCPToolSource, createToolsFromHostDefinitions, listProjectScopedRemoteToolNames, traceHostTools, } from "../tool/index.js";
|
|
2
|
-
import { fetchLatestConversationUserText, updateDefaultResearchArtifacts, } from "./default-research-artifact-support.js";
|
|
3
|
-
import { createHostedProjectRemoteToolSources, } from "./hosted-project-remote-tool-source.js";
|
|
4
|
-
import { selectProviderCompatibleToolNames } from "./runtime/provider-tool-compat.js";
|
|
5
|
-
import { flattenSystemInstructions, withRuntimeToolInventory } from "./runtime-tool-inventory.js";
|
|
6
|
-
function normalizeAllowedToolNames(toolNames) {
|
|
7
|
-
if (!toolNames) {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
return new Set(toolNames);
|
|
11
|
-
}
|
|
12
|
-
function activeProjectId(taskContext) {
|
|
13
|
-
return taskContext.projectId || null;
|
|
14
|
-
}
|
|
15
|
-
function activeBranchId(taskContext) {
|
|
16
|
-
return taskContext.branchId ?? null;
|
|
17
|
-
}
|
|
18
|
-
export function filterHostedChatRuntimeLocalTools(input) {
|
|
19
|
-
const allowedToolNames = normalizeAllowedToolNames(input.allowedToolNames);
|
|
20
|
-
const entries = Object.entries(input.tools).filter(([toolName]) => allowedToolNames ? allowedToolNames.has(toolName) : true);
|
|
21
|
-
return Object.fromEntries(entries.sort(([left], [right]) => left.localeCompare(right)));
|
|
22
|
-
}
|
|
23
|
-
export async function prepareHostedChatRuntimeToolAssembly(input) {
|
|
24
|
-
const allowedToolNames = normalizeAllowedToolNames(input.allowedToolNames);
|
|
25
|
-
const sortedLocalTools = filterHostedChatRuntimeLocalTools({
|
|
26
|
-
tools: input.localTools,
|
|
27
|
-
allowedToolNames,
|
|
28
|
-
});
|
|
29
|
-
const localHostTools = input.traceLocalTools
|
|
30
|
-
? traceHostTools(sortedLocalTools, input.traceLocalTools)
|
|
31
|
-
: sortedLocalTools;
|
|
32
|
-
const remoteToolSources = createHostedProjectRemoteToolSources({
|
|
33
|
-
authToken: input.taskContext.authToken,
|
|
34
|
-
apiMcpUrl: input.apiMcpUrl,
|
|
35
|
-
studioMcpUrl: input.studioMcpUrl,
|
|
36
|
-
mcpServers: input.mcpServers,
|
|
37
|
-
clientProfile: input.taskContext.clientProfile,
|
|
38
|
-
createRemoteToolSource: input.createRemoteToolSource ?? createRemoteMCPToolSource,
|
|
39
|
-
defaultProjectId: () => activeProjectId(input.taskContext),
|
|
40
|
-
getProjectId: input.getProjectId ?? (() => activeProjectId(input.taskContext)),
|
|
41
|
-
getActiveBranchId: input.getActiveBranchId ?? (() => activeBranchId(input.taskContext)),
|
|
42
|
-
conversationId: input.conversationId,
|
|
43
|
-
allowedToolNames,
|
|
44
|
-
projectScopedRemoteToolOptions: input.projectScopedRemoteToolOptions,
|
|
45
|
-
prepareToolInput: input.prepareRemoteToolInput,
|
|
46
|
-
shouldRetryWithTool: input.shouldRetryWithRemoteTool,
|
|
47
|
-
onSteeringMutation: input.onSteeringMutation,
|
|
48
|
-
onStudioProjectSwitch: input.onStudioProjectSwitch,
|
|
49
|
-
});
|
|
50
|
-
const remoteToolNames = await listProjectScopedRemoteToolNames(remoteToolSources, {
|
|
51
|
-
projectId: activeProjectId(input.taskContext),
|
|
52
|
-
projectScopedRemoteToolOptions: input.projectScopedRemoteToolOptions,
|
|
53
|
-
});
|
|
54
|
-
const localToolNames = Object.keys(localHostTools);
|
|
55
|
-
const availableToolNames = selectProviderCompatibleToolNames([...new Set([...localToolNames, ...remoteToolNames])].sort(), {
|
|
56
|
-
model: input.taskContext.model,
|
|
57
|
-
requiredToolNames: localToolNames,
|
|
58
|
-
});
|
|
59
|
-
const compatibleToolNames = new Set(availableToolNames);
|
|
60
|
-
const compatibleRemoteToolNames = remoteToolNames.filter((toolName) => compatibleToolNames.has(toolName));
|
|
61
|
-
input.taskContext.availableToolNames = availableToolNames;
|
|
62
|
-
const systemInstructions = flattenSystemInstructions(withRuntimeToolInventory(input.instructions, availableToolNames));
|
|
63
|
-
if (input.preloadLatestConversationUserText !== false) {
|
|
64
|
-
const latestUserText = await fetchLatestConversationUserText({
|
|
65
|
-
apiUrl: input.apiUrl,
|
|
66
|
-
authToken: input.taskContext.authToken,
|
|
67
|
-
conversationId: input.conversationId,
|
|
68
|
-
});
|
|
69
|
-
updateDefaultResearchArtifacts({
|
|
70
|
-
taskContext: input.taskContext,
|
|
71
|
-
latestUserText,
|
|
72
|
-
system: systemInstructions,
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
return {
|
|
76
|
-
runtimeTools: createToolsFromHostDefinitions(localHostTools),
|
|
77
|
-
remoteToolSources,
|
|
78
|
-
localToolNames,
|
|
79
|
-
remoteToolNames,
|
|
80
|
-
availableToolNames,
|
|
81
|
-
compatibleRemoteToolNames,
|
|
82
|
-
systemInstructions,
|
|
83
|
-
};
|
|
84
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ToolExecutionContext } from "../tool/index.js";
|
|
2
|
-
export interface HostedChildWrittenArtifactPathInput {
|
|
3
|
-
toolName: string;
|
|
4
|
-
toolInput: unknown;
|
|
5
|
-
toolOutput: unknown;
|
|
6
|
-
writingToolNames?: readonly string[];
|
|
7
|
-
}
|
|
8
|
-
export type HostedChildFileWriteFallbackToolExecute = (toolInput: unknown, execOptions?: ToolExecutionContext) => Promise<unknown> | unknown;
|
|
9
|
-
export interface HostedChildFileWriteFallbackTool {
|
|
10
|
-
execute?: HostedChildFileWriteFallbackToolExecute;
|
|
11
|
-
}
|
|
12
|
-
export interface HostedChildFileWriteFallbackLogger {
|
|
13
|
-
info?: (message: string, metadata?: Record<string, unknown>) => void;
|
|
14
|
-
}
|
|
15
|
-
export declare function withHostedChildRerunnableFileWriteFallbacks(input: {
|
|
16
|
-
tools: Record<string, HostedChildFileWriteFallbackTool>;
|
|
17
|
-
createToolName?: string;
|
|
18
|
-
updateToolName?: string;
|
|
19
|
-
logger?: HostedChildFileWriteFallbackLogger;
|
|
20
|
-
}): Record<string, HostedChildFileWriteFallbackTool>;
|
|
21
|
-
export declare function isHostedChildTextProjectArtifactPrompt(prompt: string): boolean;
|
|
22
|
-
export declare function isHostedChildCreateFileAlreadyExistsResult(result: unknown): boolean;
|
|
23
|
-
export declare function getHostedChildWrittenArtifactPath(input: HostedChildWrittenArtifactPathInput): string | null;
|
|
24
|
-
export declare function normalizeHostedChildArtifactPath(path: string): string | null;
|
|
25
|
-
//# sourceMappingURL=hosted-child-artifact-support.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-child-artifact-support.d.ts","sourceRoot":"","sources":["../../../src/src/agent/hosted-child-artifact-support.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAY7D,MAAM,WAAW,mCAAmC;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,MAAM,MAAM,uCAAuC,GAAG,CACpD,SAAS,EAAE,OAAO,EAClB,WAAW,CAAC,EAAE,oBAAoB,KAC/B,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAEhC,MAAM,WAAW,gCAAgC;IAC/C,OAAO,CAAC,EAAE,uCAAuC,CAAC;CACnD;AAED,MAAM,WAAW,kCAAkC;IACjD,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtE;AAED,wBAAgB,2CAA2C,CAAC,KAAK,EAAE;IACjE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,gCAAgC,CAAC,CAAC;IACxD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,kCAAkC,CAAC;CAC7C,GAAG,MAAM,CAAC,MAAM,EAAE,gCAAgC,CAAC,CAuDnD;AAED,wBAAgB,sCAAsC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAG9E;AAED,wBAAgB,0CAA0C,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAEnF;AAED,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,mCAAmC,GACzC,MAAM,GAAG,IAAI,CAgBf;AAED,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAuB5E"}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { toChildRunToolInputRecord } from "./child-run-execution-support.js";
|
|
2
|
-
const TEXT_PROJECT_ARTIFACT_CUE_PATTERN = /\b(markdown|reference document|research report|report|write-up|writeup|save it to the project|save everything to the project|save the results to the project|compile everything into a single well-structured markdown file)\b/i;
|
|
3
|
-
const TEXT_PROJECT_ARTIFACT_PATH_PATTERN = /(?:^|[\s`"'(])(?:[\w./-]+\/)?[\w.-]+\.md\b/i;
|
|
4
|
-
const DEFAULT_WRITING_TOOL_NAMES = ["create_file", "update_file"];
|
|
5
|
-
const CREATE_FILE_ALREADY_EXISTS_PATTERN = /file already exists/i;
|
|
6
|
-
const TOOL_ERROR_VALUES = new Set(["error", "tool_error"]);
|
|
7
|
-
const MAX_NESTED_TOOL_RESULT_DEPTH = 8;
|
|
8
|
-
export function withHostedChildRerunnableFileWriteFallbacks(input) {
|
|
9
|
-
const createToolName = input.createToolName ?? "create_file";
|
|
10
|
-
const updateToolName = input.updateToolName ?? "update_file";
|
|
11
|
-
const createFileTool = input.tools[createToolName];
|
|
12
|
-
const updateFileTool = input.tools[updateToolName];
|
|
13
|
-
if (!createFileTool?.execute || !updateFileTool?.execute) {
|
|
14
|
-
return input.tools;
|
|
15
|
-
}
|
|
16
|
-
const createFileExecute = createFileTool.execute;
|
|
17
|
-
const updateFileExecute = updateFileTool.execute;
|
|
18
|
-
return {
|
|
19
|
-
...input.tools,
|
|
20
|
-
[createToolName]: {
|
|
21
|
-
...createFileTool,
|
|
22
|
-
execute: async (toolInput, execOptions) => {
|
|
23
|
-
const normalizedToolInput = toChildRunToolInputRecord(toolInput);
|
|
24
|
-
const result = await createFileExecute(toolInput, execOptions);
|
|
25
|
-
if (!isHostedChildCreateFileAlreadyExistsResult(result)) {
|
|
26
|
-
return result;
|
|
27
|
-
}
|
|
28
|
-
const projectReference = normalizedToolInput.project_reference;
|
|
29
|
-
const branchId = normalizedToolInput.branch_id;
|
|
30
|
-
const path = normalizedToolInput.path;
|
|
31
|
-
const content = normalizedToolInput.content;
|
|
32
|
-
if (typeof projectReference !== "string" || typeof path !== "string" ||
|
|
33
|
-
typeof content !== "string") {
|
|
34
|
-
return result;
|
|
35
|
-
}
|
|
36
|
-
input.logger?.info?.("Falling back from create_file to update_file for existing project artifact", {
|
|
37
|
-
path,
|
|
38
|
-
});
|
|
39
|
-
return updateFileExecute({
|
|
40
|
-
project_reference: projectReference,
|
|
41
|
-
...(typeof branchId === "string" ? { branch_id: branchId } : {}),
|
|
42
|
-
path,
|
|
43
|
-
content,
|
|
44
|
-
}, execOptions);
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
export function isHostedChildTextProjectArtifactPrompt(prompt) {
|
|
50
|
-
return TEXT_PROJECT_ARTIFACT_CUE_PATTERN.test(prompt) ||
|
|
51
|
-
TEXT_PROJECT_ARTIFACT_PATH_PATTERN.test(prompt);
|
|
52
|
-
}
|
|
53
|
-
export function isHostedChildCreateFileAlreadyExistsResult(result) {
|
|
54
|
-
return isHostedChildCreateFileAlreadyExistsResultAtDepth(result, 0);
|
|
55
|
-
}
|
|
56
|
-
export function getHostedChildWrittenArtifactPath(input) {
|
|
57
|
-
const writingToolNames = input.writingToolNames ?? DEFAULT_WRITING_TOOL_NAMES;
|
|
58
|
-
if (!writingToolNames.includes(input.toolName)) {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
if (isErrorToolOutput(input.toolOutput)) {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
if (!isRecord(input.toolInput)) {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
const path = input.toolInput.path;
|
|
68
|
-
return typeof path === "string" ? normalizeHostedChildArtifactPath(path) : null;
|
|
69
|
-
}
|
|
70
|
-
export function normalizeHostedChildArtifactPath(path) {
|
|
71
|
-
const trimmedPath = path.trim().replace(/^[`"'(]+|[`"'),.;:!?]+$/g, "");
|
|
72
|
-
if (trimmedPath.length === 0) {
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
if (trimmedPath.includes("://") || trimmedPath === "/workspace" ||
|
|
76
|
-
trimmedPath.startsWith("/workspace/")) {
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
const prefixedPath = trimmedPath.replace(/^\.\//, "/");
|
|
80
|
-
const normalizedPath = (prefixedPath.startsWith("/") ? prefixedPath : `/${prefixedPath}`).replace(/\/{2,}/g, "/");
|
|
81
|
-
if (normalizedPath.split("/").includes("..")) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
return normalizedPath;
|
|
85
|
-
}
|
|
86
|
-
function isHostedChildCreateFileAlreadyExistsResultAtDepth(result, depth) {
|
|
87
|
-
if (depth > MAX_NESTED_TOOL_RESULT_DEPTH || !isRecord(result)) {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
if (typeof result.message === "string" && CREATE_FILE_ALREADY_EXISTS_PATTERN.test(result.message)) {
|
|
91
|
-
return true;
|
|
92
|
-
}
|
|
93
|
-
if (result.output !== undefined &&
|
|
94
|
-
isHostedChildCreateFileAlreadyExistsResultAtDepth(result.output, depth + 1)) {
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
return hasAlreadyExistsContentPart(result.content);
|
|
98
|
-
}
|
|
99
|
-
function hasAlreadyExistsContentPart(content) {
|
|
100
|
-
if (!Array.isArray(content)) {
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
return content.some((part) => {
|
|
104
|
-
if (!isRecord(part)) {
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
return typeof part.text === "string" && CREATE_FILE_ALREADY_EXISTS_PATTERN.test(part.text);
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
function isErrorToolOutput(output) {
|
|
111
|
-
if (!isRecord(output)) {
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
if (output.isError === true) {
|
|
115
|
-
return true;
|
|
116
|
-
}
|
|
117
|
-
return typeof output.error === "string" && TOOL_ERROR_VALUES.has(output.error);
|
|
118
|
-
}
|
|
119
|
-
function isRecord(value) {
|
|
120
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
121
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { type ConversationRunProjection } from "./durable.js";
|
|
2
|
-
import { type HostedChildRunIdentifiers } from "./hosted-child-status.js";
|
|
3
|
-
export interface HostedChildConversationBodyInput {
|
|
4
|
-
ensureProjectId?: string | null;
|
|
5
|
-
parentConversationId: string;
|
|
6
|
-
parentRunId: string;
|
|
7
|
-
parentMessageId: string;
|
|
8
|
-
spawnedFromToolCallId: string;
|
|
9
|
-
description: string;
|
|
10
|
-
}
|
|
11
|
-
export interface BootstrapHostedChildRunInput extends HostedChildConversationBodyInput {
|
|
12
|
-
authToken: string;
|
|
13
|
-
apiUrl: string;
|
|
14
|
-
runProjectId?: string | null;
|
|
15
|
-
prompt: string;
|
|
16
|
-
runId?: string;
|
|
17
|
-
agentId: string;
|
|
18
|
-
implementationKind?: string | null;
|
|
19
|
-
branchId?: string | null;
|
|
20
|
-
}
|
|
21
|
-
export interface BootstrapHostedChildRunResult extends HostedChildRunIdentifiers {
|
|
22
|
-
status: ConversationRunProjection["status"];
|
|
23
|
-
}
|
|
24
|
-
export declare function buildHostedChildConversationBody(input: HostedChildConversationBodyInput): {
|
|
25
|
-
type: "project_agent";
|
|
26
|
-
title: string;
|
|
27
|
-
metadata: {
|
|
28
|
-
hiddenFromChatList: boolean;
|
|
29
|
-
projectAgentChildRun: {
|
|
30
|
-
parentConversationId: string;
|
|
31
|
-
parentRunId: string;
|
|
32
|
-
spawnedFromMessageId: string;
|
|
33
|
-
spawnedFromToolCallId: string;
|
|
34
|
-
description: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
project_id?: string | undefined;
|
|
38
|
-
};
|
|
39
|
-
export declare function bootstrapHostedChildRun(input: BootstrapHostedChildRunInput): Promise<BootstrapHostedChildRunResult>;
|
|
40
|
-
//# sourceMappingURL=hosted-child-bootstrap.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-child-bootstrap.d.ts","sourceRoot":"","sources":["../../../src/src/agent/hosted-child-bootstrap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE1E,MAAM,WAAW,gCAAgC;IAC/C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,4BAA6B,SAAQ,gCAAgC;IACpF,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,6BAA8B,SAAQ,yBAAyB;IAC9E,MAAM,EAAE,yBAAyB,CAAC,QAAQ,CAAC,CAAC;CAC7C;AAED,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,gCAAgC;;;;;;;;;;;;;;EAgBvF;AAED,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,4BAA4B,GAClC,OAAO,CAAC,6BAA6B,CAAC,CA0BxC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { bootstrapConversationAgentRun } from "./conversation-bootstrap.js";
|
|
2
|
-
export function buildHostedChildConversationBody(input) {
|
|
3
|
-
return {
|
|
4
|
-
...(input.ensureProjectId ? { project_id: input.ensureProjectId } : {}),
|
|
5
|
-
type: "project_agent",
|
|
6
|
-
title: input.description,
|
|
7
|
-
metadata: {
|
|
8
|
-
hiddenFromChatList: true,
|
|
9
|
-
projectAgentChildRun: {
|
|
10
|
-
parentConversationId: input.parentConversationId,
|
|
11
|
-
parentRunId: input.parentRunId,
|
|
12
|
-
spawnedFromMessageId: input.parentMessageId,
|
|
13
|
-
spawnedFromToolCallId: input.spawnedFromToolCallId,
|
|
14
|
-
description: input.description,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export async function bootstrapHostedChildRun(input) {
|
|
20
|
-
const result = await bootstrapConversationAgentRun({
|
|
21
|
-
authToken: input.authToken,
|
|
22
|
-
apiUrl: input.apiUrl,
|
|
23
|
-
parentConversationId: input.parentConversationId,
|
|
24
|
-
ensureProjectId: input.ensureProjectId ?? undefined,
|
|
25
|
-
conversationBody: buildHostedChildConversationBody(input),
|
|
26
|
-
handoffMessageBody: {
|
|
27
|
-
role: "user",
|
|
28
|
-
parts: [{ type: "text", text: input.prompt }],
|
|
29
|
-
},
|
|
30
|
-
runId: input.runId,
|
|
31
|
-
agentId: input.agentId,
|
|
32
|
-
implementationKind: input.implementationKind,
|
|
33
|
-
projectId: input.runProjectId ?? null,
|
|
34
|
-
branchId: input.branchId,
|
|
35
|
-
});
|
|
36
|
-
return {
|
|
37
|
-
childConversationId: result.conversation.id,
|
|
38
|
-
childRunId: result.run.runId,
|
|
39
|
-
childMessageId: result.run.messageId,
|
|
40
|
-
latestEventId: result.run.latestEventId,
|
|
41
|
-
latestExternalEventSequence: result.run.latestExternalEventSequence,
|
|
42
|
-
status: result.run.status,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export type HostedChildExecutionLogLevel = "error" | "info" | "warn";
|
|
2
|
-
export interface HostedChildExecutionLogEntry {
|
|
3
|
-
level: HostedChildExecutionLogLevel;
|
|
4
|
-
message: string;
|
|
5
|
-
context: Record<string, unknown>;
|
|
6
|
-
}
|
|
7
|
-
export interface HostedChildExecutionLogWriter {
|
|
8
|
-
error: (message: string, context: Record<string, unknown>) => void;
|
|
9
|
-
info: (message: string, context: Record<string, unknown>) => void;
|
|
10
|
-
warn: (message: string, context: Record<string, unknown>) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare function writeHostedChildExecutionLogEntry(entry: HostedChildExecutionLogEntry, writer: HostedChildExecutionLogWriter): void;
|
|
13
|
-
export declare function createHostedChildExecutionLogWriter(writer: HostedChildExecutionLogWriter): (entry: HostedChildExecutionLogEntry) => void;
|
|
14
|
-
export declare function buildHostedChildExhaustedStepBudgetLog(input: {
|
|
15
|
-
description: string;
|
|
16
|
-
kind: string;
|
|
17
|
-
stepCount: number;
|
|
18
|
-
maxSteps: number;
|
|
19
|
-
toolCallsLength: number;
|
|
20
|
-
}): HostedChildExecutionLogEntry;
|
|
21
|
-
export declare function buildHostedChildCompletedLog(input: {
|
|
22
|
-
description: string;
|
|
23
|
-
kind: string;
|
|
24
|
-
toolCallsLength: number;
|
|
25
|
-
finalText: string;
|
|
26
|
-
}): HostedChildExecutionLogEntry;
|
|
27
|
-
export declare function buildHostedChildErrorLog(input: {
|
|
28
|
-
description: string;
|
|
29
|
-
kind: string;
|
|
30
|
-
error: unknown;
|
|
31
|
-
finalText: string;
|
|
32
|
-
toolCallsLength: number;
|
|
33
|
-
toolResultsLength: number;
|
|
34
|
-
}): HostedChildExecutionLogEntry;
|
|
35
|
-
//# sourceMappingURL=hosted-child-execution-logging.d.ts.map
|