@gobi-ai/cli 2.0.23 → 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 +33 -81
- package/dist/commands/personal.js +32 -78
- package/dist/commands/space.js +34 -82
- 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 +7 -12
- package/skills/gobi-space/references/personal.md +4 -8
- package/skills/gobi-space/references/space.md +6 -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
|
@@ -11,12 +11,12 @@ description: >-
|
|
|
11
11
|
allowed-tools: Bash(gobi:*)
|
|
12
12
|
metadata:
|
|
13
13
|
author: gobi-ai
|
|
14
|
-
version: "2.0.
|
|
14
|
+
version: "2.0.25"
|
|
15
15
|
---
|
|
16
16
|
|
|
17
17
|
# gobi-space
|
|
18
18
|
|
|
19
|
-
Gobi space, global, and personal-space posts (v2.0.
|
|
19
|
+
Gobi space, global, and personal-space posts (v2.0.25).
|
|
20
20
|
|
|
21
21
|
Requires gobi-cli installed and authenticated. See the **gobi-core** skill for setup.
|
|
22
22
|
|
|
@@ -49,17 +49,15 @@ The same applies to replies: a reply has only `--content` (no title), so do not
|
|
|
49
49
|
|
|
50
50
|
`create-post` / `edit-post` across all three scopes (`gobi space`, `gobi global`, `gobi personal`) accept `--vault-slug <slug>`. When set, the slug becomes the post's `authorVaultSlug` — the vault the user is posting on behalf of. The caller must hold `role: 'owner'` on that vault. Pass `--vault-slug ""` on edit to detach.
|
|
51
51
|
|
|
52
|
-
`--auto-attachments`
|
|
53
|
-
|
|
54
|
-
> **Before using `--auto-attachments`, check that the target vault is published.** Run `gobi --json vault status` (or `gobi vault status --vault-slug <slug>`) and verify `isPublished: true`. Files uploaded to a non-public vault are stored on webdrive but are not reachable at `gobispace.com/@{vaultSlug}` — readers will see broken `[[wikilinks]]`. If the status reports unpublished, ask the user to run `gobi vault publish` first (the server rejects the publish if `title` and `description` are missing from `PUBLISH.md` frontmatter). See the **gobi-vault** skill.
|
|
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`.
|
|
55
53
|
|
|
56
54
|
## Post media attachments (`--attach`)
|
|
57
55
|
|
|
58
|
-
|
|
56
|
+
`create-post` and `create-reply` across all three scopes (`gobi space`, `gobi global`, `gobi personal`) accept `--attach <file>` (repeatable) for inline post media — the photos/GIF/video that render in-feed alongside the post body. The CLI uploads each file to S3 via `POST /posts/upload-url` and passes the resulting `{ mediaUrl, mediaKey }` array as the post's `attachments`.
|
|
59
57
|
|
|
60
58
|
X-style mix rule (enforced client-side before upload): up to **4 photos** OR **1 GIF** OR **1 video** — they don't combine. Server-side ceilings: 5MB photos, 15MB GIFs, 512MB video.
|
|
61
59
|
|
|
62
|
-
Use `--attach` for media you want shown in the post itself; use
|
|
60
|
+
Use `--attach` for media you want shown in the post itself; use a markdown **artifact** (`gobi artifact create`) for `[[wikilinks]]`-bearing creations attached to the post.
|
|
63
61
|
|
|
64
62
|
## Public link formats
|
|
65
63
|
|
|
@@ -86,7 +84,7 @@ When you echo a "Post created!" line (or the JSON response is consumed by anothe
|
|
|
86
84
|
|
|
87
85
|
If `.gobi/settings.yaml` has no `selectedSpaceSlug` and `--space-slug` isn't passed, the command will error.
|
|
88
86
|
|
|
89
|
-
`gobi global` commands target the public global feed and have no space requirement and no `.gobi` requirement. `gobi global create-post` is symmetric with `gobi space create-post`: a vault is **optional** — pass `--vault-slug <slug>`
|
|
87
|
+
`gobi global` commands target the public global feed and have no space requirement and no `.gobi` requirement. `gobi global create-post` is symmetric with `gobi space create-post`: a vault is **optional** — pass `--vault-slug <slug>` to attribute the post; with no flag the post is created without an `authorVaultSlug`.
|
|
90
88
|
|
|
91
89
|
## Important: JSON Mode
|
|
92
90
|
|
|
@@ -114,7 +112,7 @@ gobi --json space list-posts
|
|
|
114
112
|
### Space posts
|
|
115
113
|
- `gobi space list-posts` — List posts in a space (paginated).
|
|
116
114
|
- `gobi space get-post <postId>` — Get a post with its ancestors and replies (paginated). Ancestors and replies are returned together; there is no separate `ancestors` or `list-replies` command.
|
|
117
|
-
- `gobi space create-post` — Create a space post. `--vault-slug` attributes it to a vault you own
|
|
115
|
+
- `gobi space create-post` — Create a space post. `--vault-slug` attributes it to a vault you own.
|
|
118
116
|
- `gobi space edit-post <postId>` — Edit a space post. You must be the author. `--vault-slug ""` detaches the vault.
|
|
119
117
|
- `gobi space delete-post <postId>` — Delete a space post. You must be the author.
|
|
120
118
|
|
|
@@ -130,11 +128,11 @@ gobi --json space list-posts
|
|
|
130
128
|
- `gobi global feed` — List the public global feed (posts and replies, newest first).
|
|
131
129
|
- `gobi global list-posts` — List personal posts. `--mine` for your own; `--vault-slug <slug>` to filter by author vault.
|
|
132
130
|
- `gobi global get-post <postId>` — Get a personal post with its ancestors and replies.
|
|
133
|
-
- `gobi global create-post` — Create a personal post. `--vault-slug`
|
|
134
|
-
- `gobi global edit-post <postId>` — Edit a personal post you authored. `--vault-slug ""` detaches the vault
|
|
131
|
+
- `gobi global create-post` — Create a personal post. `--vault-slug` works the same as on `space create-post`. It is optional: with no flag, the post is created without an `authorVaultSlug` (vault-less personal post).
|
|
132
|
+
- `gobi global edit-post <postId>` — Edit a personal post you authored. `--vault-slug ""` detaches the vault.
|
|
135
133
|
- `gobi global delete-post <postId>` — Delete a personal post you authored.
|
|
136
134
|
- `gobi global create-reply <postId>` — Reply to a personal post.
|
|
137
|
-
- `gobi global edit-reply <replyId>` — Edit a reply you authored. Accepts `--
|
|
135
|
+
- `gobi global edit-reply <replyId>` — Edit a reply you authored. Accepts `--vault-slug` for author attribution (mirrors `space edit-reply`).
|
|
138
136
|
- `gobi global delete-reply <replyId>` — Delete a reply you authored.
|
|
139
137
|
|
|
140
138
|
### Personal-space posts (private)
|
|
@@ -146,7 +144,7 @@ A couple of read-side flags don't mirror — `personal feed` has no `--following
|
|
|
146
144
|
- `gobi personal feed` — Your personal-space feed (posts and replies, newest first).
|
|
147
145
|
- `gobi personal list-posts` — List your personal-space posts.
|
|
148
146
|
- `gobi personal get-post <postId>` — Get a personal-space post with its ancestors and replies.
|
|
149
|
-
- `gobi personal create-post` — Create a private personal-space post. Same flags as `gobi global create-post` (`--vault-slug`, `--
|
|
147
|
+
- `gobi personal create-post` — Create a private personal-space post. Same flags as `gobi global create-post` (`--vault-slug`, `--repost-post-id`, `--attach`).
|
|
150
148
|
- `gobi personal edit-post <postId>` — Edit a personal-space post you authored.
|
|
151
149
|
- `gobi personal delete-post <postId>` — Delete a personal-space post you authored.
|
|
152
150
|
- `gobi personal create-reply <postId>` — Reply to a personal-space post (inherits the parent's private scope).
|
|
@@ -155,13 +153,9 @@ A couple of read-side flags don't mirror — `personal feed` has no `--following
|
|
|
155
153
|
|
|
156
154
|
## Confirm before mutating
|
|
157
155
|
|
|
158
|
-
Most posts and replies are publicly visible — in a community space (`gobi space …`) or in the global feed (`gobi global …`). `gobi personal …` is the exception: those rows are private to the author. Either way, 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`
|
|
156
|
+
Most posts and replies are publicly visible — in a community space (`gobi space …`) or in the global feed (`gobi global …`). `gobi personal …` is the exception: those rows are private to the author. Either way, 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` is set. This applies even when running autonomously.
|
|
159
157
|
|
|
160
158
|
- `create-post` / `create-reply` — content goes live on submission.
|
|
161
|
-
|
|
162
|
-
### Linking back to a draft
|
|
163
|
-
|
|
164
|
-
When a `create-post` is the side-effect of an actioned draft (e.g. the user picked "Post to Global Feed" / "Post to <space>"), pass `--draft-id <draftId>` to `gobi space create-post` or `gobi global create-post`. `--draft-id` is the **sole** source of `title` and `content` — it cannot coexist with `--title`, `--content`, or `--rich-text`. To change the wording, `gobi draft revise` first, then create the post. The draft's `vaultSlug` (when set) seeds the post's `--vault-slug` if not given explicitly. `--auto-attachments` and an explicit `--vault-slug` override are still allowed. On success the CLI records `{ postId, spaceSlug? }` on `draft.metadata`, which the client renders as an "Open post" button on the actioned draft.
|
|
165
159
|
- `edit-post` / `edit-reply` — confirm the *new* content; people who already saw the original may re-see it.
|
|
166
160
|
- `delete-post` / `delete-reply` — irreversible. Flag that explicitly and confirm the target id before running.
|
|
167
161
|
|
|
@@ -12,8 +12,8 @@ Commands:
|
|
|
12
12
|
feed [options] List the unified feed (posts and replies, newest first) in the global public feed.
|
|
13
13
|
list-posts [options] List posts in the global feed (paginated). Pass --mine to limit to your own posts.
|
|
14
14
|
get-post [options] <postId> Get a global post with its ancestors and replies (paginated).
|
|
15
|
-
create-post [options] Create a post in the global feed. --vault-slug attributes it to a vault you own. With no --vault-slug
|
|
16
|
-
|
|
15
|
+
create-post [options] Create a post in the global feed. --vault-slug attributes it to a vault you own. With no --vault-slug, the post is created without an authorVaultSlug (vault-less
|
|
16
|
+
personal post).
|
|
17
17
|
edit-post [options] <postId> Edit a post you authored in the global feed.
|
|
18
18
|
delete-post <postId> Delete a post you authored in the global feed.
|
|
19
19
|
create-reply [options] <postId> Create a reply to a post in the global feed.
|
|
@@ -70,17 +70,13 @@ Options:
|
|
|
70
70
|
```
|
|
71
71
|
Usage: gobi global create-post [options]
|
|
72
72
|
|
|
73
|
-
Create a post in the global feed. --vault-slug attributes it to a vault you own. With no --vault-slug
|
|
74
|
-
post).
|
|
73
|
+
Create a post in the global feed. --vault-slug attributes it to a vault you own. With no --vault-slug, the post is created without an authorVaultSlug (vault-less personal post).
|
|
75
74
|
|
|
76
75
|
Options:
|
|
77
76
|
--title <title> Title of the post
|
|
78
77
|
--content <content> Post content (markdown supported, use "-" for stdin)
|
|
79
78
|
--rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
|
|
80
79
|
--vault-slug <vaultSlug> Attribute the post to this vault (sets authorVaultSlug). Caller must own the vault.
|
|
81
|
-
--auto-attachments Upload wiki-linked [[files]] to webdrive before posting (also sets authorVaultSlug to that vault)
|
|
82
|
-
--draft-id <draftId> Use this draft as the source of title and content (mutually exclusive with --title/--content/--rich-text). On success, links the post back by recording postId on
|
|
83
|
-
draft.metadata so the client can render an 'Open post' button. The draft's vaultSlug seeds --vault-slug when not given explicitly.
|
|
84
80
|
--attach <file> Local media file to attach. Repeatable. X-style mix rule: up to 4 photos OR 1 GIF OR 1 video. Size ceilings: 5MB photos / 15MB GIFs / 512MB video. (default: [])
|
|
85
81
|
--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
|
|
86
82
|
the embedded card). Reposts-of-reposts are collapsed to the transitive root server-side. The referenced post must exist, not be deleted, and not itself be a reply.
|
|
@@ -99,7 +95,8 @@ Options:
|
|
|
99
95
|
--content <content> New content (markdown supported, use "-" for stdin)
|
|
100
96
|
--rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
|
|
101
97
|
--vault-slug <vaultSlug> Attribute the post to this vault (sets authorVaultSlug).
|
|
102
|
-
--
|
|
98
|
+
--attach <file> Replace the post's media attachments with the given files (existing attachments are removed). Repeatable. X-style mix rule: up to 4 photos OR 1 GIF OR 1 video. Size
|
|
99
|
+
ceilings: 5MB photos / 15MB GIFs / 512MB video. Omit to leave attachments unchanged. (default: [])
|
|
103
100
|
-h, --help display help for command
|
|
104
101
|
```
|
|
105
102
|
|
|
@@ -124,8 +121,7 @@ Create a reply to a post in the global feed.
|
|
|
124
121
|
Options:
|
|
125
122
|
--content <content> Reply content (markdown supported, use "-" for stdin)
|
|
126
123
|
--rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
|
|
127
|
-
--vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug).
|
|
128
|
-
--auto-attachments Upload wiki-linked [[files]] to webdrive before posting (also attributes the reply to that vault)
|
|
124
|
+
--vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug).
|
|
129
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:
|
|
130
126
|
[])
|
|
131
127
|
-h, --help display help for command
|
|
@@ -141,8 +137,7 @@ Edit a reply you authored in the global feed.
|
|
|
141
137
|
Options:
|
|
142
138
|
--content <content> New reply content (markdown supported, use "-" for stdin)
|
|
143
139
|
--rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
|
|
144
|
-
--vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug).
|
|
145
|
-
--auto-attachments Upload wiki-linked [[files]] to webdrive before editing (also attributes the reply to that vault)
|
|
140
|
+
--vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug).
|
|
146
141
|
-h, --help display help for command
|
|
147
142
|
```
|
|
148
143
|
|
|
@@ -74,9 +74,6 @@ Options:
|
|
|
74
74
|
--content <content> Post content (markdown supported, use "-" for stdin)
|
|
75
75
|
--rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
|
|
76
76
|
--vault-slug <vaultSlug> Attribute the post to this vault (sets authorVaultSlug). Caller must own the vault.
|
|
77
|
-
--auto-attachments Upload wiki-linked [[files]] to webdrive before posting (also sets authorVaultSlug to that vault)
|
|
78
|
-
--draft-id <draftId> Use this draft as the source of title and content (mutually exclusive with --title/--content/--rich-text). On success, links the post back via draft.metadata. The draft's
|
|
79
|
-
vaultSlug seeds --vault-slug when not given explicitly.
|
|
80
77
|
--attach <file> Local media file to attach. Repeatable. X-style mix rule: up to 4 photos OR 1 GIF OR 1 video. Size ceilings: 5MB photos / 15MB GIFs / 512MB video. (default: [])
|
|
81
78
|
--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
|
|
82
79
|
post, or a post in a space you're a member of). Reposting someone else's personal-space post returns 404.
|
|
@@ -95,7 +92,8 @@ Options:
|
|
|
95
92
|
--content <content> New content (markdown supported, use "-" for stdin)
|
|
96
93
|
--rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
|
|
97
94
|
--vault-slug <vaultSlug> Attribute the post to this vault (sets authorVaultSlug).
|
|
98
|
-
--
|
|
95
|
+
--attach <file> Replace the post's media attachments with the given files (existing attachments are removed). Repeatable. X-style mix rule: up to 4 photos OR 1 GIF OR 1 video. Size
|
|
96
|
+
ceilings: 5MB photos / 15MB GIFs / 512MB video. Omit to leave attachments unchanged. (default: [])
|
|
99
97
|
-h, --help display help for command
|
|
100
98
|
```
|
|
101
99
|
|
|
@@ -120,8 +118,7 @@ Reply to a personal-space post. The reply inherits the parent's private scope au
|
|
|
120
118
|
Options:
|
|
121
119
|
--content <content> Reply content (markdown supported, use "-" for stdin)
|
|
122
120
|
--rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
|
|
123
|
-
--vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug).
|
|
124
|
-
--auto-attachments Upload wiki-linked [[files]] to webdrive before posting (also attributes the reply to that vault)
|
|
121
|
+
--vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug).
|
|
125
122
|
--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
123
|
[])
|
|
127
124
|
-h, --help display help for command
|
|
@@ -137,8 +134,7 @@ Edit a reply you authored in your personal space.
|
|
|
137
134
|
Options:
|
|
138
135
|
--content <content> New reply content (markdown supported, use "-" for stdin)
|
|
139
136
|
--rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
|
|
140
|
-
--vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug).
|
|
141
|
-
--auto-attachments Upload wiki-linked [[files]] to webdrive before editing (also attributes the reply to that vault)
|
|
137
|
+
--vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug).
|
|
142
138
|
-h, --help display help for command
|
|
143
139
|
```
|
|
144
140
|
|
|
@@ -118,11 +118,8 @@ Options:
|
|
|
118
118
|
--title <title> Title of the post
|
|
119
119
|
--content <content> Post content (markdown supported, use "-" for stdin)
|
|
120
120
|
--rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
|
|
121
|
-
--
|
|
122
|
-
--vault-slug <vaultSlug> Attribute the post to this vault (sets authorVaultSlug). Also used as upload destination for --auto-attachments.
|
|
121
|
+
--vault-slug <vaultSlug> Attribute the post to this vault (sets authorVaultSlug). Caller must own the vault.
|
|
123
122
|
--space-slug <spaceSlug> Space slug (overrides .gobi/settings.yaml)
|
|
124
|
-
--draft-id <draftId> Use this draft as the source of title and content (mutually exclusive with --title/--content/--rich-text). On success, links the post back by recording postId/spaceSlug
|
|
125
|
-
on draft.metadata so the client can render an 'Open post' button. The draft's vaultSlug seeds --vault-slug when not given explicitly.
|
|
126
123
|
--attach <file> Local media file to attach. Repeatable. X-style mix rule: up to 4 photos OR 1 GIF OR 1 video. Size ceilings: 5MB photos / 15MB GIFs / 512MB video. (default: [])
|
|
127
124
|
--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
|
|
128
125
|
the embedded card). Reposts-of-reposts are collapsed to the transitive root server-side. The referenced post must exist, not be deleted, and not itself be a reply.
|
|
@@ -140,9 +137,10 @@ Options:
|
|
|
140
137
|
--title <title> New title for the post
|
|
141
138
|
--content <content> New content for the post (markdown supported, use "-" for stdin)
|
|
142
139
|
--rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
|
|
143
|
-
--
|
|
144
|
-
--vault-slug <vaultSlug> Attribute the post to this vault (sets authorVaultSlug). Also used as upload destination for --auto-attachments.
|
|
140
|
+
--vault-slug <vaultSlug> Attribute the post to this vault (sets authorVaultSlug). Caller must own the vault.
|
|
145
141
|
--space-slug <spaceSlug> Space slug (overrides .gobi/settings.yaml)
|
|
142
|
+
--attach <file> Replace the post's media attachments with the given files (existing attachments are removed). Repeatable. X-style mix rule: up to 4 photos OR 1 GIF OR 1 video. Size
|
|
143
|
+
ceilings: 5MB photos / 15MB GIFs / 512MB video. Omit to leave attachments unchanged. (default: [])
|
|
146
144
|
-h, --help display help for command
|
|
147
145
|
```
|
|
148
146
|
|
|
@@ -168,8 +166,7 @@ Create a reply to a post in a space.
|
|
|
168
166
|
Options:
|
|
169
167
|
--content <content> Reply content (markdown supported, use "-" for stdin)
|
|
170
168
|
--rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
|
|
171
|
-
--
|
|
172
|
-
--vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug). Also used as upload destination for --auto-attachments.
|
|
169
|
+
--vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug). Caller must own the vault.
|
|
173
170
|
--space-slug <spaceSlug> Space slug (overrides .gobi/settings.yaml)
|
|
174
171
|
--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
172
|
[])
|
|
@@ -186,8 +183,7 @@ Edit a reply you authored in a space.
|
|
|
186
183
|
Options:
|
|
187
184
|
--content <content> New content for the reply (markdown supported, use "-" for stdin)
|
|
188
185
|
--rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
|
|
189
|
-
--
|
|
190
|
-
--vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug). Also used as upload destination for --auto-attachments.
|
|
186
|
+
--vault-slug <vaultSlug> Attribute the reply to this vault (sets authorVaultSlug). Caller must own the vault.
|
|
191
187
|
--space-slug <spaceSlug> Space slug (overrides .gobi/settings.yaml)
|
|
192
188
|
-h, --help display help for command
|
|
193
189
|
```
|
|
@@ -8,12 +8,12 @@ description: >-
|
|
|
8
8
|
allowed-tools: Bash(gobi:*)
|
|
9
9
|
metadata:
|
|
10
10
|
author: gobi-ai
|
|
11
|
-
version: "2.0.
|
|
11
|
+
version: "2.0.25"
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
# gobi-vault
|
|
15
15
|
|
|
16
|
-
Gobi vault commands for publishing your vault profile and syncing files (v2.0.
|
|
16
|
+
Gobi vault commands for publishing your vault profile and syncing files (v2.0.25).
|
|
17
17
|
|
|
18
18
|
Requires gobi-cli installed and authenticated. See gobi-core skill for setup.
|
|
19
19
|
|
|
@@ -42,7 +42,7 @@ gobi --json vault publish
|
|
|
42
42
|
|
|
43
43
|
- `gobi vault init` — Interactive: select an existing vault or create a new one. Writes `vaultSlug` to `.gobi/settings.yaml` in the current directory and seeds `PUBLISH.md`. Requires the user to be logged in (`gobi auth login`).
|
|
44
44
|
- `gobi vault list` — List vaults you own. The primary vault is marked.
|
|
45
|
-
- `gobi vault status` — Show the configured vault's publish state (`isPublished`), profile fields (`title`, `description`, `tags`), referenced files (`thumbnailPath`, `homepagePath`, `promptPath`), file count, and the public profile URL. Use this as a diagnostic before
|
|
45
|
+
- `gobi vault status` — Show the configured vault's publish state (`isPublished`), profile fields (`title`, `description`, `tags`), referenced files (`thumbnailPath`, `homepagePath`, `promptPath`), file count, and the public profile URL. Use this as a diagnostic before authoring a markdown artifact with `--auto-attachments` (see gobi-artifact skill) to confirm the vault is public — files uploaded to a non-public vault are stored on webdrive but are not visible at `gobispace.com/@{vaultSlug}` until you run `gobi vault publish`.
|
|
46
46
|
- `gobi vault create <slug> --name <name>` — Create a new vault with the given slug and display name. Slug must be unique (use `vault list` to see what's taken). Does not change the configured vault — run `vault init` here or `vault set-primary <slug>` afterwards if you want to anchor to it.
|
|
47
47
|
- `gobi vault rename <newName>` — Rename the configured vault's display name. Pass `--vault-slug <slug>` to target another vault. Local handle only — the public profile title comes from `PUBLISH.md` frontmatter and is unaffected.
|
|
48
48
|
- `gobi vault set-primary <slug>` — Mark a vault as your primary. Unsets primary on the others. Required arg, no `.gobi` fallback (avoids accidental promotion).
|
|
@@ -18,7 +18,7 @@ Commands:
|
|
|
18
18
|
first.
|
|
19
19
|
set-primary <slug> Mark a vault as your primary. Unsets primary on the other vaults you own. Slug must be passed explicitly.
|
|
20
20
|
list List vaults you own.
|
|
21
|
-
status [options] Show the configured vault's publish state and metadata (use before
|
|
21
|
+
status [options] Show the configured vault's publish state and metadata (use before authoring a markdown artifact with --auto-attachments to confirm the vault is public).
|
|
22
22
|
publish Upload PUBLISH.md to the vault root on webdrive. Triggers post-processing (vault sync, metadata update).
|
|
23
23
|
unpublish Delete PUBLISH.md from the vault on webdrive.
|
|
24
24
|
sync [options] Sync local vault files with Gobi Webdrive.
|
|
@@ -100,7 +100,7 @@ Options:
|
|
|
100
100
|
```
|
|
101
101
|
Usage: gobi vault status [options]
|
|
102
102
|
|
|
103
|
-
Show the configured vault's publish state and metadata (use before
|
|
103
|
+
Show the configured vault's publish state and metadata (use before authoring a markdown artifact with --auto-attachments to confirm the vault is public).
|
|
104
104
|
|
|
105
105
|
Options:
|
|
106
106
|
--vault-slug <vaultSlug> Vault slug to inspect (defaults to .gobi/settings.yaml)
|
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
|
-
}
|