mu-agent 0.2.5 → 0.2.7

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.
@@ -279,6 +279,21 @@ for (const model of new Set(askedTiers.map(classifierOf).filter((judge) => judge
279
279
  }
280
280
  }
281
281
 
282
+ // OpenAI's decision model (gpt-6-luna) through its Decisions API, for the tiers and routes that use it. Its own key goes
283
+ // to its address; at OpenAI's own address, an OpenAI key of mu's `openai` provider works too (kyrn-judge/src/registry.ts).
284
+ const OPENAI_JUDGE = { type: "openai" };
285
+ const openaiOf = (tier) => config?.judges?.[tier] ?? (tier === "openai" ? OPENAI_JUDGE : undefined);
286
+ for (const judge of new Set(askedTiers.map(openaiOf).filter((judge) => judge?.type === "openai"))) {
287
+ const name = judge.apiKeyEnv ?? "MU_JUDGE_OPENAI_KEY";
288
+ const host = judge.baseUrl && URL.canParse(judge.baseUrl) ? new URL(judge.baseUrl).host : "api.openai.com";
289
+ const model = judge.model || "gpt-6-luna";
290
+ const providerKey = host === "api.openai.com" && name === "MU_JUDGE_OPENAI_KEY";
291
+ if (has(name)) row("ok", "openai", `${name} is set: ${model} is called at ${host} (value not shown)`);
292
+ else if (providerKey && has("OPENAI_API_KEY")) row("ok", "openai", `OPENAI_API_KEY is set: ${model} is called at ${host} (value not shown)`);
293
+ else if (providerKey && authBytes > 8) row("--", "openai", `${name} not set; an OpenAI API key stored with mu setup or /login works too (not read here)`);
294
+ else row("fix", "openai", `${name} not set: add it ${where}${providerKey ? ", or set up an OpenAI API key with mu setup" : ""}`);
295
+ }
296
+
282
297
  // CLM-8B behind `clm-serve` (github.com/Contrastive-LM/CLM), for the tiers and routes that use it.
283
298
  /** As packages/kyrn-judge/src/providers/typesafe.ts reads a CLM address: `http://host:8700` is enough. */
284
299
  function clmEndpoint(baseUrl) {
@@ -345,10 +360,13 @@ const { browserAdvice, findBrowser, thisBrowserHost } = await import(
345
360
  const browserHost = thisBrowserHost();
346
361
  const chrome = findBrowser(browserHost);
347
362
  const [advice, ...moreAdvice] = chrome ? [] : browserAdvice(browserHost).split("\n");
363
+ // Only mu's browser needs one: without it the rest of mu works, so it is not something to fix.
348
364
  row(
349
- chrome ? "ok" : "fix",
365
+ chrome ? "ok" : "--",
350
366
  "browser",
351
- chrome ? `${chrome.executable}${chrome.side === "windows" ? " (on the Windows side, reached over mirrored networking)" : ""}` : advice,
367
+ chrome
368
+ ? `${chrome.executable}${chrome.side === "windows" ? " (on the Windows side, reached over mirrored networking)" : ""}`
369
+ : `optional, for mu's browser. ${advice}`,
352
370
  );
353
371
  for (const line of moreAdvice) row("--", "", line);
354
372
  const canRelate = (tier) =>
@@ -356,7 +374,8 @@ const canRelate = (tier) =>
356
374
  tier === "gateway" ||
357
375
  tier.startsWith("llm:") ||
358
376
  tier.startsWith("classifier:") ||
359
- ["llm", "clm", "classifier"].includes(judgeOf(tier)?.type);
377
+ tier === "openai" ||
378
+ ["llm", "clm", "classifier", "openai"].includes(judgeOf(tier)?.type);
360
379
  const browseTiers = config?.routes?.["browser.step"] ?? tiers;
361
380
  const routed = Object.entries(config?.routes ?? {});
362
381
  if (routed.length > 0) row("--", "routes", routed.map(([id, value]) => `${id} -> ${[value].flat().join(" > ")}`).join(" · "));
package/kyrn/bin/mu.mjs CHANGED
@@ -101,12 +101,16 @@ export function usage(platform) {
101
101
  ' mu "prompt" start a session with this prompt',
102
102
  ' mu -p "prompt" run one prompt, print the answer and exit',
103
103
  " mu -c | -r continue the last session | pick a session to resume",
104
- " mu setup connect a model (paste an API key or pick a service) and choose a judge (mu setup --help)",
105
- " mu judge mude install install mude 1.0, mu's own decision model for coding, and make it the judge on this Mac (Apple silicon, 1.8 GB)",
104
+ " mu setup connect a model (paste an API key or pick a service) and choose",
105
+ " a judge (mu setup --help)",
106
+ " mu judge mude install install mude 1.0, mu's own decision model for coding, and make it",
107
+ " the judge on this Mac (Apple silicon, 1.8 GB)",
106
108
  " enable | disable | start | stop | status | uninstall (mu judge mude help)",
107
- " mu judge model <cmd> other decision models from Hugging Face: add <link> | list | use | remove (mu judge model help)",
109
+ " mu judge model <cmd> other decision models from Hugging Face:",
110
+ " add <link> | list | use | remove (mu judge model help)",
108
111
  " mu ledger [n] [--json] print the judge's verdicts from the last n sessions",
109
- " mu import <file>... import Claude Code, Codex and ZCode conversations; --list shows them (mu import --help)",
112
+ " mu import <file>... import Claude Code, Codex and ZCode conversations; --list shows",
113
+ " them (mu import --help)",
110
114
  " mu doctor check the installation, the judges and the connections",
111
115
  " mu auth <cmd> sign-in helper for the desktop app (JSON lines):",
112
116
  " status | login <provider> | logout <provider>",
@@ -771,8 +775,8 @@ export const AUTH_USAGE = [
771
775
  " mu auth status",
772
776
  " mu auth login <provider> [--paste]",
773
777
  " mu auth logout <provider>",
774
- "In a terminal, /login inside mu signs in the same way. With --paste, the sign-in takes the address the browser",
775
- "ends on as pasted instead of listening for it: for when another program (the Codex CLI) holds the callback port.",
778
+ "In a terminal, /login inside mu signs in the same way. With --paste, you paste the address the browser ends on",
779
+ "instead of mu listening for it. Use it when another program, such as the Codex CLI, holds the callback port.",
776
780
  "",
777
781
  "pi's auth commands:",
778
782
  ].join("\n");
@@ -836,7 +840,7 @@ export function planJudge({ argv }) {
836
840
  kind: "removed",
837
841
  code: 1,
838
842
  text: [
839
- `mu judge ${command} managed Laya, which is no longer built into mu.`,
843
+ `mu judge ${command} used to manage Laya, which is no longer built into mu.`,
840
844
  "For a decision model on this machine, install mude 1.0 (mu judge mude install), or add one from Hugging Face (mu judge model add <link>).",
841
845
  ].join("\n"),
842
846
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mu-agent",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
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": {
@@ -42,6 +42,6 @@
42
42
  "muBuild": {
43
43
  "pi": "1.3.0",
44
44
  "judge": "0.1.0",
45
- "commit": "b7733c26e"
45
+ "commit": "f162089db"
46
46
  }
47
47
  }