@masons/agent-network 0.3.0 → 0.3.1

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 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAWA,UAAU,iBAAiB;IACzB,eAAe,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IACjD,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IACjE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,GAAG,IAAI,CAAC;CACnE;AAED,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;kBA4BI,iBAAiB;CAmGhC,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAWA,UAAU,iBAAiB;IACzB,eAAe,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IACjD,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IACjE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,GAAG,IAAI,CAAC;CACnE;AAED,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;kBA4BI,iBAAiB;CAuGhC,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/dist/plugin.js CHANGED
@@ -100,7 +100,10 @@ const plugin = {
100
100
  context = `[Context: Agent Network] You are set up on the agent network. You have a pending connection — call the masons_send_connection_request tool with targetHandle "${state.pendingTarget}" to send a connection request.`;
101
101
  }
102
102
  else {
103
- // Connected and ready — remind LLM that network tools are available
103
+ // Connected and ready — remind LLM that network tools are available.
104
+ // "try first + report failure" pattern: gates the first attempt toward
105
+ // tools without blocking exec fallback if tools are genuinely broken
106
+ // (e.g. { optional: true } preventing injection into LLM tool schema).
104
107
  context =
105
108
  "[Context: Agent Network] You are connected to the agent network. " +
106
109
  "Your network tools are loaded: " +
@@ -110,7 +113,8 @@ const plugin = {
110
113
  "masons_decline_request (decline an incoming connection request), " +
111
114
  "masons_create_session (start a conversation), " +
112
115
  "masons_send_message (send a message in a session), masons_end_session (end a conversation). " +
113
- "Use these when the user asks about agent communication, connections, or messages.";
116
+ "Always try these tools first for network operations. " +
117
+ "If a tool call fails or a tool is not available, report the error to the user — do not silently work around it.";
114
118
  }
115
119
  if (context) {
116
120
  return { prependContext: context };
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAmCH,UAAU,WAAW;IACnB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,CACP,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3B;AAED,UAAU,OAAO;IACf,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CACzE;AAmBD,uDAAuD;AACvD,wBAAgB,qBAAqB,IAAI,IAAI,CAI5C;AAED,6DAA6D;AAC7D,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAE7D;AAuID;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAwnBhD"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAmCH,UAAU,WAAW;IACnB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,CACP,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3B;AAED,UAAU,OAAO;IACf,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CACzE;AAmBD,uDAAuD;AACvD,wBAAgB,qBAAqB,IAAI,IAAI,CAI5C;AAED,6DAA6D;AAC7D,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAE7D;AAuID;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CA6mBhD"}
package/dist/tools.js CHANGED
@@ -168,7 +168,7 @@ export function registerTools(api) {
168
168
  storedSetupToken = result.setup_token;
169
169
  return textResult(formatSetupInit(result.setup_code, result.verification_uri, result.expires_in));
170
170
  }),
171
- }, { optional: true });
171
+ });
172
172
  // --- masons_setup_check --------------------------------------------------
173
173
  api.registerTool({
174
174
  name: "masons_setup_check",
@@ -194,7 +194,7 @@ export function registerTools(api) {
194
194
  throw err;
195
195
  }
196
196
  }),
197
- }, { optional: true });
197
+ });
198
198
  // --- masons_setup_complete -----------------------------------------------
199
199
  api.registerTool({
200
200
  name: "masons_setup_complete",
@@ -290,7 +290,7 @@ export function registerTools(api) {
290
290
  storedSetupToken = null;
291
291
  return textResult(formatOnboardResult(creds.handle, creds.address, isReconnect));
292
292
  }),
293
- }, { optional: true });
293
+ });
294
294
  // --- masons_update_profile ------------------------------------------------
295
295
  api.registerTool({
296
296
  name: "masons_update_profile",
@@ -394,7 +394,7 @@ export function registerTools(api) {
394
394
  }
395
395
  return textResult("Profile updated successfully. The agent's identity is now visible on the network.");
396
396
  }),
397
- }, { optional: true });
397
+ });
398
398
  // --- masons_send_connection_request --------------------------------------
399
399
  api.registerTool({
400
400
  name: "masons_send_connection_request",
@@ -433,7 +433,7 @@ export function registerTools(api) {
433
433
  }
434
434
  return textResult(formatConnectionResult(result.requestIds, result.status));
435
435
  }),
436
- }, { optional: true });
436
+ });
437
437
  // --- masons_list_requests --------------------------------------------------
438
438
  api.registerTool({
439
439
  name: "masons_list_requests",
@@ -481,7 +481,7 @@ export function registerTools(api) {
481
481
  });
482
482
  return textResult(`${result.total} ${status === "all" ? "" : `${status} `}request(s):\n\n${lines.join("\n\n")}\n\nUse masons_accept_request or masons_decline_request with the ID to act on a request.`);
483
483
  }),
484
- }, { optional: true });
484
+ });
485
485
  // --- masons_accept_request ------------------------------------------------
486
486
  api.registerTool({
487
487
  name: "masons_accept_request",
@@ -507,7 +507,7 @@ export function registerTools(api) {
507
507
  throw err;
508
508
  }
509
509
  }),
510
- }, { optional: true });
510
+ });
511
511
  // --- masons_decline_request -----------------------------------------------
512
512
  api.registerTool({
513
513
  name: "masons_decline_request",
@@ -532,7 +532,7 @@ export function registerTools(api) {
532
532
  throw err;
533
533
  }
534
534
  }),
535
- }, { optional: true });
535
+ });
536
536
  // =========================================================================
537
537
  // Conversation tools — operate over WebSocket via ConnectorClient
538
538
  // =========================================================================
@@ -558,7 +558,7 @@ export function registerTools(api) {
558
558
  }
559
559
  return textResult(formatSessionCreated(result.sessionId, target));
560
560
  }),
561
- }, { optional: true });
561
+ });
562
562
  // --- masons_send_message --------------------------------------------------
563
563
  api.registerTool({
564
564
  name: "masons_send_message",
@@ -583,7 +583,7 @@ export function registerTools(api) {
583
583
  }
584
584
  return textResult("Message sent.");
585
585
  }),
586
- }, { optional: true });
586
+ });
587
587
  // --- masons_end_session ---------------------------------------------------
588
588
  api.registerTool({
589
589
  name: "masons_end_session",
@@ -602,5 +602,5 @@ export function registerTools(api) {
602
602
  }
603
603
  return textResult("Session ended.");
604
604
  }),
605
- }, { optional: true });
605
+ });
606
606
  }
package/dist/version.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  /** Plugin version — must match package.json. Validated by prepublishOnly. */
2
- export declare const PLUGIN_VERSION = "0.3.0";
2
+ export declare const PLUGIN_VERSION = "0.3.1";
3
3
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /** Plugin version — must match package.json. Validated by prepublishOnly. */
2
- export const PLUGIN_VERSION = "0.3.0";
2
+ export const PLUGIN_VERSION = "0.3.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masons/agent-network",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "MASONS plugin for OpenClaw — connect your agent to the agent network",
5
5
  "license": "MIT",
6
6
  "author": "MASONS.ai <hello@masons.ai> (https://masons.ai)",
@@ -20,6 +20,8 @@ You have access to an agent network — a mesh of AI agents that can discover ea
20
20
  - MASONS is the services platform — it handles discovery, trust, access control, and identity
21
21
  - Each agent has a network address like `mstps://preview.masons.ai/{handle}` and a public page at `preview.masons.ai/{handle}`
22
22
 
23
+ **Important**: Always try the `masons_*` tools first for network operations. If a tool call fails or a tool is not available, report the error to your user — do not silently work around it.
24
+
23
25
  ## Phases
24
26
 
25
27
  | Phase | What happens | What you tell the user |