exponential-cli 1.28.0 → 1.30.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/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // src/program.ts
4
- import { Command as Command30 } from "commander";
5
-
6
- // src/commands/auth.ts
3
+ // src/commands/agentGuidance.ts
7
4
  import { Command } from "commander";
8
- import chalk2 from "chalk";
5
+ import chalk3 from "chalk";
6
+
7
+ // src/client/index.ts
8
+ import { ExponentialClient } from "exponential-sdk";
9
9
 
10
10
  // src/config/index.ts
11
11
  import { createConfigStore } from "exponential-sdk";
@@ -27,7 +27,6 @@ function getConfigPath() {
27
27
  }
28
28
 
29
29
  // src/client/index.ts
30
- import { ExponentialClient } from "exponential-sdk";
31
30
  import { isTRPCError, TRPCClientError } from "exponential-sdk";
32
31
  var clientInstance = null;
33
32
  function getClient() {
@@ -87,10 +86,11 @@ function handleError(error, json = false) {
87
86
  suggestion = "Run: exponential auth login --token <new-token> --api-url <url>";
88
87
  break;
89
88
  case "NOT_FOUND":
90
- message = "Resource not found";
89
+ message = message || "Resource not found";
91
90
  break;
92
91
  case "FORBIDDEN":
93
- message = "Access denied";
92
+ message = message || "Access denied";
93
+ suggestion = "Run `exponential auth whoami` to see which account this token is; that is the account to grant access to.";
94
94
  break;
95
95
  }
96
96
  const property = error.data?.property;
@@ -124,93 +124,6 @@ function handleError(error, json = false) {
124
124
  process.exit(1);
125
125
  }
126
126
 
127
- // src/commands/auth.ts
128
- function createAuthCommand() {
129
- const auth = new Command("auth").description("Authentication commands");
130
- auth.command("login").description("Configure CLI with your API token").requiredOption("--token <token>", "JWT token from /settings/api-keys").requiredOption("--api-url <url>", "API URL (e.g., https://www.exponential.im)").action(async (options) => {
131
- try {
132
- let apiUrl = options.apiUrl.replace(/\/+$/, "");
133
- if (!apiUrl.startsWith("http://localhost") && !apiUrl.startsWith("https://")) {
134
- apiUrl = `https://${apiUrl}`;
135
- }
136
- setConfig({
137
- token: options.token,
138
- apiUrl
139
- });
140
- resetClient();
141
- console.log(chalk2.gray("Validating token..."));
142
- const client = getClient();
143
- await client.workspaces.list();
144
- console.log(chalk2.green("Successfully authenticated!"));
145
- console.log(chalk2.gray(`Config saved to: ${getConfigPath()}`));
146
- } catch (error) {
147
- clearConfig();
148
- handleError(error);
149
- }
150
- });
151
- auth.command("logout").description("Remove stored credentials").action(() => {
152
- clearConfig();
153
- resetClient();
154
- console.log(chalk2.green("Successfully logged out."));
155
- console.log(chalk2.gray(`Config cleared from: ${getConfigPath()}`));
156
- });
157
- auth.command("whoami").description("Show current authentication status").action(async () => {
158
- if (!isAuthenticated()) {
159
- console.log(chalk2.yellow("Not authenticated."));
160
- console.log(chalk2.gray("Run: exponential auth login --token <jwt> --api-url <url>"));
161
- process.exit(1);
162
- }
163
- try {
164
- const config = getConfig();
165
- const client = getClient();
166
- const workspaces = await client.workspaces.list();
167
- console.log(chalk2.green("Authenticated"));
168
- console.log(chalk2.gray(`API URL: ${config.apiUrl}`));
169
- console.log(chalk2.gray(`Workspaces: ${workspaces.length}`));
170
- console.log(chalk2.gray(`Config: ${getConfigPath()}`));
171
- } catch (error) {
172
- handleError(error);
173
- }
174
- });
175
- auth.command("show").description(
176
- "Print parts of the current credentials. Use --token to print the raw JWT (for piping into other tools, e.g. `gh secret set EXPONENTIAL_TOKEN < <(exponential auth show --token)`)."
177
- ).option("--token", "Print the raw JWT to stdout with no trailing newline").action((options) => {
178
- const config = getConfig();
179
- if (options.token) {
180
- if (!config.token) {
181
- console.error("Not authenticated. Run `exponential auth login` first.");
182
- process.exit(1);
183
- }
184
- process.stdout.write(config.token);
185
- return;
186
- }
187
- console.log(chalk2.bold("\nCredentials"));
188
- console.log(chalk2.gray("\u2500".repeat(40)));
189
- console.log(`API URL: ${config.apiUrl || chalk2.gray("(not set)")}`);
190
- console.log(
191
- `Token: ${config.token ? chalk2.gray(`${config.token.substring(0, 20)}...`) : chalk2.gray("(not set)")}`
192
- );
193
- console.log(
194
- chalk2.gray("Use `exponential auth show --token` to print the raw JWT.")
195
- );
196
- console.log();
197
- });
198
- auth.command("status").description("Show detailed authentication status").action(() => {
199
- const config = getConfig();
200
- console.log(chalk2.bold("\nAuthentication Status"));
201
- console.log(chalk2.gray("\u2500".repeat(40)));
202
- console.log(`Authenticated: ${isAuthenticated() ? chalk2.green("Yes") : chalk2.red("No")}`);
203
- console.log(`API URL: ${config.apiUrl || chalk2.gray("(not set)")}`);
204
- console.log(`Token: ${config.token ? chalk2.gray(`${config.token.substring(0, 20)}...`) : chalk2.gray("(not set)")}`);
205
- console.log(`Config Path: ${getConfigPath()}`);
206
- console.log();
207
- });
208
- return auth;
209
- }
210
-
211
- // src/commands/actions.ts
212
- import { Command as Command2 } from "commander";
213
-
214
127
  // src/utils/resolve.ts
215
128
  async function resolveWorkspaceId(client, slugOrId) {
216
129
  return (await resolveWorkspace(client, slugOrId)).id;
@@ -239,7 +152,7 @@ async function resolveProductId(client, workspaceId, slugOrId) {
239
152
  }
240
153
 
241
154
  // src/utils/output.ts
242
- import chalk3 from "chalk";
155
+ import chalk2 from "chalk";
243
156
  function shouldUseJson(forceJson, forcePretty) {
244
157
  if (forceJson) return true;
245
158
  if (forcePretty) return false;
@@ -307,21 +220,21 @@ function outputActionUpsertJson(result) {
307
220
  }
308
221
  function outputActionPretty(action) {
309
222
  const statusColor = getKanbanStatusColor(action.kanbanStatus);
310
- const statusBadge2 = action.kanbanStatus ? chalk3[statusColor](`[${action.kanbanStatus}]`) : chalk3.gray("[NO STATUS]");
311
- console.log(chalk3.gray("\u2500".repeat(50)));
223
+ const statusBadge2 = action.kanbanStatus ? chalk2[statusColor](`[${action.kanbanStatus}]`) : chalk2.gray("[NO STATUS]");
224
+ console.log(chalk2.gray("\u2500".repeat(50)));
312
225
  console.log(`
313
- ${statusBadge2} ${chalk3.bold(action.name)}`);
314
- console.log(chalk3.gray(` ID: ${action.id}`));
226
+ ${statusBadge2} ${chalk2.bold(action.name)}`);
227
+ console.log(chalk2.gray(` ID: ${action.id}`));
315
228
  if (action.project) {
316
- console.log(` ${chalk3.cyan("Project:")} ${action.project.name}`);
229
+ console.log(` ${chalk2.cyan("Project:")} ${action.project.name}`);
317
230
  }
318
- console.log(` ${chalk3.magenta("Priority:")} ${action.priority}`);
231
+ console.log(` ${chalk2.magenta("Priority:")} ${action.priority}`);
319
232
  if (action.dueDate) {
320
233
  const dueDate = new Date(action.dueDate);
321
- console.log(` ${chalk3.yellow("Due:")} ${formatDate(dueDate)}`);
234
+ console.log(` ${chalk2.yellow("Due:")} ${formatDate(dueDate)}`);
322
235
  }
323
236
  if (action.description) {
324
- console.log(` ${chalk3.gray("Description:")} ${action.description.substring(0, 100)}${action.description.length > 100 ? "..." : ""}`);
237
+ console.log(` ${chalk2.gray("Description:")} ${action.description.substring(0, 100)}${action.description.length > 100 ? "..." : ""}`);
325
238
  }
326
239
  console.log();
327
240
  }
@@ -335,30 +248,30 @@ function outputActionsJson(actions, filters = {}) {
335
248
  }
336
249
  function outputActionsPretty(actions) {
337
250
  if (actions.length === 0) {
338
- console.log(chalk3.gray("No actions found."));
251
+ console.log(chalk2.gray("No actions found."));
339
252
  return;
340
253
  }
341
- console.log(chalk3.bold(`
254
+ console.log(chalk2.bold(`
342
255
  Actions (${actions.length} total)`));
343
- console.log(chalk3.gray("\u2500".repeat(50)));
256
+ console.log(chalk2.gray("\u2500".repeat(50)));
344
257
  for (const action of actions) {
345
258
  const statusColor = getKanbanStatusColor(action.kanbanStatus);
346
- const statusBadge2 = action.kanbanStatus ? chalk3[statusColor](`[${action.kanbanStatus}]`) : chalk3.gray("[NO STATUS]");
259
+ const statusBadge2 = action.kanbanStatus ? chalk2[statusColor](`[${action.kanbanStatus}]`) : chalk2.gray("[NO STATUS]");
347
260
  console.log(`
348
- ${statusBadge2} ${chalk3.bold(action.name)}`);
349
- console.log(chalk3.gray(` ID: ${action.id}`));
261
+ ${statusBadge2} ${chalk2.bold(action.name)}`);
262
+ console.log(chalk2.gray(` ID: ${action.id}`));
350
263
  if (action.project) {
351
- console.log(` ${chalk3.cyan("Project:")} ${action.project.name}`);
264
+ console.log(` ${chalk2.cyan("Project:")} ${action.project.name}`);
352
265
  }
353
- console.log(` ${chalk3.magenta("Priority:")} ${action.priority}`);
266
+ console.log(` ${chalk2.magenta("Priority:")} ${action.priority}`);
354
267
  if (action.dueDate) {
355
268
  const dueDate = new Date(action.dueDate);
356
269
  const isOverdue = dueDate < /* @__PURE__ */ new Date();
357
270
  const dateStr = formatDate(dueDate);
358
- console.log(` ${chalk3.yellow("Due:")} ${isOverdue ? chalk3.red(dateStr) : dateStr}`);
271
+ console.log(` ${chalk2.yellow("Due:")} ${isOverdue ? chalk2.red(dateStr) : dateStr}`);
359
272
  }
360
273
  if (action.description) {
361
- console.log(` ${chalk3.gray("Description:")} ${action.description.substring(0, 100)}${action.description.length > 100 ? "..." : ""}`);
274
+ console.log(` ${chalk2.gray("Description:")} ${action.description.substring(0, 100)}${action.description.length > 100 ? "..." : ""}`);
362
275
  }
363
276
  }
364
277
  console.log();
@@ -374,30 +287,30 @@ function outputTodaysActionsJson(t, filters = {}) {
374
287
  }
375
288
  function printTodayGroup(label, group, color) {
376
289
  if (group.count === 0) return;
377
- const truncated = group.count > group.actions.length ? chalk3.gray(` (showing ${group.actions.length})`) : "";
290
+ const truncated = group.count > group.actions.length ? chalk2.gray(` (showing ${group.actions.length})`) : "";
378
291
  console.log(`
379
- ${chalk3[color].bold(`${label} (${group.count})`)}${truncated}`);
292
+ ${chalk2[color].bold(`${label} (${group.count})`)}${truncated}`);
380
293
  for (const a of group.actions) {
381
294
  const when = a.scheduledStart ?? a.dueDate;
382
- const stamp = when ? chalk3.gray(formatDate(new Date(when))) : "";
383
- const project = a.projectName ? chalk3.cyan(` [${a.projectName}]`) : "";
295
+ const stamp = when ? chalk2.gray(formatDate(new Date(when))) : "";
296
+ const project = a.projectName ? chalk2.cyan(` [${a.projectName}]`) : "";
384
297
  console.log(` ${a.name}${project} ${stamp}`);
385
- console.log(chalk3.gray(` ID: ${a.id}`));
298
+ console.log(chalk2.gray(` ID: ${a.id}`));
386
299
  }
387
300
  }
388
301
  function outputTodaysActionsPretty(t) {
389
302
  const total = t.overdue.count + t.today.count + t.inbox.count;
390
303
  if (total === 0) {
391
- console.log(chalk3.gray("Nothing on your plate."));
304
+ console.log(chalk2.gray("Nothing on your plate."));
392
305
  return;
393
306
  }
394
- console.log(chalk3.bold("\nOn your plate"));
395
- console.log(chalk3.gray("\u2500".repeat(50)));
307
+ console.log(chalk2.bold("\nOn your plate"));
308
+ console.log(chalk2.gray("\u2500".repeat(50)));
396
309
  printTodayGroup("Overdue", t.overdue, "red");
397
310
  printTodayGroup("Today", t.today, "green");
398
311
  printTodayGroup("Inbox", t.inbox, "gray");
399
312
  if (t.overdue.count > 0) {
400
- console.log(chalk3.gray(`
313
+ console.log(chalk2.gray(`
401
314
  Run "exponential actions overdue" to see why the overdue pile is that size.`));
402
315
  }
403
316
  console.log();
@@ -407,43 +320,43 @@ function outputOverdueTriageJson(t) {
407
320
  }
408
321
  function outputOverdueTriagePretty(t) {
409
322
  if (t.totalOverdue === 0) {
410
- console.log(chalk3.green("Nothing overdue."));
323
+ console.log(chalk2.green("Nothing overdue."));
411
324
  return;
412
325
  }
413
- console.log(chalk3.bold(`
326
+ console.log(chalk2.bold(`
414
327
  Overdue: ${t.totalOverdue}`));
415
- console.log(chalk3.gray("\u2500".repeat(50)));
328
+ console.log(chalk2.gray("\u2500".repeat(50)));
416
329
  if (t.cohorts.length > 0) {
417
330
  console.log(
418
331
  `
419
- ${chalk3.yellow.bold(`${t.cohortCount} of these were bulk-created`)} ${chalk3.gray("\u2014 stamped with one identical timestamp, so almost certainly never individually due.")}`
332
+ ${chalk2.yellow.bold(`${t.cohortCount} of these were bulk-created`)} ${chalk2.gray("\u2014 stamped with one identical timestamp, so almost certainly never individually due.")}`
420
333
  );
421
334
  for (const c of t.cohorts) {
422
335
  console.log(
423
336
  `
424
- ${chalk3.bold(`${c.count} actions`)} stamped ${chalk3.gray(c.stampedAt.toISOString())} ${chalk3.red(`(${c.daysOverdue}d overdue)`)}`
337
+ ${chalk2.bold(`${c.count} actions`)} stamped ${chalk2.gray(c.stampedAt.toISOString())} ${chalk2.red(`(${c.daysOverdue}d overdue)`)}`
425
338
  );
426
339
  if (c.projectNames.length > 0) {
427
- console.log(` ${chalk3.cyan("Projects:")} ${c.projectNames.join(", ")}`);
340
+ console.log(` ${chalk2.cyan("Projects:")} ${c.projectNames.join(", ")}`);
428
341
  }
429
342
  for (const a of c.actions.slice(0, 4)) {
430
- console.log(chalk3.gray(` \xB7 ${a.name.substring(0, 62)}`));
343
+ console.log(chalk2.gray(` \xB7 ${a.name.substring(0, 62)}`));
431
344
  }
432
345
  if (c.actions.length > 4) {
433
- console.log(chalk3.gray(` \xB7 \u2026 and ${c.actions.length - 4} more`));
346
+ console.log(chalk2.gray(` \xB7 \u2026 and ${c.actions.length - 4} more`));
434
347
  }
435
348
  console.log(
436
- chalk3.gray(` Amnesty: `) + `exponential actions defer --ids ${c.actionIds.slice(0, 2).join(",")}${c.actionIds.length > 2 ? ",\u2026" : ""}`
349
+ chalk2.gray(` Amnesty: `) + `exponential actions defer --ids ${c.actionIds.slice(0, 2).join(",")}${c.actionIds.length > 2 ? ",\u2026" : ""}`
437
350
  );
438
351
  }
439
352
  }
440
353
  if (t.loose.length > 0) {
441
354
  console.log(`
442
- ${chalk3.bold(`${t.loose.length} individually dated`)} ${chalk3.gray("\u2014 real debt, oldest first.")}`);
355
+ ${chalk2.bold(`${t.loose.length} individually dated`)} ${chalk2.gray("\u2014 real debt, oldest first.")}`);
443
356
  for (const a of t.loose) {
444
- const project = a.projectName ? chalk3.cyan(` [${a.projectName}]`) : "";
445
- console.log(` ${chalk3.red(`${String(a.daysOverdue).padStart(3)}d`)} ${a.name.substring(0, 62)}${project}`);
446
- console.log(chalk3.gray(` ID: ${a.id}`));
357
+ const project = a.projectName ? chalk2.cyan(` [${a.projectName}]`) : "";
358
+ console.log(` ${chalk2.red(`${String(a.daysOverdue).padStart(3)}d`)} ${a.name.substring(0, 62)}${project}`);
359
+ console.log(chalk2.gray(` ID: ${a.id}`));
447
360
  }
448
361
  }
449
362
  console.log();
@@ -457,27 +370,27 @@ function outputProjectsJson(projects) {
457
370
  }
458
371
  function outputProjectsPretty(projects) {
459
372
  if (projects.length === 0) {
460
- console.log(chalk3.gray("No projects found."));
373
+ console.log(chalk2.gray("No projects found."));
461
374
  return;
462
375
  }
463
- console.log(chalk3.bold(`
376
+ console.log(chalk2.bold(`
464
377
  Projects (${projects.length} total)`));
465
- console.log(chalk3.gray("\u2500".repeat(50)));
378
+ console.log(chalk2.gray("\u2500".repeat(50)));
466
379
  for (const project of projects) {
467
380
  console.log(`
468
- ${chalk3.bold(project.name)}`);
469
- console.log(chalk3.gray(` ID: ${project.id}`));
381
+ ${chalk2.bold(project.name)}`);
382
+ console.log(chalk2.gray(` ID: ${project.id}`));
470
383
  if (project.status) {
471
- console.log(` ${chalk3.cyan("Status:")} ${project.status}`);
384
+ console.log(` ${chalk2.cyan("Status:")} ${project.status}`);
472
385
  }
473
386
  if (project.priority) {
474
- console.log(` ${chalk3.magenta("Priority:")} ${project.priority}`);
387
+ console.log(` ${chalk2.magenta("Priority:")} ${project.priority}`);
475
388
  }
476
389
  if (project.workspace) {
477
- console.log(` ${chalk3.yellow("Workspace:")} ${project.workspace.name} (${project.workspace.slug})`);
390
+ console.log(` ${chalk2.yellow("Workspace:")} ${project.workspace.name} (${project.workspace.slug})`);
478
391
  }
479
392
  if (project.description) {
480
- console.log(` ${chalk3.gray("Description:")} ${project.description.substring(0, 100)}${project.description.length > 100 ? "..." : ""}`);
393
+ console.log(` ${chalk2.gray("Description:")} ${project.description.substring(0, 100)}${project.description.length > 100 ? "..." : ""}`);
481
394
  }
482
395
  }
483
396
  console.log();
@@ -491,18 +404,18 @@ function outputWorkspacesJson(workspaces) {
491
404
  }
492
405
  function outputWorkspacesPretty(workspaces) {
493
406
  if (workspaces.length === 0) {
494
- console.log(chalk3.gray("No workspaces found."));
407
+ console.log(chalk2.gray("No workspaces found."));
495
408
  return;
496
409
  }
497
- console.log(chalk3.bold(`
410
+ console.log(chalk2.bold(`
498
411
  Workspaces (${workspaces.length} total)`));
499
- console.log(chalk3.gray("\u2500".repeat(50)));
412
+ console.log(chalk2.gray("\u2500".repeat(50)));
500
413
  for (const workspace of workspaces) {
501
414
  console.log(`
502
- ${chalk3.bold(workspace.name)}`);
503
- console.log(chalk3.gray(` ID: ${workspace.id}`));
504
- console.log(` ${chalk3.cyan("Slug:")} ${workspace.slug}`);
505
- console.log(` ${chalk3.magenta("Type:")} ${workspace.type}`);
415
+ ${chalk2.bold(workspace.name)}`);
416
+ console.log(chalk2.gray(` ID: ${workspace.id}`));
417
+ console.log(` ${chalk2.cyan("Slug:")} ${workspace.slug}`);
418
+ console.log(` ${chalk2.magenta("Type:")} ${workspace.type}`);
506
419
  }
507
420
  console.log();
508
421
  }
@@ -535,25 +448,25 @@ function outputContactJson(contact) {
535
448
  console.log(JSON.stringify(transformContact(contact), null, 2));
536
449
  }
537
450
  function outputContactPretty(contact) {
538
- const name = [contact.firstName, contact.lastName].filter(Boolean).join(" ") || chalk3.gray("(no name)");
539
- console.log(chalk3.gray("\u2500".repeat(50)));
451
+ const name = [contact.firstName, contact.lastName].filter(Boolean).join(" ") || chalk2.gray("(no name)");
452
+ console.log(chalk2.gray("\u2500".repeat(50)));
540
453
  console.log(`
541
- ${chalk3.bold(name)}`);
542
- console.log(chalk3.gray(` ID: ${contact.id}`));
543
- if (contact.email) console.log(` ${chalk3.cyan("Email:")} ${contact.email}`);
544
- if (contact.phone) console.log(` ${chalk3.cyan("Phone:")} ${contact.phone}`);
545
- if (contact.telegram) console.log(` ${chalk3.cyan("Telegram:")} ${contact.telegram}`);
546
- if (contact.linkedIn) console.log(` ${chalk3.cyan("LinkedIn:")} ${contact.linkedIn}`);
547
- if (contact.twitter) console.log(` ${chalk3.cyan("Twitter:")} ${contact.twitter}`);
548
- if (contact.github) console.log(` ${chalk3.cyan("GitHub:")} ${contact.github}`);
549
- if (contact.bluesky) console.log(` ${chalk3.cyan("Bluesky:")} ${contact.bluesky}`);
550
- if (contact.about) console.log(` ${chalk3.gray("About:")} ${contact.about.substring(0, 120)}${contact.about.length > 120 ? "..." : ""}`);
551
- if (contact.profileType) console.log(` ${chalk3.magenta("Type:")} ${contact.profileType}`);
552
- if (contact.skills?.length) console.log(` ${chalk3.yellow("Skills:")} ${contact.skills.join(", ")}`);
553
- if (contact.tags?.length) console.log(` ${chalk3.yellow("Tags:")} ${contact.tags.join(", ")}`);
554
- if (contact.organization) console.log(` ${chalk3.green("Org:")} ${contact.organization.name}`);
555
- if (contact.connectionScore != null) console.log(` ${chalk3.blue("Connection Score:")} ${contact.connectionScore}`);
556
- if (contact.lastInteractionAt) console.log(` ${chalk3.gray("Last Interaction:")} ${formatDate(new Date(contact.lastInteractionAt))} (${contact.lastInteractionType ?? ""})`);
454
+ ${chalk2.bold(name)}`);
455
+ console.log(chalk2.gray(` ID: ${contact.id}`));
456
+ if (contact.email) console.log(` ${chalk2.cyan("Email:")} ${contact.email}`);
457
+ if (contact.phone) console.log(` ${chalk2.cyan("Phone:")} ${contact.phone}`);
458
+ if (contact.telegram) console.log(` ${chalk2.cyan("Telegram:")} ${contact.telegram}`);
459
+ if (contact.linkedIn) console.log(` ${chalk2.cyan("LinkedIn:")} ${contact.linkedIn}`);
460
+ if (contact.twitter) console.log(` ${chalk2.cyan("Twitter:")} ${contact.twitter}`);
461
+ if (contact.github) console.log(` ${chalk2.cyan("GitHub:")} ${contact.github}`);
462
+ if (contact.bluesky) console.log(` ${chalk2.cyan("Bluesky:")} ${contact.bluesky}`);
463
+ if (contact.about) console.log(` ${chalk2.gray("About:")} ${contact.about.substring(0, 120)}${contact.about.length > 120 ? "..." : ""}`);
464
+ if (contact.profileType) console.log(` ${chalk2.magenta("Type:")} ${contact.profileType}`);
465
+ if (contact.skills?.length) console.log(` ${chalk2.yellow("Skills:")} ${contact.skills.join(", ")}`);
466
+ if (contact.tags?.length) console.log(` ${chalk2.yellow("Tags:")} ${contact.tags.join(", ")}`);
467
+ if (contact.organization) console.log(` ${chalk2.green("Org:")} ${contact.organization.name}`);
468
+ if (contact.connectionScore != null) console.log(` ${chalk2.blue("Connection Score:")} ${contact.connectionScore}`);
469
+ if (contact.lastInteractionAt) console.log(` ${chalk2.gray("Last Interaction:")} ${formatDate(new Date(contact.lastInteractionAt))} (${contact.lastInteractionType ?? ""})`);
557
470
  console.log();
558
471
  }
559
472
  function outputContactsJson(contacts, nextCursor) {
@@ -565,20 +478,20 @@ function outputContactsJson(contacts, nextCursor) {
565
478
  }
566
479
  function outputContactsPretty(contacts) {
567
480
  if (contacts.length === 0) {
568
- console.log(chalk3.gray("No contacts found."));
481
+ console.log(chalk2.gray("No contacts found."));
569
482
  return;
570
483
  }
571
- console.log(chalk3.bold(`
484
+ console.log(chalk2.bold(`
572
485
  Contacts (${contacts.length} total)`));
573
- console.log(chalk3.gray("\u2500".repeat(50)));
486
+ console.log(chalk2.gray("\u2500".repeat(50)));
574
487
  for (const contact of contacts) {
575
- const name = [contact.firstName, contact.lastName].filter(Boolean).join(" ") || chalk3.gray("(no name)");
488
+ const name = [contact.firstName, contact.lastName].filter(Boolean).join(" ") || chalk2.gray("(no name)");
576
489
  console.log(`
577
- ${chalk3.bold(name)}`);
578
- console.log(chalk3.gray(` ID: ${contact.id}`));
579
- if (contact.email) console.log(` ${chalk3.cyan("Email:")} ${contact.email}`);
580
- if (contact.organization) console.log(` ${chalk3.green("Org:")} ${contact.organization.name}`);
581
- if (contact.tags?.length) console.log(` ${chalk3.yellow("Tags:")} ${contact.tags.join(", ")}`);
490
+ ${chalk2.bold(name)}`);
491
+ console.log(chalk2.gray(` ID: ${contact.id}`));
492
+ if (contact.email) console.log(` ${chalk2.cyan("Email:")} ${contact.email}`);
493
+ if (contact.organization) console.log(` ${chalk2.green("Org:")} ${contact.organization.name}`);
494
+ if (contact.tags?.length) console.log(` ${chalk2.yellow("Tags:")} ${contact.tags.join(", ")}`);
582
495
  }
583
496
  console.log();
584
497
  }
@@ -612,10 +525,10 @@ function outputInteractionJson(interaction) {
612
525
  console.log(JSON.stringify(interaction, null, 2));
613
526
  }
614
527
  function outputInteractionPretty(interaction) {
615
- console.log(chalk3.gray("\u2500".repeat(50)));
616
- console.log(` ${chalk3.cyan("Type:")} ${interaction.type} (${interaction.direction})`);
617
- if (interaction.subject) console.log(` ${chalk3.bold("Subject:")} ${interaction.subject}`);
618
- if (interaction.notes) console.log(` ${chalk3.gray("Notes:")} ${interaction.notes}`);
528
+ console.log(chalk2.gray("\u2500".repeat(50)));
529
+ console.log(` ${chalk2.cyan("Type:")} ${interaction.type} (${interaction.direction})`);
530
+ if (interaction.subject) console.log(` ${chalk2.bold("Subject:")} ${interaction.subject}`);
531
+ if (interaction.notes) console.log(` ${chalk2.gray("Notes:")} ${interaction.notes}`);
619
532
  console.log();
620
533
  }
621
534
  function transformOrganization(org) {
@@ -637,15 +550,15 @@ function outputOrganizationJson(org) {
637
550
  console.log(JSON.stringify(transformOrganization(org), null, 2));
638
551
  }
639
552
  function outputOrganizationPretty(org) {
640
- console.log(chalk3.gray("\u2500".repeat(50)));
553
+ console.log(chalk2.gray("\u2500".repeat(50)));
641
554
  console.log(`
642
- ${chalk3.bold(org.name)}`);
643
- console.log(chalk3.gray(` ID: ${org.id}`));
644
- if (org.industry) console.log(` ${chalk3.magenta("Industry:")} ${org.industry}`);
645
- if (org.size) console.log(` ${chalk3.cyan("Size:")} ${org.size}`);
646
- if (org.websiteUrl) console.log(` ${chalk3.cyan("Website:")} ${org.websiteUrl}`);
647
- if (org.description) console.log(` ${chalk3.gray("About:")} ${org.description.substring(0, 120)}${org.description.length > 120 ? "..." : ""}`);
648
- if (org._count?.contacts != null) console.log(` ${chalk3.green("Contacts:")} ${org._count.contacts}`);
555
+ ${chalk2.bold(org.name)}`);
556
+ console.log(chalk2.gray(` ID: ${org.id}`));
557
+ if (org.industry) console.log(` ${chalk2.magenta("Industry:")} ${org.industry}`);
558
+ if (org.size) console.log(` ${chalk2.cyan("Size:")} ${org.size}`);
559
+ if (org.websiteUrl) console.log(` ${chalk2.cyan("Website:")} ${org.websiteUrl}`);
560
+ if (org.description) console.log(` ${chalk2.gray("About:")} ${org.description.substring(0, 120)}${org.description.length > 120 ? "..." : ""}`);
561
+ if (org._count?.contacts != null) console.log(` ${chalk2.green("Contacts:")} ${org._count.contacts}`);
649
562
  console.log();
650
563
  }
651
564
  function outputOrganizationsJson(organizations, nextCursor) {
@@ -657,18 +570,18 @@ function outputOrganizationsJson(organizations, nextCursor) {
657
570
  }
658
571
  function outputOrganizationsPretty(organizations) {
659
572
  if (organizations.length === 0) {
660
- console.log(chalk3.gray("No organizations found."));
573
+ console.log(chalk2.gray("No organizations found."));
661
574
  return;
662
575
  }
663
- console.log(chalk3.bold(`
576
+ console.log(chalk2.bold(`
664
577
  Organizations (${organizations.length} total)`));
665
- console.log(chalk3.gray("\u2500".repeat(50)));
578
+ console.log(chalk2.gray("\u2500".repeat(50)));
666
579
  for (const org of organizations) {
667
580
  console.log(`
668
- ${chalk3.bold(org.name)}`);
669
- console.log(chalk3.gray(` ID: ${org.id}`));
670
- if (org.industry) console.log(` ${chalk3.magenta("Industry:")} ${org.industry}`);
671
- if (org._count?.contacts != null) console.log(` ${chalk3.green("Contacts:")} ${org._count.contacts}`);
581
+ ${chalk2.bold(org.name)}`);
582
+ console.log(chalk2.gray(` ID: ${org.id}`));
583
+ if (org.industry) console.log(` ${chalk2.magenta("Industry:")} ${org.industry}`);
584
+ if (org._count?.contacts != null) console.log(` ${chalk2.green("Contacts:")} ${org._count.contacts}`);
672
585
  }
673
586
  console.log();
674
587
  }
@@ -676,21 +589,21 @@ function outputDealJson(deal) {
676
589
  console.log(JSON.stringify(transformDeal(deal), null, 2));
677
590
  }
678
591
  function outputDealPretty(deal) {
679
- console.log(chalk3.gray("\u2500".repeat(50)));
592
+ console.log(chalk2.gray("\u2500".repeat(50)));
680
593
  console.log(`
681
- ${chalk3.bold(deal.title)}`);
682
- console.log(chalk3.gray(` ID: ${deal.id}`));
683
- if (deal.stage) console.log(` ${chalk3.blue("Stage:")} ${deal.stage.name}`);
684
- if (deal.value != null) console.log(` ${chalk3.green("Value:")} ${deal.currency} ${deal.value.toLocaleString()}`);
685
- if (deal.probability != null) console.log(` ${chalk3.yellow("Probability:")} ${deal.probability}%`);
686
- if (deal.expectedCloseDate) console.log(` ${chalk3.cyan("Expected Close:")} ${formatDate(new Date(deal.expectedCloseDate))}`);
594
+ ${chalk2.bold(deal.title)}`);
595
+ console.log(chalk2.gray(` ID: ${deal.id}`));
596
+ if (deal.stage) console.log(` ${chalk2.blue("Stage:")} ${deal.stage.name}`);
597
+ if (deal.value != null) console.log(` ${chalk2.green("Value:")} ${deal.currency} ${deal.value.toLocaleString()}`);
598
+ if (deal.probability != null) console.log(` ${chalk2.yellow("Probability:")} ${deal.probability}%`);
599
+ if (deal.expectedCloseDate) console.log(` ${chalk2.cyan("Expected Close:")} ${formatDate(new Date(deal.expectedCloseDate))}`);
687
600
  if (deal.contact) {
688
601
  const name = [deal.contact.firstName, deal.contact.lastName].filter(Boolean).join(" ");
689
- if (name) console.log(` ${chalk3.magenta("Contact:")} ${name}`);
602
+ if (name) console.log(` ${chalk2.magenta("Contact:")} ${name}`);
690
603
  }
691
- if (deal.organization) console.log(` ${chalk3.magenta("Org:")} ${deal.organization.name}`);
692
- if (deal.assignedTo) console.log(` ${chalk3.gray("Assigned:")} ${deal.assignedTo.name ?? deal.assignedTo.email ?? deal.assignedTo.id}`);
693
- if (deal.description) console.log(` ${chalk3.gray("Description:")} ${deal.description.substring(0, 120)}${deal.description.length > 120 ? "..." : ""}`);
604
+ if (deal.organization) console.log(` ${chalk2.magenta("Org:")} ${deal.organization.name}`);
605
+ if (deal.assignedTo) console.log(` ${chalk2.gray("Assigned:")} ${deal.assignedTo.name ?? deal.assignedTo.email ?? deal.assignedTo.id}`);
606
+ if (deal.description) console.log(` ${chalk2.gray("Description:")} ${deal.description.substring(0, 120)}${deal.description.length > 120 ? "..." : ""}`);
694
607
  console.log();
695
608
  }
696
609
  function outputDealsJson(deals) {
@@ -701,24 +614,24 @@ function outputDealsJson(deals) {
701
614
  }
702
615
  function outputDealsPretty(deals) {
703
616
  if (deals.length === 0) {
704
- console.log(chalk3.gray("No deals found."));
617
+ console.log(chalk2.gray("No deals found."));
705
618
  return;
706
619
  }
707
- console.log(chalk3.bold(`
620
+ console.log(chalk2.bold(`
708
621
  Deals (${deals.length} total)`));
709
- console.log(chalk3.gray("\u2500".repeat(50)));
622
+ console.log(chalk2.gray("\u2500".repeat(50)));
710
623
  for (const deal of deals) {
711
- const stageLabel = deal.stage ? chalk3.blue(`[${deal.stage.name}]`) : "";
712
- const valueLabel = deal.value != null ? chalk3.green(` ${deal.currency} ${deal.value.toLocaleString()}`) : "";
624
+ const stageLabel = deal.stage ? chalk2.blue(`[${deal.stage.name}]`) : "";
625
+ const valueLabel = deal.value != null ? chalk2.green(` ${deal.currency} ${deal.value.toLocaleString()}`) : "";
713
626
  console.log(`
714
- ${stageLabel} ${chalk3.bold(deal.title)}${valueLabel}`);
715
- console.log(chalk3.gray(` ID: ${deal.id}`));
627
+ ${stageLabel} ${chalk2.bold(deal.title)}${valueLabel}`);
628
+ console.log(chalk2.gray(` ID: ${deal.id}`));
716
629
  if (deal.contact) {
717
630
  const name = [deal.contact.firstName, deal.contact.lastName].filter(Boolean).join(" ");
718
- if (name) console.log(` ${chalk3.magenta("Contact:")} ${name}`);
631
+ if (name) console.log(` ${chalk2.magenta("Contact:")} ${name}`);
719
632
  }
720
- if (deal.probability != null) console.log(` ${chalk3.yellow("Probability:")} ${deal.probability}%`);
721
- if (deal.expectedCloseDate) console.log(` ${chalk3.cyan("Close:")} ${formatDate(new Date(deal.expectedCloseDate))}`);
633
+ if (deal.probability != null) console.log(` ${chalk2.yellow("Probability:")} ${deal.probability}%`);
634
+ if (deal.expectedCloseDate) console.log(` ${chalk2.cyan("Close:")} ${formatDate(new Date(deal.expectedCloseDate))}`);
722
635
  }
723
636
  console.log();
724
637
  }
@@ -763,13 +676,13 @@ function outputPipelineJson(pipeline) {
763
676
  }, null, 2));
764
677
  }
765
678
  function outputPipelinePretty(pipeline) {
766
- console.log(chalk3.bold(`
679
+ console.log(chalk2.bold(`
767
680
  Pipeline: ${pipeline.name}`));
768
- console.log(chalk3.gray(` ID: ${pipeline.id}`));
769
- console.log(chalk3.gray("\u2500".repeat(50)));
681
+ console.log(chalk2.gray(` ID: ${pipeline.id}`));
682
+ console.log(chalk2.gray("\u2500".repeat(50)));
770
683
  for (const stage of pipeline.pipelineStages) {
771
- const count = stage._count?.deals != null ? chalk3.gray(` (${stage._count.deals} deals)`) : "";
772
- console.log(` ${chalk3.bold(stage.name)}${count} \u2014 ${chalk3.gray(stage.type)}`);
684
+ const count = stage._count?.deals != null ? chalk2.gray(` (${stage._count.deals} deals)`) : "";
685
+ console.log(` ${chalk2.bold(stage.name)}${count} \u2014 ${chalk2.gray(stage.type)}`);
773
686
  }
774
687
  console.log();
775
688
  }
@@ -831,12 +744,12 @@ function outputCommentPretty(comment) {
831
744
  const author = n.author?.name ?? n.authorId;
832
745
  const when = formatDate(n.createdAt);
833
746
  const badges = [
834
- n.parentCommentId && n.parentKey !== "parentId" ? chalk3.gray("(reply)") : "",
835
- n.resolvedAt ? chalk3.green("(resolved)") : ""
747
+ n.parentCommentId && n.parentKey !== "parentId" ? chalk2.gray("(reply)") : "",
748
+ n.resolvedAt ? chalk2.green("(resolved)") : ""
836
749
  ].filter(Boolean).join(" ");
837
- console.log(chalk3.gray("\u2500".repeat(50)));
838
- console.log(`${chalk3.bold(author)} ${chalk3.gray(`\u2014 ${when}`)}${badges ? ` ${badges}` : ""}`);
839
- console.log(chalk3.gray(` ID: ${n.id}`));
750
+ console.log(chalk2.gray("\u2500".repeat(50)));
751
+ console.log(`${chalk2.bold(author)} ${chalk2.gray(`\u2014 ${when}`)}${badges ? ` ${badges}` : ""}`);
752
+ console.log(chalk2.gray(` ID: ${n.id}`));
840
753
  console.log();
841
754
  console.log(n.content);
842
755
  console.log();
@@ -849,10 +762,10 @@ function outputCommentsJson(comments) {
849
762
  }
850
763
  function outputCommentsPretty(comments) {
851
764
  if (comments.length === 0) {
852
- console.log(chalk3.gray("No comments."));
765
+ console.log(chalk2.gray("No comments."));
853
766
  return;
854
767
  }
855
- console.log(chalk3.bold(`
768
+ console.log(chalk2.bold(`
856
769
  Comments (${comments.length})`));
857
770
  for (const c of comments) {
858
771
  outputCommentPretty(c);
@@ -862,12 +775,12 @@ function outputProductJson(product) {
862
775
  console.log(JSON.stringify(transformProduct(product), null, 2));
863
776
  }
864
777
  function outputProductPretty(product) {
865
- console.log(chalk3.gray("\u2500".repeat(50)));
778
+ console.log(chalk2.gray("\u2500".repeat(50)));
866
779
  console.log(`
867
- ${chalk3.bold(product.name)} ${chalk3.gray(`(${product.slug})`)}`);
868
- console.log(chalk3.gray(` ID: ${product.id}`));
780
+ ${chalk2.bold(product.name)} ${chalk2.gray(`(${product.slug})`)}`);
781
+ console.log(chalk2.gray(` ID: ${product.id}`));
869
782
  if (product.description) {
870
- console.log(` ${chalk3.gray("Description:")} ${product.description}`);
783
+ console.log(` ${chalk2.gray("Description:")} ${product.description}`);
871
784
  }
872
785
  if (product._count) {
873
786
  const c = product._count;
@@ -875,7 +788,7 @@ ${chalk3.bold(product.name)} ${chalk3.gray(`(${product.slug})`)}`);
875
788
  c.features != null ? `features: ${c.features}` : null,
876
789
  c.tickets != null ? `tickets: ${c.tickets}` : null
877
790
  ].filter(Boolean);
878
- if (parts.length) console.log(` ${chalk3.cyan("Counts:")} ${parts.join(" ")}`);
791
+ if (parts.length) console.log(` ${chalk2.cyan("Counts:")} ${parts.join(" ")}`);
879
792
  }
880
793
  console.log();
881
794
  }
@@ -887,16 +800,16 @@ function outputProductsJson(products) {
887
800
  }
888
801
  function outputProductsPretty(products) {
889
802
  if (products.length === 0) {
890
- console.log(chalk3.gray("No products found."));
803
+ console.log(chalk2.gray("No products found."));
891
804
  return;
892
805
  }
893
- console.log(chalk3.bold(`
806
+ console.log(chalk2.bold(`
894
807
  Products (${products.length} total)`));
895
- console.log(chalk3.gray("\u2500".repeat(50)));
808
+ console.log(chalk2.gray("\u2500".repeat(50)));
896
809
  for (const p of products) {
897
- const ticketCount = p._count?.tickets != null ? chalk3.gray(` \u2014 ${p._count.tickets} tickets`) : "";
898
- console.log(` ${chalk3.bold(p.name)} ${chalk3.gray(`(${p.slug})`)}${ticketCount}`);
899
- console.log(chalk3.gray(` ID: ${p.id}`));
810
+ const ticketCount = p._count?.tickets != null ? chalk2.gray(` \u2014 ${p._count.tickets} tickets`) : "";
811
+ console.log(` ${chalk2.bold(p.name)} ${chalk2.gray(`(${p.slug})`)}${ticketCount}`);
812
+ console.log(chalk2.gray(` ID: ${p.id}`));
900
813
  }
901
814
  console.log();
902
815
  }
@@ -920,32 +833,32 @@ function outputFeatureJson(feature) {
920
833
  console.log(JSON.stringify(transformFeature(feature), null, 2));
921
834
  }
922
835
  function outputFeaturePretty(feature) {
923
- console.log(chalk3.gray("\u2500".repeat(50)));
836
+ console.log(chalk2.gray("\u2500".repeat(50)));
924
837
  console.log(`
925
- ${chalk3[getFeatureStatusColor(feature.status)](`[${feature.status}]`)} ${chalk3.bold(feature.name)}`);
926
- console.log(chalk3.gray(` ID: ${feature.id}`));
838
+ ${chalk2[getFeatureStatusColor(feature.status)](`[${feature.status}]`)} ${chalk2.bold(feature.name)}`);
839
+ console.log(chalk2.gray(` ID: ${feature.id}`));
927
840
  if (feature.description) {
928
- console.log(` ${chalk3.gray("Description:")} ${feature.description.substring(0, 120)}${feature.description.length > 120 ? "..." : ""}`);
841
+ console.log(` ${chalk2.gray("Description:")} ${feature.description.substring(0, 120)}${feature.description.length > 120 ? "..." : ""}`);
929
842
  }
930
843
  if (feature.vision) {
931
- console.log(` ${chalk3.gray("Vision:")} ${feature.vision.substring(0, 120)}${feature.vision.length > 120 ? "..." : ""}`);
844
+ console.log(` ${chalk2.gray("Vision:")} ${feature.vision.substring(0, 120)}${feature.vision.length > 120 ? "..." : ""}`);
932
845
  }
933
846
  if (feature.priority != null) {
934
- console.log(` ${chalk3.magenta("Priority:")} ${feature.priority}`);
847
+ console.log(` ${chalk2.magenta("Priority:")} ${feature.priority}`);
935
848
  }
936
849
  if (feature.goal) {
937
- console.log(` ${chalk3.blue("Objective:")} ${feature.goal.title} ${chalk3.gray(`(${feature.goal.id})`)}`);
850
+ console.log(` ${chalk2.blue("Objective:")} ${feature.goal.title} ${chalk2.gray(`(${feature.goal.id})`)}`);
938
851
  }
939
852
  if (feature.keyResultLinks?.length) {
940
- console.log(` ${chalk3.blue("Key results:")}`);
853
+ console.log(` ${chalk2.blue("Key results:")}`);
941
854
  for (const link of feature.keyResultLinks) {
942
855
  const kr = link.keyResult;
943
856
  const progress = kr.currentValue != null && kr.targetValue != null ? `${kr.currentValue}/${kr.targetValue}${kr.unit && kr.unit !== "custom" ? ` ${kr.unit}` : ""}, ` : "";
944
- console.log(` \xB7 ${kr.title} ${chalk3.gray(`(${progress}${kr.period}, ${kr.id})`)}`);
857
+ console.log(` \xB7 ${kr.title} ${chalk2.gray(`(${progress}${kr.period}, ${kr.id})`)}`);
945
858
  }
946
859
  }
947
860
  if (feature._count?.tickets != null) {
948
- console.log(` ${chalk3.cyan("Tickets:")} ${feature._count.tickets}`);
861
+ console.log(` ${chalk2.cyan("Tickets:")} ${feature._count.tickets}`);
949
862
  }
950
863
  console.log();
951
864
  }
@@ -957,20 +870,20 @@ function outputFeaturesJson(features) {
957
870
  }
958
871
  function outputFeaturesPretty(features) {
959
872
  if (features.length === 0) {
960
- console.log(chalk3.gray("No features found."));
873
+ console.log(chalk2.gray("No features found."));
961
874
  return;
962
875
  }
963
- console.log(chalk3.bold(`
876
+ console.log(chalk2.bold(`
964
877
  Features (${features.length} total)`));
965
- console.log(chalk3.gray("\u2500".repeat(50)));
878
+ console.log(chalk2.gray("\u2500".repeat(50)));
966
879
  for (const f of features) {
967
- const statusBadge2 = chalk3[getFeatureStatusColor(f.status)](`[${f.status}]`);
968
- const ticketCount = f._count?.tickets != null ? chalk3.gray(` \u2014 ${f._count.tickets} tickets`) : "";
969
- console.log(` ${statusBadge2} ${chalk3.bold(f.name)}${ticketCount}`);
970
- console.log(chalk3.gray(` ID: ${f.id}`));
880
+ const statusBadge2 = chalk2[getFeatureStatusColor(f.status)](`[${f.status}]`);
881
+ const ticketCount = f._count?.tickets != null ? chalk2.gray(` \u2014 ${f._count.tickets} tickets`) : "";
882
+ console.log(` ${statusBadge2} ${chalk2.bold(f.name)}${ticketCount}`);
883
+ console.log(chalk2.gray(` ID: ${f.id}`));
971
884
  if (f.keyResultLinks?.length) {
972
885
  const titles = f.keyResultLinks.map((l) => l.keyResult.title).join("; ");
973
- console.log(chalk3.gray(` KRs: ${titles}`));
886
+ console.log(chalk2.gray(` KRs: ${titles}`));
974
887
  }
975
888
  }
976
889
  console.log();
@@ -1045,18 +958,18 @@ function outputUserStoryJson(story) {
1045
958
  console.log(JSON.stringify(transformUserStory(story), null, 2));
1046
959
  }
1047
960
  function outputUserStoryPretty(story) {
1048
- console.log(chalk3.gray("\u2500".repeat(50)));
1049
- const order = chalk3.gray(`#${story.displayOrder}`);
961
+ console.log(chalk2.gray("\u2500".repeat(50)));
962
+ const order = chalk2.gray(`#${story.displayOrder}`);
1050
963
  console.log(`
1051
- ${order} ${chalk3.bold(story.iWant ?? '(no "I want")')}`);
1052
- console.log(chalk3.gray(` ID: ${story.id}`));
1053
- if (story.asA) console.log(` ${chalk3.cyan("As a:")} ${story.asA}`);
1054
- if (story.iWant) console.log(` ${chalk3.cyan("I want:")} ${story.iWant}`);
1055
- if (story.soThat) console.log(` ${chalk3.cyan("So that:")} ${story.soThat}`);
964
+ ${order} ${chalk2.bold(story.iWant ?? '(no "I want")')}`);
965
+ console.log(chalk2.gray(` ID: ${story.id}`));
966
+ if (story.asA) console.log(` ${chalk2.cyan("As a:")} ${story.asA}`);
967
+ if (story.iWant) console.log(` ${chalk2.cyan("I want:")} ${story.iWant}`);
968
+ if (story.soThat) console.log(` ${chalk2.cyan("So that:")} ${story.soThat}`);
1056
969
  if (story.acceptanceCriteria) {
1057
- console.log(` ${chalk3.yellow("Acceptance:")} ${story.acceptanceCriteria}`);
970
+ console.log(` ${chalk2.yellow("Acceptance:")} ${story.acceptanceCriteria}`);
1058
971
  }
1059
- if (story.scopeId) console.log(` ${chalk3.magenta("Scope:")} ${story.scopeId}`);
972
+ if (story.scopeId) console.log(` ${chalk2.magenta("Scope:")} ${story.scopeId}`);
1060
973
  console.log();
1061
974
  }
1062
975
  function outputUserStoriesJson(stories) {
@@ -1067,21 +980,21 @@ function outputUserStoriesJson(stories) {
1067
980
  }
1068
981
  function outputUserStoriesPretty(stories) {
1069
982
  if (stories.length === 0) {
1070
- console.log(chalk3.gray("No user stories found."));
983
+ console.log(chalk2.gray("No user stories found."));
1071
984
  return;
1072
985
  }
1073
- console.log(chalk3.bold(`
986
+ console.log(chalk2.bold(`
1074
987
  User stories (${stories.length} total)`));
1075
- console.log(chalk3.gray("\u2500".repeat(50)));
988
+ console.log(chalk2.gray("\u2500".repeat(50)));
1076
989
  for (const story of stories) {
1077
- const order = chalk3.gray(`#${story.displayOrder}`);
990
+ const order = chalk2.gray(`#${story.displayOrder}`);
1078
991
  const parts = [
1079
992
  story.asA ? `As a ${story.asA},` : null,
1080
993
  story.iWant ? `I want ${story.iWant},` : null,
1081
994
  story.soThat ? `so that ${story.soThat}.` : null
1082
995
  ].filter(Boolean).join(" ");
1083
- console.log(` ${order} ${parts || chalk3.gray("(empty)")}`);
1084
- console.log(chalk3.gray(` ID: ${story.id}`));
996
+ console.log(` ${order} ${parts || chalk2.gray("(empty)")}`);
997
+ console.log(chalk2.gray(` ID: ${story.id}`));
1085
998
  }
1086
999
  console.log();
1087
1000
  }
@@ -1096,14 +1009,14 @@ function outputBatchResultsJson(results) {
1096
1009
  }
1097
1010
  function outputBatchResultsPretty(results) {
1098
1011
  const succeeded = results.filter((r) => r.ok).length;
1099
- console.log(chalk3.bold(`
1012
+ console.log(chalk2.bold(`
1100
1013
  Added ${succeeded}/${results.length} user stories`));
1101
- console.log(chalk3.gray("\u2500".repeat(50)));
1014
+ console.log(chalk2.gray("\u2500".repeat(50)));
1102
1015
  for (const r of results) {
1103
1016
  if (r.ok) {
1104
- console.log(` ${chalk3.green("\u2713")} [${r.index}] ${chalk3.gray(r.id ?? "")}`);
1017
+ console.log(` ${chalk2.green("\u2713")} [${r.index}] ${chalk2.gray(r.id ?? "")}`);
1105
1018
  } else {
1106
- console.log(` ${chalk3.red("\u2717")} [${r.index}] ${r.error ?? "failed"}`);
1019
+ console.log(` ${chalk2.red("\u2717")} [${r.index}] ${r.error ?? "failed"}`);
1107
1020
  }
1108
1021
  }
1109
1022
  console.log();
@@ -1113,54 +1026,54 @@ function outputTicketJson(ticket) {
1113
1026
  }
1114
1027
  function outputTicketPretty(ticket) {
1115
1028
  const id = ticket.shortId ?? (ticket.number != null ? `#${ticket.number}` : "?");
1116
- console.log(chalk3.gray("\u2500".repeat(50)));
1029
+ console.log(chalk2.gray("\u2500".repeat(50)));
1117
1030
  console.log(
1118
1031
  `
1119
- ${chalk3[getTicketStatusColor(ticket.status)](`[${ticket.status}]`)} ${chalk3.gray(`[${ticket.type}]`)} ${chalk3.bold(`${id} ${ticket.title}`)}`
1032
+ ${chalk2[getTicketStatusColor(ticket.status)](`[${ticket.status}]`)} ${chalk2.gray(`[${ticket.type}]`)} ${chalk2.bold(`${id} ${ticket.title}`)}`
1120
1033
  );
1121
- console.log(chalk3.gray(` ID: ${ticket.id}`));
1034
+ console.log(chalk2.gray(` ID: ${ticket.id}`));
1122
1035
  if (ticket.isBlocked) {
1123
- console.log(` ${chalk3.red("BLOCKED")} by ${ticket.openBlockerCount ?? 0} open ticket(s)`);
1036
+ console.log(` ${chalk2.red("BLOCKED")} by ${ticket.openBlockerCount ?? 0} open ticket(s)`);
1124
1037
  } else if (ticket.openBlockerCount && ticket.openBlockerCount > 0) {
1125
- console.log(` ${chalk3.yellow("Blockers:")} ${ticket.openBlockerCount} open (not currently in flight)`);
1038
+ console.log(` ${chalk2.yellow("Blockers:")} ${ticket.openBlockerCount} open (not currently in flight)`);
1126
1039
  }
1127
1040
  if (ticket.feature) {
1128
- console.log(` ${chalk3.cyan("Feature:")} ${ticket.feature.name}`);
1041
+ console.log(` ${chalk2.cyan("Feature:")} ${ticket.feature.name}`);
1129
1042
  }
1130
1043
  if (ticket.epic) {
1131
- console.log(` ${chalk3.cyan("Epic:")} ${ticket.epic.name}`);
1044
+ console.log(` ${chalk2.cyan("Epic:")} ${ticket.epic.name}`);
1132
1045
  }
1133
1046
  if (ticket.assignee) {
1134
- console.log(` ${chalk3.magenta("Assignee:")} ${ticket.assignee.name ?? ticket.assignee.id}`);
1047
+ console.log(` ${chalk2.magenta("Assignee:")} ${ticket.assignee.name ?? ticket.assignee.id}`);
1135
1048
  }
1136
1049
  if (ticket.priority != null) {
1137
- console.log(` ${chalk3.magenta("Priority:")} ${ticket.priority}`);
1050
+ console.log(` ${chalk2.magenta("Priority:")} ${ticket.priority}`);
1138
1051
  }
1139
1052
  if (ticket.points != null) {
1140
- console.log(` ${chalk3.yellow("Points:")} ${ticket.points}`);
1053
+ console.log(` ${chalk2.yellow("Points:")} ${ticket.points}`);
1141
1054
  }
1142
1055
  if (ticket.body) {
1143
- console.log(` ${chalk3.gray("Body:")} ${ticket.body.substring(0, 200)}${ticket.body.length > 200 ? "..." : ""}`);
1056
+ console.log(` ${chalk2.gray("Body:")} ${ticket.body.substring(0, 200)}${ticket.body.length > 200 ? "..." : ""}`);
1144
1057
  }
1145
1058
  const detail = ticket;
1146
1059
  if (detail.dependsOn && detail.dependsOn.length > 0) {
1147
- console.log(` ${chalk3.cyan("Depends on:")}`);
1060
+ console.log(` ${chalk2.cyan("Depends on:")}`);
1148
1061
  for (const dep of detail.dependsOn) {
1149
1062
  const depId = dep.shortId ?? (dep.number != null ? `#${dep.number}` : "?");
1150
- console.log(` - ${chalk3.gray(`[${dep.status}]`)} ${depId} ${dep.title}`);
1063
+ console.log(` - ${chalk2.gray(`[${dep.status}]`)} ${depId} ${dep.title}`);
1151
1064
  }
1152
1065
  }
1153
1066
  if (detail.requiredFor && detail.requiredFor.length > 0) {
1154
- console.log(` ${chalk3.cyan("Required for:")}`);
1067
+ console.log(` ${chalk2.cyan("Required for:")}`);
1155
1068
  for (const dep of detail.requiredFor) {
1156
1069
  const depId = dep.shortId ?? (dep.number != null ? `#${dep.number}` : "?");
1157
- console.log(` - ${chalk3.gray(`[${dep.status}]`)} ${depId} ${dep.title}`);
1070
+ console.log(` - ${chalk2.gray(`[${dep.status}]`)} ${depId} ${dep.title}`);
1158
1071
  }
1159
1072
  }
1160
1073
  if (detail.actions && detail.actions.length > 0) {
1161
- console.log(` ${chalk3.cyan("Actions:")} ${detail.actions.length}`);
1074
+ console.log(` ${chalk2.cyan("Actions:")} ${detail.actions.length}`);
1162
1075
  for (const a of detail.actions) {
1163
- console.log(` - ${chalk3.gray(`[${a.kanbanStatus ?? a.status}]`)} ${a.name} ${chalk3.gray(`(${a.id})`)}`);
1076
+ console.log(` - ${chalk2.gray(`[${a.kanbanStatus ?? a.status}]`)} ${a.name} ${chalk2.gray(`(${a.id})`)}`);
1164
1077
  }
1165
1078
  }
1166
1079
  console.log();
@@ -1173,19 +1086,19 @@ function outputTicketsJson(tickets) {
1173
1086
  }
1174
1087
  function outputTicketsPretty(tickets) {
1175
1088
  if (tickets.length === 0) {
1176
- console.log(chalk3.gray("No tickets found."));
1089
+ console.log(chalk2.gray("No tickets found."));
1177
1090
  return;
1178
1091
  }
1179
- console.log(chalk3.bold(`
1092
+ console.log(chalk2.bold(`
1180
1093
  Tickets (${tickets.length} total)`));
1181
- console.log(chalk3.gray("\u2500".repeat(50)));
1094
+ console.log(chalk2.gray("\u2500".repeat(50)));
1182
1095
  for (const t of tickets) {
1183
1096
  const id = t.shortId ?? (t.number != null ? `#${t.number}` : "?");
1184
- const statusBadge2 = chalk3[getTicketStatusColor(t.status)](`[${t.status}]`);
1185
- const typeBadge = chalk3.gray(`[${t.type}]`);
1186
- const blocked = t.isBlocked ? chalk3.red(" BLOCKED") : "";
1187
- console.log(` ${statusBadge2} ${typeBadge} ${chalk3.bold(id)} ${t.title}${blocked}`);
1188
- console.log(chalk3.gray(` ID: ${t.id}`));
1097
+ const statusBadge2 = chalk2[getTicketStatusColor(t.status)](`[${t.status}]`);
1098
+ const typeBadge = chalk2.gray(`[${t.type}]`);
1099
+ const blocked = t.isBlocked ? chalk2.red(" BLOCKED") : "";
1100
+ console.log(` ${statusBadge2} ${typeBadge} ${chalk2.bold(id)} ${t.title}${blocked}`);
1101
+ console.log(chalk2.gray(` ID: ${t.id}`));
1189
1102
  }
1190
1103
  console.log();
1191
1104
  }
@@ -1209,18 +1122,18 @@ function outputTicketSearchJson(hits, query) {
1209
1122
  }
1210
1123
  function outputTicketSearchPretty(hits, query) {
1211
1124
  if (hits.length === 0) {
1212
- console.log(chalk3.gray(`No tickets match "${query}".`));
1125
+ console.log(chalk2.gray(`No tickets match "${query}".`));
1213
1126
  return;
1214
1127
  }
1215
- console.log(chalk3.bold(`
1128
+ console.log(chalk2.bold(`
1216
1129
  Tickets matching "${query}" (${hits.length})`));
1217
- console.log(chalk3.gray("\u2500".repeat(50)));
1130
+ console.log(chalk2.gray("\u2500".repeat(50)));
1218
1131
  for (const t of hits) {
1219
1132
  const id = t.shortId ?? (t.number != null ? `#${t.number}` : "?");
1220
- const statusBadge2 = chalk3[getTicketStatusColor(t.status)](`[${t.status}]`);
1221
- const assignee = t.assignee ? chalk3.gray(` \u2014 ${t.assignee.name ?? t.assignee.id}`) : "";
1222
- console.log(` ${statusBadge2} ${chalk3.bold(id)} ${t.title}${assignee}`);
1223
- console.log(chalk3.gray(` ID: ${t.id}`));
1133
+ const statusBadge2 = chalk2[getTicketStatusColor(t.status)](`[${t.status}]`);
1134
+ const assignee = t.assignee ? chalk2.gray(` \u2014 ${t.assignee.name ?? t.assignee.id}`) : "";
1135
+ console.log(` ${statusBadge2} ${chalk2.bold(id)} ${t.title}${assignee}`);
1136
+ console.log(chalk2.gray(` ID: ${t.id}`));
1224
1137
  }
1225
1138
  console.log();
1226
1139
  }
@@ -1297,22 +1210,22 @@ function outputEpicJson(epic) {
1297
1210
  console.log(JSON.stringify(transformEpic(epic), null, 2));
1298
1211
  }
1299
1212
  function outputEpicPretty(epic) {
1300
- console.log(chalk3.gray("\u2500".repeat(50)));
1213
+ console.log(chalk2.gray("\u2500".repeat(50)));
1301
1214
  console.log(`
1302
- ${chalk3[getEpicStatusColor(epic.status)](`[${epic.status}]`)} ${chalk3.bold(epic.name)}`);
1303
- console.log(chalk3.gray(` ID: ${epic.id}`));
1215
+ ${chalk2[getEpicStatusColor(epic.status)](`[${epic.status}]`)} ${chalk2.bold(epic.name)}`);
1216
+ console.log(chalk2.gray(` ID: ${epic.id}`));
1304
1217
  if (epic.description) {
1305
- console.log(` ${chalk3.gray("Description:")} ${epic.description.substring(0, 200)}${epic.description.length > 200 ? "..." : ""}`);
1218
+ console.log(` ${chalk2.gray("Description:")} ${epic.description.substring(0, 200)}${epic.description.length > 200 ? "..." : ""}`);
1306
1219
  }
1307
- console.log(` ${chalk3.magenta("Priority:")} ${epic.priority}`);
1220
+ console.log(` ${chalk2.magenta("Priority:")} ${epic.priority}`);
1308
1221
  if (epic.startDate) {
1309
- console.log(` ${chalk3.cyan("Start:")} ${formatDate(new Date(epic.startDate))}`);
1222
+ console.log(` ${chalk2.cyan("Start:")} ${formatDate(new Date(epic.startDate))}`);
1310
1223
  }
1311
1224
  if (epic.targetDate) {
1312
- console.log(` ${chalk3.cyan("Target:")} ${formatDate(new Date(epic.targetDate))}`);
1225
+ console.log(` ${chalk2.cyan("Target:")} ${formatDate(new Date(epic.targetDate))}`);
1313
1226
  }
1314
1227
  if (epic.owner) {
1315
- console.log(` ${chalk3.gray("Owner:")} ${epic.owner.name ?? epic.owner.email ?? epic.owner.id}`);
1228
+ console.log(` ${chalk2.gray("Owner:")} ${epic.owner.name ?? epic.owner.email ?? epic.owner.id}`);
1316
1229
  }
1317
1230
  if (epic._count) {
1318
1231
  const c = epic._count;
@@ -1320,7 +1233,7 @@ ${chalk3[getEpicStatusColor(epic.status)](`[${epic.status}]`)} ${chalk3.bold(epi
1320
1233
  c.actions != null ? `actions: ${c.actions}` : null,
1321
1234
  c.tickets != null ? `tickets: ${c.tickets}` : null
1322
1235
  ].filter(Boolean);
1323
- if (parts.length) console.log(` ${chalk3.cyan("Counts:")} ${parts.join(" ")}`);
1236
+ if (parts.length) console.log(` ${chalk2.cyan("Counts:")} ${parts.join(" ")}`);
1324
1237
  }
1325
1238
  console.log();
1326
1239
  }
@@ -1332,19 +1245,19 @@ function outputEpicsJson(epics) {
1332
1245
  }
1333
1246
  function outputEpicsPretty(epics) {
1334
1247
  if (epics.length === 0) {
1335
- console.log(chalk3.gray("No epics found."));
1248
+ console.log(chalk2.gray("No epics found."));
1336
1249
  return;
1337
1250
  }
1338
- console.log(chalk3.bold(`
1251
+ console.log(chalk2.bold(`
1339
1252
  Epics (${epics.length} total)`));
1340
- console.log(chalk3.gray("\u2500".repeat(50)));
1253
+ console.log(chalk2.gray("\u2500".repeat(50)));
1341
1254
  for (const e of epics) {
1342
- const statusBadge2 = chalk3[getEpicStatusColor(e.status)](`[${e.status}]`);
1343
- const counts = e._count ? chalk3.gray(
1255
+ const statusBadge2 = chalk2[getEpicStatusColor(e.status)](`[${e.status}]`);
1256
+ const counts = e._count ? chalk2.gray(
1344
1257
  ` \u2014 ${e._count.tickets ?? 0} tickets, ${e._count.actions ?? 0} actions`
1345
1258
  ) : "";
1346
- console.log(` ${statusBadge2} ${chalk3.bold(e.name)}${counts}`);
1347
- console.log(chalk3.gray(` ID: ${e.id}`));
1259
+ console.log(` ${statusBadge2} ${chalk2.bold(e.name)}${counts}`);
1260
+ console.log(chalk2.gray(` ID: ${e.id}`));
1348
1261
  }
1349
1262
  console.log();
1350
1263
  }
@@ -1381,15 +1294,15 @@ function getEpicStatusColor(status) {
1381
1294
  }
1382
1295
  function outputStagesPretty(stages) {
1383
1296
  if (stages.length === 0) {
1384
- console.log(chalk3.gray("No stages found."));
1297
+ console.log(chalk2.gray("No stages found."));
1385
1298
  return;
1386
1299
  }
1387
- console.log(chalk3.bold(`
1300
+ console.log(chalk2.bold(`
1388
1301
  Pipeline Stages (${stages.length})`));
1389
- console.log(chalk3.gray("\u2500".repeat(50)));
1302
+ console.log(chalk2.gray("\u2500".repeat(50)));
1390
1303
  for (const stage of stages) {
1391
- const count = stage._count?.deals != null ? chalk3.gray(` (${stage._count.deals} deals)`) : "";
1392
- console.log(` ${chalk3.bold(stage.name)}${count} \u2014 ${chalk3.gray(stage.type)}`);
1304
+ const count = stage._count?.deals != null ? chalk2.gray(` (${stage._count.deals} deals)`) : "";
1305
+ console.log(` ${chalk2.bold(stage.name)}${count} \u2014 ${chalk2.gray(stage.type)}`);
1393
1306
  }
1394
1307
  console.log();
1395
1308
  }
@@ -1404,29 +1317,29 @@ function formatDay(value) {
1404
1317
  return new Date(value).toISOString().slice(0, 10);
1405
1318
  }
1406
1319
  function outputPagePretty(page) {
1407
- console.log(chalk3.gray("\u2500".repeat(50)));
1320
+ console.log(chalk2.gray("\u2500".repeat(50)));
1408
1321
  console.log(`
1409
- ${chalk3.bold(page.title)}`);
1410
- console.log(chalk3.gray(` ID: ${page.id} v${page.docVersion}`));
1322
+ ${chalk2.bold(page.title)}`);
1323
+ console.log(chalk2.gray(` ID: ${page.id} v${page.docVersion}`));
1411
1324
  if (page.project) {
1412
- console.log(` ${chalk3.gray("Project:")} ${page.project.name}`);
1325
+ console.log(` ${chalk2.gray("Project:")} ${page.project.name}`);
1413
1326
  }
1414
1327
  if (page.asOf || page.source) {
1415
1328
  const parts = [];
1416
1329
  if (page.asOf) parts.push(`As of ${formatDay(page.asOf)}`);
1417
1330
  if (page.source) parts.push(`Source: ${page.source}`);
1418
- console.log(` ${chalk3.gray(parts.join(" \xB7 "))}`);
1331
+ console.log(` ${chalk2.gray(parts.join(" \xB7 "))}`);
1419
1332
  }
1420
1333
  if (typeof page.bodyBytes === "number") {
1421
1334
  const scope = page.section ? ` (showing section "${page.section.text}")` : "";
1422
- console.log(chalk3.gray(` Body: ${formatBytes(page.bodyBytes)}${scope}`));
1335
+ console.log(chalk2.gray(` Body: ${formatBytes(page.bodyBytes)}${scope}`));
1423
1336
  }
1424
1337
  if (page.outline) {
1425
1338
  console.log();
1426
- if (page.outline.length === 0) console.log(chalk3.gray(" (no headings)"));
1339
+ if (page.outline.length === 0) console.log(chalk2.gray(" (no headings)"));
1427
1340
  for (const h of page.outline) {
1428
1341
  console.log(
1429
- ` ${" ".repeat(h.level - 1)}${chalk3.gray("#".repeat(h.level))} ${h.text} ${chalk3.gray(`L${h.line + 1}`)}`
1342
+ ` ${" ".repeat(h.level - 1)}${chalk2.gray("#".repeat(h.level))} ${h.text} ${chalk2.gray(`L${h.line + 1}`)}`
1430
1343
  );
1431
1344
  }
1432
1345
  console.log();
@@ -1440,68 +1353,68 @@ ${page.body}
1440
1353
  }
1441
1354
  function outputPageSearchPretty(result) {
1442
1355
  if (result.results.length === 0) {
1443
- console.log(chalk3.gray(`No pages about "${result.query}".`));
1356
+ console.log(chalk2.gray(`No pages about "${result.query}".`));
1444
1357
  return;
1445
1358
  }
1446
- console.log(chalk3.bold(`
1359
+ console.log(chalk2.bold(`
1447
1360
  Pages about "${result.query}" (${result.results.length})`));
1448
- console.log(chalk3.gray("\u2500".repeat(50)));
1361
+ console.log(chalk2.gray("\u2500".repeat(50)));
1449
1362
  for (const r of result.results) {
1450
- const score = r.similarity === null ? chalk3.gray("text match") : chalk3.gray(`${Math.round(r.similarity * 100)}%`);
1451
- console.log(` ${chalk3.bold(r.title)} ${score}`);
1452
- console.log(chalk3.gray(` ID: ${r.id} ${r.url}`));
1363
+ const score = r.similarity === null ? chalk2.gray("text match") : chalk2.gray(`${Math.round(r.similarity * 100)}%`);
1364
+ console.log(` ${chalk2.bold(r.title)} ${score}`);
1365
+ console.log(chalk2.gray(` ID: ${r.id} ${r.url}`));
1453
1366
  if (r.snippet) console.log(` ${r.snippet}`);
1454
1367
  }
1455
1368
  console.log();
1456
1369
  }
1457
1370
  function outputPageHistoryPretty(history) {
1458
1371
  if (history.revisions.length === 0) {
1459
- console.log(chalk3.gray("No revisions yet."));
1372
+ console.log(chalk2.gray("No revisions yet."));
1460
1373
  return;
1461
1374
  }
1462
1375
  const n = history.revisions.length;
1463
- console.log(chalk3.bold(`
1376
+ console.log(chalk2.bold(`
1464
1377
  History (${n} revision${n === 1 ? "" : "s"})`));
1465
- console.log(chalk3.gray("\u2500".repeat(50)));
1378
+ console.log(chalk2.gray("\u2500".repeat(50)));
1466
1379
  for (const r of history.revisions) {
1467
1380
  const when = new Date(r.updatedAt).toISOString().replace("T", " ").slice(0, 16);
1468
1381
  const who = r.kind === "baseline" ? "before history" : r.authorHidden ? "a member" : r.author?.name ?? "automated";
1469
1382
  console.log(
1470
- ` ${chalk3.gray(when)} ${chalk3.bold(who)} ${chalk3.cyan(r.kind)} v${r.docVersion} ${chalk3.gray(formatBytes(r.bodyBytes))}`
1383
+ ` ${chalk2.gray(when)} ${chalk2.bold(who)} ${chalk2.cyan(r.kind)} v${r.docVersion} ${chalk2.gray(formatBytes(r.bodyBytes))}`
1471
1384
  );
1472
- console.log(chalk3.gray(` ${r.id} "${r.title}"`));
1385
+ console.log(chalk2.gray(` ${r.id} "${r.title}"`));
1473
1386
  if (r.note) console.log(` ${r.note}`);
1474
- else if (r.kind === "markdown" || r.kind === "restore") console.log(chalk3.gray(" (no reason given)"));
1387
+ else if (r.kind === "markdown" || r.kind === "restore") console.log(chalk2.gray(" (no reason given)"));
1475
1388
  }
1476
1389
  if (history.nextCursor) {
1477
- console.log(chalk3.gray(`
1390
+ console.log(chalk2.gray(`
1478
1391
  More: --cursor ${history.nextCursor}`));
1479
1392
  }
1480
1393
  console.log();
1481
1394
  }
1482
1395
  function outputPageDiffPretty(diff) {
1483
1396
  const side = (s) => s.revisionId ? `${s.revisionId} (v${s.docVersion})` : s.createdAt ? "current" : "(empty)";
1484
- console.log(chalk3.gray(`${side(diff.from)} \u2192 ${side(diff.to)}`));
1397
+ console.log(chalk2.gray(`${side(diff.from)} \u2192 ${side(diff.to)}`));
1485
1398
  if (diff.titleChanged) {
1486
- console.log(chalk3.red(`- title: ${diff.from.title}`));
1487
- console.log(chalk3.green(`+ title: ${diff.to.title}`));
1399
+ console.log(chalk2.red(`- title: ${diff.from.title}`));
1400
+ console.log(chalk2.green(`+ title: ${diff.to.title}`));
1488
1401
  }
1489
1402
  if (diff.provenanceChanged) {
1490
1403
  const prov = (s) => `as of ${s.asOf ? formatDay(s.asOf) : "\u2014"} \xB7 source ${s.source ?? "\u2014"}`;
1491
- console.log(chalk3.red(`- ${prov(diff.from)}`));
1492
- console.log(chalk3.green(`+ ${prov(diff.to)}`));
1404
+ console.log(chalk2.red(`- ${prov(diff.from)}`));
1405
+ console.log(chalk2.green(`+ ${prov(diff.to)}`));
1493
1406
  }
1494
1407
  if (!diff.unified) {
1495
- console.log(chalk3.gray("No changes to the body."));
1408
+ console.log(chalk2.gray("No changes to the body."));
1496
1409
  return;
1497
1410
  }
1498
- console.log(chalk3.gray(`+${diff.stats.added} \u2212${diff.stats.removed}
1411
+ console.log(chalk2.gray(`+${diff.stats.added} \u2212${diff.stats.removed}
1499
1412
  `));
1500
1413
  for (const line of diff.unified.split("\n")) {
1501
1414
  if (line.startsWith("+++") || line.startsWith("---") || line.startsWith("@@")) {
1502
- console.log(chalk3.gray(line));
1503
- } else if (line.startsWith("+")) console.log(chalk3.green(line));
1504
- else if (line.startsWith("-")) console.log(chalk3.red(line));
1415
+ console.log(chalk2.gray(line));
1416
+ } else if (line.startsWith("+")) console.log(chalk2.green(line));
1417
+ else if (line.startsWith("-")) console.log(chalk2.red(line));
1505
1418
  else console.log(line);
1506
1419
  }
1507
1420
  }
@@ -1510,15 +1423,15 @@ function outputPagesJson(pages) {
1510
1423
  }
1511
1424
  function outputPagesPretty(pages) {
1512
1425
  if (pages.length === 0) {
1513
- console.log(chalk3.gray("No pages found."));
1426
+ console.log(chalk2.gray("No pages found."));
1514
1427
  return;
1515
1428
  }
1516
- console.log(chalk3.bold(`
1429
+ console.log(chalk2.bold(`
1517
1430
  Pages (${pages.length} total)`));
1518
- console.log(chalk3.gray("\u2500".repeat(50)));
1431
+ console.log(chalk2.gray("\u2500".repeat(50)));
1519
1432
  for (const p of pages) {
1520
- console.log(` ${chalk3.bold(p.title)}`);
1521
- console.log(chalk3.gray(` ID: ${p.id}`));
1433
+ console.log(` ${chalk2.bold(p.title)}`);
1434
+ console.log(chalk2.gray(` ID: ${p.id}`));
1522
1435
  }
1523
1436
  console.log();
1524
1437
  }
@@ -1579,29 +1492,29 @@ function outputMeetingJson(meeting) {
1579
1492
  console.log(JSON.stringify(transformMeeting(meeting), null, 2));
1580
1493
  }
1581
1494
  function outputMeetingPretty(meeting, options = {}) {
1582
- console.log(chalk3.gray("\u2500".repeat(50)));
1495
+ console.log(chalk2.gray("\u2500".repeat(50)));
1583
1496
  console.log(`
1584
- ${chalk3.bold(meeting.title ?? "Untitled meeting")}`);
1585
- console.log(chalk3.gray(` ID: ${meeting.id}`));
1586
- console.log(` ${chalk3.gray("Date:")} ${meetingWhen(meeting).toLocaleString()}`);
1497
+ ${chalk2.bold(meeting.title ?? "Untitled meeting")}`);
1498
+ console.log(chalk2.gray(` ID: ${meeting.id}`));
1499
+ console.log(` ${chalk2.gray("Date:")} ${meetingWhen(meeting).toLocaleString()}`);
1587
1500
  if (meeting.workspace) {
1588
- console.log(` ${chalk3.gray("Workspace:")} ${meeting.workspace.name}`);
1501
+ console.log(` ${chalk2.gray("Workspace:")} ${meeting.workspace.name}`);
1589
1502
  }
1590
1503
  if (meeting.project) {
1591
- console.log(` ${chalk3.gray("Project:")} ${meeting.project.name}`);
1504
+ console.log(` ${chalk2.gray("Project:")} ${meeting.project.name}`);
1592
1505
  }
1593
1506
  if (meeting.sourceIntegration) {
1594
- console.log(` ${chalk3.gray("Source:")} ${meeting.sourceIntegration.provider}`);
1507
+ console.log(` ${chalk2.gray("Source:")} ${meeting.sourceIntegration.provider}`);
1595
1508
  }
1596
1509
  if (meeting.durationSeconds) {
1597
- console.log(` ${chalk3.gray("Duration:")} ${Math.round(meeting.durationSeconds / 60)} min`);
1510
+ console.log(` ${chalk2.gray("Duration:")} ${Math.round(meeting.durationSeconds / 60)} min`);
1598
1511
  }
1599
1512
  if (meeting.archivedAt) {
1600
- console.log(` ${chalk3.yellow("Archived")}`);
1513
+ console.log(` ${chalk2.yellow("Archived")}`);
1601
1514
  }
1602
1515
  if (meeting.participants && meeting.participants.length > 0) {
1603
1516
  const people = meeting.participants.map((p) => p.name ?? p.email).join(", ");
1604
- console.log(` ${chalk3.gray("Participants:")} ${people}`);
1517
+ console.log(` ${chalk2.gray("Participants:")} ${people}`);
1605
1518
  }
1606
1519
  if (meeting.description) {
1607
1520
  console.log(`
@@ -1609,26 +1522,26 @@ ${meeting.description}`);
1609
1522
  }
1610
1523
  if (meeting.summary) {
1611
1524
  console.log(`
1612
- ${chalk3.bold("Summary")}`);
1525
+ ${chalk2.bold("Summary")}`);
1613
1526
  console.log(renderMeetingSummary(meeting.summary));
1614
1527
  }
1615
1528
  if (meeting.notes) {
1616
1529
  console.log(`
1617
- ${chalk3.bold("Notes")}`);
1530
+ ${chalk2.bold("Notes")}`);
1618
1531
  console.log(meeting.notes);
1619
1532
  } else {
1620
- console.log(chalk3.gray("\nNo notes yet."));
1533
+ console.log(chalk2.gray("\nNo notes yet."));
1621
1534
  }
1622
1535
  if (options.transcript) {
1623
1536
  if (meeting.transcription) {
1624
1537
  console.log(`
1625
- ${chalk3.bold("Transcript")}`);
1538
+ ${chalk2.bold("Transcript")}`);
1626
1539
  console.log(meeting.transcription);
1627
1540
  } else {
1628
- console.log(chalk3.gray("\nNo transcript."));
1541
+ console.log(chalk2.gray("\nNo transcript."));
1629
1542
  }
1630
1543
  } else if (meeting.transcription) {
1631
- console.log(chalk3.gray("\n(transcript available \u2014 pass --transcript to print it)"));
1544
+ console.log(chalk2.gray("\n(transcript available \u2014 pass --transcript to print it)"));
1632
1545
  }
1633
1546
  console.log();
1634
1547
  }
@@ -1643,32 +1556,32 @@ function outputMeetingsJson(meetings) {
1643
1556
  }
1644
1557
  function outputMeetingsPretty(meetings) {
1645
1558
  if (meetings.length === 0) {
1646
- console.log(chalk3.gray("No meetings found."));
1559
+ console.log(chalk2.gray("No meetings found."));
1647
1560
  return;
1648
1561
  }
1649
- console.log(chalk3.bold(`
1562
+ console.log(chalk2.bold(`
1650
1563
  Meetings (${meetings.length} total)`));
1651
- console.log(chalk3.gray("\u2500".repeat(50)));
1564
+ console.log(chalk2.gray("\u2500".repeat(50)));
1652
1565
  for (const m of meetings) {
1653
1566
  const flags = [
1654
1567
  m.notes ? "notes" : null,
1655
1568
  m.summary ? "summary" : null,
1656
1569
  m.transcription ? "transcript" : null
1657
1570
  ].filter(Boolean);
1658
- const archived = m.archivedAt ? chalk3.yellow(" [archived]") : "";
1571
+ const archived = m.archivedAt ? chalk2.yellow(" [archived]") : "";
1659
1572
  console.log(
1660
- ` ${chalk3.bold(m.title ?? "Untitled meeting")}${archived} ${chalk3.gray(
1573
+ ` ${chalk2.bold(m.title ?? "Untitled meeting")}${archived} ${chalk2.gray(
1661
1574
  meetingWhen(m).toLocaleDateString()
1662
1575
  )}`
1663
1576
  );
1664
- console.log(chalk3.gray(` ID: ${m.id}`));
1577
+ console.log(chalk2.gray(` ID: ${m.id}`));
1665
1578
  const context = [
1666
1579
  m.project ? `Project: ${m.project.name}` : null,
1667
1580
  m.participantCount ? `${m.participantCount} participants` : null,
1668
1581
  flags.length > 0 ? flags.join(", ") : null
1669
1582
  ].filter(Boolean);
1670
1583
  if (context.length > 0) {
1671
- console.log(chalk3.gray(` ${context.join(" \xB7 ")}`));
1584
+ console.log(chalk2.gray(` ${context.join(" \xB7 ")}`));
1672
1585
  }
1673
1586
  }
1674
1587
  console.log();
@@ -1760,66 +1673,66 @@ function outputDecisionJson(decision, extra = {}) {
1760
1673
  }
1761
1674
  function outputDecisionPretty(decision) {
1762
1675
  const color = getDecisionStatusColor(decision.status);
1763
- const kind = decision.status === "OPEN" ? chalk3.yellow(" [open question]") : "";
1764
- console.log(chalk3.gray("\u2500".repeat(50)));
1676
+ const kind = decision.status === "OPEN" ? chalk2.yellow(" [open question]") : "";
1677
+ console.log(chalk2.gray("\u2500".repeat(50)));
1765
1678
  console.log(
1766
1679
  `
1767
- ${chalk3.gray(decision.label)} ${chalk3.bold(decision.statement)}${kind}`
1680
+ ${chalk2.gray(decision.label)} ${chalk2.bold(decision.statement)}${kind}`
1768
1681
  );
1769
- console.log(chalk3.gray(` ID: ${decision.id}`));
1770
- console.log(` ${chalk3.gray("Status:")} ${chalk3[color](decision.status)}`);
1771
- console.log(` ${chalk3.gray("Source:")} ${decision.source}`);
1682
+ console.log(chalk2.gray(` ID: ${decision.id}`));
1683
+ console.log(` ${chalk2.gray("Status:")} ${chalk2[color](decision.status)}`);
1684
+ console.log(` ${chalk2.gray("Source:")} ${decision.source}`);
1772
1685
  if (decision.reviewState && decision.reviewState !== "CONFIRMED") {
1773
- console.log(` ${chalk3.yellow(decision.reviewState)}`);
1686
+ console.log(` ${chalk2.yellow(decision.reviewState)}`);
1774
1687
  }
1775
1688
  if (decision.decidedAt) {
1776
1689
  console.log(
1777
- ` ${chalk3.gray("Decided:")} ${new Date(decision.decidedAt).toLocaleString()}`
1690
+ ` ${chalk2.gray("Decided:")} ${new Date(decision.decidedAt).toLocaleString()}`
1778
1691
  );
1779
1692
  }
1780
1693
  if (decision.transcriptionSession) {
1781
1694
  console.log(
1782
- ` ${chalk3.gray("Meeting:")} ${decision.transcriptionSession.title ?? "Untitled"} (${decision.transcriptionSession.id})`
1695
+ ` ${chalk2.gray("Meeting:")} ${decision.transcriptionSession.title ?? "Untitled"} (${decision.transcriptionSession.id})`
1783
1696
  );
1784
1697
  }
1785
1698
  if (decision.product) {
1786
- console.log(` ${chalk3.gray("Product:")} ${decision.product.name}`);
1699
+ console.log(` ${chalk2.gray("Product:")} ${decision.product.name}`);
1787
1700
  }
1788
1701
  if (decision.project) {
1789
- console.log(` ${chalk3.gray("Project:")} ${decision.project.name}`);
1702
+ console.log(` ${chalk2.gray("Project:")} ${decision.project.name}`);
1790
1703
  }
1791
1704
  if (decision.owner) {
1792
- console.log(` ${chalk3.gray("Owner:")} ${decision.owner.name ?? decision.owner.id}`);
1705
+ console.log(` ${chalk2.gray("Owner:")} ${decision.owner.name ?? decision.owner.id}`);
1793
1706
  }
1794
1707
  if (decision.deciders && decision.deciders.length > 0) {
1795
1708
  const people = decision.deciders.map((d) => d.email ? `${d.name} <${d.email}>` : d.name).join(", ");
1796
- console.log(` ${chalk3.gray("Deciders:")} ${people}`);
1709
+ console.log(` ${chalk2.gray("Deciders:")} ${people}`);
1797
1710
  }
1798
1711
  if (decision.supersededBy) {
1799
1712
  console.log(
1800
- ` ${chalk3.gray("Superseded by:")} D-${decision.supersededBy.number} ${decision.supersededBy.statement}`
1713
+ ` ${chalk2.gray("Superseded by:")} D-${decision.supersededBy.number} ${decision.supersededBy.statement}`
1801
1714
  );
1802
1715
  }
1803
1716
  if (decision.supersedes && decision.supersedes.length > 0) {
1804
1717
  for (const prior of decision.supersedes) {
1805
1718
  console.log(
1806
- ` ${chalk3.gray("Supersedes:")} D-${prior.number} ${prior.statement}`
1719
+ ` ${chalk2.gray("Supersedes:")} D-${prior.number} ${prior.statement}`
1807
1720
  );
1808
1721
  }
1809
1722
  }
1810
1723
  if (decision.links && decision.links.length > 0) {
1811
- console.log(` ${chalk3.gray("Implemented by:")}`);
1724
+ console.log(` ${chalk2.gray("Implemented by:")}`);
1812
1725
  for (const link of decision.links) {
1813
1726
  const target = link.ticket ? `${link.ticket.shortId ?? `#${link.ticket.number}`} ${link.ticket.title}` : link.feature ? `feature: ${link.feature.name}` : "(unknown)";
1814
- console.log(chalk3.gray(` ${target} [link ${link.id}]`));
1727
+ console.log(chalk2.gray(` ${target} [link ${link.id}]`));
1815
1728
  }
1816
1729
  }
1817
1730
  if (decision.evidence && decision.evidence.length > 0) {
1818
1731
  console.log(`
1819
- ${chalk3.bold("Evidence")}`);
1732
+ ${chalk2.bold("Evidence")}`);
1820
1733
  for (const turn of decision.evidence) {
1821
1734
  const who = turn.speaker ? `${turn.speaker}: ` : "";
1822
- console.log(chalk3.gray(` [${turn.turnIndex}] ${who}${turn.text}`));
1735
+ console.log(chalk2.gray(` [${turn.turnIndex}] ${who}${turn.text}`));
1823
1736
  }
1824
1737
  }
1825
1738
  if (decision.body) {
@@ -1843,24 +1756,24 @@ function outputDecisionsJson(decisions, extra = {}) {
1843
1756
  }
1844
1757
  function outputDecisionsPretty(decisions) {
1845
1758
  if (decisions.length === 0) {
1846
- console.log(chalk3.gray("No decisions found."));
1759
+ console.log(chalk2.gray("No decisions found."));
1847
1760
  return;
1848
1761
  }
1849
1762
  const openCount = decisions.filter((d) => d.status === "OPEN").length;
1850
1763
  console.log(
1851
- chalk3.bold(
1764
+ chalk2.bold(
1852
1765
  `
1853
1766
  Decisions (${decisions.length} total, ${openCount} open question${openCount === 1 ? "" : "s"})`
1854
1767
  )
1855
1768
  );
1856
- console.log(chalk3.gray("\u2500".repeat(50)));
1769
+ console.log(chalk2.gray("\u2500".repeat(50)));
1857
1770
  for (const d of decisions) {
1858
1771
  const color = getDecisionStatusColor(d.status);
1859
- const draft = d.reviewState && d.reviewState !== "CONFIRMED" ? chalk3.yellow(` [${d.reviewState.toLowerCase()}]`) : "";
1772
+ const draft = d.reviewState && d.reviewState !== "CONFIRMED" ? chalk2.yellow(` [${d.reviewState.toLowerCase()}]`) : "";
1860
1773
  console.log(
1861
- ` ${chalk3.gray(d.label)} ${chalk3.bold(d.statement)}${draft} ${chalk3[color](`[${d.status}]`)}`
1774
+ ` ${chalk2.gray(d.label)} ${chalk2.bold(d.statement)}${draft} ${chalk2[color](`[${d.status}]`)}`
1862
1775
  );
1863
- console.log(chalk3.gray(` ID: ${d.id}`));
1776
+ console.log(chalk2.gray(` ID: ${d.id}`));
1864
1777
  const context = [
1865
1778
  d.product ? `Product: ${d.product.name}` : null,
1866
1779
  d.transcriptionSession ? `Meeting: ${d.transcriptionSession.title ?? d.transcriptionSession.id}` : null,
@@ -1869,7 +1782,7 @@ Decisions (${decisions.length} total, ${openCount} open question${openCount ===
1869
1782
  d._count?.links ? `${d._count.links} linked` : null
1870
1783
  ].filter(Boolean);
1871
1784
  if (context.length > 0) {
1872
- console.log(chalk3.gray(` ${context.join(" \xB7 ")}`));
1785
+ console.log(chalk2.gray(` ${context.join(" \xB7 ")}`));
1873
1786
  }
1874
1787
  }
1875
1788
  console.log();
@@ -1899,37 +1812,37 @@ function outputDecisionBatchPretty(results) {
1899
1812
  const statement = r.statement ?? r.decision?.statement ?? "";
1900
1813
  if (r.success) {
1901
1814
  console.log(
1902
- ` ${chalk3.green("\u2713")} #${r.index}: ${chalk3.gray(r.decision?.label ?? "")} ${statement}`
1815
+ ` ${chalk2.green("\u2713")} #${r.index}: ${chalk2.gray(r.decision?.label ?? "")} ${statement}`
1903
1816
  );
1904
1817
  } else {
1905
- console.log(` ${chalk3.red("\u2717")} #${r.index}: ${statement} \u2014 ${r.error ?? "failed"}`);
1818
+ console.log(` ${chalk2.red("\u2717")} #${r.index}: ${statement} \u2014 ${r.error ?? "failed"}`);
1906
1819
  }
1907
1820
  }
1908
1821
  const ok = results.filter((r) => r.success).length;
1909
- console.log(chalk3.bold(`
1822
+ console.log(chalk2.bold(`
1910
1823
  ${ok}/${results.length} decisions logged`));
1911
1824
  }
1912
1825
  function outputRequirementJson(requirement) {
1913
1826
  console.log(JSON.stringify(requirement, null, 2));
1914
1827
  }
1915
1828
  function outputRequirementPretty(requirement) {
1916
- const met = requirement.checkedAt ? chalk3.green("[met]") : chalk3.gray("[unmet]");
1917
- const kind = requirement.kind ? chalk3.gray(` (${requirement.kind})`) : "";
1829
+ const met = requirement.checkedAt ? chalk2.green("[met]") : chalk2.gray("[unmet]");
1830
+ const kind = requirement.kind ? chalk2.gray(` (${requirement.kind})`) : "";
1918
1831
  console.log(` ${met} ${requirement.statement}${kind}`);
1919
- console.log(chalk3.gray(` ID: ${requirement.id}`));
1832
+ console.log(chalk2.gray(` ID: ${requirement.id}`));
1920
1833
  }
1921
1834
  function outputRequirementsJson(requirements) {
1922
1835
  console.log(JSON.stringify({ requirements, total: requirements.length }, null, 2));
1923
1836
  }
1924
1837
  function outputRequirementsPretty(requirements) {
1925
1838
  if (requirements.length === 0) {
1926
- console.log(chalk3.gray("No requirements found."));
1839
+ console.log(chalk2.gray("No requirements found."));
1927
1840
  return;
1928
1841
  }
1929
1842
  const metCount = requirements.filter((r) => r.checkedAt).length;
1930
- console.log(chalk3.bold(`
1843
+ console.log(chalk2.bold(`
1931
1844
  Requirements (${metCount}/${requirements.length} met)`));
1932
- console.log(chalk3.gray("\u2500".repeat(50)));
1845
+ console.log(chalk2.gray("\u2500".repeat(50)));
1933
1846
  for (const r of requirements) {
1934
1847
  outputRequirementPretty(r);
1935
1848
  }
@@ -1946,13 +1859,13 @@ function outputRequirementBatchJson(results) {
1946
1859
  function outputRequirementBatchPretty(results) {
1947
1860
  for (const r of results) {
1948
1861
  if (r.success) {
1949
- console.log(` ${chalk3.green("\u2713")} #${r.index}: ${r.requirement?.statement ?? ""}`);
1862
+ console.log(` ${chalk2.green("\u2713")} #${r.index}: ${r.requirement?.statement ?? ""}`);
1950
1863
  } else {
1951
- console.log(` ${chalk3.red("\u2717")} #${r.index}: ${r.error ?? "failed"}`);
1864
+ console.log(` ${chalk2.red("\u2717")} #${r.index}: ${r.error ?? "failed"}`);
1952
1865
  }
1953
1866
  }
1954
1867
  const ok = results.filter((r) => r.success).length;
1955
- console.log(chalk3.bold(`
1868
+ console.log(chalk2.bold(`
1956
1869
  ${ok}/${results.length} requirements added`));
1957
1870
  }
1958
1871
  function getScopeStatusColor(status) {
@@ -1973,9 +1886,9 @@ function outputScopeJson(scope) {
1973
1886
  console.log(JSON.stringify(scope, null, 2));
1974
1887
  }
1975
1888
  function outputScopePretty(scope) {
1976
- const badge = chalk3[getScopeStatusColor(scope.status)](`[${scope.status}]`);
1977
- console.log(` ${badge} ${chalk3.bold(scope.version)}`);
1978
- console.log(chalk3.gray(` ID: ${scope.id}`));
1889
+ const badge = chalk2[getScopeStatusColor(scope.status)](`[${scope.status}]`);
1890
+ console.log(` ${badge} ${chalk2.bold(scope.version)}`);
1891
+ console.log(chalk2.gray(` ID: ${scope.id}`));
1979
1892
  if (scope.description) {
1980
1893
  console.log(` ${scope.description.substring(0, 120)}${scope.description.length > 120 ? "..." : ""}`);
1981
1894
  }
@@ -1985,12 +1898,12 @@ function outputScopesJson(scopes) {
1985
1898
  }
1986
1899
  function outputScopesPretty(scopes) {
1987
1900
  if (scopes.length === 0) {
1988
- console.log(chalk3.gray("No scopes found."));
1901
+ console.log(chalk2.gray("No scopes found."));
1989
1902
  return;
1990
1903
  }
1991
- console.log(chalk3.bold(`
1904
+ console.log(chalk2.bold(`
1992
1905
  Scopes (${scopes.length} total)`));
1993
- console.log(chalk3.gray("\u2500".repeat(50)));
1906
+ console.log(chalk2.gray("\u2500".repeat(50)));
1994
1907
  for (const s of scopes) {
1995
1908
  outputScopePretty(s);
1996
1909
  }
@@ -2068,24 +1981,24 @@ function outputGoalJson(goal) {
2068
1981
  console.log(JSON.stringify(transformGoal(goal), null, 2));
2069
1982
  }
2070
1983
  function outputGoalPretty(goal) {
2071
- console.log(chalk3.gray("\u2500".repeat(50)));
2072
- const badge = chalk3[getGoalStatusColor(goal.status)](`[${goal.status}]`);
1984
+ console.log(chalk2.gray("\u2500".repeat(50)));
1985
+ const badge = chalk2[getGoalStatusColor(goal.status)](`[${goal.status}]`);
2073
1986
  console.log(`
2074
- ${badge} ${chalk3.bold(goal.title)} ${chalk3.gray(`#${goal.id}`)}`);
2075
- if (goal.period) console.log(` ${chalk3.gray("Period:")} ${goal.period}`);
1987
+ ${badge} ${chalk2.bold(goal.title)} ${chalk2.gray(`#${goal.id}`)}`);
1988
+ if (goal.period) console.log(` ${chalk2.gray("Period:")} ${goal.period}`);
2076
1989
  const health = goal.healthOverride ?? goal.health;
2077
- if (health) console.log(` ${chalk3.gray("Health:")} ${health}`);
1990
+ if (health) console.log(` ${chalk2.gray("Health:")} ${health}`);
2078
1991
  if (goal.description) {
2079
- console.log(` ${chalk3.gray("Description:")} ${goal.description.substring(0, 200)}${goal.description.length > 200 ? "..." : ""}`);
1992
+ console.log(` ${chalk2.gray("Description:")} ${goal.description.substring(0, 200)}${goal.description.length > 200 ? "..." : ""}`);
2080
1993
  }
2081
1994
  if (goal.parentGoal) {
2082
- console.log(` ${chalk3.gray("Parent:")} ${goal.parentGoal.title} ${chalk3.gray(`#${goal.parentGoal.id}`)}`);
1995
+ console.log(` ${chalk2.gray("Parent:")} ${goal.parentGoal.title} ${chalk2.gray(`#${goal.parentGoal.id}`)}`);
2083
1996
  }
2084
1997
  if (goal.projects?.length) {
2085
- console.log(` ${chalk3.cyan("Projects:")} ${goal.projects.map((p) => p.name).join(", ")}`);
1998
+ console.log(` ${chalk2.cyan("Projects:")} ${goal.projects.map((p) => p.name).join(", ")}`);
2086
1999
  }
2087
2000
  if (goal.childGoals?.length) {
2088
- console.log(` ${chalk3.cyan("Sub-goals:")} ${goal.childGoals.length}`);
2001
+ console.log(` ${chalk2.cyan("Sub-goals:")} ${goal.childGoals.length}`);
2089
2002
  }
2090
2003
  console.log();
2091
2004
  }
@@ -2097,18 +2010,18 @@ function outputGoalsJson(goals) {
2097
2010
  }
2098
2011
  function outputGoalsPretty(goals) {
2099
2012
  if (goals.length === 0) {
2100
- console.log(chalk3.gray("No goals found."));
2013
+ console.log(chalk2.gray("No goals found."));
2101
2014
  return;
2102
2015
  }
2103
- console.log(chalk3.bold(`
2016
+ console.log(chalk2.bold(`
2104
2017
  Goals (${goals.length} total)`));
2105
- console.log(chalk3.gray("\u2500".repeat(50)));
2018
+ console.log(chalk2.gray("\u2500".repeat(50)));
2106
2019
  for (const g of goals) {
2107
- const badge = chalk3[getGoalStatusColor(g.status)](`[${g.status}]`);
2108
- const period = g.period ? chalk3.gray(` ${g.period}`) : "";
2109
- const krs = g._count?.keyResults ? chalk3.gray(` \u2014 ${g._count.keyResults} KRs`) : "";
2110
- console.log(` ${badge}${period} ${chalk3.bold(g.title)}${krs}`);
2111
- console.log(chalk3.gray(` ID: ${g.id}`));
2020
+ const badge = chalk2[getGoalStatusColor(g.status)](`[${g.status}]`);
2021
+ const period = g.period ? chalk2.gray(` ${g.period}`) : "";
2022
+ const krs = g._count?.keyResults ? chalk2.gray(` \u2014 ${g._count.keyResults} KRs`) : "";
2023
+ console.log(` ${badge}${period} ${chalk2.bold(g.title)}${krs}`);
2024
+ console.log(chalk2.gray(` ID: ${g.id}`));
2112
2025
  }
2113
2026
  console.log();
2114
2027
  }
@@ -2132,17 +2045,17 @@ function outputGoalTreeJson(nodes) {
2132
2045
  }
2133
2046
  function outputGoalTreePretty(nodes) {
2134
2047
  if (nodes.length === 0) {
2135
- console.log(chalk3.gray("No goals found."));
2048
+ console.log(chalk2.gray("No goals found."));
2136
2049
  return;
2137
2050
  }
2138
- console.log(chalk3.bold("\nGoal tree"));
2139
- console.log(chalk3.gray("\u2500".repeat(50)));
2051
+ console.log(chalk2.bold("\nGoal tree"));
2052
+ console.log(chalk2.gray("\u2500".repeat(50)));
2140
2053
  const walk = (node, depth) => {
2141
2054
  const pad = " ".repeat(depth + 1);
2142
- const badge = chalk3[getGoalStatusColor(node.status)](`[${node.status}]`);
2143
- const period = node.period ? chalk3.gray(` ${node.period}`) : "";
2144
- const krs = node.keyResults?.length ? chalk3.gray(` \u2014 ${node.keyResults.length} KRs`) : "";
2145
- console.log(`${pad}${depth > 0 ? "\u2514 " : ""}${badge}${period} ${chalk3.bold(node.title)} ${chalk3.gray(`#${node.id}`)}${krs}`);
2055
+ const badge = chalk2[getGoalStatusColor(node.status)](`[${node.status}]`);
2056
+ const period = node.period ? chalk2.gray(` ${node.period}`) : "";
2057
+ const krs = node.keyResults?.length ? chalk2.gray(` \u2014 ${node.keyResults.length} KRs`) : "";
2058
+ console.log(`${pad}${depth > 0 ? "\u2514 " : ""}${badge}${period} ${chalk2.bold(node.title)} ${chalk2.gray(`#${node.id}`)}${krs}`);
2146
2059
  for (const child of node.childGoals ?? []) {
2147
2060
  walk(child, depth + 1);
2148
2061
  }
@@ -2154,11 +2067,11 @@ function outputGoalPeriodsJson(periods) {
2154
2067
  console.log(JSON.stringify({ periods, total: periods.length }, null, 2));
2155
2068
  }
2156
2069
  function outputGoalPeriodsPretty(periods) {
2157
- console.log(chalk3.bold(`
2070
+ console.log(chalk2.bold(`
2158
2071
  Periods (${periods.length} total)`));
2159
- console.log(chalk3.gray("\u2500".repeat(50)));
2072
+ console.log(chalk2.gray("\u2500".repeat(50)));
2160
2073
  for (const p of periods) {
2161
- console.log(` ${chalk3.bold(p.value)} ${chalk3.gray(p.label)}`);
2074
+ console.log(` ${chalk2.bold(p.value)} ${chalk2.gray(p.label)}`);
2162
2075
  }
2163
2076
  console.log();
2164
2077
  }
@@ -2169,19 +2082,19 @@ function outputGoalStatsJson(stats) {
2169
2082
  }, null, 2));
2170
2083
  }
2171
2084
  function outputGoalStatsPretty(stats) {
2172
- console.log(chalk3.bold("\nOKR stats"));
2173
- console.log(chalk3.gray("\u2500".repeat(50)));
2174
- console.log(` ${chalk3.gray("Objectives:")} ${stats.totalObjectives}`);
2175
- console.log(` ${chalk3.gray("Key results:")} ${stats.totalKeyResults} (${stats.completedKeyResults} achieved)`);
2085
+ console.log(chalk2.bold("\nOKR stats"));
2086
+ console.log(chalk2.gray("\u2500".repeat(50)));
2087
+ console.log(` ${chalk2.gray("Objectives:")} ${stats.totalObjectives}`);
2088
+ console.log(` ${chalk2.gray("Key results:")} ${stats.totalKeyResults} (${stats.completedKeyResults} achieved)`);
2176
2089
  console.log(
2177
- ` ${chalk3.gray("Breakdown:")} ${chalk3.green(`${stats.statusBreakdown.onTrack} on-track`)}, ${chalk3.yellow(`${stats.statusBreakdown.atRisk} at-risk`)}, ${chalk3.red(`${stats.statusBreakdown.offTrack} off-track`)}, ${chalk3.green(`${stats.statusBreakdown.achieved} achieved`)}`
2090
+ ` ${chalk2.gray("Breakdown:")} ${chalk2.green(`${stats.statusBreakdown.onTrack} on-track`)}, ${chalk2.yellow(`${stats.statusBreakdown.atRisk} at-risk`)}, ${chalk2.red(`${stats.statusBreakdown.offTrack} off-track`)}, ${chalk2.green(`${stats.statusBreakdown.achieved} achieved`)}`
2178
2091
  );
2179
- console.log(` ${chalk3.gray("Avg progress:")} ${stats.averageProgress}%`);
2092
+ console.log(` ${chalk2.gray("Avg progress:")} ${stats.averageProgress}%`);
2180
2093
  if (stats.averageConfidence != null) {
2181
- console.log(` ${chalk3.gray("Avg confidence:")} ${stats.averageConfidence}%`);
2094
+ console.log(` ${chalk2.gray("Avg confidence:")} ${stats.averageConfidence}%`);
2182
2095
  }
2183
2096
  if (stats.periodEndDate) {
2184
- console.log(` ${chalk3.gray("Period ends:")} ${new Date(stats.periodEndDate).toISOString().slice(0, 10)}`);
2097
+ console.log(` ${chalk2.gray("Period ends:")} ${new Date(stats.periodEndDate).toISOString().slice(0, 10)}`);
2185
2098
  }
2186
2099
  console.log();
2187
2100
  }
@@ -2224,19 +2137,19 @@ function outputKeyResultJson(kr) {
2224
2137
  }
2225
2138
  function outputKeyResultPretty(kr) {
2226
2139
  const status = kr.statusOverride ?? kr.status;
2227
- const badge = chalk3[getKeyResultStatusColor(status)](`[${status}]`);
2228
- console.log(` ${badge} ${chalk3.bold(kr.title)}`);
2140
+ const badge = chalk2[getKeyResultStatusColor(status)](`[${status}]`);
2141
+ console.log(` ${badge} ${chalk2.bold(kr.title)}`);
2229
2142
  console.log(
2230
- chalk3.gray(
2143
+ chalk2.gray(
2231
2144
  ` ${kr.currentValue}/${kr.targetValue} ${kr.unit} (${keyResultProgress(kr)}%)${kr.period ? ` \xB7 ${kr.period}` : ""} \xB7 objective #${kr.goalId}`
2232
2145
  )
2233
2146
  );
2234
- console.log(chalk3.gray(` ID: ${kr.id}`));
2147
+ console.log(chalk2.gray(` ID: ${kr.id}`));
2235
2148
  if (kr.projects?.length) {
2236
- console.log(chalk3.gray(` Projects: ${kr.projects.map((l) => l.project?.name ?? l.projectId).join(", ")}`));
2149
+ console.log(chalk2.gray(` Projects: ${kr.projects.map((l) => l.project?.name ?? l.projectId).join(", ")}`));
2237
2150
  }
2238
2151
  if (kr.features?.length) {
2239
- console.log(chalk3.gray(` Features: ${kr.features.map((l) => l.feature?.name ?? l.featureId).join(", ")}`));
2152
+ console.log(chalk2.gray(` Features: ${kr.features.map((l) => l.feature?.name ?? l.featureId).join(", ")}`));
2240
2153
  }
2241
2154
  }
2242
2155
  function outputKeyResultsJson(keyResults) {
@@ -2247,12 +2160,12 @@ function outputKeyResultsJson(keyResults) {
2247
2160
  }
2248
2161
  function outputKeyResultsPretty(keyResults) {
2249
2162
  if (keyResults.length === 0) {
2250
- console.log(chalk3.gray("No key results found."));
2163
+ console.log(chalk2.gray("No key results found."));
2251
2164
  return;
2252
2165
  }
2253
- console.log(chalk3.bold(`
2166
+ console.log(chalk2.bold(`
2254
2167
  Key results (${keyResults.length} total)`));
2255
- console.log(chalk3.gray("\u2500".repeat(50)));
2168
+ console.log(chalk2.gray("\u2500".repeat(50)));
2256
2169
  for (const kr of keyResults) {
2257
2170
  outputKeyResultPretty(kr);
2258
2171
  }
@@ -2269,9 +2182,9 @@ function outputCheckInJson(checkIn) {
2269
2182
  }, null, 2));
2270
2183
  }
2271
2184
  function outputCheckInPretty(checkIn) {
2272
- console.log(` ${chalk3.gray("Value:")} ${checkIn.previousValue} \u2192 ${chalk3.bold(String(checkIn.newValue))}`);
2273
- if (checkIn.notes) console.log(` ${chalk3.gray("Note:")} ${checkIn.notes}`);
2274
- console.log(chalk3.gray(` Check-in ID: ${checkIn.id}`));
2185
+ console.log(` ${chalk2.gray("Value:")} ${checkIn.previousValue} \u2192 ${chalk2.bold(String(checkIn.newValue))}`);
2186
+ if (checkIn.notes) console.log(` ${chalk2.gray("Note:")} ${checkIn.notes}`);
2187
+ console.log(chalk2.gray(` Check-in ID: ${checkIn.id}`));
2275
2188
  console.log();
2276
2189
  }
2277
2190
  function transformObjective(objective) {
@@ -2304,31 +2217,31 @@ function outputObjectivesJson(objectives) {
2304
2217
  }
2305
2218
  function outputObjectivesPretty(objectives) {
2306
2219
  if (objectives.length === 0) {
2307
- console.log(chalk3.gray("No OKRs found."));
2220
+ console.log(chalk2.gray("No OKRs found."));
2308
2221
  return;
2309
2222
  }
2310
2223
  const totalKeyResults = objectives.reduce((n, o) => n + o.keyResults.length, 0);
2311
2224
  console.log(
2312
- chalk3.bold(`
2225
+ chalk2.bold(`
2313
2226
  OKRs (${objectives.length} objectives, ${totalKeyResults} key results)`)
2314
2227
  );
2315
- console.log(chalk3.gray("\u2500".repeat(50)));
2228
+ console.log(chalk2.gray("\u2500".repeat(50)));
2316
2229
  for (const o of objectives) {
2317
- const badge = chalk3[getGoalStatusColor(o.status)](`[${o.status}]`);
2318
- const period = o.period ? chalk3.gray(` ${o.period}`) : "";
2230
+ const badge = chalk2[getGoalStatusColor(o.status)](`[${o.status}]`);
2231
+ const period = o.period ? chalk2.gray(` ${o.period}`) : "";
2319
2232
  console.log(
2320
2233
  `
2321
- ${badge}${period} ${chalk3.bold(o.title)} ${chalk3.gray(`#${o.id}`)} ${chalk3.gray(`${o.progress}%`)}`
2234
+ ${badge}${period} ${chalk2.bold(o.title)} ${chalk2.gray(`#${o.id}`)} ${chalk2.gray(`${o.progress}%`)}`
2322
2235
  );
2323
2236
  if (o.keyResults.length === 0) {
2324
- console.log(chalk3.gray(" (no key results)"));
2237
+ console.log(chalk2.gray(" (no key results)"));
2325
2238
  continue;
2326
2239
  }
2327
2240
  for (const kr of o.keyResults) {
2328
2241
  const krStatus = kr.statusOverride ?? kr.status;
2329
- const krBadge = chalk3[getKeyResultStatusColor(krStatus)](`[${krStatus}]`);
2330
- console.log(` ${krBadge} ${kr.title} ${chalk3.gray(`${kr.currentValue}/${kr.targetValue} ${kr.unit}`)}`);
2331
- console.log(chalk3.gray(` ID: ${kr.id}`));
2242
+ const krBadge = chalk2[getKeyResultStatusColor(krStatus)](`[${krStatus}]`);
2243
+ console.log(` ${krBadge} ${kr.title} ${chalk2.gray(`${kr.currentValue}/${kr.targetValue} ${kr.unit}`)}`);
2244
+ console.log(chalk2.gray(` ID: ${kr.id}`));
2332
2245
  }
2333
2246
  }
2334
2247
  console.log();
@@ -2357,36 +2270,36 @@ function outputProjectJson(project) {
2357
2270
  }, null, 2));
2358
2271
  }
2359
2272
  function outputProjectPretty(project) {
2360
- console.log(chalk3.gray("\u2500".repeat(50)));
2273
+ console.log(chalk2.gray("\u2500".repeat(50)));
2361
2274
  console.log(`
2362
- ${chalk3.bold(project.name)}`);
2363
- console.log(chalk3.gray(` ID: ${project.id}`));
2364
- if (project.status) console.log(` ${chalk3.cyan("Status:")} ${project.status}`);
2365
- if (project.priority) console.log(` ${chalk3.magenta("Priority:")} ${project.priority}`);
2275
+ ${chalk2.bold(project.name)}`);
2276
+ console.log(chalk2.gray(` ID: ${project.id}`));
2277
+ if (project.status) console.log(` ${chalk2.cyan("Status:")} ${project.status}`);
2278
+ if (project.priority) console.log(` ${chalk2.magenta("Priority:")} ${project.priority}`);
2366
2279
  if (project.workspace) {
2367
- console.log(` ${chalk3.yellow("Workspace:")} ${project.workspace.name} (${project.workspace.slug})`);
2280
+ console.log(` ${chalk2.yellow("Workspace:")} ${project.workspace.name} (${project.workspace.slug})`);
2368
2281
  }
2369
2282
  if (project.description) {
2370
- console.log(` ${chalk3.gray("Description:")} ${project.description.substring(0, 200)}${project.description.length > 200 ? "..." : ""}`);
2283
+ console.log(` ${chalk2.gray("Description:")} ${project.description.substring(0, 200)}${project.description.length > 200 ? "..." : ""}`);
2371
2284
  }
2372
2285
  if (project.dri) {
2373
- console.log(` ${chalk3.magenta("DRI:")} ${project.dri.name ?? project.dri.email ?? project.dri.id}`);
2286
+ console.log(` ${chalk2.magenta("DRI:")} ${project.dri.name ?? project.dri.email ?? project.dri.id}`);
2374
2287
  }
2375
2288
  if (project.goals?.length) {
2376
- console.log(` ${chalk3.cyan("Objectives:")}`);
2289
+ console.log(` ${chalk2.cyan("Objectives:")}`);
2377
2290
  for (const g of project.goals) {
2378
2291
  console.log(` - #${g.id} ${g.title}`);
2379
2292
  }
2380
2293
  }
2381
2294
  if (project.keyResults?.length) {
2382
- console.log(` ${chalk3.cyan("Key results:")}`);
2295
+ console.log(` ${chalk2.cyan("Key results:")}`);
2383
2296
  for (const k of project.keyResults) {
2384
- const objective = k.keyResult?.goal ? chalk3.gray(` (objective #${k.keyResult.goal.id})`) : "";
2385
- console.log(` - ${k.keyResult?.title ?? k.keyResultId} ${chalk3.gray(`[${k.keyResultId}]`)}${objective}`);
2297
+ const objective = k.keyResult?.goal ? chalk2.gray(` (objective #${k.keyResult.goal.id})`) : "";
2298
+ console.log(` - ${k.keyResult?.title ?? k.keyResultId} ${chalk2.gray(`[${k.keyResultId}]`)}${objective}`);
2386
2299
  }
2387
2300
  }
2388
2301
  if (project.actions?.length) {
2389
- console.log(` ${chalk3.cyan("Actions:")} ${project.actions.length}`);
2302
+ console.log(` ${chalk2.cyan("Actions:")} ${project.actions.length}`);
2390
2303
  }
2391
2304
  console.log();
2392
2305
  }
@@ -2426,7 +2339,7 @@ function transformTimeEntry(entry) {
2426
2339
  };
2427
2340
  }
2428
2341
  function statusBadge(status) {
2429
- return status === "PROPOSED" ? chalk3.yellow("[PROPOSED]") : chalk3.green("[CONFIRMED]");
2342
+ return status === "PROPOSED" ? chalk2.yellow("[PROPOSED]") : chalk2.green("[CONFIRMED]");
2430
2343
  }
2431
2344
  function outputTimeLogJson(result) {
2432
2345
  console.log(
@@ -2445,34 +2358,34 @@ function outputTimeLogJson(result) {
2445
2358
  function outputTimeLogPretty(result) {
2446
2359
  if (result.outcome === "merged") {
2447
2360
  console.log(
2448
- `${chalk3.green("\u2713")} Merged into your manual time (${(result.mergedInto ?? []).length} entr${(result.mergedInto ?? []).length === 1 ? "y" : "ies"} annotated); nothing new written.`
2361
+ `${chalk2.green("\u2713")} Merged into your manual time (${(result.mergedInto ?? []).length} entr${(result.mergedInto ?? []).length === 1 ? "y" : "ies"} annotated); nothing new written.`
2449
2362
  );
2450
2363
  return;
2451
2364
  }
2452
2365
  if (result.outcome === "dropped" || !result.entry) {
2453
- console.log(`${chalk3.yellow("\u2013")} Dropped: your manual time already covers every minute of it.`);
2366
+ console.log(`${chalk2.yellow("\u2013")} Dropped: your manual time already covers every minute of it.`);
2454
2367
  return;
2455
2368
  }
2456
2369
  const pieces = result.pieces && result.pieces.length > 0 ? result.pieces : [result.entry];
2457
2370
  const verb = { created: "Logged", updated: "Updated", left: "Left untouched (already confirmed)" }[result.outcome] ?? result.outcome;
2458
2371
  for (const e of pieces) {
2459
2372
  console.log(
2460
- `${chalk3.green("\u2713")} ${verb}: ${clock(e.startedAt)}\u2013${e.endedAt ? clock(e.endedAt) : "now"} ${chalk3.bold(formatMinutes(entryMinutes(e)))} ${statusBadge(e.status)} ${e.action?.name ?? e.actionId}`
2373
+ `${chalk2.green("\u2713")} ${verb}: ${clock(e.startedAt)}\u2013${e.endedAt ? clock(e.endedAt) : "now"} ${chalk2.bold(formatMinutes(entryMinutes(e)))} ${statusBadge(e.status)} ${e.action?.name ?? e.actionId}`
2461
2374
  );
2462
- if (e.note) console.log(chalk3.gray(` ${e.note}`));
2463
- console.log(chalk3.gray(` ID: ${e.id}${e.sourceRef ? ` ref: ${e.sourceRef}` : ""} owner: ${e.userId}`));
2375
+ if (e.note) console.log(chalk2.gray(` ${e.note}`));
2376
+ console.log(chalk2.gray(` ID: ${e.id}${e.sourceRef ? ` ref: ${e.sourceRef}` : ""} owner: ${e.userId}`));
2464
2377
  }
2465
- if (pieces.length > 1) console.log(chalk3.gray(` split into ${pieces.length} pieces around your manual time`));
2378
+ if (pieces.length > 1) console.log(chalk2.gray(` split into ${pieces.length} pieces around your manual time`));
2466
2379
  }
2467
2380
  function outputTimeConfirmJson(result, date) {
2468
2381
  console.log(JSON.stringify({ date, confirmed: result.confirmed }, null, 2));
2469
2382
  }
2470
2383
  function outputTimeConfirmPretty(result, date) {
2471
2384
  if (result.confirmed === 0) {
2472
- console.log(chalk3.gray(`Nothing proposed on ${date}; nothing to confirm.`));
2385
+ console.log(chalk2.gray(`Nothing proposed on ${date}; nothing to confirm.`));
2473
2386
  return;
2474
2387
  }
2475
- console.log(`${chalk3.green("\u2713")} Confirmed ${result.confirmed} ${result.confirmed === 1 ? "entry" : "entries"} on ${date}.`);
2388
+ console.log(`${chalk2.green("\u2713")} Confirmed ${result.confirmed} ${result.confirmed === 1 ? "entry" : "entries"} on ${date}.`);
2476
2389
  }
2477
2390
  function outputTimeEntriesJson(entries, date) {
2478
2391
  const rows = entries.map(transformTimeEntry);
@@ -2492,10 +2405,10 @@ function outputTimeEntriesJson(entries, date) {
2492
2405
  }
2493
2406
  function outputTimeEntriesPretty(entries, date) {
2494
2407
  if (entries.length === 0) {
2495
- console.log(chalk3.gray(`No time entries on ${date}.`));
2408
+ console.log(chalk2.gray(`No time entries on ${date}.`));
2496
2409
  return;
2497
2410
  }
2498
- console.log(chalk3.bold(`
2411
+ console.log(chalk2.bold(`
2499
2412
  Time on ${date}
2500
2413
  `));
2501
2414
  let total = 0;
@@ -2504,14 +2417,14 @@ Time on ${date}
2504
2417
  total += mins;
2505
2418
  const range = `${clock(e.startedAt)}\u2013${e.endedAt ? clock(e.endedAt) : "now"}`;
2506
2419
  console.log(
2507
- ` ${range} ${chalk3.bold(formatMinutes(mins).padStart(6))} ${statusBadge(e.status)} ${e.action?.name ?? e.actionId}${e.note ? chalk3.gray(` \xB7 ${e.note}`) : ""}`
2420
+ ` ${range} ${chalk2.bold(formatMinutes(mins).padStart(6))} ${statusBadge(e.status)} ${e.action?.name ?? e.actionId}${e.note ? chalk2.gray(` \xB7 ${e.note}`) : ""}`
2508
2421
  );
2509
- console.log(chalk3.gray(` ${e.id} ${e.source}${e.sourceRef ? ` ${e.sourceRef}` : ""}`));
2422
+ console.log(chalk2.gray(` ${e.id} ${e.source}${e.sourceRef ? ` ${e.sourceRef}` : ""}`));
2510
2423
  }
2511
2424
  const proposed = entries.filter((e) => e.status === "PROPOSED").length;
2512
2425
  console.log(
2513
- chalk3.bold(`
2514
- ${formatMinutes(total)} across ${entries.length} entries`) + (proposed > 0 ? chalk3.yellow(`, ${proposed} proposed`) : "")
2426
+ chalk2.bold(`
2427
+ ${formatMinutes(total)} across ${entries.length} entries`) + (proposed > 0 ? chalk2.yellow(`, ${proposed} proposed`) : "")
2515
2428
  );
2516
2429
  }
2517
2430
  function outputTimeBatchJson(results) {
@@ -2540,14 +2453,14 @@ function outputTimeBatchPretty(results) {
2540
2453
  const ref = r.sourceRef ?? r.entry?.sourceRef ?? "";
2541
2454
  if (r.success && r.entry) {
2542
2455
  console.log(
2543
- ` ${chalk3.green("\u2713")} #${r.index}: ${chalk3.gray(r.outcome ?? "")} ${clock(r.entry.startedAt)}\u2013${r.entry.endedAt ? clock(r.entry.endedAt) : "now"} ${r.entry.action?.name ?? r.entry.actionId}${ref ? chalk3.gray(` ${ref}`) : ""}`
2456
+ ` ${chalk2.green("\u2713")} #${r.index}: ${chalk2.gray(r.outcome ?? "")} ${clock(r.entry.startedAt)}\u2013${r.entry.endedAt ? clock(r.entry.endedAt) : "now"} ${r.entry.action?.name ?? r.entry.actionId}${ref ? chalk2.gray(` ${ref}`) : ""}`
2544
2457
  );
2545
2458
  } else {
2546
- console.log(` ${chalk3.red("\u2717")} #${r.index}: ${ref} \u2014 ${r.error ?? "failed"}`);
2459
+ console.log(` ${chalk2.red("\u2717")} #${r.index}: ${ref} \u2014 ${r.error ?? "failed"}`);
2547
2460
  }
2548
2461
  }
2549
2462
  const ok = results.filter((r) => r.success).length;
2550
- console.log(chalk3.bold(`
2463
+ console.log(chalk2.bold(`
2551
2464
  ${ok}/${results.length} entries logged`));
2552
2465
  }
2553
2466
  function outputDayReportJson(report, date) {
@@ -2578,28 +2491,28 @@ function outputDayReportJson(report, date) {
2578
2491
  );
2579
2492
  }
2580
2493
  function outputDayReportPretty(report, date) {
2581
- console.log(chalk3.bold(`
2494
+ console.log(chalk2.bold(`
2582
2495
  ${date}`));
2583
2496
  console.log(
2584
- ` ${chalk3.bold(formatMinutes(report.attentionMinutes))} attention \xB7 ${formatMinutes(report.sessionMinutes)} session \xB7 ${formatMinutes(report.agentRunMinutes)} agent-run` + (report.proposedCount > 0 ? chalk3.yellow(` \xB7 ${report.proposedCount} proposed`) : "") + (report.unassignedCount > 0 ? chalk3.yellow(` \xB7 ${report.unassignedCount} unassigned`) : "")
2497
+ ` ${chalk2.bold(formatMinutes(report.attentionMinutes))} attention \xB7 ${formatMinutes(report.sessionMinutes)} session \xB7 ${formatMinutes(report.agentRunMinutes)} agent-run` + (report.proposedCount > 0 ? chalk2.yellow(` \xB7 ${report.proposedCount} proposed`) : "") + (report.unassignedCount > 0 ? chalk2.yellow(` \xB7 ${report.unassignedCount} unassigned`) : "")
2585
2498
  );
2586
2499
  if (report.entries.length === 0) {
2587
- console.log(chalk3.gray(" No time recorded."));
2500
+ console.log(chalk2.gray(" No time recorded."));
2588
2501
  return;
2589
2502
  }
2590
- console.log(chalk3.bold("\nBy product"));
2503
+ console.log(chalk2.bold("\nBy product"));
2591
2504
  for (const row of report.byProduct) {
2592
- console.log(` ${formatMinutes(row.minutes).padStart(7)} ${row.productId ? row.name : chalk3.yellow(row.name)}`);
2505
+ console.log(` ${formatMinutes(row.minutes).padStart(7)} ${row.productId ? row.name : chalk2.yellow(row.name)}`);
2593
2506
  }
2594
- console.log(chalk3.bold("\nBy action"));
2507
+ console.log(chalk2.bold("\nBy action"));
2595
2508
  for (const row of report.byAction) {
2596
- const ticket = row.ticket ? chalk3.gray(` ${row.ticket.shortId ?? `#${row.ticket.number}`}`) : row.projectId ? chalk3.gray(` \xB7 ${row.projectName ?? "project"}`) : chalk3.yellow(" [unassigned]");
2597
- const agent = row.agentRunMinutes > 0 ? chalk3.gray(` (+${formatMinutes(row.agentRunMinutes)} agent-run)`) : "";
2598
- const proposed = row.proposedCount > 0 ? chalk3.yellow(` ${row.proposedCount} proposed`) : "";
2509
+ const ticket = row.ticket ? chalk2.gray(` ${row.ticket.shortId ?? `#${row.ticket.number}`}`) : row.projectId ? chalk2.gray(` \xB7 ${row.projectName ?? "project"}`) : chalk2.yellow(" [unassigned]");
2510
+ const agent = row.agentRunMinutes > 0 ? chalk2.gray(` (+${formatMinutes(row.agentRunMinutes)} agent-run)`) : "";
2511
+ const proposed = row.proposedCount > 0 ? chalk2.yellow(` ${row.proposedCount} proposed`) : "";
2599
2512
  console.log(` ${formatMinutes(row.minutes).padStart(7)} ${row.name}${ticket}${agent}${proposed}`);
2600
2513
  }
2601
2514
  if (report.flags.length > 0) {
2602
- console.log(chalk3.yellow(`
2515
+ console.log(chalk2.yellow(`
2603
2516
  ${report.flags.length} manual entr${report.flags.length === 1 ? "y looks" : "ies look"} like a forgotten timer`));
2604
2517
  }
2605
2518
  }
@@ -2633,12 +2546,12 @@ function outputResourceJson(resource) {
2633
2546
  console.log(JSON.stringify(transformResource(resource), null, 2));
2634
2547
  }
2635
2548
  function outputResourcePretty(resource) {
2636
- const badge = chalk3.gray(`[${resource.readStatus}]`);
2637
- console.log(` ${badge} ${chalk3.bold(resource.title)}`);
2638
- if (resource.url) console.log(chalk3.gray(` ${resource.url}`));
2549
+ const badge = chalk2.gray(`[${resource.readStatus}]`);
2550
+ console.log(` ${badge} ${chalk2.bold(resource.title)}`);
2551
+ if (resource.url) console.log(chalk2.gray(` ${resource.url}`));
2639
2552
  if (resource.description) console.log(` ${resource.description}`);
2640
- if (resource.tags?.length) console.log(chalk3.cyan(` ${formatResourceTags(resource.tags)}`));
2641
- console.log(chalk3.gray(` ID: ${resource.id}`));
2553
+ if (resource.tags?.length) console.log(chalk2.cyan(` ${formatResourceTags(resource.tags)}`));
2554
+ console.log(chalk2.gray(` ID: ${resource.id}`));
2642
2555
  }
2643
2556
  function outputResourcesJson(resources, filters = {}) {
2644
2557
  console.log(
@@ -2648,19 +2561,19 @@ function outputResourcesJson(resources, filters = {}) {
2648
2561
  function outputResourcesPretty(resources, status) {
2649
2562
  const heading = status === "unread" ? "Reading list" : status === "all" ? "Resources" : `Resources (${status})`;
2650
2563
  if (resources.length === 0) {
2651
- console.log(chalk3.gray(status === "unread" ? "Nothing to read." : "No resources found."));
2564
+ console.log(chalk2.gray(status === "unread" ? "Nothing to read." : "No resources found."));
2652
2565
  return;
2653
2566
  }
2654
- console.log(chalk3.bold(`
2567
+ console.log(chalk2.bold(`
2655
2568
  ${heading} (${resources.length} total)`));
2656
- console.log(chalk3.gray("\u2500".repeat(50)));
2569
+ console.log(chalk2.gray("\u2500".repeat(50)));
2657
2570
  for (const r of resources) {
2658
2571
  const when = r.readStatus === "read" && r.readAt ? new Date(r.readAt) : new Date(r.createdAt);
2659
2572
  const host = hostnameOf(r.url);
2660
- console.log(` ${chalk3.bold(r.title)}${host ? chalk3.gray(` ${host}`) : ""} ${chalk3.gray(when.toLocaleDateString())}`);
2661
- if (r.description) console.log(chalk3.gray(` ${r.description}`));
2662
- if (r.tags?.length) console.log(chalk3.cyan(` ${formatResourceTags(r.tags)}`));
2663
- console.log(chalk3.gray(` ID: ${r.id}`));
2573
+ console.log(` ${chalk2.bold(r.title)}${host ? chalk2.gray(` ${host}`) : ""} ${chalk2.gray(when.toLocaleDateString())}`);
2574
+ if (r.description) console.log(chalk2.gray(` ${r.description}`));
2575
+ if (r.tags?.length) console.log(chalk2.cyan(` ${formatResourceTags(r.tags)}`));
2576
+ console.log(chalk2.gray(` ID: ${r.id}`));
2664
2577
  }
2665
2578
  console.log();
2666
2579
  }
@@ -2669,49 +2582,49 @@ function outputDatabaseJson(database) {
2669
2582
  }
2670
2583
  function describeProperty(p) {
2671
2584
  const options = p.options?.length ? ` [${p.options.map((o) => o.name).join(", ")}]` : "";
2672
- return ` ${p.name} ${chalk3.gray(`${p.type} ${p.id}`)}${chalk3.gray(options)}`;
2585
+ return ` ${p.name} ${chalk2.gray(`${p.type} ${p.id}`)}${chalk2.gray(options)}`;
2673
2586
  }
2674
2587
  function outputDatabasePretty(database) {
2675
- console.log(chalk3.gray("\u2500".repeat(50)));
2588
+ console.log(chalk2.gray("\u2500".repeat(50)));
2676
2589
  console.log(`
2677
- ${chalk3.bold(database.name)}`);
2678
- console.log(chalk3.gray(` ID: ${database.id}`));
2679
- console.log(` ${chalk3.gray("Page:")} ${database.page.title} ${chalk3.gray(database.page.id)}`);
2590
+ ${chalk2.bold(database.name)}`);
2591
+ console.log(chalk2.gray(` ID: ${database.id}`));
2592
+ console.log(` ${chalk2.gray("Page:")} ${database.page.title} ${chalk2.gray(database.page.id)}`);
2680
2593
  const facts = [];
2681
2594
  if (typeof database.rowCount === "number") facts.push(`${database.rowCount} row${database.rowCount === 1 ? "" : "s"}`);
2682
2595
  if (database.detachedAt) facts.push(`detached ${formatDate(new Date(database.detachedAt))} \u2014 block is out of the page`);
2683
- if (facts.length) console.log(chalk3.gray(` ${facts.join(" \xB7 ")}`));
2596
+ if (facts.length) console.log(chalk2.gray(` ${facts.join(" \xB7 ")}`));
2684
2597
  console.log(`
2685
- ${chalk3.gray("Properties")}`);
2598
+ ${chalk2.gray("Properties")}`);
2686
2599
  for (const p of database.properties) console.log(describeProperty(p));
2687
2600
  const view = database.view;
2688
2601
  const viewParts = [];
2689
2602
  if (view.sort) viewParts.push(`sort ${view.sort.propertyId} ${view.sort.direction}`);
2690
2603
  if (view.filters.length) viewParts.push(`${view.filters.length} filter${view.filters.length === 1 ? "" : "s"}`);
2691
2604
  if (view.hiddenPropertyIds.length) viewParts.push(`${view.hiddenPropertyIds.length} hidden`);
2692
- if (viewParts.length) console.log(chalk3.gray(`
2605
+ if (viewParts.length) console.log(chalk2.gray(`
2693
2606
  View: ${viewParts.join(" \xB7 ")}`));
2694
2607
  console.log();
2695
2608
  }
2696
2609
  function outputDatabasesPretty(databases) {
2697
2610
  if (databases.length === 0) {
2698
- console.log(chalk3.gray("No databases on this page."));
2611
+ console.log(chalk2.gray("No databases on this page."));
2699
2612
  return;
2700
2613
  }
2701
- console.log(chalk3.bold(`
2614
+ console.log(chalk2.bold(`
2702
2615
  Databases (${databases.length})`));
2703
- console.log(chalk3.gray("\u2500".repeat(50)));
2616
+ console.log(chalk2.gray("\u2500".repeat(50)));
2704
2617
  for (const d of databases) {
2705
- const state = d.detachedAt ? chalk3.yellow(" detached") : "";
2706
- const rows = typeof d.rowCount === "number" ? chalk3.gray(` ${d.rowCount} rows`) : "";
2707
- console.log(` ${d.name} ${chalk3.gray(d.id)}${rows}${state}`);
2618
+ const state = d.detachedAt ? chalk2.yellow(" detached") : "";
2619
+ const rows = typeof d.rowCount === "number" ? chalk2.gray(` ${d.rowCount} rows`) : "";
2620
+ console.log(` ${d.name} ${chalk2.gray(d.id)}${rows}${state}`);
2708
2621
  }
2709
2622
  console.log();
2710
2623
  }
2711
2624
  function formatCell(def, value) {
2712
- if (value === null || value === void 0 || value === "") return chalk3.gray("\u2014");
2625
+ if (value === null || value === void 0 || value === "") return chalk2.gray("\u2014");
2713
2626
  if (Array.isArray(value)) {
2714
- if (value.length === 0) return chalk3.gray("\u2014");
2627
+ if (value.length === 0) return chalk2.gray("\u2014");
2715
2628
  return value.map((v) => formatCell(def, v)).join(", ");
2716
2629
  }
2717
2630
  if (def?.options) {
@@ -2725,42 +2638,42 @@ function outputRowJson(row) {
2725
2638
  }
2726
2639
  function outputRowPretty(row, database) {
2727
2640
  console.log(`
2728
- ${chalk3.bold(row.title || "Untitled")} ${chalk3.gray(row.id)}`);
2641
+ ${chalk2.bold(row.title || "Untitled")} ${chalk2.gray(row.id)}`);
2729
2642
  const defs = database?.properties.filter((p) => p.type !== "title") ?? [];
2730
2643
  if (defs.length) {
2731
2644
  for (const def of defs) {
2732
- console.log(` ${chalk3.gray(`${def.name}:`)} ${formatCell(def, row.values[def.id])}`);
2645
+ console.log(` ${chalk2.gray(`${def.name}:`)} ${formatCell(def, row.values[def.id])}`);
2733
2646
  }
2734
2647
  } else {
2735
2648
  for (const [key, value] of Object.entries(row.values)) {
2736
- console.log(` ${chalk3.gray(`${key}:`)} ${formatCell(void 0, value)}`);
2649
+ console.log(` ${chalk2.gray(`${key}:`)} ${formatCell(void 0, value)}`);
2737
2650
  }
2738
2651
  }
2739
- console.log(chalk3.gray(` Read the page: exponential pages get ${row.id}`));
2652
+ console.log(chalk2.gray(` Read the page: exponential pages get ${row.id}`));
2740
2653
  console.log();
2741
2654
  }
2742
2655
  function outputRowsPretty(page, database) {
2743
2656
  if (page.rows.length === 0) {
2744
- console.log(chalk3.gray(`No rows in ${database.name}.`));
2657
+ console.log(chalk2.gray(`No rows in ${database.name}.`));
2745
2658
  return;
2746
2659
  }
2747
2660
  const byId = new Map(database.properties.map((p) => [p.id, p]));
2748
2661
  const columns = page.columns.map((id) => byId.get(id)).filter((p) => !!p && p.type !== "title");
2749
- console.log(chalk3.bold(`
2662
+ console.log(chalk2.bold(`
2750
2663
  ${database.name} (${page.rows.length} row${page.rows.length === 1 ? "" : "s"}${page.nextCursor ? ", more" : ""})`));
2751
- console.log(chalk3.gray("\u2500".repeat(50)));
2664
+ console.log(chalk2.gray("\u2500".repeat(50)));
2752
2665
  for (const row of page.rows) {
2753
- const cells = columns.map((c) => `${chalk3.gray(`${c.name}:`)} ${formatCell(c, row.values[c.id])}`);
2754
- console.log(` ${chalk3.bold(row.title || "Untitled")} ${chalk3.gray(row.id)}`);
2666
+ const cells = columns.map((c) => `${chalk2.gray(`${c.name}:`)} ${formatCell(c, row.values[c.id])}`);
2667
+ console.log(` ${chalk2.bold(row.title || "Untitled")} ${chalk2.gray(row.id)}`);
2755
2668
  if (cells.length) console.log(` ${cells.join(" ")}`);
2756
2669
  }
2757
- if (page.nextCursor) console.log(chalk3.gray(`
2670
+ if (page.nextCursor) console.log(chalk2.gray(`
2758
2671
  More: --cursor ${page.nextCursor}`));
2759
2672
  console.log();
2760
2673
  }
2761
2674
  function outputCsvSkipped(skipped) {
2762
2675
  if (skipped.length === 0) return;
2763
- console.log(chalk3.yellow(`
2676
+ console.log(chalk2.yellow(`
2764
2677
  ${skipped.length} row${skipped.length === 1 ? "" : "s"} not imported:`));
2765
2678
  for (const row of skipped) {
2766
2679
  const why = row.errors.map((e) => `${e.propertyName} ${e.reason}`).join("; ");
@@ -2768,16 +2681,16 @@ function outputCsvSkipped(skipped) {
2768
2681
  }
2769
2682
  }
2770
2683
  function outputCsvPreviewPretty(preview) {
2771
- console.log(chalk3.bold(`
2684
+ console.log(chalk2.bold(`
2772
2685
  CSV preview: ${preview.importable} of ${preview.total} row${preview.total === 1 ? "" : "s"} would be created`));
2773
- console.log(chalk3.gray("\u2500".repeat(50)));
2686
+ console.log(chalk2.gray("\u2500".repeat(50)));
2774
2687
  for (const column of preview.columns) {
2775
- const to = column.target.kind === "skip" ? chalk3.gray("skipped") : column.target.kind === "new" ? `${chalk3.green("new")} ${column.propertyName} (${column.type})` : `${column.propertyName} (${column.type})`;
2776
- console.log(` ${chalk3.gray(`${column.header} \u2192`)} ${to}`);
2688
+ const to = column.target.kind === "skip" ? chalk2.gray("skipped") : column.target.kind === "new" ? `${chalk2.green("new")} ${column.propertyName} (${column.type})` : `${column.propertyName} (${column.type})`;
2689
+ console.log(` ${chalk2.gray(`${column.header} \u2192`)} ${to}`);
2777
2690
  }
2778
2691
  const newOptions = Object.entries(preview.newOptions ?? {});
2779
2692
  if (newOptions.length) {
2780
- console.log(chalk3.green("\n Options the import will add:"));
2693
+ console.log(chalk2.green("\n Options the import will add:"));
2781
2694
  for (const [columnId, names] of newOptions) {
2782
2695
  const column = preview.columns.find((c) => (c.target.kind === "property" ? c.target.propertyId : `new:${c.propertyName ?? ""}`) === columnId);
2783
2696
  console.log(` ${column?.propertyName ?? columnId}: ${names.join(", ")}`);
@@ -2785,7 +2698,7 @@ CSV preview: ${preview.importable} of ${preview.total} row${preview.total === 1
2785
2698
  }
2786
2699
  const skipped = preview.rows.filter((r) => r.errors.length > 0).map((r) => ({ index: r.index, errors: r.errors }));
2787
2700
  outputCsvSkipped(skipped);
2788
- console.log(chalk3.gray("\n Nothing was created. Run again without --dry-run to import."));
2701
+ console.log(chalk2.gray("\n Nothing was created. Run again without --dry-run to import."));
2789
2702
  }
2790
2703
  function getOccurrenceStatusColor(status) {
2791
2704
  switch (status) {
@@ -2823,18 +2736,18 @@ function outputCeremoniesJson(ceremonies, extra = {}) {
2823
2736
  }
2824
2737
  function outputCeremoniesPretty(ceremonies) {
2825
2738
  if (ceremonies.length === 0) {
2826
- console.log(chalk3.gray("No ceremonies found."));
2739
+ console.log(chalk2.gray("No ceremonies found."));
2827
2740
  return;
2828
2741
  }
2829
- console.log(chalk3.bold(`
2742
+ console.log(chalk2.bold(`
2830
2743
  Ceremonies (${ceremonies.length})`));
2831
- console.log(chalk3.gray("\u2500".repeat(50)));
2744
+ console.log(chalk2.gray("\u2500".repeat(50)));
2832
2745
  for (const c of ceremonies) {
2833
- const inactive = c.isActive ? "" : chalk3.red(" [inactive]");
2834
- console.log(` ${chalk3.bold(c.name)} ${chalk3.gray(`(${c.slug})`)} ${chalk3.cyan(`[${c.kind}]`)}${inactive}`);
2835
- console.log(chalk3.gray(` ID: ${c.id}`));
2746
+ const inactive = c.isActive ? "" : chalk2.red(" [inactive]");
2747
+ console.log(` ${chalk2.bold(c.name)} ${chalk2.gray(`(${c.slug})`)} ${chalk2.cyan(`[${c.kind}]`)}${inactive}`);
2748
+ console.log(chalk2.gray(` ID: ${c.id}`));
2836
2749
  console.log(
2837
- chalk3.gray(
2750
+ chalk2.gray(
2838
2751
  ` ${c.cadenceRule ?? "one-off"} \xB7 ${c.timezone} \xB7 ${c.durationMinutes} min \xB7 owner ${c.owner?.name ?? c.ownerId} \xB7 ${c._count.participants} participants \xB7 ${c._count.occurrences} occurrences`
2839
2752
  )
2840
2753
  );
@@ -2845,26 +2758,26 @@ function outputCeremonyJson(ceremony) {
2845
2758
  console.log(JSON.stringify(ceremony, null, 2));
2846
2759
  }
2847
2760
  function outputCeremonyPretty(c) {
2848
- console.log(chalk3.gray("\u2500".repeat(50)));
2849
- const inactive = c.isActive ? "" : chalk3.red(" [inactive]");
2761
+ console.log(chalk2.gray("\u2500".repeat(50)));
2762
+ const inactive = c.isActive ? "" : chalk2.red(" [inactive]");
2850
2763
  console.log(`
2851
- ${chalk3.bold(c.name)} ${chalk3.cyan(`[${c.kind}]`)}${inactive}`);
2852
- console.log(chalk3.gray(` ID: ${c.id} \xB7 slug: ${c.slug}`));
2764
+ ${chalk2.bold(c.name)} ${chalk2.cyan(`[${c.kind}]`)}${inactive}`);
2765
+ console.log(chalk2.gray(` ID: ${c.id} \xB7 slug: ${c.slug}`));
2853
2766
  console.log(
2854
- ` ${chalk3.gray("Cadence:")} ${c.isOneOff ? "one-off meeting" : c.cadenceRule ?? "none"} (${c.timezone}), ${c.durationMinutes} min, agenda ${c.leadTimeHours}h ahead`
2767
+ ` ${chalk2.gray("Cadence:")} ${c.isOneOff ? "one-off meeting" : c.cadenceRule ?? "none"} (${c.timezone}), ${c.durationMinutes} min, agenda ${c.leadTimeHours}h ahead`
2855
2768
  );
2856
- if (c.meetingUrl) console.log(` ${chalk3.gray("Room:")} ${c.meetingUrl}`);
2857
- if (c.autoExtractOutputs) console.log(` ${chalk3.gray("Outputs:")} extracted automatically from recordings`);
2858
- console.log(` ${chalk3.gray("Owner:")} ${c.owner?.name ?? c.owner?.email ?? c.ownerId}`);
2769
+ if (c.meetingUrl) console.log(` ${chalk2.gray("Room:")} ${c.meetingUrl}`);
2770
+ if (c.autoExtractOutputs) console.log(` ${chalk2.gray("Outputs:")} extracted automatically from recordings`);
2771
+ console.log(` ${chalk2.gray("Owner:")} ${c.owner?.name ?? c.owner?.email ?? c.ownerId}`);
2859
2772
  if (c.participants.length > 0) {
2860
- console.log(` ${chalk3.gray("Participants:")} ${c.participants.map((p) => p.user.name ?? p.user.email ?? p.userId).join(", ")}`);
2773
+ console.log(` ${chalk2.gray("Participants:")} ${c.participants.map((p) => p.user.name ?? p.user.email ?? p.userId).join(", ")}`);
2861
2774
  }
2862
- if (c.product) console.log(` ${chalk3.gray("Product:")} ${c.product.name}`);
2863
- if (c.team) console.log(` ${chalk3.gray("Team:")} ${c.team.name}`);
2775
+ if (c.product) console.log(` ${chalk2.gray("Product:")} ${c.product.name}`);
2776
+ if (c.team) console.log(` ${chalk2.gray("Team:")} ${c.team.name}`);
2864
2777
  if (c.projects.length > 0) {
2865
- console.log(` ${chalk3.gray("Projects:")} ${c.projects.map((p) => p.project.name).join(", ")}`);
2778
+ console.log(` ${chalk2.gray("Projects:")} ${c.projects.map((p) => p.project.name).join(", ")}`);
2866
2779
  }
2867
- if (c.aliases.length > 0) console.log(` ${chalk3.gray("Aliases:")} ${c.aliases.join(", ")}`);
2780
+ if (c.aliases.length > 0) console.log(` ${chalk2.gray("Aliases:")} ${c.aliases.join(", ")}`);
2868
2781
  for (const [label, body] of [
2869
2782
  ["Purpose", c.purpose],
2870
2783
  ["Not for", c.notFor],
@@ -2872,46 +2785,46 @@ ${chalk3.bold(c.name)} ${chalk3.cyan(`[${c.kind}]`)}${inactive}`);
2872
2785
  ["Outputs", c.outputs]
2873
2786
  ]) {
2874
2787
  if (body) console.log(`
2875
- ${chalk3.bold(label)}
2788
+ ${chalk2.bold(label)}
2876
2789
  ${body}`);
2877
2790
  }
2878
2791
  if (c.agendaTemplate.length > 0) {
2879
2792
  console.log(`
2880
- ${chalk3.bold("Agenda template")}`);
2793
+ ${chalk2.bold("Agenda template")}`);
2881
2794
  for (const s of c.agendaTemplate) {
2882
- console.log(` - ${s.title} ${chalk3.gray(`(${s.type}${s.minutes ? `, ${s.minutes} min` : ""})`)}`);
2795
+ console.log(` - ${s.title} ${chalk2.gray(`(${s.type}${s.minutes ? `, ${s.minutes} min` : ""})`)}`);
2883
2796
  }
2884
2797
  }
2885
2798
  if (c.occurrences.length > 0) {
2886
2799
  console.log(`
2887
- ${chalk3.bold("Occurrences")} ${chalk3.gray("(newest first)")}`);
2800
+ ${chalk2.bold("Occurrences")} ${chalk2.gray("(newest first)")}`);
2888
2801
  for (const o of c.occurrences) {
2889
2802
  const color = getOccurrenceStatusColor(o.status);
2890
- const moved = o.cadenceStart === null ? chalk3.gray(" \xB7 added off-cadence") : new Date(o.cadenceStart).getTime() !== new Date(o.scheduledStart).getTime() ? chalk3.gray(` \xB7 moved from ${formatInZone(o.cadenceStart, c.timezone)}`) : "";
2891
- const recs = o.recordedMeetings.length > 0 ? chalk3.gray(` \xB7 ${o.recordedMeetings.length} recording${o.recordedMeetings.length === 1 ? "" : "s"}`) : "";
2892
- console.log(` ${formatInZone(o.scheduledStart, c.timezone)} ${chalk3[color](`[${o.status}]`)}${moved}${recs}`);
2893
- console.log(chalk3.gray(` ID: ${o.id}${o.skipReason ? ` \xB7 skipped: ${o.skipReason}` : ""}`));
2803
+ const moved = o.cadenceStart === null ? chalk2.gray(" \xB7 added off-cadence") : new Date(o.cadenceStart).getTime() !== new Date(o.scheduledStart).getTime() ? chalk2.gray(` \xB7 moved from ${formatInZone(o.cadenceStart, c.timezone)}`) : "";
2804
+ const recs = o.recordedMeetings.length > 0 ? chalk2.gray(` \xB7 ${o.recordedMeetings.length} recording${o.recordedMeetings.length === 1 ? "" : "s"}`) : "";
2805
+ console.log(` ${formatInZone(o.scheduledStart, c.timezone)} ${chalk2[color](`[${o.status}]`)}${moved}${recs}`);
2806
+ console.log(chalk2.gray(` ID: ${o.id}${o.skipReason ? ` \xB7 skipped: ${o.skipReason}` : ""}`));
2894
2807
  }
2895
2808
  }
2896
2809
  console.log();
2897
2810
  }
2898
2811
  function outputCeremonyTemplatesPretty(templates) {
2899
- console.log(chalk3.bold(`
2812
+ console.log(chalk2.bold(`
2900
2813
  Ceremony templates (${templates.length})`));
2901
- console.log(chalk3.gray("\u2500".repeat(50)));
2814
+ console.log(chalk2.gray("\u2500".repeat(50)));
2902
2815
  for (const t of templates) {
2903
- console.log(` ${chalk3.bold(t.name)} ${chalk3.gray(`(${t.slug})`)} ${chalk3.cyan(`[${t.kind}]`)}`);
2904
- console.log(chalk3.gray(` ${t.cadenceRule} \xB7 ${t.durationMinutes} min \xB7 ${t.agendaTemplate.length} agenda sections`));
2905
- if (t.purpose) console.log(chalk3.gray(` ${t.purpose}`));
2816
+ console.log(` ${chalk2.bold(t.name)} ${chalk2.gray(`(${t.slug})`)} ${chalk2.cyan(`[${t.kind}]`)}`);
2817
+ console.log(chalk2.gray(` ${t.cadenceRule} \xB7 ${t.durationMinutes} min \xB7 ${t.agendaTemplate.length} agenda sections`));
2818
+ if (t.purpose) console.log(chalk2.gray(` ${t.purpose}`));
2906
2819
  }
2907
2820
  console.log();
2908
2821
  }
2909
2822
  function outputCeremonyWritePretty(result, verb) {
2910
2823
  const c = result.ceremony;
2911
- console.log(`\u2713 Ceremony ${verb}: ${chalk3.bold(c.name)} ${chalk3.gray(`(${c.slug})`)}`);
2912
- console.log(chalk3.gray(` ID: ${c.id}`));
2824
+ console.log(`\u2713 Ceremony ${verb}: ${chalk2.bold(c.name)} ${chalk2.gray(`(${c.slug})`)}`);
2825
+ console.log(chalk2.gray(` ID: ${c.id}`));
2913
2826
  if (result.occurrencesCreated > 0) {
2914
- console.log(chalk3.gray(` ${result.occurrencesCreated} occurrence${result.occurrencesCreated === 1 ? "" : "s"} scheduled`));
2827
+ console.log(chalk2.gray(` ${result.occurrencesCreated} occurrence${result.occurrencesCreated === 1 ? "" : "s"} scheduled`));
2915
2828
  }
2916
2829
  }
2917
2830
  function outputOccurrencesJson(occurrences, extra = {}) {
@@ -2919,16 +2832,16 @@ function outputOccurrencesJson(occurrences, extra = {}) {
2919
2832
  }
2920
2833
  function outputOccurrencesPretty(occurrences) {
2921
2834
  if (occurrences.length === 0) {
2922
- console.log(chalk3.gray("No occurrences in this window."));
2835
+ console.log(chalk2.gray("No occurrences in this window."));
2923
2836
  return;
2924
2837
  }
2925
- console.log(chalk3.bold(`
2838
+ console.log(chalk2.bold(`
2926
2839
  Occurrences (${occurrences.length})`));
2927
- console.log(chalk3.gray("\u2500".repeat(50)));
2840
+ console.log(chalk2.gray("\u2500".repeat(50)));
2928
2841
  for (const o of occurrences) {
2929
2842
  const color = getOccurrenceStatusColor(o.status);
2930
- console.log(` ${formatInZone(o.scheduledStart)} ${chalk3.bold(o.ceremony.name)} ${chalk3[color](`[${o.status}]`)}`);
2931
- console.log(chalk3.gray(` ID: ${o.id} \xB7 ceremony ${o.ceremonyId}`));
2843
+ console.log(` ${formatInZone(o.scheduledStart)} ${chalk2.bold(o.ceremony.name)} ${chalk2[color](`[${o.status}]`)}`);
2844
+ console.log(chalk2.gray(` ID: ${o.id} \xB7 ceremony ${o.ceremonyId}`));
2932
2845
  }
2933
2846
  console.log();
2934
2847
  }
@@ -2937,49 +2850,49 @@ function outputOccurrenceJson(occurrence, extras = {}) {
2937
2850
  }
2938
2851
  function outputAgendaPretty(agenda) {
2939
2852
  if (!agenda) {
2940
- console.log(chalk3.gray("\nNo agenda generated yet."));
2853
+ console.log(chalk2.gray("\nNo agenda generated yet."));
2941
2854
  return;
2942
2855
  }
2943
2856
  console.log(`
2944
- ${chalk3.bold("Agenda")} ${chalk3.gray(`(generated ${new Date(agenda.generatedAt).toLocaleString()})`)}`);
2857
+ ${chalk2.bold("Agenda")} ${chalk2.gray(`(generated ${new Date(agenda.generatedAt).toLocaleString()})`)}`);
2945
2858
  for (const section of agenda.sections) {
2946
- const minutes = section.minutes ? chalk3.gray(` \xB7 ${section.minutes} min`) : "";
2859
+ const minutes = section.minutes ? chalk2.gray(` \xB7 ${section.minutes} min`) : "";
2947
2860
  console.log(`
2948
- ${chalk3.bold(section.title)}${minutes} ${chalk3.gray(`[${section.key}]`)}`);
2861
+ ${chalk2.bold(section.title)}${minutes} ${chalk2.gray(`[${section.key}]`)}`);
2949
2862
  if (section.items.length === 0) {
2950
- console.log(chalk3.gray(` ${section.emptyReason ?? "Nothing here."}`));
2863
+ console.log(chalk2.gray(` ${section.emptyReason ?? "Nothing here."}`));
2951
2864
  }
2952
2865
  for (const item of section.items) {
2953
- const box = item.resolvedAt ? chalk3.green("[x]") : "[ ]";
2954
- const carried = item.carryCount ? chalk3.yellow(` \u21BB${item.carryCount}`) : "";
2866
+ const box = item.resolvedAt ? chalk2.green("[x]") : "[ ]";
2867
+ const carried = item.carryCount ? chalk2.yellow(` \u21BB${item.carryCount}`) : "";
2955
2868
  console.log(` ${box} ${item.title}${carried}`);
2956
2869
  const meta = [item.detail, `${item.refType} \xB7 id ${item.id}`].filter(Boolean).join(" \xB7 ");
2957
- console.log(chalk3.gray(` ${meta}`));
2870
+ console.log(chalk2.gray(` ${meta}`));
2958
2871
  }
2959
2872
  }
2960
2873
  if (agenda.narrative) {
2961
2874
  console.log(`
2962
- ${chalk3.bold("Summary")}
2875
+ ${chalk2.bold("Summary")}
2963
2876
  ${agenda.narrative}`);
2964
2877
  }
2965
2878
  }
2966
2879
  function outputOccurrenceUpdatesPretty(summary) {
2967
2880
  if (summary.questions.length === 0) {
2968
- console.log(chalk3.gray("This ceremony kind has no async updates."));
2881
+ console.log(chalk2.gray("This ceremony kind has no async updates."));
2969
2882
  return;
2970
2883
  }
2971
2884
  console.log(
2972
- chalk3.bold(`
2973
- Async updates: ${summary.submittedCount} of ${summary.participants.length} submitted`) + (summary.blockedCount > 0 ? chalk3.red(` \xB7 ${summary.blockedCount} blocked`) : "")
2885
+ chalk2.bold(`
2886
+ Async updates: ${summary.submittedCount} of ${summary.participants.length} submitted`) + (summary.blockedCount > 0 ? chalk2.red(` \xB7 ${summary.blockedCount} blocked`) : "")
2974
2887
  );
2975
2888
  for (const p of summary.participants) {
2976
- const state = p.submittedAt ? chalk3.green("submitted") : chalk3.gray("not yet");
2977
- const blocked = p.flaggedBlocker ? chalk3.red(" [blocked]") : "";
2889
+ const state = p.submittedAt ? chalk2.green("submitted") : chalk2.gray("not yet");
2890
+ const blocked = p.flaggedBlocker ? chalk2.red(" [blocked]") : "";
2978
2891
  console.log(`
2979
- ${chalk3.bold(p.name ?? p.email ?? p.userId)} ${state}${blocked}`);
2892
+ ${chalk2.bold(p.name ?? p.email ?? p.userId)} ${state}${blocked}`);
2980
2893
  for (const q of summary.questions) {
2981
2894
  const answer = p.answers[q.key];
2982
- if (answer) console.log(` ${chalk3.gray(q.prompt)}
2895
+ if (answer) console.log(` ${chalk2.gray(q.prompt)}
2983
2896
  ${answer.replace(/\n/g, "\n ")}`);
2984
2897
  }
2985
2898
  }
@@ -2987,100 +2900,313 @@ Async updates: ${summary.submittedCount} of ${summary.participants.length} submi
2987
2900
  }
2988
2901
  function outputMyOccurrenceUpdatePretty(update) {
2989
2902
  if (update.questions.length === 0) {
2990
- console.log(chalk3.gray("This ceremony kind has no async updates."));
2903
+ console.log(chalk2.gray("This ceremony kind has no async updates."));
2991
2904
  return;
2992
2905
  }
2993
- const state = update.submittedAt ? chalk3.green(`submitted ${new Date(update.submittedAt).toLocaleString()}`) : chalk3.gray("not submitted");
2906
+ const state = update.submittedAt ? chalk2.green(`submitted ${new Date(update.submittedAt).toLocaleString()}`) : chalk2.gray("not submitted");
2994
2907
  console.log(`
2995
- ${chalk3.bold("Your update")} ${state}${update.flaggedBlocker ? chalk3.red(" [blocked]") : ""}`);
2908
+ ${chalk2.bold("Your update")} ${state}${update.flaggedBlocker ? chalk2.red(" [blocked]") : ""}`);
2996
2909
  if (update.isParticipant === false) {
2997
- console.log(chalk3.yellow(" You aren't a participant of this ceremony."));
2910
+ console.log(chalk2.yellow(" You aren't a participant of this ceremony."));
2998
2911
  }
2999
2912
  for (const q of update.questions) {
3000
2913
  const answer = update.answers[q.key];
3001
2914
  const draft = update.draftAnswers[q.key];
3002
2915
  console.log(`
3003
- ${chalk3.bold(q.prompt)} ${chalk3.gray(`[${q.key}]`)}`);
2916
+ ${chalk2.bold(q.prompt)} ${chalk2.gray(`[${q.key}]`)}`);
3004
2917
  if (answer) console.log(` ${answer.replace(/\n/g, "\n ")}`);
3005
- else if (draft) console.log(chalk3.gray(` (draft) ${draft.replace(/\n/g, "\n ")}`));
3006
- else console.log(chalk3.gray(" \u2014"));
2918
+ else if (draft) console.log(chalk2.gray(` (draft) ${draft.replace(/\n/g, "\n ")}`));
2919
+ else console.log(chalk2.gray(" \u2014"));
3007
2920
  }
3008
2921
  console.log();
3009
2922
  }
3010
2923
  function outputOccurrencePretty(o, extras = {}) {
3011
2924
  const tz = o.ceremony.timezone;
3012
2925
  const color = getOccurrenceStatusColor(o.status);
3013
- console.log(chalk3.gray("\u2500".repeat(50)));
2926
+ console.log(chalk2.gray("\u2500".repeat(50)));
3014
2927
  console.log(`
3015
- ${chalk3.bold(o.ceremony.name)} \u2014 ${formatInZone(o.scheduledStart, tz)} ${chalk3[color](`[${o.status}]`)}`);
3016
- console.log(chalk3.gray(` ID: ${o.id} \xB7 ceremony ${o.ceremonyId}`));
3017
- console.log(` ${chalk3.gray("Owner:")} ${o.ceremony.owner?.name ?? o.ceremony.owner?.email ?? o.ceremony.ownerId}`);
3018
- if (o.isOneOff) console.log(` ${chalk3.gray("One-off meeting")}${o.purpose ? `: ${o.purpose}` : ""}`);
2928
+ ${chalk2.bold(o.ceremony.name)} \u2014 ${formatInZone(o.scheduledStart, tz)} ${chalk2[color](`[${o.status}]`)}`);
2929
+ console.log(chalk2.gray(` ID: ${o.id} \xB7 ceremony ${o.ceremonyId}`));
2930
+ console.log(` ${chalk2.gray("Owner:")} ${o.ceremony.owner?.name ?? o.ceremony.owner?.email ?? o.ceremony.ownerId}`);
2931
+ if (o.isOneOff) console.log(` ${chalk2.gray("One-off meeting")}${o.purpose ? `: ${o.purpose}` : ""}`);
3019
2932
  if (o.cadenceStart && new Date(o.cadenceStart).getTime() !== new Date(o.scheduledStart).getTime()) {
3020
- console.log(` ${chalk3.gray("Moved from:")} ${formatInZone(o.cadenceStart, tz)}`);
2933
+ console.log(` ${chalk2.gray("Moved from:")} ${formatInZone(o.cadenceStart, tz)}`);
3021
2934
  }
3022
2935
  if (o.scheduledMeeting) {
3023
2936
  const names = o.scheduledMeeting.attendees.map((a) => a.name ?? a.userId).filter(Boolean);
3024
2937
  console.log(
3025
- ` ${chalk3.gray("Booking:")} ${o.scheduledMeeting.status}${names.length > 0 ? ` \xB7 ${names.join(", ")}` : ""}`
2938
+ ` ${chalk2.gray("Booking:")} ${o.scheduledMeeting.status}${names.length > 0 ? ` \xB7 ${names.join(", ")}` : ""}`
3026
2939
  );
3027
2940
  }
3028
- if (o.skipReason) console.log(` ${chalk3.gray("Skipped:")} ${o.skipReason}`);
2941
+ if (o.skipReason) console.log(` ${chalk2.gray("Skipped:")} ${o.skipReason}`);
3029
2942
  if (o.agendaCirculatedAt) {
3030
- console.log(` ${chalk3.gray("Agenda circulated:")} ${formatInZone(o.agendaCirculatedAt, tz)}`);
2943
+ console.log(` ${chalk2.gray("Agenda circulated:")} ${formatInZone(o.agendaCirculatedAt, tz)}`);
3031
2944
  }
3032
2945
  if (o.skipProposal?.proposed) {
3033
- console.log(chalk3.yellow(" The agenda is empty \u2014 this occurrence is a candidate to skip."));
2946
+ console.log(chalk2.yellow(" The agenda is empty \u2014 this occurrence is a candidate to skip."));
3034
2947
  }
3035
2948
  if (o.recordedMeetings.length > 0) {
3036
- console.log(` ${chalk3.gray("Recordings:")}`);
2949
+ console.log(` ${chalk2.gray("Recordings:")}`);
3037
2950
  for (const m of o.recordedMeetings) {
3038
- console.log(m.visible ? ` ${m.title ?? "(untitled)"} ${chalk3.gray(m.id)}` : chalk3.gray(` (a recording you cannot view) ${m.id}`));
2951
+ console.log(m.visible ? ` ${m.title ?? "(untitled)"} ${chalk2.gray(m.id)}` : chalk2.gray(` (a recording you cannot view) ${m.id}`));
3039
2952
  }
3040
2953
  }
3041
2954
  if (o.notesPageId && extras.notes === void 0) {
3042
- console.log(` ${chalk3.gray("Notes page:")} ${o.notesPageId} ${chalk3.gray("(--notes to include)")}`);
2955
+ console.log(` ${chalk2.gray("Notes page:")} ${o.notesPageId} ${chalk2.gray("(--notes to include)")}`);
3043
2956
  }
3044
2957
  outputAgendaPretty(o.agenda);
3045
2958
  if (extras.notes !== void 0 && !extras.extrasErrors?.notes) {
3046
2959
  console.log(`
3047
- ${chalk3.bold("Notes")}`);
3048
- console.log(extras.notes?.body ? extras.notes.body : chalk3.gray("No notes yet."));
2960
+ ${chalk2.bold("Notes")}`);
2961
+ console.log(extras.notes?.body ? extras.notes.body : chalk2.gray("No notes yet."));
3049
2962
  }
3050
2963
  if (extras.decisions) {
3051
2964
  console.log(`
3052
- ${chalk3.bold("Decisions and open questions")}`);
3053
- if (extras.decisions.length === 0) console.log(chalk3.gray("None logged against this occurrence."));
2965
+ ${chalk2.bold("Decisions and open questions")}`);
2966
+ if (extras.decisions.length === 0) console.log(chalk2.gray("None logged against this occurrence."));
3054
2967
  for (const d of extras.decisions) {
3055
- console.log(` ${chalk3.gray(d.label)} ${d.statement} ${chalk3[getDecisionStatusColor(d.status)](`[${d.status}]`)}`);
2968
+ console.log(` ${chalk2.gray(d.label)} ${d.statement} ${chalk2[getDecisionStatusColor(d.status)](`[${d.status}]`)}`);
3056
2969
  }
3057
2970
  }
3058
2971
  if (extras.updates) outputOccurrenceUpdatesPretty(extras.updates);
3059
2972
  for (const [section, message] of Object.entries(extras.extrasErrors ?? {})) {
3060
- console.log(chalk3.yellow(`
2973
+ console.log(chalk2.yellow(`
3061
2974
  Couldn't load ${section}: ${message}`));
3062
2975
  }
3063
2976
  console.log();
3064
2977
  }
3065
2978
  function outputProjectOccurrencesPretty(rows) {
3066
2979
  if (rows.length === 0) {
3067
- console.log(chalk3.gray("No meetings in this window."));
2980
+ console.log(chalk2.gray("No meetings in this window."));
3068
2981
  return;
3069
2982
  }
3070
- console.log(chalk3.bold(`
2983
+ console.log(chalk2.bold(`
3071
2984
  Project meetings (${rows.length})`));
3072
- console.log(chalk3.gray("\u2500".repeat(50)));
2985
+ console.log(chalk2.gray("\u2500".repeat(50)));
3073
2986
  for (const r of rows) {
3074
2987
  const color = getOccurrenceStatusColor(r.status);
3075
- const oneOff = r.isOneOff ? chalk3.cyan(" [one-off]") : "";
3076
- console.log(` ${formatInZone(r.scheduledStart)} ${chalk3.bold(r.ceremonyName)}${oneOff} ${chalk3[color](`[${r.status}]`)}`);
2988
+ const oneOff = r.isOneOff ? chalk2.cyan(" [one-off]") : "";
2989
+ console.log(` ${formatInZone(r.scheduledStart)} ${chalk2.bold(r.ceremonyName)}${oneOff} ${chalk2[color](`[${r.status}]`)}`);
3077
2990
  const meta = [`ID: ${r.occurrenceId}`, `${r.attendeeCount} attendee${r.attendeeCount === 1 ? "" : "s"}`, r.purpose].filter(Boolean);
3078
- console.log(chalk3.gray(` ${meta.join(" \xB7 ")}`));
2991
+ console.log(chalk2.gray(` ${meta.join(" \xB7 ")}`));
3079
2992
  }
3080
2993
  console.log();
3081
2994
  }
3082
2995
 
2996
+ // src/commands/agentGuidance.ts
2997
+ var GUIDANCE_NOTE = "This is guidance, not authority (ADR-0071): it never grants permission for anything.";
2998
+ function more(omitted) {
2999
+ return omitted > 0 ? [chalk3.dim(` \u2026and ${omitted} more`)] : [];
3000
+ }
3001
+ function formatContext(ctx) {
3002
+ const lines = [];
3003
+ const scope = ctx.project ? `${ctx.workspace.name} / ${ctx.project.name}` : ctx.workspace.name;
3004
+ lines.push(chalk3.bold(`Agent context \u2014 ${scope}`));
3005
+ lines.push(chalk3.dim(GUIDANCE_NOTE));
3006
+ lines.push("");
3007
+ lines.push(chalk3.bold("Instructions"));
3008
+ if (ctx.instructions.length === 0) lines.push(chalk3.dim(" (none)"));
3009
+ for (const i of ctx.instructions) {
3010
+ lines.push(chalk3.cyan(` [${i.scope}]`));
3011
+ for (const l of i.text.split("\n")) lines.push(` ${l}`);
3012
+ }
3013
+ lines.push("");
3014
+ const decisions = ctx.decisions ?? { items: [], omitted: 0 };
3015
+ lines.push(chalk3.bold("Decisions"));
3016
+ if (decisions.items.length === 0 && decisions.omitted === 0) {
3017
+ lines.push(chalk3.dim(ctx.project ? " (none)" : " (none \u2014 pass --project to include decisions)"));
3018
+ }
3019
+ for (const d of decisions.items) {
3020
+ lines.push(` ${chalk3.yellow(d.label)} ${d.statement}`);
3021
+ lines.push(chalk3.dim(` ${d.url}`));
3022
+ }
3023
+ lines.push(...more(decisions.omitted));
3024
+ lines.push("");
3025
+ const adrs = ctx.adrs ?? { items: [], omitted: 0 };
3026
+ lines.push(chalk3.bold("ADRs"));
3027
+ if (adrs.items.length === 0 && adrs.omitted === 0) lines.push(chalk3.dim(" (none)"));
3028
+ for (const a of adrs.items) {
3029
+ lines.push(` ${chalk3.yellow(a.label ?? "ADR")} ${a.title}`);
3030
+ lines.push(chalk3.dim(` ${a.url}`));
3031
+ }
3032
+ lines.push(...more(adrs.omitted));
3033
+ lines.push("");
3034
+ lines.push(chalk3.dim(`revision ${ctx.revision}`));
3035
+ return lines.join("\n");
3036
+ }
3037
+ function formatMethod(method) {
3038
+ const lines = [];
3039
+ lines.push(chalk3.bold(`Method ${method.version}`) + chalk3.dim(` (${method.status})`));
3040
+ lines.push(chalk3.dim(GUIDANCE_NOTE));
3041
+ for (const doc of method.documents) {
3042
+ lines.push("");
3043
+ lines.push(chalk3.bold.cyan(`# ${doc.title}`));
3044
+ lines.push(doc.markdown);
3045
+ }
3046
+ lines.push("");
3047
+ lines.push(chalk3.dim(method.contentHash));
3048
+ return lines.join("\n");
3049
+ }
3050
+ function createContextCommand() {
3051
+ return new Command("context").description(
3052
+ `Show the AI instructions, decisions and ADRs agents get for a workspace (and project). ${GUIDANCE_NOTE}`
3053
+ ).option("-w, --workspace <slug>", "Workspace slug or id (defaults to the configured workspace)").option("-p, --project <id>", "Project id, to include project instructions and decisions").action(async (options, cmd) => {
3054
+ const globalOpts = cmd.optsWithGlobals();
3055
+ try {
3056
+ const client = getClient();
3057
+ const workspaceId = await resolveWorkspaceId(client, options.workspace);
3058
+ const ctx = await client.agentGuidance.context({ workspaceId, projectId: options.project });
3059
+ if (shouldUseJson(globalOpts.json, globalOpts.pretty)) {
3060
+ console.log(JSON.stringify(ctx, null, 2));
3061
+ } else {
3062
+ console.log(formatContext(ctx));
3063
+ }
3064
+ } catch (error) {
3065
+ handleError(error);
3066
+ }
3067
+ });
3068
+ }
3069
+ function createMethodCommand() {
3070
+ return new Command("method").description(`Show the current published method agents follow. ${GUIDANCE_NOTE}`).option("-w, --workspace <slug>", "Workspace slug or id (lets preview workspaces see a draft)").action(async (options, cmd) => {
3071
+ const globalOpts = cmd.optsWithGlobals();
3072
+ try {
3073
+ const client = getClient();
3074
+ const workspaceId = options.workspace ? await resolveWorkspaceId(client, options.workspace) : void 0;
3075
+ const method = await client.agentGuidance.method({ workspaceId });
3076
+ if (shouldUseJson(globalOpts.json, globalOpts.pretty)) {
3077
+ console.log(JSON.stringify(method, null, 2));
3078
+ } else {
3079
+ console.log(formatMethod(method));
3080
+ }
3081
+ } catch (error) {
3082
+ handleError(error);
3083
+ }
3084
+ });
3085
+ }
3086
+
3087
+ // src/program.ts
3088
+ import { Command as Command31 } from "commander";
3089
+
3090
+ // src/commands/auth.ts
3091
+ import { Command as Command2 } from "commander";
3092
+ import chalk4 from "chalk";
3093
+ function createAuthCommand() {
3094
+ const auth = new Command2("auth").description("Authentication commands");
3095
+ auth.command("login").description("Configure CLI with your API token").requiredOption("--token <token>", "JWT token from /settings/api-keys").requiredOption("--api-url <url>", "API URL (e.g., https://www.exponential.im)").action(async (options) => {
3096
+ try {
3097
+ let apiUrl = options.apiUrl.replace(/\/+$/, "");
3098
+ if (!apiUrl.startsWith("http://localhost") && !apiUrl.startsWith("https://")) {
3099
+ apiUrl = `https://${apiUrl}`;
3100
+ }
3101
+ setConfig({
3102
+ token: options.token,
3103
+ apiUrl
3104
+ });
3105
+ resetClient();
3106
+ console.log(chalk4.gray("Validating token..."));
3107
+ const client = getClient();
3108
+ await client.workspaces.list();
3109
+ console.log(chalk4.green("Successfully authenticated!"));
3110
+ console.log(chalk4.gray(`Config saved to: ${getConfigPath()}`));
3111
+ } catch (error) {
3112
+ clearConfig();
3113
+ handleError(error);
3114
+ }
3115
+ });
3116
+ auth.command("logout").description("Remove stored credentials").action(() => {
3117
+ clearConfig();
3118
+ resetClient();
3119
+ console.log(chalk4.green("Successfully logged out."));
3120
+ console.log(chalk4.gray(`Config cleared from: ${getConfigPath()}`));
3121
+ });
3122
+ auth.command("whoami").description("Show which account the stored token signs in as, and whether it is an agent").option("--json", "Output as JSON").action(async (options) => {
3123
+ if (!isAuthenticated()) {
3124
+ if (options.json) {
3125
+ console.log(JSON.stringify({ error: { code: "UNAUTHENTICATED", message: "Not authenticated" } }, null, 2));
3126
+ } else {
3127
+ console.log(chalk4.yellow("Not authenticated."));
3128
+ console.log(chalk4.gray("Run: exponential auth login --token <jwt> --api-url <url>"));
3129
+ }
3130
+ process.exit(1);
3131
+ }
3132
+ try {
3133
+ const config = getConfig();
3134
+ const client = getClient();
3135
+ const [me, workspaces] = await Promise.all([
3136
+ client.users.me(),
3137
+ client.workspaces.list()
3138
+ ]);
3139
+ const workspaceCount = workspaces.length;
3140
+ if (options.json) {
3141
+ console.log(JSON.stringify({
3142
+ id: me.id,
3143
+ name: me.name,
3144
+ email: me.email,
3145
+ isAgent: me.isAgent,
3146
+ agent: me.agent,
3147
+ apiUrl: config.apiUrl,
3148
+ workspaces: workspaceCount,
3149
+ configPath: getConfigPath()
3150
+ }, null, 2));
3151
+ return;
3152
+ }
3153
+ console.log(chalk4.green("Authenticated"));
3154
+ console.log(`Account: ${chalk4.bold(me.name ?? "(unnamed)")} ${chalk4.gray(`(${me.id})`)}`);
3155
+ if (me.email) {
3156
+ console.log(chalk4.gray(`Email: ${me.email}`));
3157
+ }
3158
+ if (me.isAgent) {
3159
+ const owner = me.agent?.owner.name ?? me.agent?.owner.id ?? "unknown";
3160
+ console.log(`Type: ${chalk4.cyan("External agent")} ${chalk4.gray(`owned by ${owner}`)}`);
3161
+ console.log(chalk4.gray("To give this agent a restricted project, add this account on the project's Members tab."));
3162
+ } else {
3163
+ console.log(`Type: ${chalk4.cyan("Person")}`);
3164
+ }
3165
+ console.log(chalk4.gray(`API URL: ${config.apiUrl}`));
3166
+ console.log(chalk4.gray(`Workspaces: ${workspaceCount}`));
3167
+ console.log(chalk4.gray(`Config: ${getConfigPath()}`));
3168
+ } catch (error) {
3169
+ handleError(error, options.json);
3170
+ }
3171
+ });
3172
+ auth.command("show").description(
3173
+ "Print parts of the current credentials. Use --token to print the raw JWT (for piping into other tools, e.g. `gh secret set EXPONENTIAL_TOKEN < <(exponential auth show --token)`)."
3174
+ ).option("--token", "Print the raw JWT to stdout with no trailing newline").action((options) => {
3175
+ const config = getConfig();
3176
+ if (options.token) {
3177
+ if (!config.token) {
3178
+ console.error("Not authenticated. Run `exponential auth login` first.");
3179
+ process.exit(1);
3180
+ }
3181
+ process.stdout.write(config.token);
3182
+ return;
3183
+ }
3184
+ console.log(chalk4.bold("\nCredentials"));
3185
+ console.log(chalk4.gray("\u2500".repeat(40)));
3186
+ console.log(`API URL: ${config.apiUrl || chalk4.gray("(not set)")}`);
3187
+ console.log(
3188
+ `Token: ${config.token ? chalk4.gray(`${config.token.substring(0, 20)}...`) : chalk4.gray("(not set)")}`
3189
+ );
3190
+ console.log(
3191
+ chalk4.gray("Use `exponential auth show --token` to print the raw JWT.")
3192
+ );
3193
+ console.log();
3194
+ });
3195
+ auth.command("status").description("Show detailed authentication status").action(() => {
3196
+ const config = getConfig();
3197
+ console.log(chalk4.bold("\nAuthentication Status"));
3198
+ console.log(chalk4.gray("\u2500".repeat(40)));
3199
+ console.log(`Authenticated: ${isAuthenticated() ? chalk4.green("Yes") : chalk4.red("No")}`);
3200
+ console.log(`API URL: ${config.apiUrl || chalk4.gray("(not set)")}`);
3201
+ console.log(`Token: ${config.token ? chalk4.gray(`${config.token.substring(0, 20)}...`) : chalk4.gray("(not set)")}`);
3202
+ console.log(`Config Path: ${getConfigPath()}`);
3203
+ console.log();
3204
+ });
3205
+ return auth;
3206
+ }
3207
+
3083
3208
  // src/commands/actions.ts
3209
+ import { Command as Command3 } from "commander";
3084
3210
  var VALID_PRIORITIES = [
3085
3211
  "Quick",
3086
3212
  "Scheduled",
@@ -3111,7 +3237,7 @@ function parseIds(raw) {
3111
3237
  return ids;
3112
3238
  }
3113
3239
  function createActionsCommand() {
3114
- const actions = new Command2("actions").description("Manage actions/tasks");
3240
+ const actions = new Command3("actions").description("Manage actions/tasks");
3115
3241
  actions.command("list").description("List all actions").option("--project <id>", "Filter by project ID").option("--status <status>", "Filter by kanban status (BACKLOG, TODO, IN_PROGRESS, IN_REVIEW, DONE)").option("--assignee <id>", "Filter by assignee ID").action(async (options, cmd) => {
3116
3242
  const globalOpts = cmd.optsWithGlobals();
3117
3243
  const useJson = shouldUseJson(globalOpts.json, globalOpts.pretty);
@@ -3360,7 +3486,7 @@ function createActionsCommand() {
3360
3486
  }
3361
3487
  }
3362
3488
  );
3363
- const comment = new Command2("comment").description("Manage comments on an action");
3489
+ const comment = new Command3("comment").description("Manage comments on an action");
3364
3490
  comment.command("list").description("List comments on an action").requiredOption("--id <id>", "Action ID").action(async (options, cmd) => {
3365
3491
  const globalOpts = cmd.optsWithGlobals();
3366
3492
  const useJson = shouldUseJson(globalOpts.json, globalOpts.pretty);
@@ -3431,7 +3557,7 @@ function createActionsCommand() {
3431
3557
  }
3432
3558
 
3433
3559
  // src/commands/contacts.ts
3434
- import { Command as Command3 } from "commander";
3560
+ import { Command as Command4 } from "commander";
3435
3561
  var VALID_INTERACTION_TYPES = [
3436
3562
  "EMAIL",
3437
3563
  "TELEGRAM",
@@ -3443,7 +3569,7 @@ var VALID_INTERACTION_TYPES = [
3443
3569
  ];
3444
3570
  var VALID_INTERACTION_DIRECTIONS = ["INBOUND", "OUTBOUND"];
3445
3571
  function createContactsCommand() {
3446
- const contacts = new Command3("contacts").description("Manage CRM contacts");
3572
+ const contacts = new Command4("contacts").description("Manage CRM contacts");
3447
3573
  contacts.command("list").description("List contacts").requiredOption("--workspace <id>", "Workspace ID").option("--search <query>", "Search by name or email").option("--tags <tags>", "Filter by tags (comma-separated)").option("--organization <id>", "Filter by organization ID").option("--limit <n>", "Max results to return", parseInt).option("--cursor <cursor>", "Pagination cursor").action(async (options, cmd) => {
3448
3574
  const globalOpts = cmd.optsWithGlobals();
3449
3575
  const useJson = shouldUseJson(globalOpts.json, globalOpts.pretty);
@@ -3620,8 +3746,8 @@ function createContactsCommand() {
3620
3746
  }
3621
3747
 
3622
3748
  // src/commands/ceremonies.ts
3623
- import { Command as Command4 } from "commander";
3624
- import chalk4 from "chalk";
3749
+ import { Command as Command5 } from "commander";
3750
+ import chalk5 from "chalk";
3625
3751
 
3626
3752
  // src/utils/input.ts
3627
3753
  import { readFileSync } from "fs";
@@ -3801,7 +3927,7 @@ function parseDateTime(value, flag) {
3801
3927
  return date;
3802
3928
  }
3803
3929
  function createOccurrencesCommand() {
3804
- const occurrences = new Command4("occurrences").alias("occurrence").description(
3930
+ const occurrences = new Command5("occurrences").alias("occurrence").description(
3805
3931
  [
3806
3932
  "Scheduled instances of a ceremony \u2014 the page at /w/<slug>/ceremonies/<ceremonyId>/<occurrenceId>.",
3807
3933
  "Every <occurrence> argument takes the occurrence CUID or that full URL (the URL brings its own workspace)."
@@ -4004,7 +4130,7 @@ function createOccurrencesCommand() {
4004
4130
  `\u2713 Agenda generated: ${result.itemCount} item${result.itemCount === 1 ? "" : "s"}${result.circulated ? ", circulated" : ""}`
4005
4131
  );
4006
4132
  if (options.circulate && !result.circulated) {
4007
- console.log(chalk4.yellow(" Not circulated: this occurrence is skipped."));
4133
+ console.log(chalk5.yellow(" Not circulated: this occurrence is skipped."));
4008
4134
  }
4009
4135
  outputAgendaPretty(result.agenda);
4010
4136
  }
@@ -4085,7 +4211,7 @@ function createOccurrencesCommand() {
4085
4211
  handleError(error, useJson);
4086
4212
  }
4087
4213
  });
4088
- const agenda = new Command4("agenda").description("Edit an occurrence's agenda by hand");
4214
+ const agenda = new Command5("agenda").description("Edit an occurrence's agenda by hand");
4089
4215
  agenda.command("add <occurrence>").description("Add an item to an agenda section; kept across regeneration").requiredOption("--section <key>", "The section key (see `occurrences get`)").requiredOption("--title <text>", "Item title (max 300 chars)").option("--detail <text>", "One line of detail (max 500 chars)").option("--workspace <slug|id>", "Workspace (not needed when you pass the URL)").action(
4090
4216
  async (value, options, cmd) => {
4091
4217
  const globalOpts = cmd.optsWithGlobals();
@@ -4161,7 +4287,7 @@ function createOccurrencesCommand() {
4161
4287
  return occurrences;
4162
4288
  }
4163
4289
  function createCeremoniesCommand() {
4164
- const ceremonies = new Command4("ceremonies").description(
4290
+ const ceremonies = new Command5("ceremonies").description(
4165
4291
  [
4166
4292
  "Recurring meeting definitions (Settings \u2192 Ceremonies) and their scheduled occurrences.",
4167
4293
  "",
@@ -4326,7 +4452,7 @@ function createCeremoniesCommand() {
4326
4452
  `\u2713 ${r.slug} ${r.action} (${r.occurrencesCreated} occurrence${r.occurrencesCreated === 1 ? "" : "s"} scheduled)`
4327
4453
  );
4328
4454
  if (r.unresolved.length > 0) {
4329
- console.log(chalk4.yellow(` Unresolved people: ${r.unresolved.join(", ")}`));
4455
+ console.log(chalk5.yellow(` Unresolved people: ${r.unresolved.join(", ")}`));
4330
4456
  }
4331
4457
  }
4332
4458
  }
@@ -4350,20 +4476,20 @@ function createCeremoniesCommand() {
4350
4476
  console.log(JSON.stringify(result, null, 2));
4351
4477
  } else {
4352
4478
  console.log(
4353
- chalk4.bold(
4479
+ chalk5.bold(
4354
4480
  `
4355
4481
  ${result.dryRun ? "Dry run" : "Applied"}: ${result.matched} of ${result.scanned} meetings matched`
4356
4482
  )
4357
4483
  );
4358
4484
  if (result.occurrencesCreated > 0) {
4359
- console.log(chalk4.gray(` Scheduled ${result.occurrencesCreated} missing occurrences (this happens even on a dry run).`));
4485
+ console.log(chalk5.gray(` Scheduled ${result.occurrencesCreated} missing occurrences (this happens even on a dry run).`));
4360
4486
  }
4361
4487
  for (const row of result.rows) {
4362
- const target = row.occurrenceId ? chalk4.green(`\u2192 ${row.ceremonyName} ${row.scheduledStart ? new Date(row.scheduledStart).toLocaleString() : ""}`) : chalk4.gray(`\u2014 ${row.reason}`);
4488
+ const target = row.occurrenceId ? chalk5.green(`\u2192 ${row.ceremonyName} ${row.scheduledStart ? new Date(row.scheduledStart).toLocaleString() : ""}`) : chalk5.gray(`\u2014 ${row.reason}`);
4363
4489
  console.log(` ${row.title ?? row.meetingId} ${target}`);
4364
4490
  }
4365
4491
  if (result.dryRun && result.matched > 0) {
4366
- console.log(chalk4.gray("\nRe-run with --apply to write these attachments."));
4492
+ console.log(chalk5.gray("\nRe-run with --apply to write these attachments."));
4367
4493
  }
4368
4494
  }
4369
4495
  } catch (error) {
@@ -4386,12 +4512,12 @@ ${result.dryRun ? "Dry run" : "Applied"}: ${result.matched} of ${result.scanned}
4386
4512
  if (useJson) {
4387
4513
  console.log(JSON.stringify({ match }, null, 2));
4388
4514
  } else if (!match) {
4389
- console.log(chalk4.gray("No ceremony meets in this room (or several do and none is on now)."));
4515
+ console.log(chalk5.gray("No ceremony meets in this room (or several do and none is on now)."));
4390
4516
  } else {
4391
- console.log(`${chalk4.bold(match.ceremony.name)} ${chalk4.gray(`in ${match.workspace.name} \xB7 ${match.ceremony.id}`)}`);
4392
- if (match.project) console.log(` ${chalk4.gray("Project:")} ${match.project.name}`);
4517
+ console.log(`${chalk5.bold(match.ceremony.name)} ${chalk5.gray(`in ${match.workspace.name} \xB7 ${match.ceremony.id}`)}`);
4518
+ if (match.project) console.log(` ${chalk5.gray("Project:")} ${match.project.name}`);
4393
4519
  console.log(
4394
- match.occurrence ? ` ${chalk4.gray("Occurrence:")} ${new Date(match.occurrence.scheduledStart).toLocaleString()} ${chalk4.gray(match.occurrence.id)}` : chalk4.gray(" No occurrence on at that time.")
4520
+ match.occurrence ? ` ${chalk5.gray("Occurrence:")} ${new Date(match.occurrence.scheduledStart).toLocaleString()} ${chalk5.gray(match.occurrence.id)}` : chalk5.gray(" No occurrence on at that time.")
4395
4521
  );
4396
4522
  }
4397
4523
  } catch (error) {
@@ -4403,8 +4529,8 @@ ${result.dryRun ? "Dry run" : "Applied"}: ${result.matched} of ${result.scanned}
4403
4529
  }
4404
4530
 
4405
4531
  // src/commands/databases.ts
4406
- import { Command as Command5 } from "commander";
4407
- import chalk5 from "chalk";
4532
+ import { Command as Command6 } from "commander";
4533
+ import chalk6 from "chalk";
4408
4534
  var ADDABLE_TYPES = [
4409
4535
  "text",
4410
4536
  "number",
@@ -4535,7 +4661,7 @@ function buildListView(database, filters, sort) {
4535
4661
  };
4536
4662
  }
4537
4663
  function createDatabasesCommand() {
4538
- const databases = new Command5("databases").description(
4664
+ const databases = new Command6("databases").description(
4539
4665
  'Databases: typed tables inside pages. A database is a block in a page body, owned by that page; each row is a page of its own (read it with "pages get <rowId>"). Writes are typed per property \u2014 a bad value is refused naming the property. Not a work tracker: use tickets, actions and projects for work.'
4540
4666
  );
4541
4667
  databases.command("create").description(
@@ -4567,7 +4693,7 @@ ${database.marker}` : database.marker,
4567
4693
  \u2713 Database created${placed ? ` and placed in "${database.page.title}"` : ""}`);
4568
4694
  outputDatabasePretty(database);
4569
4695
  if (!placed && database.marker) {
4570
- console.log(chalk5.gray(` Put this line in the page body to show it: ${database.marker}
4696
+ console.log(chalk6.gray(` Put this line in the page body to show it: ${database.marker}
4571
4697
  `));
4572
4698
  }
4573
4699
  }
@@ -4634,7 +4760,7 @@ ${database.marker}` : database.marker,
4634
4760
  return databases;
4635
4761
  }
4636
4762
  function createPropertiesCommand() {
4637
- const properties = new Command5("properties").description(
4763
+ const properties = new Command6("properties").description(
4638
4764
  "The schema: add, rename, retype, re-option, remove or reorder properties. Ids are stable \u2014 renaming never rewrites a row. A property is named by id or by name."
4639
4765
  );
4640
4766
  properties.command("add <databaseId>").description(`Add a property. Types: ${ADDABLE_TYPES.join(", ")} (title exists from creation; relation arrives with V3).`).requiredOption("--name <name>", "Property name").requiredOption("--type <type>", "Property type").option("--options <list>", 'select/multiSelect options, comma-separated; "Name:color" picks a palette colour').option("--description <text>", "What the property means").action(
@@ -4720,7 +4846,7 @@ function createPropertiesCommand() {
4720
4846
  return properties;
4721
4847
  }
4722
4848
  function createRowsCommand() {
4723
- const rows = new Command5("rows").description(
4849
+ const rows = new Command6("rows").description(
4724
4850
  `Rows: each is a page of the database. Write values with repeatable --set Property=value; read a row's body and history with "pages get <rowId>" / "pages history <rowId>".`
4725
4851
  );
4726
4852
  rows.command("list <databaseId>").description(
@@ -4832,8 +4958,8 @@ function createRowsCommand() {
4832
4958
  }
4833
4959
 
4834
4960
  // src/commands/decisions.ts
4835
- import { Command as Command6 } from "commander";
4836
- import chalk6 from "chalk";
4961
+ import { Command as Command7 } from "commander";
4962
+ import chalk7 from "chalk";
4837
4963
  var STATUSES = [
4838
4964
  "OPEN",
4839
4965
  "PROPOSED",
@@ -5081,7 +5207,7 @@ function addConfirmCommand(parent) {
5081
5207
  );
5082
5208
  }
5083
5209
  function createDecisionsCommand() {
5084
- const decisions = new Command6("decisions").description(
5210
+ const decisions = new Command7("decisions").description(
5085
5211
  [
5086
5212
  "Log and manage decisions and open questions (the workspace Decision Log).",
5087
5213
  "",
@@ -5136,7 +5262,7 @@ function createDecisionsCommand() {
5136
5262
  outputDecisionsPretty(rows2);
5137
5263
  if (!result.canLogDecision) {
5138
5264
  console.log(
5139
- chalk6.yellow(
5265
+ chalk7.yellow(
5140
5266
  "You cannot log decisions on this meeting (no edit access, or it has no workspace)."
5141
5267
  )
5142
5268
  );
@@ -5343,7 +5469,7 @@ function createDecisionsCommand() {
5343
5469
  \u2713 ${decision.status === "OPEN" ? "Open question" : "Decision"} logged`
5344
5470
  );
5345
5471
  outputDecisionPretty(decision);
5346
- if (featureLink) console.log(chalk6.gray(` Linked to feature ${options.feature}`));
5472
+ if (featureLink) console.log(chalk7.gray(` Linked to feature ${options.feature}`));
5347
5473
  }
5348
5474
  } catch (error) {
5349
5475
  handleError(error, useJson);
@@ -5452,9 +5578,9 @@ function createDecisionsCommand() {
5452
5578
  const link = options.ticket ? await client.decisions.linkTicket(workspaceId, decisionId, options.ticket) : await client.decisions.linkFeature(workspaceId, decisionId, options.feature);
5453
5579
  if (useJson) console.log(JSON.stringify(link, null, 2));
5454
5580
  else {
5455
- console.log(`\u2713 Linked ${chalk6.gray(`(link id ${link.id})`)}`);
5581
+ console.log(`\u2713 Linked ${chalk7.gray(`(link id ${link.id})`)}`);
5456
5582
  console.log(
5457
- chalk6.gray(" Remove it with: exponential decisions unlink --link " + link.id)
5583
+ chalk7.gray(" Remove it with: exponential decisions unlink --link " + link.id)
5458
5584
  );
5459
5585
  }
5460
5586
  } catch (error) {
@@ -5477,7 +5603,7 @@ function createDecisionsCommand() {
5477
5603
  handleError(error, useJson);
5478
5604
  }
5479
5605
  });
5480
- const drafts = new Command6("draft").description(
5606
+ const drafts = new Command7("draft").description(
5481
5607
  "Review decisions an agent proposed but nobody has confirmed yet (visible only on their source meeting)"
5482
5608
  );
5483
5609
  drafts.command("extract").description(
@@ -5492,22 +5618,22 @@ function createDecisionsCommand() {
5492
5618
  else {
5493
5619
  if (result.alreadyPublished) {
5494
5620
  console.log(
5495
- chalk6.gray("This meeting already has confirmed decisions \u2014 nothing was extracted.")
5621
+ chalk7.gray("This meeting already has confirmed decisions \u2014 nothing was extracted.")
5496
5622
  );
5497
5623
  } else if (result.alreadyDrafted) {
5498
- console.log(chalk6.gray("Returning the drafts this meeting already had."));
5624
+ console.log(chalk7.gray("Returning the drafts this meeting already had."));
5499
5625
  }
5500
5626
  console.log(
5501
5627
  `\u2713 ${result.draftCount} draft${result.draftCount === 1 ? "" : "s"} awaiting review (${result.draftsCreated} new)`
5502
5628
  );
5503
5629
  if (result.discardedWithoutEvidence > 0) {
5504
5630
  console.log(
5505
- chalk6.gray(
5631
+ chalk7.gray(
5506
5632
  ` ${result.discardedWithoutEvidence} candidate(s) dropped \u2014 no transcript turn supported them.`
5507
5633
  )
5508
5634
  );
5509
5635
  }
5510
- for (const message of result.errors) console.log(chalk6.yellow(` ${message}`));
5636
+ for (const message of result.errors) console.log(chalk7.yellow(` ${message}`));
5511
5637
  }
5512
5638
  } catch (error) {
5513
5639
  handleError(error, useJson);
@@ -5564,9 +5690,9 @@ function createDecisionsCommand() {
5564
5690
  }
5565
5691
 
5566
5692
  // src/commands/deals.ts
5567
- import { Command as Command7 } from "commander";
5693
+ import { Command as Command8 } from "commander";
5568
5694
  function createDealsCommand() {
5569
- const deals = new Command7("deals").description("Manage pipeline deals");
5695
+ const deals = new Command8("deals").description("Manage pipeline deals");
5570
5696
  deals.command("pipeline").description("Get pipeline overview with stages").requiredOption("--workspace <id>", "Workspace ID").action(async (options, cmd) => {
5571
5697
  const globalOpts = cmd.optsWithGlobals();
5572
5698
  const useJson = shouldUseJson(globalOpts.json, globalOpts.pretty);
@@ -5751,7 +5877,7 @@ function createDealsCommand() {
5751
5877
  }
5752
5878
 
5753
5879
  // src/commands/epics.ts
5754
- import { Command as Command8 } from "commander";
5880
+ import { Command as Command9 } from "commander";
5755
5881
  var EPIC_STATUSES = ["OPEN", "IN_PROGRESS", "DONE", "CANCELLED"];
5756
5882
  var EPIC_PRIORITIES = ["HIGH", "MEDIUM", "LOW", "NONE"];
5757
5883
  function validateEpicStatus(value) {
@@ -5779,7 +5905,7 @@ function parseDate2(value) {
5779
5905
  return d;
5780
5906
  }
5781
5907
  function createEpicsCommand() {
5782
- const epics = new Command8("epics").description(
5908
+ const epics = new Command9("epics").description(
5783
5909
  "Manage epics. Epics are workspace-scoped and group actions and tickets across products."
5784
5910
  );
5785
5911
  epics.command("list").description("List epics in a workspace").option("--workspace <slug|id>", "Workspace slug or CUID").option("--status <status>", `Filter by status: ${EPIC_STATUSES.join(", ")}`).action(
@@ -5896,10 +6022,10 @@ function createEpicsCommand() {
5896
6022
  }
5897
6023
 
5898
6024
  // src/commands/features.ts
5899
- import { Command as Command14 } from "commander";
6025
+ import { Command as Command15 } from "commander";
5900
6026
 
5901
6027
  // src/commands/stories.ts
5902
- import { Command as Command9 } from "commander";
6028
+ import { Command as Command10 } from "commander";
5903
6029
  async function readStdin() {
5904
6030
  const chunks = [];
5905
6031
  for await (const chunk of process.stdin) {
@@ -5908,7 +6034,7 @@ async function readStdin() {
5908
6034
  return Buffer.concat(chunks).toString("utf-8");
5909
6035
  }
5910
6036
  function createStoriesCommand() {
5911
- const stories = new Command9("stories").description(
6037
+ const stories = new Command10("stories").description(
5912
6038
  "Manage a feature's native, structured user stories (As a / I want / So that)."
5913
6039
  );
5914
6040
  stories.command("add").description(
@@ -6042,7 +6168,7 @@ function createStoriesCommand() {
6042
6168
  }
6043
6169
 
6044
6170
  // src/commands/scopes.ts
6045
- import { Command as Command10 } from "commander";
6171
+ import { Command as Command11 } from "commander";
6046
6172
  var SCOPE_STATUSES = [
6047
6173
  "PLANNED",
6048
6174
  "IN_PROGRESS",
@@ -6059,7 +6185,7 @@ function validateScopeStatus(value) {
6059
6185
  return value;
6060
6186
  }
6061
6187
  function createScopesCommand() {
6062
- const scopes = new Command10("scopes").description(
6188
+ const scopes = new Command11("scopes").description(
6063
6189
  `Manage a feature's scopes: shippable increments ("V1", "V2"), each with its own lifecycle.`
6064
6190
  );
6065
6191
  scopes.command("list").description("List a feature's scopes").requiredOption("--feature <id>", "Feature CUID").action(
@@ -6138,7 +6264,7 @@ function createScopesCommand() {
6138
6264
  }
6139
6265
 
6140
6266
  // src/commands/requirements.ts
6141
- import { Command as Command11 } from "commander";
6267
+ import { Command as Command12 } from "commander";
6142
6268
  var REQUIREMENT_KINDS = [
6143
6269
  "FUNCTIONAL",
6144
6270
  "NON_FUNCTIONAL",
@@ -6161,7 +6287,7 @@ async function readStdin2() {
6161
6287
  return Buffer.concat(chunks).toString("utf-8");
6162
6288
  }
6163
6289
  function createRequirementsCommand() {
6164
- const requirements = new Command11("requirements").description(
6290
+ const requirements = new Command12("requirements").description(
6165
6291
  `Manage a feature's requirements: atomic, testable EARS-style "shall" statements, checkable met/unmet.`
6166
6292
  );
6167
6293
  requirements.command("add").description(
@@ -6292,25 +6418,25 @@ function createRequirementsCommand() {
6292
6418
  }
6293
6419
 
6294
6420
  // src/commands/areas.ts
6295
- import { Command as Command12 } from "commander";
6296
- import chalk7 from "chalk";
6421
+ import { Command as Command13 } from "commander";
6422
+ import chalk8 from "chalk";
6297
6423
  function outputAreasPretty(areas) {
6298
6424
  if (areas.length === 0) {
6299
- console.log(chalk7.gray("No areas found."));
6425
+ console.log(chalk8.gray("No areas found."));
6300
6426
  return;
6301
6427
  }
6302
- console.log(chalk7.bold(`
6428
+ console.log(chalk8.bold(`
6303
6429
  Areas (${areas.length} total)`));
6304
- console.log(chalk7.gray("\u2500".repeat(50)));
6430
+ console.log(chalk8.gray("\u2500".repeat(50)));
6305
6431
  for (const a of areas) {
6306
- const count = a._count?.features != null ? chalk7.gray(` (${a._count.features} features)`) : "";
6307
- console.log(` ${chalk7.bold(a.name)}${count}`);
6308
- console.log(chalk7.gray(` ID: ${a.id}`));
6432
+ const count = a._count?.features != null ? chalk8.gray(` (${a._count.features} features)`) : "";
6433
+ console.log(` ${chalk8.bold(a.name)}${count}`);
6434
+ console.log(chalk8.gray(` ID: ${a.id}`));
6309
6435
  }
6310
6436
  console.log();
6311
6437
  }
6312
6438
  function createAreasCommand() {
6313
- const areas = new Command12("areas").description(
6439
+ const areas = new Command13("areas").description(
6314
6440
  "Manage a product's areas: the buckets features are filed under (a feature has exactly one or none)."
6315
6441
  );
6316
6442
  areas.command("list").description("List a product's areas").requiredOption("--product <slug|id>", "Product slug or CUID").option("--workspace <slug|id>", "Workspace (required when --product is a slug)").action(
@@ -6354,7 +6480,7 @@ function createAreasCommand() {
6354
6480
  }
6355
6481
 
6356
6482
  // src/commands/featureComments.ts
6357
- import { Command as Command13 } from "commander";
6483
+ import { Command as Command14 } from "commander";
6358
6484
 
6359
6485
  // src/utils/mentions.ts
6360
6486
  function candidateLabels(member) {
@@ -6427,7 +6553,7 @@ function collectMention(value, previous) {
6427
6553
 
6428
6554
  // src/commands/featureComments.ts
6429
6555
  function createFeatureCommentsCommand() {
6430
- const comment = new Command13("comment").description(
6556
+ const comment = new Command14("comment").description(
6431
6557
  "Read and post comments on a feature. Mention teammates with --mention."
6432
6558
  );
6433
6559
  comment.command("list").description("List comments on a feature").requiredOption("--feature <id>", "Feature ID").action(async (options, cmd) => {
@@ -6628,7 +6754,7 @@ function validateFeatureStatus(value) {
6628
6754
  return value;
6629
6755
  }
6630
6756
  function createFeaturesCommand() {
6631
- const features = new Command14("features").description(
6757
+ const features = new Command15("features").description(
6632
6758
  "Manage features. A feature lives under a product and groups user stories, scopes, and tickets."
6633
6759
  );
6634
6760
  features.command("list").description("List features in a product").requiredOption("--product <slug|id>", "Product slug or CUID").option("--workspace <slug|id>", "Workspace (required when --product is a slug)").option("--status <status>", `Filter by status: ${FEATURE_STATUSES.join(", ")}`).action(
@@ -6885,8 +7011,8 @@ Aborted: ${reason}. Feature "${feature.name}" was NOT deleted.`);
6885
7011
  }
6886
7012
 
6887
7013
  // src/commands/labels.ts
6888
- import { Command as Command15 } from "commander";
6889
- import chalk8 from "chalk";
7014
+ import { Command as Command16 } from "commander";
7015
+ import chalk9 from "chalk";
6890
7016
  var TRIAGE_LABELS = [
6891
7017
  { slug: "needs-triage", name: "needs-triage", color: "avatar-orange" },
6892
7018
  { slug: "needs-info", name: "needs-info", color: "avatar-yellow" },
@@ -6900,22 +7026,22 @@ function looksLikeCuid(value) {
6900
7026
  }
6901
7027
  function outputTagsPretty(tags) {
6902
7028
  if (tags.length === 0) {
6903
- console.log(chalk8.dim("No labels found."));
7029
+ console.log(chalk9.dim("No labels found."));
6904
7030
  return;
6905
7031
  }
6906
7032
  console.log();
6907
7033
  for (const tag of tags) {
6908
- const scope = tag.workspaceId === null ? chalk8.cyan("global") : chalk8.magenta("workspace");
6909
- const category = tag.category === null ? chalk8.dim("(label)") : chalk8.dim(`(${tag.category})`);
7034
+ const scope = tag.workspaceId === null ? chalk9.cyan("global") : chalk9.magenta("workspace");
7035
+ const category = tag.category === null ? chalk9.dim("(label)") : chalk9.dim(`(${tag.category})`);
6910
7036
  console.log(
6911
- ` ${chalk8.bold(tag.slug)} ${tag.name} ${chalk8.gray(tag.color)} ${scope} ${category}`
7037
+ ` ${chalk9.bold(tag.slug)} ${tag.name} ${chalk9.gray(tag.color)} ${scope} ${category}`
6912
7038
  );
6913
7039
  }
6914
7040
  console.log();
6915
7041
  }
6916
7042
  function outputTagPretty(tag, prefix) {
6917
7043
  if (prefix) console.log(prefix);
6918
- console.log(` ${chalk8.bold(tag.slug)} ${tag.name} ${chalk8.gray(tag.color)}`);
7044
+ console.log(` ${chalk9.bold(tag.slug)} ${tag.name} ${chalk9.gray(tag.color)}`);
6919
7045
  }
6920
7046
  async function resolveLabelIds(client, workspaceId, values) {
6921
7047
  if (values.length === 0) return [];
@@ -6939,7 +7065,7 @@ async function resolveLabelIds(client, workspaceId, values) {
6939
7065
  return [...byId, ...resolvedFromSlugs];
6940
7066
  }
6941
7067
  function createLabelsCommand() {
6942
- const labels = new Command15("labels").description(
7068
+ const labels = new Command16("labels").description(
6943
7069
  "Manage labels (orthogonal tags applied to actions, tickets, features, and epics)."
6944
7070
  );
6945
7071
  labels.command("list").description("List labels visible in a workspace").option("--workspace <slug|id>", "Workspace slug or CUID").option(
@@ -6987,7 +7113,7 @@ function createLabelsCommand() {
6987
7113
  if (useJson) {
6988
7114
  console.log(JSON.stringify(tag, null, 2));
6989
7115
  } else {
6990
- outputTagPretty(tag, chalk8.green("\n\u2713 Label created"));
7116
+ outputTagPretty(tag, chalk9.green("\n\u2713 Label created"));
6991
7117
  }
6992
7118
  } catch (error) {
6993
7119
  handleError(error, useJson);
@@ -7025,10 +7151,10 @@ function createLabelsCommand() {
7025
7151
  console.log(JSON.stringify(results, null, 2));
7026
7152
  } else {
7027
7153
  console.log();
7028
- console.log(chalk8.bold("Triage labels:"));
7154
+ console.log(chalk9.bold("Triage labels:"));
7029
7155
  for (const r of results) {
7030
- const tag = chalk8.bold(r.slug);
7031
- const status = r.status === "created" ? chalk8.green("created") : chalk8.dim("existed");
7156
+ const tag = chalk9.bold(r.slug);
7157
+ const status = r.status === "created" ? chalk9.green("created") : chalk9.dim("existed");
7032
7158
  console.log(` ${tag} ${status}`);
7033
7159
  }
7034
7160
  console.log();
@@ -7042,10 +7168,10 @@ function createLabelsCommand() {
7042
7168
  }
7043
7169
 
7044
7170
  // src/commands/meetings.ts
7045
- import { Command as Command16 } from "commander";
7046
- import chalk9 from "chalk";
7171
+ import { Command as Command17 } from "commander";
7172
+ import chalk10 from "chalk";
7047
7173
  function createMeetingsCommand() {
7048
- const meetings = new Command16("meetings").description(
7174
+ const meetings = new Command17("meetings").description(
7049
7175
  "Manage meetings and their notes (recorded, imported, or manually created)"
7050
7176
  );
7051
7177
  meetings.command("list").description(
@@ -7206,7 +7332,7 @@ function createMeetingsCommand() {
7206
7332
  console.log(`\u2713 Deleted ${count} of ${ids.length} meeting${ids.length === 1 ? "" : "s"}`);
7207
7333
  if (skipped > 0) {
7208
7334
  console.log(
7209
- chalk9.yellow(
7335
+ chalk10.yellow(
7210
7336
  `${skipped} id(s) were skipped \u2014 not found, or not owned by you.`
7211
7337
  )
7212
7338
  );
@@ -7217,7 +7343,7 @@ function createMeetingsCommand() {
7217
7343
  }
7218
7344
  }
7219
7345
  );
7220
- const notes = new Command16("notes").description(
7346
+ const notes = new Command17("notes").description(
7221
7347
  "Read and write a meeting's notes"
7222
7348
  );
7223
7349
  notes.command("get <id>").description(
@@ -7233,7 +7359,7 @@ function createMeetingsCommand() {
7233
7359
  process.stdout.write(body.endsWith("\n") ? body : `${body}
7234
7360
  `);
7235
7361
  } else if (process.stdout.isTTY) {
7236
- console.log(chalk9.gray("No notes yet."));
7362
+ console.log(chalk10.gray("No notes yet."));
7237
7363
  }
7238
7364
  } catch (error) {
7239
7365
  handleError(error, shouldUseJson(globalOpts.json, globalOpts.pretty));
@@ -7282,7 +7408,7 @@ function createMeetingsCommand() {
7282
7408
  }
7283
7409
 
7284
7410
  // src/commands/organizations.ts
7285
- import { Command as Command17 } from "commander";
7411
+ import { Command as Command18 } from "commander";
7286
7412
  var VALID_SIZES = [
7287
7413
  "1-10",
7288
7414
  "11-50",
@@ -7292,7 +7418,7 @@ var VALID_SIZES = [
7292
7418
  "1000+"
7293
7419
  ];
7294
7420
  function createOrganizationsCommand() {
7295
- const organizations = new Command17("organizations").alias("orgs").description("Manage CRM organizations");
7421
+ const organizations = new Command18("organizations").alias("orgs").description("Manage CRM organizations");
7296
7422
  organizations.command("list").description("List organizations").requiredOption("--workspace <id>", "Workspace ID").option("--search <query>", "Search by name or description").option("--industry <industry>", "Filter by industry").option("--limit <n>", "Max results to return", parseInt).option("--cursor <cursor>", "Pagination cursor").action(async (options, cmd) => {
7297
7423
  const globalOpts = cmd.optsWithGlobals();
7298
7424
  const useJson = shouldUseJson(globalOpts.json, globalOpts.pretty);
@@ -7360,13 +7486,13 @@ function createOrganizationsCommand() {
7360
7486
  }
7361
7487
 
7362
7488
  // src/commands/pages.ts
7363
- import { Command as Command19 } from "commander";
7364
- import chalk10 from "chalk";
7489
+ import { Command as Command20 } from "commander";
7490
+ import chalk11 from "chalk";
7365
7491
 
7366
7492
  // src/commands/pageComments.ts
7367
- import { Command as Command18 } from "commander";
7493
+ import { Command as Command19 } from "commander";
7368
7494
  function createPageCommentsCommand() {
7369
- const comment = new Command18("comment").description(
7495
+ const comment = new Command19("comment").description(
7370
7496
  "Read and post comments on a page. Mention teammates with --mention."
7371
7497
  );
7372
7498
  comment.command("list").description("List comments on a page").requiredOption("--page <id>", "Page ID").action(async (options, cmd) => {
@@ -7469,7 +7595,7 @@ function parseLimit2(value) {
7469
7595
  return n;
7470
7596
  }
7471
7597
  function createPagesCommand() {
7472
- const pages = new Command19("pages").description(
7598
+ const pages = new Command20("pages").description(
7473
7599
  `Manage Knowledge pages (PRDs, research, technical specs). Reads are Markdown-only by default; every write is recorded in the page's history. Link one to a feature with "features link-page".`
7474
7600
  );
7475
7601
  pages.command("list").description("List pages in a workspace (metadata only, no bodies)").option("--workspace <slug|id>", "Workspace (defaults to the configured default)").option(
@@ -7618,13 +7744,13 @@ function createPagesCommand() {
7618
7744
  const revision = await client.pages.revision(id, revisionId);
7619
7745
  if (useJson) console.log(JSON.stringify(revision, null, 2));
7620
7746
  else {
7621
- console.log(chalk10.gray("\u2500".repeat(50)));
7747
+ console.log(chalk11.gray("\u2500".repeat(50)));
7622
7748
  console.log(
7623
7749
  `
7624
- ${chalk10.bold(revision.title)} ${chalk10.gray(`v${revision.docVersion} \xB7 ${revision.kind}`)}`
7750
+ ${chalk11.bold(revision.title)} ${chalk11.gray(`v${revision.docVersion} \xB7 ${revision.kind}`)}`
7625
7751
  );
7626
- console.log(chalk10.gray(` Revision: ${revision.id}`));
7627
- if (revision.note) console.log(` ${chalk10.gray("Note:")} ${revision.note}`);
7752
+ console.log(chalk11.gray(` Revision: ${revision.id}`));
7753
+ if (revision.note) console.log(` ${chalk11.gray("Note:")} ${revision.note}`);
7628
7754
  if (revision.body) console.log(`
7629
7755
  ${revision.body}
7630
7756
  `);
@@ -7696,8 +7822,8 @@ ${revision.body}
7696
7822
  }
7697
7823
 
7698
7824
  // src/commands/positions.ts
7699
- import { Command as Command20 } from "commander";
7700
- import chalk11 from "chalk";
7825
+ import { Command as Command21 } from "commander";
7826
+ import chalk12 from "chalk";
7701
7827
  var WORKSPACE_OPTION = ["--workspace <slug|id>", "Workspace (defaults to your default workspace)"];
7702
7828
  var HOLDER_OPTION_DESCRIPTION = "Holder: a workspace member by name, email, or user id (repeatable)";
7703
7829
  var HUMAN_ONLY_NOTE = "Writes need your own login (`exponential auth login`); agent keys are refused. Owners and admins can do everything; a member who holds a position may edit its remit.";
@@ -7718,16 +7844,16 @@ async function loadPosition(client, workspaceId, ref) {
7718
7844
  return pickPosition(positions, ref);
7719
7845
  }
7720
7846
  function holderLabel(holder) {
7721
- return `${holder.name ?? holder.userId}${holder.isAgent ? chalk11.gray(" (agent)") : ""}`;
7847
+ return `${holder.name ?? holder.userId}${holder.isAgent ? chalk12.gray(" (agent)") : ""}`;
7722
7848
  }
7723
7849
  function printPosition(position) {
7724
- console.log(`${chalk11.bold(position.title)} ${chalk11.gray(`(${position.id})`)}`);
7850
+ console.log(`${chalk12.bold(position.title)} ${chalk12.gray(`(${position.id})`)}`);
7725
7851
  console.log(
7726
- ` ${chalk11.gray("Held by:")} ${position.holders.length ? position.holders.map(holderLabel).join(", ") : chalk11.yellow("nobody")}`
7852
+ ` ${chalk12.gray("Held by:")} ${position.holders.length ? position.holders.map(holderLabel).join(", ") : chalk12.yellow("nobody")}`
7727
7853
  );
7728
- console.log(` ${chalk11.gray("Remit:")} ${position.remit.replace(/\n/g, "\n ")}`);
7854
+ console.log(` ${chalk12.gray("Remit:")} ${position.remit.replace(/\n/g, "\n ")}`);
7729
7855
  if (position.notAccountableFor) {
7730
- console.log(` ${chalk11.gray("Not accountable for:")} ${position.notAccountableFor.replace(/\n/g, "\n ")}`);
7856
+ console.log(` ${chalk12.gray("Not accountable for:")} ${position.notAccountableFor.replace(/\n/g, "\n ")}`);
7731
7857
  }
7732
7858
  console.log();
7733
7859
  }
@@ -7736,7 +7862,7 @@ function output(position, useJson, verb) {
7736
7862
  console.log(JSON.stringify(position, null, 2));
7737
7863
  return;
7738
7864
  }
7739
- console.log(chalk11.green(`${verb}:`));
7865
+ console.log(chalk12.green(`${verb}:`));
7740
7866
  printPosition(position);
7741
7867
  }
7742
7868
  function parseImportFile(raw, members) {
@@ -7770,7 +7896,7 @@ function parseImportFile(raw, members) {
7770
7896
  });
7771
7897
  }
7772
7898
  function createPositionsCommand() {
7773
- const positions = new Command20("positions").alias("roles").description(
7899
+ const positions = new Command21("positions").alias("roles").description(
7774
7900
  `A workspace's roles & responsibilities (Positions): what each role takes on, what it is not accountable for, and who holds it. Shown on the workspace settings page. ${HUMAN_ONLY_NOTE}`
7775
7901
  );
7776
7902
  positions.command("list").description("List positions with their holders").option(...WORKSPACE_OPTION).option("--gaps", "Also list members with no stated remit").action(async (options, cmd) => {
@@ -7785,9 +7911,9 @@ function createPositionsCommand() {
7785
7911
  return;
7786
7912
  }
7787
7913
  if (result.positions.length === 0) {
7788
- console.log(chalk11.gray("No positions yet. Add one with `exponential positions create`."));
7914
+ console.log(chalk12.gray("No positions yet. Add one with `exponential positions create`."));
7789
7915
  } else {
7790
- console.log(chalk11.bold(`
7916
+ console.log(chalk12.bold(`
7791
7917
  Positions (${result.positions.length})
7792
7918
  `));
7793
7919
  result.positions.forEach(printPosition);
@@ -7795,14 +7921,14 @@ Positions (${result.positions.length})
7795
7921
  if (options.gaps) {
7796
7922
  const gaps = result.members.filter((m) => m.remitGap);
7797
7923
  if (gaps.length === 0) {
7798
- console.log(chalk11.gray("Every member has a stated remit."));
7924
+ console.log(chalk12.gray("Every member has a stated remit."));
7799
7925
  } else {
7800
7926
  const roster = await client.workspaces.listMembers(workspaceId);
7801
7927
  const nameOf = (id) => {
7802
7928
  const member = roster.find((r) => r.id === id);
7803
7929
  return member?.name ?? member?.email ?? id;
7804
7930
  };
7805
- console.log(chalk11.bold(`No stated remit (${gaps.length}):`));
7931
+ console.log(chalk12.bold(`No stated remit (${gaps.length}):`));
7806
7932
  gaps.forEach((g) => console.log(` ${nameOf(g.userId)}`));
7807
7933
  }
7808
7934
  }
@@ -7888,7 +8014,7 @@ Positions (${result.positions.length})
7888
8014
  const position = await loadPosition(client, workspaceId, ref);
7889
8015
  await client.positions.delete(workspaceId, position.id);
7890
8016
  if (useJson) console.log(JSON.stringify({ id: position.id, title: position.title, deleted: true }, null, 2));
7891
- else console.log(chalk11.green(`Deleted "${position.title}"`));
8017
+ else console.log(chalk12.green(`Deleted "${position.title}"`));
7892
8018
  } catch (error) {
7893
8019
  handleError(error, useJson);
7894
8020
  }
@@ -7937,10 +8063,10 @@ Positions (${result.positions.length})
7937
8063
  return;
7938
8064
  }
7939
8065
  const nameOf = (id) => roster.find((r) => r.id === id)?.name ?? id;
7940
- console.log(chalk11.bold(result.written ? "\nImported:\n" : "\nDry run \u2014 nothing written:\n"));
8066
+ console.log(chalk12.bold(result.written ? "\nImported:\n" : "\nDry run \u2014 nothing written:\n"));
7941
8067
  for (const row of result.results) {
7942
- const tag = row.outcome === "create" ? chalk11.green("create") : chalk11.yellow("update");
7943
- console.log(` ${tag} ${chalk11.bold(row.title)} \u2014 ${row.holderUserIds.map(nameOf).join(", ") || "no holders"}`);
8068
+ const tag = row.outcome === "create" ? chalk12.green("create") : chalk12.yellow("update");
8069
+ console.log(` ${tag} ${chalk12.bold(row.title)} \u2014 ${row.holderUserIds.map(nameOf).join(", ") || "no holders"}`);
7944
8070
  }
7945
8071
  } catch (error) {
7946
8072
  handleError(error, useJson);
@@ -7950,9 +8076,9 @@ Positions (${result.positions.length})
7950
8076
  }
7951
8077
 
7952
8078
  // src/commands/products.ts
7953
- import { Command as Command21 } from "commander";
8079
+ import { Command as Command22 } from "commander";
7954
8080
  function createProductsCommand() {
7955
- const products = new Command21("products").description(
8081
+ const products = new Command22("products").description(
7956
8082
  "Manage products. A workspace contains products; a product holds features and tickets."
7957
8083
  );
7958
8084
  products.command("list").description("List products in a workspace").option("--workspace <slug|id>", "Workspace slug or CUID (defaults to configured workspace)").action(async (options, cmd) => {
@@ -8093,7 +8219,7 @@ Re-run with --force to delete it anyway.`
8093
8219
  }
8094
8220
 
8095
8221
  // src/commands/projects.ts
8096
- import { Command as Command22 } from "commander";
8222
+ import { Command as Command23 } from "commander";
8097
8223
  var PROJECT_STATUSES = [
8098
8224
  "ACTIVE",
8099
8225
  "ON_HOLD",
@@ -8120,7 +8246,7 @@ function validateProjectPriority(value) {
8120
8246
  return value;
8121
8247
  }
8122
8248
  function createProjectsCommand() {
8123
- const projects = new Command22("projects").description("Manage projects");
8249
+ const projects = new Command23("projects").description("Manage projects");
8124
8250
  projects.command("list").description("List all projects").option("--workspace <slug|id>", "Workspace slug or CUID").option("--include-actions", "Include actions in output").action(async (options, cmd) => {
8125
8251
  const globalOpts = cmd.optsWithGlobals();
8126
8252
  const useJson = shouldUseJson(globalOpts.json, globalOpts.pretty);
@@ -8239,7 +8365,7 @@ Re-run with --force to delete it anyway.`
8239
8365
  }
8240
8366
 
8241
8367
  // src/commands/resources.ts
8242
- import { Command as Command23 } from "commander";
8368
+ import { Command as Command24 } from "commander";
8243
8369
  var STATUS_FILTERS = ["unread", "to_read", "reading", "read", "all"];
8244
8370
  function validateStatus(value) {
8245
8371
  const v = value ?? "unread";
@@ -8254,7 +8380,7 @@ function collectTags(value, previous) {
8254
8380
  }
8255
8381
  var TAG_OPTION = "--tag <tag>";
8256
8382
  function createResourcesCommand() {
8257
- const resources = new Command23("resources").description(
8383
+ const resources = new Command24("resources").description(
8258
8384
  "Saved links and reference material. `list` defaults to the Reading list (unread); `create --url` saves a link to read later."
8259
8385
  );
8260
8386
  resources.command("list").description("List resources. Defaults to the Reading list (unread); --status read for what you finished, all for everything.").option("--workspace <slug|id>", "Workspace (defaults to the configured default)").option("--status <status>", `One of: ${STATUS_FILTERS.join(", ")} (default: unread)`).option("--search <text>", "Filter by title/description").option(TAG_OPTION, "Only resources with this tag (repeatable or comma-separated; matches any)", collectTags, []).option("--limit <n>", "Max rows (default 50)", "50").action(
@@ -8361,7 +8487,7 @@ function createResourcesCommand() {
8361
8487
  }
8362
8488
 
8363
8489
  // src/commands/runner.ts
8364
- import { Command as Command24 } from "commander";
8490
+ import { Command as Command25 } from "commander";
8365
8491
  import { hostname, homedir as homedir2, tmpdir as tmpdir2 } from "os";
8366
8492
  import { execFileSync } from "child_process";
8367
8493
  import { mkdirSync as mkdirSync3 } from "fs";
@@ -8813,7 +8939,7 @@ function removeServiceFile(plan) {
8813
8939
 
8814
8940
  // src/commands/runner.ts
8815
8941
  function createRunnerCommand() {
8816
- const cmd = new Command24("runner").description(
8942
+ const cmd = new Command25("runner").description(
8817
8943
  "Run your Assistant locally: claim its queued runs and work them with Claude Code on this machine"
8818
8944
  );
8819
8945
  cmd.command("start").description("Poll for queued runs and work them until stopped (Ctrl-C)").option("--runner-id <id>", "Name of this runner, recorded on each run", hostname()).option("--cwd <dir>", "Working directory for the spawned CLI (overrides runner config; never from the server)").option("--interval <seconds>", "Seconds between polls when nothing is queued", "15").option("--once", "Claim at most one run, work it, and exit").option("--no-mcp", "Spawn without the Exponential MCP run tools (progress still streams; the session cannot ask the owner)").action(async (opts) => {
@@ -8924,8 +9050,8 @@ ${plan.contents}
8924
9050
  }
8925
9051
 
8926
9052
  // src/commands/search.ts
8927
- import { Command as Command25 } from "commander";
8928
- import chalk12 from "chalk";
9053
+ import { Command as Command26 } from "commander";
9054
+ import chalk13 from "chalk";
8929
9055
  var KNOWLEDGE_TYPES = ["transcription", "resource", "document", "page"];
8930
9056
  function parseTypes(value) {
8931
9057
  if (!value) return void 0;
@@ -8954,7 +9080,7 @@ var TYPE_LABELS = {
8954
9080
  product: "Products"
8955
9081
  };
8956
9082
  function createSearchCommand() {
8957
- const search = new Command25("search").description(
9083
+ const search = new Command26("search").description(
8958
9084
  "Global search across projects, actions, goals, workspaces and more \u2014 same coverage as the app's Cmd+K palette. Matches titles; add --semantic to search meetings, resources, documents and pages by meaning."
8959
9085
  ).argument("<query>", "Text to search for").option("-w, --workspace <slug>", "Restrict results to one workspace (slug or ID; required with --semantic)").option("-l, --limit <n>", "Max results per entity type (1-25, default 10; 1-20 with --semantic)").option("--semantic", "Search the Knowledge index by meaning instead of matching titles").option("--types <list>", "With --semantic: comma-separated source kinds (transcription,resource,document,page)").action(async (query, options, cmd) => {
8960
9086
  const globalOpts = cmd.optsWithGlobals();
@@ -8968,10 +9094,10 @@ function createSearchCommand() {
8968
9094
  (w) => w.slug === options.workspace || w.id === options.workspace
8969
9095
  );
8970
9096
  if (!match) {
8971
- console.error(chalk12.red(`Workspace "${options.workspace}" not found.`));
8972
- console.log(chalk12.gray("Available workspaces:"));
9097
+ console.error(chalk13.red(`Workspace "${options.workspace}" not found.`));
9098
+ console.log(chalk13.gray("Available workspaces:"));
8973
9099
  workspaces.forEach((w) => {
8974
- console.log(chalk12.gray(` - ${w.slug} (${w.name})`));
9100
+ console.log(chalk13.gray(` - ${w.slug} (${w.name})`));
8975
9101
  });
8976
9102
  process.exit(1);
8977
9103
  }
@@ -8993,16 +9119,16 @@ function createSearchCommand() {
8993
9119
  return;
8994
9120
  }
8995
9121
  if (knowledge.results.length === 0) {
8996
- console.log(chalk12.gray(`Nothing about "${knowledge.query}" in the Knowledge index.`));
9122
+ console.log(chalk13.gray(`Nothing about "${knowledge.query}" in the Knowledge index.`));
8997
9123
  return;
8998
9124
  }
8999
- console.log(chalk12.bold(`
9125
+ console.log(chalk13.bold(`
9000
9126
  About "${knowledge.query}"`));
9001
9127
  for (const row of knowledge.results) {
9002
9128
  console.log(
9003
- ` ${chalk12.white(row.title)} ${chalk12.gray(`\xB7 ${row.sourceType} \xB7 ${Math.round(row.similarity * 100)}%`)}`
9129
+ ` ${chalk13.white(row.title)} ${chalk13.gray(`\xB7 ${row.sourceType} \xB7 ${Math.round(row.similarity * 100)}%`)}`
9004
9130
  );
9005
- console.log(chalk12.gray(` ${row.sourceId} ${row.url}`));
9131
+ console.log(chalk13.gray(` ${row.sourceId} ${row.url}`));
9006
9132
  if (row.snippet) console.log(` ${row.snippet}`);
9007
9133
  }
9008
9134
  console.log();
@@ -9014,7 +9140,7 @@ About "${knowledge.query}"`));
9014
9140
  return;
9015
9141
  }
9016
9142
  if (result.results.length === 0) {
9017
- console.log(chalk12.gray(`No matches for "${result.query}".`));
9143
+ console.log(chalk13.gray(`No matches for "${result.query}".`));
9018
9144
  return;
9019
9145
  }
9020
9146
  const byType = /* @__PURE__ */ new Map();
@@ -9024,14 +9150,14 @@ About "${knowledge.query}"`));
9024
9150
  byType.set(r.type, bucket);
9025
9151
  }
9026
9152
  for (const [type, rows] of byType) {
9027
- console.log(chalk12.bold(`
9153
+ console.log(chalk13.bold(`
9028
9154
  ${TYPE_LABELS[type] ?? type}`));
9029
9155
  for (const row of rows) {
9030
- const parts = [chalk12.white(row.title)];
9031
- if (row.subtitle) parts.push(chalk12.gray(row.subtitle));
9032
- if (row.workspace) parts.push(chalk12.cyan(`@${row.workspace.slug}`));
9033
- console.log(` ${parts.join(chalk12.gray(" \xB7 "))}`);
9034
- console.log(chalk12.gray(` ${row.id}${row.url ? ` ${row.url}` : ""}`));
9156
+ const parts = [chalk13.white(row.title)];
9157
+ if (row.subtitle) parts.push(chalk13.gray(row.subtitle));
9158
+ if (row.workspace) parts.push(chalk13.cyan(`@${row.workspace.slug}`));
9159
+ console.log(` ${parts.join(chalk13.gray(" \xB7 "))}`);
9160
+ console.log(chalk13.gray(` ${row.id}${row.url ? ` ${row.url}` : ""}`));
9035
9161
  }
9036
9162
  }
9037
9163
  console.log();
@@ -9043,7 +9169,7 @@ ${TYPE_LABELS[type] ?? type}`));
9043
9169
  }
9044
9170
 
9045
9171
  // src/commands/tickets.ts
9046
- import { Command as Command26 } from "commander";
9172
+ import { Command as Command27 } from "commander";
9047
9173
  function collectRepeatable(value, previous) {
9048
9174
  return [...previous, value];
9049
9175
  }
@@ -9086,7 +9212,7 @@ function validateTicketType(value) {
9086
9212
  return value;
9087
9213
  }
9088
9214
  function createTicketsCommand() {
9089
- const tickets = new Command26("tickets").description(
9215
+ const tickets = new Command27("tickets").description(
9090
9216
  "Manage product backlog tickets. Tickets live under a product, link to features/epics, depend on each other, and can be implemented via actions."
9091
9217
  );
9092
9218
  tickets.command("list").description(
@@ -9455,7 +9581,7 @@ function createTicketsCommand() {
9455
9581
  handleError(error, useJson);
9456
9582
  }
9457
9583
  });
9458
- const comment = new Command26("comment").description("Manage comments on a ticket");
9584
+ const comment = new Command27("comment").description("Manage comments on a ticket");
9459
9585
  comment.command("list").description("List comments on a ticket").requiredOption("--id <id>", "Ticket CUID").action(async (options, cmd) => {
9460
9586
  const globalOpts = cmd.optsWithGlobals();
9461
9587
  const useJson = shouldUseJson(globalOpts.json, globalOpts.pretty);
@@ -9547,7 +9673,7 @@ function createTicketsCommand() {
9547
9673
  }
9548
9674
 
9549
9675
  // src/commands/time.ts
9550
- import { Command as Command27 } from "commander";
9676
+ import { Command as Command28 } from "commander";
9551
9677
  import { segmentConversation } from "exponential-sdk";
9552
9678
  var SOURCES2 = ["manual", "claude-desktop", "agent-run"];
9553
9679
  var STATUSES2 = ["PROPOSED", "CONFIRMED"];
@@ -9637,7 +9763,7 @@ function batchItemToInput(item, index, defaults) {
9637
9763
  };
9638
9764
  }
9639
9765
  function createTimeCommand() {
9640
- const time = new Command27("time").description(
9766
+ const time = new Command28("time").description(
9641
9767
  `Time entries \u2014 log the day's work and list it. ${OWNERSHIP_NOTE}`
9642
9768
  );
9643
9769
  time.command("log").description(
@@ -9807,10 +9933,10 @@ function parseMessagesFile(raw) {
9807
9933
  }
9808
9934
 
9809
9935
  // src/commands/workspaces.ts
9810
- import { Command as Command28 } from "commander";
9811
- import chalk13 from "chalk";
9936
+ import { Command as Command29 } from "commander";
9937
+ import chalk14 from "chalk";
9812
9938
  function createWorkspacesCommand() {
9813
- const workspaces = new Command28("workspaces").description("Manage workspaces");
9939
+ const workspaces = new Command29("workspaces").description("Manage workspaces");
9814
9940
  workspaces.command("list").description("List all workspaces").action(async (_options, cmd) => {
9815
9941
  const globalOpts = cmd.optsWithGlobals();
9816
9942
  const useJson = shouldUseJson(globalOpts.json, globalOpts.pretty);
@@ -9823,7 +9949,7 @@ function createWorkspacesCommand() {
9823
9949
  const config = getConfig();
9824
9950
  outputWorkspacesPretty(workspaces2);
9825
9951
  if (config.defaultWorkspaceSlug) {
9826
- console.log(chalk13.gray(`Default workspace: ${config.defaultWorkspaceSlug}`));
9952
+ console.log(chalk14.gray(`Default workspace: ${config.defaultWorkspaceSlug}`));
9827
9953
  }
9828
9954
  }
9829
9955
  } catch (error) {
@@ -9836,10 +9962,10 @@ function createWorkspacesCommand() {
9836
9962
  const workspaces2 = await client.workspaces.list();
9837
9963
  const workspace = workspaces2.find((w) => w.slug === slug);
9838
9964
  if (!workspace) {
9839
- console.error(chalk13.red(`Workspace with slug "${slug}" not found.`));
9840
- console.log(chalk13.gray("Available workspaces:"));
9965
+ console.error(chalk14.red(`Workspace with slug "${slug}" not found.`));
9966
+ console.log(chalk14.gray("Available workspaces:"));
9841
9967
  workspaces2.forEach((w) => {
9842
- console.log(chalk13.gray(` - ${w.slug} (${w.name})`));
9968
+ console.log(chalk14.gray(` - ${w.slug} (${w.name})`));
9843
9969
  });
9844
9970
  process.exit(1);
9845
9971
  }
@@ -9847,7 +9973,7 @@ function createWorkspacesCommand() {
9847
9973
  defaultWorkspaceId: workspace.id,
9848
9974
  defaultWorkspaceSlug: workspace.slug
9849
9975
  });
9850
- console.log(chalk13.green(`Default workspace set to: ${workspace.name} (${workspace.slug})`));
9976
+ console.log(chalk14.green(`Default workspace set to: ${workspace.name} (${workspace.slug})`));
9851
9977
  } catch (error) {
9852
9978
  handleError(error);
9853
9979
  }
@@ -9875,20 +10001,20 @@ function createWorkspacesCommand() {
9875
10001
  return;
9876
10002
  }
9877
10003
  if (members.length === 0) {
9878
- console.log(chalk13.gray("No members found."));
10004
+ console.log(chalk14.gray("No members found."));
9879
10005
  return;
9880
10006
  }
9881
- console.log(chalk13.bold(`
10007
+ console.log(chalk14.bold(`
9882
10008
  Members (${members.length})
9883
10009
  `));
9884
10010
  for (const m of members) {
9885
10011
  const label = m.name ?? m.email ?? m.id;
9886
- const via = m.source === "team" ? chalk13.gray(
10012
+ const via = m.source === "team" ? chalk14.gray(
9887
10013
  ` via team${m.teams.length ? `: ${m.teams.map((t) => t.name).join(", ")}` : ""}` + (m.teamRole ? ` [team ${m.teamRole}]` : "")
9888
10014
  ) : "";
9889
- console.log(`${chalk13.bold(label)} ${chalk13.gray(`(${m.role})`)}${via}`);
9890
- if (m.email) console.log(chalk13.gray(` ${m.email}`));
9891
- console.log(chalk13.gray(` mention: ${m.mentionSyntax}`));
10015
+ console.log(`${chalk14.bold(label)} ${chalk14.gray(`(${m.role})`)}${via}`);
10016
+ if (m.email) console.log(chalk14.gray(` ${m.email}`));
10017
+ console.log(chalk14.gray(` mention: ${m.mentionSyntax}`));
9892
10018
  console.log();
9893
10019
  }
9894
10020
  } catch (error) {
@@ -9900,7 +10026,7 @@ Members (${members.length})
9900
10026
  }
9901
10027
 
9902
10028
  // src/commands/goals.ts
9903
- import { Command as Command29 } from "commander";
10029
+ import { Command as Command30 } from "commander";
9904
10030
  var GOAL_STATUSES = [
9905
10031
  "planned",
9906
10032
  "active",
@@ -10012,7 +10138,7 @@ function validateKeyResultUnit(value) {
10012
10138
  return value;
10013
10139
  }
10014
10140
  function createKeyResultsCommand() {
10015
- const kr = new Command29("kr").description(
10141
+ const kr = new Command30("kr").description(
10016
10142
  "Key results on an objective. Ids are CUIDs; --goal takes the objective's integer id."
10017
10143
  );
10018
10144
  kr.command("list").description("List key results").option("--goal <id>", "Objective ID (a number)").option("-w, --workspace <slug|id>", "Workspace (workspace-wide: every member's KRs)").option("--period <period>", "Period, e.g. Q3-2026").option("--status <status>", `Filter by status: ${KEY_RESULT_STATUSES.join(", ")}`).option("--mine", "Narrow a workspace list to key results you own").action(
@@ -10215,7 +10341,7 @@ function createKeyResultsCommand() {
10215
10341
  return kr;
10216
10342
  }
10217
10343
  function createGoalCommentsCommand() {
10218
- const comment = new Command29("comment").description(
10344
+ const comment = new Command30("comment").description(
10219
10345
  "Read and post comments on a goal. Mention teammates with --mention."
10220
10346
  );
10221
10347
  comment.command("list").description("List comments on a goal").requiredOption("--goal <id>", "Goal ID (a number)").action(async (options, cmd) => {
@@ -10310,7 +10436,7 @@ function createGoalCommentsCommand() {
10310
10436
  return comment;
10311
10437
  }
10312
10438
  function createGoalsCommand() {
10313
- const goals = new Command29("goals").description(
10439
+ const goals = new Command30("goals").description(
10314
10440
  "Manage goals (objectives) and their key results. Objectives have integer ids; key results are CUIDs."
10315
10441
  );
10316
10442
  goals.command("list").description(
@@ -10597,7 +10723,7 @@ Re-run with --with-key-results to go ahead, or move them with \`goals kr update
10597
10723
  return goals;
10598
10724
  }
10599
10725
  function createOkrsCommand() {
10600
- const okrs = new Command29("okrs").description(
10726
+ const okrs = new Command30("okrs").description(
10601
10727
  "OKRs \u2014 objectives with their key results nested. Manage the parts with `goals` and `goals kr`."
10602
10728
  );
10603
10729
  okrs.command("list").description(
@@ -10686,7 +10812,7 @@ function isBareVersionRequest(args) {
10686
10812
  return args.includes("--version") && args.every((arg) => arg.startsWith("-"));
10687
10813
  }
10688
10814
  function buildProgram() {
10689
- const program = new Command30();
10815
+ const program = new Command31();
10690
10816
  program.name("exponential").description(
10691
10817
  [
10692
10818
  "CLI to interact with Exponential productivity app.",
@@ -10699,6 +10825,8 @@ function buildProgram() {
10699
10825
  program.addCommand(createAuthCommand());
10700
10826
  program.addCommand(createActionsCommand());
10701
10827
  program.addCommand(createContactsCommand());
10828
+ program.addCommand(createContextCommand());
10829
+ program.addCommand(createMethodCommand());
10702
10830
  program.addCommand(createCeremoniesCommand());
10703
10831
  program.addCommand(createDatabasesCommand());
10704
10832
  program.addCommand(createDecisionsCommand());