glirastes 0.3.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1377) hide show
  1. package/CHANGELOG.md +386 -1
  2. package/README.md +304 -853
  3. package/adapter/nextjs/package.json +5 -0
  4. package/ai-sdk/package.json +5 -0
  5. package/browser/package.json +5 -0
  6. package/contracts/package.json +5 -0
  7. package/dist/agent/git.d.ts +65 -0
  8. package/dist/agent/git.js +122 -0
  9. package/dist/agent/git.js.map +1 -0
  10. package/dist/agent/openrouter.d.ts +56 -0
  11. package/dist/agent/openrouter.js +74 -0
  12. package/dist/agent/openrouter.js.map +1 -0
  13. package/dist/agent/platform-jobs.d.ts +102 -0
  14. package/dist/agent/platform-jobs.js +122 -0
  15. package/dist/agent/platform-jobs.js.map +1 -0
  16. package/dist/agent/runner.d.ts +150 -0
  17. package/dist/agent/runner.js +250 -0
  18. package/dist/agent/runner.js.map +1 -0
  19. package/dist/agent/workspace.d.ts +65 -0
  20. package/dist/agent/workspace.js +264 -0
  21. package/dist/agent/workspace.js.map +1 -0
  22. package/dist/browser/client-actions.d.ts +26 -0
  23. package/dist/browser/client-actions.js +42 -0
  24. package/dist/browser/client-actions.js.map +1 -0
  25. package/dist/browser/index.d.ts +4 -0
  26. package/dist/browser/index.js +5 -0
  27. package/dist/browser/index.js.map +1 -0
  28. package/dist/browser/navigation.d.ts +32 -0
  29. package/dist/browser/navigation.js +79 -0
  30. package/dist/browser/navigation.js.map +1 -0
  31. package/dist/browser/query-filters.d.ts +30 -0
  32. package/dist/browser/query-filters.js +85 -0
  33. package/dist/browser/query-filters.js.map +1 -0
  34. package/dist/browser/ui-action-bus.d.ts +26 -0
  35. package/dist/browser/ui-action-bus.js +66 -0
  36. package/dist/browser/ui-action-bus.js.map +1 -0
  37. package/dist/cjs/browser/client-actions.d.ts +26 -0
  38. package/dist/cjs/browser/client-actions.js +45 -0
  39. package/dist/cjs/browser/index.d.ts +4 -0
  40. package/dist/cjs/browser/index.js +16 -0
  41. package/dist/cjs/browser/navigation.d.ts +32 -0
  42. package/dist/cjs/browser/navigation.js +84 -0
  43. package/dist/cjs/browser/query-filters.d.ts +30 -0
  44. package/dist/cjs/browser/query-filters.js +87 -0
  45. package/dist/cjs/browser/ui-action-bus.d.ts +26 -0
  46. package/dist/cjs/browser/ui-action-bus.js +70 -0
  47. package/dist/cjs/codegen/execution-inventory.d.ts +63 -0
  48. package/dist/cjs/codegen/execution-inventory.js +312 -0
  49. package/dist/cjs/codegen/index.d.ts +4 -13
  50. package/dist/cjs/codegen/index.js +13 -31
  51. package/dist/cjs/codegen/inventory-generation.d.ts +104 -0
  52. package/dist/cjs/codegen/inventory-generation.js +122 -0
  53. package/dist/cjs/codegen/next-source-generation.d.ts +17 -0
  54. package/dist/cjs/codegen/next-source-generation.js +51 -0
  55. package/dist/cjs/codegen/openapi-document.d.ts +53 -0
  56. package/dist/cjs/codegen/openapi-document.js +127 -0
  57. package/dist/cjs/codegen/route-exports.d.ts +13 -0
  58. package/dist/cjs/codegen/route-exports.js +122 -0
  59. package/dist/cjs/codegen/route-fingerprint.d.ts +2 -0
  60. package/dist/cjs/codegen/route-fingerprint.js +11 -0
  61. package/dist/cjs/codegen/route-scanner.d.ts +57 -0
  62. package/dist/cjs/codegen/route-scanner.js +239 -0
  63. package/dist/cjs/codegen/tools/canonical.d.ts +12 -0
  64. package/dist/cjs/codegen/tools/canonical.js +49 -0
  65. package/dist/cjs/codegen/tools/sources/nest-decorators.d.ts +27 -0
  66. package/dist/cjs/codegen/tools/sources/nest-decorators.js +73 -0
  67. package/dist/cjs/contracts/app-setup.d.ts +346 -0
  68. package/dist/cjs/contracts/app-setup.js +208 -0
  69. package/dist/cjs/contracts/chat-command.d.ts +65 -0
  70. package/dist/cjs/contracts/chat-command.js +128 -0
  71. package/dist/cjs/contracts/chat-interactions.d.ts +126 -0
  72. package/dist/cjs/contracts/chat-interactions.js +439 -0
  73. package/dist/cjs/contracts/clarification.d.ts +53 -0
  74. package/dist/cjs/contracts/clarification.js +91 -0
  75. package/dist/cjs/contracts/content-boundary.d.ts +3 -0
  76. package/dist/cjs/contracts/content-boundary.js +95 -0
  77. package/dist/cjs/contracts/events.d.ts +273 -0
  78. package/dist/cjs/contracts/events.js +229 -0
  79. package/dist/cjs/contracts/index.d.ts +18 -0
  80. package/dist/cjs/contracts/index.js +83 -0
  81. package/dist/cjs/contracts/plan.d.ts +20 -0
  82. package/dist/cjs/contracts/plan.js +38 -0
  83. package/dist/cjs/contracts/platform-connection.d.ts +44 -0
  84. package/dist/cjs/contracts/platform-connection.js +66 -0
  85. package/dist/cjs/contracts/platform-prompt-revision.d.ts +27 -0
  86. package/dist/cjs/contracts/platform-prompt-revision.js +46 -0
  87. package/dist/cjs/contracts/prompt-bundle.d.ts +46 -0
  88. package/dist/cjs/contracts/prompt-bundle.js +74 -0
  89. package/dist/cjs/contracts/revisions.d.ts +716 -0
  90. package/dist/cjs/contracts/revisions.js +301 -0
  91. package/dist/cjs/contracts/runtime.d.ts +55 -0
  92. package/dist/cjs/contracts/runtime.js +67 -0
  93. package/dist/cjs/contracts/semantic-change.d.ts +27 -0
  94. package/dist/cjs/contracts/semantic-change.js +103 -0
  95. package/dist/cjs/contracts/tool-exclude-pattern.d.ts +12 -0
  96. package/dist/cjs/contracts/tool-exclude-pattern.js +29 -0
  97. package/dist/cjs/contracts/tool-policy-entry.d.ts +107 -0
  98. package/dist/cjs/contracts/tool-policy-entry.js +42 -0
  99. package/dist/cjs/contracts/tool-policy.d.ts +198 -0
  100. package/dist/cjs/contracts/tool-policy.js +500 -0
  101. package/dist/cjs/contracts/url.d.ts +2 -0
  102. package/dist/cjs/contracts/url.js +10 -0
  103. package/dist/cjs/diagnostics/foundation-diagnostic.d.ts +34 -0
  104. package/dist/cjs/diagnostics/foundation-diagnostic.js +52 -0
  105. package/dist/cjs/diagnostics/index.d.ts +2 -0
  106. package/dist/cjs/diagnostics/index.js +7 -0
  107. package/dist/cjs/embed/chat-styles.generated.d.ts +1 -0
  108. package/dist/cjs/embed/chat-styles.generated.js +6 -0
  109. package/dist/cjs/embed/glirastes-chat-element.d.ts +67 -0
  110. package/dist/cjs/embed/glirastes-chat-element.js +282 -0
  111. package/dist/cjs/embed/index.d.ts +4 -0
  112. package/dist/cjs/embed/index.js +20 -0
  113. package/dist/cjs/embed/theme.d.ts +10 -0
  114. package/dist/cjs/embed/theme.js +45 -0
  115. package/dist/cjs/index.d.ts +1 -0
  116. package/dist/cjs/index.js +1 -0
  117. package/dist/cjs/react/assistant/assistant-layout.d.ts +55 -0
  118. package/dist/cjs/react/assistant/assistant-layout.js +107 -0
  119. package/dist/cjs/react/assistant/assistant-shell.d.ts +132 -0
  120. package/dist/cjs/react/assistant/assistant-shell.js +267 -0
  121. package/dist/cjs/react/assistant/assistant-shortcut-list.d.ts +24 -0
  122. package/dist/cjs/react/assistant/assistant-shortcut-list.js +35 -0
  123. package/dist/cjs/react/assistant/assistant-workspace.d.ts +31 -0
  124. package/dist/cjs/react/assistant/assistant-workspace.js +33 -0
  125. package/dist/cjs/react/completions/completion-search.d.ts +21 -0
  126. package/dist/cjs/react/completions/completion-search.js +111 -0
  127. package/dist/cjs/react/completions/ui-tool-command-provider.d.ts +15 -0
  128. package/dist/cjs/react/completions/ui-tool-command-provider.js +84 -0
  129. package/dist/cjs/react/components/activity-log.d.ts +17 -0
  130. package/dist/cjs/react/components/activity-log.js +70 -0
  131. package/dist/cjs/react/components/ai-chat-panel.js +13 -6
  132. package/dist/cjs/react/components/ai-trigger-button.d.ts +1 -1
  133. package/dist/cjs/react/components/ai-trigger-button.js +11 -66
  134. package/dist/cjs/react/components/chat-input.js +6 -4
  135. package/dist/cjs/react/components/chat-window-visibility.d.ts +3 -0
  136. package/dist/cjs/react/components/chat-window-visibility.js +7 -0
  137. package/dist/cjs/react/components/chat-window.d.ts +1 -1
  138. package/dist/cjs/react/components/chat-window.js +124 -57
  139. package/dist/cjs/react/components/clarification-card.d.ts +10 -0
  140. package/dist/cjs/react/components/clarification-card.js +35 -0
  141. package/dist/cjs/react/components/command-arguments-form.d.ts +10 -0
  142. package/dist/cjs/react/components/command-arguments-form.js +153 -0
  143. package/dist/cjs/react/components/confirm-dialog.js +1 -1
  144. package/dist/cjs/react/components/floating-chat-ui.d.ts +3 -3
  145. package/dist/cjs/react/components/floating-chat-ui.js +30 -4
  146. package/dist/cjs/react/components/mention-input.d.ts +5 -4
  147. package/dist/cjs/react/components/mention-input.js +64 -7
  148. package/dist/cjs/react/components/message-bubble.js +90 -14
  149. package/dist/cjs/react/components/plan-checklist.d.ts +14 -0
  150. package/dist/cjs/react/components/plan-checklist.js +20 -0
  151. package/dist/cjs/react/components/recording-bar.js +44 -58
  152. package/dist/cjs/react/components/rich-mention-input.js +197 -45
  153. package/dist/cjs/react/components/session-switcher.d.ts +3 -1
  154. package/dist/cjs/react/components/session-switcher.js +26 -11
  155. package/dist/cjs/react/components/status-icon.d.ts +8 -0
  156. package/dist/cjs/react/components/status-icon.js +11 -0
  157. package/dist/cjs/react/components/stream-waveform.d.ts +4 -0
  158. package/dist/cjs/react/components/stream-waveform.js +49 -0
  159. package/dist/cjs/react/components/voice-input-addon.d.ts +16 -1
  160. package/dist/cjs/react/components/voice-input-addon.js +255 -18
  161. package/dist/cjs/react/components/voice-input-button.js +1 -1
  162. package/dist/cjs/react/hooks/use-chat-shortcuts.d.ts +33 -0
  163. package/dist/cjs/react/hooks/use-chat-shortcuts.js +139 -0
  164. package/dist/cjs/react/hooks/use-deepgram-transcription.d.ts +4 -0
  165. package/dist/cjs/react/hooks/use-deepgram-transcription.js +31 -321
  166. package/dist/cjs/react/hooks/use-drag-resize-panel.d.ts +1 -0
  167. package/dist/cjs/react/hooks/use-drag-resize-panel.js +246 -121
  168. package/dist/cjs/react/hooks/use-floating-panel.d.ts +57 -0
  169. package/dist/cjs/react/hooks/use-floating-panel.js +217 -0
  170. package/dist/cjs/react/hooks/use-keyboard-shortcut.js +2 -1
  171. package/dist/cjs/react/hooks/use-push-to-talk-hotkey.d.ts +24 -0
  172. package/dist/cjs/react/hooks/use-push-to-talk-hotkey.js +116 -0
  173. package/dist/cjs/react/hooks/use-sidebar-resize.d.ts +19 -0
  174. package/dist/cjs/react/hooks/use-sidebar-resize.js +109 -0
  175. package/dist/cjs/react/index.d.ts +30 -1
  176. package/dist/cjs/react/index.js +91 -1
  177. package/dist/cjs/react/interactions/definitions.d.ts +67 -0
  178. package/dist/cjs/react/interactions/definitions.js +83 -0
  179. package/dist/cjs/react/interactions/registry.d.ts +74 -0
  180. package/dist/cjs/react/interactions/registry.js +250 -0
  181. package/dist/cjs/react/interactions/use-chat-interactions-data.d.ts +15 -0
  182. package/dist/cjs/react/interactions/use-chat-interactions-data.js +43 -0
  183. package/dist/cjs/react/locale-de.d.ts +3 -0
  184. package/dist/cjs/react/locale-de.js +66 -0
  185. package/dist/cjs/react/provider/ai-chat-provider.d.ts +1 -1
  186. package/dist/cjs/react/provider/ai-chat-provider.js +407 -106
  187. package/dist/cjs/react/provider/chat-context.d.ts +52 -1
  188. package/dist/cjs/react/stt/controller.d.ts +60 -0
  189. package/dist/cjs/react/stt/controller.js +268 -0
  190. package/dist/cjs/react/stt/deepgram.d.ts +30 -0
  191. package/dist/cjs/react/stt/deepgram.js +204 -0
  192. package/dist/cjs/react/stt/recorded.d.ts +29 -0
  193. package/dist/cjs/react/stt/recorded.js +115 -0
  194. package/dist/cjs/react/stt/segments.d.ts +18 -0
  195. package/dist/cjs/react/stt/segments.js +32 -0
  196. package/dist/cjs/react/stt/use-stt.d.ts +17 -0
  197. package/dist/cjs/react/stt/use-stt.js +41 -0
  198. package/dist/cjs/react/stt/waveform.d.ts +5 -0
  199. package/dist/cjs/react/stt/waveform.js +31 -0
  200. package/dist/cjs/react/styles.css +1529 -0
  201. package/dist/cjs/react/tool-renderers/registry.d.ts +31 -0
  202. package/dist/cjs/react/tool-renderers/registry.js +50 -0
  203. package/dist/cjs/react/tool-renderers/renderer-boundary.d.ts +18 -0
  204. package/dist/cjs/react/tool-renderers/renderer-boundary.js +15 -0
  205. package/dist/cjs/react/transports/vercel/vercel-ai-chat.d.ts +1 -1
  206. package/dist/cjs/react/transports/vercel/vercel-ai-chat.js +2 -2
  207. package/dist/cjs/react/transports/vercel.d.ts +6 -0
  208. package/dist/cjs/react/transports/vercel.js +12 -6
  209. package/dist/cjs/react/types.d.ts +264 -6
  210. package/dist/cjs/react/ui.d.ts +18 -17
  211. package/dist/cjs/react/ui.js +50 -45
  212. package/dist/cjs/react/unstyled.d.ts +7 -0
  213. package/dist/cjs/react/unstyled.js +10 -0
  214. package/dist/cjs/react/utils/activity.d.ts +16 -0
  215. package/dist/cjs/react/utils/activity.js +80 -0
  216. package/dist/cjs/react/utils/clarification.d.ts +31 -0
  217. package/dist/cjs/react/utils/clarification.js +104 -0
  218. package/dist/cjs/react/utils/create-approval-description.d.ts +6 -0
  219. package/dist/cjs/react/utils/create-approval-description.js +32 -3
  220. package/dist/cjs/react/utils/create-tool-result-handler.d.ts +1 -1
  221. package/dist/cjs/react/utils/create-tool-result-handler.js +1 -1
  222. package/dist/cjs/react/utils/entity-names.d.ts +6 -0
  223. package/dist/cjs/react/utils/entity-names.js +57 -0
  224. package/dist/cjs/react/utils/followup-suggestions.d.ts +11 -0
  225. package/dist/cjs/react/utils/followup-suggestions.js +39 -0
  226. package/dist/cjs/react/utils/local-session-store.d.ts +30 -0
  227. package/dist/cjs/react/utils/local-session-store.js +165 -0
  228. package/dist/cjs/react/utils/mention-markup.d.ts +44 -1
  229. package/dist/cjs/react/utils/mention-markup.js +144 -10
  230. package/dist/cjs/react/utils/tool-presentation.d.ts +23 -0
  231. package/dist/cjs/react/utils/tool-presentation.js +46 -0
  232. package/dist/cjs/react/utils/tool-result-config.d.ts +10 -0
  233. package/dist/cjs/react/utils/tool-result-config.js +14 -0
  234. package/dist/cjs/runtime/ai-sdk/engine.d.ts +66 -0
  235. package/dist/cjs/runtime/ai-sdk/engine.js +192 -0
  236. package/dist/cjs/runtime/ai-sdk/index.d.ts +1 -0
  237. package/dist/cjs/runtime/ai-sdk/index.js +5 -0
  238. package/dist/cjs/runtime/authorization.d.ts +16 -0
  239. package/dist/cjs/runtime/authorization.js +35 -0
  240. package/dist/cjs/runtime/budget.d.ts +39 -0
  241. package/dist/cjs/runtime/budget.js +100 -0
  242. package/dist/cjs/runtime/contract-bindings.d.ts +52 -0
  243. package/dist/cjs/runtime/contract-bindings.js +95 -0
  244. package/dist/cjs/runtime/engine.d.ts +52 -0
  245. package/dist/cjs/runtime/engine.js +2 -0
  246. package/dist/cjs/runtime/fingerprint.d.ts +6 -0
  247. package/dist/cjs/runtime/fingerprint.js +31 -0
  248. package/dist/cjs/runtime/glirastes.d.ts +112 -0
  249. package/dist/cjs/runtime/glirastes.js +287 -0
  250. package/dist/cjs/runtime/index.d.ts +23 -0
  251. package/dist/cjs/runtime/index.js +71 -0
  252. package/dist/cjs/runtime/json-schema.d.ts +13 -0
  253. package/dist/cjs/runtime/json-schema.js +46 -0
  254. package/dist/cjs/runtime/local-runtime-source.d.ts +76 -0
  255. package/dist/cjs/runtime/local-runtime-source.js +0 -0
  256. package/dist/cjs/runtime/local-signer.d.ts +17 -0
  257. package/dist/cjs/runtime/local-signer.js +34 -0
  258. package/dist/cjs/runtime/local-tool-bindings.d.ts +57 -0
  259. package/dist/cjs/runtime/local-tool-bindings.js +197 -0
  260. package/dist/cjs/runtime/managed-turn.d.ts +29 -0
  261. package/dist/cjs/runtime/managed-turn.js +99 -0
  262. package/dist/cjs/runtime/metrics/cost.d.ts +64 -0
  263. package/dist/cjs/runtime/metrics/cost.js +98 -0
  264. package/dist/cjs/runtime/metrics/sink.d.ts +56 -0
  265. package/dist/cjs/runtime/metrics/sink.js +217 -0
  266. package/dist/cjs/runtime/metrics/turn-recorder.d.ts +62 -0
  267. package/dist/cjs/runtime/metrics/turn-recorder.js +172 -0
  268. package/dist/cjs/runtime/offline-execution-lease.d.ts +27 -0
  269. package/dist/cjs/runtime/offline-execution-lease.js +49 -0
  270. package/dist/cjs/runtime/policy-overlay.d.ts +86 -0
  271. package/dist/cjs/runtime/policy-overlay.js +122 -0
  272. package/dist/cjs/runtime/postgres-store.d.ts +111 -0
  273. package/dist/cjs/runtime/postgres-store.js +368 -0
  274. package/dist/cjs/runtime/prompt-bundle-store.d.ts +58 -0
  275. package/dist/cjs/runtime/prompt-bundle-store.js +123 -0
  276. package/dist/cjs/runtime/runtime-mode.d.ts +23 -0
  277. package/dist/cjs/runtime/runtime-mode.js +46 -0
  278. package/dist/cjs/runtime/tool-discovery.d.ts +51 -0
  279. package/dist/cjs/runtime/tool-discovery.js +141 -0
  280. package/dist/cjs/runtime/tool-search.d.ts +31 -0
  281. package/dist/cjs/runtime/tool-search.js +149 -0
  282. package/dist/cjs/runtime/turn-snapshot.d.ts +44 -0
  283. package/dist/cjs/runtime/turn-snapshot.js +112 -0
  284. package/dist/cjs/server/adapters/nextjs/approval-binding.d.ts +334 -0
  285. package/dist/cjs/server/adapters/nextjs/approval-binding.js +724 -0
  286. package/dist/cjs/server/adapters/nextjs/chat-interactions-handler.d.ts +26 -0
  287. package/dist/cjs/server/adapters/nextjs/chat-interactions-handler.js +67 -0
  288. package/dist/cjs/server/adapters/nextjs/clarification-resume.d.ts +21 -0
  289. package/dist/cjs/server/adapters/nextjs/clarification-resume.js +112 -0
  290. package/dist/cjs/server/adapters/nextjs/context-helpers.d.ts +49 -8
  291. package/dist/cjs/server/adapters/nextjs/context-helpers.js +76 -21
  292. package/dist/cjs/server/adapters/nextjs/create-ai-chat-handler.d.ts +59 -1
  293. package/dist/cjs/server/adapters/nextjs/create-ai-chat-handler.js +648 -94
  294. package/dist/cjs/server/adapters/nextjs/direct-command.d.ts +75 -0
  295. package/dist/cjs/server/adapters/nextjs/direct-command.js +322 -0
  296. package/dist/cjs/server/adapters/nextjs/index.d.ts +10 -2
  297. package/dist/cjs/server/adapters/nextjs/index.js +24 -1
  298. package/dist/cjs/server/adapters/nextjs/prepare-model-messages.d.ts +2 -1
  299. package/dist/cjs/server/adapters/nextjs/prepare-model-messages.js +6 -14
  300. package/dist/cjs/server/adapters/nextjs/recording-transcription-handler.d.ts +31 -0
  301. package/dist/cjs/server/adapters/nextjs/recording-transcription-handler.js +58 -0
  302. package/dist/cjs/server/adapters/nextjs/request-guards.d.ts +41 -0
  303. package/dist/cjs/server/adapters/nextjs/request-guards.js +112 -0
  304. package/dist/cjs/server/adapters/nextjs/sanitize-model-messages.js +12 -6
  305. package/dist/cjs/server/adapters/nextjs/scope-pipeline-tools.d.ts +17 -0
  306. package/dist/cjs/server/adapters/nextjs/scope-pipeline-tools.js +28 -0
  307. package/dist/cjs/server/adapters/nextjs/tool-discovery.d.ts +39 -0
  308. package/dist/cjs/server/adapters/nextjs/tool-discovery.js +50 -0
  309. package/dist/cjs/server/adapters/nextjs/tool-presentation.d.ts +26 -0
  310. package/dist/cjs/server/adapters/nextjs/tool-presentation.js +21 -0
  311. package/dist/cjs/server/adapters/nextjs/types.d.ts +229 -13
  312. package/dist/cjs/server/adapters/nextjs/with-ai-tool.d.ts +2 -2
  313. package/dist/cjs/server/core/adaptive-fast-path.d.ts +3 -0
  314. package/dist/cjs/server/core/adaptive-fast-path.js +188 -0
  315. package/dist/cjs/server/core/clarification-tool.d.ts +29 -0
  316. package/dist/cjs/server/core/clarification-tool.js +64 -0
  317. package/dist/cjs/server/core/generated-ui-tool.d.ts +31 -0
  318. package/dist/cjs/server/core/generated-ui-tool.js +89 -0
  319. package/dist/cjs/server/core/index.d.ts +49 -8
  320. package/dist/cjs/server/core/index.js +208 -17
  321. package/dist/cjs/server/core/local-guardrails.d.ts +6 -0
  322. package/dist/cjs/server/core/local-guardrails.js +70 -0
  323. package/dist/cjs/server/core/module-router.d.ts +3 -1
  324. package/dist/cjs/server/core/module-router.js +22 -2
  325. package/dist/cjs/server/core/plan-tool.d.ts +23 -0
  326. package/dist/cjs/server/core/plan-tool.js +35 -0
  327. package/dist/cjs/server/core/zod-compact.d.ts +3 -3
  328. package/dist/cjs/server/core/zod-compact.js +126 -54
  329. package/dist/cjs/server/index.d.ts +2 -4
  330. package/dist/cjs/server/index.js +4 -5
  331. package/dist/cjs/server/local-pipeline.d.ts +14 -0
  332. package/dist/cjs/server/local-pipeline.js +154 -0
  333. package/dist/cjs/server/pii-shield/index.d.ts +1 -0
  334. package/dist/cjs/server/pii-shield/index.js +3 -1
  335. package/dist/cjs/server/pii-shield/regex-detector.d.ts +13 -0
  336. package/dist/cjs/server/pii-shield/regex-detector.js +111 -0
  337. package/dist/cjs/server/testing/edge-cases.js +52 -101
  338. package/dist/cjs/server/testing/guardrails.js +2 -66
  339. package/dist/cjs/server/testing/helpers.js +1 -62
  340. package/dist/cjs/server/testing/index.d.ts +1 -0
  341. package/dist/cjs/server/testing/index.js +3 -1
  342. package/dist/cjs/server/testing/registry-parity.d.ts +18 -0
  343. package/dist/cjs/server/testing/registry-parity.js +40 -0
  344. package/dist/cjs/server/testing/schema-consistency.js +5 -26
  345. package/dist/cjs/server/testing/smoke.d.ts +2 -1
  346. package/dist/cjs/server/testing/smoke.js +7 -3
  347. package/dist/cjs/server/testing/types.d.ts +1 -1
  348. package/dist/cjs/server/testing/zod-introspect.d.ts +38 -0
  349. package/dist/cjs/server/testing/zod-introspect.js +297 -0
  350. package/dist/cjs/stt/index.d.ts +5 -0
  351. package/dist/cjs/stt/index.js +16 -0
  352. package/dist/cjs/sync/app-setup-client.d.ts +46 -0
  353. package/dist/cjs/sync/app-setup-client.js +140 -0
  354. package/dist/cjs/sync/capability-report.d.ts +41 -0
  355. package/dist/cjs/sync/capability-report.js +52 -0
  356. package/dist/cjs/sync/connection-lookup.d.ts +19 -0
  357. package/dist/cjs/sync/connection-lookup.js +58 -0
  358. package/dist/cjs/sync/control-plane-client.d.ts +69 -0
  359. package/dist/cjs/sync/control-plane-client.js +186 -0
  360. package/dist/cjs/sync/deployment-selector.d.ts +9 -0
  361. package/dist/cjs/sync/deployment-selector.js +29 -0
  362. package/dist/cjs/sync/fetch-sse-push.d.ts +6 -0
  363. package/dist/cjs/sync/fetch-sse-push.js +45 -0
  364. package/dist/cjs/sync/index.d.ts +26 -0
  365. package/dist/cjs/sync/index.js +43 -0
  366. package/dist/cjs/sync/jwks-provider.d.ts +14 -0
  367. package/dist/cjs/sync/jwks-provider.js +56 -0
  368. package/dist/cjs/sync/local-deployment-validator.d.ts +30 -0
  369. package/dist/cjs/sync/local-deployment-validator.js +62 -0
  370. package/dist/cjs/sync/managed-sync.d.ts +40 -0
  371. package/dist/cjs/sync/managed-sync.js +96 -0
  372. package/dist/cjs/sync/materialize-deployment.d.ts +7 -0
  373. package/dist/cjs/sync/materialize-deployment.js +65 -0
  374. package/dist/cjs/sync/runtime-connect-client.d.ts +23 -0
  375. package/dist/cjs/sync/runtime-connect-client.js +185 -0
  376. package/dist/cjs/sync/runtime-setup-client.d.ts +62 -0
  377. package/dist/cjs/sync/runtime-setup-client.js +157 -0
  378. package/dist/cjs/sync/signature-verifier.d.ts +39 -0
  379. package/dist/cjs/sync/signature-verifier.js +102 -0
  380. package/dist/cjs/sync/state-store.d.ts +24 -0
  381. package/dist/cjs/sync/state-store.js +51 -0
  382. package/dist/cjs/sync/sync-manager.d.ts +27 -0
  383. package/dist/cjs/sync/sync-manager.js +173 -0
  384. package/dist/cjs/types.d.ts +68 -16
  385. package/dist/cjs/types.js +31 -3
  386. package/dist/cli/bin.js +34 -23
  387. package/dist/cli/bin.js.map +1 -1
  388. package/dist/cli/commands/agent-setup.d.ts +27 -0
  389. package/dist/cli/commands/agent-setup.js +149 -0
  390. package/dist/cli/commands/agent-setup.js.map +1 -0
  391. package/dist/cli/commands/apply-setup-plan.d.ts +21 -0
  392. package/dist/cli/commands/apply-setup-plan.js +100 -0
  393. package/dist/cli/commands/apply-setup-plan.js.map +1 -0
  394. package/dist/cli/commands/atomic-artifact-write.d.ts +19 -0
  395. package/dist/cli/commands/atomic-artifact-write.js +106 -0
  396. package/dist/cli/commands/atomic-artifact-write.js.map +1 -0
  397. package/dist/cli/commands/ci-workflow.d.ts +48 -0
  398. package/dist/cli/commands/ci-workflow.js +209 -0
  399. package/dist/cli/commands/ci-workflow.js.map +1 -0
  400. package/dist/cli/commands/connect.d.ts +47 -0
  401. package/dist/cli/commands/connect.js +216 -0
  402. package/dist/cli/commands/connect.js.map +1 -0
  403. package/dist/cli/commands/connection-descriptor.d.ts +4 -0
  404. package/dist/cli/commands/connection-descriptor.js +47 -0
  405. package/dist/cli/commands/connection-descriptor.js.map +1 -0
  406. package/dist/cli/commands/connection-environment.d.ts +25 -0
  407. package/dist/cli/commands/connection-environment.js +151 -0
  408. package/dist/cli/commands/connection-environment.js.map +1 -0
  409. package/dist/cli/commands/current-setup-manifests.d.ts +7 -0
  410. package/dist/cli/commands/current-setup-manifests.js +16 -0
  411. package/dist/cli/commands/current-setup-manifests.js.map +1 -0
  412. package/dist/cli/commands/doctor-presentation.d.ts +5 -0
  413. package/dist/cli/commands/doctor-presentation.js +86 -0
  414. package/dist/cli/commands/doctor-presentation.js.map +1 -0
  415. package/dist/cli/commands/doctor.d.ts +27 -0
  416. package/dist/cli/commands/doctor.js +220 -0
  417. package/dist/cli/commands/doctor.js.map +1 -0
  418. package/dist/cli/commands/init-scaffold.d.ts +25 -0
  419. package/dist/cli/commands/init-scaffold.js +214 -0
  420. package/dist/cli/commands/init-scaffold.js.map +1 -0
  421. package/dist/cli/commands/install-skills.d.ts +26 -4
  422. package/dist/cli/commands/install-skills.js +165 -80
  423. package/dist/cli/commands/install-skills.js.map +1 -1
  424. package/dist/cli/commands/installed-skills-manifest.d.ts +87 -0
  425. package/dist/cli/commands/installed-skills-manifest.js +124 -0
  426. package/dist/cli/commands/installed-skills-manifest.js.map +1 -0
  427. package/dist/cli/commands/installer-parts.d.ts +31 -0
  428. package/dist/cli/commands/installer-parts.js +94 -0
  429. package/dist/cli/commands/installer-parts.js.map +1 -0
  430. package/dist/cli/commands/project-inspection.d.ts +35 -0
  431. package/dist/cli/commands/project-inspection.js +199 -0
  432. package/dist/cli/commands/project-inspection.js.map +1 -0
  433. package/dist/cli/commands/setup-plan.d.ts +65 -0
  434. package/dist/cli/commands/setup-plan.js +234 -0
  435. package/dist/cli/commands/setup-plan.js.map +1 -0
  436. package/dist/cli/commands/setup-profile.d.ts +28 -0
  437. package/dist/cli/commands/setup-profile.js +152 -0
  438. package/dist/cli/commands/setup-profile.js.map +1 -0
  439. package/dist/cli/commands/setup-wizard.d.ts +66 -0
  440. package/dist/cli/commands/setup-wizard.js +241 -0
  441. package/dist/cli/commands/setup-wizard.js.map +1 -0
  442. package/dist/cli/commands/sync.d.ts +58 -0
  443. package/dist/cli/commands/sync.js +233 -0
  444. package/dist/cli/commands/sync.js.map +1 -0
  445. package/dist/cli/commands/tools/args.d.ts +14 -0
  446. package/dist/cli/commands/tools/args.js +33 -0
  447. package/dist/cli/commands/tools/args.js.map +1 -0
  448. package/dist/cli/commands/tools/check.d.ts +7 -0
  449. package/dist/cli/commands/tools/check.js +35 -0
  450. package/dist/cli/commands/tools/check.js.map +1 -0
  451. package/dist/cli/commands/tools/describe.d.ts +12 -0
  452. package/dist/cli/commands/tools/describe.js +43 -0
  453. package/dist/cli/commands/tools/describe.js.map +1 -0
  454. package/dist/cli/commands/tools/enrich.d.ts +50 -0
  455. package/dist/cli/commands/tools/enrich.js +597 -0
  456. package/dist/cli/commands/tools/enrich.js.map +1 -0
  457. package/dist/cli/commands/tools/eval.d.ts +13 -0
  458. package/dist/cli/commands/tools/eval.js +49 -0
  459. package/dist/cli/commands/tools/eval.js.map +1 -0
  460. package/dist/cli/commands/tools/format.d.ts +42 -0
  461. package/dist/cli/commands/tools/format.js +155 -0
  462. package/dist/cli/commands/tools/format.js.map +1 -0
  463. package/dist/cli/commands/tools/index.d.ts +26 -0
  464. package/dist/cli/commands/tools/index.js +107 -0
  465. package/dist/cli/commands/tools/index.js.map +1 -0
  466. package/dist/cli/commands/tools/policy.d.ts +11 -0
  467. package/dist/cli/commands/tools/policy.js +355 -0
  468. package/dist/cli/commands/tools/policy.js.map +1 -0
  469. package/dist/cli/commands/tools/refresh.d.ts +6 -0
  470. package/dist/cli/commands/tools/refresh.js +87 -0
  471. package/dist/cli/commands/tools/refresh.js.map +1 -0
  472. package/dist/cli/commands/tools/resolve.d.ts +10 -0
  473. package/dist/cli/commands/tools/resolve.js +19 -0
  474. package/dist/cli/commands/tools/resolve.js.map +1 -0
  475. package/dist/cli/commands/tools/status.d.ts +11 -0
  476. package/dist/cli/commands/tools/status.js +76 -0
  477. package/dist/cli/commands/tools/status.js.map +1 -0
  478. package/dist/cli/commands/tools/verify.d.ts +13 -0
  479. package/dist/cli/commands/tools/verify.js +168 -0
  480. package/dist/cli/commands/tools/verify.js.map +1 -0
  481. package/dist/cli/commands/tools/watch.d.ts +27 -0
  482. package/dist/cli/commands/tools/watch.js +148 -0
  483. package/dist/cli/commands/tools/watch.js.map +1 -0
  484. package/dist/cli/commands/validate-build.d.ts +88 -0
  485. package/dist/cli/commands/validate-build.js +213 -0
  486. package/dist/cli/commands/validate-build.js.map +1 -0
  487. package/dist/cli/commands/workspace-sources.d.ts +27 -0
  488. package/dist/cli/commands/workspace-sources.js +159 -0
  489. package/dist/cli/commands/workspace-sources.js.map +1 -0
  490. package/dist/cli/environment-loading.d.ts +6 -0
  491. package/dist/cli/environment-loading.js +18 -0
  492. package/dist/cli/environment-loading.js.map +1 -0
  493. package/dist/cli/index.d.ts +14 -1
  494. package/dist/cli/index.js +558 -574
  495. package/dist/cli/index.js.map +1 -1
  496. package/dist/codegen/execution-inventory.d.ts +63 -0
  497. package/dist/codegen/execution-inventory.js +306 -0
  498. package/dist/codegen/execution-inventory.js.map +1 -0
  499. package/dist/codegen/index.d.ts +4 -13
  500. package/dist/codegen/index.js +4 -12
  501. package/dist/codegen/index.js.map +1 -1
  502. package/dist/codegen/inventory-generation.d.ts +104 -0
  503. package/dist/codegen/inventory-generation.js +119 -0
  504. package/dist/codegen/inventory-generation.js.map +1 -0
  505. package/dist/codegen/next-source-generation.d.ts +17 -0
  506. package/dist/codegen/next-source-generation.js +49 -0
  507. package/dist/codegen/next-source-generation.js.map +1 -0
  508. package/dist/codegen/openapi-document.d.ts +53 -0
  509. package/dist/codegen/openapi-document.js +120 -0
  510. package/dist/codegen/openapi-document.js.map +1 -0
  511. package/dist/codegen/route-exports.d.ts +13 -0
  512. package/dist/codegen/route-exports.js +117 -0
  513. package/dist/codegen/route-exports.js.map +1 -0
  514. package/dist/codegen/route-fingerprint.d.ts +2 -0
  515. package/dist/codegen/route-fingerprint.js +9 -0
  516. package/dist/codegen/route-fingerprint.js.map +1 -0
  517. package/dist/codegen/route-scanner.d.ts +57 -0
  518. package/dist/codegen/route-scanner.js +233 -0
  519. package/dist/codegen/route-scanner.js.map +1 -0
  520. package/dist/codegen/tools/agentic.d.ts +31 -0
  521. package/dist/codegen/tools/agentic.js +110 -0
  522. package/dist/codegen/tools/agentic.js.map +1 -0
  523. package/dist/codegen/tools/artifact.d.ts +139 -0
  524. package/dist/codegen/tools/artifact.js +199 -0
  525. package/dist/codegen/tools/artifact.js.map +1 -0
  526. package/dist/codegen/tools/canonical.d.ts +12 -0
  527. package/dist/codegen/tools/canonical.js +41 -0
  528. package/dist/codegen/tools/canonical.js.map +1 -0
  529. package/dist/codegen/tools/chat-interactions.d.ts +27 -0
  530. package/dist/codegen/tools/chat-interactions.js +377 -0
  531. package/dist/codegen/tools/chat-interactions.js.map +1 -0
  532. package/dist/codegen/tools/config.d.ts +116 -0
  533. package/dist/codegen/tools/config.js +172 -0
  534. package/dist/codegen/tools/config.js.map +1 -0
  535. package/dist/codegen/tools/contract-tiers.d.ts +64 -0
  536. package/dist/codegen/tools/contract-tiers.js +518 -0
  537. package/dist/codegen/tools/contract-tiers.js.map +1 -0
  538. package/dist/codegen/tools/emit-module.d.ts +13 -0
  539. package/dist/codegen/tools/emit-module.js +182 -0
  540. package/dist/codegen/tools/emit-module.js.map +1 -0
  541. package/dist/codegen/tools/evidence.d.ts +13 -0
  542. package/dist/codegen/tools/evidence.js +138 -0
  543. package/dist/codegen/tools/evidence.js.map +1 -0
  544. package/dist/codegen/tools/exclusions.d.ts +30 -0
  545. package/dist/codegen/tools/exclusions.js +95 -0
  546. package/dist/codegen/tools/exclusions.js.map +1 -0
  547. package/dist/codegen/tools/files.d.ts +195 -0
  548. package/dist/codegen/tools/files.js +119 -0
  549. package/dist/codegen/tools/files.js.map +1 -0
  550. package/dist/codegen/tools/findings.d.ts +7 -0
  551. package/dist/codegen/tools/findings.js +106 -0
  552. package/dist/codegen/tools/findings.js.map +1 -0
  553. package/dist/codegen/tools/handler-analysis.d.ts +49 -0
  554. package/dist/codegen/tools/handler-analysis.js +375 -0
  555. package/dist/codegen/tools/handler-analysis.js.map +1 -0
  556. package/dist/codegen/tools/handler-locator.d.ts +21 -0
  557. package/dist/codegen/tools/handler-locator.js +152 -0
  558. package/dist/codegen/tools/handler-locator.js.map +1 -0
  559. package/dist/codegen/tools/identity.d.ts +18 -0
  560. package/dist/codegen/tools/identity.js +100 -0
  561. package/dist/codegen/tools/identity.js.map +1 -0
  562. package/dist/codegen/tools/input-roles.d.ts +32 -0
  563. package/dist/codegen/tools/input-roles.js +283 -0
  564. package/dist/codegen/tools/input-roles.js.map +1 -0
  565. package/dist/codegen/tools/inputs.d.ts +33 -0
  566. package/dist/codegen/tools/inputs.js +101 -0
  567. package/dist/codegen/tools/inputs.js.map +1 -0
  568. package/dist/codegen/tools/interface-digest.d.ts +14 -0
  569. package/dist/codegen/tools/interface-digest.js +24 -0
  570. package/dist/codegen/tools/interface-digest.js.map +1 -0
  571. package/dist/codegen/tools/mcp-names.d.ts +23 -0
  572. package/dist/codegen/tools/mcp-names.js +59 -0
  573. package/dist/codegen/tools/mcp-names.js.map +1 -0
  574. package/dist/codegen/tools/mode.d.ts +7 -0
  575. package/dist/codegen/tools/mode.js +27 -0
  576. package/dist/codegen/tools/mode.js.map +1 -0
  577. package/dist/codegen/tools/output-inference.d.ts +6 -0
  578. package/dist/codegen/tools/output-inference.js +99 -0
  579. package/dist/codegen/tools/output-inference.js.map +1 -0
  580. package/dist/codegen/tools/pipeline.d.ts +85 -0
  581. package/dist/codegen/tools/pipeline.js +733 -0
  582. package/dist/codegen/tools/pipeline.js.map +1 -0
  583. package/dist/codegen/tools/probe-child.mjs +155 -0
  584. package/dist/codegen/tools/probe-loader.mjs +105 -0
  585. package/dist/codegen/tools/program.d.ts +16 -0
  586. package/dist/codegen/tools/program.js +80 -0
  587. package/dist/codegen/tools/program.js.map +1 -0
  588. package/dist/codegen/tools/prose.d.ts +42 -0
  589. package/dist/codegen/tools/prose.js +211 -0
  590. package/dist/codegen/tools/prose.js.map +1 -0
  591. package/dist/codegen/tools/resolutions.d.ts +117 -0
  592. package/dist/codegen/tools/resolutions.js +195 -0
  593. package/dist/codegen/tools/resolutions.js.map +1 -0
  594. package/dist/codegen/tools/routing-eval.d.ts +50 -0
  595. package/dist/codegen/tools/routing-eval.js +81 -0
  596. package/dist/codegen/tools/routing-eval.js.map +1 -0
  597. package/dist/codegen/tools/schema-probe.d.ts +62 -0
  598. package/dist/codegen/tools/schema-probe.js +209 -0
  599. package/dist/codegen/tools/schema-probe.js.map +1 -0
  600. package/dist/codegen/tools/semantics.d.ts +134 -0
  601. package/dist/codegen/tools/semantics.js +206 -0
  602. package/dist/codegen/tools/semantics.js.map +1 -0
  603. package/dist/codegen/tools/sources/app-files.d.ts +35 -0
  604. package/dist/codegen/tools/sources/app-files.js +109 -0
  605. package/dist/codegen/tools/sources/app-files.js.map +1 -0
  606. package/dist/codegen/tools/sources/fastapi-routes.py +177 -0
  607. package/dist/codegen/tools/sources/nest-decorators.d.ts +27 -0
  608. package/dist/codegen/tools/sources/nest-decorators.js +65 -0
  609. package/dist/codegen/tools/sources/nest-decorators.js.map +1 -0
  610. package/dist/codegen/tools/sources/nest-endpoints.d.ts +10 -0
  611. package/dist/codegen/tools/sources/nest-endpoints.js +522 -0
  612. package/dist/codegen/tools/sources/nest-endpoints.js.map +1 -0
  613. package/dist/codegen/tools/sources/next-endpoints.d.ts +5 -0
  614. package/dist/codegen/tools/sources/next-endpoints.js +389 -0
  615. package/dist/codegen/tools/sources/next-endpoints.js.map +1 -0
  616. package/dist/codegen/tools/sources/next-pages.d.ts +18 -0
  617. package/dist/codegen/tools/sources/next-pages.js +88 -0
  618. package/dist/codegen/tools/sources/next-pages.js.map +1 -0
  619. package/dist/codegen/tools/sources/openapi-endpoints.d.ts +17 -0
  620. package/dist/codegen/tools/sources/openapi-endpoints.js +395 -0
  621. package/dist/codegen/tools/sources/openapi-endpoints.js.map +1 -0
  622. package/dist/codegen/tools/sources/page-tree.d.ts +49 -0
  623. package/dist/codegen/tools/sources/page-tree.js +152 -0
  624. package/dist/codegen/tools/sources/page-tree.js.map +1 -0
  625. package/dist/codegen/tools/sources/react-actions.d.ts +12 -0
  626. package/dist/codegen/tools/sources/react-actions.js +341 -0
  627. package/dist/codegen/tools/sources/react-actions.js.map +1 -0
  628. package/dist/codegen/tools/sources/route-config.d.ts +49 -0
  629. package/dist/codegen/tools/sources/route-config.js +427 -0
  630. package/dist/codegen/tools/sources/route-config.js.map +1 -0
  631. package/dist/codegen/tools/sources/ui-controls.d.ts +41 -0
  632. package/dist/codegen/tools/sources/ui-controls.js +360 -0
  633. package/dist/codegen/tools/sources/ui-controls.js.map +1 -0
  634. package/dist/codegen/tools/sources/ui-tools.d.ts +79 -0
  635. package/dist/codegen/tools/sources/ui-tools.js +207 -0
  636. package/dist/codegen/tools/sources/ui-tools.js.map +1 -0
  637. package/dist/codegen/tools/sources/url-filters.d.ts +41 -0
  638. package/dist/codegen/tools/sources/url-filters.js +813 -0
  639. package/dist/codegen/tools/sources/url-filters.js.map +1 -0
  640. package/dist/codegen/tools/sources/vue-sfc.d.ts +22 -0
  641. package/dist/codegen/tools/sources/vue-sfc.js +65 -0
  642. package/dist/codegen/tools/sources/vue-sfc.js.map +1 -0
  643. package/dist/codegen/tools/state.d.ts +37 -0
  644. package/dist/codegen/tools/state.js +249 -0
  645. package/dist/codegen/tools/state.js.map +1 -0
  646. package/dist/codegen/tools/types.d.ts +137 -0
  647. package/dist/codegen/tools/types.js +2 -0
  648. package/dist/codegen/tools/types.js.map +1 -0
  649. package/dist/codegen/tools/worklist.d.ts +157 -0
  650. package/dist/codegen/tools/worklist.js +406 -0
  651. package/dist/codegen/tools/worklist.js.map +1 -0
  652. package/dist/contracts/app-setup.d.ts +346 -0
  653. package/dist/contracts/app-setup.js +205 -0
  654. package/dist/contracts/app-setup.js.map +1 -0
  655. package/dist/contracts/chat-command.d.ts +65 -0
  656. package/dist/contracts/chat-command.js +121 -0
  657. package/dist/contracts/chat-command.js.map +1 -0
  658. package/dist/contracts/chat-interactions.d.ts +126 -0
  659. package/dist/contracts/chat-interactions.js +431 -0
  660. package/dist/contracts/chat-interactions.js.map +1 -0
  661. package/dist/contracts/clarification.d.ts +53 -0
  662. package/dist/contracts/clarification.js +86 -0
  663. package/dist/contracts/clarification.js.map +1 -0
  664. package/dist/contracts/content-boundary.d.ts +3 -0
  665. package/dist/contracts/content-boundary.js +91 -0
  666. package/dist/contracts/content-boundary.js.map +1 -0
  667. package/dist/contracts/events.d.ts +273 -0
  668. package/dist/contracts/events.js +227 -0
  669. package/dist/contracts/events.js.map +1 -0
  670. package/dist/contracts/index.d.ts +18 -0
  671. package/dist/contracts/index.js +10 -0
  672. package/dist/contracts/index.js.map +1 -0
  673. package/dist/contracts/plan.d.ts +20 -0
  674. package/dist/contracts/plan.js +35 -0
  675. package/dist/contracts/plan.js.map +1 -0
  676. package/dist/contracts/platform-connection.d.ts +44 -0
  677. package/dist/contracts/platform-connection.js +64 -0
  678. package/dist/contracts/platform-connection.js.map +1 -0
  679. package/dist/contracts/platform-prompt-revision.d.ts +27 -0
  680. package/dist/contracts/platform-prompt-revision.js +44 -0
  681. package/dist/contracts/platform-prompt-revision.js.map +1 -0
  682. package/dist/contracts/prompt-bundle.d.ts +46 -0
  683. package/dist/contracts/prompt-bundle.js +70 -0
  684. package/dist/contracts/prompt-bundle.js.map +1 -0
  685. package/dist/contracts/revisions.d.ts +716 -0
  686. package/dist/contracts/revisions.js +298 -0
  687. package/dist/contracts/revisions.js.map +1 -0
  688. package/dist/contracts/runtime.d.ts +55 -0
  689. package/dist/contracts/runtime.js +65 -0
  690. package/dist/contracts/runtime.js.map +1 -0
  691. package/dist/contracts/semantic-change.d.ts +27 -0
  692. package/dist/contracts/semantic-change.js +101 -0
  693. package/dist/contracts/semantic-change.js.map +1 -0
  694. package/dist/contracts/tool-exclude-pattern.d.ts +12 -0
  695. package/dist/contracts/tool-exclude-pattern.js +27 -0
  696. package/dist/contracts/tool-exclude-pattern.js.map +1 -0
  697. package/dist/contracts/tool-policy-entry.d.ts +107 -0
  698. package/dist/contracts/tool-policy-entry.js +40 -0
  699. package/dist/contracts/tool-policy-entry.js.map +1 -0
  700. package/dist/contracts/tool-policy.d.ts +198 -0
  701. package/dist/contracts/tool-policy.js +485 -0
  702. package/dist/contracts/tool-policy.js.map +1 -0
  703. package/dist/contracts/url.d.ts +2 -0
  704. package/dist/contracts/url.js +8 -0
  705. package/dist/contracts/url.js.map +1 -0
  706. package/dist/diagnostics/foundation-diagnostic.d.ts +34 -0
  707. package/dist/diagnostics/foundation-diagnostic.js +47 -0
  708. package/dist/diagnostics/foundation-diagnostic.js.map +1 -0
  709. package/dist/diagnostics/index.d.ts +2 -0
  710. package/dist/diagnostics/index.js +2 -0
  711. package/dist/diagnostics/index.js.map +1 -0
  712. package/dist/embed/chat-styles.generated.d.ts +1 -0
  713. package/dist/embed/chat-styles.generated.js +4 -0
  714. package/dist/embed/chat-styles.generated.js.map +1 -0
  715. package/dist/embed/glirastes-chat-element.d.ts +67 -0
  716. package/dist/embed/glirastes-chat-element.js +278 -0
  717. package/dist/embed/glirastes-chat-element.js.map +1 -0
  718. package/dist/embed/index.d.ts +4 -0
  719. package/dist/embed/index.js +11 -0
  720. package/dist/embed/index.js.map +1 -0
  721. package/dist/embed/theme.d.ts +10 -0
  722. package/dist/embed/theme.js +41 -0
  723. package/dist/embed/theme.js.map +1 -0
  724. package/dist/index.d.ts +1 -0
  725. package/dist/index.js +1 -0
  726. package/dist/index.js.map +1 -1
  727. package/dist/react/assistant/assistant-layout.d.ts +55 -0
  728. package/dist/react/assistant/assistant-layout.js +99 -0
  729. package/dist/react/assistant/assistant-layout.js.map +1 -0
  730. package/dist/react/assistant/assistant-shell.d.ts +132 -0
  731. package/dist/react/assistant/assistant-shell.js +262 -0
  732. package/dist/react/assistant/assistant-shell.js.map +1 -0
  733. package/dist/react/assistant/assistant-shortcut-list.d.ts +24 -0
  734. package/dist/react/assistant/assistant-shortcut-list.js +32 -0
  735. package/dist/react/assistant/assistant-shortcut-list.js.map +1 -0
  736. package/dist/react/assistant/assistant-workspace.d.ts +31 -0
  737. package/dist/react/assistant/assistant-workspace.js +31 -0
  738. package/dist/react/assistant/assistant-workspace.js.map +1 -0
  739. package/dist/react/completions/completion-search.d.ts +21 -0
  740. package/dist/react/completions/completion-search.js +109 -0
  741. package/dist/react/completions/completion-search.js.map +1 -0
  742. package/dist/react/completions/ui-tool-command-provider.d.ts +15 -0
  743. package/dist/react/completions/ui-tool-command-provider.js +82 -0
  744. package/dist/react/completions/ui-tool-command-provider.js.map +1 -0
  745. package/dist/react/components/activity-log.d.ts +17 -0
  746. package/dist/react/components/activity-log.js +68 -0
  747. package/dist/react/components/activity-log.js.map +1 -0
  748. package/dist/react/components/ai-chat-panel.js +13 -6
  749. package/dist/react/components/ai-chat-panel.js.map +1 -1
  750. package/dist/react/components/ai-trigger-button.d.ts +1 -1
  751. package/dist/react/components/ai-trigger-button.js +13 -68
  752. package/dist/react/components/ai-trigger-button.js.map +1 -1
  753. package/dist/react/components/chat-input.js +7 -5
  754. package/dist/react/components/chat-input.js.map +1 -1
  755. package/dist/react/components/chat-window-visibility.d.ts +3 -0
  756. package/dist/react/components/chat-window-visibility.js +5 -0
  757. package/dist/react/components/chat-window-visibility.js.map +1 -0
  758. package/dist/react/components/chat-window.d.ts +1 -1
  759. package/dist/react/components/chat-window.js +124 -57
  760. package/dist/react/components/chat-window.js.map +1 -1
  761. package/dist/react/components/clarification-card.d.ts +10 -0
  762. package/dist/react/components/clarification-card.js +33 -0
  763. package/dist/react/components/clarification-card.js.map +1 -0
  764. package/dist/react/components/command-arguments-form.d.ts +10 -0
  765. package/dist/react/components/command-arguments-form.js +151 -0
  766. package/dist/react/components/command-arguments-form.js.map +1 -0
  767. package/dist/react/components/confirm-dialog.js +1 -1
  768. package/dist/react/components/confirm-dialog.js.map +1 -1
  769. package/dist/react/components/floating-chat-ui.d.ts +3 -3
  770. package/dist/react/components/floating-chat-ui.js +31 -5
  771. package/dist/react/components/floating-chat-ui.js.map +1 -1
  772. package/dist/react/components/mention-input.d.ts +5 -4
  773. package/dist/react/components/mention-input.js +65 -8
  774. package/dist/react/components/mention-input.js.map +1 -1
  775. package/dist/react/components/message-bubble.js +90 -14
  776. package/dist/react/components/message-bubble.js.map +1 -1
  777. package/dist/react/components/plan-checklist.d.ts +14 -0
  778. package/dist/react/components/plan-checklist.js +18 -0
  779. package/dist/react/components/plan-checklist.js.map +1 -0
  780. package/dist/react/components/recording-bar.js +45 -59
  781. package/dist/react/components/recording-bar.js.map +1 -1
  782. package/dist/react/components/rich-mention-input.js +199 -47
  783. package/dist/react/components/rich-mention-input.js.map +1 -1
  784. package/dist/react/components/session-switcher.d.ts +3 -1
  785. package/dist/react/components/session-switcher.js +27 -12
  786. package/dist/react/components/session-switcher.js.map +1 -1
  787. package/dist/react/components/status-icon.d.ts +8 -0
  788. package/dist/react/components/status-icon.js +9 -0
  789. package/dist/react/components/status-icon.js.map +1 -0
  790. package/dist/react/components/stream-waveform.d.ts +4 -0
  791. package/dist/react/components/stream-waveform.js +47 -0
  792. package/dist/react/components/stream-waveform.js.map +1 -0
  793. package/dist/react/components/voice-input-addon.d.ts +16 -1
  794. package/dist/react/components/voice-input-addon.js +256 -19
  795. package/dist/react/components/voice-input-addon.js.map +1 -1
  796. package/dist/react/components/voice-input-button.js +1 -1
  797. package/dist/react/components/voice-input-button.js.map +1 -1
  798. package/dist/react/hooks/use-chat-shortcuts.d.ts +33 -0
  799. package/dist/react/hooks/use-chat-shortcuts.js +133 -0
  800. package/dist/react/hooks/use-chat-shortcuts.js.map +1 -0
  801. package/dist/react/hooks/use-deepgram-transcription.d.ts +4 -0
  802. package/dist/react/hooks/use-deepgram-transcription.js +32 -322
  803. package/dist/react/hooks/use-deepgram-transcription.js.map +1 -1
  804. package/dist/react/hooks/use-drag-resize-panel.d.ts +1 -0
  805. package/dist/react/hooks/use-drag-resize-panel.js +246 -121
  806. package/dist/react/hooks/use-drag-resize-panel.js.map +1 -1
  807. package/dist/react/hooks/use-floating-panel.d.ts +57 -0
  808. package/dist/react/hooks/use-floating-panel.js +215 -0
  809. package/dist/react/hooks/use-floating-panel.js.map +1 -0
  810. package/dist/react/hooks/use-keyboard-shortcut.js +2 -1
  811. package/dist/react/hooks/use-keyboard-shortcut.js.map +1 -1
  812. package/dist/react/hooks/use-push-to-talk-hotkey.d.ts +24 -0
  813. package/dist/react/hooks/use-push-to-talk-hotkey.js +112 -0
  814. package/dist/react/hooks/use-push-to-talk-hotkey.js.map +1 -0
  815. package/dist/react/hooks/use-sidebar-resize.d.ts +19 -0
  816. package/dist/react/hooks/use-sidebar-resize.js +107 -0
  817. package/dist/react/hooks/use-sidebar-resize.js.map +1 -0
  818. package/dist/react/index.d.ts +30 -1
  819. package/dist/react/index.js +31 -0
  820. package/dist/react/index.js.map +1 -1
  821. package/dist/react/interactions/definitions.d.ts +67 -0
  822. package/dist/react/interactions/definitions.js +78 -0
  823. package/dist/react/interactions/definitions.js.map +1 -0
  824. package/dist/react/interactions/registry.d.ts +74 -0
  825. package/dist/react/interactions/registry.js +248 -0
  826. package/dist/react/interactions/registry.js.map +1 -0
  827. package/dist/react/interactions/use-chat-interactions-data.d.ts +15 -0
  828. package/dist/react/interactions/use-chat-interactions-data.js +41 -0
  829. package/dist/react/interactions/use-chat-interactions-data.js.map +1 -0
  830. package/dist/react/locale-de.d.ts +3 -0
  831. package/dist/react/locale-de.js +64 -0
  832. package/dist/react/locale-de.js.map +1 -0
  833. package/dist/react/provider/ai-chat-provider.d.ts +1 -1
  834. package/dist/react/provider/ai-chat-provider.js +408 -107
  835. package/dist/react/provider/ai-chat-provider.js.map +1 -1
  836. package/dist/react/provider/chat-context.d.ts +52 -1
  837. package/dist/react/provider/chat-context.js.map +1 -1
  838. package/dist/react/stt/controller.d.ts +60 -0
  839. package/dist/react/stt/controller.js +265 -0
  840. package/dist/react/stt/controller.js.map +1 -0
  841. package/dist/react/stt/deepgram.d.ts +30 -0
  842. package/dist/react/stt/deepgram.js +199 -0
  843. package/dist/react/stt/deepgram.js.map +1 -0
  844. package/dist/react/stt/recorded.d.ts +29 -0
  845. package/dist/react/stt/recorded.js +111 -0
  846. package/dist/react/stt/recorded.js.map +1 -0
  847. package/dist/react/stt/segments.d.ts +18 -0
  848. package/dist/react/stt/segments.js +29 -0
  849. package/dist/react/stt/segments.js.map +1 -0
  850. package/dist/react/stt/use-stt.d.ts +17 -0
  851. package/dist/react/stt/use-stt.js +39 -0
  852. package/dist/react/stt/use-stt.js.map +1 -0
  853. package/dist/react/stt/waveform.d.ts +5 -0
  854. package/dist/react/stt/waveform.js +29 -0
  855. package/dist/react/stt/waveform.js.map +1 -0
  856. package/dist/react/styles.css +758 -126
  857. package/dist/react/tool-renderers/registry.d.ts +31 -0
  858. package/dist/react/tool-renderers/registry.js +47 -0
  859. package/dist/react/tool-renderers/registry.js.map +1 -0
  860. package/dist/react/tool-renderers/renderer-boundary.d.ts +18 -0
  861. package/dist/react/tool-renderers/renderer-boundary.js +12 -0
  862. package/dist/react/tool-renderers/renderer-boundary.js.map +1 -0
  863. package/dist/react/transports/vercel/vercel-ai-chat.d.ts +1 -1
  864. package/dist/react/transports/vercel/vercel-ai-chat.js +2 -2
  865. package/dist/react/transports/vercel/vercel-ai-chat.js.map +1 -1
  866. package/dist/react/transports/vercel.d.ts +6 -0
  867. package/dist/react/transports/vercel.js +11 -6
  868. package/dist/react/transports/vercel.js.map +1 -1
  869. package/dist/react/types.d.ts +264 -6
  870. package/dist/react/ui.d.ts +18 -17
  871. package/dist/react/ui.js +46 -43
  872. package/dist/react/ui.js.map +1 -1
  873. package/dist/react/unstyled.d.ts +7 -0
  874. package/dist/react/unstyled.js +8 -0
  875. package/dist/react/unstyled.js.map +1 -0
  876. package/dist/react/utils/activity.d.ts +16 -0
  877. package/dist/react/utils/activity.js +77 -0
  878. package/dist/react/utils/activity.js.map +1 -0
  879. package/dist/react/utils/clarification.d.ts +31 -0
  880. package/dist/react/utils/clarification.js +99 -0
  881. package/dist/react/utils/clarification.js.map +1 -0
  882. package/dist/react/utils/create-approval-description.d.ts +6 -0
  883. package/dist/react/utils/create-approval-description.js +32 -3
  884. package/dist/react/utils/create-approval-description.js.map +1 -1
  885. package/dist/react/utils/create-tool-result-handler.d.ts +1 -1
  886. package/dist/react/utils/create-tool-result-handler.js +1 -1
  887. package/dist/react/utils/create-tool-result-handler.js.map +1 -1
  888. package/dist/react/utils/entity-names.d.ts +6 -0
  889. package/dist/react/utils/entity-names.js +55 -0
  890. package/dist/react/utils/entity-names.js.map +1 -0
  891. package/dist/react/utils/followup-suggestions.d.ts +11 -0
  892. package/dist/react/utils/followup-suggestions.js +37 -0
  893. package/dist/react/utils/followup-suggestions.js.map +1 -0
  894. package/dist/react/utils/local-session-store.d.ts +30 -0
  895. package/dist/react/utils/local-session-store.js +163 -0
  896. package/dist/react/utils/local-session-store.js.map +1 -0
  897. package/dist/react/utils/mention-markup.d.ts +44 -1
  898. package/dist/react/utils/mention-markup.js +140 -10
  899. package/dist/react/utils/mention-markup.js.map +1 -1
  900. package/dist/react/utils/tool-presentation.d.ts +23 -0
  901. package/dist/react/utils/tool-presentation.js +41 -0
  902. package/dist/react/utils/tool-presentation.js.map +1 -0
  903. package/dist/react/utils/tool-result-config.d.ts +10 -0
  904. package/dist/react/utils/tool-result-config.js +12 -0
  905. package/dist/react/utils/tool-result-config.js.map +1 -0
  906. package/dist/runtime/ai-sdk/engine.d.ts +66 -0
  907. package/dist/runtime/ai-sdk/engine.js +188 -0
  908. package/dist/runtime/ai-sdk/engine.js.map +1 -0
  909. package/dist/runtime/ai-sdk/index.d.ts +1 -0
  910. package/dist/runtime/ai-sdk/index.js +2 -0
  911. package/dist/runtime/ai-sdk/index.js.map +1 -0
  912. package/dist/runtime/authorization.d.ts +16 -0
  913. package/dist/runtime/authorization.js +33 -0
  914. package/dist/runtime/authorization.js.map +1 -0
  915. package/dist/runtime/budget.d.ts +39 -0
  916. package/dist/runtime/budget.js +97 -0
  917. package/dist/runtime/budget.js.map +1 -0
  918. package/dist/runtime/contract-bindings.d.ts +52 -0
  919. package/dist/runtime/contract-bindings.js +92 -0
  920. package/dist/runtime/contract-bindings.js.map +1 -0
  921. package/dist/runtime/engine.d.ts +52 -0
  922. package/dist/runtime/engine.js +2 -0
  923. package/dist/runtime/engine.js.map +1 -0
  924. package/dist/runtime/fingerprint.d.ts +6 -0
  925. package/dist/runtime/fingerprint.js +29 -0
  926. package/dist/runtime/fingerprint.js.map +1 -0
  927. package/dist/runtime/glirastes.d.ts +112 -0
  928. package/dist/runtime/glirastes.js +285 -0
  929. package/dist/runtime/glirastes.js.map +1 -0
  930. package/dist/runtime/index.d.ts +23 -0
  931. package/dist/runtime/index.js +23 -0
  932. package/dist/runtime/index.js.map +1 -0
  933. package/dist/runtime/json-schema.d.ts +13 -0
  934. package/dist/runtime/json-schema.js +41 -0
  935. package/dist/runtime/json-schema.js.map +1 -0
  936. package/dist/runtime/local-runtime-source.d.ts +76 -0
  937. package/dist/runtime/local-runtime-source.js +0 -0
  938. package/dist/runtime/local-runtime-source.js.map +1 -0
  939. package/dist/runtime/local-signer.d.ts +17 -0
  940. package/dist/runtime/local-signer.js +32 -0
  941. package/dist/runtime/local-signer.js.map +1 -0
  942. package/dist/runtime/local-tool-bindings.d.ts +57 -0
  943. package/dist/runtime/local-tool-bindings.js +190 -0
  944. package/dist/runtime/local-tool-bindings.js.map +1 -0
  945. package/dist/runtime/managed-turn.d.ts +29 -0
  946. package/dist/runtime/managed-turn.js +97 -0
  947. package/dist/runtime/managed-turn.js.map +1 -0
  948. package/dist/runtime/metrics/cost.d.ts +64 -0
  949. package/dist/runtime/metrics/cost.js +92 -0
  950. package/dist/runtime/metrics/cost.js.map +1 -0
  951. package/dist/runtime/metrics/sink.d.ts +56 -0
  952. package/dist/runtime/metrics/sink.js +214 -0
  953. package/dist/runtime/metrics/sink.js.map +1 -0
  954. package/dist/runtime/metrics/turn-recorder.d.ts +62 -0
  955. package/dist/runtime/metrics/turn-recorder.js +170 -0
  956. package/dist/runtime/metrics/turn-recorder.js.map +1 -0
  957. package/dist/runtime/offline-execution-lease.d.ts +27 -0
  958. package/dist/runtime/offline-execution-lease.js +46 -0
  959. package/dist/runtime/offline-execution-lease.js.map +1 -0
  960. package/dist/runtime/policy-overlay.d.ts +86 -0
  961. package/dist/runtime/policy-overlay.js +117 -0
  962. package/dist/runtime/policy-overlay.js.map +1 -0
  963. package/dist/runtime/postgres-store.d.ts +111 -0
  964. package/dist/runtime/postgres-store.js +363 -0
  965. package/dist/runtime/postgres-store.js.map +1 -0
  966. package/dist/runtime/prompt-bundle-store.d.ts +58 -0
  967. package/dist/runtime/prompt-bundle-store.js +120 -0
  968. package/dist/runtime/prompt-bundle-store.js.map +1 -0
  969. package/dist/runtime/runtime-mode.d.ts +23 -0
  970. package/dist/runtime/runtime-mode.js +42 -0
  971. package/dist/runtime/runtime-mode.js.map +1 -0
  972. package/dist/runtime/tool-discovery.d.ts +51 -0
  973. package/dist/runtime/tool-discovery.js +138 -0
  974. package/dist/runtime/tool-discovery.js.map +1 -0
  975. package/dist/runtime/tool-search.d.ts +31 -0
  976. package/dist/runtime/tool-search.js +145 -0
  977. package/dist/runtime/tool-search.js.map +1 -0
  978. package/dist/runtime/turn-snapshot.d.ts +44 -0
  979. package/dist/runtime/turn-snapshot.js +108 -0
  980. package/dist/runtime/turn-snapshot.js.map +1 -0
  981. package/dist/server/adapters/nextjs/approval-binding.d.ts +334 -0
  982. package/dist/server/adapters/nextjs/approval-binding.js +707 -0
  983. package/dist/server/adapters/nextjs/approval-binding.js.map +1 -0
  984. package/dist/server/adapters/nextjs/chat-interactions-handler.d.ts +26 -0
  985. package/dist/server/adapters/nextjs/chat-interactions-handler.js +65 -0
  986. package/dist/server/adapters/nextjs/chat-interactions-handler.js.map +1 -0
  987. package/dist/server/adapters/nextjs/clarification-resume.d.ts +21 -0
  988. package/dist/server/adapters/nextjs/clarification-resume.js +109 -0
  989. package/dist/server/adapters/nextjs/clarification-resume.js.map +1 -0
  990. package/dist/server/adapters/nextjs/context-helpers.d.ts +49 -8
  991. package/dist/server/adapters/nextjs/context-helpers.js +75 -21
  992. package/dist/server/adapters/nextjs/context-helpers.js.map +1 -1
  993. package/dist/server/adapters/nextjs/create-ai-chat-handler.d.ts +59 -1
  994. package/dist/server/adapters/nextjs/create-ai-chat-handler.js +647 -95
  995. package/dist/server/adapters/nextjs/create-ai-chat-handler.js.map +1 -1
  996. package/dist/server/adapters/nextjs/direct-command.d.ts +75 -0
  997. package/dist/server/adapters/nextjs/direct-command.js +316 -0
  998. package/dist/server/adapters/nextjs/direct-command.js.map +1 -0
  999. package/dist/server/adapters/nextjs/index.d.ts +10 -2
  1000. package/dist/server/adapters/nextjs/index.js +7 -0
  1001. package/dist/server/adapters/nextjs/index.js.map +1 -1
  1002. package/dist/server/adapters/nextjs/prepare-model-messages.d.ts +2 -1
  1003. package/dist/server/adapters/nextjs/prepare-model-messages.js +7 -15
  1004. package/dist/server/adapters/nextjs/prepare-model-messages.js.map +1 -1
  1005. package/dist/server/adapters/nextjs/recording-transcription-handler.d.ts +31 -0
  1006. package/dist/server/adapters/nextjs/recording-transcription-handler.js +55 -0
  1007. package/dist/server/adapters/nextjs/recording-transcription-handler.js.map +1 -0
  1008. package/dist/server/adapters/nextjs/request-guards.d.ts +41 -0
  1009. package/dist/server/adapters/nextjs/request-guards.js +108 -0
  1010. package/dist/server/adapters/nextjs/request-guards.js.map +1 -0
  1011. package/dist/server/adapters/nextjs/sanitize-model-messages.js +12 -6
  1012. package/dist/server/adapters/nextjs/sanitize-model-messages.js.map +1 -1
  1013. package/dist/server/adapters/nextjs/scope-pipeline-tools.d.ts +17 -0
  1014. package/dist/server/adapters/nextjs/scope-pipeline-tools.js +26 -0
  1015. package/dist/server/adapters/nextjs/scope-pipeline-tools.js.map +1 -0
  1016. package/dist/server/adapters/nextjs/tool-discovery.d.ts +39 -0
  1017. package/dist/server/adapters/nextjs/tool-discovery.js +47 -0
  1018. package/dist/server/adapters/nextjs/tool-discovery.js.map +1 -0
  1019. package/dist/server/adapters/nextjs/tool-presentation.d.ts +26 -0
  1020. package/dist/server/adapters/nextjs/tool-presentation.js +19 -0
  1021. package/dist/server/adapters/nextjs/tool-presentation.js.map +1 -0
  1022. package/dist/server/adapters/nextjs/types.d.ts +229 -13
  1023. package/dist/server/adapters/nextjs/with-ai-tool.d.ts +2 -2
  1024. package/dist/server/core/adaptive-fast-path.d.ts +3 -0
  1025. package/dist/server/core/adaptive-fast-path.js +185 -0
  1026. package/dist/server/core/adaptive-fast-path.js.map +1 -0
  1027. package/dist/server/core/clarification-tool.d.ts +29 -0
  1028. package/dist/server/core/clarification-tool.js +61 -0
  1029. package/dist/server/core/clarification-tool.js.map +1 -0
  1030. package/dist/server/core/generated-ui-tool.d.ts +31 -0
  1031. package/dist/server/core/generated-ui-tool.js +87 -0
  1032. package/dist/server/core/generated-ui-tool.js.map +1 -0
  1033. package/dist/server/core/index.d.ts +49 -8
  1034. package/dist/server/core/index.js +198 -16
  1035. package/dist/server/core/index.js.map +1 -1
  1036. package/dist/server/core/local-guardrails.d.ts +6 -0
  1037. package/dist/server/core/local-guardrails.js +68 -0
  1038. package/dist/server/core/local-guardrails.js.map +1 -0
  1039. package/dist/server/core/module-router.d.ts +3 -1
  1040. package/dist/server/core/module-router.js +22 -2
  1041. package/dist/server/core/module-router.js.map +1 -1
  1042. package/dist/server/core/plan-tool.d.ts +23 -0
  1043. package/dist/server/core/plan-tool.js +32 -0
  1044. package/dist/server/core/plan-tool.js.map +1 -0
  1045. package/dist/server/core/zod-compact.d.ts +3 -3
  1046. package/dist/server/core/zod-compact.js +126 -54
  1047. package/dist/server/core/zod-compact.js.map +1 -1
  1048. package/dist/server/index.d.ts +2 -4
  1049. package/dist/server/index.js +2 -4
  1050. package/dist/server/index.js.map +1 -1
  1051. package/dist/server/local-pipeline.d.ts +14 -0
  1052. package/dist/server/local-pipeline.js +152 -0
  1053. package/dist/server/local-pipeline.js.map +1 -0
  1054. package/dist/server/pii-shield/index.d.ts +1 -0
  1055. package/dist/server/pii-shield/index.js +1 -0
  1056. package/dist/server/pii-shield/index.js.map +1 -1
  1057. package/dist/server/pii-shield/regex-detector.d.ts +13 -0
  1058. package/dist/server/pii-shield/regex-detector.js +109 -0
  1059. package/dist/server/pii-shield/regex-detector.js.map +1 -0
  1060. package/dist/server/testing/edge-cases.js +46 -95
  1061. package/dist/server/testing/edge-cases.js.map +1 -1
  1062. package/dist/server/testing/guardrails.js +1 -65
  1063. package/dist/server/testing/guardrails.js.map +1 -1
  1064. package/dist/server/testing/helpers.js +1 -62
  1065. package/dist/server/testing/helpers.js.map +1 -1
  1066. package/dist/server/testing/index.d.ts +1 -0
  1067. package/dist/server/testing/index.js +1 -0
  1068. package/dist/server/testing/index.js.map +1 -1
  1069. package/dist/server/testing/registry-parity.d.ts +18 -0
  1070. package/dist/server/testing/registry-parity.js +38 -0
  1071. package/dist/server/testing/registry-parity.js.map +1 -0
  1072. package/dist/server/testing/schema-consistency.js +5 -26
  1073. package/dist/server/testing/schema-consistency.js.map +1 -1
  1074. package/dist/server/testing/smoke.d.ts +2 -1
  1075. package/dist/server/testing/smoke.js +5 -3
  1076. package/dist/server/testing/smoke.js.map +1 -1
  1077. package/dist/server/testing/types.d.ts +1 -1
  1078. package/dist/server/testing/zod-introspect.d.ts +38 -0
  1079. package/dist/server/testing/zod-introspect.js +286 -0
  1080. package/dist/server/testing/zod-introspect.js.map +1 -0
  1081. package/dist/stt/index.d.ts +5 -0
  1082. package/dist/stt/index.js +6 -0
  1083. package/dist/stt/index.js.map +1 -0
  1084. package/dist/sync/app-setup-client.d.ts +46 -0
  1085. package/dist/sync/app-setup-client.js +137 -0
  1086. package/dist/sync/app-setup-client.js.map +1 -0
  1087. package/dist/sync/capability-report.d.ts +41 -0
  1088. package/dist/sync/capability-report.js +48 -0
  1089. package/dist/sync/capability-report.js.map +1 -0
  1090. package/dist/sync/connection-lookup.d.ts +19 -0
  1091. package/dist/sync/connection-lookup.js +56 -0
  1092. package/dist/sync/connection-lookup.js.map +1 -0
  1093. package/dist/sync/control-plane-client.d.ts +69 -0
  1094. package/dist/sync/control-plane-client.js +182 -0
  1095. package/dist/sync/control-plane-client.js.map +1 -0
  1096. package/dist/sync/deployment-selector.d.ts +9 -0
  1097. package/dist/sync/deployment-selector.js +26 -0
  1098. package/dist/sync/deployment-selector.js.map +1 -0
  1099. package/dist/sync/fetch-sse-push.d.ts +6 -0
  1100. package/dist/sync/fetch-sse-push.js +42 -0
  1101. package/dist/sync/fetch-sse-push.js.map +1 -0
  1102. package/dist/sync/index.d.ts +26 -0
  1103. package/dist/sync/index.js +17 -0
  1104. package/dist/sync/index.js.map +1 -0
  1105. package/dist/sync/jwks-provider.d.ts +14 -0
  1106. package/dist/sync/jwks-provider.js +53 -0
  1107. package/dist/sync/jwks-provider.js.map +1 -0
  1108. package/dist/sync/local-deployment-validator.d.ts +30 -0
  1109. package/dist/sync/local-deployment-validator.js +60 -0
  1110. package/dist/sync/local-deployment-validator.js.map +1 -0
  1111. package/dist/sync/managed-sync.d.ts +40 -0
  1112. package/dist/sync/managed-sync.js +94 -0
  1113. package/dist/sync/managed-sync.js.map +1 -0
  1114. package/dist/sync/materialize-deployment.d.ts +7 -0
  1115. package/dist/sync/materialize-deployment.js +63 -0
  1116. package/dist/sync/materialize-deployment.js.map +1 -0
  1117. package/dist/sync/runtime-connect-client.d.ts +23 -0
  1118. package/dist/sync/runtime-connect-client.js +182 -0
  1119. package/dist/sync/runtime-connect-client.js.map +1 -0
  1120. package/dist/sync/runtime-setup-client.d.ts +62 -0
  1121. package/dist/sync/runtime-setup-client.js +153 -0
  1122. package/dist/sync/runtime-setup-client.js.map +1 -0
  1123. package/dist/sync/signature-verifier.d.ts +39 -0
  1124. package/dist/sync/signature-verifier.js +97 -0
  1125. package/dist/sync/signature-verifier.js.map +1 -0
  1126. package/dist/sync/state-store.d.ts +24 -0
  1127. package/dist/sync/state-store.js +47 -0
  1128. package/dist/sync/state-store.js.map +1 -0
  1129. package/dist/sync/sync-manager.d.ts +27 -0
  1130. package/dist/sync/sync-manager.js +170 -0
  1131. package/dist/sync/sync-manager.js.map +1 -0
  1132. package/dist/types.d.ts +68 -16
  1133. package/dist/types.js +31 -3
  1134. package/dist/types.js.map +1 -1
  1135. package/embed/package.json +5 -0
  1136. package/package.json +188 -47
  1137. package/runtime/ai-sdk/package.json +5 -0
  1138. package/runtime/package.json +5 -0
  1139. package/skills/README.md +26 -92
  1140. package/skills/building-glirastes-chat-ui/SKILL.md +358 -343
  1141. package/skills/describing-glirastes-tools/SKILL.md +180 -0
  1142. package/skills/integrating-glirastes-nextjs/SKILL.md +149 -302
  1143. package/skills/integrating-glirastes-web/SKILL.md +165 -0
  1144. package/skills/maintaining-glirastes-tools/SKILL.md +133 -461
  1145. package/skills/migrating-to-glirastes/SKILL.md +112 -0
  1146. package/skills/setting-up-glirastes/SKILL.md +158 -0
  1147. package/skills/setting-up-glirastes/agents/openai.yaml +4 -0
  1148. package/skills/setting-up-glirastes/references/artifact-contract.md +40 -0
  1149. package/skills/setting-up-glirastes/scripts/validate-artifact.ts +23 -0
  1150. package/skills/setting-up-glirastes/templates/interview.md +19 -0
  1151. package/stt/package.json +5 -0
  1152. package/dist/cjs/codegen/asset-sync.d.ts +0 -20
  1153. package/dist/cjs/codegen/asset-sync.js +0 -28
  1154. package/dist/cjs/codegen/coverage.d.ts +0 -66
  1155. package/dist/cjs/codegen/coverage.js +0 -408
  1156. package/dist/cjs/codegen/endpoint-scanner.d.ts +0 -16
  1157. package/dist/cjs/codegen/endpoint-scanner.js +0 -197
  1158. package/dist/cjs/codegen/mcp-generator.d.ts +0 -50
  1159. package/dist/cjs/codegen/mcp-generator.js +0 -803
  1160. package/dist/cjs/codegen/module-generator.d.ts +0 -11
  1161. package/dist/cjs/codegen/module-generator.js +0 -353
  1162. package/dist/cjs/codegen/nestjs-scanner.d.ts +0 -43
  1163. package/dist/cjs/codegen/nestjs-scanner.js +0 -241
  1164. package/dist/cjs/codegen/output-recommender.d.ts +0 -23
  1165. package/dist/cjs/codegen/output-recommender.js +0 -33
  1166. package/dist/cjs/codegen/scaffolder.d.ts +0 -36
  1167. package/dist/cjs/codegen/scaffolder.js +0 -262
  1168. package/dist/cjs/codegen/skill-generator.d.ts +0 -49
  1169. package/dist/cjs/codegen/skill-generator.js +0 -967
  1170. package/dist/cjs/codegen/ui-scanner.d.ts +0 -24
  1171. package/dist/cjs/codegen/ui-scanner.js +0 -202
  1172. package/dist/cjs/codegen/validator.d.ts +0 -35
  1173. package/dist/cjs/codegen/validator.js +0 -292
  1174. package/dist/cjs/openapi/index.d.ts +0 -78
  1175. package/dist/cjs/openapi/index.js +0 -347
  1176. package/dist/cjs/react/components/wavesurfer-loader.d.ts +0 -5
  1177. package/dist/cjs/react/components/wavesurfer-loader.js +0 -36
  1178. package/dist/cjs/react/transports/langgraph/index.d.ts +0 -2
  1179. package/dist/cjs/react/transports/langgraph/index.js +0 -8
  1180. package/dist/cjs/react/transports/langgraph/langgraph-ai-chat.d.ts +0 -62
  1181. package/dist/cjs/react/transports/langgraph/langgraph-ai-chat.js +0 -94
  1182. package/dist/cjs/react/transports/langgraph.d.ts +0 -71
  1183. package/dist/cjs/react/transports/langgraph.js +0 -369
  1184. package/dist/cjs/server/adapters/nestjs/chat/ai-chat-auth.guard.d.ts +0 -10
  1185. package/dist/cjs/server/adapters/nestjs/chat/ai-chat-auth.guard.js +0 -42
  1186. package/dist/cjs/server/adapters/nestjs/chat/ai-chat-module-options.interface.d.ts +0 -32
  1187. package/dist/cjs/server/adapters/nestjs/chat/ai-chat-module-options.interface.js +0 -4
  1188. package/dist/cjs/server/adapters/nestjs/chat/ai-chat.controller.d.ts +0 -11
  1189. package/dist/cjs/server/adapters/nestjs/chat/ai-chat.controller.js +0 -80
  1190. package/dist/cjs/server/adapters/nestjs/chat/ai-chat.module.d.ts +0 -9
  1191. package/dist/cjs/server/adapters/nestjs/chat/ai-chat.module.js +0 -119
  1192. package/dist/cjs/server/adapters/nestjs/chat/ai-chat.service.d.ts +0 -13
  1193. package/dist/cjs/server/adapters/nestjs/chat/ai-chat.service.js +0 -131
  1194. package/dist/cjs/server/adapters/nestjs/chat/dto/ai-chat-request.dto.d.ts +0 -7
  1195. package/dist/cjs/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js +0 -52
  1196. package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message-part.dto.d.ts +0 -19
  1197. package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message-part.dto.js +0 -108
  1198. package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message.dto.d.ts +0 -8
  1199. package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message.dto.js +0 -59
  1200. package/dist/cjs/server/adapters/nestjs/chat/dto/index.d.ts +0 -3
  1201. package/dist/cjs/server/adapters/nestjs/chat/dto/index.js +0 -9
  1202. package/dist/cjs/server/adapters/nestjs/chat/index.d.ts +0 -3
  1203. package/dist/cjs/server/adapters/nestjs/chat/index.js +0 -9
  1204. package/dist/cjs/server/adapters/nestjs/chat/speech-stream.gateway.d.ts +0 -4
  1205. package/dist/cjs/server/adapters/nestjs/chat/speech-stream.gateway.js +0 -73
  1206. package/dist/cjs/server/adapters/nestjs/chat/ws-loader.d.ts +0 -5
  1207. package/dist/cjs/server/adapters/nestjs/chat/ws-loader.js +0 -72
  1208. package/dist/cjs/server/adapters/nestjs/decorators/ai-module.decorator.d.ts +0 -6
  1209. package/dist/cjs/server/adapters/nestjs/decorators/ai-module.decorator.js +0 -13
  1210. package/dist/cjs/server/adapters/nestjs/decorators/ai-param.decorator.d.ts +0 -5
  1211. package/dist/cjs/server/adapters/nestjs/decorators/ai-param.decorator.js +0 -15
  1212. package/dist/cjs/server/adapters/nestjs/decorators/ai-tool.decorator.d.ts +0 -6
  1213. package/dist/cjs/server/adapters/nestjs/decorators/ai-tool.decorator.js +0 -22
  1214. package/dist/cjs/server/adapters/nestjs/decorators/constants.d.ts +0 -4
  1215. package/dist/cjs/server/adapters/nestjs/decorators/constants.js +0 -7
  1216. package/dist/cjs/server/adapters/nestjs/index.d.ts +0 -14
  1217. package/dist/cjs/server/adapters/nestjs/index.js +0 -42
  1218. package/dist/cjs/server/adapters/nestjs/metadata.d.ts +0 -39
  1219. package/dist/cjs/server/adapters/nestjs/metadata.js +0 -36
  1220. package/dist/cjs/server/adapters/nestjs/module/ai-tools-explorer.service.d.ts +0 -36
  1221. package/dist/cjs/server/adapters/nestjs/module/ai-tools-explorer.service.js +0 -159
  1222. package/dist/cjs/server/adapters/nestjs/module/ai-tools.module.d.ts +0 -37
  1223. package/dist/cjs/server/adapters/nestjs/module/ai-tools.module.js +0 -44
  1224. package/dist/cjs/server/adapters/nestjs/module/ai-tools.service.d.ts +0 -28
  1225. package/dist/cjs/server/adapters/nestjs/module/ai-tools.service.js +0 -41
  1226. package/dist/cjs/server/adapters/nestjs/scanner/nestjs-scanner.d.ts +0 -16
  1227. package/dist/cjs/server/adapters/nestjs/scanner/nestjs-scanner.js +0 -117
  1228. package/dist/cjs/server/adapters/nestjs/scanner/schema-builder.d.ts +0 -26
  1229. package/dist/cjs/server/adapters/nestjs/scanner/schema-builder.js +0 -259
  1230. package/dist/cjs/server/adapters/nestjs/swagger.d.ts +0 -7
  1231. package/dist/cjs/server/adapters/nestjs/swagger.js +0 -39
  1232. package/dist/cli/commands/check-upgrade.d.ts +0 -15
  1233. package/dist/cli/commands/check-upgrade.js +0 -138
  1234. package/dist/cli/commands/check-upgrade.js.map +0 -1
  1235. package/dist/cli/commands/test.d.ts +0 -8
  1236. package/dist/cli/commands/test.js +0 -76
  1237. package/dist/cli/commands/test.js.map +0 -1
  1238. package/dist/cli/utils/changelog-parser.d.ts +0 -13
  1239. package/dist/cli/utils/changelog-parser.js +0 -89
  1240. package/dist/cli/utils/changelog-parser.js.map +0 -1
  1241. package/dist/cli/utils/commit-parser.d.ts +0 -8
  1242. package/dist/cli/utils/commit-parser.js +0 -23
  1243. package/dist/cli/utils/commit-parser.js.map +0 -1
  1244. package/dist/cli/utils/gap-detector.d.ts +0 -14
  1245. package/dist/cli/utils/gap-detector.js +0 -65
  1246. package/dist/cli/utils/gap-detector.js.map +0 -1
  1247. package/dist/cli/utils/get-cli-version.d.ts +0 -2
  1248. package/dist/cli/utils/get-cli-version.js +0 -10
  1249. package/dist/cli/utils/get-cli-version.js.map +0 -1
  1250. package/dist/codegen/asset-sync.d.ts +0 -20
  1251. package/dist/codegen/asset-sync.js +0 -26
  1252. package/dist/codegen/asset-sync.js.map +0 -1
  1253. package/dist/codegen/coverage.d.ts +0 -66
  1254. package/dist/codegen/coverage.js +0 -372
  1255. package/dist/codegen/coverage.js.map +0 -1
  1256. package/dist/codegen/endpoint-scanner.d.ts +0 -16
  1257. package/dist/codegen/endpoint-scanner.js +0 -161
  1258. package/dist/codegen/endpoint-scanner.js.map +0 -1
  1259. package/dist/codegen/mcp-generator.d.ts +0 -50
  1260. package/dist/codegen/mcp-generator.js +0 -801
  1261. package/dist/codegen/mcp-generator.js.map +0 -1
  1262. package/dist/codegen/module-generator.d.ts +0 -11
  1263. package/dist/codegen/module-generator.js +0 -351
  1264. package/dist/codegen/module-generator.js.map +0 -1
  1265. package/dist/codegen/nestjs-scanner.d.ts +0 -43
  1266. package/dist/codegen/nestjs-scanner.js +0 -239
  1267. package/dist/codegen/nestjs-scanner.js.map +0 -1
  1268. package/dist/codegen/output-recommender.d.ts +0 -23
  1269. package/dist/codegen/output-recommender.js +0 -31
  1270. package/dist/codegen/output-recommender.js.map +0 -1
  1271. package/dist/codegen/scaffolder.d.ts +0 -36
  1272. package/dist/codegen/scaffolder.js +0 -259
  1273. package/dist/codegen/scaffolder.js.map +0 -1
  1274. package/dist/codegen/skill-generator.d.ts +0 -49
  1275. package/dist/codegen/skill-generator.js +0 -965
  1276. package/dist/codegen/skill-generator.js.map +0 -1
  1277. package/dist/codegen/ui-scanner.d.ts +0 -24
  1278. package/dist/codegen/ui-scanner.js +0 -197
  1279. package/dist/codegen/ui-scanner.js.map +0 -1
  1280. package/dist/codegen/validator.d.ts +0 -35
  1281. package/dist/codegen/validator.js +0 -256
  1282. package/dist/codegen/validator.js.map +0 -1
  1283. package/dist/openapi/demo-generate.d.ts +0 -1
  1284. package/dist/openapi/demo-generate.js +0 -15
  1285. package/dist/openapi/demo-generate.js.map +0 -1
  1286. package/dist/openapi/index.d.ts +0 -78
  1287. package/dist/openapi/index.js +0 -341
  1288. package/dist/openapi/index.js.map +0 -1
  1289. package/dist/react/components/wavesurfer-loader.d.ts +0 -5
  1290. package/dist/react/components/wavesurfer-loader.js +0 -34
  1291. package/dist/react/components/wavesurfer-loader.js.map +0 -1
  1292. package/dist/react/transports/langgraph/index.d.ts +0 -2
  1293. package/dist/react/transports/langgraph/index.js +0 -3
  1294. package/dist/react/transports/langgraph/index.js.map +0 -1
  1295. package/dist/react/transports/langgraph/langgraph-ai-chat.d.ts +0 -62
  1296. package/dist/react/transports/langgraph/langgraph-ai-chat.js +0 -92
  1297. package/dist/react/transports/langgraph/langgraph-ai-chat.js.map +0 -1
  1298. package/dist/react/transports/langgraph.d.ts +0 -71
  1299. package/dist/react/transports/langgraph.js +0 -366
  1300. package/dist/react/transports/langgraph.js.map +0 -1
  1301. package/dist/server/adapters/nestjs/chat/ai-chat-auth.guard.d.ts +0 -10
  1302. package/dist/server/adapters/nestjs/chat/ai-chat-auth.guard.js +0 -40
  1303. package/dist/server/adapters/nestjs/chat/ai-chat-auth.guard.js.map +0 -1
  1304. package/dist/server/adapters/nestjs/chat/ai-chat-module-options.interface.d.ts +0 -32
  1305. package/dist/server/adapters/nestjs/chat/ai-chat-module-options.interface.js +0 -2
  1306. package/dist/server/adapters/nestjs/chat/ai-chat-module-options.interface.js.map +0 -1
  1307. package/dist/server/adapters/nestjs/chat/ai-chat.controller.d.ts +0 -11
  1308. package/dist/server/adapters/nestjs/chat/ai-chat.controller.js +0 -78
  1309. package/dist/server/adapters/nestjs/chat/ai-chat.controller.js.map +0 -1
  1310. package/dist/server/adapters/nestjs/chat/ai-chat.module.d.ts +0 -9
  1311. package/dist/server/adapters/nestjs/chat/ai-chat.module.js +0 -117
  1312. package/dist/server/adapters/nestjs/chat/ai-chat.module.js.map +0 -1
  1313. package/dist/server/adapters/nestjs/chat/ai-chat.service.d.ts +0 -13
  1314. package/dist/server/adapters/nestjs/chat/ai-chat.service.js +0 -129
  1315. package/dist/server/adapters/nestjs/chat/ai-chat.service.js.map +0 -1
  1316. package/dist/server/adapters/nestjs/chat/dto/ai-chat-request.dto.d.ts +0 -7
  1317. package/dist/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js +0 -49
  1318. package/dist/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js.map +0 -1
  1319. package/dist/server/adapters/nestjs/chat/dto/chat-message-part.dto.d.ts +0 -19
  1320. package/dist/server/adapters/nestjs/chat/dto/chat-message-part.dto.js +0 -105
  1321. package/dist/server/adapters/nestjs/chat/dto/chat-message-part.dto.js.map +0 -1
  1322. package/dist/server/adapters/nestjs/chat/dto/chat-message.dto.d.ts +0 -8
  1323. package/dist/server/adapters/nestjs/chat/dto/chat-message.dto.js +0 -56
  1324. package/dist/server/adapters/nestjs/chat/dto/chat-message.dto.js.map +0 -1
  1325. package/dist/server/adapters/nestjs/chat/dto/index.d.ts +0 -3
  1326. package/dist/server/adapters/nestjs/chat/dto/index.js +0 -4
  1327. package/dist/server/adapters/nestjs/chat/dto/index.js.map +0 -1
  1328. package/dist/server/adapters/nestjs/chat/index.d.ts +0 -3
  1329. package/dist/server/adapters/nestjs/chat/index.js +0 -3
  1330. package/dist/server/adapters/nestjs/chat/index.js.map +0 -1
  1331. package/dist/server/adapters/nestjs/chat/speech-stream.gateway.d.ts +0 -4
  1332. package/dist/server/adapters/nestjs/chat/speech-stream.gateway.js +0 -71
  1333. package/dist/server/adapters/nestjs/chat/speech-stream.gateway.js.map +0 -1
  1334. package/dist/server/adapters/nestjs/chat/ws-loader.d.ts +0 -5
  1335. package/dist/server/adapters/nestjs/chat/ws-loader.js +0 -37
  1336. package/dist/server/adapters/nestjs/chat/ws-loader.js.map +0 -1
  1337. package/dist/server/adapters/nestjs/decorators/ai-module.decorator.d.ts +0 -6
  1338. package/dist/server/adapters/nestjs/decorators/ai-module.decorator.js +0 -11
  1339. package/dist/server/adapters/nestjs/decorators/ai-module.decorator.js.map +0 -1
  1340. package/dist/server/adapters/nestjs/decorators/ai-param.decorator.d.ts +0 -5
  1341. package/dist/server/adapters/nestjs/decorators/ai-param.decorator.js +0 -13
  1342. package/dist/server/adapters/nestjs/decorators/ai-param.decorator.js.map +0 -1
  1343. package/dist/server/adapters/nestjs/decorators/ai-tool.decorator.d.ts +0 -6
  1344. package/dist/server/adapters/nestjs/decorators/ai-tool.decorator.js +0 -20
  1345. package/dist/server/adapters/nestjs/decorators/ai-tool.decorator.js.map +0 -1
  1346. package/dist/server/adapters/nestjs/decorators/constants.d.ts +0 -4
  1347. package/dist/server/adapters/nestjs/decorators/constants.js +0 -5
  1348. package/dist/server/adapters/nestjs/decorators/constants.js.map +0 -1
  1349. package/dist/server/adapters/nestjs/index.d.ts +0 -14
  1350. package/dist/server/adapters/nestjs/index.js +0 -20
  1351. package/dist/server/adapters/nestjs/index.js.map +0 -1
  1352. package/dist/server/adapters/nestjs/metadata.d.ts +0 -39
  1353. package/dist/server/adapters/nestjs/metadata.js +0 -30
  1354. package/dist/server/adapters/nestjs/metadata.js.map +0 -1
  1355. package/dist/server/adapters/nestjs/module/ai-tools-explorer.service.d.ts +0 -36
  1356. package/dist/server/adapters/nestjs/module/ai-tools-explorer.service.js +0 -156
  1357. package/dist/server/adapters/nestjs/module/ai-tools-explorer.service.js.map +0 -1
  1358. package/dist/server/adapters/nestjs/module/ai-tools.module.d.ts +0 -37
  1359. package/dist/server/adapters/nestjs/module/ai-tools.module.js +0 -42
  1360. package/dist/server/adapters/nestjs/module/ai-tools.module.js.map +0 -1
  1361. package/dist/server/adapters/nestjs/module/ai-tools.service.d.ts +0 -28
  1362. package/dist/server/adapters/nestjs/module/ai-tools.service.js +0 -38
  1363. package/dist/server/adapters/nestjs/module/ai-tools.service.js.map +0 -1
  1364. package/dist/server/adapters/nestjs/scanner/nestjs-scanner.d.ts +0 -16
  1365. package/dist/server/adapters/nestjs/scanner/nestjs-scanner.js +0 -115
  1366. package/dist/server/adapters/nestjs/scanner/nestjs-scanner.js.map +0 -1
  1367. package/dist/server/adapters/nestjs/scanner/schema-builder.d.ts +0 -26
  1368. package/dist/server/adapters/nestjs/scanner/schema-builder.js +0 -255
  1369. package/dist/server/adapters/nestjs/scanner/schema-builder.js.map +0 -1
  1370. package/dist/server/adapters/nestjs/swagger.d.ts +0 -7
  1371. package/dist/server/adapters/nestjs/swagger.js +0 -37
  1372. package/dist/server/adapters/nestjs/swagger.js.map +0 -1
  1373. package/openapi/package.json +0 -5
  1374. package/react/langgraph/package.json +0 -5
  1375. package/server/nestjs/package.json +0 -5
  1376. package/skills/integrating-glirastes-nestjs/SKILL.md +0 -346
  1377. package/skills/integrating-glirastes-nextjs-with-nestjs-backend/SKILL.md +0 -359
package/README.md CHANGED
@@ -1,927 +1,378 @@
1
1
  <p align="center">
2
- <a href="https://github.com/chainmatics/glirastes">
3
- <img alt="Glirastes SDK" src=".github/hero.gif" width="100%">
4
- </a>
2
+ <img src=".github/assets/logo.png" alt="Glirastes logo: an orange mycelium mark" width="120">
5
3
  </p>
6
4
 
5
+ <h1 align="center">Glirastes</h1>
6
+
7
7
  <p align="center">
8
- <strong>The bridge between AI and your UI.</strong><br/>
9
- <sub>Define tools once. Execute on the server. React on the client. All type-safe.</sub>
8
+ <em>The agentic framework that takes root in your product.</em>
10
9
  </p>
11
10
 
12
11
  <p align="center">
13
- <a href="#quick-start-nextjs-or-nestjs"><strong>Quick Start</strong></a> ·
14
- <a href="#core-concepts"><strong>Concepts</strong></a> ·
15
- <a href="#examples"><strong>Examples</strong></a> ·
16
- <a href="#advanced"><strong>Advanced</strong></a> ·
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>
12
+ <a href="https://www.npmjs.com/package/glirastes"><img src="https://img.shields.io/npm/v/glirastes?style=flat-square&color=f2a618" alt="npm version"></a>
13
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-f2a618?style=flat-square" alt="License: Apache-2.0"></a>
14
+ <img src="https://img.shields.io/badge/node-%E2%89%A5%2020.6-f2a618?style=flat-square" alt="Node >= 20.6">
15
+ <img src="https://img.shields.io/badge/TypeScript-ready-f2a618?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript">
20
16
  </p>
21
17
 
22
18
  <p align="center">
23
- <a href="https://www.npmjs.com/package/glirastes"><img src="https://img.shields.io/npm/v/glirastes?style=flat-square&labelColor=0a0a0a&color=6366f1" alt="npm version"/></a>
24
- <a href="#"><img src="https://img.shields.io/badge/TypeScript-strict-3178c6?style=flat-square&logo=typescript&logoColor=white&labelColor=0a0a0a" alt="TypeScript"/></a>
25
- <a href="https://sdk.vercel.ai/"><img src="https://img.shields.io/badge/Vercel_AI_SDK-compatible-8b5cf6?style=flat-square&labelColor=0a0a0a" alt="Vercel AI SDK"/></a>
26
- <a href="https://langchain-ai.github.io/langgraph/"><img src="https://img.shields.io/badge/LangGraph-compatible-1c3c3c?style=flat-square&labelColor=0a0a0a" alt="LangGraph"/></a>
19
+ <a href="https://glirastes.io"><b>Website</b></a> ·
20
+ <a href="#quickstart-nextjs-app-router"><b>Quickstart</b></a> ·
21
+ <a href="docs/"><b>Docs</b></a> ·
22
+ <a href="skills/"><b>Skills</b></a> ·
23
+ <a href="CHANGELOG.md"><b>Changelog</b></a>
27
24
  </p>
28
25
 
29
- <br/>
30
-
31
- ---
32
-
33
- <br/>
34
-
35
- ## What is this?
36
-
37
- **glirastes** is a TypeScript SDK for building AI-powered chat and tool systems. You describe what the AI can do with a handful of declarative tool definitions, and the SDK turns them into [Vercel AI SDK](https://sdk.vercel.ai/)-compatible tools that call your APIs, stream responses to the client, and trigger UI updates — all type-safe, all in one place. If your backend already runs [LangGraph](https://langchain-ai.github.io/langgraph/) instead, the same chat UI works against it via the LangGraph transport — no migration required.
38
-
39
- It ships as a single npm package with subpath exports:
40
-
41
- ```ts
42
- import { defineEndpointTool } from 'glirastes';
43
- import { createAiChatHandler } from 'glirastes/server/nextjs';
44
- import { VercelAiChat } from 'glirastes/react/vercel';
45
- ```
46
-
47
- The server bits run in Node (Next.js App Router, NestJS, or any framework). The client bits are React. Everything else — PII protection, intent routing, guardrails, approvals — is optional and unlocked via the [Glirastes platform](https://chainmatics.de).
48
-
49
- <br/>
50
-
51
- ## Why glirastes?
52
-
53
- Building an AI feature means wiring together **tool definitions**, **API calls**, **streaming responses**, **UI reactions**, and — once real users hit it — **PII handling**, **approval flows**, **guardrails**, and **observability**. Every. Single. Time.
54
-
55
- <table>
56
- <tr>
57
- <td width="50%">
58
-
59
- **Without glirastes**
60
- ```
61
- - Manual tool/function definitions
62
- - Hand-wired UI action dispatch
63
- - Custom PII redaction
64
- - Framework-specific glue
65
- - Bespoke approval flows
66
- - DIY observability
67
- ```
68
-
69
- </td>
70
- <td width="50%">
71
-
72
- **With glirastes**
73
- ```
74
- ✦ One declarative definition per tool
75
- ✦ Auto UI action dispatch
76
- ✦ Optional PII Shield
77
- ✦ Next.js / NestJS / LangGraph adapters
78
- ✦ Pro approval flows via platform
79
- ✦ Built-in telemetry
80
- ```
81
-
82
- </td>
83
- </tr>
84
- </table>
85
-
86
- <br/>
87
-
88
- ## Quick Start ([Next.js](https://nextjs.org/) or [NestJS](https://nestjs.com/))
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**:
26
+ <p align="center">
27
+ <a href="https://glirastes.io"><img src=".github/assets/hero-landing.gif" width="100%" alt="The glirastes.io hero: an orange mycelium network pulses behind the headline &quot;The agentic framework that takes root in your product.&quot; and the npm install glirastes command."></a>
28
+ </p>
93
29
 
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) |
30
+ Glirastes is a TypeScript SDK for an embedded chat that operates your app: it
31
+ calls your endpoints, navigates, sets filters and triggers UI actions. The tools
32
+ come from your code, everything runs inside your app, and the optional Glirastes
33
+ Platform manages reviewed configuration and rollouts without ever seeing prompts
34
+ or business data.
100
35
 
101
- **Why prefer the real backend over a Next.js Route Handler?**
36
+ ## See it in action
102
37
 
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.
38
+ <p align="center">
39
+ <img src=".github/assets/chat-demo.gif" width="100%" alt="A task board app with the Glirastes chat docked on the right. The user asks to move the Q4 report to Finance and assign it to Lena; the assistant looks up the task and the person, asks for approval of tasks.update, and after Approve the card moves to the Finance column with Lena as assignee.">
40
+ </p>
108
41
 
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.
42
+ <p align="center"><sub>One request moves a card on a task board: the chat finds the task and the person, asks for approval of <code>tasks.update</code>, then acts.</sub></p>
110
43
 
111
- Pick your stack — both come up in the same four steps.
44
+ ## Quickstart (Next.js App Router)
112
45
 
113
- ### 1. Install
46
+ **1. Install** the SDK and the chat peers (Node >= 20.6):
114
47
 
115
48
  ```bash
116
- # Backend only (NestJS / Next.js Route Handlers)
117
- npm install glirastes
118
-
119
- # Frontend / chat UI consumers — add the React UI peers
120
- npm install glirastes @ai-sdk/react react-markdown
49
+ npm install glirastes @ai-sdk/openai @ai-sdk/react react-markdown
121
50
  ```
122
51
 
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.
52
+ **2. Initialize.** Run it inside your Codex or Claude Code session, or from a
53
+ terminal with `--agent codex|claude`:
124
54
 
125
- > **Requirements:** Node.js `>=20`. The React chat UI needs `react` and `react-dom` `^19` — Next.js apps already have these.
126
- >
127
- > **Optional** — only if you want voice input with a live waveform:
128
- > ```bash
129
- > npm install wavesurfer.js
130
- > ```
131
-
132
- ### 2. Define a tool
133
-
134
- The SDK uses the declared `method` + `path` (or the route the decorator already exposes) to call your own API when the LLM picks this tool — you never write a `fetch` yourself.
135
-
136
- <table>
137
- <tr>
138
- <th>Next.js — co-located <code>ai-tool.ts</code></th>
139
- <th>NestJS — decorators on your controller</th>
140
- </tr>
141
- <tr>
142
- <td valign="top">
143
-
144
- ```ts
145
- // app/api/tasks/ai-tool.ts
146
- import { z } from 'zod';
147
- import { defineEndpointTool } from 'glirastes';
148
-
149
- export const listTasks = defineEndpointTool({
150
- id: 'tasks.list',
151
- toolName: 'list_tasks',
152
- description: 'List tasks with an optional status filter.',
153
- method: 'GET',
154
- path: '/api/tasks',
155
- inputSchema: z.object({
156
- status: z.enum(['open', 'done']).optional(),
157
- }),
158
- });
159
- ```
160
-
161
- </td>
162
- <td valign="top">
163
-
164
- ```ts
165
- // tasks.controller.ts
166
- import { Controller, Get, Query } from '@nestjs/common';
167
- import { AiModule, AiTool } from 'glirastes/server/nestjs';
168
-
169
- @Controller('tasks')
170
- @AiModule({
171
- intent: 'task_management',
172
- classification: {
173
- hint: 'User asks about listing or filtering tasks.',
174
- examples: ['show me open tasks', 'what is done?', 'list my tasks'],
175
- },
176
- })
177
- export class TaskController {
178
- @Get()
179
- @AiTool({
180
- name: 'list_tasks',
181
- description: 'List tasks with an optional status filter.',
182
- })
183
- list(@Query('status') status?: 'open' | 'done') {
184
- return this.taskService.list(status);
185
- }
186
- }
55
+ ```bash
56
+ npx --no-install glirastes init
187
57
  ```
188
58
 
189
- </td>
190
- </tr>
191
- </table>
59
+ `init` writes `.glirastes/tools.json`, `.glirastes/prompt-bundle.json`, the
60
+ `predev` / `prebuild` scripts (`glirastes tools refresh`) and a short hint in
61
+ `AGENTS.md` / `CLAUDE.md`, installs the [agent skills](#agent-skills) and hands
62
+ the integration to your coding agent. Existing files are never replaced.
63
+ `--dry-run --json` previews without writing anything.
192
64
 
193
- ### 3. Drop a chat widget into your frontend
194
-
195
- ```tsx
196
- 'use client';
197
- import { VercelAiChat } from 'glirastes/react/vercel';
65
+ **3. Derive the tools** from your routes, pages, URL filters and client actions:
198
66
 
199
- export default function RootLayout({ children }) {
200
- return (
201
- <body>
202
- {children}
203
- <VercelAiChat endpoint="/api/chat" />
204
- </body>
205
- );
206
- }
67
+ ```bash
68
+ npx glirastes tools refresh
207
69
  ```
208
70
 
209
- ### 4. Wire up the chat handler
71
+ This writes the committed `.glirastes/` tool files and the generated module
72
+ `src/generated/glirastes/tools.generated.ts`.
210
73
 
211
- <table>
212
- <tr>
213
- <th>Next.js — <code>app/api/chat/route.ts</code></th>
214
- <th>NestJS — register controllers in <code>AiChatModule</code></th>
215
- </tr>
216
- <tr>
217
- <td valign="top">
74
+ **4. Add the chat route.** Identity comes from your verified session; your
75
+ endpoints keep their own authorization.
218
76
 
219
77
  ```ts
78
+ // src/app/api/chat/route.ts
79
+ import { createOpenAI } from '@ai-sdk/openai';
80
+ import { createGlirastes } from 'glirastes/runtime';
220
81
  import { createAiChatHandler } from 'glirastes/server/nextjs';
221
- import { endpointToolsToRegistry } from 'glirastes/server';
222
- import { listTasks } from './tasks/ai-tool';
223
-
224
- export const POST = createAiChatHandler({
225
- tools: endpointToolsToRegistry([listTasks]),
226
- });
227
- ```
228
-
229
- </td>
230
- <td valign="top">
231
-
232
- ```ts
233
- import { scanNestJsControllers } from 'glirastes/server/nestjs';
234
- import { endpointToolsToRegistry } from 'glirastes/server';
235
- import { TaskController } from './tasks/tasks.controller';
236
-
237
- const scan = scanNestJsControllers({ controllers: [TaskController] });
238
- const registry = endpointToolsToRegistry(scan.tools);
239
-
240
- // Pass `registry` to createAiChatHandler in your chat route.
241
- ```
242
-
243
- </td>
244
- </tr>
245
- </table>
246
-
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.
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
-
253
- ### Setup notes
254
-
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:
258
-
259
- **Modern (recommended):**
260
-
261
- ```jsonc
262
- {
263
- "compilerOptions": {
264
- "module": "node16", // or "nodenext" / "esnext"
265
- "moduleResolution": "node16", // or "nodenext" / "bundler"
266
- "target": "ES2022",
267
- "esModuleInterop": true,
268
- "experimentalDecorators": true, // NestJS only
269
- "emitDecoratorMetadata": true // NestJS only
270
- }
271
- }
272
- ```
273
-
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.
275
-
276
- #### Which subpath do I import from?
277
-
278
- | Where the code runs | Import from |
279
- |---|---|
280
- | Anywhere (tool definitions, types, helpers) | `glirastes` |
281
- | Server-side core (registry helpers, pipeline) | `glirastes/server` |
282
- | Next.js App Router route handlers | `glirastes/server/nextjs` |
283
- | NestJS controllers / modules | `glirastes/server/nestjs` |
284
- | Test suite without LLM calls | `glirastes/server/testing` |
285
- | React components, client hooks | `glirastes/react` |
286
- | Vercel AI SDK chat widget | `glirastes/react/vercel` |
287
- | LangGraph chat widget | `glirastes/react/langgraph` |
288
- | Default chat panel CSS | `glirastes/react/styles.css` |
289
-
290
- <br/>
291
-
292
- ## Core Concepts
293
-
294
- ### Tool
295
-
296
- A **tool** is something the AI can do. It has a name, a description (so the LLM knows when to use it), an input schema (Zod — validated at the type layer and at runtime), and logic for what happens when it runs.
297
-
298
- Two flavors cover ~95% of real-world cases:
299
-
300
- ### Endpoint Tool — talks to your backend
301
-
302
- ```ts
303
- import { z } from 'zod';
304
- import { defineEndpointTool } from 'glirastes';
305
-
306
- export const listInvoices = defineEndpointTool({
307
- id: 'invoices.list',
308
- toolName: 'list_invoices',
309
- module: 'billing',
310
- description: 'List invoices with optional status filter.',
311
- method: 'GET',
312
- path: '/api/invoices',
313
- inputSchema: z.object({
314
- status: z.enum(['paid', 'open', 'overdue']).optional(),
315
- }),
316
- uiPattern: {
317
- type: 'filter-and-navigate',
318
- target: 'invoices',
319
- filterMapping: { status: 'status' },
82
+ import * as generated from '@/generated/glirastes/tools.generated';
83
+ import { resolvePrincipal } from '@/lib/glirastes-principal'; // your session lookup
84
+
85
+ const glirastes = createGlirastes({
86
+ generated,
87
+ localLimits: {
88
+ maxModelSteps: 6, maxToolCalls: 8, totalTimeoutMs: 60_000, toolTimeoutMs: 15_000,
89
+ maxInputTokens: 40_000, maxOutputTokens: 4_000, maxEstimatedCostUsd: 0.5,
90
+ maxRepeatedFingerprint: 3, maxConsecutiveErrors: 3,
91
+ delegation: { maxDepth: 1, maxBreadth: 1, sharedBudget: true },
320
92
  },
321
93
  });
322
- ```
323
-
324
- You declare the HTTP method and path; the SDK generates the `execute` function that calls your API. You never write fetch boilerplate for a tool.
325
-
326
- ### UI Tool — fires frontend actions
327
-
328
- ```ts
329
- import { z } from 'zod';
330
- import { defineUiTool } from 'glirastes';
331
-
332
- export const openSettings = defineUiTool({
333
- id: 'settings.open',
334
- toolName: 'open_settings',
335
- description: 'Open the settings dialog for the current user.',
336
- inputSchema: z.object({}),
337
- uiAction: { type: 'open-dialog', target: 'settings' },
338
- });
339
- ```
340
-
341
- No API call. The tool result contains a `uiAction` payload that's dispatched to registered React handlers via the `UiActionBus`. This is how "LLM opens a dialog" or "LLM navigates the user" works without round-tripping through your backend.
342
-
343
- ### Registry
344
-
345
- A **registry** is a key-value map (tool name → tool object) that the SDK uses internally. Build one with `endpointToolsToRegistry(...)` or `uiToolsToRegistry(...)`:
346
-
347
- ```ts
348
- import { endpointToolsToRegistry, uiToolsToRegistry } from 'glirastes/server';
349
-
350
- const endpoints = endpointToolsToRegistry([listInvoices, createInvoice]);
351
- const ui = uiToolsToRegistry([openSettings]);
352
- const registry = { ...endpoints, ...ui };
353
- ```
354
-
355
- Pass the merged registry to `createAiChatHandler({ tools: registry })` and the SDK converts it to AI SDK format at request time.
356
-
357
- ### UI Patterns
358
-
359
- Declarative rules for what the frontend should do after a tool runs. Instead of writing custom dispatch code per tool, declare a pattern and the SDK resolves it automatically:
360
-
361
- | Pattern | What it does |
362
- |---|---|
363
- | `filter-and-navigate` | Navigate to a page with filters pre-applied |
364
- | `open-detail` | Open a detail view for a specific entity |
365
- | `open-dialog` | Open a modal dialog |
366
- | `refresh` | Refresh a specific UI region |
367
- | `toast` | Show a notification |
368
-
369
- Patterns support `$variable` placeholders that get replaced with values from the tool input or response. Example: `path: '/tasks/$taskId'` becomes `/tasks/abc-123` at runtime.
370
-
371
- ### UI Action Dispatch
372
-
373
- On the frontend, register handlers for action IDs using the `useAiClientAction` hook:
374
-
375
- ```tsx
376
- import { useAiClientAction } from 'glirastes/react';
377
-
378
- function TaskList() {
379
- useAiClientAction('task-details.open', (payload) => {
380
- router.push(`/tasks/${payload?.taskId}`);
381
- });
382
-
383
- useAiClientAction('task-list.filter', (payload) => {
384
- setFilters(payload);
385
- });
386
-
387
- return <div>{/* your task list */}</div>;
94
+ const openrouter = createOpenAI({ baseURL: 'https://openrouter.ai/api/v1', apiKey: process.env.OPENROUTER_API_KEY });
95
+
96
+ export const runtime = 'nodejs';
97
+ export async function POST(request: Request) {
98
+ const principal = await resolvePrincipal(request); // { subjectId, tenantId, roles, attributes }
99
+ if (!principal) return new Response('Unauthorized', { status: 401 });
100
+ const turn = await glirastes.chatTurn((runtimeTenantId) => ({ ...principal, tenantId: runtimeTenantId }));
101
+ return createAiChatHandler({
102
+ ...turn,
103
+ model: openrouter.chat('anthropic/claude-sonnet-5.5'),
104
+ systemPrompt: 'Use the tools of this app. Ask one short question when the target is unclear.',
105
+ toolDiscovery: true,
106
+ })(request);
388
107
  }
389
108
  ```
390
109
 
391
- When a tool returns a `uiAction` with a matching action ID, your handler fires. That's the full bridge between the LLM and your UI.
392
-
393
- ### Modules (Intent Routing)
394
-
395
- Modules group tools by topic — e.g., a `billing` module contains `list_invoices`, `create_invoice`, `send_reminder`. When a user sends a message, the SDK can classify which module the message belongs to and scope the LLM's tool list to that module alone. Fewer tools = cheaper, faster, more accurate responses.
396
-
397
- Module assignment is declared per-tool via the `module` field. Intent classification is a Pro feature that runs through the [Glirastes platform](https://chainmatics.de) via `Lancer` (see [Advanced](#advanced)).
398
-
399
- <br/>
400
-
401
- ## Examples
402
-
403
- ### Full Next.js backend with the pipeline
404
-
405
- The pipeline orchestrates guardrails → intent classification → tool scoping → model selection in one call. It's the recommended setup once you have more than a handful of tools.
406
-
407
- ```ts
408
- // app/api/chat/route.ts
409
- import { createAiChatHandler } from 'glirastes/server/nextjs';
410
- import { createAiPipeline, endpointToolsToRegistry } from 'glirastes/server';
411
- import { createLancer } from 'glirastes/server/lancer';
412
- import { endpointTools } from '@/lib/ai-tools';
413
- import { modules } from '@/lib/modules';
414
-
415
- const lancer = createLancer({
416
- apiKey: process.env.GLIRASTES_API_KEY,
417
- });
418
-
419
- const pipeline = createAiPipeline({
420
- lancer,
421
- modules,
422
- defaultModule: 'general',
423
- });
424
-
425
- const registry = endpointToolsToRegistry(endpointTools);
426
-
427
- export const POST = createAiChatHandler({
428
- tools: registry,
429
- pipeline,
430
- });
431
- ```
432
-
433
- Without an API key, the pipeline **still works** — every Lancer call falls back to a safe local default. Guardrails pass, classification returns low confidence, telemetry is silently dropped. You can develop and ship without ever talking to the platform.
434
-
435
- ### NestJS with decorators
436
-
437
- Prefer declaring tools where the endpoint lives? Use NestJS decorators. Three pieces: `@AiModule` on the controller, `@AiTool` on the method, `@AiParam` on the DTO properties.
438
-
439
- ```ts
440
- // tasks.controller.ts
441
- import { Controller, Post, Body, Get, Param } from '@nestjs/common';
442
- import { AiModule, AiTool } from 'glirastes/server/nestjs';
443
-
444
- @Controller('tasks')
445
- @AiModule({
446
- intent: 'task_management',
447
- classification: {
448
- hint: 'User wants to create, update, or query tasks.',
449
- examples: ['create a task', 'mark task as done', 'list my tasks'],
450
- },
451
- })
452
- export class TaskController {
453
- @Post()
454
- @AiTool({
455
- name: 'create_task',
456
- description: 'Create a new task',
457
- })
458
- async create(@Body() dto: CreateTaskDto) {
459
- return this.taskService.create(dto);
460
- }
461
-
462
- // Endpoints without @AiTool are not exposed to the AI
463
- @Get(':id/history')
464
- getHistory(@Param('id') id: string) {
465
- return this.taskService.getHistory(id);
466
- }
467
- }
468
- ```
469
-
470
- ```ts
471
- // create-task.dto.ts
472
- import { IsString, IsOptional } from 'class-validator';
473
- import { AiParam } from 'glirastes/server/nestjs';
474
-
475
- export class CreateTaskDto {
476
- @IsString()
477
- @AiParam('The task title. Required. Ask the user if missing.')
478
- title!: string;
479
-
480
- @IsString()
481
- @IsOptional()
482
- @AiParam('Optional due date in ISO 8601 format.')
483
- dueDate?: string;
484
- }
485
- ```
486
-
487
- `@AiParam` descriptions are what the LLM sees when deciding whether and how to call the tool — write them as instructions for the model, not for humans. The input schema is auto-derived from the DTO's `class-validator` decorators.
488
-
489
- Wire it up in your `AiChatModule`:
490
-
491
- ```ts
492
- import { scanNestJsControllers } from 'glirastes/server/nestjs';
493
- import { endpointToolsToRegistry } from 'glirastes/server';
494
-
495
- const scan = scanNestJsControllers({
496
- controllers: [TaskController, /* ...other controllers */],
497
- });
498
- const registry = endpointToolsToRegistry(scan.tools);
499
- ```
500
-
501
- `scanNestJsControllers` returns `{ tools, modules, toolsByModule }` — pass `scan.tools` to `endpointToolsToRegistry`, then hand `registry` to `createAiChatHandler({ tools: registry })`. No separate `ai-tool.ts` files, no manual registration.
502
-
503
- ### Client-side action handlers
110
+ The handler protects the route for you. Set `GLIRASTES_APPROVAL_SECRET` (at
111
+ least 16 characters, the same on every instance) before production: it signs
112
+ each approval the handler asks for to that tool call, its input, an expiry
113
+ (15 minutes by default) and the user (the managed principal, as here, or your
114
+ `approvalScope(request)`), so an approval in a forged or edited chat history
115
+ runs nothing; production refuses to serve approvals without it. An approved
116
+ call runs only when every check passed in that request; any other approved
117
+ call without a result in the history is denied. With the default in-process store, each
118
+ approval runs at most once per process within its lifetime, and each caller
119
+ holds at most 200 live approvals. Without a managed runtime or
120
+ `approvalScope`, the caller is told apart by a keyed hash of the request's
121
+ `Authorization` or `Cookie` header (only requests without credentials share
122
+ one quota); `approvalScope` also binds each approval to its user. With several instances, pass a
123
+ shared `approvalStore` (e.g. Redis), or a replayed history can run once more
124
+ on another instance. The handler also answers 415 to a body that is not
125
+ `application/json`, 403 to a browser request from another origin (list yours
126
+ in `allowedOrigins`), 413 above `maxBodyBytes` (1 MB), and 400 to a body that
127
+ is not JSON (`invalid_json`), to a history that repeats a tool call id or an
128
+ approval id (`duplicate_tool_call_id`, `duplicate_approval_id`), to a
129
+ malformed tool part or approval (`tool_part_malformed`, `approval_malformed`)
130
+ and to more than 32 approved calls in one request (`too_many_approvals`).
131
+
132
+ Endpoint tools call the origin of the chat request's URL, the address your
133
+ Next.js server listens on, so they reach the app's own route handlers. If your
134
+ API runs in another process, even under the same public origin behind a
135
+ proxy, pass `endpointCaller: (request) => createHttpEndpointCaller({ baseUrl,
136
+ request })` with its origin; `trustForwardedHeaders: true` is the alternative
137
+ only when every request comes through a proxy that sets `x-forwarded-host`
138
+ (otherwise a client can aim the calls, with the user's cookie, at any host).
139
+
140
+ `executeTool` and routes built from `glirastes/runtime/ai-sdk` alone run a tool
141
+ without these approval checks; give them only input your server has authorized.
142
+
143
+ **5. Mount the chat** and the navigation bridge (client components):
504
144
 
505
145
  ```tsx
506
- // components/chat-integration.tsx
507
146
  'use client';
508
- import { useAiClientAction } from 'glirastes/react';
509
147
  import { useRouter } from 'next/navigation';
510
- import { useQueryClient } from '@tanstack/react-query';
148
+ import { useGlirastesNavigationBridge } from 'glirastes/react';
149
+ import { VercelAiChat } from 'glirastes/react/vercel';
150
+ import 'glirastes/react/styles.css';
511
151
 
512
- export function ChatIntegration() {
152
+ export function Assistant() {
513
153
  const router = useRouter();
514
- const qc = useQueryClient();
515
-
516
- useAiClientAction('task-details.open', (payload) => {
517
- router.push(`/tasks/${payload?.taskId}`);
518
- });
519
-
520
- useAiClientAction('task-list.refresh', () => {
521
- qc.invalidateQueries({ queryKey: ['tasks'] });
522
- });
523
-
524
- useAiClientAction('open-dialog.settings', () => {
525
- // open your settings modal
526
- });
527
-
528
- return null;
529
- }
530
- ```
531
-
532
- Render this component anywhere inside your layout. Handlers fire whenever a tool result contains a matching `uiAction`.
533
-
534
- ### OpenAPI code generation
535
-
536
- Already have an OpenAPI spec? Annotate your endpoints with `x-ai` extensions:
537
-
538
- ```json
539
- {
540
- "paths": {
541
- "/api/tasks": {
542
- "post": {
543
- "operationId": "createTask",
544
- "x-ai": {
545
- "enabled": true,
546
- "toolName": "create_task",
547
- "description": "Create a new task",
548
- "module": "task_management"
549
- }
550
- }
551
- }
552
- }
553
- }
554
- ```
555
-
556
- Then generate tool definitions automatically:
557
-
558
- ```bash
559
- npx glirastes generate --input openapi.json --output src/generated/tools.ts
560
- ```
561
-
562
- The generator converts OpenAPI parameter schemas to Zod, preserves `x-ai` metadata, and outputs a ready-to-import registry file.
563
-
564
- ### Testing without LLM calls
565
-
566
- ```ts
567
- import { createAiTestSuite } from 'glirastes/server/testing';
568
- import { endpointTools } from '@/lib/ai-tools';
569
- import { modules } from '@/lib/modules';
570
-
571
- const suite = createAiTestSuite({
572
- tools: endpointTools,
573
- modules,
574
- });
575
-
576
- suite.expectRouted('show me open tasks', 'task_query');
577
- suite.expectNeedsApproval('delete_task');
578
- suite.expectNoApproval('list_tasks');
579
- suite.expectToolSchema('create_task').toAccept({ title: 'Buy milk' });
580
- ```
581
-
582
- All assertions run without calling a real LLM or hitting HTTP — perfect for CI.
583
-
584
- <br/>
585
-
586
- ## Advanced
587
-
588
- ### LangGraph backend
589
-
590
- If your server already runs [LangGraph](https://langchain-ai.github.io/langgraph/), swap the drop-in widget for the LangGraph transport. Your LangGraph agent handles the model calls and tool execution; glirastes handles the chat UI and streaming transport:
591
-
592
- ```tsx
593
- 'use client';
594
- import { LangGraphAiChat } from 'glirastes/react/langgraph';
595
-
596
- export default function RootLayout({ children }) {
597
- return (
598
- <body>
599
- {children}
600
- <LangGraphAiChat endpoint="/api/chat" />
601
- </body>
602
- );
154
+ useGlirastesNavigationBridge({ push: (href) => router.push(href) });
155
+ return <VercelAiChat endpoint="/api/chat" />;
603
156
  }
604
157
  ```
605
158
 
606
- No `ai` / `@ai-sdk/react` imports needed — the LangGraph transport is pure HTTP and streams on its own.
607
-
608
- ### Customizing the chat UI
609
-
610
- `VercelAiChat` and `LangGraphAiChat` are thin wrappers around `FloatingChatUI` and accept all its layout props directly:
611
-
612
- ```tsx
613
- <VercelAiChat
614
- endpoint="/api/chat"
615
- title="Ask the assistant"
616
- defaultOpen={false}
617
- draggable={true}
618
- resizable={true}
619
- size={{ width: 480, height: 640 }}
620
- shortcut="mod+k"
621
- />
622
- ```
623
-
624
- | Prop | What it does |
625
- |---|---|
626
- | `title` | Header text. Default: `"AI Assistant"` |
627
- | `defaultOpen` | Whether the window starts open. Default: `false` |
628
- | `draggable` | Window draggable by its header. Default: `true` |
629
- | `resizable` | Window resizable from corners. Default: `true` |
630
- | `size` | `{ width, height }` or a responsive size config |
631
- | `shortcut` | Keyboard shortcut to toggle, e.g. `'mod+k'`. Pass `false` to disable |
632
- | `hideTriggerWhenOpen` | Hide the floating trigger pill while the window is open |
633
- | `showClearButton` | Show the clear/trash button in the header. Default: `true` |
634
- | `showSessionSwitcher` | `true`, `false`, or `'auto'` (shows if sessions are configured) |
635
- | `headerActions` | Replace the default header actions with a custom `ReactNode` |
636
- | `triggerIcon` | Custom icon inside the floating trigger pill |
637
-
638
- ### Styling
639
-
640
- Every visual slot accepts a class name through the `classNames` prop. Works with Tailwind, CSS Modules, or any class-based styling:
641
-
642
- ```tsx
643
- <VercelAiChat
644
- endpoint="/api/chat"
645
- classNames={{
646
- window: 'w-[500px] h-[640px] bg-slate-900 border-slate-700 shadow-2xl',
647
- windowHeader: 'bg-slate-800 text-slate-100',
648
- messageBubble: 'rounded-xl',
649
- input: 'bg-slate-800 text-slate-100',
650
- trigger: 'bottom-8 right-8',
651
- triggerPill: 'bg-indigo-600 hover:bg-indigo-500',
652
- }}
653
- />
654
- ```
655
-
656
- Available slots: `window`, `windowHeader`, `windowBody`, `panel`, `messageList`, `messageBubble`, `input`, `approvalCard`, `bulkApprovalCard`, `suggestionChip`, `mentionChip`, `pipelineTimeline`, `trigger`, `triggerPill`, `switcher`. Setting `classNames.window` drops the SDK's inline sizing styles so your classes win.
159
+ **6. Run** `npm run dev` (the `predev` script refreshes the tools), then check
160
+ the setup with `npx glirastes doctor`.
657
161
 
658
- You can also bring your own stylesheet via `import 'glirastes/react/styles.css'` for the default look, or skip it entirely and style everything from scratch.
162
+ The full walkthrough, including filters, client actions, `@` mentions and `/`
163
+ commands, is the bundled skill
164
+ [`integrating-glirastes-nextjs`](skills/integrating-glirastes-nextjs/SKILL.md).
659
165
 
660
- ### Persisting chat across sessions
166
+ ## How it works
661
167
 
662
- Every widget accepts a `session` config. The simplest version uses `localStorage`:
168
+ - **Execution is local.** The model call, the tool loop and every tool call
169
+ run in your app's server. A normal chat turn makes no request to the
170
+ Platform.
171
+ - **Your app keeps the sensitive parts.** Prompts, model calls and provider
172
+ keys, secrets, business data, tool arguments and results, and final
173
+ authorization stay in the app. `resolvePrincipal` only says who asks; each
174
+ endpoint still checks its own session and permissions.
175
+ - **Guard rails per turn.** Each turn runs on one pinned tool and policy
176
+ snapshot, with local budgets (steps, tool calls, tokens, cost, timeouts),
177
+ loop detection and fail-closed authorization. Write and delete tools ask
178
+ the user before they run.
179
+ - **The Platform gets metadata only.** A connected app sends content-free
180
+ metrics (tokens, cost, latency, errors, tool use) in batches off the turn
181
+ path, and receives signed configuration revisions.
663
182
 
664
- ```tsx
665
- <VercelAiChat
666
- endpoint="/api/chat"
667
- session={{
668
- save: (id, msgs) => localStorage.setItem(id, JSON.stringify(msgs)),
669
- load: (id) => {
670
- const v = localStorage.getItem(id);
671
- return v ? JSON.parse(v) : null;
672
- },
673
- }}
674
- />
675
- ```
676
-
677
- For multi-device sync, point `save` and `load` at your own REST endpoints that persist messages to a database. The SDK also supports a full session-list bridge (`list`, `create`, `delete`, `rename`) for apps that show a sidebar of past conversations — see `SessionConfig` in the source for the full shape.
183
+ ## Tools from your code
678
184
 
679
- ### Manual wiring (sharing chat state with other components)
680
-
681
- If you need to trigger chat programmatically from a button, show unread counts in the header, or render transcripts somewhere outside the chat panel, skip the drop-in widget and wire things manually:
682
-
683
- ```tsx
684
- 'use client';
685
- import { AiChatProvider, AiChatPanel, useAiChat } from 'glirastes/react';
686
- import { useVercelAiChatTransport } from 'glirastes/react/vercel';
687
-
688
- export function ChatShell({ children }: { children: React.ReactNode }) {
689
- const transport = useVercelAiChatTransport({ endpoint: '/api/chat' });
690
- return (
691
- <AiChatProvider transport={transport}>
692
- {children}
693
- <AiChatPanel />
694
- </AiChatProvider>
695
- );
696
- }
697
-
698
- // Anywhere inside the provider:
699
- function HeaderBadge() {
700
- const { messages, isLoading } = useAiChat();
701
- return <span>{isLoading ? '•••' : messages.length}</span>;
702
- }
703
- ```
704
-
705
- ### PII Shield — protect personal data from the LLM
706
-
707
- ```ts
708
- import { createPiiShield, createAiChatHandler } from 'glirastes/server';
709
- import { createLancer } from 'glirastes/server/lancer';
710
-
711
- const lancer = createLancer({ apiKey: process.env.GLIRASTES_API_KEY });
712
-
713
- const piiShield = createPiiShield({
714
- lancer, // delegate detection to Aegis (Pro)
715
- mode: 'pseudonymize', // same PII → same pseudonym across a conversation
716
- });
717
-
718
- export const POST = createAiChatHandler({
719
- tools: registry,
720
- piiShield,
721
- });
722
- ```
723
-
724
- User sends "Email the invoice to john@example.com" → shield replaces `john@example.com` with `Email_A` before the LLM sees it → LLM calls `send_email({ to: 'Email_A' })` → shield rehydrates the real address before your API is called.
725
-
726
- The free tier provides a **local detector** if you skip Lancer. Not as accurate as Aegis but zero-dependency and offline-safe.
727
-
728
- ### Approvals — human-in-the-loop for sensitive tools
729
-
730
- Some tools shouldn't run just because the LLM decided to. `delete_user` should require human confirmation. Set it up via Lancer approvals (Pro):
731
-
732
- ```ts
733
- const lancer = createLancer({
734
- apiKey: process.env.GLIRASTES_API_KEY,
735
- approvals: {
736
- policies: {
737
- 'users.delete': 'require',
738
- 'billing.charge': 'require',
739
- 'users.list': 'auto',
740
- },
741
- },
742
- });
743
- ```
744
-
745
- The chat UI renders an `<ApprovalCard>` in the conversation — "The AI wants to delete user X. Approve or Reject?" — and pauses execution until the user clicks. If Lancer is unavailable, the SDK falls back to the local `needsApproval` flag (deprecated but still functional).
746
-
747
- ### Followup Suggestions
748
-
749
- After the LLM responds, it can suggest follow-up questions as clickable chips. This is powered by an internal `suggest_followups` tool that the LLM calls at the end of a turn. Configurable count (default 3, max 5), locale, and good/bad examples.
750
-
751
- Enable via:
752
-
753
- ```ts
754
- createAiChatHandler({
755
- tools: registry,
756
- followups: { enabled: true, count: 3, locale: 'en-US' },
757
- });
758
- ```
759
-
760
- ### Voice input
761
-
762
- ```tsx
763
- import { VoiceInputButton } from 'glirastes/react';
764
-
765
- <VoiceInputButton
766
- onTranscript={(text) => console.log(text)}
767
- language="en"
768
- baseUrl="/api/ai/speech-transcribe"
769
- getToken={() => authToken}
770
- />
771
- ```
772
-
773
- The voice button streams audio to your backend, which proxies it to a speech-to-text provider (Deepgram, etc.). The API key never leaves the server.
774
-
775
- > Install `wavesurfer.js` (`npm install wavesurfer.js`) to get the live waveform visualization during recording. Without it the button still works — it just falls back to a static recording indicator.
776
-
777
- <br/>
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
185
+ `glirastes tools refresh` derives endpoint, navigation, filter and
186
+ client-action tools from Next.js, NestJS, OpenAPI (FastAPI), react-router and
187
+ vue-router sources, and from `useAiClientAction` registrations. The output is
188
+ committed with the code; `glirastes tools check` fails CI when it is stale.
788
189
 
789
190
  ```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
- ```
191
+ glirastes tools refresh # derive tools (--watch next to `next dev`)
192
+ glirastes tools status # what the chat can do
193
+ glirastes tools check # verify committed outputs, no model, no network
194
+ glirastes tools eval # every example sentence finds its tool
195
+ ```
196
+
197
+ **Policy.** Reads run directly, writes ask first, deletes and anything
198
+ external or financial always ask. Change that locally with
199
+ `glirastes tools policy` (`show`, `disable`, `confirm`, `relax`, `raise`,
200
+ `roles`, `exclude`, ...); it writes `.glirastes/tool-policy.json`. See
201
+ [docs/tool-policy.md](docs/tool-policy.md).
202
+
203
+ **Describing tools.** Glirastes itself never calls a model. Descriptions,
204
+ synonyms and example calls are written by a coding agent from work lists:
205
+
206
+ - **Free:** your own coding agent works through `glirastes tools resolve --print`
207
+ and `glirastes tools describe --print` with the shipped skills
208
+ `maintaining-glirastes-tools` and `describing-glirastes-tools`, and you
209
+ commit the result.
210
+ - **Pro:** the managed CI tool agent (`glirastes tools enrich --managed`)
211
+ runs the same skills in your CI, only on the tools a pull request or push
212
+ changed, and commits the result as `glirastes-bot`. Model requests go
213
+ through OpenRouter with the routing the Platform grants for the job (no
214
+ data collection, zero data retention), or your own key in
215
+ `GLIRASTES_TOOLS_OPENROUTER_KEY`. Requires the optional peer
216
+ `@ai-sdk/openai`.
217
+
218
+ ## CI
812
219
 
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
220
+ ```bash
221
+ npx glirastes init --ci github [--enrich-on staging,main] [--ci-environment staging]
222
+ ```
223
+
224
+ writes `.github/workflows/glirastes-tools.yml` for your package manager with
225
+ two jobs:
226
+
227
+ | Job | What it does | Needs |
228
+ |---|---|---|
229
+ | `glirastes-tools` | `tools check` and `tools eval` on every pull request and push to `main` | nothing: no secrets, no model |
230
+ | `glirastes-tools-enrich` (Pro) | runs the managed tool agent on pull requests and commits into the PR branch | variable `GLIRASTES_MANAGED_TOOLS=true`, variable `GLIRASTES_CONTROL_PLANE_URL`, secret `GLIRASTES_CI_KEY` |
231
+
232
+ - `--enrich-on <branch,...>` (or `--enrich-on-main`) also runs the agent
233
+ after pushes to those branches; there it opens a pull request instead of
234
+ committing, and the workflow gets a manual start that works the whole
235
+ backlog once.
236
+ - `--ci-environment <name>` reads the three values from that GitHub
237
+ environment instead of the repository.
238
+ - Set the variable `GLIRASTES_BOT_APP_ID` and the secret
239
+ `GLIRASTES_BOT_APP_PRIVATE_KEY` to push as a GitHub App, so the bot's
240
+ commits and pull requests trigger your checks. Without them the job uses
241
+ the workflow token.
242
+ - An existing workflow with other content is refused unless you pass `--force`.
243
+
244
+ ## Chat UI & speech
245
+
246
+ `glirastes/react` ships one chat implementation; `VercelAiChat` from
247
+ `glirastes/react/vercel` connects it to the AI SDK route.
248
+
249
+ - Docked sidebar or floating window (`AssistantWorkspace`, `AssistantToggle`),
250
+ themes, slots, tool result renderers and approval cards.
251
+ - `useAiClientAction(id, handler, contract)` lets the chat drive UI state;
252
+ `refresh` turns each registration into a tool.
253
+ - Generic `@` mentions and `/` commands derived from your tools
254
+ ([docs/chat-interactions.md](docs/chat-interactions.md)).
255
+ - A per-message work log of tool calls and an optional plan checklist.
256
+ - `unstyled` to bring your own CSS; `deChatLocale` for German texts.
257
+ - Push-to-talk speech input through one STT controller (`voice` config,
258
+ `glirastes/stt` adapters, `createRecordingTranscriptionHandler` for a
259
+ server-side transcription route). Audio goes from the app to its own
260
+ provider, never through Glirastes.
261
+ - Without React: the `<glirastes-chat>` element from `glirastes/embed` and the
262
+ bridge in `glirastes/browser`.
263
+
264
+ See the skill [`building-glirastes-chat-ui`](skills/building-glirastes-chat-ui/SKILL.md).
265
+
266
+ ## Standalone and Connected
267
+
268
+ | | Standalone | Connected |
269
+ |---|---|---|
270
+ | Trigger | no `GLIRASTES_API_KEY` | `GLIRASTES_API_KEY` is set |
271
+ | Network | none | Platform lookup, registration, sync and metrics, all off the turn path |
272
+ | Config | local code and `.glirastes/` | reviewed, signed, immutable revisions with rollouts and revocations |
273
+
274
+ `createGlirastes` from `glirastes/runtime` handles both. Connected, it falls
275
+ back to the local code whenever the Platform is unreachable and reports errors
276
+ to `onError` (operation and status only). `GLIRASTES_CONTROL_PLANE_URL` is
277
+ optional and defaults to `https://api.glirastes.chainmatics.io`; set it only
278
+ for a self-hosted or local Platform.
832
279
 
833
280
  ```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
281
+ npx glirastes connect --base-url <platform-url> # pair the app, writes GLIRASTES_API_KEY
282
+ npx glirastes sync # upload the current local setup
283
+ npx glirastes doctor # local checks, no network
836
284
  ```
837
285
 
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
-
842
- ## CLI
286
+ The **Glirastes Platform** is the optional control plane: reviewed tool
287
+ configuration, signed immutable revisions, staged rollouts, approvals and
288
+ content-free health. **Free** covers the local SDK, the local skill workflow
289
+ and a connected app; **Pro** adds the managed CI tool agent. Details:
290
+ [docs/managed-runtime-sync.md](docs/managed-runtime-sync.md),
291
+ [docs/runtime-persistence.md](docs/runtime-persistence.md).
843
292
 
844
- The SDK includes a `glirastes` CLI for scaffolding, code generation, and validation. Run any command with `npx glirastes <command>` or `bunx glirastes <command>`:
293
+ ## Package surface
845
294
 
846
- | Command | What it does |
295
+ | Import | Purpose |
847
296
  |---|---|
848
- | `generate` | Generate endpoint tools from an OpenAPI spec |
849
- | `generate-tools` | Scan `*.ai-tool.ts` files, emit registry |
850
- | `generate-endpoint-tools` | Endpoint tool registry only |
851
- | `generate-ui-tools` | UI tool registry + action IDs |
852
- | `generate-modules` | Module (intent) registry |
853
- | `generate-skills` | Export tools as Claude Code / Codex skill files |
854
- | `generate-mcp-server` | Export tools as a standalone MCP server project |
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/`) |
857
- | `validate` | Validate OpenAPI spec for `x-ai` correctness |
858
- | `validate-tools` | Validate AI tool configuration |
859
- | `coverage` | Report which API routes have AI tools and which don't |
860
- | `scaffold` | Generate an `ai-tool.ts` template from an existing route |
861
- | `test` | Scaffold an AI behavior test file |
862
- | `check-upgrade` | Analyze release notes for breaking changes |
863
- | `sync` | Upload tool schemas to the Glirastes platform |
864
-
865
- <br/>
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 |
297
+ | `glirastes` | Shared types, tool definition helpers and diagnostics |
298
+ | `glirastes/runtime` | `createGlirastes`, local authorization, pinned turns, budgets, durable stores |
299
+ | `glirastes/server` | Server pipeline, including `createLocalAiPipeline` |
300
+ | `glirastes/server/nextjs` | Next.js handlers: `createAiChatHandler`, `createChatInteractionsHandler`, `createRecordingTranscriptionHandler` (alias `glirastes/adapter/nextjs`) |
301
+ | `glirastes/server/testing` | Test helpers for tool setups without model calls (ESM only) |
302
+ | `glirastes/react` | Chat UI, provider, hooks, client actions, navigation bridge, STT |
303
+ | `glirastes/react/vercel` | AI SDK transport and `VercelAiChat` |
304
+ | `glirastes/react/styles.css` | Shipped chat styles |
305
+ | `glirastes/stt` | Provider-neutral STT controller and adapters |
306
+ | `glirastes/ai-sdk` | Vercel AI SDK reference engine (alias `glirastes/runtime/ai-sdk`) |
307
+ | `glirastes/contracts` | Principals, budgets, manifests, revisions, deployments |
308
+ | `glirastes/sync` | Signed revision cache, rollout selection, revocations |
309
+ | `glirastes/embed` | `<glirastes-chat>` element for apps without React |
310
+ | `glirastes/browser` | Navigation bridge, query filters and client actions without React |
311
+ | `glirastes/codegen` | Route scanning and execution-inventory discovery used by the CLI |
312
+
313
+ ## CLI reference
314
+
315
+ | Command | Purpose |
872
316
  |---|---|
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
317
+ | `glirastes init [--agent codex\|claude] [--dry-run] [--json]` | Scaffold inputs, install skills, hand setup to your coding agent |
318
+ | `glirastes init --ci github [...]` | Write the GitHub tools workflow ([CI](#ci)) |
319
+ | `glirastes tools refresh [--watch] [--mode write\|frozen\|integrity]` | Derive tools from the code |
320
+ | `glirastes tools check [--strict] [--integrity-only]` | Verify committed tool outputs |
321
+ | `glirastes tools status` | Show what the chat can do |
322
+ | `glirastes tools resolve --print` | Work list of open findings for your agent |
323
+ | `glirastes tools describe --print [<tool>...\|--all]` | Work list of descriptions, synonyms and examples |
324
+ | `glirastes tools eval` | Check that example sentences find their tool |
325
+ | `glirastes tools verify <tool>...\|--all` | Confirm agent-written contracts after review |
326
+ | `glirastes tools policy <...>` | Change the local tool policy |
327
+ | `glirastes tools enrich --managed [--first-run] [--base <branch>]` | Pro, CI only: run the managed tool agent |
328
+ | `glirastes setup [--dry-run] [--managed]` | Validate and install the local setup artifacts |
329
+ | `glirastes setup inspect` | Inspect project manifests before integration |
330
+ | `glirastes connect --base-url <url>` | Pair the app with the Platform |
331
+ | `glirastes sync` | Upload the current local setup |
332
+ | `glirastes doctor [--managed] [--verbose] [--json]` | Diagnose the local setup |
333
+ | `glirastes install [--host a,b]` | Install the agent skills only |
334
+
335
+ `glirastes --help` lists every command and flag; `glirastes tools` and
336
+ `glirastes tools policy` print their own usage.
900
337
 
901
- # Auto-update with the SDK on every npm install
902
- npx glirastes install-skills --symlink
338
+ ## Agent skills
903
339
 
904
- # Preview without writing
905
- npx glirastes install-skills --dry-run
340
+ The package ships seven skills in [`skills/`](skills/README.md) for your
341
+ existing coding agent (Codex, Claude Code, Gemini): `setting-up-glirastes`,
342
+ `integrating-glirastes-nextjs`, `integrating-glirastes-web`,
343
+ `maintaining-glirastes-tools`, `describing-glirastes-tools`,
344
+ `building-glirastes-chat-ui` and `migrating-to-glirastes`. `glirastes init`
345
+ installs them; `glirastes install --host codex --with-setup-skills` installs
346
+ them without starting setup.
906
347
 
907
- # Overwrite previously installed skills
908
- npx glirastes install-skills --force
909
- ```
348
+ ## Support matrix
910
349
 
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.
350
+ Next.js 15 App Router, React (Vite, react-router) + NestJS 11 and Vue 3 +
351
+ FastAPI are integrated and automatically checked. Exact levels and evidence:
352
+ [docs/support-matrix.md](docs/support-matrix.md).
912
353
 
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.
354
+ ## Docs
914
355
 
915
- <br/>
356
+ - [Support matrix](docs/support-matrix.md)
357
+ - [Tool policy](docs/tool-policy.md)
358
+ - [Chat interactions (`@` and `/`)](docs/chat-interactions.md)
359
+ - [Managed runtime sync](docs/managed-runtime-sync.md)
360
+ - [Runtime persistence](docs/runtime-persistence.md)
361
+ - [0.5.0 acceptance](docs/acceptance/0.5.0-acceptance.md)
362
+ - [Agent skills](skills/README.md)
363
+ - Examples: [`examples/`](examples/)
916
364
 
917
- ## License
365
+ ## Upgrading from 0.4
918
366
 
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.
367
+ `0.5.0` is the first Foundation release. Its surface differs from
368
+ `glirastes@0.4.0`: exports, codegen APIs and CLI commands were removed or
369
+ replaced. Read **Breaking** in [CHANGELOG.md](CHANGELOG.md) before upgrading;
370
+ the skill [`migrating-to-glirastes`](skills/migrating-to-glirastes/SKILL.md)
371
+ covers moving off `@chainmatics/agentic-*`.
920
372
 
921
- <br/>
373
+ ## Security & License
922
374
 
923
- ---
375
+ Report vulnerabilities as described in [SECURITY.md](SECURITY.md).
376
+ Contributions: [CONTRIBUTING.md](CONTRIBUTING.md).
924
377
 
925
- <p align="center">
926
- <sub>Built by <a href="https://chainmatics.de">Chainmatics</a></sub>
927
- </p>
378
+ Apache-2.0, see [LICENSE](LICENSE) and [NOTICE](NOTICE).