glirastes 0.4.0 → 0.5.0
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 +361 -1
- package/README.md +304 -853
- 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/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 +66 -0
- package/dist/cjs/react/provider/ai-chat-provider.d.ts +1 -1
- package/dist/cjs/react/provider/ai-chat-provider.js +407 -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 +1529 -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 +264 -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 +32 -3
- 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 +112 -0
- package/dist/cjs/runtime/glirastes.js +287 -0
- package/dist/cjs/runtime/index.d.ts +23 -0
- package/dist/cjs/runtime/index.js +71 -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-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/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/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/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 +64 -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 +408 -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 +758 -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 +264 -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 +32 -3
- 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 +112 -0
- package/dist/runtime/glirastes.js +285 -0
- package/dist/runtime/glirastes.js.map +1 -0
- package/dist/runtime/index.d.ts +23 -0
- package/dist/runtime/index.js +23 -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-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/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/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 +149 -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 +158 -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
|
@@ -6,25 +6,52 @@ const react_1 = require("react");
|
|
|
6
6
|
const mention_markup_js_1 = require("../utils/mention-markup.js");
|
|
7
7
|
const DEFAULT_TRIGGERS = ['@', '/'];
|
|
8
8
|
const SEARCH_DEBOUNCE_MS = 100;
|
|
9
|
+
/**
|
|
10
|
+
* Picking a command leaves `/slug ` in the editor and picking a chip leaves a
|
|
11
|
+
* text node that starts with a space. Under the default `white-space: normal`
|
|
12
|
+
* the browser collapses that separator, so the next typed word merges into the
|
|
13
|
+
* token and its structured id is lost. This is behaviour, not theming: it is
|
|
14
|
+
* set inline so it also holds for BYOS and shadow-DOM consumers that do not
|
|
15
|
+
* load styles.css.
|
|
16
|
+
*/
|
|
17
|
+
const EDITOR_STYLE = { whiteSpace: 'pre-wrap' };
|
|
18
|
+
/** Announcements for screen readers only; behaviour, so it holds without styles.css. */
|
|
19
|
+
const VISUALLY_HIDDEN = {
|
|
20
|
+
position: 'absolute', width: 1, height: 1, margin: -1, padding: 0, overflow: 'hidden',
|
|
21
|
+
clip: 'rect(0 0 0 0)', whiteSpace: 'nowrap', border: 0,
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* The selection inside the editor's own tree. In a shadow root (the
|
|
25
|
+
* `<glirastes-chat>` element) Chromium retargets `window.getSelection()` to
|
|
26
|
+
* the host, so the caret position would be lost; its `ShadowRoot.getSelection()`
|
|
27
|
+
* keeps the real nodes.
|
|
28
|
+
*/
|
|
29
|
+
function editorSelection(editor) {
|
|
30
|
+
const root = editor?.getRootNode();
|
|
31
|
+
if (root && root !== editor?.ownerDocument && typeof root.getSelection === 'function') {
|
|
32
|
+
return root.getSelection() ?? window.getSelection();
|
|
33
|
+
}
|
|
34
|
+
return window.getSelection();
|
|
35
|
+
}
|
|
9
36
|
function normalizeInputValue(text) {
|
|
10
37
|
return text.replace(/\u00A0/g, ' ');
|
|
11
38
|
}
|
|
12
39
|
// ---------------------------------------------------------------------------
|
|
13
40
|
// Default dropdown item (data-attribute driven, no hardcoded styles)
|
|
14
41
|
// ---------------------------------------------------------------------------
|
|
15
|
-
function DefaultDropdownItem({ result, isSelected, onClick }) {
|
|
42
|
+
function DefaultDropdownItem({ result, isSelected, onClick, optionProps }) {
|
|
16
43
|
const itemRef = (0, react_1.useRef)(null);
|
|
17
44
|
(0, react_1.useEffect)(() => {
|
|
18
45
|
if (isSelected && itemRef.current) {
|
|
19
46
|
itemRef.current.scrollIntoView({ block: 'nearest' });
|
|
20
47
|
}
|
|
21
48
|
}, [isSelected]);
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("button", { ref: itemRef, type: "button", onClick: onClick, "data-component": "mention-dropdown-item", "data-mention-type": result.type, "data-selected": isSelected ? 'true' : 'false', children: [(0, jsx_runtime_1.jsx)("span", { "data-element": "label", children: result.label }), result.description && ((0, jsx_runtime_1.jsx)("span", { "data-element": "description", children: result.description }))] }));
|
|
49
|
+
return ((0, jsx_runtime_1.jsxs)("button", { ref: itemRef, type: "button", ...optionProps, onClick: onClick, "data-component": "mention-dropdown-item", "data-mention-type": result.type, "data-selected": isSelected ? 'true' : 'false', children: [(0, jsx_runtime_1.jsx)("span", { "data-element": "label", children: result.label }), result.description && ((0, jsx_runtime_1.jsx)("span", { "data-element": "description", children: result.description }))] }));
|
|
23
50
|
}
|
|
24
51
|
// ---------------------------------------------------------------------------
|
|
25
52
|
// RichMentionInput
|
|
26
53
|
// ---------------------------------------------------------------------------
|
|
27
|
-
exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ value, defaultValue = '', placeholder, disabled = false, className, onChange, onSubmit, onSearch, initialMentions, triggers = DEFAULT_TRIGGERS, components, }, ref) {
|
|
54
|
+
exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ value, defaultValue = '', placeholder, disabled = false, className, onChange, onSubmit, onSearch, initialMentions, triggers = DEFAULT_TRIGGERS, components, onEntityAction, listLabel = 'Suggestions', resultsLabel = '{count} suggestions', }, ref) {
|
|
28
55
|
const hasMentionSupport = typeof onSearch === 'function';
|
|
29
56
|
const isControlled = value !== undefined;
|
|
30
57
|
const [internalValue, setInternalValue] = (0, react_1.useState)(defaultValue);
|
|
@@ -35,7 +62,10 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
35
62
|
const [dropdownOpen, setDropdownOpen] = (0, react_1.useState)(false);
|
|
36
63
|
const [searchResults, setSearchResults] = (0, react_1.useState)([]);
|
|
37
64
|
const [selectedIndex, setSelectedIndex] = (0, react_1.useState)(0);
|
|
65
|
+
// -1: the result itself; 0..n: one of its entity actions.
|
|
66
|
+
const [selectedAction, setSelectedAction] = (0, react_1.useState)(-1);
|
|
38
67
|
const [isSearching, setIsSearching] = (0, react_1.useState)(false);
|
|
68
|
+
const listboxId = (0, react_1.useId)();
|
|
39
69
|
const [isFocused, setIsFocused] = (0, react_1.useState)(false);
|
|
40
70
|
// Refs for stale-closure avoidance and debounce
|
|
41
71
|
const searchTimeoutRef = (0, react_1.useRef)(undefined);
|
|
@@ -123,6 +153,7 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
123
153
|
slug: el.dataset.mentionSlug,
|
|
124
154
|
prefix: el.dataset.mentionPrefix,
|
|
125
155
|
displayName: el.dataset.mentionLabel,
|
|
156
|
+
...(0, mention_markup_js_1.toolReferenceFromDataset)(el.dataset),
|
|
126
157
|
});
|
|
127
158
|
}
|
|
128
159
|
}
|
|
@@ -154,6 +185,14 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
154
185
|
chip.dataset.mentionLabel = displayName;
|
|
155
186
|
chip.dataset.mentionPrefix = prefix;
|
|
156
187
|
chip.dataset.size = 'inline';
|
|
188
|
+
// A command's definition id and arguments stay on its chip, so the
|
|
189
|
+
// entry read back from the editor (getMentions, drafts) still has them.
|
|
190
|
+
const toolReference = (0, mention_markup_js_1.toolReferenceToDataset)(mention);
|
|
191
|
+
if (toolReference) {
|
|
192
|
+
chip.dataset.mentionDefinitionId = toolReference.definitionId;
|
|
193
|
+
if (toolReference.args !== undefined)
|
|
194
|
+
chip.dataset.mentionArgs = toolReference.args;
|
|
195
|
+
}
|
|
157
196
|
const prefixSpan = document.createElement('span');
|
|
158
197
|
prefixSpan.dataset.element = 'prefix';
|
|
159
198
|
prefixSpan.textContent = prefix;
|
|
@@ -178,6 +217,7 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
178
217
|
setDropdownOpen(false);
|
|
179
218
|
setSearchResults([]);
|
|
180
219
|
setSelectedIndex(0);
|
|
220
|
+
setSelectedAction(-1);
|
|
181
221
|
}, []);
|
|
182
222
|
const performSearch = (0, react_1.useCallback)(async (query, trigger) => {
|
|
183
223
|
if (!onSearch)
|
|
@@ -190,6 +230,7 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
190
230
|
return;
|
|
191
231
|
setSearchResults(results);
|
|
192
232
|
setSelectedIndex(0);
|
|
233
|
+
setSelectedAction(-1);
|
|
193
234
|
setDropdownOpen(results.length > 0);
|
|
194
235
|
}
|
|
195
236
|
catch {
|
|
@@ -209,7 +250,7 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
209
250
|
* Returns trigger, query, and position, or null if no trigger is active.
|
|
210
251
|
*/
|
|
211
252
|
const detectTrigger = (0, react_1.useCallback)(() => {
|
|
212
|
-
const selection =
|
|
253
|
+
const selection = editorSelection(editableRef.current);
|
|
213
254
|
if (!selection || selection.rangeCount === 0)
|
|
214
255
|
return null;
|
|
215
256
|
const range = selection.getRangeAt(0);
|
|
@@ -237,7 +278,7 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
237
278
|
const insertMention = (0, react_1.useCallback)((result) => {
|
|
238
279
|
if (!editableRef.current)
|
|
239
280
|
return;
|
|
240
|
-
const selection =
|
|
281
|
+
const selection = editorSelection(editableRef.current);
|
|
241
282
|
if (!selection || selection.rangeCount === 0)
|
|
242
283
|
return;
|
|
243
284
|
const range = selection.getRangeAt(0);
|
|
@@ -261,29 +302,24 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
261
302
|
}
|
|
262
303
|
if (triggerPos === -1)
|
|
263
304
|
return;
|
|
264
|
-
|
|
265
|
-
const
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
displayName: result.label,
|
|
271
|
-
slug,
|
|
272
|
-
prefix,
|
|
273
|
-
};
|
|
305
|
+
// The trigger the user typed: an entity found with `@` stays `@` whatever its type.
|
|
306
|
+
const prefix = result.type === 'command' ? '/' : text[triggerPos];
|
|
307
|
+
const slug = typeof result.slug === 'string' && result.slug.trim().length > 0
|
|
308
|
+
? (0, mention_markup_js_1.normalizeMentionSlug)(result.slug)
|
|
309
|
+
: (0, mention_markup_js_1.normalizeMentionSlug)(result.label);
|
|
310
|
+
const mentionData = (0, mention_markup_js_1.mentionDataFromResult)(result, { prefix, slug });
|
|
274
311
|
// For command type: insert as text, no chip
|
|
275
312
|
if (result.type === 'command') {
|
|
276
313
|
const beforeText = text.slice(0, triggerPos);
|
|
277
314
|
const afterText = text.slice(cursorPos);
|
|
278
315
|
const token = `${prefix}${slug} `;
|
|
279
316
|
textNode.textContent = beforeText + token + afterText;
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
});
|
|
317
|
+
// The caret moves at once: keys typed right after the pick must land behind the token.
|
|
318
|
+
const newRange = document.createRange();
|
|
319
|
+
newRange.setStart(textNode, (beforeText + token).length);
|
|
320
|
+
newRange.collapse(true);
|
|
321
|
+
selection.removeAllRanges();
|
|
322
|
+
selection.addRange(newRange);
|
|
287
323
|
setMentions((prev) => [...prev, mentionData]);
|
|
288
324
|
closeDropdown();
|
|
289
325
|
requestAnimationFrame(() => {
|
|
@@ -304,20 +340,45 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
304
340
|
parent.insertBefore(chip, textNode);
|
|
305
341
|
parent.insertBefore(afterNode, textNode);
|
|
306
342
|
parent.removeChild(textNode);
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
editableRef.current?.focus();
|
|
314
|
-
});
|
|
343
|
+
const newRange = document.createRange();
|
|
344
|
+
newRange.setStart(afterNode, 1);
|
|
345
|
+
newRange.collapse(true);
|
|
346
|
+
selection.removeAllRanges();
|
|
347
|
+
selection.addRange(newRange);
|
|
348
|
+
editableRef.current?.focus();
|
|
315
349
|
setMentions((prev) => [...prev, mentionData]);
|
|
316
350
|
closeDropdown();
|
|
317
351
|
requestAnimationFrame(() => {
|
|
318
352
|
onChange?.(getFullValue());
|
|
319
353
|
});
|
|
320
354
|
}, [triggers, createChipElement, closeDropdown, onChange, getFullValue]);
|
|
355
|
+
/** Removes the `@query` being typed and runs one of the result's entity actions instead. */
|
|
356
|
+
const runAction = (0, react_1.useCallback)((result, actionId) => {
|
|
357
|
+
const selection = editorSelection(editableRef.current);
|
|
358
|
+
const range = selection && selection.rangeCount > 0 ? selection.getRangeAt(0) : null;
|
|
359
|
+
if (range && range.startContainer.nodeType === Node.TEXT_NODE) {
|
|
360
|
+
const textNode = range.startContainer;
|
|
361
|
+
const text = textNode.textContent || '';
|
|
362
|
+
const cursorPos = range.startOffset;
|
|
363
|
+
for (let i = cursorPos - 1; i >= 0; i--) {
|
|
364
|
+
const char = text[i];
|
|
365
|
+
if (char === ' ' || char === '\n')
|
|
366
|
+
break;
|
|
367
|
+
if (triggers.includes(char) && (i === 0 || text[i - 1] === ' ' || text[i - 1] === '\n')) {
|
|
368
|
+
textNode.textContent = text.slice(0, i) + text.slice(cursorPos);
|
|
369
|
+
// Replacing the data pulls the live range to offset 0: put the caret back where the `@query` was.
|
|
370
|
+
range.setStart(textNode, i);
|
|
371
|
+
range.collapse(true);
|
|
372
|
+
selection?.removeAllRanges();
|
|
373
|
+
selection?.addRange(range);
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
closeDropdown();
|
|
379
|
+
onChange?.(getFullValue());
|
|
380
|
+
onEntityAction?.(result, actionId);
|
|
381
|
+
}, [triggers, closeDropdown, onChange, getFullValue, onEntityAction]);
|
|
321
382
|
// -----------------------------------------------------------------------
|
|
322
383
|
// Event handlers
|
|
323
384
|
// -----------------------------------------------------------------------
|
|
@@ -341,6 +402,24 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
341
402
|
}
|
|
342
403
|
onChange?.(getFullValue());
|
|
343
404
|
}, [hasMentionSupport, setValue, detectTrigger, performSearch, closeDropdown, onChange, getFullValue]);
|
|
405
|
+
/**
|
|
406
|
+
* Chips in the DOM plus text-inserted commands whose token is still
|
|
407
|
+
* present. A command that was restored as a chip (setValue) is still in
|
|
408
|
+
* the state too; the chip is its entry, so it is not listed twice.
|
|
409
|
+
*/
|
|
410
|
+
const collectMentions = (0, react_1.useCallback)((text) => {
|
|
411
|
+
if (!hasMentionSupport)
|
|
412
|
+
return [];
|
|
413
|
+
const chips = getMentionsFromDOM();
|
|
414
|
+
const chipped = new Set(chips.map((chip) => `${chip.type}\u0000${chip.id}`));
|
|
415
|
+
const tokens = new Set(text.split(/\s+/));
|
|
416
|
+
const commands = mentions.filter((mention) => mention.type === 'command'
|
|
417
|
+
&& !chipped.has(`${mention.type}\u0000${mention.id}`)
|
|
418
|
+
&& typeof mention.prefix === 'string'
|
|
419
|
+
&& typeof mention.slug === 'string'
|
|
420
|
+
&& tokens.has(`${mention.prefix}${mention.slug}`));
|
|
421
|
+
return [...chips, ...commands];
|
|
422
|
+
}, [hasMentionSupport, mentions, getMentionsFromDOM]);
|
|
344
423
|
const submit = (0, react_1.useCallback)(() => {
|
|
345
424
|
if (disabled)
|
|
346
425
|
return;
|
|
@@ -349,7 +428,7 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
349
428
|
: normalizeInputValue((editableRef.current?.innerText ?? '').trim());
|
|
350
429
|
if (!text)
|
|
351
430
|
return;
|
|
352
|
-
onSubmit?.(text);
|
|
431
|
+
onSubmit?.(text, collectMentions(text));
|
|
353
432
|
setValue('');
|
|
354
433
|
if (hasMentionSupport) {
|
|
355
434
|
setMentions([]);
|
|
@@ -357,24 +436,42 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
357
436
|
if (editableRef.current) {
|
|
358
437
|
editableRef.current.innerHTML = '';
|
|
359
438
|
}
|
|
360
|
-
}, [disabled, hasMentionSupport, getFullValue, onSubmit, setValue]);
|
|
439
|
+
}, [disabled, hasMentionSupport, getFullValue, onSubmit, setValue, collectMentions]);
|
|
361
440
|
const handleKeyDown = (0, react_1.useCallback)((event) => {
|
|
362
441
|
// Dropdown navigation (mention mode only)
|
|
363
442
|
if (hasMentionSupport && dropdownOpen && searchResults.length > 0) {
|
|
443
|
+
const actions = (onEntityAction && searchResults[selectedIndex]?.actions) || [];
|
|
364
444
|
if (event.key === 'ArrowDown') {
|
|
365
445
|
event.preventDefault();
|
|
366
446
|
setSelectedIndex((prev) => (prev + 1) % searchResults.length);
|
|
447
|
+
setSelectedAction(-1);
|
|
367
448
|
return;
|
|
368
449
|
}
|
|
369
450
|
if (event.key === 'ArrowUp') {
|
|
370
451
|
event.preventDefault();
|
|
371
452
|
setSelectedIndex((prev) => (prev - 1 + searchResults.length) % searchResults.length);
|
|
453
|
+
setSelectedAction(-1);
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
// Left/right move between a result and its actions; elsewhere they move the caret.
|
|
457
|
+
if (event.key === 'ArrowRight' && selectedAction < actions.length - 1) {
|
|
458
|
+
event.preventDefault();
|
|
459
|
+
setSelectedAction((prev) => prev + 1);
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
if (event.key === 'ArrowLeft' && selectedAction >= 0) {
|
|
463
|
+
event.preventDefault();
|
|
464
|
+
setSelectedAction((prev) => prev - 1);
|
|
372
465
|
return;
|
|
373
466
|
}
|
|
374
467
|
if (event.key === 'Tab' || (event.key === 'Enter' && !event.shiftKey)) {
|
|
375
468
|
event.preventDefault();
|
|
376
469
|
const selected = searchResults[selectedIndex];
|
|
377
|
-
|
|
470
|
+
const action = selectedAction >= 0 ? actions[selectedAction] : undefined;
|
|
471
|
+
if (selected && action) {
|
|
472
|
+
runAction(selected, action.id);
|
|
473
|
+
}
|
|
474
|
+
else if (selected) {
|
|
378
475
|
insertMention(selected);
|
|
379
476
|
}
|
|
380
477
|
return;
|
|
@@ -393,7 +490,7 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
393
490
|
}
|
|
394
491
|
// Backspace: delete chip at cursor boundary (mention mode)
|
|
395
492
|
if (hasMentionSupport && event.key === 'Backspace') {
|
|
396
|
-
const selection =
|
|
493
|
+
const selection = editorSelection(editableRef.current);
|
|
397
494
|
if (selection && selection.rangeCount > 0) {
|
|
398
495
|
const range = selection.getRangeAt(0);
|
|
399
496
|
if (range.collapsed && range.startOffset === 0) {
|
|
@@ -416,6 +513,9 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
416
513
|
dropdownOpen,
|
|
417
514
|
searchResults,
|
|
418
515
|
selectedIndex,
|
|
516
|
+
selectedAction,
|
|
517
|
+
onEntityAction,
|
|
518
|
+
runAction,
|
|
419
519
|
insertMention,
|
|
420
520
|
closeDropdown,
|
|
421
521
|
submit,
|
|
@@ -428,7 +528,7 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
428
528
|
const plainText = e.clipboardData.getData('text/plain');
|
|
429
529
|
if (!plainText)
|
|
430
530
|
return;
|
|
431
|
-
const selection =
|
|
531
|
+
const selection = editorSelection(editableRef.current);
|
|
432
532
|
if (!selection || selection.rangeCount === 0)
|
|
433
533
|
return;
|
|
434
534
|
const range = selection.getRangeAt(0);
|
|
@@ -449,10 +549,13 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
449
549
|
if (!dropdownOpen)
|
|
450
550
|
return;
|
|
451
551
|
const handleClickOutside = (e) => {
|
|
552
|
+
// Inside a shadow root (the `<glirastes-chat>` element) a document-level listener sees the host as
|
|
553
|
+
// `e.target`, so the composed path is what tells a click on the list or the editor from an outside one.
|
|
554
|
+
const path = e.composedPath();
|
|
452
555
|
if (dropdownRef.current &&
|
|
453
|
-
!dropdownRef.current
|
|
556
|
+
!path.includes(dropdownRef.current) &&
|
|
454
557
|
editableRef.current &&
|
|
455
|
-
!editableRef.current
|
|
558
|
+
!path.includes(editableRef.current)) {
|
|
456
559
|
closeDropdown();
|
|
457
560
|
}
|
|
458
561
|
};
|
|
@@ -501,7 +604,7 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
501
604
|
requestAnimationFrame(() => {
|
|
502
605
|
if (editableRef.current) {
|
|
503
606
|
const range = document.createRange();
|
|
504
|
-
const selection =
|
|
607
|
+
const selection = editorSelection(editableRef.current);
|
|
505
608
|
range.selectNodeContents(editableRef.current);
|
|
506
609
|
range.collapse(false);
|
|
507
610
|
selection?.removeAllRanges();
|
|
@@ -532,17 +635,50 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
532
635
|
getValue: () => hasMentionSupport
|
|
533
636
|
? getFullValue()
|
|
534
637
|
: normalizeInputValue(editableRef.current?.innerText ?? ''),
|
|
535
|
-
setValue: (nextValue) => {
|
|
638
|
+
setValue: (nextValue, draftMentions = []) => {
|
|
536
639
|
if (!editableRef.current)
|
|
537
640
|
return;
|
|
641
|
+
const editor = editableRef.current;
|
|
642
|
+
editor.textContent = '';
|
|
538
643
|
if (hasMentionSupport) {
|
|
539
|
-
|
|
540
|
-
|
|
644
|
+
const remaining = [...draftMentions];
|
|
645
|
+
const restored = [];
|
|
646
|
+
let offset = 0;
|
|
647
|
+
while (remaining.length) {
|
|
648
|
+
let selected = -1;
|
|
649
|
+
let position = nextValue.length;
|
|
650
|
+
let tokenLength = 0;
|
|
651
|
+
remaining.forEach((mention, index) => {
|
|
652
|
+
if (!mention.prefix || !mention.slug)
|
|
653
|
+
return;
|
|
654
|
+
const token = `${mention.prefix}${mention.slug}`;
|
|
655
|
+
let found = nextValue.indexOf(token, offset);
|
|
656
|
+
while (found >= 0 && /[\p{L}\p{N}_-]/u.test(nextValue[found + token.length] ?? '')) {
|
|
657
|
+
found = nextValue.indexOf(token, found + token.length);
|
|
658
|
+
}
|
|
659
|
+
if (found >= 0 && (selected < 0 || found < position)) {
|
|
660
|
+
selected = index;
|
|
661
|
+
position = found;
|
|
662
|
+
tokenLength = token.length;
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
if (selected < 0)
|
|
666
|
+
break;
|
|
667
|
+
const [mention] = remaining.splice(selected, 1);
|
|
668
|
+
editor.append(document.createTextNode(nextValue.slice(offset, position)), createChipElement(mention));
|
|
669
|
+
restored.push(mention);
|
|
670
|
+
offset = position + tokenLength;
|
|
671
|
+
}
|
|
672
|
+
editor.append(document.createTextNode(nextValue.slice(offset)));
|
|
673
|
+
setMentions(restored);
|
|
674
|
+
closeDropdown();
|
|
675
|
+
}
|
|
676
|
+
else {
|
|
677
|
+
editor.textContent = nextValue;
|
|
541
678
|
}
|
|
542
|
-
editableRef.current.textContent = nextValue;
|
|
543
679
|
setValue(nextValue);
|
|
544
680
|
},
|
|
545
|
-
getMentions: () => (hasMentionSupport ?
|
|
681
|
+
getMentions: () => (hasMentionSupport ? collectMentions(getFullValue()) : []),
|
|
546
682
|
addMention: (mention) => {
|
|
547
683
|
if (!hasMentionSupport || !editableRef.current)
|
|
548
684
|
return;
|
|
@@ -552,7 +688,7 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
552
688
|
chip.after(space);
|
|
553
689
|
setMentions((prev) => [...prev, mention]);
|
|
554
690
|
},
|
|
555
|
-
}), [hasMentionSupport, setValue, getFullValue,
|
|
691
|
+
}), [hasMentionSupport, setValue, getFullValue, collectMentions, createChipElement, closeDropdown]);
|
|
556
692
|
// -----------------------------------------------------------------------
|
|
557
693
|
// Render
|
|
558
694
|
// -----------------------------------------------------------------------
|
|
@@ -563,9 +699,25 @@ exports.RichMentionInput = (0, react_1.forwardRef)(function RichMentionInput({ v
|
|
|
563
699
|
}
|
|
564
700
|
// Mention mode — wrapper with editor + dropdown
|
|
565
701
|
const isEmpty = !isFocused && getTextContent() === '' && mentions.length === 0;
|
|
702
|
+
const optionId = (index, action = -1) => (action >= 0 ? `${listboxId}-option-${index}-action-${action}` : `${listboxId}-option-${index}`);
|
|
703
|
+
const listOpen = dropdownOpen && searchResults.length > 0;
|
|
704
|
+
const optionProps = (index, action = -1) => ({
|
|
705
|
+
id: optionId(index, action),
|
|
706
|
+
role: 'option',
|
|
707
|
+
'aria-selected': index === selectedIndex && action === selectedAction,
|
|
708
|
+
tabIndex: -1,
|
|
709
|
+
});
|
|
566
710
|
return ((0, jsx_runtime_1.jsxs)("div", { "data-component": "rich-mention-input", "data-state": disabled
|
|
567
711
|
? 'disabled'
|
|
568
712
|
: dropdownOpen
|
|
569
713
|
? 'dropdown-open'
|
|
570
|
-
: 'idle', children: [(0, jsx_runtime_1.jsx)("div", { ref: editableRef, className: className, contentEditable: !disabled, role: "textbox", tabIndex: 0, "data-element": "editor", "aria-disabled": disabled, "aria-label": placeholder ?? 'Message input', onInput: handleInput, onKeyDown: handleKeyDown, onPaste: handlePaste, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), suppressContentEditableWarning: true }), isEmpty && placeholder && ((0, jsx_runtime_1.jsx)("div", { "data-element": "placeholder", "aria-hidden": true, children: placeholder })),
|
|
714
|
+
: 'idle', children: [(0, jsx_runtime_1.jsx)("div", { ref: editableRef, className: className, style: EDITOR_STYLE, contentEditable: !disabled, role: "textbox", tabIndex: 0, "data-element": "editor", "aria-disabled": disabled, "aria-label": placeholder ?? 'Message input', "aria-autocomplete": "list", "aria-controls": listOpen ? listboxId : undefined, "aria-activedescendant": listOpen ? optionId(selectedIndex, selectedAction) : undefined, onInput: handleInput, onKeyDown: handleKeyDown, onPaste: handlePaste, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), suppressContentEditableWarning: true }), isEmpty && placeholder && ((0, jsx_runtime_1.jsx)("div", { "data-element": "placeholder", "aria-hidden": true, children: placeholder })), (0, jsx_runtime_1.jsx)("div", { "data-element": "completion-status", role: "status", "aria-live": "polite", style: VISUALLY_HIDDEN, children: listOpen ? resultsLabel.replace('{count}', String(searchResults.length)) : '' }), listOpen && ((0, jsx_runtime_1.jsx)("div", { ref: dropdownRef, id: listboxId, role: "listbox", "aria-label": listLabel, "data-component": "mention-dropdown", "data-state": isSearching ? 'searching' : 'idle',
|
|
715
|
+
// Keep the caret in the editor while the list is clicked.
|
|
716
|
+
onMouseDown: (event) => event.preventDefault(), children: searchResults.map((result, index) => {
|
|
717
|
+
const key = result.key ?? `${result.type}:${result.id}`;
|
|
718
|
+
const item = ((0, jsx_runtime_1.jsx)(DropdownItem, { result: result, isSelected: index === selectedIndex && selectedAction === -1, onClick: () => insertMention(result), optionProps: optionProps(index) }, key));
|
|
719
|
+
if (!onEntityAction || !result.actions?.length)
|
|
720
|
+
return item;
|
|
721
|
+
return ((0, jsx_runtime_1.jsxs)("div", { role: "group", "aria-label": result.label, "data-element": "result-row", children: [item, (0, jsx_runtime_1.jsx)("span", { "data-element": "entity-actions", children: result.actions.map((action, actionIndex) => ((0, jsx_runtime_1.jsx)("button", { type: "button", ...optionProps(index, actionIndex), "aria-label": `${action.label}: ${result.label}`, "data-component": "mention-action", "data-selected": index === selectedIndex && actionIndex === selectedAction ? 'true' : 'false', onClick: () => runAction(result, action.id), children: action.label }, action.id))) })] }, key));
|
|
722
|
+
}) }))] }));
|
|
571
723
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export interface SessionSwitcherProps {
|
|
2
|
+
/** Temporarily lock session controls, e.g. while the app records a voice draft. */
|
|
3
|
+
disabled?: boolean;
|
|
2
4
|
/** Shown when no sessions exist yet. */
|
|
3
5
|
fallbackTitle?: string;
|
|
4
6
|
/** Format the per-row subtitle. Default: `updatedAt` or `createdAt` as locale date. */
|
|
@@ -11,4 +13,4 @@ export interface SessionSwitcherProps {
|
|
|
11
13
|
* everything from `useChatContext()` — requires an `<AiChatProvider>`
|
|
12
14
|
* ancestor whose `session` config exposes `list`, `create`, and `remove`.
|
|
13
15
|
*/
|
|
14
|
-
export declare function SessionSwitcher({ fallbackTitle, formatTimestamp, className, }?: SessionSwitcherProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function SessionSwitcher({ disabled, fallbackTitle, formatTimestamp, className, }?: SessionSwitcherProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const chat_context_js_1 = require("../provider/chat-context.js");
|
|
7
7
|
const confirm_dialog_js_1 = require("./confirm-dialog.js");
|
|
8
|
+
const chat_window_visibility_js_1 = require("./chat-window-visibility.js");
|
|
8
9
|
function defaultFormatTimestamp(value) {
|
|
9
10
|
if (value === undefined || value === null || value === '')
|
|
10
11
|
return '';
|
|
@@ -24,8 +25,10 @@ function defaultFormatTimestamp(value) {
|
|
|
24
25
|
* everything from `useChatContext()` — requires an `<AiChatProvider>`
|
|
25
26
|
* ancestor whose `session` config exposes `list`, `create`, and `remove`.
|
|
26
27
|
*/
|
|
27
|
-
function SessionSwitcher({ fallbackTitle, formatTimestamp = defaultFormatTimestamp, className, } = {}) {
|
|
28
|
-
const { sessions, activeSessionId, sessionsSupported, isSessionsLoading, switchSession, createSession, removeSession, renameSession, locale, } = (0, chat_context_js_1.useChatContext)();
|
|
28
|
+
function SessionSwitcher({ disabled = false, fallbackTitle, formatTimestamp = defaultFormatTimestamp, className, } = {}) {
|
|
29
|
+
const { sessions, activeSessionId, sessionsSupported, isSessionsLoading, isLoading, isSessionChangeBlocked, switchSession, createSession, removeSession, renameSession, locale, } = (0, chat_context_js_1.useChatContext)();
|
|
30
|
+
const visible = (0, react_1.useContext)(chat_window_visibility_js_1.ChatWindowVisibilityContext);
|
|
31
|
+
const blocked = !visible || disabled || (isSessionChangeBlocked ?? isLoading);
|
|
29
32
|
const resolvedFallback = fallbackTitle ?? locale.newChatLabel;
|
|
30
33
|
const [editingId, setEditingId] = (0, react_1.useState)(null);
|
|
31
34
|
const [editDraft, setEditDraft] = (0, react_1.useState)('');
|
|
@@ -60,6 +63,13 @@ function SessionSwitcher({ fallbackTitle, formatTimestamp = defaultFormatTimesta
|
|
|
60
63
|
const [open, setOpen] = (0, react_1.useState)(false);
|
|
61
64
|
const [pendingDeleteId, setPendingDeleteId] = (0, react_1.useState)(null);
|
|
62
65
|
const rootRef = (0, react_1.useRef)(null);
|
|
66
|
+
(0, react_1.useEffect)(() => {
|
|
67
|
+
if (!blocked)
|
|
68
|
+
return;
|
|
69
|
+
setOpen(false);
|
|
70
|
+
setPendingDeleteId(null);
|
|
71
|
+
setEditingId(null);
|
|
72
|
+
}, [blocked]);
|
|
63
73
|
(0, react_1.useEffect)(() => {
|
|
64
74
|
if (!open)
|
|
65
75
|
return;
|
|
@@ -76,26 +86,30 @@ function SessionSwitcher({ fallbackTitle, formatTimestamp = defaultFormatTimesta
|
|
|
76
86
|
return () => window.removeEventListener('mousedown', handler);
|
|
77
87
|
}, [open]);
|
|
78
88
|
const onNew = (0, react_1.useCallback)(async () => {
|
|
89
|
+
if (blocked)
|
|
90
|
+
return;
|
|
79
91
|
setOpen(false);
|
|
80
92
|
await createSession({ title: locale.newChatLabel });
|
|
81
|
-
}, [createSession, locale.newChatLabel]);
|
|
93
|
+
}, [createSession, locale.newChatLabel, blocked]);
|
|
82
94
|
const onPick = (0, react_1.useCallback)(async (id) => {
|
|
83
|
-
|
|
84
|
-
if (id === activeSessionId)
|
|
95
|
+
if (blocked)
|
|
85
96
|
return;
|
|
97
|
+
setOpen(false);
|
|
86
98
|
await switchSession(id);
|
|
87
|
-
}, [switchSession,
|
|
99
|
+
}, [switchSession, blocked]);
|
|
88
100
|
const onDelete = (0, react_1.useCallback)((e, id) => {
|
|
89
101
|
e.stopPropagation();
|
|
90
102
|
setPendingDeleteId(id);
|
|
91
103
|
}, []);
|
|
92
104
|
const confirmDelete = (0, react_1.useCallback)(async () => {
|
|
105
|
+
if (blocked)
|
|
106
|
+
return;
|
|
93
107
|
const id = pendingDeleteId;
|
|
94
108
|
setPendingDeleteId(null);
|
|
95
109
|
if (!id)
|
|
96
110
|
return;
|
|
97
111
|
await removeSession(id);
|
|
98
|
-
}, [pendingDeleteId, removeSession]);
|
|
112
|
+
}, [pendingDeleteId, removeSession, blocked]);
|
|
99
113
|
const cancelDelete = (0, react_1.useCallback)(() => {
|
|
100
114
|
setPendingDeleteId(null);
|
|
101
115
|
}, []);
|
|
@@ -109,7 +123,8 @@ function SessionSwitcher({ fallbackTitle, formatTimestamp = defaultFormatTimesta
|
|
|
109
123
|
});
|
|
110
124
|
const current = sorted.find((s) => s.id === activeSessionId);
|
|
111
125
|
const currentTitle = current?.title ?? resolvedFallback;
|
|
112
|
-
|
|
126
|
+
const pendingDeleteTitle = sessions.find((session) => session.id === pendingDeleteId)?.title;
|
|
127
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: rootRef, className: className, "data-component": "session-switcher", "data-open": open || undefined, children: [(0, jsx_runtime_1.jsxs)("button", { type: "button", "data-element": "trigger", onMouseDown: (e) => e.stopPropagation(), onClick: () => setOpen((v) => !v), "aria-haspopup": "listbox", "aria-expanded": open, disabled: blocked, children: [(0, jsx_runtime_1.jsx)("span", { "data-element": "trigger-title", children: currentTitle }), (0, jsx_runtime_1.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: (0, jsx_runtime_1.jsx)("polyline", { points: "6 9 12 15 18 9" }) })] }), open && !blocked && ((0, jsx_runtime_1.jsxs)("div", { "data-element": "popover", role: "listbox", onMouseDown: (e) => e.stopPropagation(), children: [(0, jsx_runtime_1.jsxs)("button", { type: "button", "data-element": "new-session", onClick: onNew, disabled: isSessionsLoading, children: [(0, jsx_runtime_1.jsx)("span", { "data-element": "plus", "aria-hidden": "true", children: "+" }), locale.newChatLabel] }), (0, jsx_runtime_1.jsx)("div", { "data-element": "session-list", children: sorted.length === 0 ? ((0, jsx_runtime_1.jsx)("div", { "data-element": "empty", children: isSessionsLoading ? locale.sessionsLoadingLabel : locale.noSessionsLabel })) : (sorted.map((s) => {
|
|
113
128
|
const isActive = s.id === activeSessionId;
|
|
114
129
|
const ts = formatTimestamp(s.updatedAt ?? s.createdAt);
|
|
115
130
|
const isEditing = editingId === s.id;
|
|
@@ -126,8 +141,8 @@ function SessionSwitcher({ fallbackTitle, formatTimestamp = defaultFormatTimesta
|
|
|
126
141
|
e.preventDefault();
|
|
127
142
|
cancelEdit();
|
|
128
143
|
}
|
|
129
|
-
}, onBlur: () => void commitEdit() })) : ((0, jsx_runtime_1.jsx)("div", { "data-element": "row-title", children: s.title ||
|
|
130
|
-
})) })] })), (0, jsx_runtime_1.jsx)(confirm_dialog_js_1.ConfirmDialog, { open: pendingDeleteId !== null, title: locale.confirmDeleteSessionPrompt, message:
|
|
131
|
-
?
|
|
144
|
+
}, onBlur: () => void commitEdit() })) : ((0, jsx_runtime_1.jsx)("div", { "data-element": "row-title", children: s.title || locale.untitledSessionLabel })), ts && !isEditing && ((0, jsx_runtime_1.jsx)("div", { "data-element": "row-subtitle", children: ts }))] }), !isEditing && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("button", { type: "button", "data-element": "row-edit", "aria-label": locale.renameSessionAriaLabel, title: locale.renameSessionAriaLabel, onClick: (e) => beginEdit(e, s.id, s.title || ''), onMouseDown: (e) => e.stopPropagation(), children: (0, jsx_runtime_1.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("path", { d: "M12 20h9" }), (0, jsx_runtime_1.jsx)("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })] }) }), (0, jsx_runtime_1.jsx)("button", { type: "button", "data-element": "row-delete", "aria-label": locale.deleteSessionAriaLabel, title: locale.deleteSessionAriaLabel, onClick: (e) => void onDelete(e, s.id), onMouseDown: (e) => e.stopPropagation(), children: (0, jsx_runtime_1.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("polyline", { points: "3 6 5 6 21 6" }), (0, jsx_runtime_1.jsx)("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" })] }) })] }))] }, s.id));
|
|
145
|
+
})) })] })), (0, jsx_runtime_1.jsx)(confirm_dialog_js_1.ConfirmDialog, { open: pendingDeleteId !== null && !blocked, title: locale.confirmDeleteSessionPrompt, message: pendingDeleteTitle
|
|
146
|
+
? locale.sessionArchiveMessage.replace('{title}', () => pendingDeleteTitle)
|
|
132
147
|
: undefined, confirmLabel: locale.deleteSessionAriaLabel, cancelLabel: locale.cancelButton, destructive: true, onConfirm: () => void confirmDelete(), onCancel: cancelDelete })] }));
|
|
133
148
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type StatusIconKind = 'check' | 'spinner' | 'pending' | 'error';
|
|
2
|
+
/**
|
|
3
|
+
* Inline status icon. It carries its own shape and motion (SMIL), so it
|
|
4
|
+
* reads correctly in unstyled mode without any stylesheet.
|
|
5
|
+
*/
|
|
6
|
+
export declare function StatusIcon({ icon }: {
|
|
7
|
+
icon: StatusIconKind;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusIcon = StatusIcon;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
/**
|
|
6
|
+
* Inline status icon. It carries its own shape and motion (SMIL), so it
|
|
7
|
+
* reads correctly in unstyled mode without any stylesheet.
|
|
8
|
+
*/
|
|
9
|
+
function StatusIcon({ icon }) {
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { "data-element": "icon", "data-icon": icon, viewBox: "0 0 16 16", width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [icon === 'check' && (0, jsx_runtime_1.jsx)("path", { d: "M3 8.5l3.5 3.5L13 4.5" }), icon === 'error' && (0, jsx_runtime_1.jsx)("path", { d: "M4.5 4.5l7 7M11.5 4.5l-7 7" }), icon === 'pending' && (0, jsx_runtime_1.jsx)("circle", { cx: "8", cy: "8", r: "5.5", strokeWidth: "1.5", opacity: "0.5" }), icon === 'spinner' && ((0, jsx_runtime_1.jsx)("path", { d: "M8 2.5a5.5 5.5 0 1 1-5.5 5.5", children: (0, jsx_runtime_1.jsx)("animateTransform", { attributeName: "transform", type: "rotate", from: "0 8 8", to: "360 8 8", dur: "0.9s", repeatCount: "indefinite" }) }))] }));
|
|
11
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StreamWaveform = StreamWaveform;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const waveform_js_1 = require("../stt/waveform.js");
|
|
7
|
+
/** Visualizes an existing authoritative recorder stream without opening a mic. */
|
|
8
|
+
function StreamWaveform({ stream, }) {
|
|
9
|
+
const [level, setLevel] = (0, react_1.useState)(0);
|
|
10
|
+
(0, react_1.useEffect)(() => {
|
|
11
|
+
if (!stream)
|
|
12
|
+
return;
|
|
13
|
+
let disposed = false;
|
|
14
|
+
let frame = 0;
|
|
15
|
+
let analyser = null;
|
|
16
|
+
try {
|
|
17
|
+
analyser = (0, waveform_js_1.createStreamAnalyser)(stream);
|
|
18
|
+
const draw = () => {
|
|
19
|
+
if (disposed || !analyser)
|
|
20
|
+
return;
|
|
21
|
+
setLevel(analyser.readLevel());
|
|
22
|
+
frame = requestAnimationFrame(draw);
|
|
23
|
+
};
|
|
24
|
+
frame = requestAnimationFrame(draw);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
setLevel(0);
|
|
28
|
+
}
|
|
29
|
+
return () => {
|
|
30
|
+
disposed = true;
|
|
31
|
+
cancelAnimationFrame(frame);
|
|
32
|
+
void analyser?.close();
|
|
33
|
+
};
|
|
34
|
+
}, [stream]);
|
|
35
|
+
const heights = [0.45, 0.75, 1, 0.65, 0.85, 0.5].map((weight) => Math.max(4, Math.round(4 + level * weight * 20)));
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)("div", { "data-element": "waveform", style: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
minWidth: 0,
|
|
39
|
+
display: 'flex',
|
|
40
|
+
gap: 3,
|
|
41
|
+
alignItems: 'center',
|
|
42
|
+
justifyContent: 'center',
|
|
43
|
+
}, children: heights.map((height, index) => ((0, jsx_runtime_1.jsx)("span", { style: {
|
|
44
|
+
width: 3,
|
|
45
|
+
height,
|
|
46
|
+
borderRadius: 2,
|
|
47
|
+
background: 'currentColor',
|
|
48
|
+
} }, index))) }));
|
|
49
|
+
}
|