@easynet-run/node 0.27.14 → 0.36.9

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 (35) hide show
  1. package/README.md +12 -0
  2. package/native/dendrite-bridge-manifest.json +5 -4
  3. package/native/dendrite-bridge.json +1 -1
  4. package/native/include/axon_dendrite_bridge.h +18 -4
  5. package/native/libaxon_dendrite_bridge.so +0 -0
  6. package/package.json +7 -5
  7. package/runtime/easynet-runtime-rs-0.36.9-x86_64-unknown-linux-gnu.tar.gz +0 -0
  8. package/runtime/runtime-bridge-manifest.json +4 -4
  9. package/runtime/runtime-bridge.json +3 -3
  10. package/src/ability_lifecycle.d.ts +1 -0
  11. package/src/ability_lifecycle.js +12 -6
  12. package/src/capability_request.js +3 -1
  13. package/src/dendrite_bridge/bridge.d.ts +9 -2
  14. package/src/dendrite_bridge/bridge.js +54 -5
  15. package/src/dendrite_bridge/ffi.d.ts +3 -0
  16. package/src/dendrite_bridge/ffi.js +2 -0
  17. package/src/dendrite_bridge/types.d.ts +4 -0
  18. package/src/errors.js +9 -3
  19. package/src/index.d.ts +2 -2
  20. package/src/mcp/server.d.ts +24 -2
  21. package/src/mcp/server.js +218 -18
  22. package/src/mcp/server.test.js +62 -0
  23. package/src/presets/remote_control/config.d.ts +3 -0
  24. package/src/presets/remote_control/config.js +17 -3
  25. package/src/presets/remote_control/descriptor.js +28 -11
  26. package/src/presets/remote_control/handlers.d.ts +2 -0
  27. package/src/presets/remote_control/handlers.js +22 -17
  28. package/src/presets/remote_control/kit.d.ts +4 -2
  29. package/src/presets/remote_control/kit.js +70 -1
  30. package/src/presets/remote_control/kit.test.js +449 -0
  31. package/src/presets/remote_control/orchestrator.d.ts +5 -0
  32. package/src/presets/remote_control/orchestrator.js +9 -1
  33. package/src/presets/remote_control/specs.js +80 -61
  34. package/src/receipt.js +6 -3
  35. package/runtime/easynet-runtime-rs-0.27.14-x86_64-unknown-linux-gnu.tar.gz +0 -0
@@ -5,61 +5,77 @@ export function remoteControlToolSpecs() {
5
5
  // -----------------------------------------------------------------
6
6
  {
7
7
  name: "discover_nodes",
8
- description: "Discover online nodes registered with Axon Runtime.",
8
+ description: "Discover online nodes registered with Axon Runtime. Use this first to find available devices before calling other tools. Returns a list of nodes with their online status.",
9
9
  inputSchema: {
10
10
  type: "object",
11
- properties: { tenant_id: { type: "string", description: "Tenant ID (default AXON_TENANT)" } },
11
+ properties: { tenant_id: { type: "string", description: "Tenant ID (default AXON_TENANT)." } },
12
12
  },
13
13
  },
14
14
  {
15
15
  name: "list_remote_tools",
16
- description: "List MCP tools visible for a tenant.",
16
+ description: "List MCP tools visible for a tenant. Use after discover_nodes to see what tools are available on a specific node or across all nodes.",
17
17
  inputSchema: {
18
18
  type: "object",
19
19
  properties: {
20
- tenant_id: { type: "string" },
21
- node_id: { type: "string" },
22
- name_pattern: { type: "string" },
20
+ tenant_id: { type: "string", description: "Tenant ID (default AXON_TENANT)." },
21
+ node_id: { type: "string", description: "Filter tools by a specific node." },
22
+ name_pattern: { type: "string", description: "Glob pattern to filter tool names (e.g. 'session_*')." },
23
23
  },
24
24
  },
25
25
  },
26
26
  {
27
27
  name: "call_remote_tool",
28
- description: "Call an MCP tool on a selected node.",
28
+ description: "Call an MCP tool on a selected node and return the full result. Use for quick operations that return a single response. For long-running or streaming tools, prefer call_remote_tool_stream.",
29
29
  inputSchema: {
30
30
  type: "object",
31
31
  properties: {
32
- tenant_id: { type: "string" },
33
- tool_name: { type: "string" },
34
- node_id: { type: "string" },
35
- arguments: { type: "object" },
32
+ tenant_id: { type: "string", description: "Tenant ID (default AXON_TENANT)." },
33
+ tool_name: { type: "string", description: "Name of the MCP tool to invoke." },
34
+ node_id: { type: "string", description: "Target node ID (from discover_nodes)." },
35
+ arguments: { type: "object", description: "Tool-specific arguments passed to the remote tool." },
36
+ },
37
+ required: ["tool_name", "node_id"],
38
+ },
39
+ },
40
+ {
41
+ name: "call_remote_tool_stream",
42
+ description: "Call an MCP tool on a selected node and stream incremental response chunks. Prefer this for long-running or incremental-output tools instead of call_remote_tool. Falls back to buffered response when streaming is unavailable.",
43
+ inputSchema: {
44
+ type: "object",
45
+ properties: {
46
+ tenant_id: { type: "string", description: "Tenant ID (default AXON_TENANT)." },
47
+ tool_name: { type: "string", description: "Name of the MCP tool to invoke." },
48
+ node_id: { type: "string", description: "Target node ID (from discover_nodes)." },
49
+ arguments: { type: "object", description: "Tool-specific arguments passed to the remote tool." },
50
+ timeout_ms: { type: "integer", description: "Per-chunk timeout in milliseconds for streaming reads (default 60000)." },
51
+ max_bytes: { type: "integer", description: "Maximum total bytes accepted from the stream (default 64 MiB). Set higher for large transfers." },
36
52
  },
37
53
  required: ["tool_name", "node_id"],
38
54
  },
39
55
  },
40
56
  {
41
57
  name: "disconnect_device",
42
- description: "Deregister a remote device from the Axon Runtime, closing its connection.",
58
+ description: "Deregister a remote device from the Axon Runtime, closing its connection. Use when a device should be removed from the active node list.",
43
59
  inputSchema: {
44
60
  type: "object",
45
61
  properties: {
46
- tenant_id: { type: "string" },
47
- node_id: { type: "string" },
48
- reason: { type: "string" },
62
+ tenant_id: { type: "string", description: "Tenant ID (default AXON_TENANT)." },
63
+ node_id: { type: "string", description: "Node ID of the device to disconnect." },
64
+ reason: { type: "string", description: "Human-readable reason for disconnection." },
49
65
  },
50
66
  required: ["node_id"],
51
67
  },
52
68
  },
53
69
  {
54
70
  name: "uninstall_ability",
55
- description: "Uninstall a deployed ability from a device by deactivating and removing it.",
71
+ description: "Uninstall a deployed ability from a device by deactivating and removing it. Use to clean up abilities that are no longer needed.",
56
72
  inputSchema: {
57
73
  type: "object",
58
74
  properties: {
59
- tenant_id: { type: "string" },
60
- node_id: { type: "string" },
61
- install_id: { type: "string" },
62
- reason: { type: "string" },
75
+ tenant_id: { type: "string", description: "Tenant ID (default AXON_TENANT)." },
76
+ node_id: { type: "string", description: "Target node ID." },
77
+ install_id: { type: "string", description: "Installation ID returned by deploy_ability or deploy_ability_package." },
78
+ reason: { type: "string", description: "Human-readable reason for uninstallation." },
63
79
  },
64
80
  required: ["node_id", "install_id"],
65
81
  },
@@ -69,15 +85,16 @@ export function remoteControlToolSpecs() {
69
85
  // -----------------------------------------------------------------
70
86
  {
71
87
  name: "deploy_ability",
72
- description: "Deploy a command-backed MCP ability.",
88
+ description: "Deploy a simple command-backed MCP ability to a device. This is the easiest way to make a command available as a remote tool. For advanced deployment options (custom schemas, versioning, signatures), use deploy_ability_package instead.",
73
89
  inputSchema: {
74
90
  type: "object",
75
91
  properties: {
76
- tenant_id: { type: "string" },
77
- node_id: { type: "string" },
78
- tool_name: { type: "string" },
79
- description: { type: "string" },
80
- command_template: { type: "string" },
92
+ tenant_id: { type: "string", description: "Tenant ID (default AXON_TENANT)." },
93
+ node_id: { type: "string", description: "Target node ID to deploy the ability to." },
94
+ tool_name: { type: "string", description: "Name for the new MCP tool (auto-generated if omitted)." },
95
+ description: { type: "string", description: "Human-readable description of what this tool does." },
96
+ command_template: { type: "string", description: "Shell command template to execute on the device." },
97
+ metadata: { type: "object", description: "Additional metadata for the ability." },
81
98
  },
82
99
  required: ["node_id", "command_template"],
83
100
  },
@@ -87,48 +104,50 @@ export function remoteControlToolSpecs() {
87
104
  // -----------------------------------------------------------------
88
105
  {
89
106
  name: "package_ability",
90
- description: "Build a native ability package descriptor.",
107
+ description: "Build a native ability package descriptor without deploying. Use this to prepare a package for later deployment with deploy_ability_package, or to inspect the descriptor before committing.",
91
108
  inputSchema: {
92
109
  type: "object",
93
110
  properties: {
94
- tenant_id: { type: "string" },
95
- ability_name: { type: "string" },
96
- tool_name: { type: "string" },
97
- description: { type: "string" },
98
- command_template: { type: "string" },
99
- input_schema: { type: "object" },
100
- output_schema: { type: "object" },
101
- version: { type: "string" },
102
- tags: { type: "array", items: { type: "string" } },
103
- package_id: { type: "string" },
104
- capability_name: { type: "string" },
105
- signature_base64: { type: "string" },
106
- digest: { type: "string" },
111
+ tenant_id: { type: "string", description: "Tenant ID (default AXON_TENANT)." },
112
+ ability_name: { type: "string", description: "Unique name for the ability." },
113
+ tool_name: { type: "string", description: "MCP tool name exposed after deployment." },
114
+ description: { type: "string", description: "Human-readable description." },
115
+ command_template: { type: "string", description: "Shell command template to execute." },
116
+ input_schema: { type: "object", description: "JSON Schema for tool input validation." },
117
+ output_schema: { type: "object", description: "JSON Schema for tool output." },
118
+ version: { type: "string", description: "Semantic version (default '1.0.0')." },
119
+ tags: { type: "array", items: { type: "string" }, description: "Tags for categorization." },
120
+ metadata: { type: "object", description: "Additional metadata." },
121
+ package_id: { type: "string", description: "Custom package identifier." },
122
+ capability_name: { type: "string", description: "Override capability name in the registry." },
123
+ signature_base64: { type: "string", description: "Base64-encoded deployment signature." },
124
+ digest: { type: "string", description: "Content digest for integrity verification." },
107
125
  },
108
126
  required: ["ability_name", "command_template"],
109
127
  },
110
128
  },
111
129
  {
112
130
  name: "deploy_ability_package",
113
- description: "Deploy a native ability package by publish/install/activate.",
131
+ description: "Deploy a native ability package through the full publish/install/activate pipeline. Use this for advanced deployments with custom schemas, versioning, or pre-built package descriptors. For simple command deployments, prefer deploy_ability.",
114
132
  inputSchema: {
115
133
  type: "object",
116
134
  properties: {
117
- tenant_id: { type: "string" },
118
- node_id: { type: "string" },
119
- package: { type: "object" },
120
- ability_name: { type: "string" },
121
- tool_name: { type: "string" },
122
- description: { type: "string" },
123
- command_template: { type: "string" },
124
- input_schema: { type: "object" },
125
- output_schema: { type: "object" },
126
- version: { type: "string" },
127
- tags: { type: "array", items: { type: "string" } },
128
- package_id: { type: "string" },
129
- capability_name: { type: "string" },
130
- signature_base64: { type: "string" },
131
- cleanup_on_activate_failure: { type: "boolean" },
135
+ tenant_id: { type: "string", description: "Tenant ID (default AXON_TENANT)." },
136
+ node_id: { type: "string", description: "Target node ID to deploy to." },
137
+ package: { type: "object", description: "Pre-built package descriptor (from package_ability). If provided, other descriptor fields are ignored." },
138
+ ability_name: { type: "string", description: "Unique name for the ability." },
139
+ tool_name: { type: "string", description: "MCP tool name exposed after deployment." },
140
+ description: { type: "string", description: "Human-readable description." },
141
+ command_template: { type: "string", description: "Shell command template to execute." },
142
+ input_schema: { type: "object", description: "JSON Schema for tool input validation." },
143
+ output_schema: { type: "object", description: "JSON Schema for tool output." },
144
+ version: { type: "string", description: "Semantic version (default '1.0.0')." },
145
+ tags: { type: "array", items: { type: "string" }, description: "Tags for categorization." },
146
+ metadata: { type: "object", description: "Additional metadata." },
147
+ package_id: { type: "string", description: "Custom package identifier." },
148
+ capability_name: { type: "string", description: "Override capability name in the registry." },
149
+ signature_base64: { type: "string", description: "Base64-encoded deployment signature." },
150
+ cleanup_on_activate_failure: { type: "boolean", description: "Auto-cleanup on activation failure (default true)." },
132
151
  },
133
152
  required: ["node_id"],
134
153
  },
@@ -136,14 +155,14 @@ export function remoteControlToolSpecs() {
136
155
  // AI-AGENT PRESET: one-shot command execution
137
156
  {
138
157
  name: "execute_command",
139
- description: "One-shot command execution via temporary MCP ability.",
158
+ description: "One-shot command execution on a remote device. Deploys a temporary ability, runs the command, returns the output, and cleans up. Use for ad-hoc commands that don't need a persistent tool.",
140
159
  inputSchema: {
141
160
  type: "object",
142
161
  properties: {
143
- tenant_id: { type: "string" },
144
- node_id: { type: "string" },
145
- command: { type: "string" },
146
- cleanup: { type: "boolean" },
162
+ tenant_id: { type: "string", description: "Tenant ID (default AXON_TENANT)." },
163
+ node_id: { type: "string", description: "Target node ID to execute on." },
164
+ command: { type: "string", description: "Shell command to execute on the device." },
165
+ cleanup: { type: "boolean", description: "Remove the temporary ability after execution (default true)." },
147
166
  },
148
167
  required: ["node_id", "command"],
149
168
  },
package/src/receipt.js CHANGED
@@ -1,8 +1,11 @@
1
- // sdk/node/src/receipt.ts Lifecycle phase receipts for observability and evaluation.
1
+ // EasyNet Axon for AgentNet
2
+ // =========================
2
3
  //
3
- // Every phase transition in the Axon ability lifecycle emits a structured
4
- // PhaseReceipt. Mirrors the Rust reference: sdk/rust/src/receipt.rs
4
+ // File: sdk/node/src/receipt.ts
5
+ // Description: Lifecycle phase receipts for observability and evaluation.
5
6
  //
7
+ // Author: Silan.Hu
8
+ // Email: silan.hu@u.nus.edu
6
9
  // Copyright (c) 2026-2027 easynet. All rights reserved.
7
10
  /** In-progress receipt builder. */
8
11
  export class PhaseReceiptBuilder {