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
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -7,9 +7,10 @@ Shapewall has two shapes. Pick by who needs the board and when, not by how big t
7
7
  | One person, reviewing your own project | `npx shapewall serve` in the project, next to its dev server | You, on this machine | No: start it when you work |
8
8
  | One person, also on your phone or second laptop | `npx shapewall serve --tailscale` | Your own devices on your tailnet | No |
9
9
  | A team, or you and your agents around the clock | `shapewall hosted --tailscale` on a machine that stays on | Everyone you invite, on your tailnet | Yes |
10
+ | The same, with no passkeys to set up | `shapewall hosted --tailscale --tailnet-sign-in` | Tailnet users you invite by login | Yes |
10
11
  | A team with people outside your tailnet | `shapewall hosted` behind your own domain | Everyone you invite, from anywhere | Yes |
11
12
 
12
- The first two are the same local board. The last two are the same hosted server, reached two ways. Nothing about a project changes
13
+ The first two are the same local board. The others are the same hosted server, reached in different ways. Nothing about a project changes
13
14
  when you move between them: the config, the captures and the comments are the same files.
14
15
 
15
16
  ## The local board
@@ -46,6 +47,86 @@ and sign-in stay private. When people outside your tailnet need accounts, put th
46
47
  `shapewall hosted --setup --domain app.example.com` writes a Docker Compose and Caddy folder for that
47
48
  ([Own domain deployment](hosted.md#own-domain-deployment-mode-2)).
48
49
 
50
+ ### How people sign in
51
+
52
+ | How you reach it | Sign-in |
53
+ | ---------------------------- | ------------------------------------------------------------------------------------------ |
54
+ | Local board | None. It is yours, on your machine |
55
+ | Over an SSH tunnel | A local board: none, as if you sat at that machine. A hosted server: a passkey each |
56
+ | Tailnet, `--tailnet-sign-in` | Your Tailscale account, on every tailnet device of yours. No passkey. An admin invites you |
57
+ | Own domain | A passkey each |
58
+
59
+ On the hosted server, being signed in with the right role is enough for everything in a workspace. A few things always ask
60
+ (deleting an account or a workspace, changing owners): for a passkey where passkeys are the sign-in, and for a typed name on
61
+ a tailnet sign-in server, where Tailscale is the only sign-in and the tailnet is the trust boundary (anything running as you
62
+ on one of your tailnet devices can act as you; lock your devices and keep the tailnet to people and machines you trust). A
63
+ tailnet server can also allow passkeys (`--tailnet-passkeys`). Details: [Signing in](hosted.md#signing-in).
64
+
65
+ ### Over SSH
66
+
67
+ No Tailscale? Tunnel one port over SSH.
68
+
69
+ ```sh
70
+ shapewall hosted --data ./hosted-data --port 4700 --origin http://shapewall.localhost:4700 # on the server; loopback, no TLS
71
+ ssh -L 4700:127.0.0.1:4700 you@server # on your machine
72
+ # then open http://shapewall.localhost:4700
73
+ ```
74
+
75
+ A hosted server reached this way uses passkey accounts. `shapewall.localhost` is a name browsers send to your own machine and
76
+ treat as a secure context, so passkeys work, and it keeps the server's cookies to itself; plain `http://localhost:4700` works
77
+ too, but there the session cookie is also sent to any other web server on your machine's localhost. Everyone who tunnels in
78
+ shares `127.0.0.1` for rate limits and in the audit log. A local board reached this way (`shapewall serve` on the remote
79
+ machine, the same kind of tunnel) sees you as the person at that machine: no sign-in, and so not something to tunnel for
80
+ other people. More: [Over SSH](hosted.md#over-ssh).
81
+
82
+ With tailnet sign-in the server believes Tailscale's identity headers only on requests that provably came through the serve
83
+ entry it made (a secret path, a connection owned by tailscaled, tailscaled's own whois), never on direct loopback requests,
84
+ raw forwards or Funnel traffic, never for a request from the server's own machine (use a passkey or another device there),
85
+ and each tailnet login is its own account: being on the tailnet alone puts nobody in a
86
+ workspace. It needs Linux, Tailscale 1.98 or newer in its normal (TUN) mode, and a server that is not in a container. A
87
+ tailnet identity is per device, not per person: anything running as you on a tailnet device of yours can act as you there.
88
+ See [Tailnet sign-in](hosted.md#tailnet-sign-in).
89
+
90
+ ### From your coding agent
91
+
92
+ On a server with tailnet sign-in, a terminal or a coding agent on a tailnet machine needs no browser: the server knows the
93
+ machine's tailnet user.
94
+
95
+ An owner, from nothing to a first project. On the machine that runs the server (the data folder is the proof; `--login`
96
+ says whose server it is):
97
+
98
+ ```sh
99
+ shapewall hosted --data ./hosted-data --tailscale --tailnet-sign-in &
100
+ shapewall hosted claim --data ./hosted-data --login ada@example.com --workspace-name "Team" # no browser
101
+ ```
102
+
103
+ Then on another tailnet device of the owner's (the server's own machine is never signed in by its tailnet identity):
104
+
105
+ ```sh
106
+ shapewall admin projects create "My site" --remote https://board.example.ts.net
107
+ shapewall login --remote https://board.example.ts.net # no code, no browser
108
+ shapewall capture && shapewall push --remote https://board.example.ts.net
109
+ shapewall admin invites create --login ben@example.com --role admin --remote https://board.example.ts.net
110
+ ```
111
+
112
+ Needs a browser: nothing now. Later, adding a passkey, for the few things that always ask for one (a first passkey can confirm
113
+ them 24 hours after it is added, so add it early).
114
+
115
+ A member, on their own tailnet machine, after an admin invited their login:
116
+
117
+ ```sh
118
+ shapewall join --remote https://board.example.ts.net # takes the invite; the role is the invite's
119
+ shapewall agent connect --remote https://board.example.ts.net --project my-site --name "Builder"
120
+ ```
121
+
122
+ Needs a browser: nothing for an admin, unless the workspace switched on "Approve command line logins in the browser" (then the
123
+ code, the browser and a passkey). A member or viewer may not connect a machine by themselves: `agent connect` shows a code
124
+ for an admin to approve, as on any server.
125
+
126
+ On a server without tailnet sign-in these commands change nothing: `login` and `agent connect` use the code and the browser,
127
+ `join` says an account needs a passkey (made in the browser), and `admin` points at the console. The rules, and every refusal:
128
+ [From your coding agent](hosted.md#from-your-coding-agent).
129
+
49
130
  ### Where the work happens
50
131
 
51
132
  The hosted server never captures a page and never edits code. Those happen on a machine that has the project:
@@ -56,6 +137,11 @@ The hosted server never captures a page and never edits code. Those happen on a
56
137
  shapewall capture -> shapewall push -> stores the board, shows it to everyone
57
138
  agent fixes the code <- shapewall watch <- a comment someone left
58
139
  recapture, push, reply -> the thread shows the fix
140
+ agent reads the code <- shapewall agent connect <- a question in the board's chat
141
+ the answer, as it is written -> everyone with the thread open sees it
142
+ agent edits a fresh copy <- agent connect --approvals <- "Fix with Builder" on a comment
143
+ each edit, as a diff -> a person allows or denies it on the board
144
+ a new branch, a pull request -> the thread shows where the fix is
59
145
  ```
60
146
 
61
147
  1. **Sign the machine in once.** `shapewall login --remote https://your-server` shows a code; approve it in the console and choose the
@@ -67,14 +153,44 @@ The hosted server never captures a page and never edits code. Those happen on a
67
153
  code; a wrapper around it recaptures, pushes and replies. [Agent recipes](agent-recipes.md) has commands for Claude Code, Codex and
68
154
  goose.
69
155
 
70
- While the watching machine is off, comments still save on the server and wait. Nothing is lost; nothing is fixed until it is back.
156
+ 4. **Chat with your coding agent on the board (optional).** `shapewall agent connect --remote https://your-server`, run in the
157
+ project's folder, connects that machine's Claude Code. An admin approves it in the console (a name, an icon, who may use it),
158
+ and members then ask it questions from the board's Agents panel. By default it reads the project and answers; it does not
159
+ change files or run commands from the board. Codex, goose and Gemini CLI are not offered by `agent connect` in this
160
+ release: for them, `watch` is the way. Leave it running, or run it as a service.
161
+ [Connected agents](hosted.md#connected-agents) has the details.
162
+
163
+ 5. **Let it make fixes from the board (optional).** Edits are switched on only on the machine that has the code:
164
+ `shapewall agent connect --remote https://your-server --approvals owner`. **Fix with Builder** on a comment then starts a fix
165
+ there. The work happens on that machine, never on the server and never in the checked-out tree: the agent edits a fresh copy
166
+ of the base commit in a folder outside the project, each edit shows on the board as a card with the full diff that you allow
167
+ or deny, and Shapewall commits what was allowed on a new branch (`shapewall/comment-<n>-...`). The branch is pushed and a pull
168
+ request is opened when that machine has the remote and GitHub connect; otherwise the thread names the branch. A connected
169
+ Claude Code runs no commands from the board, so a fix is not built, tested or recaptured for you: `watch --exec` stays the way
170
+ for that. [Edits from the board](hosted.md#edits-from-the-board-the-trust-decision) has the details.
171
+
172
+ Each machine that watches or connects is an **agent** of the project, with a name. The board lists them in its Agent panel ("Builder: online",
173
+ "Fixer: offline, last seen 2 hours ago") and **Send to agent** on a comment names the one it goes to: the project's default agent on
174
+ the button, the others and **Any agent** in its menu. In the console, **Agents** is where an admin names each one, gives it an icon,
175
+ picks the default and says who may send it work: a new agent only takes comments from the person who connected it, until they share
176
+ it with named members or with everyone the project trusts. [Agents on a hosted board](hosted.md#agents-on-a-hosted-board) has the
177
+ whole of it.
178
+
179
+ While a watching machine is off, comments still save on the server and wait: a comment sent to that agent says "Waiting for Builder
180
+ (offline ...)" with **Let any agent take it**. Nothing is lost; nothing is fixed until an agent is back. Chat does not wait: a
181
+ connected agent that is offline says so, and takes no message until it is back. A fix cannot be asked of an offline agent either.
71
182
 
72
183
  ### One machine, several projects
73
184
 
74
185
  `shapewall login` remembers one project for each server. For a second project on the same server, make a token on that project's page
75
186
  in the console, keep it in a file only you can read, and pass it: `--token-file ~/.config/shapewall/other-project.token` (or
76
187
  `SHAPEWALL_TOKEN`). A watcher that runs as a service should use a token file of its own, so a later `login` cannot change what it
77
- talks to.
188
+ talks to. Each token is its own agent on its project's board, so one machine can be "Builder" in one project and "Docs bot" in
189
+ another; the workspace's **Agents** page lists them all.
190
+
191
+ `shapewall agent connect` keeps a token of its own for each server, apart from the login, and serves the project whose folder it
192
+ runs in. For a second project on the same server, run it in that project's folder with `--as NAME` (its own approval, its own token).
193
+ One process holds an agent's link: a second `agent connect` on the same token is refused, unless it is started with `--takeover`.
78
194
 
79
195
  ## Which one should I start with?
80
196
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shapewall",
3
- "version": "0.3.3",
3
+ "version": "0.7.0",
4
4
  "description": "Every page of your site on one zoomable wall: desktop and phone captures, sandboxed live HTML, and element-anchored comments your coding agent can read.",
5
5
  "license": "Apache-2.0 AND FSL-1.1-ALv2",
6
6
  "author": "Dan Baruch",
@@ -114,6 +114,9 @@
114
114
  "devDependencies": {
115
115
  "@eslint/js": "^10.0.1",
116
116
  "@tailwindcss/vite": "^4.3.4",
117
+ "@tanstack/react-query": "5.107.1",
118
+ "@tanstack/react-table": "9.3.1",
119
+ "@tanstack/react-virtual": "3.14.26",
117
120
  "@titan-design/speech-g2p": "0.0.0",
118
121
  "@vitejs/plugin-react": "^6.2.1",
119
122
  "@xyflow/react": "^12.12.1",
@@ -129,6 +132,8 @@
129
132
  "radix-ui": "^1.8.1",
130
133
  "react": "^19.3.1",
131
134
  "react-dom": "^19.3.1",
135
+ "react-grid-layout": "2.3.0",
136
+ "recharts": "3.10.1",
132
137
  "tailwind-merge": "^3.7.0",
133
138
  "tailwindcss": "^4.3.4",
134
139
  "vite": "^8.3.5"