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
|
@@ -19,6 +19,24 @@ export { accumulateUsage, getMaxSteps, normalizeInput } from "./input-utils.js";
|
|
|
19
19
|
export { createStreamState, processStream } from "./ai-stream-handler.js";
|
|
20
20
|
export type { AIStreamCallbacks, AIStreamState, StreamingToolCall } from "./ai-stream-handler.js";
|
|
21
21
|
export { DEFAULT_MAX_STEPS, DEFAULT_MAX_TOKENS, DEFAULT_TEMPERATURE, MAX_STREAM_BUFFER_SIZE, } from "./constants.js";
|
|
22
|
+
/**
|
|
23
|
+
* Extract and validate the skill policy from a load-skill tool result.
|
|
24
|
+
* Returns `[]` (no tools allowed) for invalid/missing policies instead of
|
|
25
|
+
* `undefined` (no restrictions), preventing accidental policy bypass.
|
|
26
|
+
*/
|
|
27
|
+
export declare function extractSkillPolicy(result: unknown): string[] | undefined;
|
|
28
|
+
/** Result of skill policy enforcement for a single tool call */
|
|
29
|
+
type SkillPolicyResult = {
|
|
30
|
+
allowed: true;
|
|
31
|
+
} | {
|
|
32
|
+
allowed: false;
|
|
33
|
+
error: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Enforce skill policy on a single tool call.
|
|
37
|
+
* Shared between generate() and stream() paths.
|
|
38
|
+
*/
|
|
39
|
+
export declare function enforceSkillPolicy(toolName: string, activeSkillPolicy: string[] | undefined, mustLoadSkillFirst: boolean): SkillPolicyResult;
|
|
22
40
|
export declare class AgentRuntime {
|
|
23
41
|
private id;
|
|
24
42
|
private config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,aAAa,EAGlB,KAAK,OAAO,EAEZ,KAAK,QAAQ,EACd,MAAM,aAAa,CAAC;AAKrB,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAc/D,O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CAAC,CAAC;IA+EtC;;OAEG;YACW,gBAAgB;IAwN9B;;;;OAIG;YACW,yBAAyB;IAwNvC;;OAEG;YACW,eAAe;IAqC7B;;OAEG;YACW,mBAAmB;IAOjC;;OAEG;IACH,OAAO,CAAC,eAAe;IAKvB;;OAEG;IACH,SAAS,IAAI,MAAM,CAAC,OAAO,CAAC;IAI5B;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC;QAC9B,aAAa,EAAE,MAAM,CAAC;QACtB,eAAe,EAAE,MAAM,CAAC;QACxB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IAIF;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;CAGnC"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @module ai/agent/runtime
|
|
12
12
|
*/
|
|
13
13
|
import { getTextFromParts, } from "../types.js";
|
|
14
|
-
import { ensureModelReady, resolveModel } from "../../provider/index.js";
|
|
14
|
+
import { ensureModelReady, findAvailableCloudModel, resolveModel } from "../../provider/index.js";
|
|
15
15
|
import { executeTool } from "../../tool/index.js";
|
|
16
16
|
import { generateId } from "../../utils/id.js";
|
|
17
17
|
import { detectPlatform, getPlatformCapabilities } from "../../platform/core-platform.js";
|
|
@@ -33,23 +33,87 @@ import { DEFAULT_MAX_TOKENS, DEFAULT_TEMPERATURE } from "./constants.js";
|
|
|
33
33
|
import { generateMessageId, sendSSE } from "./sse-utils.js";
|
|
34
34
|
import { getAvailableTools, isDynamicTool, parseToolArgs } from "./tool-helpers.js";
|
|
35
35
|
import { accumulateUsage, getMaxSteps, normalizeInput } from "./input-utils.js";
|
|
36
|
+
import { filterToolsForSkill, isToolAllowedBySkill, validateAllowedToolPatterns, } from "../../skill/allowed-tools.js";
|
|
36
37
|
const logger = serverLogger.component("agent");
|
|
38
|
+
const LOAD_SKILL_TOOL_ID = "load-skill";
|
|
39
|
+
function getSkillActivationRequiredError(toolName) {
|
|
40
|
+
return `Tool "${toolName}" cannot run before load-skill succeeds in the same step. ` +
|
|
41
|
+
`Call "${LOAD_SKILL_TOOL_ID}" first to establish the active skill context.`;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Extract and validate the skill policy from a load-skill tool result.
|
|
45
|
+
* Returns `[]` (no tools allowed) for invalid/missing policies instead of
|
|
46
|
+
* `undefined` (no restrictions), preventing accidental policy bypass.
|
|
47
|
+
*/
|
|
48
|
+
export function extractSkillPolicy(result) {
|
|
49
|
+
if (!result || typeof result !== "object")
|
|
50
|
+
return undefined;
|
|
51
|
+
const skillResult = result;
|
|
52
|
+
// No allowedTools key means the skill has no restrictions
|
|
53
|
+
if (!("allowedTools" in skillResult) || skillResult.allowedTools === undefined) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
// Validate the shape: must be a string array
|
|
57
|
+
const raw = skillResult.allowedTools;
|
|
58
|
+
if (!Array.isArray(raw) || !raw.every((v) => typeof v === "string")) {
|
|
59
|
+
// Invalid shape — fail closed (empty policy = no tools allowed)
|
|
60
|
+
logger.warn("load-skill returned invalid allowedTools; falling back to empty policy (no tools)");
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
// Validate each pattern against the regex
|
|
64
|
+
try {
|
|
65
|
+
return validateAllowedToolPatterns(raw);
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
logger.warn("load-skill returned invalid tool patterns; falling back to empty policy (no tools)");
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
37
72
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
73
|
+
* Enforce skill policy on a single tool call.
|
|
74
|
+
* Shared between generate() and stream() paths.
|
|
40
75
|
*/
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (typeof model === "string")
|
|
46
|
-
return model.startsWith("local/");
|
|
47
|
-
if ("provider" in model && model.provider === "local")
|
|
48
|
-
return true;
|
|
49
|
-
if ("modelId" in model && typeof model.modelId === "string" && model.modelId.startsWith("local/")) {
|
|
50
|
-
return true;
|
|
76
|
+
export function enforceSkillPolicy(toolName, activeSkillPolicy, mustLoadSkillFirst) {
|
|
77
|
+
// Must load skill before other tools
|
|
78
|
+
if (mustLoadSkillFirst && toolName !== LOAD_SKILL_TOOL_ID) {
|
|
79
|
+
return { allowed: false, error: getSkillActivationRequiredError(toolName) };
|
|
51
80
|
}
|
|
52
|
-
|
|
81
|
+
// Check tool allowed by active skill policy (Layer 2: execution-time)
|
|
82
|
+
if (activeSkillPolicy && !isToolAllowedBySkill(toolName, activeSkillPolicy)) {
|
|
83
|
+
return {
|
|
84
|
+
allowed: false,
|
|
85
|
+
error: `Tool "${toolName}" is not allowed by the active skill policy. Allowed: ${activeSkillPolicy.join(", ")}`,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
return { allowed: true };
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Auto-upgrade a local model string to a cloud provider when API keys are available.
|
|
92
|
+
*
|
|
93
|
+
* Returns the upgraded "provider/model" string, or the original string unchanged
|
|
94
|
+
* if no cloud provider is available. This keeps resolveModel as a pure resolver
|
|
95
|
+
* while the runtime owns the upgrade policy.
|
|
96
|
+
*/
|
|
97
|
+
function maybeUpgradeLocalModel(modelString) {
|
|
98
|
+
if (!modelString.startsWith("local/"))
|
|
99
|
+
return modelString;
|
|
100
|
+
const cloud = findAvailableCloudModel();
|
|
101
|
+
if (cloud) {
|
|
102
|
+
logger.info(`⚡ Cloud AI API key found — using "${cloud}" instead of local model.`);
|
|
103
|
+
return cloud;
|
|
104
|
+
}
|
|
105
|
+
return modelString;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Check whether a resolved LanguageModel is a local inference model.
|
|
109
|
+
* Checks the model object properties rather than the requested string,
|
|
110
|
+
* because resolveModel may internally fall back from cloud to local.
|
|
111
|
+
*/
|
|
112
|
+
function isLocalModel(model) {
|
|
113
|
+
const m = model;
|
|
114
|
+
return !!m._isVfLocalModel ||
|
|
115
|
+
m.provider === "local" ||
|
|
116
|
+
(typeof m.modelId === "string" && m.modelId.startsWith("local/"));
|
|
53
117
|
}
|
|
54
118
|
export class AgentRuntime {
|
|
55
119
|
id;
|
|
@@ -66,11 +130,11 @@ export class AgentRuntime {
|
|
|
66
130
|
* Generate a response (non-streaming)
|
|
67
131
|
*/
|
|
68
132
|
async generate(input, context, modelOverride) {
|
|
69
|
-
const
|
|
133
|
+
const resolvedModelString = maybeUpgradeLocalModel(modelOverride || this.config.model);
|
|
70
134
|
return withSpan("agent.generate", async (span) => {
|
|
71
135
|
setSpanAttributes(span, {
|
|
72
136
|
"agent.id": this.id,
|
|
73
|
-
"agent.model":
|
|
137
|
+
"agent.model": resolvedModelString,
|
|
74
138
|
});
|
|
75
139
|
const inputMessages = normalizeInput(input);
|
|
76
140
|
for (const msg of inputMessages)
|
|
@@ -79,13 +143,13 @@ export class AgentRuntime {
|
|
|
79
143
|
const systemPrompt = await this.resolveSystemPrompt();
|
|
80
144
|
const agentContext = {
|
|
81
145
|
agentId: this.id,
|
|
82
|
-
model:
|
|
146
|
+
model: resolvedModelString,
|
|
83
147
|
input: inputMessages,
|
|
84
148
|
data: context,
|
|
85
149
|
platform: detectPlatform(),
|
|
86
150
|
};
|
|
87
151
|
const chain = new MiddlewareChain(this.config.middleware);
|
|
88
|
-
return chain.execute(agentContext, () => this.executeAgentLoop(systemPrompt, messages,
|
|
152
|
+
return chain.execute(agentContext, () => this.executeAgentLoop(systemPrompt, messages, resolvedModelString));
|
|
89
153
|
});
|
|
90
154
|
}
|
|
91
155
|
/**
|
|
@@ -93,8 +157,9 @@ export class AgentRuntime {
|
|
|
93
157
|
* Returns a ReadableStream in the veryfront stream event format.
|
|
94
158
|
*/
|
|
95
159
|
async stream(messages, context, callbacks, modelOverride) {
|
|
96
|
-
const
|
|
97
|
-
|
|
160
|
+
const requestedModel = modelOverride || this.config.model;
|
|
161
|
+
// Auto-upgrade local/* to a cloud provider when API keys are available.
|
|
162
|
+
const resolvedModelString = maybeUpgradeLocalModel(requestedModel);
|
|
98
163
|
for (const msg of messages)
|
|
99
164
|
await this.memory.add(msg);
|
|
100
165
|
const memoryMessages = await this.memory.getMessages();
|
|
@@ -105,7 +170,10 @@ export class AgentRuntime {
|
|
|
105
170
|
// Resolve model BEFORE creating the ReadableStream — if this throws
|
|
106
171
|
// (e.g., no_ai_available), the error propagates to the caller who can
|
|
107
172
|
// return a proper error response (503) instead of a 200 with an error event.
|
|
108
|
-
const languageModel = resolveModel(
|
|
173
|
+
const languageModel = resolveModel(resolvedModelString);
|
|
174
|
+
// Determine inference mode from the resolved model object (not the string),
|
|
175
|
+
// because resolveModel may internally fall back from cloud to local.
|
|
176
|
+
const isLocal = isLocalModel(languageModel);
|
|
109
177
|
// Eagerly verify the model runtime is available. For local models this
|
|
110
178
|
// checks that @huggingface/transformers can be imported. Must happen
|
|
111
179
|
// BEFORE creating the ReadableStream so no_ai_available errors propagate
|
|
@@ -118,16 +186,21 @@ export class AgentRuntime {
|
|
|
118
186
|
this.status = "streaming";
|
|
119
187
|
const messageId = generateMessageId();
|
|
120
188
|
sendSSE(controller, encoder, { type: "message-start", messageId });
|
|
189
|
+
// Report the effective model — when resolveModel falls back from
|
|
190
|
+
// cloud to local (e.g. missing API key), use the resolved object's
|
|
191
|
+
// modelId so the client avatar matches the actual provider.
|
|
192
|
+
const effectiveModel = isLocal && !resolvedModelString.startsWith("local/")
|
|
193
|
+
? `local/${languageModel.modelId ?? "unknown"}`
|
|
194
|
+
: resolvedModelString;
|
|
121
195
|
sendSSE(controller, encoder, {
|
|
122
196
|
type: "data",
|
|
123
197
|
data: {
|
|
124
|
-
inferenceMode:
|
|
125
|
-
|
|
126
|
-
: "cloud",
|
|
198
|
+
inferenceMode: isLocal ? "server-local" : "cloud",
|
|
199
|
+
model: effectiveModel,
|
|
127
200
|
},
|
|
128
201
|
});
|
|
129
202
|
sendSSE(controller, encoder, { type: "text-start", id: textPartId });
|
|
130
|
-
await this.executeAgentLoopStreaming(systemPrompt, memoryMessages, controller, encoder, callbacks, textPartId, toolContext,
|
|
203
|
+
await this.executeAgentLoopStreaming(systemPrompt, memoryMessages, controller, encoder, callbacks, textPartId, toolContext, resolvedModelString, languageModel);
|
|
131
204
|
sendSSE(controller, encoder, { type: "text-end", id: textPartId });
|
|
132
205
|
sendSSE(controller, encoder, { type: "message-finish" });
|
|
133
206
|
controller.close();
|
|
@@ -150,22 +223,30 @@ export class AgentRuntime {
|
|
|
150
223
|
return withSpan("agent.execution_loop", async (loopSpan) => {
|
|
151
224
|
const { maxAgentSteps } = getPlatformCapabilities();
|
|
152
225
|
const maxSteps = this.computeMaxSteps(maxAgentSteps);
|
|
153
|
-
const
|
|
154
|
-
const languageModel = resolveModel(
|
|
226
|
+
const effectiveModel = modelString || this.config.model;
|
|
227
|
+
const languageModel = resolveModel(effectiveModel);
|
|
155
228
|
const toolCalls = [];
|
|
156
229
|
const currentMessages = [...messages];
|
|
157
230
|
const totalUsage = { promptTokens: 0, completionTokens: 0, totalTokens: 0 };
|
|
158
231
|
// Local models can't reliably do function calling — skip tools gracefully.
|
|
159
|
-
const isLocal =
|
|
232
|
+
const isLocal = isLocalModel(languageModel);
|
|
160
233
|
if (isLocal && this.config.tools) {
|
|
161
|
-
logger.warn(`Agent "${this.id}" has tools configured but is using local model "${
|
|
234
|
+
logger.warn(`Agent "${this.id}" has tools configured but is using local model "${effectiveModel}". ` +
|
|
162
235
|
"Local models don't support tool calling — tools will be skipped. " +
|
|
163
236
|
"Set OPENAI_API_KEY, ANTHROPIC_API_KEY, or GOOGLE_API_KEY for full tool support.");
|
|
164
237
|
}
|
|
238
|
+
// Request-scoped skill policy (not class-level mutable state)
|
|
239
|
+
let activeSkillPolicy;
|
|
165
240
|
for (let step = 0; step < maxSteps; step++) {
|
|
166
241
|
this.status = "thinking";
|
|
167
242
|
addSpanEvent(loopSpan, "step_start", { step });
|
|
168
|
-
|
|
243
|
+
let tools = isLocal ? [] : getAvailableTools(this.config.tools, {
|
|
244
|
+
includeSkillTools: Boolean(this.config.skills),
|
|
245
|
+
});
|
|
246
|
+
// Layer 1: Filter tools based on active skill policy (planning-time)
|
|
247
|
+
if (activeSkillPolicy) {
|
|
248
|
+
tools = filterToolsForSkill(tools, activeSkillPolicy);
|
|
249
|
+
}
|
|
169
250
|
const response = await withSpan("agent.generate_text", async (span) => {
|
|
170
251
|
setSpanAttributes(span, {
|
|
171
252
|
"model.id": modelString || this.config.model,
|
|
@@ -222,6 +303,9 @@ export class AgentRuntime {
|
|
|
222
303
|
}
|
|
223
304
|
this.status = "tool_execution";
|
|
224
305
|
addSpanEvent(loopSpan, "tool_execution_start", { count: response.toolCalls.length });
|
|
306
|
+
let mustLoadSkillFirst = !activeSkillPolicy &&
|
|
307
|
+
Boolean(this.config.skills) &&
|
|
308
|
+
response.toolCalls.some((tc) => tc.toolName === LOAD_SKILL_TOOL_ID);
|
|
225
309
|
for (const tc of response.toolCalls) {
|
|
226
310
|
const toolCall = {
|
|
227
311
|
id: tc.toolCallId,
|
|
@@ -231,6 +315,26 @@ export class AgentRuntime {
|
|
|
231
315
|
};
|
|
232
316
|
await withSpan("agent.tool_execute", async (toolSpan) => {
|
|
233
317
|
setSpanAttributes(toolSpan, { "tool.name": tc.toolName, "tool.id": tc.toolCallId });
|
|
318
|
+
const policyCheck = enforceSkillPolicy(tc.toolName, activeSkillPolicy, mustLoadSkillFirst);
|
|
319
|
+
if (!policyCheck.allowed) {
|
|
320
|
+
toolCall.status = "error";
|
|
321
|
+
toolCall.error = policyCheck.error;
|
|
322
|
+
const errorMessage = {
|
|
323
|
+
id: `tool_error_${tc.toolCallId}`,
|
|
324
|
+
role: "tool",
|
|
325
|
+
parts: [{
|
|
326
|
+
type: "tool-result",
|
|
327
|
+
toolCallId: tc.toolCallId,
|
|
328
|
+
toolName: tc.toolName,
|
|
329
|
+
result: { error: policyCheck.error },
|
|
330
|
+
}],
|
|
331
|
+
timestamp: Date.now(),
|
|
332
|
+
};
|
|
333
|
+
currentMessages.push(errorMessage);
|
|
334
|
+
await this.memory.add(errorMessage);
|
|
335
|
+
toolCalls.push(toolCall);
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
234
338
|
try {
|
|
235
339
|
toolCall.status = "executing";
|
|
236
340
|
const startTime = Date.now();
|
|
@@ -238,6 +342,11 @@ export class AgentRuntime {
|
|
|
238
342
|
toolCall.status = "completed";
|
|
239
343
|
toolCall.result = result;
|
|
240
344
|
toolCall.executionTime = Date.now() - startTime;
|
|
345
|
+
// Track skill policy from load-skill results
|
|
346
|
+
if (tc.toolName === LOAD_SKILL_TOOL_ID) {
|
|
347
|
+
activeSkillPolicy = extractSkillPolicy(result);
|
|
348
|
+
mustLoadSkillFirst = false;
|
|
349
|
+
}
|
|
241
350
|
const toolResultMessage = {
|
|
242
351
|
id: `tool_${tc.toolCallId}`,
|
|
243
352
|
role: "tool",
|
|
@@ -299,21 +408,29 @@ export class AgentRuntime {
|
|
|
299
408
|
async executeAgentLoopStreaming(systemPrompt, messages, controller, encoder, callbacks, textPartId, toolContext, modelString, resolvedModel) {
|
|
300
409
|
const { maxAgentSteps } = getPlatformCapabilities();
|
|
301
410
|
const maxSteps = this.computeMaxSteps(maxAgentSteps);
|
|
302
|
-
const
|
|
303
|
-
const languageModel = resolvedModel ?? resolveModel(
|
|
411
|
+
const effectiveModel = modelString || this.config.model;
|
|
412
|
+
const languageModel = resolvedModel ?? resolveModel(effectiveModel);
|
|
304
413
|
const toolCalls = [];
|
|
305
414
|
const currentMessages = [...messages];
|
|
306
415
|
const totalUsage = { promptTokens: 0, completionTokens: 0, totalTokens: 0 };
|
|
307
416
|
// Local models can't reliably do function calling — skip tools gracefully.
|
|
308
|
-
const isLocalStreaming =
|
|
417
|
+
const isLocalStreaming = isLocalModel(languageModel);
|
|
309
418
|
if (isLocalStreaming && this.config.tools) {
|
|
310
|
-
logger.warn(`Agent "${this.id}" has tools configured but is using local model "${
|
|
419
|
+
logger.warn(`Agent "${this.id}" has tools configured but is using local model "${effectiveModel}". ` +
|
|
311
420
|
"Local models don't support tool calling — tools will be skipped. " +
|
|
312
421
|
"Set OPENAI_API_KEY, ANTHROPIC_API_KEY, or GOOGLE_API_KEY for full tool support.");
|
|
313
422
|
}
|
|
423
|
+
// Request-scoped skill policy (not class-level mutable state)
|
|
424
|
+
let activeSkillPolicy;
|
|
314
425
|
for (let step = 0; step < maxSteps; step++) {
|
|
315
426
|
sendSSE(controller, encoder, { type: "step-start" });
|
|
316
|
-
|
|
427
|
+
let tools = isLocalStreaming ? [] : getAvailableTools(this.config.tools, {
|
|
428
|
+
includeSkillTools: Boolean(this.config.skills),
|
|
429
|
+
});
|
|
430
|
+
// Layer 1: Filter tools based on active skill policy (planning-time)
|
|
431
|
+
if (activeSkillPolicy) {
|
|
432
|
+
tools = filterToolsForSkill(tools, activeSkillPolicy);
|
|
433
|
+
}
|
|
317
434
|
const result = streamText({
|
|
318
435
|
model: languageModel,
|
|
319
436
|
system: systemPrompt,
|
|
@@ -358,7 +475,11 @@ export class AgentRuntime {
|
|
|
358
475
|
break;
|
|
359
476
|
}
|
|
360
477
|
this.status = "tool_execution";
|
|
361
|
-
|
|
478
|
+
const streamedToolCalls = Array.from(state.toolCalls.values());
|
|
479
|
+
let mustLoadSkillFirst = !activeSkillPolicy &&
|
|
480
|
+
Boolean(this.config.skills) &&
|
|
481
|
+
streamedToolCalls.some((tc) => tc.name === LOAD_SKILL_TOOL_ID);
|
|
482
|
+
for (const tc of streamedToolCalls) {
|
|
362
483
|
const { args, error: argError } = parseToolArgs(tc.arguments);
|
|
363
484
|
const toolCall = { id: tc.id, name: tc.name, args, status: "pending" };
|
|
364
485
|
if (argError) {
|
|
@@ -376,6 +497,11 @@ export class AgentRuntime {
|
|
|
376
497
|
await this.recordToolError(toolCall, `Invalid tool arguments: ${argError}`, controller, encoder, currentMessages, toolCalls);
|
|
377
498
|
continue;
|
|
378
499
|
}
|
|
500
|
+
const policyCheck = enforceSkillPolicy(tc.name, activeSkillPolicy, mustLoadSkillFirst);
|
|
501
|
+
if (!policyCheck.allowed) {
|
|
502
|
+
await this.recordToolError(toolCall, policyCheck.error, controller, encoder, currentMessages, toolCalls);
|
|
503
|
+
continue;
|
|
504
|
+
}
|
|
379
505
|
try {
|
|
380
506
|
toolCall.status = "executing";
|
|
381
507
|
const startTime = Date.now();
|
|
@@ -388,6 +514,11 @@ export class AgentRuntime {
|
|
|
388
514
|
toolCall.result = result;
|
|
389
515
|
toolCall.executionTime = Date.now() - startTime;
|
|
390
516
|
toolCalls.push(toolCall);
|
|
517
|
+
// Track skill policy from load-skill results
|
|
518
|
+
if (tc.name === LOAD_SKILL_TOOL_ID) {
|
|
519
|
+
activeSkillPolicy = extractSkillPolicy(result);
|
|
520
|
+
mustLoadSkillFirst = false;
|
|
521
|
+
}
|
|
391
522
|
const dynamic = isDynamicTool(tc.name);
|
|
392
523
|
sendSSE(controller, encoder, {
|
|
393
524
|
type: "tool-output-available",
|
|
@@ -31,6 +31,11 @@ export type ToolConfigEntry = Tool<any, any> | boolean;
|
|
|
31
31
|
* Get available tools based on agent configuration.
|
|
32
32
|
* When tools === true, loads all tools from registry.
|
|
33
33
|
* Otherwise loads specific tools from config.
|
|
34
|
+
*
|
|
35
|
+
* @param toolsConfig - Agent tools configuration
|
|
36
|
+
* @param options.includeSkillTools - When true, include skill tools for `tools: true` agents
|
|
34
37
|
*/
|
|
35
|
-
export declare function getAvailableTools(toolsConfig: true | Record<string, ToolConfigEntry> | undefined
|
|
38
|
+
export declare function getAvailableTools(toolsConfig: true | Record<string, ToolConfigEntry> | undefined, options?: {
|
|
39
|
+
includeSkillTools?: boolean;
|
|
40
|
+
}): ToolDefinition[];
|
|
36
41
|
//# sourceMappingURL=tool-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-helpers.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/tool-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-helpers.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/tool-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAQhE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACxC,cAAc,CAuBhB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED;;;GAGG;AAEH,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC;AAmBvD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,SAAS,EAC/D,OAAO,CAAC,EAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAE,GACxC,cAAc,EAAE,CAiClB"}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { toolRegistry } from "../../tool/index.js";
|
|
9
9
|
import { toolToProviderDefinition } from "../../tool/registry.js";
|
|
10
|
+
import { SKILL_TOOL_IDS } from "../../skill/types.js";
|
|
10
11
|
import { serverLogger } from "../../utils/index.js";
|
|
11
12
|
const logger = serverLogger.component("agent");
|
|
12
13
|
/**
|
|
@@ -53,8 +54,11 @@ function addToolDefinition(tools, name, tool) {
|
|
|
53
54
|
* Get available tools based on agent configuration.
|
|
54
55
|
* When tools === true, loads all tools from registry.
|
|
55
56
|
* Otherwise loads specific tools from config.
|
|
57
|
+
*
|
|
58
|
+
* @param toolsConfig - Agent tools configuration
|
|
59
|
+
* @param options.includeSkillTools - When true, include skill tools for `tools: true` agents
|
|
56
60
|
*/
|
|
57
|
-
export function getAvailableTools(toolsConfig) {
|
|
61
|
+
export function getAvailableTools(toolsConfig, options) {
|
|
58
62
|
if (!toolsConfig)
|
|
59
63
|
return [];
|
|
60
64
|
if (toolsConfig === true) {
|
|
@@ -64,6 +68,11 @@ export function getAvailableTools(toolsConfig) {
|
|
|
64
68
|
const def = toolToProviderDefinition(tool);
|
|
65
69
|
logToolDefinition(name, def);
|
|
66
70
|
return def;
|
|
71
|
+
}).filter((def) => {
|
|
72
|
+
// Exclude skill tools unless explicitly included
|
|
73
|
+
if (SKILL_TOOL_IDS.has(def.name) && !options?.includeSkillTools)
|
|
74
|
+
return false;
|
|
75
|
+
return true;
|
|
67
76
|
});
|
|
68
77
|
}
|
|
69
78
|
const tools = [];
|
|
@@ -21,14 +21,14 @@ export declare const EdgeConfigSchema: z.ZodObject<{
|
|
|
21
21
|
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
enabled: boolean;
|
|
24
|
+
timeoutMs?: number | undefined;
|
|
24
25
|
streaming?: boolean | undefined;
|
|
25
26
|
maxSteps?: number | undefined;
|
|
26
|
-
timeoutMs?: number | undefined;
|
|
27
27
|
}, {
|
|
28
28
|
enabled: boolean;
|
|
29
|
+
timeoutMs?: number | undefined;
|
|
29
30
|
streaming?: boolean | undefined;
|
|
30
31
|
maxSteps?: number | undefined;
|
|
31
|
-
timeoutMs?: number | undefined;
|
|
32
32
|
}>;
|
|
33
33
|
export declare const ToolCallPartWithArgsSchema: z.ZodObject<{
|
|
34
34
|
type: z.ZodString;
|
|
@@ -768,7 +768,6 @@ export declare const AgentContextSchema: z.ZodObject<{
|
|
|
768
768
|
platform: z.ZodAny;
|
|
769
769
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
770
770
|
}, "strip", z.ZodTypeAny, {
|
|
771
|
-
agentId: string;
|
|
772
771
|
input: string | {
|
|
773
772
|
id: string;
|
|
774
773
|
role: "tool" | "user" | "assistant" | "system";
|
|
@@ -799,12 +798,12 @@ export declare const AgentContextSchema: z.ZodObject<{
|
|
|
799
798
|
timestamp?: number | undefined;
|
|
800
799
|
metadata?: Record<string, unknown> | undefined;
|
|
801
800
|
}[];
|
|
801
|
+
agentId: string;
|
|
802
802
|
model?: string | undefined;
|
|
803
803
|
data?: Record<string, unknown> | undefined;
|
|
804
804
|
platform?: any;
|
|
805
805
|
metadata?: Record<string, unknown> | undefined;
|
|
806
806
|
}, {
|
|
807
|
-
agentId: string;
|
|
808
807
|
input: string | {
|
|
809
808
|
id: string;
|
|
810
809
|
role: "tool" | "user" | "assistant" | "system";
|
|
@@ -835,6 +834,7 @@ export declare const AgentContextSchema: z.ZodObject<{
|
|
|
835
834
|
timestamp?: number | undefined;
|
|
836
835
|
metadata?: Record<string, unknown> | undefined;
|
|
837
836
|
}[];
|
|
837
|
+
agentId: string;
|
|
838
838
|
model?: string | undefined;
|
|
839
839
|
data?: Record<string, unknown> | undefined;
|
|
840
840
|
platform?: any;
|
package/esm/src/agent/types.d.ts
CHANGED
|
@@ -28,6 +28,16 @@ export interface AgentConfig {
|
|
|
28
28
|
};
|
|
29
29
|
/** Restrict runtime model overrides to these "provider/model" strings. */
|
|
30
30
|
allowedModels?: ModelString[];
|
|
31
|
+
/**
|
|
32
|
+
* Enable skills for this agent.
|
|
33
|
+
* - true: include all discovered skills from skills/ directory
|
|
34
|
+
* - string[]: include only specific skill IDs
|
|
35
|
+
*
|
|
36
|
+
* Discovery happens at startup via discoverAll().
|
|
37
|
+
* This controls which skills appear in the agent's prompt
|
|
38
|
+
* and registers the skill tools.
|
|
39
|
+
*/
|
|
40
|
+
skills?: true | string[];
|
|
31
41
|
}
|
|
32
42
|
import type { AgentContext, AgentResponse } from "./schemas/index.js";
|
|
33
43
|
export type AgentMiddleware = (context: AgentContext, next: () => Promise<AgentResponse>) => Promise<AgentResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/agent/types.ts"],"names":[],"mappings":"AAAA;;4BAE4B;AAC5B,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAG/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAG3D,YAAY,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,YAAY,EACZ,OAAO,EACP,WAAW,EACX,aAAa,EACb,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,GACf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EACV,OAAO,EACP,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAGjC,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1D,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC,CAAC;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAA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AG,OAAO;IAMxB;;OAEG;IACH,SAAS,IAAI,MAAM,EAAE;IAOrB;;OAEG;IACH,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IAUxB;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAU3B;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAKrC;;OAEG;IACH,QAAQ,IAAI,IAAI;IAMhB;;OAEG;IACH,QAAQ,IAAI;QACV,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,mBAAmB,EAAE,MAAM,CAAC;KAC7B;CAeF"}
|
|
@@ -90,7 +90,8 @@ export class ProjectScopedRegistryManager {
|
|
|
90
90
|
*/
|
|
91
91
|
has(id) {
|
|
92
92
|
const projectId = this.getCurrentProjectId();
|
|
93
|
-
return this.registriesByProject.get(projectId)?.has(id) ??
|
|
93
|
+
return (this.registriesByProject.get(projectId)?.has(id) ?? false) ||
|
|
94
|
+
this.sharedRegistry.has(id);
|
|
94
95
|
}
|
|
95
96
|
/**
|
|
96
97
|
* Get all IDs for the current project (includes shared items).
|
|
@@ -12,8 +12,6 @@ export declare function isCriticalImport(path: string): boolean;
|
|
|
12
12
|
export declare function getPreloadHints(output: MetafileOutput, outDir: string): string[];
|
|
13
13
|
/** Extracts chunk information from metafile output */
|
|
14
14
|
export declare function getChunkInfo(file: string, output: MetafileOutput, outDir: string): Promise<ChunkInfo>;
|
|
15
|
-
/** Adds a route entry to the manifest */
|
|
16
|
-
export declare function addRouteToManifest(manifest: ChunkManifest, output: MetafileOutput, relativePath: string, routeMap: Map<string, string>, outDir: string): void;
|
|
17
15
|
/** Builds complete chunk manifest from esbuild metafile */
|
|
18
16
|
export declare function buildManifest(metafile: Metafile, routeMap: Map<string, string>, outDir: string): Promise<ChunkManifest>;
|
|
19
17
|
/** Writes manifest to disk as JSON */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-builder.d.ts","sourceRoot":"","sources":["../../../../../src/src/build/bundler/code-splitter/manifest-builder.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGxC,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAK3E,gDAAgD;AAChD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAY3D;AAED,yCAAyC;AACzC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAYrD;AAED,0EAA0E;AAC1E,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAK5E;AAED,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,8CAA8C;AAC9C,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAKhF;AAED,sDAAsD;AACtD,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,SAAS,CAAC,CAYpB;
|
|
1
|
+
{"version":3,"file":"manifest-builder.d.ts","sourceRoot":"","sources":["../../../../../src/src/build/bundler/code-splitter/manifest-builder.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGxC,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAK3E,gDAAgD;AAChD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAY3D;AAED,yCAAyC;AACzC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAYrD;AAED,0EAA0E;AAC1E,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAK5E;AAED,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,8CAA8C;AAC9C,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAKhF;AAED,sDAAsD;AACtD,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,SAAS,CAAC,CAYpB;AAuBD,2DAA2D;AAC3D,wBAAsB,aAAa,CACjC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,aAAa,CAAC,CAuBxB;AAED,sCAAsC;AACtC,wBAAsB,aAAa,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1F"}
|
|
@@ -59,7 +59,7 @@ export async function getChunkInfo(file, output, outDir) {
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
/** Adds a route entry to the manifest */
|
|
62
|
-
|
|
62
|
+
function addRouteToManifest(manifest, output, relativePath, routeMap, outDir) {
|
|
63
63
|
if (!output.entryPoint)
|
|
64
64
|
return;
|
|
65
65
|
const entryName = extractEntryName(output.entryPoint);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../../../src/src/build/compiler/mdx-compiler/validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAMjD,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,GACtB,IAAI,
|
|
1
|
+
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../../../src/src/build/compiler/mdx-compiler/validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAMjD,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,GACtB,IAAI,CAeN;AAED,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAezF;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAM/D"}
|
|
@@ -2,10 +2,9 @@ import { createFileSystem } from "../../../platform/compat/fs.js";
|
|
|
2
2
|
import { createError, toError } from "../../../errors/veryfront-error.js";
|
|
3
3
|
const fs = createFileSystem();
|
|
4
4
|
export function validateCompileParams(filePath, content, options) {
|
|
5
|
-
if (!filePath)
|
|
6
|
-
throw new TypeError("filePath must be a non-empty string");
|
|
7
|
-
if (typeof filePath !== "string")
|
|
5
|
+
if (!filePath || typeof filePath !== "string") {
|
|
8
6
|
throw new TypeError("filePath must be a non-empty string");
|
|
7
|
+
}
|
|
9
8
|
if (typeof content !== "string")
|
|
10
9
|
throw new TypeError("content must be a string");
|
|
11
10
|
if (!options || typeof options !== "object")
|
|
@@ -18,6 +18,4 @@ export declare function compileMDXToJS(mdxPath: string, mdxContent: string, opti
|
|
|
18
18
|
code: string;
|
|
19
19
|
frontmatter: MDXFrontmatter;
|
|
20
20
|
}>;
|
|
21
|
-
export declare function compileMDXFile(mdxPath: string, outputDir: string, options: CompileToJSOptions): Promise<void>;
|
|
22
|
-
export declare function compileProjectMDX(projectDir: string, outputDir: string, options: Omit<CompileToJSOptions, "projectDir">): Promise<void>;
|
|
23
21
|
//# sourceMappingURL=mdx-to-js.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdx-to-js.d.ts","sourceRoot":"","sources":["../../../../src/src/build/compiler/mdx-to-js.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mdx-to-js.d.ts","sourceRoot":"","sources":["../../../../src/src/build/compiler/mdx-to-js.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGtE,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,aAAa,GAAG,YAAY,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,cAAc,CAAC;CACzB;AA6CD;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,cAAc,CAAA;CAAE,CAAC,CAoExD"}
|