@adhdev/daemon-standalone 1.0.35-rc.7 → 1.0.35-rc.9

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
@@ -33318,10 +33318,10 @@ var require_dist3 = __commonJS({
33318
33318
  }
33319
33319
  function getDaemonBuildInfo() {
33320
33320
  if (cached2) return cached2;
33321
- const commit = readInjected(true ? "c1d1038434821ae6444c37cb034dd8ec344d8fc3" : void 0) ?? "unknown";
33322
- const commitShort = readInjected(true ? "c1d10384" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
33323
- const version2 = readInjected(true ? "1.0.35-rc.7" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
33324
- const builtAt = readInjected(true ? "2026-08-05T05:22:07.218Z" : void 0);
33321
+ const commit = readInjected(true ? "9ba07b62ec73a305f490d37bfd4dfeef67fecd62" : void 0) ?? "unknown";
33322
+ const commitShort = readInjected(true ? "9ba07b62" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
33323
+ const version2 = readInjected(true ? "1.0.35-rc.9" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
33324
+ const builtAt = readInjected(true ? "2026-08-05T06:27:33.064Z" : void 0);
33325
33325
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
33326
33326
  return cached2;
33327
33327
  }
@@ -35347,6 +35347,7 @@ child.on('exit', () => process.exit(0));
35347
35347
  resetConfig: () => resetConfig,
35348
35348
  resolveProviderSourceMode: () => resolveProviderSourceMode,
35349
35349
  saveConfig: () => saveConfig,
35350
+ setQuotaShowAccountEmail: () => setQuotaShowAccountEmail,
35350
35351
  updateConfig: () => updateConfig
35351
35352
  });
35352
35353
  function resolveProviderSourceMode(providerSourceMode, legacyDisableUpstream) {
@@ -35371,6 +35372,13 @@ child.on('exit', () => process.exit(0));
35371
35372
  function asBoolean(value, fallback) {
35372
35373
  return typeof value === "boolean" ? value : fallback;
35373
35374
  }
35375
+ function resolveQuotaShowAccountEmail(parsed) {
35376
+ const fallback = DEFAULT_CONFIG.quotaShowAccountEmail ?? true;
35377
+ if (parsed.quotaShowAccountEmailSetByUser === true) {
35378
+ return asBoolean(parsed.quotaShowAccountEmail, fallback);
35379
+ }
35380
+ return fallback;
35381
+ }
35374
35382
  function normalizeMachineProviders(value) {
35375
35383
  if (!isPlainObject2(value)) return {};
35376
35384
  const result = {};
@@ -35399,7 +35407,8 @@ child.on('exit', () => process.exit(0));
35399
35407
  return {
35400
35408
  serverUrl: typeof parsed.serverUrl === "string" && parsed.serverUrl.trim() ? parsed.serverUrl : DEFAULT_CONFIG.serverUrl,
35401
35409
  allowServerApiProxy: asBoolean(parsed.allowServerApiProxy, DEFAULT_CONFIG.allowServerApiProxy ?? false),
35402
- quotaShowAccountEmail: asBoolean(parsed.quotaShowAccountEmail, DEFAULT_CONFIG.quotaShowAccountEmail ?? false),
35410
+ quotaShowAccountEmail: resolveQuotaShowAccountEmail(parsed),
35411
+ ...parsed.quotaShowAccountEmailSetByUser === true ? { quotaShowAccountEmailSetByUser: true } : {},
35403
35412
  selectedIde: asNullableString(parsed.selectedIde),
35404
35413
  configuredIdes: asStringArray(parsed.configuredIdes),
35405
35414
  installedExtensions: asStringArray(parsed.installedExtensions),
@@ -35535,6 +35544,12 @@ child.on('exit', () => process.exit(0));
35535
35544
  saveConfig(updated);
35536
35545
  return updated;
35537
35546
  }
35547
+ function setQuotaShowAccountEmail(enabled) {
35548
+ return updateConfig({
35549
+ quotaShowAccountEmail: enabled,
35550
+ quotaShowAccountEmailSetByUser: true
35551
+ });
35552
+ }
35538
35553
  function markSetupComplete(ideId, extensions) {
35539
35554
  const ideIds = Array.isArray(ideId) ? ideId : [ideId];
35540
35555
  return updateConfig({
@@ -35568,7 +35583,7 @@ child.on('exit', () => process.exit(0));
35568
35583
  DEFAULT_CONFIG = {
35569
35584
  serverUrl: "https://api.adhf.dev",
35570
35585
  allowServerApiProxy: false,
35571
- quotaShowAccountEmail: false,
35586
+ quotaShowAccountEmail: true,
35572
35587
  selectedIde: null,
35573
35588
  configuredIdes: [],
35574
35589
  installedExtensions: [],
@@ -35927,7 +35942,13 @@ child.on('exit', () => process.exit(0));
35927
35942
  `${JSON.stringify({
35928
35943
  jsonrpc: "2.0",
35929
35944
  id: ACCOUNT_ID,
35930
- method: "account/read"
35945
+ // `params` is REQUIRED even though it takes no
35946
+ // arguments — omitting it makes the app-server
35947
+ // answer `-32600 Invalid request: missing field
35948
+ // params`, which reads as "no account" and silently
35949
+ // drops the label. Verified against codex-cli 0.146.0.
35950
+ method: "account/read",
35951
+ params: {}
35931
35952
  })}
35932
35953
  `
35933
35954
  );
@@ -37286,6 +37307,7 @@ ${error48.message || ""}`;
37286
37307
  daemonIdsEquivalent: () => daemonIdsEquivalent,
37287
37308
  deriveSlotsFromLegacy: () => deriveSlotsFromLegacy,
37288
37309
  expandDaemonIdForms: () => expandDaemonIdForms,
37310
+ formatQuotaAccount: () => formatQuotaAccount,
37289
37311
  hasGitStatusEvidence: () => hasGitStatusEvidence,
37290
37312
  interpolateArgs: () => interpolateArgs,
37291
37313
  interpolateString: () => interpolateString,
@@ -37564,6 +37586,13 @@ ${error48.message || ""}`;
37564
37586
  if (!Number.isFinite(reportedAt) || reportedAt <= 0) return void 0;
37565
37587
  return { ...record2, schemaVersion, reportedAt };
37566
37588
  }
37589
+ function formatQuotaAccount(quota) {
37590
+ const meta3 = quota?.metadata;
37591
+ const email3 = typeof meta3?.accountEmail === "string" ? meta3.accountEmail.trim() : "";
37592
+ const plan = typeof meta3?.planType === "string" ? meta3.planType.trim() : "";
37593
+ const parts = [email3, plan].filter(Boolean);
37594
+ return parts.length > 0 ? parts.join(" \xB7 ") : null;
37595
+ }
37567
37596
  function normalizeMeshWorkspaceForCompare(dir) {
37568
37597
  if (typeof dir !== "string") return "";
37569
37598
  return dir.trim().replace(/[\\/]+/g, "/").replace(/\/+$/, "").toLowerCase();
@@ -73873,6 +73902,7 @@ ${lastSnapshot}`;
73873
73902
  setDebugRuntimeConfig: () => setDebugRuntimeConfig,
73874
73903
  setLogLevel: () => setLogLevel,
73875
73904
  setMagiKindPanel: () => setMagiKindPanel,
73905
+ setQuotaShowAccountEmail: () => setQuotaShowAccountEmail,
73876
73906
  setupIdeInstance: () => setupIdeInstance,
73877
73907
  shouldAutoRestoreHostedSessionsOnStartup: () => shouldAutoRestoreHostedSessionsOnStartup2,
73878
73908
  shouldCollectTraceCategory: () => shouldCollectTraceCategory,
@@ -87750,6 +87780,29 @@ ${body}
87750
87780
  const nickname = args?.nickname;
87751
87781
  updateConfig({ machineNickname: nickname || null });
87752
87782
  return { success: true };
87783
+ },
87784
+ /**
87785
+ * Read the quota account-label preference for the machine page toggle.
87786
+ * Machine-level config, so it is answered here rather than through
87787
+ * `get_provider_settings` (which is scoped to a provider's own manifest).
87788
+ */
87789
+ get_quota_account_label: async (_ctx, _args) => {
87790
+ return { success: true, enabled: loadConfig2().quotaShowAccountEmail === true };
87791
+ },
87792
+ /**
87793
+ * Set it. Routed through setQuotaShowAccountEmail (not updateConfig) so the
87794
+ * "a human chose this" marker is recorded — without it the value would be
87795
+ * treated as a stale default and overwritten on the next default change.
87796
+ *
87797
+ * Takes effect on the next quota tick with no restart: the fetcher reads the
87798
+ * config through a function at fetch time (quota/fetchers/deps.ts).
87799
+ */
87800
+ set_quota_account_label: async (_ctx, args) => {
87801
+ if (typeof args?.enabled !== "boolean") {
87802
+ return { success: false, error: "enabled (boolean) is required" };
87803
+ }
87804
+ setQuotaShowAccountEmail(args.enabled);
87805
+ return { success: true, enabled: args.enabled };
87753
87806
  }
87754
87807
  };
87755
87808
  var meshLedgerHandlers = {
@@ -96839,7 +96892,15 @@ ${rawInput}` : rawInput;
96839
96892
  }
96840
96893
  function expandResumeArgs(template, sessionId) {
96841
96894
  if (!Array.isArray(template) || template.length === 0) return void 0;
96842
- return template.map((part) => part === "{{id}}" ? sessionId : part);
96895
+ return template.map((part) => {
96896
+ if (!part.includes("{{id}}")) return part;
96897
+ const expanded = part.split("{{id}}").join(sessionId);
96898
+ const prefix = part.slice(0, part.indexOf("{{id}}"));
96899
+ if (prefix && sessionId.startsWith(prefix)) {
96900
+ return part.split("{{id}}").join(sessionId.slice(prefix.length));
96901
+ }
96902
+ return expanded;
96903
+ });
96843
96904
  }
96844
96905
  function expandModelLaunchArgs(template, model) {
96845
96906
  const m = typeof model === "string" ? model.trim() : "";
@@ -121048,6 +121109,7 @@ data: ${JSON.stringify(msg.data)}
121048
121109
  var V1_CONTRACT_VERSION = "1.0.0";
121049
121110
  var fs52 = __toESM2(require("fs"));
121050
121111
  var import_chalk2 = __toESM2((init_source(), __toCommonJS(source_exports)));
121112
+ init_dist();
121051
121113
  var CLAUDE_NO_API_LINE = "Claude has no quota API \u2014 adhdev borrows your statusLine to read it.";
121052
121114
  var CLAUDE_WRAP_NOT_REPLACE_LINE = "Install wraps (not replaces) your statusline, so nothing is lost.";
121053
121115
  function formatWindow(label, window) {
@@ -121093,7 +121155,8 @@ data: ${JSON.stringify(msg.data)}
121093
121155
  }
121094
121156
  function printQuota2(name, quota) {
121095
121157
  console.log();
121096
- console.log(import_chalk2.default.bold(name));
121158
+ const account = formatQuotaAccount(quota);
121159
+ console.log(account ? `${import_chalk2.default.bold(name)} ${import_chalk2.default.gray(account)}` : import_chalk2.default.bold(name));
121097
121160
  if (quota.status === "ok" || quota.session || quota.weekly) {
121098
121161
  console.log(formatWindow("5 hour", quota.session));
121099
121162
  console.log(formatWindow("7 day", quota.weekly));