@lunora/runtime 1.0.0-alpha.296 → 1.0.0-alpha.297

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.d.mts CHANGED
@@ -432,6 +432,91 @@ interface TraceSamplingDecision {
432
432
  /** Whether error traces are force-kept at export even when `isTraced` is false. */
433
433
  keepErrors: boolean;
434
434
  }
435
+ /**
436
+ * Whether the recorded operation succeeded or failed (e.g. a rejected sign-in).
437
+ * Mirrors `@lunora/auth`'s `AuthAuditOutcome`.
438
+ */
439
+ type AuthAuditOutcome = "failure" | "success";
440
+ /**
441
+ * One recorded auth/security event, structurally mirroring `@lunora/auth`'s
442
+ * `AuthAuditEntry`. Duplicated here (like {@link import("./auth-admin-routes").AuthAdmin})
443
+ * so the runtime stays free of a hard `@lunora/auth` dependency — the host wires
444
+ * a structurally-compatible reader.
445
+ */
446
+ interface AuthAuditEntry {
447
+ /** The acting user's email, when known. Absent for anonymous/pre-auth events. */
448
+ actorEmail?: string;
449
+ /** The acting user's id, when known. */
450
+ actorId?: string;
451
+ /** JSON-decoded extra context, with secrets/PII redacted at write time; absent when none was recorded. */
452
+ detail?: Record<string, unknown>;
453
+ /** Auth event type, e.g. `sign-in` / `password-change`. */
454
+ event: string;
455
+ /** Client IP the event originated from, when resolvable. */
456
+ ip?: string;
457
+ /** Whether the operation succeeded or failed. */
458
+ outcome: AuthAuditOutcome;
459
+ /** Monotonic per-database cursor — strictly increasing, never reused. */
460
+ seq: number;
461
+ /** Wall-clock millis when the event was recorded. */
462
+ ts: number;
463
+ /** Client User-Agent, when present on the request. */
464
+ userAgent?: string;
465
+ }
466
+ /**
467
+ * Filter / paging options forwarded to the reader, structurally mirroring
468
+ * `@lunora/auth`'s `ReadAuthAuditOptions`. `limit` is clamped by the reader
469
+ * (`readAuthAuditLog` bounds it to `[1, 10000]`).
470
+ */
471
+ interface ReadAuthAuditQuery {
472
+ /** Return only events for this actor id. */
473
+ actorId?: string;
474
+ /** Return only events of this type. */
475
+ event?: string;
476
+ /** Max rows to return; clamped by the reader. */
477
+ limit?: number;
478
+ /**
479
+ * Return only events with `seq` strictly greater than this. Supplying it
480
+ * switches the reader's page to oldest-first so the cursor walks forward;
481
+ * omit it for the newest-first feed.
482
+ */
483
+ sinceSeq?: number;
484
+ }
485
+ /**
486
+ * The auth/security audit read plane backing the studio's "Security / audit"
487
+ * page. Unlike the shard-forwarded `__lunora_admin__:*` ops, the auth audit trail
488
+ * lives in the auth D1 database (via `@lunora/auth`'s `SqlExecutor`), so it is
489
+ * served at the worker. The host wires this — typically via `@lunora/auth`'s
490
+ * `createAuthAuditReader(d1Executor(env.DB))` — closing over that D1 binding; the
491
+ * runtime stays free of a hard `@lunora/auth` dependency. Omit the option and the
492
+ * RPC responds `AUTH_AUDIT_NOT_CONFIGURED`.
493
+ *
494
+ * The reader is a trusted server-side operator surface — the RPC gates it behind
495
+ * the worker's admin-bearer check before this is ever called.
496
+ */
497
+ interface AuthAuditReader {
498
+ read: (options: ReadAuthAuditQuery) => Promise<AuthAuditEntry[]>;
499
+ }
500
+ /** One event to record, structurally mirroring `@lunora/auth`'s `AppendAuthAuditEntry`; the table assigns `seq`. */
501
+ interface AuthAuditWrite {
502
+ actorEmail?: string;
503
+ actorId?: string;
504
+ detail?: Record<string, unknown>;
505
+ event: string;
506
+ ip?: string;
507
+ outcome: AuthAuditOutcome;
508
+ targetEmail?: string;
509
+ ts: number;
510
+ userAgent?: string;
511
+ }
512
+ /**
513
+ * The audit write plane the worker's auth admin routes record their mutations through, into the same trail the
514
+ * reader serves. The host wires it with `@lunora/auth`'s `createAuthAuditWriter(d1Executor(env.DB), auth)`; omit it
515
+ * and the admin plane records nothing.
516
+ */
517
+ interface AuthAuditWriter {
518
+ write: (entry: AuthAuditWrite) => Promise<void>;
519
+ }
435
520
  /** A timestamp as better-auth stores it: epoch-ms, an ISO string, or absent. */
436
521
  type AuthTimestamp = null | number | string;
437
522
  /**
@@ -728,71 +813,6 @@ interface AuthAdmin {
728
813
  userId: string;
729
814
  }) => Promise<AuthUser>;
730
815
  }
731
- /**
732
- * Whether the recorded operation succeeded or failed (e.g. a rejected sign-in).
733
- * Mirrors `@lunora/auth`'s `AuthAuditOutcome`.
734
- */
735
- type AuthAuditOutcome = "failure" | "success";
736
- /**
737
- * One recorded auth/security event, structurally mirroring `@lunora/auth`'s
738
- * `AuthAuditEntry`. Duplicated here (like {@link import("./auth-admin-routes").AuthAdmin})
739
- * so the runtime stays free of a hard `@lunora/auth` dependency — the host wires
740
- * a structurally-compatible reader.
741
- */
742
- interface AuthAuditEntry {
743
- /** The acting user's email, when known. Absent for anonymous/pre-auth events. */
744
- actorEmail?: string;
745
- /** The acting user's id, when known. */
746
- actorId?: string;
747
- /** JSON-decoded extra context, with secrets/PII redacted at write time; absent when none was recorded. */
748
- detail?: Record<string, unknown>;
749
- /** Auth event type, e.g. `sign-in` / `password-change`. */
750
- event: string;
751
- /** Client IP the event originated from, when resolvable. */
752
- ip?: string;
753
- /** Whether the operation succeeded or failed. */
754
- outcome: AuthAuditOutcome;
755
- /** Monotonic per-database cursor — strictly increasing, never reused. */
756
- seq: number;
757
- /** Wall-clock millis when the event was recorded. */
758
- ts: number;
759
- /** Client User-Agent, when present on the request. */
760
- userAgent?: string;
761
- }
762
- /**
763
- * Filter / paging options forwarded to the reader, structurally mirroring
764
- * `@lunora/auth`'s `ReadAuthAuditOptions`. `limit` is clamped by the reader
765
- * (`readAuthAuditLog` bounds it to `[1, 10000]`).
766
- */
767
- interface ReadAuthAuditQuery {
768
- /** Return only events for this actor id. */
769
- actorId?: string;
770
- /** Return only events of this type. */
771
- event?: string;
772
- /** Max rows to return; clamped by the reader. */
773
- limit?: number;
774
- /**
775
- * Return only events with `seq` strictly greater than this. Supplying it
776
- * switches the reader's page to oldest-first so the cursor walks forward;
777
- * omit it for the newest-first feed.
778
- */
779
- sinceSeq?: number;
780
- }
781
- /**
782
- * The auth/security audit read plane backing the studio's "Security / audit"
783
- * page. Unlike the shard-forwarded `__lunora_admin__:*` ops, the auth audit trail
784
- * lives in the auth D1 database (via `@lunora/auth`'s `SqlExecutor`), so it is
785
- * served at the worker. The host wires this — typically via `@lunora/auth`'s
786
- * `createAuthAuditReader(d1Executor(env.DB))` — closing over that D1 binding; the
787
- * runtime stays free of a hard `@lunora/auth` dependency. Omit the option and the
788
- * RPC responds `AUTH_AUDIT_NOT_CONFIGURED`.
789
- *
790
- * The reader is a trusted server-side operator surface — the RPC gates it behind
791
- * the worker's admin-bearer check before this is ever called.
792
- */
793
- interface AuthAuditReader {
794
- read: (options: ReadAuthAuditQuery) => Promise<AuthAuditEntry[]>;
795
- }
796
816
  /** One table after a copy call, structurally mirroring `@lunora/auth`'s `AuthMoveTableReport`. */
797
817
  interface AuthMoveTableReport {
798
818
  conflicts: number;
@@ -4332,6 +4352,17 @@ interface WorkerOptions {
4332
4352
  * bearer always gets `ADMIN_FORBIDDEN` first (default-closed).
4333
4353
  */
4334
4354
  authAuditReader?: AuthAuditReader;
4355
+ /**
4356
+ * Where the `/_lunora/admin/auth/*` mutations are recorded: each successful one writes a row to the same
4357
+ * "Security / audit" trail {@link WorkerOptions.authAuditReader} serves, naming the acting admin token
4358
+ * (`admin:root`, or `admin:token:<tokenName>` for a named token). The admin plane calls better-auth's adapter
4359
+ * directly, so the better-auth audit hook never sees these operations. Wire it with `@lunora/auth`'s
4360
+ * `createAuthAuditWriter(d1Executor(env.DB), auth)`, which also applies the audit hook's `retention` and
4361
+ * `onRecord`. Omit it and the admin plane records nothing; a failed write is logged and does not fail the operation.
4362
+ * A revoke or delete of one row answers 404 when nothing matches and records nothing; revoking all of a user's
4363
+ * sessions is recorded even when there were none.
4364
+ */
4365
+ authAuditWriter?: AuthAuditWriter;
4335
4366
  /**
4336
4367
  * Base path the auth routes are mounted under (default `/api/auth`). Used
4337
4368
  * to classify which inbound paths are auth ATTEMPTS for the app-level
package/dist/index.d.ts CHANGED
@@ -432,6 +432,91 @@ interface TraceSamplingDecision {
432
432
  /** Whether error traces are force-kept at export even when `isTraced` is false. */
433
433
  keepErrors: boolean;
434
434
  }
435
+ /**
436
+ * Whether the recorded operation succeeded or failed (e.g. a rejected sign-in).
437
+ * Mirrors `@lunora/auth`'s `AuthAuditOutcome`.
438
+ */
439
+ type AuthAuditOutcome = "failure" | "success";
440
+ /**
441
+ * One recorded auth/security event, structurally mirroring `@lunora/auth`'s
442
+ * `AuthAuditEntry`. Duplicated here (like {@link import("./auth-admin-routes").AuthAdmin})
443
+ * so the runtime stays free of a hard `@lunora/auth` dependency — the host wires
444
+ * a structurally-compatible reader.
445
+ */
446
+ interface AuthAuditEntry {
447
+ /** The acting user's email, when known. Absent for anonymous/pre-auth events. */
448
+ actorEmail?: string;
449
+ /** The acting user's id, when known. */
450
+ actorId?: string;
451
+ /** JSON-decoded extra context, with secrets/PII redacted at write time; absent when none was recorded. */
452
+ detail?: Record<string, unknown>;
453
+ /** Auth event type, e.g. `sign-in` / `password-change`. */
454
+ event: string;
455
+ /** Client IP the event originated from, when resolvable. */
456
+ ip?: string;
457
+ /** Whether the operation succeeded or failed. */
458
+ outcome: AuthAuditOutcome;
459
+ /** Monotonic per-database cursor — strictly increasing, never reused. */
460
+ seq: number;
461
+ /** Wall-clock millis when the event was recorded. */
462
+ ts: number;
463
+ /** Client User-Agent, when present on the request. */
464
+ userAgent?: string;
465
+ }
466
+ /**
467
+ * Filter / paging options forwarded to the reader, structurally mirroring
468
+ * `@lunora/auth`'s `ReadAuthAuditOptions`. `limit` is clamped by the reader
469
+ * (`readAuthAuditLog` bounds it to `[1, 10000]`).
470
+ */
471
+ interface ReadAuthAuditQuery {
472
+ /** Return only events for this actor id. */
473
+ actorId?: string;
474
+ /** Return only events of this type. */
475
+ event?: string;
476
+ /** Max rows to return; clamped by the reader. */
477
+ limit?: number;
478
+ /**
479
+ * Return only events with `seq` strictly greater than this. Supplying it
480
+ * switches the reader's page to oldest-first so the cursor walks forward;
481
+ * omit it for the newest-first feed.
482
+ */
483
+ sinceSeq?: number;
484
+ }
485
+ /**
486
+ * The auth/security audit read plane backing the studio's "Security / audit"
487
+ * page. Unlike the shard-forwarded `__lunora_admin__:*` ops, the auth audit trail
488
+ * lives in the auth D1 database (via `@lunora/auth`'s `SqlExecutor`), so it is
489
+ * served at the worker. The host wires this — typically via `@lunora/auth`'s
490
+ * `createAuthAuditReader(d1Executor(env.DB))` — closing over that D1 binding; the
491
+ * runtime stays free of a hard `@lunora/auth` dependency. Omit the option and the
492
+ * RPC responds `AUTH_AUDIT_NOT_CONFIGURED`.
493
+ *
494
+ * The reader is a trusted server-side operator surface — the RPC gates it behind
495
+ * the worker's admin-bearer check before this is ever called.
496
+ */
497
+ interface AuthAuditReader {
498
+ read: (options: ReadAuthAuditQuery) => Promise<AuthAuditEntry[]>;
499
+ }
500
+ /** One event to record, structurally mirroring `@lunora/auth`'s `AppendAuthAuditEntry`; the table assigns `seq`. */
501
+ interface AuthAuditWrite {
502
+ actorEmail?: string;
503
+ actorId?: string;
504
+ detail?: Record<string, unknown>;
505
+ event: string;
506
+ ip?: string;
507
+ outcome: AuthAuditOutcome;
508
+ targetEmail?: string;
509
+ ts: number;
510
+ userAgent?: string;
511
+ }
512
+ /**
513
+ * The audit write plane the worker's auth admin routes record their mutations through, into the same trail the
514
+ * reader serves. The host wires it with `@lunora/auth`'s `createAuthAuditWriter(d1Executor(env.DB), auth)`; omit it
515
+ * and the admin plane records nothing.
516
+ */
517
+ interface AuthAuditWriter {
518
+ write: (entry: AuthAuditWrite) => Promise<void>;
519
+ }
435
520
  /** A timestamp as better-auth stores it: epoch-ms, an ISO string, or absent. */
436
521
  type AuthTimestamp = null | number | string;
437
522
  /**
@@ -728,71 +813,6 @@ interface AuthAdmin {
728
813
  userId: string;
729
814
  }) => Promise<AuthUser>;
730
815
  }
731
- /**
732
- * Whether the recorded operation succeeded or failed (e.g. a rejected sign-in).
733
- * Mirrors `@lunora/auth`'s `AuthAuditOutcome`.
734
- */
735
- type AuthAuditOutcome = "failure" | "success";
736
- /**
737
- * One recorded auth/security event, structurally mirroring `@lunora/auth`'s
738
- * `AuthAuditEntry`. Duplicated here (like {@link import("./auth-admin-routes").AuthAdmin})
739
- * so the runtime stays free of a hard `@lunora/auth` dependency — the host wires
740
- * a structurally-compatible reader.
741
- */
742
- interface AuthAuditEntry {
743
- /** The acting user's email, when known. Absent for anonymous/pre-auth events. */
744
- actorEmail?: string;
745
- /** The acting user's id, when known. */
746
- actorId?: string;
747
- /** JSON-decoded extra context, with secrets/PII redacted at write time; absent when none was recorded. */
748
- detail?: Record<string, unknown>;
749
- /** Auth event type, e.g. `sign-in` / `password-change`. */
750
- event: string;
751
- /** Client IP the event originated from, when resolvable. */
752
- ip?: string;
753
- /** Whether the operation succeeded or failed. */
754
- outcome: AuthAuditOutcome;
755
- /** Monotonic per-database cursor — strictly increasing, never reused. */
756
- seq: number;
757
- /** Wall-clock millis when the event was recorded. */
758
- ts: number;
759
- /** Client User-Agent, when present on the request. */
760
- userAgent?: string;
761
- }
762
- /**
763
- * Filter / paging options forwarded to the reader, structurally mirroring
764
- * `@lunora/auth`'s `ReadAuthAuditOptions`. `limit` is clamped by the reader
765
- * (`readAuthAuditLog` bounds it to `[1, 10000]`).
766
- */
767
- interface ReadAuthAuditQuery {
768
- /** Return only events for this actor id. */
769
- actorId?: string;
770
- /** Return only events of this type. */
771
- event?: string;
772
- /** Max rows to return; clamped by the reader. */
773
- limit?: number;
774
- /**
775
- * Return only events with `seq` strictly greater than this. Supplying it
776
- * switches the reader's page to oldest-first so the cursor walks forward;
777
- * omit it for the newest-first feed.
778
- */
779
- sinceSeq?: number;
780
- }
781
- /**
782
- * The auth/security audit read plane backing the studio's "Security / audit"
783
- * page. Unlike the shard-forwarded `__lunora_admin__:*` ops, the auth audit trail
784
- * lives in the auth D1 database (via `@lunora/auth`'s `SqlExecutor`), so it is
785
- * served at the worker. The host wires this — typically via `@lunora/auth`'s
786
- * `createAuthAuditReader(d1Executor(env.DB))` — closing over that D1 binding; the
787
- * runtime stays free of a hard `@lunora/auth` dependency. Omit the option and the
788
- * RPC responds `AUTH_AUDIT_NOT_CONFIGURED`.
789
- *
790
- * The reader is a trusted server-side operator surface — the RPC gates it behind
791
- * the worker's admin-bearer check before this is ever called.
792
- */
793
- interface AuthAuditReader {
794
- read: (options: ReadAuthAuditQuery) => Promise<AuthAuditEntry[]>;
795
- }
796
816
  /** One table after a copy call, structurally mirroring `@lunora/auth`'s `AuthMoveTableReport`. */
797
817
  interface AuthMoveTableReport {
798
818
  conflicts: number;
@@ -4332,6 +4352,17 @@ interface WorkerOptions {
4332
4352
  * bearer always gets `ADMIN_FORBIDDEN` first (default-closed).
4333
4353
  */
4334
4354
  authAuditReader?: AuthAuditReader;
4355
+ /**
4356
+ * Where the `/_lunora/admin/auth/*` mutations are recorded: each successful one writes a row to the same
4357
+ * "Security / audit" trail {@link WorkerOptions.authAuditReader} serves, naming the acting admin token
4358
+ * (`admin:root`, or `admin:token:<tokenName>` for a named token). The admin plane calls better-auth's adapter
4359
+ * directly, so the better-auth audit hook never sees these operations. Wire it with `@lunora/auth`'s
4360
+ * `createAuthAuditWriter(d1Executor(env.DB), auth)`, which also applies the audit hook's `retention` and
4361
+ * `onRecord`. Omit it and the admin plane records nothing; a failed write is logged and does not fail the operation.
4362
+ * A revoke or delete of one row answers 404 when nothing matches and records nothing; revoking all of a user's
4363
+ * sessions is recorded even when there were none.
4364
+ */
4365
+ authAuditWriter?: AuthAuditWriter;
4335
4366
  /**
4336
4367
  * Base path the auth routes are mounted under (default `/api/auth`). Used
4337
4368
  * to classify which inbound paths are auth ATTEMPTS for the app-level
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{declareAppJurisdiction as t}from"./packem_shared/declareAppJurisdiction-DEba2p42.mjs";import{BACKUP_KEY_PREFIX as s,backupManifestKey as i,backupObjectKey as p,backupObjectKeyOfManifest as n,isBackupManifestEntry as c,isBackupManifestKey as m,normalizeBackupPrefix as f}from"./packem_shared/BACKUP_KEY_PREFIX-BOtSu-_3.mjs";import{toAirbyteMessages as E,toFivetranResponse as R}from"./packem_shared/toAirbyteMessages-BVogmTPJ.mjs";import{composeWorker as d,createLunoraHandler as l,createWorker as u,defineRpcEnvelope as _,resolveLunoraOptions as k,withFrameworkWorker as b}from"./packem_shared/composeWorker-cdYJdBwC.mjs";import{createCrossShardRelationCapabilities as C}from"./packem_shared/createCrossShardRelationCapabilities-BBUXTMhk.mjs";import{DEFAULT_REGISTRY_CACHE_TTL_MS as A,SHARD_REGISTRY_DO_NAME as L,createDynamicShardRegistry as T}from"./packem_shared/DEFAULT_REGISTRY_CACHE_TTL_MS-w_RLPiwj.mjs";import{parseStackFrames as H,toError as P}from"./packem_shared/parseStackFrames-CZddjveh.mjs";import{LunoraError as v,toErrorResponse as I}from"./packem_shared/LunoraError-PkZWF-_g.mjs";import{c as F,a as M,d as N,r as G,b as K,s as U,w}from"./packem_shared/export-tap-CMyD7rin.mjs";import{HEALTH_PATH as Y,HEALTH_READY_PATH as z,buildHealthRoutes as X,d1Probe as j,durableObjectProbe as V,presenceProbe as W}from"./packem_shared/HEALTH_PATH-B8ndDG3s.mjs";import{LOG_ARCHIVE_PATH as J,resolveLogArchiveFromEnv as Q}from"./packem_shared/LOG_ARCHIVE_PATH-dTuCzfyj.mjs";import{m as $,a as ee}from"./packem_shared/memoize-identity-Cbr1Sdt3.mjs";import{e as oe,a as te}from"./packem_shared/observability-9slk__Gi.mjs";import{enrichSink as se,filterSink as ie}from"./packem_shared/enrichSink-8_qnPWNH.mjs";import{a as ne,c as ce,b as me,o as fe,p as xe,w as Ee}from"./packem_shared/observability-sinks-BA76CH4h.mjs";import{D as Se,c as de}from"./packem_shared/pipeline-log-reader-C-nuWG_e.mjs";import{createQueryCoordinator as ue,createStaticShardRegistry as _e}from"./packem_shared/createQueryCoordinator-DIrlAqnz.mjs";import{applyJurisdiction as be,resolveShard as ye}from"./packem_shared/applyJurisdiction-DKQE8kOA.mjs";import{a as Oe,r as Ae,b as Le}from"./packem_shared/rest-cache-q5V06Etw.mjs";import{a as he,b as He,c as Pe,r as ge}from"./packem_shared/rest-routes-D5NWHmVl.mjs";import{d as Ie,e as De,h as Fe,r as Me}from"./packem_shared/security-headers-0DqdJ04h.mjs";import{createShardClient as Ge}from"./packem_shared/createShardClient-M_c0MHVS.mjs";import{STORAGE_UPLOAD_MAX_BODY_BYTES as Ue}from"./packem_shared/STORAGE_UPLOAD_MAX_BODY_BYTES-Onz8HkiB.mjs";import{loadStudioDocument as Be}from"./packem_shared/loadStudioDocument-BSYQEMnd.mjs";import{LOG_ARCHIVE_NOT_CONFIGURED as ze}from"./packem_shared/LOG_ARCHIVE_NOT_CONFIGURED-CDpi4yFD.mjs";import{NOOP_EXECUTION_CONTEXT as je}from"./packem_shared/NOOP_EXECUTION_CONTEXT-YmXqH-jH.mjs";import{composeIdentityResolvers as We,routeIdentityResolvers as qe}from"./packem_shared/composeIdentityResolvers-CpdHuDyk.mjs";const e="0.0.0";export{s as BACKUP_KEY_PREFIX,Se as DEFAULT_LOG_COLUMNS,A as DEFAULT_REGISTRY_CACHE_TTL_MS,Y as HEALTH_PATH,z as HEALTH_READY_PATH,ze as LOG_ARCHIVE_NOT_CONFIGURED,J as LOG_ARCHIVE_PATH,v as LunoraError,je as NOOP_EXECUTION_CONTEXT,L as SHARD_REGISTRY_DO_NAME,Ue as STORAGE_UPLOAD_MAX_BODY_BYTES,e as VERSION,ne as analyticsEngineSink,be as applyJurisdiction,Oe as applyRestCache,he as argsFromQuery,i as backupManifestKey,p as backupObjectKey,n as backupObjectKeyOfManifest,X as buildHealthRoutes,He as buildRestRoutes,ce as combineSinks,We as composeIdentityResolvers,d as composeWorker,me as consoleSink,C as createCrossShardRelationCapabilities,T as createDynamicShardRegistry,F as createKvCursorStore,l as createLunoraHandler,M as createMemoryCursorStore,de as createPipelineLogReader,ue as createQueryCoordinator,Pe as createRestRateLimit,Ge as createShardClient,_e as createStaticShardRegistry,u as createWorker,j as d1Probe,t as declareAppJurisdiction,Ie as decorateResponse,N as defineExportSink,_ as defineRpcEnvelope,V as durableObjectProbe,oe as emitLogEvent,te as emitRpcEvent,De as enforceOrigin,se as enrichSink,ie as filterSink,Fe as handleCorsPreflight,c as isBackupManifestEntry,m as isBackupManifestKey,Be as loadStudioDocument,$ as memoizeIdentity,ee as memoizeIdentityPerRequest,f as normalizeBackupPrefix,fe as otlpSink,H as parseStackFrames,xe as pipelineLogSink,W as presenceProbe,G as r2Sink,Ae as requestCarriesCredentials,Q as resolveLogArchiveFromEnv,k as resolveLunoraOptions,Me as resolveSecurity,ye as resolveShard,Le as restCacheHeaders,ge as restSurfaceFromRegistry,qe as routeIdentityResolvers,K as runExportTap,U as sanitizeChange,E as toAirbyteMessages,P as toError,I as toErrorResponse,R as toFivetranResponse,w as webhookExportSink,Ee as webhookSink,b as withFrameworkWorker};
1
+ import{declareAppJurisdiction as t}from"./packem_shared/declareAppJurisdiction-DEba2p42.mjs";import{BACKUP_KEY_PREFIX as s,backupManifestKey as i,backupObjectKey as p,backupObjectKeyOfManifest as n,isBackupManifestEntry as c,isBackupManifestKey as m,normalizeBackupPrefix as f}from"./packem_shared/BACKUP_KEY_PREFIX-BOtSu-_3.mjs";import{toAirbyteMessages as E,toFivetranResponse as R}from"./packem_shared/toAirbyteMessages-BVogmTPJ.mjs";import{composeWorker as d,createLunoraHandler as l,createWorker as u,defineRpcEnvelope as _,resolveLunoraOptions as k,withFrameworkWorker as b}from"./packem_shared/composeWorker-MSVk8NrW.mjs";import{createCrossShardRelationCapabilities as C}from"./packem_shared/createCrossShardRelationCapabilities-BBUXTMhk.mjs";import{DEFAULT_REGISTRY_CACHE_TTL_MS as A,SHARD_REGISTRY_DO_NAME as L,createDynamicShardRegistry as T}from"./packem_shared/DEFAULT_REGISTRY_CACHE_TTL_MS-w_RLPiwj.mjs";import{parseStackFrames as H,toError as P}from"./packem_shared/parseStackFrames-CZddjveh.mjs";import{LunoraError as v,toErrorResponse as I}from"./packem_shared/LunoraError-PkZWF-_g.mjs";import{c as F,a as M,d as N,r as G,b as K,s as U,w}from"./packem_shared/export-tap-CMyD7rin.mjs";import{HEALTH_PATH as Y,HEALTH_READY_PATH as z,buildHealthRoutes as X,d1Probe as j,durableObjectProbe as V,presenceProbe as W}from"./packem_shared/HEALTH_PATH-B8ndDG3s.mjs";import{LOG_ARCHIVE_PATH as J,resolveLogArchiveFromEnv as Q}from"./packem_shared/LOG_ARCHIVE_PATH-dTuCzfyj.mjs";import{m as $,a as ee}from"./packem_shared/memoize-identity-Cbr1Sdt3.mjs";import{e as oe,a as te}from"./packem_shared/observability-9slk__Gi.mjs";import{enrichSink as se,filterSink as ie}from"./packem_shared/enrichSink-8_qnPWNH.mjs";import{a as ne,c as ce,b as me,o as fe,p as xe,w as Ee}from"./packem_shared/observability-sinks-BA76CH4h.mjs";import{D as Se,c as de}from"./packem_shared/pipeline-log-reader-C-nuWG_e.mjs";import{createQueryCoordinator as ue,createStaticShardRegistry as _e}from"./packem_shared/createQueryCoordinator-DIrlAqnz.mjs";import{applyJurisdiction as be,resolveShard as ye}from"./packem_shared/applyJurisdiction-DKQE8kOA.mjs";import{a as Oe,r as Ae,b as Le}from"./packem_shared/rest-cache-q5V06Etw.mjs";import{a as he,b as He,c as Pe,r as ge}from"./packem_shared/rest-routes-D5NWHmVl.mjs";import{d as Ie,e as De,h as Fe,r as Me}from"./packem_shared/security-headers-0DqdJ04h.mjs";import{createShardClient as Ge}from"./packem_shared/createShardClient-M_c0MHVS.mjs";import{STORAGE_UPLOAD_MAX_BODY_BYTES as Ue}from"./packem_shared/STORAGE_UPLOAD_MAX_BODY_BYTES-Onz8HkiB.mjs";import{loadStudioDocument as Be}from"./packem_shared/loadStudioDocument-BSYQEMnd.mjs";import{LOG_ARCHIVE_NOT_CONFIGURED as ze}from"./packem_shared/LOG_ARCHIVE_NOT_CONFIGURED-CDpi4yFD.mjs";import{NOOP_EXECUTION_CONTEXT as je}from"./packem_shared/NOOP_EXECUTION_CONTEXT-YmXqH-jH.mjs";import{composeIdentityResolvers as We,routeIdentityResolvers as qe}from"./packem_shared/composeIdentityResolvers-CpdHuDyk.mjs";const e="0.0.0";export{s as BACKUP_KEY_PREFIX,Se as DEFAULT_LOG_COLUMNS,A as DEFAULT_REGISTRY_CACHE_TTL_MS,Y as HEALTH_PATH,z as HEALTH_READY_PATH,ze as LOG_ARCHIVE_NOT_CONFIGURED,J as LOG_ARCHIVE_PATH,v as LunoraError,je as NOOP_EXECUTION_CONTEXT,L as SHARD_REGISTRY_DO_NAME,Ue as STORAGE_UPLOAD_MAX_BODY_BYTES,e as VERSION,ne as analyticsEngineSink,be as applyJurisdiction,Oe as applyRestCache,he as argsFromQuery,i as backupManifestKey,p as backupObjectKey,n as backupObjectKeyOfManifest,X as buildHealthRoutes,He as buildRestRoutes,ce as combineSinks,We as composeIdentityResolvers,d as composeWorker,me as consoleSink,C as createCrossShardRelationCapabilities,T as createDynamicShardRegistry,F as createKvCursorStore,l as createLunoraHandler,M as createMemoryCursorStore,de as createPipelineLogReader,ue as createQueryCoordinator,Pe as createRestRateLimit,Ge as createShardClient,_e as createStaticShardRegistry,u as createWorker,j as d1Probe,t as declareAppJurisdiction,Ie as decorateResponse,N as defineExportSink,_ as defineRpcEnvelope,V as durableObjectProbe,oe as emitLogEvent,te as emitRpcEvent,De as enforceOrigin,se as enrichSink,ie as filterSink,Fe as handleCorsPreflight,c as isBackupManifestEntry,m as isBackupManifestKey,Be as loadStudioDocument,$ as memoizeIdentity,ee as memoizeIdentityPerRequest,f as normalizeBackupPrefix,fe as otlpSink,H as parseStackFrames,xe as pipelineLogSink,W as presenceProbe,G as r2Sink,Ae as requestCarriesCredentials,Q as resolveLogArchiveFromEnv,k as resolveLunoraOptions,Me as resolveSecurity,ye as resolveShard,Le as restCacheHeaders,ge as restSurfaceFromRegistry,qe as routeIdentityResolvers,K as runExportTap,U as sanitizeChange,E as toAirbyteMessages,P as toError,I as toErrorResponse,R as toFivetranResponse,w as webhookExportSink,Ee as webhookSink,b as withFrameworkWorker};