@gobi-ai/cli 1.3.5 → 1.3.6

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": "1.3.5",
7
+ "version": "1.3.6",
8
8
  "plugins": [
9
9
  {
10
10
  "name": "gobi",
11
11
  "description": "Manage the Gobi collaborative knowledge platform from the command line. Search and ask brains, publish brain documents, create threads, manage sessions, generate images and videos.",
12
- "version": "1.3.5",
12
+ "version": "1.3.6",
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": "1.3.5",
4
+ "version": "1.3.6",
5
5
  "author": {
6
6
  "name": "gobi-ai"
7
7
  },
package/README.md CHANGED
@@ -166,19 +166,19 @@ Times are ISO 8601 UTC (e.g. `2026-03-20T00:00:00Z`).
166
166
 
167
167
  ### Proposals
168
168
 
169
- Proposals are authored by your agent during chat (or by external agents using `gobi proposal add` as their tool layer). The top 5 pending proposals (lowest priority first) feed the agent's system prompt every turn.
169
+ Proposals are authored by your agent during chat (or by external agents using `gobi proposal add` as their tool layer). The top 5 pending proposals (lowest priority first) feed the agent's system prompt every turn. Every proposal is anchored to the chat session that produced it.
170
170
 
171
171
  | Command | Description |
172
172
  |---------|-------------|
173
173
  | `gobi proposal list [--limit N]` | List proposals (priority ASC, then newest first) |
174
174
  | `gobi proposal get <id>` | Show one proposal with its history |
175
- | `gobi proposal add <content> [--session <id>] [--priority N]` | Add a proposal (use `-` for stdin) |
176
- | `gobi proposal edit <id> <content>` | Replace content; bumps revision |
175
+ | `gobi proposal add <title> <content> [--session <id>] [--priority N]` | Add a proposal (use `-` for content to read from stdin). `--session` falls back to `$GOBI_SESSION_ID`. |
176
+ | `gobi proposal edit <id> [--title <t>] [--content <c>]` | Update title and/or content; bumps revision (use `-` for stdin) |
177
177
  | `gobi proposal delete <id>` | Delete a proposal |
178
178
  | `gobi proposal prioritize <id> <priority>` | Set priority (lower = higher) |
179
- | `gobi proposal accept <id>` | Accept; posts "Accept your proposal X" into the originating session |
180
- | `gobi proposal reject <id>` | Reject; posts "Reject your proposal X" into the originating session |
181
- | `gobi proposal revise <id> <comment>` | Ask the agent to revise; posts the comment into the session |
179
+ | `gobi proposal accept <id>` | Mark as accepted (the client posts the synthesized message into the session) |
180
+ | `gobi proposal reject <id>` | Mark as rejected |
181
+ | `gobi proposal revise <id> <comment>` | Mark for revision and record the user's comment |
182
182
 
183
183
  ### Sync
184
184
 
@@ -12,12 +12,12 @@ function snippet(content, max = 80) {
12
12
  }
13
13
  function formatProposalLine(p) {
14
14
  const status = p.status === "pending" ? "·" : p.status === "accepted" ? "✓" : "✗";
15
- return `- [${status}] p${p.priority} rev${p.revision} ${p.proposalId.slice(0, 8)} ${snippet(p.content)}`;
15
+ return `- [${status}] p${p.priority} rev${p.revision} ${p.proposalId.slice(0, 8)} ${snippet(p.title)}`;
16
16
  }
17
17
  export function registerProposalCommand(program) {
18
18
  const proposal = program
19
19
  .command("proposal")
20
- .description("Proposals authored by your agent during chat. Top-5 feed the system prompt; accept/reject/revise post into the originating chat session.");
20
+ .description("Proposals authored by your agent during chat. Top-5 feed the system prompt; accept/reject/revise update state and the client posts the synthesized message into the session.");
21
21
  // ── List ──
22
22
  proposal
23
23
  .command("list")
@@ -51,10 +51,11 @@ export function registerProposalCommand(program) {
51
51
  return;
52
52
  }
53
53
  console.log(`Proposal ${p.proposalId}`);
54
+ console.log(` title: ${p.title}`);
54
55
  console.log(` status: ${p.status}`);
55
56
  console.log(` priority: ${p.priority}`);
56
57
  console.log(` revision: ${p.revision}`);
57
- console.log(` session: ${p.sessionId ?? "(none)"}`);
58
+ console.log(` session: ${p.sessionId}`);
58
59
  console.log(` created: ${p.createdAt}`);
59
60
  console.log("");
60
61
  console.log("Content:");
@@ -74,14 +75,21 @@ export function registerProposalCommand(program) {
74
75
  });
75
76
  // ── Add ──
76
77
  proposal
77
- .command("add <content>")
78
- .description("Add a proposal directly. Pass '-' to read from stdin.")
79
- .option("--session <sessionId>", "Originate from a chat session (UUID)")
78
+ .command("add <title> <content>")
79
+ .description("Add a proposal. Pass '-' for content to read from stdin. Requires a chat session — the agent runtime exports GOBI_SESSION_ID automatically; outside that, pass --session.")
80
+ .option("--session <sessionId>", "Originating chat session UUID. Falls back to $GOBI_SESSION_ID when set.")
80
81
  .option("--priority <number>", "Priority (lower = higher), default 100")
81
- .action(async (content, opts) => {
82
- const body = { content: readContent(content) };
83
- if (opts.session)
84
- body.sessionId = opts.session;
82
+ .action(async (title, content, opts) => {
83
+ const sessionId = opts.session || process.env.GOBI_SESSION_ID || "";
84
+ if (!sessionId) {
85
+ console.error("Error: missing session id. Pass --session <uuid> or set GOBI_SESSION_ID in the environment.");
86
+ process.exit(1);
87
+ }
88
+ const body = {
89
+ title,
90
+ content: readContent(content),
91
+ sessionId,
92
+ };
85
93
  if (opts.priority)
86
94
  body.priority = parseInt(opts.priority, 10);
87
95
  const resp = (await apiPost("/app/proposals", body));
@@ -94,12 +102,21 @@ export function registerProposalCommand(program) {
94
102
  });
95
103
  // ── Edit content ──
96
104
  proposal
97
- .command("edit <proposalId> <content>")
98
- .description("Replace proposal content (bumps revision). Pass '-' for stdin.")
99
- .action(async (proposalId, content) => {
100
- const resp = (await apiPatch(`/app/proposals/${proposalId}`, {
101
- content: readContent(content),
102
- }));
105
+ .command("edit <proposalId>")
106
+ .description("Replace proposal title and/or content (bumps revision). Pass '-' for stdin.")
107
+ .option("--title <title>", "New title")
108
+ .option("--content <content>", "New content; pass '-' to read from stdin")
109
+ .action(async (proposalId, opts) => {
110
+ const body = {};
111
+ if (opts.title !== undefined)
112
+ body.title = opts.title;
113
+ if (opts.content !== undefined)
114
+ body.content = readContent(opts.content);
115
+ if (Object.keys(body).length === 0) {
116
+ console.error('Error: pass --title and/or --content.');
117
+ process.exit(1);
118
+ }
119
+ const resp = (await apiPatch(`/app/proposals/${proposalId}`, body));
103
120
  const p = unwrapResp(resp);
104
121
  if (isJsonMode(proposal)) {
105
122
  jsonOut(p);
@@ -137,7 +154,7 @@ export function registerProposalCommand(program) {
137
154
  // ── Accept ──
138
155
  proposal
139
156
  .command("accept <proposalId>")
140
- .description('Accept posts "Accept your proposal X" into the originating chat session.')
157
+ .description("Mark the proposal accepted. The client posts the synthesized message into the session.")
141
158
  .action(async (proposalId) => {
142
159
  const resp = (await apiPost(`/app/proposals/${proposalId}/accept`));
143
160
  const p = unwrapResp(resp);
@@ -150,7 +167,7 @@ export function registerProposalCommand(program) {
150
167
  // ── Reject ──
151
168
  proposal
152
169
  .command("reject <proposalId>")
153
- .description('Reject posts "Reject your proposal X" into the originating chat session.')
170
+ .description("Mark the proposal rejected. The client posts the synthesized message into the session.")
154
171
  .action(async (proposalId) => {
155
172
  const resp = (await apiPost(`/app/proposals/${proposalId}/reject`));
156
173
  const p = unwrapResp(resp);
@@ -163,7 +180,7 @@ export function registerProposalCommand(program) {
163
180
  // ── Revise ──
164
181
  proposal
165
182
  .command("revise <proposalId> <comment>")
166
- .description('Ask the agent to revise posts "Update your proposal X. Here\'s my comment. {comment}" into the chat session.')
183
+ .description("Mark the proposal for revision and record the user's comment. The client posts the synthesized message into the session.")
167
184
  .action(async (proposalId, comment) => {
168
185
  const resp = (await apiPost(`/app/proposals/${proposalId}/revise`, {
169
186
  comment: readContent(comment),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobi-ai/cli",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "CLI client for the Gobi collaborative knowledge platform",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -9,12 +9,12 @@ description: >-
9
9
  allowed-tools: Bash(gobi:*)
10
10
  metadata:
11
11
  author: gobi-ai
12
- version: "1.3.4"
12
+ version: "1.3.6"
13
13
  ---
14
14
 
15
15
  # gobi-proposal
16
16
 
17
- Gobi proposal commands for managing agent-authored proposals (v1.3.4).
17
+ Gobi proposal commands for managing agent-authored proposals (v1.3.6).
18
18
 
19
19
  Requires gobi-cli installed and authenticated. See gobi-core skill for setup.
20
20
 
@@ -22,18 +22,21 @@ Requires gobi-cli installed and authenticated. See gobi-core skill for setup.
22
22
 
23
23
  A proposal is a unit of standing guidance authored by an agent (in-process during chat, or via `gobi proposal add` when the agent uses gobi-cli as its tool layer). Each proposal has:
24
24
 
25
- - **content** — the proposal text (markdown, up to 8000 chars)
25
+ - **title** — short headline (1–200 chars)
26
+ - **content** — the proposal text (markdown, 1–8000 chars)
27
+ - **sessionId** — required; the chat session that produced the proposal
26
28
  - **priority** — lower number = higher priority; default `100`
27
29
  - **status** — `pending`, `accepted`, or `rejected`
28
- - **revision** — bumped each time the content is edited
29
- - **sessionId** — optional; the chat session the proposal originated from
30
+ - **revision** — bumped each time the title or content is edited
30
31
  - **history** — append-only log of `created`, `edited`, `prioritized`, `accepted`, `rejected`, and `revise_requested` events
31
32
 
32
33
  The top 5 pending proposals (lowest priority first) are injected into the agent's system prompt every turn — that's how proposals turn into standing instructions.
33
34
 
35
+ When invoked from inside an agent run, the runtime exports `GOBI_SESSION_ID` so `gobi proposal add` picks it up automatically; otherwise pass `--session <uuid>`.
36
+
34
37
  ## Lifecycle
35
38
 
36
- `accept` and `reject` are terminal: they post a synthesized user message into the originating chat session ("Accept your proposal X" / "Reject your proposal X") so the agent can react. `revise` keeps the proposal pending and posts the user's comment into the session, asking the agent to revise. Only pending proposals can be revised.
39
+ `accept`, `reject`, and `revise` update the proposal's status and history. They do **not** themselves post messages into the chat session the client (e.g. the floating proposal bubble) opens at `proposal.sessionId` and sends the synthesized message via SSE so the user sees the agent's reply stream in. Only pending proposals can be revised.
37
40
 
38
41
  ## Important: JSON Mode
39
42
 
@@ -41,7 +44,7 @@ For programmatic/agent usage, always pass `--json` as a **global** option (befor
41
44
 
42
45
  ```bash
43
46
  gobi --json proposal list --limit 20
44
- gobi --json proposal add "Prefer concise titles" --priority 50
47
+ gobi --json proposal add "Concise titles" "Prefer concise titles for brain updates." --priority 50
45
48
  ```
46
49
 
47
50
  JSON mode wraps the response as `{"success": true, "data": <proposal>}` (or `{"success": false, "error": "..."}`).
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  Usage: gobi proposal [options] [command]
5
5
 
6
- Proposals authored by your agent during chat. Top-5 feed the system prompt; accept/reject/revise post into the originating chat session.
6
+ Proposals authored by your agent during chat. Top-5 feed the system prompt; accept/reject/revise update state and the client posts the synthesized message into the session.
7
7
 
8
8
  Options:
9
9
  -h, --help display help for command
@@ -11,13 +11,14 @@ Options:
11
11
  Commands:
12
12
  list [options] List proposals (priority ASC, then newest first).
13
13
  get <proposalId> Show one proposal with its history.
14
- add [options] <content> Add a proposal directly. Pass '-' to read from stdin.
15
- edit <proposalId> <content> Replace proposal content (bumps revision). Pass '-' for stdin.
14
+ add [options] <title> <content> Add a proposal. Pass '-' for content to read from stdin. Requires a chat session — the agent runtime exports GOBI_SESSION_ID automatically; outside that, pass
15
+ --session.
16
+ edit [options] <proposalId> Replace proposal title and/or content (bumps revision). Pass '-' for stdin.
16
17
  delete <proposalId> Delete a proposal.
17
18
  prioritize <proposalId> <priority> Set priority (lower = higher). Top 5 feed the system prompt.
18
- accept <proposalId> Accept posts "Accept your proposal X" into the originating chat session.
19
- reject <proposalId> Reject posts "Reject your proposal X" into the originating chat session.
20
- revise <proposalId> <comment> Ask the agent to revise posts "Update your proposal X. Here's my comment. {comment}" into the chat session.
19
+ accept <proposalId> Mark the proposal accepted. The client posts the synthesized message into the session.
20
+ reject <proposalId> Mark the proposal rejected. The client posts the synthesized message into the session.
21
+ revise <proposalId> <comment> Mark the proposal for revision and record the user's comment. The client posts the synthesized message into the session.
21
22
  help [command] display help for command
22
23
  ```
23
24
 
@@ -47,12 +48,12 @@ Options:
47
48
  ## add
48
49
 
49
50
  ```
50
- Usage: gobi proposal add [options] <content>
51
+ Usage: gobi proposal add [options] <title> <content>
51
52
 
52
- Add a proposal directly. Pass '-' to read from stdin.
53
+ Add a proposal. Pass '-' for content to read from stdin. Requires a chat session — the agent runtime exports GOBI_SESSION_ID automatically; outside that, pass --session.
53
54
 
54
55
  Options:
55
- --session <sessionId> Originate from a chat session (UUID)
56
+ --session <sessionId> Originating chat session UUID. Falls back to $GOBI_SESSION_ID when set.
56
57
  --priority <number> Priority (lower = higher), default 100
57
58
  -h, --help display help for command
58
59
  ```
@@ -60,12 +61,14 @@ Options:
60
61
  ## edit
61
62
 
62
63
  ```
63
- Usage: gobi proposal edit [options] <proposalId> <content>
64
+ Usage: gobi proposal edit [options] <proposalId>
64
65
 
65
- Replace proposal content (bumps revision). Pass '-' for stdin.
66
+ Replace proposal title and/or content (bumps revision). Pass '-' for stdin.
66
67
 
67
68
  Options:
68
- -h, --help display help for command
69
+ --title <title> New title
70
+ --content <content> New content; pass '-' to read from stdin
71
+ -h, --help display help for command
69
72
  ```
70
73
 
71
74
  ## delete
@@ -95,7 +98,7 @@ Options:
95
98
  ```
96
99
  Usage: gobi proposal accept [options] <proposalId>
97
100
 
98
- Accept posts "Accept your proposal X" into the originating chat session.
101
+ Mark the proposal accepted. The client posts the synthesized message into the session.
99
102
 
100
103
  Options:
101
104
  -h, --help display help for command
@@ -106,7 +109,7 @@ Options:
106
109
  ```
107
110
  Usage: gobi proposal reject [options] <proposalId>
108
111
 
109
- Reject posts "Reject your proposal X" into the originating chat session.
112
+ Mark the proposal rejected. The client posts the synthesized message into the session.
110
113
 
111
114
  Options:
112
115
  -h, --help display help for command
@@ -117,7 +120,7 @@ Options:
117
120
  ```
118
121
  Usage: gobi proposal revise [options] <proposalId> <comment>
119
122
 
120
- Ask the agent to revise posts "Update your proposal X. Here's my comment. {comment}" into the chat session.
123
+ Mark the proposal for revision and record the user's comment. The client posts the synthesized message into the session.
121
124
 
122
125
  Options:
123
126
  -h, --help display help for command