qodewk 0.11.0 → 0.11.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.
Files changed (2) hide show
  1. package/dist/index.cjs +141 -106
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1158,7 +1158,7 @@ var require_command = __commonJS({
1158
1158
  var EventEmitter2 = require("events").EventEmitter;
1159
1159
  var childProcess = require("child_process");
1160
1160
  var path18 = require("path");
1161
- var fs16 = require("fs");
1161
+ var fs17 = require("fs");
1162
1162
  var process3 = require("process");
1163
1163
  var { Argument: Argument2, humanReadableArgName } = require_argument();
1164
1164
  var { CommanderError: CommanderError2 } = require_error();
@@ -2139,7 +2139,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2139
2139
  * @param {string} subcommandName
2140
2140
  */
2141
2141
  _checkForMissingExecutable(executableFile, executableDir, subcommandName) {
2142
- if (fs16.existsSync(executableFile)) return;
2142
+ if (fs17.existsSync(executableFile)) return;
2143
2143
  const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
2144
2144
  const executableMissing = `'${executableFile}' does not exist
2145
2145
  - if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
@@ -2158,10 +2158,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
2158
2158
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
2159
2159
  function findFile(baseDir, baseName) {
2160
2160
  const localBin = path18.resolve(baseDir, baseName);
2161
- if (fs16.existsSync(localBin)) return localBin;
2161
+ if (fs17.existsSync(localBin)) return localBin;
2162
2162
  if (sourceExt.includes(path18.extname(baseName))) return void 0;
2163
2163
  const foundExt = sourceExt.find(
2164
- (ext) => fs16.existsSync(`${localBin}${ext}`)
2164
+ (ext) => fs17.existsSync(`${localBin}${ext}`)
2165
2165
  );
2166
2166
  if (foundExt) return `${localBin}${foundExt}`;
2167
2167
  return void 0;
@@ -2173,7 +2173,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2173
2173
  if (this._scriptPath) {
2174
2174
  let resolvedScriptPath;
2175
2175
  try {
2176
- resolvedScriptPath = fs16.realpathSync(this._scriptPath);
2176
+ resolvedScriptPath = fs17.realpathSync(this._scriptPath);
2177
2177
  } catch {
2178
2178
  resolvedScriptPath = this._scriptPath;
2179
2179
  }
@@ -6646,12 +6646,12 @@ function gitP(...args) {
6646
6646
  );
6647
6647
  }
6648
6648
  return chain.then(function() {
6649
- return new Promise(function(resolve7, reject) {
6649
+ return new Promise(function(resolve8, reject) {
6650
6650
  const callback = (err, result) => {
6651
6651
  if (err) {
6652
6652
  return reject(toError(err));
6653
6653
  }
6654
- resolve7(result);
6654
+ resolve8(result);
6655
6655
  };
6656
6656
  args2.push(callback);
6657
6657
  git2[fn].apply(git2, args2);
@@ -9318,7 +9318,7 @@ var init_esm = __esm({
9318
9318
  });
9319
9319
 
9320
9320
  // src/index.ts
9321
- var fs15 = __toESM(require("fs"), 1);
9321
+ var fs16 = __toESM(require("fs"), 1);
9322
9322
  var path17 = __toESM(require("path"), 1);
9323
9323
 
9324
9324
  // ../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/esm.mjs
@@ -16434,7 +16434,7 @@ async function runDiagnostics(options = {}) {
16434
16434
  }
16435
16435
  return {
16436
16436
  overallStatus,
16437
- version: "0.11.0",
16437
+ version: "0.11.1",
16438
16438
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
16439
16439
  repoPath,
16440
16440
  agents,
@@ -17110,6 +17110,7 @@ function uninstallHookFile(hookFile) {
17110
17110
  // src/menu.ts
17111
17111
  var readline = __toESM(require("readline"), 1);
17112
17112
  var path16 = __toESM(require("path"), 1);
17113
+ var fs15 = __toESM(require("fs"), 1);
17113
17114
  var import_picocolors4 = __toESM(require_picocolors(), 1);
17114
17115
 
17115
17116
  // src/doctor-view.ts
@@ -17431,9 +17432,36 @@ var SHARE_HORIZON_ITEMS = [
17431
17432
  description: "Return to previous screen"
17432
17433
  }
17433
17434
  ];
17434
- function buildMenuFrame(selectedIndex, items = MENU_ITEMS, title = "Telemetry Control Panel", subtitle = "\u2191\u2193 move \xB7 enter select \xB7 0-8 quick jump \xB7 q quit", options = {}) {
17435
+ function resolveMenuCliVersion() {
17436
+ try {
17437
+ const argv1 = process.argv[1] ? path16.dirname(path16.resolve(process.argv[1])) : process.cwd();
17438
+ const candidates = [
17439
+ path16.join(argv1, "..", "package.json"),
17440
+ path16.join(argv1, "package.json")
17441
+ ];
17442
+ for (const candidate of candidates) {
17443
+ if (!fs15.existsSync(candidate)) continue;
17444
+ const pkg = JSON.parse(fs15.readFileSync(candidate, "utf-8"));
17445
+ if (pkg.name === "qodewk" && pkg.version) return pkg.version;
17446
+ }
17447
+ } catch {
17448
+ }
17449
+ return "0.11.1";
17450
+ }
17451
+ function computeMenuSubtitle(items, isSubmenu = false) {
17452
+ const numericKeys = items.map((item) => parseInt(item.key, 10)).filter((n) => !isNaN(n) && n > 0);
17453
+ const hasZero = items.some((item) => item.key === "0");
17454
+ const maxKey = numericKeys.length > 0 ? Math.max(...numericKeys) : 0;
17455
+ const jumpText = hasZero && maxKey > 0 ? `0-${maxKey} quick jump` : maxKey > 0 ? `1-${maxKey} quick jump` : "enter select";
17456
+ if (isSubmenu) {
17457
+ return `\u2191\u2193 move \xB7 enter select \xB7 ${jumpText} \xB7 esc / 0 back`;
17458
+ }
17459
+ return `\u2191\u2193 move \xB7 enter select \xB7 ${jumpText} \xB7 q quit`;
17460
+ }
17461
+ function buildMenuFrame(selectedIndex, items = MENU_ITEMS, title = "Telemetry Control Panel", subtitle, options = {}) {
17435
17462
  const lines = [];
17436
17463
  const push = (line) => lines.push(line);
17464
+ const effectiveSubtitle = subtitle ?? computeMenuSubtitle(items, items !== MENU_ITEMS);
17437
17465
  if (options.showBanner ?? true) {
17438
17466
  push("");
17439
17467
  for (let i2 = 0; i2 < BANNER_LINES.length; i2++) {
@@ -17443,7 +17471,8 @@ function buildMenuFrame(selectedIndex, items = MENU_ITEMS, title = "Telemetry Co
17443
17471
  }
17444
17472
  push("");
17445
17473
  const badge = bg.teal(import_picocolors4.default.bold(colors.ink(" qodewk ")));
17446
- push(` ${colors.mutedSoft("\u250C")} ${badge} ${import_picocolors4.default.dim("v0.11.0")}`);
17474
+ const cliVer = resolveMenuCliVersion();
17475
+ push(` ${colors.mutedSoft("\u250C")} ${badge} ${import_picocolors4.default.dim(`v${cliVer}`)}`);
17447
17476
  push(` ${colors.mutedSoft("\u2502")}`);
17448
17477
  if (options.actionContext) {
17449
17478
  push(` ${colors.teal("\u25C7")} ${import_picocolors4.default.dim("Action:")} ${import_picocolors4.default.white(options.actionContext)}`);
@@ -17489,47 +17518,52 @@ function buildMenuFrame(selectedIndex, items = MENU_ITEMS, title = "Telemetry Co
17489
17518
  push(` ${colors.mutedSoft("\u2502")} ${colors.amber(selectedItem.description)}`);
17490
17519
  push(` ${colors.mutedSoft("\u2502")} ${divider}`);
17491
17520
  push(` ${colors.mutedSoft("\u2502")}`);
17492
- push(` ${colors.mutedSoft("\u2502")} ${import_picocolors4.default.dim(subtitle)}`);
17521
+ push(` ${colors.mutedSoft("\u2502")} ${import_picocolors4.default.dim(effectiveSubtitle)}`);
17493
17522
  push(` ${colors.mutedSoft("\u2502")} ${colors.green("[\u2713]")} ${import_picocolors4.default.dim("Source code was never uploaded to Qodewk")}`);
17494
17523
  push(` ${colors.mutedSoft("\u2514")}`);
17495
17524
  push("");
17496
17525
  return lines.join("\n");
17497
17526
  }
17498
17527
  function askLine(promptText) {
17499
- return new Promise((resolve7) => {
17528
+ return new Promise((resolve8) => {
17500
17529
  const rl = readline.createInterface({
17501
17530
  input: process.stdin,
17502
17531
  output: process.stdout
17503
17532
  });
17504
17533
  rl.question(promptText, (answer) => {
17505
17534
  rl.close();
17506
- resolve7(answer.trim());
17535
+ resolve8(answer.trim());
17507
17536
  });
17508
17537
  });
17509
17538
  }
17510
17539
  function waitForKeyToReturn() {
17511
- return new Promise((resolve7) => {
17540
+ return new Promise((resolve8) => {
17512
17541
  console.log(import_picocolors4.default.dim("\n Press any key or Enter to return to menu..."));
17513
17542
  if (!process.stdin.isTTY) {
17514
- resolve7();
17543
+ resolve8();
17515
17544
  return;
17516
17545
  }
17517
17546
  const wasRaw = process.stdin.isRaw;
17518
17547
  process.stdin.setRawMode(true);
17519
17548
  process.stdin.resume();
17520
- const onKey = () => {
17549
+ const onKey = (data) => {
17521
17550
  process.stdin.removeListener("data", onKey);
17522
17551
  if (wasRaw !== void 0) process.stdin.setRawMode(wasRaw);
17523
- resolve7();
17552
+ if (data && (data[0] === 3 || data.toString() === "")) {
17553
+ process.stdout.write("\x1B[?25h");
17554
+ console.log(import_picocolors4.default.dim("\n Exited Qodewk.\n"));
17555
+ process.exit(0);
17556
+ }
17557
+ resolve8();
17524
17558
  };
17525
17559
  process.stdin.once("data", onKey);
17526
17560
  });
17527
17561
  }
17528
17562
  function waitForKeyOrAction(promptText) {
17529
- return new Promise((resolve7) => {
17563
+ return new Promise((resolve8) => {
17530
17564
  console.log(promptText);
17531
17565
  if (!process.stdin.isTTY) {
17532
- resolve7("");
17566
+ resolve8("");
17533
17567
  return;
17534
17568
  }
17535
17569
  const wasRaw = process.stdin.isRaw;
@@ -17539,7 +17573,12 @@ function waitForKeyOrAction(promptText) {
17539
17573
  process.stdin.removeListener("data", onKey);
17540
17574
  if (wasRaw !== void 0) process.stdin.setRawMode(wasRaw);
17541
17575
  const str = data.toString();
17542
- resolve7(str);
17576
+ if (data[0] === 3 || str === "") {
17577
+ process.stdout.write("\x1B[?25h");
17578
+ console.log(import_picocolors4.default.dim("\n Exited Qodewk.\n"));
17579
+ process.exit(0);
17580
+ }
17581
+ resolve8(str);
17543
17582
  };
17544
17583
  process.stdin.once("data", onKey);
17545
17584
  });
@@ -17634,6 +17673,7 @@ async function runInteractiveMenu() {
17634
17673
  const repoContext = await getRepoContext();
17635
17674
  let currentScreen = "main";
17636
17675
  let selectedIndex = 0;
17676
+ let savedMainIndex = 0;
17637
17677
  let active = true;
17638
17678
  let lastRenderedLinesCount = 0;
17639
17679
  const getActiveItems = () => {
@@ -17644,7 +17684,7 @@ async function runInteractiveMenu() {
17644
17684
  const render = () => {
17645
17685
  const items = getActiveItems();
17646
17686
  const title = currentScreen === "main" ? "Telemetry Control Panel" : currentScreen === "receipt_horizon" ? "Generate Local Receipt" : "Publish Receipt to Cloud";
17647
- const subtitle = currentScreen === "main" ? "\u2191\u2193 move \xB7 enter select \xB7 0-7 quick jump \xB7 q quit" : "\u2191\u2193 move \xB7 enter select \xB7 0-5 quick jump \xB7 esc / 0 back";
17687
+ const subtitle = computeMenuSubtitle(items, currentScreen !== "main");
17648
17688
  const actionContext = currentScreen === "receipt_horizon" ? "Generate Local Receipt" : currentScreen === "share_horizon" ? "Publish Receipt to Cloud" : void 0;
17649
17689
  const showBanner = currentScreen === "main";
17650
17690
  const frame = buildMenuFrame(selectedIndex, items, title, subtitle, {
@@ -17715,7 +17755,7 @@ async function runInteractiveMenu() {
17715
17755
  await waitForKeyToReturn();
17716
17756
  }
17717
17757
  currentScreen = "main";
17718
- selectedIndex = 0;
17758
+ selectedIndex = savedMainIndex;
17719
17759
  };
17720
17760
  const executeShareHorizon = async (item) => {
17721
17761
  cleanup();
@@ -17752,7 +17792,7 @@ async function runInteractiveMenu() {
17752
17792
  }
17753
17793
  await waitForKeyToReturn();
17754
17794
  currentScreen = "main";
17755
- selectedIndex = 0;
17795
+ selectedIndex = savedMainIndex;
17756
17796
  };
17757
17797
  const executeSelectedAction = async () => {
17758
17798
  cleanup();
@@ -17851,7 +17891,9 @@ async function runInteractiveMenu() {
17851
17891
  console.log(" [0] Back to main menu");
17852
17892
  console.log("");
17853
17893
  const choice = await askLine(" \u203A Select option [0-3]: ");
17854
- if (choice === "1") {
17894
+ if (choice === "0" || !choice) {
17895
+ return;
17896
+ } else if (choice === "1") {
17855
17897
  if (status.hooksDir) {
17856
17898
  const targets = ["post-commit", "post-rewrite"];
17857
17899
  for (const t2 of targets) {
@@ -17859,6 +17901,7 @@ async function runInteractiveMenu() {
17859
17901
  }
17860
17902
  console.log(colors.green("\n [\u2713] Non-blocking hooks installed successfully."));
17861
17903
  }
17904
+ await waitForKeyToReturn();
17862
17905
  } else if (choice === "2") {
17863
17906
  if (status.hooksDir) {
17864
17907
  const targets = ["post-commit", "post-rewrite"];
@@ -17867,12 +17910,17 @@ async function runInteractiveMenu() {
17867
17910
  }
17868
17911
  console.log(colors.green("\n [\u2713] Qodewk hooks removed."));
17869
17912
  }
17913
+ await waitForKeyToReturn();
17870
17914
  } else if (choice === "3") {
17871
17915
  const hooks = auditGitHooks();
17872
17916
  const bench = await benchmarkHookLatency();
17873
17917
  console.log(formatHookTestReport(hooks, bench));
17918
+ await waitForKeyToReturn();
17919
+ } else {
17920
+ console.log(import_picocolors4.default.yellow(`
17921
+ Option '${choice}' is not recognized.`));
17922
+ await waitForKeyToReturn();
17874
17923
  }
17875
- await waitForKeyToReturn();
17876
17924
  };
17877
17925
  const manageGitNotesSubmenu = async () => {
17878
17926
  console.log(import_picocolors4.default.bold(import_picocolors4.default.white("\n Qodewk Git Notes Management (refs/notes/qodewk)")));
@@ -17883,7 +17931,9 @@ async function runInteractiveMenu() {
17883
17931
  console.log(" [0] Back to main menu");
17884
17932
  console.log("");
17885
17933
  const choice = await askLine(" \u203A Select option [0-3]: ");
17886
- if (choice === "1") {
17934
+ if (choice === "0" || !choice) {
17935
+ return;
17936
+ } else if (choice === "1") {
17887
17937
  try {
17888
17938
  const shas = await listGitReceiptNotes();
17889
17939
  if (shas.length === 0) {
@@ -17900,6 +17950,7 @@ async function runInteractiveMenu() {
17900
17950
  console.error(import_picocolors4.default.red(`
17901
17951
  Error listing Git notes: ${message}`));
17902
17952
  }
17953
+ await waitForKeyToReturn();
17903
17954
  } else if (choice === "2") {
17904
17955
  const commit = await askLine(" \u203A Commit SHA or ref [default: HEAD]: ") || "HEAD";
17905
17956
  try {
@@ -17915,6 +17966,7 @@ async function runInteractiveMenu() {
17915
17966
  console.error(import_picocolors4.default.red(`
17916
17967
  Error reading Git note: ${message}`));
17917
17968
  }
17969
+ await waitForKeyToReturn();
17918
17970
  } else if (choice === "3") {
17919
17971
  const commit = await askLine(" \u203A Commit SHA to attach note [default: HEAD]: ") || "HEAD";
17920
17972
  try {
@@ -17931,8 +17983,12 @@ async function runInteractiveMenu() {
17931
17983
  console.error(import_picocolors4.default.red(`
17932
17984
  Error writing Git note: ${message}`));
17933
17985
  }
17986
+ await waitForKeyToReturn();
17987
+ } else {
17988
+ console.log(import_picocolors4.default.yellow(`
17989
+ Option '${choice}' is not recognized.`));
17990
+ await waitForKeyToReturn();
17934
17991
  }
17935
- await waitForKeyToReturn();
17936
17992
  };
17937
17993
  const showStorageStatus = async () => {
17938
17994
  console.log(import_picocolors4.default.bold(import_picocolors4.default.white("\n Qodewk Local Database & Storage Status")));
@@ -17948,6 +18004,10 @@ async function runInteractiveMenu() {
17948
18004
  console.log("");
17949
18005
  if (recent.length === 0) {
17950
18006
  console.log(import_picocolors4.default.dim(" No stored receipts yet. Run 'Generate Local Receipt' to record your first."));
18007
+ console.log("");
18008
+ console.log(` ${colors.green("[\u2713]")} ${import_picocolors4.default.dim("Privacy guarantee: raw source code is never stored in SQLite")}`);
18009
+ await waitForKeyToReturn();
18010
+ return;
17951
18011
  } else {
17952
18012
  console.log(import_picocolors4.default.dim(" Recent Receipts:"));
17953
18013
  console.log(import_picocolors4.default.dim(" " + "ID".padEnd(26) + "DATE".padEnd(12) + "BRANCH".padEnd(18) + "COST"));
@@ -17973,14 +18033,18 @@ async function runInteractiveMenu() {
17973
18033
  return;
17974
18034
  } else {
17975
18035
  console.log(import_picocolors4.default.yellow(` No stored receipt matching '${ans}' found.`));
18036
+ await waitForKeyToReturn();
18037
+ return;
17976
18038
  }
18039
+ } else {
18040
+ return;
17977
18041
  }
17978
18042
  }
17979
18043
  } catch (err) {
17980
18044
  const message = err instanceof Error ? err.message : String(err);
17981
18045
  console.error(import_picocolors4.default.red(` Failed to inspect storage: ${message}`));
18046
+ await waitForKeyToReturn();
17982
18047
  }
17983
- await waitForKeyToReturn();
17984
18048
  };
17985
18049
  const runDoctorDiagnosticsAction = async () => {
17986
18050
  console.log(import_picocolors4.default.bold(import_picocolors4.default.white("\n Qodewk System Health & Diagnostics (Doctor)")));
@@ -18016,17 +18080,56 @@ async function runInteractiveMenu() {
18016
18080
  process.stdin.setRawMode(true);
18017
18081
  process.stdin.resume();
18018
18082
  render();
18083
+ const executeItem = async (selected) => {
18084
+ if (currentScreen === "main") {
18085
+ if (selected.id === "receipt") {
18086
+ savedMainIndex = selectedIndex;
18087
+ currentScreen = "receipt_horizon";
18088
+ selectedIndex = 0;
18089
+ if (active) startLoop();
18090
+ return;
18091
+ }
18092
+ if (selected.id === "share") {
18093
+ savedMainIndex = selectedIndex;
18094
+ currentScreen = "share_horizon";
18095
+ selectedIndex = 0;
18096
+ if (active) startLoop();
18097
+ return;
18098
+ }
18099
+ await executeSelectedAction();
18100
+ } else if (currentScreen === "receipt_horizon") {
18101
+ if (selected.id === "back") {
18102
+ currentScreen = "main";
18103
+ selectedIndex = savedMainIndex;
18104
+ if (active) startLoop();
18105
+ return;
18106
+ }
18107
+ await executeReceiptHorizon(selected);
18108
+ } else if (currentScreen === "share_horizon") {
18109
+ if (selected.id === "back") {
18110
+ currentScreen = "main";
18111
+ selectedIndex = savedMainIndex;
18112
+ if (active) startLoop();
18113
+ return;
18114
+ }
18115
+ await executeShareHorizon(selected);
18116
+ }
18117
+ if (active) {
18118
+ startLoop();
18119
+ }
18120
+ };
18019
18121
  const onKeypress = async (_str, key) => {
18020
18122
  if (!active) return;
18021
18123
  const items = getActiveItems();
18022
18124
  if (key.ctrl && key.name === "c") {
18023
18125
  cleanup();
18126
+ console.log(import_picocolors4.default.dim("\n Exited Qodewk.\n"));
18024
18127
  process.exit(0);
18025
18128
  }
18026
18129
  if (key.name === "q" || key.name === "escape") {
18027
18130
  if (currentScreen !== "main") {
18028
18131
  currentScreen = "main";
18029
- selectedIndex = 0;
18132
+ selectedIndex = savedMainIndex;
18030
18133
  render();
18031
18134
  return;
18032
18135
  }
@@ -18045,86 +18148,18 @@ async function runInteractiveMenu() {
18045
18148
  return;
18046
18149
  }
18047
18150
  const itemByKey = items.findIndex(
18048
- (item) => item.key === key.name || item.key === _str || _str && _str.toLowerCase() === "c" && item.id === "chats"
18151
+ (item) => item.key === key.name || item.key === _str
18049
18152
  );
18050
18153
  if (itemByKey !== -1) {
18051
18154
  selectedIndex = itemByKey;
18052
18155
  render();
18053
18156
  process.stdin.removeListener("keypress", onKeypress);
18054
- const selected = items[selectedIndex];
18055
- if (currentScreen === "main") {
18056
- if (selected.id === "receipt") {
18057
- currentScreen = "receipt_horizon";
18058
- selectedIndex = 0;
18059
- if (active) startLoop();
18060
- return;
18061
- }
18062
- if (selected.id === "share") {
18063
- currentScreen = "share_horizon";
18064
- selectedIndex = 0;
18065
- if (active) startLoop();
18066
- return;
18067
- }
18068
- await executeSelectedAction();
18069
- } else if (currentScreen === "receipt_horizon") {
18070
- if (selected.id === "back") {
18071
- currentScreen = "main";
18072
- selectedIndex = 0;
18073
- if (active) startLoop();
18074
- return;
18075
- }
18076
- await executeReceiptHorizon(selected);
18077
- } else if (currentScreen === "share_horizon") {
18078
- if (selected.id === "back") {
18079
- currentScreen = "main";
18080
- selectedIndex = 0;
18081
- if (active) startLoop();
18082
- return;
18083
- }
18084
- await executeShareHorizon(selected);
18085
- }
18086
- if (active) {
18087
- startLoop();
18088
- }
18157
+ await executeItem(items[selectedIndex]);
18089
18158
  return;
18090
18159
  }
18091
18160
  if (key.name === "return" || key.name === "enter") {
18092
18161
  process.stdin.removeListener("keypress", onKeypress);
18093
- const selected = items[selectedIndex];
18094
- if (currentScreen === "main") {
18095
- if (selected.id === "receipt") {
18096
- currentScreen = "receipt_horizon";
18097
- selectedIndex = 0;
18098
- if (active) startLoop();
18099
- return;
18100
- }
18101
- if (selected.id === "share") {
18102
- currentScreen = "share_horizon";
18103
- selectedIndex = 0;
18104
- if (active) startLoop();
18105
- return;
18106
- }
18107
- await executeSelectedAction();
18108
- } else if (currentScreen === "receipt_horizon") {
18109
- if (selected.id === "back") {
18110
- currentScreen = "main";
18111
- selectedIndex = 0;
18112
- if (active) startLoop();
18113
- return;
18114
- }
18115
- await executeReceiptHorizon(selected);
18116
- } else if (currentScreen === "share_horizon") {
18117
- if (selected.id === "back") {
18118
- currentScreen = "main";
18119
- selectedIndex = 0;
18120
- if (active) startLoop();
18121
- return;
18122
- }
18123
- await executeShareHorizon(selected);
18124
- }
18125
- if (active) {
18126
- startLoop();
18127
- }
18162
+ await executeItem(items[selectedIndex]);
18128
18163
  return;
18129
18164
  }
18130
18165
  };
@@ -18144,13 +18179,13 @@ function resolveCliVersion() {
18144
18179
  path17.join(argv1, "package.json")
18145
18180
  ];
18146
18181
  for (const candidate of candidates) {
18147
- if (!fs15.existsSync(candidate)) continue;
18148
- const pkg = JSON.parse(fs15.readFileSync(candidate, "utf-8"));
18182
+ if (!fs16.existsSync(candidate)) continue;
18183
+ const pkg = JSON.parse(fs16.readFileSync(candidate, "utf-8"));
18149
18184
  if (pkg.name === "qodewk" && pkg.version) return pkg.version;
18150
18185
  }
18151
18186
  } catch {
18152
18187
  }
18153
- return "0.11.0";
18188
+ return "0.11.1";
18154
18189
  }
18155
18190
  function resolveSince(options) {
18156
18191
  return options.today ? "today" : options.since;
@@ -18358,8 +18393,8 @@ hookCommand.command("install").description("Install non-blocking post-commit and
18358
18393
  console.error(import_picocolors5.default.red("Error: Current directory is not a Git repository (.git not found)."));
18359
18394
  process.exit(1);
18360
18395
  }
18361
- if (!fs15.existsSync(hooksDir)) {
18362
- fs15.mkdirSync(hooksDir, { recursive: true });
18396
+ if (!fs16.existsSync(hooksDir)) {
18397
+ fs16.mkdirSync(hooksDir, { recursive: true });
18363
18398
  }
18364
18399
  const targets = ["post-commit", "post-rewrite"];
18365
18400
  let installed = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qodewk",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Universal telemetry and digital receipt generator for the AI coding agent era",
5
5
  "type": "module",
6
6
  "bin": {