@gobi-ai/cli 2.0.1 → 2.0.3
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +6 -4
- package/dist/commands/draft.js +19 -5
- package/package.json +1 -1
- package/skills/gobi-core/SKILL.md +8 -0
- package/skills/gobi-draft/SKILL.md +28 -3
- package/skills/gobi-draft/references/draft.md +9 -8
- package/skills/gobi-media/SKILL.md +11 -0
- package/skills/gobi-saved/SKILL.md +10 -0
- package/skills/gobi-space/SKILL.md +10 -0
- package/skills/gobi-vault/SKILL.md +8 -0
|
@@ -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.
|
|
7
|
+
"version": "2.0.3",
|
|
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.
|
|
12
|
+
"version": "2.0.3",
|
|
13
13
|
"author": {
|
|
14
14
|
"name": "gobi-ai"
|
|
15
15
|
},
|
package/README.md
CHANGED
|
@@ -238,19 +238,21 @@ Times are ISO 8601 UTC (e.g. `2026-03-20T00:00:00Z`).
|
|
|
238
238
|
|
|
239
239
|
### Drafts
|
|
240
240
|
|
|
241
|
-
A *draft* is a unit of standing guidance authored by an agent. Each draft carries 0–3 AI-suggested
|
|
241
|
+
A *draft* is a unit of standing guidance authored by an agent. Each draft carries 0–3 AI-suggested actions the user picks from. The top 5 pending drafts (lowest priority first) are injected into the agent's system prompt every turn — drafts turn agent suggestions into running context.
|
|
242
242
|
|
|
243
243
|
When invoked from inside an agent run, the runtime exports `GOBI_SESSION_ID` so `gobi draft add` picks it up automatically; otherwise pass `--session <uuid>`.
|
|
244
244
|
|
|
245
|
+
Each action is `{ label, message? }`: `label` is the short button text (1–80 chars) the user sees; `message` (optional, ≤2000 chars) is what the user is taken to be saying to the agent on click. When `message` is omitted, the client falls back to `label`. From the CLI, pass an action as `--action "Label::Message"` — the literal `::` separates the two. Without `::`, the whole value is the label.
|
|
246
|
+
|
|
245
247
|
| Command | Description |
|
|
246
248
|
|---------|-------------|
|
|
247
249
|
| `gobi draft list [--limit N]` | List drafts (priority ASC, then newest first) |
|
|
248
250
|
| `gobi draft get <id>` | Show one draft with its history and suggested actions |
|
|
249
|
-
| `gobi draft add <title> <content> [--session <id>] [--priority N] [--action <label>]…` | Add a draft. Pass `--action` up to 3 times
|
|
251
|
+
| `gobi draft add <title> <content> [--session <id>] [--priority N] [--action <label[::message]>]…` | Add a draft. Pass `--action` up to 3 times; each action is `Label` or `Label::Message`. `--session` falls back to `$GOBI_SESSION_ID`. Use `-` for content to read from stdin. |
|
|
250
252
|
| `gobi draft delete <id>` | Delete a draft |
|
|
251
253
|
| `gobi draft prioritize <id> <priority>` | Set priority (lower = higher) |
|
|
252
|
-
| `gobi draft action <id> <index>` | Take one of the draft's suggested actions by 0-based index. Marks `actioned` and posts the
|
|
253
|
-
| `gobi draft revise <id> <comment> [--title <t>] [--content <c>] [--action <label>]…` | Bump revision with a comment; optionally replace title / content / actions in the same call |
|
|
254
|
+
| `gobi draft action <id> <index>` | Take one of the draft's suggested actions by 0-based index. Marks `actioned` and posts the action's `message` (or `label`, if no message) into the originating session. |
|
|
255
|
+
| `gobi draft revise <id> <comment> [--title <t>] [--content <c>] [--action <label[::message]>]…` | Bump revision with a comment; optionally replace title / content / actions in the same call |
|
|
254
256
|
|
|
255
257
|
### Media generation
|
|
256
258
|
|
package/dist/commands/draft.js
CHANGED
|
@@ -16,7 +16,15 @@ function parseActionFlags(values) {
|
|
|
16
16
|
.map((v) => v.trim())
|
|
17
17
|
.filter(Boolean)
|
|
18
18
|
.slice(0, 3)
|
|
19
|
-
.map((
|
|
19
|
+
.map((entry) => {
|
|
20
|
+
const sep = entry.indexOf("::");
|
|
21
|
+
if (sep === -1)
|
|
22
|
+
return { label: entry };
|
|
23
|
+
const label = entry.slice(0, sep).trim();
|
|
24
|
+
const message = entry.slice(sep + 2).trim();
|
|
25
|
+
return message ? { label, message } : { label };
|
|
26
|
+
})
|
|
27
|
+
.filter((a) => a.label.length > 0);
|
|
20
28
|
}
|
|
21
29
|
function formatDraftLine(d) {
|
|
22
30
|
const status = d.status === "pending" ? "·" : "✓";
|
|
@@ -76,7 +84,11 @@ export function registerDraftCommand(program) {
|
|
|
76
84
|
if (d.actions.length) {
|
|
77
85
|
console.log("");
|
|
78
86
|
console.log("Suggested actions:");
|
|
79
|
-
d.actions.forEach((a, i) =>
|
|
87
|
+
d.actions.forEach((a, i) => {
|
|
88
|
+
console.log(` [${i}] ${a.label}`);
|
|
89
|
+
if (a.message)
|
|
90
|
+
console.log(` → ${a.message}`);
|
|
91
|
+
});
|
|
80
92
|
}
|
|
81
93
|
if (d.history.length) {
|
|
82
94
|
console.log("");
|
|
@@ -90,7 +102,9 @@ export function registerDraftCommand(program) {
|
|
|
90
102
|
console.log(` content: ${snippet(h.content, 200)}`);
|
|
91
103
|
}
|
|
92
104
|
if (h.actions !== undefined && h.actions.length) {
|
|
93
|
-
console.log(` actions: ${h.actions
|
|
105
|
+
console.log(` actions: ${h.actions
|
|
106
|
+
.map((a) => (a.message ? `${a.label} :: ${a.message}` : a.label))
|
|
107
|
+
.join(" | ")}`);
|
|
94
108
|
}
|
|
95
109
|
if (h.comment !== undefined)
|
|
96
110
|
console.log(` comment: ${h.comment}`);
|
|
@@ -110,7 +124,7 @@ export function registerDraftCommand(program) {
|
|
|
110
124
|
.description("Add a draft. Pass '-' for content to read from stdin. Pass --action up to 3 times to attach AI-suggested actions. Requires a chat session — the agent runtime exports GOBI_SESSION_ID automatically; outside that, pass --session.")
|
|
111
125
|
.option("--session <sessionId>", "Originating chat session UUID. Falls back to $GOBI_SESSION_ID when set.")
|
|
112
126
|
.option("--priority <number>", "Priority (lower = higher), default 100")
|
|
113
|
-
.option("--action <label>", "Suggested action
|
|
127
|
+
.option("--action <label[::message]>", "Suggested action (repeatable, max 3). `label` is the button text; an optional `::message` suffix is what the user is taken to be saying to the agent on click. Without the suffix, the message falls back to the label.", (value, prev = []) => [...prev, value], [])
|
|
114
128
|
.action(async (title, content, opts) => {
|
|
115
129
|
const sessionId = opts.session || process.env.GOBI_SESSION_ID || "";
|
|
116
130
|
if (!sessionId) {
|
|
@@ -189,7 +203,7 @@ export function registerDraftCommand(program) {
|
|
|
189
203
|
.description("Bump the draft to a new revision. Comment is required. Pass --title, --content, and/or --action to update the draft in the same call (--action repeatable, max 3, replaces all). Pass '-' for any of comment/title/content to read from stdin.")
|
|
190
204
|
.option("--title <title>", "Replacement title")
|
|
191
205
|
.option("--content <content>", "Replacement content; pass '-' to read from stdin")
|
|
192
|
-
.option("--action <label>", "Replacement suggested action
|
|
206
|
+
.option("--action <label[::message]>", "Replacement suggested action (repeatable, max 3). Same `label[::message]` syntax as `draft add`. When passed, replaces the entire actions array.", (value, prev = []) => [...prev, value], [])
|
|
193
207
|
.action(async (draftId, comment, opts) => {
|
|
194
208
|
const body = {
|
|
195
209
|
comment: readContent(comment),
|
package/package.json
CHANGED
|
@@ -117,6 +117,14 @@ JSON responses have the shape `{ "success": true, "data": ... }` on success or `
|
|
|
117
117
|
|
|
118
118
|
> File sync (`gobi vault sync`) lives in the **gobi-vault** skill.
|
|
119
119
|
|
|
120
|
+
## Confirm before mutating
|
|
121
|
+
|
|
122
|
+
`gobi session reply` posts a human-attributed message into a chat session — the message becomes part of the user's permanent chat history and triggers the agent to respond. Before running it, confirm with the user — show the exact session id and the message text. This applies even when running autonomously.
|
|
123
|
+
|
|
124
|
+
`auth login` / `auth logout` and `init` are explicit user-driven commands; they prompt the user themselves and don't need an extra confirmation layer. `update` upgrades the CLI binary — fine to run without extra confirmation.
|
|
125
|
+
|
|
126
|
+
Read-only commands (`auth status`, `session list`, `session get`, `space list`) run without confirmation.
|
|
127
|
+
|
|
120
128
|
## Reference Documentation
|
|
121
129
|
|
|
122
130
|
- [gobi auth](references/auth.md)
|
|
@@ -25,7 +25,9 @@ A draft is a unit of standing guidance authored by an agent (in-process during c
|
|
|
25
25
|
|
|
26
26
|
- **title** — short headline (1–200 chars)
|
|
27
27
|
- **content** — the draft text (markdown, 1–8000 chars)
|
|
28
|
-
- **actions** — 0–3 AI-suggested
|
|
28
|
+
- **actions** — 0–3 AI-suggested actions. Each action is `{ label, message? }`:
|
|
29
|
+
- `label` — short button text (1–80 chars) the user sees, e.g. `"Apply"`, `"Skip"`.
|
|
30
|
+
- `message` — optional (≤2000 chars). What the user is taken to be saying to the agent when they click that button. Falls back to `label` when omitted. Use this whenever the click should send something more specific than the button text — e.g. label `"Punch it up"`, message `"Tighten the opening paragraph and shorten the CTA"`.
|
|
29
31
|
- **sessionId** — required; the chat session that produced the draft
|
|
30
32
|
- **priority** — lower number = higher priority; default `100`
|
|
31
33
|
- **status** — `pending` until the user picks an action, then `actioned`
|
|
@@ -52,23 +54,46 @@ For programmatic/agent usage, always pass `--json` as a **global** option (befor
|
|
|
52
54
|
|
|
53
55
|
```bash
|
|
54
56
|
gobi --json draft list --limit 20
|
|
55
|
-
gobi --json draft add "Concise titles" "Prefer concise titles for personal posts."
|
|
57
|
+
gobi --json draft add "Concise titles" "Prefer concise titles for personal posts." \
|
|
58
|
+
--action "Apply::Yes, rewrite my last three posts with concise titles." \
|
|
59
|
+
--action "Skip" \
|
|
60
|
+
--priority 50
|
|
56
61
|
gobi --json draft action <draftId> 0
|
|
57
62
|
```
|
|
58
63
|
|
|
59
64
|
JSON mode wraps the response as `{"success": true, "data": <draft>}` (or `{"success": false, "error": "..."}`).
|
|
60
65
|
|
|
66
|
+
## Action `label::message` syntax
|
|
67
|
+
|
|
68
|
+
The `--action` flag (on both `add` and `revise`) accepts either form:
|
|
69
|
+
|
|
70
|
+
- `--action "Apply"` — label only; message falls back to `"Apply"` on click.
|
|
71
|
+
- `--action "Apply::Yes, rewrite my last three posts with concise titles."` — label is `Apply`, the click sends the full sentence as the user's next turn into the originating chat session.
|
|
72
|
+
|
|
73
|
+
The literal `::` separator splits the two. Use `message` whenever the click should send something more specific than the button text — that's the whole point of the field. Keep `label` punchy (a few words); put the actual instruction in `message`.
|
|
74
|
+
|
|
75
|
+
When the user picks an action via `gobi draft action <id> <index>`, the response includes the picked action's `message` (or `label` as fallback) in `data.actions[index]`, which the client then posts into the originating session.
|
|
76
|
+
|
|
61
77
|
## Available Commands
|
|
62
78
|
|
|
63
79
|
- `gobi draft` — Drafts authored by your agent during chat. Each carries up to 3 AI-suggested actions. Top-5 pending feed the system prompt; picking an action posts a synthesized message into the originating session.
|
|
64
80
|
- `gobi draft list` — List drafts (priority ASC, then newest first).
|
|
65
81
|
- `gobi draft get` — Show one draft with its history and suggested actions.
|
|
66
|
-
- `gobi draft add` — Add a draft. Pass `--action <label>` up to 3 times to attach AI-suggested actions.
|
|
82
|
+
- `gobi draft add` — Add a draft. Pass `--action <label[::message]>` up to 3 times to attach AI-suggested actions.
|
|
67
83
|
- `gobi draft delete` — Delete a draft.
|
|
68
84
|
- `gobi draft prioritize` — Set priority (lower = higher). Top 5 feed the system prompt.
|
|
69
85
|
- `gobi draft action` — Take one of the draft's suggested actions by 0-based index. Posts the synthesized message into the originating session.
|
|
70
86
|
- `gobi draft revise` — Bump the draft to a new revision with a comment, optionally replacing title / content / actions.
|
|
71
87
|
|
|
88
|
+
## Confirm before mutating
|
|
89
|
+
|
|
90
|
+
Drafts are agent-authored proposals — `add` and `revise` are the agent's normal authoring path and run without extra confirmation. Two commands flip that:
|
|
91
|
+
|
|
92
|
+
- `draft action <id> <index>` — picking an action is **a user decision**. Marks the draft `actioned` (terminal — the agent can't take it back) and posts the action's `message` into the originating session. Don't pick on the user's behalf; only run this when the user has explicitly told you which action to take.
|
|
93
|
+
- `draft delete <id>` — irreversible. Confirm the target id with the user before running.
|
|
94
|
+
|
|
95
|
+
`draft prioritize` is low-stakes (just reorders the prompt feed) — fine to run when the user asks.
|
|
96
|
+
|
|
72
97
|
## Reference Documentation
|
|
73
98
|
|
|
74
99
|
- [gobi draft](references/draft.md)
|
|
@@ -54,10 +54,11 @@ Add a draft. Pass '-' for content to read from stdin. Pass --action up to 3 time
|
|
|
54
54
|
outside that, pass --session.
|
|
55
55
|
|
|
56
56
|
Options:
|
|
57
|
-
--session <sessionId>
|
|
58
|
-
--priority <number>
|
|
59
|
-
--action <label>
|
|
60
|
-
|
|
57
|
+
--session <sessionId> Originating chat session UUID. Falls back to $GOBI_SESSION_ID when set.
|
|
58
|
+
--priority <number> Priority (lower = higher), default 100
|
|
59
|
+
--action <label[::message]> Suggested action (repeatable, max 3). `label` is the button text; an optional `::message` suffix is what the user is taken to be saying to the agent on click. Without
|
|
60
|
+
the suffix, the message falls back to the label. (default: [])
|
|
61
|
+
-h, --help display help for command
|
|
61
62
|
```
|
|
62
63
|
|
|
63
64
|
## delete
|
|
@@ -102,8 +103,8 @@ Bump the draft to a new revision. Comment is required. Pass --title, --content,
|
|
|
102
103
|
comment/title/content to read from stdin.
|
|
103
104
|
|
|
104
105
|
Options:
|
|
105
|
-
--title <title>
|
|
106
|
-
--content <content>
|
|
107
|
-
--action <label>
|
|
108
|
-
-h, --help
|
|
106
|
+
--title <title> Replacement title
|
|
107
|
+
--content <content> Replacement content; pass '-' to read from stdin
|
|
108
|
+
--action <label[::message]> Replacement suggested action (repeatable, max 3). Same `label[::message]` syntax as `draft add`. When passed, replaces the entire actions array. (default: [])
|
|
109
|
+
-h, --help display help for command
|
|
109
110
|
```
|
|
@@ -171,6 +171,17 @@ Do NOT use markdown image/link syntax `` or `gobi://` URLs. Always use `
|
|
|
171
171
|
- `gobi media image-download` — Download a generated image.
|
|
172
172
|
- `gobi media image-status` — Check image generation job status.
|
|
173
173
|
|
|
174
|
+
## Confirm before mutating
|
|
175
|
+
|
|
176
|
+
Media generation jobs consume credits (real-world billable cost) and produce assets attached to the user's account. Videos and avatar work can take minutes per job. Before running any generation/upload command, confirm with the user — show the exact command and the prompt / script / source files / aspect ratio / duration. This applies even when running autonomously.
|
|
177
|
+
|
|
178
|
+
- `image-generate`, `image-edit`, `image-inpaint` — quick but billable per job.
|
|
179
|
+
- `video-create`, `cinematic-create` — slower and more expensive; confirm script, avatar/voice ids, and aspect ratio before submitting.
|
|
180
|
+
- `avatar-design`, `avatar-confirm`, `avatar-from-selfie` — produce assets the user will see in their avatar list. Confirm the photo/prompt and that the user wants the variant locked in (`avatar-confirm` is the commit step).
|
|
181
|
+
- `upload` — adds to the user's media. Low-stakes but still a write; mention the file before uploading.
|
|
182
|
+
|
|
183
|
+
Read-only commands (`avatars`, `voices`, `image-status`, `video-status`, `video-list`, `video-get`, `avatar-job-status`) and downloads (`image-download`, `video-download`) run without confirmation.
|
|
184
|
+
|
|
174
185
|
## Reference Documentation
|
|
175
186
|
|
|
176
187
|
- [gobi media](references/media.md)
|
|
@@ -54,6 +54,16 @@ gobi --json saved note list --date 2026-04-27
|
|
|
54
54
|
- `gobi saved post create --source <id>` — Save a post or reply by id. Records a snapshot in your saved-posts collection.
|
|
55
55
|
- `gobi saved post delete <postId>` — Remove a post from your saved-posts collection.
|
|
56
56
|
|
|
57
|
+
## Confirm before mutating
|
|
58
|
+
|
|
59
|
+
Saved items are the user's private collection but they still persist server-side and deletes are irreversible. Before running any write, confirm with the user — show the command and the note content / target id. This applies even when running autonomously.
|
|
60
|
+
|
|
61
|
+
- `note create`, `note edit` — confirm the content (or content delta on edit).
|
|
62
|
+
- `post create` (snapshotting a feed post) — confirm the source id you're about to bookmark.
|
|
63
|
+
- `note delete`, `post delete` — irreversible. Flag that explicitly and confirm the target id before running.
|
|
64
|
+
|
|
65
|
+
Read-only commands (`note list`, `note get`, `post list`, `post get`) run without confirmation.
|
|
66
|
+
|
|
57
67
|
## Reference Documentation
|
|
58
68
|
|
|
59
69
|
- [gobi saved](references/saved.md)
|
|
@@ -94,6 +94,16 @@ gobi --json space list-posts
|
|
|
94
94
|
- `gobi global edit-reply <replyId>` — Edit a reply you authored.
|
|
95
95
|
- `gobi global delete-reply <replyId>` — Delete a reply you authored.
|
|
96
96
|
|
|
97
|
+
## Confirm before mutating
|
|
98
|
+
|
|
99
|
+
Posts and replies are publicly visible — in a community space (`gobi space …`) or in the global feed (`gobi global …`). Before running any write, confirm with the user — show the exact command and the resolved title, content (or a short preview), and `authorVaultSlug` if `--vault-slug` / `--auto-attachments` is set. This applies even when running autonomously.
|
|
100
|
+
|
|
101
|
+
- `create-post` / `create-reply` — content goes live on submission.
|
|
102
|
+
- `edit-post` / `edit-reply` — confirm the *new* content; people who already saw the original may re-see it.
|
|
103
|
+
- `delete-post` / `delete-reply` — irreversible. Flag that explicitly and confirm the target id before running.
|
|
104
|
+
|
|
105
|
+
Read-only commands (`list-posts`, `get-post`, `feed`, `list-topics`, `list-topic-posts`, `get`) run without confirmation.
|
|
106
|
+
|
|
97
107
|
## Reference Documentation
|
|
98
108
|
|
|
99
109
|
- [gobi space](references/space.md)
|
|
@@ -34,6 +34,14 @@ gobi --json vault publish
|
|
|
34
34
|
- `gobi vault unpublish` — Delete `PUBLISH.md` from the vault on webdrive.
|
|
35
35
|
- `gobi vault sync` — Sync local vault files with Gobi Webdrive. Supports `--upload-only`, `--download-only`, `--conflict <ask|server|client|skip>`, `--dry-run`, `--full`, `--path <p>`, `--plan-file`, `--execute`.
|
|
36
36
|
|
|
37
|
+
## Confirm before mutating
|
|
38
|
+
|
|
39
|
+
Every command in this skill writes external state — webdrive files, the public vault profile, and a Discord notification on `publish`. Before running any of them, confirm with the user — show the exact command and the key changes (which `PUBLISH.md` fields, which paths will sync, which conflict policy). This applies even when running autonomously.
|
|
40
|
+
|
|
41
|
+
- `vault publish` — public profile change + Discord ping. Always confirm.
|
|
42
|
+
- `vault unpublish` — removes the live profile. Always confirm.
|
|
43
|
+
- `vault sync` — can overwrite remote or local files. Run `--dry-run` first and show the user the plan before re-running without `--dry-run`. With `--conflict server` or `--conflict client`, name which side is going to be overwritten.
|
|
44
|
+
|
|
37
45
|
## PUBLISH.md Frontmatter Reference
|
|
38
46
|
|
|
39
47
|
`PUBLISH.md` is the metadata file at the root of every vault. Its YAML frontmatter controls the vault's public profile, homepage, and AI agent behavior. Example:
|