@masons/agent-network 0.4.11 → 0.4.12

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 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
- * Note: unlike clearTargetHandle, this only writes to disk there is no
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. */
@@ -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;AAsB9B;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAcD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,CAAC,MA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AAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CA4Bf;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMrE;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CASvD;AAMD;;;;;GAKG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAOvD;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAOzD;AAMD,6EAA6E;AAC7E,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,cAAc,EAAE,OAAO,CAAC;IACxB,wDAAwD;IACxD,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,4EAA4E;IAC5E,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,YAAY,CAAC,CA2BhE;AAMD,uDAAuD;AACvD,wBAAgB,gBAAgB,IAAI,IAAI,CASvC"}
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
- * Note: unlike clearTargetHandle, this only writes to disk there is no
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;
@@ -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;CAyRhC,CAAC;AAEF,eAAe,MAAM,CAAC"}
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 @${state.pendingTarget} — they invited your user to join.`;
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 @${state.pendingTarget} — they invited your user to join.`;
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) {
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AA0CH,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,CAy0BhD"}
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
@@ -1,3 +1,3 @@
1
1
  /** Plugin version — must match package.json. Validated by prepublishOnly. */
2
- export declare const PLUGIN_VERSION = "0.4.11";
2
+ export declare const PLUGIN_VERSION = "0.4.12";
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.4.11";
2
+ export const PLUGIN_VERSION = "0.4.12";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masons/agent-network",
3
- "version": "0.4.11",
3
+ "version": "0.4.12",
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)",
@@ -19,6 +19,15 @@
19
19
  "publishConfig": {
20
20
  "access": "public"
21
21
  },
22
+ "scripts": {
23
+ "build": "tsc",
24
+ "dev": "tsc --watch",
25
+ "test": "tsc -p test/tsconfig.json && node --test --loader ts-node/esm test/**/*.test.ts",
26
+ "lint": "biome check",
27
+ "format": "biome format --write",
28
+ "prepublishOnly": "bash scripts/check-version.sh && npm run build && npm run test",
29
+ "release": "pnpm publish --access public"
30
+ },
22
31
  "files": [
23
32
  "dist/",
24
33
  "openclaw.plugin.json",
@@ -68,13 +77,5 @@
68
77
  "@types/ws": "^8",
69
78
  "ts-node": "^10",
70
79
  "typescript": "^5"
71
- },
72
- "scripts": {
73
- "build": "tsc",
74
- "dev": "tsc --watch",
75
- "test": "tsc -p test/tsconfig.json && node --test --loader ts-node/esm test/**/*.test.ts",
76
- "lint": "biome check",
77
- "format": "biome format --write",
78
- "release": "pnpm publish --access public"
79
80
  }
80
- }
81
+ }
@@ -83,7 +83,7 @@ One-time setup that takes about a minute.
83
83
 
84
84
  - **If an existing agent is found**: The tool reconnects automatically. The handle parameter is ignored — just call with any placeholder.
85
85
  - **If no existing agent**:
86
- **Say to user:** "What handle would you like? This becomes your permanent network address (like `alice`). Use 3–15 lowercase letters, numbers, hyphens, or underscores."
86
+ **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
87
  **Then:** Call `masons_setup_complete` with their chosen handle.
88
88
  - If the handle is taken:
89
89
  **Say to user:** "That handle is already taken — what about a different one?"
@@ -115,7 +115,7 @@ After completion:
115
115
 
116
116
  Complete the agent's profile after creating a new agent (or when `needsProfile` is detected after restart).
117
117
 
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.
118
+ 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
119
 
120
120
  **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
121