@adhdev/daemon-standalone 1.0.38-rc.4 → 1.0.38-rc.6
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 +49 -17
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -33364,10 +33364,10 @@ var require_dist3 = __commonJS({
|
|
|
33364
33364
|
}
|
|
33365
33365
|
function getDaemonBuildInfo() {
|
|
33366
33366
|
if (cached2) return cached2;
|
|
33367
|
-
const commit = readInjected(true ? "
|
|
33368
|
-
const commitShort = readInjected(true ? "
|
|
33369
|
-
const version2 = readInjected(true ? "1.0.38-rc.
|
|
33370
|
-
const builtAt = readInjected(true ? "2026-08-
|
|
33367
|
+
const commit = readInjected(true ? "004d8bfc5ffe83c582737c2a3b15d27f5337e8ae" : void 0) ?? "unknown";
|
|
33368
|
+
const commitShort = readInjected(true ? "004d8bfc" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
33369
|
+
const version2 = readInjected(true ? "1.0.38-rc.6" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
33370
|
+
const builtAt = readInjected(true ? "2026-08-06T12:47:31.923Z" : void 0);
|
|
33371
33371
|
cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
|
|
33372
33372
|
return cached2;
|
|
33373
33373
|
}
|
|
@@ -34633,6 +34633,9 @@ var require_dist3 = __commonJS({
|
|
|
34633
34633
|
function getTrackIdentity(track = TRACK) {
|
|
34634
34634
|
return track === "preview" ? PREVIEW_IDENTITY : STABLE_IDENTITY;
|
|
34635
34635
|
}
|
|
34636
|
+
function getInstallOrigin(track = TRACK) {
|
|
34637
|
+
return track === "preview" ? "https://dev.adhf.dev" : "https://adhf.dev";
|
|
34638
|
+
}
|
|
34636
34639
|
var BUILD_CHANNEL_ENV_VAR;
|
|
34637
34640
|
var TRACK;
|
|
34638
34641
|
var STABLE_IDENTITY;
|
|
@@ -74159,6 +74162,7 @@ ${lastSnapshot}`;
|
|
|
74159
74162
|
getGitFileDiff: () => getGitFileDiff,
|
|
74160
74163
|
getGitRepoStatus: () => getGitRepoStatus,
|
|
74161
74164
|
getHostMemorySnapshot: () => getHostMemorySnapshot,
|
|
74165
|
+
getInstallOrigin: () => getInstallOrigin,
|
|
74162
74166
|
getLastDisplayMessage: () => getLastDisplayMessage,
|
|
74163
74167
|
getLedgerDir: () => getLedgerDir,
|
|
74164
74168
|
getLedgerSummary: () => getLedgerSummary,
|
|
@@ -101511,12 +101515,19 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
101511
101515
|
/**
|
|
101512
101516
|
* Sync the verified channel activations for `targetTypes`.
|
|
101513
101517
|
*
|
|
101518
|
+
* `bootstrapAll: true` (fresh-install bootstrap) widens the target set to
|
|
101519
|
+
* EVERY activatable entry on the channel, ignoring `targetTypes`: a clean
|
|
101520
|
+
* machine has nothing in `.upstream` and no pointers, so there is no
|
|
101521
|
+
* installed set to diff against — the channel listing itself is the desired
|
|
101522
|
+
* end state. Only digest-verified entries activate; legacy-unverified /
|
|
101523
|
+
* unknown-algorithm rows stay typed skips exactly as in a targeted sync.
|
|
101524
|
+
*
|
|
101514
101525
|
* Never throws for expected failure modes: every failure is reported as a
|
|
101515
101526
|
* typed error in the returned report and the previous activations stay
|
|
101516
101527
|
* live (last-known-good). Unexpected programming errors still throw.
|
|
101517
101528
|
*/
|
|
101518
101529
|
async sync(options) {
|
|
101519
|
-
const { channel, targetTypes } = options;
|
|
101530
|
+
const { channel, targetTypes, bootstrapAll } = options;
|
|
101520
101531
|
const report = {
|
|
101521
101532
|
channel,
|
|
101522
101533
|
status: "up-to-date",
|
|
@@ -101536,7 +101547,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
101536
101547
|
}
|
|
101537
101548
|
const { activatable, skipped } = partitionChannelEntries(entries);
|
|
101538
101549
|
report.skipped = skipped;
|
|
101539
|
-
const targets = activatable.filter((e) => targetTypes.has(e.providerType));
|
|
101550
|
+
const targets = bootstrapAll ? activatable : activatable.filter((e) => targetTypes.has(e.providerType));
|
|
101540
101551
|
const pending = [];
|
|
101541
101552
|
for (const entry of targets) {
|
|
101542
101553
|
let activeDigest = null;
|
|
@@ -102113,7 +102124,11 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
102113
102124
|
* 3. ~/.adhdev/providers/ (excluding .upstream) — user-authored customs,
|
|
102114
102125
|
* always wins
|
|
102115
102126
|
* Highest priority listed last (overwrites earlier loads).
|
|
102116
|
-
*
|
|
102127
|
+
* Empty .upstream/ is normal: verified channel activations (step 1.5) are
|
|
102128
|
+
* the primary source on a fresh install, bootstrapped from the registry by
|
|
102129
|
+
* maybeFirstSyncVerifiedChannel() at boot — fetchLatest() is NOT the
|
|
102130
|
+
* production path (gated behind providerAllowUnverifiedTarball, off by
|
|
102131
|
+
* default).
|
|
102117
102132
|
*/
|
|
102118
102133
|
loadAll() {
|
|
102119
102134
|
this.providers.clear();
|
|
@@ -102226,11 +102241,16 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
102226
102241
|
* (providers installed into .upstream via the dashboard install flow, plus
|
|
102227
102242
|
* everything already activated on this channel).
|
|
102228
102243
|
*
|
|
102244
|
+
* `bootstrapAll: true` (fresh-install bootstrap) instead targets every
|
|
102245
|
+
* activatable entry on the channel — used when a clean machine has an empty
|
|
102246
|
+
* .upstream AND an empty channel store, so there is no installed set to diff
|
|
102247
|
+
* against. Digest verification is unchanged: only verified entries activate.
|
|
102248
|
+
*
|
|
102229
102249
|
* Fail-closed / last-known-good: on any metadata or transport failure
|
|
102230
102250
|
* nothing new is activated and the previous active objects keep loading.
|
|
102231
102251
|
* Reloads providers when at least one activation changed.
|
|
102232
102252
|
*/
|
|
102233
|
-
async syncVerifiedChannel() {
|
|
102253
|
+
async syncVerifiedChannel(options) {
|
|
102234
102254
|
if (!this.channelStore) {
|
|
102235
102255
|
return {
|
|
102236
102256
|
channel: this.channel,
|
|
@@ -102248,7 +102268,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
102248
102268
|
...this.channelSyncIO
|
|
102249
102269
|
});
|
|
102250
102270
|
const targetTypes = collectSyncTargetTypes(this.upstreamDir, this.channelStore, this.channel);
|
|
102251
|
-
const report = await runtime.sync({ channel: this.channel, targetTypes });
|
|
102271
|
+
const report = await runtime.sync({ channel: this.channel, targetTypes, bootstrapAll: options?.bootstrapAll });
|
|
102252
102272
|
for (const skip of report.skipped) {
|
|
102253
102273
|
this.log(`\u26A0 Verified channel skip: ${skip.reason}`);
|
|
102254
102274
|
}
|
|
@@ -102275,12 +102295,20 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
102275
102295
|
/**
|
|
102276
102296
|
* Bounded one-shot first sync for an empty verified channel store.
|
|
102277
102297
|
*
|
|
102278
|
-
*
|
|
102279
|
-
*
|
|
102280
|
-
*
|
|
102281
|
-
*
|
|
102282
|
-
*
|
|
102283
|
-
*
|
|
102298
|
+
* Two empty-store cases, one gate (channel has no active pointers):
|
|
102299
|
+
*
|
|
102300
|
+
* 1. Providers installed into .upstream (upgrade / channel-switch paths —
|
|
102301
|
+
* the rc.20 preview activation gap): targeted sync of the installed set.
|
|
102302
|
+
* 2. Fresh install — .upstream empty AND store empty (the "daemon ships
|
|
102303
|
+
* empty" design left new users at 0 providers and unable to run
|
|
102304
|
+
* anything): bootstrap sync. The registry channel listing itself is the
|
|
102305
|
+
* target set, so the daemon self-populates the whole verified channel
|
|
102306
|
+
* on first boot. Only digest-verified entries activate;
|
|
102307
|
+
* legacy-unverified rows stay typed skips.
|
|
102308
|
+
*
|
|
102309
|
+
* Runs at most one verified sync per call and ONLY while the resolved
|
|
102310
|
+
* channel has zero pointers — once anything is activated the gate
|
|
102311
|
+
* short-circuits forever (no re-bootstrap, no network). Fail-closed: any
|
|
102284
102312
|
* registry/transport failure activates nothing (last-known-good preserved)
|
|
102285
102313
|
* and is retried on the next boot or via check_provider_updates. Never
|
|
102286
102314
|
* invoked from any status path.
|
|
@@ -102290,8 +102318,12 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
102290
102318
|
async maybeFirstSyncVerifiedChannel() {
|
|
102291
102319
|
if (!this.channelStore) return null;
|
|
102292
102320
|
if (this.countVerifiedChannelPointers() > 0) return null;
|
|
102293
|
-
if (
|
|
102294
|
-
|
|
102321
|
+
if (this.hasUpstream()) return this.syncVerifiedChannel();
|
|
102322
|
+
try {
|
|
102323
|
+
fs38.mkdirSync(this.defaultProvidersDir, { recursive: true });
|
|
102324
|
+
} catch {
|
|
102325
|
+
}
|
|
102326
|
+
return this.syncVerifiedChannel({ bootstrapAll: true });
|
|
102295
102327
|
}
|
|
102296
102328
|
/**
|
|
102297
102329
|
* The verified-channel PIN for each provider: what this daemon actually
|