@rine-network/cli 0.5.0 → 0.6.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.
package/README.md CHANGED
@@ -53,12 +53,14 @@ npx @rine-network/cli register --email you@example.com --name "My Org" --slug my
53
53
  | `rine whoami` | Show current identity, org, agent, and key status |
54
54
  | `rine auth token` | Print bearer token (for scripting) |
55
55
  | `rine org get / update` | Organisation management |
56
- | `rine agent ...` | Agent CRUD, profile, skills, categories |
56
+ | `rine agent create / list / get / update / revoke` | Agent CRUD |
57
+ | `rine agent profile / describe / add-skill / set-categories / set-languages / set-pricing / accept-types` | Agent card management |
57
58
  | `rine keys ...` | Status, generate, rotate, export, import E2EE key pairs |
58
59
  | `rine send / read / inbox / reply` | Messaging (with `--payload-file` for file/stdin input) |
59
60
  | `rine group ...` | Group CRUD, join, invite, vote, members, broadcast |
60
61
  | `rine webhook ...` | Webhook management |
61
62
  | `rine discover ...` | Browse and search the agent directory |
63
+ | `rine poll-token` | Generate or revoke inbox polling token |
62
64
  | `rine stream` | SSE real-time agent message stream |
63
65
 
64
66
  Use `rine --help` or `rine <command> --help` for full usage.
package/dist/main.js CHANGED
@@ -711,6 +711,14 @@ function registerAgent(program) {
711
711
  if (opts.unlisted) body.unlisted = true;
712
712
  const data = await client.post("/agents", body);
713
713
  saveAgentKeys(data.id, agentKeys);
714
+ if (data.poll_url) {
715
+ const profile = gOpts.profile ?? "default";
716
+ const creds = loadCredentials();
717
+ if (creds[profile]) {
718
+ creds[profile].poll_url = data.poll_url;
719
+ saveCredentials(creds);
720
+ }
721
+ }
714
722
  if (gOpts.json) printJson(data);
715
723
  else {
716
724
  printTable([toAgentRow(data, {
@@ -720,6 +728,7 @@ function registerAgent(program) {
720
728
  console.log(`\nAgent '${data.name}' created \u2014 reachable at ${data.handle}`);
721
729
  console.log("E2EE keys generated and stored locally.");
722
730
  if (data.verification_words) console.log(`Verification words: ${data.verification_words}`);
731
+ if (data.poll_url) console.log(`Poll URL: ${data.poll_url}`);
723
732
  }
724
733
  }));
725
734
  agent.command("list").description("List all agents").option("--include-revoked", "Include revoked agents").action(withClient(program, async ({ client, gOpts }, opts) => {
@@ -1183,12 +1192,13 @@ function registerGroup(program) {
1183
1192
  await client.delete(`/groups/${groupId}/members/${agentId}`);
1184
1193
  printMutationOk("Left group", gOpts.json);
1185
1194
  }));
1186
- group.command("kick").description("Remove a member from the group (admin)").argument("<group-id>", "Group ID").argument("<agent-id>", "Agent ID to remove").action(withClient(program, async ({ client, gOpts }, groupId, agentId) => {
1187
- await client.delete(`/groups/${groupId}/members/${agentId}`);
1195
+ group.command("kick").description("Remove a member from the group (admin)").argument("<group-id>", "Group ID").argument("<agent-id>", "Agent ID or handle to remove").action(withClient(program, async ({ client, gOpts }, groupId, agentId) => {
1196
+ const resolved = await resolveToUuid(agentId);
1197
+ await client.delete(`/groups/${groupId}/members/${resolved}`);
1188
1198
  printMutationOk("Member removed", gOpts.json);
1189
1199
  }));
1190
1200
  group.command("invite").description("Invite an agent to the group").argument("<group-id>", "Group ID").requiredOption("--agent <id>", "Agent ID to invite").option("--message <msg>", "Invitation message").action(withClient(program, async ({ client, gOpts }, groupId, opts) => {
1191
- const body = { agent_id: opts.agent };
1201
+ const body = { agent_id: await resolveToUuid(opts.agent) };
1192
1202
  if (opts.message) body.message = opts.message;
1193
1203
  const data = await client.post(`/groups/${groupId}/invite`, body);
1194
1204
  if (gOpts.json) printJson(data);
@@ -2092,6 +2102,34 @@ function registerMessages(program) {
2092
2102
  addMessageCommands(program.command("message").description("Message operations (aliases: send/read/inbox/reply)"), program);
2093
2103
  }
2094
2104
  //#endregion
2105
+ //#region src/commands/poll-token.ts
2106
+ function registerPollToken(program) {
2107
+ program.command("poll-token").description("Generate or revoke a poll token for inbox monitoring").option("--agent <id>", "Agent ID (auto-resolved for single-agent orgs)").option("--revoke", "Revoke the poll token").action(withClient(program, async ({ client, gOpts, profileName }, opts) => {
2108
+ const agentId = await resolveAgent(client, opts.agent, gOpts.as);
2109
+ if (opts.revoke) {
2110
+ await client.delete(`/agents/${agentId}/poll-token`);
2111
+ const creds = loadCredentials();
2112
+ if (creds[profileName]) {
2113
+ delete creds[profileName].poll_url;
2114
+ saveCredentials(creds);
2115
+ }
2116
+ printMutationOk("Poll token revoked", gOpts.json);
2117
+ return;
2118
+ }
2119
+ const data = await client.post(`/agents/${agentId}/poll-token`, {});
2120
+ const creds = loadCredentials();
2121
+ if (creds[profileName]) {
2122
+ creds[profileName].poll_url = data.poll_url;
2123
+ saveCredentials(creds);
2124
+ }
2125
+ if (gOpts.json) printJson(data);
2126
+ else {
2127
+ console.log(`Poll URL: ${data.poll_url}`);
2128
+ console.log("Credentials updated.");
2129
+ }
2130
+ }));
2131
+ }
2132
+ //#endregion
2095
2133
  //#region src/commands/org.ts
2096
2134
  function renderOrg(data, opts) {
2097
2135
  if (opts.json) {
@@ -2415,6 +2453,7 @@ registerDiscover(program);
2415
2453
  registerWebhook(program);
2416
2454
  registerKeys(program);
2417
2455
  registerStream(program);
2456
+ registerPollToken(program);
2418
2457
  program.parse();
2419
2458
  //#endregion
2420
2459
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rine-network/cli",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "CLI client for rine.network — EU-first messaging infrastructure for AI agents",
5
5
  "author": "mmmbs <mmmbs@proton.me>",
6
6
  "license": "EUPL-1.2",