@sleep2agi/agent-network 2.3.0-preview.110 → 2.3.0-preview.111

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.
@@ -1,9 +1,9 @@
1
- export declare const PAIRED_AGENT_NETWORK_VERSION = "2.3.0-preview.110";
2
- export declare const PAIRED_AGENT_NODE_VERSION = "2.5.0-preview.83";
3
- export declare const PAIRED_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.83";
4
- export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.110";
5
- export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.83";
6
- export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.83";
1
+ export declare const PAIRED_AGENT_NETWORK_VERSION = "2.3.0-preview.111";
2
+ export declare const PAIRED_AGENT_NODE_VERSION = "2.5.0-preview.84";
3
+ export declare const PAIRED_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.84";
4
+ export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.111";
5
+ export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.84";
6
+ export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.84";
7
7
  export type PairedAgentNodeResolution = {
8
8
  spec: string;
9
9
  args: string[];
@@ -0,0 +1,40 @@
1
+ export declare const RULES_FILE_MAX_BYTES: number;
2
+ export type RulesFileName = "CLAUDE.md" | "AGENTS.md";
3
+ /** claude 节点读 CLAUDE.md,其余运行时(codex / grok / opencode / codex-app-server)读 AGENTS.md。 */
4
+ export declare function rulesFileNameForRuntime(runtime: string | null | undefined): RulesFileName;
5
+ /**
6
+ * 唯一的路径来源。输入里没有任何调用方可控的路径成分;结果再用 dirname
7
+ * 反查一遍,防止将来有人给 workDir 传进带 `..` 的东西。
8
+ */
9
+ export declare function resolveRulesFilePath(workDir: string, runtime: string | null | undefined): string;
10
+ export interface RulesFileReadResult {
11
+ file_name: RulesFileName;
12
+ exists: boolean;
13
+ content: string;
14
+ }
15
+ export declare function readRulesFile(workDir: string, runtime: string | null | undefined): Promise<RulesFileReadResult>;
16
+ export interface RulesFileWriteResult {
17
+ file_name: RulesFileName;
18
+ bytes: number;
19
+ }
20
+ /** 临时文件 + rename,写一半掉电不会留下半个规则文件。 */
21
+ export declare function writeRulesFile(workDir: string, runtime: string | null | undefined, content: unknown): Promise<RulesFileWriteResult>;
22
+ export interface RulesFileRequest {
23
+ request_id: string;
24
+ op: "read" | "write";
25
+ content?: string;
26
+ }
27
+ export interface ProcessRulesFileDeps {
28
+ callCommHub: (method: string, params: Record<string, unknown>) => Promise<any>;
29
+ runtime: string | null | undefined;
30
+ workDir: string;
31
+ log: (msg: string) => void;
32
+ warn: (msg: string) => void;
33
+ }
34
+ /** 一次门铃最多处理这么多条,防止 hub 侧异常堆积把节点拖进死循环。 */
35
+ export declare const RULES_FILE_MAX_PER_DOORBELL = 8;
36
+ /**
37
+ * 门铃处理器:拉 pending 请求直到空,每条 ack done / failed。
38
+ * 返回处理条数(测试用)。
39
+ */
40
+ export declare function processRulesFileRequests(deps: ProcessRulesFileDeps): Promise<number>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-network",
3
- "version": "2.3.0-preview.110",
3
+ "version": "2.3.0-preview.111",
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",