@substrat-run/adapter-cloudflare 0.185.0 → 0.187.0

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":"scope-do.d.ts","sourceRoot":"","sources":["../src/scope-do.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAwDL,KAAK,QAAQ,EAmBd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EA+DL,KAAK,mBAAmB,EASxB,KAAK,SAAS,EA2Bd,KAAK,kBAAkB,EAEvB,KAAK,gBAAgB,EA+HtB,MAAM,sBAAsB,CAAC;AAsD9B,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAwBL,kBAAkB,EAoFnB,MAAM,sBAAsB,CAAC;AA2B9B;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;OAKG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC;AAoFD,oFAAoF;AACpF,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAgB5E;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AASnE,iDAAiD;AACjD,KAAK,gBAAgB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAAA;CAAE,CAAC;AAEvH;;;;;GAKG;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;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AA0kBjG,kGAAkG;AAClG,wBAAgB,QAAQ,CAAC,GAAG,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,CAQxD;AAuPD;;;GAGG;AACH,MAAM,MAAM,yBAAyB,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;AAmBtD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,CAOxD;AAED,gHAAgH;AAChH,OAAO,EAAE,kBAAkB,EAAE,CAAC;AA2B9B,wBAAgB,aAAa,CAC3B,OAAO,EAAE,kBAAkB,EAAE,EAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACzD;;;;GAIG;AACH,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,mBAAmB,CAAA;CAAO,GAClD,KAAK,GAAG,EAAE,kBAAkB,EAAE,GAAG,EAAE,UAAU,KAAK,aAAa,CAAC,UAAU,CAAC,CA8qR7E"}
package/dist/scope-do.js CHANGED
@@ -2286,7 +2286,9 @@ options = {}) {
2286
2286
  * `systemDoorMoved` instead, because a PITR restore always restarts this object, so another
2287
2287
  * instance may be rewound storage the gate never saw. The reply carries `systemDoor.honoured`.
2288
2288
  */
2289
- systemDoorInstance) {
2289
+ systemDoorInstance,
2290
+ /** K-61: the person's verified address, which only the coordinator's `getScope` sends. */
2291
+ verifiedEmail) {
2290
2292
  // #2762: filled by `ctx.log` while the queued body runs. Only reported when asked, so the
2291
2293
  // envelope of a caller that did not ask is what it was, and only once the queued body ran:
2292
2294
  // a call refused before it (an unknown operation, an input that fails its parse) is "not
@@ -2297,7 +2299,7 @@ options = {}) {
2297
2299
  // Legacy path, byte-for-byte what it was: rewrapped so a non-plain error (a
2298
2300
  // ZodError, whose `message` is a getter) still arrives with its message.
2299
2301
  try {
2300
- return await this.#invokeOrThrow(operation, input, principal, tenantId, scopeId, connectionId, requiredEntitlement, systemModuleId, invokeOptions, impersonation, capabilitySession, verticalCaller, systemDoorInstance);
2302
+ return await this.#invokeOrThrow(operation, input, principal, tenantId, scopeId, connectionId, requiredEntitlement, systemModuleId, invokeOptions, impersonation, capabilitySession, verticalCaller, systemDoorInstance, undefined, undefined, verifiedEmail);
2301
2303
  }
2302
2304
  catch (err) {
2303
2305
  if (err instanceof SystemDoorMovedError)
@@ -2306,7 +2308,7 @@ options = {}) {
2306
2308
  }
2307
2309
  }
2308
2310
  try {
2309
- return withLogLines(await this.#invokeOrThrow(operation, input, principal, tenantId, scopeId, connectionId, requiredEntitlement, systemModuleId, invokeOptions, impersonation, capabilitySession, verticalCaller, systemDoorInstance, undefined, logTally));
2311
+ return withLogLines(await this.#invokeOrThrow(operation, input, principal, tenantId, scopeId, connectionId, requiredEntitlement, systemModuleId, invokeOptions, impersonation, capabilitySession, verticalCaller, systemDoorInstance, undefined, logTally, verifiedEmail));
2310
2312
  }
2311
2313
  catch (err) {
2312
2314
  // #1834: the pin missed — an answer, never a failure an operation could have produced.
@@ -2337,7 +2339,9 @@ options = {}) {
2337
2339
  /** #119: set only by `runPurgeSweep` on its own invokes — never an RPC argument. */
2338
2340
  purge,
2339
2341
  /** #2762: where this call's `ctx.log` lines are counted — `invoke`'s, never an RPC argument. */
2340
- logTally) {
2342
+ logTally,
2343
+ /** K-61: see `invoke` above. */
2344
+ verifiedEmail) {
2341
2345
  await this.ensureMigrations();
2342
2346
  const handler = this.operations.get(operation);
2343
2347
  // `not_found`, not a bare throw (#113): every vertical hand-matched this message
@@ -2521,7 +2525,7 @@ options = {}) {
2521
2525
  : undefined;
2522
2526
  await this.revision.transaction(async () => {
2523
2527
  const checks = { calls: 0 };
2524
- const ctx = this.operationContext(principal, tenantId, scopeId, undefined, connectionId, systemDoor, signals, impersonation, operation, capabilityId, minted, undefined, peerSubject, undefined, withheld, checks);
2528
+ const ctx = this.operationContext(principal, tenantId, scopeId, undefined, connectionId, systemDoor, signals, impersonation, operation, capabilityId, minted, undefined, peerSubject, undefined, withheld, checks, verifiedEmail);
2525
2529
  // #116: a retry is answered from the recording, and nothing else runs
2526
2530
  // — not the guards, not the handler, not the permission check inside
2527
2531
  // it. Keyed by SUBJECT, so a caller only ever reaches its own
@@ -7384,7 +7388,9 @@ options = {}) {
7384
7388
  /** #119: keys this context's checks refuse whatever the subject holds (`purgeOnlyKeysOf`). */
7385
7389
  withheld,
7386
7390
  /** #2387: where this invocation's checks are counted; absent where nothing reads the count. */
7387
- checks) {
7391
+ checks,
7392
+ /** K-61: the person's verified address, from `getScope` alone. */
7393
+ verifiedEmail) {
7388
7394
  const checker = this.checker;
7389
7395
  const relations = this.relations;
7390
7396
  const searchPlans = this.searchPlans;
@@ -7537,6 +7543,7 @@ options = {}) {
7537
7543
  // #1672: a capability's own id stands in so the type holds — it is not a person, and
7538
7544
  // the event actor says what it is instead. Every other door passes its own value.
7539
7545
  principal: capabilityId ? capabilityId : principal,
7546
+ verifiedEmail: verifiedEmail ?? null,
7540
7547
  pageContinuation: (list, query) => visibleContinuation(this.continuationStore(impersonation?.mode !== 'read-only' && !this.isCopy()), { scopeId, principal: `${subject.kind}:${subject.id}`, operation: operation ?? 'kernel', list, query }, Date.now, () => ctxRef.log.info('legacy filtered-list cursor accepted', { list }), impersonation?.mode !== 'read-only' && !this.isCopy()),
7541
7548
  sql: guardSecrets(doScopedSql(sql, statefulTablesOf(statePlans),
7542
7549
  // #119 / #2090: after runtime DDL, inside this operation's transaction, what the kernel