@sporhq/spor 0.28.0 → 0.28.1

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.
@@ -2,7 +2,7 @@
2
2
  "name": "spor",
3
3
  "displayName": "Spor Context Compiler",
4
4
  "description": "Maintains a typed, versioned knowledge graph and compiles compact briefings from it: session-start injection, per-prompt relevance digests, capture at discovery, end-of-session distillation, decision queue.",
5
- "version": "0.28.0",
5
+ "version": "0.28.1",
6
6
  "author": {
7
7
  "name": "losthammer"
8
8
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spor",
3
- "version": "0.28.0",
3
+ "version": "0.28.1",
4
4
  "description": "Maintains a typed, versioned knowledge graph and compiles compact briefings from it: session-start injection, per-prompt relevance digests, capture at discovery, end-of-session distillation, decision queue.",
5
5
  "author": {
6
6
  "name": "Spor",
package/bin/spor.js CHANGED
@@ -7906,7 +7906,13 @@ function worktreeDeclaredEnv(dir) {
7906
7906
  function removeDispatchWorktree(repoDir, dir, branch) {
7907
7907
  const common = (git(dir, ["rev-parse", "--path-format=absolute", "--git-common-dir"]).stdout || "").trim();
7908
7908
  const mainCheckout = common ? path.dirname(common) : "";
7909
- if (!mainCheckout || path.resolve(mainCheckout) !== path.resolve(repoDir)) {
7909
+ // Compared CANONICALIZED (u.canonPath): git answers in the long, resolved
7910
+ // form, while `repoDir` is whatever the caller spelled — an 8.3 short name
7911
+ // on Windows (os.tmpdir() is `…\RUNNER~1\…` on the CI runner), a
7912
+ // /var -> /private/var symlink on macOS — and a spelling mismatch here read
7913
+ // as "not a worktree of repoDir", stranding the half-prepped worktree the
7914
+ // guard exists to clean up (inc-spor-windows-ci-main-failing).
7915
+ if (!mainCheckout || u.canonPath(mainCheckout) !== u.canonPath(repoDir)) {
7910
7916
  return { removed: false, reason: `${dir} is not a worktree of ${repoDir} — refusing to remove` };
7911
7917
  }
7912
7918
  const status = git(dir, ["status", "--porcelain"]);
@@ -8119,10 +8125,17 @@ const DISPATCH_RUNNER = path.join(ROOT, "lib", "shell", "agent-dispatch-runner.j
8119
8125
  // startup, exercising launchSupervisedHarness's supervisor-exited-early
8120
8126
  // branch deterministically instead of relying on a real startup crash/OOM to
8121
8127
  // happen to occur (task-spor-dispatch-supervisor-test-seam). Unset (the
8122
- // default) reproduces the exact prior invocation.
8128
+ // default) reproduces the exact prior invocation. A `.js` override runs under
8129
+ // THIS node, like the real runner: the supervisor is spawned with no shell
8130
+ // (its handshake rides an extra stdio pipe a cmd.exe hop would not inherit),
8131
+ // and Node refuses a bare `.cmd`/`.bat` spawn on Windows (EINVAL,
8132
+ // CVE-2024-27980), so a script is the one override shape that launches the
8133
+ // same way on every platform.
8123
8134
  function dispatchRunnerCommand(env = process.env) {
8124
8135
  const override = env.SPOR_DISPATCH_RUNNER_CMD;
8125
- return override ? { cmd: override, args: [] } : { cmd: process.execPath, args: [DISPATCH_RUNNER] };
8136
+ if (!override) return { cmd: process.execPath, args: [DISPATCH_RUNNER] };
8137
+ if (/\.js$/i.test(override)) return { cmd: process.execPath, args: [override] };
8138
+ return { cmd: override, args: [] };
8126
8139
  }
8127
8140
 
8128
8141
  function writePrivate(file, text) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sporhq/spor",
3
- "version": "0.28.0",
3
+ "version": "0.28.1",
4
4
  "description": "Spor — a shared memory substrate for teams and agents. Decisions, their reasons, and the traces they leave. Knowledge-graph context compiler: session-start briefings, per-prompt digests, capture at discovery, end-of-session distillation, decision queue.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Anthony Allen",