@lark-apaas/openclaw-scripts-diagnose-cli 0.1.10-alpha.0 → 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.
Files changed (2) hide show
  1. package/dist/index.cjs +17 -18
  2. 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.0";
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,24 +1535,11 @@ 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
- ["`sh scripts/start.sh`", "`sh /opt/force/bin/openclaw_scripts/start.sh`"],
1542
- ["`sh scripts/restart.sh`", "`sh /opt/force/bin/openclaw_scripts/restart.sh`"],
1543
- ["`sh scripts/stop.sh`", "`sh /opt/force/bin/openclaw_scripts/stop.sh`"]
1540
+ ["`sh scripts/start.sh`", "`bash /opt/force/bin/openclaw_scripts/start.sh`"],
1541
+ ["`sh scripts/restart.sh`", "`bash /opt/force/bin/openclaw_scripts/restart.sh`"],
1542
+ ["`sh scripts/stop.sh`", "`bash /opt/force/bin/openclaw_scripts/stop.sh`"]
1544
1543
  ];
1545
1544
  let AgentsMdServiceCommandsRule = class AgentsMdServiceCommandsRule extends DiagnoseRule {
1546
1545
  validate(ctx) {
@@ -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.0`;
10004
+ return `v0.1.10-alpha.2`;
10006
10005
  }
10007
10006
  const COMMANDS = [
10008
10007
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/openclaw-scripts-diagnose-cli",
3
- "version": "0.1.10-alpha.0",
3
+ "version": "0.1.10-alpha.2",
4
4
  "description": "CLI for OpenClaw config diagnose and repair with JSON5 support",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {