viewable-one 0.12.1 → 0.12.3

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 (71) hide show
  1. package/CHANGELOG.md +71 -1
  2. package/README.md +31 -48
  3. package/SPAWN.md +136 -79
  4. package/glytch.mjs +41 -10
  5. package/lib/acp.mjs +152 -150
  6. package/lib/admission.mjs +25 -5
  7. package/lib/agent-selection.mjs +5 -4
  8. package/lib/agents.mjs +68 -24
  9. package/lib/answerTag.mjs +47 -0
  10. package/lib/atomic.mjs +1 -16
  11. package/lib/auth.mjs +172 -52
  12. package/lib/authenticatedHttp.mjs +10 -3
  13. package/lib/boardside.mjs +28 -12
  14. package/lib/child.mjs +129 -116
  15. package/lib/claudeModels.mjs +168 -0
  16. package/lib/codex-rpc.mjs +2 -2
  17. package/lib/codex.mjs +50 -50
  18. package/lib/codexApps.mjs +17 -3
  19. package/lib/codexToolInputs.mjs +98 -22
  20. package/lib/codingChecks.mjs +8 -4
  21. package/lib/conversationRules.mjs +47 -7
  22. package/lib/detect.mjs +39 -24
  23. package/lib/devserver.mjs +30 -19
  24. package/lib/doctor.mjs +10 -8
  25. package/lib/folderReads.mjs +96 -0
  26. package/lib/followUps.mjs +170 -0
  27. package/lib/hosted.mjs +13 -4
  28. package/lib/init-connect.mjs +29 -10
  29. package/lib/lateResume.mjs +135 -0
  30. package/lib/logindaemon.mjs +129 -49
  31. package/lib/logs.mjs +2 -2
  32. package/lib/mcpjson.mjs +35 -2
  33. package/lib/memberPreview.mjs +22 -14
  34. package/lib/multiwatch.mjs +28 -41
  35. package/lib/pagePictures.mjs +15 -12
  36. package/lib/pageRoutes.mjs +5 -2
  37. package/lib/paths.mjs +3 -3
  38. package/lib/permissionAsk.mjs +344 -61
  39. package/lib/previewGateway.mjs +4 -3
  40. package/lib/procs.mjs +73 -2
  41. package/lib/refusal.mjs +0 -2
  42. package/lib/registry.mjs +7 -7
  43. package/lib/repomap.mjs +4 -3
  44. package/lib/restartPass.mjs +39 -11
  45. package/lib/rowsAnswers.mjs +52 -69
  46. package/lib/rowsEvents.mjs +20 -2
  47. package/lib/runner-health.mjs +29 -5
  48. package/lib/runner.mjs +161 -1347
  49. package/lib/runnerAdmission.mjs +6 -12
  50. package/lib/runnerApi.mjs +20 -11
  51. package/lib/runnerBeat.mjs +384 -0
  52. package/lib/runnerCompletion.mjs +5 -2
  53. package/lib/runnerExecute.mjs +227 -0
  54. package/lib/runnerGates.mjs +338 -0
  55. package/lib/runnerLaunch.mjs +351 -0
  56. package/lib/runnerLease.mjs +31 -9
  57. package/lib/runnerOps.mjs +217 -0
  58. package/lib/runnerPace.mjs +10 -6
  59. package/lib/runnerRecovery.mjs +457 -0
  60. package/lib/runnerRegister.mjs +29 -8
  61. package/lib/runnerSettlement.mjs +43 -16
  62. package/lib/runnerWorkspace.mjs +19 -4
  63. package/lib/spawn.mjs +0 -5
  64. package/lib/sync.mjs +28 -16
  65. package/lib/uninstall-project.mjs +12 -11
  66. package/lib/uninstall.mjs +32 -25
  67. package/lib/update.mjs +4 -4
  68. package/lib/{glytchFolder.mjs → viewableFolder.mjs} +22 -16
  69. package/lib/worktree.mjs +83 -26
  70. package/lib/writePolicy.mjs +90 -10
  71. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- `glytch`. Dates are the publish date, newest first.
3
+ `viewable-one`. Dates are the publish date, newest first.
4
4
 
5
5
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and the versions follow [semver](https://semver.org/spec/v2.0.0.html). For
@@ -13,14 +13,84 @@ package.
13
13
 
14
14
  ## [Unreleased]
15
15
 
16
+ ## [0.12.3] - 2026-11-09
17
+
18
+ ### Fixed
19
+
20
+ - On Windows, signing in opens the browser with the whole link. It used to go
21
+ through `cmd`, which cut the link at the first `&` (so the sign-in page had
22
+ no client id) and could run text after it as commands. The link now goes to
23
+ the browser as one argument with no shell, and only `http` and `https` links
24
+ are opened.
25
+ - Pressing Ctrl-C on `viewable runner watch` stops it at once on a Mac whose
26
+ file-event service has stopped answering. It used to hang forever, waiting
27
+ for that service while closing its watch on the registry folder. The
28
+ registry file is now checked for changes about once a second instead.
29
+
30
+ ### Added
31
+
32
+ - A shell command's ask in the idea offers "Allow for this run": one tap
33
+ allows the command and every later command of the same run without asking.
34
+ Nothing is written to the folder's saved permissions, so the next run asks
35
+ again, and Stop and the wall clock still end the run. A task that drives a
36
+ Mac app step by step sent eleven slightly different commands, and "Always
37
+ allow" (that exact command only) never covered the next one (#4105, #4106).
38
+
39
+ ### Fixed
40
+
41
+ - `viewable init` and `viewable doctor` no longer tell a logged-out Claude
42
+ Code to "run `claude` once and log in", and init's Codex line no longer
43
+ says "from a terminal". They name the verb the pasting agent runs itself
44
+ (`claude auth login`, `codex mcp login viewable`), so a person connecting
45
+ through the setup prompt is never sent to a terminal to type a command
46
+ (#4205).
47
+
48
+ - A run is told to leave progress to its plan and session log, to treat its
49
+ closing message as the one reply, and to put the answer itself on anything
50
+ it adds to the board, never a note saying where it is. This is wording only:
51
+ nothing yet stops a run that ignores it from posting step messages (#4093).
52
+ - A shell command's ask is titled with the agent's own words ("Can I clear
53
+ Calculator with Escape, type 12 x 34, copy the result?"), never the command cut off
54
+ with "...", and its Always button says what it saves: "Always allow this
55
+ command in <folder>" for anything off the short safe list. Version 0.12.2
56
+ still showed "Can I run <command> in <folder>?" and "Always allow in
57
+ <folder>" (#3609, #3683, #3726, #4102, #4103).
58
+ - A Claude Code run for an agent that keeps an OpenRouter model id such as
59
+ `anthropic/claude-haiku-5.5` passes the model's short name (`haiku`) to
60
+ `--model`, because Claude Code refuses the OpenRouter id. Other ids pass
61
+ through unchanged (#3869). The fix reaches people with the next bridge
62
+ release.
63
+ ## [0.12.2] - 2026-10-30
64
+
65
+ ### Changed
66
+
67
+ - Use Viewable for internal and outbound names, retaining old project settings, preview access, credentials and working folders (#2329).
68
+ - A late answer to a finished run's question continues that run: Claude Code
69
+ and Codex resume the same session in the same separate copy instead of
70
+ starting the idea again. When the session or its copy is gone, the run
71
+ fails with "Run again to start a new session" instead of silently starting
72
+ fresh (#2446, #2447).
73
+
74
+ ### Fixed
75
+
76
+ - Uninstall confirms that a personal board key no longer works before saying
77
+ "revoked". Refused or unconfirmed revocation keeps the key file for retry
78
+ (#2945). Requires the matching hosted revocation update.
79
+ - Preview finds the newest server record whether it was written as
80
+ `.viewable-server.json` or `.glytch-server.json`, so a resumed session's
81
+ newer record wins (#2329).
16
82
  ## [0.12.1] - 2026-10-25
17
83
 
84
+ ### Changed
85
+
18
86
  - Install Viewable with `npm install -g viewable-one` and use `viewable`. The old `glytch` command, settings and sign-in keep working.
87
+ - Interrupted Claude Code and Codex runs carry on in the same conversation and separate copy when the computer returns.
19
88
 
20
89
  ### Fixed
21
90
 
22
91
  - `glytch update` finds Homebrew's Volta even when Homebrew is absent from
23
92
  PATH, and accepts a symlinked Volta bin directory (#727).
93
+
24
94
  ## [0.12.0] - 2026-10-17
25
95
 
26
96
  ### Changed
package/README.md CHANGED
@@ -14,7 +14,7 @@ are served from the hosted endpoint, and a run is a row your runner claims,
14
14
  so both work the same whether or not the app is open.
15
15
 
16
16
  Linking a folder is for the project files - the file tree, documents,
17
- briefs on disk. `.glytch/` inside the project holds only the saved agent
17
+ briefs on disk. `.viewable/` inside the project holds the saved agent
18
18
  selection, image staging and a repo-map cache: this machine's own scratch,
19
19
  never the board.
20
20
 
@@ -23,7 +23,7 @@ never the board.
23
23
  You need Node.js 22 or newer and Chrome or Edge for the board's folder link.
24
24
 
25
25
  1. Install the coding agents you want to use - Claude Code, Codex, opencode.
26
- 2. `npm install -g viewable-one@latest` (Windows PowerShell: `npm.cmd i -g viewable-one@latest`).
26
+ 2. `npm install -g viewable-one@latest --force` (Windows PowerShell: `npm.cmd i -g viewable-one@latest --force`).
27
27
  Never use sudo. If npm reports a permissions error, use a user-owned prefix.
28
28
  Persist its bin directory in your shell startup configuration or Windows user
29
29
  PATH. Open a new normal terminal and check `viewable -v` (`viewable.cmd -v`
@@ -65,7 +65,7 @@ folder or a shortcut to it.
65
65
  ## Uninstall
66
66
 
67
67
  `viewable uninstall` is the one command: it disconnects every project this
68
- machine has registered (agent sign-outs, config entries, `.glytch/agents.json`,
68
+ machine has registered (agent sign-outs, config entries, `.viewable/agents.json`,
69
69
  each folder's registry entry), stops the login daemon and removes its file,
70
70
  revokes this machine's board sign-in and forgets the credential, and deletes
71
71
  `~/.viewable` entirely. It confirms once - the plan is printed and it asks you
@@ -124,7 +124,7 @@ chosen separately on the board.
124
124
 
125
125
  `viewable init`:
126
126
 
127
- - Saves the selection in `.glytch/agents.json` in the project.
127
+ - Saves the selection in `.viewable/agents.json` in the project.
128
128
  - Registers the project in `~/.glytch/folders.json`.
129
129
  - Adds the board's hosted URL (`https://app.viewable.one/mcp`) to each
130
130
  selected agent's project configuration.
@@ -142,7 +142,7 @@ overwritten. Codex inline tables such as `mcp_servers = {...}` may need to be
142
142
  converted to TOML sections before adding a new board entry.
143
143
 
144
144
  One exception to "preserved": an entry written by an older version of this
145
- package is recognised as its own and upgraded in place on the next `glytch
145
+ package is recognised as its own and upgraded in place on the next `viewable
146
146
  init` or `viewable doctor`. That covers both shapes it could be in - an entry
147
147
  that spawns a local command, which is rewritten to the hosted URL because no
148
148
  such server runs any more, and an entry keyed `board` already sitting at
@@ -259,7 +259,7 @@ open](#reading-the-board-with-no-app-open).
259
259
  | --- | --- |
260
260
  | `get_board(board_id?, tag?, group?, kind?, since_days?, match?, limit?, view?, geometry?, detail?)` | The board as a readable digest: ids, one line per idea, groups, edges, question state, open flags, ages. Slim by default. The filters narrow it, and the reply always says what it left out. `view:"full"` returns everything, `geometry:true` adds positions and sizes. |
261
261
  | `get_node(id)` | One node in full from the graph mirror, with its incoming and outgoing edges. Images attached to the idea come back as image blocks to look at, each labelled with the node and field it came from. An image the mirror does not hold is named as unavailable rather than quietly left out. |
262
- | `get_library()` | The component library a DRAWN idea is written against, generated from the same registry the app renders with: every tag, its attributes, which are required, a working example, and the rules a drawing must keep. Read it once before passing `snippet` on `addIdea` or `addTextNote`. About 2k tokens, so once per session, not once per drawing. |
262
+ | `get_library()` | The component library a DRAWN idea is written against, generated from the same registry the app renders with: every tag, its attributes, which are required, a working example, and the rules a drawing must keep. Read it once before passing `snippet` on `addIdea`. About 2k tokens, so once per session, not once per drawing. |
263
263
  | `propose(ops[], label?)` | Sends board change requests and returns its op id. Every create, edit and delete lands as a proposal you accept or reject. |
264
264
  | `ask_user(question, why, options?, from_id?)` | Adds a question to an idea's conversation and returns at once; the answer comes back through `check_answer` or `collect_session`. `why` is required: it is shown under the question and is the context that travels with it. With no `from_id` the question goes on the idea the run belongs to. |
265
265
  | `check_answer(question_id, wait_s?)` | Where an earlier question stands: answered with the decision, still open, dismissed, or not yet ingested. With `wait_s` (up to 50) it waits that long for the answer and returns as soon as it lands; an agent that cannot go on without the answer keeps calling it until it is answered or dismissed. |
@@ -300,7 +300,7 @@ to authenticate with:
300
300
  it). This is the OAuth flow claude.ai's own connector uses
301
301
  (`supabase/functions/board-oauth`), driven from a terminal instead of a
302
302
  phone. `viewable logout` forgets it.
303
- 2. **`GLYTCH_BOARD_TOKEN`**, for a script that would rather not open a
303
+ 2. **`VIEWABLE_BOARD_TOKEN`**, for a script that would rather not open a
304
304
  browser: a personal access token minted in Viewable (**Settings,
305
305
  Connection, Access tokens** - it starts with `pmb_`, shown once). It wins
306
306
  outright over a `viewable login` credential and needs no file.
@@ -349,7 +349,7 @@ comments coming back", for the full mechanism and its one known gap.
349
349
 
350
350
  `report` takes three lists, and each lands differently:
351
351
 
352
- - **`did[]`** goes to the board's own Viewable Agent, which reads the board and
352
+ - **`did[]`** goes to the board's own Board Agent, which reads the board and
353
353
  places it: an item about an idea that already exists becomes an edit or a
354
354
  tag on it, and the rest land as ideas beside their relatives, all as
355
355
  proposals you rule on. The result names each idea and where it went, so
@@ -510,7 +510,7 @@ it: a session that never calls it has told the board nothing.
510
510
  | `viewable stop` | Stop the login daemon. The file it runs from stays on disk, so `viewable init` brings it back without a reinstall. |
511
511
  | `viewable uninstall` | Every registered project, the login daemon, this machine's board sign-in, and `~/.viewable` - one command. Confirms once; `--project`, `--keep-login`, `--dry-run` and `--yes` narrow or skip pieces of it. |
512
512
  | `viewable runner ...` | The spawn runner. `watch` with no `PM_BOARD_ROOT` watches every registered folder; with it set, it watches that one. |
513
- | `glytch mcp` | Retired. Prints one line pointing at `viewable init` and `viewable login`, and exits 1. There is no local board MCP server to start. |
513
+ | `viewable mcp` | Retired. Prints one line pointing at `viewable init` and `viewable login`, and exits 1. There is no local board MCP server to start. |
514
514
  | `viewable --version` | The installed version. |
515
515
 
516
516
  `pm-spawn-runner` is installed as an alias of `viewable runner`, so anything
@@ -546,13 +546,13 @@ new process reporting that version before claiming success. Folders, sign-in
546
546
  and agent configuration are kept; it does not run init or an agent session.
547
547
 
548
548
  What changed in each version is on the
549
- [release notes](https://glytch.ai/release-notes) page. To check an update
549
+ [release notes](https://viewable.one/release-notes) page. To check an update
550
550
  worked, open Settings in the app: each connected computer shows the version it
551
551
  runs.
552
552
 
553
553
  Older versions (including 0.11.0) have no update command. If `viewable` is missing
554
- or update is unrecognized, first install with `npm i -g viewable@latest` (Windows:
555
- `npm.cmd i -g viewable-one@latest`), make the bin directory persistent as above, and
554
+ or update is unrecognized, first install with `npm i -g viewable-one@latest --force` (Windows:
555
+ `npm.cmd i -g viewable-one@latest --force`), make the bin directory persistent as above, and
556
556
  verify `viewable -v` in a new terminal. Then use `viewable update` once a published
557
557
  version supports it. This repository change does not publish that version.
558
558
 
@@ -576,11 +576,11 @@ and that attempt's heartbeat completes the setup screen. Local `cli.json` and
576
576
  - `~/.glytch/folders.json`, the registry of folders the daemon watches, and
577
577
  `~/.glytch/logs/runner.log`, rotated at 5 MB with three kept. `GLYTCH_HOME`
578
578
  moves both, and the daemon file with them.
579
- - `.glytch/agents.json`, the project's saved coding-agent selection.
579
+ - `.viewable/agents.json`, the project's saved coding-agent selection.
580
580
  - The selected agents' project configs, from the setup table above.
581
581
  - The login daemon's own file for your platform, from the table above.
582
582
  `GLYTCH_NO_DAEMON_INSTALL=1` writes it and registers nothing.
583
- - `.glytch/images/<id>/` in the linked folder, where an image on its way to a
583
+ - `.viewable/images/<id>/` in the linked folder, where an image on its way to a
584
584
  run is staged, and the repo-map cache beside it. Both are this machine's own
585
585
  scratch. Nothing in this package writes a board file: every board write and
586
586
  every run is a row, reached over the hosted endpoint.
@@ -621,7 +621,7 @@ Common failures, and what the row says:
621
621
  | `daemon loaded not loaded` | The OS does not have `ai.glytch.runner`. Run `viewable init` from this project folder. |
622
622
  | `daemon loaded no systemd here` | An older WSL with no `systemctl --user`. Run `PM_SPAWN_RUNNER=on viewable runner watch` instead. |
623
623
  | `coding agents none` | "no coding agent on PATH - install Claude Code, opencode or Codex". |
624
- | `Claude Code login logged out` | "run `claude` once and log in, or sessions fail at spawn". |
624
+ | `Claude Code login logged out` | "run `claude auth login` to sign in, or sessions fail at spawn". |
625
625
  | `git missing` (a warning) | "no git - sessions run unisolated in the linked folder, with no worktree of their own". On Windows the row adds that Claude Code's Bash tool needs Git for Windows. |
626
626
  | `.mcp.json unreadable` | The file exists and is not JSON glytch can extend. It is your work, so nothing was written: add the `viewable` server by hand. |
627
627
  | `version unknown` | npm did not answer. Being offline is not a broken install. |
@@ -650,40 +650,22 @@ is not. The board tools are served from the hosted endpoint and ship on their
650
650
  own schedule, not with this package. [CHANGELOG.md](./CHANGELOG.md) is the
651
651
  record, written by hand from the commit bodies.
652
652
 
653
- One workflow publishes, **release glytch**, and it has two ways in.
653
+ One workflow publishes, **release viewable**, through
654
+ `.github/workflows/release-glytch.yml`. Its filename and candidate/tag names
655
+ stay compatible with already prepared release candidates.
654
656
 
655
- The usual one is the Actions tab, Run workflow, and a `patch`, `minor` or
656
- `major` bump. It installs dependencies, runs tests, updates
657
- `bridge/package.json` and `bridge/package-lock.json`, rotates the changelog's
658
- `## [Unreleased]` section into a dated version, commits, tags
659
- `glytch-v<version>`, pushes and publishes, so pull afterwards. The bump is
660
- refused when nothing sits under `## [Unreleased]`: a version with no changelog
661
- entry is a release nobody can read. `scripts/release-glytch.mjs` with a bump
662
- prepares that same commit locally.
657
+ Run the workflow on main with `phase=prepare` and a version bump to pack the
658
+ unpublished artifact once. Test those exact bytes on an isolated runner through
659
+ the hosted app, including OAuth discovery, visible approval and a successful
660
+ read. Record acceptance against that candidate, then run `phase=publish` with
661
+ its run ID and the acceptance comment URL. The workflow verifies the receipt
662
+ and publishes the accepted bytes. It opens a metadata branch rather than
663
+ pushing main. Tag pushes do not publish. See
664
+ [the release workflow](../docs/development-workflow.md#integrate-and-release).
663
665
 
664
- The other is a tag, for a version already written into `package.json` and
665
- already dated in the changelog - there is nothing left to bump, so pushing the
666
- tag is the whole release:
667
-
668
- ```bash
669
- git tag -a glytch-v0.8.0 -m "glytch v0.8.0"
670
- git push origin glytch-v0.8.0
671
- ```
672
-
673
- The prefix changed on 2026-09-14 when the release path took the package's
674
- name. Tags cut before then carry the old prefix; the workflow no longer
675
- answers to them, and they stay in the history as they were cut.
676
-
677
- It checks the tag against `package.json` before it publishes, because a tag
678
- pushed by hand can disagree with the file and a publish is the wrong place to
679
- find that out.
680
-
681
- Neither path needs an npm token. Publishing is over OIDC trusted publishing,
682
- switched on once by hand on npmjs.com under the package's Publishing access.
683
-
684
- Nothing publishes on a bridge commit. This package is what a stranger
685
- installs, the runner spends that stranger's subscription, and a publish cannot
686
- be taken back.
666
+ `scripts/release-viewable.mjs` prepares version and changelog changes;
667
+ `scripts/release-viewable-candidate.mjs` packs and verifies candidates.
668
+ No package is published by a local script.
687
669
 
688
670
  ### Developing against a local app
689
671
 
@@ -749,7 +731,8 @@ If you already installed `glytch` globally, run
749
731
  compatible `glytch` command). The flag lets npm replace the old command aliases.
750
732
  For a clean install, use `npm install -g viewable-one@latest`.
751
733
  The last `glytch` package forwards to `viewable-one`. Saved settings, tokens,
752
- projects and runs stay in `~/.glytch` and each project’s `.glytch` folder;
734
+ and runs stay in `~/.glytch`; old project files stay in `.glytch`, with
735
+ new agent choices and image staging written to `.viewable`;
753
736
  existing service and board connection names stay valid. No setup is lost.
754
737
  Every `VIEWABLE_*` environment variable takes precedence over its matching
755
738
  `GLYTCH_*` variable, which remains supported. New connections use