veryfront 0.1.1237 → 0.1.1239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/cli/auth/login.d.ts +24 -2
- package/esm/cli/auth/login.d.ts.map +1 -1
- package/esm/cli/auth/login.js +444 -35
- package/esm/cli/commands/build/error-handler.d.ts.map +1 -1
- package/esm/cli/commands/build/error-handler.js +41 -3
- package/esm/cli/commands/build/handler.d.ts.map +1 -1
- package/esm/cli/commands/build/handler.js +1 -1
- package/esm/cli/commands/dev/command.d.ts.map +1 -1
- package/esm/cli/commands/dev/command.js +14 -1
- package/esm/cli/commands/dev/inference-status.d.ts +6 -0
- package/esm/cli/commands/dev/inference-status.d.ts.map +1 -1
- package/esm/cli/commands/dev/inference-status.js +14 -2
- package/esm/cli/commands/generate/command.d.ts.map +1 -1
- package/esm/cli/commands/generate/command.js +61 -0
- package/esm/cli/commands/init/init-command.d.ts.map +1 -1
- package/esm/cli/commands/init/init-command.js +23 -31
- package/esm/cli/commands/install/registry.d.ts.map +1 -1
- package/esm/cli/commands/install/registry.js +6 -9
- package/esm/cli/commands/login/command-help.d.ts.map +1 -1
- package/esm/cli/commands/login/command-help.js +3 -1
- package/esm/cli/commands/pull/command.d.ts +1 -0
- package/esm/cli/commands/pull/command.d.ts.map +1 -1
- package/esm/cli/commands/pull/command.js +49 -6
- package/esm/cli/commands/push/command-help.d.ts.map +1 -1
- package/esm/cli/commands/push/command-help.js +7 -0
- package/esm/cli/commands/push/command.d.ts +23 -12
- package/esm/cli/commands/push/command.d.ts.map +1 -1
- package/esm/cli/commands/push/command.js +461 -44
- package/esm/cli/commands/push/plan.d.ts +35 -0
- package/esm/cli/commands/push/plan.d.ts.map +1 -0
- package/esm/cli/commands/push/plan.js +96 -0
- package/esm/cli/commands/schedule/handler.d.ts +21 -2
- package/esm/cli/commands/schedule/handler.d.ts.map +1 -1
- package/esm/cli/commands/schedule/handler.js +74 -27
- package/esm/cli/commands/schema/command-help.js +1 -1
- package/esm/cli/commands/up/command.js +1 -1
- package/esm/cli/commands/webhook/handler.d.ts.map +1 -1
- package/esm/cli/commands/webhook/handler.js +3 -1
- package/esm/cli/router.d.ts.map +1 -1
- package/esm/cli/router.js +27 -5
- package/esm/cli/shared/args.d.ts +15 -1
- package/esm/cli/shared/args.d.ts.map +1 -1
- package/esm/cli/shared/args.js +56 -3
- package/esm/cli/shared/config.d.ts +11 -2
- package/esm/cli/shared/config.d.ts.map +1 -1
- package/esm/cli/shared/config.js +72 -27
- package/esm/cli/shared/project-creation.js +1 -1
- package/esm/cli/sync/state.d.ts +20 -0
- package/esm/cli/sync/state.d.ts.map +1 -0
- package/esm/cli/sync/state.js +193 -0
- package/esm/deno.js +2 -2
- package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.d.ts.map +1 -1
- package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.js +852 -21
- package/esm/extensions/ext-observability-sentry/src/policy.d.ts +2 -0
- package/esm/extensions/ext-observability-sentry/src/policy.d.ts.map +1 -1
- package/esm/extensions/ext-observability-sentry/src/policy.js +214 -3
- package/esm/src/agent/conversation/delegation-policy.d.ts +2 -0
- package/esm/src/agent/conversation/delegation-policy.d.ts.map +1 -1
- package/esm/src/agent/conversation/delegation-policy.js +13 -3
- package/esm/src/agent/conversation/hosted-terminal.d.ts.map +1 -1
- package/esm/src/agent/conversation/hosted-terminal.js +6 -2
- package/esm/src/agent/conversation/run-chunk-mirror.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-chunk-mirror.js +14 -2
- package/esm/src/agent/factory.d.ts.map +1 -1
- package/esm/src/agent/factory.js +22 -11
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts +2 -0
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.js +6 -1
- package/esm/src/agent/hosted/child-fork-execution-runner.d.ts +2 -1
- package/esm/src/agent/hosted/child-fork-execution-runner.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-execution-runner.js +6 -3
- package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts +12 -3
- package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-step-message-preparation.js +16 -3
- package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts +1 -1
- package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-agent-chat-execution.js +3 -3
- package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts +11 -0
- package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-agent-child-tools.js +2 -3
- package/esm/src/agent/hosted/cloud-agent-config.d.ts +1 -0
- package/esm/src/agent/hosted/cloud-agent-config.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts +16 -1
- package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-runtime-system-messages.js +13 -3
- package/esm/src/agent/hosted/default-chat-runtime.d.ts +2 -1
- package/esm/src/agent/hosted/default-chat-runtime.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-chat-runtime.js +18 -7
- package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts +2 -1
- package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-invoke-agent-tool.js +11 -3
- package/esm/src/agent/hosted/default-project-steering-refresh.d.ts +2 -1
- package/esm/src/agent/hosted/default-project-steering-refresh.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-project-steering-refresh.js +4 -1
- package/esm/src/agent/hosted/runtime-state-resolver.d.ts +6 -4
- package/esm/src/agent/hosted/runtime-state-resolver.d.ts.map +1 -1
- package/esm/src/agent/hosted/runtime-state-resolver.js +8 -11
- package/esm/src/agent/index.d.ts +3 -3
- package/esm/src/agent/index.d.ts.map +1 -1
- package/esm/src/agent/project/agent-runtime.d.ts.map +1 -1
- package/esm/src/agent/project/agent-runtime.js +6 -3
- package/esm/src/agent/runtime/agent-definition.d.ts +68 -66
- package/esm/src/agent/runtime/agent-definition.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-definition.js +15 -2
- package/esm/src/agent/runtime/agent-invocation-contract.d.ts +2 -0
- package/esm/src/agent/runtime/agent-invocation-contract.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-markdown-adapter.js +1 -1
- package/esm/src/agent/runtime/agent-runtime-step.d.ts +11 -5
- package/esm/src/agent/runtime/agent-runtime-step.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-runtime-step.js +23 -6
- package/esm/src/agent/runtime/call-context.d.ts +42 -11
- package/esm/src/agent/runtime/call-context.d.ts.map +1 -1
- package/esm/src/agent/runtime/call-context.js +480 -42
- package/esm/src/agent/runtime/chat-stream-handler.d.ts +18 -0
- package/esm/src/agent/runtime/chat-stream-handler.d.ts.map +1 -1
- package/esm/src/agent/runtime/chat-stream-handler.js +38 -18
- package/esm/src/agent/runtime/effective-agent-system.d.ts +13 -4
- package/esm/src/agent/runtime/effective-agent-system.d.ts.map +1 -1
- package/esm/src/agent/runtime/effective-agent-system.js +29 -0
- package/esm/src/agent/runtime/index.d.ts +1 -0
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +638 -53
- package/esm/src/agent/runtime/load-skill-tool.d.ts +33 -3
- package/esm/src/agent/runtime/load-skill-tool.d.ts.map +1 -1
- package/esm/src/agent/runtime/load-skill-tool.js +152 -21
- package/esm/src/agent/runtime/model-resolution.d.ts +3 -0
- package/esm/src/agent/runtime/model-resolution.d.ts.map +1 -1
- package/esm/src/agent/runtime/model-resolution.js +14 -0
- package/esm/src/agent/runtime/model-transport.d.ts +1 -0
- package/esm/src/agent/runtime/model-transport.d.ts.map +1 -1
- package/esm/src/agent/runtime/model-transport.js +5 -2
- package/esm/src/agent/runtime/run-runtime-context.d.ts +4 -0
- package/esm/src/agent/runtime/run-runtime-context.d.ts.map +1 -1
- package/esm/src/agent/runtime/run-runtime-context.js +9 -3
- package/esm/src/agent/runtime/runtime-tool-config.d.ts +1 -0
- package/esm/src/agent/runtime/runtime-tool-config.d.ts.map +1 -1
- package/esm/src/agent/runtime/skill-prompt.d.ts +3 -0
- package/esm/src/agent/runtime/skill-prompt.d.ts.map +1 -1
- package/esm/src/agent/runtime/skill-prompt.js +113 -25
- package/esm/src/agent/runtime/streamed-assistant-message.d.ts +22 -2
- package/esm/src/agent/runtime/streamed-assistant-message.d.ts.map +1 -1
- package/esm/src/agent/runtime/streamed-assistant-message.js +26 -5
- package/esm/src/agent/runtime/tool-inventory.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-inventory.js +13 -9
- package/esm/src/agent/runtime/tool-result-continuation.d.ts +4 -2
- package/esm/src/agent/runtime/tool-result-continuation.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-result-continuation.js +24 -20
- package/esm/src/agent/schemas/agent.schema.d.ts +2 -2
- package/esm/src/agent/service/runtime.js +1 -1
- package/esm/src/agent/streaming/fork-runtime-stream.d.ts +5 -4
- package/esm/src/agent/streaming/fork-runtime-stream.d.ts.map +1 -1
- package/esm/src/agent/types.d.ts +14 -1
- package/esm/src/agent/types.d.ts.map +1 -1
- package/esm/src/chat/chat-ui-message-helpers.d.ts.map +1 -1
- package/esm/src/chat/chat-ui-message-helpers.js +75 -16
- package/esm/src/config/loader.d.ts.map +1 -1
- package/esm/src/config/loader.js +37 -1
- package/esm/src/errors/catalog/build-errors.d.ts.map +1 -1
- package/esm/src/errors/catalog/build-errors.js +14 -0
- package/esm/src/errors/error-registry/build.d.ts +2 -0
- package/esm/src/errors/error-registry/build.d.ts.map +1 -1
- package/esm/src/errors/error-registry/build.js +8 -0
- package/esm/src/errors/error-registry/deploy.d.ts +4 -0
- package/esm/src/errors/error-registry/deploy.d.ts.map +1 -1
- package/esm/src/errors/error-registry/deploy.js +16 -0
- package/esm/src/errors/error-registry.d.ts +3 -0
- package/esm/src/errors/error-registry.d.ts.map +1 -1
- package/esm/src/errors/index.d.ts +2 -1
- package/esm/src/errors/index.d.ts.map +1 -1
- package/esm/src/errors/index.js +4 -3
- package/esm/src/errors/tenant-classification.d.ts +25 -0
- package/esm/src/errors/tenant-classification.d.ts.map +1 -0
- package/esm/src/errors/tenant-classification.js +61 -0
- package/esm/src/extensions/builtin-extensions.d.ts +10 -15
- package/esm/src/extensions/builtin-extensions.d.ts.map +1 -1
- package/esm/src/extensions/builtin-extensions.js +32 -26
- package/esm/src/extensions/deferred-extension.d.ts +4 -4
- package/esm/src/extensions/deferred-extension.js +4 -4
- package/esm/src/extensions/index.d.ts +1 -0
- package/esm/src/extensions/index.d.ts.map +1 -1
- package/esm/src/extensions/index.js +1 -0
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
- package/esm/src/integrations/_data.d.ts.map +1 -1
- package/esm/src/integrations/_data.js +6 -0
- package/esm/src/integrations/schema.d.ts +8 -0
- package/esm/src/integrations/schema.d.ts.map +1 -1
- package/esm/src/integrations/schema.js +3 -0
- package/esm/src/integrations/types.d.ts +2 -0
- package/esm/src/integrations/types.d.ts.map +1 -1
- package/esm/src/internal-agents/run-stream.d.ts.map +1 -1
- package/esm/src/internal-agents/run-stream.js +35 -20
- package/esm/src/internal-agents/run-system-prompt.d.ts +7 -2
- package/esm/src/internal-agents/run-system-prompt.d.ts.map +1 -1
- package/esm/src/internal-agents/run-system-prompt.js +19 -13
- package/esm/src/internal-agents/schema.d.ts +2 -0
- package/esm/src/internal-agents/schema.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.js +2 -18
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts +11 -0
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.js +53 -6
- package/esm/src/observability/application-error-contract.d.ts +4 -0
- package/esm/src/observability/application-error-contract.d.ts.map +1 -1
- package/esm/src/observability/application-errors.d.ts.map +1 -1
- package/esm/src/observability/application-errors.js +64 -3
- package/esm/src/platform/adapters/runtime/deno/http-server.d.ts.map +1 -1
- package/esm/src/platform/adapters/runtime/deno/http-server.js +2 -10
- package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts +14 -0
- package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts.map +1 -1
- package/esm/src/platform/adapters/runtime/shared/request-peer.js +82 -0
- package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
- package/esm/src/provider/runtime-loader/provider-http.d.ts +5 -1
- package/esm/src/provider/runtime-loader/provider-http.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/provider-http.js +55 -17
- package/esm/src/provider/shared/index.d.ts +1 -0
- package/esm/src/provider/shared/index.d.ts.map +1 -1
- package/esm/src/provider/shared/index.js +2 -0
- package/esm/src/provider/types.d.ts +1 -0
- package/esm/src/provider/types.d.ts.map +1 -1
- package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/combobox.js +204 -0
- package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/dialog.js +20 -0
- package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/drawer.js +21 -0
- package/esm/src/react/components/ui/adapter/builtin/index.d.ts.map +1 -1
- package/esm/src/react/components/ui/adapter/builtin/index.js +10 -0
- package/esm/src/react/components/ui/adapter/builtin/popover.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/popover.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/popover.js +28 -0
- package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/tabs.js +73 -0
- package/esm/src/react/components/ui/adapter/context.d.ts.map +1 -1
- package/esm/src/react/components/ui/adapter/context.js +10 -0
- package/esm/src/react/components/ui/adapter/contract.d.ts +212 -0
- package/esm/src/react/components/ui/adapter/contract.d.ts.map +1 -1
- package/esm/src/react/components/ui/adapter/token-scope.d.ts +24 -0
- package/esm/src/react/components/ui/adapter/token-scope.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/token-scope.js +26 -0
- package/esm/src/react/components/ui/alert-dialog.d.ts +101 -0
- package/esm/src/react/components/ui/alert-dialog.d.ts.map +1 -0
- package/esm/src/react/components/ui/alert-dialog.js +181 -0
- package/esm/src/react/components/ui/aspect-ratio.d.ts +18 -0
- package/esm/src/react/components/ui/aspect-ratio.d.ts.map +1 -0
- package/esm/src/react/components/ui/aspect-ratio.js +13 -0
- package/esm/src/react/components/ui/autocomplete.d.ts +67 -0
- package/esm/src/react/components/ui/autocomplete.d.ts.map +1 -0
- package/esm/src/react/components/ui/autocomplete.js +59 -0
- package/esm/src/react/components/ui/breadcrumb.d.ts +86 -0
- package/esm/src/react/components/ui/breadcrumb.d.ts.map +1 -0
- package/esm/src/react/components/ui/breadcrumb.js +67 -0
- package/esm/src/react/components/ui/calendar.d.ts +40 -0
- package/esm/src/react/components/ui/calendar.d.ts.map +1 -0
- package/esm/src/react/components/ui/calendar.js +170 -0
- package/esm/src/react/components/ui/combobox.d.ts +74 -0
- package/esm/src/react/components/ui/combobox.d.ts.map +1 -0
- package/esm/src/react/components/ui/combobox.js +100 -0
- package/esm/src/react/components/ui/context-menu.d.ts +116 -0
- package/esm/src/react/components/ui/context-menu.d.ts.map +1 -0
- package/esm/src/react/components/ui/context-menu.js +168 -0
- package/esm/src/react/components/ui/date-picker.d.ts +69 -0
- package/esm/src/react/components/ui/date-picker.d.ts.map +1 -0
- package/esm/src/react/components/ui/date-picker.js +96 -0
- package/esm/src/react/components/ui/dialog.d.ts +41 -11
- package/esm/src/react/components/ui/dialog.d.ts.map +1 -1
- package/esm/src/react/components/ui/dialog.js +47 -28
- package/esm/src/react/components/ui/drawer.d.ts +31 -8
- package/esm/src/react/components/ui/drawer.d.ts.map +1 -1
- package/esm/src/react/components/ui/drawer.js +33 -22
- package/esm/src/react/components/ui/dropdown-menu.d.ts.map +1 -1
- package/esm/src/react/components/ui/dropdown-menu.js +7 -75
- package/esm/src/react/components/ui/field.d.ts +70 -0
- package/esm/src/react/components/ui/field.d.ts.map +1 -0
- package/esm/src/react/components/ui/field.js +161 -0
- package/esm/src/react/components/ui/file-type.d.ts +9 -8
- package/esm/src/react/components/ui/file-type.d.ts.map +1 -1
- package/esm/src/react/components/ui/file-type.js +8 -8
- package/esm/src/react/components/ui/hover-card.d.ts +82 -0
- package/esm/src/react/components/ui/hover-card.d.ts.map +1 -0
- package/esm/src/react/components/ui/hover-card.js +140 -0
- package/esm/src/react/components/ui/index.d.ts +23 -2
- package/esm/src/react/components/ui/index.d.ts.map +1 -1
- package/esm/src/react/components/ui/index.js +21 -0
- package/esm/src/react/components/ui/input-otp.d.ts +37 -0
- package/esm/src/react/components/ui/input-otp.d.ts.map +1 -0
- package/esm/src/react/components/ui/input-otp.js +42 -0
- package/esm/src/react/components/ui/menu-keyboard.d.ts +8 -0
- package/esm/src/react/components/ui/menu-keyboard.d.ts.map +1 -0
- package/esm/src/react/components/ui/menu-keyboard.js +76 -0
- package/esm/src/react/components/ui/menubar.d.ts +98 -0
- package/esm/src/react/components/ui/menubar.d.ts.map +1 -0
- package/esm/src/react/components/ui/menubar.js +173 -0
- package/esm/src/react/components/ui/meter.d.ts +45 -0
- package/esm/src/react/components/ui/meter.d.ts.map +1 -0
- package/esm/src/react/components/ui/meter.js +59 -0
- package/esm/src/react/components/ui/modal-surface.d.ts +7 -1
- package/esm/src/react/components/ui/modal-surface.d.ts.map +1 -1
- package/esm/src/react/components/ui/modal-surface.js +23 -6
- package/esm/src/react/components/ui/navigation-menu.d.ts +101 -0
- package/esm/src/react/components/ui/navigation-menu.d.ts.map +1 -0
- package/esm/src/react/components/ui/navigation-menu.js +195 -0
- package/esm/src/react/components/ui/number-field.d.ts +46 -0
- package/esm/src/react/components/ui/number-field.d.ts.map +1 -0
- package/esm/src/react/components/ui/number-field.js +121 -0
- package/esm/src/react/components/ui/pagination.d.ts +77 -0
- package/esm/src/react/components/ui/pagination.d.ts.map +1 -0
- package/esm/src/react/components/ui/pagination.js +62 -0
- package/esm/src/react/components/ui/popover.d.ts +42 -13
- package/esm/src/react/components/ui/popover.d.ts.map +1 -1
- package/esm/src/react/components/ui/popover.js +25 -12
- package/esm/src/react/components/ui/scroll-area.d.ts +38 -0
- package/esm/src/react/components/ui/scroll-area.d.ts.map +1 -0
- package/esm/src/react/components/ui/scroll-area.js +35 -0
- package/esm/src/react/components/ui/separator.d.ts +20 -0
- package/esm/src/react/components/ui/separator.d.ts.map +1 -0
- package/esm/src/react/components/ui/separator.js +13 -0
- package/esm/src/react/components/ui/slider.d.ts +44 -0
- package/esm/src/react/components/ui/slider.d.ts.map +1 -0
- package/esm/src/react/components/ui/slider.js +46 -0
- package/esm/src/react/components/ui/status.d.ts +6 -5
- package/esm/src/react/components/ui/status.d.ts.map +1 -1
- package/esm/src/react/components/ui/status.js +4 -4
- package/esm/src/react/components/ui/tabs.d.ts +32 -9
- package/esm/src/react/components/ui/tabs.d.ts.map +1 -1
- package/esm/src/react/components/ui/tabs.js +46 -22
- package/esm/src/react/components/ui/toggle.d.ts +26 -0
- package/esm/src/react/components/ui/toggle.d.ts.map +1 -0
- package/esm/src/react/components/ui/toggle.js +29 -0
- package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts +2 -1
- package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts.map +1 -1
- package/esm/src/react/components/ui/use-isomorphic-layout-effect.js +6 -3
- package/esm/src/rendering/chunk-optimizer/source-imports.d.ts.map +1 -1
- package/esm/src/rendering/chunk-optimizer/source-imports.js +4 -114
- package/esm/src/rendering/orchestrator/css-candidate-manifest.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/css-candidate-manifest.js +30 -1
- package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts +10 -0
- package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/build-failure.js +50 -3
- package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts +2 -0
- package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.js +21 -6
- package/esm/src/rendering/orchestrator/module-loader/index.d.ts +2 -1
- package/esm/src/rendering/orchestrator/module-loader/index.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/index.js +190 -7
- package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts +4 -0
- package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/module-persistence.js +374 -7
- package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/pipeline.js +12 -1
- package/esm/src/runs/runs-client.d.ts +2 -4
- package/esm/src/runs/runs-client.d.ts.map +1 -1
- package/esm/src/runs/schemas.d.ts +18 -8
- package/esm/src/runs/schemas.d.ts.map +1 -1
- package/esm/src/runs/schemas.js +26 -0
- package/esm/src/runtime/model-call-context.d.ts +6 -1
- package/esm/src/runtime/model-call-context.d.ts.map +1 -1
- package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
- package/esm/src/runtime/runtime-bridge.js +133 -15
- package/esm/src/schedule/factory.d.ts +8 -2
- package/esm/src/schedule/factory.d.ts.map +1 -1
- package/esm/src/schedule/factory.js +0 -8
- package/esm/src/schedule/index.d.ts +10 -1
- package/esm/src/schedule/index.d.ts.map +1 -1
- package/esm/src/schedule/index.js +9 -0
- package/esm/src/schedule/types.d.ts +30 -11
- package/esm/src/schedule/types.d.ts.map +1 -1
- package/esm/src/schedule/validation.d.ts +17 -0
- package/esm/src/schedule/validation.d.ts.map +1 -1
- package/esm/src/schedule/validation.js +93 -5
- package/esm/src/security/sandbox/worker-pool.d.ts.map +1 -1
- package/esm/src/security/sandbox/worker-pool.js +6 -1
- package/esm/src/server/bootstrap.d.ts.map +1 -1
- package/esm/src/server/bootstrap.js +6 -0
- package/esm/src/server/dev-server/index.d.ts +1 -1
- package/esm/src/server/dev-server/index.d.ts.map +1 -1
- package/esm/src/server/dev-server/server.d.ts +7 -3
- package/esm/src/server/dev-server/server.d.ts.map +1 -1
- package/esm/src/server/dev-server/server.js +12 -3
- package/esm/src/server/dev-server/types.d.ts +7 -1
- package/esm/src/server/dev-server/types.d.ts.map +1 -1
- package/esm/src/server/dev-server.d.ts +1 -1
- package/esm/src/server/dev-server.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +2509 -34
- package/esm/src/server/handlers/dev/projects/index.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/projects/index.js +3 -0
- package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/agent-stream.handler.js +29 -24
- package/esm/src/server/index.d.ts +3 -3
- package/esm/src/server/index.d.ts.map +1 -1
- package/esm/src/server/index.js +10 -5
- package/esm/src/server/node-handler.d.ts.map +1 -1
- package/esm/src/server/node-handler.js +4 -1
- package/esm/src/server/production-server.d.ts.map +1 -1
- package/esm/src/server/production-server.js +2 -1
- package/esm/src/server/project-env/cache.d.ts +17 -0
- package/esm/src/server/project-env/cache.d.ts.map +1 -1
- package/esm/src/server/project-env/cache.js +78 -2
- package/esm/src/server/project-env/fetcher.d.ts.map +1 -1
- package/esm/src/server/project-env/fetcher.js +24 -14
- package/esm/src/server/project-env/index.d.ts +1 -1
- package/esm/src/server/project-env/index.d.ts.map +1 -1
- package/esm/src/server/project-env/index.js +1 -1
- package/esm/src/server/project-env/internal-authorization.d.ts +7 -0
- package/esm/src/server/project-env/internal-authorization.d.ts.map +1 -0
- package/esm/src/server/project-env/internal-authorization.js +32 -0
- package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/index.js +1 -1
- package/esm/src/server/runtime-handler/projects-handler.d.ts +1 -1
- package/esm/src/server/runtime-handler/projects-handler.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/projects-handler.js +4 -2
- package/esm/src/transforms/esm/http-bundler.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-bundler.js +6 -5
- package/esm/src/transforms/esm/http-cache-helpers.d.ts +11 -0
- package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-helpers.js +35 -0
- package/esm/src/transforms/esm/http-cache.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache.js +16 -10
- package/esm/src/transforms/esm/specifier-resolver.d.ts.map +1 -1
- package/esm/src/transforms/esm/specifier-resolver.js +87 -7
- package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts +2 -0
- package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/strategies/alias-strategy.js +11 -6
- package/esm/src/transforms/md/compiler/md-compiler.d.ts.map +1 -1
- package/esm/src/transforms/md/compiler/md-compiler.js +12 -5
- package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts +2 -0
- package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts.map +1 -1
- package/esm/src/transforms/mdx/compiler/frontmatter-extractor.js +33 -1
- package/esm/src/transforms/mdx/compiler/mdx-compiler.d.ts.map +1 -1
- package/esm/src/transforms/mdx/compiler/mdx-compiler.js +46 -7
- package/esm/src/transforms/mdx/esm-module-loader/cache/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/cache/index.js +8 -2
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts +1 -0
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.js +3 -0
- package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts +4 -0
- package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.js +44 -8
- package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts +2 -0
- package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/missing-module.js +4 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.js +5 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts +2 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.js +50 -11
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts +24 -12
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.js +201 -18
- package/esm/src/transforms/mdx/esm-module-loader/types.d.ts +5 -0
- package/esm/src/transforms/mdx/esm-module-loader/types.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts +22 -2
- package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.js +2080 -129
- package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts +11 -1
- package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.js +32 -15
- package/esm/src/transforms/pipeline/stages/compile.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/compile.js +44 -0
- package/esm/src/transforms/shared/specifier-suffix.d.ts +25 -0
- package/esm/src/transforms/shared/specifier-suffix.d.ts.map +1 -0
- package/esm/src/transforms/shared/specifier-suffix.js +43 -0
- package/esm/src/trigger/index.d.ts +2 -2
- package/esm/src/trigger/index.d.ts.map +1 -1
- package/esm/src/trigger/index.js +1 -1
- package/esm/src/trigger/local-runner.d.ts +2 -2
- package/esm/src/trigger/local-runner.d.ts.map +1 -1
- package/esm/src/trigger/local-runner.js +11 -4
- package/esm/src/trigger/target.d.ts +97 -5
- package/esm/src/trigger/target.d.ts.map +1 -1
- package/esm/src/trigger/target.js +175 -5
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/webhook/types.d.ts +21 -6
- package/esm/src/webhook/types.d.ts.map +1 -1
- package/esm/src/webhook/validation.d.ts.map +1 -1
- package/esm/src/webhook/validation.js +27 -39
- package/esm/templates/index.d.ts +1 -1
- package/esm/templates/index.d.ts.map +1 -1
- package/esm/templates/loader.d.ts +6 -6
- package/esm/templates/loader.d.ts.map +1 -1
- package/esm/templates/loader.js +34 -18
- package/esm/templates/manifest.generated.d.ts +3 -0
- package/esm/templates/manifest.generated.d.ts.map +1 -0
- package/esm/templates/manifest.generated.js +2 -0
- package/package.json +8 -8
- package/esm/templates/manifest.d.ts +0 -664
- package/esm/templates/manifest.d.ts.map +0 -1
- package/esm/templates/manifest.js +0 -662
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Agent Call Context
|
|
3
3
|
*
|
|
4
4
|
* Assembles the complete system-message set for one provider call. Every
|
|
5
|
-
* caller that talks to a model
|
|
6
|
-
* runtime's internal agent runs, and the `agent()` factory
|
|
5
|
+
* caller that talks to a model, the hosted cloud runtime, the project
|
|
6
|
+
* runtime's internal agent runs, and the `agent()` factory, gathers its own
|
|
7
7
|
* inputs and hands them here, so ordering, block tags, marker splitting,
|
|
8
8
|
* deduplication, and skill rendering live in exactly one place.
|
|
9
9
|
*
|
|
@@ -13,27 +13,39 @@
|
|
|
13
13
|
*
|
|
14
14
|
* Layout of the returned messages:
|
|
15
15
|
*
|
|
16
|
-
* 1. One cached system message holding
|
|
17
|
-
* runtime-context marker
|
|
18
|
-
*
|
|
19
|
-
* `<
|
|
20
|
-
*
|
|
16
|
+
* 1. One cached system message holding only the instructions before the
|
|
17
|
+
* runtime-context marker (or all instructions when the marker is absent).
|
|
18
|
+
* 2. One optional uncached system message holding, in order,
|
|
19
|
+
* `<project_instructions>`, `<project_context>`, any caller-supplied extra
|
|
20
|
+
* blocks, `<available_skills>` or an `<authorized_skill_ids>`
|
|
21
|
+
* fallback, `<environment_context>`, and the instructions after the marker.
|
|
21
22
|
*
|
|
22
23
|
* Only the instructions are unconditional: each block appears only when the
|
|
23
24
|
* caller supplied its input and the instructions do not already carry that tag
|
|
24
25
|
* as a complete element, so message 2 can be absent and message 1 can be the
|
|
25
|
-
* instructions alone. Callers compose in layers
|
|
26
|
-
* re-composed by a project-runtime run
|
|
26
|
+
* instructions alone. Callers compose in layers: the factory's output is later
|
|
27
|
+
* re-composed by a project-runtime run, and skipping already-present elements
|
|
27
28
|
* keeps that idempotent instead of repeating a project reference or catalog.
|
|
28
29
|
*
|
|
29
30
|
* @module
|
|
30
31
|
*/
|
|
32
|
+
import { isProxyWithoutHooks } from "../../platform/compat/error-introspection.js";
|
|
31
33
|
import { createRuntimePromptBlock } from "./prompt-block.js";
|
|
32
|
-
import { buildRuntimeAvailableSkillsPromptBlock } from "./skill-prompt.js";
|
|
34
|
+
import { buildRuntimeAuthorizedSkillIdsPromptBlock, buildRuntimeAvailableSkillsPromptBlock, RUNTIME_GENERATED_SKILL_CATALOG_MARKER, } from "./skill-prompt.js";
|
|
35
|
+
import { flattenSystemInstructions } from "./tool-inventory.js";
|
|
36
|
+
import { isOwnDataPropertyDescriptor, readOwnDataProperty } from "./data-property-descriptor.js";
|
|
37
|
+
const ObjectDefineProperty = Object.defineProperty;
|
|
38
|
+
const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
39
|
+
const ObjectGetOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
|
|
40
|
+
const ReflectApply = Reflect.apply;
|
|
41
|
+
const ReflectDeleteProperty = Reflect.deleteProperty;
|
|
42
|
+
const ReflectOwnKeys = Reflect.ownKeys;
|
|
33
43
|
/** Marker authored instructions use to place runtime blocks mid-prompt. */
|
|
34
44
|
export const DEFAULT_RUNTIME_AGENT_CONTEXT_MARKER = "<!-- veryfront-runtime-context -->";
|
|
35
45
|
const ENVIRONMENT_CONTEXT_BLOCK_NAME = "environment_context";
|
|
36
46
|
const AVAILABLE_SKILLS_BLOCK_NAME = "available_skills";
|
|
47
|
+
const AUTHORIZED_SKILL_IDS_BLOCK_NAME = "authorized_skill_ids";
|
|
48
|
+
const AUTHORIZED_SKILL_ID_DISCOVERY_BLOCK_NAME = "authorized_skill_id_discovery";
|
|
37
49
|
/** Builds the shared project-context prompt block (project reference + branch). */
|
|
38
50
|
export function buildProjectContextPromptBlock(input) {
|
|
39
51
|
const branchLine = input.branchId
|
|
@@ -59,11 +71,12 @@ export function buildProjectInstructionsPromptBlock(instructions) {
|
|
|
59
71
|
function splitInstructionsAtMarker(input) {
|
|
60
72
|
const markerIndex = input.instructions.indexOf(input.runtimeContextMarker);
|
|
61
73
|
if (markerIndex < 0) {
|
|
62
|
-
return { before: input.instructions, after: null };
|
|
74
|
+
return { before: input.instructions, after: null, hasMarker: false };
|
|
63
75
|
}
|
|
64
76
|
return {
|
|
65
77
|
before: input.instructions.slice(0, markerIndex).trim(),
|
|
66
78
|
after: input.instructions.slice(markerIndex + input.runtimeContextMarker.length).trim() || null,
|
|
79
|
+
hasMarker: true,
|
|
67
80
|
};
|
|
68
81
|
}
|
|
69
82
|
function getBlockName(block) {
|
|
@@ -82,58 +95,483 @@ function hasBlock(instructions, blockName) {
|
|
|
82
95
|
}
|
|
83
96
|
return instructions.indexOf(`</${blockName}>`, openIndex) > openIndex;
|
|
84
97
|
}
|
|
85
|
-
|
|
98
|
+
function removeCompleteBlocks(instructions, blockName) {
|
|
99
|
+
const openTag = `<${blockName}>`;
|
|
100
|
+
const closeTag = `</${blockName}>`;
|
|
101
|
+
let result = instructions;
|
|
102
|
+
let openIndex = result.indexOf(openTag);
|
|
103
|
+
while (openIndex >= 0) {
|
|
104
|
+
const closeIndex = result.indexOf(closeTag, openIndex + openTag.length);
|
|
105
|
+
if (closeIndex < 0) {
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
const before = result.slice(0, openIndex).trimEnd();
|
|
109
|
+
const after = result.slice(closeIndex + closeTag.length).trimStart();
|
|
110
|
+
result = before.length > 0 && after.length > 0 ? `${before}\n\n${after}` : `${before}${after}`;
|
|
111
|
+
openIndex = result.indexOf(openTag);
|
|
112
|
+
}
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
115
|
+
function removeGeneratedSkillCatalogBlocks(instructions) {
|
|
116
|
+
const openTag = `<${AVAILABLE_SKILLS_BLOCK_NAME}>`;
|
|
117
|
+
const closeTag = `</${AVAILABLE_SKILLS_BLOCK_NAME}>`;
|
|
118
|
+
let result = instructions;
|
|
119
|
+
let searchIndex = 0;
|
|
120
|
+
while (searchIndex < result.length) {
|
|
121
|
+
const openIndex = result.indexOf(openTag, searchIndex);
|
|
122
|
+
if (openIndex < 0) {
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
const closeIndex = result.indexOf(closeTag, openIndex + openTag.length);
|
|
126
|
+
if (closeIndex < 0) {
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
const content = result.slice(openIndex + openTag.length, closeIndex).trimStart();
|
|
130
|
+
if (!content.startsWith(RUNTIME_GENERATED_SKILL_CATALOG_MARKER)) {
|
|
131
|
+
searchIndex = closeIndex + closeTag.length;
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
const before = result.slice(0, openIndex).trimEnd();
|
|
135
|
+
const after = result.slice(closeIndex + closeTag.length).trimStart();
|
|
136
|
+
result = before.length > 0 && after.length > 0 ? `${before}\n\n${after}` : `${before}${after}`;
|
|
137
|
+
searchIndex = 0;
|
|
138
|
+
}
|
|
139
|
+
return result;
|
|
140
|
+
}
|
|
141
|
+
function snapshotOwnEnumerableDataRecord(value, label, options = {}) {
|
|
142
|
+
if (!isRecord(value)) {
|
|
143
|
+
return {};
|
|
144
|
+
}
|
|
145
|
+
if (isProxyWithoutHooks(value)) {
|
|
146
|
+
throw new TypeError(`${label} must not be a Proxy`);
|
|
147
|
+
}
|
|
148
|
+
let descriptors;
|
|
149
|
+
try {
|
|
150
|
+
descriptors = ReflectApply(ObjectGetOwnPropertyDescriptors, undefined, [
|
|
151
|
+
value,
|
|
152
|
+
]);
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
throw new TypeError(`${label} must expose data properties`);
|
|
156
|
+
}
|
|
157
|
+
const snapshot = {};
|
|
158
|
+
const keys = ReflectApply(ReflectOwnKeys, undefined, [descriptors]);
|
|
159
|
+
for (const key of keys) {
|
|
160
|
+
const descriptorEntry = ReflectApply(ObjectGetOwnPropertyDescriptor, undefined, [
|
|
161
|
+
descriptors,
|
|
162
|
+
key,
|
|
163
|
+
]);
|
|
164
|
+
const descriptor = isOwnDataPropertyDescriptor(descriptorEntry)
|
|
165
|
+
? descriptorEntry.value
|
|
166
|
+
: undefined;
|
|
167
|
+
if (!descriptor?.enumerable) {
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
if (!isOwnDataPropertyDescriptor(descriptor)) {
|
|
171
|
+
if (options.ignoreUnsafeDataKeys?.includes(key)) {
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
throw new TypeError(`${label}.${String(key)} must be an own enumerable data property`);
|
|
175
|
+
}
|
|
176
|
+
ReflectApply(ObjectDefineProperty, undefined, [snapshot, key, {
|
|
177
|
+
configurable: true,
|
|
178
|
+
enumerable: true,
|
|
179
|
+
value: descriptor.value,
|
|
180
|
+
writable: true,
|
|
181
|
+
}]);
|
|
182
|
+
}
|
|
183
|
+
return snapshot;
|
|
184
|
+
}
|
|
185
|
+
function prepareStructuredInstructionMessages(input) {
|
|
186
|
+
return input.instructions.flatMap((message, index) => {
|
|
187
|
+
const label = `Structured system message ${index}`;
|
|
188
|
+
const contentValue = readOwnDataProperty(message, "content", label);
|
|
189
|
+
if (typeof contentValue !== "string") {
|
|
190
|
+
throw new TypeError(`${label}.content must be a string data property`);
|
|
191
|
+
}
|
|
192
|
+
const providerOptionsValue = readOwnDataProperty(message, "providerOptions", label, false);
|
|
193
|
+
const providerOptions = isRecord(providerOptionsValue)
|
|
194
|
+
? snapshotOwnEnumerableDataRecord(providerOptionsValue, `${label} providerOptions`)
|
|
195
|
+
: undefined;
|
|
196
|
+
const withoutGeneratedSkillContext = input.removeGeneratedSkillContext
|
|
197
|
+
? removeCompleteBlocks(removeCompleteBlocks(removeGeneratedSkillCatalogBlocks(contentValue), AUTHORIZED_SKILL_IDS_BLOCK_NAME), AUTHORIZED_SKILL_ID_DISCOVERY_BLOCK_NAME)
|
|
198
|
+
: contentValue;
|
|
199
|
+
return withoutGeneratedSkillContext.length > 0
|
|
200
|
+
? [{
|
|
201
|
+
role: "system",
|
|
202
|
+
content: withoutGeneratedSkillContext,
|
|
203
|
+
...(providerOptions ? { providerOptions } : {}),
|
|
204
|
+
}]
|
|
205
|
+
: [];
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function splitStructuredInstructionMessages(messages, runtimeContextMarker) {
|
|
209
|
+
const before = [];
|
|
210
|
+
const after = [];
|
|
211
|
+
let foundMarker = false;
|
|
212
|
+
for (const message of messages) {
|
|
213
|
+
if (foundMarker) {
|
|
214
|
+
after.push(message);
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
const split = splitInstructionsAtMarker({
|
|
218
|
+
instructions: message.content,
|
|
219
|
+
runtimeContextMarker,
|
|
220
|
+
});
|
|
221
|
+
if (!split.hasMarker) {
|
|
222
|
+
before.push(message);
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
foundMarker = true;
|
|
226
|
+
if (split.before.length > 0) {
|
|
227
|
+
before.push({ ...message, content: split.before });
|
|
228
|
+
}
|
|
229
|
+
if (split.after !== null) {
|
|
230
|
+
after.push({ ...message, content: split.after });
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return { before, after, hasMarker: foundMarker };
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Renders the Anthropic `cacheControl` for the static system message. The
|
|
237
|
+
* default (`"5m"`) omits `ttl` to preserve the standard 5-minute ephemeral
|
|
238
|
+
* breakpoint byte-for-byte; `"1h"` requests the 1-hour cache.
|
|
239
|
+
*/
|
|
240
|
+
function buildCacheControl(cacheTtl) {
|
|
241
|
+
return cacheTtl === "1h" ? { type: "ephemeral", ttl: "1h" } : { type: "ephemeral" };
|
|
242
|
+
}
|
|
243
|
+
function isRecord(value) {
|
|
244
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
245
|
+
}
|
|
246
|
+
function isAnthropicCacheProviderKey(key) {
|
|
247
|
+
const normalized = key.toLowerCase();
|
|
248
|
+
return normalized === "bedrock" || normalized === "veryfront-cloud" ||
|
|
249
|
+
normalized.includes("anthropic");
|
|
250
|
+
}
|
|
251
|
+
function getAnthropicCacheProviderAlias(input) {
|
|
252
|
+
const alias = input.anthropicProviderAlias;
|
|
253
|
+
return alias && alias.trim().length > 0 ? alias : "veryfront-cloud";
|
|
254
|
+
}
|
|
255
|
+
function isAnthropicCacheControl(value) {
|
|
256
|
+
if (!isRecord(value) || isProxyWithoutHooks(value)) {
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
try {
|
|
260
|
+
const descriptor = ReflectApply(ObjectGetOwnPropertyDescriptor, undefined, [
|
|
261
|
+
value,
|
|
262
|
+
"type",
|
|
263
|
+
]);
|
|
264
|
+
return descriptor !== undefined && descriptor.enumerable === true &&
|
|
265
|
+
isOwnDataPropertyDescriptor(descriptor) && descriptor.value === "ephemeral";
|
|
266
|
+
}
|
|
267
|
+
catch {
|
|
268
|
+
return false;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
function getStructuredCacheProviderBuckets(providerOptions, anthropicProviderAlias) {
|
|
272
|
+
const buckets = [];
|
|
273
|
+
const keys = ReflectApply(ReflectOwnKeys, undefined, [providerOptions]);
|
|
274
|
+
for (const key of keys) {
|
|
275
|
+
if (key !== "anthropic" && key !== anthropicProviderAlias) {
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
let bucketDescriptor;
|
|
279
|
+
try {
|
|
280
|
+
bucketDescriptor = ReflectApply(ObjectGetOwnPropertyDescriptor, undefined, [
|
|
281
|
+
providerOptions,
|
|
282
|
+
key,
|
|
283
|
+
]);
|
|
284
|
+
}
|
|
285
|
+
catch {
|
|
286
|
+
throw new TypeError(`Structured system message providerOptions.${String(key)} must be inspectable`);
|
|
287
|
+
}
|
|
288
|
+
if (!bucketDescriptor?.enumerable || !isOwnDataPropertyDescriptor(bucketDescriptor)) {
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
const value = bucketDescriptor.value;
|
|
292
|
+
if (!isRecord(value)) {
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
if (isProxyWithoutHooks(value)) {
|
|
296
|
+
throw new TypeError(`Structured system message providerOptions.${String(key)} must not be a Proxy`);
|
|
297
|
+
}
|
|
298
|
+
let descriptor;
|
|
299
|
+
try {
|
|
300
|
+
descriptor = ReflectApply(ObjectGetOwnPropertyDescriptor, undefined, [
|
|
301
|
+
value,
|
|
302
|
+
"cacheControl",
|
|
303
|
+
]);
|
|
304
|
+
}
|
|
305
|
+
catch {
|
|
306
|
+
throw new TypeError(`Structured system message providerOptions.${String(key)}.cacheControl must be inspectable`);
|
|
307
|
+
}
|
|
308
|
+
const cacheControl = descriptor?.enumerable && isOwnDataPropertyDescriptor(descriptor)
|
|
309
|
+
? descriptor.value
|
|
310
|
+
: undefined;
|
|
311
|
+
if (typeof key === "string" && !isAnthropicCacheProviderKey(key) &&
|
|
312
|
+
!isAnthropicCacheControl(cacheControl)) {
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
buckets.push({
|
|
316
|
+
key,
|
|
317
|
+
cacheControl,
|
|
318
|
+
value: snapshotOwnEnumerableDataRecord(value, `Structured system message providerOptions.${String(key)}`, { ignoreUnsafeDataKeys: ["cacheControl"] }),
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
return buckets;
|
|
322
|
+
}
|
|
323
|
+
function removeStructuredCacheControls(messages, anthropicProviderAlias) {
|
|
324
|
+
return messages.map((message) => {
|
|
325
|
+
const providerOptions = snapshotOwnEnumerableDataRecord(message.providerOptions, "Structured system message providerOptions");
|
|
326
|
+
const cacheProviderBuckets = getStructuredCacheProviderBuckets(providerOptions, anthropicProviderAlias);
|
|
327
|
+
if (cacheProviderBuckets.length === 0) {
|
|
328
|
+
return message;
|
|
329
|
+
}
|
|
330
|
+
const nextProviderOptions = { ...providerOptions };
|
|
331
|
+
for (const bucket of cacheProviderBuckets) {
|
|
332
|
+
const nextBucket = { ...bucket.value };
|
|
333
|
+
ReflectApply(ReflectDeleteProperty, undefined, [nextBucket, "cacheControl"]);
|
|
334
|
+
if (ReflectOwnKeys(nextBucket).length > 0) {
|
|
335
|
+
ReflectApply(ObjectDefineProperty, undefined, [nextProviderOptions, bucket.key, {
|
|
336
|
+
configurable: true,
|
|
337
|
+
enumerable: true,
|
|
338
|
+
value: nextBucket,
|
|
339
|
+
writable: true,
|
|
340
|
+
}]);
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
ReflectApply(ReflectDeleteProperty, undefined, [nextProviderOptions, bucket.key]);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return ReflectOwnKeys(nextProviderOptions).length > 0
|
|
347
|
+
? { ...message, providerOptions: nextProviderOptions }
|
|
348
|
+
: { role: "system", content: message.content };
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
function hasStructuredCacheControl(messages, anthropicProviderAlias) {
|
|
352
|
+
for (const message of messages) {
|
|
353
|
+
const providerOptions = snapshotOwnEnumerableDataRecord(message.providerOptions, "Structured system message providerOptions");
|
|
354
|
+
if (getStructuredCacheProviderBuckets(providerOptions, anthropicProviderAlias).some((bucket) => bucket.cacheControl !== undefined)) {
|
|
355
|
+
return true;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
360
|
+
const ANTHROPIC_MAX_CACHE_BREAKPOINTS = 4;
|
|
361
|
+
function applyStructuredCacheTtl(messages, cacheTtl, anthropicProviderAlias) {
|
|
362
|
+
if (messages.length === 0) {
|
|
363
|
+
return messages;
|
|
364
|
+
}
|
|
365
|
+
if (cacheTtl === undefined && hasStructuredCacheControl(messages, anthropicProviderAlias)) {
|
|
366
|
+
return messages;
|
|
367
|
+
}
|
|
368
|
+
const breakpointIndex = messages.length - 1;
|
|
369
|
+
const cacheMetadata = messages.map((message) => {
|
|
370
|
+
const providerOptions = snapshotOwnEnumerableDataRecord(message.providerOptions, "Structured system message providerOptions");
|
|
371
|
+
const structuredCacheProviderBuckets = getStructuredCacheProviderBuckets(providerOptions, anthropicProviderAlias);
|
|
372
|
+
const cacheProviderBuckets = structuredCacheProviderBuckets.filter((bucket) => bucket.cacheControl !== undefined);
|
|
373
|
+
const undefinedCacheProviderBuckets = structuredCacheProviderBuckets.filter((bucket) => bucket.cacheControl === undefined);
|
|
374
|
+
return {
|
|
375
|
+
providerOptions,
|
|
376
|
+
cacheProviderBuckets,
|
|
377
|
+
undefinedCacheProviderBuckets,
|
|
378
|
+
};
|
|
379
|
+
});
|
|
380
|
+
const breakpointIndexes = [];
|
|
381
|
+
for (const [index, { cacheProviderBuckets }] of cacheMetadata.entries()) {
|
|
382
|
+
if (cacheProviderBuckets.length > 0) {
|
|
383
|
+
breakpointIndexes.push(index);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
const addCanonicalBreakpoint = cacheMetadata[breakpointIndex].cacheProviderBuckets.length === 0;
|
|
387
|
+
if (addCanonicalBreakpoint) {
|
|
388
|
+
breakpointIndexes.push(breakpointIndex);
|
|
389
|
+
}
|
|
390
|
+
const retainedBreakpointIndexes = new Set(breakpointIndexes.slice(-ANTHROPIC_MAX_CACHE_BREAKPOINTS));
|
|
391
|
+
return messages.map((message, index) => {
|
|
392
|
+
const { providerOptions, cacheProviderBuckets, undefinedCacheProviderBuckets } = cacheMetadata[index];
|
|
393
|
+
const shouldAddCanonicalBreakpoint = addCanonicalBreakpoint && index === breakpointIndex;
|
|
394
|
+
if (cacheProviderBuckets.length === 0 && undefinedCacheProviderBuckets.length === 0 &&
|
|
395
|
+
!shouldAddCanonicalBreakpoint) {
|
|
396
|
+
return message;
|
|
397
|
+
}
|
|
398
|
+
const nextProviderOptions = { ...providerOptions };
|
|
399
|
+
for (const bucket of undefinedCacheProviderBuckets) {
|
|
400
|
+
const nextBucket = { ...bucket.value };
|
|
401
|
+
ReflectApply(ReflectDeleteProperty, undefined, [nextBucket, "cacheControl"]);
|
|
402
|
+
if (ReflectOwnKeys(nextBucket).length > 0) {
|
|
403
|
+
ReflectApply(ObjectDefineProperty, undefined, [nextProviderOptions, bucket.key, {
|
|
404
|
+
configurable: true,
|
|
405
|
+
enumerable: true,
|
|
406
|
+
value: nextBucket,
|
|
407
|
+
writable: true,
|
|
408
|
+
}]);
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
ReflectApply(ReflectDeleteProperty, undefined, [nextProviderOptions, bucket.key]);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
for (const bucket of cacheProviderBuckets) {
|
|
415
|
+
if (retainedBreakpointIndexes.has(index)) {
|
|
416
|
+
ReflectApply(ObjectDefineProperty, undefined, [nextProviderOptions, bucket.key, {
|
|
417
|
+
configurable: true,
|
|
418
|
+
enumerable: true,
|
|
419
|
+
value: {
|
|
420
|
+
...bucket.value,
|
|
421
|
+
cacheControl: buildCacheControl(cacheTtl),
|
|
422
|
+
},
|
|
423
|
+
writable: true,
|
|
424
|
+
}]);
|
|
425
|
+
continue;
|
|
426
|
+
}
|
|
427
|
+
const nextBucket = { ...bucket.value };
|
|
428
|
+
ReflectApply(ReflectDeleteProperty, undefined, [nextBucket, "cacheControl"]);
|
|
429
|
+
if (ReflectOwnKeys(nextBucket).length > 0) {
|
|
430
|
+
ReflectApply(ObjectDefineProperty, undefined, [nextProviderOptions, bucket.key, {
|
|
431
|
+
configurable: true,
|
|
432
|
+
enumerable: true,
|
|
433
|
+
value: nextBucket,
|
|
434
|
+
writable: true,
|
|
435
|
+
}]);
|
|
436
|
+
}
|
|
437
|
+
else {
|
|
438
|
+
ReflectApply(ReflectDeleteProperty, undefined, [nextProviderOptions, bucket.key]);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
if (shouldAddCanonicalBreakpoint) {
|
|
442
|
+
const anthropic = snapshotOwnEnumerableDataRecord(nextProviderOptions.anthropic, "Structured system message providerOptions.anthropic", { ignoreUnsafeDataKeys: ["cacheControl"] });
|
|
443
|
+
ReflectApply(ObjectDefineProperty, undefined, [nextProviderOptions, "anthropic", {
|
|
444
|
+
configurable: true,
|
|
445
|
+
enumerable: true,
|
|
446
|
+
value: {
|
|
447
|
+
...anthropic,
|
|
448
|
+
cacheControl: buildCacheControl(cacheTtl),
|
|
449
|
+
},
|
|
450
|
+
writable: true,
|
|
451
|
+
}]);
|
|
452
|
+
}
|
|
453
|
+
const nextMessage = { ...message };
|
|
454
|
+
if (ReflectOwnKeys(nextProviderOptions).length > 0) {
|
|
455
|
+
nextMessage.providerOptions = nextProviderOptions;
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
ReflectApply(ReflectDeleteProperty, undefined, [nextMessage, "providerOptions"]);
|
|
459
|
+
}
|
|
460
|
+
return nextMessage;
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Builds the layered system-message set for one provider call (RFC 0001).
|
|
465
|
+
*
|
|
466
|
+
* Layer 0 (cached, shared across runs): the agent prompt only, with nothing
|
|
467
|
+
* project- or turn-specific. Its `cacheControl` breakpoint is the sole shared
|
|
468
|
+
* cache key, so it must be byte-identical across projects.
|
|
469
|
+
*
|
|
470
|
+
* Dynamic tail (uncached): project context/instructions, extra blocks, the
|
|
471
|
+
* skills catalog, and host environment facts. This includes everything that varies by
|
|
472
|
+
* project, session, or turn. Kept out of the cached prefix so a fresh project
|
|
473
|
+
* or session still reads the shared Layer 0 instead of paying full price.
|
|
474
|
+
*/
|
|
86
475
|
export function buildAgentCallContext(input) {
|
|
476
|
+
const preserveRuntimeContextMarker = input[PRESERVE_RUNTIME_CONTEXT_MARKER] === true;
|
|
87
477
|
const runtimeContextMarker = input.runtimeContextMarker ?? DEFAULT_RUNTIME_AGENT_CONTEXT_MARKER;
|
|
478
|
+
const anthropicProviderAlias = getAnthropicCacheProviderAlias(input);
|
|
479
|
+
if (Array.isArray(input.instructions)) {
|
|
480
|
+
const preparedMessages = prepareStructuredInstructionMessages({
|
|
481
|
+
instructions: input.instructions,
|
|
482
|
+
removeGeneratedSkillContext: input.skills !== undefined,
|
|
483
|
+
});
|
|
484
|
+
const splitMessages = splitStructuredInstructionMessages(preparedMessages, runtimeContextMarker);
|
|
485
|
+
const staticMessages = applyStructuredCacheTtl(splitMessages.before, input.cacheTtl, anthropicProviderAlias);
|
|
486
|
+
const flattenedInstructions = flattenSystemInstructions([
|
|
487
|
+
...splitMessages.before,
|
|
488
|
+
...splitMessages.after,
|
|
489
|
+
]);
|
|
490
|
+
const generatedMessages = buildAgentCallContext({
|
|
491
|
+
...input,
|
|
492
|
+
instructions: flattenedInstructions,
|
|
493
|
+
});
|
|
494
|
+
const dynamicMessage = generatedMessages[flattenedInstructions.length > 0 ? 1 : 0];
|
|
495
|
+
return [
|
|
496
|
+
...staticMessages,
|
|
497
|
+
...(preserveRuntimeContextMarker && splitMessages.hasMarker
|
|
498
|
+
? [{ role: "system", content: runtimeContextMarker }]
|
|
499
|
+
: []),
|
|
500
|
+
...(dynamicMessage ? [dynamicMessage] : []),
|
|
501
|
+
...removeStructuredCacheControls(splitMessages.after, anthropicProviderAlias),
|
|
502
|
+
];
|
|
503
|
+
}
|
|
504
|
+
const sourceInstructions = input.skills === undefined ? input.instructions : removeCompleteBlocks(removeCompleteBlocks(removeGeneratedSkillCatalogBlocks(input.instructions), AUTHORIZED_SKILL_IDS_BLOCK_NAME), AUTHORIZED_SKILL_ID_DISCOVERY_BLOCK_NAME);
|
|
88
505
|
const instructions = splitInstructionsAtMarker({
|
|
89
|
-
instructions:
|
|
506
|
+
instructions: sourceInstructions,
|
|
90
507
|
runtimeContextMarker,
|
|
91
508
|
});
|
|
92
|
-
|
|
509
|
+
// Layer 0 contains only the static prompt before the marker. When no marker
|
|
510
|
+
// exists, `before` contains the complete instructions.
|
|
511
|
+
const staticPrompt = instructions.before;
|
|
512
|
+
// The dynamic tail contains project blocks, extra blocks, skills, and environment. Each is
|
|
513
|
+
// dropped if the agent's instructions already carry the same block (dedup).
|
|
514
|
+
const dynamicParts = [];
|
|
515
|
+
if (preserveRuntimeContextMarker && instructions.hasMarker) {
|
|
516
|
+
dynamicParts.push(runtimeContextMarker);
|
|
517
|
+
}
|
|
518
|
+
const projectBlocks = [];
|
|
93
519
|
if (input.projectInstructions) {
|
|
94
|
-
|
|
520
|
+
projectBlocks.push(buildProjectInstructionsPromptBlock(input.projectInstructions));
|
|
95
521
|
}
|
|
96
522
|
if (input.projectContext) {
|
|
97
|
-
|
|
523
|
+
projectBlocks.push(buildProjectContextPromptBlock(input.projectContext));
|
|
98
524
|
}
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
if (instructions.before) {
|
|
102
|
-
staticParts.push(instructions.before);
|
|
103
|
-
}
|
|
104
|
-
for (const block of blocks) {
|
|
525
|
+
projectBlocks.push(...(input.extraBlocks ?? []));
|
|
526
|
+
for (const block of projectBlocks) {
|
|
105
527
|
if (block.length === 0) {
|
|
106
528
|
continue;
|
|
107
529
|
}
|
|
108
530
|
const blockName = getBlockName(block);
|
|
109
|
-
if (blockName !== null && hasBlock(
|
|
531
|
+
if (blockName !== null && hasBlock(sourceInstructions, blockName)) {
|
|
110
532
|
continue;
|
|
111
533
|
}
|
|
112
|
-
|
|
534
|
+
dynamicParts.push(block);
|
|
113
535
|
}
|
|
114
|
-
if (
|
|
115
|
-
|
|
536
|
+
if (input.skills !== undefined) {
|
|
537
|
+
const hasAuthoredSkillCatalog = hasBlock(sourceInstructions, AVAILABLE_SKILLS_BLOCK_NAME);
|
|
538
|
+
if (input.skills.length > 0 || hasAuthoredSkillCatalog) {
|
|
539
|
+
dynamicParts.push(hasAuthoredSkillCatalog
|
|
540
|
+
? buildRuntimeAuthorizedSkillIdsPromptBlock(input.skills)
|
|
541
|
+
: buildRuntimeAvailableSkillsPromptBlock(input.skills));
|
|
542
|
+
}
|
|
116
543
|
}
|
|
117
|
-
if (input.
|
|
118
|
-
|
|
544
|
+
if (input.environmentContext && !hasBlock(sourceInstructions, ENVIRONMENT_CONTEXT_BLOCK_NAME)) {
|
|
545
|
+
dynamicParts.push(createRuntimePromptBlock({
|
|
546
|
+
name: ENVIRONMENT_CONTEXT_BLOCK_NAME,
|
|
547
|
+
content: input.environmentContext,
|
|
548
|
+
}));
|
|
119
549
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
550
|
+
if (instructions.after) {
|
|
551
|
+
dynamicParts.push(instructions.after);
|
|
552
|
+
}
|
|
553
|
+
const messages = staticPrompt.length > 0
|
|
554
|
+
? [{
|
|
555
|
+
role: "system",
|
|
556
|
+
content: staticPrompt,
|
|
557
|
+
providerOptions: {
|
|
558
|
+
anthropic: { cacheControl: buildCacheControl(input.cacheTtl) },
|
|
559
|
+
},
|
|
560
|
+
}]
|
|
561
|
+
: [];
|
|
562
|
+
if (dynamicParts.length > 0) {
|
|
130
563
|
messages.push({
|
|
131
564
|
role: "system",
|
|
132
|
-
content:
|
|
133
|
-
name: ENVIRONMENT_CONTEXT_BLOCK_NAME,
|
|
134
|
-
content: input.environmentContext,
|
|
135
|
-
}),
|
|
565
|
+
content: dynamicParts.join("\n\n"),
|
|
136
566
|
});
|
|
137
567
|
}
|
|
138
568
|
return messages;
|
|
139
569
|
}
|
|
570
|
+
const PRESERVE_RUNTIME_CONTEXT_MARKER = Symbol("preserveRuntimeContextMarker");
|
|
571
|
+
/** Keeps the marker so another internal context composer can consume it. */
|
|
572
|
+
export function buildAgentCallContextPreservingRuntimeMarker(input) {
|
|
573
|
+
return buildAgentCallContext({
|
|
574
|
+
...input,
|
|
575
|
+
[PRESERVE_RUNTIME_CONTEXT_MARKER]: true,
|
|
576
|
+
});
|
|
577
|
+
}
|
|
@@ -32,6 +32,24 @@ export interface StreamingToolResult {
|
|
|
32
32
|
dynamic?: boolean;
|
|
33
33
|
preliminary?: boolean;
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Flush a tool call's buffered `tool-input-start` and input deltas to the
|
|
37
|
+
* client.
|
|
38
|
+
*
|
|
39
|
+
* The start event is withheld until the call commits — `tool-input-end`,
|
|
40
|
+
* `tool-input-available` or `tool-call`. `tool-call` rebuilds the entry from
|
|
41
|
+
* its own `toolName` and announces from there, so a name that supersedes the
|
|
42
|
+
* one seen at `tool-input-start` is the one the client is given, and the
|
|
43
|
+
* superseded name never reaches the wire.
|
|
44
|
+
*
|
|
45
|
+
* Idempotent via `inputAnnounced`, which is also what gates the terminal
|
|
46
|
+
* `tool-output-error`. A call whose stream ended before any commit event was
|
|
47
|
+
* never announced, so it must be announced here before its failure can
|
|
48
|
+
* render. Such a call has no superseding name to wait for: the event that
|
|
49
|
+
* would carry one never arrived, and `inputAvailable` stays false, which is
|
|
50
|
+
* what makes that terminal path reachable at all.
|
|
51
|
+
*/
|
|
52
|
+
export declare function announceStreamedToolCallInput(controller: ReadableStreamDefaultController, encoder: TextEncoder, toolCall: StreamingToolCall): void;
|
|
35
53
|
export interface StreamingReasoningPart {
|
|
36
54
|
id: string;
|
|
37
55
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-stream-handler.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/chat-stream-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAqB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAoBtF,OAAO,EAQL,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAEnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,2BAA2B,EAE3B,KAAK,2BAA2B,EACjC,MAAM,8BAA8B,CAAC;AAmBtC,KAAK,uBAAuB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AACzD,KAAK,mBAAmB,GAAG,uBAAuB,GAAG,SAAS,uBAAuB,EAAE,CAAC;AAExF,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MA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