@sleep2agi/agent-network 2.3.0-preview.76 → 2.3.0-preview.78

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.76";
2
- export declare const PAIRED_AGENT_NODE_VERSION = "2.5.0-preview.58";
3
- export declare const PAIRED_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.58";
4
- export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.76";
5
- export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.58";
6
- export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.58";
1
+ export declare const PAIRED_AGENT_NETWORK_VERSION = "2.3.0-preview.78";
2
+ export declare const PAIRED_AGENT_NODE_VERSION = "2.5.0-preview.62";
3
+ export declare const PAIRED_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.62";
4
+ export declare const OPENCODE_AGENT_NETWORK_VERSION = "2.3.0-preview.78";
5
+ export declare const OPENCODE_AGENT_NODE_VERSION = "2.5.0-preview.62";
6
+ export declare const OPENCODE_AGENT_NODE_SPEC = "@sleep2agi/agent-node@2.5.0-preview.62";
7
7
  export type PairedAgentNodeResolution = {
8
8
  spec: string;
9
9
  args: string[];
@@ -0,0 +1,57 @@
1
+ /** One attachment as the Hub stores it. `file_id` comes from commhub_upload_file. */
2
+ export interface OutboundAttachment {
3
+ type: "file";
4
+ file_id: string;
5
+ name?: string;
6
+ mime?: string;
7
+ size?: number;
8
+ }
9
+ export type NormalizeResult = {
10
+ ok: true;
11
+ attachments: OutboundAttachment[];
12
+ } | {
13
+ ok: false;
14
+ error: string;
15
+ };
16
+ /**
17
+ * Normalize caller-supplied attachments into what the Hub expects.
18
+ *
19
+ * Absent input is not an error and yields no `attachments` key at all — a call
20
+ * without attachments must produce a byte-identical request to before this
21
+ * existed, or every existing reply changes behaviour the day this ships.
22
+ */
23
+ export declare function normalizeOutboundAttachments(input: unknown): NormalizeResult;
24
+ /**
25
+ * Spread into a Hub request body. Empty → `{}`, so a call with no attachments
26
+ * is unchanged from before this module existed.
27
+ */
28
+ export declare function attachmentsField(attachments: readonly OutboundAttachment[]): Record<string, unknown>;
29
+ /** `send_task` carries them under `meta`, not at the top level. */
30
+ export declare function attachmentsMeta(attachments: readonly OutboundAttachment[], existingMeta?: unknown): Record<string, unknown>;
31
+ /** Shared wording for the two tool schemas, so they cannot drift apart. */
32
+ export declare const ATTACHMENTS_SCHEMA: {
33
+ type: "array";
34
+ description: string;
35
+ items: {
36
+ type: "object";
37
+ properties: {
38
+ file_id: {
39
+ type: string;
40
+ description: string;
41
+ };
42
+ name: {
43
+ type: string;
44
+ description: string;
45
+ };
46
+ mime: {
47
+ type: string;
48
+ description: string;
49
+ };
50
+ size: {
51
+ type: string;
52
+ description: string;
53
+ };
54
+ };
55
+ required: string[];
56
+ };
57
+ };
@@ -0,0 +1,12 @@
1
+ export interface ProcessTelemetry {
2
+ rss_bytes: number;
3
+ rss_mb: number;
4
+ cpu_pct: number | null;
5
+ uptime_seconds: number;
6
+ in_flight_count: number;
7
+ }
8
+ export declare function incrementInFlight(): void;
9
+ export declare function decrementInFlight(): void;
10
+ export declare function getInFlightCount(): number;
11
+ export declare function getProcessTelemetry(): ProcessTelemetry;
12
+ export declare function _resetProcessTelemetry(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-network",
3
- "version": "2.3.0-preview.76",
3
+ "version": "2.3.0-preview.78",
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",