instar 1.3.606 → 1.3.607

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.
Files changed (55) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +36 -1
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/config/ConfigDefaults.d.ts.map +1 -1
  5. package/dist/config/ConfigDefaults.js +16 -0
  6. package/dist/config/ConfigDefaults.js.map +1 -1
  7. package/dist/coordination/CrossMachineMandate.d.ts +53 -0
  8. package/dist/coordination/CrossMachineMandate.d.ts.map +1 -0
  9. package/dist/coordination/CrossMachineMandate.js +76 -0
  10. package/dist/coordination/CrossMachineMandate.js.map +1 -0
  11. package/dist/core/AccountCredentialShare.d.ts +115 -0
  12. package/dist/core/AccountCredentialShare.d.ts.map +1 -0
  13. package/dist/core/AccountCredentialShare.js +113 -0
  14. package/dist/core/AccountCredentialShare.js.map +1 -0
  15. package/dist/core/AccountFollowMeGrants.d.ts +92 -0
  16. package/dist/core/AccountFollowMeGrants.d.ts.map +1 -0
  17. package/dist/core/AccountFollowMeGrants.js +106 -0
  18. package/dist/core/AccountFollowMeGrants.js.map +1 -0
  19. package/dist/core/CoherenceJournal.d.ts +1 -1
  20. package/dist/core/CoherenceJournal.d.ts.map +1 -1
  21. package/dist/core/CoherenceJournal.js +12 -2
  22. package/dist/core/CoherenceJournal.js.map +1 -1
  23. package/dist/core/PairingEpochManager.d.ts +68 -0
  24. package/dist/core/PairingEpochManager.d.ts.map +1 -0
  25. package/dist/core/PairingEpochManager.js +88 -0
  26. package/dist/core/PairingEpochManager.js.map +1 -0
  27. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  28. package/dist/core/PostUpdateMigrator.js +20 -0
  29. package/dist/core/PostUpdateMigrator.js.map +1 -1
  30. package/dist/core/SecretStore.d.ts +44 -0
  31. package/dist/core/SecretStore.d.ts.map +1 -1
  32. package/dist/core/SecretStore.js +126 -0
  33. package/dist/core/SecretStore.js.map +1 -1
  34. package/dist/core/SecretSync.d.ts.map +1 -1
  35. package/dist/core/SecretSync.js +6 -0
  36. package/dist/core/SecretSync.js.map +1 -1
  37. package/dist/core/SubscriptionAccountMetaReplicatedStore.d.ts +106 -0
  38. package/dist/core/SubscriptionAccountMetaReplicatedStore.d.ts.map +1 -0
  39. package/dist/core/SubscriptionAccountMetaReplicatedStore.js +263 -0
  40. package/dist/core/SubscriptionAccountMetaReplicatedStore.js.map +1 -0
  41. package/dist/core/SubscriptionPool.d.ts +23 -5
  42. package/dist/core/SubscriptionPool.d.ts.map +1 -1
  43. package/dist/core/SubscriptionPool.js +30 -6
  44. package/dist/core/SubscriptionPool.js.map +1 -1
  45. package/dist/core/devGatedFeatures.d.ts.map +1 -1
  46. package/dist/core/devGatedFeatures.js +6 -0
  47. package/dist/core/devGatedFeatures.js.map +1 -1
  48. package/dist/scaffold/templates.d.ts.map +1 -1
  49. package/dist/scaffold/templates.js +3 -0
  50. package/dist/scaffold/templates.js.map +1 -1
  51. package/package.json +1 -1
  52. package/src/data/builtin-manifest.json +19 -19
  53. package/src/scaffold/templates.ts +3 -0
  54. package/upgrades/1.3.607.md +25 -0
  55. package/upgrades/side-effects/ws52-account-follow-me-pr1.md +74 -0
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAoCH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAS3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAwBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAkH7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAsBtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,OA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;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
@@ -3440,6 +3440,17 @@ export async function startServer(options) {
3440
3440
  // verification-failed propagates as a tombstone (ThreadlinePairingReplicatedStore).
3441
3441
  const { THREADLINE_PAIRING_KIND_REGISTRATION } = await import('../core/ThreadlinePairingReplicatedStore.js');
3442
3442
  replicatedKindRegistry.register(THREADLINE_PAIRING_KIND_REGISTRATION);
3443
+ // WS5.2 Account Follow-Me §6.1a — register the `subscription-account-meta` kind onto the
3444
+ // registry: registry follow-me = METADATA ONLY (a redacted, credential-free projection of a
3445
+ // SubscriptionAccount; configHome + every credential field STRIPPED). Dual-registry's dynamic
3446
+ // half (the static half is CoherenceJournal.JOURNAL_KINDS, which now lists
3447
+ // 'subscription-account-meta'). Registration is INERT — emission/serve/pull stay gated behind
3448
+ // `multiMachine.accountFollowMe.enabled` (default false ⇒ strict no-op, NO account metadata
3449
+ // crosses a machine boundary). The recordKey is the account id (charset-clamped). This kind
3450
+ // carries NO login: the credential half is the SEPARATE account-credential-share verb +
3451
+ // re-mint-per-machine default (Mechanism B); see ws52-account-follow-me-security.md.
3452
+ const { SUBSCRIPTION_ACCOUNT_META_KIND_REGISTRATION } = await import('../core/SubscriptionAccountMetaReplicatedStore.js');
3453
+ replicatedKindRegistry.register(SUBSCRIPTION_ACCOUNT_META_KIND_REGISTRATION);
3443
3454
  // ── WS2 SEND-SIDE wiring (docs/specs/WS2-SEND-SIDE-EMISSION-SPEC.md). The
3444
3455
  // substrate above ships the registry + receive/serve machinery + advert; THIS
3445
3456
  // wires the SEND half that was deferred ("the journal-backed emitter is attached
@@ -3542,7 +3553,17 @@ export async function startServer(options) {
3542
3553
  // `enabled` is already the resolved boolean — the funnels keep their unchanged
3543
3554
  // `enabled === true` semantics but now see a live flag on a dev agent. An explicit
3544
3555
  // operator `enabled` in config still wins (force-dark false / fleet-flip true).
3545
- const _stateSyncStoresResolved = resolveStateSyncStores(config);
3556
+ const _stateSyncStoresBase = resolveStateSyncStores(config);
3557
+ // WS5.2 §6.1a — the `subscriptionAccountMeta` store gates on `multiMachine.accountFollowMe`
3558
+ // (NOT a `stateSync.*` flag). Inject its dev-gate-resolved enabled-state into the SAME
3559
+ // store-flags map the generic emitter + receive-advert consult, so account-meta emission +
3560
+ // the receive capability gate on accountFollowMe (dev-live / fleet-dark) coherently. When the
3561
+ // gate resolves OFF the entry is absent ⇒ the emitter's `enabled===true` check fails ⇒ strict
3562
+ // no-op (no account metadata ever crosses), exactly like the dark stateSync stores.
3563
+ const _accountFollowMeEnabled = resolveDevAgentGate(config.multiMachine?.accountFollowMe?.enabled, config);
3564
+ const _stateSyncStoresResolved = _accountFollowMeEnabled
3565
+ ? { ...(_stateSyncStoresBase ?? {}), subscriptionAccountMeta: { enabled: true } }
3566
+ : _stateSyncStoresBase;
3546
3567
  // WS2 send-side: the generic journal-backed record emitter (the concrete emitter
3547
3568
  // the per-store managers' emit hooks call). Needs the journal sink, the HLC clock,
3548
3569
  // the registry (store → kind), this machine's origin id, the resolved stateSync
@@ -9228,6 +9249,20 @@ export async function startServer(options) {
9228
9249
  if (subscriptionPool.size() > 0) {
9229
9250
  console.log(pc.green(` Subscription pool: ${subscriptionPool.size()} account(s) registered`));
9230
9251
  }
9252
+ // WS5.2 §6.1a — wire cross-machine registry follow-me (METADATA ONLY). When the generic
9253
+ // record emitter exists AND accountFollowMe resolves enabled (the entry was injected into
9254
+ // _stateSyncStoresResolved above), attach the emit adapter so an account add/status/quota
9255
+ // change/remove replicates a REDACTED projection (projectAccountToMeta strips configHome +
9256
+ // every credential field by allowlist). The emitter itself re-checks the store-flag gate, so
9257
+ // a dark/fleet agent is a strict no-op even if the adapter is attached. NO login crosses.
9258
+ if (replicatedRecordEmitter && _accountFollowMeEnabled) {
9259
+ const emitter = replicatedRecordEmitter;
9260
+ const { SUBSCRIPTION_ACCOUNT_META_STORE_KEY, deriveSubscriptionAccountMetaRecordKey, buildSubscriptionAccountMetaData, buildSubscriptionAccountMetaTombstoneData, } = await import('../core/SubscriptionAccountMetaReplicatedStore.js');
9261
+ subscriptionPool.setMetaReplicationEmitter({
9262
+ emitPut: (acct) => emitter.emit(SUBSCRIPTION_ACCOUNT_META_STORE_KEY, deriveSubscriptionAccountMetaRecordKey(acct.id), (hlc, origin, observed) => buildSubscriptionAccountMetaData({ account: acct, hlc, origin, observed })),
9263
+ emitDelete: (accountId, deletedAt) => emitter.emit(SUBSCRIPTION_ACCOUNT_META_STORE_KEY, deriveSubscriptionAccountMetaRecordKey(accountId), (hlc, origin, observed) => buildSubscriptionAccountMetaTombstoneData({ accountId, hlc, origin, deletedAt, observed })),
9264
+ });
9265
+ }
9231
9266
  // POOL-AWARE QUOTA THROTTLE wiring (docs/specs/POOL-AWARE-QUOTA-THROTTLE-SPEC.md):
9232
9267
  // give the global quota brake the SAME placeability predicate the placement layer
9233
9268
  // (selectAccount) uses, reading the LIVE SubscriptionPool. Effect: the brake never