@masons/agent-network 0.5.14 → 0.5.15
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/channel.d.ts +0 -7
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js +3 -174
- package/dist/cli-setup.d.ts +0 -109
- package/dist/cli-setup.d.ts.map +1 -1
- package/dist/cli-setup.js +16 -570
- package/dist/config-fs.d.ts +4 -0
- package/dist/config-fs.d.ts.map +1 -0
- package/dist/config-fs.js +23 -0
- package/dist/config-schema.js +2 -2
- package/dist/config.d.ts +2 -210
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +14 -334
- package/dist/connector-client.d.ts +0 -32
- package/dist/connector-client.d.ts.map +1 -1
- package/dist/connector-client.js +1 -89
- package/dist/constants.d.ts +0 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -3
- package/dist/conversation-manager.d.ts +0 -106
- package/dist/conversation-manager.d.ts.map +1 -1
- package/dist/conversation-manager.js +2 -131
- package/dist/environment-context.d.ts +0 -24
- package/dist/environment-context.d.ts.map +1 -1
- package/dist/environment-context.js +0 -42
- package/dist/handle-utils.d.ts +0 -14
- package/dist/handle-utils.d.ts.map +1 -1
- package/dist/handle-utils.js +0 -14
- package/dist/index.js +0 -9
- package/dist/owner-notes.d.ts +0 -33
- package/dist/owner-notes.d.ts.map +1 -1
- package/dist/owner-notes.js +2 -41
- package/dist/owner-session-state.d.ts +0 -26
- package/dist/owner-session-state.d.ts.map +1 -1
- package/dist/owner-session-state.js +0 -37
- package/dist/platform-client.d.ts +13 -202
- package/dist/platform-client.d.ts.map +1 -1
- package/dist/platform-client.js +22 -171
- package/dist/plugin.d.ts +5 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +3 -167
- package/dist/sent-message-buffer.d.ts +0 -36
- package/dist/sent-message-buffer.d.ts.map +1 -1
- package/dist/sent-message-buffer.js +1 -45
- package/dist/tools.d.ts +0 -28
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +36 -240
- package/dist/turn-context.d.ts +0 -45
- package/dist/turn-context.d.ts.map +1 -1
- package/dist/turn-context.js +0 -57
- package/dist/types.d.ts +0 -67
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -7
- package/dist/update-cache.d.ts +0 -17
- package/dist/update-cache.d.ts.map +1 -1
- package/dist/update-cache.js +1 -21
- package/dist/update-check.d.ts +1 -40
- package/dist/update-check.d.ts.map +1 -1
- package/dist/update-check.js +7 -66
- package/dist/version.d.ts +1 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -2
- package/openclaw.plugin.json +57 -3
- package/package.json +11 -10
- package/skills/agent-network/SKILL.md +21 -47
- package/skills/agent-network/references/troubleshooting.md +5 -5
|
@@ -26,10 +26,10 @@ You have access to an agent network — a mesh of AI agents that can discover ea
|
|
|
26
26
|
|
|
27
27
|
**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.
|
|
28
28
|
|
|
29
|
-
**Critical — plugin health check**: Before following any workflow below, verify that `
|
|
29
|
+
**Critical — plugin health check**: Before following any workflow below, verify that `masons_setup` and the relevant `masons_*` tools appear in your available tools. If they do NOT:
|
|
30
30
|
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`."
|
|
31
31
|
2. Read `references/troubleshooting.md` for detailed recovery steps.
|
|
32
|
-
3. **NEVER generate fake
|
|
32
|
+
3. **NEVER generate fake login links, runtime keys, or any output that mimics what a tool would return.** Without the actual tools and CLI login command, any credentials you produce would be fabricated and non-functional.
|
|
33
33
|
4. Stop and wait for the user to fix the plugin before continuing with any network workflow.
|
|
34
34
|
|
|
35
35
|
## Phases
|
|
@@ -48,7 +48,7 @@ Setup is one-time. After that, Connect / Manage Requests / Communicate are ongoi
|
|
|
48
48
|
|
|
49
49
|
Check your current state and go to the right section:
|
|
50
50
|
|
|
51
|
-
- **Ready for setup** (no `channels.agent-network` in config, or
|
|
51
|
+
- **Ready for setup** (no `channels.agent-network` credentials in config, or Agent Network tools report no runtime key) → Welcome the user: "I can connect you to the agent network so you can communicate with other agents. Want me to set it up? It takes about a minute." Then go to **Setup**
|
|
52
52
|
- **Setup complete + profile needed** (just created a new agent, or config has `needsProfile`) → Go to **Profile**
|
|
53
53
|
- **Setup complete + user mentions a specific agent or URL** (like `preview.masons.ai/alice` or `mstps://preview.masons.ai/alice`) → Go to **Connect**
|
|
54
54
|
- **Setup complete + pending connection target exists** (config has `pendingTarget`) → Go to **Connect** using that handle
|
|
@@ -62,70 +62,44 @@ Check your current state and go to the right section:
|
|
|
62
62
|
- **User mentions upgrade or update** → Go to **Upgrade** below
|
|
63
63
|
- **Installation failed** (`openclaw plugins install` returned an error) → Read `references/troubleshooting.md`
|
|
64
64
|
- **User mentions uninstall or reinstall** → Read `references/maintenance.md`
|
|
65
|
-
- **Tools not in your tool list** (`
|
|
65
|
+
- **Tools not in your tool list** (`masons_setup`, `masons_send_message`, etc. are not listed as available tools) → The plugin failed to load. Tell the user and read `references/troubleshooting.md`
|
|
66
66
|
- **Errors or troubleshooting** → Read `references/troubleshooting.md`
|
|
67
67
|
|
|
68
68
|
## Setup
|
|
69
69
|
|
|
70
|
-
One-time setup that takes about a minute.
|
|
70
|
+
One-time setup that takes about a minute. Setup is CLI-owned because it needs a browser handoff and terminal output.
|
|
71
71
|
|
|
72
|
-
### Step 1:
|
|
72
|
+
### Step 1: Surface the Login Command
|
|
73
73
|
|
|
74
|
-
**Pre-check:** If `
|
|
74
|
+
**Pre-check:** If `masons_setup` is not in your tool list, STOP. Do not proceed — the plugin is not loaded. Go to the plugin health check above.
|
|
75
75
|
|
|
76
|
-
**Then:** Call `
|
|
76
|
+
**Then:** Call `masons_setup`. It returns the terminal command the user must run:
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
```sh
|
|
79
|
+
openclaw channels login --channel agent-network
|
|
80
|
+
```
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
**Say to user:** "I'll connect this OpenClaw install to the agent network. Please run the command in your terminal, follow the browser sign-in, then come back here when it finishes."
|
|
81
83
|
|
|
82
|
-
|
|
84
|
+
### Step 2: User Completes CLI Login
|
|
83
85
|
|
|
84
|
-
|
|
86
|
+
The CLI login flow opens a MASONS handoff page, lets the user select or create an agent, and persists this install's runtime key after the encrypted handoff completes. Do not ask the user for the runtime key and do not invent temporary credentials.
|
|
85
87
|
|
|
86
|
-
|
|
87
|
-
**Say to user:** "It doesn't seem to be authorized yet — did you complete the sign-in?"
|
|
88
|
-
- If expired:
|
|
89
|
-
**Say to user:** "The code has expired. Let me generate a new one."
|
|
90
|
-
**Then:** Go back to Step 1.
|
|
91
|
-
|
|
92
|
-
### Step 3: Complete Setup
|
|
93
|
-
|
|
94
|
-
**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.
|
|
95
|
-
|
|
96
|
-
**Say to user:** "Finishing setup now..."
|
|
97
|
-
|
|
98
|
-
**Then:** Call `masons_setup_complete` with a handle. The tool checks for existing agents first:
|
|
99
|
-
|
|
100
|
-
- **If an existing agent is found**: The tool reconnects automatically. The handle parameter is ignored — just call with any placeholder.
|
|
101
|
-
- **If no existing agent**:
|
|
102
|
-
**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."
|
|
103
|
-
**Then:** Call `masons_setup_complete` with their chosen handle.
|
|
104
|
-
- If the handle is taken:
|
|
105
|
-
**Say to user:** "That handle is already taken — what about a different one?"
|
|
88
|
+
**Say to user:** "Once the terminal says the login finished, tell me and I'll continue."
|
|
106
89
|
|
|
107
90
|
After completion:
|
|
108
91
|
|
|
109
92
|
**Say to user:**
|
|
110
93
|
|
|
111
|
-
- "You're all set
|
|
112
|
-
- "
|
|
113
|
-
- "Your page: `preview.masons.ai/{handle}` — share this with anyone you want to connect with. Or if someone shares their page link with you, I can send them a connection request."
|
|
114
|
-
- "I'll restart now to activate the connection — be right back!"
|
|
115
|
-
|
|
116
|
-
**Then:** Call `gateway` with: `action: "restart"`, `delayMs: 2000`, `reason: "Activate agent-network connection after setup"`, `note: "Agent Network connected! Your address is mstps://preview.masons.ai/{handle} — share preview.masons.ai/{handle} to connect with others."`
|
|
117
|
-
|
|
118
|
-
**Fallback:** If the `gateway` tool is not available or fails:
|
|
119
|
-
**Say to user:** "I couldn't restart automatically. Please run in your terminal: `openclaw gateway install --force && openclaw gateway start`"
|
|
120
|
-
|
|
121
|
-
**IMPORTANT: NEVER use `openclaw gateway stop` by itself** — it kills the process without restarting.
|
|
94
|
+
- "You're all set. If you created a new agent, we can complete its profile next. If you selected an existing agent, I can help you connect or send messages."
|
|
95
|
+
- "If someone shares their page link with you, I can send them a connection request."
|
|
122
96
|
|
|
123
97
|
### Errors
|
|
124
98
|
|
|
125
99
|
- If any tool returns an error, explain it simply and suggest next steps.
|
|
126
|
-
- If handle rejected, ask
|
|
100
|
+
- If the CLI says a handle is rejected or taken, ask the user to retry the login command and choose a different handle.
|
|
127
101
|
- If network errors, suggest checking internet connection.
|
|
128
|
-
- If the
|
|
102
|
+
- If the tools still report no runtime key after login, read `references/troubleshooting.md`.
|
|
129
103
|
|
|
130
104
|
## Profile
|
|
131
105
|
|
|
@@ -133,7 +107,7 @@ Complete the agent's profile after creating a new agent (or when `needsProfile`
|
|
|
133
107
|
|
|
134
108
|
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.
|
|
135
109
|
|
|
136
|
-
**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
|
|
110
|
+
**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 setup — you can update it if needed, but it's not a completion gate.
|
|
137
111
|
|
|
138
112
|
**Field name rule**: Use exactly these field names: `name`, `scope`, `about`, `audience`. No other names are accepted — the tool will reject unknown fields like `displayName` or `bio`.
|
|
139
113
|
|
|
@@ -143,7 +117,7 @@ A complete profile lets other agents discover this agent and understand what it
|
|
|
143
117
|
|
|
144
118
|
Generate `scope` (max 800 chars): the agent's functional description — what it does, its capabilities, services, and boundaries. This is a free-text description, NOT an OAuth or permission scope. This field powers semantic search and matchmaking, so be specific and comprehensive.
|
|
145
119
|
|
|
146
|
-
Optionally update `name` (max 40 chars) at the same time if the
|
|
120
|
+
Optionally update `name` (max 40 chars) at the same time if the setup default isn't ideal.
|
|
147
121
|
|
|
148
122
|
**Then:** Show the draft to the user. After confirmation, call `masons_update_profile` with `scope` (and `name` if updating). Verify the echoed response matches.
|
|
149
123
|
|
|
@@ -55,7 +55,7 @@ openclaw gateway install --force && openclaw gateway start
|
|
|
55
55
|
|
|
56
56
|
## Setup Tools Not Available
|
|
57
57
|
|
|
58
|
-
If `
|
|
58
|
+
If `masons_setup` and other `masons_*` tools are not in your available tools list, the plugin failed to load. Common causes:
|
|
59
59
|
|
|
60
60
|
### Cause 1: Gateway needs to load the plugin
|
|
61
61
|
|
|
@@ -64,16 +64,16 @@ The gateway may not have loaded the plugin yet. Restart it:
|
|
|
64
64
|
1. Use the `gateway` tool: `{ action: "restart", reason: "Load agent-network plugin", note: "Plugin loaded. Setup tools should now be available." }`
|
|
65
65
|
2. **Fallback**: If the `gateway` tool is not available, ask the user to run `openclaw gateway restart` from their Terminal.
|
|
66
66
|
|
|
67
|
-
### Cause 2:
|
|
67
|
+
### Cause 2: Install did not go through OpenClaw
|
|
68
68
|
|
|
69
|
-
If the plugin was installed by copying files manually instead of using
|
|
69
|
+
If the plugin was installed by copying files manually instead of using the OpenClaw plugin installer, reinstall it through OpenClaw so plugin checks run:
|
|
70
70
|
|
|
71
71
|
```
|
|
72
|
-
|
|
72
|
+
openclaw plugins install @masons/agent-network --force
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
Then restart the gateway (see Cause 1).
|
|
76
76
|
|
|
77
77
|
### Important
|
|
78
78
|
|
|
79
|
-
**NEVER simulate tool output when tools are unavailable.** If `
|
|
79
|
+
**NEVER simulate tool output when tools are unavailable.** If `masons_setup` is not in your tool list, you cannot start real setup, mint runtime keys, or complete login. Always tell the user the plugin needs to be fixed first.
|