glirastes 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1387) hide show
  1. package/CHANGELOG.md +377 -1
  2. package/README.md +283 -847
  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/approval-card.js +20 -1
  135. package/dist/cjs/react/components/chat-input.js +6 -4
  136. package/dist/cjs/react/components/chat-window-visibility.d.ts +3 -0
  137. package/dist/cjs/react/components/chat-window-visibility.js +7 -0
  138. package/dist/cjs/react/components/chat-window.d.ts +1 -1
  139. package/dist/cjs/react/components/chat-window.js +124 -57
  140. package/dist/cjs/react/components/clarification-card.d.ts +10 -0
  141. package/dist/cjs/react/components/clarification-card.js +35 -0
  142. package/dist/cjs/react/components/command-arguments-form.d.ts +10 -0
  143. package/dist/cjs/react/components/command-arguments-form.js +153 -0
  144. package/dist/cjs/react/components/confirm-dialog.js +1 -1
  145. package/dist/cjs/react/components/floating-chat-ui.d.ts +3 -3
  146. package/dist/cjs/react/components/floating-chat-ui.js +30 -4
  147. package/dist/cjs/react/components/mention-input.d.ts +5 -4
  148. package/dist/cjs/react/components/mention-input.js +64 -7
  149. package/dist/cjs/react/components/message-bubble.js +90 -14
  150. package/dist/cjs/react/components/plan-checklist.d.ts +14 -0
  151. package/dist/cjs/react/components/plan-checklist.js +20 -0
  152. package/dist/cjs/react/components/recording-bar.js +44 -58
  153. package/dist/cjs/react/components/rich-mention-input.js +197 -45
  154. package/dist/cjs/react/components/session-switcher.d.ts +3 -1
  155. package/dist/cjs/react/components/session-switcher.js +26 -11
  156. package/dist/cjs/react/components/status-icon.d.ts +8 -0
  157. package/dist/cjs/react/components/status-icon.js +11 -0
  158. package/dist/cjs/react/components/stream-waveform.d.ts +4 -0
  159. package/dist/cjs/react/components/stream-waveform.js +49 -0
  160. package/dist/cjs/react/components/voice-input-addon.d.ts +16 -1
  161. package/dist/cjs/react/components/voice-input-addon.js +255 -18
  162. package/dist/cjs/react/components/voice-input-button.js +1 -1
  163. package/dist/cjs/react/hooks/use-chat-shortcuts.d.ts +33 -0
  164. package/dist/cjs/react/hooks/use-chat-shortcuts.js +139 -0
  165. package/dist/cjs/react/hooks/use-deepgram-transcription.d.ts +4 -0
  166. package/dist/cjs/react/hooks/use-deepgram-transcription.js +31 -321
  167. package/dist/cjs/react/hooks/use-drag-resize-panel.d.ts +1 -0
  168. package/dist/cjs/react/hooks/use-drag-resize-panel.js +246 -121
  169. package/dist/cjs/react/hooks/use-floating-panel.d.ts +57 -0
  170. package/dist/cjs/react/hooks/use-floating-panel.js +217 -0
  171. package/dist/cjs/react/hooks/use-keyboard-shortcut.js +2 -1
  172. package/dist/cjs/react/hooks/use-push-to-talk-hotkey.d.ts +24 -0
  173. package/dist/cjs/react/hooks/use-push-to-talk-hotkey.js +116 -0
  174. package/dist/cjs/react/hooks/use-sidebar-resize.d.ts +19 -0
  175. package/dist/cjs/react/hooks/use-sidebar-resize.js +109 -0
  176. package/dist/cjs/react/index.d.ts +30 -1
  177. package/dist/cjs/react/index.js +91 -1
  178. package/dist/cjs/react/interactions/definitions.d.ts +67 -0
  179. package/dist/cjs/react/interactions/definitions.js +83 -0
  180. package/dist/cjs/react/interactions/registry.d.ts +74 -0
  181. package/dist/cjs/react/interactions/registry.js +250 -0
  182. package/dist/cjs/react/interactions/use-chat-interactions-data.d.ts +15 -0
  183. package/dist/cjs/react/interactions/use-chat-interactions-data.js +43 -0
  184. package/dist/cjs/react/locale-de.d.ts +3 -0
  185. package/dist/cjs/react/locale-de.js +69 -0
  186. package/dist/cjs/react/provider/ai-chat-provider.d.ts +1 -1
  187. package/dist/cjs/react/provider/ai-chat-provider.js +410 -106
  188. package/dist/cjs/react/provider/chat-context.d.ts +52 -1
  189. package/dist/cjs/react/stt/controller.d.ts +60 -0
  190. package/dist/cjs/react/stt/controller.js +268 -0
  191. package/dist/cjs/react/stt/deepgram.d.ts +30 -0
  192. package/dist/cjs/react/stt/deepgram.js +204 -0
  193. package/dist/cjs/react/stt/recorded.d.ts +29 -0
  194. package/dist/cjs/react/stt/recorded.js +115 -0
  195. package/dist/cjs/react/stt/segments.d.ts +18 -0
  196. package/dist/cjs/react/stt/segments.js +32 -0
  197. package/dist/cjs/react/stt/use-stt.d.ts +17 -0
  198. package/dist/cjs/react/stt/use-stt.js +41 -0
  199. package/dist/cjs/react/stt/waveform.d.ts +5 -0
  200. package/dist/cjs/react/stt/waveform.js +31 -0
  201. package/dist/cjs/react/styles.css +1555 -0
  202. package/dist/cjs/react/tool-renderers/registry.d.ts +31 -0
  203. package/dist/cjs/react/tool-renderers/registry.js +50 -0
  204. package/dist/cjs/react/tool-renderers/renderer-boundary.d.ts +18 -0
  205. package/dist/cjs/react/tool-renderers/renderer-boundary.js +15 -0
  206. package/dist/cjs/react/transports/vercel/vercel-ai-chat.d.ts +1 -1
  207. package/dist/cjs/react/transports/vercel/vercel-ai-chat.js +2 -2
  208. package/dist/cjs/react/transports/vercel.d.ts +6 -0
  209. package/dist/cjs/react/transports/vercel.js +12 -6
  210. package/dist/cjs/react/types.d.ts +269 -6
  211. package/dist/cjs/react/ui.d.ts +18 -17
  212. package/dist/cjs/react/ui.js +50 -45
  213. package/dist/cjs/react/unstyled.d.ts +7 -0
  214. package/dist/cjs/react/unstyled.js +10 -0
  215. package/dist/cjs/react/utils/activity.d.ts +16 -0
  216. package/dist/cjs/react/utils/activity.js +80 -0
  217. package/dist/cjs/react/utils/clarification.d.ts +31 -0
  218. package/dist/cjs/react/utils/clarification.js +104 -0
  219. package/dist/cjs/react/utils/create-approval-description.d.ts +6 -0
  220. package/dist/cjs/react/utils/create-approval-description.js +42 -7
  221. package/dist/cjs/react/utils/create-tool-result-handler.d.ts +1 -1
  222. package/dist/cjs/react/utils/create-tool-result-handler.js +1 -1
  223. package/dist/cjs/react/utils/entity-names.d.ts +6 -0
  224. package/dist/cjs/react/utils/entity-names.js +57 -0
  225. package/dist/cjs/react/utils/followup-suggestions.d.ts +11 -0
  226. package/dist/cjs/react/utils/followup-suggestions.js +39 -0
  227. package/dist/cjs/react/utils/local-session-store.d.ts +30 -0
  228. package/dist/cjs/react/utils/local-session-store.js +165 -0
  229. package/dist/cjs/react/utils/mention-markup.d.ts +44 -1
  230. package/dist/cjs/react/utils/mention-markup.js +144 -10
  231. package/dist/cjs/react/utils/tool-presentation.d.ts +23 -0
  232. package/dist/cjs/react/utils/tool-presentation.js +46 -0
  233. package/dist/cjs/react/utils/tool-result-config.d.ts +10 -0
  234. package/dist/cjs/react/utils/tool-result-config.js +14 -0
  235. package/dist/cjs/runtime/ai-sdk/engine.d.ts +66 -0
  236. package/dist/cjs/runtime/ai-sdk/engine.js +192 -0
  237. package/dist/cjs/runtime/ai-sdk/index.d.ts +1 -0
  238. package/dist/cjs/runtime/ai-sdk/index.js +5 -0
  239. package/dist/cjs/runtime/authorization.d.ts +16 -0
  240. package/dist/cjs/runtime/authorization.js +35 -0
  241. package/dist/cjs/runtime/budget.d.ts +39 -0
  242. package/dist/cjs/runtime/budget.js +100 -0
  243. package/dist/cjs/runtime/contract-bindings.d.ts +52 -0
  244. package/dist/cjs/runtime/contract-bindings.js +95 -0
  245. package/dist/cjs/runtime/engine.d.ts +52 -0
  246. package/dist/cjs/runtime/engine.js +2 -0
  247. package/dist/cjs/runtime/fingerprint.d.ts +6 -0
  248. package/dist/cjs/runtime/fingerprint.js +31 -0
  249. package/dist/cjs/runtime/glirastes.d.ts +113 -0
  250. package/dist/cjs/runtime/glirastes.js +289 -0
  251. package/dist/cjs/runtime/index.d.ts +24 -0
  252. package/dist/cjs/runtime/index.js +74 -0
  253. package/dist/cjs/runtime/json-schema.d.ts +13 -0
  254. package/dist/cjs/runtime/json-schema.js +46 -0
  255. package/dist/cjs/runtime/local-limits.d.ts +6 -0
  256. package/dist/cjs/runtime/local-limits.js +26 -0
  257. package/dist/cjs/runtime/local-runtime-source.d.ts +76 -0
  258. package/dist/cjs/runtime/local-runtime-source.js +0 -0
  259. package/dist/cjs/runtime/local-signer.d.ts +17 -0
  260. package/dist/cjs/runtime/local-signer.js +34 -0
  261. package/dist/cjs/runtime/local-tool-bindings.d.ts +57 -0
  262. package/dist/cjs/runtime/local-tool-bindings.js +197 -0
  263. package/dist/cjs/runtime/managed-turn.d.ts +29 -0
  264. package/dist/cjs/runtime/managed-turn.js +99 -0
  265. package/dist/cjs/runtime/metrics/cost.d.ts +64 -0
  266. package/dist/cjs/runtime/metrics/cost.js +98 -0
  267. package/dist/cjs/runtime/metrics/sink.d.ts +56 -0
  268. package/dist/cjs/runtime/metrics/sink.js +217 -0
  269. package/dist/cjs/runtime/metrics/turn-recorder.d.ts +62 -0
  270. package/dist/cjs/runtime/metrics/turn-recorder.js +172 -0
  271. package/dist/cjs/runtime/offline-execution-lease.d.ts +27 -0
  272. package/dist/cjs/runtime/offline-execution-lease.js +49 -0
  273. package/dist/cjs/runtime/policy-overlay.d.ts +86 -0
  274. package/dist/cjs/runtime/policy-overlay.js +122 -0
  275. package/dist/cjs/runtime/postgres-store.d.ts +111 -0
  276. package/dist/cjs/runtime/postgres-store.js +368 -0
  277. package/dist/cjs/runtime/prompt-bundle-store.d.ts +58 -0
  278. package/dist/cjs/runtime/prompt-bundle-store.js +123 -0
  279. package/dist/cjs/runtime/runtime-mode.d.ts +23 -0
  280. package/dist/cjs/runtime/runtime-mode.js +46 -0
  281. package/dist/cjs/runtime/sdk-version.d.ts +2 -0
  282. package/dist/cjs/runtime/sdk-version.js +5 -0
  283. package/dist/cjs/runtime/tool-discovery.d.ts +51 -0
  284. package/dist/cjs/runtime/tool-discovery.js +141 -0
  285. package/dist/cjs/runtime/tool-search.d.ts +31 -0
  286. package/dist/cjs/runtime/tool-search.js +149 -0
  287. package/dist/cjs/runtime/turn-snapshot.d.ts +44 -0
  288. package/dist/cjs/runtime/turn-snapshot.js +112 -0
  289. package/dist/cjs/server/adapters/nextjs/approval-binding.d.ts +334 -0
  290. package/dist/cjs/server/adapters/nextjs/approval-binding.js +724 -0
  291. package/dist/cjs/server/adapters/nextjs/chat-interactions-handler.d.ts +26 -0
  292. package/dist/cjs/server/adapters/nextjs/chat-interactions-handler.js +67 -0
  293. package/dist/cjs/server/adapters/nextjs/clarification-resume.d.ts +21 -0
  294. package/dist/cjs/server/adapters/nextjs/clarification-resume.js +112 -0
  295. package/dist/cjs/server/adapters/nextjs/context-helpers.d.ts +49 -8
  296. package/dist/cjs/server/adapters/nextjs/context-helpers.js +76 -21
  297. package/dist/cjs/server/adapters/nextjs/create-ai-chat-handler.d.ts +59 -1
  298. package/dist/cjs/server/adapters/nextjs/create-ai-chat-handler.js +648 -94
  299. package/dist/cjs/server/adapters/nextjs/direct-command.d.ts +75 -0
  300. package/dist/cjs/server/adapters/nextjs/direct-command.js +322 -0
  301. package/dist/cjs/server/adapters/nextjs/index.d.ts +10 -2
  302. package/dist/cjs/server/adapters/nextjs/index.js +24 -1
  303. package/dist/cjs/server/adapters/nextjs/prepare-model-messages.d.ts +2 -1
  304. package/dist/cjs/server/adapters/nextjs/prepare-model-messages.js +6 -14
  305. package/dist/cjs/server/adapters/nextjs/recording-transcription-handler.d.ts +31 -0
  306. package/dist/cjs/server/adapters/nextjs/recording-transcription-handler.js +58 -0
  307. package/dist/cjs/server/adapters/nextjs/request-guards.d.ts +41 -0
  308. package/dist/cjs/server/adapters/nextjs/request-guards.js +112 -0
  309. package/dist/cjs/server/adapters/nextjs/sanitize-model-messages.js +12 -6
  310. package/dist/cjs/server/adapters/nextjs/scope-pipeline-tools.d.ts +17 -0
  311. package/dist/cjs/server/adapters/nextjs/scope-pipeline-tools.js +28 -0
  312. package/dist/cjs/server/adapters/nextjs/tool-discovery.d.ts +39 -0
  313. package/dist/cjs/server/adapters/nextjs/tool-discovery.js +50 -0
  314. package/dist/cjs/server/adapters/nextjs/tool-presentation.d.ts +26 -0
  315. package/dist/cjs/server/adapters/nextjs/tool-presentation.js +21 -0
  316. package/dist/cjs/server/adapters/nextjs/types.d.ts +229 -13
  317. package/dist/cjs/server/adapters/nextjs/with-ai-tool.d.ts +2 -2
  318. package/dist/cjs/server/core/adaptive-fast-path.d.ts +3 -0
  319. package/dist/cjs/server/core/adaptive-fast-path.js +188 -0
  320. package/dist/cjs/server/core/clarification-tool.d.ts +29 -0
  321. package/dist/cjs/server/core/clarification-tool.js +64 -0
  322. package/dist/cjs/server/core/generated-ui-tool.d.ts +31 -0
  323. package/dist/cjs/server/core/generated-ui-tool.js +89 -0
  324. package/dist/cjs/server/core/index.d.ts +49 -8
  325. package/dist/cjs/server/core/index.js +208 -17
  326. package/dist/cjs/server/core/local-guardrails.d.ts +6 -0
  327. package/dist/cjs/server/core/local-guardrails.js +70 -0
  328. package/dist/cjs/server/core/module-router.d.ts +3 -1
  329. package/dist/cjs/server/core/module-router.js +22 -2
  330. package/dist/cjs/server/core/plan-tool.d.ts +23 -0
  331. package/dist/cjs/server/core/plan-tool.js +35 -0
  332. package/dist/cjs/server/core/zod-compact.d.ts +2 -2
  333. package/dist/cjs/server/core/zod-compact.js +56 -7
  334. package/dist/cjs/server/index.d.ts +2 -4
  335. package/dist/cjs/server/index.js +4 -5
  336. package/dist/cjs/server/lancer/client.js +2 -1
  337. package/dist/cjs/server/local-pipeline.d.ts +14 -0
  338. package/dist/cjs/server/local-pipeline.js +154 -0
  339. package/dist/cjs/server/pii-shield/index.d.ts +1 -0
  340. package/dist/cjs/server/pii-shield/index.js +3 -1
  341. package/dist/cjs/server/pii-shield/regex-detector.d.ts +13 -0
  342. package/dist/cjs/server/pii-shield/regex-detector.js +111 -0
  343. package/dist/cjs/server/testing/guardrails.js +2 -66
  344. package/dist/cjs/server/testing/helpers.js +1 -62
  345. package/dist/cjs/server/testing/index.d.ts +1 -0
  346. package/dist/cjs/server/testing/index.js +3 -1
  347. package/dist/cjs/server/testing/registry-parity.d.ts +18 -0
  348. package/dist/cjs/server/testing/registry-parity.js +40 -0
  349. package/dist/cjs/server/testing/smoke.d.ts +2 -1
  350. package/dist/cjs/server/testing/smoke.js +7 -3
  351. package/dist/cjs/server/testing/types.d.ts +1 -1
  352. package/dist/cjs/server/testing/zod-introspect.d.ts +1 -1
  353. package/dist/cjs/server/testing/zod-introspect.js +178 -5
  354. package/dist/cjs/stt/index.d.ts +5 -0
  355. package/dist/cjs/stt/index.js +16 -0
  356. package/dist/cjs/sync/app-setup-client.d.ts +46 -0
  357. package/dist/cjs/sync/app-setup-client.js +140 -0
  358. package/dist/cjs/sync/capability-report.d.ts +41 -0
  359. package/dist/cjs/sync/capability-report.js +52 -0
  360. package/dist/cjs/sync/connection-lookup.d.ts +19 -0
  361. package/dist/cjs/sync/connection-lookup.js +58 -0
  362. package/dist/cjs/sync/control-plane-client.d.ts +69 -0
  363. package/dist/cjs/sync/control-plane-client.js +186 -0
  364. package/dist/cjs/sync/deployment-selector.d.ts +9 -0
  365. package/dist/cjs/sync/deployment-selector.js +29 -0
  366. package/dist/cjs/sync/fetch-sse-push.d.ts +6 -0
  367. package/dist/cjs/sync/fetch-sse-push.js +45 -0
  368. package/dist/cjs/sync/index.d.ts +26 -0
  369. package/dist/cjs/sync/index.js +43 -0
  370. package/dist/cjs/sync/jwks-provider.d.ts +14 -0
  371. package/dist/cjs/sync/jwks-provider.js +56 -0
  372. package/dist/cjs/sync/local-deployment-validator.d.ts +30 -0
  373. package/dist/cjs/sync/local-deployment-validator.js +62 -0
  374. package/dist/cjs/sync/managed-sync.d.ts +40 -0
  375. package/dist/cjs/sync/managed-sync.js +96 -0
  376. package/dist/cjs/sync/materialize-deployment.d.ts +7 -0
  377. package/dist/cjs/sync/materialize-deployment.js +65 -0
  378. package/dist/cjs/sync/runtime-connect-client.d.ts +23 -0
  379. package/dist/cjs/sync/runtime-connect-client.js +185 -0
  380. package/dist/cjs/sync/runtime-setup-client.d.ts +62 -0
  381. package/dist/cjs/sync/runtime-setup-client.js +157 -0
  382. package/dist/cjs/sync/signature-verifier.d.ts +39 -0
  383. package/dist/cjs/sync/signature-verifier.js +102 -0
  384. package/dist/cjs/sync/state-store.d.ts +24 -0
  385. package/dist/cjs/sync/state-store.js +51 -0
  386. package/dist/cjs/sync/sync-manager.d.ts +27 -0
  387. package/dist/cjs/sync/sync-manager.js +173 -0
  388. package/dist/cjs/types.d.ts +68 -16
  389. package/dist/cjs/types.js +30 -2
  390. package/dist/cli/bin.js +34 -23
  391. package/dist/cli/bin.js.map +1 -1
  392. package/dist/cli/commands/agent-setup.d.ts +27 -0
  393. package/dist/cli/commands/agent-setup.js +149 -0
  394. package/dist/cli/commands/agent-setup.js.map +1 -0
  395. package/dist/cli/commands/apply-setup-plan.d.ts +21 -0
  396. package/dist/cli/commands/apply-setup-plan.js +100 -0
  397. package/dist/cli/commands/apply-setup-plan.js.map +1 -0
  398. package/dist/cli/commands/atomic-artifact-write.d.ts +19 -0
  399. package/dist/cli/commands/atomic-artifact-write.js +106 -0
  400. package/dist/cli/commands/atomic-artifact-write.js.map +1 -0
  401. package/dist/cli/commands/ci-workflow.d.ts +48 -0
  402. package/dist/cli/commands/ci-workflow.js +209 -0
  403. package/dist/cli/commands/ci-workflow.js.map +1 -0
  404. package/dist/cli/commands/connect.d.ts +47 -0
  405. package/dist/cli/commands/connect.js +216 -0
  406. package/dist/cli/commands/connect.js.map +1 -0
  407. package/dist/cli/commands/connection-descriptor.d.ts +4 -0
  408. package/dist/cli/commands/connection-descriptor.js +47 -0
  409. package/dist/cli/commands/connection-descriptor.js.map +1 -0
  410. package/dist/cli/commands/connection-environment.d.ts +25 -0
  411. package/dist/cli/commands/connection-environment.js +151 -0
  412. package/dist/cli/commands/connection-environment.js.map +1 -0
  413. package/dist/cli/commands/current-setup-manifests.d.ts +7 -0
  414. package/dist/cli/commands/current-setup-manifests.js +16 -0
  415. package/dist/cli/commands/current-setup-manifests.js.map +1 -0
  416. package/dist/cli/commands/doctor-presentation.d.ts +5 -0
  417. package/dist/cli/commands/doctor-presentation.js +86 -0
  418. package/dist/cli/commands/doctor-presentation.js.map +1 -0
  419. package/dist/cli/commands/doctor.d.ts +27 -0
  420. package/dist/cli/commands/doctor.js +220 -0
  421. package/dist/cli/commands/doctor.js.map +1 -0
  422. package/dist/cli/commands/init-scaffold.d.ts +25 -0
  423. package/dist/cli/commands/init-scaffold.js +214 -0
  424. package/dist/cli/commands/init-scaffold.js.map +1 -0
  425. package/dist/cli/commands/install-skills.d.ts +26 -4
  426. package/dist/cli/commands/install-skills.js +165 -80
  427. package/dist/cli/commands/install-skills.js.map +1 -1
  428. package/dist/cli/commands/installed-skills-manifest.d.ts +87 -0
  429. package/dist/cli/commands/installed-skills-manifest.js +124 -0
  430. package/dist/cli/commands/installed-skills-manifest.js.map +1 -0
  431. package/dist/cli/commands/installer-parts.d.ts +31 -0
  432. package/dist/cli/commands/installer-parts.js +94 -0
  433. package/dist/cli/commands/installer-parts.js.map +1 -0
  434. package/dist/cli/commands/project-inspection.d.ts +35 -0
  435. package/dist/cli/commands/project-inspection.js +199 -0
  436. package/dist/cli/commands/project-inspection.js.map +1 -0
  437. package/dist/cli/commands/setup-plan.d.ts +65 -0
  438. package/dist/cli/commands/setup-plan.js +234 -0
  439. package/dist/cli/commands/setup-plan.js.map +1 -0
  440. package/dist/cli/commands/setup-profile.d.ts +28 -0
  441. package/dist/cli/commands/setup-profile.js +152 -0
  442. package/dist/cli/commands/setup-profile.js.map +1 -0
  443. package/dist/cli/commands/setup-wizard.d.ts +66 -0
  444. package/dist/cli/commands/setup-wizard.js +241 -0
  445. package/dist/cli/commands/setup-wizard.js.map +1 -0
  446. package/dist/cli/commands/sync.d.ts +58 -0
  447. package/dist/cli/commands/sync.js +233 -0
  448. package/dist/cli/commands/sync.js.map +1 -0
  449. package/dist/cli/commands/tools/args.d.ts +14 -0
  450. package/dist/cli/commands/tools/args.js +33 -0
  451. package/dist/cli/commands/tools/args.js.map +1 -0
  452. package/dist/cli/commands/tools/check.d.ts +7 -0
  453. package/dist/cli/commands/tools/check.js +35 -0
  454. package/dist/cli/commands/tools/check.js.map +1 -0
  455. package/dist/cli/commands/tools/describe.d.ts +12 -0
  456. package/dist/cli/commands/tools/describe.js +43 -0
  457. package/dist/cli/commands/tools/describe.js.map +1 -0
  458. package/dist/cli/commands/tools/enrich.d.ts +50 -0
  459. package/dist/cli/commands/tools/enrich.js +597 -0
  460. package/dist/cli/commands/tools/enrich.js.map +1 -0
  461. package/dist/cli/commands/tools/eval.d.ts +13 -0
  462. package/dist/cli/commands/tools/eval.js +49 -0
  463. package/dist/cli/commands/tools/eval.js.map +1 -0
  464. package/dist/cli/commands/tools/format.d.ts +42 -0
  465. package/dist/cli/commands/tools/format.js +155 -0
  466. package/dist/cli/commands/tools/format.js.map +1 -0
  467. package/dist/cli/commands/tools/index.d.ts +26 -0
  468. package/dist/cli/commands/tools/index.js +107 -0
  469. package/dist/cli/commands/tools/index.js.map +1 -0
  470. package/dist/cli/commands/tools/policy.d.ts +11 -0
  471. package/dist/cli/commands/tools/policy.js +355 -0
  472. package/dist/cli/commands/tools/policy.js.map +1 -0
  473. package/dist/cli/commands/tools/refresh.d.ts +6 -0
  474. package/dist/cli/commands/tools/refresh.js +87 -0
  475. package/dist/cli/commands/tools/refresh.js.map +1 -0
  476. package/dist/cli/commands/tools/resolve.d.ts +10 -0
  477. package/dist/cli/commands/tools/resolve.js +19 -0
  478. package/dist/cli/commands/tools/resolve.js.map +1 -0
  479. package/dist/cli/commands/tools/status.d.ts +11 -0
  480. package/dist/cli/commands/tools/status.js +76 -0
  481. package/dist/cli/commands/tools/status.js.map +1 -0
  482. package/dist/cli/commands/tools/verify.d.ts +13 -0
  483. package/dist/cli/commands/tools/verify.js +168 -0
  484. package/dist/cli/commands/tools/verify.js.map +1 -0
  485. package/dist/cli/commands/tools/watch.d.ts +27 -0
  486. package/dist/cli/commands/tools/watch.js +148 -0
  487. package/dist/cli/commands/tools/watch.js.map +1 -0
  488. package/dist/cli/commands/validate-build.d.ts +88 -0
  489. package/dist/cli/commands/validate-build.js +213 -0
  490. package/dist/cli/commands/validate-build.js.map +1 -0
  491. package/dist/cli/commands/workspace-sources.d.ts +27 -0
  492. package/dist/cli/commands/workspace-sources.js +159 -0
  493. package/dist/cli/commands/workspace-sources.js.map +1 -0
  494. package/dist/cli/environment-loading.d.ts +6 -0
  495. package/dist/cli/environment-loading.js +18 -0
  496. package/dist/cli/environment-loading.js.map +1 -0
  497. package/dist/cli/index.d.ts +14 -1
  498. package/dist/cli/index.js +558 -574
  499. package/dist/cli/index.js.map +1 -1
  500. package/dist/codegen/execution-inventory.d.ts +63 -0
  501. package/dist/codegen/execution-inventory.js +306 -0
  502. package/dist/codegen/execution-inventory.js.map +1 -0
  503. package/dist/codegen/index.d.ts +4 -13
  504. package/dist/codegen/index.js +4 -12
  505. package/dist/codegen/index.js.map +1 -1
  506. package/dist/codegen/inventory-generation.d.ts +104 -0
  507. package/dist/codegen/inventory-generation.js +119 -0
  508. package/dist/codegen/inventory-generation.js.map +1 -0
  509. package/dist/codegen/next-source-generation.d.ts +17 -0
  510. package/dist/codegen/next-source-generation.js +49 -0
  511. package/dist/codegen/next-source-generation.js.map +1 -0
  512. package/dist/codegen/openapi-document.d.ts +53 -0
  513. package/dist/codegen/openapi-document.js +120 -0
  514. package/dist/codegen/openapi-document.js.map +1 -0
  515. package/dist/codegen/route-exports.d.ts +13 -0
  516. package/dist/codegen/route-exports.js +117 -0
  517. package/dist/codegen/route-exports.js.map +1 -0
  518. package/dist/codegen/route-fingerprint.d.ts +2 -0
  519. package/dist/codegen/route-fingerprint.js +9 -0
  520. package/dist/codegen/route-fingerprint.js.map +1 -0
  521. package/dist/codegen/route-scanner.d.ts +57 -0
  522. package/dist/codegen/route-scanner.js +233 -0
  523. package/dist/codegen/route-scanner.js.map +1 -0
  524. package/dist/codegen/tools/agentic.d.ts +31 -0
  525. package/dist/codegen/tools/agentic.js +110 -0
  526. package/dist/codegen/tools/agentic.js.map +1 -0
  527. package/dist/codegen/tools/artifact.d.ts +139 -0
  528. package/dist/codegen/tools/artifact.js +199 -0
  529. package/dist/codegen/tools/artifact.js.map +1 -0
  530. package/dist/codegen/tools/canonical.d.ts +12 -0
  531. package/dist/codegen/tools/canonical.js +41 -0
  532. package/dist/codegen/tools/canonical.js.map +1 -0
  533. package/dist/codegen/tools/chat-interactions.d.ts +27 -0
  534. package/dist/codegen/tools/chat-interactions.js +377 -0
  535. package/dist/codegen/tools/chat-interactions.js.map +1 -0
  536. package/dist/codegen/tools/config.d.ts +116 -0
  537. package/dist/codegen/tools/config.js +172 -0
  538. package/dist/codegen/tools/config.js.map +1 -0
  539. package/dist/codegen/tools/contract-tiers.d.ts +64 -0
  540. package/dist/codegen/tools/contract-tiers.js +518 -0
  541. package/dist/codegen/tools/contract-tiers.js.map +1 -0
  542. package/dist/codegen/tools/emit-module.d.ts +13 -0
  543. package/dist/codegen/tools/emit-module.js +182 -0
  544. package/dist/codegen/tools/emit-module.js.map +1 -0
  545. package/dist/codegen/tools/evidence.d.ts +13 -0
  546. package/dist/codegen/tools/evidence.js +138 -0
  547. package/dist/codegen/tools/evidence.js.map +1 -0
  548. package/dist/codegen/tools/exclusions.d.ts +30 -0
  549. package/dist/codegen/tools/exclusions.js +95 -0
  550. package/dist/codegen/tools/exclusions.js.map +1 -0
  551. package/dist/codegen/tools/files.d.ts +195 -0
  552. package/dist/codegen/tools/files.js +119 -0
  553. package/dist/codegen/tools/files.js.map +1 -0
  554. package/dist/codegen/tools/findings.d.ts +7 -0
  555. package/dist/codegen/tools/findings.js +106 -0
  556. package/dist/codegen/tools/findings.js.map +1 -0
  557. package/dist/codegen/tools/handler-analysis.d.ts +49 -0
  558. package/dist/codegen/tools/handler-analysis.js +375 -0
  559. package/dist/codegen/tools/handler-analysis.js.map +1 -0
  560. package/dist/codegen/tools/handler-locator.d.ts +21 -0
  561. package/dist/codegen/tools/handler-locator.js +152 -0
  562. package/dist/codegen/tools/handler-locator.js.map +1 -0
  563. package/dist/codegen/tools/identity.d.ts +18 -0
  564. package/dist/codegen/tools/identity.js +100 -0
  565. package/dist/codegen/tools/identity.js.map +1 -0
  566. package/dist/codegen/tools/input-roles.d.ts +32 -0
  567. package/dist/codegen/tools/input-roles.js +283 -0
  568. package/dist/codegen/tools/input-roles.js.map +1 -0
  569. package/dist/codegen/tools/inputs.d.ts +33 -0
  570. package/dist/codegen/tools/inputs.js +101 -0
  571. package/dist/codegen/tools/inputs.js.map +1 -0
  572. package/dist/codegen/tools/interface-digest.d.ts +14 -0
  573. package/dist/codegen/tools/interface-digest.js +24 -0
  574. package/dist/codegen/tools/interface-digest.js.map +1 -0
  575. package/dist/codegen/tools/mcp-names.d.ts +23 -0
  576. package/dist/codegen/tools/mcp-names.js +59 -0
  577. package/dist/codegen/tools/mcp-names.js.map +1 -0
  578. package/dist/codegen/tools/mode.d.ts +7 -0
  579. package/dist/codegen/tools/mode.js +27 -0
  580. package/dist/codegen/tools/mode.js.map +1 -0
  581. package/dist/codegen/tools/output-inference.d.ts +6 -0
  582. package/dist/codegen/tools/output-inference.js +99 -0
  583. package/dist/codegen/tools/output-inference.js.map +1 -0
  584. package/dist/codegen/tools/pipeline.d.ts +85 -0
  585. package/dist/codegen/tools/pipeline.js +733 -0
  586. package/dist/codegen/tools/pipeline.js.map +1 -0
  587. package/dist/codegen/tools/probe-child.mjs +155 -0
  588. package/dist/codegen/tools/probe-loader.mjs +105 -0
  589. package/dist/codegen/tools/program.d.ts +16 -0
  590. package/dist/codegen/tools/program.js +80 -0
  591. package/dist/codegen/tools/program.js.map +1 -0
  592. package/dist/codegen/tools/prose.d.ts +42 -0
  593. package/dist/codegen/tools/prose.js +211 -0
  594. package/dist/codegen/tools/prose.js.map +1 -0
  595. package/dist/codegen/tools/resolutions.d.ts +117 -0
  596. package/dist/codegen/tools/resolutions.js +195 -0
  597. package/dist/codegen/tools/resolutions.js.map +1 -0
  598. package/dist/codegen/tools/routing-eval.d.ts +50 -0
  599. package/dist/codegen/tools/routing-eval.js +81 -0
  600. package/dist/codegen/tools/routing-eval.js.map +1 -0
  601. package/dist/codegen/tools/schema-probe.d.ts +62 -0
  602. package/dist/codegen/tools/schema-probe.js +209 -0
  603. package/dist/codegen/tools/schema-probe.js.map +1 -0
  604. package/dist/codegen/tools/semantics.d.ts +134 -0
  605. package/dist/codegen/tools/semantics.js +206 -0
  606. package/dist/codegen/tools/semantics.js.map +1 -0
  607. package/dist/codegen/tools/sources/app-files.d.ts +35 -0
  608. package/dist/codegen/tools/sources/app-files.js +109 -0
  609. package/dist/codegen/tools/sources/app-files.js.map +1 -0
  610. package/dist/codegen/tools/sources/fastapi-routes.py +177 -0
  611. package/dist/codegen/tools/sources/nest-decorators.d.ts +27 -0
  612. package/dist/codegen/tools/sources/nest-decorators.js +65 -0
  613. package/dist/codegen/tools/sources/nest-decorators.js.map +1 -0
  614. package/dist/codegen/tools/sources/nest-endpoints.d.ts +10 -0
  615. package/dist/codegen/tools/sources/nest-endpoints.js +522 -0
  616. package/dist/codegen/tools/sources/nest-endpoints.js.map +1 -0
  617. package/dist/codegen/tools/sources/next-endpoints.d.ts +5 -0
  618. package/dist/codegen/tools/sources/next-endpoints.js +389 -0
  619. package/dist/codegen/tools/sources/next-endpoints.js.map +1 -0
  620. package/dist/codegen/tools/sources/next-pages.d.ts +18 -0
  621. package/dist/codegen/tools/sources/next-pages.js +88 -0
  622. package/dist/codegen/tools/sources/next-pages.js.map +1 -0
  623. package/dist/codegen/tools/sources/openapi-endpoints.d.ts +17 -0
  624. package/dist/codegen/tools/sources/openapi-endpoints.js +395 -0
  625. package/dist/codegen/tools/sources/openapi-endpoints.js.map +1 -0
  626. package/dist/codegen/tools/sources/page-tree.d.ts +49 -0
  627. package/dist/codegen/tools/sources/page-tree.js +152 -0
  628. package/dist/codegen/tools/sources/page-tree.js.map +1 -0
  629. package/dist/codegen/tools/sources/react-actions.d.ts +12 -0
  630. package/dist/codegen/tools/sources/react-actions.js +341 -0
  631. package/dist/codegen/tools/sources/react-actions.js.map +1 -0
  632. package/dist/codegen/tools/sources/route-config.d.ts +49 -0
  633. package/dist/codegen/tools/sources/route-config.js +427 -0
  634. package/dist/codegen/tools/sources/route-config.js.map +1 -0
  635. package/dist/codegen/tools/sources/ui-controls.d.ts +41 -0
  636. package/dist/codegen/tools/sources/ui-controls.js +360 -0
  637. package/dist/codegen/tools/sources/ui-controls.js.map +1 -0
  638. package/dist/codegen/tools/sources/ui-tools.d.ts +79 -0
  639. package/dist/codegen/tools/sources/ui-tools.js +207 -0
  640. package/dist/codegen/tools/sources/ui-tools.js.map +1 -0
  641. package/dist/codegen/tools/sources/url-filters.d.ts +41 -0
  642. package/dist/codegen/tools/sources/url-filters.js +813 -0
  643. package/dist/codegen/tools/sources/url-filters.js.map +1 -0
  644. package/dist/codegen/tools/sources/vue-sfc.d.ts +22 -0
  645. package/dist/codegen/tools/sources/vue-sfc.js +65 -0
  646. package/dist/codegen/tools/sources/vue-sfc.js.map +1 -0
  647. package/dist/codegen/tools/state.d.ts +37 -0
  648. package/dist/codegen/tools/state.js +249 -0
  649. package/dist/codegen/tools/state.js.map +1 -0
  650. package/dist/codegen/tools/types.d.ts +137 -0
  651. package/dist/codegen/tools/types.js +2 -0
  652. package/dist/codegen/tools/types.js.map +1 -0
  653. package/dist/codegen/tools/worklist.d.ts +157 -0
  654. package/dist/codegen/tools/worklist.js +406 -0
  655. package/dist/codegen/tools/worklist.js.map +1 -0
  656. package/dist/contracts/app-setup.d.ts +346 -0
  657. package/dist/contracts/app-setup.js +205 -0
  658. package/dist/contracts/app-setup.js.map +1 -0
  659. package/dist/contracts/chat-command.d.ts +65 -0
  660. package/dist/contracts/chat-command.js +121 -0
  661. package/dist/contracts/chat-command.js.map +1 -0
  662. package/dist/contracts/chat-interactions.d.ts +126 -0
  663. package/dist/contracts/chat-interactions.js +431 -0
  664. package/dist/contracts/chat-interactions.js.map +1 -0
  665. package/dist/contracts/clarification.d.ts +53 -0
  666. package/dist/contracts/clarification.js +86 -0
  667. package/dist/contracts/clarification.js.map +1 -0
  668. package/dist/contracts/content-boundary.d.ts +3 -0
  669. package/dist/contracts/content-boundary.js +91 -0
  670. package/dist/contracts/content-boundary.js.map +1 -0
  671. package/dist/contracts/events.d.ts +273 -0
  672. package/dist/contracts/events.js +227 -0
  673. package/dist/contracts/events.js.map +1 -0
  674. package/dist/contracts/index.d.ts +18 -0
  675. package/dist/contracts/index.js +10 -0
  676. package/dist/contracts/index.js.map +1 -0
  677. package/dist/contracts/plan.d.ts +20 -0
  678. package/dist/contracts/plan.js +35 -0
  679. package/dist/contracts/plan.js.map +1 -0
  680. package/dist/contracts/platform-connection.d.ts +44 -0
  681. package/dist/contracts/platform-connection.js +64 -0
  682. package/dist/contracts/platform-connection.js.map +1 -0
  683. package/dist/contracts/platform-prompt-revision.d.ts +27 -0
  684. package/dist/contracts/platform-prompt-revision.js +44 -0
  685. package/dist/contracts/platform-prompt-revision.js.map +1 -0
  686. package/dist/contracts/prompt-bundle.d.ts +46 -0
  687. package/dist/contracts/prompt-bundle.js +70 -0
  688. package/dist/contracts/prompt-bundle.js.map +1 -0
  689. package/dist/contracts/revisions.d.ts +716 -0
  690. package/dist/contracts/revisions.js +298 -0
  691. package/dist/contracts/revisions.js.map +1 -0
  692. package/dist/contracts/runtime.d.ts +55 -0
  693. package/dist/contracts/runtime.js +65 -0
  694. package/dist/contracts/runtime.js.map +1 -0
  695. package/dist/contracts/semantic-change.d.ts +27 -0
  696. package/dist/contracts/semantic-change.js +101 -0
  697. package/dist/contracts/semantic-change.js.map +1 -0
  698. package/dist/contracts/tool-exclude-pattern.d.ts +12 -0
  699. package/dist/contracts/tool-exclude-pattern.js +27 -0
  700. package/dist/contracts/tool-exclude-pattern.js.map +1 -0
  701. package/dist/contracts/tool-policy-entry.d.ts +107 -0
  702. package/dist/contracts/tool-policy-entry.js +40 -0
  703. package/dist/contracts/tool-policy-entry.js.map +1 -0
  704. package/dist/contracts/tool-policy.d.ts +198 -0
  705. package/dist/contracts/tool-policy.js +485 -0
  706. package/dist/contracts/tool-policy.js.map +1 -0
  707. package/dist/contracts/url.d.ts +2 -0
  708. package/dist/contracts/url.js +8 -0
  709. package/dist/contracts/url.js.map +1 -0
  710. package/dist/diagnostics/foundation-diagnostic.d.ts +34 -0
  711. package/dist/diagnostics/foundation-diagnostic.js +47 -0
  712. package/dist/diagnostics/foundation-diagnostic.js.map +1 -0
  713. package/dist/diagnostics/index.d.ts +2 -0
  714. package/dist/diagnostics/index.js +2 -0
  715. package/dist/diagnostics/index.js.map +1 -0
  716. package/dist/embed/chat-styles.generated.d.ts +1 -0
  717. package/dist/embed/chat-styles.generated.js +4 -0
  718. package/dist/embed/chat-styles.generated.js.map +1 -0
  719. package/dist/embed/glirastes-chat-element.d.ts +67 -0
  720. package/dist/embed/glirastes-chat-element.js +278 -0
  721. package/dist/embed/glirastes-chat-element.js.map +1 -0
  722. package/dist/embed/index.d.ts +4 -0
  723. package/dist/embed/index.js +11 -0
  724. package/dist/embed/index.js.map +1 -0
  725. package/dist/embed/theme.d.ts +10 -0
  726. package/dist/embed/theme.js +41 -0
  727. package/dist/embed/theme.js.map +1 -0
  728. package/dist/index.d.ts +1 -0
  729. package/dist/index.js +1 -0
  730. package/dist/index.js.map +1 -1
  731. package/dist/react/assistant/assistant-layout.d.ts +55 -0
  732. package/dist/react/assistant/assistant-layout.js +99 -0
  733. package/dist/react/assistant/assistant-layout.js.map +1 -0
  734. package/dist/react/assistant/assistant-shell.d.ts +132 -0
  735. package/dist/react/assistant/assistant-shell.js +262 -0
  736. package/dist/react/assistant/assistant-shell.js.map +1 -0
  737. package/dist/react/assistant/assistant-shortcut-list.d.ts +24 -0
  738. package/dist/react/assistant/assistant-shortcut-list.js +32 -0
  739. package/dist/react/assistant/assistant-shortcut-list.js.map +1 -0
  740. package/dist/react/assistant/assistant-workspace.d.ts +31 -0
  741. package/dist/react/assistant/assistant-workspace.js +31 -0
  742. package/dist/react/assistant/assistant-workspace.js.map +1 -0
  743. package/dist/react/completions/completion-search.d.ts +21 -0
  744. package/dist/react/completions/completion-search.js +109 -0
  745. package/dist/react/completions/completion-search.js.map +1 -0
  746. package/dist/react/completions/ui-tool-command-provider.d.ts +15 -0
  747. package/dist/react/completions/ui-tool-command-provider.js +82 -0
  748. package/dist/react/completions/ui-tool-command-provider.js.map +1 -0
  749. package/dist/react/components/activity-log.d.ts +17 -0
  750. package/dist/react/components/activity-log.js +68 -0
  751. package/dist/react/components/activity-log.js.map +1 -0
  752. package/dist/react/components/ai-chat-panel.js +13 -6
  753. package/dist/react/components/ai-chat-panel.js.map +1 -1
  754. package/dist/react/components/ai-trigger-button.d.ts +1 -1
  755. package/dist/react/components/ai-trigger-button.js +13 -68
  756. package/dist/react/components/ai-trigger-button.js.map +1 -1
  757. package/dist/react/components/approval-card.js +20 -1
  758. package/dist/react/components/approval-card.js.map +1 -1
  759. package/dist/react/components/chat-input.js +7 -5
  760. package/dist/react/components/chat-input.js.map +1 -1
  761. package/dist/react/components/chat-window-visibility.d.ts +3 -0
  762. package/dist/react/components/chat-window-visibility.js +5 -0
  763. package/dist/react/components/chat-window-visibility.js.map +1 -0
  764. package/dist/react/components/chat-window.d.ts +1 -1
  765. package/dist/react/components/chat-window.js +124 -57
  766. package/dist/react/components/chat-window.js.map +1 -1
  767. package/dist/react/components/clarification-card.d.ts +10 -0
  768. package/dist/react/components/clarification-card.js +33 -0
  769. package/dist/react/components/clarification-card.js.map +1 -0
  770. package/dist/react/components/command-arguments-form.d.ts +10 -0
  771. package/dist/react/components/command-arguments-form.js +151 -0
  772. package/dist/react/components/command-arguments-form.js.map +1 -0
  773. package/dist/react/components/confirm-dialog.js +1 -1
  774. package/dist/react/components/confirm-dialog.js.map +1 -1
  775. package/dist/react/components/floating-chat-ui.d.ts +3 -3
  776. package/dist/react/components/floating-chat-ui.js +31 -5
  777. package/dist/react/components/floating-chat-ui.js.map +1 -1
  778. package/dist/react/components/mention-input.d.ts +5 -4
  779. package/dist/react/components/mention-input.js +65 -8
  780. package/dist/react/components/mention-input.js.map +1 -1
  781. package/dist/react/components/message-bubble.js +90 -14
  782. package/dist/react/components/message-bubble.js.map +1 -1
  783. package/dist/react/components/plan-checklist.d.ts +14 -0
  784. package/dist/react/components/plan-checklist.js +18 -0
  785. package/dist/react/components/plan-checklist.js.map +1 -0
  786. package/dist/react/components/recording-bar.js +45 -59
  787. package/dist/react/components/recording-bar.js.map +1 -1
  788. package/dist/react/components/rich-mention-input.js +199 -47
  789. package/dist/react/components/rich-mention-input.js.map +1 -1
  790. package/dist/react/components/session-switcher.d.ts +3 -1
  791. package/dist/react/components/session-switcher.js +27 -12
  792. package/dist/react/components/session-switcher.js.map +1 -1
  793. package/dist/react/components/status-icon.d.ts +8 -0
  794. package/dist/react/components/status-icon.js +9 -0
  795. package/dist/react/components/status-icon.js.map +1 -0
  796. package/dist/react/components/stream-waveform.d.ts +4 -0
  797. package/dist/react/components/stream-waveform.js +47 -0
  798. package/dist/react/components/stream-waveform.js.map +1 -0
  799. package/dist/react/components/voice-input-addon.d.ts +16 -1
  800. package/dist/react/components/voice-input-addon.js +256 -19
  801. package/dist/react/components/voice-input-addon.js.map +1 -1
  802. package/dist/react/components/voice-input-button.js +1 -1
  803. package/dist/react/components/voice-input-button.js.map +1 -1
  804. package/dist/react/hooks/use-chat-shortcuts.d.ts +33 -0
  805. package/dist/react/hooks/use-chat-shortcuts.js +133 -0
  806. package/dist/react/hooks/use-chat-shortcuts.js.map +1 -0
  807. package/dist/react/hooks/use-deepgram-transcription.d.ts +4 -0
  808. package/dist/react/hooks/use-deepgram-transcription.js +32 -322
  809. package/dist/react/hooks/use-deepgram-transcription.js.map +1 -1
  810. package/dist/react/hooks/use-drag-resize-panel.d.ts +1 -0
  811. package/dist/react/hooks/use-drag-resize-panel.js +246 -121
  812. package/dist/react/hooks/use-drag-resize-panel.js.map +1 -1
  813. package/dist/react/hooks/use-floating-panel.d.ts +57 -0
  814. package/dist/react/hooks/use-floating-panel.js +215 -0
  815. package/dist/react/hooks/use-floating-panel.js.map +1 -0
  816. package/dist/react/hooks/use-keyboard-shortcut.js +2 -1
  817. package/dist/react/hooks/use-keyboard-shortcut.js.map +1 -1
  818. package/dist/react/hooks/use-push-to-talk-hotkey.d.ts +24 -0
  819. package/dist/react/hooks/use-push-to-talk-hotkey.js +112 -0
  820. package/dist/react/hooks/use-push-to-talk-hotkey.js.map +1 -0
  821. package/dist/react/hooks/use-sidebar-resize.d.ts +19 -0
  822. package/dist/react/hooks/use-sidebar-resize.js +107 -0
  823. package/dist/react/hooks/use-sidebar-resize.js.map +1 -0
  824. package/dist/react/index.d.ts +30 -1
  825. package/dist/react/index.js +31 -0
  826. package/dist/react/index.js.map +1 -1
  827. package/dist/react/interactions/definitions.d.ts +67 -0
  828. package/dist/react/interactions/definitions.js +78 -0
  829. package/dist/react/interactions/definitions.js.map +1 -0
  830. package/dist/react/interactions/registry.d.ts +74 -0
  831. package/dist/react/interactions/registry.js +248 -0
  832. package/dist/react/interactions/registry.js.map +1 -0
  833. package/dist/react/interactions/use-chat-interactions-data.d.ts +15 -0
  834. package/dist/react/interactions/use-chat-interactions-data.js +41 -0
  835. package/dist/react/interactions/use-chat-interactions-data.js.map +1 -0
  836. package/dist/react/locale-de.d.ts +3 -0
  837. package/dist/react/locale-de.js +67 -0
  838. package/dist/react/locale-de.js.map +1 -0
  839. package/dist/react/provider/ai-chat-provider.d.ts +1 -1
  840. package/dist/react/provider/ai-chat-provider.js +411 -107
  841. package/dist/react/provider/ai-chat-provider.js.map +1 -1
  842. package/dist/react/provider/chat-context.d.ts +52 -1
  843. package/dist/react/provider/chat-context.js.map +1 -1
  844. package/dist/react/stt/controller.d.ts +60 -0
  845. package/dist/react/stt/controller.js +265 -0
  846. package/dist/react/stt/controller.js.map +1 -0
  847. package/dist/react/stt/deepgram.d.ts +30 -0
  848. package/dist/react/stt/deepgram.js +199 -0
  849. package/dist/react/stt/deepgram.js.map +1 -0
  850. package/dist/react/stt/recorded.d.ts +29 -0
  851. package/dist/react/stt/recorded.js +111 -0
  852. package/dist/react/stt/recorded.js.map +1 -0
  853. package/dist/react/stt/segments.d.ts +18 -0
  854. package/dist/react/stt/segments.js +29 -0
  855. package/dist/react/stt/segments.js.map +1 -0
  856. package/dist/react/stt/use-stt.d.ts +17 -0
  857. package/dist/react/stt/use-stt.js +39 -0
  858. package/dist/react/stt/use-stt.js.map +1 -0
  859. package/dist/react/stt/waveform.d.ts +5 -0
  860. package/dist/react/stt/waveform.js +29 -0
  861. package/dist/react/stt/waveform.js.map +1 -0
  862. package/dist/react/styles.css +784 -126
  863. package/dist/react/tool-renderers/registry.d.ts +31 -0
  864. package/dist/react/tool-renderers/registry.js +47 -0
  865. package/dist/react/tool-renderers/registry.js.map +1 -0
  866. package/dist/react/tool-renderers/renderer-boundary.d.ts +18 -0
  867. package/dist/react/tool-renderers/renderer-boundary.js +12 -0
  868. package/dist/react/tool-renderers/renderer-boundary.js.map +1 -0
  869. package/dist/react/transports/vercel/vercel-ai-chat.d.ts +1 -1
  870. package/dist/react/transports/vercel/vercel-ai-chat.js +2 -2
  871. package/dist/react/transports/vercel/vercel-ai-chat.js.map +1 -1
  872. package/dist/react/transports/vercel.d.ts +6 -0
  873. package/dist/react/transports/vercel.js +11 -6
  874. package/dist/react/transports/vercel.js.map +1 -1
  875. package/dist/react/types.d.ts +269 -6
  876. package/dist/react/ui.d.ts +18 -17
  877. package/dist/react/ui.js +46 -43
  878. package/dist/react/ui.js.map +1 -1
  879. package/dist/react/unstyled.d.ts +7 -0
  880. package/dist/react/unstyled.js +8 -0
  881. package/dist/react/unstyled.js.map +1 -0
  882. package/dist/react/utils/activity.d.ts +16 -0
  883. package/dist/react/utils/activity.js +77 -0
  884. package/dist/react/utils/activity.js.map +1 -0
  885. package/dist/react/utils/clarification.d.ts +31 -0
  886. package/dist/react/utils/clarification.js +99 -0
  887. package/dist/react/utils/clarification.js.map +1 -0
  888. package/dist/react/utils/create-approval-description.d.ts +6 -0
  889. package/dist/react/utils/create-approval-description.js +42 -7
  890. package/dist/react/utils/create-approval-description.js.map +1 -1
  891. package/dist/react/utils/create-tool-result-handler.d.ts +1 -1
  892. package/dist/react/utils/create-tool-result-handler.js +1 -1
  893. package/dist/react/utils/create-tool-result-handler.js.map +1 -1
  894. package/dist/react/utils/entity-names.d.ts +6 -0
  895. package/dist/react/utils/entity-names.js +55 -0
  896. package/dist/react/utils/entity-names.js.map +1 -0
  897. package/dist/react/utils/followup-suggestions.d.ts +11 -0
  898. package/dist/react/utils/followup-suggestions.js +37 -0
  899. package/dist/react/utils/followup-suggestions.js.map +1 -0
  900. package/dist/react/utils/local-session-store.d.ts +30 -0
  901. package/dist/react/utils/local-session-store.js +163 -0
  902. package/dist/react/utils/local-session-store.js.map +1 -0
  903. package/dist/react/utils/mention-markup.d.ts +44 -1
  904. package/dist/react/utils/mention-markup.js +140 -10
  905. package/dist/react/utils/mention-markup.js.map +1 -1
  906. package/dist/react/utils/tool-presentation.d.ts +23 -0
  907. package/dist/react/utils/tool-presentation.js +41 -0
  908. package/dist/react/utils/tool-presentation.js.map +1 -0
  909. package/dist/react/utils/tool-result-config.d.ts +10 -0
  910. package/dist/react/utils/tool-result-config.js +12 -0
  911. package/dist/react/utils/tool-result-config.js.map +1 -0
  912. package/dist/runtime/ai-sdk/engine.d.ts +66 -0
  913. package/dist/runtime/ai-sdk/engine.js +188 -0
  914. package/dist/runtime/ai-sdk/engine.js.map +1 -0
  915. package/dist/runtime/ai-sdk/index.d.ts +1 -0
  916. package/dist/runtime/ai-sdk/index.js +2 -0
  917. package/dist/runtime/ai-sdk/index.js.map +1 -0
  918. package/dist/runtime/authorization.d.ts +16 -0
  919. package/dist/runtime/authorization.js +33 -0
  920. package/dist/runtime/authorization.js.map +1 -0
  921. package/dist/runtime/budget.d.ts +39 -0
  922. package/dist/runtime/budget.js +97 -0
  923. package/dist/runtime/budget.js.map +1 -0
  924. package/dist/runtime/contract-bindings.d.ts +52 -0
  925. package/dist/runtime/contract-bindings.js +92 -0
  926. package/dist/runtime/contract-bindings.js.map +1 -0
  927. package/dist/runtime/engine.d.ts +52 -0
  928. package/dist/runtime/engine.js +2 -0
  929. package/dist/runtime/engine.js.map +1 -0
  930. package/dist/runtime/fingerprint.d.ts +6 -0
  931. package/dist/runtime/fingerprint.js +29 -0
  932. package/dist/runtime/fingerprint.js.map +1 -0
  933. package/dist/runtime/glirastes.d.ts +113 -0
  934. package/dist/runtime/glirastes.js +287 -0
  935. package/dist/runtime/glirastes.js.map +1 -0
  936. package/dist/runtime/index.d.ts +24 -0
  937. package/dist/runtime/index.js +24 -0
  938. package/dist/runtime/index.js.map +1 -0
  939. package/dist/runtime/json-schema.d.ts +13 -0
  940. package/dist/runtime/json-schema.js +41 -0
  941. package/dist/runtime/json-schema.js.map +1 -0
  942. package/dist/runtime/local-limits.d.ts +6 -0
  943. package/dist/runtime/local-limits.js +23 -0
  944. package/dist/runtime/local-limits.js.map +1 -0
  945. package/dist/runtime/local-runtime-source.d.ts +76 -0
  946. package/dist/runtime/local-runtime-source.js +0 -0
  947. package/dist/runtime/local-runtime-source.js.map +1 -0
  948. package/dist/runtime/local-signer.d.ts +17 -0
  949. package/dist/runtime/local-signer.js +32 -0
  950. package/dist/runtime/local-signer.js.map +1 -0
  951. package/dist/runtime/local-tool-bindings.d.ts +57 -0
  952. package/dist/runtime/local-tool-bindings.js +190 -0
  953. package/dist/runtime/local-tool-bindings.js.map +1 -0
  954. package/dist/runtime/managed-turn.d.ts +29 -0
  955. package/dist/runtime/managed-turn.js +97 -0
  956. package/dist/runtime/managed-turn.js.map +1 -0
  957. package/dist/runtime/metrics/cost.d.ts +64 -0
  958. package/dist/runtime/metrics/cost.js +92 -0
  959. package/dist/runtime/metrics/cost.js.map +1 -0
  960. package/dist/runtime/metrics/sink.d.ts +56 -0
  961. package/dist/runtime/metrics/sink.js +214 -0
  962. package/dist/runtime/metrics/sink.js.map +1 -0
  963. package/dist/runtime/metrics/turn-recorder.d.ts +62 -0
  964. package/dist/runtime/metrics/turn-recorder.js +170 -0
  965. package/dist/runtime/metrics/turn-recorder.js.map +1 -0
  966. package/dist/runtime/offline-execution-lease.d.ts +27 -0
  967. package/dist/runtime/offline-execution-lease.js +46 -0
  968. package/dist/runtime/offline-execution-lease.js.map +1 -0
  969. package/dist/runtime/policy-overlay.d.ts +86 -0
  970. package/dist/runtime/policy-overlay.js +117 -0
  971. package/dist/runtime/policy-overlay.js.map +1 -0
  972. package/dist/runtime/postgres-store.d.ts +111 -0
  973. package/dist/runtime/postgres-store.js +363 -0
  974. package/dist/runtime/postgres-store.js.map +1 -0
  975. package/dist/runtime/prompt-bundle-store.d.ts +58 -0
  976. package/dist/runtime/prompt-bundle-store.js +120 -0
  977. package/dist/runtime/prompt-bundle-store.js.map +1 -0
  978. package/dist/runtime/runtime-mode.d.ts +23 -0
  979. package/dist/runtime/runtime-mode.js +42 -0
  980. package/dist/runtime/runtime-mode.js.map +1 -0
  981. package/dist/runtime/sdk-version.d.ts +2 -0
  982. package/dist/runtime/sdk-version.js +3 -0
  983. package/dist/runtime/sdk-version.js.map +1 -0
  984. package/dist/runtime/tool-discovery.d.ts +51 -0
  985. package/dist/runtime/tool-discovery.js +138 -0
  986. package/dist/runtime/tool-discovery.js.map +1 -0
  987. package/dist/runtime/tool-search.d.ts +31 -0
  988. package/dist/runtime/tool-search.js +145 -0
  989. package/dist/runtime/tool-search.js.map +1 -0
  990. package/dist/runtime/turn-snapshot.d.ts +44 -0
  991. package/dist/runtime/turn-snapshot.js +108 -0
  992. package/dist/runtime/turn-snapshot.js.map +1 -0
  993. package/dist/server/adapters/nextjs/approval-binding.d.ts +334 -0
  994. package/dist/server/adapters/nextjs/approval-binding.js +707 -0
  995. package/dist/server/adapters/nextjs/approval-binding.js.map +1 -0
  996. package/dist/server/adapters/nextjs/chat-interactions-handler.d.ts +26 -0
  997. package/dist/server/adapters/nextjs/chat-interactions-handler.js +65 -0
  998. package/dist/server/adapters/nextjs/chat-interactions-handler.js.map +1 -0
  999. package/dist/server/adapters/nextjs/clarification-resume.d.ts +21 -0
  1000. package/dist/server/adapters/nextjs/clarification-resume.js +109 -0
  1001. package/dist/server/adapters/nextjs/clarification-resume.js.map +1 -0
  1002. package/dist/server/adapters/nextjs/context-helpers.d.ts +49 -8
  1003. package/dist/server/adapters/nextjs/context-helpers.js +75 -21
  1004. package/dist/server/adapters/nextjs/context-helpers.js.map +1 -1
  1005. package/dist/server/adapters/nextjs/create-ai-chat-handler.d.ts +59 -1
  1006. package/dist/server/adapters/nextjs/create-ai-chat-handler.js +647 -95
  1007. package/dist/server/adapters/nextjs/create-ai-chat-handler.js.map +1 -1
  1008. package/dist/server/adapters/nextjs/direct-command.d.ts +75 -0
  1009. package/dist/server/adapters/nextjs/direct-command.js +316 -0
  1010. package/dist/server/adapters/nextjs/direct-command.js.map +1 -0
  1011. package/dist/server/adapters/nextjs/index.d.ts +10 -2
  1012. package/dist/server/adapters/nextjs/index.js +7 -0
  1013. package/dist/server/adapters/nextjs/index.js.map +1 -1
  1014. package/dist/server/adapters/nextjs/prepare-model-messages.d.ts +2 -1
  1015. package/dist/server/adapters/nextjs/prepare-model-messages.js +7 -15
  1016. package/dist/server/adapters/nextjs/prepare-model-messages.js.map +1 -1
  1017. package/dist/server/adapters/nextjs/recording-transcription-handler.d.ts +31 -0
  1018. package/dist/server/adapters/nextjs/recording-transcription-handler.js +55 -0
  1019. package/dist/server/adapters/nextjs/recording-transcription-handler.js.map +1 -0
  1020. package/dist/server/adapters/nextjs/request-guards.d.ts +41 -0
  1021. package/dist/server/adapters/nextjs/request-guards.js +108 -0
  1022. package/dist/server/adapters/nextjs/request-guards.js.map +1 -0
  1023. package/dist/server/adapters/nextjs/sanitize-model-messages.js +12 -6
  1024. package/dist/server/adapters/nextjs/sanitize-model-messages.js.map +1 -1
  1025. package/dist/server/adapters/nextjs/scope-pipeline-tools.d.ts +17 -0
  1026. package/dist/server/adapters/nextjs/scope-pipeline-tools.js +26 -0
  1027. package/dist/server/adapters/nextjs/scope-pipeline-tools.js.map +1 -0
  1028. package/dist/server/adapters/nextjs/tool-discovery.d.ts +39 -0
  1029. package/dist/server/adapters/nextjs/tool-discovery.js +47 -0
  1030. package/dist/server/adapters/nextjs/tool-discovery.js.map +1 -0
  1031. package/dist/server/adapters/nextjs/tool-presentation.d.ts +26 -0
  1032. package/dist/server/adapters/nextjs/tool-presentation.js +19 -0
  1033. package/dist/server/adapters/nextjs/tool-presentation.js.map +1 -0
  1034. package/dist/server/adapters/nextjs/types.d.ts +229 -13
  1035. package/dist/server/adapters/nextjs/with-ai-tool.d.ts +2 -2
  1036. package/dist/server/core/adaptive-fast-path.d.ts +3 -0
  1037. package/dist/server/core/adaptive-fast-path.js +185 -0
  1038. package/dist/server/core/adaptive-fast-path.js.map +1 -0
  1039. package/dist/server/core/clarification-tool.d.ts +29 -0
  1040. package/dist/server/core/clarification-tool.js +61 -0
  1041. package/dist/server/core/clarification-tool.js.map +1 -0
  1042. package/dist/server/core/generated-ui-tool.d.ts +31 -0
  1043. package/dist/server/core/generated-ui-tool.js +87 -0
  1044. package/dist/server/core/generated-ui-tool.js.map +1 -0
  1045. package/dist/server/core/index.d.ts +49 -8
  1046. package/dist/server/core/index.js +198 -16
  1047. package/dist/server/core/index.js.map +1 -1
  1048. package/dist/server/core/local-guardrails.d.ts +6 -0
  1049. package/dist/server/core/local-guardrails.js +68 -0
  1050. package/dist/server/core/local-guardrails.js.map +1 -0
  1051. package/dist/server/core/module-router.d.ts +3 -1
  1052. package/dist/server/core/module-router.js +22 -2
  1053. package/dist/server/core/module-router.js.map +1 -1
  1054. package/dist/server/core/plan-tool.d.ts +23 -0
  1055. package/dist/server/core/plan-tool.js +32 -0
  1056. package/dist/server/core/plan-tool.js.map +1 -0
  1057. package/dist/server/core/zod-compact.d.ts +2 -2
  1058. package/dist/server/core/zod-compact.js +56 -7
  1059. package/dist/server/core/zod-compact.js.map +1 -1
  1060. package/dist/server/index.d.ts +2 -4
  1061. package/dist/server/index.js +2 -4
  1062. package/dist/server/index.js.map +1 -1
  1063. package/dist/server/lancer/client.js +2 -1
  1064. package/dist/server/lancer/client.js.map +1 -1
  1065. package/dist/server/local-pipeline.d.ts +14 -0
  1066. package/dist/server/local-pipeline.js +152 -0
  1067. package/dist/server/local-pipeline.js.map +1 -0
  1068. package/dist/server/pii-shield/index.d.ts +1 -0
  1069. package/dist/server/pii-shield/index.js +1 -0
  1070. package/dist/server/pii-shield/index.js.map +1 -1
  1071. package/dist/server/pii-shield/regex-detector.d.ts +13 -0
  1072. package/dist/server/pii-shield/regex-detector.js +109 -0
  1073. package/dist/server/pii-shield/regex-detector.js.map +1 -0
  1074. package/dist/server/testing/guardrails.js +1 -65
  1075. package/dist/server/testing/guardrails.js.map +1 -1
  1076. package/dist/server/testing/helpers.js +1 -62
  1077. package/dist/server/testing/helpers.js.map +1 -1
  1078. package/dist/server/testing/index.d.ts +1 -0
  1079. package/dist/server/testing/index.js +1 -0
  1080. package/dist/server/testing/index.js.map +1 -1
  1081. package/dist/server/testing/registry-parity.d.ts +18 -0
  1082. package/dist/server/testing/registry-parity.js +38 -0
  1083. package/dist/server/testing/registry-parity.js.map +1 -0
  1084. package/dist/server/testing/smoke.d.ts +2 -1
  1085. package/dist/server/testing/smoke.js +5 -3
  1086. package/dist/server/testing/smoke.js.map +1 -1
  1087. package/dist/server/testing/types.d.ts +1 -1
  1088. package/dist/server/testing/zod-introspect.d.ts +1 -1
  1089. package/dist/server/testing/zod-introspect.js +178 -5
  1090. package/dist/server/testing/zod-introspect.js.map +1 -1
  1091. package/dist/stt/index.d.ts +5 -0
  1092. package/dist/stt/index.js +6 -0
  1093. package/dist/stt/index.js.map +1 -0
  1094. package/dist/sync/app-setup-client.d.ts +46 -0
  1095. package/dist/sync/app-setup-client.js +137 -0
  1096. package/dist/sync/app-setup-client.js.map +1 -0
  1097. package/dist/sync/capability-report.d.ts +41 -0
  1098. package/dist/sync/capability-report.js +48 -0
  1099. package/dist/sync/capability-report.js.map +1 -0
  1100. package/dist/sync/connection-lookup.d.ts +19 -0
  1101. package/dist/sync/connection-lookup.js +56 -0
  1102. package/dist/sync/connection-lookup.js.map +1 -0
  1103. package/dist/sync/control-plane-client.d.ts +69 -0
  1104. package/dist/sync/control-plane-client.js +182 -0
  1105. package/dist/sync/control-plane-client.js.map +1 -0
  1106. package/dist/sync/deployment-selector.d.ts +9 -0
  1107. package/dist/sync/deployment-selector.js +26 -0
  1108. package/dist/sync/deployment-selector.js.map +1 -0
  1109. package/dist/sync/fetch-sse-push.d.ts +6 -0
  1110. package/dist/sync/fetch-sse-push.js +42 -0
  1111. package/dist/sync/fetch-sse-push.js.map +1 -0
  1112. package/dist/sync/index.d.ts +26 -0
  1113. package/dist/sync/index.js +17 -0
  1114. package/dist/sync/index.js.map +1 -0
  1115. package/dist/sync/jwks-provider.d.ts +14 -0
  1116. package/dist/sync/jwks-provider.js +53 -0
  1117. package/dist/sync/jwks-provider.js.map +1 -0
  1118. package/dist/sync/local-deployment-validator.d.ts +30 -0
  1119. package/dist/sync/local-deployment-validator.js +60 -0
  1120. package/dist/sync/local-deployment-validator.js.map +1 -0
  1121. package/dist/sync/managed-sync.d.ts +40 -0
  1122. package/dist/sync/managed-sync.js +94 -0
  1123. package/dist/sync/managed-sync.js.map +1 -0
  1124. package/dist/sync/materialize-deployment.d.ts +7 -0
  1125. package/dist/sync/materialize-deployment.js +63 -0
  1126. package/dist/sync/materialize-deployment.js.map +1 -0
  1127. package/dist/sync/runtime-connect-client.d.ts +23 -0
  1128. package/dist/sync/runtime-connect-client.js +182 -0
  1129. package/dist/sync/runtime-connect-client.js.map +1 -0
  1130. package/dist/sync/runtime-setup-client.d.ts +62 -0
  1131. package/dist/sync/runtime-setup-client.js +153 -0
  1132. package/dist/sync/runtime-setup-client.js.map +1 -0
  1133. package/dist/sync/signature-verifier.d.ts +39 -0
  1134. package/dist/sync/signature-verifier.js +97 -0
  1135. package/dist/sync/signature-verifier.js.map +1 -0
  1136. package/dist/sync/state-store.d.ts +24 -0
  1137. package/dist/sync/state-store.js +47 -0
  1138. package/dist/sync/state-store.js.map +1 -0
  1139. package/dist/sync/sync-manager.d.ts +27 -0
  1140. package/dist/sync/sync-manager.js +170 -0
  1141. package/dist/sync/sync-manager.js.map +1 -0
  1142. package/dist/types.d.ts +68 -16
  1143. package/dist/types.js +30 -2
  1144. package/dist/types.js.map +1 -1
  1145. package/embed/package.json +5 -0
  1146. package/package.json +187 -46
  1147. package/runtime/ai-sdk/package.json +5 -0
  1148. package/runtime/package.json +5 -0
  1149. package/skills/README.md +26 -92
  1150. package/skills/building-glirastes-chat-ui/SKILL.md +358 -343
  1151. package/skills/describing-glirastes-tools/SKILL.md +180 -0
  1152. package/skills/integrating-glirastes-nextjs/SKILL.md +142 -302
  1153. package/skills/integrating-glirastes-web/SKILL.md +165 -0
  1154. package/skills/maintaining-glirastes-tools/SKILL.md +133 -461
  1155. package/skills/migrating-to-glirastes/SKILL.md +112 -0
  1156. package/skills/setting-up-glirastes/SKILL.md +194 -0
  1157. package/skills/setting-up-glirastes/agents/openai.yaml +4 -0
  1158. package/skills/setting-up-glirastes/references/artifact-contract.md +40 -0
  1159. package/skills/setting-up-glirastes/scripts/validate-artifact.ts +23 -0
  1160. package/skills/setting-up-glirastes/templates/interview.md +19 -0
  1161. package/stt/package.json +5 -0
  1162. package/dist/cjs/codegen/asset-sync.d.ts +0 -20
  1163. package/dist/cjs/codegen/asset-sync.js +0 -28
  1164. package/dist/cjs/codegen/coverage.d.ts +0 -66
  1165. package/dist/cjs/codegen/coverage.js +0 -408
  1166. package/dist/cjs/codegen/endpoint-scanner.d.ts +0 -16
  1167. package/dist/cjs/codegen/endpoint-scanner.js +0 -197
  1168. package/dist/cjs/codegen/mcp-generator.d.ts +0 -50
  1169. package/dist/cjs/codegen/mcp-generator.js +0 -803
  1170. package/dist/cjs/codegen/module-generator.d.ts +0 -11
  1171. package/dist/cjs/codegen/module-generator.js +0 -353
  1172. package/dist/cjs/codegen/nestjs-scanner.d.ts +0 -43
  1173. package/dist/cjs/codegen/nestjs-scanner.js +0 -241
  1174. package/dist/cjs/codegen/output-recommender.d.ts +0 -23
  1175. package/dist/cjs/codegen/output-recommender.js +0 -33
  1176. package/dist/cjs/codegen/scaffolder.d.ts +0 -36
  1177. package/dist/cjs/codegen/scaffolder.js +0 -262
  1178. package/dist/cjs/codegen/skill-generator.d.ts +0 -49
  1179. package/dist/cjs/codegen/skill-generator.js +0 -967
  1180. package/dist/cjs/codegen/ui-scanner.d.ts +0 -24
  1181. package/dist/cjs/codegen/ui-scanner.js +0 -202
  1182. package/dist/cjs/codegen/validator.d.ts +0 -35
  1183. package/dist/cjs/codegen/validator.js +0 -292
  1184. package/dist/cjs/openapi/index.d.ts +0 -78
  1185. package/dist/cjs/openapi/index.js +0 -347
  1186. package/dist/cjs/react/components/wavesurfer-loader.d.ts +0 -5
  1187. package/dist/cjs/react/components/wavesurfer-loader.js +0 -36
  1188. package/dist/cjs/react/transports/langgraph/index.d.ts +0 -2
  1189. package/dist/cjs/react/transports/langgraph/index.js +0 -8
  1190. package/dist/cjs/react/transports/langgraph/langgraph-ai-chat.d.ts +0 -62
  1191. package/dist/cjs/react/transports/langgraph/langgraph-ai-chat.js +0 -94
  1192. package/dist/cjs/react/transports/langgraph.d.ts +0 -71
  1193. package/dist/cjs/react/transports/langgraph.js +0 -369
  1194. package/dist/cjs/server/adapters/nestjs/chat/ai-chat-auth.guard.d.ts +0 -10
  1195. package/dist/cjs/server/adapters/nestjs/chat/ai-chat-auth.guard.js +0 -42
  1196. package/dist/cjs/server/adapters/nestjs/chat/ai-chat-module-options.interface.d.ts +0 -32
  1197. package/dist/cjs/server/adapters/nestjs/chat/ai-chat-module-options.interface.js +0 -4
  1198. package/dist/cjs/server/adapters/nestjs/chat/ai-chat.controller.d.ts +0 -11
  1199. package/dist/cjs/server/adapters/nestjs/chat/ai-chat.controller.js +0 -80
  1200. package/dist/cjs/server/adapters/nestjs/chat/ai-chat.module.d.ts +0 -9
  1201. package/dist/cjs/server/adapters/nestjs/chat/ai-chat.module.js +0 -119
  1202. package/dist/cjs/server/adapters/nestjs/chat/ai-chat.service.d.ts +0 -13
  1203. package/dist/cjs/server/adapters/nestjs/chat/ai-chat.service.js +0 -131
  1204. package/dist/cjs/server/adapters/nestjs/chat/dto/ai-chat-request.dto.d.ts +0 -7
  1205. package/dist/cjs/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js +0 -52
  1206. package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message-part.dto.d.ts +0 -19
  1207. package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message-part.dto.js +0 -108
  1208. package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message.dto.d.ts +0 -8
  1209. package/dist/cjs/server/adapters/nestjs/chat/dto/chat-message.dto.js +0 -59
  1210. package/dist/cjs/server/adapters/nestjs/chat/dto/index.d.ts +0 -3
  1211. package/dist/cjs/server/adapters/nestjs/chat/dto/index.js +0 -9
  1212. package/dist/cjs/server/adapters/nestjs/chat/index.d.ts +0 -3
  1213. package/dist/cjs/server/adapters/nestjs/chat/index.js +0 -9
  1214. package/dist/cjs/server/adapters/nestjs/chat/speech-stream.gateway.d.ts +0 -4
  1215. package/dist/cjs/server/adapters/nestjs/chat/speech-stream.gateway.js +0 -73
  1216. package/dist/cjs/server/adapters/nestjs/chat/ws-loader.d.ts +0 -5
  1217. package/dist/cjs/server/adapters/nestjs/chat/ws-loader.js +0 -72
  1218. package/dist/cjs/server/adapters/nestjs/decorators/ai-module.decorator.d.ts +0 -6
  1219. package/dist/cjs/server/adapters/nestjs/decorators/ai-module.decorator.js +0 -13
  1220. package/dist/cjs/server/adapters/nestjs/decorators/ai-param.decorator.d.ts +0 -5
  1221. package/dist/cjs/server/adapters/nestjs/decorators/ai-param.decorator.js +0 -15
  1222. package/dist/cjs/server/adapters/nestjs/decorators/ai-tool.decorator.d.ts +0 -6
  1223. package/dist/cjs/server/adapters/nestjs/decorators/ai-tool.decorator.js +0 -22
  1224. package/dist/cjs/server/adapters/nestjs/decorators/constants.d.ts +0 -4
  1225. package/dist/cjs/server/adapters/nestjs/decorators/constants.js +0 -7
  1226. package/dist/cjs/server/adapters/nestjs/index.d.ts +0 -14
  1227. package/dist/cjs/server/adapters/nestjs/index.js +0 -42
  1228. package/dist/cjs/server/adapters/nestjs/metadata.d.ts +0 -39
  1229. package/dist/cjs/server/adapters/nestjs/metadata.js +0 -36
  1230. package/dist/cjs/server/adapters/nestjs/module/ai-tools-explorer.service.d.ts +0 -36
  1231. package/dist/cjs/server/adapters/nestjs/module/ai-tools-explorer.service.js +0 -159
  1232. package/dist/cjs/server/adapters/nestjs/module/ai-tools.module.d.ts +0 -37
  1233. package/dist/cjs/server/adapters/nestjs/module/ai-tools.module.js +0 -44
  1234. package/dist/cjs/server/adapters/nestjs/module/ai-tools.service.d.ts +0 -28
  1235. package/dist/cjs/server/adapters/nestjs/module/ai-tools.service.js +0 -41
  1236. package/dist/cjs/server/adapters/nestjs/scanner/nestjs-scanner.d.ts +0 -16
  1237. package/dist/cjs/server/adapters/nestjs/scanner/nestjs-scanner.js +0 -117
  1238. package/dist/cjs/server/adapters/nestjs/scanner/schema-builder.d.ts +0 -26
  1239. package/dist/cjs/server/adapters/nestjs/scanner/schema-builder.js +0 -259
  1240. package/dist/cjs/server/adapters/nestjs/swagger.d.ts +0 -7
  1241. package/dist/cjs/server/adapters/nestjs/swagger.js +0 -39
  1242. package/dist/cli/commands/check-upgrade.d.ts +0 -15
  1243. package/dist/cli/commands/check-upgrade.js +0 -138
  1244. package/dist/cli/commands/check-upgrade.js.map +0 -1
  1245. package/dist/cli/commands/test.d.ts +0 -8
  1246. package/dist/cli/commands/test.js +0 -76
  1247. package/dist/cli/commands/test.js.map +0 -1
  1248. package/dist/cli/utils/changelog-parser.d.ts +0 -13
  1249. package/dist/cli/utils/changelog-parser.js +0 -89
  1250. package/dist/cli/utils/changelog-parser.js.map +0 -1
  1251. package/dist/cli/utils/commit-parser.d.ts +0 -8
  1252. package/dist/cli/utils/commit-parser.js +0 -23
  1253. package/dist/cli/utils/commit-parser.js.map +0 -1
  1254. package/dist/cli/utils/gap-detector.d.ts +0 -14
  1255. package/dist/cli/utils/gap-detector.js +0 -65
  1256. package/dist/cli/utils/gap-detector.js.map +0 -1
  1257. package/dist/cli/utils/get-cli-version.d.ts +0 -2
  1258. package/dist/cli/utils/get-cli-version.js +0 -10
  1259. package/dist/cli/utils/get-cli-version.js.map +0 -1
  1260. package/dist/codegen/asset-sync.d.ts +0 -20
  1261. package/dist/codegen/asset-sync.js +0 -26
  1262. package/dist/codegen/asset-sync.js.map +0 -1
  1263. package/dist/codegen/coverage.d.ts +0 -66
  1264. package/dist/codegen/coverage.js +0 -372
  1265. package/dist/codegen/coverage.js.map +0 -1
  1266. package/dist/codegen/endpoint-scanner.d.ts +0 -16
  1267. package/dist/codegen/endpoint-scanner.js +0 -161
  1268. package/dist/codegen/endpoint-scanner.js.map +0 -1
  1269. package/dist/codegen/mcp-generator.d.ts +0 -50
  1270. package/dist/codegen/mcp-generator.js +0 -801
  1271. package/dist/codegen/mcp-generator.js.map +0 -1
  1272. package/dist/codegen/module-generator.d.ts +0 -11
  1273. package/dist/codegen/module-generator.js +0 -351
  1274. package/dist/codegen/module-generator.js.map +0 -1
  1275. package/dist/codegen/nestjs-scanner.d.ts +0 -43
  1276. package/dist/codegen/nestjs-scanner.js +0 -239
  1277. package/dist/codegen/nestjs-scanner.js.map +0 -1
  1278. package/dist/codegen/output-recommender.d.ts +0 -23
  1279. package/dist/codegen/output-recommender.js +0 -31
  1280. package/dist/codegen/output-recommender.js.map +0 -1
  1281. package/dist/codegen/scaffolder.d.ts +0 -36
  1282. package/dist/codegen/scaffolder.js +0 -259
  1283. package/dist/codegen/scaffolder.js.map +0 -1
  1284. package/dist/codegen/skill-generator.d.ts +0 -49
  1285. package/dist/codegen/skill-generator.js +0 -965
  1286. package/dist/codegen/skill-generator.js.map +0 -1
  1287. package/dist/codegen/ui-scanner.d.ts +0 -24
  1288. package/dist/codegen/ui-scanner.js +0 -197
  1289. package/dist/codegen/ui-scanner.js.map +0 -1
  1290. package/dist/codegen/validator.d.ts +0 -35
  1291. package/dist/codegen/validator.js +0 -256
  1292. package/dist/codegen/validator.js.map +0 -1
  1293. package/dist/openapi/demo-generate.d.ts +0 -1
  1294. package/dist/openapi/demo-generate.js +0 -15
  1295. package/dist/openapi/demo-generate.js.map +0 -1
  1296. package/dist/openapi/index.d.ts +0 -78
  1297. package/dist/openapi/index.js +0 -341
  1298. package/dist/openapi/index.js.map +0 -1
  1299. package/dist/react/components/wavesurfer-loader.d.ts +0 -5
  1300. package/dist/react/components/wavesurfer-loader.js +0 -34
  1301. package/dist/react/components/wavesurfer-loader.js.map +0 -1
  1302. package/dist/react/transports/langgraph/index.d.ts +0 -2
  1303. package/dist/react/transports/langgraph/index.js +0 -3
  1304. package/dist/react/transports/langgraph/index.js.map +0 -1
  1305. package/dist/react/transports/langgraph/langgraph-ai-chat.d.ts +0 -62
  1306. package/dist/react/transports/langgraph/langgraph-ai-chat.js +0 -92
  1307. package/dist/react/transports/langgraph/langgraph-ai-chat.js.map +0 -1
  1308. package/dist/react/transports/langgraph.d.ts +0 -71
  1309. package/dist/react/transports/langgraph.js +0 -366
  1310. package/dist/react/transports/langgraph.js.map +0 -1
  1311. package/dist/server/adapters/nestjs/chat/ai-chat-auth.guard.d.ts +0 -10
  1312. package/dist/server/adapters/nestjs/chat/ai-chat-auth.guard.js +0 -40
  1313. package/dist/server/adapters/nestjs/chat/ai-chat-auth.guard.js.map +0 -1
  1314. package/dist/server/adapters/nestjs/chat/ai-chat-module-options.interface.d.ts +0 -32
  1315. package/dist/server/adapters/nestjs/chat/ai-chat-module-options.interface.js +0 -2
  1316. package/dist/server/adapters/nestjs/chat/ai-chat-module-options.interface.js.map +0 -1
  1317. package/dist/server/adapters/nestjs/chat/ai-chat.controller.d.ts +0 -11
  1318. package/dist/server/adapters/nestjs/chat/ai-chat.controller.js +0 -78
  1319. package/dist/server/adapters/nestjs/chat/ai-chat.controller.js.map +0 -1
  1320. package/dist/server/adapters/nestjs/chat/ai-chat.module.d.ts +0 -9
  1321. package/dist/server/adapters/nestjs/chat/ai-chat.module.js +0 -117
  1322. package/dist/server/adapters/nestjs/chat/ai-chat.module.js.map +0 -1
  1323. package/dist/server/adapters/nestjs/chat/ai-chat.service.d.ts +0 -13
  1324. package/dist/server/adapters/nestjs/chat/ai-chat.service.js +0 -129
  1325. package/dist/server/adapters/nestjs/chat/ai-chat.service.js.map +0 -1
  1326. package/dist/server/adapters/nestjs/chat/dto/ai-chat-request.dto.d.ts +0 -7
  1327. package/dist/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js +0 -49
  1328. package/dist/server/adapters/nestjs/chat/dto/ai-chat-request.dto.js.map +0 -1
  1329. package/dist/server/adapters/nestjs/chat/dto/chat-message-part.dto.d.ts +0 -19
  1330. package/dist/server/adapters/nestjs/chat/dto/chat-message-part.dto.js +0 -105
  1331. package/dist/server/adapters/nestjs/chat/dto/chat-message-part.dto.js.map +0 -1
  1332. package/dist/server/adapters/nestjs/chat/dto/chat-message.dto.d.ts +0 -8
  1333. package/dist/server/adapters/nestjs/chat/dto/chat-message.dto.js +0 -56
  1334. package/dist/server/adapters/nestjs/chat/dto/chat-message.dto.js.map +0 -1
  1335. package/dist/server/adapters/nestjs/chat/dto/index.d.ts +0 -3
  1336. package/dist/server/adapters/nestjs/chat/dto/index.js +0 -4
  1337. package/dist/server/adapters/nestjs/chat/dto/index.js.map +0 -1
  1338. package/dist/server/adapters/nestjs/chat/index.d.ts +0 -3
  1339. package/dist/server/adapters/nestjs/chat/index.js +0 -3
  1340. package/dist/server/adapters/nestjs/chat/index.js.map +0 -1
  1341. package/dist/server/adapters/nestjs/chat/speech-stream.gateway.d.ts +0 -4
  1342. package/dist/server/adapters/nestjs/chat/speech-stream.gateway.js +0 -71
  1343. package/dist/server/adapters/nestjs/chat/speech-stream.gateway.js.map +0 -1
  1344. package/dist/server/adapters/nestjs/chat/ws-loader.d.ts +0 -5
  1345. package/dist/server/adapters/nestjs/chat/ws-loader.js +0 -37
  1346. package/dist/server/adapters/nestjs/chat/ws-loader.js.map +0 -1
  1347. package/dist/server/adapters/nestjs/decorators/ai-module.decorator.d.ts +0 -6
  1348. package/dist/server/adapters/nestjs/decorators/ai-module.decorator.js +0 -11
  1349. package/dist/server/adapters/nestjs/decorators/ai-module.decorator.js.map +0 -1
  1350. package/dist/server/adapters/nestjs/decorators/ai-param.decorator.d.ts +0 -5
  1351. package/dist/server/adapters/nestjs/decorators/ai-param.decorator.js +0 -13
  1352. package/dist/server/adapters/nestjs/decorators/ai-param.decorator.js.map +0 -1
  1353. package/dist/server/adapters/nestjs/decorators/ai-tool.decorator.d.ts +0 -6
  1354. package/dist/server/adapters/nestjs/decorators/ai-tool.decorator.js +0 -20
  1355. package/dist/server/adapters/nestjs/decorators/ai-tool.decorator.js.map +0 -1
  1356. package/dist/server/adapters/nestjs/decorators/constants.d.ts +0 -4
  1357. package/dist/server/adapters/nestjs/decorators/constants.js +0 -5
  1358. package/dist/server/adapters/nestjs/decorators/constants.js.map +0 -1
  1359. package/dist/server/adapters/nestjs/index.d.ts +0 -14
  1360. package/dist/server/adapters/nestjs/index.js +0 -20
  1361. package/dist/server/adapters/nestjs/index.js.map +0 -1
  1362. package/dist/server/adapters/nestjs/metadata.d.ts +0 -39
  1363. package/dist/server/adapters/nestjs/metadata.js +0 -30
  1364. package/dist/server/adapters/nestjs/metadata.js.map +0 -1
  1365. package/dist/server/adapters/nestjs/module/ai-tools-explorer.service.d.ts +0 -36
  1366. package/dist/server/adapters/nestjs/module/ai-tools-explorer.service.js +0 -156
  1367. package/dist/server/adapters/nestjs/module/ai-tools-explorer.service.js.map +0 -1
  1368. package/dist/server/adapters/nestjs/module/ai-tools.module.d.ts +0 -37
  1369. package/dist/server/adapters/nestjs/module/ai-tools.module.js +0 -42
  1370. package/dist/server/adapters/nestjs/module/ai-tools.module.js.map +0 -1
  1371. package/dist/server/adapters/nestjs/module/ai-tools.service.d.ts +0 -28
  1372. package/dist/server/adapters/nestjs/module/ai-tools.service.js +0 -38
  1373. package/dist/server/adapters/nestjs/module/ai-tools.service.js.map +0 -1
  1374. package/dist/server/adapters/nestjs/scanner/nestjs-scanner.d.ts +0 -16
  1375. package/dist/server/adapters/nestjs/scanner/nestjs-scanner.js +0 -115
  1376. package/dist/server/adapters/nestjs/scanner/nestjs-scanner.js.map +0 -1
  1377. package/dist/server/adapters/nestjs/scanner/schema-builder.d.ts +0 -26
  1378. package/dist/server/adapters/nestjs/scanner/schema-builder.js +0 -255
  1379. package/dist/server/adapters/nestjs/scanner/schema-builder.js.map +0 -1
  1380. package/dist/server/adapters/nestjs/swagger.d.ts +0 -7
  1381. package/dist/server/adapters/nestjs/swagger.js +0 -37
  1382. package/dist/server/adapters/nestjs/swagger.js.map +0 -1
  1383. package/openapi/package.json +0 -5
  1384. package/react/langgraph/package.json +0 -5
  1385. package/server/nestjs/package.json +0 -5
  1386. package/skills/integrating-glirastes-nestjs/SKILL.md +0 -346
  1387. package/skills/integrating-glirastes-nextjs-with-nestjs-backend/SKILL.md +0 -359
package/README.md CHANGED
@@ -1,927 +1,363 @@
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
+ ### With a coding agent (recommended)
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
121
- ```
122
-
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.
124
-
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
- }
49
+ npm install glirastes @ai-sdk/openai @ai-sdk/react react-markdown
50
+ npx --no-install glirastes init
187
51
  ```
188
52
 
189
- </td>
190
- </tr>
191
- </table>
192
-
193
- ### 3. Drop a chat widget into your frontend
194
-
195
- ```tsx
196
- 'use client';
197
- import { VercelAiChat } from 'glirastes/react/vercel';
53
+ Run `init` inside Claude Code or Codex (Node >= 20.6). Your agent then derives
54
+ the tools from your routes, adds the chat route and the chat UI, and asks once
55
+ whether the app runs Standalone or with the Platform. Existing files are never
56
+ replaced; `--dry-run --json` previews without writing anything.
198
57
 
199
- export default function RootLayout({ children }) {
200
- return (
201
- <body>
202
- {children}
203
- <VercelAiChat endpoint="/api/chat" />
204
- </body>
205
- );
206
- }
207
- ```
208
-
209
- ### 4. Wire up the chat handler
210
-
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">
218
-
219
- ```ts
220
- 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
- ```
58
+ ### By hand
228
59
 
229
- </td>
230
- <td valign="top">
60
+ **1. Install** the SDK and the chat peers (Node >= 20.6):
231
61
 
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' },
320
- },
321
- });
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
- });
62
+ ```bash
63
+ npm install glirastes @ai-sdk/openai @ai-sdk/react react-markdown
339
64
  ```
340
65
 
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(...)`:
66
+ **2. Initialize.** Run it inside your Codex or Claude Code session, or from a
67
+ terminal with `--agent codex|claude`:
346
68
 
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 };
69
+ ```bash
70
+ npx --no-install glirastes init
353
71
  ```
354
72
 
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
- });
73
+ `init` writes `.glirastes/tools.json`, `.glirastes/prompt-bundle.json`, the
74
+ `predev` / `prebuild` scripts (`glirastes tools refresh`) and a short hint in
75
+ `AGENTS.md` / `CLAUDE.md`, installs the [agent skills](#agent-skills) and hands
76
+ the integration to your coding agent. Existing files are never replaced.
382
77
 
383
- useAiClientAction('task-list.filter', (payload) => {
384
- setFilters(payload);
385
- });
78
+ **3. Derive the tools** from your routes, pages, URL filters and client actions:
386
79
 
387
- return <div>{/* your task list */}</div>;
388
- }
80
+ ```bash
81
+ npx glirastes tools refresh
389
82
  ```
390
83
 
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/>
84
+ This writes the committed `.glirastes/` tool files and the generated module
85
+ `src/generated/glirastes/tools.generated.ts`.
400
86
 
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.
87
+ **4. Add the chat route.** Identity comes from your verified session; your
88
+ endpoints keep their own authorization.
406
89
 
407
90
  ```ts
408
- // app/api/chat/route.ts
91
+ // src/app/api/chat/route.ts
92
+ import { createOpenAI } from '@ai-sdk/openai';
93
+ import { createGlirastes } from 'glirastes/runtime';
409
94
  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;
95
+ import * as generated from '@/generated/glirastes/tools.generated';
96
+ import { resolvePrincipal } from '@/lib/glirastes-principal'; // your session lookup
97
+
98
+ const glirastes = createGlirastes({ generated });
99
+ const openrouter = createOpenAI({ baseURL: 'https://openrouter.ai/api/v1', apiKey: process.env.OPENROUTER_API_KEY });
100
+
101
+ export const runtime = 'nodejs';
102
+ export async function POST(request: Request) {
103
+ const principal = await resolvePrincipal(request); // { subjectId, tenantId, roles, attributes }
104
+ if (!principal) return new Response('Unauthorized', { status: 401 });
105
+ const turn = await glirastes.chatTurn((runtimeTenantId) => ({ ...principal, tenantId: runtimeTenantId }));
106
+ return createAiChatHandler({
107
+ ...turn,
108
+ model: openrouter.chat('anthropic/claude-sonnet-5.5'),
109
+ systemPrompt: 'Use the tools of this app. Ask one short question when the target is unclear.',
110
+ toolDiscovery: true,
111
+ })(request);
484
112
  }
485
113
  ```
486
114
 
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
- ```
115
+ Budgets default to safe values; pass `localLimits: { maxToolCalls: 4 }` to override single fields.
500
116
 
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.
117
+ Before production set `GLIRASTES_APPROVAL_SECRET` (at least 16 characters, the
118
+ same on every instance): it signs each approval so a forged or edited chat
119
+ history runs nothing. Request limits, multi-instance setups and the rest are in
120
+ [docs/chat-route-security.md](docs/chat-route-security.md).
502
121
 
503
- ### Client-side action handlers
122
+ **5. Mount the chat** and the navigation bridge (client components):
504
123
 
505
124
  ```tsx
506
- // components/chat-integration.tsx
507
125
  'use client';
508
- import { useAiClientAction } from 'glirastes/react';
509
126
  import { useRouter } from 'next/navigation';
510
- import { useQueryClient } from '@tanstack/react-query';
127
+ import { useGlirastesNavigationBridge } from 'glirastes/react';
128
+ import { VercelAiChat } from 'glirastes/react/vercel';
129
+ import 'glirastes/react/styles.css';
511
130
 
512
- export function ChatIntegration() {
131
+ export function Assistant() {
513
132
  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;
133
+ useGlirastesNavigationBridge({ push: (href) => router.push(href) });
134
+ return <VercelAiChat endpoint="/api/chat" />;
529
135
  }
530
136
  ```
531
137
 
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.
138
+ **6. Run** `npm run dev` (the `predev` script refreshes the tools), then check
139
+ the setup with `npx glirastes doctor`.
563
140
 
564
- ### Testing without LLM calls
141
+ The full walkthrough, including filters, client actions, `@` mentions and `/`
142
+ commands, is the bundled skill
143
+ [`integrating-glirastes-nextjs`](skills/integrating-glirastes-nextjs/SKILL.md).
565
144
 
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
- ```
145
+ ## How it works
581
146
 
582
- All assertions run without calling a real LLM or hitting HTTP — perfect for CI.
147
+ - **Execution is local.** The model call, the tool loop and every tool call
148
+ run in your app's server. A normal chat turn makes no request to the
149
+ Platform.
150
+ - **Your app keeps the sensitive parts.** Prompts, model calls and provider
151
+ keys, secrets, business data, tool arguments and results, and final
152
+ authorization stay in the app. `resolvePrincipal` only says who asks; each
153
+ endpoint still checks its own session and permissions.
154
+ - **Guard rails per turn.** Each turn runs on one pinned tool and policy
155
+ snapshot, with local budgets (steps, tool calls, tokens, cost, timeouts),
156
+ loop detection and fail-closed authorization. Write and delete tools ask
157
+ the user before they run.
158
+ - **The Platform gets metadata only.** A connected app sends content-free
159
+ metrics (tokens, cost, latency, errors, tool use) in batches off the turn
160
+ path, and receives signed configuration revisions.
583
161
 
584
- <br/>
162
+ ## Tools from your code
585
163
 
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
- );
603
- }
604
- ```
605
-
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.
657
-
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.
659
-
660
- ### Persisting chat across sessions
661
-
662
- Every widget accepts a `session` config. The simplest version uses `localStorage`:
663
-
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.
678
-
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
164
+ `glirastes tools refresh` derives endpoint, navigation, filter and
165
+ client-action tools from Next.js, NestJS, OpenAPI (FastAPI), react-router and
166
+ vue-router sources, and from `useAiClientAction` registrations. The output is
167
+ committed with the code; `glirastes tools check` fails CI when it is stale.
788
168
 
789
169
  ```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
- ```
170
+ glirastes tools refresh # derive tools (--watch next to `next dev`)
171
+ glirastes tools status # what the chat can do
172
+ glirastes tools check # verify committed outputs, no model, no network
173
+ glirastes tools eval # every example sentence finds its tool
174
+ ```
175
+
176
+ **Policy.** Reads run directly, writes ask first, deletes and anything
177
+ external or financial always ask. Change that locally with
178
+ `glirastes tools policy` (`show`, `disable`, `confirm`, `relax`, `raise`,
179
+ `roles`, `exclude`, ...); it writes `.glirastes/tool-policy.json`. See
180
+ [docs/tool-policy.md](docs/tool-policy.md).
181
+
182
+ **Describing tools.** Glirastes itself never calls a model. Descriptions,
183
+ synonyms and example calls are written by a coding agent from work lists:
184
+
185
+ - **Free:** your own coding agent works through `glirastes tools resolve --print`
186
+ and `glirastes tools describe --print` with the shipped skills
187
+ `maintaining-glirastes-tools` and `describing-glirastes-tools`, and you
188
+ commit the result.
189
+ - **Pro:** the managed CI tool agent (`glirastes tools enrich --managed`)
190
+ runs the same skills in your CI, only on the tools a pull request or push
191
+ changed, and commits the result as `glirastes-bot`. Model requests go
192
+ through OpenRouter with the routing the Platform grants for the job (no
193
+ data collection, zero data retention), or your own key in
194
+ `GLIRASTES_TOOLS_OPENROUTER_KEY`. Requires the optional peer
195
+ `@ai-sdk/openai`.
196
+
197
+ ## CI
812
198
 
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
199
+ ```bash
200
+ npx glirastes init --ci github [--enrich-on staging,main] [--ci-environment staging]
201
+ ```
202
+
203
+ writes `.github/workflows/glirastes-tools.yml` for your package manager with
204
+ two jobs:
205
+
206
+ | Job | What it does | Needs |
207
+ |---|---|---|
208
+ | `glirastes-tools` | `tools check` and `tools eval` on every pull request and push to `main` | nothing: no secrets, no model |
209
+ | `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` |
210
+
211
+ - `--enrich-on <branch,...>` (or `--enrich-on-main`) also runs the agent
212
+ after pushes to those branches; there it opens a pull request instead of
213
+ committing, and the workflow gets a manual start that works the whole
214
+ backlog once.
215
+ - `--ci-environment <name>` reads the three values from that GitHub
216
+ environment instead of the repository.
217
+ - Set the variable `GLIRASTES_BOT_APP_ID` and the secret
218
+ `GLIRASTES_BOT_APP_PRIVATE_KEY` to push as a GitHub App, so the bot's
219
+ commits and pull requests trigger your checks. Without them the job uses
220
+ the workflow token.
221
+ - An existing workflow with other content is refused unless you pass `--force`.
222
+
223
+ ## Chat UI & speech
224
+
225
+ `glirastes/react` ships one chat implementation; `VercelAiChat` from
226
+ `glirastes/react/vercel` connects it to the AI SDK route.
227
+
228
+ - Docked sidebar or floating window (`AssistantWorkspace`, `AssistantToggle`),
229
+ themes, slots, tool result renderers and approval cards.
230
+ - `useAiClientAction(id, handler, contract)` lets the chat drive UI state;
231
+ `refresh` turns each registration into a tool.
232
+ - Generic `@` mentions and `/` commands derived from your tools
233
+ ([docs/chat-interactions.md](docs/chat-interactions.md)).
234
+ - A per-message work log of tool calls and an optional plan checklist.
235
+ - `unstyled` to bring your own CSS; `deChatLocale` for German texts.
236
+ - Push-to-talk speech input through one STT controller (`voice` config,
237
+ `glirastes/stt` adapters, `createRecordingTranscriptionHandler` for a
238
+ server-side transcription route). Audio goes from the app to its own
239
+ provider, never through Glirastes.
240
+ - Without React: the `<glirastes-chat>` element from `glirastes/embed` and the
241
+ bridge in `glirastes/browser`.
242
+
243
+ See the skill [`building-glirastes-chat-ui`](skills/building-glirastes-chat-ui/SKILL.md).
244
+
245
+ ## Standalone and Connected
246
+
247
+ | | Standalone | Connected |
248
+ |---|---|---|
249
+ | Trigger | no `GLIRASTES_API_KEY` | `GLIRASTES_API_KEY` is set |
250
+ | Network | none | Platform lookup, registration, sync and metrics, all off the turn path |
251
+ | Config | local code and `.glirastes/` | reviewed, signed, immutable revisions with rollouts and revocations |
252
+
253
+ `createGlirastes` from `glirastes/runtime` handles both. Connected, it falls
254
+ back to the local code whenever the Platform is unreachable and reports errors
255
+ to `onError` (operation and status only). `GLIRASTES_CONTROL_PLANE_URL` is
256
+ optional and defaults to `https://api.glirastes.io`; set it only
257
+ for a self-hosted or local Platform.
832
258
 
833
259
  ```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
260
+ npx glirastes connect # pair the app with the hosted Platform, writes GLIRASTES_API_KEY
261
+ npx glirastes sync # upload the current local setup
262
+ npx glirastes doctor # local checks, no network
836
263
  ```
837
264
 
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/>
265
+ Pass `--base-url <platform-url>` to `connect` only for a self-hosted or local
266
+ Platform. For a production server or CI where nobody runs `connect`, create a
267
+ key in the Platform dashboard under **Settings → API keys → "Keys for servers
268
+ and CI"** and set it as `GLIRASTES_API_KEY`.
841
269
 
842
- ## CLI
270
+ The **Glirastes Platform** is the optional control plane: reviewed tool
271
+ configuration, signed immutable revisions, staged rollouts, approvals and
272
+ content-free health. **Free** covers the local SDK, the local skill workflow
273
+ and a connected app; **Pro** adds the managed CI tool agent. Details:
274
+ [docs/managed-runtime-sync.md](docs/managed-runtime-sync.md),
275
+ [docs/runtime-persistence.md](docs/runtime-persistence.md).
843
276
 
844
- The SDK includes a `glirastes` CLI for scaffolding, code generation, and validation. Run any command with `npx glirastes <command>` or `bunx glirastes <command>`:
277
+ ## Package surface
845
278
 
846
- | Command | What it does |
279
+ | Import | Purpose |
847
280
  |---|---|
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 |
281
+ | `glirastes` | Shared types, tool definition helpers and diagnostics |
282
+ | `glirastes/runtime` | `createGlirastes`, local authorization, pinned turns, budgets, durable stores |
283
+ | `glirastes/server` | Server pipeline, including `createLocalAiPipeline` |
284
+ | `glirastes/server/nextjs` | Next.js handlers: `createAiChatHandler`, `createChatInteractionsHandler`, `createRecordingTranscriptionHandler` (alias `glirastes/adapter/nextjs`) |
285
+ | `glirastes/server/testing` | Test helpers for tool setups without model calls (ESM only) |
286
+ | `glirastes/react` | Chat UI, provider, hooks, client actions, navigation bridge, STT |
287
+ | `glirastes/react/vercel` | AI SDK transport and `VercelAiChat` |
288
+ | `glirastes/react/styles.css` | Shipped chat styles |
289
+ | `glirastes/stt` | Provider-neutral STT controller and adapters |
290
+ | `glirastes/ai-sdk` | Vercel AI SDK reference engine (alias `glirastes/runtime/ai-sdk`) |
291
+ | `glirastes/contracts` | Principals, budgets, manifests, revisions, deployments |
292
+ | `glirastes/sync` | Signed revision cache, rollout selection, revocations |
293
+ | `glirastes/embed` | `<glirastes-chat>` element for apps without React |
294
+ | `glirastes/browser` | Navigation bridge, query filters and client actions without React |
295
+ | `glirastes/codegen` | Route scanning and execution-inventory discovery used by the CLI |
296
+
297
+ ## CLI reference
298
+
299
+ | Command | Purpose |
872
300
  |---|---|
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
301
+ | `glirastes init [--agent codex\|claude] [--dry-run] [--json]` | Scaffold inputs, install skills, hand setup to your coding agent |
302
+ | `glirastes init --ci github [...]` | Write the GitHub tools workflow ([CI](#ci)) |
303
+ | `glirastes tools refresh [--watch] [--mode write\|frozen\|integrity]` | Derive tools from the code |
304
+ | `glirastes tools check [--strict] [--integrity-only]` | Verify committed tool outputs |
305
+ | `glirastes tools status` | Show what the chat can do |
306
+ | `glirastes tools resolve --print` | Work list of open findings for your agent |
307
+ | `glirastes tools describe --print [<tool>...\|--all]` | Work list of descriptions, synonyms and examples |
308
+ | `glirastes tools eval` | Check that example sentences find their tool |
309
+ | `glirastes tools verify <tool>...\|--all` | Confirm agent-written contracts after review |
310
+ | `glirastes tools policy <...>` | Change the local tool policy |
311
+ | `glirastes tools enrich --managed [--first-run] [--base <branch>]` | Pro, CI only: run the managed tool agent |
312
+ | `glirastes setup [--dry-run] [--managed]` | Validate and install the local setup artifacts |
313
+ | `glirastes setup inspect` | Inspect project manifests before integration |
314
+ | `glirastes connect [--base-url <url>]` | Pair the app with the Platform (`--base-url` only for self-hosted) |
315
+ | `glirastes sync` | Upload the current local setup |
316
+ | `glirastes doctor [--managed] [--verbose] [--json]` | Diagnose the local setup |
317
+ | `glirastes install [--host a,b]` | Install the agent skills only |
318
+
319
+ `glirastes --help` lists every command and flag; `glirastes tools` and
320
+ `glirastes tools policy` print their own usage.
889
321
 
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
322
+ ## Agent skills
900
323
 
901
- # Auto-update with the SDK on every npm install
902
- npx glirastes install-skills --symlink
324
+ The package ships seven skills in [`skills/`](skills/README.md) for your
325
+ existing coding agent (Codex, Claude Code, Gemini): `setting-up-glirastes`,
326
+ `integrating-glirastes-nextjs`, `integrating-glirastes-web`,
327
+ `maintaining-glirastes-tools`, `describing-glirastes-tools`,
328
+ `building-glirastes-chat-ui` and `migrating-to-glirastes`. `glirastes init`
329
+ installs them; `glirastes install --host codex --with-setup-skills` installs
330
+ them without starting setup.
903
331
 
904
- # Preview without writing
905
- npx glirastes install-skills --dry-run
332
+ ## Support matrix
906
333
 
907
- # Overwrite previously installed skills
908
- npx glirastes install-skills --force
909
- ```
334
+ Next.js 15 App Router, React (Vite, react-router) + NestJS 11 and Vue 3 +
335
+ FastAPI are integrated and automatically checked. Exact levels and evidence:
336
+ [docs/support-matrix.md](docs/support-matrix.md).
910
337
 
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.
338
+ ## Docs
912
339
 
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.
340
+ - [Support matrix](docs/support-matrix.md)
341
+ - [Tool policy](docs/tool-policy.md)
342
+ - [Chat route security](docs/chat-route-security.md)
343
+ - [Chat interactions (`@` and `/`)](docs/chat-interactions.md)
344
+ - [Managed runtime sync](docs/managed-runtime-sync.md)
345
+ - [Runtime persistence](docs/runtime-persistence.md)
346
+ - [0.5.0 acceptance](docs/acceptance/0.5.0-acceptance.md)
347
+ - [Agent skills](skills/README.md)
348
+ - Examples: [`examples/`](examples/)
914
349
 
915
- <br/>
350
+ ## Upgrading from 0.4
916
351
 
917
- ## License
352
+ `0.5.0` is the first Foundation release. Its surface differs from
353
+ `glirastes@0.4.0`: exports, codegen APIs and CLI commands were removed or
354
+ replaced. Read **Breaking** in [CHANGELOG.md](CHANGELOG.md) before upgrading;
355
+ the skill [`migrating-to-glirastes`](skills/migrating-to-glirastes/SKILL.md)
356
+ covers moving off `@chainmatics/agentic-*`.
918
357
 
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.
358
+ ## Security & License
920
359
 
921
- <br/>
360
+ Report vulnerabilities as described in [SECURITY.md](SECURITY.md).
361
+ Contributions: [CONTRIBUTING.md](CONTRIBUTING.md).
922
362
 
923
- ---
924
-
925
- <p align="center">
926
- <sub>Built by <a href="https://chainmatics.de">Chainmatics</a></sub>
927
- </p>
363
+ Apache-2.0, see [LICENSE](LICENSE) and [NOTICE](NOTICE).