@mu-crew/mu 3.11.2 → 3.11.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.
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  priorFieldValue,
9
9
  resolveGroupId,
10
10
  undoGroup
11
- } from "./chunk-DXKJY3NT.js";
11
+ } from "./chunk-LEORAGKV.js";
12
12
  import {
13
13
  AGENT_STATE_GLYPH,
14
14
  AgentAbortNeedsCtlError,
@@ -252,7 +252,7 @@ import {
252
252
  workspacePath,
253
253
  workspacesRoot,
254
254
  yankCommandForCheck
255
- } from "./chunk-JYZUNPPO.js";
255
+ } from "./chunk-F7ZBF6I7.js";
256
256
  import {
257
257
  CAPTURE_TRIGGER_DDL,
258
258
  CURRENT_SCHEMA_VERSION,
@@ -325,10 +325,10 @@ import {
325
325
  withCaptureSuppressed,
326
326
  withFileLock,
327
327
  withOpContext
328
- } from "./chunk-WYBOR4FX.js";
328
+ } from "./chunk-R2SVBZAB.js";
329
329
  import {
330
330
  defaultStateDir
331
- } from "./chunk-4PACTXAB.js";
331
+ } from "./chunk-L2ABBTYG.js";
332
332
  import "./chunk-PZ5AY32C.js";
333
333
  export {
334
334
  AGENT_STATE_GLYPH,
@@ -12,7 +12,7 @@ import {
12
12
  relTimeBasisForSort,
13
13
  sortTasks,
14
14
  truncate
15
- } from "./chunk-2FJK6OOZ.js";
15
+ } from "./chunk-3L5KO3PX.js";
16
16
  import {
17
17
  GLYPH,
18
18
  WORKSPACE_STALE_THRESHOLD,
@@ -41,15 +41,15 @@ import {
41
41
  summarizeOwnedTasks,
42
42
  superscriptDigit,
43
43
  yankCommandForCheck
44
- } from "./chunk-JYZUNPPO.js";
44
+ } from "./chunk-F7ZBF6I7.js";
45
45
  import {
46
46
  TASK_STATUSES,
47
47
  ambientSyncPass,
48
48
  formatPair,
49
49
  syncEnabled,
50
50
  tryResolveWorkstreamId
51
- } from "./chunk-WYBOR4FX.js";
52
- import "./chunk-4PACTXAB.js";
51
+ } from "./chunk-R2SVBZAB.js";
52
+ import "./chunk-L2ABBTYG.js";
53
53
  import "./chunk-PZ5AY32C.js";
54
54
 
55
55
  // src/cli/tui/index.ts
@@ -6449,4 +6449,4 @@ async function runTui(db, opts) {
6449
6449
  export {
6450
6450
  runTui
6451
6451
  };
6452
- //# sourceMappingURL=tui-DGDEH4JX.js.map
6452
+ //# sourceMappingURL=tui-WHCLVCYE.js.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ambientSyncPass,
3
3
  openDb
4
- } from "./chunk-WYBOR4FX.js";
5
- import "./chunk-4PACTXAB.js";
4
+ } from "./chunk-R2SVBZAB.js";
5
+ import "./chunk-L2ABBTYG.js";
6
6
  import "./chunk-PZ5AY32C.js";
7
7
 
8
8
  // src/cli/tui/sync-worker.ts
@@ -30,7 +30,7 @@ reply carries `v: 1`; the client (`src/ctl/client.ts`) throws
30
30
  | `hello` | identity plus `ops` (served ops) and `extVersion` (the mu version the extension was built from) |
31
31
  | `status` | `state` (`busy` / `idle`), `since`, `runs`, `pending` |
32
32
  | `send` | `pi.sendUserMessage`; when busy, `mode` is `steer` or `followUp` (default). Replies with the `status` fields measured before the dispatch, so `runs` is the baseline for a later `wait` |
33
- | `wait` | resolves on pi's `agent_settled` after `afterRuns`, with the run's `lastText` |
33
+ | `wait` | resolves on pi's `agent_settled` after `afterRuns`, with the run's `lastText` and pi's `sessionFile` |
34
34
  | `abort` | `ctx.abort()` (pi's Esc) |
35
35
  | `interrupt` | busy: `ctx.abort()`, wait for `agent_settled` (up to `timeoutMs`), then `pi.sendUserMessage(text)` as a new run; idle: just the send. Replies `wasBusy`, `pending` (measured before the abort) and the `status` fields measured after the settle and before the send, so `runs` is the `wait` baseline for the new run. `timeout`: nothing sent |
36
36
  | `fresh` | new session plus prompt as one operation, through the internal `/mu-fresh` command; replies once the new run starts; refused with `busy` unless `force` |
@@ -33,6 +33,11 @@ Delegates called in one turn run in parallel.
33
33
  - pi's footer shows how many delegates this session is waiting on, and
34
34
  `N results pending` for delegates that finished but whose answer has
35
35
  not reached the conversation yet (queued behind the running turn).
36
+ Escape drops those queued answers from pi. The extension then writes
37
+ one line per answer into the conversation, without starting a turn,
38
+ pointing at a copy under `~/.cache/mu/delegate-answers/` and
39
+ at the delegate's own pi session file. An answer that lands after
40
+ Escape arrives as usual.
36
41
  - Each delegate costs a pane and a pi process. A session runs at most
37
42
  `MU_DELEGATE_MAX` at once (default 16). Further calls are queued, up
38
43
  to four times the cap: the footer reads `16 delegates running, 4 queued`,
@@ -91,6 +96,8 @@ row carries:
91
96
  `error` means the run stopped on an API error after pi's own retries;
92
97
  `lastError` holds the message and the pane is kept.
93
98
  - `lastText`: the final message, capped at 64 KiB.
99
+ - `sessionFile`: the agent's pi session file, holding the full
100
+ transcript (absent for an ephemeral pi or an older extension).
94
101
 
95
102
  Exit codes: `0` met, `5` timeout, `6` pane died. Non-pi agents have no
96
103
  `lastText`; read the pane with `mu agent read helper-1 -w scratch -n 80`.
@@ -12,6 +12,7 @@ milliseconds; `0` disables a wait unless noted.
12
12
  | `MU_DB_PATH` | SQLite file path. Wins over the state dir. | `<state-dir>/mu.db` |
13
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
14
  | `XDG_STATE_HOME` | XDG state base; mu appends `mu/`. An empty or relative value is ignored. | `~/.local/state` |
15
+ | `XDG_CACHE_HOME` | XDG cache base; mu appends `mu/`. Holds only disposable copies. An empty or relative value is ignored. | `~/.cache` |
15
16
  | `MU_SESSION` | Active workstream when `-w` is absent. | current `mu-<name>` mux session |
16
17
  | `MU_SYNC_DIR` | Folder holding one segment per machine. This is the whole sync setup; there is no peer list. | unset: sync off |
17
18
 
@@ -95,5 +95,12 @@ Never put `MU_DB_PATH` inside `MU_SYNC_DIR`: syncing a live SQLite
95
95
  file and its `-wal` and `-shm` sidecars corrupts it. `mu doctor` checks
96
96
  for this.
97
97
 
98
+ The cache dir is `$XDG_CACHE_HOME/mu`, else `~/.cache/mu`. Anything in
99
+ it can be deleted at any time.
100
+
101
+ | Path | Contents |
102
+ | --- | --- |
103
+ | `<cache-dir>/delegate-answers/` | Copies of delegate answers an Escape dropped from pi's queue (the delegate's pi session file keeps the original) |
104
+
98
105
  mu reads no agent-template directory (`~/.pi/agent/agents/`,
99
106
  `.pi/agents/`). A role is a name and a brief.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mu-crew/mu",
3
- "version": "3.11.2",
3
+ "version": "3.11.3",
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"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/state-dir.ts"],"sourcesContent":["// The mu state directory, resolved from builtins only so the CLI\n// bootstrap (src/main.ts) can locate its compile cache before it loads\n// any of the CLI graph. db.ts re-exports defaultStateDir.\n\nimport { homedir } from \"node:os\";\nimport { isAbsolute, join } from \"node:path\";\n\n/**\n * Resolve the canonical mu state directory:\n * MU_STATE_DIR > $XDG_STATE_HOME/mu (absolute only) > ~/.local/state/mu\n */\nexport function defaultStateDir(): string {\n if (process.env.MU_STATE_DIR) return process.env.MU_STATE_DIR;\n return join(xdgStateHome(homedir()), \"mu\");\n}\n\n/** `$XDG_STATE_HOME`, or `<home>/.local/state` when it is unset, empty,\n * or relative: the XDG spec says such a value must be ignored, and a\n * relative one would scatter state across every cwd mu runs in. */\nexport function xdgStateHome(home: string): string {\n const xdg = process.env.XDG_STATE_HOME;\n return xdg !== undefined && isAbsolute(xdg) ? xdg : join(home, \".local\", \"state\");\n}\n"],"mappings":";AAIA,SAAS,eAAe;AACxB,SAAS,YAAY,YAAY;AAM1B,SAAS,kBAA0B;AACxC,MAAI,QAAQ,IAAI,aAAc,QAAO,QAAQ,IAAI;AACjD,SAAO,KAAK,aAAa,QAAQ,CAAC,GAAG,IAAI;AAC3C;AAKO,SAAS,aAAa,MAAsB;AACjD,QAAM,MAAM,QAAQ,IAAI;AACxB,SAAO,QAAQ,UAAa,WAAW,GAAG,IAAI,MAAM,KAAK,MAAM,UAAU,OAAO;AAClF;","names":[]}