@sleep2agi/agent-network 2.3.0-preview.64 β 2.3.0-preview.66
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/im/feishu/worker.js +118 -118
- package/dist/src/node-server.js +7 -7
- package/dist/src/opencode-agent-node-pair.d.ts +6 -6
- package/dist/src/package-mode-preflight.d.ts +12 -2
- package/dist/src/posix-modes.d.ts +36 -0
- package/dist/src/profile-serialize.d.ts +1 -0
- package/dist/src/tool-allowlist.d.ts +28 -0
- package/dist/src/win-launcher.d.ts +20 -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.66";
|
|
2
|
+
export declare const PAIRED_AGENT_NODE_VERSION = "2.5.0-preview.51";
|
|
3
|
+
export declare const PAIRED_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.51";
|
|
4
|
+
export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.66";
|
|
5
|
+
export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.51";
|
|
6
|
+
export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.51";
|
|
7
7
|
export type PairedAgentNodeResolution = {
|
|
8
8
|
spec: string;
|
|
9
9
|
args: string[];
|
|
@@ -14,8 +14,18 @@ export interface UmaskVerdict {
|
|
|
14
14
|
* nothing else, which is exactly the failing case.
|
|
15
15
|
*/
|
|
16
16
|
export declare function judgeUmask(umask: number): UmaskVerdict;
|
|
17
|
-
/**
|
|
18
|
-
|
|
17
|
+
/**
|
|
18
|
+
* One line for `anet doctor`, or null when there is nothing to say.
|
|
19
|
+
*
|
|
20
|
+
* π΄ Windows gets a different sentence, not the same one. There, umask is always
|
|
21
|
+
* 0000 and this fires on every machine, while both remedies it names β
|
|
22
|
+
* `umask 0022` and `chmod -R` β do not exist. The conclusion is still true
|
|
23
|
+
* (opencode-cli will refuse), but for another reason entirely: its check is
|
|
24
|
+
* `if (runtimeUid === undefined) return false`, and Windows has no getuid.
|
|
25
|
+
* An always-on warning whose fix cannot be typed teaches people to ignore
|
|
26
|
+
* the warnings that can be.
|
|
27
|
+
*/
|
|
28
|
+
export declare function describeUmaskRisk(verdict: UmaskVerdict, platform?: NodeJS.Platform): string | null;
|
|
19
29
|
export interface ExtractedPayload {
|
|
20
30
|
path: string;
|
|
21
31
|
uid: number;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare function posixFileModes(platform?: NodeJS.Platform): boolean;
|
|
2
|
+
/** chmod where the platform has modes; a no-op where it does not. */
|
|
3
|
+
export declare function chmodIfPosix(path: string, mode: number): void;
|
|
4
|
+
/** fchmod where the platform has modes; a no-op where it does not. */
|
|
5
|
+
export declare function fchmodIfPosix(fd: number, mode: number): void;
|
|
6
|
+
/**
|
|
7
|
+
* Whether a stat's mode may be judged at all.
|
|
8
|
+
*
|
|
9
|
+
* Windows synthesises mode bits, so `(mode & 0o022) !== 0` is true for ordinary
|
|
10
|
+
* files there and every POSIX-shaped safety check reads as "unsafe". A check
|
|
11
|
+
* that can only ever return one answer is not a check.
|
|
12
|
+
*/
|
|
13
|
+
export declare function modeIsJudgeable(platform?: NodeJS.Platform): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* fsync a DIRECTORY handle, where the platform supports it.
|
|
16
|
+
*
|
|
17
|
+
* The durability barrier after an atomic rename: on POSIX, fsyncing the parent
|
|
18
|
+
* makes the rename itself survive a crash, not just the file's bytes. Windows
|
|
19
|
+
* has no equivalent β FlushFileBuffers works on files, and on a directory
|
|
20
|
+
* handle it fails:
|
|
21
|
+
*
|
|
22
|
+
* [anet] FATAL: Error: EPERM: operation not permitted, fsync
|
|
23
|
+
* at fsyncSync (node:fs:1285:11)
|
|
24
|
+
*
|
|
25
|
+
* which is `anet start <node>` dying on its first private-state write. Reported
|
|
26
|
+
* from the Windows box while it was running the previous fix, i.e. this is the
|
|
27
|
+
* next call in the same family, not a regression of that one.
|
|
28
|
+
*
|
|
29
|
+
* π΄ Note what is NOT skipped: the fsync of the temp FILE before the rename.
|
|
30
|
+
* That one works on Windows and carries the bytes. What is skipped is only
|
|
31
|
+
* the parent-directory barrier, which the platform does not offer at all β
|
|
32
|
+
* NTFS journals the rename's metadata itself. Skipping an operation the OS
|
|
33
|
+
* cannot perform is not a weakened guarantee; crashing instead of writing
|
|
34
|
+
* the file is a much larger one.
|
|
35
|
+
*/
|
|
36
|
+
export declare function fsyncDirectoryIfSupported(fd: number): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function serializeProfileForConfigJson(normalized: Record<string, any>, profile: Record<string, any>): Record<string, any>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const CLAUDE_KNOWN_TOOLS: readonly string[];
|
|
2
|
+
type Runtime = string;
|
|
3
|
+
/** Parse the comma-joined --tools string, validate each token, return the
|
|
4
|
+
* trimmed list. Runtime-scoped:
|
|
5
|
+
*
|
|
6
|
+
* Claude-lineage β each token must be in CLAUDE_KNOWN_TOOLS OR match
|
|
7
|
+
* the MCP pattern (mcp__<server>__<tool>).
|
|
8
|
+
* Other runtimes β only the basic per-token format check runs, so grok /
|
|
9
|
+
* codex / opencode tools flow through unchanged and get
|
|
10
|
+
* validated by their own downstream layers.
|
|
11
|
+
*
|
|
12
|
+
* Throws on the first offense with a message naming the bad token and,
|
|
13
|
+
* for Claude-side violations, the expected set. Never returns a
|
|
14
|
+
* partially-cleaned list β a typo must surface, not silently reshape the
|
|
15
|
+
* persisted profile.
|
|
16
|
+
*/
|
|
17
|
+
export declare function parseAndValidateTools(raw: string, runtime: Runtime): string[];
|
|
18
|
+
/** Minimal --model validation: non-empty after trim, no whitespace inside.
|
|
19
|
+
*
|
|
20
|
+
* We do NOT enforce a known-model allowlist β models are vendor-defined,
|
|
21
|
+
* evolve independently, and a strict list would break the first time
|
|
22
|
+
* MiniMax/DeepSeek/GLM/etc. ships a new variant. This catches the obvious
|
|
23
|
+
* user-side typos (`--model " claude-3 " `, `--model ""`) without
|
|
24
|
+
* over-restricting legitimate values. Vendor-side model resolution
|
|
25
|
+
* (defaultCodexModelForRuntime etc.) already validates its own contract.
|
|
26
|
+
*/
|
|
27
|
+
export declare function validateModel(raw: string): string;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ExecFileSyncOptions, type ExecFileSyncOptionsWithStringEncoding, type SpawnOptions } from "child_process";
|
|
2
|
+
/** Windows needs a command interpreter to run a .cmd; POSIX runs the file. */
|
|
3
|
+
export declare function launcherNeedsShell(platform?: NodeJS.Platform): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Quote one argument for `cmd.exe /c`.
|
|
6
|
+
*
|
|
7
|
+
* cmd's rules are not the shell's: a double quote is escaped by doubling it,
|
|
8
|
+
* and the metacharacters below must be quoted or cmd will act on them. Anything
|
|
9
|
+
* safe is left bare, so the common case stays readable in a process listing.
|
|
10
|
+
*/
|
|
11
|
+
export declare function quoteForCmd(arg: string): string;
|
|
12
|
+
/** The argv to hand to execFile/spawn so `cmd argsβ¦` runs on this platform. */
|
|
13
|
+
export declare function launcherArgv(cmd: string, args: readonly string[], platform?: NodeJS.Platform, comspec?: string | undefined): {
|
|
14
|
+
file: string;
|
|
15
|
+
argv: string[];
|
|
16
|
+
};
|
|
17
|
+
export declare function runLauncherSync(cmd: string, args: readonly string[], options: ExecFileSyncOptionsWithStringEncoding): string;
|
|
18
|
+
export declare function runLauncherSync(cmd: string, args: readonly string[], options?: ExecFileSyncOptions): Buffer;
|
|
19
|
+
/** spawn for a launcher, correct on Windows. */
|
|
20
|
+
export declare function spawnLauncher(cmd: string, args: readonly string[], options?: SpawnOptions): import("node:child_process").ChildProcess;
|
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.66",
|
|
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",
|