glirastes 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +377 -1
- package/README.md +283 -847
- package/adapter/nextjs/package.json +5 -0
- package/ai-sdk/package.json +5 -0
- package/browser/package.json +5 -0
- package/contracts/package.json +5 -0
- package/dist/agent/git.d.ts +65 -0
- package/dist/agent/git.js +122 -0
- package/dist/agent/git.js.map +1 -0
- package/dist/agent/openrouter.d.ts +56 -0
- package/dist/agent/openrouter.js +74 -0
- package/dist/agent/openrouter.js.map +1 -0
- package/dist/agent/platform-jobs.d.ts +102 -0
- package/dist/agent/platform-jobs.js +122 -0
- package/dist/agent/platform-jobs.js.map +1 -0
- package/dist/agent/runner.d.ts +150 -0
- package/dist/agent/runner.js +250 -0
- package/dist/agent/runner.js.map +1 -0
- package/dist/agent/workspace.d.ts +65 -0
- package/dist/agent/workspace.js +264 -0
- package/dist/agent/workspace.js.map +1 -0
- package/dist/browser/client-actions.d.ts +26 -0
- package/dist/browser/client-actions.js +42 -0
- package/dist/browser/client-actions.js.map +1 -0
- package/dist/browser/index.d.ts +4 -0
- package/dist/browser/index.js +5 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/navigation.d.ts +32 -0
- package/dist/browser/navigation.js +79 -0
- package/dist/browser/navigation.js.map +1 -0
- package/dist/browser/query-filters.d.ts +30 -0
- package/dist/browser/query-filters.js +85 -0
- package/dist/browser/query-filters.js.map +1 -0
- package/dist/browser/ui-action-bus.d.ts +26 -0
- package/dist/browser/ui-action-bus.js +66 -0
- package/dist/browser/ui-action-bus.js.map +1 -0
- package/dist/cjs/browser/client-actions.d.ts +26 -0
- package/dist/cjs/browser/client-actions.js +45 -0
- package/dist/cjs/browser/index.d.ts +4 -0
- package/dist/cjs/browser/index.js +16 -0
- package/dist/cjs/browser/navigation.d.ts +32 -0
- package/dist/cjs/browser/navigation.js +84 -0
- package/dist/cjs/browser/query-filters.d.ts +30 -0
- package/dist/cjs/browser/query-filters.js +87 -0
- package/dist/cjs/browser/ui-action-bus.d.ts +26 -0
- package/dist/cjs/browser/ui-action-bus.js +70 -0
- package/dist/cjs/codegen/execution-inventory.d.ts +63 -0
- package/dist/cjs/codegen/execution-inventory.js +312 -0
- package/dist/cjs/codegen/index.d.ts +4 -13
- package/dist/cjs/codegen/index.js +13 -31
- package/dist/cjs/codegen/inventory-generation.d.ts +104 -0
- package/dist/cjs/codegen/inventory-generation.js +122 -0
- package/dist/cjs/codegen/next-source-generation.d.ts +17 -0
- package/dist/cjs/codegen/next-source-generation.js +51 -0
- package/dist/cjs/codegen/openapi-document.d.ts +53 -0
- package/dist/cjs/codegen/openapi-document.js +127 -0
- package/dist/cjs/codegen/route-exports.d.ts +13 -0
- package/dist/cjs/codegen/route-exports.js +122 -0
- package/dist/cjs/codegen/route-fingerprint.d.ts +2 -0
- package/dist/cjs/codegen/route-fingerprint.js +11 -0
- package/dist/cjs/codegen/route-scanner.d.ts +57 -0
- package/dist/cjs/codegen/route-scanner.js +239 -0
- package/dist/cjs/codegen/tools/canonical.d.ts +12 -0
- package/dist/cjs/codegen/tools/canonical.js +49 -0
- package/dist/cjs/codegen/tools/sources/nest-decorators.d.ts +27 -0
- package/dist/cjs/codegen/tools/sources/nest-decorators.js +73 -0
- package/dist/cjs/contracts/app-setup.d.ts +346 -0
- package/dist/cjs/contracts/app-setup.js +208 -0
- package/dist/cjs/contracts/chat-command.d.ts +65 -0
- package/dist/cjs/contracts/chat-command.js +128 -0
- package/dist/cjs/contracts/chat-interactions.d.ts +126 -0
- package/dist/cjs/contracts/chat-interactions.js +439 -0
- package/dist/cjs/contracts/clarification.d.ts +53 -0
- package/dist/cjs/contracts/clarification.js +91 -0
- package/dist/cjs/contracts/content-boundary.d.ts +3 -0
- package/dist/cjs/contracts/content-boundary.js +95 -0
- package/dist/cjs/contracts/events.d.ts +273 -0
- package/dist/cjs/contracts/events.js +229 -0
- package/dist/cjs/contracts/index.d.ts +18 -0
- package/dist/cjs/contracts/index.js +83 -0
- package/dist/cjs/contracts/plan.d.ts +20 -0
- package/dist/cjs/contracts/plan.js +38 -0
- package/dist/cjs/contracts/platform-connection.d.ts +44 -0
- package/dist/cjs/contracts/platform-connection.js +66 -0
- package/dist/cjs/contracts/platform-prompt-revision.d.ts +27 -0
- package/dist/cjs/contracts/platform-prompt-revision.js +46 -0
- package/dist/cjs/contracts/prompt-bundle.d.ts +46 -0
- package/dist/cjs/contracts/prompt-bundle.js +74 -0
- package/dist/cjs/contracts/revisions.d.ts +716 -0
- package/dist/cjs/contracts/revisions.js +301 -0
- package/dist/cjs/contracts/runtime.d.ts +55 -0
- package/dist/cjs/contracts/runtime.js +67 -0
- package/dist/cjs/contracts/semantic-change.d.ts +27 -0
- package/dist/cjs/contracts/semantic-change.js +103 -0
- package/dist/cjs/contracts/tool-exclude-pattern.d.ts +12 -0
- package/dist/cjs/contracts/tool-exclude-pattern.js +29 -0
- package/dist/cjs/contracts/tool-policy-entry.d.ts +107 -0
- package/dist/cjs/contracts/tool-policy-entry.js +42 -0
- package/dist/cjs/contracts/tool-policy.d.ts +198 -0
- package/dist/cjs/contracts/tool-policy.js +500 -0
- package/dist/cjs/contracts/url.d.ts +2 -0
- package/dist/cjs/contracts/url.js +10 -0
- package/dist/cjs/diagnostics/foundation-diagnostic.d.ts +34 -0
- package/dist/cjs/diagnostics/foundation-diagnostic.js +52 -0
- package/dist/cjs/diagnostics/index.d.ts +2 -0
- package/dist/cjs/diagnostics/index.js +7 -0
- package/dist/cjs/embed/chat-styles.generated.d.ts +1 -0
- package/dist/cjs/embed/chat-styles.generated.js +6 -0
- package/dist/cjs/embed/glirastes-chat-element.d.ts +67 -0
- package/dist/cjs/embed/glirastes-chat-element.js +282 -0
- package/dist/cjs/embed/index.d.ts +4 -0
- package/dist/cjs/embed/index.js +20 -0
- package/dist/cjs/embed/theme.d.ts +10 -0
- package/dist/cjs/embed/theme.js +45 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/react/assistant/assistant-layout.d.ts +55 -0
- package/dist/cjs/react/assistant/assistant-layout.js +107 -0
- package/dist/cjs/react/assistant/assistant-shell.d.ts +132 -0
- package/dist/cjs/react/assistant/assistant-shell.js +267 -0
- package/dist/cjs/react/assistant/assistant-shortcut-list.d.ts +24 -0
- package/dist/cjs/react/assistant/assistant-shortcut-list.js +35 -0
- package/dist/cjs/react/assistant/assistant-workspace.d.ts +31 -0
- package/dist/cjs/react/assistant/assistant-workspace.js +33 -0
- package/dist/cjs/react/completions/completion-search.d.ts +21 -0
- package/dist/cjs/react/completions/completion-search.js +111 -0
- package/dist/cjs/react/completions/ui-tool-command-provider.d.ts +15 -0
- package/dist/cjs/react/completions/ui-tool-command-provider.js +84 -0
- package/dist/cjs/react/components/activity-log.d.ts +17 -0
- package/dist/cjs/react/components/activity-log.js +70 -0
- package/dist/cjs/react/components/ai-chat-panel.js +13 -6
- package/dist/cjs/react/components/ai-trigger-button.d.ts +1 -1
- package/dist/cjs/react/components/ai-trigger-button.js +11 -66
- package/dist/cjs/react/components/approval-card.js +20 -1
- package/dist/cjs/react/components/chat-input.js +6 -4
- package/dist/cjs/react/components/chat-window-visibility.d.ts +3 -0
- package/dist/cjs/react/components/chat-window-visibility.js +7 -0
- package/dist/cjs/react/components/chat-window.d.ts +1 -1
- package/dist/cjs/react/components/chat-window.js +124 -57
- package/dist/cjs/react/components/clarification-card.d.ts +10 -0
- package/dist/cjs/react/components/clarification-card.js +35 -0
- package/dist/cjs/react/components/command-arguments-form.d.ts +10 -0
- package/dist/cjs/react/components/command-arguments-form.js +153 -0
- package/dist/cjs/react/components/confirm-dialog.js +1 -1
- package/dist/cjs/react/components/floating-chat-ui.d.ts +3 -3
- package/dist/cjs/react/components/floating-chat-ui.js +30 -4
- package/dist/cjs/react/components/mention-input.d.ts +5 -4
- package/dist/cjs/react/components/mention-input.js +64 -7
- package/dist/cjs/react/components/message-bubble.js +90 -14
- package/dist/cjs/react/components/plan-checklist.d.ts +14 -0
- package/dist/cjs/react/components/plan-checklist.js +20 -0
- package/dist/cjs/react/components/recording-bar.js +44 -58
- package/dist/cjs/react/components/rich-mention-input.js +197 -45
- package/dist/cjs/react/components/session-switcher.d.ts +3 -1
- package/dist/cjs/react/components/session-switcher.js +26 -11
- package/dist/cjs/react/components/status-icon.d.ts +8 -0
- package/dist/cjs/react/components/status-icon.js +11 -0
- package/dist/cjs/react/components/stream-waveform.d.ts +4 -0
- package/dist/cjs/react/components/stream-waveform.js +49 -0
- package/dist/cjs/react/components/voice-input-addon.d.ts +16 -1
- package/dist/cjs/react/components/voice-input-addon.js +255 -18
- package/dist/cjs/react/components/voice-input-button.js +1 -1
- package/dist/cjs/react/hooks/use-chat-shortcuts.d.ts +33 -0
- package/dist/cjs/react/hooks/use-chat-shortcuts.js +139 -0
- package/dist/cjs/react/hooks/use-deepgram-transcription.d.ts +4 -0
- package/dist/cjs/react/hooks/use-deepgram-transcription.js +31 -321
- package/dist/cjs/react/hooks/use-drag-resize-panel.d.ts +1 -0
- package/dist/cjs/react/hooks/use-drag-resize-panel.js +246 -121
- package/dist/cjs/react/hooks/use-floating-panel.d.ts +57 -0
- package/dist/cjs/react/hooks/use-floating-panel.js +217 -0
- package/dist/cjs/react/hooks/use-keyboard-shortcut.js +2 -1
- package/dist/cjs/react/hooks/use-push-to-talk-hotkey.d.ts +24 -0
- package/dist/cjs/react/hooks/use-push-to-talk-hotkey.js +116 -0
- package/dist/cjs/react/hooks/use-sidebar-resize.d.ts +19 -0
- package/dist/cjs/react/hooks/use-sidebar-resize.js +109 -0
- package/dist/cjs/react/index.d.ts +30 -1
- package/dist/cjs/react/index.js +91 -1
- package/dist/cjs/react/interactions/definitions.d.ts +67 -0
- package/dist/cjs/react/interactions/definitions.js +83 -0
- package/dist/cjs/react/interactions/registry.d.ts +74 -0
- package/dist/cjs/react/interactions/registry.js +250 -0
- package/dist/cjs/react/interactions/use-chat-interactions-data.d.ts +15 -0
- package/dist/cjs/react/interactions/use-chat-interactions-data.js +43 -0
- package/dist/cjs/react/locale-de.d.ts +3 -0
- package/dist/cjs/react/locale-de.js +69 -0
- package/dist/cjs/react/provider/ai-chat-provider.d.ts +1 -1
- package/dist/cjs/react/provider/ai-chat-provider.js +410 -106
- package/dist/cjs/react/provider/chat-context.d.ts +52 -1
- package/dist/cjs/react/stt/controller.d.ts +60 -0
- package/dist/cjs/react/stt/controller.js +268 -0
- package/dist/cjs/react/stt/deepgram.d.ts +30 -0
- package/dist/cjs/react/stt/deepgram.js +204 -0
- package/dist/cjs/react/stt/recorded.d.ts +29 -0
- package/dist/cjs/react/stt/recorded.js +115 -0
- package/dist/cjs/react/stt/segments.d.ts +18 -0
- package/dist/cjs/react/stt/segments.js +32 -0
- package/dist/cjs/react/stt/use-stt.d.ts +17 -0
- package/dist/cjs/react/stt/use-stt.js +41 -0
- package/dist/cjs/react/stt/waveform.d.ts +5 -0
- package/dist/cjs/react/stt/waveform.js +31 -0
- package/dist/cjs/react/styles.css +1555 -0
- package/dist/cjs/react/tool-renderers/registry.d.ts +31 -0
- package/dist/cjs/react/tool-renderers/registry.js +50 -0
- package/dist/cjs/react/tool-renderers/renderer-boundary.d.ts +18 -0
- package/dist/cjs/react/tool-renderers/renderer-boundary.js +15 -0
- package/dist/cjs/react/transports/vercel/vercel-ai-chat.d.ts +1 -1
- package/dist/cjs/react/transports/vercel/vercel-ai-chat.js +2 -2
- package/dist/cjs/react/transports/vercel.d.ts +6 -0
- package/dist/cjs/react/transports/vercel.js +12 -6
- package/dist/cjs/react/types.d.ts +269 -6
- package/dist/cjs/react/ui.d.ts +18 -17
- package/dist/cjs/react/ui.js +50 -45
- package/dist/cjs/react/unstyled.d.ts +7 -0
- package/dist/cjs/react/unstyled.js +10 -0
- package/dist/cjs/react/utils/activity.d.ts +16 -0
- package/dist/cjs/react/utils/activity.js +80 -0
- package/dist/cjs/react/utils/clarification.d.ts +31 -0
- package/dist/cjs/react/utils/clarification.js +104 -0
- package/dist/cjs/react/utils/create-approval-description.d.ts +6 -0
- package/dist/cjs/react/utils/create-approval-description.js +42 -7
- package/dist/cjs/react/utils/create-tool-result-handler.d.ts +1 -1
- package/dist/cjs/react/utils/create-tool-result-handler.js +1 -1
- package/dist/cjs/react/utils/entity-names.d.ts +6 -0
- package/dist/cjs/react/utils/entity-names.js +57 -0
- package/dist/cjs/react/utils/followup-suggestions.d.ts +11 -0
- package/dist/cjs/react/utils/followup-suggestions.js +39 -0
- package/dist/cjs/react/utils/local-session-store.d.ts +30 -0
- package/dist/cjs/react/utils/local-session-store.js +165 -0
- package/dist/cjs/react/utils/mention-markup.d.ts +44 -1
- package/dist/cjs/react/utils/mention-markup.js +144 -10
- package/dist/cjs/react/utils/tool-presentation.d.ts +23 -0
- package/dist/cjs/react/utils/tool-presentation.js +46 -0
- package/dist/cjs/react/utils/tool-result-config.d.ts +10 -0
- package/dist/cjs/react/utils/tool-result-config.js +14 -0
- package/dist/cjs/runtime/ai-sdk/engine.d.ts +66 -0
- package/dist/cjs/runtime/ai-sdk/engine.js +192 -0
- package/dist/cjs/runtime/ai-sdk/index.d.ts +1 -0
- package/dist/cjs/runtime/ai-sdk/index.js +5 -0
- package/dist/cjs/runtime/authorization.d.ts +16 -0
- package/dist/cjs/runtime/authorization.js +35 -0
- package/dist/cjs/runtime/budget.d.ts +39 -0
- package/dist/cjs/runtime/budget.js +100 -0
- package/dist/cjs/runtime/contract-bindings.d.ts +52 -0
- package/dist/cjs/runtime/contract-bindings.js +95 -0
- package/dist/cjs/runtime/engine.d.ts +52 -0
- package/dist/cjs/runtime/engine.js +2 -0
- package/dist/cjs/runtime/fingerprint.d.ts +6 -0
- package/dist/cjs/runtime/fingerprint.js +31 -0
- package/dist/cjs/runtime/glirastes.d.ts +113 -0
- package/dist/cjs/runtime/glirastes.js +289 -0
- package/dist/cjs/runtime/index.d.ts +24 -0
- package/dist/cjs/runtime/index.js +74 -0
- package/dist/cjs/runtime/json-schema.d.ts +13 -0
- package/dist/cjs/runtime/json-schema.js +46 -0
- package/dist/cjs/runtime/local-limits.d.ts +6 -0
- package/dist/cjs/runtime/local-limits.js +26 -0
- package/dist/cjs/runtime/local-runtime-source.d.ts +76 -0
- package/dist/cjs/runtime/local-runtime-source.js +0 -0
- package/dist/cjs/runtime/local-signer.d.ts +17 -0
- package/dist/cjs/runtime/local-signer.js +34 -0
- package/dist/cjs/runtime/local-tool-bindings.d.ts +57 -0
- package/dist/cjs/runtime/local-tool-bindings.js +197 -0
- package/dist/cjs/runtime/managed-turn.d.ts +29 -0
- package/dist/cjs/runtime/managed-turn.js +99 -0
- package/dist/cjs/runtime/metrics/cost.d.ts +64 -0
- package/dist/cjs/runtime/metrics/cost.js +98 -0
- package/dist/cjs/runtime/metrics/sink.d.ts +56 -0
- package/dist/cjs/runtime/metrics/sink.js +217 -0
- package/dist/cjs/runtime/metrics/turn-recorder.d.ts +62 -0
- package/dist/cjs/runtime/metrics/turn-recorder.js +172 -0
- package/dist/cjs/runtime/offline-execution-lease.d.ts +27 -0
- package/dist/cjs/runtime/offline-execution-lease.js +49 -0
- package/dist/cjs/runtime/policy-overlay.d.ts +86 -0
- package/dist/cjs/runtime/policy-overlay.js +122 -0
- package/dist/cjs/runtime/postgres-store.d.ts +111 -0
- package/dist/cjs/runtime/postgres-store.js +368 -0
- package/dist/cjs/runtime/prompt-bundle-store.d.ts +58 -0
- package/dist/cjs/runtime/prompt-bundle-store.js +123 -0
- package/dist/cjs/runtime/runtime-mode.d.ts +23 -0
- package/dist/cjs/runtime/runtime-mode.js +46 -0
- package/dist/cjs/runtime/sdk-version.d.ts +2 -0
- package/dist/cjs/runtime/sdk-version.js +5 -0
- package/dist/cjs/runtime/tool-discovery.d.ts +51 -0
- package/dist/cjs/runtime/tool-discovery.js +141 -0
- package/dist/cjs/runtime/tool-search.d.ts +31 -0
- package/dist/cjs/runtime/tool-search.js +149 -0
- package/dist/cjs/runtime/turn-snapshot.d.ts +44 -0
- package/dist/cjs/runtime/turn-snapshot.js +112 -0
- package/dist/cjs/server/adapters/nextjs/approval-binding.d.ts +334 -0
- package/dist/cjs/server/adapters/nextjs/approval-binding.js +724 -0
- package/dist/cjs/server/adapters/nextjs/chat-interactions-handler.d.ts +26 -0
- package/dist/cjs/server/adapters/nextjs/chat-interactions-handler.js +67 -0
- package/dist/cjs/server/adapters/nextjs/clarification-resume.d.ts +21 -0
- package/dist/cjs/server/adapters/nextjs/clarification-resume.js +112 -0
- package/dist/cjs/server/adapters/nextjs/context-helpers.d.ts +49 -8
- package/dist/cjs/server/adapters/nextjs/context-helpers.js +76 -21
- package/dist/cjs/server/adapters/nextjs/create-ai-chat-handler.d.ts +59 -1
- package/dist/cjs/server/adapters/nextjs/create-ai-chat-handler.js +648 -94
- package/dist/cjs/server/adapters/nextjs/direct-command.d.ts +75 -0
- package/dist/cjs/server/adapters/nextjs/direct-command.js +322 -0
- package/dist/cjs/server/adapters/nextjs/index.d.ts +10 -2
- package/dist/cjs/server/adapters/nextjs/index.js +24 -1
- package/dist/cjs/server/adapters/nextjs/prepare-model-messages.d.ts +2 -1
- package/dist/cjs/server/adapters/nextjs/prepare-model-messages.js +6 -14
- package/dist/cjs/server/adapters/nextjs/recording-transcription-handler.d.ts +31 -0
- package/dist/cjs/server/adapters/nextjs/recording-transcription-handler.js +58 -0
- package/dist/cjs/server/adapters/nextjs/request-guards.d.ts +41 -0
- package/dist/cjs/server/adapters/nextjs/request-guards.js +112 -0
- package/dist/cjs/server/adapters/nextjs/sanitize-model-messages.js +12 -6
- package/dist/cjs/server/adapters/nextjs/scope-pipeline-tools.d.ts +17 -0
- package/dist/cjs/server/adapters/nextjs/scope-pipeline-tools.js +28 -0
- package/dist/cjs/server/adapters/nextjs/tool-discovery.d.ts +39 -0
- package/dist/cjs/server/adapters/nextjs/tool-discovery.js +50 -0
- package/dist/cjs/server/adapters/nextjs/tool-presentation.d.ts +26 -0
- package/dist/cjs/server/adapters/nextjs/tool-presentation.js +21 -0
- package/dist/cjs/server/adapters/nextjs/types.d.ts +229 -13
- package/dist/cjs/server/adapters/nextjs/with-ai-tool.d.ts +2 -2
- package/dist/cjs/server/core/adaptive-fast-path.d.ts +3 -0
- package/dist/cjs/server/core/adaptive-fast-path.js +188 -0
- package/dist/cjs/server/core/clarification-tool.d.ts +29 -0
- package/dist/cjs/server/core/clarification-tool.js +64 -0
- package/dist/cjs/server/core/generated-ui-tool.d.ts +31 -0
- package/dist/cjs/server/core/generated-ui-tool.js +89 -0
- package/dist/cjs/server/core/index.d.ts +49 -8
- package/dist/cjs/server/core/index.js +208 -17
- package/dist/cjs/server/core/local-guardrails.d.ts +6 -0
- package/dist/cjs/server/core/local-guardrails.js +70 -0
- package/dist/cjs/server/core/module-router.d.ts +3 -1
- package/dist/cjs/server/core/module-router.js +22 -2
- package/dist/cjs/server/core/plan-tool.d.ts +23 -0
- package/dist/cjs/server/core/plan-tool.js +35 -0
- package/dist/cjs/server/core/zod-compact.d.ts +2 -2
- package/dist/cjs/server/core/zod-compact.js +56 -7
- package/dist/cjs/server/index.d.ts +2 -4
- package/dist/cjs/server/index.js +4 -5
- package/dist/cjs/server/lancer/client.js +2 -1
- package/dist/cjs/server/local-pipeline.d.ts +14 -0
- package/dist/cjs/server/local-pipeline.js +154 -0
- package/dist/cjs/server/pii-shield/index.d.ts +1 -0
- package/dist/cjs/server/pii-shield/index.js +3 -1
- package/dist/cjs/server/pii-shield/regex-detector.d.ts +13 -0
- package/dist/cjs/server/pii-shield/regex-detector.js +111 -0
- package/dist/cjs/server/testing/guardrails.js +2 -66
- package/dist/cjs/server/testing/helpers.js +1 -62
- package/dist/cjs/server/testing/index.d.ts +1 -0
- package/dist/cjs/server/testing/index.js +3 -1
- package/dist/cjs/server/testing/registry-parity.d.ts +18 -0
- package/dist/cjs/server/testing/registry-parity.js +40 -0
- package/dist/cjs/server/testing/smoke.d.ts +2 -1
- package/dist/cjs/server/testing/smoke.js +7 -3
- package/dist/cjs/server/testing/types.d.ts +1 -1
- package/dist/cjs/server/testing/zod-introspect.d.ts +1 -1
- package/dist/cjs/server/testing/zod-introspect.js +178 -5
- package/dist/cjs/stt/index.d.ts +5 -0
- package/dist/cjs/stt/index.js +16 -0
- package/dist/cjs/sync/app-setup-client.d.ts +46 -0
- package/dist/cjs/sync/app-setup-client.js +140 -0
- package/dist/cjs/sync/capability-report.d.ts +41 -0
- package/dist/cjs/sync/capability-report.js +52 -0
- package/dist/cjs/sync/connection-lookup.d.ts +19 -0
- package/dist/cjs/sync/connection-lookup.js +58 -0
- package/dist/cjs/sync/control-plane-client.d.ts +69 -0
- package/dist/cjs/sync/control-plane-client.js +186 -0
- package/dist/cjs/sync/deployment-selector.d.ts +9 -0
- package/dist/cjs/sync/deployment-selector.js +29 -0
- package/dist/cjs/sync/fetch-sse-push.d.ts +6 -0
- package/dist/cjs/sync/fetch-sse-push.js +45 -0
- package/dist/cjs/sync/index.d.ts +26 -0
- package/dist/cjs/sync/index.js +43 -0
- package/dist/cjs/sync/jwks-provider.d.ts +14 -0
- package/dist/cjs/sync/jwks-provider.js +56 -0
- package/dist/cjs/sync/local-deployment-validator.d.ts +30 -0
- package/dist/cjs/sync/local-deployment-validator.js +62 -0
- package/dist/cjs/sync/managed-sync.d.ts +40 -0
- package/dist/cjs/sync/managed-sync.js +96 -0
- package/dist/cjs/sync/materialize-deployment.d.ts +7 -0
- package/dist/cjs/sync/materialize-deployment.js +65 -0
- package/dist/cjs/sync/runtime-connect-client.d.ts +23 -0
- package/dist/cjs/sync/runtime-connect-client.js +185 -0
- package/dist/cjs/sync/runtime-setup-client.d.ts +62 -0
- package/dist/cjs/sync/runtime-setup-client.js +157 -0
- package/dist/cjs/sync/signature-verifier.d.ts +39 -0
- package/dist/cjs/sync/signature-verifier.js +102 -0
- package/dist/cjs/sync/state-store.d.ts +24 -0
- package/dist/cjs/sync/state-store.js +51 -0
- package/dist/cjs/sync/sync-manager.d.ts +27 -0
- package/dist/cjs/sync/sync-manager.js +173 -0
- package/dist/cjs/types.d.ts +68 -16
- package/dist/cjs/types.js +30 -2
- package/dist/cli/bin.js +34 -23
- package/dist/cli/bin.js.map +1 -1
- package/dist/cli/commands/agent-setup.d.ts +27 -0
- package/dist/cli/commands/agent-setup.js +149 -0
- package/dist/cli/commands/agent-setup.js.map +1 -0
- package/dist/cli/commands/apply-setup-plan.d.ts +21 -0
- package/dist/cli/commands/apply-setup-plan.js +100 -0
- package/dist/cli/commands/apply-setup-plan.js.map +1 -0
- package/dist/cli/commands/atomic-artifact-write.d.ts +19 -0
- package/dist/cli/commands/atomic-artifact-write.js +106 -0
- package/dist/cli/commands/atomic-artifact-write.js.map +1 -0
- package/dist/cli/commands/ci-workflow.d.ts +48 -0
- package/dist/cli/commands/ci-workflow.js +209 -0
- package/dist/cli/commands/ci-workflow.js.map +1 -0
- package/dist/cli/commands/connect.d.ts +47 -0
- package/dist/cli/commands/connect.js +216 -0
- package/dist/cli/commands/connect.js.map +1 -0
- package/dist/cli/commands/connection-descriptor.d.ts +4 -0
- package/dist/cli/commands/connection-descriptor.js +47 -0
- package/dist/cli/commands/connection-descriptor.js.map +1 -0
- package/dist/cli/commands/connection-environment.d.ts +25 -0
- package/dist/cli/commands/connection-environment.js +151 -0
- package/dist/cli/commands/connection-environment.js.map +1 -0
- package/dist/cli/commands/current-setup-manifests.d.ts +7 -0
- package/dist/cli/commands/current-setup-manifests.js +16 -0
- package/dist/cli/commands/current-setup-manifests.js.map +1 -0
- package/dist/cli/commands/doctor-presentation.d.ts +5 -0
- package/dist/cli/commands/doctor-presentation.js +86 -0
- package/dist/cli/commands/doctor-presentation.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +27 -0
- package/dist/cli/commands/doctor.js +220 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/init-scaffold.d.ts +25 -0
- package/dist/cli/commands/init-scaffold.js +214 -0
- package/dist/cli/commands/init-scaffold.js.map +1 -0
- package/dist/cli/commands/install-skills.d.ts +26 -4
- package/dist/cli/commands/install-skills.js +165 -80
- package/dist/cli/commands/install-skills.js.map +1 -1
- package/dist/cli/commands/installed-skills-manifest.d.ts +87 -0
- package/dist/cli/commands/installed-skills-manifest.js +124 -0
- package/dist/cli/commands/installed-skills-manifest.js.map +1 -0
- package/dist/cli/commands/installer-parts.d.ts +31 -0
- package/dist/cli/commands/installer-parts.js +94 -0
- package/dist/cli/commands/installer-parts.js.map +1 -0
- package/dist/cli/commands/project-inspection.d.ts +35 -0
- package/dist/cli/commands/project-inspection.js +199 -0
- package/dist/cli/commands/project-inspection.js.map +1 -0
- package/dist/cli/commands/setup-plan.d.ts +65 -0
- package/dist/cli/commands/setup-plan.js +234 -0
- package/dist/cli/commands/setup-plan.js.map +1 -0
- package/dist/cli/commands/setup-profile.d.ts +28 -0
- package/dist/cli/commands/setup-profile.js +152 -0
- package/dist/cli/commands/setup-profile.js.map +1 -0
- package/dist/cli/commands/setup-wizard.d.ts +66 -0
- package/dist/cli/commands/setup-wizard.js +241 -0
- package/dist/cli/commands/setup-wizard.js.map +1 -0
- package/dist/cli/commands/sync.d.ts +58 -0
- package/dist/cli/commands/sync.js +233 -0
- package/dist/cli/commands/sync.js.map +1 -0
- package/dist/cli/commands/tools/args.d.ts +14 -0
- package/dist/cli/commands/tools/args.js +33 -0
- package/dist/cli/commands/tools/args.js.map +1 -0
- package/dist/cli/commands/tools/check.d.ts +7 -0
- package/dist/cli/commands/tools/check.js +35 -0
- package/dist/cli/commands/tools/check.js.map +1 -0
- package/dist/cli/commands/tools/describe.d.ts +12 -0
- package/dist/cli/commands/tools/describe.js +43 -0
- package/dist/cli/commands/tools/describe.js.map +1 -0
- package/dist/cli/commands/tools/enrich.d.ts +50 -0
- package/dist/cli/commands/tools/enrich.js +597 -0
- package/dist/cli/commands/tools/enrich.js.map +1 -0
- package/dist/cli/commands/tools/eval.d.ts +13 -0
- package/dist/cli/commands/tools/eval.js +49 -0
- package/dist/cli/commands/tools/eval.js.map +1 -0
- package/dist/cli/commands/tools/format.d.ts +42 -0
- package/dist/cli/commands/tools/format.js +155 -0
- package/dist/cli/commands/tools/format.js.map +1 -0
- package/dist/cli/commands/tools/index.d.ts +26 -0
- package/dist/cli/commands/tools/index.js +107 -0
- package/dist/cli/commands/tools/index.js.map +1 -0
- package/dist/cli/commands/tools/policy.d.ts +11 -0
- package/dist/cli/commands/tools/policy.js +355 -0
- package/dist/cli/commands/tools/policy.js.map +1 -0
- package/dist/cli/commands/tools/refresh.d.ts +6 -0
- package/dist/cli/commands/tools/refresh.js +87 -0
- package/dist/cli/commands/tools/refresh.js.map +1 -0
- package/dist/cli/commands/tools/resolve.d.ts +10 -0
- package/dist/cli/commands/tools/resolve.js +19 -0
- package/dist/cli/commands/tools/resolve.js.map +1 -0
- package/dist/cli/commands/tools/status.d.ts +11 -0
- package/dist/cli/commands/tools/status.js +76 -0
- package/dist/cli/commands/tools/status.js.map +1 -0
- package/dist/cli/commands/tools/verify.d.ts +13 -0
- package/dist/cli/commands/tools/verify.js +168 -0
- package/dist/cli/commands/tools/verify.js.map +1 -0
- package/dist/cli/commands/tools/watch.d.ts +27 -0
- package/dist/cli/commands/tools/watch.js +148 -0
- package/dist/cli/commands/tools/watch.js.map +1 -0
- package/dist/cli/commands/validate-build.d.ts +88 -0
- package/dist/cli/commands/validate-build.js +213 -0
- package/dist/cli/commands/validate-build.js.map +1 -0
- package/dist/cli/commands/workspace-sources.d.ts +27 -0
- package/dist/cli/commands/workspace-sources.js +159 -0
- package/dist/cli/commands/workspace-sources.js.map +1 -0
- package/dist/cli/environment-loading.d.ts +6 -0
- package/dist/cli/environment-loading.js +18 -0
- package/dist/cli/environment-loading.js.map +1 -0
- package/dist/cli/index.d.ts +14 -1
- package/dist/cli/index.js +558 -574
- package/dist/cli/index.js.map +1 -1
- package/dist/codegen/execution-inventory.d.ts +63 -0
- package/dist/codegen/execution-inventory.js +306 -0
- package/dist/codegen/execution-inventory.js.map +1 -0
- package/dist/codegen/index.d.ts +4 -13
- package/dist/codegen/index.js +4 -12
- package/dist/codegen/index.js.map +1 -1
- package/dist/codegen/inventory-generation.d.ts +104 -0
- package/dist/codegen/inventory-generation.js +119 -0
- package/dist/codegen/inventory-generation.js.map +1 -0
- package/dist/codegen/next-source-generation.d.ts +17 -0
- package/dist/codegen/next-source-generation.js +49 -0
- package/dist/codegen/next-source-generation.js.map +1 -0
- package/dist/codegen/openapi-document.d.ts +53 -0
- package/dist/codegen/openapi-document.js +120 -0
- package/dist/codegen/openapi-document.js.map +1 -0
- package/dist/codegen/route-exports.d.ts +13 -0
- package/dist/codegen/route-exports.js +117 -0
- package/dist/codegen/route-exports.js.map +1 -0
- package/dist/codegen/route-fingerprint.d.ts +2 -0
- package/dist/codegen/route-fingerprint.js +9 -0
- package/dist/codegen/route-fingerprint.js.map +1 -0
- package/dist/codegen/route-scanner.d.ts +57 -0
- package/dist/codegen/route-scanner.js +233 -0
- package/dist/codegen/route-scanner.js.map +1 -0
- package/dist/codegen/tools/agentic.d.ts +31 -0
- package/dist/codegen/tools/agentic.js +110 -0
- package/dist/codegen/tools/agentic.js.map +1 -0
- package/dist/codegen/tools/artifact.d.ts +139 -0
- package/dist/codegen/tools/artifact.js +199 -0
- package/dist/codegen/tools/artifact.js.map +1 -0
- package/dist/codegen/tools/canonical.d.ts +12 -0
- package/dist/codegen/tools/canonical.js +41 -0
- package/dist/codegen/tools/canonical.js.map +1 -0
- package/dist/codegen/tools/chat-interactions.d.ts +27 -0
- package/dist/codegen/tools/chat-interactions.js +377 -0
- package/dist/codegen/tools/chat-interactions.js.map +1 -0
- package/dist/codegen/tools/config.d.ts +116 -0
- package/dist/codegen/tools/config.js +172 -0
- package/dist/codegen/tools/config.js.map +1 -0
- package/dist/codegen/tools/contract-tiers.d.ts +64 -0
- package/dist/codegen/tools/contract-tiers.js +518 -0
- package/dist/codegen/tools/contract-tiers.js.map +1 -0
- package/dist/codegen/tools/emit-module.d.ts +13 -0
- package/dist/codegen/tools/emit-module.js +182 -0
- package/dist/codegen/tools/emit-module.js.map +1 -0
- package/dist/codegen/tools/evidence.d.ts +13 -0
- package/dist/codegen/tools/evidence.js +138 -0
- package/dist/codegen/tools/evidence.js.map +1 -0
- package/dist/codegen/tools/exclusions.d.ts +30 -0
- package/dist/codegen/tools/exclusions.js +95 -0
- package/dist/codegen/tools/exclusions.js.map +1 -0
- package/dist/codegen/tools/files.d.ts +195 -0
- package/dist/codegen/tools/files.js +119 -0
- package/dist/codegen/tools/files.js.map +1 -0
- package/dist/codegen/tools/findings.d.ts +7 -0
- package/dist/codegen/tools/findings.js +106 -0
- package/dist/codegen/tools/findings.js.map +1 -0
- package/dist/codegen/tools/handler-analysis.d.ts +49 -0
- package/dist/codegen/tools/handler-analysis.js +375 -0
- package/dist/codegen/tools/handler-analysis.js.map +1 -0
- package/dist/codegen/tools/handler-locator.d.ts +21 -0
- package/dist/codegen/tools/handler-locator.js +152 -0
- package/dist/codegen/tools/handler-locator.js.map +1 -0
- package/dist/codegen/tools/identity.d.ts +18 -0
- package/dist/codegen/tools/identity.js +100 -0
- package/dist/codegen/tools/identity.js.map +1 -0
- package/dist/codegen/tools/input-roles.d.ts +32 -0
- package/dist/codegen/tools/input-roles.js +283 -0
- package/dist/codegen/tools/input-roles.js.map +1 -0
- package/dist/codegen/tools/inputs.d.ts +33 -0
- package/dist/codegen/tools/inputs.js +101 -0
- package/dist/codegen/tools/inputs.js.map +1 -0
- package/dist/codegen/tools/interface-digest.d.ts +14 -0
- package/dist/codegen/tools/interface-digest.js +24 -0
- package/dist/codegen/tools/interface-digest.js.map +1 -0
- package/dist/codegen/tools/mcp-names.d.ts +23 -0
- package/dist/codegen/tools/mcp-names.js +59 -0
- package/dist/codegen/tools/mcp-names.js.map +1 -0
- package/dist/codegen/tools/mode.d.ts +7 -0
- package/dist/codegen/tools/mode.js +27 -0
- package/dist/codegen/tools/mode.js.map +1 -0
- package/dist/codegen/tools/output-inference.d.ts +6 -0
- package/dist/codegen/tools/output-inference.js +99 -0
- package/dist/codegen/tools/output-inference.js.map +1 -0
- package/dist/codegen/tools/pipeline.d.ts +85 -0
- package/dist/codegen/tools/pipeline.js +733 -0
- package/dist/codegen/tools/pipeline.js.map +1 -0
- package/dist/codegen/tools/probe-child.mjs +155 -0
- package/dist/codegen/tools/probe-loader.mjs +105 -0
- package/dist/codegen/tools/program.d.ts +16 -0
- package/dist/codegen/tools/program.js +80 -0
- package/dist/codegen/tools/program.js.map +1 -0
- package/dist/codegen/tools/prose.d.ts +42 -0
- package/dist/codegen/tools/prose.js +211 -0
- package/dist/codegen/tools/prose.js.map +1 -0
- package/dist/codegen/tools/resolutions.d.ts +117 -0
- package/dist/codegen/tools/resolutions.js +195 -0
- package/dist/codegen/tools/resolutions.js.map +1 -0
- package/dist/codegen/tools/routing-eval.d.ts +50 -0
- package/dist/codegen/tools/routing-eval.js +81 -0
- package/dist/codegen/tools/routing-eval.js.map +1 -0
- package/dist/codegen/tools/schema-probe.d.ts +62 -0
- package/dist/codegen/tools/schema-probe.js +209 -0
- package/dist/codegen/tools/schema-probe.js.map +1 -0
- package/dist/codegen/tools/semantics.d.ts +134 -0
- package/dist/codegen/tools/semantics.js +206 -0
- package/dist/codegen/tools/semantics.js.map +1 -0
- package/dist/codegen/tools/sources/app-files.d.ts +35 -0
- package/dist/codegen/tools/sources/app-files.js +109 -0
- package/dist/codegen/tools/sources/app-files.js.map +1 -0
- package/dist/codegen/tools/sources/fastapi-routes.py +177 -0
- package/dist/codegen/tools/sources/nest-decorators.d.ts +27 -0
- package/dist/codegen/tools/sources/nest-decorators.js +65 -0
- package/dist/codegen/tools/sources/nest-decorators.js.map +1 -0
- package/dist/codegen/tools/sources/nest-endpoints.d.ts +10 -0
- package/dist/codegen/tools/sources/nest-endpoints.js +522 -0
- package/dist/codegen/tools/sources/nest-endpoints.js.map +1 -0
- package/dist/codegen/tools/sources/next-endpoints.d.ts +5 -0
- package/dist/codegen/tools/sources/next-endpoints.js +389 -0
- package/dist/codegen/tools/sources/next-endpoints.js.map +1 -0
- package/dist/codegen/tools/sources/next-pages.d.ts +18 -0
- package/dist/codegen/tools/sources/next-pages.js +88 -0
- package/dist/codegen/tools/sources/next-pages.js.map +1 -0
- package/dist/codegen/tools/sources/openapi-endpoints.d.ts +17 -0
- package/dist/codegen/tools/sources/openapi-endpoints.js +395 -0
- package/dist/codegen/tools/sources/openapi-endpoints.js.map +1 -0
- package/dist/codegen/tools/sources/page-tree.d.ts +49 -0
- package/dist/codegen/tools/sources/page-tree.js +152 -0
- package/dist/codegen/tools/sources/page-tree.js.map +1 -0
- package/dist/codegen/tools/sources/react-actions.d.ts +12 -0
- package/dist/codegen/tools/sources/react-actions.js +341 -0
- package/dist/codegen/tools/sources/react-actions.js.map +1 -0
- package/dist/codegen/tools/sources/route-config.d.ts +49 -0
- package/dist/codegen/tools/sources/route-config.js +427 -0
- package/dist/codegen/tools/sources/route-config.js.map +1 -0
- package/dist/codegen/tools/sources/ui-controls.d.ts +41 -0
- package/dist/codegen/tools/sources/ui-controls.js +360 -0
- package/dist/codegen/tools/sources/ui-controls.js.map +1 -0
- package/dist/codegen/tools/sources/ui-tools.d.ts +79 -0
- package/dist/codegen/tools/sources/ui-tools.js +207 -0
- package/dist/codegen/tools/sources/ui-tools.js.map +1 -0
- package/dist/codegen/tools/sources/url-filters.d.ts +41 -0
- package/dist/codegen/tools/sources/url-filters.js +813 -0
- package/dist/codegen/tools/sources/url-filters.js.map +1 -0
- package/dist/codegen/tools/sources/vue-sfc.d.ts +22 -0
- package/dist/codegen/tools/sources/vue-sfc.js +65 -0
- package/dist/codegen/tools/sources/vue-sfc.js.map +1 -0
- package/dist/codegen/tools/state.d.ts +37 -0
- package/dist/codegen/tools/state.js +249 -0
- package/dist/codegen/tools/state.js.map +1 -0
- package/dist/codegen/tools/types.d.ts +137 -0
- package/dist/codegen/tools/types.js +2 -0
- package/dist/codegen/tools/types.js.map +1 -0
- package/dist/codegen/tools/worklist.d.ts +157 -0
- package/dist/codegen/tools/worklist.js +406 -0
- package/dist/codegen/tools/worklist.js.map +1 -0
- package/dist/contracts/app-setup.d.ts +346 -0
- package/dist/contracts/app-setup.js +205 -0
- package/dist/contracts/app-setup.js.map +1 -0
- package/dist/contracts/chat-command.d.ts +65 -0
- package/dist/contracts/chat-command.js +121 -0
- package/dist/contracts/chat-command.js.map +1 -0
- package/dist/contracts/chat-interactions.d.ts +126 -0
- package/dist/contracts/chat-interactions.js +431 -0
- package/dist/contracts/chat-interactions.js.map +1 -0
- package/dist/contracts/clarification.d.ts +53 -0
- package/dist/contracts/clarification.js +86 -0
- package/dist/contracts/clarification.js.map +1 -0
- package/dist/contracts/content-boundary.d.ts +3 -0
- package/dist/contracts/content-boundary.js +91 -0
- package/dist/contracts/content-boundary.js.map +1 -0
- package/dist/contracts/events.d.ts +273 -0
- package/dist/contracts/events.js +227 -0
- package/dist/contracts/events.js.map +1 -0
- package/dist/contracts/index.d.ts +18 -0
- package/dist/contracts/index.js +10 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/plan.d.ts +20 -0
- package/dist/contracts/plan.js +35 -0
- package/dist/contracts/plan.js.map +1 -0
- package/dist/contracts/platform-connection.d.ts +44 -0
- package/dist/contracts/platform-connection.js +64 -0
- package/dist/contracts/platform-connection.js.map +1 -0
- package/dist/contracts/platform-prompt-revision.d.ts +27 -0
- package/dist/contracts/platform-prompt-revision.js +44 -0
- package/dist/contracts/platform-prompt-revision.js.map +1 -0
- package/dist/contracts/prompt-bundle.d.ts +46 -0
- package/dist/contracts/prompt-bundle.js +70 -0
- package/dist/contracts/prompt-bundle.js.map +1 -0
- package/dist/contracts/revisions.d.ts +716 -0
- package/dist/contracts/revisions.js +298 -0
- package/dist/contracts/revisions.js.map +1 -0
- package/dist/contracts/runtime.d.ts +55 -0
- package/dist/contracts/runtime.js +65 -0
- package/dist/contracts/runtime.js.map +1 -0
- package/dist/contracts/semantic-change.d.ts +27 -0
- package/dist/contracts/semantic-change.js +101 -0
- package/dist/contracts/semantic-change.js.map +1 -0
- package/dist/contracts/tool-exclude-pattern.d.ts +12 -0
- package/dist/contracts/tool-exclude-pattern.js +27 -0
- package/dist/contracts/tool-exclude-pattern.js.map +1 -0
- package/dist/contracts/tool-policy-entry.d.ts +107 -0
- package/dist/contracts/tool-policy-entry.js +40 -0
- package/dist/contracts/tool-policy-entry.js.map +1 -0
- package/dist/contracts/tool-policy.d.ts +198 -0
- package/dist/contracts/tool-policy.js +485 -0
- package/dist/contracts/tool-policy.js.map +1 -0
- package/dist/contracts/url.d.ts +2 -0
- package/dist/contracts/url.js +8 -0
- package/dist/contracts/url.js.map +1 -0
- package/dist/diagnostics/foundation-diagnostic.d.ts +34 -0
- package/dist/diagnostics/foundation-diagnostic.js +47 -0
- package/dist/diagnostics/foundation-diagnostic.js.map +1 -0
- package/dist/diagnostics/index.d.ts +2 -0
- package/dist/diagnostics/index.js +2 -0
- package/dist/diagnostics/index.js.map +1 -0
- package/dist/embed/chat-styles.generated.d.ts +1 -0
- package/dist/embed/chat-styles.generated.js +4 -0
- package/dist/embed/chat-styles.generated.js.map +1 -0
- package/dist/embed/glirastes-chat-element.d.ts +67 -0
- package/dist/embed/glirastes-chat-element.js +278 -0
- package/dist/embed/glirastes-chat-element.js.map +1 -0
- package/dist/embed/index.d.ts +4 -0
- package/dist/embed/index.js +11 -0
- package/dist/embed/index.js.map +1 -0
- package/dist/embed/theme.d.ts +10 -0
- package/dist/embed/theme.js +41 -0
- package/dist/embed/theme.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/react/assistant/assistant-layout.d.ts +55 -0
- package/dist/react/assistant/assistant-layout.js +99 -0
- package/dist/react/assistant/assistant-layout.js.map +1 -0
- package/dist/react/assistant/assistant-shell.d.ts +132 -0
- package/dist/react/assistant/assistant-shell.js +262 -0
- package/dist/react/assistant/assistant-shell.js.map +1 -0
- package/dist/react/assistant/assistant-shortcut-list.d.ts +24 -0
- package/dist/react/assistant/assistant-shortcut-list.js +32 -0
- package/dist/react/assistant/assistant-shortcut-list.js.map +1 -0
- package/dist/react/assistant/assistant-workspace.d.ts +31 -0
- package/dist/react/assistant/assistant-workspace.js +31 -0
- package/dist/react/assistant/assistant-workspace.js.map +1 -0
- package/dist/react/completions/completion-search.d.ts +21 -0
- package/dist/react/completions/completion-search.js +109 -0
- package/dist/react/completions/completion-search.js.map +1 -0
- package/dist/react/completions/ui-tool-command-provider.d.ts +15 -0
- package/dist/react/completions/ui-tool-command-provider.js +82 -0
- package/dist/react/completions/ui-tool-command-provider.js.map +1 -0
- package/dist/react/components/activity-log.d.ts +17 -0
- package/dist/react/components/activity-log.js +68 -0
- package/dist/react/components/activity-log.js.map +1 -0
- package/dist/react/components/ai-chat-panel.js +13 -6
- package/dist/react/components/ai-chat-panel.js.map +1 -1
- package/dist/react/components/ai-trigger-button.d.ts +1 -1
- package/dist/react/components/ai-trigger-button.js +13 -68
- package/dist/react/components/ai-trigger-button.js.map +1 -1
- package/dist/react/components/approval-card.js +20 -1
- package/dist/react/components/approval-card.js.map +1 -1
- package/dist/react/components/chat-input.js +7 -5
- package/dist/react/components/chat-input.js.map +1 -1
- package/dist/react/components/chat-window-visibility.d.ts +3 -0
- package/dist/react/components/chat-window-visibility.js +5 -0
- package/dist/react/components/chat-window-visibility.js.map +1 -0
- package/dist/react/components/chat-window.d.ts +1 -1
- package/dist/react/components/chat-window.js +124 -57
- package/dist/react/components/chat-window.js.map +1 -1
- package/dist/react/components/clarification-card.d.ts +10 -0
- package/dist/react/components/clarification-card.js +33 -0
- package/dist/react/components/clarification-card.js.map +1 -0
- package/dist/react/components/command-arguments-form.d.ts +10 -0
- package/dist/react/components/command-arguments-form.js +151 -0
- package/dist/react/components/command-arguments-form.js.map +1 -0
- package/dist/react/components/confirm-dialog.js +1 -1
- package/dist/react/components/confirm-dialog.js.map +1 -1
- package/dist/react/components/floating-chat-ui.d.ts +3 -3
- package/dist/react/components/floating-chat-ui.js +31 -5
- package/dist/react/components/floating-chat-ui.js.map +1 -1
- package/dist/react/components/mention-input.d.ts +5 -4
- package/dist/react/components/mention-input.js +65 -8
- package/dist/react/components/mention-input.js.map +1 -1
- package/dist/react/components/message-bubble.js +90 -14
- package/dist/react/components/message-bubble.js.map +1 -1
- package/dist/react/components/plan-checklist.d.ts +14 -0
- package/dist/react/components/plan-checklist.js +18 -0
- package/dist/react/components/plan-checklist.js.map +1 -0
- package/dist/react/components/recording-bar.js +45 -59
- package/dist/react/components/recording-bar.js.map +1 -1
- package/dist/react/components/rich-mention-input.js +199 -47
- package/dist/react/components/rich-mention-input.js.map +1 -1
- package/dist/react/components/session-switcher.d.ts +3 -1
- package/dist/react/components/session-switcher.js +27 -12
- package/dist/react/components/session-switcher.js.map +1 -1
- package/dist/react/components/status-icon.d.ts +8 -0
- package/dist/react/components/status-icon.js +9 -0
- package/dist/react/components/status-icon.js.map +1 -0
- package/dist/react/components/stream-waveform.d.ts +4 -0
- package/dist/react/components/stream-waveform.js +47 -0
- package/dist/react/components/stream-waveform.js.map +1 -0
- package/dist/react/components/voice-input-addon.d.ts +16 -1
- package/dist/react/components/voice-input-addon.js +256 -19
- package/dist/react/components/voice-input-addon.js.map +1 -1
- package/dist/react/components/voice-input-button.js +1 -1
- package/dist/react/components/voice-input-button.js.map +1 -1
- package/dist/react/hooks/use-chat-shortcuts.d.ts +33 -0
- package/dist/react/hooks/use-chat-shortcuts.js +133 -0
- package/dist/react/hooks/use-chat-shortcuts.js.map +1 -0
- package/dist/react/hooks/use-deepgram-transcription.d.ts +4 -0
- package/dist/react/hooks/use-deepgram-transcription.js +32 -322
- package/dist/react/hooks/use-deepgram-transcription.js.map +1 -1
- package/dist/react/hooks/use-drag-resize-panel.d.ts +1 -0
- package/dist/react/hooks/use-drag-resize-panel.js +246 -121
- package/dist/react/hooks/use-drag-resize-panel.js.map +1 -1
- package/dist/react/hooks/use-floating-panel.d.ts +57 -0
- package/dist/react/hooks/use-floating-panel.js +215 -0
- package/dist/react/hooks/use-floating-panel.js.map +1 -0
- package/dist/react/hooks/use-keyboard-shortcut.js +2 -1
- package/dist/react/hooks/use-keyboard-shortcut.js.map +1 -1
- package/dist/react/hooks/use-push-to-talk-hotkey.d.ts +24 -0
- package/dist/react/hooks/use-push-to-talk-hotkey.js +112 -0
- package/dist/react/hooks/use-push-to-talk-hotkey.js.map +1 -0
- package/dist/react/hooks/use-sidebar-resize.d.ts +19 -0
- package/dist/react/hooks/use-sidebar-resize.js +107 -0
- package/dist/react/hooks/use-sidebar-resize.js.map +1 -0
- package/dist/react/index.d.ts +30 -1
- package/dist/react/index.js +31 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/interactions/definitions.d.ts +67 -0
- package/dist/react/interactions/definitions.js +78 -0
- package/dist/react/interactions/definitions.js.map +1 -0
- package/dist/react/interactions/registry.d.ts +74 -0
- package/dist/react/interactions/registry.js +248 -0
- package/dist/react/interactions/registry.js.map +1 -0
- package/dist/react/interactions/use-chat-interactions-data.d.ts +15 -0
- package/dist/react/interactions/use-chat-interactions-data.js +41 -0
- package/dist/react/interactions/use-chat-interactions-data.js.map +1 -0
- package/dist/react/locale-de.d.ts +3 -0
- package/dist/react/locale-de.js +67 -0
- package/dist/react/locale-de.js.map +1 -0
- package/dist/react/provider/ai-chat-provider.d.ts +1 -1
- package/dist/react/provider/ai-chat-provider.js +411 -107
- package/dist/react/provider/ai-chat-provider.js.map +1 -1
- package/dist/react/provider/chat-context.d.ts +52 -1
- package/dist/react/provider/chat-context.js.map +1 -1
- package/dist/react/stt/controller.d.ts +60 -0
- package/dist/react/stt/controller.js +265 -0
- package/dist/react/stt/controller.js.map +1 -0
- package/dist/react/stt/deepgram.d.ts +30 -0
- package/dist/react/stt/deepgram.js +199 -0
- package/dist/react/stt/deepgram.js.map +1 -0
- package/dist/react/stt/recorded.d.ts +29 -0
- package/dist/react/stt/recorded.js +111 -0
- package/dist/react/stt/recorded.js.map +1 -0
- package/dist/react/stt/segments.d.ts +18 -0
- package/dist/react/stt/segments.js +29 -0
- package/dist/react/stt/segments.js.map +1 -0
- package/dist/react/stt/use-stt.d.ts +17 -0
- package/dist/react/stt/use-stt.js +39 -0
- package/dist/react/stt/use-stt.js.map +1 -0
- package/dist/react/stt/waveform.d.ts +5 -0
- package/dist/react/stt/waveform.js +29 -0
- package/dist/react/stt/waveform.js.map +1 -0
- package/dist/react/styles.css +784 -126
- package/dist/react/tool-renderers/registry.d.ts +31 -0
- package/dist/react/tool-renderers/registry.js +47 -0
- package/dist/react/tool-renderers/registry.js.map +1 -0
- package/dist/react/tool-renderers/renderer-boundary.d.ts +18 -0
- package/dist/react/tool-renderers/renderer-boundary.js +12 -0
- package/dist/react/tool-renderers/renderer-boundary.js.map +1 -0
- package/dist/react/transports/vercel/vercel-ai-chat.d.ts +1 -1
- package/dist/react/transports/vercel/vercel-ai-chat.js +2 -2
- package/dist/react/transports/vercel/vercel-ai-chat.js.map +1 -1
- package/dist/react/transports/vercel.d.ts +6 -0
- package/dist/react/transports/vercel.js +11 -6
- package/dist/react/transports/vercel.js.map +1 -1
- package/dist/react/types.d.ts +269 -6
- package/dist/react/ui.d.ts +18 -17
- package/dist/react/ui.js +46 -43
- package/dist/react/ui.js.map +1 -1
- package/dist/react/unstyled.d.ts +7 -0
- package/dist/react/unstyled.js +8 -0
- package/dist/react/unstyled.js.map +1 -0
- package/dist/react/utils/activity.d.ts +16 -0
- package/dist/react/utils/activity.js +77 -0
- package/dist/react/utils/activity.js.map +1 -0
- package/dist/react/utils/clarification.d.ts +31 -0
- package/dist/react/utils/clarification.js +99 -0
- package/dist/react/utils/clarification.js.map +1 -0
- package/dist/react/utils/create-approval-description.d.ts +6 -0
- package/dist/react/utils/create-approval-description.js +42 -7
- package/dist/react/utils/create-approval-description.js.map +1 -1
- package/dist/react/utils/create-tool-result-handler.d.ts +1 -1
- package/dist/react/utils/create-tool-result-handler.js +1 -1
- package/dist/react/utils/create-tool-result-handler.js.map +1 -1
- package/dist/react/utils/entity-names.d.ts +6 -0
- package/dist/react/utils/entity-names.js +55 -0
- package/dist/react/utils/entity-names.js.map +1 -0
- package/dist/react/utils/followup-suggestions.d.ts +11 -0
- package/dist/react/utils/followup-suggestions.js +37 -0
- package/dist/react/utils/followup-suggestions.js.map +1 -0
- package/dist/react/utils/local-session-store.d.ts +30 -0
- package/dist/react/utils/local-session-store.js +163 -0
- package/dist/react/utils/local-session-store.js.map +1 -0
- package/dist/react/utils/mention-markup.d.ts +44 -1
- package/dist/react/utils/mention-markup.js +140 -10
- package/dist/react/utils/mention-markup.js.map +1 -1
- package/dist/react/utils/tool-presentation.d.ts +23 -0
- package/dist/react/utils/tool-presentation.js +41 -0
- package/dist/react/utils/tool-presentation.js.map +1 -0
- package/dist/react/utils/tool-result-config.d.ts +10 -0
- package/dist/react/utils/tool-result-config.js +12 -0
- package/dist/react/utils/tool-result-config.js.map +1 -0
- package/dist/runtime/ai-sdk/engine.d.ts +66 -0
- package/dist/runtime/ai-sdk/engine.js +188 -0
- package/dist/runtime/ai-sdk/engine.js.map +1 -0
- package/dist/runtime/ai-sdk/index.d.ts +1 -0
- package/dist/runtime/ai-sdk/index.js +2 -0
- package/dist/runtime/ai-sdk/index.js.map +1 -0
- package/dist/runtime/authorization.d.ts +16 -0
- package/dist/runtime/authorization.js +33 -0
- package/dist/runtime/authorization.js.map +1 -0
- package/dist/runtime/budget.d.ts +39 -0
- package/dist/runtime/budget.js +97 -0
- package/dist/runtime/budget.js.map +1 -0
- package/dist/runtime/contract-bindings.d.ts +52 -0
- package/dist/runtime/contract-bindings.js +92 -0
- package/dist/runtime/contract-bindings.js.map +1 -0
- package/dist/runtime/engine.d.ts +52 -0
- package/dist/runtime/engine.js +2 -0
- package/dist/runtime/engine.js.map +1 -0
- package/dist/runtime/fingerprint.d.ts +6 -0
- package/dist/runtime/fingerprint.js +29 -0
- package/dist/runtime/fingerprint.js.map +1 -0
- package/dist/runtime/glirastes.d.ts +113 -0
- package/dist/runtime/glirastes.js +287 -0
- package/dist/runtime/glirastes.js.map +1 -0
- package/dist/runtime/index.d.ts +24 -0
- package/dist/runtime/index.js +24 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/json-schema.d.ts +13 -0
- package/dist/runtime/json-schema.js +41 -0
- package/dist/runtime/json-schema.js.map +1 -0
- package/dist/runtime/local-limits.d.ts +6 -0
- package/dist/runtime/local-limits.js +23 -0
- package/dist/runtime/local-limits.js.map +1 -0
- package/dist/runtime/local-runtime-source.d.ts +76 -0
- package/dist/runtime/local-runtime-source.js +0 -0
- package/dist/runtime/local-runtime-source.js.map +1 -0
- package/dist/runtime/local-signer.d.ts +17 -0
- package/dist/runtime/local-signer.js +32 -0
- package/dist/runtime/local-signer.js.map +1 -0
- package/dist/runtime/local-tool-bindings.d.ts +57 -0
- package/dist/runtime/local-tool-bindings.js +190 -0
- package/dist/runtime/local-tool-bindings.js.map +1 -0
- package/dist/runtime/managed-turn.d.ts +29 -0
- package/dist/runtime/managed-turn.js +97 -0
- package/dist/runtime/managed-turn.js.map +1 -0
- package/dist/runtime/metrics/cost.d.ts +64 -0
- package/dist/runtime/metrics/cost.js +92 -0
- package/dist/runtime/metrics/cost.js.map +1 -0
- package/dist/runtime/metrics/sink.d.ts +56 -0
- package/dist/runtime/metrics/sink.js +214 -0
- package/dist/runtime/metrics/sink.js.map +1 -0
- package/dist/runtime/metrics/turn-recorder.d.ts +62 -0
- package/dist/runtime/metrics/turn-recorder.js +170 -0
- package/dist/runtime/metrics/turn-recorder.js.map +1 -0
- package/dist/runtime/offline-execution-lease.d.ts +27 -0
- package/dist/runtime/offline-execution-lease.js +46 -0
- package/dist/runtime/offline-execution-lease.js.map +1 -0
- package/dist/runtime/policy-overlay.d.ts +86 -0
- package/dist/runtime/policy-overlay.js +117 -0
- package/dist/runtime/policy-overlay.js.map +1 -0
- package/dist/runtime/postgres-store.d.ts +111 -0
- package/dist/runtime/postgres-store.js +363 -0
- package/dist/runtime/postgres-store.js.map +1 -0
- package/dist/runtime/prompt-bundle-store.d.ts +58 -0
- package/dist/runtime/prompt-bundle-store.js +120 -0
- package/dist/runtime/prompt-bundle-store.js.map +1 -0
- package/dist/runtime/runtime-mode.d.ts +23 -0
- package/dist/runtime/runtime-mode.js +42 -0
- package/dist/runtime/runtime-mode.js.map +1 -0
- package/dist/runtime/sdk-version.d.ts +2 -0
- package/dist/runtime/sdk-version.js +3 -0
- package/dist/runtime/sdk-version.js.map +1 -0
- package/dist/runtime/tool-discovery.d.ts +51 -0
- package/dist/runtime/tool-discovery.js +138 -0
- package/dist/runtime/tool-discovery.js.map +1 -0
- package/dist/runtime/tool-search.d.ts +31 -0
- package/dist/runtime/tool-search.js +145 -0
- package/dist/runtime/tool-search.js.map +1 -0
- package/dist/runtime/turn-snapshot.d.ts +44 -0
- package/dist/runtime/turn-snapshot.js +108 -0
- package/dist/runtime/turn-snapshot.js.map +1 -0
- package/dist/server/adapters/nextjs/approval-binding.d.ts +334 -0
- package/dist/server/adapters/nextjs/approval-binding.js +707 -0
- package/dist/server/adapters/nextjs/approval-binding.js.map +1 -0
- package/dist/server/adapters/nextjs/chat-interactions-handler.d.ts +26 -0
- package/dist/server/adapters/nextjs/chat-interactions-handler.js +65 -0
- package/dist/server/adapters/nextjs/chat-interactions-handler.js.map +1 -0
- package/dist/server/adapters/nextjs/clarification-resume.d.ts +21 -0
- package/dist/server/adapters/nextjs/clarification-resume.js +109 -0
- package/dist/server/adapters/nextjs/clarification-resume.js.map +1 -0
- package/dist/server/adapters/nextjs/context-helpers.d.ts +49 -8
- package/dist/server/adapters/nextjs/context-helpers.js +75 -21
- package/dist/server/adapters/nextjs/context-helpers.js.map +1 -1
- package/dist/server/adapters/nextjs/create-ai-chat-handler.d.ts +59 -1
- package/dist/server/adapters/nextjs/create-ai-chat-handler.js +647 -95
- package/dist/server/adapters/nextjs/create-ai-chat-handler.js.map +1 -1
- package/dist/server/adapters/nextjs/direct-command.d.ts +75 -0
- package/dist/server/adapters/nextjs/direct-command.js +316 -0
- package/dist/server/adapters/nextjs/direct-command.js.map +1 -0
- package/dist/server/adapters/nextjs/index.d.ts +10 -2
- package/dist/server/adapters/nextjs/index.js +7 -0
- package/dist/server/adapters/nextjs/index.js.map +1 -1
- package/dist/server/adapters/nextjs/prepare-model-messages.d.ts +2 -1
- package/dist/server/adapters/nextjs/prepare-model-messages.js +7 -15
- package/dist/server/adapters/nextjs/prepare-model-messages.js.map +1 -1
- package/dist/server/adapters/nextjs/recording-transcription-handler.d.ts +31 -0
- package/dist/server/adapters/nextjs/recording-transcription-handler.js +55 -0
- package/dist/server/adapters/nextjs/recording-transcription-handler.js.map +1 -0
- package/dist/server/adapters/nextjs/request-guards.d.ts +41 -0
- package/dist/server/adapters/nextjs/request-guards.js +108 -0
- package/dist/server/adapters/nextjs/request-guards.js.map +1 -0
- package/dist/server/adapters/nextjs/sanitize-model-messages.js +12 -6
- package/dist/server/adapters/nextjs/sanitize-model-messages.js.map +1 -1
- package/dist/server/adapters/nextjs/scope-pipeline-tools.d.ts +17 -0
- package/dist/server/adapters/nextjs/scope-pipeline-tools.js +26 -0
- package/dist/server/adapters/nextjs/scope-pipeline-tools.js.map +1 -0
- package/dist/server/adapters/nextjs/tool-discovery.d.ts +39 -0
- package/dist/server/adapters/nextjs/tool-discovery.js +47 -0
- package/dist/server/adapters/nextjs/tool-discovery.js.map +1 -0
- package/dist/server/adapters/nextjs/tool-presentation.d.ts +26 -0
- package/dist/server/adapters/nextjs/tool-presentation.js +19 -0
- package/dist/server/adapters/nextjs/tool-presentation.js.map +1 -0
- package/dist/server/adapters/nextjs/types.d.ts +229 -13
- package/dist/server/adapters/nextjs/with-ai-tool.d.ts +2 -2
- package/dist/server/core/adaptive-fast-path.d.ts +3 -0
- package/dist/server/core/adaptive-fast-path.js +185 -0
- package/dist/server/core/adaptive-fast-path.js.map +1 -0
- package/dist/server/core/clarification-tool.d.ts +29 -0
- package/dist/server/core/clarification-tool.js +61 -0
- package/dist/server/core/clarification-tool.js.map +1 -0
- package/dist/server/core/generated-ui-tool.d.ts +31 -0
- package/dist/server/core/generated-ui-tool.js +87 -0
- package/dist/server/core/generated-ui-tool.js.map +1 -0
- package/dist/server/core/index.d.ts +49 -8
- package/dist/server/core/index.js +198 -16
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/core/local-guardrails.d.ts +6 -0
- package/dist/server/core/local-guardrails.js +68 -0
- package/dist/server/core/local-guardrails.js.map +1 -0
- package/dist/server/core/module-router.d.ts +3 -1
- package/dist/server/core/module-router.js +22 -2
- package/dist/server/core/module-router.js.map +1 -1
- package/dist/server/core/plan-tool.d.ts +23 -0
- package/dist/server/core/plan-tool.js +32 -0
- package/dist/server/core/plan-tool.js.map +1 -0
- package/dist/server/core/zod-compact.d.ts +2 -2
- package/dist/server/core/zod-compact.js +56 -7
- package/dist/server/core/zod-compact.js.map +1 -1
- package/dist/server/index.d.ts +2 -4
- package/dist/server/index.js +2 -4
- package/dist/server/index.js.map +1 -1
- package/dist/server/lancer/client.js +2 -1
- package/dist/server/lancer/client.js.map +1 -1
- package/dist/server/local-pipeline.d.ts +14 -0
- package/dist/server/local-pipeline.js +152 -0
- package/dist/server/local-pipeline.js.map +1 -0
- package/dist/server/pii-shield/index.d.ts +1 -0
- package/dist/server/pii-shield/index.js +1 -0
- package/dist/server/pii-shield/index.js.map +1 -1
- package/dist/server/pii-shield/regex-detector.d.ts +13 -0
- package/dist/server/pii-shield/regex-detector.js +109 -0
- package/dist/server/pii-shield/regex-detector.js.map +1 -0
- package/dist/server/testing/guardrails.js +1 -65
- package/dist/server/testing/guardrails.js.map +1 -1
- package/dist/server/testing/helpers.js +1 -62
- package/dist/server/testing/helpers.js.map +1 -1
- package/dist/server/testing/index.d.ts +1 -0
- package/dist/server/testing/index.js +1 -0
- package/dist/server/testing/index.js.map +1 -1
- package/dist/server/testing/registry-parity.d.ts +18 -0
- package/dist/server/testing/registry-parity.js +38 -0
- package/dist/server/testing/registry-parity.js.map +1 -0
- package/dist/server/testing/smoke.d.ts +2 -1
- package/dist/server/testing/smoke.js +5 -3
- package/dist/server/testing/smoke.js.map +1 -1
- package/dist/server/testing/types.d.ts +1 -1
- package/dist/server/testing/zod-introspect.d.ts +1 -1
- package/dist/server/testing/zod-introspect.js +178 -5
- package/dist/server/testing/zod-introspect.js.map +1 -1
- package/dist/stt/index.d.ts +5 -0
- package/dist/stt/index.js +6 -0
- package/dist/stt/index.js.map +1 -0
- package/dist/sync/app-setup-client.d.ts +46 -0
- package/dist/sync/app-setup-client.js +137 -0
- package/dist/sync/app-setup-client.js.map +1 -0
- package/dist/sync/capability-report.d.ts +41 -0
- package/dist/sync/capability-report.js +48 -0
- package/dist/sync/capability-report.js.map +1 -0
- package/dist/sync/connection-lookup.d.ts +19 -0
- package/dist/sync/connection-lookup.js +56 -0
- package/dist/sync/connection-lookup.js.map +1 -0
- package/dist/sync/control-plane-client.d.ts +69 -0
- package/dist/sync/control-plane-client.js +182 -0
- package/dist/sync/control-plane-client.js.map +1 -0
- package/dist/sync/deployment-selector.d.ts +9 -0
- package/dist/sync/deployment-selector.js +26 -0
- package/dist/sync/deployment-selector.js.map +1 -0
- package/dist/sync/fetch-sse-push.d.ts +6 -0
- package/dist/sync/fetch-sse-push.js +42 -0
- package/dist/sync/fetch-sse-push.js.map +1 -0
- package/dist/sync/index.d.ts +26 -0
- package/dist/sync/index.js +17 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/jwks-provider.d.ts +14 -0
- package/dist/sync/jwks-provider.js +53 -0
- package/dist/sync/jwks-provider.js.map +1 -0
- package/dist/sync/local-deployment-validator.d.ts +30 -0
- package/dist/sync/local-deployment-validator.js +60 -0
- package/dist/sync/local-deployment-validator.js.map +1 -0
- package/dist/sync/managed-sync.d.ts +40 -0
- package/dist/sync/managed-sync.js +94 -0
- package/dist/sync/managed-sync.js.map +1 -0
- package/dist/sync/materialize-deployment.d.ts +7 -0
- package/dist/sync/materialize-deployment.js +63 -0
- package/dist/sync/materialize-deployment.js.map +1 -0
- package/dist/sync/runtime-connect-client.d.ts +23 -0
- package/dist/sync/runtime-connect-client.js +182 -0
- package/dist/sync/runtime-connect-client.js.map +1 -0
- package/dist/sync/runtime-setup-client.d.ts +62 -0
- package/dist/sync/runtime-setup-client.js +153 -0
- package/dist/sync/runtime-setup-client.js.map +1 -0
- package/dist/sync/signature-verifier.d.ts +39 -0
- package/dist/sync/signature-verifier.js +97 -0
- package/dist/sync/signature-verifier.js.map +1 -0
- package/dist/sync/state-store.d.ts +24 -0
- package/dist/sync/state-store.js +47 -0
- package/dist/sync/state-store.js.map +1 -0
- package/dist/sync/sync-manager.d.ts +27 -0
- package/dist/sync/sync-manager.js +170 -0
- package/dist/sync/sync-manager.js.map +1 -0
- package/dist/types.d.ts +68 -16
- package/dist/types.js +30 -2
- package/dist/types.js.map +1 -1
- package/embed/package.json +5 -0
- package/package.json +187 -46
- package/runtime/ai-sdk/package.json +5 -0
- package/runtime/package.json +5 -0
- package/skills/README.md +26 -92
- package/skills/building-glirastes-chat-ui/SKILL.md +358 -343
- package/skills/describing-glirastes-tools/SKILL.md +180 -0
- package/skills/integrating-glirastes-nextjs/SKILL.md +142 -302
- package/skills/integrating-glirastes-web/SKILL.md +165 -0
- package/skills/maintaining-glirastes-tools/SKILL.md +133 -461
- package/skills/migrating-to-glirastes/SKILL.md +112 -0
- package/skills/setting-up-glirastes/SKILL.md +194 -0
- package/skills/setting-up-glirastes/agents/openai.yaml +4 -0
- package/skills/setting-up-glirastes/references/artifact-contract.md +40 -0
- package/skills/setting-up-glirastes/scripts/validate-artifact.ts +23 -0
- package/skills/setting-up-glirastes/templates/interview.md +19 -0
- package/stt/package.json +5 -0
- package/dist/cjs/codegen/asset-sync.d.ts +0 -20
- package/dist/cjs/codegen/asset-sync.js +0 -28
- package/dist/cjs/codegen/coverage.d.ts +0 -66
- package/dist/cjs/codegen/coverage.js +0 -408
- package/dist/cjs/codegen/endpoint-scanner.d.ts +0 -16
- package/dist/cjs/codegen/endpoint-scanner.js +0 -197
- package/dist/cjs/codegen/mcp-generator.d.ts +0 -50
- package/dist/cjs/codegen/mcp-generator.js +0 -803
- package/dist/cjs/codegen/module-generator.d.ts +0 -11
- package/dist/cjs/codegen/module-generator.js +0 -353
- package/dist/cjs/codegen/nestjs-scanner.d.ts +0 -43
- package/dist/cjs/codegen/nestjs-scanner.js +0 -241
- package/dist/cjs/codegen/output-recommender.d.ts +0 -23
- package/dist/cjs/codegen/output-recommender.js +0 -33
- package/dist/cjs/codegen/scaffolder.d.ts +0 -36
- package/dist/cjs/codegen/scaffolder.js +0 -262
- package/dist/cjs/codegen/skill-generator.d.ts +0 -49
- package/dist/cjs/codegen/skill-generator.js +0 -967
- package/dist/cjs/codegen/ui-scanner.d.ts +0 -24
- package/dist/cjs/codegen/ui-scanner.js +0 -202
- package/dist/cjs/codegen/validator.d.ts +0 -35
- package/dist/cjs/codegen/validator.js +0 -292
- package/dist/cjs/openapi/index.d.ts +0 -78
- package/dist/cjs/openapi/index.js +0 -347
- package/dist/cjs/react/components/wavesurfer-loader.d.ts +0 -5
- package/dist/cjs/react/components/wavesurfer-loader.js +0 -36
- package/dist/cjs/react/transports/langgraph/index.d.ts +0 -2
- package/dist/cjs/react/transports/langgraph/index.js +0 -8
- package/dist/cjs/react/transports/langgraph/langgraph-ai-chat.d.ts +0 -62
- package/dist/cjs/react/transports/langgraph/langgraph-ai-chat.js +0 -94
- package/dist/cjs/react/transports/langgraph.d.ts +0 -71
- package/dist/cjs/react/transports/langgraph.js +0 -369
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-auth.guard.d.ts +0 -10
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-auth.guard.js +0 -42
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-module-options.interface.d.ts +0 -32
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-module-options.interface.js +0 -4
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.controller.d.ts +0 -11
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.controller.js +0 -80
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.module.d.ts +0 -9
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.module.js +0 -119
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.service.d.ts +0 -13
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.service.js +0 -131
- package/dist/cjs/server/adapters/nestjs/chat/dto/ai-chat-request.dto.d.ts +0 -7
- package/dist/cjs/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js +0 -52
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message-part.dto.d.ts +0 -19
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message-part.dto.js +0 -108
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message.dto.d.ts +0 -8
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message.dto.js +0 -59
- package/dist/cjs/server/adapters/nestjs/chat/dto/index.d.ts +0 -3
- package/dist/cjs/server/adapters/nestjs/chat/dto/index.js +0 -9
- package/dist/cjs/server/adapters/nestjs/chat/index.d.ts +0 -3
- package/dist/cjs/server/adapters/nestjs/chat/index.js +0 -9
- package/dist/cjs/server/adapters/nestjs/chat/speech-stream.gateway.d.ts +0 -4
- package/dist/cjs/server/adapters/nestjs/chat/speech-stream.gateway.js +0 -73
- package/dist/cjs/server/adapters/nestjs/chat/ws-loader.d.ts +0 -5
- package/dist/cjs/server/adapters/nestjs/chat/ws-loader.js +0 -72
- package/dist/cjs/server/adapters/nestjs/decorators/ai-module.decorator.d.ts +0 -6
- package/dist/cjs/server/adapters/nestjs/decorators/ai-module.decorator.js +0 -13
- package/dist/cjs/server/adapters/nestjs/decorators/ai-param.decorator.d.ts +0 -5
- package/dist/cjs/server/adapters/nestjs/decorators/ai-param.decorator.js +0 -15
- package/dist/cjs/server/adapters/nestjs/decorators/ai-tool.decorator.d.ts +0 -6
- package/dist/cjs/server/adapters/nestjs/decorators/ai-tool.decorator.js +0 -22
- package/dist/cjs/server/adapters/nestjs/decorators/constants.d.ts +0 -4
- package/dist/cjs/server/adapters/nestjs/decorators/constants.js +0 -7
- package/dist/cjs/server/adapters/nestjs/index.d.ts +0 -14
- package/dist/cjs/server/adapters/nestjs/index.js +0 -42
- package/dist/cjs/server/adapters/nestjs/metadata.d.ts +0 -39
- package/dist/cjs/server/adapters/nestjs/metadata.js +0 -36
- package/dist/cjs/server/adapters/nestjs/module/ai-tools-explorer.service.d.ts +0 -36
- package/dist/cjs/server/adapters/nestjs/module/ai-tools-explorer.service.js +0 -159
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.module.d.ts +0 -37
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.module.js +0 -44
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.service.d.ts +0 -28
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.service.js +0 -41
- package/dist/cjs/server/adapters/nestjs/scanner/nestjs-scanner.d.ts +0 -16
- package/dist/cjs/server/adapters/nestjs/scanner/nestjs-scanner.js +0 -117
- package/dist/cjs/server/adapters/nestjs/scanner/schema-builder.d.ts +0 -26
- package/dist/cjs/server/adapters/nestjs/scanner/schema-builder.js +0 -259
- package/dist/cjs/server/adapters/nestjs/swagger.d.ts +0 -7
- package/dist/cjs/server/adapters/nestjs/swagger.js +0 -39
- package/dist/cli/commands/check-upgrade.d.ts +0 -15
- package/dist/cli/commands/check-upgrade.js +0 -138
- package/dist/cli/commands/check-upgrade.js.map +0 -1
- package/dist/cli/commands/test.d.ts +0 -8
- package/dist/cli/commands/test.js +0 -76
- package/dist/cli/commands/test.js.map +0 -1
- package/dist/cli/utils/changelog-parser.d.ts +0 -13
- package/dist/cli/utils/changelog-parser.js +0 -89
- package/dist/cli/utils/changelog-parser.js.map +0 -1
- package/dist/cli/utils/commit-parser.d.ts +0 -8
- package/dist/cli/utils/commit-parser.js +0 -23
- package/dist/cli/utils/commit-parser.js.map +0 -1
- package/dist/cli/utils/gap-detector.d.ts +0 -14
- package/dist/cli/utils/gap-detector.js +0 -65
- package/dist/cli/utils/gap-detector.js.map +0 -1
- package/dist/cli/utils/get-cli-version.d.ts +0 -2
- package/dist/cli/utils/get-cli-version.js +0 -10
- package/dist/cli/utils/get-cli-version.js.map +0 -1
- package/dist/codegen/asset-sync.d.ts +0 -20
- package/dist/codegen/asset-sync.js +0 -26
- package/dist/codegen/asset-sync.js.map +0 -1
- package/dist/codegen/coverage.d.ts +0 -66
- package/dist/codegen/coverage.js +0 -372
- package/dist/codegen/coverage.js.map +0 -1
- package/dist/codegen/endpoint-scanner.d.ts +0 -16
- package/dist/codegen/endpoint-scanner.js +0 -161
- package/dist/codegen/endpoint-scanner.js.map +0 -1
- package/dist/codegen/mcp-generator.d.ts +0 -50
- package/dist/codegen/mcp-generator.js +0 -801
- package/dist/codegen/mcp-generator.js.map +0 -1
- package/dist/codegen/module-generator.d.ts +0 -11
- package/dist/codegen/module-generator.js +0 -351
- package/dist/codegen/module-generator.js.map +0 -1
- package/dist/codegen/nestjs-scanner.d.ts +0 -43
- package/dist/codegen/nestjs-scanner.js +0 -239
- package/dist/codegen/nestjs-scanner.js.map +0 -1
- package/dist/codegen/output-recommender.d.ts +0 -23
- package/dist/codegen/output-recommender.js +0 -31
- package/dist/codegen/output-recommender.js.map +0 -1
- package/dist/codegen/scaffolder.d.ts +0 -36
- package/dist/codegen/scaffolder.js +0 -259
- package/dist/codegen/scaffolder.js.map +0 -1
- package/dist/codegen/skill-generator.d.ts +0 -49
- package/dist/codegen/skill-generator.js +0 -965
- package/dist/codegen/skill-generator.js.map +0 -1
- package/dist/codegen/ui-scanner.d.ts +0 -24
- package/dist/codegen/ui-scanner.js +0 -197
- package/dist/codegen/ui-scanner.js.map +0 -1
- package/dist/codegen/validator.d.ts +0 -35
- package/dist/codegen/validator.js +0 -256
- package/dist/codegen/validator.js.map +0 -1
- package/dist/openapi/demo-generate.d.ts +0 -1
- package/dist/openapi/demo-generate.js +0 -15
- package/dist/openapi/demo-generate.js.map +0 -1
- package/dist/openapi/index.d.ts +0 -78
- package/dist/openapi/index.js +0 -341
- package/dist/openapi/index.js.map +0 -1
- package/dist/react/components/wavesurfer-loader.d.ts +0 -5
- package/dist/react/components/wavesurfer-loader.js +0 -34
- package/dist/react/components/wavesurfer-loader.js.map +0 -1
- package/dist/react/transports/langgraph/index.d.ts +0 -2
- package/dist/react/transports/langgraph/index.js +0 -3
- package/dist/react/transports/langgraph/index.js.map +0 -1
- package/dist/react/transports/langgraph/langgraph-ai-chat.d.ts +0 -62
- package/dist/react/transports/langgraph/langgraph-ai-chat.js +0 -92
- package/dist/react/transports/langgraph/langgraph-ai-chat.js.map +0 -1
- package/dist/react/transports/langgraph.d.ts +0 -71
- package/dist/react/transports/langgraph.js +0 -366
- package/dist/react/transports/langgraph.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/ai-chat-auth.guard.d.ts +0 -10
- package/dist/server/adapters/nestjs/chat/ai-chat-auth.guard.js +0 -40
- package/dist/server/adapters/nestjs/chat/ai-chat-auth.guard.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/ai-chat-module-options.interface.d.ts +0 -32
- package/dist/server/adapters/nestjs/chat/ai-chat-module-options.interface.js +0 -2
- package/dist/server/adapters/nestjs/chat/ai-chat-module-options.interface.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/ai-chat.controller.d.ts +0 -11
- package/dist/server/adapters/nestjs/chat/ai-chat.controller.js +0 -78
- package/dist/server/adapters/nestjs/chat/ai-chat.controller.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/ai-chat.module.d.ts +0 -9
- package/dist/server/adapters/nestjs/chat/ai-chat.module.js +0 -117
- package/dist/server/adapters/nestjs/chat/ai-chat.module.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/ai-chat.service.d.ts +0 -13
- package/dist/server/adapters/nestjs/chat/ai-chat.service.js +0 -129
- package/dist/server/adapters/nestjs/chat/ai-chat.service.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/dto/ai-chat-request.dto.d.ts +0 -7
- package/dist/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js +0 -49
- package/dist/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/dto/chat-message-part.dto.d.ts +0 -19
- package/dist/server/adapters/nestjs/chat/dto/chat-message-part.dto.js +0 -105
- package/dist/server/adapters/nestjs/chat/dto/chat-message-part.dto.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/dto/chat-message.dto.d.ts +0 -8
- package/dist/server/adapters/nestjs/chat/dto/chat-message.dto.js +0 -56
- package/dist/server/adapters/nestjs/chat/dto/chat-message.dto.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/dto/index.d.ts +0 -3
- package/dist/server/adapters/nestjs/chat/dto/index.js +0 -4
- package/dist/server/adapters/nestjs/chat/dto/index.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/index.d.ts +0 -3
- package/dist/server/adapters/nestjs/chat/index.js +0 -3
- package/dist/server/adapters/nestjs/chat/index.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/speech-stream.gateway.d.ts +0 -4
- package/dist/server/adapters/nestjs/chat/speech-stream.gateway.js +0 -71
- package/dist/server/adapters/nestjs/chat/speech-stream.gateway.js.map +0 -1
- package/dist/server/adapters/nestjs/chat/ws-loader.d.ts +0 -5
- package/dist/server/adapters/nestjs/chat/ws-loader.js +0 -37
- package/dist/server/adapters/nestjs/chat/ws-loader.js.map +0 -1
- package/dist/server/adapters/nestjs/decorators/ai-module.decorator.d.ts +0 -6
- package/dist/server/adapters/nestjs/decorators/ai-module.decorator.js +0 -11
- package/dist/server/adapters/nestjs/decorators/ai-module.decorator.js.map +0 -1
- package/dist/server/adapters/nestjs/decorators/ai-param.decorator.d.ts +0 -5
- package/dist/server/adapters/nestjs/decorators/ai-param.decorator.js +0 -13
- package/dist/server/adapters/nestjs/decorators/ai-param.decorator.js.map +0 -1
- package/dist/server/adapters/nestjs/decorators/ai-tool.decorator.d.ts +0 -6
- package/dist/server/adapters/nestjs/decorators/ai-tool.decorator.js +0 -20
- package/dist/server/adapters/nestjs/decorators/ai-tool.decorator.js.map +0 -1
- package/dist/server/adapters/nestjs/decorators/constants.d.ts +0 -4
- package/dist/server/adapters/nestjs/decorators/constants.js +0 -5
- package/dist/server/adapters/nestjs/decorators/constants.js.map +0 -1
- package/dist/server/adapters/nestjs/index.d.ts +0 -14
- package/dist/server/adapters/nestjs/index.js +0 -20
- package/dist/server/adapters/nestjs/index.js.map +0 -1
- package/dist/server/adapters/nestjs/metadata.d.ts +0 -39
- package/dist/server/adapters/nestjs/metadata.js +0 -30
- package/dist/server/adapters/nestjs/metadata.js.map +0 -1
- package/dist/server/adapters/nestjs/module/ai-tools-explorer.service.d.ts +0 -36
- package/dist/server/adapters/nestjs/module/ai-tools-explorer.service.js +0 -156
- package/dist/server/adapters/nestjs/module/ai-tools-explorer.service.js.map +0 -1
- package/dist/server/adapters/nestjs/module/ai-tools.module.d.ts +0 -37
- package/dist/server/adapters/nestjs/module/ai-tools.module.js +0 -42
- package/dist/server/adapters/nestjs/module/ai-tools.module.js.map +0 -1
- package/dist/server/adapters/nestjs/module/ai-tools.service.d.ts +0 -28
- package/dist/server/adapters/nestjs/module/ai-tools.service.js +0 -38
- package/dist/server/adapters/nestjs/module/ai-tools.service.js.map +0 -1
- package/dist/server/adapters/nestjs/scanner/nestjs-scanner.d.ts +0 -16
- package/dist/server/adapters/nestjs/scanner/nestjs-scanner.js +0 -115
- package/dist/server/adapters/nestjs/scanner/nestjs-scanner.js.map +0 -1
- package/dist/server/adapters/nestjs/scanner/schema-builder.d.ts +0 -26
- package/dist/server/adapters/nestjs/scanner/schema-builder.js +0 -255
- package/dist/server/adapters/nestjs/scanner/schema-builder.js.map +0 -1
- package/dist/server/adapters/nestjs/swagger.d.ts +0 -7
- package/dist/server/adapters/nestjs/swagger.js +0 -37
- package/dist/server/adapters/nestjs/swagger.js.map +0 -1
- package/openapi/package.json +0 -5
- package/react/langgraph/package.json +0 -5
- package/server/nestjs/package.json +0 -5
- package/skills/integrating-glirastes-nestjs/SKILL.md +0 -346
- package/skills/integrating-glirastes-nextjs-with-nestjs-backend/SKILL.md +0 -359
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FoundationExecutionInventorySchema = void 0;
|
|
7
|
+
exports.discoverFoundationExecutions = discoverFoundationExecutions;
|
|
8
|
+
const node_crypto_1 = require("node:crypto");
|
|
9
|
+
const promises_1 = require("node:fs/promises");
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
|
+
const zod_1 = require("zod");
|
|
12
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
13
|
+
const openapi_document_js_1 = require("./openapi-document.js");
|
|
14
|
+
const route_fingerprint_js_1 = require("./route-fingerprint.js");
|
|
15
|
+
const route_exports_js_1 = require("./route-exports.js");
|
|
16
|
+
const nest_decorators_js_1 = require("./tools/sources/nest-decorators.js");
|
|
17
|
+
const uuid = zod_1.z.uuid();
|
|
18
|
+
const identifier = zod_1.z.string().trim().min(1).max(200);
|
|
19
|
+
const digest = zod_1.z.string().regex(/^sha256:(?:[A-Za-z0-9_-]{43}|[A-Za-z0-9+/]{43}=)$/);
|
|
20
|
+
const executionBase = zod_1.z.object({
|
|
21
|
+
toolId: uuid,
|
|
22
|
+
definitionId: identifier,
|
|
23
|
+
stableKey: zod_1.z.string().trim().min(1).max(2_100),
|
|
24
|
+
sourceFingerprint: digest,
|
|
25
|
+
inputSchemaDigest: digest,
|
|
26
|
+
outputSchemaDigest: digest,
|
|
27
|
+
});
|
|
28
|
+
const endpointExecution = executionBase.extend({
|
|
29
|
+
executionKind: zod_1.z.literal('endpoint'),
|
|
30
|
+
/**
|
|
31
|
+
* The deterministic source that enumerated the endpoint. Absent on
|
|
32
|
+
* inventories written before the tools generator; treated as next-app.
|
|
33
|
+
*/
|
|
34
|
+
sourceKind: zod_1.z.enum(['next-app', 'nest', 'openapi']).optional(),
|
|
35
|
+
sourceFile: zod_1.z.string().trim().min(1).max(2_048),
|
|
36
|
+
method: zod_1.z.enum(['GET', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE']),
|
|
37
|
+
path: zod_1.z.string().startsWith('/').max(2_048),
|
|
38
|
+
}).strict();
|
|
39
|
+
const uiExecution = executionBase.extend({
|
|
40
|
+
executionKind: zod_1.z.literal('ui'),
|
|
41
|
+
actionBindingRef: identifier,
|
|
42
|
+
/**
|
|
43
|
+
* The identifier the client handler registers with. It differs from the
|
|
44
|
+
* definition id, and it is the only way to find the code that actually runs
|
|
45
|
+
* an action, so an assessment can read it instead of guessing from a name.
|
|
46
|
+
*/
|
|
47
|
+
actionId: identifier.optional(),
|
|
48
|
+
}).strict();
|
|
49
|
+
exports.FoundationExecutionInventorySchema = zod_1.z.object({
|
|
50
|
+
schemaVersion: zod_1.z.literal(2),
|
|
51
|
+
targetAppKey: identifier,
|
|
52
|
+
executions: zod_1.z.array(zod_1.z.discriminatedUnion('executionKind', [
|
|
53
|
+
endpointExecution,
|
|
54
|
+
uiExecution,
|
|
55
|
+
])).max(5_000),
|
|
56
|
+
}).strict();
|
|
57
|
+
function canonicalValue(value) {
|
|
58
|
+
if (Array.isArray(value))
|
|
59
|
+
return value.map(canonicalValue);
|
|
60
|
+
if (value === null || typeof value !== 'object')
|
|
61
|
+
return value;
|
|
62
|
+
return Object.fromEntries(Object.entries(value)
|
|
63
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
64
|
+
.map(([key, child]) => [key, canonicalValue(child)]));
|
|
65
|
+
}
|
|
66
|
+
function canonicalInventory(inventory) {
|
|
67
|
+
return {
|
|
68
|
+
...inventory,
|
|
69
|
+
executions: [...inventory.executions]
|
|
70
|
+
.sort((left, right) => left.toolId.localeCompare(right.toolId)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function assertUniqueInventory(inventory) {
|
|
74
|
+
const toolIds = new Set();
|
|
75
|
+
const stableKeys = new Set();
|
|
76
|
+
const fingerprints = new Map();
|
|
77
|
+
for (const execution of inventory.executions) {
|
|
78
|
+
if (toolIds.has(execution.toolId)) {
|
|
79
|
+
throw new Error('Foundation inventory contains a duplicate tool UUID');
|
|
80
|
+
}
|
|
81
|
+
if (stableKeys.has(execution.stableKey)) {
|
|
82
|
+
throw new Error('Foundation inventory contains a duplicate stable key');
|
|
83
|
+
}
|
|
84
|
+
const fingerprintOwner = fingerprints.get(execution.sourceFingerprint);
|
|
85
|
+
if (fingerprintOwner && fingerprintOwner !== execution.stableKey) {
|
|
86
|
+
throw new Error('Foundation inventory contains a conflicting source fingerprint');
|
|
87
|
+
}
|
|
88
|
+
toolIds.add(execution.toolId);
|
|
89
|
+
stableKeys.add(execution.stableKey);
|
|
90
|
+
fingerprints.set(execution.sourceFingerprint, execution.stableKey);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
async function verifyNextEndpoint(rootDir, execution) {
|
|
94
|
+
let source;
|
|
95
|
+
try {
|
|
96
|
+
source = await (0, promises_1.readFile)((0, node_path_1.resolve)(rootDir, execution.sourceFile), 'utf8');
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
if (error.code === 'ENOENT') {
|
|
100
|
+
throw new Error(`Foundation inventory references a missing route: ${execution.stableKey}`);
|
|
101
|
+
}
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
104
|
+
// A wrapper export (`export const GET = withAuth(…)`) exists even though the
|
|
105
|
+
// reader cannot resolve its body; the fingerprint below still pins the file.
|
|
106
|
+
const routeExports = (0, route_exports_js_1.readRouteExports)(source, execution.sourceFile);
|
|
107
|
+
const declared = routeExports.exports.some(({ method }) => method === execution.method)
|
|
108
|
+
|| routeExports.findings.some((finding) => (finding.code === 'route-export-unresolved' && finding.exportName === execution.method));
|
|
109
|
+
if (!declared) {
|
|
110
|
+
throw new Error(`Foundation inventory references a missing route export: ${execution.stableKey}`);
|
|
111
|
+
}
|
|
112
|
+
const expectedStableKey = `${execution.method} ${execution.path}`;
|
|
113
|
+
if (execution.stableKey !== expectedStableKey) {
|
|
114
|
+
throw new Error(`Foundation inventory stable key mismatch: ${execution.stableKey}`);
|
|
115
|
+
}
|
|
116
|
+
const currentFingerprint = (0, route_fingerprint_js_1.createRouteSourceFingerprint)(source, execution.method, execution.path);
|
|
117
|
+
if (currentFingerprint !== execution.sourceFingerprint) {
|
|
118
|
+
throw new Error(`Foundation route fingerprint mismatch: ${execution.stableKey}`);
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
...execution,
|
|
122
|
+
sourceLocator: {
|
|
123
|
+
sourceFile: execution.sourceFile,
|
|
124
|
+
exportName: execution.method,
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Whether a `@Controller` class of the file declares a handler of this HTTP
|
|
130
|
+
* method. It reads decorators exactly as the Nest source does, through a named
|
|
131
|
+
* or a namespace import of `@nestjs/common`. The full path joins the global
|
|
132
|
+
* prefix of another file, so the fingerprint, not this check, pins the path.
|
|
133
|
+
*/
|
|
134
|
+
function declaresNestMethod(source, fileName, method) {
|
|
135
|
+
const file = typescript_1.default.createSourceFile(fileName, source, typescript_1.default.ScriptTarget.Latest, true);
|
|
136
|
+
const imports = (0, nest_decorators_js_1.readImports)(file);
|
|
137
|
+
const names = (node) => (0, nest_decorators_js_1.decoratorsOf)(node, imports).map(({ name }) => name);
|
|
138
|
+
return file.statements.some((statement) => (typescript_1.default.isClassDeclaration(statement) && names(statement).includes('Controller')
|
|
139
|
+
&& statement.members.some((member) => (typescript_1.default.isMethodDeclaration(member) && names(member).some((name) => nest_decorators_js_1.NEST_METHOD_DECORATORS[name] === method)))));
|
|
140
|
+
}
|
|
141
|
+
async function verifyNestEndpoint(rootDir, execution) {
|
|
142
|
+
let source;
|
|
143
|
+
try {
|
|
144
|
+
source = await (0, promises_1.readFile)((0, node_path_1.resolve)(rootDir, execution.sourceFile), 'utf8');
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
if (error.code === 'ENOENT') {
|
|
148
|
+
throw new Error(`Foundation inventory references a missing controller: ${execution.stableKey}`);
|
|
149
|
+
}
|
|
150
|
+
throw error;
|
|
151
|
+
}
|
|
152
|
+
if (!declaresNestMethod(source, execution.sourceFile, execution.method)) {
|
|
153
|
+
throw new Error(`Foundation inventory references a missing controller method: ${execution.stableKey}`);
|
|
154
|
+
}
|
|
155
|
+
if (execution.stableKey !== `${execution.method} ${execution.path}`) {
|
|
156
|
+
throw new Error(`Foundation inventory stable key mismatch: ${execution.stableKey}`);
|
|
157
|
+
}
|
|
158
|
+
if ((0, route_fingerprint_js_1.createRouteSourceFingerprint)(source, execution.method, execution.path) !== execution.sourceFingerprint) {
|
|
159
|
+
throw new Error(`Foundation route fingerprint mismatch: ${execution.stableKey}`);
|
|
160
|
+
}
|
|
161
|
+
return { ...execution, sourceLocator: { sourceFile: execution.sourceFile, exportName: execution.method } };
|
|
162
|
+
}
|
|
163
|
+
async function verifyOpenapiEndpoint(rootDir, execution) {
|
|
164
|
+
let text;
|
|
165
|
+
try {
|
|
166
|
+
text = await (0, promises_1.readFile)((0, node_path_1.resolve)(rootDir, execution.sourceFile), 'utf8');
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
if (error.code === 'ENOENT') {
|
|
170
|
+
throw new Error(`Foundation inventory references a missing OpenAPI document: ${execution.stableKey}`);
|
|
171
|
+
}
|
|
172
|
+
throw error;
|
|
173
|
+
}
|
|
174
|
+
const parsed = (0, openapi_document_js_1.parseOpenapiDocument)(text);
|
|
175
|
+
const operation = parsed.ok
|
|
176
|
+
? (0, openapi_document_js_1.operationsOf)(parsed.document).find((candidate) => (candidate.path === execution.path && candidate.operationKey === execution.method.toLowerCase()))
|
|
177
|
+
: undefined;
|
|
178
|
+
if (!parsed.ok || !operation) {
|
|
179
|
+
throw new Error(`Foundation inventory references a missing OpenAPI operation: ${execution.stableKey}`);
|
|
180
|
+
}
|
|
181
|
+
if (execution.stableKey !== `${execution.method} ${execution.path}`) {
|
|
182
|
+
throw new Error(`Foundation inventory stable key mismatch: ${execution.stableKey}`);
|
|
183
|
+
}
|
|
184
|
+
if ((0, openapi_document_js_1.operationFingerprint)(parsed.document, operation, execution.method, execution.path) !== execution.sourceFingerprint) {
|
|
185
|
+
throw new Error(`Foundation route fingerprint mismatch: ${execution.stableKey}`);
|
|
186
|
+
}
|
|
187
|
+
return { ...execution, sourceLocator: { sourceFile: execution.sourceFile, exportName: execution.method } };
|
|
188
|
+
}
|
|
189
|
+
async function verifyEndpoint(rootDir, execution) {
|
|
190
|
+
const kind = execution.sourceKind ?? 'next-app';
|
|
191
|
+
if (kind === 'next-app')
|
|
192
|
+
return verifyNextEndpoint(rootDir, execution);
|
|
193
|
+
if (kind === 'nest')
|
|
194
|
+
return verifyNestEndpoint(rootDir, execution);
|
|
195
|
+
if (kind === 'openapi')
|
|
196
|
+
return verifyOpenapiEndpoint(rootDir, execution);
|
|
197
|
+
throw new Error(`Unsupported endpoint source kind: ${String(kind)}`);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Read literal registrations from syntax, never comments or example strings.
|
|
201
|
+
* This is source evidence, not proof that the component mounts at runtime.
|
|
202
|
+
*/
|
|
203
|
+
function registeredActionIds(source, fileName) {
|
|
204
|
+
const file = typescript_1.default.createSourceFile(fileName, source, typescript_1.default.ScriptTarget.Latest, true);
|
|
205
|
+
const hooks = new Map([['useAiClientAction', 0], ['useAiClientActionById', 1]]);
|
|
206
|
+
const aliases = new Map(hooks);
|
|
207
|
+
const namespaces = new Set();
|
|
208
|
+
for (const node of file.statements) {
|
|
209
|
+
if (!typescript_1.default.isImportDeclaration(node) || !typescript_1.default.isStringLiteral(node.moduleSpecifier)
|
|
210
|
+
|| node.moduleSpecifier.text !== 'glirastes/react' || node.importClause?.isTypeOnly)
|
|
211
|
+
continue;
|
|
212
|
+
const bindings = node.importClause?.namedBindings;
|
|
213
|
+
if (bindings && typescript_1.default.isNamespaceImport(bindings))
|
|
214
|
+
namespaces.add(bindings.name.text);
|
|
215
|
+
if (bindings && typescript_1.default.isNamedImports(bindings)) {
|
|
216
|
+
for (const entry of bindings.elements) {
|
|
217
|
+
const argument = hooks.get((entry.propertyName ?? entry.name).text);
|
|
218
|
+
if (!entry.isTypeOnly && argument !== undefined)
|
|
219
|
+
aliases.set(entry.name.text, argument);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
const ids = new Set();
|
|
224
|
+
const visit = (node) => {
|
|
225
|
+
if (typescript_1.default.isCallExpression(node)) {
|
|
226
|
+
const callee = node.expression;
|
|
227
|
+
const argument = typescript_1.default.isIdentifier(callee) ? aliases.get(callee.text)
|
|
228
|
+
: typescript_1.default.isPropertyAccessExpression(callee) && typescript_1.default.isIdentifier(callee.expression)
|
|
229
|
+
&& namespaces.has(callee.expression.text) ? hooks.get(callee.name.text) : undefined;
|
|
230
|
+
const value = argument === undefined ? undefined : node.arguments[argument];
|
|
231
|
+
if (value && typescript_1.default.isStringLiteralLike(value))
|
|
232
|
+
ids.add(value.text);
|
|
233
|
+
}
|
|
234
|
+
typescript_1.default.forEachChild(node, visit);
|
|
235
|
+
};
|
|
236
|
+
visit(file);
|
|
237
|
+
return ids;
|
|
238
|
+
}
|
|
239
|
+
/** Index once per discovery, not once per UI tool. Generated files are mirrors. */
|
|
240
|
+
async function findActionHandlers(rootDir) {
|
|
241
|
+
const matches = new Map();
|
|
242
|
+
const walk = async (relative) => {
|
|
243
|
+
const entries = await (0, promises_1.readdir)((0, node_path_1.resolve)(rootDir, relative), {
|
|
244
|
+
withFileTypes: true,
|
|
245
|
+
}).catch(() => []);
|
|
246
|
+
for (const entry of entries) {
|
|
247
|
+
const next = relative ? `${relative}/${entry.name}` : entry.name;
|
|
248
|
+
if (entry.isDirectory()) {
|
|
249
|
+
if (entry.name === 'node_modules' || entry.name.startsWith('.'))
|
|
250
|
+
continue;
|
|
251
|
+
if (entry.name === 'generated')
|
|
252
|
+
continue;
|
|
253
|
+
await walk(next);
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
if (!/\.(tsx?|jsx?)$/.test(entry.name))
|
|
257
|
+
continue;
|
|
258
|
+
const source = await (0, promises_1.readFile)((0, node_path_1.resolve)(rootDir, next), 'utf8')
|
|
259
|
+
.catch(() => '');
|
|
260
|
+
if (!source.includes('useAiClientAction'))
|
|
261
|
+
continue;
|
|
262
|
+
for (const actionId of registeredActionIds(source, next)) {
|
|
263
|
+
const previous = matches.get(actionId);
|
|
264
|
+
if (!previous || next < previous)
|
|
265
|
+
matches.set(actionId, next);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
await walk('');
|
|
270
|
+
return matches;
|
|
271
|
+
}
|
|
272
|
+
async function discoverFoundationExecutions(options) {
|
|
273
|
+
const parsed = exports.FoundationExecutionInventorySchema.parse(options.inventory);
|
|
274
|
+
assertUniqueInventory(parsed);
|
|
275
|
+
const inventory = canonicalInventory(parsed);
|
|
276
|
+
const executions = [];
|
|
277
|
+
const handlers = inventory.executions.some((execution) => execution.executionKind === 'ui' && execution.actionId)
|
|
278
|
+
? await findActionHandlers(options.rootDir) : new Map();
|
|
279
|
+
const findings = [];
|
|
280
|
+
for (const execution of inventory.executions) {
|
|
281
|
+
if (execution.executionKind === 'endpoint') {
|
|
282
|
+
executions.push(await verifyEndpoint(options.rootDir, execution));
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
285
|
+
const sourceFile = execution.actionId
|
|
286
|
+
? handlers.get(execution.actionId)
|
|
287
|
+
: null;
|
|
288
|
+
if (execution.actionId && !sourceFile) {
|
|
289
|
+
findings.push({
|
|
290
|
+
code: 'ui-action-handler-not-found',
|
|
291
|
+
subjectRef: execution.definitionId,
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
executions.push({
|
|
295
|
+
...execution,
|
|
296
|
+
sourceLocator: {
|
|
297
|
+
actionBindingRef: execution.actionBindingRef,
|
|
298
|
+
...(sourceFile ? { sourceFile } : {}),
|
|
299
|
+
},
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
const canonicalJson = JSON.stringify(canonicalValue(inventory));
|
|
303
|
+
return {
|
|
304
|
+
schemaVersion: 2,
|
|
305
|
+
targetAppKey: inventory.targetAppKey,
|
|
306
|
+
inventoryDigest: `sha256:${(0, node_crypto_1.createHash)('sha256')
|
|
307
|
+
.update(canonicalJson)
|
|
308
|
+
.digest('base64url')}`,
|
|
309
|
+
executions,
|
|
310
|
+
findings,
|
|
311
|
+
};
|
|
312
|
+
}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export { checkAiCoverage, formatCoverageReport, type CoverageReport } from './coverage.js';
|
|
6
|
-
export { scaffoldAiTool, formatScaffoldResult, type ScaffoldResult } from './scaffolder.js';
|
|
7
|
-
export { colors } from './format.js';
|
|
8
|
-
export { generateAgentSkills, type GenerateSkillsOptions, type GenerateSkillsResult } from './skill-generator.js';
|
|
9
|
-
export { generateMcpServer, type GenerateMcpOptions, type GenerateMcpResult } from './mcp-generator.js';
|
|
10
|
-
export { recommendOutputFormat, type OutputFormat, type RecommendationInput } from './output-recommender.js';
|
|
11
|
-
export { syncAssetToGlirastes, type AssetSyncOptions, type AssetSyncResult } from './asset-sync.js';
|
|
12
|
-
export { scanNestControllers, type DiscoveredNestTool, type NestScanResult } from './nestjs-scanner.js';
|
|
13
|
-
export type { ScanResult, GenerateOptions } from './types.js';
|
|
1
|
+
export { createRouteSourceFingerprint, scanNextAppRoutes, writeNextAppRouteScan, type NextAppRouteScanResult, type ScannedRouteCandidate, type ScanNextAppRoutesOptions, type WriteNextAppRouteScanOptions, } from './route-scanner.js';
|
|
2
|
+
export { discoverFoundationExecutions, FoundationExecutionInventorySchema, type DiscoveredFoundationExecution, type FoundationExecutionDiscovery, type FoundationExecutionInventory, } from './execution-inventory.js';
|
|
3
|
+
export { reconcileExecutionInventory, ExecutionGenerationStateSchema, type ExecutionGenerationState, type ExecutionGenerationResult, type ObservedExecution, } from './inventory-generation.js';
|
|
4
|
+
export { collectNextEndpointExecutions, type ResolvedEndpointContract } from './next-source-generation.js';
|
|
@@ -1,33 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
Object.defineProperty(exports, "
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, "
|
|
10
|
-
Object.defineProperty(exports, "
|
|
11
|
-
var
|
|
12
|
-
Object.defineProperty(exports, "
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Object.defineProperty(exports, "
|
|
16
|
-
var coverage_js_1 = require("./coverage.js");
|
|
17
|
-
Object.defineProperty(exports, "checkAiCoverage", { enumerable: true, get: function () { return coverage_js_1.checkAiCoverage; } });
|
|
18
|
-
Object.defineProperty(exports, "formatCoverageReport", { enumerable: true, get: function () { return coverage_js_1.formatCoverageReport; } });
|
|
19
|
-
var scaffolder_js_1 = require("./scaffolder.js");
|
|
20
|
-
Object.defineProperty(exports, "scaffoldAiTool", { enumerable: true, get: function () { return scaffolder_js_1.scaffoldAiTool; } });
|
|
21
|
-
Object.defineProperty(exports, "formatScaffoldResult", { enumerable: true, get: function () { return scaffolder_js_1.formatScaffoldResult; } });
|
|
22
|
-
var format_js_1 = require("./format.js");
|
|
23
|
-
Object.defineProperty(exports, "colors", { enumerable: true, get: function () { return format_js_1.colors; } });
|
|
24
|
-
var skill_generator_js_1 = require("./skill-generator.js");
|
|
25
|
-
Object.defineProperty(exports, "generateAgentSkills", { enumerable: true, get: function () { return skill_generator_js_1.generateAgentSkills; } });
|
|
26
|
-
var mcp_generator_js_1 = require("./mcp-generator.js");
|
|
27
|
-
Object.defineProperty(exports, "generateMcpServer", { enumerable: true, get: function () { return mcp_generator_js_1.generateMcpServer; } });
|
|
28
|
-
var output_recommender_js_1 = require("./output-recommender.js");
|
|
29
|
-
Object.defineProperty(exports, "recommendOutputFormat", { enumerable: true, get: function () { return output_recommender_js_1.recommendOutputFormat; } });
|
|
30
|
-
var asset_sync_js_1 = require("./asset-sync.js");
|
|
31
|
-
Object.defineProperty(exports, "syncAssetToGlirastes", { enumerable: true, get: function () { return asset_sync_js_1.syncAssetToGlirastes; } });
|
|
32
|
-
var nestjs_scanner_js_1 = require("./nestjs-scanner.js");
|
|
33
|
-
Object.defineProperty(exports, "scanNestControllers", { enumerable: true, get: function () { return nestjs_scanner_js_1.scanNestControllers; } });
|
|
3
|
+
exports.collectNextEndpointExecutions = exports.ExecutionGenerationStateSchema = exports.reconcileExecutionInventory = exports.FoundationExecutionInventorySchema = exports.discoverFoundationExecutions = exports.writeNextAppRouteScan = exports.scanNextAppRoutes = exports.createRouteSourceFingerprint = void 0;
|
|
4
|
+
var route_scanner_js_1 = require("./route-scanner.js");
|
|
5
|
+
Object.defineProperty(exports, "createRouteSourceFingerprint", { enumerable: true, get: function () { return route_scanner_js_1.createRouteSourceFingerprint; } });
|
|
6
|
+
Object.defineProperty(exports, "scanNextAppRoutes", { enumerable: true, get: function () { return route_scanner_js_1.scanNextAppRoutes; } });
|
|
7
|
+
Object.defineProperty(exports, "writeNextAppRouteScan", { enumerable: true, get: function () { return route_scanner_js_1.writeNextAppRouteScan; } });
|
|
8
|
+
var execution_inventory_js_1 = require("./execution-inventory.js");
|
|
9
|
+
Object.defineProperty(exports, "discoverFoundationExecutions", { enumerable: true, get: function () { return execution_inventory_js_1.discoverFoundationExecutions; } });
|
|
10
|
+
Object.defineProperty(exports, "FoundationExecutionInventorySchema", { enumerable: true, get: function () { return execution_inventory_js_1.FoundationExecutionInventorySchema; } });
|
|
11
|
+
var inventory_generation_js_1 = require("./inventory-generation.js");
|
|
12
|
+
Object.defineProperty(exports, "reconcileExecutionInventory", { enumerable: true, get: function () { return inventory_generation_js_1.reconcileExecutionInventory; } });
|
|
13
|
+
Object.defineProperty(exports, "ExecutionGenerationStateSchema", { enumerable: true, get: function () { return inventory_generation_js_1.ExecutionGenerationStateSchema; } });
|
|
14
|
+
var next_source_generation_js_1 = require("./next-source-generation.js");
|
|
15
|
+
Object.defineProperty(exports, "collectNextEndpointExecutions", { enumerable: true, get: function () { return next_source_generation_js_1.collectNextEndpointExecutions; } });
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const ObservationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
path: z.ZodString;
|
|
4
|
+
method: z.ZodEnum<{
|
|
5
|
+
GET: "GET";
|
|
6
|
+
HEAD: "HEAD";
|
|
7
|
+
POST: "POST";
|
|
8
|
+
PATCH: "PATCH";
|
|
9
|
+
PUT: "PUT";
|
|
10
|
+
DELETE: "DELETE";
|
|
11
|
+
}>;
|
|
12
|
+
sourceFingerprint: z.ZodString;
|
|
13
|
+
inputSchemaDigest: z.ZodString;
|
|
14
|
+
outputSchemaDigest: z.ZodString;
|
|
15
|
+
executionKind: z.ZodLiteral<"endpoint">;
|
|
16
|
+
stableKey: z.ZodString;
|
|
17
|
+
definitionId: z.ZodString;
|
|
18
|
+
sourceKind: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
openapi: "openapi";
|
|
20
|
+
"next-app": "next-app";
|
|
21
|
+
nest: "nest";
|
|
22
|
+
}>>;
|
|
23
|
+
sourceFile: z.ZodString;
|
|
24
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
25
|
+
actionId: z.ZodOptional<z.ZodString>;
|
|
26
|
+
sourceFingerprint: z.ZodString;
|
|
27
|
+
inputSchemaDigest: z.ZodString;
|
|
28
|
+
outputSchemaDigest: z.ZodString;
|
|
29
|
+
executionKind: z.ZodLiteral<"ui">;
|
|
30
|
+
actionBindingRef: z.ZodString;
|
|
31
|
+
stableKey: z.ZodString;
|
|
32
|
+
definitionId: z.ZodString;
|
|
33
|
+
}, z.core.$strict>], "executionKind">;
|
|
34
|
+
/** App-local generation state; never upload this source-bearing object. */
|
|
35
|
+
export declare const ExecutionGenerationStateSchema: z.ZodObject<{
|
|
36
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
37
|
+
appId: z.ZodUUID;
|
|
38
|
+
inventory: z.ZodObject<{
|
|
39
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
40
|
+
targetAppKey: z.ZodString;
|
|
41
|
+
executions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
42
|
+
toolId: z.ZodUUID;
|
|
43
|
+
definitionId: z.ZodString;
|
|
44
|
+
stableKey: z.ZodString;
|
|
45
|
+
sourceFingerprint: z.ZodString;
|
|
46
|
+
inputSchemaDigest: z.ZodString;
|
|
47
|
+
outputSchemaDigest: z.ZodString;
|
|
48
|
+
executionKind: z.ZodLiteral<"endpoint">;
|
|
49
|
+
sourceKind: z.ZodOptional<z.ZodEnum<{
|
|
50
|
+
openapi: "openapi";
|
|
51
|
+
"next-app": "next-app";
|
|
52
|
+
nest: "nest";
|
|
53
|
+
}>>;
|
|
54
|
+
sourceFile: z.ZodString;
|
|
55
|
+
method: z.ZodEnum<{
|
|
56
|
+
GET: "GET";
|
|
57
|
+
HEAD: "HEAD";
|
|
58
|
+
POST: "POST";
|
|
59
|
+
PATCH: "PATCH";
|
|
60
|
+
PUT: "PUT";
|
|
61
|
+
DELETE: "DELETE";
|
|
62
|
+
}>;
|
|
63
|
+
path: z.ZodString;
|
|
64
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
65
|
+
toolId: z.ZodUUID;
|
|
66
|
+
definitionId: z.ZodString;
|
|
67
|
+
stableKey: z.ZodString;
|
|
68
|
+
sourceFingerprint: z.ZodString;
|
|
69
|
+
inputSchemaDigest: z.ZodString;
|
|
70
|
+
outputSchemaDigest: z.ZodString;
|
|
71
|
+
executionKind: z.ZodLiteral<"ui">;
|
|
72
|
+
actionBindingRef: z.ZodString;
|
|
73
|
+
actionId: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strict>], "executionKind">>;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
tombstones: z.ZodArray<z.ZodObject<{
|
|
77
|
+
toolId: z.ZodUUID;
|
|
78
|
+
stableKey: z.ZodString;
|
|
79
|
+
definitionId: z.ZodString;
|
|
80
|
+
}, z.core.$strict>>;
|
|
81
|
+
}, z.core.$strict>;
|
|
82
|
+
export type ExecutionGenerationState = z.infer<typeof ExecutionGenerationStateSchema>;
|
|
83
|
+
export type ObservedExecution = z.infer<typeof ObservationSchema>;
|
|
84
|
+
export interface ExecutionGenerationResult {
|
|
85
|
+
state: ExecutionGenerationState;
|
|
86
|
+
changes: {
|
|
87
|
+
added: string[];
|
|
88
|
+
changed: string[];
|
|
89
|
+
removed: string[];
|
|
90
|
+
unchanged: string[];
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Reconcile a complete source-adapter snapshot. Does not assess semantics,
|
|
95
|
+
* grant permissions, write files, sync, or claim executable-source verification.
|
|
96
|
+
* Callers must persist state (including tombstones) and validate real sources.
|
|
97
|
+
*/
|
|
98
|
+
export declare function reconcileExecutionInventory(options: {
|
|
99
|
+
appId: string;
|
|
100
|
+
targetAppKey: string;
|
|
101
|
+
observed: unknown;
|
|
102
|
+
previous?: unknown;
|
|
103
|
+
}): ExecutionGenerationResult;
|
|
104
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExecutionGenerationStateSchema = void 0;
|
|
4
|
+
exports.reconcileExecutionInventory = reconcileExecutionInventory;
|
|
5
|
+
const node_crypto_1 = require("node:crypto");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const index_js_1 = require("../diagnostics/index.js");
|
|
8
|
+
const execution_inventory_js_1 = require("./execution-inventory.js");
|
|
9
|
+
const [endpoint, ui] = execution_inventory_js_1.FoundationExecutionInventorySchema.shape.executions.element.options;
|
|
10
|
+
const ObservationSchema = zod_1.z.discriminatedUnion('executionKind', [
|
|
11
|
+
endpoint.omit({ toolId: true }), ui.omit({ toolId: true }),
|
|
12
|
+
]);
|
|
13
|
+
const SnapshotSchema = zod_1.z.object({
|
|
14
|
+
complete: zod_1.z.boolean(), executions: zod_1.z.array(ObservationSchema).max(5_000),
|
|
15
|
+
}).strict();
|
|
16
|
+
const TombstoneSchema = zod_1.z.object({
|
|
17
|
+
toolId: zod_1.z.uuid(), stableKey: zod_1.z.string().min(1).max(2_100),
|
|
18
|
+
definitionId: zod_1.z.string().min(1).max(200),
|
|
19
|
+
}).strict();
|
|
20
|
+
/** App-local generation state; never upload this source-bearing object. */
|
|
21
|
+
exports.ExecutionGenerationStateSchema = zod_1.z.object({
|
|
22
|
+
schemaVersion: zod_1.z.literal(1), appId: zod_1.z.uuid(),
|
|
23
|
+
inventory: execution_inventory_js_1.FoundationExecutionInventorySchema,
|
|
24
|
+
tombstones: zod_1.z.array(TombstoneSchema).max(100_000),
|
|
25
|
+
}).strict();
|
|
26
|
+
function fail(message, remediation) {
|
|
27
|
+
throw new index_js_1.FoundationDiagnosticError({
|
|
28
|
+
code: 'E-INVENTORY-010', operation: 'generate.inventory', message, remediation,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function canonical(value) {
|
|
32
|
+
const sort = (item) => Array.isArray(item) ? item.map(sort)
|
|
33
|
+
: item && typeof item === 'object'
|
|
34
|
+
? Object.fromEntries(Object.entries(item).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0)
|
|
35
|
+
.map(([key, child]) => [key, sort(child)])) : item;
|
|
36
|
+
return JSON.stringify(sort(value));
|
|
37
|
+
}
|
|
38
|
+
// UUIDv5 scoped to app + target + stable key + removal generation. Reappearance
|
|
39
|
+
// is a new identity, not revival of an old authorization/approval reference.
|
|
40
|
+
function newIdentity(appId, target, key, generation) {
|
|
41
|
+
const bytes = (0, node_crypto_1.createHash)('sha1').update(Buffer.from(appId.replaceAll('-', ''), 'hex'))
|
|
42
|
+
.update(JSON.stringify(['glirastes.execution.v1', target, key, generation])).digest().subarray(0, 16);
|
|
43
|
+
bytes[6] = (bytes[6] & 0x0f) | 0x50;
|
|
44
|
+
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
|
45
|
+
const hex = bytes.toString('hex');
|
|
46
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
47
|
+
}
|
|
48
|
+
function assertUnique(entries) {
|
|
49
|
+
const keys = new Set();
|
|
50
|
+
const names = new Set();
|
|
51
|
+
const fingerprints = new Set();
|
|
52
|
+
for (const entry of entries) {
|
|
53
|
+
if (keys.has(entry.stableKey) || names.has(entry.definitionId)) {
|
|
54
|
+
fail('Duplicate execution keys or definition names.', 'repair-source-observations');
|
|
55
|
+
}
|
|
56
|
+
if (fingerprints.has(entry.sourceFingerprint)) {
|
|
57
|
+
fail('Conflicting source fingerprint.', 'repair-source-observations');
|
|
58
|
+
}
|
|
59
|
+
if (entry.executionKind === 'endpoint' && entry.stableKey !== `${entry.method} ${entry.path}`) {
|
|
60
|
+
fail('Endpoint stable key does not match its method and path.', 'repair-source-observations');
|
|
61
|
+
}
|
|
62
|
+
keys.add(entry.stableKey);
|
|
63
|
+
names.add(entry.definitionId);
|
|
64
|
+
fingerprints.add(entry.sourceFingerprint);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Reconcile a complete source-adapter snapshot. Does not assess semantics,
|
|
69
|
+
* grant permissions, write files, sync, or claim executable-source verification.
|
|
70
|
+
* Callers must persist state (including tombstones) and validate real sources.
|
|
71
|
+
*/
|
|
72
|
+
function reconcileExecutionInventory(options) {
|
|
73
|
+
const scope = zod_1.z.object({ appId: zod_1.z.uuid(), targetAppKey: zod_1.z.string().trim().min(1).max(200) }).safeParse(options);
|
|
74
|
+
const snapshot = SnapshotSchema.safeParse(options.observed);
|
|
75
|
+
if (!scope.success || !snapshot.success)
|
|
76
|
+
fail('Invalid generation scope or source observations.', 'repair-source-observations');
|
|
77
|
+
if (!snapshot.data.complete)
|
|
78
|
+
fail('Source discovery is incomplete; prior inventory was not replaced.', 'complete-source-discovery');
|
|
79
|
+
const parsed = options.previous === undefined ? undefined : exports.ExecutionGenerationStateSchema.safeParse(options.previous);
|
|
80
|
+
if (parsed && !parsed.success)
|
|
81
|
+
fail('Invalid previous generation state.', 'restore-generation-state');
|
|
82
|
+
const previous = parsed?.data;
|
|
83
|
+
if (previous && (previous.appId !== scope.data.appId || previous.inventory.targetAppKey !== scope.data.targetAppKey)) {
|
|
84
|
+
fail('Previous generation state belongs to a different app.', 'align-generation-scope');
|
|
85
|
+
}
|
|
86
|
+
assertUnique(snapshot.data.executions);
|
|
87
|
+
assertUnique(previous?.inventory.executions ?? []);
|
|
88
|
+
const occupied = new Set();
|
|
89
|
+
for (const entry of [...previous?.inventory.executions ?? [], ...previous?.tombstones ?? []]) {
|
|
90
|
+
if (occupied.has(entry.toolId))
|
|
91
|
+
fail('Duplicate identities in previous generation state.', 'restore-generation-state');
|
|
92
|
+
occupied.add(entry.toolId);
|
|
93
|
+
}
|
|
94
|
+
const previousByKey = new Map(previous?.inventory.executions.map((entry) => [entry.stableKey, entry]));
|
|
95
|
+
const currentKeys = new Set(snapshot.data.executions.map(({ stableKey }) => stableKey));
|
|
96
|
+
const tombstones = [...previous?.tombstones ?? []];
|
|
97
|
+
const changes = { added: [], changed: [], removed: [], unchanged: [] };
|
|
98
|
+
for (const old of previous?.inventory.executions ?? []) {
|
|
99
|
+
if (currentKeys.has(old.stableKey))
|
|
100
|
+
continue;
|
|
101
|
+
changes.removed.push(old.toolId);
|
|
102
|
+
tombstones.push({ toolId: old.toolId, stableKey: old.stableKey, definitionId: old.definitionId });
|
|
103
|
+
}
|
|
104
|
+
const executions = snapshot.data.executions.map((observation) => {
|
|
105
|
+
const old = previousByKey.get(observation.stableKey);
|
|
106
|
+
const toolId = old?.toolId ?? newIdentity(scope.data.appId, scope.data.targetAppKey, observation.stableKey, tombstones.filter(({ stableKey }) => stableKey === observation.stableKey).length);
|
|
107
|
+
if (!old && occupied.has(toolId))
|
|
108
|
+
fail('Generated execution identity conflicts with previous state.', 'restore-generation-state');
|
|
109
|
+
occupied.add(toolId);
|
|
110
|
+
const execution = { ...observation, toolId };
|
|
111
|
+
changes[!old ? 'added' : canonical(old) === canonical(execution) ? 'unchanged' : 'changed'].push(toolId);
|
|
112
|
+
return execution;
|
|
113
|
+
}).sort((a, b) => a.toolId < b.toolId ? -1 : a.toolId > b.toolId ? 1 : 0);
|
|
114
|
+
for (const list of Object.values(changes))
|
|
115
|
+
list.sort();
|
|
116
|
+
tombstones.sort((a, b) => a.toolId < b.toolId ? -1 : a.toolId > b.toolId ? 1 : 0);
|
|
117
|
+
return {
|
|
118
|
+
state: exports.ExecutionGenerationStateSchema.parse({ schemaVersion: 1, appId: scope.data.appId,
|
|
119
|
+
inventory: { schemaVersion: 2, targetAppKey: scope.data.targetAppKey, executions }, tombstones }),
|
|
120
|
+
changes,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ObservedExecution } from './inventory-generation.js';
|
|
2
|
+
import { type ScannedRouteCandidate } from './route-scanner.js';
|
|
3
|
+
export interface ResolvedEndpointContract {
|
|
4
|
+
definitionId: string;
|
|
5
|
+
inputSchemaDigest: string;
|
|
6
|
+
outputSchemaDigest: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Enumerate actual routes before resolving their local schema contracts. The
|
|
10
|
+
* setup agent supplies a thin source-schema adapter, not a static tool list.
|
|
11
|
+
* This stage does not grant exposure, infer authorization or upload sources.
|
|
12
|
+
*/
|
|
13
|
+
export declare function collectNextEndpointExecutions(options: {
|
|
14
|
+
rootDir: string;
|
|
15
|
+
apiDir?: string;
|
|
16
|
+
resolveContract: (candidate: ScannedRouteCandidate) => ResolvedEndpointContract | undefined | Promise<ResolvedEndpointContract | undefined>;
|
|
17
|
+
}): Promise<ObservedExecution[]>;
|