@sleep2agi/agent-network 2.3.0-preview.192 → 2.3.0-preview.194

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.
@@ -1,9 +1,9 @@
1
- export declare const PAIRED_AGENT_NETWORK_VERSION = "2.3.0-preview.192";
2
- export declare const PAIRED_AGENT_NODE_VERSION = "2.5.0-preview.155";
3
- export declare const PAIRED_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.155";
4
- export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.192";
5
- export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.155";
6
- export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.155";
1
+ export declare const PAIRED_AGENT_NETWORK_VERSION = "2.3.0-preview.194";
2
+ export declare const PAIRED_AGENT_NODE_VERSION = "2.5.0-preview.157";
3
+ export declare const PAIRED_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.157";
4
+ export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.194";
5
+ export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.157";
6
+ export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.157";
7
7
  export type PairedAgentNodeResolution = {
8
8
  spec: string;
9
9
  args: string[];
@@ -4,6 +4,14 @@ export declare function ensurePrivateDirectory(path: string): void;
4
4
  * The 0600 temporary file is complete and fsynced before the atomic rename,
5
5
  * so replacing a legacy 0644/0664 target also repairs it with no chmod gap.
6
6
  */
7
+ /**
8
+ * Windows 上「rename 覆盖一个正被别的句柄打开的目标」会失败(EPERM/EBUSY),POSIX 不会 ——
9
+ * 实测 test751 原生 smoke 在 CI 上随机红在 windows-copresence.json 的 rename 上(#2222)。
10
+ * 这里是**有界重试**:只在 win32 且错误码属于"别人暂时开着"那一类时退避重试,总时长约 385ms;
11
+ * 其它错误、以及重试耗尽,一律照原样抛 —— 不吞错,也不把原子写降级成"直接覆盖写"
12
+ * (那会让读者读到半个文件)。
13
+ */
14
+ export declare function renamePrivateStateSync(temp: string, path: string, rename?: (from: string, to: string) => void, sleep?: (ms: number) => void, platform?: string): void;
7
15
  export declare function atomicWritePrivateFile(path: string, body: string): void;
8
16
  export declare function atomicWritePrivateJson(path: string, value: unknown): void;
9
17
  /** Repair a legacy umask-derived private file before reading its secret. */
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Windows: 覆盖一个**正被别的句柄打开**的目标会失败(EPERM/EBUSY/EACCES),而 POSIX 的 rename 会成功 ——
3
+ * 所以同一个"写临时文件再 rename"的原子写在 Linux 上永远绿、在 Windows 上偶发红(#2222 实测在
4
+ * windows-copresence.json 上红过一次,CI 上看起来像随机红)。
5
+ *
6
+ * 这里只做**有界重试**:仅 win32、仅这三种"别人暂时开着"的错误码,退避 10/25/50/100/200ms
7
+ * (最多 5 次,总上限约 385ms);其它错误与重试耗尽一律照原样抛 —— 不吞错,也不把原子写降级成
8
+ * "原地覆盖"(那会让读者读到半个文件)。
9
+ *
10
+ * 为什么不复用 @sleep2agi/agent-network 里那份:agent-node 与 agent-network 是**分别发布**的两个包,
11
+ * 彼此没有依赖;跨包相对路径 import 在发布后会断。语义必须一致,两边的单测都要钉住同一组数字。
12
+ */
13
+ export declare function renameOverExistingSync(temp: string, path: string, rename?: (from: string, to: string) => void, sleep?: (ms: number) => void, platform?: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-network",
3
- "version": "2.3.0-preview.192",
3
+ "version": "2.3.0-preview.194",
4
4
  "description": "AI Agent Network CLI — Local-first multi-agent orchestration across 6 runtimes (Claude Code CLI / Claude Agent SDK / Codex SDK / Codex app-server / Grok Build ACP / OpenCode CLI) and 8+ LLM providers. Apache 2.0.",
5
5
  "type": "module",
6
6
  "main": "dist/src/client.js",