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
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type SyncFileSnapshot } from "../../sync/state.js";
|
|
2
|
+
export interface PushFileContent {
|
|
3
|
+
path: string;
|
|
4
|
+
content: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PushRemoteFile {
|
|
7
|
+
path: string;
|
|
8
|
+
content?: string;
|
|
9
|
+
version_id?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface PlannedUpload extends PushFileContent {
|
|
12
|
+
expectedVersionId?: string;
|
|
13
|
+
expectedAbsent?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface PlannedDelete {
|
|
16
|
+
path: string;
|
|
17
|
+
expectedVersionId?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface PushChangePlan {
|
|
20
|
+
uploads: PlannedUpload[];
|
|
21
|
+
deletes: PlannedDelete[];
|
|
22
|
+
conflicts: string[];
|
|
23
|
+
nextFiles: Record<string, SyncFileSnapshot>;
|
|
24
|
+
}
|
|
25
|
+
export interface PlanPushChangesOptions {
|
|
26
|
+
localFiles: readonly PushFileContent[];
|
|
27
|
+
remoteFiles: readonly PushRemoteFile[];
|
|
28
|
+
baselineFiles: Readonly<Record<string, SyncFileSnapshot>>;
|
|
29
|
+
deletePaths: readonly string[];
|
|
30
|
+
force: boolean;
|
|
31
|
+
/** Treat the exact remote snapshot as the baseline for a newly created branch. */
|
|
32
|
+
remoteFilesAreBaseline?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare function planPushChanges(options: PlanPushChangesOptions): Promise<PushChangePlan>;
|
|
35
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/push/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAElF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAc,SAAQ,eAAe;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,SAAS,eAAe,EAAE,CAAC;IACvC,WAAW,EAAE,SAAS,cAAc,EAAE,CAAC;IACvC,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC1D,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,kFAAkF;IAClF,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAgBD,wBAAsB,eAAe,CACnC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,cAAc,CAAC,CAqGzB"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { computeContentDigest } from "../../sync/state.js";
|
|
2
|
+
function requiredVersionId(file) {
|
|
3
|
+
if (file.version_id)
|
|
4
|
+
return file.version_id;
|
|
5
|
+
throw new Error(`Veryfront did not return a version ID for "${file.path}". The CLI cannot safely push this file. Run veryfront pull and try again.`);
|
|
6
|
+
}
|
|
7
|
+
function requiredContent(file) {
|
|
8
|
+
if (typeof file.content === "string")
|
|
9
|
+
return file.content;
|
|
10
|
+
throw new Error(`Veryfront returned invalid content for remote file "${file.path}". No files were pushed.`);
|
|
11
|
+
}
|
|
12
|
+
export async function planPushChanges(options) {
|
|
13
|
+
const remoteByPath = new Map();
|
|
14
|
+
const remoteDigests = new Map();
|
|
15
|
+
const nextFiles = {};
|
|
16
|
+
for (const file of options.remoteFiles) {
|
|
17
|
+
if (remoteByPath.has(file.path)) {
|
|
18
|
+
throw new Error(`Veryfront returned duplicate remote file path "${file.path}".`);
|
|
19
|
+
}
|
|
20
|
+
const digest = await computeContentDigest(requiredContent(file));
|
|
21
|
+
remoteByPath.set(file.path, file);
|
|
22
|
+
remoteDigests.set(file.path, digest);
|
|
23
|
+
nextFiles[file.path] = {
|
|
24
|
+
digest,
|
|
25
|
+
...(file.version_id ? { versionId: file.version_id } : {}),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const uploads = [];
|
|
29
|
+
const deletes = [];
|
|
30
|
+
const conflicts = new Set();
|
|
31
|
+
for (const local of options.localFiles) {
|
|
32
|
+
const localDigest = await computeContentDigest(local.content);
|
|
33
|
+
const remote = remoteByPath.get(local.path);
|
|
34
|
+
const baseline = options.baselineFiles[local.path];
|
|
35
|
+
if (options.force) {
|
|
36
|
+
uploads.push({ path: local.path, content: local.content });
|
|
37
|
+
nextFiles[local.path] = { digest: localDigest };
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if (remote && remoteDigests.get(local.path) === localDigest) {
|
|
41
|
+
nextFiles[local.path] = {
|
|
42
|
+
digest: localDigest,
|
|
43
|
+
...(remote.version_id ? { versionId: remote.version_id } : {}),
|
|
44
|
+
};
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
if (!remote) {
|
|
48
|
+
if (!options.remoteFilesAreBaseline && baseline) {
|
|
49
|
+
conflicts.add(local.path);
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
uploads.push({ path: local.path, content: local.content, expectedAbsent: true });
|
|
53
|
+
nextFiles[local.path] = { digest: localDigest };
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const remoteDigest = remoteDigests.get(local.path);
|
|
57
|
+
if (!options.remoteFilesAreBaseline &&
|
|
58
|
+
(!baseline || baseline.digest !== remoteDigest)) {
|
|
59
|
+
conflicts.add(local.path);
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
uploads.push({
|
|
63
|
+
path: local.path,
|
|
64
|
+
content: local.content,
|
|
65
|
+
expectedVersionId: requiredVersionId(remote),
|
|
66
|
+
});
|
|
67
|
+
nextFiles[local.path] = { digest: localDigest };
|
|
68
|
+
}
|
|
69
|
+
for (const path of options.deletePaths) {
|
|
70
|
+
const remote = remoteByPath.get(path);
|
|
71
|
+
if (!remote) {
|
|
72
|
+
delete nextFiles[path];
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (options.force) {
|
|
76
|
+
deletes.push({ path });
|
|
77
|
+
delete nextFiles[path];
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const baseline = options.baselineFiles[path];
|
|
81
|
+
const remoteDigest = remoteDigests.get(path);
|
|
82
|
+
if (!options.remoteFilesAreBaseline &&
|
|
83
|
+
(!baseline || baseline.digest !== remoteDigest)) {
|
|
84
|
+
conflicts.add(path);
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
deletes.push({ path, expectedVersionId: requiredVersionId(remote) });
|
|
88
|
+
delete nextFiles[path];
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
uploads,
|
|
92
|
+
deletes,
|
|
93
|
+
conflicts: [...conflicts].sort(),
|
|
94
|
+
nextFiles,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ParsedArgs } from "../../shared/types.js";
|
|
2
2
|
import { type CreateScheduleRunFromSourceResult, type Run, type VeryfrontRunsClient } from "../../../src/runs/index.js";
|
|
3
|
-
import { type
|
|
3
|
+
import { type ScheduleDefinition } from "../../../src/schedule/index.js";
|
|
4
|
+
import { type ResolvedTriggerTarget, type TriggerTarget } from "../../../src/trigger/index.js";
|
|
4
5
|
interface RemoteSchedulePollOptions {
|
|
5
6
|
now?: () => number;
|
|
6
7
|
sleep?: (delayMs: number) => Promise<void>;
|
|
@@ -22,9 +23,27 @@ export interface LocalScheduleTimeout {
|
|
|
22
23
|
*/
|
|
23
24
|
export declare function createLocalScheduleTimeout(timeoutSeconds: number | undefined, options?: LocalScheduleTimeoutOptions): LocalScheduleTimeout;
|
|
24
25
|
export declare function normalizeLocalScheduleInput(value: unknown): Record<string, unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* Build the local agent run options for one scheduled occurrence.
|
|
28
|
+
*
|
|
29
|
+
* Addressing comes from the canonical target, falling back to the legacy
|
|
30
|
+
* `input._schedule_target` channel written by older SDKs. Prompt content comes
|
|
31
|
+
* from `agentMessage.prompt`, falling back to the legacy `input.prompt`.
|
|
32
|
+
*
|
|
33
|
+
* Neither fallback may drop authored content, and this function is what
|
|
34
|
+
* supplies that invariant here: `--input` replaces the authored input without
|
|
35
|
+
* passing through `schedule()`, so an operator file can disagree with the
|
|
36
|
+
* definition no matter what the definition itself was validated against. Two
|
|
37
|
+
* declarations of one value that disagree are rejected rather than resolved,
|
|
38
|
+
* leaving only the equal-or-absent case for the fallbacks to read.
|
|
39
|
+
*/
|
|
40
|
+
export declare function toScheduleAgentOptions(schedule: ScheduleDefinition, input: Record<string, unknown>): {
|
|
41
|
+
agentInput?: string;
|
|
42
|
+
agentContext?: Record<string, unknown>;
|
|
43
|
+
};
|
|
25
44
|
export declare function waitForRemoteScheduleRun(client: Pick<VeryfrontRunsClient, "get">, accepted: CreateScheduleRunFromSourceResult, options?: RemoteSchedulePollOptions): Promise<Run>;
|
|
26
45
|
export declare function formatRemoteScheduleRunOutput(run: Run): Record<string, unknown>;
|
|
27
|
-
export declare function resolveRemoteScheduleTarget(run: Run, fallback: TriggerTarget):
|
|
46
|
+
export declare function resolveRemoteScheduleTarget(run: Run, fallback: TriggerTarget): ResolvedTriggerTarget;
|
|
28
47
|
export declare function handleScheduleCommand(args: ParsedArgs): Promise<void>;
|
|
29
48
|
export {};
|
|
30
49
|
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/schedule/handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAUxD,OAAO,EAEL,KAAK,iCAAiC,EACtC,KAAK,GAAG,EACR,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/schedule/handler.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAUxD,OAAO,EAEL,KAAK,iCAAiC,EACtC,KAAK,GAAG,EACR,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAKL,KAAK,qBAAqB,EAE1B,KAAK,aAAa,EACnB,MAAM,+BAA+B,CAAC;AAyDvC,UAAU,yBAAyB;IACjC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5C;AAED,UAAU,2BAA2B;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;IACpF,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,KAAK,IAAI,CAAC;CAC/D;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,OAAO,GAAE,2BAAgC,GACxC,oBAAoB,CAmDtB;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAOnF;AAiBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,kBAAkB,EAC5B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAoDjE;AAED,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,EACxC,QAAQ,EAAE,iCAAiC,EAC3C,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,GAAG,CAAC,CAwDd;AAED,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAO/E;AAED,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,aAAa,GACtB,qBAAqB,CA0BvB;AAiCD,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAuF3E"}
|
|
@@ -6,8 +6,8 @@ import { exitProcess } from "../../utils/index.js";
|
|
|
6
6
|
import { defineSchema, lazySchema } from "../../../src/schemas/index.js";
|
|
7
7
|
import { DEPLOYMENT_ERROR, DEPLOYMENT_VERIFICATION_TIMEOUT, INVALID_ARGUMENT, RESOURCE_NOT_FOUND, } from "../../../src/errors/index.js";
|
|
8
8
|
import { createRunsClient, } from "../../../src/runs/index.js";
|
|
9
|
-
import { discoverSchedules } from "../../../src/schedule/index.js";
|
|
10
|
-
import { isTriggerId, isTriggerTarget, runTriggerTarget, } from "../../../src/trigger/index.js";
|
|
9
|
+
import { discoverSchedules, legacyScheduleTargetDiagnostic, } from "../../../src/schedule/index.js";
|
|
10
|
+
import { conversationConflictDiagnostic, declarationConflictDiagnostic, isTriggerId, isTriggerTarget, runTriggerTarget, } from "../../../src/trigger/index.js";
|
|
11
11
|
import { outputTriggerList, outputTriggerRun, readJsonFile } from "../trigger-utils.js";
|
|
12
12
|
const REMOTE_SCHEDULE_POLL_INTERVAL_MS = 1_000;
|
|
13
13
|
const REMOTE_SCHEDULE_TIMEOUT_GRACE_MS = 30_000;
|
|
@@ -112,6 +112,70 @@ export function normalizeLocalScheduleInput(value) {
|
|
|
112
112
|
}
|
|
113
113
|
return value;
|
|
114
114
|
}
|
|
115
|
+
/** Read the conversation pair from the legacy `input._schedule_target` channel. */
|
|
116
|
+
function readLegacyScheduleConversation(input) {
|
|
117
|
+
const legacyTarget = input._schedule_target;
|
|
118
|
+
if (!legacyTarget || typeof legacyTarget !== "object" || Array.isArray(legacyTarget)) {
|
|
119
|
+
return { conversationMode: undefined, conversationId: undefined };
|
|
120
|
+
}
|
|
121
|
+
const record = legacyTarget;
|
|
122
|
+
return {
|
|
123
|
+
conversationMode: record.conversationMode,
|
|
124
|
+
conversationId: record.conversationId,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Build the local agent run options for one scheduled occurrence.
|
|
129
|
+
*
|
|
130
|
+
* Addressing comes from the canonical target, falling back to the legacy
|
|
131
|
+
* `input._schedule_target` channel written by older SDKs. Prompt content comes
|
|
132
|
+
* from `agentMessage.prompt`, falling back to the legacy `input.prompt`.
|
|
133
|
+
*
|
|
134
|
+
* Neither fallback may drop authored content, and this function is what
|
|
135
|
+
* supplies that invariant here: `--input` replaces the authored input without
|
|
136
|
+
* passing through `schedule()`, so an operator file can disagree with the
|
|
137
|
+
* definition no matter what the definition itself was validated against. Two
|
|
138
|
+
* declarations of one value that disagree are rejected rather than resolved,
|
|
139
|
+
* leaving only the equal-or-absent case for the fallbacks to read.
|
|
140
|
+
*/
|
|
141
|
+
export function toScheduleAgentOptions(schedule, input) {
|
|
142
|
+
const target = schedule.target;
|
|
143
|
+
if (target.kind !== "agent")
|
|
144
|
+
return {};
|
|
145
|
+
const legacyConversation = readLegacyScheduleConversation(input);
|
|
146
|
+
// `--input <file>` never passes through `schedule()`, so the operator file's
|
|
147
|
+
// own shape is unvalidated until here. Without this, a misspelled key or a
|
|
148
|
+
// bogus mode in that file is read as absent and the run silently proceeds
|
|
149
|
+
// standalone -- the same silent drop this contract exists to remove.
|
|
150
|
+
const legacyTargetDetail = legacyScheduleTargetDiagnostic(input, legacyConversation);
|
|
151
|
+
if (legacyTargetDetail !== null) {
|
|
152
|
+
throw INVALID_ARGUMENT.create({ detail: legacyTargetDetail });
|
|
153
|
+
}
|
|
154
|
+
const conflictDetail = conversationConflictDiagnostic("Schedule", "input._schedule_target", target, legacyConversation.conversationMode, legacyConversation.conversationId) ??
|
|
155
|
+
declarationConflictDiagnostic("Schedule", "agentMessage.prompt", "input.prompt", schedule.agentMessage?.prompt, input.prompt);
|
|
156
|
+
if (conflictDetail !== null) {
|
|
157
|
+
throw INVALID_ARGUMENT.create({ detail: conflictDetail });
|
|
158
|
+
}
|
|
159
|
+
const conversationMode = target.conversationMode ??
|
|
160
|
+
legacyConversation.conversationMode;
|
|
161
|
+
if (conversationMode === "existing") {
|
|
162
|
+
throw INVALID_ARGUMENT.create({
|
|
163
|
+
detail: "Local scheduled agent runs cannot attach to an existing cloud conversation.",
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
const scheduleName = schedule.name ?? schedule.id;
|
|
167
|
+
const prompt = schedule.agentMessage?.prompt ?? input.prompt;
|
|
168
|
+
return {
|
|
169
|
+
agentInput: typeof prompt === "string" && prompt.trim().length > 0
|
|
170
|
+
? prompt
|
|
171
|
+
: `Run scheduled agent ${target.id} for ${scheduleName}`,
|
|
172
|
+
agentContext: {
|
|
173
|
+
trigger: "schedule",
|
|
174
|
+
schedule: { id: schedule.id, name: scheduleName },
|
|
175
|
+
forwardedProps: input,
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
}
|
|
115
179
|
export async function waitForRemoteScheduleRun(client, accepted, options = {}) {
|
|
116
180
|
if (!Number.isSafeInteger(accepted.timeoutSeconds) ||
|
|
117
181
|
accepted.timeoutSeconds <= 0) {
|
|
@@ -192,8 +256,14 @@ export function resolveRemoteScheduleTarget(run, fallback) {
|
|
|
192
256
|
const kind = run.target.slice(0, separator);
|
|
193
257
|
const id = run.target.slice(separator + 1).trim();
|
|
194
258
|
const candidate = { kind, id };
|
|
195
|
-
if (isTriggerTarget(candidate))
|
|
259
|
+
if (isTriggerTarget(candidate)) {
|
|
260
|
+
if (fallbackTarget !== null &&
|
|
261
|
+
fallbackTarget.kind === candidate.kind &&
|
|
262
|
+
fallbackTarget.id === candidate.id) {
|
|
263
|
+
return fallbackTarget;
|
|
264
|
+
}
|
|
196
265
|
return candidate;
|
|
266
|
+
}
|
|
197
267
|
if (fallbackTarget !== null)
|
|
198
268
|
return fallbackTarget;
|
|
199
269
|
throw new Error("Remote schedule returned an invalid target.");
|
|
@@ -268,30 +338,7 @@ export async function handleScheduleCommand(args) {
|
|
|
268
338
|
throw RESOURCE_NOT_FOUND.create({ detail: `Schedule "${opts.id}" not found.` });
|
|
269
339
|
}
|
|
270
340
|
const triggerInput = normalizeLocalScheduleInput(opts.input === undefined ? schedule.input ?? {} : input);
|
|
271
|
-
const
|
|
272
|
-
const scheduleName = schedule.name ?? schedule.id;
|
|
273
|
-
const scheduleTarget = scheduleConfig._schedule_target;
|
|
274
|
-
const conversationMode = scheduleTarget && typeof scheduleTarget === "object" &&
|
|
275
|
-
!Array.isArray(scheduleTarget)
|
|
276
|
-
? scheduleTarget.conversationMode
|
|
277
|
-
: undefined;
|
|
278
|
-
if (schedule.target.kind === "agent" && conversationMode === "existing") {
|
|
279
|
-
throw INVALID_ARGUMENT.create({
|
|
280
|
-
detail: "Local scheduled agent runs cannot attach to an existing cloud conversation.",
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
const agentRunOptions = schedule.target.kind === "agent"
|
|
284
|
-
? {
|
|
285
|
-
agentInput: typeof scheduleConfig.prompt === "string" && scheduleConfig.prompt.trim().length > 0
|
|
286
|
-
? scheduleConfig.prompt
|
|
287
|
-
: `Run scheduled agent ${schedule.target.id} for ${scheduleName}`,
|
|
288
|
-
agentContext: {
|
|
289
|
-
trigger: "schedule",
|
|
290
|
-
schedule: { id: schedule.id, name: scheduleName },
|
|
291
|
-
forwardedProps: scheduleConfig,
|
|
292
|
-
},
|
|
293
|
-
}
|
|
294
|
-
: {};
|
|
341
|
+
const agentRunOptions = toScheduleAgentOptions(schedule, triggerInput);
|
|
295
342
|
const timeout = createLocalScheduleTimeout(schedule.timeoutSeconds);
|
|
296
343
|
const run = await (async () => {
|
|
297
344
|
try {
|
|
@@ -5,7 +5,7 @@ export const schemaHelp = {
|
|
|
5
5
|
usage: "veryfront schema [command] [options]",
|
|
6
6
|
options: [
|
|
7
7
|
{ flag: "--json", description: "Output as JSON (default for this command)" },
|
|
8
|
-
{ flag: "--category <cat>", description: "Filter commands by category" },
|
|
8
|
+
{ flag: "-c, --category <cat>", description: "Filter commands by category" },
|
|
9
9
|
],
|
|
10
10
|
examples: [
|
|
11
11
|
"veryfront schema --json",
|
|
@@ -100,7 +100,7 @@ function formatUpDryRunPlan(plan) {
|
|
|
100
100
|
export async function upCommand(options = {}, env = getEnvironmentConfig(), dependencies = {}) {
|
|
101
101
|
const { projectDir = cwd(), force = false, dryRun = false } = options;
|
|
102
102
|
const jsonOutput = isJsonMode();
|
|
103
|
-
const userInfo = await ensureAuthenticated(env);
|
|
103
|
+
const userInfo = await ensureAuthenticated(env, projectDir);
|
|
104
104
|
if (!userInfo) {
|
|
105
105
|
if (jsonOutput) {
|
|
106
106
|
const message = "Not authenticated. Set VERYFRONT_API_TOKEN or run veryfront login.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/webhook/handler.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAKxD,OAAO,EAGL,KAAK,yBAAyB,EAG/B,MAAM,+BAA+B,CAAC;AA2BvC,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,yBAAyB,GACpC;IACD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC,
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/webhook/handler.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAKxD,OAAO,EAGL,KAAK,yBAAyB,EAG/B,MAAM,+BAA+B,CAAC;AA2BvC,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,yBAAyB,GACpC;IACD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC,CA8BA;AA4CD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAqE1E"}
|
|
@@ -26,7 +26,9 @@ export function toWebhookAgentOptions(invocation) {
|
|
|
26
26
|
const webhook = invocation.definition;
|
|
27
27
|
if (webhook.target.kind !== "agent")
|
|
28
28
|
return {};
|
|
29
|
-
|
|
29
|
+
const conversationMode = webhook.target.conversationMode ??
|
|
30
|
+
webhook.agentMessage?.conversationMode;
|
|
31
|
+
if (conversationMode === "existing") {
|
|
30
32
|
throw INVALID_ARGUMENT.create({
|
|
31
33
|
detail: "Local agent webhook runs cannot attach to an existing cloud conversation.",
|
|
32
34
|
});
|
package/esm/cli/router.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/cli/router.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/cli/router.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAoIpD;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAqJlE"}
|
package/esm/cli/router.js
CHANGED
|
@@ -46,6 +46,17 @@ const commands = {
|
|
|
46
46
|
"login": async () => async (args) => {
|
|
47
47
|
const { parseLoginMethod, parseProvider } = await import("./auth/utils.js");
|
|
48
48
|
const provider = parseProvider(args);
|
|
49
|
+
const method = parseLoginMethod(args);
|
|
50
|
+
if (isJsonMode() && (provider || method)) {
|
|
51
|
+
await outputCliJsonError("login", {
|
|
52
|
+
code: "USAGE_ERROR",
|
|
53
|
+
slug: "invalid-arguments",
|
|
54
|
+
registrySlug: "invalid-argument",
|
|
55
|
+
message: "Explicit login methods are not supported with --json.",
|
|
56
|
+
});
|
|
57
|
+
exitProcess(2);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
49
60
|
// Every branch reports failure the same way: exit non-zero so scripts can
|
|
50
61
|
// tell a failed login from a successful one, whichever credential was asked for.
|
|
51
62
|
if (provider === "anthropic") {
|
|
@@ -61,7 +72,7 @@ const commands = {
|
|
|
61
72
|
return;
|
|
62
73
|
}
|
|
63
74
|
const { login } = await import("./auth/index.js");
|
|
64
|
-
if (!await login(
|
|
75
|
+
if (!await login(method))
|
|
65
76
|
exitProcess(1);
|
|
66
77
|
},
|
|
67
78
|
"logout": async () => async (args) => {
|
|
@@ -177,7 +188,13 @@ export async function routeCommand(args) {
|
|
|
177
188
|
return;
|
|
178
189
|
}
|
|
179
190
|
const command = args._[0];
|
|
180
|
-
|
|
191
|
+
const secondCommand = args._[1];
|
|
192
|
+
const duplicatedBinaryTarget = command === "veryfront" &&
|
|
193
|
+
typeof secondCommand === "string" &&
|
|
194
|
+
(secondCommand === "help" || Object.hasOwn(commands, secondCommand))
|
|
195
|
+
? secondCommand
|
|
196
|
+
: undefined;
|
|
197
|
+
if ((args.help || args.h) && !duplicatedBinaryTarget) {
|
|
181
198
|
showHelp(command, args.all === true);
|
|
182
199
|
await updateCheck;
|
|
183
200
|
exitProcess(0);
|
|
@@ -196,7 +213,9 @@ export async function routeCommand(args) {
|
|
|
196
213
|
const { COMMANDS } = await import("./help/command-definitions.js");
|
|
197
214
|
// Use canonical command names from help registry (excludes aliases like "g", "preview")
|
|
198
215
|
const canonicalNames = Object.keys(COMMANDS);
|
|
199
|
-
const suggestions =
|
|
216
|
+
const suggestions = duplicatedBinaryTarget
|
|
217
|
+
? [duplicatedBinaryTarget]
|
|
218
|
+
: suggestCommand(command, canonicalNames);
|
|
200
219
|
if (isJsonMode()) {
|
|
201
220
|
await outputCliJsonError(command, {
|
|
202
221
|
code: "USAGE_ERROR",
|
|
@@ -208,7 +227,10 @@ export async function routeCommand(args) {
|
|
|
208
227
|
return;
|
|
209
228
|
}
|
|
210
229
|
cliLogger.error(`Unknown command: ${command}\n`);
|
|
211
|
-
if (
|
|
230
|
+
if (duplicatedBinaryTarget) {
|
|
231
|
+
cliLogger.info(' You already included "veryfront". Remove the extra "veryfront" argument and run the command again.');
|
|
232
|
+
}
|
|
233
|
+
else if (suggestions.length > 0) {
|
|
212
234
|
cliLogger.info(` Did you mean?`);
|
|
213
235
|
for (const s of suggestions) {
|
|
214
236
|
const desc = COMMANDS[s]?.description ?? "";
|
|
@@ -218,7 +240,7 @@ export async function routeCommand(args) {
|
|
|
218
240
|
else {
|
|
219
241
|
showHelp();
|
|
220
242
|
}
|
|
221
|
-
exitProcess(
|
|
243
|
+
exitProcess(2);
|
|
222
244
|
return;
|
|
223
245
|
}
|
|
224
246
|
await cliErrorBoundary(async () => {
|
package/esm/cli/shared/args.d.ts
CHANGED
|
@@ -36,6 +36,10 @@ export interface ArgSpec {
|
|
|
36
36
|
export type ArgMap<T> = {
|
|
37
37
|
[K in keyof T]?: ArgSpec;
|
|
38
38
|
};
|
|
39
|
+
export interface ArgParserOptions {
|
|
40
|
+
/** Reject option keys that the command parser does not consume. */
|
|
41
|
+
rejectUnknown?: boolean;
|
|
42
|
+
}
|
|
39
43
|
/**
|
|
40
44
|
* Extract a single argument value from parsed args
|
|
41
45
|
*/
|
|
@@ -68,7 +72,7 @@ export declare function extractArgs<T>(args: ParsedArgs, argMap: ArgMap<T>): Rec
|
|
|
68
72
|
* }
|
|
69
73
|
* ```
|
|
70
74
|
*/
|
|
71
|
-
export declare function createArgParser<T>(schema: Schema<T>, argMap: ArgMap<T
|
|
75
|
+
export declare function createArgParser<T>(schema: Schema<T>, argMap: ArgMap<T>, options?: ArgParserOptions): (args: ParsedArgs) => SafeParseResult<T>;
|
|
72
76
|
/**
|
|
73
77
|
* Parse args with a parser function and throw on failure.
|
|
74
78
|
* Eliminates the repeated parse-validate-throw boilerplate in handlers.
|
|
@@ -127,6 +131,16 @@ export declare const CommonArgs: {
|
|
|
127
131
|
type: "boolean";
|
|
128
132
|
};
|
|
129
133
|
};
|
|
134
|
+
/** Boolean options accepted by every command, regardless of the command word. */
|
|
135
|
+
export declare const GLOBAL_BOOLEAN_FLAGS: ReadonlySet<string>;
|
|
136
|
+
/**
|
|
137
|
+
* Boolean options used when the command word cannot resolve an option's arity —
|
|
138
|
+
* an unknown command, or a flag that appears before the command word. Every
|
|
139
|
+
* documented long-name boolean in `COMMANDS` must be listed here, otherwise it
|
|
140
|
+
* is parsed as value-taking and swallows the positional that follows it.
|
|
141
|
+
* `cli/shared/args.test.ts` asserts that invariant.
|
|
142
|
+
*/
|
|
143
|
+
export declare const BOOLEAN_FLAGS: ReadonlySet<string>;
|
|
130
144
|
/** Parse raw CLI arguments into a structured `ParsedArgs` object with aliases. */
|
|
131
145
|
export declare function parseCliArgs(args: string[]): ParsedArgs;
|
|
132
146
|
//# sourceMappingURL=args.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../../src/cli/shared/args.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../../src/cli/shared/args.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAGnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,gFAAgF;AAChF,MAAM,MAAM,eAAe,CAAC,CAAC,IACzB;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GACzC;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,KAAK,GAAG;QAAE,MAAM,EAAE,OAAO,EAAE,CAAA;KAAE,CAAA;CAAE,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,oEAAoE;IACpE,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,2EAA2E;IAC3E,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;IAChD,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI;KACrB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO;CACzB,CAAC;AAEF,MAA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
6
|
* @module cli/shared/args
|
|
7
7
|
*/
|
|
8
8
|
import { COMMANDS } from "../help/command-definitions.js";
|
|
9
|
+
import { suggestCommand } from "./suggest.js";
|
|
10
|
+
const ROUTER_ARG_KEYS = new Set([
|
|
11
|
+
"color",
|
|
12
|
+
"h",
|
|
13
|
+
"help",
|
|
14
|
+
"j",
|
|
15
|
+
"json",
|
|
16
|
+
"no-animation",
|
|
17
|
+
"no-color",
|
|
18
|
+
"no-input",
|
|
19
|
+
"o",
|
|
20
|
+
"output",
|
|
21
|
+
"q",
|
|
22
|
+
"quiet",
|
|
23
|
+
"v",
|
|
24
|
+
"verbose",
|
|
25
|
+
"version",
|
|
26
|
+
"y",
|
|
27
|
+
"yes",
|
|
28
|
+
]);
|
|
29
|
+
function optionName(key) {
|
|
30
|
+
return `${key.length === 1 ? "-" : "--"}${key}`;
|
|
31
|
+
}
|
|
32
|
+
function validateKnownOptions(args, argMap) {
|
|
33
|
+
const commandKeys = Object.values(argMap)
|
|
34
|
+
.flatMap((spec) => spec?.keys ?? []);
|
|
35
|
+
const allowedKeys = new Set([...commandKeys, ...ROUTER_ARG_KEYS]);
|
|
36
|
+
const unknownKey = Object.keys(args).find((key) => key !== "_" && key !== "__explicit" && !allowedKeys.has(key));
|
|
37
|
+
if (!unknownKey)
|
|
38
|
+
return { success: true, data: undefined };
|
|
39
|
+
const suggestion = suggestCommand(unknownKey, commandKeys.filter((key) => key.length > 1), Math.min(4, Math.max(2, Math.ceil(unknownKey.length * 0.35))))[0];
|
|
40
|
+
const hint = suggestion ? ` Did you mean ${optionName(suggestion)}?` : "";
|
|
41
|
+
const error = Object.assign(new Error(`Unknown option ${optionName(unknownKey)}.${hint}`), { issues: [] });
|
|
42
|
+
return { success: false, error };
|
|
43
|
+
}
|
|
9
44
|
function coerceValue(value, type) {
|
|
10
45
|
if (type === "boolean")
|
|
11
46
|
return parseBooleanValue(value) ?? String(value);
|
|
@@ -78,8 +113,13 @@ export function extractArgs(args, argMap) {
|
|
|
78
113
|
* }
|
|
79
114
|
* ```
|
|
80
115
|
*/
|
|
81
|
-
export function createArgParser(schema, argMap) {
|
|
116
|
+
export function createArgParser(schema, argMap, options = {}) {
|
|
82
117
|
return function parseArgs(args) {
|
|
118
|
+
if (options.rejectUnknown) {
|
|
119
|
+
const knownOptions = validateKnownOptions(args, argMap);
|
|
120
|
+
if (!knownOptions.success)
|
|
121
|
+
return knownOptions;
|
|
122
|
+
}
|
|
83
123
|
const result = schema.safeParse(extractArgs(args, argMap));
|
|
84
124
|
if (result.success) {
|
|
85
125
|
return { success: true, data: result.data };
|
|
@@ -121,7 +161,8 @@ export const CommonArgs = {
|
|
|
121
161
|
// Low-level parser that converts process argv into a ParsedArgs object.
|
|
122
162
|
// Used once in cli/main.ts before routing to individual command handlers.
|
|
123
163
|
const ARRAY_FLAGS = new Set(["with", "candidate-model"]);
|
|
124
|
-
|
|
164
|
+
/** Boolean options accepted by every command, regardless of the command word. */
|
|
165
|
+
export const GLOBAL_BOOLEAN_FLAGS = new Set([
|
|
125
166
|
"help",
|
|
126
167
|
"version",
|
|
127
168
|
"json",
|
|
@@ -147,7 +188,14 @@ function getDocumentedFlagKind(key, positionalArgs) {
|
|
|
147
188
|
}
|
|
148
189
|
return undefined;
|
|
149
190
|
}
|
|
150
|
-
|
|
191
|
+
/**
|
|
192
|
+
* Boolean options used when the command word cannot resolve an option's arity —
|
|
193
|
+
* an unknown command, or a flag that appears before the command word. Every
|
|
194
|
+
* documented long-name boolean in `COMMANDS` must be listed here, otherwise it
|
|
195
|
+
* is parsed as value-taking and swallows the positional that follows it.
|
|
196
|
+
* `cli/shared/args.test.ts` asserts that invariant.
|
|
197
|
+
*/
|
|
198
|
+
export const BOOLEAN_FLAGS = new Set([
|
|
151
199
|
"all",
|
|
152
200
|
"auto",
|
|
153
201
|
"binary",
|
|
@@ -183,14 +231,19 @@ const BOOLEAN_FLAGS = new Set([
|
|
|
183
231
|
"open",
|
|
184
232
|
"parallel",
|
|
185
233
|
"prefetch",
|
|
234
|
+
"prune",
|
|
186
235
|
"quiet",
|
|
187
236
|
"recursive",
|
|
237
|
+
"remote",
|
|
238
|
+
"require-export",
|
|
239
|
+
"site",
|
|
188
240
|
"skip-env-prompt",
|
|
189
241
|
"skip-install",
|
|
190
242
|
"split",
|
|
191
243
|
"ssg",
|
|
192
244
|
"strict",
|
|
193
245
|
"studio",
|
|
246
|
+
"token",
|
|
194
247
|
"update",
|
|
195
248
|
"verbose",
|
|
196
249
|
"verify",
|
|
@@ -44,6 +44,13 @@ export declare const ResolvedConfigSchema: import("../../src/internal-agents/sch
|
|
|
44
44
|
projectId: import("../../src/internal-agents/schema.js").Schema<string | undefined>;
|
|
45
45
|
}>>;
|
|
46
46
|
export type ResolvedConfig = InferSchema<ReturnType<typeof getResolvedConfigSchema>>;
|
|
47
|
+
export type ApiTokenSource = NonNullable<ResolvedConfig["apiTokenSource"]>;
|
|
48
|
+
export interface ApiCredentialCandidate {
|
|
49
|
+
apiToken: string;
|
|
50
|
+
apiTokenSource: ApiTokenSource;
|
|
51
|
+
validationEnv: EnvironmentConfig;
|
|
52
|
+
authoritative: boolean;
|
|
53
|
+
}
|
|
47
54
|
export type ProjectReferenceSource = {
|
|
48
55
|
kind: "argument";
|
|
49
56
|
name: "--project";
|
|
@@ -73,11 +80,13 @@ export interface ResolvedConfigDetails {
|
|
|
73
80
|
export declare const ENVIRONMENT_PROJECT_REFERENCE_NAMES: readonly ["VERYFRONT_PROJECT_SLUG", "TENANT_PROJECT_SLUG", "VERYFRONT_PROJECT_ID", "TENANT_PROJECT_ID"];
|
|
74
81
|
export type EnvironmentProjectReferenceName = typeof ENVIRONMENT_PROJECT_REFERENCE_NAMES[number];
|
|
75
82
|
export declare function readConfigFile(projectDir: string): Promise<VeryfrontConfig | null>;
|
|
83
|
+
export declare function readConfigJsonFile(projectDir: string): Promise<VeryfrontConfig | null>;
|
|
76
84
|
export declare function writeProjectSlug(projectDir: string, slug: string): Promise<void>;
|
|
77
85
|
export declare function resolveEnvironmentProjectReference(): {
|
|
78
86
|
reference: string;
|
|
79
87
|
name: EnvironmentProjectReferenceName;
|
|
80
88
|
} | undefined;
|
|
89
|
+
export declare function resolveApiCredentialCandidatesForAuth(env?: EnvironmentConfig, projectDir?: string, interactive?: boolean): Promise<ApiCredentialCandidate[]>;
|
|
81
90
|
export declare const resolveConfig: (projectDir?: string, env?: EnvironmentConfig) => Promise<ResolvedConfig>;
|
|
82
91
|
/**
|
|
83
92
|
* Resolve config with interactive authentication.
|
|
@@ -90,13 +99,13 @@ export declare function resolveConfigWithAuthDetails(projectDir?: string, env?:
|
|
|
90
99
|
export interface ApiReadOptions {
|
|
91
100
|
/** Abort the in-flight HTTP request when this signal fires. */
|
|
92
101
|
signal?: AbortSignal;
|
|
93
|
-
/** Use `none` when a
|
|
102
|
+
/** Use `none` when a caller owns retry timing or replaying a write would be ambiguous. */
|
|
94
103
|
retryPolicy?: "default" | "none";
|
|
95
104
|
}
|
|
96
105
|
export interface ApiClient {
|
|
97
106
|
get<T>(path: string, params?: Record<string, string>, options?: ApiReadOptions): Promise<T>;
|
|
98
107
|
post<T>(path: string, body?: unknown): Promise<T>;
|
|
99
|
-
put<T>(path: string, body?: unknown): Promise<T>;
|
|
108
|
+
put<T>(path: string, body?: unknown, options?: ApiReadOptions): Promise<T>;
|
|
100
109
|
patch<T>(path: string, body?: unknown): Promise<T>;
|
|
101
110
|
delete<T>(path: string): Promise<T>;
|
|
102
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/cli/shared/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAGxE,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,2BAA2B,CAAC;AAkBzF;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAK/D;AAQD,e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