@piagent/platform 1.2.16 → 1.3.0-ie.8

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 (993) hide show
  1. package/.gitattributes +1 -0
  2. package/CHANGELOG.md +256 -0
  3. package/README.md +18 -5
  4. package/README.vi.md +19 -0
  5. package/adapters/be-readonly-fe/profile.json +2 -0
  6. package/architecture/layers.json +16 -3
  7. package/benchmarks/capability-v1/alternatives/fullstack-search-contract/apps/web/src/search-view.js +14 -0
  8. package/benchmarks/capability-v1/alternatives/fullstack-search-contract/packages/shared/src/search-contract.js +8 -0
  9. package/benchmarks/capability-v1/alternatives/fullstack-search-contract/services/catalog/src/search.js +18 -0
  10. package/benchmarks/capability-v1/alternatives/resumable-migration-runner/packages/migration/src/plan.js +32 -0
  11. package/benchmarks/capability-v1/alternatives/resumable-migration-runner/packages/migration/src/runner.js +43 -0
  12. package/benchmarks/capability-v1/coverage.json +52 -0
  13. package/benchmarks/capability-v1/grade.mjs +433 -0
  14. package/benchmarks/capability-v1/project/README.md +5 -0
  15. package/benchmarks/capability-v1/project/apps/admin/src/rollout-view.js +3 -0
  16. package/benchmarks/capability-v1/project/apps/web/src/search-view.js +3 -0
  17. package/benchmarks/capability-v1/project/package.json +8 -0
  18. package/benchmarks/capability-v1/project/packages/api/src/feature-access.js +5 -0
  19. package/benchmarks/capability-v1/project/packages/lease/src/store.js +12 -0
  20. package/benchmarks/capability-v1/project/packages/lease/src/with-lease.js +4 -0
  21. package/benchmarks/capability-v1/project/packages/migration/src/plan.js +3 -0
  22. package/benchmarks/capability-v1/project/packages/migration/src/runner.js +4 -0
  23. package/benchmarks/capability-v1/project/packages/policy/src/rollout.js +7 -0
  24. package/benchmarks/capability-v1/project/packages/shared/src/search-contract.js +3 -0
  25. package/benchmarks/capability-v1/project/services/catalog/src/search.js +3 -0
  26. package/benchmarks/capability-v1/project/test/smoke.test.js +4 -0
  27. package/benchmarks/capability-v1/prompts/concurrent-lease-lifecycle.md +22 -0
  28. package/benchmarks/capability-v1/prompts/fullstack-search-contract.md +21 -0
  29. package/benchmarks/capability-v1/prompts/multi-package-rollout.md +24 -0
  30. package/benchmarks/capability-v1/prompts/resumable-migration-runner.md +28 -0
  31. package/benchmarks/capability-v1/references/concurrent-lease-lifecycle/packages/lease/src/store.js +27 -0
  32. package/benchmarks/capability-v1/references/concurrent-lease-lifecycle/packages/lease/src/with-lease.js +9 -0
  33. package/benchmarks/capability-v1/references/fullstack-search-contract/apps/web/src/search-view.js +9 -0
  34. package/benchmarks/capability-v1/references/fullstack-search-contract/packages/shared/src/search-contract.js +3 -0
  35. package/benchmarks/capability-v1/references/fullstack-search-contract/services/catalog/src/search.js +12 -0
  36. package/benchmarks/capability-v1/references/multi-package-rollout/apps/admin/src/rollout-view.js +6 -0
  37. package/benchmarks/capability-v1/references/multi-package-rollout/packages/api/src/feature-access.js +9 -0
  38. package/benchmarks/capability-v1/references/multi-package-rollout/packages/policy/src/rollout.js +29 -0
  39. package/benchmarks/capability-v1/references/resumable-migration-runner/packages/migration/src/plan.js +32 -0
  40. package/benchmarks/capability-v1/references/resumable-migration-runner/packages/migration/src/runner.js +18 -0
  41. package/benchmarks/capability-v1/rubric.json +60 -0
  42. package/benchmarks/capability-v1/suite.json +88 -0
  43. package/benchmarks/capability-v1/variant.mjs +48 -0
  44. package/benchmarks/e2-framework-v1/alternatives/hono-accessible-search/apps/web/src/search-app.js +20 -0
  45. package/benchmarks/e2-framework-v1/alternatives/hono-tenant-api/apps/api/src/tenant-app.js +27 -0
  46. package/benchmarks/e2-framework-v1/alternatives/sqlite-resumable-inventory/packages/migration/src/inventory.js +34 -0
  47. package/benchmarks/e2-framework-v1/alternatives/workspace-policy-rollout/apps/admin/src/summary.js +6 -0
  48. package/benchmarks/e2-framework-v1/alternatives/workspace-policy-rollout/packages/feature-api/src/evaluate.js +14 -0
  49. package/benchmarks/e2-framework-v1/alternatives/workspace-policy-rollout/packages/policy/src/rollout.js +18 -0
  50. package/benchmarks/e2-framework-v1/coverage.json +25 -0
  51. package/benchmarks/e2-framework-v1/grade.mjs +291 -0
  52. package/benchmarks/e2-framework-v1/project/README.md +5 -0
  53. package/benchmarks/e2-framework-v1/project/apps/admin/package.json +1 -0
  54. package/benchmarks/e2-framework-v1/project/apps/admin/src/summary.js +3 -0
  55. package/benchmarks/e2-framework-v1/project/apps/api/package.json +1 -0
  56. package/benchmarks/e2-framework-v1/project/apps/api/src/tenant-app.js +5 -0
  57. package/benchmarks/e2-framework-v1/project/apps/web/package.json +1 -0
  58. package/benchmarks/e2-framework-v1/project/apps/web/src/search-app.js +9 -0
  59. package/benchmarks/e2-framework-v1/project/package.json +9 -0
  60. package/benchmarks/e2-framework-v1/project/packages/feature-api/package.json +1 -0
  61. package/benchmarks/e2-framework-v1/project/packages/feature-api/src/evaluate.js +3 -0
  62. package/benchmarks/e2-framework-v1/project/packages/migration/package.json +1 -0
  63. package/benchmarks/e2-framework-v1/project/packages/migration/src/inventory.js +3 -0
  64. package/benchmarks/e2-framework-v1/project/packages/notifications/package.json +1 -0
  65. package/benchmarks/e2-framework-v1/project/packages/notifications/src/channel.js +3 -0
  66. package/benchmarks/e2-framework-v1/project/packages/policy/package.json +1 -0
  67. package/benchmarks/e2-framework-v1/project/packages/policy/src/rollout.js +7 -0
  68. package/benchmarks/e2-framework-v1/project/packages/shared/package.json +1 -0
  69. package/benchmarks/e2-framework-v1/project/packages/shared/src/identity.js +1 -0
  70. package/benchmarks/e2-framework-v1/project/packages/telemetry/package.json +1 -0
  71. package/benchmarks/e2-framework-v1/project/packages/telemetry/src/counter.js +3 -0
  72. package/benchmarks/e2-framework-v1/project/test/smoke.test.js +16 -0
  73. package/benchmarks/e2-framework-v1/project/vendor/hono/LICENSE +21 -0
  74. package/benchmarks/e2-framework-v1/project/vendor/hono/PIAGENT-PROVENANCE.json +10 -0
  75. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/aws-lambda/conninfo.js +24 -0
  76. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/aws-lambda/handler.js +364 -0
  77. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/aws-lambda/index.js +9 -0
  78. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/aws-lambda/types.js +0 -0
  79. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/bun/conninfo.js +27 -0
  80. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/bun/index.js +16 -0
  81. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/bun/serve-static.js +30 -0
  82. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/bun/server.js +5 -0
  83. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/bun/ssg.js +17 -0
  84. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/bun/websocket.js +73 -0
  85. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-pages/conninfo.js +9 -0
  86. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-pages/handler.js +67 -0
  87. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-pages/index.js +9 -0
  88. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-workers/conninfo.js +9 -0
  89. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-workers/index.js +9 -0
  90. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-workers/serve-static-module.js +8 -0
  91. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-workers/serve-static.js +22 -0
  92. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-workers/utils.js +35 -0
  93. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/cloudflare-workers/websocket.js +41 -0
  94. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/deno/conninfo.js +14 -0
  95. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/deno/deno.d.js +0 -0
  96. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/deno/index.js +12 -0
  97. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/deno/serve-static.js +40 -0
  98. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/deno/ssg.js +18 -0
  99. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/deno/websocket.js +32 -0
  100. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/lambda-edge/conninfo.js +9 -0
  101. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/lambda-edge/handler.js +96 -0
  102. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/lambda-edge/index.js +7 -0
  103. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/netlify/conninfo.js +9 -0
  104. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/netlify/handler.js +9 -0
  105. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/netlify/index.js +2 -0
  106. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/netlify/mod.js +7 -0
  107. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/service-worker/handler.js +20 -0
  108. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/service-worker/index.js +9 -0
  109. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/service-worker/types.js +0 -0
  110. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/vercel/conninfo.js +10 -0
  111. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/vercel/handler.js +7 -0
  112. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/adapter/vercel/index.js +7 -0
  113. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/aws-lambda/conninfo.js +46 -0
  114. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/aws-lambda/handler.js +395 -0
  115. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/aws-lambda/index.js +34 -0
  116. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/aws-lambda/types.js +15 -0
  117. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/bun/conninfo.js +49 -0
  118. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/bun/index.js +45 -0
  119. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/bun/serve-static.js +52 -0
  120. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/bun/server.js +27 -0
  121. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/bun/ssg.js +40 -0
  122. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/bun/websocket.js +98 -0
  123. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-pages/conninfo.js +31 -0
  124. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-pages/handler.js +91 -0
  125. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-pages/index.js +34 -0
  126. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-workers/conninfo.js +31 -0
  127. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-workers/index.js +33 -0
  128. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-workers/serve-static-module.js +30 -0
  129. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-workers/serve-static.js +44 -0
  130. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-workers/utils.js +57 -0
  131. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/cloudflare-workers/websocket.js +63 -0
  132. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/deno/conninfo.js +36 -0
  133. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/deno/deno.d.js +0 -0
  134. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/deno/index.js +38 -0
  135. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/deno/serve-static.js +62 -0
  136. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/deno/ssg.js +41 -0
  137. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/deno/websocket.js +54 -0
  138. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/lambda-edge/conninfo.js +31 -0
  139. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/lambda-edge/handler.js +130 -0
  140. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/lambda-edge/index.js +30 -0
  141. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/netlify/conninfo.js +31 -0
  142. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/netlify/handler.js +31 -0
  143. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/netlify/index.js +21 -0
  144. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/netlify/mod.js +30 -0
  145. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/service-worker/handler.js +42 -0
  146. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/service-worker/index.js +32 -0
  147. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/service-worker/types.js +15 -0
  148. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/vercel/conninfo.js +32 -0
  149. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/vercel/handler.js +29 -0
  150. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/adapter/vercel/index.js +30 -0
  151. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/client/client.js +204 -0
  152. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/client/fetch-result-please.js +85 -0
  153. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/client/index.js +32 -0
  154. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/client/types.js +15 -0
  155. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/client/utils.js +105 -0
  156. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/compose.js +68 -0
  157. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/context.js +450 -0
  158. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/accepts/accepts.js +43 -0
  159. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/accepts/index.js +27 -0
  160. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/adapter/index.js +81 -0
  161. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/conninfo/index.js +15 -0
  162. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/conninfo/types.js +15 -0
  163. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/cookie/index.js +130 -0
  164. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/css/common.js +273 -0
  165. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/css/index.js +157 -0
  166. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/dev/index.js +79 -0
  167. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/factory/index.js +54 -0
  168. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/html/index.js +64 -0
  169. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/proxy/index.js +115 -0
  170. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/route/index.js +71 -0
  171. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/ssg/index.js +43 -0
  172. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/ssg/middleware.js +73 -0
  173. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/ssg/plugins.js +70 -0
  174. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/ssg/ssg.js +320 -0
  175. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/ssg/utils.js +93 -0
  176. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/streaming/index.js +35 -0
  177. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/streaming/sse.js +91 -0
  178. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/streaming/stream.js +56 -0
  179. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/streaming/text.js +34 -0
  180. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/streaming/utils.js +35 -0
  181. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/testing/index.js +33 -0
  182. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/helper/websocket/index.js +81 -0
  183. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/hono-base.js +406 -0
  184. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/hono.js +43 -0
  185. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/http-exception.js +57 -0
  186. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/index.js +30 -0
  187. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/base.js +378 -0
  188. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/children.js +44 -0
  189. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/components.js +221 -0
  190. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/constants.js +42 -0
  191. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/context.js +188 -0
  192. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/client.js +76 -0
  193. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/components.js +55 -0
  194. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/context.js +71 -0
  195. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/css.js +168 -0
  196. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/hooks/index.js +74 -0
  197. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/index.js +181 -0
  198. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/intrinsic-element/components.js +399 -0
  199. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/jsx-dev-runtime.js +52 -0
  200. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/jsx-runtime.js +32 -0
  201. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/render.js +641 -0
  202. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/server.js +67 -0
  203. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/dom/utils.js +32 -0
  204. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/hooks/index.js +373 -0
  205. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/index.js +138 -0
  206. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/intrinsic-element/common.js +50 -0
  207. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/intrinsic-element/components.js +189 -0
  208. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/intrinsic-elements.js +15 -0
  209. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/jsx-dev-runtime.js +41 -0
  210. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/jsx-runtime.js +71 -0
  211. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/streaming.js +179 -0
  212. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/types.js +15 -0
  213. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/jsx/utils.js +200 -0
  214. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/basic-auth/index.js +88 -0
  215. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/bearer-auth/index.js +114 -0
  216. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/body-limit/index.js +75 -0
  217. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/cache/index.js +219 -0
  218. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/combine/index.js +101 -0
  219. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/compress/index.js +97 -0
  220. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/context-storage/index.js +47 -0
  221. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/cors/index.js +106 -0
  222. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/csrf/index.js +77 -0
  223. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/etag/digest.js +55 -0
  224. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/etag/index.js +99 -0
  225. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/ip-restriction/index.js +176 -0
  226. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/jsx-renderer/index.js +82 -0
  227. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/jwk/index.js +27 -0
  228. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/jwk/jwk.js +139 -0
  229. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/jwt/index.js +38 -0
  230. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/jwt/jwt.js +145 -0
  231. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/language/index.js +35 -0
  232. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/language/language.js +203 -0
  233. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/logger/index.js +72 -0
  234. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/method-not-allowed/index.js +90 -0
  235. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/method-override/index.js +106 -0
  236. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/powered-by/index.js +32 -0
  237. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/pretty-json/index.js +37 -0
  238. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/request-id/index.js +27 -0
  239. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/request-id/request-id.js +43 -0
  240. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/secure-headers/index.js +29 -0
  241. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/secure-headers/permissions-policy.js +15 -0
  242. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/secure-headers/secure-headers.js +195 -0
  243. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/serve-static/index.js +99 -0
  244. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/serve-static/path.js +40 -0
  245. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/timeout/index.js +47 -0
  246. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/timing/index.js +35 -0
  247. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/timing/timing.js +130 -0
  248. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/middleware/trailing-slash/index.js +62 -0
  249. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/package.json +3 -0
  250. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/preset/quick.js +38 -0
  251. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/preset/tiny.js +34 -0
  252. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/request/constants.js +27 -0
  253. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/request.js +342 -0
  254. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/linear-router/index.js +27 -0
  255. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/linear-router/router.js +140 -0
  256. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/pattern-router/index.js +27 -0
  257. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/pattern-router/router.js +70 -0
  258. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/reg-exp-router/index.js +34 -0
  259. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/reg-exp-router/matcher.js +48 -0
  260. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/reg-exp-router/node.js +133 -0
  261. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/reg-exp-router/prepared-router.js +166 -0
  262. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/reg-exp-router/router.js +187 -0
  263. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/reg-exp-router/trie.js +89 -0
  264. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/smart-router/index.js +27 -0
  265. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/smart-router/router.js +80 -0
  266. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/trie-router/index.js +27 -0
  267. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/trie-router/node.js +210 -0
  268. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router/trie-router/router.js +48 -0
  269. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/router.js +40 -0
  270. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/types.js +28 -0
  271. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/accept.js +245 -0
  272. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/basic-auth.js +45 -0
  273. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/body.js +111 -0
  274. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/buffer.js +103 -0
  275. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/color.js +48 -0
  276. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/compress.js +27 -0
  277. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/concurrent.js +61 -0
  278. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/constants.js +27 -0
  279. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/cookie.js +199 -0
  280. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/crypto.js +69 -0
  281. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/encode.js +54 -0
  282. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/filepath.js +58 -0
  283. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/handler.js +36 -0
  284. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/headers.js +15 -0
  285. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/html.js +150 -0
  286. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/http-status.js +15 -0
  287. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/ipaddr.js +318 -0
  288. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/jwt/index.js +28 -0
  289. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/jwt/jwa.js +42 -0
  290. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/jwt/jws.js +215 -0
  291. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/jwt/jwt.js +219 -0
  292. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/jwt/types.js +161 -0
  293. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/jwt/utf8.js +30 -0
  294. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/mime.js +106 -0
  295. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/stream.js +106 -0
  296. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/types.js +15 -0
  297. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/utils/url.js +256 -0
  298. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/validator/index.js +27 -0
  299. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/validator/utils.js +15 -0
  300. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/cjs/validator/validator.js +108 -0
  301. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/client/client.js +189 -0
  302. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/client/fetch-result-please.js +62 -0
  303. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/client/index.js +8 -0
  304. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/client/types.js +0 -0
  305. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/client/utils.js +76 -0
  306. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/compose.js +46 -0
  307. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/context.js +427 -0
  308. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/accepts/accepts.js +20 -0
  309. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/accepts/index.js +5 -0
  310. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/adapter/index.js +56 -0
  311. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/conninfo/index.js +0 -0
  312. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/conninfo/types.js +0 -0
  313. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/cookie/index.js +102 -0
  314. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/css/common.js +236 -0
  315. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/css/index.js +140 -0
  316. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/dev/index.js +55 -0
  317. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/factory/index.js +30 -0
  318. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/html/index.js +41 -0
  319. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/proxy/index.js +93 -0
  320. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/route/index.js +46 -0
  321. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/ssg/index.js +19 -0
  322. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/ssg/middleware.js +45 -0
  323. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/ssg/plugins.js +47 -0
  324. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/ssg/ssg.js +297 -0
  325. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/ssg/utils.js +67 -0
  326. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/streaming/index.js +10 -0
  327. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/streaming/sse.js +68 -0
  328. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/streaming/stream.js +34 -0
  329. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/streaming/text.js +12 -0
  330. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/streaming/utils.js +13 -0
  331. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/testing/index.js +11 -0
  332. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/helper/websocket/index.js +57 -0
  333. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/hono-base.js +384 -0
  334. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/hono.js +21 -0
  335. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/http-exception.js +35 -0
  336. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/index.js +7 -0
  337. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/base.js +346 -0
  338. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/children.js +21 -0
  339. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/components.js +198 -0
  340. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/constants.js +15 -0
  341. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/context.js +162 -0
  342. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/client.js +53 -0
  343. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/components.js +32 -0
  344. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/context.js +48 -0
  345. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/css.js +150 -0
  346. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/hooks/index.js +48 -0
  347. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/index.js +142 -0
  348. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/intrinsic-element/components.js +374 -0
  349. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/jsx-dev-runtime.js +19 -0
  350. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/jsx-runtime.js +8 -0
  351. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/render.js +617 -0
  352. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/server.js +33 -0
  353. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/dom/utils.js +10 -0
  354. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/hooks/index.js +331 -0
  355. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/index.js +103 -0
  356. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/intrinsic-element/common.js +24 -0
  357. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/intrinsic-element/components.js +165 -0
  358. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/intrinsic-elements.js +0 -0
  359. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/jsx-dev-runtime.js +18 -0
  360. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/jsx-runtime.js +44 -0
  361. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/streaming.js +155 -0
  362. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/types.js +0 -0
  363. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/jsx/utils.js +175 -0
  364. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/basic-auth/index.js +66 -0
  365. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/bearer-auth/index.js +92 -0
  366. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/body-limit/index.js +53 -0
  367. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/cache/index.js +197 -0
  368. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/combine/index.js +77 -0
  369. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/compress/index.js +74 -0
  370. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/context-storage/index.js +23 -0
  371. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/cors/index.js +84 -0
  372. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/csrf/index.js +55 -0
  373. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/etag/digest.js +33 -0
  374. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/etag/index.js +76 -0
  375. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/ip-restriction/index.js +162 -0
  376. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/jsx-renderer/index.js +58 -0
  377. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/jwk/index.js +5 -0
  378. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/jwk/jwk.js +117 -0
  379. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/jwt/index.js +11 -0
  380. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/jwt/jwt.js +119 -0
  381. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/language/index.js +15 -0
  382. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/language/language.js +172 -0
  383. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/logger/index.js +44 -0
  384. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/method-not-allowed/index.js +68 -0
  385. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/method-override/index.js +84 -0
  386. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/powered-by/index.js +10 -0
  387. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/pretty-json/index.js +15 -0
  388. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/request-id/index.js +5 -0
  389. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/request-id/request-id.js +21 -0
  390. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/secure-headers/index.js +6 -0
  391. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/secure-headers/permissions-policy.js +0 -0
  392. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/secure-headers/secure-headers.js +172 -0
  393. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/serve-static/index.js +77 -0
  394. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/serve-static/path.js +18 -0
  395. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/timeout/index.js +25 -0
  396. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/timing/index.js +9 -0
  397. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/timing/timing.js +104 -0
  398. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/middleware/trailing-slash/index.js +39 -0
  399. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/preset/quick.js +16 -0
  400. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/preset/tiny.js +12 -0
  401. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/request/constants.js +5 -0
  402. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/request.js +319 -0
  403. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/linear-router/index.js +5 -0
  404. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/linear-router/router.js +118 -0
  405. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/pattern-router/index.js +5 -0
  406. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/pattern-router/router.js +48 -0
  407. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/reg-exp-router/index.js +9 -0
  408. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/reg-exp-router/matcher.js +25 -0
  409. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/reg-exp-router/node.js +110 -0
  410. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/reg-exp-router/prepared-router.js +142 -0
  411. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/reg-exp-router/router.js +169 -0
  412. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/reg-exp-router/trie.js +67 -0
  413. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/smart-router/index.js +5 -0
  414. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/smart-router/router.js +58 -0
  415. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/trie-router/index.js +5 -0
  416. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/trie-router/node.js +188 -0
  417. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router/trie-router/router.js +26 -0
  418. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/router.js +14 -0
  419. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/aws-lambda/conninfo.d.ts +27 -0
  420. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/aws-lambda/handler.d.ts +184 -0
  421. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/aws-lambda/index.d.ts +8 -0
  422. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/aws-lambda/types.d.ts +153 -0
  423. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/bun/conninfo.d.ts +7 -0
  424. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/bun/index.d.ts +10 -0
  425. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/bun/serve-static.d.ts +3 -0
  426. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/bun/server.d.ts +12 -0
  427. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/bun/ssg.d.ts +13 -0
  428. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/bun/websocket.d.ts +39 -0
  429. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-pages/conninfo.d.ts +21 -0
  430. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-pages/handler.d.ts +33 -0
  431. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-pages/index.d.ts +7 -0
  432. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-workers/conninfo.d.ts +2 -0
  433. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-workers/index.d.ts +7 -0
  434. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-workers/serve-static-module.d.ts +4 -0
  435. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-workers/serve-static.d.ts +16 -0
  436. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-workers/utils.d.ts +5 -0
  437. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/cloudflare-workers/websocket.d.ts +2 -0
  438. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/deno/conninfo.d.ts +7 -0
  439. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/deno/index.d.ts +8 -0
  440. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/deno/serve-static.d.ts +3 -0
  441. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/deno/ssg.d.ts +13 -0
  442. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/deno/websocket.d.ts +2 -0
  443. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/lambda-edge/conninfo.d.ts +2 -0
  444. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/lambda-edge/handler.d.ts +87 -0
  445. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/lambda-edge/index.d.ts +7 -0
  446. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/netlify/conninfo.d.ts +21 -0
  447. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/netlify/handler.d.ts +2 -0
  448. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/netlify/index.d.ts +5 -0
  449. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/netlify/mod.d.ts +2 -0
  450. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/service-worker/handler.d.ts +16 -0
  451. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/service-worker/index.d.ts +28 -0
  452. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/service-worker/types.d.ts +12 -0
  453. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/vercel/conninfo.d.ts +2 -0
  454. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/vercel/handler.d.ts +2 -0
  455. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/adapter/vercel/index.d.ts +6 -0
  456. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/client/client.d.ts +4 -0
  457. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/client/fetch-result-please.d.ts +35 -0
  458. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/client/index.d.ts +7 -0
  459. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/client/types.d.ts +229 -0
  460. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/client/utils.d.ts +18 -0
  461. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/compose.d.ts +14 -0
  462. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/context.d.ts +455 -0
  463. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/accepts/accepts.d.ts +30 -0
  464. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/accepts/index.d.ts +5 -0
  465. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/adapter/index.d.ts +12 -0
  466. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/conninfo/index.d.ts +5 -0
  467. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/conninfo/types.d.ts +36 -0
  468. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/cookie/index.d.ts +24 -0
  469. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/css/common.d.ts +59 -0
  470. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/css/index.d.ts +80 -0
  471. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/dev/index.d.ts +20 -0
  472. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/factory/index.d.ts +82 -0
  473. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/html/index.d.ts +8 -0
  474. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/proxy/index.d.ts +72 -0
  475. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/route/index.d.ts +75 -0
  476. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/ssg/index.d.ts +7 -0
  477. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/ssg/middleware.d.ts +44 -0
  478. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/ssg/plugins.d.ts +27 -0
  479. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/ssg/ssg.d.ts +91 -0
  480. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/ssg/utils.d.ts +16 -0
  481. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/streaming/index.d.ts +8 -0
  482. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/streaming/sse.d.ts +13 -0
  483. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/streaming/stream.d.ts +3 -0
  484. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/streaming/text.d.ts +3 -0
  485. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/streaming/utils.d.ts +1 -0
  486. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/testing/index.d.ts +12 -0
  487. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/helper/websocket/index.d.ts +69 -0
  488. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/hono-base.d.ts +221 -0
  489. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/hono.d.ts +19 -0
  490. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/http-exception.d.ts +59 -0
  491. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/index.d.ts +37 -0
  492. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/base.d.ts +58 -0
  493. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/children.d.ts +9 -0
  494. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/components.d.ts +15 -0
  495. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/constants.d.ts +6 -0
  496. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/context.d.ts +51 -0
  497. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/client.d.ts +31 -0
  498. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/components.d.ts +10 -0
  499. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/context.d.ts +3 -0
  500. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/css.d.ts +83 -0
  501. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/hooks/index.d.ts +39 -0
  502. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/index.d.ts +88 -0
  503. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +16 -0
  504. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/jsx-dev-runtime.d.ts +8 -0
  505. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/jsx-runtime.d.ts +7 -0
  506. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/render.d.ts +73 -0
  507. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/server.d.ts +106 -0
  508. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/dom/utils.d.ts +1 -0
  509. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/hooks/index.d.ts +47 -0
  510. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/index.d.ts +75 -0
  511. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/intrinsic-element/common.d.ts +6 -0
  512. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/intrinsic-element/components.d.ts +13 -0
  513. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/intrinsic-elements.d.ts +722 -0
  514. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/jsx-dev-runtime.d.ts +8 -0
  515. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/jsx-runtime.d.ts +12 -0
  516. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/streaming.d.ts +36 -0
  517. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/types.d.ts +35 -0
  518. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/jsx/utils.d.ts +4 -0
  519. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/basic-auth/index.d.ts +75 -0
  520. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/bearer-auth/index.d.ts +92 -0
  521. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/body-limit/index.d.ts +45 -0
  522. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/cache/index.d.ts +45 -0
  523. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/combine/index.d.ts +85 -0
  524. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/compress/index.d.ts +40 -0
  525. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/context-storage/index.d.ts +40 -0
  526. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/cors/index.d.ts +55 -0
  527. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/csrf/index.d.ts +78 -0
  528. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/etag/digest.d.ts +1 -0
  529. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/etag/index.d.ts +42 -0
  530. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/ip-restriction/index.d.ts +67 -0
  531. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/jsx-renderer/index.d.ts +77 -0
  532. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/jwk/index.d.ts +1 -0
  533. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/jwk/jwk.d.ts +56 -0
  534. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/jwt/index.d.ts +8 -0
  535. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/jwt/jwt.d.ts +69 -0
  536. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/language/index.d.ts +7 -0
  537. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/language/language.d.ts +120 -0
  538. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/logger/index.d.ts +24 -0
  539. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/method-not-allowed/index.d.ts +49 -0
  540. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/method-override/index.d.ts +48 -0
  541. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/powered-by/index.d.ts +29 -0
  542. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/pretty-json/index.d.ts +42 -0
  543. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/request-id/index.d.ts +7 -0
  544. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/request-id/request-id.d.ts +37 -0
  545. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/secure-headers/index.d.ts +8 -0
  546. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +14 -0
  547. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/secure-headers/secure-headers.d.ts +109 -0
  548. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/serve-static/index.d.ts +31 -0
  549. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/serve-static/path.d.ts +5 -0
  550. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/timeout/index.d.ts +31 -0
  551. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/timing/index.d.ts +7 -0
  552. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/timing/timing.d.ts +129 -0
  553. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/middleware/trailing-slash/index.d.ts +94 -0
  554. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/package.json +3 -0
  555. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/preset/quick.d.ts +10 -0
  556. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/preset/tiny.d.ts +10 -0
  557. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/request/constants.d.ts +1 -0
  558. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/request.d.ts +324 -0
  559. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/linear-router/index.d.ts +5 -0
  560. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/linear-router/router.d.ts +7 -0
  561. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/pattern-router/index.d.ts +5 -0
  562. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/pattern-router/router.d.ts +7 -0
  563. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/reg-exp-router/index.d.ts +6 -0
  564. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/reg-exp-router/matcher.d.ts +7 -0
  565. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/reg-exp-router/node.d.ts +10 -0
  566. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/reg-exp-router/prepared-router.d.ts +17 -0
  567. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/reg-exp-router/router.d.ts +11 -0
  568. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/reg-exp-router/trie.d.ts +8 -0
  569. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/smart-router/index.d.ts +5 -0
  570. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/smart-router/router.d.ts +11 -0
  571. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/trie-router/index.d.ts +5 -0
  572. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/trie-router/node.d.ts +7 -0
  573. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router/trie-router/router.d.ts +8 -0
  574. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/router.d.ts +97 -0
  575. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/types.d.ts +573 -0
  576. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/accept.d.ts +6 -0
  577. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/basic-auth.d.ts +5 -0
  578. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/body.d.ts +79 -0
  579. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/buffer.d.ts +17 -0
  580. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/color.d.ts +21 -0
  581. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/compress.d.ts +8 -0
  582. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/concurrent.d.ts +11 -0
  583. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/constants.d.ts +4 -0
  584. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/cookie.d.ts +40 -0
  585. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/crypto.d.ts +15 -0
  586. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/encode.d.ts +8 -0
  587. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/filepath.d.ts +12 -0
  588. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/handler.d.ts +6 -0
  589. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/headers.d.ts +8 -0
  590. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/html.d.ts +44 -0
  591. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/http-status.d.ts +32 -0
  592. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/ipaddr.d.ts +56 -0
  593. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/jwt/index.d.ts +18 -0
  594. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/jwt/jwa.d.ts +23 -0
  595. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/jwt/jws.d.ts +12 -0
  596. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/jwt/jwt.d.ts +43 -0
  597. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/jwt/types.d.ts +86 -0
  598. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/jwt/utf8.d.ts +6 -0
  599. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/mime.d.ts +70 -0
  600. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/stream.d.ts +31 -0
  601. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/types.d.ts +74 -0
  602. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/utils/url.d.ts +40 -0
  603. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/validator/index.d.ts +7 -0
  604. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/validator/utils.d.ts +29 -0
  605. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types/validator/validator.d.ts +16 -0
  606. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/types.js +6 -0
  607. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/accept.js +223 -0
  608. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/basic-auth.js +23 -0
  609. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/body.js +89 -0
  610. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/buffer.js +78 -0
  611. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/color.js +25 -0
  612. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/compress.js +5 -0
  613. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/concurrent.js +39 -0
  614. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/constants.js +5 -0
  615. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/cookie.js +174 -0
  616. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/crypto.js +44 -0
  617. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/encode.js +29 -0
  618. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/filepath.js +35 -0
  619. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/handler.js +13 -0
  620. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/headers.js +0 -0
  621. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/html.js +123 -0
  622. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/http-status.js +0 -0
  623. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/ipaddr.js +288 -0
  624. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/jwt/index.js +6 -0
  625. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/jwt/jwa.js +20 -0
  626. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/jwt/jws.js +192 -0
  627. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/jwt/jwt.js +207 -0
  628. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/jwt/types.js +124 -0
  629. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/jwt/utf8.js +7 -0
  630. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/mime.js +82 -0
  631. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/stream.js +84 -0
  632. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/types.js +0 -0
  633. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/utils/url.js +221 -0
  634. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/validator/index.js +5 -0
  635. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/validator/utils.js +0 -0
  636. package/benchmarks/e2-framework-v1/project/vendor/hono/dist/validator/validator.js +86 -0
  637. package/benchmarks/e2-framework-v1/project/vendor/hono/package.json +706 -0
  638. package/benchmarks/e2-framework-v1/prompts/hono-accessible-search.md +9 -0
  639. package/benchmarks/e2-framework-v1/prompts/hono-tenant-api.md +9 -0
  640. package/benchmarks/e2-framework-v1/prompts/sqlite-resumable-inventory.md +9 -0
  641. package/benchmarks/e2-framework-v1/prompts/workspace-policy-rollout.md +9 -0
  642. package/benchmarks/e2-framework-v1/references/hono-accessible-search/apps/web/src/search-app.js +29 -0
  643. package/benchmarks/e2-framework-v1/references/hono-tenant-api/apps/api/src/tenant-app.js +22 -0
  644. package/benchmarks/e2-framework-v1/references/sqlite-resumable-inventory/packages/migration/src/inventory.js +34 -0
  645. package/benchmarks/e2-framework-v1/references/workspace-policy-rollout/apps/admin/src/summary.js +6 -0
  646. package/benchmarks/e2-framework-v1/references/workspace-policy-rollout/packages/feature-api/src/evaluate.js +10 -0
  647. package/benchmarks/e2-framework-v1/references/workspace-policy-rollout/packages/policy/src/rollout.js +20 -0
  648. package/benchmarks/e2-framework-v1/reports/alternative-valid-report.v1.json +10 -0
  649. package/benchmarks/e2-framework-v1/reports/grader-sensitivity-report.v1.json +15 -0
  650. package/benchmarks/e2-framework-v1/reports/mutation-report.v1.json +15 -0
  651. package/benchmarks/e2-framework-v1/reports/reference-report.v1.json +9 -0
  652. package/benchmarks/e2-framework-v1/reports/scope-report.v1.json +11 -0
  653. package/benchmarks/e2-framework-v1/rubric.json +33 -0
  654. package/benchmarks/e2-framework-v1/suite.json +88 -0
  655. package/benchmarks/e2-framework-v1/variant.mjs +30 -0
  656. package/benchmarks/failure-v1/classification-corpus.json +51 -0
  657. package/benchmarks/model-routing-v1/route-corpus.json +64 -0
  658. package/benchmarks/production-v1/prompts/tenant-role-authorization.md +3 -3
  659. package/benchmarks/production-v1/suite.json +10 -6
  660. package/benchmarks/solver-v1/route-corpus.json +71 -0
  661. package/catalog/capabilities.json +8 -8
  662. package/docs/README.md +1 -1
  663. package/docs/authority-manifest.md +183 -0
  664. package/docs/command-reference-vietnamese.md +47 -8
  665. package/docs/distribution-standard.md +9 -9
  666. package/docs/en/architecture.md +160 -1
  667. package/docs/en/maintainer-guide.md +35 -2
  668. package/docs/model-options.md +56 -10
  669. package/docs/operator-manual-vietnamese.md +87 -18
  670. package/docs/project-adapters.md +5 -2
  671. package/docs/quality-benchmark.md +294 -46
  672. package/docs/quickstart-vietnamese.md +4 -1
  673. package/docs/release-install-policy.md +75 -9
  674. package/docs/runtime-harness-standard.md +40 -2
  675. package/docs/runtime-policy-design.md +4 -3
  676. package/docs/runtime-quality-baseline.md +4 -3
  677. package/docs/security-threat-model.md +13 -1
  678. package/docs/subagents-and-multiagent.md +23 -0
  679. package/docs/task-lifecycle-vietnamese.md +10 -0
  680. package/docs/team-onboarding.md +15 -7
  681. package/docs/usage-observability.md +36 -1
  682. package/docs/vercel-docs-site.md +7 -5
  683. package/docs/vi/architecture.md +156 -1
  684. package/docs/vi/maintainer-guide.md +35 -2
  685. package/docs-site/architecture.html +49 -6
  686. package/docs-site/assets/docs.css +52 -1
  687. package/docs-site/assets/docs.js +4 -2
  688. package/docs-site/benchmark.html +35 -8
  689. package/docs-site/commands.html +56 -9
  690. package/docs-site/content/architecture.html +36 -0
  691. package/docs-site/content/benchmark.html +22 -2
  692. package/docs-site/content/commands.html +40 -0
  693. package/docs-site/content/en/architecture.html +51 -0
  694. package/docs-site/content/en/benchmark.html +184 -0
  695. package/docs-site/content/en/commands.html +76 -0
  696. package/docs-site/content/en/context-engine.html +30 -0
  697. package/docs-site/content/en/index.html +91 -0
  698. package/docs-site/content/en/mcp-approval.html +74 -0
  699. package/docs-site/content/en/mcp-auth.html +57 -0
  700. package/docs-site/content/en/mcp-servers.html +91 -0
  701. package/docs-site/content/en/mcp.html +90 -0
  702. package/docs-site/content/en/permissions.html +19 -0
  703. package/docs-site/content/en/profiles.html +27 -0
  704. package/docs-site/content/en/quickstart.html +126 -0
  705. package/docs-site/content/en/runtime.html +27 -0
  706. package/docs-site/content/en/scope.html +45 -0
  707. package/docs-site/content/en/security.html +33 -0
  708. package/docs-site/content/en/team.html +14 -0
  709. package/docs-site/content/en/whats-new.html +107 -0
  710. package/docs-site/content/en/workflows.html +81 -0
  711. package/docs-site/content/index.html +6 -0
  712. package/docs-site/content/quickstart.html +1 -1
  713. package/docs-site/content/runtime.html +2 -2
  714. package/docs-site/content/whats-new.html +107 -0
  715. package/docs-site/content/workflows.html +60 -0
  716. package/docs-site/context-engine.html +13 -6
  717. package/docs-site/en/architecture.html +185 -0
  718. package/docs-site/en/benchmark.html +318 -0
  719. package/docs-site/en/commands.html +210 -0
  720. package/docs-site/en/context-engine.html +164 -0
  721. package/docs-site/en/index.html +210 -0
  722. package/docs-site/en/mcp-approval.html +208 -0
  723. package/docs-site/en/mcp-auth.html +191 -0
  724. package/docs-site/en/mcp-servers.html +225 -0
  725. package/docs-site/en/mcp.html +224 -0
  726. package/docs-site/en/permissions.html +153 -0
  727. package/docs-site/en/profiles.html +161 -0
  728. package/docs-site/en/quickstart.html +260 -0
  729. package/docs-site/en/runtime.html +161 -0
  730. package/docs-site/en/scope.html +179 -0
  731. package/docs-site/en/security.html +167 -0
  732. package/docs-site/en/team.html +144 -0
  733. package/docs-site/en/whats-new.html +241 -0
  734. package/docs-site/en/workflows.html +215 -0
  735. package/docs-site/index.html +19 -6
  736. package/docs-site/mcp-approval.html +13 -6
  737. package/docs-site/mcp-auth.html +13 -6
  738. package/docs-site/mcp-servers.html +13 -6
  739. package/docs-site/mcp.html +13 -6
  740. package/docs-site/permissions.html +13 -6
  741. package/docs-site/profiles.html +13 -6
  742. package/docs-site/quickstart.html +16 -9
  743. package/docs-site/runtime.html +15 -8
  744. package/docs-site/scope.html +15 -8
  745. package/docs-site/security.html +13 -6
  746. package/docs-site/team.html +13 -6
  747. package/docs-site/whats-new.html +241 -0
  748. package/docs-site/workflows.html +79 -12
  749. package/evals/fixtures/authority-manifest.invalid.json +5 -0
  750. package/evals/fixtures/authority-manifest.valid.json +380 -0
  751. package/evals/fixtures/benchmark-assurance-evidence.invalid.json +68 -0
  752. package/evals/fixtures/benchmark-assurance-evidence.valid.json +62 -0
  753. package/evals/fixtures/failure-classification.invalid.json +14 -0
  754. package/evals/fixtures/failure-classification.valid.json +13 -0
  755. package/evals/fixtures/failure-evidence.invalid.json +9 -0
  756. package/evals/fixtures/failure-evidence.valid.json +8 -0
  757. package/evals/fixtures/helper-request.invalid.json +1 -0
  758. package/evals/fixtures/helper-request.valid.json +1 -0
  759. package/evals/fixtures/model-route-decision.invalid.json +26 -0
  760. package/evals/fixtures/model-route-decision.valid.json +25 -0
  761. package/evals/fixtures/role-policy.invalid.json +1 -0
  762. package/evals/fixtures/role-policy.valid.json +1 -0
  763. package/evals/fixtures/runtime-model-snapshot.invalid.json +18 -0
  764. package/evals/fixtures/runtime-model-snapshot.valid.json +21 -0
  765. package/evals/fixtures/solver-decision.invalid.json +1 -0
  766. package/evals/fixtures/solver-decision.valid.json +1 -0
  767. package/evals/fixtures/task-authority-snapshot.invalid.json +6 -0
  768. package/evals/fixtures/task-authority-snapshot.valid.json +279 -0
  769. package/evals/fixtures/task-contract.valid.json +1 -0
  770. package/evals/fixtures/task-features.invalid.json +1 -0
  771. package/evals/fixtures/task-features.valid.json +1 -0
  772. package/evals/fixtures/trajectory-state.invalid.json +18 -0
  773. package/evals/fixtures/trajectory-state.valid.json +40 -0
  774. package/evals/fixtures/trajectory-transition-event.invalid.json +20 -0
  775. package/evals/fixtures/trajectory-transition-event.valid.json +19 -0
  776. package/evals/fs-release-transition.v1.json +83 -0
  777. package/evals/fs4-readiness-matrix.v1.json +47 -0
  778. package/evals/fs5-causal-arm.v1.json +74 -0
  779. package/evals/fs5-pilot-protocol.v1.json +162 -0
  780. package/evals/fs5-pilot-protocol.v2.json +184 -0
  781. package/evals/fs5-pilot-protocol.v3.json +107 -0
  782. package/evals/fs5-pilot-protocol.v4.json +129 -0
  783. package/evals/fs5-pilot-protocol.v5.json +134 -0
  784. package/evals/ie6-release-protocol.v1.json +153 -0
  785. package/evals/long-horizon-v1/README.md +30 -0
  786. package/evals/long-horizon-v1/lane.json +19 -0
  787. package/evals/long-horizon-v1/reports/provider-free-30m-run.v1.json +900 -0
  788. package/evals/long-horizon-v1/runner.mjs +355 -0
  789. package/evals/long-horizon-v1/verify.mjs +28 -0
  790. package/evals/long-horizon-v1/worker.mjs +177 -0
  791. package/evals/private-holdout-v1/CUSTODIAN_RUNBOOK.md +79 -0
  792. package/evals/private-holdout-v1/README.md +28 -0
  793. package/evals/private-holdout-v1/access-policy.v1.json +50 -0
  794. package/evals/private-holdout-v1/human-rubric.v1.json +40 -0
  795. package/evals/private-holdout-v1/public-exposure.v1.json +43 -0
  796. package/evals/rc-evaluation-matrix.v1.json +91 -0
  797. package/evals/real-task-taxonomy.v1.json +436 -0
  798. package/package.json +9 -5
  799. package/packages/piagent-core/README.md +8 -2
  800. package/packages/piagent-core/benchmark/benchmark-assurance.js +193 -0
  801. package/packages/piagent-core/benchmark/benchmark-bootstrap.js +526 -0
  802. package/packages/piagent-core/benchmark/benchmark-candidate.js +348 -0
  803. package/packages/piagent-core/benchmark/benchmark-claim-restrictions.js +39 -0
  804. package/packages/piagent-core/benchmark/benchmark-cli.js +229 -0
  805. package/packages/piagent-core/benchmark/benchmark-codex.js +32 -0
  806. package/packages/piagent-core/benchmark/benchmark-comparison.js +93 -0
  807. package/packages/piagent-core/benchmark/benchmark-core.js +336 -349
  808. package/packages/piagent-core/benchmark/benchmark-execution-guard.js +101 -0
  809. package/packages/piagent-core/benchmark/benchmark-forensics.js +473 -0
  810. package/packages/piagent-core/benchmark/benchmark-ledger.js +172 -0
  811. package/packages/piagent-core/benchmark/benchmark-matrix.js +68 -0
  812. package/packages/piagent-core/benchmark/benchmark-phase-attribution.js +101 -0
  813. package/packages/piagent-core/benchmark/benchmark-pi-home.js +626 -0
  814. package/packages/piagent-core/benchmark/benchmark-preflight.js +105 -0
  815. package/packages/piagent-core/benchmark/benchmark-process.js +141 -0
  816. package/packages/piagent-core/benchmark/benchmark-record-validation.js +72 -0
  817. package/packages/piagent-core/benchmark/benchmark-report.js +183 -0
  818. package/packages/piagent-core/benchmark/benchmark-resume-recovery.js +262 -0
  819. package/packages/piagent-core/benchmark/benchmark-run-lock.js +117 -0
  820. package/packages/piagent-core/benchmark/benchmark-runtime-identity.js +122 -0
  821. package/packages/piagent-core/benchmark/benchmark-runtime.js +188 -0
  822. package/packages/piagent-core/benchmark/benchmark-stop-policy.js +36 -0
  823. package/packages/piagent-core/benchmark/benchmark-suite-assets.js +56 -0
  824. package/packages/piagent-core/benchmark/benchmark-suite-runtime.js +115 -0
  825. package/packages/piagent-core/benchmark/benchmark-suite.js +174 -0
  826. package/packages/piagent-core/benchmark/benchmark-tree-identity.js +190 -0
  827. package/packages/piagent-core/benchmark/fs-release-transition.js +103 -0
  828. package/packages/piagent-core/benchmark/fs4-readiness-gates.js +109 -0
  829. package/packages/piagent-core/benchmark/fs5-causal-arm.js +76 -0
  830. package/packages/piagent-core/benchmark/fs5-pilot-protocol.js +252 -0
  831. package/packages/piagent-core/benchmark/ie6-release-protocol.js +206 -0
  832. package/packages/piagent-core/benchmark/model-route-grader.ts +91 -0
  833. package/packages/piagent-core/benchmark/model-routing-protocol.ts +155 -0
  834. package/packages/piagent-core/benchmark/rc-readiness-gates.js +34 -0
  835. package/packages/piagent-core/benchmark/solver-route-grader.ts +141 -0
  836. package/packages/piagent-core/capabilities/authority-manifest.ts +376 -0
  837. package/packages/piagent-core/capabilities/capability-core.js +1 -0
  838. package/packages/piagent-core/capabilities/runtime-integrity.js +81 -0
  839. package/packages/piagent-core/extensions/acceptance-contract-semantics.js +985 -0
  840. package/packages/piagent-core/extensions/acceptance-executable-evidence.js +531 -0
  841. package/packages/piagent-core/extensions/acceptance-language-adapters.js +108 -0
  842. package/packages/piagent-core/extensions/acceptance-receipt.js +936 -0
  843. package/packages/piagent-core/extensions/context-engine.js +13 -16
  844. package/packages/piagent-core/extensions/criterion-context-pack.js +85 -0
  845. package/packages/piagent-core/extensions/criterion-graph.js +257 -0
  846. package/packages/piagent-core/extensions/execution-backend.js +63 -0
  847. package/packages/piagent-core/extensions/failure-types.ts +89 -0
  848. package/packages/piagent-core/extensions/guard-types.ts +102 -0
  849. package/packages/piagent-core/extensions/piagent-guard.ts +761 -4061
  850. package/packages/piagent-core/extensions/policy-core.js +69 -69
  851. package/packages/piagent-core/extensions/repository-memory.js +189 -0
  852. package/packages/piagent-core/extensions/return-contract.js +130 -0
  853. package/packages/piagent-core/extensions/shell-selector-policy.js +55 -0
  854. package/packages/piagent-core/extensions/shell-write-targets.js +114 -0
  855. package/packages/piagent-core/extensions/state-retention.js +41 -8
  856. package/packages/piagent-core/extensions/task-authority-contract.js +16 -0
  857. package/packages/piagent-core/extensions/task-contract-view.js +78 -0
  858. package/packages/piagent-core/extensions/task-digest-contract.js +75 -0
  859. package/packages/piagent-core/extensions/task-digest-migration.js +142 -0
  860. package/packages/piagent-core/extensions/task-digest-state.js +227 -0
  861. package/packages/piagent-core/extensions/task-journal.js +549 -0
  862. package/packages/piagent-core/extensions/task-lifecycle.js +62 -8
  863. package/packages/piagent-core/extensions/task-runtime-audit.js +119 -0
  864. package/packages/piagent-core/extensions/task-state.js +403 -52
  865. package/packages/piagent-core/extensions/tenant-contract.js +78 -0
  866. package/packages/piagent-core/extensions/verification-intelligence.js +312 -0
  867. package/packages/piagent-core/extensions/working-tree-digest.js +84 -0
  868. package/packages/piagent-core/package.json +3 -3
  869. package/packages/piagent-core/policy/authority-manifest.v1.json +380 -0
  870. package/packages/piagent-core/runtime/context/adaptive-planner.ts +172 -0
  871. package/packages/piagent-core/runtime/context/retrieval-route-policy.ts +74 -0
  872. package/packages/piagent-core/runtime/hooks/agent-start-hook.ts +239 -19
  873. package/packages/piagent-core/runtime/hooks/completion-hook.ts +329 -32
  874. package/packages/piagent-core/runtime/hooks/input-hook.ts +24 -3
  875. package/packages/piagent-core/runtime/hooks/session-hooks.ts +6 -0
  876. package/packages/piagent-core/runtime/hooks/session-start-hook.ts +98 -6
  877. package/packages/piagent-core/runtime/hooks/tool-call-hook.ts +93 -0
  878. package/packages/piagent-core/runtime/hooks/tool-result-hook.ts +209 -27
  879. package/packages/piagent-core/runtime/model/authenticated-catalog.ts +127 -0
  880. package/packages/piagent-core/runtime/model/capabilities.ts +64 -0
  881. package/packages/piagent-core/runtime/model/model-route-policy.ts +179 -0
  882. package/packages/piagent-core/runtime/model/model-route-runtime.ts +102 -0
  883. package/packages/piagent-core/runtime/model/model-route-types.ts +148 -0
  884. package/packages/piagent-core/runtime/model/model-selection-provenance.ts +51 -0
  885. package/packages/piagent-core/runtime/model/runtime-snapshot.ts +346 -0
  886. package/packages/piagent-core/runtime/model/snapshot-telemetry.ts +102 -0
  887. package/packages/piagent-core/runtime/orchestration/helper-lifecycle.ts +81 -0
  888. package/packages/piagent-core/runtime/orchestration/owned-work-budget.ts +105 -0
  889. package/packages/piagent-core/runtime/orchestration/role-binder.ts +48 -0
  890. package/packages/piagent-core/runtime/orchestration/role-policy.ts +113 -0
  891. package/packages/piagent-core/runtime/policy/authority-manifest.ts +4 -0
  892. package/packages/piagent-core/runtime/policy/authority-resume-policy.ts +227 -0
  893. package/packages/piagent-core/runtime/policy/task-authority-runtime.ts +115 -0
  894. package/packages/piagent-core/runtime/product/activity-inspector-footer.ts +116 -0
  895. package/packages/piagent-core/runtime/product/activity-inspector.ts +439 -0
  896. package/packages/piagent-core/runtime/product/efficiency-metrics.ts +130 -0
  897. package/packages/piagent-core/runtime/product/operator-projections.ts +111 -0
  898. package/packages/piagent-core/runtime/quality/exact-output-contract.ts +95 -0
  899. package/packages/piagent-core/runtime/quality/model-mutation-proof.ts +185 -0
  900. package/packages/piagent-core/runtime/quality/performance-assurance.ts +493 -0
  901. package/packages/piagent-core/runtime/quality/performance-review-evidence.ts +19 -0
  902. package/packages/piagent-core/runtime/recovery/continuation-budget.ts +191 -0
  903. package/packages/piagent-core/runtime/recovery/handoff-projection.ts +361 -0
  904. package/packages/piagent-core/runtime/recovery/recovery-policy.ts +235 -0
  905. package/packages/piagent-core/runtime/recovery/resume-state.ts +291 -0
  906. package/packages/piagent-core/runtime/recovery/semantic-repair-handshake.ts +447 -0
  907. package/packages/piagent-core/runtime/recovery/semantic-repair-runtime.ts +167 -0
  908. package/packages/piagent-core/runtime/registration/activity-inspector-command.ts +265 -0
  909. package/packages/piagent-core/runtime/registration/context-commands.ts +392 -0
  910. package/packages/piagent-core/runtime/registration/extension-registration.ts +66 -0
  911. package/packages/piagent-core/runtime/registration/knowledge-tools.ts +303 -0
  912. package/packages/piagent-core/runtime/registration/memory-mcp-commands.ts +254 -0
  913. package/packages/piagent-core/runtime/registration/onboarding-tools.ts +308 -0
  914. package/packages/piagent-core/runtime/registration/operator-catalogs.ts +30 -0
  915. package/packages/piagent-core/runtime/registration/permission-commands.ts +178 -0
  916. package/packages/piagent-core/runtime/registration/policy-tools.ts +463 -0
  917. package/packages/piagent-core/runtime/registration/profile-commands.ts +338 -0
  918. package/packages/piagent-core/runtime/registration/runtime-model-status.ts +120 -0
  919. package/packages/piagent-core/runtime/registration/session-commands.ts +341 -0
  920. package/packages/piagent-core/runtime/registration/task-completion-tools.ts +401 -0
  921. package/packages/piagent-core/runtime/registration/task-evidence-tools.ts +291 -0
  922. package/packages/piagent-core/runtime/registration/task-preflight.ts +35 -0
  923. package/packages/piagent-core/runtime/registration/task-start-tool.ts +500 -0
  924. package/packages/piagent-core/runtime/registration/workflow-commands.ts +431 -0
  925. package/packages/piagent-core/runtime/runtime-limits.ts +4 -0
  926. package/packages/piagent-core/runtime/session/model-authorship-state.ts +147 -0
  927. package/packages/piagent-core/runtime/session/performance-review-state.ts +340 -0
  928. package/packages/piagent-core/runtime/session/runtime-state.ts +169 -10
  929. package/packages/piagent-core/runtime/session/system-prompt.ts +57 -0
  930. package/packages/piagent-core/runtime/session/tool-result-compaction.ts +95 -0
  931. package/packages/piagent-core/runtime/solver/runtime-features.ts +52 -0
  932. package/packages/piagent-core/runtime/solver/solver-explanation.ts +50 -0
  933. package/packages/piagent-core/runtime/solver/solver-policy.ts +65 -0
  934. package/packages/piagent-core/runtime/solver/solver-shadow.ts +204 -0
  935. package/packages/piagent-core/runtime/solver/solver-types.ts +141 -0
  936. package/packages/piagent-core/runtime/solver/task-features.ts +119 -0
  937. package/packages/piagent-core/runtime/tools/phase-tool-runtime.ts +133 -0
  938. package/packages/piagent-core/runtime/tools/phase-tools.ts +140 -0
  939. package/packages/piagent-core/runtime/trajectory/trajectory-observability.ts +38 -0
  940. package/packages/piagent-core/runtime/trajectory/trajectory-runtime.ts +235 -0
  941. package/packages/piagent-core/runtime/trajectory/trajectory-state.ts +161 -0
  942. package/packages/piagent-core/runtime/trajectory/trajectory-store.ts +79 -0
  943. package/packages/piagent-core/runtime/trajectory/trajectory-types.ts +196 -0
  944. package/packages/piagent-core/runtime/workflows/task-intake.ts +265 -12
  945. package/packages/piagent-core/subagents/piagent-oracle.md +4 -1
  946. package/packages/piagent-core/subagents/piagent-planner.md +4 -0
  947. package/packages/piagent-core/subagents/piagent-reviewer.md +4 -0
  948. package/packages/piagent-core/subagents/piagent-scout.md +4 -1
  949. package/packages/piagent-core/subagents/piagent-worker.md +5 -0
  950. package/schemas/authority-manifest.schema.json +126 -0
  951. package/schemas/benchmark-assurance-evidence.schema.json +142 -0
  952. package/schemas/failure-classification.schema.json +24 -0
  953. package/schemas/failure-evidence.schema.json +20 -0
  954. package/schemas/helper-request.schema.json +24 -0
  955. package/schemas/model-route-decision.schema.json +44 -0
  956. package/schemas/project-profile.schema.json +3 -0
  957. package/schemas/role-policy.schema.json +30 -0
  958. package/schemas/runtime-model-snapshot.schema.json +57 -0
  959. package/schemas/solver-decision.schema.json +19 -0
  960. package/schemas/task-authority-snapshot.schema.json +86 -0
  961. package/schemas/task-contract.schema.json +429 -2
  962. package/schemas/task-features.schema.json +28 -0
  963. package/schemas/trajectory-state.schema.json +51 -0
  964. package/schemas/trajectory-transition-event.schema.json +43 -0
  965. package/scripts/benchmark-runner-core.mjs +946 -0
  966. package/scripts/benchmark-runner.mjs +55 -1405
  967. package/scripts/benchmark-session.mjs +412 -0
  968. package/scripts/build-docs-site.mjs +238 -53
  969. package/scripts/check-runtime-advisories.mjs +8 -53
  970. package/scripts/configure-model-scope.sh +3 -3
  971. package/scripts/evaluate-fs-release-transition.mjs +27 -0
  972. package/scripts/fs4-readiness-evaluation.mjs +137 -0
  973. package/scripts/helper-evaluation.mjs +96 -0
  974. package/scripts/ie6-release-freeze.mjs +194 -0
  975. package/scripts/install-global.sh +1 -1
  976. package/scripts/model-catalog.mjs +132 -0
  977. package/scripts/model-route-evaluation-core.ts +81 -0
  978. package/scripts/model-route-evaluation.mjs +22 -0
  979. package/scripts/model-routing-benchmark.mjs +29 -0
  980. package/scripts/model-routing-protocol-core.ts +64 -0
  981. package/scripts/phase-tools-evaluation.mjs +222 -0
  982. package/scripts/pi-model-catalog.sh +2 -161
  983. package/scripts/pi-model-route.mjs +115 -0
  984. package/scripts/piagent-cli.mjs +1 -0
  985. package/scripts/private-holdout-readiness.mjs +96 -0
  986. package/scripts/product-usability-pilot.mjs +111 -0
  987. package/scripts/rc-readiness-evaluation.mjs +240 -0
  988. package/scripts/recovery-evaluation.mjs +132 -0
  989. package/scripts/solver-shadow-pilot.mjs +164 -0
  990. package/scripts/team-doctor.sh +65 -3
  991. package/scripts/verify-local.sh +55 -4
  992. package/scripts/verify-release-identity.mjs +25 -7
  993. package/templates/global/settings.json +3 -3
@@ -0,0 +1,936 @@
1
+ import crypto from "node:crypto";
2
+ import path from "node:path";
3
+ import { changedFileAcceptanceCorpus, emptyAcceptanceCorpus, isAcceptanceTestPath } from "./acceptance-language-adapters.js";
4
+ import { matchesAnyPath, normalizePathCandidate } from "./policy-core.js";
5
+ import { baselineReturnRepresentationConflicts, returnRepresentationGuidance } from "./return-contract.js";
6
+ import { hasLengthPrefixedIdentityKey, tenantAssertionSignals } from "./tenant-contract.js";
7
+ import { latestObservedVerificationEvidence, meaningfulVerificationCommands, verificationEvidenceProvesStableTree } from "./verification-intelligence.js";
8
+ import {
9
+ acceptanceContractProofGuidance,
10
+ acceptanceContractSemanticConflicts,
11
+ acceptanceInvalidInputEvidence
12
+ } from "./acceptance-contract-semantics.js";
13
+ import { isCurrentWorkingTreeDigest, WORKING_TREE_DIGEST_ALGORITHM } from "./working-tree-digest.js";
14
+
15
+ export const ACCEPTANCE_RECEIPT_SCHEMA_VERSION = 1;
16
+ export const ACCEPTANCE_STATUSES = new Set(["pending", "satisfied", "blocked"]);
17
+ export const ACCEPTANCE_PRIORITIES = new Set(["normal", "critical"]);
18
+
19
+ const CRITICAL_OBLIGATIONS = new Set([
20
+ "authorization-deny-case",
21
+ "tenant-boundary",
22
+ "tenant-storage-isolation",
23
+ "invalid-input-rejection",
24
+ "boundary-case",
25
+ "read-only-evidence"
26
+ ]);
27
+
28
+ const MAX_CRITERIA = 12;
29
+ const MAX_EVIDENCE_PER_CRITERION = 8;
30
+ const RECEIPT_FIELDS = new Set(["schemaVersion", "source", "promptHash", "generatedAt", "criteria", "provenance", "helperUsage"]);
31
+ const CRITERION_FIELDS = new Set(["id", "hash", "obligation", "priority", "status", "evidence", "updatedAt"]);
32
+ const EVIDENCE_FIELDS = new Set(["kind", "summary", "paths", "command", "exitCode", "workingTreeDigest", "recordedAt"]);
33
+ const PROVENANCE_FIELDS = new Set(["assurance", "disposition", "repairCount", "retryCount", "finalRecoveryDisposition", "failureRef", "recoveryRef", "handoffRef", "recordedAt"]);
34
+ const FAILURE_REF_FIELDS = new Set(["evidenceDigest", "category", "captureRef"]);
35
+ const RECOVERY_REF_FIELDS = new Set(["policyVersion", "action", "reasonCodes"]);
36
+ const HELPER_USAGE_FIELDS = new Set(["mode", "used", "reasonCodes", "helpers", "recordedAt"]);
37
+ const HELPER_ENTRY_FIELDS = new Set(["role", "disposition", "requestRef", "outputDigest", "calls", "tokens"]);
38
+ const HELPER_ROLES = new Set(["retriever", "scout", "planner", "worker", "reviewer", "oracle", "researcher"]);
39
+ const RECEIPT_DISPOSITIONS = new Set(["first-pass-success", "repaired-success", "blocked", "partial", "failed", "pending"]);
40
+ const FINAL_RECOVERY_DISPOSITIONS = new Set(["not-needed", "succeeded", "blocked", "partial", "failed", "pending"]);
41
+ const RECOVERY_ACTIONS = new Set(["repair", "retry", "fresh-session", "ask-operator", "handoff", "blocked"]);
42
+ const FAILURE_CATEGORIES = new Set(["passed", "compile-typecheck", "test-assertion", "lint-format", "dependency-config", "environment", "provider-network", "permission-policy", "scope-protected-path", "flaky-infrastructure", "unknown"]);
43
+ const HASH = /^[a-f0-9]{64}$/;
44
+ const SAFE_REF = /^[a-z0-9.][a-z0-9:._/-]{0,511}$/i;
45
+ const READ_ONLY_BOUNDARY = /\b(?:read-only|no edits?|do not edit(?: files?| source| project| repo)?|do not change (?:files?|source|project|repo)|do not mutate (?:files?|source|project|repo|workspace)|khong sua(?: file| source| project)?|khong edit(?: file| source| project)?|khong doi(?: file| source| project)?)\b/;
46
+
47
+ function sha256(value) {
48
+ return crypto.createHash("sha256").update(String(value ?? "")).digest("hex");
49
+ }
50
+
51
+ function compactId(value, fallback = "criterion") {
52
+ return String(value ?? fallback)
53
+ .trim()
54
+ .toLowerCase()
55
+ .replace(/[^a-z0-9_.:-]+/g, "-")
56
+ .replace(/^-+|-+$/g, "")
57
+ .slice(0, 80) || fallback;
58
+ }
59
+
60
+ function uniqueStrings(values) {
61
+ return [...new Set((Array.isArray(values) ? values : []).filter((item) => typeof item === "string" && item.trim()).map((item) => item.trim()))];
62
+ }
63
+
64
+ function isRecord(value) {
65
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
66
+ }
67
+
68
+ function hasUnsupportedField(value, allowed) {
69
+ return isRecord(value) && Object.keys(value).some((key) => !allowed.has(key));
70
+ }
71
+
72
+ function validTimestamp(value) {
73
+ return typeof value === "string" && Number.isFinite(Date.parse(value));
74
+ }
75
+
76
+ function normalizedText(value) {
77
+ return String(value ?? "")
78
+ .normalize("NFD")
79
+ .replace(/[\u0300-\u036f]/g, "")
80
+ .toLowerCase();
81
+ }
82
+
83
+ function includesAny(text, patterns) {
84
+ return patterns.some((pattern) => pattern.test(text));
85
+ }
86
+
87
+ function pathBoundaryMentioned(text, patterns) {
88
+ const value = normalizedText(text);
89
+ return uniqueStrings(patterns).some((pattern) => {
90
+ const normalized = normalizePathCandidate(pattern).replace(/\/?\*\*.*$/, "").replace(/\*+/g, "").replace(/\/+$/, "");
91
+ if (!normalized) return false;
92
+ const lower = normalized.toLowerCase();
93
+ const basename = lower.split("/").filter(Boolean).at(-1);
94
+ return value.includes(lower) || (Boolean(basename) && value.includes(basename));
95
+ });
96
+ }
97
+
98
+ function changedFilesRespectBoundaries(changedFiles, boundaryPatterns) {
99
+ const patterns = uniqueStrings(boundaryPatterns);
100
+ if (patterns.length === 0) return true;
101
+ return uniqueStrings(changedFiles).every((file) => !matchesAnyPath(file, patterns));
102
+ }
103
+
104
+ export function inferAcceptanceObligations(text, changeMode = "source-change") {
105
+ const value = normalizedText(text);
106
+ const obligations = [];
107
+ if (changeMode === "read-only" || READ_ONLY_BOUNDARY.test(value)) {
108
+ obligations.push("read-only-evidence");
109
+ }
110
+ const explicitAuthorization = includesAny(value, [
111
+ /\bauth(?:orization)?\b/, /\bunauthoriz(?:ed|ation)\b/, /\bpermission\b/, /\brole\b/, /\badmin\b/, /\bdeny\b/, /\bdenied\b/
112
+ ]);
113
+ const ownerAccessControl = /\bowner\b/.test(value) && includesAny(value, [
114
+ /\busers?\b/, /\bresources?\b/, /\baccess\b/, /\bmanag(?:e|es|ed|ing)\b/, /\bauth(?:orization)?\b/, /\bpermission\b/, /\broles?\b/
115
+ ]);
116
+ if (explicitAuthorization || ownerAccessControl) {
117
+ obligations.push("authorization-deny-case");
118
+ }
119
+ if (includesAny(value, [/\btenant\b/, /\bcross-tenant\b/, /\bsame tenant\b/, /\btenantid\b/])) {
120
+ if (includesAny(value, [/\bcache\b/, /\bcache[- ]?key\b/, /\bstorage\b/, /\bcollision\b/, /\bentity\b/, /\bsame tuple\b/])) {
121
+ obligations.push("tenant-storage-isolation");
122
+ } else {
123
+ obligations.push("tenant-boundary");
124
+ }
125
+ }
126
+ const explicitInvalidInput = includesAny(value, [/\binvalid\b/, /\btypeerror\b/, /\bthrow\b/, /\bnon-negative\b/, /\bpositive integer\b/, /\binteger\b/]);
127
+ const rejectInvalidInput = /\breject(?:s|ed|ion)?\b/.test(value)
128
+ && !/\breject(?:s|ed|ion)?\s+(?:no\s+)?valid\b/.test(value)
129
+ && includesAny(value, [/\binvalid\b/, /\bbad\b/, /\bmalformed\b/, /\bnegative\b/, /\bnull\b/, /\bundefined\b/, /\bnon[- ]?(?:number|numeric)\b/, /\bout[- ]?of[- ]?range\b/]);
130
+ if (explicitInvalidInput || rejectInvalidInput) {
131
+ obligations.push("invalid-input-rejection");
132
+ }
133
+ if (includesAny(value, [/\bboundary\b/, /\bceil(?:ing)?\b/, /\bclamp\b/, /\bmin(?:imum)?\b/, /\bmax(?:imum)?\b/, /\binclusive\b/, /\bzero\b/, /\b0\b/, /\bexpiry\b/, /\bround(?:ing)?\b/, /\bedge\b/, /\bfalsey\b/, /\bfalsy\b/, /\bnullish\b/, /\bdefault(?:s)?\b/, /\bpreserv(?:e|ed|es|ing)\b/])) {
134
+ obligations.push("boundary-case");
135
+ }
136
+ if (includesAny(value, [/\bmutation\b/, /\bunchanged\b/, /\bwithout changing\b/, /\bbackward\b/, /\bapi\b/, /\bexported api\b/, /\bfocused\b/])) {
137
+ obligations.push("backward-compatibility");
138
+ }
139
+ if (changeMode === "source-change") obligations.push("verification-evidence");
140
+ return [...new Set(obligations)];
141
+ }
142
+
143
+ function generatedCriterionForObligation(obligation) {
144
+ switch (obligation) {
145
+ case "authorization-deny-case":
146
+ return "Focused tests prove every requested allow path and the unauthorized, inactive, missing-input, and wrong-permission denial paths.";
147
+ case "tenant-boundary":
148
+ return "Focused tests prove same-identity allow, cross-identity deny, and empty or missing isolation identity denial without assuming a particular function or field name.";
149
+ case "tenant-storage-isolation":
150
+ return "Focused tests prove tenant-scoped storage round trips the same identity tuple, keeps distinct identity components isolated, and prevents delimiter-like values from colliding when composite keys are required.";
151
+ case "invalid-input-rejection":
152
+ return "Focused executable tests prove every named entrypoint rejects each stated invalid input partition, including every constrained argument and the requested error class.";
153
+ case "boundary-case":
154
+ return "Focused executable tests cover every stated equivalence class, including applicable undefined, null, false, zero, empty-string, minimum, maximum, inclusive, rounding, ceiling, and clamp boundaries.";
155
+ case "backward-compatibility":
156
+ return "Existing API and unrelated behavior remain compatible outside the requested change.";
157
+ case "read-only-evidence":
158
+ return "The task stays read-only and the answer is grounded in observed in-scope evidence.";
159
+ case "verification-evidence":
160
+ return "The configured verifier passes against the final working tree.";
161
+ default:
162
+ return "The requested behavior is satisfied by current source and verification evidence.";
163
+ }
164
+ }
165
+
166
+ const GENERATED_ACCEPTANCE_TEXTS = new Set([
167
+ "authorization-deny-case", "tenant-boundary", "tenant-storage-isolation", "invalid-input-rejection", "boundary-case",
168
+ "backward-compatibility", "read-only-evidence", "verification-evidence"
169
+ ].map((obligation) => generatedCriterionForObligation(obligation)));
170
+
171
+ function acceptanceTaskText(task) {
172
+ return [
173
+ task?.summary,
174
+ task?.expectedOutput,
175
+ ...(Array.isArray(task?.acceptanceCriteria)
176
+ ? task.acceptanceCriteria.filter((criterion) => !GENERATED_ACCEPTANCE_TEXTS.has(criterion))
177
+ : [])
178
+ ].filter(Boolean).join("\n");
179
+ }
180
+
181
+ function acceptanceCriterionText(task, criterion) {
182
+ const matched = (Array.isArray(task?.acceptanceCriteria) ? task.acceptanceCriteria : [])
183
+ .find((text) => typeof text === "string" && sha256(text) === criterion?.hash);
184
+ return matched && !GENERATED_ACCEPTANCE_TEXTS.has(matched)
185
+ ? matched
186
+ : acceptanceTaskText(task);
187
+ }
188
+
189
+ /**
190
+ * Produce bounded, task-derived proof guidance without a second model call.
191
+ * These hints remain generic: they describe semantic partitions from the
192
+ * operator request and never reference benchmark scenario identities.
193
+ */
194
+ export function acceptanceProofGuidance(taskOrText) {
195
+ const raw = typeof taskOrText === "string" ? taskOrText : acceptanceTaskText(taskOrText);
196
+ return acceptanceContractProofGuidance(raw);
197
+ }
198
+
199
+ function semanticConflictReasons(obligation, task, corpus, criterion) {
200
+ const taskText = acceptanceCriterionText(task, criterion);
201
+ return acceptanceContractSemanticConflicts(obligation, taskText, corpus.sourceText);
202
+ }
203
+
204
+ /**
205
+ * Surface a concrete existing return contract before implementation starts.
206
+ * This is intentionally source-derived and bounded to exact in-scope files;
207
+ * it does not guess from benchmark scenario names or hidden expectations.
208
+ */
209
+ export function acceptanceBaselineGuidance(task, options = {}) {
210
+ if (!options.cwd) return [];
211
+ const files = uniqueStrings([
212
+ ...(Array.isArray(task?.scope) ? task.scope : []),
213
+ ...(Array.isArray(task?.changedFiles) ? task.changedFiles : []),
214
+ ...(Array.isArray(task?.observedChangedFiles) ? task.observedChangedFiles : [])
215
+ ]).filter((file) => !/[?*\[\]{}]/.test(file) && !isAcceptanceTestPath(file));
216
+ return returnRepresentationGuidance(acceptanceTaskText(task), options.cwd, files);
217
+ }
218
+
219
+ export function acceptanceSemanticConflicts(task, options = {}) {
220
+ const changedFiles = uniqueStrings(options.changedFiles ?? task?.changedFiles ?? task?.observedChangedFiles ?? []);
221
+ const corpus = options.cwd
222
+ ? changedFileAcceptanceCorpus(options.cwd, changedFiles)
223
+ : { ...emptyAcceptanceCorpus(changedFiles.length > 0 ? changedFiles : ["inline.js"]), sourceText: normalizedText(options.sourceText), allText: normalizedText(options.sourceText) };
224
+ if (!corpus.adapter.proofCapable) return [];
225
+ const obligations = task?.acceptanceReceipt?.criteria?.map((criterion) => criterion.obligation)
226
+ ?? inferAcceptanceObligations(acceptanceTaskText(task), task?.changeMode);
227
+ return uniqueStrings([
228
+ ...obligations.flatMap((obligation) => semanticConflictReasons(obligation, task, corpus)),
229
+ ...(options.cwd ? baselineReturnRepresentationConflicts(acceptanceTaskText(task), options.cwd, corpus.sourceFiles) : [])
230
+ ]);
231
+ }
232
+
233
+ function criterionId(text, obligation, index) {
234
+ const prefix = compactId(obligation ?? "criterion").slice(0, 24);
235
+ return `ac-${String(index + 1).padStart(2, "0")}-${prefix}-${sha256(text).slice(0, 8)}`.slice(0, 80);
236
+ }
237
+
238
+ export function buildAcceptanceReceipt(input = {}) {
239
+ const changeMode = input.changeMode === "read-only" ? "read-only" : "source-change";
240
+ const baseText = [
241
+ input.summary,
242
+ input.expectedOutput,
243
+ ...(Array.isArray(input.acceptanceCriteria) ? input.acceptanceCriteria : [])
244
+ ].filter(Boolean).join("\n");
245
+ const obligations = inferAcceptanceObligations(baseText, changeMode);
246
+ const texts = uniqueStrings(Array.isArray(input.acceptanceCriteria) ? input.acceptanceCriteria : []);
247
+ const generatedObligations = new Map();
248
+ for (const obligation of obligations) {
249
+ const generated = generatedCriterionForObligation(obligation);
250
+ if (!texts.some((text) => inferAcceptanceObligations(text, changeMode).includes(obligation))) {
251
+ texts.push(generated);
252
+ generatedObligations.set(generated, obligation);
253
+ }
254
+ }
255
+ if (texts.length === 0) {
256
+ texts.push(changeMode === "read-only"
257
+ ? generatedCriterionForObligation("read-only-evidence")
258
+ : generatedCriterionForObligation("verification-evidence"));
259
+ }
260
+ const acceptanceCriteria = texts.slice(0, MAX_CRITERIA);
261
+ const criteria = acceptanceCriteria.map((text, index) => {
262
+ const inferred = inferAcceptanceObligations(text, changeMode);
263
+ const obligation = generatedObligations.get(text)
264
+ ?? inferred.find((item) => item !== "verification-evidence" && item !== "backward-compatibility")
265
+ ?? inferred[0]
266
+ ?? "requested-behavior";
267
+ return {
268
+ id: criterionId(text, obligation, index),
269
+ hash: sha256(text),
270
+ obligation,
271
+ priority: CRITICAL_OBLIGATIONS.has(obligation) ? "critical" : "normal",
272
+ status: "pending",
273
+ evidence: []
274
+ };
275
+ });
276
+ return {
277
+ acceptanceCriteria,
278
+ receipt: {
279
+ schemaVersion: ACCEPTANCE_RECEIPT_SCHEMA_VERSION,
280
+ source: input.source === "runtime" ? "runtime" : "model",
281
+ promptHash: sha256(baseText),
282
+ generatedAt: input.generatedAt ?? new Date().toISOString(),
283
+ criteria
284
+ }
285
+ };
286
+ }
287
+
288
+ export function normalizeAcceptanceReceipt(value) {
289
+ if (!value || typeof value !== "object" || Array.isArray(value)) return undefined;
290
+ const criteria = Array.isArray(value.criteria) ? value.criteria.slice(0, MAX_CRITERIA).map((criterion, index) => {
291
+ if (!criterion || typeof criterion !== "object" || Array.isArray(criterion)) return undefined;
292
+ const id = typeof criterion.id === "string" && criterion.id.trim()
293
+ ? compactId(criterion.id)
294
+ : `ac-${String(index + 1).padStart(2, "0")}-${sha256(criterion.hash ?? index).slice(0, 8)}`;
295
+ const hash = typeof criterion.hash === "string" && /^[a-f0-9]{64}$/.test(criterion.hash)
296
+ ? criterion.hash
297
+ : sha256(id);
298
+ const obligation = typeof criterion.obligation === "string" && criterion.obligation.trim()
299
+ ? compactId(criterion.obligation)
300
+ : "requested-behavior";
301
+ const priority = ACCEPTANCE_PRIORITIES.has(criterion.priority) ? criterion.priority : CRITICAL_OBLIGATIONS.has(obligation) ? "critical" : "normal";
302
+ const status = ACCEPTANCE_STATUSES.has(criterion.status) ? criterion.status : "pending";
303
+ const evidence = Array.isArray(criterion.evidence)
304
+ ? criterion.evidence.slice(-MAX_EVIDENCE_PER_CRITERION).map((item) => normalizeAcceptanceEvidence(item)).filter(Boolean)
305
+ : [];
306
+ return {
307
+ id,
308
+ hash,
309
+ obligation,
310
+ priority,
311
+ status,
312
+ evidence,
313
+ updatedAt: typeof criterion.updatedAt === "string" && Number.isFinite(Date.parse(criterion.updatedAt)) ? criterion.updatedAt : undefined
314
+ };
315
+ }).filter(Boolean) : [];
316
+ if (criteria.length === 0) return undefined;
317
+ return {
318
+ schemaVersion: ACCEPTANCE_RECEIPT_SCHEMA_VERSION,
319
+ source: value.source === "runtime" ? "runtime" : "model",
320
+ promptHash: typeof value.promptHash === "string" && /^[a-f0-9]{64}$/.test(value.promptHash) ? value.promptHash : undefined,
321
+ generatedAt: typeof value.generatedAt === "string" && Number.isFinite(Date.parse(value.generatedAt)) ? value.generatedAt : undefined,
322
+ provenance: normalizeAcceptanceProvenance(value.provenance),
323
+ helperUsage: normalizeHelperUsage(value.helperUsage),
324
+ criteria
325
+ };
326
+ }
327
+
328
+ function normalizeHelperUsage(value) {
329
+ if (!isRecord(value) || !["off", "recommend", "on"].includes(value.mode)) return undefined;
330
+ const helpers = Array.isArray(value.helpers) ? value.helpers.slice(0, 3).filter(isRecord).map((item) => ({
331
+ role: HELPER_ROLES.has(item.role) ? item.role : "scout",
332
+ disposition: compactId(item.disposition ?? "unknown"),
333
+ requestRef: HASH.test(String(item.requestRef)) ? item.requestRef : sha256(item.requestRef),
334
+ outputDigest: item.outputDigest === null || HASH.test(String(item.outputDigest)) ? item.outputDigest : null,
335
+ calls: Number.isInteger(item.calls) ? Math.max(0, Math.min(100, item.calls)) : 0,
336
+ tokens: Number.isInteger(item.tokens) ? Math.max(0, Math.min(100_000_000, item.tokens)) : 0
337
+ })) : [];
338
+ return { mode: value.mode, used: helpers.some((item) => !["solo", "recommend", "unavailable", "blocked"].includes(item.disposition)), reasonCodes: uniqueStrings(value.reasonCodes).map(compactId).slice(0, 16), helpers, recordedAt: validTimestamp(value.recordedAt) ? value.recordedAt : new Date().toISOString() };
339
+ }
340
+
341
+ export function applyAcceptanceHelperUsage(task, input = {}) {
342
+ const receipt = normalizeAcceptanceReceipt(task?.acceptanceReceipt); if (!receipt) return task;
343
+ const helperUsage = normalizeHelperUsage({ mode: input.mode ?? "off", reasonCodes: input.reasonCodes ?? [], helpers: input.helpers ?? [], recordedAt: input.recordedAt ?? new Date().toISOString() });
344
+ return { ...task, acceptanceReceipt: { ...receipt, criteria: structuredClone(task.acceptanceReceipt.criteria), helperUsage } };
345
+ }
346
+
347
+ function normalizeAcceptanceProvenance(value) {
348
+ if (!isRecord(value)) return undefined;
349
+ const failureRef = isRecord(value.failureRef) && HASH.test(String(value.failureRef.evidenceDigest)) && FAILURE_CATEGORIES.has(value.failureRef.category)
350
+ ? {
351
+ evidenceDigest: value.failureRef.evidenceDigest,
352
+ category: value.failureRef.category,
353
+ captureRef: typeof value.failureRef.captureRef === "string" && SAFE_REF.test(value.failureRef.captureRef) ? value.failureRef.captureRef : null
354
+ }
355
+ : null;
356
+ const recoveryRef = isRecord(value.recoveryRef) && value.recoveryRef.policyVersion === "recovery-v1" && RECOVERY_ACTIONS.has(value.recoveryRef.action)
357
+ ? {
358
+ policyVersion: "recovery-v1",
359
+ action: value.recoveryRef.action,
360
+ reasonCodes: uniqueStrings(value.recoveryRef.reasonCodes).map((item) => compactId(item)).slice(0, 16)
361
+ }
362
+ : null;
363
+ if (value.assurance !== "runtime-observed" || !RECEIPT_DISPOSITIONS.has(value.disposition)) return undefined;
364
+ return {
365
+ assurance: "runtime-observed",
366
+ disposition: value.disposition,
367
+ repairCount: Number.isInteger(value.repairCount) ? Math.max(0, Math.min(10, value.repairCount)) : 0,
368
+ retryCount: Number.isInteger(value.retryCount) ? Math.max(0, Math.min(10, value.retryCount)) : 0,
369
+ finalRecoveryDisposition: FINAL_RECOVERY_DISPOSITIONS.has(value.finalRecoveryDisposition) ? value.finalRecoveryDisposition : "pending",
370
+ failureRef,
371
+ recoveryRef,
372
+ handoffRef: typeof value.handoffRef === "string" && SAFE_REF.test(value.handoffRef) && !path.isAbsolute(value.handoffRef) && !value.handoffRef.split(/[\\/]/).includes("..") ? value.handoffRef : null,
373
+ recordedAt: validTimestamp(value.recordedAt) ? value.recordedAt : new Date().toISOString()
374
+ };
375
+ }
376
+
377
+ function recoveryDisposition(taskOutcome, gateDecision, repairCount, retryCount) {
378
+ if (taskOutcome === "completed" && gateDecision === "pass") {
379
+ return repairCount + retryCount > 0 ? "repaired-success" : "first-pass-success";
380
+ }
381
+ if (taskOutcome === "blocked" || (taskOutcome === "completed" && gateDecision === "fail")) return "blocked";
382
+ if (taskOutcome === "partial") return "partial";
383
+ if (taskOutcome === "failed") return "failed";
384
+ return "pending";
385
+ }
386
+
387
+ /** Add bounded operational provenance without changing any acceptance criterion or status. */
388
+ export function applyAcceptanceRecoveryProvenance(task, input = {}) {
389
+ const receipt = normalizeAcceptanceReceipt(task?.acceptanceReceipt);
390
+ if (!receipt) return task;
391
+ const unchangedCriteria = Array.isArray(task?.acceptanceReceipt?.criteria)
392
+ ? structuredClone(task.acceptanceReceipt.criteria)
393
+ : receipt.criteria;
394
+ const history = Array.isArray(input.recoveryHistory) ? input.recoveryHistory.filter((entry) => isRecord(entry)) : [];
395
+ const counted = history.filter((entry) => ["scheduled", "failed", "succeeded"].includes(entry.disposition));
396
+ const historyRepairCount = counted.filter((entry) => entry.action === "repair").length;
397
+ const retryCount = Math.min(10, counted.filter((entry) => entry.action === "retry").length);
398
+ const trajectoryRepairs = Array.isArray(input.trajectoryTransitions)
399
+ ? new Set(input.trajectoryTransitions.filter((entry) => (
400
+ isRecord(entry)
401
+ && entry.to === "repair"
402
+ && ["verification-failed", "recovery-requested"].includes(entry.cause)
403
+ && typeof entry.eventId === "string"
404
+ )).map((entry) => entry.eventId)).size
405
+ : 0;
406
+ const semanticSupplied = Object.prototype.hasOwnProperty.call(input, "semanticRepair");
407
+ const semantic = isRecord(input.semanticRepair) ? input.semanticRepair : undefined;
408
+ const semanticValid = semantic?.enforcementSafe === true
409
+ && Number.isInteger(semantic.repairCount) && semantic.repairCount >= 0 && semantic.repairCount <= 10
410
+ && Number.isInteger(semantic.retryCount) && semantic.retryCount >= 0 && semantic.retryCount <= 10
411
+ && typeof semantic.passed === "boolean";
412
+ const semanticCanComplete = semanticValid && (semantic.repairCount + semantic.retryCount === 0 || semantic.passed === true);
413
+ const repairCount = Math.min(10, Math.max(historyRepairCount, trajectoryRepairs, semanticValid ? semantic.repairCount : 0));
414
+ const effectiveRetryCount = Math.min(10, Math.max(retryCount, semanticValid ? semantic.retryCount : 0));
415
+ const latestHistory = counted.at(-1);
416
+ const classification = isRecord(input.failureClassification) ? input.failureClassification : undefined;
417
+ const decision = isRecord(input.recoveryDecision) ? input.recoveryDecision : undefined;
418
+ const evidenceDigest = classification?.evidenceDigest ?? latestHistory?.evidenceDigest;
419
+ const category = classification?.category ?? latestHistory?.failureCategory;
420
+ const failureRef = HASH.test(String(evidenceDigest)) && FAILURE_CATEGORIES.has(category)
421
+ ? {
422
+ evidenceDigest,
423
+ category,
424
+ captureRef: typeof classification?.outputRef?.captureRef === "string" && SAFE_REF.test(classification.outputRef.captureRef)
425
+ ? classification.outputRef.captureRef
426
+ : null
427
+ }
428
+ : null;
429
+ const recoveryAction = decision?.action ?? latestHistory?.action ?? (trajectoryRepairs > 0 || (semanticValid && semantic.repairCount > 0) ? "repair" : undefined);
430
+ const recoveryRef = RECOVERY_ACTIONS.has(recoveryAction)
431
+ ? {
432
+ policyVersion: "recovery-v1",
433
+ action: recoveryAction,
434
+ reasonCodes: uniqueStrings(decision?.reasonCodes ?? (trajectoryRepairs > 0
435
+ ? ["durable-trajectory-repair"]
436
+ : semanticValid && semantic.repairCount > 0 ? ["validated-semantic-repair-origin"] : [])).map((item) => compactId(item)).slice(0, 16)
437
+ }
438
+ : null;
439
+ const requestedOutcome = ["completed", "blocked", "partial", "failed"].includes(input.outcome) ? input.outcome : task.trace?.outcome ?? "pending";
440
+ const taskOutcome = semanticSupplied && !semanticCanComplete && requestedOutcome === "completed" ? "blocked" : requestedOutcome;
441
+ const disposition = recoveryDisposition(taskOutcome, input.gateDecision === "fail" ? "fail" : "pass", repairCount, effectiveRetryCount);
442
+ const finalRecoveryDisposition = disposition === "first-pass-success" ? "not-needed"
443
+ : disposition === "repaired-success" ? "succeeded"
444
+ : disposition;
445
+ const handoffRef = typeof input.handoffRef === "string" && SAFE_REF.test(input.handoffRef) && !path.isAbsolute(input.handoffRef) && !input.handoffRef.split(/[\\/]/).includes("..")
446
+ ? input.handoffRef
447
+ : null;
448
+ return {
449
+ ...task,
450
+ acceptanceReceipt: {
451
+ ...receipt,
452
+ criteria: unchangedCriteria,
453
+ provenance: {
454
+ assurance: "runtime-observed",
455
+ disposition,
456
+ repairCount,
457
+ retryCount: effectiveRetryCount,
458
+ finalRecoveryDisposition,
459
+ failureRef,
460
+ recoveryRef,
461
+ handoffRef,
462
+ recordedAt: input.recordedAt ?? new Date().toISOString()
463
+ }
464
+ }
465
+ };
466
+ }
467
+
468
+ /**
469
+ * A successful project mutation makes every source-change criterion from the
470
+ * previous tree unproven. Verification history stays on the Task Contract;
471
+ * criterion truth fails closed until rebuilt against the new tree.
472
+ */
473
+ export function invalidateAcceptanceReceiptAfterMutation(task, recordedAt = new Date().toISOString()) {
474
+ if (task?.changeMode !== "source-change") return { task, changed: false };
475
+ const receipt = normalizeAcceptanceReceipt(task?.acceptanceReceipt);
476
+ if (!receipt) return { task, changed: false };
477
+ let changed = false;
478
+ for (const criterion of receipt.criteria) {
479
+ if (criterion.status !== "pending" || criterion.evidence.length > 0) {
480
+ criterion.status = "pending";
481
+ criterion.evidence = [];
482
+ criterion.updatedAt = recordedAt;
483
+ changed = true;
484
+ }
485
+ }
486
+ return { task: { ...task, acceptanceReceipt: receipt }, changed };
487
+ }
488
+
489
+ function normalizeAcceptanceEvidence(value) {
490
+ if (!value || typeof value !== "object" || Array.isArray(value)) return undefined;
491
+ const kind = typeof value.kind === "string" && value.kind.trim() ? compactId(value.kind) : "evidence";
492
+ const summary = typeof value.summary === "string" && value.summary.trim() ? value.summary.trim().slice(0, 240) : kind;
493
+ return {
494
+ kind,
495
+ summary,
496
+ paths: uniqueStrings(value.paths).slice(0, 12),
497
+ command: typeof value.command === "string" && value.command.trim() ? value.command.trim().slice(0, 300) : undefined,
498
+ exitCode: Number.isInteger(value.exitCode) ? value.exitCode : undefined,
499
+ workingTreeDigest: isCurrentWorkingTreeDigest(value.workingTreeDigest) ? value.workingTreeDigest : undefined,
500
+ recordedAt: typeof value.recordedAt === "string" && Number.isFinite(Date.parse(value.recordedAt)) ? value.recordedAt : undefined
501
+ };
502
+ }
503
+
504
+ function evidenceKey(evidence) {
505
+ return JSON.stringify({
506
+ kind: evidence.kind,
507
+ summary: evidence.summary,
508
+ paths: evidence.paths ?? [],
509
+ command: evidence.command,
510
+ exitCode: evidence.exitCode,
511
+ workingTreeDigest: evidence.workingTreeDigest
512
+ });
513
+ }
514
+
515
+ function addEvidence(criterion, evidence, recordedAt) {
516
+ const normalized = normalizeAcceptanceEvidence({ ...evidence, recordedAt });
517
+ if (!normalized) return false;
518
+ const seen = new Set((criterion.evidence ?? []).map(evidenceKey));
519
+ if (seen.has(evidenceKey(normalized))) return false;
520
+ criterion.evidence = [...(criterion.evidence ?? []), normalized].slice(-MAX_EVIDENCE_PER_CRITERION);
521
+ criterion.status = "satisfied";
522
+ criterion.updatedAt = recordedAt;
523
+ return true;
524
+ }
525
+
526
+ function escapeRegex(value) {
527
+ return String(value ?? "").replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
528
+ }
529
+
530
+ function declaredCallableNames(sourceText) {
531
+ const names = new Set();
532
+ const ignored = new Set(["catch", "for", "if", "switch", "while", "with"]);
533
+ for (const match of String(sourceText ?? "").matchAll(/\bfunction\s+([A-Za-z_$][A-Za-z0-9_$]*)\s*\(/g)) names.add(match[1].toLowerCase());
534
+ for (const match of String(sourceText ?? "").matchAll(/^\s*(?:async\s+)?([A-Za-z_$][A-Za-z0-9_$]*)\s*\([^)]*\)\s*\{/gm)) {
535
+ if (!ignored.has(match[1].toLowerCase())) names.add(match[1].toLowerCase());
536
+ }
537
+ for (const match of String(sourceText ?? "").matchAll(/\b(?:const|let|var)\s+([A-Za-z_$][A-Za-z0-9_$]*)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[A-Za-z_$][A-Za-z0-9_$]*)\s*=>/g)) names.add(match[1].toLowerCase());
538
+ return names;
539
+ }
540
+
541
+ function contractCallableTargets(task, criterion, sourceText = "") {
542
+ const ignored = new Set(["api", "boolean", "date", "error", "false", "null", "string", "true", "typeerror", "undefined"]);
543
+ const explicit = [];
544
+ const text = acceptanceCriterionText(task, criterion);
545
+ let previousEnd = 0;
546
+ let roleGroup = false;
547
+ for (const match of text.matchAll(/`([A-Za-z_$][A-Za-z0-9_$]*)\s*\([^`]*\)`/g)) {
548
+ if (!ignored.has(match[1].toLowerCase())) {
549
+ const clauseStart = Math.max(text.lastIndexOf(".", match.index - 1), text.lastIndexOf("!", match.index - 1), text.lastIndexOf("?", match.index - 1), text.lastIndexOf(";", match.index - 1)) + 1;
550
+ const localPrefix = text.slice(explicit.length === 0 ? clauseStart : previousEnd, match.index);
551
+ const directRole = /\b(?:adapter|callback|callable)(?:\s+(?:function|method))?\s*$/i.test(localPrefix);
552
+ const groupedRole = roleGroup && /^\s*,?\s*(?:(?:and|or)\s+)?(?:an?\s+)?(?:callable\s+)?$/i.test(localPrefix);
553
+ roleGroup = directRole || groupedRole;
554
+ explicit.push({ name: match[1], roleReference: roleGroup });
555
+ previousEnd = match.index + match[0].length;
556
+ }
557
+ }
558
+ if (explicit.length === 0) return [];
559
+ const declared = declaredCallableNames(sourceText);
560
+ const candidates = explicit.filter(({ roleReference }) => !roleReference);
561
+ const primary = candidates[0] ?? explicit[0];
562
+ const productEntrypoints = candidates.slice(1).filter(({ name }) => declared.has(name.toLowerCase()));
563
+ return uniqueStrings([primary.name, ...productEntrypoints.map(({ name }) => name)]).slice(0, 8);
564
+ }
565
+
566
+ function namedCodeTargets(task, criterion, sourceText = "") {
567
+ const text = acceptanceCriterionText(task, criterion);
568
+ const ignored = new Set([
569
+ "api", "boolean", "date", "error", "false", "null", "string", "true", "typeerror", "undefined"
570
+ ]);
571
+ const targets = contractCallableTargets(task, criterion, sourceText);
572
+ const callables = declaredCallableNames(sourceText);
573
+ for (const sentence of text.split(/(?<=[.!?])\s+/)) {
574
+ if (!/\b(?:validat(?:e|es|ed|ion)|invalid|reject(?:s|ed|ion)?|throw(?:s|ing)?|malformed)\b/i.test(sentence)) continue;
575
+ for (const match of sentence.matchAll(/`([A-Za-z_$][A-Za-z0-9_$]*)`/g)) {
576
+ if (callables.has(match[1].toLowerCase()) && !ignored.has(match[1].toLowerCase())) targets.push(match[1]);
577
+ }
578
+ }
579
+ return uniqueStrings(targets).slice(0, 8);
580
+ }
581
+
582
+ function explicitlyCallableTargets(task, criterion, sourceText = "") {
583
+ return contractCallableTargets(task, criterion, sourceText);
584
+ }
585
+
586
+ function booleanAssertionSignals(testText) {
587
+ const text = String(testText ?? "");
588
+ let allow = 0;
589
+ let deny = 0;
590
+ for (const match of text.matchAll(/assert\.(?:equal|strictequal|deepequal)\s*\(([\s\S]{0,1200}?),\s*(true|false)\s*\)/g)) {
591
+ if (match[2] === "true") allow += 1;
592
+ else deny += 1;
593
+ }
594
+ for (const match of text.matchAll(/expect\s*\([\s\S]{0,1200}?\)\s*\.to(?:be|equal)\s*\(\s*(true|false)\s*\)/g)) {
595
+ if (match[1] === "true") allow += 1;
596
+ else deny += 1;
597
+ }
598
+ return {
599
+ allow,
600
+ deny,
601
+ missing: /(?:\bnull\b|\bundefined\b|\{\s*\}|["']\s*["'])/.test(text)
602
+ };
603
+ }
604
+
605
+ function hasStructuredCompositeIdentity(sourceText) {
606
+ const text = String(sourceText ?? "");
607
+ const jsonTuple = /json\.stringify\s*\(\s*\[[^\]\n]{1,800},[^\]\n]{1,800}\]\s*\)/.test(text);
608
+ const nestedLookup = /\.(?:get|set|has|delete)\s*\([^)]*\)[\s\S]{0,800}\.(?:get|set|has|delete)\s*\(/.test(text);
609
+ return jsonTuple || nestedLookup || hasLengthPrefixedIdentityKey(text);
610
+ }
611
+
612
+ function focusedContractEvidence(obligation, task, corpus, verifierEvidence, criterion) {
613
+ if (!verifierEvidence || corpus.sourceFiles.length === 0 || corpus.testFiles.length === 0) return undefined;
614
+ const targets = namedCodeTargets(task, criterion, corpus.sourceText);
615
+ const targetCoverage = targets.length === 0 || targets.every((target) => (
616
+ new RegExp(`\\b${escapeRegex(target.toLowerCase())}\\b`).test(corpus.testText)
617
+ ));
618
+ if (!targetCoverage) return undefined;
619
+
620
+ const assertionSignals = booleanAssertionSignals(corpus.testText);
621
+ const tenantSignals = tenantAssertionSignals(corpus.testText);
622
+ let focused = false;
623
+ let summary = "Configured verifier and focused contract tests pass against the final working tree.";
624
+ if (obligation === "authorization-deny-case") {
625
+ focused = assertionSignals.allow >= 1 && assertionSignals.deny >= 2 && assertionSignals.missing;
626
+ summary = "Verifier-backed tests exercise requested allow and multiple deny partitions, including missing input.";
627
+ } else if (obligation === "tenant-boundary") {
628
+ focused = (tenantSignals.same || assertionSignals.allow >= 1)
629
+ && (tenantSignals.cross || assertionSignals.deny >= 1)
630
+ && (tenantSignals.missing || assertionSignals.missing);
631
+ summary = "Verifier-backed tests exercise same-, cross-, and missing-identity boundary partitions.";
632
+ } else if (obligation === "tenant-storage-isolation") {
633
+ const roundTrip = /\.(?:set|put|write|add)\s*\(/.test(corpus.testText)
634
+ && /\.(?:get|read|find|lookup)\s*\(/.test(corpus.testText)
635
+ && /(?:assert\.|expect\s*\()/.test(corpus.testText);
636
+ const distinctWrites = (corpus.testText.match(/\.(?:set|put|write|add)\s*\(/g)?.length ?? 0) >= 2;
637
+ focused = roundTrip && distinctWrites && hasStructuredCompositeIdentity(corpus.sourceText);
638
+ summary = "Verifier-backed round-trip tests exercise distinct composite identities using an unambiguous storage boundary.";
639
+ }
640
+ if (!focused) return undefined;
641
+ return {
642
+ ...verifierEvidence,
643
+ kind: "verifier-backed-focused-test",
644
+ summary,
645
+ paths: [...new Set([...corpus.sourceFiles, ...corpus.testFiles])]
646
+ };
647
+ }
648
+
649
+ function hasCurrentPassingVerifier(task, currentWorkingTreeDigest) {
650
+ if (task?.workingTreeDigestAlgorithm !== WORKING_TREE_DIGEST_ALGORITHM
651
+ || !isCurrentWorkingTreeDigest(currentWorkingTreeDigest)) return false;
652
+ const planned = meaningfulVerificationCommands(task?.verifyCommands ?? []);
653
+ const latest = latestObservedVerificationEvidence(task?.verifyEvidence);
654
+ return planned.length > 0 && planned.every((command) => {
655
+ const evidence = latest.get(command.trim());
656
+ return verificationEvidenceProvesStableTree(evidence, currentWorkingTreeDigest);
657
+ });
658
+ }
659
+
660
+ function evidenceForObligation(obligation, task, corpus, currentWorkingTreeDigest, criterion) {
661
+ const passingVerifier = hasCurrentPassingVerifier(task, currentWorkingTreeDigest);
662
+ const latestVerifyEvidence = latestObservedVerificationEvidence(task?.verifyEvidence);
663
+ const verifyEvidence = meaningfulVerificationCommands(task?.verifyCommands ?? [])
664
+ .map((command) => latestVerifyEvidence.get(command.trim()))
665
+ .filter((evidence) => verificationEvidenceProvesStableTree(evidence, currentWorkingTreeDigest));
666
+ const verifier = verifyEvidence[0];
667
+ const verifierEvidence = verifier ? {
668
+ kind: "verify-command",
669
+ summary: "Configured verifier passed against the final working tree.",
670
+ command: verifier.command,
671
+ exitCode: verifier.exitCode,
672
+ workingTreeDigest: currentWorkingTreeDigest
673
+ } : undefined;
674
+ if (semanticConflictReasons(obligation, task, corpus, criterion).length > 0) return undefined;
675
+
676
+ if (obligation === "read-only-evidence") {
677
+ const readOnlyOk = task.changeMode === "read-only"
678
+ && corpus.files.length === 0
679
+ && Array.isArray(task.contextManifest)
680
+ && task.contextManifest.length > 0;
681
+ if (readOnlyOk) return {
682
+ kind: "read-only-context",
683
+ summary: "Read-only context was observed and no project files changed.",
684
+ paths: task.contextManifest.map((item) => item.path).slice(0, 8)
685
+ };
686
+ if (task.changeMode === "source-change") {
687
+ const boundaryPatterns = uniqueStrings([...(task.outOfScope ?? []), ...(task.protectedPaths ?? [])]);
688
+ const taskText = [
689
+ task.summary,
690
+ task.expectedOutput,
691
+ ...(Array.isArray(task.acceptanceCriteria) ? task.acceptanceCriteria : [])
692
+ ].filter(Boolean).join("\n");
693
+ const combinedText = `${taskText}\n${corpus.allText}`;
694
+ const sourceChangeReadOnlyOk = corpus.files.length > 0
695
+ && READ_ONLY_BOUNDARY.test(normalizedText(combinedText))
696
+ && changedFilesRespectBoundaries(corpus.files, boundaryPatterns)
697
+ && (boundaryPatterns.length === 0 || pathBoundaryMentioned(combinedText, boundaryPatterns))
698
+ && Array.isArray(task.contextManifest)
699
+ && task.contextManifest.length > 0;
700
+ if (sourceChangeReadOnlyOk) {
701
+ return {
702
+ kind: "source-change-read-only-boundary",
703
+ summary: "Changed files document the read-only boundary and no boundary paths changed.",
704
+ paths: corpus.files.slice(0, 8),
705
+ workingTreeDigest: currentWorkingTreeDigest
706
+ };
707
+ }
708
+ }
709
+ return undefined;
710
+ }
711
+
712
+ if (obligation === "verification-evidence" || obligation === "requested-behavior" || obligation === "backward-compatibility") {
713
+ if (!passingVerifier) return undefined;
714
+ return verifierEvidence;
715
+ }
716
+
717
+ if (!corpus.adapter.proofCapable) return undefined;
718
+
719
+ if (obligation === "tenant-boundary") {
720
+ return focusedContractEvidence(obligation, task, corpus, verifierEvidence, criterion);
721
+ }
722
+
723
+ if (obligation === "tenant-storage-isolation") {
724
+ return focusedContractEvidence(obligation, task, corpus, verifierEvidence, criterion);
725
+ }
726
+
727
+ if (obligation === "authorization-deny-case") {
728
+ return focusedContractEvidence(obligation, task, corpus, verifierEvidence, criterion);
729
+ }
730
+
731
+ if (obligation === "invalid-input-rejection") {
732
+ const { sourceOk, testOk } = acceptanceInvalidInputEvidence({
733
+ taskText: acceptanceCriterionText(task, criterion),
734
+ sourceText: corpus.sourceText,
735
+ testText: corpus.testText,
736
+ sourceEntries: corpus.sourceEntries,
737
+ testEntries: corpus.testEntries,
738
+ namedTargets: namedCodeTargets(task, criterion, corpus.sourceText),
739
+ provenanceTargets: explicitlyCallableTargets(task, criterion, corpus.sourceText)
740
+ });
741
+ if (passingVerifier && corpus.sourceFiles.length > 0 && corpus.testFiles.length > 0 && sourceOk && testOk) {
742
+ return {
743
+ ...verifierEvidence,
744
+ kind: "verifier-backed-focused-test",
745
+ summary: "Configured verifier passed with focused invalid-input tests for named entrypoints.",
746
+ paths: [...new Set([...corpus.sourceFiles, ...corpus.testFiles])]
747
+ };
748
+ }
749
+ return undefined;
750
+ }
751
+
752
+ if (obligation === "boundary-case") {
753
+ const expirySourceOk = /\b(?:expiresat|expiry|expires|expired|timestamp|now)\b/.test(corpus.sourceText)
754
+ && /(?:===|!==|>=|<=|>|<)/.test(corpus.sourceText);
755
+ const testOk = /boundary|edge|zero|ceil|clamp|min|max|inclusive|exact|equal|equality|expired|expiry|past|future|partial|round|falsey|falsy|nullish|default|retrylimit|label|\bfalse\b|\b0\b/.test(corpus.testText);
756
+ const sourceOk = /math\.ceil|ceil|clamp|min|max|round|zero|return\s+0|\?\?|nullish|falsey|falsy|default|retrylimit|enabled|label/.test(corpus.sourceText)
757
+ || expirySourceOk
758
+ || (passingVerifier && corpus.sourceFiles.length > 0 && testOk);
759
+ if (passingVerifier && corpus.sourceFiles.length > 0 && corpus.testFiles.length > 0 && sourceOk && testOk) {
760
+ return {
761
+ ...verifierEvidence,
762
+ kind: "verifier-backed-focused-test",
763
+ summary: "Configured verifier passed with focused boundary-contract tests.",
764
+ paths: [...new Set([...corpus.sourceFiles, ...corpus.testFiles])]
765
+ };
766
+ }
767
+ return undefined;
768
+ }
769
+
770
+ return passingVerifier ? verifierEvidence : undefined;
771
+ }
772
+
773
+ export function refreshAcceptanceReceipt(task, options = {}) {
774
+ const receipt = normalizeAcceptanceReceipt(task?.acceptanceReceipt);
775
+ if (!receipt) return { task, missing: [], criticalMissing: [], changed: false };
776
+ const cwd = options.cwd;
777
+ const changedFiles = uniqueStrings(options.changedFiles ?? task.changedFiles ?? task.observedChangedFiles ?? []);
778
+ const currentWorkingTreeDigest = options.currentWorkingTreeDigest;
779
+ const recordedAt = options.recordedAt ?? new Date().toISOString();
780
+ const corpus = cwd ? changedFileAcceptanceCorpus(cwd, changedFiles) : emptyAcceptanceCorpus(changedFiles);
781
+ let changed = false;
782
+ for (const criterion of receipt.criteria) {
783
+ if (task?.changeMode === "source-change" && cwd) {
784
+ const previousStatus = criterion.status;
785
+ const previousEvidence = (criterion.evidence ?? []).map(evidenceKey);
786
+ criterion.status = "pending";
787
+ criterion.evidence = [];
788
+ const evidence = task?.workingTreeDigestAlgorithm === WORKING_TREE_DIGEST_ALGORITHM
789
+ && isCurrentWorkingTreeDigest(currentWorkingTreeDigest)
790
+ ? evidenceForObligation(criterion.obligation, task, corpus, currentWorkingTreeDigest, criterion)
791
+ : undefined;
792
+ if (evidence) addEvidence(criterion, evidence, recordedAt);
793
+ const nextEvidence = (criterion.evidence ?? []).map(evidenceKey);
794
+ if (previousStatus !== criterion.status || JSON.stringify(previousEvidence) !== JSON.stringify(nextEvidence)) changed = true;
795
+ continue;
796
+ }
797
+ if (criterion.status === "satisfied") continue;
798
+ const evidence = evidenceForObligation(criterion.obligation, task, corpus, currentWorkingTreeDigest, criterion);
799
+ if (evidence) changed = addEvidence(criterion, evidence, recordedAt) || changed;
800
+ }
801
+ const missing = receipt.criteria.filter((criterion) => criterion.status !== "satisfied");
802
+ const criticalMissing = missing.filter((criterion) => criterion.priority === "critical");
803
+ return {
804
+ task: { ...task, acceptanceReceipt: receipt },
805
+ receipt,
806
+ missing,
807
+ criticalMissing,
808
+ changed
809
+ };
810
+ }
811
+
812
+ /**
813
+ * Project only current, task-derived recovery guidance for critical criteria.
814
+ * Hash binding prevents stale receipt text from being presented as operator
815
+ * intent; unavailable source/test/current-tree evidence yields no projection.
816
+ */
817
+ export function acceptanceCriticalRecoveryProjection(task, options = {}) {
818
+ const cwd = typeof options.cwd === "string" && options.cwd ? options.cwd : undefined;
819
+ const currentWorkingTreeDigest = options.currentWorkingTreeDigest;
820
+ const changedFiles = uniqueStrings(options.changedFiles ?? task?.changedFiles ?? task?.observedChangedFiles ?? []);
821
+ const receipt = normalizeAcceptanceReceipt(task?.acceptanceReceipt);
822
+ if (!cwd || !receipt || task?.workingTreeDigestAlgorithm !== WORKING_TREE_DIGEST_ALGORITHM
823
+ || !isCurrentWorkingTreeDigest(currentWorkingTreeDigest) || changedFiles.length === 0) return [];
824
+ const corpus = changedFileAcceptanceCorpus(cwd, changedFiles);
825
+ if (!corpus.adapter.proofCapable) return [];
826
+ if (corpus.sourceEntries.length === 0 && corpus.testEntries.length === 0) return [];
827
+ const verifierCurrent = hasCurrentPassingVerifier(task, currentWorkingTreeDigest);
828
+ const projections = [];
829
+ for (const criterion of receipt.criteria.filter((item) => item.priority === "critical")) {
830
+ const criterionText = (Array.isArray(task?.acceptanceCriteria) ? task.acceptanceCriteria : [])
831
+ .find((text) => typeof text === "string" && sha256(text) === criterion.hash && !GENERATED_ACCEPTANCE_TEXTS.has(text));
832
+ if (!criterionText || evidenceForObligation(criterion.obligation, task, corpus, currentWorkingTreeDigest, criterion)) continue;
833
+ const targets = namedCodeTargets(task, criterion, corpus.sourceText);
834
+ const missingDimensions = [];
835
+ if (!verifierCurrent) missingDimensions.push("current-verifier");
836
+ if (criterion.obligation === "invalid-input-rejection") {
837
+ if (corpus.sourceFiles.length === 0 || corpus.testFiles.length === 0) continue;
838
+ const proof = acceptanceInvalidInputEvidence({
839
+ taskText: criterionText, sourceText: corpus.sourceText, testText: corpus.testText,
840
+ sourceEntries: corpus.sourceEntries, testEntries: corpus.testEntries,
841
+ namedTargets: targets, provenanceTargets: explicitlyCallableTargets(task, criterion, corpus.sourceText)
842
+ });
843
+ if (!proof.sourceOk) missingDimensions.push("source-rejection");
844
+ if (!proof.testOk) missingDimensions.push("executable-focused-test");
845
+ }
846
+ if (missingDimensions.length === 0) missingDimensions.push("focused-evidence");
847
+ const proofHints = acceptanceContractProofGuidance(criterionText);
848
+ if (missingDimensions.includes("source-rejection")) proofHints.push("Add a reachable entrypoint-bound rejection guard for every explicitly invalid partition and requested error class.");
849
+ if (missingDimensions.includes("executable-focused-test")) proofHints.push("Add live entrypoint-bound rejection assertions; dynamic, skipped, dead, mutable, or unresolved proof remains pending.");
850
+ if (missingDimensions.includes("current-verifier")) proofHints.push("Run the exact configured verifier against one unchanged current working-tree snapshot.");
851
+ projections.push({ criterionId: criterion.id, criterionHash: criterion.hash, criterionText: criterionText.slice(0, 700), targets: uniqueStrings(targets).slice(0, 8), missingDimensions: uniqueStrings(missingDimensions), proofHints: uniqueStrings(proofHints).slice(0, 6).map((hint) => hint.slice(0, 300)) });
852
+ }
853
+ return projections.slice(0, MAX_CRITERIA);
854
+ }
855
+
856
+ export function acceptanceReceiptValidationErrors(value) {
857
+ if (value === undefined) return [];
858
+ const errors = [];
859
+ if (!isRecord(value) || hasUnsupportedField(value, RECEIPT_FIELDS)) return ["acceptanceReceipt is invalid"];
860
+ if (value.schemaVersion !== ACCEPTANCE_RECEIPT_SCHEMA_VERSION) errors.push(`acceptanceReceipt schemaVersion must be ${ACCEPTANCE_RECEIPT_SCHEMA_VERSION}`);
861
+ if (!['model', 'runtime'].includes(value.source)) errors.push("acceptanceReceipt source is invalid");
862
+ if (typeof value.promptHash !== "string" || !/^[a-f0-9]{64}$/.test(value.promptHash)) errors.push("acceptanceReceipt promptHash is invalid");
863
+ if (!validTimestamp(value.generatedAt)) errors.push("acceptanceReceipt generatedAt is invalid");
864
+ if (value.provenance !== undefined) {
865
+ const provenance = value.provenance;
866
+ if (!isRecord(provenance) || hasUnsupportedField(provenance, PROVENANCE_FIELDS)) {
867
+ errors.push("acceptanceReceipt provenance is invalid");
868
+ } else {
869
+ if (provenance.assurance !== "runtime-observed") errors.push("acceptanceReceipt provenance assurance is invalid");
870
+ if (!RECEIPT_DISPOSITIONS.has(provenance.disposition)) errors.push("acceptanceReceipt provenance disposition is invalid");
871
+ if (!Number.isInteger(provenance.repairCount) || provenance.repairCount < 0 || provenance.repairCount > 10) errors.push("acceptanceReceipt provenance repairCount is invalid");
872
+ if (!Number.isInteger(provenance.retryCount) || provenance.retryCount < 0 || provenance.retryCount > 10) errors.push("acceptanceReceipt provenance retryCount is invalid");
873
+ if (!FINAL_RECOVERY_DISPOSITIONS.has(provenance.finalRecoveryDisposition)) errors.push("acceptanceReceipt provenance finalRecoveryDisposition is invalid");
874
+ if (provenance.failureRef !== null && (!isRecord(provenance.failureRef) || hasUnsupportedField(provenance.failureRef, FAILURE_REF_FIELDS) || !HASH.test(String(provenance.failureRef.evidenceDigest)) || !FAILURE_CATEGORIES.has(provenance.failureRef.category) || (provenance.failureRef.captureRef !== null && (typeof provenance.failureRef.captureRef !== "string" || !SAFE_REF.test(provenance.failureRef.captureRef))))) errors.push("acceptanceReceipt provenance failureRef is invalid");
875
+ if (provenance.recoveryRef !== null && (!isRecord(provenance.recoveryRef) || hasUnsupportedField(provenance.recoveryRef, RECOVERY_REF_FIELDS) || provenance.recoveryRef.policyVersion !== "recovery-v1" || !RECOVERY_ACTIONS.has(provenance.recoveryRef.action) || !Array.isArray(provenance.recoveryRef.reasonCodes) || provenance.recoveryRef.reasonCodes.length > 16 || provenance.recoveryRef.reasonCodes.some((item) => typeof item !== "string" || compactId(item) !== item))) errors.push("acceptanceReceipt provenance recoveryRef is invalid");
876
+ if (provenance.handoffRef !== null && (typeof provenance.handoffRef !== "string" || !SAFE_REF.test(provenance.handoffRef) || path.isAbsolute(provenance.handoffRef) || provenance.handoffRef.split(/[\\/]/).includes(".."))) errors.push("acceptanceReceipt provenance handoffRef is invalid");
877
+ if (!validTimestamp(provenance.recordedAt)) errors.push("acceptanceReceipt provenance recordedAt is invalid");
878
+ }
879
+ }
880
+ if (value.helperUsage !== undefined) {
881
+ const usage = value.helperUsage;
882
+ if (!isRecord(usage) || hasUnsupportedField(usage, HELPER_USAGE_FIELDS) || !["off", "recommend", "on"].includes(usage.mode) || typeof usage.used !== "boolean" || !Array.isArray(usage.reasonCodes) || usage.reasonCodes.length > 16 || usage.reasonCodes.some((item) => typeof item !== "string" || compactId(item) !== item) || !Array.isArray(usage.helpers) || usage.helpers.length > 3 || !validTimestamp(usage.recordedAt)) errors.push("acceptanceReceipt helperUsage is invalid");
883
+ else for (const helper of usage.helpers) if (!isRecord(helper) || hasUnsupportedField(helper, HELPER_ENTRY_FIELDS) || !HELPER_ROLES.has(helper.role) || typeof helper.disposition !== "string" || compactId(helper.disposition) !== helper.disposition || !HASH.test(String(helper.requestRef)) || (helper.outputDigest !== null && !HASH.test(String(helper.outputDigest))) || !Number.isInteger(helper.calls) || helper.calls < 0 || helper.calls > 100 || !Number.isInteger(helper.tokens) || helper.tokens < 0 || helper.tokens > 100_000_000) errors.push("acceptanceReceipt helper entry is invalid");
884
+ }
885
+ if (!Array.isArray(value.criteria) || value.criteria.length === 0 || value.criteria.length > MAX_CRITERIA) {
886
+ errors.push(`acceptanceReceipt criteria must contain 1-${MAX_CRITERIA} entries`);
887
+ return errors;
888
+ }
889
+ for (const criterion of value.criteria) {
890
+ if (!isRecord(criterion) || hasUnsupportedField(criterion, CRITERION_FIELDS)) {
891
+ errors.push("acceptanceReceipt criterion is invalid");
892
+ continue;
893
+ }
894
+ if (typeof criterion.id !== "string" || !criterion.id || compactId(criterion.id) !== criterion.id) errors.push("acceptanceReceipt criterion id is invalid");
895
+ if (typeof criterion.hash !== "string" || !/^[a-f0-9]{64}$/.test(criterion.hash)) errors.push("acceptanceReceipt criterion hash is invalid");
896
+ if (typeof criterion.obligation !== "string" || !criterion.obligation || compactId(criterion.obligation) !== criterion.obligation) errors.push("acceptanceReceipt criterion obligation is invalid");
897
+ if (!ACCEPTANCE_STATUSES.has(criterion.status)) errors.push("acceptanceReceipt criterion status is invalid");
898
+ if (!ACCEPTANCE_PRIORITIES.has(criterion.priority)) errors.push("acceptanceReceipt criterion priority is invalid");
899
+ if (criterion.updatedAt !== undefined && !validTimestamp(criterion.updatedAt)) errors.push("acceptanceReceipt criterion updatedAt is invalid");
900
+ if (!Array.isArray(criterion.evidence) || criterion.evidence.length > MAX_EVIDENCE_PER_CRITERION) {
901
+ errors.push(`acceptanceReceipt criterion evidence must contain at most ${MAX_EVIDENCE_PER_CRITERION} entries`);
902
+ continue;
903
+ }
904
+ for (const evidence of criterion.evidence) {
905
+ if (!isRecord(evidence) || hasUnsupportedField(evidence, EVIDENCE_FIELDS)) {
906
+ errors.push("acceptanceReceipt evidence is invalid");
907
+ continue;
908
+ }
909
+ if (typeof evidence.kind !== "string" || !evidence.kind || compactId(evidence.kind) !== evidence.kind) errors.push("acceptanceReceipt evidence kind is invalid");
910
+ if (typeof evidence.summary !== "string" || !evidence.summary.trim() || evidence.summary.length > 240) errors.push("acceptanceReceipt evidence summary is invalid");
911
+ if (!Array.isArray(evidence.paths) || evidence.paths.length > 12 || evidence.paths.some((item) => typeof item !== "string" || !item.trim())) errors.push("acceptanceReceipt evidence paths are invalid");
912
+ if (evidence.command !== undefined && (typeof evidence.command !== "string" || !evidence.command.trim() || evidence.command.length > 300)) errors.push("acceptanceReceipt evidence command is invalid");
913
+ if (evidence.exitCode !== undefined && !Number.isInteger(evidence.exitCode)) errors.push("acceptanceReceipt evidence exitCode is invalid");
914
+ if (evidence.workingTreeDigest !== undefined && !isCurrentWorkingTreeDigest(evidence.workingTreeDigest)) errors.push("acceptanceReceipt evidence workingTreeDigest is invalid");
915
+ if (evidence.recordedAt !== undefined && !validTimestamp(evidence.recordedAt)) errors.push("acceptanceReceipt evidence recordedAt is invalid");
916
+ }
917
+ }
918
+ return errors;
919
+ }
920
+
921
+ export function acceptanceReceiptSummary(receipt) {
922
+ const normalized = normalizeAcceptanceReceipt(receipt);
923
+ if (!normalized) return [];
924
+ return normalized.criteria.map((criterion) => ({
925
+ id: criterion.id,
926
+ obligation: criterion.obligation,
927
+ priority: criterion.priority,
928
+ status: criterion.status,
929
+ evidence: (criterion.evidence ?? []).map((item) => item.kind)
930
+ }));
931
+ }
932
+
933
+ export function acceptanceReceiptProvenanceSummary(receipt) {
934
+ const normalized = normalizeAcceptanceReceipt(receipt);
935
+ return normalized ? { recovery: normalized.provenance, helpers: normalized.helperUsage } : undefined;
936
+ }