veryfront 0.1.47 → 0.1.49
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/app/components/inline-input.d.ts +1 -4
- package/esm/cli/app/components/inline-input.d.ts.map +1 -1
- package/esm/cli/app/components/inline-input.js +1 -1
- package/esm/cli/app/components/list-select.d.ts +0 -8
- package/esm/cli/app/components/list-select.d.ts.map +1 -1
- package/esm/cli/app/components/list-select.js +0 -13
- package/esm/cli/app/operations/project-creation.d.ts +2 -14
- package/esm/cli/app/operations/project-creation.d.ts.map +1 -1
- package/esm/cli/app/operations/project-creation.js +3 -68
- package/esm/cli/app/shell.js +2 -2
- package/esm/cli/app/utils.d.ts +1 -2
- package/esm/cli/app/utils.d.ts.map +1 -1
- package/esm/cli/app/utils.js +1 -17
- package/esm/cli/app/views/dashboard.d.ts +0 -4
- package/esm/cli/app/views/dashboard.d.ts.map +1 -1
- package/esm/cli/app/views/dashboard.js +0 -15
- package/esm/cli/app/views/startup.d.ts +0 -4
- package/esm/cli/app/views/startup.d.ts.map +1 -1
- package/esm/cli/app/views/startup.js +0 -7
- package/esm/cli/auth/login.d.ts.map +1 -1
- package/esm/cli/auth/login.js +1 -2
- package/esm/cli/auth/token-store.js +1 -1
- package/esm/cli/auth/utils.d.ts +2 -1
- package/esm/cli/auth/utils.d.ts.map +1 -1
- package/esm/cli/commands/build/handler.d.ts +1 -1
- package/esm/cli/commands/generate/integration-generator.js +1 -1
- package/esm/cli/commands/init/catalog.js +3 -3
- package/esm/cli/commands/init/command-help.js +2 -2
- package/esm/cli/commands/init/config-generator.d.ts.map +1 -1
- package/esm/cli/commands/init/config-generator.js +8 -0
- package/esm/cli/commands/init/types.d.ts +1 -1
- package/esm/cli/commands/init/types.d.ts.map +1 -1
- package/esm/cli/commands/install/types.d.ts +2 -2
- package/esm/cli/commands/merge/command.d.ts +1 -1
- package/esm/cli/help/formatters.d.ts +1 -1
- package/esm/cli/help/formatters.d.ts.map +1 -1
- package/esm/cli/help/formatters.js +8 -4
- package/esm/cli/help/main-help.d.ts.map +1 -1
- package/esm/cli/help/main-help.js +2 -2
- package/esm/cli/help/tips.js +1 -1
- package/esm/cli/mcp/remote-file-tools.js +1 -1
- package/esm/cli/mcp/server.d.ts +0 -1
- package/esm/cli/mcp/server.d.ts.map +1 -1
- package/esm/cli/mcp/server.js +2 -5
- package/esm/cli/mcp/tools/catalog-tools.d.ts +3 -3
- package/esm/cli/mcp/tools/catalog-tools.js +3 -3
- package/esm/cli/mcp/tools/dev-tools.d.ts +1 -1
- package/esm/cli/mcp/tools/dev-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/dev-tools.js +1 -2
- package/esm/cli/mcp/tools/scaffold-tools.d.ts +2 -2
- package/esm/cli/mcp/tools.d.ts +1 -2
- package/esm/cli/mcp/tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools.js +1 -2
- package/esm/cli/shared/reserve-slug.d.ts.map +1 -1
- package/esm/cli/shared/reserve-slug.js +1 -3
- package/esm/cli/sync/ignore.d.ts +1 -1
- package/esm/cli/sync/ignore.d.ts.map +1 -1
- package/esm/cli/sync/ignore.js +22 -18
- package/esm/cli/templates/index.js +2 -2
- package/esm/cli/templates/manifest.d.ts +10 -8
- package/esm/cli/templates/manifest.js +15 -13
- package/esm/cli/templates/types.d.ts +1 -1
- package/esm/cli/templates/types.d.ts.map +1 -1
- package/esm/cli/ui/colors.d.ts +0 -1
- package/esm/cli/ui/colors.d.ts.map +1 -1
- package/esm/cli/ui/colors.js +0 -10
- package/esm/cli/ui/dot-matrix.d.ts.map +1 -1
- package/esm/cli/ui/dot-matrix.js +2 -5
- package/esm/cli/ui/tui.js +2 -3
- package/esm/cli/utils/index.js +1 -2
- package/esm/cli/utils/package-manager.d.ts.map +1 -1
- package/esm/cli/utils/package-manager.js +3 -4
- package/esm/deno.d.ts +10 -0
- package/esm/deno.js +30 -20
- package/esm/src/agent/chat-handler.d.ts +22 -0
- package/esm/src/agent/chat-handler.d.ts.map +1 -1
- package/esm/src/agent/chat-handler.js +88 -28
- package/esm/src/agent/factory.d.ts +0 -8
- package/esm/src/agent/factory.d.ts.map +1 -1
- package/esm/src/agent/factory.js +50 -1
- package/esm/src/agent/index.d.ts +17 -2
- package/esm/src/agent/index.d.ts.map +1 -1
- package/esm/src/agent/index.js +17 -2
- package/esm/src/agent/memory/memory.d.ts +2 -2
- package/esm/src/agent/memory/memory.d.ts.map +1 -1
- package/esm/src/agent/memory/memory.js +0 -1
- package/esm/src/agent/react/index.d.ts +1 -1
- package/esm/src/agent/react/index.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/index.d.ts +1 -1
- package/esm/src/agent/react/use-chat/index.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/streaming/handler.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/streaming/handler.js +42 -4
- package/esm/src/agent/react/use-chat/streaming/parts-builder.d.ts +2 -2
- package/esm/src/agent/react/use-chat/streaming/parts-builder.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/streaming/parts-builder.js +14 -1
- package/esm/src/agent/react/use-chat/streaming/types.d.ts +5 -0
- package/esm/src/agent/react/use-chat/streaming/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/types.d.ts +23 -1
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts +15 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +187 -35
- package/esm/src/agent/runtime/index.d.ts +18 -0
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +167 -36
- package/esm/src/agent/runtime/tool-helpers.d.ts +6 -1
- package/esm/src/agent/runtime/tool-helpers.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-helpers.js +10 -1
- package/esm/src/agent/schemas/agent.schema.d.ts +4 -4
- package/esm/src/agent/types.d.ts +10 -0
- package/esm/src/agent/types.d.ts.map +1 -1
- package/esm/src/ai/registry-manager.d.ts.map +1 -1
- package/esm/src/ai/registry-manager.js +2 -1
- package/esm/src/build/bundler/code-splitter/manifest-builder.d.ts +0 -2
- package/esm/src/build/bundler/code-splitter/manifest-builder.d.ts.map +1 -1
- package/esm/src/build/bundler/code-splitter/manifest-builder.js +1 -1
- package/esm/src/build/compiler/mdx-compiler/validator.d.ts.map +1 -1
- package/esm/src/build/compiler/mdx-compiler/validator.js +2 -3
- package/esm/src/build/compiler/mdx-to-js.d.ts +0 -2
- package/esm/src/build/compiler/mdx-to-js.d.ts.map +1 -1
- package/esm/src/build/compiler/mdx-to-js.js +0 -81
- package/esm/src/build/index.d.ts +0 -6
- package/esm/src/build/index.d.ts.map +1 -1
- package/esm/src/build/index.js +0 -1
- package/esm/src/build/production-build/build/route-collector.d.ts.map +1 -1
- package/esm/src/build/production-build/build/route-collector.js +2 -3
- package/esm/src/build/production-build/client-runtime.d.ts +7 -3
- package/esm/src/build/production-build/client-runtime.d.ts.map +1 -1
- package/esm/src/build/production-build/client-runtime.js +9 -9
- package/esm/src/build/production-build/templates.d.ts +5 -9
- package/esm/src/build/production-build/templates.d.ts.map +1 -1
- package/esm/src/build/production-build/templates.js +6 -18
- package/esm/src/build/vendor-cache.d.ts.map +1 -1
- package/esm/src/build/vendor-cache.js +0 -5
- package/esm/src/cache/tokenizing-gateway.d.ts +0 -2
- package/esm/src/cache/tokenizing-gateway.d.ts.map +1 -1
- package/esm/src/cache/tokenizing-gateway.js +1 -3
- package/esm/src/chat/index.d.ts +33 -24
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +40 -26
- package/esm/src/config/define-config.d.ts.map +1 -1
- package/esm/src/config/define-config.js +28 -25
- package/esm/src/config/loader.d.ts.map +1 -1
- package/esm/src/config/loader.js +10 -7
- package/esm/src/config/schemas/config.schema.d.ts +58 -12
- package/esm/src/config/schemas/config.schema.d.ts.map +1 -1
- package/esm/src/config/schemas/config.schema.js +12 -0
- package/esm/src/data/data-fetcher.d.ts +1 -2
- package/esm/src/data/data-fetcher.d.ts.map +1 -1
- package/esm/src/data/data-fetcher.js +14 -15
- package/esm/src/data/server-data-fetcher.d.ts +0 -3
- package/esm/src/data/server-data-fetcher.d.ts.map +1 -1
- package/esm/src/data/server-data-fetcher.js +1 -8
- package/esm/src/data/static-data-fetcher.d.ts +1 -3
- package/esm/src/data/static-data-fetcher.d.ts.map +1 -1
- package/esm/src/data/static-data-fetcher.js +1 -3
- package/esm/src/discovery/discovery-engine.d.ts.map +1 -1
- package/esm/src/discovery/discovery-engine.js +19 -1
- package/esm/src/discovery/discovery-utils.d.ts +0 -4
- package/esm/src/discovery/discovery-utils.d.ts.map +1 -1
- package/esm/src/discovery/discovery-utils.js +0 -6
- package/esm/src/discovery/file-discovery.d.ts +3 -1
- package/esm/src/discovery/file-discovery.d.ts.map +1 -1
- package/esm/src/discovery/file-discovery.js +3 -8
- package/esm/src/discovery/handlers/index.d.ts +1 -0
- package/esm/src/discovery/handlers/index.d.ts.map +1 -1
- package/esm/src/discovery/handlers/index.js +1 -0
- package/esm/src/discovery/handlers/skill-handler.d.ts +26 -0
- package/esm/src/discovery/handlers/skill-handler.d.ts.map +1 -0
- package/esm/src/discovery/handlers/skill-handler.js +87 -0
- package/esm/src/discovery/handlers/task-handler.d.ts.map +1 -1
- package/esm/src/discovery/handlers/task-handler.js +1 -5
- package/esm/src/discovery/transpiler.d.ts.map +1 -1
- package/esm/src/discovery/transpiler.js +7 -2
- package/esm/src/discovery/types.d.ts +3 -0
- package/esm/src/discovery/types.d.ts.map +1 -1
- package/esm/src/embedding/chunk.d.ts +18 -0
- package/esm/src/embedding/chunk.d.ts.map +1 -0
- package/esm/src/embedding/chunk.js +48 -0
- package/esm/src/embedding/embedding.d.ts +23 -0
- package/esm/src/embedding/embedding.d.ts.map +1 -0
- package/esm/src/embedding/embedding.js +54 -0
- package/esm/src/embedding/index.d.ts +29 -0
- package/esm/src/embedding/index.d.ts.map +1 -0
- package/esm/src/embedding/index.js +26 -0
- package/esm/src/embedding/react/use-uploads.d.ts +31 -0
- package/esm/src/embedding/react/use-uploads.d.ts.map +1 -0
- package/esm/src/embedding/react/use-uploads.js +71 -0
- package/esm/src/embedding/resolve.d.ts +27 -0
- package/esm/src/embedding/resolve.d.ts.map +1 -0
- package/esm/src/embedding/resolve.js +94 -0
- package/esm/src/embedding/types.d.ts +90 -0
- package/esm/src/embedding/types.d.ts.map +1 -0
- package/esm/src/embedding/types.js +1 -0
- package/esm/src/embedding/upload-handler.d.ts +43 -0
- package/esm/src/embedding/upload-handler.d.ts.map +1 -0
- package/esm/src/embedding/upload-handler.js +144 -0
- package/esm/src/embedding/upload-loader.d.ts +14 -0
- package/esm/src/embedding/upload-loader.d.ts.map +1 -0
- package/esm/src/embedding/upload-loader.js +70 -0
- package/esm/src/embedding/upload-store.d.ts +27 -0
- package/esm/src/embedding/upload-store.d.ts.map +1 -0
- package/esm/src/embedding/upload-store.js +244 -0
- package/esm/src/embedding/vector-store.d.ts +33 -0
- package/esm/src/embedding/vector-store.d.ts.map +1 -0
- package/esm/src/embedding/vector-store.js +215 -0
- package/esm/src/errors/error-registry.d.ts +2 -1
- package/esm/src/errors/error-registry.d.ts.map +1 -1
- package/esm/src/errors/http-error.d.ts +1 -2
- package/esm/src/errors/http-error.d.ts.map +1 -1
- package/esm/src/errors/http-error.js +2 -2
- package/esm/src/errors/middleware/cli-error-boundary.d.ts.map +1 -1
- package/esm/src/errors/middleware/cli-error-boundary.js +13 -2
- package/esm/src/errors/middleware/wrap-unknown.d.ts +0 -7
- package/esm/src/errors/middleware/wrap-unknown.d.ts.map +1 -1
- package/esm/src/errors/middleware/wrap-unknown.js +0 -9
- package/esm/src/errors/veryfront-error.d.ts +0 -3
- package/esm/src/errors/veryfront-error.d.ts.map +1 -1
- package/esm/src/errors/veryfront-error.js +0 -5
- package/esm/src/html/schemas/html.schema.d.ts +2 -2
- 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 -2
- package/esm/src/html/styles-builder/plugin-loader.d.ts.map +1 -1
- package/esm/src/html/styles-builder/plugin-loader.js +50 -21
- package/esm/src/html/styles-builder/tailwind-compiler-cache.d.ts.map +1 -1
- package/esm/src/html/styles-builder/tailwind-compiler-cache.js +12 -4
- package/esm/src/html/utils.d.ts +0 -7
- package/esm/src/html/utils.d.ts.map +1 -1
- package/esm/src/html/utils.js +0 -25
- package/esm/src/modules/component-registry/registry.d.ts +0 -3
- package/esm/src/modules/component-registry/registry.d.ts.map +1 -1
- package/esm/src/modules/component-registry/registry.js +0 -3
- package/esm/src/modules/import-map/default-import-map.d.ts.map +1 -1
- package/esm/src/modules/import-map/default-import-map.js +8 -0
- package/esm/src/modules/react-loader/component-loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/component-loader.js +1 -0
- 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 +10 -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/types.d.ts +2 -0
- package/esm/src/modules/react-loader/types.d.ts.map +1 -1
- package/esm/src/modules/server/module-server.d.ts +2 -0
- package/esm/src/modules/server/module-server.d.ts.map +1 -1
- package/esm/src/modules/server/module-server.js +2 -1
- package/esm/src/oauth/handlers/callback-handler.d.ts +2 -0
- package/esm/src/oauth/handlers/callback-handler.d.ts.map +1 -1
- package/esm/src/oauth/handlers/callback-handler.js +10 -4
- package/esm/src/oauth/providers/common.d.ts.map +1 -1
- package/esm/src/oauth/providers/common.js +0 -23
- package/esm/src/observability/auto-instrument/react-instrumentation.js +2 -1
- package/esm/src/observability/instruments/instruments-factory.d.ts +1 -1
- package/esm/src/observability/instruments/instruments-factory.d.ts.map +1 -1
- package/esm/src/observability/instruments/instruments-factory.js +5 -4
- package/esm/src/observability/metrics/config.js +5 -4
- package/esm/src/observability/metrics/manager.js +1 -1
- package/esm/src/observability/tracing/span-operations.d.ts.map +1 -1
- package/esm/src/observability/tracing/span-operations.js +14 -8
- package/esm/src/platform/compat/console/node.d.ts +0 -1
- package/esm/src/platform/compat/console/node.d.ts.map +1 -1
- package/esm/src/platform/compat/console/node.js +4 -11
- package/esm/src/platform/compat/fs.d.ts.map +1 -1
- package/esm/src/platform/compat/fs.js +4 -2
- package/esm/src/platform/compat/opaque-deps.d.ts +18 -2
- package/esm/src/platform/compat/opaque-deps.d.ts.map +1 -1
- package/esm/src/platform/compat/opaque-deps.js +19 -0
- package/esm/src/platform/compat/path/basic-operations.d.ts.map +1 -1
- package/esm/src/platform/compat/path/basic-operations.js +17 -10
- package/esm/src/platform/compat/path/resolution.d.ts.map +1 -1
- package/esm/src/platform/compat/path/resolution.js +65 -20
- package/esm/src/platform/compat/path/url-conversion.d.ts.map +1 -1
- package/esm/src/platform/compat/path/url-conversion.js +3 -2
- package/esm/src/platform/compat/process.d.ts +2 -14
- package/esm/src/platform/compat/process.d.ts.map +1 -1
- package/esm/src/platform/compat/process.js +92 -70
- package/esm/src/provider/index.d.ts +1 -1
- package/esm/src/provider/index.d.ts.map +1 -1
- package/esm/src/provider/index.js +1 -1
- package/esm/src/provider/local/ai-sdk-adapter.d.ts.map +1 -1
- package/esm/src/provider/local/ai-sdk-adapter.js +18 -18
- package/esm/src/provider/local/env.d.ts.map +1 -1
- package/esm/src/provider/local/env.js +2 -1
- package/esm/src/provider/local/local-embedding-adapter.d.ts +19 -0
- package/esm/src/provider/local/local-embedding-adapter.d.ts.map +1 -0
- package/esm/src/provider/local/local-embedding-adapter.js +32 -0
- package/esm/src/provider/local/local-embedding-engine.d.ts +17 -0
- package/esm/src/provider/local/local-embedding-engine.d.ts.map +1 -0
- package/esm/src/provider/local/local-embedding-engine.js +63 -0
- package/esm/src/provider/local/local-engine.d.ts +7 -0
- package/esm/src/provider/local/local-engine.d.ts.map +1 -1
- package/esm/src/provider/local/local-engine.js +1 -1
- package/esm/src/provider/local/model-catalog.d.ts +10 -1
- package/esm/src/provider/local/model-catalog.d.ts.map +1 -1
- package/esm/src/provider/local/model-catalog.js +61 -0
- package/esm/src/provider/model-registry.d.ts +10 -0
- package/esm/src/provider/model-registry.d.ts.map +1 -1
- package/esm/src/provider/model-registry.js +43 -0
- package/esm/src/proxy/retry.d.ts +3 -3
- package/esm/src/proxy/retry.d.ts.map +1 -1
- package/esm/src/proxy/retry.js +0 -7
- package/esm/src/proxy/tracing.d.ts +1 -5
- package/esm/src/proxy/tracing.d.ts.map +1 -1
- package/esm/src/proxy/tracing.js +1 -7
- package/esm/src/react/components/ai/agent-card.js +13 -13
- package/esm/src/react/components/ai/chat/components/animations.d.ts +5 -0
- package/esm/src/react/components/ai/chat/components/animations.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/components/animations.js +13 -1
- package/esm/src/react/components/ai/chat/components/attachment-pill.d.ts +15 -0
- package/esm/src/react/components/ai/chat/components/attachment-pill.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/attachment-pill.js +40 -0
- package/esm/src/react/components/ai/chat/components/branch-picker.d.ts +9 -0
- package/esm/src/react/components/ai/chat/components/branch-picker.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/branch-picker.js +17 -0
- package/esm/src/react/components/ai/chat/components/code-block.d.ts +8 -0
- package/esm/src/react/components/ai/chat/components/code-block.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/code-block.js +38 -0
- package/esm/src/react/components/ai/chat/components/drop-zone.d.ts +7 -0
- package/esm/src/react/components/ai/chat/components/drop-zone.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/drop-zone.js +14 -0
- package/esm/src/react/components/ai/chat/components/empty-state.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/components/empty-state.js +10 -8
- package/esm/src/react/components/ai/chat/components/inference-badge.js +1 -1
- package/esm/src/react/components/ai/chat/components/inline-citation.d.ts +10 -0
- package/esm/src/react/components/ai/chat/components/inline-citation.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/inline-citation.js +59 -0
- package/esm/src/react/components/ai/chat/components/message-actions.d.ts +3 -2
- package/esm/src/react/components/ai/chat/components/message-actions.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/components/message-actions.js +10 -10
- package/esm/src/react/components/ai/chat/components/message-edit-form.d.ts +8 -0
- package/esm/src/react/components/ai/chat/components/message-edit-form.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/message-edit-form.js +46 -0
- package/esm/src/react/components/ai/chat/components/message-feedback.d.ts +9 -0
- package/esm/src/react/components/ai/chat/components/message-feedback.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/message-feedback.js +19 -0
- package/esm/src/react/components/ai/chat/components/quick-actions.d.ts +14 -0
- package/esm/src/react/components/ai/chat/components/quick-actions.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/quick-actions.js +7 -0
- package/esm/src/react/components/ai/chat/components/reasoning.d.ts +3 -4
- package/esm/src/react/components/ai/chat/components/reasoning.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/components/reasoning.js +11 -6
- package/esm/src/react/components/ai/chat/components/sidebar.d.ts +14 -0
- package/esm/src/react/components/ai/chat/components/sidebar.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/sidebar.js +92 -0
- package/esm/src/react/components/ai/chat/components/skill-badge.d.ts +12 -0
- package/esm/src/react/components/ai/chat/components/skill-badge.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/skill-badge.js +34 -0
- package/esm/src/react/components/ai/chat/components/sources.d.ts +13 -0
- package/esm/src/react/components/ai/chat/components/sources.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/sources.js +28 -0
- package/esm/src/react/components/ai/chat/components/step-indicator.d.ts +8 -0
- package/esm/src/react/components/ai/chat/components/step-indicator.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/step-indicator.js +15 -0
- package/esm/src/react/components/ai/chat/components/tab-switcher.d.ts +16 -0
- package/esm/src/react/components/ai/chat/components/tab-switcher.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/tab-switcher.js +28 -0
- package/esm/src/react/components/ai/chat/components/tool-ui.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/components/tool-ui.js +23 -21
- package/esm/src/react/components/ai/chat/components/upgrade-cta.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/components/upgrade-cta.js +3 -3
- package/esm/src/react/components/ai/chat/components/uploads-panel.d.ts +16 -0
- package/esm/src/react/components/ai/chat/components/uploads-panel.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/uploads-panel.js +46 -0
- package/esm/src/react/components/ai/chat/composition/api.d.ts +10 -5
- package/esm/src/react/components/ai/chat/composition/api.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/composition/api.js +12 -20
- package/esm/src/react/components/ai/chat/composition/chat-composer.d.ts +35 -0
- package/esm/src/react/components/ai/chat/composition/chat-composer.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/chat-composer.js +53 -0
- package/esm/src/react/components/ai/chat/composition/chat-empty.d.ts +20 -0
- package/esm/src/react/components/ai/chat/composition/chat-empty.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/chat-empty.js +23 -0
- package/esm/src/react/components/ai/chat/composition/chat-if.d.ts +14 -0
- package/esm/src/react/components/ai/chat/composition/chat-if.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/chat-if.js +11 -0
- package/esm/src/react/components/ai/chat/composition/chat-message-list.d.ts +36 -0
- package/esm/src/react/components/ai/chat/composition/chat-message-list.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/chat-message-list.js +113 -0
- package/esm/src/react/components/ai/chat/composition/chat-root.d.ts +43 -0
- package/esm/src/react/components/ai/chat/composition/chat-root.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/chat-root.js +78 -0
- package/esm/src/react/components/ai/chat/composition/error-banner.d.ts +12 -0
- package/esm/src/react/components/ai/chat/composition/error-banner.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/error-banner.js +17 -0
- package/esm/src/react/components/ai/chat/composition/message.d.ts +54 -0
- package/esm/src/react/components/ai/chat/composition/message.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/message.js +175 -0
- package/esm/src/react/components/ai/chat/composition/model-avatar.d.ts +14 -0
- package/esm/src/react/components/ai/chat/composition/model-avatar.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/model-avatar.js +60 -0
- package/esm/src/react/components/ai/chat/contexts/chat-context.d.ts +45 -0
- package/esm/src/react/components/ai/chat/contexts/chat-context.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/contexts/chat-context.js +20 -0
- package/esm/src/react/components/ai/chat/contexts/composer-context.d.ts +34 -0
- package/esm/src/react/components/ai/chat/contexts/composer-context.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/contexts/composer-context.js +21 -0
- package/esm/src/react/components/ai/chat/contexts/index.d.ts +13 -0
- package/esm/src/react/components/ai/chat/contexts/index.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/contexts/index.js +12 -0
- package/esm/src/react/components/ai/chat/contexts/message-context.d.ts +30 -0
- package/esm/src/react/components/ai/chat/contexts/message-context.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/contexts/message-context.js +21 -0
- package/esm/src/react/components/ai/chat/contexts/thread-list-context.d.ts +23 -0
- package/esm/src/react/components/ai/chat/contexts/thread-list-context.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/contexts/thread-list-context.js +21 -0
- package/esm/src/react/components/ai/chat/hooks/use-threads.d.ts +24 -0
- package/esm/src/react/components/ai/chat/hooks/use-threads.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/hooks/use-threads.js +151 -0
- package/esm/src/react/components/ai/chat/index.d.ts +102 -17
- package/esm/src/react/components/ai/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/index.js +164 -95
- package/esm/src/react/components/ai/chat/utils/export.d.ts +10 -0
- package/esm/src/react/components/ai/chat/utils/export.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/utils/export.js +64 -0
- package/esm/src/react/components/ai/chat/utils/message-parts.d.ts +12 -0
- package/esm/src/react/components/ai/chat/utils/message-parts.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/utils/message-parts.js +55 -0
- package/esm/src/react/components/ai/chat-with-sidebar.d.ts +98 -0
- package/esm/src/react/components/ai/chat-with-sidebar.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat-with-sidebar.js +165 -0
- package/esm/src/react/components/ai/chat.d.ts +10 -1
- package/esm/src/react/components/ai/chat.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat.js +25 -1
- package/esm/src/react/components/ai/error-boundary.js +6 -6
- package/esm/src/react/components/ai/icons/index.d.ts +9 -0
- package/esm/src/react/components/ai/icons/index.d.ts.map +1 -1
- package/esm/src/react/components/ai/icons/index.js +82 -0
- package/esm/src/react/components/ai/markdown.d.ts.map +1 -1
- package/esm/src/react/components/ai/markdown.js +12 -12
- package/esm/src/react/components/ai/model-selector.d.ts +10 -2
- package/esm/src/react/components/ai/model-selector.d.ts.map +1 -1
- package/esm/src/react/components/ai/model-selector.js +138 -4
- package/esm/src/react/components/ai/theme.d.ts +96 -13
- package/esm/src/react/components/ai/theme.d.ts.map +1 -1
- package/esm/src/react/components/ai/theme.js +177 -21
- package/esm/src/react/primitives/input-box.d.ts.map +1 -1
- package/esm/src/react/primitives/input-box.js +16 -3
- package/esm/src/rendering/cache/index.d.ts +1 -5
- package/esm/src/rendering/cache/index.d.ts.map +1 -1
- package/esm/src/rendering/cache/index.js +1 -5
- package/esm/src/rendering/component-handling.d.ts +2 -0
- package/esm/src/rendering/component-handling.d.ts.map +1 -1
- package/esm/src/rendering/component-handling.js +7 -9
- package/esm/src/rendering/orchestrator/pipeline.d.ts +11 -2
- package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
- package/esm/src/rendering/page-renderer.d.ts.map +1 -1
- package/esm/src/rendering/page-renderer.js +1 -0
- package/esm/src/rendering/shared/context-aware-cache.d.ts.map +1 -1
- package/esm/src/rendering/shared/context-aware-cache.js +0 -4
- package/esm/src/repositories/schemas/index.d.ts +1 -1
- package/esm/src/repositories/schemas/index.d.ts.map +1 -1
- package/esm/src/repositories/schemas/index.js +1 -1
- package/esm/src/repositories/schemas/repository.schema.d.ts +0 -11
- package/esm/src/repositories/schemas/repository.schema.d.ts.map +1 -1
- package/esm/src/repositories/schemas/repository.schema.js +0 -13
- package/esm/src/repositories/types.d.ts +1 -1
- package/esm/src/repositories/types.d.ts.map +1 -1
- package/esm/src/routing/api/module-loader/esbuild-plugin.d.ts.map +1 -1
- package/esm/src/routing/api/module-loader/esbuild-plugin.js +11 -24
- package/esm/src/routing/api/module-loader/loader.d.ts +1 -0
- package/esm/src/routing/api/module-loader/loader.d.ts.map +1 -1
- package/esm/src/routing/api/module-loader/loader.js +347 -27
- package/esm/src/routing/api/openapi/path-utils.d.ts +0 -19
- package/esm/src/routing/api/openapi/path-utils.d.ts.map +1 -1
- package/esm/src/routing/api/openapi/path-utils.js +0 -34
- package/esm/src/routing/api/openapi/spec-generator.d.ts.map +1 -1
- package/esm/src/routing/api/openapi/spec-generator.js +1 -19
- package/esm/src/routing/api/openapi/types.d.ts +1 -0
- package/esm/src/routing/api/openapi/types.d.ts.map +1 -1
- package/esm/src/routing/api/openapi/types.js +18 -0
- package/esm/src/sandbox/sandbox.d.ts +1 -0
- package/esm/src/sandbox/sandbox.d.ts.map +1 -1
- package/esm/src/sandbox/sandbox.js +7 -8
- package/esm/src/security/http/cors/constants.d.ts +0 -2
- package/esm/src/security/http/cors/constants.d.ts.map +1 -1
- package/esm/src/security/http/cors/constants.js +0 -2
- package/esm/src/security/http/response/index.d.ts +3 -4
- package/esm/src/security/http/response/index.d.ts.map +1 -1
- package/esm/src/security/http/response/index.js +2 -3
- package/esm/src/server/context/enriched-context.d.ts +0 -8
- package/esm/src/server/context/enriched-context.d.ts.map +1 -1
- package/esm/src/server/context/enriched-context.js +1 -12
- package/esm/src/server/dev-server/server.d.ts.map +1 -1
- package/esm/src/server/dev-server/server.js +11 -4
- package/esm/src/server/dev-ui/manifest.d.ts +20 -20
- package/esm/src/server/dev-ui/manifest.js +20 -20
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts +9 -0
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -0
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +5187 -0
- package/esm/src/server/handlers/dev/styles-candidate-scanner.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/styles-candidate-scanner.js +3 -190
- package/esm/src/server/handlers/request/module/module-server-handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/module/module-server-handler.js +1 -0
- package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/index.js +14 -24
- package/esm/src/server/shared/renderer/memory/pressure.d.ts +0 -7
- package/esm/src/server/shared/renderer/memory/pressure.d.ts.map +1 -1
- package/esm/src/server/shared/renderer/memory/pressure.js +1 -13
- package/esm/src/server/utils/domain-lookup.d.ts +0 -4
- package/esm/src/server/utils/domain-lookup.d.ts.map +1 -1
- package/esm/src/server/utils/domain-lookup.js +0 -3
- package/esm/src/skill/allowed-tools.d.ts +54 -0
- package/esm/src/skill/allowed-tools.d.ts.map +1 -0
- package/esm/src/skill/allowed-tools.js +87 -0
- package/esm/src/skill/executor.d.ts +28 -0
- package/esm/src/skill/executor.d.ts.map +1 -0
- package/esm/src/skill/executor.js +187 -0
- package/esm/src/skill/index.d.ts +19 -0
- package/esm/src/skill/index.d.ts.map +1 -0
- package/esm/src/skill/index.js +24 -0
- package/esm/src/skill/parser.d.ts +30 -0
- package/esm/src/skill/parser.d.ts.map +1 -0
- package/esm/src/skill/parser.js +162 -0
- package/esm/src/skill/path-safety.d.ts +22 -0
- package/esm/src/skill/path-safety.d.ts.map +1 -0
- package/esm/src/skill/path-safety.js +156 -0
- package/esm/src/skill/prompt-augmentation.d.ts +19 -0
- package/esm/src/skill/prompt-augmentation.d.ts.map +1 -0
- package/esm/src/skill/prompt-augmentation.js +36 -0
- package/esm/src/skill/registry.d.ts +25 -0
- package/esm/src/skill/registry.d.ts.map +1 -0
- package/esm/src/skill/registry.js +42 -0
- package/esm/src/skill/tools.d.ts +27 -0
- package/esm/src/skill/tools.d.ts.map +1 -0
- package/esm/src/skill/tools.js +149 -0
- package/esm/src/skill/types.d.ts +85 -0
- package/esm/src/skill/types.d.ts.map +1 -0
- package/esm/src/skill/types.js +27 -0
- package/esm/src/studio/bridge/bridge-bundle.generated.d.ts +1 -1
- package/esm/src/studio/bridge/bridge-bundle.generated.d.ts.map +1 -1
- package/esm/src/studio/bridge/bridge-bundle.generated.js +1 -1
- package/esm/src/studio/element-selector-injector.d.ts +0 -2
- package/esm/src/studio/element-selector-injector.d.ts.map +1 -1
- package/esm/src/task/runner.d.ts +6 -0
- package/esm/src/task/runner.d.ts.map +1 -1
- package/esm/src/task/runner.js +8 -8
- package/esm/src/tool/factory.js +31 -39
- package/esm/src/transforms/esm/http-cache-helpers.d.ts +0 -8
- package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-helpers.js +0 -20
- package/esm/src/transforms/esm/path-resolver.d.ts +0 -14
- package/esm/src/transforms/esm/path-resolver.d.ts.map +1 -1
- package/esm/src/transforms/esm/path-resolver.js +1 -92
- package/esm/src/transforms/esm/source-url-embed.d.ts +0 -14
- package/esm/src/transforms/esm/source-url-embed.d.ts.map +1 -1
- package/esm/src/transforms/esm/source-url-embed.js +0 -47
- package/esm/src/transforms/esm/transform-cache.d.ts.map +1 -1
- package/esm/src/transforms/esm/transform-cache.js +2 -6
- package/esm/src/transforms/mdx/index.d.ts +0 -1
- package/esm/src/transforms/mdx/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/index.js +0 -4
- package/esm/src/transforms/pipeline/context.d.ts +0 -1
- package/esm/src/transforms/pipeline/context.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/context.js +0 -1
- package/esm/src/transforms/pipeline/index.d.ts +1 -2
- package/esm/src/transforms/pipeline/index.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/index.js +0 -3
- package/esm/src/transforms/pipeline/stages/ssr-http-cache.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/ssr-http-cache.js +0 -1
- package/esm/src/transforms/plugins/rehype-node-positions.d.ts.map +1 -1
- package/esm/src/transforms/plugins/rehype-node-positions.js +1 -0
- package/esm/src/types/entities/getEntityInfo.js +1 -1
- package/esm/src/types/index.d.ts +2 -13
- package/esm/src/types/index.d.ts.map +1 -1
- package/esm/src/types/server.d.ts +2 -1
- package/esm/src/types/server.d.ts.map +1 -1
- package/esm/src/utils/cache-file-ops.d.ts +1 -1
- package/esm/src/utils/cache-file-ops.d.ts.map +1 -1
- package/esm/src/utils/cache-file-ops.js +5 -6
- package/esm/src/utils/lru-wrapper.d.ts.map +1 -1
- package/esm/src/utils/lru-wrapper.js +2 -4
- package/esm/src/workflow/claude-code/event-publisher.d.ts +0 -4
- package/esm/src/workflow/claude-code/event-publisher.d.ts.map +1 -1
- package/esm/src/workflow/claude-code/event-publisher.js +2 -6
- package/esm/src/workflow/executor/workflow-executor.d.ts.map +1 -1
- package/esm/src/workflow/executor/workflow-executor.js +6 -1
- package/esm/src/workflow/react/use-workflow-list.d.ts.map +1 -1
- package/esm/src/workflow/react/use-workflow-list.js +2 -1
- package/esm/src/workflow/schemas/workflow.schema.d.ts +8 -8
- package/package.json +10 -3
- package/src/cli/app/components/inline-input.ts +0 -5
- package/src/cli/app/components/list-select.ts +0 -21
- package/src/cli/app/operations/project-creation.ts +4 -109
- package/src/cli/app/shell.ts +2 -2
- package/src/cli/app/utils.ts +0 -22
- package/src/cli/app/views/dashboard.ts +0 -17
- package/src/cli/app/views/startup.ts +0 -13
- package/src/cli/auth/login.ts +1 -2
- package/src/cli/auth/token-store.ts +1 -1
- package/src/cli/auth/utils.ts +2 -1
- package/src/cli/commands/generate/integration-generator.ts +1 -1
- package/src/cli/commands/init/catalog.ts +3 -3
- package/src/cli/commands/init/command-help.ts +2 -2
- package/src/cli/commands/init/config-generator.ts +9 -0
- package/src/cli/commands/init/types.ts +1 -1
- package/src/cli/help/formatters.ts +11 -4
- package/src/cli/help/main-help.ts +2 -3
- package/src/cli/help/tips.ts +1 -1
- package/src/cli/mcp/remote-file-tools.ts +1 -1
- package/src/cli/mcp/server.ts +2 -5
- package/src/cli/mcp/tools/catalog-tools.ts +3 -3
- package/src/cli/mcp/tools/dev-tools.ts +1 -2
- package/src/cli/mcp/tools.ts +8 -2
- package/src/cli/shared/reserve-slug.ts +1 -4
- package/src/cli/sync/ignore.ts +26 -21
- package/src/cli/templates/index.ts +2 -2
- package/src/cli/templates/manifest.js +15 -13
- package/src/cli/templates/types.ts +1 -1
- package/src/cli/ui/colors.ts +0 -12
- package/src/cli/ui/dot-matrix.ts +3 -6
- package/src/cli/ui/tui.ts +3 -3
- package/src/cli/utils/index.ts +1 -1
- package/src/cli/utils/package-manager.ts +3 -4
- package/src/deno.js +30 -20
- package/src/src/agent/chat-handler.ts +138 -28
- package/src/src/agent/factory.ts +58 -9
- package/src/src/agent/index.ts +24 -2
- package/src/src/agent/memory/memory.ts +0 -9
- package/src/src/agent/react/index.ts +2 -0
- package/src/src/agent/react/use-chat/index.ts +2 -0
- package/src/src/agent/react/use-chat/streaming/handler.ts +66 -5
- package/src/src/agent/react/use-chat/streaming/parts-builder.ts +18 -1
- package/src/src/agent/react/use-chat/streaming/types.ts +6 -0
- package/src/src/agent/react/use-chat/types.ts +26 -1
- package/src/src/agent/react/use-chat/use-chat.ts +245 -36
- package/src/src/agent/runtime/index.ts +213 -35
- package/src/src/agent/runtime/tool-helpers.ts +9 -0
- package/src/src/agent/types.ts +10 -0
- package/src/src/ai/registry-manager.ts +2 -1
- package/src/src/build/bundler/code-splitter/manifest-builder.ts +1 -1
- package/src/src/build/compiler/mdx-compiler/validator.ts +3 -7
- package/src/src/build/compiler/mdx-to-js.ts +0 -101
- package/src/src/build/index.ts +0 -8
- package/src/src/build/production-build/build/route-collector.ts +2 -4
- package/src/src/build/production-build/client-runtime.ts +21 -5
- package/src/src/build/production-build/templates.ts +9 -18
- package/src/src/build/vendor-cache.ts +0 -6
- package/src/src/cache/tokenizing-gateway.ts +1 -9
- package/src/src/chat/index.ts +169 -34
- package/src/src/config/define-config.ts +30 -29
- package/src/src/config/loader.ts +10 -9
- package/src/src/config/schemas/config.schema.ts +12 -0
- package/src/src/data/data-fetcher.ts +15 -21
- package/src/src/data/server-data-fetcher.ts +1 -8
- package/src/src/data/static-data-fetcher.ts +1 -6
- package/src/src/discovery/discovery-engine.ts +27 -0
- package/src/src/discovery/discovery-utils.ts +0 -7
- package/src/src/discovery/file-discovery.ts +3 -9
- package/src/src/discovery/handlers/index.ts +1 -0
- package/src/src/discovery/handlers/skill-handler.ts +123 -0
- package/src/src/discovery/handlers/task-handler.ts +1 -5
- package/src/src/discovery/transpiler.ts +7 -2
- package/src/src/discovery/types.ts +3 -0
- package/src/src/embedding/chunk.ts +60 -0
- package/src/src/embedding/embedding.ts +62 -0
- package/src/src/embedding/index.ts +49 -0
- package/src/src/embedding/react/use-uploads.ts +101 -0
- package/src/src/embedding/resolve.ts +126 -0
- package/src/src/embedding/types.ts +103 -0
- package/src/src/embedding/upload-handler.ts +180 -0
- package/src/src/embedding/upload-loader.ts +76 -0
- package/src/src/embedding/upload-store.ts +299 -0
- package/src/src/embedding/vector-store.ts +282 -0
- package/src/src/errors/error-registry.ts +2 -2
- package/src/src/errors/http-error.ts +7 -3
- package/src/src/errors/middleware/cli-error-boundary.ts +28 -2
- package/src/src/errors/middleware/wrap-unknown.ts +0 -10
- package/src/src/errors/veryfront-error.ts +0 -9
- package/src/src/html/styles-builder/css-hash-cache.ts +5 -2
- package/src/src/html/styles-builder/plugin-loader.ts +58 -21
- package/src/src/html/styles-builder/tailwind-compiler-cache.ts +11 -4
- package/src/src/html/utils.ts +0 -33
- package/src/src/modules/component-registry/registry.ts +0 -3
- package/src/src/modules/import-map/default-import-map.ts +10 -0
- package/src/src/modules/react-loader/component-loader.ts +1 -0
- package/src/src/modules/react-loader/ssr-module-loader/loader.ts +12 -1
- package/src/src/modules/react-loader/ssr-module-loader/types.ts +2 -0
- package/src/src/modules/react-loader/types.ts +2 -0
- package/src/src/modules/server/module-server.ts +4 -1
- package/src/src/modules/server/websocket-handler.ts +1 -1
- package/src/src/oauth/handlers/callback-handler.ts +17 -5
- package/src/src/oauth/providers/base.ts +3 -3
- package/src/src/oauth/providers/common.ts +0 -23
- package/src/src/observability/auto-instrument/react-instrumentation.ts +2 -2
- package/src/src/observability/instruments/instruments-factory.ts +6 -6
- package/src/src/observability/metrics/config.ts +5 -5
- package/src/src/observability/metrics/manager.ts +1 -1
- package/src/src/observability/tracing/span-operations.ts +14 -9
- package/src/src/platform/compat/console/node.ts +4 -14
- package/src/src/platform/compat/fs.ts +14 -3
- package/src/src/platform/compat/opaque-deps.ts +32 -2
- package/src/src/platform/compat/path/basic-operations.ts +19 -10
- package/src/src/platform/compat/path/resolution.ts +69 -18
- package/src/src/platform/compat/path/url-conversion.ts +10 -6
- package/src/src/platform/compat/process.ts +133 -76
- package/src/src/provider/index.ts +1 -0
- package/src/src/provider/local/ai-sdk-adapter.ts +40 -37
- package/src/src/provider/local/env.ts +4 -1
- package/src/src/provider/local/local-embedding-adapter.ts +37 -0
- package/src/src/provider/local/local-embedding-engine.ts +88 -0
- package/src/src/provider/local/local-engine.ts +1 -1
- package/src/src/provider/local/model-catalog.ts +67 -1
- package/src/src/provider/model-registry.ts +47 -0
- package/src/src/proxy/retry.ts +0 -9
- package/src/src/proxy/tracing.ts +1 -9
- package/src/src/react/components/ai/agent-card.tsx +13 -13
- package/src/src/react/components/ai/chat/components/animations.tsx +31 -1
- package/src/src/react/components/ai/chat/components/attachment-pill.tsx +110 -0
- package/src/src/react/components/ai/chat/components/branch-picker.tsx +70 -0
- package/src/src/react/components/ai/chat/components/code-block.tsx +82 -0
- package/src/src/react/components/ai/chat/components/drop-zone.tsx +49 -0
- package/src/src/react/components/ai/chat/components/empty-state.tsx +20 -8
- package/src/src/react/components/ai/chat/components/inference-badge.tsx +1 -1
- package/src/src/react/components/ai/chat/components/inline-citation.tsx +150 -0
- package/src/src/react/components/ai/chat/components/message-actions.tsx +73 -51
- package/src/src/react/components/ai/chat/components/message-edit-form.tsx +95 -0
- package/src/src/react/components/ai/chat/components/message-feedback.tsx +72 -0
- package/src/src/react/components/ai/chat/components/quick-actions.tsx +38 -0
- package/src/src/react/components/ai/chat/components/reasoning.tsx +40 -35
- package/src/src/react/components/ai/chat/components/sidebar.tsx +204 -0
- package/src/src/react/components/ai/chat/components/skill-badge.tsx +51 -0
- package/src/src/react/components/ai/chat/components/sources.tsx +99 -0
- package/src/src/react/components/ai/chat/components/step-indicator.tsx +33 -0
- package/src/src/react/components/ai/chat/components/tab-switcher.tsx +69 -0
- package/src/src/react/components/ai/chat/components/tool-ui.tsx +31 -29
- package/src/src/react/components/ai/chat/components/upgrade-cta.tsx +3 -4
- package/src/src/react/components/ai/chat/components/uploads-panel.tsx +129 -0
- package/src/src/react/components/ai/chat/composition/api.tsx +12 -62
- package/src/src/react/components/ai/chat/composition/chat-composer.tsx +205 -0
- package/src/src/react/components/ai/chat/composition/chat-empty.tsx +77 -0
- package/src/src/react/components/ai/chat/composition/chat-if.tsx +25 -0
- package/src/src/react/components/ai/chat/composition/chat-message-list.tsx +356 -0
- package/src/src/react/components/ai/chat/composition/chat-root.tsx +181 -0
- package/src/src/react/components/ai/chat/composition/error-banner.tsx +38 -0
- package/src/src/react/components/ai/chat/composition/message.tsx +337 -0
- package/src/src/react/components/ai/chat/composition/model-avatar.tsx +103 -0
- package/src/src/react/components/ai/chat/contexts/chat-context.tsx +78 -0
- package/src/src/react/components/ai/chat/contexts/composer-context.tsx +59 -0
- package/src/src/react/components/ai/chat/contexts/index.ts +36 -0
- package/src/src/react/components/ai/chat/contexts/message-context.tsx +49 -0
- package/src/src/react/components/ai/chat/contexts/thread-list-context.tsx +40 -0
- package/src/src/react/components/ai/chat/hooks/use-threads.ts +208 -0
- package/src/src/react/components/ai/chat/index.tsx +389 -230
- package/src/src/react/components/ai/chat/utils/export.ts +77 -0
- package/src/src/react/components/ai/chat/utils/message-parts.ts +63 -1
- package/src/src/react/components/ai/chat-with-sidebar.tsx +371 -0
- package/src/src/react/components/ai/chat.tsx +122 -7
- package/src/src/react/components/ai/error-boundary.tsx +6 -6
- package/src/src/react/components/ai/icons/index.ts +100 -0
- package/src/src/react/components/ai/markdown.tsx +12 -15
- package/src/src/react/components/ai/model-selector.tsx +223 -15
- package/src/src/react/components/ai/theme.ts +205 -39
- package/src/src/react/primitives/input-box.tsx +27 -4
- package/src/src/rendering/cache/index.ts +12 -5
- package/src/src/rendering/component-handling.ts +9 -9
- package/src/src/rendering/orchestrator/pipeline.ts +12 -2
- package/src/src/rendering/page-renderer.ts +1 -0
- package/src/src/rendering/renderer.ts +1 -1
- package/src/src/rendering/shared/context-aware-cache.ts +0 -5
- package/src/src/repositories/schemas/index.ts +0 -2
- package/src/src/repositories/schemas/repository.schema.ts +0 -15
- package/src/src/repositories/types.ts +1 -6
- package/src/src/routing/api/module-loader/esbuild-plugin.ts +11 -25
- package/src/src/routing/api/module-loader/loader.ts +421 -17
- package/src/src/routing/api/openapi/path-utils.ts +0 -39
- package/src/src/routing/api/openapi/spec-generator.ts +1 -20
- package/src/src/routing/api/openapi/types.ts +20 -0
- package/src/src/sandbox/sandbox.ts +8 -8
- package/src/src/security/http/cors/constants.ts +0 -4
- package/src/src/security/http/response/index.ts +3 -9
- package/src/src/server/context/enriched-context.ts +1 -19
- package/src/src/server/dev-server/server.ts +11 -4
- package/src/src/server/dev-ui/manifest.js +20 -20
- package/src/src/server/handlers/dev/framework-candidates.generated.ts +5188 -0
- package/src/src/server/handlers/dev/styles-candidate-scanner.ts +3 -191
- package/src/src/server/handlers/request/module/module-server-handler.ts +1 -0
- package/src/src/server/runtime-handler/index.ts +17 -28
- package/src/src/server/shared/renderer/memory/pressure.ts +2 -15
- package/src/src/server/utils/domain-lookup.ts +0 -4
- package/src/src/skill/allowed-tools.ts +107 -0
- package/src/src/skill/executor.ts +215 -0
- package/src/src/skill/index.ts +60 -0
- package/src/src/skill/parser.ts +214 -0
- package/src/src/skill/path-safety.ts +203 -0
- package/src/src/skill/prompt-augmentation.ts +48 -0
- package/src/src/skill/registry.ts +51 -0
- package/src/src/skill/tools.ts +197 -0
- package/src/src/skill/types.ts +107 -0
- package/src/src/studio/bridge/bridge-bundle.generated.ts +1 -1
- package/src/src/studio/element-selector-injector.ts +0 -2
- package/src/src/task/runner.ts +10 -8
- package/src/src/tool/factory.ts +54 -54
- package/src/src/transforms/esm/http-cache-helpers.ts +0 -20
- package/src/src/transforms/esm/path-resolver.ts +1 -140
- package/src/src/transforms/esm/source-url-embed.ts +0 -53
- package/src/src/transforms/esm/transform-cache.ts +3 -7
- package/src/src/transforms/mdx/index.ts +0 -5
- package/src/src/transforms/pipeline/context.ts +0 -2
- package/src/src/transforms/pipeline/index.ts +0 -4
- package/src/src/transforms/pipeline/stages/ssr-http-cache.ts +0 -1
- package/src/src/transforms/plugins/rehype-node-positions.ts +1 -0
- package/src/src/types/entities/getEntityInfo.ts +1 -1
- package/src/src/types/index.ts +1 -20
- package/src/src/types/server.ts +1 -1
- package/src/src/utils/cache-file-ops.ts +5 -5
- package/src/src/utils/logger/logger.ts +2 -2
- package/src/src/utils/lru-wrapper.ts +2 -8
- package/src/src/workflow/claude-code/event-publisher.ts +13 -4
- package/src/src/workflow/executor/workflow-executor.ts +7 -2
- package/src/src/workflow/react/use-workflow-list.ts +3 -2
- package/esm/src/transforms/mdx/parser.d.ts +0 -4
- package/esm/src/transforms/mdx/parser.d.ts.map +0 -1
- package/esm/src/transforms/mdx/parser.js +0 -49
- package/src/src/transforms/mdx/parser.ts +0 -65
|
@@ -84,14 +84,19 @@ export class SpanOperations {
|
|
|
84
84
|
private mapSpanKind(kind?: SpanOptions["kind"]): SpanKind {
|
|
85
85
|
if (!kind) return this.api.SpanKind.INTERNAL;
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
internal:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
switch (kind) {
|
|
88
|
+
case "internal":
|
|
89
|
+
return this.api.SpanKind.INTERNAL;
|
|
90
|
+
case "server":
|
|
91
|
+
return this.api.SpanKind.SERVER;
|
|
92
|
+
case "client":
|
|
93
|
+
return this.api.SpanKind.CLIENT;
|
|
94
|
+
case "producer":
|
|
95
|
+
return this.api.SpanKind.PRODUCER;
|
|
96
|
+
case "consumer":
|
|
97
|
+
return this.api.SpanKind.CONSUMER;
|
|
98
|
+
default:
|
|
99
|
+
return this.api.SpanKind.INTERNAL;
|
|
100
|
+
}
|
|
96
101
|
}
|
|
97
102
|
}
|
|
@@ -17,16 +17,10 @@ type PicoColors = {
|
|
|
17
17
|
reset: (s: string) => string;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const mod = await import("picocolors");
|
|
26
|
-
pc = mod.default as PicoColors;
|
|
27
|
-
|
|
28
|
-
return pc;
|
|
29
|
-
}
|
|
20
|
+
// NOTE: pc is null because lazy initialization was removed as dead code.
|
|
21
|
+
// Colors on Node.js currently fall through to identity (no-op).
|
|
22
|
+
// The console/index.ts fallback colors and ANSI module handle the actual coloring.
|
|
23
|
+
const pc: PicoColors | null = null;
|
|
30
24
|
|
|
31
25
|
function lazyColor(fn: keyof PicoColors): (s: string) => string {
|
|
32
26
|
return (s: string) => pc?.[fn]?.(s) ?? s;
|
|
@@ -65,7 +59,3 @@ export const {
|
|
|
65
59
|
strikethrough,
|
|
66
60
|
reset,
|
|
67
61
|
} = colors;
|
|
68
|
-
|
|
69
|
-
export async function initColors(): Promise<void> {
|
|
70
|
-
await ensurePc();
|
|
71
|
-
}
|
|
@@ -310,12 +310,22 @@ export async function symlink(target: string, path: string): Promise<void> {
|
|
|
310
310
|
await fs.symlink(target, path);
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
+
type DenoGlobal = typeof dntShim.dntGlobalThis & {
|
|
314
|
+
Deno?: {
|
|
315
|
+
errors?: {
|
|
316
|
+
NotFound?: new (...args: unknown[]) => Error;
|
|
317
|
+
AlreadyExists?: new (...args: unknown[]) => Error;
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
|
|
313
322
|
export function isNotFoundError(error: unknown): boolean {
|
|
314
|
-
|
|
323
|
+
const NotFound = (dntShim.dntGlobalThis as DenoGlobal).Deno?.errors?.NotFound;
|
|
324
|
+
if (isDeno && NotFound && error instanceof NotFound) return true;
|
|
315
325
|
if ((error as NodeJS.ErrnoException)?.code === "ENOENT") return true;
|
|
316
326
|
if (
|
|
317
327
|
error instanceof Error && error.name === "VeryfrontError" &&
|
|
318
|
-
(error as
|
|
328
|
+
(error as { slug?: string }).slug === "file-not-found"
|
|
319
329
|
) {
|
|
320
330
|
return true;
|
|
321
331
|
}
|
|
@@ -323,6 +333,7 @@ export function isNotFoundError(error: unknown): boolean {
|
|
|
323
333
|
}
|
|
324
334
|
|
|
325
335
|
export function isAlreadyExistsError(error: unknown): boolean {
|
|
326
|
-
|
|
336
|
+
const AlreadyExists = (dntShim.dntGlobalThis as DenoGlobal).Deno?.errors?.AlreadyExists;
|
|
337
|
+
if (isDeno && AlreadyExists && error instanceof AlreadyExists) return true;
|
|
327
338
|
return (error as NodeJS.ErrnoException)?.code === "EEXIST";
|
|
328
339
|
}
|
|
@@ -22,12 +22,42 @@ function resolve(pkg: string, version: string): string {
|
|
|
22
22
|
return isDeno ? `npm:${pkg}@${version}` : pkg;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
// deno-lint-ignore no-explicit-any -- Opaque deps have unknown shapes; callers cast at call site
|
|
26
|
+
type OpaqueModule = any;
|
|
27
|
+
|
|
25
28
|
/** Lazily import `@huggingface/transformers` (+ onnxruntime, ~500MB). */
|
|
26
|
-
export function importTransformers(): Promise<
|
|
29
|
+
export function importTransformers(): Promise<OpaqueModule> {
|
|
27
30
|
return dynamicImport(resolve("@huggingface/transformers", "3.4.2"));
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
/** Lazily import `@anthropic-ai/claude-agent-sdk` (~69MB). */
|
|
31
|
-
export function importClaudeAgentSDK(): Promise<
|
|
34
|
+
export function importClaudeAgentSDK(): Promise<OpaqueModule> {
|
|
32
35
|
return dynamicImport(resolve("@anthropic-ai/claude-agent-sdk", "0.2.37"));
|
|
33
36
|
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Lazily import kreuzberg document extraction.
|
|
40
|
+
*
|
|
41
|
+
* Unlike the other opaque deps above, kreuzberg is a core framework
|
|
42
|
+
* dependency that must work in compiled binaries. The Deno path uses
|
|
43
|
+
* a regular `import()` (not `dynamicImport`) so `deno compile` can
|
|
44
|
+
* trace and embed `@kreuzberg/wasm`. The Node/Bun path uses `dynamicImport`
|
|
45
|
+
* to resolve `@kreuzberg/node` from the project's node_modules at runtime.
|
|
46
|
+
*/
|
|
47
|
+
export async function importKreuzberg(): Promise<{
|
|
48
|
+
extractBytes: (
|
|
49
|
+
data: Uint8Array,
|
|
50
|
+
mimeType: string,
|
|
51
|
+
) => Promise<{ content: string }>;
|
|
52
|
+
}> {
|
|
53
|
+
if (isDeno) {
|
|
54
|
+
// Regular import — visible to deno compile, resolved via deno.json import map
|
|
55
|
+
const mod = await import("@kreuzberg/wasm") as unknown as
|
|
56
|
+
& { initWasm?: () => Promise<void> }
|
|
57
|
+
& { extractBytes: (data: Uint8Array, mimeType: string) => Promise<{ content: string }> };
|
|
58
|
+
await mod.initWasm?.();
|
|
59
|
+
return mod;
|
|
60
|
+
}
|
|
61
|
+
// Opaque import — resolved from node_modules at runtime
|
|
62
|
+
return dynamicImport("@kreuzberg/node");
|
|
63
|
+
}
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { hasNodePath, isDeno, nodePath } from "./runtime.js";
|
|
2
2
|
|
|
3
|
-
function
|
|
4
|
-
return
|
|
3
|
+
function hasWindowsLikePath(path: string): boolean {
|
|
4
|
+
return path.includes("\\") || /^[A-Za-z]:/.test(path) || path.startsWith("\\\\");
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
function useNodePath(paths: string[]): boolean {
|
|
8
|
+
return !isDeno && hasNodePath && !paths.some(hasWindowsLikePath);
|
|
9
|
+
}
|
|
9
10
|
|
|
11
|
+
/** Normalize backslashes to forward slashes (for Deno on Windows). */
|
|
12
|
+
function normSep(p: string): string {
|
|
13
|
+
return p.includes("\\") ? p.replace(/\\/g, "/") : p;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function join(...paths: string[]): string {
|
|
10
17
|
const joined = paths
|
|
18
|
+
.map(normSep)
|
|
11
19
|
.filter((p) => p.length > 0)
|
|
12
20
|
.join("/")
|
|
13
21
|
.replace(/\/+/g, "/")
|
|
@@ -17,21 +25,22 @@ export function join(...paths: string[]): string {
|
|
|
17
25
|
}
|
|
18
26
|
|
|
19
27
|
export function dirname(path: string): string {
|
|
20
|
-
if (useNodePath()) return nodePath!.dirname(path);
|
|
28
|
+
if (useNodePath([path])) return nodePath!.dirname(path);
|
|
21
29
|
|
|
22
|
-
const
|
|
30
|
+
const p = normSep(path);
|
|
31
|
+
const lastSlash = p.lastIndexOf("/");
|
|
23
32
|
if (lastSlash === -1) return ".";
|
|
24
33
|
if (lastSlash === 0) return "/";
|
|
25
|
-
return
|
|
34
|
+
return p.slice(0, lastSlash);
|
|
26
35
|
}
|
|
27
36
|
|
|
28
37
|
export function basename(path: string, ext?: string): string {
|
|
29
|
-
if (useNodePath()) {
|
|
38
|
+
if (useNodePath([path])) {
|
|
30
39
|
// Only pass ext if defined - Bun is strict about this parameter
|
|
31
40
|
return ext === undefined ? nodePath!.basename(path) : nodePath!.basename(path, ext);
|
|
32
41
|
}
|
|
33
42
|
|
|
34
|
-
let normalizedPath = path;
|
|
43
|
+
let normalizedPath = normSep(path);
|
|
35
44
|
while (normalizedPath.length > 1 && normalizedPath.endsWith("/")) {
|
|
36
45
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
37
46
|
}
|
|
@@ -45,7 +54,7 @@ export function basename(path: string, ext?: string): string {
|
|
|
45
54
|
}
|
|
46
55
|
|
|
47
56
|
export function extname(path: string): string {
|
|
48
|
-
if (useNodePath()) return nodePath!.extname(path);
|
|
57
|
+
if (useNodePath([path])) return nodePath!.extname(path);
|
|
49
58
|
|
|
50
59
|
const base = basename(path);
|
|
51
60
|
const lastDot = base.lastIndexOf(".");
|
|
@@ -1,18 +1,45 @@
|
|
|
1
1
|
import * as dntShim from "../../../../_dnt.shims.js";
|
|
2
2
|
import { hasNodePath, isDeno, nodePath } from "./runtime.js";
|
|
3
3
|
|
|
4
|
-
function
|
|
5
|
-
return
|
|
4
|
+
function hasWindowsLikePath(path: string): boolean {
|
|
5
|
+
return path.includes("\\") || /^[A-Za-z]:/.test(path) || path.startsWith("\\\\");
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
function useNodePath(paths: string[]): boolean {
|
|
9
|
+
return !isDeno && hasNodePath && !paths.some(hasWindowsLikePath);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** Normalize backslashes to forward slashes (for Deno on Windows). */
|
|
13
|
+
function normSep(p: string): string {
|
|
14
|
+
return p.includes("\\") ? p.replace(/\\/g, "/") : p;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Match Windows drive letter prefix like "C:/" */
|
|
18
|
+
const DRIVE_LETTER = /^[A-Za-z]:\//;
|
|
19
|
+
|
|
8
20
|
export function resolve(...paths: string[]): string {
|
|
9
|
-
if (useNodePath()) return nodePath!.resolve(...paths);
|
|
21
|
+
if (useNodePath(paths)) return nodePath!.resolve(...paths);
|
|
22
|
+
|
|
23
|
+
let resolvedPath = normSep(dntShim.dntGlobalThis.Deno?.cwd?.() ?? "/");
|
|
10
24
|
|
|
11
|
-
|
|
25
|
+
for (const rawPath of paths) {
|
|
26
|
+
if (!rawPath) continue;
|
|
27
|
+
const path = normSep(rawPath);
|
|
28
|
+
if (path.startsWith("/") || DRIVE_LETTER.test(path)) {
|
|
29
|
+
resolvedPath = path;
|
|
30
|
+
} else {
|
|
31
|
+
resolvedPath = `${resolvedPath}/${path}`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
12
34
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
35
|
+
// Preserve drive letter prefix (e.g. "D:/") if present
|
|
36
|
+
let prefix = "/";
|
|
37
|
+
const driveMatch = resolvedPath.match(DRIVE_LETTER);
|
|
38
|
+
if (driveMatch) {
|
|
39
|
+
prefix = driveMatch[0]; // e.g. "D:/"
|
|
40
|
+
resolvedPath = resolvedPath.slice(prefix.length);
|
|
41
|
+
} else if (resolvedPath.startsWith("/")) {
|
|
42
|
+
resolvedPath = resolvedPath.slice(1);
|
|
16
43
|
}
|
|
17
44
|
|
|
18
45
|
const parts = resolvedPath.split("/").filter(Boolean);
|
|
@@ -26,22 +53,34 @@ export function resolve(...paths: string[]): string {
|
|
|
26
53
|
if (part !== ".") resolved.push(part);
|
|
27
54
|
}
|
|
28
55
|
|
|
29
|
-
return
|
|
56
|
+
return `${prefix}${resolved.join("/")}`;
|
|
30
57
|
}
|
|
31
58
|
|
|
32
59
|
export function isAbsolute(path: string): boolean {
|
|
33
|
-
if (useNodePath()
|
|
34
|
-
//
|
|
60
|
+
if (useNodePath([path]) && nodePath!.isAbsolute(path)) return true;
|
|
61
|
+
// Cross-platform fallback: Unix, Windows drive letters, and UNC paths
|
|
35
62
|
if (path.startsWith("/")) return true;
|
|
36
|
-
if (/^[A-Za-z]:[
|
|
63
|
+
if (/^[A-Za-z]:[/\\]/.test(path)) return true;
|
|
37
64
|
return /^\\\\[^\\]+\\[^\\]+/.test(path);
|
|
38
65
|
}
|
|
39
66
|
|
|
40
67
|
export function relative(from: string, to: string): string {
|
|
41
|
-
if (useNodePath(
|
|
68
|
+
if (useNodePath([from, to])) {
|
|
69
|
+
const relativePath = nodePath!.relative(from, to);
|
|
70
|
+
return relativePath || ".";
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const resolvedFrom = resolve(from);
|
|
74
|
+
const resolvedTo = resolve(to);
|
|
75
|
+
|
|
76
|
+
// Strip drive prefix for comparison (both will share the same drive after resolve)
|
|
77
|
+
const fromDrive = resolvedFrom.match(DRIVE_LETTER);
|
|
78
|
+
const fromBase = fromDrive ? resolvedFrom.slice(fromDrive[0].length) : resolvedFrom.slice(1);
|
|
79
|
+
const toDrive = resolvedTo.match(DRIVE_LETTER);
|
|
80
|
+
const toBase = toDrive ? resolvedTo.slice(toDrive[0].length) : resolvedTo.slice(1);
|
|
42
81
|
|
|
43
|
-
const fromParts =
|
|
44
|
-
const toParts =
|
|
82
|
+
const fromParts = fromBase.split("/").filter(Boolean);
|
|
83
|
+
const toParts = toBase.split("/").filter(Boolean);
|
|
45
84
|
|
|
46
85
|
let common = 0;
|
|
47
86
|
const minLen = Math.min(fromParts.length, toParts.length);
|
|
@@ -58,11 +97,23 @@ export function relative(from: string, to: string): string {
|
|
|
58
97
|
}
|
|
59
98
|
|
|
60
99
|
export function normalize(path: string): string {
|
|
61
|
-
if (useNodePath()) return nodePath!.normalize(path);
|
|
100
|
+
if (useNodePath([path])) return nodePath!.normalize(path);
|
|
62
101
|
if (path === "") return ".";
|
|
63
102
|
|
|
64
|
-
const
|
|
65
|
-
const
|
|
103
|
+
const p = normSep(path);
|
|
104
|
+
const abs = isAbsolute(p);
|
|
105
|
+
|
|
106
|
+
// Preserve drive letter prefix
|
|
107
|
+
let prefix = "";
|
|
108
|
+
const driveMatch = p.match(DRIVE_LETTER);
|
|
109
|
+
if (driveMatch) {
|
|
110
|
+
prefix = driveMatch[0];
|
|
111
|
+
} else if (abs) {
|
|
112
|
+
prefix = "/";
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const pathWithoutPrefix = driveMatch ? p.slice(prefix.length) : abs ? p.slice(1) : p;
|
|
116
|
+
const parts = pathWithoutPrefix.split("/").filter((s) => s && s !== ".");
|
|
66
117
|
|
|
67
118
|
const normalized: string[] = [];
|
|
68
119
|
|
|
@@ -83,7 +134,7 @@ export function normalize(path: string): string {
|
|
|
83
134
|
|
|
84
135
|
const result = normalized.join("/");
|
|
85
136
|
|
|
86
|
-
if (abs) return result ?
|
|
137
|
+
if (abs) return result ? `${prefix}${result}` : prefix || "/";
|
|
87
138
|
|
|
88
139
|
return result || ".";
|
|
89
140
|
}
|
|
@@ -2,6 +2,11 @@ import * as dntShim from "../../../../_dnt.shims.js";
|
|
|
2
2
|
import { hasNodePath, isDeno } from "./runtime.js";
|
|
3
3
|
import { isAbsolute, resolve } from "./resolution.js";
|
|
4
4
|
|
|
5
|
+
type GlobalWithRequire = typeof dntShim.dntGlobalThis & {
|
|
6
|
+
require?: (specifier: string) => { fileURLToPath?: (url: string | URL) => string };
|
|
7
|
+
Deno?: { cwd?: () => string; build?: { os?: string } };
|
|
8
|
+
};
|
|
9
|
+
|
|
5
10
|
let _fileURLToPath: ((url: string | URL) => string) | null = null;
|
|
6
11
|
|
|
7
12
|
function getFileURLToPath(): ((url: string | URL) => string) | null {
|
|
@@ -9,10 +14,8 @@ function getFileURLToPath(): ((url: string | URL) => string) | null {
|
|
|
9
14
|
if (!hasNodePath) return null;
|
|
10
15
|
|
|
11
16
|
try {
|
|
12
|
-
const nodeUrl = (dntShim.dntGlobalThis as
|
|
13
|
-
const fileURLToPath = nodeUrl?.fileURLToPath
|
|
14
|
-
| ((url: string | URL) => string)
|
|
15
|
-
| undefined;
|
|
17
|
+
const nodeUrl = (dntShim.dntGlobalThis as GlobalWithRequire).require?.("node:url");
|
|
18
|
+
const fileURLToPath = nodeUrl?.fileURLToPath;
|
|
16
19
|
|
|
17
20
|
if (!fileURLToPath) return null;
|
|
18
21
|
|
|
@@ -30,8 +33,9 @@ export function fromFileUrl(url: string | URL): string {
|
|
|
30
33
|
const urlString = typeof url === "string" ? url : url.toString();
|
|
31
34
|
|
|
32
35
|
if (isDeno) {
|
|
33
|
-
const
|
|
34
|
-
const
|
|
36
|
+
const g = dntShim.dntGlobalThis as GlobalWithRequire;
|
|
37
|
+
const hasCwd = Boolean(g.Deno?.cwd);
|
|
38
|
+
const isWindows = g.Deno?.build?.os === "windows";
|
|
35
39
|
|
|
36
40
|
if (hasCwd && isWindows) {
|
|
37
41
|
return decodeURIComponent(urlString.slice(8).replace(/\//g, "\\"));
|
|
@@ -162,16 +162,6 @@ export function getEnvBoolean(
|
|
|
162
162
|
return fallback;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
/**
|
|
166
|
-
* Get an environment variable or throw if not set
|
|
167
|
-
* @throws Error if the environment variable is not set
|
|
168
|
-
*/
|
|
169
|
-
export function requireEnv(key: string): string {
|
|
170
|
-
const value = getEnv(key);
|
|
171
|
-
if (value === undefined) throw new Error(`Required environment variable "${key}" is not set`);
|
|
172
|
-
return value;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
165
|
export function setEnv(key: string, value: string): void {
|
|
176
166
|
if (IS_DENO) {
|
|
177
167
|
dntShim.Deno.env.set(key, value);
|
|
@@ -223,12 +213,6 @@ export function pid(): number {
|
|
|
223
213
|
return 0;
|
|
224
214
|
}
|
|
225
215
|
|
|
226
|
-
export function ppid(): number {
|
|
227
|
-
if (IS_DENO && "ppid" in dntShim.Deno) return dntShim.Deno.ppid || 0;
|
|
228
|
-
if (hasNodeProcess) return nodeProcess!.ppid || 0;
|
|
229
|
-
return 0;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
216
|
export function memoryUsage(): {
|
|
233
217
|
rss: number;
|
|
234
218
|
heapTotal: number;
|
|
@@ -289,44 +273,6 @@ export function getTerminalSize(): { columns: number; rows: number } {
|
|
|
289
273
|
return defaultSize;
|
|
290
274
|
}
|
|
291
275
|
|
|
292
|
-
/**
|
|
293
|
-
* Get network interfaces
|
|
294
|
-
*/
|
|
295
|
-
export async function getNetworkInterfaces(): Promise<
|
|
296
|
-
Array<{ name: string; address: string; family: "IPv4" | "IPv6" }>
|
|
297
|
-
> {
|
|
298
|
-
if (IS_DENO) {
|
|
299
|
-
return dntShim.Deno.networkInterfaces().map((iface) => ({
|
|
300
|
-
name: iface.name,
|
|
301
|
-
address: iface.address,
|
|
302
|
-
family: iface.family as "IPv4" | "IPv6",
|
|
303
|
-
}));
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
// Bun and Node.js both support node:os
|
|
307
|
-
if (!hasNodeProcess && !IS_BUN) {
|
|
308
|
-
throw new Error("networkInterfaces() is not supported in this runtime");
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
// Use dynamicImport to avoid static analysis by bundlers
|
|
312
|
-
const os = await dynamicImport<typeof import("node:os")>("node:os");
|
|
313
|
-
const interfaces = os.networkInterfaces();
|
|
314
|
-
const result: Array<{ name: string; address: string; family: "IPv4" | "IPv6" }> = [];
|
|
315
|
-
|
|
316
|
-
for (const [name, addrs] of Object.entries(interfaces)) {
|
|
317
|
-
if (!addrs) continue;
|
|
318
|
-
for (const addr of addrs) {
|
|
319
|
-
result.push({
|
|
320
|
-
name,
|
|
321
|
-
address: addr.address,
|
|
322
|
-
family: addr.family as "IPv4" | "IPv6",
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
return result;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
276
|
/**
|
|
331
277
|
* Get runtime version string
|
|
332
278
|
*/
|
|
@@ -535,10 +481,14 @@ export function readStdinByteSync(): number | null {
|
|
|
535
481
|
|
|
536
482
|
if (IS_BUN) {
|
|
537
483
|
// Bun: read one byte from the file descriptor directly
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
484
|
+
const BunGlobal =
|
|
485
|
+
(dntShim.dntGlobalThis as { Bun?: { stdin?: { read?: (n: number) => Uint8Array | null } } })
|
|
486
|
+
.Bun;
|
|
487
|
+
const chunk = BunGlobal?.stdin?.read?.(1);
|
|
488
|
+
if (chunk && chunk.length > 0) {
|
|
489
|
+
const first = chunk.at(0);
|
|
490
|
+
return first ?? null;
|
|
491
|
+
}
|
|
542
492
|
return null;
|
|
543
493
|
}
|
|
544
494
|
|
|
@@ -566,6 +516,61 @@ export interface CommandOptions {
|
|
|
566
516
|
inherit?: boolean;
|
|
567
517
|
/** Use shell to run the command (needed for .cmd files on Windows) */
|
|
568
518
|
shell?: boolean;
|
|
519
|
+
/** Kill the command if it exceeds this duration (milliseconds) */
|
|
520
|
+
timeoutMs?: number;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
const COMMAND_TIMEOUT_EXIT_CODE = 124;
|
|
524
|
+
const FORCE_KILL_GRACE_MS = 250;
|
|
525
|
+
|
|
526
|
+
function createTimeoutResult(
|
|
527
|
+
timeoutMs: number,
|
|
528
|
+
stdout?: string,
|
|
529
|
+
stderr?: string,
|
|
530
|
+
): CommandResult {
|
|
531
|
+
return {
|
|
532
|
+
success: false,
|
|
533
|
+
code: COMMAND_TIMEOUT_EXIT_CODE,
|
|
534
|
+
stdout,
|
|
535
|
+
stderr: `${stderr ?? ""}\nCommand timed out after ${timeoutMs}ms`.trim(),
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
function createProcessTimeout(
|
|
540
|
+
timeoutMs: number | undefined,
|
|
541
|
+
terminate: () => void,
|
|
542
|
+
forceTerminate: () => void,
|
|
543
|
+
): { hasTimedOut: () => boolean; clear: () => void } {
|
|
544
|
+
let timedOut = false;
|
|
545
|
+
let timeoutId: ReturnType<typeof dntShim.setTimeout> | undefined;
|
|
546
|
+
let forceKillId: ReturnType<typeof dntShim.setTimeout> | undefined;
|
|
547
|
+
|
|
548
|
+
if (timeoutMs && timeoutMs > 0) {
|
|
549
|
+
timeoutId = dntShim.setTimeout(() => {
|
|
550
|
+
timedOut = true;
|
|
551
|
+
try {
|
|
552
|
+
terminate();
|
|
553
|
+
} catch {
|
|
554
|
+
// Best-effort terminate.
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
forceKillId = dntShim.setTimeout(() => {
|
|
558
|
+
try {
|
|
559
|
+
forceTerminate();
|
|
560
|
+
} catch {
|
|
561
|
+
// Best-effort force terminate.
|
|
562
|
+
}
|
|
563
|
+
}, FORCE_KILL_GRACE_MS);
|
|
564
|
+
}, timeoutMs);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
return {
|
|
568
|
+
hasTimedOut: () => timedOut,
|
|
569
|
+
clear: () => {
|
|
570
|
+
if (timeoutId) clearTimeout(timeoutId);
|
|
571
|
+
if (forceKillId) clearTimeout(forceKillId);
|
|
572
|
+
},
|
|
573
|
+
};
|
|
569
574
|
}
|
|
570
575
|
|
|
571
576
|
async function readStreamToString(stream: ReadableStream<Uint8Array>): Promise<string> {
|
|
@@ -604,8 +609,16 @@ export async function runCommand(
|
|
|
604
609
|
cmd: string,
|
|
605
610
|
options: CommandOptions = {},
|
|
606
611
|
): Promise<CommandResult> {
|
|
607
|
-
const {
|
|
608
|
-
|
|
612
|
+
const {
|
|
613
|
+
args = [],
|
|
614
|
+
cwd: cmdCwd,
|
|
615
|
+
env: cmdEnv,
|
|
616
|
+
capture = false,
|
|
617
|
+
inherit = false,
|
|
618
|
+
shell = false,
|
|
619
|
+
timeoutMs,
|
|
620
|
+
} = options;
|
|
621
|
+
const effectiveTimeoutMs = timeoutMs && timeoutMs > 0 ? Math.floor(timeoutMs) : undefined;
|
|
609
622
|
|
|
610
623
|
// Determine stdio mode: inherit > capture > null
|
|
611
624
|
const stdioMode = inherit ? "inherit" : capture ? "piped" : "null";
|
|
@@ -620,15 +633,31 @@ export async function runCommand(
|
|
|
620
633
|
stderr: stdioMode,
|
|
621
634
|
});
|
|
622
635
|
|
|
623
|
-
const
|
|
624
|
-
const
|
|
636
|
+
const child = command.spawn();
|
|
637
|
+
const timeout = createProcessTimeout(
|
|
638
|
+
effectiveTimeoutMs,
|
|
639
|
+
() => child.kill("SIGTERM"),
|
|
640
|
+
() => child.kill("SIGKILL"),
|
|
641
|
+
);
|
|
625
642
|
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
643
|
+
try {
|
|
644
|
+
const [status, stdout, stderr] = await Promise.all([
|
|
645
|
+
child.status,
|
|
646
|
+
capture && child.stdout ? readStreamToString(child.stdout) : Promise.resolve(undefined),
|
|
647
|
+
capture && child.stderr ? readStreamToString(child.stderr) : Promise.resolve(undefined),
|
|
648
|
+
]);
|
|
649
|
+
|
|
650
|
+
if (timeout.hasTimedOut()) return createTimeoutResult(effectiveTimeoutMs!, stdout, stderr);
|
|
651
|
+
|
|
652
|
+
return {
|
|
653
|
+
success: status.success,
|
|
654
|
+
code: status.code,
|
|
655
|
+
stdout,
|
|
656
|
+
stderr,
|
|
657
|
+
};
|
|
658
|
+
} finally {
|
|
659
|
+
timeout.clear();
|
|
660
|
+
}
|
|
632
661
|
}
|
|
633
662
|
|
|
634
663
|
if (IS_BUN) {
|
|
@@ -644,6 +673,7 @@ export async function runCommand(
|
|
|
644
673
|
exited: Promise<number>;
|
|
645
674
|
stdout: ReadableStream<Uint8Array> | null;
|
|
646
675
|
stderr: ReadableStream<Uint8Array> | null;
|
|
676
|
+
kill?: (signal?: string | number) => void;
|
|
647
677
|
};
|
|
648
678
|
};
|
|
649
679
|
};
|
|
@@ -667,17 +697,25 @@ export async function runCommand(
|
|
|
667
697
|
stderr: bunStdio,
|
|
668
698
|
});
|
|
669
699
|
|
|
670
|
-
const
|
|
700
|
+
const timeout = createProcessTimeout(
|
|
701
|
+
effectiveTimeoutMs,
|
|
702
|
+
() => proc.kill?.("SIGTERM"),
|
|
703
|
+
() => proc.kill?.("SIGKILL"),
|
|
704
|
+
);
|
|
671
705
|
|
|
672
|
-
|
|
673
|
-
|
|
706
|
+
try {
|
|
707
|
+
const [code, stdout, stderr] = await Promise.all([
|
|
708
|
+
proc.exited,
|
|
709
|
+
capture && proc.stdout ? readStreamToString(proc.stdout) : Promise.resolve(undefined),
|
|
710
|
+
capture && proc.stderr ? readStreamToString(proc.stderr) : Promise.resolve(undefined),
|
|
711
|
+
]);
|
|
674
712
|
|
|
675
|
-
|
|
676
|
-
stdout = proc.stdout ? await readStreamToString(proc.stdout) : undefined;
|
|
677
|
-
stderr = proc.stderr ? await readStreamToString(proc.stderr) : undefined;
|
|
678
|
-
}
|
|
713
|
+
if (timeout.hasTimedOut()) return createTimeoutResult(effectiveTimeoutMs!, stdout, stderr);
|
|
679
714
|
|
|
680
|
-
|
|
715
|
+
return { success: code === 0, code, stdout, stderr };
|
|
716
|
+
} finally {
|
|
717
|
+
timeout.clear();
|
|
718
|
+
}
|
|
681
719
|
}
|
|
682
720
|
|
|
683
721
|
if (!hasNodeProcess) return { success: false, code: 1 };
|
|
@@ -705,6 +743,11 @@ export async function runCommand(
|
|
|
705
743
|
let stdout = "";
|
|
706
744
|
let stderr = "";
|
|
707
745
|
const decoder = new TextDecoder();
|
|
746
|
+
const timeout = createProcessTimeout(
|
|
747
|
+
effectiveTimeoutMs,
|
|
748
|
+
() => child.kill("SIGTERM"),
|
|
749
|
+
() => child.kill("SIGKILL"),
|
|
750
|
+
);
|
|
708
751
|
|
|
709
752
|
if (capture) {
|
|
710
753
|
child.stdout?.on("data", (data: Uint8Array) => {
|
|
@@ -716,6 +759,19 @@ export async function runCommand(
|
|
|
716
759
|
}
|
|
717
760
|
|
|
718
761
|
child.on("close", (code) => {
|
|
762
|
+
timeout.clear();
|
|
763
|
+
|
|
764
|
+
if (timeout.hasTimedOut()) {
|
|
765
|
+
resolve(
|
|
766
|
+
createTimeoutResult(
|
|
767
|
+
effectiveTimeoutMs!,
|
|
768
|
+
capture ? stdout : undefined,
|
|
769
|
+
capture ? stderr : undefined,
|
|
770
|
+
),
|
|
771
|
+
);
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
|
|
719
775
|
resolve({
|
|
720
776
|
success: code === 0,
|
|
721
777
|
code: code ?? 1,
|
|
@@ -725,6 +781,7 @@ export async function runCommand(
|
|
|
725
781
|
});
|
|
726
782
|
|
|
727
783
|
child.on("error", () => {
|
|
784
|
+
timeout.clear();
|
|
728
785
|
resolve({ success: false, code: 1 });
|
|
729
786
|
});
|
|
730
787
|
});
|