@burdenoff/be-sdk 2026.1128.1 → 2026.1128.3

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 (57) hide show
  1. package/dist/activity/index.d.ts +2 -2
  2. package/dist/auth/index.d.ts +1 -1
  3. package/dist/bootstrap/index.d.ts +1 -1
  4. package/dist/bootstrap/index.js.map +1 -1
  5. package/dist/context/index.d.ts +3 -2
  6. package/dist/context/index.js +100 -72
  7. package/dist/context/index.js.map +1 -1
  8. package/dist/event-queue/index.d.ts +1 -1
  9. package/dist/feature-flags/index.d.ts +1 -1
  10. package/dist/graph/index.d.ts +1 -1
  11. package/dist/{graphql-C8jKLLel.d.ts → graphql-DcZAKC6p.d.ts} +1 -1
  12. package/dist/{index-tLd9b-nS.d.ts → index-B-yXdMeb.d.ts} +2 -2
  13. package/dist/{index-CkB68nQA.d.ts → index-B4ckqUZX.d.ts} +1 -1
  14. package/dist/{index-jStzN9rq.d.ts → index-BmL-JjQK.d.ts} +1 -1
  15. package/dist/{index-Dw_0wE4q.d.ts → index-C96mNrLW.d.ts} +2 -2
  16. package/dist/{index-B1bHk4Rq.d.ts → index-CGPNFIR3.d.ts} +2 -2
  17. package/dist/{index-BTaQMEgB.d.ts → index-CQ3vxT5P.d.ts} +6 -1
  18. package/dist/{index-KlrnELrN.d.ts → index-CZWopQsh.d.ts} +1 -1
  19. package/dist/{index-Cl2L2P47.d.ts → index-Cs426iRP.d.ts} +4 -4
  20. package/dist/{index-BQ5O967l.d.ts → index-Cx3z-7T1.d.ts} +3 -3
  21. package/dist/{index-CIayzveI.d.ts → index-DYKWUbL4.d.ts} +3 -3
  22. package/dist/{index-C_WEvMzP.d.ts → index-UQSbAERe.d.ts} +2 -2
  23. package/dist/{index-12NbzOYy.d.ts → index-cPPtZTJh.d.ts} +1 -1
  24. package/dist/{index-DS-tPMFi.d.ts → index-j1B6eYHc.d.ts} +2 -2
  25. package/dist/index.d.ts +14 -14
  26. package/dist/index.js +3 -3
  27. package/dist/instrumentation/index.d.ts +2 -2
  28. package/dist/logger/index.d.ts +1 -1
  29. package/dist/notifications/index.d.ts +1 -1
  30. package/dist/payments/index.d.ts +2 -2
  31. package/dist/prisma/index.d.ts +2 -2
  32. package/dist/prisma/index.js +2 -2
  33. package/dist/{prisma-1J9WTyAF.js → prisma-CUij0pph.js} +2 -2
  34. package/dist/{prisma-1J9WTyAF.js.map → prisma-CUij0pph.js.map} +1 -1
  35. package/dist/rbac/index.d.ts +1 -1
  36. package/dist/resource-caps/index.d.ts +1 -1
  37. package/dist/search/index.d.ts +2 -2
  38. package/dist/server/index.d.ts +2 -2
  39. package/dist/server/index.js +32 -5
  40. package/dist/server/index.js.map +1 -1
  41. package/dist/{stub-DZ332ZHG.js → stub-DNkzpQvR.js} +2 -2
  42. package/dist/{stub-DZ332ZHG.js.map → stub-DNkzpQvR.js.map} +1 -1
  43. package/dist/telemetry/index.d.ts +2 -2
  44. package/dist/tracker/index.d.ts +2 -2
  45. package/dist/tracker/index.js +2 -2
  46. package/dist/{tracker-DE4MDVTr.js → tracker-CDVYIoCb.js} +2 -2
  47. package/dist/{tracker-DE4MDVTr.js.map → tracker-CDVYIoCb.js.map} +1 -1
  48. package/dist/translation/index.d.ts +2 -2
  49. package/dist/types/index.d.ts +2 -2
  50. package/dist/types/index.js.map +1 -1
  51. package/dist/{types-oV9uAkMA.d.ts → types-IXZyPJCR.d.ts} +1 -1
  52. package/dist/usage/index.d.ts +1 -1
  53. package/dist/{workspace-extension-ByopOwtK.js → workspace-extension-BcMPoGWr.js} +16 -4
  54. package/dist/workspace-extension-BcMPoGWr.js.map +1 -0
  55. package/dist/{workspace-extension-DKxDI4H6.d.ts → workspace-extension-C0qib11C.d.ts} +2 -0
  56. package/package.json +1 -1
  57. package/dist/workspace-extension-ByopOwtK.js.map +0 -1
@@ -1,8 +1,7 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-ad2WFvuA.js";
2
2
  import { a as logger } from "../logger-B6rCpb7D.js";
3
- import { c as ACTOR_ORIGIN_HEADER, d as ASSISTANT_SESSION_ID_HEADER, f as parseAssistantSessionHeaders, l as AI_ASSISTANT_ACTOR_ORIGIN, m as toAssistantSessionAttribution, o as trackOperation, p as readAssistantSessionAttribution, u as ASSISTANT_CORRELATION_ID_HEADER } from "../stub-DZ332ZHG.js";
4
- import { w as withWorkspaceContext, x as setWorkspaceContext } from "../workspace-extension-ByopOwtK.js";
5
- import { ContextManager } from "../context/index.js";
3
+ import { c as ACTOR_ORIGIN_HEADER, d as ASSISTANT_SESSION_ID_HEADER, f as parseAssistantSessionHeaders, l as AI_ASSISTANT_ACTOR_ORIGIN, m as toAssistantSessionAttribution, o as trackOperation, p as readAssistantSessionAttribution, u as ASSISTANT_CORRELATION_ID_HEADER } from "../stub-DNkzpQvR.js";
4
+ import { w as withWorkspaceContext, x as setWorkspaceContext } from "../workspace-extension-BcMPoGWr.js";
6
5
  import { l as I18n } from "../i18n-BBMYFd0P.js";
7
6
  import { l as getMetricsRegistry } from "../metrics-collector-DXQrMUle.js";
8
7
  import { t as getWorkspaceQuotaRegistry } from "../metrics-CQaHT12m.js";
@@ -525,7 +524,6 @@ async function buildContext(request) {
525
524
  rawHeader: getHeader(request, "x-workspace-id") ?? "MISSING"
526
525
  });
527
526
  setWorkspaceContext(wsCtxPayload);
528
- ContextManager.setCfAccessContext(getHeader(request, "cf-access-client-id"), getHeader(request, "cf-access-client-secret"), getHeader(request, "x-cf-authorization"));
529
527
  return {
530
528
  request,
531
529
  actor,
@@ -561,16 +559,45 @@ function string(value) {
561
559
  function id(value) {
562
560
  return record(value) ? string(value["id"]) : void 0;
563
561
  }
562
+ function header(request, name) {
563
+ if (!record(request)) return void 0;
564
+ const headers = request["headers"];
565
+ if (!record(headers) || typeof headers["get"] !== "function") return void 0;
566
+ return string(headers.get(name));
567
+ }
568
+ /**
569
+ * The Cloudflare Access credentials the request itself presented, read from its own headers.
570
+ * The public gateway forwards them only for requests that transited Cloudflare. A lone
571
+ * service-token half is dropped, since it can never pass Access on its own.
572
+ */
573
+ function cfAccessFromRequest(request) {
574
+ const clientId = header(request, "cf-access-client-id");
575
+ const clientSecret = header(request, "cf-access-client-secret");
576
+ const authorization = header(request, "x-cf-authorization");
577
+ const pair = clientId && clientSecret ? {
578
+ clientId,
579
+ clientSecret
580
+ } : void 0;
581
+ if (!pair && !authorization) return void 0;
582
+ return {
583
+ ...pair,
584
+ ...authorization ? { authorization } : {}
585
+ };
586
+ }
564
587
  /**
565
588
  * The workspace context for a request, read from the verified server context
566
589
  * (`buildContext`'s result or a Yoga `contextValue`). Unknown shapes yield an
567
- * empty context: no workspace, so the extension's strict mode applies.
590
+ * empty context: no workspace, so the extension's strict mode applies. The
591
+ * Cloudflare Access credentials come from the context's own `request`, so the
592
+ * bound scope carries exactly the credentials that request presented.
568
593
  */
569
594
  function workspaceContextFromServerContext(value) {
570
595
  if (!record(value)) return {};
571
596
  const assistantSession = readAssistantSessionAttribution(value["assistantSession"]);
597
+ const cfAccess = cfAccessFromRequest(value["request"]);
572
598
  return {
573
599
  ...assistantSession ? { assistantSession } : {},
600
+ ...cfAccess ? { cfAccess } : {},
574
601
  workspaceId: id(value["workspace"]),
575
602
  tenantId: id(value["tenant"]),
576
603
  organizationId: id(value["organization"]),