@gobi-ai/cli 2.0.34 → 2.0.36

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.
@@ -5,8 +5,17 @@ import { getSpaceSlug, getVaultSlug } from "./init.js";
5
5
  export function readStdin() {
6
6
  return readFileSync(0, "utf8");
7
7
  }
8
+ // The global `--json` flag lives on the root program. Walk up the ancestry so
9
+ // this works regardless of how deeply the calling command is nested (e.g. a
10
+ // leaf under `gobi space artifact …`, not just a direct child of the program).
8
11
  export function isJsonMode(cmd) {
9
- return !!cmd.parent?.opts().json;
12
+ let cur = cmd;
13
+ while (cur) {
14
+ if (cur.opts().json)
15
+ return true;
16
+ cur = cur.parent;
17
+ }
18
+ return false;
10
19
  }
11
20
  export function jsonOut(data) {
12
21
  console.log(JSON.stringify({ success: true, data }));
@@ -38,6 +47,89 @@ export function formatReactionChips(m) {
38
47
  .map((r) => `${r.emoji}${r.count}${r.reactedByMe ? "*" : ""}`)
39
48
  .join(" ");
40
49
  }
50
+ // Build a userId -> name lookup from a list/feed/thread response's `mentions`
51
+ // block. Returns an empty map when absent, so callers can pass it through
52
+ // unconditionally and mentions just fall back to `@<id>`.
53
+ export function buildMentionMap(resp) {
54
+ const map = new Map();
55
+ // `mentions` sits at the top level on raw list/feed responses but under
56
+ // `data` on unwrapped thread/topic payloads — accept either.
57
+ const data = resp?.data;
58
+ const mentions = (resp?.mentions || data?.mentions);
59
+ const users = mentions?.users;
60
+ if (Array.isArray(users)) {
61
+ for (const u of users) {
62
+ if (u && typeof u.id === "number" && typeof u.name === "string") {
63
+ map.set(u.id, u.name);
64
+ }
65
+ }
66
+ }
67
+ return map;
68
+ }
69
+ // Flatten a richText node array into a plain-text string for display. Posts
70
+ // commonly carry an empty `content` with the real body living only in
71
+ // `richText`, so list/feed labels go blank without this. Renders text nodes
72
+ // verbatim, user mentions as `@<name>` (resolved via `mentions`, else `@<id>`),
73
+ // and link nodes as their label or URL.
74
+ export function flattenRichText(richText, mentions) {
75
+ if (!Array.isArray(richText))
76
+ return "";
77
+ const parts = [];
78
+ for (const node of richText) {
79
+ if (!node || typeof node !== "object")
80
+ continue;
81
+ const n = node;
82
+ if (typeof n.text === "string" && n.text) {
83
+ parts.push(n.text);
84
+ }
85
+ else if (n.type === "user") {
86
+ const id = n.userId;
87
+ const resolved = n.name ||
88
+ (typeof id === "number" ? mentions?.get(id) : undefined) ||
89
+ "";
90
+ parts.push(resolved ? `@${resolved.replace(/^@/, "")}` : id != null ? `@${id}` : "");
91
+ }
92
+ else if (n.type === "link") {
93
+ parts.push(n.text || n.url || n.href || "");
94
+ }
95
+ }
96
+ return parts.join("");
97
+ }
98
+ // Best available plain-text body for a post or reply: explicit `content` first,
99
+ // then flattened `richText`. Empty string if neither has text.
100
+ export function postBodyText(m, mentions) {
101
+ const content = m.content || "";
102
+ if (content.trim())
103
+ return content;
104
+ return flattenRichText(m.richText, mentions);
105
+ }
106
+ // Single-line display label for a post: its title, else a body snippet, else
107
+ // "(untitled)". Falls through title -> content -> richText so titleless posts
108
+ // (the common case) read sensibly instead of printing "null"/blank. Body
109
+ // snippets are collapsed to one line and truncated; titles are left intact.
110
+ export function formatPostLabel(m, mentions, maxLen = 100) {
111
+ const title = m.title || "";
112
+ if (title.trim())
113
+ return title;
114
+ const body = postBodyText(m, mentions).replace(/\s+/g, " ").trim();
115
+ if (!body)
116
+ return "(untitled)";
117
+ return body.length > maxLen ? body.slice(0, maxLen) + "…" : body;
118
+ }
119
+ // Compact one-line rendering of a reply for nested display under a post (used
120
+ // by `list-posts`). Indented two levels so it reads as a child of the post
121
+ // line; surfaces attachments/artifacts and reactions on the reply.
122
+ export function formatReplyLine(r, mentions, maxLen = 200) {
123
+ const author = r.author?.name ||
124
+ `User ${r.authorId ?? "?"}`;
125
+ const text = postBodyText(r, mentions).replace(/\s+/g, " ").trim();
126
+ const body = text.length > maxLen ? text.slice(0, maxLen) + "…" : text;
127
+ const attach = formatAttachmentSummary(r);
128
+ const chips = formatReactionChips(r);
129
+ return (` - [r:${r.id}] ${author}: ${body} (${r.createdAt})` +
130
+ (attach ? ` ${attach}` : "") +
131
+ (chips ? ` ${chips}` : ""));
132
+ }
41
133
  // Classify a wire attachment the way the clients do: declared mimeType first,
42
134
  // then the media-url extension (covers rows that predate the mimeType field).
43
135
  function attachmentKind(a) {
@@ -78,9 +170,12 @@ export function formatAttachmentSummary(m) {
78
170
  }
79
171
  return `📎 ${parts.join(", ")}`;
80
172
  }
81
- // One line per attachment with the fetchable URLused by `get-post` so an
82
- // agent can download/describe the media without re-querying in --json mode.
83
- export function formatAttachmentLines(m, indent = " ") {
173
+ // One line per attachment with a fetchable referencea `mediaUrl` for files
174
+ // and media, or the `artifactId` for artifacts (retrievable via
175
+ // `gobi artifact get <id>`). Used by `get-post` and nested under posts in
176
+ // `list-posts` so an agent can fetch/describe the data without re-querying.
177
+ // `marker` is the bullet prefix (e.g. "-" or "📎").
178
+ export function formatAttachmentLines(m, indent = " ", marker = "-") {
84
179
  const attachments = m.attachments || [];
85
180
  if (!Array.isArray(attachments) || !attachments.length)
86
181
  return [];
@@ -90,11 +185,11 @@ export function formatAttachmentLines(m, indent = " ") {
90
185
  const art = a.artifact;
91
186
  const title = art.title ? ` "${art.title}"` : "";
92
187
  const status = art.isPublished ? "published" : "unpublished";
93
- return `${indent}- artifact [${art.kind}]${title} (${art.artifactId}, ${status})${art.mediaUrl ? ` — ${art.mediaUrl}` : ""}`;
188
+ return `${indent}${marker} artifact [${art.kind}]${title} (${art.artifactId}, ${status})${art.mediaUrl ? ` — ${art.mediaUrl}` : ""}`;
94
189
  }
95
190
  const dims = a.width && a.height ? ` ${a.width}×${a.height}` : "";
96
191
  const name = a.fileName ? ` "${a.fileName}"` : "";
97
192
  const mime = a.mimeType ? ` (${a.mimeType})` : "";
98
- return `${indent}- ${kind}${name}${dims}${mime} — ${a.mediaUrl}`;
193
+ return `${indent}${marker} ${kind}${name}${dims}${mime} — ${a.mediaUrl}`;
99
194
  });
100
195
  }
package/dist/main.js CHANGED
@@ -11,7 +11,6 @@ import { registerVaultCommand } from "./commands/vault.js";
11
11
  import { registerSenseCommand } from "./commands/sense.js";
12
12
  import { registerUpdateCommand } from "./commands/update.js";
13
13
  import { registerMediaCommand } from "./commands/media.js";
14
- import { registerArtifactCommand } from "./commands/artifact.js";
15
14
  const require = createRequire(import.meta.url);
16
15
  const { version } = require("../package.json");
17
16
  function hasParentOption(cmd, key) {
@@ -64,7 +63,8 @@ export async function cli() {
64
63
  registerSenseCommand(program);
65
64
  registerUpdateCommand(program);
66
65
  registerMediaCommand(program);
67
- registerArtifactCommand(program);
66
+ // Artifact subcommands live under `gobi space` and `gobi personal` (registered
67
+ // by those groups), not as a top-level `gobi artifact` group.
68
68
  // Propagate helpWidth to all subcommands
69
69
  const helpWidth = process.stdout.columns || 200;
70
70
  for (const cmd of program.commands) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobi-ai/cli",
3
- "version": "2.0.34",
3
+ "version": "2.0.36",
4
4
  "description": "CLI client for the Gobi collaborative knowledge platform",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -4,20 +4,38 @@ description: >-
4
4
  Gobi artifact commands for versioned creations attached to posts: create,
5
5
  revise, publish, revert, history, download, delete, get, list. An artifact
6
6
  is a human-owned creation (image, video, gif, markdown, or meeting_summary)
7
- whose revisions form a draft/published tree. Use when the user wants to
8
- author, version, publish, or attach an artifact to a post.
7
+ whose revisions form a draft/published tree. Artifacts are scoped to a space:
8
+ `gobi personal artifact …` (your personal space) or `gobi space artifact …`
9
+ (the active team space). Use when the user wants to author, version, publish,
10
+ or attach an artifact to a post.
9
11
  allowed-tools: Bash(gobi:*)
10
12
  metadata:
11
13
  author: gobi-ai
12
- version: "2.0.34"
14
+ version: "2.0.36"
13
15
  ---
14
16
 
15
17
  # gobi-artifact
16
18
 
17
- Gobi artifact commands for versioned, post-attachable creations (v2.0.34).
19
+ Gobi artifact commands for versioned, post-attachable creations (v2.0.36).
18
20
 
19
21
  Requires gobi-cli installed and authenticated. See gobi-core skill for setup.
20
22
 
23
+ ## Scope: personal vs space
24
+
25
+ Artifacts live in a **space** — either your **personal space** or a **team space** —
26
+ just like posts. The commands are the same under each scope; pick the group that
27
+ matches where the artifact should live:
28
+
29
+ - `gobi personal artifact …` — your personal space (visible only to you).
30
+ - `gobi space artifact …` — the active team space (visible to its members). The
31
+ space comes from `.gobi/settings.yaml` (set with `gobi space warp <slug>`) or
32
+ `gobi space --space-slug <slug> artifact …`.
33
+
34
+ The examples below use `personal`; swap in `space` to operate on a team space.
35
+ The by-id subcommands (`revise`, `publish`, `revert`, `history`, `download`,
36
+ `delete`, `get`) work the same under either group — they're authorized off the
37
+ artifact itself — but keep using the same scope you created the artifact in.
38
+
21
39
  ## What is an artifact?
22
40
 
23
41
  An artifact is a versioned creation that can be attached to one or more posts. Each artifact has:
@@ -25,6 +43,7 @@ An artifact is a versioned creation that can be attached to one or more posts. E
25
43
  - **kind** — one of `image | video | gif | markdown | meeting_summary`. `markdown` and `meeting_summary` carry a markdown **body**; `image`, `gif`, and `video` carry an uploaded **media file**.
26
44
  - **title** — optional display title.
27
45
  - **owner** — always a human (the calling user). Even when an agent runs the CLI, the artifact is owned by the agent's owner.
46
+ - **scope** — the personal space or team space it lives in (set by the command group, see above).
28
47
  - **revisions** — a draft/published tree. New revisions start as `draft`; publishing one makes it the artifact's single `published` revision (at most one published per artifact). `revise --from <revisionId>` branches off an earlier revision instead of the latest, so the history can fork.
29
48
  - **metadata** — per-kind extras. For markdown kinds, `metadata.vaultSlug` is the anchor vault used to resolve `[[wikilinks]]` in the body.
30
49
 
@@ -32,12 +51,12 @@ Markdown bodies can reference vault notes with `[[wikilinks]]`. Resolution again
32
51
 
33
52
  ## Important: JSON Mode
34
53
 
35
- For programmatic/agent usage, always pass `--json` as a **global** option (before the subcommand):
54
+ For programmatic/agent usage, always pass `--json` as a **global** option (before everything else):
36
55
 
37
56
  ```bash
38
- gobi --json artifact list --limit 20
39
- gobi --json artifact create --kind markdown --content "# Notes" --title "My note"
40
- gobi --json artifact get <artifactId>
57
+ gobi --json personal artifact list --limit 20
58
+ gobi --json personal artifact create --kind markdown --content "# Notes" --title "My note"
59
+ gobi --json space artifact get <artifactId>
41
60
  ```
42
61
 
43
62
  JSON mode wraps the response as `{"success": true, "data": <artifact|revision|...>}` (or `{"success": false, "error": "..."}`).
@@ -47,7 +66,7 @@ JSON mode wraps the response as `{"success": true, "data": <artifact|revision|..
47
66
  Create a markdown artifact, attaching it to a post in the same call:
48
67
 
49
68
  ```bash
50
- gobi --json artifact create --kind markdown --file notes.md --title "Design notes" \
69
+ gobi --json personal artifact create --kind markdown --file notes.md --title "Design notes" \
51
70
  --vault-slug my-vault --post-id 12345
52
71
  ```
53
72
 
@@ -56,14 +75,14 @@ The body can come from `--file <path>`, `--content <md>` inline, or stdin (`--co
56
75
  Add `--auto-attachments` (markdown kinds only) to upload any `[[wiki-linked files]]` in the body to the `--vault-slug` vault on webdrive before creating:
57
76
 
58
77
  ```bash
59
- gobi --json artifact create --kind markdown --file notes.md --vault-slug my-vault --auto-attachments
78
+ gobi --json personal artifact create --kind markdown --file notes.md --vault-slug my-vault --auto-attachments
60
79
  ```
61
80
 
62
81
  Revise it (adds a new draft revision), then publish that revision:
63
82
 
64
83
  ```bash
65
- gobi --json artifact revise <artifactId> --file notes-v2.md --change-note "Tighten intro"
66
- gobi --json artifact publish <artifactId> --revision <revisionId>
84
+ gobi --json personal artifact revise <artifactId> --file notes-v2.md --change-note "Tighten intro"
85
+ gobi --json personal artifact publish <artifactId> --revision <revisionId>
67
86
  ```
68
87
 
69
88
  `revise --auto-attachments` reuses the artifact's stored `metadata.vaultSlug` (it GETs the artifact first), so you don't repeat `--vault-slug`.
@@ -71,8 +90,8 @@ gobi --json artifact publish <artifactId> --revision <revisionId>
71
90
  Inspect and roll back:
72
91
 
73
92
  ```bash
74
- gobi --json artifact history <artifactId> # full revision tree (owner only)
75
- gobi --json artifact revert <artifactId> --to <revisionId>
93
+ gobi --json personal artifact history <artifactId> # full revision tree (owner only)
94
+ gobi --json personal artifact revert <artifactId> --to <revisionId>
76
95
  ```
77
96
 
78
97
  ## Typical Workflow (media artifact)
@@ -80,13 +99,13 @@ gobi --json artifact revert <artifactId> --to <revisionId>
80
99
  Image / gif / video kinds upload a local file (init → PUT → create) instead of a body:
81
100
 
82
101
  ```bash
83
- gobi --json artifact create --kind image --file diagram.png --title "Architecture" --post-id 12345
102
+ gobi --json personal artifact create --kind image --file diagram.png --title "Architecture" --post-id 12345
84
103
  ```
85
104
 
86
105
  Media-file size ceilings mirror post media: 5MB photos / 15MB GIFs / 512MB video, derived from the file's content type. Revise a media artifact by uploading a replacement file:
87
106
 
88
107
  ```bash
89
- gobi --json artifact revise <artifactId> --file diagram-v2.png --change-note "Add cache layer"
108
+ gobi --json personal artifact revise <artifactId> --file diagram-v2.png --change-note "Add cache layer"
90
109
  ```
91
110
 
92
111
  ## Download
@@ -97,15 +116,15 @@ gobi --json artifact revise <artifactId> --file diagram-v2.png --change-note "Ad
97
116
  - media → fetches the `mediaUrl` bytes to `--out <path>` (defaults to `<artifactId>.<ext>`).
98
117
 
99
118
  ```bash
100
- gobi artifact download <artifactId> --out notes.md
101
- gobi artifact download <artifactId> --revision <revisionId> --out image.png
119
+ gobi personal artifact download <artifactId> --out notes.md
120
+ gobi personal artifact download <artifactId> --revision <revisionId> --out image.png
102
121
  ```
103
122
 
104
123
  ## Attaching to a post
105
124
 
106
- Three ways to attach an artifact, depending on what already exists:
125
+ Three ways to attach an artifact, depending on what already exists (`<scope>` is `personal` or `space`):
107
126
 
108
- 1. **At artifact-create time** — `gobi artifact create … --post-id <id>` attaches the new artifact to an existing post **without clobbering** its current artifacts: the CLI reads the post's current artifact attachments, appends the new id, and writes the merged set via `PATCH /posts/:id` (`artifactIds`).
127
+ 1. **At artifact-create time** — `gobi <scope> artifact create … --post-id <id>` attaches the new artifact to an existing post **without clobbering** its current artifacts: the CLI reads the post's current artifact attachments, appends the new id, and writes the merged set via `PATCH /posts/:id` (`artifactIds`).
109
128
  2. **At post-create time** — `gobi <lane> create-post … --artifact <artifactId>` attaches one or more **already-created** artifacts to the new post (`--artifact` is repeatable).
110
129
  3. **Editing an existing post** — `gobi <lane> edit-post <id> --artifact <artifactId>` sets the post's artifact attachments. Unlike `create --post-id` (which merges), the post API's `artifactIds` is a **full replacement** — pass every artifact you want on the post, since omitted ones are removed (omitting `--artifact` entirely leaves them unchanged).
111
130
 
@@ -113,15 +132,17 @@ The same artifact can be attached to **multiple posts** (it's a reusable, versio
113
132
 
114
133
  ## Available Commands
115
134
 
116
- - `gobi artifact create` — Create an artifact (markdown body or uploaded media). `--post-id` attaches it to a post; `--auto-attachments` (markdown) uploads `[[wikilinks]]`.
117
- - `gobi artifact revise` — Add a draft revision (new body or media file). `--from` branches off a specific revision.
118
- - `gobi artifact publish` — Publish a revision (becomes the single published revision).
119
- - `gobi artifact revert` — Move the published pointer to an earlier revision.
120
- - `gobi artifact history` — List the full revision tree (owner only).
121
- - `gobi artifact download` — Download a revision's content (markdown body or media bytes).
122
- - `gobi artifact delete` — Delete an artifact and its revision tree.
123
- - `gobi artifact get` — Get one artifact with its current revision.
124
- - `gobi artifact list` — List your artifacts (`--kind`, `--limit`).
135
+ Under `gobi personal artifact …` (personal space) or `gobi space artifact …` (active team space):
136
+
137
+ - `create` — Create an artifact (markdown body or uploaded media). `--post-id` attaches it to a post; `--auto-attachments` (markdown) uploads `[[wikilinks]]`.
138
+ - `revise` — Add a draft revision (new body or media file). `--from` branches off a specific revision.
139
+ - `publish` — Publish a revision (becomes the single published revision).
140
+ - `revert` — Move the published pointer to an earlier revision.
141
+ - `history` — List the full revision tree (owner only).
142
+ - `download` — Download a revision's content (markdown body or media bytes).
143
+ - `delete` — Delete an artifact and its revision tree.
144
+ - `get` — Get one artifact with its current revision.
145
+ - `list` — List this scope's artifacts (`--kind`, `--limit`).
125
146
 
126
147
  ## Confirm before mutating
127
148
 
@@ -134,4 +155,5 @@ Read-only commands (`get`, `list`, `history`) and `download` run without confirm
134
155
 
135
156
  ## Reference Documentation
136
157
 
137
- - [gobi artifact](references/artifact.md)
158
+ - [gobi personal artifact](references/personal.md)
159
+ - [gobi space artifact](references/space.md)
@@ -0,0 +1,42 @@
1
+ # gobi personal
2
+
3
+ ```
4
+ Usage: gobi personal [options] [command]
5
+
6
+ Personal-space commands (private posts and replies visible only to you). Mirrors the `global` subcommand shape — posts/replies live in the same data model, scoped via personalSpaceUserId so they
7
+ never surface on the public feed.
8
+
9
+ Options:
10
+ -h, --help display help for command
11
+
12
+ Commands:
13
+ artifact Versioned creations attached to posts, scoped to your personal space (visible only to you). Kinds: image | video | gif | markdown | meeting_summary. Always
14
+ human-owned; revisions form a draft/published tree (one published per artifact).
15
+ help [command] display help for command
16
+ ```
17
+
18
+ ## artifact
19
+
20
+ ```
21
+ Usage: gobi personal artifact [options] [command]
22
+
23
+ Versioned creations attached to posts, scoped to your personal space (visible only to you). Kinds: image | video | gif | markdown | meeting_summary. Always human-owned; revisions form a
24
+ draft/published tree (one published per artifact).
25
+
26
+ Options:
27
+ -h, --help display help for command
28
+
29
+ Commands:
30
+ create [options] Create an artifact. markdown/meeting_summary kinds take a body via --file, --content, or stdin ("-"). image/gif/video kinds upload --file. Pass --post-id to attach
31
+ the new artifact to a post.
32
+ revise [options] <artifactId> Add a draft revision to an artifact. New body via --file, --content, or stdin (markdown), or --file (media). Use --from to branch off a specific revision.
33
+ publish [options] <artifactId> Publish a revision (becomes the artifact's single published revision).
34
+ revert [options] <artifactId> Revert the artifact's published pointer to an earlier revision.
35
+ history <artifactId> List the artifact's full revision tree (owner only).
36
+ download [options] <artifactId> Download an artifact's content. markdown → write the body; media → fetch the bytes. Defaults to the published/latest revision; pass --revision to pick one. Writes
37
+ to --out or stdout (markdown).
38
+ delete <artifactId> Delete an artifact (and its revision tree).
39
+ get <artifactId> Get one artifact with its current revision.
40
+ list [options] List this scope's artifacts (newest first).
41
+ help [command] display help for command
42
+ ```
@@ -0,0 +1,42 @@
1
+ # gobi space
2
+
3
+ ```
4
+ Usage: gobi space [options] [command]
5
+
6
+ Space commands (posts, replies). Space and member admin is web-UI only.
7
+
8
+ Options:
9
+ --space-slug <spaceSlug> Space slug (overrides .gobi/settings.yaml)
10
+ -h, --help display help for command
11
+
12
+ Commands:
13
+ artifact Versioned creations attached to posts, scoped to this space (visible to its members). Kinds: image | video | gif | markdown | meeting_summary. Always
14
+ human-owned; revisions form a draft/published tree (one published per artifact).
15
+ help [command] display help for command
16
+ ```
17
+
18
+ ## artifact
19
+
20
+ ```
21
+ Usage: gobi space artifact [options] [command]
22
+
23
+ Versioned creations attached to posts, scoped to this space (visible to its members). Kinds: image | video | gif | markdown | meeting_summary. Always human-owned; revisions form a draft/published
24
+ tree (one published per artifact).
25
+
26
+ Options:
27
+ -h, --help display help for command
28
+
29
+ Commands:
30
+ create [options] Create an artifact. markdown/meeting_summary kinds take a body via --file, --content, or stdin ("-"). image/gif/video kinds upload --file. Pass --post-id to attach
31
+ the new artifact to a post.
32
+ revise [options] <artifactId> Add a draft revision to an artifact. New body via --file, --content, or stdin (markdown), or --file (media). Use --from to branch off a specific revision.
33
+ publish [options] <artifactId> Publish a revision (becomes the artifact's single published revision).
34
+ revert [options] <artifactId> Revert the artifact's published pointer to an earlier revision.
35
+ history <artifactId> List the artifact's full revision tree (owner only).
36
+ download [options] <artifactId> Download an artifact's content. markdown → write the body; media → fetch the bytes. Defaults to the published/latest revision; pass --revision to pick one. Writes
37
+ to --out or stdout (markdown).
38
+ delete <artifactId> Delete an artifact (and its revision tree).
39
+ get <artifactId> Get one artifact with its current revision.
40
+ list [options] List this scope's artifacts (newest first).
41
+ help [command] display help for command
42
+ ```
@@ -8,12 +8,12 @@ description: >-
8
8
  allowed-tools: Bash(gobi:*)
9
9
  metadata:
10
10
  author: gobi-ai
11
- version: "2.0.34"
11
+ version: "2.0.36"
12
12
  ---
13
13
 
14
14
  # gobi-core
15
15
 
16
- Core CLI commands for the Gobi collaborative knowledge platform (v2.0.34).
16
+ Core CLI commands for the Gobi collaborative knowledge platform (v2.0.36).
17
17
 
18
18
  ## Prerequisites
19
19
 
@@ -50,7 +50,7 @@ There is **no `gobi init`** command — each setup step is its own command, and
50
50
  | Step | Command | Unlocks |
51
51
  |------|---------|---------|
52
52
  | 1. Log in | `gobi auth login` | All authenticated commands |
53
- | 2. Configure a vault for this directory | `gobi vault init` | Every `gobi vault …` command; also lets `artifact create --auto-attachments` resolve that vault automatically |
53
+ | 2. Configure a vault for this directory | `gobi vault init` | Every `gobi vault …` command; also lets `<scope> artifact create --auto-attachments` resolve that vault automatically |
54
54
  | 3. Pick an active space for this directory | `gobi space warp` | Every `gobi space …` post/reply/feed command without needing `--space-slug` |
55
55
 
56
56
  After step 2 + step 3, `.gobi/settings.yaml` looks like:
@@ -7,7 +7,7 @@ description: >-
7
7
  allowed-tools: Bash(gobi:*)
8
8
  metadata:
9
9
  author: gobi-ai
10
- version: "2.0.34"
10
+ version: "2.0.36"
11
11
  ---
12
12
 
13
13
  # Gobi Homepage Developer Guide
@@ -10,12 +10,12 @@ description: >-
10
10
  allowed-tools: Bash(gobi:*)
11
11
  metadata:
12
12
  author: gobi-ai
13
- version: "2.0.34"
13
+ version: "2.0.36"
14
14
  ---
15
15
 
16
16
  # gobi-media
17
17
 
18
- Gobi media generation commands (v2.0.34).
18
+ Gobi media generation commands (v2.0.36).
19
19
 
20
20
  Requires gobi-cli installed and authenticated. See gobi-core skill for setup.
21
21
 
@@ -7,12 +7,12 @@ description: >-
7
7
  allowed-tools: Bash(gobi:*)
8
8
  metadata:
9
9
  author: gobi-ai
10
- version: "2.0.34"
10
+ version: "2.0.36"
11
11
  ---
12
12
 
13
13
  # gobi-sense
14
14
 
15
- Gobi sense commands for activity and transcription data (v2.0.34).
15
+ Gobi sense commands for activity and transcription data (v2.0.36).
16
16
 
17
17
  Requires gobi-cli installed and authenticated. See the **gobi-core** skill for setup.
18
18
 
@@ -11,12 +11,12 @@ description: >-
11
11
  allowed-tools: Bash(gobi:*)
12
12
  metadata:
13
13
  author: gobi-ai
14
- version: "2.0.34"
14
+ version: "2.0.36"
15
15
  ---
16
16
 
17
17
  # gobi-space
18
18
 
19
- Gobi space, global, and personal-space posts (v2.0.34).
19
+ Gobi space, global, and personal-space posts (v2.0.36).
20
20
 
21
21
  Requires gobi-cli installed and authenticated. See the **gobi-core** skill for setup.
22
22
 
@@ -47,9 +47,9 @@ The same applies to replies: a reply has only `--content` (no title), so do not
47
47
 
48
48
  ## Attaching artifacts (`--artifact`)
49
49
 
50
- Posts have no vault attribution. Both `create-post` and `edit-post` across all three scopes (`gobi space`, `gobi global`, `gobi personal`) accept `--artifact <artifactId>` (repeatable) to attach existing artifacts. On `create-post` it sets the new post's artifacts; on `edit-post` it **replaces** the post's artifact set wholesale (pass every artifact you want; omit `--artifact` to leave them unchanged). The same artifact can be attached to multiple posts — it's a reusable, versioned creation, and each post renders its currently-published revision. To author a vault-anchored document, create a markdown artifact (`gobi artifact create --kind markdown --vault-slug <slug>`) and attach it via `--artifact`. See the **gobi-artifact** skill.
50
+ Posts have no vault attribution. Both `create-post` and `edit-post` across all three scopes (`gobi space`, `gobi global`, `gobi personal`) accept `--artifact <artifactId>` (repeatable) to attach existing artifacts. On `create-post` it sets the new post's artifacts; on `edit-post` it **replaces** the post's artifact set wholesale (pass every artifact you want; omit `--artifact` to leave them unchanged). The same artifact can be attached to multiple posts — it's a reusable, versioned creation, and each post renders its currently-published revision. To author a vault-anchored document, create a markdown artifact in the matching scope (`gobi space artifact create --kind markdown --vault-slug <slug>`, or `gobi personal artifact create …`) and attach it via `--artifact`. See the **gobi-artifact** skill.
51
51
 
52
- > **Wiki-link uploads moved to artifacts.** The `--auto-attachments` flag that used to upload `[[wiki-linked files]]` from a post body now lives on `gobi artifact create` / `gobi artifact revise` (markdown kinds). To publish a markdown creation with resolvable wikilinks, create a markdown artifact with `--vault-slug` + `--auto-attachments` and attach it to the post (`--post-id`). See the **gobi-artifact** skill. Before relying on wikilink resolution, confirm the anchor vault is published: `gobi --json vault status --vault-slug <slug>` should report `isPublished: true`.
52
+ > **Wiki-link uploads moved to artifacts.** The `--auto-attachments` flag that used to upload `[[wiki-linked files]]` from a post body now lives on `gobi <scope> artifact create` / `gobi <scope> artifact revise` (markdown kinds; `<scope>` is `space` or `personal`). To publish a markdown creation with resolvable wikilinks, create a markdown artifact with `--vault-slug` + `--auto-attachments` and attach it to the post (`--post-id`). See the **gobi-artifact** skill. Before relying on wikilink resolution, confirm the anchor vault is published: `gobi --json vault status --vault-slug <slug>` should report `isPublished: true`.
53
53
 
54
54
  ## Post media + file attachments (`--attach`)
55
55
 
@@ -57,7 +57,7 @@ Posts have no vault attribution. Both `create-post` and `edit-post` across all t
57
57
 
58
58
  Mix rule (enforced client-side before upload): up to **4 photos + 4 document files** together, OR **1 GIF**, OR **1 video** — GIF and video are exclusive with everything. Size ceilings: 10MB photos, 15MB GIFs, 512MB video, 250MB document files.
59
59
 
60
- Use `--attach` for media/files you want shown in the post itself; use a markdown **artifact** (`gobi artifact create`) for `[[wikilinks]]`-bearing creations attached to the post.
60
+ Use `--attach` for media/files you want shown in the post itself; use a markdown **artifact** (`gobi <scope> artifact create`, `<scope>` = `space`/`personal`) for `[[wikilinks]]`-bearing creations attached to the post.
61
61
 
62
62
  **Reading attachments back:** feed and list lines show a compact marker like `📎 2 photos, 1 file`; `get-post` prints an `Attachments (N):` block with one line per attachment — kind, original fileName, dimensions/MIME, and the fetchable CDN URL (artifact attachments show kind/title/artifactId instead). In `--json` mode the full `attachments` array is on every post/reply object.
63
63
 
@@ -76,7 +76,7 @@ Options:
76
76
  --title <title> Title of the post
77
77
  --content <content> Post content (markdown supported, use "-" for stdin)
78
78
  --rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
79
- --artifact <artifactId> Attach an existing artifact to the post (repeatable). Create artifacts with `gobi artifact create`. (default: [])
79
+ --artifact <artifactId> Attach an existing artifact to the post (repeatable). Create artifacts with `gobi personal artifact create`. (default: [])
80
80
  --attach <file> Local media or document file to attach. Repeatable. Mix rule: up to 4 photos + up to 4 document files (pdf/md/txt/csv) OR 1 GIF OR 1 video. Size ceilings: 10MB photos /
81
81
  15MB GIFs / 512MB video / 250MB files. (default: [])
82
82
  --repost-post-id <postId> Wrap an existing top-level post as the embedded card on this new post. Composes with --content / --rich-text / --attach (the wrapping author's text + media render above
@@ -98,7 +98,7 @@ Options:
98
98
  --attach <file> Replace the post's media attachments with the given files (existing attachments are removed). Repeatable. Mix rule: up to 4 photos + up to 4 document files (pdf/md/txt/csv)
99
99
  OR 1 GIF OR 1 video. Size ceilings: 10MB photos / 15MB GIFs / 512MB video / 250MB files. Omit to leave attachments unchanged. (default: [])
100
100
  --artifact <artifactId> Replace the post's artifact attachments with the given artifact(s) (existing artifact attachments are removed). Repeatable. Omit to leave them unchanged. Create artifacts
101
- with `gobi artifact create`. (default: [])
101
+ with `gobi personal artifact create`. (default: [])
102
102
  -h, --help display help for command
103
103
  ```
104
104
 
@@ -23,6 +23,8 @@ Commands:
23
23
  delete-reply <replyId> Delete a reply you authored in your personal space.
24
24
  react <postId> <emoji> Add an emoji reaction to a personal-space post or reply (idempotent). <postId> is the numeric id of a post OR a reply.
25
25
  unreact <postId> <emoji> Remove your emoji reaction from a personal-space post or reply. <postId> is the numeric id of a post OR a reply.
26
+ artifact Versioned creations attached to posts, scoped to your personal space (visible only to you). Kinds: image | video | gif | markdown | meeting_summary. Always
27
+ human-owned; revisions form a draft/published tree (one published per artifact).
26
28
  help [command] display help for command
27
29
  ```
28
30
 
@@ -91,7 +93,7 @@ Options:
91
93
  --title <title> Title of the post
92
94
  --content <content> Post content (markdown supported, use "-" for stdin)
93
95
  --rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
94
- --artifact <artifactId> Attach an existing artifact to the post (repeatable). Create artifacts with `gobi artifact create`. (default: [])
96
+ --artifact <artifactId> Attach an existing artifact to the post (repeatable). Create artifacts with `gobi personal artifact create`. (default: [])
95
97
  --attach <file> Local media or document file to attach. Repeatable. Mix rule: up to 4 photos + up to 4 document files (pdf/md/txt/csv) OR 1 GIF OR 1 video. Size ceilings: 10MB photos /
96
98
  15MB GIFs / 512MB video / 250MB files. (default: [])
97
99
  --repost-post-id <postId> Wrap an existing top-level post as the embedded card on this new private post. The referenced post must be visible to you (your own personal-space post, a global-feed
@@ -113,7 +115,7 @@ Options:
113
115
  --attach <file> Replace the post's media attachments with the given files (existing attachments are removed). Repeatable. Mix rule: up to 4 photos + up to 4 document files (pdf/md/txt/csv)
114
116
  OR 1 GIF OR 1 video. Size ceilings: 10MB photos / 15MB GIFs / 512MB video / 250MB files. Omit to leave attachments unchanged. (default: [])
115
117
  --artifact <artifactId> Replace the post's artifact attachments with the given artifact(s) (existing artifact attachments are removed). Repeatable. Omit to leave them unchanged. Create artifacts
116
- with `gobi artifact create`. (default: [])
118
+ with `gobi personal artifact create`. (default: [])
117
119
  -h, --help display help for command
118
120
  ```
119
121
 
@@ -188,3 +190,29 @@ Remove your emoji reaction from a personal-space post or reply. <postId> is the
188
190
  Options:
189
191
  -h, --help display help for command
190
192
  ```
193
+
194
+ ## artifact
195
+
196
+ ```
197
+ Usage: gobi personal artifact [options] [command]
198
+
199
+ Versioned creations attached to posts, scoped to your personal space (visible only to you). Kinds: image | video | gif | markdown | meeting_summary. Always human-owned; revisions form a
200
+ draft/published tree (one published per artifact).
201
+
202
+ Options:
203
+ -h, --help display help for command
204
+
205
+ Commands:
206
+ create [options] Create an artifact. markdown/meeting_summary kinds take a body via --file, --content, or stdin ("-"). image/gif/video kinds upload --file. Pass --post-id to attach
207
+ the new artifact to a post.
208
+ revise [options] <artifactId> Add a draft revision to an artifact. New body via --file, --content, or stdin (markdown), or --file (media). Use --from to branch off a specific revision.
209
+ publish [options] <artifactId> Publish a revision (becomes the artifact's single published revision).
210
+ revert [options] <artifactId> Revert the artifact's published pointer to an earlier revision.
211
+ history <artifactId> List the artifact's full revision tree (owner only).
212
+ download [options] <artifactId> Download an artifact's content. markdown → write the body; media → fetch the bytes. Defaults to the published/latest revision; pass --revision to pick one. Writes
213
+ to --out or stdout (markdown).
214
+ delete <artifactId> Delete an artifact (and its revision tree).
215
+ get <artifactId> Get one artifact with its current revision.
216
+ list [options] List this scope's artifacts (newest first).
217
+ help [command] display help for command
218
+ ```
@@ -144,7 +144,7 @@ Options:
144
144
  --title <title> Title of the post
145
145
  --content <content> Post content (markdown supported, use "-" for stdin)
146
146
  --rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
147
- --artifact <artifactId> Attach an existing artifact to the post (repeatable). Create artifacts with `gobi artifact create`. (default: [])
147
+ --artifact <artifactId> Attach an existing artifact to the post (repeatable). Create artifacts with `gobi space artifact create`. (default: [])
148
148
  --space-slug <spaceSlug> Space slug (overrides .gobi/settings.yaml)
149
149
  --attach <file> Local media or document file to attach. Repeatable. Mix rule: up to 4 photos + up to 4 document files (pdf/md/txt/csv) OR 1 GIF OR 1 video. Size ceilings: 10MB photos /
150
150
  15MB GIFs / 512MB video / 250MB files. (default: [])
@@ -170,7 +170,7 @@ Options:
170
170
  --attach <file> Replace the post's media attachments with the given files (existing attachments are removed). Repeatable. Mix rule: up to 4 photos + up to 4 document files
171
171
  (pdf/md/txt/csv) OR 1 GIF OR 1 video. Size ceilings: 10MB photos / 15MB GIFs / 512MB video / 250MB files. Omit to leave attachments unchanged. (default: [])
172
172
  --artifact <artifactId> Replace the post's artifact attachments with the given artifact(s) (existing artifact attachments are removed). Repeatable. Omit to leave them unchanged. Create artifacts
173
- with `gobi artifact create`. (default: [])
173
+ with `gobi space artifact create`. (default: [])
174
174
  -h, --help display help for command
175
175
  ```
176
176