veryfront 0.1.48 → 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 +1 -1
- 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/generate/integration-generator.js +1 -1
- package/esm/cli/commands/install/types.d.ts +2 -2
- 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/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/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/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 +3 -0
- package/esm/deno.js +22 -19
- package/esm/src/agent/chat-handler.d.ts.map +1 -1
- package/esm/src/agent/chat-handler.js +8 -23
- 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 +16 -1
- package/esm/src/agent/index.d.ts.map +1 -1
- package/esm/src/agent/index.js +16 -1
- 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/use-chat/types.d.ts +2 -0
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +15 -9
- 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/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 +2 -2
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +1 -1
- 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 -4
- package/esm/src/discovery/types.d.ts +3 -0
- package/esm/src/discovery/types.d.ts.map +1 -1
- package/esm/src/embedding/resolve.d.ts.map +1 -1
- package/esm/src/embedding/resolve.js +1 -3
- package/esm/src/embedding/upload-handler.d.ts.map +1 -1
- package/esm/src/embedding/upload-handler.js +4 -3
- package/esm/src/embedding/upload-store.js +4 -4
- 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/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 +4 -2
- package/esm/src/platform/compat/opaque-deps.d.ts.map +1 -1
- package/esm/src/platform/compat/opaque-deps.js +1 -1
- package/esm/src/platform/compat/path/basic-operations.d.ts.map +1 -1
- package/esm/src/platform/compat/path/basic-operations.js +8 -7
- package/esm/src/platform/compat/path/resolution.d.ts.map +1 -1
- package/esm/src/platform/compat/path/resolution.js +15 -10
- 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/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/chat/components/code-block.js +1 -1
- 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/step-indicator.js +4 -4
- package/esm/src/react/components/ai/chat/composition/chat-message-list.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/composition/chat-message-list.js +8 -2
- package/esm/src/react/components/ai/chat/composition/message.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/composition/message.js +8 -2
- package/esm/src/react/components/ai/chat/index.d.ts +4 -1
- package/esm/src/react/components/ai/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/index.js +4 -3
- package/esm/src/react/components/ai/chat/utils/message-parts.d.ts +2 -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 +9 -0
- package/esm/src/react/components/ai/chat-with-sidebar.d.ts +1 -0
- package/esm/src/react/components/ai/chat-with-sidebar.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat-with-sidebar.js +1 -0
- package/esm/src/react/components/ai/chat.d.ts +1 -1
- package/esm/src/react/components/ai/chat.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat.js +1 -1
- 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/orchestrator/pipeline.d.ts +11 -2
- package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
- 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/loader.d.ts.map +1 -1
- package/esm/src/routing/api/module-loader/loader.js +63 -7
- 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.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +426 -179
- 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/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 +1 -2
- 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 +1 -1
- 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/help/formatters.ts +11 -4
- package/src/cli/help/main-help.ts +2 -3
- package/src/cli/mcp/server.ts +2 -5
- 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/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 +22 -19
- package/src/src/agent/chat-handler.ts +8 -23
- package/src/src/agent/factory.ts +58 -9
- package/src/src/agent/index.ts +16 -1
- package/src/src/agent/memory/memory.ts +0 -9
- package/src/src/agent/react/use-chat/types.ts +2 -0
- package/src/src/agent/react/use-chat/use-chat.ts +15 -9
- 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/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 +3 -0
- 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 -4
- package/src/src/discovery/types.ts +3 -0
- package/src/src/embedding/resolve.ts +1 -3
- package/src/src/embedding/upload-handler.ts +7 -3
- package/src/src/embedding/upload-store.ts +4 -4
- 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/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 +10 -5
- package/src/src/platform/compat/path/basic-operations.ts +9 -7
- package/src/src/platform/compat/path/resolution.ts +15 -8
- 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/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/chat/components/code-block.tsx +1 -1
- package/src/src/react/components/ai/chat/components/skill-badge.tsx +51 -0
- package/src/src/react/components/ai/chat/components/step-indicator.tsx +4 -4
- package/src/src/react/components/ai/chat/composition/chat-message-list.tsx +9 -2
- package/src/src/react/components/ai/chat/composition/message.tsx +9 -2
- package/src/src/react/components/ai/chat/index.tsx +6 -1
- package/src/src/react/components/ai/chat/utils/message-parts.ts +11 -0
- package/src/src/react/components/ai/chat-with-sidebar.tsx +2 -0
- package/src/src/react/components/ai/chat.tsx +3 -0
- package/src/src/rendering/cache/index.ts +12 -5
- package/src/src/rendering/orchestrator/pipeline.ts +12 -2
- 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/loader.ts +88 -3
- 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 +426 -179
- 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/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/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
package/src/cli/mcp/server.ts
CHANGED
|
@@ -8,14 +8,12 @@
|
|
|
8
8
|
import * as dntShim from "../../_dnt.shims.js";
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
import { readTextFile } from "../../src/platform/index.js";
|
|
11
|
+
import { cwd, readTextFile } from "../../src/platform/index.js";
|
|
12
12
|
import { createHttpServer, type HttpServer } from "../../src/platform/compat/http/index.js";
|
|
13
|
-
import { cwd } from "../../src/platform/index.js";
|
|
14
13
|
import type { StdinReader } from "../../src/platform/index.js";
|
|
15
14
|
import { withSpan } from "../../src/observability/tracing/otlp-setup.js";
|
|
16
15
|
import { createIssuesManager } from "../../src/issues/index.js";
|
|
17
|
-
import { getErrorCollector } from "../../src/observability/index.js";
|
|
18
|
-
import { getLogBuffer } from "../../src/observability/index.js";
|
|
16
|
+
import { getErrorCollector, getLogBuffer } from "../../src/observability/index.js";
|
|
19
17
|
import { allTools, getTool, setServerStartTime } from "./tools.js";
|
|
20
18
|
import { startStdioJsonRpc } from "./stdio.js";
|
|
21
19
|
import {
|
|
@@ -485,6 +483,5 @@ export function createMCPServer(config: MCPServerConfig): MCPDevServer {
|
|
|
485
483
|
return server;
|
|
486
484
|
}
|
|
487
485
|
|
|
488
|
-
export * from "../../src/observability/index.js";
|
|
489
486
|
export * from "../../src/observability/index.js";
|
|
490
487
|
export * from "./tools.js";
|
|
@@ -8,8 +8,7 @@ import { z } from "zod";
|
|
|
8
8
|
import { getEnvironmentConfig } from "../../../src/config/index.js";
|
|
9
9
|
import { withSpan } from "../../../src/observability/tracing/otlp-setup.js";
|
|
10
10
|
import { ReloadNotifier } from "../../../src/server/index.js";
|
|
11
|
-
import { getErrorCollector } from "../../../src/observability/index.js";
|
|
12
|
-
import { getLogBuffer } from "../../../src/observability/index.js";
|
|
11
|
+
import { getErrorCollector, getLogBuffer } from "../../../src/observability/index.js";
|
|
13
12
|
import type { MCPTool } from "../tools.js";
|
|
14
13
|
import { formatError } from "./helpers.js";
|
|
15
14
|
|
package/src/cli/mcp/tools.ts
CHANGED
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
**************************/
|
|
4
4
|
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
type DevError,
|
|
8
|
+
type ErrorType,
|
|
9
|
+
getErrorCollector,
|
|
10
|
+
getLogBuffer,
|
|
11
|
+
type LogEntry,
|
|
12
|
+
type LogLevel,
|
|
13
|
+
} from "../../src/observability/index.js";
|
|
8
14
|
import { createFileSystem } from "../../src/platform/index.js";
|
|
9
15
|
import { type EnvironmentConfig, getEnvironmentConfig } from "../../src/config/index.js";
|
|
10
16
|
import type { MCPTool } from "../../src/mcp/index.js";
|
|
@@ -11,6 +11,7 @@ import * as dntShim from "../../_dnt.shims.js";
|
|
|
11
11
|
import { type EnvironmentConfig, getEnvironmentConfig } from "../../src/config/index.js";
|
|
12
12
|
import { capitalizeSeparatedWords } from "../../src/utils/case-utils.js";
|
|
13
13
|
import { randomSuffix } from "./slug.js";
|
|
14
|
+
import { getApiUrl } from "./constants.js";
|
|
14
15
|
|
|
15
16
|
function slugToName(slug: string): string {
|
|
16
17
|
return capitalizeSeparatedWords(slug, "-", " ");
|
|
@@ -35,10 +36,6 @@ interface CreateProjectResult {
|
|
|
35
36
|
|
|
36
37
|
const MAX_SLUG_ATTEMPTS = 10;
|
|
37
38
|
|
|
38
|
-
function getApiUrl(env: EnvironmentConfig = getEnvironmentConfig()): string {
|
|
39
|
-
return env.apiUrl ?? "https://api.veryfront.com";
|
|
40
|
-
}
|
|
41
|
-
|
|
42
39
|
export async function reserveProjectSlug(
|
|
43
40
|
slug: string,
|
|
44
41
|
token: string,
|
package/src/cli/sync/ignore.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { createFileSystem } from "../../src/platform/index.js";
|
|
|
7
7
|
import { cliLogger } from "../utils/index.js";
|
|
8
8
|
|
|
9
9
|
/** Default patterns always ignored */
|
|
10
|
-
const DEFAULT_IGNORE_PATTERNS = [
|
|
10
|
+
const DEFAULT_IGNORE_PATTERNS: readonly string[] = [
|
|
11
11
|
// Directories
|
|
12
12
|
"node_modules",
|
|
13
13
|
"dist",
|
|
@@ -91,23 +91,35 @@ export async function loadIgnorePatterns(projectPath: string): Promise<string[]>
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
94
|
+
* Escape special regex characters
|
|
95
95
|
*/
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const dirName = pattern.slice(0, -1);
|
|
100
|
-
return new RegExp(`(^|/)${escapeRegex(dirName)}(/|$)`);
|
|
101
|
-
}
|
|
96
|
+
function escapeRegex(str: string): string {
|
|
97
|
+
return str.replace(/[.+^${}()|[\]\\]/g, "\\$&");
|
|
98
|
+
}
|
|
102
99
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Convert a single ignore pattern to a RegExp
|
|
102
|
+
*/
|
|
103
|
+
function patternToRegex(pattern: string): RegExp {
|
|
104
|
+
if (pattern.endsWith("/")) {
|
|
105
|
+
const dirName = pattern.slice(0, -1);
|
|
106
|
+
return new RegExp(`(^|/)${escapeRegex(dirName)}(/|$)`);
|
|
107
|
+
}
|
|
106
108
|
|
|
107
|
-
|
|
109
|
+
const regex = escapeRegex(pattern)
|
|
110
|
+
.replace(/\\\*/g, ".*") // * matches anything
|
|
111
|
+
.replace(/\\\?/g, "."); // ? matches single char
|
|
108
112
|
|
|
109
|
-
|
|
110
|
-
|
|
113
|
+
if (pattern.startsWith("*")) return new RegExp(`(^|/)${regex}$`);
|
|
114
|
+
|
|
115
|
+
return new RegExp(`(^|/)${regex}(/|$)`);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Create an ignore checker with loaded patterns
|
|
120
|
+
*/
|
|
121
|
+
export function createIgnoreChecker(patterns: readonly string[]): IgnoreChecker {
|
|
122
|
+
const regexPatterns = patterns.map(patternToRegex);
|
|
111
123
|
|
|
112
124
|
function isIgnored(relativePath: string): boolean {
|
|
113
125
|
const normalizedPath = relativePath.replace(/\\/g, "/");
|
|
@@ -123,13 +135,6 @@ export function createIgnoreChecker(patterns: string[]): IgnoreChecker {
|
|
|
123
135
|
return { isIgnored, isSupportedExtension };
|
|
124
136
|
}
|
|
125
137
|
|
|
126
|
-
/**
|
|
127
|
-
* Escape special regex characters
|
|
128
|
-
*/
|
|
129
|
-
function escapeRegex(str: string): string {
|
|
130
|
-
return str.replace(/[.+^${}()|[\]\\]/g, "\\$&");
|
|
131
|
-
}
|
|
132
|
-
|
|
133
138
|
/**
|
|
134
139
|
* Create default ignore checker (without loading .vfignore)
|
|
135
140
|
*/
|
package/src/cli/ui/colors.ts
CHANGED
|
@@ -207,18 +207,6 @@ export const errorBold = (text: string) => bold(error(text));
|
|
|
207
207
|
|
|
208
208
|
export { RESET as reset };
|
|
209
209
|
|
|
210
|
-
const MATRIX_STATES = [
|
|
211
|
-
["●", "○", "○"],
|
|
212
|
-
["○", "●", "○"],
|
|
213
|
-
["○", "○", "●"],
|
|
214
|
-
["○", "●", "○"],
|
|
215
|
-
];
|
|
216
|
-
|
|
217
|
-
export function animatedMatrix(frame: number): string {
|
|
218
|
-
const state = MATRIX_STATES[frame % MATRIX_STATES.length] ?? ["●", "○", "○"];
|
|
219
|
-
return state.map((dot) => (dot === "●" ? brand(dot) : muted(dot))).join("");
|
|
220
|
-
}
|
|
221
|
-
|
|
222
210
|
/**
|
|
223
211
|
* Apply shimmer effect to text - creates a wave of brightness moving across
|
|
224
212
|
* @param text The text to shimmer
|
package/src/cli/ui/dot-matrix.ts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
import * as dntShim from "../../_dnt.shims.js";
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
import { RESET } from "./ansi.js";
|
|
11
|
+
|
|
10
12
|
export const AGENT_FACE: number[][] = [
|
|
11
13
|
[0, 0, 0, 0, 0, 0, 0],
|
|
12
14
|
[0, 1, 1, 1, 0, 0, 0],
|
|
@@ -62,8 +64,6 @@ const COMPACT_OPTIONS: Partial<DotMatrixOptions> = {
|
|
|
62
64
|
spacing: " ",
|
|
63
65
|
};
|
|
64
66
|
|
|
65
|
-
const RESET = "\x1b[0m";
|
|
66
|
-
|
|
67
67
|
const SPIN_COLORS = {
|
|
68
68
|
bright: "\x1b[38;2;255;165;120m",
|
|
69
69
|
orange: "\x1b[38;2;252;143;93m",
|
|
@@ -317,9 +317,7 @@ export class AnimatedDotMatrix {
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
stopSpinner(): void {
|
|
320
|
-
this.
|
|
321
|
-
this.clearInterval();
|
|
322
|
-
this.pattern = AGENT_FACE;
|
|
320
|
+
this.stop();
|
|
323
321
|
}
|
|
324
322
|
|
|
325
323
|
stop(): void {
|
|
@@ -330,7 +328,6 @@ export class AnimatedDotMatrix {
|
|
|
330
328
|
|
|
331
329
|
reset(): void {
|
|
332
330
|
this.stop();
|
|
333
|
-
this.pattern = AGENT_FACE;
|
|
334
331
|
}
|
|
335
332
|
|
|
336
333
|
setPattern(pattern: number[][]): void {
|
package/src/cli/ui/tui.ts
CHANGED
|
@@ -55,6 +55,8 @@ function render(): void {
|
|
|
55
55
|
getSize();
|
|
56
56
|
const lines: string[] = [""];
|
|
57
57
|
|
|
58
|
+
const spinner = getSpinnerFrame(spinnerFrame);
|
|
59
|
+
|
|
58
60
|
const infoKeys = Object.keys(state.info);
|
|
59
61
|
if (infoKeys.length > 0) {
|
|
60
62
|
const maxKeyLen = Math.max(...infoKeys.map((k) => k.length));
|
|
@@ -66,7 +68,6 @@ function render(): void {
|
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
if (state.steps.length > 0) {
|
|
69
|
-
const spinner = getSpinnerFrame(spinnerFrame);
|
|
70
71
|
const stepLine = state.steps
|
|
71
72
|
.map((s, i) => {
|
|
72
73
|
const icon = s.done ? success("✓") : i === state.currentStep ? brand(spinner) : dim("○");
|
|
@@ -77,11 +78,10 @@ function render(): void {
|
|
|
77
78
|
lines.push(` ${stepLine}`, "");
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
const spinnerChar = getSpinnerFrame(spinnerFrame);
|
|
81
81
|
let statusIcon = dim("○");
|
|
82
82
|
switch (state.statusType) {
|
|
83
83
|
case "loading":
|
|
84
|
-
statusIcon = brand(
|
|
84
|
+
statusIcon = brand(spinner);
|
|
85
85
|
break;
|
|
86
86
|
case "success":
|
|
87
87
|
statusIcon = success("●");
|
package/src/cli/utils/index.ts
CHANGED
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
onSignal,
|
|
7
7
|
promptSync,
|
|
8
8
|
readStdinByteSync,
|
|
9
|
+
setRawMode,
|
|
9
10
|
writeStdout,
|
|
10
11
|
} from "../../src/platform/index.js";
|
|
11
|
-
import { setRawMode } from "../../src/platform/index.js";
|
|
12
12
|
import { DEFAULT_DEV_PORT } from "../shared/constants.js";
|
|
13
13
|
import {
|
|
14
14
|
bold,
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
import { join } from "../../src/platform/compat/path/index.js";
|
|
8
8
|
import { cliLogger as logger } from "./index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { getEnv, getOsType, runCommand } from "../../src/platform/index.js";
|
|
10
|
+
import { getFs } from "./fs.js";
|
|
11
11
|
|
|
12
12
|
export type PackageManager = "npm" | "yarn" | "pnpm" | "bun" | "deno";
|
|
13
13
|
|
|
@@ -66,7 +66,7 @@ const LOCKFILES: Array<{ file: string; pm: PackageManager }> = [
|
|
|
66
66
|
async function detectFromDir(
|
|
67
67
|
dir: string,
|
|
68
68
|
): Promise<{ pm: PackageManager; file: string } | undefined> {
|
|
69
|
-
const fs =
|
|
69
|
+
const fs = getFs();
|
|
70
70
|
|
|
71
71
|
for (const lock of LOCKFILES) {
|
|
72
72
|
if (await fs.exists(join(dir, lock.file))) return lock;
|
|
@@ -160,7 +160,6 @@ export function getDlxCommand(pm: PackageManager): string {
|
|
|
160
160
|
case "bun":
|
|
161
161
|
return "bunx";
|
|
162
162
|
case "npm":
|
|
163
|
-
default:
|
|
164
163
|
return "npx";
|
|
165
164
|
}
|
|
166
165
|
}
|
package/src/deno.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.49",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"nodeModulesDir": "auto",
|
|
6
6
|
"exclude": [
|
|
@@ -66,7 +66,7 @@ export default {
|
|
|
66
66
|
"veryfront/workflow/react": "./src/workflow/react/index.ts",
|
|
67
67
|
"veryfront/workflow/executor": "./src/workflow/executor/index.ts",
|
|
68
68
|
"veryfront/workflow/blob": "./src/workflow/blob/index.ts",
|
|
69
|
-
"veryfront/workflow/runtime": "./src/workflow/runtime/
|
|
69
|
+
"veryfront/workflow/runtime": "./src/workflow/runtime/index.ts",
|
|
70
70
|
"veryfront/workflow/worker": "./src/workflow/worker/index.ts",
|
|
71
71
|
"veryfront/workflow/claude-code": "./src/workflow/claude-code/index.ts",
|
|
72
72
|
"veryfront/workflow/claude-code/react": "./src/workflow/claude-code/react/index.ts",
|
|
@@ -134,6 +134,8 @@ export default {
|
|
|
134
134
|
"#veryfront/resource": "./src/resource/index.ts",
|
|
135
135
|
"#veryfront/routing": "./src/routing/index.ts",
|
|
136
136
|
"#veryfront/security": "./src/security/index.ts",
|
|
137
|
+
"#veryfront/skill": "./src/skill/index.ts",
|
|
138
|
+
"#veryfront/skill/": "./src/skill/",
|
|
137
139
|
"#veryfront/server": "./src/server/index.ts",
|
|
138
140
|
"#veryfront/server/project-env": "./src/server/project-env/index.ts",
|
|
139
141
|
"#veryfront/testing": "./src/testing/index.ts",
|
|
@@ -282,18 +284,19 @@ export default {
|
|
|
282
284
|
},
|
|
283
285
|
"tasks": {
|
|
284
286
|
"setup": "deno run --allow-all scripts/setup.ts",
|
|
285
|
-
"
|
|
286
|
-
"start
|
|
287
|
-
"
|
|
288
|
-
"
|
|
289
|
-
"
|
|
290
|
-
"
|
|
287
|
+
"generate": "deno run -A scripts/build/generate-templates-manifest.ts && deno run -A scripts/build/generate-dev-ui-manifest.ts && deno run -A scripts/build/prebundle-client-scripts.ts && deno run -A scripts/build/prebundle-bridge.ts",
|
|
288
|
+
"start": "deno task generate && deno run --allow-all cli/main.ts",
|
|
289
|
+
"start:headless": "deno task generate && deno run --allow-all cli/main.ts --headless",
|
|
290
|
+
"proxy": "deno task generate && deno run --allow-all cli/main.ts serve --mode=proxy",
|
|
291
|
+
"dev": "deno task generate && deno run --allow-all cli/main.ts dev",
|
|
292
|
+
"production": "deno task generate && deno run --allow-all cli/main.ts serve --mode=production",
|
|
293
|
+
"build:prepare": "deno run -A scripts/build/generate-integrations-module.ts && deno task generate && deno run -A scripts/build/prepare-framework-sources.ts",
|
|
291
294
|
"build": "deno task build:prepare && deno compile --allow-all --include src/platform/polyfills --include src/proxy/main.ts --include dist/framework-src --output ./bin/veryfront cli/main.ts",
|
|
292
|
-
"build:npm": "deno run -A scripts/build/generate-integrations-module.ts && deno run -A scripts/build/build-npm-dnt.ts",
|
|
295
|
+
"build:npm": "deno run -A scripts/build/generate-integrations-module.ts && deno task generate && deno run -A scripts/build/build-npm-dnt.ts",
|
|
293
296
|
"release": "deno run -A scripts/release.ts",
|
|
294
|
-
"test": "VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' --unstable-worker-options --unstable-net",
|
|
295
|
-
"test:unit": "VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --parallel --allow-all --v8-flags=--max-old-space-size=8192 '--ignore=tests,src/ai/workflow/__tests__' --unstable-worker-options --unstable-net $(find src cli -name '*.test.ts' ! -name '*.integration.test.ts')",
|
|
296
|
-
"test:integration": "VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' tests --unstable-worker-options --unstable-net",
|
|
297
|
+
"test": "deno task generate && VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' --unstable-worker-options --unstable-net",
|
|
298
|
+
"test:unit": "deno task generate && VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --parallel --allow-all --v8-flags=--max-old-space-size=8192 '--ignore=tests,src/ai/workflow/__tests__' --unstable-worker-options --unstable-net $(find src cli -name '*.test.ts' ! -name '*.integration.test.ts')",
|
|
299
|
+
"test:integration": "deno task generate && VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' tests --unstable-worker-options --unstable-net",
|
|
297
300
|
"test:integration:cli": "VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --parallel --allow-all --unstable-worker-options --unstable-net $(find cli -name '*.integration.test.ts')",
|
|
298
301
|
"test:record": "VCR=record deno test --no-check --allow-all $(find cli -name '*.integration.test.ts' -path '*/commands/*')",
|
|
299
302
|
"test:coverage": "rm -rf coverage && VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --parallel --fail-fast --allow-all --coverage=coverage '--ignore=tests/integration/compiled-binary-e2e.test.ts' --unstable-worker-options --unstable-net || exit 1",
|
|
@@ -305,9 +308,9 @@ export default {
|
|
|
305
308
|
"lint": "DENO_NO_PACKAGE_JSON=1 deno lint src/ cli/",
|
|
306
309
|
"fmt": "deno fmt src/ cli/",
|
|
307
310
|
"fmt:check": "deno fmt --check src/ cli/",
|
|
308
|
-
"typecheck": "deno check src/index.ts cli/main.ts src/server/index.ts src/routing/api/index.ts src/rendering/index.ts src/platform/index.ts src/platform/adapters/index.ts src/build/index.ts src/build/production-build/index.ts src/transforms/index.ts src/config/index.ts src/utils/index.ts src/data/index.ts src/security/index.ts src/middleware/index.ts src/server/handlers/dev/index.ts src/server/handlers/request/api/index.ts src/rendering/cache/index.ts src/rendering/cache/stores/index.ts src/rendering/rsc/actions/index.ts src/html/index.ts src/modules/index.ts src/proxy/main.ts src/chat/index.ts src/markdown/index.ts src/mdx/index.ts src/fs/index.ts src/oauth/index.ts src/agent/index.ts src/tool/index.ts src/workflow/index.ts src/prompt/index.ts src/resource/index.ts src/mcp/index.ts src/provider/index.ts",
|
|
309
|
-
"verify": "deno fmt --check src/ cli/ && DENO_NO_PACKAGE_JSON=1 deno lint src/ cli/ && deno task lint:style && deno task lint:cli-boundary && deno task lint:wildcard-exports && deno task lint:barrel-jsdoc && deno task docs:validate && deno task typecheck && deno task test && deno task test:e2e:binary",
|
|
310
|
-
"verify:quick": "deno fmt --check src/ cli/ && DENO_NO_PACKAGE_JSON=1 deno lint src/ cli/ && deno task lint:style && deno task lint:cli-boundary && deno task lint:wildcard-exports && deno task lint:barrel-jsdoc && deno task docs:validate && deno task typecheck",
|
|
311
|
+
"typecheck": "deno task generate && deno check src/index.ts cli/main.ts src/server/index.ts src/routing/api/index.ts src/rendering/index.ts src/platform/index.ts src/platform/adapters/index.ts src/build/index.ts src/build/production-build/index.ts src/transforms/index.ts src/config/index.ts src/utils/index.ts src/data/index.ts src/security/index.ts src/middleware/index.ts src/server/handlers/dev/index.ts src/server/handlers/request/api/index.ts src/rendering/cache/index.ts src/rendering/cache/stores/index.ts src/rendering/rsc/actions/index.ts src/html/index.ts src/modules/index.ts src/proxy/main.ts src/chat/index.ts src/markdown/index.ts src/mdx/index.ts src/fs/index.ts src/oauth/index.ts src/agent/index.ts src/tool/index.ts src/workflow/index.ts src/prompt/index.ts src/resource/index.ts src/mcp/index.ts src/provider/index.ts",
|
|
312
|
+
"verify": "deno task generate && deno fmt --check src/ cli/ && DENO_NO_PACKAGE_JSON=1 deno lint src/ cli/ && deno task lint:style && deno task lint:cli-boundary && deno task lint:wildcard-exports && deno task lint:barrel-jsdoc && deno task docs:validate && deno task typecheck && deno task test && deno task test:e2e:binary",
|
|
313
|
+
"verify:quick": "deno task generate && deno fmt --check src/ cli/ && DENO_NO_PACKAGE_JSON=1 deno lint src/ cli/ && deno task lint:style && deno task lint:cli-boundary && deno task lint:wildcard-exports && deno task lint:barrel-jsdoc && deno task docs:validate && deno task typecheck",
|
|
311
314
|
"docs": "rm -rf docs/reference && deno run --allow-read --allow-write --allow-run scripts/docs/generate-api-reference.ts",
|
|
312
315
|
"docs:copy": "rm -rf ../../docs/docs/code/reference && cp -r docs/reference/ ../../docs/docs/code/reference/",
|
|
313
316
|
"docs:validate": "deno run --allow-read scripts/docs/validate-api-reference.ts",
|
|
@@ -330,8 +333,8 @@ export default {
|
|
|
330
333
|
"test:bun": "node ./tests/bun/run-tests.mjs src/",
|
|
331
334
|
"test:all-runtimes": "deno task test:unit && deno task test:node && deno task test:bun",
|
|
332
335
|
"test:e2e": "npx playwright test --config=tests/e2e/playwright.config.ts",
|
|
333
|
-
"test:e2e:binary": "deno test --allow-all tests/integration/compiled-binary-e2e.test.ts",
|
|
334
|
-
"test:e2e:binary:fresh": "VERYFRONT_BINARY_FRESH=1 deno test --allow-all tests/integration/compiled-binary-e2e.test.ts",
|
|
336
|
+
"test:e2e:binary": "deno task generate && deno test --allow-all tests/integration/compiled-binary-e2e.test.ts",
|
|
337
|
+
"test:e2e:binary:fresh": "deno task generate && VERYFRONT_BINARY_FRESH=1 deno test --allow-all tests/integration/compiled-binary-e2e.test.ts",
|
|
335
338
|
"check:circular": "deno run -A jsr:@cunarist/deno-circular-deps src/index.ts",
|
|
336
339
|
"cli": "deno run --allow-all cli/main.ts",
|
|
337
340
|
"mcp": "deno run --allow-all cli/main.ts mcp",
|
|
@@ -345,8 +348,8 @@ export default {
|
|
|
345
348
|
"rlm:example": "deno run -A scripts/rlm-ts/examples/basic.ts",
|
|
346
349
|
"rlm:explore": "deno run -A scripts/rlm-ts/apps/explore.ts",
|
|
347
350
|
"rlm:audit": "deno run -A scripts/rlm-ts/apps/audit.ts",
|
|
348
|
-
"start-split": "deno run --allow-all cli/main.ts serve --split",
|
|
349
|
-
"start-split:binary": "deno run --allow-all cli/main.ts serve --split --binary"
|
|
351
|
+
"start-split": "deno task generate && deno run --allow-all cli/main.ts serve --split",
|
|
352
|
+
"start-split:binary": "deno task generate && deno run --allow-all cli/main.ts serve --split --binary"
|
|
350
353
|
},
|
|
351
354
|
"lint": {
|
|
352
355
|
"include": [
|
|
@@ -283,23 +283,20 @@ export function createChatHandler(
|
|
|
283
283
|
// deno-lint-ignore no-explicit-any
|
|
284
284
|
return async function POST(requestOrCtx: any): Promise<dntShim.Response> {
|
|
285
285
|
const request = extractRequest(requestOrCtx);
|
|
286
|
-
// Resolve agent outside try so it's available in the catch block for
|
|
287
|
-
// extracting the system prompt in the 503 fallback response.
|
|
288
286
|
let agent: ReturnType<typeof getAgent> | undefined;
|
|
289
287
|
try {
|
|
290
288
|
agent = getAgent(agentId);
|
|
291
289
|
} catch {
|
|
292
290
|
return dntShim.Response.json({ error: "Agent not found" }, { status: 404 });
|
|
293
291
|
}
|
|
292
|
+
if (!agent) {
|
|
293
|
+
return dntShim.Response.json({ error: "Agent not found" }, { status: 404 });
|
|
294
|
+
}
|
|
294
295
|
|
|
295
296
|
try {
|
|
296
297
|
const body = await request.json();
|
|
297
298
|
const { messages: rawMessages, model: requestModel } = chatRequestSchema.parse(body);
|
|
298
299
|
|
|
299
|
-
if (!agent) {
|
|
300
|
-
return dntShim.Response.json({ error: "Agent not found" }, { status: 404 });
|
|
301
|
-
}
|
|
302
|
-
|
|
303
300
|
const context = typeof options?.context === "function"
|
|
304
301
|
? await options.context(request)
|
|
305
302
|
: options?.context ?? { userId: "current-user" };
|
|
@@ -314,9 +311,7 @@ export function createChatHandler(
|
|
|
314
311
|
|
|
315
312
|
if (isResponseLike(beforeStreamResult)) return beforeStreamResult;
|
|
316
313
|
|
|
317
|
-
|
|
318
|
-
if (beforeStreamResult) hookResult = beforeStreamResult;
|
|
319
|
-
|
|
314
|
+
const hookResult = beforeStreamResult ?? undefined;
|
|
320
315
|
const messages = applyBeforeStreamResult(baseMessages, hookResult);
|
|
321
316
|
const streamContext = hookResult?.context ?? context;
|
|
322
317
|
|
|
@@ -342,27 +337,17 @@ export function createChatHandler(
|
|
|
342
337
|
);
|
|
343
338
|
}
|
|
344
339
|
|
|
345
|
-
// Detect structured "no_ai_available" errors from local engine
|
|
340
|
+
// Detect structured "no_ai_available" errors from local engine.
|
|
341
|
+
// Never send the server-side system prompt to the client — it may
|
|
342
|
+
// contain business logic, personas, or internal instructions.
|
|
343
|
+
// The client (useChat) has its own systemPrompt option for browser fallback.
|
|
346
344
|
const vfError = fromError(error);
|
|
347
345
|
if (vfError?.type === "no_ai_available") {
|
|
348
|
-
let systemPrompt: string | undefined;
|
|
349
|
-
try {
|
|
350
|
-
systemPrompt = agent
|
|
351
|
-
? typeof agent.config.system === "string"
|
|
352
|
-
? agent.config.system
|
|
353
|
-
: typeof agent.config.system === "function"
|
|
354
|
-
? await agent.config.system()
|
|
355
|
-
: undefined
|
|
356
|
-
: undefined;
|
|
357
|
-
} catch {
|
|
358
|
-
// If system prompt resolution fails, continue without it
|
|
359
|
-
}
|
|
360
346
|
return dntShim.Response.json(
|
|
361
347
|
{
|
|
362
348
|
code: "NO_AI_AVAILABLE",
|
|
363
349
|
fallback: "browser",
|
|
364
350
|
model: DEFAULT_LOCAL_MODEL,
|
|
365
|
-
...(systemPrompt ? { systemPrompt } : {}),
|
|
366
351
|
},
|
|
367
352
|
{ status: 503 },
|
|
368
353
|
);
|
package/src/src/agent/factory.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import * as dntShim from "../../_dnt.shims.js";
|
|
2
|
-
import type { Agent, AgentConfig, AgentResponse, Message } from "./types.js";
|
|
2
|
+
import type { Agent, AgentConfig, AgentResponse, AgentStreamResult, Message } from "./types.js";
|
|
3
3
|
import { AgentRuntime } from "./runtime/index.js";
|
|
4
4
|
import {
|
|
5
5
|
detectPlatform,
|
|
6
6
|
validatePlatformCompatibility,
|
|
7
7
|
} from "../platform/core-platform.js";
|
|
8
8
|
import { registerTool } from "../mcp/index.js";
|
|
9
|
+
import { toolRegistry } from "../tool/index.js";
|
|
10
|
+
import { skillRegistry } from "../skill/registry.js";
|
|
11
|
+
import { buildSkillManifestPrompt } from "../skill/prompt-augmentation.js";
|
|
12
|
+
import {
|
|
13
|
+
createExecuteSkillScriptTool,
|
|
14
|
+
createLoadSkillReferenceTool,
|
|
15
|
+
createLoadSkillTool,
|
|
16
|
+
} from "../skill/tools.js";
|
|
9
17
|
import { agentRegistry } from "./composition/index.js";
|
|
10
18
|
import { agentLogger } from "../utils/logger/logger.js";
|
|
11
19
|
import { createError, toError } from "../errors/veryfront-error.js";
|
|
@@ -18,13 +26,11 @@ const STREAMING_HEADERS: Record<string, string> = {
|
|
|
18
26
|
"x-vercel-ai-ui-message-stream": "v1",
|
|
19
27
|
};
|
|
20
28
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}): dntShim.Response;
|
|
27
|
-
}
|
|
29
|
+
const SKILL_TOOL_REGISTRATIONS = [
|
|
30
|
+
{ id: "load-skill", create: createLoadSkillTool },
|
|
31
|
+
{ id: "load-skill-reference", create: createLoadSkillReferenceTool },
|
|
32
|
+
{ id: "execute-skill-script", create: createExecuteSkillScriptTool },
|
|
33
|
+
] as const;
|
|
28
34
|
|
|
29
35
|
function createAgentStreamResult(stream: ReadableStream<Uint8Array>): AgentStreamResult {
|
|
30
36
|
return {
|
|
@@ -60,6 +66,45 @@ export function agent(config: AgentConfig): Agent {
|
|
|
60
66
|
}
|
|
61
67
|
}
|
|
62
68
|
|
|
69
|
+
// Skill tool registration (immutable config merge)
|
|
70
|
+
let mergedToolsConfig = config.tools;
|
|
71
|
+
|
|
72
|
+
if (config.skills) {
|
|
73
|
+
// Skill tools (load-skill, load-skill-reference, execute-skill-script) are
|
|
74
|
+
// framework infrastructure — shared across all projects. Project tools and
|
|
75
|
+
// skills themselves remain project-scoped. Using registerShared avoids
|
|
76
|
+
// scope mismatch between module-load time and request-handling time.
|
|
77
|
+
for (const registration of SKILL_TOOL_REGISTRATIONS) {
|
|
78
|
+
if (!toolRegistry.has(registration.id)) {
|
|
79
|
+
toolRegistry.registerShared(registration.id, registration.create());
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Ensure skill tools are enabled for this agent even when config.tools is undefined
|
|
84
|
+
if (config.tools !== true) {
|
|
85
|
+
mergedToolsConfig = {
|
|
86
|
+
...(config.tools ?? {}),
|
|
87
|
+
"load-skill": true,
|
|
88
|
+
"load-skill-reference": true,
|
|
89
|
+
"execute-skill-script": true,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// System prompt augmentation with skill manifest.
|
|
95
|
+
// Re-resolve skills at invocation time so HMR changes are picked up.
|
|
96
|
+
const originalSystem = config.system;
|
|
97
|
+
const augmentedSystem = config.skills
|
|
98
|
+
? async () => {
|
|
99
|
+
const currentSkills = skillRegistry.resolveForAgent(config.skills!);
|
|
100
|
+
const basePrompt = typeof originalSystem === "function"
|
|
101
|
+
? await originalSystem()
|
|
102
|
+
: originalSystem;
|
|
103
|
+
if (!currentSkills.size) return basePrompt ?? "You are a helpful AI assistant.";
|
|
104
|
+
return `${basePrompt}\n\n${buildSkillManifestPrompt(currentSkills)}`;
|
|
105
|
+
}
|
|
106
|
+
: originalSystem;
|
|
107
|
+
|
|
63
108
|
const platform = detectPlatform();
|
|
64
109
|
const compatibility = validatePlatformCompatibility(
|
|
65
110
|
{
|
|
@@ -86,7 +131,11 @@ export function agent(config: AgentConfig): Agent {
|
|
|
86
131
|
agentLogger.warn(`Agent "${id}" warnings:\n${compatibility.warnings.join("\n")}`);
|
|
87
132
|
}
|
|
88
133
|
|
|
89
|
-
const runtime = new AgentRuntime(id,
|
|
134
|
+
const runtime = new AgentRuntime(id, {
|
|
135
|
+
...config,
|
|
136
|
+
tools: mergedToolsConfig,
|
|
137
|
+
system: augmentedSystem,
|
|
138
|
+
});
|
|
90
139
|
|
|
91
140
|
const agentInstance: Agent = {
|
|
92
141
|
id,
|
package/src/src/agent/index.ts
CHANGED
|
@@ -29,11 +29,26 @@
|
|
|
29
29
|
* const assistant = agent({
|
|
30
30
|
* model: "openai/gpt-4o",
|
|
31
31
|
* system: "You are a helpful assistant.",
|
|
32
|
-
* tools:
|
|
32
|
+
* tools: { search: searchTool },
|
|
33
33
|
* memory: { type: "conversation", maxMessages: 50 },
|
|
34
34
|
* });
|
|
35
35
|
* ```
|
|
36
36
|
*
|
|
37
|
+
* @example Agent with skills
|
|
38
|
+
* ```ts
|
|
39
|
+
* import { agent } from "veryfront/agent";
|
|
40
|
+
*
|
|
41
|
+
* const assistant = agent({
|
|
42
|
+
* model: "openai/gpt-4o",
|
|
43
|
+
* system: "You are a support engineer. Use skills when relevant.",
|
|
44
|
+
* skills: ["incident-response", "repo-maintainer"], // or `true` for all discovered skills
|
|
45
|
+
* tools: {
|
|
46
|
+
* Read: true,
|
|
47
|
+
* "github:list-issues": true,
|
|
48
|
+
* },
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
37
52
|
* @example Streaming API route
|
|
38
53
|
* ```ts
|
|
39
54
|
* // app/api/chat/route.ts
|
|
@@ -3,20 +3,11 @@ import {
|
|
|
3
3
|
getTextFromMemoryParts,
|
|
4
4
|
type Memory,
|
|
5
5
|
type MemoryConfigBase,
|
|
6
|
-
type MemoryPersistence,
|
|
7
6
|
type MemoryStats,
|
|
8
7
|
type MinimalMessage,
|
|
9
8
|
} from "./memory-interface.js";
|
|
10
9
|
import { withSpan, withSpanSync } from "../../observability/tracing/otlp-setup.js";
|
|
11
10
|
|
|
12
|
-
export {
|
|
13
|
-
estimateTokens,
|
|
14
|
-
type Memory,
|
|
15
|
-
type MemoryPersistence,
|
|
16
|
-
type MemoryStats,
|
|
17
|
-
type MinimalMessage,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
11
|
type BasicMemoryType = "conversation" | "buffer";
|
|
21
12
|
|
|
22
13
|
function getMessagesWithTrace<M extends MinimalMessage>(
|
|
@@ -130,6 +130,8 @@ export interface UseChatResult {
|
|
|
130
130
|
error: Error | null;
|
|
131
131
|
/** Current model override (undefined = use agent default) */
|
|
132
132
|
model: string | undefined;
|
|
133
|
+
/** The actual model being used after auto-upgrade (e.g. "anthropic/claude-sonnet-4-20250514") */
|
|
134
|
+
activeModel: string | undefined;
|
|
133
135
|
/** Where inference is currently happening */
|
|
134
136
|
inferenceMode: InferenceMode;
|
|
135
137
|
/** Browser-side model loading/inference status (null when not using browser fallback) */
|