@gobi-ai/cli 2.0.15 → 2.0.16

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": "2.0.15",
7
+ "version": "2.0.16",
8
8
  "plugins": [
9
9
  {
10
10
  "name": "gobi",
11
11
  "description": "Manage the Gobi collaborative knowledge platform from the command line. Publish vault profiles, create posts and replies, manage saved notes and posts, manage sessions, generate images and videos.",
12
- "version": "2.0.15",
12
+ "version": "2.0.16",
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": "2.0.15",
4
+ "version": "2.0.16",
5
5
  "author": {
6
6
  "name": "gobi-ai"
7
7
  },
@@ -336,6 +336,7 @@ export function registerGlobalCommand(program) {
336
336
  .option("--rich-text <richText>", "Rich-text JSON array (mutually exclusive with --content)")
337
337
  .option("--vault-slug <vaultSlug>", "Attribute the reply to this vault (sets authorVaultSlug). Also used as upload destination for --auto-attachments.")
338
338
  .option("--auto-attachments", "Upload wiki-linked [[files]] to webdrive before posting (also attributes the reply to that vault)")
339
+ .option("--attach <file>", "Local media file to attach to this reply. Repeatable. X-style mix rule: up to 4 photos OR 1 GIF OR 1 video. Size ceilings: 5MB photos / 15MB GIFs / 512MB video.", (value, prev = []) => [...prev, value], [])
339
340
  .action(async (postId, opts) => {
340
341
  if (!opts.content && !opts.richText) {
341
342
  throw new Error("Provide either --content or --rich-text.");
@@ -369,6 +370,10 @@ export function registerGlobalCommand(program) {
369
370
  }
370
371
  if (authorVaultSlug)
371
372
  body.authorVaultSlug = authorVaultSlug;
373
+ if (opts.attach && opts.attach.length > 0) {
374
+ assertPostAttachmentMix(opts.attach);
375
+ body.attachments = await uploadPostAttachments(opts.attach);
376
+ }
372
377
  const resp = (await apiPost(`/posts/${postId}/replies`, body));
373
378
  const reply = unwrapResp(resp);
374
379
  if (isJsonMode(global)) {
@@ -478,6 +478,7 @@ export function registerSpaceCommand(program) {
478
478
  .option("--auto-attachments", "Upload wiki-linked [[files]] to webdrive before posting (also attributes the reply to that vault)")
479
479
  .option("--vault-slug <vaultSlug>", "Attribute the reply to this vault (sets authorVaultSlug). Also used as upload destination for --auto-attachments.")
480
480
  .option("--space-slug <spaceSlug>", "Space slug (overrides .gobi/settings.yaml)")
481
+ .option("--attach <file>", "Local media file to attach to this reply. Repeatable. X-style mix rule: up to 4 photos OR 1 GIF OR 1 video. Size ceilings: 5MB photos / 15MB GIFs / 512MB video.", (value, prev = []) => [...prev, value], [])
481
482
  .action(async (postId, opts) => {
482
483
  if (!opts.content && !opts.richText) {
483
484
  throw new Error("Provide either --content or --rich-text.");
@@ -511,6 +512,10 @@ export function registerSpaceCommand(program) {
511
512
  }
512
513
  if (authorVaultSlug)
513
514
  body.authorVaultSlug = authorVaultSlug;
515
+ if (opts.attach && opts.attach.length > 0) {
516
+ assertPostAttachmentMix(opts.attach);
517
+ body.attachments = await uploadPostAttachments(opts.attach);
518
+ }
514
519
  const spaceSlug = resolveSpaceSlug(space, opts);
515
520
  const resp = (await apiPost(`/spaces/${spaceSlug}/posts/${postId}/replies`, body));
516
521
  const msg = unwrapResp(resp);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobi-ai/cli",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "description": "CLI client for the Gobi collaborative knowledge platform",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -40,18 +40,25 @@ Replace `<RATIO>` with the desired aspect ratio: `1:1`, `16:9`, `9:16`, `4:3`, o
40
40
 
41
41
  The `-o` flag implies `--wait` and downloads the image when done.
42
42
 
43
- **IMPORTANT: After downloading, show the image using Obsidian wiki-link syntax EXACTLY like this:**
43
+ **Where you reference the downloaded file depends on what you're doing with it:**
44
44
 
45
- ```
46
- ![[media/<NAME>.png]]
47
- ```
45
+ - **Chat / vault note (vault is mounted, ![[wikilinks]] resolve):** use Obsidian wiki-link syntax:
46
+ ```
47
+ ![[media/<NAME>.png]]
48
+ ```
49
+ - **Post or reply (any flow that goes through `gobi <scope> create-post` or `gobi <scope> create-reply`):** do NOT embed the image in `--content`. Pass the file as a first-class attachment:
50
+ ```bash
51
+ gobi space create-post --title "<TITLE>" --content "<BODY>" --attach media/<NAME>.png
52
+ gobi space create-reply <postId> --content "<BODY>" --attach media/<NAME>.png
53
+ ```
54
+ This uploads the file to the CDN and renders it as a slider on the post card. The `--attach` flag is repeatable; mix rule is **4 photos OR 1 GIF OR 1 video**.
48
55
 
49
- Do NOT use markdown image syntax `![](...)` or `gobi://` URLs. Always use `![[media/<NAME>.png]]`.
56
+ In particular, when you're answering a post-mention (`@gobi` / `@space:<slug>` on a thread) and need to send media, **call `gobi <scope> create-reply <postId> --attach <file>` yourself** — your text-only assistant body is auto-posted only if you don't call create-reply this turn, so calling it explicitly is the only way to land media on the thread.
50
57
 
51
58
  ### Key rules
52
59
  - Replace `<NAME>` with a descriptive slug — NEVER use example names like `sunset.png` literally.
53
60
  - `--name` is **optional** — auto-derived from prompt if omitted.
54
- - Do NOT use the `downloadUrl` from the response — it is a frontend path, not a direct download link.
61
+ - Do NOT use the `downloadUrl` from the response — it is a Miraflow-internal path, not a public link. Always download with `-o` then either wiki-link (chat/vault) or `--attach` (post/reply).
55
62
  - `download-image` takes a **positional** jobId (NOT `--job-id`): `gobi media download-image <jobId>`
56
63
  - The `jobId` (or `id`) field is what you pass to `download-image` / `get-image-status` — NOT `mediaId`.
57
64
 
@@ -133,7 +140,7 @@ gobi --json media get-avatar-job-status <jobId> --wait
133
140
  ![[media/<NAME>.mp4]]
134
141
  ```
135
142
 
136
- Do NOT use markdown image/link syntax `![](...)` or `gobi://` URLs. Always use `![[media/<NAME>.mp4]]`.
143
+ Do NOT use markdown image/link syntax `![](...)` or `gobi://` URLs in chat. For posts/replies use `--attach media/<NAME>.mp4` instead — see the image workflow above for details.
137
144
 
138
145
  ## Available Commands
139
146
 
@@ -122,6 +122,8 @@ Options:
122
122
  --rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
123
123
  --vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug). Also used as upload destination for --auto-attachments.
124
124
  --auto-attachments Upload wiki-linked [[files]] to webdrive before posting (also attributes the reply to that vault)
125
+ --attach <file> Local media file to attach to this reply. Repeatable. X-style mix rule: up to 4 photos OR 1 GIF OR 1 video. Size ceilings: 5MB photos / 15MB GIFs / 512MB video. (default:
126
+ [])
125
127
  -h, --help display help for command
126
128
  ```
127
129
 
@@ -171,6 +171,8 @@ Options:
171
171
  --auto-attachments Upload wiki-linked [[files]] to webdrive before posting (also attributes the reply to that vault)
172
172
  --vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug). Also used as upload destination for --auto-attachments.
173
173
  --space-slug <spaceSlug> Space slug (overrides .gobi/settings.yaml)
174
+ --attach <file> Local media file to attach to this reply. Repeatable. X-style mix rule: up to 4 photos OR 1 GIF OR 1 video. Size ceilings: 5MB photos / 15MB GIFs / 512MB video. (default:
175
+ [])
174
176
  -h, --help display help for command
175
177
  ```
176
178