@koalaauto/agentchannel 3.66.0 → 3.66.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.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Remove a temporary path the runner made; one that stays is left to the OS. On Windows a process that just exited (a sandboxed
3
+ * probe, a run's Codex) can still hold its folder for a moment, and a plain rmSync threw EBUSY out of the caller: the sandbox
4
+ * probe lost its verdict and the agent was shown as needing setup (zip-reela-analytics, 3.63.1).
5
+ */
6
+ export declare function removeQuietly(p: string): void;
@@ -0,0 +1,14 @@
1
+ import { rmSync } from 'node:fs';
2
+ /**
3
+ * Remove a temporary path the runner made; one that stays is left to the OS. On Windows a process that just exited (a sandboxed
4
+ * probe, a run's Codex) can still hold its folder for a moment, and a plain rmSync threw EBUSY out of the caller: the sandbox
5
+ * probe lost its verdict and the agent was shown as needing setup (zip-reela-analytics, 3.63.1).
6
+ */
7
+ export function removeQuietly(p) {
8
+ try {
9
+ rmSync(p, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 });
10
+ }
11
+ catch {
12
+ // a leftover temporary folder harms nothing
13
+ }
14
+ }
@@ -1,5 +1,5 @@
1
1
  import { randomBytes } from 'node:crypto';
2
- import { appendFileSync, mkdirSync, rmSync } from 'node:fs';
2
+ import { appendFileSync, mkdirSync } from 'node:fs';
3
3
  import { tmpdir } from 'node:os';
4
4
  import { join } from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
@@ -24,6 +24,7 @@ import { isGitRepo } from './workspace.js';
24
24
  import { accountProblem, effortRejected, looksLikeLoginError, modelRejected, programMissing, summarizeRuntimeError } from '../envcheck.js';
25
25
  import { redact } from '../redact.js';
26
26
  import { TraceRecorder } from '../trace.js';
27
+ import { removeQuietly } from '../removequiet.js';
27
28
  import { detectHost, looksLikeSandboxError, sandboxFix } from '../sandboxcheck.js';
28
29
  import { prepareAgentHome, realHomeOf, secretPaths } from './home.js';
29
30
  import { draftText, parsePrepared, parseStructured } from './structured.js';
@@ -787,12 +788,12 @@ export class Runner {
787
788
  }
788
789
  this.state.pruneTasks(dead);
789
790
  for (const id of dead) {
790
- rmSync(this.filesDir(id), { recursive: true, force: true });
791
+ removeQuietly(this.filesDir(id));
791
792
  // the task's scratch HOME (caches, a Codex session) is not needed once the task has ended
792
793
  if (this.me?.name) {
793
794
  const h = join(this.o.agentHomesDir ?? join(tmpdir(), 'ach-homes'), this.me.name.replace(/[^A-Za-z0-9_.-]/g, '_').slice(0, 80), id.replace(/[^A-Za-z0-9_.-]/g, '_').slice(0, 80));
794
795
  unlinkWindowsSandbox(join(h, '.codex')); // the user's own sandbox setup: never removed with the run
795
- rmSync(h, { recursive: true, force: true });
796
+ removeQuietly(h);
796
797
  }
797
798
  }
798
799
  // once a day: work dirs of tasks that ended more than a week ago (`ach run --gc` by hand does the same; branches are kept)
@@ -1,7 +1,8 @@
1
1
  import { execFile } from 'node:child_process';
2
2
  import { runtimeLabel, runtimeSpec } from './adapters/spec.js';
3
3
  import { randomBytes } from 'node:crypto';
4
- import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
4
+ import { existsSync, mkdtempSync, readFileSync, writeFileSync } from 'node:fs';
5
+ import { removeQuietly } from './removequiet.js';
5
6
  import { createRequire } from 'node:module';
6
7
  import { homedir, tmpdir } from 'node:os';
7
8
  import { delimiter, dirname, join } from 'node:path';
@@ -286,13 +287,13 @@ async function probe(tool, o) {
286
287
  return { tool, ok: false, problem: classify(err, host), detail: firstLine(err) || `exit ${r.code}` };
287
288
  }
288
289
  finally {
289
- rmSync(dir, { recursive: true, force: true });
290
- rmSync(outside, { force: true });
290
+ removeQuietly(dir);
291
+ removeQuietly(outside);
291
292
  if (canaryDir)
292
- rmSync(canaryDir, { recursive: true, force: true });
293
+ removeQuietly(canaryDir);
293
294
  if (codexHome) {
294
295
  unlinkWindowsSandbox(codexHome);
295
- rmSync(codexHome, { recursive: true, force: true });
296
+ removeQuietly(codexHome);
296
297
  }
297
298
  }
298
299
  }
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "3.66.0";
1
+ export declare const VERSION = "3.66.1";
2
2
  /** The npm package (scripts/release.mjs keeps it and VERSION in step with package.json). */
3
3
  export declare const PKG_NAME = "@koalaauto/agentchannel";
4
4
  /**
@@ -1,4 +1,4 @@
1
- export const VERSION = '3.66.0';
1
+ export const VERSION = '3.66.1';
2
2
  /** The npm package (scripts/release.mjs keeps it and VERSION in step with package.json). */
3
3
  export const PKG_NAME = '@koalaauto/agentchannel';
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koalaauto/agentchannel",
3
- "version": "3.66.0",
3
+ "version": "3.66.1",
4
4
  "description": "Hand work between your team's agents (Claude Code, Codex) and follow it in one panel: the ach CLI, MCP server and runner for AgentChannel v2",
5
5
  "keywords": [
6
6
  "agentchannel",