mu-agent 0.1.6 → 0.1.8

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 (145) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +5 -4
  3. package/dist/bundle/chunks/anthropic-messages-MI4QHRXW.js +6 -0
  4. package/dist/bundle/chunks/anthropic.js +2 -2
  5. package/dist/bundle/chunks/azure-openai-responses-E3QGN4VN.js +2 -0
  6. package/dist/bundle/chunks/bedrock-converse-stream.js +2 -2
  7. package/dist/bundle/chunks/chunk-33KL6IIQ.js +20 -0
  8. package/dist/bundle/chunks/chunk-4OBXYPH4.js +4 -0
  9. package/dist/bundle/chunks/chunk-C47CLQZK.js +2 -0
  10. package/dist/bundle/chunks/chunk-F5ZABL6Z.js +20 -0
  11. package/dist/bundle/chunks/chunk-H3QXYIF7.js +31 -0
  12. package/dist/bundle/chunks/chunk-HQHD6PZI.js +2 -0
  13. package/dist/bundle/chunks/chunk-KJUDFE6Y.js +11 -0
  14. package/dist/bundle/chunks/chunk-LD2P6SFZ.js +2 -0
  15. package/dist/bundle/chunks/chunk-NG4PO5FP.js +1204 -0
  16. package/dist/bundle/chunks/chunk-NTSWBG4X.js +2 -0
  17. package/dist/bundle/chunks/chunk-RLZVFGW4.js +127 -0
  18. package/dist/bundle/chunks/{chunk-XDUWOHPL.js → chunk-S3GGRYIO.js} +2 -2
  19. package/dist/bundle/chunks/{chunk-4O2SCVYF.js → chunk-TAOL3JFA.js} +1 -1
  20. package/dist/bundle/chunks/chunk-TE3GUV6H.js +9 -0
  21. package/dist/bundle/chunks/chunk-VIV3CWXG.js +2 -0
  22. package/dist/bundle/chunks/{chunk-V7IXECST.js → chunk-WE4MXUQS.js} +3 -3
  23. package/dist/bundle/chunks/chunk-Y2PP32XV.js +2 -0
  24. package/dist/bundle/chunks/chunk-YLY6CKPK.js +132 -0
  25. package/dist/bundle/chunks/chunk-ZE5FMF3V.js +99 -0
  26. package/dist/bundle/chunks/cli-AOVD3SSZ.js +51 -0
  27. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-NM3JRRWQ.js +2 -0
  28. package/dist/bundle/chunks/codemode-worker.js +374 -0
  29. package/dist/bundle/chunks/easter-egg-3d-G2LUBEMZ.js +2 -0
  30. package/dist/bundle/chunks/execute-MZVUC6BB.js +388 -0
  31. package/dist/bundle/chunks/github-copilot.js +1 -1
  32. package/dist/bundle/chunks/{google-generative-ai-C44KRRZ4.js → google-generative-ai-XMFHGQC5.js} +1 -1
  33. package/dist/bundle/chunks/{google-vertex-25DUXPTJ.js → google-vertex-4XRRNP74.js} +1 -1
  34. package/dist/bundle/chunks/{lib-HGQMNYVT.js → lib-TEDK3E5I.js} +2 -2
  35. package/dist/bundle/chunks/llama-cpp-classify-XT44PI3C.js +22 -0
  36. package/dist/bundle/chunks/mistral-conversations-Q22M3IBG.js +5 -0
  37. package/dist/bundle/chunks/node-N5BSDOA5.js +16 -0
  38. package/dist/bundle/chunks/openai-chatgpt.js +86 -0
  39. package/dist/bundle/chunks/{openai-codex-responses-3UAYOSSR.js → openai-codex-responses-4MYQSO5E.js} +1 -1
  40. package/dist/bundle/chunks/openai-codex.js +2 -2
  41. package/dist/bundle/chunks/openai-completions-OSRCWAAA.js +7 -0
  42. package/dist/bundle/chunks/openai-responses-UHF3DHNG.js +3 -0
  43. package/dist/bundle/chunks/{openrouter-images-JVEJN44Q.js → openrouter-images-ZVXWCSIM.js} +1 -1
  44. package/dist/bundle/chunks/openrouter.js +2 -2
  45. package/dist/bundle/chunks/radius.js +2 -2
  46. package/dist/bundle/chunks/runtime-VJMMDLVH.js +2 -0
  47. package/dist/bundle/chunks/typesafe-system-one-PRR5K6CI.js +2 -0
  48. package/dist/bundle/chunks/virtual-modules-RJXJGCPI.js +2 -0
  49. package/dist/bundle/cli-runtime.js +1 -1
  50. package/dist/bundle/index.js +1 -1
  51. package/dist/bundle/native/darwin/prebuilds/darwin-arm64/darwin-platform.node +0 -0
  52. package/dist/bundle/native/darwin/prebuilds/darwin-x64/darwin-platform.node +0 -0
  53. package/dist/bundle/rpc-entry.js +1 -1
  54. package/dist/core/export-html/template.js +16 -0
  55. package/dist/modes/interactive/theme/dark.json +59 -72
  56. package/dist/modes/interactive/theme/light.json +57 -69
  57. package/dist/modes/interactive/theme/system-theme.d.ts +55 -0
  58. package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -0
  59. package/dist/modes/interactive/theme/system-theme.js +546 -0
  60. package/dist/modes/interactive/theme/system-theme.js.map +1 -0
  61. package/dist/modes/interactive/theme/theme-controller.d.ts +43 -9
  62. package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
  63. package/dist/modes/interactive/theme/theme-controller.js +121 -79
  64. package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
  65. package/dist/modes/interactive/theme/theme-json.d.ts.map +1 -1
  66. package/dist/modes/interactive/theme/theme-json.js +1 -1
  67. package/dist/modes/interactive/theme/theme-json.js.map +1 -1
  68. package/dist/modes/interactive/theme/theme-schema.json +2 -2
  69. package/dist/modes/interactive/theme/theme.d.ts +34 -40
  70. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  71. package/dist/modes/interactive/theme/theme.js +139 -126
  72. package/dist/modes/interactive/theme/theme.js.map +1 -1
  73. package/dist/native/darwin/prebuilds/darwin-arm64/darwin-platform.node +0 -0
  74. package/dist/native/darwin/prebuilds/darwin-x64/darwin-platform.node +0 -0
  75. package/docs/cli.md +60 -7
  76. package/docs/codemode.md +207 -0
  77. package/docs/configuration.md +2 -0
  78. package/docs/docs.json +13 -1
  79. package/docs/environment-variables.md +2 -2
  80. package/docs/extensions.md +53 -0
  81. package/docs/index.md +1 -1
  82. package/docs/json.md +1 -1
  83. package/docs/keybindings.md +2 -2
  84. package/docs/llama-cpp.md +13 -0
  85. package/docs/mcp.md +270 -0
  86. package/docs/models.md +83 -1
  87. package/docs/packages.md +1 -1
  88. package/docs/providers.md +19 -6
  89. package/docs/quickstart.md +16 -2
  90. package/docs/rpc-commands.md +9 -3
  91. package/docs/rpc.md +3 -1
  92. package/docs/sdk.md +8 -3
  93. package/docs/security.md +2 -0
  94. package/docs/session-format.md +5 -1
  95. package/docs/settings.md +24 -5
  96. package/docs/themes.md +28 -6
  97. package/docs/usage.md +1 -1
  98. package/docs/virtual-models.md +114 -0
  99. package/docs/windows.md +2 -0
  100. package/examples/README.md +1 -1
  101. package/examples/extensions/README.md +1 -0
  102. package/examples/extensions/built-in-tool-renderer.ts +16 -40
  103. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  104. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  105. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  106. package/examples/extensions/custom-provider-gitlab-duo/test.ts +5 -5
  107. package/examples/extensions/gondolin/package-lock.json +2 -2
  108. package/examples/extensions/gondolin/package.json +1 -1
  109. package/examples/extensions/jev-router.ts +113 -0
  110. package/examples/extensions/minimal-mode.ts +24 -96
  111. package/examples/extensions/sandbox/package-lock.json +2 -2
  112. package/examples/extensions/sandbox/package.json +1 -1
  113. package/examples/extensions/with-deps/package-lock.json +2 -2
  114. package/examples/extensions/with-deps/package.json +1 -1
  115. package/examples/rpc-client.ts +1 -1
  116. package/examples/rpc-extension-ui.ts +1 -1
  117. package/examples/sdk/14-codemode-mcp.ts +61 -0
  118. package/examples/sdk/README.md +2 -1
  119. package/judge/THIRD_PARTY_NOTICES.md +63 -0
  120. package/judge/dist/auth.js +128 -113
  121. package/judge/dist/import.js +10 -9
  122. package/judge/dist/kyrn-judge.js +5444 -5354
  123. package/judge/dist/setup.js +138 -12
  124. package/judge/manifest.json +414 -102
  125. package/kyrn/bin/kyrn-doctor +61 -11
  126. package/kyrn/bin/mu.mjs +169 -70
  127. package/package.json +4 -4
  128. package/dist/bundle/chunks/anthropic-messages-VMESUHQ7.js +0 -6
  129. package/dist/bundle/chunks/azure-openai-responses-K232MQFF.js +0 -2
  130. package/dist/bundle/chunks/chunk-2X3AO33C.js +0 -2
  131. package/dist/bundle/chunks/chunk-DTD7JQ7Y.js +0 -42
  132. package/dist/bundle/chunks/chunk-E3TC4YNV.js +0 -2
  133. package/dist/bundle/chunks/chunk-FU4XQUSL.js +0 -11
  134. package/dist/bundle/chunks/chunk-GNYZK6XN.js +0 -2
  135. package/dist/bundle/chunks/chunk-MVPXOVOJ.js +0 -2
  136. package/dist/bundle/chunks/chunk-NUHFSC37.js +0 -25
  137. package/dist/bundle/chunks/chunk-TUBB3BLE.js +0 -1652
  138. package/dist/bundle/chunks/chunk-XNGRGP62.js +0 -2
  139. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-NR2TDCXU.js +0 -2
  140. package/dist/bundle/chunks/mistral-conversations-6IHQOR4R.js +0 -5
  141. package/dist/bundle/chunks/node-O3RIBJRH.js +0 -16
  142. package/dist/bundle/chunks/openai-completions-FIEQGWAH.js +0 -7
  143. package/dist/bundle/chunks/openai-responses-OZJXLHFC.js +0 -2
  144. package/dist/bundle/chunks/typesafe-system-one-VKYX4OGY.js +0 -2
  145. package/dist/bundle/chunks/virtual-modules-IOLJJ5KK.js +0 -2
@@ -1,90 +1,78 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
3
  "name": "light",
4
+ "appearance": "light",
4
5
  "vars": {
5
- "teal": "#5a8080",
6
- "blue": "#547da7",
7
- "green": "#588458",
8
- "red": "#aa5555",
9
- "yellow": "#9a7326",
10
- "text": "#1f2328",
11
- "mediumGray": "#6c6c6c",
12
- "dimGray": "#767676",
13
- "lightGray": "#b0b0b0",
14
- "selectedBg": "#d0d0e0",
15
- "userMsgBg": "#e8e8e8",
16
- "toolPendingBg": "#e8e8f0",
17
- "toolSuccessBg": "#e8f0e8",
18
- "toolErrorBg": "#f0e8e8",
19
- "customMsgBg": "#ede7f6"
6
+ "text": "okhsl(225 5% 27%)",
7
+ "muted": "okhsl(229 8% 47%)",
8
+ "violet": "okhsl(295 60% 46%)",
9
+ "blue": "okhsl(231 68% 47%)",
10
+ "green": "okhsl(159 75% 46%)",
11
+ "red": "okhsl(20 91% 47%)",
12
+ "yellow": "okhsl(83 99% 47%)",
13
+ "blueBg": "okhsl(235 19% 91%)"
20
14
  },
21
15
  "colors": {
22
- "accent": "teal",
23
- "border": "blue",
24
- "borderAccent": "teal",
25
- "borderMuted": "lightGray",
16
+ "accent": "violet",
17
+ "border": "okhsl(231 67% 55%)",
18
+ "borderAccent": "okhsl(295 59% 55%)",
19
+ "borderMuted": "okhsl(235 7% 66%)",
26
20
  "success": "green",
27
21
  "error": "red",
28
22
  "warning": "yellow",
29
- "muted": "mediumGray",
30
- "dim": "dimGray",
23
+ "muted": "muted",
24
+ "dim": "okhsl(229 7% 59%)",
31
25
  "text": "text",
32
- "thinkingText": "mediumGray",
33
-
34
- "selectedBg": "selectedBg",
35
- "scrollbarTrack": "lightGray",
36
- "scrollbarThumb": "text",
37
- "searchMatchBg": "selectedBg",
38
- "searchMatchText": "text",
39
- "userMessageBg": "userMsgBg",
26
+ "thinkingText": "okhsl(234 8% 55%)",
27
+ "selectedBg": "blueBg",
28
+ "scrollbarTrack": "okhsl(248 3% 90%)",
29
+ "scrollbarThumb": "okhsl(226 7% 65%)",
30
+ "searchMatchBg": "okhsl(56 22% 91%)",
31
+ "searchMatchText": "muted",
32
+ "userMessageBg": "blueBg",
40
33
  "userMessageText": "text",
41
- "customMessageBg": "customMsgBg",
42
- "customMessageText": "text",
43
- "customMessageLabel": "#7e57c2",
44
- "toolPendingBg": "toolPendingBg",
45
- "toolSuccessBg": "toolSuccessBg",
46
- "toolErrorBg": "toolErrorBg",
34
+ "customMessageBg": "okhsl(295 25% 91%)",
35
+ "customMessageText": "muted",
36
+ "customMessageLabel": "violet",
37
+ "toolPendingBg": "okhsl(248 3% 91%)",
38
+ "toolSuccessBg": "okhsl(156 21% 91%)",
39
+ "toolErrorBg": "okhsl(24 23% 91%)",
47
40
  "toolTitle": "text",
48
- "toolOutput": "mediumGray",
49
-
41
+ "toolOutput": "muted",
50
42
  "mdHeading": "yellow",
51
43
  "mdLink": "blue",
52
- "mdLinkUrl": "dimGray",
53
- "mdCode": "teal",
44
+ "mdLinkUrl": "muted",
45
+ "mdCode": "violet",
54
46
  "mdCodeBlock": "green",
55
- "mdCodeBlockBorder": "mediumGray",
56
- "mdQuote": "mediumGray",
57
- "mdQuoteBorder": "mediumGray",
58
- "mdHr": "mediumGray",
59
- "mdListBullet": "green",
60
-
47
+ "mdCodeBlockBorder": "muted",
48
+ "mdQuote": "muted",
49
+ "mdQuoteBorder": "muted",
50
+ "mdHr": "muted",
51
+ "mdListBullet": "violet",
61
52
  "toolDiffAdded": "green",
62
53
  "toolDiffRemoved": "red",
63
- "toolDiffContext": "mediumGray",
64
-
65
- "syntaxComment": "#008000",
66
- "syntaxKeyword": "#0000FF",
67
- "syntaxFunction": "#795E26",
68
- "syntaxVariable": "#001080",
69
- "syntaxString": "#A31515",
70
- "syntaxNumber": "#098658",
71
- "syntaxType": "#267F99",
72
- "syntaxOperator": "#000000",
73
- "syntaxPunctuation": "#000000",
74
-
75
- "thinkingOff": "lightGray",
76
- "thinkingMinimal": "#767676",
77
- "thinkingLow": "blue",
78
- "thinkingMedium": "teal",
79
- "thinkingHigh": "#875f87",
80
- "thinkingXhigh": "#8b008b",
81
- "thinkingMax": "#af005f",
82
-
83
- "bashMode": "green"
54
+ "toolDiffContext": "muted",
55
+ "syntaxComment": "muted",
56
+ "syntaxKeyword": "blue",
57
+ "syntaxFunction": "yellow",
58
+ "syntaxVariable": "okhsl(203 73% 46%)",
59
+ "syntaxString": "okhsl(52 84% 46%)",
60
+ "syntaxNumber": "green",
61
+ "syntaxType": "violet",
62
+ "syntaxOperator": "muted",
63
+ "syntaxPunctuation": "muted",
64
+ "thinkingOff": "okhsl(223 5% 80%)",
65
+ "thinkingMinimal": "okhsl(229 14% 78%)",
66
+ "thinkingLow": "okhsl(232 33% 76%)",
67
+ "thinkingMedium": "okhsl(264 48% 74%)",
68
+ "thinkingHigh": "okhsl(295 62% 72%)",
69
+ "thinkingXhigh": "okhsl(337 74% 70%)",
70
+ "thinkingMax": "okhsl(20 98% 68%)",
71
+ "bashMode": "okhsl(159 74% 55%)"
84
72
  },
85
73
  "export": {
86
- "pageBg": "#f8f8f8",
87
- "cardBg": "#ffffff",
88
- "infoBg": "#fffae6"
74
+ "pageBg": "okhsl(17 3% 94%)",
75
+ "cardBg": "okhsl(17 5% 97%)",
76
+ "infoBg": "okhsl(56 22% 91%)"
89
77
  }
90
78
  }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * The `system` theme: pi's colors derived from the terminal's own theme.
3
+ *
4
+ * Every token belongs to a color family (its hue) and has contrast rules: it must reach a contrast level
5
+ * on the background and on the panels it is drawn on. Hue and saturation come from the terminal's palette
6
+ * color for the family's ANSI slot, or from the family's own hue when the terminal reports no palette.
7
+ * Lightness comes from the rules alone. Colors are built in OKHSL, whose saturation is relative to the
8
+ * sRGB gamut, and fade toward gray near black and white. A palette color never gains OKLCH chroma when it
9
+ * moves to another lightness, so pastel palettes stay pastel.
10
+ *
11
+ * A contrast level is a target-lightness curve: the OKLab lightness a token needs, given the lightness of
12
+ * the surface below it. The curves were fitted to the reference theme design from the "Pi themes: system
13
+ * and light/dark" review. On dark backgrounds they aim for nearly fixed lightness; on light backgrounds the
14
+ * required difference grows as the background darkens.
15
+ *
16
+ * Depending on what the terminal reports, the theme is generated in one of three tiers:
17
+ * - background and palette: hues from the palette, lightness from the background;
18
+ * - background only: the families' own hues, lightness from the background;
19
+ * - nothing: ANSI palette indices and the default colors, which the terminal renders itself.
20
+ */
21
+ import { type RgbColor } from "@earendil-works/pi-tui";
22
+ import type { ThemeAppearance, ThemeColor, ThemeToken } from "./theme.ts";
23
+ export declare const SYSTEM_THEME_NAME = "system";
24
+ export interface SystemThemeInput {
25
+ foreground?: RgbColor;
26
+ background?: RgbColor;
27
+ /** ANSI colors 0-15. */
28
+ palette?: RgbColor[];
29
+ /** Saturation multiplier from 0 (grayscale) to 1. The first frame renders in grayscale until colors arrive. */
30
+ saturation?: number;
31
+ /** Appearance when the terminal did not report its background, e.g. from its light/dark report or COLORFGBG. */
32
+ appearanceHint?: ThemeAppearance;
33
+ }
34
+ export interface SystemThemeColors {
35
+ /** Hex colors, ANSI palette indices, or "" for the terminal default. */
36
+ colors: Record<ThemeToken, string | number>;
37
+ /** Foreground tokens rendered faint (SGR 2), for terminals that did not report colors. */
38
+ dim: ThemeColor[];
39
+ appearance: ThemeAppearance | undefined;
40
+ }
41
+ /** WCAG 2 relative luminance. */
42
+ export declare function relativeLuminance({ r, g, b }: RgbColor): number;
43
+ /** WCAG 2 contrast ratio, 1-21. */
44
+ export declare function wcagContrast(first: RgbColor, second: RgbColor): number;
45
+ /**
46
+ * Whether a terminal is dark or light, from its reported colors: the direction of its own foreground
47
+ * when text can be readable that way, otherwise dark when white text has more contrast on the
48
+ * background than black text.
49
+ */
50
+ export declare function terminalAppearance(background: RgbColor, foreground?: RgbColor): ThemeAppearance;
51
+ /**
52
+ * Generate the system theme's colors from the terminal's reported colors.
53
+ */
54
+ export declare function generateSystemThemeColors(input: SystemThemeInput): SystemThemeColors;
55
+ //# sourceMappingURL=system-theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-theme.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/theme/system-theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAQN,KAAK,QAAQ,EAEb,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,eAAe,EAAW,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEnF,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAgV1C,MAAM,WAAW,gBAAgB;IAChC,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,wBAAwB;IACxB,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;IACrB,+GAA+G;IAC/G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gHAAgH;IAChH,cAAc,CAAC,EAAE,eAAe,CAAC;CACjC;AAED,MAAM,WAAW,iBAAiB;IACjC,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC5C,0FAA0F;IAC1F,GAAG,EAAE,UAAU,EAAE,CAAC;IAClB,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC;CACxC;AAOD,iCAAiC;AACjC,wBAAgB,iBAAiB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,QAAQ,GAAG,MAAM,CAM/D;AAED,mCAAmC;AACnC,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAG,MAAM,CAItE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,QAAQ,GAAG,eAAe,CAe/F;AA+BD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,gBAAgB,GAAG,iBAAiB,CA0HpF"}