@heyamiko/amiko-cli 0.14.0-beta.21 → 0.14.0-beta.22
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 +6 -0
- package/dist/index.js +34 -0
- package/package.json +1 -1
- package/skills/SKILL.md +4 -2
package/README.md
CHANGED
|
@@ -266,6 +266,7 @@ amiko chat receipts <messageId> # who read your message + when
|
|
|
266
266
|
amiko chat pin <messageId> --yes # pin for everyone (id from `chat read`; groups: admins only)
|
|
267
267
|
amiko chat unpin <messageId> --yes # remove a pin for everyone
|
|
268
268
|
amiko chat pinned "Trip planning" # list a conversation's pinned messages, oldest first
|
|
269
|
+
amiko chat mark-read --all --yes # mark EVERY conversation as read (clears all unread badges)
|
|
269
270
|
```
|
|
270
271
|
|
|
271
272
|
- **`<target>`** for `read`/`send` is a **conversation id** (from `chat list` — use this for groups), a **user id**, an **`@handle`**, or a **name**. Names resolve against your **friends first**, then people search; if ambiguous, the CLI lists candidates instead of guessing. A cuid that isn't one of your conversations is retried as a user id, so pasting a user id "just works".
|
|
@@ -276,6 +277,7 @@ amiko chat pinned "Trip planning" # list a conversation's pinned
|
|
|
276
277
|
- `chat send` messages a real person, so it's **gated on `--yes`** in non-interactive shells. Delivery is real-time. `--raw` prints raw JSON on any subcommand.
|
|
277
278
|
- **`chat receipts <messageId>`** shows read receipts for **your own** messages (server-enforced; 403 otherwise): sent time, who read it with each person's first-read time, and who it was delivered to but hasn't read. Reads from before receipts tracking show as "exact time unknown". Read-only, ungated.
|
|
278
279
|
- **Pinned messages**: `chat pin <messageId>` pins for the **whole conversation** (the chat sees an "X pinned a message" announcement) and `chat unpin <messageId>` removes it for everyone — both gated on `--yes`. In **groups** only admins can pin/unpin (403 otherwise); in DMs either side can. Max 20 pins per conversation. `chat pinned <target>` (same targets as `read`; never creates a DM) lists them oldest-first with each message's id and pinner — read-only, ungated.
|
|
280
|
+
- **Mark all read**: `chat mark-read --all` marks every conversation as read in one call — unread badges clear on all your devices, your chat/mention notifications clear, and senders see read ticks on their messages. Irreversible (there is no "mark unread"), so it's gated on `--yes` in non-interactive shells. `--all` is required (mirrors `notifications read --all`); `--raw` prints the server payload.
|
|
279
281
|
|
|
280
282
|
### Group chats
|
|
281
283
|
|
|
@@ -601,6 +603,10 @@ npm publish
|
|
|
601
603
|
|
|
602
604
|
## Changelog
|
|
603
605
|
|
|
606
|
+
### 0.14.0-beta.22
|
|
607
|
+
|
|
608
|
+
- **Mark all conversations read: `amiko chat mark-read --all`.** Hits `POST /api/conversations/read-all` as the owner — bulk monotonic `last_read_at` update across every active membership, clears the owner's unread chat/mention notifications (count echoed as "N chat notifications cleared"), busts the per-user conversation cache, and broadcasts read ticks to peers in up to 50 most-recently-active unread conversations. Requires `--all` explicitly (mirrors `notifications read --all`) and sits behind the destructive `--yes` gate — irreversible, and senders see read ticks. `--raw` prints the server payload; success copy never counts conversations (the response's id list is capped at 50). Requires the companion amiko-web read-all deploy (`leandrogavidia/global-quick-fixes`).
|
|
609
|
+
|
|
604
610
|
### 0.14.0-beta.21
|
|
605
611
|
|
|
606
612
|
- **Chat GIFs: `amiko chat gifs [query]` + `amiko chat send --gif <queryOrUrl>`.** `chat gifs` browses Klipy GIFs via the platform proxy (`GET /api/gifs`; trending with no query, `--page`/`--limit`/`--raw`, "Powered by KLIPY") — read-only and ungated. `chat send --gif` attaches a GIF to a message: search words send the top result, a Klipy URL (from `chat gifs`) attaches exactly, and non-Klipy URLs are refused. Sends use the cross-client GIF contract — Klipy mp4/webm → `message_type: "video"` + `metadata.videos`, `.gif` → `"image"` + `metadata.images`, each record `{url, name, contentType, kind: "gif", width?, height?}` — so web/desktop/mobile render a looping watermarked GIF. The `<message>` positional is now optional when `--gif` is present (`content` falls back to `"GIF"`); captions ride as `metadata.image_caption`, which the `--image` path now also sets so image captions actually display in bubbles. One media block per message (`--image`/`--audio`/`--gif` are mutually exclusive). Requires the companion amiko-web `feat/chat-gif-picker` deploy (`GET /api/gifs`) — the twin token already authenticates against it, so no other backend work is needed.
|
package/dist/index.js
CHANGED
|
@@ -28438,6 +28438,40 @@ function registerChatCommand(chat) {
|
|
|
28438
28438
|
}
|
|
28439
28439
|
}
|
|
28440
28440
|
});
|
|
28441
|
+
chat.command("mark-read").description("Mark ALL conversations as read (requires --all). Clears every unread badge on the owner's devices; senders see read ticks.").option("--all", "Mark every conversation as read").option("--yes", "Skip the confirmation (required in non-interactive shells)").option("--raw", "Output raw JSON").action(async (opts) => {
|
|
28442
|
+
if (!opts.all) {
|
|
28443
|
+
console.error(error("Pass --all to mark every conversation as read"));
|
|
28444
|
+
process.exit(1);
|
|
28445
|
+
}
|
|
28446
|
+
const auth = authOrExit();
|
|
28447
|
+
await confirmDestructive({
|
|
28448
|
+
action: "Mark ALL of the owner's conversations as read",
|
|
28449
|
+
detail: "Clears every unread badge on web and mobile; senders see read ticks on their messages. This cannot be undone.",
|
|
28450
|
+
yes: opts.yes,
|
|
28451
|
+
commandExample: "amiko chat mark-read --all"
|
|
28452
|
+
});
|
|
28453
|
+
let data;
|
|
28454
|
+
try {
|
|
28455
|
+
data = await amikoWebFetch(auth, "/api/conversations/read-all", {
|
|
28456
|
+
method: "POST",
|
|
28457
|
+
timeoutMs: 20000
|
|
28458
|
+
});
|
|
28459
|
+
} catch (e5) {
|
|
28460
|
+
console.error(error(e5 instanceof Error ? e5.message : "Failed to mark all as read"));
|
|
28461
|
+
process.exit(1);
|
|
28462
|
+
}
|
|
28463
|
+
if (opts.raw) {
|
|
28464
|
+
console.log(JSON.stringify(data, null, 2));
|
|
28465
|
+
return;
|
|
28466
|
+
}
|
|
28467
|
+
console.log(success("All conversations marked as read."));
|
|
28468
|
+
const cleared = data.cleared_notifications;
|
|
28469
|
+
if (typeof cleared === "number" && cleared > 0) {
|
|
28470
|
+
console.log(dim(` ${cleared} chat notification${cleared === 1 ? "" : "s"} cleared`));
|
|
28471
|
+
} else if ((data.unread_conversation_ids ?? []).length === 0) {
|
|
28472
|
+
console.log(dim(" Nothing was unread."));
|
|
28473
|
+
}
|
|
28474
|
+
});
|
|
28441
28475
|
registerChatGifsCommand(chat);
|
|
28442
28476
|
const group = chat.command("group").description("Group chats — create, list, info, rename, add/remove members, @all permission, leave");
|
|
28443
28477
|
registerChatGroupCommand(group);
|
package/package.json
CHANGED
package/skills/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: amiko-cli
|
|
3
|
-
description: The Amiko CLI lets an agent act on the Amiko platform end-to-end — read platform notifications (friend requests, mentions, system alerts), search and write **cross-agent memories** about the owner (what other agents already know — preferences, decisions, facts), manage Solana/Base wallets (create, swap via Jupiter, bridge USDC via Across, transfer tokens to external addresses), top up and spend credits, generate media — images, video, speech, music, and SFX — via Create Studio (`amiko create`, async and charged on success), call paid MPP marketplace services (X/Twitter search, Amazon product search, TTS/STT, AI chat), manage the twin's identity and drive (files, folders, RAG), voice and avatar, and social graph (friends, posts, comments, feed). Auth is automatic when run from the agent's workspace folder; payments are platform-custodied (no keys on disk). The owner's DMs and group chats are `amiko chat` (list / read / send / create + manage group chats AS the owner, including sending GIFs (`chat gifs` search + `chat send --gif`), sharing a group's invite/join link + QR and @all group announcements, 人对人); the agent's OWN sessions are the openhermit gateway's session_list / session_send (AS the agent) — different identities, different surfaces. Use this skill whenever the user asks about their Amiko notifications, chats/DMs, drive, memory, social graph, wallets, credits, or marketplace services — anything that would show up in their Amiko account or cost AMIKO/credits.
|
|
3
|
+
description: The Amiko CLI lets an agent act on the Amiko platform end-to-end — read platform notifications (friend requests, mentions, system alerts), search and write **cross-agent memories** about the owner (what other agents already know — preferences, decisions, facts), manage Solana/Base wallets (create, swap via Jupiter, bridge USDC via Across, transfer tokens to external addresses), top up and spend credits, generate media — images, video, speech, music, and SFX — via Create Studio (`amiko create`, async and charged on success), call paid MPP marketplace services (X/Twitter search, Amazon product search, TTS/STT, AI chat), manage the twin's identity and drive (files, folders, RAG), voice and avatar, and social graph (friends, posts, comments, feed). Auth is automatic when run from the agent's workspace folder; payments are platform-custodied (no keys on disk). The owner's DMs and group chats are `amiko chat` (list / read / send / mark everything read / create + manage group chats AS the owner, including sending GIFs (`chat gifs` search + `chat send --gif`), sharing a group's invite/join link + QR and @all group announcements, 人对人); the agent's OWN sessions are the openhermit gateway's session_list / session_send (AS the agent) — different identities, different surfaces. Use this skill whenever the user asks about their Amiko notifications, chats/DMs, drive, memory, social graph, wallets, credits, or marketplace services — anything that would show up in their Amiko account or cost AMIKO/credits.
|
|
4
4
|
homepage: https://platform.heyamiko.com
|
|
5
5
|
metadata: {"openclaw":{"emoji":"🤖","requires":{"bins":["node"]}}}
|
|
6
6
|
---
|
|
@@ -40,6 +40,7 @@ Call your shell tool (your runtime calls it `bash`, `shell`, `run`, or similar)
|
|
|
40
40
|
| "did Sophie read my message about the demo?" | shell → `amiko chat read "Sophie"` (find the owner's message, copy its `id`) → `amiko chat receipts <messageId>` |
|
|
41
41
|
| "pin that hackathon message in the builders group" | shell → `amiko chat read "<group>"` (find the message, copy its `id`) → `amiko chat pin <messageId> --yes` |
|
|
42
42
|
| "what's pinned in the team chat?" | shell → `amiko chat pinned "<group>"` |
|
|
43
|
+
| "mark all my chats as read" | shell → `amiko chat mark-read --all --yes` (after the owner confirms — it clears every badge and senders see read ticks) |
|
|
43
44
|
| "what can amiko do?" | shell → `amiko --help` |
|
|
44
45
|
| "what's my MiniMax / ElevenLabs voice id?" | shell → `amiko info` |
|
|
45
46
|
| "speak with my cloned MiniMax voice" | shell → `amiko info`, quote the cost, obtain explicit approval, then run `amiko create tts "…" --provider minimax --voice <minimax_voice_id> --yes` |
|
|
@@ -59,7 +60,7 @@ Discover everything via `amiko --help`. Groups: `markets` (paid MPP services), `
|
|
|
59
60
|
|
|
60
61
|
## Critical Rules
|
|
61
62
|
|
|
62
|
-
1. **Every paid / value-moving command is hard-gated on `--yes` in a non-interactive shell.** The CLI refuses to run `markets *`, `create *`, `card mint`, `credits topup`, `wallets swap send`, `wallets bridge send`, `wallets transfer` unless `--yes` is passed. The refusal prints the cost and the re-run command. **Quote the cost, get explicit approval, THEN append `--yes`.** The same `--yes` gate also covers **free outward social actions** — `chat send`, `chat pin` (the whole chat sees a pinned-message announcement), `chat group create`, `chat group add` (real people see them, so get the owner's explicit approval for the action itself) — and **destructive ops** like `chat unpin` (removes the pin for everyone), `chat group remove/leave/rename/promote/mention-all`, `twin update --public`, `drive delete`, `drive share` / `drive folder share` (exposes the file — or the folder's ENTIRE subtree — to anyone with the link), `friends remove`, `friends reports request`, `avatar update`, `voice reset`, `review reject`. **For these free actions never mention cost, never say "the cost is 0", and never call it a paid operation** — ask for plain confirmation of the action itself (e.g. "Send "hi" to Mars — go ahead?").
|
|
63
|
+
1. **Every paid / value-moving command is hard-gated on `--yes` in a non-interactive shell.** The CLI refuses to run `markets *`, `create *`, `card mint`, `credits topup`, `wallets swap send`, `wallets bridge send`, `wallets transfer` unless `--yes` is passed. The refusal prints the cost and the re-run command. **Quote the cost, get explicit approval, THEN append `--yes`.** The same `--yes` gate also covers **free outward social actions** — `chat send`, `chat pin` (the whole chat sees a pinned-message announcement), `chat group create`, `chat group add` (real people see them, so get the owner's explicit approval for the action itself) — and **destructive ops** like `chat unpin` (removes the pin for everyone), `chat mark-read --all` (irreversibly marks every conversation read — senders see read ticks), `chat group remove/leave/rename/promote/mention-all`, `twin update --public`, `drive delete`, `drive share` / `drive folder share` (exposes the file — or the folder's ENTIRE subtree — to anyone with the link), `friends remove`, `friends reports request`, `avatar update`, `voice reset`, `review reject`. **For these free actions never mention cost, never say "the cost is 0", and never call it a paid operation** — ask for plain confirmation of the action itself (e.g. "Send "hi" to Mars — go ahead?").
|
|
63
64
|
2. **After every paid command, report the remaining balance.** The CLI prints a `Balance: N credits` line — include that figure in your reply.
|
|
64
65
|
3. **Never retry a failed command.** Report and stop. Every paid call costs tokens even on failure.
|
|
65
66
|
4. **Auth is automatic.** Never suggest `amiko login` / `amiko connect`. Run from the agent's workspace folder; if anything looks off, `amiko accounts` shows the resolved `userId` / `twinId`.
|
|
@@ -157,6 +158,7 @@ MiniMax Hailuo is silent — there is no CLI mux step to attach a separate music
|
|
|
157
158
|
- **Reactions** — `amiko chat react <messageId> <emoji>`, `amiko chat unreact <messageId>`, `amiko chat reactions <messageId>`. The owner **won't give you a message id** — they'll say something like *"react to the latest Ava message about the team with a heart"*. Get ids from `amiko chat read <target>`: it prints each message's `id` and any existing reactions — match the message by its **content**, then act on that id. `react` adds (or replaces) your reaction — **one per message**, a new emoji replaces the previous one, and re-reacting the same emoji is a no-op (use `unreact` to remove). Pass the **actual emoji character** (`❤️`, `👍`, `😂`). `react`/`unreact` are outward (other people see them), so `--yes` is required in non-interactive shells and the confirmation shows a preview of the target message; `reactions` (read) is ungated. These act **as the owner** (人对人), just like `chat send` — not the twin's own `session_*`.
|
|
158
159
|
- **Read receipts** — `amiko chat receipts <messageId>` shows when the message was sent, who has read it (with each person's first-read time), and who it was delivered to but hasn't read yet. **Only works for messages the owner sent** (server-enforced) — a 403 means it wasn't the owner's message; report that, don't retry. Get the id from `amiko chat read <target>`, matching the message by its **content**. Read-only and ungated, like `reactions`. Rows marked "exact time unknown" were read before receipts tracking existed — never invent a time for them.
|
|
159
160
|
- **Pinned messages** — `amiko chat pin <messageId>`, `amiko chat unpin <messageId>`, `amiko chat pinned <target>`. Pins are **conversation-wide**: everyone sees them, and `pin` posts an "X pinned a message" announcement to the whole chat, so both `pin` and `unpin` are `--yes`-gated with a preview of the target message. The owner won't give you a message id — get it from `amiko chat read <target>` (or `amiko chat pinned <target>` when unpinning), matching by **content**. In **groups** only admins can pin/unpin (a 403 names that rule; check roles with `amiko chat group info`, report it, don't retry); in DMs either side can. Max 20 pins per conversation — a "Pin limit reached" error means unpin one first, ask the owner which. Re-pinning an already-pinned message is a harmless no-op. `pinned <target>` is an ungated read (same targets as `chat read`: conversation id, user id, `@handle`, or name; it never creates a DM) listing pins oldest-first with each message's `id` and who pinned it.
|
|
161
|
+
- **Mark all read** — `amiko chat mark-read --all` marks EVERY conversation read as the owner in one shot: unread badges clear on all the owner's devices, the owner's chat/mention notifications clear, and senders see read ticks on their messages (the ~50 most recent conversations flip live; the rest on their next refresh). Irreversible — there is no "mark unread" — so it's `--yes`-gated: only run it when the owner explicitly asks to clear everything, never as routine tidying. The success line won't say how many conversations were affected (the server doesn't report a full count); don't invent a number.
|
|
160
162
|
|
|
161
163
|
### Group chats — `amiko chat group`
|
|
162
164
|
|