@gobi-ai/cli 0.9.11 → 0.9.12

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": "0.9.11",
7
+ "version": "0.9.12",
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": "0.9.11",
12
+ "version": "0.9.12",
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": "0.9.11",
4
+ "version": "0.9.12",
5
5
  "author": {
6
6
  "name": "gobi-ai"
7
7
  },
@@ -259,4 +259,89 @@ export function registerBrainCommand(program) {
259
259
  }
260
260
  console.log(`Brain update ${updateId} deleted.`);
261
261
  });
262
+ // ── Update Replies (get-update, reply-to-update, edit-update-reply, delete-update-reply) ──
263
+ brain
264
+ .command("get-update <updateId>")
265
+ .description("Get a brain update and its replies (paginated).")
266
+ .option("--limit <number>", "Replies per page", "20")
267
+ .option("--cursor <string>", "Pagination cursor from previous response")
268
+ .option("--full", "Show full reply content without truncation")
269
+ .action(async (updateId, opts) => {
270
+ const params = {
271
+ limit: parseInt(opts.limit, 10),
272
+ };
273
+ if (opts.cursor)
274
+ params.cursor = opts.cursor;
275
+ const resp = (await apiGet(`/brain-updates/${updateId}`, params));
276
+ const data = unwrapResp(resp);
277
+ const pagination = (resp.pagination || {});
278
+ if (isJsonMode(brain)) {
279
+ jsonOut({ ...data, pagination });
280
+ return;
281
+ }
282
+ const update = (data.update || data);
283
+ const replies = (data.replies || []);
284
+ const author = update.author?.name ||
285
+ `User ${update.authorId}`;
286
+ const vault = update.vault?.vaultSlug || "?";
287
+ const replyLines = [];
288
+ for (const r of replies) {
289
+ const rAuthor = r.author?.name ||
290
+ `User ${r.authorId}`;
291
+ const text = r.content;
292
+ const truncated = opts.full || text.length <= 200 ? text : text.slice(0, 200) + "\u2026";
293
+ replyLines.push(` - ${rAuthor}: ${truncated} (${r.createdAt})`);
294
+ }
295
+ const output = [
296
+ `Brain Update: ${update.title || "(no title)"}`,
297
+ `By: ${author} (vault: ${vault}) on ${update.createdAt}`,
298
+ "",
299
+ update.content,
300
+ "",
301
+ `Replies (${replies.length} items):`,
302
+ ...replyLines,
303
+ ...(pagination.hasMore
304
+ ? [` Next cursor: ${pagination.nextCursor}`]
305
+ : []),
306
+ ].join("\n");
307
+ console.log(output);
308
+ });
309
+ brain
310
+ .command("reply-to-update <updateId>")
311
+ .description("Reply to a brain update.")
312
+ .requiredOption("--content <content>", 'Reply content (markdown supported, use "-" for stdin)')
313
+ .action(async (updateId, opts) => {
314
+ const content = opts.content === "-" ? readFileSync("/dev/stdin", "utf8") : opts.content;
315
+ const resp = (await apiPost(`/brain-updates/${updateId}/replies`, { content }));
316
+ const reply = unwrapResp(resp);
317
+ if (isJsonMode(brain)) {
318
+ jsonOut(reply);
319
+ return;
320
+ }
321
+ console.log(`Reply created!\n ID: ${reply.id}\n Created: ${reply.createdAt}`);
322
+ });
323
+ brain
324
+ .command("edit-update-reply <replyId>")
325
+ .description("Edit a brain update reply. You must be the author.")
326
+ .requiredOption("--content <content>", "New content for the reply (markdown supported)")
327
+ .action(async (replyId, opts) => {
328
+ const resp = (await apiPatch(`/brain-updates/replies/${replyId}`, { content: opts.content }));
329
+ const reply = unwrapResp(resp);
330
+ if (isJsonMode(brain)) {
331
+ jsonOut(reply);
332
+ return;
333
+ }
334
+ console.log(`Reply edited!\n ID: ${reply.id}\n Edited: ${reply.editedAt}`);
335
+ });
336
+ brain
337
+ .command("delete-update-reply <replyId>")
338
+ .description("Delete a brain update reply. You must be the author.")
339
+ .action(async (replyId) => {
340
+ await apiDelete(`/brain-updates/replies/${replyId}`);
341
+ if (isJsonMode(brain)) {
342
+ jsonOut({ replyId });
343
+ return;
344
+ }
345
+ console.log(`Brain update reply ${replyId} deleted.`);
346
+ });
262
347
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobi-ai/cli",
3
- "version": "0.9.11",
3
+ "version": "0.9.12",
4
4
  "description": "CLI client for the Gobi collaborative knowledge platform",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -6,19 +6,23 @@ 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
- list-updates [options] List recent brain updates. Without --space-slug, lists all updates for you. With --space-slug, lists updates for that space. Use --mine to show only updates by
17
- you.
18
- post-update [options] Post a brain update for a vault.
19
- edit-update [options] <updateId> Edit a published brain update. You must be the author.
20
- delete-update <updateId> Delete a published brain update. You must be the author.
21
- 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
+ list-updates [options] List recent brain updates. Without --space-slug, lists all updates for you. With --space-slug, lists updates for that space. Use --mine to show only updates
17
+ by you.
18
+ post-update [options] Post a brain update for a vault.
19
+ edit-update [options] <updateId> Edit a published brain update. You must be the author.
20
+ delete-update <updateId> Delete a published brain update. You must be the author.
21
+ get-update [options] <updateId> Get a brain update and its replies (paginated).
22
+ reply-to-update [options] <updateId> Reply to a brain update.
23
+ edit-update-reply [options] <replyId> Edit a brain update reply. You must be the author.
24
+ delete-update-reply <replyId> Delete a brain update reply. You must be the author.
25
+ help [command] display help for command
22
26
  ```
23
27
 
24
28
  ## search
@@ -126,3 +130,52 @@ Delete a published brain update. You must be the author.
126
130
  Options:
127
131
  -h, --help display help for command
128
132
  ```
133
+
134
+ ## get-update
135
+
136
+ ```
137
+ Usage: gobi brain get-update [options] <updateId>
138
+
139
+ Get a brain update and its replies (paginated).
140
+
141
+ Options:
142
+ --limit <number> Replies per page (default: "20")
143
+ --cursor <string> Pagination cursor from previous response
144
+ --full Show full reply content without truncation
145
+ -h, --help display help for command
146
+ ```
147
+
148
+ ## reply-to-update
149
+
150
+ ```
151
+ Usage: gobi brain reply-to-update [options] <updateId>
152
+
153
+ Reply to a brain update.
154
+
155
+ Options:
156
+ --content <content> Reply content (markdown supported, use "-" for stdin)
157
+ -h, --help display help for command
158
+ ```
159
+
160
+ ## edit-update-reply
161
+
162
+ ```
163
+ Usage: gobi brain edit-update-reply [options] <replyId>
164
+
165
+ Edit a brain update reply. You must be the author.
166
+
167
+ Options:
168
+ --content <content> New content for the reply (markdown supported)
169
+ -h, --help display help for command
170
+ ```
171
+
172
+ ## delete-update-reply
173
+
174
+ ```
175
+ Usage: gobi brain delete-update-reply [options] <replyId>
176
+
177
+ Delete a brain update reply. You must be the author.
178
+
179
+ Options:
180
+ -h, --help display help for command
181
+ ```