glirastes 0.3.0 → 0.3.2
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 +86 -0
- package/README.md +154 -9
- package/codegen/package.json +5 -0
- package/dist/cjs/codegen/asset-sync.d.ts +20 -0
- package/dist/cjs/codegen/asset-sync.js +28 -0
- package/dist/cjs/codegen/coverage.d.ts +66 -0
- package/dist/cjs/codegen/coverage.js +408 -0
- package/dist/cjs/codegen/endpoint-scanner.d.ts +16 -0
- package/dist/cjs/codegen/endpoint-scanner.js +197 -0
- package/dist/cjs/codegen/format.d.ts +17 -0
- package/dist/cjs/codegen/format.js +34 -0
- package/dist/cjs/codegen/fs-utils.d.ts +45 -0
- package/dist/cjs/codegen/fs-utils.js +165 -0
- package/dist/cjs/codegen/index.d.ts +13 -0
- package/dist/cjs/codegen/index.js +33 -0
- package/dist/cjs/codegen/mcp-generator.d.ts +50 -0
- package/dist/cjs/codegen/mcp-generator.js +803 -0
- package/dist/cjs/codegen/module-generator.d.ts +11 -0
- package/dist/cjs/codegen/module-generator.js +353 -0
- package/dist/cjs/codegen/nestjs-scanner.d.ts +43 -0
- package/dist/cjs/codegen/nestjs-scanner.js +241 -0
- package/dist/cjs/codegen/output-recommender.d.ts +23 -0
- package/dist/cjs/codegen/output-recommender.js +33 -0
- package/dist/cjs/codegen/scaffolder.d.ts +36 -0
- package/dist/cjs/codegen/scaffolder.js +262 -0
- package/dist/cjs/codegen/skill-generator.d.ts +49 -0
- package/dist/cjs/codegen/skill-generator.js +967 -0
- package/dist/cjs/codegen/types.d.ts +52 -0
- package/dist/cjs/codegen/types.js +16 -0
- package/dist/cjs/codegen/ui-scanner.d.ts +24 -0
- package/dist/cjs/codegen/ui-scanner.js +202 -0
- package/dist/cjs/codegen/validator.d.ts +35 -0
- package/dist/cjs/codegen/validator.js +292 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +23 -0
- package/dist/cjs/openapi/index.d.ts +78 -0
- package/dist/cjs/openapi/index.js +347 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/react/audio-worklet-processor.d.ts +16 -0
- package/dist/cjs/react/audio-worklet-processor.js +27 -0
- package/dist/cjs/react/bridges/rest-session-bridge.d.ts +113 -0
- package/dist/cjs/react/bridges/rest-session-bridge.js +209 -0
- package/dist/cjs/react/components/ai-chat-panel.d.ts +12 -0
- package/dist/cjs/react/components/ai-chat-panel.js +67 -0
- package/dist/cjs/react/components/ai-trigger-button.d.ts +2 -0
- package/dist/cjs/react/components/ai-trigger-button.js +239 -0
- package/dist/cjs/react/components/approval-card.d.ts +9 -0
- package/dist/cjs/react/components/approval-card.js +24 -0
- package/dist/cjs/react/components/bulk-approval-card.d.ts +9 -0
- package/dist/cjs/react/components/bulk-approval-card.js +36 -0
- package/dist/cjs/react/components/chat-input.d.ts +10 -0
- package/dist/cjs/react/components/chat-input.js +60 -0
- package/dist/cjs/react/components/chat-window.d.ts +2 -0
- package/dist/cjs/react/components/chat-window.js +134 -0
- package/dist/cjs/react/components/confirm-dialog.d.ts +32 -0
- package/dist/cjs/react/components/confirm-dialog.js +48 -0
- package/dist/cjs/react/components/floating-chat-ui.d.ts +90 -0
- package/dist/cjs/react/components/floating-chat-ui.js +163 -0
- package/dist/cjs/react/components/mention-chip.d.ts +16 -0
- package/dist/cjs/react/components/mention-chip.js +42 -0
- package/dist/cjs/react/components/mention-input.d.ts +8 -0
- package/dist/cjs/react/components/mention-input.js +117 -0
- package/dist/cjs/react/components/message-bubble.d.ts +11 -0
- package/dist/cjs/react/components/message-bubble.js +171 -0
- package/dist/cjs/react/components/message-list.d.ts +8 -0
- package/dist/cjs/react/components/message-list.js +52 -0
- package/dist/cjs/react/components/pipeline-timeline.d.ts +7 -0
- package/dist/cjs/react/components/pipeline-timeline.js +72 -0
- package/dist/cjs/react/components/recording-bar.d.ts +2 -0
- package/dist/cjs/react/components/recording-bar.js +81 -0
- package/dist/cjs/react/components/recording-controls.d.ts +18 -0
- package/dist/cjs/react/components/recording-controls.js +38 -0
- package/dist/cjs/react/components/rich-mention-input.d.ts +2 -0
- package/dist/cjs/react/components/rich-mention-input.js +571 -0
- package/dist/cjs/react/components/session-switcher.d.ts +14 -0
- package/dist/cjs/react/components/session-switcher.js +133 -0
- package/dist/cjs/react/components/suggestion-bar.d.ts +9 -0
- package/dist/cjs/react/components/suggestion-bar.js +47 -0
- package/dist/cjs/react/components/suggestion-chip.d.ts +9 -0
- package/dist/cjs/react/components/suggestion-chip.js +14 -0
- package/dist/cjs/react/components/voice-input-addon.d.ts +13 -0
- package/dist/cjs/react/components/voice-input-addon.js +31 -0
- package/dist/cjs/react/components/voice-input-button.d.ts +2 -0
- package/dist/cjs/react/components/voice-input-button.js +55 -0
- package/dist/cjs/react/components/wavesurfer-loader.d.ts +5 -0
- package/dist/cjs/react/components/wavesurfer-loader.js +36 -0
- package/dist/cjs/react/hooks/use-ai-chat.d.ts +22 -0
- package/dist/cjs/react/hooks/use-ai-chat.js +51 -0
- package/dist/cjs/react/hooks/use-approvals.d.ts +23 -0
- package/dist/cjs/react/hooks/use-approvals.js +63 -0
- package/dist/cjs/react/hooks/use-deepgram-transcription.d.ts +2 -0
- package/dist/cjs/react/hooks/use-deepgram-transcription.js +329 -0
- package/dist/cjs/react/hooks/use-drag-resize-panel.d.ts +48 -0
- package/dist/cjs/react/hooks/use-drag-resize-panel.js +308 -0
- package/dist/cjs/react/hooks/use-draggable-position.d.ts +25 -0
- package/dist/cjs/react/hooks/use-draggable-position.js +134 -0
- package/dist/cjs/react/hooks/use-keyboard-shortcut.d.ts +20 -0
- package/dist/cjs/react/hooks/use-keyboard-shortcut.js +93 -0
- package/dist/cjs/react/hooks/use-mentions.d.ts +23 -0
- package/dist/cjs/react/hooks/use-mentions.js +42 -0
- package/dist/cjs/react/hooks/use-suggestions.d.ts +22 -0
- package/dist/cjs/react/hooks/use-suggestions.js +39 -0
- package/dist/cjs/react/index.d.ts +43 -0
- package/dist/cjs/react/index.js +111 -0
- package/dist/cjs/react/provider/ai-chat-provider.d.ts +45 -0
- package/dist/cjs/react/provider/ai-chat-provider.js +1024 -0
- package/dist/cjs/react/provider/chat-context.d.ts +84 -0
- package/dist/cjs/react/provider/chat-context.js +13 -0
- package/dist/cjs/react/template.d.ts +84 -0
- package/dist/cjs/react/template.js +90 -0
- package/dist/cjs/react/themes.d.ts +24 -0
- package/dist/cjs/react/themes.js +273 -0
- package/dist/cjs/react/transports/langgraph/index.d.ts +2 -0
- package/dist/cjs/react/transports/langgraph/index.js +8 -0
- package/dist/cjs/react/transports/langgraph/langgraph-ai-chat.d.ts +62 -0
- package/dist/cjs/react/transports/langgraph/langgraph-ai-chat.js +94 -0
- package/dist/cjs/react/transports/langgraph.d.ts +71 -0
- package/dist/cjs/react/transports/langgraph.js +369 -0
- package/dist/cjs/react/transports/vercel/index.d.ts +2 -0
- package/dist/cjs/react/transports/vercel/index.js +8 -0
- package/dist/cjs/react/transports/vercel/vercel-ai-chat.d.ts +49 -0
- package/dist/cjs/react/transports/vercel/vercel-ai-chat.js +81 -0
- package/dist/cjs/react/transports/vercel.d.ts +30 -0
- package/dist/cjs/react/transports/vercel.js +69 -0
- package/dist/cjs/react/types.d.ts +760 -0
- package/dist/cjs/react/types.js +2 -0
- package/dist/cjs/react/ui.d.ts +73 -0
- package/dist/cjs/react/ui.js +183 -0
- package/dist/cjs/react/utils/create-approval-description.d.ts +53 -0
- package/dist/cjs/react/utils/create-approval-description.js +122 -0
- package/dist/cjs/react/utils/create-tool-result-handler.d.ts +90 -0
- package/dist/cjs/react/utils/create-tool-result-handler.js +168 -0
- package/dist/cjs/react/utils/mention-markup.d.ts +13 -0
- package/dist/cjs/react/utils/mention-markup.js +117 -0
- package/dist/cjs/react/utils/merge-pipeline-steps.d.ts +19 -0
- package/dist/cjs/react/utils/merge-pipeline-steps.js +81 -0
- package/dist/cjs/react/utils/sanitize-stored-messages.d.ts +23 -0
- package/dist/cjs/react/utils/sanitize-stored-messages.js +52 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-auth.guard.d.ts +10 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-auth.guard.js +42 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-module-options.interface.d.ts +32 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat-module-options.interface.js +4 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.controller.d.ts +11 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.controller.js +80 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.module.d.ts +9 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.module.js +119 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.service.d.ts +13 -0
- package/dist/cjs/server/adapters/nestjs/chat/ai-chat.service.js +131 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/ai-chat-request.dto.d.ts +7 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js +52 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message-part.dto.d.ts +19 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message-part.dto.js +108 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message.dto.d.ts +8 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message.dto.js +59 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/index.d.ts +3 -0
- package/dist/cjs/server/adapters/nestjs/chat/dto/index.js +9 -0
- package/dist/cjs/server/adapters/nestjs/chat/index.d.ts +3 -0
- package/dist/cjs/server/adapters/nestjs/chat/index.js +9 -0
- package/dist/cjs/server/adapters/nestjs/chat/speech-stream.gateway.d.ts +4 -0
- package/dist/cjs/server/adapters/nestjs/chat/speech-stream.gateway.js +73 -0
- package/dist/cjs/server/adapters/nestjs/chat/ws-loader.d.ts +5 -0
- package/dist/cjs/server/adapters/nestjs/chat/ws-loader.js +72 -0
- package/dist/cjs/server/adapters/nestjs/decorators/ai-module.decorator.d.ts +6 -0
- package/dist/cjs/server/adapters/nestjs/decorators/ai-module.decorator.js +13 -0
- package/dist/cjs/server/adapters/nestjs/decorators/ai-param.decorator.d.ts +5 -0
- package/dist/cjs/server/adapters/nestjs/decorators/ai-param.decorator.js +15 -0
- package/dist/cjs/server/adapters/nestjs/decorators/ai-tool.decorator.d.ts +6 -0
- package/dist/cjs/server/adapters/nestjs/decorators/ai-tool.decorator.js +22 -0
- package/dist/cjs/server/adapters/nestjs/decorators/constants.d.ts +4 -0
- package/dist/cjs/server/adapters/nestjs/decorators/constants.js +7 -0
- package/dist/cjs/server/adapters/nestjs/index.d.ts +14 -0
- package/dist/cjs/server/adapters/nestjs/index.js +42 -0
- package/dist/cjs/server/adapters/nestjs/metadata.d.ts +39 -0
- package/dist/cjs/server/adapters/nestjs/metadata.js +36 -0
- package/dist/cjs/server/adapters/nestjs/module/ai-tools-explorer.service.d.ts +36 -0
- package/dist/cjs/server/adapters/nestjs/module/ai-tools-explorer.service.js +159 -0
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.module.d.ts +37 -0
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.module.js +44 -0
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.service.d.ts +28 -0
- package/dist/cjs/server/adapters/nestjs/module/ai-tools.service.js +41 -0
- package/dist/cjs/server/adapters/nestjs/scanner/nestjs-scanner.d.ts +16 -0
- package/dist/cjs/server/adapters/nestjs/scanner/nestjs-scanner.js +117 -0
- package/dist/cjs/server/adapters/nestjs/scanner/schema-builder.d.ts +26 -0
- package/dist/cjs/server/adapters/nestjs/scanner/schema-builder.js +259 -0
- package/dist/cjs/server/adapters/nestjs/swagger.d.ts +7 -0
- package/dist/cjs/server/adapters/nestjs/swagger.js +39 -0
- package/dist/cjs/server/adapters/nextjs/context-helpers.d.ts +22 -0
- package/dist/cjs/server/adapters/nextjs/context-helpers.js +60 -0
- package/dist/cjs/server/adapters/nextjs/create-ai-chat-handler.d.ts +94 -0
- package/dist/cjs/server/adapters/nextjs/create-ai-chat-handler.js +965 -0
- package/dist/cjs/server/adapters/nextjs/filter-fallback-error.d.ts +11 -0
- package/dist/cjs/server/adapters/nextjs/filter-fallback-error.js +41 -0
- package/dist/cjs/server/adapters/nextjs/index.d.ts +8 -0
- package/dist/cjs/server/adapters/nextjs/index.js +22 -0
- package/dist/cjs/server/adapters/nextjs/prepare-model-messages.d.ts +58 -0
- package/dist/cjs/server/adapters/nextjs/prepare-model-messages.js +114 -0
- package/dist/cjs/server/adapters/nextjs/sanitize-model-messages.d.ts +64 -0
- package/dist/cjs/server/adapters/nextjs/sanitize-model-messages.js +489 -0
- package/dist/cjs/server/adapters/nextjs/server-action-helper.d.ts +7 -0
- package/dist/cjs/server/adapters/nextjs/server-action-helper.js +40 -0
- package/dist/cjs/server/adapters/nextjs/types.d.ts +246 -0
- package/dist/cjs/server/adapters/nextjs/types.js +2 -0
- package/dist/cjs/server/adapters/nextjs/with-ai-tool.d.ts +9 -0
- package/dist/cjs/server/adapters/nextjs/with-ai-tool.js +12 -0
- package/dist/cjs/server/core/followup-tool.d.ts +9 -0
- package/dist/cjs/server/core/followup-tool.js +82 -0
- package/dist/cjs/server/core/index.d.ts +139 -0
- package/dist/cjs/server/core/index.js +818 -0
- package/dist/cjs/server/core/intent-classifier.d.ts +94 -0
- package/dist/cjs/server/core/intent-classifier.js +324 -0
- package/dist/cjs/server/core/model-selector.d.ts +12 -0
- package/dist/cjs/server/core/model-selector.js +48 -0
- package/dist/cjs/server/core/module-router.d.ts +14 -0
- package/dist/cjs/server/core/module-router.js +110 -0
- package/dist/cjs/server/core/zod-compact.d.ts +18 -0
- package/dist/cjs/server/core/zod-compact.js +129 -0
- package/dist/cjs/server/index.d.ts +6 -0
- package/dist/cjs/server/index.js +28 -0
- package/dist/cjs/server/lancer/cache.d.ts +9 -0
- package/dist/cjs/server/lancer/cache.js +33 -0
- package/dist/cjs/server/lancer/client.d.ts +2 -0
- package/dist/cjs/server/lancer/client.js +279 -0
- package/dist/cjs/server/lancer/errors.d.ts +13 -0
- package/dist/cjs/server/lancer/errors.js +21 -0
- package/dist/cjs/server/lancer/index.d.ts +3 -0
- package/dist/cjs/server/lancer/index.js +7 -0
- package/dist/cjs/server/lancer/telemetry-buffer.d.ts +15 -0
- package/dist/cjs/server/lancer/telemetry-buffer.js +64 -0
- package/dist/cjs/server/lancer/types.d.ts +201 -0
- package/dist/cjs/server/lancer/types.js +5 -0
- package/dist/cjs/server/pii-shield/aegis-detector.d.ts +26 -0
- package/dist/cjs/server/pii-shield/aegis-detector.js +26 -0
- package/dist/cjs/server/pii-shield/create-pii-shield.d.ts +2 -0
- package/dist/cjs/server/pii-shield/create-pii-shield.js +191 -0
- package/dist/cjs/server/pii-shield/deep-walk.d.ts +1 -0
- package/dist/cjs/server/pii-shield/deep-walk.js +19 -0
- package/dist/cjs/server/pii-shield/fake-data.d.ts +5 -0
- package/dist/cjs/server/pii-shield/fake-data.js +170 -0
- package/dist/cjs/server/pii-shield/index.d.ts +4 -0
- package/dist/cjs/server/pii-shield/index.js +9 -0
- package/dist/cjs/server/pii-shield/leakage.d.ts +1 -0
- package/dist/cjs/server/pii-shield/leakage.js +15 -0
- package/dist/cjs/server/pii-shield/session-mapping.d.ts +12 -0
- package/dist/cjs/server/pii-shield/session-mapping.js +70 -0
- package/dist/cjs/server/pipeline.d.ts +26 -0
- package/dist/cjs/server/pipeline.js +127 -0
- package/dist/cjs/server/testing/approvals.d.ts +11 -0
- package/dist/cjs/server/testing/approvals.js +41 -0
- package/dist/cjs/server/testing/combination.d.ts +3 -0
- package/dist/cjs/server/testing/combination.js +83 -0
- package/dist/cjs/server/testing/create-test-suite.d.ts +29 -0
- package/dist/cjs/server/testing/create-test-suite.js +81 -0
- package/dist/cjs/server/testing/edge-cases.d.ts +8 -0
- package/dist/cjs/server/testing/edge-cases.js +277 -0
- package/dist/cjs/server/testing/guardrails.d.ts +14 -0
- package/dist/cjs/server/testing/guardrails.js +152 -0
- package/dist/cjs/server/testing/helpers.d.ts +14 -0
- package/dist/cjs/server/testing/helpers.js +119 -0
- package/dist/cjs/server/testing/index.d.ts +12 -0
- package/dist/cjs/server/testing/index.js +37 -0
- package/dist/cjs/server/testing/mock-executor.d.ts +8 -0
- package/dist/cjs/server/testing/mock-executor.js +40 -0
- package/dist/cjs/server/testing/regression.d.ts +7 -0
- package/dist/cjs/server/testing/regression.js +27 -0
- package/dist/cjs/server/testing/routing.d.ts +12 -0
- package/dist/cjs/server/testing/routing.js +63 -0
- package/dist/cjs/server/testing/schema-consistency.d.ts +6 -0
- package/dist/cjs/server/testing/schema-consistency.js +56 -0
- package/dist/cjs/server/testing/smoke.d.ts +11 -0
- package/dist/cjs/server/testing/smoke.js +64 -0
- package/dist/cjs/server/testing/types.d.ts +156 -0
- package/dist/cjs/server/testing/types.js +2 -0
- package/dist/cjs/types.d.ts +696 -0
- package/dist/cjs/types.js +91 -0
- package/dist/cli/commands/install-skills.d.ts +17 -0
- package/dist/cli/commands/install-skills.js +185 -0
- package/dist/cli/commands/install-skills.js.map +1 -0
- package/dist/cli/index.js +25 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/react/components/ai-trigger-button.js +4 -6
- package/dist/react/components/ai-trigger-button.js.map +1 -1
- package/dist/react/components/recording-bar.js +4 -6
- package/dist/react/components/recording-bar.js.map +1 -1
- package/dist/react/components/wavesurfer-loader.d.ts +5 -0
- package/dist/react/components/wavesurfer-loader.js +34 -0
- package/dist/react/components/wavesurfer-loader.js.map +1 -0
- package/dist/server/adapters/nestjs/chat/ai-chat.module.d.ts +1 -1
- package/dist/server/adapters/nestjs/chat/ai-chat.module.js +3 -2
- package/dist/server/adapters/nestjs/chat/ai-chat.module.js.map +1 -1
- package/dist/server/adapters/nestjs/chat/speech-stream.gateway.d.ts +1 -1
- package/dist/server/adapters/nestjs/chat/speech-stream.gateway.js +10 -8
- package/dist/server/adapters/nestjs/chat/speech-stream.gateway.js.map +1 -1
- package/dist/server/adapters/nestjs/chat/ws-loader.d.ts +5 -0
- package/dist/server/adapters/nestjs/chat/ws-loader.js +37 -0
- package/dist/server/adapters/nestjs/chat/ws-loader.js.map +1 -0
- package/openapi/package.json +5 -0
- package/package.json +59 -16
- package/react/langgraph/package.json +5 -0
- package/react/package.json +5 -0
- package/react/vercel/package.json +5 -0
- package/server/nestjs/package.json +5 -0
- package/server/nextjs/package.json +5 -0
- package/server/package.json +5 -0
- package/server/testing/package.json +5 -0
- package/skills/README.md +107 -0
- package/skills/building-glirastes-chat-ui/SKILL.md +378 -0
- package/skills/integrating-glirastes-nestjs/SKILL.md +346 -0
- package/skills/integrating-glirastes-nextjs/SKILL.md +312 -0
- package/skills/integrating-glirastes-nextjs-with-nestjs-backend/SKILL.md +359 -0
- package/skills/maintaining-glirastes-tools/SKILL.md +467 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,92 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.3.2] - 2026-04-29
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Documentation pass that makes the **CLI codegen step explicit as a
|
|
15
|
+
required part of the Next.js setup** for any non-trivial app. The
|
|
16
|
+
earlier framing implied codegen was only "for scaling up" — in
|
|
17
|
+
practice the manual `endpointToolsToRegistry([…])` import list breaks
|
|
18
|
+
down past a handful of tools, and codegen is the canonical wiring.
|
|
19
|
+
- README quickstart Step 4 now points readers at the codegen workflow
|
|
20
|
+
immediately after the demo manual-import example.
|
|
21
|
+
- The "Scaling up" section is renamed to **"Scaling up — required
|
|
22
|
+
codegen workflow for Next.js"** and explicitly states NestJS users
|
|
23
|
+
skip it (runtime DI scan handles aggregation).
|
|
24
|
+
- The `integrating-glirastes-nextjs` and `maintaining-glirastes-tools`
|
|
25
|
+
skills mirror the same framing so coding agents pick the codegen
|
|
26
|
+
path by default for non-trivial apps.
|
|
27
|
+
- Forward-looking note in README and skills: a `buildToolRegistry`
|
|
28
|
+
helper based on `import.meta.glob` / `require.context` is planned
|
|
29
|
+
for **0.4.0** and will let Next.js consumers skip the codegen step.
|
|
30
|
+
|
|
31
|
+
No code changes — patch-level docs release.
|
|
32
|
+
|
|
33
|
+
## [0.3.1] - 2026-04-28
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- Dual-bundle output (CJS + ESM). The package now ships a CommonJS build at
|
|
38
|
+
`dist/cjs/` alongside the ESM build at `dist/`, so legacy NestJS backends
|
|
39
|
+
on `module: commonjs` can consume `glirastes/server/nestjs` without an ESM
|
|
40
|
+
migration. The `exports` map uses conditional `import`/`require` branches
|
|
41
|
+
with their own typings.
|
|
42
|
+
- Legacy subpath shim directories at the package root (`server/`, `react/`,
|
|
43
|
+
`codegen/`, `openapi/`) so consumers on `moduleResolution: node` (without
|
|
44
|
+
`exports`-map support) still resolve subpaths.
|
|
45
|
+
- Pre-built agent skills under `skills/` (shipped in the npm tarball):
|
|
46
|
+
`integrating-glirastes-nextjs`, `integrating-glirastes-nestjs`,
|
|
47
|
+
`integrating-glirastes-nextjs-with-nestjs-backend`,
|
|
48
|
+
`maintaining-glirastes-tools`, `building-glirastes-chat-ui`. Drop into
|
|
49
|
+
`.claude/skills/` (or `.codex/skills/`) to give a coding agent
|
|
50
|
+
framework-specific guidance for integrating, maintaining, and customizing
|
|
51
|
+
the SDK.
|
|
52
|
+
- New CLI command `glirastes install-skills` — installs the bundled agent
|
|
53
|
+
skills into a target directory. Flags:
|
|
54
|
+
- default: `./.claude/skills` (project-local)
|
|
55
|
+
- `-g` / `--global`: `~/.claude/skills` (shared across all projects on the
|
|
56
|
+
machine; mutually exclusive with `--target`)
|
|
57
|
+
- `--target <dir>`: override the destination (accepts relative, absolute,
|
|
58
|
+
or `~/`-prefixed paths)
|
|
59
|
+
- `--stack nextjs|nestjs|nextjs+nestjs|all` (default `all`): filter
|
|
60
|
+
- `--symlink`: track the installed SDK version automatically
|
|
61
|
+
- `--force`: overwrite existing
|
|
62
|
+
- `--dry-run`: preview without writing
|
|
63
|
+
- Adapter-selection guidance in the README: when both a frontend and a
|
|
64
|
+
separate backend exist, put the chat route on the backend.
|
|
65
|
+
- Scaling-up section in the README explaining the `glirastes scaffold` →
|
|
66
|
+
`generate-tools` → registry-import codegen workflow.
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
|
|
70
|
+
- `@ai-sdk/react` and `react-markdown` moved from `dependencies` to optional
|
|
71
|
+
`peerDependencies`. Backend-only consumers no longer pull a phantom React
|
|
72
|
+
tree into `node_modules`. Frontend consumers must install them themselves
|
|
73
|
+
(the README install section is split per stack).
|
|
74
|
+
- `dependencies.zod` bumped to `^3.25.76` to match what `ai@6` and
|
|
75
|
+
`@ai-sdk/openai` require.
|
|
76
|
+
- `AiChatModule.attachWebSockets()` is now `async`. Consumers that enable
|
|
77
|
+
the speech-to-text feature must `await` the call.
|
|
78
|
+
|
|
79
|
+
### Fixed
|
|
80
|
+
|
|
81
|
+
- Optional peer `wavesurfer.js` is now truly optional. The voice
|
|
82
|
+
components load it via a runtime `Function('s', 'return import(s)')`
|
|
83
|
+
helper so browser-side bundlers (Webpack, Turbopack, Vite, esbuild)
|
|
84
|
+
don't try to resolve the specifier at build time when the package is
|
|
85
|
+
not installed. Note: requires `script-src 'unsafe-eval'` CSP — projects
|
|
86
|
+
with strict CSP should install `wavesurfer.js` unconditionally to
|
|
87
|
+
bypass the runtime trick. See `skills/building-glirastes-chat-ui` for
|
|
88
|
+
details.
|
|
89
|
+
- Optional peer `ws` is now truly optional. The NestJS speech-to-text
|
|
90
|
+
gateway uses a plain dynamic `import('ws')` inside `attachWebSockets`,
|
|
91
|
+
guarded by try/catch — backends that don't enable speech-to-text no
|
|
92
|
+
longer crash with `ERR_MODULE_NOT_FOUND` at startup. (Bundled NestJS
|
|
93
|
+
deployments must either install `ws` unconditionally or mark it as a
|
|
94
|
+
bundler external.)
|
|
95
|
+
|
|
10
96
|
## [0.3.0] - 2026-04-28
|
|
11
97
|
|
|
12
98
|
### Fixed
|
package/README.md
CHANGED
|
@@ -10,11 +10,13 @@
|
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
13
|
-
<a href="#quick-start"><strong>Quick Start</strong></a> ·
|
|
13
|
+
<a href="#quick-start-nextjs-or-nestjs"><strong>Quick Start</strong></a> ·
|
|
14
14
|
<a href="#core-concepts"><strong>Concepts</strong></a> ·
|
|
15
15
|
<a href="#examples"><strong>Examples</strong></a> ·
|
|
16
16
|
<a href="#advanced"><strong>Advanced</strong></a> ·
|
|
17
|
-
<a href="#
|
|
17
|
+
<a href="#scaling-up--required-codegen-workflow-for-nextjs"><strong>Scaling up</strong></a> ·
|
|
18
|
+
<a href="#cli"><strong>CLI</strong></a> ·
|
|
19
|
+
<a href="#agent-skills"><strong>Skills</strong></a>
|
|
18
20
|
</p>
|
|
19
21
|
|
|
20
22
|
<p align="center">
|
|
@@ -85,17 +87,42 @@ Building an AI feature means wiring together **tool definitions**, **API calls**
|
|
|
85
87
|
|
|
86
88
|
## Quick Start ([Next.js](https://nextjs.org/) or [NestJS](https://nestjs.com/))
|
|
87
89
|
|
|
90
|
+
### Which adapter should I use?
|
|
91
|
+
|
|
92
|
+
If you only have one server, the answer is "that one". If you have **both** a Next.js frontend *and* a separate backend (NestJS, Express, …), put the chat route on the **backend**:
|
|
93
|
+
|
|
94
|
+
| Setup | Use this adapter |
|
|
95
|
+
|---|---|
|
|
96
|
+
| Next.js full-stack (no separate backend) | `glirastes/server/nextjs` |
|
|
97
|
+
| Next.js frontend + NestJS backend | `glirastes/server/nestjs` ✅ |
|
|
98
|
+
| Pure NestJS (Swagger UI as client) | `glirastes/server/nestjs` |
|
|
99
|
+
| Express backend + any frontend | `glirastes/server` (manual wiring) |
|
|
100
|
+
|
|
101
|
+
**Why prefer the real backend over a Next.js Route Handler?**
|
|
102
|
+
|
|
103
|
+
- **Tools are annotated controllers.** Your existing endpoints become AI-callable in place — no second code path, no `defineEndpointTool` mirroring controller URLs.
|
|
104
|
+
- **One auth source.** Your JWT guard / tenant context already runs there. Don't re-validate tokens in a Next.js route just to forward them.
|
|
105
|
+
- **No extra HTTP hop.** Browser → backend → DB instead of Browser → Next.js → backend → DB on every tool call.
|
|
106
|
+
- **Tools can call services directly.** No HTTP membrane between the AI tool and your business logic.
|
|
107
|
+
- **One observability pipeline.** Logs, traces, rate limits where they already live.
|
|
108
|
+
|
|
109
|
+
The Next.js Route Handler is right when Next.js *is* your backend, when you're prototyping, or when every tool is an external API call anyway.
|
|
110
|
+
|
|
88
111
|
Pick your stack — both come up in the same four steps.
|
|
89
112
|
|
|
90
113
|
### 1. Install
|
|
91
114
|
|
|
92
115
|
```bash
|
|
116
|
+
# Backend only (NestJS / Next.js Route Handlers)
|
|
93
117
|
npm install glirastes
|
|
118
|
+
|
|
119
|
+
# Frontend / chat UI consumers — add the React UI peers
|
|
120
|
+
npm install glirastes @ai-sdk/react react-markdown
|
|
94
121
|
```
|
|
95
122
|
|
|
96
|
-
|
|
123
|
+
The Vercel AI SDK (`ai`) is bundled. `@ai-sdk/react` and `react-markdown` are declared as **optional peer dependencies** so backend-only consumers don't have a phantom React tree in their `node_modules`. Install them yourself when you use any `glirastes/react/*` subpath.
|
|
97
124
|
|
|
98
|
-
> **Requirements:** Node.js `>=20`. The React chat UI needs `react` and `react-dom` `^19` — Next.js apps already have these
|
|
125
|
+
> **Requirements:** Node.js `>=20`. The React chat UI needs `react` and `react-dom` `^19` — Next.js apps already have these.
|
|
99
126
|
>
|
|
100
127
|
> **Optional** — only if you want voice input with a live waveform:
|
|
101
128
|
> ```bash
|
|
@@ -219,11 +246,17 @@ const registry = endpointToolsToRegistry(scan.tools);
|
|
|
219
246
|
|
|
220
247
|
Done. AI chat is live, streaming, and your `list_tasks` tool is callable. Add more tools the same way — pick the style that matches your stack. See [NestJS with decorators](#nestjs-with-decorators) below for DTOs, `@AiParam`, and multi-controller scanning.
|
|
221
248
|
|
|
249
|
+
> **One more step for Next.js once you have more than a handful of tools.** The manual `endpointToolsToRegistry([listTasks, …])` import list above stops scaling around 5–10 tools. Today's required pattern: write each tool in a co-located `*.ai-tool.ts` file and run the CLI codegen as a `predev` / `prebuild` hook to aggregate them into a generated registry your chat route imports. See [Scaling up — required codegen workflow for Next.js](#scaling-up--required-codegen-workflow-for-nextjs) below for the full setup. **NestJS users skip this entirely** — the runtime decorator scan handles aggregation automatically.
|
|
250
|
+
>
|
|
251
|
+
> *Coming in 0.4.0:* a `buildToolRegistry` helper backed by `import.meta.glob` / `require.context` that drops the codegen step for Next.js too. Track at [chainmatics/glirastes#issues](https://github.com/chainmatics/glirastes/issues).
|
|
252
|
+
|
|
222
253
|
### Setup notes
|
|
223
254
|
|
|
224
|
-
####
|
|
255
|
+
#### tsconfig — modern is best, legacy still works
|
|
256
|
+
|
|
257
|
+
Glirastes ships **both** ESM (`dist/`) and CommonJS (`dist/cjs/`) with a conditional `exports` map, plus subpath shim directories at the package root for legacy resolvers. Both setups below are supported:
|
|
225
258
|
|
|
226
|
-
|
|
259
|
+
**Modern (recommended):**
|
|
227
260
|
|
|
228
261
|
```jsonc
|
|
229
262
|
{
|
|
@@ -238,9 +271,7 @@ Glirastes ships ESM with subpath `exports`. Your tsconfig must support that:
|
|
|
238
271
|
}
|
|
239
272
|
```
|
|
240
273
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
> **NestJS users on the default CommonJS template:** glirastes is published as ESM only. If your backend's `tsconfig` is `"module": "commonjs"`, you'll hit `TS1479: ECMAScript module cannot be imported with require`. Migrate the backend to `module: "node16"` / `"nodenext"` or follow https://github.com/chainmatics/glirastes/issues for dual-bundle progress.
|
|
274
|
+
**Legacy NestJS template (default `module: commonjs`):** works as-is — no tsconfig changes required. The shim directories under `glirastes/server/`, `glirastes/react/` etc. let the classic Node resolver find each subpath, and the CommonJS build under `dist/cjs/` provides the runtime artifacts.
|
|
244
275
|
|
|
245
276
|
#### Which subpath do I import from?
|
|
246
277
|
|
|
@@ -745,6 +776,69 @@ The voice button streams audio to your backend, which proxies it to a speech-to-
|
|
|
745
776
|
|
|
746
777
|
<br/>
|
|
747
778
|
|
|
779
|
+
## Scaling up — required codegen workflow for Next.js
|
|
780
|
+
|
|
781
|
+
Hand-importing every tool definition into your chat route doesn't scale past a handful. **In Glirastes 0.3.x the canonical pattern for Next.js consumers is to run the CLI codegen as a build hook** — it generates a registry from co-located `*.ai-tool.ts` files. The chat route imports the generated registry instead of maintaining a manual import list.
|
|
782
|
+
|
|
783
|
+
> NestJS users **skip this section entirely.** `AiChatModule.forRoot()` discovers `@AiTool`-decorated controllers at runtime via the NestJS `DiscoveryService` — no codegen step is ever needed.
|
|
784
|
+
>
|
|
785
|
+
> **Coming in 0.4.0:** a `buildToolRegistry` helper based on `import.meta.glob` / `require.context` will let Next.js consumers skip the codegen step too. Until then the steps below are required for any non-trivial Next.js app.
|
|
786
|
+
|
|
787
|
+
### 1. Bootstrap a tool from an existing route
|
|
788
|
+
|
|
789
|
+
```bash
|
|
790
|
+
npx glirastes scaffold --route src/app/api/tasks/route.ts
|
|
791
|
+
# --dry-run to preview, --force to overwrite
|
|
792
|
+
```
|
|
793
|
+
|
|
794
|
+
Produces `src/app/api/tasks/ai-tool.ts` with a starter `defineEndpointTool({ ... })` call — input schema derived from your route, TODO description, sensible defaults. Edit, save.
|
|
795
|
+
|
|
796
|
+
### 2. Wire the codegen into your scripts
|
|
797
|
+
|
|
798
|
+
```json
|
|
799
|
+
{
|
|
800
|
+
"scripts": {
|
|
801
|
+
"predev": "glirastes generate-tools --quiet",
|
|
802
|
+
"prebuild": "glirastes generate-tools --quiet",
|
|
803
|
+
"ai:scaffold": "glirastes scaffold",
|
|
804
|
+
"ai:coverage": "glirastes coverage",
|
|
805
|
+
"ai:coverage:ci": "glirastes coverage --ci",
|
|
806
|
+
"ai:validate": "glirastes validate-tools",
|
|
807
|
+
"ai:validate:ci": "glirastes validate-tools --ci",
|
|
808
|
+
"ai:test": "glirastes test"
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
```
|
|
812
|
+
|
|
813
|
+
`predev` / `prebuild` regenerate `src/generated/ai-tools/{endpoint,ui,modules,action-ids}.generated.ts` on every dev start and CI build — the generated registry becomes source-of-truth.
|
|
814
|
+
|
|
815
|
+
### 3. Import the registry in your chat route
|
|
816
|
+
|
|
817
|
+
```ts
|
|
818
|
+
// app/api/chat/route.ts (Next.js)
|
|
819
|
+
import { createAiChatHandler } from 'glirastes/server/nextjs';
|
|
820
|
+
import { endpointToolRegistry } from '@/generated/ai-tools/endpoint.generated';
|
|
821
|
+
import { uiToolRegistry } from '@/generated/ai-tools/ui.generated';
|
|
822
|
+
|
|
823
|
+
export const POST = createAiChatHandler({
|
|
824
|
+
tools: { ...endpointToolRegistry, ...uiToolRegistry },
|
|
825
|
+
model: openai('gpt-4o-mini'),
|
|
826
|
+
});
|
|
827
|
+
```
|
|
828
|
+
|
|
829
|
+
NestJS users skip this entire workflow: `scanNestJsControllers` reads your `@AiTool`-decorated controllers at runtime. No co-located files, no `*.generated.ts`. See [NestJS with decorators](#nestjs-with-decorators).
|
|
830
|
+
|
|
831
|
+
### 4. CI gates
|
|
832
|
+
|
|
833
|
+
```bash
|
|
834
|
+
npm run ai:coverage:ci # fails if any route lacks an ai-tool.ts (or has an orphan handler)
|
|
835
|
+
npm run ai:validate:ci # fails if a tool definition is malformed or path-mismatched
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
For the full deep-dive — UI patterns, intent modules, approval flow, naming conventions, deterministic testing — drop the [`maintaining-glirastes-tools`](./skills/maintaining-glirastes-tools/SKILL.md) skill into your agent. See [Agent skills](#agent-skills) below.
|
|
839
|
+
|
|
840
|
+
<br/>
|
|
841
|
+
|
|
748
842
|
## CLI
|
|
749
843
|
|
|
750
844
|
The SDK includes a `glirastes` CLI for scaffolding, code generation, and validation. Run any command with `npx glirastes <command>` or `bunx glirastes <command>`:
|
|
@@ -759,6 +853,7 @@ The SDK includes a `glirastes` CLI for scaffolding, code generation, and validat
|
|
|
759
853
|
| `generate-skills` | Export tools as Claude Code / Codex skill files |
|
|
760
854
|
| `generate-mcp-server` | Export tools as a standalone MCP server project |
|
|
761
855
|
| `generate-auto` | Auto-detect layout and run the right generator |
|
|
856
|
+
| `install-skills` | Install the bundled agent skills under `skills/` into your repo (e.g. `.claude/skills/`) |
|
|
762
857
|
| `validate` | Validate OpenAPI spec for `x-ai` correctness |
|
|
763
858
|
| `validate-tools` | Validate AI tool configuration |
|
|
764
859
|
| `coverage` | Report which API routes have AI tools and which don't |
|
|
@@ -769,6 +864,56 @@ The SDK includes a `glirastes` CLI for scaffolding, code generation, and validat
|
|
|
769
864
|
|
|
770
865
|
<br/>
|
|
771
866
|
|
|
867
|
+
## Agent skills
|
|
868
|
+
|
|
869
|
+
Glirastes ships pre-built [agent skills](https://docs.claude.com/en/docs/claude-code/skills) under [`skills/`](./skills) that teach a coding agent (Claude Code, Codex, Cursor, …) how to integrate, maintain, and customize the SDK. Drop them into your repo and the agent picks the right one automatically.
|
|
870
|
+
|
|
871
|
+
| Skill | Use when |
|
|
872
|
+
|---|---|
|
|
873
|
+
| [`integrating-glirastes-nextjs`](./skills/integrating-glirastes-nextjs/SKILL.md) | Adding chat to a Next.js app where Next.js is the backend |
|
|
874
|
+
| [`integrating-glirastes-nestjs`](./skills/integrating-glirastes-nestjs/SKILL.md) | Adding chat to a NestJS backend (with or without a frontend) |
|
|
875
|
+
| [`integrating-glirastes-nextjs-with-nestjs-backend`](./skills/integrating-glirastes-nextjs-with-nestjs-backend/SKILL.md) | Full-stack setup: Next.js frontend + separate NestJS backend |
|
|
876
|
+
| [`maintaining-glirastes-tools`](./skills/maintaining-glirastes-tools/SKILL.md) | Authoring `ai-tool.ts`, intent modules, codegen, all CLI commands |
|
|
877
|
+
| [`building-glirastes-chat-ui`](./skills/building-glirastes-chat-ui/SKILL.md) | Customizing the chat UI — theming, mentions, voice input, action bus |
|
|
878
|
+
|
|
879
|
+
### Install via the bundled CLI
|
|
880
|
+
|
|
881
|
+
After `npm install glirastes`, run the bundled installer. Two scopes:
|
|
882
|
+
|
|
883
|
+
- **Project-local** (default): writes to `./.claude/skills`. Each project gets the skills tied to its own installed `glirastes` version. Best for teams checking the directory into git.
|
|
884
|
+
- **Global** (`-g`): writes to `~/.claude/skills`. Shared across every project on the machine. Best for solo work across multiple Glirastes projects.
|
|
885
|
+
|
|
886
|
+
```bash
|
|
887
|
+
# Project-local — installs into ./.claude/skills (default)
|
|
888
|
+
npx glirastes install-skills
|
|
889
|
+
|
|
890
|
+
# Global — installs into ~/.claude/skills (shared across all projects on this machine)
|
|
891
|
+
npx glirastes install-skills -g
|
|
892
|
+
|
|
893
|
+
# Only the skills relevant to your stack
|
|
894
|
+
npx glirastes install-skills --stack nextjs # Next.js standalone
|
|
895
|
+
npx glirastes install-skills --stack nestjs # NestJS standalone
|
|
896
|
+
npx glirastes install-skills --stack nextjs+nestjs # full-stack monorepo
|
|
897
|
+
|
|
898
|
+
# Different agent? Pass --target
|
|
899
|
+
npx glirastes install-skills --target .codex/skills
|
|
900
|
+
|
|
901
|
+
# Auto-update with the SDK on every npm install
|
|
902
|
+
npx glirastes install-skills --symlink
|
|
903
|
+
|
|
904
|
+
# Preview without writing
|
|
905
|
+
npx glirastes install-skills --dry-run
|
|
906
|
+
|
|
907
|
+
# Overwrite previously installed skills
|
|
908
|
+
npx glirastes install-skills --force
|
|
909
|
+
```
|
|
910
|
+
|
|
911
|
+
`install-skills` reads the bundled skills under `node_modules/glirastes/skills/` and writes them to your repo. The `--symlink` mode keeps them auto-fresh — bumping `glirastes` and rerunning `npm install` updates the skill content without re-running the installer.
|
|
912
|
+
|
|
913
|
+
> **`generate-skills` (CLI command) ≠ these skills.** `generate-skills` exports *your tools* as skill files so external agents can call them. The skills under `skills/` instruct an agent on how to *integrate Glirastes itself*. Both ship in the npm package; they don't conflict.
|
|
914
|
+
|
|
915
|
+
<br/>
|
|
916
|
+
|
|
772
917
|
## License
|
|
773
918
|
|
|
774
919
|
Licensed under the [Apache License, Version 2.0](./LICENSE). You may use, modify, and distribute this SDK freely in commercial and non-commercial projects.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface AssetSyncOptions {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
glirasterUrl: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: 'skill' | 'mcp-server';
|
|
6
|
+
version: string;
|
|
7
|
+
toolCount: number;
|
|
8
|
+
config: Record<string, unknown>;
|
|
9
|
+
toolManifest: Record<string, unknown>;
|
|
10
|
+
/** Pre-generated files to upload alongside the manifest */
|
|
11
|
+
generatedFiles?: Array<{
|
|
12
|
+
path: string;
|
|
13
|
+
content: string;
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
16
|
+
export interface AssetSyncResult {
|
|
17
|
+
action: 'created' | 'updated';
|
|
18
|
+
assetId: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function syncAssetToGlirastes(options: AssetSyncOptions): Promise<AssetSyncResult>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.syncAssetToGlirastes = syncAssetToGlirastes;
|
|
4
|
+
async function syncAssetToGlirastes(options) {
|
|
5
|
+
const url = `${options.glirasterUrl}/v1/registry/assets/sync`;
|
|
6
|
+
const response = await fetch(url, {
|
|
7
|
+
method: 'POST',
|
|
8
|
+
headers: {
|
|
9
|
+
'Content-Type': 'application/json',
|
|
10
|
+
'x-api-key': options.apiKey,
|
|
11
|
+
},
|
|
12
|
+
body: JSON.stringify({
|
|
13
|
+
name: options.name,
|
|
14
|
+
type: options.type,
|
|
15
|
+
version: options.version,
|
|
16
|
+
toolCount: options.toolCount,
|
|
17
|
+
config: options.config,
|
|
18
|
+
toolManifest: options.toolManifest,
|
|
19
|
+
generatedFiles: options.generatedFiles,
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
22
|
+
if (!response.ok) {
|
|
23
|
+
const text = await response.text();
|
|
24
|
+
throw new Error(`Glirastes sync failed (${response.status}): ${text}`);
|
|
25
|
+
}
|
|
26
|
+
const data = await response.json();
|
|
27
|
+
return { action: data.action, assetId: data.asset.id };
|
|
28
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { GenerateOptions } from './types.js';
|
|
2
|
+
export interface CoverageReport {
|
|
3
|
+
endpointToolCount: number;
|
|
4
|
+
endpointFileCount: number;
|
|
5
|
+
uiToolCount: number;
|
|
6
|
+
uiFileCount: number;
|
|
7
|
+
actionIdCount: number;
|
|
8
|
+
routeTotal: number;
|
|
9
|
+
routeCovered: number;
|
|
10
|
+
routeIgnored: number;
|
|
11
|
+
routeCoveragePercent: number;
|
|
12
|
+
componentDirTotal: number;
|
|
13
|
+
componentDirCovered: number;
|
|
14
|
+
componentDirIgnored: number;
|
|
15
|
+
componentCoveragePercent: number;
|
|
16
|
+
sharedWithConfigs: Array<{
|
|
17
|
+
toolName: string;
|
|
18
|
+
primaryModule: string;
|
|
19
|
+
sharedWith: string[];
|
|
20
|
+
}>;
|
|
21
|
+
/** Handler coverage: how many actionIds have registered handlers in source */
|
|
22
|
+
handlerActionIds: string[];
|
|
23
|
+
handlerCoveredCount: number;
|
|
24
|
+
handlerTotalCount: number;
|
|
25
|
+
handlerCoveragePercent: number;
|
|
26
|
+
/** Orphan handlers: useAiClientAction calls without a matching UI tool actionId */
|
|
27
|
+
orphanHandlers: Array<{
|
|
28
|
+
actionId: string;
|
|
29
|
+
sourceFile: string;
|
|
30
|
+
}>;
|
|
31
|
+
/** Routes without a corresponding ai-tool.ts (relative paths) */
|
|
32
|
+
uncoveredRoutes: string[];
|
|
33
|
+
/** Component directories without ai-ui-tool.ts (relative paths) */
|
|
34
|
+
uncoveredComponents: string[];
|
|
35
|
+
/** Action IDs that have no registered useAiClientAction handler */
|
|
36
|
+
missingHandlers: Array<{
|
|
37
|
+
actionId: string;
|
|
38
|
+
toolName: string;
|
|
39
|
+
sourceFile: string;
|
|
40
|
+
}>;
|
|
41
|
+
/** NestJS controller coverage */
|
|
42
|
+
nestControllerTotal: number;
|
|
43
|
+
nestControllerCovered: number;
|
|
44
|
+
nestControllerIgnored: number;
|
|
45
|
+
nestControllerCoveragePercent: number;
|
|
46
|
+
/** Number of @AiTool-decorated methods found across NestJS controllers */
|
|
47
|
+
nestToolCount: number;
|
|
48
|
+
/** NestJS controllers found without @AiTool decorators (not ignored) */
|
|
49
|
+
uncoveredNestControllers: Array<{
|
|
50
|
+
controllerFile: string;
|
|
51
|
+
controllerName: string;
|
|
52
|
+
httpMethodCount: number;
|
|
53
|
+
}>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check AI tool coverage across the project.
|
|
57
|
+
* Reports on endpoint tools, UI tools, route coverage,
|
|
58
|
+
* component coverage, and sharedWith configurations.
|
|
59
|
+
*/
|
|
60
|
+
export declare function checkAiCoverage(options: GenerateOptions): Promise<CoverageReport>;
|
|
61
|
+
/**
|
|
62
|
+
* Format a coverage report as a rich, color-coded human-readable string.
|
|
63
|
+
*/
|
|
64
|
+
export declare function formatCoverageReport(report: CoverageReport, options?: {
|
|
65
|
+
quiet?: boolean;
|
|
66
|
+
}): string;
|