shapewall 0.2.4 → 0.3.1

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 (105) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +35 -1
  3. package/dist/agent/package-lock.json +2 -2
  4. package/dist/client/assets/BoardChat-V1BCXdDB.js +27 -0
  5. package/dist/client/assets/{BuzzDialog-CZdwIQLF.js → BuzzDialog-Ds7Thpfe.js} +1 -1
  6. package/dist/client/assets/ChecksPanel-Cm22bCdQ.js +1 -0
  7. package/dist/client/assets/History-U0bD1BjA.js +1 -0
  8. package/dist/client/assets/{LocalSettings-B5gtfKEl.js → LocalSettings-DOSuW7VC.js} +1 -1
  9. package/dist/client/assets/{Management-BxEUZAmI.js → Management-BFcKFdbp.js} +1 -1
  10. package/dist/client/assets/QuickConnect-DyfPSWbV.js +1 -0
  11. package/dist/client/assets/{ShareDialog-CdVAreaw.js → ShareDialog-BouvNraR.js} +2 -2
  12. package/dist/client/assets/{app-update-dialog-BONq9YFp.js → app-update-dialog-DH2Mgby8.js} +1 -1
  13. package/dist/client/assets/{circle-x-BmT6vHKl.js → circle-x-PRxj7kPi.js} +1 -1
  14. package/dist/client/assets/index-C9S7HL_o.js +37 -0
  15. package/dist/client/assets/index-CXtuJi1K.css +2 -0
  16. package/dist/client/assets/{refresh-cw-ugt3cWKH.js → refresh-cw-aeOBDuGQ.js} +1 -1
  17. package/dist/client/assets/{square-_KG6tM5A.js → shield-check-DuPBJ6H_.js} +1 -1
  18. package/dist/client/assets/ui-Cg4TTrec.js +41 -0
  19. package/dist/client/build-info.json +1 -1
  20. package/dist/client/index.html +3 -3
  21. package/dist/client/sw.js +2 -2
  22. package/dist/console/assets/LocalAccountsApp-lJjkhUcH.js +1 -0
  23. package/dist/console/assets/LocalConsole-BZHqYKnt.js +1 -0
  24. package/dist/console/assets/{app-update-dialog-o4QY_jL9.js → app-update-dialog-DCM9sYE3.js} +1 -1
  25. package/dist/console/assets/console-C2LsvEco.js +55 -0
  26. package/dist/console/assets/console-Fp4k9iyx.css +2 -0
  27. package/dist/console/build-info.json +1 -1
  28. package/dist/console/console.html +2 -2
  29. package/docs/agent-hardening.md +19 -0
  30. package/docs/agent-workflow.md +33 -0
  31. package/docs/agents.md +112 -0
  32. package/docs/config.md +41 -0
  33. package/docs/deployment.md +3 -0
  34. package/docs/hosted.md +10 -0
  35. package/docs/pull-requests.md +193 -0
  36. package/package.json +2 -1
  37. package/src/agent/backends/acp.js +23 -6
  38. package/src/agent/batch-fixes.js +45 -0
  39. package/src/agent/batch-queue.js +204 -0
  40. package/src/agent/branch-mode.js +753 -0
  41. package/src/agent/config.js +6 -0
  42. package/src/agent/fix-prompt.js +5 -0
  43. package/src/agent/routes.js +850 -185
  44. package/src/agent/run.js +8 -1
  45. package/src/agent/settings-routes.js +69 -1
  46. package/src/agent/starter/worktree.js +286 -29
  47. package/src/agent/threads.js +2 -7
  48. package/src/agent/tools.js +51 -0
  49. package/src/agent/user-settings.js +33 -2
  50. package/src/ci/capture.js +103 -0
  51. package/src/ci/compare.js +267 -0
  52. package/src/ci/github.js +307 -0
  53. package/src/ci/images.js +76 -0
  54. package/src/ci/settings.js +211 -0
  55. package/src/ci/start.js +148 -0
  56. package/src/ci/summary.js +262 -0
  57. package/src/ci/workflow.js +249 -0
  58. package/src/cli/args.js +24 -1
  59. package/src/cli/ci.js +229 -0
  60. package/src/cli/help.js +23 -1
  61. package/src/cli/init.js +36 -1
  62. package/src/cli.js +6 -2
  63. package/src/comment-drawing.js +161 -0
  64. package/src/comment-fields.js +51 -0
  65. package/src/comment-media.js +528 -0
  66. package/src/config.js +7 -0
  67. package/src/doctor.js +23 -0
  68. package/src/export.js +8 -0
  69. package/src/feedback.js +89 -12
  70. package/src/github.js +3 -3
  71. package/src/hosted/admin.js +36 -4
  72. package/src/hosted/app.js +5 -0
  73. package/src/hosted/board-routes.js +63 -7
  74. package/src/hosted/clean-worker.js +22 -4
  75. package/src/hosted/cleaner.js +4 -1
  76. package/src/hosted/comment-files.js +200 -0
  77. package/src/hosted/comments.js +68 -15
  78. package/src/hosted/db.js +32 -0
  79. package/src/hosted/guest-view.js +9 -0
  80. package/src/hosted/import.js +213 -18
  81. package/src/hosted/operator.js +3 -1
  82. package/src/hosted/projects.js +3 -2
  83. package/src/hosted/push.js +6 -3
  84. package/src/hosted/retention.js +18 -0
  85. package/src/hosted/tenancy.js +1 -0
  86. package/src/hosted/token-api.js +110 -9
  87. package/src/image-sniff.js +11 -0
  88. package/src/mcp.js +48 -3
  89. package/src/remote/remote-mcp.js +2 -2
  90. package/src/remote/remote.js +6 -2
  91. package/src/remote/share.js +77 -7
  92. package/src/server/app.js +18 -1
  93. package/src/store.js +119 -33
  94. package/src/watch.js +4 -0
  95. package/dist/client/assets/BoardChat-C0a3DDjv.js +0 -28
  96. package/dist/client/assets/ChecksPanel-BHWgwJWO.js +0 -1
  97. package/dist/client/assets/History-C01qLFpP.js +0 -1
  98. package/dist/client/assets/QuickConnect-BzTM3UNO.js +0 -1
  99. package/dist/client/assets/index-C1IsGdGs.js +0 -29
  100. package/dist/client/assets/index-DnsWelgZ.css +0 -2
  101. package/dist/client/assets/ui-BAGBTB_P.js +0 -41
  102. package/dist/console/assets/LocalAccountsApp-DtfTDbQg.js +0 -1
  103. package/dist/console/assets/LocalConsole-BPpsxDq_.js +0 -1
  104. package/dist/console/assets/console-DeOji9Zv.css +0 -2
  105. package/dist/console/assets/console-MvFrlUCC.js +0 -51
package/CHANGELOG.md CHANGED
@@ -3,6 +3,51 @@
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.3.1 - 2026-11-10
7
+
8
+ - Starter agent: the push of the agent's branch no longer follows settings in the repository's Git config that would run another
9
+ program. The transport is limited to https, http, ssh and local paths (no `ext::` or other remote helpers, whatever
10
+ `protocol.*.allow` says), `remote.<name>.receivepack` is ignored, and the push is never signed. Your credential helper and ssh setup
11
+ are still used: that is how the push reaches your remote.
12
+ - `shapewall init --ci` gives the comment job `contents: write` when the config has `"ci": { "images": "branch" }`, so the images
13
+ branch can be pushed. Before, the generated workflow always had `contents: read` and the comment fell back to links.
14
+
15
+ ## 0.3.0 - 2026-11-10
16
+
17
+ - Agent works on a branch: an option, off by default, that runs an ACP agent's fixes and chat turns in a copy of your checkout and
18
+ commits them on a branch of their own. The comment reads "Fix ready on branch", and the chat offers Apply to my checkout, Open
19
+ folder, Copy branch name and Discard. Apply recaptures the page with before and after; a conflict changes nothing. See
20
+ "Work on a branch" in docs/agents.md.
21
+ - The Agents page of the Workspace Console has a How fixes run card: the Work on a branch switch with its branch prefix (the same
22
+ setting as the chat's switch), and the batch fixes switch with its limit. A change to either shows in every open view.
23
+ - Batch fixes: an option, off by default, to fix several open comments one after another. In the comments panel choose Select, tick
24
+ comments (or Select all, up to the limit) and Fix N with the agent; a dialog lists them first. Each comment is an ordinary fix with
25
+ its own thread, approvals, recapture and Undo, and in branch mode its own branch. A card in the chat and a strip in the comments
26
+ panel show "Fixing 2 of 5" and each comment's state, also after a reload. The batch waits for an approval, stops on Cancel and after
27
+ two failures in a row. Set `"agent": { "batchFixes": { "enabled": true, "max": 5 } }` (at most 20) or use the Agents page. Not on
28
+ the hosted server. See "Fix several comments at once" in docs/agents.md.
29
+ - `shapewall doctor` reports agent branches left in the project.
30
+ - Capture on pull requests: `shapewall init --ci` writes a GitHub Actions workflow that captures the base branch and the pull request,
31
+ compares every page and screen size with the pixel diff, and keeps one comment on the pull request up to date ("Shapewall: 4 of 23
32
+ pages changed") with the changed share and before, after and diff images. It builds and serves both sides from `ci.start` in the
33
+ config, or captures a deploy preview URL. Pull requests from forks get the summary in the job summary instead. Turn it off by
34
+ deleting the workflow, with `"ci": { "enabled": false }`, or with `[skip shapewall]` in the title. See docs/pull-requests.md.
35
+ - New commands: `shapewall ci capture-compare`, `ci capture`, `ci comment`, `ci enabled` and `ci wait`.
36
+ - Images on comments and replies: attach up to 4 (PNG, JPEG, WebP or GIF, 5 MB each) with a button, by pasting or by dropping them.
37
+ The server checks each image by its bytes, strips its metadata and serves it only as an image; the thread shows thumbnails that open
38
+ large. The comments list shows how many a thread has.
39
+ - Drawing on the page as part of a comment or reply: boxes, arrows and pen strokes in three inks, with Undo and Clear. The drawing
40
+ shows over the page while its thread is open, and over "before" once the page is recaptured. On a phone you draw on the page in a
41
+ full-screen sheet.
42
+ - Agents get the images and a picture of the drawing on its screenshot: in `comments --json` (`files.images`, `files.markup`), the MCP
43
+ `get_comment` tool, `watch --exec` and Fix with agent.
44
+ - Hosted boards keep comment images in the database, count them against the storage quota and include them in exports and in
45
+ `shapewall share`. Share link guests can draw but not attach images.
46
+ - The demo takes images and drawings in the browser and shows example comments with an image and a drawing, one of them with a fix
47
+ ready on a branch. Its Agents page has the How fixes run card, and its scripted agent runs batch fixes.
48
+ - While you draw on a page, the collapsed sidebar's flyouts stay closed and the journey bar is hidden, so nothing covers the drawing
49
+ bar.
50
+
6
51
  ## 0.2.4 - 2026-11-10
7
52
 
8
53
  - The top bar's View button is now Views: pick a journey by name there, alongside links, compare and the minimap. An open journey
package/README.md CHANGED
@@ -222,6 +222,8 @@ To close the loop without anyone typing a command:
222
222
  - `shapewall watch --mention agent` only hands out comments that tag `@agent` (in the text or a reply), so people can talk first.
223
223
  - Its status goes `queued`, `working`, then `done` or `needs-human`; a restart or a second watcher never hands one out twice.
224
224
  - `shapewall mcp` is an MCP server with tools to list, read (with a crop of the screenshot), reply, set status, resolve and recapture.
225
+ - Comments can carry images and a drawing on the page; agents get both
226
+ ([images and drawings on comments](docs/agent-workflow.md#images-and-drawings-on-comments)).
225
227
  - With Shapewall installed in your project: `claude mcp add shapewall -- npx shapewall mcp`; Codex and other clients in
226
228
  [docs/agent-workflow.md](docs/agent-workflow.md).
227
229
 
@@ -237,6 +239,14 @@ comment text, page URL, element, screenshot link and a link back to the board. P
237
239
  `Fixes shapewall#12` (or close the comment's issue) are linked to it by `shapewall github sync` or a signed webhook, and when one merges,
238
240
  the comment resolves with the PR as its fix. Details: [docs/github.md](docs/github.md).
239
241
 
242
+ ### Capture on pull requests
243
+
244
+ `npx shapewall init --ci` writes a GitHub Actions workflow. Commit it, and every pull request gets one comment, updated on each push:
245
+ "Shapewall: 4 of 23 pages changed", with each changed page and screen size, the share of pixels that changed, and the before, after and
246
+ diff images as a workflow artifact. It builds and serves both branches (`ci.start` in the config) or captures your deploy preview, never
247
+ fails the pull request, and turns off with `"ci": { "enabled": false }` or `[skip shapewall]` in a title.
248
+ Details: [docs/pull-requests.md](docs/pull-requests.md).
249
+
240
250
  Prompts that work, the data shapes, and how to keep it safe (comments are untrusted input): [docs/agent-workflow.md](docs/agent-workflow.md).
241
251
  Copy-paste setups for Claude Code, Codex, goose, Ollama and chat bots: [docs/agent-recipes.md](docs/agent-recipes.md).
242
252
  Optional integrations: [notifications](#notifications), GitHub connect above, and a [bridge to agents in a Buzz chat](docs/buzz.md).
@@ -249,7 +259,9 @@ one-time download of about 90 MB; the text never leaves the browser). Connect an
249
259
  in `SHAPEWALL_AGENT_API_KEY` (OpenAI, DeepSeek, OpenRouter, or Ollama with no key), or an agent CLI on your machine over ACP with its
250
260
  own subscription login: `shapewall serve --agent-acp "claude-agent-acp"` (also `codex-acp`, `goose acp`, `gemini --acp`). Or skip the
251
261
  flags: open the board with `shapewall serve --open` and click **Connect** next to the agent CLI it found on your machine. Board text
252
- goes to the agent as quoted data, never as instructions. Details: [docs/agents.md](docs/agents.md).
262
+ goes to the agent as quoted data, never as instructions. Optional, on the Agents page: an agent CLI can
263
+ [work on a branch](docs/agents.md#work-on-a-branch) instead of your checkout, and
264
+ [fix several comments at once](docs/agents.md#fix-several-comments-at-once), one after another. Details: [docs/agents.md](docs/agents.md).
253
265
 
254
266
  ### The sandboxed starter agent
255
267
 
@@ -380,6 +392,8 @@ Commands
380
392
  (with --limit, --group, --exclude as for sitemap)
381
393
  --no-discover do not look for pages: write the home page only
382
394
  --force overwrite an existing config
395
+ --ci write .github/workflows/shapewall.yml (capture on every pull request) beside
396
+ the config; an existing config is kept, --force replaces only the workflow
383
397
  sitemap [URL|FILE] add the pages of a sitemap.xml (or sitemap index) to the config
384
398
  (default: the board's "sitemap" setting)
385
399
  --limit N at most N new pages, the shallowest first (default 100)
@@ -507,6 +521,26 @@ Commands
507
521
  github sync link pull requests that name a comment; resolve comments whose PR merged
508
522
  (repo: "github.repo" in the config; token: $SHAPEWALL_GITHUB_TOKEN or $GITHUB_TOKEN,
509
523
  else a signed-in GitHub CLI ("gh auth token"))
524
+ ci capture-compare capture before and after, compare every page and viewport, write a result
525
+ folder: summary.json, summary.md (the comment), images of changed shots
526
+ --base-url URL before (default: the board's baseUrl) --head-url URL after
527
+ --base-dir DIR or compare two capture folders --head-dir DIR
528
+ --out DIR the result folder (default shapewall-ci)
529
+ --threshold RATIO share of pixels below which a shot is unchanged (default ci.threshold, 0.001)
530
+ --max-pages N compare at most N pages (default ci.maxPages, 50)
531
+ --fail-on-change exit 3 when something changed (default: always 0, never fails the pull request)
532
+ ci capture --out DIR capture one side into a folder, from --url URL, or with --allow-start
533
+ --allow-start run ci.start (install, build, serve; argv arrays, no shell) in --checkout DIR
534
+ and capture its url; only inside a CI job (GITHUB_ACTIONS or CI is "true")
535
+ ci comment post or update the one pull request comment from a result folder
536
+ --dir DIR the result folder (default shapewall-ci)
537
+ --artifact-url URL link to the workflow artifact with the images
538
+ --repo OWNER/NAME | --pull N default: from the pull_request event
539
+ token: $GITHUB_TOKEN; a fork's pull request gets the job summary instead
540
+ ci enabled is it on for this pull request (ci.enabled, [skip shapewall] in the title)?
541
+ writes enabled=true|false to $GITHUB_OUTPUT
542
+ ci wait --url URL wait until a deploy preview answers [--timeout SECONDS (default 600)]
543
+ --board ID | --json (docs/pull-requests.md)
510
544
  mcp MCP server on stdio for coding agents
511
545
  --read-only | --no-capture
512
546
  notify list notification channels, their events and what each still needs [--json]
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "shapewall",
3
- "version": "0.2.4",
3
+ "version": "0.3.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "shapewall",
9
- "version": "0.2.4",
9
+ "version": "0.3.1",
10
10
  "license": "Apache-2.0 AND FSL-1.1-ALv2",
11
11
  "dependencies": {
12
12
  "@agentclientprotocol/sdk": "2.4.0",