@gobi-ai/cli 1.2.0 → 1.3.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.
@@ -4,12 +4,12 @@
4
4
  "name": "gobi-ai"
5
5
  },
6
6
  "description": "Claude Code plugin for the Gobi collaborative knowledge platform CLI",
7
- "version": "1.2.0",
7
+ "version": "1.3.1",
8
8
  "plugins": [
9
9
  {
10
10
  "name": "gobi",
11
11
  "description": "Manage the Gobi collaborative knowledge platform from the command line. Search and ask brains, publish brain documents, create threads, manage sessions, generate images and videos.",
12
- "version": "1.2.0",
12
+ "version": "1.3.1",
13
13
  "author": {
14
14
  "name": "gobi-ai"
15
15
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gobi",
3
3
  "description": "Manage the Gobi collaborative knowledge platform from the command line",
4
- "version": "1.2.0",
4
+ "version": "1.3.1",
5
5
  "author": {
6
6
  "name": "gobi-ai"
7
7
  },
package/README.md CHANGED
@@ -94,7 +94,9 @@ Public brains are accessible at `https://gobispace.com/@{vaultSlug}`.
94
94
  |---------|-------------|
95
95
  | `gobi feed list` | List recent brain updates from the global public feed |
96
96
  | `gobi feed get <updateId>` | Get a feed brain update and its replies |
97
- | `gobi feed reply <updateId> --content <c>` | Reply to a brain update in the feed |
97
+ | `gobi feed post-reply <updateId> --content <c>` | Post a reply to a brain update in the feed |
98
+ | `gobi feed edit-reply <replyId> --content <c>` | Edit a reply you authored |
99
+ | `gobi feed delete-reply <replyId>` | Delete a reply you authored |
98
100
 
99
101
  `feed list` and `feed get` accept `--limit`/`--cursor` for pagination.
100
102
 
@@ -213,89 +213,4 @@ export function registerBrainCommand(program) {
213
213
  }
214
214
  console.log(`Brain update ${updateId} deleted.`);
215
215
  });
216
- // ── Update Replies (get-update, reply-to-update, edit-update-reply, delete-update-reply) ──
217
- brain
218
- .command("get-update <updateId>")
219
- .description("Get a brain update and its replies (paginated).")
220
- .option("--limit <number>", "Replies per page", "20")
221
- .option("--cursor <string>", "Pagination cursor from previous response")
222
- .option("--full", "Show full reply content without truncation")
223
- .action(async (updateId, opts) => {
224
- const params = {
225
- limit: parseInt(opts.limit, 10),
226
- };
227
- if (opts.cursor)
228
- params.cursor = opts.cursor;
229
- const resp = (await apiGet(`/brain-updates/${updateId}`, params));
230
- const data = unwrapResp(resp);
231
- const pagination = (resp.pagination || {});
232
- if (isJsonMode(brain)) {
233
- jsonOut({ ...data, pagination });
234
- return;
235
- }
236
- const update = (data.update || data);
237
- const replies = (data.replies || []);
238
- const author = update.author?.name ||
239
- `User ${update.authorId}`;
240
- const vault = update.vault?.vaultSlug || "?";
241
- const replyLines = [];
242
- for (const r of replies) {
243
- const rAuthor = r.author?.name ||
244
- `User ${r.authorId}`;
245
- const text = r.content;
246
- const truncated = opts.full || text.length <= 200 ? text : text.slice(0, 200) + "\u2026";
247
- replyLines.push(` - ${rAuthor}: ${truncated} (${r.createdAt})`);
248
- }
249
- const output = [
250
- `Brain Update: ${update.title || "(no title)"}`,
251
- `By: ${author} (vault: ${vault}) on ${update.createdAt}`,
252
- "",
253
- update.content,
254
- "",
255
- `Replies (${replies.length} items):`,
256
- ...replyLines,
257
- ...(pagination.hasMore
258
- ? [` Next cursor: ${pagination.nextCursor}`]
259
- : []),
260
- ].join("\n");
261
- console.log(output);
262
- });
263
- brain
264
- .command("reply-to-update <updateId>")
265
- .description("Reply to a brain update.")
266
- .requiredOption("--content <content>", 'Reply content (markdown supported, use "-" for stdin)')
267
- .action(async (updateId, opts) => {
268
- const content = opts.content === "-" ? readFileSync("/dev/stdin", "utf8") : opts.content;
269
- const resp = (await apiPost(`/brain-updates/${updateId}/replies`, { content }));
270
- const reply = unwrapResp(resp);
271
- if (isJsonMode(brain)) {
272
- jsonOut(reply);
273
- return;
274
- }
275
- console.log(`Reply created!\n ID: ${reply.id}\n Created: ${reply.createdAt}`);
276
- });
277
- brain
278
- .command("edit-update-reply <replyId>")
279
- .description("Edit a brain update reply. You must be the author.")
280
- .requiredOption("--content <content>", "New content for the reply (markdown supported)")
281
- .action(async (replyId, opts) => {
282
- const resp = (await apiPatch(`/brain-updates/replies/${replyId}`, { content: opts.content }));
283
- const reply = unwrapResp(resp);
284
- if (isJsonMode(brain)) {
285
- jsonOut(reply);
286
- return;
287
- }
288
- console.log(`Reply edited!\n ID: ${reply.id}\n Edited: ${reply.editedAt}`);
289
- });
290
- brain
291
- .command("delete-update-reply <replyId>")
292
- .description("Delete a brain update reply. You must be the author.")
293
- .action(async (replyId) => {
294
- await apiDelete(`/brain-updates/replies/${replyId}`);
295
- if (isJsonMode(brain)) {
296
- jsonOut({ replyId });
297
- return;
298
- }
299
- console.log(`Brain update reply ${replyId} deleted.`);
300
- });
301
216
  }
@@ -1,5 +1,5 @@
1
1
  import { readFileSync } from "fs";
2
- import { apiGet, apiPost } from "../client.js";
2
+ import { apiGet, apiPost, apiPatch, apiDelete } from "../client.js";
3
3
  import { isJsonMode, jsonOut, unwrapResp } from "./utils.js";
4
4
  export function registerFeedCommand(program) {
5
5
  const feed = program
@@ -22,6 +22,7 @@ export function registerFeedCommand(program) {
22
22
  jsonOut({
23
23
  items: resp.data || [],
24
24
  pagination: resp.pagination || {},
25
+ mentions: resp.mentions || {},
25
26
  });
26
27
  return;
27
28
  }
@@ -63,8 +64,9 @@ export function registerFeedCommand(program) {
63
64
  const resp = (await apiGet(`/feed/${updateId}`, params));
64
65
  const data = unwrapResp(resp);
65
66
  const pagination = (resp.pagination || {});
67
+ const mentions = (resp.mentions || {});
66
68
  if (isJsonMode(feed)) {
67
- jsonOut({ ...data, pagination });
69
+ jsonOut({ ...data, pagination, mentions });
68
70
  return;
69
71
  }
70
72
  const update = (data.update || data);
@@ -98,8 +100,8 @@ export function registerFeedCommand(program) {
98
100
  });
99
101
  // ── Reply ──
100
102
  feed
101
- .command("reply <updateId>")
102
- .description("Reply to a brain update in the feed.")
103
+ .command("post-reply <updateId>")
104
+ .description("Post a reply to a brain update in the feed.")
103
105
  .requiredOption("--content <content>", 'Reply content (markdown supported, use "-" for stdin)')
104
106
  .action(async (updateId, opts) => {
105
107
  const content = opts.content === "-" ? readFileSync("/dev/stdin", "utf8") : opts.content;
@@ -107,10 +109,40 @@ export function registerFeedCommand(program) {
107
109
  content,
108
110
  }));
109
111
  const reply = unwrapResp(resp);
112
+ const mentions = (resp.mentions || {});
110
113
  if (isJsonMode(feed)) {
111
- jsonOut(reply);
114
+ jsonOut({ ...reply, mentions });
112
115
  return;
113
116
  }
114
117
  console.log(`Reply created!\n ID: ${reply.id}\n Created: ${reply.createdAt}`);
115
118
  });
119
+ // ── Edit reply ──
120
+ feed
121
+ .command("edit-reply <replyId>")
122
+ .description("Edit a reply you authored in the feed.")
123
+ .requiredOption("--content <content>", 'New reply content (markdown supported, use "-" for stdin)')
124
+ .action(async (replyId, opts) => {
125
+ const content = opts.content === "-" ? readFileSync("/dev/stdin", "utf8") : opts.content;
126
+ const resp = (await apiPatch(`/brain-updates/replies/${replyId}`, {
127
+ content,
128
+ }));
129
+ const reply = unwrapResp(resp);
130
+ if (isJsonMode(feed)) {
131
+ jsonOut(reply);
132
+ return;
133
+ }
134
+ console.log(`Reply edited!\n ID: ${reply.id}\n Edited: ${reply.editedAt}`);
135
+ });
136
+ // ── Delete reply ──
137
+ feed
138
+ .command("delete-reply <replyId>")
139
+ .description("Delete a reply you authored in the feed.")
140
+ .action(async (replyId) => {
141
+ await apiDelete(`/brain-updates/replies/${replyId}`);
142
+ if (isJsonMode(feed)) {
143
+ jsonOut({ replyId });
144
+ return;
145
+ }
146
+ console.log(`Reply ${replyId} deleted.`);
147
+ });
116
148
  }
@@ -142,8 +142,9 @@ export function registerSpaceCommand(program) {
142
142
  const resp = (await apiGet(`/spaces/${spaceSlug}/threads/${threadId}`, params));
143
143
  const data = unwrapResp(resp);
144
144
  const pagination = (resp.pagination || {});
145
+ const mentions = (resp.mentions || {});
145
146
  if (isJsonMode(space)) {
146
- jsonOut({ ...data, pagination });
147
+ jsonOut({ ...data, pagination, mentions });
147
148
  return;
148
149
  }
149
150
  const thread = (data.thread || data);
@@ -187,6 +188,7 @@ export function registerSpaceCommand(program) {
187
188
  jsonOut({
188
189
  items: resp.data || [],
189
190
  pagination: resp.pagination || {},
191
+ mentions: resp.mentions || {},
190
192
  });
191
193
  return;
192
194
  }
@@ -292,8 +294,9 @@ export function registerSpaceCommand(program) {
292
294
  const spaceSlug = resolveSpaceSlug(space);
293
295
  const resp = (await apiPost(`/spaces/${spaceSlug}/threads/${threadId}/replies`, { content: readContent(opts.content) }));
294
296
  const msg = unwrapResp(resp);
297
+ const mentions = (resp.mentions || {});
295
298
  if (isJsonMode(space)) {
296
- jsonOut(msg);
299
+ jsonOut({ ...msg, mentions });
297
300
  return;
298
301
  }
299
302
  console.log(`Reply created!\n ID: ${msg.id}\n Created: ${msg.createdAt}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobi-ai/cli",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "CLI client for the Gobi collaborative knowledge platform",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -6,21 +6,17 @@ Usage: gobi brain [options] [command]
6
6
  Brain commands (search, ask, publish, unpublish, updates).
7
7
 
8
8
  Options:
9
- -h, --help display help for command
9
+ -h, --help display help for command
10
10
 
11
11
  Commands:
12
- search [options] Search public brains by text and semantic similarity.
13
- ask [options] Ask a brain a question. Creates a targeted session (1:1 conversation).
14
- publish Upload BRAIN.md to the vault root on webdrive. Triggers post-processing (brain sync, metadata update, Discord notification).
15
- unpublish Delete BRAIN.md from the vault on webdrive.
16
- post-update [options] Post a brain update for a vault.
17
- edit-update [options] <updateId> Edit a published brain update. You must be the author.
18
- delete-update <updateId> Delete a published brain update. You must be the author.
19
- get-update [options] <updateId> Get a brain update and its replies (paginated).
20
- reply-to-update [options] <updateId> Reply to a brain update.
21
- edit-update-reply [options] <replyId> Edit a brain update reply. You must be the author.
22
- delete-update-reply <replyId> Delete a brain update reply. You must be the author.
23
- help [command] display help for command
12
+ search [options] Search public brains by text and semantic similarity.
13
+ ask [options] Ask a brain a question. Creates a targeted session (1:1 conversation).
14
+ publish Upload BRAIN.md to the vault root on webdrive. Triggers post-processing (brain sync, metadata update, Discord notification).
15
+ unpublish Delete BRAIN.md from the vault on webdrive.
16
+ post-update [options] Post a brain update for a vault.
17
+ edit-update [options] <updateId> Edit a published brain update. You must be the author.
18
+ delete-update <updateId> Delete a published brain update. You must be the author.
19
+ help [command] display help for command
24
20
  ```
25
21
 
26
22
  ## search
@@ -112,52 +108,3 @@ Delete a published brain update. You must be the author.
112
108
  Options:
113
109
  -h, --help display help for command
114
110
  ```
115
-
116
- ## get-update
117
-
118
- ```
119
- Usage: gobi brain get-update [options] <updateId>
120
-
121
- Get a brain update and its replies (paginated).
122
-
123
- Options:
124
- --limit <number> Replies per page (default: "20")
125
- --cursor <string> Pagination cursor from previous response
126
- --full Show full reply content without truncation
127
- -h, --help display help for command
128
- ```
129
-
130
- ## reply-to-update
131
-
132
- ```
133
- Usage: gobi brain reply-to-update [options] <updateId>
134
-
135
- Reply to a brain update.
136
-
137
- Options:
138
- --content <content> Reply content (markdown supported, use "-" for stdin)
139
- -h, --help display help for command
140
- ```
141
-
142
- ## edit-update-reply
143
-
144
- ```
145
- Usage: gobi brain edit-update-reply [options] <replyId>
146
-
147
- Edit a brain update reply. You must be the author.
148
-
149
- Options:
150
- --content <content> New content for the reply (markdown supported)
151
- -h, --help display help for command
152
- ```
153
-
154
- ## delete-update-reply
155
-
156
- ```
157
- Usage: gobi brain delete-update-reply [options] <replyId>
158
-
159
- Delete a brain update reply. You must be the author.
160
-
161
- Options:
162
- -h, --help display help for command
163
- ```
@@ -8,12 +8,12 @@ description: >-
8
8
  allowed-tools: Bash(gobi:*)
9
9
  metadata:
10
10
  author: gobi-ai
11
- version: "1.2.0"
11
+ version: "1.3.1"
12
12
  ---
13
13
 
14
14
  # gobi-feed
15
15
 
16
- Gobi feed commands for the global brain-update feed (v1.2.0).
16
+ Gobi feed commands for the global brain-update feed (v1.3.1).
17
17
 
18
18
  Requires gobi-cli installed and authenticated. See gobi-core skill for setup.
19
19
 
@@ -6,13 +6,15 @@ Usage: gobi feed [options] [command]
6
6
  Feed of brain updates from people across the platform.
7
7
 
8
8
  Options:
9
- -h, --help display help for command
9
+ -h, --help display help for command
10
10
 
11
11
  Commands:
12
- list [options] List recent brain updates from the global public feed.
13
- get [options] <updateId> Get a feed brain update and its replies (paginated).
14
- reply [options] <updateId> Reply to a brain update in the feed.
15
- help [command] display help for command
12
+ list [options] List recent brain updates from the global public feed.
13
+ get [options] <updateId> Get a feed brain update and its replies (paginated).
14
+ post-reply [options] <updateId> Post a reply to a brain update in the feed.
15
+ edit-reply [options] <replyId> Edit a reply you authored in the feed.
16
+ delete-reply <replyId> Delete a reply you authored in the feed.
17
+ help [command] display help for command
16
18
  ```
17
19
 
18
20
  ## list
@@ -42,14 +44,37 @@ Options:
42
44
  -h, --help display help for command
43
45
  ```
44
46
 
45
- ## reply
47
+ ## post-reply
46
48
 
47
49
  ```
48
- Usage: gobi feed reply [options] <updateId>
50
+ Usage: gobi feed post-reply [options] <updateId>
49
51
 
50
- Reply to a brain update in the feed.
52
+ Post a reply to a brain update in the feed.
51
53
 
52
54
  Options:
53
55
  --content <content> Reply content (markdown supported, use "-" for stdin)
54
56
  -h, --help display help for command
55
57
  ```
58
+
59
+ ## edit-reply
60
+
61
+ ```
62
+ Usage: gobi feed edit-reply [options] <replyId>
63
+
64
+ Edit a reply you authored in the feed.
65
+
66
+ Options:
67
+ --content <content> New reply content (markdown supported, use "-" for stdin)
68
+ -h, --help display help for command
69
+ ```
70
+
71
+ ## delete-reply
72
+
73
+ ```
74
+ Usage: gobi feed delete-reply [options] <replyId>
75
+
76
+ Delete a reply you authored in the feed.
77
+
78
+ Options:
79
+ -h, --help display help for command
80
+ ```