holycodex 0.7.0-dev.29579145024.1 → 0.7.0

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/cli.js +25 -8
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ import { existsSync } from "node:fs";
7
7
  import { pluginRoot } from "@holycodex/plugin";
8
8
  import { Buffer } from "node:buffer";
9
9
  //#region packages/cli/src/catalog.ts
10
- var VERSION = "0.7.0-dev.29579145024.1";
10
+ var VERSION = "0.7.0";
11
11
  var SKILLS = [
12
12
  "ast-grep",
13
13
  "caveman",
@@ -317,6 +317,12 @@ function rootTomlString(input, key) {
317
317
  }
318
318
  }
319
319
  function rootTomlStringArray(input, key) {
320
+ return parseRootTomlStringArray(input, key)?.items;
321
+ }
322
+ function rootTomlStringArraySource(input, key) {
323
+ return parseRootTomlStringArray(input, key)?.source;
324
+ }
325
+ function parseRootTomlStringArray(input, key) {
320
326
  const table = TOML_TABLE.exec(input);
321
327
  const root = table === null ? input : input.slice(0, table.index);
322
328
  const assignment = new RegExp(String.raw`^[ \t]*${escapeRegExp(key)}[ \t]*=`, "m").exec(root);
@@ -342,9 +348,13 @@ function rootTomlStringArray(input, key) {
342
348
  raw += character;
343
349
  escaped = true;
344
350
  } else if (character === "\"") {
345
- const parsed = JSON.parse(`"${raw}"`);
346
- if (typeof parsed !== "string") return void 0;
347
- items.push(parsed);
351
+ try {
352
+ const parsed = JSON.parse(`"${raw}"`);
353
+ if (typeof parsed !== "string") return void 0;
354
+ items.push(parsed);
355
+ } catch {
356
+ return;
357
+ }
348
358
  quote = void 0;
349
359
  raw = "";
350
360
  } else raw += character;
@@ -360,7 +370,13 @@ function rootTomlStringArray(input, key) {
360
370
  }
361
371
  if (character === "#") comment = true;
362
372
  else if (character === "\"" || character === "'") quote = character;
363
- else if (character === "]") return items;
373
+ else if (character === "]") {
374
+ const suffix = /^[ \t]*(?:#.*)?(?=\r?\n|$)/.exec(root.slice(index + 1))?.[0] ?? "";
375
+ return {
376
+ source: root.slice(assignment.index, index + 1 + suffix.length),
377
+ items
378
+ };
379
+ }
364
380
  }
365
381
  }
366
382
  function escapeRegExp(value) {
@@ -492,6 +508,7 @@ async function doctor(home = process.env.CODEX_HOME ?? join(homedir(), ".codex")
492
508
  checks.push(mcpConfigMatches(gitBashConfig, expected) ? check("mcp-git_bash-config", "ok", "git-bash-mcp-config-ready", "Git Bash MCP exposes only run through the supported allowlist.") : check("mcp-git_bash-config", "error", "invalid-git-bash-mcp-config", "Git Bash MCP command or enabled_tools configuration is stale.", "Reinstall HolyCodex."));
493
509
  } else if (runtime.platform !== "win32" && gitBashConfig !== void 0) checks.push(check("mcp-git_bash-config", "error", "unexpected-git-bash-mcp", "Git Bash MCP must not be installed on non-Windows platforms.", "Reinstall HolyCodex for this platform."));
494
510
  const context7 = servers?.context7;
511
+ const expectedContext7 = effectiveMcpServers(runtime.platform).context7;
495
512
  const obsoleteAuth = context7 !== void 0 && [
496
513
  "headers",
497
514
  "env",
@@ -501,7 +518,7 @@ async function doctor(home = process.env.CODEX_HOME ?? join(homedir(), ".codex")
501
518
  if (context7 === void 0) checks.push(check("context7-config", "error", "missing-context7", "Context7 is not configured.", "Reinstall HolyCodex."));
502
519
  else if (typeof context7.url === "string") checks.push(check("context7-config", "error", "obsolete-context7-remote", "Context7 still uses a hosted URL.", "Reinstall to use local bunx Context7."));
503
520
  else if (obsoleteAuth) checks.push(check("context7-config", "error", "obsolete-context7-auth", "Context7 contains obsolete authentication settings.", "Remove auth settings and reinstall."));
504
- else if (context7.command !== "bunx" || JSON.stringify(context7.args) !== JSON.stringify(["@upstash/context7-mcp"])) checks.push(check("context7-config", "error", "wrong-context7-package", "Expected bunx @upstash/context7-mcp.", "Repair .mcp.json or reinstall."));
521
+ else if (!mcpConfigMatches(context7, expectedContext7)) checks.push(check("context7-config", "error", "invalid-context7-config", "Context7 launch configuration is stale or contains unsupported settings.", "Repair .mcp.json or reinstall."));
505
522
  else checks.push(check("context7-config", "ok", "local-context7-config", "Local no-auth Context7 is configured."));
506
523
  const bun = await runtime.command("bun", ["--version"]);
507
524
  const bunx = await runtime.command("bunx", ["--version"]);
@@ -595,7 +612,7 @@ function removeLegacyOmo(input) {
595
612
  }).join("").trimEnd();
596
613
  }
597
614
  function injectTableKey(input, table, key, value) {
598
- const match = new RegExp(`^\\s*\\[${table.replaceAll(".", "\\.")}]\\s*$`, "m").exec(input);
615
+ const match = new RegExp(`^\\s*\\[${table.replaceAll(".", "\\.")}]\\s*(?:#.*)?$`, "m").exec(input);
599
616
  const tail = match === null ? "" : input.slice(match.index + match[0].length);
600
617
  const tableEnd = nextTableBoundary(tail);
601
618
  const tableBody = tableEnd < 0 ? tail : tail.slice(0, tableEnd);
@@ -617,7 +634,7 @@ function nextTableBoundary(input) {
617
634
  return Math.min(header, managedHeader);
618
635
  }
619
636
  function rootValue(input, key) {
620
- if (key === "status_line") return /^\s*status_line\s*=\s*\[[\s\S]*?^\s*]\s*(?:#.*)?$/m.exec(input)?.[0] ?? /^\s*status_line\s*=.*$/m.exec(input)?.[0];
637
+ if (key === "status_line") return rootTomlStringArraySource(input, key);
621
638
  return new RegExp(`^\\s*${key}\\s*=.*$`, "m").exec(input)?.[0];
622
639
  }
623
640
  function removeRootValue(input, value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holycodex",
3
- "version": "0.7.0-dev.29579145024.1",
3
+ "version": "0.7.0",
4
4
  "description": "Lean Codex-only agent toolkit installer and doctor",
5
5
  "keywords": [
6
6
  "agents",
@@ -39,7 +39,7 @@
39
39
  "prepack": "vp run --workspace-root build"
40
40
  },
41
41
  "dependencies": {
42
- "@holycodex/plugin": "0.7.0-dev.29579145024.1"
42
+ "@holycodex/plugin": "0.7.0"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=20"