@rine-network/cli 0.9.3 → 0.9.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/main.js +10 -2
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -1006,7 +1006,7 @@ function inboxRow(m) {
|
|
|
1006
1006
|
From: msgFrom(m),
|
|
1007
1007
|
Group: msgGroup(m),
|
|
1008
1008
|
Type: m.type,
|
|
1009
|
-
|
|
1009
|
+
Status: (m.status ?? "new").toUpperCase(),
|
|
1010
1010
|
Created: m.created_at
|
|
1011
1011
|
};
|
|
1012
1012
|
}
|
|
@@ -1126,9 +1126,17 @@ function addMessageCommands(parent, program) {
|
|
|
1126
1126
|
Created: data.created_at
|
|
1127
1127
|
}]);
|
|
1128
1128
|
}));
|
|
1129
|
-
parent.command("inbox").description("List inbox messages").option("--agent <id>", "Agent ID (defaults to your agent)").option("--limit <n>", "Maximum number of messages to return").option("--cursor <cursor>", "Pagination cursor").action(withClient(program, async ({ client, gOpts, apiUrl }, opts) => {
|
|
1129
|
+
parent.command("inbox").description("List inbox messages").option("--agent <id>", "Agent ID (defaults to your agent)").option("--new", "Show only new (undelivered) messages").option("--delivered", "Show only delivered messages").option("--read", "Show only read messages").option("--limit <n>", "Maximum number of messages to return").option("--cursor <cursor>", "Pagination cursor").action(withClient(program, async ({ client, gOpts, apiUrl }, opts) => {
|
|
1130
|
+
if ([
|
|
1131
|
+
opts.new,
|
|
1132
|
+
opts.delivered,
|
|
1133
|
+
opts.read
|
|
1134
|
+
].filter(Boolean).length > 1) throw new Error("Only one of --new, --delivered, --read can be specified");
|
|
1130
1135
|
const agentId = await resolveAgent(apiUrl, await fetchAgents(client), opts.agent, gOpts.as);
|
|
1131
1136
|
const params = {};
|
|
1137
|
+
if (opts.new) params.status = "new";
|
|
1138
|
+
else if (opts.delivered) params.status = "delivered";
|
|
1139
|
+
else if (opts.read) params.status = "read";
|
|
1132
1140
|
if (opts.limit) params.limit = opts.limit;
|
|
1133
1141
|
if (opts.cursor) params.cursor = opts.cursor;
|
|
1134
1142
|
const data = await client.get(`/agents/${agentId}/messages`, params);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rine-network/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "CLI client for rine.network \u2014 EU-first messaging infrastructure for AI agents",
|
|
5
5
|
"author": "mmmbs <mmmbs@proton.me>",
|
|
6
6
|
"license": "EUPL-1.2",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dev": "tsx src/main.ts"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@rine-network/core": "^0.4.
|
|
31
|
+
"@rine-network/core": "^0.4.3",
|
|
32
32
|
"commander": "^12.0.0",
|
|
33
33
|
"eventsource-client": "^1.1.0"
|
|
34
34
|
},
|