@graphrefly/ts 0.0.1 → 0.0.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 (330) hide show
  1. package/dist/actions-types-CSC3NMDl.d.ts +657 -0
  2. package/dist/actions-types-wl9Mgkmr.d.cts +657 -0
  3. package/dist/adapters/index.cjs +5157 -2951
  4. package/dist/adapters/index.cjs.map +1 -1
  5. package/dist/adapters/index.d.cts +207 -70
  6. package/dist/adapters/index.d.ts +207 -70
  7. package/dist/adapters/index.js +3738 -1688
  8. package/dist/adapters/index.js.map +1 -1
  9. package/dist/adapters/nestjs/microservices.cjs +841 -0
  10. package/dist/adapters/nestjs/microservices.cjs.map +1 -0
  11. package/dist/adapters/nestjs/microservices.d.cts +45 -0
  12. package/dist/adapters/nestjs/microservices.d.ts +45 -0
  13. package/dist/adapters/nestjs/microservices.js +206 -0
  14. package/dist/adapters/nestjs/microservices.js.map +1 -0
  15. package/dist/adapters/nestjs/native.cjs +1391 -0
  16. package/dist/adapters/nestjs/native.cjs.map +1 -0
  17. package/dist/adapters/nestjs/native.d.cts +111 -0
  18. package/dist/adapters/nestjs/native.d.ts +111 -0
  19. package/dist/adapters/nestjs/native.js +577 -0
  20. package/dist/adapters/nestjs/native.js.map +1 -0
  21. package/dist/adapters/nestjs/websockets.cjs +924 -0
  22. package/dist/adapters/nestjs/websockets.cjs.map +1 -0
  23. package/dist/adapters/nestjs/websockets.d.cts +47 -0
  24. package/dist/adapters/nestjs/websockets.d.ts +47 -0
  25. package/dist/adapters/nestjs/websockets.js +286 -0
  26. package/dist/adapters/nestjs/websockets.js.map +1 -0
  27. package/dist/adapters/nestjs.cjs +1085 -0
  28. package/dist/adapters/nestjs.cjs.map +1 -0
  29. package/dist/adapters/nestjs.d.cts +385 -0
  30. package/dist/adapters/nestjs.d.ts +385 -0
  31. package/dist/adapters/nestjs.js +112 -0
  32. package/dist/adapters/nestjs.js.map +1 -0
  33. package/dist/adapters/observe-storage.d.cts +3 -3
  34. package/dist/adapters/observe-storage.d.ts +3 -3
  35. package/dist/adapters/observe-storage.js +4 -4
  36. package/dist/adapters/react.cjs.map +1 -1
  37. package/dist/adapters/react.d.cts +2 -2
  38. package/dist/adapters/react.d.ts +2 -2
  39. package/dist/adapters/react.js +1 -1
  40. package/dist/adapters/solid.cjs.map +1 -1
  41. package/dist/adapters/solid.d.cts +2 -2
  42. package/dist/adapters/solid.d.ts +2 -2
  43. package/dist/adapters/solid.js +1 -1
  44. package/dist/adapters/svelte.cjs.map +1 -1
  45. package/dist/adapters/svelte.d.cts +2 -2
  46. package/dist/adapters/svelte.d.ts +2 -2
  47. package/dist/adapters/svelte.js +1 -1
  48. package/dist/adapters/vue.cjs.map +1 -1
  49. package/dist/adapters/vue.d.cts +2 -2
  50. package/dist/adapters/vue.d.ts +2 -2
  51. package/dist/adapters/vue.js +1 -1
  52. package/dist/{agent-runtime-DZTJ3C-p.d.cts → agent-runtime-types-core-CaXfKNtY.d.cts} +171 -320
  53. package/dist/{agent-runtime-BesGDZcB.d.ts → agent-runtime-types-core-hU299uIC.d.ts} +171 -320
  54. package/dist/agent-runtime-types-tool-BEpSINol.d.ts +695 -0
  55. package/dist/agent-runtime-types-tool-DninPEzk.d.cts +695 -0
  56. package/dist/agentic-memory-retention-BmGX368S.d.ts +14 -0
  57. package/dist/agentic-memory-retention-Ih1qhX9Z.d.cts +14 -0
  58. package/dist/{agentic-memory-BmRCvh0d.d.ts → agentic-memory-types-CVSUS6XR.d.ts} +13 -57
  59. package/dist/{agentic-memory-DfuVZ-lY.d.cts → agentic-memory-types-FnnYlVUs.d.cts} +13 -57
  60. package/dist/{capability-admission-g0mn9hpq.d.ts → capability-admission-BW2CziT6.d.ts} +3 -3
  61. package/dist/{capability-admission-B0BzqAm5.d.cts → capability-admission-lwSecxXs.d.cts} +3 -3
  62. package/dist/chunk-2KUAG2GZ.js +9693 -0
  63. package/dist/chunk-2KUAG2GZ.js.map +1 -0
  64. package/dist/chunk-2NJP6GO4.js +1320 -0
  65. package/dist/chunk-2NJP6GO4.js.map +1 -0
  66. package/dist/{chunk-YDSIVHRR.js → chunk-4NWSNI4K.js} +1598 -1584
  67. package/dist/chunk-4NWSNI4K.js.map +1 -0
  68. package/dist/{chunk-Z2ANQ6JW.js → chunk-4Q77MMJY.js} +2 -2
  69. package/dist/chunk-6E76H4OU.js +132 -0
  70. package/dist/chunk-6E76H4OU.js.map +1 -0
  71. package/dist/chunk-7GOTIIQ7.js +819 -0
  72. package/dist/chunk-7GOTIIQ7.js.map +1 -0
  73. package/dist/{chunk-IXZBUWSP.js → chunk-7HZRJMN6.js} +2 -2
  74. package/dist/{chunk-SS2A464I.js → chunk-CJIFGJQG.js} +3 -3
  75. package/dist/{chunk-V7CIJE4B.js → chunk-CX6B6PO2.js} +92 -9
  76. package/dist/chunk-CX6B6PO2.js.map +1 -0
  77. package/dist/{chunk-FBUU43PM.js → chunk-E4QCH32M.js} +448 -446
  78. package/dist/chunk-E4QCH32M.js.map +1 -0
  79. package/dist/{chunk-HKK2JD7Z.js → chunk-ECURQ3HD.js} +12 -125
  80. package/dist/chunk-ECURQ3HD.js.map +1 -0
  81. package/dist/{chunk-3JR3EDB2.js → chunk-EOKT4QFF.js} +121 -115
  82. package/dist/chunk-EOKT4QFF.js.map +1 -0
  83. package/dist/{chunk-K3FXTC3I.js → chunk-HJACH5PU.js} +3 -3
  84. package/dist/{chunk-GTPCOEOZ.js → chunk-IDMLXLLG.js} +3 -3
  85. package/dist/{chunk-DKP56CSW.js → chunk-JKAYLDQV.js} +2 -2
  86. package/dist/{chunk-4VLAQHZI.js → chunk-K7FB3JTD.js} +17 -1
  87. package/dist/chunk-K7FB3JTD.js.map +1 -0
  88. package/dist/{chunk-H75VXTGT.js → chunk-L6LDXRWE.js} +3 -3
  89. package/dist/{chunk-H75VXTGT.js.map → chunk-L6LDXRWE.js.map} +1 -1
  90. package/dist/{chunk-YXMZ2N6J.js → chunk-M7J6Z4IJ.js} +1071 -1025
  91. package/dist/chunk-M7J6Z4IJ.js.map +1 -0
  92. package/dist/chunk-MQEQMS7B.js +1009 -0
  93. package/dist/chunk-MQEQMS7B.js.map +1 -0
  94. package/dist/chunk-MTELVIYR.js +1421 -0
  95. package/dist/chunk-MTELVIYR.js.map +1 -0
  96. package/dist/{chunk-QFY4AFY4.js → chunk-PVC7WDKI.js} +58 -52
  97. package/dist/chunk-PVC7WDKI.js.map +1 -0
  98. package/dist/{chunk-VTHLCFN4.js → chunk-RAHNUYA5.js} +2 -2
  99. package/dist/{chunk-XKXWK2KP.js → chunk-SHZDP2MQ.js} +1157 -1021
  100. package/dist/chunk-SHZDP2MQ.js.map +1 -0
  101. package/dist/{chunk-CZNV3VXM.js → chunk-SIDJO2T4.js} +11 -11
  102. package/dist/chunk-STXRMPW4.js +4131 -0
  103. package/dist/chunk-STXRMPW4.js.map +1 -0
  104. package/dist/{chunk-2747WN4Y.js → chunk-TPND5MJS.js} +3 -3
  105. package/dist/chunk-TQPCAIQI.js +612 -0
  106. package/dist/chunk-TQPCAIQI.js.map +1 -0
  107. package/dist/{chunk-43BKLFZU.js → chunk-YDWBXXQZ.js} +10 -10
  108. package/dist/{chunk-6PHB5CJS.js → chunk-ZLFRB6FI.js} +2 -2
  109. package/dist/composition/index.cjs +1228 -1076
  110. package/dist/composition/index.cjs.map +1 -1
  111. package/dist/composition/index.d.cts +3 -3
  112. package/dist/composition/index.d.ts +3 -3
  113. package/dist/composition/index.js +4 -4
  114. package/dist/core/index.cjs +1198 -1046
  115. package/dist/core/index.cjs.map +1 -1
  116. package/dist/core/index.d.cts +1 -1
  117. package/dist/core/index.d.ts +1 -1
  118. package/dist/core/index.js +2 -2
  119. package/dist/cqrs/index.d.cts +3 -3
  120. package/dist/cqrs/index.d.ts +3 -3
  121. package/dist/cqrs/messaging.d.cts +4 -4
  122. package/dist/cqrs/messaging.d.ts +4 -4
  123. package/dist/cqrs/work-queue.d.cts +5 -5
  124. package/dist/cqrs/work-queue.d.ts +5 -5
  125. package/dist/data-structures/index.cjs +1226 -1074
  126. package/dist/data-structures/index.cjs.map +1 -1
  127. package/dist/data-structures/index.d.cts +8 -7
  128. package/dist/data-structures/index.d.ts +8 -7
  129. package/dist/data-structures/index.js +6 -5
  130. package/dist/{describe-BpyJuWkw.d.ts → describe-B_A5fbXH.d.ts} +1 -1
  131. package/dist/{describe-DYMw_l1C.d.cts → describe-CQRrkv-Q.d.cts} +1 -1
  132. package/dist/executors/tool-provider-adapters.cjs +3091 -0
  133. package/dist/executors/tool-provider-adapters.cjs.map +1 -0
  134. package/dist/executors/tool-provider-adapters.d.cts +174 -0
  135. package/dist/executors/tool-provider-adapters.d.ts +174 -0
  136. package/dist/executors/tool-provider-adapters.js +1336 -0
  137. package/dist/executors/tool-provider-adapters.js.map +1 -0
  138. package/dist/executors/tool-provider-runtime.cjs +5178 -0
  139. package/dist/executors/tool-provider-runtime.cjs.map +1 -0
  140. package/dist/executors/tool-provider-runtime.d.cts +17 -0
  141. package/dist/executors/tool-provider-runtime.d.ts +17 -0
  142. package/dist/executors/tool-provider-runtime.js +15 -0
  143. package/dist/executors/tool-provider-runtime.js.map +1 -0
  144. package/dist/executors/tool-provider.cjs +6392 -0
  145. package/dist/executors/tool-provider.cjs.map +1 -0
  146. package/dist/executors/tool-provider.d.cts +60 -0
  147. package/dist/executors/tool-provider.d.ts +60 -0
  148. package/dist/executors/tool-provider.js +89 -0
  149. package/dist/executors/tool-provider.js.map +1 -0
  150. package/dist/executors/work-queue.d.cts +6 -6
  151. package/dist/executors/work-queue.d.ts +6 -6
  152. package/dist/graph/index.cjs +1499 -1341
  153. package/dist/graph/index.cjs.map +1 -1
  154. package/dist/graph/index.d.cts +9 -8
  155. package/dist/graph/index.d.ts +9 -8
  156. package/dist/graph/index.js +23 -22
  157. package/dist/{graph-DCEWh4T2.d.cts → graph-CWK3HLPB.d.cts} +133 -131
  158. package/dist/{graph-D-1-SQeC.d.ts → graph-ho5sotHP.d.ts} +133 -131
  159. package/dist/{index-Bmxeu0nK.d.ts → index-CQWcE0Dw.d.ts} +18 -4
  160. package/dist/{index-72VZC0-E.d.cts → index-DHA1i67c.d.cts} +18 -4
  161. package/dist/index.cjs +3397 -3140
  162. package/dist/index.cjs.map +1 -1
  163. package/dist/index.d.cts +12 -9
  164. package/dist/index.d.ts +12 -9
  165. package/dist/index.js +110 -109
  166. package/dist/inspection/boundary.d.cts +4 -4
  167. package/dist/inspection/boundary.d.ts +4 -4
  168. package/dist/measurements-C0mAvWU1.d.cts +164 -0
  169. package/dist/measurements-OMpCeBwh.d.ts +164 -0
  170. package/dist/messaging/index.cjs +57 -51
  171. package/dist/messaging/index.cjs.map +1 -1
  172. package/dist/messaging/index.d.cts +11 -276
  173. package/dist/messaging/index.d.ts +11 -276
  174. package/dist/messaging/index.js +1 -1
  175. package/dist/operators/index.cjs +1228 -1076
  176. package/dist/operators/index.cjs.map +1 -1
  177. package/dist/operators/index.d.cts +5 -5
  178. package/dist/operators/index.d.ts +5 -5
  179. package/dist/operators/index.js +5 -5
  180. package/dist/orchestration/index.cjs +8844 -6071
  181. package/dist/orchestration/index.cjs.map +1 -1
  182. package/dist/orchestration/index.d.cts +171 -224
  183. package/dist/orchestration/index.d.ts +171 -224
  184. package/dist/orchestration/index.js +42 -991
  185. package/dist/orchestration/index.js.map +1 -1
  186. package/dist/orchestration/messaging.d.cts +5 -8
  187. package/dist/orchestration/messaging.d.ts +5 -8
  188. package/dist/orchestration/work-queue.cjs +1243 -5
  189. package/dist/orchestration/work-queue.cjs.map +1 -1
  190. package/dist/orchestration/work-queue.d.cts +121 -10
  191. package/dist/orchestration/work-queue.d.ts +121 -10
  192. package/dist/orchestration/work-queue.js +1067 -4
  193. package/dist/orchestration/work-queue.js.map +1 -1
  194. package/dist/patterns/event-flow.cjs +6 -20
  195. package/dist/patterns/event-flow.cjs.map +1 -1
  196. package/dist/patterns/event-flow.d.cts +4 -4
  197. package/dist/patterns/event-flow.d.ts +4 -4
  198. package/dist/patterns/event-flow.js +2 -2
  199. package/dist/patterns/index.cjs +453 -465
  200. package/dist/patterns/index.cjs.map +1 -1
  201. package/dist/patterns/index.d.cts +6 -5
  202. package/dist/patterns/index.d.ts +6 -5
  203. package/dist/patterns/index.js +3 -3
  204. package/dist/process-types-C9uMYz3i.d.ts +200 -0
  205. package/dist/process-types-h3uRlzDc.d.cts +200 -0
  206. package/dist/{reactive-collection-DNV0-gFi.d.cts → reactive-collection-B9R0Bl1P.d.cts} +4 -34
  207. package/dist/{reactive-collection-BAmfrGjd.d.ts → reactive-collection-BXFrH0U2.d.ts} +4 -34
  208. package/dist/{reactive-collection-storage-BNEldDyi.d.cts → reactive-collection-storage-BLGv8Xp8.d.cts} +5 -5
  209. package/dist/{reactive-collection-storage-YZsAQsWK.d.ts → reactive-collection-storage-a4zD3665.d.ts} +5 -5
  210. package/dist/{reactive-map-DRD1LJ2H.d.cts → reactive-map-C_8sOfdS.d.cts} +3 -2
  211. package/dist/{reactive-map-EsDiCmJk.d.ts → reactive-map-jle5dnok.d.ts} +3 -2
  212. package/dist/render/index.d.cts +2 -2
  213. package/dist/render/index.d.ts +2 -2
  214. package/dist/scheduled-readiness-5rwQlyjV.d.ts +91 -0
  215. package/dist/scheduled-readiness-DpRY8jI0.d.cts +91 -0
  216. package/dist/semantic-memory-graph-C2ZUwIlq.d.ts +30 -0
  217. package/dist/semantic-memory-graph-DlZBD_Eu.d.cts +30 -0
  218. package/dist/{semantic-memory-graph-DKuNzuWw.d.cts → semantic-memory-graph-types-BvzdqmkY.d.cts} +2 -28
  219. package/dist/{semantic-memory-graph-uwbwJdhe.d.ts → semantic-memory-graph-types-Ci-OtahO.d.ts} +2 -28
  220. package/dist/solutions/index.cjs +6353 -6169
  221. package/dist/solutions/index.cjs.map +1 -1
  222. package/dist/solutions/index.d.cts +12 -10
  223. package/dist/solutions/index.d.ts +12 -10
  224. package/dist/solutions/index.js +5 -5
  225. package/dist/solutions/reactive-layout/browser/index.cjs +116 -108
  226. package/dist/solutions/reactive-layout/browser/index.cjs.map +1 -1
  227. package/dist/solutions/reactive-layout/browser/index.d.cts +4 -4
  228. package/dist/solutions/reactive-layout/browser/index.d.ts +4 -4
  229. package/dist/solutions/reactive-layout/browser/index.js +3 -3
  230. package/dist/solutions/reactive-layout/index.cjs +3578 -3350
  231. package/dist/solutions/reactive-layout/index.cjs.map +1 -1
  232. package/dist/solutions/reactive-layout/index.d.cts +32 -576
  233. package/dist/solutions/reactive-layout/index.d.ts +32 -576
  234. package/dist/solutions/reactive-layout/index.js +65 -5
  235. package/dist/solutions/reactive-layout/node-canvas/index.cjs +127 -117
  236. package/dist/solutions/reactive-layout/node-canvas/index.cjs.map +1 -1
  237. package/dist/solutions/reactive-layout/node-canvas/index.d.cts +4 -4
  238. package/dist/solutions/reactive-layout/node-canvas/index.d.ts +4 -4
  239. package/dist/solutions/reactive-layout/node-canvas/index.js +3 -3
  240. package/dist/solutions/reactive-layout/react-native/index.cjs +127 -117
  241. package/dist/solutions/reactive-layout/react-native/index.cjs.map +1 -1
  242. package/dist/solutions/reactive-layout/react-native/index.d.cts +4 -4
  243. package/dist/solutions/reactive-layout/react-native/index.d.ts +4 -4
  244. package/dist/solutions/reactive-layout/react-native/index.js +3 -3
  245. package/dist/solutions/reactive-layout/skia/index.cjs +127 -117
  246. package/dist/solutions/reactive-layout/skia/index.cjs.map +1 -1
  247. package/dist/solutions/reactive-layout/skia/index.d.cts +4 -4
  248. package/dist/solutions/reactive-layout/skia/index.d.ts +4 -4
  249. package/dist/solutions/reactive-layout/skia/index.js +3 -3
  250. package/dist/solutions/work-item/actions.cjs +1609 -1428
  251. package/dist/solutions/work-item/actions.cjs.map +1 -1
  252. package/dist/solutions/work-item/actions.d.cts +23 -184
  253. package/dist/solutions/work-item/actions.d.ts +23 -184
  254. package/dist/solutions/work-item/actions.js +1558 -934
  255. package/dist/solutions/work-item/actions.js.map +1 -1
  256. package/dist/solutions/work-item/scheduling.cjs +9181 -1838
  257. package/dist/solutions/work-item/scheduling.cjs.map +1 -1
  258. package/dist/solutions/work-item/scheduling.d.cts +1763 -328
  259. package/dist/solutions/work-item/scheduling.d.ts +1763 -328
  260. package/dist/solutions/work-item/scheduling.js +117 -3
  261. package/dist/solutions/work-item/work-queue.d.cts +7 -7
  262. package/dist/solutions/work-item/work-queue.d.ts +7 -7
  263. package/dist/sources/browser.cjs +1318 -1083
  264. package/dist/sources/browser.cjs.map +1 -1
  265. package/dist/sources/browser.d.cts +4 -4
  266. package/dist/sources/browser.d.ts +4 -4
  267. package/dist/sources/browser.js +4 -4
  268. package/dist/sources/index.cjs +1318 -1083
  269. package/dist/sources/index.cjs.map +1 -1
  270. package/dist/sources/index.d.cts +4 -4
  271. package/dist/sources/index.d.ts +4 -4
  272. package/dist/sources/index.js +4 -4
  273. package/dist/sources/node.d.cts +3 -3
  274. package/dist/sources/node.d.ts +3 -3
  275. package/dist/storage/browser.cjs +16 -0
  276. package/dist/storage/browser.cjs.map +1 -1
  277. package/dist/storage/browser.js +3 -3
  278. package/dist/storage/index.cjs +16 -0
  279. package/dist/storage/index.cjs.map +1 -1
  280. package/dist/storage/index.d.cts +5 -4
  281. package/dist/storage/index.d.ts +5 -4
  282. package/dist/storage/index.js +6 -6
  283. package/dist/storage/node.cjs +16 -0
  284. package/dist/storage/node.cjs.map +1 -1
  285. package/dist/storage/node.js +3 -3
  286. package/dist/{store-C-joM4gh.d.ts → store-BmtEs9mG.d.ts} +1 -1
  287. package/dist/{store-CNJwmT-h.d.cts → store-PAAsYvML.d.cts} +1 -1
  288. package/dist/types-BRNKoFHj.d.ts +357 -0
  289. package/dist/{types-CcPIn7sy.d.cts → types-BS6CyR-x.d.cts} +27 -108
  290. package/dist/types-BWK2ay3e.d.cts +457 -0
  291. package/dist/types-BXKSAoE1.d.cts +357 -0
  292. package/dist/types-BaPpZItj.d.ts +457 -0
  293. package/dist/types-BhveCMg5.d.cts +274 -0
  294. package/dist/{types-BsJvElYZ.d.ts → types-C9NOgNJw.d.ts} +27 -108
  295. package/dist/types-CTsQ8Ww4.d.ts +274 -0
  296. package/dist/types-DL_05n2M.d.ts +34 -0
  297. package/dist/types-XDoqxYO9.d.cts +34 -0
  298. package/dist/{work-item-runtime-C3M79vE9.d.ts → work-item-runtime-types-BqtWnSCS.d.ts} +3 -93
  299. package/dist/{work-item-runtime-qaVgsL0T.d.cts → work-item-runtime-types-CHO03AKh.d.cts} +3 -93
  300. package/dist/work-queue/index.cjs +957 -953
  301. package/dist/work-queue/index.cjs.map +1 -1
  302. package/dist/work-queue/index.d.cts +9 -357
  303. package/dist/work-queue/index.d.ts +9 -357
  304. package/dist/work-queue/index.js +957 -953
  305. package/dist/work-queue/index.js.map +1 -1
  306. package/package.json +603 -513
  307. package/dist/chunk-3JR3EDB2.js.map +0 -1
  308. package/dist/chunk-4VLAQHZI.js.map +0 -1
  309. package/dist/chunk-6XAIOL3X.js +0 -2407
  310. package/dist/chunk-6XAIOL3X.js.map +0 -1
  311. package/dist/chunk-FBUU43PM.js.map +0 -1
  312. package/dist/chunk-HKK2JD7Z.js.map +0 -1
  313. package/dist/chunk-PC3BTTBE.js +0 -3217
  314. package/dist/chunk-PC3BTTBE.js.map +0 -1
  315. package/dist/chunk-QFY4AFY4.js.map +0 -1
  316. package/dist/chunk-V7CIJE4B.js.map +0 -1
  317. package/dist/chunk-XKXWK2KP.js.map +0 -1
  318. package/dist/chunk-YDSIVHRR.js.map +0 -1
  319. package/dist/chunk-YXMZ2N6J.js.map +0 -1
  320. /package/dist/{chunk-Z2ANQ6JW.js.map → chunk-4Q77MMJY.js.map} +0 -0
  321. /package/dist/{chunk-IXZBUWSP.js.map → chunk-7HZRJMN6.js.map} +0 -0
  322. /package/dist/{chunk-SS2A464I.js.map → chunk-CJIFGJQG.js.map} +0 -0
  323. /package/dist/{chunk-K3FXTC3I.js.map → chunk-HJACH5PU.js.map} +0 -0
  324. /package/dist/{chunk-GTPCOEOZ.js.map → chunk-IDMLXLLG.js.map} +0 -0
  325. /package/dist/{chunk-DKP56CSW.js.map → chunk-JKAYLDQV.js.map} +0 -0
  326. /package/dist/{chunk-VTHLCFN4.js.map → chunk-RAHNUYA5.js.map} +0 -0
  327. /package/dist/{chunk-CZNV3VXM.js.map → chunk-SIDJO2T4.js.map} +0 -0
  328. /package/dist/{chunk-2747WN4Y.js.map → chunk-TPND5MJS.js.map} +0 -0
  329. /package/dist/{chunk-43BKLFZU.js.map → chunk-YDWBXXQZ.js.map} +0 -0
  330. /package/dist/{chunk-6PHB5CJS.js.map → chunk-ZLFRB6FI.js.map} +0 -0
@@ -6,13 +6,13 @@ import {
6
6
  interval,
7
7
  of,
8
8
  timer
9
- } from "./chunk-V7CIJE4B.js";
9
+ } from "./chunk-CX6B6PO2.js";
10
10
  import {
11
11
  filter,
12
12
  initNode,
13
13
  map,
14
14
  merge
15
- } from "./chunk-SS2A464I.js";
15
+ } from "./chunk-CJIFGJQG.js";
16
16
  import {
17
17
  CTX_NODE_BINDING,
18
18
  depBatch,
@@ -459,4 +459,4 @@ export {
459
459
  timeout,
460
460
  bufferTime
461
461
  };
462
- //# sourceMappingURL=chunk-2747WN4Y.js.map
462
+ //# sourceMappingURL=chunk-TPND5MJS.js.map
@@ -0,0 +1,612 @@
1
+ import {
2
+ depBatch
3
+ } from "./chunk-WQIA3GFB.js";
4
+
5
+ // src/orchestration/agent-runtime-common.ts
6
+ function uniqueSourceRefs(sourceRefs) {
7
+ const seen = /* @__PURE__ */ new Set();
8
+ const unique = [];
9
+ for (const sourceRef of sourceRefs) {
10
+ const key = `${sourceRef.kind}:${sourceRef.id}:${JSON.stringify(sourceRef.metadata ?? {})}`;
11
+ if (seen.has(key)) continue;
12
+ seen.add(key);
13
+ unique.push(sourceRef);
14
+ }
15
+ return Object.freeze(unique);
16
+ }
17
+ function stableJsonStringify(value) {
18
+ const seen = /* @__PURE__ */ new WeakSet();
19
+ return JSON.stringify(value, (_key, child) => {
20
+ if (typeof child === "bigint") return child.toString();
21
+ if (typeof child === "function") return "[Function]";
22
+ if (!isRecord(child) && !Array.isArray(child)) return child;
23
+ if (seen.has(child)) return "[Circular]";
24
+ seen.add(child);
25
+ if (Array.isArray(child)) return child;
26
+ return Object.keys(child).sort().reduce((out, key) => {
27
+ out[key] = child[key];
28
+ return out;
29
+ }, {});
30
+ });
31
+ }
32
+ function stableStringHash(value) {
33
+ let hash = 2166136261;
34
+ for (let i = 0; i < value.length; i += 1) {
35
+ hash ^= value.charCodeAt(i);
36
+ hash = Math.imul(hash, 16777619);
37
+ }
38
+ return (hash >>> 0).toString(36);
39
+ }
40
+ function cloneGraphVisibleMaterial(value) {
41
+ if (!isRecord(value) && !Array.isArray(value)) return value;
42
+ if (Array.isArray(value))
43
+ return Object.freeze(value.map((item) => cloneGraphVisibleMaterial(item)));
44
+ return Object.freeze(
45
+ Object.entries(value).reduce((record, [key, child]) => {
46
+ record[key] = cloneGraphVisibleMaterial(child);
47
+ return record;
48
+ }, {})
49
+ );
50
+ }
51
+ function projectRuntimeFact(graph, runtime, name, factory, pick) {
52
+ return graph.node(
53
+ [runtime],
54
+ (ctx) => {
55
+ for (const fact of depBatch(ctx, 0) ?? []) {
56
+ const typed = fact;
57
+ const value = pick(typed);
58
+ if (value !== void 0) ctx.down([["DATA", value]]);
59
+ }
60
+ },
61
+ { name, factory }
62
+ );
63
+ }
64
+ function forEachDepBatch(ctx, start, count, fn) {
65
+ for (let i = 0; i < count; i += 1) {
66
+ for (const value of depBatch(ctx, start + i) ?? []) fn(value);
67
+ }
68
+ }
69
+ function forbiddenDataKeys(value, path = [], seen = /* @__PURE__ */ new WeakSet()) {
70
+ if (typeof value === "function") return [{ path, reason: "function-value" }];
71
+ if (typeof value === "symbol" || typeof value === "bigint") {
72
+ return [{ path, reason: "non-graph-visible-primitive" }];
73
+ }
74
+ if (!isRecord(value) && !Array.isArray(value)) return [];
75
+ if (typeof value === "object" && value !== null) {
76
+ if (seen.has(value)) return [];
77
+ seen.add(value);
78
+ }
79
+ const issues = [];
80
+ if (Array.isArray(value)) {
81
+ value.forEach((item, index) => {
82
+ issues.push(...forbiddenDataKeys(item, [...path, index], seen));
83
+ });
84
+ return issues;
85
+ }
86
+ if (!isPlainRecord(value)) return [{ path, reason: "non-plain-runtime-object" }];
87
+ const symbolKeys = Object.getOwnPropertySymbols(value);
88
+ if (symbolKeys.length > 0) {
89
+ issues.push({ path, reason: "symbol-key" });
90
+ }
91
+ for (const [key, child] of Object.entries(value)) {
92
+ const nextPath = [...path, key];
93
+ if (/^(apiKey|api_key|secret|client|transport|subprocess|sdk|oauth|credential|credentials|accessToken|access_token|refreshToken|refresh_token|idToken|id_token|token|password|passphrase|authorization|authHeader|auth_header|bearer|privateKey|private_key|sessionCookie|session_cookie|cookie)$/i.test(
94
+ key
95
+ )) {
96
+ issues.push({ path: nextPath, reason: "forbidden-runtime-key" });
97
+ }
98
+ issues.push(...forbiddenDataKeys(child, nextPath, seen));
99
+ }
100
+ return issues;
101
+ }
102
+ function forbiddenGraphVisibleMaterialIssues(value, subjectRef, area) {
103
+ if (value === void 0) return [];
104
+ const forbidden = publicMaterialForbiddenKeys(value, "provider");
105
+ if (forbidden.length === 0) return [];
106
+ return Object.freeze(
107
+ forbidden.map(
108
+ (entry) => dataIssue(
109
+ "tool-provider-catalog-forbidden-runtime-material",
110
+ "Tool provider catalog material must not contain runtime-private adapter material.",
111
+ { subjectId: subjectRef.id, refs: [subjectRef], details: { area, reason: entry.reason } }
112
+ )
113
+ )
114
+ );
115
+ }
116
+ function forbiddenAdapterInputMaterialIssues(value, subjectRef, area) {
117
+ if (value === void 0) return [];
118
+ const forbidden = publicMaterialForbiddenKeys(value, "provider");
119
+ if (forbidden.length === 0) return [];
120
+ return Object.freeze(
121
+ forbidden.map(
122
+ (entry) => dataIssue(
123
+ "tool-provider-adapter-input-forbidden-runtime-material",
124
+ "Tool provider adapter input material must not contain runtime-private adapter material.",
125
+ { subjectId: subjectRef.id, refs: [subjectRef], details: { area, reason: entry.reason } }
126
+ )
127
+ )
128
+ );
129
+ }
130
+ function sanitizeAdapterInputSourceRefs(sourceRefs) {
131
+ return canonicalPublicSourceRefs(sourceRefs);
132
+ }
133
+ function sanitizeGraphVisibleRecord(value, policy) {
134
+ return sanitizePublicRecord(value, { mode: "graph", policy });
135
+ }
136
+ function sanitizeProviderGraphVisibleRecord(value, policy) {
137
+ return sanitizePublicRecord(value, { mode: "provider", policy });
138
+ }
139
+ function canonicalPublicSourceRefs(sourceRefs) {
140
+ return uniqueSourceRefs(
141
+ sourceRefs.map((sourceRef) => {
142
+ const metadata = sanitizePublicRecord(sourceRef.metadata, { mode: "provider" });
143
+ return metadata === void 0 ? { kind: sourceRef.kind, id: sourceRef.id } : { kind: sourceRef.kind, id: sourceRef.id, metadata };
144
+ })
145
+ );
146
+ }
147
+ function sanitizePublicRecord(value, opts) {
148
+ if (value === void 0 || publicMaterialForbiddenKeys(value, opts.mode).length > 0) {
149
+ return void 0;
150
+ }
151
+ return Object.freeze(boundRecordStrings(value, maxPublicMetadataStringChars(opts.policy)));
152
+ }
153
+ function publicMaterialForbiddenKeys(value, mode) {
154
+ const forbidden = [...forbiddenDataKeys(value)];
155
+ if (mode === "provider") forbidden.push(...forbiddenProviderRawMaterialKeys(value));
156
+ return forbidden;
157
+ }
158
+ function unlockedToolProviderPolicyOverrides(overrides) {
159
+ if (overrides === void 0) return void 0;
160
+ const rest = { ...overrides };
161
+ delete rest.kind;
162
+ delete rest.policyId;
163
+ delete rest.providerId;
164
+ return rest;
165
+ }
166
+ function sanitizeAgentOutputEnvelope(envelope, input, policy, issues) {
167
+ const summary = envelope.summary === void 0 ? void 0 : boundedPublicText(envelope.summary, "summary", input, policy, issues);
168
+ const metadata = sanitizeRuntimeMetadata(envelope.metadata, input, policy, issues);
169
+ if (metadata === void 0 && envelope.metadata !== void 0) {
170
+ issues.push(
171
+ dataIssue(
172
+ "tool-provider-adapter-runtime-metadata-redacted",
173
+ "Tool provider adapter runtime metadata was omitted because it contained runtime-private material.",
174
+ {
175
+ subjectId: input.requestId,
176
+ refs: [ref("tool-provider-adapter-input", input.adapterInputId)],
177
+ severity: "warning"
178
+ }
179
+ )
180
+ );
181
+ }
182
+ const value = sanitizeInlineOutputValue(envelope.value, input, policy, issues);
183
+ return Object.freeze({
184
+ kind: envelope.kind,
185
+ value,
186
+ refs: envelope.refs === void 0 ? void 0 : sanitizeAdapterInputSourceRefs(envelope.refs),
187
+ summary,
188
+ artifacts: envelope.artifacts === void 0 ? void 0 : Object.freeze(
189
+ envelope.artifacts.map(
190
+ (artifact) => sanitizeExecutorArtifactMaterial(artifact, input, policy, issues)
191
+ )
192
+ ),
193
+ metadata
194
+ });
195
+ }
196
+ function sanitizeExecutorArtifactMaterial(artifact, input, policy, issues) {
197
+ const metadata = sanitizeRuntimeMetadata(artifact.metadata, input, policy, issues);
198
+ const redaction = sanitizeRuntimeMetadata(artifact.redaction, input, policy, issues);
199
+ return Object.freeze({
200
+ kind: artifact.kind,
201
+ ...artifact.format === void 0 ? {} : { format: artifact.format },
202
+ ...artifact.schemaRef === void 0 ? {} : { schemaRef: artifact.schemaRef },
203
+ ...artifact.schemaKind === void 0 ? {} : { schemaKind: artifact.schemaKind },
204
+ ...artifact.mimeType === void 0 ? {} : { mimeType: artifact.mimeType },
205
+ ...artifact.mediaType === void 0 ? {} : { mediaType: artifact.mediaType },
206
+ ...artifact.filename === void 0 ? {} : { filename: artifact.filename },
207
+ ...artifact.byteLength === void 0 ? {} : { byteLength: artifact.byteLength },
208
+ ...artifact.digest === void 0 ? {} : { digest: artifact.digest },
209
+ ...artifact.encoding === void 0 ? {} : { encoding: artifact.encoding },
210
+ dataMode: artifact.dataMode,
211
+ ...artifact.summary === void 0 ? {} : { summary: boundedPublicText(artifact.summary, "summary", input, policy, issues) },
212
+ ...artifact.value === void 0 ? {} : { value: sanitizeInlineOutputValue(artifact.value, input, policy, issues) },
213
+ ...artifact.ref === void 0 ? {} : { ref: sanitizeAdapterInputSourceRefs([artifact.ref])[0] },
214
+ ...artifact.refs === void 0 ? {} : { refs: sanitizeAdapterInputSourceRefs(artifact.refs) },
215
+ ...artifact.sourceRefs === void 0 ? {} : { sourceRefs: sanitizeAdapterInputSourceRefs(artifact.sourceRefs) },
216
+ ...artifact.sizeEvidence === void 0 ? {} : {
217
+ sizeEvidence: Object.freeze(
218
+ artifact.sizeEvidence.map(
219
+ (evidence) => sanitizeSizeCapacityEvidence(evidence, input, policy, issues)
220
+ )
221
+ )
222
+ },
223
+ ...artifact.sensitivity === void 0 ? {} : { sensitivity: Object.freeze([...artifact.sensitivity]) },
224
+ ...redaction === void 0 ? {} : { redaction },
225
+ ...metadata === void 0 ? {} : { metadata }
226
+ });
227
+ }
228
+ function sanitizeSizeCapacityEvidence(evidence, input, policy, issues) {
229
+ const metadata = sanitizeRuntimeMetadata(evidence.metadata, input, policy, issues);
230
+ const redaction = sanitizeRuntimeMetadata(evidence.redaction, input, policy, issues);
231
+ return Object.freeze({
232
+ kind: "size-capacity-evidence",
233
+ unit: evidence.unit,
234
+ quantity: evidence.quantity,
235
+ measurementSource: evidence.measurementSource,
236
+ ...evidence.estimated === void 0 ? {} : { estimated: evidence.estimated },
237
+ ...evidence.encoding === void 0 ? {} : { encoding: evidence.encoding },
238
+ ...evidence.mediaType === void 0 ? {} : { mediaType: evidence.mediaType },
239
+ ...evidence.sourceRefs === void 0 ? {} : { sourceRefs: sanitizeAdapterInputSourceRefs(evidence.sourceRefs) },
240
+ ...evidence.refs === void 0 ? {} : { refs: sanitizeAdapterInputSourceRefs(evidence.refs) },
241
+ ...evidence.issues === void 0 ? {} : {
242
+ issues: Object.freeze(evidence.issues.map((issue) => sanitizeAdapterInputIssue(issue)))
243
+ },
244
+ ...evidence.sensitivity === void 0 ? {} : { sensitivity: Object.freeze([...evidence.sensitivity]) },
245
+ ...redaction === void 0 ? {} : { redaction },
246
+ ...metadata === void 0 ? {} : { metadata }
247
+ });
248
+ }
249
+ function sanitizeAgentNeed(need, input, policy, issues) {
250
+ const metadata = sanitizeRuntimeMetadata(need.metadata, input, policy, issues);
251
+ if (metadata === void 0 && need.metadata !== void 0) {
252
+ issues.push(
253
+ dataIssue(
254
+ "tool-provider-adapter-runtime-metadata-redacted",
255
+ "Tool provider adapter runtime metadata was omitted because it contained runtime-private material.",
256
+ {
257
+ subjectId: input.requestId,
258
+ refs: [ref("tool-provider-adapter-input", input.adapterInputId)],
259
+ severity: "warning"
260
+ }
261
+ )
262
+ );
263
+ }
264
+ return Object.freeze({
265
+ kind: need.kind,
266
+ message: need.message === void 0 ? void 0 : boundedPublicText(need.message, "message", input, policy, issues),
267
+ refs: need.refs === void 0 ? void 0 : sanitizeAdapterInputSourceRefs(need.refs),
268
+ metadata
269
+ });
270
+ }
271
+ function sanitizeRuntimeMetadata(value, input, policy, issues) {
272
+ if (value === void 0) return void 0;
273
+ const bounded = sanitizePublicRecordWithEvidence(value, { mode: "provider", policy });
274
+ if (bounded === void 0) return void 0;
275
+ for (const entry of bounded.truncated) {
276
+ issues.push(
277
+ dataIssue(
278
+ "tool-provider-adapter-runtime-public-text-truncated",
279
+ "Tool provider adapter runtime public text was truncated; large/raw material must use artifact summary/ref envelopes.",
280
+ {
281
+ subjectId: input.requestId,
282
+ refs: [ref("tool-provider-adapter-input", input.adapterInputId)],
283
+ severity: "warning",
284
+ details: {
285
+ field: "metadata",
286
+ path: entry.path.join("."),
287
+ originalChars: entry.originalChars,
288
+ limitChars: entry.limitChars,
289
+ unit: "chars",
290
+ measurementSource: "js-string-length"
291
+ }
292
+ }
293
+ )
294
+ );
295
+ }
296
+ return Object.freeze(bounded.value);
297
+ }
298
+ function sanitizePublicRecordWithEvidence(value, opts) {
299
+ if (publicMaterialForbiddenKeys(value, opts.mode).length > 0) return void 0;
300
+ return boundRecordStringsWithEvidence(value, maxPublicMetadataStringChars(opts.policy));
301
+ }
302
+ function sanitizeInlineOutputValue(value, input, policy, issues) {
303
+ if (value === void 0) return void 0;
304
+ const forbidden = [
305
+ ...publicMaterialForbiddenKeys(value, "provider"),
306
+ ...oversizedInlineTextKeys(value, maxPublicSummaryChars(policy))
307
+ ];
308
+ if (forbidden.length === 0) return cloneGraphVisibleMaterial(value);
309
+ for (const entry of forbidden) {
310
+ issues.push(
311
+ dataIssue(
312
+ "tool-provider-adapter-runtime-forbidden-runtime-material",
313
+ "Tool provider adapter runtime output value must not inline runtime-private, raw, or oversized provider material.",
314
+ {
315
+ subjectId: input.requestId,
316
+ refs: [ref("tool-provider-adapter-input", input.adapterInputId)],
317
+ details: { reason: entry.reason }
318
+ }
319
+ )
320
+ );
321
+ }
322
+ return void 0;
323
+ }
324
+ function boundedPublicText(text, field, input, policy, issues) {
325
+ const limit = field === "summary" ? maxPublicSummaryChars(policy) : field === "reason" ? maxPublicReasonChars(policy) : maxPublicMessageChars(policy);
326
+ const bounded = boundPublicText(text, limit);
327
+ if (!bounded.truncated) return bounded.text;
328
+ issues.push(
329
+ dataIssue(
330
+ "tool-provider-adapter-runtime-public-text-truncated",
331
+ "Tool provider adapter runtime public text was truncated; large/raw material must use artifact summary/ref envelopes.",
332
+ {
333
+ subjectId: input.requestId,
334
+ refs: [ref("tool-provider-adapter-input", input.adapterInputId)],
335
+ severity: "warning",
336
+ details: {
337
+ field,
338
+ originalChars: bounded.originalChars,
339
+ limitChars: bounded.limitChars,
340
+ unit: "chars",
341
+ measurementSource: "js-string-length"
342
+ }
343
+ }
344
+ )
345
+ );
346
+ return bounded.text;
347
+ }
348
+ function boundPublicText(text, limitChars) {
349
+ const limit = Math.max(0, limitChars);
350
+ if (text.length <= limit) {
351
+ return { text, truncated: false, originalChars: text.length, limitChars: limit };
352
+ }
353
+ const bounded = limit <= 1 ? text.slice(0, limit) : limit <= 3 ? text.slice(0, limit) : `${text.slice(0, limit - 3)}...`;
354
+ return { text: bounded, truncated: true, originalChars: text.length, limitChars: limit };
355
+ }
356
+ function boundRecordStrings(value, limitChars, seen = /* @__PURE__ */ new WeakSet()) {
357
+ if (seen.has(value)) return {};
358
+ seen.add(value);
359
+ return Object.entries(value).reduce((out, [key, child]) => {
360
+ if (typeof child === "string") {
361
+ out[key] = boundPublicText(child, limitChars).text;
362
+ } else if (Array.isArray(child)) {
363
+ out[key] = child.map(
364
+ (item) => typeof item === "string" ? boundPublicText(item, limitChars).text : isPlainRecord(item) ? boundRecordStrings(item, limitChars, seen) : item
365
+ );
366
+ } else if (isPlainRecord(child)) {
367
+ out[key] = boundRecordStrings(child, limitChars, seen);
368
+ } else {
369
+ out[key] = child;
370
+ }
371
+ return out;
372
+ }, {});
373
+ }
374
+ function boundRecordStringsWithEvidence(value, limitChars, path = [], seen = /* @__PURE__ */ new WeakSet()) {
375
+ if (seen.has(value)) return { value: {}, truncated: [] };
376
+ seen.add(value);
377
+ const truncated = [];
378
+ const out = Object.entries(value).reduce((record, [key, child]) => {
379
+ const childPath = [...path, key];
380
+ if (typeof child === "string") {
381
+ const bounded = boundPublicText(child, limitChars);
382
+ record[key] = bounded.text;
383
+ if (bounded.truncated) {
384
+ truncated.push({
385
+ path: childPath,
386
+ originalChars: bounded.originalChars,
387
+ limitChars: bounded.limitChars
388
+ });
389
+ }
390
+ } else if (Array.isArray(child)) {
391
+ record[key] = child.map((item, index) => {
392
+ const itemPath = [...childPath, index];
393
+ if (typeof item === "string") {
394
+ const bounded = boundPublicText(item, limitChars);
395
+ if (bounded.truncated) {
396
+ truncated.push({
397
+ path: itemPath,
398
+ originalChars: bounded.originalChars,
399
+ limitChars: bounded.limitChars
400
+ });
401
+ }
402
+ return bounded.text;
403
+ }
404
+ if (isPlainRecord(item)) {
405
+ const nested = boundRecordStringsWithEvidence(item, limitChars, itemPath, seen);
406
+ truncated.push(...nested.truncated);
407
+ return nested.value;
408
+ }
409
+ return item;
410
+ });
411
+ } else if (isPlainRecord(child)) {
412
+ const nested = boundRecordStringsWithEvidence(child, limitChars, childPath, seen);
413
+ record[key] = nested.value;
414
+ truncated.push(...nested.truncated);
415
+ } else {
416
+ record[key] = child;
417
+ }
418
+ return record;
419
+ }, {});
420
+ return { value: out, truncated };
421
+ }
422
+ function sanitizeIssueDetails(details, policy) {
423
+ if (details === void 0) return void 0;
424
+ if (publicMaterialForbiddenKeys(details, "provider").length > 0) {
425
+ return { redacted: true, reason: "forbidden-runtime-material" };
426
+ }
427
+ const bounded = boundUnknownStringsWithEvidence(details, maxPublicMetadataStringChars(policy));
428
+ if (bounded.truncated.length === 0) return bounded.value;
429
+ const detailsTruncated = {
430
+ detailsTruncated: true,
431
+ detailsTruncatedPaths: bounded.truncated.map((entry) => entry.path.join(".")),
432
+ measurementSource: "js-string-length"
433
+ };
434
+ if (isPlainRecord(bounded.value)) {
435
+ return Object.freeze({ ...bounded.value, ...detailsTruncated });
436
+ }
437
+ return Object.freeze({ value: bounded.value, ...detailsTruncated });
438
+ }
439
+ function boundUnknownStringsWithEvidence(value, limitChars, path = [], seen = /* @__PURE__ */ new WeakSet()) {
440
+ if (typeof value === "string") {
441
+ const bounded = boundPublicText(value, limitChars);
442
+ return {
443
+ value: bounded.text,
444
+ truncated: bounded.truncated ? [{ path, originalChars: bounded.originalChars, limitChars: bounded.limitChars }] : []
445
+ };
446
+ }
447
+ if (!isRecord(value) && !Array.isArray(value)) return { value, truncated: [] };
448
+ if (typeof value === "object" && value !== null) {
449
+ if (seen.has(value)) return { value: Array.isArray(value) ? [] : {}, truncated: [] };
450
+ seen.add(value);
451
+ }
452
+ const truncated = [];
453
+ if (Array.isArray(value)) {
454
+ const out2 = value.map((item, index) => {
455
+ const bounded = boundUnknownStringsWithEvidence(item, limitChars, [...path, index], seen);
456
+ truncated.push(...bounded.truncated);
457
+ return bounded.value;
458
+ });
459
+ return { value: out2, truncated };
460
+ }
461
+ const out = Object.entries(value).reduce((record, [key, child]) => {
462
+ const bounded = boundUnknownStringsWithEvidence(child, limitChars, [...path, key], seen);
463
+ record[key] = bounded.value;
464
+ truncated.push(...bounded.truncated);
465
+ return record;
466
+ }, {});
467
+ return { value: out, truncated };
468
+ }
469
+ function oversizedInlineTextKeys(value, limitChars, path = [], seen = /* @__PURE__ */ new WeakSet()) {
470
+ if (typeof value === "string") {
471
+ return value.length > Math.max(0, limitChars) ? [{ path, reason: "oversized-inline-text" }] : [];
472
+ }
473
+ if (!isRecord(value) && !Array.isArray(value)) return [];
474
+ if (typeof value === "object" && value !== null) {
475
+ if (seen.has(value)) return [];
476
+ seen.add(value);
477
+ }
478
+ const issues = [];
479
+ if (Array.isArray(value)) {
480
+ value.forEach((item, index) => {
481
+ issues.push(...oversizedInlineTextKeys(item, limitChars, [...path, index], seen));
482
+ });
483
+ return issues;
484
+ }
485
+ for (const [key, child] of Object.entries(value)) {
486
+ issues.push(...oversizedInlineTextKeys(child, limitChars, [...path, key], seen));
487
+ }
488
+ return issues;
489
+ }
490
+ function maxPublicMessageChars(policy) {
491
+ return normalizedPublicTextLimit(policy?.maxMessageChars, 512);
492
+ }
493
+ function maxPublicSummaryChars(policy) {
494
+ return normalizedPublicTextLimit(policy?.maxSummaryChars, 512);
495
+ }
496
+ function maxPublicReasonChars(policy) {
497
+ return normalizedPublicTextLimit(policy?.maxReasonChars, 512);
498
+ }
499
+ function maxPublicMetadataStringChars(policy) {
500
+ return normalizedPublicTextLimit(policy?.maxMetadataStringChars, 256);
501
+ }
502
+ function normalizedPublicTextLimit(value, fallback) {
503
+ if (value === void 0 || !Number.isFinite(value)) return fallback;
504
+ return Math.max(0, Math.floor(value));
505
+ }
506
+ function sanitizeAdapterInputIssue(issue, policy) {
507
+ const boundedMessage = boundPublicText(issue.message, maxPublicMessageChars(policy));
508
+ const details = sanitizeIssueDetails(issue.details, policy);
509
+ const metadata = sanitizeProviderGraphVisibleRecord(issue.metadata, policy);
510
+ const refs = issue.refs === void 0 ? void 0 : Object.freeze(issue.refs.filter((entry) => typeof entry === "string"));
511
+ return Object.freeze({
512
+ kind: issue.kind,
513
+ code: issue.code,
514
+ ...issue.source === void 0 ? {} : { source: issue.source },
515
+ message: boundedMessage.text,
516
+ severity: issue.severity,
517
+ subjectId: issue.subjectId,
518
+ ...issue.correlationId === void 0 ? {} : { correlationId: issue.correlationId },
519
+ ...issue.causationId === void 0 ? {} : { causationId: issue.causationId },
520
+ ...issue.path === void 0 ? {} : { path: Object.freeze([...issue.path]) },
521
+ ...refs === void 0 || refs.length === 0 ? {} : { refs },
522
+ ...issue.retryable === void 0 ? {} : { retryable: issue.retryable },
523
+ details: boundedMessage.truncated || details !== issue.details ? {
524
+ ...isRecord(details) ? details : {},
525
+ ...boundedMessage.truncated ? {
526
+ truncated: true,
527
+ originalChars: boundedMessage.originalChars,
528
+ limitChars: boundedMessage.limitChars,
529
+ measurementSource: "js-string-length"
530
+ } : {}
531
+ } : details,
532
+ ...metadata === void 0 ? {} : { metadata }
533
+ });
534
+ }
535
+ function forbiddenProviderRawMaterialKeys(value, path = [], seen = /* @__PURE__ */ new WeakSet()) {
536
+ if (!isRecord(value) && !Array.isArray(value)) return [];
537
+ if (typeof value === "object" && value !== null) {
538
+ if (seen.has(value)) return [];
539
+ seen.add(value);
540
+ }
541
+ const issues = [];
542
+ if (Array.isArray(value)) {
543
+ value.forEach((item, index) => {
544
+ issues.push(...forbiddenProviderRawMaterialKeys(item, [...path, index], seen));
545
+ });
546
+ return issues;
547
+ }
548
+ for (const [key, child] of Object.entries(value)) {
549
+ const nextPath = [...path, key];
550
+ if (/^(stdout|stderr|stack|stackTrace|stack_trace|providerRaw|provider_raw|rawResponse|raw_response|diff|patch|fileContents|file_contents|binary|media)$/i.test(
551
+ key
552
+ )) {
553
+ issues.push({ path: nextPath, reason: "raw-provider-material" });
554
+ }
555
+ issues.push(...forbiddenProviderRawMaterialKeys(child, nextPath, seen));
556
+ }
557
+ return issues;
558
+ }
559
+ function dataIssue(code, message, opts = {}) {
560
+ return {
561
+ kind: "issue",
562
+ code,
563
+ message,
564
+ severity: opts.severity ?? "error",
565
+ subjectId: opts.subjectId,
566
+ refs: opts.refs?.map((r) => `${r.kind}:${r.id}`),
567
+ details: opts.details
568
+ };
569
+ }
570
+ function ref(kind, id) {
571
+ return { kind, id };
572
+ }
573
+ function isRecord(value) {
574
+ return typeof value === "object" && value !== null && !Array.isArray(value);
575
+ }
576
+ function isPlainRecord(value) {
577
+ if (!isRecord(value)) return false;
578
+ const proto = Object.getPrototypeOf(value);
579
+ return proto === Object.prototype || proto === null;
580
+ }
581
+
582
+ export {
583
+ uniqueSourceRefs,
584
+ stableJsonStringify,
585
+ stableStringHash,
586
+ cloneGraphVisibleMaterial,
587
+ projectRuntimeFact,
588
+ forEachDepBatch,
589
+ forbiddenDataKeys,
590
+ forbiddenGraphVisibleMaterialIssues,
591
+ forbiddenAdapterInputMaterialIssues,
592
+ sanitizeAdapterInputSourceRefs,
593
+ sanitizeGraphVisibleRecord,
594
+ sanitizeProviderGraphVisibleRecord,
595
+ canonicalPublicSourceRefs,
596
+ publicMaterialForbiddenKeys,
597
+ unlockedToolProviderPolicyOverrides,
598
+ sanitizeAgentOutputEnvelope,
599
+ sanitizeAgentNeed,
600
+ sanitizeRuntimeMetadata,
601
+ boundedPublicText,
602
+ boundPublicText,
603
+ maxPublicReasonChars,
604
+ maxPublicMetadataStringChars,
605
+ sanitizeAdapterInputIssue,
606
+ forbiddenProviderRawMaterialKeys,
607
+ dataIssue,
608
+ ref,
609
+ isRecord,
610
+ isPlainRecord
611
+ };
612
+ //# sourceMappingURL=chunk-TQPCAIQI.js.map