shapewall 0.6.0 → 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 (127) hide show
  1. package/CHANGELOG.md +252 -0
  2. package/README.md +39 -2
  3. package/THIRD_PARTY.md +15 -0
  4. package/dist/agent/package-lock.json +594 -2
  5. package/dist/client/assets/{BoardChat-DdwBcb2N.js → BoardChat-WS8mAIW6.js} +1 -1
  6. package/dist/client/assets/{BuzzDialog-DpUcnU6S.js → BuzzDialog-B-Mlr6wF.js} +1 -1
  7. package/dist/client/assets/{ChecksPanel-CngYV4yz.js → ChecksPanel-Dx1ZLBR6.js} +1 -1
  8. package/dist/client/assets/{History-CD0saQA5.js → History-sXhmpcvs.js} +1 -1
  9. package/dist/client/assets/{LocalSettings-MZy2baig.js → LocalSettings-CtGzz9F3.js} +1 -1
  10. package/dist/client/assets/{Management-CSvZ-SHO.js → Management-CGHe8Wt9.js} +1 -1
  11. package/dist/client/assets/{QuickConnect-foLh2QUm.js → QuickConnect-DEk84E4A.js} +1 -1
  12. package/dist/client/assets/{ShareDialog-DPWDftoL.js → ShareDialog-CGGx-AYK.js} +1 -1
  13. package/dist/client/assets/{app-update-dialog-CtiXpTRD.js → app-update-dialog-_bVp8hnC.js} +1 -1
  14. package/dist/client/assets/{circle-x-CteRBtXC.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-BjRNIGSf.js → play-BzQ3tRTv.js} +1 -1
  18. package/dist/client/assets/{refresh-cw-r_tZiFfB.js → refresh-cw-BYBMyDKT.js} +1 -1
  19. package/dist/client/assets/{ui-zQpn-PdL.js → ui-CAY6myRA.js} +1 -1
  20. package/dist/client/build-info.json +1 -1
  21. package/dist/client/index.html +3 -3
  22. package/dist/client/sw.js +2 -2
  23. package/dist/console/assets/LocalAccountsApp-CWRguRRL.js +1 -0
  24. package/dist/console/assets/LocalConsole--I2SaIpr.js +2 -0
  25. package/dist/console/assets/LocalUsage-BmpCZ36k.js +1 -0
  26. package/dist/console/assets/app-update-dialog-B8M9plaT.js +1 -0
  27. package/dist/console/assets/app-version-muKrQqbL.js +1 -0
  28. package/dist/console/assets/console-CrhTsPbz.css +2 -0
  29. package/dist/console/assets/console-DxapQ9oS.js +11 -0
  30. package/dist/console/assets/local-agents-CoqD4dSN.js +6 -0
  31. package/dist/console/assets/minus-DDQ0ydcM.js +1 -0
  32. package/dist/console/assets/tailnet-C5Flwl_d.js +2 -0
  33. package/dist/console/assets/theme-DCd0qh4l.js +1 -0
  34. package/dist/console/assets/ui-Bry1mnCY.js +41 -0
  35. package/dist/console/assets/usage-CIPWnHaS.css +1 -0
  36. package/dist/console/assets/usage-CqVjMb7m.js +5 -0
  37. package/dist/console/assets/usage-D1G0GgE3.js +56 -0
  38. package/dist/console/build-info.json +1 -1
  39. package/dist/console/console.html +8 -2
  40. package/docs/agent-hardening.md +31 -17
  41. package/docs/agents.md +35 -0
  42. package/docs/architecture.md +10 -4
  43. package/docs/deployment.md +39 -17
  44. package/docs/design-system.md +56 -7
  45. package/docs/hosted.md +1004 -43
  46. package/docs/images/board-overview.png +0 -0
  47. package/docs/images/journeys.png +0 -0
  48. package/docs/images/live-comment.png +0 -0
  49. package/docs/images/phone-comment.png +0 -0
  50. package/docs/images/phone-overview.png +0 -0
  51. package/docs/images/variant.png +0 -0
  52. package/docs/where-to-run.md +82 -1
  53. package/package.json +6 -1
  54. package/src/agent/backends/acp.js +224 -26
  55. package/src/agent/routes.js +21 -0
  56. package/src/agent/usage-log.js +251 -0
  57. package/src/cli/args.js +24 -0
  58. package/src/cli/help.js +37 -2
  59. package/src/cli/init.js +2 -1
  60. package/src/cli/serve.js +20 -5
  61. package/src/cli.js +8 -0
  62. package/src/hosted/access-cli.js +99 -1
  63. package/src/hosted/activity-core.js +232 -0
  64. package/src/hosted/activity.js +375 -0
  65. package/src/hosted/admin.js +80 -13
  66. package/src/hosted/agent-approvals.js +2 -2
  67. package/src/hosted/agent-routes.js +3 -3
  68. package/src/hosted/agents.js +11 -4
  69. package/src/hosted/app.js +89 -7
  70. package/src/hosted/auth-routes.js +156 -15
  71. package/src/hosted/auth.js +123 -20
  72. package/src/hosted/board-routes.js +3 -3
  73. package/src/hosted/chat-frames.js +5 -15
  74. package/src/hosted/chat-permissions.js +12 -0
  75. package/src/hosted/chat-routes.js +8 -8
  76. package/src/hosted/chat-store.js +20 -3
  77. package/src/hosted/comment-files.js +5 -2
  78. package/src/hosted/console-routes.js +111 -34
  79. package/src/hosted/db.js +130 -0
  80. package/src/hosted/device-routes.js +25 -3
  81. package/src/hosted/device.js +23 -4
  82. package/src/hosted/guards.js +337 -27
  83. package/src/hosted/http.js +6 -3
  84. package/src/hosted/membership.js +13 -2
  85. package/src/hosted/operator-access.js +418 -0
  86. package/src/hosted/operator.js +106 -2
  87. package/src/hosted/ops-cli.js +238 -3
  88. package/src/hosted/pages.js +2 -0
  89. package/src/hosted/passkey-policy.js +75 -0
  90. package/src/hosted/permissions.js +14 -6
  91. package/src/hosted/presence.js +14 -2
  92. package/src/hosted/projects.js +2 -1
  93. package/src/hosted/public.js +4 -4
  94. package/src/hosted/ratelimit.js +6 -0
  95. package/src/hosted/retention.js +18 -2
  96. package/src/hosted/server.js +123 -11
  97. package/src/hosted/shares.js +2 -2
  98. package/src/hosted/step-up-settings.js +68 -0
  99. package/src/hosted/step-up.js +135 -0
  100. package/src/hosted/tailnet-identity.js +24 -0
  101. package/src/hosted/tailnet-routes.js +342 -0
  102. package/src/hosted/tailnet.js +220 -0
  103. package/src/hosted/tailscale.js +75 -9
  104. package/src/hosted/tenancy.js +48 -1
  105. package/src/hosted/token-api.js +2 -2
  106. package/src/hosted/tokens.js +9 -2
  107. package/src/hosted/usage-core.js +624 -0
  108. package/src/hosted/usage-layout.js +724 -0
  109. package/src/hosted/usage-routes.js +375 -0
  110. package/src/hosted/usage-shape.js +256 -0
  111. package/src/hosted/usage.js +641 -0
  112. package/src/remote/agent-connect.js +37 -1
  113. package/src/remote/agent-link.js +2 -0
  114. package/src/remote/login.js +33 -8
  115. package/src/remote/share.js +1 -1
  116. package/src/remote/tailnet-cli.js +547 -0
  117. package/src/server/app.js +15 -0
  118. package/src/server/pairing-routes.js +34 -5
  119. package/src/server/tailscale.js +97 -4
  120. package/src/tailnet-proof.js +766 -0
  121. package/dist/client/assets/index-Cxz1UVcV.css +0 -2
  122. package/dist/client/assets/index-uUZVBYUS.js +0 -37
  123. package/dist/console/assets/LocalAccountsApp-DIdy1KnN.js +0 -1
  124. package/dist/console/assets/LocalConsole-DfcQztF-.js +0 -1
  125. package/dist/console/assets/app-update-dialog-ttl9lF5A.js +0 -1
  126. package/dist/console/assets/console-OqAjD0kV.js +0 -55
  127. package/dist/console/assets/console-kvjrAArQ.css +0 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,258 @@
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
+
6
258
  ## 0.6.0 - 2026-11-12
7
259
 
8
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
package/README.md CHANGED
@@ -49,12 +49,16 @@ feedback, fix the code, and you recapture to check.
49
49
  screenshot path for each open comment. `shapewall watch` dispatches new comments to your agent by itself, and `shapewall mcp` gives it
50
50
  tools. It fixes, recaptures, replies on the comment; the pins tell you if it worked.
51
51
  - **Works on a phone.** 44 px touch targets, a bottom sheet for comments, and Back closes the topmost panel instead of leaving the board.
52
+ - **Agent usage you can see.** Every agent turn leaves a usage record (numbers and ids, never the question or the answer): the
53
+ local console's Usage page shows turns, tokens, time and reported cost by day and agent.
52
54
  - **Small and local.** Node 22, Playwright, Express, React Flow. Data is plain JSON files in `.shapewall/`. No account, no cloud.
53
55
  - **A team server when you want one.** `shapewall hosted` adds passkey accounts, workspaces with roles, share links and live presence
54
56
  on a server you run. `shapewall agent connect` puts your Claude Code on the hosted board: teammates chat with it there, and it
55
57
  reads the project and answers. When its own machine says so (`--approvals`), it also makes a fix for a comment on a new branch,
56
58
  each edit allowed on the board. Each machine that watches a hosted board is an agent too, with a name, an
57
- icon and a state; people send a comment to one by name, and each agent says whose work it takes.
59
+ icon and a state; people send a comment to one by name, and each agent says whose work it takes. The console's **Usage** page
60
+ shows every agent turn with the tokens and cost each agent reported (never estimated), as charts and a grid, and **Activity**
61
+ shows who signed in, who changed which setting and who approved what.
58
62
  [Multiplayer (beta)](#multiplayer-on-your-own-server).
59
63
  - **Switch local projects.** Serve each project on its own port; the site dropdown lists them together while keeping every project's
60
64
  agent and files separate. [Several local projects](docs/deployment.md#several-local-projects).
@@ -153,7 +157,7 @@ npm run demo # captures the bundled demo sit
153
157
  npm run demo -- --full # the whole fictional product, as in the live demo (26 pages)
154
158
  ```
155
159
 
156
- Open http://127.0.0.1:4600/ and try it: zoom in on a page, click **Comment**, click a button on the page, write a note.
160
+ Open http://127.0.0.1:4600/ and try it: click a page and press **Comment** on the bar above it (or pick **Comment** in the tools at the bottom of the board, or press C), click a button on the page, write a note. Zoomed in, the page is live and the comment pins to the element you click.
157
161
 
158
162
  ## How it works
159
163
 
@@ -516,6 +520,10 @@ Commands
516
520
  project's agent, else Claude Code when found). Codex, goose and Gemini CLI are not
517
521
  offered in this release. Never a command from the server
518
522
  --name "Builder" the name to suggest on the approval page (the approver has the last word)
523
+ --project SLUG on a server with tailnet sign-in, run on a tailnet machine: no browser, your tailnet
524
+ user approves it. --project (and --workspace NAME) pick the project when there are
525
+ several; --used-by owner|trusted who may send it work (default owner: only you);
526
+ --icon NAME and --tint NAME as on the approval page
519
527
  --as NAME a second connection from this machine (its own token; default "default")
520
528
  --audience owner|server "owner": the server keeps it to the person who connects it even if its audience
521
529
  there is widened, and this machine refuses a job the server says is someone else's
@@ -617,6 +625,17 @@ Commands
617
625
 
618
626
  Hosted Shapewall (docs/hosted.md)
619
627
  login --remote URL get a project token through the browser; saved for the --remote commands
628
+ --project SLUG on a server with tailnet sign-in, run on a tailnet machine: no code and no browser,
629
+ your tailnet user approves it (if its role may). --project, and --workspace NAME
630
+ when you are in several, pick the project; with one project neither is needed
631
+ join --remote URL join a workspace on a server with tailnet sign-in, from a tailnet machine: takes the
632
+ invite an admin made for your tailnet login. The role is the invite's
633
+ --invite LINK an invite link (or its code) instead
634
+ admin projects list|create NAME | members list | agents list | invites create
635
+ a few admin commands on a server with tailnet sign-in, as your tailnet user (the
636
+ server checks your role). --remote URL; --workspace NAME when you are in several
637
+ --login LOGIN invites create: for one tailnet login (ada@example.com); or --link for a link
638
+ --role ROLE viewer, member (default), admin or owner; --days N until it expires; --name; --json
620
639
  push upload the latest captures to a hosted project
621
640
  --include-checks explicitly include private diagnostic reports
622
641
  --remote URL the hosted Shapewall (or $SHAPEWALL_REMOTE)
@@ -636,12 +655,28 @@ Hosted Shapewall (docs/hosted.md)
636
655
  --usercontent-origin URL serve live HTML only from this other origin (or $SHAPEWALL_USERCONTENT_ORIGIN)
637
656
  --previous-origin URL while moving to a new origin: the old one (sign-in moves, up to 30 days)
638
657
  --report-email ADDR where "Report this board" on public projects goes
658
+ --owners-see-sign-ins workspace owners see their members' sign-ins and devices in Activity
659
+ (off: each person sees only their own; for a server with one team)
639
660
  --tailscale on your tailnet through tailscale serve (https://<machine>.<tailnet>.ts.net)
640
661
  --tailscale-port N default 443; --funnel: share links public through Tailscale Funnel
641
662
  (share pages only, never the console), on --funnel-port 8443|443|10000
663
+ --tailnet-sign-in with --tailscale: a tailnet user is signed in as the account linked to their tailnet
664
+ login, no passkey (or $SHAPEWALL_HOSTED_TAILNET_SIGN_IN=1). An admin still decides
665
+ who is in a workspace. Needs Linux and Tailscale 1.98+ in its normal (TUN) mode, not
666
+ in a container; refuses to start where it cannot prove that a request came through
667
+ tailscale serve. An identity is per device: what runs as you there can act as you.
668
+ Tailscale is then the only sign-in: no passkeys, and the few things that always ask
669
+ take a typed confirmation
670
+ --tailnet-passkeys with --tailnet-sign-in: also allow passkeys ($SHAPEWALL_HOSTED_TAILNET_PASSKEYS=1, or
671
+ hosted admin passkeys on|off). An account that adds one confirms with it
642
672
  --quotas FILE per-workspace quotas (default <data>/quotas.json when it exists)
643
673
  --retention-hours N prune old versions every N hours (default 6, 0 = off); --retention-keep N (2)
644
674
  hosted setup-link print the first account's one-time link (it is not in the log)
675
+ hosted claim --data DIR --login LOGIN
676
+ with --tailnet-sign-in: make the first account on the server's own machine, no
677
+ browser. Whoever can read the data folder says whose server it is: --login is the
678
+ owner's tailnet login (ada@example.com); --workspace-name NAME. From another tailnet
679
+ device: hosted claim --setup-link URL (the server then sees who asks)
645
680
  --data DIR | --new --new: make a new link (the old one stops working)
646
681
  hosted move-origin --to URL move the server to a new origin (passkeys move with a rebind)
647
682
  --data DIR | --days N | --status window 1 to 30 days (default 30)
@@ -649,6 +684,8 @@ Hosted Shapewall (docs/hosted.md)
649
684
  --usercontent-domain HOST live HTML on its own domain; --email (TLS); --dir (./shapewall-hosted)
650
685
  --source DIR a Shapewall checkout to build from; --dry-run; --force; --start (build, start, setup link)
651
686
  hosted admin list|suspend|resume|delete|export|reports|retention|log the operator's commands
687
+ hosted admin members|invites|projects|passkeys ... who is in a workspace and how people sign in, from the
688
+ server's own machine (shapewall hosted admin help lists them)
652
689
  hosted backup --to DIR [--keep-days N] a consistent copy while the server runs
653
690
  hosted restore --from BACKUP --data NEW | --from BACKUP --check (the restore drill)
654
691
 
package/THIRD_PARTY.md CHANGED
@@ -9,6 +9,21 @@ Shapewall is Apache 2.0 (with `src/hosted` under FSL 1.1, see `NOTICE`). This fi
9
9
  the built board (`dist/client`, and the public demo) beyond the usual npm dependencies, or that the board downloads at run time. Each
10
10
  component keeps its own license; none of them is GPL or LGPL.
11
11
 
12
+ ## Charts and the data grid of the console (`client/src/console/usage`, built as `dist/console/assets/usage-*`)
13
+
14
+ Loaded only when the console's Usage or Activity page opens. Bundled into those chunks; none of it is in the board.
15
+
16
+ | Component | What it is | License |
17
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ------------------------- |
18
+ | [Recharts](https://github.com/recharts/recharts) 3.10 | The charts | MIT |
19
+ | Recharts' dependencies: victory-vendor (d3-shape, d3-scale, d3-array, d3-time, d3-format, d3-interpolate ...) | Scales, shapes and number formats | MIT, ISC and BSD-3-Clause |
20
+ | Recharts' dependencies: Redux Toolkit, Redux, React Redux, Reselect, Immer, es-toolkit, decimal.js-light, eventemitter3, tiny-invariant, use-sync-external-store | Chart state and helpers | MIT |
21
+ | [TanStack Table](https://github.com/TanStack/table) 9.3 (with TanStack Store) | The grid's column model | MIT |
22
+ | [TanStack Virtual](https://github.com/TanStack/virtual) 3.14 | Virtual rows | MIT |
23
+ | [TanStack Query](https://github.com/TanStack/query) 5.107 | Fetching and caching for the two pages | MIT |
24
+ | [react-grid-layout](https://github.com/react-grid-layout/react-grid-layout) 2.3 | Drag, resize and placement of the Usage dashboard's widgets | MIT |
25
+ | react-grid-layout's dependencies: react-draggable, react-resizable, prop-types, clsx, fast-equals | Pointer and touch handling for it | MIT |
26
+
12
27
  ## Natural read-aloud voices (`client/src/chat/tts`, built as `assets/tts-*`)
13
28
 
14
29
  Loaded only when someone turns natural voices on (docs/agents.md, "Natural voices"). Everything runs in the browser.