@sleep2agi/agent-network 2.3.0-preview.85 → 2.3.0-preview.87
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.
- package/dist/bin/cli.js +2 -2
- package/dist/src/client.js +1 -1
- package/dist/src/node-server.js +7 -7
- package/dist/src/opencode-agent-node-pair.d.ts +6 -6
- package/dist/src/opencode-package-binary.d.ts +6 -1
- package/dist/src/opencode-safe-root.d.ts +10 -1
- package/dist/src/sibling-agent-node.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const PAIRED_AGENT_NETWORK_VERSION = "2.3.0-preview.
|
|
2
|
-
export declare const PAIRED_AGENT_NODE_VERSION = "2.5.0-preview.
|
|
3
|
-
export declare const PAIRED_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.
|
|
4
|
-
export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.
|
|
5
|
-
export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.
|
|
6
|
-
export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.
|
|
1
|
+
export declare const PAIRED_AGENT_NETWORK_VERSION = "2.3.0-preview.87";
|
|
2
|
+
export declare const PAIRED_AGENT_NODE_VERSION = "2.5.0-preview.67";
|
|
3
|
+
export declare const PAIRED_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.67";
|
|
4
|
+
export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.87";
|
|
5
|
+
export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.67";
|
|
6
|
+
export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.67";
|
|
7
7
|
export type PairedAgentNodeResolution = {
|
|
8
8
|
spec: string;
|
|
9
9
|
args: string[];
|
|
@@ -18,4 +18,9 @@ export declare function discoverOpencodeForbiddenRoots(cwd?: string): string[];
|
|
|
18
18
|
export declare function validateOpencodePackageBinary(rawBinary: string, options: ValidateOpencodePackageBinaryOptions): string;
|
|
19
19
|
/** Resolve the first *valid package-owned* OpenCode entry on PATH. Invalid
|
|
20
20
|
* project-local shims are skipped so a later trusted global install can win. */
|
|
21
|
-
|
|
21
|
+
/** #1845 层① —— 包身份校验只依赖 POSIX 的 lstat/uid/mode 语义,darwin 与 linux 等价
|
|
22
|
+
* (2026-09-07 Mac mini 真跑:home 前缀 npm 安装 → VALIDATE_OK;/tmp 下祖先 1777 仍被拒)。
|
|
23
|
+
* win32 没有 uid、也没有 0o111 可执行位,继续拦。平台可注入,便于在 Linux CI 上测三种分支。 */
|
|
24
|
+
export declare const OPENCODE_VERIFIER_PLATFORMS: ReadonlySet<NodeJS.Platform>;
|
|
25
|
+
export declare function opencodeVerifierSupportsPlatform(platform?: NodeJS.Platform): boolean;
|
|
26
|
+
export declare function resolveOpencodePackageBinaryFromPath(searchPath: string, options: ValidateOpencodePackageBinaryOptions, platform?: NodeJS.Platform): string;
|
|
@@ -16,7 +16,16 @@ export interface OpencodeSafeExternalRoot {
|
|
|
16
16
|
readonly baseIno: number | bigint;
|
|
17
17
|
readonly ancestors: readonly PathIdentity[];
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
/** #1845 层② —— 运行时隔离 base 的平台策略。规则(祖先不可符号链接、非 root 只能是本 uid、无 0o022 写位、
|
|
20
|
+
* base 本身 uid-owned 0700)三平台一样;不同的只有**默认 base 在哪**:
|
|
21
|
+
* linux → /run/user/<uid>(systemd 的每用户 0700 运行目录;缺失时仅 root 可建)
|
|
22
|
+
* darwin → realpath($TMPDIR)(macOS 每用户 0700 的 /private/var/folders/xx/<hash>/T;2026-09-07 Mac mini 量过
|
|
23
|
+
* 全链:T 700 uid、<hash> 755 uid、其余 755 root,满足同一套祖先规则)
|
|
24
|
+
* 其它 → 拦(win32 没有 uid 语义)
|
|
25
|
+
* 显式 base(参数或 ANET_OPENCODE_SAFE_BASE)三平台通用。platform / env 可注入,便于在 Linux CI 上测 darwin 分支。 */
|
|
26
|
+
export declare const OPENCODE_SAFE_ROOT_PLATFORMS: ReadonlySet<NodeJS.Platform>;
|
|
27
|
+
export declare function defaultOpencodeRuntimeBase(uid: number, platform: NodeJS.Platform, env: NodeJS.ProcessEnv): string;
|
|
28
|
+
export declare function resolveOpencodeTrustedRuntimeBase(explicit?: string, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): PathIdentity;
|
|
20
29
|
export declare function createOpencodeSafeExternalRoot(options: {
|
|
21
30
|
prefix: string;
|
|
22
31
|
boundaries?: readonly string[];
|
|
@@ -7,7 +7,15 @@ export interface SiblingAgentNode {
|
|
|
7
7
|
export interface SiblingFs {
|
|
8
8
|
exists(path: string): boolean;
|
|
9
9
|
readJson(path: string): unknown;
|
|
10
|
+
/**
|
|
11
|
+
* #1832 —— npm -g / --prefix 布局下 process.argv[1] 是 `<prefix>/bin/anet` 符号链接,真实文件在
|
|
12
|
+
* `<prefix>/lib/node_modules/@sleep2agi/agent-network/…`;不解析就从 `<prefix>/bin` 往上找不到
|
|
13
|
+
* node_modules,旁边的 agent-node 永远命不中。可选:不提供或抛错时按传入路径原样找。
|
|
14
|
+
*/
|
|
15
|
+
realpath?(path: string): string;
|
|
10
16
|
}
|
|
17
|
+
/** 入口路径先走 realpath(符号链接 → 真实文件);失败(不存在 / 无权限)退回原路径。 */
|
|
18
|
+
export declare function resolveCliEntry(cliEntry: string, fs: SiblingFs): string;
|
|
11
19
|
/** 从 anet 入口文件路径往上,返回最近的 `…/node_modules` 目录;找不到返回 null。 */
|
|
12
20
|
export declare function nearestNodeModules(cliEntry: string): string | null;
|
|
13
21
|
/** package.json 的 bin 可以是字符串或 { name: path };只认名为 agent-node 的那条。 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sleep2agi/agent-network",
|
|
3
|
-
"version": "2.3.0-preview.
|
|
3
|
+
"version": "2.3.0-preview.87",
|
|
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",
|