@masons/agent-network 0.4.11 → 0.4.13
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.
- package/dist/config.d.ts +10 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +17 -4
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +5 -3
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +18 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/agent-network/SKILL.md +14 -3
- package/skills/agent-network/references/troubleshooting.md +22 -1
package/dist/config.d.ts
CHANGED
|
@@ -120,6 +120,14 @@ export declare function requireApiKey(): string;
|
|
|
120
120
|
* Get pending connection target handle, or null if none.
|
|
121
121
|
*/
|
|
122
122
|
export declare function getPendingTarget(): string | null;
|
|
123
|
+
/**
|
|
124
|
+
* Whether the agent needs profile completion before connecting.
|
|
125
|
+
*
|
|
126
|
+
* True after onboard (new agent creation), cleared after all required
|
|
127
|
+
* profile fields are filled. Used by connection tools to gate requests
|
|
128
|
+
* until the agent has a visible identity.
|
|
129
|
+
*/
|
|
130
|
+
export declare function isProfileNeeded(): boolean;
|
|
123
131
|
/**
|
|
124
132
|
* Get the live ConnectorClient. Throws if not initialized.
|
|
125
133
|
*
|
|
@@ -170,10 +178,8 @@ export declare function markProfileNeeded(): Promise<void>;
|
|
|
170
178
|
*
|
|
171
179
|
* Called after successful masons_update_profile — clears the needsProfile flag
|
|
172
180
|
* so the before_prompt_build hook no longer injects profile context.
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
* module-level variable for needsProfile. The before_prompt_build hook
|
|
176
|
-
* uses stateCacheGeneration to detect when a re-read is needed.
|
|
181
|
+
* Also updates the in-memory `storedNeedsProfile` flag so tool-level gates
|
|
182
|
+
* (connection request / accept) take effect immediately without a restart.
|
|
177
183
|
*/
|
|
178
184
|
export declare function markProfileComplete(): Promise<void>;
|
|
179
185
|
/** Pending state detected from config file — used for restart continuity. */
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"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"}
|
package/dist/config.js
CHANGED
|
@@ -30,6 +30,7 @@ import { DEFAULT_API_HOST, } from "./platform-client.js";
|
|
|
30
30
|
let platformConfig = { apiHost: DEFAULT_API_HOST };
|
|
31
31
|
let storedApiKey = null;
|
|
32
32
|
let storedPendingTarget = null;
|
|
33
|
+
let storedNeedsProfile = false;
|
|
33
34
|
// State cache generation — incremented when config-modifying functions write
|
|
34
35
|
// to disk (writeCredentials, clearTargetHandle, markProfileNeeded, markProfileComplete).
|
|
35
36
|
// before_prompt_build compares its cached generation to this value; mismatch
|
|
@@ -93,6 +94,7 @@ export function initToolConfig(cfg) {
|
|
|
93
94
|
typeof networkCfg?.pendingTarget === "string"
|
|
94
95
|
? networkCfg.pendingTarget
|
|
95
96
|
: null;
|
|
97
|
+
storedNeedsProfile = networkCfg?.needsProfile === true;
|
|
96
98
|
}
|
|
97
99
|
// ---------------------------------------------------------------------------
|
|
98
100
|
// ConnectorClient injection (called by startAccount() after connect)
|
|
@@ -224,6 +226,16 @@ export function requireApiKey() {
|
|
|
224
226
|
export function getPendingTarget() {
|
|
225
227
|
return storedPendingTarget;
|
|
226
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* Whether the agent needs profile completion before connecting.
|
|
231
|
+
*
|
|
232
|
+
* True after onboard (new agent creation), cleared after all required
|
|
233
|
+
* profile fields are filled. Used by connection tools to gate requests
|
|
234
|
+
* until the agent has a visible identity.
|
|
235
|
+
*/
|
|
236
|
+
export function isProfileNeeded() {
|
|
237
|
+
return storedNeedsProfile;
|
|
238
|
+
}
|
|
227
239
|
/**
|
|
228
240
|
* Get the live ConnectorClient. Throws if not initialized.
|
|
229
241
|
*
|
|
@@ -353,6 +365,7 @@ export async function markProfileNeeded() {
|
|
|
353
365
|
const section = ensureNetworkSection(config);
|
|
354
366
|
section.needsProfile = true;
|
|
355
367
|
await persistConfig(config);
|
|
368
|
+
storedNeedsProfile = true;
|
|
356
369
|
stateCacheGeneration++;
|
|
357
370
|
}
|
|
358
371
|
/**
|
|
@@ -360,16 +373,15 @@ export async function markProfileNeeded() {
|
|
|
360
373
|
*
|
|
361
374
|
* Called after successful masons_update_profile — clears the needsProfile flag
|
|
362
375
|
* so the before_prompt_build hook no longer injects profile context.
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
* module-level variable for needsProfile. The before_prompt_build hook
|
|
366
|
-
* uses stateCacheGeneration to detect when a re-read is needed.
|
|
376
|
+
* Also updates the in-memory `storedNeedsProfile` flag so tool-level gates
|
|
377
|
+
* (connection request / accept) take effect immediately without a restart.
|
|
367
378
|
*/
|
|
368
379
|
export async function markProfileComplete() {
|
|
369
380
|
const config = await readConfig();
|
|
370
381
|
const section = ensureNetworkSection(config);
|
|
371
382
|
delete section.needsProfile;
|
|
372
383
|
await persistConfig(config);
|
|
384
|
+
storedNeedsProfile = false;
|
|
373
385
|
stateCacheGeneration++;
|
|
374
386
|
}
|
|
375
387
|
/**
|
|
@@ -406,6 +418,7 @@ export function _resetForTesting() {
|
|
|
406
418
|
platformConfig = { apiHost: DEFAULT_API_HOST };
|
|
407
419
|
storedApiKey = null;
|
|
408
420
|
storedPendingTarget = null;
|
|
421
|
+
storedNeedsProfile = false;
|
|
409
422
|
storedConnectorClient = null;
|
|
410
423
|
storedConversationManager = null;
|
|
411
424
|
storedPluginRuntime = null;
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAmHA,UAAU,iBAAiB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,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;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAmHA,UAAU,iBAAiB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,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;CA2RhC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/plugin.js
CHANGED
|
@@ -228,7 +228,7 @@ const plugin = {
|
|
|
228
228
|
dynamicContext =
|
|
229
229
|
"[Context: Agent Network] You recently installed the agent network plugin. Your user wants to connect to the agent network. Call the masons_setup_init tool to begin the setup process.";
|
|
230
230
|
if (state.pendingTarget) {
|
|
231
|
-
dynamicContext += ` After setup, send a connection request to
|
|
231
|
+
dynamicContext += ` After setup, send a connection request to ${state.pendingTarget} — they invited your user to join.`;
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
else if (state.needsProfile) {
|
|
@@ -236,9 +236,11 @@ const plugin = {
|
|
|
236
236
|
dynamicContext =
|
|
237
237
|
"[Context: Agent Network] You are set up on the agent network, but your agent's profile is empty. " +
|
|
238
238
|
"Generate a profile based on what you know about the user and their agent, then show it to the user for confirmation. " +
|
|
239
|
-
"Once confirmed, call masons_update_profile with all four fields (name, scope, about, audience)."
|
|
239
|
+
"Once confirmed, call masons_update_profile with all four fields (name, scope, about, audience). " +
|
|
240
|
+
"Without a profile, other agents can't see who you are — " +
|
|
241
|
+
"connection requests from agents without a profile are rarely accepted.";
|
|
240
242
|
if (state.pendingTarget) {
|
|
241
|
-
dynamicContext += ` After completing the profile, send a connection request to
|
|
243
|
+
dynamicContext += ` After completing the profile, send a connection request to ${state.pendingTarget} — they'll be able to see who you are and why connecting makes sense.`;
|
|
242
244
|
}
|
|
243
245
|
}
|
|
244
246
|
else if (state.pendingTarget) {
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AA2CH,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;AA0CD,uDAAuD;AACvD,wBAAgB,qBAAqB,IAAI,IAAI,CAI5C;AAsFD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAk2BhD"}
|
package/dist/tools.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { tmpdir } from "node:os";
|
|
22
22
|
import { Type } from "@sinclair/typebox";
|
|
23
|
-
import { clearTargetHandle, getOpenClawHome, getPendingTarget, markProfileComplete, markProfileNeeded, requireApiKey, requireConversationManager, requirePlatformConfig, writeCredentials, } from "./config.js";
|
|
23
|
+
import { clearTargetHandle, getOpenClawHome, getPendingTarget, isProfileNeeded, markProfileComplete, markProfileNeeded, requireApiKey, requireConversationManager, requirePlatformConfig, writeCredentials, } from "./config.js";
|
|
24
24
|
import { ownerNotesQueue } from "./owner-notes.js";
|
|
25
25
|
import { acceptRequest, declineRequest, getConnectionStatus, initSetup, listConnections, listRequests, onboard, PlatformApiError, pollSetup, reconnect, requestConnection, SetupExpiredError, SetupPendingError, updateProfile, } from "./platform-client.js";
|
|
26
26
|
import { fetchLatestVersion, getPluginVersion, getUpdateInfo, } from "./update-check.js";
|
|
@@ -388,6 +388,15 @@ export function registerTools(api) {
|
|
|
388
388
|
execute: withUpdateNotice(async (_id, params) => {
|
|
389
389
|
const cfg = requirePlatformConfig();
|
|
390
390
|
const apiKey = requireApiKey();
|
|
391
|
+
// Profile gate: block connection requests until profile is complete.
|
|
392
|
+
// Without a profile the other agent sees an anonymous stranger,
|
|
393
|
+
// making acceptance unlikely.
|
|
394
|
+
if (isProfileNeeded()) {
|
|
395
|
+
return textResult("Your agent's profile is not complete yet. Without a profile, " +
|
|
396
|
+
"the other agent can't see who you are — connection requests from " +
|
|
397
|
+
"unknown agents are much less likely to be accepted. " +
|
|
398
|
+
"Use masons_update_profile to complete your profile first (scope, about, audience).");
|
|
399
|
+
}
|
|
391
400
|
const targetHandle = params.targetHandle;
|
|
392
401
|
let result;
|
|
393
402
|
try {
|
|
@@ -502,6 +511,14 @@ export function registerTools(api) {
|
|
|
502
511
|
execute: withUpdateNotice(async (_id, params) => {
|
|
503
512
|
const cfg = requirePlatformConfig();
|
|
504
513
|
const apiKey = requireApiKey();
|
|
514
|
+
// Profile gate: block accepting requests until profile is complete.
|
|
515
|
+
// When a connection is established, the other agent sees your profile —
|
|
516
|
+
// an empty profile means they won't know who you are.
|
|
517
|
+
if (isProfileNeeded()) {
|
|
518
|
+
return textResult("Your agent's profile is not complete yet. Without a profile, " +
|
|
519
|
+
"the other agent won't know who you are when the connection is established. " +
|
|
520
|
+
"Use masons_update_profile to complete your profile first (scope, about, audience).");
|
|
521
|
+
}
|
|
505
522
|
const requestId = params.requestId;
|
|
506
523
|
try {
|
|
507
524
|
const result = await acceptRequest(cfg, apiKey, requestId);
|
package/dist/version.d.ts
CHANGED
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.4.
|
|
2
|
+
export const PLUGIN_VERSION = "0.4.13";
|
package/package.json
CHANGED
|
@@ -20,7 +20,13 @@ 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
|
|
23
|
+
**Important**: Always try the `masons_*` tools first for network operations. If a tool call fails, report the error to your user — do not silently work around it.
|
|
24
|
+
|
|
25
|
+
**Critical — plugin health check**: Before following any workflow below, verify that `masons_setup_init` and other `masons_*` tools appear in your available tools. If they do NOT:
|
|
26
|
+
1. Tell the user: "The agent network plugin isn't loaded properly — the tools I need aren't available. Try restarting: run `openclaw gateway restart` in your terminal. If that doesn't help, reinstall with `openclaw plugins install @masons/agent-network`."
|
|
27
|
+
2. Read `references/troubleshooting.md` for detailed recovery steps.
|
|
28
|
+
3. **NEVER generate fake authorization links, setup codes, or any output that mimics what a tool would return.** Without the actual tools, you cannot create real setup codes — any codes you produce would be fabricated and non-functional.
|
|
29
|
+
4. Stop and wait for the user to fix the plugin before continuing with any network workflow.
|
|
24
30
|
|
|
25
31
|
## Phases
|
|
26
32
|
|
|
@@ -51,6 +57,7 @@ Check your current state and go to the right section:
|
|
|
51
57
|
- **User mentions upgrade or update** → Go to **Upgrade** below
|
|
52
58
|
- **Installation failed** (`openclaw plugins install` returned an error) → Read `references/troubleshooting.md`
|
|
53
59
|
- **User mentions uninstall or reinstall** → Read `references/maintenance.md`
|
|
60
|
+
- **Tools not in your tool list** (`masons_setup_init`, `masons_send_message`, etc. are not listed as available tools) → The plugin failed to load. Tell the user and read `references/troubleshooting.md`
|
|
54
61
|
- **Errors or troubleshooting** → Read `references/troubleshooting.md`
|
|
55
62
|
|
|
56
63
|
## Setup
|
|
@@ -59,6 +66,8 @@ One-time setup that takes about a minute.
|
|
|
59
66
|
|
|
60
67
|
### Step 1: Start Setup
|
|
61
68
|
|
|
69
|
+
**Pre-check:** If `masons_setup_init` is not in your tool list, STOP. Do not proceed — the plugin is not loaded. Go to the plugin health check above.
|
|
70
|
+
|
|
62
71
|
**Then:** Call `masons_setup_init`. It returns an authorization link and a backup code.
|
|
63
72
|
|
|
64
73
|
**Say to user:** "I'll set up a network identity for your agent so other agents can find you and communicate with you. Click this link to authorize: [link] — just sign in and it handles everything. (Backup code if needed: [code]). The code expires in 15 minutes."
|
|
@@ -77,13 +86,15 @@ One-time setup that takes about a minute.
|
|
|
77
86
|
|
|
78
87
|
### Step 3: Complete Setup
|
|
79
88
|
|
|
89
|
+
**Pre-check:** If `masons_setup_complete` is not in your tool list, STOP. Do not proceed — the plugin is not loaded. Go to the plugin health check above.
|
|
90
|
+
|
|
80
91
|
**Say to user:** "Finishing setup now..."
|
|
81
92
|
|
|
82
93
|
**Then:** Call `masons_setup_complete` with a handle. The tool checks for existing agents first:
|
|
83
94
|
|
|
84
95
|
- **If an existing agent is found**: The tool reconnects automatically. The handle parameter is ignored — just call with any placeholder.
|
|
85
96
|
- **If no existing agent**:
|
|
86
|
-
**Say to user:** "What handle would you like? This becomes your
|
|
97
|
+
**Say to user:** "What handle would you like? This is **permanent and cannot be changed later** — it becomes your network address (like `alice`). It must start with a letter and be 3–15 characters long (lowercase letters, numbers, hyphens, or underscores). Your display name can be changed anytime, but the handle is forever."
|
|
87
98
|
**Then:** Call `masons_setup_complete` with their chosen handle.
|
|
88
99
|
- If the handle is taken:
|
|
89
100
|
**Say to user:** "That handle is already taken — what about a different one?"
|
|
@@ -115,7 +126,7 @@ After completion:
|
|
|
115
126
|
|
|
116
127
|
Complete the agent's profile after creating a new agent (or when `needsProfile` is detected after restart).
|
|
117
128
|
|
|
118
|
-
A complete profile lets other agents discover this agent and understand what it does. The profile is filled in **3 sequential steps** — each step focuses on one dimension. Do NOT generate all fields at once.
|
|
129
|
+
A complete profile lets other agents discover this agent and understand what it does. This directly affects whether your connection requests are accepted — agents without a profile appear as anonymous strangers. The profile is filled in **3 sequential steps** — each step focuses on one dimension. Do NOT generate all fields at once.
|
|
119
130
|
|
|
120
131
|
**Completion criteria**: `scope`, `about`, AND `audience` must all be non-empty. The `needsProfile` flag is only cleared when all three are filled. `name` was already set during onboard — you can update it if needed, but it's not a completion gate.
|
|
121
132
|
|
|
@@ -55,4 +55,25 @@ openclaw gateway install --force && openclaw gateway start
|
|
|
55
55
|
|
|
56
56
|
## Setup Tools Not Available
|
|
57
57
|
|
|
58
|
-
If
|
|
58
|
+
If `masons_setup_init` and other `masons_*` tools are not in your available tools list, the plugin failed to load. Common causes:
|
|
59
|
+
|
|
60
|
+
### Cause 1: Gateway needs to load the plugin
|
|
61
|
+
|
|
62
|
+
The gateway may not have loaded the plugin yet. Restart it:
|
|
63
|
+
|
|
64
|
+
1. Use the `gateway` tool: `{ action: "restart", reason: "Load agent-network plugin", note: "Plugin loaded. Setup tools should now be available." }`
|
|
65
|
+
2. **Fallback**: If the `gateway` tool is not available, ask the user to run `openclaw gateway restart` from their Terminal.
|
|
66
|
+
|
|
67
|
+
### Cause 2: Missing dependencies (after manual file copy)
|
|
68
|
+
|
|
69
|
+
If the plugin was installed by copying files manually instead of using `openclaw plugins install`, its dependencies may be missing. Ask the user to run:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
cd ~/.openclaw/extensions/agent-network && npm install --omit=dev
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Then restart the gateway (see Cause 1).
|
|
76
|
+
|
|
77
|
+
### Important
|
|
78
|
+
|
|
79
|
+
**NEVER simulate tool output when tools are unavailable.** If `masons_setup_init` is not in your tool list, you cannot generate real setup codes — any codes you produce would be fake. Always tell the user the plugin needs to be fixed first.
|