@sleep2agi/agent-network 2.3.0-preview.5 → 2.3.0-preview.51

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.
Files changed (75) hide show
  1. package/README.md +35 -324
  2. package/dist/bin/anet.cjs +101 -0
  3. package/dist/bin/cli.d.ts +1 -0
  4. package/dist/bin/cli.js +20 -1
  5. package/dist/bin/goal-wake-log-render.d.ts +31 -0
  6. package/dist/src/batch-workdir.d.ts +9 -0
  7. package/dist/src/bootstrap-password-db.d.ts +13 -0
  8. package/dist/src/channel-attachments.d.ts +29 -0
  9. package/dist/src/channel-meta.d.ts +10 -0
  10. package/dist/src/channel-task-trace.d.ts +10 -0
  11. package/dist/src/claude-vendor-env.d.ts +28 -0
  12. package/dist/src/cli-args.d.ts +8 -0
  13. package/dist/src/client-task-trace.d.ts +9 -0
  14. package/dist/src/client.js +1 -1
  15. package/dist/src/codex-copresence-preflight.d.ts +65 -0
  16. package/dist/src/codex-copresence-profile.d.ts +68 -0
  17. package/dist/src/codex-copresence-recovery.d.ts +43 -0
  18. package/dist/src/codex-copresence-thread.d.ts +13 -0
  19. package/dist/src/codex-model-default.d.ts +6 -0
  20. package/dist/src/codex-tui-client-health.d.ts +17 -0
  21. package/dist/src/commhub-response.d.ts +1 -0
  22. package/dist/src/controlled-upload.d.ts +83 -0
  23. package/dist/src/copresence-deps.d.ts +22 -0
  24. package/dist/src/copresence-identity.d.ts +339 -0
  25. package/dist/src/dashboard-managed-process.d.ts +35 -0
  26. package/dist/src/environ-alias.d.ts +14 -0
  27. package/dist/src/grok-attach-client.d.ts +129 -0
  28. package/dist/src/grok-copresence-disclosure.d.ts +11 -0
  29. package/dist/src/grok-copresence-orchestration.d.ts +70 -0
  30. package/dist/src/grok-copresence-profile.d.ts +65 -0
  31. package/dist/src/im/correlation-store.d.ts +34 -0
  32. package/dist/src/im/feishu/adapter.d.ts +149 -1
  33. package/dist/src/im/feishu/bridge.d.ts +85 -14
  34. package/dist/src/im/feishu/config.d.ts +31 -0
  35. package/dist/src/im/feishu/hub-upload.d.ts +88 -0
  36. package/dist/src/im/feishu/markdown-image-renderer.d.ts +61 -0
  37. package/dist/src/im/feishu/outbound-marker.d.ts +140 -0
  38. package/dist/src/im/feishu/outbound-paths.d.ts +50 -0
  39. package/dist/src/im/feishu/outbound-route.d.ts +62 -0
  40. package/dist/src/im/feishu/worker-lifecycle.d.ts +13 -0
  41. package/dist/src/im/feishu/worker.js +403 -27
  42. package/dist/src/im/types.d.ts +38 -1
  43. package/dist/src/locale-diagnostic.d.ts +12 -0
  44. package/dist/src/mock-llm.d.ts +12 -0
  45. package/dist/src/node-server-payload.d.ts +66 -0
  46. package/dist/src/node-server.js +7 -1
  47. package/dist/src/normalize-runtime.d.ts +14 -2
  48. package/dist/src/opencode-agent-node-pair.d.ts +25 -0
  49. package/dist/src/opencode-auth-login.d.ts +43 -0
  50. package/dist/src/opencode-launch-env.d.ts +13 -0
  51. package/dist/src/opencode-owner-mode.d.ts +6 -0
  52. package/dist/src/opencode-package-binary.d.ts +21 -0
  53. package/dist/src/opencode-pin.d.ts +44 -0
  54. package/dist/src/opencode-preset.d.ts +73 -0
  55. package/dist/src/opencode-runtime-binding.d.ts +30 -0
  56. package/dist/src/opencode-safe-root.d.ts +27 -0
  57. package/dist/src/opencode-smoke-env.d.ts +1 -0
  58. package/dist/src/outbound-tool-names.d.ts +1 -0
  59. package/dist/src/owner-env-file.d.ts +2 -0
  60. package/dist/src/package-mode-preflight.d.ts +31 -0
  61. package/dist/src/posix-codex-copresence.d.ts +8 -0
  62. package/dist/src/primary-network.d.ts +23 -0
  63. package/dist/src/private-state.d.ts +10 -0
  64. package/dist/src/project-key.d.ts +1 -0
  65. package/dist/src/reply-originator.d.ts +20 -0
  66. package/dist/src/secret-shell-guidance.d.ts +3 -0
  67. package/dist/src/task-trace.d.ts +33 -0
  68. package/dist/src/tmux-attach.d.ts +8 -0
  69. package/dist/src/tmux-capability.d.ts +58 -0
  70. package/dist/src/tmux-exact-target.d.ts +34 -0
  71. package/dist/src/tmux-pane-prompt.d.ts +22 -0
  72. package/dist/src/token-cli.d.ts +13 -0
  73. package/dist/src/unsafe-package-path-reason.d.ts +17 -0
  74. package/dist/src/windows-codex-copresence.d.ts +41 -0
  75. package/package.json +10 -6
@@ -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.5",
4
- "description": "AI Agent Network CLI \u2014 Local-first multi-agent orchestration across 4 runtimes (Claude Code CLI / Claude Agent SDK / Codex SDK / Grok Build ACP) and 8+ LLM providers (Anthropic / OpenAI / xAI Grok / MiniMax / DeepSeek / GLM / Kimi / InternLM / Xiaomi MiMo / OpenRouter). Apache 2.0.",
3
+ "version": "2.3.0-preview.51",
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/cli.js"
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 --external @modelcontextprotocol/sdk && 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": [
@@ -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",