@gobi-ai/cli 2.0.9 → 2.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,12 +4,12 @@
4
4
  "name": "gobi-ai"
5
5
  },
6
6
  "description": "Claude Code plugin for the Gobi collaborative knowledge platform CLI",
7
- "version": "2.0.9",
7
+ "version": "2.0.10",
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.9",
12
+ "version": "2.0.10",
13
13
  "author": {
14
14
  "name": "gobi-ai"
15
15
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gobi",
3
3
  "description": "Manage the Gobi collaborative knowledge platform from the command line",
4
- "version": "2.0.9",
4
+ "version": "2.0.10",
5
5
  "author": {
6
6
  "name": "gobi-ai"
7
7
  },
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: post
3
+ description: Draft a post from recent conversation history and publish it to the spaces it best fits. Default mode requires approval; pass `bypass` to post without confirmation.
4
+ argument-hint: "[approval|bypass]"
5
+ ---
6
+
7
+ Always use the globally installed `gobi` binary (not via npx or ts-node).
8
+
9
+ ## Argument: permissionMode
10
+
11
+ `$ARGUMENTS` is the permission mode. Accept exactly:
12
+
13
+ - `approval` (default if `$ARGUMENTS` is empty or unrecognized) — draft, present, and require user confirmation before posting.
14
+ - `bypass` — draft and post without a confirmation step.
15
+
16
+ Treat anything else as `approval`. Do not ask the user which mode to use — the argument is the answer.
17
+
18
+ ## Pre-flight check
19
+
20
+ ```bash
21
+ gobi --json auth status
22
+ ```
23
+
24
+ If unauthenticated, stop and ask the user to run `/gobi:login`.
25
+
26
+ ## 1. List spaces and choose targets
27
+
28
+ ```bash
29
+ gobi --json space list
30
+ ```
31
+
32
+ Each entry has `slug`, `name`, `description`, and (sometimes) `rules`. If the list is empty, stop — there's nowhere to post.
33
+
34
+ Review the recent conversation history and extract content that is:
35
+
36
+ - **Reusable** — others could apply it to their own work.
37
+ - **Generalizable** — patterns, decisions, constraints, discoveries; not a one-off task log.
38
+ - **Not sensitive** — exclude code snippets, file paths, PII, credentials, internal URLs, proprietary details.
39
+
40
+ Then match the content against each space's `name`, `description`, and `rules`. Pick the **space(s) the content genuinely fits** — could be one, could be a few. If nothing fits, stop and tell the user no space matched; do **not** force a post into a tangentially related space.
41
+
42
+ If a space's `rules` constrain format, topic, or tone, follow them — or skip that space.
43
+
44
+ ## 2. Draft the post
45
+
46
+ For each target space, prepare:
47
+
48
+ - **Title** — short, descriptive, no leading `#`, does not duplicate the body's first line.
49
+ - **Content** — markdown body (2–5 bullets is usually right). Do not repeat the title inside the content. Tailor per space if their rules differ; otherwise the same draft can go to multiple spaces.
50
+
51
+ ## 3. Approval mode (default)
52
+
53
+ Show the user, for each target space:
54
+
55
+ - The space slug and name.
56
+ - The exact `gobi space create-post` command that will run.
57
+ - The resolved title and a preview of the content.
58
+
59
+ Wait for the user's confirmation. Accept redirects ("only post to X", "rewrite the title", "skip space Y") and re-present before posting. Do not post until the user confirms.
60
+
61
+ ## 4. Bypass mode
62
+
63
+ Skip the confirmation step. Proceed straight to posting. Still print the target space(s) and the command(s) to the terminal so the action is visible.
64
+
65
+ ## 5. Post
66
+
67
+ For each chosen space, run:
68
+
69
+ ```bash
70
+ gobi space create-post --space-slug <slug> --title "<title>" --content "<content>"
71
+ ```
72
+
73
+ (`--space-slug` overrides `.gobi/settings.yaml`, so this works without `gobi space warp` first.)
74
+
75
+ After each post, echo the result with a shareable URL built from the response:
76
+
77
+ `https://gobispace.com/spaces/<spaceSlug>?postId=<id>`
78
+
79
+ If a post fails, report the error and continue with the remaining targets — one failure should not block the others.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobi-ai/cli",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "CLI client for the Gobi collaborative knowledge platform",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -30,6 +30,7 @@ Anything you can do to a Space Post (reply, edit, delete, attribute to a vault)
30
30
 
31
31
  - When the user wants to explore or catch up on what's happening in their space, invoke `/gobi:space-explore`.
32
32
  - When the user wants to share or post learnings from the current session, invoke `/gobi:space-share`.
33
+ - When the user wants to draft a post from the current session and route it to whichever space(s) it best fits, invoke `/gobi:post` (default approval mode; pass `bypass` to skip confirmation).
33
34
 
34
35
  ## Authoring posts: title vs. content
35
36