@lark-apaas/openclaw-scripts-diagnose-cli 0.1.10-alpha.1 → 0.1.10-alpha.2
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/dist/index.cjs +14 -15
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -52,7 +52,7 @@ node_assert = __toESM(node_assert);
|
|
|
52
52
|
* it terse and parseable.
|
|
53
53
|
*/
|
|
54
54
|
function getVersion() {
|
|
55
|
-
return "0.1.10-alpha.
|
|
55
|
+
return "0.1.10-alpha.2";
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/rule-engine/base.ts
|
|
@@ -1150,6 +1150,18 @@ function isValidJWT(token) {
|
|
|
1150
1150
|
function asRecord(val) {
|
|
1151
1151
|
return val != null && typeof val === "object" && !Array.isArray(val) ? val : void 0;
|
|
1152
1152
|
}
|
|
1153
|
+
/** Collect existing AGENTS.md files from the default workspace and configured agent workspaces. */
|
|
1154
|
+
function collectExistingAgentsMdPaths(ctx) {
|
|
1155
|
+
const paths = /* @__PURE__ */ new Set();
|
|
1156
|
+
if (ctx.configPath) paths.add(node_path.default.join(node_path.default.dirname(ctx.configPath), "workspace", "AGENTS.md"));
|
|
1157
|
+
const agents = asRecord(ctx.config.agents);
|
|
1158
|
+
const list = Array.isArray(agents?.list) ? agents.list : [];
|
|
1159
|
+
for (const item of list) {
|
|
1160
|
+
const agent = asRecord(item);
|
|
1161
|
+
if (typeof agent?.workspace === "string" && agent.workspace) paths.add(node_path.default.join(agent.workspace, "AGENTS.md"));
|
|
1162
|
+
}
|
|
1163
|
+
return [...paths].filter((filePath) => node_fs.default.existsSync(filePath));
|
|
1164
|
+
}
|
|
1153
1165
|
/** Set a deeply nested value, creating intermediate objects as needed. */
|
|
1154
1166
|
function setNestedValue(obj, keys, value) {
|
|
1155
1167
|
let current = obj;
|
|
@@ -1523,19 +1535,6 @@ function applyVars(str, entries) {
|
|
|
1523
1535
|
return out;
|
|
1524
1536
|
}
|
|
1525
1537
|
//#endregion
|
|
1526
|
-
//#region src/rules/agents-md-paths.ts
|
|
1527
|
-
function collectExistingAgentsMdPaths(ctx) {
|
|
1528
|
-
const paths = /* @__PURE__ */ new Set();
|
|
1529
|
-
if (ctx.configPath) paths.add(node_path.default.join(node_path.default.dirname(ctx.configPath), "workspace", "AGENTS.md"));
|
|
1530
|
-
const agents = asRecord(ctx.config.agents);
|
|
1531
|
-
const list = Array.isArray(agents?.list) ? agents.list : [];
|
|
1532
|
-
for (const item of list) {
|
|
1533
|
-
const agent = asRecord(item);
|
|
1534
|
-
if (typeof agent?.workspace === "string" && agent.workspace) paths.add(node_path.default.join(agent.workspace, "AGENTS.md"));
|
|
1535
|
-
}
|
|
1536
|
-
return [...paths].filter((filePath) => node_fs.default.existsSync(filePath));
|
|
1537
|
-
}
|
|
1538
|
-
//#endregion
|
|
1539
1538
|
//#region src/rules/agents-md-service-commands.ts
|
|
1540
1539
|
const SERVICE_COMMAND_REPLACEMENTS = [
|
|
1541
1540
|
["`sh scripts/start.sh`", "`bash /opt/force/bin/openclaw_scripts/start.sh`"],
|
|
@@ -10002,7 +10001,7 @@ async function reportCliRun(opts) {
|
|
|
10002
10001
|
//#region src/help.ts
|
|
10003
10002
|
const BIN = "mclaw-diagnose";
|
|
10004
10003
|
function versionBanner() {
|
|
10005
|
-
return `v0.1.10-alpha.
|
|
10004
|
+
return `v0.1.10-alpha.2`;
|
|
10006
10005
|
}
|
|
10007
10006
|
const COMMANDS = [
|
|
10008
10007
|
{
|
package/package.json
CHANGED