@workscribe/cli 3.0.0 → 3.0.1

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
@@ -3531,16 +3531,58 @@ var init_completions_block = __esm({
3531
3531
  });
3532
3532
 
3533
3533
  // src/capture/shell-hook.ts
3534
+ function detectShell() {
3535
+ const shell = process.env.SHELL ?? "";
3536
+ if (shell.includes("zsh")) return { name: "zsh", rcFile: import_path14.default.join(import_os3.default.homedir(), ".zshrc") };
3537
+ if (shell.includes("bash")) return { name: "bash", rcFile: import_path14.default.join(import_os3.default.homedir(), ".bashrc") };
3538
+ if (shell.includes("fish")) {
3539
+ return { name: "fish", rcFile: import_path14.default.join(import_os3.default.homedir(), ".config", "fish", "conf.d", "workscribe.fish") };
3540
+ }
3541
+ return null;
3542
+ }
3543
+ function blockRegion(content, markers) {
3544
+ const blockStart = content.indexOf(markers.start);
3545
+ const blockEnd = content.indexOf(markers.end, blockStart);
3546
+ if (blockStart === -1 || blockEnd === -1) return null;
3547
+ const lines = content.slice(0, blockStart).split("\n");
3548
+ lines.pop();
3549
+ let headerLines = 0;
3550
+ for (let index = lines.length - 1; index >= 0; index -= 1) {
3551
+ const line = lines[index];
3552
+ if (!markers.preamble.test(line) && line.trim() !== "") break;
3553
+ headerLines = lines.length - index;
3554
+ }
3555
+ while (headerLines > 0 && lines[lines.length - headerLines].trim() === "") headerLines -= 1;
3556
+ const header = lines.slice(lines.length - headerLines);
3557
+ const headerLength = header.reduce((length, line) => length + line.length + 1, 0);
3558
+ return { start: blockStart - headerLength, end: blockEnd + markers.end.length };
3559
+ }
3560
+ function hookRegion(content) {
3561
+ return blockRegion(content, { start: HOOK_START, end: HOOK_END, preamble: PREAMBLE_LINE });
3562
+ }
3563
+ function findChronicleHook(content) {
3564
+ return blockRegion(content, { start: CHRONICLE_START, end: CHRONICLE_END, preamble: CHRONICLE_PREAMBLE_LINE });
3565
+ }
3566
+ function hookBlockOf(hookContent) {
3567
+ const startIndex = hookContent.indexOf(HOOK_START);
3568
+ const endIndex = hookContent.indexOf(HOOK_END);
3569
+ if (startIndex === -1 || endIndex === -1) return hookContent.trim();
3570
+ return hookContent.slice(startIndex, endIndex + HOOK_END.length);
3571
+ }
3572
+ function installedHookVersion(block) {
3573
+ const match = HOOK_VERSION_LINE.exec(block);
3574
+ return match ? Number(match[1]) : 1;
3575
+ }
3534
3576
  function backUp(rcFile) {
3535
3577
  log.info(`Backed up ${rcFile} \u2192 ${import_path14.default.basename(backUpFile(rcFile))}`);
3536
3578
  }
3537
3579
  function getInstalledHookBlock(rcFile) {
3538
- if (!import_fs17.default.existsSync(rcFile)) return null;
3539
- const content = import_fs17.default.readFileSync(rcFile, "utf-8");
3540
- const startIdx = content.indexOf(HOOK_START);
3541
- const endIdx = content.indexOf(HOOK_END);
3542
- if (startIdx === -1 || endIdx === -1) return null;
3543
- return content.slice(startIdx, endIdx + HOOK_END.length);
3580
+ const content = import_fs17.default.existsSync(rcFile) ? readRcFile(rcFile) : null;
3581
+ if (content === null) return null;
3582
+ const startIndex = content.indexOf(HOOK_START);
3583
+ const endIndex = content.indexOf(HOOK_END);
3584
+ if (startIndex === -1 || endIndex === -1) return null;
3585
+ return content.slice(startIndex, endIndex + HOOK_END.length);
3544
3586
  }
3545
3587
  function isHookInstalled(rcFile) {
3546
3588
  return getInstalledHookBlock(rcFile) !== null;
@@ -3548,7 +3590,7 @@ function isHookInstalled(rcFile) {
3548
3590
  function isHookOutdated(rcFile, hookContent) {
3549
3591
  const installed = getInstalledHookBlock(rcFile);
3550
3592
  if (!installed) return false;
3551
- return installed.trim() !== hookContent.trim();
3593
+ return installed.trim() !== hookBlockOf(hookContent).trim();
3552
3594
  }
3553
3595
  function installHook(rcFile, hookContent) {
3554
3596
  backUp(rcFile);
@@ -3559,20 +3601,41 @@ ${hookContent}
3559
3601
  function updateHook(rcFile, hookContent) {
3560
3602
  backUp(rcFile);
3561
3603
  const content = import_fs17.default.readFileSync(rcFile, "utf-8");
3562
- const startIdx = content.indexOf(HOOK_START);
3563
- const endIdx = content.indexOf(HOOK_END) + HOOK_END.length;
3564
- import_fs17.default.writeFileSync(rcFile, content.slice(0, startIdx) + hookContent + content.slice(endIdx));
3604
+ const region = hookRegion(content);
3605
+ if (!region) return;
3606
+ import_fs17.default.writeFileSync(rcFile, content.slice(0, region.start) + hookContent.trimEnd() + content.slice(region.end));
3607
+ }
3608
+ function withoutRegion(content, region) {
3609
+ const before = content.slice(0, region.start).replace(/\n+$/, "\n");
3610
+ const after = content.slice(region.end).replace(/^\n/, "");
3611
+ return before + after;
3565
3612
  }
3566
3613
  function removeHook(rcFile) {
3567
3614
  backUp(rcFile);
3568
3615
  const content = import_fs17.default.readFileSync(rcFile, "utf-8");
3569
- const startIdx = content.indexOf(HOOK_START);
3570
- const endIdx = content.indexOf(HOOK_END) + HOOK_END.length;
3571
- const preambleIdx = content.lastIndexOf(HOOK_PREAMBLE, startIdx);
3572
- const blockStart = preambleIdx !== -1 ? preambleIdx : startIdx;
3573
- const before = content.slice(0, blockStart).replace(/\n+$/, "\n");
3574
- const after = content.slice(endIdx).replace(/^\n/, "");
3575
- import_fs17.default.writeFileSync(rcFile, before + after);
3616
+ const region = hookRegion(content);
3617
+ if (!region) return;
3618
+ import_fs17.default.writeFileSync(rcFile, withoutRegion(content, region));
3619
+ }
3620
+ function hasChronicleHook(rcFile) {
3621
+ const content = readRcFile(rcFile);
3622
+ return content !== null && findChronicleHook(content) !== null;
3623
+ }
3624
+ function removeChronicleHook(rcFile) {
3625
+ const content = readRcFile(rcFile);
3626
+ const region = content === null ? null : findChronicleHook(content);
3627
+ if (content === null || !region) return false;
3628
+ backUp(rcFile);
3629
+ import_fs17.default.writeFileSync(rcFile, withoutRegion(content, region));
3630
+ return true;
3631
+ }
3632
+ function shellHookHealth(shell) {
3633
+ const installed = getInstalledHookBlock(shell.rcFile);
3634
+ const currentVersion = SHELL_HOOK_VERSIONS[shell.name] ?? 1;
3635
+ return {
3636
+ isOutdated: installed !== null && installedHookVersion(installed) < currentVersion,
3637
+ hasChronicleHook: hasChronicleHook(shell.rcFile)
3638
+ };
3576
3639
  }
3577
3640
  function resolveWorkscribeBinary() {
3578
3641
  try {
@@ -3651,7 +3714,7 @@ function removeFishCompletions() {
3651
3714
  import_fs17.default.rmSync(FISH_COMPLETIONS_FILE, { force: true });
3652
3715
  return true;
3653
3716
  }
3654
- var import_fs17, import_path14, import_os3, import_child_process3, FISH_COMPLETIONS_DIR, HOOK_START, HOOK_END, HOOK_PREAMBLE, FISH_COMPLETIONS_FILE;
3717
+ var import_fs17, import_path14, import_os3, import_child_process3, FISH_COMPLETIONS_DIR, HOOK_START, HOOK_END, PREAMBLE_LINE, HOOK_VERSION_LINE, SHELL_HOOK_VERSIONS, CHRONICLE_START, CHRONICLE_END, CHRONICLE_PREAMBLE_LINE, FISH_COMPLETIONS_FILE;
3655
3718
  var init_shell_hook = __esm({
3656
3719
  "src/capture/shell-hook.ts"() {
3657
3720
  "use strict";
@@ -3668,7 +3731,12 @@ var init_shell_hook = __esm({
3668
3731
  FISH_COMPLETIONS_DIR = import_path14.default.join(import_os3.default.homedir(), ".config", "fish", "completions");
3669
3732
  HOOK_START = "# workscribe:hook:start";
3670
3733
  HOOK_END = "# workscribe:hook:end";
3671
- HOOK_PREAMBLE = "# Workscribe \u2014 developer work journal";
3734
+ PREAMBLE_LINE = /^# (?:Workscribe — developer work journal|Do not edit this (?:block|file) manually\. Managed by `workscribe init`\.)$/;
3735
+ HOOK_VERSION_LINE = /^# workscribe:hook-version (\d+)$/m;
3736
+ SHELL_HOOK_VERSIONS = Object.freeze({ zsh: 2, bash: 2, fish: 1 });
3737
+ CHRONICLE_START = "# chronicle:hook:start";
3738
+ CHRONICLE_END = "# chronicle:hook:end";
3739
+ CHRONICLE_PREAMBLE_LINE = /^# (?:Chronicle — developer work journal|Do not edit this block manually\. Managed by `chronicle init`\.)$/;
3672
3740
  FISH_COMPLETIONS_FILE = import_path14.default.join(FISH_COMPLETIONS_DIR, "workscribe.fish");
3673
3741
  }
3674
3742
  });
@@ -4305,10 +4373,10 @@ function installIntoFolder(options) {
4305
4373
  const outcome = installSkill({
4306
4374
  sourceDir: options.sourceDir,
4307
4375
  skillsFolder: target.skillsFolder,
4308
- version: "3.0.0",
4376
+ version: "3.0.1",
4309
4377
  force: options.force
4310
4378
  });
4311
- return describeInstallOutcome({ ...target, outcome, version: "3.0.0" });
4379
+ return describeInstallOutcome({ ...target, outcome, version: "3.0.1" });
4312
4380
  } catch (error) {
4313
4381
  return describeInstallFailure({ ...target, error });
4314
4382
  }
@@ -4327,8 +4395,8 @@ function removeSkills(agents, options) {
4327
4395
  }
4328
4396
  function formatAgentSkillLine(agent, homeDir = import_os6.default.homedir()) {
4329
4397
  const location = displayPath(import_path19.default.join(homeDir, agent.skillsFolder, SKILL_NAME), homeDir);
4330
- const installState = readInstallState(import_path19.default.join(homeDir, agent.skillsFolder), "3.0.0");
4331
- const status = describeSkillStatus(installState, "3.0.0");
4398
+ const installState = readInstallState(import_path19.default.join(homeDir, agent.skillsFolder), "3.0.1");
4399
+ const status = describeSkillStatus(installState, "3.0.1");
4332
4400
  return `${agent.name.padEnd(AGENT_NAME_COLUMN_WIDTH)} ${STATUS_COLOURS[status.level](status.text)} ${import_chalk2.default.dim(location)}`;
4333
4401
  }
4334
4402
  function formatUndetectedAgentLine(agent) {
@@ -4424,16 +4492,6 @@ var init_legacy_ai_cleanup = __esm({
4424
4492
  });
4425
4493
 
4426
4494
  // src/cli/init.ts
4427
- function detectShell() {
4428
- const shell = process.env.SHELL ?? "";
4429
- if (shell.includes("zsh")) return { name: "zsh", rcFile: import_path20.default.join(import_os7.default.homedir(), ".zshrc") };
4430
- if (shell.includes("bash")) return { name: "bash", rcFile: import_path20.default.join(import_os7.default.homedir(), ".bashrc") };
4431
- if (shell.includes("fish")) {
4432
- const confDir = import_path20.default.join(import_os7.default.homedir(), ".config", "fish", "conf.d");
4433
- return { name: "fish", rcFile: import_path20.default.join(confDir, "workscribe.fish") };
4434
- }
4435
- return null;
4436
- }
4437
4495
  function step(current, total, label) {
4438
4496
  log.plain(import_chalk3.default.bold(`
4439
4497
  [${current}/${total}] ${label}`));
@@ -4479,6 +4537,21 @@ async function runTelemetryStep(config) {
4479
4537
  config.telemetry.enabled = telemetryEnabled;
4480
4538
  config.telemetry.installId = ensureInstallId(config);
4481
4539
  }
4540
+ async function offerChronicleCleanup(shell) {
4541
+ if (!hasChronicleHook(shell.rcFile)) return;
4542
+ const { removeChronicle } = await (0, import_prompts2.default)({
4543
+ type: "confirm",
4544
+ name: "removeChronicle",
4545
+ message: `An old Chronicle hook in ${shell.rcFile} errors at every prompt. Remove it?`,
4546
+ initial: true
4547
+ });
4548
+ if (!removeChronicle) {
4549
+ log.info("Chronicle hook left in place");
4550
+ return;
4551
+ }
4552
+ removeChronicleHook(shell.rcFile);
4553
+ log.success(`Removed the old Chronicle hook from ${shell.rcFile}`);
4554
+ }
4482
4555
  async function runShellHookStep(program) {
4483
4556
  step(3, TOTAL_STEPS, "Installing shell hook");
4484
4557
  const shell = detectShell();
@@ -4527,6 +4600,7 @@ async function runShellHookStep(program) {
4527
4600
  } else {
4528
4601
  log.info(`Shell hook up to date in ${shell.rcFile}`);
4529
4602
  }
4603
+ await offerChronicleCleanup(shell);
4530
4604
  if (isCompletionsInstalled(shell)) {
4531
4605
  await refreshCompletions(shell, program);
4532
4606
  } else {
@@ -4614,10 +4688,10 @@ async function runAIToolsStep() {
4614
4688
  }
4615
4689
  async function offerSkillInstall(group, sourceDir) {
4616
4690
  const target = describeTarget(group);
4617
- const state = readInstallState(target.skillsFolder, "3.0.0");
4691
+ const state = readInstallState(target.skillsFolder, "3.0.1");
4618
4692
  const knownOutcome = outcomeWithoutPrompt(state);
4619
4693
  if (knownOutcome) {
4620
- printMessage(describeInstallOutcome({ ...target, outcome: knownOutcome, version: "3.0.0" }));
4694
+ printMessage(describeInstallOutcome({ ...target, outcome: knownOutcome, version: "3.0.1" }));
4621
4695
  return;
4622
4696
  }
4623
4697
  const { installSkill: shouldInstall } = await (0, import_prompts2.default)({
@@ -4720,13 +4794,12 @@ function registerInit(program) {
4720
4794
  printNextSteps(shell);
4721
4795
  });
4722
4796
  }
4723
- var import_fs22, import_path20, import_os7, import_prompts2, import_chalk3, TOTAL_STEPS;
4797
+ var import_fs22, import_path20, import_prompts2, import_chalk3, TOTAL_STEPS;
4724
4798
  var init_init = __esm({
4725
4799
  "src/cli/init.ts"() {
4726
4800
  "use strict";
4727
4801
  import_fs22 = __toESM(require("fs"));
4728
4802
  import_path20 = __toESM(require("path"));
4729
- import_os7 = __toESM(require("os"));
4730
4803
  import_prompts2 = __toESM(require("prompts"));
4731
4804
  import_chalk3 = __toESM(require("chalk"));
4732
4805
  init_paths();
@@ -4823,14 +4896,14 @@ var init_format = __esm({
4823
4896
 
4824
4897
  // src/cli/notices.ts
4825
4898
  function printLegacyAiNotice(config) {
4826
- const notice = describeLegacyAiSettings(config, displayPath(CONFIG_PATH, import_os8.default.homedir()));
4899
+ const notice = describeLegacyAiSettings(config, displayPath(CONFIG_PATH, import_os7.default.homedir()));
4827
4900
  if (notice) log.notice(notice);
4828
4901
  }
4829
- var import_os8;
4902
+ var import_os7;
4830
4903
  var init_notices = __esm({
4831
4904
  "src/cli/notices.ts"() {
4832
4905
  "use strict";
4833
- import_os8 = __toESM(require("os"));
4906
+ import_os7 = __toESM(require("os"));
4834
4907
  init_logger();
4835
4908
  init_paths();
4836
4909
  init_legacy_ai();
@@ -5935,6 +6008,23 @@ function formatDataLines(status) {
5935
6008
  if (status.latestBackup) lines.push(import_chalk4.default.dim(` backup: ${status.latestBackup}`));
5936
6009
  return lines;
5937
6010
  }
6011
+ function printShellHookWarnings() {
6012
+ const shell = detectShell();
6013
+ if (!shell) return;
6014
+ const health = shellHookHealth(shell);
6015
+ if (health.isOutdated) {
6016
+ log.plain("");
6017
+ log.plain(
6018
+ ` ${import_chalk4.default.yellow("\u26A0")} Your ${shell.name} hook is from an older version and may not record terminal commands.`
6019
+ );
6020
+ log.plain(import_chalk4.default.dim(" Run workscribe init to update it, then open a new terminal"));
6021
+ }
6022
+ if (health.hasChronicleHook) {
6023
+ log.plain("");
6024
+ log.plain(` ${import_chalk4.default.yellow("\u26A0")} An old Chronicle hook in ${shell.rcFile} errors at every prompt.`);
6025
+ log.plain(import_chalk4.default.dim(" Run workscribe init to remove it"));
6026
+ }
6027
+ }
5938
6028
  function registerStatus(program) {
5939
6029
  program.command("status").description("Show capture status and event counts").action(() => {
5940
6030
  const config = readConfig();
@@ -5976,6 +6066,7 @@ function registerStatus(program) {
5976
6066
  ` ${import_chalk4.default.yellow("!")} ${import_chalk4.default.yellow(String(pendingAlerts.length))} pending security alert${pendingAlerts.length === 1 ? "" : "s"}` + import_chalk4.default.dim(" (run: workscribe alerts)")
5977
6067
  );
5978
6068
  }
6069
+ printShellHookWarnings();
5979
6070
  const hookHealth = checkHookHealth();
5980
6071
  if (hookHealth.installed && !hookHealth.pinned) {
5981
6072
  log.plain("");
@@ -6034,6 +6125,7 @@ var init_status = __esm({
6034
6125
  init_paths();
6035
6126
  init_alerts2();
6036
6127
  init_claude_code();
6128
+ init_shell_hook();
6037
6129
  init_detect();
6038
6130
  init_actions();
6039
6131
  init_notices();
@@ -6455,7 +6547,7 @@ var init_heading = __esm({
6455
6547
 
6456
6548
  // src/summary/payload.ts
6457
6549
  function locationContextFrom(config) {
6458
- return { projects: config.projects ?? {}, homeDir: import_os9.default.homedir() };
6550
+ return { projects: config.projects ?? {}, homeDir: import_os8.default.homedir() };
6459
6551
  }
6460
6552
  function gitMovesField(row) {
6461
6553
  if (!MENTIONS_GIT.test(row.command)) return {};
@@ -6536,11 +6628,11 @@ function threadToPayload(thread, block, options = {}) {
6536
6628
  alongside: block.threads.filter((other) => other.id !== thread.id).map((other) => sessionLocation(other, options.context) ?? UNKNOWN_LOCATION)
6537
6629
  };
6538
6630
  }
6539
- var import_os9, import_path25, DEFAULT_LOCATION_CONTEXT, MENTIONS_GIT;
6631
+ var import_os8, import_path25, DEFAULT_LOCATION_CONTEXT, MENTIONS_GIT;
6540
6632
  var init_payload = __esm({
6541
6633
  "src/summary/payload.ts"() {
6542
6634
  "use strict";
6543
- import_os9 = __toESM(require("os"));
6635
+ import_os8 = __toESM(require("os"));
6544
6636
  import_path25 = __toESM(require("path"));
6545
6637
  init_format();
6546
6638
  init_event_metadata();
@@ -6550,7 +6642,7 @@ var init_payload = __esm({
6550
6642
  init_grouper();
6551
6643
  init_blocks();
6552
6644
  init_heading();
6553
- DEFAULT_LOCATION_CONTEXT = { projects: {}, homeDir: import_os9.default.homedir() };
6645
+ DEFAULT_LOCATION_CONTEXT = { projects: {}, homeDir: import_os8.default.homedir() };
6554
6646
  MENTIONS_GIT = /(^|[\s;&|(])git\s/;
6555
6647
  }
6556
6648
  });
@@ -7865,18 +7957,18 @@ async function postSummary({
7865
7957
  }
7866
7958
  try {
7867
7959
  status.info("Posting to webhook\u2026");
7868
- const body = isSlackWebhookUrl(webhookUrl) ? formatForSlack(summary, import_os10.default.userInfo().username) : summary;
7960
+ const body = isSlackWebhookUrl(webhookUrl) ? formatForSlack(summary, import_os9.default.userInfo().username) : summary;
7869
7961
  await postToWebhook(webhookUrl, body);
7870
7962
  status.success("Posted.");
7871
7963
  } catch (error) {
7872
7964
  log.error(`Webhook failed: ${error.message}`);
7873
7965
  }
7874
7966
  }
7875
- var import_os10;
7967
+ var import_os9;
7876
7968
  var init_webhook2 = __esm({
7877
7969
  "src/summary/webhook.ts"() {
7878
7970
  "use strict";
7879
- import_os10 = __toESM(require("os"));
7971
+ import_os9 = __toESM(require("os"));
7880
7972
  init_logger();
7881
7973
  init_webhook();
7882
7974
  init_slack();
@@ -8560,12 +8652,15 @@ var init_clear = __esm({
8560
8652
 
8561
8653
  // src/cli/uninstall.ts
8562
8654
  function completionRcFiles() {
8563
- return [".zshrc", ".bashrc", ".bash_profile"].map((file) => import_path28.default.join(import_os11.default.homedir(), file));
8655
+ return [".zshrc", ".bashrc", ".bash_profile"].map((file) => import_path28.default.join(import_os10.default.homedir(), file));
8564
8656
  }
8565
8657
  function removeCompletionsAndToolHooks() {
8566
8658
  for (const rcFile of completionRcFiles()) {
8567
8659
  if (removeCompletions(rcFile)) log.success(`Shell completions removed from ${rcFile}`);
8568
8660
  }
8661
+ for (const rcFile of CHRONICLE_RC_FILES.map((file) => import_path28.default.join(import_os10.default.homedir(), file))) {
8662
+ if (removeChronicleHook(rcFile)) log.success(`Old Chronicle hook removed from ${rcFile}`);
8663
+ }
8569
8664
  if (removeFishCompletions()) log.success("Fish completions removed");
8570
8665
  const outcome = claudeCodeIntegration.uninstall?.();
8571
8666
  if (outcome === "removed") log.success("Claude Code session hook removed from ~/.claude/settings.json");
@@ -8577,10 +8672,10 @@ function removeCompletionsAndToolHooks() {
8577
8672
  }
8578
8673
  function detectShellRcFiles() {
8579
8674
  const candidates = [
8580
- { name: "zsh", rcFile: import_path28.default.join(import_os11.default.homedir(), ".zshrc") },
8581
- { name: "bash", rcFile: import_path28.default.join(import_os11.default.homedir(), ".bashrc") },
8582
- { name: "bash", rcFile: import_path28.default.join(import_os11.default.homedir(), ".bash_profile") },
8583
- { name: "fish", rcFile: import_path28.default.join(import_os11.default.homedir(), ".config", "fish", "conf.d", "workscribe.fish") }
8675
+ { name: "zsh", rcFile: import_path28.default.join(import_os10.default.homedir(), ".zshrc") },
8676
+ { name: "bash", rcFile: import_path28.default.join(import_os10.default.homedir(), ".bashrc") },
8677
+ { name: "bash", rcFile: import_path28.default.join(import_os10.default.homedir(), ".bash_profile") },
8678
+ { name: "fish", rcFile: import_path28.default.join(import_os10.default.homedir(), ".config", "fish", "conf.d", "workscribe.fish") }
8584
8679
  ];
8585
8680
  return candidates.filter((candidate) => import_fs28.default.existsSync(candidate.rcFile) && isHookInstalled(candidate.rcFile));
8586
8681
  }
@@ -8637,13 +8732,13 @@ function registerUninstall(program) {
8637
8732
  log.plain("");
8638
8733
  });
8639
8734
  }
8640
- var import_fs28, import_path28, import_os11, import_prompts4, import_chalk11;
8735
+ var import_fs28, import_path28, import_os10, import_prompts4, import_chalk11, CHRONICLE_RC_FILES;
8641
8736
  var init_uninstall = __esm({
8642
8737
  "src/cli/uninstall.ts"() {
8643
8738
  "use strict";
8644
8739
  import_fs28 = __toESM(require("fs"));
8645
8740
  import_path28 = __toESM(require("path"));
8646
- import_os11 = __toESM(require("os"));
8741
+ import_os10 = __toESM(require("os"));
8647
8742
  import_prompts4 = __toESM(require("prompts"));
8648
8743
  import_chalk11 = __toESM(require("chalk"));
8649
8744
  init_paths();
@@ -8652,6 +8747,7 @@ var init_uninstall = __esm({
8652
8747
  init_logger();
8653
8748
  init_agents();
8654
8749
  init_actions();
8750
+ CHRONICLE_RC_FILES = [".zshrc", ".bashrc"];
8655
8751
  }
8656
8752
  });
8657
8753
 
@@ -8938,11 +9034,11 @@ function registerBugReport(program) {
8938
9034
  const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
8939
9035
  const reportPath = import_path30.default.join(WORKSCRIBE_DIR, `bug-report-${timestamp}.txt`);
8940
9036
  const systemInfo = [
8941
- `Workscribe version : ${"3.0.0"}`,
9037
+ `Workscribe version : ${"3.0.1"}`,
8942
9038
  `Node.js version : ${process.version}`,
8943
9039
  `Platform : ${process.platform}`,
8944
9040
  `Architecture : ${process.arch}`,
8945
- `OS release : ${import_os12.default.release()}`,
9041
+ `OS release : ${import_os11.default.release()}`,
8946
9042
  `Config path : ${CONFIG_PATH}`,
8947
9043
  `Data directory : ${WORKSCRIBE_DIR}`
8948
9044
  ].join("\n");
@@ -8969,7 +9065,7 @@ function registerBugReport(program) {
8969
9065
  process.exit(1);
8970
9066
  }
8971
9067
  const params = new URLSearchParams({
8972
- title: `Bug report \u2014 workscribe ${"3.0.0"}`,
9068
+ title: `Bug report \u2014 workscribe ${"3.0.1"}`,
8973
9069
  body: `<!-- Attach ${import_path30.default.basename(reportPath)} or paste the relevant sections below -->
8974
9070
 
8975
9071
  **Describe the issue:**
@@ -8987,12 +9083,12 @@ function registerBugReport(program) {
8987
9083
  log.plain("");
8988
9084
  });
8989
9085
  }
8990
- var import_fs30, import_os12, import_path30, import_chalk13, GITHUB_ISSUES_URL, DEBUG_LOG_TAIL_LINES;
9086
+ var import_fs30, import_os11, import_path30, import_chalk13, GITHUB_ISSUES_URL, DEBUG_LOG_TAIL_LINES;
8991
9087
  var init_bug_report = __esm({
8992
9088
  "src/cli/bug-report.ts"() {
8993
9089
  "use strict";
8994
9090
  import_fs30 = __toESM(require("fs"));
8995
- import_os12 = __toESM(require("os"));
9091
+ import_os11 = __toESM(require("os"));
8996
9092
  import_path30 = __toESM(require("path"));
8997
9093
  import_chalk13 = __toESM(require("chalk"));
8998
9094
  init_paths();
@@ -9060,7 +9156,7 @@ function reportRun(result) {
9060
9156
  function registerUpgrade(program) {
9061
9157
  program.command("upgrade").description("Bring your stored data up to date after updating Workscribe (backs it up first)").action(() => {
9062
9158
  const announced = /* @__PURE__ */ new Set();
9063
- const result = runDataJobs("3.0.0", {
9159
+ const result = runDataJobs("3.0.1", {
9064
9160
  onProgress: ({ job }) => {
9065
9161
  if (announced.has(job.name)) return;
9066
9162
  announced.add(job.name);
@@ -9550,7 +9646,7 @@ function isNewer(latest, current) {
9550
9646
  return latestPatch > currentPatch;
9551
9647
  }
9552
9648
  function checkForUpdate() {
9553
- const current = "3.0.0";
9649
+ const current = "3.0.1";
9554
9650
  const cache = readCache();
9555
9651
  if (cache && isNewer(cache.latestVersion, current)) {
9556
9652
  process.stderr.write(
@@ -9573,8 +9669,8 @@ function checkForUpdate() {
9573
9669
  function buildTelemetryPayload(config) {
9574
9670
  return {
9575
9671
  installId: config.telemetry.installId,
9576
- cliVersion: "3.0.0",
9577
- platform: import_os13.default.platform(),
9672
+ cliVersion: "3.0.1",
9673
+ platform: import_os12.default.platform(),
9578
9674
  nodeVersion: process.version
9579
9675
  };
9580
9676
  }
@@ -9598,12 +9694,12 @@ function pingTelemetry() {
9598
9694
  debugLog("pingTelemetry", error);
9599
9695
  });
9600
9696
  }
9601
- var import_fs31, import_os13, CHECK_INTERVAL_MS;
9697
+ var import_fs31, import_os12, CHECK_INTERVAL_MS;
9602
9698
  var init_update_check = __esm({
9603
9699
  "src/utils/update-check.ts"() {
9604
9700
  "use strict";
9605
9701
  import_fs31 = __toESM(require("fs"));
9606
- import_os13 = __toESM(require("os"));
9702
+ import_os12 = __toESM(require("os"));
9607
9703
  init_paths();
9608
9704
  init_config();
9609
9705
  init_logger();
@@ -9651,10 +9747,10 @@ var require_main = __commonJS({
9651
9747
  pingTelemetry();
9652
9748
  }
9653
9749
  if (shouldRunDataJobs(process.argv.slice(2))) {
9654
- runDataJobsBeforeCommand(invokedCommand, "3.0.0");
9750
+ runDataJobsBeforeCommand(invokedCommand, "3.0.1");
9655
9751
  }
9656
9752
  var program = new import_commander.Command();
9657
- program.name("workscribe").description("Automatic developer work journal").version("3.0.0");
9753
+ program.name("workscribe").description("Automatic developer work journal").version("3.0.1");
9658
9754
  registerCapture(program);
9659
9755
  registerHook(program);
9660
9756
  registerInit(program);