instar 1.3.275 → 1.3.277

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.
@@ -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;AAqxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgjRtE;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"}
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;AAqxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA8jRtE;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"}
@@ -3113,7 +3113,11 @@ export async function startServer(options) {
3113
3113
  // token, and dual-polling would 409. Fail-OPEN: any read miss/stale/
3114
3114
  // mismatch ⇒ false ⇒ server polls as today, so setups without a lifeline
3115
3115
  // are unaffected. Reads only — never writes the lease here.
3116
- const telegramBotToken = telegramConfig ? telegramConfig.config.token : undefined;
3116
+ // HARDENED (v1.3.270 boot-crash incident): an unresolved `{ secret: true }`
3117
+ // placeholder is a truthy OBJECT — only a real string token may reach
3118
+ // tokenHash(), or the whole boot dies with ERR_INVALID_ARG_TYPE.
3119
+ const rawTelegramToken = telegramConfig ? telegramConfig.config.token : undefined;
3120
+ const telegramBotToken = typeof rawTelegramToken === 'string' && rawTelegramToken ? rawTelegramToken : undefined;
3117
3121
  const lifelineOwnsPolling = telegramConfig && telegramBotToken
3118
3122
  ? lifelineOwnsTelegramPoll(config.stateDir, telegramBotToken)
3119
3123
  : false;
@@ -9456,6 +9460,17 @@ export async function startServer(options) {
9456
9460
  ? provisioner.provisionAll()
9457
9461
  : Promise.resolve([]),
9458
9462
  localKeyPaths: () => secretSyncMod.secretKeyPaths(readSecrets()),
9463
+ // Vault readability probe — NEVER mask a decrypt failure as "empty"
9464
+ // (the 2026-06-05 bifurcation hid behind localKeyPaths: []).
9465
+ vaultStatus: () => {
9466
+ try {
9467
+ const secrets = provStore.read();
9468
+ return { status: Object.keys(secrets).length > 0 ? 'ok' : 'empty' };
9469
+ }
9470
+ catch (err) {
9471
+ return { status: 'decrypt-failed', error: err instanceof Error ? err.message : String(err) };
9472
+ }
9473
+ },
9459
9474
  syncTargets: onlinePeers,
9460
9475
  };
9461
9476
  if (_secretSyncPushEnabled) {