@antelopejs/dms-ai 0.2.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +64 -205
  2. package/dist/constants/frontend-module.d.ts +2 -0
  3. package/dist/constants/frontend-module.js +6 -1
  4. package/dist/constants/frontend-module.js.map +1 -1
  5. package/dist/index.js +4 -2
  6. package/dist/index.js.map +1 -1
  7. package/dist/lifecycle/skill-sources.d.ts +1 -1
  8. package/dist/lifecycle/skill-sources.js +29 -13
  9. package/dist/lifecycle/skill-sources.js.map +1 -1
  10. package/frontend-vue/app/chat/components/BlockPreviewCard.vue +172 -0
  11. package/frontend-vue/app/chat/components/BlockPreviewModal.vue +324 -0
  12. package/frontend-vue/app/chat/components/BlockPreviewThumb.vue +141 -0
  13. package/frontend-vue/app/chat/components/MessageList.vue +20 -0
  14. package/frontend-vue/app/chat/components/SketchFrame.vue +59 -0
  15. package/frontend-vue/app/chat/composables/conversation-events.ts +23 -1
  16. package/frontend-vue/app/chat/composables/useBlockPreviewComponent.ts +15 -0
  17. package/frontend-vue/app/chat/composables/useDashboardScheme.ts +42 -0
  18. package/frontend-vue/app/chat/constants/block-preview.ts +27 -0
  19. package/frontend-vue/app/chat/constants/conversation.ts +1 -0
  20. package/frontend-vue/app/chat/constants/protocol.ts +1 -0
  21. package/frontend-vue/app/chat/constants/sketch.ts +105 -0
  22. package/frontend-vue/app/chat/types/conversation.ts +11 -1
  23. package/frontend-vue/app/chat/types/protocol.ts +56 -0
  24. package/frontend-vue/app/chat/utils/block-preview.ts +145 -0
  25. package/frontend-vue/app/chat/utils/conversation-messages.ts +23 -1
  26. package/frontend-vue/app/chat/utils/render-items.ts +13 -2
  27. package/frontend-vue/app/chat/utils/sketch.ts +56 -0
  28. package/frontend-vue/app/chat/utils/tool-lexicon.ts +7 -0
  29. package/frontend-vue/app/components/ActivityDetail.vue +11 -13
  30. package/frontend-vue/app/components/ChangesView.vue +56 -49
  31. package/frontend-vue/app/plugins/ai.client.ts +16 -6
  32. package/frontend-vue/app/runtime/assistant-activity.ts +38 -21
  33. package/frontend-vue/app/runtime/sidecar-status.ts +78 -56
  34. package/frontend-vue/app/views/ChangeSetPanel.vue +13 -18
  35. package/frontend-vue/app/views/UnavailableState.vue +1 -1
  36. package/frontend-vue/app/views/composables/useAiData.ts +116 -0
  37. package/frontend-vue/app/views/composables/useAssistant.ts +8 -2
  38. package/frontend-vue/app/views/composables/useChangeSetActions.ts +7 -6
  39. package/frontend-vue/app/views/utils/change-sets.ts +0 -7
  40. package/frontend-vue/i18n/locales/dms-ai-panel-en-GB.json +23 -1
  41. package/frontend-vue/i18n/locales/dms-ai-panel-fr-FR.json +23 -1
  42. package/frontend-vue/package.json +1 -1
  43. package/frontend-vue/tests/assistant-activity.test.ts +69 -0
  44. package/frontend-vue/tests/chat/block-preview.test.ts +448 -0
  45. package/frontend-vue/tests/sidecar-guest.test.ts +1 -1
  46. package/frontend-vue/tests/sidecar-status.test.ts +93 -15
  47. package/frontend-vue/tests/support/dms-frontend-module.ts +9 -0
  48. package/frontend-vue/tests/views/api-data-reads.test.ts +445 -0
  49. package/frontend-vue/tests/views/use-assistant.test.ts +53 -0
  50. package/frontend-vue/vitest.config.ts +10 -0
  51. package/package.json +20 -6
  52. package/sidecar/dist/constants/mcp.js +2 -0
  53. package/sidecar/dist/constants/mcp.js.map +1 -1
  54. package/sidecar/dist/constants/preview.d.ts +39 -0
  55. package/sidecar/dist/constants/preview.js +55 -0
  56. package/sidecar/dist/constants/preview.js.map +1 -0
  57. package/sidecar/dist/constants/tool-kinds.js +2 -0
  58. package/sidecar/dist/constants/tool-kinds.js.map +1 -1
  59. package/sidecar/dist/mcp/tool-definitions.js +5 -0
  60. package/sidecar/dist/mcp/tool-definitions.js.map +1 -1
  61. package/sidecar/dist/mcp/tools/preview-blocks.d.ts +65 -0
  62. package/sidecar/dist/mcp/tools/preview-blocks.js +176 -0
  63. package/sidecar/dist/mcp/tools/preview-blocks.js.map +1 -0
  64. package/sidecar/dist/mcp/types.d.ts +3 -0
  65. package/sidecar/dist/prompts/agent.d.ts +1 -1
  66. package/sidecar/dist/prompts/agent.js +3 -2
  67. package/sidecar/dist/prompts/agent.js.map +1 -1
  68. package/sidecar/dist/protocol/events.d.ts +313 -0
  69. package/sidecar/dist/protocol/events.js +9 -0
  70. package/sidecar/dist/protocol/events.js.map +1 -1
  71. package/sidecar/dist/protocol/preview.d.ts +130 -0
  72. package/sidecar/dist/protocol/preview.js +91 -0
  73. package/sidecar/dist/protocol/preview.js.map +1 -0
  74. package/sidecar/dist/server/chat-events.d.ts +3 -0
  75. package/sidecar/dist/server/chat-events.js +21 -0
  76. package/sidecar/dist/server/chat-events.js.map +1 -1
  77. package/sidecar/dist/server/ws.js +3 -1
  78. package/sidecar/dist/server/ws.js.map +1 -1
  79. package/sidecar/dist/state/types.d.ts +3 -1
  80. package/sidecar/dist/state/types.js +1 -0
  81. package/sidecar/dist/state/types.js.map +1 -1
  82. package/sidecar/package.json +1 -1
  83. package/skills/dms-ai/SKILL.md +30 -0
  84. package/skills/dms-ai-code-mode/SKILL.md +51 -0
  85. package/skills/dms-builder-safe/SKILL.md +9 -2
  86. package/frontend-vue/app/views/composables/useAiRequest.ts +0 -89
  87. package/skills/dms-builder-page/SKILL.md +0 -80
package/README.md CHANGED
@@ -1,241 +1,100 @@
1
- # @antelopejs/dms-ai
2
-
3
1
  <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
2
 
9
- An AntelopeJS DMS development assistant. It adds an owner-only AI workspace to the dashboard and
10
- runs a coding agent 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. The chat is a panel docked next to
12
- the page, which shrinks to make room: it stays open across page navigations and reloads, follows the
13
- dashboard's theme, and is toggled from the header or with Ctrl+Shift+K (⌘⇧K on macOS). In the
14
- command palette (Ctrl+K, ⌘K on macOS), Tab switches to the assistant, which answers a question
15
- read-only and hands the conversation over to the panel. Claude Code drives it by default; OpenAI's
16
- Codex is selectable once its CLI is installed.
17
-
18
- ## Installation
3
+ # @antelopejs/dms-ai
19
4
 
20
- Add the module to a project that already uses `@antelopejs/dms`:
5
+ <a href="https://www.npmjs.com/package/@antelopejs/dms-ai"><img alt="npm" src="https://img.shields.io/npm/v/@antelopejs/dms-ai?style=for-the-badge&labelColor=000000&color=000000"></a>
6
+ <a href="./LICENSE"><img alt="License" src="https://img.shields.io/npm/l/@antelopejs/dms-ai?style=for-the-badge&labelColor=000000&color=000000"></a>
7
+ <a href="https://discord.gg/sjK28QHrA7"><img alt="Discord" src="https://img.shields.io/badge/Discord-18181B?logo=discord&style=for-the-badge&color=000000"></a>
8
+ <a href="https://dms.antelopejs.com/docs/modules/ai"><img alt="Documentation" src="https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000"></a>
21
9
 
22
- ```bash
23
- ajs project modules add @antelopejs/dms-ai
24
- ```
25
-
26
- The module starts its bundled sidecar with the project as its working directory. In development,
27
- set `DMS_AI=0` before starting the backend to disable the sidecar. If
28
- `@antelopejs/dms-builder` is installed, the assistant also exposes its builder integration.
29
-
30
- The sidecar is a child process of the backend. A hot reload of the module keeps it running, unless
31
- its build changed. Stopping the project stops it: Ctrl+C reaches it through the terminal's process
32
- group, and `@antelopejs/core` 1.13.2 or later terminates it on shutdown (Linux only). A sidecar left
33
- running by a backend that crashed or was killed is stopped when the next run starts; otherwise it
34
- exits on its own after 15 idle minutes.
35
-
36
- The assistant is a development tool, on purpose: the backend and the sidecar refuse to run with
37
- `NODE_ENV=production`, and the chat is reserved to owners. Remote *development* is supported (see
38
- below); a hosted use would be a separate product with its own design.
39
-
40
- ## Remote access
41
-
42
- The sidecar only listens on `127.0.0.1`, and the browser never talks to it: everything goes through
43
- the DMS frontend server, over the same HTTP relay as the rest of the dashboard. The assistant
44
- therefore works wherever the dashboard does — another machine on the LAN, Tailscale, an SSH tunnel to
45
- the frontend port, a reverse proxy or a gateway — and the sidecar's port and client credential stay on
46
- the server.
47
-
48
- | Route (owner only) | Purpose |
49
- | ----------------------------------------- | --------------------------------------------------------------------------- |
50
- | `GET /ai/channel/events` | The tab's one event stream: the sidecar frames for the dashboard and chat. |
51
- | `POST /ai/channel/:connectionId/messages` | One client message, relayed to that stream's sidecar socket. |
52
-
53
- Each stream is bridged to a single sidecar socket, which the dashboard identifies as the host (the
54
- current page, the agent's navigation requests) and as the chat. The backend opens each socket with
55
- an `actor` frame naming the signed-in user, which the sidecar records on change sets and undos; a
56
- browser cannot send that frame, the backend drops it. Browsers keep at most six HTTP/1.1
57
- connections per origin, and every dashboard tab already holds two long-lived ones for the DMS. The
58
- assistant adds its stream only in the visible tab whose panel is open, which leaves two dashboard tabs
59
- usable side by side; over HTTPS with HTTP/2 the limit goes away. Over plain HTTP on an address other
60
- than `localhost`, start the frontend server with `DMS_COOKIE_SECURE=false`, or the browser drops the
61
- `Secure` session cookie.
62
-
63
- ## Pages
64
-
65
- The module adds an **Assistant** module to the dashboard (`/modules/ai`), owner-only, with five
66
- pages. They are built from DMS blocks; a custom component is used only where no block draws the
67
- screen. Every page, block and child carries `$dms_ai.*` metadata, so the role editor lists them with
68
- translated names (English and French, in `frontend-vue/i18n/locales/dms-ai-pages-*.json`).
69
-
70
- | Page | What it shows |
71
- | -------- | --------------------------------------------------------------------------------------------------------------- |
72
- | Overview | Period selector, a banner when the assistant needs you (offline with Restart, a failed turn, requests waiting), its status rows, four KPIs, the activity chart, how actions were allowed, the latest change sets with Undo / Redo, and the top tools. |
73
- | Changes | Every turn that touched the project as a change set: its diff, Undo with a conflict preview, Redo. `?set=<id>` opens one. |
74
- | Activity | The audit log: tabs (changed files, asked you, denied or blocked, failed), quick filters, a detail drawer per call (`?record=<id>`), and a CSV export. |
75
- | Skills | The skills loaded into the agent as cards, a detail drawer per skill, and a warning when two skills share a name. |
76
- | Settings | The defaults of new conversations, saved as you change them: agent, thinking, approval mode, what always asks, request timeout, scope, local skills, checkpoint retention; then the tokens used over 14 days. |
77
-
78
- Every route below is owner-only. Lists and settings answer `503 { message }` while the sidecar is
79
- down, so tables show their error state and a setting says "Not saved"; charts answer empty.
80
-
81
- | Route | Purpose |
82
- | ------------------------------------------------------ | -------------------------------------------------------------- |
83
- | `GET /ai/status`, `POST /ai/sidecar/restart` | The assistant's live status (`offline` when it does not answer), and a restart. |
84
- | `GET /ai/status/facts`, `/ai/status/banner` | The Overview's status rows (a `KeyValueList`) and its banner (`BannerContent`, or 204 when all is well). |
85
- | `GET /ai/metrics/kpi/:metric`, `series`, `allowed`, `top-tools`, `usage`, `usage/summary` | The Overview's and Settings › Usage figures. |
86
- | `GET /ai/activity`, `/ai/activity/:id`, `/ai/activity/export.csv` | The audit log as a source table, one call's detail, the CSV export. |
87
- | `GET /ai/changes`, `/ai/changes/:id`, `/ai/changes/:id/undo-preview`, `/ai/changes/:id/undo-confirm` | Change sets, a set's diff, what Undo restores, and the dialog it asks in. |
88
- | `POST /ai/changes/:id/undo`, `/ai/changes/:id/redo` | Undo (`{ includeLater? }`) and Redo, recorded with the signed-in user's name. |
89
- | `GET /ai/skills/catalog`, `/ai/skills/conflicts` | The skills as table rows, and the banner about names several skills share (204 when none). |
90
- | `GET` / `PUT /ai/settings` | The settings form; `PUT` takes the one field an instant save sends. |
91
-
92
- ## Model output in the dashboard
93
-
94
- The chat renders model output inside the dashboard, next to the owner's session, and that output can
95
- carry a prompt injection read from a file or a page. So nothing the agent writes is trusted as markup:
96
-
97
- - Markdown is rendered with raw HTML off, then sanitized by a DOMPurify instance of the chat's own
98
- (hooks do not leak to the dashboard's), against an allowlist: text formatting, lists, quotes, code,
99
- tables and links, and no attribute but `href`, `title`, `target`, `rel` and `start` — no `style`,
100
- `class`, `id` or event handler.
101
- - Links only go to `http`, `https`, `mailto` or a page of the dashboard, never `javascript:` or
102
- `data:`, and open in a new tab with `rel="noopener noreferrer"`.
103
- - An image the model writes is shown as a link: loading it on its own could send what the agent read
104
- to its address.
105
- - The agent can only navigate the dashboard to one of its own pages.
106
-
107
- ## Sidecar
108
-
109
- The sidecar is an agent server only: `/health`, the settings, metrics and skills routes the backend
110
- proxies, the MCP endpoint of its agents, and one WebSocket endpoint, `/ws`, which only accepts the
111
- client credential as a `Bearer` header. It serves no page or asset. Run by hand (`node
112
- sidecar/dist/index.js --port 0 --root <dir>`), it keeps its standalone default for the backend
113
- origin, which is how its tests drive it.
114
-
115
- ## Configuration
116
-
117
- The key is optional. Left out, the sidecar keeps the default it uses when run standalone
118
- (`http://localhost:5010`), which is the behaviour every existing project already has.
119
-
120
- | Key | What it is |
121
- | ------------ | ------------------------------------------------------------------------------ |
122
- | `backendUrl` | Origin the sidecar calls the DMS backend on — its pages registry, logs and builder clients. |
123
-
124
- The api module publishes the origin it actually reserved, so `backendUrl` should reference it rather
125
- than repeat a port that may already be taken:
126
-
127
- ```typescript [antelope.config.ts]
128
- export default defineConfig({
129
- modules: {
130
- "dms-ai": {
131
- source: { type: "package", package: "@antelopejs/dms-ai" },
132
- config: {
133
- backendUrl: "${@api.API_LOCAL_BASE_URL}",
134
- },
135
- },
136
- },
137
- });
138
- ```
10
+ An AI development assistant inside the AntelopeJS DMS dashboard.
139
11
 
140
- ## Agent providers
12
+ </div>
141
13
 
142
- The assistant runs on either Claude Code or Codex, picked on the Assistant's Settings page. Both go through
143
- the same seam, so the chat, the tool calls, the permission prompts and the file-change animation
144
- behave the same either way. `GET /settings` reports which ones this install can actually drive:
14
+ ![A conversation in the chat panel: two applied checkpoints with their files, an auto-fix turn and the assistant's summary](./docs/images/chat-conversation.webp)
145
15
 
146
- ```json
147
- { "provider": "claude", "providers": { "claude": { "available": true }, "codex": { "available": false, "reason": "Install @openai/codex, at the exact version dms-ai pins, to enable this provider." } } }
148
- ```
16
+ ## What it does
149
17
 
150
- `claude` is the default *choice*, not a fallback. A provider that this install cannot drive — its
151
- package uninstalled, its API key gone from the environment — fails the turn with that reason in the
152
- chat, and the conversation is never quietly handed to the other backend: someone who picked OpenAI
153
- may have picked it precisely so their code does not reach Anthropic.
18
+ - Docks a chat panel next to any page (`Ctrl` `Shift` `K`), with the page as context.
19
+ - Runs a coding agent (Claude Code by default, or OpenAI's Codex) in a local sidecar that reads the project, its loaded modules and their skills.
20
+ - Edits pages through the [Builder](https://github.com/AntelopeJS/dms-builder) in Safe mode, or writes code, then typechecks and shows the result live.
21
+ - Saves every turn that touches the project as a change set you can review, undo and redo.
22
+ - Adds an owner-only **Assistant** module: Overview, Changes, Activity, Skills and Settings.
154
23
 
155
- Switching provider disposes the live sessions of the previous one — an open conversation loses its
156
- in-agent context, its transcript is kept.
24
+ The assistant is a development tool: the backend and the sidecar refuse to run with `NODE_ENV=production`.
157
25
 
158
- ### Safe mode and permission modes
26
+ ## Install
159
27
 
160
- Safe mode, the default whenever `@antelopejs/dms-builder` is loaded, lets the agent change the
161
- project only through the Builder tools. It holds whatever permission mode is selected:
28
+ Run the AntelopeJS CLI from the root of a project that already loads `@antelopejs/dms`:
162
29
 
163
- - On Claude, a `PreToolUse` hook refuses `Write`, `Edit`, `MultiEdit`, `NotebookEdit` and `Bash`.
164
- The CLI runs hooks before it applies the permission mode, whereas `acceptEdits` and
165
- `bypassPermissions` approve those tools without consulting the permission prompt, and every
166
- mode, *Normal* included, runs the shell commands the CLI deems read-only (`ls`, `wc`, `cat`,
167
- `grep`, `git log`…) without asking. Reading, listing and searching stay available through
168
- `Read`, `Glob` and `Grep`, allowed inside the workspace and asked outside it.
169
- - On Codex, the sandbox stays read-only, without network, and every escalation is declined.
170
- - Safe mode caps *Auto* at *Accept edits*: the sidecar stops approving prompts on its own, and the
171
- Claude CLI never runs in `bypassPermissions`, so the prompts that remain (reads outside the
172
- workspace, web access) still reach you.
30
+ ```bash
31
+ ajs project modules add @antelopejs/dms-ai
32
+ ajs project modules add @antelopejs/dms-builder # recommended: enables Safe mode
33
+ ```
173
34
 
174
- A switch between safe and vibe mode applies from the next tool call on Claude and from the next
175
- turn on Codex, without discarding the conversation.
35
+ ## Quick start
176
36
 
177
- ### Enabling Codex
37
+ Point the sidecar at the origin the `api` module reserved:
178
38
 
179
- 1. **Install the `codex` CLI.** It is an *optional* peer dependency, so it is never installed for
180
- you: the platform packages weigh ~324 MB unpacked, and only the installs that want Codex should
181
- pay for them. Use the exact version this module pins, in `peerDependencies["@openai/codex"]`:
39
+ ```ts
40
+ // antelope.config.ts
41
+ "dms-ai": {
42
+ source: { type: "package", package: "@antelopejs/dms-ai" },
43
+ config: {
44
+ backendUrl: "${@api.API_LOCAL_BASE_URL}",
45
+ },
46
+ },
47
+ ```
182
48
 
183
- ```bash
184
- pnpm add @openai/codex@0.154.0
185
- ```
49
+ Claude Code runs with its own credentials (its login, or `ANTHROPIC_API_KEY` in the backend's environment). Restart the backend, then the frontend, sign in as an owner and press `Ctrl` `Shift` `K` (`⌘` `⇧` `K` on macOS). Set `DMS_AI=0` to start the backend without the sidecar.
186
50
 
187
- The app-server protocol is versioned by binary and OpenAI publishes roughly ten versions a
188
- month. The sidecar ships protocol types generated from the pinned version and checks
189
- `codex --version` against it at spawn, refusing to start on a mismatch rather than speaking a
190
- protocol its types do not describe. The refusal names both versions, so an upgrade says what to
191
- pin back to. To run a newer binary anyway — at the risk of a protocol its types do not
192
- describe — set `DMS_AI_CODEX_ALLOW_VERSION_MISMATCH=1`; the drift is then logged once, at startup, instead of
193
- blocking the provider.
51
+ ## Compatibility
194
52
 
195
- 2. **Provide an API key.** Export `OPENAI_API_KEY` in the host process environment. The binary does
196
- not read that variable itself: the sidecar writes it into an `auth.json` (mode `0600`) inside a
197
- `CODEX_HOME` dedicated to the conversation. On Windows that mode is not enforced by the
198
- filesystem, so the file is only as private as the directory it sits in. ChatGPT login is not
199
- supported here — it shares a token refresh with the user's own `codex` install.
53
+ | Package | Version |
54
+ | --- | --- |
55
+ | `@antelopejs/dms` | `>=0.9.0 <1.0.0` |
56
+ | `@antelopejs/interface-dms` | `>=0.7.0 <1.0.0` |
57
+ | `@antelopejs/dms-frontend` (renderer) | `>=0.6.0 <0.7.0` |
58
+ | `@antelopejs/dms-builder` (optional, Safe mode) | `>=0.4.0` |
200
59
 
201
- 3. **Restart the sidecar**, then pick *Codex* on the Assistant's Settings page.
60
+ On DMS 0.8, use `@antelopejs/dms-ai` 0.2.
202
61
 
203
- Linux, macOS and Windows are all supported. One app-server process runs per conversation, and the
204
- sidecar records its pid so a previous run's orphans are killed at startup — through procfs on
205
- Linux, `ps` on macOS and `taskkill /T` on Windows, which is also what takes the sandboxed children
206
- of the app-server with it.
62
+ ## Documentation
207
63
 
208
- ## Vue frontend
64
+ - [Introduction](https://dms.antelopejs.com/docs/modules/ai/introduction)
65
+ - [Installation](https://dms.antelopejs.com/docs/modules/ai/installation)
66
+ - [Configuration](https://dms.antelopejs.com/docs/modules/ai/configuration): agent providers, Codex, Safe mode, remote access
67
+ - [Usage](https://dms.antelopejs.com/docs/modules/ai/usage/chat)
68
+ - [Extending](https://dms.antelopejs.com/docs/modules/ai/extending)
69
+ - [FAQ](https://dms.antelopejs.com/docs/modules/ai/faq)
209
70
 
210
- The module registers `frontend-vue` through `AddFrontendModule` with the Vue 3 renderer. The host DMS
211
- supplies authentication, shared state, Nuxt UI and the icons. The chat panel, `DmsAiChatPanel`, is a
212
- docked side panel of the dashboard (`registerSidePanel`): the DMS renders it once for the whole app,
213
- so it lives through Inertia navigations, and keeps its open state and width in a cookie. The command
214
- palette's assistant mode answers with `DmsAiPaletteAnswer` (`registerCommandPaletteAssistant`). The
215
- chat's code is under `frontend-vue/app/chat`. The renderer bundles the icons it finds in
216
- `.vue` files, so an icon name belongs in the component that shows it.
71
+ The guide's sources live in [`docs/`](./docs). The package ships the `dms-ai`, `dms-builder-safe` and `dms-ai-code-mode` Claude Code skills in [`skills/`](./skills), declared under `antelopeJs.skills` and loaded into the assistant's agent.
217
72
 
218
- ## Development
73
+ ## Contributing
219
74
 
220
- Install dependencies and run the backend, sidecar and dashboard checks from the repository root:
75
+ Read [CONTRIBUTING.md](./CONTRIBUTING.md) before opening a pull request.
221
76
 
222
77
  ```bash
223
78
  pnpm install
224
79
  pnpm --dir frontend-vue install
225
80
  pnpm build
226
81
  pnpm build:sidecar
82
+ pnpm dev # playground backend
83
+ pnpm frontend:dev # dashboard, in a second terminal
84
+ pnpm lint
227
85
  pnpm test
86
+ pnpm test:node # every backend suite, after a single build
228
87
  ```
229
88
 
230
- 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:
89
+ <details>
90
+ <summary>Repository notes</summary>
231
91
 
232
- ```bash
233
- pnpm --dir frontend-vue build
234
- pnpm --dir frontend-vue typecheck
235
- ```
92
+ - The module registers `frontend-vue` through `AddFrontendModule` with the Vue 3 renderer. The chat panel, `DmsAiChatPanel`, is a docked side panel (`registerSidePanel`): the DMS renders it once for the whole app, so it lives through Inertia navigations and keeps its open state and width in a cookie. The command palette's assistant mode answers with `DmsAiPaletteAnswer` (`registerCommandPaletteAssistant`). The chat's code is under `frontend-vue/app/chat`. The renderer bundles the icons it finds in `.vue` files, so an icon name belongs in the component that shows it.
93
+ - To build and typecheck the Vue source, set `DMS_FRONTEND_WORKSPACE` to the absolute path of a generated Inertia workspace that includes this module, then run `pnpm --dir frontend-vue build` and `pnpm --dir frontend-vue typecheck`.
94
+ - `pnpm test:node` runs every backend suite after one build (`DMS_PREBUILT=1` skips the build when `dist/` is fresh, as in CI): `test:frontend-registration` (backend registration, sidecar inputs, `$dms_ai` keys in both locales), `test:routes` (the `/ai/*` routes against a stand-in sidecar) and `test:sidecar-lifecycle` (hot reload, restart, stale sidecar, Ctrl+C). The opt-in Codex acceptance suite runs with `CODEX_ACCEPTANCE=1 pnpm --dir sidecar test:acceptance`.
95
+
96
+ </details>
236
97
 
237
- `pnpm test:node` runs every backend suite below in one go, after a single build (`DMS_PREBUILT=1` skips the build when `dist/` is already fresh, as in CI). The sidecar's opt-in Codex acceptance suite runs on its own with `CODEX_ACCEPTANCE=1 pnpm --dir sidecar test:acceptance`.
98
+ ## License
238
99
 
239
- `pnpm test:frontend-registration` checks backend registration and sidecar inputs with the sidecar launcher mocked, and that every page, block and child of the Assistant module is titled with `$dms_ai` keys present in both locales.
240
- `pnpm test:routes` drives the `/ai/*` routes against a stand-in sidecar: query translation, `503` while it is down, settings conversions, Undo stamping and the CSV export.
241
- `pnpm test:sidecar-lifecycle` starts a stand-in sidecar to check that a hot reload keeps it, a restart replaces it, a sidecar left by an earlier run is stopped, and Ctrl+C on the backend stops it.
100
+ [Apache-2.0](./LICENSE)
@@ -1,3 +1,5 @@
1
+ import type { FrontendBackendProxy } from "@antelopejs/interface-dms/page";
1
2
  export declare const FRONTEND_MODULE_NAME = "@antelopejs/dms-ai-frontend-vue";
2
3
  export declare const FRONTEND_MODULE_DIR = "../frontend-vue";
3
4
  export declare const FRONTEND_MODULE_PRIORITY = 100;
5
+ export declare const FRONTEND_BACKEND_PROXY: FrontendBackendProxy;
@@ -1,7 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FRONTEND_MODULE_PRIORITY = exports.FRONTEND_MODULE_DIR = exports.FRONTEND_MODULE_NAME = void 0;
3
+ exports.FRONTEND_BACKEND_PROXY = exports.FRONTEND_MODULE_PRIORITY = exports.FRONTEND_MODULE_DIR = exports.FRONTEND_MODULE_NAME = void 0;
4
+ const module_1 = require("./module");
4
5
  exports.FRONTEND_MODULE_NAME = "@antelopejs/dms-ai-frontend-vue";
5
6
  exports.FRONTEND_MODULE_DIR = "../frontend-vue";
6
7
  exports.FRONTEND_MODULE_PRIORITY = 100;
8
+ exports.FRONTEND_BACKEND_PROXY = {
9
+ path: `${module_1.ROUTE_PREFIX}/**`,
10
+ auth: "session",
11
+ };
7
12
  //# sourceMappingURL=frontend-module.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"frontend-module.js","sourceRoot":"","sources":["../../src/constants/frontend-module.ts"],"names":[],"mappings":";;;AACA,qCAAwC;AAE3B,QAAA,oBAAoB,GAAG,iCAAiC,CAAC;AACzD,QAAA,mBAAmB,GAAG,iBAAiB,CAAC;AACxC,QAAA,wBAAwB,GAAG,GAAG,CAAC;AAO/B,QAAA,sBAAsB,GAAyB;IAC1D,IAAI,EAAE,GAAG,qBAAY,KAAK;IAC1B,IAAI,EAAE,SAAS;CAChB,CAAC"}
package/dist/index.js CHANGED
@@ -30,14 +30,16 @@ async function start() {
30
30
  sourcePath: node_path_1.default.join(__dirname, frontend_module_1.FRONTEND_MODULE_DIR),
31
31
  renderer: { name: "vue", version: "3" },
32
32
  priority: frontend_module_1.FRONTEND_MODULE_PRIORITY,
33
+ backendProxies: [frontend_module_1.FRONTEND_BACKEND_PROXY],
33
34
  });
35
+ const hostProjectRoot = process.cwd();
34
36
  const [moduleRoots, skillDirs, builderEnabled] = await Promise.all([
35
37
  (0, module_roots_1.collectModuleRoots)(),
36
- (0, skill_sources_1.collectSkillSources)(),
38
+ (0, skill_sources_1.collectSkillSources)(hostProjectRoot),
37
39
  (0, presence_1.isBuilderAvailable)(),
38
40
  ]);
39
41
  void (0, spawn_sidecar_1.spawnSidecar)({
40
- hostProjectRoot: process.cwd(),
42
+ hostProjectRoot,
41
43
  ...(0, config_1.getConfig)(),
42
44
  moduleRoots,
43
45
  skillDirs,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
-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QACf,iBAAO,CAAC,KAAK,CAAC,GAAG,4BAAkB,gBAAgB,EAAE,GAAG,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACL,CAAC;AAOD,SAAgB,OAAO;IACrB,IAAA,0BAAe,GAAE,CAAC;AACpB,CAAC"}
@@ -2,4 +2,4 @@ export interface SkillSource {
2
2
  module: string;
3
3
  dir: string;
4
4
  }
5
- export declare function collectSkillSources(): Promise<SkillSource[]>;
5
+ export declare function collectSkillSources(projectRoot: string): Promise<SkillSource[]>;
@@ -13,6 +13,14 @@ const sidecar_1 = require("../constants/sidecar");
13
13
  const PACKAGE_JSON_FILE = "package.json";
14
14
  const NODE_MODULES_DIR = "node_modules";
15
15
  const FALLBACK_PLUGIN_NAME = "skills";
16
+ const MODULE_DEPENDENCY_FIELDS = [
17
+ "dependencies",
18
+ "optionalDependencies",
19
+ ];
20
+ const PROJECT_DEPENDENCY_FIELDS = [
21
+ ...MODULE_DEPENDENCY_FIELDS,
22
+ "devDependencies",
23
+ ];
16
24
  function sanitizePluginName(name) {
17
25
  const cleaned = name.toLowerCase().replace(/[^a-z0-9-]+/g, "-");
18
26
  const trimmed = cleaned.replace(/^-+|-+$/g, "");
@@ -49,14 +57,11 @@ function skillSourcesFromPackage(pkg, baseDir, pluginName) {
49
57
  dir: node_path_1.default.resolve(baseDir, rel),
50
58
  }));
51
59
  }
52
- function listDependencyNames(pkg) {
60
+ function listDependencyNames(pkg, fields) {
53
61
  if (pkg === null || typeof pkg !== "object")
54
62
  return [];
55
63
  const manifest = pkg;
56
- return [
57
- ...Object.keys(manifest.dependencies ?? {}),
58
- ...Object.keys(manifest.optionalDependencies ?? {}),
59
- ];
64
+ return fields.flatMap((field) => Object.keys(manifest[field] ?? {}));
60
65
  }
61
66
  async function toRealDir(dir) {
62
67
  try {
@@ -117,8 +122,8 @@ function scanDependencyOnce(dep, fromDir, scans) {
117
122
  scans.set(dep, scan);
118
123
  return scan;
119
124
  }
120
- async function readAllDependencySkillSources(localPath, pkg, scans) {
121
- const nested = await Promise.all(listDependencyNames(pkg).map((dep) => scanDependencyOnce(dep, localPath, scans)));
125
+ async function readAllDependencySkillSources(localPath, dependencies, scans) {
126
+ const nested = await Promise.all(dependencies.map((dep) => scanDependencyOnce(dep, localPath, scans)));
122
127
  return nested.flat();
123
128
  }
124
129
  async function readModuleSkillSources(id, localPath, scans) {
@@ -131,9 +136,15 @@ async function readModuleSkillSources(id, localPath, scans) {
131
136
  scans.set(moduleName, Promise.resolve([]));
132
137
  }
133
138
  const own = skillSourcesFromPackage(pkg, localPath, toPluginName(moduleName));
134
- const fromDependencies = await readAllDependencySkillSources(localPath, pkg, scans);
139
+ const fromDependencies = await readAllDependencySkillSources(localPath, listDependencyNames(pkg, MODULE_DEPENDENCY_FIELDS), scans);
135
140
  return [...own, ...fromDependencies];
136
141
  }
142
+ async function readProjectSkillSources(projectRoot, scans) {
143
+ const pkg = await readPackageJson(projectRoot);
144
+ if (pkg === null)
145
+ return [];
146
+ return readAllDependencySkillSources(projectRoot, listDependencyNames(pkg, PROJECT_DEPENDENCY_FIELDS), scans);
147
+ }
137
148
  function dedupeBy(sources, key, onDrop) {
138
149
  const seen = new Set();
139
150
  return sources.filter((source) => {
@@ -146,25 +157,30 @@ function dedupeBy(sources, key, onDrop) {
146
157
  return true;
147
158
  });
148
159
  }
149
- async function gather() {
160
+ async function readLoadedModulesSkillSources(scans) {
150
161
  const ids = await (0, modules_1.ListModules)();
151
162
  const infos = await Promise.all(ids.map((id) => (0, modules_1.GetModuleInfo)(id)
152
163
  .then((i) => ({ id, i }))
153
164
  .catch(() => null)));
154
- const scans = new Map();
155
165
  const nested = await Promise.all(infos.map((entry) => entry &&
156
166
  typeof entry.i?.localPath === "string" &&
157
167
  entry.i.localPath.length > 0
158
168
  ? readModuleSkillSources(entry.id, entry.i.localPath, scans)
159
169
  : Promise.resolve([])));
160
- const byDir = dedupeBy(nested.flat(), (source) => source.dir);
170
+ return nested.flat();
171
+ }
172
+ async function gather(projectRoot) {
173
+ const scans = new Map();
174
+ const fromModules = await readLoadedModulesSkillSources(scans);
175
+ const fromProject = await readProjectSkillSources(projectRoot, scans);
176
+ const byDir = dedupeBy([...fromModules, ...fromProject], (source) => source.dir);
161
177
  return dedupeBy(byDir, (source) => source.module, (dropped) => logging_1.Logging.Warn(`${sidecar_1.SIDECAR_LOG_PREFIX} skill dir ${dropped.dir} ignored: plugin name "${dropped.module}" already has a skill dir`));
162
178
  }
163
- async function collectSkillSources() {
179
+ async function collectSkillSources(projectRoot) {
164
180
  try {
165
181
  return await new Promise((resolve) => {
166
182
  const timer = setTimeout(() => resolve([]), sidecar_1.MODULE_ROOTS_TIMEOUT_MS);
167
- gather().then((v) => {
183
+ gather(projectRoot).then((v) => {
168
184
  clearTimeout(timer);
169
185
  resolve(v);
170
186
  }, () => {
@@ -1 +1 @@
1
- {"version":3,"file":"skill-sources.js","sourceRoot":"","sources":["../../src/lifecycle/skill-sources.ts"],"names":[],"mappings":";;;;;AAgTA,kDAsBC;AAtUD,+CAA8D;AAC9D,6CAA4C;AAC5C,0DAA6B;AAC7B,gEAA6D;AAC7D,gEAAgF;AAChF,kDAG8B;AAsB9B,MAAM,iBAAiB,GAAG,cAAc,CAAC;AACzC,MAAM,gBAAgB,GAAG,cAAc,CAAC;AACxC,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AAEtC,SAAS,kBAAkB,CAAC,IAAY;IACtC,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IAChE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAChD,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC;AAC7D,CAAC;AAOD,SAAS,YAAY,CAAC,IAAY;IAChC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC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