@femtomc/mu-agent 26.2.77 → 26.2.79
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
CHANGED
|
@@ -82,6 +82,6 @@ There is no dedicated `query(...)` vs `command(...)` wrapper boundary in this pa
|
|
|
82
82
|
|
|
83
83
|
## Control-plane config notes
|
|
84
84
|
|
|
85
|
-
- Runtime config source of truth is
|
|
85
|
+
- Runtime config source of truth is `<store>/config.json` (resolve with `mu store paths`).
|
|
86
86
|
- Inspect runtime state via CLI (`mu control status`, `mu status`).
|
|
87
87
|
- Apply control-plane lifecycle mutations via CLI (`mu control reload`, `mu control update`).
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
type MuPackageReadme = {
|
|
2
|
+
label: string;
|
|
3
|
+
path: string;
|
|
4
|
+
};
|
|
1
5
|
export type MuDocumentation = {
|
|
2
6
|
readmePath?: string;
|
|
3
7
|
docsPath?: string;
|
|
8
|
+
packageReadmes: MuPackageReadme[];
|
|
4
9
|
};
|
|
5
10
|
export declare function resolveMuDocumentation(): MuDocumentation;
|
|
6
11
|
export declare function appendMuDocumentationSection(basePrompt: string): string;
|
|
12
|
+
export {};
|
|
7
13
|
//# sourceMappingURL=self_documentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"self_documentation.d.ts","sourceRoot":"","sources":["../src/self_documentation.ts"],"names":[],"mappings":"AA8BA,MAAM,MAAM,eAAe,GAAG;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"self_documentation.d.ts","sourceRoot":"","sources":["../src/self_documentation.ts"],"names":[],"mappings":"AA8BA,KAAK,eAAe,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAgFF,MAAM,MAAM,eAAe,GAAG;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,eAAe,EAAE,CAAC;CAClC,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,eAAe,CAiCxD;AAED,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAyBvE"}
|
|
@@ -24,6 +24,78 @@ function firstExistingPath(candidates) {
|
|
|
24
24
|
}
|
|
25
25
|
return undefined;
|
|
26
26
|
}
|
|
27
|
+
const INSTALLED_PACKAGE_README_LOOKUP = [
|
|
28
|
+
{ packageName: "@femtomc/mu-agent", label: "@femtomc/mu-agent" },
|
|
29
|
+
{ packageName: "@femtomc/mu-control-plane", label: "@femtomc/mu-control-plane" },
|
|
30
|
+
{ packageName: "@femtomc/mu-core", label: "@femtomc/mu-core" },
|
|
31
|
+
{ packageName: "@femtomc/mu-forum", label: "@femtomc/mu-forum" },
|
|
32
|
+
{ packageName: "@femtomc/mu-issue", label: "@femtomc/mu-issue" },
|
|
33
|
+
{ packageName: "@femtomc/mu-orchestrator", label: "@femtomc/mu-orchestrator" },
|
|
34
|
+
{ packageName: "@femtomc/mu-server", label: "@femtomc/mu-server" },
|
|
35
|
+
];
|
|
36
|
+
const MONOREPO_PACKAGE_README_LOOKUP = [
|
|
37
|
+
{ relPath: join("packages", "agent", "README.md"), label: "@femtomc/mu-agent" },
|
|
38
|
+
{ relPath: join("packages", "control-plane", "README.md"), label: "@femtomc/mu-control-plane" },
|
|
39
|
+
{ relPath: join("packages", "core", "README.md"), label: "@femtomc/mu-core" },
|
|
40
|
+
{ relPath: join("packages", "forum", "README.md"), label: "@femtomc/mu-forum" },
|
|
41
|
+
{ relPath: join("packages", "issue", "README.md"), label: "@femtomc/mu-issue" },
|
|
42
|
+
{ relPath: join("packages", "orchestrator", "README.md"), label: "@femtomc/mu-orchestrator" },
|
|
43
|
+
{ relPath: join("packages", "server", "README.md"), label: "@femtomc/mu-server" },
|
|
44
|
+
{ relPath: join("packages", "cli", "README.md"), label: "@femtomc/mu (CLI)" },
|
|
45
|
+
{ relPath: join("packages", "neovim", "README.md"), label: "mu.nvim" },
|
|
46
|
+
];
|
|
47
|
+
function resolvePackageRoot(packageName) {
|
|
48
|
+
try {
|
|
49
|
+
const entry = require.resolve(packageName);
|
|
50
|
+
return findPackageRoot(dirname(entry));
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function findPackageReadmesFromInstalledPackages() {
|
|
57
|
+
const readmes = [];
|
|
58
|
+
for (const candidate of INSTALLED_PACKAGE_README_LOOKUP) {
|
|
59
|
+
const root = resolvePackageRoot(candidate.packageName);
|
|
60
|
+
if (!root) {
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
const readmePath = join(root, "README.md");
|
|
64
|
+
if (existsSync(readmePath)) {
|
|
65
|
+
readmes.push({ label: candidate.label, path: readmePath });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return readmes;
|
|
69
|
+
}
|
|
70
|
+
function findPackageReadmesFromMonorepoRoots(candidateRoots) {
|
|
71
|
+
const roots = new Set();
|
|
72
|
+
for (const root of candidateRoots) {
|
|
73
|
+
roots.add(root);
|
|
74
|
+
roots.add(resolve(root, "..", ".."));
|
|
75
|
+
}
|
|
76
|
+
const readmes = [];
|
|
77
|
+
for (const root of roots) {
|
|
78
|
+
for (const candidate of MONOREPO_PACKAGE_README_LOOKUP) {
|
|
79
|
+
const readmePath = join(root, candidate.relPath);
|
|
80
|
+
if (existsSync(readmePath)) {
|
|
81
|
+
readmes.push({ label: candidate.label, path: readmePath });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return readmes;
|
|
86
|
+
}
|
|
87
|
+
function uniquePackageReadmes(readmes) {
|
|
88
|
+
const seenPaths = new Set();
|
|
89
|
+
const unique = [];
|
|
90
|
+
for (const readme of readmes) {
|
|
91
|
+
if (seenPaths.has(readme.path)) {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
seenPaths.add(readme.path);
|
|
95
|
+
unique.push(readme);
|
|
96
|
+
}
|
|
97
|
+
return unique;
|
|
98
|
+
}
|
|
27
99
|
export function resolveMuDocumentation() {
|
|
28
100
|
const thisModuleDir = dirname(fileURLToPath(import.meta.url));
|
|
29
101
|
const agentPackageRoot = findPackageRoot(thisModuleDir);
|
|
@@ -44,14 +116,19 @@ export function resolveMuDocumentation() {
|
|
|
44
116
|
docsCandidates.push(resolve(root, "..", "..", "docs"));
|
|
45
117
|
docsCandidates.push(join(root, "docs"));
|
|
46
118
|
}
|
|
119
|
+
const packageReadmes = uniquePackageReadmes([
|
|
120
|
+
...findPackageReadmesFromInstalledPackages(),
|
|
121
|
+
...findPackageReadmesFromMonorepoRoots(candidateRoots),
|
|
122
|
+
]);
|
|
47
123
|
return {
|
|
48
124
|
readmePath: firstExistingPath(readmeCandidates),
|
|
49
125
|
docsPath: firstExistingPath(docsCandidates),
|
|
126
|
+
packageReadmes,
|
|
50
127
|
};
|
|
51
128
|
}
|
|
52
129
|
export function appendMuDocumentationSection(basePrompt) {
|
|
53
130
|
const trimmed = basePrompt.trim();
|
|
54
|
-
const { readmePath, docsPath } = resolveMuDocumentation();
|
|
131
|
+
const { readmePath, docsPath, packageReadmes } = resolveMuDocumentation();
|
|
55
132
|
const lines = ["Mu documentation (for mu feature/configuration/setup questions):"];
|
|
56
133
|
if (readmePath) {
|
|
57
134
|
lines.push(`- Main documentation: ${readmePath}`);
|
|
@@ -59,6 +136,15 @@ export function appendMuDocumentationSection(basePrompt) {
|
|
|
59
136
|
if (docsPath) {
|
|
60
137
|
lines.push(`- Additional docs: ${docsPath}`);
|
|
61
138
|
}
|
|
139
|
+
if (packageReadmes.length > 0) {
|
|
140
|
+
lines.push("- Package READMEs:");
|
|
141
|
+
for (const readme of packageReadmes) {
|
|
142
|
+
lines.push(` - ${readme.label}: ${readme.path}`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
lines.push("- Package README paths unavailable at runtime.");
|
|
147
|
+
}
|
|
62
148
|
if (!readmePath && !docsPath) {
|
|
63
149
|
lines.push("- Documentation path unavailable at runtime; use `mu --help` and package README files.");
|
|
64
150
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@femtomc/mu-agent",
|
|
3
|
-
"version": "26.2.
|
|
3
|
+
"version": "26.2.79",
|
|
4
4
|
"description": "Shared agent runtime for mu chat, orchestration roles, and serve extensions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mu",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"themes/**"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@femtomc/mu-core": "26.2.
|
|
27
|
+
"@femtomc/mu-core": "26.2.79",
|
|
28
28
|
"@mariozechner/pi-agent-core": "^0.53.0",
|
|
29
29
|
"@mariozechner/pi-ai": "^0.53.0",
|
|
30
30
|
"@mariozechner/pi-coding-agent": "^0.53.0",
|
|
@@ -21,6 +21,3 @@ Using `mu`:
|
|
|
21
21
|
- Use `mu memory index status|rebuild` to inspect/refresh local memory index health when needed.
|
|
22
22
|
- Use `mu heartbeats` and `mu cron` to access persistent scheduled processes that broadcast to the user.
|
|
23
23
|
|
|
24
|
-
Documentation:
|
|
25
|
-
- Your own documentation (including custom model setup and theme creation) is at: /path/to/README.md
|
|
26
|
-
- Read it when users ask about features, configuration, or setup.
|