glirastes 0.4.0 → 0.5.1
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/CHANGELOG.md +377 -1
- package/README.md +283 -847
- package/adapter/nextjs/package.json +5 -0
- package/ai-sdk/package.json +5 -0
- package/browser/package.json +5 -0
- package/contracts/package.json +5 -0
- package/dist/agent/git.d.ts +65 -0
- package/dist/agent/git.js +122 -0
- package/dist/agent/git.js.map +1 -0
- package/dist/agent/openrouter.d.ts +56 -0
- package/dist/agent/openrouter.js +74 -0
- package/dist/agent/openrouter.js.map +1 -0
- package/dist/agent/platform-jobs.d.ts +102 -0
- package/dist/agent/platform-jobs.js +122 -0
- package/dist/agent/platform-jobs.js.map +1 -0
- package/dist/agent/runner.d.ts +150 -0
- package/dist/agent/runner.js +250 -0
- package/dist/agent/runner.js.map +1 -0
- package/dist/agent/workspace.d.ts +65 -0
- package/dist/agent/workspace.js +264 -0
- package/dist/agent/workspace.js.map +1 -0
- package/dist/browser/client-actions.d.ts +26 -0
- package/dist/browser/client-actions.js +42 -0
- package/dist/browser/client-actions.js.map +1 -0
- package/dist/browser/index.d.ts +4 -0
- package/dist/browser/index.js +5 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/navigation.d.ts +32 -0
- package/dist/browser/navigation.js +79 -0
- package/dist/browser/navigation.js.map +1 -0
- package/dist/browser/query-filters.d.ts +30 -0
- package/dist/browser/query-filters.js +85 -0
- package/dist/browser/query-filters.js.map +1 -0
- package/dist/browser/ui-action-bus.d.ts +26 -0
- package/dist/browser/ui-action-bus.js +66 -0
- package/dist/browser/ui-action-bus.js.map +1 -0
- package/dist/cjs/browser/client-actions.d.ts +26 -0
- package/dist/cjs/browser/client-actions.js +45 -0
- package/dist/cjs/browser/index.d.ts +4 -0
- package/dist/cjs/browser/index.js +16 -0
- package/dist/cjs/browser/navigation.d.ts +32 -0
- package/dist/cjs/browser/navigation.js +84 -0
- package/dist/cjs/browser/query-filters.d.ts +30 -0
- package/dist/cjs/browser/query-filters.js +87 -0
- package/dist/cjs/browser/ui-action-bus.d.ts +26 -0
- package/dist/cjs/browser/ui-action-bus.js +70 -0
- package/dist/cjs/codegen/execution-inventory.d.ts +63 -0
- package/dist/cjs/codegen/execution-inventory.js +312 -0
- package/dist/cjs/codegen/index.d.ts +4 -13
- package/dist/cjs/codegen/index.js +13 -31
- package/dist/cjs/codegen/inventory-generation.d.ts +104 -0
- package/dist/cjs/codegen/inventory-generation.js +122 -0
- package/dist/cjs/codegen/next-source-generation.d.ts +17 -0
- package/dist/cjs/codegen/next-source-generation.js +51 -0
- package/dist/cjs/codegen/openapi-document.d.ts +53 -0
- package/dist/cjs/codegen/openapi-document.js +127 -0
- package/dist/cjs/codegen/route-exports.d.ts +13 -0
- package/dist/cjs/codegen/route-exports.js +122 -0
- package/dist/cjs/codegen/route-fingerprint.d.ts +2 -0
- package/dist/cjs/codegen/route-fingerprint.js +11 -0
- package/dist/cjs/codegen/route-scanner.d.ts +57 -0
- package/dist/cjs/codegen/route-scanner.js +239 -0
- package/dist/cjs/codegen/tools/canonical.d.ts +12 -0
- package/dist/cjs/codegen/tools/canonical.js +49 -0
- package/dist/cjs/codegen/tools/sources/nest-decorators.d.ts +27 -0
- package/dist/cjs/codegen/tools/sources/nest-decorators.js +73 -0
- package/dist/cjs/contracts/app-setup.d.ts +346 -0
- package/dist/cjs/contracts/app-setup.js +208 -0
- package/dist/cjs/contracts/chat-command.d.ts +65 -0
- package/dist/cjs/contracts/chat-command.js +128 -0
- package/dist/cjs/contracts/chat-interactions.d.ts +126 -0
- package/dist/cjs/contracts/chat-interactions.js +439 -0
- package/dist/cjs/contracts/clarification.d.ts +53 -0
- package/dist/cjs/contracts/clarification.js +91 -0
- package/dist/cjs/contracts/content-boundary.d.ts +3 -0
- package/dist/cjs/contracts/content-boundary.js +95 -0
- package/dist/cjs/contracts/events.d.ts +273 -0
- package/dist/cjs/contracts/events.js +229 -0
- package/dist/cjs/contracts/index.d.ts +18 -0
- package/dist/cjs/contracts/index.js +83 -0
- package/dist/cjs/contracts/plan.d.ts +20 -0
- package/dist/cjs/contracts/plan.js +38 -0
- package/dist/cjs/contracts/platform-connection.d.ts +44 -0
- package/dist/cjs/contracts/platform-connection.js +66 -0
- package/dist/cjs/contracts/platform-prompt-revision.d.ts +27 -0
- package/dist/cjs/contracts/platform-prompt-revision.js +46 -0
- package/dist/cjs/contracts/prompt-bundle.d.ts +46 -0
- package/dist/cjs/contracts/prompt-bundle.js +74 -0
- package/dist/cjs/contracts/revisions.d.ts +716 -0
- package/dist/cjs/contracts/revisions.js +301 -0
- package/dist/cjs/contracts/runtime.d.ts +55 -0
- package/dist/cjs/contracts/runtime.js +67 -0
- package/dist/cjs/contracts/semantic-change.d.ts +27 -0
- package/dist/cjs/contracts/semantic-change.js +103 -0
- package/dist/cjs/contracts/tool-exclude-pattern.d.ts +12 -0
- package/dist/cjs/contracts/tool-exclude-pattern.js +29 -0
- package/dist/cjs/contracts/tool-policy-entry.d.ts +107 -0
- package/dist/cjs/contracts/tool-policy-entry.js +42 -0
- package/dist/cjs/contracts/tool-policy.d.ts +198 -0
- package/dist/cjs/contracts/tool-policy.js +500 -0
- package/dist/cjs/contracts/url.d.ts +2 -0
- package/dist/cjs/contracts/url.js +10 -0
- package/dist/cjs/diagnostics/foundation-diagnostic.d.ts +34 -0
- package/dist/cjs/diagnostics/foundation-diagnostic.js +52 -0
- package/dist/cjs/diagnostics/index.d.ts +2 -0
- package/dist/cjs/diagnostics/index.js +7 -0
- package/dist/cjs/embed/chat-styles.generated.d.ts +1 -0
- package/dist/cjs/embed/chat-styles.generated.js +6 -0
- package/dist/cjs/embed/glirastes-chat-element.d.ts +67 -0
- package/dist/cjs/embed/glirastes-chat-element.js +282 -0
- package/dist/cjs/embed/index.d.ts +4 -0
- package/dist/cjs/embed/index.js +20 -0
- package/dist/cjs/embed/theme.d.ts +10 -0
- package/dist/cjs/embed/theme.js +45 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/react/assistant/assistant-layout.d.ts +55 -0
- package/dist/cjs/react/assistant/assistant-layout.js +107 -0
- package/dist/cjs/react/assistant/assistant-shell.d.ts +132 -0
- package/dist/cjs/react/assistant/assistant-shell.js +267 -0
- package/dist/cjs/react/assistant/assistant-shortcut-list.d.ts +24 -0
- package/dist/cjs/react/assistant/assistant-shortcut-list.js +35 -0
- package/dist/cjs/react/assistant/assistant-workspace.d.ts +31 -0
- package/dist/cjs/react/assistant/assistant-workspace.js +33 -0
- package/dist/cjs/react/completions/completion-search.d.ts +21 -0
- package/dist/cjs/react/completions/completion-search.js +111 -0
- package/dist/cjs/react/completions/ui-tool-command-provider.d.ts +15 -0
- package/dist/cjs/react/completions/ui-tool-command-provider.js +84 -0
- package/dist/cjs/react/components/activity-log.d.ts +17 -0
- package/dist/cjs/react/components/activity-log.js +70 -0
- package/dist/cjs/react/components/ai-chat-panel.js +13 -6
- package/dist/cjs/react/components/ai-trigger-button.d.ts +1 -1
- package/dist/cjs/react/components/ai-trigger-button.js +11 -66
- package/dist/cjs/react/components/approval-card.js +20 -1
- package/dist/cjs/react/components/chat-input.js +6 -4
- package/dist/cjs/react/components/chat-window-visibility.d.ts +3 -0
- package/dist/cjs/react/components/chat-window-visibility.js +7 -0
- package/dist/cjs/react/components/chat-window.d.ts +1 -1
- package/dist/cjs/react/components/chat-window.js +124 -57
- package/dist/cjs/react/components/clarification-card.d.ts +10 -0
- package/dist/cjs/react/components/clarification-card.js +35 -0
- package/dist/cjs/react/components/command-arguments-form.d.ts +10 -0
- package/dist/cjs/react/components/command-arguments-form.js +153 -0
- package/dist/cjs/react/components/confirm-dialog.js +1 -1
- package/dist/cjs/react/components/floating-chat-ui.d.ts +3 -3
- package/dist/cjs/react/components/floating-chat-ui.js +30 -4
- package/dist/cjs/react/components/mention-input.d.ts +5 -4
- package/dist/cjs/react/components/mention-input.js +64 -7
- package/dist/cjs/react/components/message-bubble.js +90 -14
- package/dist/cjs/react/components/plan-checklist.d.ts +14 -0
- package/dist/cjs/react/components/plan-checklist.js +20 -0
- package/dist/cjs/react/components/recording-bar.js +44 -58
- package/dist/cjs/react/components/rich-mention-input.js +197 -45
- package/dist/cjs/react/components/session-switcher.d.ts +3 -1
- package/dist/cjs/react/components/session-switcher.js +26 -11
- package/dist/cjs/react/components/status-icon.d.ts +8 -0
- package/dist/cjs/react/components/status-icon.js +11 -0
- package/dist/cjs/react/components/stream-waveform.d.ts +4 -0
- package/dist/cjs/react/components/stream-waveform.js +49 -0
- package/dist/cjs/react/components/voice-input-addon.d.ts +16 -1
- package/dist/cjs/react/components/voice-input-addon.js +255 -18
- package/dist/cjs/react/components/voice-input-button.js +1 -1
- package/dist/cjs/react/hooks/use-chat-shortcuts.d.ts +33 -0
- package/dist/cjs/react/hooks/use-chat-shortcuts.js +139 -0
- package/dist/cjs/react/hooks/use-deepgram-transcription.d.ts +4 -0
- package/dist/cjs/react/hooks/use-deepgram-transcription.js +31 -321
- package/dist/cjs/react/hooks/use-drag-resize-panel.d.ts +1 -0
- package/dist/cjs/react/hooks/use-drag-resize-panel.js +246 -121
- package/dist/cjs/react/hooks/use-floating-panel.d.ts +57 -0
- package/dist/cjs/react/hooks/use-floating-panel.js +217 -0
- package/dist/cjs/react/hooks/use-keyboard-shortcut.js +2 -1
- package/dist/cjs/react/hooks/use-push-to-talk-hotkey.d.ts +24 -0
- package/dist/cjs/react/hooks/use-push-to-talk-hotkey.js +116 -0
- package/dist/cjs/react/hooks/use-sidebar-resize.d.ts +19 -0
- package/dist/cjs/react/hooks/use-sidebar-resize.js +109 -0
- package/dist/cjs/react/index.d.ts +30 -1
- package/dist/cjs/react/index.js +91 -1
- package/dist/cjs/react/interactions/definitions.d.ts +67 -0
- package/dist/cjs/react/interactions/definitions.js +83 -0
- package/dist/cjs/react/interactions/registry.d.ts +74 -0
- package/dist/cjs/react/interactions/registry.js +250 -0
- package/dist/cjs/react/interactions/use-chat-interactions-data.d.ts +15 -0
- package/dist/cjs/react/interactions/use-chat-interactions-data.js +43 -0
- package/dist/cjs/react/locale-de.d.ts +3 -0
- package/dist/cjs/react/locale-de.js +69 -0
- package/dist/cjs/react/provider/ai-chat-provider.d.ts +1 -1
- package/dist/cjs/react/provider/ai-chat-provider.js +410 -106
- package/dist/cjs/react/provider/chat-context.d.ts +52 -1
- package/dist/cjs/react/stt/controller.d.ts +60 -0
- package/dist/cjs/react/stt/controller.js +268 -0
- package/dist/cjs/react/stt/deepgram.d.ts +30 -0
- package/dist/cjs/react/stt/deepgram.js +204 -0
- package/dist/cjs/react/stt/recorded.d.ts +29 -0
- package/dist/cjs/react/stt/recorded.js +115 -0
- package/dist/cjs/react/stt/segments.d.ts +18 -0
- package/dist/cjs/react/stt/segments.js +32 -0
- package/dist/cjs/react/stt/use-stt.d.ts +17 -0
- package/dist/cjs/react/stt/use-stt.js +41 -0
- package/dist/cjs/react/stt/waveform.d.ts +5 -0
- package/dist/cjs/react/stt/waveform.js +31 -0
- package/dist/cjs/react/styles.css +1555 -0
- package/dist/cjs/react/tool-renderers/registry.d.ts +31 -0
- package/dist/cjs/react/tool-renderers/registry.js +50 -0
- package/dist/cjs/react/tool-renderers/renderer-boundary.d.ts +18 -0
- package/dist/cjs/react/tool-renderers/renderer-boundary.js +15 -0
- package/dist/cjs/react/transports/vercel/vercel-ai-chat.d.ts +1 -1
- package/dist/cjs/react/transports/vercel/vercel-ai-chat.js +2 -2
- package/dist/cjs/react/transports/vercel.d.ts +6 -0
- package/dist/cjs/react/transports/vercel.js +12 -6
- package/dist/cjs/react/types.d.ts +269 -6
- package/dist/cjs/react/ui.d.ts +18 -17
- package/dist/cjs/react/ui.js +50 -45
- package/dist/cjs/react/unstyled.d.ts +7 -0
- package/dist/cjs/react/unstyled.js +10 -0
- package/dist/cjs/react/utils/activity.d.ts +16 -0
- package/dist/cjs/react/utils/activity.js +80 -0
- package/dist/cjs/react/utils/clarification.d.ts +31 -0
- package/dist/cjs/react/utils/clarification.js +104 -0
- package/dist/cjs/react/utils/create-approval-description.d.ts +6 -0
- package/dist/cjs/react/utils/create-approval-description.js +42 -7
- package/dist/cjs/react/utils/create-tool-result-handler.d.ts +1 -1
- package/dist/cjs/react/utils/create-tool-result-handler.js +1 -1
- package/dist/cjs/react/utils/entity-names.d.ts +6 -0
- package/dist/cjs/react/utils/entity-names.js +57 -0
- package/dist/cjs/react/utils/followup-suggestions.d.ts +11 -0
- package/dist/cjs/react/utils/followup-suggestions.js +39 -0
- package/dist/cjs/react/utils/local-session-store.d.ts +30 -0
- package/dist/cjs/react/utils/local-session-store.js +165 -0
- package/dist/cjs/react/utils/mention-markup.d.ts +44 -1
- package/dist/cjs/react/utils/mention-markup.js +144 -10
- package/dist/cjs/react/utils/tool-presentation.d.ts +23 -0
- package/dist/cjs/react/utils/tool-presentation.js +46 -0
- package/dist/cjs/react/utils/tool-result-config.d.ts +10 -0
- package/dist/cjs/react/utils/tool-result-config.js +14 -0
- package/dist/cjs/runtime/ai-sdk/engine.d.ts +66 -0
- package/dist/cjs/runtime/ai-sdk/engine.js +192 -0
- package/dist/cjs/runtime/ai-sdk/index.d.ts +1 -0
- package/dist/cjs/runtime/ai-sdk/index.js +5 -0
- package/dist/cjs/runtime/authorization.d.ts +16 -0
- package/dist/cjs/runtime/authorization.js +35 -0
- package/dist/cjs/runtime/budget.d.ts +39 -0
- package/dist/cjs/runtime/budget.js +100 -0
- package/dist/cjs/runtime/contract-bindings.d.ts +52 -0
- package/dist/cjs/runtime/contract-bindings.js +95 -0
- package/dist/cjs/runtime/engine.d.ts +52 -0
- package/dist/cjs/runtime/engine.js +2 -0
- package/dist/cjs/runtime/fingerprint.d.ts +6 -0
- package/dist/cjs/runtime/fingerprint.js +31 -0
- package/dist/cjs/runtime/glirastes.d.ts +113 -0
- package/dist/cjs/runtime/glirastes.js +289 -0
- package/dist/cjs/runtime/index.d.ts +24 -0
- package/dist/cjs/runtime/index.js +74 -0
- package/dist/cjs/runtime/json-schema.d.ts +13 -0
- package/dist/cjs/runtime/json-schema.js +46 -0
- package/dist/cjs/runtime/local-limits.d.ts +6 -0
- package/dist/cjs/runtime/local-limits.js +26 -0
- package/dist/cjs/runtime/local-runtime-source.d.ts +76 -0
- package/dist/cjs/runtime/local-runtime-source.js +0 -0
- package/dist/cjs/runtime/local-signer.d.ts +17 -0
- package/dist/cjs/runtime/local-signer.js +34 -0
- package/dist/cjs/runtime/local-tool-bindings.d.ts +57 -0
- package/dist/cjs/runtime/local-tool-bindings.js +197 -0
- package/dist/cjs/runtime/managed-turn.d.ts +29 -0
- package/dist/cjs/runtime/managed-turn.js +99 -0
- package/dist/cjs/runtime/metrics/cost.d.ts +64 -0
- package/dist/cjs/runtime/metrics/cost.js +98 -0
- package/dist/cjs/runtime/metrics/sink.d.ts +56 -0
- package/dist/cjs/runtime/metrics/sink.js +217 -0
- package/dist/cjs/runtime/metrics/turn-recorder.d.ts +62 -0
- package/dist/cjs/runtime/metrics/turn-recorder.js +172 -0
- package/dist/cjs/runtime/offline-execution-lease.d.ts +27 -0
- package/dist/cjs/runtime/offline-execution-lease.js +49 -0
- package/dist/cjs/runtime/policy-overlay.d.ts +86 -0
- package/dist/cjs/runtime/policy-overlay.js +122 -0
- package/dist/cjs/runtime/postgres-store.d.ts +111 -0
- package/dist/cjs/runtime/postgres-store.js +368 -0
- package/dist/cjs/runtime/prompt-bundle-store.d.ts +58 -0
- package/dist/cjs/runtime/prompt-bundle-store.js +123 -0
- package/dist/cjs/runtime/runtime-mode.d.ts +23 -0
- package/dist/cjs/runtime/runtime-mode.js +46 -0
- package/dist/cjs/runtime/sdk-version.d.ts +2 -0
- package/dist/cjs/runtime/sdk-version.js +5 -0
- package/dist/cjs/runtime/tool-discovery.d.ts +51 -0
- package/dist/cjs/runtime/tool-discovery.js +141 -0
- package/dist/cjs/runtime/tool-search.d.ts +31 -0
- package/dist/cjs/runtime/tool-search.js +149 -0
- package/dist/cjs/runtime/turn-snapshot.d.ts +44 -0
- package/dist/cjs/runtime/turn-snapshot.js +112 -0
- package/dist/cjs/server/adapters/nextjs/approval-binding.d.ts +334 -0
- package/dist/cjs/server/adapters/nextjs/approval-binding.js +724 -0
- package/dist/cjs/server/adapters/nextjs/chat-interactions-handler.d.ts +26 -0
- package/dist/cjs/server/adapters/nextjs/chat-interactions-handler.js +67 -0
- package/dist/cjs/server/adapters/nextjs/clarification-resume.d.ts +21 -0
- package/dist/cjs/server/adapters/nextjs/clarification-resume.js +112 -0
- package/dist/cjs/server/adapters/nextjs/context-helpers.d.ts +49 -8
- package/dist/cjs/server/adapters/nextjs/context-helpers.js +76 -21
- package/dist/cjs/server/adapters/nextjs/create-ai-chat-handler.d.ts +59 -1
- package/dist/cjs/server/adapters/nextjs/create-ai-chat-handler.js +648 -94
- package/dist/cjs/server/adapters/nextjs/direct-command.d.ts +75 -0
- package/dist/cjs/server/adapters/nextjs/direct-command.js +322 -0
- package/dist/cjs/server/adapters/nextjs/index.d.ts +10 -2
- package/dist/cjs/server/adapters/nextjs/index.js +24 -1
- package/dist/cjs/server/adapters/nextjs/prepare-model-messages.d.ts +2 -1
- package/dist/cjs/server/adapters/nextjs/prepare-model-messages.js +6 -14
- package/dist/cjs/server/adapters/nextjs/recording-transcription-handler.d.ts +31 -0
- package/dist/cjs/server/adapters/nextjs/recording-transcription-handler.js +58 -0
- package/dist/cjs/server/adapters/nextjs/request-guards.d.ts +41 -0
- package/dist/cjs/server/adapters/nextjs/request-guards.js +112 -0
- package/dist/cjs/server/adapters/nextjs/sanitize-model-messages.js +12 -6
- package/dist/cjs/server/adapters/nextjs/scope-pipeline-tools.d.ts +17 -0
- package/dist/cjs/server/adapters/nextjs/scope-pipeline-tools.js +28 -0
- package/dist/cjs/server/adapters/nextjs/tool-discovery.d.ts +39 -0
- package/dist/cjs/server/adapters/nextjs/tool-discovery.js +50 -0
- package/dist/cjs/server/adapters/nextjs/tool-presentation.d.ts +26 -0
- package/dist/cjs/server/adapters/nextjs/tool-presentation.js +21 -0
- package/dist/cjs/server/adapters/nextjs/types.d.ts +229 -13
- package/dist/cjs/server/adapters/nextjs/with-ai-tool.d.ts +2 -2
- package/dist/cjs/server/core/adaptive-fast-path.d.ts +3 -0
- package/dist/cjs/server/core/adaptive-fast-path.js +188 -0
- package/dist/cjs/server/core/clarification-tool.d.ts +29 -0
- package/dist/cjs/server/core/clarification-tool.js +64 -0
- package/dist/cjs/server/core/generated-ui-tool.d.ts +31 -0
- package/dist/cjs/server/core/generated-ui-tool.js +89 -0
- package/dist/cjs/server/core/index.d.ts +49 -8
- package/dist/cjs/server/core/index.js +208 -17
- package/dist/cjs/server/core/local-guardrails.d.ts +6 -0
- package/dist/cjs/server/core/local-guardrails.js +70 -0
- package/dist/cjs/server/core/module-router.d.ts +3 -1
- package/dist/cjs/server/core/module-router.js +22 -2
- package/dist/cjs/server/core/plan-tool.d.ts +23 -0
- package/dist/cjs/server/core/plan-tool.js +35 -0
- package/dist/cjs/server/core/zod-compact.d.ts +2 -2
- package/dist/cjs/server/core/zod-compact.js +56 -7
- package/dist/cjs/server/index.d.ts +2 -4
- package/dist/cjs/server/index.js +4 -5
- package/dist/cjs/server/lancer/client.js +2 -1
- package/dist/cjs/server/local-pipeline.d.ts +14 -0
- package/dist/cjs/server/local-pipeline.js +154 -0
- package/dist/cjs/server/pii-shield/index.d.ts +1 -0
- package/dist/cjs/server/pii-shield/index.js +3 -1
- package/dist/cjs/server/pii-shield/regex-detector.d.ts +13 -0
- package/dist/cjs/server/pii-shield/regex-detector.js +111 -0
- package/dist/cjs/server/testing/guardrails.js +2 -66
- package/dist/cjs/server/testing/helpers.js +1 -62
- package/dist/cjs/server/testing/index.d.ts +1 -0
- package/dist/cjs/server/testing/index.js +3 -1
- package/dist/cjs/server/testing/registry-parity.d.ts +18 -0
- package/dist/cjs/server/testing/registry-parity.js +40 -0
- package/dist/cjs/server/testing/smoke.d.ts +2 -1
- package/dist/cjs/server/testing/smoke.js +7 -3
- package/dist/cjs/server/testing/types.d.ts +1 -1
- package/dist/cjs/server/testing/zod-introspect.d.ts +1 -1
- package/dist/cjs/server/testing/zod-introspect.js +178 -5
- package/dist/cjs/stt/index.d.ts +5 -0
- package/dist/cjs/stt/index.js +16 -0
- package/dist/cjs/sync/app-setup-client.d.ts +46 -0
- package/dist/cjs/sync/app-setup-client.js +140 -0
- package/dist/cjs/sync/capability-report.d.ts +41 -0
- package/dist/cjs/sync/capability-report.js +52 -0
- package/dist/cjs/sync/connection-lookup.d.ts +19 -0
- package/dist/cjs/sync/connection-lookup.js +58 -0
- package/dist/cjs/sync/control-plane-client.d.ts +69 -0
- package/dist/cjs/sync/control-plane-client.js +186 -0
- package/dist/cjs/sync/deployment-selector.d.ts +9 -0
- package/dist/cjs/sync/deployment-selector.js +29 -0
- package/dist/cjs/sync/fetch-sse-push.d.ts +6 -0
- package/dist/cjs/sync/fetch-sse-push.js +45 -0
- package/dist/cjs/sync/index.d.ts +26 -0
- package/dist/cjs/sync/index.js +43 -0
- package/dist/cjs/sync/jwks-provider.d.ts +14 -0
- package/dist/cjs/sync/jwks-provider.js +56 -0
- package/dist/cjs/sync/local-deployment-validator.d.ts +30 -0
- package/dist/cjs/sync/local-deployment-validator.js +62 -0
- package/dist/cjs/sync/managed-sync.d.ts +40 -0
- package/dist/cjs/sync/managed-sync.js +96 -0
- package/dist/cjs/sync/materialize-deployment.d.ts +7 -0
- package/dist/cjs/sync/materialize-deployment.js +65 -0
- package/dist/cjs/sync/runtime-connect-client.d.ts +23 -0
- package/dist/cjs/sync/runtime-connect-client.js +185 -0
- package/dist/cjs/sync/runtime-setup-client.d.ts +62 -0
- package/dist/cjs/sync/runtime-setup-client.js +157 -0
- package/dist/cjs/sync/signature-verifier.d.ts +39 -0
- package/dist/cjs/sync/signature-verifier.js +102 -0
- package/dist/cjs/sync/state-store.d.ts +24 -0
- package/dist/cjs/sync/state-store.js +51 -0
- package/dist/cjs/sync/sync-manager.d.ts +27 -0
- package/dist/cjs/sync/sync-manager.js +173 -0
- package/dist/cjs/types.d.ts +68 -16
- package/dist/cjs/types.js +30 -2
- package/dist/cli/bin.js +34 -23
- package/dist/cli/bin.js.map +1 -1
- package/dist/cli/commands/agent-setup.d.ts +27 -0
- package/dist/cli/commands/agent-setup.js +149 -0
- package/dist/cli/commands/agent-setup.js.map +1 -0
- package/dist/cli/commands/apply-setup-plan.d.ts +21 -0
- package/dist/cli/commands/apply-setup-plan.js +100 -0
- package/dist/cli/commands/apply-setup-plan.js.map +1 -0
- package/dist/cli/commands/atomic-artifact-write.d.ts +19 -0
- package/dist/cli/commands/atomic-artifact-write.js +106 -0
- package/dist/cli/commands/atomic-artifact-write.js.map +1 -0
- package/dist/cli/commands/ci-workflow.d.ts +48 -0
- package/dist/cli/commands/ci-workflow.js +209 -0
- package/dist/cli/commands/ci-workflow.js.map +1 -0
- package/dist/cli/commands/connect.d.ts +47 -0
- package/dist/cli/commands/connect.js +216 -0
- package/dist/cli/commands/connect.js.map +1 -0
- package/dist/cli/commands/connection-descriptor.d.ts +4 -0
- package/dist/cli/commands/connection-descriptor.js +47 -0
- package/dist/cli/commands/connection-descriptor.js.map +1 -0
- package/dist/cli/commands/connection-environment.d.ts +25 -0
- package/dist/cli/commands/connection-environment.js +151 -0
- package/dist/cli/commands/connection-environment.js.map +1 -0
- package/dist/cli/commands/current-setup-manifests.d.ts +7 -0
- package/dist/cli/commands/current-setup-manifests.js +16 -0
- package/dist/cli/commands/current-setup-manifests.js.map +1 -0
- package/dist/cli/commands/doctor-presentation.d.ts +5 -0
- package/dist/cli/commands/doctor-presentation.js +86 -0
- package/dist/cli/commands/doctor-presentation.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +27 -0
- package/dist/cli/commands/doctor.js +220 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/init-scaffold.d.ts +25 -0
- package/dist/cli/commands/init-scaffold.js +214 -0
- package/dist/cli/commands/init-scaffold.js.map +1 -0
- package/dist/cli/commands/install-skills.d.ts +26 -4
- package/dist/cli/commands/install-skills.js +165 -80
- package/dist/cli/commands/install-skills.js.map +1 -1
- package/dist/cli/commands/installed-skills-manifest.d.ts +87 -0
- package/dist/cli/commands/installed-skills-manifest.js +124 -0
- package/dist/cli/commands/installed-skills-manifest.js.map +1 -0
- package/dist/cli/commands/installer-parts.d.ts +31 -0
- package/dist/cli/commands/installer-parts.js +94 -0
- package/dist/cli/commands/installer-parts.js.map +1 -0
- package/dist/cli/commands/project-inspection.d.ts +35 -0
- package/dist/cli/commands/project-inspection.js +199 -0
- package/dist/cli/commands/project-inspection.js.map +1 -0
- package/dist/cli/commands/setup-plan.d.ts +65 -0
- package/dist/cli/commands/setup-plan.js +234 -0
- package/dist/cli/commands/setup-plan.js.map +1 -0
- package/dist/cli/commands/setup-profile.d.ts +28 -0
- package/dist/cli/commands/setup-profile.js +152 -0
- package/dist/cli/commands/setup-profile.js.map +1 -0
- package/dist/cli/commands/setup-wizard.d.ts +66 -0
- package/dist/cli/commands/setup-wizard.js +241 -0
- package/dist/cli/commands/setup-wizard.js.map +1 -0
- package/dist/cli/commands/sync.d.ts +58 -0
- package/dist/cli/commands/sync.js +233 -0
- package/dist/cli/commands/sync.js.map +1 -0
- package/dist/cli/commands/tools/args.d.ts +14 -0
- package/dist/cli/commands/tools/args.js +33 -0
- package/dist/cli/commands/tools/args.js.map +1 -0
- package/dist/cli/commands/tools/check.d.ts +7 -0
- package/dist/cli/commands/tools/check.js +35 -0
- package/dist/cli/commands/tools/check.js.map +1 -0
- package/dist/cli/commands/tools/describe.d.ts +12 -0
- package/dist/cli/commands/tools/describe.js +43 -0
- package/dist/cli/commands/tools/describe.js.map +1 -0
- package/dist/cli/commands/tools/enrich.d.ts +50 -0
- package/dist/cli/commands/tools/enrich.js +597 -0
- package/dist/cli/commands/tools/enrich.js.map +1 -0
- package/dist/cli/commands/tools/eval.d.ts +13 -0
- package/dist/cli/commands/tools/eval.js +49 -0
- package/dist/cli/commands/tools/eval.js.map +1 -0
- package/dist/cli/commands/tools/format.d.ts +42 -0
- package/dist/cli/commands/tools/format.js +155 -0
- package/dist/cli/commands/tools/format.js.map +1 -0
- package/dist/cli/commands/tools/index.d.ts +26 -0
- package/dist/cli/commands/tools/index.js +107 -0
- package/dist/cli/commands/tools/index.js.map +1 -0
- package/dist/cli/commands/tools/policy.d.ts +11 -0
- package/dist/cli/commands/tools/policy.js +355 -0
- package/dist/cli/commands/tools/policy.js.map +1 -0
- package/dist/cli/commands/tools/refresh.d.ts +6 -0
- package/dist/cli/commands/tools/refresh.js +87 -0
- package/dist/cli/commands/tools/refresh.js.map +1 -0
- package/dist/cli/commands/tools/resolve.d.ts +10 -0
- package/dist/cli/commands/tools/resolve.js +19 -0
- package/dist/cli/commands/tools/resolve.js.map +1 -0
- package/dist/cli/commands/tools/status.d.ts +11 -0
- package/dist/cli/commands/tools/status.js +76 -0
- package/dist/cli/commands/tools/status.js.map +1 -0
- package/dist/cli/commands/tools/verify.d.ts +13 -0
- package/dist/cli/commands/tools/verify.js +168 -0
- package/dist/cli/commands/tools/verify.js.map +1 -0
- package/dist/cli/commands/tools/watch.d.ts +27 -0
- package/dist/cli/commands/tools/watch.js +148 -0
- package/dist/cli/commands/tools/watch.js.map +1 -0
- package/dist/cli/commands/validate-build.d.ts +88 -0
- package/dist/cli/commands/validate-build.js +213 -0
- package/dist/cli/commands/validate-build.js.map +1 -0
- package/dist/cli/commands/workspace-sources.d.ts +27 -0
- package/dist/cli/commands/workspace-sources.js +159 -0
- package/dist/cli/commands/workspace-sources.js.map +1 -0
- package/dist/cli/environment-loading.d.ts +6 -0
- package/dist/cli/environment-loading.js +18 -0
- package/dist/cli/environment-loading.js.map +1 -0
- package/dist/cli/index.d.ts +14 -1
- package/dist/cli/index.js +558 -574
- package/dist/cli/index.js.map +1 -1
- package/dist/codegen/execution-inventory.d.ts +63 -0
- package/dist/codegen/execution-inventory.js +306 -0
- package/dist/codegen/execution-inventory.js.map +1 -0
- package/dist/codegen/index.d.ts +4 -13
- package/dist/codegen/index.js +4 -12
- package/dist/codegen/index.js.map +1 -1
- package/dist/codegen/inventory-generation.d.ts +104 -0
- package/dist/codegen/inventory-generation.js +119 -0
- package/dist/codegen/inventory-generation.js.map +1 -0
- package/dist/codegen/next-source-generation.d.ts +17 -0
- package/dist/codegen/next-source-generation.js +49 -0
- package/dist/codegen/next-source-generation.js.map +1 -0
- package/dist/codegen/openapi-document.d.ts +53 -0
- package/dist/codegen/openapi-document.js +120 -0
- package/dist/codegen/openapi-document.js.map +1 -0
- package/dist/codegen/route-exports.d.ts +13 -0
- package/dist/codegen/route-exports.js +117 -0
- package/dist/codegen/route-exports.js.map +1 -0
- package/dist/codegen/route-fingerprint.d.ts +2 -0
- package/dist/codegen/route-fingerprint.js +9 -0
- package/dist/codegen/route-fingerprint.js.map +1 -0
- package/dist/codegen/route-scanner.d.ts +57 -0
- package/dist/codegen/route-scanner.js +233 -0
- package/dist/codegen/route-scanner.js.map +1 -0
- package/dist/codegen/tools/agentic.d.ts +31 -0
- package/dist/codegen/tools/agentic.js +110 -0
- package/dist/codegen/tools/agentic.js.map +1 -0
- package/dist/codegen/tools/artifact.d.ts +139 -0
- package/dist/codegen/tools/artifact.js +199 -0
- package/dist/codegen/tools/artifact.js.map +1 -0
- package/dist/codegen/tools/canonical.d.ts +12 -0
- package/dist/codegen/tools/canonical.js +41 -0
- package/dist/codegen/tools/canonical.js.map +1 -0
- package/dist/codegen/tools/chat-interactions.d.ts +27 -0
- package/dist/codegen/tools/chat-interactions.js +377 -0
- package/dist/codegen/tools/chat-interactions.js.map +1 -0
- package/dist/codegen/tools/config.d.ts +116 -0
- package/dist/codegen/tools/config.js +172 -0
- package/dist/codegen/tools/config.js.map +1 -0
- package/dist/codegen/tools/contract-tiers.d.ts +64 -0
- package/dist/codegen/tools/contract-tiers.js +518 -0
- package/dist/codegen/tools/contract-tiers.js.map +1 -0
- package/dist/codegen/tools/emit-module.d.ts +13 -0
- package/dist/codegen/tools/emit-module.js +182 -0
- package/dist/codegen/tools/emit-module.js.map +1 -0
- package/dist/codegen/tools/evidence.d.ts +13 -0
- package/dist/codegen/tools/evidence.js +138 -0
- package/dist/codegen/tools/evidence.js.map +1 -0
- package/dist/codegen/tools/exclusions.d.ts +30 -0
- package/dist/codegen/tools/exclusions.js +95 -0
- package/dist/codegen/tools/exclusions.js.map +1 -0
- package/dist/codegen/tools/files.d.ts +195 -0
- package/dist/codegen/tools/files.js +119 -0
- package/dist/codegen/tools/files.js.map +1 -0
- package/dist/codegen/tools/findings.d.ts +7 -0
- package/dist/codegen/tools/findings.js +106 -0
- package/dist/codegen/tools/findings.js.map +1 -0
- package/dist/codegen/tools/handler-analysis.d.ts +49 -0
- package/dist/codegen/tools/handler-analysis.js +375 -0
- package/dist/codegen/tools/handler-analysis.js.map +1 -0
- package/dist/codegen/tools/handler-locator.d.ts +21 -0
- package/dist/codegen/tools/handler-locator.js +152 -0
- package/dist/codegen/tools/handler-locator.js.map +1 -0
- package/dist/codegen/tools/identity.d.ts +18 -0
- package/dist/codegen/tools/identity.js +100 -0
- package/dist/codegen/tools/identity.js.map +1 -0
- package/dist/codegen/tools/input-roles.d.ts +32 -0
- package/dist/codegen/tools/input-roles.js +283 -0
- package/dist/codegen/tools/input-roles.js.map +1 -0
- package/dist/codegen/tools/inputs.d.ts +33 -0
- package/dist/codegen/tools/inputs.js +101 -0
- package/dist/codegen/tools/inputs.js.map +1 -0
- package/dist/codegen/tools/interface-digest.d.ts +14 -0
- package/dist/codegen/tools/interface-digest.js +24 -0
- package/dist/codegen/tools/interface-digest.js.map +1 -0
- package/dist/codegen/tools/mcp-names.d.ts +23 -0
- package/dist/codegen/tools/mcp-names.js +59 -0
- package/dist/codegen/tools/mcp-names.js.map +1 -0
- package/dist/codegen/tools/mode.d.ts +7 -0
- package/dist/codegen/tools/mode.js +27 -0
- package/dist/codegen/tools/mode.js.map +1 -0
- package/dist/codegen/tools/output-inference.d.ts +6 -0
- package/dist/codegen/tools/output-inference.js +99 -0
- package/dist/codegen/tools/output-inference.js.map +1 -0
- package/dist/codegen/tools/pipeline.d.ts +85 -0
- package/dist/codegen/tools/pipeline.js +733 -0
- package/dist/codegen/tools/pipeline.js.map +1 -0
- package/dist/codegen/tools/probe-child.mjs +155 -0
- package/dist/codegen/tools/probe-loader.mjs +105 -0
- package/dist/codegen/tools/program.d.ts +16 -0
- package/dist/codegen/tools/program.js +80 -0
- package/dist/codegen/tools/program.js.map +1 -0
- package/dist/codegen/tools/prose.d.ts +42 -0
- package/dist/codegen/tools/prose.js +211 -0
- package/dist/codegen/tools/prose.js.map +1 -0
- package/dist/codegen/tools/resolutions.d.ts +117 -0
- package/dist/codegen/tools/resolutions.js +195 -0
- package/dist/codegen/tools/resolutions.js.map +1 -0
- package/dist/codegen/tools/routing-eval.d.ts +50 -0
- package/dist/codegen/tools/routing-eval.js +81 -0
- package/dist/codegen/tools/routing-eval.js.map +1 -0
- package/dist/codegen/tools/schema-probe.d.ts +62 -0
- package/dist/codegen/tools/schema-probe.js +209 -0
- package/dist/codegen/tools/schema-probe.js.map +1 -0
- package/dist/codegen/tools/semantics.d.ts +134 -0
- package/dist/codegen/tools/semantics.js +206 -0
- package/dist/codegen/tools/semantics.js.map +1 -0
- package/dist/codegen/tools/sources/app-files.d.ts +35 -0
- package/dist/codegen/tools/sources/app-files.js +109 -0
- package/dist/codegen/tools/sources/app-files.js.map +1 -0
- package/dist/codegen/tools/sources/fastapi-routes.py +177 -0
- package/dist/codegen/tools/sources/nest-decorators.d.ts +27 -0
- package/dist/codegen/tools/sources/nest-decorators.js +65 -0
- package/dist/codegen/tools/sources/nest-decorators.js.map +1 -0
- package/dist/codegen/tools/sources/nest-endpoints.d.ts +10 -0
- package/dist/codegen/tools/sources/nest-endpoints.js +522 -0
- package/dist/codegen/tools/sources/nest-endpoints.js.map +1 -0
- package/dist/codegen/tools/sources/next-endpoints.d.ts +5 -0
- package/dist/codegen/tools/sources/next-endpoints.js +389 -0
- package/dist/codegen/tools/sources/next-endpoints.js.map +1 -0
- package/dist/codegen/tools/sources/next-pages.d.ts +18 -0
- package/dist/codegen/tools/sources/next-pages.js +88 -0
- package/dist/codegen/tools/sources/next-pages.js.map +1 -0
- package/dist/codegen/tools/sources/openapi-endpoints.d.ts +17 -0
- package/dist/codegen/tools/sources/openapi-endpoints.js +395 -0
- package/dist/codegen/tools/sources/openapi-endpoints.js.map +1 -0
- package/dist/codegen/tools/sources/page-tree.d.ts +49 -0
- package/dist/codegen/tools/sources/page-tree.js +152 -0
- package/dist/codegen/tools/sources/page-tree.js.map +1 -0
- package/dist/codegen/tools/sources/react-actions.d.ts +12 -0
- package/dist/codegen/tools/sources/react-actions.js +341 -0
- package/dist/codegen/tools/sources/react-actions.js.map +1 -0
- package/dist/codegen/tools/sources/route-config.d.ts +49 -0
- package/dist/codegen/tools/sources/route-config.js +427 -0
- package/dist/codegen/tools/sources/route-config.js.map +1 -0
- package/dist/codegen/tools/sources/ui-controls.d.ts +41 -0
- package/dist/codegen/tools/sources/ui-controls.js +360 -0
- package/dist/codegen/tools/sources/ui-controls.js.map +1 -0
- package/dist/codegen/tools/sources/ui-tools.d.ts +79 -0
- package/dist/codegen/tools/sources/ui-tools.js +207 -0
- package/dist/codegen/tools/sources/ui-tools.js.map +1 -0
- package/dist/codegen/tools/sources/url-filters.d.ts +41 -0
- package/dist/codegen/tools/sources/url-filters.js +813 -0
- package/dist/codegen/tools/sources/url-filters.js.map +1 -0
- package/dist/codegen/tools/sources/vue-sfc.d.ts +22 -0
- package/dist/codegen/tools/sources/vue-sfc.js +65 -0
- package/dist/codegen/tools/sources/vue-sfc.js.map +1 -0
- package/dist/codegen/tools/state.d.ts +37 -0
- package/dist/codegen/tools/state.js +249 -0
- package/dist/codegen/tools/state.js.map +1 -0
- package/dist/codegen/tools/types.d.ts +137 -0
- package/dist/codegen/tools/types.js +2 -0
- package/dist/codegen/tools/types.js.map +1 -0
- package/dist/codegen/tools/worklist.d.ts +157 -0
- package/dist/codegen/tools/worklist.js +406 -0
- package/dist/codegen/tools/worklist.js.map +1 -0
- package/dist/contracts/app-setup.d.ts +346 -0
- package/dist/contracts/app-setup.js +205 -0
- package/dist/contracts/app-setup.js.map +1 -0
- package/dist/contracts/chat-command.d.ts +65 -0
- package/dist/contracts/chat-command.js +121 -0
- package/dist/contracts/chat-command.js.map +1 -0
- package/dist/contracts/chat-interactions.d.ts +126 -0
- package/dist/contracts/chat-interactions.js +431 -0
- package/dist/contracts/chat-interactions.js.map +1 -0
- package/dist/contracts/clarification.d.ts +53 -0
- package/dist/contracts/clarification.js +86 -0
- package/dist/contracts/clarification.js.map +1 -0
- package/dist/contracts/content-boundary.d.ts +3 -0
- package/dist/contracts/content-boundary.js +91 -0
- package/dist/contracts/content-boundary.js.map +1 -0
- package/dist/contracts/events.d.ts +273 -0
- package/dist/contracts/events.js +227 -0
- package/dist/contracts/events.js.map +1 -0
- package/dist/contracts/index.d.ts +18 -0
- package/dist/contracts/index.js +10 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/plan.d.ts +20 -0
- package/dist/contracts/plan.js +35 -0
- package/dist/contracts/plan.js.map +1 -0
- package/dist/contracts/platform-connection.d.ts +44 -0
- package/dist/contracts/platform-connection.js +64 -0
- package/dist/contracts/platform-connection.js.map +1 -0
- package/dist/contracts/platform-prompt-revision.d.ts +27 -0
- package/dist/contracts/platform-prompt-revision.js +44 -0
- package/dist/contracts/platform-prompt-revision.js.map +1 -0
- package/dist/contracts/prompt-bundle.d.ts +46 -0
- package/dist/contracts/prompt-bundle.js +70 -0
- package/dist/contracts/prompt-bundle.js.map +1 -0
- package/dist/contracts/revisions.d.ts +716 -0
- package/dist/contracts/revisions.js +298 -0
- package/dist/contracts/revisions.js.map +1 -0
- package/dist/contracts/runtime.d.ts +55 -0
- package/dist/contracts/runtime.js +65 -0
- package/dist/contracts/runtime.js.map +1 -0
- package/dist/contracts/semantic-change.d.ts +27 -0
- package/dist/contracts/semantic-change.js +101 -0
- package/dist/contracts/semantic-change.js.map +1 -0
- package/dist/contracts/tool-exclude-pattern.d.ts +12 -0
- package/dist/contracts/tool-exclude-pattern.js +27 -0
- package/dist/contracts/tool-exclude-pattern.js.map +1 -0
- package/dist/contracts/tool-policy-entry.d.ts +107 -0
- package/dist/contracts/tool-policy-entry.js +40 -0
- package/dist/contracts/tool-policy-entry.js.map +1 -0
- package/dist/contracts/tool-policy.d.ts +198 -0
- package/dist/contracts/tool-policy.js +485 -0
- package/dist/contracts/tool-policy.js.map +1 -0
- package/dist/contracts/url.d.ts +2 -0
- package/dist/contracts/url.js +8 -0
- package/dist/contracts/url.js.map +1 -0
- package/dist/diagnostics/foundation-diagnostic.d.ts +34 -0
- package/dist/diagnostics/foundation-diagnostic.js +47 -0
- package/dist/diagnostics/foundation-diagnostic.js.map +1 -0
- package/dist/diagnostics/index.d.ts +2 -0
- package/dist/diagnostics/index.js +2 -0
- package/dist/diagnostics/index.js.map +1 -0
- package/dist/embed/chat-styles.generated.d.ts +1 -0
- package/dist/embed/chat-styles.generated.js +4 -0
- package/dist/embed/chat-styles.generated.js.map +1 -0
- package/dist/embed/glirastes-chat-element.d.ts +67 -0
- package/dist/embed/glirastes-chat-element.js +278 -0
- package/dist/embed/glirastes-chat-element.js.map +1 -0
- package/dist/embed/index.d.ts +4 -0
- package/dist/embed/index.js +11 -0
- package/dist/embed/index.js.map +1 -0
- package/dist/embed/theme.d.ts +10 -0
- package/dist/embed/theme.js +41 -0
- package/dist/embed/theme.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/react/assistant/assistant-layout.d.ts +55 -0
- package/dist/react/assistant/assistant-layout.js +99 -0
- package/dist/react/assistant/assistant-layout.js.map +1 -0
- package/dist/react/assistant/assistant-shell.d.ts +132 -0
- package/dist/react/assistant/assistant-shell.js +262 -0
- package/dist/react/assistant/assistant-shell.js.map +1 -0
- package/dist/react/assistant/assistant-shortcut-list.d.ts +24 -0
- package/dist/react/assistant/assistant-shortcut-list.js +32 -0
- package/dist/react/assistant/assistant-shortcut-list.js.map +1 -0
- package/dist/react/assistant/assistant-workspace.d.ts +31 -0
- package/dist/react/assistant/assistant-workspace.js +31 -0
- package/dist/react/assistant/assistant-workspace.js.map +1 -0
- package/dist/react/completions/completion-search.d.ts +21 -0
- package/dist/react/completions/completion-search.js +109 -0
- package/dist/react/completions/completion-search.js.map +1 -0
- package/dist/react/completions/ui-tool-command-provider.d.ts +15 -0
- package/dist/react/completions/ui-tool-command-provider.js +82 -0
- package/dist/react/completions/ui-tool-command-provider.js.map +1 -0
- package/dist/react/components/activity-log.d.ts +17 -0
- package/dist/react/components/activity-log.js +68 -0
- package/dist/react/components/activity-log.js.map +1 -0
- package/dist/react/components/ai-chat-panel.js +13 -6
- package/dist/react/components/ai-chat-panel.js.map +1 -1
- package/dist/react/components/ai-trigger-button.d.ts +1 -1
- package/dist/react/components/ai-trigger-button.js +13 -68
- package/dist/react/components/ai-trigger-button.js.map +1 -1
- package/dist/react/components/approval-card.js +20 -1
- package/dist/react/components/approval-card.js.map +1 -1
- package/dist/react/components/chat-input.js +7 -5
- package/dist/react/components/chat-input.js.map +1 -1
- package/dist/react/components/chat-window-visibility.d.ts +3 -0
- package/dist/react/components/chat-window-visibility.js +5 -0
- package/dist/react/components/chat-window-visibility.js.map +1 -0
- package/dist/react/components/chat-window.d.ts +1 -1
- package/dist/react/components/chat-window.js +124 -57
- package/dist/react/components/chat-window.js.map +1 -1
- package/dist/react/components/clarification-card.d.ts +10 -0
- package/dist/react/components/clarification-card.js +33 -0
- package/dist/react/components/clarification-card.js.map +1 -0
- package/dist/react/components/command-arguments-form.d.ts +10 -0
- package/dist/react/components/command-arguments-form.js +151 -0
- package/dist/react/components/command-arguments-form.js.map +1 -0
- package/dist/react/components/confirm-dialog.js +1 -1
- package/dist/react/components/confirm-dialog.js.map +1 -1
- package/dist/react/components/floating-chat-ui.d.ts +3 -3
- package/dist/react/components/floating-chat-ui.js +31 -5
- package/dist/react/components/floating-chat-ui.js.map +1 -1
- package/dist/react/components/mention-input.d.ts +5 -4
- package/dist/react/components/mention-input.js +65 -8
- package/dist/react/components/mention-input.js.map +1 -1
- package/dist/react/components/message-bubble.js +90 -14
- package/dist/react/components/message-bubble.js.map +1 -1
- package/dist/react/components/plan-checklist.d.ts +14 -0
- package/dist/react/components/plan-checklist.js +18 -0
- package/dist/react/components/plan-checklist.js.map +1 -0
- package/dist/react/components/recording-bar.js +45 -59
- package/dist/react/components/recording-bar.js.map +1 -1
- package/dist/react/components/rich-mention-input.js +199 -47
- package/dist/react/components/rich-mention-input.js.map +1 -1
- package/dist/react/components/session-switcher.d.ts +3 -1
- package/dist/react/components/session-switcher.js +27 -12
- package/dist/react/components/session-switcher.js.map +1 -1
- package/dist/react/components/status-icon.d.ts +8 -0
- package/dist/react/components/status-icon.js +9 -0
- package/dist/react/components/status-icon.js.map +1 -0
- package/dist/react/components/stream-waveform.d.ts +4 -0
- package/dist/react/components/stream-waveform.js +47 -0
- package/dist/react/components/stream-waveform.js.map +1 -0
- package/dist/react/components/voice-input-addon.d.ts +16 -1
- package/dist/react/components/voice-input-addon.js +256 -19
- package/dist/react/components/voice-input-addon.js.map +1 -1
- package/dist/react/components/voice-input-button.js +1 -1
- package/dist/react/components/voice-input-button.js.map +1 -1
- package/dist/react/hooks/use-chat-shortcuts.d.ts +33 -0
- package/dist/react/hooks/use-chat-shortcuts.js +133 -0
- package/dist/react/hooks/use-chat-shortcuts.js.map +1 -0
- package/dist/react/hooks/use-deepgram-transcription.d.ts +4 -0
- package/dist/react/hooks/use-deepgram-transcription.js +32 -322
- package/dist/react/hooks/use-deepgram-transcription.js.map +1 -1
- package/dist/react/hooks/use-drag-resize-panel.d.ts +1 -0
- package/dist/react/hooks/use-drag-resize-panel.js +246 -121
- package/dist/react/hooks/use-drag-resize-panel.js.map +1 -1
- package/dist/react/hooks/use-floating-panel.d.ts +57 -0
- package/dist/react/hooks/use-floating-panel.js +215 -0
- package/dist/react/hooks/use-floating-panel.js.map +1 -0
- package/dist/react/hooks/use-keyboard-shortcut.js +2 -1
- package/dist/react/hooks/use-keyboard-shortcut.js.map +1 -1
- package/dist/react/hooks/use-push-to-talk-hotkey.d.ts +24 -0
- package/dist/react/hooks/use-push-to-talk-hotkey.js +112 -0
- package/dist/react/hooks/use-push-to-talk-hotkey.js.map +1 -0
- package/dist/react/hooks/use-sidebar-resize.d.ts +19 -0
- package/dist/react/hooks/use-sidebar-resize.js +107 -0
- package/dist/react/hooks/use-sidebar-resize.js.map +1 -0
- package/dist/react/index.d.ts +30 -1
- package/dist/react/index.js +31 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/interactions/definitions.d.ts +67 -0
- package/dist/react/interactions/definitions.js +78 -0
- package/dist/react/interactions/definitions.js.map +1 -0
- package/dist/react/interactions/registry.d.ts +74 -0
- package/dist/react/interactions/registry.js +248 -0
- package/dist/react/interactions/registry.js.map +1 -0
- package/dist/react/interactions/use-chat-interactions-data.d.ts +15 -0
- package/dist/react/interactions/use-chat-interactions-data.js +41 -0
- package/dist/react/interactions/use-chat-interactions-data.js.map +1 -0
- package/dist/react/locale-de.d.ts +3 -0
- package/dist/react/locale-de.js +67 -0
- package/dist/react/locale-de.js.map +1 -0
- package/dist/react/provider/ai-chat-provider.d.ts +1 -1
- package/dist/react/provider/ai-chat-provider.js +411 -107
- package/dist/react/provider/ai-chat-provider.js.map +1 -1
- package/dist/react/provider/chat-context.d.ts +52 -1
- package/dist/react/provider/chat-context.js.map +1 -1
- package/dist/react/stt/controller.d.ts +60 -0
- package/dist/react/stt/controller.js +265 -0
- package/dist/react/stt/controller.js.map +1 -0
- package/dist/react/stt/deepgram.d.ts +30 -0
- package/dist/react/stt/deepgram.js +199 -0
- package/dist/react/stt/deepgram.js.map +1 -0
- package/dist/react/stt/recorded.d.ts +29 -0
- package/dist/react/stt/recorded.js +111 -0
- package/dist/react/stt/recorded.js.map +1 -0
- package/dist/react/stt/segments.d.ts +18 -0
- package/dist/react/stt/segments.js +29 -0
- package/dist/react/stt/segments.js.map +1 -0
- package/dist/react/stt/use-stt.d.ts +17 -0
- package/dist/react/stt/use-stt.js +39 -0
- package/dist/react/stt/use-stt.js.map +1 -0
- package/dist/react/stt/waveform.d.ts +5 -0
- package/dist/react/stt/waveform.js +29 -0
- package/dist/react/stt/waveform.js.map +1 -0
- package/dist/react/styles.css +784 -126
- package/dist/react/tool-renderers/registry.d.ts +31 -0
- package/dist/react/tool-renderers/registry.js +47 -0
- package/dist/react/tool-renderers/registry.js.map +1 -0
- package/dist/react/tool-renderers/renderer-boundary.d.ts +18 -0
- package/dist/react/tool-renderers/renderer-boundary.js +12 -0
- package/dist/react/tool-renderers/renderer-boundary.js.map +1 -0
- package/dist/react/transports/vercel/vercel-ai-chat.d.ts +1 -1
- package/dist/react/transports/vercel/vercel-ai-chat.js +2 -2
- package/dist/react/transports/vercel/vercel-ai-chat.js.map +1 -1
- package/dist/react/transports/vercel.d.ts +6 -0
- package/dist/react/transports/vercel.js +11 -6
- package/dist/react/transports/vercel.js.map +1 -1
- package/dist/react/types.d.ts +269 -6
- package/dist/react/ui.d.ts +18 -17
- package/dist/react/ui.js +46 -43
- package/dist/react/ui.js.map +1 -1
- package/dist/react/unstyled.d.ts +7 -0
- package/dist/react/unstyled.js +8 -0
- package/dist/react/unstyled.js.map +1 -0
- package/dist/react/utils/activity.d.ts +16 -0
- package/dist/react/utils/activity.js +77 -0
- package/dist/react/utils/activity.js.map +1 -0
- package/dist/react/utils/clarification.d.ts +31 -0
- package/dist/react/utils/clarification.js +99 -0
- package/dist/react/utils/clarification.js.map +1 -0
- package/dist/react/utils/create-approval-description.d.ts +6 -0
- package/dist/react/utils/create-approval-description.js +42 -7
- package/dist/react/utils/create-approval-description.js.map +1 -1
- package/dist/react/utils/create-tool-result-handler.d.ts +1 -1
- package/dist/react/utils/create-tool-result-handler.js +1 -1
- package/dist/react/utils/create-tool-result-handler.js.map +1 -1
- package/dist/react/utils/entity-names.d.ts +6 -0
- package/dist/react/utils/entity-names.js +55 -0
- package/dist/react/utils/entity-names.js.map +1 -0
- package/dist/react/utils/followup-suggestions.d.ts +11 -0
- package/dist/react/utils/followup-suggestions.js +37 -0
- package/dist/react/utils/followup-suggestions.js.map +1 -0
- package/dist/react/utils/local-session-store.d.ts +30 -0
- package/dist/react/utils/local-session-store.js +163 -0
- package/dist/react/utils/local-session-store.js.map +1 -0
- package/dist/react/utils/mention-markup.d.ts +44 -1
- package/dist/react/utils/mention-markup.js +140 -10
- package/dist/react/utils/mention-markup.js.map +1 -1
- package/dist/react/utils/tool-presentation.d.ts +23 -0
- package/dist/react/utils/tool-presentation.js +41 -0
- package/dist/react/utils/tool-presentation.js.map +1 -0
- package/dist/react/utils/tool-result-config.d.ts +10 -0
- package/dist/react/utils/tool-result-config.js +12 -0
- package/dist/react/utils/tool-result-config.js.map +1 -0
- package/dist/runtime/ai-sdk/engine.d.ts +66 -0
- package/dist/runtime/ai-sdk/engine.js +188 -0
- package/dist/runtime/ai-sdk/engine.js.map +1 -0
- package/dist/runtime/ai-sdk/index.d.ts +1 -0
- package/dist/runtime/ai-sdk/index.js +2 -0
- package/dist/runtime/ai-sdk/index.js.map +1 -0
- package/dist/runtime/authorization.d.ts +16 -0
- package/dist/runtime/authorization.js +33 -0
- package/dist/runtime/authorization.js.map +1 -0
- package/dist/runtime/budget.d.ts +39 -0
- package/dist/runtime/budget.js +97 -0
- package/dist/runtime/budget.js.map +1 -0
- package/dist/runtime/contract-bindings.d.ts +52 -0
- package/dist/runtime/contract-bindings.js +92 -0
- package/dist/runtime/contract-bindings.js.map +1 -0
- package/dist/runtime/engine.d.ts +52 -0
- package/dist/runtime/engine.js +2 -0
- package/dist/runtime/engine.js.map +1 -0
- package/dist/runtime/fingerprint.d.ts +6 -0
- package/dist/runtime/fingerprint.js +29 -0
- package/dist/runtime/fingerprint.js.map +1 -0
- package/dist/runtime/glirastes.d.ts +113 -0
- package/dist/runtime/glirastes.js +287 -0
- package/dist/runtime/glirastes.js.map +1 -0
- package/dist/runtime/index.d.ts +24 -0
- package/dist/runtime/index.js +24 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/json-schema.d.ts +13 -0
- package/dist/runtime/json-schema.js +41 -0
- package/dist/runtime/json-schema.js.map +1 -0
- package/dist/runtime/local-limits.d.ts +6 -0
- package/dist/runtime/local-limits.js +23 -0
- package/dist/runtime/local-limits.js.map +1 -0
- package/dist/runtime/local-runtime-source.d.ts +76 -0
- package/dist/runtime/local-runtime-source.js +0 -0
- package/dist/runtime/local-runtime-source.js.map +1 -0
- package/dist/runtime/local-signer.d.ts +17 -0
- package/dist/runtime/local-signer.js +32 -0
- package/dist/runtime/local-signer.js.map +1 -0
- package/dist/runtime/local-tool-bindings.d.ts +57 -0
- package/dist/runtime/local-tool-bindings.js +190 -0
- package/dist/runtime/local-tool-bindings.js.map +1 -0
- package/dist/runtime/managed-turn.d.ts +29 -0
- package/dist/runtime/managed-turn.js +97 -0
- package/dist/runtime/managed-turn.js.map +1 -0
- package/dist/runtime/metrics/cost.d.ts +64 -0
- package/dist/runtime/metrics/cost.js +92 -0
- package/dist/runtime/metrics/cost.js.map +1 -0
- package/dist/runtime/metrics/sink.d.ts +56 -0
- package/dist/runtime/metrics/sink.js +214 -0
- package/dist/runtime/metrics/sink.js.map +1 -0
- package/dist/runtime/metrics/turn-recorder.d.ts +62 -0
- package/dist/runtime/metrics/turn-recorder.js +170 -0
- package/dist/runtime/metrics/turn-recorder.js.map +1 -0
- package/dist/runtime/offline-execution-lease.d.ts +27 -0
- package/dist/runtime/offline-execution-lease.js +46 -0
- package/dist/runtime/offline-execution-lease.js.map +1 -0
- package/dist/runtime/policy-overlay.d.ts +86 -0
- package/dist/runtime/policy-overlay.js +117 -0
- package/dist/runtime/policy-overlay.js.map +1 -0
- package/dist/runtime/postgres-store.d.ts +111 -0
- package/dist/runtime/postgres-store.js +363 -0
- package/dist/runtime/postgres-store.js.map +1 -0
- package/dist/runtime/prompt-bundle-store.d.ts +58 -0
- package/dist/runtime/prompt-bundle-store.js +120 -0
- package/dist/runtime/prompt-bundle-store.js.map +1 -0
- package/dist/runtime/runtime-mode.d.ts +23 -0
- package/dist/runtime/runtime-mode.js +42 -0
- package/dist/runtime/runtime-mode.js.map +1 -0
- package/dist/runtime/sdk-version.d.ts +2 -0
- package/dist/runtime/sdk-version.js +3 -0
- package/dist/runtime/sdk-version.js.map +1 -0
- package/dist/runtime/tool-discovery.d.ts +51 -0
- package/dist/runtime/tool-discovery.js +138 -0
- package/dist/runtime/tool-discovery.js.map +1 -0
- package/dist/runtime/tool-search.d.ts +31 -0
- package/dist/runtime/tool-search.js +145 -0
- package/dist/runtime/tool-search.js.map +1 -0
- package/dist/runtime/turn-snapshot.d.ts +44 -0
- package/dist/runtime/turn-snapshot.js +108 -0
- package/dist/runtime/turn-snapshot.js.map +1 -0
- package/dist/server/adapters/nextjs/approval-binding.d.ts +334 -0
- package/dist/server/adapters/nextjs/approval-binding.js +707 -0
- package/dist/server/adapters/nextjs/approval-binding.js.map +1 -0
- package/dist/server/adapters/nextjs/chat-interactions-handler.d.ts +26 -0
- package/dist/server/adapters/nextjs/chat-interactions-handler.js +65 -0
- package/dist/server/adapters/nextjs/chat-interactions-handler.js.map +1 -0
- package/dist/server/adapters/nextjs/clarification-resume.d.ts +21 -0
- package/dist/server/adapters/nextjs/clarification-resume.js +109 -0
- package/dist/server/adapters/nextjs/clarification-resume.js.map +1 -0
- package/dist/server/adapters/nextjs/context-helpers.d.ts +49 -8
- package/dist/server/adapters/nextjs/context-helpers.js +75 -21
- package/dist/server/adapters/nextjs/context-helpers.js.map +1 -1
- package/dist/server/adapters/nextjs/create-ai-chat-handler.d.ts +59 -1
- package/dist/server/adapters/nextjs/create-ai-chat-handler.js +647 -95
- package/dist/server/adapters/nextjs/create-ai-chat-handler.js.map +1 -1
- package/dist/server/adapters/nextjs/direct-command.d.ts +75 -0
- package/dist/server/adapters/nextjs/direct-command.js +316 -0
- package/dist/server/adapters/nextjs/direct-command.js.map +1 -0
- package/dist/server/adapters/nextjs/index.d.ts +10 -2
- package/dist/server/adapters/nextjs/index.js +7 -0
- package/dist/server/adapters/nextjs/index.js.map +1 -1
- package/dist/server/adapters/nextjs/prepare-model-messages.d.ts +2 -1
- package/dist/server/adapters/nextjs/prepare-model-messages.js +7 -15
- package/dist/server/adapters/nextjs/prepare-model-messages.js.map +1 -1
- package/dist/server/adapters/nextjs/recording-transcription-handler.d.ts +31 -0
- package/dist/server/adapters/nextjs/recording-transcription-handler.js +55 -0
- package/dist/server/adapters/nextjs/recording-transcription-handler.js.map +1 -0
- package/dist/server/adapters/nextjs/request-guards.d.ts +41 -0
- package/dist/server/adapters/nextjs/request-guards.js +108 -0
- package/dist/server/adapters/nextjs/request-guards.js.map +1 -0
- package/dist/server/adapters/nextjs/sanitize-model-messages.js +12 -6
- package/dist/server/adapters/nextjs/sanitize-model-messages.js.map +1 -1
- package/dist/server/adapters/nextjs/scope-pipeline-tools.d.ts +17 -0
- package/dist/server/adapters/nextjs/scope-pipeline-tools.js +26 -0
- package/dist/server/adapters/nextjs/scope-pipeline-tools.js.map +1 -0
- package/dist/server/adapters/nextjs/tool-discovery.d.ts +39 -0
- package/dist/server/adapters/nextjs/tool-discovery.js +47 -0
- package/dist/server/adapters/nextjs/tool-discovery.js.map +1 -0
- package/dist/server/adapters/nextjs/tool-presentation.d.ts +26 -0
- package/dist/server/adapters/nextjs/tool-presentation.js +19 -0
- package/dist/server/adapters/nextjs/tool-presentation.js.map +1 -0
- package/dist/server/adapters/nextjs/types.d.ts +229 -13
- package/dist/server/adapters/nextjs/with-ai-tool.d.ts +2 -2
- package/dist/server/core/adaptive-fast-path.d.ts +3 -0
- package/dist/server/core/adaptive-fast-path.js +185 -0
- package/dist/server/core/adaptive-fast-path.js.map +1 -0
- package/dist/server/core/clarification-tool.d.ts +29 -0
- package/dist/server/core/clarification-tool.js +61 -0
- package/dist/server/core/clarification-tool.js.map +1 -0
- package/dist/server/core/generated-ui-tool.d.ts +31 -0
- package/dist/server/core/generated-ui-tool.js +87 -0
- package/dist/server/core/generated-ui-tool.js.map +1 -0
- package/dist/server/core/index.d.ts +49 -8
- package/dist/server/core/index.js +198 -16
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/core/local-guardrails.d.ts +6 -0
- package/dist/server/core/local-guardrails.js +68 -0
- package/dist/server/core/local-guardrails.js.map +1 -0
- package/dist/server/core/module-router.d.ts +3 -1
- package/dist/server/core/module-router.js +22 -2
- package/dist/server/core/module-router.js.map +1 -1
- package/dist/server/core/plan-tool.d.ts +23 -0
- package/dist/server/core/plan-tool.js +32 -0
- package/dist/server/core/plan-tool.js.map +1 -0
- package/dist/server/core/zod-compact.d.ts +2 -2
- package/dist/server/core/zod-compact.js +56 -7
- package/dist/server/core/zod-compact.js.map +1 -1
- package/dist/server/index.d.ts +2 -4
- package/dist/server/index.js +2 -4
- package/dist/server/index.js.map +1 -1
- package/dist/server/lancer/client.js +2 -1
- package/dist/server/lancer/client.js.map +1 -1
- package/dist/server/local-pipeline.d.ts +14 -0
- package/dist/server/local-pipeline.js +152 -0
- package/dist/server/local-pipeline.js.map +1 -0
- package/dist/server/pii-shield/index.d.ts +1 -0
- package/dist/server/pii-shield/index.js +1 -0
- package/dist/server/pii-shield/index.js.map +1 -1
- package/dist/server/pii-shield/regex-detector.d.ts +13 -0
- package/dist/server/pii-shield/regex-detector.js +109 -0
- package/dist/server/pii-shield/regex-detector.js.map +1 -0
- package/dist/server/testing/guardrails.js +1 -65
- package/dist/server/testing/guardrails.js.map +1 -1
- package/dist/server/testing/helpers.js +1 -62
- package/dist/server/testing/helpers.js.map +1 -1
- package/dist/server/testing/index.d.ts +1 -0
- package/dist/server/testing/index.js +1 -0
- package/dist/server/testing/index.js.map +1 -1
- package/dist/server/testing/registry-parity.d.ts +18 -0
- package/dist/server/testing/registry-parity.js +38 -0
- package/dist/server/testing/registry-parity.js.map +1 -0
- package/dist/server/testing/smoke.d.ts +2 -1
- package/dist/server/testing/smoke.js +5 -3
- package/dist/server/testing/smoke.js.map +1 -1
- package/dist/server/testing/types.d.ts +1 -1
- package/dist/server/testing/zod-introspect.d.ts +1 -1
- package/dist/server/testing/zod-introspect.js +178 -5
- package/dist/server/testing/zod-introspect.js.map +1 -1
- package/dist/stt/index.d.ts +5 -0
- package/dist/stt/index.js +6 -0
- package/dist/stt/index.js.map +1 -0
- package/dist/sync/app-setup-client.d.ts +46 -0
- package/dist/sync/app-setup-client.js +137 -0
- package/dist/sync/app-setup-client.js.map +1 -0
- package/dist/sync/capability-report.d.ts +41 -0
- package/dist/sync/capability-report.js +48 -0
- package/dist/sync/capability-report.js.map +1 -0
- package/dist/sync/connection-lookup.d.ts +19 -0
- package/dist/sync/connection-lookup.js +56 -0
- package/dist/sync/connection-lookup.js.map +1 -0
- package/dist/sync/control-plane-client.d.ts +69 -0
- package/dist/sync/control-plane-client.js +182 -0
- package/dist/sync/control-plane-client.js.map +1 -0
- package/dist/sync/deployment-selector.d.ts +9 -0
- package/dist/sync/deployment-selector.js +26 -0
- package/dist/sync/deployment-selector.js.map +1 -0
- package/dist/sync/fetch-sse-push.d.ts +6 -0
- package/dist/sync/fetch-sse-push.js +42 -0
- package/dist/sync/fetch-sse-push.js.map +1 -0
- package/dist/sync/index.d.ts +26 -0
- package/dist/sync/index.js +17 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/jwks-provider.d.ts +14 -0
- package/dist/sync/jwks-provider.js +53 -0
- package/dist/sync/jwks-provider.js.map +1 -0
- package/dist/sync/local-deployment-validator.d.ts +30 -0
- package/dist/sync/local-deployment-validator.js +60 -0
- package/dist/sync/local-deployment-validator.js.map +1 -0
- package/dist/sync/managed-sync.d.ts +40 -0
- package/dist/sync/managed-sync.js +94 -0
- package/dist/sync/managed-sync.js.map +1 -0
- package/dist/sync/materialize-deployment.d.ts +7 -0
- package/dist/sync/materialize-deployment.js +63 -0
- package/dist/sync/materialize-deployment.js.map +1 -0
- package/dist/sync/runtime-connect-client.d.ts +23 -0
- package/dist/sync/runtime-connect-client.js +182 -0
- package/dist/sync/runtime-connect-client.js.map +1 -0
- package/dist/sync/runtime-setup-client.d.ts +62 -0
- package/dist/sync/runtime-setup-client.js +153 -0
- package/dist/sync/runtime-setup-client.js.map +1 -0
- package/dist/sync/signature-verifier.d.ts +39 -0
- package/dist/sync/signature-verifier.js +97 -0
- package/dist/sync/signature-verifier.js.map +1 -0
- package/dist/sync/state-store.d.ts +24 -0
- package/dist/sync/state-store.js +47 -0
- package/dist/sync/state-store.js.map +1 -0
- package/dist/sync/sync-manager.d.ts +27 -0
- package/dist/sync/sync-manager.js +170 -0
- package/dist/sync/sync-manager.js.map +1 -0
- package/dist/types.d.ts +68 -16
- package/dist/types.js +30 -2
- package/dist/types.js.map +1 -1
- package/embed/package.json +5 -0
- package/package.json +187 -46
- package/runtime/ai-sdk/package.json +5 -0
- package/runtime/package.json +5 -0
- package/skills/README.md +26 -92
- package/skills/building-glirastes-chat-ui/SKILL.md +358 -343
- package/skills/describing-glirastes-tools/SKILL.md +180 -0
- package/skills/integrating-glirastes-nextjs/SKILL.md +142 -302
- package/skills/integrating-glirastes-web/SKILL.md +165 -0
- package/skills/maintaining-glirastes-tools/SKILL.md +133 -461
- package/skills/migrating-to-glirastes/SKILL.md +112 -0
- package/skills/setting-up-glirastes/SKILL.md +194 -0
- package/skills/setting-up-glirastes/agents/openai.yaml +4 -0
- package/skills/setting-up-glirastes/references/artifact-contract.md +40 -0
- package/skills/setting-up-glirastes/scripts/validate-artifact.ts +23 -0
- package/skills/setting-up-glirastes/templates/interview.md +19 -0
- package/stt/package.json +5 -0
- package/dist/cjs/codegen/asset-sync.d.ts +0 -20
- package/dist/cjs/codegen/asset-sync.js +0 -28
- package/dist/cjs/codegen/coverage.d.ts +0 -66
- package/dist/cjs/codegen/coverage.js +0 -408
- package/dist/cjs/codegen/endpoint-scanner.d.ts +0 -16
- package/dist/cjs/codegen/endpoint-scanner.js +0 -197
- package/dist/cjs/codegen/mcp-generator.d.ts +0 -50
- package/dist/cjs/codegen/mcp-generator.js +0 -803
- package/dist/cjs/codegen/module-generator.d.ts +0 -11
- package/dist/cjs/codegen/module-generator.js +0 -353
- package/dist/cjs/codegen/nestjs-scanner.d.ts +0 -43
- package/dist/cjs/codegen/nestjs-scanner.js +0 -241
- package/dist/cjs/codegen/output-recommender.d.ts +0 -23
- package/dist/cjs/codegen/output-recommender.js +0 -33
- package/dist/cjs/codegen/scaffolder.d.ts +0 -36
- package/dist/cjs/codegen/scaffolder.js +0 -262
- package/dist/cjs/codegen/skill-generator.d.ts +0 -49
- package/dist/cjs/codegen/skill-generator.js +0 -967
- package/dist/cjs/codegen/ui-scanner.d.ts +0 -24
- package/dist/cjs/codegen/ui-scanner.js +0 -202
- package/dist/cjs/codegen/validator.d.ts +0 -35
- package/dist/cjs/codegen/validator.js +0 -292
- package/dist/cjs/openapi/index.d.ts +0 -78
- package/dist/cjs/openapi/index.js +0 -347
- package/dist/cjs/react/components/wavesurfer-loader.d.ts +0 -5
- package/dist/cjs/react/components/wavesurfer-loader.js +0 -36
- package/dist/cjs/react/transports/langgraph/index.d.ts +0 -2
- package/dist/cjs/react/transports/langgraph/index.js +0 -8
- package/dist/cjs/react/transports/langgraph/langgraph-ai-chat.d.ts +0 -62
- package/dist/cjs/react/transports/langgraph/langgraph-ai-chat.js +0 -94
- package/dist/cjs/react/transports/langgraph.d.ts +0 -71
- package/dist/cjs/react/transports/langgraph.js +0 -369
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-auth.guard.d.ts +0 -10
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-auth.guard.js +0 -42
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-module-options.interface.d.ts +0 -32
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-module-options.interface.js +0 -4
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.controller.d.ts +0 -11
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.controller.js +0 -80
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.module.d.ts +0 -9
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.module.js +0 -119
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.service.d.ts +0 -13
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.service.js +0 -131
- package/dist/cjs/server/adapters/nestjs/chat/dto/ai-chat-request.dto.d.ts +0 -7
- package/dist/cjs/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js +0 -52
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message-part.dto.d.ts +0 -19
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message-part.dto.js +0 -108
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message.dto.d.ts +0 -8
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message.dto.js +0 -59
- package/dist/cjs/server/adapters/nestjs/chat/dto/index.d.ts +0 -3
- package/dist/cjs/server/adapters/nestjs/chat/dto/index.js +0 -9
- package/dist/cjs/server/adapters/nestjs/chat/index.d.ts +0 -3
- package/dist/cjs/server/adapters/nestjs/chat/index.js +0 -9
- package/dist/cjs/server/adapters/nestjs/chat/speech-stream.gateway.d.ts +0 -4
- package/dist/cjs/server/adapters/nestjs/chat/speech-stream.gateway.js +0 -73
- package/dist/cjs/server/adapters/nestjs/chat/ws-loader.d.ts +0 -5
- package/dist/cjs/server/adapters/nestjs/chat/ws-loader.js +0 -72
- package/dist/cjs/server/adapters/nestjs/decorators/ai-module.decorator.d.ts +0 -6
- package/dist/cjs/server/adapters/nestjs/decorators/ai-module.decorator.js +0 -13
- package/dist/cjs/server/adapters/nestjs/decorators/ai-param.decorator.d.ts +0 -5
- package/dist/cjs/server/adapters/nestjs/decorators/ai-param.decorator.js +0 -15
- package/dist/cjs/server/adapters/nestjs/decorators/ai-tool.decorator.d.ts +0 -6
- package/dist/cjs/server/adapters/nestjs/decorators/ai-tool.decorator.js +0 -22
- package/dist/cjs/server/adapters/nestjs/decorators/constants.d.ts +0 -4
- package/dist/cjs/server/adapters/nestjs/decorators/constants.js +0 -7
- package/dist/cjs/server/adapters/nestjs/index.d.ts +0 -14
- package/dist/cjs/server/adapters/nestjs/index.js +0 -42
- package/dist/cjs/server/adapters/nestjs/metadata.d.ts +0 -39
- package/dist/cjs/server/adapters/nestjs/metadata.js +0 -36
- package/dist/cjs/server/adapters/nestjs/module/ai-tools-explorer.service.d.ts +0 -36
- package/dist/cjs/server/adapters/nestjs/module/ai-tools-explorer.service.js +0 -159
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.module.d.ts +0 -37
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.module.js +0 -44
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.service.d.ts +0 -28
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.service.js +0 -41
- package/dist/cjs/server/adapters/nestjs/scanner/nestjs-scanner.d.ts +0 -16
- package/dist/cjs/server/adapters/nestjs/scanner/nestjs-scanner.js +0 -117
- package/dist/cjs/server/adapters/nestjs/scanner/schema-builder.d.ts +0 -26
- package/dist/cjs/server/adapters/nestjs/scanner/schema-builder.js +0 -259
- package/dist/cjs/server/adapters/nestjs/swagger.d.ts +0 -7
- package/dist/cjs/server/adapters/nestjs/swagger.js +0 -39
- package/dist/cli/commands/check-upgrade.d.ts +0 -15
- package/dist/cli/commands/check-upgrade.js +0 -138
- package/dist/cli/commands/check-upgrade.js.map +0 -1
- package/dist/cli/commands/test.d.ts +0 -8
- package/dist/cli/commands/test.js +0 -76
- package/dist/cli/commands/test.js.map +0 -1
- package/dist/cli/utils/changelog-parser.d.ts +0 -13
- package/dist/cli/utils/changelog-parser.js +0 -89
- package/dist/cli/utils/changelog-parser.js.map +0 -1
- package/dist/cli/utils/commit-parser.d.ts +0 -8
- package/dist/cli/utils/commit-parser.js +0 -23
- package/dist/cli/utils/commit-parser.js.map +0 -1
- package/dist/cli/utils/gap-detector.d.ts +0 -14
- package/dist/cli/utils/gap-detector.js +0 -65
- package/dist/cli/utils/gap-detector.js.map +0 -1
- package/dist/cli/utils/get-cli-version.d.ts +0 -2
- package/dist/cli/utils/get-cli-version.js +0 -10
- package/dist/cli/utils/get-cli-version.js.map +0 -1
- package/dist/codegen/asset-sync.d.ts +0 -20
- package/dist/codegen/asset-sync.js +0 -26
- package/dist/codegen/asset-sync.js.map +0 -1
- package/dist/codegen/coverage.d.ts +0 -66
- package/dist/codegen/coverage.js +0 -372
- package/dist/codegen/coverage.js.map +0 -1
- package/dist/codegen/endpoint-scanner.d.ts +0 -16
- package/dist/codegen/endpoint-scanner.js +0 -161
- package/dist/codegen/endpoint-scanner.js.map +0 -1
- package/dist/codegen/mcp-generator.d.ts +0 -50
- package/dist/codegen/mcp-generator.js +0 -801
- package/dist/codegen/mcp-generator.js.map +0 -1
- package/dist/codegen/module-generator.d.ts +0 -11
- package/dist/codegen/module-generator.js +0 -351
- package/dist/codegen/module-generator.js.map +0 -1
- package/dist/codegen/nestjs-scanner.d.ts +0 -43
- package/dist/codegen/nestjs-scanner.js +0 -239
- package/dist/codegen/nestjs-scanner.js.map +0 -1
- package/dist/codegen/output-recommender.d.ts +0 -23
- package/dist/codegen/output-recommender.js +0 -31
- package/dist/codegen/output-recommender.js.map +0 -1
- package/dist/codegen/scaffolder.d.ts +0 -36
- package/dist/codegen/scaffolder.js +0 -259
- package/dist/codegen/scaffolder.js.map +0 -1
- package/dist/codegen/skill-generator.d.ts +0 -49
- package/dist/codegen/skill-generator.js +0 -965
- package/dist/codegen/skill-generator.js.map +0 -1
- package/dist/codegen/ui-scanner.d.ts +0 -24
- package/dist/codegen/ui-scanner.js +0 -197
- package/dist/codegen/ui-scanner.js.map +0 -1
- package/dist/codegen/validator.d.ts +0 -35
- package/dist/codegen/validator.js +0 -256
- package/dist/codegen/validator.js.map +0 -1
- package/dist/openapi/demo-generate.d.ts +0 -1
- package/dist/openapi/demo-generate.js +0 -15
- package/dist/openapi/demo-generate.js.map +0 -1
- package/dist/openapi/index.d.ts +0 -78
- package/dist/openapi/index.js +0 -341
- package/dist/openapi/index.js.map +0 -1
- package/dist/react/components/wavesurfer-loader.d.ts +0 -5
- package/dist/react/components/wavesurfer-loader.js +0 -34
- package/dist/react/components/wavesurfer-loader.js.map +0 -1
- package/dist/react/transports/langgraph/index.d.ts +0 -2
- package/dist/react/transports/langgraph/index.js +0 -3
- package/dist/react/transports/langgraph/index.js.map +0 -1
- package/dist/react/transports/langgraph/langgraph-ai-chat.d.ts +0 -62
- package/dist/react/transports/langgraph/langgraph-ai-chat.js +0 -92
- package/dist/react/transports/langgraph/langgraph-ai-chat.js.map +0 -1
- package/dist/react/transports/langgraph.d.ts +0 -71
- package/dist/react/transports/langgraph.js +0 -366
- package/dist/react/transports/langgraph.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/ai-chat-auth.guard.d.ts +0 -10
- package/dist/server/adapters/nestjs/chat/ai-chat-auth.guard.js +0 -40
- package/dist/server/adapters/nestjs/chat/ai-chat-auth.guard.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/ai-chat-module-options.interface.d.ts +0 -32
- package/dist/server/adapters/nestjs/chat/ai-chat-module-options.interface.js +0 -2
- package/dist/server/adapters/nestjs/chat/ai-chat-module-options.interface.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/ai-chat.controller.d.ts +0 -11
- package/dist/server/adapters/nestjs/chat/ai-chat.controller.js +0 -78
- package/dist/server/adapters/nestjs/chat/ai-chat.controller.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/ai-chat.module.d.ts +0 -9
- package/dist/server/adapters/nestjs/chat/ai-chat.module.js +0 -117
- package/dist/server/adapters/nestjs/chat/ai-chat.module.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/ai-chat.service.d.ts +0 -13
- package/dist/server/adapters/nestjs/chat/ai-chat.service.js +0 -129
- package/dist/server/adapters/nestjs/chat/ai-chat.service.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/dto/ai-chat-request.dto.d.ts +0 -7
- package/dist/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js +0 -49
- package/dist/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/dto/chat-message-part.dto.d.ts +0 -19
- package/dist/server/adapters/nestjs/chat/dto/chat-message-part.dto.js +0 -105
- package/dist/server/adapters/nestjs/chat/dto/chat-message-part.dto.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/dto/chat-message.dto.d.ts +0 -8
- package/dist/server/adapters/nestjs/chat/dto/chat-message.dto.js +0 -56
- package/dist/server/adapters/nestjs/chat/dto/chat-message.dto.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/dto/index.d.ts +0 -3
- package/dist/server/adapters/nestjs/chat/dto/index.js +0 -4
- package/dist/server/adapters/nestjs/chat/dto/index.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/index.d.ts +0 -3
- package/dist/server/adapters/nestjs/chat/index.js +0 -3
- package/dist/server/adapters/nestjs/chat/index.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/speech-stream.gateway.d.ts +0 -4
- package/dist/server/adapters/nestjs/chat/speech-stream.gateway.js +0 -71
- package/dist/server/adapters/nestjs/chat/speech-stream.gateway.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/ws-loader.d.ts +0 -5
- package/dist/server/adapters/nestjs/chat/ws-loader.js +0 -37
- package/dist/server/adapters/nestjs/chat/ws-loader.js.map +0 -1
- package/dist/server/adapters/nestjs/decorators/ai-module.decorator.d.ts +0 -6
- package/dist/server/adapters/nestjs/decorators/ai-module.decorator.js +0 -11
- package/dist/server/adapters/nestjs/decorators/ai-module.decorator.js.map +0 -1
- package/dist/server/adapters/nestjs/decorators/ai-param.decorator.d.ts +0 -5
- package/dist/server/adapters/nestjs/decorators/ai-param.decorator.js +0 -13
- package/dist/server/adapters/nestjs/decorators/ai-param.decorator.js.map +0 -1
- package/dist/server/adapters/nestjs/decorators/ai-tool.decorator.d.ts +0 -6
- package/dist/server/adapters/nestjs/decorators/ai-tool.decorator.js +0 -20
- package/dist/server/adapters/nestjs/decorators/ai-tool.decorator.js.map +0 -1
- package/dist/server/adapters/nestjs/decorators/constants.d.ts +0 -4
- package/dist/server/adapters/nestjs/decorators/constants.js +0 -5
- package/dist/server/adapters/nestjs/decorators/constants.js.map +0 -1
- package/dist/server/adapters/nestjs/index.d.ts +0 -14
- package/dist/server/adapters/nestjs/index.js +0 -20
- package/dist/server/adapters/nestjs/index.js.map +0 -1
- package/dist/server/adapters/nestjs/metadata.d.ts +0 -39
- package/dist/server/adapters/nestjs/metadata.js +0 -30
- package/dist/server/adapters/nestjs/metadata.js.map +0 -1
- package/dist/server/adapters/nestjs/module/ai-tools-explorer.service.d.ts +0 -36
- package/dist/server/adapters/nestjs/module/ai-tools-explorer.service.js +0 -156
- package/dist/server/adapters/nestjs/module/ai-tools-explorer.service.js.map +0 -1
- package/dist/server/adapters/nestjs/module/ai-tools.module.d.ts +0 -37
- package/dist/server/adapters/nestjs/module/ai-tools.module.js +0 -42
- package/dist/server/adapters/nestjs/module/ai-tools.module.js.map +0 -1
- package/dist/server/adapters/nestjs/module/ai-tools.service.d.ts +0 -28
- package/dist/server/adapters/nestjs/module/ai-tools.service.js +0 -38
- package/dist/server/adapters/nestjs/module/ai-tools.service.js.map +0 -1
- package/dist/server/adapters/nestjs/scanner/nestjs-scanner.d.ts +0 -16
- package/dist/server/adapters/nestjs/scanner/nestjs-scanner.js +0 -115
- package/dist/server/adapters/nestjs/scanner/nestjs-scanner.js.map +0 -1
- package/dist/server/adapters/nestjs/scanner/schema-builder.d.ts +0 -26
- package/dist/server/adapters/nestjs/scanner/schema-builder.js +0 -255
- package/dist/server/adapters/nestjs/scanner/schema-builder.js.map +0 -1
- package/dist/server/adapters/nestjs/swagger.d.ts +0 -7
- package/dist/server/adapters/nestjs/swagger.js +0 -37
- package/dist/server/adapters/nestjs/swagger.js.map +0 -1
- package/openapi/package.json +0 -5
- package/react/langgraph/package.json +0 -5
- package/server/nestjs/package.json +0 -5
- package/skills/integrating-glirastes-nestjs/SKILL.md +0 -346
- package/skills/integrating-glirastes-nextjs-with-nestjs-backend/SKILL.md +0 -359
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type ChatCommandInvocation } from '../../../contracts/chat-command.js';
|
|
2
|
+
import type { ManagedTurnGuard } from '../../../runtime/managed-turn.js';
|
|
3
|
+
import type { TurnMetricsRecorder } from '../../../runtime/metrics/turn-recorder.js';
|
|
4
|
+
import type { PiiShield, ToolRegistry } from '../../../types.js';
|
|
5
|
+
import type { ApprovalBinder, ApprovalStore } from './approval-binding.js';
|
|
6
|
+
/** A direct command in the latest user message, and where its turn stands. */
|
|
7
|
+
export interface DirectCommandRequest {
|
|
8
|
+
readonly invocation: ChatCommandInvocation;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
/** The user's answer to this command's confirmation request. */
|
|
11
|
+
readonly approval?: {
|
|
12
|
+
readonly toolCallId: string;
|
|
13
|
+
/** The approval id the client sent back; `runDirectCommand` verifies its binding. */
|
|
14
|
+
readonly approvalId: string;
|
|
15
|
+
readonly approved: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** The command already ran or was refused; nothing is left to do. */
|
|
18
|
+
readonly settled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Reads the latest user message as a direct command. The assistant message
|
|
22
|
+
* that follows it (an approval continuation) decides whether the command
|
|
23
|
+
* still waits for its confirmation answer or is settled.
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveDirectCommand(messages: ReadonlyArray<unknown>): DirectCommandRequest | undefined;
|
|
26
|
+
/** The model's copy of the history: earlier command markers removed, the visible label kept. */
|
|
27
|
+
export declare function stripChatCommandMessages(messages: ReadonlyArray<unknown>): unknown[];
|
|
28
|
+
/**
|
|
29
|
+
* The model's copy of a message with the arguments of its direct-command
|
|
30
|
+
* tool parts pseudonymized. A model-written call is pseudonymized already
|
|
31
|
+
* (it is rehydrated only at execution), but a command's arguments are what
|
|
32
|
+
* the user typed, and later model turns replay the call to the provider.
|
|
33
|
+
* The same session as the user messages' labels, so one value gets one
|
|
34
|
+
* pseudonym everywhere.
|
|
35
|
+
*/
|
|
36
|
+
export declare function pseudonymizeCommandToolInputs(message: Record<string, unknown>, shield: PiiShield, sessionId: string): Promise<Record<string, unknown>>;
|
|
37
|
+
/**
|
|
38
|
+
* The registry key of the command's tool: the tool whose id is the
|
|
39
|
+
* definition id, else the key spelled like it. SDK built-ins never run as
|
|
40
|
+
* direct commands.
|
|
41
|
+
*/
|
|
42
|
+
export declare function resolveCommandToolName(registry: ToolRegistry, tool: string): string | undefined;
|
|
43
|
+
export interface RunDirectCommandOptions {
|
|
44
|
+
command: DirectCommandRequest;
|
|
45
|
+
/** The turn's registry, built exactly like for a model turn. */
|
|
46
|
+
registry: ToolRegistry;
|
|
47
|
+
/** `toolsToAiTools(registry, …)`, after the same wrappers as the model path. */
|
|
48
|
+
tools: Record<string, unknown>;
|
|
49
|
+
managedTurn?: ManagedTurnGuard;
|
|
50
|
+
turnMetrics?: TurnMetricsRecorder;
|
|
51
|
+
/**
|
|
52
|
+
* Binds the approval request to the command's tool call and verifies the
|
|
53
|
+
* answer. Without it a tool that needs confirmation neither asks nor runs
|
|
54
|
+
* (`approval_binding_unavailable`): an unbound approval would let a forged
|
|
55
|
+
* history run the command.
|
|
56
|
+
*/
|
|
57
|
+
approvals?: ApprovalBinder;
|
|
58
|
+
/** Optional single-use store for verified approvals. */
|
|
59
|
+
approvalStore?: ApprovalStore;
|
|
60
|
+
/** The scope handed to the store with each approval (see `approvalScope`); default `''`. */
|
|
61
|
+
approvalScope?: string;
|
|
62
|
+
onError?: (error: unknown) => void;
|
|
63
|
+
/** Suffix of the tool call and approval ids; default 20 random hex characters. */
|
|
64
|
+
generateId?: () => string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Runs a direct command without a model call. The tool goes through the
|
|
68
|
+
* same AI SDK wrapper as on the model path: input schema, the managed guard
|
|
69
|
+
* (manifest, principal, roles, revocation, budget), confirmation
|
|
70
|
+
* (`needsApproval` / the policy) and audit. A tool that needs confirmation
|
|
71
|
+
* answers with an AI SDK approval request; the approval continuation runs
|
|
72
|
+
* it. One content-free metric event per request: no model, unknown cost,
|
|
73
|
+
* the executed call (or none) as tool count.
|
|
74
|
+
*/
|
|
75
|
+
export declare function runDirectCommand(options: RunDirectCommandOptions): Promise<Response>;
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveDirectCommand = resolveDirectCommand;
|
|
4
|
+
exports.stripChatCommandMessages = stripChatCommandMessages;
|
|
5
|
+
exports.pseudonymizeCommandToolInputs = pseudonymizeCommandToolInputs;
|
|
6
|
+
exports.resolveCommandToolName = resolveCommandToolName;
|
|
7
|
+
exports.runDirectCommand = runDirectCommand;
|
|
8
|
+
const node_crypto_1 = require("node:crypto");
|
|
9
|
+
const ai_1 = require("ai");
|
|
10
|
+
const chat_command_js_1 = require("../../../contracts/chat-command.js");
|
|
11
|
+
const engine_js_1 = require("../../../runtime/ai-sdk/engine.js");
|
|
12
|
+
const local_tool_bindings_js_1 = require("../../../runtime/local-tool-bindings.js");
|
|
13
|
+
const cost_js_1 = require("../../../runtime/metrics/cost.js");
|
|
14
|
+
const tool_discovery_js_1 = require("./tool-discovery.js");
|
|
15
|
+
function isRecord(value) {
|
|
16
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
17
|
+
}
|
|
18
|
+
function textOf(message) {
|
|
19
|
+
if (typeof message.content === 'string')
|
|
20
|
+
return message.content;
|
|
21
|
+
if (!Array.isArray(message.parts))
|
|
22
|
+
return '';
|
|
23
|
+
return message.parts
|
|
24
|
+
.filter((part) => isRecord(part) && part.type === 'text' && typeof part.text === 'string')
|
|
25
|
+
.map((part) => part.text)
|
|
26
|
+
.join('\n');
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Reads the latest user message as a direct command. The assistant message
|
|
30
|
+
* that follows it (an approval continuation) decides whether the command
|
|
31
|
+
* still waits for its confirmation answer or is settled.
|
|
32
|
+
*/
|
|
33
|
+
function resolveDirectCommand(messages) {
|
|
34
|
+
let index = messages.length - 1;
|
|
35
|
+
while (index >= 0 && !(isRecord(messages[index]) && messages[index].role === 'user'))
|
|
36
|
+
index -= 1;
|
|
37
|
+
if (index < 0)
|
|
38
|
+
return undefined;
|
|
39
|
+
const parsed = (0, chat_command_js_1.parseChatCommandMessage)(textOf(messages[index]));
|
|
40
|
+
if (!parsed)
|
|
41
|
+
return undefined;
|
|
42
|
+
const next = messages[index + 1];
|
|
43
|
+
if (next === undefined)
|
|
44
|
+
return parsed;
|
|
45
|
+
const parts = isRecord(next) && next.role === 'assistant' && Array.isArray(next.parts) ? next.parts : [];
|
|
46
|
+
const call = parts.find((part) => isRecord(part) && (0, chat_command_js_1.isChatCommandToolCallId)(part.toolCallId));
|
|
47
|
+
if (call?.state === 'approval-responded' && isRecord(call.approval)) {
|
|
48
|
+
return {
|
|
49
|
+
...parsed,
|
|
50
|
+
approval: {
|
|
51
|
+
toolCallId: call.toolCallId,
|
|
52
|
+
approvalId: typeof call.approval.id === 'string' ? call.approval.id : '',
|
|
53
|
+
approved: call.approval.approved === true,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return { ...parsed, settled: true };
|
|
58
|
+
}
|
|
59
|
+
/** The model's copy of the history: earlier command markers removed, the visible label kept. */
|
|
60
|
+
function stripChatCommandMessages(messages) {
|
|
61
|
+
return messages.map((message) => {
|
|
62
|
+
if (!isRecord(message) || message.role !== 'user')
|
|
63
|
+
return message;
|
|
64
|
+
if (typeof message.content === 'string') {
|
|
65
|
+
const content = (0, chat_command_js_1.stripChatCommandMarkers)(message.content);
|
|
66
|
+
return content === message.content ? message : { ...message, content };
|
|
67
|
+
}
|
|
68
|
+
if (!Array.isArray(message.parts))
|
|
69
|
+
return message;
|
|
70
|
+
let changed = false;
|
|
71
|
+
const parts = message.parts.map((part) => {
|
|
72
|
+
if (!isRecord(part) || part.type !== 'text' || typeof part.text !== 'string')
|
|
73
|
+
return part;
|
|
74
|
+
const text = (0, chat_command_js_1.stripChatCommandMarkers)(part.text);
|
|
75
|
+
if (text === part.text)
|
|
76
|
+
return part;
|
|
77
|
+
changed = true;
|
|
78
|
+
return { ...part, text };
|
|
79
|
+
});
|
|
80
|
+
return changed ? { ...message, parts } : message;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/** Nesting deeper than this is not walked: it is replaced instead of reaching the model unchecked. */
|
|
84
|
+
const MAX_PSEUDONYMIZED_DEPTH = 8;
|
|
85
|
+
const REDACTED = '[redacted]';
|
|
86
|
+
/** Pseudonymizes every string of a value in order; numbers, booleans and null stay. */
|
|
87
|
+
async function pseudonymizeStrings(value, shield, sessionId, depth = 0) {
|
|
88
|
+
if (typeof value === 'string')
|
|
89
|
+
return shield.outbound(value, sessionId);
|
|
90
|
+
if (typeof value !== 'object' || value === null)
|
|
91
|
+
return value;
|
|
92
|
+
if (depth >= MAX_PSEUDONYMIZED_DEPTH)
|
|
93
|
+
return REDACTED;
|
|
94
|
+
if (Array.isArray(value)) {
|
|
95
|
+
const items = [];
|
|
96
|
+
for (const item of value)
|
|
97
|
+
items.push(await pseudonymizeStrings(item, shield, sessionId, depth + 1));
|
|
98
|
+
return items;
|
|
99
|
+
}
|
|
100
|
+
const entries = [];
|
|
101
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
102
|
+
entries.push([key, await pseudonymizeStrings(entry, shield, sessionId, depth + 1)]);
|
|
103
|
+
}
|
|
104
|
+
return Object.fromEntries(entries);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* The model's copy of a message with the arguments of its direct-command
|
|
108
|
+
* tool parts pseudonymized. A model-written call is pseudonymized already
|
|
109
|
+
* (it is rehydrated only at execution), but a command's arguments are what
|
|
110
|
+
* the user typed, and later model turns replay the call to the provider.
|
|
111
|
+
* The same session as the user messages' labels, so one value gets one
|
|
112
|
+
* pseudonym everywhere.
|
|
113
|
+
*/
|
|
114
|
+
async function pseudonymizeCommandToolInputs(message, shield, sessionId) {
|
|
115
|
+
if (!Array.isArray(message.parts))
|
|
116
|
+
return message;
|
|
117
|
+
let changed = false;
|
|
118
|
+
const parts = [];
|
|
119
|
+
for (const part of message.parts) {
|
|
120
|
+
if (!isRecord(part) || !(0, chat_command_js_1.isChatCommandToolCallId)(part.toolCallId)) {
|
|
121
|
+
parts.push(part);
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
// `rawInput` stands in for `input` when a call failed validation.
|
|
125
|
+
const next = { ...part };
|
|
126
|
+
for (const key of ['input', 'rawInput']) {
|
|
127
|
+
if (part[key] === undefined)
|
|
128
|
+
continue;
|
|
129
|
+
next[key] = await pseudonymizeStrings(part[key], shield, sessionId);
|
|
130
|
+
changed = true;
|
|
131
|
+
}
|
|
132
|
+
parts.push(next);
|
|
133
|
+
}
|
|
134
|
+
return changed ? { ...message, parts } : message;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The registry key of the command's tool: the tool whose id is the
|
|
138
|
+
* definition id, else the key spelled like it. SDK built-ins never run as
|
|
139
|
+
* direct commands.
|
|
140
|
+
*/
|
|
141
|
+
function resolveCommandToolName(registry, tool) {
|
|
142
|
+
const builtins = new Set(tool_discovery_js_1.NON_DOMAIN_TOOL_NAMES);
|
|
143
|
+
const names = Object.keys(registry).filter((name) => !builtins.has(name));
|
|
144
|
+
return names.find((name) => registry[name].id === tool)
|
|
145
|
+
?? names.find((name) => name === tool || name === (0, local_tool_bindings_js_1.modelFacingToolName)(tool));
|
|
146
|
+
}
|
|
147
|
+
/** Content-free reason for the client: a denial code from the guard, never a backend message. */
|
|
148
|
+
function failureCode(error) {
|
|
149
|
+
const message = error instanceof Error ? error.message : '';
|
|
150
|
+
const denied = /^Tool execution denied: ([a-z_]{1,80})\b/.exec(message);
|
|
151
|
+
if (denied)
|
|
152
|
+
return denied[1];
|
|
153
|
+
if (/ timed out after \d+ms$/.test(message))
|
|
154
|
+
return 'command_timeout';
|
|
155
|
+
return 'command_failed';
|
|
156
|
+
}
|
|
157
|
+
function failedResult(result) {
|
|
158
|
+
return isRecord(result) && (typeof result.error === 'string' || result.success === false);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* 20 hex characters: the tool call id stays within 40 characters, the
|
|
162
|
+
* shortest provider limit (OpenAI), because later model turns replay it.
|
|
163
|
+
*/
|
|
164
|
+
function shortId() {
|
|
165
|
+
return (0, node_crypto_1.randomUUID)().replace(/-/g, '').slice(0, 20);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Runs a direct command without a model call. The tool goes through the
|
|
169
|
+
* same AI SDK wrapper as on the model path: input schema, the managed guard
|
|
170
|
+
* (manifest, principal, roles, revocation, budget), confirmation
|
|
171
|
+
* (`needsApproval` / the policy) and audit. A tool that needs confirmation
|
|
172
|
+
* answers with an AI SDK approval request; the approval continuation runs
|
|
173
|
+
* it. One content-free metric event per request: no model, unknown cost,
|
|
174
|
+
* the executed call (or none) as tool count.
|
|
175
|
+
*/
|
|
176
|
+
async function runDirectCommand(options) {
|
|
177
|
+
const { command, registry, managedTurn, turnMetrics } = options;
|
|
178
|
+
const nextId = options.generateId ?? shortId;
|
|
179
|
+
const name = resolveCommandToolName(registry, command.invocation.tool);
|
|
180
|
+
const toolName = name ?? (0, local_tool_bindings_js_1.modelFacingToolName)(command.invocation.tool);
|
|
181
|
+
const record = (calls, failures) => {
|
|
182
|
+
turnMetrics?.recordStep({
|
|
183
|
+
model: null,
|
|
184
|
+
inputTokens: 0,
|
|
185
|
+
outputTokens: 0,
|
|
186
|
+
cost: cost_js_1.UNKNOWN_TURN_COST,
|
|
187
|
+
toolNames: calls > 0 ? [toolName] : [],
|
|
188
|
+
failedToolNames: failures > 0 ? [toolName] : [],
|
|
189
|
+
});
|
|
190
|
+
turnMetrics?.finish({ status: 'completed', errorCode: null });
|
|
191
|
+
};
|
|
192
|
+
const stream = (0, ai_1.createUIMessageStream)({
|
|
193
|
+
onError: () => 'Command failed',
|
|
194
|
+
execute: async ({ writer }) => {
|
|
195
|
+
try {
|
|
196
|
+
writer.write({ type: 'start' });
|
|
197
|
+
if (command.settled) {
|
|
198
|
+
writer.write({ type: 'finish' });
|
|
199
|
+
record(0, 0);
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const toolCallId = command.approval?.toolCallId ?? `${chat_command_js_1.CHAT_COMMAND_TOOL_CALL_PREFIX}${nextId()}`;
|
|
203
|
+
const fresh = command.approval === undefined;
|
|
204
|
+
if (fresh) {
|
|
205
|
+
writer.write({ type: 'start-step' });
|
|
206
|
+
writer.write({ type: 'tool-input-available', toolCallId, toolName, input: command.invocation.args });
|
|
207
|
+
}
|
|
208
|
+
const end = (calls, failures) => {
|
|
209
|
+
if (fresh)
|
|
210
|
+
writer.write({ type: 'finish-step' });
|
|
211
|
+
writer.write({ type: 'finish' });
|
|
212
|
+
record(calls, failures);
|
|
213
|
+
};
|
|
214
|
+
const fail = (errorText) => {
|
|
215
|
+
writer.write({ type: 'tool-output-error', toolCallId, errorText });
|
|
216
|
+
end(1, 1);
|
|
217
|
+
};
|
|
218
|
+
if (!name || !options.tools[name]) {
|
|
219
|
+
fail('command_tool_unavailable');
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
const parsed = registry[name].inputSchema.safeParse(command.invocation.args);
|
|
223
|
+
if (!parsed.success) {
|
|
224
|
+
fail('command_input_invalid');
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
if (command.approval && !command.approval.approved) {
|
|
228
|
+
writer.write({ type: 'tool-output-denied', toolCallId });
|
|
229
|
+
end(0, 0);
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (command.approval) {
|
|
233
|
+
// The approval comes from the client's history: it runs only if
|
|
234
|
+
// this server asked for exactly this call.
|
|
235
|
+
const refuse = (code) => {
|
|
236
|
+
writer.write({ type: 'tool-output-error', toolCallId, errorText: code });
|
|
237
|
+
end(0, 0);
|
|
238
|
+
};
|
|
239
|
+
const verified = options.approvals?.verify({
|
|
240
|
+
approvalId: command.approval.approvalId,
|
|
241
|
+
toolCallId,
|
|
242
|
+
toolName: name,
|
|
243
|
+
input: command.invocation.args,
|
|
244
|
+
});
|
|
245
|
+
if (!verified?.ok) {
|
|
246
|
+
refuse(verified?.code ?? 'approval_not_issued');
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
if (options.approvalStore) {
|
|
250
|
+
try {
|
|
251
|
+
if (!(await options.approvalStore.consume(verified.key, verified.expiresAtMs, { scope: options.approvalScope ?? '' }))) {
|
|
252
|
+
refuse('approval_already_used');
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
catch {
|
|
257
|
+
refuse('approval_store_unavailable');
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
const tool = (0, engine_js_1.createAiSdkTools)({
|
|
263
|
+
tools: { [name]: options.tools[name] },
|
|
264
|
+
...(managedTurn
|
|
265
|
+
? {
|
|
266
|
+
beforeToolCall: managedTurn.beforeToolCall,
|
|
267
|
+
afterToolCall: managedTurn.afterToolCall,
|
|
268
|
+
onToolError: managedTurn.onToolError,
|
|
269
|
+
resolveApproval: managedTurn.resolveApproval,
|
|
270
|
+
toolTimeoutMs: managedTurn.toolTimeoutMs,
|
|
271
|
+
}
|
|
272
|
+
: {}),
|
|
273
|
+
})[name];
|
|
274
|
+
const executionOptions = { toolCallId, messages: [] };
|
|
275
|
+
if (fresh) {
|
|
276
|
+
let needsApproval;
|
|
277
|
+
try {
|
|
278
|
+
needsApproval = typeof tool.needsApproval === 'function'
|
|
279
|
+
? Boolean(await tool.needsApproval(command.invocation.args, executionOptions))
|
|
280
|
+
: tool.needsApproval === true;
|
|
281
|
+
}
|
|
282
|
+
catch (error) {
|
|
283
|
+
fail(failureCode(error));
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
if (needsApproval) {
|
|
287
|
+
if (!options.approvals) {
|
|
288
|
+
writer.write({ type: 'tool-output-error', toolCallId, errorText: 'approval_binding_unavailable' });
|
|
289
|
+
end(0, 0);
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
writer.write({
|
|
293
|
+
type: 'tool-approval-request',
|
|
294
|
+
approvalId: options.approvals.issue({ toolCallId, toolName: name, input: command.invocation.args }),
|
|
295
|
+
toolCallId,
|
|
296
|
+
});
|
|
297
|
+
end(0, 0);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
let output;
|
|
302
|
+
try {
|
|
303
|
+
// The wrapped tool parses the arguments itself and hands the tool
|
|
304
|
+
// the schema output once; parsing them here first would parse twice.
|
|
305
|
+
output = await tool.execute(command.invocation.args, executionOptions);
|
|
306
|
+
}
|
|
307
|
+
catch (error) {
|
|
308
|
+
fail(failureCode(error));
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
writer.write({ type: 'tool-output-available', toolCallId, output });
|
|
312
|
+
end(1, failedResult(output) ? 1 : 0);
|
|
313
|
+
}
|
|
314
|
+
catch (error) {
|
|
315
|
+
turnMetrics?.finish({ status: 'error', errorCode: 'pipeline_error' });
|
|
316
|
+
options.onError?.(error);
|
|
317
|
+
throw error;
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
});
|
|
321
|
+
return (0, ai_1.createUIMessageStreamResponse)({ stream });
|
|
322
|
+
}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
export { withAiTool } from './with-ai-tool.js';
|
|
2
2
|
export { createAiChatHandler, type StreamHandlerContext, type AiChatHandlerFullConfig, } from './create-ai-chat-handler.js';
|
|
3
|
-
export { extractOrigin, buildRuntimeContext, buildToolContext, createInternalApiCallerFromRequest, } from './context-helpers.js';
|
|
3
|
+
export { extractOrigin, buildRuntimeContext, buildToolContext, createInternalApiCallerFromRequest, type OriginOptions, } from './context-helpers.js';
|
|
4
4
|
export { sanitizeModelMessages } from './sanitize-model-messages.js';
|
|
5
5
|
export { prepareModelMessages, wrapToolsForVercelAi, type PrepareModelMessagesOptions, } from './prepare-model-messages.js';
|
|
6
6
|
export { executeTool } from './server-action-helper.js';
|
|
7
|
+
export { createHybridToolDiscovery, NON_DOMAIN_TOOL_NAMES, type HybridToolDiscovery, } from './tool-discovery.js';
|
|
8
|
+
export { applyClarificationResume, resolveClarificationResume, type ClarificationResume, } from './clarification-resume.js';
|
|
9
|
+
export { createChatInteractionsHandler, type ChatInteractionsHandlerConfig, } from './chat-interactions-handler.js';
|
|
10
|
+
export { createRecordingTranscriptionHandler, DEFAULT_RECORDING_LANGUAGES, type RecordingTranscriptionHandlerConfig, } from './recording-transcription-handler.js';
|
|
11
|
+
export type { ApprovalStore, ApprovalDenialCode } from './approval-binding.js';
|
|
12
|
+
export { resolveDirectCommand, runDirectCommand, stripChatCommandMessages, type DirectCommandRequest, type RunDirectCommandOptions, } from './direct-command.js';
|
|
13
|
+
export { formatChatCommandMessage, parseChatCommandMessage, type ChatCommandInvocation, } from '../../../contracts/chat-command.js';
|
|
14
|
+
export { chatText, mergeChatInteractions, parseChatInteractionOverrides, parseChatInteractions, type ChatCommandData, type ChatEntityData, type ChatInteractionOverrides, type ChatInteractionsData, } from '../../../contracts/chat-interactions.js';
|
|
7
15
|
export { createNextInternalApiCaller } from '../../core/index.js';
|
|
8
|
-
export type { WithAiToolOptions, AiToolRouteHandler, AiChatHandlerConfig, LoadTools, GuardrailResult, GuardrailHook, IntentRoutingResult, IntentRouter, StepLimitSource, StepUsage, PipelineStepReport, PipelineStreamStatus, PipelineStreamState, ExecuteToolOptions, ExecuteToolResult, AiPipeline, FollowupsConfig, PipelineResult, } from './types.js';
|
|
16
|
+
export type { WithAiToolOptions, AiToolRouteHandler, AiChatHandlerConfig, LoadTools, GuardrailResult, GuardrailHook, IntentRoutingResult, IntentRouter, StepLimitSource, StepUsage, PipelineStepReport, PipelineStreamStatus, PipelineStreamState, ExecuteToolOptions, ExecuteToolResult, AiPipeline, ClarificationConfig, PlanningConfig, FollowupsConfig, PipelineResult, ManagedLocalRuntimeConfig, ResolveTurnSnapshotContext, } from './types.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createNextInternalApiCaller = exports.executeTool = exports.wrapToolsForVercelAi = exports.prepareModelMessages = exports.sanitizeModelMessages = exports.createInternalApiCallerFromRequest = exports.buildToolContext = exports.buildRuntimeContext = exports.extractOrigin = exports.createAiChatHandler = exports.withAiTool = void 0;
|
|
3
|
+
exports.createNextInternalApiCaller = exports.parseChatInteractions = exports.parseChatInteractionOverrides = exports.mergeChatInteractions = exports.chatText = exports.parseChatCommandMessage = exports.formatChatCommandMessage = exports.stripChatCommandMessages = exports.runDirectCommand = exports.resolveDirectCommand = exports.DEFAULT_RECORDING_LANGUAGES = exports.createRecordingTranscriptionHandler = exports.createChatInteractionsHandler = exports.resolveClarificationResume = exports.applyClarificationResume = exports.NON_DOMAIN_TOOL_NAMES = exports.createHybridToolDiscovery = exports.executeTool = exports.wrapToolsForVercelAi = exports.prepareModelMessages = exports.sanitizeModelMessages = exports.createInternalApiCallerFromRequest = exports.buildToolContext = exports.buildRuntimeContext = exports.extractOrigin = exports.createAiChatHandler = exports.withAiTool = void 0;
|
|
4
4
|
var with_ai_tool_js_1 = require("./with-ai-tool.js");
|
|
5
5
|
Object.defineProperty(exports, "withAiTool", { enumerable: true, get: function () { return with_ai_tool_js_1.withAiTool; } });
|
|
6
6
|
var create_ai_chat_handler_js_1 = require("./create-ai-chat-handler.js");
|
|
@@ -17,6 +17,29 @@ Object.defineProperty(exports, "prepareModelMessages", { enumerable: true, get:
|
|
|
17
17
|
Object.defineProperty(exports, "wrapToolsForVercelAi", { enumerable: true, get: function () { return prepare_model_messages_js_1.wrapToolsForVercelAi; } });
|
|
18
18
|
var server_action_helper_js_1 = require("./server-action-helper.js");
|
|
19
19
|
Object.defineProperty(exports, "executeTool", { enumerable: true, get: function () { return server_action_helper_js_1.executeTool; } });
|
|
20
|
+
var tool_discovery_js_1 = require("./tool-discovery.js");
|
|
21
|
+
Object.defineProperty(exports, "createHybridToolDiscovery", { enumerable: true, get: function () { return tool_discovery_js_1.createHybridToolDiscovery; } });
|
|
22
|
+
Object.defineProperty(exports, "NON_DOMAIN_TOOL_NAMES", { enumerable: true, get: function () { return tool_discovery_js_1.NON_DOMAIN_TOOL_NAMES; } });
|
|
23
|
+
var clarification_resume_js_1 = require("./clarification-resume.js");
|
|
24
|
+
Object.defineProperty(exports, "applyClarificationResume", { enumerable: true, get: function () { return clarification_resume_js_1.applyClarificationResume; } });
|
|
25
|
+
Object.defineProperty(exports, "resolveClarificationResume", { enumerable: true, get: function () { return clarification_resume_js_1.resolveClarificationResume; } });
|
|
26
|
+
var chat_interactions_handler_js_1 = require("./chat-interactions-handler.js");
|
|
27
|
+
Object.defineProperty(exports, "createChatInteractionsHandler", { enumerable: true, get: function () { return chat_interactions_handler_js_1.createChatInteractionsHandler; } });
|
|
28
|
+
var recording_transcription_handler_js_1 = require("./recording-transcription-handler.js");
|
|
29
|
+
Object.defineProperty(exports, "createRecordingTranscriptionHandler", { enumerable: true, get: function () { return recording_transcription_handler_js_1.createRecordingTranscriptionHandler; } });
|
|
30
|
+
Object.defineProperty(exports, "DEFAULT_RECORDING_LANGUAGES", { enumerable: true, get: function () { return recording_transcription_handler_js_1.DEFAULT_RECORDING_LANGUAGES; } });
|
|
31
|
+
var direct_command_js_1 = require("./direct-command.js");
|
|
32
|
+
Object.defineProperty(exports, "resolveDirectCommand", { enumerable: true, get: function () { return direct_command_js_1.resolveDirectCommand; } });
|
|
33
|
+
Object.defineProperty(exports, "runDirectCommand", { enumerable: true, get: function () { return direct_command_js_1.runDirectCommand; } });
|
|
34
|
+
Object.defineProperty(exports, "stripChatCommandMessages", { enumerable: true, get: function () { return direct_command_js_1.stripChatCommandMessages; } });
|
|
35
|
+
var chat_command_js_1 = require("../../../contracts/chat-command.js");
|
|
36
|
+
Object.defineProperty(exports, "formatChatCommandMessage", { enumerable: true, get: function () { return chat_command_js_1.formatChatCommandMessage; } });
|
|
37
|
+
Object.defineProperty(exports, "parseChatCommandMessage", { enumerable: true, get: function () { return chat_command_js_1.parseChatCommandMessage; } });
|
|
38
|
+
var chat_interactions_js_1 = require("../../../contracts/chat-interactions.js");
|
|
39
|
+
Object.defineProperty(exports, "chatText", { enumerable: true, get: function () { return chat_interactions_js_1.chatText; } });
|
|
40
|
+
Object.defineProperty(exports, "mergeChatInteractions", { enumerable: true, get: function () { return chat_interactions_js_1.mergeChatInteractions; } });
|
|
41
|
+
Object.defineProperty(exports, "parseChatInteractionOverrides", { enumerable: true, get: function () { return chat_interactions_js_1.parseChatInteractionOverrides; } });
|
|
42
|
+
Object.defineProperty(exports, "parseChatInteractions", { enumerable: true, get: function () { return chat_interactions_js_1.parseChatInteractions; } });
|
|
20
43
|
// Re-export from server-node for convenience
|
|
21
44
|
var index_js_1 = require("../../core/index.js");
|
|
22
45
|
Object.defineProperty(exports, "createNextInternalApiCaller", { enumerable: true, get: function () { return index_js_1.createNextInternalApiCaller; } });
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* @module
|
|
11
11
|
*/
|
|
12
12
|
import { type UIMessage } from 'ai';
|
|
13
|
+
import { type AiSdkToolHooks } from '../../../runtime/ai-sdk/engine.js';
|
|
13
14
|
export interface PrepareModelMessagesOptions {
|
|
14
15
|
/** Max model messages to keep after slicing (default: 12). */
|
|
15
16
|
maxContextMessages?: number;
|
|
@@ -55,4 +56,4 @@ export declare function prepareModelMessages(uiMessages: UIMessage[], options?:
|
|
|
55
56
|
* const result = streamText({ tools: vercelTools, ... });
|
|
56
57
|
* ```
|
|
57
58
|
*/
|
|
58
|
-
export declare function wrapToolsForVercelAi(sdkTools: Record<string, unknown
|
|
59
|
+
export declare function wrapToolsForVercelAi(sdkTools: Record<string, unknown>, hooks?: AiSdkToolHooks): Record<string, unknown>;
|
|
@@ -14,6 +14,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
14
|
exports.prepareModelMessages = prepareModelMessages;
|
|
15
15
|
exports.wrapToolsForVercelAi = wrapToolsForVercelAi;
|
|
16
16
|
const ai_1 = require("ai");
|
|
17
|
+
const engine_js_1 = require("../../../runtime/ai-sdk/engine.js");
|
|
17
18
|
const sanitize_model_messages_js_1 = require("./sanitize-model-messages.js");
|
|
18
19
|
/**
|
|
19
20
|
* Convert UI messages into sanitized model messages ready for `streamText()`.
|
|
@@ -97,18 +98,9 @@ function isPlainObject(v) {
|
|
|
97
98
|
* const result = streamText({ tools: vercelTools, ... });
|
|
98
99
|
* ```
|
|
99
100
|
*/
|
|
100
|
-
function wrapToolsForVercelAi(sdkTools) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
description: sdkTool.description,
|
|
106
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
107
|
-
inputSchema: (0, ai_1.zodSchema)(sdkTool.parameters),
|
|
108
|
-
needsApproval: sdkTool.needsApproval,
|
|
109
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
110
|
-
execute: sdkTool.execute,
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
return wrapped;
|
|
101
|
+
function wrapToolsForVercelAi(sdkTools, hooks) {
|
|
102
|
+
return (0, engine_js_1.createAiSdkTools)({
|
|
103
|
+
tools: sdkTools,
|
|
104
|
+
...hooks,
|
|
105
|
+
});
|
|
114
106
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** The languages a recording may be transcribed in, unless the app sets its own list. */
|
|
2
|
+
export declare const DEFAULT_RECORDING_LANGUAGES: readonly ["de", "en", "de-DE", "en-US", "en-GB", "fr", "es", "it", "nl", "pt"];
|
|
3
|
+
export interface RecordingTranscriptionHandlerConfig {
|
|
4
|
+
/** The app's own session check; `false` answers 401 before the audio is read. */
|
|
5
|
+
authorize(request: Request): boolean | Promise<boolean>;
|
|
6
|
+
/** Base URL of a service with the common `POST /v1/audio/transcriptions` API (Parakeet, Whisper, …); unset answers 503. */
|
|
7
|
+
url: string | undefined;
|
|
8
|
+
/** Sent as `Bearer` token when set. */
|
|
9
|
+
apiKey?: string;
|
|
10
|
+
/** Default `parakeet-tdt-0.6b-v3`. */
|
|
11
|
+
model?: string;
|
|
12
|
+
/** Allowed `?language=` values; the first two letters go to the service. Default `DEFAULT_RECORDING_LANGUAGES`. */
|
|
13
|
+
languages?: readonly string[];
|
|
14
|
+
/** Used when the request names no language. Default `de`. */
|
|
15
|
+
defaultLanguage?: string;
|
|
16
|
+
/** Default 5 MB, more than two minutes of 16 kHz mono 16-bit audio. */
|
|
17
|
+
maxBytes?: number;
|
|
18
|
+
/** Default 45 seconds. */
|
|
19
|
+
timeoutMs?: number;
|
|
20
|
+
/** Receives the failure for the server log; the browser only learns that it failed. */
|
|
21
|
+
onError?: (error: unknown) => void;
|
|
22
|
+
fetch?: typeof globalThis.fetch;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A Next.js route handler for the `recording` speech input
|
|
26
|
+
* (`RecordedSttAdapter`, which posts `audio/wav` to `/api/ai/speech-recognize`).
|
|
27
|
+
* It checks the app's session, the format, language and size, and forwards the
|
|
28
|
+
* recording to the app's own transcription service, whose address, key and
|
|
29
|
+
* model stay on the server.
|
|
30
|
+
*/
|
|
31
|
+
export declare function createRecordingTranscriptionHandler(config: RecordingTranscriptionHandlerConfig): (request: Request) => Promise<Response>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_RECORDING_LANGUAGES = void 0;
|
|
4
|
+
exports.createRecordingTranscriptionHandler = createRecordingTranscriptionHandler;
|
|
5
|
+
const url_js_1 = require("../../../contracts/url.js");
|
|
6
|
+
/** The languages a recording may be transcribed in, unless the app sets its own list. */
|
|
7
|
+
exports.DEFAULT_RECORDING_LANGUAGES = ['de', 'en', 'de-DE', 'en-US', 'en-GB', 'fr', 'es', 'it', 'nl', 'pt'];
|
|
8
|
+
const failed = (status, error) => Response.json({ error }, { status });
|
|
9
|
+
/**
|
|
10
|
+
* A Next.js route handler for the `recording` speech input
|
|
11
|
+
* (`RecordedSttAdapter`, which posts `audio/wav` to `/api/ai/speech-recognize`).
|
|
12
|
+
* It checks the app's session, the format, language and size, and forwards the
|
|
13
|
+
* recording to the app's own transcription service, whose address, key and
|
|
14
|
+
* model stay on the server.
|
|
15
|
+
*/
|
|
16
|
+
function createRecordingTranscriptionHandler(config) {
|
|
17
|
+
const languages = config.languages ?? exports.DEFAULT_RECORDING_LANGUAGES;
|
|
18
|
+
const maxBytes = config.maxBytes ?? 5 * 1024 * 1024;
|
|
19
|
+
const timeoutMs = config.timeoutMs ?? 45_000;
|
|
20
|
+
const onError = config.onError
|
|
21
|
+
?? ((error) => console.error('[speech] Recording transcription failed:', error instanceof Error ? error.message : 'unknown error'));
|
|
22
|
+
return async function POST(request) {
|
|
23
|
+
if (!(await config.authorize(request)))
|
|
24
|
+
return failed(401, 'Authentication required');
|
|
25
|
+
if (!config.url)
|
|
26
|
+
return failed(503, 'Speech service not configured');
|
|
27
|
+
if (!request.headers.get('content-type')?.startsWith('audio/wav'))
|
|
28
|
+
return failed(415, 'Unsupported audio format');
|
|
29
|
+
const language = new URL(request.url).searchParams.get('language') || config.defaultLanguage || 'de';
|
|
30
|
+
if (!languages.includes(language))
|
|
31
|
+
return failed(400, 'Unsupported language');
|
|
32
|
+
const audio = await request.arrayBuffer();
|
|
33
|
+
if (audio.byteLength === 0)
|
|
34
|
+
return failed(400, 'Empty recording');
|
|
35
|
+
if (audio.byteLength > maxBytes)
|
|
36
|
+
return failed(413, 'Recording too long');
|
|
37
|
+
const form = new FormData();
|
|
38
|
+
form.set('file', new File([audio], 'recording.wav', { type: 'audio/wav' }));
|
|
39
|
+
form.set('model', config.model || 'parakeet-tdt-0.6b-v3');
|
|
40
|
+
form.set('language', language.slice(0, 2));
|
|
41
|
+
try {
|
|
42
|
+
const response = await (config.fetch ?? globalThis.fetch)(`${(0, url_js_1.trimTrailingSlashes)(config.url)}/v1/audio/transcriptions`, {
|
|
43
|
+
method: 'POST',
|
|
44
|
+
headers: config.apiKey ? { authorization: `Bearer ${config.apiKey}` } : {},
|
|
45
|
+
body: form,
|
|
46
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
47
|
+
});
|
|
48
|
+
if (!response.ok)
|
|
49
|
+
throw new Error(`transcription service answered ${response.status}`);
|
|
50
|
+
const result = (await response.json());
|
|
51
|
+
return Response.json({ text: typeof result.text === 'string' ? result.text.trim() : '' });
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
onError(error);
|
|
55
|
+
return failed(502, 'Transcription failed');
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Default cap on the request body of the chat handler: 1 MB. */
|
|
2
|
+
export declare const DEFAULT_MAX_BODY_BYTES = 1000000;
|
|
3
|
+
export interface RequestGuardOptions {
|
|
4
|
+
/** Origins besides the request's own that may post from a browser. */
|
|
5
|
+
allowedOrigins?: ReadonlyArray<string>;
|
|
6
|
+
/** `false` turns the browser cross-origin check off. Default: on. */
|
|
7
|
+
crossOriginProtection?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Refuses a request a browser sent for another site, and a body that is not
|
|
11
|
+
* JSON.
|
|
12
|
+
*
|
|
13
|
+
* The chat route authenticates with the user's cookie, and a page on another
|
|
14
|
+
* site (also another subdomain of the same site) can make the browser post to
|
|
15
|
+
* it with that cookie. A `text/plain` form post needs no CORS preflight, so
|
|
16
|
+
* the content type must be JSON, which a cross-origin page cannot send
|
|
17
|
+
* without a preflight; and a browser cross-origin request is refused:
|
|
18
|
+
*
|
|
19
|
+
* - `Origin: null` (a sandboxed or opaque origin) is always refused.
|
|
20
|
+
* - `Sec-Fetch-Site`, when present, must be `same-origin` (or `none`, a
|
|
21
|
+
* navigation by the user); `same-site` and `cross-site` pass only with an
|
|
22
|
+
* `Origin` listed in `allowedOrigins`.
|
|
23
|
+
* - Otherwise `Origin`, when present, must be the request's own origin (the
|
|
24
|
+
* request URL's, the Host header's, or the first forwarded host and
|
|
25
|
+
* protocol, see `publicOrigins`) or one of `allowedOrigins`.
|
|
26
|
+
* - A request with neither header is not from a browser (server to server).
|
|
27
|
+
*/
|
|
28
|
+
export declare function checkRequestHeaders(req: Request, options?: RequestGuardOptions): Response | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Reads the JSON body, or answers 413 once it exceeds `maxBytes` and 400
|
|
31
|
+
* (`invalid_json`) when it does not parse. The declared
|
|
32
|
+
* `Content-Length` is checked before the body is read, and the bytes actually
|
|
33
|
+
* read are counted, because the header may be absent (chunked) or wrong.
|
|
34
|
+
*/
|
|
35
|
+
export declare function readJsonBody(req: Request, maxBytes?: number): Promise<{
|
|
36
|
+
ok: true;
|
|
37
|
+
value: unknown;
|
|
38
|
+
} | {
|
|
39
|
+
ok: false;
|
|
40
|
+
response: Response;
|
|
41
|
+
}>;
|