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