@volter/supercode-orchestrator 0.5.16 → 0.5.17

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.
@@ -168,7 +168,7 @@ export function capacity(caps, held, evaluate) {
168
168
  // the card is counted already: it is now in the status its start moved it to
169
169
  // the start is the card's next run, in its assignee's harness and model now (a card reassigned from Codex to
170
170
  // Claude Code counts against Claude Code's caps from this start, not as the harness its last session ran)
171
- if (had && counts === 'sessions' && had.harness !== entry.harness) things.push({ ...entry, counts });
171
+ if (had && counts === 'sessions' && entry.harness && had.harness !== entry.harness) things.push({ ...entry, counts });
172
172
  else if (had) { if (counts !== 'sessions' && counts !== 'turns') Object.assign(had, { status: entry.status, stored: entry.stored, model: entry.model ?? had.model, harness: entry.harness ?? had.harness, machine: entry.machine ?? had.machine }); }
173
173
  else things.push({ ...entry, counts });
174
174
  }
@@ -24,6 +24,10 @@ const indexed = (cwd, args) => {
24
24
  };
25
25
 
26
26
  const FETCH_EVERY_MS = 15_000;
27
+ /** The background push: `git push`, then its error kept for `behind()` (or the last one cleared when it landed). */
28
+ const PUSH = `const {spawnSync}=require('node:child_process'),fs=require('node:fs');const [branch,failure,temporary]=process.argv.slice(1);
29
+ const r=spawnSync('git',['push','--quiet','origin','HEAD:'+branch],{encoding:'utf8',windowsHide:true});
30
+ try{if(r.status===0)fs.rmSync(failure,{force:true});else{fs.writeFileSync(temporary,String(r.stderr||r.error||'push failed'));fs.renameSync(temporary,failure);}}catch{}`;
27
31
  /** When this checkout last asked its remote (git writes FETCH_HEAD on every fetch, whichever process ran it). */
28
32
  const fetchedAt = (root) => { try { return statSync(git(root, ['rev-parse', '--git-path', 'FETCH_HEAD']).trim().replace(/^(?!\/)/, `${root}/`)).mtimeMs; } catch { return 0; } };
29
33
 
@@ -93,7 +97,9 @@ export class GitDocument {
93
97
  * that lands. */
94
98
  pushInBackground(branch) {
95
99
  const failure = this.failurePath();
96
- const pushing = spawn('sh', ['-c', 'git push --quiet origin "HEAD:$1" 2>"$2.tmp" && rm -f "$2" "$2.tmp" || mv -f "$2.tmp" "$2"', 'push', branch, failure], { cwd: this.root, stdio: 'ignore', detached: true });
100
+ // Node, not a shell: a Windows checkout outside Git Bash has no `sh`. Each push keeps its error in a file of its own
101
+ // until it ends, so two pushes never write one.
102
+ const pushing = spawn(process.execPath, ['-e', PUSH, branch, failure, `${failure}.${process.pid}.${Date.now()}.tmp`], { cwd: this.root, stdio: 'ignore', detached: true, windowsHide: true });
97
103
  this.pushing = pushing; this.again = false;
98
104
  const done = () => {
99
105
  if (this.pushing !== pushing) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-orchestrator",
3
- "version": "0.5.16",
3
+ "version": "0.5.17",
4
4
  "type": "module",
5
5
  "description": "The orchestrator runtime over the Volter Harness ontology: one typed operational model whose folder is its serialization, read and written through the harness orchestration doors (docs/ORCHESTRATOR-IR.md)",
6
6
  "exports": {