@mu-crew/mu 3.8.1 → 3.10.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.
- package/AGENTS.md +2 -1
- package/README.md +1 -0
- package/dist/chunk-4PACTXAB.js +17 -0
- package/dist/chunk-4PACTXAB.js.map +1 -0
- package/dist/chunk-77GBZ2KR.js +85 -0
- package/dist/chunk-77GBZ2KR.js.map +1 -0
- package/dist/chunk-7OQNJWBY.js +391 -0
- package/dist/chunk-7OQNJWBY.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/chunk-WT7IN2OD.js +9887 -0
- package/dist/chunk-WT7IN2OD.js.map +1 -0
- package/dist/chunk-XXK7FR37.js +640 -0
- package/dist/chunk-XXK7FR37.js.map +1 -0
- package/dist/chunk-YIF3X32A.js +2792 -0
- package/dist/chunk-YIF3X32A.js.map +1 -0
- package/dist/cli-UZEMPIPW.js +6266 -0
- package/dist/cli-UZEMPIPW.js.map +1 -0
- package/dist/cli.js +37 -25280
- package/dist/cli.js.map +1 -1
- package/dist/extension/mu-pi.js +230 -138
- package/dist/extension/mu-pi.js.map +1 -1
- package/dist/index.d.ts +543 -142
- package/dist/index.js +340 -11169
- package/dist/index.js.map +1 -1
- package/dist/tui-X2XICJTN.js +6452 -0
- package/dist/tui-X2XICJTN.js.map +1 -0
- package/dist/tui-sync-worker.js +16 -0
- package/dist/tui-sync-worker.js.map +1 -0
- package/dist/yank-T3AYQTVR.js +12 -0
- package/dist/yank-T3AYQTVR.js.map +1 -0
- package/docs/ARCHITECTURE.md +14 -6
- package/docs/VISION.md +14 -7
- package/docs/VOCABULARY.md +5 -6
- package/docs/architecture/control-socket.md +6 -2
- package/docs/architecture/mux.md +4 -2
- package/docs/architecture/ops-log.md +2 -1
- package/docs/architecture/sdk.md +3 -1
- package/docs/architecture/sync.md +32 -10
- package/docs/architecture/tui.md +18 -8
- package/docs/guide/backends.md +5 -3
- package/docs/guide/cleanup.md +8 -3
- package/docs/guide/delegate.md +3 -1
- package/docs/guide/dispatch.md +9 -3
- package/docs/guide/recovery.md +19 -8
- package/docs/guide/sql.md +11 -4
- package/docs/guide/stop-a-worker.md +3 -1
- package/docs/guide/tui.md +3 -3
- package/docs/guide/upgrade.md +8 -2
- package/docs/reference/env.md +11 -5
- package/docs/reference/naming.md +3 -4
- package/package.json +1 -1
- package/skills/mu/SKILL.md +2 -2
- package/skills/mu/recipes/drift-audit.md +5 -3
package/docs/guide/tui.md
CHANGED
|
@@ -67,9 +67,9 @@ pane. The dashboard comes back when the tool exits.
|
|
|
67
67
|
`/` filters the popup's rows by substring as you type. `Enter` keeps
|
|
68
68
|
the filter. `Esc` clears it.
|
|
69
69
|
|
|
70
|
-
In
|
|
71
|
-
`
|
|
72
|
-
|
|
70
|
+
In the DAG and All-tasks popups, `o`, `i`, and `c` toggle `OPEN`,
|
|
71
|
+
`IN_PROGRESS`, and `CLOSED`, `p` toggles parked tasks, and `w` toggles
|
|
72
|
+
tasks closed as anything but `done`. In All tasks, `b`
|
|
73
73
|
cycles the blocked filter and `s` cycles the sort: ROI, recency, age,
|
|
74
74
|
id.
|
|
75
75
|
|
package/docs/guide/upgrade.md
CHANGED
|
@@ -16,8 +16,9 @@ that both paths start from.
|
|
|
16
16
|
|
|
17
17
|
- `--copy` copies the extension instead of the shim. You then have to
|
|
18
18
|
relink after every upgrade.
|
|
19
|
-
- `--force` replaces
|
|
20
|
-
dev checkout. mu
|
|
19
|
+
- `--force` replaces an extension or skill symlink that points
|
|
20
|
+
elsewhere, such as a dev checkout. mu replaces the link, never its
|
|
21
|
+
target, and never replaces a real skill directory (exit 4).
|
|
21
22
|
- `--extension-only` and `--skill-only` install one part.
|
|
22
23
|
|
|
23
24
|
For agents other than pi, see [README § Install](../../README.md#install).
|
|
@@ -50,7 +51,12 @@ newer one with `SchemaTooNewError`. Both exit 4 and leave the file
|
|
|
50
51
|
alone. `scripts/migrate.ts` converts a v7, v8, v9, or v10 DB into a new
|
|
51
52
|
v11 file. It never writes in place.
|
|
52
53
|
|
|
54
|
+
The npm package does not ship `scripts/` or `src/`, so run the recipe
|
|
55
|
+
from a git checkout of mu at the version you upgraded to (`npm install`
|
|
56
|
+
there first; `npx tsx` fetches tsx on first use).
|
|
57
|
+
|
|
53
58
|
```bash
|
|
59
|
+
git clone --branch "v$(mu --version)" https://github.com/mu-crew/mu && cd mu && npm install
|
|
54
60
|
DB=${MU_DB_PATH:-$HOME/.local/state/mu/mu.db}
|
|
55
61
|
BACKUP="$HOME/mu-old-backup-$(date +%Y%m%d-%H%M%S).db"
|
|
56
62
|
sqlite3 "$DB" ".backup '$BACKUP'"
|
package/docs/reference/env.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Environment variables
|
|
2
2
|
|
|
3
|
-
Every env var mu reads or sets
|
|
3
|
+
Every env var mu reads or sets, except standard ones it reads as any
|
|
4
|
+
tool does (`HOME`, `PATH`, `SHELL`, `USER`, `TERM`, `DISPLAY`,
|
|
5
|
+
`WAYLAND_DISPLAY`). mu has no config file. Durations are
|
|
4
6
|
milliseconds; `0` disables a wait unless noted.
|
|
5
7
|
|
|
6
8
|
## State and workstream
|
|
@@ -8,8 +10,8 @@ milliseconds; `0` disables a wait unless noted.
|
|
|
8
10
|
| Name | Effect | Default |
|
|
9
11
|
| --- | --- | --- |
|
|
10
12
|
| `MU_DB_PATH` | SQLite file path. Wins over the state dir. | `<state-dir>/mu.db` |
|
|
11
|
-
| `MU_STATE_DIR` | State directory. | `$XDG_STATE_HOME/mu` |
|
|
12
|
-
| `XDG_STATE_HOME` | XDG state base; mu appends `mu/`. | `~/.local/state` |
|
|
13
|
+
| `MU_STATE_DIR` | State directory. Also holds `compile-cache/` (V8 code cache for the CLI; `NODE_DISABLE_COMPILE_CACHE=1` turns it off). | `$XDG_STATE_HOME/mu` |
|
|
14
|
+
| `XDG_STATE_HOME` | XDG state base; mu appends `mu/`. An empty or relative value is ignored. | `~/.local/state` |
|
|
13
15
|
| `MU_SESSION` | Active workstream when `-w` is absent. | current `mu-<name>` mux session |
|
|
14
16
|
| `MU_SYNC_DIR` | Folder holding one segment per machine. This is the whole sync setup; there is no peer list. | unset: sync off |
|
|
15
17
|
|
|
@@ -19,7 +21,10 @@ milliseconds; `0` disables a wait unless noted.
|
|
|
19
21
|
| --- | --- | --- |
|
|
20
22
|
| `MU_MUX` | Force `tmux` or `herdr`, skipping mux detection. An unknown value fails the invocation. | detected |
|
|
21
23
|
| `HERDR_ENV` | Read only. `1` (set by herdr in its panes) selects herdr; outranks `$TMUX`. | |
|
|
22
|
-
| `
|
|
24
|
+
| `TMUX`, `TMUX_PANE` | Read only. Either one (set by tmux in its panes) selects tmux. `$TMUX` gates reading the current session name, which resolves the workstream when `-w` and `MU_SESSION` are absent. `$TMUX_PANE` identifies the calling agent (`mu me`, `mu log`, task claim errors). | |
|
|
25
|
+
| `HERDR_WORKSPACE_ID` | Read only. Set by herdr in its panes; pane listing with no target reads this workspace first. | |
|
|
26
|
+
| `HERDR_PANE_ID` | Read only. Set by herdr in its panes; fallback rung of actor identity after `MU_AGENT_NAME`. | |
|
|
27
|
+
| `MU_TMUX_SOCKET` | Test isolation. Runs every tmux call on a private server (`-L <name>`) with `-f /dev/null`, so `~/.tmux.conf` is not loaded. tmux only. | unset: tmux's default server |
|
|
23
28
|
| `MU_HERDR_SESSION` | Named herdr server (`--session <name>`). herdr only. Tests must set it to a non-default name. | herdr default session |
|
|
24
29
|
| `MU_BANNER_QUIET` | `1` disables mu's pane border and banner decorations. tmux only. | unset |
|
|
25
30
|
|
|
@@ -27,7 +32,7 @@ milliseconds; `0` disables a wait unless noted.
|
|
|
27
32
|
|
|
28
33
|
| Name | Effect | Default |
|
|
29
34
|
| --- | --- | --- |
|
|
30
|
-
| `MU_<CLI>_COMMAND` | Executable for `--cli <cli>`; hyphens become underscores (`--cli pi-meta` reads `MU_PI_META_COMMAND`). May hold arguments. `--command` wins; the spawn line names the env var when it supplied the command. | the cli value |
|
|
35
|
+
| `MU_<CLI>_COMMAND` | Executable for `--cli <cli>`; hyphens become underscores (`--cli pi-meta` reads `MU_PI_META_COMMAND`). May hold arguments. `--command` wins; the spawn line names the env var when it supplied the command. On herdr, spawn refuses both with exit 2. | the cli value |
|
|
31
36
|
| `MU_SPAWN_CTL_MS` | Budget for the control-socket handshake with a new pi agent, polled every 250ms. On timeout spawn still exits 0, reports `ctl: missing` or `ctl: refused`, and warns. `--no-ctl` skips it per spawn. | `30000` |
|
|
32
37
|
| `MU_SPAWN_LIVENESS_MS` | tmux only. Wait this long, then check the pane is alive and its scrollback has no startup error (auth failure, `command not found`). Failure rolls back the row and throws `AgentDiedOnSpawnError` or `AgentSpawnStartupError`. A pi agent skips the wait: the pane is checked on each ctl handshake tick and scanned when it ends. | `1500` |
|
|
33
38
|
| `MU_SPAWN_LOCK_TIMEOUT_MS` | How long a spawn waits for the per-workstream spawn lock. | `15000` |
|
|
@@ -81,6 +86,7 @@ pi agent's `--command`. mu never reads them back.
|
|
|
81
86
|
| `MU_FORCE_COLOR` | Truthy forces colour on. `""`, `0`, and `false` opt out. Checked before `FORCE_COLOR`. | unset |
|
|
82
87
|
| `MU_NO_TUI` | `1` makes bare `mu` print help instead of opening the TUI. | unset |
|
|
83
88
|
| `MU_TUI_DEBUG_MOUSE` | `1` logs mouse hit-tests to stderr. | unset |
|
|
89
|
+
| `NODE_ENV` | Unset: the TUI loads React's production build. Set it (e.g. `development`) to get React's dev build and warnings. | unset |
|
|
84
90
|
|
|
85
91
|
## Tests
|
|
86
92
|
|
package/docs/reference/naming.md
CHANGED
|
@@ -37,9 +37,9 @@ clears all blockers.
|
|
|
37
37
|
| Id | Shape | Unique within |
|
|
38
38
|
| --- | --- | --- |
|
|
39
39
|
| Agent name | `[a-z][a-z0-9_-]*`, ≤ 32 chars | workstream |
|
|
40
|
-
| Task `local_id` |
|
|
41
|
-
| Workstream name |
|
|
42
|
-
| Window (`--tab`) |
|
|
40
|
+
| Task `local_id` | `[a-z][a-z0-9_-]*`, ≤ 64 chars | workstream |
|
|
41
|
+
| Workstream name | `[a-z][a-z0-9_-]*`, ≤ 32 chars; mux session is `mu-<name>` | DB |
|
|
42
|
+
| Window (`--tab`) | not validated; passed to the mux as given. Avoid `:` and `.`, which tmux reads as target separators | workstream |
|
|
43
43
|
|
|
44
44
|
`scratch` is reserved: it is created only by the first
|
|
45
45
|
`mu agent spawn <name> -w scratch`, and `mu workstream init scratch`
|
|
@@ -87,7 +87,6 @@ The state dir is `MU_STATE_DIR`, else `$XDG_STATE_HOME/mu`, else
|
|
|
87
87
|
| Path | Contents |
|
|
88
88
|
| --- | --- |
|
|
89
89
|
| `<state-dir>/mu.db` | The SQLite DB for every workstream |
|
|
90
|
-
| `<state-dir>/workstreams/<workstream>/` | Per-workstream artifacts, created lazily |
|
|
91
90
|
| `<state-dir>/workspaces/<workstream>/<agent>/` | Per-agent VCS workspace, created by `mu agent spawn --workspace` |
|
|
92
91
|
| `<sync-dir>/<machine_id>.jsonl` | This machine's segment; `<sync-dir>` is `MU_SYNC_DIR` |
|
|
93
92
|
| `<sync-dir>/<machine_id>.manifest` | `{count, last_hlc, sha256}` for segment verification |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mu-crew/mu",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"description": "A persistent, observable crew of pi agents running in one tmux or herdr session per workstream, coordinated through a built-in task DAG.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
package/skills/mu/SKILL.md
CHANGED
|
@@ -264,8 +264,8 @@ Close the task as your last action, or the orchestrator's wait hangs.
|
|
|
264
264
|
## Guardrails
|
|
265
265
|
|
|
266
266
|
Task ownership outranks agent state. Coordinate through task notes and
|
|
267
|
-
the activity log. Keep edges within one workstream
|
|
268
|
-
|
|
267
|
+
the activity log. Keep edges within one workstream. Give workers
|
|
268
|
+
bounded paths and commands.
|
|
269
269
|
|
|
270
270
|
## Recipes
|
|
271
271
|
|
|
@@ -34,12 +34,14 @@ or close you compare against is often older than it.
|
|
|
34
34
|
2. Stale pins: for each build/binary sha or oracle commit named in an
|
|
35
35
|
IN_PROGRESS note, and each merged fix its task's findings depend on:
|
|
36
36
|
git merge-base --is-ancestor <fix> <pinned>. Exit 1 = pin is stale.
|
|
37
|
-
3. Closed-task notes: notes added after the task's last task.close op
|
|
38
|
-
|
|
37
|
+
3. Closed-task notes: notes added after the task's last task.close op,
|
|
38
|
+
minus the `CLOSE:` or `<SUBSTATE>:` note the close verb itself writes
|
|
39
|
+
as the very next op (seq + 1); any other note counts, whatever its
|
|
40
|
+
prefix. Report each of the top 5 by count as its own finding with its count,
|
|
39
41
|
even when the notes look routine. A late note that reports the
|
|
40
42
|
closed bug again usually ran on a build without the closing fix:
|
|
41
43
|
check its sha with git merge-base --is-ancestor <fix> <sha>.
|
|
42
|
-
mu sql "select t.local_id name, count(*) late from tasks t join workstreams w on w.id=t.workstream_id join task_notes n on n.task_id=t.id where w.name='<ws>' and t.status='CLOSED' and n.created_at > (select
|
|
44
|
+
mu sql "select t.local_id name, count(*) late from tasks t join workstreams w on w.id=t.workstream_id join task_notes n on n.task_id=t.id join (select key, max(seq) seq, max(created_at) at from ops where intent='task.close' and entity='task' group by key) c on c.key='<ws>/'||t.local_id where w.name='<ws>' and t.status='CLOSED' and n.created_at > c.at and not exists (select 1 from ops x where x.seq=c.seq+1 and x.entity='note' and x.key=c.key||'#'||n.id and (n.content like 'CLOSE: %' or n.content like upper(t.substate)||': %')) group by t.local_id order by late desc"
|
|
43
45
|
4. Thin decisions: an ACCEPT/REJECTED/CLOSE/SUPERSEDED note under 40
|
|
44
46
|
chars; a refuter tally with no REFUTER or VERDICT note; a review the
|
|
45
47
|
orchestrator closed with no FILES/COMMANDS note and no commit.
|