@agentlinkdev/agentlink 0.1.0 → 0.1.2

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/README.md CHANGED
@@ -21,9 +21,11 @@ npx @agentlinkdev/agentlink setup --join AB3X7K
21
21
  Then restart the gateway:
22
22
 
23
23
  ```bash
24
- openclaw gateway
24
+ openclaw gateway stop && openclaw gateway
25
25
  ```
26
26
 
27
+ Verify it's working — ask your agent: **"check agentlink status"**
28
+
27
29
  ### Uninstall
28
30
 
29
31
  ```bash
@@ -48,6 +50,7 @@ All coordination happens in the background. You state the goal. Agents handle th
48
50
 
49
51
  | Tool | Description |
50
52
  |------|-------------|
53
+ | `agentlink_status` | Check health: broker connection, agent ID, active groups |
51
54
  | `agentlink_coordinate` | Start a new coordination with a goal and participants |
52
55
  | `agentlink_invite_agent` | Invite an agent to join a group |
53
56
  | `agentlink_join_group` | Join a group via invite code |
package/bin/cli.js CHANGED
@@ -271,6 +271,8 @@ async function cmdSetup(args) {
271
271
  info("Restart the OpenClaw gateway to activate AgentLink:");
272
272
  info(" openclaw gateway stop && openclaw gateway");
273
273
  console.log("");
274
+ info('Verify: ask your agent "check agentlink status"');
275
+ console.log("");
274
276
  return;
275
277
  }
276
278
 
@@ -289,8 +291,12 @@ async function cmdSetup(args) {
289
291
  });
290
292
  child.unref();
291
293
  success("Gateway restarted in background");
294
+ console.log("");
295
+ info('Verify: ask your agent "check agentlink status"');
292
296
  } else {
293
297
  info("Restart manually: openclaw gateway stop && openclaw gateway");
298
+ console.log("");
299
+ info('Verify: ask your agent "check agentlink status"');
294
300
  }
295
301
  console.log("");
296
302
  }
@@ -318,14 +324,24 @@ async function cmdUninstall() {
318
324
  // 4. Remove from plugins.allow
319
325
  removeFromArray("plugins.allow", PLUGIN_NAME);
320
326
 
321
- // 5. Uninstall plugin
327
+ // 5. Uninstall plugin (pipe 'y' to auto-confirm the OC prompt)
322
328
  info("Uninstalling plugin...");
323
329
  try {
324
- execSync(`openclaw plugins uninstall ${PLUGIN_NAME}`, { stdio: "inherit" });
330
+ execSync(`echo y | openclaw plugins uninstall ${PLUGIN_NAME}`, {
331
+ stdio: ["pipe", "inherit", "inherit"],
332
+ shell: true,
333
+ });
325
334
  } catch {
326
335
  warn("Plugin uninstall command failed (may already be removed).");
327
336
  }
328
- success("Plugin uninstalled");
337
+
338
+ // Verify plugin was actually removed
339
+ if (isPluginInstalled()) {
340
+ warn("Plugin may not have been fully removed. Run manually:");
341
+ info(" openclaw plugins uninstall agentlink");
342
+ } else {
343
+ success("Plugin uninstalled");
344
+ }
329
345
 
330
346
  // 6. Print preservation notice
331
347
  console.log("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentlinkdev/agentlink",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Agent-to-agent coordination for OpenClaw. Your agent talks to other people's agents.",
5
5
  "main": "src/index.ts",
6
6
  "bin": {
package/src/tools.ts CHANGED
@@ -102,6 +102,8 @@ const CompleteSchema = Type.Object({
102
102
  ),
103
103
  });
104
104
 
105
+ const StatusSchema = Type.Object({});
106
+
105
107
  // ---------------------------------------------------------------------------
106
108
  // createTools
107
109
  // ---------------------------------------------------------------------------
@@ -348,5 +350,35 @@ export function createTools(
348
350
  },
349
351
  };
350
352
 
351
- return [coordinateTool, submitJobTool, inviteAgentTool, joinGroupTool, completeTool];
353
+ // -----------------------------------------------------------------------
354
+ // agentlink_status
355
+ // -----------------------------------------------------------------------
356
+ const statusTool = {
357
+ name: "agentlink_status",
358
+ label: "Status",
359
+ description:
360
+ "Check AgentLink health: broker connection, agent identity, and active groups. Use this to verify the plugin is working.",
361
+ parameters: StatusSchema,
362
+ async execute(_id: string, _params: Record<string, unknown>) {
363
+ const connected = mqtt.getClient().isConnected();
364
+ const activeGroupIds = state.getActiveGroups();
365
+ const groups = activeGroupIds.map((id) => {
366
+ const g = state.getGroup(id);
367
+ return g
368
+ ? { group_id: id, goal: g.goal, participants: g.participants.length, status: g.status }
369
+ : { group_id: id };
370
+ });
371
+
372
+ return json({
373
+ agent_id: config.agent.id,
374
+ broker: config.brokerUrl,
375
+ connected,
376
+ active_groups: groups.length,
377
+ groups,
378
+ capabilities: config.agent.capabilities.map((c) => c.name),
379
+ });
380
+ },
381
+ };
382
+
383
+ return [statusTool, coordinateTool, submitJobTool, inviteAgentTool, joinGroupTool, completeTool];
352
384
  }