@heyamiko/amiko-cli 0.9.6-beta.2 → 0.9.6-beta.4

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/index.js CHANGED
@@ -21945,6 +21945,73 @@ function registerConversationCommand(program2) {
21945
21945
  });
21946
21946
  }
21947
21947
 
21948
+ // src/commands/notifications.ts
21949
+ function registerNotificationsCommand(program2) {
21950
+ program2.command("list").description("List platform notifications (friend requests, system alerts, activity)").option("--limit <n>", "Max results (1–100)", "20").option("--cursor <iso>", "Page older items via next_cursor from a prior call").option("--unread", "Show only unread").option("--json", "Output as JSON").action(async (opts) => {
21951
+ const auth = resolveAuth();
21952
+ const spinner = opts.json ? null : ora("Loading notifications...").start();
21953
+ try {
21954
+ const data = await amikoWebFetch(auth, "/api/notifications", {
21955
+ query: { limit: opts.limit, cursor: opts.cursor }
21956
+ });
21957
+ spinner?.stop();
21958
+ const items = opts.unread ? data.notifications.filter((n) => !n.read) : data.notifications;
21959
+ renderOutput({ ...data, notifications: items }, (d) => {
21960
+ if (!items.length) {
21961
+ console.log(dim(opts.unread ? "No unread notifications." : "No notifications."));
21962
+ return;
21963
+ }
21964
+ const headerSuffix = d.unread_count !== undefined ? ` — ${d.unread_count} unread` : "";
21965
+ console.log(heading(`Notifications — ${items.length}${headerSuffix}`));
21966
+ for (const n of items) {
21967
+ console.log("");
21968
+ console.log(label("ID", n.id));
21969
+ console.log(label("Type", n.type));
21970
+ if (n.title)
21971
+ console.log(label("Title", n.title));
21972
+ if (n.message)
21973
+ console.log(n.message);
21974
+ console.log(label("Created", n.created_at.slice(0, 19)));
21975
+ if (!n.read)
21976
+ console.log(dim("• unread"));
21977
+ }
21978
+ if (d.has_more && d.next_cursor) {
21979
+ console.log("");
21980
+ console.log(dim(`Older available — pass --cursor ${d.next_cursor}`));
21981
+ }
21982
+ }, { json: opts.json });
21983
+ } catch (e) {
21984
+ spinner?.stop();
21985
+ console.error(error(e instanceof Error ? e.message : String(e)));
21986
+ process.exit(1);
21987
+ }
21988
+ });
21989
+ program2.command("read").description("Mark a notification as read (or --all for everything)").option("--id <notificationId>", "Notification id to mark read").option("--all", "Mark all notifications as read").option("--json", "Output as JSON").action(async (opts) => {
21990
+ if (!opts.id && !opts.all) {
21991
+ console.error(error("Pass --id <notificationId> or --all"));
21992
+ process.exit(1);
21993
+ }
21994
+ const auth = resolveAuth();
21995
+ const spinner = opts.json ? null : ora("Marking read...").start();
21996
+ try {
21997
+ const data = await amikoWebFetch(auth, "/api/notifications", {
21998
+ method: "PATCH",
21999
+ body: opts.all ? { markAllAsRead: true } : { notificationId: opts.id }
22000
+ });
22001
+ spinner?.stop();
22002
+ if (opts.json) {
22003
+ console.log(JSON.stringify(data, null, 2));
22004
+ return;
22005
+ }
22006
+ console.log(success(data.message));
22007
+ } catch (e) {
22008
+ spinner?.stop();
22009
+ console.error(error(e instanceof Error ? e.message : String(e)));
22010
+ process.exit(1);
22011
+ }
22012
+ });
22013
+ }
22014
+
21948
22015
  // src/commands/wallets.ts
21949
22016
  function formatBalance(b) {
21950
22017
  const n = Number(b.amount) / 10 ** b.decimals;
@@ -22160,6 +22227,7 @@ var post = program2.command("post").description("Create posts and comments on th
22160
22227
  var review = program2.command("review").description("Review queue — list, approve, or reject twin-drafted comments");
22161
22228
  var composio = program2.command("composio").description("Manage Composio app connections");
22162
22229
  var conversation = program2.command("conversation").description("Conversations — list, find, create, send messages between users/agents");
22230
+ var notifications = program2.command("notifications").description("Platform notifications — list, mark as read");
22163
22231
  registerCreditsCommand(program2);
22164
22232
  registerSearchCommand(markets);
22165
22233
  registerImageCommand(markets);
@@ -22186,4 +22254,5 @@ registerPostCommand(post);
22186
22254
  registerReviewCommand(review);
22187
22255
  registerComposioCommand(composio);
22188
22256
  registerConversationCommand(conversation);
22257
+ registerNotificationsCommand(notifications);
22189
22258
  program2.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyamiko/amiko-cli",
3
- "version": "0.9.6-beta.2",
3
+ "version": "0.9.6-beta.4",
4
4
  "description": "Amiko CLI — swap tokens, manage credits, bridge cross-chain, and call marketplace agents",
5
5
  "type": "module",
6
6
  "bin": {
package/skills/SKILL.md CHANGED
@@ -33,6 +33,7 @@ Each row is a first-level command group or command. Start here when the user ask
33
33
  | `amiko feed` | Read the friends feed, for-you feed, or filter by hashtag |
34
34
  | `amiko composio <cmd>` | Connect / disconnect third-party OAuth apps (Gmail, GitHub, …) |
35
35
  | `amiko conversation <cmd>` | DM/chat — list, find, create, send messages |
36
+ | `amiko notifications <cmd>` | Platform notifications — list, mark as read |
36
37
  | `amiko accounts` | Show the resolved identity (authenticated, userId, twinId, platform) |
37
38
  | `amiko info` | Show the active twin (name, description, public, voice, avatar) |
38
39
  | `amiko config <cmd>` | Show resolved config |
@@ -281,6 +282,18 @@ amiko conversation send --id <id> --message "agent reply" --as-agent # send as
281
282
  - `send` posts to amiko-web's `POST /api/conversations/<id>/messages` with the Clawd twin token. The server persists the message and fans it out to other participants via the WebSocket broadcast.
282
283
  - `--user-id` expects the **internal** user id (the one returned by `amiko users search`), not a Privy DID or handle.
283
284
 
285
+ ## Notifications
286
+
287
+ ```bash
288
+ amiko notifications list # recent platform notifications (default 20)
289
+ amiko notifications list --unread # only unread
290
+ amiko notifications list --cursor <iso> # page older items
291
+ amiko notifications read --id <notificationId> # mark one read
292
+ amiko notifications read --all # mark all read
293
+ ```
294
+
295
+ Platform notifications cover friend requests, mentions, system alerts, and other activity that doesn't belong to any conversation. Use this when the user asks "any notifications?" or "what's new on the platform?". Notifications belonging to a conversation (new DM, comment on your post) still show up here when the platform writes one — they don't replace `conversation read` for actual chat content.
296
+
284
297
  ## Composio
285
298
 
286
299
  ```bash