@tokenoftrust/storefront-runner 2.4.88 → 2.4.89

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 (152) hide show
  1. package/apps/storefront/astro.config.mjs +1 -1
  2. package/apps/storefront/perf/README.md +6 -6
  3. package/apps/storefront/perf/assert-budgets.ts +2 -2
  4. package/apps/storefront/src/components/content/storefront/blog/BlogPaywall.astro +1 -1
  5. package/apps/storefront/src/config/adminTargetTenant.ts +1 -1
  6. package/apps/storefront/src/config/devTenants.ts +1 -1
  7. package/apps/storefront/src/config/resolver.ts +1 -1
  8. package/apps/storefront/src/layouts/Layout.astro +4 -4
  9. package/apps/storefront/src/lib/{admin → access/admin}/README.md +3 -3
  10. package/apps/storefront/src/lib/{admin → access/admin}/adminShell.ts +1 -1
  11. package/apps/storefront/src/lib/{admin → access/admin}/envelope.ts +2 -2
  12. package/apps/storefront/src/lib/{admin → access/admin}/viewmodels/settings.ts +2 -2
  13. package/apps/storefront/src/lib/{auth → access/auth}/adminApiGuard.ts +2 -2
  14. package/apps/storefront/src/lib/{auth → access/auth}/adminEntry.ts +2 -2
  15. package/apps/storefront/src/lib/{auth → access/auth}/adminLanding.ts +1 -1
  16. package/apps/storefront/src/lib/{auth → access/auth}/identityToken.ts +1 -1
  17. package/apps/storefront/src/lib/{auth → access/auth}/loginGate.ts +2 -2
  18. package/apps/storefront/src/lib/{auth → access/auth}/totAccessClient.ts +4 -4
  19. package/apps/storefront/src/lib/{dashboard → access/dashboard}/delegateGate.ts +2 -2
  20. package/apps/storefront/src/lib/{dashboard → access/dashboard}/staffAdmission.ts +1 -1
  21. package/apps/storefront/src/lib/{dashboard → access/dashboard}/tenantSelection.ts +1 -1
  22. package/apps/storefront/src/lib/{admin/services/mock → access/fixtures}/settings.ts +4 -4
  23. package/apps/storefront/src/lib/{shared → access/shared}/accessExplain.ts +1 -1
  24. package/apps/storefront/src/lib/{adminTenantEnvelope.ts → access/shared/adminTenantEnvelope.ts} +3 -3
  25. package/apps/storefront/src/lib/{shared → access/shared}/developerInvites.ts +4 -4
  26. package/apps/storefront/src/lib/{shared → access/shared}/invitePreflight.ts +1 -1
  27. package/apps/storefront/src/lib/{shared → access/shared}/principalGrants.ts +2 -2
  28. package/apps/storefront/src/lib/{shared → access/shared}/viewerGrant.ts +1 -1
  29. package/apps/storefront/src/lib/activity/fixtures/evidence.ts +2 -2
  30. package/apps/storefront/src/lib/activity/uiActor.ts +4 -4
  31. package/apps/storefront/src/lib/activity/workerCommit.ts +1 -1
  32. package/apps/storefront/src/lib/admin/services/mock/index.ts +4 -4
  33. package/apps/storefront/src/lib/{admin → automation/admin}/viewmodels/aiWorkflows.ts +3 -3
  34. package/apps/storefront/src/lib/{admin → automation}/ai/askEnvelope.ts +1 -1
  35. package/apps/storefront/src/lib/{admin → automation}/ai/operationalRuns.ts +4 -4
  36. package/apps/storefront/src/lib/{admin/services/mock → automation/fixtures}/aiWorkflows.ts +4 -4
  37. package/apps/storefront/src/lib/basePath.ts +1 -1
  38. package/apps/storefront/src/lib/catalog/fixtures/products.ts +4 -4
  39. package/apps/storefront/src/lib/checkout/admin/checkoutStyleTarget.ts +2 -2
  40. package/apps/storefront/src/lib/checkout/fixtures/checkoutSettings.ts +1 -1
  41. package/apps/storefront/src/lib/compliance/browser/checkoutVerificationFlow.ts +1 -1
  42. package/apps/storefront/src/lib/compliance/verification/totVerificationClient.ts +1 -1
  43. package/apps/storefront/src/lib/content/blog/access.ts +1 -1
  44. package/apps/storefront/src/lib/content/blog/postView.ts +2 -2
  45. package/apps/storefront/src/lib/content/storyblok/provider.ts +1 -1
  46. package/apps/storefront/src/lib/customers/fixtures/customers.ts +3 -3
  47. package/apps/storefront/src/lib/{admin → developer-experience/admin}/memoizeByEnvelope.ts +1 -1
  48. package/apps/storefront/src/lib/{dev → developer-experience/dev}/activityIngestToken.ts +2 -2
  49. package/apps/storefront/src/lib/{dev → developer-experience/dev}/cliSignInCode.ts +3 -3
  50. package/apps/storefront/src/lib/{dev → developer-experience/dev}/livePreview.ts +1 -1
  51. package/apps/storefront/src/lib/{dev → developer-experience/dev}/previewStatus.ts +2 -2
  52. package/apps/storefront/src/lib/{dev → developer-experience/dev}/rendezvousBroker.ts +2 -2
  53. package/apps/storefront/src/lib/{dev → developer-experience/dev}/subjectReissue.ts +2 -2
  54. package/apps/storefront/src/lib/engagement/messaging/messagesClient.ts +1 -1
  55. package/apps/storefront/src/lib/fulfillment/fulfillmentService.ts +3 -3
  56. package/apps/storefront/src/lib/integrations/integration/browserEnvironment.ts +1 -1
  57. package/apps/storefront/src/lib/{monitoring → observability/monitoring}/manifest.ts +2 -2
  58. package/apps/storefront/src/lib/{analytics → observability/performance}/budgets.json +1 -1
  59. package/apps/storefront/src/lib/orders/fixtures/orders.ts +4 -4
  60. package/apps/storefront/src/lib/reporting/fixtures/reporting.ts +3 -3
  61. package/apps/storefront/src/lib/runtimeEnv.ts +1 -1
  62. package/apps/storefront/src/lib/subscriptions/fixtures/subscriptions.ts +3 -3
  63. package/apps/storefront/src/middleware/controlPlane.ts +6 -6
  64. package/apps/storefront/src/middleware/index.ts +11 -11
  65. package/apps/storefront/src/middleware/renderChain.ts +5 -5
  66. package/apps/storefront/src/pages/api/admin/activity-alerts.ts +1 -1
  67. package/apps/storefront/src/pages/api/admin/commerce-readiness.ts +1 -1
  68. package/apps/storefront/src/pages/api/admin/fulfillment/batches.ts +1 -1
  69. package/apps/storefront/src/pages/api/admin/fulfillment/orders/[id]/address.ts +1 -1
  70. package/apps/storefront/src/pages/api/admin/fulfillment/orders/[id].ts +1 -1
  71. package/apps/storefront/src/pages/api/admin/interaction-insights.ts +1 -1
  72. package/apps/storefront/src/pages/api/admin/orders/[id].ts +1 -1
  73. package/apps/storefront/src/pages/api/admin/orders.ts +1 -1
  74. package/apps/storefront/src/pages/api/auth/logout.ts +2 -2
  75. package/apps/storefront/src/pages/api/auth/magic-exchange.ts +6 -6
  76. package/apps/storefront/src/pages/api/auth/send.ts +2 -2
  77. package/apps/storefront/src/pages/api/auth/step-up-send.ts +1 -1
  78. package/apps/storefront/src/pages/api/auth/step-up-verify.ts +3 -3
  79. package/apps/storefront/src/pages/api/auth/verify.ts +4 -4
  80. package/apps/storefront/src/pages/api/blog/[collection]/[slug]/react.ts +1 -1
  81. package/apps/storefront/src/pages/api/newsletter/[collection]/subscribe.ts +1 -1
  82. package/apps/storefront/src/pages/api/rum/vitals.ts +1 -1
  83. package/apps/storefront/src/pages/auth/login.astro +2 -2
  84. package/apps/storefront/src/pages/auth/magic.astro +1 -1
  85. package/package.json +1 -1
  86. package/scripts/dev/locate.mjs +1 -1
  87. package/apps/storefront/src/lib/admin/ai/index.ts +0 -6
  88. /package/apps/storefront/src/components/{auth → access/storefront/auth}/AuthBadge.astro +0 -0
  89. /package/apps/storefront/src/lib/{auth → access/auth}/brokerAssertion.ts +0 -0
  90. /package/apps/storefront/src/lib/{auth → access/auth}/devAuth.ts +0 -0
  91. /package/apps/storefront/src/lib/{auth → access/auth}/gatePage.ts +0 -0
  92. /package/apps/storefront/src/lib/{auth → access/auth}/internalContentAuthority.ts +0 -0
  93. /package/apps/storefront/src/lib/{auth → access/auth}/mcpClientAssertion.ts +0 -0
  94. /package/apps/storefront/src/lib/{auth → access/auth}/operatorSession.ts +0 -0
  95. /package/apps/storefront/src/lib/{auth → access/auth}/route.ts +0 -0
  96. /package/apps/storefront/src/lib/{auth → access/auth}/session.ts +0 -0
  97. /package/apps/storefront/src/lib/{auth → access/auth}/stepUpChallenge.ts +0 -0
  98. /package/apps/storefront/src/lib/{dashboard → access/dashboard}/staffVendorAccess.ts +0 -0
  99. /package/apps/storefront/src/lib/{dashboard → access/dashboard}/vendorQuery.ts +0 -0
  100. /package/apps/storefront/src/lib/{admin/services/mock → access/fixtures}/tenants.ts +0 -0
  101. /package/apps/storefront/src/lib/{email → access/notifications}/magicLinkInviteEmail.ts +0 -0
  102. /package/apps/storefront/src/lib/{privacy → access/privacy}/emailHint.ts +0 -0
  103. /package/apps/storefront/src/lib/{rate → access/rate}/kvWindow.ts +0 -0
  104. /package/apps/storefront/src/lib/{shared → access/shared}/capability.ts +0 -0
  105. /package/apps/storefront/src/lib/{cspStaticHashes.ts → access/shared/cspStaticHashes.ts} +0 -0
  106. /package/apps/storefront/src/lib/{demoGate.ts → access/shared/demoGate.ts} +0 -0
  107. /package/apps/storefront/src/lib/{maintenance.ts → access/shared/maintenance.ts} +0 -0
  108. /package/apps/storefront/src/lib/{securityHeaders.ts → access/shared/securityHeaders.ts} +0 -0
  109. /package/apps/storefront/src/lib/{tenantOrigins.ts → access/shared/tenantOrigins.ts} +0 -0
  110. /package/apps/storefront/src/lib/{tenantRouting.ts → access/shared/tenantRouting.ts} +0 -0
  111. /package/apps/storefront/src/lib/{admin → automation}/ai/approvalMode.ts +0 -0
  112. /package/apps/storefront/src/lib/{admin → automation}/ai/audit.ts +0 -0
  113. /package/apps/storefront/src/lib/{admin → automation}/ai/recommendation.ts +0 -0
  114. /package/apps/storefront/src/lib/{admin → developer-experience/admin}/seed.ts +0 -0
  115. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/activityStore.ts +0 -0
  116. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/ai-widget-client.js +0 -0
  117. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/apiBase.ts +0 -0
  118. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/ask.ts +0 -0
  119. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/clickToSource.ts +0 -0
  120. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/copyCommand.ts +0 -0
  121. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/files.ts +0 -0
  122. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/hostedActivity.ts +0 -0
  123. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/infoPopover.ts +0 -0
  124. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/mcpCopy.ts +0 -0
  125. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/monitor.ts +0 -0
  126. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/stepper.ts +0 -0
  127. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/themeToggle.ts +0 -0
  128. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/devDraft.ts +0 -0
  129. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/obstacleStore.ts +0 -0
  130. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/runtimeStore.ts +0 -0
  131. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/storeStatus.ts +0 -0
  132. /package/apps/storefront/src/lib/{fixtures → developer-experience/fixtures}/regulated-commerce-truth/index.ts +0 -0
  133. /package/apps/storefront/src/lib/{fixtures → developer-experience/fixtures}/ws3-readonly-clone-preflight/index.ts +0 -0
  134. /package/apps/storefront/src/lib/{http → developer-experience/http}/fetchTransport.ts +0 -0
  135. /package/apps/storefront/src/lib/{http → developer-experience/http}/mcpServiceCall.ts +0 -0
  136. /package/apps/storefront/src/lib/{memoryKv.ts → developer-experience/shared/memoryKv.ts} +0 -0
  137. /package/apps/storefront/src/lib/{cloudflare-workers.d.ts → developer-experience/types/cloudflare-workers.d.ts} +0 -0
  138. /package/apps/storefront/src/lib/{diag → observability/diag}/capture.ts +0 -0
  139. /package/apps/storefront/src/lib/{diag → observability/diag}/consoleLine.ts +0 -0
  140. /package/apps/storefront/src/lib/{diag → observability/diag}/debugConsole.ts +0 -0
  141. /package/apps/storefront/src/lib/{diag → observability/diag}/debugMode.ts +0 -0
  142. /package/apps/storefront/src/lib/{diag → observability/diag}/debugWindow.ts +0 -0
  143. /package/apps/storefront/src/lib/{diag → observability/diag}/redact.ts +0 -0
  144. /package/apps/storefront/src/lib/{diag → observability/diag}/reference.ts +0 -0
  145. /package/apps/storefront/src/lib/{diag → observability/diag}/referenceStore.ts +0 -0
  146. /package/apps/storefront/src/lib/{diag → observability/diag}/report.ts +0 -0
  147. /package/apps/storefront/src/lib/{diag → observability/diag}/session.ts +0 -0
  148. /package/apps/storefront/src/lib/{analytics → observability/performance}/lighthouseReport.ts +0 -0
  149. /package/apps/storefront/src/lib/{analytics → observability/performance}/perfBudgets.ts +0 -0
  150. /package/apps/storefront/src/lib/{analytics → observability/performance}/rumAlert.ts +0 -0
  151. /package/apps/storefront/src/lib/{analytics → observability/performance}/webVitals.ts +0 -0
  152. /package/apps/storefront/src/lib/{health.ts → observability/shared/health.ts} +0 -0
@@ -867,7 +867,7 @@ export class DevDraftContentProvider implements ContentProvider {
867
867
 
868
868
  /** Draft artifact for a tenant-repo-relative path, or null to fall back. */
869
869
  private draftRaw(path: string): Promise<string | null> {
870
- // Key shape mirrors lib/dev/devDraft.ts devDraftKey — duplicated as a plain
870
+ // Key shape mirrors lib/developer-experience/dev/devDraft.ts devDraftKey — duplicated as a plain
871
871
  // template to keep this module's imports renderer-safe (public-runtime only).
872
872
  return this.get(`dev-draft:${this.tenantId}:${this.draftId}:${path}`);
873
873
  }
@@ -1,6 +1,6 @@
1
- import type { AdminTenantEnvelope } from "../../admin/envelope";
2
- import { memoizeByEnvelope } from "../../admin/memoizeByEnvelope";
3
- import { MOCK_ANCHOR_ISO, offsetIso, pick, randomBool, randomInt, seededRandom } from "../../admin/seed";
1
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
2
+ import { memoizeByEnvelope } from "../../developer-experience/admin/memoizeByEnvelope";
3
+ import { MOCK_ANCHOR_ISO, offsetIso, pick, randomBool, randomInt, seededRandom } from "../../developer-experience/admin/seed";
4
4
  import type {
5
5
  BlockedReason,
6
6
  CustomerBlockedQueueRow,
@@ -1,4 +1,4 @@
1
- import type { AdminTenantEnvelope } from "./envelope";
1
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
2
2
 
3
3
  /**
4
4
  * Per-request memoization for the pure mock view-model builders. Each builder is
@@ -4,12 +4,12 @@
4
4
  * local→hosted activity bridge.
5
5
  *
6
6
  * Minted alongside the existing cli-signin-code paste
7
- * (apps/storefront/src/lib/dev/cliSignInCode.ts) and cached by the CLI in
7
+ * (apps/storefront/src/lib/developer-experience/dev/cliSignInCode.ts) and cached by the CLI in
8
8
  * ~/.tot/credentials.json. Deliberately NOT a signed token: this reuses the
9
9
  * SESSION KV binding that already exists in every environment (dev/qa/prod),
10
10
  * so it needs no new secret to provision. Revoking is just deleting the KV
11
11
  * entry — the same posture as the browser's own tot_session cookie (see
12
- * lib/auth/session.ts).
12
+ * lib/access/auth/session.ts).
13
13
  */
14
14
 
15
15
  const KEY_PREFIX = "dev-activity-token:";
@@ -18,13 +18,13 @@
18
18
  * on prod the shortest form is emitted.
19
19
  *
20
20
  * `activityBridge` (optional) piggybacks the local→hosted activity-bridge credential
21
- * (see lib/dev/activityIngestToken.ts) onto the SAME pasted line as two extra `tot login`
21
+ * (see lib/developer-experience/dev/activityIngestToken.ts) onto the SAME pasted line as two extra `tot login`
22
22
  * flags — no second browser round-trip. Omitted entirely when the caller has no SESSION KV
23
23
  * to mint against — the local loop then simply runs with no hosted signal.
24
24
  */
25
25
  import { readEnv } from "@/lib/env";
26
- import { redactEmailForHint } from "@/lib/privacy/emailHint";
27
- import { createRendezvous, type RendezvousDeps } from "@/lib/dev/rendezvousBroker";
26
+ import { redactEmailForHint } from "@/lib/access/privacy/emailHint";
27
+ import { createRendezvous, type RendezvousDeps } from "@/lib/developer-experience/dev/rendezvousBroker";
28
28
 
29
29
  // The CLI's built-in default MCP (packages/cli login.mjs DEFAULT_MCP_URL). When the derived
30
30
  // MCP origin equals this, --mcp is redundant noise, so we omit it.
@@ -5,7 +5,7 @@
5
5
  * shape + the request host + a config flag, never a secret.
6
6
  *
7
7
  * WHY AN IFRAME WORKS (no screenshots, no new infra): tenant routing is host-first with a
8
- * `/<appDomain>/…` path-prefix fallback on the same worker (src/lib/tenantRouting.ts), so
8
+ * `/<appDomain>/…` path-prefix fallback on the same worker (src/lib/access/shared/tenantRouting.ts), so
9
9
  * the tenant's real site is reachable at a RELATIVE path from /dev. CSP already permits
10
10
  * same-origin framing both directions (`frame-ancestors 'self'` + `frame-src 'self'`,
11
11
  * packages/public-runtime/src/csp.ts) alongside `X-Frame-Options: SAMEORIGIN` — no header
@@ -20,8 +20,8 @@
20
20
  * transport / parse fault → { configured:true, ok:false } so a caller can distinguish
21
21
  * "definitely not provisioned" (ok + provisioned:false) from "couldn't tell". Never throws.
22
22
  */
23
- import { callMcpService } from "@/lib/http/mcpServiceCall";
24
- import { FetchHttpTransport, type HttpGetTransport } from "@/lib/http/fetchTransport";
23
+ import { callMcpService } from "@/lib/developer-experience/http/mcpServiceCall";
24
+ import { FetchHttpTransport, type HttpGetTransport } from "@/lib/developer-experience/http/fetchTransport";
25
25
 
26
26
  export type { HttpGetTransport };
27
27
 
@@ -20,8 +20,8 @@
20
20
  * one minted assertion shape covers every call. SERVER-SIDE ONLY.
21
21
  */
22
22
  import { readEnv } from "@/lib/env";
23
- import { mintMcpClientAssertion, McpClientAssertionError } from "@/lib/auth/mcpClientAssertion";
24
- import { FetchHttpTransport, type HttpTransport } from "@/lib/http/fetchTransport";
23
+ import { mintMcpClientAssertion, McpClientAssertionError } from "@/lib/access/auth/mcpClientAssertion";
24
+ import { FetchHttpTransport, type HttpTransport } from "@/lib/developer-experience/http/fetchTransport";
25
25
 
26
26
  export type { HttpTransport };
27
27
 
@@ -20,8 +20,8 @@
20
20
  * MCP client_id, exactly what the MCP binds the subject_token audience to. This is the
21
21
  * same non-gated mint the MCP itself uses to power rendezvous creation.
22
22
  */
23
- import { getAccessClient } from "@/lib/auth/route";
24
- import type { TotAccessClient } from "@/lib/auth/totAccessClient";
23
+ import { getAccessClient } from "@/lib/access/auth/route";
24
+ import type { TotAccessClient } from "@/lib/access/auth/totAccessClient";
25
25
 
26
26
  /** Short — the proof is minted and used immediately at approve time. */
27
27
  const SUBJECT_TOKEN_TTL_SECONDS = 120;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * The storefront RENDERS its own branded email HTML and hands it to tot20 to TRANSMIT, so we
5
5
  * reuse tot20's Mandrill SPF/DKIM deliverability (the whole point) while owning the body/brand.
6
- * Used for the magic-link invite email (see lib/grants/magicLinkInvite.ts).
6
+ * Used for the magic-link invite email (see lib/access/grants/magicLinkInvite.ts).
7
7
  *
8
8
  * POST <core>/api/messages
9
9
  * { channel:"email", to, subject, html, totApiKey, totSecretKey } → 200 { sent:true, id? }
@@ -31,9 +31,9 @@ import {
31
31
  type StockState,
32
32
  } from "@tot/public-runtime";
33
33
  import { readD1 } from "@/lib/env";
34
- import { decideAdminApiAccess } from "@/lib/auth/adminApiGuard";
35
- import { readViewerSession } from "@/lib/auth/route";
36
- import type { SessionRecord } from "@/lib/auth/session";
34
+ import { decideAdminApiAccess } from "@/lib/access/auth/adminApiGuard";
35
+ import { readViewerSession } from "@/lib/access/auth/route";
36
+ import type { SessionRecord } from "@/lib/access/auth/session";
37
37
  import {
38
38
  canRelease,
39
39
  carrierPolicyForTenant,
@@ -19,7 +19,7 @@ import {
19
19
  type IntegrationSiteSurface,
20
20
  type ObligationTenant,
21
21
  } from "@tot/public-runtime";
22
- import { isAdminPath } from "@/lib/auth/loginGate";
22
+ import { isAdminPath } from "@/lib/access/auth/loginGate";
23
23
  import {
24
24
  resolveIntegrationRenderState,
25
25
  type IntegrationRenderState,
@@ -10,7 +10,7 @@
10
10
  * `needs-external` / `needs-secret`.
11
11
  *
12
12
  * Signal sources are named against real code where it exists in this repo
13
- * (`/health` → lib/health.ts, CSP → pages/api/csp-report.ts + CSP_REPORT_PATH,
13
+ * (`/health` → lib/observability/shared/health.ts, CSP → pages/api/csp-report.ts + CSP_REPORT_PATH,
14
14
  * commerce events → lib/analytics). Signals owned by sibling units are referenced
15
15
  * by CONTRACT NAME, not imported — Core Web Vitals come from the RUM beacon,
16
16
  * and age-verification / restricted-state denials come from the compliance
@@ -99,7 +99,7 @@ export const MONITORS: readonly Monitor[] = [
99
99
  title: "Storefront uptime / liveness",
100
100
  category: "availability",
101
101
  signal: {
102
- source: "GET /health (lib/health.ts — answered before tenant/gate/cache)",
102
+ source: "GET /health (lib/observability/shared/health.ts — answered before tenant/gate/cache)",
103
103
  observe: "external synthetic probe hits /health across regions; expects 200 {status:'ok'}",
104
104
  },
105
105
  threshold: "2 consecutive probe failures (or >1% of probes failing over 5m)",
@@ -1,5 +1,5 @@
1
1
  {
2
- "$comment": "F14 performance budgets manifest — the checked-in, tool-neutral source of truth for the storefront go-live framework's perf gate. Consumed by (1) the lab budget-assertion harness (perf/assert-budgets.ts), (2) the Lighthouse budgets exporter (toLighthouseBudgets), and (3) the field RUM regression-alert contract (rumAlert.ts). Edit HERE — everything else derives from it. Shape + validation: src/lib/analytics/perfBudgets.ts (parsePerfBudgets).",
2
+ "$comment": "F14 performance budgets manifest — the checked-in, tool-neutral source of truth for the storefront go-live framework's perf gate. Consumed by (1) the lab budget-assertion harness (perf/assert-budgets.ts), (2) the Lighthouse budgets exporter (toLighthouseBudgets), and (3) the field RUM regression-alert contract (rumAlert.ts). Edit HERE — everything else derives from it. Shape + validation: src/lib/observability/performance/perfBudgets.ts (parsePerfBudgets).",
3
3
  "version": 1,
4
4
  "webVitals": {
5
5
  "$comment": "Core Web Vitals thresholds, evaluated at the 75th percentile (p75) of the field distribution — the same percentile Google's CrUX / the RUM alert contract use.",
@@ -1,5 +1,5 @@
1
- import type { AdminTenantEnvelope } from "../../admin/envelope";
2
- import { MOCK_ANCHOR_ISO, offsetIso, pick, randomBool, randomInt, seededRandom } from "../../admin/seed";
1
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
2
+ import { MOCK_ANCHOR_ISO, offsetIso, pick, randomBool, randomInt, seededRandom } from "../../developer-experience/admin/seed";
3
3
  import type {
4
4
  OrderDetail,
5
5
  OrderEvidenceEvent,
@@ -8,8 +8,8 @@ import type {
8
8
  OrderRow,
9
9
  OrdersViewModel,
10
10
  } from "../admin/viewmodels/orders";
11
- import { tenantProfile } from "../../admin/services/mock/tenants";
12
- import { memoizeByEnvelope } from "../../admin/memoizeByEnvelope";
11
+ import { tenantProfile } from "../../access/fixtures/tenants";
12
+ import { memoizeByEnvelope } from "../../developer-experience/admin/memoizeByEnvelope";
13
13
 
14
14
  // Must stay index-aligned with customers.ts's NAMES: an order's customerId is
15
15
  // derived from the picked name's position here, and customers.ts assigns each
@@ -1,6 +1,6 @@
1
- import type { AdminTenantEnvelope } from "../../admin/envelope";
2
- import { memoizeByEnvelope } from "../../admin/memoizeByEnvelope";
3
- import { pick, randomInt, seededRandom } from "../../admin/seed";
1
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
2
+ import { memoizeByEnvelope } from "../../developer-experience/admin/memoizeByEnvelope";
3
+ import { pick, randomInt, seededRandom } from "../../developer-experience/admin/seed";
4
4
  import type { AnalysisBriefItem, ReportingCategory, ReportingSummary, ReportingViewModel } from "../admin/viewmodels/reporting";
5
5
 
6
6
  const CATEGORY_DEFS: { category: ReportingCategory; label: string; drilldownHref: string }[] = [
@@ -22,7 +22,7 @@ let workerEnv: Record<string, unknown> | null | undefined;
22
22
  export async function getWorkerEnv(): Promise<Record<string, unknown> | null> {
23
23
  if (workerEnv !== undefined) return workerEnv;
24
24
  try {
25
- // Only resolvable in the Workers runtime; types in lib/cloudflare-workers.d.ts.
25
+ // Only resolvable in the Workers runtime; types in lib/developer-experience/types/cloudflare-workers.d.ts.
26
26
  const mod = await import("cloudflare:workers");
27
27
  workerEnv = (mod.env ?? null) as Record<string, unknown> | null;
28
28
  } catch {
@@ -7,14 +7,14 @@ import {
7
7
  isSubscriptionFrequency,
8
8
  purchaseOptionPrice,
9
9
  } from "@tot/public-runtime";
10
- import type { AdminTenantEnvelope } from "../../admin/envelope";
11
- import { memoizeByEnvelope } from "../../admin/memoizeByEnvelope";
10
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
11
+ import { memoizeByEnvelope } from "../../developer-experience/admin/memoizeByEnvelope";
12
12
  import {
13
13
  MOCK_ANCHOR_ISO,
14
14
  offsetIso,
15
15
  randomInt,
16
16
  seededRandom,
17
- } from "../../admin/seed";
17
+ } from "../../developer-experience/admin/seed";
18
18
  import type { CustomerRow } from "../../customers/admin/viewmodels/customers";
19
19
  import type { ProductDetail, ProductRow } from "../../catalog/admin/viewmodels/products";
20
20
  import type {
@@ -30,14 +30,14 @@ import {
30
30
  sessionAdmitsHost,
31
31
  sessionHostCapability,
32
32
  type GateMode,
33
- } from "@/lib/auth/loginGate";
34
- import { resolveAdminLanding, isAdminSelectPath } from "@/lib/auth/adminLanding";
35
- import { resolveAdminTenantMode } from "@/lib/adminTenantEnvelope";
36
- import { gatedApiResponse, gatedHoldingResponse } from "@/lib/auth/gatePage";
37
- import { readSession, KvSessionStore, SESSION_COOKIE } from "@/lib/auth/session";
33
+ } from "@/lib/access/auth/loginGate";
34
+ import { resolveAdminLanding, isAdminSelectPath } from "@/lib/access/auth/adminLanding";
35
+ import { resolveAdminTenantMode } from "@/lib/access/shared/adminTenantEnvelope";
36
+ import { gatedApiResponse, gatedHoldingResponse } from "@/lib/access/auth/gatePage";
37
+ import { readSession, KvSessionStore, SESSION_COOKIE } from "@/lib/access/auth/session";
38
38
  import { runRenderChain } from "./renderChain.js";
39
39
  import { resolveCandidateContentPin } from "./candidatePin.js";
40
- import type { InternalContentGrant } from "@/lib/auth/internalContentAuthority";
40
+ import type { InternalContentGrant } from "@/lib/access/auth/internalContentAuthority";
41
41
 
42
42
  export interface ControlPlaneInput {
43
43
  context: APIContext;
@@ -23,19 +23,19 @@ import { defineMiddleware } from "astro:middleware";
23
23
  import type { APIContext, MiddlewareNext } from "astro";
24
24
  import { getTenantResolver } from "@/config/resolver";
25
25
  import { readEnv, readKv, readR2 } from "@/lib/runtimeEnv";
26
- import { resolveCdnForwardRouting, resolveTenantRouting } from "@/lib/tenantRouting";
26
+ import { resolveCdnForwardRouting, resolveTenantRouting } from "@/lib/access/shared/tenantRouting";
27
27
  import { crossSiteFormRefusal, verifyCdnForward } from "@/lib/cdnForward";
28
28
  import { compileRouteTierIndexV1, resolvePublicationRoutePlanV1, type RouteTierIndexV1 , storefrontModeRequiresSignIn } from "@tot/public-runtime";
29
29
  import type { PublicationArtifactBucketV1, TenantConfig } from "@tot/public-runtime";
30
- import { DEV_DRAFT_COOKIE } from "@/lib/dev/devDraft";
31
- import { applySecurityHeaders } from "@/lib/securityHeaders";
30
+ import { DEV_DRAFT_COOKIE } from "@/lib/developer-experience/dev/devDraft";
31
+ import { applySecurityHeaders } from "@/lib/access/shared/securityHeaders";
32
32
  import { visitorRegionFor, withVisitorRegionCookie } from "@/lib/compliance/shared/visitorRegionCookie";
33
33
  import { tryServeStaticBundle } from "./staticBundle.js";
34
34
  import { resolveCandidateContentPin } from "./candidatePin.js";
35
- import { parseGateMode } from "@/lib/auth/loginGate";
36
- import { evaluateDemoGate, hostInGateList } from "@/lib/demoGate";
37
- import { isMaintenanceOn, maintenanceResponse } from "@/lib/maintenance";
38
- import { HEALTH_PATH, healthResponse } from "@/lib/health";
35
+ import { parseGateMode } from "@/lib/access/auth/loginGate";
36
+ import { evaluateDemoGate, hostInGateList } from "@/lib/access/shared/demoGate";
37
+ import { isMaintenanceOn, maintenanceResponse } from "@/lib/access/shared/maintenance";
38
+ import { HEALTH_PATH, healthResponse } from "@/lib/observability/shared/health";
39
39
  import { observeDeployVersion } from "@/lib/activity/deployVersion";
40
40
  import { primeActivityKillSwitch } from "@/lib/activity/killSwitch";
41
41
  import {
@@ -46,13 +46,13 @@ import {
46
46
  } from "./routeBranch.js";
47
47
  import { servePublicRender } from "./publicRender.js";
48
48
  import { serveControlPlane } from "./controlPlane.js";
49
- import { KvSessionStore, SESSION_COOKIE } from "@/lib/auth/session";
50
- import { mintOpaqueBrokerAssertion } from "@/lib/auth/brokerAssertion";
49
+ import { KvSessionStore, SESSION_COOKIE } from "@/lib/access/auth/session";
50
+ import { mintOpaqueBrokerAssertion } from "@/lib/access/auth/brokerAssertion";
51
51
  import {
52
52
  applyInternalContentResponsePolicy,
53
53
  authorizeInternalContentRequest,
54
54
  type InternalContentGrant,
55
- } from "@/lib/auth/internalContentAuthority";
55
+ } from "@/lib/access/auth/internalContentAuthority";
56
56
 
57
57
  /**
58
58
  * Compiled once per tenant-config object, as the resolver's contract asks —
@@ -109,7 +109,7 @@ async function serveRequest(
109
109
  // ---- /health — liveness + deploy-identity probe ---------------------------
110
110
  // Answered FIRST: before tenant resolution, the access gate, the maintenance
111
111
  // kill-switch, and the edge cache — so it reports the running build's commit SHA
112
- // regardless of Host, an unresolved tenant, or a closed site. See lib/health.
112
+ // regardless of Host, an unresolved tenant, or a closed site. See lib/observability/shared/health.
113
113
  if (url.pathname === HEALTH_PATH) {
114
114
  return healthResponse();
115
115
  }
@@ -19,7 +19,7 @@ import { resolveCandidateContentPin, type CandidateContentPin } from "./candidat
19
19
  import { createContentProvider, DevDraftContentProvider } from "@/lib/content/storyblok/provider";
20
20
  import { bindPublicationSpaceContentProviderV1 } from "@/lib/publication/contentProvider.js";
21
21
  import { resolvePublicationRuntimeSourceV1 } from "@/lib/publication/runtimeSource.js";
22
- import { DEV_DRAFT_COOKIE, devDraftKey, verifyDevDraftToken } from "@/lib/dev/devDraft";
22
+ import { DEV_DRAFT_COOKIE, devDraftKey, verifyDevDraftToken } from "@/lib/developer-experience/dev/devDraft";
23
23
  import {
24
24
  isCacheablePath,
25
25
  pageCacheKey,
@@ -27,8 +27,8 @@ import {
27
27
  getCachedPage,
28
28
  putCachedPage,
29
29
  } from "@/lib/edgeCache";
30
- import { STATIC_SCRIPT_HASHES, STATIC_STYLE_HASHES } from "@/lib/cspStaticHashes";
31
- import { applySecurityHeaders } from "@/lib/securityHeaders";
30
+ import { STATIC_SCRIPT_HASHES, STATIC_STYLE_HASHES } from "@/lib/access/shared/cspStaticHashes";
31
+ import { applySecurityHeaders } from "@/lib/access/shared/securityHeaders";
32
32
  import { maybeInjectPreviewReload } from "@/lib/previewReload";
33
33
  import {
34
34
  resolveCustomizationEnv,
@@ -104,13 +104,13 @@ import {
104
104
  } from "@/lib/integrations/integration/renderIntegrationState";
105
105
  import { recordActivity } from "@/lib/activity/recordActivity";
106
106
  import { middlewareRewriteTargetV1 } from "./routeBranch.js";
107
- import { declaredTenantOrigins } from "@/lib/tenantOrigins";
107
+ import { declaredTenantOrigins } from "@/lib/access/shared/tenantOrigins";
108
108
  import { withDeclaredTenantConfig } from "@/config/declaredTenantConfig";
109
109
  import {
110
110
  applyInternalContentResponsePolicy,
111
111
  internalContentGrantMatchesPlan,
112
112
  type InternalContentGrant,
113
- } from "@/lib/auth/internalContentAuthority";
113
+ } from "@/lib/access/auth/internalContentAuthority";
114
114
 
115
115
  export interface RenderChainInput {
116
116
  context: APIContext;
@@ -25,7 +25,7 @@
25
25
  * ops-timeline; never a URL/query value.
26
26
  */
27
27
  import type { APIContext } from "astro";
28
- import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
28
+ import { requireAdminApiEntry } from "@/lib/access/auth/adminApiGuard";
29
29
  import { readD1 } from "@/lib/env";
30
30
  import { fromD1 } from "@/lib/catalog/d1/catalog";
31
31
  import { checkActivityAlerts } from "@/lib/activity/alerts";
@@ -9,7 +9,7 @@
9
9
  * surface has no ledger, so configured, absent, and unreadable stay unhealthy.
10
10
  */
11
11
  import type { APIContext } from "astro";
12
- import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
12
+ import { requireAdminApiEntry } from "@/lib/access/auth/adminApiGuard";
13
13
  import { workerCommit } from "@/lib/activity/workerCommit";
14
14
  import {
15
15
  COMMERCE_SCHEDULER,
@@ -2,7 +2,7 @@
2
2
  * Authenticated owner API for whole-order batch claim and batch read.
3
3
  */
4
4
  import type { APIContext } from "astro";
5
- import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
5
+ import { requireAdminApiEntry } from "@/lib/access/auth/adminApiGuard";
6
6
  import {
7
7
  fulfillmentResultResponse,
8
8
  isOpaqueId,
@@ -3,7 +3,7 @@
3
3
  * The read runs only after the owner gate admits the caller.
4
4
  */
5
5
  import type { APIContext } from "astro";
6
- import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
6
+ import { requireAdminApiEntry } from "@/lib/access/auth/adminApiGuard";
7
7
  import {
8
8
  fulfillmentResultResponse,
9
9
  isOpaqueId,
@@ -3,7 +3,7 @@
3
3
  * The response is state codes and the fulfillment view. It never returns an address.
4
4
  */
5
5
  import type { APIContext } from "astro";
6
- import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
6
+ import { requireAdminApiEntry } from "@/lib/access/auth/adminApiGuard";
7
7
  import {
8
8
  fulfillmentResultResponse,
9
9
  isOpaqueId,
@@ -28,7 +28,7 @@
28
28
  * scoping) — see the unit's completion report for the reasoning.
29
29
  */
30
30
  import type { APIContext } from "astro";
31
- import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
31
+ import { requireAdminApiEntry } from "@/lib/access/auth/adminApiGuard";
32
32
  import { readD1 } from "@/lib/env";
33
33
  import { fromD1 } from "@/lib/catalog/d1/catalog";
34
34
  import { resolveTenantStore, trackingNamePrefix } from "@/lib/measurement/tracking/tenantD1Registry";
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import type { APIContext } from "astro";
10
10
  import { readEnv } from "@/lib/env";
11
- import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
11
+ import { requireAdminApiEntry } from "@/lib/access/auth/adminApiGuard";
12
12
  import {
13
13
  commerceActorForAdmin,
14
14
  createCheckoutOrderClient,
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import type { APIContext } from "astro";
13
13
  import { readEnv } from "@/lib/env";
14
- import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
14
+ import { requireAdminApiEntry } from "@/lib/access/auth/adminApiGuard";
15
15
  import {
16
16
  createCheckoutOrderClient,
17
17
  orderApiBaseUrl,
@@ -7,8 +7,8 @@
7
7
  * sign out.
8
8
  */
9
9
  import type { APIContext } from "astro";
10
- import { getSessionStore, clearSessionCookie } from "@/lib/auth/route";
11
- import { revokeSession, SESSION_COOKIE } from "@/lib/auth/session";
10
+ import { getSessionStore, clearSessionCookie } from "@/lib/access/auth/route";
11
+ import { revokeSession, SESSION_COOKIE } from "@/lib/access/auth/session";
12
12
 
13
13
  export const prerender = false;
14
14
 
@@ -18,15 +18,15 @@ import {
18
18
  getSessionStore,
19
19
  setSessionCookie,
20
20
  safeNext,
21
- } from "@/lib/auth/route";
21
+ } from "@/lib/access/auth/route";
22
22
  import {
23
23
  getFederatedVerifier,
24
24
  sessionFromFederatedClaims,
25
- } from "@/lib/auth/identityToken";
26
- import { createSession, DEFAULT_SESSION_TTL_SECONDS } from "@/lib/auth/session";
27
- import { normalizeEmailHint } from "@/lib/privacy/emailHint";
28
- import { acceptDeveloperInvite } from "@/lib/shared/developerInvites";
29
- import { explainDeveloperAccess } from "@/lib/shared/accessExplain";
25
+ } from "@/lib/access/auth/identityToken";
26
+ import { createSession, DEFAULT_SESSION_TTL_SECONDS } from "@/lib/access/auth/session";
27
+ import { normalizeEmailHint } from "@/lib/access/privacy/emailHint";
28
+ import { acceptDeveloperInvite } from "@/lib/access/shared/developerInvites";
29
+ import { explainDeveloperAccess } from "@/lib/access/shared/accessExplain";
30
30
 
31
31
  export const prerender = false;
32
32
 
@@ -15,13 +15,13 @@ import {
15
15
  getAccessClient,
16
16
  safeNext,
17
17
  loginRedirect,
18
- } from "@/lib/auth/route";
18
+ } from "@/lib/access/auth/route";
19
19
  import {
20
20
  devAuthEnabled,
21
21
  devAuthCode,
22
22
  storeDevCode,
23
23
  DEV_AUTH_CODE_TTL_SECONDS,
24
- } from "@/lib/auth/devAuth";
24
+ } from "@/lib/access/auth/devAuth";
25
25
 
26
26
  export const prerender = false;
27
27
 
@@ -13,7 +13,7 @@
13
13
  * but also accepts a plain form post so a no-JS fallback stays possible.
14
14
  */
15
15
  import type { APIContext } from "astro";
16
- import { getAccessClient } from "@/lib/auth/route";
16
+ import { getAccessClient } from "@/lib/access/auth/route";
17
17
 
18
18
  export const prerender = false;
19
19
 
@@ -22,9 +22,9 @@ import {
22
22
  setSessionCookie,
23
23
  safeNext,
24
24
  loginRedirect,
25
- } from "@/lib/auth/route";
26
- import { getFederatedVerifier, sessionFromFederatedClaims } from "@/lib/auth/identityToken";
27
- import { createSession, DEFAULT_SESSION_TTL_SECONDS } from "@/lib/auth/session";
25
+ } from "@/lib/access/auth/route";
26
+ import { getFederatedVerifier, sessionFromFederatedClaims } from "@/lib/access/auth/identityToken";
27
+ import { createSession, DEFAULT_SESSION_TTL_SECONDS } from "@/lib/access/auth/session";
28
28
 
29
29
  export const prerender = false;
30
30
 
@@ -21,13 +21,13 @@ import {
21
21
  setSessionCookie,
22
22
  safeNext,
23
23
  loginRedirect,
24
- } from "@/lib/auth/route";
24
+ } from "@/lib/access/auth/route";
25
25
  import {
26
26
  getFederatedVerifier,
27
27
  sessionFromFederatedClaims,
28
- } from "@/lib/auth/identityToken";
29
- import { createSession, DEFAULT_SESSION_TTL_SECONDS } from "@/lib/auth/session";
30
- import { devAuthEnabled, consumeDevCode, devSessionFields } from "@/lib/auth/devAuth";
28
+ } from "@/lib/access/auth/identityToken";
29
+ import { createSession, DEFAULT_SESSION_TTL_SECONDS } from "@/lib/access/auth/session";
30
+ import { devAuthEnabled, consumeDevCode, devSessionFields } from "@/lib/access/auth/devAuth";
31
31
 
32
32
  export const prerender = false;
33
33
 
@@ -19,7 +19,7 @@ import {
19
19
  recordReaction,
20
20
  type Reaction,
21
21
  } from "@/lib/content/blog/reactions";
22
- import { checkRateLimit } from "@/lib/rate/kvWindow";
22
+ import { checkRateLimit } from "@/lib/access/rate/kvWindow";
23
23
 
24
24
  export const prerender = false;
25
25
 
@@ -17,7 +17,7 @@
17
17
  import type { APIRoute } from "astro";
18
18
  import { readD1, readKv, readEnv } from "@/lib/env";
19
19
  import { fromD1 } from "@/lib/catalog/d1/catalog";
20
- import { checkRateLimit } from "@/lib/rate/kvWindow";
20
+ import { checkRateLimit } from "@/lib/access/rate/kvWindow";
21
21
  import { NewsletterSubscribersStore } from "@/lib/engagement/newsletter/subscribers";
22
22
  import { randomToken, hashConsentIp } from "@/lib/engagement/newsletter/consent";
23
23
  import { sendConfirmationEmail } from "@/lib/engagement/newsletter/confirmationEmail";
@@ -13,7 +13,7 @@
13
13
  * store/forward is the documented follow-up; the SHAPE it stores is fixed here.
14
14
  */
15
15
  import type { APIRoute } from "astro";
16
- import { rateMetric, type WebVitalName, type WebVitalsSample } from "@/lib/analytics/webVitals";
16
+ import { rateMetric, type WebVitalName, type WebVitalsSample } from "@/lib/observability/performance/webVitals";
17
17
  import { readKv, runAfterResponse, type CfExecutionContextLike } from "@/lib/env";
18
18
  import { recordBlogView } from "@/lib/content/blog/viewCounts";
19
19
 
@@ -10,8 +10,8 @@
10
10
  * (tot20 sends/verifies the code, the storefront mints the session). No secrets
11
11
  * reach the browser. Inline style carries the per-request CSP nonce.
12
12
  */
13
- import { normalizeEmailHint } from "@/lib/privacy/emailHint";
14
- import { safeNext } from "@/lib/auth/route";
13
+ import { normalizeEmailHint } from "@/lib/access/privacy/emailHint";
14
+ import { safeNext } from "@/lib/access/auth/route";
15
15
  // Self-hosted web fonts (audit finding 6) — same-origin @fontsource, replacing
16
16
  // the render-blocking fonts.googleapis.com stylesheet. Covers Plus Jakarta Sans,
17
17
  // Inter, and JetBrains Mono used by this page's inline styles.
@@ -9,7 +9,7 @@
9
9
  * the token before the user ever clicked. So: NEVER exchange on GET. The token rides
10
10
  * in a hidden form field and leaves only via the POST.
11
11
  */
12
- import { normalizeEmailHint, redactEmailForHint } from "@/lib/privacy/emailHint";
12
+ import { normalizeEmailHint, redactEmailForHint } from "@/lib/access/privacy/emailHint";
13
13
  // Self-hosted web fonts (audit finding 6) — same-origin @fontsource, replacing
14
14
  // the render-blocking fonts.googleapis.com stylesheet. Covers Plus Jakarta Sans,
15
15
  // Inter, and JetBrains Mono used by this page's inline styles.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenoftrust/storefront-runner",
3
- "version": "2.4.88",
3
+ "version": "2.4.89",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
6
6
  "packageManager": "pnpm@11.9.0",
@@ -6,7 +6,7 @@
6
6
  // with node:test and carries no framework/build coupling.
7
7
  //
8
8
  // THE WALK (must stay byte-identical in intent to captureDomPath() in
9
- // apps/storefront/src/lib/dev/ai-widget-client.js):
9
+ // apps/storefront/src/lib/developer-experience/dev/ai-widget-client.js):
10
10
  // A DOM path is an array of { tag, index } steps, ordered from the <body>'s
11
11
  // direct child DOWN to the target. Each step names a lowercased tag and the
12
12
  // 0-based position of that element among its same-tag ELEMENT siblings (text and
@@ -1,6 +0,0 @@
1
- export type { ApprovalMode } from "./approvalMode";
2
- export { isDraftOnly, requiresHumanApproval, isAutomationAllowed } from "./approvalMode";
3
- export type { AuditEvent } from "./audit";
4
- export type { AiRecommendation } from "./recommendation";
5
- export type { AskEnvelope, AdminRole } from "./askEnvelope";
6
- export { buildAskEnvelope } from "./askEnvelope";