@antelopejs/dms-ai 0.0.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 (416) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +46 -0
  3. package/dist/builder/presence.d.ts +1 -0
  4. package/dist/builder/presence.js +22 -0
  5. package/dist/builder/presence.js.map +1 -0
  6. package/dist/constants/builder.d.ts +7 -0
  7. package/dist/constants/builder.js +11 -0
  8. package/dist/constants/builder.js.map +1 -0
  9. package/dist/constants/frontend-module.d.ts +3 -0
  10. package/dist/constants/frontend-module.js +7 -0
  11. package/dist/constants/frontend-module.js.map +1 -0
  12. package/dist/constants/logs.d.ts +3 -0
  13. package/dist/constants/logs.js +7 -0
  14. package/dist/constants/logs.js.map +1 -0
  15. package/dist/constants/module.d.ts +3 -0
  16. package/dist/constants/module.js +7 -0
  17. package/dist/constants/module.js.map +1 -0
  18. package/dist/constants/pages-registry.d.ts +2 -0
  19. package/dist/constants/pages-registry.js +6 -0
  20. package/dist/constants/pages-registry.js.map +1 -0
  21. package/dist/constants/sidecar.d.ts +24 -0
  22. package/dist/constants/sidecar.js +32 -0
  23. package/dist/constants/sidecar.js.map +1 -0
  24. package/dist/index.d.ts +3 -0
  25. package/dist/index.js +41 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/lifecycle/module-roots.d.ts +1 -0
  28. package/dist/lifecycle/module-roots.js +52 -0
  29. package/dist/lifecycle/module-roots.js.map +1 -0
  30. package/dist/lifecycle/respawn-tracker.d.ts +5 -0
  31. package/dist/lifecycle/respawn-tracker.js +20 -0
  32. package/dist/lifecycle/respawn-tracker.js.map +1 -0
  33. package/dist/lifecycle/skill-sources.d.ts +5 -0
  34. package/dist/lifecycle/skill-sources.js +181 -0
  35. package/dist/lifecycle/skill-sources.js.map +1 -0
  36. package/dist/lifecycle/spawn-sidecar.d.ts +17 -0
  37. package/dist/lifecycle/spawn-sidecar.js +299 -0
  38. package/dist/lifecycle/spawn-sidecar.js.map +1 -0
  39. package/dist/logging/log-buffer.d.ts +9 -0
  40. package/dist/logging/log-buffer.js +76 -0
  41. package/dist/logging/log-buffer.js.map +1 -0
  42. package/dist/pages/activity/page.d.ts +10 -0
  43. package/dist/pages/activity/page.js +62 -0
  44. package/dist/pages/activity/page.js.map +1 -0
  45. package/dist/pages/all.d.ts +4 -0
  46. package/dist/pages/all.js +21 -0
  47. package/dist/pages/all.js.map +1 -0
  48. package/dist/pages/index.d.ts +4 -0
  49. package/dist/pages/index.js +21 -0
  50. package/dist/pages/index.js.map +1 -0
  51. package/dist/pages/module.d.ts +1 -0
  52. package/dist/pages/module.js +11 -0
  53. package/dist/pages/module.js.map +1 -0
  54. package/dist/pages/overview/page.d.ts +11 -0
  55. package/dist/pages/overview/page.js +82 -0
  56. package/dist/pages/overview/page.js.map +1 -0
  57. package/dist/pages/settings/page.d.ts +9 -0
  58. package/dist/pages/settings/page.js +29 -0
  59. package/dist/pages/settings/page.js.map +1 -0
  60. package/dist/pages/skills/page.d.ts +9 -0
  61. package/dist/pages/skills/page.js +29 -0
  62. package/dist/pages/skills/page.js.map +1 -0
  63. package/dist/pages-registry.d.ts +2 -0
  64. package/dist/pages-registry.js +41 -0
  65. package/dist/pages-registry.js.map +1 -0
  66. package/dist/routes/builder.d.ts +11 -0
  67. package/dist/routes/builder.js +135 -0
  68. package/dist/routes/builder.js.map +1 -0
  69. package/dist/routes/health.d.ts +8 -0
  70. package/dist/routes/health.js +27 -0
  71. package/dist/routes/health.js.map +1 -0
  72. package/dist/routes/index.d.ts +8 -0
  73. package/dist/routes/index.js +25 -0
  74. package/dist/routes/index.js.map +1 -0
  75. package/dist/routes/logs.d.ts +7 -0
  76. package/dist/routes/logs.js +51 -0
  77. package/dist/routes/logs.js.map +1 -0
  78. package/dist/routes/metrics.d.ts +54 -0
  79. package/dist/routes/metrics.js +104 -0
  80. package/dist/routes/metrics.js.map +1 -0
  81. package/dist/routes/pages-registry.d.ts +7 -0
  82. package/dist/routes/pages-registry.js +86 -0
  83. package/dist/routes/pages-registry.js.map +1 -0
  84. package/dist/routes/proxy.d.ts +4 -0
  85. package/dist/routes/proxy.js +55 -0
  86. package/dist/routes/proxy.js.map +1 -0
  87. package/dist/routes/settings.d.ts +13 -0
  88. package/dist/routes/settings.js +52 -0
  89. package/dist/routes/settings.js.map +1 -0
  90. package/dist/routes/sidecar-auth.d.ts +3 -0
  91. package/dist/routes/sidecar-auth.js +27 -0
  92. package/dist/routes/sidecar-auth.js.map +1 -0
  93. package/dist/routes/sidecar-info.d.ts +6 -0
  94. package/dist/routes/sidecar-info.js +39 -0
  95. package/dist/routes/sidecar-info.js.map +1 -0
  96. package/dist/routes/skills.d.ts +18 -0
  97. package/dist/routes/skills.js +33 -0
  98. package/dist/routes/skills.js.map +1 -0
  99. package/dist/types/index.d.ts +2 -0
  100. package/dist/types/index.js +19 -0
  101. package/dist/types/index.js.map +1 -0
  102. package/dist/types/logs.d.ts +12 -0
  103. package/dist/types/logs.js +3 -0
  104. package/dist/types/logs.js.map +1 -0
  105. package/dist/types/pages-registry.d.ts +6 -0
  106. package/dist/types/pages-registry.js +3 -0
  107. package/dist/types/pages-registry.js.map +1 -0
  108. package/frontend-vue/.editorconfig +12 -0
  109. package/frontend-vue/app/components/ActivityView.vue +94 -0
  110. package/frontend-vue/app/components/SettingsView.vue +300 -0
  111. package/frontend-vue/app/components/SkillsView.vue +228 -0
  112. package/frontend-vue/app/plugins/ai.client.ts +109 -0
  113. package/frontend-vue/app/runtime/backoff.ts +30 -0
  114. package/frontend-vue/app/runtime/constants.ts +66 -0
  115. package/frontend-vue/app/runtime/current-page.ts +28 -0
  116. package/frontend-vue/app/runtime/header-action.ts +64 -0
  117. package/frontend-vue/app/runtime/host-commands.ts +127 -0
  118. package/frontend-vue/app/runtime/navigation-complete.ts +22 -0
  119. package/frontend-vue/app/runtime/overlay-prefs.ts +89 -0
  120. package/frontend-vue/app/runtime/overlay.ts +383 -0
  121. package/frontend-vue/app/runtime/shortcuts.ts +28 -0
  122. package/frontend-vue/app/runtime/sidecar-status.ts +163 -0
  123. package/frontend-vue/app/runtime/theme-bridge.ts +177 -0
  124. package/frontend-vue/app/runtime/ws-client.ts +196 -0
  125. package/frontend-vue/dms.frontend.ts +26 -0
  126. package/frontend-vue/eslint.config.mjs +24 -0
  127. package/frontend-vue/package.json +33 -0
  128. package/frontend-vue/pnpm-lock.yaml +2723 -0
  129. package/frontend-vue/tests/backoff.test.ts +44 -0
  130. package/frontend-vue/tests/host-commands.test.ts +142 -0
  131. package/frontend-vue/tests/navigation.test.ts +45 -0
  132. package/frontend-vue/tests/overlay-prefs.test.ts +91 -0
  133. package/frontend-vue/tests/sidecar-auth.test.ts +87 -0
  134. package/frontend-vue/tests/sidecar-guest.test.ts +45 -0
  135. package/frontend-vue/vitest.config.ts +8 -0
  136. package/package.json +79 -0
  137. package/sidecar/chatbox/dist/assets/index-Cy2BwTG0.js +50 -0
  138. package/sidecar/chatbox/dist/assets/index-pP_KOHIn.css +1 -0
  139. package/sidecar/chatbox/dist/index.html +13 -0
  140. package/sidecar/dist/agent/attachments.d.ts +8 -0
  141. package/sidecar/dist/agent/attachments.js +85 -0
  142. package/sidecar/dist/agent/attachments.js.map +1 -0
  143. package/sidecar/dist/agent/claude-runner.d.ts +33 -0
  144. package/sidecar/dist/agent/claude-runner.js +264 -0
  145. package/sidecar/dist/agent/claude-runner.js.map +1 -0
  146. package/sidecar/dist/agent/claude-session.d.ts +18 -0
  147. package/sidecar/dist/agent/claude-session.js +155 -0
  148. package/sidecar/dist/agent/claude-session.js.map +1 -0
  149. package/sidecar/dist/agent/edit-tracker.d.ts +9 -0
  150. package/sidecar/dist/agent/edit-tracker.js +34 -0
  151. package/sidecar/dist/agent/edit-tracker.js.map +1 -0
  152. package/sidecar/dist/agent/host-context.d.ts +4 -0
  153. package/sidecar/dist/agent/host-context.js +16 -0
  154. package/sidecar/dist/agent/host-context.js.map +1 -0
  155. package/sidecar/dist/agent/input-queue.d.ts +7 -0
  156. package/sidecar/dist/agent/input-queue.js +39 -0
  157. package/sidecar/dist/agent/input-queue.js.map +1 -0
  158. package/sidecar/dist/agent/permission-bus.d.ts +26 -0
  159. package/sidecar/dist/agent/permission-bus.js +138 -0
  160. package/sidecar/dist/agent/permission-bus.js.map +1 -0
  161. package/sidecar/dist/agent/question-bus.d.ts +22 -0
  162. package/sidecar/dist/agent/question-bus.js +91 -0
  163. package/sidecar/dist/agent/question-bus.js.map +1 -0
  164. package/sidecar/dist/agent/read-access.d.ts +2 -0
  165. package/sidecar/dist/agent/read-access.js +33 -0
  166. package/sidecar/dist/agent/read-access.js.map +1 -0
  167. package/sidecar/dist/agent/resolve-claude-binary.d.ts +1 -0
  168. package/sidecar/dist/agent/resolve-claude-binary.js +43 -0
  169. package/sidecar/dist/agent/resolve-claude-binary.js.map +1 -0
  170. package/sidecar/dist/agent/runner-events.d.ts +28 -0
  171. package/sidecar/dist/agent/runner-events.js +2 -0
  172. package/sidecar/dist/agent/runner-events.js.map +1 -0
  173. package/sidecar/dist/agent/sdk-adapter.d.ts +3 -0
  174. package/sidecar/dist/agent/sdk-adapter.js +106 -0
  175. package/sidecar/dist/agent/sdk-adapter.js.map +1 -0
  176. package/sidecar/dist/agent/sdk-loader.d.ts +5 -0
  177. package/sidecar/dist/agent/sdk-loader.js +14 -0
  178. package/sidecar/dist/agent/sdk-loader.js.map +1 -0
  179. package/sidecar/dist/agent/system-prompt.d.ts +6 -0
  180. package/sidecar/dist/agent/system-prompt.js +29 -0
  181. package/sidecar/dist/agent/system-prompt.js.map +1 -0
  182. package/sidecar/dist/agent/tool-summary.d.ts +1 -0
  183. package/sidecar/dist/agent/tool-summary.js +46 -0
  184. package/sidecar/dist/agent/tool-summary.js.map +1 -0
  185. package/sidecar/dist/agent/typecheck.d.ts +36 -0
  186. package/sidecar/dist/agent/typecheck.js +104 -0
  187. package/sidecar/dist/agent/typecheck.js.map +1 -0
  188. package/sidecar/dist/builder/builder-client.d.ts +10 -0
  189. package/sidecar/dist/builder/builder-client.js +52 -0
  190. package/sidecar/dist/builder/builder-client.js.map +1 -0
  191. package/sidecar/dist/builder/capability.d.ts +4 -0
  192. package/sidecar/dist/builder/capability.js +11 -0
  193. package/sidecar/dist/builder/capability.js.map +1 -0
  194. package/sidecar/dist/constants/agent.d.ts +25 -0
  195. package/sidecar/dist/constants/agent.js +25 -0
  196. package/sidecar/dist/constants/agent.js.map +1 -0
  197. package/sidecar/dist/constants/attachments.d.ts +7 -0
  198. package/sidecar/dist/constants/attachments.js +12 -0
  199. package/sidecar/dist/constants/attachments.js.map +1 -0
  200. package/sidecar/dist/constants/builder.d.ts +5 -0
  201. package/sidecar/dist/constants/builder.js +32 -0
  202. package/sidecar/dist/constants/builder.js.map +1 -0
  203. package/sidecar/dist/constants/daemon.d.ts +7 -0
  204. package/sidecar/dist/constants/daemon.js +8 -0
  205. package/sidecar/dist/constants/daemon.js.map +1 -0
  206. package/sidecar/dist/constants/env.d.ts +3 -0
  207. package/sidecar/dist/constants/env.js +4 -0
  208. package/sidecar/dist/constants/env.js.map +1 -0
  209. package/sidecar/dist/constants/host-state.d.ts +1 -0
  210. package/sidecar/dist/constants/host-state.js +2 -0
  211. package/sidecar/dist/constants/host-state.js.map +1 -0
  212. package/sidecar/dist/constants/http.d.ts +20 -0
  213. package/sidecar/dist/constants/http.js +31 -0
  214. package/sidecar/dist/constants/http.js.map +1 -0
  215. package/sidecar/dist/constants/logs.d.ts +11 -0
  216. package/sidecar/dist/constants/logs.js +16 -0
  217. package/sidecar/dist/constants/logs.js.map +1 -0
  218. package/sidecar/dist/constants/mcp.d.ts +24 -0
  219. package/sidecar/dist/constants/mcp.js +38 -0
  220. package/sidecar/dist/constants/mcp.js.map +1 -0
  221. package/sidecar/dist/constants/native-binary.d.ts +4 -0
  222. package/sidecar/dist/constants/native-binary.js +5 -0
  223. package/sidecar/dist/constants/native-binary.js.map +1 -0
  224. package/sidecar/dist/constants/pages.d.ts +16 -0
  225. package/sidecar/dist/constants/pages.js +24 -0
  226. package/sidecar/dist/constants/pages.js.map +1 -0
  227. package/sidecar/dist/constants/paths.d.ts +3 -0
  228. package/sidecar/dist/constants/paths.js +7 -0
  229. package/sidecar/dist/constants/paths.js.map +1 -0
  230. package/sidecar/dist/constants/permissions.d.ts +15 -0
  231. package/sidecar/dist/constants/permissions.js +15 -0
  232. package/sidecar/dist/constants/permissions.js.map +1 -0
  233. package/sidecar/dist/constants/ports.d.ts +3 -0
  234. package/sidecar/dist/constants/ports.js +4 -0
  235. package/sidecar/dist/constants/ports.js.map +1 -0
  236. package/sidecar/dist/constants/project.d.ts +8 -0
  237. package/sidecar/dist/constants/project.js +12 -0
  238. package/sidecar/dist/constants/project.js.map +1 -0
  239. package/sidecar/dist/constants/questions.d.ts +4 -0
  240. package/sidecar/dist/constants/questions.js +5 -0
  241. package/sidecar/dist/constants/questions.js.map +1 -0
  242. package/sidecar/dist/constants/read-access.d.ts +1 -0
  243. package/sidecar/dist/constants/read-access.js +8 -0
  244. package/sidecar/dist/constants/read-access.js.map +1 -0
  245. package/sidecar/dist/constants/safety-net.d.ts +5 -0
  246. package/sidecar/dist/constants/safety-net.js +6 -0
  247. package/sidecar/dist/constants/safety-net.js.map +1 -0
  248. package/sidecar/dist/constants/settings.d.ts +9 -0
  249. package/sidecar/dist/constants/settings.js +29 -0
  250. package/sidecar/dist/constants/settings.js.map +1 -0
  251. package/sidecar/dist/constants/state.d.ts +7 -0
  252. package/sidecar/dist/constants/state.js +7 -0
  253. package/sidecar/dist/constants/state.js.map +1 -0
  254. package/sidecar/dist/constants/timing.d.ts +1 -0
  255. package/sidecar/dist/constants/timing.js +2 -0
  256. package/sidecar/dist/constants/timing.js.map +1 -0
  257. package/sidecar/dist/constants/tool-summary.d.ts +20 -0
  258. package/sidecar/dist/constants/tool-summary.js +21 -0
  259. package/sidecar/dist/constants/tool-summary.js.map +1 -0
  260. package/sidecar/dist/constants/typecheck.d.ts +16 -0
  261. package/sidecar/dist/constants/typecheck.js +23 -0
  262. package/sidecar/dist/constants/typecheck.js.map +1 -0
  263. package/sidecar/dist/constants/ws.d.ts +5 -0
  264. package/sidecar/dist/constants/ws.js +6 -0
  265. package/sidecar/dist/constants/ws.js.map +1 -0
  266. package/sidecar/dist/host/project-info.d.ts +6 -0
  267. package/sidecar/dist/host/project-info.js +51 -0
  268. package/sidecar/dist/host/project-info.js.map +1 -0
  269. package/sidecar/dist/index.d.ts +3 -0
  270. package/sidecar/dist/index.js +280 -0
  271. package/sidecar/dist/index.js.map +1 -0
  272. package/sidecar/dist/logs/logs-client.d.ts +11 -0
  273. package/sidecar/dist/logs/logs-client.js +52 -0
  274. package/sidecar/dist/logs/logs-client.js.map +1 -0
  275. package/sidecar/dist/logs/types.d.ts +12 -0
  276. package/sidecar/dist/logs/types.js +2 -0
  277. package/sidecar/dist/logs/types.js.map +1 -0
  278. package/sidecar/dist/mcp/server.d.ts +2 -0
  279. package/sidecar/dist/mcp/server.js +50 -0
  280. package/sidecar/dist/mcp/server.js.map +1 -0
  281. package/sidecar/dist/mcp/tools/ask-user.d.ts +41 -0
  282. package/sidecar/dist/mcp/tools/ask-user.js +29 -0
  283. package/sidecar/dist/mcp/tools/ask-user.js.map +1 -0
  284. package/sidecar/dist/mcp/tools/builder.d.ts +259 -0
  285. package/sidecar/dist/mcp/tools/builder.js +216 -0
  286. package/sidecar/dist/mcp/tools/builder.js.map +1 -0
  287. package/sidecar/dist/mcp/tools/find-pages-using.d.ts +15 -0
  288. package/sidecar/dist/mcp/tools/find-pages-using.js +108 -0
  289. package/sidecar/dist/mcp/tools/find-pages-using.js.map +1 -0
  290. package/sidecar/dist/mcp/tools/get-current-page.d.ts +4 -0
  291. package/sidecar/dist/mcp/tools/get-current-page.js +12 -0
  292. package/sidecar/dist/mcp/tools/get-current-page.js.map +1 -0
  293. package/sidecar/dist/mcp/tools/list-pages.d.ts +8 -0
  294. package/sidecar/dist/mcp/tools/list-pages.js +29 -0
  295. package/sidecar/dist/mcp/tools/list-pages.js.map +1 -0
  296. package/sidecar/dist/mcp/tools/navigate-to-page.d.ts +14 -0
  297. package/sidecar/dist/mcp/tools/navigate-to-page.js +66 -0
  298. package/sidecar/dist/mcp/tools/navigate-to-page.js.map +1 -0
  299. package/sidecar/dist/mcp/tools/query-logs.d.ts +11 -0
  300. package/sidecar/dist/mcp/tools/query-logs.js +32 -0
  301. package/sidecar/dist/mcp/tools/query-logs.js.map +1 -0
  302. package/sidecar/dist/mcp/tools/typecheck.d.ts +9 -0
  303. package/sidecar/dist/mcp/tools/typecheck.js +20 -0
  304. package/sidecar/dist/mcp/tools/typecheck.js.map +1 -0
  305. package/sidecar/dist/mcp/types.d.ts +27 -0
  306. package/sidecar/dist/mcp/types.js +2 -0
  307. package/sidecar/dist/mcp/types.js.map +1 -0
  308. package/sidecar/dist/metrics/aggregate.d.ts +11 -0
  309. package/sidecar/dist/metrics/aggregate.js +189 -0
  310. package/sidecar/dist/metrics/aggregate.js.map +1 -0
  311. package/sidecar/dist/metrics/types.d.ts +53 -0
  312. package/sidecar/dist/metrics/types.js +8 -0
  313. package/sidecar/dist/metrics/types.js.map +1 -0
  314. package/sidecar/dist/pages/imports-scanner.d.ts +9 -0
  315. package/sidecar/dist/pages/imports-scanner.js +143 -0
  316. package/sidecar/dist/pages/imports-scanner.js.map +1 -0
  317. package/sidecar/dist/pages/registry-client.d.ts +15 -0
  318. package/sidecar/dist/pages/registry-client.js +83 -0
  319. package/sidecar/dist/pages/registry-client.js.map +1 -0
  320. package/sidecar/dist/pages/route-match.d.ts +2 -0
  321. package/sidecar/dist/pages/route-match.js +10 -0
  322. package/sidecar/dist/pages/route-match.js.map +1 -0
  323. package/sidecar/dist/pages/types.d.ts +11 -0
  324. package/sidecar/dist/pages/types.js +2 -0
  325. package/sidecar/dist/pages/types.js.map +1 -0
  326. package/sidecar/dist/prompts/agent.d.ts +3 -0
  327. package/sidecar/dist/prompts/agent.js +40 -0
  328. package/sidecar/dist/prompts/agent.js.map +1 -0
  329. package/sidecar/dist/prompts/builder.d.ts +3 -0
  330. package/sidecar/dist/prompts/builder.js +4 -0
  331. package/sidecar/dist/prompts/builder.js.map +1 -0
  332. package/sidecar/dist/protocol/events.d.ts +1050 -0
  333. package/sidecar/dist/protocol/events.js +154 -0
  334. package/sidecar/dist/protocol/events.js.map +1 -0
  335. package/sidecar/dist/protocol/messages.d.ts +644 -0
  336. package/sidecar/dist/protocol/messages.js +139 -0
  337. package/sidecar/dist/protocol/messages.js.map +1 -0
  338. package/sidecar/dist/server/client-auth.d.ts +2 -0
  339. package/sidecar/dist/server/client-auth.js +25 -0
  340. package/sidecar/dist/server/client-auth.js.map +1 -0
  341. package/sidecar/dist/server/host-socket-registry.d.ts +9 -0
  342. package/sidecar/dist/server/host-socket-registry.js +42 -0
  343. package/sidecar/dist/server/host-socket-registry.js.map +1 -0
  344. package/sidecar/dist/server/http.d.ts +25 -0
  345. package/sidecar/dist/server/http.js +263 -0
  346. package/sidecar/dist/server/http.js.map +1 -0
  347. package/sidecar/dist/server/idle-shutdown.d.ts +10 -0
  348. package/sidecar/dist/server/idle-shutdown.js +35 -0
  349. package/sidecar/dist/server/idle-shutdown.js.map +1 -0
  350. package/sidecar/dist/server/iframe-socket-registry.d.ts +10 -0
  351. package/sidecar/dist/server/iframe-socket-registry.js +57 -0
  352. package/sidecar/dist/server/iframe-socket-registry.js.map +1 -0
  353. package/sidecar/dist/server/live-turns.d.ts +8 -0
  354. package/sidecar/dist/server/live-turns.js +16 -0
  355. package/sidecar/dist/server/live-turns.js.map +1 -0
  356. package/sidecar/dist/server/navigation-completer.d.ts +5 -0
  357. package/sidecar/dist/server/navigation-completer.js +49 -0
  358. package/sidecar/dist/server/navigation-completer.js.map +1 -0
  359. package/sidecar/dist/server/pending-queue.d.ts +11 -0
  360. package/sidecar/dist/server/pending-queue.js +54 -0
  361. package/sidecar/dist/server/pending-queue.js.map +1 -0
  362. package/sidecar/dist/server/raw-data.d.ts +2 -0
  363. package/sidecar/dist/server/raw-data.js +13 -0
  364. package/sidecar/dist/server/raw-data.js.map +1 -0
  365. package/sidecar/dist/server/routing.d.ts +64 -0
  366. package/sidecar/dist/server/routing.js +571 -0
  367. package/sidecar/dist/server/routing.js.map +1 -0
  368. package/sidecar/dist/server/safety-net.d.ts +16 -0
  369. package/sidecar/dist/server/safety-net.js +76 -0
  370. package/sidecar/dist/server/safety-net.js.map +1 -0
  371. package/sidecar/dist/server/ws.d.ts +33 -0
  372. package/sidecar/dist/server/ws.js +182 -0
  373. package/sidecar/dist/server/ws.js.map +1 -0
  374. package/sidecar/dist/skills/build-catalog.d.ts +15 -0
  375. package/sidecar/dist/skills/build-catalog.js +39 -0
  376. package/sidecar/dist/skills/build-catalog.js.map +1 -0
  377. package/sidecar/dist/skills/frontmatter.d.ts +9 -0
  378. package/sidecar/dist/skills/frontmatter.js +50 -0
  379. package/sidecar/dist/skills/frontmatter.js.map +1 -0
  380. package/sidecar/dist/skills/plugin-wrapper.d.ts +6 -0
  381. package/sidecar/dist/skills/plugin-wrapper.js +37 -0
  382. package/sidecar/dist/skills/plugin-wrapper.js.map +1 -0
  383. package/sidecar/dist/skills/resolve-sources.d.ts +3 -0
  384. package/sidecar/dist/skills/resolve-sources.js +14 -0
  385. package/sidecar/dist/skills/resolve-sources.js.map +1 -0
  386. package/sidecar/dist/skills/types.d.ts +4 -0
  387. package/sidecar/dist/skills/types.js +2 -0
  388. package/sidecar/dist/skills/types.js.map +1 -0
  389. package/sidecar/dist/state/conversations.d.ts +20 -0
  390. package/sidecar/dist/state/conversations.js +93 -0
  391. package/sidecar/dist/state/conversations.js.map +1 -0
  392. package/sidecar/dist/state/host-state.d.ts +10 -0
  393. package/sidecar/dist/state/host-state.js +14 -0
  394. package/sidecar/dist/state/host-state.js.map +1 -0
  395. package/sidecar/dist/state/lock.d.ts +12 -0
  396. package/sidecar/dist/state/lock.js +43 -0
  397. package/sidecar/dist/state/lock.js.map +1 -0
  398. package/sidecar/dist/state/settings-store.d.ts +12 -0
  399. package/sidecar/dist/state/settings-store.js +82 -0
  400. package/sidecar/dist/state/settings-store.js.map +1 -0
  401. package/sidecar/dist/state/settings-types.d.ts +12 -0
  402. package/sidecar/dist/state/settings-types.js +4 -0
  403. package/sidecar/dist/state/settings-types.js.map +1 -0
  404. package/sidecar/dist/state/sidecar-version.d.ts +1 -0
  405. package/sidecar/dist/state/sidecar-version.js +14 -0
  406. package/sidecar/dist/state/sidecar-version.js.map +1 -0
  407. package/sidecar/dist/state/store.d.ts +11 -0
  408. package/sidecar/dist/state/store.js +89 -0
  409. package/sidecar/dist/state/store.js.map +1 -0
  410. package/sidecar/dist/state/types.d.ts +36 -0
  411. package/sidecar/dist/state/types.js +10 -0
  412. package/sidecar/dist/state/types.js.map +1 -0
  413. package/sidecar/package.json +42 -0
  414. package/skills/dms-builder-page/SKILL.md +80 -0
  415. package/skills/dms-builder-safe/REFERENCE.md +111 -0
  416. package/skills/dms-builder-safe/SKILL.md +118 -0
package/LICENSE ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright (c) 2025-present - AntelopeJS Team
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # @antelopejs/dms-ai
2
+
3
+ <div align="center">
4
+ <a href="./LICENSE"><img alt="License" src="https://img.shields.io/badge/license-Apache--2.0-blue?style=for-the-badge&labelColor=000000"></a>
5
+ <a href="https://discord.gg/sjK28QHrA7"><img src="https://img.shields.io/badge/Discord-18181B?logo=discord&style=for-the-badge&color=000000" alt="Discord"></a>
6
+ <a href="https://antelopejs.com"><img src="https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000" alt="Documentation"></a>
7
+ </div>
8
+
9
+ An AntelopeJS DMS development assistant. It adds an owner-only AI workspace to the dashboard and
10
+ runs Claude Code in a local sidecar that can inspect the loaded modules and their declared skills,
11
+ edit the host project, and stream activity back to the dashboard.
12
+
13
+ ## Installation
14
+
15
+ Add the module to a project that already uses `@antelopejs/dms`:
16
+
17
+ ```bash
18
+ ajs project modules add @antelopejs/dms-ai
19
+ ```
20
+
21
+ The module starts its bundled sidecar with the project as its working directory. In development,
22
+ set `DMS_AI=0` before starting the backend to disable the sidecar. If
23
+ `@antelopejs/dms-builder` is installed, the assistant also exposes its builder integration.
24
+
25
+ ## Vue frontend
26
+
27
+ The module registers `frontend-vue` through `AddFrontendModule` with the Vue 3 renderer. The host DMS supplies authentication and shared state.
28
+
29
+ ## Development
30
+
31
+ Install dependencies and run the backend and sidecar checks from the repository root:
32
+
33
+ ```bash
34
+ pnpm install
35
+ pnpm build
36
+ pnpm test
37
+ ```
38
+
39
+ Build and typecheck the Vue source against a generated Inertia workspace that includes this module. Set `DMS_FRONTEND_WORKSPACE` to that workspace's absolute path, then run:
40
+
41
+ ```bash
42
+ pnpm --dir frontend-vue build
43
+ pnpm --dir frontend-vue typecheck
44
+ ```
45
+
46
+ `pnpm test:frontend-registration` checks backend registration and sidecar inputs with the sidecar launcher mocked.
@@ -0,0 +1 @@
1
+ export declare function isBuilderAvailable(): Promise<boolean>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isBuilderAvailable = isBuilderAvailable;
4
+ const modules_1 = require("@antelopejs/interface-core/modules");
5
+ const builder_1 = require("../constants/builder");
6
+ function withTimeout(work, fallback) {
7
+ return new Promise((resolve) => {
8
+ const timer = setTimeout(() => resolve(fallback), builder_1.BUILDER_PRESENCE_TIMEOUT_MS);
9
+ work.then((value) => {
10
+ clearTimeout(timer);
11
+ resolve(value);
12
+ }, () => {
13
+ clearTimeout(timer);
14
+ resolve(fallback);
15
+ });
16
+ });
17
+ }
18
+ async function isBuilderAvailable() {
19
+ const ids = await withTimeout((0, modules_1.ListModules)(), []);
20
+ return ids.some((id) => id === builder_1.BUILDER_MODULE_ID || id.includes(builder_1.BUILDER_MODULE_ID));
21
+ }
22
+ //# sourceMappingURL=presence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presence.js","sourceRoot":"","sources":["../../src/builder/presence.ts"],"names":[],"mappings":";;AAyBA,gDAKC;AA9BD,gEAAiE;AACjE,kDAG8B;AAE9B,SAAS,WAAW,CAAI,IAAgB,EAAE,QAAW;IACnD,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,EAAE;QAChC,MAAM,KAAK,GAAG,UAAU,CACtB,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,EACvB,qCAA2B,CAC5B,CAAC;QACF,IAAI,CAAC,IAAI,CACP,CAAC,KAAK,EAAE,EAAE;YACR,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,EACD,GAAG,EAAE;YACH,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,CAAC,QAAQ,CAAC,CAAC;QACpB,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,kBAAkB;IACtC,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC,IAAA,qBAAW,GAAE,EAAE,EAAc,CAAC,CAAC;IAC7D,OAAO,GAAG,CAAC,IAAI,CACb,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,2BAAiB,IAAI,EAAE,CAAC,QAAQ,CAAC,2BAAiB,CAAC,CACnE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const BUILDER_MODULE_ID = "dms-builder";
2
+ export declare const BUILDER_PRESENCE_TIMEOUT_MS = 2000;
3
+ export declare const BUILDER_OP_PATH = "/builder/op";
4
+ export declare const BUILDER_STATUS_PATH = "/builder/status";
5
+ export declare const HTTP_OK = 200;
6
+ export declare const HTTP_BAD_REQUEST = 400;
7
+ export declare const HTTP_BUILDER_UNAVAILABLE = 409;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HTTP_BUILDER_UNAVAILABLE = exports.HTTP_BAD_REQUEST = exports.HTTP_OK = exports.BUILDER_STATUS_PATH = exports.BUILDER_OP_PATH = exports.BUILDER_PRESENCE_TIMEOUT_MS = exports.BUILDER_MODULE_ID = void 0;
4
+ exports.BUILDER_MODULE_ID = "dms-builder";
5
+ exports.BUILDER_PRESENCE_TIMEOUT_MS = 2_000;
6
+ exports.BUILDER_OP_PATH = "/builder/op";
7
+ exports.BUILDER_STATUS_PATH = "/builder/status";
8
+ exports.HTTP_OK = 200;
9
+ exports.HTTP_BAD_REQUEST = 400;
10
+ exports.HTTP_BUILDER_UNAVAILABLE = 409;
11
+ //# sourceMappingURL=builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/constants/builder.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG,aAAa,CAAC;AAClC,QAAA,2BAA2B,GAAG,KAAK,CAAC;AACpC,QAAA,eAAe,GAAG,aAAa,CAAC;AAChC,QAAA,mBAAmB,GAAG,iBAAiB,CAAC;AACxC,QAAA,OAAO,GAAG,GAAG,CAAC;AACd,QAAA,gBAAgB,GAAG,GAAG,CAAC;AACvB,QAAA,wBAAwB,GAAG,GAAG,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const FRONTEND_MODULE_NAME = "@antelopejs/dms-ai-frontend-vue";
2
+ export declare const FRONTEND_MODULE_DIR = "../frontend-vue";
3
+ export declare const FRONTEND_MODULE_PRIORITY = 100;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FRONTEND_MODULE_PRIORITY = exports.FRONTEND_MODULE_DIR = exports.FRONTEND_MODULE_NAME = void 0;
4
+ exports.FRONTEND_MODULE_NAME = "@antelopejs/dms-ai-frontend-vue";
5
+ exports.FRONTEND_MODULE_DIR = "../frontend-vue";
6
+ exports.FRONTEND_MODULE_PRIORITY = 100;
7
+ //# sourceMappingURL=frontend-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontend-module.js","sourceRoot":"","sources":["../../src/constants/frontend-module.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,iCAAiC,CAAC;AACzD,QAAA,mBAAmB,GAAG,iBAAiB,CAAC;AACxC,QAAA,wBAAwB,GAAG,GAAG,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const LOG_BUFFER_CAP = 500;
2
+ export declare const LOG_QUERY_DEFAULT_LIMIT = 100;
3
+ export declare const LOG_QUERY_MAX_LIMIT = 500;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LOG_QUERY_MAX_LIMIT = exports.LOG_QUERY_DEFAULT_LIMIT = exports.LOG_BUFFER_CAP = void 0;
4
+ exports.LOG_BUFFER_CAP = 500;
5
+ exports.LOG_QUERY_DEFAULT_LIMIT = 100;
6
+ exports.LOG_QUERY_MAX_LIMIT = 500;
7
+ //# sourceMappingURL=logs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.js","sourceRoot":"","sources":["../../src/constants/logs.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,GAAG,CAAC;AAErB,QAAA,uBAAuB,GAAG,GAAG,CAAC;AAC9B,QAAA,mBAAmB,GAAG,GAAG,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const MODULE_ID = "ai";
2
+ export declare const ROUTE_PREFIX = "/ai";
3
+ export declare const PRODUCTION_NODE_ENV = "production";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRODUCTION_NODE_ENV = exports.ROUTE_PREFIX = exports.MODULE_ID = void 0;
4
+ exports.MODULE_ID = "ai";
5
+ exports.ROUTE_PREFIX = "/ai";
6
+ exports.PRODUCTION_NODE_ENV = "production";
7
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/constants/module.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,IAAI,CAAC;AACjB,QAAA,YAAY,GAAG,KAAK,CAAC;AACrB,QAAA,mBAAmB,GAAG,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const REGISTERED_FIELD = "registered";
2
+ export declare const DEFAULT_MODULE_ID = "dms";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_MODULE_ID = exports.REGISTERED_FIELD = void 0;
4
+ exports.REGISTERED_FIELD = "registered";
5
+ exports.DEFAULT_MODULE_ID = "dms";
6
+ //# sourceMappingURL=pages-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pages-registry.js","sourceRoot":"","sources":["../../src/constants/pages-registry.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,YAAY,CAAC;AAChC,QAAA,iBAAiB,GAAG,KAAK,CAAC"}
@@ -0,0 +1,24 @@
1
+ export declare const SIDECAR_BIN_NAME = "dms-ai-sidecar";
2
+ export declare const SIDECAR_SPAWN_TIMEOUT_MS = 10000;
3
+ export declare const SIDECAR_RESPAWN_MAX = 3;
4
+ export declare const SIDECAR_RESPAWN_WINDOW_MS = 60000;
5
+ export declare const SIDECAR_RESPAWN_DELAY_MS = 500;
6
+ export declare const SIDECAR_LOG_PREFIX = "[dms-ai]";
7
+ export declare const SIDECAR_DISABLED_FLAG = "0";
8
+ export declare const SIDECAR_ENV_DISABLE_KEY = "DMS_AI";
9
+ export declare const SIDECAR_DIST_REL = "../../sidecar/dist/index.js";
10
+ export declare const SIDECAR_SUCCESS_EXIT_CODE = 0;
11
+ export declare const SIDECAR_CACHE_DIR_SEGMENTS: readonly ["node_modules", ".cache", "dms-ai"];
12
+ export declare const SIDECAR_LOCK_FILE_NAME = "sidecar.lock";
13
+ export declare const SIDECAR_LOG_FILE_NAME = "sidecar.log";
14
+ export declare const SIDECAR_HEALTH_PATH = "/health";
15
+ export declare const SIDECAR_HEALTH_TIMEOUT_MS = 1000;
16
+ export declare const SIDECAR_LOCK_POLL_INTERVAL_MS = 100;
17
+ export declare const SIDECAR_BUILD_ID_FLAG = "--build-id";
18
+ export declare const SIDECAR_MODULE_ROOTS_FLAG = "--module-roots";
19
+ export declare const SIDECAR_SKILL_DIRS_FLAG = "--skill-dirs";
20
+ export declare const SIDECAR_BUILDER_FLAG = "--builder-enabled";
21
+ export declare const MODULE_ROOTS_TIMEOUT_MS = 3000;
22
+ export declare const SIDECAR_DIST_EXTENSION = ".js";
23
+ export declare const SIDECAR_LOOPBACK_HOST = "127.0.0.1";
24
+ export declare const SIDECAR_AUTH_HEADER = "x-dms-ai-token";
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SIDECAR_AUTH_HEADER = exports.SIDECAR_LOOPBACK_HOST = exports.SIDECAR_DIST_EXTENSION = exports.MODULE_ROOTS_TIMEOUT_MS = exports.SIDECAR_BUILDER_FLAG = exports.SIDECAR_SKILL_DIRS_FLAG = exports.SIDECAR_MODULE_ROOTS_FLAG = exports.SIDECAR_BUILD_ID_FLAG = exports.SIDECAR_LOCK_POLL_INTERVAL_MS = exports.SIDECAR_HEALTH_TIMEOUT_MS = exports.SIDECAR_HEALTH_PATH = exports.SIDECAR_LOG_FILE_NAME = exports.SIDECAR_LOCK_FILE_NAME = exports.SIDECAR_CACHE_DIR_SEGMENTS = exports.SIDECAR_SUCCESS_EXIT_CODE = exports.SIDECAR_DIST_REL = exports.SIDECAR_ENV_DISABLE_KEY = exports.SIDECAR_DISABLED_FLAG = exports.SIDECAR_LOG_PREFIX = exports.SIDECAR_RESPAWN_DELAY_MS = exports.SIDECAR_RESPAWN_WINDOW_MS = exports.SIDECAR_RESPAWN_MAX = exports.SIDECAR_SPAWN_TIMEOUT_MS = exports.SIDECAR_BIN_NAME = void 0;
4
+ exports.SIDECAR_BIN_NAME = "dms-ai-sidecar";
5
+ exports.SIDECAR_SPAWN_TIMEOUT_MS = 10_000;
6
+ exports.SIDECAR_RESPAWN_MAX = 3;
7
+ exports.SIDECAR_RESPAWN_WINDOW_MS = 60_000;
8
+ exports.SIDECAR_RESPAWN_DELAY_MS = 500;
9
+ exports.SIDECAR_LOG_PREFIX = "[dms-ai]";
10
+ exports.SIDECAR_DISABLED_FLAG = "0";
11
+ exports.SIDECAR_ENV_DISABLE_KEY = "DMS_AI";
12
+ exports.SIDECAR_DIST_REL = "../../sidecar/dist/index.js";
13
+ exports.SIDECAR_SUCCESS_EXIT_CODE = 0;
14
+ exports.SIDECAR_CACHE_DIR_SEGMENTS = [
15
+ "node_modules",
16
+ ".cache",
17
+ "dms-ai",
18
+ ];
19
+ exports.SIDECAR_LOCK_FILE_NAME = "sidecar.lock";
20
+ exports.SIDECAR_LOG_FILE_NAME = "sidecar.log";
21
+ exports.SIDECAR_HEALTH_PATH = "/health";
22
+ exports.SIDECAR_HEALTH_TIMEOUT_MS = 1000;
23
+ exports.SIDECAR_LOCK_POLL_INTERVAL_MS = 100;
24
+ exports.SIDECAR_BUILD_ID_FLAG = "--build-id";
25
+ exports.SIDECAR_MODULE_ROOTS_FLAG = "--module-roots";
26
+ exports.SIDECAR_SKILL_DIRS_FLAG = "--skill-dirs";
27
+ exports.SIDECAR_BUILDER_FLAG = "--builder-enabled";
28
+ exports.MODULE_ROOTS_TIMEOUT_MS = 3_000;
29
+ exports.SIDECAR_DIST_EXTENSION = ".js";
30
+ exports.SIDECAR_LOOPBACK_HOST = "127.0.0.1";
31
+ exports.SIDECAR_AUTH_HEADER = "x-dms-ai-token";
32
+ //# sourceMappingURL=sidecar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidecar.js","sourceRoot":"","sources":["../../src/constants/sidecar.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,gBAAgB,CAAC;AACpC,QAAA,wBAAwB,GAAG,MAAM,CAAC;AAClC,QAAA,mBAAmB,GAAG,CAAC,CAAC;AACxB,QAAA,yBAAyB,GAAG,MAAM,CAAC;AACnC,QAAA,wBAAwB,GAAG,GAAG,CAAC;AAC/B,QAAA,kBAAkB,GAAG,UAAU,CAAC;AAChC,QAAA,qBAAqB,GAAG,GAAG,CAAC;AAC5B,QAAA,uBAAuB,GAAG,QAAQ,CAAC;AACnC,QAAA,gBAAgB,GAAG,6BAA6B,CAAC;AACjD,QAAA,yBAAyB,GAAG,CAAC,CAAC;AAC9B,QAAA,0BAA0B,GAAG;IACxC,cAAc;IACd,QAAQ;IACR,QAAQ;CACA,CAAC;AACE,QAAA,sBAAsB,GAAG,cAAc,CAAC;AACxC,QAAA,qBAAqB,GAAG,aAAa,CAAC;AACtC,QAAA,mBAAmB,GAAG,SAAS,CAAC;AAChC,QAAA,yBAAyB,GAAG,IAAI,CAAC;AACjC,QAAA,6BAA6B,GAAG,GAAG,CAAC;AACpC,QAAA,qBAAqB,GAAG,YAAY,CAAC;AACrC,QAAA,yBAAyB,GAAG,gBAAgB,CAAC;AAC7C,QAAA,uBAAuB,GAAG,cAAc,CAAC;AACzC,QAAA,oBAAoB,GAAG,mBAAmB,CAAC;AAC3C,QAAA,uBAAuB,GAAG,KAAK,CAAC;AAChC,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC/B,QAAA,qBAAqB,GAAG,WAAW,CAAC;AACpC,QAAA,mBAAmB,GAAG,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import "./pages";
2
+ import "./routes";
3
+ export declare function start(): Promise<void>;
package/dist/index.js ADDED
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.start = start;
7
+ const node_path_1 = __importDefault(require("node:path"));
8
+ const logging_1 = require("@antelopejs/interface-core/logging");
9
+ const page_1 = require("@antelopejs/interface-dms/page");
10
+ const presence_1 = require("./builder/presence");
11
+ const frontend_module_1 = require("./constants/frontend-module");
12
+ const sidecar_1 = require("./constants/sidecar");
13
+ const module_roots_1 = require("./lifecycle/module-roots");
14
+ const skill_sources_1 = require("./lifecycle/skill-sources");
15
+ const spawn_sidecar_1 = require("./lifecycle/spawn-sidecar");
16
+ const log_buffer_1 = require("./logging/log-buffer");
17
+ require("./pages");
18
+ require("./routes");
19
+ async function start() {
20
+ (0, log_buffer_1.startLogCapture)();
21
+ await (0, page_1.AddFrontendModule)({
22
+ name: frontend_module_1.FRONTEND_MODULE_NAME,
23
+ sourcePath: node_path_1.default.join(__dirname, frontend_module_1.FRONTEND_MODULE_DIR),
24
+ renderer: { name: "vue", version: "3" },
25
+ priority: frontend_module_1.FRONTEND_MODULE_PRIORITY,
26
+ });
27
+ const [moduleRoots, skillDirs, builderEnabled] = await Promise.all([
28
+ (0, module_roots_1.collectModuleRoots)(),
29
+ (0, skill_sources_1.collectSkillSources)(),
30
+ (0, presence_1.isBuilderAvailable)(),
31
+ ]);
32
+ void (0, spawn_sidecar_1.spawnSidecar)({
33
+ hostProjectRoot: process.cwd(),
34
+ moduleRoots,
35
+ skillDirs,
36
+ builderEnabled,
37
+ }).catch((err) => {
38
+ logging_1.Logging.Error(`${sidecar_1.SIDECAR_LOG_PREFIX} spawn failed:`, err);
39
+ });
40
+ }
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAiBA,sBAwBC;AAzCD,0DAA6B;AAC7B,gEAA6D;AAC7D,yDAAmE;AACnE,iDAAwD;AACxD,iEAIqC;AACrC,iDAAyD;AACzD,2DAA8D;AAC9D,6DAAgE;AAChE,6DAAyD;AACzD,qDAAuD;AACvD,mBAAiB;AACjB,oBAAkB;AAEX,KAAK,UAAU,KAAK;IACzB,IAAA,4BAAe,GAAE,CAAC;IAClB,MAAM,IAAA,wBAAiB,EAAC;QACtB,IAAI,EAAE,sCAAoB;QAC1B,UAAU,EAAE,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qCAAmB,CAAC;QACrD,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE;QACvC,QAAQ,EAAE,0CAAwB;KACnC,CAAC,CAAC;IAIH,MAAM,CAAC,WAAW,EAAE,SAAS,EAAE,cAAc,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACjE,IAAA,iCAAkB,GAAE;QACpB,IAAA,mCAAmB,GAAE;QACrB,IAAA,6BAAkB,GAAE;KACrB,CAAC,CAAC;IACH,KAAK,IAAA,4BAAY,EAAC;QAChB,eAAe,EAAE,OAAO,CAAC,GAAG,EAAE;QAC9B,WAAW;QACX,SAAS;QACT,cAAc;KACf,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACf,iBAAO,CAAC,KAAK,CAAC,GAAG,4BAAkB,gBAAgB,EAAE,GAAG,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function collectModuleRoots(): Promise<string[]>;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.collectModuleRoots = collectModuleRoots;
4
+ const logging_1 = require("@antelopejs/interface-core/logging");
5
+ const modules_1 = require("@antelopejs/interface-core/modules");
6
+ const sidecar_1 = require("../constants/sidecar");
7
+ function withTimeout(work, fallback) {
8
+ return new Promise((resolve) => {
9
+ const timer = setTimeout(() => resolve(fallback), sidecar_1.MODULE_ROOTS_TIMEOUT_MS);
10
+ work.then((value) => {
11
+ clearTimeout(timer);
12
+ resolve(value);
13
+ }, () => {
14
+ clearTimeout(timer);
15
+ resolve(fallback);
16
+ });
17
+ });
18
+ }
19
+ function readSourcePath(source) {
20
+ if (source === null || typeof source !== "object")
21
+ return null;
22
+ const src = source;
23
+ if (src.type !== "local" && src.type !== "local-folder")
24
+ return null;
25
+ return typeof src.path === "string" && src.path.length > 0 ? src.path : null;
26
+ }
27
+ async function gatherModuleRoots() {
28
+ const ids = await (0, modules_1.ListModules)();
29
+ const infos = await Promise.all(ids.map((id) => (0, modules_1.GetModuleInfo)(id).catch(() => null)));
30
+ const roots = new Set();
31
+ for (const info of infos) {
32
+ if (info === null)
33
+ continue;
34
+ if (typeof info.localPath === "string" && info.localPath.length > 0) {
35
+ roots.add(info.localPath);
36
+ }
37
+ const sourcePath = readSourcePath(info.source);
38
+ if (sourcePath !== null)
39
+ roots.add(sourcePath);
40
+ }
41
+ return [...roots];
42
+ }
43
+ async function collectModuleRoots() {
44
+ try {
45
+ return await withTimeout(gatherModuleRoots(), []);
46
+ }
47
+ catch (err) {
48
+ logging_1.Logging.Error(`${sidecar_1.SIDECAR_LOG_PREFIX} failed to collect module roots:`, err);
49
+ return [];
50
+ }
51
+ }
52
+ //# sourceMappingURL=module-roots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-roots.js","sourceRoot":"","sources":["../../src/lifecycle/module-roots.ts"],"names":[],"mappings":";;AA6DA,gDAOC;AApED,gEAA6D;AAC7D,gEAAgF;AAChF,kDAG8B;AAU9B,SAAS,WAAW,CAAI,IAAgB,EAAE,QAAW;IACnD,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,EAAE;QAChC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,iCAAuB,CAAC,CAAC;QAC3E,IAAI,CAAC,IAAI,CACP,CAAC,KAAK,EAAE,EAAE;YACR,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,EACD,GAAG,EAAE;YACH,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,CAAC,QAAQ,CAAC,CAAC;QACpB,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,cAAc,CAAC,MAAe;IACrC,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC/D,MAAM,GAAG,GAAG,MAAqB,CAAC;IAClC,IAAI,GAAG,CAAC,IAAI,KAAK,OAAO,IAAI,GAAG,CAAC,IAAI,KAAK,cAAc;QAAE,OAAO,IAAI,CAAC;IACrE,OAAO,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/E,CAAC;AAQD,KAAK,UAAU,iBAAiB;IAC9B,MAAM,GAAG,GAAG,MAAM,IAAA,qBAAW,GAAE,CAAC;IAChC,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAC7B,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAA,uBAAa,EAAC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CACrD,CAAC;IACF,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,KAAK,IAAI;YAAE,SAAS;QAC5B,IAAI,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC5B,CAAC;QACD,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,UAAU,KAAK,IAAI;YAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC;AACpB,CAAC;AAEM,KAAK,UAAU,kBAAkB;IACtC,IAAI,CAAC;QACH,OAAO,MAAM,WAAW,CAAC,iBAAiB,EAAE,EAAE,EAAE,CAAC,CAAC;IACpD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,iBAAO,CAAC,KAAK,CAAC,GAAG,4BAAkB,kCAAkC,EAAE,GAAG,CAAC,CAAC;QAC5E,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ export interface RespawnTracker {
2
+ recordAttempt(now: number): void;
3
+ hasBudget(now: number): boolean;
4
+ }
5
+ export declare function createRespawnTracker(): RespawnTracker;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createRespawnTracker = createRespawnTracker;
4
+ const sidecar_1 = require("../constants/sidecar");
5
+ function createRespawnTracker() {
6
+ let timestamps = [];
7
+ function prune(now) {
8
+ const cutoff = now - sidecar_1.SIDECAR_RESPAWN_WINDOW_MS;
9
+ timestamps = timestamps.filter((t) => t >= cutoff);
10
+ }
11
+ function hasBudget(now) {
12
+ prune(now);
13
+ return timestamps.length < sidecar_1.SIDECAR_RESPAWN_MAX;
14
+ }
15
+ function recordAttempt(now) {
16
+ timestamps.push(now);
17
+ }
18
+ return { recordAttempt, hasBudget };
19
+ }
20
+ //# sourceMappingURL=respawn-tracker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"respawn-tracker.js","sourceRoot":"","sources":["../../src/lifecycle/respawn-tracker.ts"],"names":[],"mappings":";;AAUA,oDAkBC;AA5BD,kDAG8B;AAO9B,SAAgB,oBAAoB;IAClC,IAAI,UAAU,GAAa,EAAE,CAAC;IAE9B,SAAS,KAAK,CAAC,GAAW;QACxB,MAAM,MAAM,GAAG,GAAG,GAAG,mCAAyB,CAAC;QAC/C,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;IACrD,CAAC;IAED,SAAS,SAAS,CAAC,GAAW;QAC5B,KAAK,CAAC,GAAG,CAAC,CAAC;QACX,OAAO,UAAU,CAAC,MAAM,GAAG,6BAAmB,CAAC;IACjD,CAAC;IAED,SAAS,aAAa,CAAC,GAAW;QAChC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;AACtC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export interface SkillSource {
2
+ module: string;
3
+ dir: string;
4
+ }
5
+ export declare function collectSkillSources(): Promise<SkillSource[]>;