@shardflux/cli 0.25.0 → 0.28.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 (93) hide show
  1. package/CHANGELOG.md +154 -1
  2. package/README.md +212 -36
  3. package/dist/account-commands.d.ts +2 -4
  4. package/dist/account-commands.js +2 -6
  5. package/dist/account-pool.d.ts +11 -1
  6. package/dist/account-pool.js +48 -0
  7. package/dist/agent-commands.js +4 -3
  8. package/dist/agent-git-commands.d.ts +1 -2
  9. package/dist/agent-git-commands.js +2 -21
  10. package/dist/agent-models.d.ts +31 -1
  11. package/dist/agent-models.js +27 -4
  12. package/dist/agent-setup.d.ts +4 -2
  13. package/dist/agent-setup.js +6 -4
  14. package/dist/agent-shell.d.ts +2 -0
  15. package/dist/agent-shell.js +5 -0
  16. package/dist/args.d.ts +1 -1
  17. package/dist/args.js +67 -12
  18. package/dist/board-args.js +8 -3
  19. package/dist/board-commands.d.ts +7 -3
  20. package/dist/board-commands.js +22 -12
  21. package/dist/brain-commands.d.ts +2 -0
  22. package/dist/brain-commands.js +78 -0
  23. package/dist/cli-proxy.d.ts +1 -13
  24. package/dist/cli-proxy.js +2 -27
  25. package/dist/client-settings.d.ts +2 -1
  26. package/dist/client-settings.js +14 -2
  27. package/dist/codex-cloud.d.ts +2 -0
  28. package/dist/codex-cloud.js +17 -12
  29. package/dist/commands.js +8 -0
  30. package/dist/conversation-commands.d.ts +5 -1
  31. package/dist/conversation-commands.js +58 -6
  32. package/dist/conversation-terminal.js +2 -2
  33. package/dist/desktop-linux.d.ts +12 -1
  34. package/dist/desktop-linux.js +47 -18
  35. package/dist/device-approvals.js +24 -2
  36. package/dist/device-bridge.d.ts +24 -4
  37. package/dist/device-bridge.js +181 -8
  38. package/dist/device-folders.d.ts +6 -1
  39. package/dist/device-folders.js +6 -2
  40. package/dist/device-helper.d.ts +8 -0
  41. package/dist/device-helper.js +71 -12
  42. package/dist/device-mode.d.ts +44 -0
  43. package/dist/device-mode.js +119 -0
  44. package/dist/drive-commands.d.ts +2 -2
  45. package/dist/drive-commands.js +1 -1
  46. package/dist/format.js +3 -0
  47. package/dist/forwarder-refresh.d.ts +15 -0
  48. package/dist/forwarder-refresh.js +32 -0
  49. package/dist/handler-loader.d.ts +3 -0
  50. package/dist/handler-loader.js +43 -0
  51. package/dist/handlers.js +4 -2
  52. package/dist/land.d.ts +10 -5
  53. package/dist/land.js +56 -9
  54. package/dist/linux-helper.js +1 -2
  55. package/dist/mac-app.d.ts +11 -0
  56. package/dist/mac-app.js +11 -0
  57. package/dist/machine-setup-guard.d.ts +9 -0
  58. package/dist/machine-setup-guard.js +22 -0
  59. package/dist/machine-setup.d.ts +1 -8
  60. package/dist/machine-setup.js +2 -22
  61. package/dist/main.js +19 -16
  62. package/dist/menubar.d.ts +18 -13
  63. package/dist/menubar.js +60 -50
  64. package/dist/orchestrator-args.d.ts +7 -0
  65. package/dist/orchestrator-args.js +64 -0
  66. package/dist/orchestrator-commands.d.ts +43 -0
  67. package/dist/orchestrator-commands.js +260 -0
  68. package/dist/person-scope.d.ts +20 -0
  69. package/dist/person-scope.js +61 -0
  70. package/dist/project-hub-seed.d.ts +20 -0
  71. package/dist/project-hub-seed.js +59 -0
  72. package/dist/registry.d.ts +1 -1
  73. package/dist/registry.js +2 -1
  74. package/dist/router-commands.d.ts +12 -21
  75. package/dist/router-commands.js +5 -59
  76. package/dist/startup-housekeeping.d.ts +5 -0
  77. package/dist/startup-housekeeping.js +30 -0
  78. package/dist/t3-launch.js +2 -2
  79. package/dist/t3-provider.js +4 -2
  80. package/dist/task-land-hub.py +16 -1
  81. package/dist/this-computer.d.ts +4 -2
  82. package/dist/this-computer.js +20 -2
  83. package/dist/thread-on-computer.js +2 -2
  84. package/dist/timing.js +3 -1
  85. package/dist/transcribe-commands.js +6 -2
  86. package/dist/update.js +4 -2
  87. package/dist/wait-status.d.ts +1 -1
  88. package/dist/wait-status.js +2 -0
  89. package/dist/worktree-twin-engine.d.ts +1 -1
  90. package/dist/worktree-twin-engine.js +10 -7
  91. package/dist/worktree-twin.d.ts +6 -0
  92. package/dist/worktree-twin.js +8 -1
  93. package/package.json +12 -6
package/CHANGELOG.md CHANGED
@@ -2,6 +2,158 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - The Shardflux app 0.9.2 (0.28.1+): `shard` installs and updates `@shardflux/desktop-darwin-arm64` / `-x64` and
6
+ `@shardflux/desktop-linux-x64` / `-arm64` 0.9.2 (Stop in ⌘1, organization choice at the first sign-in, Sign in after
7
+ signing out).
8
+
9
+ - Return the coding-agent setup guide without loading the account command handlers.
10
+
11
+ - Manual landing uses the result’s own ready computer or the persistent project reader, so deleting an unrelated thread does not interrupt it.
12
+
13
+ - Check T3 presence directly during startup, avoiding unrelated desktop-app probes before every command.
14
+
15
+ - Orchestrator inputs preserve long pastes, including their final instruction, without an application character cap. `shard orchestrator say` sends the full text to the API.
16
+
17
+ - Land a finished conversation in its own repository's linked folder when a project holds several repositories.
18
+ Preserve the hub's default branch when it belongs to another repository.
19
+
20
+ - Load only the selected command and skip optional setup modules when their local state is absent.
21
+
22
+
23
+ - Load interactive command surfaces on demand, keeping help/version and simple commands fast while preserving command parsing, saved-work housekeeping, setup guards and install registration.
24
+
25
+ - Codex Cloud admission (0.28.1+, SDK 0.30.1): a stopped startup/open reports its stored reason and recovery instruction immediately (`codex_admission_stopped`), instead of calling it pending or pointing only at connector status.
26
+
27
+ - Stored-file recovery (0.28.1+): workspace views show when files are saved for recovery; resume restarts the workspace from those files.
28
+
29
+ - `shard orchestrator say` (0.28.0+, SDK 0.30.0): every input waits its turn in order,
30
+ however many wait (no more 429), and one of your orchestrator's threads hears each input at once, all in parallel: a
31
+ follow-up reaches the thread of the request it is about (the input reads merged), the row you point at reaches the
32
+ thread of that row's input, and anything new gets a thread of its own. The help text says so.
33
+ - Your inbox on every device (0.28.0+, SDK 0.30.0): `shard conversations archive <id...>` archives conversations from
34
+ your own inbox, `shard conversations unarchive <id...>` brings them back and `shard conversations seen <id...>` records
35
+ that you opened them now, the same in the Shardflux app and every client you use (`shard c archive|unarchive|seen`).
36
+ Each takes up to 200 ids in one request and prints `Archived <id> <title>`, `Unarchived <id> <title>` or
37
+ `Marked seen <id> <title>` per conversation, and `Not found: <id>` on stderr for an id you cannot read; it exits 3
38
+ when none was found. `--json` prints the API's answer, `{data, skipped}`, the conversations with your `seen_at` and
39
+ `dismissed_at`. Only your view changes: the conversations, their agents and computers carry on. `shard conversations
40
+ get --json` and `list --json` carry the same `seen_at`, `dismissed_at` and `needs_you_reason`.
41
+ - Restore an orchestrator input (0.28.0+, SDK 0.30.0): `shard orchestrator restore <input-id>` brings an input you
42
+ dismissed back into `shard orchestrator list` on every device and prints `Restored: <your words>` (`--json`:
43
+ `{input}`). Restoring an input that is not dismissed changes nothing.
44
+ - Orchestrator answer media (0.28.0+, SDK 0.29.0): `shard orchestrator say --wait` prints a line for each picture,
45
+ video or file the answer shows, after its points: ` media: loss-curve.png (image, 1200×800, 84.0 KB)` (the size in
46
+ pixels once measured). `--json` adds the answer's `media`; `shard drive get <file.path> --sha256 <file.sha256>` reads
47
+ one.
48
+
49
+ - Orchestrator report cards (0.28.0+, SDK 0.29.0): `shard orchestrator say --wait` prints an answer the orchestrator
50
+ wrote as a report as its verdict, then its points under their group headings, one line each:
51
+ `- Loss is down to 1.84: from 2.31 at step 5,000 (14:02)`, the time short and in this computer's local time; a point
52
+ written without a lead prints its words. Every point, source and follow-up prints whole, however long. An answer
53
+ written as facts prints its facts as before. `--json` adds the answer's `points`.
54
+
55
+ - Board content at any length (0.28.0+, SDK 0.29.0): `shard task show` prints a task's title, its plan steps and each
56
+ report's title and outcome whole, however long the agent wrote them (the terminal wraps them); `shard task edit
57
+ --title` takes a title of any length.
58
+
59
+ - Your brain (0.28.0+, SDK 0.29.0): `shard brain ls [prefix]` lists your brain's files (size, saved time, type and
60
+ path; `--all`, `--limit`, `--cursor`; `--json` adds `next_cursor` and the brain's `version`) and `shard brain get
61
+ <path>` writes a file's bytes to standard output, to a file with `-o`, or as `--json` (`--sha256` reads exactly that
62
+ version). Your brain is your archive in an organization, kept by your orchestrator: its published answers as
63
+ `reports/<YYYY-MM-DD>/<folder>/report.md` with their media, its own notes and files, and `index.md`. Signed in it is
64
+ your brain in the saved organization, your only one, or `--org <id|slug>`; with `SHARDFLUX_API_KEY`, the brain of the
65
+ person who created the key.
66
+ - 0.28.0: shard files delete removes a file or, with --recursive, a directory through the files API; disk-full errors give cleanup guidance without a retry loop.
67
+ - Hung checkpoint recovery: `guest_unresponsive` identifies a cold boot after bounded restore readiness failures. Retained files are kept; memory is not restored and processes restart. Conversation moves can use their last durable copy after a bounded source restore failure; the newer source disk stays kept under its retention policy.
68
+
69
+ - A linked folder's start point (0.28.0+): when an agent links a folder of yours (a device's
70
+ `project_link`), the folder as it is now (its commit, uncommitted files as a snapshot on top) goes to the project hub
71
+ under `refs/shard/seed/link-<folder>`, and the link's result names that `commit` and the folder's `branch`. A task can
72
+ then name exactly where its work starts, and its agent starts there with no conversation of that folder yet. Linking
73
+ from the app or `shard projects link` copies nothing to the hub. An API without the fields takes the link without them.
74
+
75
+ - Landing per repository (0.28.0+): a project holds every folder its people linked, so a task's result lands only in a
76
+ folder of the repository it was started from (its workers' `repo_remote`). When the project hub's default branch is
77
+ another repository's, the result lands in its own folder and the hub's default branch stays as it is; with no folder
78
+ of that repository on this computer it answers `land_unrelated`.
79
+
80
+ - A result from another repository (0.28.0+): `shard task land` and `shard conversations land` answer `land_unrelated`
81
+ when the result has no history in common with the branch it lands in (it was started from another repository than
82
+ the one that branch holds, or two of its workers were), with what to do instead; nothing moves on the project hub or
83
+ in your folder. It was a Git error ("refusing to merge unrelated histories") that read as if trying again could help.
84
+
85
+ - Auto land switch (0.28.0+): `shard settings --auto-land on|off` turns automatic landing on or off for every project
86
+ on this computer (on by default). Off, the live twin lands no conversation and new conversations start from your
87
+ HEAD; `shard task land` and `shard conversations land` still land on request. `shard settings` shows it and `--json`
88
+ adds `auto_land`. The Shardflux app reads the same switch to land finished board tasks with no click.
89
+
90
+ - Message delivery (0.28.0+, SDK 0.29.0): `shard conversations send` reaches a working agent in its running turn
91
+ (Claude Code, Codex and Codex Cloud) and starts an idle one's next turn; its help says so instead of "next turn".
92
+ `--wait` waits up to 60 s and prints what happened: `Steered into the running turn.`, `Started the next turn.` or
93
+ `Not delivered yet.` (`Delivery not confirmed yet: …` when Codex Cloud has not confirmed it); `--json` adds
94
+ `delivery`. Without `--wait` the output stays `Message sent (<seq>).`
95
+
96
+ - One Shardflux app (0.28.0+): `shard` installs and updates the one desktop app (menu bar or tray, onboarding,
97
+ launcher, conversations with their computers, device approvals, one Settings window) from
98
+ `@shardflux/desktop-darwin-arm64` / `-x64` 0.9.0 on macOS (replacing `@shardflux/menubar-darwin`) and from
99
+ `@shardflux/desktop-linux-x64` / `-arm64` 0.9.0 on Linux (replacing the GTK tray app), at the same places as before
100
+ (`~/Applications/Shardflux.app`, `~/.local/share/shardflux/desktop`). It keeps the menu bar app's bundle id,
101
+ executable and signature, so `shard menubar start|stop|status|--login` and the running app's own update work
102
+ unchanged, and its first start retires the apps it replaces, keeping where each agent's conversations open (the
103
+ places `agents targets --open-in` saved) and, on Linux, the tray app's settings. The Linux autostart entry starts it with `--background`
104
+ (tray icon only). The launcher shortcut lines read the app's own choice (`desktop-app.json`). `shard update` lists it
105
+ as "Shardflux app". Retired: the CGWindowList window probe used for menu bar apps before 0.3.2.
106
+ On Linux the running app is found by its executable (`/proc/<pid>/exe`): Electron rewrites its command line, so
107
+ `shard menubar start|stop|status` and the refresh no longer miss it; the library check probes the Electron
108
+ executable behind the app's launcher and names each library the computer is missing.
109
+ - 0.27.0 includes the changes prepared as 0.26.0 (not released on its own): the entries marked 0.27.0 below.
110
+
111
+ - Device registration (0.28.0+): isolate each project, back off transient failures and stop after eight attempts with
112
+ an actionable needs-attention message. A device id another sign-in registered (the API key `shard setup` replaced,
113
+ or another account) is replaced by a new one (at most once every 10 minutes), with one line in the helper's log, and every project
114
+ registers again at once, so your agents reach this computer without a restart. The old id is kept in
115
+ `device-id-history.json`.
116
+ - Your agents on this computer (0.28.0+): `shard device approvals auto|read|ask` chooses how this computer answers
117
+ your own agents: `auto` runs everything they ask without asking, `read` runs folder listings and files copied to a
118
+ conversation and asks before anything else (commands, files saved here, ports, linking a folder), `ask` asks every
119
+ time. The first request asks for the choice (the Shardflux app's prompt; without the app, `shard` prints the two
120
+ commands once) and runs under the mode chosen. A teammate's request always asks. What ran without asking is listed
121
+ by `shard device approvals` (`--json`: `recent`) and the app's Settings. Approvals carry `choose_mode: true` while
122
+ nothing is chosen.
123
+ - First prompts (0.28.0+): a Codex Cloud start queues its initial prompt while the executor prepares. Resuming an accepted start uses the same prompt key; an unconfirmed send keeps its created conversation.
124
+
125
+ - Device helper (0.28.0+): a command your orchestrator asks your computer to run (a home conversation, so no folder of
126
+ it on this computer) asks you once with the exact command and folder ("Run on your Mac: sh -c tail -n 5 train.log ·
127
+ in ~/code/lm-train"), Allow once or Deny, and runs in your home folder or the ~/ folder it names. A request whose
128
+ conversation has no folder on this computer is refused with the reason instead of staying pending.
129
+ - Filesystem recovery (0.28.0+): resume JSON/timing keeps `cold_boot_reason: guest_filesystem`; the existing note reports restarted processes. Ships with SDK 0.29.0.
130
+
131
+ - Admission queue waits (0.28.0+, SDK 0.29.0): workspace opens retry `429 admission_queued` within the admission timeout with the same body/key, honor full `Retry-After`, and display `queued for admission; retrying in 2 s` while waiting.
132
+ - 0.27.0: workspace disk caps report the admitted and acknowledged size. Completed disk grows refresh the disk grant; resize results retain the original request.
133
+
134
+
135
+ - `shard orchestrator` (0.28.0+, SDK 0.29.0): your orchestrator agent from a terminal. `shard orchestrator say <words>`
136
+ sends your exact words (`--task`, `--report`, `--needs-you`, `--input`, `--conversation` point at a row) and prints
137
+ the input id and its place in line; every input is handled in parallel by its own thread. `--wait` follows it until
138
+ it is done, merged, failed or waiting and prints its curated result: the answer's headline and facts with their
139
+ sources and follow-ups, the tasks it created, the line it waits on (a question names its `shard needs-you answer
140
+ oq_…` command), or the input it was added to; exit 6 when it failed, 5 when `--timeout` (default 10m) passed first.
141
+ `shard orchestrator list [--all]` shows your inputs newest first, one line each; `shard orchestrator retry
142
+ <input-id>` sends a failed one again and `shard orchestrator dismiss <input-id>` takes one out of the list. Signed in
143
+ they reach your orchestrator; with `SHARDFLUX_API_KEY`, the orchestrator of the person who created the key. `--json`
144
+ prints `{input}` / `{inputs, cursor}`.
145
+ - `shard needs-you` (0.28.0+, SDK 0.29.0) lists your orchestrator's questions (`oq_…`, answered with `--text`) and what
146
+ it asked your computer while it was offline (`dev_…`, "Waiting for your computer: list ~/code"; `shard needs-you
147
+ answer dev_… cancel` drops it).
148
+ - Deprecated (0.27.0): `shard route` (POST /v1/router) and `shard ask` (POST /v1/questions); use the orchestrator
149
+ instead (`shard orchestrator say`). Each prints a one-line notice on stderr.
150
+
151
+ - `shard agents models` (0.28.0+): the models each active account can use, as Claude and ChatGPT list them for that
152
+ account (asked server side the way Claude Code and Codex fill their pickers; never starts a computer): effort levels
153
+ with the default starred, the default model, and unavailable models with the provider's reason. `--account <ref>`,
154
+ `--provider`, `--all`, `--refresh`; `--json` prints the API answer. `--model` on `shard agents new` (and `shard ./`)
155
+ also takes a model id from that list (`claude-fable-5-1`, `gpt-5.6-terra`) next to the aliases.
156
+
5
157
  - Device requests reach the right computer (0.25.0+): the background helper tells the API which conversations are
6
158
  local to this computer (started or opened here), so their requests come here first, then to the computer you used
7
159
  last, never to whichever was seen last. A project link with a first task (`project_link` with `brief`) reads the
@@ -11,7 +163,8 @@
11
163
  what each working step does, next to the plain waiting line of a task that waits to start.
12
164
  - `shard transcribe <file>` (0.25.0+, SDK 0.28.0) prints what a recording says (WebM/Opus or PCM WAV from the file;
13
165
  raw PCM with `--format pcm16 --sample-rate`); `--words` adds each word's start and end, `--json` prints the
14
- transcript.
166
+ transcript. Where cloud transcription is not on for the organization it says so in one line
167
+ (`cloud_transcription_off`) and exits 1 (0.28.0+, SDK 0.29.0).
15
168
  - Faster conversation starts (0.24.1): the project's dependency fingerprint is read from Git's own file list instead of walking the whole folder, so ignored and untracked trees beside the project (agent worktrees, build output) no longer hold a start on **Getting your project…**. A folder with 1.2 million such files took 32 s per start; it now takes 0.3 s, with the same fingerprint.
16
169
  - A folder without Git that `shard` makes a repository of (a first chat, `shard projects link`) starts with its files as
17
170
  the first commit (0.25.0+; `.gitignore` respected, large media stay untracked), so a conversation starts from the