instar 1.3.265 → 1.3.266
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/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +26 -9
- package/dist/commands/server.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +10 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/SecretSync.d.ts +7 -2
- package/dist/core/SecretSync.d.ts.map +1 -1
- package/dist/core/SecretSync.js.map +1 -1
- package/dist/core/types.d.ts +6 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +1 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +11 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +63 -63
- package/src/scaffold/templates.ts +1 -0
- package/upgrades/1.3.266.md +45 -0
- package/upgrades/side-effects/secret-sync-push-guard.md +91 -0
- package/upgrades/1.3.265.md +0 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA4SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAkxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA4SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAkxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAi+QtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
|
package/dist/commands/server.js
CHANGED
|
@@ -9191,8 +9191,15 @@ export async function startServer(options) {
|
|
|
9191
9191
|
// by the mesh acceptance layer before this runs; confidentiality is enforced by the
|
|
9192
9192
|
// decryption (a payload not sealed to our key fails). The OUTBOUND provisioner is wired
|
|
9193
9193
|
// after the MeshRpcClient is constructed (below).
|
|
9194
|
-
const
|
|
9195
|
-
|
|
9194
|
+
const _secretSyncCfg = config.multiMachine?.secretSync;
|
|
9195
|
+
const _secretSyncEnabled = _secretSyncCfg?.enabled ?? !!config.developmentAgent;
|
|
9196
|
+
// SAFETY: pushing is opt-in SEPARATELY from receiving and DEFAULTS OFF. A machine
|
|
9197
|
+
// whose local secret store is stale/divergent (e.g. recovered from a key drift) would
|
|
9198
|
+
// otherwise auto-push its stale set to peers on boot and CLOBBER their good secrets —
|
|
9199
|
+
// the exact corruption class this guard prevents. So `enabled` alone = RECEIVE-ONLY;
|
|
9200
|
+
// outbound (boot best-effort + POST /secrets/sync-now) requires `pushEnabled: true`,
|
|
9201
|
+
// which you set only on the machine whose store is authoritative.
|
|
9202
|
+
const _secretSyncPushEnabled = _secretSyncEnabled && (_secretSyncCfg?.pushEnabled ?? false);
|
|
9196
9203
|
let _secretShareHandler;
|
|
9197
9204
|
if (_secretSyncEnabled) {
|
|
9198
9205
|
try {
|
|
@@ -9379,16 +9386,26 @@ export async function startServer(options) {
|
|
|
9379
9386
|
});
|
|
9380
9387
|
_secretSyncHandle = {
|
|
9381
9388
|
enabled: true,
|
|
9382
|
-
|
|
9389
|
+
pushEnabled: _secretSyncPushEnabled,
|
|
9390
|
+
// Outbound is gated on pushEnabled: a receive-only machine NEVER pushes its
|
|
9391
|
+
// (possibly stale) set to peers. The route surfaces a clear refusal instead.
|
|
9392
|
+
provisionAll: () => _secretSyncPushEnabled
|
|
9393
|
+
? provisioner.provisionAll()
|
|
9394
|
+
: Promise.resolve([]),
|
|
9383
9395
|
localKeyPaths: () => secretSyncMod.secretKeyPaths(readSecrets()),
|
|
9384
9396
|
syncTargets: onlinePeers,
|
|
9385
9397
|
};
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9398
|
+
if (_secretSyncPushEnabled) {
|
|
9399
|
+
// Boot best-effort: push current secrets to any peer already online.
|
|
9400
|
+
// @silent-fallback-ok — fire-and-forget; per-peer failures are already captured
|
|
9401
|
+
// in provisionAll's result array, and a fresh push fires on the next provision /
|
|
9402
|
+
// the deterministic POST /secrets/sync-now. Boot must never block on a peer.
|
|
9403
|
+
void provisioner.provisionAll().catch(() => { });
|
|
9404
|
+
console.log(pc.dim(' [secret-sync] enabled — outbound provisioner wired (push ON)'));
|
|
9405
|
+
}
|
|
9406
|
+
else {
|
|
9407
|
+
console.log(pc.dim(' [secret-sync] enabled — RECEIVE-ONLY (push disabled; set multiMachine.secretSync.pushEnabled=true on the authoritative machine to push)'));
|
|
9408
|
+
}
|
|
9392
9409
|
}
|
|
9393
9410
|
catch (err) {
|
|
9394
9411
|
console.log(pc.dim(` [secret-sync] outbound provisioner not wired: ${err instanceof Error ? err.message : String(err)}`));
|