veryfront 0.1.149 → 0.1.150
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/cli/commands/dev/command.js +3 -3
- package/esm/cli/commands/workflow/command-help.js +1 -1
- package/esm/cli/commands/workflow/command.js +2 -2
- package/esm/cli/shared/config.d.ts.map +1 -1
- package/esm/cli/shared/config.js +1 -3
- package/esm/deno.d.ts +5 -11
- package/esm/deno.js +16 -16
- package/esm/src/agent/chat-handler.js +1 -1
- package/esm/src/agent/composition/composition.d.ts +1 -1
- package/esm/src/agent/composition/composition.d.ts.map +1 -1
- package/esm/src/agent/composition/composition.js +2 -2
- package/esm/src/agent/{ai-defaults.d.ts → defaults.d.ts} +1 -1
- package/esm/src/agent/defaults.d.ts.map +1 -0
- package/esm/src/agent/factory.js +1 -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/browser-inference/browser-engine.d.ts +5 -6
- package/esm/src/agent/react/use-chat/browser-inference/browser-engine.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/browser-inference/browser-engine.js +1 -1
- package/esm/src/agent/react/use-chat/index.d.ts +2 -1
- package/esm/src/agent/react/use-chat/index.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/stream-protocol.d.ts +2 -0
- package/esm/src/agent/react/use-chat/stream-protocol.d.ts.map +1 -0
- package/esm/src/agent/react/use-chat/stream-protocol.js +1 -0
- 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/types.d.ts +4 -4
- package/esm/src/agent/react/use-chat/streaming/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/types.d.ts +7 -55
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts +4 -4
- package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +2 -2
- package/esm/src/agent/react/use-chat/utils.d.ts +2 -2
- package/esm/src/agent/react/use-chat/utils.d.ts.map +1 -1
- package/esm/src/agent/runtime/{ai-stream-handler.d.ts → chat-stream-handler.d.ts} +13 -13
- package/esm/src/agent/runtime/chat-stream-handler.d.ts.map +1 -0
- package/esm/src/agent/runtime/{ai-stream-handler.js → chat-stream-handler.js} +91 -89
- package/esm/src/agent/runtime/constants.js +1 -1
- package/esm/src/agent/runtime/index.d.ts +7 -5
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +67 -30
- package/esm/src/agent/runtime/model-message-converter.d.ts +7 -7
- package/esm/src/agent/runtime/model-message-converter.d.ts.map +1 -1
- package/esm/src/agent/runtime/model-message-converter.js +8 -6
- package/esm/src/agent/runtime/model-runtime-types.d.ts +44 -0
- package/esm/src/agent/runtime/model-runtime-types.d.ts.map +1 -0
- package/esm/src/agent/runtime/model-runtime-types.js +8 -0
- package/esm/src/agent/runtime/model-tool-converter.d.ts +9 -9
- package/esm/src/agent/runtime/model-tool-converter.d.ts.map +1 -1
- package/esm/src/agent/runtime/model-tool-converter.js +10 -22
- package/esm/src/agent/runtime/provider-native-tools.d.ts +3 -0
- package/esm/src/agent/runtime/provider-native-tools.d.ts.map +1 -0
- package/esm/src/agent/runtime/provider-native-tools.js +56 -0
- package/esm/src/agent/runtime/repair-tool-call.d.ts +2 -2
- package/esm/src/agent/runtime/repair-tool-call.d.ts.map +1 -1
- package/esm/src/agent/runtime/repair-tool-call.js +3 -3
- package/esm/src/agent/runtime/runtime-tool-builder.d.ts +48 -0
- package/esm/src/agent/runtime/runtime-tool-builder.d.ts.map +1 -0
- package/esm/src/agent/runtime/runtime-tool-builder.js +28 -0
- package/esm/src/agent/runtime/runtime-tool-errors.d.ts +16 -0
- package/esm/src/agent/runtime/runtime-tool-errors.d.ts.map +1 -0
- package/esm/src/agent/runtime/runtime-tool-errors.js +28 -0
- package/esm/src/agent/runtime/runtime-tool-types.d.ts +104 -0
- package/esm/src/agent/runtime/runtime-tool-types.d.ts.map +1 -0
- package/esm/src/agent/runtime/runtime-tool-types.js +7 -0
- package/esm/src/chat/index.d.ts +9 -9
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +7 -7
- package/esm/src/chat/protocol.d.ts +156 -0
- package/esm/src/chat/protocol.d.ts.map +1 -0
- package/esm/src/chat/protocol.js +7 -0
- package/esm/src/discovery/import-rewriter.d.ts.map +1 -1
- package/esm/src/discovery/import-rewriter.js +1 -14
- package/esm/src/discovery/index.d.ts +1 -1
- package/esm/src/discovery/index.d.ts.map +1 -1
- package/esm/src/discovery/index.js +2 -2
- package/esm/src/discovery/provider-config-validator.d.ts +14 -0
- package/esm/src/discovery/provider-config-validator.d.ts.map +1 -0
- package/esm/src/discovery/{config-validator.js → provider-config-validator.js} +4 -4
- package/esm/src/discovery/transpiler.d.ts.map +1 -1
- package/esm/src/discovery/transpiler.js +0 -3
- package/esm/src/embedding/embedding.d.ts.map +1 -1
- package/esm/src/embedding/embedding.js +1 -1
- package/esm/src/embedding/index.d.ts +3 -3
- package/esm/src/embedding/index.d.ts.map +1 -1
- package/esm/src/embedding/index.js +3 -3
- package/esm/src/embedding/rag-store.d.ts.map +1 -1
- package/esm/src/embedding/rag-store.js +1 -1
- package/esm/src/embedding/resolve.d.ts +5 -7
- package/esm/src/embedding/resolve.d.ts.map +1 -1
- package/esm/src/embedding/resolve.js +6 -9
- package/esm/src/embedding/vector-store.d.ts.map +1 -1
- package/esm/src/embedding/vector-store.js +1 -1
- package/esm/src/embedding/veryfront-cloud/provider.d.ts +2 -2
- package/esm/src/embedding/veryfront-cloud/provider.d.ts.map +1 -1
- package/esm/src/embedding/veryfront-cloud/provider.js +5 -6
- package/esm/src/markdown/index.d.ts +1 -1
- package/esm/src/markdown/index.d.ts.map +1 -1
- package/esm/src/markdown/index.js +1 -1
- package/esm/src/modules/import-map/default-import-map.js +2 -2
- package/esm/src/prompt/registry.d.ts +1 -1
- package/esm/src/prompt/registry.d.ts.map +1 -1
- package/esm/src/prompt/registry.js +2 -2
- package/esm/src/provider/index.d.ts +7 -8
- package/esm/src/provider/index.d.ts.map +1 -1
- package/esm/src/provider/index.js +6 -8
- package/esm/src/provider/local/embedding-runtime-adapter.d.ts +19 -0
- package/esm/src/provider/local/embedding-runtime-adapter.d.ts.map +1 -0
- package/esm/src/provider/local/{local-embedding-adapter.js → embedding-runtime-adapter.js} +5 -5
- package/esm/src/provider/local/model-runtime-adapter.d.ts +18 -0
- package/esm/src/provider/local/model-runtime-adapter.d.ts.map +1 -0
- package/esm/src/provider/local/{ai-sdk-adapter.js → model-runtime-adapter.js} +10 -12
- package/esm/src/provider/model-registry.d.ts +11 -12
- package/esm/src/provider/model-registry.d.ts.map +1 -1
- package/esm/src/provider/model-registry.js +17 -20
- package/esm/src/provider/runtime-inspection.d.ts +6 -0
- package/esm/src/provider/runtime-inspection.d.ts.map +1 -0
- package/esm/src/provider/runtime-inspection.js +19 -0
- package/esm/src/provider/runtime-loader.d.ts +27 -0
- package/esm/src/provider/runtime-loader.d.ts.map +1 -0
- package/esm/src/provider/runtime-loader.js +1307 -0
- package/esm/src/provider/types.d.ts +35 -0
- package/esm/src/provider/types.d.ts.map +1 -0
- package/esm/src/provider/types.js +1 -0
- package/esm/src/provider/veryfront-cloud/provider.d.ts +2 -2
- package/esm/src/provider/veryfront-cloud/provider.d.ts.map +1 -1
- package/esm/src/provider/veryfront-cloud/provider.js +7 -9
- package/esm/src/provider/veryfront-cloud/shared.d.ts +1 -1
- package/esm/src/provider/veryfront-cloud/shared.js +1 -1
- package/esm/src/react/components/chat/agent-card.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/animations.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/branch-picker.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/code-block.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/drop-zone.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/empty-state.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/inference-badge.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/components/inference-badge.js +1 -1
- package/esm/src/react/components/chat/chat/components/inline-citation.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/message-actions.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/message-feedback.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/quick-actions.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/components/skill-badge.d.ts +3 -3
- package/esm/src/react/components/chat/chat/components/skill-badge.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/components/skill-badge.js +1 -1
- package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/step-indicator.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/components/tool-ui.d.ts +3 -3
- package/esm/src/react/components/chat/chat/components/tool-ui.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/components/tool-ui.js +1 -1
- package/esm/src/react/components/chat/chat/components/upgrade-cta.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/composition/api.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/api.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/composition/api.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/composition/chat-composer.d.ts +3 -3
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/composition/chat-composer.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/composition/chat-empty.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/composition/chat-empty.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/composition/chat-if.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-if.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/composition/chat-if.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/composition/chat-message-list.d.ts +5 -5
- package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/composition/chat-message-list.js +2 -2
- package/esm/src/react/components/{ai → chat}/chat/composition/chat-root.d.ts +3 -3
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/composition/chat-root.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/composition/error-banner.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/error-banner.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/composition/error-banner.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/composition/message.d.ts +4 -4
- package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/composition/message.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/composition/model-avatar.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/composition/model-avatar.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/contexts/chat-context.d.ts +3 -3
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/contexts/chat-context.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/contexts/composer-context.d.ts +1 -1
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/contexts/composer-context.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/contexts/index.d.ts +1 -1
- package/esm/src/react/components/chat/chat/contexts/index.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/contexts/index.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/contexts/message-context.d.ts +3 -3
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/contexts/message-context.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/contexts/thread-list-context.d.ts +1 -1
- package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/contexts/thread-list-context.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/hooks/use-threads.d.ts +2 -2
- package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/index.d.ts +5 -5
- package/esm/src/react/components/chat/chat/index.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/index.js +1 -1
- package/esm/src/react/components/chat/chat/utils/export.d.ts +10 -0
- package/esm/src/react/components/chat/chat/utils/export.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/utils/export.js +1 -1
- package/esm/src/react/components/{ai → chat}/chat/utils/message-parts.d.ts +10 -10
- package/esm/src/react/components/chat/chat/utils/message-parts.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat/utils/message-parts.js +2 -2
- package/esm/src/react/components/chat/chat-with-sidebar.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat.d.ts +1 -1
- package/esm/src/react/components/chat/chat.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/chat.js +1 -1
- package/esm/src/react/components/chat/csp-nonce.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/error-boundary.d.ts +6 -6
- package/esm/src/react/components/chat/error-boundary.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/error-boundary.js +5 -5
- package/esm/src/react/components/{ai → chat}/icons/index.d.ts +1 -1
- package/esm/src/react/components/chat/icons/index.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/icons/index.js +1 -1
- package/esm/src/react/components/chat/markdown.d.ts.map +1 -0
- package/esm/src/react/components/{ai → chat}/message.d.ts +8 -8
- package/esm/src/react/components/chat/message.d.ts.map +1 -0
- package/esm/src/react/components/chat/model-selector.d.ts.map +1 -0
- package/esm/src/react/components/chat/theme.d.ts.map +1 -0
- package/esm/src/react/primitives/message-list.d.ts +2 -2
- package/esm/src/react/primitives/message-list.d.ts.map +1 -1
- package/esm/src/react/primitives/tool-primitives.d.ts +3 -3
- package/esm/src/react/primitives/tool-primitives.d.ts.map +1 -1
- package/esm/src/{ai/registry-manager.d.ts → registry/project-scoped-registry-manager.d.ts} +5 -4
- package/esm/src/registry/project-scoped-registry-manager.d.ts.map +1 -0
- package/esm/src/{ai/registry-manager.js → registry/project-scoped-registry-manager.js} +5 -4
- package/esm/src/{ai/registry-facade.d.ts → registry/scoped-registry-facade.d.ts} +2 -2
- package/esm/src/registry/scoped-registry-facade.d.ts.map +1 -0
- package/esm/src/rendering/script-page-handling.d.ts.map +1 -1
- package/esm/src/rendering/script-page-handling.js +0 -2
- package/esm/src/resource/registry.d.ts +1 -1
- package/esm/src/resource/registry.d.ts.map +1 -1
- package/esm/src/resource/registry.js +2 -2
- package/esm/src/routing/api/module-loader/loader.js +3 -19
- package/esm/src/runtime/runtime-bridge.d.ts +82 -0
- package/esm/src/runtime/runtime-bridge.d.ts.map +1 -0
- package/esm/src/runtime/runtime-bridge.js +367 -0
- package/esm/src/server/dev-server/file-watch-setup.d.ts +4 -4
- package/esm/src/server/dev-server/file-watch-setup.d.ts.map +1 -1
- package/esm/src/server/dev-server/file-watch-setup.js +14 -14
- package/esm/src/server/dev-server/server.d.ts +2 -2
- package/esm/src/server/dev-server/server.d.ts.map +1 -1
- package/esm/src/server/dev-server/server.js +20 -18
- package/esm/src/server/dev-ui/manifest.d.ts +1 -1
- package/esm/src/server/dev-ui/manifest.js +2 -2
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +58 -61
- package/esm/src/server/handlers/request/api/api-handler-wrapper.js +1 -1
- package/esm/src/server/handlers/request/api/project-discovery.d.ts +1 -1
- package/esm/src/server/handlers/request/api/project-discovery.d.ts.map +1 -1
- package/esm/src/server/handlers/request/api/project-discovery.js +12 -10
- package/esm/src/server/production-server.js +2 -2
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +2 -2
- package/esm/src/skill/registry.d.ts +1 -1
- package/esm/src/skill/registry.d.ts.map +1 -1
- package/esm/src/skill/registry.js +2 -2
- package/esm/src/tool/registry.d.ts +1 -1
- package/esm/src/tool/registry.d.ts.map +1 -1
- package/esm/src/tool/registry.js +2 -2
- package/esm/src/transforms/npm-import-rewrites.d.ts +1 -1
- package/esm/src/transforms/npm-import-rewrites.d.ts.map +1 -1
- package/esm/src/transforms/npm-import-rewrites.js +5 -13
- package/esm/src/utils/constants/server.d.ts +4 -4
- package/esm/src/utils/constants/server.d.ts.map +1 -1
- package/esm/src/utils/constants/server.js +4 -4
- package/esm/src/utils/id.js +1 -1
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/workflow/discovery/workflow-discovery.d.ts +3 -3
- package/esm/src/workflow/discovery/workflow-discovery.d.ts.map +1 -1
- package/esm/src/workflow/discovery/workflow-discovery.js +3 -3
- package/esm/src/workflow/registry.d.ts +1 -1
- package/esm/src/workflow/registry.d.ts.map +1 -1
- package/esm/src/workflow/registry.js +2 -2
- package/package.json +4 -5
- package/src/cli/commands/dev/command.ts +3 -3
- package/src/cli/commands/workflow/command-help.ts +1 -1
- package/src/cli/commands/workflow/command.ts +2 -2
- package/src/cli/shared/config.ts +1 -3
- package/src/deno.js +16 -16
- package/src/src/agent/chat-handler.ts +1 -1
- package/src/src/agent/composition/composition.ts +2 -2
- package/src/src/agent/factory.ts +1 -1
- package/src/src/agent/react/index.ts +11 -9
- package/src/src/agent/react/use-chat/browser-inference/browser-engine.ts +9 -10
- package/src/src/agent/react/use-chat/index.ts +10 -9
- package/src/src/agent/react/use-chat/stream-protocol.ts +1 -0
- package/src/src/agent/react/use-chat/streaming/handler.ts +17 -17
- package/src/src/agent/react/use-chat/streaming/parts-builder.ts +5 -5
- package/src/src/agent/react/use-chat/streaming/types.ts +4 -4
- package/src/src/agent/react/use-chat/types.ts +27 -73
- package/src/src/agent/react/use-chat/use-chat.ts +13 -13
- package/src/src/agent/react/use-chat/utils.ts +2 -2
- package/src/src/agent/runtime/{ai-stream-handler.ts → chat-stream-handler.ts} +100 -96
- package/src/src/agent/runtime/constants.ts +1 -1
- package/src/src/agent/runtime/index.ts +88 -40
- package/src/src/agent/runtime/model-message-converter.ts +22 -33
- package/src/src/agent/runtime/model-runtime-types.ts +55 -0
- package/src/src/agent/runtime/model-tool-converter.ts +29 -26
- package/src/src/agent/runtime/provider-native-tools.ts +61 -0
- package/src/src/agent/runtime/repair-tool-call.ts +6 -9
- package/src/src/agent/runtime/runtime-tool-builder.ts +82 -0
- package/src/src/agent/runtime/runtime-tool-errors.ts +46 -0
- package/src/src/agent/runtime/runtime-tool-types.ts +114 -0
- package/src/src/chat/index.ts +22 -20
- package/src/src/chat/protocol.ts +210 -0
- package/src/src/discovery/import-rewriter.ts +1 -14
- package/src/src/discovery/index.ts +2 -2
- package/src/src/discovery/{config-validator.ts → provider-config-validator.ts} +4 -4
- package/src/src/discovery/transpiler.ts +0 -3
- package/src/src/embedding/embedding.ts +1 -1
- package/src/src/embedding/index.ts +3 -3
- package/src/src/embedding/rag-store.ts +1 -1
- package/src/src/embedding/resolve.ts +15 -12
- package/src/src/embedding/vector-store.ts +1 -1
- package/src/src/embedding/veryfront-cloud/provider.ts +10 -8
- package/src/src/markdown/index.ts +1 -1
- package/src/src/modules/import-map/default-import-map.ts +2 -2
- package/src/src/prompt/registry.ts +2 -2
- package/src/src/provider/index.ts +7 -8
- package/src/src/provider/local/{local-embedding-adapter.ts → embedding-runtime-adapter.ts} +8 -8
- package/src/src/provider/local/{ai-sdk-adapter.ts → model-runtime-adapter.ts} +13 -16
- package/src/src/provider/model-registry.ts +31 -26
- package/src/src/provider/runtime-inspection.ts +25 -0
- package/src/src/provider/runtime-loader.ts +1854 -0
- package/src/src/provider/types.ts +38 -0
- package/src/src/provider/veryfront-cloud/provider.ts +13 -11
- package/src/src/provider/veryfront-cloud/shared.ts +1 -1
- package/src/src/react/components/{ai → chat}/chat/components/inference-badge.tsx +1 -1
- package/src/src/react/components/{ai → chat}/chat/components/skill-badge.tsx +3 -3
- package/src/src/react/components/{ai → chat}/chat/components/tool-ui.tsx +3 -3
- package/src/src/react/components/{ai → chat}/chat/composition/api.tsx +1 -1
- package/src/src/react/components/{ai → chat}/chat/composition/chat-composer.tsx +3 -3
- package/src/src/react/components/{ai → chat}/chat/composition/chat-empty.tsx +1 -1
- package/src/src/react/components/{ai → chat}/chat/composition/chat-if.tsx +1 -1
- package/src/src/react/components/{ai → chat}/chat/composition/chat-message-list.tsx +11 -11
- package/src/src/react/components/{ai → chat}/chat/composition/chat-root.tsx +3 -3
- package/src/src/react/components/{ai → chat}/chat/composition/error-banner.tsx +1 -1
- package/src/src/react/components/{ai → chat}/chat/composition/message.tsx +9 -4
- package/src/src/react/components/{ai → chat}/chat/composition/model-avatar.tsx +1 -1
- package/src/src/react/components/{ai → chat}/chat/contexts/chat-context.tsx +3 -3
- package/src/src/react/components/{ai → chat}/chat/contexts/composer-context.tsx +1 -1
- package/src/src/react/components/{ai → chat}/chat/contexts/index.ts +1 -1
- package/src/src/react/components/{ai → chat}/chat/contexts/message-context.tsx +3 -3
- package/src/src/react/components/{ai → chat}/chat/contexts/thread-list-context.tsx +1 -1
- package/src/src/react/components/{ai → chat}/chat/hooks/use-threads.ts +2 -2
- package/src/src/react/components/{ai → chat}/chat/index.tsx +7 -7
- package/src/src/react/components/{ai → chat}/chat/utils/export.ts +4 -4
- package/src/src/react/components/{ai → chat}/chat/utils/message-parts.ts +13 -13
- package/src/src/react/components/{ai → chat}/chat.tsx +1 -1
- package/src/src/react/components/{ai → chat}/error-boundary.tsx +11 -11
- package/src/src/react/components/{ai → chat}/icons/index.ts +1 -1
- package/src/src/react/components/{ai → chat}/message.tsx +11 -11
- package/src/src/react/primitives/message-list.tsx +2 -2
- package/src/src/react/primitives/tool-primitives.tsx +4 -4
- package/src/src/{ai/registry-manager.ts → registry/project-scoped-registry-manager.ts} +5 -4
- package/src/src/{ai/registry-facade.ts → registry/scoped-registry-facade.ts} +1 -1
- package/src/src/rendering/script-page-handling.ts +0 -2
- package/src/src/resource/registry.ts +2 -2
- package/src/src/routing/api/module-loader/loader.ts +3 -19
- package/src/src/runtime/runtime-bridge.ts +608 -0
- package/src/src/server/dev-server/file-watch-setup.ts +14 -14
- package/src/src/server/dev-server/server.ts +20 -18
- package/src/src/server/dev-ui/manifest.js +2 -2
- package/src/src/server/handlers/dev/framework-candidates.generated.ts +58 -61
- package/src/src/server/handlers/request/api/api-handler-wrapper.ts +1 -1
- package/src/src/server/handlers/request/api/project-discovery.ts +12 -10
- package/src/src/server/production-server.ts +2 -2
- package/src/src/server/services/rsc/endpoints/rsc-bundles.generated.ts +2 -2
- package/src/src/skill/registry.ts +2 -2
- package/src/src/tool/registry.ts +2 -2
- package/src/src/transforms/npm-import-rewrites.ts +5 -13
- package/src/src/utils/constants/server.ts +4 -4
- package/src/src/utils/id.ts +1 -1
- package/src/src/utils/version-constant.ts +1 -1
- package/src/src/workflow/discovery/workflow-discovery.ts +4 -4
- package/src/src/workflow/registry.ts +2 -2
- package/esm/src/agent/ai-defaults.d.ts.map +0 -1
- package/esm/src/agent/runtime/ai-stream-handler.d.ts.map +0 -1
- package/esm/src/ai/registry-facade.d.ts.map +0 -1
- package/esm/src/ai/registry-manager.d.ts.map +0 -1
- package/esm/src/discovery/config-validator.d.ts +0 -14
- package/esm/src/discovery/config-validator.d.ts.map +0 -1
- package/esm/src/provider/local/ai-sdk-adapter.d.ts +0 -19
- package/esm/src/provider/local/ai-sdk-adapter.d.ts.map +0 -1
- package/esm/src/provider/local/local-embedding-adapter.d.ts +0 -19
- package/esm/src/provider/local/local-embedding-adapter.d.ts.map +0 -1
- package/esm/src/react/components/ai/agent-card.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/animations.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/attachment-pill.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/branch-picker.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/code-block.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/drop-zone.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/empty-state.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/inference-badge.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/inline-citation.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/message-actions.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/message-edit-form.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/message-feedback.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/quick-actions.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/reasoning.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/sidebar.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/skill-badge.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/sources.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/step-indicator.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/tab-switcher.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/tool-ui.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/upgrade-cta.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/components/uploads-panel.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/composition/api.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/composition/chat-composer.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/composition/chat-empty.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/composition/chat-if.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/composition/chat-message-list.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/composition/chat-root.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/composition/error-banner.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/composition/message.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/composition/model-avatar.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/contexts/chat-context.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/contexts/composer-context.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/contexts/index.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/contexts/message-context.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/contexts/thread-list-context.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/hooks/use-threads.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/index.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/utils/export.d.ts +0 -10
- package/esm/src/react/components/ai/chat/utils/export.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat/utils/message-parts.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat-with-sidebar.d.ts.map +0 -1
- package/esm/src/react/components/ai/chat.d.ts.map +0 -1
- package/esm/src/react/components/ai/csp-nonce.d.ts.map +0 -1
- package/esm/src/react/components/ai/error-boundary.d.ts.map +0 -1
- package/esm/src/react/components/ai/icons/index.d.ts.map +0 -1
- package/esm/src/react/components/ai/markdown.d.ts.map +0 -1
- package/esm/src/react/components/ai/message.d.ts.map +0 -1
- package/esm/src/react/components/ai/model-selector.d.ts.map +0 -1
- package/esm/src/react/components/ai/theme.d.ts.map +0 -1
- /package/esm/src/agent/{ai-defaults.js → defaults.js} +0 -0
- /package/esm/src/react/components/{ai → chat}/agent-card.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/agent-card.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/animations.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/animations.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/attachment-pill.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/attachment-pill.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/branch-picker.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/branch-picker.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/code-block.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/code-block.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/drop-zone.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/drop-zone.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/empty-state.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/empty-state.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/inference-badge.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/inline-citation.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/inline-citation.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/message-actions.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/message-actions.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/message-edit-form.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/message-edit-form.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/message-feedback.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/message-feedback.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/quick-actions.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/quick-actions.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/reasoning.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/reasoning.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/sidebar.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/sidebar.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/sources.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/sources.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/step-indicator.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/step-indicator.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/tab-switcher.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/tab-switcher.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/upgrade-cta.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/upgrade-cta.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/uploads-panel.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/components/uploads-panel.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat/hooks/use-threads.js +0 -0
- /package/esm/src/react/components/{ai → chat}/chat-with-sidebar.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/chat-with-sidebar.js +0 -0
- /package/esm/src/react/components/{ai → chat}/csp-nonce.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/csp-nonce.js +0 -0
- /package/esm/src/react/components/{ai → chat}/markdown.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/markdown.js +0 -0
- /package/esm/src/react/components/{ai → chat}/message.js +0 -0
- /package/esm/src/react/components/{ai → chat}/model-selector.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/model-selector.js +0 -0
- /package/esm/src/react/components/{ai → chat}/theme.d.ts +0 -0
- /package/esm/src/react/components/{ai → chat}/theme.js +0 -0
- /package/esm/src/{ai/registry-facade.js → registry/scoped-registry-facade.js} +0 -0
- /package/src/src/agent/{ai-defaults.ts → defaults.ts} +0 -0
- /package/src/src/react/components/{ai → chat}/agent-card.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/animations.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/attachment-pill.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/branch-picker.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/code-block.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/drop-zone.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/empty-state.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/inline-citation.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/message-actions.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/message-edit-form.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/message-feedback.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/quick-actions.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/reasoning.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/sidebar.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/sources.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/step-indicator.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/tab-switcher.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/upgrade-cta.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat/components/uploads-panel.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/chat-with-sidebar.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/csp-nonce.ts +0 -0
- /package/src/src/react/components/{ai → chat}/markdown.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/model-selector.tsx +0 -0
- /package/src/src/react/components/{ai → chat}/theme.ts +0 -0
|
@@ -9,7 +9,7 @@ import { runtime } from "../../../src/platform/index.js";
|
|
|
9
9
|
import { getConfig } from "../../../src/config/index.js";
|
|
10
10
|
import { getEnvironmentConfig } from "../../../src/config/index.js";
|
|
11
11
|
import { startDevServer } from "../../../src/server/index.js";
|
|
12
|
-
import {
|
|
12
|
+
import { validateProviderConfig } from "../../../src/discovery/index.js";
|
|
13
13
|
import { yellow } from "../../ui/index.js";
|
|
14
14
|
import { exitProcess, registerTerminationSignals } from "../../utils/index.js";
|
|
15
15
|
import { banner, brand, dim, error as errorColor, success } from "../../ui/index.js";
|
|
@@ -49,8 +49,8 @@ export function devCommand(options) {
|
|
|
49
49
|
const env = getEnvironmentConfig();
|
|
50
50
|
const isProxyMode = config?.fs?.veryfront?.proxyMode === true;
|
|
51
51
|
const projectSlug = config?.fs?.veryfront?.projectSlug ?? env.projectSlug;
|
|
52
|
-
// Validate
|
|
53
|
-
const aiValidation =
|
|
52
|
+
// Validate provider config and print warnings (framework returns plain text, CLI adds colors)
|
|
53
|
+
const aiValidation = validateProviderConfig(config);
|
|
54
54
|
if (aiValidation.warnings.length > 0) {
|
|
55
55
|
console.log("");
|
|
56
56
|
for (const warning of aiValidation.warnings) {
|
|
@@ -75,7 +75,7 @@ export async function workflowCommand(options) {
|
|
|
75
75
|
? `branch ${proxyContext.branchRef}`
|
|
76
76
|
: proxyContext
|
|
77
77
|
? "main"
|
|
78
|
-
: `${dntShim.Deno.cwd()}/
|
|
78
|
+
: `${dntShim.Deno.cwd()}/workflows/...`;
|
|
79
79
|
cliLogger.info(`Discovering workflows in ${sourceLabel}`);
|
|
80
80
|
const discovery = await discoverWorkflows({
|
|
81
81
|
projectDir: dntShim.Deno.cwd(),
|
|
@@ -98,7 +98,7 @@ export async function workflowCommand(options) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
else {
|
|
101
|
-
cliLogger.info("No workflows found. Create a workflow file in
|
|
101
|
+
cliLogger.info("No workflows found. Create a workflow file in workflows/.");
|
|
102
102
|
}
|
|
103
103
|
exitProcess(1);
|
|
104
104
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/cli/shared/config.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/cli/shared/config.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,2BAA2B,CAAC;AAMzF,eAAO,MAAM,qBAAqB;;;;;iBAMhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CA6BxF;AAED,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAatF;AA4ED,eAAO,MAAM,aAAa,gBAJH,MAAM,QAAQ,iBAAiB,KAAG,OAAO,CAAC,cAAc,CAIvB,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,gBAZX,MAAM,QAAQ,iBAAiB,KAAG,OAAO,CAAC,cAAc,CAYhB,CAAC;AAUhE,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAClE,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAClD,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACjD,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACnD,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACrC;AAED,eAAO,MAAM,cAAc;;;;iBAIzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,SAAS,CA8DjE"}
|
package/esm/cli/shared/config.js
CHANGED
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
import * as dntShim from "../../_dnt.shims.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { join } from "../../src/platform/compat/path/index.js";
|
|
10
|
-
import { cwd } from "../../src/platform/index.js";
|
|
11
|
-
import { createFileSystem } from "../../src/platform/index.js";
|
|
12
|
-
import { getEnv } from "../../src/platform/compat/process.js";
|
|
10
|
+
import { createFileSystem, cwd, getEnv } from "../../src/platform/index.js";
|
|
13
11
|
import { getEnvironmentConfig } from "../../src/config/index.js";
|
|
14
12
|
import { cliLogger } from "../utils/index.js";
|
|
15
13
|
import { readToken } from "../auth/token-store.js";
|
package/esm/deno.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ declare namespace _default {
|
|
|
11
11
|
"./context": string;
|
|
12
12
|
"./fonts": string;
|
|
13
13
|
"./chat": string;
|
|
14
|
+
"./chat/protocol": string;
|
|
14
15
|
"./markdown": string;
|
|
15
16
|
"./mdx": string;
|
|
16
17
|
"./agent": string;
|
|
@@ -40,6 +41,7 @@ declare namespace _default {
|
|
|
40
41
|
"veryfront/context": string;
|
|
41
42
|
"veryfront/fonts": string;
|
|
42
43
|
"veryfront/chat": string;
|
|
44
|
+
"veryfront/chat/protocol": string;
|
|
43
45
|
"veryfront/markdown": string;
|
|
44
46
|
"veryfront/mdx": string;
|
|
45
47
|
"veryfront/fs": string;
|
|
@@ -48,8 +50,8 @@ declare namespace _default {
|
|
|
48
50
|
"veryfront/react/router": string;
|
|
49
51
|
"veryfront/react/context": string;
|
|
50
52
|
"veryfront/react/fonts": string;
|
|
51
|
-
"veryfront/react/components/
|
|
52
|
-
"veryfront/components/
|
|
53
|
+
"veryfront/react/components/chat": string;
|
|
54
|
+
"veryfront/components/chat": string;
|
|
53
55
|
"veryfront/sandbox": string;
|
|
54
56
|
"veryfront/embedding": string;
|
|
55
57
|
"veryfront/jobs": string;
|
|
@@ -99,6 +101,7 @@ declare namespace _default {
|
|
|
99
101
|
"#veryfront": string;
|
|
100
102
|
"#veryfront/agent": string;
|
|
101
103
|
"#veryfront/agent/react": string;
|
|
104
|
+
"#veryfront/chat/protocol": string;
|
|
102
105
|
"#veryfront/build": string;
|
|
103
106
|
"#veryfront/cache": string;
|
|
104
107
|
"#cli/shared/args": string;
|
|
@@ -238,15 +241,6 @@ declare namespace _default {
|
|
|
238
241
|
unist: string;
|
|
239
242
|
unified: string;
|
|
240
243
|
vfile: string;
|
|
241
|
-
ai: string;
|
|
242
|
-
"ai/react": string;
|
|
243
|
-
"@ai-sdk/react": string;
|
|
244
|
-
"@ai-sdk/openai": string;
|
|
245
|
-
"@ai-sdk/anthropic": string;
|
|
246
|
-
"@ai-sdk/google": string;
|
|
247
|
-
"@ai-sdk/mistral": string;
|
|
248
|
-
"@ai-sdk/provider": string;
|
|
249
|
-
"@ai-sdk/provider-utils": string;
|
|
250
244
|
tailwindcss: string;
|
|
251
245
|
"tailwindcss/plugin": string;
|
|
252
246
|
"tailwindcss/defaultTheme": string;
|
package/esm/deno.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.150",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"nodeModulesDir": "auto",
|
|
6
6
|
"exclude": [
|
|
@@ -21,6 +21,7 @@ export default {
|
|
|
21
21
|
"./context": "./src/react/context/index.tsx",
|
|
22
22
|
"./fonts": "./src/react/fonts/index.ts",
|
|
23
23
|
"./chat": "./src/chat/index.ts",
|
|
24
|
+
"./chat/protocol": "./src/chat/protocol.ts",
|
|
24
25
|
"./markdown": "./src/markdown/index.ts",
|
|
25
26
|
"./mdx": "./src/mdx/index.ts",
|
|
26
27
|
"./agent": "./src/agent/index.ts",
|
|
@@ -50,6 +51,7 @@ export default {
|
|
|
50
51
|
"veryfront/context": "./src/react/runtime/core.ts",
|
|
51
52
|
"veryfront/fonts": "./src/react/fonts/index.ts",
|
|
52
53
|
"veryfront/chat": "./src/chat/index.ts",
|
|
54
|
+
"veryfront/chat/protocol": "./src/chat/protocol.ts",
|
|
53
55
|
"veryfront/markdown": "./src/markdown/index.ts",
|
|
54
56
|
"veryfront/mdx": "./src/mdx/index.ts",
|
|
55
57
|
"veryfront/fs": "./src/fs/index.ts",
|
|
@@ -58,8 +60,8 @@ export default {
|
|
|
58
60
|
"veryfront/react/router": "./src/react/runtime/core.ts",
|
|
59
61
|
"veryfront/react/context": "./src/react/runtime/core.ts",
|
|
60
62
|
"veryfront/react/fonts": "./src/react/fonts/index.ts",
|
|
61
|
-
"veryfront/react/components/
|
|
62
|
-
"veryfront/components/
|
|
63
|
+
"veryfront/react/components/chat": "./src/react/components/chat/index.ts",
|
|
64
|
+
"veryfront/components/chat": "./src/react/components/chat/index.ts",
|
|
63
65
|
"veryfront/sandbox": "./src/sandbox/index.ts",
|
|
64
66
|
"veryfront/embedding": "./src/embedding/index.ts",
|
|
65
67
|
"veryfront/jobs": "./src/jobs/index.ts",
|
|
@@ -109,6 +111,7 @@ export default {
|
|
|
109
111
|
"#veryfront": "./src/index.ts",
|
|
110
112
|
"#veryfront/agent": "./src/agent/index.ts",
|
|
111
113
|
"#veryfront/agent/react": "./src/agent/react/index.ts",
|
|
114
|
+
"#veryfront/chat/protocol": "./src/chat/protocol.ts",
|
|
112
115
|
"#veryfront/build": "./src/build/index.ts",
|
|
113
116
|
"#veryfront/cache": "./src/cache/index.ts",
|
|
114
117
|
"#cli/shared/args": "./cli/shared/args.ts",
|
|
@@ -248,15 +251,6 @@ export default {
|
|
|
248
251
|
"unist": "npm:@types/unist@3.0.2",
|
|
249
252
|
"unified": "npm:unified@11.0.5",
|
|
250
253
|
"vfile": "npm:vfile@6.0.3",
|
|
251
|
-
"ai": "npm:ai@6.0.134",
|
|
252
|
-
"ai/react": "npm:@ai-sdk/react@3.0.136",
|
|
253
|
-
"@ai-sdk/react": "npm:@ai-sdk/react@3.0.136",
|
|
254
|
-
"@ai-sdk/openai": "npm:@ai-sdk/openai@3.0.47",
|
|
255
|
-
"@ai-sdk/anthropic": "npm:@ai-sdk/anthropic@3.0.63",
|
|
256
|
-
"@ai-sdk/google": "npm:@ai-sdk/google@3.0.52",
|
|
257
|
-
"@ai-sdk/mistral": "npm:@ai-sdk/mistral@3.0.14",
|
|
258
|
-
"@ai-sdk/provider": "npm:@ai-sdk/provider@3.0.2",
|
|
259
|
-
"@ai-sdk/provider-utils": "npm:@ai-sdk/provider-utils@4.0.5",
|
|
260
254
|
"tailwindcss": "https://esm.sh/tailwindcss@4.2.2",
|
|
261
255
|
"tailwindcss/plugin": "https://esm.sh/tailwindcss@4.2.2/plugin",
|
|
262
256
|
"tailwindcss/defaultTheme": "https://esm.sh/tailwindcss@4.2.2/defaultTheme",
|
|
@@ -311,12 +305,12 @@ export default {
|
|
|
311
305
|
"build:npm": "deno run -A scripts/build/generate-integrations-module.ts && deno task generate && deno run -A scripts/build/build-npm-dnt.ts",
|
|
312
306
|
"release": "deno run -A scripts/release.ts",
|
|
313
307
|
"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",
|
|
314
|
-
"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/
|
|
308
|
+
"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/workflow/__tests__' --unstable-worker-options --unstable-net $(find src cli -name '*.test.ts' ! -name '*.integration.test.ts')",
|
|
315
309
|
"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",
|
|
316
310
|
"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')",
|
|
317
311
|
"test:record": "VCR=record deno test --no-check --allow-all $(find cli -name '*.integration.test.ts' -path '*/commands/*')",
|
|
318
312
|
"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",
|
|
319
|
-
"test:coverage:unit": "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,src/
|
|
313
|
+
"test:coverage:unit": "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,src/workflow/__tests__' --unstable-worker-options --unstable-net $(find src cli -name '*.test.ts' ! -name '*.integration.test.ts') || exit 1",
|
|
320
314
|
"test:coverage:integration": "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/e2e,tests/integration/compiled-binary-e2e.test.ts' tests --unstable-worker-options --unstable-net || exit 1",
|
|
321
315
|
"coverage:report": "deno coverage coverage --include=src/ --exclude=tests --exclude=src/**/*_test.ts --exclude=src/**/*_test.tsx --exclude=src/**/*.test.ts --exclude=src/**/*.test.tsx --lcov > coverage/lcov.info && deno run --allow-read scripts/lint/check-coverage.ts 80",
|
|
322
316
|
"coverage:html": "deno coverage coverage --include=src/ --exclude=tests --exclude=src/**/*_test.ts --exclude=src/**/*_test.tsx --exclude=src/**/*.test.ts --exclude=src/**/*.test.tsx --html",
|
|
@@ -424,7 +418,13 @@ export default {
|
|
|
424
418
|
"proseWrap": "preserve"
|
|
425
419
|
},
|
|
426
420
|
"allowScripts": {
|
|
427
|
-
"allow": [
|
|
428
|
-
|
|
421
|
+
"allow": [
|
|
422
|
+
"npm:sharp@0.33.5",
|
|
423
|
+
"npm:onnxruntime-node@1.21.0"
|
|
424
|
+
],
|
|
425
|
+
"deny": [
|
|
426
|
+
"npm:esbuild@0.27.4",
|
|
427
|
+
"npm:protobufjs@7.5.4"
|
|
428
|
+
]
|
|
429
429
|
}
|
|
430
430
|
};
|
|
@@ -10,7 +10,7 @@ const MAX_TEXT_PART_LENGTH = 10_000;
|
|
|
10
10
|
/** Maximum number of messages in a single chat request */
|
|
11
11
|
const MAX_MESSAGES_PER_REQUEST = 100;
|
|
12
12
|
// ---------------------------------------------------------------------------
|
|
13
|
-
// Zod schemas for validating
|
|
13
|
+
// Zod schemas for validating parts-based chat UI messages
|
|
14
14
|
// ---------------------------------------------------------------------------
|
|
15
15
|
const textPartSchema = z.object({
|
|
16
16
|
type: z.literal("text"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Agent } from "../types.js";
|
|
2
2
|
import type { Tool } from "../../tool/index.js";
|
|
3
|
-
import { ScopedRegistryFacade } from "../../
|
|
3
|
+
import { ScopedRegistryFacade } from "../../registry/scoped-registry-facade.js";
|
|
4
4
|
export declare function agentAsTool(agent: Agent, description: string): Tool;
|
|
5
5
|
export interface WorkflowStep {
|
|
6
6
|
agent: Agent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/composition/composition.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/composition/composition.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAIhF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CA2BnE;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACzE;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,cAAc,GACrB;IAAE,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;CAAE,CAsDrD;AAID,cAAM,kBAAmB,SAAQ,oBAAoB,CAAC,KAAK,CAAC;CAAG;AAG/D,eAAO,MAAM,aAAa,oBAAuC,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAE5D;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAEtD;AAED,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAqBD,wBAAgB,gBAAgB,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAQ5F"}
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import * as dntShim from "../../../_dnt.shims.js";
|
|
10
10
|
import { setActiveSpanAttributes, withSpan } from "../../observability/tracing/otlp-setup.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { ScopedRegistryFacade } from "../../registry/scoped-registry-facade.js";
|
|
12
|
+
import { ProjectScopedRegistryManager } from "../../registry/project-scoped-registry-manager.js";
|
|
13
13
|
import { AgentToolInputSchema } from "../schemas/index.js";
|
|
14
14
|
export function agentAsTool(agent, description) {
|
|
15
15
|
return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/src/agent/defaults.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC"}
|
package/esm/src/agent/factory.js
CHANGED
|
@@ -87,7 +87,7 @@ export function agent(config) {
|
|
|
87
87
|
? await originalSystem()
|
|
88
88
|
: originalSystem;
|
|
89
89
|
if (!currentSkills.size)
|
|
90
|
-
return basePrompt ?? "You are a helpful
|
|
90
|
+
return basePrompt ?? "You are a helpful assistant.";
|
|
91
91
|
return `${basePrompt}\n\n${buildSkillManifestPrompt(currentSkills)}`;
|
|
92
92
|
}
|
|
93
93
|
: originalSystem;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @module agent/react
|
|
5
5
|
*/
|
|
6
6
|
export { useChat } from "./use-chat/index.js";
|
|
7
|
-
export type { BranchInfo, BrowserInferenceStatus,
|
|
7
|
+
export type { BranchInfo, BrowserInferenceStatus, ChatDynamicToolPart, ChatFinishReason, ChatMessage, ChatMessagePart, ChatReasoningPart, ChatStepPart, ChatStreamEvent, ChatTextPart, ChatToolPart, ChatToolResultPart, ChatToolState, InferenceMode, OnToolCallArg, ToolOutput, UseChatOptions, UseChatResult, } from "./use-chat/index.js";
|
|
8
8
|
export { useAgent } from "./use-agent.js";
|
|
9
9
|
export type { UseAgentOptions, UseAgentResult } from "./use-agent.js";
|
|
10
10
|
export { useCompletion } from "./use-completion.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/react/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,YAAY,EACV,UAAU,EACV,sBAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/react/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,YAAY,EACV,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,cAAc,EACd,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bridge between BrowserInferenceClient (Worker) and useChat's streaming interface.
|
|
3
3
|
*
|
|
4
|
-
* Converts
|
|
4
|
+
* Converts ChatMessage[] to simple {role, content}[] for the Worker,
|
|
5
5
|
* and synthesizes the same streaming updates that handleStreamingResponse produces.
|
|
6
6
|
*/
|
|
7
|
-
import type { BrowserInferenceStatus } from "../types.js";
|
|
8
|
-
import type { UIMessage, UIMessagePart } from "../types.js";
|
|
7
|
+
import type { BrowserInferenceStatus, ChatMessage, ChatMessagePart } from "../types.js";
|
|
9
8
|
interface BrowserInferenceCallbacks {
|
|
10
|
-
onUpdate: (parts:
|
|
11
|
-
onMessage: (message:
|
|
9
|
+
onUpdate: (parts: ChatMessagePart[], messageId: string) => void;
|
|
10
|
+
onMessage: (message: ChatMessage) => void;
|
|
12
11
|
onStatusChange: (status: BrowserInferenceStatus) => void;
|
|
13
12
|
onDownloadProgress?: (progress: number) => void;
|
|
14
13
|
onError: (error: Error) => void;
|
|
15
14
|
}
|
|
16
|
-
export declare function runBrowserInference(messages:
|
|
15
|
+
export declare function runBrowserInference(messages: ChatMessage[], systemPrompt: string, callbacks: BrowserInferenceCallbacks): void;
|
|
17
16
|
export declare function stopBrowserInference(): void;
|
|
18
17
|
export {};
|
|
19
18
|
//# sourceMappingURL=browser-engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-engine.d.ts","sourceRoot":"","sources":["../../../../../../src/src/agent/react/use-chat/browser-inference/browser-engine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"browser-engine.d.ts","sourceRoot":"","sources":["../../../../../../src/src/agent/react/use-chat/browser-inference/browser-engine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AASxF,UAAU,yBAAyB;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAChE,SAAS,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAC1C,cAAc,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACzD,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACjC;AAeD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,WAAW,EAAE,EACvB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,yBAAyB,GACnC,IAAI,CA2CN;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bridge between BrowserInferenceClient (Worker) and useChat's streaming interface.
|
|
3
3
|
*
|
|
4
|
-
* Converts
|
|
4
|
+
* Converts ChatMessage[] to simple {role, content}[] for the Worker,
|
|
5
5
|
* and synthesizes the same streaming updates that handleStreamingResponse produces.
|
|
6
6
|
*/
|
|
7
7
|
import { generateClientId } from "../utils.js";
|
|
@@ -5,5 +5,6 @@
|
|
|
5
5
|
* Build any interface you want.
|
|
6
6
|
*/
|
|
7
7
|
export { useChat } from "./use-chat.js";
|
|
8
|
-
export type { BranchInfo, BrowserInferenceStatus,
|
|
8
|
+
export type { BranchInfo, BrowserInferenceStatus, ChatDynamicToolPart, ChatMessage, ChatMessagePart, ChatReasoningPart, ChatStepPart, ChatTextPart, ChatToolPart, ChatToolResultPart, ChatToolState, InferenceMode, OnToolCallArg, ToolOutput, UseChatOptions, UseChatResult, } from "./types.js";
|
|
9
|
+
export type { ChatFinishReason, ChatStreamEvent } from "./stream-protocol.js";
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EACV,UAAU,EACV,sBAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EACV,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,cAAc,EACd,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-protocol.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/stream-protocol.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChatMessagePart } from "../types.js";
|
|
2
2
|
import type { OrderedReasoning, OrderedStep, OrderedToolCall, TextBlock } from "./types.js";
|
|
3
|
-
export declare function buildCurrentParts(textBlocks: Map<string, TextBlock>, reasoningBlocks: Map<string, OrderedReasoning>, toolCalls: Map<string, OrderedToolCall>, steps?: Map<number, OrderedStep>):
|
|
3
|
+
export declare function buildCurrentParts(textBlocks: Map<string, TextBlock>, reasoningBlocks: Map<string, OrderedReasoning>, toolCalls: Map<string, OrderedToolCall>, steps?: Map<number, OrderedStep>): ChatMessagePart[];
|
|
4
4
|
//# sourceMappingURL=parts-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parts-builder.d.ts","sourceRoot":"","sources":["../../../../../../src/src/agent/react/use-chat/streaming/parts-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"parts-builder.d.ts","sourceRoot":"","sources":["../../../../../../src/src/agent/react/use-chat/streaming/parts-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAO5F,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,EAClC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC9C,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,EACvC,KAAK,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,GAC/B,eAAe,EAAE,CAUnB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChatMessage, ChatMessagePart, ChatToolState, OnToolCallArg } from "../types.js";
|
|
2
2
|
export interface StreamingCallbacks {
|
|
3
|
-
onMessage: (message:
|
|
3
|
+
onMessage: (message: ChatMessage) => void;
|
|
4
4
|
onData: (data: unknown) => void;
|
|
5
|
-
onUpdate?: (parts:
|
|
5
|
+
onUpdate?: (parts: ChatMessagePart[], messageId: string) => void;
|
|
6
6
|
onToolCall?: (arg: OnToolCallArg) => void;
|
|
7
7
|
}
|
|
8
8
|
export interface StreamingToolCall {
|
|
@@ -12,7 +12,7 @@ export interface StreamingToolCall {
|
|
|
12
12
|
input?: unknown;
|
|
13
13
|
output?: unknown;
|
|
14
14
|
error?: string;
|
|
15
|
-
state:
|
|
15
|
+
state: ChatToolState;
|
|
16
16
|
/** Whether this is a dynamic tool (MCP, user-defined, etc.) */
|
|
17
17
|
dynamic?: boolean;
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/src/agent/react/use-chat/streaming/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/src/agent/react/use-chat/streaming/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE9F,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAC1C,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,aAAa,CAAC;IACrB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -1,57 +1,10 @@
|
|
|
1
1
|
import * as dntShim from "../../../../_dnt.shims.js";
|
|
2
|
-
type
|
|
2
|
+
import type { ChatDynamicToolPart, ChatMessage, ChatMessagePart, ChatReasoningPart, ChatStepPart, ChatTextPart, ChatToolPart, ChatToolResultPart, ChatToolState } from "../../../chat/protocol.js";
|
|
3
3
|
/** Where inference is happening */
|
|
4
4
|
export type InferenceMode = "cloud" | "server-local" | "browser";
|
|
5
5
|
/** Browser-side model loading and inference status */
|
|
6
6
|
export type BrowserInferenceStatus = "idle" | "loading-runtime" | "downloading-model" | "ready" | "generating" | "error";
|
|
7
|
-
export
|
|
8
|
-
type: "text";
|
|
9
|
-
text: string;
|
|
10
|
-
state?: StreamState;
|
|
11
|
-
}
|
|
12
|
-
export interface ReasoningUIPart {
|
|
13
|
-
type: "reasoning";
|
|
14
|
-
text: string;
|
|
15
|
-
state?: StreamState;
|
|
16
|
-
}
|
|
17
|
-
export type ToolState = "input-streaming" | "input-available" | "output-streaming" | "output-available" | "output-error";
|
|
18
|
-
export interface ToolUIPart<NAME extends string = string, INPUT = unknown, OUTPUT = unknown> {
|
|
19
|
-
type: `tool-${NAME}`;
|
|
20
|
-
toolCallId: string;
|
|
21
|
-
toolName: NAME;
|
|
22
|
-
state: ToolState;
|
|
23
|
-
input?: INPUT;
|
|
24
|
-
output?: OUTPUT;
|
|
25
|
-
errorText?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface ToolResultUIPart<RESULT = unknown> {
|
|
28
|
-
type: "tool-result";
|
|
29
|
-
toolCallId: string;
|
|
30
|
-
toolName: string;
|
|
31
|
-
result: RESULT;
|
|
32
|
-
isError?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export interface DynamicToolUIPart {
|
|
35
|
-
type: "dynamic-tool";
|
|
36
|
-
toolCallId: string;
|
|
37
|
-
toolName: string;
|
|
38
|
-
state: ToolState;
|
|
39
|
-
input?: unknown;
|
|
40
|
-
output?: unknown;
|
|
41
|
-
errorText?: string;
|
|
42
|
-
}
|
|
43
|
-
export interface StepUIPart {
|
|
44
|
-
type: "step-start" | "step-end";
|
|
45
|
-
stepIndex: number;
|
|
46
|
-
}
|
|
47
|
-
export type UIMessagePart = TextUIPart | ReasoningUIPart | ToolUIPart | ToolResultUIPart | DynamicToolUIPart | StepUIPart;
|
|
48
|
-
export interface UIMessage {
|
|
49
|
-
id: string;
|
|
50
|
-
role: "system" | "user" | "assistant";
|
|
51
|
-
parts: UIMessagePart[];
|
|
52
|
-
metadata?: Record<string, unknown>;
|
|
53
|
-
createdAt?: Date | string;
|
|
54
|
-
}
|
|
7
|
+
export type { ChatDynamicToolPart, ChatMessage, ChatMessagePart, ChatReasoningPart, ChatStepPart, ChatTextPart, ChatToolPart, ChatToolResultPart, ChatToolState, };
|
|
55
8
|
type ToolOutputState = "output-available" | "output-error";
|
|
56
9
|
export interface ToolOutput {
|
|
57
10
|
tool: string;
|
|
@@ -70,7 +23,7 @@ export interface OnToolCallArg {
|
|
|
70
23
|
}
|
|
71
24
|
export interface UseChatOptions {
|
|
72
25
|
api: string;
|
|
73
|
-
initialMessages?:
|
|
26
|
+
initialMessages?: ChatMessage[];
|
|
74
27
|
body?: Record<string, unknown>;
|
|
75
28
|
headers?: Record<string, string>;
|
|
76
29
|
credentials?: RequestCredentials;
|
|
@@ -78,10 +31,10 @@ export interface UseChatOptions {
|
|
|
78
31
|
model?: string;
|
|
79
32
|
/** System prompt for browser-side inference (server uses agent config) */
|
|
80
33
|
systemPrompt?: string;
|
|
81
|
-
/** Enable/disable browser fallback when server can't provide
|
|
34
|
+
/** Enable/disable browser fallback when server can't provide a runtime. Default: true */
|
|
82
35
|
browserFallback?: boolean;
|
|
83
36
|
onResponse?: (response: dntShim.Response) => void;
|
|
84
|
-
onFinish?: (message:
|
|
37
|
+
onFinish?: (message: ChatMessage) => void;
|
|
85
38
|
onError?: (error: Error) => void;
|
|
86
39
|
onToolCall?: (arg: OnToolCallArg) => void | Promise<void>;
|
|
87
40
|
}
|
|
@@ -90,7 +43,7 @@ export interface BranchInfo {
|
|
|
90
43
|
total: number;
|
|
91
44
|
}
|
|
92
45
|
export interface UseChatResult {
|
|
93
|
-
messages:
|
|
46
|
+
messages: ChatMessage[];
|
|
94
47
|
input: string;
|
|
95
48
|
isLoading: boolean;
|
|
96
49
|
error: Error | null;
|
|
@@ -116,7 +69,7 @@ export interface UseChatResult {
|
|
|
116
69
|
switchBranch: (messageId: string, branchIndex: number) => void;
|
|
117
70
|
reload: () => Promise<void>;
|
|
118
71
|
stop: () => void;
|
|
119
|
-
setMessages: (messages:
|
|
72
|
+
setMessages: (messages: ChatMessage[]) => void;
|
|
120
73
|
addToolOutput: (output: ToolOutput) => void;
|
|
121
74
|
data?: unknown;
|
|
122
75
|
handleInputChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
@@ -128,5 +81,4 @@ export interface UseChatResult {
|
|
|
128
81
|
/** Alias for `setModel` — matches `ChatProps.onModelChange` for easy spreading */
|
|
129
82
|
onModelChange: (model: string | undefined) => void;
|
|
130
83
|
}
|
|
131
|
-
export {};
|
|
132
84
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAC;AACrD,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAC;AACrD,OAAO,KAAK,EACV,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACd,MAAM,2BAA2B,CAAC;AAEnC,mCAAmC;AACnC,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,cAAc,GAAG,SAAS,CAAC;AAEjE,sDAAsD;AACtD,MAAM,MAAM,sBAAsB,GAC9B,MAAM,GACN,iBAAiB,GACjB,mBAAmB,GACnB,OAAO,GACP,YAAY,GACZ,OAAO,CAAC;AAEZ,YAAY,EACV,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,aAAa,GACd,CAAC;AAEF,KAAK,eAAe,GAAG,kBAAkB,GAAG,cAAc,CAAC;AAE3D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,OAAO,CAAC;QACf,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,CAAC,EAAE,WAAW,EAAE,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,+FAA+F;IAC/F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yFAAyF;IACzF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3D;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,6DAA6D;IAC7D,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,iGAAiG;IACjG,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,6CAA6C;IAC7C,aAAa,EAAE,aAAa,CAAC;IAC7B,yFAAyF;IACzF,aAAa,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC7C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,+CAA+C;IAC/C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC9C,WAAW,EAAE,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,yEAAyE;IACzE,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,yFAAyF;IACzF,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,UAAU,CAAC;IAC/C,sDAAsD;IACtD,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,WAAW,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IAC/C,aAAa,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC1F,YAAY,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,sFAAsF;IACtF,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACjF,iFAAiF;IACjF,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,kFAAkF;IAClF,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACpD"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChatMessage, UseChatOptions, UseChatResult } from "./types.js";
|
|
2
2
|
/** A snapshot of messages from a branch point onward */
|
|
3
3
|
interface Branch {
|
|
4
|
-
messages:
|
|
4
|
+
messages: ChatMessage[];
|
|
5
5
|
}
|
|
6
6
|
/** Tracks branches keyed by the message ID where the edit occurred */
|
|
7
7
|
interface BranchState {
|
|
8
8
|
branches: Branch[];
|
|
9
9
|
currentIndex: number;
|
|
10
|
-
baseMessages:
|
|
10
|
+
baseMessages: ChatMessage[];
|
|
11
11
|
}
|
|
12
12
|
export declare function isLatestRequest(activeRequestId: number, requestId: number): boolean;
|
|
13
13
|
export declare function resolveBranchKey(messageId: string, branchMap: Map<string, BranchState>, branchKeyByMessageId: Map<string, string>): string | undefined;
|
|
14
|
-
export declare function findBranchUserMessageIndex(messages:
|
|
14
|
+
export declare function findBranchUserMessageIndex(messages: ChatMessage[], branchKey: string, branchKeyByMessageId: Map<string, string>): number;
|
|
15
15
|
/**
|
|
16
16
|
* useChat hook for managing chat state with veryfront stream events.
|
|
17
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-chat.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/use-chat.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"use-chat.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/use-chat.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAGV,WAAW,EAIX,cAAc,EACd,aAAa,EACd,MAAM,YAAY,CAAC;AAGpB,wDAAwD;AACxD,UAAU,MAAM;IACd,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB;AAED,sEAAsE;AACtE,UAAU,WAAW;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B;AAED,wBAAgB,eAAe,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAEnF;AAED,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EACnC,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACxC,MAAM,GAAG,SAAS,CAGpB;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,WAAW,EAAE,EACvB,SAAS,EAAE,MAAM,EACjB,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACxC,MAAM,CAIR;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,aAAa,CA4f9D"}
|
|
@@ -48,7 +48,7 @@ export function useChat(options) {
|
|
|
48
48
|
const branchMapRef = useRef(new Map());
|
|
49
49
|
const branchKeyByMessageIdRef = useRef(new Map());
|
|
50
50
|
// System prompt for browser fallback (from 503 response or options)
|
|
51
|
-
const systemPromptRef = useRef(options.systemPrompt ?? "You are a helpful
|
|
51
|
+
const systemPromptRef = useRef(options.systemPrompt ?? "You are a helpful assistant.");
|
|
52
52
|
// Track pending tool outputs for addToolOutput
|
|
53
53
|
const pendingToolOutputsRef = useRef(new Map());
|
|
54
54
|
// Abort in-flight request on unmount
|
|
@@ -181,7 +181,7 @@ export function useChat(options) {
|
|
|
181
181
|
}),
|
|
182
182
|
signal: abortController.signal,
|
|
183
183
|
});
|
|
184
|
-
// Handle 503 — server can't provide
|
|
184
|
+
// Handle 503 — server can't provide a runtime, fall back to browser
|
|
185
185
|
if (response.status === 503 && (options.browserFallback ?? true)) {
|
|
186
186
|
try {
|
|
187
187
|
const body = await response.json();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChatMessage, ChatMessagePart } from "./types.js";
|
|
2
2
|
export declare function generateClientId(prefix: string): string;
|
|
3
|
-
export declare function createAssistantMessage(messageId: string, parts:
|
|
3
|
+
export declare function createAssistantMessage(messageId: string, parts: ChatMessagePart[]): ChatMessage;
|
|
4
4
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/react/use-chat/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE/D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,WAAW,CAM/F"}
|