@sequenceholdings/managed-functions 0.4.1 → 0.4.2

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 (87) hide show
  1. package/README.md +374 -2
  2. package/dist/abrigo-contract.d.ts +92 -0
  3. package/dist/abrigo-contract.js +55 -0
  4. package/dist/abrigo-response.d.ts +6 -0
  5. package/dist/abrigo-response.js +27 -0
  6. package/dist/abrigo.d.ts +14 -0
  7. package/dist/abrigo.js +150 -0
  8. package/dist/agent-evidence.d.ts +9 -0
  9. package/dist/agent-evidence.js +84 -0
  10. package/dist/agent-source-evidence-contract.d.ts +1197 -0
  11. package/dist/agent-source-evidence-contract.js +96 -0
  12. package/dist/agents-contract.d.ts +99 -0
  13. package/dist/agents-contract.js +69 -0
  14. package/dist/agents.d.ts +15 -0
  15. package/dist/agents.js +121 -0
  16. package/dist/capabilities.d.ts +150 -0
  17. package/dist/capabilities.js +58 -5
  18. package/dist/config.d.ts +17 -2
  19. package/dist/config.js +55 -1
  20. package/dist/deployed-policy.js +90 -2
  21. package/dist/directory-config.js +1 -1
  22. package/dist/directory-contract.d.ts +68 -0
  23. package/dist/directory-contract.js +57 -0
  24. package/dist/directory-manifest.d.ts +5 -0
  25. package/dist/directory-manifest.js +10 -0
  26. package/dist/http-tracing.js +3 -0
  27. package/dist/immutable-release-contract.d.ts +3 -0
  28. package/dist/immutable-release-contract.js +12 -0
  29. package/dist/index.d.ts +37 -1
  30. package/dist/index.js +72 -1
  31. package/dist/invocation-client.d.ts +8 -1
  32. package/dist/invocation-client.js +8 -3
  33. package/dist/invocation-contract.d.ts +36 -0
  34. package/dist/invocation-contract.js +48 -0
  35. package/dist/invocation.d.ts +8 -0
  36. package/dist/invocation.js +134 -0
  37. package/dist/lattice-capability.d.ts +5 -0
  38. package/dist/lattice-capability.js +16 -0
  39. package/dist/lattice-provenance-contract.d.ts +519 -0
  40. package/dist/lattice-provenance-contract.js +148 -0
  41. package/dist/lattice-provenance.d.ts +16 -0
  42. package/dist/lattice-provenance.js +167 -0
  43. package/dist/monitoring-annotations.d.ts +53 -0
  44. package/dist/monitoring-annotations.js +54 -0
  45. package/dist/monitoring-contract.d.ts +463 -0
  46. package/dist/monitoring-contract.js +89 -0
  47. package/dist/monitoring-events.d.ts +257 -0
  48. package/dist/monitoring-events.js +136 -0
  49. package/dist/monitoring.d.ts +14 -0
  50. package/dist/monitoring.js +78 -0
  51. package/dist/orm-contract.d.ts +1 -0
  52. package/dist/orm-contract.js +4 -0
  53. package/dist/orm.d.ts +19 -3
  54. package/dist/orm.js +93 -13
  55. package/dist/preflight-abrigo.d.ts +10 -0
  56. package/dist/preflight-abrigo.js +26 -0
  57. package/dist/preflight-agents.d.ts +10 -0
  58. package/dist/preflight-agents.js +51 -0
  59. package/dist/preflight-immutable-release.d.ts +10 -0
  60. package/dist/preflight-immutable-release.js +34 -0
  61. package/dist/preflight-invocation.d.ts +10 -0
  62. package/dist/preflight-invocation.js +40 -0
  63. package/dist/preflight-lattice.d.ts +10 -0
  64. package/dist/preflight-lattice.js +40 -0
  65. package/dist/preflight-monitoring.d.ts +10 -0
  66. package/dist/preflight-monitoring.js +46 -0
  67. package/dist/preflight-service-directory.d.ts +10 -0
  68. package/dist/preflight-service-directory.js +26 -0
  69. package/dist/preflight-workflows.d.ts +10 -0
  70. package/dist/preflight-workflows.js +38 -0
  71. package/dist/preflight.js +49 -5
  72. package/dist/processes-contract.d.ts +20 -0
  73. package/dist/processes-contract.js +8 -1
  74. package/dist/processes.d.ts +2 -1
  75. package/dist/processes.js +34 -0
  76. package/dist/runtime.cjs +3111 -214
  77. package/dist/sdk-range.d.ts +1 -0
  78. package/dist/sdk-range.js +25 -0
  79. package/dist/service-directory.d.ts +12 -0
  80. package/dist/service-directory.js +72 -0
  81. package/dist/workflow-scopes-contract.d.ts +8 -0
  82. package/dist/workflow-scopes-contract.js +29 -0
  83. package/dist/workflow-source-contract.d.ts +524 -0
  84. package/dist/workflow-source-contract.js +59 -0
  85. package/dist/workflow-source.d.ts +12 -0
  86. package/dist/workflow-source.js +93 -0
  87. package/package.json +2 -2
package/dist/runtime.cjs CHANGED
@@ -819,7 +819,7 @@ var require_util = __commonJS({
819
819
  var require_errors = __commonJS({
820
820
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.cjs"(exports2) {
821
821
  "use strict";
822
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
822
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
823
823
  if (k2 === void 0) k2 = k;
824
824
  var desc = Object.getOwnPropertyDescriptor(m2, k);
825
825
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -841,7 +841,7 @@ var require_errors = __commonJS({
841
841
  if (mod && mod.__esModule) return mod;
842
842
  var result = {};
843
843
  if (mod != null) {
844
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
844
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
845
845
  }
846
846
  __setModuleDefault(result, mod);
847
847
  return result;
@@ -999,7 +999,7 @@ var require_errors = __commonJS({
999
999
  var require_parse = __commonJS({
1000
1000
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.cjs"(exports2) {
1001
1001
  "use strict";
1002
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
1002
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
1003
1003
  if (k2 === void 0) k2 = k;
1004
1004
  var desc = Object.getOwnPropertyDescriptor(m2, k);
1005
1005
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -1021,7 +1021,7 @@ var require_parse = __commonJS({
1021
1021
  if (mod && mod.__esModule) return mod;
1022
1022
  var result = {};
1023
1023
  if (mod != null) {
1024
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1024
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
1025
1025
  }
1026
1026
  __setModuleDefault(result, mod);
1027
1027
  return result;
@@ -1136,7 +1136,7 @@ var require_parse = __commonJS({
1136
1136
  var require_regexes = __commonJS({
1137
1137
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.cjs"(exports2) {
1138
1138
  "use strict";
1139
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
1139
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
1140
1140
  if (k2 === void 0) k2 = k;
1141
1141
  var desc = Object.getOwnPropertyDescriptor(m2, k);
1142
1142
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -1158,7 +1158,7 @@ var require_regexes = __commonJS({
1158
1158
  if (mod && mod.__esModule) return mod;
1159
1159
  var result = {};
1160
1160
  if (mod != null) {
1161
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1161
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
1162
1162
  }
1163
1163
  __setModuleDefault(result, mod);
1164
1164
  return result;
@@ -1277,7 +1277,7 @@ var require_regexes = __commonJS({
1277
1277
  var require_checks = __commonJS({
1278
1278
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.cjs"(exports2) {
1279
1279
  "use strict";
1280
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
1280
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
1281
1281
  if (k2 === void 0) k2 = k;
1282
1282
  var desc = Object.getOwnPropertyDescriptor(m2, k);
1283
1283
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -1299,7 +1299,7 @@ var require_checks = __commonJS({
1299
1299
  if (mod && mod.__esModule) return mod;
1300
1300
  var result = {};
1301
1301
  if (mod != null) {
1302
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1302
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
1303
1303
  }
1304
1304
  __setModuleDefault(result, mod);
1305
1305
  return result;
@@ -1920,7 +1920,7 @@ var require_versions = __commonJS({
1920
1920
  var require_schemas = __commonJS({
1921
1921
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.cjs"(exports2) {
1922
1922
  "use strict";
1923
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
1923
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
1924
1924
  if (k2 === void 0) k2 = k;
1925
1925
  var desc = Object.getOwnPropertyDescriptor(m2, k);
1926
1926
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -1942,7 +1942,7 @@ var require_schemas = __commonJS({
1942
1942
  if (mod && mod.__esModule) return mod;
1943
1943
  var result = {};
1944
1944
  if (mod != null) {
1945
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1945
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
1946
1946
  }
1947
1947
  __setModuleDefault(result, mod);
1948
1948
  return result;
@@ -4062,7 +4062,7 @@ var require_schemas = __commonJS({
4062
4062
  var require_ar = __commonJS({
4063
4063
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ar.cjs"(exports2, module2) {
4064
4064
  "use strict";
4065
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4065
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4066
4066
  if (k2 === void 0) k2 = k;
4067
4067
  var desc = Object.getOwnPropertyDescriptor(m2, k);
4068
4068
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -4084,7 +4084,7 @@ var require_ar = __commonJS({
4084
4084
  if (mod && mod.__esModule) return mod;
4085
4085
  var result = {};
4086
4086
  if (mod != null) {
4087
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4087
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
4088
4088
  }
4089
4089
  __setModuleDefault(result, mod);
4090
4090
  return result;
@@ -4205,7 +4205,7 @@ var require_ar = __commonJS({
4205
4205
  var require_az = __commonJS({
4206
4206
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/az.cjs"(exports2, module2) {
4207
4207
  "use strict";
4208
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4208
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4209
4209
  if (k2 === void 0) k2 = k;
4210
4210
  var desc = Object.getOwnPropertyDescriptor(m2, k);
4211
4211
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -4227,7 +4227,7 @@ var require_az = __commonJS({
4227
4227
  if (mod && mod.__esModule) return mod;
4228
4228
  var result = {};
4229
4229
  if (mod != null) {
4230
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4230
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
4231
4231
  }
4232
4232
  __setModuleDefault(result, mod);
4233
4233
  return result;
@@ -4347,7 +4347,7 @@ var require_az = __commonJS({
4347
4347
  var require_be = __commonJS({
4348
4348
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/be.cjs"(exports2, module2) {
4349
4349
  "use strict";
4350
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4350
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4351
4351
  if (k2 === void 0) k2 = k;
4352
4352
  var desc = Object.getOwnPropertyDescriptor(m2, k);
4353
4353
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -4369,7 +4369,7 @@ var require_be = __commonJS({
4369
4369
  if (mod && mod.__esModule) return mod;
4370
4370
  var result = {};
4371
4371
  if (mod != null) {
4372
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4372
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
4373
4373
  }
4374
4374
  __setModuleDefault(result, mod);
4375
4375
  return result;
@@ -4540,7 +4540,7 @@ var require_be = __commonJS({
4540
4540
  var require_bg = __commonJS({
4541
4541
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/bg.cjs"(exports2, module2) {
4542
4542
  "use strict";
4543
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4543
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4544
4544
  if (k2 === void 0) k2 = k;
4545
4545
  var desc = Object.getOwnPropertyDescriptor(m2, k);
4546
4546
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -4562,7 +4562,7 @@ var require_bg = __commonJS({
4562
4562
  if (mod && mod.__esModule) return mod;
4563
4563
  var result = {};
4564
4564
  if (mod != null) {
4565
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4565
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
4566
4566
  }
4567
4567
  __setModuleDefault(result, mod);
4568
4568
  return result;
@@ -4697,7 +4697,7 @@ var require_bg = __commonJS({
4697
4697
  var require_ca = __commonJS({
4698
4698
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ca.cjs"(exports2, module2) {
4699
4699
  "use strict";
4700
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4700
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4701
4701
  if (k2 === void 0) k2 = k;
4702
4702
  var desc = Object.getOwnPropertyDescriptor(m2, k);
4703
4703
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -4719,7 +4719,7 @@ var require_ca = __commonJS({
4719
4719
  if (mod && mod.__esModule) return mod;
4720
4720
  var result = {};
4721
4721
  if (mod != null) {
4722
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4722
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
4723
4723
  }
4724
4724
  __setModuleDefault(result, mod);
4725
4725
  return result;
@@ -4842,7 +4842,7 @@ var require_ca = __commonJS({
4842
4842
  var require_cs = __commonJS({
4843
4843
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/cs.cjs"(exports2, module2) {
4844
4844
  "use strict";
4845
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4845
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4846
4846
  if (k2 === void 0) k2 = k;
4847
4847
  var desc = Object.getOwnPropertyDescriptor(m2, k);
4848
4848
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -4864,7 +4864,7 @@ var require_cs = __commonJS({
4864
4864
  if (mod && mod.__esModule) return mod;
4865
4865
  var result = {};
4866
4866
  if (mod != null) {
4867
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4867
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
4868
4868
  }
4869
4869
  __setModuleDefault(result, mod);
4870
4870
  return result;
@@ -4990,7 +4990,7 @@ var require_cs = __commonJS({
4990
4990
  var require_da = __commonJS({
4991
4991
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/da.cjs"(exports2, module2) {
4992
4992
  "use strict";
4993
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4993
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
4994
4994
  if (k2 === void 0) k2 = k;
4995
4995
  var desc = Object.getOwnPropertyDescriptor(m2, k);
4996
4996
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -5012,7 +5012,7 @@ var require_da = __commonJS({
5012
5012
  if (mod && mod.__esModule) return mod;
5013
5013
  var result = {};
5014
5014
  if (mod != null) {
5015
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5015
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
5016
5016
  }
5017
5017
  __setModuleDefault(result, mod);
5018
5018
  return result;
@@ -5142,7 +5142,7 @@ var require_da = __commonJS({
5142
5142
  var require_de = __commonJS({
5143
5143
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/de.cjs"(exports2, module2) {
5144
5144
  "use strict";
5145
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5145
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5146
5146
  if (k2 === void 0) k2 = k;
5147
5147
  var desc = Object.getOwnPropertyDescriptor(m2, k);
5148
5148
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -5164,7 +5164,7 @@ var require_de = __commonJS({
5164
5164
  if (mod && mod.__esModule) return mod;
5165
5165
  var result = {};
5166
5166
  if (mod != null) {
5167
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5167
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
5168
5168
  }
5169
5169
  __setModuleDefault(result, mod);
5170
5170
  return result;
@@ -5287,7 +5287,7 @@ var require_de = __commonJS({
5287
5287
  var require_el = __commonJS({
5288
5288
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/el.cjs"(exports2, module2) {
5289
5289
  "use strict";
5290
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5290
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5291
5291
  if (k2 === void 0) k2 = k;
5292
5292
  var desc = Object.getOwnPropertyDescriptor(m2, k);
5293
5293
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -5309,7 +5309,7 @@ var require_el = __commonJS({
5309
5309
  if (mod && mod.__esModule) return mod;
5310
5310
  var result = {};
5311
5311
  if (mod != null) {
5312
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5312
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
5313
5313
  }
5314
5314
  __setModuleDefault(result, mod);
5315
5315
  return result;
@@ -5433,7 +5433,7 @@ var require_el = __commonJS({
5433
5433
  var require_en = __commonJS({
5434
5434
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/en.cjs"(exports2, module2) {
5435
5435
  "use strict";
5436
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5436
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5437
5437
  if (k2 === void 0) k2 = k;
5438
5438
  var desc = Object.getOwnPropertyDescriptor(m2, k);
5439
5439
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -5455,7 +5455,7 @@ var require_en = __commonJS({
5455
5455
  if (mod && mod.__esModule) return mod;
5456
5456
  var result = {};
5457
5457
  if (mod != null) {
5458
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5458
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
5459
5459
  }
5460
5460
  __setModuleDefault(result, mod);
5461
5461
  return result;
@@ -5582,7 +5582,7 @@ var require_en = __commonJS({
5582
5582
  var require_eo = __commonJS({
5583
5583
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/eo.cjs"(exports2, module2) {
5584
5584
  "use strict";
5585
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5585
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5586
5586
  if (k2 === void 0) k2 = k;
5587
5587
  var desc = Object.getOwnPropertyDescriptor(m2, k);
5588
5588
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -5604,7 +5604,7 @@ var require_eo = __commonJS({
5604
5604
  if (mod && mod.__esModule) return mod;
5605
5605
  var result = {};
5606
5606
  if (mod != null) {
5607
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5607
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
5608
5608
  }
5609
5609
  __setModuleDefault(result, mod);
5610
5610
  return result;
@@ -5728,7 +5728,7 @@ var require_eo = __commonJS({
5728
5728
  var require_es = __commonJS({
5729
5729
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/es.cjs"(exports2, module2) {
5730
5730
  "use strict";
5731
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5731
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5732
5732
  if (k2 === void 0) k2 = k;
5733
5733
  var desc = Object.getOwnPropertyDescriptor(m2, k);
5734
5734
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -5750,7 +5750,7 @@ var require_es = __commonJS({
5750
5750
  if (mod && mod.__esModule) return mod;
5751
5751
  var result = {};
5752
5752
  if (mod != null) {
5753
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5753
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
5754
5754
  }
5755
5755
  __setModuleDefault(result, mod);
5756
5756
  return result;
@@ -5897,7 +5897,7 @@ var require_es = __commonJS({
5897
5897
  var require_fa = __commonJS({
5898
5898
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fa.cjs"(exports2, module2) {
5899
5899
  "use strict";
5900
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5900
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5901
5901
  if (k2 === void 0) k2 = k;
5902
5902
  var desc = Object.getOwnPropertyDescriptor(m2, k);
5903
5903
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -5919,7 +5919,7 @@ var require_fa = __commonJS({
5919
5919
  if (mod && mod.__esModule) return mod;
5920
5920
  var result = {};
5921
5921
  if (mod != null) {
5922
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5922
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
5923
5923
  }
5924
5924
  __setModuleDefault(result, mod);
5925
5925
  return result;
@@ -6048,7 +6048,7 @@ var require_fa = __commonJS({
6048
6048
  var require_fi = __commonJS({
6049
6049
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fi.cjs"(exports2, module2) {
6050
6050
  "use strict";
6051
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
6051
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
6052
6052
  if (k2 === void 0) k2 = k;
6053
6053
  var desc = Object.getOwnPropertyDescriptor(m2, k);
6054
6054
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -6070,7 +6070,7 @@ var require_fi = __commonJS({
6070
6070
  if (mod && mod.__esModule) return mod;
6071
6071
  var result = {};
6072
6072
  if (mod != null) {
6073
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6073
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
6074
6074
  }
6075
6075
  __setModuleDefault(result, mod);
6076
6076
  return result;
@@ -6197,7 +6197,7 @@ var require_fi = __commonJS({
6197
6197
  var require_fr = __commonJS({
6198
6198
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr.cjs"(exports2, module2) {
6199
6199
  "use strict";
6200
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
6200
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
6201
6201
  if (k2 === void 0) k2 = k;
6202
6202
  var desc = Object.getOwnPropertyDescriptor(m2, k);
6203
6203
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -6219,7 +6219,7 @@ var require_fr = __commonJS({
6219
6219
  if (mod && mod.__esModule) return mod;
6220
6220
  var result = {};
6221
6221
  if (mod != null) {
6222
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6222
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
6223
6223
  }
6224
6224
  __setModuleDefault(result, mod);
6225
6225
  return result;
@@ -6359,7 +6359,7 @@ var require_fr = __commonJS({
6359
6359
  var require_fr_CA = __commonJS({
6360
6360
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr-CA.cjs"(exports2, module2) {
6361
6361
  "use strict";
6362
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
6362
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
6363
6363
  if (k2 === void 0) k2 = k;
6364
6364
  var desc = Object.getOwnPropertyDescriptor(m2, k);
6365
6365
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -6381,7 +6381,7 @@ var require_fr_CA = __commonJS({
6381
6381
  if (mod && mod.__esModule) return mod;
6382
6382
  var result = {};
6383
6383
  if (mod != null) {
6384
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6384
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
6385
6385
  }
6386
6386
  __setModuleDefault(result, mod);
6387
6387
  return result;
@@ -6503,7 +6503,7 @@ var require_fr_CA = __commonJS({
6503
6503
  var require_he = __commonJS({
6504
6504
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/he.cjs"(exports2, module2) {
6505
6505
  "use strict";
6506
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
6506
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
6507
6507
  if (k2 === void 0) k2 = k;
6508
6508
  var desc = Object.getOwnPropertyDescriptor(m2, k);
6509
6509
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -6525,7 +6525,7 @@ var require_he = __commonJS({
6525
6525
  if (mod && mod.__esModule) return mod;
6526
6526
  var result = {};
6527
6527
  if (mod != null) {
6528
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6528
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
6529
6529
  }
6530
6530
  __setModuleDefault(result, mod);
6531
6531
  return result;
@@ -6734,7 +6734,7 @@ var require_he = __commonJS({
6734
6734
  var require_hr = __commonJS({
6735
6735
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hr.cjs"(exports2, module2) {
6736
6736
  "use strict";
6737
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
6737
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
6738
6738
  if (k2 === void 0) k2 = k;
6739
6739
  var desc = Object.getOwnPropertyDescriptor(m2, k);
6740
6740
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -6756,7 +6756,7 @@ var require_hr = __commonJS({
6756
6756
  if (mod && mod.__esModule) return mod;
6757
6757
  var result = {};
6758
6758
  if (mod != null) {
6759
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6759
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
6760
6760
  }
6761
6761
  __setModuleDefault(result, mod);
6762
6762
  return result;
@@ -6893,7 +6893,7 @@ var require_hr = __commonJS({
6893
6893
  var require_hu = __commonJS({
6894
6894
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hu.cjs"(exports2, module2) {
6895
6895
  "use strict";
6896
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
6896
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
6897
6897
  if (k2 === void 0) k2 = k;
6898
6898
  var desc = Object.getOwnPropertyDescriptor(m2, k);
6899
6899
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -6915,7 +6915,7 @@ var require_hu = __commonJS({
6915
6915
  if (mod && mod.__esModule) return mod;
6916
6916
  var result = {};
6917
6917
  if (mod != null) {
6918
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6918
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
6919
6919
  }
6920
6920
  __setModuleDefault(result, mod);
6921
6921
  return result;
@@ -7038,7 +7038,7 @@ var require_hu = __commonJS({
7038
7038
  var require_hy = __commonJS({
7039
7039
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hy.cjs"(exports2, module2) {
7040
7040
  "use strict";
7041
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7041
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7042
7042
  if (k2 === void 0) k2 = k;
7043
7043
  var desc = Object.getOwnPropertyDescriptor(m2, k);
7044
7044
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -7060,7 +7060,7 @@ var require_hy = __commonJS({
7060
7060
  if (mod && mod.__esModule) return mod;
7061
7061
  var result = {};
7062
7062
  if (mod != null) {
7063
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7063
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
7064
7064
  }
7065
7065
  __setModuleDefault(result, mod);
7066
7066
  return result;
@@ -7222,7 +7222,7 @@ var require_hy = __commonJS({
7222
7222
  var require_id = __commonJS({
7223
7223
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/id.cjs"(exports2, module2) {
7224
7224
  "use strict";
7225
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7225
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7226
7226
  if (k2 === void 0) k2 = k;
7227
7227
  var desc = Object.getOwnPropertyDescriptor(m2, k);
7228
7228
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -7244,7 +7244,7 @@ var require_id = __commonJS({
7244
7244
  if (mod && mod.__esModule) return mod;
7245
7245
  var result = {};
7246
7246
  if (mod != null) {
7247
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7247
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
7248
7248
  }
7249
7249
  __setModuleDefault(result, mod);
7250
7250
  return result;
@@ -7365,7 +7365,7 @@ var require_id = __commonJS({
7365
7365
  var require_is = __commonJS({
7366
7366
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/is.cjs"(exports2, module2) {
7367
7367
  "use strict";
7368
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7368
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7369
7369
  if (k2 === void 0) k2 = k;
7370
7370
  var desc = Object.getOwnPropertyDescriptor(m2, k);
7371
7371
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -7387,7 +7387,7 @@ var require_is = __commonJS({
7387
7387
  if (mod && mod.__esModule) return mod;
7388
7388
  var result = {};
7389
7389
  if (mod != null) {
7390
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7390
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
7391
7391
  }
7392
7392
  __setModuleDefault(result, mod);
7393
7393
  return result;
@@ -7511,7 +7511,7 @@ var require_is = __commonJS({
7511
7511
  var require_it = __commonJS({
7512
7512
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/it.cjs"(exports2, module2) {
7513
7513
  "use strict";
7514
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7514
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7515
7515
  if (k2 === void 0) k2 = k;
7516
7516
  var desc = Object.getOwnPropertyDescriptor(m2, k);
7517
7517
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -7533,7 +7533,7 @@ var require_it = __commonJS({
7533
7533
  if (mod && mod.__esModule) return mod;
7534
7534
  var result = {};
7535
7535
  if (mod != null) {
7536
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7536
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
7537
7537
  }
7538
7538
  __setModuleDefault(result, mod);
7539
7539
  return result;
@@ -7656,7 +7656,7 @@ var require_it = __commonJS({
7656
7656
  var require_ja = __commonJS({
7657
7657
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ja.cjs"(exports2, module2) {
7658
7658
  "use strict";
7659
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7659
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7660
7660
  if (k2 === void 0) k2 = k;
7661
7661
  var desc = Object.getOwnPropertyDescriptor(m2, k);
7662
7662
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -7678,7 +7678,7 @@ var require_ja = __commonJS({
7678
7678
  if (mod && mod.__esModule) return mod;
7679
7679
  var result = {};
7680
7680
  if (mod != null) {
7681
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7681
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
7682
7682
  }
7683
7683
  __setModuleDefault(result, mod);
7684
7684
  return result;
@@ -7800,7 +7800,7 @@ var require_ja = __commonJS({
7800
7800
  var require_ka = __commonJS({
7801
7801
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ka.cjs"(exports2, module2) {
7802
7802
  "use strict";
7803
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7803
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7804
7804
  if (k2 === void 0) k2 = k;
7805
7805
  var desc = Object.getOwnPropertyDescriptor(m2, k);
7806
7806
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -7822,7 +7822,7 @@ var require_ka = __commonJS({
7822
7822
  if (mod && mod.__esModule) return mod;
7823
7823
  var result = {};
7824
7824
  if (mod != null) {
7825
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7825
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
7826
7826
  }
7827
7827
  __setModuleDefault(result, mod);
7828
7828
  return result;
@@ -7949,7 +7949,7 @@ var require_ka = __commonJS({
7949
7949
  var require_km = __commonJS({
7950
7950
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/km.cjs"(exports2, module2) {
7951
7951
  "use strict";
7952
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7952
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
7953
7953
  if (k2 === void 0) k2 = k;
7954
7954
  var desc = Object.getOwnPropertyDescriptor(m2, k);
7955
7955
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -7971,7 +7971,7 @@ var require_km = __commonJS({
7971
7971
  if (mod && mod.__esModule) return mod;
7972
7972
  var result = {};
7973
7973
  if (mod != null) {
7974
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7974
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
7975
7975
  }
7976
7976
  __setModuleDefault(result, mod);
7977
7977
  return result;
@@ -8113,7 +8113,7 @@ var require_kh = __commonJS({
8113
8113
  var require_ko = __commonJS({
8114
8114
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ko.cjs"(exports2, module2) {
8115
8115
  "use strict";
8116
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
8116
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
8117
8117
  if (k2 === void 0) k2 = k;
8118
8118
  var desc = Object.getOwnPropertyDescriptor(m2, k);
8119
8119
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -8135,7 +8135,7 @@ var require_ko = __commonJS({
8135
8135
  if (mod && mod.__esModule) return mod;
8136
8136
  var result = {};
8137
8137
  if (mod != null) {
8138
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
8138
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
8139
8139
  }
8140
8140
  __setModuleDefault(result, mod);
8141
8141
  return result;
@@ -8261,7 +8261,7 @@ var require_ko = __commonJS({
8261
8261
  var require_lt = __commonJS({
8262
8262
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/lt.cjs"(exports2, module2) {
8263
8263
  "use strict";
8264
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
8264
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
8265
8265
  if (k2 === void 0) k2 = k;
8266
8266
  var desc = Object.getOwnPropertyDescriptor(m2, k);
8267
8267
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -8283,7 +8283,7 @@ var require_lt = __commonJS({
8283
8283
  if (mod && mod.__esModule) return mod;
8284
8284
  var result = {};
8285
8285
  if (mod != null) {
8286
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
8286
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
8287
8287
  }
8288
8288
  __setModuleDefault(result, mod);
8289
8289
  return result;
@@ -8501,7 +8501,7 @@ var require_lt = __commonJS({
8501
8501
  var require_mk = __commonJS({
8502
8502
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/mk.cjs"(exports2, module2) {
8503
8503
  "use strict";
8504
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
8504
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
8505
8505
  if (k2 === void 0) k2 = k;
8506
8506
  var desc = Object.getOwnPropertyDescriptor(m2, k);
8507
8507
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -8523,7 +8523,7 @@ var require_mk = __commonJS({
8523
8523
  if (mod && mod.__esModule) return mod;
8524
8524
  var result = {};
8525
8525
  if (mod != null) {
8526
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
8526
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
8527
8527
  }
8528
8528
  __setModuleDefault(result, mod);
8529
8529
  return result;
@@ -8647,7 +8647,7 @@ var require_mk = __commonJS({
8647
8647
  var require_ms = __commonJS({
8648
8648
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ms.cjs"(exports2, module2) {
8649
8649
  "use strict";
8650
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
8650
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
8651
8651
  if (k2 === void 0) k2 = k;
8652
8652
  var desc = Object.getOwnPropertyDescriptor(m2, k);
8653
8653
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -8669,7 +8669,7 @@ var require_ms = __commonJS({
8669
8669
  if (mod && mod.__esModule) return mod;
8670
8670
  var result = {};
8671
8671
  if (mod != null) {
8672
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
8672
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
8673
8673
  }
8674
8674
  __setModuleDefault(result, mod);
8675
8675
  return result;
@@ -8791,7 +8791,7 @@ var require_ms = __commonJS({
8791
8791
  var require_nl = __commonJS({
8792
8792
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/nl.cjs"(exports2, module2) {
8793
8793
  "use strict";
8794
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
8794
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
8795
8795
  if (k2 === void 0) k2 = k;
8796
8796
  var desc = Object.getOwnPropertyDescriptor(m2, k);
8797
8797
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -8813,7 +8813,7 @@ var require_nl = __commonJS({
8813
8813
  if (mod && mod.__esModule) return mod;
8814
8814
  var result = {};
8815
8815
  if (mod != null) {
8816
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
8816
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
8817
8817
  }
8818
8818
  __setModuleDefault(result, mod);
8819
8819
  return result;
@@ -8938,7 +8938,7 @@ var require_nl = __commonJS({
8938
8938
  var require_no = __commonJS({
8939
8939
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/no.cjs"(exports2, module2) {
8940
8940
  "use strict";
8941
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
8941
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
8942
8942
  if (k2 === void 0) k2 = k;
8943
8943
  var desc = Object.getOwnPropertyDescriptor(m2, k);
8944
8944
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -8960,7 +8960,7 @@ var require_no = __commonJS({
8960
8960
  if (mod && mod.__esModule) return mod;
8961
8961
  var result = {};
8962
8962
  if (mod != null) {
8963
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
8963
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
8964
8964
  }
8965
8965
  __setModuleDefault(result, mod);
8966
8966
  return result;
@@ -9083,7 +9083,7 @@ var require_no = __commonJS({
9083
9083
  var require_ota = __commonJS({
9084
9084
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ota.cjs"(exports2, module2) {
9085
9085
  "use strict";
9086
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
9086
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
9087
9087
  if (k2 === void 0) k2 = k;
9088
9088
  var desc = Object.getOwnPropertyDescriptor(m2, k);
9089
9089
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -9105,7 +9105,7 @@ var require_ota = __commonJS({
9105
9105
  if (mod && mod.__esModule) return mod;
9106
9106
  var result = {};
9107
9107
  if (mod != null) {
9108
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
9108
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
9109
9109
  }
9110
9110
  __setModuleDefault(result, mod);
9111
9111
  return result;
@@ -9229,7 +9229,7 @@ var require_ota = __commonJS({
9229
9229
  var require_ps = __commonJS({
9230
9230
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ps.cjs"(exports2, module2) {
9231
9231
  "use strict";
9232
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
9232
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
9233
9233
  if (k2 === void 0) k2 = k;
9234
9234
  var desc = Object.getOwnPropertyDescriptor(m2, k);
9235
9235
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -9251,7 +9251,7 @@ var require_ps = __commonJS({
9251
9251
  if (mod && mod.__esModule) return mod;
9252
9252
  var result = {};
9253
9253
  if (mod != null) {
9254
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
9254
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
9255
9255
  }
9256
9256
  __setModuleDefault(result, mod);
9257
9257
  return result;
@@ -9380,7 +9380,7 @@ var require_ps = __commonJS({
9380
9380
  var require_pl = __commonJS({
9381
9381
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pl.cjs"(exports2, module2) {
9382
9382
  "use strict";
9383
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
9383
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
9384
9384
  if (k2 === void 0) k2 = k;
9385
9385
  var desc = Object.getOwnPropertyDescriptor(m2, k);
9386
9386
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -9402,7 +9402,7 @@ var require_pl = __commonJS({
9402
9402
  if (mod && mod.__esModule) return mod;
9403
9403
  var result = {};
9404
9404
  if (mod != null) {
9405
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
9405
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
9406
9406
  }
9407
9407
  __setModuleDefault(result, mod);
9408
9408
  return result;
@@ -9526,7 +9526,7 @@ var require_pl = __commonJS({
9526
9526
  var require_pt = __commonJS({
9527
9527
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pt.cjs"(exports2, module2) {
9528
9528
  "use strict";
9529
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
9529
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
9530
9530
  if (k2 === void 0) k2 = k;
9531
9531
  var desc = Object.getOwnPropertyDescriptor(m2, k);
9532
9532
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -9548,7 +9548,7 @@ var require_pt = __commonJS({
9548
9548
  if (mod && mod.__esModule) return mod;
9549
9549
  var result = {};
9550
9550
  if (mod != null) {
9551
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
9551
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
9552
9552
  }
9553
9553
  __setModuleDefault(result, mod);
9554
9554
  return result;
@@ -9671,7 +9671,7 @@ var require_pt = __commonJS({
9671
9671
  var require_ro = __commonJS({
9672
9672
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ro.cjs"(exports2, module2) {
9673
9673
  "use strict";
9674
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
9674
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
9675
9675
  if (k2 === void 0) k2 = k;
9676
9676
  var desc = Object.getOwnPropertyDescriptor(m2, k);
9677
9677
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -9693,7 +9693,7 @@ var require_ro = __commonJS({
9693
9693
  if (mod && mod.__esModule) return mod;
9694
9694
  var result = {};
9695
9695
  if (mod != null) {
9696
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
9696
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
9697
9697
  }
9698
9698
  __setModuleDefault(result, mod);
9699
9699
  return result;
@@ -9827,7 +9827,7 @@ var require_ro = __commonJS({
9827
9827
  var require_ru = __commonJS({
9828
9828
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ru.cjs"(exports2, module2) {
9829
9829
  "use strict";
9830
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
9830
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
9831
9831
  if (k2 === void 0) k2 = k;
9832
9832
  var desc = Object.getOwnPropertyDescriptor(m2, k);
9833
9833
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -9849,7 +9849,7 @@ var require_ru = __commonJS({
9849
9849
  if (mod && mod.__esModule) return mod;
9850
9850
  var result = {};
9851
9851
  if (mod != null) {
9852
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
9852
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
9853
9853
  }
9854
9854
  __setModuleDefault(result, mod);
9855
9855
  return result;
@@ -10020,7 +10020,7 @@ var require_ru = __commonJS({
10020
10020
  var require_sl = __commonJS({
10021
10021
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sl.cjs"(exports2, module2) {
10022
10022
  "use strict";
10023
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10023
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10024
10024
  if (k2 === void 0) k2 = k;
10025
10025
  var desc = Object.getOwnPropertyDescriptor(m2, k);
10026
10026
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -10042,7 +10042,7 @@ var require_sl = __commonJS({
10042
10042
  if (mod && mod.__esModule) return mod;
10043
10043
  var result = {};
10044
10044
  if (mod != null) {
10045
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
10045
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
10046
10046
  }
10047
10047
  __setModuleDefault(result, mod);
10048
10048
  return result;
@@ -10166,7 +10166,7 @@ var require_sl = __commonJS({
10166
10166
  var require_sv = __commonJS({
10167
10167
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sv.cjs"(exports2, module2) {
10168
10168
  "use strict";
10169
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10169
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10170
10170
  if (k2 === void 0) k2 = k;
10171
10171
  var desc = Object.getOwnPropertyDescriptor(m2, k);
10172
10172
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -10188,7 +10188,7 @@ var require_sv = __commonJS({
10188
10188
  if (mod && mod.__esModule) return mod;
10189
10189
  var result = {};
10190
10190
  if (mod != null) {
10191
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
10191
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
10192
10192
  }
10193
10193
  __setModuleDefault(result, mod);
10194
10194
  return result;
@@ -10313,7 +10313,7 @@ var require_sv = __commonJS({
10313
10313
  var require_ta = __commonJS({
10314
10314
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ta.cjs"(exports2, module2) {
10315
10315
  "use strict";
10316
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10316
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10317
10317
  if (k2 === void 0) k2 = k;
10318
10318
  var desc = Object.getOwnPropertyDescriptor(m2, k);
10319
10319
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -10335,7 +10335,7 @@ var require_ta = __commonJS({
10335
10335
  if (mod && mod.__esModule) return mod;
10336
10336
  var result = {};
10337
10337
  if (mod != null) {
10338
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
10338
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
10339
10339
  }
10340
10340
  __setModuleDefault(result, mod);
10341
10341
  return result;
@@ -10460,7 +10460,7 @@ var require_ta = __commonJS({
10460
10460
  var require_th = __commonJS({
10461
10461
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/th.cjs"(exports2, module2) {
10462
10462
  "use strict";
10463
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10463
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10464
10464
  if (k2 === void 0) k2 = k;
10465
10465
  var desc = Object.getOwnPropertyDescriptor(m2, k);
10466
10466
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -10482,7 +10482,7 @@ var require_th = __commonJS({
10482
10482
  if (mod && mod.__esModule) return mod;
10483
10483
  var result = {};
10484
10484
  if (mod != null) {
10485
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
10485
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
10486
10486
  }
10487
10487
  __setModuleDefault(result, mod);
10488
10488
  return result;
@@ -10607,7 +10607,7 @@ var require_th = __commonJS({
10607
10607
  var require_tr = __commonJS({
10608
10608
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/tr.cjs"(exports2, module2) {
10609
10609
  "use strict";
10610
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10610
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10611
10611
  if (k2 === void 0) k2 = k;
10612
10612
  var desc = Object.getOwnPropertyDescriptor(m2, k);
10613
10613
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -10629,7 +10629,7 @@ var require_tr = __commonJS({
10629
10629
  if (mod && mod.__esModule) return mod;
10630
10630
  var result = {};
10631
10631
  if (mod != null) {
10632
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
10632
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
10633
10633
  }
10634
10634
  __setModuleDefault(result, mod);
10635
10635
  return result;
@@ -10749,7 +10749,7 @@ var require_tr = __commonJS({
10749
10749
  var require_uk = __commonJS({
10750
10750
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uk.cjs"(exports2, module2) {
10751
10751
  "use strict";
10752
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10752
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10753
10753
  if (k2 === void 0) k2 = k;
10754
10754
  var desc = Object.getOwnPropertyDescriptor(m2, k);
10755
10755
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -10771,7 +10771,7 @@ var require_uk = __commonJS({
10771
10771
  if (mod && mod.__esModule) return mod;
10772
10772
  var result = {};
10773
10773
  if (mod != null) {
10774
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
10774
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
10775
10775
  }
10776
10776
  __setModuleDefault(result, mod);
10777
10777
  return result;
@@ -10911,7 +10911,7 @@ var require_ua = __commonJS({
10911
10911
  var require_ur = __commonJS({
10912
10912
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ur.cjs"(exports2, module2) {
10913
10913
  "use strict";
10914
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10914
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
10915
10915
  if (k2 === void 0) k2 = k;
10916
10916
  var desc = Object.getOwnPropertyDescriptor(m2, k);
10917
10917
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -10933,7 +10933,7 @@ var require_ur = __commonJS({
10933
10933
  if (mod && mod.__esModule) return mod;
10934
10934
  var result = {};
10935
10935
  if (mod != null) {
10936
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
10936
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
10937
10937
  }
10938
10938
  __setModuleDefault(result, mod);
10939
10939
  return result;
@@ -11058,7 +11058,7 @@ var require_ur = __commonJS({
11058
11058
  var require_uz = __commonJS({
11059
11059
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uz.cjs"(exports2, module2) {
11060
11060
  "use strict";
11061
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
11061
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
11062
11062
  if (k2 === void 0) k2 = k;
11063
11063
  var desc = Object.getOwnPropertyDescriptor(m2, k);
11064
11064
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -11080,7 +11080,7 @@ var require_uz = __commonJS({
11080
11080
  if (mod && mod.__esModule) return mod;
11081
11081
  var result = {};
11082
11082
  if (mod != null) {
11083
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
11083
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
11084
11084
  }
11085
11085
  __setModuleDefault(result, mod);
11086
11086
  return result;
@@ -11205,7 +11205,7 @@ var require_uz = __commonJS({
11205
11205
  var require_vi = __commonJS({
11206
11206
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/vi.cjs"(exports2, module2) {
11207
11207
  "use strict";
11208
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
11208
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
11209
11209
  if (k2 === void 0) k2 = k;
11210
11210
  var desc = Object.getOwnPropertyDescriptor(m2, k);
11211
11211
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -11227,7 +11227,7 @@ var require_vi = __commonJS({
11227
11227
  if (mod && mod.__esModule) return mod;
11228
11228
  var result = {};
11229
11229
  if (mod != null) {
11230
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
11230
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
11231
11231
  }
11232
11232
  __setModuleDefault(result, mod);
11233
11233
  return result;
@@ -11350,7 +11350,7 @@ var require_vi = __commonJS({
11350
11350
  var require_zh_CN = __commonJS({
11351
11351
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-CN.cjs"(exports2, module2) {
11352
11352
  "use strict";
11353
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
11353
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
11354
11354
  if (k2 === void 0) k2 = k;
11355
11355
  var desc = Object.getOwnPropertyDescriptor(m2, k);
11356
11356
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -11372,7 +11372,7 @@ var require_zh_CN = __commonJS({
11372
11372
  if (mod && mod.__esModule) return mod;
11373
11373
  var result = {};
11374
11374
  if (mod != null) {
11375
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
11375
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
11376
11376
  }
11377
11377
  __setModuleDefault(result, mod);
11378
11378
  return result;
@@ -11496,7 +11496,7 @@ var require_zh_CN = __commonJS({
11496
11496
  var require_zh_TW = __commonJS({
11497
11497
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-TW.cjs"(exports2, module2) {
11498
11498
  "use strict";
11499
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
11499
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
11500
11500
  if (k2 === void 0) k2 = k;
11501
11501
  var desc = Object.getOwnPropertyDescriptor(m2, k);
11502
11502
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -11518,7 +11518,7 @@ var require_zh_TW = __commonJS({
11518
11518
  if (mod && mod.__esModule) return mod;
11519
11519
  var result = {};
11520
11520
  if (mod != null) {
11521
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
11521
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
11522
11522
  }
11523
11523
  __setModuleDefault(result, mod);
11524
11524
  return result;
@@ -11640,7 +11640,7 @@ var require_zh_TW = __commonJS({
11640
11640
  var require_yo = __commonJS({
11641
11641
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/yo.cjs"(exports2, module2) {
11642
11642
  "use strict";
11643
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
11643
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
11644
11644
  if (k2 === void 0) k2 = k;
11645
11645
  var desc = Object.getOwnPropertyDescriptor(m2, k);
11646
11646
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -11662,7 +11662,7 @@ var require_yo = __commonJS({
11662
11662
  if (mod && mod.__esModule) return mod;
11663
11663
  var result = {};
11664
11664
  if (mod != null) {
11665
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
11665
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
11666
11666
  }
11667
11667
  __setModuleDefault(result, mod);
11668
11668
  return result;
@@ -12064,7 +12064,7 @@ var require_registries = __commonJS({
12064
12064
  var require_api = __commonJS({
12065
12065
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.cjs"(exports2) {
12066
12066
  "use strict";
12067
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
12067
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
12068
12068
  if (k2 === void 0) k2 = k;
12069
12069
  var desc = Object.getOwnPropertyDescriptor(m2, k);
12070
12070
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -12086,7 +12086,7 @@ var require_api = __commonJS({
12086
12086
  if (mod && mod.__esModule) return mod;
12087
12087
  var result = {};
12088
12088
  if (mod != null) {
12089
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
12089
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
12090
12090
  }
12091
12091
  __setModuleDefault(result, mod);
12092
12092
  return result;
@@ -14320,7 +14320,7 @@ var require_json_schema = __commonJS({
14320
14320
  var require_core2 = __commonJS({
14321
14321
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/index.cjs"(exports2) {
14322
14322
  "use strict";
14323
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
14323
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
14324
14324
  if (k2 === void 0) k2 = k;
14325
14325
  var desc = Object.getOwnPropertyDescriptor(m2, k);
14326
14326
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -14338,33 +14338,33 @@ var require_core2 = __commonJS({
14338
14338
  }) : function(o, v) {
14339
14339
  o["default"] = v;
14340
14340
  });
14341
- var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
14342
- for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
14341
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
14342
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
14343
14343
  };
14344
14344
  var __importStar = exports2 && exports2.__importStar || function(mod) {
14345
14345
  if (mod && mod.__esModule) return mod;
14346
14346
  var result = {};
14347
14347
  if (mod != null) {
14348
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
14348
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
14349
14349
  }
14350
14350
  __setModuleDefault(result, mod);
14351
14351
  return result;
14352
14352
  };
14353
14353
  Object.defineProperty(exports2, "__esModule", { value: true });
14354
14354
  exports2.JSONSchema = exports2.JSONSchemaGenerator = exports2.toJSONSchema = exports2.locales = exports2.regexes = exports2.util = void 0;
14355
- __exportStar(require_core(), exports2);
14356
- __exportStar(require_parse(), exports2);
14357
- __exportStar(require_errors(), exports2);
14358
- __exportStar(require_schemas(), exports2);
14359
- __exportStar(require_checks(), exports2);
14360
- __exportStar(require_versions(), exports2);
14355
+ __exportStar2(require_core(), exports2);
14356
+ __exportStar2(require_parse(), exports2);
14357
+ __exportStar2(require_errors(), exports2);
14358
+ __exportStar2(require_schemas(), exports2);
14359
+ __exportStar2(require_checks(), exports2);
14360
+ __exportStar2(require_versions(), exports2);
14361
14361
  exports2.util = __importStar(require_util());
14362
14362
  exports2.regexes = __importStar(require_regexes());
14363
14363
  exports2.locales = __importStar(require_locales());
14364
- __exportStar(require_registries(), exports2);
14365
- __exportStar(require_doc(), exports2);
14366
- __exportStar(require_api(), exports2);
14367
- __exportStar(require_to_json_schema(), exports2);
14364
+ __exportStar2(require_registries(), exports2);
14365
+ __exportStar2(require_doc(), exports2);
14366
+ __exportStar2(require_api(), exports2);
14367
+ __exportStar2(require_to_json_schema(), exports2);
14368
14368
  var json_schema_processors_js_1 = require_json_schema_processors();
14369
14369
  Object.defineProperty(exports2, "toJSONSchema", { enumerable: true, get: function() {
14370
14370
  return json_schema_processors_js_1.toJSONSchema;
@@ -14478,7 +14478,7 @@ var require_checks2 = __commonJS({
14478
14478
  var require_iso = __commonJS({
14479
14479
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.cjs"(exports2) {
14480
14480
  "use strict";
14481
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
14481
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
14482
14482
  if (k2 === void 0) k2 = k;
14483
14483
  var desc = Object.getOwnPropertyDescriptor(m2, k);
14484
14484
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -14500,7 +14500,7 @@ var require_iso = __commonJS({
14500
14500
  if (mod && mod.__esModule) return mod;
14501
14501
  var result = {};
14502
14502
  if (mod != null) {
14503
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
14503
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
14504
14504
  }
14505
14505
  __setModuleDefault(result, mod);
14506
14506
  return result;
@@ -14548,7 +14548,7 @@ var require_iso = __commonJS({
14548
14548
  var require_errors2 = __commonJS({
14549
14549
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.cjs"(exports2) {
14550
14550
  "use strict";
14551
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
14551
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
14552
14552
  if (k2 === void 0) k2 = k;
14553
14553
  var desc = Object.getOwnPropertyDescriptor(m2, k);
14554
14554
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -14570,7 +14570,7 @@ var require_errors2 = __commonJS({
14570
14570
  if (mod && mod.__esModule) return mod;
14571
14571
  var result = {};
14572
14572
  if (mod != null) {
14573
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
14573
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
14574
14574
  }
14575
14575
  __setModuleDefault(result, mod);
14576
14576
  return result;
@@ -14625,7 +14625,7 @@ var require_errors2 = __commonJS({
14625
14625
  var require_parse2 = __commonJS({
14626
14626
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.cjs"(exports2) {
14627
14627
  "use strict";
14628
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
14628
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
14629
14629
  if (k2 === void 0) k2 = k;
14630
14630
  var desc = Object.getOwnPropertyDescriptor(m2, k);
14631
14631
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -14647,7 +14647,7 @@ var require_parse2 = __commonJS({
14647
14647
  if (mod && mod.__esModule) return mod;
14648
14648
  var result = {};
14649
14649
  if (mod != null) {
14650
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
14650
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
14651
14651
  }
14652
14652
  __setModuleDefault(result, mod);
14653
14653
  return result;
@@ -14675,7 +14675,7 @@ var require_parse2 = __commonJS({
14675
14675
  var require_schemas2 = __commonJS({
14676
14676
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.cjs"(exports2) {
14677
14677
  "use strict";
14678
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
14678
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
14679
14679
  if (k2 === void 0) k2 = k;
14680
14680
  var desc = Object.getOwnPropertyDescriptor(m2, k);
14681
14681
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -14697,7 +14697,7 @@ var require_schemas2 = __commonJS({
14697
14697
  if (mod && mod.__esModule) return mod;
14698
14698
  var result = {};
14699
14699
  if (mod != null) {
14700
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
14700
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
14701
14701
  }
14702
14702
  __setModuleDefault(result, mod);
14703
14703
  return result;
@@ -16103,7 +16103,7 @@ var require_schemas2 = __commonJS({
16103
16103
  var require_compat = __commonJS({
16104
16104
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/compat.cjs"(exports2) {
16105
16105
  "use strict";
16106
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
16106
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
16107
16107
  if (k2 === void 0) k2 = k;
16108
16108
  var desc = Object.getOwnPropertyDescriptor(m2, k);
16109
16109
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -16125,7 +16125,7 @@ var require_compat = __commonJS({
16125
16125
  if (mod && mod.__esModule) return mod;
16126
16126
  var result = {};
16127
16127
  if (mod != null) {
16128
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
16128
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
16129
16129
  }
16130
16130
  __setModuleDefault(result, mod);
16131
16131
  return result;
@@ -16173,7 +16173,7 @@ var require_compat = __commonJS({
16173
16173
  var require_from_json_schema = __commonJS({
16174
16174
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/from-json-schema.cjs"(exports2) {
16175
16175
  "use strict";
16176
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
16176
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
16177
16177
  if (k2 === void 0) k2 = k;
16178
16178
  var desc = Object.getOwnPropertyDescriptor(m2, k);
16179
16179
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -16195,7 +16195,7 @@ var require_from_json_schema = __commonJS({
16195
16195
  if (mod && mod.__esModule) return mod;
16196
16196
  var result = {};
16197
16197
  if (mod != null) {
16198
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
16198
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
16199
16199
  }
16200
16200
  __setModuleDefault(result, mod);
16201
16201
  return result;
@@ -16691,7 +16691,7 @@ var require_from_json_schema = __commonJS({
16691
16691
  var require_coerce = __commonJS({
16692
16692
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/coerce.cjs"(exports2) {
16693
16693
  "use strict";
16694
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
16694
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
16695
16695
  if (k2 === void 0) k2 = k;
16696
16696
  var desc = Object.getOwnPropertyDescriptor(m2, k);
16697
16697
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -16713,7 +16713,7 @@ var require_coerce = __commonJS({
16713
16713
  if (mod && mod.__esModule) return mod;
16714
16714
  var result = {};
16715
16715
  if (mod != null) {
16716
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
16716
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
16717
16717
  }
16718
16718
  __setModuleDefault(result, mod);
16719
16719
  return result;
@@ -16748,7 +16748,7 @@ var require_coerce = __commonJS({
16748
16748
  var require_external = __commonJS({
16749
16749
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.cjs"(exports2) {
16750
16750
  "use strict";
16751
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
16751
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
16752
16752
  if (k2 === void 0) k2 = k;
16753
16753
  var desc = Object.getOwnPropertyDescriptor(m2, k);
16754
16754
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -16770,13 +16770,13 @@ var require_external = __commonJS({
16770
16770
  if (mod && mod.__esModule) return mod;
16771
16771
  var result = {};
16772
16772
  if (mod != null) {
16773
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
16773
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
16774
16774
  }
16775
16775
  __setModuleDefault(result, mod);
16776
16776
  return result;
16777
16777
  };
16778
- var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
16779
- for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
16778
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
16779
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
16780
16780
  };
16781
16781
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
16782
16782
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -16784,11 +16784,11 @@ var require_external = __commonJS({
16784
16784
  Object.defineProperty(exports2, "__esModule", { value: true });
16785
16785
  exports2.coerce = exports2.iso = exports2.ZodISODuration = exports2.ZodISOTime = exports2.ZodISODate = exports2.ZodISODateTime = exports2.locales = exports2.fromJSONSchema = exports2.toJSONSchema = exports2.NEVER = exports2.util = exports2.TimePrecision = exports2.flattenError = exports2.formatError = exports2.prettifyError = exports2.treeifyError = exports2.regexes = exports2.clone = exports2.$brand = exports2.$input = exports2.$output = exports2.config = exports2.registry = exports2.globalRegistry = exports2.core = void 0;
16786
16786
  exports2.core = __importStar(require_core2());
16787
- __exportStar(require_schemas2(), exports2);
16788
- __exportStar(require_checks2(), exports2);
16789
- __exportStar(require_errors2(), exports2);
16790
- __exportStar(require_parse2(), exports2);
16791
- __exportStar(require_compat(), exports2);
16787
+ __exportStar2(require_schemas2(), exports2);
16788
+ __exportStar2(require_checks2(), exports2);
16789
+ __exportStar2(require_errors2(), exports2);
16790
+ __exportStar2(require_parse2(), exports2);
16791
+ __exportStar2(require_compat(), exports2);
16792
16792
  var index_js_1 = require_core2();
16793
16793
  var en_js_1 = __importDefault(require_en());
16794
16794
  (0, index_js_1.config)((0, en_js_1.default)());
@@ -16869,7 +16869,7 @@ var require_external = __commonJS({
16869
16869
  var require_zod = __commonJS({
16870
16870
  "../../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/index.cjs"(exports2) {
16871
16871
  "use strict";
16872
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
16872
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
16873
16873
  if (k2 === void 0) k2 = k;
16874
16874
  var desc = Object.getOwnPropertyDescriptor(m2, k);
16875
16875
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -16891,19 +16891,19 @@ var require_zod = __commonJS({
16891
16891
  if (mod && mod.__esModule) return mod;
16892
16892
  var result = {};
16893
16893
  if (mod != null) {
16894
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
16894
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
16895
16895
  }
16896
16896
  __setModuleDefault(result, mod);
16897
16897
  return result;
16898
16898
  };
16899
- var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
16900
- for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
16899
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
16900
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
16901
16901
  };
16902
16902
  Object.defineProperty(exports2, "__esModule", { value: true });
16903
16903
  exports2.z = void 0;
16904
16904
  var z = __importStar(require_external());
16905
16905
  exports2.z = z;
16906
- __exportStar(require_external(), exports2);
16906
+ __exportStar2(require_external(), exports2);
16907
16907
  exports2.default = z;
16908
16908
  }
16909
16909
  });
@@ -16934,7 +16934,7 @@ var require_directory_config = __commonJS({
16934
16934
  deactivated: zod_12.z.literal(false)
16935
16935
  }).strict()).max(50) }).strict();
16936
16936
  function readDirectoryGroups(manifest) {
16937
- const parsed = zod_12.z.object({ capabilities: zod_12.z.object({ directory: exports2.directoryScopesSchema.optional() }).optional() }).safeParse(manifest);
16937
+ const parsed = zod_12.z.object({ capabilities: zod_12.z.object({ directory: zod_12.z.object({ groups: exports2.directoryScopesSchema.shape.groups.optional() }).optional() }).optional() }).safeParse(manifest);
16938
16938
  return parsed.success ? parsed.data.capabilities?.directory?.groups ?? [] : [];
16939
16939
  }
16940
16940
  }
@@ -16985,17 +16985,22 @@ var require_invocation_client = __commonJS({
16985
16985
  code: zod_12.z.string().max(128).optional(),
16986
16986
  detail: zod_12.z.string().max(2e3).optional()
16987
16987
  });
16988
- function createInvocationReadTransport({ baseUrl, fetchImpl = globalThis.fetch, path, header, credential, timeoutMs, error, failure }) {
16988
+ function createInvocationReadTransport({ baseUrl, fetchImpl = globalThis.fetch, path, header, credential, additionalCredentials = [], timeoutMs, error, failure }) {
16989
16989
  const url = `${trustedOrigin({ baseUrl, error })}${path}`;
16990
+ const credentials = [{ header, credential }, ...additionalCredentials];
16991
+ const names = credentials.map((value) => value.header.toLowerCase());
16992
+ if (new Set(names).size !== names.length || names.includes("content-type")) {
16993
+ throw error(400, "invalid_configuration", "Credential headers must be distinct");
16994
+ }
16990
16995
  return async function read({ body, schema }) {
16991
- if (credential.expiresAt <= Date.now() / 1e3) {
16996
+ if (credentials.some((value) => value.credential.expiresAt <= Date.now() / 1e3)) {
16992
16997
  throw error(401, "expired_context", "The invocation credential expired; start a new invocation");
16993
16998
  }
16994
16999
  const response = await fetchImpl(url, {
16995
17000
  method: "POST",
16996
17001
  headers: {
16997
17002
  "content-type": "application/json",
16998
- [header]: credential.token
17003
+ ...Object.fromEntries(credentials.map((value) => [value.header, value.credential.token]))
16999
17004
  },
17000
17005
  body: JSON.stringify(body),
17001
17006
  redirect: "error",
@@ -17079,12 +17084,797 @@ var require_directory = __commonJS({
17079
17084
  }
17080
17085
  });
17081
17086
 
17087
+ // dist/lattice-capability.js
17088
+ var require_lattice_capability = __commonJS({
17089
+ "dist/lattice-capability.js"(exports2) {
17090
+ "use strict";
17091
+ Object.defineProperty(exports2, "__esModule", { value: true });
17092
+ exports2.functionLatticeContextCapabilitySchema = void 0;
17093
+ exports2.readFunctionLatticeContextCapability = readFunctionLatticeContextCapability;
17094
+ var zod_12 = require_zod();
17095
+ exports2.functionLatticeContextCapabilitySchema = zod_12.z.strictObject({
17096
+ context: zod_12.z.literal(true)
17097
+ });
17098
+ function readFunctionLatticeContextCapability(manifest) {
17099
+ if (typeof manifest !== "object" || manifest === null)
17100
+ return false;
17101
+ const capabilities = Reflect.get(manifest, "capabilities");
17102
+ if (typeof capabilities !== "object" || capabilities === null)
17103
+ return false;
17104
+ return exports2.functionLatticeContextCapabilitySchema.safeParse(Reflect.get(capabilities, "lattice")).success;
17105
+ }
17106
+ }
17107
+ });
17108
+
17109
+ // dist/lattice-provenance-contract.js
17110
+ var require_lattice_provenance_contract = __commonJS({
17111
+ "dist/lattice-provenance-contract.js"(exports2) {
17112
+ "use strict";
17113
+ Object.defineProperty(exports2, "__esModule", { value: true });
17114
+ exports2.FunctionLatticeContextError = exports2.functionLatticeParallelSnapshotSchema = exports2.functionLatticeHumanCompletionsPageSchema = exports2.functionLatticeHumanCompletionSchema = exports2.functionLatticeExecutionContextSchema = exports2.functionLatticeContextRequestSchema = exports2.functionLatticeParallelSnapshotQuerySchema = exports2.functionLatticeHumanCompletionsQuerySchema = exports2.functionLatticeHumanCompletionQuerySchema = exports2.functionLatticeStartProvenanceSchema = exports2.FUNCTION_LATTICE_CONTEXT_PATH = exports2.FUNCTION_LATTICE_EXECUTION_TOKEN_HEADER = void 0;
17115
+ var zod_12 = require_zod();
17116
+ exports2.FUNCTION_LATTICE_EXECUTION_TOKEN_HEADER = "x-sequence-lattice-execution-token";
17117
+ exports2.FUNCTION_LATTICE_CONTEXT_PATH = "/api/managed-functions/lattice/context";
17118
+ var identifier = zod_12.z.string().min(1).max(255);
17119
+ var principal = zod_12.z.string().min(1).max(512);
17120
+ var record = zod_12.z.record(zod_12.z.string(), zod_12.z.unknown());
17121
+ var attempt = zod_12.z.number().int().positive();
17122
+ var startBasisByMode = {
17123
+ manual: ["fga_invoker"],
17124
+ trigger: ["trusted_trigger"],
17125
+ schedule: ["schedule_author", "schedule_no_author"],
17126
+ system: ["trusted_service"],
17127
+ subprocess: ["subprocess_spawn_gate", "subprocess_parent_starter", "subprocess_existing_child"],
17128
+ intervention: ["intervention_actor"]
17129
+ };
17130
+ exports2.functionLatticeStartProvenanceSchema = zod_12.z.strictObject({
17131
+ version: zod_12.z.literal(1),
17132
+ issuer: zod_12.z.string().min(1).max(8192),
17133
+ runId: identifier,
17134
+ processId: identifier,
17135
+ processVersion: identifier,
17136
+ bundleHash: identifier,
17137
+ actorSub: principal,
17138
+ startedBy: principal.nullable(),
17139
+ mode: zod_12.z.enum(["manual", "trigger", "schedule", "system", "subprocess", "intervention"]),
17140
+ basis: zod_12.z.enum(["fga_invoker", "schedule_author", "schedule_no_author", "trusted_service", "trusted_trigger", "subprocess_spawn_gate", "subprocess_parent_starter", "subprocess_existing_child", "intervention_actor"]),
17141
+ authorizedAt: zod_12.z.iso.datetime(),
17142
+ schedule: zod_12.z.strictObject({ scheduleId: identifier, scheduledAt: zod_12.z.iso.datetime() }).nullable()
17143
+ }).refine((value) => startBasisByMode[value.mode].includes(value.basis) && value.mode === "schedule" === (value.schedule !== null), "Start basis and schedule must match the verified authorization mode");
17144
+ exports2.functionLatticeHumanCompletionQuerySchema = zod_12.z.strictObject({
17145
+ nodeId: identifier,
17146
+ stepId: identifier.optional(),
17147
+ ancestorNodeId: identifier.optional()
17148
+ });
17149
+ exports2.functionLatticeHumanCompletionsQuerySchema = exports2.functionLatticeHumanCompletionQuerySchema.omit({ stepId: true });
17150
+ exports2.functionLatticeParallelSnapshotQuerySchema = zod_12.z.strictObject({ nodeId: identifier, ancestorNodeId: identifier });
17151
+ exports2.functionLatticeContextRequestSchema = zod_12.z.discriminatedUnion("operation", [
17152
+ zod_12.z.strictObject({ operation: zod_12.z.literal("getExecutionContext") }),
17153
+ exports2.functionLatticeHumanCompletionQuerySchema.extend({
17154
+ operation: zod_12.z.literal("getHumanCompletion")
17155
+ }),
17156
+ exports2.functionLatticeHumanCompletionsQuerySchema.extend({
17157
+ operation: zod_12.z.literal("getHumanCompletions")
17158
+ }),
17159
+ exports2.functionLatticeParallelSnapshotQuerySchema.extend({ operation: zod_12.z.literal("getParallelSnapshot") })
17160
+ ]);
17161
+ var executionIdentity = zod_12.z.object({
17162
+ receiverFunctionOrgId: identifier,
17163
+ parent: zod_12.z.object({ runId: identifier, processId: identifier, processVersion: identifier, bundleHash: identifier, stepId: identifier, nodeId: identifier, attempt, input: zod_12.z.unknown(), branch: zod_12.z.object({ id: identifier, index: zod_12.z.number().int().nonnegative(), item: zod_12.z.unknown() }).nullable() }).nullable().optional(),
17164
+ run: zod_12.z.object({
17165
+ id: identifier,
17166
+ processId: identifier,
17167
+ processVersion: identifier,
17168
+ bundleHash: identifier,
17169
+ entity: zod_12.z.object({ type: identifier, id: identifier }).nullable(),
17170
+ startProvenance: exports2.functionLatticeStartProvenanceSchema.nullable().optional()
17171
+ }).refine((run) => !run.startProvenance || run.startProvenance.runId === run.id && run.startProvenance.processId === run.processId && run.startProvenance.processVersion === run.processVersion && run.startProvenance.bundleHash === run.bundleHash, "Start provenance must identify the exact executing run"),
17172
+ step: zod_12.z.object({
17173
+ id: identifier,
17174
+ nodeId: identifier,
17175
+ attempt,
17176
+ runAsServiceAccount: principal.nullable()
17177
+ }),
17178
+ receiver: zod_12.z.object({
17179
+ functionId: identifier,
17180
+ versionId: identifier,
17181
+ invocationId: identifier,
17182
+ invoker: zod_12.z.object({ sub: principal, kind: identifier, authenticationMethod: identifier }),
17183
+ attachedServiceAccountSub: principal
17184
+ })
17185
+ });
17186
+ exports2.functionLatticeExecutionContextSchema = executionIdentity.extend({
17187
+ input: zod_12.z.unknown(),
17188
+ ctxSnapshot: zod_12.z.object({
17189
+ entity: zod_12.z.unknown(),
17190
+ upstream: record,
17191
+ state: record,
17192
+ run: zod_12.z.object({
17193
+ id: identifier,
17194
+ process_id: identifier,
17195
+ version: identifier,
17196
+ started_at: zod_12.z.iso.datetime({ offset: true }),
17197
+ started_by: principal.nullable(),
17198
+ metadata: record,
17199
+ trigger_reason: record.nullable().optional()
17200
+ }),
17201
+ branch: zod_12.z.object({ id: identifier, index: zod_12.z.number().int().nonnegative(), item: zod_12.z.unknown() }).optional()
17202
+ })
17203
+ }).refine((value) => value.ctxSnapshot.run.id === value.run.id && value.ctxSnapshot.run.process_id === value.run.processId && value.ctxSnapshot.run.version === value.run.processVersion, "The context snapshot must identify the executing run");
17204
+ exports2.functionLatticeHumanCompletionSchema = executionIdentity.extend({
17205
+ human: zod_12.z.object({
17206
+ receipt: zod_12.z.string().min(1).max(16384),
17207
+ runId: identifier,
17208
+ processId: identifier,
17209
+ bundleHash: identifier,
17210
+ actorSub: principal,
17211
+ receiptId: identifier,
17212
+ stepId: identifier,
17213
+ nodeId: identifier,
17214
+ attempt,
17215
+ edgeId: identifier.nullable(),
17216
+ payload: record,
17217
+ completedAt: zod_12.z.iso.datetime({ offset: true }),
17218
+ ancestor: zod_12.z.object({
17219
+ runId: identifier,
17220
+ processId: identifier,
17221
+ bundleHash: identifier,
17222
+ stepId: identifier,
17223
+ nodeId: identifier,
17224
+ attempt
17225
+ }).optional()
17226
+ })
17227
+ }).refine((value) => value.human.receiptId === value.human.stepId, "The receipt identifier must be the actual human step identifier");
17228
+ exports2.functionLatticeHumanCompletionsPageSchema = zod_12.z.object({
17229
+ completions: zod_12.z.array(exports2.functionLatticeHumanCompletionSchema).max(64)
17230
+ });
17231
+ var parallelHumanStep = zod_12.z.object({ runId: identifier, stepId: identifier, nodeId: identifier, attempt, receiptId: identifier });
17232
+ exports2.functionLatticeParallelSnapshotSchema = executionIdentity.extend({
17233
+ parallel: zod_12.z.object({
17234
+ runId: identifier,
17235
+ processId: identifier,
17236
+ processVersion: identifier,
17237
+ bundleHash: identifier,
17238
+ entity: zod_12.z.object({ type: identifier, id: identifier }).nullable(),
17239
+ stepId: identifier,
17240
+ nodeId: identifier,
17241
+ attempt,
17242
+ status: zod_12.z.literal("completed"),
17243
+ observedAt: zod_12.z.iso.datetime({ offset: true }),
17244
+ proof: zod_12.z.string().min(1).max(131072),
17245
+ ancestor: zod_12.z.object({ runId: identifier, processId: identifier, bundleHash: identifier, stepId: identifier, nodeId: identifier, attempt, receipt: zod_12.z.string().min(1).max(16384), receiptId: identifier }),
17246
+ branches: zod_12.z.array(zod_12.z.object({
17247
+ branchId: identifier,
17248
+ branchIndex: zod_12.z.number().int().nonnegative(),
17249
+ item: zod_12.z.unknown(),
17250
+ stepId: identifier,
17251
+ nodeId: identifier,
17252
+ attempt,
17253
+ status: zod_12.z.enum(["pending", "running", "completed", "failed", "cancelled", "timed_out"]),
17254
+ joinStatus: zod_12.z.enum(["pending", "completed", "failed", "cancelled", "timed_out"]),
17255
+ humanStep: parallelHumanStep.nullable()
17256
+ })).max(64)
17257
+ })
17258
+ }).refine((value) => {
17259
+ const branches = value.parallel.branches;
17260
+ return value.parallel.runId === value.run.id && value.parallel.bundleHash === value.run.bundleHash && value.parallel.processId === value.run.processId && value.parallel.processVersion === value.run.processVersion && value.parallel.entity?.id === value.run.entity?.id && value.parallel.entity?.type === value.run.entity?.type && value.parallel.ancestor.runId === value.run.id && value.parallel.ancestor.processId === value.run.processId && value.parallel.ancestor.bundleHash === value.run.bundleHash && value.parallel.ancestor.receiptId === value.parallel.ancestor.stepId && new Set(branches.map((branch) => branch.branchId)).size === branches.length && new Set(branches.map((branch) => branch.branchIndex)).size === branches.length && branches.every((branch) => !branch.humanStep || !["pending", "timed_out"].includes(branch.joinStatus) && branch.humanStep.runId === value.run.id && branch.humanStep.nodeId === branch.nodeId && branch.humanStep.stepId === branch.stepId && branch.humanStep.attempt === branch.attempt && branch.humanStep.receiptId === branch.stepId);
17261
+ }, "Parallel snapshots must identify one complete causal execution with unique actual branches");
17262
+ var FunctionLatticeContextError = class extends Error {
17263
+ status;
17264
+ code;
17265
+ name = "FunctionLatticeContextError";
17266
+ constructor(status, code, message) {
17267
+ super(message);
17268
+ this.status = status;
17269
+ this.code = code;
17270
+ }
17271
+ };
17272
+ exports2.FunctionLatticeContextError = FunctionLatticeContextError;
17273
+ }
17274
+ });
17275
+
17276
+ // dist/lattice-provenance.js
17277
+ var require_lattice_provenance = __commonJS({
17278
+ "dist/lattice-provenance.js"(exports2) {
17279
+ "use strict";
17280
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
17281
+ if (k2 === void 0) k2 = k;
17282
+ var desc = Object.getOwnPropertyDescriptor(m2, k);
17283
+ if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
17284
+ desc = { enumerable: true, get: function() {
17285
+ return m2[k];
17286
+ } };
17287
+ }
17288
+ Object.defineProperty(o, k2, desc);
17289
+ }) : (function(o, m2, k, k2) {
17290
+ if (k2 === void 0) k2 = k;
17291
+ o[k2] = m2[k];
17292
+ }));
17293
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
17294
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
17295
+ };
17296
+ Object.defineProperty(exports2, "__esModule", { value: true });
17297
+ exports2.createFunctionLatticeClient = createFunctionLatticeClient;
17298
+ var zod_12 = require_zod();
17299
+ var lattice_provenance_contract_12 = require_lattice_provenance_contract();
17300
+ __exportStar2(require_lattice_provenance_contract(), exports2);
17301
+ var tokenClaimsSchema = zod_12.z.object({
17302
+ audience: zod_12.z.literal("atlas-managed-function-lattice-execution"),
17303
+ functionId: zod_12.z.string().min(1).max(255),
17304
+ versionId: zod_12.z.string().min(1).max(255),
17305
+ invocationId: zod_12.z.string().min(1).max(255),
17306
+ org: zod_12.z.string().min(1).max(255),
17307
+ runId: zod_12.z.string().min(1).max(255),
17308
+ processId: zod_12.z.string().min(1).max(255),
17309
+ processVersion: zod_12.z.string().min(1).max(255),
17310
+ bundleHash: zod_12.z.string().min(1).max(255),
17311
+ stepId: zod_12.z.string().min(1).max(255),
17312
+ nodeId: zod_12.z.string().min(1).max(255),
17313
+ stepAttempt: zod_12.z.number().int().positive(),
17314
+ serviceAccountId: zod_12.z.string().min(1).max(255),
17315
+ callerSub: zod_12.z.string().min(1).max(512),
17316
+ callerKind: zod_12.z.string().min(1).max(64),
17317
+ callerAuthenticationMethod: zod_12.z.string().min(1).max(64),
17318
+ exp: zod_12.z.number().int().positive().max(Number.MAX_SAFE_INTEGER)
17319
+ });
17320
+ var invalidContext = () => new lattice_provenance_contract_12.FunctionLatticeContextError(401, "invalid_context", "This invocation has no valid Lattice execution credential");
17321
+ function readCredential({ request }) {
17322
+ const { headers } = request;
17323
+ const matches = typeof headers.get === "function" ? [headers.get(lattice_provenance_contract_12.FUNCTION_LATTICE_EXECUTION_TOKEN_HEADER)] : Object.entries(headers).filter(([name]) => name.toLowerCase() === lattice_provenance_contract_12.FUNCTION_LATTICE_EXECUTION_TOKEN_HEADER).map(([, value2]) => value2);
17324
+ const token = matches[0];
17325
+ if (matches.length !== 1 || typeof token !== "string" || token.length > 16384)
17326
+ throw invalidContext();
17327
+ const envelope = /^([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]{43})$/.exec(token);
17328
+ if (!envelope?.[1])
17329
+ throw invalidContext();
17330
+ let value;
17331
+ try {
17332
+ const decoded = Buffer.from(envelope[1], "base64url");
17333
+ if (decoded.toString("base64url") !== envelope[1])
17334
+ throw invalidContext();
17335
+ value = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(decoded));
17336
+ } catch {
17337
+ throw invalidContext();
17338
+ }
17339
+ const parsed = tokenClaimsSchema.safeParse(value);
17340
+ if (!parsed.success)
17341
+ throw invalidContext();
17342
+ return { token, claims: parsed.data };
17343
+ }
17344
+ function trustedOrigin(baseUrl) {
17345
+ const invalid = () => new lattice_provenance_contract_12.FunctionLatticeContextError(400, "invalid_configuration", "Configure a trusted HTTPS Atlas origin without credentials, path, query or fragment");
17346
+ let url;
17347
+ try {
17348
+ url = new URL(baseUrl);
17349
+ } catch {
17350
+ throw invalid();
17351
+ }
17352
+ const loopback = url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname);
17353
+ if (!loopback && url.protocol !== "https:" || url.username || url.password || url.pathname !== "/" || url.search || url.hash)
17354
+ throw invalid();
17355
+ return url.origin;
17356
+ }
17357
+ function matchesExecution({ execution, claims }) {
17358
+ return execution.receiver.functionId === claims.functionId && execution.receiver.versionId === claims.versionId && execution.receiver.invocationId === claims.invocationId && execution.receiverFunctionOrgId === claims.org && execution.run.id === claims.runId && execution.run.processId === claims.processId && execution.run.processVersion === claims.processVersion && execution.run.bundleHash === claims.bundleHash && execution.step.id === claims.stepId && execution.step.nodeId === claims.nodeId && execution.step.attempt === claims.stepAttempt && execution.receiver.invoker.sub === claims.callerSub && execution.receiver.invoker.kind === claims.callerKind && execution.receiver.invoker.authenticationMethod === claims.callerAuthenticationMethod && execution.receiver.attachedServiceAccountSub === `service-account|${claims.serviceAccountId}`;
17359
+ }
17360
+ function validateHumanSelection({ completion, query }) {
17361
+ if (completion.human.nodeId !== query.nodeId || query.stepId !== void 0 && completion.human.stepId !== query.stepId || query.ancestorNodeId !== void 0 && completion.human.ancestor?.nodeId !== query.ancestorNodeId)
17362
+ throw new lattice_provenance_contract_12.FunctionLatticeContextError(502, "malformed_response", "Atlas returned a different completed human step");
17363
+ }
17364
+ function createFunctionLatticeClient({ request, baseUrl, fetchImpl = globalThis.fetch }) {
17365
+ const url = `${trustedOrigin(baseUrl)}${lattice_provenance_contract_12.FUNCTION_LATTICE_CONTEXT_PATH}`;
17366
+ const { token, claims } = readCredential({ request });
17367
+ async function read({ body, schema, executions }) {
17368
+ if (claims.exp <= Date.now() / 1e3)
17369
+ throw new lattice_provenance_contract_12.FunctionLatticeContextError(401, "expired_context", "The execution credential expired; start a new invocation");
17370
+ const parsed = lattice_provenance_contract_12.functionLatticeContextRequestSchema.safeParse(body);
17371
+ if (!parsed.success)
17372
+ throw new lattice_provenance_contract_12.FunctionLatticeContextError(400, "invalid_request", "Select a valid Lattice context operation and human step");
17373
+ let response;
17374
+ try {
17375
+ response = await fetchImpl(url, {
17376
+ method: "POST",
17377
+ headers: {
17378
+ "content-type": "application/json",
17379
+ [lattice_provenance_contract_12.FUNCTION_LATTICE_EXECUTION_TOKEN_HEADER]: token
17380
+ },
17381
+ body: JSON.stringify(parsed.data),
17382
+ redirect: "error",
17383
+ signal: AbortSignal.timeout(3e4)
17384
+ });
17385
+ } catch {
17386
+ throw new lattice_provenance_contract_12.FunctionLatticeContextError(502, "context_request_failed", "The Lattice context request failed");
17387
+ }
17388
+ if (response.redirected || response.status >= 300 && response.status < 400)
17389
+ throw new lattice_provenance_contract_12.FunctionLatticeContextError(502, "redirect_refused", "The Lattice context request must not redirect");
17390
+ const result = await response.json().catch(() => null);
17391
+ if (!response.ok) {
17392
+ const error = zod_12.z.object({ code: zod_12.z.string().min(1).max(128), detail: zod_12.z.string().min(1).max(2e3) }).safeParse(result);
17393
+ throw new lattice_provenance_contract_12.FunctionLatticeContextError(response.status, error.success ? error.data.code : "context_read_failed", error.success ? error.data.detail : "Lattice context read failed");
17394
+ }
17395
+ const validated = schema.safeParse(result);
17396
+ if (!validated.success || executions(validated.data).some((execution) => !matchesExecution({ execution, claims })))
17397
+ throw new lattice_provenance_contract_12.FunctionLatticeContextError(502, "malformed_response", "Atlas returned an invalid Lattice context response");
17398
+ return validated.data;
17399
+ }
17400
+ return {
17401
+ getExecutionContext() {
17402
+ return read({ body: { operation: "getExecutionContext" }, schema: lattice_provenance_contract_12.functionLatticeExecutionContextSchema, executions: (value) => [value] });
17403
+ },
17404
+ async getHumanCompletion(query) {
17405
+ const completion = await read({
17406
+ body: { ...query, operation: "getHumanCompletion" },
17407
+ schema: lattice_provenance_contract_12.functionLatticeHumanCompletionSchema,
17408
+ executions: (value) => [value]
17409
+ });
17410
+ validateHumanSelection({ completion, query });
17411
+ return completion;
17412
+ },
17413
+ async getHumanCompletions(query) {
17414
+ const page = await read({
17415
+ body: { ...query, operation: "getHumanCompletions" },
17416
+ schema: lattice_provenance_contract_12.functionLatticeHumanCompletionsPageSchema,
17417
+ executions: (value) => value.completions
17418
+ });
17419
+ page.completions.forEach((completion) => validateHumanSelection({ completion, query }));
17420
+ return page;
17421
+ },
17422
+ async getParallelSnapshot(query) {
17423
+ const snapshot = await read({ body: { ...query, operation: "getParallelSnapshot" }, schema: lattice_provenance_contract_12.functionLatticeParallelSnapshotSchema, executions: (value) => [value] });
17424
+ if (snapshot.parallel.nodeId !== query.nodeId || snapshot.parallel.ancestor.nodeId !== query.ancestorNodeId)
17425
+ throw new lattice_provenance_contract_12.FunctionLatticeContextError(502, "malformed_response", "Atlas returned a different causal parallel execution");
17426
+ return snapshot;
17427
+ }
17428
+ };
17429
+ }
17430
+ }
17431
+ });
17432
+
17433
+ // dist/invocation-contract.js
17434
+ var require_invocation_contract = __commonJS({
17435
+ "dist/invocation-contract.js"(exports2) {
17436
+ "use strict";
17437
+ Object.defineProperty(exports2, "__esModule", { value: true });
17438
+ exports2.FunctionInvocationContextError = exports2.functionInvocationContextSchema = exports2.functionInvocationContextRequestSchema = exports2.functionInvocationIdentityCapabilitySchema = exports2.FUNCTION_INVOCATION_CONTEXT_PATH = exports2.FUNCTION_INVOCATION_IDENTITY_TOKEN_HEADER = void 0;
17439
+ exports2.readFunctionInvocationIdentityCapability = readFunctionInvocationIdentityCapability;
17440
+ var zod_12 = require_zod();
17441
+ exports2.FUNCTION_INVOCATION_IDENTITY_TOKEN_HEADER = "x-sequence-invocation-identity-token";
17442
+ exports2.FUNCTION_INVOCATION_CONTEXT_PATH = "/api/managed-functions/invocation/context";
17443
+ var identifier = zod_12.z.string().min(1).max(255);
17444
+ var principal = zod_12.z.string().min(1).max(512);
17445
+ exports2.functionInvocationIdentityCapabilitySchema = zod_12.z.strictObject({
17446
+ identity: zod_12.z.literal(true)
17447
+ });
17448
+ function readFunctionInvocationIdentityCapability(manifest) {
17449
+ if (typeof manifest !== "object" || manifest === null)
17450
+ return false;
17451
+ const capabilities = Reflect.get(manifest, "capabilities");
17452
+ if (typeof capabilities !== "object" || capabilities === null)
17453
+ return false;
17454
+ return exports2.functionInvocationIdentityCapabilitySchema.safeParse(Reflect.get(capabilities, "invocation")).success;
17455
+ }
17456
+ exports2.functionInvocationContextRequestSchema = zod_12.z.strictObject({
17457
+ operation: zod_12.z.literal("getInvocationContext")
17458
+ });
17459
+ exports2.functionInvocationContextSchema = zod_12.z.strictObject({
17460
+ receiver: zod_12.z.strictObject({
17461
+ functionId: identifier,
17462
+ versionId: identifier,
17463
+ invocationId: identifier,
17464
+ orgId: identifier,
17465
+ serviceAccountId: identifier,
17466
+ serviceAccountSub: principal
17467
+ }).refine((value) => value.serviceAccountSub === `service-account|${value.serviceAccountId}`, "The receiver subject must identify the attached service account"),
17468
+ caller: zod_12.z.strictObject({
17469
+ kind: zod_12.z.enum(["human", "service_account", "system"]),
17470
+ sub: principal
17471
+ })
17472
+ });
17473
+ var FunctionInvocationContextError = class extends Error {
17474
+ status;
17475
+ code;
17476
+ name = "FunctionInvocationContextError";
17477
+ constructor(status, code, message) {
17478
+ super(message);
17479
+ this.status = status;
17480
+ this.code = code;
17481
+ }
17482
+ };
17483
+ exports2.FunctionInvocationContextError = FunctionInvocationContextError;
17484
+ }
17485
+ });
17486
+
17487
+ // dist/abrigo-contract.js
17488
+ var require_abrigo_contract = __commonJS({
17489
+ "dist/abrigo-contract.js"(exports2) {
17490
+ "use strict";
17491
+ Object.defineProperty(exports2, "__esModule", { value: true });
17492
+ exports2.FunctionAbrigoReadError = exports2.functionAbrigoReadScopesSchema = exports2.functionAbrigoReadRequestSchema = exports2.abrigoReadOperationSchema = exports2.ABRIGO_READ_TIMEOUT_MS = exports2.ABRIGO_READ_MAX_RESPONSE_BYTES = exports2.FUNCTION_ABRIGO_READ_AUDIENCE = exports2.FUNCTION_ABRIGO_READ_PATH = exports2.FUNCTION_ABRIGO_READ_TOKEN_HEADER = void 0;
17493
+ exports2.readFunctionAbrigoReadScopes = readFunctionAbrigoReadScopes;
17494
+ var zod_12 = require_zod();
17495
+ exports2.FUNCTION_ABRIGO_READ_TOKEN_HEADER = "x-sequence-abrigo-read-token";
17496
+ exports2.FUNCTION_ABRIGO_READ_PATH = "/api/managed-functions/abrigo/read";
17497
+ exports2.FUNCTION_ABRIGO_READ_AUDIENCE = "atlas-managed-function-abrigo-read";
17498
+ exports2.ABRIGO_READ_MAX_RESPONSE_BYTES = 1024 * 1024;
17499
+ exports2.ABRIGO_READ_TIMEOUT_MS = 3e4;
17500
+ exports2.abrigoReadOperationSchema = zod_12.z.enum([
17501
+ "workflow",
17502
+ "entity",
17503
+ "entityGroupSummary",
17504
+ "loanRoles",
17505
+ "relatedLoanRoles",
17506
+ "workflowLoanMappings",
17507
+ "workflowDocuments",
17508
+ "customerDocuments",
17509
+ "reviewWorkflow",
17510
+ "reviewWorkflowDocuments",
17511
+ "reviewWorkflowCustomerDocuments"
17512
+ ]);
17513
+ var id = zod_12.z.number().int().positive().max(Number.MAX_SAFE_INTEGER);
17514
+ var page = zod_12.z.number().int().min(1).max(100);
17515
+ var perPage = zod_12.z.number().int().min(1).max(500);
17516
+ exports2.functionAbrigoReadRequestSchema = zod_12.z.discriminatedUnion("operation", [
17517
+ zod_12.z.strictObject({ operation: zod_12.z.literal("workflow"), workflowId: id }),
17518
+ zod_12.z.strictObject({ operation: zod_12.z.literal("entity"), entityId: id }),
17519
+ zod_12.z.strictObject({ operation: zod_12.z.literal("entityGroupSummary"), entityId: id }),
17520
+ zod_12.z.strictObject({ operation: zod_12.z.literal("loanRoles"), proposedLoanId: id, page, perPage }),
17521
+ zod_12.z.strictObject({ operation: zod_12.z.literal("relatedLoanRoles"), proposedLoanId: id, page, perPage }),
17522
+ zod_12.z.strictObject({ operation: zod_12.z.literal("workflowLoanMappings"), workflowId: id, page, perPage }),
17523
+ zod_12.z.strictObject({ operation: zod_12.z.literal("workflowDocuments"), workflowId: id, page, perPage }),
17524
+ zod_12.z.strictObject({ operation: zod_12.z.literal("customerDocuments"), customerId: id, page, perPage }),
17525
+ zod_12.z.strictObject({ operation: zod_12.z.literal("reviewWorkflow"), workflowId: id }),
17526
+ zod_12.z.strictObject({ operation: zod_12.z.literal("reviewWorkflowDocuments"), workflowId: id, page, perPage }),
17527
+ zod_12.z.strictObject({ operation: zod_12.z.literal("reviewWorkflowCustomerDocuments"), workflowId: id, page, perPage })
17528
+ ]);
17529
+ exports2.functionAbrigoReadScopesSchema = zod_12.z.strictObject({
17530
+ read: zod_12.z.array(exports2.abrigoReadOperationSchema).min(1).max(11).refine((operations) => new Set(operations).size === operations.length, "Abrigo read operations must be distinct")
17531
+ });
17532
+ function readFunctionAbrigoReadScopes(manifest) {
17533
+ if (typeof manifest !== "object" || manifest === null)
17534
+ return [];
17535
+ const capabilities = Reflect.get(manifest, "capabilities");
17536
+ if (typeof capabilities !== "object" || capabilities === null)
17537
+ return [];
17538
+ const abrigo = Reflect.get(capabilities, "abrigo");
17539
+ return abrigo === void 0 ? [] : exports2.functionAbrigoReadScopesSchema.parse(abrigo).read;
17540
+ }
17541
+ var FunctionAbrigoReadError = class extends Error {
17542
+ status;
17543
+ code;
17544
+ name = "FunctionAbrigoReadError";
17545
+ constructor(status, code, message) {
17546
+ super(message);
17547
+ this.status = status;
17548
+ this.code = code;
17549
+ }
17550
+ };
17551
+ exports2.FunctionAbrigoReadError = FunctionAbrigoReadError;
17552
+ }
17553
+ });
17554
+
17555
+ // dist/abrigo-response.js
17556
+ var require_abrigo_response = __commonJS({
17557
+ "dist/abrigo-response.js"(exports2) {
17558
+ "use strict";
17559
+ Object.defineProperty(exports2, "__esModule", { value: true });
17560
+ exports2.validateAbrigoReviewResponse = validateAbrigoReviewResponse;
17561
+ var zod_12 = require_zod();
17562
+ var abrigo_contract_1 = require_abrigo_contract();
17563
+ var positiveId = zod_12.z.number().int().positive().max(Number.MAX_SAFE_INTEGER);
17564
+ var reviewWorkflowSchema = zod_12.z.strictObject({ id: positiveId, customerId: positiveId });
17565
+ var reviewDocumentsSchema = zod_12.z.object({ items: zod_12.z.array(zod_12.z.unknown()).max(500) }).passthrough();
17566
+ var reviewCustomerDocumentsSchema = reviewDocumentsSchema.extend({ workflowId: positiveId, customerId: positiveId });
17567
+ function validateAbrigoReviewResponse({ query, body }) {
17568
+ const invalid = () => new abrigo_contract_1.FunctionAbrigoReadError(502, "malformed_response", "Atlas returned an invalid workflow document review response");
17569
+ if (query.operation === "reviewWorkflow") {
17570
+ const parsed = reviewWorkflowSchema.safeParse(body);
17571
+ if (!parsed.success || parsed.data.id !== query.workflowId)
17572
+ throw invalid();
17573
+ } else if (query.operation === "reviewWorkflowDocuments") {
17574
+ const parsed = reviewDocumentsSchema.safeParse(body);
17575
+ if (!parsed.success || parsed.data.items.length > query.perPage)
17576
+ throw invalid();
17577
+ } else if (query.operation === "reviewWorkflowCustomerDocuments") {
17578
+ const parsed = reviewCustomerDocumentsSchema.safeParse(body);
17579
+ if (!parsed.success || parsed.data.workflowId !== query.workflowId || parsed.data.items.length > query.perPage)
17580
+ throw invalid();
17581
+ }
17582
+ }
17583
+ }
17584
+ });
17585
+
17586
+ // dist/abrigo.js
17587
+ var require_abrigo = __commonJS({
17588
+ "dist/abrigo.js"(exports2) {
17589
+ "use strict";
17590
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
17591
+ if (k2 === void 0) k2 = k;
17592
+ var desc = Object.getOwnPropertyDescriptor(m2, k);
17593
+ if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
17594
+ desc = { enumerable: true, get: function() {
17595
+ return m2[k];
17596
+ } };
17597
+ }
17598
+ Object.defineProperty(o, k2, desc);
17599
+ }) : (function(o, m2, k, k2) {
17600
+ if (k2 === void 0) k2 = k;
17601
+ o[k2] = m2[k];
17602
+ }));
17603
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
17604
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
17605
+ };
17606
+ Object.defineProperty(exports2, "__esModule", { value: true });
17607
+ exports2.createFunctionCallerAbrigoClient = createFunctionCallerAbrigoClient;
17608
+ var zod_12 = require_zod();
17609
+ var abrigo_response_1 = require_abrigo_response();
17610
+ var abrigo_contract_1 = require_abrigo_contract();
17611
+ __exportStar2(require_abrigo_contract(), exports2);
17612
+ var claimsSchema = zod_12.z.object({
17613
+ audience: zod_12.z.literal(abrigo_contract_1.FUNCTION_ABRIGO_READ_AUDIENCE),
17614
+ environment: zod_12.z.string().min(1).max(4096),
17615
+ functionId: zod_12.z.uuid(),
17616
+ versionId: zod_12.z.uuid(),
17617
+ invocationId: zod_12.z.uuid(),
17618
+ serviceAccountId: zod_12.z.uuid(),
17619
+ org: zod_12.z.string().min(1).max(255),
17620
+ callerKind: zod_12.z.literal("human"),
17621
+ callerSub: zod_12.z.string().min(1).max(512).regex(/^[^\s:#|]+\|[^\s:#]+$/).refine((sub) => !sub.startsWith("service-account|") && !sub.startsWith("managed-function|") && !sub.startsWith("system|") && !sub.endsWith("@clients") && sub !== "google-apps|sequence.agent@seqholdings.com", "Only actual human callers may read Abrigo"),
17622
+ callerAuthenticationMethod: zod_12.z.string().min(1).max(64),
17623
+ exp: zod_12.z.number().int().positive().max(Number.MAX_SAFE_INTEGER)
17624
+ });
17625
+ function credential({ request }) {
17626
+ const invalid = () => new abrigo_contract_1.FunctionAbrigoReadError(401, "invalid_context", "This invocation has no valid caller Abrigo read credential");
17627
+ const headers = request.headers;
17628
+ const matches = typeof headers.get === "function" ? [headers.get(abrigo_contract_1.FUNCTION_ABRIGO_READ_TOKEN_HEADER)] : Object.entries(headers).filter(([name]) => name.toLowerCase() === abrigo_contract_1.FUNCTION_ABRIGO_READ_TOKEN_HEADER).map(([, value2]) => value2);
17629
+ const token = matches[0];
17630
+ if (matches.length !== 1 || typeof token !== "string" || token.length > 16384)
17631
+ throw invalid();
17632
+ const envelope = /^([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]{43})$/.exec(token);
17633
+ if (!envelope?.[1])
17634
+ throw invalid();
17635
+ let value;
17636
+ try {
17637
+ const decoded = Buffer.from(envelope[1], "base64url");
17638
+ if (decoded.toString("base64url") !== envelope[1])
17639
+ throw invalid();
17640
+ value = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(decoded));
17641
+ } catch {
17642
+ throw invalid();
17643
+ }
17644
+ const parsed = claimsSchema.safeParse(value);
17645
+ if (!parsed.success)
17646
+ throw invalid();
17647
+ return { token, expiresAt: parsed.data.exp };
17648
+ }
17649
+ function origin(baseUrl) {
17650
+ const invalid = () => new abrigo_contract_1.FunctionAbrigoReadError(400, "invalid_configuration", "Configure a trusted HTTPS Atlas origin without credentials, path, query or fragment");
17651
+ let url;
17652
+ try {
17653
+ url = new URL(baseUrl);
17654
+ } catch {
17655
+ throw invalid();
17656
+ }
17657
+ const loopback = url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname);
17658
+ if (!loopback && url.protocol !== "https:" || url.username || url.password || url.pathname !== "/" || url.search || url.hash)
17659
+ throw invalid();
17660
+ return url.origin;
17661
+ }
17662
+ function validJson(value, depth = 0) {
17663
+ if (depth > 64)
17664
+ return false;
17665
+ if (value === null || typeof value === "string" || typeof value === "boolean")
17666
+ return true;
17667
+ if (typeof value === "number")
17668
+ return Number.isFinite(value) && (!Number.isInteger(value) || Number.isSafeInteger(value));
17669
+ if (Array.isArray(value))
17670
+ return value.every((item) => validJson(item, depth + 1));
17671
+ return typeof value === "object" && Object.values(value).every((item) => validJson(item, depth + 1));
17672
+ }
17673
+ async function boundedBody(response) {
17674
+ const oversized = () => new abrigo_contract_1.FunctionAbrigoReadError(502, "response_too_large", "Abrigo read exceeded the bounded response size; reduce perPage");
17675
+ const length = response.headers.get("content-length");
17676
+ if (length && /^\d+$/.test(length) && Number(length) > abrigo_contract_1.ABRIGO_READ_MAX_RESPONSE_BYTES) {
17677
+ await response.body?.cancel().catch(() => {
17678
+ });
17679
+ throw oversized();
17680
+ }
17681
+ if (!response.body)
17682
+ throw new abrigo_contract_1.FunctionAbrigoReadError(502, "malformed_response", "Atlas returned invalid Abrigo JSON");
17683
+ const reader = response.body.getReader();
17684
+ const chunks = [];
17685
+ let bytes = 0;
17686
+ try {
17687
+ for (; ; ) {
17688
+ const chunk = await reader.read();
17689
+ if (chunk.done)
17690
+ break;
17691
+ bytes += chunk.value.byteLength;
17692
+ if (bytes > abrigo_contract_1.ABRIGO_READ_MAX_RESPONSE_BYTES) {
17693
+ await reader.cancel().catch(() => {
17694
+ });
17695
+ throw oversized();
17696
+ }
17697
+ chunks.push(chunk.value);
17698
+ }
17699
+ } finally {
17700
+ reader.releaseLock();
17701
+ }
17702
+ try {
17703
+ return JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(Buffer.concat(chunks, bytes)));
17704
+ } catch {
17705
+ throw new abrigo_contract_1.FunctionAbrigoReadError(502, "malformed_response", "Atlas returned invalid Abrigo JSON");
17706
+ }
17707
+ }
17708
+ function createFunctionCallerAbrigoClient({ request, baseUrl, fetchImpl = globalThis.fetch }) {
17709
+ const url = `${origin(baseUrl)}${abrigo_contract_1.FUNCTION_ABRIGO_READ_PATH}`;
17710
+ const { token, expiresAt } = credential({ request });
17711
+ return {
17712
+ async read(input) {
17713
+ if (expiresAt <= Date.now() / 1e3)
17714
+ throw new abrigo_contract_1.FunctionAbrigoReadError(401, "expired_context", "The Abrigo read credential expired; start a new invocation");
17715
+ const query = abrigo_contract_1.functionAbrigoReadRequestSchema.safeParse(input);
17716
+ if (!query.success)
17717
+ throw new abrigo_contract_1.FunctionAbrigoReadError(400, "invalid_request", "Invalid bounded Abrigo read request");
17718
+ try {
17719
+ const response = await fetchImpl(url, { method: "POST", headers: { "content-type": "application/json", [abrigo_contract_1.FUNCTION_ABRIGO_READ_TOKEN_HEADER]: token }, body: JSON.stringify(query.data), redirect: "error", signal: AbortSignal.timeout(abrigo_contract_1.ABRIGO_READ_TIMEOUT_MS) });
17720
+ const body = await boundedBody(response).catch((error) => {
17721
+ if (!response.ok && error instanceof abrigo_contract_1.FunctionAbrigoReadError && error.code === "malformed_response")
17722
+ return null;
17723
+ throw error;
17724
+ });
17725
+ if (!response.ok) {
17726
+ const error = zod_12.z.object({ code: zod_12.z.string().max(128).regex(/^[a-z][a-z0-9_]*$/).optional() }).safeParse(body);
17727
+ throw new abrigo_contract_1.FunctionAbrigoReadError(response.status, error.success ? error.data.code ?? "abrigo_read_failed" : "abrigo_read_failed", "The authorized Abrigo read failed");
17728
+ }
17729
+ if (!validJson(body))
17730
+ throw new abrigo_contract_1.FunctionAbrigoReadError(502, "malformed_response", "Atlas returned invalid Abrigo JSON");
17731
+ (0, abrigo_response_1.validateAbrigoReviewResponse)({ query: query.data, body });
17732
+ return body;
17733
+ } catch (error) {
17734
+ if (error instanceof abrigo_contract_1.FunctionAbrigoReadError)
17735
+ throw error;
17736
+ throw new abrigo_contract_1.FunctionAbrigoReadError(503, "abrigo_read_unavailable", "The authorized Abrigo read could not be completed");
17737
+ }
17738
+ }
17739
+ };
17740
+ }
17741
+ }
17742
+ });
17743
+
17744
+ // dist/invocation.js
17745
+ var require_invocation = __commonJS({
17746
+ "dist/invocation.js"(exports2) {
17747
+ "use strict";
17748
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
17749
+ if (k2 === void 0) k2 = k;
17750
+ var desc = Object.getOwnPropertyDescriptor(m2, k);
17751
+ if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
17752
+ desc = { enumerable: true, get: function() {
17753
+ return m2[k];
17754
+ } };
17755
+ }
17756
+ Object.defineProperty(o, k2, desc);
17757
+ }) : (function(o, m2, k, k2) {
17758
+ if (k2 === void 0) k2 = k;
17759
+ o[k2] = m2[k];
17760
+ }));
17761
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
17762
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
17763
+ };
17764
+ Object.defineProperty(exports2, "__esModule", { value: true });
17765
+ exports2.createFunctionInvocationClient = createFunctionInvocationClient;
17766
+ var zod_12 = require_zod();
17767
+ var invocation_contract_1 = require_invocation_contract();
17768
+ __exportStar2(require_invocation_contract(), exports2);
17769
+ var identifier = zod_12.z.string().min(1).max(255);
17770
+ var principal = zod_12.z.string().min(1).max(512);
17771
+ var tokenClaimsSchema = zod_12.z.strictObject({
17772
+ audience: zod_12.z.literal("atlas-managed-function-invocation-identity"),
17773
+ environment: zod_12.z.string().min(1).max(4096),
17774
+ functionId: identifier,
17775
+ versionId: identifier,
17776
+ invocationId: identifier,
17777
+ serviceAccountId: identifier,
17778
+ org: identifier,
17779
+ callerKind: zod_12.z.enum(["human", "service_account", "system"]),
17780
+ callerSub: principal,
17781
+ callerAuthenticationMethod: identifier,
17782
+ exp: zod_12.z.number().int().positive().max(Number.MAX_SAFE_INTEGER)
17783
+ });
17784
+ var errorSchema = zod_12.z.strictObject({
17785
+ code: zod_12.z.string().min(1).max(128).regex(/^[a-z][a-z0-9_]*$/),
17786
+ detail: zod_12.z.string().min(1).max(2e3)
17787
+ });
17788
+ var invalidContext = () => new invocation_contract_1.FunctionInvocationContextError(401, "invalid_context", "This invocation has no valid identity credential");
17789
+ function readCredential({ request }) {
17790
+ const { headers } = request;
17791
+ const matches = typeof headers.get === "function" ? [headers.get(invocation_contract_1.FUNCTION_INVOCATION_IDENTITY_TOKEN_HEADER)] : Object.entries(headers).filter(([name]) => name.toLowerCase() === invocation_contract_1.FUNCTION_INVOCATION_IDENTITY_TOKEN_HEADER).map(([, value2]) => value2);
17792
+ const token = matches[0];
17793
+ if (matches.length !== 1 || typeof token !== "string" || token.length > 16384)
17794
+ throw invalidContext();
17795
+ const envelope = /^([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]{43})$/.exec(token);
17796
+ if (!envelope?.[1])
17797
+ throw invalidContext();
17798
+ let value;
17799
+ try {
17800
+ const decoded = Buffer.from(envelope[1], "base64url");
17801
+ if (decoded.toString("base64url") !== envelope[1])
17802
+ throw invalidContext();
17803
+ value = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(decoded));
17804
+ } catch {
17805
+ throw invalidContext();
17806
+ }
17807
+ const parsed = tokenClaimsSchema.safeParse(value);
17808
+ if (!parsed.success)
17809
+ throw invalidContext();
17810
+ return { token, claims: parsed.data };
17811
+ }
17812
+ function trustedOrigin(baseUrl) {
17813
+ const invalid = () => new invocation_contract_1.FunctionInvocationContextError(400, "invalid_configuration", "Configure a trusted HTTPS Atlas origin without credentials, path, query or fragment");
17814
+ let url;
17815
+ try {
17816
+ url = new URL(baseUrl);
17817
+ } catch {
17818
+ throw invalid();
17819
+ }
17820
+ const loopback = url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname);
17821
+ if (!loopback && url.protocol !== "https:" || url.username || url.password || url.pathname !== "/" || url.search || url.hash)
17822
+ throw invalid();
17823
+ return url.origin;
17824
+ }
17825
+ function requireFresh(claims) {
17826
+ if (claims.exp <= Date.now() / 1e3)
17827
+ throw new invocation_contract_1.FunctionInvocationContextError(401, "expired_context", "The identity credential expired; start a new invocation");
17828
+ }
17829
+ function matchesInvocation({ context: context2, claims }) {
17830
+ const { receiver, caller } = context2;
17831
+ return receiver.functionId === claims.functionId && receiver.versionId === claims.versionId && receiver.invocationId === claims.invocationId && receiver.orgId === claims.org && receiver.serviceAccountId === claims.serviceAccountId && caller.kind === claims.callerKind && caller.sub === claims.callerSub;
17832
+ }
17833
+ function createFunctionInvocationClient({ request, baseUrl, fetchImpl = globalThis.fetch }) {
17834
+ const url = `${trustedOrigin(baseUrl)}${invocation_contract_1.FUNCTION_INVOCATION_CONTEXT_PATH}`;
17835
+ const { token, claims } = readCredential({ request });
17836
+ return {
17837
+ async getInvocationContext() {
17838
+ requireFresh(claims);
17839
+ let response;
17840
+ try {
17841
+ response = await fetchImpl(url, {
17842
+ method: "POST",
17843
+ headers: {
17844
+ "content-type": "application/json",
17845
+ [invocation_contract_1.FUNCTION_INVOCATION_IDENTITY_TOKEN_HEADER]: token
17846
+ },
17847
+ body: JSON.stringify(invocation_contract_1.functionInvocationContextRequestSchema.parse({ operation: "getInvocationContext" })),
17848
+ redirect: "error",
17849
+ signal: AbortSignal.timeout(3e4)
17850
+ });
17851
+ } catch {
17852
+ throw new invocation_contract_1.FunctionInvocationContextError(502, "context_request_failed", "The invocation context request failed");
17853
+ }
17854
+ if (response.redirected || response.status >= 300 && response.status < 400)
17855
+ throw new invocation_contract_1.FunctionInvocationContextError(502, "redirect_refused", "The invocation context request must not redirect");
17856
+ const result = await response.json().catch(() => null);
17857
+ if (!response.ok) {
17858
+ const error = errorSchema.safeParse(result);
17859
+ throw new invocation_contract_1.FunctionInvocationContextError(response.status, error.success ? error.data.code : "context_read_failed", error.success && !error.data.detail.includes(token) ? error.data.detail : "Invocation context read failed");
17860
+ }
17861
+ requireFresh(claims);
17862
+ const parsed = invocation_contract_1.functionInvocationContextSchema.safeParse(result);
17863
+ if (!parsed.success || !matchesInvocation({ context: parsed.data, claims }))
17864
+ throw new invocation_contract_1.FunctionInvocationContextError(502, "malformed_response", "Atlas returned an invalid invocation context response");
17865
+ return parsed.data;
17866
+ }
17867
+ };
17868
+ }
17869
+ }
17870
+ });
17871
+
17082
17872
  // dist/processes-contract.js
17083
17873
  var require_processes_contract = __commonJS({
17084
17874
  "dist/processes-contract.js"(exports2) {
17085
17875
  "use strict";
17086
17876
  Object.defineProperty(exports2, "__esModule", { value: true });
17087
- exports2.FunctionProcessReadError = exports2.functionProcessReadRequestSchema = exports2.functionProcessRunsPageSchema = exports2.functionProcessRunsPageQuerySchema = exports2.functionProcessRunQuerySchema = exports2.functionProcessRunSummarySchema = exports2.functionProcessRunStatusSchema = exports2.functionProcessReadScopesSchema = exports2.FUNCTION_PROCESS_READ_PATH = exports2.FUNCTION_PROCESS_TOKEN_HEADER = void 0;
17877
+ exports2.FunctionProcessReadError = exports2.functionProcessReadRequestSchema = exports2.functionProcessRunsPageSchema = exports2.functionProcessCompletedAgentReferenceSchema = exports2.functionProcessCompletedAgentReferenceQuerySchema = exports2.functionProcessRunsPageQuerySchema = exports2.functionProcessRunQuerySchema = exports2.functionProcessRunSummarySchema = exports2.functionProcessRunStatusSchema = exports2.functionProcessReadScopesSchema = exports2.FUNCTION_PROCESS_READ_PATH = exports2.FUNCTION_PROCESS_TOKEN_HEADER = void 0;
17088
17878
  exports2.readFunctionProcessScopes = readFunctionProcessScopes;
17089
17879
  var zod_12 = require_zod();
17090
17880
  exports2.FUNCTION_PROCESS_TOKEN_HEADER = "x-sequence-process-service-token";
@@ -17138,12 +17928,22 @@ var require_processes_contract = __commonJS({
17138
17928
  cursor: zod_12.z.string().min(1).max(8192).optional(),
17139
17929
  archived: zod_12.z.boolean().optional()
17140
17930
  });
17931
+ exports2.functionProcessCompletedAgentReferenceQuerySchema = exports2.functionProcessRunQuerySchema.extend({ nodeId: entityId });
17932
+ exports2.functionProcessCompletedAgentReferenceSchema = zod_12.z.strictObject({
17933
+ stepId: entityId,
17934
+ attempt: zod_12.z.number().int().positive().max(Number.MAX_SAFE_INTEGER),
17935
+ agentId: entityId,
17936
+ agentRunId: entityId,
17937
+ threadId: entityId,
17938
+ recoveryProof: zod_12.z.string().min(1).max(16384)
17939
+ });
17141
17940
  exports2.functionProcessRunsPageSchema = zod_12.z.object({
17142
17941
  runs: zod_12.z.array(exports2.functionProcessRunSummarySchema).max(500),
17143
17942
  nextCursor: zod_12.z.string().nullable()
17144
17943
  });
17145
17944
  exports2.functionProcessReadRequestSchema = zod_12.z.discriminatedUnion("operation", [
17146
17945
  exports2.functionProcessRunQuerySchema.extend({ operation: zod_12.z.literal("getRun") }),
17946
+ exports2.functionProcessCompletedAgentReferenceQuerySchema.extend({ operation: zod_12.z.literal("getCompletedAgentReference") }),
17147
17947
  exports2.functionProcessRunsPageQuerySchema.extend({
17148
17948
  operation: zod_12.z.literal("listRunsPage")
17149
17949
  })
@@ -17162,11 +17962,83 @@ var require_processes_contract = __commonJS({
17162
17962
  }
17163
17963
  });
17164
17964
 
17965
+ // dist/agents-contract.js
17966
+ var require_agents_contract = __commonJS({
17967
+ "dist/agents-contract.js"(exports2) {
17968
+ "use strict";
17969
+ Object.defineProperty(exports2, "__esModule", { value: true });
17970
+ exports2.FunctionAgentReadError = exports2.functionAgentCompletedRunSchema = exports2.functionAgentMessageSchema = exports2.functionAgentReadRequestSchema = exports2.functionAgentCompletedRunQuerySchema = exports2.functionAgentReadScopesSchema = exports2.functionAgentEvidenceScopesSchema = exports2.FUNCTION_AGENT_CAPTURE_PATH = exports2.FUNCTION_AGENT_READ_PATH = exports2.FUNCTION_AGENT_TOKEN_HEADER = void 0;
17971
+ exports2.readFunctionAgentScopes = readFunctionAgentScopes;
17972
+ var zod_12 = require_zod();
17973
+ exports2.FUNCTION_AGENT_TOKEN_HEADER = "x-sequence-agent-service-token";
17974
+ exports2.FUNCTION_AGENT_READ_PATH = "/api/managed-functions/agents/read";
17975
+ exports2.FUNCTION_AGENT_CAPTURE_PATH = "/api/managed-functions/agents/capture";
17976
+ var resourceId = zod_12.z.string().min(1).max(255).regex(/^[A-Za-z0-9._-]+$/);
17977
+ exports2.functionAgentEvidenceScopesSchema = zod_12.z.array(resourceId).min(1).max(64).refine((ids) => new Set(ids).size === ids.length, "Agent evidence ids must be distinct").refine((ids) => ids.reduce((bytes, id) => bytes + id.length, 0) <= 8192, "Agent evidence ids must fit within 8192 bytes");
17978
+ exports2.functionAgentReadScopesSchema = zod_12.z.strictObject({
17979
+ read: zod_12.z.array(resourceId).min(1).max(64).refine((ids) => new Set(ids).size === ids.length, "Agent ids must be distinct").refine((ids) => ids.reduce((bytes, id) => bytes + id.length, 0) <= 8192, "Agent ids must fit within 8192 bytes").optional(),
17980
+ evidence: exports2.functionAgentEvidenceScopesSchema.optional()
17981
+ }).refine((value) => value.read !== void 0 || value.evidence !== void 0, "Declare agent reads or evidence verification");
17982
+ function readFunctionAgentScopes(manifest) {
17983
+ if (typeof manifest !== "object" || manifest === null)
17984
+ return [];
17985
+ const capabilities = Reflect.get(manifest, "capabilities");
17986
+ if (typeof capabilities !== "object" || capabilities === null)
17987
+ return [];
17988
+ const agents = Reflect.get(capabilities, "agents");
17989
+ if (agents === void 0)
17990
+ return [];
17991
+ return exports2.functionAgentReadScopesSchema.parse(agents).read ?? [];
17992
+ }
17993
+ exports2.functionAgentCompletedRunQuerySchema = zod_12.z.strictObject({ agent: resourceId, runId: resourceId, recoveryProof: zod_12.z.string().min(1).max(16384).optional() });
17994
+ exports2.functionAgentReadRequestSchema = exports2.functionAgentCompletedRunQuerySchema.extend({ operation: zod_12.z.literal("getCompletedRun") });
17995
+ exports2.functionAgentMessageSchema = zod_12.z.strictObject({
17996
+ id: zod_12.z.string().min(1).max(255),
17997
+ role: zod_12.z.literal("assistant"),
17998
+ parts: zod_12.z.array(zod_12.z.union([
17999
+ zod_12.z.strictObject({ type: zod_12.z.literal("text"), text: zod_12.z.string() }),
18000
+ zod_12.z.strictObject({ type: zod_12.z.literal("dynamic-tool"), output: zod_12.z.strictObject({ content: zod_12.z.array(zod_12.z.strictObject({ type: zod_12.z.literal("resource"), resource: zod_12.z.strictObject({ uri: zod_12.z.string().startsWith("citation://"), text: zod_12.z.string() }) })).max(1e3) }) })
18001
+ ])).max(1e3),
18002
+ metadata: zod_12.z.strictObject({ citations: zod_12.z.array(zod_12.z.json()).max(1e3) }).optional()
18003
+ });
18004
+ exports2.functionAgentCompletedRunSchema = zod_12.z.strictObject({
18005
+ runId: resourceId,
18006
+ agent: resourceId,
18007
+ threadId: resourceId,
18008
+ status: zod_12.z.literal("completed"),
18009
+ output: zod_12.z.json(),
18010
+ messages: zod_12.z.array(exports2.functionAgentMessageSchema).max(1e3),
18011
+ conversation: zod_12.z.strictObject({
18012
+ messageCount: zod_12.z.number().int().min(0).max(1e3),
18013
+ userMessageCount: zod_12.z.number().int().min(0).max(1e3),
18014
+ assistantMessageCount: zod_12.z.number().int().min(0).max(1e3),
18015
+ messages: zod_12.z.array(zod_12.z.strictObject({
18016
+ id: zod_12.z.string().min(1).max(255),
18017
+ role: zod_12.z.enum(["user", "assistant"]),
18018
+ textParts: zod_12.z.array(zod_12.z.string()).max(1e3),
18019
+ tools: zod_12.z.array(zod_12.z.strictObject({ partType: zod_12.z.string().min(1).max(255), toolName: zod_12.z.string().max(255).nullable(), state: zod_12.z.string().max(255).nullable(), outputTruthy: zod_12.z.boolean() })).max(1e3)
18020
+ })).max(1e3)
18021
+ }).optional()
18022
+ });
18023
+ var FunctionAgentReadError = class extends Error {
18024
+ status;
18025
+ code;
18026
+ name = "FunctionAgentReadError";
18027
+ constructor(status, code, message) {
18028
+ super(message);
18029
+ this.status = status;
18030
+ this.code = code;
18031
+ }
18032
+ };
18033
+ exports2.FunctionAgentReadError = FunctionAgentReadError;
18034
+ }
18035
+ });
18036
+
17165
18037
  // dist/processes.js
17166
18038
  var require_processes = __commonJS({
17167
18039
  "dist/processes.js"(exports2) {
17168
18040
  "use strict";
17169
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
18041
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
17170
18042
  if (k2 === void 0) k2 = k;
17171
18043
  var desc = Object.getOwnPropertyDescriptor(m2, k);
17172
18044
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -17179,15 +18051,37 @@ var require_processes = __commonJS({
17179
18051
  if (k2 === void 0) k2 = k;
17180
18052
  o[k2] = m2[k];
17181
18053
  }));
17182
- var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
17183
- for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
18054
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
18055
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
17184
18056
  };
17185
18057
  Object.defineProperty(exports2, "__esModule", { value: true });
17186
18058
  exports2.createFunctionServiceProcessesClient = createFunctionServiceProcessesClient;
17187
18059
  var zod_12 = require_zod();
17188
18060
  var processes_contract_1 = require_processes_contract();
17189
18061
  var invocation_client_1 = require_invocation_client();
17190
- __exportStar(require_processes_contract(), exports2);
18062
+ var agents_contract_1 = require_agents_contract();
18063
+ __exportStar2(require_processes_contract(), exports2);
18064
+ function readAgentCredential({ request }) {
18065
+ const { headers } = request;
18066
+ const matches = typeof headers.get === "function" ? [headers.get(agents_contract_1.FUNCTION_AGENT_TOKEN_HEADER)] : Object.entries(headers).filter(([name]) => name.toLowerCase() === agents_contract_1.FUNCTION_AGENT_TOKEN_HEADER).map(([, value2]) => value2);
18067
+ const token = matches[0];
18068
+ const denied = () => new processes_contract_1.FunctionProcessReadError(401, "invalid_context", "Completed-agent reference lookup requires an agent-read credential");
18069
+ if (matches.length !== 1 || typeof token !== "string" || token.length > 16384)
18070
+ throw denied();
18071
+ const body = /^([A-Za-z0-9_-]+)\.[A-Za-z0-9_-]{43}$/.exec(token)?.[1];
18072
+ if (!body)
18073
+ throw denied();
18074
+ let value;
18075
+ try {
18076
+ value = JSON.parse(Buffer.from(body, "base64url").toString("utf8"));
18077
+ } catch {
18078
+ throw denied();
18079
+ }
18080
+ const claims = zod_12.z.object({ audience: zod_12.z.literal("atlas-managed-function-agent-read"), sub: zod_12.z.string().startsWith("service-account|"), functionId: zod_12.z.string().min(1), invocationId: zod_12.z.string().min(1), exp: zod_12.z.number().int() }).safeParse(value);
18081
+ if (!claims.success)
18082
+ throw denied();
18083
+ return { token, expiresAt: claims.data.exp };
18084
+ }
17191
18085
  var invalidContext = () => new processes_contract_1.FunctionProcessReadError(401, "invalid_context", "This invocation has no valid process-read credential");
17192
18086
  function createFunctionServiceProcessesClient({ request, baseUrl, fetchImpl = globalThis.fetch }) {
17193
18087
  const credential = (0, invocation_client_1.readInvocationCredential)({
@@ -17215,6 +18109,21 @@ var require_processes = __commonJS({
17215
18109
  });
17216
18110
  const read = ({ body, schema }) => transport({ body: processes_contract_1.functionProcessReadRequestSchema.parse(body), schema });
17217
18111
  return {
18112
+ async getCompletedAgentReference(query) {
18113
+ const agent = readAgentCredential({ request });
18114
+ const readReference = (0, invocation_client_1.createInvocationReadTransport)({
18115
+ baseUrl,
18116
+ fetchImpl,
18117
+ path: processes_contract_1.FUNCTION_PROCESS_READ_PATH,
18118
+ header: processes_contract_1.FUNCTION_PROCESS_TOKEN_HEADER,
18119
+ credential,
18120
+ additionalCredentials: [{ header: agents_contract_1.FUNCTION_AGENT_TOKEN_HEADER, credential: agent }],
18121
+ timeoutMs: 3e4,
18122
+ error: (status, code, message) => new processes_contract_1.FunctionProcessReadError(status, code, message),
18123
+ failure: { code: "process_read_failed", message: "Process read failed" }
18124
+ });
18125
+ return readReference({ body: processes_contract_1.functionProcessReadRequestSchema.parse({ ...query, operation: "getCompletedAgentReference" }), schema: processes_contract_1.functionProcessCompletedAgentReferenceSchema });
18126
+ },
17218
18127
  async getRun(query) {
17219
18128
  const run = await read({
17220
18129
  body: { ...query, operation: "getRun" },
@@ -17238,6 +18147,906 @@ var require_processes = __commonJS({
17238
18147
  }
17239
18148
  });
17240
18149
 
18150
+ // dist/agent-source-evidence-contract.js
18151
+ var require_agent_source_evidence_contract = __commonJS({
18152
+ "dist/agent-source-evidence-contract.js"(exports2) {
18153
+ "use strict";
18154
+ Object.defineProperty(exports2, "__esModule", { value: true });
18155
+ exports2.functionAgentSourceEvidenceVerificationSchema = exports2.functionAgentSourceEvidenceRequestSchema = exports2.functionAgentSourceEvidenceClaimsSchema = exports2.functionAgentHumanConversationEvidenceClaimsSchema = exports2.functionAgentRunSourceEvidenceClaimsSchema = exports2.functionAgentManagedFunctionSourceEvidenceClaimsSchema = exports2.functionAgentHumanSourceEvidenceClaimsSchema = exports2.functionAgentConversationEvidenceRequestSchema = exports2.functionAgentConversationEvidenceQuerySchema = exports2.functionAgentConversationEvidenceCaptureSchema = exports2.functionAgentConversationEvidenceResponseSchema = exports2.functionAgentSourceEvidenceCaptureSchema = exports2.functionAgentSourceResponseSchema = exports2.functionAgentConversationResponseSchema = exports2.functionAgentSourceExecutionSchema = exports2.functionSourceJobAdmissionSchema = exports2.AGENT_SOURCE_VERIFY_MAX_BYTES = exports2.AGENT_SOURCE_RESPONSE_MAX_BYTES = exports2.FUNCTION_AGENT_EVIDENCE_PATH = exports2.FUNCTION_AGENT_EVIDENCE_TOKEN_HEADER = exports2.functionAgentEvidenceScopesSchema = void 0;
18156
+ exports2.readFunctionAgentEvidenceScopes = readFunctionAgentEvidenceScopes;
18157
+ var zod_12 = require_zod();
18158
+ var agents_contract_1 = require_agents_contract();
18159
+ var agents_contract_2 = require_agents_contract();
18160
+ Object.defineProperty(exports2, "functionAgentEvidenceScopesSchema", { enumerable: true, get: function() {
18161
+ return agents_contract_2.functionAgentEvidenceScopesSchema;
18162
+ } });
18163
+ exports2.FUNCTION_AGENT_EVIDENCE_TOKEN_HEADER = "x-sequence-agent-evidence-token";
18164
+ exports2.FUNCTION_AGENT_EVIDENCE_PATH = "/api/managed-functions/agents/evidence";
18165
+ exports2.AGENT_SOURCE_RESPONSE_MAX_BYTES = 512 * 1024;
18166
+ exports2.AGENT_SOURCE_VERIFY_MAX_BYTES = 768 * 1024;
18167
+ var identifier = zod_12.z.string().min(1).max(255);
18168
+ var hash = zod_12.z.string().regex(/^[a-f0-9]{64}$/);
18169
+ exports2.functionSourceJobAdmissionSchema = zod_12.z.strictObject({
18170
+ idempotencyKey: zod_12.z.string().min(1).max(128).regex(/^[\x21-\x7e]+$/),
18171
+ requestHash: hash,
18172
+ kind: zod_12.z.enum(["agent", "workflow"]),
18173
+ resourceId: identifier,
18174
+ actorSub: zod_12.z.string().min(1).max(512),
18175
+ runId: identifier,
18176
+ executionSnapshotId: zod_12.z.uuid()
18177
+ });
18178
+ exports2.functionAgentSourceExecutionSchema = zod_12.z.strictObject({
18179
+ run: zod_12.z.strictObject({ id: identifier, processId: identifier, processVersion: identifier, bundleHash: identifier, entity: zod_12.z.strictObject({ type: identifier, id: identifier }).nullable() }),
18180
+ step: zod_12.z.strictObject({ id: identifier, nodeId: identifier, attempt: zod_12.z.number().int().positive() }),
18181
+ agent: zod_12.z.strictObject({ id: identifier, runId: identifier, threadId: identifier, identity: zod_12.z.strictObject({ id: identifier, version: identifier, definitionSha256: hash }) })
18182
+ }).refine((source) => source.agent.id === source.agent.identity.id, "The source agent must match its private execution identity");
18183
+ function readFunctionAgentEvidenceScopes(manifest) {
18184
+ if (typeof manifest !== "object" || manifest === null)
18185
+ return [];
18186
+ const capabilities = Reflect.get(manifest, "capabilities");
18187
+ if (typeof capabilities !== "object" || capabilities === null)
18188
+ return [];
18189
+ const agents = Reflect.get(capabilities, "agents");
18190
+ if (typeof agents !== "object" || agents === null)
18191
+ return [];
18192
+ const evidence = Reflect.get(agents, "evidence");
18193
+ return evidence === void 0 ? [] : agents_contract_1.functionAgentEvidenceScopesSchema.parse(evidence);
18194
+ }
18195
+ var textPart = zod_12.z.strictObject({ type: zod_12.z.literal("text"), text: zod_12.z.string() });
18196
+ var toolPart = zod_12.z.strictObject({
18197
+ type: zod_12.z.string().min(1).max(255).refine((type) => type !== "tool-result" && (type === "dynamic-tool" || type === "tool-invocation" || type.startsWith("tool-")), "Only tool parts are permitted"),
18198
+ toolName: zod_12.z.string().max(255).optional(),
18199
+ name: zod_12.z.string().max(255).optional(),
18200
+ toolCallId: identifier.optional(),
18201
+ state: zod_12.z.string().max(255).optional(),
18202
+ input: zod_12.z.json().optional(),
18203
+ output: zod_12.z.json().optional()
18204
+ });
18205
+ exports2.functionAgentConversationResponseSchema = agents_contract_1.functionAgentCompletedRunSchema.extend({
18206
+ context: zod_12.z.strictObject({
18207
+ messages: zod_12.z.array(zod_12.z.strictObject({ id: identifier, role: zod_12.z.enum(["user", "assistant"]), parts: zod_12.z.array(zod_12.z.union([textPart, toolPart])).max(1e3), metadata: zod_12.z.strictObject({ citations: zod_12.z.array(zod_12.z.json()).max(1e3) }).optional() })).max(1e3),
18208
+ compactionSummary: zod_12.z.string().nullable()
18209
+ })
18210
+ });
18211
+ exports2.functionAgentSourceResponseSchema = zod_12.z.union([agents_contract_1.functionAgentCompletedRunSchema, exports2.functionAgentConversationResponseSchema]);
18212
+ exports2.functionAgentSourceEvidenceCaptureSchema = zod_12.z.strictObject({ response: exports2.functionAgentSourceResponseSchema, responseHash: hash, sourceReceipt: zod_12.z.string().min(1).max(16384) });
18213
+ var conversationRevision = zod_12.z.number().int().min(1).max(Number.MAX_SAFE_INTEGER);
18214
+ exports2.functionAgentConversationEvidenceResponseSchema = zod_12.z.strictObject({
18215
+ agent: identifier,
18216
+ threadId: identifier,
18217
+ revision: conversationRevision,
18218
+ cutoffAt: zod_12.z.iso.datetime({ offset: true }),
18219
+ context: exports2.functionAgentConversationResponseSchema.shape.context.extend({ compactionSummary: zod_12.z.null() }),
18220
+ conversation: agents_contract_1.functionAgentCompletedRunSchema.shape.conversation.unwrap()
18221
+ });
18222
+ exports2.functionAgentConversationEvidenceCaptureSchema = zod_12.z.strictObject({ response: exports2.functionAgentConversationEvidenceResponseSchema, responseHash: hash, sourceReceipt: zod_12.z.string().min(1).max(16384) });
18223
+ exports2.functionAgentConversationEvidenceQuerySchema = zod_12.z.strictObject({ agent: identifier, threadId: identifier });
18224
+ exports2.functionAgentConversationEvidenceRequestSchema = exports2.functionAgentConversationEvidenceQuerySchema.extend({ operation: zod_12.z.literal("verifyConversationEvidence"), response: exports2.functionAgentConversationEvidenceResponseSchema, responseHash: hash, sourceReceipt: zod_12.z.string().min(1).max(16384) });
18225
+ var sourceEvidenceFields = {
18226
+ environment: zod_12.z.string(),
18227
+ org: identifier,
18228
+ agentId: identifier,
18229
+ runId: identifier,
18230
+ threadId: identifier,
18231
+ familyRunIds: zod_12.z.array(identifier).min(1).max(16),
18232
+ cutoffAt: zod_12.z.iso.datetime({ offset: true }),
18233
+ responseHash: hash,
18234
+ sourceExecution: exports2.functionAgentSourceExecutionSchema.nullable(),
18235
+ jobAdmission: exports2.functionSourceJobAdmissionSchema.nullable()
18236
+ };
18237
+ exports2.functionAgentHumanSourceEvidenceClaimsSchema = zod_12.z.strictObject({
18238
+ ...sourceEvidenceFields,
18239
+ sourceKind: zod_12.z.literal("human"),
18240
+ audience: zod_12.z.literal("atlas-agent-source-evidence"),
18241
+ actualUserSub: zod_12.z.string().min(1).max(512).refine((sub) => !sub.startsWith("service-account|"), "Human source evidence requires a user principal"),
18242
+ projection: zod_12.z.enum(["completed-v1", "conversation-v1"])
18243
+ });
18244
+ exports2.functionAgentManagedFunctionSourceEvidenceClaimsSchema = zod_12.z.strictObject({
18245
+ ...sourceEvidenceFields,
18246
+ sourceKind: zod_12.z.literal("managed_function"),
18247
+ audience: zod_12.z.literal("atlas-managed-function-source-evidence"),
18248
+ actualServiceAccountSub: zod_12.z.string().min(1).max(512),
18249
+ projection: zod_12.z.literal("completed-v1"),
18250
+ sourceReceiver: zod_12.z.strictObject({ functionId: zod_12.z.uuid(), versionId: zod_12.z.uuid(), invocationId: zod_12.z.uuid(), serviceAccountId: zod_12.z.uuid(), org: identifier })
18251
+ }).refine((source) => source.actualServiceAccountSub === `service-account|${source.sourceReceiver.serviceAccountId}` && source.org === source.sourceReceiver.org, "The service source must match its actual invocation identity");
18252
+ exports2.functionAgentRunSourceEvidenceClaimsSchema = zod_12.z.discriminatedUnion("sourceKind", [exports2.functionAgentHumanSourceEvidenceClaimsSchema, exports2.functionAgentManagedFunctionSourceEvidenceClaimsSchema]).refine((source) => source.familyRunIds.includes(source.runId) && new Set(source.familyRunIds).size === source.familyRunIds.length, "The source family must contain its run and be distinct").refine((source) => source.sourceExecution === null || source.sourceExecution.agent.id === source.agentId && source.sourceExecution.agent.runId === source.runId && source.sourceExecution.agent.threadId === source.threadId, "The execution origin must match the captured source").refine((source) => source.jobAdmission === null || source.jobAdmission.kind === "agent" && source.jobAdmission.runId === source.runId && source.jobAdmission.resourceId === source.agentId && (source.sourceKind === "human" || source.jobAdmission.actorSub === source.actualServiceAccountSub), "The job admission must match the captured source");
18253
+ exports2.functionAgentHumanConversationEvidenceClaimsSchema = zod_12.z.strictObject({
18254
+ sourceKind: zod_12.z.literal("human"),
18255
+ projection: zod_12.z.literal("thread-conversation-v1"),
18256
+ audience: zod_12.z.literal("atlas-agent-source-evidence"),
18257
+ actualUserSub: zod_12.z.string().min(1).max(512).refine((sub) => !sub.startsWith("service-account|"), "Human conversation evidence requires a user principal"),
18258
+ environment: zod_12.z.string(),
18259
+ org: identifier,
18260
+ agentId: identifier,
18261
+ threadId: identifier,
18262
+ revision: conversationRevision,
18263
+ cutoffAt: zod_12.z.iso.datetime({ offset: true }),
18264
+ responseHash: hash
18265
+ });
18266
+ exports2.functionAgentSourceEvidenceClaimsSchema = zod_12.z.union([exports2.functionAgentRunSourceEvidenceClaimsSchema, exports2.functionAgentHumanConversationEvidenceClaimsSchema]);
18267
+ exports2.functionAgentSourceEvidenceRequestSchema = zod_12.z.strictObject({ operation: zod_12.z.literal("verifySourceEvidence"), agent: identifier, runId: identifier, response: exports2.functionAgentSourceResponseSchema, responseHash: hash, sourceReceipt: zod_12.z.string().min(1).max(16384) });
18268
+ exports2.functionAgentSourceEvidenceVerificationSchema = zod_12.z.strictObject({
18269
+ source: exports2.functionAgentSourceEvidenceClaimsSchema,
18270
+ receiver: zod_12.z.strictObject({ functionId: identifier, versionId: identifier, invocationId: identifier, serviceAccountId: identifier, org: identifier }),
18271
+ lattice: zod_12.z.strictObject({
18272
+ receiverFunctionOrgId: identifier,
18273
+ run: zod_12.z.strictObject({ id: identifier, processId: identifier, processVersion: identifier, bundleHash: identifier, entity: zod_12.z.strictObject({ type: identifier, id: identifier }).nullable() }),
18274
+ step: zod_12.z.strictObject({ id: identifier, nodeId: identifier, attempt: zod_12.z.number().int().positive(), runAsServiceAccount: zod_12.z.string().nullable() }),
18275
+ receiver: zod_12.z.strictObject({ functionId: identifier, versionId: identifier, invocationId: identifier })
18276
+ }).nullable()
18277
+ });
18278
+ }
18279
+ });
18280
+
18281
+ // dist/agents.js
18282
+ var require_agents = __commonJS({
18283
+ "dist/agents.js"(exports2) {
18284
+ "use strict";
18285
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
18286
+ if (k2 === void 0) k2 = k;
18287
+ var desc = Object.getOwnPropertyDescriptor(m2, k);
18288
+ if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
18289
+ desc = { enumerable: true, get: function() {
18290
+ return m2[k];
18291
+ } };
18292
+ }
18293
+ Object.defineProperty(o, k2, desc);
18294
+ }) : (function(o, m2, k, k2) {
18295
+ if (k2 === void 0) k2 = k;
18296
+ o[k2] = m2[k];
18297
+ }));
18298
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
18299
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
18300
+ };
18301
+ Object.defineProperty(exports2, "__esModule", { value: true });
18302
+ exports2.createFunctionServiceAgentsClient = createFunctionServiceAgentsClient;
18303
+ var zod_12 = require_zod();
18304
+ var agents_contract_1 = require_agents_contract();
18305
+ var agent_source_evidence_contract_12 = require_agent_source_evidence_contract();
18306
+ var processes_contract_1 = require_processes_contract();
18307
+ __exportStar2(require_agents_contract(), exports2);
18308
+ function header({ request, name }) {
18309
+ const { headers } = request;
18310
+ const values = typeof headers.get === "function" ? [headers.get(name)] : Object.entries(headers).filter(([key]) => key.toLowerCase() === name).map(([, value]) => value);
18311
+ return values.length === 1 && typeof values[0] === "string" ? values[0] : null;
18312
+ }
18313
+ function credential(request) {
18314
+ const denied = () => new agents_contract_1.FunctionAgentReadError(401, "invalid_context", "This invocation has no valid agent-read credential");
18315
+ const token = header({ request, name: agents_contract_1.FUNCTION_AGENT_TOKEN_HEADER });
18316
+ if (!token || token.length > 16384)
18317
+ throw denied();
18318
+ const body = /^([A-Za-z0-9_-]+)\.[A-Za-z0-9_-]{43}$/.exec(token)?.[1];
18319
+ if (!body)
18320
+ throw denied();
18321
+ let value;
18322
+ try {
18323
+ value = JSON.parse(Buffer.from(body, "base64url").toString("utf8"));
18324
+ } catch {
18325
+ throw denied();
18326
+ }
18327
+ const claims = zod_12.z.object({ audience: zod_12.z.literal("atlas-managed-function-agent-read"), sub: zod_12.z.string().startsWith("service-account|"), functionId: zod_12.z.string().min(1), invocationId: zod_12.z.string().min(1), exp: zod_12.z.number().int() }).safeParse(value);
18328
+ if (!claims.success)
18329
+ throw denied();
18330
+ return { token, expiresAt: claims.data.exp };
18331
+ }
18332
+ function origin(baseUrl) {
18333
+ let url;
18334
+ try {
18335
+ url = new URL(baseUrl);
18336
+ } catch {
18337
+ throw new agents_contract_1.FunctionAgentReadError(400, "invalid_configuration", "Configure a trusted Atlas origin");
18338
+ }
18339
+ const loopback = url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname);
18340
+ if (!loopback && url.protocol !== "https:" || url.username || url.password || url.pathname !== "/" || url.search || url.hash)
18341
+ throw new agents_contract_1.FunctionAgentReadError(400, "invalid_configuration", "Configure an HTTPS Atlas origin without credentials, path, query or fragment");
18342
+ return url.origin;
18343
+ }
18344
+ function recoveryProcessCredential(request) {
18345
+ const denied = () => new agents_contract_1.FunctionAgentReadError(401, "invalid_context", "Recovery requires this invocation\u2019s process-read credential");
18346
+ const token = header({ request, name: processes_contract_1.FUNCTION_PROCESS_TOKEN_HEADER });
18347
+ if (!token || token.length > 16384)
18348
+ throw denied();
18349
+ const body = /^([A-Za-z0-9_-]+)\.[A-Za-z0-9_-]{43}$/.exec(token)?.[1];
18350
+ if (!body)
18351
+ throw denied();
18352
+ let value;
18353
+ try {
18354
+ value = JSON.parse(Buffer.from(body, "base64url").toString("utf8"));
18355
+ } catch {
18356
+ throw denied();
18357
+ }
18358
+ const claims = zod_12.z.object({ audience: zod_12.z.literal("atlas-managed-function-process-read"), sub: zod_12.z.string().startsWith("service-account|"), functionId: zod_12.z.string().min(1), invocationId: zod_12.z.string().min(1), exp: zod_12.z.number().int() }).safeParse(value);
18359
+ if (!claims.success)
18360
+ throw denied();
18361
+ if (claims.data.exp <= Date.now() / 1e3)
18362
+ throw new agents_contract_1.FunctionAgentReadError(401, "expired_context", "The process-read credential expired; start a new invocation");
18363
+ return token;
18364
+ }
18365
+ function createFunctionServiceAgentsClient({ request, baseUrl, fetchImpl = globalThis.fetch }) {
18366
+ const base = origin(baseUrl);
18367
+ const { token, expiresAt } = credential(request);
18368
+ const lattice = header({ request, name: "x-sequence-lattice-execution-token" });
18369
+ async function read(query, capture) {
18370
+ if (expiresAt <= Date.now() / 1e3)
18371
+ throw new agents_contract_1.FunctionAgentReadError(401, "expired_context", "The agent-read credential expired; start a new invocation");
18372
+ const body = agents_contract_1.functionAgentCompletedRunQuerySchema.parse(query);
18373
+ const process2 = body.recoveryProof ? recoveryProcessCredential(request) : null;
18374
+ const evidence = capture ? header({ request, name: agent_source_evidence_contract_12.FUNCTION_AGENT_EVIDENCE_TOKEN_HEADER }) : null;
18375
+ if (capture && !evidence)
18376
+ throw new agents_contract_1.FunctionAgentReadError(401, "invalid_context", "Source capture requires this invocation\u2019s separate agent-evidence credential");
18377
+ const response = await fetchImpl(`${base}${capture ? agents_contract_1.FUNCTION_AGENT_CAPTURE_PATH : agents_contract_1.FUNCTION_AGENT_READ_PATH}`, {
18378
+ method: "POST",
18379
+ headers: { "content-type": "application/json", [agents_contract_1.FUNCTION_AGENT_TOKEN_HEADER]: token, ...process2 ? { [processes_contract_1.FUNCTION_PROCESS_TOKEN_HEADER]: process2 } : {}, ...evidence ? { [agent_source_evidence_contract_12.FUNCTION_AGENT_EVIDENCE_TOKEN_HEADER]: evidence } : {}, ...lattice ? { "x-sequence-lattice-execution-token": lattice } : {} },
18380
+ body: JSON.stringify({ ...body, operation: capture ? "captureCompletedRun" : "getCompletedRun" }),
18381
+ redirect: "error",
18382
+ signal: AbortSignal.timeout(3e4)
18383
+ });
18384
+ const result = await response.json().catch(() => null);
18385
+ if (!response.ok) {
18386
+ const error = zod_12.z.object({ code: zod_12.z.string().max(128).optional(), detail: zod_12.z.string().max(2e3).optional() }).safeParse(result);
18387
+ throw new agents_contract_1.FunctionAgentReadError(response.status, error.success ? error.data.code ?? "agent_read_failed" : "agent_read_failed", error.success ? error.data.detail ?? "Agent read failed" : "Agent read failed");
18388
+ }
18389
+ return result;
18390
+ }
18391
+ return {
18392
+ async getCompletedRun(query) {
18393
+ const result = await read(query, false);
18394
+ const parsed = agents_contract_1.functionAgentCompletedRunSchema.safeParse(result);
18395
+ if (!parsed.success || parsed.data.runId !== query.runId || parsed.data.agent !== query.agent)
18396
+ throw new agents_contract_1.FunctionAgentReadError(502, "malformed_response", "Atlas returned an invalid completed agent response");
18397
+ return parsed.data;
18398
+ },
18399
+ async captureCompletedRun(query) {
18400
+ const parsed = agent_source_evidence_contract_12.functionAgentSourceEvidenceCaptureSchema.safeParse(await read(query, true));
18401
+ if (!parsed.success || parsed.data.response.runId !== query.runId || parsed.data.response.agent !== query.agent || "context" in parsed.data.response)
18402
+ throw new agents_contract_1.FunctionAgentReadError(502, "malformed_response", "Atlas returned an invalid neutral source capture");
18403
+ return parsed.data;
18404
+ }
18405
+ };
18406
+ }
18407
+ }
18408
+ });
18409
+
18410
+ // dist/agent-evidence.js
18411
+ var require_agent_evidence = __commonJS({
18412
+ "dist/agent-evidence.js"(exports2) {
18413
+ "use strict";
18414
+ Object.defineProperty(exports2, "__esModule", { value: true });
18415
+ exports2.createFunctionAgentEvidenceClient = createFunctionAgentEvidenceClient;
18416
+ var zod_12 = require_zod();
18417
+ var agents_12 = require_agents();
18418
+ var agent_source_evidence_contract_12 = require_agent_source_evidence_contract();
18419
+ function header(request, name) {
18420
+ const { headers } = request;
18421
+ const values = typeof headers.get === "function" ? [headers.get(name)] : Object.entries(headers).filter(([key]) => key.toLowerCase() === name).map(([, value]) => value);
18422
+ return values.length === 1 && typeof values[0] === "string" ? values[0] : null;
18423
+ }
18424
+ var bindingSchema = zod_12.z.object({ audience: zod_12.z.literal("atlas-managed-function-agent-evidence"), sub: zod_12.z.string().startsWith("service-account|"), functionId: zod_12.z.uuid(), versionId: zod_12.z.uuid(), invocationId: zod_12.z.uuid(), serviceAccountId: zod_12.z.uuid(), org: zod_12.z.string().min(1), exp: zod_12.z.number().int() });
18425
+ function invocation(request) {
18426
+ const denied = () => new agents_12.FunctionAgentReadError(401, "invalid_context", "This invocation has no valid agent-evidence credential");
18427
+ const token = header(request, agent_source_evidence_contract_12.FUNCTION_AGENT_EVIDENCE_TOKEN_HEADER);
18428
+ const body = token && token.length <= 16384 ? /^([A-Za-z0-9_-]+)\.[A-Za-z0-9_-]{43}$/.exec(token)?.[1] : null;
18429
+ if (!body || !token)
18430
+ throw denied();
18431
+ let value;
18432
+ try {
18433
+ value = JSON.parse(Buffer.from(body, "base64url").toString("utf8"));
18434
+ } catch {
18435
+ throw denied();
18436
+ }
18437
+ const binding = bindingSchema.safeParse(value);
18438
+ if (!binding.success || binding.data.sub !== `service-account|${binding.data.serviceAccountId}`)
18439
+ throw denied();
18440
+ return { token, binding: binding.data };
18441
+ }
18442
+ function origin(baseUrl) {
18443
+ let url;
18444
+ try {
18445
+ url = new URL(baseUrl);
18446
+ } catch {
18447
+ throw new agents_12.FunctionAgentReadError(400, "invalid_configuration", "Configure a trusted Atlas origin");
18448
+ }
18449
+ const loopback = url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname);
18450
+ if (!loopback && url.protocol !== "https:" || url.username || url.password || url.pathname !== "/" || url.search || url.hash)
18451
+ throw new agents_12.FunctionAgentReadError(400, "invalid_configuration", "Configure an HTTPS Atlas origin without credentials, path, query or fragment");
18452
+ return url.origin;
18453
+ }
18454
+ function createFunctionAgentEvidenceClient({ request, baseUrl, fetchImpl = globalThis.fetch }) {
18455
+ const url = `${origin(baseUrl)}${agent_source_evidence_contract_12.FUNCTION_AGENT_EVIDENCE_PATH}`;
18456
+ const { token, binding } = invocation(request);
18457
+ const lattice = header(request, "x-sequence-lattice-execution-token");
18458
+ async function verify(input) {
18459
+ if (binding.exp <= Date.now() / 1e3)
18460
+ throw new agents_12.FunctionAgentReadError(401, "expired_context", "The agent-evidence credential expired; start a new invocation");
18461
+ const body = JSON.stringify(input);
18462
+ if (Buffer.byteLength(body, "utf8") > agent_source_evidence_contract_12.AGENT_SOURCE_VERIFY_MAX_BYTES)
18463
+ throw new agents_12.FunctionAgentReadError(413, "source_evidence_too_large", "Source verification exceeds 768 KiB; capture a smaller source before writing");
18464
+ const response = await fetchImpl(url, { method: "POST", headers: { "content-type": "application/json", [agent_source_evidence_contract_12.FUNCTION_AGENT_EVIDENCE_TOKEN_HEADER]: token, ...lattice ? { "x-sequence-lattice-execution-token": lattice } : {} }, body, redirect: "error", signal: AbortSignal.timeout(3e4) });
18465
+ const result = await response.json().catch(() => null);
18466
+ if (!response.ok) {
18467
+ const error = zod_12.z.object({ detail: zod_12.z.string().max(2e3).optional(), code: zod_12.z.string().max(128).optional() }).safeParse(result);
18468
+ throw new agents_12.FunctionAgentReadError(response.status, error.success ? error.data.code ?? "agent_evidence_failed" : "agent_evidence_failed", error.success ? error.data.detail ?? "Source verification failed" : "Source verification failed");
18469
+ }
18470
+ const verified = agent_source_evidence_contract_12.functionAgentSourceEvidenceVerificationSchema.safeParse(result);
18471
+ if (!verified.success)
18472
+ throw new agents_12.FunctionAgentReadError(502, "malformed_response", "Atlas returned invalid source verification");
18473
+ const { source, receiver } = verified.data;
18474
+ const execution = verified.data.lattice;
18475
+ if (source.agentId !== input.agent || source.threadId !== input.response.threadId || source.responseHash !== input.responseHash || receiver.functionId !== binding.functionId || receiver.versionId !== binding.versionId || receiver.invocationId !== binding.invocationId || receiver.serviceAccountId !== binding.serviceAccountId || receiver.org !== binding.org || execution !== null && (execution.receiverFunctionOrgId !== receiver.org || execution.receiver.functionId !== receiver.functionId || execution.receiver.versionId !== receiver.versionId || execution.receiver.invocationId !== receiver.invocationId))
18476
+ throw new agents_12.FunctionAgentReadError(502, "malformed_response", "Atlas returned source verification for another request or invocation");
18477
+ return verified.data;
18478
+ }
18479
+ return {
18480
+ async verifySourceEvidence(input) {
18481
+ const result = await verify(agent_source_evidence_contract_12.functionAgentSourceEvidenceRequestSchema.parse({ ...input, operation: "verifySourceEvidence" }));
18482
+ if (result.source.projection === "thread-conversation-v1" || result.source.runId !== input.runId)
18483
+ throw new agents_12.FunctionAgentReadError(502, "malformed_response", "Atlas returned evidence for a different completed source");
18484
+ return result;
18485
+ },
18486
+ async verifyConversationEvidence(input) {
18487
+ const result = await verify(agent_source_evidence_contract_12.functionAgentConversationEvidenceRequestSchema.parse({ ...input, operation: "verifyConversationEvidence" }));
18488
+ if (result.source.projection !== "thread-conversation-v1" || result.source.threadId !== input.threadId || result.source.revision !== input.response.revision || result.source.cutoffAt !== input.response.cutoffAt)
18489
+ throw new agents_12.FunctionAgentReadError(502, "malformed_response", "Atlas returned evidence for a different settled conversation");
18490
+ return result;
18491
+ }
18492
+ };
18493
+ }
18494
+ }
18495
+ });
18496
+
18497
+ // dist/workflow-source-contract.js
18498
+ var require_workflow_source_contract = __commonJS({
18499
+ "dist/workflow-source-contract.js"(exports2) {
18500
+ "use strict";
18501
+ Object.defineProperty(exports2, "__esModule", { value: true });
18502
+ exports2.FunctionWorkflowReadError = exports2.functionWorkflowSourceVerificationSchema = exports2.functionWorkflowSourceEvidenceRequestSchema = exports2.functionWorkflowSourceClaimsSchema = exports2.functionWorkflowHumanSourceClaimsSchema = exports2.functionWorkflowManagedFunctionSourceClaimsSchema = exports2.functionWorkflowSourceCaptureSchema = exports2.functionWorkflowCompletedRunSchema = exports2.functionWorkflowCompletedRunQuerySchema = exports2.functionWorkflowSourceExecutionSchema = exports2.functionWorkflowSourceRootSchema = exports2.FUNCTION_WORKFLOW_EVIDENCE_PATH = exports2.FUNCTION_WORKFLOW_CAPTURE_PATH = exports2.FUNCTION_WORKFLOW_EVIDENCE_TOKEN_HEADER = exports2.FUNCTION_WORKFLOW_TOKEN_HEADER = void 0;
18503
+ var zod_12 = require_zod();
18504
+ var agent_source_evidence_contract_12 = require_agent_source_evidence_contract();
18505
+ exports2.FUNCTION_WORKFLOW_TOKEN_HEADER = "x-sequence-workflow-service-token";
18506
+ exports2.FUNCTION_WORKFLOW_EVIDENCE_TOKEN_HEADER = "x-sequence-workflow-evidence-token";
18507
+ exports2.FUNCTION_WORKFLOW_CAPTURE_PATH = "/api/managed-functions/workflows/capture";
18508
+ exports2.FUNCTION_WORKFLOW_EVIDENCE_PATH = "/api/managed-functions/workflows/evidence";
18509
+ var id = zod_12.z.string().min(1).max(255).regex(/^[A-Za-z0-9._-]+$/);
18510
+ var hash = zod_12.z.string().regex(/^[a-f0-9]{64}$/);
18511
+ var identity = zod_12.z.strictObject({ id, version: id, definitionSha256: hash });
18512
+ exports2.functionWorkflowSourceRootSchema = zod_12.z.strictObject({
18513
+ id,
18514
+ runId: id,
18515
+ identity,
18516
+ branches: zod_12.z.array(zod_12.z.strictObject({
18517
+ nodeId: id,
18518
+ nodeRunId: id,
18519
+ attempt: zod_12.z.number().int().positive(),
18520
+ agentId: id,
18521
+ runId: id.nullable(),
18522
+ status: zod_12.z.enum(["completed", "failed", "cancelled", "skipped"]),
18523
+ identity,
18524
+ completedAt: zod_12.z.iso.datetime({ offset: true }).nullable()
18525
+ }).refine((branch) => branch.agentId === branch.identity.id && (branch.status !== "completed" || branch.runId !== null && branch.completedAt !== null), "Completed branches require actual completed source records")).max(64)
18526
+ }).refine((workflow) => workflow.id === workflow.identity.id, "The workflow must match its private identity");
18527
+ exports2.functionWorkflowSourceExecutionSchema = zod_12.z.strictObject({
18528
+ run: agent_source_evidence_contract_12.functionAgentSourceExecutionSchema.shape.run,
18529
+ step: agent_source_evidence_contract_12.functionAgentSourceExecutionSchema.shape.step,
18530
+ workflow: exports2.functionWorkflowSourceRootSchema
18531
+ });
18532
+ exports2.functionWorkflowCompletedRunQuerySchema = zod_12.z.strictObject({ workflow: id, runId: id });
18533
+ exports2.functionWorkflowCompletedRunSchema = zod_12.z.strictObject({ workflow: id, runId: id, status: zod_12.z.literal("completed"), output: zod_12.z.json() });
18534
+ exports2.functionWorkflowSourceCaptureSchema = zod_12.z.strictObject({ response: exports2.functionWorkflowCompletedRunSchema, responseHash: hash, sourceReceipt: zod_12.z.string().min(1).max(16384) });
18535
+ var receiver = zod_12.z.strictObject({ functionId: zod_12.z.uuid(), versionId: zod_12.z.uuid(), invocationId: zod_12.z.uuid(), serviceAccountId: zod_12.z.uuid(), org: zod_12.z.string().min(1).max(255) });
18536
+ var sourceFields = {
18537
+ environment: zod_12.z.string(),
18538
+ org: zod_12.z.string().min(1).max(255),
18539
+ workflowId: id,
18540
+ runId: id,
18541
+ cutoffAt: zod_12.z.iso.datetime({ offset: true }),
18542
+ outputHash: hash,
18543
+ responseHash: hash,
18544
+ jobAdmission: agent_source_evidence_contract_12.functionSourceJobAdmissionSchema.nullable()
18545
+ };
18546
+ exports2.functionWorkflowManagedFunctionSourceClaimsSchema = zod_12.z.strictObject({
18547
+ sourceKind: zod_12.z.literal("managed_function"),
18548
+ projection: zod_12.z.literal("workflow-completed-v1"),
18549
+ audience: zod_12.z.literal("atlas-managed-function-workflow-source-evidence"),
18550
+ ...sourceFields,
18551
+ actualServiceAccountSub: zod_12.z.string().min(1).max(512),
18552
+ sourceReceiver: receiver,
18553
+ sourceExecution: exports2.functionWorkflowSourceExecutionSchema
18554
+ }).refine((source) => source.actualServiceAccountSub === `service-account|${source.sourceReceiver.serviceAccountId}` && source.org === source.sourceReceiver.org && source.workflowId === source.sourceExecution.workflow.id && source.runId === source.sourceExecution.workflow.runId, "The workflow source must match its actual identity and execution");
18555
+ exports2.functionWorkflowHumanSourceClaimsSchema = zod_12.z.strictObject({
18556
+ ...sourceFields,
18557
+ sourceKind: zod_12.z.literal("human"),
18558
+ projection: zod_12.z.literal("workflow-completed-v1"),
18559
+ audience: zod_12.z.literal("atlas-workflow-source-evidence"),
18560
+ actualUserSub: zod_12.z.string().min(1).max(512).refine((sub) => !sub.startsWith("service-account|"), "Human workflow evidence requires an actual user"),
18561
+ sourceExecution: zod_12.z.null(),
18562
+ workflowSource: exports2.functionWorkflowSourceRootSchema
18563
+ }).refine((source) => source.workflowId === source.workflowSource.id && source.runId === source.workflowSource.runId && source.jobAdmission !== null, "A standalone human workflow source requires its actual job admission");
18564
+ exports2.functionWorkflowSourceClaimsSchema = zod_12.z.discriminatedUnion("sourceKind", [exports2.functionWorkflowManagedFunctionSourceClaimsSchema, exports2.functionWorkflowHumanSourceClaimsSchema]).refine((source) => source.jobAdmission === null || source.jobAdmission.kind === "workflow" && source.jobAdmission.runId === source.runId && source.jobAdmission.resourceId === source.workflowId && (source.sourceKind === "human" || source.jobAdmission.actorSub === source.actualServiceAccountSub), "The job admission must match the workflow source");
18565
+ exports2.functionWorkflowSourceEvidenceRequestSchema = exports2.functionWorkflowCompletedRunQuerySchema.extend({ operation: zod_12.z.literal("verifySourceEvidence"), response: exports2.functionWorkflowCompletedRunSchema, responseHash: hash, sourceReceipt: zod_12.z.string().min(1).max(16384) });
18566
+ exports2.functionWorkflowSourceVerificationSchema = zod_12.z.strictObject({ source: exports2.functionWorkflowSourceClaimsSchema, receiver });
18567
+ var FunctionWorkflowReadError = class extends Error {
18568
+ status;
18569
+ code;
18570
+ name = "FunctionWorkflowReadError";
18571
+ constructor(status, code, message) {
18572
+ super(message);
18573
+ this.status = status;
18574
+ this.code = code;
18575
+ }
18576
+ };
18577
+ exports2.FunctionWorkflowReadError = FunctionWorkflowReadError;
18578
+ }
18579
+ });
18580
+
18581
+ // dist/workflow-source.js
18582
+ var require_workflow_source = __commonJS({
18583
+ "dist/workflow-source.js"(exports2) {
18584
+ "use strict";
18585
+ Object.defineProperty(exports2, "__esModule", { value: true });
18586
+ exports2.createFunctionServiceWorkflowsClient = createFunctionServiceWorkflowsClient;
18587
+ exports2.createFunctionWorkflowEvidenceClient = createFunctionWorkflowEvidenceClient;
18588
+ var zod_12 = require_zod();
18589
+ var agent_source_evidence_contract_12 = require_agent_source_evidence_contract();
18590
+ var workflow_source_contract_1 = require_workflow_source_contract();
18591
+ function header(request, name) {
18592
+ const { headers } = request;
18593
+ const values = typeof headers.get === "function" ? [headers.get(name)] : Object.entries(headers).filter(([key]) => key.toLowerCase() === name).map(([, value]) => value);
18594
+ return values.length === 1 && typeof values[0] === "string" ? values[0] : null;
18595
+ }
18596
+ var receiverSchema = zod_12.z.object({ sub: zod_12.z.string(), functionId: zod_12.z.uuid(), versionId: zod_12.z.uuid(), invocationId: zod_12.z.uuid(), serviceAccountId: zod_12.z.uuid(), org: zod_12.z.string().min(1), exp: zod_12.z.number().int() });
18597
+ function credential({ request, evidence }) {
18598
+ const refused = () => new workflow_source_contract_1.FunctionWorkflowReadError(401, "invalid_context", "This invocation has no valid workflow-source credential");
18599
+ const token = header(request, evidence ? workflow_source_contract_1.FUNCTION_WORKFLOW_EVIDENCE_TOKEN_HEADER : workflow_source_contract_1.FUNCTION_WORKFLOW_TOKEN_HEADER);
18600
+ const body = token && token.length <= 16384 ? /^([A-Za-z0-9_-]+)\.[A-Za-z0-9_-]{43}$/.exec(token)?.[1] : null;
18601
+ if (!body || !token)
18602
+ throw refused();
18603
+ let value;
18604
+ try {
18605
+ value = JSON.parse(Buffer.from(body, "base64url").toString("utf8"));
18606
+ } catch {
18607
+ throw refused();
18608
+ }
18609
+ const binding = receiverSchema.extend({ audience: zod_12.z.literal(evidence ? "atlas-managed-function-workflow-evidence" : "atlas-managed-function-workflow-read") }).safeParse(value);
18610
+ if (!binding.success || binding.data.sub !== `service-account|${binding.data.serviceAccountId}`)
18611
+ throw refused();
18612
+ return { token, binding: binding.data };
18613
+ }
18614
+ function origin(baseUrl) {
18615
+ let url;
18616
+ try {
18617
+ url = new URL(baseUrl);
18618
+ } catch {
18619
+ throw new workflow_source_contract_1.FunctionWorkflowReadError(400, "invalid_configuration", "Configure a trusted Atlas origin");
18620
+ }
18621
+ const loopback = url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname);
18622
+ if (!loopback && url.protocol !== "https:" || url.username || url.password || url.pathname !== "/" || url.search || url.hash)
18623
+ throw new workflow_source_contract_1.FunctionWorkflowReadError(400, "invalid_configuration", "Configure an HTTPS Atlas origin without credentials, path, query or fragment");
18624
+ return url.origin;
18625
+ }
18626
+ function sameReceiver(left, right) {
18627
+ return left.functionId === right.functionId && left.versionId === right.versionId && left.invocationId === right.invocationId && left.serviceAccountId === right.serviceAccountId && left.org === right.org && left.sub === right.sub;
18628
+ }
18629
+ async function post({ options, path, body, credentials }) {
18630
+ const serialized = JSON.stringify(body);
18631
+ if (Buffer.byteLength(serialized, "utf8") > agent_source_evidence_contract_12.AGENT_SOURCE_VERIFY_MAX_BYTES)
18632
+ throw new workflow_source_contract_1.FunctionWorkflowReadError(413, "workflow_source_too_large", "Workflow source verification exceeds 768 KiB; capture a smaller output before writing");
18633
+ const lattice = header(options.request, "x-sequence-lattice-execution-token");
18634
+ const response = await (options.fetchImpl ?? globalThis.fetch)(`${origin(options.baseUrl)}${path}`, { method: "POST", headers: { "content-type": "application/json", ...credentials, ...lattice ? { "x-sequence-lattice-execution-token": lattice } : {} }, body: serialized, redirect: "error", signal: AbortSignal.timeout(3e4) });
18635
+ const result = await response.json().catch(() => null);
18636
+ if (!response.ok) {
18637
+ const error = zod_12.z.object({ detail: zod_12.z.string().max(2e3).optional(), code: zod_12.z.string().max(128).optional() }).safeParse(result);
18638
+ throw new workflow_source_contract_1.FunctionWorkflowReadError(response.status, error.success ? error.data.code ?? "workflow_source_failed" : "workflow_source_failed", error.success ? error.data.detail ?? "Workflow source request failed" : "Workflow source request failed");
18639
+ }
18640
+ return result;
18641
+ }
18642
+ function assertLive(binding) {
18643
+ if (binding.exp <= Date.now() / 1e3)
18644
+ throw new workflow_source_contract_1.FunctionWorkflowReadError(401, "expired_context", "The workflow-source credential expired; start a new invocation");
18645
+ }
18646
+ function createFunctionServiceWorkflowsClient(options) {
18647
+ origin(options.baseUrl);
18648
+ const read = credential({ request: options.request, evidence: false });
18649
+ const evidence = credential({ request: options.request, evidence: true });
18650
+ if (!sameReceiver(read.binding, evidence.binding))
18651
+ throw new workflow_source_contract_1.FunctionWorkflowReadError(401, "invalid_context", "Workflow capture credentials name different invocations");
18652
+ return { async captureCompletedRun(query) {
18653
+ assertLive(read.binding);
18654
+ assertLive(evidence.binding);
18655
+ const parsed = workflow_source_contract_1.functionWorkflowSourceCaptureSchema.safeParse(await post({ options, path: workflow_source_contract_1.FUNCTION_WORKFLOW_CAPTURE_PATH, body: { ...workflow_source_contract_1.functionWorkflowCompletedRunQuerySchema.parse(query), operation: "captureCompletedRun" }, credentials: { [workflow_source_contract_1.FUNCTION_WORKFLOW_TOKEN_HEADER]: read.token, [workflow_source_contract_1.FUNCTION_WORKFLOW_EVIDENCE_TOKEN_HEADER]: evidence.token } }));
18656
+ if (!parsed.success || parsed.data.response.workflow !== query.workflow || parsed.data.response.runId !== query.runId)
18657
+ throw new workflow_source_contract_1.FunctionWorkflowReadError(502, "malformed_response", "Atlas returned a different completed workflow source");
18658
+ return parsed.data;
18659
+ } };
18660
+ }
18661
+ function createFunctionWorkflowEvidenceClient(options) {
18662
+ origin(options.baseUrl);
18663
+ const evidence = credential({ request: options.request, evidence: true });
18664
+ return { async verifySourceEvidence(input) {
18665
+ assertLive(evidence.binding);
18666
+ const parsed = workflow_source_contract_1.functionWorkflowSourceVerificationSchema.safeParse(await post({ options, path: workflow_source_contract_1.FUNCTION_WORKFLOW_EVIDENCE_PATH, body: workflow_source_contract_1.functionWorkflowSourceEvidenceRequestSchema.parse({ ...input, operation: "verifySourceEvidence" }), credentials: { [workflow_source_contract_1.FUNCTION_WORKFLOW_EVIDENCE_TOKEN_HEADER]: evidence.token } }));
18667
+ if (!parsed.success)
18668
+ throw new workflow_source_contract_1.FunctionWorkflowReadError(502, "malformed_response", "Atlas returned invalid workflow source verification");
18669
+ const { source, receiver } = parsed.data;
18670
+ if (source.workflowId !== input.workflow || source.runId !== input.runId || source.responseHash !== input.responseHash || receiver.functionId !== evidence.binding.functionId || receiver.versionId !== evidence.binding.versionId || receiver.invocationId !== evidence.binding.invocationId || receiver.serviceAccountId !== evidence.binding.serviceAccountId || receiver.org !== evidence.binding.org)
18671
+ throw new workflow_source_contract_1.FunctionWorkflowReadError(502, "malformed_response", "Atlas returned workflow evidence for another request or invocation");
18672
+ return parsed.data;
18673
+ } };
18674
+ }
18675
+ }
18676
+ });
18677
+
18678
+ // dist/monitoring-events.js
18679
+ var require_monitoring_events = __commonJS({
18680
+ "dist/monitoring-events.js"(exports2) {
18681
+ "use strict";
18682
+ Object.defineProperty(exports2, "__esModule", { value: true });
18683
+ exports2.emitDeltaEventsBodySchema = exports2.MAX_DELTA_EVENTS_PER_REQUEST = exports2.deltaEventSchema = exports2.docExtractEditContextSchema = exports2.dtiDeltaContextSchema = exports2.artifactDeltaContextSchema = exports2.PRODUCER_EVENT_KEY_PREFIX = exports2.MAX_CONTEXT_JSON_CHARS = exports2.MAX_SCALAR_STRING_CHARS = exports2.MAX_CONTEXT_TEXT_CHARS = void 0;
18684
+ exports2.contentHashKey = contentHashKey;
18685
+ exports2.scopedIdempotencyKey = scopedIdempotencyKey;
18686
+ var node_crypto_1 = require("node:crypto");
18687
+ var zod_12 = require_zod();
18688
+ exports2.MAX_CONTEXT_TEXT_CHARS = 5e4;
18689
+ exports2.MAX_SCALAR_STRING_CHARS = 8e3;
18690
+ exports2.MAX_CONTEXT_JSON_CHARS = 1e5;
18691
+ exports2.PRODUCER_EVENT_KEY_PREFIX = "producer:";
18692
+ var scalarSchema = zod_12.z.union([
18693
+ zod_12.z.string().max(exports2.MAX_SCALAR_STRING_CHARS),
18694
+ zod_12.z.number(),
18695
+ zod_12.z.boolean(),
18696
+ zod_12.z.null()
18697
+ ]);
18698
+ var boundedText = zod_12.z.string().max(exports2.MAX_CONTEXT_TEXT_CHARS);
18699
+ var boundedId = zod_12.z.string().min(1).max(512);
18700
+ function assertBoundedContextJson(context2, ctx, path = ["context"]) {
18701
+ if (JSON.stringify(context2).length > exports2.MAX_CONTEXT_JSON_CHARS) {
18702
+ ctx.addIssue({
18703
+ code: zod_12.z.ZodIssueCode.custom,
18704
+ path: [...path],
18705
+ message: `context JSON exceeds ${exports2.MAX_CONTEXT_JSON_CHARS} characters`
18706
+ });
18707
+ }
18708
+ }
18709
+ exports2.artifactDeltaContextSchema = zod_12.z.object({
18710
+ artifactKind: boundedId,
18711
+ sectionPath: boundedId,
18712
+ before: boundedText,
18713
+ after: boundedText,
18714
+ changeKind: zod_12.z.enum(["added", "removed", "modified"]),
18715
+ category: boundedId.optional(),
18716
+ sourceRefs: zod_12.z.record(zod_12.z.string().max(128), zod_12.z.union([zod_12.z.string().max(exports2.MAX_SCALAR_STRING_CHARS), zod_12.z.number()])),
18717
+ workflowId: boundedId.optional()
18718
+ }).strict().superRefine((context2, ctx) => assertBoundedContextJson(context2, ctx, []));
18719
+ exports2.dtiDeltaContextSchema = zod_12.z.object({
18720
+ stageId: boundedId,
18721
+ loanId: zod_12.z.string().max(512).nullable().optional(),
18722
+ fieldPath: boundedId,
18723
+ before: scalarSchema,
18724
+ after: scalarSchema,
18725
+ section: zod_12.z.enum(["debt", "income", "other"]).optional(),
18726
+ itemLabel: zod_12.z.string().max(exports2.MAX_SCALAR_STRING_CHARS).optional(),
18727
+ calculatorType: zod_12.z.enum(["basic", "advanced"]).optional(),
18728
+ workflowId: boundedId.optional(),
18729
+ sourceDocRefs: zod_12.z.array(zod_12.z.string().max(512)).max(50).optional()
18730
+ }).strict().superRefine((context2, ctx) => assertBoundedContextJson(context2, ctx, []));
18731
+ exports2.docExtractEditContextSchema = zod_12.z.object({
18732
+ documentId: boundedId,
18733
+ docType: boundedId,
18734
+ fieldPath: boundedId,
18735
+ oldValue: scalarSchema,
18736
+ newValue: scalarSchema,
18737
+ rowKey: zod_12.z.record(zod_12.z.string().max(128), scalarSchema).optional(),
18738
+ stageId: zod_12.z.string().max(512).optional(),
18739
+ workflowId: zod_12.z.string().max(512).optional(),
18740
+ citation: zod_12.z.object({
18741
+ page: zod_12.z.number().int(),
18742
+ region: zod_12.z.string().max(exports2.MAX_SCALAR_STRING_CHARS).optional()
18743
+ }).strict().optional()
18744
+ }).strict().superRefine((context2, ctx) => assertBoundedContextJson(context2, ctx, []));
18745
+ var deltaEventBaseFields = {
18746
+ idempotencyKey: zod_12.z.string().min(1).max(512),
18747
+ subjectId: zod_12.z.string().min(1).max(512),
18748
+ subjectKind: zod_12.z.enum(["agent", "workflow"]),
18749
+ occurredAt: zod_12.z.string().datetime({ offset: true }),
18750
+ deltaReason: zod_12.z.string().max(exports2.MAX_CONTEXT_TEXT_CHARS).nullable().optional(),
18751
+ deltaSource: zod_12.z.enum(["human", "llm", "unknown"]).default("unknown"),
18752
+ actionability: zod_12.z.literal("unknown").default("unknown")
18753
+ };
18754
+ exports2.deltaEventSchema = zod_12.z.discriminatedUnion("contextType", [
18755
+ zod_12.z.object({
18756
+ ...deltaEventBaseFields,
18757
+ contextType: zod_12.z.literal("artifact_delta"),
18758
+ context: exports2.artifactDeltaContextSchema
18759
+ }).strict(),
18760
+ zod_12.z.object({
18761
+ ...deltaEventBaseFields,
18762
+ contextType: zod_12.z.literal("dti_delta"),
18763
+ context: exports2.dtiDeltaContextSchema
18764
+ }).strict(),
18765
+ zod_12.z.object({
18766
+ ...deltaEventBaseFields,
18767
+ contextType: zod_12.z.literal("doc_extract_edit"),
18768
+ context: exports2.docExtractEditContextSchema
18769
+ }).strict()
18770
+ ]);
18771
+ exports2.MAX_DELTA_EVENTS_PER_REQUEST = 100;
18772
+ exports2.emitDeltaEventsBodySchema = zod_12.z.object({
18773
+ events: zod_12.z.array(exports2.deltaEventSchema).min(1).max(exports2.MAX_DELTA_EVENTS_PER_REQUEST)
18774
+ }).strict().superRefine((body, ctx) => {
18775
+ const seen = /* @__PURE__ */ new Set();
18776
+ body.events.forEach((event, index) => {
18777
+ if (event.idempotencyKey.startsWith(exports2.PRODUCER_EVENT_KEY_PREFIX)) {
18778
+ ctx.addIssue({ code: zod_12.z.ZodIssueCode.custom, path: ["events", index, "idempotencyKey"], message: "Producer event storage keys are reserved for scoped monitoring delivery" });
18779
+ }
18780
+ if (seen.has(event.idempotencyKey)) {
18781
+ ctx.addIssue({
18782
+ code: zod_12.z.ZodIssueCode.custom,
18783
+ path: ["events", index, "idempotencyKey"],
18784
+ message: `Duplicate idempotencyKey in batch: ${event.idempotencyKey}`
18785
+ });
18786
+ }
18787
+ seen.add(event.idempotencyKey);
18788
+ });
18789
+ });
18790
+ function contentHashKey(parts) {
18791
+ return (0, node_crypto_1.createHash)("sha256").update(parts.join("|")).digest("hex").slice(0, 16);
18792
+ }
18793
+ function scopedIdempotencyKey(args) {
18794
+ return `${args.scope}:${contentHashKey(args.parts)}`;
18795
+ }
18796
+ }
18797
+ });
18798
+
18799
+ // dist/monitoring-annotations.js
18800
+ var require_monitoring_annotations = __commonJS({
18801
+ "dist/monitoring-annotations.js"(exports2) {
18802
+ "use strict";
18803
+ Object.defineProperty(exports2, "__esModule", { value: true });
18804
+ exports2.functionMonitoringAnnotationSchema = void 0;
18805
+ var zod_12 = require_zod();
18806
+ function boundedJson(value, depth = 0) {
18807
+ if (depth > 6)
18808
+ return false;
18809
+ if (value === null || typeof value === "boolean")
18810
+ return true;
18811
+ if (typeof value === "number")
18812
+ return Number.isFinite(value);
18813
+ if (typeof value === "string")
18814
+ return value.length <= 5e4;
18815
+ if (Array.isArray(value)) {
18816
+ if (Object.getPrototypeOf(value) !== Array.prototype || value.length > 100 || Object.getOwnPropertyNames(value).length !== value.length + 1 || Object.getOwnPropertySymbols(value).length > 0)
18817
+ return false;
18818
+ for (let index = 0; index < value.length; index++) {
18819
+ const entry = Object.getOwnPropertyDescriptor(value, String(index));
18820
+ if (!entry?.enumerable || !("value" in entry) || !boundedJson(entry.value, depth + 1))
18821
+ return false;
18822
+ }
18823
+ return true;
18824
+ }
18825
+ if (typeof value !== "object")
18826
+ return false;
18827
+ const prototype = Object.getPrototypeOf(value);
18828
+ if (prototype !== Object.prototype && prototype !== null || Object.getOwnPropertySymbols(value).length > 0)
18829
+ return false;
18830
+ const entries = Object.entries(Object.getOwnPropertyDescriptors(value));
18831
+ return entries.length <= 64 && entries.every(([key, entry]) => key.length <= 128 && entry.enumerable && "value" in entry && boundedJson(entry.value, depth + 1));
18832
+ }
18833
+ var json = zod_12.z.custom((value) => boundedJson(value) && Buffer.byteLength(JSON.stringify(value), "utf8") <= 1e5, "Expected bounded JSON metrics");
18834
+ var text = zod_12.z.string().max(5e4);
18835
+ var id = zod_12.z.string().min(1).max(512);
18836
+ var severity = zod_12.z.enum(["critical", "high", "medium", "low"]);
18837
+ var inputTag = zod_12.z.strictObject({ type: zod_12.z.string().min(1).max(128), value: zod_12.z.string().max(8e3) });
18838
+ exports2.functionMonitoringAnnotationSchema = zod_12.z.strictObject({
18839
+ sourceType: id,
18840
+ sourceRef: zod_12.z.record(zod_12.z.string().min(1).max(128), zod_12.z.union([zod_12.z.string().max(8e3), zod_12.z.number().finite()])).refine((ref) => Object.keys(ref).length > 0 && Object.keys(ref).length <= 64, "Source references must be bounded and nonempty"),
18841
+ generatingSubject: zod_12.z.strictObject({ subjectId: id, subjectKind: zod_12.z.enum(["agent", "workflow"]) }),
18842
+ occurredAt: zod_12.z.iso.datetime({ offset: true }),
18843
+ summary: text.nullable(),
18844
+ metrics: json,
18845
+ conversationFindings: zod_12.z.array(zod_12.z.strictObject({ type: id, description: text, excerpt: text, severity: zod_12.z.enum(["high", "medium", "low"]) })).max(100),
18846
+ classifications: zod_12.z.array(zod_12.z.strictObject({
18847
+ matchedBucketSlug: id.nullable(),
18848
+ newBucketProposal: zod_12.z.strictObject({ name: id, description: text, severity, category: id }).nullable(),
18849
+ excerpt: text,
18850
+ inputTags: zod_12.z.array(inputTag).max(64)
18851
+ }).refine((classification) => classification.matchedBucketSlug === null !== (classification.newBucketProposal === null), "Name exactly one matched bucket or proposal")).max(100),
18852
+ coarseFallbacks: zod_12.z.array(zod_12.z.strictObject({ bucketSlug: id, excerpt: text, coarseCategory: id })).max(100)
18853
+ }).superRefine((annotation, context2) => {
18854
+ if (Buffer.byteLength(JSON.stringify(annotation), "utf8") > 256 * 1024)
18855
+ context2.addIssue({ code: "custom", message: "Monitoring annotations exceed the size limit" });
18856
+ });
18857
+ }
18858
+ });
18859
+
18860
+ // dist/monitoring-contract.js
18861
+ var require_monitoring_contract = __commonJS({
18862
+ "dist/monitoring-contract.js"(exports2) {
18863
+ "use strict";
18864
+ Object.defineProperty(exports2, "__esModule", { value: true });
18865
+ exports2.FunctionMonitoringError = exports2.monitoringDeliveryReceiptSchema = exports2.functionMonitoringRequestSchema = exports2.monitoringPublishSchema = exports2.monitoringBucketCatalogSchema = exports2.monitoringCatalogQuerySchema = exports2.monitoringDeliveryKeySchema = exports2.monitoringEventsSchema = exports2.functionMonitoringScopesSchema = exports2.MAX_MONITORING_DELIVERY_BYTES = exports2.MONITORING_CATALOG_CAPABILITY = exports2.MONITORING_PRODUCER_CAPABILITY = exports2.FUNCTION_MONITORING_DELIVERIES_PATH = exports2.FUNCTION_MONITORING_TOKEN_HEADER = void 0;
18866
+ exports2.readFunctionMonitoringScopes = readFunctionMonitoringScopes;
18867
+ exports2.monitoringPayloadHash = monitoringPayloadHash;
18868
+ var node_crypto_1 = require("node:crypto");
18869
+ var zod_12 = require_zod();
18870
+ var monitoring_events_1 = require_monitoring_events();
18871
+ var monitoring_annotations_12 = require_monitoring_annotations();
18872
+ exports2.FUNCTION_MONITORING_TOKEN_HEADER = "x-sequence-monitoring-service-token";
18873
+ exports2.FUNCTION_MONITORING_DELIVERIES_PATH = "/api/managed-functions/monitoring/deliveries";
18874
+ exports2.MONITORING_PRODUCER_CAPABILITY = "emit_monitoring";
18875
+ exports2.MONITORING_CATALOG_CAPABILITY = "read_monitoring_catalog";
18876
+ exports2.MAX_MONITORING_DELIVERY_BYTES = 512 * 1024;
18877
+ var producer = zod_12.z.string().min(1).max(41).regex(/^[a-z][a-z0-9_]{0,40}$/);
18878
+ exports2.functionMonitoringScopesSchema = zod_12.z.strictObject({
18879
+ producers: zod_12.z.array(producer).min(1).max(16).refine((ids) => new Set(ids).size === ids.length, "Producer namespaces must be distinct")
18880
+ });
18881
+ function readFunctionMonitoringScopes(manifest) {
18882
+ if (typeof manifest !== "object" || manifest === null)
18883
+ return [];
18884
+ const capabilities = Reflect.get(manifest, "capabilities");
18885
+ if (typeof capabilities !== "object" || capabilities === null)
18886
+ return [];
18887
+ const monitoring = Reflect.get(capabilities, "monitoring");
18888
+ return monitoring === void 0 ? [] : exports2.functionMonitoringScopesSchema.parse(monitoring).producers;
18889
+ }
18890
+ exports2.monitoringEventsSchema = zod_12.z.array(monitoring_events_1.deltaEventSchema).max(monitoring_events_1.MAX_DELTA_EVENTS_PER_REQUEST).superRefine((events, context2) => {
18891
+ const seen = /* @__PURE__ */ new Set();
18892
+ for (const [index, event] of events.entries()) {
18893
+ if (seen.has(event.idempotencyKey))
18894
+ context2.addIssue({ code: "custom", path: [index, "idempotencyKey"], message: "Event keys must be distinct within a delivery" });
18895
+ seen.add(event.idempotencyKey);
18896
+ }
18897
+ if (Buffer.byteLength(JSON.stringify(events), "utf8") > exports2.MAX_MONITORING_DELIVERY_BYTES) {
18898
+ context2.addIssue({ code: "custom", message: "Monitoring events exceed the delivery size limit" });
18899
+ }
18900
+ });
18901
+ function canonical(value) {
18902
+ if (Array.isArray(value))
18903
+ return `[${value.map(canonical).join(",")}]`;
18904
+ if (typeof value === "object" && value !== null) {
18905
+ return `{${Object.entries(value).filter(([, entry]) => entry !== void 0).sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0).map(([key2, entry]) => `${JSON.stringify(key2)}:${canonical(entry)}`).join(",")}}`;
18906
+ }
18907
+ const serialized = JSON.stringify(value);
18908
+ if (serialized === void 0)
18909
+ throw new Error("Monitoring payload is not JSON");
18910
+ return serialized;
18911
+ }
18912
+ function monitoringPayloadHash({ events, observation }) {
18913
+ return (0, node_crypto_1.createHash)("sha256").update(canonical({ events: exports2.monitoringEventsSchema.parse(events), ...observation === void 0 ? {} : { observation: monitoring_annotations_12.functionMonitoringAnnotationSchema.parse(observation) } })).digest("hex");
18914
+ }
18915
+ var key = zod_12.z.string().min(1).max(512);
18916
+ exports2.monitoringDeliveryKeySchema = zod_12.z.strictObject({ producer, businessKey: key });
18917
+ exports2.monitoringCatalogQuerySchema = zod_12.z.strictObject({ producer });
18918
+ exports2.monitoringBucketCatalogSchema = zod_12.z.strictObject({
18919
+ producer,
18920
+ complete: zod_12.z.literal(true),
18921
+ buckets: zod_12.z.array(zod_12.z.strictObject({
18922
+ slug: zod_12.z.string().min(1).max(512),
18923
+ name: zod_12.z.string().max(512),
18924
+ description: zod_12.z.string().max(5e4),
18925
+ severity: zod_12.z.enum(["critical", "high", "medium", "low"]),
18926
+ category: zod_12.z.string().max(512)
18927
+ })).max(2e3)
18928
+ });
18929
+ exports2.monitoringPublishSchema = exports2.monitoringDeliveryKeySchema.extend({
18930
+ payloadHash: zod_12.z.string().regex(/^[a-f0-9]{64}$/),
18931
+ events: exports2.monitoringEventsSchema,
18932
+ observation: monitoring_annotations_12.functionMonitoringAnnotationSchema.optional()
18933
+ });
18934
+ exports2.functionMonitoringRequestSchema = zod_12.z.discriminatedUnion("operation", [
18935
+ exports2.monitoringPublishSchema.extend({ operation: zod_12.z.literal("publish") }),
18936
+ exports2.monitoringDeliveryKeySchema.extend({ operation: zod_12.z.literal("get") }),
18937
+ exports2.monitoringCatalogQuerySchema.extend({ operation: zod_12.z.literal("getBucketCatalog") })
18938
+ ]).superRefine((request, context2) => {
18939
+ if (Buffer.byteLength(JSON.stringify(request), "utf8") > exports2.MAX_MONITORING_DELIVERY_BYTES)
18940
+ context2.addIssue({ code: "custom", message: "Monitoring delivery exceeds the size limit" });
18941
+ });
18942
+ exports2.monitoringDeliveryReceiptSchema = zod_12.z.strictObject({
18943
+ id: zod_12.z.uuid(),
18944
+ producer,
18945
+ businessKey: key,
18946
+ payloadHash: zod_12.z.string().regex(/^[a-f0-9]{64}$/),
18947
+ status: zod_12.z.literal("confirmed"),
18948
+ eventCount: zod_12.z.number().int().min(0).max(monitoring_events_1.MAX_DELTA_EVENTS_PER_REQUEST),
18949
+ confirmedAt: zod_12.z.iso.datetime({ offset: true }),
18950
+ eventIds: zod_12.z.array(zod_12.z.uuid()).max(monitoring_events_1.MAX_DELTA_EVENTS_PER_REQUEST)
18951
+ }).refine((receipt) => receipt.eventCount === receipt.eventIds.length && new Set(receipt.eventIds).size === receipt.eventIds.length, "Receipt count must match distinct event ids");
18952
+ var FunctionMonitoringError = class extends Error {
18953
+ status;
18954
+ code;
18955
+ name = "FunctionMonitoringError";
18956
+ constructor(status, code, message) {
18957
+ super(message);
18958
+ this.status = status;
18959
+ this.code = code;
18960
+ }
18961
+ };
18962
+ exports2.FunctionMonitoringError = FunctionMonitoringError;
18963
+ }
18964
+ });
18965
+
18966
+ // dist/monitoring.js
18967
+ var require_monitoring = __commonJS({
18968
+ "dist/monitoring.js"(exports2) {
18969
+ "use strict";
18970
+ Object.defineProperty(exports2, "__esModule", { value: true });
18971
+ exports2.createFunctionServiceMonitoringClient = createFunctionServiceMonitoringClient;
18972
+ var zod_12 = require_zod();
18973
+ var monitoring_contract_12 = require_monitoring_contract();
18974
+ function credential(request) {
18975
+ const headers = request.headers;
18976
+ const matches = typeof headers.get === "function" ? [headers.get(monitoring_contract_12.FUNCTION_MONITORING_TOKEN_HEADER)] : Object.entries(headers).filter(([name]) => name.toLowerCase() === monitoring_contract_12.FUNCTION_MONITORING_TOKEN_HEADER).map(([, value2]) => value2);
18977
+ const token = matches[0];
18978
+ const invalid = () => new monitoring_contract_12.FunctionMonitoringError(401, "invalid_context", "This invocation has no valid monitoring credential");
18979
+ if (matches.length !== 1 || typeof token !== "string" || token.length > 16384)
18980
+ throw invalid();
18981
+ const envelope = /^([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]{43})$/.exec(token);
18982
+ if (!envelope?.[1])
18983
+ throw invalid();
18984
+ let value;
18985
+ try {
18986
+ value = JSON.parse(Buffer.from(envelope[1], "base64url").toString("utf8"));
18987
+ } catch {
18988
+ throw invalid();
18989
+ }
18990
+ const parsed = zod_12.z.object({ audience: zod_12.z.literal("atlas-managed-function-monitoring"), sub: zod_12.z.string().startsWith("service-account|"), exp: zod_12.z.number().int() }).safeParse(value);
18991
+ if (!parsed.success)
18992
+ throw invalid();
18993
+ return { token, expiresAt: parsed.data.exp };
18994
+ }
18995
+ function origin(baseUrl) {
18996
+ let url;
18997
+ try {
18998
+ url = new URL(baseUrl);
18999
+ } catch {
19000
+ throw new monitoring_contract_12.FunctionMonitoringError(400, "invalid_configuration", "Configure a trusted Atlas origin");
19001
+ }
19002
+ const local = url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname);
19003
+ if (!local && url.protocol !== "https:" || url.username || url.password || url.pathname !== "/" || url.search || url.hash) {
19004
+ throw new monitoring_contract_12.FunctionMonitoringError(400, "invalid_configuration", "Configure an HTTPS Atlas origin without credentials, path, query or fragment");
19005
+ }
19006
+ return url.origin;
19007
+ }
19008
+ function createFunctionServiceMonitoringClient({ request, baseUrl, fetchImpl = globalThis.fetch }) {
19009
+ const url = `${origin(baseUrl)}${monitoring_contract_12.FUNCTION_MONITORING_DELIVERIES_PATH}`;
19010
+ const { token, expiresAt } = credential(request);
19011
+ async function call(body) {
19012
+ if (expiresAt <= Date.now() / 1e3)
19013
+ throw new monitoring_contract_12.FunctionMonitoringError(401, "expired_context", "The monitoring credential expired; start a new invocation");
19014
+ const input = monitoring_contract_12.functionMonitoringRequestSchema.parse(body);
19015
+ const response = await fetchImpl(url, {
19016
+ method: "POST",
19017
+ headers: { "content-type": "application/json", [monitoring_contract_12.FUNCTION_MONITORING_TOKEN_HEADER]: token },
19018
+ body: JSON.stringify(input),
19019
+ redirect: "error",
19020
+ signal: AbortSignal.timeout(3e4)
19021
+ });
19022
+ const result = await response.json().catch(() => null);
19023
+ if (!response.ok) {
19024
+ const error = zod_12.z.object({ code: zod_12.z.string().max(128).optional(), detail: zod_12.z.string().max(2e3).optional() }).safeParse(result);
19025
+ throw new monitoring_contract_12.FunctionMonitoringError(response.status, error.success ? error.data.code ?? "monitoring_failed" : "monitoring_failed", error.success ? error.data.detail ?? "Monitoring delivery failed" : "Monitoring delivery failed");
19026
+ }
19027
+ return result;
19028
+ }
19029
+ async function delivery(input, operation) {
19030
+ const validated = monitoring_contract_12.monitoringDeliveryReceiptSchema.safeParse(await call({ ...input, operation }));
19031
+ if (!validated.success || validated.data.producer !== input.producer || validated.data.businessKey !== input.businessKey || "payloadHash" in input && validated.data.payloadHash !== input.payloadHash || "events" in input && validated.data.eventCount !== input.events.length) {
19032
+ throw new monitoring_contract_12.FunctionMonitoringError(502, "malformed_response", "Atlas returned an invalid monitoring receipt");
19033
+ }
19034
+ return validated.data;
19035
+ }
19036
+ return {
19037
+ publish: (input) => delivery(input, "publish"),
19038
+ get: (input) => delivery(input, "get"),
19039
+ async getBucketCatalog(input) {
19040
+ const validated = monitoring_contract_12.monitoringBucketCatalogSchema.safeParse(await call({ ...input, operation: "getBucketCatalog" }));
19041
+ if (!validated.success || validated.data.producer !== input.producer)
19042
+ throw new monitoring_contract_12.FunctionMonitoringError(502, "malformed_response", "Atlas returned an invalid monitoring catalog");
19043
+ return validated.data;
19044
+ }
19045
+ };
19046
+ }
19047
+ }
19048
+ });
19049
+
17241
19050
  // dist/http-tracing.js
17242
19051
  var require_http_tracing = __commonJS({
17243
19052
  "dist/http-tracing.js"(exports2) {
@@ -17261,6 +19070,8 @@ var require_http_tracing = __commonJS({
17261
19070
  return false;
17262
19071
  if (method === "POST" && /^\/api\/lattice\/(runs|processes\/[^/]+\/runs)\/?$/.test(pathname))
17263
19072
  return false;
19073
+ if (method === "POST" && /^\/api\/external-systems\/call\/?$/.test(pathname))
19074
+ return false;
17264
19075
  return true;
17265
19076
  }
17266
19077
  }
@@ -27982,7 +29793,7 @@ var require_scope = __commonJS({
27982
29793
  var require_dist = __commonJS({
27983
29794
  "../storage/dist/index.js"(exports2) {
27984
29795
  "use strict";
27985
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
29796
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
27986
29797
  if (k2 === void 0) k2 = k;
27987
29798
  var desc = Object.getOwnPropertyDescriptor(m2, k);
27988
29799
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -27995,16 +29806,16 @@ var require_dist = __commonJS({
27995
29806
  if (k2 === void 0) k2 = k;
27996
29807
  o[k2] = m2[k];
27997
29808
  }));
27998
- var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
27999
- for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
29809
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
29810
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
28000
29811
  };
28001
29812
  Object.defineProperty(exports2, "__esModule", { value: true });
28002
- __exportStar(require_contracts(), exports2);
28003
- __exportStar(require_paths(), exports2);
28004
- __exportStar(require_client(), exports2);
28005
- __exportStar(require_transfer(), exports2);
28006
- __exportStar(require_crc32c(), exports2);
28007
- __exportStar(require_scope(), exports2);
29813
+ __exportStar2(require_contracts(), exports2);
29814
+ __exportStar2(require_paths(), exports2);
29815
+ __exportStar2(require_client(), exports2);
29816
+ __exportStar2(require_transfer(), exports2);
29817
+ __exportStar2(require_crc32c(), exports2);
29818
+ __exportStar2(require_scope(), exports2);
28008
29819
  }
28009
29820
  });
28010
29821
 
@@ -28027,6 +29838,144 @@ var require_storage = __commonJS({
28027
29838
  }
28028
29839
  });
28029
29840
 
29841
+ // dist/directory-contract.js
29842
+ var require_directory_contract = __commonJS({
29843
+ "dist/directory-contract.js"(exports2) {
29844
+ "use strict";
29845
+ Object.defineProperty(exports2, "__esModule", { value: true });
29846
+ exports2.DirectoryPrincipalResolveError = exports2.functionDirectoryScopesSchema = exports2.directoryPrincipalResolutionSchema = exports2.directoryResolvedPrincipalSchema = exports2.directoryPrincipalResolveRequestSchema = exports2.directoryPrincipalLookupSchema = exports2.directoryTenantSchema = exports2.DIRECTORY_PRINCIPALS_PER_REQUEST = exports2.FUNCTION_DIRECTORY_RESOLVE_PATH = exports2.FUNCTION_DIRECTORY_TOKEN_HEADER = void 0;
29847
+ exports2.readFunctionDirectoryScopes = readFunctionDirectoryScopes;
29848
+ var zod_12 = require_zod();
29849
+ exports2.FUNCTION_DIRECTORY_TOKEN_HEADER = "x-sequence-directory-service-token";
29850
+ exports2.FUNCTION_DIRECTORY_RESOLVE_PATH = "/api/managed-functions/directory/resolve";
29851
+ exports2.DIRECTORY_PRINCIPALS_PER_REQUEST = 50;
29852
+ exports2.directoryTenantSchema = zod_12.z.string().min(1).max(32).regex(/^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/);
29853
+ var subject = zod_12.z.string().min(3).max(255).regex(/^[^\s:#]+\|[^\s:#]+$/);
29854
+ var email = zod_12.z.email().max(255).transform((value) => value.trim().toLowerCase());
29855
+ exports2.directoryPrincipalLookupSchema = zod_12.z.discriminatedUnion("type", [
29856
+ zod_12.z.strictObject({ type: zod_12.z.literal("email"), value: email }),
29857
+ zod_12.z.strictObject({ type: zod_12.z.literal("sub"), value: subject })
29858
+ ]);
29859
+ exports2.directoryPrincipalResolveRequestSchema = zod_12.z.strictObject({
29860
+ tenant: exports2.directoryTenantSchema,
29861
+ lookups: zod_12.z.array(exports2.directoryPrincipalLookupSchema).min(1).max(exports2.DIRECTORY_PRINCIPALS_PER_REQUEST).refine((values) => new Set(values.map((value) => `${value.type}:${value.value}`)).size === values.length, "Lookups must be distinct")
29862
+ });
29863
+ exports2.directoryResolvedPrincipalSchema = zod_12.z.strictObject({
29864
+ lookup: exports2.directoryPrincipalLookupSchema,
29865
+ sub: subject.refine((value) => !value.startsWith("service-account|") && !value.startsWith("managed-function|") && !value.endsWith("@clients") && value !== "google-apps|sequence.agent@seqholdings.com", "Only human directory principals can resolve"),
29866
+ email: zod_12.z.union([email, zod_12.z.literal("")]),
29867
+ name: zod_12.z.string().max(255)
29868
+ });
29869
+ exports2.directoryPrincipalResolutionSchema = zod_12.z.strictObject({
29870
+ resolved: zod_12.z.array(exports2.directoryResolvedPrincipalSchema).max(exports2.DIRECTORY_PRINCIPALS_PER_REQUEST),
29871
+ unresolved: zod_12.z.array(exports2.directoryPrincipalLookupSchema).max(exports2.DIRECTORY_PRINCIPALS_PER_REQUEST)
29872
+ });
29873
+ exports2.functionDirectoryScopesSchema = zod_12.z.strictObject({
29874
+ resolve: zod_12.z.array(exports2.directoryTenantSchema).min(1).max(16).refine((values) => new Set(values).size === values.length, "Tenant scopes must be distinct")
29875
+ });
29876
+ function readFunctionDirectoryScopes(manifest) {
29877
+ if (typeof manifest !== "object" || manifest === null)
29878
+ return [];
29879
+ const capabilities = Reflect.get(manifest, "capabilities");
29880
+ if (typeof capabilities !== "object" || capabilities === null)
29881
+ return [];
29882
+ const directory = Reflect.get(capabilities, "directory");
29883
+ if (typeof directory !== "object" || directory === null)
29884
+ return [];
29885
+ const resolve = Reflect.get(directory, "resolve");
29886
+ return resolve === void 0 ? [] : exports2.functionDirectoryScopesSchema.parse({ resolve }).resolve;
29887
+ }
29888
+ var DirectoryPrincipalResolveError = class extends Error {
29889
+ status;
29890
+ code;
29891
+ name = "DirectoryPrincipalResolveError";
29892
+ constructor(status, code, message) {
29893
+ super(message);
29894
+ this.status = status;
29895
+ this.code = code;
29896
+ }
29897
+ };
29898
+ exports2.DirectoryPrincipalResolveError = DirectoryPrincipalResolveError;
29899
+ }
29900
+ });
29901
+
29902
+ // dist/directory-manifest.js
29903
+ var require_directory_manifest = __commonJS({
29904
+ "dist/directory-manifest.js"(exports2) {
29905
+ "use strict";
29906
+ Object.defineProperty(exports2, "__esModule", { value: true });
29907
+ exports2.functionDirectoryManifestSchema = void 0;
29908
+ var zod_12 = require_zod();
29909
+ var directory_config_1 = require_directory_config();
29910
+ var directory_contract_1 = require_directory_contract();
29911
+ exports2.functionDirectoryManifestSchema = zod_12.z.strictObject({
29912
+ groups: directory_config_1.directoryScopesSchema.shape.groups.optional(),
29913
+ resolve: directory_contract_1.functionDirectoryScopesSchema.shape.resolve.optional()
29914
+ }).refine((value) => value.groups !== void 0 || value.resolve !== void 0, "Declare directory groups, tenant resolution scopes, or both");
29915
+ }
29916
+ });
29917
+
29918
+ // dist/workflow-scopes-contract.js
29919
+ var require_workflow_scopes_contract = __commonJS({
29920
+ "dist/workflow-scopes-contract.js"(exports2) {
29921
+ "use strict";
29922
+ Object.defineProperty(exports2, "__esModule", { value: true });
29923
+ exports2.functionWorkflowScopesSchema = void 0;
29924
+ exports2.readFunctionWorkflowScopes = readFunctionWorkflowScopes;
29925
+ exports2.readFunctionWorkflowEvidenceScopes = readFunctionWorkflowEvidenceScopes;
29926
+ var zod_12 = require_zod();
29927
+ var workflowId = zod_12.z.string().min(1).max(255).regex(/^[A-Za-z0-9._-]+$/);
29928
+ var exactWorkflowIds = zod_12.z.array(workflowId).min(1).max(64).refine((ids) => new Set(ids).size === ids.length, "Workflow ids must be distinct").refine((ids) => ids.reduce((bytes, id) => bytes + id.length, 0) <= 8192, "Workflow ids must fit within 8192 bytes");
29929
+ exports2.functionWorkflowScopesSchema = zod_12.z.strictObject({
29930
+ read: exactWorkflowIds.optional(),
29931
+ evidence: exactWorkflowIds.optional()
29932
+ }).refine((scopes) => scopes.read !== void 0 || scopes.evidence !== void 0, "Declare workflow reads or evidence verification");
29933
+ function readWorkflowCapabilities({ manifest }) {
29934
+ if (typeof manifest !== "object" || manifest === null)
29935
+ return null;
29936
+ const capabilities = Reflect.get(manifest, "capabilities");
29937
+ if (typeof capabilities !== "object" || capabilities === null)
29938
+ return null;
29939
+ const workflows = Reflect.get(capabilities, "workflows");
29940
+ return workflows === void 0 ? null : exports2.functionWorkflowScopesSchema.parse(workflows);
29941
+ }
29942
+ function readFunctionWorkflowScopes(manifest) {
29943
+ return readWorkflowCapabilities({ manifest })?.read ?? [];
29944
+ }
29945
+ function readFunctionWorkflowEvidenceScopes(manifest) {
29946
+ return readWorkflowCapabilities({ manifest })?.evidence ?? [];
29947
+ }
29948
+ }
29949
+ });
29950
+
29951
+ // dist/orm-contract.js
29952
+ var require_orm_contract = __commonJS({
29953
+ "dist/orm-contract.js"(exports2) {
29954
+ "use strict";
29955
+ Object.defineProperty(exports2, "__esModule", { value: true });
29956
+ exports2.FUNCTION_CALLER_DATA_TOKEN_HEADER = void 0;
29957
+ exports2.FUNCTION_CALLER_DATA_TOKEN_HEADER = "x-sequence-caller-data-token";
29958
+ }
29959
+ });
29960
+
29961
+ // dist/immutable-release-contract.js
29962
+ var require_immutable_release_contract = __commonJS({
29963
+ "dist/immutable-release-contract.js"(exports2) {
29964
+ "use strict";
29965
+ Object.defineProperty(exports2, "__esModule", { value: true });
29966
+ exports2.functionImmutableReleaseSchema = void 0;
29967
+ exports2.readFunctionImmutableRelease = readFunctionImmutableRelease;
29968
+ var zod_12 = require_zod();
29969
+ exports2.functionImmutableReleaseSchema = zod_12.z.boolean();
29970
+ function readFunctionImmutableRelease(manifest) {
29971
+ if (typeof manifest !== "object" || manifest === null)
29972
+ return false;
29973
+ const fn = Reflect.get(manifest, "function");
29974
+ return typeof fn === "object" && fn !== null && Reflect.get(fn, "immutable_release") === true;
29975
+ }
29976
+ }
29977
+ });
29978
+
28030
29979
  // dist/limits.js
28031
29980
  var require_limits = __commonJS({
28032
29981
  "dist/limits.js"(exports2) {
@@ -28153,6 +30102,7 @@ var require_sdk_range = __commonJS({
28153
30102
  Object.defineProperty(exports2, "__esModule", { value: true });
28154
30103
  exports2.concreteOrStaleSdkSpec = concreteOrStaleSdkSpec;
28155
30104
  exports2.sdkConstraintIsOlder = sdkConstraintIsOlder;
30105
+ exports2.sdkSpecAllowsOnlyAtOrAbove = sdkSpecAllowsOnlyAtOrAbove;
28156
30106
  function parseSemver(raw) {
28157
30107
  const match = /^v?(\d+)\.(\d+)\.(\d+)$/.exec(raw.trim());
28158
30108
  if (!match)
@@ -28290,6 +30240,29 @@ var require_sdk_range = __commonJS({
28290
30240
  }
28291
30241
  return concreteOrStaleSdkSpec(declared, minimum) === declared;
28292
30242
  }
30243
+ function sdkSpecAllowsOnlyAtOrAbove(declared, minimum) {
30244
+ const target = parseSemver(minimum);
30245
+ if (!target || !target.every(Number.isSafeInteger))
30246
+ return false;
30247
+ const alternatives = declared.trim().split("||");
30248
+ if (alternatives.some((alternative) => alternative.trim() === ""))
30249
+ return false;
30250
+ return alternatives.every((alternative) => {
30251
+ const versions = alternative.match(/\d+\.\d+\.\d+/g) ?? [];
30252
+ if (!versions.every((version) => /^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/.test(version)))
30253
+ return false;
30254
+ const bounds = clauseBounds(alternative);
30255
+ if (!bounds || !bounds.min.every(Number.isSafeInteger) || bounds.max && !bounds.max.every(Number.isSafeInteger))
30256
+ return false;
30257
+ const first = bounds.minInclusive ? bounds.min : [bounds.min[0], bounds.min[1], bounds.min[2] + 1];
30258
+ if (!first.every(Number.isSafeInteger) || compare(first, target) < 0)
30259
+ return false;
30260
+ if (!bounds.max)
30261
+ return true;
30262
+ const relation = compare(first, bounds.max);
30263
+ return relation < 0 || relation === 0 && bounds.maxInclusive;
30264
+ });
30265
+ }
28293
30266
  }
28294
30267
  });
28295
30268
 
@@ -28302,6 +30275,7 @@ var require_capabilities = __commonJS({
28302
30275
  exports2.versionIsOlder = versionIsOlder;
28303
30276
  exports2.sdkVersionLowerBound = sdkVersionLowerBound;
28304
30277
  exports2.sdkVersionFromPackageJson = sdkVersionFromPackageJson;
30278
+ exports2.sdkSpecFromPackageJson = sdkSpecFromPackageJson;
28305
30279
  exports2.isPostgresEgress = isPostgresEgress;
28306
30280
  exports2.formatValidationDetail = formatValidationDetail;
28307
30281
  var sdk_range_1 = require_sdk_range();
@@ -28320,6 +30294,76 @@ var require_capabilities = __commonJS({
28320
30294
  min_cli: "0.5.2",
28321
30295
  min_sdk: "0.4.1"
28322
30296
  },
30297
+ abrigo_read: {
30298
+ field: "capabilities.abrigo.read",
30299
+ supported: true,
30300
+ limit: "eleven fixed human reads: eight integration reads and three workflow-scoped document-review reads; pages 1 to 100 with 1 to 500 rows; 1 MiB JSON responses",
30301
+ min_cli: "0.5.5",
30302
+ min_sdk: "0.4.2"
30303
+ },
30304
+ immutable_release: {
30305
+ field: "function.immutable_release",
30306
+ supported: true,
30307
+ limit: "a fresh function identity whose runtime cannot be redeployed after first activation",
30308
+ min_cli: "0.5.5",
30309
+ min_sdk: "0.4.2"
30310
+ },
30311
+ invocation_identity: {
30312
+ field: "capabilities.invocation.identity",
30313
+ supported: true,
30314
+ limit: "verified receiver and actual caller for this exact active invocation only",
30315
+ min_cli: "0.5.5",
30316
+ min_sdk: "0.4.2"
30317
+ },
30318
+ directory_resolve: {
30319
+ field: "capabilities.directory.resolve",
30320
+ supported: true,
30321
+ limit: "1 to 16 exact tenant scopes; at most 50 exact active human principal lookups",
30322
+ min_cli: "0.5.5",
30323
+ min_sdk: "0.4.2"
30324
+ },
30325
+ lattice_context: {
30326
+ field: "capabilities.lattice.context",
30327
+ supported: true,
30328
+ limit: "verified context and causal human completion for the receiving Lattice step only",
30329
+ min_cli: "0.5.5",
30330
+ min_sdk: "0.4.2"
30331
+ },
30332
+ agents_read: {
30333
+ field: "capabilities.agents.read",
30334
+ supported: true,
30335
+ limit: "1 to 64 exact agent ids; completed owned or verified upstream responses only",
30336
+ min_cli: "0.5.5",
30337
+ min_sdk: "0.4.2"
30338
+ },
30339
+ agents_evidence_verify: {
30340
+ field: "capabilities.agents.evidence",
30341
+ supported: true,
30342
+ limit: "1 to 64 exact agent ids; verify bounded supplied historical source evidence only",
30343
+ min_cli: "0.5.5",
30344
+ min_sdk: "0.4.2"
30345
+ },
30346
+ workflows_read: {
30347
+ field: "capabilities.workflows.read",
30348
+ supported: true,
30349
+ limit: "1 to 64 exact workflow ids; completed owned root outputs only",
30350
+ min_cli: "0.5.5",
30351
+ min_sdk: "0.4.2"
30352
+ },
30353
+ workflows_evidence_verify: {
30354
+ field: "capabilities.workflows.evidence",
30355
+ supported: true,
30356
+ limit: "1 to 64 exact workflow ids; verify bounded supplied historical root-output evidence only",
30357
+ min_cli: "0.5.5",
30358
+ min_sdk: "0.4.2"
30359
+ },
30360
+ monitoring_deliveries: {
30361
+ field: "capabilities.monitoring.producers",
30362
+ supported: true,
30363
+ limit: "1 to 16 producer namespaces; immutable publish and receipt lookup",
30364
+ min_cli: "0.5.5",
30365
+ min_sdk: "0.4.2"
30366
+ },
28323
30367
  processes_read: {
28324
30368
  field: "capabilities.processes.read",
28325
30369
  supported: true,
@@ -28370,6 +30414,9 @@ var require_capabilities = __commonJS({
28370
30414
  return (0, sdk_range_1.concreteOrStaleSdkSpec)(spec, minimum);
28371
30415
  }
28372
30416
  function sdkVersionFromPackageJson(raw) {
30417
+ return sdkVersionLowerBound(sdkSpecFromPackageJson(raw) ?? void 0);
30418
+ }
30419
+ function sdkSpecFromPackageJson(raw) {
28373
30420
  let parsed;
28374
30421
  try {
28375
30422
  parsed = JSON.parse(raw);
@@ -28380,7 +30427,8 @@ var require_capabilities = __commonJS({
28380
30427
  return null;
28381
30428
  const dependencies = Reflect.get(parsed, "dependencies");
28382
30429
  const devDependencies = Reflect.get(parsed, "devDependencies");
28383
- return sdkVersionLowerBound(dependencySpec(dependencies) ?? dependencySpec(devDependencies));
30430
+ const spec = dependencySpec(dependencies) ?? dependencySpec(devDependencies);
30431
+ return spec?.trim() || null;
28384
30432
  }
28385
30433
  function dependencySpec(block) {
28386
30434
  if (!block || typeof block !== "object")
@@ -28448,15 +30496,38 @@ var require_deployed_policy = __commonJS({
28448
30496
  return {
28449
30497
  tooling: value.tooling,
28450
30498
  features: {
30499
+ immutable_release: normalizeImmutableRelease(features.immutable_release),
30500
+ invocation_identity: normalizeInvocationIdentity(features.invocation_identity),
30501
+ directory_members: normalizeDirectoryMembers(features.directory_members),
30502
+ directory_resolve: normalizeDirectory(features.directory_resolve),
30503
+ abrigo_read: normalizeAbrigo(features.abrigo_read),
30504
+ lattice_context: normalizeLatticeContext(features.lattice_context),
28451
30505
  postgres_egress: normalizePostgres(features.postgres_egress),
28452
30506
  http_headers: normalizeHeaders(features.http_headers),
28453
30507
  invoke_timeout: normalizeTimeout(features.invoke_timeout),
28454
30508
  processes_read: normalizeProcesses(features.processes_read),
28455
- directory_members: normalizeDirectory(features.directory_members)
30509
+ agents_read: normalizeAgents(features.agents_read),
30510
+ agents_evidence_verify: normalizeAgentEvidence(features.agents_evidence_verify),
30511
+ workflows_read: normalizeWorkflowRead(features.workflows_read),
30512
+ workflows_evidence_verify: normalizeWorkflowEvidence(features.workflows_evidence_verify),
30513
+ monitoring_deliveries: normalizeMonitoring(features.monitoring_deliveries)
28456
30514
  }
28457
30515
  };
28458
30516
  }
28459
- function normalizeDirectory(value) {
30517
+ function normalizeImmutableRelease(value) {
30518
+ if (!value || typeof value.supported !== "boolean" || typeof value.limit !== "string")
30519
+ return void 0;
30520
+ if (typeof value.min_cli !== "string" || typeof value.min_sdk !== "string")
30521
+ return void 0;
30522
+ return {
30523
+ field: typeof value.field === "string" ? value.field : "function.immutable_release",
30524
+ supported: value.supported,
30525
+ limit: value.limit,
30526
+ min_cli: value.min_cli,
30527
+ min_sdk: value.min_sdk
30528
+ };
30529
+ }
30530
+ function normalizeDirectoryMembers(value) {
28460
30531
  if (!value || typeof value.supported !== "boolean" || typeof value.limit !== "string")
28461
30532
  return void 0;
28462
30533
  if (typeof value.min_cli !== "string" || typeof value.min_sdk !== "string")
@@ -28469,6 +30540,55 @@ var require_deployed_policy = __commonJS({
28469
30540
  min_sdk: value.min_sdk
28470
30541
  };
28471
30542
  }
30543
+ function normalizeDirectory(value) {
30544
+ if (!value || typeof value.supported !== "boolean" || typeof value.limit !== "string" || typeof value.min_cli !== "string" || typeof value.min_sdk !== "string")
30545
+ return void 0;
30546
+ return { field: typeof value.field === "string" ? value.field : "capabilities.directory.resolve", supported: value.supported, limit: value.limit, min_cli: value.min_cli, min_sdk: value.min_sdk };
30547
+ }
30548
+ function normalizeAbrigo(value) {
30549
+ if (!value || typeof value.supported !== "boolean" || typeof value.limit !== "string" || typeof value.min_cli !== "string" || typeof value.min_sdk !== "string")
30550
+ return void 0;
30551
+ return { field: typeof value.field === "string" ? value.field : "capabilities.abrigo.read", supported: value.supported, limit: value.limit, min_cli: value.min_cli, min_sdk: value.min_sdk };
30552
+ }
30553
+ function normalizeInvocationIdentity(value) {
30554
+ if (!value || typeof value.supported !== "boolean" || typeof value.limit !== "string")
30555
+ return void 0;
30556
+ if (typeof value.min_cli !== "string" || typeof value.min_sdk !== "string")
30557
+ return void 0;
30558
+ return {
30559
+ field: typeof value.field === "string" ? value.field : "capabilities.invocation.identity",
30560
+ supported: value.supported,
30561
+ limit: value.limit,
30562
+ min_cli: value.min_cli,
30563
+ min_sdk: value.min_sdk
30564
+ };
30565
+ }
30566
+ function normalizeLatticeContext(value) {
30567
+ if (!value || typeof value.supported !== "boolean" || typeof value.limit !== "string")
30568
+ return void 0;
30569
+ if (typeof value.min_cli !== "string" || typeof value.min_sdk !== "string")
30570
+ return void 0;
30571
+ return {
30572
+ field: typeof value.field === "string" ? value.field : "capabilities.lattice.context",
30573
+ supported: value.supported,
30574
+ limit: value.limit,
30575
+ min_cli: value.min_cli,
30576
+ min_sdk: value.min_sdk
30577
+ };
30578
+ }
30579
+ function normalizeMonitoring(value) {
30580
+ if (!value || typeof value.supported !== "boolean" || typeof value.limit !== "string")
30581
+ return void 0;
30582
+ if (typeof value.min_cli !== "string" || typeof value.min_sdk !== "string")
30583
+ return void 0;
30584
+ return {
30585
+ field: typeof value.field === "string" ? value.field : "capabilities.monitoring.producers",
30586
+ supported: value.supported,
30587
+ limit: value.limit,
30588
+ min_cli: value.min_cli,
30589
+ min_sdk: value.min_sdk
30590
+ };
30591
+ }
28472
30592
  function normalizeProcesses(value) {
28473
30593
  if (!value || typeof value.supported !== "boolean" || typeof value.limit !== "string")
28474
30594
  return void 0;
@@ -28482,6 +30602,34 @@ var require_deployed_policy = __commonJS({
28482
30602
  min_sdk: value.min_sdk
28483
30603
  };
28484
30604
  }
30605
+ function normalizeAgents(value) {
30606
+ if (!value || typeof value.supported !== "boolean" || typeof value.limit !== "string")
30607
+ return void 0;
30608
+ if (typeof value.min_cli !== "string" || typeof value.min_sdk !== "string")
30609
+ return void 0;
30610
+ return { field: typeof value.field === "string" ? value.field : "capabilities.agents.read", supported: value.supported, limit: value.limit, min_cli: value.min_cli, min_sdk: value.min_sdk };
30611
+ }
30612
+ function normalizeAgentEvidence(value) {
30613
+ if (!value || typeof value.supported !== "boolean" || typeof value.limit !== "string")
30614
+ return void 0;
30615
+ if (typeof value.min_cli !== "string" || typeof value.min_sdk !== "string")
30616
+ return void 0;
30617
+ return { field: typeof value.field === "string" ? value.field : "capabilities.agents.evidence", supported: value.supported, limit: value.limit, min_cli: value.min_cli, min_sdk: value.min_sdk };
30618
+ }
30619
+ function normalizeWorkflowRead(value) {
30620
+ if (!value || typeof value.supported !== "boolean" || typeof value.limit !== "string")
30621
+ return void 0;
30622
+ if (typeof value.min_cli !== "string" || typeof value.min_sdk !== "string")
30623
+ return void 0;
30624
+ return { field: typeof value.field === "string" ? value.field : "capabilities.workflows.read", supported: value.supported, limit: value.limit, min_cli: value.min_cli, min_sdk: value.min_sdk };
30625
+ }
30626
+ function normalizeWorkflowEvidence(value) {
30627
+ if (!value || typeof value.supported !== "boolean" || typeof value.limit !== "string")
30628
+ return void 0;
30629
+ if (typeof value.min_cli !== "string" || typeof value.min_sdk !== "string")
30630
+ return void 0;
30631
+ return { field: typeof value.field === "string" ? value.field : "capabilities.workflows.evidence", supported: value.supported, limit: value.limit, min_cli: value.min_cli, min_sdk: value.min_sdk };
30632
+ }
28485
30633
  function normalizePostgres(value) {
28486
30634
  if (!value || typeof value.supported !== "boolean" || typeof value.limit !== "string")
28487
30635
  return void 0;
@@ -28598,6 +30746,347 @@ var require_preflight_processes = __commonJS({
28598
30746
  }
28599
30747
  });
28600
30748
 
30749
+ // dist/preflight-lattice.js
30750
+ var require_preflight_lattice = __commonJS({
30751
+ "dist/preflight-lattice.js"(exports2) {
30752
+ "use strict";
30753
+ Object.defineProperty(exports2, "__esModule", { value: true });
30754
+ exports2.checkLatticeContext = checkLatticeContext;
30755
+ var capabilities_1 = require_capabilities();
30756
+ var lattice_capability_12 = require_lattice_capability();
30757
+ var preflight_issue_1 = require_preflight_issue();
30758
+ var sdk_range_1 = require_sdk_range();
30759
+ function checkLatticeContext({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues }) {
30760
+ const lattice = manifest.capabilities?.lattice;
30761
+ if (lattice === void 0)
30762
+ return;
30763
+ const deployed = capabilities?.features.lattice_context;
30764
+ const feature = deployed ?? capabilities_1.MANAGED_FUNCTION_CAPABILITIES.features.lattice_context;
30765
+ const details = {
30766
+ limit: feature.limit,
30767
+ tooling,
30768
+ requiredCli: feature.min_cli,
30769
+ requiredSdk: feature.min_sdk,
30770
+ cliVersion,
30771
+ sdkVersion
30772
+ };
30773
+ const parsed = lattice_capability_12.functionLatticeContextCapabilitySchema.safeParse(lattice);
30774
+ if (!parsed.success) {
30775
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
30776
+ ...details,
30777
+ field: "capabilities.lattice",
30778
+ problem: (0, capabilities_1.formatValidationDetail)(parsed.error.issues)
30779
+ }));
30780
+ return;
30781
+ }
30782
+ if (checkDeployment && deployed?.supported !== true) {
30783
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
30784
+ ...details,
30785
+ field: feature.field,
30786
+ problem: "Lattice execution context reads are not supported by this deployment"
30787
+ }));
30788
+ return;
30789
+ }
30790
+ if ((0, capabilities_1.versionIsOlder)(cliVersion, feature.min_cli) || sdkVersion && (0, sdk_range_1.sdkConstraintIsOlder)(sdkVersion, feature.min_sdk)) {
30791
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
30792
+ ...details,
30793
+ field: feature.field,
30794
+ problem: "the installed tooling does not support managed function Lattice context reads"
30795
+ }));
30796
+ }
30797
+ }
30798
+ }
30799
+ });
30800
+
30801
+ // dist/preflight-invocation.js
30802
+ var require_preflight_invocation = __commonJS({
30803
+ "dist/preflight-invocation.js"(exports2) {
30804
+ "use strict";
30805
+ Object.defineProperty(exports2, "__esModule", { value: true });
30806
+ exports2.checkInvocationIdentity = checkInvocationIdentity;
30807
+ var capabilities_1 = require_capabilities();
30808
+ var invocation_contract_1 = require_invocation_contract();
30809
+ var preflight_issue_1 = require_preflight_issue();
30810
+ var sdk_range_1 = require_sdk_range();
30811
+ function checkInvocationIdentity({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues }) {
30812
+ const invocation = manifest.capabilities?.invocation;
30813
+ if (invocation === void 0)
30814
+ return;
30815
+ const deployed = capabilities?.features.invocation_identity;
30816
+ const feature = deployed ?? capabilities_1.MANAGED_FUNCTION_CAPABILITIES.features.invocation_identity;
30817
+ const details = {
30818
+ limit: feature.limit,
30819
+ tooling,
30820
+ requiredCli: feature.min_cli,
30821
+ requiredSdk: feature.min_sdk,
30822
+ cliVersion,
30823
+ sdkVersion
30824
+ };
30825
+ const parsed = invocation_contract_1.functionInvocationIdentityCapabilitySchema.safeParse(invocation);
30826
+ if (!parsed.success) {
30827
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
30828
+ ...details,
30829
+ field: "capabilities.invocation",
30830
+ problem: (0, capabilities_1.formatValidationDetail)(parsed.error.issues)
30831
+ }));
30832
+ return;
30833
+ }
30834
+ if (checkDeployment && deployed?.supported !== true) {
30835
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
30836
+ ...details,
30837
+ field: feature.field,
30838
+ problem: "Invocation identity reads are not supported by this deployment"
30839
+ }));
30840
+ return;
30841
+ }
30842
+ if ((0, capabilities_1.versionIsOlder)(cliVersion, feature.min_cli) || sdkVersion && (0, sdk_range_1.sdkConstraintIsOlder)(sdkVersion, feature.min_sdk)) {
30843
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
30844
+ ...details,
30845
+ field: feature.field,
30846
+ problem: "the installed tooling does not support managed function invocation identity reads"
30847
+ }));
30848
+ }
30849
+ }
30850
+ }
30851
+ });
30852
+
30853
+ // dist/preflight-immutable-release.js
30854
+ var require_preflight_immutable_release = __commonJS({
30855
+ "dist/preflight-immutable-release.js"(exports2) {
30856
+ "use strict";
30857
+ Object.defineProperty(exports2, "__esModule", { value: true });
30858
+ exports2.checkImmutableRelease = checkImmutableRelease;
30859
+ var capabilities_1 = require_capabilities();
30860
+ var preflight_issue_1 = require_preflight_issue();
30861
+ var immutable_release_contract_1 = require_immutable_release_contract();
30862
+ var sdk_range_1 = require_sdk_range();
30863
+ function checkImmutableRelease({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues }) {
30864
+ const declaration = manifest.function?.immutable_release;
30865
+ if (declaration === void 0 || declaration === false)
30866
+ return;
30867
+ const deployed = capabilities?.features.immutable_release;
30868
+ const feature = deployed ?? capabilities_1.MANAGED_FUNCTION_CAPABILITIES.features.immutable_release;
30869
+ const details = {
30870
+ field: "function.immutable_release",
30871
+ limit: feature.limit,
30872
+ tooling,
30873
+ requiredCli: feature.min_cli,
30874
+ requiredSdk: feature.min_sdk,
30875
+ cliVersion,
30876
+ sdkVersion
30877
+ };
30878
+ if (!immutable_release_contract_1.functionImmutableReleaseSchema.safeParse(declaration).success) {
30879
+ issues.push((0, preflight_issue_1.createPreflightIssue)({ ...details, problem: "must be a boolean" }));
30880
+ return;
30881
+ }
30882
+ if (checkDeployment && deployed?.supported !== true) {
30883
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
30884
+ ...details,
30885
+ problem: "Immutable function releases are not supported by this deployment"
30886
+ }));
30887
+ return;
30888
+ }
30889
+ if ((0, capabilities_1.versionIsOlder)(cliVersion, feature.min_cli) || sdkVersion && (0, sdk_range_1.sdkConstraintIsOlder)(sdkVersion, feature.min_sdk)) {
30890
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
30891
+ ...details,
30892
+ problem: "the installed tooling does not support immutable function releases"
30893
+ }));
30894
+ }
30895
+ }
30896
+ }
30897
+ });
30898
+
30899
+ // dist/preflight-agents.js
30900
+ var require_preflight_agents = __commonJS({
30901
+ "dist/preflight-agents.js"(exports2) {
30902
+ "use strict";
30903
+ Object.defineProperty(exports2, "__esModule", { value: true });
30904
+ exports2.checkAgents = checkAgents;
30905
+ var capabilities_1 = require_capabilities();
30906
+ var preflight_issue_1 = require_preflight_issue();
30907
+ var agents_contract_1 = require_agents_contract();
30908
+ var sdk_range_1 = require_sdk_range();
30909
+ function checkAgents({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues }) {
30910
+ const agents = manifest.capabilities?.agents;
30911
+ if (agents === void 0)
30912
+ return;
30913
+ const parsed = agents_contract_1.functionAgentReadScopesSchema.safeParse(agents);
30914
+ const keys = parsed.success && parsed.data.read === void 0 ? [] : ["agents_read"];
30915
+ if (parsed.success && parsed.data.evidence !== void 0)
30916
+ keys.push("agents_evidence_verify");
30917
+ for (const key of keys) {
30918
+ const deployed = capabilities?.features[key];
30919
+ const feature = deployed ?? capabilities_1.MANAGED_FUNCTION_CAPABILITIES.features[key];
30920
+ const details = {
30921
+ limit: feature.limit,
30922
+ tooling,
30923
+ requiredCli: feature.min_cli,
30924
+ requiredSdk: feature.min_sdk,
30925
+ cliVersion,
30926
+ sdkVersion
30927
+ };
30928
+ if (!parsed.success) {
30929
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
30930
+ ...details,
30931
+ field: "capabilities.agents",
30932
+ problem: (0, capabilities_1.formatValidationDetail)(parsed.error.issues)
30933
+ }));
30934
+ return;
30935
+ }
30936
+ if (checkDeployment && deployed?.supported !== true) {
30937
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
30938
+ ...details,
30939
+ field: feature.field,
30940
+ problem: "the declared agent capability is not supported by this deployment"
30941
+ }));
30942
+ continue;
30943
+ }
30944
+ if ((0, capabilities_1.versionIsOlder)(cliVersion, feature.min_cli) || sdkVersion && (0, sdk_range_1.sdkConstraintIsOlder)(sdkVersion, feature.min_sdk)) {
30945
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
30946
+ ...details,
30947
+ field: feature.field,
30948
+ problem: "the installed tooling does not support the declared agent capability"
30949
+ }));
30950
+ }
30951
+ }
30952
+ }
30953
+ }
30954
+ });
30955
+
30956
+ // dist/preflight-workflows.js
30957
+ var require_preflight_workflows = __commonJS({
30958
+ "dist/preflight-workflows.js"(exports2) {
30959
+ "use strict";
30960
+ Object.defineProperty(exports2, "__esModule", { value: true });
30961
+ exports2.checkWorkflows = checkWorkflows;
30962
+ var capabilities_1 = require_capabilities();
30963
+ var preflight_issue_1 = require_preflight_issue();
30964
+ var sdk_range_1 = require_sdk_range();
30965
+ var workflow_scopes_contract_1 = require_workflow_scopes_contract();
30966
+ function checkWorkflows({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues }) {
30967
+ const workflows = manifest.capabilities?.workflows;
30968
+ if (workflows === void 0)
30969
+ return;
30970
+ const parsed = workflow_scopes_contract_1.functionWorkflowScopesSchema.safeParse(workflows);
30971
+ if (!parsed.success) {
30972
+ const feature = capabilities_1.MANAGED_FUNCTION_CAPABILITIES.features.workflows_read;
30973
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
30974
+ limit: feature.limit,
30975
+ tooling,
30976
+ requiredCli: feature.min_cli,
30977
+ requiredSdk: feature.min_sdk,
30978
+ cliVersion,
30979
+ sdkVersion,
30980
+ field: "capabilities.workflows",
30981
+ problem: (0, capabilities_1.formatValidationDetail)(parsed.error.issues)
30982
+ }));
30983
+ return;
30984
+ }
30985
+ const keys = [];
30986
+ if (parsed.data.read !== void 0)
30987
+ keys.push("workflows_read");
30988
+ if (parsed.data.evidence !== void 0)
30989
+ keys.push("workflows_evidence_verify");
30990
+ for (const key of keys) {
30991
+ const deployed = capabilities?.features[key];
30992
+ const feature = deployed ?? capabilities_1.MANAGED_FUNCTION_CAPABILITIES.features[key];
30993
+ const details = { limit: feature.limit, tooling, requiredCli: feature.min_cli, requiredSdk: feature.min_sdk, cliVersion, sdkVersion };
30994
+ if (checkDeployment && deployed?.supported !== true) {
30995
+ issues.push((0, preflight_issue_1.createPreflightIssue)({ ...details, field: feature.field, problem: "the declared workflow capability is not supported by this deployment" }));
30996
+ continue;
30997
+ }
30998
+ if ((0, capabilities_1.versionIsOlder)(cliVersion, feature.min_cli) || sdkVersion && (0, sdk_range_1.sdkConstraintIsOlder)(sdkVersion, feature.min_sdk)) {
30999
+ issues.push((0, preflight_issue_1.createPreflightIssue)({ ...details, field: feature.field, problem: "the installed tooling does not support the declared workflow capability" }));
31000
+ }
31001
+ }
31002
+ }
31003
+ }
31004
+ });
31005
+
31006
+ // dist/preflight-monitoring.js
31007
+ var require_preflight_monitoring = __commonJS({
31008
+ "dist/preflight-monitoring.js"(exports2) {
31009
+ "use strict";
31010
+ Object.defineProperty(exports2, "__esModule", { value: true });
31011
+ exports2.checkMonitoring = checkMonitoring;
31012
+ var capabilities_1 = require_capabilities();
31013
+ var preflight_issue_1 = require_preflight_issue();
31014
+ var monitoring_contract_12 = require_monitoring_contract();
31015
+ var sdk_range_1 = require_sdk_range();
31016
+ function checkMonitoring({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues }) {
31017
+ const monitoring = manifest.capabilities?.monitoring;
31018
+ if (monitoring === void 0)
31019
+ return;
31020
+ const deployedFeature = capabilities?.features.monitoring_deliveries;
31021
+ const feature = deployedFeature ?? capabilities_1.MANAGED_FUNCTION_CAPABILITIES.features.monitoring_deliveries;
31022
+ const details = {
31023
+ limit: feature.limit,
31024
+ tooling,
31025
+ requiredCli: feature.min_cli,
31026
+ requiredSdk: feature.min_sdk,
31027
+ cliVersion,
31028
+ sdkVersion
31029
+ };
31030
+ const parsed = monitoring_contract_12.functionMonitoringScopesSchema.safeParse(monitoring);
31031
+ if (!parsed.success) {
31032
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
31033
+ ...details,
31034
+ field: "capabilities.monitoring",
31035
+ problem: (0, capabilities_1.formatValidationDetail)(parsed.error.issues)
31036
+ }));
31037
+ return;
31038
+ }
31039
+ if (checkDeployment && deployedFeature?.supported !== true) {
31040
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
31041
+ ...details,
31042
+ field: feature.field,
31043
+ problem: "monitoring deliveries are not supported by this deployment"
31044
+ }));
31045
+ return;
31046
+ }
31047
+ if ((0, capabilities_1.versionIsOlder)(cliVersion, feature.min_cli) || sdkVersion && (0, sdk_range_1.sdkConstraintIsOlder)(sdkVersion, feature.min_sdk)) {
31048
+ issues.push((0, preflight_issue_1.createPreflightIssue)({
31049
+ ...details,
31050
+ field: feature.field,
31051
+ problem: "the installed tooling does not support managed function monitoring deliveries"
31052
+ }));
31053
+ }
31054
+ }
31055
+ }
31056
+ });
31057
+
31058
+ // dist/preflight-service-directory.js
31059
+ var require_preflight_service_directory = __commonJS({
31060
+ "dist/preflight-service-directory.js"(exports2) {
31061
+ "use strict";
31062
+ Object.defineProperty(exports2, "__esModule", { value: true });
31063
+ exports2.checkDirectory = checkDirectory;
31064
+ var capabilities_1 = require_capabilities();
31065
+ var preflight_issue_1 = require_preflight_issue();
31066
+ var directory_contract_1 = require_directory_contract();
31067
+ var sdk_range_1 = require_sdk_range();
31068
+ function checkDirectory({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues }) {
31069
+ const directory = manifest.capabilities?.directory;
31070
+ if (directory === void 0)
31071
+ return;
31072
+ const deployed = capabilities?.features.directory_resolve;
31073
+ const feature = deployed ?? capabilities_1.MANAGED_FUNCTION_CAPABILITIES.features.directory_resolve;
31074
+ const details = { limit: feature.limit, tooling, requiredCli: feature.min_cli, requiredSdk: feature.min_sdk, cliVersion, sdkVersion };
31075
+ const parsed = directory_contract_1.functionDirectoryScopesSchema.safeParse(directory);
31076
+ if (!parsed.success) {
31077
+ issues.push((0, preflight_issue_1.createPreflightIssue)({ ...details, field: "capabilities.directory", problem: (0, capabilities_1.formatValidationDetail)(parsed.error.issues) }));
31078
+ return;
31079
+ }
31080
+ if (checkDeployment && deployed?.supported !== true) {
31081
+ issues.push((0, preflight_issue_1.createPreflightIssue)({ ...details, field: feature.field, problem: "exact directory resolution is not supported by this deployment" }));
31082
+ return;
31083
+ }
31084
+ if ((0, capabilities_1.versionIsOlder)(cliVersion, feature.min_cli) || sdkVersion && (0, sdk_range_1.sdkConstraintIsOlder)(sdkVersion, feature.min_sdk))
31085
+ issues.push((0, preflight_issue_1.createPreflightIssue)({ ...details, field: feature.field, problem: "the installed tooling does not support managed function directory resolution" }));
31086
+ }
31087
+ }
31088
+ });
31089
+
28601
31090
  // dist/preflight-directory.js
28602
31091
  var require_preflight_directory = __commonJS({
28603
31092
  "dist/preflight-directory.js"(exports2) {
@@ -28650,6 +31139,38 @@ var require_preflight_directory = __commonJS({
28650
31139
  }
28651
31140
  });
28652
31141
 
31142
+ // dist/preflight-abrigo.js
31143
+ var require_preflight_abrigo = __commonJS({
31144
+ "dist/preflight-abrigo.js"(exports2) {
31145
+ "use strict";
31146
+ Object.defineProperty(exports2, "__esModule", { value: true });
31147
+ exports2.checkAbrigo = checkAbrigo;
31148
+ var capabilities_1 = require_capabilities();
31149
+ var preflight_issue_1 = require_preflight_issue();
31150
+ var abrigo_contract_1 = require_abrigo_contract();
31151
+ var sdk_range_1 = require_sdk_range();
31152
+ function checkAbrigo({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues }) {
31153
+ const abrigo = manifest.capabilities?.abrigo;
31154
+ if (abrigo === void 0)
31155
+ return;
31156
+ const deployed = capabilities?.features.abrigo_read;
31157
+ const feature = deployed ?? capabilities_1.MANAGED_FUNCTION_CAPABILITIES.features.abrigo_read;
31158
+ const details = { limit: feature.limit, tooling, requiredCli: feature.min_cli, requiredSdk: feature.min_sdk, cliVersion, sdkVersion };
31159
+ const parsed = abrigo_contract_1.functionAbrigoReadScopesSchema.safeParse(abrigo);
31160
+ if (!parsed.success) {
31161
+ issues.push((0, preflight_issue_1.createPreflightIssue)({ ...details, field: "capabilities.abrigo", problem: (0, capabilities_1.formatValidationDetail)(parsed.error.issues) }));
31162
+ return;
31163
+ }
31164
+ if (checkDeployment && deployed?.supported !== true) {
31165
+ issues.push((0, preflight_issue_1.createPreflightIssue)({ ...details, field: feature.field, problem: "caller-scoped Abrigo reads are not supported by this deployment" }));
31166
+ return;
31167
+ }
31168
+ if ((0, capabilities_1.versionIsOlder)(cliVersion, feature.min_cli) || !sdkVersion || !(0, sdk_range_1.sdkSpecAllowsOnlyAtOrAbove)(sdkVersion, feature.min_sdk))
31169
+ issues.push((0, preflight_issue_1.createPreflightIssue)({ ...details, field: feature.field, problem: "declare compatible tooling for caller-scoped Abrigo reads" }));
31170
+ }
31171
+ }
31172
+ });
31173
+
28653
31174
  // dist/preflight.js
28654
31175
  var require_preflight = __commonJS({
28655
31176
  "dist/preflight.js"(exports2) {
@@ -28660,8 +31181,22 @@ var require_preflight = __commonJS({
28660
31181
  var sdk_range_1 = require_sdk_range();
28661
31182
  var preflight_issue_1 = require_preflight_issue();
28662
31183
  var preflight_processes_1 = require_preflight_processes();
31184
+ var preflight_lattice_1 = require_preflight_lattice();
31185
+ var lattice_capability_12 = require_lattice_capability();
31186
+ var preflight_invocation_1 = require_preflight_invocation();
31187
+ var preflight_immutable_release_1 = require_preflight_immutable_release();
31188
+ var invocation_contract_1 = require_invocation_contract();
31189
+ var preflight_agents_1 = require_preflight_agents();
31190
+ var agents_contract_1 = require_agents_contract();
31191
+ var preflight_workflows_1 = require_preflight_workflows();
31192
+ var workflow_scopes_contract_1 = require_workflow_scopes_contract();
31193
+ var preflight_monitoring_1 = require_preflight_monitoring();
31194
+ var preflight_service_directory_1 = require_preflight_service_directory();
28663
31195
  var preflight_directory_1 = require_preflight_directory();
28664
- var directory_config_1 = require_directory_config();
31196
+ var directory_manifest_1 = require_directory_manifest();
31197
+ var preflight_abrigo_1 = require_preflight_abrigo();
31198
+ var abrigo_contract_1 = require_abrigo_contract();
31199
+ var monitoring_contract_12 = require_monitoring_contract();
28665
31200
  var processes_contract_1 = require_processes_contract();
28666
31201
  var WORKLOAD_FIELDS = [
28667
31202
  "memory_mb",
@@ -28676,9 +31211,16 @@ var require_preflight = __commonJS({
28676
31211
  const tooling = capabilities?.tooling ?? capabilities_1.MANAGED_FUNCTION_CAPABILITIES.tooling;
28677
31212
  const issues = [];
28678
31213
  checkWorkload({ manifest, limits, tooling, cliVersion, sdkVersion, issues });
31214
+ (0, preflight_immutable_release_1.checkImmutableRelease)({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues });
28679
31215
  checkPostgres({ manifest, capabilities, tooling, cliVersion, sdkVersion, issues });
28680
31216
  (0, preflight_processes_1.checkProcesses)({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues });
28681
- (0, preflight_directory_1.checkDirectory)({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues });
31217
+ (0, preflight_lattice_1.checkLatticeContext)({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues });
31218
+ (0, preflight_invocation_1.checkInvocationIdentity)({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues });
31219
+ (0, preflight_agents_1.checkAgents)({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues });
31220
+ (0, preflight_workflows_1.checkWorkflows)({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues });
31221
+ (0, preflight_monitoring_1.checkMonitoring)({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues });
31222
+ checkDirectoryDeclarations({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues });
31223
+ (0, preflight_abrigo_1.checkAbrigo)({ manifest, capabilities, tooling, cliVersion, sdkVersion, checkDeployment, issues });
28682
31224
  checkHeaders({ manifest, capabilities, tooling, cliVersion, sdkVersion, issues });
28683
31225
  checkSdkTimeout({ manifest, limits, capabilities, tooling, cliVersion, sdkVersion, issues });
28684
31226
  return issues;
@@ -28780,8 +31322,14 @@ var require_preflight = __commonJS({
28780
31322
  const hasData = !!data && Object.keys(data).length > 0;
28781
31323
  const hasStorage = !!storage && typeof storage === "object" && Object.keys(storage).length > 0;
28782
31324
  const hasProcesses = processes_contract_1.functionProcessReadScopesSchema.safeParse(manifest.capabilities?.processes).success;
28783
- const hasDirectory = directory_config_1.directoryScopesSchema.safeParse(manifest.capabilities?.directory).success;
28784
- return hasData || hasStorage || hasProcesses || hasDirectory;
31325
+ const hasAgents = agents_contract_1.functionAgentReadScopesSchema.safeParse(manifest.capabilities?.agents).success;
31326
+ const hasWorkflows = workflow_scopes_contract_1.functionWorkflowScopesSchema.safeParse(manifest.capabilities?.workflows).success;
31327
+ const hasMonitoring = monitoring_contract_12.functionMonitoringScopesSchema.safeParse(manifest.capabilities?.monitoring).success;
31328
+ const hasLattice = (0, lattice_capability_12.readFunctionLatticeContextCapability)(manifest);
31329
+ const hasInvocation = (0, invocation_contract_1.readFunctionInvocationIdentityCapability)(manifest);
31330
+ const hasDirectory = directory_manifest_1.functionDirectoryManifestSchema.safeParse(manifest.capabilities?.directory).success;
31331
+ const hasAbrigo = abrigo_contract_1.functionAbrigoReadScopesSchema.safeParse(manifest.capabilities?.abrigo).success;
31332
+ return hasData || hasStorage || hasProcesses || hasMonitoring || hasAgents || hasWorkflows || hasLattice || hasInvocation || hasDirectory || hasAbrigo;
28785
31333
  }
28786
31334
  function checkHeaders({ manifest, capabilities, tooling, cliVersion, sdkVersion, issues }) {
28787
31335
  const feature = capabilities?.features.http_headers;
@@ -28792,7 +31340,7 @@ var require_preflight = __commonJS({
28792
31340
  return;
28793
31341
  issues.push((0, preflight_issue_1.createPreflightIssue)({
28794
31342
  field: feature.field,
28795
- problem: `invocation headers for capabilities.data, capabilities.storage, capabilities.processes, or capabilities.directory exceed ${feature.max_bytes} bytes and will fail with HTTP 431`,
31343
+ problem: `invocation headers for capability credentials, including capabilities.data, capabilities.storage, capabilities.processes, capabilities.lattice, capabilities.invocation and capabilities.directory, exceed ${feature.max_bytes} bytes and will fail with HTTP 431`,
28796
31344
  limit: feature.limit,
28797
31345
  tooling,
28798
31346
  requiredCli: feature.min_cli,
@@ -28822,6 +31370,30 @@ var require_preflight = __commonJS({
28822
31370
  sdkVersion
28823
31371
  }));
28824
31372
  }
31373
+ function checkDirectoryDeclarations(args) {
31374
+ const directory = args.manifest.capabilities?.directory;
31375
+ if (directory === void 0)
31376
+ return;
31377
+ const parsed = directory_manifest_1.functionDirectoryManifestSchema.safeParse(directory);
31378
+ if (!parsed.success) {
31379
+ args.issues.push((0, preflight_issue_1.createPreflightIssue)({
31380
+ field: "capabilities.directory",
31381
+ problem: (0, capabilities_1.formatValidationDetail)(parsed.error.issues),
31382
+ limit: "concrete groups and/or exact tenant resolution scopes",
31383
+ tooling: args.tooling,
31384
+ requiredCli: args.tooling.cli.min,
31385
+ requiredSdk: args.tooling.sdk.min,
31386
+ cliVersion: args.cliVersion,
31387
+ sdkVersion: args.sdkVersion
31388
+ }));
31389
+ return;
31390
+ }
31391
+ const scoped = (directory2) => ({ ...args, manifest: { ...args.manifest, capabilities: { ...args.manifest.capabilities, directory: directory2 } } });
31392
+ if (parsed.data.groups)
31393
+ (0, preflight_directory_1.checkDirectory)(scoped({ groups: parsed.data.groups }));
31394
+ if (parsed.data.resolve)
31395
+ (0, preflight_service_directory_1.checkDirectory)(scoped({ resolve: parsed.data.resolve }));
31396
+ }
28825
31397
  }
28826
31398
  });
28827
31399
 
@@ -28829,8 +31401,25 @@ var require_preflight = __commonJS({
28829
31401
  var require_config2 = __commonJS({
28830
31402
  "dist/config.js"(exports2) {
28831
31403
  "use strict";
31404
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
31405
+ if (k2 === void 0) k2 = k;
31406
+ var desc = Object.getOwnPropertyDescriptor(m2, k);
31407
+ if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
31408
+ desc = { enumerable: true, get: function() {
31409
+ return m2[k];
31410
+ } };
31411
+ }
31412
+ Object.defineProperty(o, k2, desc);
31413
+ }) : (function(o, m2, k, k2) {
31414
+ if (k2 === void 0) k2 = k;
31415
+ o[k2] = m2[k];
31416
+ }));
31417
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
31418
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
31419
+ };
28832
31420
  Object.defineProperty(exports2, "__esModule", { value: true });
28833
- exports2.cacheManifestSchema = exports2.CACHE_MAX_TTL_SECONDS = exports2.preflightManagedFunction = exports2.parseDeployedPolicy = exports2.versionIsOlder = exports2.sdkVersionLowerBound = exports2.sdkVersionFromPackageJson = exports2.isPostgresEgress = exports2.formatValidationDetail = exports2.MANAGED_FUNCTION_SDK_PACKAGE = exports2.MANAGED_FUNCTION_CLI_PACKAGE = exports2.MANAGED_FUNCTION_CAPABILITIES = exports2.managedFunctionWorkloadLimitsSchema = exports2.MF_LIMITS_DEFAULTS = exports2.MF_LIMITS_CAPS = exports2.MANAGED_FUNCTION_LIMITS = exports2.shouldReportAtlasHttp = exports2.functionProcessRunSummarySchema = exports2.functionProcessReadRequestSchema = exports2.readFunctionProcessScopes = exports2.functionProcessReadScopesSchema = exports2.FUNCTION_PROCESS_READ_PATH = exports2.FUNCTION_PROCESS_TOKEN_HEADER = exports2.readDirectoryGroups = exports2.directoryMembersResponse = exports2.directoryMembersInput = exports2.directoryScopesSchema = exports2.directoryGroupIdSchema = exports2.DIRECTORY_TOKEN_HEADER = void 0;
31421
+ exports2.versionIsOlder = exports2.sdkVersionLowerBound = exports2.sdkSpecFromPackageJson = exports2.sdkVersionFromPackageJson = exports2.isPostgresEgress = exports2.formatValidationDetail = exports2.MANAGED_FUNCTION_SDK_PACKAGE = exports2.MANAGED_FUNCTION_CLI_PACKAGE = exports2.MANAGED_FUNCTION_CAPABILITIES = exports2.managedFunctionWorkloadLimitsSchema = exports2.MF_LIMITS_DEFAULTS = exports2.MF_LIMITS_CAPS = exports2.MANAGED_FUNCTION_LIMITS = exports2.readFunctionImmutableRelease = exports2.functionImmutableReleaseSchema = exports2.shouldReportAtlasHttp = exports2.directoryPrincipalResolutionSchema = exports2.directoryPrincipalResolveRequestSchema = exports2.readFunctionDirectoryScopes = exports2.functionDirectoryScopesSchema = exports2.FUNCTION_DIRECTORY_RESOLVE_PATH = exports2.FUNCTION_DIRECTORY_TOKEN_HEADER = exports2.FUNCTION_CALLER_DATA_TOKEN_HEADER = exports2.readFunctionWorkflowEvidenceScopes = exports2.readFunctionWorkflowScopes = exports2.functionWorkflowScopesSchema = exports2.functionAgentCompletedRunSchema = exports2.functionAgentCompletedRunQuerySchema = exports2.functionAgentReadRequestSchema = exports2.readFunctionAgentScopes = exports2.functionAgentReadScopesSchema = exports2.FUNCTION_AGENT_READ_PATH = exports2.FUNCTION_AGENT_TOKEN_HEADER = exports2.functionProcessCompletedAgentReferenceQuerySchema = exports2.functionProcessCompletedAgentReferenceSchema = exports2.functionProcessRunSummarySchema = exports2.functionProcessReadRequestSchema = exports2.readFunctionProcessScopes = exports2.functionProcessReadScopesSchema = exports2.FUNCTION_PROCESS_READ_PATH = exports2.FUNCTION_PROCESS_TOKEN_HEADER = exports2.readFunctionLatticeContextCapability = exports2.functionLatticeContextCapabilitySchema = exports2.functionDirectoryManifestSchema = exports2.readDirectoryGroups = exports2.directoryMembersResponse = exports2.directoryMembersInput = exports2.directoryScopesSchema = exports2.directoryGroupIdSchema = exports2.DIRECTORY_TOKEN_HEADER = void 0;
31422
+ exports2.cacheManifestSchema = exports2.CACHE_MAX_TTL_SECONDS = exports2.preflightManagedFunction = exports2.parseDeployedPolicy = void 0;
28834
31423
  exports2.readCacheConfiguration = readCacheConfiguration;
28835
31424
  var directory_config_1 = require_directory_config();
28836
31425
  Object.defineProperty(exports2, "DIRECTORY_TOKEN_HEADER", { enumerable: true, get: function() {
@@ -28851,6 +31440,18 @@ var require_config2 = __commonJS({
28851
31440
  Object.defineProperty(exports2, "readDirectoryGroups", { enumerable: true, get: function() {
28852
31441
  return directory_config_1.readDirectoryGroups;
28853
31442
  } });
31443
+ var directory_manifest_1 = require_directory_manifest();
31444
+ Object.defineProperty(exports2, "functionDirectoryManifestSchema", { enumerable: true, get: function() {
31445
+ return directory_manifest_1.functionDirectoryManifestSchema;
31446
+ } });
31447
+ var lattice_capability_12 = require_lattice_capability();
31448
+ Object.defineProperty(exports2, "functionLatticeContextCapabilitySchema", { enumerable: true, get: function() {
31449
+ return lattice_capability_12.functionLatticeContextCapabilitySchema;
31450
+ } });
31451
+ Object.defineProperty(exports2, "readFunctionLatticeContextCapability", { enumerable: true, get: function() {
31452
+ return lattice_capability_12.readFunctionLatticeContextCapability;
31453
+ } });
31454
+ __exportStar2(require_invocation_contract(), exports2);
28854
31455
  var processes_contract_1 = require_processes_contract();
28855
31456
  Object.defineProperty(exports2, "FUNCTION_PROCESS_TOKEN_HEADER", { enumerable: true, get: function() {
28856
31457
  return processes_contract_1.FUNCTION_PROCESS_TOKEN_HEADER;
@@ -28870,10 +31471,84 @@ var require_config2 = __commonJS({
28870
31471
  Object.defineProperty(exports2, "functionProcessRunSummarySchema", { enumerable: true, get: function() {
28871
31472
  return processes_contract_1.functionProcessRunSummarySchema;
28872
31473
  } });
31474
+ Object.defineProperty(exports2, "functionProcessCompletedAgentReferenceSchema", { enumerable: true, get: function() {
31475
+ return processes_contract_1.functionProcessCompletedAgentReferenceSchema;
31476
+ } });
31477
+ Object.defineProperty(exports2, "functionProcessCompletedAgentReferenceQuerySchema", { enumerable: true, get: function() {
31478
+ return processes_contract_1.functionProcessCompletedAgentReferenceQuerySchema;
31479
+ } });
31480
+ var agents_contract_1 = require_agents_contract();
31481
+ Object.defineProperty(exports2, "FUNCTION_AGENT_TOKEN_HEADER", { enumerable: true, get: function() {
31482
+ return agents_contract_1.FUNCTION_AGENT_TOKEN_HEADER;
31483
+ } });
31484
+ Object.defineProperty(exports2, "FUNCTION_AGENT_READ_PATH", { enumerable: true, get: function() {
31485
+ return agents_contract_1.FUNCTION_AGENT_READ_PATH;
31486
+ } });
31487
+ Object.defineProperty(exports2, "functionAgentReadScopesSchema", { enumerable: true, get: function() {
31488
+ return agents_contract_1.functionAgentReadScopesSchema;
31489
+ } });
31490
+ Object.defineProperty(exports2, "readFunctionAgentScopes", { enumerable: true, get: function() {
31491
+ return agents_contract_1.readFunctionAgentScopes;
31492
+ } });
31493
+ Object.defineProperty(exports2, "functionAgentReadRequestSchema", { enumerable: true, get: function() {
31494
+ return agents_contract_1.functionAgentReadRequestSchema;
31495
+ } });
31496
+ Object.defineProperty(exports2, "functionAgentCompletedRunQuerySchema", { enumerable: true, get: function() {
31497
+ return agents_contract_1.functionAgentCompletedRunQuerySchema;
31498
+ } });
31499
+ Object.defineProperty(exports2, "functionAgentCompletedRunSchema", { enumerable: true, get: function() {
31500
+ return agents_contract_1.functionAgentCompletedRunSchema;
31501
+ } });
31502
+ __exportStar2(require_agent_source_evidence_contract(), exports2);
31503
+ __exportStar2(require_workflow_source_contract(), exports2);
31504
+ var workflow_scopes_contract_1 = require_workflow_scopes_contract();
31505
+ Object.defineProperty(exports2, "functionWorkflowScopesSchema", { enumerable: true, get: function() {
31506
+ return workflow_scopes_contract_1.functionWorkflowScopesSchema;
31507
+ } });
31508
+ Object.defineProperty(exports2, "readFunctionWorkflowScopes", { enumerable: true, get: function() {
31509
+ return workflow_scopes_contract_1.readFunctionWorkflowScopes;
31510
+ } });
31511
+ Object.defineProperty(exports2, "readFunctionWorkflowEvidenceScopes", { enumerable: true, get: function() {
31512
+ return workflow_scopes_contract_1.readFunctionWorkflowEvidenceScopes;
31513
+ } });
31514
+ __exportStar2(require_monitoring_events(), exports2);
31515
+ __exportStar2(require_monitoring_contract(), exports2);
31516
+ __exportStar2(require_monitoring_annotations(), exports2);
31517
+ var orm_contract_1 = require_orm_contract();
31518
+ Object.defineProperty(exports2, "FUNCTION_CALLER_DATA_TOKEN_HEADER", { enumerable: true, get: function() {
31519
+ return orm_contract_1.FUNCTION_CALLER_DATA_TOKEN_HEADER;
31520
+ } });
31521
+ var directory_contract_1 = require_directory_contract();
31522
+ Object.defineProperty(exports2, "FUNCTION_DIRECTORY_TOKEN_HEADER", { enumerable: true, get: function() {
31523
+ return directory_contract_1.FUNCTION_DIRECTORY_TOKEN_HEADER;
31524
+ } });
31525
+ Object.defineProperty(exports2, "FUNCTION_DIRECTORY_RESOLVE_PATH", { enumerable: true, get: function() {
31526
+ return directory_contract_1.FUNCTION_DIRECTORY_RESOLVE_PATH;
31527
+ } });
31528
+ Object.defineProperty(exports2, "functionDirectoryScopesSchema", { enumerable: true, get: function() {
31529
+ return directory_contract_1.functionDirectoryScopesSchema;
31530
+ } });
31531
+ Object.defineProperty(exports2, "readFunctionDirectoryScopes", { enumerable: true, get: function() {
31532
+ return directory_contract_1.readFunctionDirectoryScopes;
31533
+ } });
31534
+ Object.defineProperty(exports2, "directoryPrincipalResolveRequestSchema", { enumerable: true, get: function() {
31535
+ return directory_contract_1.directoryPrincipalResolveRequestSchema;
31536
+ } });
31537
+ Object.defineProperty(exports2, "directoryPrincipalResolutionSchema", { enumerable: true, get: function() {
31538
+ return directory_contract_1.directoryPrincipalResolutionSchema;
31539
+ } });
31540
+ __exportStar2(require_abrigo_contract(), exports2);
28873
31541
  var http_tracing_1 = require_http_tracing();
28874
31542
  Object.defineProperty(exports2, "shouldReportAtlasHttp", { enumerable: true, get: function() {
28875
31543
  return http_tracing_1.shouldReportAtlasHttp;
28876
31544
  } });
31545
+ var immutable_release_contract_1 = require_immutable_release_contract();
31546
+ Object.defineProperty(exports2, "functionImmutableReleaseSchema", { enumerable: true, get: function() {
31547
+ return immutable_release_contract_1.functionImmutableReleaseSchema;
31548
+ } });
31549
+ Object.defineProperty(exports2, "readFunctionImmutableRelease", { enumerable: true, get: function() {
31550
+ return immutable_release_contract_1.readFunctionImmutableRelease;
31551
+ } });
28877
31552
  var zod_12 = require_zod();
28878
31553
  var limits_1 = require_limits();
28879
31554
  var limits_2 = require_limits();
@@ -28908,6 +31583,9 @@ var require_config2 = __commonJS({
28908
31583
  Object.defineProperty(exports2, "sdkVersionFromPackageJson", { enumerable: true, get: function() {
28909
31584
  return capabilities_1.sdkVersionFromPackageJson;
28910
31585
  } });
31586
+ Object.defineProperty(exports2, "sdkSpecFromPackageJson", { enumerable: true, get: function() {
31587
+ return capabilities_1.sdkSpecFromPackageJson;
31588
+ } });
28911
31589
  Object.defineProperty(exports2, "sdkVersionLowerBound", { enumerable: true, get: function() {
28912
31590
  return capabilities_1.sdkVersionLowerBound;
28913
31591
  } });
@@ -30542,7 +33220,7 @@ var require_src4 = __commonJS({
30542
33220
  var require_helpers = __commonJS({
30543
33221
  "../../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js"(exports2) {
30544
33222
  "use strict";
30545
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
33223
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
30546
33224
  if (k2 === void 0) k2 = k;
30547
33225
  var desc = Object.getOwnPropertyDescriptor(m2, k);
30548
33226
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -30564,7 +33242,7 @@ var require_helpers = __commonJS({
30564
33242
  if (mod && mod.__esModule) return mod;
30565
33243
  var result = {};
30566
33244
  if (mod != null) {
30567
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33245
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
30568
33246
  }
30569
33247
  __setModuleDefault(result, mod);
30570
33248
  return result;
@@ -30612,7 +33290,7 @@ var require_helpers = __commonJS({
30612
33290
  var require_dist2 = __commonJS({
30613
33291
  "../../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/index.js"(exports2) {
30614
33292
  "use strict";
30615
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
33293
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
30616
33294
  if (k2 === void 0) k2 = k;
30617
33295
  var desc = Object.getOwnPropertyDescriptor(m2, k);
30618
33296
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -30634,20 +33312,20 @@ var require_dist2 = __commonJS({
30634
33312
  if (mod && mod.__esModule) return mod;
30635
33313
  var result = {};
30636
33314
  if (mod != null) {
30637
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33315
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
30638
33316
  }
30639
33317
  __setModuleDefault(result, mod);
30640
33318
  return result;
30641
33319
  };
30642
- var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
30643
- for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
33320
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
33321
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
30644
33322
  };
30645
33323
  Object.defineProperty(exports2, "__esModule", { value: true });
30646
33324
  exports2.Agent = void 0;
30647
33325
  var net = __importStar(require("net"));
30648
33326
  var http3 = __importStar(require("http"));
30649
33327
  var https_1 = require("https");
30650
- __exportStar(require_helpers(), exports2);
33328
+ __exportStar2(require_helpers(), exports2);
30651
33329
  var INTERNAL = Symbol("AgentBaseInternalState");
30652
33330
  var Agent = class extends http3.Agent {
30653
33331
  constructor(opts) {
@@ -30864,7 +33542,7 @@ var require_parse_proxy_response = __commonJS({
30864
33542
  var require_dist3 = __commonJS({
30865
33543
  "../../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js"(exports2) {
30866
33544
  "use strict";
30867
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
33545
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
30868
33546
  if (k2 === void 0) k2 = k;
30869
33547
  var desc = Object.getOwnPropertyDescriptor(m2, k);
30870
33548
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -30886,7 +33564,7 @@ var require_dist3 = __commonJS({
30886
33564
  if (mod && mod.__esModule) return mod;
30887
33565
  var result = {};
30888
33566
  if (mod != null) {
30889
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33567
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
30890
33568
  }
30891
33569
  __setModuleDefault(result, mod);
30892
33570
  return result;
@@ -37975,7 +40653,7 @@ Content-Type: ${partContentType}\r
37975
40653
  var require_src5 = __commonJS({
37976
40654
  "../../../node_modules/.pnpm/gaxios@7.1.4/node_modules/gaxios/build/cjs/src/index.js"(exports2) {
37977
40655
  "use strict";
37978
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
40656
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
37979
40657
  if (k2 === void 0) k2 = k;
37980
40658
  var desc = Object.getOwnPropertyDescriptor(m2, k);
37981
40659
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -37988,8 +40666,8 @@ var require_src5 = __commonJS({
37988
40666
  if (k2 === void 0) k2 = k;
37989
40667
  o[k2] = m2[k];
37990
40668
  }));
37991
- var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
37992
- for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
40669
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
40670
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
37993
40671
  };
37994
40672
  Object.defineProperty(exports2, "__esModule", { value: true });
37995
40673
  exports2.instance = exports2.Gaxios = exports2.GaxiosError = void 0;
@@ -38002,7 +40680,7 @@ var require_src5 = __commonJS({
38002
40680
  Object.defineProperty(exports2, "GaxiosError", { enumerable: true, get: function() {
38003
40681
  return common_js_1.GaxiosError;
38004
40682
  } });
38005
- __exportStar(require_interceptor(), exports2);
40683
+ __exportStar2(require_interceptor(), exports2);
38006
40684
  exports2.instance = new gaxios_js_1.Gaxios();
38007
40685
  async function request(opts) {
38008
40686
  return exports2.instance.request(opts);
@@ -39890,7 +42568,7 @@ var require_colours = __commonJS({
39890
42568
  var require_logging_utils = __commonJS({
39891
42569
  "../../../node_modules/.pnpm/google-logging-utils@1.1.3/node_modules/google-logging-utils/build/src/logging-utils.js"(exports2) {
39892
42570
  "use strict";
39893
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
42571
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
39894
42572
  if (k2 === void 0) k2 = k;
39895
42573
  var desc = Object.getOwnPropertyDescriptor(m2, k);
39896
42574
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -39921,7 +42599,7 @@ var require_logging_utils = __commonJS({
39921
42599
  if (mod && mod.__esModule) return mod;
39922
42600
  var result = {};
39923
42601
  if (mod != null) {
39924
- for (var k = ownKeys(mod), i2 = 0; i2 < k.length; i2++) if (k[i2] !== "default") __createBinding(result, mod, k[i2]);
42602
+ for (var k = ownKeys(mod), i2 = 0; i2 < k.length; i2++) if (k[i2] !== "default") __createBinding2(result, mod, k[i2]);
39925
42603
  }
39926
42604
  __setModuleDefault(result, mod);
39927
42605
  return result;
@@ -40179,7 +42857,7 @@ var require_logging_utils = __commonJS({
40179
42857
  var require_src6 = __commonJS({
40180
42858
  "../../../node_modules/.pnpm/google-logging-utils@1.1.3/node_modules/google-logging-utils/build/src/index.js"(exports2) {
40181
42859
  "use strict";
40182
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
42860
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
40183
42861
  if (k2 === void 0) k2 = k;
40184
42862
  var desc = Object.getOwnPropertyDescriptor(m2, k);
40185
42863
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -40192,11 +42870,11 @@ var require_src6 = __commonJS({
40192
42870
  if (k2 === void 0) k2 = k;
40193
42871
  o[k2] = m2[k];
40194
42872
  }));
40195
- var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
40196
- for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
42873
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
42874
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
40197
42875
  };
40198
42876
  Object.defineProperty(exports2, "__esModule", { value: true });
40199
- __exportStar(require_logging_utils(), exports2);
42877
+ __exportStar2(require_logging_utils(), exports2);
40200
42878
  }
40201
42879
  });
40202
42880
 
@@ -40204,7 +42882,7 @@ var require_src6 = __commonJS({
40204
42882
  var require_src7 = __commonJS({
40205
42883
  "../../../node_modules/.pnpm/gcp-metadata@8.1.2/node_modules/gcp-metadata/build/src/index.js"(exports2) {
40206
42884
  "use strict";
40207
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
42885
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
40208
42886
  if (k2 === void 0) k2 = k;
40209
42887
  var desc = Object.getOwnPropertyDescriptor(m2, k);
40210
42888
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -40235,14 +42913,14 @@ var require_src7 = __commonJS({
40235
42913
  if (mod && mod.__esModule) return mod;
40236
42914
  var result = {};
40237
42915
  if (mod != null) {
40238
- for (var k = ownKeys(mod), i2 = 0; i2 < k.length; i2++) if (k[i2] !== "default") __createBinding(result, mod, k[i2]);
42916
+ for (var k = ownKeys(mod), i2 = 0; i2 < k.length; i2++) if (k[i2] !== "default") __createBinding2(result, mod, k[i2]);
40239
42917
  }
40240
42918
  __setModuleDefault(result, mod);
40241
42919
  return result;
40242
42920
  };
40243
42921
  })();
40244
- var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
40245
- for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
42922
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
42923
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
40246
42924
  };
40247
42925
  Object.defineProperty(exports2, "__esModule", { value: true });
40248
42926
  exports2.gcpResidencyCache = exports2.METADATA_SERVER_DETECTION = exports2.HEADERS = exports2.HEADER_VALUE = exports2.HEADER_NAME = exports2.SECONDARY_HOST_ADDRESS = exports2.HOST_ADDRESS = exports2.BASE_PATH = void 0;
@@ -40452,7 +43130,7 @@ var require_src7 = __commonJS({
40452
43130
  function requestTimeout() {
40453
43131
  return getGCPResidency() ? 0 : 3e3;
40454
43132
  }
40455
- __exportStar(require_gcp_residency(), exports2);
43133
+ __exportStar2(require_gcp_residency(), exports2);
40456
43134
  }
40457
43135
  });
40458
43136
 
@@ -40741,7 +43419,7 @@ var require_crypto2 = __commonJS({
40741
43419
  var require_crypto3 = __commonJS({
40742
43420
  "../../../node_modules/.pnpm/google-auth-library@10.6.2/node_modules/google-auth-library/build/src/crypto/crypto.js"(exports2) {
40743
43421
  "use strict";
40744
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
43422
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
40745
43423
  if (k2 === void 0) k2 = k;
40746
43424
  var desc = Object.getOwnPropertyDescriptor(m2, k);
40747
43425
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -40754,15 +43432,15 @@ var require_crypto3 = __commonJS({
40754
43432
  if (k2 === void 0) k2 = k;
40755
43433
  o[k2] = m2[k];
40756
43434
  }));
40757
- var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
40758
- for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
43435
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
43436
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
40759
43437
  };
40760
43438
  Object.defineProperty(exports2, "__esModule", { value: true });
40761
43439
  exports2.createCrypto = createCrypto;
40762
43440
  exports2.hasBrowserCrypto = hasBrowserCrypto;
40763
43441
  var crypto_1 = require_crypto();
40764
43442
  var crypto_2 = require_crypto2();
40765
- __exportStar(require_shared(), exports2);
43443
+ __exportStar2(require_shared(), exports2);
40766
43444
  function createCrypto() {
40767
43445
  if (hasBrowserCrypto()) {
40768
43446
  return new crypto_1.BrowserCrypto();
@@ -47259,7 +49937,7 @@ var require_passthrough = __commonJS({
47259
49937
  var require_src8 = __commonJS({
47260
49938
  "../../../node_modules/.pnpm/google-auth-library@10.6.2/node_modules/google-auth-library/build/src/index.js"(exports2) {
47261
49939
  "use strict";
47262
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
49940
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
47263
49941
  if (k2 === void 0) k2 = k;
47264
49942
  var desc = Object.getOwnPropertyDescriptor(m2, k);
47265
49943
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -47272,8 +49950,8 @@ var require_src8 = __commonJS({
47272
49950
  if (k2 === void 0) k2 = k;
47273
49951
  o[k2] = m2[k];
47274
49952
  }));
47275
- var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
47276
- for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
49953
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m2, exports3) {
49954
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m2, p);
47277
49955
  };
47278
49956
  Object.defineProperty(exports2, "__esModule", { value: true });
47279
49957
  exports2.GoogleAuth = exports2.auth = exports2.PassThroughClient = exports2.ExternalAccountAuthorizedUserClient = exports2.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = exports2.ExecutableError = exports2.PluggableAuthClient = exports2.DownscopedClient = exports2.BaseExternalAccountClient = exports2.ExternalAccountClient = exports2.IdentityPoolClient = exports2.AwsRequestSigner = exports2.AwsClient = exports2.UserRefreshClient = exports2.LoginTicket = exports2.ClientAuthentication = exports2.OAuth2Client = exports2.CodeChallengeMethod = exports2.Impersonated = exports2.JWT = exports2.JWTAccess = exports2.IdTokenClient = exports2.IAMAuth = exports2.GCPEnv = exports2.Compute = exports2.DEFAULT_UNIVERSE = exports2.AuthClient = exports2.gaxios = exports2.gcpMetadata = void 0;
@@ -47378,7 +50056,7 @@ var require_src8 = __commonJS({
47378
50056
  Object.defineProperty(exports2, "PassThroughClient", { enumerable: true, get: function() {
47379
50057
  return passthrough_1.PassThroughClient;
47380
50058
  } });
47381
- __exportStar(require_googleToken(), exports2);
50059
+ __exportStar2(require_googleToken(), exports2);
47382
50060
  var auth = new googleauth_1.GoogleAuth();
47383
50061
  exports2.auth = auth;
47384
50062
  }
@@ -57181,9 +59859,99 @@ var require_valkey = __commonJS({
57181
59859
  }
57182
59860
  });
57183
59861
 
59862
+ // dist/service-directory.js
59863
+ var require_service_directory = __commonJS({
59864
+ "dist/service-directory.js"(exports2) {
59865
+ "use strict";
59866
+ Object.defineProperty(exports2, "__esModule", { value: true });
59867
+ exports2.createFunctionServiceDirectoryClient = createFunctionServiceDirectoryClient;
59868
+ var zod_12 = require_zod();
59869
+ var directory_contract_1 = require_directory_contract();
59870
+ function credential({ request }) {
59871
+ const headers = request.headers;
59872
+ const matches = typeof headers.get === "function" ? [headers.get(directory_contract_1.FUNCTION_DIRECTORY_TOKEN_HEADER)] : Object.entries(headers).filter(([key]) => key.toLowerCase() === directory_contract_1.FUNCTION_DIRECTORY_TOKEN_HEADER).map(([, value2]) => value2);
59873
+ const token = matches[0];
59874
+ const refused = () => new directory_contract_1.DirectoryPrincipalResolveError(401, "invalid_context", "This invocation has no valid directory credential");
59875
+ if (matches.length !== 1 || typeof token !== "string" || token.length > 16384)
59876
+ throw refused();
59877
+ const envelope = /^([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]{43})$/.exec(token);
59878
+ if (!envelope?.[1])
59879
+ throw refused();
59880
+ let value;
59881
+ try {
59882
+ value = JSON.parse(Buffer.from(envelope[1], "base64url").toString("utf8"));
59883
+ } catch {
59884
+ throw refused();
59885
+ }
59886
+ const parsed = zod_12.z.object({ audience: zod_12.z.literal("atlas-managed-function-directory-resolve"), sub: zod_12.z.string().startsWith("service-account|"), functionId: zod_12.z.string().min(1), invocationId: zod_12.z.string().min(1), exp: zod_12.z.number() }).safeParse(value);
59887
+ if (!parsed.success)
59888
+ throw refused();
59889
+ return { token, expiresAt: parsed.data.exp };
59890
+ }
59891
+ function origin(baseUrl) {
59892
+ const refused = () => new directory_contract_1.DirectoryPrincipalResolveError(400, "invalid_configuration", "Configure a trusted HTTPS Atlas origin without credentials, path, query or fragment");
59893
+ let url;
59894
+ try {
59895
+ url = new URL(baseUrl);
59896
+ } catch {
59897
+ throw refused();
59898
+ }
59899
+ const loopback = url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname);
59900
+ if (!loopback && url.protocol !== "https:" || url.username || url.password || url.pathname !== "/" || url.search || url.hash)
59901
+ throw refused();
59902
+ return url.origin;
59903
+ }
59904
+ function completeResolution({ result, query }) {
59905
+ const expected = new Set(query.lookups.map((lookup) => `${lookup.type}:${lookup.value}`));
59906
+ const received = [...result.resolved.map((value) => value.lookup), ...result.unresolved];
59907
+ const actual = new Set(received.map((lookup) => `${lookup.type}:${lookup.value}`));
59908
+ return received.length === expected.size && actual.size === expected.size && [...actual].every((key) => expected.has(key)) && result.resolved.every((value) => value.lookup.type !== "email" || value.email === value.lookup.value);
59909
+ }
59910
+ function createFunctionServiceDirectoryClient({ request, baseUrl, fetchImpl = globalThis.fetch }) {
59911
+ const url = `${origin(baseUrl)}${directory_contract_1.FUNCTION_DIRECTORY_RESOLVE_PATH}`;
59912
+ const { token, expiresAt } = credential({ request });
59913
+ return {
59914
+ async resolve(input) {
59915
+ if (expiresAt <= Date.now() / 1e3)
59916
+ throw new directory_contract_1.DirectoryPrincipalResolveError(401, "expired_context", "The directory credential expired; start a new invocation");
59917
+ const query = directory_contract_1.directoryPrincipalResolveRequestSchema.safeParse(input);
59918
+ if (!query.success)
59919
+ throw new directory_contract_1.DirectoryPrincipalResolveError(400, "invalid_request", "Invalid exact directory resolution request");
59920
+ const response = await fetchImpl(url, { method: "POST", headers: { "content-type": "application/json", [directory_contract_1.FUNCTION_DIRECTORY_TOKEN_HEADER]: token }, body: JSON.stringify(query.data), redirect: "error", signal: AbortSignal.timeout(3e4) });
59921
+ const body = await response.json().catch(() => null);
59922
+ if (!response.ok) {
59923
+ const error = zod_12.z.object({ code: zod_12.z.string().max(128).optional(), detail: zod_12.z.string().max(2e3).optional() }).safeParse(body);
59924
+ throw new directory_contract_1.DirectoryPrincipalResolveError(response.status, error.success ? error.data.code ?? "directory_resolve_failed" : "directory_resolve_failed", error.success ? error.data.detail ?? "Directory resolution failed" : "Directory resolution failed");
59925
+ }
59926
+ const result = directory_contract_1.directoryPrincipalResolutionSchema.safeParse(body);
59927
+ if (!result.success || !completeResolution({ result: result.data, query: query.data }))
59928
+ throw new directory_contract_1.DirectoryPrincipalResolveError(502, "malformed_response", "Atlas returned an invalid directory resolution");
59929
+ return result.data;
59930
+ }
59931
+ };
59932
+ }
59933
+ }
59934
+ });
59935
+
57184
59936
  // dist/index.js
59937
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m2, k, k2) {
59938
+ if (k2 === void 0) k2 = k;
59939
+ var desc = Object.getOwnPropertyDescriptor(m2, k);
59940
+ if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
59941
+ desc = { enumerable: true, get: function() {
59942
+ return m2[k];
59943
+ } };
59944
+ }
59945
+ Object.defineProperty(o, k2, desc);
59946
+ }) : (function(o, m2, k, k2) {
59947
+ if (k2 === void 0) k2 = k;
59948
+ o[k2] = m2[k];
59949
+ }));
59950
+ var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
59951
+ for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m2, p);
59952
+ };
57185
59953
  Object.defineProperty(exports, "__esModule", { value: true });
57186
- exports.readCacheConfiguration = exports.cacheManifestSchema = exports.createCacheManager = exports.CacheError = exports.createFunctionStorageClient = exports.runWithFunctionTracing = exports.installFunctionTracing = exports.FunctionProcessReadError = exports.createFunctionServiceProcessesClient = exports.FunctionDirectoryReadError = exports.createFunctionDirectoryClient = void 0;
59954
+ exports.createFunctionServiceDirectoryClient = exports.readCacheConfiguration = exports.cacheManifestSchema = exports.createCacheManager = exports.CacheError = exports.createFunctionStorageClient = exports.runWithFunctionTracing = exports.installFunctionTracing = exports.functionMonitoringAnnotationSchema = exports.monitoringPublishSchema = exports.monitoringEventsSchema = exports.monitoringPayloadHash = exports.FunctionMonitoringError = exports.createFunctionServiceMonitoringClient = exports.functionSourceJobAdmissionSchema = exports.functionAgentSourceExecutionSchema = exports.functionAgentConversationEvidenceRequestSchema = exports.functionAgentConversationEvidenceCaptureSchema = exports.functionAgentConversationEvidenceResponseSchema = exports.functionAgentSourceEvidenceCaptureSchema = exports.functionAgentSourceEvidenceRequestSchema = exports.functionAgentSourceResponseSchema = exports.createFunctionWorkflowEvidenceClient = exports.createFunctionServiceWorkflowsClient = exports.createFunctionAgentEvidenceClient = exports.FunctionAgentReadError = exports.createFunctionServiceAgentsClient = exports.FunctionProcessReadError = exports.createFunctionServiceProcessesClient = exports.functionLatticeHumanCompletionsPageSchema = exports.functionLatticeHumanCompletionsQuerySchema = exports.functionLatticeHumanCompletionSchema = exports.functionLatticeHumanCompletionQuerySchema = exports.functionLatticeExecutionContextSchema = exports.functionLatticeContextRequestSchema = exports.FunctionLatticeContextError = exports.FUNCTION_LATTICE_EXECUTION_TOKEN_HEADER = exports.FUNCTION_LATTICE_CONTEXT_PATH = exports.createFunctionInvocationClient = exports.functionLatticeStartProvenanceSchema = exports.functionLatticeParallelSnapshotQuerySchema = exports.functionLatticeParallelSnapshotSchema = exports.createFunctionLatticeClient = exports.readFunctionLatticeContextCapability = exports.functionLatticeContextCapabilitySchema = exports.FunctionDirectoryReadError = exports.createFunctionDirectoryClient = void 0;
57187
59955
  exports.createManagedFunctionContext = createManagedFunctionContext;
57188
59956
  var directory_1 = require_directory();
57189
59957
  Object.defineProperty(exports, "createFunctionDirectoryClient", { enumerable: true, get: function() {
@@ -57192,6 +59960,63 @@ Object.defineProperty(exports, "createFunctionDirectoryClient", { enumerable: tr
57192
59960
  Object.defineProperty(exports, "FunctionDirectoryReadError", { enumerable: true, get: function() {
57193
59961
  return directory_1.FunctionDirectoryReadError;
57194
59962
  } });
59963
+ var lattice_capability_1 = require_lattice_capability();
59964
+ Object.defineProperty(exports, "functionLatticeContextCapabilitySchema", { enumerable: true, get: function() {
59965
+ return lattice_capability_1.functionLatticeContextCapabilitySchema;
59966
+ } });
59967
+ Object.defineProperty(exports, "readFunctionLatticeContextCapability", { enumerable: true, get: function() {
59968
+ return lattice_capability_1.readFunctionLatticeContextCapability;
59969
+ } });
59970
+ var lattice_provenance_1 = require_lattice_provenance();
59971
+ Object.defineProperty(exports, "createFunctionLatticeClient", { enumerable: true, get: function() {
59972
+ return lattice_provenance_1.createFunctionLatticeClient;
59973
+ } });
59974
+ var lattice_provenance_contract_1 = require_lattice_provenance_contract();
59975
+ Object.defineProperty(exports, "functionLatticeParallelSnapshotSchema", { enumerable: true, get: function() {
59976
+ return lattice_provenance_contract_1.functionLatticeParallelSnapshotSchema;
59977
+ } });
59978
+ Object.defineProperty(exports, "functionLatticeParallelSnapshotQuerySchema", { enumerable: true, get: function() {
59979
+ return lattice_provenance_contract_1.functionLatticeParallelSnapshotQuerySchema;
59980
+ } });
59981
+ var lattice_provenance_contract_2 = require_lattice_provenance_contract();
59982
+ Object.defineProperty(exports, "functionLatticeStartProvenanceSchema", { enumerable: true, get: function() {
59983
+ return lattice_provenance_contract_2.functionLatticeStartProvenanceSchema;
59984
+ } });
59985
+ __exportStar(require_invocation_contract(), exports);
59986
+ __exportStar(require_abrigo(), exports);
59987
+ var invocation_1 = require_invocation();
59988
+ Object.defineProperty(exports, "createFunctionInvocationClient", { enumerable: true, get: function() {
59989
+ return invocation_1.createFunctionInvocationClient;
59990
+ } });
59991
+ var lattice_provenance_contract_3 = require_lattice_provenance_contract();
59992
+ Object.defineProperty(exports, "FUNCTION_LATTICE_CONTEXT_PATH", { enumerable: true, get: function() {
59993
+ return lattice_provenance_contract_3.FUNCTION_LATTICE_CONTEXT_PATH;
59994
+ } });
59995
+ Object.defineProperty(exports, "FUNCTION_LATTICE_EXECUTION_TOKEN_HEADER", { enumerable: true, get: function() {
59996
+ return lattice_provenance_contract_3.FUNCTION_LATTICE_EXECUTION_TOKEN_HEADER;
59997
+ } });
59998
+ Object.defineProperty(exports, "FunctionLatticeContextError", { enumerable: true, get: function() {
59999
+ return lattice_provenance_contract_3.FunctionLatticeContextError;
60000
+ } });
60001
+ Object.defineProperty(exports, "functionLatticeContextRequestSchema", { enumerable: true, get: function() {
60002
+ return lattice_provenance_contract_3.functionLatticeContextRequestSchema;
60003
+ } });
60004
+ Object.defineProperty(exports, "functionLatticeExecutionContextSchema", { enumerable: true, get: function() {
60005
+ return lattice_provenance_contract_3.functionLatticeExecutionContextSchema;
60006
+ } });
60007
+ Object.defineProperty(exports, "functionLatticeHumanCompletionQuerySchema", { enumerable: true, get: function() {
60008
+ return lattice_provenance_contract_3.functionLatticeHumanCompletionQuerySchema;
60009
+ } });
60010
+ Object.defineProperty(exports, "functionLatticeHumanCompletionSchema", { enumerable: true, get: function() {
60011
+ return lattice_provenance_contract_3.functionLatticeHumanCompletionSchema;
60012
+ } });
60013
+ var lattice_provenance_contract_4 = require_lattice_provenance_contract();
60014
+ Object.defineProperty(exports, "functionLatticeHumanCompletionsQuerySchema", { enumerable: true, get: function() {
60015
+ return lattice_provenance_contract_4.functionLatticeHumanCompletionsQuerySchema;
60016
+ } });
60017
+ Object.defineProperty(exports, "functionLatticeHumanCompletionsPageSchema", { enumerable: true, get: function() {
60018
+ return lattice_provenance_contract_4.functionLatticeHumanCompletionsPageSchema;
60019
+ } });
57195
60020
  var processes_1 = require_processes();
57196
60021
  Object.defineProperty(exports, "createFunctionServiceProcessesClient", { enumerable: true, get: function() {
57197
60022
  return processes_1.createFunctionServiceProcessesClient;
@@ -57199,6 +60024,73 @@ Object.defineProperty(exports, "createFunctionServiceProcessesClient", { enumera
57199
60024
  Object.defineProperty(exports, "FunctionProcessReadError", { enumerable: true, get: function() {
57200
60025
  return processes_1.FunctionProcessReadError;
57201
60026
  } });
60027
+ var agents_1 = require_agents();
60028
+ Object.defineProperty(exports, "createFunctionServiceAgentsClient", { enumerable: true, get: function() {
60029
+ return agents_1.createFunctionServiceAgentsClient;
60030
+ } });
60031
+ Object.defineProperty(exports, "FunctionAgentReadError", { enumerable: true, get: function() {
60032
+ return agents_1.FunctionAgentReadError;
60033
+ } });
60034
+ var agent_evidence_1 = require_agent_evidence();
60035
+ Object.defineProperty(exports, "createFunctionAgentEvidenceClient", { enumerable: true, get: function() {
60036
+ return agent_evidence_1.createFunctionAgentEvidenceClient;
60037
+ } });
60038
+ var workflow_source_1 = require_workflow_source();
60039
+ Object.defineProperty(exports, "createFunctionServiceWorkflowsClient", { enumerable: true, get: function() {
60040
+ return workflow_source_1.createFunctionServiceWorkflowsClient;
60041
+ } });
60042
+ Object.defineProperty(exports, "createFunctionWorkflowEvidenceClient", { enumerable: true, get: function() {
60043
+ return workflow_source_1.createFunctionWorkflowEvidenceClient;
60044
+ } });
60045
+ __exportStar(require_workflow_source_contract(), exports);
60046
+ var agent_source_evidence_contract_1 = require_agent_source_evidence_contract();
60047
+ Object.defineProperty(exports, "functionAgentSourceResponseSchema", { enumerable: true, get: function() {
60048
+ return agent_source_evidence_contract_1.functionAgentSourceResponseSchema;
60049
+ } });
60050
+ Object.defineProperty(exports, "functionAgentSourceEvidenceRequestSchema", { enumerable: true, get: function() {
60051
+ return agent_source_evidence_contract_1.functionAgentSourceEvidenceRequestSchema;
60052
+ } });
60053
+ Object.defineProperty(exports, "functionAgentSourceEvidenceCaptureSchema", { enumerable: true, get: function() {
60054
+ return agent_source_evidence_contract_1.functionAgentSourceEvidenceCaptureSchema;
60055
+ } });
60056
+ Object.defineProperty(exports, "functionAgentConversationEvidenceResponseSchema", { enumerable: true, get: function() {
60057
+ return agent_source_evidence_contract_1.functionAgentConversationEvidenceResponseSchema;
60058
+ } });
60059
+ Object.defineProperty(exports, "functionAgentConversationEvidenceCaptureSchema", { enumerable: true, get: function() {
60060
+ return agent_source_evidence_contract_1.functionAgentConversationEvidenceCaptureSchema;
60061
+ } });
60062
+ Object.defineProperty(exports, "functionAgentConversationEvidenceRequestSchema", { enumerable: true, get: function() {
60063
+ return agent_source_evidence_contract_1.functionAgentConversationEvidenceRequestSchema;
60064
+ } });
60065
+ Object.defineProperty(exports, "functionAgentSourceExecutionSchema", { enumerable: true, get: function() {
60066
+ return agent_source_evidence_contract_1.functionAgentSourceExecutionSchema;
60067
+ } });
60068
+ var agent_source_evidence_contract_2 = require_agent_source_evidence_contract();
60069
+ Object.defineProperty(exports, "functionSourceJobAdmissionSchema", { enumerable: true, get: function() {
60070
+ return agent_source_evidence_contract_2.functionSourceJobAdmissionSchema;
60071
+ } });
60072
+ var monitoring_1 = require_monitoring();
60073
+ Object.defineProperty(exports, "createFunctionServiceMonitoringClient", { enumerable: true, get: function() {
60074
+ return monitoring_1.createFunctionServiceMonitoringClient;
60075
+ } });
60076
+ var monitoring_contract_1 = require_monitoring_contract();
60077
+ Object.defineProperty(exports, "FunctionMonitoringError", { enumerable: true, get: function() {
60078
+ return monitoring_contract_1.FunctionMonitoringError;
60079
+ } });
60080
+ Object.defineProperty(exports, "monitoringPayloadHash", { enumerable: true, get: function() {
60081
+ return monitoring_contract_1.monitoringPayloadHash;
60082
+ } });
60083
+ var monitoring_contract_2 = require_monitoring_contract();
60084
+ Object.defineProperty(exports, "monitoringEventsSchema", { enumerable: true, get: function() {
60085
+ return monitoring_contract_2.monitoringEventsSchema;
60086
+ } });
60087
+ Object.defineProperty(exports, "monitoringPublishSchema", { enumerable: true, get: function() {
60088
+ return monitoring_contract_2.monitoringPublishSchema;
60089
+ } });
60090
+ var monitoring_annotations_1 = require_monitoring_annotations();
60091
+ Object.defineProperty(exports, "functionMonitoringAnnotationSchema", { enumerable: true, get: function() {
60092
+ return monitoring_annotations_1.functionMonitoringAnnotationSchema;
60093
+ } });
57202
60094
  var tracing_1 = require_tracing();
57203
60095
  Object.defineProperty(exports, "installFunctionTracing", { enumerable: true, get: function() {
57204
60096
  return tracing_1.installFunctionTracing;
@@ -57261,6 +60153,11 @@ function lazyValkeyStore(connection, local) {
57261
60153
  delete: async (key) => (await client()).delete(key)
57262
60154
  };
57263
60155
  }
60156
+ __exportStar(require_directory_contract(), exports);
60157
+ var service_directory_1 = require_service_directory();
60158
+ Object.defineProperty(exports, "createFunctionServiceDirectoryClient", { enumerable: true, get: function() {
60159
+ return service_directory_1.createFunctionServiceDirectoryClient;
60160
+ } });
57264
60161
  /*! Bundled license information:
57265
60162
 
57266
60163
  web-streams-polyfill/dist/ponyfill.es2018.js: