@sleep2agi/agent-network 2.3.0-preview.61 → 2.3.0-preview.63

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,7 +1,7 @@
1
- export declare const PAIRED_AGENT_NETWORK_VERSION = "2.3.0-preview.61";
1
+ export declare const PAIRED_AGENT_NETWORK_VERSION = "2.3.0-preview.63";
2
2
  export declare const PAIRED_AGENT_NODE_VERSION = "2.5.0-preview.48";
3
3
  export declare const PAIRED_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.48";
4
- export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.61";
4
+ export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.63";
5
5
  export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.48";
6
6
  export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.48";
7
7
  export type PairedAgentNodeResolution = {
@@ -0,0 +1,27 @@
1
+ export type OwnedRootRole = "agent";
2
+ export interface OwnedRoot {
3
+ pid: number;
4
+ birth: string;
5
+ role: OwnedRootRole;
6
+ }
7
+ export interface OwnedRootProbes {
8
+ /** 进程这一代的出生时刻;读不到返回 null(可能已退出,也可能无权限)。 */
9
+ birth(pid: number): string | null;
10
+ /** 🔴 只有**确证**进程不存在时返回 false。无权限等一律视为存在。 */
11
+ vanished(pid: number): boolean;
12
+ }
13
+ /** 把 `ps` 发现的 pid 列表冻结成 owned roots。
14
+ *
15
+ * · 读得到 birth ⇒ 收下
16
+ * · 读不到、且**确证已消失** ⇒ 跳过(stop 想要的结果,不是错误)
17
+ * · 读不到、进程仍在 ⇒ throw(权限等真问题,不放过)
18
+ */
19
+ export declare function resolveOwnedRoots(pids: number[], probes: OwnedRootProbes): OwnedRoot[];
20
+ /** 🔴 正向判定「进程确实没了」,而不是「读失败就假设没了」。
21
+ *
22
+ * `kill(pid, 0)` 不送信号,只做存在性与权限探测:
23
+ * · ESRCH ⇒ 确证不存在
24
+ * · EPERM ⇒ 存在,只是不属于本用户
25
+ * · 其他 ⇒ 保守当作存在(判据只在**确证**时放行)
26
+ */
27
+ export declare function processVanished(pid: number, kill?: (p: number, s: number) => void): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-network",
3
- "version": "2.3.0-preview.61",
3
+ "version": "2.3.0-preview.63",
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",