veryfront 0.1.149 → 0.1.151
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/ag-ui-handler.d.ts.map +1 -1
- package/esm/src/agent/ag-ui-handler.js +6 -0
- 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/internal-agents/ag-ui-sse.d.ts.map +1 -1
- package/esm/src/internal-agents/ag-ui-sse.js +12 -0
- 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/ag-ui-handler.ts +6 -0
- 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/internal-agents/ag-ui-sse.ts +12 -0
- 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
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Model Message Converter
|
|
3
3
|
*
|
|
4
|
-
* Converts between veryfront's internal Message format and
|
|
5
|
-
*
|
|
4
|
+
* Converts between veryfront's internal Message format and the current
|
|
5
|
+
* model-runtime message format.
|
|
6
6
|
*
|
|
7
7
|
* @module ai/agent/runtime/model-message-converter
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type {
|
|
10
|
+
import type {
|
|
11
|
+
ModelRuntimeAssistantMessage,
|
|
12
|
+
ModelRuntimeMessage,
|
|
13
|
+
ModelRuntimeTextPart,
|
|
14
|
+
ModelRuntimeToolCallPart,
|
|
15
|
+
ModelRuntimeToolMessage,
|
|
16
|
+
} from "./model-runtime-types.js";
|
|
11
17
|
import {
|
|
12
18
|
getTextFromParts,
|
|
13
19
|
getToolArguments,
|
|
@@ -16,24 +22,10 @@ import {
|
|
|
16
22
|
type ToolResultPart,
|
|
17
23
|
} from "../types.js";
|
|
18
24
|
|
|
19
|
-
interface TextContent {
|
|
20
|
-
type: "text";
|
|
21
|
-
text: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
interface ToolCallContent {
|
|
25
|
-
type: "tool-call";
|
|
26
|
-
toolCallId: string;
|
|
27
|
-
toolName: string;
|
|
28
|
-
input: Record<string, unknown>;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
type AssistantContent = TextContent | ToolCallContent;
|
|
32
|
-
|
|
33
25
|
/**
|
|
34
|
-
* Convert a veryfront Message to
|
|
26
|
+
* Convert a veryfront Message to the current model-runtime message format.
|
|
35
27
|
*/
|
|
36
|
-
export function convertToModelMessage(msg: Message):
|
|
28
|
+
export function convertToModelMessage(msg: Message): ModelRuntimeMessage {
|
|
37
29
|
switch (msg.role) {
|
|
38
30
|
case "system": {
|
|
39
31
|
const text = getTextFromParts(msg.parts);
|
|
@@ -46,7 +38,7 @@ export function convertToModelMessage(msg: Message): ModelMessage {
|
|
|
46
38
|
}
|
|
47
39
|
|
|
48
40
|
case "assistant": {
|
|
49
|
-
const content:
|
|
41
|
+
const content: Array<ModelRuntimeTextPart | ModelRuntimeToolCallPart> = [];
|
|
50
42
|
|
|
51
43
|
for (const part of msg.parts) {
|
|
52
44
|
if (part.type === "text" && "text" in part) {
|
|
@@ -74,16 +66,12 @@ export function convertToModelMessage(msg: Message): ModelMessage {
|
|
|
74
66
|
content.push({ type: "text", text: "" });
|
|
75
67
|
}
|
|
76
68
|
|
|
77
|
-
|
|
69
|
+
const assistantMessage: ModelRuntimeAssistantMessage = { role: "assistant", content };
|
|
70
|
+
return assistantMessage;
|
|
78
71
|
}
|
|
79
72
|
|
|
80
73
|
case "tool": {
|
|
81
|
-
const content:
|
|
82
|
-
type: "tool-result";
|
|
83
|
-
toolCallId: string;
|
|
84
|
-
toolName: string;
|
|
85
|
-
output: { type: "json"; value: unknown };
|
|
86
|
-
}> = [];
|
|
74
|
+
const content: ModelRuntimeToolMessage["content"] = [];
|
|
87
75
|
|
|
88
76
|
for (const part of msg.parts) {
|
|
89
77
|
if (part.type !== "tool-result") continue;
|
|
@@ -97,7 +85,8 @@ export function convertToModelMessage(msg: Message): ModelMessage {
|
|
|
97
85
|
});
|
|
98
86
|
}
|
|
99
87
|
|
|
100
|
-
|
|
88
|
+
const toolMessage: ModelRuntimeToolMessage = { role: "tool", content };
|
|
89
|
+
return toolMessage;
|
|
101
90
|
}
|
|
102
91
|
|
|
103
92
|
default: {
|
|
@@ -110,7 +99,7 @@ export function convertToModelMessage(msg: Message): ModelMessage {
|
|
|
110
99
|
|
|
111
100
|
function convertToolResultPart(
|
|
112
101
|
part: ToolResultPart,
|
|
113
|
-
):
|
|
102
|
+
): ModelRuntimeToolMessage {
|
|
114
103
|
return {
|
|
115
104
|
role: "tool",
|
|
116
105
|
content: [{
|
|
@@ -119,14 +108,14 @@ function convertToolResultPart(
|
|
|
119
108
|
toolName: part.toolName ?? "unknown",
|
|
120
109
|
output: { type: "json", value: part.result },
|
|
121
110
|
}],
|
|
122
|
-
}
|
|
111
|
+
};
|
|
123
112
|
}
|
|
124
113
|
|
|
125
114
|
/**
|
|
126
|
-
* Convert an array of veryfront Messages to
|
|
115
|
+
* Convert an array of veryfront Messages to the current model-runtime message format.
|
|
127
116
|
*/
|
|
128
|
-
export function convertToModelMessages(messages: Message[]):
|
|
129
|
-
const modelMessages:
|
|
117
|
+
export function convertToModelMessages(messages: Message[]): ModelRuntimeMessage[] {
|
|
118
|
+
const modelMessages: ModelRuntimeMessage[] = [];
|
|
130
119
|
const toolResultMessageIndexes = new Map<string, number>();
|
|
131
120
|
|
|
132
121
|
for (const message of messages) {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model Runtime Types
|
|
3
|
+
*
|
|
4
|
+
* Framework-owned message types for the current text-generation runtime
|
|
5
|
+
* boundary. These describe the subset of message shapes the runtime uses
|
|
6
|
+
* today without exposing SDK-owned message contracts upward.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface ModelRuntimeTextPart {
|
|
10
|
+
type: "text";
|
|
11
|
+
text: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ModelRuntimeToolCallPart {
|
|
15
|
+
type: "tool-call";
|
|
16
|
+
toolCallId: string;
|
|
17
|
+
toolName: string;
|
|
18
|
+
input: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ModelRuntimeToolResultPart {
|
|
22
|
+
type: "tool-result";
|
|
23
|
+
toolCallId: string;
|
|
24
|
+
toolName: string;
|
|
25
|
+
output: {
|
|
26
|
+
type: "json";
|
|
27
|
+
value: unknown;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface ModelRuntimeSystemMessage {
|
|
32
|
+
role: "system";
|
|
33
|
+
content: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ModelRuntimeUserMessage {
|
|
37
|
+
role: "user";
|
|
38
|
+
content: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ModelRuntimeAssistantMessage {
|
|
42
|
+
role: "assistant";
|
|
43
|
+
content: Array<ModelRuntimeTextPart | ModelRuntimeToolCallPart>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ModelRuntimeToolMessage {
|
|
47
|
+
role: "tool";
|
|
48
|
+
content: ModelRuntimeToolResultPart[];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type ModelRuntimeMessage =
|
|
52
|
+
| ModelRuntimeSystemMessage
|
|
53
|
+
| ModelRuntimeUserMessage
|
|
54
|
+
| ModelRuntimeAssistantMessage
|
|
55
|
+
| ModelRuntimeToolMessage;
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Model Tool Converter
|
|
3
3
|
*
|
|
4
|
-
* Converts veryfront ToolDefinition[] to
|
|
5
|
-
*
|
|
4
|
+
* Converts veryfront ToolDefinition[] to the current model-runtime ToolSet
|
|
5
|
+
* format using framework-owned plain tool/schema objects.
|
|
6
6
|
*
|
|
7
|
-
* @module
|
|
7
|
+
* @module agent/runtime/model-tool-converter
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
import { jsonSchema, tool } from "ai";
|
|
11
|
-
import type { ToolSet } from "ai";
|
|
12
9
|
import type { ToolDefinition } from "../../tool/index.js";
|
|
13
|
-
import {
|
|
10
|
+
import type { RuntimeToolSet } from "./runtime-tool-types.js";
|
|
11
|
+
import {
|
|
12
|
+
addRuntimeTool,
|
|
13
|
+
createRuntimeJsonSchema,
|
|
14
|
+
createRuntimeTool,
|
|
15
|
+
} from "./runtime-tool-builder.js";
|
|
16
|
+
import { createAnthropicWebSearchToolSet } from "./provider-native-tools.js";
|
|
14
17
|
|
|
15
|
-
export interface
|
|
18
|
+
export interface ConvertToolsToRuntimeToolsOptions {
|
|
16
19
|
model?: string;
|
|
17
20
|
allowedToolNames?: string[];
|
|
18
21
|
}
|
|
@@ -30,8 +33,8 @@ function resolveHostedProvider(model?: string): string | undefined {
|
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
function resolveProviderNativeTools(
|
|
33
|
-
options?:
|
|
34
|
-
):
|
|
36
|
+
options?: ConvertToolsToRuntimeToolsOptions,
|
|
37
|
+
): RuntimeToolSet | undefined {
|
|
35
38
|
if (!options?.allowedToolNames?.includes("web_search")) {
|
|
36
39
|
return undefined;
|
|
37
40
|
}
|
|
@@ -40,30 +43,30 @@ function resolveProviderNativeTools(
|
|
|
40
43
|
return undefined;
|
|
41
44
|
}
|
|
42
45
|
|
|
43
|
-
return
|
|
44
|
-
web_search: anthropic.tools.webSearch_20250305({
|
|
45
|
-
maxUses: 5,
|
|
46
|
-
}),
|
|
47
|
-
};
|
|
46
|
+
return createAnthropicWebSearchToolSet();
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
/**
|
|
51
|
-
* Convert veryfront tool definitions to
|
|
50
|
+
* Convert veryfront tool definitions to the current model-runtime ToolSet.
|
|
52
51
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
52
|
+
* We only provide the schema/metadata the runtime substrate needs here.
|
|
53
|
+
* Tool execution remains owned by the agent runtime.
|
|
55
54
|
*/
|
|
56
|
-
export function
|
|
55
|
+
export function convertToolsToRuntimeTools(
|
|
57
56
|
tools: ToolDefinition[],
|
|
58
|
-
options?:
|
|
59
|
-
):
|
|
60
|
-
const toolSet:
|
|
57
|
+
options?: ConvertToolsToRuntimeToolsOptions,
|
|
58
|
+
): RuntimeToolSet | undefined {
|
|
59
|
+
const toolSet: RuntimeToolSet = {};
|
|
61
60
|
|
|
62
61
|
for (const def of tools) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
addRuntimeTool(
|
|
63
|
+
toolSet,
|
|
64
|
+
def.name,
|
|
65
|
+
createRuntimeTool({
|
|
66
|
+
description: def.description,
|
|
67
|
+
inputSchema: createRuntimeJsonSchema(def.parameters),
|
|
68
|
+
}),
|
|
69
|
+
);
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
const providerNativeTools = resolveProviderNativeTools(options);
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { JsonSchema } from "../../tool/schema/index.js";
|
|
2
|
+
import { createLazyRuntimeJsonSchema, createRuntimeProviderTool } from "./runtime-tool-builder.js";
|
|
3
|
+
import type { RuntimeToolSet } from "./runtime-tool-types.js";
|
|
4
|
+
|
|
5
|
+
const WEB_SEARCH_INPUT_SCHEMA: JsonSchema = {
|
|
6
|
+
type: "object",
|
|
7
|
+
properties: {
|
|
8
|
+
query: {
|
|
9
|
+
type: "string",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
required: ["query"],
|
|
13
|
+
additionalProperties: false,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const WEB_SEARCH_OUTPUT_SCHEMA: JsonSchema = {
|
|
17
|
+
type: "array",
|
|
18
|
+
items: {
|
|
19
|
+
type: "object",
|
|
20
|
+
properties: {
|
|
21
|
+
url: {
|
|
22
|
+
type: "string",
|
|
23
|
+
},
|
|
24
|
+
title: {
|
|
25
|
+
anyOf: [
|
|
26
|
+
{ type: "string" },
|
|
27
|
+
{ type: "null" },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
pageAge: {
|
|
31
|
+
anyOf: [
|
|
32
|
+
{ type: "string" },
|
|
33
|
+
{ type: "null" },
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
encryptedContent: {
|
|
37
|
+
type: "string",
|
|
38
|
+
},
|
|
39
|
+
type: {
|
|
40
|
+
type: "string",
|
|
41
|
+
const: "web_search_result",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: ["url", "title", "pageAge", "encryptedContent", "type"],
|
|
45
|
+
additionalProperties: false,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export function createAnthropicWebSearchToolSet(): RuntimeToolSet {
|
|
50
|
+
return {
|
|
51
|
+
web_search: createRuntimeProviderTool({
|
|
52
|
+
id: "anthropic.web_search_20250305",
|
|
53
|
+
args: {
|
|
54
|
+
maxUses: 5,
|
|
55
|
+
},
|
|
56
|
+
inputSchema: createLazyRuntimeJsonSchema(WEB_SEARCH_INPUT_SCHEMA),
|
|
57
|
+
outputSchema: createLazyRuntimeJsonSchema(WEB_SEARCH_OUTPUT_SCHEMA),
|
|
58
|
+
supportsDeferredResults: true,
|
|
59
|
+
}),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
NoSuchToolError,
|
|
4
|
-
type ToolCallRepairFunction,
|
|
5
|
-
type ToolSet,
|
|
6
|
-
} from "ai";
|
|
1
|
+
import { isInvalidToolInputError, isNoSuchToolError } from "./runtime-tool-errors.js";
|
|
2
|
+
import type { RuntimeToolCallRepairFunction } from "./runtime-tool-types.js";
|
|
7
3
|
|
|
8
4
|
const REPAIRABLE_PROVIDER_TOOL_NAMES = new Set(["web_search"]);
|
|
9
5
|
|
|
10
|
-
export const repairToolCall:
|
|
6
|
+
export const repairToolCall: RuntimeToolCallRepairFunction = async ({
|
|
11
7
|
toolCall,
|
|
12
8
|
error,
|
|
13
9
|
}) => {
|
|
14
|
-
if (
|
|
10
|
+
if (isNoSuchToolError(error)) {
|
|
15
11
|
return null;
|
|
16
12
|
}
|
|
17
13
|
|
|
@@ -22,7 +18,8 @@ export const repairToolCall: ToolCallRepairFunction<ToolSet> = async ({
|
|
|
22
18
|
if (toolCall.providerExecuted !== true) {
|
|
23
19
|
return null;
|
|
24
20
|
}
|
|
25
|
-
|
|
21
|
+
|
|
22
|
+
if (!isInvalidToolInputError(error) || typeof toolCall.input !== "string") {
|
|
26
23
|
return null;
|
|
27
24
|
}
|
|
28
25
|
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { JsonSchema } from "../../tool/schema/index.js";
|
|
2
|
+
import type { RuntimeToolSet } from "./runtime-tool-types.js";
|
|
3
|
+
|
|
4
|
+
interface RuntimeJsonSchema<T = unknown> {
|
|
5
|
+
readonly jsonSchema: JsonSchema | PromiseLike<JsonSchema>;
|
|
6
|
+
validate?: (value: unknown) => T | PromiseLike<T>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type RuntimeLazySchema<T = unknown> = () => RuntimeJsonSchema<T>;
|
|
10
|
+
|
|
11
|
+
interface RuntimeToolDefinition {
|
|
12
|
+
description: string;
|
|
13
|
+
inputSchema: RuntimeJsonSchema;
|
|
14
|
+
type?: "function" | "dynamic";
|
|
15
|
+
execute?: (...args: unknown[]) => unknown;
|
|
16
|
+
onInputAvailable?: (...args: unknown[]) => unknown;
|
|
17
|
+
onInputStart?: (...args: unknown[]) => unknown;
|
|
18
|
+
onInputDelta?: (...args: unknown[]) => unknown;
|
|
19
|
+
needsApproval?: (...args: unknown[]) => unknown;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface RuntimeProviderToolDefinition {
|
|
23
|
+
type: "provider";
|
|
24
|
+
id: string;
|
|
25
|
+
args: Record<string, unknown>;
|
|
26
|
+
inputSchema: RuntimeLazySchema;
|
|
27
|
+
outputSchema?: RuntimeLazySchema;
|
|
28
|
+
execute?: undefined;
|
|
29
|
+
needsApproval?: undefined;
|
|
30
|
+
toModelOutput?: undefined;
|
|
31
|
+
onInputStart?: undefined;
|
|
32
|
+
onInputDelta?: undefined;
|
|
33
|
+
onInputAvailable?: undefined;
|
|
34
|
+
supportsDeferredResults?: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function createRuntimeJsonSchema(json: JsonSchema): RuntimeJsonSchema {
|
|
38
|
+
return {
|
|
39
|
+
jsonSchema: json,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function createLazyRuntimeJsonSchema(json: JsonSchema): RuntimeLazySchema {
|
|
44
|
+
return () => createRuntimeJsonSchema(json);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function createRuntimeTool(definition: {
|
|
48
|
+
description: string;
|
|
49
|
+
inputSchema: RuntimeJsonSchema;
|
|
50
|
+
type?: "function" | "dynamic";
|
|
51
|
+
}): RuntimeToolDefinition {
|
|
52
|
+
return {
|
|
53
|
+
type: definition.type ?? "function",
|
|
54
|
+
description: definition.description,
|
|
55
|
+
inputSchema: definition.inputSchema,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function addRuntimeTool(
|
|
60
|
+
toolSet: RuntimeToolSet,
|
|
61
|
+
name: string,
|
|
62
|
+
definition: RuntimeToolDefinition,
|
|
63
|
+
): void {
|
|
64
|
+
toolSet[name] = definition;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function createRuntimeProviderTool(definition: {
|
|
68
|
+
id: string;
|
|
69
|
+
args: Record<string, unknown>;
|
|
70
|
+
inputSchema: RuntimeLazySchema;
|
|
71
|
+
outputSchema?: RuntimeLazySchema;
|
|
72
|
+
supportsDeferredResults?: boolean;
|
|
73
|
+
}): RuntimeProviderToolDefinition {
|
|
74
|
+
return {
|
|
75
|
+
type: "provider",
|
|
76
|
+
id: definition.id,
|
|
77
|
+
args: definition.args,
|
|
78
|
+
inputSchema: definition.inputSchema,
|
|
79
|
+
outputSchema: definition.outputSchema,
|
|
80
|
+
supportsDeferredResults: definition.supportsDeferredResults,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const INVALID_TOOL_INPUT_ERROR_NAME = "AI_InvalidToolInputError";
|
|
2
|
+
const NO_SUCH_TOOL_ERROR_NAME = "AI_NoSuchToolError";
|
|
3
|
+
|
|
4
|
+
type ErrorWithName = {
|
|
5
|
+
name: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
type InvalidToolInputErrorShape = ErrorWithName & {
|
|
9
|
+
toolInput: unknown;
|
|
10
|
+
toolName: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
function isErrorWithName(error: unknown, expectedName: string): error is ErrorWithName {
|
|
14
|
+
return !!error &&
|
|
15
|
+
typeof error === "object" &&
|
|
16
|
+
"name" in error &&
|
|
17
|
+
error.name === expectedName;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function isInvalidToolInputError(error: unknown): error is InvalidToolInputErrorShape {
|
|
21
|
+
return isErrorWithName(error, INVALID_TOOL_INPUT_ERROR_NAME) &&
|
|
22
|
+
"toolName" in error &&
|
|
23
|
+
typeof error.toolName === "string" &&
|
|
24
|
+
"toolInput" in error;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function isNoSuchToolError(error: unknown): boolean {
|
|
28
|
+
return isErrorWithName(error, NO_SUCH_TOOL_ERROR_NAME) &&
|
|
29
|
+
"toolName" in error &&
|
|
30
|
+
typeof error.toolName === "string";
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function createInvalidToolInputErrorForTest(options: {
|
|
34
|
+
cause: Error;
|
|
35
|
+
toolInput: string;
|
|
36
|
+
toolName: string;
|
|
37
|
+
}): unknown {
|
|
38
|
+
const error = new Error(`Invalid input for tool ${options.toolName}: ${options.cause.message}`);
|
|
39
|
+
error.name = INVALID_TOOL_INPUT_ERROR_NAME;
|
|
40
|
+
|
|
41
|
+
return Object.assign(error, {
|
|
42
|
+
cause: options.cause,
|
|
43
|
+
toolInput: options.toolInput,
|
|
44
|
+
toolName: options.toolName,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime Tool Types
|
|
3
|
+
*
|
|
4
|
+
* Framework-owned types for the current tool-calling and streaming runtime
|
|
5
|
+
* boundary. These cover only the shapes the framework consumes today.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { ModelRuntimeMessage } from "./model-runtime-types.js";
|
|
9
|
+
|
|
10
|
+
export type RuntimeToolSet = Record<string, unknown>;
|
|
11
|
+
|
|
12
|
+
export interface RuntimeGenerateToolCall {
|
|
13
|
+
toolCallId: string;
|
|
14
|
+
toolName: string;
|
|
15
|
+
input: unknown;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface RuntimeGenerateToolResult {
|
|
19
|
+
toolCallId: string;
|
|
20
|
+
toolName: string;
|
|
21
|
+
result: unknown;
|
|
22
|
+
isError?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface RuntimeGenerateUsage {
|
|
26
|
+
inputTokens?: number;
|
|
27
|
+
outputTokens?: number;
|
|
28
|
+
totalTokens?: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface RuntimeGenerateTextResult {
|
|
32
|
+
text: string;
|
|
33
|
+
toolCalls?: RuntimeGenerateToolCall[];
|
|
34
|
+
toolResults?: RuntimeGenerateToolResult[];
|
|
35
|
+
usage?: RuntimeGenerateUsage;
|
|
36
|
+
finishReason?: string | null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface RuntimeRepairToolCall {
|
|
40
|
+
type: "tool-call";
|
|
41
|
+
toolCallId: string;
|
|
42
|
+
toolName: string;
|
|
43
|
+
input: unknown;
|
|
44
|
+
providerExecuted?: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface RuntimeToolCallRepairContext {
|
|
48
|
+
error: unknown;
|
|
49
|
+
inputSchema: (...args: unknown[]) => unknown;
|
|
50
|
+
messages: ModelRuntimeMessage[];
|
|
51
|
+
system?: string;
|
|
52
|
+
toolCall: RuntimeRepairToolCall;
|
|
53
|
+
tools: RuntimeToolSet;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type RuntimeToolCallRepairFunction = (
|
|
57
|
+
context: RuntimeToolCallRepairContext,
|
|
58
|
+
) => Promise<RuntimeRepairToolCall | null> | RuntimeRepairToolCall | null;
|
|
59
|
+
|
|
60
|
+
export type RuntimeStreamPart =
|
|
61
|
+
| { type: "text-delta"; text: string }
|
|
62
|
+
| {
|
|
63
|
+
type: "tool-input-start";
|
|
64
|
+
id: string;
|
|
65
|
+
toolName: string;
|
|
66
|
+
providerExecuted?: boolean;
|
|
67
|
+
dynamic?: boolean;
|
|
68
|
+
}
|
|
69
|
+
| { type: "tool-input-delta"; id: string; delta: string }
|
|
70
|
+
| {
|
|
71
|
+
type: "tool-call";
|
|
72
|
+
toolCallId: string;
|
|
73
|
+
toolName: string;
|
|
74
|
+
input: unknown;
|
|
75
|
+
providerExecuted?: boolean;
|
|
76
|
+
dynamic?: boolean;
|
|
77
|
+
}
|
|
78
|
+
| {
|
|
79
|
+
type: "tool-result";
|
|
80
|
+
toolCallId: string;
|
|
81
|
+
toolName: string;
|
|
82
|
+
output?: unknown;
|
|
83
|
+
error?: unknown;
|
|
84
|
+
input?: unknown;
|
|
85
|
+
providerExecuted?: boolean;
|
|
86
|
+
dynamic?: boolean;
|
|
87
|
+
preliminary?: boolean;
|
|
88
|
+
isError?: boolean;
|
|
89
|
+
}
|
|
90
|
+
| {
|
|
91
|
+
type: "tool-error";
|
|
92
|
+
toolCallId: string;
|
|
93
|
+
toolName: string;
|
|
94
|
+
error?: unknown;
|
|
95
|
+
input?: unknown;
|
|
96
|
+
providerExecuted?: boolean;
|
|
97
|
+
dynamic?: boolean;
|
|
98
|
+
preliminary?: boolean;
|
|
99
|
+
isError?: boolean;
|
|
100
|
+
}
|
|
101
|
+
| {
|
|
102
|
+
type: "finish";
|
|
103
|
+
finishReason?: string | null;
|
|
104
|
+
totalUsage?: {
|
|
105
|
+
inputTokens?: number;
|
|
106
|
+
outputTokens?: number;
|
|
107
|
+
} | null;
|
|
108
|
+
}
|
|
109
|
+
| { type: "error"; error: unknown };
|
|
110
|
+
|
|
111
|
+
export interface RuntimeStreamResult {
|
|
112
|
+
fullStream: AsyncIterable<unknown>;
|
|
113
|
+
textStream: AsyncIterable<string>;
|
|
114
|
+
}
|
package/src/src/chat/index.ts
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
import "../../_dnt.polyfills.js";
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
export { Chat, ChatComponents, type ChatProps } from "../react/components/
|
|
53
|
+
export { Chat, ChatComponents, type ChatProps } from "../react/components/chat/chat.js";
|
|
54
54
|
|
|
55
55
|
export {
|
|
56
56
|
ChatComposer,
|
|
@@ -69,7 +69,7 @@ export {
|
|
|
69
69
|
type MessageRootProps,
|
|
70
70
|
ModelAvatar,
|
|
71
71
|
type ModelAvatarProps,
|
|
72
|
-
} from "../react/components/
|
|
72
|
+
} from "../react/components/chat/chat.js";
|
|
73
73
|
|
|
74
74
|
export {
|
|
75
75
|
ChatContextProvider,
|
|
@@ -88,7 +88,7 @@ export {
|
|
|
88
88
|
useMessageContextOptional,
|
|
89
89
|
useThreadListContext,
|
|
90
90
|
useThreadListContextOptional,
|
|
91
|
-
} from "../react/components/
|
|
91
|
+
} from "../react/components/chat/chat.js";
|
|
92
92
|
|
|
93
93
|
export {
|
|
94
94
|
type AttachmentInfo,
|
|
@@ -173,38 +173,40 @@ export {
|
|
|
173
173
|
useThreads,
|
|
174
174
|
type UseThreadsOptions,
|
|
175
175
|
type UseThreadsResult,
|
|
176
|
-
} from "../react/components/
|
|
176
|
+
} from "../react/components/chat/chat.js";
|
|
177
177
|
|
|
178
178
|
export {
|
|
179
179
|
Message as StandaloneMessage,
|
|
180
180
|
type MessageProps,
|
|
181
181
|
StreamingMessage,
|
|
182
182
|
type StreamingMessageProps,
|
|
183
|
-
} from "../react/components/
|
|
183
|
+
} from "../react/components/chat/message.js";
|
|
184
184
|
|
|
185
|
-
export { AgentCard, type AgentCardProps } from "../react/components/
|
|
185
|
+
export { AgentCard, type AgentCardProps } from "../react/components/chat/agent-card.js";
|
|
186
186
|
export {
|
|
187
|
-
|
|
188
|
-
type
|
|
189
|
-
|
|
190
|
-
} from "../react/components/
|
|
191
|
-
export type { AgentTheme, ChatTheme } from "../react/components/
|
|
187
|
+
ChatErrorBoundary,
|
|
188
|
+
type ChatErrorBoundaryProps,
|
|
189
|
+
useChatErrorHandler,
|
|
190
|
+
} from "../react/components/chat/error-boundary.js";
|
|
191
|
+
export type { AgentTheme, ChatTheme } from "../react/components/chat/theme.js";
|
|
192
192
|
|
|
193
193
|
export {
|
|
194
194
|
type BranchInfo,
|
|
195
195
|
type BrowserInferenceStatus,
|
|
196
|
-
type
|
|
196
|
+
type ChatDynamicToolPart,
|
|
197
|
+
type ChatFinishReason,
|
|
198
|
+
type ChatMessage,
|
|
199
|
+
type ChatMessagePart,
|
|
200
|
+
type ChatReasoningPart,
|
|
201
|
+
type ChatStepPart,
|
|
202
|
+
type ChatStreamEvent,
|
|
203
|
+
type ChatTextPart,
|
|
204
|
+
type ChatToolPart,
|
|
205
|
+
type ChatToolResultPart,
|
|
206
|
+
type ChatToolState,
|
|
197
207
|
type InferenceMode,
|
|
198
208
|
type OnToolCallArg,
|
|
199
|
-
type ReasoningUIPart,
|
|
200
|
-
type StepUIPart,
|
|
201
|
-
type TextUIPart,
|
|
202
209
|
type ToolOutput,
|
|
203
|
-
type ToolResultUIPart,
|
|
204
|
-
type ToolState,
|
|
205
|
-
type ToolUIPart,
|
|
206
|
-
type UIMessage,
|
|
207
|
-
type UIMessagePart,
|
|
208
210
|
useChat,
|
|
209
211
|
type UseChatOptions,
|
|
210
212
|
type UseChatResult,
|