oh-my-copilot 5.19.3 → 5.19.5
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/bridge/claude-md-coordinator.cjs +45 -27
- package/bridge/cli.cjs +3056 -2353
- package/bridge/mcp-server.cjs +1250 -1121
- package/bridge/runtime-cli.cjs +366 -352
- package/bridge/team-bridge.cjs +87 -70
- package/bridge/team-mcp.cjs +242 -228
- package/bridge/team.js +80 -66
- package/dist/__tests__/ci-evidence.test.d.ts +2 -0
- package/dist/__tests__/ci-evidence.test.d.ts.map +1 -0
- package/dist/__tests__/ci-evidence.test.js +210 -0
- package/dist/__tests__/ci-evidence.test.js.map +1 -0
- package/dist/__tests__/run-cjs-windows-stdio-contract.test.js +50 -10
- package/dist/__tests__/run-cjs-windows-stdio-contract.test.js.map +1 -1
- package/dist/__tests__/session-end-process-exit.test.js +15 -5
- package/dist/__tests__/session-end-process-exit.test.js.map +1 -1
- package/dist/__tests__/setup-claude-md-script.test.js +7 -4
- package/dist/__tests__/setup-claude-md-script.test.js.map +1 -1
- package/dist/__tests__/skill-injector-script.test.js +1 -1
- package/dist/__tests__/skill-injector-script.test.js.map +1 -1
- package/dist/__tests__/trusted-publishing-contract.test.js +51 -9
- package/dist/__tests__/trusted-publishing-contract.test.js.map +1 -1
- package/dist/cli/__tests__/launch.test.js +38 -1
- package/dist/cli/__tests__/launch.test.js.map +1 -1
- package/dist/cli/claude-md-coordinator.d.ts.map +1 -1
- package/dist/cli/claude-md-coordinator.js +2 -0
- package/dist/cli/claude-md-coordinator.js.map +1 -1
- package/dist/cli/commands/__tests__/release-cli.test.js +59 -2
- package/dist/cli/commands/__tests__/release-cli.test.js.map +1 -1
- package/dist/cli/commands/release.d.ts +11 -0
- package/dist/cli/commands/release.d.ts.map +1 -1
- package/dist/cli/commands/release.js +93 -5
- package/dist/cli/commands/release.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/launch.d.ts.map +1 -1
- package/dist/cli/launch.js +8 -2
- package/dist/cli/launch.js.map +1 -1
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +2 -0
- package/dist/cli/team.js.map +1 -1
- package/dist/factory/heal/__tests__/cli.test.js +34 -0
- package/dist/factory/heal/__tests__/cli.test.js.map +1 -1
- package/dist/factory/heal/cli.d.ts.map +1 -1
- package/dist/factory/heal/cli.js +32 -4
- package/dist/factory/heal/cli.js.map +1 -1
- package/dist/factory/heal/logs.d.ts +2 -0
- package/dist/factory/heal/logs.d.ts.map +1 -1
- package/dist/factory/heal/logs.js +1 -0
- package/dist/factory/heal/logs.js.map +1 -1
- package/dist/factory/run/__tests__/engine-ado-harness.d.ts +56 -0
- package/dist/factory/run/__tests__/engine-ado-harness.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine-ado-harness.js +222 -0
- package/dist/factory/run/__tests__/engine-ado-harness.js.map +1 -0
- package/dist/factory/run/__tests__/engine-harness.d.ts +35 -0
- package/dist/factory/run/__tests__/engine-harness.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine-harness.js +76 -0
- package/dist/factory/run/__tests__/engine-harness.js.map +1 -0
- package/dist/factory/run/__tests__/engine-outcome-harness.d.ts +38 -0
- package/dist/factory/run/__tests__/engine-outcome-harness.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine-outcome-harness.js +78 -0
- package/dist/factory/run/__tests__/engine-outcome-harness.js.map +1 -0
- package/dist/factory/run/__tests__/engine-progress-harness.d.ts +28 -0
- package/dist/factory/run/__tests__/engine-progress-harness.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine-progress-harness.js +89 -0
- package/dist/factory/run/__tests__/engine-progress-harness.js.map +1 -0
- package/dist/factory/run/__tests__/engine-sandbox-harness.d.ts +19 -0
- package/dist/factory/run/__tests__/engine-sandbox-harness.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine-sandbox-harness.js +54 -0
- package/dist/factory/run/__tests__/engine-sandbox-harness.js.map +1 -0
- package/dist/factory/run/__tests__/engine.ado.heal.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.ado.heal.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.ado.heal.test.js +194 -0
- package/dist/factory/run/__tests__/engine.ado.heal.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.ado.progress.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.ado.progress.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.ado.progress.test.js +79 -0
- package/dist/factory/run/__tests__/engine.ado.progress.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.ado.test.js +6 -463
- package/dist/factory/run/__tests__/engine.ado.test.js.map +1 -1
- package/dist/factory/run/__tests__/engine.intake.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.intake.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.intake.test.js +110 -0
- package/dist/factory/run/__tests__/engine.intake.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.lanes.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.lanes.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.lanes.test.js +107 -0
- package/dist/factory/run/__tests__/engine.lanes.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.outcome.marker.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.outcome.marker.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.outcome.marker.test.js +89 -0
- package/dist/factory/run/__tests__/engine.outcome.marker.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.outcome.test.js +8 -148
- package/dist/factory/run/__tests__/engine.outcome.test.js.map +1 -1
- package/dist/factory/run/__tests__/engine.progress.resume.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.progress.resume.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.progress.resume.test.js +61 -0
- package/dist/factory/run/__tests__/engine.progress.resume.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.progress.skip.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.progress.skip.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.progress.skip.test.js +51 -0
- package/dist/factory/run/__tests__/engine.progress.skip.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.progress.test.js +9 -165
- package/dist/factory/run/__tests__/engine.progress.test.js.map +1 -1
- package/dist/factory/run/__tests__/engine.resume.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.resume.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.resume.test.js +319 -0
- package/dist/factory/run/__tests__/engine.resume.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.sandbox.commit.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.sandbox.commit.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.sandbox.commit.test.js +282 -0
- package/dist/factory/run/__tests__/engine.sandbox.commit.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.sandbox.test.js +6 -317
- package/dist/factory/run/__tests__/engine.sandbox.test.js.map +1 -1
- package/dist/factory/run/__tests__/engine.state.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.state.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.state.test.js +311 -0
- package/dist/factory/run/__tests__/engine.state.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.test.js +8 -863
- package/dist/factory/run/__tests__/engine.test.js.map +1 -1
- package/dist/factory/run/__tests__/prepare-gates-harness.d.ts +24 -0
- package/dist/factory/run/__tests__/prepare-gates-harness.d.ts.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates-harness.js +69 -0
- package/dist/factory/run/__tests__/prepare-gates-harness.js.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates.conflict.test.d.ts +2 -0
- package/dist/factory/run/__tests__/prepare-gates.conflict.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates.conflict.test.js +133 -0
- package/dist/factory/run/__tests__/prepare-gates.conflict.test.js.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates.crash.test.d.ts +2 -0
- package/dist/factory/run/__tests__/prepare-gates.crash.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates.crash.test.js +126 -0
- package/dist/factory/run/__tests__/prepare-gates.crash.test.js.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates.gates-resume.test.d.ts +2 -0
- package/dist/factory/run/__tests__/prepare-gates.gates-resume.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates.gates-resume.test.js +110 -0
- package/dist/factory/run/__tests__/prepare-gates.gates-resume.test.js.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates.gates.test.d.ts +2 -0
- package/dist/factory/run/__tests__/prepare-gates.gates.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates.gates.test.js +55 -0
- package/dist/factory/run/__tests__/prepare-gates.gates.test.js.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates.test.js +12 -430
- package/dist/factory/run/__tests__/prepare-gates.test.js.map +1 -1
- package/dist/features/lookout/__tests__/lookout.test.js +9 -6
- package/dist/features/lookout/__tests__/lookout.test.js.map +1 -1
- package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/daemon.js +2 -1
- package/dist/features/rate-limit-wait/daemon.js.map +1 -1
- package/dist/forge/__tests__/gh-argv-baseline.factory.test.js +7 -1
- package/dist/forge/__tests__/gh-argv-baseline.factory.test.js.map +1 -1
- package/dist/graph/runtime/executors/agent.d.ts.map +1 -1
- package/dist/graph/runtime/executors/agent.js +2 -1
- package/dist/graph/runtime/executors/agent.js.map +1 -1
- package/dist/graph/runtime/executors/command.d.ts.map +1 -1
- package/dist/graph/runtime/executors/command.js +2 -1
- package/dist/graph/runtime/executors/command.js.map +1 -1
- package/dist/hooks/__tests__/bridge.test.js +10 -2
- package/dist/hooks/__tests__/bridge.test.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/team-ralplan-stop.test.js +7 -0
- package/dist/hooks/persistent-mode/__tests__/team-ralplan-stop.test.js.map +1 -1
- package/dist/hooks/persistent-mode/session-isolation.test.js +23 -14
- package/dist/hooks/persistent-mode/session-isolation.test.js.map +1 -1
- package/dist/hooks/session-end/action-runner.d.ts.map +1 -1
- package/dist/hooks/session-end/action-runner.js +2 -1
- package/dist/hooks/session-end/action-runner.js.map +1 -1
- package/dist/hooks/session-end/worker.d.ts.map +1 -1
- package/dist/hooks/session-end/worker.js +2 -1
- package/dist/hooks/session-end/worker.js.map +1 -1
- package/dist/hud/index.d.ts.map +1 -1
- package/dist/hud/index.js +2 -0
- package/dist/hud/index.js.map +1 -1
- package/dist/installer/__tests__/hook-templates.test.js +2 -0
- package/dist/installer/__tests__/hook-templates.test.js.map +1 -1
- package/dist/installer/__tests__/session-start-template.test.js +16 -8
- package/dist/installer/__tests__/session-start-template.test.js.map +1 -1
- package/dist/mcp/standalone-server.js +2 -0
- package/dist/mcp/standalone-server.js.map +1 -1
- package/dist/mcp/team-server.d.ts.map +1 -1
- package/dist/mcp/team-server.js +2 -0
- package/dist/mcp/team-server.js.map +1 -1
- package/dist/notifications/reply-listener.d.ts.map +1 -1
- package/dist/notifications/reply-listener.js +2 -1
- package/dist/notifications/reply-listener.js.map +1 -1
- package/dist/platform/process-utils.d.ts.map +1 -1
- package/dist/platform/process-utils.js +3 -1
- package/dist/platform/process-utils.js.map +1 -1
- package/dist/release/__tests__/checks.test.js +73 -4
- package/dist/release/__tests__/checks.test.js.map +1 -1
- package/dist/release/__tests__/drive.test.js +15 -0
- package/dist/release/__tests__/drive.test.js.map +1 -1
- package/dist/release/__tests__/engine.test.js +591 -23
- package/dist/release/__tests__/engine.test.js.map +1 -1
- package/dist/release/checks.d.ts +47 -5
- package/dist/release/checks.d.ts.map +1 -1
- package/dist/release/checks.js +120 -8
- package/dist/release/checks.js.map +1 -1
- package/dist/release/drive.d.ts +4 -1
- package/dist/release/drive.d.ts.map +1 -1
- package/dist/release/drive.js +7 -4
- package/dist/release/drive.js.map +1 -1
- package/dist/release/engine.d.ts +23 -2
- package/dist/release/engine.d.ts.map +1 -1
- package/dist/release/engine.js +564 -76
- package/dist/release/engine.js.map +1 -1
- package/dist/release/progress.d.ts +2 -0
- package/dist/release/progress.d.ts.map +1 -1
- package/dist/release/progress.js.map +1 -1
- package/dist/ship/__tests__/gates.test.js +160 -1
- package/dist/ship/__tests__/gates.test.js.map +1 -1
- package/dist/ship/__tests__/workflow-checks.test.js +41 -73
- package/dist/ship/__tests__/workflow-checks.test.js.map +1 -1
- package/dist/ship/gates.d.ts +35 -5
- package/dist/ship/gates.d.ts.map +1 -1
- package/dist/ship/gates.js +111 -17
- package/dist/ship/gates.js.map +1 -1
- package/dist/ship/workflow.d.ts +31 -0
- package/dist/ship/workflow.d.ts.map +1 -0
- package/dist/ship/workflow.js +86 -0
- package/dist/ship/workflow.js.map +1 -0
- package/dist/smoke/__tests__/copilot-factory-run-scenario.test.js +7 -1
- package/dist/smoke/__tests__/copilot-factory-run-scenario.test.js.map +1 -1
- package/dist/smoke/__tests__/copilot-sdk-driver.test.js +2 -2
- package/dist/smoke/__tests__/copilot-sdk-driver.test.js.map +1 -1
- package/dist/team/__tests__/runtime-cli.test.js +4 -4
- package/dist/team/__tests__/runtime-cli.test.js.map +1 -1
- package/dist/team/bridge-entry.d.ts.map +1 -1
- package/dist/team/bridge-entry.js +2 -0
- package/dist/team/bridge-entry.js.map +1 -1
- package/dist/team/runtime-cli.d.ts.map +1 -1
- package/dist/team/runtime-cli.js +2 -0
- package/dist/team/runtime-cli.js.map +1 -1
- package/dist/utils/__tests__/windows-search.test.js +58 -8
- package/dist/utils/__tests__/windows-search.test.js.map +1 -1
- package/dist/utils/windows-search.d.ts +4 -2
- package/dist/utils/windows-search.d.ts.map +1 -1
- package/dist/utils/windows-search.js +4 -2
- package/dist/utils/windows-search.js.map +1 -1
- package/docs/CLAUDE.md +1 -1
- package/docs/REFERENCE.md +5 -4
- package/docs/design/ISSUE-3712-RELEASE-VERIFICATION.md +1 -1
- package/package.json +2 -2
- package/plugin.json +1 -1
- package/scripts/ci/duration-sequencer.mjs +118 -0
- package/scripts/ci/durations-reporter.mjs +34 -0
- package/scripts/ci/tree-reuse.mjs +166 -0
- package/scripts/ci/update-test-durations.mjs +82 -0
- package/scripts/cleanup-orphans.mjs +3 -0
- package/scripts/lib/windows-search.cjs +2 -12
- package/scripts/lib/windows-search.mjs +24 -4
- package/scripts/persistent-mode.mjs +4 -0
- package/scripts/repair-plugin-cache.mjs +3 -0
- package/scripts/run-provider-advisor.js +3 -0
- package/scripts/run.cjs +3 -0
- package/scripts/shipyard-audit.mjs +3 -0
- package/scripts/workflow-drift-guard.mjs +4 -0
- package/skills/omc-doctor/node-hook-fingerprints.json +8 -0
- package/skills/self-improve/scripts/resolve-paths.mjs +3 -0
- package/templates/hooks/code-simplifier.mjs +3 -0
- package/templates/hooks/keyword-detector.mjs +3 -0
- package/templates/hooks/lib/windows-search.mjs +27 -0
- package/templates/hooks/persistent-mode.mjs +7 -0
- package/templates/hooks/post-tool-use-failure.mjs +3 -0
- package/templates/hooks/post-tool-use.mjs +3 -0
- package/templates/hooks/pre-tool-use.mjs +3 -0
- package/templates/hooks/session-end.mjs +3 -0
- package/templates/hooks/session-start.mjs +3 -0
- package/templates/hooks/stop-continuation.mjs +3 -0
- package/templates/hooks/workflow-drift-guard.mjs +4 -0
- package/bridge/__pycache__/gyoshu_bridge.cpython-314.pyc +0 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
{
|
|
10
10
|
"name": "oh-my-copilot",
|
|
11
11
|
"description": "Multi-agent orchestration for GitHub Copilot CLI with intelligent model routing across agents and skills. Zero learning curve. Maximum power.",
|
|
12
|
-
"version": "5.19.
|
|
12
|
+
"version": "5.19.5",
|
|
13
13
|
"author": {
|
|
14
14
|
"name": "Robin Norberg"
|
|
15
15
|
},
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
]
|
|
26
26
|
}
|
|
27
27
|
],
|
|
28
|
-
"version": "5.19.
|
|
28
|
+
"version": "5.19.5"
|
|
29
29
|
}
|
|
@@ -35,15 +35,32 @@ __export(claude_md_coordinator_exports, {
|
|
|
35
35
|
runClaudeMdCoordinatorHandshake: () => runClaudeMdCoordinatorHandshake
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(claude_md_coordinator_exports);
|
|
38
|
-
|
|
38
|
+
|
|
39
|
+
// src/utils/windows-search.ts
|
|
39
40
|
var import_node_fs = require("node:fs");
|
|
40
|
-
var
|
|
41
|
+
var import_node_path = require("node:path");
|
|
42
|
+
var VARIABLE = "NoDefaultCurrentDirectoryInExePath";
|
|
43
|
+
function isVariable(key) {
|
|
44
|
+
return key.toUpperCase() === VARIABLE.toUpperCase();
|
|
45
|
+
}
|
|
46
|
+
function hardenWindowsExeSearch() {
|
|
47
|
+
if (process.platform !== "win32") return;
|
|
48
|
+
for (const key of Object.keys(process.env)) {
|
|
49
|
+
if (isVariable(key)) delete process.env[key];
|
|
50
|
+
}
|
|
51
|
+
process.env[VARIABLE] = "1";
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// src/cli/claude-md-coordinator.ts
|
|
55
|
+
var import_node_crypto2 = require("node:crypto");
|
|
56
|
+
var import_node_fs2 = require("node:fs");
|
|
57
|
+
var import_node_path3 = require("node:path");
|
|
41
58
|
|
|
42
59
|
// src/installer/claude-md-transaction.ts
|
|
43
60
|
var import_node_crypto = require("node:crypto");
|
|
44
61
|
var nodeFs = __toESM(require("node:fs"), 1);
|
|
45
62
|
var nativePath = __toESM(require("node:path"), 1);
|
|
46
|
-
var
|
|
63
|
+
var import_node_path2 = require("node:path");
|
|
47
64
|
|
|
48
65
|
// src/lib/paths.ts
|
|
49
66
|
var OMC_PLUGIN_MARKETPLACE_SLUG = "omc";
|
|
@@ -647,15 +664,15 @@ function validateRootedRegularFile(root, path, allowAbsent = true, fs = defaultF
|
|
|
647
664
|
return normalizedPath;
|
|
648
665
|
}
|
|
649
666
|
function captureTransactionRoot(root, fs) {
|
|
650
|
-
const alias = (0,
|
|
651
|
-
const canonical = (0,
|
|
667
|
+
const alias = (0, import_node_path2.resolve)(root);
|
|
668
|
+
const canonical = (0, import_node_path2.resolve)(fs.realpathSync(alias));
|
|
652
669
|
const stat = fs.lstatSync(canonical);
|
|
653
670
|
if (stat.isSymbolicLink() || !stat.isDirectory()) throw new Error(`Invalid transaction root: ${alias}`);
|
|
654
671
|
return { alias, canonical, dev: typeof stat.dev === "number" ? stat.dev : void 0, ino: typeof stat.ino === "number" ? stat.ino : void 0 };
|
|
655
672
|
}
|
|
656
673
|
function verifyCapturedRoot(root, fs, verifyAlias) {
|
|
657
|
-
if (verifyAlias && (0,
|
|
658
|
-
if ((0,
|
|
674
|
+
if (verifyAlias && (0, import_node_path2.resolve)(fs.realpathSync(root.alias)) !== root.canonical) throw new Error(`Transaction root changed: ${root.alias}`);
|
|
675
|
+
if ((0, import_node_path2.resolve)(fs.realpathSync(root.canonical)) !== root.canonical) throw new Error(`Transaction root changed: ${root.canonical}`);
|
|
659
676
|
const stat = fs.lstatSync(root.canonical);
|
|
660
677
|
if (stat.isSymbolicLink() || !stat.isDirectory() || root.dev !== void 0 && stat.dev !== root.dev || root.ino !== void 0 && stat.ino !== root.ino) throw new Error(`Invalid transaction root: ${root.canonical}`);
|
|
661
678
|
}
|
|
@@ -718,8 +735,8 @@ function mergeForOverwrite(existing, canonical, version) {
|
|
|
718
735
|
${cleaned.content}`, ranges: cleaned.ranges, variants: cleaned.variants };
|
|
719
736
|
}
|
|
720
737
|
function exclusiveVerifiedBackup(state, root, fs) {
|
|
721
|
-
const directory = (0,
|
|
722
|
-
const stem = `${(0,
|
|
738
|
+
const directory = (0, import_node_path2.dirname)(state.path);
|
|
739
|
+
const stem = `${(0, import_node_path2.basename)(state.path)}.backup.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
|
|
723
740
|
for (let attempt = 0; attempt < 16; attempt += 1) {
|
|
724
741
|
const backup = `${directory}/${stem}.${(0, import_node_crypto.randomBytes)(12).toString("hex")}`;
|
|
725
742
|
try {
|
|
@@ -745,8 +762,8 @@ function exclusiveVerifiedBackup(state, root, fs) {
|
|
|
745
762
|
throw new Error("Unable to create backup");
|
|
746
763
|
}
|
|
747
764
|
function atomicWrite(operation, root, fs, verifyAlias) {
|
|
748
|
-
const directory = (0,
|
|
749
|
-
operation.tempPath = `${directory}/.${(0,
|
|
765
|
+
const directory = (0, import_node_path2.dirname)(operation.path);
|
|
766
|
+
operation.tempPath = `${directory}/.${(0, import_node_path2.basename)(operation.path)}.omc-tmp-${(0, import_node_crypto.randomBytes)(12).toString("hex")}`;
|
|
750
767
|
validateTransactionTarget(root, operation.tempPath, true, fs, verifyAlias);
|
|
751
768
|
fs.writeFileSync(operation.tempPath, operation.bytes, { flag: "wx", mode: 384 });
|
|
752
769
|
validateTransactionTarget(root, operation.tempPath, false, fs, verifyAlias);
|
|
@@ -777,7 +794,7 @@ function lstatPresent(path, fs) {
|
|
|
777
794
|
}
|
|
778
795
|
function isClaudeMdEnabledInConfig(configRoot, fs = defaultFs) {
|
|
779
796
|
try {
|
|
780
|
-
const configPath = (0,
|
|
797
|
+
const configPath = (0, import_node_path2.resolve)(configRoot, OMC_CONFIG_FILE_REL);
|
|
781
798
|
if (!fs.existsSync(configPath)) return true;
|
|
782
799
|
return JSON.parse(fs.readFileSync(configPath, "utf-8")).claudeMdEnabled !== false;
|
|
783
800
|
} catch {
|
|
@@ -795,8 +812,8 @@ function executeClaudeMdTransaction(request) {
|
|
|
795
812
|
return failure(request, 3, message(error), "validation");
|
|
796
813
|
}
|
|
797
814
|
const root = capturedRoot.canonical;
|
|
798
|
-
const main2 = (0,
|
|
799
|
-
const companion = (0,
|
|
815
|
+
const main2 = (0, import_node_path2.resolve)(root, "CLAUDE.md");
|
|
816
|
+
const companion = (0, import_node_path2.resolve)(root, "CLAUDE-omc.md");
|
|
800
817
|
try {
|
|
801
818
|
verifyCapturedRoot(capturedRoot, fs, true);
|
|
802
819
|
validateTransactionTarget(capturedRoot, main2, true, fs, true);
|
|
@@ -890,9 +907,10 @@ function executeClaudeMdTransaction(request) {
|
|
|
890
907
|
}
|
|
891
908
|
|
|
892
909
|
// src/cli/claude-md-coordinator.ts
|
|
910
|
+
hardenWindowsExeSearch();
|
|
893
911
|
var CLAUDE_MD_COORDINATOR_SCHEMA_VERSION = 1;
|
|
894
|
-
var COMPILED_ENGINE_VERSION = true ? "5.19.
|
|
895
|
-
var COMPILED_SOURCE_SHA256 = true ? "
|
|
912
|
+
var COMPILED_ENGINE_VERSION = true ? "5.19.5" : "";
|
|
913
|
+
var COMPILED_SOURCE_SHA256 = true ? "4ac479695819f4047652f66cb4829ea9a92034e453c56af88af20d31d37d6870" : "";
|
|
896
914
|
function runClaudeMdCoordinatorHandshake() {
|
|
897
915
|
if (!COMPILED_ENGINE_VERSION || !COMPILED_SOURCE_SHA256) {
|
|
898
916
|
return { exitCode: 2, response: coordinatorError(2, "Coordinator build handshake is unavailable") };
|
|
@@ -906,22 +924,22 @@ function isObject(value) {
|
|
|
906
924
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
907
925
|
}
|
|
908
926
|
function verifiedSource(pluginRootInput, sourceInput) {
|
|
909
|
-
const pluginRoot = (0,
|
|
910
|
-
const sourcePath = (0,
|
|
927
|
+
const pluginRoot = (0, import_node_path3.resolve)(pluginRootInput);
|
|
928
|
+
const sourcePath = (0, import_node_path3.resolve)(sourceInput);
|
|
911
929
|
if (!isStrictChildPath(pluginRootInput, sourceInput)) throw new Error("Source must be inside plugin root");
|
|
912
|
-
if ((0,
|
|
913
|
-
const rootReal = (0,
|
|
930
|
+
if ((0, import_node_fs2.lstatSync)(pluginRoot).isSymbolicLink()) throw new Error("Plugin root must not be a symbolic link");
|
|
931
|
+
const rootReal = (0, import_node_fs2.realpathSync)(pluginRoot);
|
|
914
932
|
let component = pluginRoot;
|
|
915
|
-
const suffix = (0,
|
|
933
|
+
const suffix = (0, import_node_path3.relative)(pluginRoot, sourcePath).split(/[\\/]/);
|
|
916
934
|
for (const part of suffix) {
|
|
917
|
-
component = (0,
|
|
918
|
-
if ((0,
|
|
935
|
+
component = (0, import_node_path3.resolve)(component, part);
|
|
936
|
+
if ((0, import_node_fs2.lstatSync)(component).isSymbolicLink()) throw new Error("Source path must not traverse a symbolic link");
|
|
919
937
|
}
|
|
920
|
-
const stat = (0,
|
|
938
|
+
const stat = (0, import_node_fs2.lstatSync)(sourcePath);
|
|
921
939
|
if (!stat.isFile()) throw new Error("Source must be a regular file");
|
|
922
|
-
const sourceReal = (0,
|
|
940
|
+
const sourceReal = (0, import_node_fs2.realpathSync)(sourcePath);
|
|
923
941
|
if (!isStrictChildPath(rootReal, sourceReal)) throw new Error("Resolved source escapes plugin root");
|
|
924
|
-
return { pluginRoot, sourcePath, bytes: (0,
|
|
942
|
+
return { pluginRoot, sourcePath, bytes: (0, import_node_fs2.readFileSync)(sourcePath) };
|
|
925
943
|
}
|
|
926
944
|
function runClaudeMdCoordinator(input) {
|
|
927
945
|
try {
|
|
@@ -953,7 +971,7 @@ function main() {
|
|
|
953
971
|
}
|
|
954
972
|
let parsed;
|
|
955
973
|
try {
|
|
956
|
-
parsed = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode((0,
|
|
974
|
+
parsed = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode((0, import_node_fs2.readFileSync)(0)));
|
|
957
975
|
} catch {
|
|
958
976
|
process.stdout.write(`${JSON.stringify(coordinatorError(2, "Malformed UTF-8 JSON request"))}
|
|
959
977
|
`);
|