@adhdev/daemon-standalone 1.0.28-rc.21 → 1.0.28-rc.22
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 +38 -9
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -33311,10 +33311,10 @@ var require_dist3 = __commonJS({
|
|
|
33311
33311
|
}
|
|
33312
33312
|
function getDaemonBuildInfo() {
|
|
33313
33313
|
if (cached2) return cached2;
|
|
33314
|
-
const commit = readInjected(true ? "
|
|
33315
|
-
const commitShort = readInjected(true ? "
|
|
33316
|
-
const version2 = readInjected(true ? "1.0.28-rc.
|
|
33317
|
-
const builtAt = readInjected(true ? "2026-07-29T00:
|
|
33314
|
+
const commit = readInjected(true ? "dc10211420f1723bac639bd4dc2cfc2dd3fe0c81" : void 0) ?? "unknown";
|
|
33315
|
+
const commitShort = readInjected(true ? "dc102114" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
33316
|
+
const version2 = readInjected(true ? "1.0.28-rc.22" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
33317
|
+
const builtAt = readInjected(true ? "2026-07-29T00:52:17.964Z" : void 0);
|
|
33318
33318
|
cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
|
|
33319
33319
|
return cached2;
|
|
33320
33320
|
}
|
|
@@ -73104,8 +73104,23 @@ ${effect.notification.body || ""}`.trim();
|
|
|
73104
73104
|
function stripTrailingSlashes(url2) {
|
|
73105
73105
|
return url2.replace(/\/+$/, "");
|
|
73106
73106
|
}
|
|
73107
|
-
|
|
73108
|
-
|
|
73107
|
+
var REGISTRY_API_PATH = "/api/v1/registry";
|
|
73108
|
+
function deriveRegistryBaseUrlFromServerUrl(serverUrl) {
|
|
73109
|
+
const cleaned = cleanString(serverUrl);
|
|
73110
|
+
if (!cleaned) return void 0;
|
|
73111
|
+
const stripped = stripTrailingSlashes(cleaned);
|
|
73112
|
+
let parsed;
|
|
73113
|
+
try {
|
|
73114
|
+
parsed = new URL(stripped);
|
|
73115
|
+
} catch {
|
|
73116
|
+
return void 0;
|
|
73117
|
+
}
|
|
73118
|
+
if (parsed.protocol !== "https:" && parsed.protocol !== "http:") return void 0;
|
|
73119
|
+
if (stripped.endsWith(REGISTRY_API_PATH)) return stripped;
|
|
73120
|
+
return `${stripped}${REGISTRY_API_PATH}`;
|
|
73121
|
+
}
|
|
73122
|
+
function resolveRegistryBaseUrl(configuredUrl, env2 = process.env, serverUrl) {
|
|
73123
|
+
const resolved = cleanString(configuredUrl) ?? cleanString(env2[REGISTRY_URL_ENV_VAR]) ?? deriveRegistryBaseUrlFromServerUrl(serverUrl) ?? DEFAULT_REGISTRY_BASE_URL;
|
|
73109
73124
|
return stripTrailingSlashes(resolved);
|
|
73110
73125
|
}
|
|
73111
73126
|
function resolveProviderTarballUrl(configuredUrl, env2 = process.env) {
|
|
@@ -78172,7 +78187,8 @@ ${effect.notification.body || ""}`.trim();
|
|
|
78172
78187
|
const https = require("https");
|
|
78173
78188
|
const fs47 = require("fs");
|
|
78174
78189
|
const path50 = require("path");
|
|
78175
|
-
const
|
|
78190
|
+
const cfg = loadConfig2();
|
|
78191
|
+
const REGISTRY = resolveRegistryBaseUrl(cfg.registryUrl, process.env, cfg.serverUrl);
|
|
78176
78192
|
function fetchText(url2, timeoutMs) {
|
|
78177
78193
|
return new Promise((resolve28, reject) => {
|
|
78178
78194
|
const req = https.get(url2, { headers: { "User-Agent": "adhdev-daemon", "Accept": "application/json" }, timeout: timeoutMs }, (res) => {
|
|
@@ -78542,7 +78558,8 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
78542
78558
|
const installed = this.handleListInstalledProviders({});
|
|
78543
78559
|
if (!installed.success) return installed;
|
|
78544
78560
|
const https = require("https");
|
|
78545
|
-
const
|
|
78561
|
+
const cfg = loadConfig2();
|
|
78562
|
+
const REGISTRY = resolveRegistryBaseUrl(cfg.registryUrl, process.env, cfg.serverUrl);
|
|
78546
78563
|
function fetchJson(url2) {
|
|
78547
78564
|
return new Promise((resolve28, reject) => {
|
|
78548
78565
|
const req = https.get(url2, { headers: { "User-Agent": "adhdev-daemon", "Accept": "application/json" }, timeout: 1e4 }, (res) => {
|
|
@@ -94914,6 +94931,15 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
94914
94931
|
`channel metadata for "${channel}" has an unexpected shape (missing providers array)`
|
|
94915
94932
|
);
|
|
94916
94933
|
}
|
|
94934
|
+
if (channel === "preview") {
|
|
94935
|
+
const echo = typeof body.channel === "string" ? body.channel.trim().toLowerCase() : "";
|
|
94936
|
+
if (echo !== channel) {
|
|
94937
|
+
throw new ProviderChannelError(
|
|
94938
|
+
"CHANNEL_METADATA_MISMATCH",
|
|
94939
|
+
`registry response for channel "preview" ${typeof body.channel === "string" ? `echoes channel "${body.channel}"` : "omits the top-level channel echo"} \u2014 the registry does not honor the channel contract (legacy/stable payload); refusing to treat its rows as preview, last-known-good preserved`
|
|
94940
|
+
);
|
|
94941
|
+
}
|
|
94942
|
+
}
|
|
94917
94943
|
const entries = [];
|
|
94918
94944
|
for (const raw of body.providers) {
|
|
94919
94945
|
if (!raw || typeof raw.type !== "string" || typeof raw.version !== "string" || typeof raw.category !== "string") {
|
|
@@ -95366,7 +95392,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
95366
95392
|
constructor(options) {
|
|
95367
95393
|
this.logFn = options?.logFn || LOG2.forComponent("Provider").asLogFn();
|
|
95368
95394
|
this.probeStarts = options?.probeStarts ?? [process.cwd(), __dirname];
|
|
95369
|
-
this.registryBaseUrl = resolveRegistryBaseUrl(options?.registryUrl);
|
|
95395
|
+
this.registryBaseUrl = resolveRegistryBaseUrl(options?.registryUrl, process.env, options?.serverUrl);
|
|
95370
95396
|
this.providerTarballUrl = resolveProviderTarballUrl(options?.providerTarballUrl);
|
|
95371
95397
|
this.channel = resolveProviderChannel(options?.channel, process.env, options?.updateChannel);
|
|
95372
95398
|
this.allowUnverifiedTarball = options?.allowUnverifiedTarball === true || process.env[_ProviderLoader.UNVERIFIED_TARBALL_ENV_VAR] === "1";
|
|
@@ -97340,6 +97366,8 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
97340
97366
|
logFn: () => {
|
|
97341
97367
|
},
|
|
97342
97368
|
// Suppress logs during launch
|
|
97369
|
+
registryUrl: appConfig.registryUrl,
|
|
97370
|
+
serverUrl: appConfig.serverUrl,
|
|
97343
97371
|
channel: appConfig.providerChannel,
|
|
97344
97372
|
updateChannel: appConfig.updateChannel
|
|
97345
97373
|
});
|
|
@@ -114042,6 +114070,7 @@ data: ${JSON.stringify(msg.data)}
|
|
|
114042
114070
|
sourceMode: providerSourceMode,
|
|
114043
114071
|
userDir: appConfig.providerDir,
|
|
114044
114072
|
registryUrl: appConfig.registryUrl,
|
|
114073
|
+
serverUrl: appConfig.serverUrl,
|
|
114045
114074
|
providerTarballUrl: appConfig.providerTarballUrl,
|
|
114046
114075
|
channel: appConfig.providerChannel,
|
|
114047
114076
|
updateChannel: appConfig.updateChannel,
|