shapewall 0.3.3 → 0.7.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 (157) hide show
  1. package/CHANGELOG.md +501 -0
  2. package/README.md +87 -4
  3. package/THIRD_PARTY.md +15 -0
  4. package/dist/agent/package-lock.json +594 -2
  5. package/dist/client/assets/BoardChat-WS8mAIW6.js +27 -0
  6. package/dist/client/assets/{BuzzDialog-Ix9qJvim.js → BuzzDialog-B-Mlr6wF.js} +1 -1
  7. package/dist/client/assets/ChecksPanel-Dx1ZLBR6.js +1 -0
  8. package/dist/client/assets/History-sXhmpcvs.js +1 -0
  9. package/dist/client/assets/LocalSettings-CtGzz9F3.js +1 -0
  10. package/dist/client/assets/{Management-NVFDtSZB.js → Management-CGHe8Wt9.js} +1 -1
  11. package/dist/client/assets/QuickConnect-DEk84E4A.js +1 -0
  12. package/dist/client/assets/{ShareDialog-By0ETg6n.js → ShareDialog-CGGx-AYK.js} +2 -2
  13. package/dist/client/assets/{app-update-dialog-RGIw24iZ.js → app-update-dialog-_bVp8hnC.js} +1 -1
  14. package/dist/client/assets/{circle-x-B6KfScOE.js → circle-x-BWoHA1QY.js} +1 -1
  15. package/dist/client/assets/index-Bm-Xd3YN.js +37 -0
  16. package/dist/client/assets/index-C7Ostk3K.css +2 -0
  17. package/dist/client/assets/play-BzQ3tRTv.js +1 -0
  18. package/dist/client/assets/{refresh-cw-vkgvCCfR.js → refresh-cw-BYBMyDKT.js} +1 -1
  19. package/dist/client/assets/{runtime-Bft6x_6E.js → runtime-Bvq10IhH.js} +1 -1
  20. package/dist/client/assets/ui-CAY6myRA.js +41 -0
  21. package/dist/client/build-info.json +1 -1
  22. package/dist/client/index.html +3 -3
  23. package/dist/client/sw.js +2 -2
  24. package/dist/console/assets/LocalAccountsApp-CWRguRRL.js +1 -0
  25. package/dist/console/assets/LocalConsole--I2SaIpr.js +2 -0
  26. package/dist/console/assets/LocalUsage-BmpCZ36k.js +1 -0
  27. package/dist/console/assets/app-update-dialog-B8M9plaT.js +1 -0
  28. package/dist/console/assets/app-version-muKrQqbL.js +1 -0
  29. package/dist/console/assets/console-CrhTsPbz.css +2 -0
  30. package/dist/console/assets/console-DxapQ9oS.js +11 -0
  31. package/dist/console/assets/local-agents-CoqD4dSN.js +6 -0
  32. package/dist/console/assets/minus-DDQ0ydcM.js +1 -0
  33. package/dist/console/assets/tailnet-C5Flwl_d.js +2 -0
  34. package/dist/console/assets/theme-DCd0qh4l.js +1 -0
  35. package/dist/console/assets/ui-Bry1mnCY.js +41 -0
  36. package/dist/console/assets/usage-CIPWnHaS.css +1 -0
  37. package/dist/console/assets/usage-CqVjMb7m.js +5 -0
  38. package/dist/console/assets/usage-D1G0GgE3.js +56 -0
  39. package/dist/console/build-info.json +1 -1
  40. package/dist/console/console.html +8 -2
  41. package/docs/agent-hardening.md +206 -0
  42. package/docs/agent-recipes.md +23 -0
  43. package/docs/agent-workflow.md +5 -0
  44. package/docs/agents.md +49 -6
  45. package/docs/architecture.md +10 -4
  46. package/docs/deployment.md +39 -17
  47. package/docs/design-system.md +56 -7
  48. package/docs/hosted.md +1800 -46
  49. package/docs/images/board-overview.png +0 -0
  50. package/docs/images/journeys.png +0 -0
  51. package/docs/images/live-comment.png +0 -0
  52. package/docs/images/phone-comment.png +0 -0
  53. package/docs/images/phone-overview.png +0 -0
  54. package/docs/images/variant.png +0 -0
  55. package/docs/where-to-run.md +119 -3
  56. package/package.json +6 -1
  57. package/src/agent/backends/acp.js +745 -44
  58. package/src/agent/branch-mode.js +17 -3
  59. package/src/agent/card-hash.js +65 -0
  60. package/src/agent/context.js +41 -0
  61. package/src/agent/exec-paths.js +105 -0
  62. package/src/agent/routes.js +23 -2
  63. package/src/agent/run.js +11 -1
  64. package/src/agent/starter/cli.js +6 -1
  65. package/src/agent/turn-changes.js +70 -8
  66. package/src/agent/usage-log.js +251 -0
  67. package/src/cli/args.js +37 -0
  68. package/src/cli/commands.js +20 -5
  69. package/src/cli/help.js +73 -3
  70. package/src/cli/init.js +2 -1
  71. package/src/cli/serve.js +20 -5
  72. package/src/cli.js +8 -0
  73. package/src/hosted/access-cli.js +99 -1
  74. package/src/hosted/activity-core.js +232 -0
  75. package/src/hosted/activity.js +375 -0
  76. package/src/hosted/admin.js +87 -13
  77. package/src/hosted/agent-approvals.js +29 -4
  78. package/src/hosted/agent-link.js +1032 -0
  79. package/src/hosted/agent-policy.js +10 -3
  80. package/src/hosted/agent-presence.js +63 -22
  81. package/src/hosted/agent-routes.js +135 -0
  82. package/src/hosted/agents.js +1206 -0
  83. package/src/hosted/app.js +178 -12
  84. package/src/hosted/auth-routes.js +156 -15
  85. package/src/hosted/auth.js +123 -20
  86. package/src/hosted/board-routes.js +129 -5
  87. package/src/hosted/chat-frames.js +246 -0
  88. package/src/hosted/chat-job.js +204 -0
  89. package/src/hosted/chat-permissions.js +203 -0
  90. package/src/hosted/chat-routes.js +1009 -0
  91. package/src/hosted/chat-store.js +477 -0
  92. package/src/hosted/comment-files.js +11 -1
  93. package/src/hosted/comments.js +1 -1
  94. package/src/hosted/console-routes.js +122 -34
  95. package/src/hosted/db.js +295 -0
  96. package/src/hosted/device-routes.js +88 -10
  97. package/src/hosted/device.js +54 -4
  98. package/src/hosted/events.js +3 -3
  99. package/src/hosted/guards.js +337 -27
  100. package/src/hosted/http.js +6 -3
  101. package/src/hosted/membership.js +22 -3
  102. package/src/hosted/operator-access.js +418 -0
  103. package/src/hosted/operator.js +106 -2
  104. package/src/hosted/ops-cli.js +238 -3
  105. package/src/hosted/pages.js +4 -0
  106. package/src/hosted/passkey-policy.js +75 -0
  107. package/src/hosted/permissions.js +52 -6
  108. package/src/hosted/presence.js +31 -2
  109. package/src/hosted/projects.js +30 -2
  110. package/src/hosted/public.js +4 -4
  111. package/src/hosted/ratelimit.js +14 -0
  112. package/src/hosted/retention.js +18 -2
  113. package/src/hosted/server.js +123 -11
  114. package/src/hosted/shares.js +2 -2
  115. package/src/hosted/step-up-settings.js +68 -0
  116. package/src/hosted/step-up.js +135 -0
  117. package/src/hosted/tailnet-identity.js +24 -0
  118. package/src/hosted/tailnet-routes.js +342 -0
  119. package/src/hosted/tailnet.js +220 -0
  120. package/src/hosted/tailscale.js +75 -9
  121. package/src/hosted/tenancy.js +66 -1
  122. package/src/hosted/token-api.js +119 -20
  123. package/src/hosted/token-events.js +5 -3
  124. package/src/hosted/tokens.js +29 -6
  125. package/src/hosted/turn-hub.js +152 -0
  126. package/src/hosted/usage-core.js +624 -0
  127. package/src/hosted/usage-layout.js +724 -0
  128. package/src/hosted/usage-routes.js +375 -0
  129. package/src/hosted/usage-shape.js +256 -0
  130. package/src/hosted/usage.js +641 -0
  131. package/src/remote/agent-connect.js +469 -0
  132. package/src/remote/agent-fix.js +611 -0
  133. package/src/remote/agent-job.js +216 -0
  134. package/src/remote/agent-link.js +906 -0
  135. package/src/remote/agent-policy-file.js +242 -0
  136. package/src/remote/credentials.js +35 -1
  137. package/src/remote/login.js +44 -9
  138. package/src/remote/share.js +1 -1
  139. package/src/remote/tailnet-cli.js +547 -0
  140. package/src/server/app.js +15 -0
  141. package/src/server/pairing-routes.js +34 -5
  142. package/src/server/tailscale.js +97 -4
  143. package/src/tailnet-proof.js +766 -0
  144. package/dist/client/assets/BoardChat-DxehB761.js +0 -27
  145. package/dist/client/assets/ChecksPanel-pA_ueIaJ.js +0 -1
  146. package/dist/client/assets/History-C9N32kCv.js +0 -1
  147. package/dist/client/assets/LocalSettings-DawtKnvi.js +0 -1
  148. package/dist/client/assets/QuickConnect-DO1TjS1t.js +0 -1
  149. package/dist/client/assets/index-CsqLdqGx.css +0 -2
  150. package/dist/client/assets/index-DnZarJ3U.js +0 -37
  151. package/dist/client/assets/shield-check-QzwGhz0t.js +0 -1
  152. package/dist/client/assets/ui-DI-FGWWK.js +0 -41
  153. package/dist/console/assets/LocalAccountsApp-VOCZg8dg.js +0 -1
  154. package/dist/console/assets/LocalConsole-CMwAW-mF.js +0 -1
  155. package/dist/console/assets/app-update-dialog-Cw6UDqNP.js +0 -1
  156. package/dist/console/assets/console-DgfWmUEx.js +0 -55
  157. package/dist/console/assets/console-Lis0vvdL.css +0 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,507 @@
3
3
  All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
4
4
  and the project uses [Semantic Versioning](https://semver.org/).
5
5
 
6
+ ## 0.7.0 - 2026-11-13
7
+
8
+ Connected agents, stage E: the Usage dashboard, and people's activity. Two new pages in the Workspace Console of a team server, and
9
+ a Usage view on a local board.
10
+
11
+ - **Usage** (`/w/<workspace>/usage`). Every agent turn (a chat answer, a comment answer, a fix, a push) with the numbers the agent
12
+ reported. Tiles with the change against the period before (turns, tokens, agent time, reported cost, fixes ready, failed or
13
+ stopped). Usage over time as stacked bars by day, week or month, split by agent, project, person, kind, model or outcome,
14
+ measuring turns, tokens, time or reported cost, with a brush to zoom. A ranked breakdown with shares, how turns ended, approvals,
15
+ and the median and 95th percentile turn duration. Top lists, and each project's daily budgets with today's use. Hover or tap for
16
+ exact values; press a bar, a row or a legend entry to filter the whole page; every chart has a table, "copy as CSV" and "copy as
17
+ an image". One palette, checked for colour-blind readers in light and dark.
18
+ - **The Usage dashboard is yours to arrange.** "Edit layout" turns the overview into a grid of widgets: drag one by its bar,
19
+ resize it from its corner (a chart cannot be made too small to read; a tile has three widths), hide it and add it back,
20
+ duplicate a chart so two sit side by side with different measures, undo, and reset. Every widget has options behind its "..."
21
+ button, saved per widget: bars or lines, legend and brush, how many rows, shares or counts, which percentiles (now also the
22
+ 90th and 99th) and a logarithmic axis, tiles' trend and comparison lines, chart or table. Arrow keys move a widget and Shift
23
+ with arrows resizes it, announced as you go; a finger drags on a tablet; a phone shows one column with up and down buttons.
24
+ Layouts are saved per person per workspace, checked strictly on the server, and autosaved with Undo. A saved view of
25
+ the overview keeps its layout and widget options unless you untick "Include this layout"; whoever opens its link sees them
26
+ without losing their own. Lists and the budgets are as tall as what they hold until sized by hand, and every row of widgets ends on one line
27
+ with no holes (a Top 5 beside a Top 10 is as tall as it). Owners can set the layout everyone
28
+ starts from (audited). Printing follows reading order. One additive migration (16); see docs/hosted.md, "Arranging the
29
+ dashboard". The public demo has all of it, kept until Reset.
30
+ - **Nothing is estimated, and "not reported" is not zero.** A cost appears only when the agent or its endpoint reported one. An
31
+ agent that reports no tokens shows "Not reported" (a dash, or a hatched area in a chart), and totals say how many turns reported.
32
+ - **Turns: a real grid.** Sorted, filtered and paged by the server (fast at 100,000 rows, tested), virtual rows, column chooser
33
+ and reordering, pinned columns, grouping with subtotals, a density toggle, keyboard navigation, a drawer with the full record
34
+ and a link to the comment or board, and CSV or JSON export of the filtered set (streamed, at most 50,000 rows, audited).
35
+ Drag a header to move a column and its right edge to resize it (the header's menu does both from the keyboard). Grouped rows
36
+ can show the period before and the change beside each group. A sorted table holds still while a running turn finishes.
37
+ - **Filters live in the address,** so a link is a view. Saved views are a person's own names for an address; a link or a view
38
+ never shows its reader more than they may see.
39
+ - **Who sees usage:** owners and admins the workspace; a member their own turns and every turn of an agent they connected;
40
+ viewers, share link guests and project tokens nothing. Checked on every route, including exports and a turn opened by its id.
41
+ - **What a turn records, completed.** Duration (the server's clock, and the agent's own when it says), tool calls counted by
42
+ type, approvals allowed without asking and who answered the others, the context window, and who connected the agent. Never the
43
+ question, the answer, a file or a diff.
44
+ - **Activity** (`/w/<workspace>/activity`). People's activity, read from the audit log: sign-in and sign-out, settings with the
45
+ value before and after, agents connected, reconfigured and revoked, approval cards answered, tokens, exports. Filter by person,
46
+ kind of action, agent, project and period; "Worth a look" keeps the security-relevant changes. A page per person (role, what
47
+ they made, devices, their usage and activity) and per agent. Admins and owners read everyone's; anyone else their own.
48
+ - **Sign-ins and devices stay each person's own.** They cover every workspace a person is in, so an owner or admin does not see
49
+ them for anyone else. On a server with one team the operator can let owners see them: `shapewall hosted
50
+ --owners-see-sign-ins` (off by default).
51
+ - **Periods compare honestly.** The last N days against the N local days before, across clock changes; this week or month so
52
+ far against last week or month to the same day; last month against the month before. Any number of clock changes in a period
53
+ is bucketed right.
54
+ - **Access review.** Every person, agent, API token, share link, public project and open invite in one place, with what it
55
+ reaches, who made it and when it was last used; unused for 90 days is marked. Exports as CSV.
56
+ - **New audit entries:** `signed_out`, `usage_exported`, `audit_exported` (the old audit CSV leaves one too), `access_exported`,
57
+ `usage_retention_changed`; `agent_policy_changed` now records which settings changed, before and after.
58
+ - **Retention, quota, export.** Usage records are kept 400 days by default (`shapewall hosted admin retention ws_ID --usage-days
59
+ N`), count toward the storage quota, and are all in the workspace export as `usage.json`.
60
+ - **On a local board,** each agent turn is a line in `.shapewall/agent-usage.jsonl` (0600, written under a file lock; `shapewall
61
+ init` now names it in `.gitignore`, and a project set up earlier should make sure `.shapewall/` is ignored), and the console's Usage page shows the owner
62
+ totals, a chart by day and agent, how turns ended and the newest turns.
63
+ - **Phones.** At 390 px the tiles stack, charts answer a tap, the grid is a list of cards and a turn opens as a sheet.
64
+ - **Upgrade notes.** Migration 15 is additive (new columns on the usage records, saved views, indexes); see
65
+ [Migration 15 and rollback](docs/hosted.md#migration-15-and-rollback). The retention job starts removing finished usage records
66
+ older than 400 days. The console gains Recharts and TanStack Table, Virtual and Query, loaded only with these two pages; the
67
+ board's JavaScript is unchanged in size.
68
+ - **Not in this release:** scheduled or emailed exports, per-agent budgets, notifications for "worth a look" entries, and a
69
+ tamper-evident (hash-chained) audit log.
70
+ - **The live demo has Usage and Activity,** with made-up numbers. Its console shows both pages working in the browser: about sixty
71
+ days of a pretend team's agent turns (a few thousand, placed relative to today; busy weekdays, spikes, a quiet stretch, a day of
72
+ failures, agents that report a cost, tokens only, or nothing) and the activity that goes with them. Every chart, the grid, a
73
+ turn, saved views, CSV and JSON exports (made in the browser), a person's page, an agent's page and the access review work.
74
+ Asking the agent or running a fix on the demo board adds a turn and its activity; Reset puts everything back. The demo counts
75
+ rows in memory and shares the rest with the server (`src/hosted/usage-core.js`, `activity-core.js`); a test puts the same rows
76
+ into a real server and compares every answer. The demo's Audit log page reads the same history, each agent has its token on
77
+ the API tokens page, and a turn's link opens its comment on the demo board. The charts still load only with these two pages.
78
+ - **Fixed: filter options ticked quickly all hold.** On Usage, ticking two options of a filter faster than the page redrew kept
79
+ only the last one: each press wrote the list the menu was drawn with. A press is now applied to the address as it is when it
80
+ lands. The same goes for removing filter chips, pressing a chart to filter, and "Worth a look" on Activity.
81
+
82
+ Signing in to a team server: fewer passkey prompts, and your tailnet login as the sign-in.
83
+
84
+ - **Signed in with the right role is enough.** A team server no longer asks for the passkey again before workspace actions:
85
+ approving an agent or a machine (`shapewall login`, `agent connect`), agent settings, API tokens, share links and public
86
+ projects, exports, Allow on an agent's edit and "Push this fix", admins and their roles, deleting a project or a board. The
87
+ 12-hour admin idle rule is off too. This changes the default on upgrade.
88
+ - **A small fixed core always asks** (a passkey check in the last 10 minutes): adding or removing a passkey, new recovery codes,
89
+ linking or unlinking a tailnet login, deleting your account, deleting a workspace, making, changing, removing or inviting an
90
+ owner, moving your sign-in to the server's new address, and making the setting below weaker.
91
+ - **"Ask for a passkey again" is a workspace setting** (Settings; owners; off by default), one switch per group: agent edits and
92
+ pushes; agents and machines; tokens and share links; members and roles; exports and deletes. With them how long one check
93
+ counts (5, 15, 30 or 60 minutes) and the admin idle rule. Changes are audited with the value before and after
94
+ (`step_up_changed`, marked "Worth a look"), and asking for less needs a passkey check itself.
95
+ - **The server decides, and says why.** The console no longer asks on its own: it shows "Confirm it's you" only when a route
96
+ answers `reauth_required`, with the server's message naming the rule that asked (the fixed core, or which setting). The board's
97
+ "Approve once" for a shell command follows the same rule.
98
+ - **Recovery-code sessions keep their restrictions,** and every action is in the audit log as before.
99
+ - **Tailnet sign-in** (`shapewall hosted --tailscale --tailnet-sign-in`, or `SHAPEWALL_HOSTED_TAILNET_SIGN_IN=1`; opt-in, Linux).
100
+ A tailnet user who arrives through `tailscale serve` is signed in as the account linked to their tailnet login: no passkey, no
101
+ password. **Tailscale is then the only sign-in:** one identity, your different machines, no second credential. No passkey is
102
+ asked for or offered (the sign-in page shows only "Continue as ..."; passkey routes answer `passkeys_off`), and the few
103
+ things that always ask take a typed name in the console (the workspace's, or your handle) and `--yes` on the command
104
+ line. The tailnet is the trust boundary: anything running as you on one of your tailnet devices can act as you. Passkeys are
105
+ an opt-in hardening there: `--tailnet-passkeys`, or `shapewall hosted admin passkeys on|off|status --data DIR`; with them
106
+ on, what this section says about passkeys on a tailnet server applies. Each login is its own account, so roles, audiences, the audit log and usage work unchanged, and an admin still
107
+ decides who is in a workspace: an unknown login sees who to ask and is listed for the admins under Members; an invite can be
108
+ made for one tailnet login, and only that login can use it. An account with a passkey links or unlinks its login on the
109
+ Account page. Tagged devices and shared nodes without a user are never signed in.
110
+ - **Where the identity is believed.** Only when all of this holds: the request carries a secret path that only the serve entry
111
+ the server made adds (new at each start, in no log); the connection's other end is a socket owned by root, from the kernel's
112
+ socket table; tailscaled's own whois gives the request's tailnet address to the same login, on a user's untagged device;
113
+ the request does not come from the server's own machine; exactly one clean login header and no Funnel mark. Never on direct loopback requests, raw TCP forwards, Funnel traffic, or
114
+ without the flag. The server refuses to start with the flag, says why, and suspends it while running: not Linux, tailscaled
115
+ in userspace-networking mode, Tailscale before 1.98, tailscaled running a SOCKS5 or outbound HTTP proxy or started with a
116
+ loopback-forwarding debug switch (`TS_DEBUG_NETSTACK_LOOPBACK_PORT`, `TS_DEBUG_NETSTACK_SUBNETS`, where its environment
117
+ can be read), no tailscaled of root visible (a process an ordinary user named tailscaled is ignored), the node unable to say
118
+ which node it is, the server in a container, or a serve config that is not its one entry. Root and the Tailscale operator
119
+ on the server's machine are trusted; nothing else on the machine or the tailnet is. The secret is taken off before the
120
+ application sees the request, on the hosted server and the local board, and is in no response.
121
+ - **The server's own machine is never signed in by its tailnet identity.** Any program on that machine can ask tailscaled for
122
+ the server's own address and arrives through the proxy with the machine owner's login. A request from one of the node's own
123
+ tailnet addresses, or one that whois gives to this node, is refused, in the browser ("This is the server's own machine") and
124
+ from the command line. There: a passkey or another tailnet device on a hosted server, `localhost` on a local board.
125
+ - **An identity is per device, not per person,** and the product says so: anything running as you on a tailnet device of yours
126
+ can act as you in a tailnet session. So: a tailnet session works only with the identity it was made for (and is stored so
127
+ that an older build cannot use it); it is marked in the device list, the audit log and Activity; signing out keeps that
128
+ browser signed out until "Continue as"; for the fixed core an account with no passkey is asked to add one, and that first
129
+ passkey is on hold for 24 hours (audited, "Worth a look"); a passkey account is linked to a tailnet login at sign-up only
130
+ when the box "Also sign me in from this tailnet login" is ticked; and "Sign out other devices" needs a session that passed a
131
+ passkey check, or an account that has no passkey.
132
+ - **The local board uses the same proof.** `shapewall serve --tailscale` let any program on the machine pass as the owner by
133
+ sending `Tailscale-User-Login` to the loopback port, and so approve an agent's command. The owner's other devices are now let
134
+ in by identity only with the proof above (where it is not possible they pair, and the board says why), and approving a
135
+ command or an edit needs the host's settings token, a paired device, or that proof.
136
+ - **From the command line, with no browser** (on a server with tailnet sign-in, from a tailnet machine). `shapewall hosted
137
+ claim --data DIR --login LOGIN` makes the first account on the server's machine: reading the data folder is the proof, the
138
+ login is taken on your word, and the command prints what it linked (`--setup-link URL` from another tailnet device checks
139
+ the identity instead). On the server's own machine `login` and `agent connect` fall back to the code, and `join` and
140
+ `admin` say to use another device. `shapewall login` and `shapewall agent connect` are approved by
141
+ your tailnet identity when your role may make tokens (`--project`, `--workspace`; `--name`, `--icon`, `--tint`, `--used-by`
142
+ for an agent); with several projects the command lists the flags to add and never prompts. `shapewall join` takes the invite
143
+ made for your login, or an invite link. `shapewall admin projects list|create`, `admin invites create`, `admin members list`
144
+ and `admin agents list` do a few admin jobs; the server checks the role and writes the audit entry. A workspace can require
145
+ the code, the browser and a passkey for approving machines (Settings, "Approve command line logins in the browser"): the
146
+ server then refuses a session that only a tailnet identity stands behind, whatever the client sends, and refuses the same
147
+ session an API token made on a project's page. On any other server these commands behave as before or say what they
148
+ need.
149
+ - **Upgrade notes.** Migration 17 is additive (the settings, tailnet logins on accounts, sessions and invites, the list of
150
+ tailnet visitors); see [Migration 17 and rollback](docs/hosted.md#migration-17-and-rollback). If you want the passkey prompts
151
+ back, an owner switches the groups on in each workspace's Settings.
152
+ - **The fixed core matches paths as the router does** (any case, a trailing slash, an encoded parameter). An owner who
153
+ leaves a workspace passes it too, like any other owner removed.
154
+ - **A first passkey added in a tailnet session can be taken away again.** Adding it needs a browser and a step that names
155
+ the device. While it is on hold (24 hours), every page of the account shows "A passkey was added from ..." with "Not you?
156
+ Remove it": any tailnet session of the account removes it with no passkey check, though it is the only passkey, and every
157
+ other passkey on hold starts its day again. A held passkey cannot add a second one. After the hold, or for any account,
158
+ the operator has `shapewall hosted admin passkeys list|remove --handle HANDLE | --login LOGIN --data DIR` (audited).
159
+ - **"Approve command line logins in the browser" covers three things:** approving a login or an agent, making an API token,
160
+ and inviting or making an admin. The settings card says exactly that.
161
+ - **An account is held to the tailnet user, not to the login's spelling.** The server keeps Tailscale's id of the user with
162
+ a linked login (migration 17, `users.tailnet_user_id`) and requires it on every request; a link made by `hosted claim
163
+ --login` takes the id of the first proven request. A device with an expired key is nobody. The machine's own addresses
164
+ are also read from its network interfaces on every request.
165
+ - **Which process is tailscaled:** the main process of `tailscaled.service` where systemd runs it, else by name; root in all
166
+ four ids in both cases. On a local board a failed self test of the peer check keeps identity off until a restart.
167
+ - **For the person at the server's own machine** (never signed in by its tailnet identity): `shapewall hosted admin members
168
+ list|add|remove`, `invites list|create|revoke`, `projects list` and `passkeys status|on|off|list|remove`, with the data
169
+ folder as the proof, each in the operator log and in the workspace's audit log as "Server operator".
170
+ - **Over SSH.** A hosted server started with `--origin http://shapewall.localhost:<port>` (no TLS, loopback) and reached
171
+ through `ssh -L` works with passkey accounts; the name keeps the session cookie from other servers on your localhost, which
172
+ plain `http://localhost:<port>` (also supported) does not. Documented with what a local board over a tunnel means, and
173
+ tested with the real command and a real browser at both.
174
+ - **Switching passkeys off or on** (`hosted admin passkeys off|on`) ends the sessions a passkey started, keeps a held passkey
175
+ removable and restarts its hold, and tells each workspace that asks for a passkey somewhere (audit log, Settings).
176
+ `hosted admin members relink|unlink` repairs an account whose tailnet user id changed; the page shows the command.
177
+ - **Not in this release:** tailnet sign-in on macOS or Windows servers, in containers, or with a userspace-networking
178
+ tailscaled (no way there to prove a request came through tailscale serve), more admin commands or MCP tools for
179
+ administration, admin tokens, and profile pictures from the tailnet. The proof is tested with a stand-in for tailscale
180
+ serve and was run against a real tailscaled with a second device; a tagged device, the suspension on a changed serve
181
+ config and a browser sign-in were not checked live: [what was and was not checked](docs/hosted.md#what-was-and-was-not-checked-against-real-tailscale).
182
+
183
+ - **The panel buttons are the panel's header.** With a side panel open, Comments, Agent and Checks in the top bar are exactly as
184
+ wide as the panel under them (the same inset as the panel's own rows), share that width, and follow the panel as you drag its
185
+ edge. With no panel open they go back to their own width at the right of the bar; so do they in a window too narrow to fit
186
+ them stretched. Agent settings now sits left of them, in the same place either way. The panel's default width is unchanged
187
+ (384 px); the narrowest it drags to is now 368 px (was 280), so it is never narrower than its buttons need. Phones are unchanged.
188
+
189
+ ### Fixes found on a real setup
190
+
191
+ A fix for connected agents on the current Claude Code adapter.
192
+
193
+ - **Connected agents work with `@agentclientprotocol/claude-agent-acp` 0.106.0.** With 0.6.0 and that adapter,
194
+ `shapewall agent connect` connected, and the first question then failed with only "Claude Code did not start." The cause:
195
+ 0.106.0 starts a session in the mode "auto" and, when asked to switch, sends the new mode before its answer, in another place
196
+ than the one Shapewall read. The session looked as if it still acted without asking, so Shapewall stopped it. Now the mode the
197
+ agent names is the mode Shapewall checks, and the session is switched to "default" as intended. Nothing is loosened: a session
198
+ that moves itself to a mode that acts without asking is still stopped, and the mode it names is checked on its own as well.
199
+ - **Tested adapter versions: 0.93.0 and 0.106.0.** The read-only and the edit provocations were run again on both with the real
200
+ adapter ([how](docs/agent-hardening.md#connected-agents)). `agent connect` now opens a session when it starts (no prompt is
201
+ sent) and prints which adapter answered. A version it was not tested with is used with a plain `Warning:` that names the tested
202
+ ones; a session that cannot be opened stops the command with the cause.
203
+ - **A start that fails says why.** The chat and the machine's log both get the adapter's error or its last output, the adapter's
204
+ name and version, and what to try. A turn that fails is also written to the machine's log. Never a bare "did not start".
205
+ - **The approval page shows what the machine asked for.** The box on the "Connect an agent" page said "does not change files"
206
+ even for a machine started with `--approvals owner` or `--auto edits`. The terminal now reports its rules with the code, and
207
+ the page says them: edits on a branch and who may allow them, "without asking" if asked, the base branch, and that commands are
208
+ never run. It is marked "Reported by the terminal"; an older shapewall that reports nothing is said to have said nothing.
209
+ - **"Sign in a terminal" reads cleanly.** The two commands on `/device` are each in a code block on a line of their own, instead
210
+ of one sentence that wrapped into narrow columns.
211
+ - **An expired code names the command that was run.** `shapewall agent connect` no longer says "Run shapewall login again".
212
+
213
+ ### The board's tools move to the bottom of the canvas
214
+
215
+ Board tools: the tools you use on the board moved out of the top bar.
216
+
217
+ - **A floating toolbar at the bottom centre of the canvas,** like FigJam, Miro and tldraw. It holds what you do to the board:
218
+ **Select** (V), **Hand** (H), then after a thin divider **Comment** (C), **Draw** and, on desktop when the board has live
219
+ pages, **Select text**. One tool is in use at a time (Comment, Draw and Select text fill with the accent colour; Select
220
+ and Hand in use are a quiet neutral chip); Esc goes back a step at a time and ends on Select. The top bar keeps what
221
+ you look at: the board, the screen sizes, Views and the Comments, Agent and Checks panels. The Comment button is no longer in
222
+ the top bar.
223
+ - **Select and Hand.** Select is the default pointer: a click selects a page and shows its actions or opens a comment's pin,
224
+ and a drag on empty canvas still pans. Hand is for moving around a dense board: a drag anywhere pans, on pages and pins
225
+ too, and a click selects and opens nothing. Holding Space in any tool is a temporary Hand, as before, and so is a
226
+ middle-button drag. V and H do nothing while you type. Desktop only: on a phone a finger already pans.
227
+ - **Draw is a tool of its own.** Pick Draw and click a page: a comment starts on that page and you draw at once (a box, an arrow
228
+ or the pen, as before). With a comment or a reply open, Draw draws on that comment's page. A drawing is still part of a
229
+ comment, and the Box, Arrow and Pen buttons under a comment work as they did.
230
+ - **The note for the tool in use sits just above the tools:** the comment hint, "Commenting on ...", the drawing bar and the
231
+ select-text note moved there from the top of the canvas. The tip, the links notes and the viewport notice stay at the top.
232
+ - **Nothing overlaps.** The tools are centred on the canvas (not the window), so they move when the sidebar or the side panel
233
+ opens or is resized. On a narrow canvas they shift clear of the zoom controls, then the zoom controls compact (Fit and the
234
+ minimap switch stay in the zoom menu), then the minimap steps aside. An open journey's bar and the toast sit above the tools.
235
+ - **Phones:** the tools are the bottom bar (44 px targets, above the safe-area inset) and the comment button left the top row.
236
+ They step aside while a sheet or the keyboard is up. Draw, then a tap on a page, opens the page full screen to draw on.
237
+ - **Permissions are unchanged.** A viewer, a read-only share link or an export without comments has no Comment or Draw tool;
238
+ a guest who may comment has both. Compare mode has neither, as before. Someone who may not comment has Select and Hand on a
239
+ desktop (and Select text while a page is live), and no toolbar on a phone.
240
+ - **Keyboard and screen readers:** the tools are a labelled toolbar with one tab stop; the arrow keys, Home and End move between
241
+ them, and each says whether it is in use. Tooltips show the shortcuts.
242
+ - **Esc goes back one step at a time.** With a journey open, Esc leaves comment mode (or Select text) first and the next Esc
243
+ leaves the journey; one press used to do both. Turning comment mode on ends Select text, so one tool is in use at a time.
244
+ - **Comments keep clear of the tools.** A thread or a new-comment card near the bottom of the canvas sits above the tools, and
245
+ above their note while one shows.
246
+ - **Comment, right on the page.** Select a page and its bar now starts with **Comment**: press it, then click where the comment
247
+ goes on that page (the hint above the tools names the page; on a live page it pins to the element you click). It works from the
248
+ keyboard too (Enter on the button, Enter again for the top left of the page) and is the first action when you tap a page on a
249
+ phone. The Comment tool at the bottom of the board and the C key work as before. People who cannot comment do not see it. The
250
+ first time you select a page the button is pointed out with a ring, once. Comment is a soft tint at rest and filled while it
251
+ is on.
252
+ - **The page bar is one line at any width.** It leads with the page's name and screen size; Open live, Select text, Checks
253
+ and History keep their words (with counts), and on a narrow canvas they move, one at a time, into a More menu instead of
254
+ becoming bare icons. On a phone the bar is compact: Comment, More (everything else, Open live and Open in a new tab
255
+ included) and Close. It rides above the page's title row and, as you pan, stays at the top of the canvas like a sticky
256
+ header, moving smoothly and never covering the page's headline while the top of the page is in view.
257
+
258
+ ## 0.6.0 - 2026-11-12
259
+
260
+ Connected agents, stage C: approvals and edits from a hosted board. A connected agent can make a fix for a comment, on a new
261
+ branch, with each edit allowed by a person on the board. It is off until the machine that has the code switches it on. Nothing
262
+ changes on a local board.
263
+
264
+ - **The default is unchanged.** A connected agent reads and answers only. Edits are switched on only on the machine that has the
265
+ code: `shapewall agent connect --approvals owner` (the person who connected it may allow each edit from the board) or
266
+ `--approvals admins` (whoever the server lets answer: the agent's answer role, admin by default, owner if set).
267
+ `--approvals none` switches it off again. The choice is saved per connection in the machine's own policy file
268
+ (`agent-policy.json` beside the saved token, 0600, outside every repository). It is the ceiling, and the server can only
269
+ narrow it.
270
+ - **More flags for `agent connect`,** each saved for the connection: `--auto none|edits` (what the server's "Allow without
271
+ asking" rule may apply to; default none), `--allow-path FILE` (a settings file the agent may ask to edit: dotfiles,
272
+ `package.json`, a `Makefile`, a `Dockerfile` and CI config are refused otherwise; adds one per run, `none` empties the list),
273
+ `--base BRANCH` (where a fix starts; default the commit the checkout is on, and then a checkout with uncommitted changes to
274
+ tracked files refuses the fix, because the fix would silently leave them out) and `--git-remote NAME|none` (where a finished
275
+ fix is pushed; default `origin`).
276
+ - **Fix with an agent on a hosted comment.** Offered when a connected agent's machine takes edits and you may use that agent. The
277
+ server takes the comment in the agent's name with the rules of sending a comment to an agent: a trusted member vouches for the
278
+ text they saw, a non-admin's run still needs an admin's "Approve agent run" where the policy says so, the agent's audience, the
279
+ daily and open-claims budgets. Chat messages never edit: only Fix does. An offline agent cannot be asked for a fix (Send to
280
+ agent still queues). For an agent that reads and answers only, the button is not offered and one line says why.
281
+ - **A fix is never made in the checked-out tree.** The agent works in a fresh copy of the base commit, with no `.git` in it, in
282
+ a folder outside the project (under `$XDG_STATE_HOME/shapewall/agent-fixes/`), made by the same code as "work on a branch" on a
283
+ local board. Shapewall itself commits the result on a new branch, `shapewall/comment-<n>-<slug>`, with the repository's own
284
+ author; no hook, filter or attribute runs. It pushes that one branch when the machine has the remote and the change touches
285
+ nothing that runs in CI (dependency manifests, CI config: then the thread says "Not pushed" and why), and opens a pull request
286
+ when GitHub connect is set up on that machine. Otherwise the thread says "Fix ready on branch" with the name to copy. The folder
287
+ is removed afterwards; the branch stays. A folder that is not a Git repository, a repository with no commit yet, a merge in
288
+ progress, or uncommitted changes without `--base`: refused, with a clear sentence in the thread and on the comment.
289
+ - **The commit is exactly what was allowed.** Every changed file must have had an allowed edit and must hold exactly the content
290
+ that was shown. A changed edit, an extra file, another file touched: the branch is taken back and the thread says nothing was
291
+ committed. If files in the person's own checkout changed during the fix, the thread says so.
292
+ - **Permission cards.** Each edit the agent asks for is checked on the machine first: inside the fix's folder after resolving
293
+ symlinks, not `.git`, not Shapewall's store, not a settings file unless named with `--allow-path`, and the whole resulting file
294
+ must be computable and small enough to show in full. What fails is refused there and never becomes a question. What passes is
295
+ a card in the comment's chat thread: the path, the full diff, Allow and Deny, in the machine's own words, never the agent's
296
+ title. A card carries a hash of the turn, the card, the path, the whole diff and its expiry, and an answer must send that hash
297
+ back. A card expires after 2 minutes and is answered once. Stop cancels the cards that wait. Everyone with the thread open sees
298
+ the state change live, and the strip above the board lists the cards that wait for you.
299
+ - **Who may answer.** The agent's answer role (admin by default), who is also in the agent's audience and trusted by the
300
+ project's agent policy; only the person who connected the agent when its machine says `--approvals owner`. Allow needs a
301
+ passkey check in the last 10 minutes (the browser asks); Deny does not.
302
+ - **The machine checks every answer again:** a card it asked and still waits on, the same hash, not expired, once, and from the
303
+ connecting person when it said "owner". A failed "allow" is a deny, and an answer for a card it never asked is ignored. The
304
+ server never takes "approved" from the machine.
305
+ - **"Allow without asking"** is an approval rule per agent, in the console's approvals dialog. It is available only when the
306
+ agent's own machine named a kind with `--auto`, is set only by the role in the agent's "who may change the rule" setting (admin
307
+ by default; owners can make it owner), applies only to the kinds the machine named, and never widens what may be edited. If the
308
+ machine connects again without it, the stored rule is reset to "ask", and that is audited.
309
+ - **The console and the board say which mode an agent is in:** "Reads and answers", "Edits on a branch, each allowed by ..." or
310
+ "Edits on a branch, allowed without asking".
311
+ - **Audit log.** New entries: `agent_edit_mode_changed` (what the machine allows changed), `agent_permission_asked`,
312
+ `agent_permission_approved` and `agent_permission_denied` (who, the path, the card's hash; never file content or a diff),
313
+ `agent_permission_expired`, `agent_permission_auto`, `agent_fix_branch_ready`, `agent_branch_pushed` and
314
+ `agent_pull_request_opened` (as reported by the agent's machine), plus `agent_turn_started` with kind "fix" and
315
+ `agent_approval_rule_changed`.
316
+ - **Usage records.** A fix is one record of kind "fix": its steps, how it ended (fix ready, answered, stopped, failed,
317
+ interrupted) and how many requests were asked, allowed and denied.
318
+
319
+ **No commands for Claude Code.** The link and the machine's policy know a third kind of request: exact commands from the
320
+ machine's own list, each allowed on the board (`--allow-command`). It is not available for Claude Code in 0.6.0, and Claude Code
321
+ is still the only agent `agent connect` offers. The reason was found with the real adapter: started with its shell tool, Claude
322
+ Code runs commands it takes to be read-only (`ls`, `cat`) without asking anyone, and those can read outside the project. So a
323
+ fix session of Claude Code gets no shell tool at all, `--allow-command` is refused for it with that explanation, and commands in
324
+ a hand-edited policy file are not in effect.
325
+
326
+ **What leaves the code machine in edit mode,** beyond 0.5.0: the diffs on edit cards (bounded), the file paths and line counts of
327
+ a fix, the branch name and the pull request link. Still not the agent's token, which is never in the agent's environment, and
328
+ not absolute paths.
329
+
330
+ **The limit.** Shapewall does not sandbox the agent's own tools. With approvals on, a compromised hosted server can forge an
331
+ "allow" for an edit the agent really asked, with the right hash. The worst case is then edits to project files, on a branch, in a
332
+ throwaway folder, pushed for review: not commands, not the checkout, and not files outside the project that the agent asks about.
333
+ Give a connected agent a restricted profile, prefer `--approvals owner` to `admins`, review the pull request like any other, and
334
+ do not add `--allow-path` for CI files. [agent-hardening.md](docs/agent-hardening.md#edits-from-a-hosted-board) has the trust
335
+ table and how this was checked with the real Claude Code adapter.
336
+
337
+ Not in this release: recapture and push of new captures after a fix; the model and effort menus; batch fixes; "Allow for this
338
+ chat"; images in chat; connecting one agent to all projects; commands for Claude Code; fixes from chat messages; queueing a fix
339
+ for an offline agent; the usage and audit dashboards.
340
+
341
+ **Compatibility.** `shapewall watch --remote --exec` and `shapewall mcp --remote` work as before, with the same tokens. A
342
+ connected agent that was approved under 0.5.0 keeps reading and answering only until its own machine is started with
343
+ `--approvals`.
344
+
345
+ **Upgrading a hosted server.** Back up first (`shapewall hosted backup`). Migration 14 adds one table (`chat_permissions`) and
346
+ three columns on `agent_runs` (`approvals_asked`, `approvals_allowed`, `approvals_denied`), and changes nothing that exists. To
347
+ go back, restore the backup with 0.5.0, or run 0.5.0 on the upgraded database: it ignores the new table and columns, and a fix
348
+ cannot be started from it. Details and the SQL to remove the schema are in
349
+ [Migration 14 and rollback](docs/hosted.md#migration-14-and-rollback).
350
+
351
+ ### After the security review
352
+
353
+ - **Files that run something.** One list (dotfiles, manifests and lockfiles, build and tool configuration, package scripts,
354
+ container and CI files, makefiles, test files) decides both what a connected agent may be asked to edit and what is pushed. An
355
+ edit to one is refused unless the machine names it with `--allow-path`; a named one is always answered by a person; a fix that
356
+ changes one is never pushed from the machine.
357
+ - **Push this fix.** A fix with an edit that went without asking (`--auto edits`) is committed on its branch on the machine and
358
+ held there. It is pushed, and a pull request opened, only after someone who may answer cards allows one card that shows the
359
+ whole diff, with a fresh passkey. It can be asked again.
360
+ - **Only the connecting person switches "Allow without asking" on** when their machine says `--approvals owner`.
361
+ - **Stop stops the commit, the push and the pull request.** A push that had already finished is said in the thread.
362
+ - **The commit check compares bytes and file mode**, and fails when an allowed file is missing from the commit. Edits to files
363
+ Git ignores, to `node_modules` and to `.gitattributes` / `.gitmodules` are refused when they are asked.
364
+ - **The policy file fails narrow**: an unknown value reads as the narrowest setting, by name, and the file's owner and mode are
365
+ checked before it is read.
366
+ - **Cards wait a length of time**, counted on each side's own clock. An answer the machine did not take shows as expired.
367
+ - **Diffs on cards go to the agent's audience** (and whoever may answer or asked). Other members read which file and the outcome.
368
+ - **Fix on a comment whose run needs approval**: an admin's Fix approves and starts; a member's really sends it for approval.
369
+ - **Leftover fix copies are swept** at connect and around every fix; the fix folder is never inside the project.
370
+ - A fix's status is written with its own claim; a pull request link must be a pull request URL (a link only on github.com);
371
+ cards count against the storage quota; comment text in a commit subject or pull request title pings and closes nothing.
372
+
373
+ ## 0.5.0 - 2026-11-12
374
+
375
+ Connected agents: your Claude Code on a hosted board, to chat with. It reads and answers only. Nothing changes on a local board.
376
+
377
+ - **`shapewall agent connect --remote <server>`**, run in a project's folder on the machine that has the code, makes that machine's
378
+ Claude Code an agent of a hosted project. The first run shows a code; an admin approves it on the server's `/device` page, where
379
+ they name the agent, pick its icon, its project and who may use it. The agent gets a token of its own, saved on the machine and
380
+ never printed. Flags: `--agent`, `--name`, `--as` (a second connection), `--audience owner|server`, `--takeover`,
381
+ `--concurrency`, `--token-file` (for a service).
382
+ - **Only Claude Code can be connected.** An agent is offered when its own controls were shown to keep a session read-only. Codex,
383
+ goose and Gemini CLI are refused with a message: Codex, started in its read-only sandbox, changed no file in our check but still
384
+ ran shell commands and read a file outside the project without asking; goose's chat-only mode could not be verified on the test
385
+ machine; Gemini CLI was not installed to verify. For them, `shapewall watch --remote` stays the way.
386
+ - **The agent is online while the command runs.** Its state on the board and in the console comes from its open link to the server.
387
+ The link reconnects by itself; Ctrl+C is a clean exit.
388
+ - **One link per agent.** A second `agent connect` on the same token is refused, with the machine already connected and since
389
+ when. `--takeover` closes the other link first; add it to a service's command so a restart after a crash is not refused.
390
+ - **Chat on hosted boards.** The Agents panel has a **Chat** button on each connected agent you may use. It opens the same chat
391
+ panel a local board has: the answer streams in with the agent's steps, Stop works, and the conversation is kept on the server.
392
+ A reload, or a second person with the same thread open, gets a running answer from its start, in order, and a dropped stream
393
+ resumes where it was. The board chat and each comment's chat are shared with the workspace's members; a chat you start is yours
394
+ alone (50 of your own per board). "@" mentions and text files work as they do locally.
395
+ - **Read and answer only, by the agent's own controls.** A connected agent does not change files and runs no commands. Its session
396
+ starts with none of your Claude Code settings files (their allow rules, hooks, default mode, plugins and MCP servers do not
397
+ apply) and with only its reading tools; Bash, Edit, Write, web tools and the rest are removed. Shapewall also offers it no way to
398
+ write or run, and refuses every permission request on the spot, a read outside the project included; the answer says what was
399
+ refused. It fails closed: a mode other than "default" or "plan" is switched or the agent is not started, an agent that reports
400
+ no mode is not started, and managed settings that allow acting tools or run hooks stop `agent connect`. It still reads every
401
+ file in the project folder, and its answers leave the machine. Edits, commands and approvals from the board are not in this
402
+ release; for fixes, keep using `shapewall watch --remote --exec`.
403
+ - **Who may use it** follows the agent's audience, as for comments, and the board shows what is in effect. `--audience owner` asks
404
+ the server to keep it to the person who connected it even if its audience there is widened later, and the machine refuses a job
405
+ the server labels as someone else's; the machine cannot check that label, so it does not protect against a compromised server.
406
+ A message by someone outside an agent's audience never reaches that agent, even in a shared thread, and a share link guest's
407
+ text never does. Viewers, guests and public visitors have no chat.
408
+ - **Comments.** A comment sent to a connected agent by name is read and answered by it, in the comment's chat thread and as a reply
409
+ on the comment. Comments sent to any agent stay with watchers, which can fix them. The board context that goes with a question
410
+ follows the audience too: a comment is in it only when the person asking wrote it, the agent holds it, or its author is in the
411
+ agent's audience and it was sent to an agent and not to another one.
412
+ - **Offline.** Chat to an agent that is offline is refused, with the reason in place of the message box. A thread stays with its
413
+ agent and never moves by itself: the panel offers "Ask <other agent> instead", and the switch is written into the thread.
414
+ Comments sent to an offline agent wait, as before.
415
+ - **Limits.** The daily turn budget is counted from the usage records, so deleting a thread gives nothing back. Turns cut off by a
416
+ server stop are ended as interrupted when it starts again.
417
+ - **The console.** A project's Agents page says what each connected agent is (what runs, on which machine, since when it is
418
+ connected, that it reads and answers only), and its Connect card leads with this server's `shapewall agent connect` command. The
419
+ workspace overview shows the same.
420
+ - **Usage records and the audit log.** Every chat turn writes a usage record: who asked which agent, where, when, how it ended, and
421
+ the model, effort and token counts only when the agent reports them (a cost only when the agent itself reports one; never message
422
+ text). The audit log gains an agent connected, its link opened and closed (at most once a minute per agent when a link flaps), a
423
+ chat thread created, deleted or switched to another agent, and a turn started or stopped.
424
+
425
+ Not in this release: edits, commands and approvals from the board; "Fix with <agent>" through chat; images in chat; editing or
426
+ regenerating a message; answer ratings; the model and effort menus; connecting one agent to every project at once (one connection
427
+ serves one project; connect again with `--as` for another).
428
+
429
+ **Compatibility.** `shapewall watch --remote` and `shapewall mcp --remote` work as before, with the same tokens. The token API now
430
+ tells a token that may take work which agent each comment was sent to (`agentId`: its own agent's id, or `null` for any agent).
431
+ There is a new token scope, `agent`: it opens the link of a connected agent and nothing else, and is granted only by approving
432
+ `shapewall agent connect`. The agent policy has a new number, `dailyTurns` (200 chat turns a day for a project by default).
433
+
434
+ **Upgrading a hosted server.** Back up first (`shapewall hosted backup`). Migration 13 adds three tables for chat (threads, messages,
435
+ turns) and one column, and changes nothing that exists: no token gains a scope and no agent changes its audience. To go back, restore
436
+ the backup with 0.4.0, or run 0.4.0 on the upgraded database: it ignores the new tables, so chat is gone from the board until you
437
+ upgrade again, and a connected agent shows as an ordinary agent whose token still works for comments. Details and the SQL to remove
438
+ the schema are in [Migration 13 and rollback](docs/hosted.md#migration-13-and-rollback).
439
+
440
+ ## 0.4.0 - 2026-11-12
441
+
442
+ Agents on a hosted board are things you can see and choose. This is the first step towards connected agents and chat on hosted
443
+ boards; nothing changes on a local board.
444
+
445
+ - On a hosted server, every project token that may take work (the `claim` scope) is an **agent**: it has a name, an icon and a
446
+ colour, a state (online, working, offline with when it was last seen) and a line saying whose work it takes. The board's Agent
447
+ panel lists them with what each is working on and what waits for it, and the Agent button's tooltip names them ("Builder online,
448
+ Fixer offline"). `shapewall watch --remote` and `shapewall mcp --remote` are those agents: they need no new flag and no new token.
449
+ - **Send to agent** on a thread is a split button, like "Fix with <agent>" on a local board. The main part names the project's
450
+ default agent; the menu lists every agent with its state, and **Any agent** for whichever takes it first. A comment sent to one
451
+ agent can only be taken by that agent: the project's other tokens do not see it, by list, by id or through MCP.
452
+ - A comment sent to an agent that is offline waits for it and says so on its thread and in the panel ("Waiting for Builder
453
+ (offline, last seen 2 hours ago)"), with **Let any agent take it** and **Choose another**. Nothing is lost: when the agent is
454
+ back it takes what was sent to it.
455
+ - Each agent says **who may send it work**: only the person who connected it, named members, or everyone the project's agent policy
456
+ trusts. The server checks it when a comment is sent and again when the agent takes it. On the board, an agent you may not use is
457
+ listed, greyed, with the reason. A new agent takes work only from the person who connected it, until an admin shares it.
458
+ - A project has a **default agent**, picked by an admin or owner: the one Send to agent names, and where a trusted member's new
459
+ comment goes. Without one, comments go to any agent, as before.
460
+ - The console has an **Agents** page for each project: every agent with its state, last seen, audience, approval settings and the
461
+ default; rename it and give it an icon and a colour (the editor the local Agents page uses); set the default; change who may use
462
+ it; revoke it; and a **Connect an agent** card with this server's exact commands. **Agents** in the workspace menu lists every
463
+ agent of the workspace with the project it serves and who connected it.
464
+ - Each agent has an approval rule and two roles, who may answer its approvals and who may change the rule (admins and owners, or
465
+ owners only). The rule in effect is always "Always ask"; "Approve automatically" is listed as not available until an agent's own
466
+ machine can allow it.
467
+ - An agent's replies on a thread show its icon. Renaming an agent renames its token: new replies use the new name, old ones keep
468
+ theirs.
469
+ - Phones have the Agent panel now: **Agents** in the board's More menu opens it as a sheet, and a thread's sheet has the same Send
470
+ to agent control.
471
+ - Every change is in the audit log with what it was before and after: an agent created or first seen, renamed, its look, the
472
+ default, its audience, its approval settings, revoked, and a waiting comment released to any agent.
473
+ - The server now writes one usage record for each comment an agent takes (who asked, which agent, when, how it ended; never the
474
+ comment or the answer). There is no page for it yet.
475
+
476
+ **Upgrading a hosted server.** Back up first (`shapewall hosted backup`). Migration 12 adds two tables and three columns and turns
477
+ every token that already has the `claim` scope into an agent that behaves exactly as before: it takes work from everyone the agent
478
+ policy trusts, and no project gets a default agent, so nothing is routed differently until you choose. Tokens made from this
479
+ release on start narrower, with only the person who made them: share such an agent on the project's Agents page if teammates'
480
+ comments should reach it. To go back, restore the backup with 0.3.4, or run 0.3.4 on the upgraded database: it ignores the new data,
481
+ which means a comment sent to one agent can be taken by any watcher, audiences are not enforced, and default agents, icons and
482
+ usage records are not shown until you upgrade again. Details and the SQL to remove the schema are in
483
+ [Migration 12 and rollback](docs/hosted.md#migration-12-and-rollback).
484
+
485
+ ## 0.3.4 - 2026-11-12
486
+
487
+ - The agent's "Changed N files" card lists only the agent's work. Files Git ignores (by `.gitignore` as it is on disk, committed or
488
+ not, `.git/info/exclude` and your global excludes) are never listed or counted, and Undo never touches them. Before, anything
489
+ another program wrote inside the project folder during the turn showed up in the card (a dev server's data, a log), and Undo could
490
+ have deleted those new files and rolled the changed ones back. Outside a Git repository the list works as before, and Shapewall's
491
+ own folders (`.shapewall*`) are always left out.
492
+ - Hosted boards have the Agent button in the top bar, next to Comments and Checks, for people who can send comments to an agent. It
493
+ opens a small panel: whether an agent is listening ("Agent online: <token name>", or "No agent is listening" with the command to
494
+ connect one), what is running and what waits for you, each opening its comment. There is still no chat on hosted boards. Share
495
+ link guests and public viewers do not get it.
496
+ - The sidebar has one search field on every board. On a board with no journeys the old "Filter pages" box was still shown under
497
+ "Search the board".
498
+ - Esc is never swallowed by a tooltip. With the keyboard on a button inside a thread or a dialog (its tooltip showing), one Esc now
499
+ closes the thread or dialog; before, the first Esc only closed the tooltip.
500
+ - Phone: in the drawing sheet every tool and ink is a full 44 px target; the tools are on one line and the inks, Undo and Clear on
501
+ the next. In the journey bar each step has a 44 px target around its dot, and a journey with many steps scrolls sideways inside
502
+ the bar.
503
+ - "Fix ready on branch" wears the attention colour everywhere, the same as on the toolbar: it waits for you to apply it.
504
+ - `shapewall settings` exits cleanly (code 0, after cleaning up) when it is stopped the moment it starts. Before, a Ctrl-C or a
505
+ script's signal that arrived right as it printed its address could kill it outright.
506
+
6
507
  ## 0.3.3 - 2026-11-11
7
508
 
8
509
  - Commenting goes one step at a time, and the board always says which step you are at. Pick: in comment mode the element under the