@femtomc/mu-agent 26.2.89 → 26.2.91

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 (43) hide show
  1. package/README.md +7 -10
  2. package/dist/backend.d.ts +0 -2
  3. package/dist/backend.d.ts.map +1 -1
  4. package/dist/backend.js +2 -3
  5. package/dist/command_context.d.ts.map +1 -1
  6. package/dist/command_context.js +3 -14
  7. package/dist/default_prompts.d.ts +0 -3
  8. package/dist/default_prompts.d.ts.map +1 -1
  9. package/dist/default_prompts.js +0 -6
  10. package/dist/extensions/branding.d.ts.map +1 -1
  11. package/dist/extensions/branding.js +11 -0
  12. package/dist/extensions/hud-mode.d.ts +8 -0
  13. package/dist/extensions/hud-mode.d.ts.map +1 -0
  14. package/dist/extensions/hud-mode.js +21 -0
  15. package/dist/extensions/index.d.ts +0 -6
  16. package/dist/extensions/index.d.ts.map +1 -1
  17. package/dist/extensions/index.js +0 -6
  18. package/dist/extensions/planning-ui.d.ts.map +1 -1
  19. package/dist/extensions/planning-ui.js +17 -0
  20. package/dist/extensions/subagents-ui.d.ts.map +1 -1
  21. package/dist/extensions/subagents-ui.js +263 -118
  22. package/dist/index.d.ts +1 -2
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +1 -2
  25. package/dist/operator.d.ts +0 -33
  26. package/dist/operator.d.ts.map +1 -1
  27. package/dist/operator.js +1 -72
  28. package/dist/self_documentation.d.ts.map +1 -1
  29. package/dist/self_documentation.js +0 -2
  30. package/dist/session_turn.d.ts +5 -3
  31. package/dist/session_turn.d.ts.map +1 -1
  32. package/dist/session_turn.js +27 -44
  33. package/package.json +3 -3
  34. package/prompts/roles/operator.md +1 -1
  35. package/prompts/skills/planning/SKILL.md +3 -3
  36. package/prompts/skills/subagents/SKILL.md +227 -106
  37. package/dist/mu_roles.d.ts +0 -13
  38. package/dist/mu_roles.d.ts.map +0 -1
  39. package/dist/mu_roles.js +0 -29
  40. package/prompts/roles/orchestrator.md +0 -43
  41. package/prompts/roles/reviewer.md +0 -35
  42. package/prompts/roles/worker.md +0 -38
  43. package/prompts/skills/reviewer/SKILL.md +0 -65
package/README.md CHANGED
@@ -2,23 +2,20 @@
2
2
 
3
3
  Shared agent runtime package for mu.
4
4
 
5
- This package provides reusable runtime pieces for chat, orchestration, and serve-mode tooling, including:
5
+ This package provides reusable runtime pieces for operator sessions and serve-mode tooling, including:
6
6
 
7
7
  - Messaging operator runtime + backend
8
8
  - Command context resolution for operator command proposals
9
- - Role prompt loading/defaults for operator/orchestrator/worker/reviewer
10
- - pi CLI/SDK orchestration backends and resource loader helpers
11
- - Prompt/template helpers used by orchestration roles
9
+ - Operator prompt loading/defaults
10
+ - pi CLI/SDK backend and resource loader helpers
11
+ - Prompt/template helpers
12
12
 
13
13
  ## Bundled default prompts
14
14
 
15
15
  Bundled defaults now live as markdown files under `packages/agent/prompts/`:
16
16
 
17
17
  - `operator.md`
18
- - `orchestrator.md`
19
- - `worker.md`
20
- - `reviewer.md`
21
- - `soul.md` (shared tail appended to all role prompts)
18
+ - `soul.md` (shared tail appended to the operator prompt)
22
19
 
23
20
  These are loaded by runtime code and are the single source of truth for default system prompts.
24
21
 
@@ -48,8 +45,8 @@ Current stack:
48
45
 
49
46
  - `brandingExtension` — mu compact header/footer branding + default theme
50
47
  - `eventLogExtension` — event tail + watch widget
51
- - `planningUiExtension` — planning HUD with phase/checklist state plus user-facing communication metadata (`/mu plan ...`)
52
- - `subagentsUiExtension` — tmux + issue queue HUD with spawn profiles, pause controls, and queue/session health signals (`/mu subagents ...`)
48
+ - `planningUiExtension` — planning mode: compact HUD for next-step/approval flow plus footer-ready incidental status metadata (`/mu plan ...`)
49
+ - `subagentsUiExtension` — subagents mode: compact HUD with activity sentences from issue/forum events plus footer-ready queue/health metadata (`/mu subagents ...`)
53
50
 
54
51
  Default operator UI theme is `mu-gruvbox-dark`.
55
52
 
package/dist/backend.d.ts CHANGED
@@ -1,9 +1,7 @@
1
1
  import type { Model } from "@mariozechner/pi-ai";
2
2
  import { AuthStorage, DefaultResourceLoader, SettingsManager } from "@mariozechner/pi-coding-agent";
3
- import type { MuRole } from "./mu_roles.js";
4
3
  export type BackendRunOpts = {
5
4
  issueId: string;
6
- role: MuRole;
7
5
  systemPrompt: string;
8
6
  prompt: string;
9
7
  provider: string;
@@ -1 +1 @@
1
- {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EACN,WAAW,EAOX,qBAAqB,EAGrB,eAAe,EACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC7B,GAAG,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3C;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CA4BpD;AAGD;;;;;GAKG;AACH,wBAAgB,YAAY,CAC3B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,WAAW,EACxB,kBAAkB,CAAC,EAAE,MAAM,GACzB,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CA6BxB;AAED;;;;GAIG;AACH,qBAAa,UAAW,YAAW,aAAa;IACzC,GAAG,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAoGhD;AAGD,MAAM,MAAM,0BAA0B,GAAG;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,0BAA0B,GAAG,qBAAqB,CA+C9F"}
1
+ {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EACN,WAAW,EAOX,qBAAqB,EAGrB,eAAe,EACf,MAAM,+BAA+B,CAAC;AAIvC,MAAM,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC7B,GAAG,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3C;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CA4BpD;AAGD;;;;;GAKG;AACH,wBAAgB,YAAY,CAC3B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,WAAW,EACxB,kBAAkB,CAAC,EAAE,MAAM,GACzB,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CA6BxB;AAED;;;;GAIG;AACH,qBAAa,UAAW,YAAW,aAAa;IACzC,GAAG,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAkGhD;AAGD,MAAM,MAAM,0BAA0B,GAAG;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,0BAA0B,GAAG,qBAAqB,CA+C9F"}
package/dist/backend.js CHANGED
@@ -4,7 +4,7 @@ import { basename, dirname, join } from "node:path";
4
4
  import { findRepoRoot, getMuHomeDir, getStorePaths } from "@femtomc/mu-core/node";
5
5
  import { getModels, getProviders } from "@mariozechner/pi-ai";
6
6
  import { AuthStorage, createAgentSession, createBashTool, createEditTool, createReadTool, createWriteTool, DefaultResourceLoader, getAgentDir, SessionManager, SettingsManager, } from "@mariozechner/pi-coding-agent";
7
- import { orchestratorToolExtensionPaths, workerToolExtensionPaths } from "./extensions/index.js";
7
+ import { operatorExtensionPaths } from "./extensions/index.js";
8
8
  import { MU_DEFAULT_THEME_NAME, MU_DEFAULT_THEME_PATH } from "./ui_defaults.js";
9
9
  export function streamHasError(line) {
10
10
  let event;
@@ -79,12 +79,11 @@ export class SdkBackend {
79
79
  throw new Error(`Model "${opts.model}" not found${scope} in pi-ai registry.`);
80
80
  }
81
81
  const settingsManager = SettingsManager.inMemory({ theme: MU_DEFAULT_THEME_NAME, quietStartup: true });
82
- const roleExtensionPaths = opts.role === "orchestrator" ? orchestratorToolExtensionPaths : workerToolExtensionPaths;
83
82
  const resourceLoader = createMuResourceLoader({
84
83
  cwd: opts.cwd,
85
84
  systemPrompt: opts.systemPrompt,
86
85
  settingsManager,
87
- additionalExtensionPaths: roleExtensionPaths,
86
+ additionalExtensionPaths: operatorExtensionPaths,
88
87
  });
89
88
  await resourceLoader.reload();
90
89
  const tools = [
@@ -1 +1 @@
1
- {"version":3,"file":"command_context.d.ts","sourceRoot":"","sources":["../src/command_context.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,uBAAuB,GAAG,UAAU,GAAG,cAAc,GAAG,MAAM,CAAC;AAE3E,MAAM,MAAM,8BAA8B,GACvC,iBAAiB,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,uBAAuB,CAAC;AAE3B,MAAM,MAAM,yBAAyB,GAClC;IACA,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,uBAAuB,CAAC;CAC/B,GACD;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,8BAA8B,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEL,MAAM,MAAM,0BAA0B,GAAG;IACxC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,CAAC;AAwJF,qBAAa,sBAAsB;;gBAGf,IAAI,GAAE,0BAA+B;IAQjD,OAAO,CAAC,IAAI,EAAE;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;QACxB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,eAAe,EAAE,MAAM,CAAC;QACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClC,GAAG,yBAAyB;CAqG7B"}
1
+ {"version":3,"file":"command_context.d.ts","sourceRoot":"","sources":["../src/command_context.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,uBAAuB,GAAG,UAAU,GAAG,cAAc,GAAG,MAAM,CAAC;AAE3E,MAAM,MAAM,8BAA8B,GACvC,iBAAiB,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,uBAAuB,CAAC;AAE3B,MAAM,MAAM,yBAAyB,GAClC;IACA,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,uBAAuB,CAAC;CAC/B,GACD;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,8BAA8B,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEL,MAAM,MAAM,0BAA0B,GAAG;IACxC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,CAAC;AA2IF,qBAAa,sBAAsB;;gBAGf,IAAI,GAAE,0BAA+B;IAQjD,OAAO,CAAC,IAAI,EAAE;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;QACxB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,eAAe,EAAE,MAAM,CAAC;QACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClC,GAAG,yBAAyB;CAqG7B"}
@@ -2,15 +2,7 @@ import { resolve as resolvePath } from "node:path";
2
2
  const ISSUE_ID_RE = /^mu-[a-z0-9][a-z0-9-]*$/;
3
3
  const SAFE_TOPIC_RE = /^[A-Za-z0-9][A-Za-z0-9._:/-]{0,199}$/;
4
4
  const SAFE_TARGET_RE = /^(?!-)[A-Za-z0-9._:@/-]{1,200}$/;
5
- const ISSUE_TARGET_COMMANDS = new Set([
6
- "issue get",
7
- "issue update",
8
- "issue claim",
9
- "issue close",
10
- "run resume",
11
- "run status",
12
- "run interrupt",
13
- ]);
5
+ const ISSUE_TARGET_COMMANDS = new Set(["issue get", "issue update", "issue claim", "issue close"]);
14
6
  const TOPIC_TARGET_COMMANDS = new Set(["forum read", "forum post"]);
15
7
  const GENERIC_TARGET_COMMANDS = new Set(["audit get", "dlq inspect", "dlq replay"]);
16
8
  function readString(value) {
@@ -32,16 +24,13 @@ function collectDistinct(values) {
32
24
  function collectIssueCandidates(opts) {
33
25
  const candidates = [];
34
26
  const targetType = opts.inboundTargetType.toLowerCase();
35
- if (targetType === "issue" ||
36
- targetType === "issue_id" ||
37
- targetType === "run_root" ||
38
- targetType === "root_issue") {
27
+ if (targetType === "issue" || targetType === "issue_id" || targetType === "root_issue") {
39
28
  const fromTarget = readString(opts.inboundTargetId);
40
29
  if (fromTarget) {
41
30
  candidates.push(fromTarget);
42
31
  }
43
32
  }
44
- for (const key of ["issue_id", "root_issue_id", "run_root_id"]) {
33
+ for (const key of ["issue_id", "root_issue_id"]) {
45
34
  const fromMeta = readString(opts.metadata[key]);
46
35
  if (fromMeta) {
47
36
  candidates.push(fromMeta);
@@ -7,8 +7,5 @@
7
7
  export declare function loadBundledPrompt(name: string): string;
8
8
  export declare function appendSharedSoul(basePrompt: string, soulPrompt: string): string;
9
9
  export declare const DEFAULT_SOUL_PROMPT: string;
10
- export declare const DEFAULT_ORCHESTRATOR_PROMPT: string;
11
- export declare const DEFAULT_REVIEWER_PROMPT: string;
12
- export declare const DEFAULT_WORKER_PROMPT: string;
13
10
  export declare const DEFAULT_OPERATOR_SYSTEM_PROMPT: string;
14
11
  //# sourceMappingURL=default_prompts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"default_prompts.d.ts","sourceRoot":"","sources":["../src/default_prompts.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAStD;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAO/E;AAED,eAAO,MAAM,mBAAmB,QAAqC,CAAC;AAOtE,eAAO,MAAM,2BAA2B,QAAkE,CAAC;AAC3G,eAAO,MAAM,uBAAuB,QAA8D,CAAC;AACnG,eAAO,MAAM,qBAAqB,QAA4D,CAAC;AAC/F,eAAO,MAAM,8BAA8B,QAE1C,CAAC"}
1
+ {"version":3,"file":"default_prompts.d.ts","sourceRoot":"","sources":["../src/default_prompts.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAStD;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAO/E;AAED,eAAO,MAAM,mBAAmB,QAAqC,CAAC;AAGtE,eAAO,MAAM,8BAA8B,QAE1C,CAAC"}
@@ -32,11 +32,5 @@ export function appendSharedSoul(basePrompt, soulPrompt) {
32
32
  return `${base}\n\n${soul}`;
33
33
  }
34
34
  export const DEFAULT_SOUL_PROMPT = loadBundledPrompt("roles/soul.md");
35
- const BASE_ORCHESTRATOR_PROMPT = loadBundledPrompt("roles/orchestrator.md");
36
- const BASE_REVIEWER_PROMPT = loadBundledPrompt("roles/reviewer.md");
37
- const BASE_WORKER_PROMPT = loadBundledPrompt("roles/worker.md");
38
35
  const BASE_OPERATOR_SYSTEM_PROMPT = loadBundledPrompt("roles/operator.md");
39
- export const DEFAULT_ORCHESTRATOR_PROMPT = appendSharedSoul(BASE_ORCHESTRATOR_PROMPT, DEFAULT_SOUL_PROMPT);
40
- export const DEFAULT_REVIEWER_PROMPT = appendSharedSoul(BASE_REVIEWER_PROMPT, DEFAULT_SOUL_PROMPT);
41
- export const DEFAULT_WORKER_PROMPT = appendSharedSoul(BASE_WORKER_PROMPT, DEFAULT_SOUL_PROMPT);
42
36
  export const DEFAULT_OPERATOR_SYSTEM_PROMPT = appendMuDocumentationSection(appendSharedSoul(BASE_OPERATOR_SYSTEM_PROMPT, DEFAULT_SOUL_PROMPT));
@@ -1 +1 @@
1
- {"version":3,"file":"branding.d.ts","sourceRoot":"","sources":["../../src/extensions/branding.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,+BAA+B,CAAC;AAwEpF,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,YAAY,QAmOjD;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"branding.d.ts","sourceRoot":"","sources":["../../src/extensions/branding.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,+BAA+B,CAAC;AAyEpF,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,YAAY,QA8OjD;AAED,eAAe,iBAAiB,CAAC"}
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import { basename } from "node:path";
10
10
  import { MU_DEFAULT_THEME_NAME, MU_VERSION } from "../ui_defaults.js";
11
+ import { getActiveHudMode } from "./hud-mode.js";
11
12
  import { registerMuSubcommand } from "./mu-command-dispatcher.js";
12
13
  import { fetchMuStatus, muServerUrl } from "./shared.js";
13
14
  const EMPTY_SNAPSHOT = {
@@ -127,6 +128,16 @@ export function brandingExtension(pi) {
127
128
  const barColor = pct >= 80 ? "warning" : pct >= 60 ? "muted" : "dim";
128
129
  parts.push(theme.fg("muted", "·"), theme.fg(barColor, `ctx ${pct}%`), theme.fg(barColor, contextBar(pct, 10)));
129
130
  }
131
+ const activeHudMode = getActiveHudMode();
132
+ if (activeHudMode) {
133
+ const extensionStatuses = footerData.getExtensionStatuses();
134
+ const modeMetaKey = activeHudMode === "planning" ? "mu-planning-meta" : "mu-subagents-meta";
135
+ const modeMeta = extensionStatuses.get(modeMetaKey) ?? "";
136
+ parts.push(theme.fg("muted", "·"), theme.fg("accent", `hud:${activeHudMode}`));
137
+ if (modeMeta.length > 0) {
138
+ parts.push(theme.fg("muted", "·"), theme.fg("dim", truncateToWidth(modeMeta, 42)));
139
+ }
140
+ }
130
141
  if (snapshot.openCount > 0 || snapshot.readyCount > 0) {
131
142
  parts.push(theme.fg("muted", "·"), theme.fg("dim", `open ${snapshot.openCount} ready ${snapshot.readyCount}`));
132
143
  }
@@ -0,0 +1,8 @@
1
+ import type { ExtensionContext } from "@mariozechner/pi-coding-agent";
2
+ export type MuHudMode = "planning" | "subagents";
3
+ export declare function getActiveHudMode(): MuHudMode | null;
4
+ export declare function resetHudMode(): void;
5
+ export declare function setActiveHudMode(mode: MuHudMode | null): void;
6
+ export declare function clearHudMode(mode: MuHudMode): void;
7
+ export declare function syncHudModeStatus(ctx: ExtensionContext): void;
8
+ //# sourceMappingURL=hud-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hud-mode.d.ts","sourceRoot":"","sources":["../../src/extensions/hud-mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;AAIjD,wBAAgB,gBAAgB,IAAI,SAAS,GAAG,IAAI,CAEnD;AAED,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAE7D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAIlD;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAK7D"}
@@ -0,0 +1,21 @@
1
+ let activeHudMode = null;
2
+ export function getActiveHudMode() {
3
+ return activeHudMode;
4
+ }
5
+ export function resetHudMode() {
6
+ activeHudMode = null;
7
+ }
8
+ export function setActiveHudMode(mode) {
9
+ activeHudMode = mode;
10
+ }
11
+ export function clearHudMode(mode) {
12
+ if (activeHudMode === mode) {
13
+ activeHudMode = null;
14
+ }
15
+ }
16
+ export function syncHudModeStatus(ctx) {
17
+ if (!ctx.hasUI) {
18
+ return;
19
+ }
20
+ ctx.ui.setStatus("mu-hud-mode", activeHudMode ? `hud:${activeHudMode}` : undefined);
21
+ }
@@ -12,10 +12,4 @@ export declare const serveExtensionPaths: string[];
12
12
  * Operator-mode extension — single facade that bundles operator UI helpers.
13
13
  */
14
14
  export declare const operatorExtensionPaths: string[];
15
- /**
16
- * Orchestrator and worker sessions run with the generic built-in tools
17
- * (bash/read/write/edit) and invoke `mu` CLI directly.
18
- */
19
- export declare const orchestratorToolExtensionPaths: string[];
20
- export declare const workerToolExtensionPaths: string[];
21
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extensions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAQzD;;GAEG;AACH,eAAO,MAAM,mBAAmB,UAA4C,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,sBAAsB,UAA+C,CAAC;AAEnF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,MAAM,EAAO,CAAC;AAC3D,eAAO,MAAM,wBAAwB,EAAE,MAAM,EAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extensions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAQzD;;GAEG;AACH,eAAO,MAAM,mBAAmB,UAA4C,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,sBAAsB,UAA+C,CAAC"}
@@ -16,9 +16,3 @@ export const serveExtensionPaths = [resolveBundledExtensionPath("mu-serve")];
16
16
  * Operator-mode extension — single facade that bundles operator UI helpers.
17
17
  */
18
18
  export const operatorExtensionPaths = [resolveBundledExtensionPath("mu-operator")];
19
- /**
20
- * Orchestrator and worker sessions run with the generic built-in tools
21
- * (bash/read/write/edit) and invoke `mu` CLI directly.
22
- */
23
- export const orchestratorToolExtensionPaths = [];
24
- export const workerToolExtensionPaths = [];
@@ -1 +1 @@
1
- {"version":3,"file":"planning-ui.d.ts","sourceRoot":"","sources":["../../src/extensions/planning-ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,+BAA+B,CAAC;AA2fpF,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,YAAY,QAydnD;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"planning-ui.d.ts","sourceRoot":"","sources":["../../src/extensions/planning-ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,+BAA+B,CAAC;AAigBpF,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,YAAY,QAuenD;AAED,eAAe,mBAAmB,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { clearHudMode, setActiveHudMode, syncHudModeStatus } from "./hud-mode.js";
1
2
  import { registerMuSubcommand } from "./mu-command-dispatcher.js";
2
3
  const DEFAULT_STEPS = [
3
4
  "Investigate relevant code/docs/state",
@@ -252,6 +253,7 @@ function renderPlanningUi(ctx, state) {
252
253
  }
253
254
  if (!state.enabled) {
254
255
  ctx.ui.setStatus("mu-planning", undefined);
256
+ ctx.ui.setStatus("mu-planning-meta", undefined);
255
257
  ctx.ui.setWidget("mu-planning", undefined);
256
258
  return;
257
259
  }
@@ -276,6 +278,7 @@ function renderPlanningUi(ctx, state) {
276
278
  ctx.ui.theme.fg(waitingColor, `wait:${waitingLabel}`),
277
279
  ctx.ui.theme.fg("muted", `root:${rootCompact}`),
278
280
  ].join(` ${ctx.ui.theme.fg("muted", "·")} `));
281
+ ctx.ui.setStatus("mu-planning-meta", `phase:${phase} steps:${done}/${total} wait:${waitingLabel} conf:${state.confidence}`);
279
282
  const lines = [
280
283
  [
281
284
  ctx.ui.theme.fg("accent", ctx.ui.theme.bold("Planning")),
@@ -387,6 +390,16 @@ export function planningUiExtension(pi) {
387
390
  const refresh = (ctx) => {
388
391
  renderPlanningUi(ctx, state);
389
392
  };
393
+ const syncPlanningMode = (ctx, action) => {
394
+ const passiveAction = action === "status" || action === "snapshot";
395
+ if (!state.enabled) {
396
+ clearHudMode("planning");
397
+ }
398
+ else if (!passiveAction) {
399
+ setActiveHudMode("planning");
400
+ }
401
+ syncHudModeStatus(ctx);
402
+ };
390
403
  const applyPlanningAction = (params) => {
391
404
  switch (params.action) {
392
405
  case "status":
@@ -647,9 +660,11 @@ export function planningUiExtension(pi) {
647
660
  };
648
661
  pi.on("session_start", async (_event, ctx) => {
649
662
  refresh(ctx);
663
+ syncHudModeStatus(ctx);
650
664
  });
651
665
  pi.on("session_switch", async (_event, ctx) => {
652
666
  refresh(ctx);
667
+ syncHudModeStatus(ctx);
653
668
  });
654
669
  registerMuSubcommand(pi, {
655
670
  subcommand: "plan",
@@ -733,6 +748,7 @@ export function planningUiExtension(pi) {
733
748
  notify(ctx, result.message, result.level ?? "error");
734
749
  return;
735
750
  }
751
+ syncPlanningMode(ctx, params.action);
736
752
  ctx.ui.notify(result.message, result.level ?? "info");
737
753
  },
738
754
  });
@@ -823,6 +839,7 @@ export function planningUiExtension(pi) {
823
839
  if (!result.ok) {
824
840
  return planningToolError(result.message);
825
841
  }
842
+ syncPlanningMode(ctx, params.action);
826
843
  return {
827
844
  content: [{ type: "text", text: `${result.message}\n\n${planningStatusSummary(state)}` }],
828
845
  details: {
@@ -1 +1 @@
1
- {"version":3,"file":"subagents-ui.d.ts","sourceRoot":"","sources":["../../src/extensions/subagents-ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,+BAA+B,CAAC;AA2uBpF,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,YAAY,QAwmBpD;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"subagents-ui.d.ts","sourceRoot":"","sources":["../../src/extensions/subagents-ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,+BAA+B,CAAC;AA63BpF,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,YAAY,QAkoBpD;AAED,eAAe,oBAAoB,CAAC"}