@adhdev/daemon-standalone 1.0.35-rc.3 → 1.0.35-rc.5

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
@@ -3618,13 +3618,12 @@ var require_dist = __commonJS({
3618
3618
  delete env2.CODEX_SANDBOX_NETWORK_DISABLED;
3619
3619
  delete env2.NO_COLOR;
3620
3620
  delete env2.COLOR;
3621
- if (process.platform === "win32") {
3622
- delete env2.CLAUDECODE;
3623
- delete env2.CLAUDE_CODE_CHILD_SESSION;
3624
- delete env2.CLAUDE_CODE_ENTRYPOINT;
3625
- delete env2.CLAUDE_CODE_SESSION_ID;
3626
- delete env2.CLAUDE_CODE_EXECPATH;
3627
- }
3621
+ delete env2.CLAUDECODE;
3622
+ delete env2.CLAUDE_CODE_CHILD_SESSION;
3623
+ delete env2.CLAUDE_CODE_ENTRYPOINT;
3624
+ delete env2.CLAUDE_CODE_SESSION_ID;
3625
+ delete env2.CLAUDE_CODE_EXECPATH;
3626
+ delete env2.CLAUDE_CODE_BRIDGE_SESSION_ID;
3628
3627
  applyTerminalColorEnv(env2);
3629
3628
  return env2;
3630
3629
  }
@@ -33319,10 +33318,10 @@ var require_dist3 = __commonJS({
33319
33318
  }
33320
33319
  function getDaemonBuildInfo() {
33321
33320
  if (cached2) return cached2;
33322
- const commit = readInjected(true ? "3875b913f032a9f2012318bcb7904a2c96f6f965" : void 0) ?? "unknown";
33323
- const commitShort = readInjected(true ? "3875b913" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
33324
- const version2 = readInjected(true ? "1.0.35-rc.3" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
33325
- const builtAt = readInjected(true ? "2026-08-05T03:04:28.158Z" : void 0);
33321
+ const commit = readInjected(true ? "779c70393f71e828ab2118cc7f380e039303dbec" : void 0) ?? "unknown";
33322
+ const commitShort = readInjected(true ? "779c7039" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
33323
+ const version2 = readInjected(true ? "1.0.35-rc.5" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
33324
+ const builtAt = readInjected(true ? "2026-08-05T04:05:28.069Z" : void 0);
33326
33325
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
33327
33326
  return cached2;
33328
33327
  }
@@ -35881,7 +35880,7 @@ child.on('exit', () => process.exit(0));
35881
35880
  return quotaFailure(
35882
35881
  "kimi",
35883
35882
  "error",
35884
- "Kimi session expired \u2014 run kimi on this machine to refresh, then retry",
35883
+ "Kimi access token expired (they last ~15 min) \u2014 the kimi CLI refreshes it on next use; quota will report again after that.",
35885
35884
  { source: "oauth", failureKind: "expired-token" }
35886
35885
  );
35887
35886
  }
@@ -48944,8 +48943,8 @@ ${rendered}`, "utf-8");
48944
48943
  const remaining = (existing.slice(0, openIdx) + existing.slice(closeIdx + CLOSE.length)).replace(/^\s*\n+/, "").replace(/\n+\s*$/, "");
48945
48944
  if (!remaining.trim()) {
48946
48945
  try {
48947
- const fs51 = require("fs");
48948
- fs51.unlinkSync(filePath);
48946
+ const fs52 = require("fs");
48947
+ fs52.unlinkSync(filePath);
48949
48948
  } catch {
48950
48949
  }
48951
48950
  } else {
@@ -50078,11 +50077,11 @@ ${rendered}`, "utf-8");
50078
50077
  }
50079
50078
  function windowsExtraBinDirs() {
50080
50079
  const dirs = [];
50081
- const fs51 = require("fs");
50080
+ const fs52 = require("fs");
50082
50081
  const push = (dir) => {
50083
50082
  if (!dir) return;
50084
50083
  try {
50085
- if (fs51.existsSync(dir)) dirs.push(dir);
50084
+ if (fs52.existsSync(dir)) dirs.push(dir);
50086
50085
  } catch {
50087
50086
  }
50088
50087
  };
@@ -50098,12 +50097,12 @@ ${rendered}`, "utf-8");
50098
50097
  }
50099
50098
  function unixExtraBinDirs() {
50100
50099
  const dirs = [];
50101
- const fs51 = require("fs");
50100
+ const fs52 = require("fs");
50102
50101
  const home = os8.homedir();
50103
50102
  const push = (dir) => {
50104
50103
  if (!dir) return;
50105
50104
  try {
50106
- if (fs51.existsSync(dir)) dirs.push(dir);
50105
+ if (fs52.existsSync(dir)) dirs.push(dir);
50107
50106
  } catch {
50108
50107
  }
50109
50108
  };
@@ -50142,9 +50141,9 @@ ${rendered}`, "utf-8");
50142
50141
  for (const ext of exes) {
50143
50142
  const fullPath = path15.join(p, trimmed + ext);
50144
50143
  try {
50145
- const fs51 = require("fs");
50146
- if (fs51.existsSync(fullPath)) {
50147
- const stat2 = fs51.statSync(fullPath);
50144
+ const fs52 = require("fs");
50145
+ if (fs52.existsSync(fullPath)) {
50146
+ const stat2 = fs52.statSync(fullPath);
50148
50147
  if (stat2.isFile() && (isWin || stat2.mode & 73)) {
50149
50148
  return fullPath;
50150
50149
  }
@@ -50158,12 +50157,12 @@ ${rendered}`, "utf-8");
50158
50157
  function isScriptBinary(binaryPath) {
50159
50158
  if (!path15.isAbsolute(binaryPath)) return false;
50160
50159
  try {
50161
- const fs51 = require("fs");
50162
- const resolved = fs51.realpathSync(binaryPath);
50160
+ const fs52 = require("fs");
50161
+ const resolved = fs52.realpathSync(binaryPath);
50163
50162
  const head = Buffer.alloc(8);
50164
- const fd = fs51.openSync(resolved, "r");
50165
- fs51.readSync(fd, head, 0, 8, 0);
50166
- fs51.closeSync(fd);
50163
+ const fd = fs52.openSync(resolved, "r");
50164
+ fs52.readSync(fd, head, 0, 8, 0);
50165
+ fs52.closeSync(fd);
50167
50166
  let i = 0;
50168
50167
  if (head[0] === 239 && head[1] === 187 && head[2] === 191) i = 3;
50169
50168
  return head[i] === 35 && head[i + 1] === 33;
@@ -50174,12 +50173,12 @@ ${rendered}`, "utf-8");
50174
50173
  function looksLikeMachOOrElf(filePath) {
50175
50174
  if (!path15.isAbsolute(filePath)) return false;
50176
50175
  try {
50177
- const fs51 = require("fs");
50178
- const resolved = fs51.realpathSync(filePath);
50176
+ const fs52 = require("fs");
50177
+ const resolved = fs52.realpathSync(filePath);
50179
50178
  const buf = Buffer.alloc(8);
50180
- const fd = fs51.openSync(resolved, "r");
50181
- fs51.readSync(fd, buf, 0, 8, 0);
50182
- fs51.closeSync(fd);
50179
+ const fd = fs52.openSync(resolved, "r");
50180
+ fs52.readSync(fd, buf, 0, 8, 0);
50181
+ fs52.closeSync(fd);
50183
50182
  let i = 0;
50184
50183
  if (buf[0] === 239 && buf[1] === 187 && buf[2] === 191) i = 3;
50185
50184
  const b = buf.subarray(i);
@@ -66571,8 +66570,8 @@ ${cleanBody}`;
66571
66570
  let cwd = options.cwd;
66572
66571
  if (cwd) {
66573
66572
  try {
66574
- const fs51 = require("fs");
66575
- const stat2 = fs51.statSync(cwd);
66573
+ const fs52 = require("fs");
66574
+ const stat2 = fs52.statSync(cwd);
66576
66575
  if (!stat2.isDirectory()) cwd = os14.homedir();
66577
66576
  } catch {
66578
66577
  cwd = os14.homedir();
@@ -84672,7 +84671,7 @@ ${effect.notification.body || ""}`.trim();
84672
84671
  return { success: false, error: "invalid type" };
84673
84672
  }
84674
84673
  const https = require("https");
84675
- const fs51 = require("fs");
84674
+ const fs52 = require("fs");
84676
84675
  const path53 = require("path");
84677
84676
  const cfg = loadConfig2();
84678
84677
  const REGISTRY = resolveRegistryBaseUrl(cfg.registryUrl, process.env, cfg.serverUrl);
@@ -84716,7 +84715,7 @@ ${effect.notification.body || ""}`.trim();
84716
84715
  if (!targetDir.startsWith(installRootResolved + path53.sep)) {
84717
84716
  return { success: false, error: "install path escaped upstream root" };
84718
84717
  }
84719
- fs51.mkdirSync(targetDir, { recursive: true });
84718
+ fs52.mkdirSync(targetDir, { recursive: true });
84720
84719
  let manifestProbe = {};
84721
84720
  try {
84722
84721
  manifestProbe = JSON.parse(manifestBody);
@@ -84741,7 +84740,7 @@ ${formatManifestValidationIssues2(validation.issues)}`,
84741
84740
  }
84742
84741
  const targetFile = isV1 ? "provider.v1.json" : "provider.json";
84743
84742
  const targetPath = path53.join(targetDir, targetFile);
84744
- fs51.writeFileSync(targetPath, manifestBody, "utf-8");
84743
+ fs52.writeFileSync(targetPath, manifestBody, "utf-8");
84745
84744
  const manifestJson = JSON.parse(manifestBody);
84746
84745
  const scriptFetch = await this.fetchProviderSources(
84747
84746
  manifestJson,
@@ -84811,7 +84810,7 @@ ${formatManifestValidationIssues2(validation.issues)}`,
84811
84810
  const repo = source.repo;
84812
84811
  const ref = source.ref;
84813
84812
  const https = require("https");
84814
- const fs51 = require("fs");
84813
+ const fs52 = require("fs");
84815
84814
  const path53 = require("path");
84816
84815
  function fetchJson(url2, timeoutMs) {
84817
84816
  return new Promise((resolve29, reject) => {
@@ -84895,8 +84894,8 @@ ${formatManifestValidationIssues2(validation.issues)}`,
84895
84894
  const relInside = entry.path.startsWith(sharedDirRel + "/") ? entry.path.slice(sharedDirRel.length + 1) : entry.path;
84896
84895
  const outPath = path53.resolve(path53.join(sharedTargetDir, relInside));
84897
84896
  if (!outPath.startsWith(path53.resolve(sharedTargetDir) + path53.sep)) continue;
84898
- fs51.mkdirSync(path53.dirname(outPath), { recursive: true });
84899
- fs51.writeFileSync(outPath, body);
84897
+ fs52.mkdirSync(path53.dirname(outPath), { recursive: true });
84898
+ fs52.writeFileSync(outPath, body);
84900
84899
  fetchedCount++;
84901
84900
  } catch (e) {
84902
84901
  errors.push(`fetch shared ${entry.path}: ${e?.message ?? e}`);
@@ -84934,8 +84933,8 @@ ${formatManifestValidationIssues2(validation.issues)}`,
84934
84933
  errors.push(`refusing to write outside targetDir: ${entry.path}`);
84935
84934
  continue;
84936
84935
  }
84937
- fs51.mkdirSync(path53.dirname(outPath), { recursive: true });
84938
- fs51.writeFileSync(outPath, body);
84936
+ fs52.mkdirSync(path53.dirname(outPath), { recursive: true });
84937
+ fs52.writeFileSync(outPath, body);
84939
84938
  fetchedCount++;
84940
84939
  } catch (e) {
84941
84940
  errors.push(`fetch ${entry.path}: ${e?.message ?? e}`);
@@ -84963,7 +84962,7 @@ ${formatManifestValidationIssues2(validation.issues)}`,
84963
84962
  if (!["cli", "ide", "extension", "acp"].includes(category)) {
84964
84963
  return { success: false, error: `unknown category: ${category}` };
84965
84964
  }
84966
- const fs51 = require("fs");
84965
+ const fs52 = require("fs");
84967
84966
  const path53 = require("path");
84968
84967
  try {
84969
84968
  const installRoot = this.getUpstreamInstallRoot();
@@ -84972,10 +84971,10 @@ ${formatManifestValidationIssues2(validation.issues)}`,
84972
84971
  if (!targetDir.startsWith(installRootResolved + path53.sep)) {
84973
84972
  return { success: false, error: "refusing to delete outside upstream root" };
84974
84973
  }
84975
- if (!fs51.existsSync(targetDir)) {
84974
+ if (!fs52.existsSync(targetDir)) {
84976
84975
  return { success: false, error: "not installed" };
84977
84976
  }
84978
- fs51.rmSync(targetDir, { recursive: true, force: true });
84977
+ fs52.rmSync(targetDir, { recursive: true, force: true });
84979
84978
  try {
84980
84979
  this._ctx.providerLoader?.deactivateVerifiedChannel?.(type2);
84981
84980
  } catch {
@@ -84995,28 +84994,28 @@ ${formatManifestValidationIssues2(validation.issues)}`,
84995
84994
  * the UI and by the update checker.
84996
84995
  */
84997
84996
  handleListInstalledProviders(_args) {
84998
- const fs51 = require("fs");
84997
+ const fs52 = require("fs");
84999
84998
  const path53 = require("path");
85000
84999
  const installRoot = this.getUpstreamInstallRoot();
85001
- if (!fs51.existsSync(installRoot)) return { success: true, providers: [] };
85000
+ if (!fs52.existsSync(installRoot)) return { success: true, providers: [] };
85002
85001
  const CATEGORIES = ["cli", "ide", "extension", "acp"];
85003
85002
  const items = [];
85004
85003
  for (const category of CATEGORIES) {
85005
85004
  const categoryDir = path53.join(installRoot, category);
85006
- if (!fs51.existsSync(categoryDir)) continue;
85005
+ if (!fs52.existsSync(categoryDir)) continue;
85007
85006
  let entries;
85008
85007
  try {
85009
- entries = fs51.readdirSync(categoryDir);
85008
+ entries = fs52.readdirSync(categoryDir);
85010
85009
  } catch {
85011
85010
  continue;
85012
85011
  }
85013
85012
  for (const type2 of entries) {
85014
85013
  const v1Path = path53.join(categoryDir, type2, "provider.v1.json");
85015
85014
  const v0Path = path53.join(categoryDir, type2, "provider.json");
85016
- const manifestPath = fs51.existsSync(v1Path) ? v1Path : fs51.existsSync(v0Path) ? v0Path : null;
85015
+ const manifestPath = fs52.existsSync(v1Path) ? v1Path : fs52.existsSync(v0Path) ? v0Path : null;
85017
85016
  if (!manifestPath) continue;
85018
85017
  try {
85019
- const m = JSON.parse(fs51.readFileSync(manifestPath, "utf-8"));
85018
+ const m = JSON.parse(fs52.readFileSync(manifestPath, "utf-8"));
85020
85019
  const modelOptions = Array.isArray(m.modelOptions) ? m.modelOptions.filter((x) => typeof x === "string" && !!x.trim()) : [];
85021
85020
  const thinkingLevelOptions = Array.isArray(m.thinkingLevelOptions) ? m.thinkingLevelOptions.filter((x) => typeof x === "string" && !!x.trim()) : [];
85022
85021
  items.push({
@@ -85138,7 +85137,7 @@ ${formatManifestValidationIssues2(validation.issues)}`,
85138
85137
  if (!/^@[a-z0-9_-]+$/i.test(requestedName)) {
85139
85138
  return { success: false, error: "name must match @[a-z0-9_-]+" };
85140
85139
  }
85141
- const fs51 = require("fs");
85140
+ const fs52 = require("fs");
85142
85141
  const path53 = require("path");
85143
85142
  const { spawnSync: spawnSync3 } = require("child_process");
85144
85143
  const file2 = ext.loadExternalSources();
@@ -85149,8 +85148,8 @@ ${formatManifestValidationIssues2(validation.issues)}`,
85149
85148
  return { success: false, error: `source url+ref already registered (use a different name to track another ref)` };
85150
85149
  }
85151
85150
  const sourceDir = path53.join(ext.externalRoot(), requestedName);
85152
- if (!fs51.existsSync(ext.externalRoot())) fs51.mkdirSync(ext.externalRoot(), { recursive: true });
85153
- if (fs51.existsSync(sourceDir)) {
85151
+ if (!fs52.existsSync(ext.externalRoot())) fs52.mkdirSync(ext.externalRoot(), { recursive: true });
85152
+ if (fs52.existsSync(sourceDir)) {
85154
85153
  return { success: false, error: `directory already exists: ${sourceDir} (rename or remove first)` };
85155
85154
  }
85156
85155
  const clone2 = spawnSync3("git", ["clone", "--depth=1", "--branch", ref, "--", url2, sourceDir], {
@@ -85160,7 +85159,7 @@ ${formatManifestValidationIssues2(validation.issues)}`,
85160
85159
  });
85161
85160
  if (clone2.status !== 0) {
85162
85161
  try {
85163
- fs51.rmSync(sourceDir, { recursive: true, force: true });
85162
+ fs52.rmSync(sourceDir, { recursive: true, force: true });
85164
85163
  } catch {
85165
85164
  }
85166
85165
  return { success: false, error: `git clone failed: ${(clone2.stderr || clone2.stdout || "").trim() || "unknown error"}` };
@@ -85204,15 +85203,15 @@ ${formatManifestValidationIssues2(validation.issues)}`,
85204
85203
  const name = typeof args?.name === "string" ? args.name.trim() : "";
85205
85204
  if (!name) return { success: false, error: "name is required" };
85206
85205
  const ext = (init_external_sources(), __toCommonJS2(external_sources_exports));
85207
- const fs51 = require("fs");
85206
+ const fs52 = require("fs");
85208
85207
  const path53 = require("path");
85209
85208
  const file2 = ext.loadExternalSources();
85210
85209
  const match = file2.sources.find((s2) => s2.name === name);
85211
85210
  if (!match) return { success: false, error: `source "${name}" not registered` };
85212
85211
  const sourceDir = path53.join(ext.externalRoot(), name);
85213
- if (fs51.existsSync(sourceDir)) {
85212
+ if (fs52.existsSync(sourceDir)) {
85214
85213
  try {
85215
- fs51.rmSync(sourceDir, { recursive: true, force: true });
85214
+ fs52.rmSync(sourceDir, { recursive: true, force: true });
85216
85215
  } catch (e) {
85217
85216
  return { success: false, error: `failed to delete ${sourceDir}: ${e?.message || e}` };
85218
85217
  }
@@ -86065,14 +86064,14 @@ ${formatManifestValidationIssues2(validation.issues)}`,
86065
86064
  }
86066
86065
  },
86067
86066
  list_coordinator_prompts: async (_ctx, _args) => {
86068
- const fs51 = await import("fs");
86067
+ const fs52 = await import("fs");
86069
86068
  const path53 = await import("path");
86070
86069
  const { getConfigDir: getConfigDir22 } = await Promise.resolve().then(() => (init_config(), config_exports));
86071
86070
  const dir = path53.join(getConfigDir22(), "coordinator-prompts");
86072
86071
  const entries = {};
86073
86072
  try {
86074
- if (fs51.existsSync(dir)) {
86075
- for (const name of fs51.readdirSync(dir)) {
86073
+ if (fs52.existsSync(dir)) {
86074
+ for (const name of fs52.readdirSync(dir)) {
86076
86075
  const matchOverride = name.match(/^([a-zA-Z0-9_.-]+)\.md$/);
86077
86076
  const matchAppend = name.match(/^([a-zA-Z0-9_.-]+)\.append\.md$/);
86078
86077
  const m = matchAppend || matchOverride;
@@ -86082,7 +86081,7 @@ ${formatManifestValidationIssues2(validation.issues)}`,
86082
86081
  const full = path53.join(dir, name);
86083
86082
  let content = "";
86084
86083
  try {
86085
- content = fs51.readFileSync(full, "utf8");
86084
+ content = fs52.readFileSync(full, "utf8");
86086
86085
  } catch {
86087
86086
  }
86088
86087
  if (!entries[key2]) entries[key2] = { override: "", append: "" };
@@ -86096,7 +86095,7 @@ ${formatManifestValidationIssues2(validation.issues)}`,
86096
86095
  return { success: true, dir, entries };
86097
86096
  },
86098
86097
  write_coordinator_prompt: async (_ctx, args) => {
86099
- const fs51 = await import("fs");
86098
+ const fs52 = await import("fs");
86100
86099
  const path53 = await import("path");
86101
86100
  const { getConfigDir: getConfigDir22 } = await Promise.resolve().then(() => (init_config(), config_exports));
86102
86101
  const key2 = typeof args?.key === "string" ? args.key.trim() : "";
@@ -86109,11 +86108,11 @@ ${formatManifestValidationIssues2(validation.issues)}`,
86109
86108
  const filename = kind === "append" ? `${key2}.append.md` : `${key2}.md`;
86110
86109
  const full = path53.join(dir, filename);
86111
86110
  try {
86112
- fs51.mkdirSync(dir, { recursive: true });
86111
+ fs52.mkdirSync(dir, { recursive: true });
86113
86112
  if (content.trim()) {
86114
- fs51.writeFileSync(full, content, { encoding: "utf8", mode: 384 });
86115
- } else if (fs51.existsSync(full)) {
86116
- fs51.unlinkSync(full);
86113
+ fs52.writeFileSync(full, content, { encoding: "utf8", mode: 384 });
86114
+ } else if (fs52.existsSync(full)) {
86115
+ fs52.unlinkSync(full);
86117
86116
  }
86118
86117
  return { success: true, path: full, kind, key: key2 };
86119
86118
  } catch (error48) {
@@ -102111,7 +102110,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
102111
102110
  }
102112
102111
  if (providerDir) {
102113
102112
  try {
102114
- const fs51 = require("fs");
102113
+ const fs52 = require("fs");
102115
102114
  const path53 = require("path");
102116
102115
  const candidates = [];
102117
102116
  if (Array.isArray(base.compatibility)) {
@@ -102123,13 +102122,13 @@ Run 'adhdev doctor' for detailed diagnostics.`
102123
102122
  }
102124
102123
  candidates.push(path53.join(providerDir, "specs", "default.json"));
102125
102124
  candidates.push(path53.join(providerDir, "spec.json"));
102126
- const specPath = candidates.find((p) => fs51.existsSync(p));
102125
+ const specPath = candidates.find((p) => fs52.existsSync(p));
102127
102126
  let nh;
102128
102127
  if (specPath) {
102129
102128
  resolved._resolvedSpecPath = specPath;
102130
102129
  let specControls;
102131
102130
  try {
102132
- const rawSpec = JSON.parse(fs51.readFileSync(specPath, "utf8"));
102131
+ const rawSpec = JSON.parse(fs52.readFileSync(specPath, "utf8"));
102133
102132
  specControls = rawSpec.control_bar;
102134
102133
  nh = rawSpec.native_history;
102135
102134
  } catch {
@@ -102172,7 +102171,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
102172
102171
  }
102173
102172
  } else if (nh.override_path) {
102174
102173
  const overrideFile = path53.resolve(providerDir, nh.override_path);
102175
- if (fs51.existsSync(overrideFile)) {
102174
+ if (fs52.existsSync(overrideFile)) {
102176
102175
  try {
102177
102176
  registerProviderScriptRootSafely(path53.dirname(path53.dirname(providerDir)));
102178
102177
  delete require.cache[require.resolve(overrideFile)];
@@ -103383,7 +103382,7 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
103383
103382
  }
103384
103383
  } else if (plat === "win32") {
103385
103384
  try {
103386
- const fs51 = require("fs");
103385
+ const fs52 = require("fs");
103387
103386
  const appNameMap = getMacAppIdentifiers();
103388
103387
  const appName = appNameMap[ideId];
103389
103388
  if (appName) {
@@ -103392,8 +103391,8 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
103392
103391
  appName,
103393
103392
  "storage.json"
103394
103393
  );
103395
- if (fs51.existsSync(storagePath)) {
103396
- const data = JSON.parse(fs51.readFileSync(storagePath, "utf-8"));
103394
+ if (fs52.existsSync(storagePath)) {
103395
+ const data = JSON.parse(fs52.readFileSync(storagePath, "utf-8"));
103397
103396
  const workspaces = data?.openedPathsList?.workspaces3 || data?.openedPathsList?.entries || [];
103398
103397
  if (workspaces.length > 0) {
103399
103398
  const recent = workspaces[0];
@@ -120174,8 +120173,8 @@ data: ${JSON.stringify(msg.data)}
120174
120173
  const res = await fetch(extension.vsixUrl);
120175
120174
  if (res.ok) {
120176
120175
  const buffer = Buffer.from(await res.arrayBuffer());
120177
- const fs51 = await import("fs");
120178
- fs51.writeFileSync(vsixPath, buffer);
120176
+ const fs52 = await import("fs");
120177
+ fs52.writeFileSync(vsixPath, buffer);
120179
120178
  return new Promise((resolve29) => {
120180
120179
  const cmd = `"${ide.cliCommand}" --install-extension "${vsixPath}" --force`;
120181
120180
  (0, import_child_process15.exec)(cmd, { timeout: 6e4 }, (error48, _stdout, stderr) => {
@@ -120891,7 +120890,10 @@ data: ${JSON.stringify(msg.data)}
120891
120890
  Object.values(V1_PRIMITIVE_CATALOG).flat()
120892
120891
  );
120893
120892
  var V1_CONTRACT_VERSION = "1.0.0";
120893
+ var fs51 = __toESM2(require("fs"));
120894
120894
  var import_chalk2 = __toESM2((init_source(), __toCommonJS(source_exports)));
120895
+ var CLAUDE_NO_API_LINE = "Claude has no quota API \u2014 adhdev borrows your statusLine to read it.";
120896
+ var CLAUDE_WRAP_NOT_REPLACE_LINE = "Install wraps (not replaces) your statusline, so nothing is lost.";
120895
120897
  function formatWindow(label, window) {
120896
120898
  if (!window) {
120897
120899
  return ` ${label.padEnd(8)} ${import_chalk2.default.gray("not reported")}`;
@@ -120923,6 +120925,16 @@ data: ${JSON.stringify(msg.data)}
120923
120925
  function truncate(value, max) {
120924
120926
  return value.length <= max ? value : `${value.slice(0, max - 1)}\u2026`;
120925
120927
  }
120928
+ function formatAgo(atMs) {
120929
+ const deltaMs = Date.now() - atMs;
120930
+ if (deltaMs <= 0) return "just now";
120931
+ const minutes = Math.round(deltaMs / 6e4);
120932
+ if (minutes < 1) return "just now";
120933
+ if (minutes < 60) return `${minutes}m ago`;
120934
+ const hours = Math.floor(minutes / 60);
120935
+ if (hours < 24) return `${hours}h ${minutes % 60}m ago`;
120936
+ return `${Math.floor(hours / 24)}d ${hours % 24}h ago`;
120937
+ }
120926
120938
  function printQuota2(name, quota) {
120927
120939
  console.log();
120928
120940
  console.log(import_chalk2.default.bold(name));
@@ -120933,6 +120945,10 @@ data: ${JSON.stringify(msg.data)}
120933
120945
  if (quota.error) {
120934
120946
  const tone = quota.status === "unavailable" ? import_chalk2.default.gray : import_chalk2.default.yellow;
120935
120947
  console.log(` ${tone(quota.error)}`);
120948
+ if (quota.provider === "claude-cli" && quota.error.includes("claude:install")) {
120949
+ console.log(` ${import_chalk2.default.gray(CLAUDE_NO_API_LINE)}`);
120950
+ console.log(` ${import_chalk2.default.gray(CLAUDE_WRAP_NOT_REPLACE_LINE)}`);
120951
+ }
120936
120952
  }
120937
120953
  console.log();
120938
120954
  }
@@ -120977,12 +120993,24 @@ data: ${JSON.stringify(msg.data)}
120977
120993
  status.wrappedCommand ? ` Wrapping your statusline: ${truncate(status.wrappedCommand, 100)}` : " You had no statusline before install."
120978
120994
  )
120979
120995
  );
120980
- console.log(import_chalk2.default.gray(` Snapshot: ${status.paths.snapshotFile}`));
120996
+ console.log(import_chalk2.default.gray(` Wrapper: ${status.paths.wrapperFile}`));
120997
+ console.log(import_chalk2.default.gray(` Backup: ${status.paths.backupFile}`));
120998
+ let snapshotMtimeMs = null;
120999
+ try {
121000
+ snapshotMtimeMs = fs51.statSync(status.paths.snapshotFile).mtimeMs;
121001
+ } catch {
121002
+ }
121003
+ console.log(import_chalk2.default.gray(
121004
+ snapshotMtimeMs === null ? " Last snapshot: none yet \u2014 open a Claude Code session to record one" : ` Last snapshot: ${formatAgo(snapshotMtimeMs)} (${status.paths.snapshotFile})`
121005
+ ));
121006
+ console.log(import_chalk2.default.gray(" Undo with `adhdev quota claude:uninstall`."));
120981
121007
  } else {
120982
121008
  console.log(import_chalk2.default.yellow("\u2022 Not installed"));
120983
121009
  if (status.foreignStatusLine) {
120984
121010
  console.log(import_chalk2.default.gray(" You have your own statusLine configured; install would wrap it."));
120985
121011
  }
121012
+ console.log(import_chalk2.default.gray(` ${CLAUDE_NO_API_LINE}`));
121013
+ console.log(import_chalk2.default.gray(` ${CLAUDE_WRAP_NOT_REPLACE_LINE}`));
120986
121014
  console.log(import_chalk2.default.gray(" Set up with `adhdev quota claude:install`."));
120987
121015
  }
120988
121016
  console.log();