@sleep2agi/agent-network 2.3.0-preview.6 → 2.3.0-preview.60
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/README.md +35 -324
- package/dist/bin/anet.cjs +101 -0
- package/dist/bin/cli.d.ts +1 -0
- package/dist/bin/cli.js +20 -1
- package/dist/bin/goal-wake-log-render.d.ts +31 -0
- package/dist/src/batch-workdir.d.ts +9 -0
- package/dist/src/bootstrap-password-db.d.ts +13 -0
- package/dist/src/channel-attachments.d.ts +29 -0
- package/dist/src/channel-meta.d.ts +10 -0
- package/dist/src/channel-task-trace.d.ts +10 -0
- package/dist/src/claude-vendor-env.d.ts +28 -0
- package/dist/src/cli-args.d.ts +8 -0
- package/dist/src/client-task-trace.d.ts +9 -0
- package/dist/src/client.js +1 -1
- package/dist/src/codex-copresence-preflight.d.ts +65 -0
- package/dist/src/codex-copresence-profile.d.ts +68 -0
- package/dist/src/codex-copresence-recovery.d.ts +43 -0
- package/dist/src/codex-copresence-thread.d.ts +13 -0
- package/dist/src/codex-model-default.d.ts +6 -0
- package/dist/src/codex-tui-client-health.d.ts +17 -0
- package/dist/src/commhub-response.d.ts +1 -0
- package/dist/src/controlled-upload.d.ts +83 -0
- package/dist/src/copresence-deps.d.ts +22 -0
- package/dist/src/copresence-identity.d.ts +339 -0
- package/dist/src/dashboard-managed-process.d.ts +35 -0
- package/dist/src/environ-alias.d.ts +14 -0
- package/dist/src/grok-attach-client.d.ts +129 -0
- package/dist/src/grok-copresence-disclosure.d.ts +11 -0
- package/dist/src/grok-copresence-orchestration.d.ts +70 -0
- package/dist/src/grok-copresence-profile.d.ts +65 -0
- package/dist/src/im/correlation-store.d.ts +34 -0
- package/dist/src/im/feishu/adapter.d.ts +149 -1
- package/dist/src/im/feishu/bridge.d.ts +85 -14
- package/dist/src/im/feishu/config.d.ts +31 -0
- package/dist/src/im/feishu/hub-upload.d.ts +88 -0
- package/dist/src/im/feishu/markdown-image-renderer.d.ts +61 -0
- package/dist/src/im/feishu/outbound-marker.d.ts +140 -0
- package/dist/src/im/feishu/outbound-paths.d.ts +50 -0
- package/dist/src/im/feishu/outbound-route.d.ts +62 -0
- package/dist/src/im/feishu/worker-lifecycle.d.ts +13 -0
- package/dist/src/im/feishu/worker.js +403 -28
- package/dist/src/im/types.d.ts +38 -1
- package/dist/src/locale-diagnostic.d.ts +12 -0
- package/dist/src/mock-llm.d.ts +12 -0
- package/dist/src/node-activity-log.d.ts +4 -0
- package/dist/src/node-server-payload.d.ts +66 -0
- package/dist/src/node-server.js +7 -1
- package/dist/src/normalize-runtime.d.ts +29 -2
- package/dist/src/opencode-agent-node-pair.d.ts +25 -0
- package/dist/src/opencode-auth-login.d.ts +43 -0
- package/dist/src/opencode-launch-env.d.ts +13 -0
- package/dist/src/opencode-owner-mode.d.ts +6 -0
- package/dist/src/opencode-package-binary.d.ts +21 -0
- package/dist/src/opencode-pin.d.ts +44 -0
- package/dist/src/opencode-preset.d.ts +73 -0
- package/dist/src/opencode-runtime-binding.d.ts +30 -0
- package/dist/src/opencode-safe-root.d.ts +27 -0
- package/dist/src/opencode-smoke-env.d.ts +1 -0
- package/dist/src/outbound-tool-names.d.ts +1 -0
- package/dist/src/owner-env-file.d.ts +2 -0
- package/dist/src/package-mode-preflight.d.ts +31 -0
- package/dist/src/posix-codex-copresence.d.ts +8 -0
- package/dist/src/primary-network.d.ts +23 -0
- package/dist/src/private-state.d.ts +10 -0
- package/dist/src/project-key.d.ts +1 -0
- package/dist/src/reply-originator.d.ts +20 -0
- package/dist/src/resume-runtime-infer.d.ts +18 -0
- package/dist/src/secret-shell-guidance.d.ts +3 -0
- package/dist/src/task-trace.d.ts +33 -0
- package/dist/src/tmux-attach.d.ts +8 -0
- package/dist/src/tmux-capability.d.ts +58 -0
- package/dist/src/tmux-exact-target.d.ts +34 -0
- package/dist/src/tmux-pane-prompt.d.ts +22 -0
- package/dist/src/token-cli.d.ts +13 -0
- package/dist/src/unsafe-package-path-reason.d.ts +17 -0
- package/dist/src/windows-codex-copresence.d.ts +41 -0
- package/package.json +10 -6
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type TokenCreateNameResult = {
|
|
2
|
+
ok: true;
|
|
3
|
+
name: string;
|
|
4
|
+
} | {
|
|
5
|
+
ok: false;
|
|
6
|
+
error: string;
|
|
7
|
+
};
|
|
8
|
+
/** Parse only `anet token create` operands.
|
|
9
|
+
*
|
|
10
|
+
* The legacy positional form stays supported, while flag parsing is strict so
|
|
11
|
+
* a typo cannot become the name of a newly issued credential.
|
|
12
|
+
*/
|
|
13
|
+
export declare function parseTokenCreateName(argv: readonly string[]): TokenCreateNameResult;
|
|
@@ -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;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type WindowsCopresenceRole = "appsrv" | "bridge";
|
|
2
|
+
export interface WindowsManagedProcess {
|
|
3
|
+
role: WindowsCopresenceRole;
|
|
4
|
+
pid: number;
|
|
5
|
+
creationDate: string;
|
|
6
|
+
logPath: string;
|
|
7
|
+
}
|
|
8
|
+
export interface WindowsCopresenceRecord {
|
|
9
|
+
version: 1 | 2;
|
|
10
|
+
nodeId: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
marker?: string;
|
|
13
|
+
processes: WindowsManagedProcess[];
|
|
14
|
+
}
|
|
15
|
+
export declare function windowsCopresenceRecordPath(nodesDir: string, nodeId: string): string;
|
|
16
|
+
export declare function windowsCopresenceLogPath(nodesDir: string, nodeId: string, role: WindowsCopresenceRole): string;
|
|
17
|
+
export declare function openPrivateAppendLog(path: string): number;
|
|
18
|
+
/** Protect credential-bearing state with native Windows ACLs. */
|
|
19
|
+
export declare function ensureWindowsPrivateDirectory(path: string): void;
|
|
20
|
+
export declare function closeLog(fd: number): void;
|
|
21
|
+
export type CreationDateProbe = (pid: number) => string | null;
|
|
22
|
+
/** Uses CIM instead of locale-dependent tasklist output. */
|
|
23
|
+
export declare function probeWindowsCreationDate(pid: number): string | null;
|
|
24
|
+
/**
|
|
25
|
+
* Attribute an ESTABLISHED loopback connection to the launched TUI process
|
|
26
|
+
* tree. This is deliberately stronger than counting listeners/connections:
|
|
27
|
+
* an unrelated local client cannot satisfy it.
|
|
28
|
+
*/
|
|
29
|
+
export declare function probeWindowsOwnedLoopbackConnection(rootPid: number, expectedCreationDate: string, port: number, runPowerShell?: (script: string) => string): boolean;
|
|
30
|
+
export declare function writeWindowsCopresenceRecord(nodesDir: string, nodeId: string, processes: WindowsManagedProcess[], marker?: string): void;
|
|
31
|
+
export declare function readWindowsCopresenceRecord(nodesDir: string, nodeId: string): WindowsCopresenceRecord | null;
|
|
32
|
+
export interface WindowsStopDecision {
|
|
33
|
+
safe: WindowsManagedProcess[];
|
|
34
|
+
refused: Array<{
|
|
35
|
+
process: WindowsManagedProcess;
|
|
36
|
+
reason: "missing" | "pid-reused";
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
/** PID alone is never authority: Windows reuses PIDs, so CreationDate must match. */
|
|
40
|
+
export declare function decideWindowsManagedStop(record: WindowsCopresenceRecord, probe: CreationDateProbe): WindowsStopDecision;
|
|
41
|
+
export declare function taskkillWindowsProcessTree(pid: number): void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sleep2agi/agent-network",
|
|
3
|
-
"version": "2.3.0-preview.
|
|
4
|
-
"description": "AI Agent Network CLI
|
|
3
|
+
"version": "2.3.0-preview.60",
|
|
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",
|
|
7
7
|
"types": "dist/client.d.ts",
|
|
@@ -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
|
|
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": [
|
|
@@ -54,7 +54,8 @@
|
|
|
54
54
|
"directory": "agent-network"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
|
-
"access": "public"
|
|
57
|
+
"access": "public",
|
|
58
|
+
"tag": "preview"
|
|
58
59
|
},
|
|
59
60
|
"bugs": {
|
|
60
61
|
"url": "https://github.com/sleep2agi/agent-network/issues"
|
|
@@ -65,10 +66,13 @@
|
|
|
65
66
|
},
|
|
66
67
|
"dependencies": {
|
|
67
68
|
"@inquirer/prompts": "^8.4.3",
|
|
68
|
-
"@larksuiteoapi/node-sdk": "^1.42.0"
|
|
69
|
+
"@larksuiteoapi/node-sdk": "^1.42.0",
|
|
70
|
+
"markdown-it": "^14.1.0",
|
|
71
|
+
"puppeteer-core": "^24.10.2"
|
|
69
72
|
},
|
|
70
73
|
"devDependencies": {
|
|
71
74
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
75
|
+
"@types/markdown-it": "^14.1.2",
|
|
72
76
|
"@types/node": "^25.0.0",
|
|
73
77
|
"javascript-obfuscator": "^5.4.1",
|
|
74
78
|
"node-pty": "^1.1.0",
|