convene-cli 1.8.0 → 1.10.0

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/dist/render.js CHANGED
@@ -5,6 +5,8 @@ exports.inertToken = inertToken;
5
5
  exports.renderHealthLine = renderHealthLine;
6
6
  exports.renderRecentLine = renderRecentLine;
7
7
  exports.renderOpenItem = renderOpenItem;
8
+ exports.feedbackLine = feedbackLine;
9
+ exports.feedbackDetail = feedbackDetail;
8
10
  exports.renderChannelBlock = renderChannelBlock;
9
11
  exports.renderSessionOpenBlock = renderSessionOpenBlock;
10
12
  exports.renderRelocateBlock = renderRelocateBlock;
@@ -136,6 +138,65 @@ function renderOpenItem(m, member) {
136
138
  // question
137
139
  return ` [QUESTION] ${from} [id: ${m.short_id}] ${m.body ?? ''}`.trimEnd();
138
140
  }
141
+ /**
142
+ * One terse feedback line for the list view. Consistent with laneLine/inbox rows:
143
+ * a `[short_id]` lead, then server-derived structured tokens (lifecycle, category,
144
+ * age, upvotes, source), and the UNTRUSTED `body` rendered inert + length-capped
145
+ * via `inertToken`. NEVER inlines the raw body.
146
+ */
147
+ function feedbackLine(f) {
148
+ const age = agoLabel(f.created_at);
149
+ const bits = [`[${f.short_id}]`, f.lifecycle];
150
+ if (f.category)
151
+ bits.push(f.category);
152
+ if (age)
153
+ bits.push(`${age} ago`);
154
+ if (f.upvotes > 0)
155
+ bits.push(`+${f.upvotes}`);
156
+ const src = f.source_member
157
+ ? `${f.source_member}${f.source_tool ? `/${f.source_tool}` : ''}`
158
+ : null;
159
+ if (src)
160
+ bits.push(`(${inertToken(src, 48)})`);
161
+ const body = inertToken(f.body);
162
+ return ` ${bits.join(' ')}${body ? ` — ${body}` : ''}`;
163
+ }
164
+ /**
165
+ * The expanded single-item view (`convene feedback <id>`). Full body (still inert)
166
+ * plus every flattened field, one per line. Mirrors the terse-row grammar but
167
+ * gives the human the complete picture for one item.
168
+ */
169
+ function feedbackDetail(f) {
170
+ const L = [];
171
+ L.push(`[${f.short_id}] feedback`);
172
+ L.push(` lifecycle: ${f.lifecycle}`);
173
+ if (f.category)
174
+ L.push(` category: ${f.category}`);
175
+ if (f.severity)
176
+ L.push(` severity: ${f.severity}`);
177
+ if (f.tags.length)
178
+ L.push(` tags: ${f.tags.map((t) => inertToken(t, 32)).join(', ')}`);
179
+ L.push(` upvotes: ${f.upvotes}`);
180
+ const age = agoLabel(f.created_at);
181
+ L.push(` filed: ${f.created_at}${age ? ` (${age} ago)` : ''}`);
182
+ const src = f.source_member
183
+ ? `${f.source_member}${f.source_tool ? ` / ${f.source_tool}` : ''}`
184
+ : null;
185
+ if (src)
186
+ L.push(` source: ${inertToken(src, 64)}`);
187
+ if (f.source_project)
188
+ L.push(` project: ${inertToken(f.source_project, 64)}`);
189
+ if (f.from_handle || f.from_session) {
190
+ L.push(` from: ${inertToken(f.from_session || f.from_handle || '', 64)}`);
191
+ }
192
+ if (f.bridge_of)
193
+ L.push(` bridge_of: ${f.bridge_of}`);
194
+ if (f.bridged_to)
195
+ L.push(` bridged_to: ${f.bridged_to}`);
196
+ L.push(' body (UNTRUSTED member free-text):');
197
+ L.push(` ${inertToken(f.body, 400)}`);
198
+ return L.join('\n');
199
+ }
139
200
  /**
140
201
  * One inert lane line. Only server-derived structured tokens reach the agent:
141
202
  * the validated holder_handle, numeric ages/ETAs, the canonical lane name. The
@@ -226,6 +287,8 @@ function renderChannelBlock(input) {
226
287
  L.push(' convene post question --to <member|anyone> "<question>"');
227
288
  L.push(' convene post propose --to <member> --context "<why>" --prompt "<literal next prompt>"');
228
289
  L.push(' convene answer <id> "<answer>" | convene ack <id>');
290
+ L.push('Say what you are taking on at the start and what you did when you wrap — so siblings across tools see who owns what. ' +
291
+ 'A terse start/wrap line is auto-posted; a hand-written `convene post status` is richer.');
229
292
  L.push('');
230
293
  // High-priority interrupts + active deploy lanes, above Open items (DEGRADED
231
294
  // suppresses these structurally — the caller passes empty arrays).
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cliVersion = cliVersion;
4
+ /**
5
+ * The running CLI's own version, read once from package.json (cached). dist/ and
6
+ * src/ both sit one level below package.json (see index.ts's `--version` read,
7
+ * which this mirrors). Best-effort: any failure → '0.0.0' so callers that compare
8
+ * versions (the host-pin freshness checks) degrade gracefully rather than throw.
9
+ */
10
+ const node_fs_1 = require("node:fs");
11
+ const node_path_1 = require("node:path");
12
+ let cached = null;
13
+ function cliVersion() {
14
+ if (cached !== null)
15
+ return cached;
16
+ try {
17
+ const pkg = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.resolve)(__dirname, '../package.json'), 'utf8'));
18
+ cached = typeof pkg.version === 'string' && pkg.version ? pkg.version : '0.0.0';
19
+ }
20
+ catch {
21
+ cached = '0.0.0';
22
+ }
23
+ return cached;
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "convene-cli",
3
- "version": "1.8.0",
3
+ "version": "1.10.0",
4
4
  "description": "Convene CLI — AI development coordination bus client + UserPromptSubmit hook. Install: npm i -g convene-cli; then `convene setup`.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://dev.convene.live",