veryfront 0.1.1239 → 0.1.1241
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/commands/build/command-help.d.ts.map +1 -1
- package/esm/cli/commands/build/command-help.js +4 -0
- package/esm/cli/commands/build/command.d.ts +3 -1
- package/esm/cli/commands/build/command.d.ts.map +1 -1
- package/esm/cli/commands/build/command.js +13 -5
- package/esm/cli/commands/build/handler.d.ts +17 -0
- package/esm/cli/commands/build/handler.d.ts.map +1 -1
- package/esm/cli/commands/build/handler.js +188 -9
- package/esm/cli/commands/generate/command.d.ts.map +1 -1
- package/esm/cli/commands/generate/command.js +40 -0
- package/esm/cli/commands/push/command.d.ts.map +1 -1
- package/esm/cli/commands/push/command.js +24 -16
- package/esm/cli/shared/ensure-content-processor.d.ts +16 -1
- package/esm/cli/shared/ensure-content-processor.d.ts.map +1 -1
- package/esm/cli/shared/ensure-content-processor.js +39 -5
- package/esm/cli/shared/project-creation.d.ts.map +1 -1
- package/esm/cli/shared/project-creation.js +29 -1
- package/esm/deno.d.ts +14 -5
- package/esm/deno.js +23 -7
- package/esm/extensions/ext-llm-openai/src/openai-chat-stream.d.ts.map +1 -1
- package/esm/extensions/ext-llm-openai/src/openai-chat-stream.js +16 -6
- package/esm/extensions/ext-llm-openai/src/openai-provider.d.ts.map +1 -1
- package/esm/extensions/ext-llm-openai/src/openai-provider.js +11 -2
- package/esm/extensions/ext-llm-openai/src/openai-reasoning-models.d.ts +2 -14
- package/esm/extensions/ext-llm-openai/src/openai-reasoning-models.d.ts.map +1 -1
- package/esm/extensions/ext-llm-openai/src/openai-reasoning-models.js +1 -72
- package/esm/extensions/ext-schema-zod/src/adapter.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/browser-aliases.d.ts +164 -0
- package/esm/src/agent/ag-ui/browser-aliases.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/browser-aliases.js +68 -0
- package/esm/src/agent/ag-ui/chat-ui-chunk-encoder.d.ts +35 -0
- package/esm/src/agent/ag-ui/chat-ui-chunk-encoder.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/{chat-ui-chunk-browser-encoder.js → chat-ui-chunk-encoder.js} +11 -11
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.d.ts +8 -6
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/chunk-encoder-bridge.js +5 -4
- package/esm/src/agent/ag-ui/chunk-encoder.d.ts +26 -0
- package/esm/src/agent/ag-ui/chunk-encoder.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/{browser-chunk-encoder.js → chunk-encoder.js} +3 -2
- package/esm/src/agent/ag-ui/{browser-encoder.d.ts → encoder.d.ts} +33 -19
- package/esm/src/agent/ag-ui/encoder.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/{browser-encoder.js → encoder.js} +81 -27
- package/esm/src/agent/ag-ui/finalize-tracker.d.ts +15 -0
- package/esm/src/agent/ag-ui/finalize-tracker.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/{browser-finalize-tracker.js → finalize-tracker.js} +4 -4
- package/esm/src/agent/ag-ui/response-stream.d.ts +36 -0
- package/esm/src/agent/ag-ui/response-stream.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/{browser-response-stream.js → response-stream.js} +6 -3
- package/esm/src/agent/ag-ui/runtime-chat-stream-encoder.d.ts +1 -1
- package/esm/src/agent/ag-ui/runtime-chat-stream-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/runtime-event-encoder.d.ts +7 -7
- package/esm/src/agent/ag-ui/runtime-event-encoder.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/runtime-event-encoder.js +4 -4
- package/esm/src/agent/ag-ui/runtime-response.d.ts +20 -0
- package/esm/src/agent/ag-ui/runtime-response.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/runtime-response.js +16 -0
- package/esm/src/agent/ag-ui/sse-parser.d.ts +1 -1
- package/esm/src/agent/ag-ui/sse-parser.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/sse-parser.js +3 -3
- package/esm/src/agent/ag-ui/tracked-response.d.ts +11 -0
- package/esm/src/agent/ag-ui/tracked-response.d.ts.map +1 -0
- package/esm/src/agent/ag-ui/{tracked-browser-response.js → tracked-response.js} +6 -4
- package/esm/src/agent/conversation/hosted-lifecycle.d.ts.map +1 -1
- package/esm/src/agent/conversation/hosted-lifecycle.js +2 -1
- package/esm/src/agent/conversation/lifecycle-run-event-adapter.d.ts.map +1 -1
- package/esm/src/agent/conversation/lifecycle-run-event-adapter.js +2 -0
- package/esm/src/agent/conversation/private-run-event.d.ts.map +1 -1
- package/esm/src/agent/conversation/private-run-event.js +174 -3
- package/esm/src/agent/conversation/run-chunk-mirror.d.ts +2 -0
- package/esm/src/agent/conversation/run-chunk-mirror.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-chunk-mirror.js +13 -6
- package/esm/src/agent/conversation/run-events.d.ts +8 -0
- package/esm/src/agent/conversation/run-events.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-events.js +54 -4
- package/esm/src/agent/conversation/run-stream-mirror.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-stream-mirror.js +5 -2
- package/esm/src/agent/hosted/durable-run-event-sink.d.ts +2 -1
- package/esm/src/agent/hosted/durable-run-event-sink.d.ts.map +1 -1
- package/esm/src/agent/hosted/durable-run-event-sink.js +9 -7
- package/esm/src/agent/hosted/prepared-chat-execution.js +2 -2
- package/esm/src/agent/index.d.ts +9 -8
- package/esm/src/agent/index.d.ts.map +1 -1
- package/esm/src/agent/index.js +9 -8
- package/esm/src/agent/memory/memory.d.ts.map +1 -1
- package/esm/src/agent/memory/memory.js +7 -6
- package/esm/src/agent/react/use-chat/types.d.ts +2 -0
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +3 -2
- package/esm/src/agent/runtime/ag-ui-contract.d.ts +2 -2
- package/esm/src/agent/runtime/ag-ui-contract.d.ts.map +1 -1
- package/esm/src/agent/runtime/ag-ui-contract.js +2 -2
- package/esm/src/agent/runtime/chat-stream-handler.d.ts.map +1 -1
- package/esm/src/agent/runtime/chat-stream-handler.js +34 -4
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +15 -6
- package/esm/src/agent/streaming/data-stream.d.ts +1 -1
- package/esm/src/agent/streaming/data-stream.d.ts.map +1 -1
- package/esm/src/agent/streaming/fork-runtime-part-mapper.d.ts +1 -1
- package/esm/src/agent/streaming/fork-runtime-part-mapper.d.ts.map +1 -1
- package/esm/src/agent/streaming/lifecycle/live-adapter.d.ts.map +1 -1
- package/esm/src/agent/streaming/lifecycle/live-adapter.js +2 -0
- package/esm/src/agent/streaming/lifecycle/reducer.d.ts.map +1 -1
- package/esm/src/agent/streaming/lifecycle/reducer.js +7 -0
- package/esm/src/agent/streaming/lifecycle/runtime-provider-adapter.js +4 -0
- package/esm/src/build/production-build/templates.d.ts.map +1 -1
- package/esm/src/build/production-build/templates.js +1 -1
- package/esm/src/cache/request-cache-batcher.d.ts +1 -0
- package/esm/src/cache/request-cache-batcher.d.ts.map +1 -1
- package/esm/src/cache/request-cache-batcher.js +21 -7
- package/esm/src/chat/ag-ui.d.ts +1 -1
- package/esm/src/chat/index.d.ts +2 -2
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +1 -1
- package/esm/src/config/config-shim.d.ts +1 -1
- package/esm/src/config/config-shim.d.ts.map +1 -1
- package/esm/src/config/config-shim.js +1 -1
- package/esm/src/config/declarative-evaluator-worker-protocol.d.ts.map +1 -1
- package/esm/src/config/env.js +1 -1
- package/esm/src/config/environment-config.js +1 -1
- package/esm/src/config/loader.d.ts.map +1 -1
- package/esm/src/config/loader.js +4 -4
- package/esm/src/config/schemas/config.schema.d.ts +20 -0
- package/esm/src/config/schemas/config.schema.d.ts.map +1 -1
- package/esm/src/config/schemas/config.schema.js +27 -0
- package/esm/src/config/server-external-packages.d.ts +11 -0
- package/esm/src/config/server-external-packages.d.ts.map +1 -0
- package/esm/src/config/server-external-packages.js +53 -0
- package/esm/src/data/data-fetcher.d.ts.map +1 -1
- package/esm/src/data/data-fetcher.js +9 -4
- package/esm/src/data/data-result-validation.d.ts +5 -0
- package/esm/src/data/data-result-validation.d.ts.map +1 -0
- package/esm/src/data/data-result-validation.js +56 -0
- package/esm/src/data/helpers.d.ts +5 -5
- package/esm/src/data/helpers.d.ts.map +1 -1
- package/esm/src/data/helpers.js +22 -68
- package/esm/src/data/index.d.ts +1 -1
- package/esm/src/data/index.d.ts.map +1 -1
- package/esm/src/data/response-metadata.d.ts +23 -0
- package/esm/src/data/response-metadata.d.ts.map +1 -0
- package/esm/src/data/response-metadata.js +311 -0
- package/esm/src/data/schemas/data.schema.d.ts +95 -6
- package/esm/src/data/schemas/data.schema.d.ts.map +1 -1
- package/esm/src/data/schemas/data.schema.js +57 -3
- package/esm/src/data/schemas/index.d.ts +1 -1
- package/esm/src/data/schemas/index.d.ts.map +1 -1
- package/esm/src/data/schemas/index.js +1 -1
- package/esm/src/data/server-data-fetcher.d.ts.map +1 -1
- package/esm/src/data/server-data-fetcher.js +5 -5
- package/esm/src/data/static-data-fetcher.d.ts +2 -2
- package/esm/src/data/static-data-fetcher.d.ts.map +1 -1
- package/esm/src/data/static-data-fetcher.js +6 -3
- package/esm/src/data/types.d.ts +1 -1
- package/esm/src/data/types.d.ts.map +1 -1
- package/esm/src/discovery/discovery-engine.d.ts.map +1 -1
- package/esm/src/discovery/discovery-engine.js +81 -26
- package/esm/src/discovery/handlers/task-handler.d.ts +1 -1
- package/esm/src/discovery/handlers/task-handler.d.ts.map +1 -1
- package/esm/src/discovery/handlers/task-handler.js +6 -3
- package/esm/src/discovery/types.d.ts +6 -4
- package/esm/src/discovery/types.d.ts.map +1 -1
- package/esm/src/errors/error-registry/runtime.d.ts +2 -0
- package/esm/src/errors/error-registry/runtime.d.ts.map +1 -1
- package/esm/src/errors/error-registry/runtime.js +8 -0
- package/esm/src/errors/error-registry.d.ts +1 -0
- package/esm/src/errors/error-registry.d.ts.map +1 -1
- package/esm/src/errors/index.d.ts +1 -1
- package/esm/src/errors/index.d.ts.map +1 -1
- package/esm/src/errors/index.js +1 -1
- package/esm/src/errors/user-friendly/error-wrapper.js +1 -1
- package/esm/src/errors/veryfront-error.d.ts.map +1 -1
- package/esm/src/extensions/index.d.ts +2 -0
- package/esm/src/extensions/index.d.ts.map +1 -1
- package/esm/src/extensions/index.js +1 -0
- package/esm/src/extensions/parser/code-parser.d.ts +9 -0
- package/esm/src/extensions/parser/code-parser.d.ts.map +1 -1
- package/esm/src/extensions/parser/defaults.d.ts +5 -0
- package/esm/src/extensions/parser/defaults.d.ts.map +1 -1
- package/esm/src/extensions/parser/defaults.js +23 -11
- package/esm/src/fs/index.d.ts +50 -1
- package/esm/src/fs/index.d.ts.map +1 -1
- package/esm/src/fs/index.js +50 -1
- package/esm/src/html/html-injection.d.ts +2 -0
- package/esm/src/html/html-injection.d.ts.map +1 -1
- package/esm/src/html/html-injection.js +4 -1
- package/esm/src/html/html-shell-generator.d.ts.map +1 -1
- package/esm/src/html/html-shell-generator.js +11 -3
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
- package/esm/src/html/hydration-script-builder/prod-runtime-selection.d.ts +23 -0
- package/esm/src/html/hydration-script-builder/prod-runtime-selection.d.ts.map +1 -0
- package/esm/src/html/hydration-script-builder/prod-runtime-selection.js +55 -0
- package/esm/src/html/hydration-script-builder/prod-scripts.d.ts +2 -0
- package/esm/src/html/hydration-script-builder/prod-scripts.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/prod-scripts.js +12 -3
- package/esm/src/html/schemas/html.schema.d.ts +2 -0
- package/esm/src/html/schemas/html.schema.d.ts.map +1 -1
- package/esm/src/html/schemas/html.schema.js +2 -0
- package/esm/src/html/styles-builder/css-hash-cache.d.ts +1 -1
- package/esm/src/html/styles-builder/css-hash-cache.d.ts.map +1 -1
- package/esm/src/html/styles-builder/css-hash-cache.js +1 -1
- package/esm/src/index.client.d.ts +2 -2
- package/esm/src/index.client.d.ts.map +1 -1
- package/esm/src/index.client.js +3 -1
- package/esm/src/index.d.ts +1 -1
- package/esm/src/index.d.ts.map +1 -1
- package/esm/src/internal-agents/ag-ui-sse.d.ts +7 -7
- package/esm/src/internal-agents/ag-ui-sse.d.ts.map +1 -1
- package/esm/src/internal-agents/ag-ui-sse.js +17 -9
- package/esm/src/internal-agents/control-plane-auth.js +1 -1
- package/esm/src/internal-agents/run-stream.d.ts.map +1 -1
- package/esm/src/internal-agents/run-stream.js +15 -9
- package/esm/src/modules/import-map/loader.d.ts.map +1 -1
- package/esm/src/modules/import-map/loader.js +2 -2
- package/esm/src/modules/import-map/merger.js +2 -2
- package/esm/src/modules/import-map/preloader.js +2 -2
- package/esm/src/modules/react-loader/component-loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/component-loader.js +2 -0
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts +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 +3 -2
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-cache-manager.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-cache-manager.js +7 -1
- package/esm/src/modules/react-loader/ssr-module-loader/types.d.ts +2 -0
- package/esm/src/modules/react-loader/ssr-module-loader/types.d.ts.map +1 -1
- package/esm/src/modules/react-loader/transformed-module-coordinator.d.ts.map +1 -1
- package/esm/src/modules/react-loader/transformed-module-coordinator.js +2 -1
- package/esm/src/modules/react-loader/types.d.ts +2 -0
- package/esm/src/modules/react-loader/types.d.ts.map +1 -1
- package/esm/src/modules/server/module-response-cache.d.ts +1 -0
- package/esm/src/modules/server/module-response-cache.d.ts.map +1 -1
- package/esm/src/modules/server/module-response-cache.js +5 -0
- package/esm/src/modules/server/module-server.d.ts.map +1 -1
- package/esm/src/modules/server/module-server.js +4 -0
- package/esm/src/modules/server/module-transform.d.ts.map +1 -1
- package/esm/src/modules/server/module-transform.js +2 -0
- package/esm/src/observability/metrics/config.js +1 -1
- package/esm/src/observability/request-profiler.js +1 -1
- package/esm/src/observability/telemetry-error.js +2 -2
- package/esm/src/observability/tracing/telemetry-env.js +1 -1
- package/esm/src/platform/adapters/fs/cache/file-cache.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/cache/file-cache.js +5 -0
- package/esm/src/platform/adapters/fs/veryfront/adapter.d.ts +39 -0
- package/esm/src/platform/adapters/fs/veryfront/adapter.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/adapter.js +209 -40
- package/esm/src/platform/adapters/fs/veryfront/file-list-index.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/file-list-index.js +0 -14
- package/esm/src/platform/adapters/fs/veryfront/read-operations-helpers.d.ts +0 -1
- package/esm/src/platform/adapters/fs/veryfront/read-operations-helpers.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/read-operations-helpers.js +0 -3
- package/esm/src/platform/adapters/fs/veryfront/read-operations.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/read-operations.js +1 -4
- package/esm/src/platform/adapters/fs/veryfront/request-context.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/request-context.js +4 -0
- package/esm/src/platform/adapters/fs/veryfront/stat-operations.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/stat-operations.js +9 -1
- package/esm/src/platform/adapters/fs/veryfront/websocket-manager-helpers.js +1 -1
- package/esm/src/platform/adapters/fs/veryfront/websocket-manager.d.ts +2 -1
- package/esm/src/platform/adapters/fs/veryfront/websocket-manager.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/websocket-manager.js +97 -66
- package/esm/src/platform/compat/dns.d.ts +10 -0
- package/esm/src/platform/compat/dns.d.ts.map +1 -1
- package/esm/src/platform/compat/dns.js +50 -0
- package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
- package/esm/src/platform/compat/process/lifecycle.d.ts +10 -0
- package/esm/src/platform/compat/process/lifecycle.d.ts.map +1 -1
- package/esm/src/platform/compat/process/lifecycle.js +23 -0
- package/esm/src/platform/compat/process.d.ts +1 -1
- package/esm/src/platform/compat/process.d.ts.map +1 -1
- package/esm/src/platform/compat/process.js +1 -1
- package/esm/src/platform/compat/proxy-topology.js +1 -1
- package/esm/src/platform/request-context-access.d.ts +24 -0
- package/esm/src/platform/request-context-access.d.ts.map +1 -0
- package/esm/src/platform/request-context-access.js +26 -0
- package/esm/src/provider/shared/openai-reasoning.d.ts +16 -0
- package/esm/src/provider/shared/openai-reasoning.d.ts.map +1 -0
- package/esm/src/provider/shared/openai-reasoning.js +73 -0
- package/esm/src/provider/types.d.ts +2 -0
- package/esm/src/provider/types.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/provider.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/provider.js +45 -18
- package/esm/src/proxy/handler.d.ts +1 -0
- package/esm/src/proxy/handler.d.ts.map +1 -1
- package/esm/src/proxy/handler.js +17 -4
- package/esm/src/proxy/proxy-error-context.d.ts +1 -0
- package/esm/src/proxy/proxy-error-context.d.ts.map +1 -1
- package/esm/src/proxy/proxy-error-context.js +1 -0
- package/esm/src/proxy/request-host.d.ts +3 -0
- package/esm/src/proxy/request-host.d.ts.map +1 -1
- package/esm/src/proxy/request-host.js +28 -8
- package/esm/src/proxy/routing-invalidation-redis.d.ts.map +1 -1
- package/esm/src/proxy/routing-invalidation-redis.js +38 -4
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +27 -3
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/attachments-panel.js +29 -7
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts +15 -6
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sidebar.js +37 -4
- package/esm/src/react/components/chat/chat/components/sidebar.types.d.ts +12 -1
- package/esm/src/react/components/chat/chat/components/sidebar.types.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +3 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.js +17 -6
- package/esm/src/react/components/chat/chat/composition/chat-composer.types.d.ts +12 -5
- package/esm/src/react/components/chat/chat/composition/chat-composer.types.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +18 -5
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-root.js +65 -1
- package/esm/src/react/components/chat/chat/composition/use-composer-value.d.ts +6 -3
- package/esm/src/react/components/chat/chat/composition/use-composer-value.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/use-composer-value.js +56 -5
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +7 -1
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +14 -4
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/conversations-context.js +10 -1
- package/esm/src/react/components/chat/chat/index.d.ts +1 -1
- package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/persistence/conversation-codec.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat.d.ts +1 -1
- package/esm/src/react/components/chat/chat.d.ts.map +1 -1
- package/esm/src/react/server-render-context.d.ts.map +1 -1
- package/esm/src/release-assets/dependency-artifact-builder.d.ts.map +1 -1
- package/esm/src/rendering/app-reserved.d.ts +2 -2
- package/esm/src/rendering/app-reserved.d.ts.map +1 -1
- package/esm/src/rendering/app-reserved.js +4 -3
- package/esm/src/rendering/cache/cache-coordinator.d.ts.map +1 -1
- package/esm/src/rendering/cache/cache-coordinator.js +1 -0
- package/esm/src/rendering/cache/cache-payload.d.ts.map +1 -1
- package/esm/src/rendering/cache/cache-payload.js +44 -0
- package/esm/src/rendering/component-handling.d.ts +4 -1
- package/esm/src/rendering/component-handling.d.ts.map +1 -1
- package/esm/src/rendering/component-handling.js +13 -6
- package/esm/src/rendering/layouts/layout-applicator.d.ts.map +1 -1
- package/esm/src/rendering/layouts/layout-applicator.js +3 -1
- package/esm/src/rendering/layouts/layout-collector.d.ts +1 -0
- package/esm/src/rendering/layouts/layout-collector.d.ts.map +1 -1
- package/esm/src/rendering/layouts/layout-collector.js +201 -4
- package/esm/src/rendering/layouts/utils/applicator.d.ts +1 -1
- package/esm/src/rendering/layouts/utils/applicator.d.ts.map +1 -1
- package/esm/src/rendering/layouts/utils/applicator.js +3 -3
- package/esm/src/rendering/layouts/utils/component-loader.d.ts +2 -2
- package/esm/src/rendering/layouts/utils/component-loader.d.ts.map +1 -1
- package/esm/src/rendering/layouts/utils/component-loader.js +12 -4
- package/esm/src/rendering/orchestrator/file-resolver/index.d.ts +3 -1
- package/esm/src/rendering/orchestrator/file-resolver/index.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/file-resolver/index.js +13 -5
- package/esm/src/rendering/orchestrator/html.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/html.js +26 -10
- package/esm/src/rendering/orchestrator/layout.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/layout.js +2 -2
- package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.js +20 -2
- package/esm/src/rendering/orchestrator/module-loader/index.d.ts +2 -0
- package/esm/src/rendering/orchestrator/module-loader/index.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/index.js +6 -3
- package/esm/src/rendering/orchestrator/module-loader/module-cache-lookup.d.ts +3 -2
- package/esm/src/rendering/orchestrator/module-loader/module-cache-lookup.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/module-cache-lookup.js +6 -6
- package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts +1 -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 +2 -2
- package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.d.ts +2 -0
- package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.js +7 -1
- package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/pipeline.js +58 -10
- package/esm/src/rendering/orchestrator/render-result-assembly.d.ts +3 -0
- package/esm/src/rendering/orchestrator/render-result-assembly.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/render-result-assembly.js +3 -1
- package/esm/src/rendering/page-renderer.d.ts +2 -0
- package/esm/src/rendering/page-renderer.d.ts.map +1 -1
- package/esm/src/rendering/page-renderer.js +4 -1
- package/esm/src/rendering/page-rendering.d.ts +2 -0
- package/esm/src/rendering/page-rendering.d.ts.map +1 -1
- package/esm/src/rendering/page-rendering.js +1 -0
- package/esm/src/rendering/renderer.d.ts.map +1 -1
- package/esm/src/rendering/renderer.js +31 -1
- package/esm/src/rendering/script-page-handling.d.ts +2 -0
- package/esm/src/rendering/script-page-handling.d.ts.map +1 -1
- package/esm/src/rendering/script-page-handling.js +17 -1
- package/esm/src/rendering/shared/context-aware-cache.d.ts.map +1 -1
- package/esm/src/rendering/shared/context-aware-cache.js +3 -0
- package/esm/src/rendering/snippet-renderer.d.ts +10 -0
- package/esm/src/rendering/snippet-renderer.d.ts.map +1 -1
- package/esm/src/rendering/snippet-renderer.js +40 -18
- package/esm/src/rendering/ssr/component-registry.d.ts +1 -1
- package/esm/src/rendering/ssr/component-registry.d.ts.map +1 -1
- package/esm/src/rendering/ssr/component-registry.js +13 -6
- package/esm/src/rendering/ssr-outcome.d.ts +4 -3
- package/esm/src/rendering/ssr-outcome.d.ts.map +1 -1
- package/esm/src/rendering/ssr-outcome.js +25 -8
- package/esm/src/routing/api/handler.d.ts +1 -1
- package/esm/src/routing/api/handler.d.ts.map +1 -1
- package/esm/src/routing/api/handler.js +6 -1
- package/esm/src/runtime/model-call-context.d.ts +37 -2
- package/esm/src/runtime/model-call-context.d.ts.map +1 -1
- package/esm/src/runtime/model-call-context.js +42 -1
- package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
- package/esm/src/runtime/runtime-bridge.js +108 -8
- package/esm/src/sandbox/shell-tools.d.ts.map +1 -1
- package/esm/src/sandbox/shell-tools.js +16 -6
- package/esm/src/schedule/validation.d.ts +9 -1
- package/esm/src/schedule/validation.d.ts.map +1 -1
- package/esm/src/schedule/validation.js +167 -80
- package/esm/src/schemas/json-value.d.ts.map +1 -1
- package/esm/src/schemas/json-value.js +81 -37
- package/esm/src/security/http/base-handler.js +1 -1
- package/esm/src/security/sandbox/project-worker.d.ts +1 -0
- package/esm/src/security/sandbox/project-worker.d.ts.map +1 -1
- package/esm/src/security/sandbox/project-worker.js +6 -0
- package/esm/src/security/sandbox/worker-read-scope.d.ts +20 -0
- package/esm/src/security/sandbox/worker-read-scope.d.ts.map +1 -0
- package/esm/src/security/sandbox/worker-read-scope.js +127 -0
- package/esm/src/security/sandbox/worker-types.d.ts +12 -0
- package/esm/src/security/sandbox/worker-types.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/dashboard/api.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/dashboard/api.js +70 -3
- package/esm/src/server/handlers/dev/files/esbuild-plugins.d.ts +5 -0
- package/esm/src/server/handlers/dev/files/esbuild-plugins.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/files/esbuild-plugins.js +61 -3
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +227 -29
- package/esm/src/server/handlers/request/api/pages-api-handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/api/pages-api-handler.js +20 -2
- package/esm/src/server/handlers/request/module/page-data-endpoint-handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/module/page-data-endpoint-handler.js +32 -15
- package/esm/src/server/handlers/request/prod-hydration-module.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/prod-hydration-module.handler.js +10 -3
- package/esm/src/server/handlers/request/project-run-execute.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/project-run-execute.handler.js +1 -0
- package/esm/src/server/handlers/request/snippet.handler.d.ts +6 -0
- package/esm/src/server/handlers/request/snippet.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/snippet.handler.js +8 -1
- package/esm/src/server/handlers/request/ssr/error-page-fallback.js +1 -0
- package/esm/src/server/handlers/request/ssr/ssr-response-builder.d.ts.map +1 -1
- package/esm/src/server/handlers/request/ssr/ssr-response-builder.js +10 -6
- package/esm/src/server/handlers/request/ssr/ssr.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/ssr/ssr.handler.js +22 -10
- package/esm/src/server/handlers/request/static.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/static.handler.js +1 -0
- package/esm/src/server/runtime-handler/handler-context-builder.d.ts +2 -0
- package/esm/src/server/runtime-handler/handler-context-builder.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/handler-context-builder.js +1 -0
- package/esm/src/server/runtime-handler/project-runtime-context.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/project-runtime-context.js +6 -2
- package/esm/src/server/runtime-handler/request-tracker.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/request-tracker.js +10 -3
- package/esm/src/server/services/rendering/ssr.service.d.ts +5 -0
- package/esm/src/server/services/rendering/ssr.service.d.ts.map +1 -1
- package/esm/src/server/services/rendering/ssr.service.js +71 -16
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +2 -2
- package/esm/src/server/services/rsc/orchestrators/handler.d.ts.map +1 -1
- package/esm/src/server/services/rsc/orchestrators/handler.js +1 -0
- package/esm/src/server/services/rsc/orchestrators/render-handler.d.ts +1 -0
- package/esm/src/server/services/rsc/orchestrators/render-handler.d.ts.map +1 -1
- package/esm/src/server/services/rsc/orchestrators/render-handler.js +2 -0
- package/esm/src/server/services/static/static-file.service.d.ts +4 -1
- package/esm/src/server/services/static/static-file.service.d.ts.map +1 -1
- package/esm/src/server/services/static/static-file.service.js +48 -22
- package/esm/src/server/shared/browser-module-bundler.d.ts.map +1 -1
- package/esm/src/server/shared/browser-module-bundler.js +10 -0
- package/esm/src/server/utils/request-host.d.ts +6 -0
- package/esm/src/server/utils/request-host.d.ts.map +1 -1
- package/esm/src/server/utils/request-host.js +42 -1
- package/esm/src/skill/tools.d.ts.map +1 -1
- package/esm/src/task/definition-snapshot.d.ts +8 -0
- package/esm/src/task/definition-snapshot.d.ts.map +1 -0
- package/esm/src/task/definition-snapshot.js +154 -0
- package/esm/src/task/discovery.d.ts.map +1 -1
- package/esm/src/task/discovery.js +47 -21
- package/esm/src/task/types.d.ts +3 -0
- package/esm/src/task/types.d.ts.map +1 -1
- package/esm/src/task/types.js +7 -16
- package/esm/src/tool/remote-mcp.d.ts.map +1 -1
- package/esm/src/tool/remote-mcp.js +86 -5
- package/esm/src/transforms/esm/bundle-recovery.d.ts.map +1 -1
- package/esm/src/transforms/esm/bundle-recovery.js +1 -0
- package/esm/src/transforms/esm/http-cache-helpers.d.ts +3 -1
- package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-helpers.js +18 -2
- package/esm/src/transforms/esm/http-cache-wrapper.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-wrapper.js +23 -0
- package/esm/src/transforms/esm/specifier-resolver.d.ts.map +1 -1
- package/esm/src/transforms/esm/specifier-resolver.js +2 -1
- package/esm/src/transforms/esm/types.d.ts +2 -0
- package/esm/src/transforms/esm/types.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/commonjs-policy.d.ts +22 -0
- package/esm/src/transforms/import-rewriter/commonjs-policy.d.ts.map +1 -0
- package/esm/src/transforms/import-rewriter/commonjs-policy.js +75 -0
- package/esm/src/transforms/import-rewriter/core.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/core.js +29 -1
- package/esm/src/transforms/import-rewriter/ssr-adapter.d.ts +2 -0
- package/esm/src/transforms/import-rewriter/ssr-adapter.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/ssr-adapter.js +79 -10
- package/esm/src/transforms/import-rewriter/strategies/bare-strategy.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/strategies/bare-strategy.js +14 -4
- package/esm/src/transforms/import-rewriter/types.d.ts +2 -0
- package/esm/src/transforms/import-rewriter/types.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/url-builder.d.ts +2 -19
- package/esm/src/transforms/import-rewriter/url-builder.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/url-builder.js +2 -67
- package/esm/src/transforms/mdx/esm-module-loader/import-transformer.d.ts +3 -2
- package/esm/src/transforms/mdx/esm-module-loader/import-transformer.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/import-transformer.js +39 -8
- package/esm/src/transforms/mdx/esm-module-loader/jsx/runtime-loader.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/jsx/runtime-loader.js +1 -1
- 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 +1 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/cache-keys.d.ts +3 -3
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/cache-keys.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/cache-keys.js +14 -6
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/distributed-cache.d.ts +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/distributed-cache.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/distributed-cache.js +2 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts +1 -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 +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.d.ts +1 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.js +6 -3
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/module-cache.d.ts +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/module-cache.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/module-cache.js +2 -2
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/persistence.d.ts +1 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/persistence.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/persistence.js +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/source-transform.d.ts +1 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/source-transform.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/source-transform.js +2 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-writer.d.ts +2 -2
- package/esm/src/transforms/mdx/esm-module-loader/module-writer.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-writer.js +15 -7
- package/esm/src/transforms/mdx/esm-module-loader/types.d.ts +4 -0
- package/esm/src/transforms/mdx/esm-module-loader/types.d.ts.map +1 -1
- package/esm/src/transforms/mdx/index.d.ts +1 -0
- package/esm/src/transforms/mdx/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/index.js +2 -1
- package/esm/src/transforms/pipeline/cache-identity.d.ts +1 -0
- package/esm/src/transforms/pipeline/cache-identity.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/cache-identity.js +15 -0
- package/esm/src/transforms/pipeline/context.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/context.js +2 -0
- package/esm/src/transforms/pipeline/index.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/index.js +1 -0
- package/esm/src/transforms/pipeline/stages/resolve-imports.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/resolve-imports.js +1 -0
- package/esm/src/transforms/pipeline/stages/ssr-http-cache.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/ssr-http-cache.js +1 -0
- package/esm/src/transforms/pipeline/types.d.ts +4 -0
- package/esm/src/transforms/pipeline/types.d.ts.map +1 -1
- package/esm/src/transforms/shared/esm-sh-specifier.d.ts +18 -0
- package/esm/src/transforms/shared/esm-sh-specifier.d.ts.map +1 -0
- package/esm/src/transforms/shared/esm-sh-specifier.js +253 -0
- package/esm/src/transforms/shared/package-specifier.d.ts.map +1 -1
- package/esm/src/transforms/shared/package-specifier.js +9 -2
- package/esm/src/transforms/shared/server-only-packages.d.ts +25 -1
- package/esm/src/transforms/shared/server-only-packages.d.ts.map +1 -1
- package/esm/src/transforms/shared/server-only-packages.js +176 -4
- package/esm/src/types/entities/getEntityInfo.d.ts.map +1 -1
- package/esm/src/types/index.d.ts +5 -0
- package/esm/src/types/index.d.ts.map +1 -1
- package/esm/src/types/server.d.ts +6 -0
- package/esm/src/types/server.d.ts.map +1 -1
- package/esm/src/utils/env-loader.d.ts.map +1 -1
- package/esm/src/utils/env-loader.js +2 -1
- package/esm/src/utils/feature-flags.js +1 -1
- package/esm/src/utils/lru-wrapper.js +2 -2
- package/esm/src/utils/memory/profiler.d.ts +20 -0
- package/esm/src/utils/memory/profiler.d.ts.map +1 -1
- package/esm/src/utils/memory/profiler.js +43 -5
- package/esm/src/utils/perf-timer.js +1 -1
- package/esm/src/utils/redirect-policy.d.ts +18 -0
- package/esm/src/utils/redirect-policy.d.ts.map +1 -0
- package/esm/src/utils/redirect-policy.js +92 -0
- package/esm/src/utils/redis-client.d.ts.map +1 -1
- package/esm/src/utils/redis-client.js +6 -3
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/workflow/claude-code/tool.d.ts +27 -27
- package/esm/src/workflow/claude-code/tool.d.ts.map +1 -1
- package/esm/src/workflow/claude-code/wire-protocol.d.ts.map +1 -1
- package/esm/src/workflow/dsl/workflow.d.ts +3 -0
- package/esm/src/workflow/dsl/workflow.d.ts.map +1 -1
- package/esm/src/workflow/dsl/workflow.js +2 -1
- package/esm/src/workflow/executor/workflow-definition-snapshot.d.ts.map +1 -1
- package/esm/src/workflow/executor/workflow-definition-snapshot.js +88 -39
- package/esm/src/workflow/registry.d.ts +4 -1
- package/esm/src/workflow/registry.d.ts.map +1 -1
- package/esm/src/workflow/registry.js +10 -8
- package/esm/src/workflow/types.d.ts +3 -0
- package/esm/src/workflow/types.d.ts.map +1 -1
- package/esm/templates/index.d.ts.map +1 -1
- package/esm/templates/index.js +7 -0
- package/esm/templates/manifest.generated.d.ts.map +1 -1
- package/esm/templates/manifest.generated.js +1 -1
- package/package.json +16 -9
- package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts +0 -24
- package/esm/src/agent/ag-ui/browser-chunk-encoder.d.ts.map +0 -1
- package/esm/src/agent/ag-ui/browser-encoder.d.ts.map +0 -1
- package/esm/src/agent/ag-ui/browser-finalize-tracker.d.ts +0 -15
- package/esm/src/agent/ag-ui/browser-finalize-tracker.d.ts.map +0 -1
- package/esm/src/agent/ag-ui/browser-response-stream.d.ts +0 -33
- package/esm/src/agent/ag-ui/browser-response-stream.d.ts.map +0 -1
- package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.d.ts +0 -35
- package/esm/src/agent/ag-ui/chat-ui-chunk-browser-encoder.d.ts.map +0 -1
- package/esm/src/agent/ag-ui/runtime-browser-response.d.ts +0 -20
- package/esm/src/agent/ag-ui/runtime-browser-response.d.ts.map +0 -1
- package/esm/src/agent/ag-ui/runtime-browser-response.js +0 -16
- package/esm/src/agent/ag-ui/tracked-browser-response.d.ts +0 -11
- package/esm/src/agent/ag-ui/tracked-browser-response.d.ts.map +0 -1
|
@@ -45,31 +45,54 @@ export class StaticFileService {
|
|
|
45
45
|
getManifestLoading() {
|
|
46
46
|
return injectedDeps?.manifestLoading ?? StaticFileService.manifestLoading;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
resolveBuildOutputRoot(options) {
|
|
49
|
+
return resolve(options.projectDir, options.buildOutDir || "dist");
|
|
50
|
+
}
|
|
51
|
+
getFileSystems(options) {
|
|
49
52
|
if (this.fsRepo)
|
|
50
|
-
return this.fsRepo;
|
|
53
|
+
return { buildOutput: this.fsRepo, project: this.fsRepo };
|
|
51
54
|
const projectRoot = resolve(options.projectDir);
|
|
52
|
-
const
|
|
55
|
+
const projectSecureFs = createSecureFs({
|
|
53
56
|
baseDir: projectRoot,
|
|
54
57
|
adapter: options.adapter,
|
|
55
58
|
context: "static-serving",
|
|
56
59
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
const adaptSecureFs = (secureFs, root) => {
|
|
61
|
+
const toScopedPath = (path) => relative(root, resolve(path));
|
|
62
|
+
return {
|
|
63
|
+
readFile: (path) => secureFs.readFile(toScopedPath(path)),
|
|
64
|
+
readFileBytes: (path) => secureFs.readFileBytes(toScopedPath(path)),
|
|
65
|
+
stat: (path) => secureFs.stat(toScopedPath(path)),
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
// Keep public files under the project policy. A configured build output can
|
|
69
|
+
// live beside or outside the project, so give that trusted artifact root an
|
|
70
|
+
// independent boundary instead of expressing it as ../ paths from the project.
|
|
71
|
+
const project = adaptSecureFs(projectSecureFs, projectRoot);
|
|
72
|
+
const buildOutputRoot = this.resolveBuildOutputRoot(options);
|
|
73
|
+
if (isWithinDirectory(buildOutputRoot, projectRoot)) {
|
|
74
|
+
// Refuse to widen static serving when a malformed output root contains
|
|
75
|
+
// the project. The project policy still permits only dist and public.
|
|
76
|
+
return { buildOutput: project, project };
|
|
77
|
+
}
|
|
78
|
+
const buildOutputSecureFs = createSecureFs({
|
|
79
|
+
baseDir: buildOutputRoot,
|
|
80
|
+
adapter: options.adapter,
|
|
81
|
+
context: "internal",
|
|
82
|
+
validationOptions: { checkExists: true },
|
|
83
|
+
});
|
|
61
84
|
return {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
stat: (path) => secureFs.stat(toProjectPath(path)),
|
|
85
|
+
buildOutput: adaptSecureFs(buildOutputSecureFs, buildOutputRoot),
|
|
86
|
+
project,
|
|
65
87
|
};
|
|
66
88
|
}
|
|
67
89
|
async resolveFile(requestPath, options) {
|
|
68
|
-
const
|
|
90
|
+
const fileSystems = this.getFileSystems(options);
|
|
69
91
|
const normalizedPath = requestPath === "/" ? "/index.html" : requestPath;
|
|
70
|
-
const candidates = await this.buildCandidates(normalizedPath, options,
|
|
92
|
+
const candidates = await this.buildCandidates(normalizedPath, options, fileSystems.buildOutput);
|
|
71
93
|
const unexpectedErrors = [];
|
|
72
94
|
for (const candidate of candidates) {
|
|
95
|
+
const fs = candidate.source === "public" ? fileSystems.project : fileSystems.buildOutput;
|
|
73
96
|
const result = await this.tryResolveCandidate(candidate, requestPath, options, fs, unexpectedErrors);
|
|
74
97
|
if (result)
|
|
75
98
|
return result;
|
|
@@ -93,22 +116,25 @@ export class StaticFileService {
|
|
|
93
116
|
if (manifestPath)
|
|
94
117
|
addCandidate(manifestPath, "manifest");
|
|
95
118
|
}
|
|
119
|
+
const buildOutputRoot = this.resolveBuildOutputRoot(options);
|
|
120
|
+
const publicRoot = resolve(options.projectDir, "public");
|
|
96
121
|
const dirs = options.isLocalProject && !options.isPreviewMode
|
|
97
|
-
? ["public"]
|
|
98
|
-
: [
|
|
99
|
-
|
|
100
|
-
|
|
122
|
+
? [{ root: publicRoot, source: "public" }]
|
|
123
|
+
: [
|
|
124
|
+
{ root: buildOutputRoot, source: "dist" },
|
|
125
|
+
{ root: publicRoot, source: "public" },
|
|
126
|
+
];
|
|
127
|
+
for (const { root, source } of dirs) {
|
|
101
128
|
const absPath = normalizePath(joinPath(root, normalizedPath));
|
|
102
129
|
if (isWithinDirectory(root, absPath))
|
|
103
|
-
addCandidate(absPath,
|
|
130
|
+
addCandidate(absPath, source);
|
|
104
131
|
}
|
|
105
132
|
if (this.shouldProbeIndexPage(normalizedPath)) {
|
|
106
133
|
const indexPath = `${normalizedPath.replace(/\/$/, "")}/index.html`;
|
|
107
|
-
for (const
|
|
108
|
-
const root = joinPath(options.projectDir, dir);
|
|
134
|
+
for (const { root, source } of dirs) {
|
|
109
135
|
const absPath = normalizePath(joinPath(root, indexPath));
|
|
110
136
|
if (isWithinDirectory(root, absPath))
|
|
111
|
-
addCandidate(absPath,
|
|
137
|
+
addCandidate(absPath, source);
|
|
112
138
|
}
|
|
113
139
|
}
|
|
114
140
|
return candidates;
|
|
@@ -169,8 +195,8 @@ export class StaticFileService {
|
|
|
169
195
|
return index.assets.get(normalized) ?? null;
|
|
170
196
|
}
|
|
171
197
|
async loadManifestIndex(options, fs) {
|
|
172
|
-
const
|
|
173
|
-
const
|
|
198
|
+
const distRoot = this.resolveBuildOutputRoot(options);
|
|
199
|
+
const cacheKey = distRoot;
|
|
174
200
|
const manifestPath = joinPath(distRoot, "_veryfront/manifest.json");
|
|
175
201
|
let stat;
|
|
176
202
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-module-bundler.d.ts","sourceRoot":"","sources":["../../../../src/src/server/shared/browser-module-bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAgB7D,OAAO,KAAK,EAEV,4BAA4B,EAC7B,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"browser-module-bundler.d.ts","sourceRoot":"","sources":["../../../../src/src/server/shared/browser-module-bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAgB7D,OAAO,KAAK,EAEV,4BAA4B,EAC7B,MAAM,0CAA0C,CAAC;AAwBlD,MAAM,WAAW,yBAAyB;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,wBAAwB,EAAE,MAAM,CAAC;IACjC,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,MAAM,iCAAiC,GAAG,OAAO,CACrD,IAAI,CACF,yBAAyB,EACvB,iBAAiB,GACjB,wBAAwB,GACxB,gBAAgB,GAChB,qBAAqB,GACrB,eAAe,CAClB,CACF,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,yBAAyB,CASjF,CAAC;AAEL,yEAAyE;AACzE,eAAO,MAAM,qCAAqC,IAAI,CAAC;AACvD,+EAA+E;AAC/E,eAAO,MAAM,iCAAiC,KAAK,CAAC;AAEpD,MAAM,MAAM,8BAA8B,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;AAE/E,qBAAa,wBAAyB,SAAQ,KAAK;IAE/C,QAAQ,CAAC,IAAI,EAAE,8BAA8B;gBAApC,IAAI,EAAE,8BAA8B,EAC7C,OAAO,EAAE,MAAM;CAKlB;AAED,qFAAq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inspectBrowserModuleBoundary, } from "./browser-module-boundary.js";
|
|
7
7
|
import { computeHash } from "../../utils/hash-utils.js";
|
|
8
8
|
import { resolveRequestedDependencyPinningSnapshot } from "../../transforms/esm/package-registry.js";
|
|
9
|
+
import { assertNoConfiguredCommonJsBrowserImports } from "../../transforms/import-rewriter/commonjs-policy.js";
|
|
9
10
|
import { PermitSemaphore } from "../../utils/permit-semaphore.js";
|
|
10
11
|
import { waitForSharedPromise } from "../../utils/singleflight.js";
|
|
11
12
|
import { createAbortError, throwIfAborted } from "../../utils/abort.js";
|
|
@@ -568,6 +569,11 @@ export function bundleBrowserModuleWithMetadata(absPath, options) {
|
|
|
568
569
|
hasUseServerDirective(src))) {
|
|
569
570
|
throw new BrowserModuleEntryRejectedError();
|
|
570
571
|
}
|
|
572
|
+
await assertNoConfiguredCommonJsBrowserImports(src, {
|
|
573
|
+
filePath: absPath,
|
|
574
|
+
projectDir: options.projectDir,
|
|
575
|
+
serverExternalPackages: options.config?.build?.serverExternalPackages,
|
|
576
|
+
});
|
|
571
577
|
const boundaryViolation = await inspectBrowserModuleBoundary(src, absPath);
|
|
572
578
|
if (boundaryViolation) {
|
|
573
579
|
throw new BrowserModuleBoundaryError(describeBrowserModuleBoundaryViolation(boundaryViolation));
|
|
@@ -600,11 +606,13 @@ export function bundleBrowserModuleWithMetadata(absPath, options) {
|
|
|
600
606
|
createRelativeFsPlugin(options.projectDir, tracked.adapter, {
|
|
601
607
|
enforceBrowserBoundaries: true,
|
|
602
608
|
readBrowserModule: tracked.readSource,
|
|
609
|
+
serverExternalPackages: options.config?.build?.serverExternalPackages,
|
|
603
610
|
}),
|
|
604
611
|
createBareExternalPlugin({
|
|
605
612
|
importMapImports: importMap.imports,
|
|
606
613
|
projectDir: options.projectDir,
|
|
607
614
|
projectId: options.projectId ?? options.projectSlug,
|
|
615
|
+
serverExternalPackages: options.config?.build?.serverExternalPackages,
|
|
608
616
|
dependencyPinningCacheKey,
|
|
609
617
|
dependencyPinningDependencies,
|
|
610
618
|
dependencyPinningSource,
|
|
@@ -612,6 +620,8 @@ export function bundleBrowserModuleWithMetadata(absPath, options) {
|
|
|
612
620
|
createHttpExternalPlugin({
|
|
613
621
|
moduleServerOrigin: options.moduleServerOrigin,
|
|
614
622
|
dependencyPinningCacheKey,
|
|
623
|
+
projectDir: options.projectDir,
|
|
624
|
+
serverExternalPackages: options.config?.build?.serverExternalPackages,
|
|
615
625
|
}),
|
|
616
626
|
],
|
|
617
627
|
signal,
|
|
@@ -12,4 +12,10 @@ export declare function parseForwardedHost(raw: string | null): string | undefin
|
|
|
12
12
|
* proxy trust (see {@link isProxyTrusted}).
|
|
13
13
|
*/
|
|
14
14
|
export declare function getEffectiveRequestHost(req: Request, url?: URL, trustProxy?: boolean): string;
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the browser-visible HTTP(S) origin at the trusted request boundary.
|
|
17
|
+
* Forwarded values are used only after the caller establishes proxy trust.
|
|
18
|
+
* Invalid trusted values return null so redirect policy checks fail closed.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getEffectiveRequestOrigin(req: Request, url?: URL, trustProxy?: boolean): string | null;
|
|
15
21
|
//# sourceMappingURL=request-host.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-host.d.ts","sourceRoot":"","sources":["../../../../src/src/server/utils/request-host.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request-host.d.ts","sourceRoot":"","sources":["../../../../src/src/server/utils/request-host.ts"],"names":[],"mappings":"AAOA,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAEzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,GAAG,CAAC,EAAE,GAAG,EACT,UAAU,UAAQ,GACjB,MAAM,CAOR;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,OAAO,EACZ,GAAG,CAAC,EAAE,GAAG,EACT,UAAU,UAAQ,GACjB,MAAM,GAAG,IAAI,CAkCf"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
function parseFirstForwardedValue(raw) {
|
|
2
2
|
if (!raw)
|
|
3
3
|
return undefined;
|
|
4
4
|
const first = raw.split(",")[0]?.trim();
|
|
5
5
|
return first || undefined;
|
|
6
6
|
}
|
|
7
|
+
export function parseForwardedHost(raw) {
|
|
8
|
+
return parseFirstForwardedValue(raw);
|
|
9
|
+
}
|
|
7
10
|
/**
|
|
8
11
|
* Resolve the effective request host.
|
|
9
12
|
*
|
|
@@ -25,3 +28,41 @@ export function getEffectiveRequestHost(req, url, trustProxy = false) {
|
|
|
25
28
|
return req.headers.get("host") ??
|
|
26
29
|
(url ?? new URL(req.url)).host;
|
|
27
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Resolve the browser-visible HTTP(S) origin at the trusted request boundary.
|
|
33
|
+
* Forwarded values are used only after the caller establishes proxy trust.
|
|
34
|
+
* Invalid trusted values return null so redirect policy checks fail closed.
|
|
35
|
+
*/
|
|
36
|
+
export function getEffectiveRequestOrigin(req, url, trustProxy = false) {
|
|
37
|
+
const requestUrl = url ?? new URL(req.url);
|
|
38
|
+
let protocol = requestUrl.protocol;
|
|
39
|
+
if (trustProxy) {
|
|
40
|
+
const rawForwardedProtocol = req.headers.get("x-forwarded-proto");
|
|
41
|
+
if (rawForwardedProtocol !== null) {
|
|
42
|
+
const forwardedProtocol = parseFirstForwardedValue(rawForwardedProtocol)?.toLowerCase()
|
|
43
|
+
.replace(/:$/, "");
|
|
44
|
+
if (forwardedProtocol !== "http" && forwardedProtocol !== "https")
|
|
45
|
+
return null;
|
|
46
|
+
protocol = `${forwardedProtocol}:`;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (protocol !== "http:" && protocol !== "https:")
|
|
50
|
+
return null;
|
|
51
|
+
const host = getEffectiveRequestHost(req, requestUrl, trustProxy);
|
|
52
|
+
if (host.length === 0 || host.length > 2_048 || host.trim() !== host)
|
|
53
|
+
return null;
|
|
54
|
+
try {
|
|
55
|
+
const originUrl = new URL(`${protocol}//${host}`);
|
|
56
|
+
if (originUrl.username !== "" ||
|
|
57
|
+
originUrl.password !== "" ||
|
|
58
|
+
originUrl.pathname !== "/" ||
|
|
59
|
+
originUrl.search !== "" ||
|
|
60
|
+
originUrl.hash !== "") {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
return originUrl.origin;
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/src/skill/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/src/skill/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAqCnE,OAAO,KAAK,EAGV,mBAAmB,EAIpB,MAAM,YAAY,CAAC;AAoCpB,KAAK,wBAAwB,GAAG;IAC9B,sBAAsB,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,GAAG,SAAS,KAAK,SAAS,MAAM,EAAE,CAAC;CAC3F,CAAC;AA+XF;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,wBAA6B,GAAG,IAAI,CAgEhF;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,GAAE,wBAA6B,GAAG,IAAI,CAsCzF;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,mBAAmB,CAAA;CAAE,GAAG,wBAA6B,GAC1E,IAAI,CA0DN"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TaskDefinition } from "./types.js";
|
|
2
|
+
type TaskObject = Record<PropertyKey, unknown>;
|
|
3
|
+
/** Validate and capture the task metadata that crosses discovery boundaries. */
|
|
4
|
+
export declare function captureTaskDefinition(value: unknown): TaskDefinition;
|
|
5
|
+
/** Identify structural task exports without executing accessors. */
|
|
6
|
+
export declare function isTaskDefinitionCandidate(value: unknown): value is TaskObject;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=definition-snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition-snapshot.d.ts","sourceRoot":"","sources":["../../../src/src/task/definition-snapshot.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AA2BjD,KAAK,UAAU,GAAG,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AA0H/C,gFAAgF;AAChF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAsCpE;AAED,oEAAoE;AACpE,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAM7E"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { isProxyWithoutHooks } from "../platform/compat/error-introspection.js";
|
|
2
|
+
import { captureScheduleIntegrationRequirementsConfig } from "../schedule/validation.js";
|
|
3
|
+
import { snapshotBoundedJsonValue } from "../schemas/json-value.js";
|
|
4
|
+
const TASK_DEFINITION_KEY_COVERAGE = {
|
|
5
|
+
name: true,
|
|
6
|
+
description: true,
|
|
7
|
+
inputSchema: true,
|
|
8
|
+
outputSchema: true,
|
|
9
|
+
integrationRequirements: true,
|
|
10
|
+
schedulable: true,
|
|
11
|
+
run: true,
|
|
12
|
+
};
|
|
13
|
+
const TASK_DEFINITION_KEYS = Object.keys(TASK_DEFINITION_KEY_COVERAGE);
|
|
14
|
+
const MAX_TASK_PROTOTYPE_DEPTH = 32;
|
|
15
|
+
const arrayIsArray = Array.isArray;
|
|
16
|
+
const OBJECT_PROTOTYPE = Object.prototype;
|
|
17
|
+
const hasOwn = Object.hasOwn;
|
|
18
|
+
const objectCreate = Object.create;
|
|
19
|
+
const objectDefineProperty = Object.defineProperty;
|
|
20
|
+
const objectFreeze = Object.freeze;
|
|
21
|
+
const objectValues = Object.values;
|
|
22
|
+
const reflectApply = Reflect.apply;
|
|
23
|
+
const reflectGetOwnPropertyDescriptor = Reflect.getOwnPropertyDescriptor;
|
|
24
|
+
const reflectGetPrototypeOf = Reflect.getPrototypeOf;
|
|
25
|
+
function defineArrayElement(target, index, value) {
|
|
26
|
+
objectDefineProperty(target, index, {
|
|
27
|
+
value,
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function fail(detail) {
|
|
34
|
+
throw new TypeError(detail);
|
|
35
|
+
}
|
|
36
|
+
function inspectTaskObject(value) {
|
|
37
|
+
if (typeof value !== "object" || value === null || arrayIsArray(value) ||
|
|
38
|
+
isProxyWithoutHooks(value)) {
|
|
39
|
+
fail("Task definition must be a non-Proxy object.");
|
|
40
|
+
}
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
function findTaskPropertyDescriptor(value, key) {
|
|
44
|
+
const visited = [];
|
|
45
|
+
let owner = value;
|
|
46
|
+
for (let depth = 0; owner !== null && owner !== OBJECT_PROTOTYPE; depth++) {
|
|
47
|
+
let repeated = false;
|
|
48
|
+
for (let index = 0; index < depth; index++) {
|
|
49
|
+
if (visited[index] === owner) {
|
|
50
|
+
repeated = true;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (depth >= MAX_TASK_PROTOTYPE_DEPTH || repeated ||
|
|
55
|
+
isProxyWithoutHooks(owner)) {
|
|
56
|
+
fail("Task definition has an invalid prototype chain.");
|
|
57
|
+
}
|
|
58
|
+
defineArrayElement(visited, depth, owner);
|
|
59
|
+
const descriptor = reflectGetOwnPropertyDescriptor(owner, key);
|
|
60
|
+
if (descriptor !== undefined)
|
|
61
|
+
return descriptor;
|
|
62
|
+
owner = reflectGetPrototypeOf(owner);
|
|
63
|
+
}
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
function inspectTaskDefinition(value) {
|
|
67
|
+
const task = inspectTaskObject(value);
|
|
68
|
+
const fields = objectCreate(null);
|
|
69
|
+
for (let index = 0; index < TASK_DEFINITION_KEYS.length; index++) {
|
|
70
|
+
const key = TASK_DEFINITION_KEYS[index];
|
|
71
|
+
const descriptor = findTaskPropertyDescriptor(task, key);
|
|
72
|
+
if (descriptor === undefined)
|
|
73
|
+
continue;
|
|
74
|
+
const inherited = !hasOwn(task, key);
|
|
75
|
+
if (!("value" in descriptor)) {
|
|
76
|
+
fail(inherited
|
|
77
|
+
? `Task definition ${key} must resolve to a data property.`
|
|
78
|
+
: `Task definition ${key} must be a data property.`);
|
|
79
|
+
}
|
|
80
|
+
fields[key] = descriptor.value;
|
|
81
|
+
}
|
|
82
|
+
return fields;
|
|
83
|
+
}
|
|
84
|
+
function optionalString(value, label) {
|
|
85
|
+
if (value !== undefined && typeof value !== "string") {
|
|
86
|
+
fail(`${label} must be a string.`);
|
|
87
|
+
}
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
function optionalRecord(value, label) {
|
|
91
|
+
if (value === undefined)
|
|
92
|
+
return undefined;
|
|
93
|
+
if (typeof value !== "object" || value === null || arrayIsArray(value) ||
|
|
94
|
+
isProxyWithoutHooks(value)) {
|
|
95
|
+
fail(`${label} must be a non-Proxy object.`);
|
|
96
|
+
}
|
|
97
|
+
const snapshot = snapshotBoundedJsonValue(value);
|
|
98
|
+
if (snapshot.success && snapshot.value !== null &&
|
|
99
|
+
typeof snapshot.value === "object" && !arrayIsArray(snapshot.value)) {
|
|
100
|
+
return freezeJsonSnapshot(snapshot.value);
|
|
101
|
+
}
|
|
102
|
+
// Task schemas have always accepted the public Record<string, unknown>
|
|
103
|
+
// contract. Arbitrary schema instances can keep parser state keyed by object
|
|
104
|
+
// identity, so cloning them cannot preserve their public behavior. Retain
|
|
105
|
+
// those instances unchanged; JSON schemas still take the detached, deeply
|
|
106
|
+
// frozen snapshot path above.
|
|
107
|
+
return value;
|
|
108
|
+
}
|
|
109
|
+
function freezeJsonSnapshot(value) {
|
|
110
|
+
if (typeof value !== "object" || value === null)
|
|
111
|
+
return value;
|
|
112
|
+
const nestedValues = arrayIsArray(value) ? value : objectValues(value);
|
|
113
|
+
for (let index = 0; index < nestedValues.length; index++) {
|
|
114
|
+
freezeJsonSnapshot(nestedValues[index]);
|
|
115
|
+
}
|
|
116
|
+
objectFreeze(value);
|
|
117
|
+
return value;
|
|
118
|
+
}
|
|
119
|
+
/** Validate and capture the task metadata that crosses discovery boundaries. */
|
|
120
|
+
export function captureTaskDefinition(value) {
|
|
121
|
+
const task = inspectTaskObject(value);
|
|
122
|
+
const fields = inspectTaskDefinition(task);
|
|
123
|
+
const run = fields.run;
|
|
124
|
+
if (typeof run !== "function")
|
|
125
|
+
fail("Task definition run must be a function.");
|
|
126
|
+
const runWithReceiver = (ctx) => reflectApply(run, task, [ctx]);
|
|
127
|
+
const name = optionalString(fields.name, "Task definition name");
|
|
128
|
+
const description = optionalString(fields.description, "Task definition description");
|
|
129
|
+
const inputSchema = optionalRecord(fields.inputSchema, "Task definition inputSchema");
|
|
130
|
+
const outputSchema = optionalRecord(fields.outputSchema, "Task definition outputSchema");
|
|
131
|
+
const schedulable = fields.schedulable;
|
|
132
|
+
if (schedulable !== undefined && typeof schedulable !== "boolean") {
|
|
133
|
+
fail("Task definition schedulable must be a boolean.");
|
|
134
|
+
}
|
|
135
|
+
const integrationRequirements = captureScheduleIntegrationRequirementsConfig(fields.integrationRequirements, "Task");
|
|
136
|
+
return objectFreeze({
|
|
137
|
+
...(hasOwn(fields, "name") ? { name } : {}),
|
|
138
|
+
...(hasOwn(fields, "description") ? { description } : {}),
|
|
139
|
+
...(hasOwn(fields, "inputSchema") ? { inputSchema } : {}),
|
|
140
|
+
...(hasOwn(fields, "outputSchema") ? { outputSchema } : {}),
|
|
141
|
+
...(integrationRequirements === undefined ? {} : { integrationRequirements }),
|
|
142
|
+
...(hasOwn(fields, "schedulable") ? { schedulable } : {}),
|
|
143
|
+
run: runWithReceiver,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/** Identify structural task exports without executing accessors. */
|
|
147
|
+
export function isTaskDefinitionCandidate(value) {
|
|
148
|
+
try {
|
|
149
|
+
return findTaskPropertyDescriptor(inspectTaskObject(value), "run") !== undefined;
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../src/src/task/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAuBjD;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,iFAAiF;IACjF,EAAE,EAAE,MAAM,CAAC;IAEX,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IAEb,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IAEjB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IAEnB,0BAA0B;IAC1B,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,wBAAwB;IACxB,UAAU,EAAE,MAAM,CAAC;IAEnB,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;IAEzB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,+EAA+E;IAC/E,6BAA6B,CAAC,EAAE,OAAO,CAAC;CACzC;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,2BAA2B;IAC3B,KAAK,EAAE,cAAc,EAAE,CAAC;IAExB,0CAA0C;IAC1C,MAAM,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpD;AA+ID;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQvE;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,mBAAmB,CAAC,CAsE9B;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAgEhC"}
|
|
@@ -23,7 +23,7 @@ import { fromFileUrl, join } from "../platform/compat/path/index.js";
|
|
|
23
23
|
import { logger as baseLogger } from "../utils/index.js";
|
|
24
24
|
import { collectFiles } from "../utils/file-discovery.js";
|
|
25
25
|
import { importDiscoveryModule } from "../discovery/module-import.js";
|
|
26
|
-
import {
|
|
26
|
+
import { captureTaskDefinition, isTaskDefinitionCandidate } from "./definition-snapshot.js";
|
|
27
27
|
const logger = baseLogger.component("task-discovery");
|
|
28
28
|
const TASK_FILE_EXTENSIONS = [".ts", ".tsx", ".js", ".jsx"];
|
|
29
29
|
const TASK_IGNORE_PATTERNS = [
|
|
@@ -63,16 +63,29 @@ async function collectTaskFiles(baseDir, adapter) {
|
|
|
63
63
|
return files.sort((left, right) => compareText(left.path.replaceAll("\\", "/"), right.path.replaceAll("\\", "/")));
|
|
64
64
|
}
|
|
65
65
|
function extractTaskExport(module) {
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return { exportName, definition: value };
|
|
66
|
+
const errors = [];
|
|
67
|
+
const captureCandidate = (exportName, value) => {
|
|
68
|
+
if (!isTaskDefinitionCandidate(value))
|
|
69
|
+
return null;
|
|
70
|
+
try {
|
|
71
|
+
return { exportName, definition: captureTaskDefinition(value) };
|
|
73
72
|
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
errors.push(error);
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const defaultTask = captureCandidate("default", module.default);
|
|
79
|
+
if (defaultTask !== null)
|
|
80
|
+
return { taskExport: defaultTask, errors };
|
|
81
|
+
for (const [exportName, value] of Object.entries(module)) {
|
|
82
|
+
if (exportName === "default")
|
|
83
|
+
continue;
|
|
84
|
+
const namedTask = captureCandidate(exportName, value);
|
|
85
|
+
if (namedTask !== null)
|
|
86
|
+
return { taskExport: namedTask, errors };
|
|
74
87
|
}
|
|
75
|
-
return null;
|
|
88
|
+
return { taskExport: null, errors };
|
|
76
89
|
}
|
|
77
90
|
async function loadTaskFromFile(filePath, id, adapter, projectDir, allowHostProjectCodeExecution) {
|
|
78
91
|
const module = await importDiscoveryModule(filePath, {
|
|
@@ -80,18 +93,21 @@ async function loadTaskFromFile(filePath, id, adapter, projectDir, allowHostProj
|
|
|
80
93
|
projectDir,
|
|
81
94
|
allowHostProjectCodeExecution,
|
|
82
95
|
});
|
|
83
|
-
const taskExport = extractTaskExport(module);
|
|
96
|
+
const { taskExport, errors } = extractTaskExport(module);
|
|
84
97
|
if (!taskExport)
|
|
85
|
-
return null;
|
|
98
|
+
return { task: null, errors };
|
|
86
99
|
return {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
taskExport.definition.name
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
100
|
+
task: {
|
|
101
|
+
id,
|
|
102
|
+
name: typeof taskExport.definition.name === "string" &&
|
|
103
|
+
taskExport.definition.name.trim().length > 0
|
|
104
|
+
? taskExport.definition.name
|
|
105
|
+
: id,
|
|
106
|
+
filePath,
|
|
107
|
+
exportName: taskExport.exportName,
|
|
108
|
+
definition: taskExport.definition,
|
|
109
|
+
},
|
|
110
|
+
errors,
|
|
95
111
|
};
|
|
96
112
|
}
|
|
97
113
|
function finalizeTaskDiscoveryResult(tasks, errors) {
|
|
@@ -166,7 +182,11 @@ export async function discoverTasks(options) {
|
|
|
166
182
|
}
|
|
167
183
|
for (const file of files) {
|
|
168
184
|
try {
|
|
169
|
-
const
|
|
185
|
+
const loaded = await loadTaskFromFile(file.path, deriveTaskId(file.path, baseDir), adapter, projectDir, allowHostProjectCodeExecution);
|
|
186
|
+
for (const error of loaded.errors) {
|
|
187
|
+
errors.push({ filePath: file.path, error: toErrorMessage(error) });
|
|
188
|
+
}
|
|
189
|
+
const task = loaded.task;
|
|
170
190
|
if (task) {
|
|
171
191
|
tasks.push(task);
|
|
172
192
|
logDiscoveredTask(task, debug);
|
|
@@ -212,7 +232,13 @@ export async function findTaskById(taskId, options) {
|
|
|
212
232
|
if (id !== taskId)
|
|
213
233
|
continue;
|
|
214
234
|
try {
|
|
215
|
-
const
|
|
235
|
+
const loaded = await loadTaskFromFile(file.path, id, adapter, projectDir, allowHostProjectCodeExecution);
|
|
236
|
+
if (debug) {
|
|
237
|
+
for (const error of loaded.errors) {
|
|
238
|
+
logger.warn(`Failed to load task export from ${file.path}: ${toErrorMessage(error)}`);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
const task = loaded.task;
|
|
216
242
|
if (task) {
|
|
217
243
|
matches.push(task);
|
|
218
244
|
}
|
package/esm/src/task/types.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Tasks are user-defined functions in `tasks/` that can run
|
|
6
6
|
* locally via `veryfront task <name>` or in the cloud as runs and schedules.
|
|
7
7
|
*/
|
|
8
|
+
import type { ScheduleIntegrationRequirementConfig } from "../schedule/types.js";
|
|
8
9
|
/**
|
|
9
10
|
* Context passed to task run() function
|
|
10
11
|
*/
|
|
@@ -32,6 +33,8 @@ export interface TaskDefinition {
|
|
|
32
33
|
inputSchema?: Record<string, unknown>;
|
|
33
34
|
/** Optional JSON-schema-like output contract surfaced in APIs/UIs */
|
|
34
35
|
outputSchema?: Record<string, unknown>;
|
|
36
|
+
/** Explicit integration scopes and resources required by scheduled runs. */
|
|
37
|
+
integrationRequirements?: ScheduleIntegrationRequirementConfig[];
|
|
35
38
|
/** Whether this task can be scheduled */
|
|
36
39
|
schedulable?: boolean;
|
|
37
40
|
/** The function to execute */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/task/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wEAAwE;IACxE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAA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AAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAOxE"}
|
package/esm/src/task/types.js
CHANGED
|
@@ -5,26 +5,17 @@
|
|
|
5
5
|
* Tasks are user-defined functions in `tasks/` that can run
|
|
6
6
|
* locally via `veryfront task <name>` or in the cloud as runs and schedules.
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10
|
-
}
|
|
11
|
-
function isOptionalString(value) {
|
|
12
|
-
return value === undefined || typeof value === "string";
|
|
13
|
-
}
|
|
14
|
-
function isOptionalRecord(value) {
|
|
15
|
-
return value === undefined || isRecord(value);
|
|
16
|
-
}
|
|
8
|
+
import { captureTaskDefinition } from "./definition-snapshot.js";
|
|
17
9
|
/**
|
|
18
10
|
* Return true only when the runnable and every declared task metadata field
|
|
19
11
|
* match the public `TaskDefinition` contract.
|
|
20
12
|
*/
|
|
21
13
|
export function isTaskDefinition(value) {
|
|
22
|
-
|
|
14
|
+
try {
|
|
15
|
+
captureTaskDefinition(value);
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
23
19
|
return false;
|
|
24
|
-
|
|
25
|
-
isOptionalString(value.name) &&
|
|
26
|
-
isOptionalString(value.description) &&
|
|
27
|
-
isOptionalRecord(value.inputSchema) &&
|
|
28
|
-
isOptionalRecord(value.outputSchema) &&
|
|
29
|
-
(value.schedulable === undefined || typeof value.schedulable === "boolean");
|
|
20
|
+
}
|
|
30
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-mcp.d.ts","sourceRoot":"","sources":["../../../src/src/tool/remote-mcp.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAkB,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAQzF,mDAAmD;AACnD,eAAO,MAAM,uCAAuC,QAAmB,CAAC;AACxE,mDAAmD;AACnD,eAAO,MAAM,kCAAkC,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