@femtomc/mu-agent 26.2.69 → 26.2.70
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/README.md +20 -1
- package/dist/backend.d.ts +1 -0
- package/dist/backend.d.ts.map +1 -1
- package/dist/backend.js +11 -2
- package/dist/extensions/activities.d.ts +4 -1
- package/dist/extensions/activities.d.ts.map +1 -1
- package/dist/extensions/activities.js +127 -16
- package/dist/extensions/branding.d.ts +2 -3
- package/dist/extensions/branding.d.ts.map +1 -1
- package/dist/extensions/branding.js +73 -58
- package/dist/extensions/cron.d.ts +4 -1
- package/dist/extensions/cron.d.ts.map +1 -1
- package/dist/extensions/cron.js +74 -14
- package/dist/extensions/heartbeats.d.ts +4 -1
- package/dist/extensions/heartbeats.d.ts.map +1 -1
- package/dist/extensions/heartbeats.js +60 -17
- package/dist/extensions/index.d.ts +13 -3
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +13 -3
- package/dist/extensions/messaging-setup.d.ts +4 -1
- package/dist/extensions/messaging-setup.d.ts.map +1 -1
- package/dist/extensions/messaging-setup.js +47 -10
- package/dist/extensions/mu-full-tools.d.ts +10 -0
- package/dist/extensions/mu-full-tools.d.ts.map +1 -0
- package/dist/extensions/mu-full-tools.js +25 -0
- package/dist/extensions/mu-operator.d.ts.map +1 -1
- package/dist/extensions/mu-operator.js +2 -6
- package/dist/extensions/mu-query-tools.d.ts +10 -0
- package/dist/extensions/mu-query-tools.d.ts.map +1 -0
- package/dist/extensions/mu-query-tools.js +11 -0
- package/dist/extensions/operator-command.d.ts.map +1 -1
- package/dist/extensions/operator-command.js +106 -6
- package/dist/extensions/orchestration-runs-readonly.d.ts.map +1 -1
- package/dist/extensions/orchestration-runs-readonly.js +180 -10
- package/dist/extensions/orchestration-runs.d.ts.map +1 -1
- package/dist/extensions/orchestration-runs.js +206 -14
- package/dist/extensions/server-tools.d.ts +10 -0
- package/dist/extensions/server-tools.d.ts.map +1 -1
- package/dist/extensions/server-tools.js +688 -290
- package/dist/extensions/shared.d.ts +11 -0
- package/dist/extensions/shared.d.ts.map +1 -1
- package/dist/extensions/shared.js +81 -0
- package/dist/session_factory.d.ts.map +1 -1
- package/dist/session_factory.js +3 -1
- package/dist/ui_defaults.d.ts +4 -0
- package/dist/ui_defaults.d.ts.map +1 -0
- package/dist/ui_defaults.js +18 -0
- package/package.json +4 -3
- package/prompts/roles/operator.md +5 -0
- package/prompts/roles/orchestrator.md +1 -0
- package/prompts/roles/worker.md +10 -4
- package/themes/mu-gruvbox-dark.json +90 -0
|
@@ -53,6 +53,17 @@ export declare function fetchMuJson<T>(path: string, opts?: {
|
|
|
53
53
|
body?: unknown;
|
|
54
54
|
}): Promise<T>;
|
|
55
55
|
export declare function fetchMuStatus(timeoutMs?: number): Promise<MuStatusResponse>;
|
|
56
|
+
export declare function asRecord(value: unknown): Record<string, unknown> | null;
|
|
57
|
+
export declare function asArray(value: unknown): unknown[];
|
|
58
|
+
export declare function asString(value: unknown): string | null;
|
|
59
|
+
export declare function asNumber(value: unknown): number | null;
|
|
60
|
+
export declare function previewText(value: unknown, maxChars?: number): string;
|
|
61
|
+
export declare function previewLines(value: unknown, opts?: {
|
|
62
|
+
maxLines?: number;
|
|
63
|
+
maxCharsPerLine?: number;
|
|
64
|
+
}): string[];
|
|
65
|
+
export declare function parseFieldPaths(value: string | undefined): string[];
|
|
66
|
+
export declare function selectFields(source: unknown, paths: string[]): Record<string, unknown>;
|
|
56
67
|
export declare function textResult(text: string, details?: Record<string, unknown>): {
|
|
57
68
|
content: {
|
|
58
69
|
type: "text";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/extensions/shared.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;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AAM,EAAE,OAAO,CAAM;;;;;;EAK7E;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEjD"}
|
|
@@ -64,6 +64,87 @@ export async function fetchMuStatus(timeoutMs) {
|
|
|
64
64
|
const status = await fetchMuJson("/api/status", { timeoutMs });
|
|
65
65
|
return ensureGenerationScopedStatus(status);
|
|
66
66
|
}
|
|
67
|
+
export function asRecord(value) {
|
|
68
|
+
if (typeof value !== "object" || value == null || Array.isArray(value)) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
export function asArray(value) {
|
|
74
|
+
return Array.isArray(value) ? value : [];
|
|
75
|
+
}
|
|
76
|
+
export function asString(value) {
|
|
77
|
+
return typeof value === "string" ? value : null;
|
|
78
|
+
}
|
|
79
|
+
export function asNumber(value) {
|
|
80
|
+
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
81
|
+
}
|
|
82
|
+
export function previewText(value, maxChars = 220) {
|
|
83
|
+
const raw = typeof value === "string"
|
|
84
|
+
? value
|
|
85
|
+
: value == null
|
|
86
|
+
? ""
|
|
87
|
+
: (() => {
|
|
88
|
+
try {
|
|
89
|
+
return JSON.stringify(value);
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return String(value);
|
|
93
|
+
}
|
|
94
|
+
})();
|
|
95
|
+
const compact = raw.replace(/\s+/g, " ").trim();
|
|
96
|
+
if (compact.length <= maxChars) {
|
|
97
|
+
return compact;
|
|
98
|
+
}
|
|
99
|
+
const keep = Math.max(1, maxChars - 1);
|
|
100
|
+
return `${compact.slice(0, keep)}…`;
|
|
101
|
+
}
|
|
102
|
+
export function previewLines(value, opts = {}) {
|
|
103
|
+
const maxLines = clampInt(opts.maxLines, 12, 1, 200);
|
|
104
|
+
const maxCharsPerLine = clampInt(opts.maxCharsPerLine, 220, 20, 5_000);
|
|
105
|
+
const lines = asArray(value);
|
|
106
|
+
const tail = lines.slice(-maxLines);
|
|
107
|
+
return tail.map((line) => previewText(line, maxCharsPerLine));
|
|
108
|
+
}
|
|
109
|
+
export function parseFieldPaths(value) {
|
|
110
|
+
if (!value) {
|
|
111
|
+
return [];
|
|
112
|
+
}
|
|
113
|
+
return value
|
|
114
|
+
.split(",")
|
|
115
|
+
.map((segment) => segment.trim())
|
|
116
|
+
.filter((segment) => segment.length > 0)
|
|
117
|
+
.slice(0, 32);
|
|
118
|
+
}
|
|
119
|
+
function readPath(source, path) {
|
|
120
|
+
if (path.length === 0) {
|
|
121
|
+
return source;
|
|
122
|
+
}
|
|
123
|
+
const segments = path.split(".").filter((segment) => segment.length > 0);
|
|
124
|
+
let cursor = source;
|
|
125
|
+
for (const segment of segments) {
|
|
126
|
+
if (Array.isArray(cursor)) {
|
|
127
|
+
const index = Number.parseInt(segment, 10);
|
|
128
|
+
if (!Number.isFinite(index) || index < 0 || index >= cursor.length) {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
cursor = cursor[index];
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if (typeof cursor !== "object" || cursor == null) {
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
cursor = cursor[segment];
|
|
138
|
+
}
|
|
139
|
+
return cursor;
|
|
140
|
+
}
|
|
141
|
+
export function selectFields(source, paths) {
|
|
142
|
+
const out = {};
|
|
143
|
+
for (const path of paths) {
|
|
144
|
+
out[path] = readPath(source, path);
|
|
145
|
+
}
|
|
146
|
+
return out;
|
|
147
|
+
}
|
|
67
148
|
export function textResult(text, details = {}) {
|
|
68
149
|
return {
|
|
69
150
|
content: [{ type: "text", text }],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session_factory.d.ts","sourceRoot":"","sources":["../src/session_factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session_factory.d.ts","sourceRoot":"","sources":["../src/session_factory.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,mBAAmB,GAAG;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACvB,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;IAC1D,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,qBAAqB,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,KAAK,EAAE;QAAE,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,CAAC;CAC5C,CAAC;AAEF,wBAAsB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,SAAS,CAAC,CA2CnF"}
|
package/dist/session_factory.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createBashTool, createEditTool, createReadTool, createWriteTool, } from "@mariozechner/pi-coding-agent";
|
|
2
2
|
import { createMuResourceLoader, resolveModel } from "./backend.js";
|
|
3
|
+
import { MU_DEFAULT_THEME_NAME, MU_DEFAULT_THEME_PATH } from "./ui_defaults.js";
|
|
3
4
|
export async function createMuSession(opts) {
|
|
4
5
|
const { AuthStorage, createAgentSession, SessionManager, SettingsManager } = await import("@mariozechner/pi-coding-agent");
|
|
5
6
|
const authStorage = AuthStorage.create();
|
|
@@ -10,12 +11,13 @@ export async function createMuSession(opts) {
|
|
|
10
11
|
const scope = opts.provider ? ` in provider "${opts.provider}"` : "";
|
|
11
12
|
throw new Error(`Model "${modelId}" not found${scope} in pi-ai registry.`);
|
|
12
13
|
}
|
|
13
|
-
const settingsManager = SettingsManager.inMemory();
|
|
14
|
+
const settingsManager = SettingsManager.inMemory({ theme: MU_DEFAULT_THEME_NAME, quietStartup: true });
|
|
14
15
|
const resourceLoader = createMuResourceLoader({
|
|
15
16
|
cwd: opts.cwd,
|
|
16
17
|
systemPrompt: opts.systemPrompt ?? "You are mu, an AI assistant.",
|
|
17
18
|
settingsManager,
|
|
18
19
|
additionalExtensionPaths: opts.extensionPaths,
|
|
20
|
+
additionalThemePaths: [MU_DEFAULT_THEME_PATH],
|
|
19
21
|
});
|
|
20
22
|
await resourceLoader.reload();
|
|
21
23
|
const tools = [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui_defaults.d.ts","sourceRoot":"","sources":["../src/ui_defaults.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AAMvD,eAAO,MAAM,qBAAqB,QAA2D,CAAC;AAY9F,eAAO,MAAM,UAAU,QAAuB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
export const MU_DEFAULT_THEME_NAME = "mu-gruvbox-dark";
|
|
4
|
+
function resolveBundledThemePath(name) {
|
|
5
|
+
return fileURLToPath(new URL(`../themes/${name}`, import.meta.url));
|
|
6
|
+
}
|
|
7
|
+
export const MU_DEFAULT_THEME_PATH = resolveBundledThemePath(`${MU_DEFAULT_THEME_NAME}.json`);
|
|
8
|
+
function readPackageVersion() {
|
|
9
|
+
try {
|
|
10
|
+
const pkgPath = fileURLToPath(new URL("../package.json", import.meta.url));
|
|
11
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
12
|
+
return pkg.version;
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return "0.0.0";
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export const MU_VERSION = readPackageVersion();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@femtomc/mu-agent",
|
|
3
|
-
"version": "26.2.
|
|
3
|
+
"version": "26.2.70",
|
|
4
4
|
"description": "Shared agent runtime for mu chat, orchestration roles, and serve extensions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mu",
|
|
@@ -20,10 +20,11 @@
|
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"dist/**",
|
|
23
|
-
"prompts/**"
|
|
23
|
+
"prompts/**",
|
|
24
|
+
"themes/**"
|
|
24
25
|
],
|
|
25
26
|
"dependencies": {
|
|
26
|
-
"@femtomc/mu-core": "26.2.
|
|
27
|
+
"@femtomc/mu-core": "26.2.70",
|
|
27
28
|
"@mariozechner/pi-agent-core": "^0.53.0",
|
|
28
29
|
"@mariozechner/pi-ai": "^0.53.0",
|
|
29
30
|
"@mariozechner/pi-coding-agent": "^0.53.0",
|
|
@@ -52,5 +52,10 @@ Efficiency:
|
|
|
52
52
|
- Do NOT pre-fetch status, issues, control-plane, events, or runs at the start of a conversation. Only call diagnostic tools when the user's request specifically requires that information.
|
|
53
53
|
- Respond directly to what the user asks. Avoid speculative tool calls.
|
|
54
54
|
|
|
55
|
+
Context hygiene for `mu_*` query tools:
|
|
56
|
+
- Prefer narrow discovery first (`limit` + filters like `contains`, `status`, `tag`, `source`).
|
|
57
|
+
- Then do targeted retrieval by ID (`get`/`status`) with `fields` when available.
|
|
58
|
+
- Avoid broad repeated scans when a precise lookup would answer the question.
|
|
59
|
+
|
|
55
60
|
For normal answers:
|
|
56
61
|
- Respond in plain text (no directive prefix).
|
|
@@ -32,3 +32,4 @@ Guardrails:
|
|
|
32
32
|
- Never close with `success`, `failure`, `needs_work`, or `skipped`.
|
|
33
33
|
- Keep plans small, explicit, and testable.
|
|
34
34
|
- Plans should include proposed evidence for successful completion.
|
|
35
|
+
- Keep command output focused: prefer bounded reads (`--limit`, scoped filters) before deep inspection.
|
package/prompts/roles/worker.md
CHANGED
|
@@ -11,24 +11,30 @@ Available tools:
|
|
|
11
11
|
- edit: Make surgical edits to files
|
|
12
12
|
- write: Create or overwrite files
|
|
13
13
|
|
|
14
|
+
You also have issue/forum coordination tools:
|
|
15
|
+
- `mu_issues` (read + update lifecycle)
|
|
16
|
+
- `mu_forum` (read + post)
|
|
17
|
+
Use these for issue state and thread communication only.
|
|
18
|
+
|
|
14
19
|
Hard Constraints:
|
|
15
20
|
- Do NOT create child issues — that is the orchestrator's job.
|
|
16
21
|
- If the issue is too large/unclear, close with `--outcome needs_work` and explain what is missing.
|
|
17
22
|
|
|
18
23
|
Workflow:
|
|
19
24
|
1. Inspect:
|
|
20
|
-
- `
|
|
21
|
-
- `
|
|
25
|
+
- `mu_issues(action="get", id="<id>")`
|
|
26
|
+
- `mu_forum(action="read", topic="issue:<id>", limit=20)`
|
|
22
27
|
2. Implement:
|
|
23
28
|
- Edit files and run commands needed for this issue only.
|
|
24
29
|
3. Verify:
|
|
25
30
|
- Run tests/typecheck/build/lint as appropriate.
|
|
26
31
|
4. Close:
|
|
27
|
-
- `
|
|
32
|
+
- `mu_issues(action="close", id="<id>", outcome="success")` (or `failure` / `skipped` when warranted)
|
|
28
33
|
5. Log key notes:
|
|
29
|
-
- `
|
|
34
|
+
- `mu_forum(action="post", topic="issue:<id>", body="...")`
|
|
30
35
|
|
|
31
36
|
Guardrails:
|
|
32
37
|
- Prefer concrete evidence over claims (test output, build output, repro checks).
|
|
33
38
|
- Report what changed and why.
|
|
39
|
+
- Keep command output focused: use bounded reads first (`--limit`, scoped filters) and drill into specific IDs/files next.
|
|
34
40
|
- Be concise.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
|
+
"name": "mu-gruvbox-dark",
|
|
4
|
+
"vars": {
|
|
5
|
+
"bg0_h": "#1d2021",
|
|
6
|
+
"bg0": "#282828",
|
|
7
|
+
"bg1": "#3c3836",
|
|
8
|
+
"bg2": "#504945",
|
|
9
|
+
"bg3": "#665c54",
|
|
10
|
+
"bg4": "#7c6f64",
|
|
11
|
+
"fg0": "#fbf1c7",
|
|
12
|
+
"fg1": "#ebdbb2",
|
|
13
|
+
"fg2": "#d5c4a1",
|
|
14
|
+
"fg3": "#bdae93",
|
|
15
|
+
"fg4": "#a89984",
|
|
16
|
+
"red": "#fb4934",
|
|
17
|
+
"green": "#b8bb26",
|
|
18
|
+
"yellow": "#fabd2f",
|
|
19
|
+
"blue": "#83a598",
|
|
20
|
+
"purple": "#d3869b",
|
|
21
|
+
"aqua": "#8ec07c",
|
|
22
|
+
"orange": "#fe8019",
|
|
23
|
+
"toolSuccessBg": "#32361a",
|
|
24
|
+
"toolErrorBg": "#3c1f1e"
|
|
25
|
+
},
|
|
26
|
+
"colors": {
|
|
27
|
+
"accent": "aqua",
|
|
28
|
+
"border": "bg3",
|
|
29
|
+
"borderAccent": "blue",
|
|
30
|
+
"borderMuted": "bg2",
|
|
31
|
+
"success": "green",
|
|
32
|
+
"error": "red",
|
|
33
|
+
"warning": "yellow",
|
|
34
|
+
"muted": "fg4",
|
|
35
|
+
"dim": "bg4",
|
|
36
|
+
"text": "fg1",
|
|
37
|
+
"thinkingText": "fg3",
|
|
38
|
+
|
|
39
|
+
"selectedBg": "bg2",
|
|
40
|
+
"userMessageBg": "bg1",
|
|
41
|
+
"userMessageText": "fg1",
|
|
42
|
+
"customMessageBg": "bg1",
|
|
43
|
+
"customMessageText": "fg2",
|
|
44
|
+
"customMessageLabel": "purple",
|
|
45
|
+
"toolPendingBg": "bg0_h",
|
|
46
|
+
"toolSuccessBg": "toolSuccessBg",
|
|
47
|
+
"toolErrorBg": "toolErrorBg",
|
|
48
|
+
"toolTitle": "fg2",
|
|
49
|
+
"toolOutput": "fg2",
|
|
50
|
+
|
|
51
|
+
"mdHeading": "yellow",
|
|
52
|
+
"mdLink": "blue",
|
|
53
|
+
"mdLinkUrl": "fg4",
|
|
54
|
+
"mdCode": "aqua",
|
|
55
|
+
"mdCodeBlock": "fg2",
|
|
56
|
+
"mdCodeBlockBorder": "bg3",
|
|
57
|
+
"mdQuote": "fg3",
|
|
58
|
+
"mdQuoteBorder": "bg3",
|
|
59
|
+
"mdHr": "bg3",
|
|
60
|
+
"mdListBullet": "orange",
|
|
61
|
+
|
|
62
|
+
"toolDiffAdded": "green",
|
|
63
|
+
"toolDiffRemoved": "red",
|
|
64
|
+
"toolDiffContext": "fg4",
|
|
65
|
+
|
|
66
|
+
"syntaxComment": "fg4",
|
|
67
|
+
"syntaxKeyword": "red",
|
|
68
|
+
"syntaxFunction": "blue",
|
|
69
|
+
"syntaxVariable": "aqua",
|
|
70
|
+
"syntaxString": "green",
|
|
71
|
+
"syntaxNumber": "orange",
|
|
72
|
+
"syntaxType": "yellow",
|
|
73
|
+
"syntaxOperator": "fg2",
|
|
74
|
+
"syntaxPunctuation": "fg3",
|
|
75
|
+
|
|
76
|
+
"thinkingOff": "bg3",
|
|
77
|
+
"thinkingMinimal": "fg4",
|
|
78
|
+
"thinkingLow": "blue",
|
|
79
|
+
"thinkingMedium": "aqua",
|
|
80
|
+
"thinkingHigh": "yellow",
|
|
81
|
+
"thinkingXhigh": "orange",
|
|
82
|
+
|
|
83
|
+
"bashMode": "orange"
|
|
84
|
+
},
|
|
85
|
+
"export": {
|
|
86
|
+
"pageBg": "#1d2021",
|
|
87
|
+
"cardBg": "#282828",
|
|
88
|
+
"infoBg": "#3c3836"
|
|
89
|
+
}
|
|
90
|
+
}
|