shapewall 0.3.2 → 0.6.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.
- package/CHANGELOG.md +357 -0
- package/NOTICE +7 -0
- package/README.md +50 -4
- package/THIRD_PARTY.md +39 -0
- package/dist/agent/package-lock.json +2 -2
- package/dist/client/assets/BoardChat-DdwBcb2N.js +27 -0
- package/dist/client/assets/BuzzDialog-DpUcnU6S.js +1 -0
- package/dist/client/assets/ChecksPanel-CngYV4yz.js +1 -0
- package/dist/client/assets/History-CD0saQA5.js +1 -0
- package/dist/client/assets/LocalSettings-MZy2baig.js +1 -0
- package/dist/client/assets/{Management-DmTh1-tA.js → Management-CSvZ-SHO.js} +1 -1
- package/dist/client/assets/QuickConnect-foLh2QUm.js +1 -0
- package/dist/client/assets/ShareDialog-DPWDftoL.js +2 -0
- package/dist/client/assets/app-update-dialog-CtiXpTRD.js +1 -0
- package/dist/client/assets/{circle-x-3UxAvczM.js → circle-x-CteRBtXC.js} +1 -1
- package/dist/client/assets/index-Cxz1UVcV.css +2 -0
- package/dist/client/assets/index-uUZVBYUS.js +37 -0
- package/dist/client/assets/play-BjRNIGSf.js +1 -0
- package/dist/client/assets/{refresh-cw-BRHNyCnY.js → refresh-cw-r_tZiFfB.js} +1 -1
- package/dist/client/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/client/assets/{runtime-Bft6x_6E.js → runtime-Bvq10IhH.js} +1 -1
- package/dist/client/assets/ui-zQpn-PdL.js +41 -0
- package/dist/client/build-info.json +1 -1
- package/dist/client/index.html +4 -3
- package/dist/client/sw.js +2 -2
- package/dist/console/assets/{LocalAccountsApp-IvHd9zWN.js → LocalAccountsApp-DIdy1KnN.js} +1 -1
- package/dist/console/assets/{LocalConsole-DOyLou56.js → LocalConsole-DfcQztF-.js} +1 -1
- package/dist/console/assets/{app-update-dialog-Da46CJpv.js → app-update-dialog-ttl9lF5A.js} +1 -1
- package/dist/console/assets/console-OqAjD0kV.js +55 -0
- package/dist/console/assets/console-kvjrAArQ.css +2 -0
- package/dist/console/build-info.json +1 -1
- package/dist/console/console.html +2 -2
- package/docs/agent-hardening.md +192 -0
- package/docs/agent-recipes.md +23 -0
- package/docs/agent-workflow.md +5 -0
- package/docs/agents.md +74 -6
- package/docs/config.md +1 -1
- package/docs/deployment.md +2 -0
- package/docs/design-system.md +20 -15
- package/docs/hosted.md +815 -3
- package/docs/where-to-run.md +123 -0
- package/package.json +2 -1
- package/src/agent/agent-logos.js +81 -0
- package/src/agent/backends/acp.js +528 -25
- package/src/agent/branch-mode.js +17 -3
- package/src/agent/card-hash.js +65 -0
- package/src/agent/config.js +27 -2
- package/src/agent/context.js +41 -0
- package/src/agent/exec-paths.js +105 -0
- package/src/agent/icon-store.js +100 -0
- package/src/agent/identity.js +77 -0
- package/src/agent/owner-mcp.js +19 -3
- package/src/agent/routes.js +82 -22
- package/src/agent/run.js +14 -2
- package/src/agent/settings-routes.js +233 -14
- package/src/agent/starter/cli.js +6 -1
- package/src/agent/test-timing.js +14 -0
- package/src/agent/tools.js +4 -2
- package/src/agent/turn-changes.js +70 -8
- package/src/agent/user-settings.js +51 -3
- package/src/capture/element-map.js +61 -4
- package/src/cli/args.js +13 -0
- package/src/cli/commands.js +20 -5
- package/src/cli/help.js +36 -1
- package/src/hosted/admin.js +7 -0
- package/src/hosted/agent-approvals.js +28 -3
- package/src/hosted/agent-link.js +1032 -0
- package/src/hosted/agent-policy.js +10 -3
- package/src/hosted/agent-presence.js +81 -0
- package/src/hosted/agent-routes.js +135 -0
- package/src/hosted/agents.js +1199 -0
- package/src/hosted/app.js +94 -4
- package/src/hosted/board-routes.js +134 -3
- package/src/hosted/chat-frames.js +256 -0
- package/src/hosted/chat-job.js +204 -0
- package/src/hosted/chat-permissions.js +191 -0
- package/src/hosted/chat-routes.js +1009 -0
- package/src/hosted/chat-store.js +460 -0
- package/src/hosted/comment-files.js +8 -1
- package/src/hosted/comments.js +1 -1
- package/src/hosted/console-routes.js +58 -1
- package/src/hosted/db.js +165 -0
- package/src/hosted/device-routes.js +64 -8
- package/src/hosted/device.js +35 -4
- package/src/hosted/events.js +8 -6
- package/src/hosted/membership.js +9 -1
- package/src/hosted/pages.js +2 -0
- package/src/hosted/permissions.js +38 -0
- package/src/hosted/presence.js +18 -1
- package/src/hosted/projects.js +60 -2
- package/src/hosted/ratelimit.js +8 -0
- package/src/hosted/tenancy.js +18 -0
- package/src/hosted/token-api.js +118 -15
- package/src/hosted/token-events.js +7 -2
- package/src/hosted/tokens.js +24 -7
- package/src/hosted/turn-hub.js +152 -0
- package/src/mcp.js +10 -2
- package/src/remote/agent-connect.js +433 -0
- package/src/remote/agent-fix.js +611 -0
- package/src/remote/agent-job.js +216 -0
- package/src/remote/agent-link.js +904 -0
- package/src/remote/agent-policy-file.js +242 -0
- package/src/remote/credentials.js +35 -1
- package/src/remote/login.js +12 -2
- package/src/store.js +5 -0
- package/dist/client/assets/BoardChat-BeRp6007.js +0 -27
- package/dist/client/assets/BuzzDialog-CrYy48hh.js +0 -1
- package/dist/client/assets/ChecksPanel-CB820mhj.js +0 -1
- package/dist/client/assets/History-Ba909bGJ.js +0 -1
- package/dist/client/assets/LocalSettings-ChMi9Zir.js +0 -1
- package/dist/client/assets/QuickConnect-CrVweWZB.js +0 -1
- package/dist/client/assets/ShareDialog-DO2HhY6g.js +0 -2
- package/dist/client/assets/app-update-dialog-C09ODdUQ.js +0 -1
- package/dist/client/assets/index-BIjfZKnp.js +0 -37
- package/dist/client/assets/index-CXtuJi1K.css +0 -2
- package/dist/client/assets/shield-check-DMpniYP6.js +0 -1
- package/dist/client/assets/ui-mhL9gsne.js +0 -41
- package/dist/console/assets/console-CIBv7cXU.js +0 -55
- package/dist/console/assets/console-Fp4k9iyx.css +0 -2
package/docs/agents.md
CHANGED
|
@@ -112,7 +112,7 @@ agent...**) and the host-only settings window (`shapewall settings`) show the sa
|
|
|
112
112
|
the agent picker's **Agent settings** item link to the Agents page.
|
|
113
113
|
|
|
114
114
|
- **Every agent Shapewall knows how to run** (Claude Code, Codex, goose, Gemini CLI) with its state on this machine: **Connected**
|
|
115
|
-
(with its state, **Test connection** and **Remove**, and how to sign in when it is not signed in); **Found, not connected**
|
|
115
|
+
(with its state, **Test connection**, **Edit** for its [name and icon](#name-and-icon), **Remove**, and how to sign in when it is not signed in); **Found, not connected**
|
|
116
116
|
(**Connect**, with the same **Allow this?** dialog as anywhere else); **Found, but its adapter is missing** (the exact install line to
|
|
117
117
|
copy and **Check again**; Shapewall never runs an install for you); **Not installed** (where to get it). The list comes from the same
|
|
118
118
|
`PATH` lookup as one-click Connect: nothing is started, installed or downloaded.
|
|
@@ -125,8 +125,75 @@ the agent picker's **Agent settings** item link to the Agents page.
|
|
|
125
125
|
|
|
126
126
|
Connecting, removing, testing and choosing the default run commands as the machine's owner, so they need the settings token (the owner
|
|
127
127
|
link `shapewall serve` prints). Without it the card is read-only and says how to open that link; it asks nothing of the agent routes.
|
|
128
|
-
Self-hosted multiplayer (`shapewall hosted`) has its own
|
|
129
|
-
|
|
128
|
+
Self-hosted multiplayer (`shapewall hosted`) has its own Agents pages, for the machines that watch a hosted project or connect a
|
|
129
|
+
coding agent to it ([Agents on a hosted board](hosted.md#agents-on-a-hosted-board)): they list and name agents, and never start a
|
|
130
|
+
program on the server. The chat panel described here is also on hosted boards, for an agent connected with `shapewall agent
|
|
131
|
+
connect`: the same panel, with an agent that reads the project and answers. On a hosted comment, **Fix with** an agent is offered
|
|
132
|
+
only when that agent's own machine switched edits on (`--approvals`): the fix is made on a new branch on that machine, never in
|
|
133
|
+
its checkout, and each edit is a card with the full diff that someone allows or denies on the board. Only Claude Code can be
|
|
134
|
+
connected that way in this release, and it runs no commands from a hosted board ([Connected agents](hosted.md#connected-agents)).
|
|
135
|
+
The public demo shows this card read-only on its console's Agents page.
|
|
136
|
+
|
|
137
|
+
## Name and icon
|
|
138
|
+
|
|
139
|
+
Every connected agent has a name you choose and an icon, so a board with two agents reads "Harry" and "Fixer", not "Claude Code"
|
|
140
|
+
twice. Both are display only: they change nothing an agent runs with.
|
|
141
|
+
|
|
142
|
+
- **At Connect.** The **Allow this?** confirmation of a one-click Connect (in the Agent panel and on the Agents page) has a **Name**
|
|
143
|
+
field, filled in with the agent's built-in name ("Claude Code", "Codex", ...). Type another, or leave it. Under **Icon (optional)**,
|
|
144
|
+
folded away, you can pick an icon and a colour at the same time.
|
|
145
|
+
- **Later.** On the Agents page (and the same card in `shapewall settings`) each connected agent has **Edit**: a dialog with the name,
|
|
146
|
+
the icon and the colour. Saving does not restart the agent, runs no connection test and needs no confirmation; it also works while
|
|
147
|
+
the agent is answering, and the new name shows on what it says next. Right after Connect, while the agent's connection test is
|
|
148
|
+
still running (a real agent takes several seconds to start), Save waits for the test and then saves ("Saving when the connection
|
|
149
|
+
test finishes..."); when the agent does not connect it says so, and nothing is kept for it. A name given to another agent
|
|
150
|
+
meanwhile is saved at once and survives a failed test. The **Other** endpoint has **Name and icon** too. The name
|
|
151
|
+
field of the full settings form ("Name in the chat panel") is the same name and stays in step with it.
|
|
152
|
+
- **The name** is one line of plain text, 1 to 40 characters, without control or text-direction characters. An emptied name goes
|
|
153
|
+
back to the built-in one. It is shown as text everywhere (never read as Markdown or HTML) and reaches an agent only inside quoted
|
|
154
|
+
data. A name set in `shapewall.config.json` (`agent.label`) or typed in the settings form keeps working as before.
|
|
155
|
+
- **The icon** is one of twelve built-in avatars (small original drawings: robots, creatures and shapes), a picture you upload, or the
|
|
156
|
+
default. The default is the agent's **product mark** where Shapewall ships one (Claude Code, Codex with the OpenAI mark, goose and Gemini CLI today) and its initials
|
|
157
|
+
otherwise (an agent command of your own, an endpoint). Picking **Default** in the dialog goes back to it. The marks
|
|
158
|
+
are other companies' trademarks, shown unchanged in one colour only to identify the agent you connected; their sources and terms
|
|
159
|
+
are in `THIRD_PARTY.md`. A colour (one of eight) tints a built-in avatar or the initials, never a mark or a picture.
|
|
160
|
+
- **An uploaded picture** is a PNG, JPEG or WebP of up to 2 MB. The board crops it to a square and sends a 256 by 256 PNG; the server
|
|
161
|
+
checks it byte by byte, decodes it and writes the pixels out again, the same way as a profile photo
|
|
162
|
+
([local-accounts.md](local-accounts.md#profile-images)), so no metadata and never an SVG is stored. It is kept next to the agent
|
|
163
|
+
settings (`agent-icons/<hash>.png` beside `agents.json`, private to you), served only as an image (`GET /api/agent/icons/<hash>`,
|
|
164
|
+
`image/png`, `nosniff`, cached by its content hash), and removed when no agent uses it any more.
|
|
165
|
+
|
|
166
|
+
Where it shows: the Agents page and its default-agent list, the chat header's agent chip and its menu, the agent's answers in the
|
|
167
|
+
chat, **Fix with <name>** on a comment, the batch of fixes, and the `Chat:` line `shapewall serve` prints. A reply the agent posts on
|
|
168
|
+
a comment thread is signed with the name it has at that moment and marked as an agent's, with its icon beside it; replies written
|
|
169
|
+
earlier keep the name they were written with, and a reply signed plain "agent" (an outside tool, `shapewall watch`) keeps the robot.
|
|
170
|
+
|
|
171
|
+
Who may change it: the owner, on the machine that runs Shapewall, with the settings token and from the board's own page, like every
|
|
172
|
+
other agent setting (`POST /api/agent/settings/identity` with `{ id, name?, icon?, tint? }`, and `POST
|
|
173
|
+
/api/agent/settings/identity/icon` with `{ id, png }` for a picture). `id` is a connected agent, `endpoint`, or `default`. A command
|
|
174
|
+
fixed with `--agent-acp` or `SHAPEWALL_AGENT_ACP` still wins over which agent runs, but does not block its name or icon: they are
|
|
175
|
+
saved for that fixed agent (`fixedAgent` in `agents.json`) and the Agents page shows it with **Edit**. Everyone who can see the board
|
|
176
|
+
gets the name, the icon's id and the colour in the agent info they already receive (`/api/agent/status`, `/api/info`); nothing else
|
|
177
|
+
about the agent is added to it. In the public demo you can rename the two scripted agents and give them built-in icons (no upload);
|
|
178
|
+
**Reset** puts them back. On a hosted board an agent is a project API token that may take work: an admin gives it a name, one of the
|
|
179
|
+
same built-in icons and a colour on the project's Agents page in the console
|
|
180
|
+
([Agents on a hosted board](hosted.md#agents-on-a-hosted-board)). Pictures are not uploaded there.
|
|
181
|
+
|
|
182
|
+
### While a connection test runs
|
|
183
|
+
|
|
184
|
+
A one-click Connect saves the agent, then starts it and waits for its handshake: the connection test (**Test connection** runs the
|
|
185
|
+
same one). The test stub answers at once; Claude Code, Codex and the others take several seconds, and the server waits up to 30
|
|
186
|
+
(`src/agent/test-timing.js`). During the test the server takes no chat message and no other change of the agent settings, so the
|
|
187
|
+
board says what is going on instead of answering an error:
|
|
188
|
+
|
|
189
|
+
- The agent's row on the Agents page reads **Connecting. Testing the connection...**, the chat header chip **Testing the
|
|
190
|
+
connection**, and `GET /api/agent/settings` carries `testing: { id }` (the agent's `state` is `testing` there and in
|
|
191
|
+
`/api/agent/status`). A page reloaded mid-test, or another tab, shows the same and follows when the test ends.
|
|
192
|
+
- **Test connection**, **Remove**, **Connect** for another agent and the default-agent choice are off until it ends, each with the
|
|
193
|
+
reason as its tooltip. **Edit** stays on (see [Name and icon](#name-and-icon)).
|
|
194
|
+
- A chat message or a **Fix** sent meanwhile waits, with "Waiting for the connection test to finish" as the answer's status, and
|
|
195
|
+
runs when the test ends. The board waits 45 seconds, a little longer than a test can last. Other settings changes sent in that
|
|
196
|
+
window (the settings form, Work on a branch) wait the same way behind their own busy state.
|
|
130
197
|
|
|
131
198
|
## Source folder and agent sign-in
|
|
132
199
|
|
|
@@ -901,8 +968,9 @@ Older thread files need no migration: a file with only `messages` (and `profileI
|
|
|
901
968
|
its title. The fields added since (`owner`, `title`, `titleSource`, `createdAt`, `archived`, `branches`) are written only when something
|
|
902
969
|
sets them. A board keeps at most 500 New chat threads; delete old ones to start more.
|
|
903
970
|
|
|
904
|
-
There are no share links for chats
|
|
905
|
-
agent
|
|
971
|
+
There are no share links for chats. On a hosted board, chat is for signed-in members with a
|
|
972
|
+
[connected agent](hosted.md#connected-agents); a share link's guests and a public project's visitors never get it. Export a chat as
|
|
973
|
+
Markdown to share it.
|
|
906
974
|
|
|
907
975
|
## Board tools
|
|
908
976
|
|
|
@@ -967,7 +1035,7 @@ The panel uses `/api/agent/*` on the local server: JSON in, server-sent events o
|
|
|
967
1035
|
|
|
968
1036
|
| Route | What it does |
|
|
969
1037
|
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
970
|
-
| `GET /api/agent/status` | `{ configured, backend, label, model, host, local, vision, problem, docsUrl }`
|
|
1038
|
+
| `GET /api/agent/status` | `{ configured, backend, label, icon, tint, logo, model, host, local, vision, problem, docsUrl }` |
|
|
971
1039
|
| `GET /api/agent/boards/:id/threads` | Your threads with messages, newest first (`?q=` searches them): `{ threads: [{ id, kind, commentId?, title, count, createdAt, updatedAt, archived, shared, match? }] }` |
|
|
972
1040
|
| `GET /api/agent/boards/:id/threads/:thread` | `{ id, messages, kind, title, archived, shared, versions, running, ratings, options? }`; `:thread` is `board`, `comment-<id>` or `chat-<16 letters or digits>` |
|
|
973
1041
|
| `POST /api/agent/boards/:id/threads/:thread/messages` | `{ text, attachments?, mentions?, files?, editOf?, options? }` or `{ regenerate: <answer id> }`; answers with an event stream (below). `editOf`: the id of your earlier message this one replaces; `regenerate`: the latest answer, asked again; `options`: this chat's choices `{ configId: value }` |
|
package/docs/config.md
CHANGED
|
@@ -438,7 +438,7 @@ from `shapewall ci capture --allow-start` inside a CI job (`GITHUB_ACTIONS` or `
|
|
|
438
438
|
```
|
|
439
439
|
|
|
440
440
|
The board chat's endpoint: any OpenAI-compatible chat completions API. `baseUrl` and `model` are required to connect; `apiKeyEnv` (the
|
|
441
|
-
variable holding the key, default `SHAPEWALL_AGENT_API_KEY`), `label
|
|
441
|
+
variable holding the key, default `SHAPEWALL_AGENT_API_KEY`), `label` (the name shown for it; a connected agent's name and icon are set on the Agents page, see [agents.md](agents.md#name-and-icon)), `vision` (default `true`), `tools` (default `true`), `maxTokens`,
|
|
442
442
|
`temperature` and `backend` (`"openai-compatible"`) are optional. Top level only. An `apiKey`, `key` or `token` key here is an error, and `apiKeyEnv` may only name `SHAPEWALL_AGENT_*` or a `*_API_KEY`
|
|
443
443
|
variable. A key goes only to this machine, a known hosted API, or a host confirmed in `SHAPEWALL_AGENT_KEY_HOSTS`.
|
|
444
444
|
Environment overrides: `SHAPEWALL_AGENT_BASE_URL`, `SHAPEWALL_AGENT_MODEL`. See [agents.md](agents.md).
|
package/docs/deployment.md
CHANGED
package/docs/design-system.md
CHANGED
|
@@ -121,7 +121,7 @@ sidebar's width, on the Chrome layer (above the canvas and the comment thread, b
|
|
|
121
121
|
keep their tooltip. Only the panel button and Ctrl/Cmd+B expand the sidebar. The hover timing and height rules are in
|
|
122
122
|
`components/rail-flyout.js`. A rail icon can carry a dot (`dot`): the Journeys icon has one while a journey is open. On the board the
|
|
123
123
|
expanded sidebar puts a segmented `Tabs` switch, "Pages 26 | Journeys 6" with the counts as quiet text, where a single heading would
|
|
124
|
-
be, and shows the
|
|
124
|
+
be, and shows the board's search field over the page tree or the journeys list (filter "Filter journeys", only past eight); the tab is
|
|
125
125
|
kept per browser (`board/SidebarNav.jsx`).
|
|
126
126
|
|
|
127
127
|
App-level pieces outside the kit, in `client/src/components/`: `ProfileMenu` (the avatar menu: account items, the console's workspace
|
|
@@ -132,20 +132,25 @@ scrolling keeps momentum and `scrollIntoView` on phones).
|
|
|
132
132
|
|
|
133
133
|
## The board toolbar
|
|
134
134
|
|
|
135
|
-
On desktop the toolbar has
|
|
136
|
-
switcher
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
135
|
+
On desktop the toolbar has two zones with the room between them, the way canvas tools lay it out. Left, identity: the board
|
|
136
|
+
switcher with the capture status dot (its tooltip says when the pages were captured); then, after a hairline, the view controls: the
|
|
137
|
+
screen-size switch, Views (the journeys and what the canvas shows) and, on a local board, Capture with its status. Right, act and
|
|
138
|
+
open panels: the viewer note, Comment (the primary action and the one accent control: `soft` while comment mode is off, filled
|
|
139
|
+
`default` with `aria-pressed="true"` while it is on, agreeing with the comment-mode banner); then, after a hairline, the Comments,
|
|
140
|
+
Agent and Checks toggles on one track (`Toggle variant="segment"`: the open panel's toggle is the raised chip, exactly like the
|
|
141
|
+
chosen screen size, none while the panel is closed), then Agent settings. One look for every control but the name and Comment: a
|
|
142
|
+
quiet 32 px box with the same radius, hairline and tint, either a single button or a track whose chosen option is the raised chip.
|
|
143
|
+
Comments carries its count as a pill at its right end, and Agent carries the board's agent activity in the same place and size: a
|
|
144
|
+
dot for one agent, a count for more, accent while working (a slow `breathe`, the same as a working pin, never outside the button),
|
|
145
|
+
the attention colour when an agent needs a person, green for a moment when the last one finishes.
|
|
146
|
+
|
|
147
|
+
Search is not in the toolbar. It is the field at the top of the expanded sidebar ("Search the board" with its
|
|
148
|
+
Ctrl/Cmd+K hint) and an icon in the collapsed rail; both open the command palette, as the shortcut does from anywhere. So the bar
|
|
149
|
+
keeps its shape whatever is open: an open journey shows as the state of the Views button in place (its name, truncated past 240 px,
|
|
150
|
+
and a clear button), and nothing else moves or collapses for it. When it gets narrow, `client/src/board/toolbarFit.js` drops words
|
|
151
|
+
in a fixed order (the panel toggles, Views (an open journey's name shortens first), then the screen-size toggle to icons with
|
|
152
|
+
tooltips, where the hairlines go too) and the board name truncates a little at each step, never below about 8 characters.
|
|
153
|
+
Accessible names, shortcuts and tooltips never change.
|
|
149
154
|
`test/toolbar-fit.test.js` checks the order and that nothing overlaps from a 1024 px window with the widest sidebar up. The phone
|
|
150
155
|
toolbar is a separate compact bar. `ToggleGroup` options take a `tooltip` for icon-only labels.
|
|
151
156
|
|