mu-agent 0.1.8 → 0.1.10
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/CHANGELOG.md +27 -0
- package/README.md +34 -30
- package/dist/bundle/chunks/anthropic-messages-4PAJY4R6.js +6 -0
- package/dist/bundle/chunks/anthropic.js +1 -1
- package/dist/bundle/chunks/azure-openai-responses-Y4BBWQ3N.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +12 -9
- package/dist/bundle/chunks/{chunk-TRDNDS6A.js → chunk-3V45WARH.js} +6 -3
- package/dist/bundle/chunks/{chunk-S3GGRYIO.js → chunk-5AGIVGSV.js} +1 -1
- package/dist/bundle/chunks/chunk-6QGV3IWD.js +6 -0
- package/dist/bundle/chunks/{chunk-F5ZABL6Z.js → chunk-7CBJINYJ.js} +2 -2
- package/dist/bundle/chunks/{chunk-DRQDKNXA.js → chunk-7DDKXS2Q.js} +1 -1
- package/dist/bundle/chunks/chunk-BSS6T6KQ.js +2 -0
- package/dist/bundle/chunks/{chunk-H3QXYIF7.js → chunk-CF5GWZHW.js} +1 -1
- package/dist/bundle/chunks/{chunk-4OBXYPH4.js → chunk-DNNHZBQR.js} +1 -1
- package/dist/bundle/chunks/chunk-FN6OEZYR.js +2 -0
- package/dist/bundle/chunks/chunk-FTJT2X6E.js +2 -0
- package/dist/bundle/chunks/chunk-HZNN636Z.js +130 -0
- package/dist/bundle/chunks/{chunk-4L3WN2XY.js → chunk-JXWJOIH4.js} +1 -1
- package/dist/bundle/chunks/{chunk-TAOL3JFA.js → chunk-KIDDRTZP.js} +4 -4
- package/dist/bundle/chunks/chunk-LMNWTX2L.js +11 -0
- package/dist/bundle/chunks/chunk-LPXNMA2W.js +2 -0
- package/dist/bundle/chunks/{chunk-6CYCI3EJ.js → chunk-LVVZS2NO.js} +1 -1
- package/dist/bundle/chunks/chunk-NN4BEPYX.js +2 -0
- package/dist/bundle/chunks/{chunk-NG4PO5FP.js → chunk-O7IPTASE.js} +120 -103
- package/dist/bundle/chunks/{chunk-LD2P6SFZ.js → chunk-PMRZO46Y.js} +1 -1
- package/dist/bundle/chunks/chunk-QOEEJKS4.js +9 -0
- package/dist/bundle/chunks/chunk-R4VPBBDS.js +2 -0
- package/dist/bundle/chunks/{chunk-NTSWBG4X.js → chunk-RAQ6TU76.js} +1 -1
- package/dist/bundle/chunks/chunk-RDZVAGPR.js +2 -0
- package/dist/bundle/chunks/chunk-SGOTYFMT.js +91 -0
- package/dist/bundle/chunks/chunk-TMTOQ7H7.js +2 -0
- package/dist/bundle/chunks/chunk-UKVNB6C4.js +2 -0
- package/dist/bundle/chunks/chunk-VJLOQZKR.js +9 -0
- package/dist/bundle/chunks/chunk-WCGU75WO.js +11 -0
- package/dist/bundle/chunks/{chunk-RLZVFGW4.js → chunk-X234222Q.js} +29 -92
- package/dist/bundle/chunks/{cli-AOVD3SSZ.js → cli-722OL3K5.js} +4 -4
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-MEZHQVNP.js +2 -0
- package/dist/bundle/chunks/codemode-worker.js +117 -13
- package/dist/bundle/chunks/easter-egg-3d-6H34EDGX.js +2 -0
- package/dist/bundle/chunks/execute-KVSEIDWL.js +499 -0
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{google-generative-ai-XMFHGQC5.js → google-generative-ai-D2VJQBTK.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-4XRRNP74.js → google-vertex-SQG2BO6C.js} +1 -1
- package/dist/bundle/chunks/https-proxy-agent-LVOO5TPL.js +13 -0
- package/dist/bundle/chunks/image-resize-worker.js +1 -1
- package/dist/bundle/chunks/{jiti-loader-C3NU2SDH.js → jiti-loader-GL4HJFAD.js} +1 -1
- package/dist/bundle/chunks/{jiti-static-loader-E6ANQD5T.js → jiti-static-loader-2RCDI6B4.js} +1 -1
- package/dist/bundle/chunks/{lib-TEDK3E5I.js → lib-4AVRLBHM.js} +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-XT44PI3C.js → llama-cpp-classify-5YHLY3RC.js} +2 -2
- package/dist/bundle/chunks/mistral-conversations-BDARVJTT.js +5 -0
- package/dist/bundle/chunks/{multipart-parser-SQ6GDJL7.js → multipart-parser-FMGQ7342.js} +1 -1
- package/dist/bundle/chunks/{node-TWVVAGPO.js → node-AUOGOBCN.js} +1 -1
- package/dist/bundle/chunks/{node-N5BSDOA5.js → node-KCMANYC2.js} +1 -1
- package/dist/bundle/chunks/openai-chatgpt.js +1 -1
- package/dist/bundle/chunks/openai-codex-responses-CECGTDYD.js +10 -0
- package/dist/bundle/chunks/openai-codex.js +1 -1
- package/dist/bundle/chunks/openai-completions-UOA7MELD.js +7 -0
- package/dist/bundle/chunks/openai-decisions-HLM372N6.js +5 -0
- package/dist/bundle/chunks/openai-responses-TII7ZY5X.js +3 -0
- package/dist/bundle/chunks/{openrouter-images-ZVXWCSIM.js → openrouter-images-7T452AS5.js} +1 -1
- package/dist/bundle/chunks/{pi-messages-TM5SOOIW.js → pi-messages-2UDKLKOO.js} +1 -1
- package/dist/bundle/chunks/runtime-O3ELDOM7.js +2 -0
- package/dist/bundle/chunks/{src-UK77SYZE.js → src-QKGKDFSU.js} +1 -1
- package/dist/bundle/chunks/typesafe-system-one-KNCICMO5.js +2 -0
- package/dist/bundle/chunks/virtual-modules-IKEARUOZ.js +2 -0
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/core/export-html/template.js +21 -16
- package/dist/modes/interactive/theme/dark.json +1 -1
- package/dist/modes/interactive/theme/light.json +1 -1
- package/dist/modes/interactive/theme/theme-schema.d.ts +28 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.js +105 -0
- package/dist/modes/interactive/theme/theme-schema.js.map +1 -0
- package/dist/modes/interactive/theme/theme-tokens.d.ts +257 -0
- package/dist/modes/interactive/theme/theme-tokens.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-tokens.js +94 -0
- package/dist/modes/interactive/theme/theme-tokens.js.map +1 -0
- package/dist/modes/interactive/theme/theme.d.ts +13 -16
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +22 -29
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/docs/cli-integration.md +1 -1
- package/docs/cli.md +22 -10
- package/docs/codemode.md +29 -6
- package/docs/compaction.md +5 -5
- package/docs/custom-provider.md +53 -1
- package/docs/docs.json +8 -0
- package/docs/environment-variables.md +3 -1
- package/docs/extensions.md +122 -13
- package/docs/json.md +3 -3
- package/docs/keybindings.md +5 -4
- package/docs/llama-cpp.md +9 -2
- package/docs/mcp.md +4 -2
- package/docs/message-types.md +22 -4
- package/docs/models-configuration.md +187 -0
- package/docs/models.md +18 -2
- package/docs/nvidia-rtx-llama-cpp.md +96 -0
- package/docs/providers.md +47 -0
- package/docs/sessions.md +1 -1
- package/docs/settings.md +8 -5
- package/docs/terminal-setup.md +14 -0
- package/docs/themes.md +4 -2
- package/docs/tui.md +71 -1
- package/docs/usage.md +1 -1
- package/examples/README.md +0 -3
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/dynamic-resources/dynamic.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/minimal-mode.ts +4 -5
- package/examples/extensions/overlay-test.ts +2 -2
- package/examples/extensions/plan-mode/index.ts +6 -2
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/index.ts +4 -6
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/judge/dist/auth.js +41 -10
- package/judge/dist/import.js +26 -21
- package/judge/dist/setup.js +124 -120
- package/judge/manifest.json +630 -250
- package/judge/{dist/kyrn-judge.js → mu/index.js} +1393 -545
- package/judge/themes/mu-dark.json +80 -0
- package/judge/themes/mu-light.json +80 -0
- package/kyrn/bin/kyrn-doctor +17 -17
- package/kyrn/bin/kyrn-judge-local +2 -2
- package/kyrn/bin/kyrn-ledger +1 -1
- package/kyrn/bin/mu.mjs +74 -47
- package/package.json +4 -5
- package/dist/bundle/chunks/anthropic-messages-MI4QHRXW.js +0 -6
- package/dist/bundle/chunks/azure-openai-responses-E3QGN4VN.js +0 -2
- package/dist/bundle/chunks/chunk-33KL6IIQ.js +0 -20
- package/dist/bundle/chunks/chunk-A3JYRWB6.js +0 -2
- package/dist/bundle/chunks/chunk-C47CLQZK.js +0 -2
- package/dist/bundle/chunks/chunk-HQHD6PZI.js +0 -2
- package/dist/bundle/chunks/chunk-KJUDFE6Y.js +0 -11
- package/dist/bundle/chunks/chunk-TE3GUV6H.js +0 -9
- package/dist/bundle/chunks/chunk-VIV3CWXG.js +0 -2
- package/dist/bundle/chunks/chunk-WE4MXUQS.js +0 -11
- package/dist/bundle/chunks/chunk-Y2PP32XV.js +0 -2
- package/dist/bundle/chunks/chunk-YLY6CKPK.js +0 -132
- package/dist/bundle/chunks/chunk-ZE5FMF3V.js +0 -99
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-NM3JRRWQ.js +0 -2
- package/dist/bundle/chunks/easter-egg-3d-G2LUBEMZ.js +0 -2
- package/dist/bundle/chunks/execute-MZVUC6BB.js +0 -388
- package/dist/bundle/chunks/https-proxy-agent-2VXB7436.js +0 -13
- package/dist/bundle/chunks/mistral-conversations-Q22M3IBG.js +0 -5
- package/dist/bundle/chunks/openai-codex-responses-4MYQSO5E.js +0 -10
- package/dist/bundle/chunks/openai-completions-OSRCWAAA.js +0 -7
- package/dist/bundle/chunks/openai-responses-UHF3DHNG.js +0 -3
- package/dist/bundle/chunks/runtime-VJMMDLVH.js +0 -2
- package/dist/bundle/chunks/typesafe-system-one-PRR5K6CI.js +0 -2
- package/dist/bundle/chunks/virtual-modules-RJXJGCPI.js +0 -2
- package/dist/modes/interactive/theme/theme-json.d.ts +0 -85
- package/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme-json.js +0 -132
- package/dist/modes/interactive/theme/theme-json.js.map +0 -1
- package/dist/modes/interactive/theme/theme-schema.json +0 -361
- package/examples/plugins/pi-example-plugin/README.md +0 -38
- package/examples/plugins/pi-example-plugin/package.json +0 -10
- package/examples/plugins/pi-example-plugin/src/contract.ts +0 -13
- package/examples/plugins/pi-example-plugin/src/session.ts +0 -24
- package/examples/plugins/pi-example-plugin/src/tui.ts +0 -31
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://pi.dev/schemas/theme.schema.json",
|
|
3
|
+
"name": "mu-dark",
|
|
4
|
+
"appearance": "dark",
|
|
5
|
+
"vars": {
|
|
6
|
+
"text": "#e6e6ec",
|
|
7
|
+
"muted": "#a1a1ad",
|
|
8
|
+
"dim": "#6e6e7a",
|
|
9
|
+
"violet": "#b2a4ff",
|
|
10
|
+
"pink": "#ff8ad8",
|
|
11
|
+
"blue": "#8fa2ff",
|
|
12
|
+
"green": "#4ade9b",
|
|
13
|
+
"red": "#ff6b81",
|
|
14
|
+
"amber": "#f5b544",
|
|
15
|
+
"rule": "#3a3a46"
|
|
16
|
+
},
|
|
17
|
+
"colors": {
|
|
18
|
+
"accent": "violet",
|
|
19
|
+
"border": "rule",
|
|
20
|
+
"borderAccent": "#8f7cf7",
|
|
21
|
+
"borderMuted": "#2a2a33",
|
|
22
|
+
"success": "green",
|
|
23
|
+
"error": "red",
|
|
24
|
+
"warning": "amber",
|
|
25
|
+
"muted": "muted",
|
|
26
|
+
"dim": "dim",
|
|
27
|
+
"text": "text",
|
|
28
|
+
"thinkingText": "#9a9aa6",
|
|
29
|
+
"selectedBg": "#2a2550",
|
|
30
|
+
"scrollbarTrack": "#26262e",
|
|
31
|
+
"scrollbarThumb": "dim",
|
|
32
|
+
"searchMatchBg": "#4a3a12",
|
|
33
|
+
"searchMatchText": "text",
|
|
34
|
+
"userMessageBg": "#17171d",
|
|
35
|
+
"userMessageText": "text",
|
|
36
|
+
"customMessageBg": "#1c1119",
|
|
37
|
+
"customMessageText": "muted",
|
|
38
|
+
"customMessageLabel": "pink",
|
|
39
|
+
"toolPendingBg": "#16161c",
|
|
40
|
+
"toolSuccessBg": "#10201a",
|
|
41
|
+
"toolErrorBg": "#2a1317",
|
|
42
|
+
"toolTitle": "text",
|
|
43
|
+
"toolOutput": "muted",
|
|
44
|
+
"mdHeading": "#d3caff",
|
|
45
|
+
"mdLink": "blue",
|
|
46
|
+
"mdLinkUrl": "dim",
|
|
47
|
+
"mdCode": "#c9beff",
|
|
48
|
+
"mdCodeBlock": "#d7d7df",
|
|
49
|
+
"mdCodeBlockBorder": "rule",
|
|
50
|
+
"mdQuote": "muted",
|
|
51
|
+
"mdQuoteBorder": "rule",
|
|
52
|
+
"mdHr": "rule",
|
|
53
|
+
"mdListBullet": "violet",
|
|
54
|
+
"toolDiffAdded": "green",
|
|
55
|
+
"toolDiffRemoved": "red",
|
|
56
|
+
"toolDiffContext": "dim",
|
|
57
|
+
"syntaxComment": "#7a7a86",
|
|
58
|
+
"syntaxKeyword": "#b9abff",
|
|
59
|
+
"syntaxFunction": "#9fb0ff",
|
|
60
|
+
"syntaxVariable": "text",
|
|
61
|
+
"syntaxString": "#ff9fdf",
|
|
62
|
+
"syntaxNumber": "#ffbd7a",
|
|
63
|
+
"syntaxType": "#6fd6d0",
|
|
64
|
+
"syntaxOperator": "muted",
|
|
65
|
+
"syntaxPunctuation": "muted",
|
|
66
|
+
"thinkingOff": "#5c5c66",
|
|
67
|
+
"thinkingMinimal": "#6e6e8a",
|
|
68
|
+
"thinkingLow": "#8585b8",
|
|
69
|
+
"thinkingMedium": "#9d8cff",
|
|
70
|
+
"thinkingHigh": "#c58cff",
|
|
71
|
+
"thinkingXhigh": "pink",
|
|
72
|
+
"thinkingMax": "red",
|
|
73
|
+
"bashMode": "green"
|
|
74
|
+
},
|
|
75
|
+
"export": {
|
|
76
|
+
"pageBg": "#0b0b0e",
|
|
77
|
+
"cardBg": "#121217",
|
|
78
|
+
"infoBg": "#2a2410"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://pi.dev/schemas/theme.schema.json",
|
|
3
|
+
"name": "mu-light",
|
|
4
|
+
"appearance": "light",
|
|
5
|
+
"vars": {
|
|
6
|
+
"text": "#18181c",
|
|
7
|
+
"muted": "#55555f",
|
|
8
|
+
"dim": "#85858f",
|
|
9
|
+
"violet": "#5b45db",
|
|
10
|
+
"pink": "#b42d86",
|
|
11
|
+
"blue": "#3d55c9",
|
|
12
|
+
"green": "#0e7f55",
|
|
13
|
+
"red": "#cc2f55",
|
|
14
|
+
"amber": "#9a5a06",
|
|
15
|
+
"rule": "#d4d4da"
|
|
16
|
+
},
|
|
17
|
+
"colors": {
|
|
18
|
+
"accent": "violet",
|
|
19
|
+
"border": "rule",
|
|
20
|
+
"borderAccent": "#7f6af0",
|
|
21
|
+
"borderMuted": "#e6e6ea",
|
|
22
|
+
"success": "green",
|
|
23
|
+
"error": "red",
|
|
24
|
+
"warning": "amber",
|
|
25
|
+
"muted": "muted",
|
|
26
|
+
"dim": "dim",
|
|
27
|
+
"text": "text",
|
|
28
|
+
"thinkingText": "#6a6a74",
|
|
29
|
+
"selectedBg": "#e6e1ff",
|
|
30
|
+
"scrollbarTrack": "#ececf0",
|
|
31
|
+
"scrollbarThumb": "#a6a6b0",
|
|
32
|
+
"searchMatchBg": "#fff0c2",
|
|
33
|
+
"searchMatchText": "text",
|
|
34
|
+
"userMessageBg": "#f3f3f0",
|
|
35
|
+
"userMessageText": "text",
|
|
36
|
+
"customMessageBg": "#fff4fb",
|
|
37
|
+
"customMessageText": "muted",
|
|
38
|
+
"customMessageLabel": "pink",
|
|
39
|
+
"toolPendingBg": "#f6f6f4",
|
|
40
|
+
"toolSuccessBg": "#eef8f2",
|
|
41
|
+
"toolErrorBg": "#fdf0f2",
|
|
42
|
+
"toolTitle": "text",
|
|
43
|
+
"toolOutput": "muted",
|
|
44
|
+
"mdHeading": "#3a2a96",
|
|
45
|
+
"mdLink": "blue",
|
|
46
|
+
"mdLinkUrl": "dim",
|
|
47
|
+
"mdCode": "violet",
|
|
48
|
+
"mdCodeBlock": "#2a2a30",
|
|
49
|
+
"mdCodeBlockBorder": "rule",
|
|
50
|
+
"mdQuote": "muted",
|
|
51
|
+
"mdQuoteBorder": "rule",
|
|
52
|
+
"mdHr": "rule",
|
|
53
|
+
"mdListBullet": "violet",
|
|
54
|
+
"toolDiffAdded": "green",
|
|
55
|
+
"toolDiffRemoved": "red",
|
|
56
|
+
"toolDiffContext": "dim",
|
|
57
|
+
"syntaxComment": "#6a6a73",
|
|
58
|
+
"syntaxKeyword": "violet",
|
|
59
|
+
"syntaxFunction": "#3f4dc0",
|
|
60
|
+
"syntaxVariable": "text",
|
|
61
|
+
"syntaxString": "pink",
|
|
62
|
+
"syntaxNumber": "#9a5208",
|
|
63
|
+
"syntaxType": "#0b767c",
|
|
64
|
+
"syntaxOperator": "muted",
|
|
65
|
+
"syntaxPunctuation": "muted",
|
|
66
|
+
"thinkingOff": "#a6a6b0",
|
|
67
|
+
"thinkingMinimal": "#8a8ab0",
|
|
68
|
+
"thinkingLow": "#6a6ad0",
|
|
69
|
+
"thinkingMedium": "violet",
|
|
70
|
+
"thinkingHigh": "#8a2fc0",
|
|
71
|
+
"thinkingXhigh": "pink",
|
|
72
|
+
"thinkingMax": "red",
|
|
73
|
+
"bashMode": "green"
|
|
74
|
+
},
|
|
75
|
+
"export": {
|
|
76
|
+
"pageBg": "#ffffff",
|
|
77
|
+
"cardBg": "#f7f7f5",
|
|
78
|
+
"infoBg": "#fff6dc"
|
|
79
|
+
}
|
|
80
|
+
}
|
package/kyrn/bin/kyrn-doctor
CHANGED
|
@@ -87,13 +87,13 @@ if (layout === "package") {
|
|
|
87
87
|
row(
|
|
88
88
|
linked ? "ok" : "--",
|
|
89
89
|
"command",
|
|
90
|
-
linked ? linked.replaceAll(homedir(), "~") : `not on PATH yet: ${join(root, "kyrn", "bin", process.platform === "win32" ? "mu.cmd" : "mu")} link`,
|
|
90
|
+
linked ? linked.replaceAll(homedir(), "~") : `not on your PATH yet: run ${join(root, "kyrn", "bin", process.platform === "win32" ? "mu.cmd" : "mu")} link`,
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
row("--", "home", tilde(agentDir));
|
|
95
95
|
if (home === ".kyrn" && agentDir.startsWith(join(homedir(), ".kyrn"))) {
|
|
96
|
-
row("--", "", "this home
|
|
96
|
+
row("--", "", "this home folder predates the rename: `mu migrate` moves it to ~/.mu (add `--dry-run` to preview)");
|
|
97
97
|
}
|
|
98
98
|
// Only the size is looked at: pi writes an empty `{}` at its first start, and any stored login is far longer.
|
|
99
99
|
let authBytes = 0;
|
|
@@ -112,23 +112,23 @@ row(
|
|
|
112
112
|
"model",
|
|
113
113
|
settings.defaultModel
|
|
114
114
|
? `${settings.defaultProvider ?? "?"}/${settings.defaultModel}${settings.defaultThinkingLevel ? ` · thinking ${settings.defaultThinkingLevel}` : ""}`
|
|
115
|
-
: "no default: the first provider with credentials
|
|
115
|
+
: "no default: mu uses the first provider with credentials. Pick one with /model and save it with ctrl+s",
|
|
116
116
|
);
|
|
117
117
|
|
|
118
118
|
const config = readJson(join(agentDir, "mu.json")) ?? readJson(join(agentDir, "kyrn.json"));
|
|
119
119
|
const tiers = (env("JUDGE") ? env("JUDGE").split(",") : (config?.tiers ?? ["jev"])).map((tier) => tier.trim());
|
|
120
120
|
const mode = env("JUDGE_MODE") ?? config?.modes?.default ?? "active";
|
|
121
|
-
row("--", "judges", `${tiers.join(" > ")} ·
|
|
121
|
+
row("--", "judges", `${tiers.join(" > ")} · default mode ${mode}${env("JUDGE") ? " (from MU_JUDGE)" : ""}`);
|
|
122
122
|
const overrides = Object.entries(config?.modes ?? {}).filter(([id]) => id !== "default");
|
|
123
123
|
if (overrides.length > 0) row("--", "modes", overrides.map(([id, value]) => `${id}=${value}`).join(" "));
|
|
124
124
|
const ladder = config?.features?.swarm?.models ?? [];
|
|
125
|
-
row("--", "
|
|
125
|
+
row("--", "subagents", ladder.length > 0 ? `model ladder ${ladder.join(" < ")}` : "use the session's model (no ladder configured)");
|
|
126
126
|
|
|
127
127
|
const judgeSupport = localJudgeSupport({ platform: process.platform, env: process.env, wsl });
|
|
128
128
|
if (tiers.some((tier) => tier.startsWith("laya")) && !judgeSupport.runs && !judgeSupport.url) {
|
|
129
129
|
// Not a failure of this installation: the sidecar is Core ML, and there is none for this platform.
|
|
130
|
-
row("--", "local judge", `not available on ${platformName({ platform: process.platform, wsl })}: the Laya sidecar
|
|
131
|
-
row("--", "", "
|
|
130
|
+
row("--", "local judge", `not available on ${platformName({ platform: process.platform, wsl })}: the Laya sidecar needs Core ML (macOS on Apple silicon)`);
|
|
131
|
+
row("--", "", "Laya's decision points use the next judge or their fallbacks. Use Jev, an LLM judge or MU_LOCAL_JUDGE_URL=<a server with the same API>");
|
|
132
132
|
} else if (tiers.some((tier) => tier.startsWith("laya"))) {
|
|
133
133
|
const base = env("LOCAL_JUDGE_URL") ?? `http://127.0.0.1:${env("LOCAL_JUDGE_PORT") ?? 47823}`;
|
|
134
134
|
const startedAt = performance.now();
|
|
@@ -142,8 +142,8 @@ if (tiers.some((tier) => tier.startsWith("laya")) && !judgeSupport.runs && !judg
|
|
|
142
142
|
"fix",
|
|
143
143
|
"local judge",
|
|
144
144
|
judgeSupport.runs
|
|
145
|
-
? `${base}
|
|
146
|
-
: `${base} (MU_LOCAL_JUDGE_URL)
|
|
145
|
+
? `${base} isn't answering: run mu judge start (first time: mu judge setup)`
|
|
146
|
+
: `${base} (MU_LOCAL_JUDGE_URL) isn't answering`,
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
@@ -192,7 +192,7 @@ if (jevTier) {
|
|
|
192
192
|
"jev key",
|
|
193
193
|
route
|
|
194
194
|
? `${route[0]} is set: ${route[1]} (value not shown)`
|
|
195
|
-
: `none set: Jev 1.13 on OpenCode Zen
|
|
195
|
+
: `none set: using Jev 1.13 on OpenCode Zen, free for a limited time (what the judge reads goes to OpenCode). To use your own key, add TYPESAFE_API_KEY (or MU_JUDGE_OPENROUTER_API_KEY, AI_GATEWAY_API_KEY, OPENCODE_API_KEY) ${where}`,
|
|
196
196
|
);
|
|
197
197
|
} else {
|
|
198
198
|
const name = judge.apiKeyEnv ?? (judge.type === "gateway" ? "AI_GATEWAY_API_KEY" : "TYPESAFE_API_KEY");
|
|
@@ -207,7 +207,7 @@ if (jevTier) {
|
|
|
207
207
|
has(name) && !unsent ? "ok" : "fix",
|
|
208
208
|
"jev key",
|
|
209
209
|
unsent
|
|
210
|
-
? `${jevTier} has no baseUrl
|
|
210
|
+
? `${jevTier} has no baseUrl, so its key ${name} isn't sent anywhere: add the address the key is for`
|
|
211
211
|
: has(name)
|
|
212
212
|
? `${name} is set: Jev is called ${via} (value not shown)`
|
|
213
213
|
: `missing: add ${name} ${where} (Jev is called ${via})`,
|
|
@@ -229,9 +229,9 @@ for (const model of new Set(askedTiers.map(classifierOf).filter((judge) => judge
|
|
|
229
229
|
// OpenCode's free models answer without a key (the client sends "public", as OpenCode's own does).
|
|
230
230
|
const names = provider === "opencode" && String(model).endsWith("-free") ? [] : CLASSIFIER_KEYS[provider];
|
|
231
231
|
if (!model?.includes("/")) {
|
|
232
|
-
row("fix", "classifier", `${model ?? "a classifier judge"} needs a model
|
|
232
|
+
row("fix", "classifier", `${model ?? "a classifier judge"} needs a model in the form provider/model-id`);
|
|
233
233
|
} else if (!names) {
|
|
234
|
-
row("--", "classifier", `${model}: a provider of your own
|
|
234
|
+
row("--", "classifier", `${model}: a provider of your own: mu uses the key models.json names for it`);
|
|
235
235
|
} else if (names.every(has)) {
|
|
236
236
|
row("ok", "classifier", `${model}: ${names.length > 0 ? `${names.join(", ")} set (value not shown)` : "no key needed"}`);
|
|
237
237
|
} else {
|
|
@@ -268,15 +268,15 @@ for (const endpoint of new Set(clmJudges.map((judge) => clmEndpoint(judge.baseUr
|
|
|
268
268
|
} catch {}
|
|
269
269
|
const ms = Math.round(performance.now() - startedAt);
|
|
270
270
|
if (health?.ok !== true) {
|
|
271
|
-
row("fix", "clm", `${base}
|
|
271
|
+
row("fix", "clm", `${base} isn't answering: start clm-serve there, or point the judge's baseUrl in mu.json at a running one`);
|
|
272
272
|
continue;
|
|
273
273
|
}
|
|
274
274
|
const served = Array.isArray(health.models) ? health.models : [];
|
|
275
275
|
const missing = [...new Set(judges.map((judge) => judge.model || "clm-latest"))].filter((model) => !served.includes(model));
|
|
276
276
|
if (health.embedder === false) {
|
|
277
|
-
row("fix", "clm", `${host} answers, but its encoder
|
|
277
|
+
row("fix", "clm", `${host} answers, but its encoder doesn't: every question fails until the embedding server is up`);
|
|
278
278
|
} else if (missing.length > 0) {
|
|
279
|
-
row("fix", "clm", `${host}
|
|
279
|
+
row("fix", "clm", `${host} doesn't serve ${missing.join(", ")} (it serves ${served.join(", ")})`);
|
|
280
280
|
} else {
|
|
281
281
|
row("ok", "clm", `${host} · ${served.join(", ")} · ${ms} ms`);
|
|
282
282
|
}
|
|
@@ -330,7 +330,7 @@ row(
|
|
|
330
330
|
"browse",
|
|
331
331
|
[browseTiers].flat().some(canRelate)
|
|
332
332
|
? `driven by ${[browseTiers].flat().join(" > ")}`
|
|
333
|
-
: 'needs a judge that can
|
|
333
|
+
: 'needs a judge that can match a goal to a page. In mu.json: "routes": { "browser.step": ["llm:openai-codex/gpt-5.6-luna"] }',
|
|
334
334
|
);
|
|
335
335
|
|
|
336
336
|
const marks = { ok: "\x1b[32m ok\x1b[0m", fix: "\x1b[33mfix\x1b[0m", "--": "\x1b[2m ·\x1b[0m" };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Manage the mu local judge sidecar (Laya on Core ML, Apple
|
|
2
|
+
# Manage the mu local judge sidecar (Laya on Core ML, Apple silicon only).
|
|
3
3
|
#
|
|
4
4
|
# kyrn/bin/kyrn-judge-local setup create the venv, install pinned deps, download the weights (~680 MB)
|
|
5
5
|
# kyrn/bin/kyrn-judge-local start start in the background if it is not already running
|
|
@@ -41,7 +41,7 @@ require_setup() {
|
|
|
41
41
|
|
|
42
42
|
cmd_setup() {
|
|
43
43
|
if [[ "$(uname -s)-$(uname -m)" != "Darwin-arm64" ]]; then
|
|
44
|
-
echo "laya-coreml needs Apple
|
|
44
|
+
echo "laya-coreml needs Apple silicon and macOS 15+." >&2
|
|
45
45
|
exit 1
|
|
46
46
|
fi
|
|
47
47
|
command -v uv >/dev/null || { echo "uv is required: https://docs.astral.sh/uv/" >&2; exit 1; }
|
package/kyrn/bin/kyrn-ledger
CHANGED
|
@@ -87,4 +87,4 @@ for (const file of files) {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
if (!asJson) console.log(count === 0 ? `No
|
|
90
|
+
if (!asJson) console.log(count === 0 ? `No verdicts found under ${sessionsDir}` : `\n${count} ${count === 1 ? "verdict" : "verdicts"} from ${files.length} ${files.length === 1 ? "session" : "sessions"}`);
|
package/kyrn/bin/mu.mjs
CHANGED
|
@@ -94,26 +94,28 @@ export function platformName({ platform, wsl }) {
|
|
|
94
94
|
export function usage(platform) {
|
|
95
95
|
const linkDir = platform === "win32" ? "%USERPROFILE%\\.local\\bin" : "~/.local/bin";
|
|
96
96
|
return [
|
|
97
|
-
"mu
|
|
97
|
+
"mu: a coding agent with a judgment kernel, built on pi.",
|
|
98
98
|
"",
|
|
99
|
-
" mu
|
|
100
|
-
' mu "prompt"
|
|
101
|
-
' mu -p "prompt" one
|
|
102
|
-
" mu -c | -r continue the last session | pick
|
|
103
|
-
" mu setup connect a model (an API key
|
|
104
|
-
" (mu setup --help
|
|
105
|
-
" mu judge <cmd> the local judge (
|
|
106
|
-
" mu ledger [n] [--json]
|
|
107
|
-
" mu import --list | <file>...
|
|
108
|
-
" mu doctor check the installation",
|
|
109
|
-
" mu auth <cmd>
|
|
99
|
+
" mu start a session in the current directory",
|
|
100
|
+
' mu "prompt" start a session with this prompt',
|
|
101
|
+
' mu -p "prompt" run one prompt, print the answer and exit',
|
|
102
|
+
" mu -c | -r continue the last session | pick a session to resume",
|
|
103
|
+
" mu setup connect a model (paste an API key or pick a service) and choose a judge",
|
|
104
|
+
" (see mu setup --help for scripting, reading a key from stdin and the supported services)",
|
|
105
|
+
" mu judge <cmd> manage the local judge, Laya (macOS on Apple silicon): setup | start | stop | status | run",
|
|
106
|
+
" mu ledger [n] [--json] print the judge's verdicts from the last n sessions",
|
|
107
|
+
" mu import --list | <file>... import Claude Code and Codex conversations (mu import --help)",
|
|
108
|
+
" mu doctor check the installation, the judges and the connections",
|
|
109
|
+
" mu auth <cmd> sign-in helper for the desktop app (JSON lines):",
|
|
110
110
|
" status | login <provider> | logout <provider>",
|
|
111
|
-
` mu link | unlink put the
|
|
112
|
-
" mu migrate [--dry-run]
|
|
113
|
-
" mu help | version",
|
|
111
|
+
` mu link | unlink put the mu command on your PATH (${linkDir}) | remove it`,
|
|
112
|
+
" mu migrate [--dry-run] move the old home folder, ~/.kyrn, to ~/.mu (once)",
|
|
113
|
+
" mu help | version show this help | print the version",
|
|
114
114
|
"",
|
|
115
|
-
"Everything else goes to
|
|
116
|
-
"and
|
|
115
|
+
"Everything else goes to pi unchanged: mu --help also shows pi's options,",
|
|
116
|
+
"and mu install|remove|update|list|config manage pi packages.",
|
|
117
|
+
"",
|
|
118
|
+
"Formerly KYRN: the kyrn commands still work.",
|
|
117
119
|
].join("\n");
|
|
118
120
|
}
|
|
119
121
|
|
|
@@ -310,7 +312,7 @@ export function ensureAppView({ platform, app, upstream, fs = realFs }) {
|
|
|
310
312
|
/**
|
|
311
313
|
* Where this mu comes from: "repo", a checkout that runs the TypeScript sources (sourceRuntime), or "package", the
|
|
312
314
|
* npm package mu-agent, which carries pi's bundle (dist/bundle/cli.js) and the judgment layer built to
|
|
313
|
-
* JavaScript (judge/
|
|
315
|
+
* JavaScript (judge/mu/index.js). A checkout without its dependencies is still a checkout.
|
|
314
316
|
*/
|
|
315
317
|
export function layoutOf({ root, platform, exists }) {
|
|
316
318
|
const path = pathFor(platform);
|
|
@@ -326,7 +328,7 @@ export function packageEntries({ root, platform }) {
|
|
|
326
328
|
const path = pathFor(platform);
|
|
327
329
|
return {
|
|
328
330
|
cli: path.join(root, "dist", "bundle", "cli.js"),
|
|
329
|
-
extension: path.join(root, "judge", "
|
|
331
|
+
extension: path.join(root, "judge", "mu", "index.js"),
|
|
330
332
|
auth: path.join(root, "judge", "dist", "auth.js"),
|
|
331
333
|
import: path.join(root, "judge", "dist", "import.js"),
|
|
332
334
|
setup: path.join(root, "judge", "dist", "setup.js"),
|
|
@@ -356,13 +358,13 @@ export function installHint({ root, platform }) {
|
|
|
356
358
|
const steps = [`cd ${root}`, "npm ci --ignore-scripts", "npm run hydrate:model-data"];
|
|
357
359
|
// Windows PowerShell 5 has no `&&`.
|
|
358
360
|
return platform === "win32"
|
|
359
|
-
? `mu's dependencies
|
|
360
|
-
: `mu's dependencies
|
|
361
|
+
? `mu's dependencies aren't installed. Run:\n${steps.map((step) => ` ${step}`).join("\n")}`
|
|
362
|
+
: `mu's dependencies aren't installed. Run: ${steps.join(" && ")}`;
|
|
361
363
|
}
|
|
362
364
|
|
|
363
365
|
/** What mu says on a Node that does not strip TypeScript types, which a checkout cannot run on. */
|
|
364
366
|
const NO_TYPE_STRIPPING =
|
|
365
|
-
"mu runs a checkout's TypeScript with Node's
|
|
367
|
+
"mu runs a source checkout's TypeScript with Node's built-in type stripping (on by default since Node 22.18), but this Node doesn't strip types. Use Node 22.19 or newer.";
|
|
366
368
|
|
|
367
369
|
/**
|
|
368
370
|
* Node's arguments for running a checkout's TypeScript, up to the entry file. Node strips the types itself (on by
|
|
@@ -428,10 +430,10 @@ export function localJudgeSupport({ platform, env, wsl = false }) {
|
|
|
428
430
|
runs: false,
|
|
429
431
|
url,
|
|
430
432
|
message: [
|
|
431
|
-
`The local judge (Laya) is a Core ML sidecar
|
|
432
|
-
"mu works without it:
|
|
433
|
-
"the desktop app
|
|
434
|
-
"
|
|
433
|
+
`The local judge (Laya) is a Core ML sidecar that runs only on macOS on Apple silicon, not on ${where}.`,
|
|
434
|
+
"mu works without it: Jev answers by default (free on OpenCode Zen, or with your own key: mu setup), or set an LLM judge in mu.json.",
|
|
435
|
+
"A local judge for the desktop app is in progress. Without a judge, decision points use their fallbacks.",
|
|
436
|
+
"To use a server that implements the same API (GET /health, POST /evaluate), set:",
|
|
435
437
|
" MU_LOCAL_JUDGE_URL=http://host:port",
|
|
436
438
|
].join("\n"),
|
|
437
439
|
};
|
|
@@ -447,12 +449,37 @@ export function launchStrategy({ platform, env, canExec }) {
|
|
|
447
449
|
/** How the judgment layer's extension joins pi's arguments: in front for a session, never in front of pi's own
|
|
448
450
|
* commands (PI_COMMANDS), which pi reads as its first argument — an -e before them would turn them into a prompt.
|
|
449
451
|
* The judgment layer never runs for them, so its extension stays out of their way. */
|
|
450
|
-
function judgeArgs({ argv, layout, root, platform }) {
|
|
452
|
+
function judgeArgs({ argv, layout, root, platform, agentDir, readFile }) {
|
|
451
453
|
if (PI_COMMANDS.has(argv[0])) return [];
|
|
452
454
|
const path = pathFor(platform);
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
455
|
+
const extension =
|
|
456
|
+
layout === "package"
|
|
457
|
+
? ["-e", packageEntries({ root, platform }).extension]
|
|
458
|
+
: ["-e", path.join(root, "packages", "kyrn-judge", "src", "extension", "kyrn-judge.ts")];
|
|
459
|
+
return [...extension, ...themeArgs({ argv, layout, root, platform, agentDir, readFile })];
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/** mu's own terminal themes, beside the judgment layer's files. */
|
|
463
|
+
export function themesDir({ layout, root, platform }) {
|
|
464
|
+
const path = pathFor(platform);
|
|
465
|
+
return layout === "package" ? path.join(root, "judge", "themes") : path.join(root, "packages", "kyrn-judge", "themes");
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* An interactive session gets mu's themes (mu-light and mu-dark, which /settings then lists beside pi's) and, while the
|
|
470
|
+
* person has chosen no theme of their own, starts in them: light or dark as the terminal is. A theme chosen in
|
|
471
|
+
* /settings is saved in settings.json and wins; so does --use-theme. Print and RPC modes draw nothing and get neither.
|
|
472
|
+
*/
|
|
473
|
+
function themeArgs({ argv, layout, root, platform, agentDir, readFile }) {
|
|
474
|
+
if (argv.includes("--mode") || argv.includes("-p") || argv.includes("--print")) return [];
|
|
475
|
+
const args = ["--theme", themesDir({ layout, root, platform })];
|
|
476
|
+
if (argv.includes("--use-theme") || !agentDir || !readFile) return args;
|
|
477
|
+
let chosen = false;
|
|
478
|
+
try {
|
|
479
|
+
const settings = JSON.parse(readFile(pathFor(platform).join(agentDir, "settings.json")));
|
|
480
|
+
chosen = typeof settings?.theme === "string" && settings.theme !== "";
|
|
481
|
+
} catch {}
|
|
482
|
+
return chosen ? args : [...args, "--use-theme", "mu-light/mu-dark"];
|
|
456
483
|
}
|
|
457
484
|
|
|
458
485
|
/**
|
|
@@ -485,7 +512,7 @@ export function planLaunch({
|
|
|
485
512
|
} else {
|
|
486
513
|
const runtime = sourceRuntime({ root, platform, stripsTypes, exists: fs.exists });
|
|
487
514
|
if (runtime.error) return { error: runtime.error };
|
|
488
|
-
entry = [...runtime.args, path.join(root, "packages", "coding-agent", "src", "
|
|
515
|
+
entry = [...runtime.args, path.join(root, "packages", "coding-agent", "src", "cli.ts")];
|
|
489
516
|
}
|
|
490
517
|
|
|
491
518
|
const muDir = muHome({ home, platform, isDir: fs.isDir });
|
|
@@ -503,7 +530,7 @@ export function planLaunch({
|
|
|
503
530
|
const parsed = parseEnvFile(envText);
|
|
504
531
|
fromFile = envFileAdditions({ env, entries: parsed.entries, platform });
|
|
505
532
|
// Line numbers only: the text of a line that did not parse may well be a secret.
|
|
506
|
-
if (parsed.problems.length > 0) notes.push(`mu: .env: skipped line ${parsed.problems.join(", ")} (
|
|
533
|
+
if (parsed.problems.length > 0) notes.push(`mu: .env: skipped ${parsed.problems.length === 1 ? "line" : "lines"} ${parsed.problems.join(", ")} (expected KEY=VALUE)`);
|
|
507
534
|
}
|
|
508
535
|
|
|
509
536
|
const childEnv = {};
|
|
@@ -526,14 +553,14 @@ export function planLaunch({
|
|
|
526
553
|
if (support.runs) startJudge = true;
|
|
527
554
|
else if (!support.url) {
|
|
528
555
|
notes.push(
|
|
529
|
-
`mu: the configuration asks for the local judge (
|
|
556
|
+
`mu: the configuration asks for the local judge (Laya), which runs on macOS only; on ${platformName({ platform, wsl })} its decision points use the next judge or their fallbacks (mu judge status)`,
|
|
530
557
|
);
|
|
531
558
|
}
|
|
532
559
|
}
|
|
533
560
|
|
|
534
561
|
return {
|
|
535
562
|
command: execPath,
|
|
536
|
-
args: [...entry, ...judgeArgs({ argv, layout, root, platform }), ...argv],
|
|
563
|
+
args: [...entry, ...judgeArgs({ argv, layout, root, platform, agentDir, readFile: fs.readFile }), ...argv],
|
|
537
564
|
env: childEnv,
|
|
538
565
|
strategy: launchStrategy({ platform, env, canExec }),
|
|
539
566
|
layout,
|
|
@@ -542,7 +569,7 @@ export function planLaunch({
|
|
|
542
569
|
agentDir,
|
|
543
570
|
startJudge,
|
|
544
571
|
notes,
|
|
545
|
-
preface: argv[0] === "-h" || argv[0] === "--help" ? `${usage(platform)}\n\
|
|
572
|
+
preface: argv[0] === "-h" || argv[0] === "--help" ? `${usage(platform)}\n\npi's help (mu passes all of this through):\n` : undefined,
|
|
546
573
|
};
|
|
547
574
|
}
|
|
548
575
|
|
|
@@ -572,7 +599,7 @@ export function planHost({ platform, env, argv, root, home, fs, wsl = false, str
|
|
|
572
599
|
...common,
|
|
573
600
|
module: path.join(root, "dist", "bundle", "index.js"),
|
|
574
601
|
execArgv: [],
|
|
575
|
-
args: [...judgeArgs({ argv, layout: launch.layout, root, platform }), ...argv],
|
|
602
|
+
args: [...judgeArgs({ argv, layout: launch.layout, root, platform, agentDir: launch.agentDir, readFile: fs.readFile }), ...argv],
|
|
576
603
|
};
|
|
577
604
|
}
|
|
578
605
|
const runtime = sourceRuntime({ root, platform, stripsTypes, exists: fs.exists });
|
|
@@ -581,13 +608,13 @@ export function planHost({ platform, env, argv, root, home, fs, wsl = false, str
|
|
|
581
608
|
...common,
|
|
582
609
|
module: path.join(root, "packages", "coding-agent", "src", "index.ts"),
|
|
583
610
|
execArgv: runtime.args,
|
|
584
|
-
args: [...judgeArgs({ argv, layout: launch.layout, root, platform }), ...argv],
|
|
611
|
+
args: [...judgeArgs({ argv, layout: launch.layout, root, platform, agentDir: launch.agentDir, readFile: fs.readFile }), ...argv],
|
|
585
612
|
};
|
|
586
613
|
}
|
|
587
614
|
|
|
588
615
|
/** What mu says when the local judge does not come up. */
|
|
589
616
|
const LOCAL_JUDGE_NOT_STARTED =
|
|
590
|
-
"mu: the local judge
|
|
617
|
+
"mu: the local judge (Laya) didn't start; decision points use the next judge or their fallbacks. Run mu judge status for details.";
|
|
591
618
|
|
|
592
619
|
/** The part of the preparation that is files: the app view of a checkout, mu's agent folder, the configuration's notes. */
|
|
593
620
|
function prepareFiles({ plan, platform, root, err }) {
|
|
@@ -1003,7 +1030,7 @@ export function planLink({ platform, env, home, bin, argv, fs }) {
|
|
|
1003
1030
|
return {
|
|
1004
1031
|
action: "refuse",
|
|
1005
1032
|
errors: [
|
|
1006
|
-
`${link} already exists and is not this mu
|
|
1033
|
+
`${link} already exists and is not this mu, so it was left alone. To use another folder: MU_LINK_DIR=<dir> mu link`,
|
|
1007
1034
|
],
|
|
1008
1035
|
};
|
|
1009
1036
|
}
|
|
@@ -1031,7 +1058,7 @@ export function planLink({ platform, env, home, bin, argv, fs }) {
|
|
|
1031
1058
|
if (windows && /[^\x00-\x7f]/.test(content)) {
|
|
1032
1059
|
notes.push(
|
|
1033
1060
|
"Note: the path from that folder to this repository has non-ASCII characters in it, and cmd reads a batch file in the",
|
|
1034
|
-
"console's code page. If
|
|
1061
|
+
"console's code page. If mu then can't find its target, choose a folder on the same drive (MU_LINK_DIR), or put",
|
|
1035
1062
|
`${bin} on your PATH instead.`,
|
|
1036
1063
|
);
|
|
1037
1064
|
}
|
|
@@ -1200,8 +1227,8 @@ export function migrate({ platform, home, argv, fs, run, alive, self, out, err }
|
|
|
1200
1227
|
return 0;
|
|
1201
1228
|
}
|
|
1202
1229
|
if (fs.exists(next) || fs.isLink(next)) {
|
|
1203
|
-
err(`${next} already exists, so nothing was moved.
|
|
1204
|
-
err("look at both
|
|
1230
|
+
err(`${next} already exists, so nothing was moved. mu never merges or overwrites two home folders:`);
|
|
1231
|
+
err("look at both and decide which one to keep.");
|
|
1205
1232
|
return 1;
|
|
1206
1233
|
}
|
|
1207
1234
|
// Whatever is running would write into the gap between the rename and the link, and split the home in two.
|
|
@@ -1210,10 +1237,10 @@ export function migrate({ platform, home, argv, fs, run, alive, self, out, err }
|
|
|
1210
1237
|
try {
|
|
1211
1238
|
pid = Number.parseInt(fs.readFile(path.join(old, "local-judge", "judge.pid")).trim(), 10);
|
|
1212
1239
|
} catch {}
|
|
1213
|
-
if (pid > 0 && alive(pid)) busy.push(` the local judge (pid ${pid}). Stop it
|
|
1240
|
+
if (pid > 0 && alive(pid)) busy.push(` the local judge (pid ${pid}). Stop it with mu judge stop`);
|
|
1214
1241
|
const found = findBusy({ platform, old, run, self });
|
|
1215
1242
|
if (!found) {
|
|
1216
|
-
err("Nothing was moved: the list of running processes
|
|
1243
|
+
err("Nothing was moved: mu couldn't read the list of running processes (tasklist, powershell), so it can't tell whether mu is still running.");
|
|
1217
1244
|
return 1;
|
|
1218
1245
|
}
|
|
1219
1246
|
const list = (pids) => pids.join(" ");
|
|
@@ -1247,7 +1274,7 @@ export function migrate({ platform, home, argv, fs, run, alive, self, out, err }
|
|
|
1247
1274
|
out(`renamed ${path.join(next, config)} -> mu.json`);
|
|
1248
1275
|
}
|
|
1249
1276
|
out(`linked ${old} -> ${next} (paths stored from before the rename keep working)`);
|
|
1250
|
-
out("
|
|
1277
|
+
out("To check it, run mu doctor");
|
|
1251
1278
|
return 0;
|
|
1252
1279
|
}
|
|
1253
1280
|
|
|
@@ -1329,7 +1356,7 @@ function handOver({ command, args, env, strategy }) {
|
|
|
1329
1356
|
for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) process.on(signal, () => relay(signal));
|
|
1330
1357
|
if (process.platform === "win32") process.on("SIGBREAK", () => {});
|
|
1331
1358
|
child.on("error", (error) => {
|
|
1332
|
-
err(`mu:
|
|
1359
|
+
err(`mu: couldn't start ${command}: ${error.message}`);
|
|
1333
1360
|
resolve(1);
|
|
1334
1361
|
});
|
|
1335
1362
|
child.on("exit", (code, signal) => resolve(code ?? 128 + (osConstants.signals[signal] ?? 0)));
|
|
@@ -1426,7 +1453,7 @@ export async function main(argv = process.argv.slice(2)) {
|
|
|
1426
1453
|
out(await response.text());
|
|
1427
1454
|
return 0;
|
|
1428
1455
|
} catch {
|
|
1429
|
-
out(`
|
|
1456
|
+
out(`The local judge server isn't answering at ${plan.url}. Check that it's running.`);
|
|
1430
1457
|
return 1;
|
|
1431
1458
|
}
|
|
1432
1459
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mu-agent",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "mu: a coding agent that
|
|
3
|
+
"version": "0.1.10",
|
|
4
|
+
"description": "mu: a coding agent that hands its routine decisions to a small, fast judge model, so the main model can keep its attention on the work. Built on pi.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"mu": "kyrn/bin/mu.mjs"
|
|
@@ -33,13 +33,12 @@
|
|
|
33
33
|
"node": ">=22.19.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@earendil-works/chord": "1.0.2",
|
|
37
36
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
38
37
|
"jiti": "2.7.0"
|
|
39
38
|
},
|
|
40
39
|
"muBuild": {
|
|
41
|
-
"pi": "1.0
|
|
40
|
+
"pi": "1.3.0",
|
|
42
41
|
"judge": "0.1.0",
|
|
43
|
-
"commit": "
|
|
42
|
+
"commit": "84e66744e"
|
|
44
43
|
}
|
|
45
44
|
}
|