@salaros/ai-harness 0.5.1 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salaros/ai-harness",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Installs and updates the agent harness from its upstream repository: hooks, skills, agents and the documentation chain, merged into an existing repository without touching its own work.",
5
5
  "bin": {
6
6
  "ai-harness": "scripts/update-harness.js"
@@ -126,6 +126,11 @@ function targetRoot(options) {
126
126
 
127
127
  // ---------------------------------------------------------------- the upstream
128
128
 
129
+ // The command line that clone runs on, which is how every install begins that did not bring its own
130
+ // checkout. Separate from the running of it because nothing in the suite clones: a check can read
131
+ // arguments, and cannot watch a network call it must not make.
132
+ const cloneArgs = (ref, dir) => ["-c", "core.longpaths=true", "clone", "--quiet", "--branch", ref, TEMPLATE, dir];
133
+
129
134
  // A clone deep enough to read the recorded commit: an update needs that commit's version of a file
130
135
  // as the merge base, and --depth 1 would not have it. Removed again unless the caller supplied one.
131
136
  function templateCheckout(ref, options) {
@@ -141,7 +146,7 @@ function templateCheckout(ref, options) {
141
146
  }
142
147
  const dir = fs.mkdtempSync(path.join(os.tmpdir(), "harness-"));
143
148
  say(`cloning ${TEMPLATE} at ${ref}`);
144
- const r = lib.run("git", [...GIT, "clone", "--quiet", "--branch", ref, TEMPLATE, dir]);
149
+ const r = lib.run("git", cloneArgs(ref, dir));
145
150
  if (r.status !== 0) { fs.rmSync(dir, { recursive: true, force: true }); fail(`could not clone the upstream at ${ref}\n${r.output}`); }
146
151
  if (!usable(dir)) {
147
152
  fs.rmSync(dir, { recursive: true, force: true });
@@ -730,7 +735,7 @@ function main(args) {
730
735
  // The plan and the decisions under it, so the suite can put a case in and read the answer out rather
731
736
  // than building a git checkout to reach one branch. apply() is here for its dry run, which prints and
732
737
  // writes nothing; main() writes to somebody's repository and is reached through the command line.
733
- module.exports = { installerStamp, upToDate, settleDropped, unknownArgs, mistypedArgs, usage, parseOptions, plan, apply, lineCounts, overlap, NEAREST, skeletonLines };
738
+ module.exports = { cloneArgs, installerStamp, upToDate, settleDropped, unknownArgs, mistypedArgs, usage, parseOptions, plan, apply, lineCounts, overlap, NEAREST, skeletonLines };
734
739
 
735
740
  if (require.main === module) {
736
741
  try { process.exitCode = main(process.argv.slice(2)); }