@gobi-ai/cli 2.0.24 → 2.0.25
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 +3 -3
- package/.claude-plugin/plugin.json +2 -2
- package/README.md +30 -35
- package/dist/commands/artifact.js +472 -0
- package/dist/commands/global.js +24 -79
- package/dist/commands/personal.js +23 -76
- package/dist/commands/space.js +25 -80
- package/dist/commands/utils.js +0 -15
- package/dist/commands/vault.js +1 -1
- package/dist/main.js +2 -2
- package/package.json +1 -1
- package/skills/gobi-artifact/SKILL.md +133 -0
- package/skills/gobi-artifact/references/artifact.md +142 -0
- package/skills/gobi-core/SKILL.md +6 -7
- package/skills/gobi-homepage/SKILL.md +1 -1
- package/skills/gobi-media/SKILL.md +2 -2
- package/skills/gobi-sense/SKILL.md +2 -2
- package/skills/gobi-space/SKILL.md +12 -18
- package/skills/gobi-space/references/global.md +5 -12
- package/skills/gobi-space/references/personal.md +2 -8
- package/skills/gobi-space/references/space.md +4 -10
- package/skills/gobi-vault/SKILL.md +3 -3
- package/skills/gobi-vault/references/vault.md +2 -2
- package/dist/commands/draft.js +0 -230
- package/skills/gobi-draft/SKILL.md +0 -113
- package/skills/gobi-draft/references/draft.md +0 -114
package/dist/commands/draft.js
DELETED
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import { apiDelete, apiGet, apiPatch, apiPost } from "../client.js";
|
|
2
|
-
import { isJsonMode, jsonOut, readStdin, unwrapResp } from "./utils.js";
|
|
3
|
-
function readContent(value) {
|
|
4
|
-
if (value === "-")
|
|
5
|
-
return readStdin();
|
|
6
|
-
return value;
|
|
7
|
-
}
|
|
8
|
-
function snippet(content, max = 80) {
|
|
9
|
-
const single = content.replace(/\s+/g, " ");
|
|
10
|
-
return single.length > max ? `${single.slice(0, max)}…` : single;
|
|
11
|
-
}
|
|
12
|
-
function parseActionFlags(values) {
|
|
13
|
-
if (!values)
|
|
14
|
-
return [];
|
|
15
|
-
return values
|
|
16
|
-
.map((v) => v.trim())
|
|
17
|
-
.filter(Boolean)
|
|
18
|
-
.slice(0, 3)
|
|
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);
|
|
28
|
-
}
|
|
29
|
-
function formatDraftLine(d) {
|
|
30
|
-
const status = d.status === "pending" ? "·" : "✓";
|
|
31
|
-
const actionCount = d.actions.length;
|
|
32
|
-
return `- [${status}] p${d.priority} rev${d.revision} ${d.draftId.slice(0, 8)} ${snippet(d.title)} (${actionCount} action${actionCount === 1 ? "" : "s"})`;
|
|
33
|
-
}
|
|
34
|
-
export function registerDraftCommand(program) {
|
|
35
|
-
// The draft command surface is designed for agent use: every subcommand
|
|
36
|
-
// accepts `--json` (set globally) and returns the same envelope shape, and
|
|
37
|
-
// the agent-authoring flow funnels through `add` + `revise` while user-
|
|
38
|
-
// facing decisions go through `action` and `revise` (with --comment).
|
|
39
|
-
const draft = program
|
|
40
|
-
.command("draft")
|
|
41
|
-
.description("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.");
|
|
42
|
-
// ── List ──
|
|
43
|
-
draft
|
|
44
|
-
.command("list")
|
|
45
|
-
.description("List drafts (priority ASC, then newest first).")
|
|
46
|
-
.option("--limit <number>", "Items per page", "20")
|
|
47
|
-
.action(async (opts) => {
|
|
48
|
-
const params = { limit: parseInt(opts.limit, 10) };
|
|
49
|
-
const resp = (await apiGet("/app/drafts", params));
|
|
50
|
-
const items = (resp.data || []);
|
|
51
|
-
if (isJsonMode(draft)) {
|
|
52
|
-
jsonOut(items);
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
if (!items.length) {
|
|
56
|
-
console.log("No drafts.");
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
console.log(`Drafts (${items.length}):`);
|
|
60
|
-
for (const d of items)
|
|
61
|
-
console.log(formatDraftLine(d));
|
|
62
|
-
});
|
|
63
|
-
// ── Get ──
|
|
64
|
-
draft
|
|
65
|
-
.command("get <draftId>")
|
|
66
|
-
.description("Get one draft with its history and suggested actions.")
|
|
67
|
-
.action(async (draftId) => {
|
|
68
|
-
const resp = (await apiGet(`/app/drafts/${draftId}`));
|
|
69
|
-
const d = unwrapResp(resp);
|
|
70
|
-
if (isJsonMode(draft)) {
|
|
71
|
-
jsonOut(d);
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
console.log(`Draft ${d.draftId}`);
|
|
75
|
-
console.log(` title: ${d.title}`);
|
|
76
|
-
console.log(` status: ${d.status}`);
|
|
77
|
-
console.log(` priority: ${d.priority}`);
|
|
78
|
-
console.log(` revision: ${d.revision}`);
|
|
79
|
-
console.log(` session: ${d.sessionId}`);
|
|
80
|
-
if (d.vaultSlug)
|
|
81
|
-
console.log(` vault: ${d.vaultSlug}`);
|
|
82
|
-
console.log(` created: ${d.createdAt}`);
|
|
83
|
-
console.log("");
|
|
84
|
-
console.log("Content:");
|
|
85
|
-
console.log(d.content);
|
|
86
|
-
if (d.actions.length) {
|
|
87
|
-
console.log("");
|
|
88
|
-
console.log("Suggested actions:");
|
|
89
|
-
d.actions.forEach((a, i) => {
|
|
90
|
-
console.log(` [${i}] ${a.label}`);
|
|
91
|
-
if (a.message)
|
|
92
|
-
console.log(` → ${a.message}`);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
if (d.history.length) {
|
|
96
|
-
console.log("");
|
|
97
|
-
console.log("History:");
|
|
98
|
-
for (const h of d.history) {
|
|
99
|
-
console.log(` ${h.createdAt} rev${h.revision} ${h.type}`);
|
|
100
|
-
if (h.type === "created" || h.type === "revised") {
|
|
101
|
-
if (h.title !== undefined)
|
|
102
|
-
console.log(` title: ${h.title}`);
|
|
103
|
-
if (h.content !== undefined) {
|
|
104
|
-
console.log(` content: ${snippet(h.content, 200)}`);
|
|
105
|
-
}
|
|
106
|
-
if (h.actions !== undefined && h.actions.length) {
|
|
107
|
-
console.log(` actions: ${h.actions
|
|
108
|
-
.map((a) => (a.message ? `${a.label} :: ${a.message}` : a.label))
|
|
109
|
-
.join(" | ")}`);
|
|
110
|
-
}
|
|
111
|
-
if (h.comment !== undefined)
|
|
112
|
-
console.log(` comment: ${h.comment}`);
|
|
113
|
-
}
|
|
114
|
-
else if (h.type === "prioritized" && h.priority !== undefined) {
|
|
115
|
-
console.log(` priority=${h.priority}`);
|
|
116
|
-
}
|
|
117
|
-
else if (h.type === "actioned") {
|
|
118
|
-
console.log(` action[${h.actionIndex}]=${h.actionLabel}`);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
// ── Add ──
|
|
124
|
-
draft
|
|
125
|
-
.command("add <title> <content>")
|
|
126
|
-
.description("Add a draft. Pass '-' for content to read from stdin. Pass --action up to 3 times to attach AI-suggested actions. Session id is optional: the Gobi agent runtime exports GOBI_SESSION_ID automatically and `--session` takes precedence; if neither is set, the server mints a new chat session anchored to your primary vault and seeds it with the draft so clicking an action later has somewhere to land.")
|
|
127
|
-
.option("--session <sessionId>", "Originating chat session UUID. Falls back to $GOBI_SESSION_ID; if unset, the server creates a new session.")
|
|
128
|
-
.option("--priority <number>", "Priority (lower = higher), default 100")
|
|
129
|
-
.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], [])
|
|
130
|
-
.option("--vault-slug <vaultSlug>", "Anchor vault for this draft. When set, clients render the draft against this vault, and a sessionId-less create bootstraps the new chat session here instead of your primary vault.")
|
|
131
|
-
.action(async (title, content, opts) => {
|
|
132
|
-
const sessionId = opts.session || process.env.GOBI_SESSION_ID;
|
|
133
|
-
const body = {
|
|
134
|
-
title,
|
|
135
|
-
content: readContent(content),
|
|
136
|
-
};
|
|
137
|
-
if (sessionId)
|
|
138
|
-
body.sessionId = sessionId;
|
|
139
|
-
if (opts.priority)
|
|
140
|
-
body.priority = parseInt(opts.priority, 10);
|
|
141
|
-
const actions = parseActionFlags(opts.action);
|
|
142
|
-
if (actions.length)
|
|
143
|
-
body.actions = actions;
|
|
144
|
-
if (opts.vaultSlug)
|
|
145
|
-
body.vaultSlug = opts.vaultSlug;
|
|
146
|
-
const resp = (await apiPost("/app/drafts", body));
|
|
147
|
-
const d = unwrapResp(resp);
|
|
148
|
-
if (isJsonMode(draft)) {
|
|
149
|
-
jsonOut(d);
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
console.log(`Created ${d.draftId} (priority ${d.priority}, ${d.actions.length} action${d.actions.length === 1 ? "" : "s"}).`);
|
|
153
|
-
});
|
|
154
|
-
// ── Delete ──
|
|
155
|
-
draft
|
|
156
|
-
.command("delete <draftId>")
|
|
157
|
-
.description("Delete a draft.")
|
|
158
|
-
.action(async (draftId) => {
|
|
159
|
-
await apiDelete(`/app/drafts/${draftId}`);
|
|
160
|
-
if (isJsonMode(draft)) {
|
|
161
|
-
jsonOut({ id: draftId });
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
console.log(`Deleted ${draftId}.`);
|
|
165
|
-
});
|
|
166
|
-
// ── Prioritize ──
|
|
167
|
-
draft
|
|
168
|
-
.command("prioritize <draftId> <priority>")
|
|
169
|
-
.description("Set priority (lower = higher). Top 5 feed the system prompt.")
|
|
170
|
-
.action(async (draftId, priority) => {
|
|
171
|
-
const resp = (await apiPatch(`/app/drafts/${draftId}/priority`, {
|
|
172
|
-
priority: parseInt(priority, 10),
|
|
173
|
-
}));
|
|
174
|
-
const d = unwrapResp(resp);
|
|
175
|
-
if (isJsonMode(draft)) {
|
|
176
|
-
jsonOut(d);
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
console.log(`Set ${d.draftId} priority to ${d.priority}.`);
|
|
180
|
-
});
|
|
181
|
-
// ── Action ──
|
|
182
|
-
draft
|
|
183
|
-
.command("action <draftId> <actionIndex>")
|
|
184
|
-
.description("Take one of the draft's suggested actions by 0-based index. Marks the draft 'actioned' and the client posts the synthesized message into the originating session.")
|
|
185
|
-
.action(async (draftId, actionIndex) => {
|
|
186
|
-
const idx = parseInt(actionIndex, 10);
|
|
187
|
-
if (Number.isNaN(idx) || idx < 0 || idx > 2) {
|
|
188
|
-
throw new Error("actionIndex must be 0, 1, or 2.");
|
|
189
|
-
}
|
|
190
|
-
const resp = (await apiPost(`/app/drafts/${draftId}/action`, {
|
|
191
|
-
actionIndex: idx,
|
|
192
|
-
}));
|
|
193
|
-
const d = unwrapResp(resp);
|
|
194
|
-
if (isJsonMode(draft)) {
|
|
195
|
-
jsonOut(d);
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
const label = d.actions[idx]?.label ?? `action ${idx}`;
|
|
199
|
-
console.log(`Took action "${label}" on ${d.draftId}.`);
|
|
200
|
-
});
|
|
201
|
-
// ── Revise ──
|
|
202
|
-
draft
|
|
203
|
-
.command("revise <draftId> <comment>")
|
|
204
|
-
.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.")
|
|
205
|
-
.option("--title <title>", "Replacement title")
|
|
206
|
-
.option("--content <content>", "Replacement content; pass '-' to read from stdin")
|
|
207
|
-
.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], [])
|
|
208
|
-
.option("--vault-slug <vaultSlug>", "Replacement anchor vault. When set, switches the draft's anchor vault. Carries forward when omitted.")
|
|
209
|
-
.action(async (draftId, comment, opts) => {
|
|
210
|
-
const body = {
|
|
211
|
-
comment: readContent(comment),
|
|
212
|
-
};
|
|
213
|
-
if (opts.title !== undefined)
|
|
214
|
-
body.title = opts.title;
|
|
215
|
-
if (opts.content !== undefined)
|
|
216
|
-
body.content = readContent(opts.content);
|
|
217
|
-
if (opts.action && opts.action.length > 0) {
|
|
218
|
-
body.actions = parseActionFlags(opts.action);
|
|
219
|
-
}
|
|
220
|
-
if (opts.vaultSlug !== undefined)
|
|
221
|
-
body.vaultSlug = opts.vaultSlug;
|
|
222
|
-
const resp = (await apiPost(`/app/drafts/${draftId}/revise`, body));
|
|
223
|
-
const d = unwrapResp(resp);
|
|
224
|
-
if (isJsonMode(draft)) {
|
|
225
|
-
jsonOut(d);
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
console.log(`Revised ${d.draftId} → rev${d.revision}.`);
|
|
229
|
-
});
|
|
230
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gobi-draft
|
|
3
|
-
description: >-
|
|
4
|
-
Gobi draft commands for managing agent-authored drafts: list, get, add,
|
|
5
|
-
delete, prioritize, action, revise. Each draft carries 0–3 AI-suggested
|
|
6
|
-
actions; the user picks one with `draft action`. The top-priority pending
|
|
7
|
-
drafts feed into the agent's system prompt every turn. Use when the user
|
|
8
|
-
wants to review, organize, or respond to drafts — or when an agent (using
|
|
9
|
-
gobi-cli as its tool layer) wants to record a draft it just composed.
|
|
10
|
-
allowed-tools: Bash(gobi:*)
|
|
11
|
-
metadata:
|
|
12
|
-
author: gobi-ai
|
|
13
|
-
version: "2.0.24"
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# gobi-draft
|
|
17
|
-
|
|
18
|
-
Gobi draft commands for managing agent-authored drafts (v2.0.24).
|
|
19
|
-
|
|
20
|
-
Requires gobi-cli installed and authenticated. See gobi-core skill for setup.
|
|
21
|
-
|
|
22
|
-
## What is a draft?
|
|
23
|
-
|
|
24
|
-
A draft is a unit of standing guidance authored by an agent (in-process during chat, or via `gobi draft add` when the agent uses gobi-cli as its tool layer). Each draft has:
|
|
25
|
-
|
|
26
|
-
- **title** — short headline (1–200 chars)
|
|
27
|
-
- **content** — the draft text (markdown, 1–8000 chars)
|
|
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"`.
|
|
31
|
-
- **sessionId** — the chat session the draft is anchored to. Optional on create: when omitted, the server mints a fresh session anchored to the draft's vault (or the user's primary if `vaultSlug` is unset) and seeds it with a tool-call entry representing the draft, so clicking an action later has somewhere to land.
|
|
32
|
-
- **vaultSlug** — optional anchor vault slug. When set, clients render the draft against this vault's identity and the bootstrap session (created when no `sessionId` is passed) is anchored here instead of the user's primary. Pass `--vault-slug <slug>` on `add` or `revise`. Caller must own the vault.
|
|
33
|
-
- **priority** — lower number = higher priority; default `100`
|
|
34
|
-
- **status** — `pending` until the user picks an action, then `actioned`
|
|
35
|
-
- **revision** — bumped each time the draft is revised
|
|
36
|
-
- **history** — append-only log of `created`, `revised`, `prioritized`, and `actioned` events
|
|
37
|
-
|
|
38
|
-
The top 5 pending drafts (lowest priority first) are injected into the agent's system prompt every turn — that's how drafts turn into standing instructions.
|
|
39
|
-
|
|
40
|
-
When invoked from inside the Gobi agent runtime, `GOBI_SESSION_ID` is exported and `gobi draft add` picks it up automatically. Outside that runtime (e.g. local Claude Code, ad-hoc shells), you can either pass `--session <uuid>` to anchor to an existing chat session, or omit it entirely — the server will mint a new session and seed it with the draft so the action click lands somewhere coherent.
|
|
41
|
-
|
|
42
|
-
## Lifecycle
|
|
43
|
-
|
|
44
|
-
A draft is **authored** by an agent (`gobi draft add` with up to three `--action` flags). The user can then:
|
|
45
|
-
|
|
46
|
-
- **Take an action**: `gobi draft action <id> <index>` — flips status to `actioned`, the client posts the synthesized message ("Take action 'X' on draft Y") into the originating chat session.
|
|
47
|
-
- **Ask to revise**: `gobi draft revise <id> <comment>` — bumps revision and records the comment. The agent's next turn should produce a fresh `gobi draft revise --title --content --action ...` (or a new `add`) addressing the comment.
|
|
48
|
-
- **Re-prioritize / delete** as bookkeeping.
|
|
49
|
-
|
|
50
|
-
Only pending drafts can be revised. Picking an action is terminal; the agent can author a fresh draft if the user later changes their mind.
|
|
51
|
-
|
|
52
|
-
## Important: JSON Mode
|
|
53
|
-
|
|
54
|
-
For programmatic/agent usage, always pass `--json` as a **global** option (before the subcommand):
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
gobi --json draft list --limit 20
|
|
58
|
-
gobi --json draft add "Concise titles" "Prefer concise titles for personal posts." \
|
|
59
|
-
--action "Apply::Yes, rewrite my last three posts with concise titles." \
|
|
60
|
-
--action "Skip" \
|
|
61
|
-
--priority 50
|
|
62
|
-
gobi --json draft action <draftId> 0
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
JSON mode wraps the response as `{"success": true, "data": <draft>}` (or `{"success": false, "error": "..."}`).
|
|
66
|
-
|
|
67
|
-
## Action `label::message` syntax
|
|
68
|
-
|
|
69
|
-
The `--action` flag (on both `add` and `revise`) accepts either form:
|
|
70
|
-
|
|
71
|
-
- `--action "Apply"` — label only; message falls back to `"Apply"` on click.
|
|
72
|
-
- `--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.
|
|
73
|
-
|
|
74
|
-
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`.
|
|
75
|
-
|
|
76
|
-
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.
|
|
77
|
-
|
|
78
|
-
## Linking a created post back to its draft
|
|
79
|
-
|
|
80
|
-
When the user picks an action like "Post to Global Feed" / "Post to <space>" / "Save to Personal Space" and your next turn creates the post, pass `--draft-id <draftId>` to the relevant create command. `--draft-id` is the **sole** source of `title` and `content` — the CLI fetches the draft and uses its title and content directly, so `--title` / `--content` / `--rich-text` are not allowed alongside it on `create-post`. If you want to change the wording, `gobi draft revise` first, then create.
|
|
81
|
-
|
|
82
|
-
- `gobi space create-post --draft-id` / `gobi global create-post --draft-id` / `gobi personal create-post --draft-id` — uses draft's title and content as the post's `title` and `content`. The draft's `vaultSlug` (when set) seeds `--vault-slug` if not given explicitly. `--auto-attachments`, `--space-slug`, and an explicit `--vault-slug` override remain allowed. Records `{ postId, spaceSlug? }` on `draft.metadata` for an "Open post" button.
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
gobi --json global create-post --draft-id <draftId>
|
|
86
|
-
gobi --json space create-post --space-slug <slug> --draft-id <draftId>
|
|
87
|
-
gobi --json personal create-post --draft-id <draftId>
|
|
88
|
-
gobi --json global create-post --draft-id <draftId> --auto-attachments
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Available Commands
|
|
92
|
-
|
|
93
|
-
- `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.
|
|
94
|
-
- `gobi draft list` — List drafts (priority ASC, then newest first).
|
|
95
|
-
- `gobi draft get` — Show one draft with its history and suggested actions.
|
|
96
|
-
- `gobi draft add` — Add a draft. Pass `--action <label[::message]>` up to 3 times to attach AI-suggested actions. Pass `--vault-slug <slug>` to anchor the draft to a specific vault.
|
|
97
|
-
- `gobi draft delete` — Delete a draft.
|
|
98
|
-
- `gobi draft prioritize` — Set priority (lower = higher). Top 5 feed the system prompt.
|
|
99
|
-
- `gobi draft action` — Take one of the draft's suggested actions by 0-based index. Posts the synthesized message into the originating session.
|
|
100
|
-
- `gobi draft revise` — Bump the draft to a new revision with a comment, optionally replacing title / content / actions / vault-slug.
|
|
101
|
-
|
|
102
|
-
## Confirm before mutating
|
|
103
|
-
|
|
104
|
-
Drafts are agent-authored proposals — `add` and `revise` are the agent's normal authoring path and run without extra confirmation. Two commands flip that:
|
|
105
|
-
|
|
106
|
-
- `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.
|
|
107
|
-
- `draft delete <id>` — irreversible. Confirm the target id with the user before running.
|
|
108
|
-
|
|
109
|
-
`draft prioritize` is low-stakes (just reorders the prompt feed) — fine to run when the user asks.
|
|
110
|
-
|
|
111
|
-
## Reference Documentation
|
|
112
|
-
|
|
113
|
-
- [gobi draft](references/draft.md)
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
# gobi draft
|
|
2
|
-
|
|
3
|
-
```
|
|
4
|
-
Usage: gobi draft [options] [command]
|
|
5
|
-
|
|
6
|
-
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.
|
|
7
|
-
|
|
8
|
-
Options:
|
|
9
|
-
-h, --help display help for command
|
|
10
|
-
|
|
11
|
-
Commands:
|
|
12
|
-
list [options] List drafts (priority ASC, then newest first).
|
|
13
|
-
get <draftId> Get one draft with its history and suggested actions.
|
|
14
|
-
add [options] <title> <content> Add a draft. Pass '-' for content to read from stdin. Pass --action up to 3 times to attach AI-suggested actions. Session id is optional: the Gobi agent
|
|
15
|
-
runtime exports GOBI_SESSION_ID automatically and `--session` takes precedence; if neither is set, the server mints a new chat session anchored to your primary
|
|
16
|
-
vault and seeds it with the draft so clicking an action later has somewhere to land.
|
|
17
|
-
delete <draftId> Delete a draft.
|
|
18
|
-
prioritize <draftId> <priority> Set priority (lower = higher). Top 5 feed the system prompt.
|
|
19
|
-
action <draftId> <actionIndex> Take one of the draft's suggested actions by 0-based index. Marks the draft 'actioned' and the client posts the synthesized message into the originating
|
|
20
|
-
session.
|
|
21
|
-
revise [options] <draftId> <comment> 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
|
|
22
|
-
3, replaces all). Pass '-' for any of comment/title/content to read from stdin.
|
|
23
|
-
help [command] display help for command
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## list
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
Usage: gobi draft list [options]
|
|
30
|
-
|
|
31
|
-
List drafts (priority ASC, then newest first).
|
|
32
|
-
|
|
33
|
-
Options:
|
|
34
|
-
--limit <number> Items per page (default: "20")
|
|
35
|
-
-h, --help display help for command
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## get
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
Usage: gobi draft get [options] <draftId>
|
|
42
|
-
|
|
43
|
-
Get one draft with its history and suggested actions.
|
|
44
|
-
|
|
45
|
-
Options:
|
|
46
|
-
-h, --help display help for command
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## add
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
Usage: gobi draft add [options] <title> <content>
|
|
53
|
-
|
|
54
|
-
Add a draft. Pass '-' for content to read from stdin. Pass --action up to 3 times to attach AI-suggested actions. Session id is optional: the Gobi agent runtime exports GOBI_SESSION_ID automatically
|
|
55
|
-
and `--session` takes precedence; if neither is set, the server mints a new chat session anchored to your primary vault and seeds it with the draft so clicking an action later has somewhere to land.
|
|
56
|
-
|
|
57
|
-
Options:
|
|
58
|
-
--session <sessionId> Originating chat session UUID. Falls back to $GOBI_SESSION_ID; if unset, the server creates a new session.
|
|
59
|
-
--priority <number> Priority (lower = higher), default 100
|
|
60
|
-
--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
|
|
61
|
-
the suffix, the message falls back to the label. (default: [])
|
|
62
|
-
--vault-slug <vaultSlug> Anchor vault for this draft. When set, clients render the draft against this vault, and a sessionId-less create bootstraps the new chat session here instead of your
|
|
63
|
-
primary vault.
|
|
64
|
-
-h, --help display help for command
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## delete
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
Usage: gobi draft delete [options] <draftId>
|
|
71
|
-
|
|
72
|
-
Delete a draft.
|
|
73
|
-
|
|
74
|
-
Options:
|
|
75
|
-
-h, --help display help for command
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## prioritize
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
Usage: gobi draft prioritize [options] <draftId> <priority>
|
|
82
|
-
|
|
83
|
-
Set priority (lower = higher). Top 5 feed the system prompt.
|
|
84
|
-
|
|
85
|
-
Options:
|
|
86
|
-
-h, --help display help for command
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## action
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
Usage: gobi draft action [options] <draftId> <actionIndex>
|
|
93
|
-
|
|
94
|
-
Take one of the draft's suggested actions by 0-based index. Marks the draft 'actioned' and the client posts the synthesized message into the originating session.
|
|
95
|
-
|
|
96
|
-
Options:
|
|
97
|
-
-h, --help display help for command
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## revise
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
Usage: gobi draft revise [options] <draftId> <comment>
|
|
104
|
-
|
|
105
|
-
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
|
|
106
|
-
comment/title/content to read from stdin.
|
|
107
|
-
|
|
108
|
-
Options:
|
|
109
|
-
--title <title> Replacement title
|
|
110
|
-
--content <content> Replacement content; pass '-' to read from stdin
|
|
111
|
-
--action <label[::message]> Replacement suggested action (repeatable, max 3). Same `label[::message]` syntax as `draft add`. When passed, replaces the entire actions array. (default: [])
|
|
112
|
-
--vault-slug <vaultSlug> Replacement anchor vault. When set, switches the draft's anchor vault. Carries forward when omitted.
|
|
113
|
-
-h, --help display help for command
|
|
114
|
-
```
|