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
|
@@ -3,6 +3,7 @@ export declare const DEFAULT_FINGERPRINT = "{{ default }}";
|
|
|
3
3
|
export type SentryPolicyScope = {
|
|
4
4
|
setContext(name: string, context: Record<string, unknown>): void;
|
|
5
5
|
setFingerprint(fingerprint: string[]): void;
|
|
6
|
+
setLevel?(level: "error" | "warning"): void;
|
|
6
7
|
setTag(key: string, value: string): void;
|
|
7
8
|
};
|
|
8
9
|
export type SentryPolicySdk = {
|
|
@@ -14,6 +15,7 @@ export type SentryPolicyEvent = {
|
|
|
14
15
|
breadcrumbs?: unknown;
|
|
15
16
|
exception?: {
|
|
16
17
|
values?: Array<{
|
|
18
|
+
type?: string;
|
|
17
19
|
value?: string;
|
|
18
20
|
stacktrace?: {
|
|
19
21
|
frames?: Array<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-observability-sentry/src/policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACxB,MAAM,0DAA0D,CAAC;AAElE,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../../src/extensions/ext-observability-sentry/src/policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACxB,MAAM,0DAA0D,CAAC;AAElE,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AA2CnD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACjE,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAG5C,QAAQ,CAAC,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IAC5C,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACzC,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,EAAE,iBAAiB,EACxB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,uBAAuB,GAC/B,IAAI,CAsBN;AAED,wBAAgB,kBAAkB,CAAC,MAAM,SAAS,iBAAiB,EACjE,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,iBAAiB,CA6B5B;AAwMD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOzD;AAED,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GACpD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAU3C;AAOD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAW5D"}
|
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
export const DEFAULT_FINGERPRINT = "{{ default }}";
|
|
2
|
+
const DB_ERROR_FINGERPRINT = "veryfront-db-error";
|
|
3
|
+
// pgbouncer reports these through the wire protocol, so postgres.js surfaces them as a
|
|
4
|
+
// PostgresError whose message ends with "(<code>)".
|
|
5
|
+
const PGBOUNCER_CONNECTION_ERROR_CODES = [
|
|
6
|
+
"server_login_retry",
|
|
7
|
+
"query_wait_timeout",
|
|
8
|
+
];
|
|
9
|
+
// postgres.js `Errors.connection()` builds a plain Error with the message
|
|
10
|
+
// `write <CODE> <host>:<port>` for every client-side connection failure.
|
|
11
|
+
const POSTGRES_JS_CONNECTION_ERROR_PATTERN = /^write (CONNECTION_CLOSED|CONNECTION_DESTROYED|CONNECTION_ENDED|CONNECT_TIMEOUT)(?:\s|$)/;
|
|
12
|
+
const FAILED_QUERY_PREFIX = "Failed query: ";
|
|
13
|
+
const FAILED_QUERY_PARAMS_DELIMITER = "\nparams:";
|
|
14
|
+
const FAILED_QUERY_HEAD_MAX_LENGTH = 200;
|
|
15
|
+
const SQL_DOLLAR_QUOTE_START_PATTERN = /^\$(?:[_\p{ID_Start}][_\p{ID_Continue}]*)?\$/u;
|
|
16
|
+
// PostgreSQL's lexer accepts any high byte in a dollar-quote tag and imposes no length limit, so
|
|
17
|
+
// tags outside ECMAScript `ID_Start` (an emoji tag, for example) are still treated as literals and
|
|
18
|
+
// their contents cannot reach the title. The tag must nonetheless look like a tag: free of
|
|
19
|
+
// PostgreSQL lexer whitespace, quotes and further dollar signs. PostgreSQL lexer whitespace is
|
|
20
|
+
// ASCII-only, so a high byte that ECMAScript classifies as whitespace remains a legal tag byte.
|
|
21
|
+
// Without the shape check, a `$` inside an ordinary identifier such as `col$a` swallows the rest
|
|
22
|
+
// of the query.
|
|
23
|
+
const SQL_UNRECOGNIZED_DOLLAR_QUOTE_START_PATTERN = /^\$[^ \t\n\r\f\v'"$]+\$/u;
|
|
24
|
+
// A dollar quote cannot open straight after an identifier character: PostgreSQL prefers the longer
|
|
25
|
+
// identifier match, so `col$tag$inner$tag$` is one identifier rather than `col` followed by a
|
|
26
|
+
// literal. `$` is deliberately absent from this class so that adjacent literals such as
|
|
27
|
+
// `$$a$$$$b$$` still parse as two dollar-quoted strings.
|
|
28
|
+
const SQL_IDENTIFIER_BEFORE_DOLLAR_PATTERN = /[A-Za-z0-9_]|\P{ASCII}/u;
|
|
29
|
+
const SQL_NUMERIC_LITERAL_PATTERN = /^(?:0[xX]_?[0-9A-Fa-f](?:_?[0-9A-Fa-f])*|0[oO]_?[0-7](?:_?[0-7])*|0[bB]_?[01](?:_?[01])*|(?:\d(?:_?\d)*(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?)/;
|
|
30
|
+
const SQL_IDENTIFIER_CHAR_PATTERN = /[A-Za-z0-9_$]/;
|
|
2
31
|
const SENTRY_TOKEN_PATTERN = /\bsntrys_[A-Za-z0-9_+/=-]+\b/g;
|
|
3
32
|
const BEARER_TOKEN_PATTERN = /\bBearer\s+[A-Za-z0-9._~+/=-]+\b/gi;
|
|
4
33
|
const JWT_PATTERN = /\b[A-Za-z0-9_-]{16,}\.[A-Za-z0-9_-]{16,}\.[A-Za-z0-9_-]{16,}\b/g;
|
|
@@ -32,6 +61,10 @@ export function applySentryScopePolicy(scope, serviceName, context) {
|
|
|
32
61
|
if (context.processRole)
|
|
33
62
|
scope.setTag("process_role", context.processRole);
|
|
34
63
|
scope.setTag("veryfront.boundary", context.boundary);
|
|
64
|
+
if (context.errorClass)
|
|
65
|
+
scope.setTag("veryfront.error_class", context.errorClass);
|
|
66
|
+
if (context.level)
|
|
67
|
+
scope.setLevel?.(context.level);
|
|
35
68
|
if (context.method)
|
|
36
69
|
scope.setTag("http.request.method", context.method);
|
|
37
70
|
if (context.requestId)
|
|
@@ -52,7 +85,10 @@ export function prepareSentryEvent(event, serviceName) {
|
|
|
52
85
|
...event.tags,
|
|
53
86
|
"service.name": serviceName,
|
|
54
87
|
};
|
|
55
|
-
|
|
88
|
+
const dbConnectionErrorCode = detectDbConnectionErrorCode(event);
|
|
89
|
+
event.fingerprint = dbConnectionErrorCode
|
|
90
|
+
? [serviceName, DB_ERROR_FINGERPRINT, dbConnectionErrorCode]
|
|
91
|
+
: [serviceName, ...(event.fingerprint ?? [DEFAULT_FINGERPRINT])];
|
|
56
92
|
delete event.breadcrumbs;
|
|
57
93
|
delete event.request;
|
|
58
94
|
delete event.user;
|
|
@@ -62,8 +98,9 @@ export function prepareSentryEvent(event, serviceName) {
|
|
|
62
98
|
event.logentry.message = redactSensitiveText(event.logentry.message);
|
|
63
99
|
}
|
|
64
100
|
for (const value of event.exception?.values ?? []) {
|
|
65
|
-
if (value.value)
|
|
66
|
-
value.value = redactSensitiveText(value.value);
|
|
101
|
+
if (value.value) {
|
|
102
|
+
value.value = normalizeFailedQueryValue(redactSensitiveText(value.value));
|
|
103
|
+
}
|
|
67
104
|
for (const frame of value.stacktrace?.frames ?? []) {
|
|
68
105
|
if (frame.filename)
|
|
69
106
|
frame.filename = sanitizeStackFramePath(frame.filename);
|
|
@@ -73,6 +110,180 @@ export function prepareSentryEvent(event, serviceName) {
|
|
|
73
110
|
}
|
|
74
111
|
return event;
|
|
75
112
|
}
|
|
113
|
+
function detectDbConnectionErrorCode(event) {
|
|
114
|
+
for (const exceptionValue of event.exception?.values ?? []) {
|
|
115
|
+
const message = exceptionValue.value ?? "";
|
|
116
|
+
if (exceptionValue.type === "PostgresError") {
|
|
117
|
+
const trimmedMessage = message.trimEnd();
|
|
118
|
+
const code = PGBOUNCER_CONNECTION_ERROR_CODES.find((candidate) => trimmedMessage.endsWith(`(${candidate})`));
|
|
119
|
+
if (code)
|
|
120
|
+
return code;
|
|
121
|
+
}
|
|
122
|
+
if (exceptionValue.type === "Error") {
|
|
123
|
+
const code = POSTGRES_JS_CONNECTION_ERROR_PATTERN.exec(message)?.[1];
|
|
124
|
+
if (code)
|
|
125
|
+
return code;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return undefined;
|
|
129
|
+
}
|
|
130
|
+
function normalizeFailedQueryValue(value) {
|
|
131
|
+
if (!value.startsWith(FAILED_QUERY_PREFIX.trimEnd()))
|
|
132
|
+
return value;
|
|
133
|
+
const remainder = value.slice(FAILED_QUERY_PREFIX.trimEnd().length);
|
|
134
|
+
const paramsDelimiterIndex = remainder.indexOf(FAILED_QUERY_PARAMS_DELIMITER);
|
|
135
|
+
const query = paramsDelimiterIndex === -1 ? remainder : remainder.slice(0, paramsDelimiterIndex);
|
|
136
|
+
const titleQuery = redactSqlLiteralsForTitle(query)
|
|
137
|
+
.replace(/\s+/g, " ")
|
|
138
|
+
.trim();
|
|
139
|
+
const head = titleQuery
|
|
140
|
+
.slice(0, FAILED_QUERY_HEAD_MAX_LENGTH)
|
|
141
|
+
.trimEnd();
|
|
142
|
+
const truncated = titleQuery.length > FAILED_QUERY_HEAD_MAX_LENGTH;
|
|
143
|
+
return `${FAILED_QUERY_PREFIX}${head}${truncated ? "…" : ""}`;
|
|
144
|
+
}
|
|
145
|
+
function redactSqlLiteralsForTitle(query) {
|
|
146
|
+
let redacted = "";
|
|
147
|
+
let index = 0;
|
|
148
|
+
while (index < query.length) {
|
|
149
|
+
const character = query.charAt(index);
|
|
150
|
+
if ((character === "E" || character === "e") &&
|
|
151
|
+
query[index + 1] === "'" &&
|
|
152
|
+
isSqlStringPrefixBoundary(query, index)) {
|
|
153
|
+
index = findQuotedSqlTokenEnd(query, index + 1, "'", { allowBackslashEscapes: true }).end;
|
|
154
|
+
redacted += "?";
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
if ((character === "U" || character === "u") &&
|
|
158
|
+
query[index + 1] === "&" &&
|
|
159
|
+
query[index + 2] === "'" &&
|
|
160
|
+
isSqlStringPrefixBoundary(query, index)) {
|
|
161
|
+
index = findQuotedSqlTokenEnd(query, index + 2, "'").end;
|
|
162
|
+
redacted += "?";
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
if (character === '"') {
|
|
166
|
+
// Deliberate non-redaction: a double-quoted token is a schema identifier, not data, and
|
|
167
|
+
// keeping it verbatim is what makes titles group by query shape. An unterminated identifier
|
|
168
|
+
// is malformed SQL, so redact it rather than emit the rest of the query untouched.
|
|
169
|
+
const { end, terminated } = findQuotedSqlTokenEnd(query, index, '"');
|
|
170
|
+
redacted += terminated ? query.slice(index, end) : "?";
|
|
171
|
+
index = end;
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
if (character === "'") {
|
|
175
|
+
// The event does not carry the server's `standard_conforming_strings` setting, and neither
|
|
176
|
+
// reading of a backslash is safe on its own: escaping exposes the next literal when the
|
|
177
|
+
// setting is on, not escaping exposes this one when it is off. Bail out on the ambiguous
|
|
178
|
+
// case instead of picking a side.
|
|
179
|
+
index = findQuotedSqlTokenEnd(query, index, "'", { bailOnAmbiguousBackslash: true }).end;
|
|
180
|
+
redacted += "?";
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
if (character === "$" &&
|
|
184
|
+
!SQL_IDENTIFIER_BEFORE_DOLLAR_PATTERN.test(query[index - 1] ?? "")) {
|
|
185
|
+
const dollarQuotedEnd = findDollarQuotedSqlTokenEnd(query, index);
|
|
186
|
+
if (dollarQuotedEnd !== undefined) {
|
|
187
|
+
index = dollarQuotedEnd;
|
|
188
|
+
redacted += "?";
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (character === "-" && query[index + 1] === "-") {
|
|
193
|
+
index += 2;
|
|
194
|
+
while (index < query.length && query[index] !== "\n" && query[index] !== "\r") {
|
|
195
|
+
index += 1;
|
|
196
|
+
}
|
|
197
|
+
redacted += "?";
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
if (character === "/" && query[index + 1] === "*") {
|
|
201
|
+
let depth = 1;
|
|
202
|
+
index += 2;
|
|
203
|
+
while (index < query.length && depth > 0) {
|
|
204
|
+
if (query[index] === "/" && query[index + 1] === "*") {
|
|
205
|
+
depth += 1;
|
|
206
|
+
index += 2;
|
|
207
|
+
}
|
|
208
|
+
else if (query[index] === "*" && query[index + 1] === "/") {
|
|
209
|
+
depth -= 1;
|
|
210
|
+
index += 2;
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
index += 1;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
redacted += "?";
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
const canStartNumber = /[0-9]/.test(character) ||
|
|
220
|
+
(character === "." && /[0-9]/.test(query[index + 1] ?? ""));
|
|
221
|
+
const previousCharacter = query[index - 1] ?? "";
|
|
222
|
+
if (canStartNumber && !SQL_IDENTIFIER_CHAR_PATTERN.test(previousCharacter)) {
|
|
223
|
+
const literal = query.slice(index).match(SQL_NUMERIC_LITERAL_PATTERN)?.[0];
|
|
224
|
+
const nextCharacter = literal ? query[index + literal.length] ?? "" : "";
|
|
225
|
+
if (literal && !SQL_IDENTIFIER_CHAR_PATTERN.test(nextCharacter)) {
|
|
226
|
+
redacted += "?";
|
|
227
|
+
index += literal.length;
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
redacted += character;
|
|
232
|
+
index += 1;
|
|
233
|
+
}
|
|
234
|
+
return redacted;
|
|
235
|
+
}
|
|
236
|
+
function findDollarQuotedSqlTokenEnd(query, start) {
|
|
237
|
+
const recognizedDelimiter = query.slice(start).match(SQL_DOLLAR_QUOTE_START_PATTERN)?.[0];
|
|
238
|
+
if (recognizedDelimiter) {
|
|
239
|
+
const contentStart = start + recognizedDelimiter.length;
|
|
240
|
+
const closingDelimiter = query.indexOf(recognizedDelimiter, contentStart);
|
|
241
|
+
return closingDelimiter === -1 ? query.length : closingDelimiter + recognizedDelimiter.length;
|
|
242
|
+
}
|
|
243
|
+
if (/[0-9]/.test(query[start + 1] ?? ""))
|
|
244
|
+
return undefined;
|
|
245
|
+
const delimiter = query.slice(start).match(SQL_UNRECOGNIZED_DOLLAR_QUOTE_START_PATTERN)?.[0];
|
|
246
|
+
if (!delimiter)
|
|
247
|
+
return undefined;
|
|
248
|
+
const contentStart = start + delimiter.length;
|
|
249
|
+
const closingDelimiter = query.indexOf(delimiter, contentStart);
|
|
250
|
+
return closingDelimiter === -1 ? query.length : closingDelimiter + delimiter.length;
|
|
251
|
+
}
|
|
252
|
+
function isSqlStringPrefixBoundary(query, start) {
|
|
253
|
+
return !SQL_IDENTIFIER_CHAR_PATTERN.test(query[start - 1] ?? "");
|
|
254
|
+
}
|
|
255
|
+
function findQuotedSqlTokenEnd(query, start, quote, options = {}) {
|
|
256
|
+
let index = start + 1;
|
|
257
|
+
while (index < query.length) {
|
|
258
|
+
if (options.allowBackslashEscapes && query[index] === "\\" && index + 1 < query.length) {
|
|
259
|
+
index += 2;
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
if (query[index] !== quote) {
|
|
263
|
+
index += 1;
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
if (query[index + 1] === quote) {
|
|
267
|
+
index += 2;
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
// An ordinary literal means different things on different servers: under
|
|
271
|
+
// `standard_conforming_strings = off` a backslash escapes the quote that follows it, so an odd
|
|
272
|
+
// run of backslashes here leaves the literal's extent genuinely ambiguous — the same bytes are
|
|
273
|
+
// one literal on one server and two on another. Guessing either way emits the other reading's
|
|
274
|
+
// contents verbatim, so stop and let the caller redact the remainder.
|
|
275
|
+
if (options.bailOnAmbiguousBackslash && hasOddTrailingBackslashRun(query, index))
|
|
276
|
+
break;
|
|
277
|
+
return { end: index + 1, terminated: true };
|
|
278
|
+
}
|
|
279
|
+
return { end: query.length, terminated: false };
|
|
280
|
+
}
|
|
281
|
+
function hasOddTrailingBackslashRun(query, index) {
|
|
282
|
+
let backslashes = 0;
|
|
283
|
+
while (index - backslashes - 1 >= 0 && query[index - backslashes - 1] === "\\")
|
|
284
|
+
backslashes += 1;
|
|
285
|
+
return backslashes % 2 === 1;
|
|
286
|
+
}
|
|
76
287
|
export function redactSensitiveText(value) {
|
|
77
288
|
return value
|
|
78
289
|
.replace(SENTRY_TOKEN_PATTERN, "[REDACTED]")
|
|
@@ -62,6 +62,8 @@ export declare function extractStarterIntentId(messages: readonly unknown[]): st
|
|
|
62
62
|
export declare function evaluateStarterIntentTurnPolicy(input: StarterIntentTurnPolicyInput): StarterIntentTurnPolicy;
|
|
63
63
|
/** Add first turn starter intent root ownership reminder helper. */
|
|
64
64
|
export declare function addFirstTurnStarterIntentRootOwnershipReminder(system: string): string;
|
|
65
|
+
export declare function addFirstTurnStarterIntentRootOwnershipReminder(system: ChatSystemMessage[]): ChatSystemMessage[];
|
|
66
|
+
export declare function addFirstTurnStarterIntentRootOwnershipReminder(system: string | ChatSystemMessage[]): string | ChatSystemMessage[];
|
|
65
67
|
/** Check whether starter intent root ownership is required. */
|
|
66
68
|
export declare function isStarterIntentRootOwnershipRequired(value: unknown): boolean;
|
|
67
69
|
/** Should reinforce load skill continuation helper. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegation-policy.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/conversation/delegation-policy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAI7D,OAAO,EACL,qCAAqC,EACrC,iCAAiC,EACjC,6BAA6B,EAC7B,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,kCAAkC,CAAC;AAK1C,yDAAyD;AACzD,eAAO,MAAM,oCAAoC,mHACiE,CAAC;AACnH,gEAAgE;AAChE,eAAO,MAAM,2CAA2C,uFAC8B,CAAC;AAEvF,sDAAsD;AACtD,eAAO,MAAM,iCAAiC,gCAAgC,CAAC;AAC/E,8CAA8C;AAC9C,eAAO,MAAM,yBAAyB,qDAAoC,CAAC;AAC3E,oDAAoD;AACpD,eAAO,MAAM,+BAA+B,kGAAwC,CAAC;AAErF,wDAAwD;AACxD,wBAAgB,0CAA0C,IAAI,MAAM,CAEnE;AAED,wDAAwD;AACxD,eAAO,MAAM,mCAAmC,QAA+C,CAAC;AAEhG,2CAA2C;AAC3C,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,GACX;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAKhD;AAED,4DAA4D;AAC5D,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,8DAA8D;AAC9D,MAAM,WAAW,0BAA0B;IACzC,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;CAC7C;AAwBD,4CAA4C;AAC5C,wBAAgB,4BAA4B,CAAC,CAAC,SAAS,MAAM,EAC3D,MAAM,EAAE,CAAC,GACR,CAAC,GAAG,0BAA0B,CAUhC;AAED,gDAAgD;AAChD,wBAAgB,mCAAmC,IAAI,MAAM,CAE5D;AAED,qDAAqD;AACrD,wBAAgB,uCAAuC,IAAI,MAAM,CAEhE;AAED,mEAAmE;AACnE,wBAAgB,2CAA2C,IAAI,MAAM,CAEpE;AAED,qDAAqD;AACrD,eAAO,MAAM,gCAAgC,kTAC8L,CAAC;AAC5O,oDAAoD;AACpD,eAAO,MAAM,+BAA+B,8OAC6K,CAAC;AAI1N,sEAAsE;AACtE,eAAO,MAAM,iDAAiD,QACnB,CAAC;AAC5C,yEAAyE;AACzE,eAAO,MAAM,oDAAoD,mCAC/B,CAAC;AACnC,2EAA2E;AAC3E,eAAO,MAAM,sDAAsD,QACpB,CAAC;AAEhD,KAAK,4BAA4B,GAAG;IAClC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAC7B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,8BAA8B,EAAE,OAAO,CAAC;IACxC,8BAA8B,EAAE,OAAO,CAAC;CACzC,CAAC;AA6CF,iCAAiC;AACjC,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,GAAG,IAAI,CAelF;AAED,kDAAkD;AAClD,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,4BAA4B,GAClC,uBAAuB,CAazB;AAED,oEAAoE;AACpE,wBAAgB,8CAA8C,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"delegation-policy.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/conversation/delegation-policy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAI7D,OAAO,EACL,qCAAqC,EACrC,iCAAiC,EACjC,6BAA6B,EAC7B,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,kCAAkC,CAAC;AAK1C,yDAAyD;AACzD,eAAO,MAAM,oCAAoC,mHACiE,CAAC;AACnH,gEAAgE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
133
133
|
shouldBlockImmediateDelegation: keepConversationFirst,
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
/** Add first turn starter intent root ownership reminder helper. */
|
|
137
136
|
export function addFirstTurnStarterIntentRootOwnershipReminder(system) {
|
|
138
|
-
if (system
|
|
137
|
+
if (typeof system === "string") {
|
|
138
|
+
return system.includes(FIRST_TURN_STARTER_INTENT_ROOT_OWNERSHIP_REMINDER)
|
|
139
|
+
? system
|
|
140
|
+
: `${system}\n\n${FIRST_TURN_STARTER_INTENT_ROOT_OWNERSHIP_REMINDER}`;
|
|
141
|
+
}
|
|
142
|
+
if (system.some((message) => message.content.includes(FIRST_TURN_STARTER_INTENT_ROOT_OWNERSHIP_REMINDER))) {
|
|
139
143
|
return system;
|
|
140
144
|
}
|
|
141
|
-
return
|
|
145
|
+
return [
|
|
146
|
+
...system,
|
|
147
|
+
{
|
|
148
|
+
role: "system",
|
|
149
|
+
content: FIRST_TURN_STARTER_INTENT_ROOT_OWNERSHIP_REMINDER,
|
|
150
|
+
},
|
|
151
|
+
];
|
|
142
152
|
}
|
|
143
153
|
/** Check whether starter intent root ownership is required. */
|
|
144
154
|
export function isStarterIntentRootOwnershipRequired(value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-terminal.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/conversation/hosted-terminal.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,yBAAyB,EAE/B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"hosted-terminal.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/conversation/hosted-terminal.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,yBAAyB,EAE/B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAG3E,4DAA4D;AAC5D,MAAM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EAAE,OAAO,GACb,OAAO,CAAC,4BAA4B,CAAC,CAKvC;AAED,uEAAuE;AACvE,MAAM,WAAW,8CAA8C;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,yBAAyB,GAAG,IAAI,CAAC;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,eAAe,CAAC,EAAE,CAAC,aAAa,EAAE,4BAA4B,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACzF;AAED,oEAAoE;AACpE,MAAM,WAAW,iCAAiC;IAChD,eAAe,EAAE,CAAC,KAAK,EAAE,oCAAoC,KAAK,4BAA4B,CAAC;IAC/F,WAAW,EAAE,CAAC,aAAa,EAAE,4BAA4B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5E,SAAS,EAAE,CAAC,aAAa,EAAE,4BAA4B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,eAAe,EAAE,CAAC,aAAa,EAAE,4BAA4B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChF,QAAQ,EAAE,CAAC,KAAK,EAAE,oCAAoC,KAAK,OAAO,CAAC,4BAA4B,CAAC,CAAC;CAClG;AAuCD,iDAAiD;AACjD,wBAAgB,iCAAiC,CAAC,KAAK,EAAE;IACvD,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,oCAAoC,CAAC;CAC7C,GAAG,4BAA4B,CAuB/B;AAED,mDAAmD;AACnD,wBAAgB,uCAAuC,CACrD,OAAO,EAAE,8CAA8C,GACtD,iCAAiC,CAgEnC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { finalizeConversationAgentRun, } from "./durable.js";
|
|
2
|
+
import { resolveKnownProviderTerminalError } from "../streaming/stream-outcome.js";
|
|
2
3
|
/** Shared conversation hosted stream error terminal error code value. */
|
|
3
4
|
export const CONVERSATION_HOSTED_STREAM_ERROR_TERMINAL_ERROR_CODE = "STREAM_ERROR";
|
|
4
5
|
/** Shared conversation hosted aborted terminal error code value. */
|
|
@@ -29,10 +30,13 @@ export function resolveConversationHostedTerminalState(input) {
|
|
|
29
30
|
}
|
|
30
31
|
/** State for resolve conversation hosted stream error. */
|
|
31
32
|
export function resolveConversationHostedStreamErrorState(error) {
|
|
33
|
+
const knownProviderError = resolveKnownProviderTerminalError(error);
|
|
32
34
|
return {
|
|
33
35
|
status: "failed",
|
|
34
|
-
terminalErrorCode:
|
|
35
|
-
|
|
36
|
+
terminalErrorCode: knownProviderError?.code ??
|
|
37
|
+
CONVERSATION_HOSTED_STREAM_ERROR_TERMINAL_ERROR_CODE,
|
|
38
|
+
terminalErrorMessage: knownProviderError?.message ??
|
|
39
|
+
(error instanceof Error ? error.message : String(error)),
|
|
36
40
|
};
|
|
37
41
|
}
|
|
38
42
|
/** State for dispatch conversation hosted terminal. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-chunk-mirror.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/conversation/run-chunk-mirror.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,KAAK,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,qCAAqC,EAC1C,KAAK,wCAAwC,EAC7C,KAAK,6BAA6B,EAClC,KAAK,iCAAiC,EAEvC,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EACL,KAAK,mCAAmC,EAEzC,MAAM,cAAc,CAAC;AAOtB,6DAA6D;AAC7D,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,KAAK,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,Y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MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtE;AAED,gEAAgE;AAChE,MAAM,WAAW,uCAAuC;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,+CAA+C,CAAC;IAClE,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC;AAwBD,4CAA4C;AAC5C,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,iCAAiC,GACvC,0BAA0B,CAkE5B;AAiJD,mDAAmD;AACnD,wBAAgB,sCAAsC,CACpD,KAAK,EAAE,uCAAuC,GAC7C,0BAA0B,CA4E5B"}
|
|
@@ -103,15 +103,27 @@ async function runHostedChunkMirrorTrace(instrumentation, operationName, operati
|
|
|
103
103
|
}
|
|
104
104
|
return await operation();
|
|
105
105
|
}
|
|
106
|
+
// Retries are self-healing and back off to only a few seconds, so logging
|
|
107
|
+
// every attempt at error level turns one degraded append window into a Sentry
|
|
108
|
+
// error every few seconds per active run (VERYFRONT-AGENT-3). Escalate only
|
|
109
|
+
// once the failure streak suggests the outage is persistent; terminal
|
|
110
|
+
// stop/disable paths report at error level separately.
|
|
111
|
+
const HOSTED_CHUNK_MIRROR_RETRY_ERROR_THRESHOLD = 5;
|
|
106
112
|
function recordHostedChunkMirrorRetryScheduled(input) {
|
|
107
|
-
|
|
113
|
+
const metadata = createHostedChunkMirrorRetryMetadata({
|
|
108
114
|
conversationId: input.conversationId,
|
|
109
115
|
runId: input.runId,
|
|
110
116
|
errorMessage: input.flushAttempt.errorMessage ?? "Conversation run append failed",
|
|
111
117
|
retryDelayMs: input.flushAttempt.retryDelayMs,
|
|
112
118
|
pendingEventCount: input.flushAttempt.pendingEventCount,
|
|
113
119
|
consecutiveFailures: input.flushAttempt.consecutiveFailures,
|
|
114
|
-
})
|
|
120
|
+
});
|
|
121
|
+
const message = "Durable run mirror flush failed; queued for retry";
|
|
122
|
+
if (input.flushAttempt.consecutiveFailures >= HOSTED_CHUNK_MIRROR_RETRY_ERROR_THRESHOLD) {
|
|
123
|
+
input.instrumentation?.error?.(message, metadata);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
input.instrumentation?.warn?.(message, metadata);
|
|
115
127
|
}
|
|
116
128
|
function recordHostedChunkMirrorHighBacklog(input) {
|
|
117
129
|
input.instrumentation?.warn?.("Durable run mirror backlog is high", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/src/agent/factory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,eAAe,
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/src/agent/factory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,eAAe,EAMhB,MAAM,YAAY,CAAC;AAkapB,oBAAoB;AACpB,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,KAAK,CAoEhD;AAcD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,YAAY,CAAC,GACnD,eAAe,EAAE,CAanB"}
|
package/esm/src/agent/factory.js
CHANGED
|
@@ -11,8 +11,8 @@ import { agentLogger } from "../utils/index.js";
|
|
|
11
11
|
import { createError, INVALID_ARGUMENT, toError } from "../errors/index.js";
|
|
12
12
|
import { COMMON_BLOCKED_PATTERNS, securityMiddleware } from "./middleware/security/validator.js";
|
|
13
13
|
import { withSpan } from "../observability/tracing/otlp-setup.js";
|
|
14
|
-
import { resolveConfiguredAgentModel } from "./runtime/model-resolution.js";
|
|
15
|
-
import { setEffectiveAgentSystem } from "./runtime/effective-agent-system.js";
|
|
14
|
+
import { resolveConfiguredAgentModel, resolveModelProviderOptionKey, resolveRuntimeModel, } from "./runtime/model-resolution.js";
|
|
15
|
+
import { createProviderAwareAgentSystemResolver, setEffectiveAgentSystem, } from "./runtime/effective-agent-system.js";
|
|
16
16
|
import { defineSchema } from "../schemas/index.js";
|
|
17
17
|
import { getMessageSchema } from "./schemas/agent.schema.js";
|
|
18
18
|
import { isRequestBodyTooLargeError, readBodyWithLimit, } from "../security/input-validation/limits.js";
|
|
@@ -20,8 +20,7 @@ import { DEFAULT_MAX_BODY_SIZE_BYTES } from "../utils/constants/index.js";
|
|
|
20
20
|
import { ensureBuiltinSchemaValidator } from "../extensions/builtin-schema-validator.js";
|
|
21
21
|
import { buildAgentDelegateTools, createInvokeAgentTool, INVOKE_AGENT_TOOL_ID, } from "./runtime/agent-delegation.js";
|
|
22
22
|
import { normalizeAgentDelegateIds } from "./runtime/agent-delegation-names.js";
|
|
23
|
-
import { buildAgentCallContext } from "./runtime/call-context.js";
|
|
24
|
-
import { flattenSystemInstructions } from "./runtime/tool-inventory.js";
|
|
23
|
+
import { buildAgentCallContext, buildAgentCallContextPreservingRuntimeMarker, } from "./runtime/call-context.js";
|
|
25
24
|
const STREAMING_HEADERS = {
|
|
26
25
|
"Content-Type": "text/event-stream",
|
|
27
26
|
"Cache-Control": "no-cache",
|
|
@@ -236,20 +235,32 @@ function resolveToolsConfiguration(input) {
|
|
|
236
235
|
function createAugmentedSystem(input) {
|
|
237
236
|
const { config, resolveSkillSnapshot } = input;
|
|
238
237
|
const originalSystem = config.system;
|
|
239
|
-
|
|
238
|
+
const augmentSystem = (resolvedBase, providerOptionKey, options) => {
|
|
240
239
|
// Owner-aware: omitted selectors advertise every skill visible to this
|
|
241
240
|
// agent (unowned project skills plus its own). Explicit lists, including
|
|
242
241
|
// an empty list, retain their authored catalog selection.
|
|
243
242
|
const snapshot = resolveSkillSnapshot();
|
|
244
|
-
const basePrompt =
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
243
|
+
const basePrompt = resolvedBase ?? "You are a helpful assistant.";
|
|
244
|
+
const preassembledSkillContext = config.__vfPreassembledSkillContext === true;
|
|
245
|
+
const anthropicProviderAlias = providerOptionKey ??
|
|
246
|
+
resolveModelProviderOptionKey(resolveRuntimeModel(config.model));
|
|
247
|
+
const contextInput = {
|
|
248
|
+
...(preassembledSkillContext
|
|
249
|
+
? {}
|
|
250
|
+
: { skills: snapshot.definitions.map(toRuntimeSkillDefinition) }),
|
|
249
251
|
...(config.projectContext ? { projectContext: config.projectContext } : {}),
|
|
250
252
|
...(config.environmentContext ? { environmentContext: config.environmentContext } : {}),
|
|
251
|
-
}
|
|
253
|
+
};
|
|
254
|
+
const buildCallContext = options?.preserveRuntimeContextMarker
|
|
255
|
+
? buildAgentCallContextPreservingRuntimeMarker
|
|
256
|
+
: buildAgentCallContext;
|
|
257
|
+
return buildCallContext({
|
|
258
|
+
instructions: basePrompt,
|
|
259
|
+
...(anthropicProviderAlias ? { anthropicProviderAlias } : {}),
|
|
260
|
+
...contextInput,
|
|
261
|
+
});
|
|
252
262
|
};
|
|
263
|
+
return createProviderAwareAgentSystemResolver(async (providerOptionKey) => augmentSystem(typeof originalSystem === "function" ? await originalSystem() : originalSystem, providerOptionKey), (resolvedBase, providerOptionKey, options) => Promise.resolve(augmentSystem(resolvedBase, providerOptionKey, options)));
|
|
253
264
|
}
|
|
254
265
|
/** Agent helper. */
|
|
255
266
|
export function agent(config) {
|
|
@@ -42,6 +42,8 @@ export type HostedChatRuntimeToolAssemblyResult = {
|
|
|
42
42
|
toolLoadingMode: RuntimeToolLoadingMode;
|
|
43
43
|
compatibleRemoteToolNames: string[];
|
|
44
44
|
systemInstructions: string;
|
|
45
|
+
/** Structured system messages preserved for provider dispatch. */
|
|
46
|
+
systemMessages?: ChatSystemMessage[];
|
|
45
47
|
};
|
|
46
48
|
/** Input payload for prepare hosted chat runtime tool assembly. */
|
|
47
49
|
export type PrepareHostedChatRuntimeToolAssemblyInput<TTraceAttributes extends HostToolTraceAttributes = HostToolTraceAttributes> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-runtime-tool-assembly.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/hosted/chat-runtime-tool-assembly.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAE5B,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,OAAO,EAEZ,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,8BAA8B,EAGpC,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAEL,KAAK,4CAA4C,EACjD,KAAK,6CAA6C,EAClD,KAAK,iDAAiD,EACtD,KAAK,wCAAwC,EAC9C,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAIzE,OAAO,EACL,KAAK,6BAA6B,EAGnC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAGL,KAAK,+BAA+B,EACrC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACxF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAGhF,qDAAqD;AACrD,MAAM,MAAM,oCAAoC,GAAG,8BAA8B,GAAG;IAClF,SAAS,EAAE,MAAM,CAAC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BAAuB,GAAG,uBAAuB,EAE1E,KAAK,EAAE,yCAAyC,CAAC,gBAAgB,CAAC,GACjE,OAAO,CAAC,mCAAmC,CAAC,CA2K9C"}
|
|
@@ -186,7 +186,11 @@ export async function prepareHostedChatRuntimeToolAssembly(input) {
|
|
|
186
186
|
input.taskContext.availableToolNames = modelVisibleToolNames;
|
|
187
187
|
const modelInstructions = input.renderInstructions?.(modelVisibleToolNames) ??
|
|
188
188
|
input.instructions;
|
|
189
|
-
const
|
|
189
|
+
const instructionsWithToolInventory = withRuntimeToolInventory(modelInstructions, modelVisibleToolNames);
|
|
190
|
+
const systemInstructions = flattenSystemInstructions(instructionsWithToolInventory);
|
|
191
|
+
const systemMessages = typeof modelInstructions === "string"
|
|
192
|
+
? undefined
|
|
193
|
+
: instructionsWithToolInventory;
|
|
190
194
|
if (input.preloadLatestConversationUserText !== false) {
|
|
191
195
|
const latestUserText = await fetchLatestConversationUserText({
|
|
192
196
|
apiUrl: input.apiUrl,
|
|
@@ -211,5 +215,6 @@ export async function prepareHostedChatRuntimeToolAssembly(input) {
|
|
|
211
215
|
toolLoadingMode,
|
|
212
216
|
compatibleRemoteToolNames,
|
|
213
217
|
systemInstructions,
|
|
218
|
+
...(systemMessages === undefined ? {} : { systemMessages }),
|
|
214
219
|
};
|
|
215
220
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { HostToolTraceAttributes } from "../../tool/index.js";
|
|
2
|
+
import type { AgentSystem } from "../types.js";
|
|
2
3
|
import { type HostedDurableChildForkRunContext } from "./child-fork-run-context.js";
|
|
3
4
|
import { type DefaultHostedChildForkToolAssemblyResult } from "./child-requested-tools.js";
|
|
4
5
|
import { type HostedChildForkInstructionsContext } from "./child-fork-instructions.js";
|
|
@@ -89,7 +90,7 @@ export type ExecuteHostedChildForkWithPreparedToolsInput<TAttributes extends Hos
|
|
|
89
90
|
sourceIntegrationPolicy?: SourceIntegrationPolicyManifest;
|
|
90
91
|
maxContinuationSteps?: number;
|
|
91
92
|
resolveSystem?: HostedChildForkRuntimeStepSystemResolver;
|
|
92
|
-
buildInstructions?: () =>
|
|
93
|
+
buildInstructions?: () => AgentSystem;
|
|
93
94
|
onBeforeStop?: StartHostedChildForkRuntimeWithHostToolsInput<TAttributes>["onBeforeStop"];
|
|
94
95
|
runStep?: AgentRuntimeForkStepRunner;
|
|
95
96
|
createRunContext?: (input: HostedChildForkExecutionRunContextFactoryInput<TAttributes>) => HostedDurableChildForkRunContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"child-fork-execution-runner.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/hosted/child-fork-execution-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"child-fork-execution-runner.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/hosted/child-fork-execution-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,OAAO,EAKL,KAAK,gCAAgC,EACtC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,wCAAwC,EAAE,MAAM,4BAA4B,CAAC;AAK3F,OAAO,EAEL,KAAK,kCAAkC,EACxC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,wCAAwC,EAE9C,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,KAAK,6BAA6B,EAElC,KAAK,6CAA6C,EACnD,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,0BAA0B,EAEhC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEL,KAAK,8BAA8B,EAEpC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACV,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,K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BAAuB,GAAG,uBAAuB,EAErE,KAAK,EAAE,4CAA4C,CAAC,WAAW,CAAC,GAC/D,OAAO,CAAC,uBAAuB,CAAC,CA2BlC"}
|
|
@@ -48,11 +48,13 @@ function createForkRunContext(input) {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
function defaultResolveSystem(input) {
|
|
51
|
+
const currentSystem = input.structuredSystem
|
|
52
|
+
? [...input.structuredSystem]
|
|
53
|
+
: input.system;
|
|
51
54
|
if (!shouldReinforceLoadSkillContinuation([...input.compactedMessages])) {
|
|
52
|
-
return
|
|
55
|
+
return currentSystem;
|
|
53
56
|
}
|
|
54
|
-
|
|
55
|
-
return typeof remindedSystem === "string" ? remindedSystem : input.system;
|
|
57
|
+
return addLoadSkillContinuationReminder(currentSystem);
|
|
56
58
|
}
|
|
57
59
|
async function executeHostedChildForkToolInputWithoutWriterAuthority(input, runEventWriterCapability) {
|
|
58
60
|
const requestedProjectReference = input.forkInput.project_reference;
|
|
@@ -180,6 +182,7 @@ async function executeHostedChildForkWithoutWriterAuthority(input, runContext, s
|
|
|
180
182
|
messages,
|
|
181
183
|
buildInstructions: prepareBuildInstructions,
|
|
182
184
|
forkToolNames,
|
|
185
|
+
providerOptionKey: input.provider,
|
|
183
186
|
resolveSystem: input.resolveSystem ?? defaultResolveSystem,
|
|
184
187
|
}),
|
|
185
188
|
runStep: input.runStep ?? runAgentRuntimeForkStep,
|