@sleep2agi/agent-network 2.3.0-preview.39 → 2.3.0-preview.40
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/anet.cjs +101 -0
- package/dist/bin/cli.js +2 -2
- package/dist/src/client.js +1 -1
- package/dist/src/grok-copresence-disclosure.d.ts +2 -2
- package/dist/src/grok-copresence-profile.d.ts +16 -0
- package/dist/src/im/feishu/worker.js +1 -1
- package/dist/src/node-server.js +7 -7
- package/dist/src/opencode-agent-node-pair.d.ts +3 -3
- package/dist/src/outbound-tool-names.d.ts +1 -0
- package/dist/src/package-mode-preflight.d.ts +31 -0
- package/dist/src/tmux-exact-target.d.ts +34 -0
- package/dist/src/tmux-pane-prompt.d.ts +22 -0
- package/dist/src/unsafe-package-path-reason.d.ts +17 -0
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.
|
|
2
|
-
export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.
|
|
3
|
-
export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.
|
|
1
|
+
export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.40";
|
|
2
|
+
export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.32";
|
|
3
|
+
export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.32";
|
|
4
4
|
export declare function opencodeExactPairInstallCommand(): string;
|
|
5
5
|
/** Runtime capability advertised by agent-node's operator-facing help. */
|
|
6
6
|
export declare function agentNodeHelpSupportsOpencode(help: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const OUTBOUND_TOOL_NAMES: Set<string>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface UmaskVerdict {
|
|
2
|
+
/** Will a freshly npm-extracted payload fail the (mode & 0o022) === 0 check? */
|
|
3
|
+
willProduceUnsafeModes: boolean;
|
|
4
|
+
/** Octal umask string as an operator would type it. */
|
|
5
|
+
umaskOctal: string;
|
|
6
|
+
/** Which write bits this umask fails to mask off. */
|
|
7
|
+
leaks: Array<"group" | "other">;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Read a umask value the way the package check will experience it.
|
|
11
|
+
*
|
|
12
|
+
* A umask bit SET means "withhold this permission". So group-write is withheld
|
|
13
|
+
* only when 0o020 is set in the umask; umask 0002 withholds other-write and
|
|
14
|
+
* nothing else, which is exactly the failing case.
|
|
15
|
+
*/
|
|
16
|
+
export declare function judgeUmask(umask: number): UmaskVerdict;
|
|
17
|
+
/** One line for `anet doctor`, or null when there is nothing to say. */
|
|
18
|
+
export declare function describeUmaskRisk(verdict: UmaskVerdict): string | null;
|
|
19
|
+
export interface ExtractedPayload {
|
|
20
|
+
path: string;
|
|
21
|
+
uid: number;
|
|
22
|
+
mode: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Which already-extracted payloads would be rejected right now.
|
|
26
|
+
*
|
|
27
|
+
* Reports facts about copies that exist on disk; it never fetches. An empty
|
|
28
|
+
* result means "nothing extracted yet", which is not the same as "safe" — the
|
|
29
|
+
* umask verdict is what speaks to the next fetch.
|
|
30
|
+
*/
|
|
31
|
+
export declare function rejectedPayloads(payloads: ExtractedPayload[], processUid: number): ExtractedPayload[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exact-match tmux target for a session name.
|
|
3
|
+
*
|
|
4
|
+
* tmux treats a leading `=` as "this exact name, no prefix matching". Names are
|
|
5
|
+
* passed to tmux as argv entries, never through a shell, so no quoting belongs
|
|
6
|
+
* here — callers that build a copy-pasteable command for a human should shell-
|
|
7
|
+
* quote the result themselves.
|
|
8
|
+
*/
|
|
9
|
+
export declare function exactSession(name: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* True when this target is already pinned to an exact session.
|
|
12
|
+
*
|
|
13
|
+
* Applying the prefix twice would look for a session literally named `=x`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isExactTarget(target: string): boolean;
|
|
16
|
+
/** Idempotent form, for call sites that may receive either shape. */
|
|
17
|
+
export declare function ensureExactSession(nameOrTarget: string): string;
|
|
18
|
+
/** One row of `tmux list-panes -a -F '#{session_name}\t#{window_index}.#{pane_index}'`. */
|
|
19
|
+
export interface PaneRow {
|
|
20
|
+
session: string;
|
|
21
|
+
/** `window.pane`, e.g. `0.0`. */
|
|
22
|
+
coord: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function parsePaneRows(listOutput: string): PaneRow[];
|
|
25
|
+
/**
|
|
26
|
+
* Pane target for a session, or null when that exact session has no pane.
|
|
27
|
+
*
|
|
28
|
+
* Matching is exact string equality on the session name — the whole point is to
|
|
29
|
+
* not hand tmux a name it might prefix-match, and to not hand it a `=` form it
|
|
30
|
+
* cannot resolve for non-ASCII names.
|
|
31
|
+
*/
|
|
32
|
+
export declare function paneTargetFor(listOutput: string, sessionName: string): string | null;
|
|
33
|
+
/** The format string the two functions above expect. */
|
|
34
|
+
export declare const PANE_LIST_FORMAT = "#{session_name}\t#{window_index}.#{pane_index}";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** A prompt the watcher knows how to answer, or null. */
|
|
2
|
+
export type PanePrompt = "dev-channels" | "folder-trust";
|
|
3
|
+
/**
|
|
4
|
+
* Which known prompt (if any) the pane is currently blocking on.
|
|
5
|
+
*
|
|
6
|
+
* Dev-channels is checked FIRST, even though it appears second in time. The two
|
|
7
|
+
* prompts are sequential — trust, then channels — so a capture showing both
|
|
8
|
+
* means the trust prompt is already answered and only its text is still sitting
|
|
9
|
+
* in the pane. Classifying that as "folder-trust" would make a watcher that has
|
|
10
|
+
* already answered trust ignore the prompt it was waiting for, and the node
|
|
11
|
+
* would hang exactly as if the fix had never been made. Preferring the later
|
|
12
|
+
* prompt keeps a stale line of scrollback from outranking the live prompt.
|
|
13
|
+
*/
|
|
14
|
+
export declare function classifyPanePrompt(pane: string): PanePrompt | null;
|
|
15
|
+
/**
|
|
16
|
+
* Best-effort one-line explanation of why a detached start died, taken from the
|
|
17
|
+
* dead pane's own output.
|
|
18
|
+
*
|
|
19
|
+
* Returns null when the pane holds nothing that looks like a refusal — the
|
|
20
|
+
* caller must then fall back to a generic message rather than inventing one.
|
|
21
|
+
*/
|
|
22
|
+
export declare function extractStartFailureReason(pane: string): string | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface PathModeFacts {
|
|
2
|
+
/** Owner uid of the path. */
|
|
3
|
+
uid: number;
|
|
4
|
+
/** Permission bits (st_mode & 0o777). */
|
|
5
|
+
mode: number;
|
|
6
|
+
/** uid of the process doing the check. */
|
|
7
|
+
processUid: number;
|
|
8
|
+
}
|
|
9
|
+
export type UnsafePathReason = "owner" | "group-writable" | "world-writable" | null;
|
|
10
|
+
/** Which condition makes this path unsafe to execute from, if any. */
|
|
11
|
+
export declare function classifyUnsafePath(facts: PathModeFacts): UnsafePathReason;
|
|
12
|
+
/**
|
|
13
|
+
* Operator-facing explanation. Names the path, the offending bits, and the
|
|
14
|
+
* command that fixes it — a message that says only "unsafe" leaves the reader
|
|
15
|
+
* guessing between four different conditions.
|
|
16
|
+
*/
|
|
17
|
+
export declare function describeUnsafePath(path: string, facts: PathModeFacts): string;
|
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.40",
|
|
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",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"bin": {
|
|
15
|
-
"anet": "dist/bin/
|
|
15
|
+
"anet": "dist/bin/anet.cjs"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"typecheck": "tsc --noEmit",
|
|
22
22
|
"test:feishu-bridge": "bun tests/feishu-bridge-ackplaceholder.test.ts",
|
|
23
|
-
"build": "bun build src/client.ts --outdir dist/src --target node --minify && bun build bin/cli.ts --outdir dist/bin --target node --minify --external @sleep2agi/commhub-server --external bun:sqlite --external '../../server/*' && bun build src/node-server.ts --outdir dist/src --target node --minify && bun build src/im/feishu/worker.ts --outdir dist/src/im/feishu --target node --minify --external @larksuiteoapi/node-sdk && tsc --emitDeclarationOnly --declaration --outDir dist && npx javascript-obfuscator dist/bin/cli.js --output dist/bin/cli.js --compact true --string-array true --string-array-encoding base64 && npx javascript-obfuscator dist/src/client.js --output dist/src/client.js --compact true --string-array true && npx javascript-obfuscator dist/src/node-server.js --output dist/src/node-server.js --compact true --string-array true",
|
|
23
|
+
"build": "bun build src/client.ts --outdir dist/src --target node --minify && bun build bin/cli.ts --outdir dist/bin --target node --minify --external @sleep2agi/commhub-server --external bun:sqlite --external '../../server/*' && bun build src/node-server.ts --outdir dist/src --target node --minify && bun build src/im/feishu/worker.ts --outdir dist/src/im/feishu --target node --minify --external @larksuiteoapi/node-sdk && tsc --emitDeclarationOnly --declaration --outDir dist && npx javascript-obfuscator dist/bin/cli.js --output dist/bin/cli.js --compact true --string-array true --string-array-encoding base64 && npx javascript-obfuscator dist/src/client.js --output dist/src/client.js --compact true --string-array true && npx javascript-obfuscator dist/src/node-server.js --output dist/src/node-server.js --compact true --string-array true && cp bin/anet.cjs dist/bin/anet.cjs",
|
|
24
24
|
"prepublishOnly": "npm run build"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|