agentfootprint 12.2.0 → 13.0.0

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 (405) hide show
  1. package/CAPABILITIES.md +1 -0
  2. package/dist/adapters/code/output.js +8 -29
  3. package/dist/adapters/code/output.js.map +1 -1
  4. package/dist/adapters/observability/audit.js +151 -159
  5. package/dist/adapters/observability/audit.js.map +1 -1
  6. package/dist/adapters/observability/auditBounding.js +411 -0
  7. package/dist/adapters/observability/auditBounding.js.map +1 -0
  8. package/dist/adapters/observability/auditKeptByContract.js +107 -0
  9. package/dist/adapters/observability/auditKeptByContract.js.map +1 -0
  10. package/dist/adapters/observability/auditShapes.js +1731 -0
  11. package/dist/adapters/observability/auditShapes.js.map +1 -0
  12. package/dist/answer-account/account.js +92 -15
  13. package/dist/answer-account/account.js.map +1 -1
  14. package/dist/answer-account/facts/calls.js +7 -9
  15. package/dist/answer-account/facts/calls.js.map +1 -1
  16. package/dist/answer-account/facts/checked.js +2 -2
  17. package/dist/answer-account/facts/checked.js.map +1 -1
  18. package/dist/answer-account/facts/common.js +40 -7
  19. package/dist/answer-account/facts/common.js.map +1 -1
  20. package/dist/answer-account/facts/found.js +1 -1
  21. package/dist/answer-account/facts/found.js.map +1 -1
  22. package/dist/answer-account/facts/howSure.js +21 -3
  23. package/dist/answer-account/facts/howSure.js.map +1 -1
  24. package/dist/answer-account/facts/inView.js +3 -4
  25. package/dist/answer-account/facts/inView.js.map +1 -1
  26. package/dist/answer-account/facts/pausedLeg.js +1 -1
  27. package/dist/answer-account/facts/pausedLeg.js.map +1 -1
  28. package/dist/answer-account/facts/scripts.js +222 -0
  29. package/dist/answer-account/facts/scripts.js.map +1 -0
  30. package/dist/answer-account/facts/understood.js +5 -5
  31. package/dist/answer-account/facts/understood.js.map +1 -1
  32. package/dist/answer-account/pointerKey.js +1 -1
  33. package/dist/answer-account/shown.js +25 -7
  34. package/dist/answer-account/shown.js.map +1 -1
  35. package/dist/answer-account/signals.js +1 -1
  36. package/dist/answer-account/signals.js.map +1 -1
  37. package/dist/answer-account/size.js +152 -0
  38. package/dist/answer-account/size.js.map +1 -0
  39. package/dist/answer-account/templates.js +39 -1
  40. package/dist/answer-account/templates.js.map +1 -1
  41. package/dist/core/Agent.js +25 -1
  42. package/dist/core/Agent.js.map +1 -1
  43. package/dist/core/agent/AgentBuilder.js +85 -1
  44. package/dist/core/agent/AgentBuilder.js.map +1 -1
  45. package/dist/core/agent/arguments/ask.js +85 -2
  46. package/dist/core/agent/arguments/ask.js.map +1 -1
  47. package/dist/core/agent/arguments/partialWindow.js +120 -0
  48. package/dist/core/agent/arguments/partialWindow.js.map +1 -0
  49. package/dist/core/agent/assessment/assess.js +37 -0
  50. package/dist/core/agent/assessment/assess.js.map +1 -1
  51. package/dist/core/agent/assessment/compose.js +5 -1
  52. package/dist/core/agent/assessment/compose.js.map +1 -1
  53. package/dist/core/agent/assessment/reasons.js +7 -0
  54. package/dist/core/agent/assessment/reasons.js.map +1 -1
  55. package/dist/core/agent/assessment/witness.js +37 -4
  56. package/dist/core/agent/assessment/witness.js.map +1 -1
  57. package/dist/core/agent/buildAgentChart.js.map +1 -1
  58. package/dist/core/agent/evidence/codeRegions.js +279 -0
  59. package/dist/core/agent/evidence/codeRegions.js.map +1 -0
  60. package/dist/core/agent/evidence/gate.js +13 -2
  61. package/dist/core/agent/evidence/gate.js.map +1 -1
  62. package/dist/core/agent/evidence/recovery.js +11 -2
  63. package/dist/core/agent/evidence/recovery.js.map +1 -1
  64. package/dist/core/agent/findings/types.js.map +1 -1
  65. package/dist/core/agent/scripts/attachment.js +375 -0
  66. package/dist/core/agent/scripts/attachment.js.map +1 -0
  67. package/dist/core/agent/scripts/inert.js +88 -0
  68. package/dist/core/agent/scripts/inert.js.map +1 -0
  69. package/dist/core/agent/scripts/judge.js +41 -0
  70. package/dist/core/agent/scripts/judge.js.map +1 -0
  71. package/dist/core/agent/scripts/label.js +143 -0
  72. package/dist/core/agent/scripts/label.js.map +1 -0
  73. package/dist/core/agent/scripts/match.js +233 -0
  74. package/dist/core/agent/scripts/match.js.map +1 -0
  75. package/dist/core/agent/scripts/recovery.js +81 -0
  76. package/dist/core/agent/scripts/recovery.js.map +1 -0
  77. package/dist/core/agent/scripts/rows.js +221 -0
  78. package/dist/core/agent/scripts/rows.js.map +1 -0
  79. package/dist/core/agent/scripts/types.js +22 -0
  80. package/dist/core/agent/scripts/types.js.map +1 -0
  81. package/dist/core/agent/scripts/wrapper.js +63 -0
  82. package/dist/core/agent/scripts/wrapper.js.map +1 -0
  83. package/dist/core/agent/stages/argumentAsk.js +161 -19
  84. package/dist/core/agent/stages/argumentAsk.js.map +1 -1
  85. package/dist/core/agent/stages/evidenceRecheck.js +4 -1
  86. package/dist/core/agent/stages/evidenceRecheck.js.map +1 -1
  87. package/dist/core/agent/stages/prepareFinal.js +65 -10
  88. package/dist/core/agent/stages/prepareFinal.js.map +1 -1
  89. package/dist/core/agent/stages/route.js +53 -3
  90. package/dist/core/agent/stages/route.js.map +1 -1
  91. package/dist/core/agent/stages/seed.js +14 -1
  92. package/dist/core/agent/stages/seed.js.map +1 -1
  93. package/dist/core/agent/stages/toolCalls.js +339 -18
  94. package/dist/core/agent/stages/toolCalls.js.map +1 -1
  95. package/dist/core/codeRunnerTool.js +32 -3
  96. package/dist/core/codeRunnerTool.js.map +1 -1
  97. package/dist/core/runCheckpoint.js +19 -6
  98. package/dist/core/runCheckpoint.js.map +1 -1
  99. package/dist/esm/adapters/code/output.d.ts +1 -4
  100. package/dist/esm/adapters/code/output.js +3 -24
  101. package/dist/esm/adapters/code/output.js.map +1 -1
  102. package/dist/esm/adapters/observability/audit.d.ts +79 -12
  103. package/dist/esm/adapters/observability/audit.js +132 -142
  104. package/dist/esm/adapters/observability/audit.js.map +1 -1
  105. package/dist/esm/adapters/observability/auditBounding.d.ts +215 -0
  106. package/dist/esm/adapters/observability/auditBounding.js +390 -0
  107. package/dist/esm/adapters/observability/auditBounding.js.map +1 -0
  108. package/dist/esm/adapters/observability/auditKeptByContract.d.ts +65 -0
  109. package/dist/esm/adapters/observability/auditKeptByContract.js +103 -0
  110. package/dist/esm/adapters/observability/auditKeptByContract.js.map +1 -0
  111. package/dist/esm/adapters/observability/auditShapes.d.ts +78 -0
  112. package/dist/esm/adapters/observability/auditShapes.js +1726 -0
  113. package/dist/esm/adapters/observability/auditShapes.js.map +1 -0
  114. package/dist/esm/answer-account/account.js +91 -14
  115. package/dist/esm/answer-account/account.js.map +1 -1
  116. package/dist/esm/answer-account/facts/calls.d.ts +0 -2
  117. package/dist/esm/answer-account/facts/calls.js +1 -3
  118. package/dist/esm/answer-account/facts/calls.js.map +1 -1
  119. package/dist/esm/answer-account/facts/checked.js +2 -2
  120. package/dist/esm/answer-account/facts/checked.js.map +1 -1
  121. package/dist/esm/answer-account/facts/common.d.ts +16 -4
  122. package/dist/esm/answer-account/facts/common.js +38 -6
  123. package/dist/esm/answer-account/facts/common.js.map +1 -1
  124. package/dist/esm/answer-account/facts/found.js +2 -2
  125. package/dist/esm/answer-account/facts/found.js.map +1 -1
  126. package/dist/esm/answer-account/facts/howSure.d.ts +1 -1
  127. package/dist/esm/answer-account/facts/howSure.js +22 -4
  128. package/dist/esm/answer-account/facts/howSure.js.map +1 -1
  129. package/dist/esm/answer-account/facts/inView.js +1 -2
  130. package/dist/esm/answer-account/facts/inView.js.map +1 -1
  131. package/dist/esm/answer-account/facts/pausedLeg.js +2 -2
  132. package/dist/esm/answer-account/facts/pausedLeg.js.map +1 -1
  133. package/dist/esm/answer-account/facts/scripts.d.ts +34 -0
  134. package/dist/esm/answer-account/facts/scripts.js +218 -0
  135. package/dist/esm/answer-account/facts/scripts.js.map +1 -0
  136. package/dist/esm/answer-account/facts/understood.js +2 -2
  137. package/dist/esm/answer-account/facts/understood.js.map +1 -1
  138. package/dist/esm/answer-account/pointerKey.d.ts +1 -1
  139. package/dist/esm/answer-account/pointerKey.js +1 -1
  140. package/dist/esm/answer-account/shown.d.ts +9 -2
  141. package/dist/esm/answer-account/shown.js +25 -7
  142. package/dist/esm/answer-account/shown.js.map +1 -1
  143. package/dist/esm/answer-account/signals.js +2 -2
  144. package/dist/esm/answer-account/signals.js.map +1 -1
  145. package/dist/esm/answer-account/size.d.ts +59 -0
  146. package/dist/esm/answer-account/size.js +147 -0
  147. package/dist/esm/answer-account/size.js.map +1 -0
  148. package/dist/esm/answer-account/templates.d.ts +29 -1
  149. package/dist/esm/answer-account/templates.js +39 -1
  150. package/dist/esm/answer-account/templates.js.map +1 -1
  151. package/dist/esm/core/Agent.d.ts +8 -1
  152. package/dist/esm/core/Agent.js +25 -1
  153. package/dist/esm/core/Agent.js.map +1 -1
  154. package/dist/esm/core/agent/AgentBuilder.d.ts +52 -0
  155. package/dist/esm/core/agent/AgentBuilder.js +85 -1
  156. package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
  157. package/dist/esm/core/agent/arguments/ask.d.ts +11 -0
  158. package/dist/esm/core/agent/arguments/ask.js +83 -1
  159. package/dist/esm/core/agent/arguments/ask.js.map +1 -1
  160. package/dist/esm/core/agent/arguments/partialWindow.d.ts +42 -0
  161. package/dist/esm/core/agent/arguments/partialWindow.js +111 -0
  162. package/dist/esm/core/agent/arguments/partialWindow.js.map +1 -0
  163. package/dist/esm/core/agent/assessment/assess.js +37 -0
  164. package/dist/esm/core/agent/assessment/assess.js.map +1 -1
  165. package/dist/esm/core/agent/assessment/compose.d.ts +3 -1
  166. package/dist/esm/core/agent/assessment/compose.js +5 -1
  167. package/dist/esm/core/agent/assessment/compose.js.map +1 -1
  168. package/dist/esm/core/agent/assessment/reasons.js +7 -0
  169. package/dist/esm/core/agent/assessment/reasons.js.map +1 -1
  170. package/dist/esm/core/agent/assessment/types.d.ts +12 -2
  171. package/dist/esm/core/agent/assessment/witness.d.ts +44 -4
  172. package/dist/esm/core/agent/assessment/witness.js +35 -3
  173. package/dist/esm/core/agent/assessment/witness.js.map +1 -1
  174. package/dist/esm/core/agent/buildAgentChart.d.ts +9 -0
  175. package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
  176. package/dist/esm/core/agent/evidence/codeRegions.d.ts +130 -0
  177. package/dist/esm/core/agent/evidence/codeRegions.js +275 -0
  178. package/dist/esm/core/agent/evidence/codeRegions.js.map +1 -0
  179. package/dist/esm/core/agent/evidence/gate.d.ts +3 -0
  180. package/dist/esm/core/agent/evidence/gate.js +12 -2
  181. package/dist/esm/core/agent/evidence/gate.js.map +1 -1
  182. package/dist/esm/core/agent/evidence/recovery.d.ts +5 -1
  183. package/dist/esm/core/agent/evidence/recovery.js +11 -2
  184. package/dist/esm/core/agent/evidence/recovery.js.map +1 -1
  185. package/dist/esm/core/agent/evidence/types.d.ts +35 -0
  186. package/dist/esm/core/agent/findings/types.d.ts +3 -2
  187. package/dist/esm/core/agent/findings/types.js.map +1 -1
  188. package/dist/esm/core/agent/scripts/attachment.d.ts +179 -0
  189. package/dist/esm/core/agent/scripts/attachment.js +361 -0
  190. package/dist/esm/core/agent/scripts/attachment.js.map +1 -0
  191. package/dist/esm/core/agent/scripts/inert.d.ts +38 -0
  192. package/dist/esm/core/agent/scripts/inert.js +84 -0
  193. package/dist/esm/core/agent/scripts/inert.js.map +1 -0
  194. package/dist/esm/core/agent/scripts/judge.d.ts +36 -0
  195. package/dist/esm/core/agent/scripts/judge.js +37 -0
  196. package/dist/esm/core/agent/scripts/judge.js.map +1 -0
  197. package/dist/esm/core/agent/scripts/label.d.ts +103 -0
  198. package/dist/esm/core/agent/scripts/label.js +136 -0
  199. package/dist/esm/core/agent/scripts/label.js.map +1 -0
  200. package/dist/esm/core/agent/scripts/match.d.ts +99 -0
  201. package/dist/esm/core/agent/scripts/match.js +226 -0
  202. package/dist/esm/core/agent/scripts/match.js.map +1 -0
  203. package/dist/esm/core/agent/scripts/recovery.d.ts +54 -0
  204. package/dist/esm/core/agent/scripts/recovery.js +77 -0
  205. package/dist/esm/core/agent/scripts/recovery.js.map +1 -0
  206. package/dist/esm/core/agent/scripts/rows.d.ts +143 -0
  207. package/dist/esm/core/agent/scripts/rows.js +211 -0
  208. package/dist/esm/core/agent/scripts/rows.js.map +1 -0
  209. package/dist/esm/core/agent/scripts/types.d.ts +91 -0
  210. package/dist/esm/core/agent/scripts/types.js +21 -0
  211. package/dist/esm/core/agent/scripts/types.js.map +1 -0
  212. package/dist/esm/core/agent/scripts/wrapper.d.ts +36 -0
  213. package/dist/esm/core/agent/scripts/wrapper.js +58 -0
  214. package/dist/esm/core/agent/scripts/wrapper.js.map +1 -0
  215. package/dist/esm/core/agent/stages/argumentAsk.d.ts +4 -1
  216. package/dist/esm/core/agent/stages/argumentAsk.js +164 -22
  217. package/dist/esm/core/agent/stages/argumentAsk.js.map +1 -1
  218. package/dist/esm/core/agent/stages/evidenceRecheck.js +4 -1
  219. package/dist/esm/core/agent/stages/evidenceRecheck.js.map +1 -1
  220. package/dist/esm/core/agent/stages/prepareFinal.d.ts +11 -0
  221. package/dist/esm/core/agent/stages/prepareFinal.js +65 -10
  222. package/dist/esm/core/agent/stages/prepareFinal.js.map +1 -1
  223. package/dist/esm/core/agent/stages/route.js +53 -3
  224. package/dist/esm/core/agent/stages/route.js.map +1 -1
  225. package/dist/esm/core/agent/stages/seed.js +14 -1
  226. package/dist/esm/core/agent/stages/seed.js.map +1 -1
  227. package/dist/esm/core/agent/stages/toolCalls.d.ts +14 -0
  228. package/dist/esm/core/agent/stages/toolCalls.js +337 -16
  229. package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
  230. package/dist/esm/core/agent/types.d.ts +41 -0
  231. package/dist/esm/core/codeRunnerTool.d.ts +23 -0
  232. package/dist/esm/core/codeRunnerTool.js +31 -2
  233. package/dist/esm/core/codeRunnerTool.js.map +1 -1
  234. package/dist/esm/core/runCheckpoint.js +16 -3
  235. package/dist/esm/core/runCheckpoint.js.map +1 -1
  236. package/dist/esm/events/payloads.d.ts +46 -1
  237. package/dist/esm/hosting/answerAccounts.js +4 -2
  238. package/dist/esm/hosting/answerAccounts.js.map +1 -1
  239. package/dist/esm/hosting/artifactWire.d.ts +3 -2
  240. package/dist/esm/hosting/artifactWire.js.map +1 -1
  241. package/dist/esm/index.d.ts +3 -1
  242. package/dist/esm/index.js.map +1 -1
  243. package/dist/esm/lib/boundedJson.d.ts +24 -0
  244. package/dist/esm/lib/boundedJson.js +45 -2
  245. package/dist/esm/lib/boundedJson.js.map +1 -1
  246. package/dist/esm/lib/scriptRecord.d.ts +139 -0
  247. package/dist/esm/lib/scriptRecord.js +18 -0
  248. package/dist/esm/lib/scriptRecord.js.map +1 -0
  249. package/dist/esm/lib/utf8.d.ts +36 -0
  250. package/dist/esm/lib/utf8.js +70 -0
  251. package/dist/esm/lib/utf8.js.map +1 -0
  252. package/dist/esm/mcp/toolExtras.d.ts +9 -0
  253. package/dist/esm/mcp/toolExtras.js +6 -0
  254. package/dist/esm/mcp/toolExtras.js.map +1 -1
  255. package/dist/esm/redaction/conversation.js +10 -0
  256. package/dist/esm/redaction/conversation.js.map +1 -1
  257. package/dist/esm/redaction/knownStrings.js +34 -0
  258. package/dist/esm/redaction/knownStrings.js.map +1 -1
  259. package/dist/esm/semantics/coverage/answer.d.ts +12 -1
  260. package/dist/esm/semantics/coverage/answer.js +26 -3
  261. package/dist/esm/semantics/coverage/answer.js.map +1 -1
  262. package/dist/esm/tools/script.d.ts +85 -0
  263. package/dist/esm/tools/script.js +157 -0
  264. package/dist/esm/tools/script.js.map +1 -0
  265. package/dist/esm/tools/tools.d.ts +30 -0
  266. package/dist/esm/tools/tools.js +4 -0
  267. package/dist/esm/tools/tools.js.map +1 -1
  268. package/dist/hosting/answerAccounts.js +4 -2
  269. package/dist/hosting/answerAccounts.js.map +1 -1
  270. package/dist/hosting/artifactWire.js.map +1 -1
  271. package/dist/index.js.map +1 -1
  272. package/dist/lib/boundedJson.js +48 -3
  273. package/dist/lib/boundedJson.js.map +1 -1
  274. package/dist/lib/scriptRecord.js +19 -0
  275. package/dist/lib/scriptRecord.js.map +1 -0
  276. package/dist/lib/utf8.js +77 -0
  277. package/dist/lib/utf8.js.map +1 -0
  278. package/dist/mcp/toolExtras.js +6 -0
  279. package/dist/mcp/toolExtras.js.map +1 -1
  280. package/dist/redaction/conversation.js +10 -0
  281. package/dist/redaction/conversation.js.map +1 -1
  282. package/dist/redaction/knownStrings.js +34 -0
  283. package/dist/redaction/knownStrings.js.map +1 -1
  284. package/dist/semantics/coverage/answer.js +26 -3
  285. package/dist/semantics/coverage/answer.js.map +1 -1
  286. package/dist/tools/script.js +163 -0
  287. package/dist/tools/script.js.map +1 -0
  288. package/dist/tools/tools.js +4 -0
  289. package/dist/tools/tools.js.map +1 -1
  290. package/dist/types/adapters/code/output.d.ts +1 -4
  291. package/dist/types/adapters/code/output.d.ts.map +1 -1
  292. package/dist/types/adapters/observability/audit.d.ts +79 -12
  293. package/dist/types/adapters/observability/audit.d.ts.map +1 -1
  294. package/dist/types/adapters/observability/auditBounding.d.ts +216 -0
  295. package/dist/types/adapters/observability/auditBounding.d.ts.map +1 -0
  296. package/dist/types/adapters/observability/auditKeptByContract.d.ts +66 -0
  297. package/dist/types/adapters/observability/auditKeptByContract.d.ts.map +1 -0
  298. package/dist/types/adapters/observability/auditShapes.d.ts +79 -0
  299. package/dist/types/adapters/observability/auditShapes.d.ts.map +1 -0
  300. package/dist/types/answer-account/account.d.ts.map +1 -1
  301. package/dist/types/answer-account/facts/calls.d.ts +0 -2
  302. package/dist/types/answer-account/facts/calls.d.ts.map +1 -1
  303. package/dist/types/answer-account/facts/checked.d.ts.map +1 -1
  304. package/dist/types/answer-account/facts/common.d.ts +16 -4
  305. package/dist/types/answer-account/facts/common.d.ts.map +1 -1
  306. package/dist/types/answer-account/facts/found.d.ts.map +1 -1
  307. package/dist/types/answer-account/facts/howSure.d.ts +1 -1
  308. package/dist/types/answer-account/facts/howSure.d.ts.map +1 -1
  309. package/dist/types/answer-account/facts/inView.d.ts.map +1 -1
  310. package/dist/types/answer-account/facts/pausedLeg.d.ts.map +1 -1
  311. package/dist/types/answer-account/facts/scripts.d.ts +35 -0
  312. package/dist/types/answer-account/facts/scripts.d.ts.map +1 -0
  313. package/dist/types/answer-account/facts/understood.d.ts.map +1 -1
  314. package/dist/types/answer-account/pointerKey.d.ts +1 -1
  315. package/dist/types/answer-account/shown.d.ts +9 -2
  316. package/dist/types/answer-account/shown.d.ts.map +1 -1
  317. package/dist/types/answer-account/signals.d.ts.map +1 -1
  318. package/dist/types/answer-account/size.d.ts +60 -0
  319. package/dist/types/answer-account/size.d.ts.map +1 -0
  320. package/dist/types/answer-account/templates.d.ts +29 -1
  321. package/dist/types/answer-account/templates.d.ts.map +1 -1
  322. package/dist/types/core/Agent.d.ts +8 -1
  323. package/dist/types/core/Agent.d.ts.map +1 -1
  324. package/dist/types/core/agent/AgentBuilder.d.ts +52 -0
  325. package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
  326. package/dist/types/core/agent/arguments/ask.d.ts +11 -0
  327. package/dist/types/core/agent/arguments/ask.d.ts.map +1 -1
  328. package/dist/types/core/agent/arguments/partialWindow.d.ts +43 -0
  329. package/dist/types/core/agent/arguments/partialWindow.d.ts.map +1 -0
  330. package/dist/types/core/agent/assessment/assess.d.ts.map +1 -1
  331. package/dist/types/core/agent/assessment/compose.d.ts +3 -1
  332. package/dist/types/core/agent/assessment/compose.d.ts.map +1 -1
  333. package/dist/types/core/agent/assessment/reasons.d.ts.map +1 -1
  334. package/dist/types/core/agent/assessment/types.d.ts +12 -2
  335. package/dist/types/core/agent/assessment/types.d.ts.map +1 -1
  336. package/dist/types/core/agent/assessment/witness.d.ts +44 -4
  337. package/dist/types/core/agent/assessment/witness.d.ts.map +1 -1
  338. package/dist/types/core/agent/buildAgentChart.d.ts +9 -0
  339. package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
  340. package/dist/types/core/agent/evidence/codeRegions.d.ts +131 -0
  341. package/dist/types/core/agent/evidence/codeRegions.d.ts.map +1 -0
  342. package/dist/types/core/agent/evidence/gate.d.ts +3 -0
  343. package/dist/types/core/agent/evidence/gate.d.ts.map +1 -1
  344. package/dist/types/core/agent/evidence/recovery.d.ts +5 -1
  345. package/dist/types/core/agent/evidence/recovery.d.ts.map +1 -1
  346. package/dist/types/core/agent/evidence/types.d.ts +35 -0
  347. package/dist/types/core/agent/evidence/types.d.ts.map +1 -1
  348. package/dist/types/core/agent/findings/types.d.ts +3 -2
  349. package/dist/types/core/agent/findings/types.d.ts.map +1 -1
  350. package/dist/types/core/agent/scripts/attachment.d.ts +180 -0
  351. package/dist/types/core/agent/scripts/attachment.d.ts.map +1 -0
  352. package/dist/types/core/agent/scripts/inert.d.ts +39 -0
  353. package/dist/types/core/agent/scripts/inert.d.ts.map +1 -0
  354. package/dist/types/core/agent/scripts/judge.d.ts +37 -0
  355. package/dist/types/core/agent/scripts/judge.d.ts.map +1 -0
  356. package/dist/types/core/agent/scripts/label.d.ts +104 -0
  357. package/dist/types/core/agent/scripts/label.d.ts.map +1 -0
  358. package/dist/types/core/agent/scripts/match.d.ts +100 -0
  359. package/dist/types/core/agent/scripts/match.d.ts.map +1 -0
  360. package/dist/types/core/agent/scripts/recovery.d.ts +55 -0
  361. package/dist/types/core/agent/scripts/recovery.d.ts.map +1 -0
  362. package/dist/types/core/agent/scripts/rows.d.ts +144 -0
  363. package/dist/types/core/agent/scripts/rows.d.ts.map +1 -0
  364. package/dist/types/core/agent/scripts/types.d.ts +92 -0
  365. package/dist/types/core/agent/scripts/types.d.ts.map +1 -0
  366. package/dist/types/core/agent/scripts/wrapper.d.ts +37 -0
  367. package/dist/types/core/agent/scripts/wrapper.d.ts.map +1 -0
  368. package/dist/types/core/agent/stages/argumentAsk.d.ts +4 -1
  369. package/dist/types/core/agent/stages/argumentAsk.d.ts.map +1 -1
  370. package/dist/types/core/agent/stages/evidenceRecheck.d.ts.map +1 -1
  371. package/dist/types/core/agent/stages/prepareFinal.d.ts +11 -0
  372. package/dist/types/core/agent/stages/prepareFinal.d.ts.map +1 -1
  373. package/dist/types/core/agent/stages/route.d.ts.map +1 -1
  374. package/dist/types/core/agent/stages/seed.d.ts.map +1 -1
  375. package/dist/types/core/agent/stages/toolCalls.d.ts +14 -0
  376. package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
  377. package/dist/types/core/agent/types.d.ts +41 -0
  378. package/dist/types/core/agent/types.d.ts.map +1 -1
  379. package/dist/types/core/codeRunnerTool.d.ts +23 -0
  380. package/dist/types/core/codeRunnerTool.d.ts.map +1 -1
  381. package/dist/types/core/runCheckpoint.d.ts.map +1 -1
  382. package/dist/types/events/payloads.d.ts +46 -1
  383. package/dist/types/events/payloads.d.ts.map +1 -1
  384. package/dist/types/hosting/answerAccounts.d.ts.map +1 -1
  385. package/dist/types/hosting/artifactWire.d.ts +3 -2
  386. package/dist/types/hosting/artifactWire.d.ts.map +1 -1
  387. package/dist/types/index.d.ts +3 -1
  388. package/dist/types/index.d.ts.map +1 -1
  389. package/dist/types/lib/boundedJson.d.ts +24 -0
  390. package/dist/types/lib/boundedJson.d.ts.map +1 -1
  391. package/dist/types/lib/scriptRecord.d.ts +140 -0
  392. package/dist/types/lib/scriptRecord.d.ts.map +1 -0
  393. package/dist/types/lib/utf8.d.ts +37 -0
  394. package/dist/types/lib/utf8.d.ts.map +1 -0
  395. package/dist/types/mcp/toolExtras.d.ts +9 -0
  396. package/dist/types/mcp/toolExtras.d.ts.map +1 -1
  397. package/dist/types/redaction/conversation.d.ts.map +1 -1
  398. package/dist/types/redaction/knownStrings.d.ts.map +1 -1
  399. package/dist/types/semantics/coverage/answer.d.ts +12 -1
  400. package/dist/types/semantics/coverage/answer.d.ts.map +1 -1
  401. package/dist/types/tools/script.d.ts +86 -0
  402. package/dist/types/tools/script.d.ts.map +1 -0
  403. package/dist/types/tools/tools.d.ts +30 -0
  404. package/dist/types/tools/tools.d.ts.map +1 -1
  405. package/package.json +2 -1
@@ -0,0 +1,1731 @@
1
+ "use strict";
2
+ /**
3
+ * auditShapes — WHAT the audit chain's bounded mode keeps of each event: one
4
+ * shape per registered event type, every field of its payload ruled.
5
+ *
6
+ * Pattern: a declarative table, total over the registry
7
+ * (`{ [T in keyof AgentfootprintEventMap]-?: BoundRule }`), built from
8
+ * the combinators in `auditBounding.ts`.
9
+ * Role: the bounding layer's data. `audit.ts` asks it for every event in
10
+ * `payloadMode: 'bounded'`; an event type it does not know is
11
+ * `unknownEventShape` — every field a marker.
12
+ * Emits: N/A.
13
+ *
14
+ * A new event type, or a new field on a payload, does not compile until it is
15
+ * classified here. Content (what a person, the model, a tool or the data
16
+ * wrote, or a message composed from it) is a marker; structure (ids, names,
17
+ * kinds, codes, verdicts, counts, the library's own sentences, the words the
18
+ * app declared up front) is kept — and every kept value is CHECKED at runtime
19
+ * as the kind its type declares: `num`, `bool`, `str` (an open string: an id,
20
+ * a name, a label), `oneOf` (a closed union: exactly its words). No container
21
+ * is kept whole; each is spelled out field by field, so a child its type does
22
+ * not declare is a marker. The type walker
23
+ * (`test/type-regressions/AuditBoundingDepth.test.ts`) holds every rule here
24
+ * to the type beneath it; the runtime sweep
25
+ * (`test/observability-providers/audit-bounded-sweep.test.ts`) hands every rule
26
+ * what its kind forbids.
27
+ *
28
+ * The positions a record keeps although their value may come from the run —
29
+ * meta's who, decision evidence, a policy's tag, an app's reason word, a seen
30
+ * tool's name — are the rules `auditKeptByContract.ts` names, placed here.
31
+ *
32
+ * `audit.ts` looks an event's shape up in `eventShapeTable` — a `Map`, so an
33
+ * event NAME is never a key into a plain object (`constructor`, `__proto__`).
34
+ */
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.eventShapes = exports.eventShapeTable = exports.boundMeta = exports.boundAnswerNegatives = exports.boundAnswerCoverage = exports.boundScripts = void 0;
37
+ const auditBounding_js_1 = require("./auditBounding.js");
38
+ const auditKeptByContract_js_1 = require("./auditKeptByContract.js");
39
+ const SCRIPT_LABELS = [
40
+ 'submitted',
41
+ 'returned',
42
+ 'reported-success',
43
+ 'reported-failure',
44
+ 'completed',
45
+ 'completed-with-failure',
46
+ 'outcome-unknown',
47
+ ];
48
+ /** A submitted program's attached record: only its text is content. */
49
+ const boundShownScript = (0, auditBounding_js_1.shapeOf)({
50
+ toolCallId: auditBounding_js_1.str,
51
+ dispatch: auditBounding_js_1.num,
52
+ tool: auditBounding_js_1.str,
53
+ language: auditBounding_js_1.str,
54
+ label: (0, auditBounding_js_1.oneOf)(...SCRIPT_LABELS),
55
+ exitCode: auditBounding_js_1.num,
56
+ resultWithheld: (0, auditBounding_js_1.oneOf)('over-ceiling'),
57
+ rewritten: (0, auditBounding_js_1.oneOf)(true),
58
+ bytes: auditBounding_js_1.num,
59
+ lines: auditBounding_js_1.num,
60
+ truncated: (0, auditBounding_js_1.shapeOf)({ shownBytes: auditBounding_js_1.num }),
61
+ text: auditBounding_js_1.charsMarker,
62
+ });
63
+ /** Attachment summary: preserve every declared field, check every runtime child. */
64
+ exports.boundScripts = (0, auditBounding_js_1.shapeOf)({
65
+ shown: (0, auditBounding_js_1.listOf)(boundShownScript),
66
+ omitted: auditBounding_js_1.num,
67
+ closedFence: (0, auditBounding_js_1.shapeOf)({
68
+ char: (0, auditBounding_js_1.oneOf)('backtick', 'tilde'),
69
+ length: auditBounding_js_1.num,
70
+ }),
71
+ withheldFromText: (0, auditBounding_js_1.oneOf)(true),
72
+ });
73
+ /** Match verdicts contain labels and references, never the program. */
74
+ const boundScriptsVerdict = (0, auditBounding_js_1.shapeOf)({
75
+ blocks: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
76
+ block: auditBounding_js_1.num,
77
+ label: (0, auditBounding_js_1.oneOf)(...SCRIPT_LABELS, 'unmatched'),
78
+ exitCode: auditBounding_js_1.num,
79
+ toolCallId: auditBounding_js_1.str,
80
+ tool: auditBounding_js_1.str,
81
+ dispatch: auditBounding_js_1.num,
82
+ alsoMatches: auditBounding_js_1.num,
83
+ reason: (0, auditBounding_js_1.oneOf)('no-submission-this-turn', 'over-size', 'kept-out'),
84
+ })),
85
+ earlierTurnRows: auditBounding_js_1.num,
86
+ regionsDropped: auditBounding_js_1.num,
87
+ scriptsDropped: auditBounding_js_1.num,
88
+ });
89
+ // ─── Shared pieces: coverage, periods, witnesses ─────────────────────
90
+ /** One coverage item: the tool author's prose (`what`, `why`, `short`), and its `kind`. */
91
+ const boundCoverageItem = (0, auditBounding_js_1.shapeOf)({
92
+ what: auditBounding_js_1.charsMarker,
93
+ why: auditBounding_js_1.charsMarker,
94
+ short: auditBounding_js_1.charsMarker,
95
+ kind: (0, auditBounding_js_1.oneOf)('existence', 'scope'),
96
+ });
97
+ /** What a read found still running: the tool author's prose, and how many things it stands for. */
98
+ const boundInProgressItem = (0, auditBounding_js_1.shapeOf)({
99
+ what: auditBounding_js_1.charsMarker,
100
+ why: auditBounding_js_1.charsMarker,
101
+ short: auditBounding_js_1.charsMarker,
102
+ count: auditBounding_js_1.num,
103
+ });
104
+ /** A declared window: both instants are the tool's own values. */
105
+ const boundInstants = (0, auditBounding_js_1.shapeOf)({
106
+ from: auditBounding_js_1.charsMarker,
107
+ to: auditBounding_js_1.charsMarker,
108
+ });
109
+ /** What the store holds — a window, or the library's word `'unknown'` (the tool
110
+ * said it cannot vouch for the store), which stays. */
111
+ const boundHeld = (0, auditBounding_js_1.either)((0, auditBounding_js_1.oneOf)('unknown'), boundInstants);
112
+ /** A declared period: its instants are the tool's values. */
113
+ const boundPeriod = (0, auditBounding_js_1.shapeOf)({
114
+ queried: boundInstants,
115
+ held: boundHeld,
116
+ readAt: auditBounding_js_1.charsMarker,
117
+ });
118
+ /** An absence's source and its clock, as the tool declared them. */
119
+ const boundProvenance = (0, auditBounding_js_1.shapeOf)({
120
+ measuredAt: auditBounding_js_1.charsMarker,
121
+ source: auditBounding_js_1.charsMarker,
122
+ ageSeconds: auditBounding_js_1.num,
123
+ sourceExportDate: auditBounding_js_1.charsMarker,
124
+ });
125
+ /**
126
+ * What the library composed for a `search` tool. Kept: facets ride BY
127
+ * REFERENCE, and a gap's words name arguments and verdicts, never a value
128
+ * (`CoverageGapPayload`'s contract) — a `'prose'` gap's words are the ones
129
+ * the search declaration states up front.
130
+ */
131
+ /** What a gap bears on: a facet word, or the filter and values the search declaration states. */
132
+ const boundBearsFilter = (0, auditBounding_js_1.shapeOf)({
133
+ filter: auditBounding_js_1.str,
134
+ values: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.either)(auditBounding_js_1.str, auditBounding_js_1.num, auditBounding_js_1.bool)),
135
+ });
136
+ const boundBears = (0, auditBounding_js_1.either)((0, auditBounding_js_1.oneOf)('completeness', 'period', 'population', 'source'), boundBearsFilter);
137
+ const boundComposition = (0, auditBounding_js_1.shapeOf)({
138
+ origin: (0, auditBounding_js_1.oneOf)('local', 'remote'),
139
+ resultId: auditBounding_js_1.str,
140
+ complete: auditBounding_js_1.bool,
141
+ facets: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
142
+ facet: (0, auditBounding_js_1.oneOf)('filter', 'names', 'period', 'population', 'source', 'subject'),
143
+ from: (0, auditBounding_js_1.oneOf)('call', 'default', 'host', 'result'),
144
+ ref: (0, auditBounding_js_1.shapeOf)({ resultId: auditBounding_js_1.str, argument: auditBounding_js_1.str }),
145
+ any: auditBounding_js_1.bool,
146
+ })),
147
+ gaps: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
148
+ kind: (0, auditBounding_js_1.oneOf)('argument-unsent', 'cap-reached', 'credential-limited', 'match', 'paged', 'partial', 'period', 'prose', 'ranking', 'scope'),
149
+ what: auditBounding_js_1.str,
150
+ why: auditBounding_js_1.str,
151
+ bears: boundBears,
152
+ argument: auditBounding_js_1.str,
153
+ })),
154
+ });
155
+ /**
156
+ * A skill guard's evaluation: the edge, the call, the verdict, and per
157
+ * condition the key, operator and value the app DECLARED — and the engine's
158
+ * summary of the value it read (`actualSummary`), the decision evidence the
159
+ * chain keeps by contract (redaction-aware).
160
+ */
161
+ const boundGuard = (0, auditBounding_js_1.shapeOf)({
162
+ from: auditBounding_js_1.str,
163
+ to: auditBounding_js_1.str,
164
+ toolName: auditBounding_js_1.str,
165
+ toolCallId: auditBounding_js_1.str,
166
+ verdict: auditBounding_js_1.bool,
167
+ conditions: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
168
+ key: auditBounding_js_1.str,
169
+ op: auditBounding_js_1.str,
170
+ value: (0, auditBounding_js_1.orList)(auditKeptByContract_js_1.declaredValue),
171
+ // The engine's decision evidence: a summary of the value a guard read.
172
+ actualSummary: auditKeptByContract_js_1.decisionSummary,
173
+ passed: auditBounding_js_1.bool,
174
+ })),
175
+ });
176
+ /** What an integrity finding is about: a kind and an id. */
177
+ const boundSubject = (0, auditBounding_js_1.shapeOf)({ kind: auditBounding_js_1.str, id: auditBounding_js_1.str });
178
+ /** What a message said that won a routing match: the text is the person's; the
179
+ * keyword is the app's declared vocabulary. */
180
+ const boundWitness = (0, auditBounding_js_1.shapeOf)({
181
+ text: auditBounding_js_1.charsMarker,
182
+ keyword: auditBounding_js_1.str,
183
+ });
184
+ /**
185
+ * A typed answer's limits: the three lists, the declared periods, what a read
186
+ * found still running and the values an `assume` rule filled. Every sentence
187
+ * and value is a marker; the tool and argument NAMES, the call ids, counts,
188
+ * kinds and the library's `'unknown'` stay.
189
+ */
190
+ exports.boundAnswerCoverage = (0, auditBounding_js_1.shapeOf)({
191
+ checked: (0, auditBounding_js_1.listOf)(boundCoverageItem),
192
+ notChecked: (0, auditBounding_js_1.listOf)(boundCoverageItem),
193
+ cannotCover: (0, auditBounding_js_1.listOf)(boundCoverageItem),
194
+ periods: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
195
+ toolName: auditBounding_js_1.str,
196
+ toolCallId: auditBounding_js_1.str,
197
+ queried: boundInstants,
198
+ held: boundHeld,
199
+ readAt: auditBounding_js_1.charsMarker,
200
+ })),
201
+ inProgress: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
202
+ toolName: auditBounding_js_1.str,
203
+ toolCallId: auditBounding_js_1.str,
204
+ items: (0, auditBounding_js_1.listOf)(boundInProgressItem),
205
+ })),
206
+ assumed: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
207
+ toolName: auditBounding_js_1.str,
208
+ argument: auditBounding_js_1.str,
209
+ value: auditBounding_js_1.charsMarker,
210
+ hidden: auditBounding_js_1.bool,
211
+ })),
212
+ });
213
+ /**
214
+ * A typed answer's negatives: each statement and the population it is about
215
+ * are markers; the answer field's declared name, the codes, verdicts, ids,
216
+ * tool names and counts stay.
217
+ */
218
+ exports.boundAnswerNegatives = (0, auditBounding_js_1.shapeOf)({
219
+ field: auditBounding_js_1.str,
220
+ version: auditBounding_js_1.str,
221
+ delivery: (0, auditBounding_js_1.oneOf)('as-checked', 'fallback', 'recorded'),
222
+ claims: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
223
+ kind: (0, auditBounding_js_1.oneOf)('complete', 'none', 'not-found', 'unknown'),
224
+ about: auditBounding_js_1.charsMarker,
225
+ restsOn: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
226
+ statement: auditBounding_js_1.charsMarker,
227
+ delivery: (0, auditBounding_js_1.oneOf)('record-composed'),
228
+ version: auditBounding_js_1.str,
229
+ })),
230
+ checks: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
231
+ id: auditBounding_js_1.str,
232
+ path: auditBounding_js_1.str,
233
+ index: auditBounding_js_1.num,
234
+ kind: (0, auditBounding_js_1.oneOf)('complete', 'none', 'not-found', 'unknown'),
235
+ notes: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.oneOf)('absence-kind-normalized')),
236
+ // The payload declares any string: a checker's code.
237
+ code: auditBounding_js_1.str,
238
+ disposition: (0, auditBounding_js_1.oneOf)('checked-fail', 'not-applicable', 'unreachable'),
239
+ tools: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
240
+ results: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
241
+ staleSince: (0, auditBounding_js_1.shapeOf)({
242
+ turn: auditBounding_js_1.num,
243
+ readAt: auditBounding_js_1.str,
244
+ }),
245
+ })),
246
+ coverage: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({ tool: auditBounding_js_1.str, checked: auditBounding_js_1.num })),
247
+ actions: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
248
+ tool: auditBounding_js_1.str,
249
+ outcome: (0, auditBounding_js_1.oneOf)('error', 'not-run', 'ok'),
250
+ })),
251
+ });
252
+ /** A shape for one event's whole payload, exhaustive over that event's payload type. */
253
+ const eventShape = (rules) => (0, auditBounding_js_1.shapeOf)(rules);
254
+ /** The pause reason the library writes itself — its own words, kept. */
255
+ const FIXED_PAUSE_REASON = 'stage requested pause';
256
+ /** Why a turn's answer stands where it does — the assessment's own words. */
257
+ const boundAssessmentReasons = (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.oneOf)('answer-check-failed', 'argument-asked', 'argument-assumed', 'argument-read', 'argument-unverified', 'asked', 'check-unreachable', 'claim-exceeds-search', 'coverage-gap', 'declaration-overclaimed', 'declared-absent', 'derived-from-reading', 'empty-undeclared', 'negative-prose-unverified', 'period-beyond-retention', 'period-differs-from-asked', 'period-not-held', 'period-partly-held', 'period-undeclared', 'period-unknown', 'script-unmatched', 'sources-conflict', 'steps-unfinished', 'stopped-early', 'value-contingent', 'value-survived-revision', 'value-unsupported'));
258
+ /** Which honesty checks ran, and over how much. */
259
+ const boundAssessmentChecks = (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
260
+ layer: (0, auditBounding_js_1.oneOf)(1, 2, 3, 4),
261
+ check: (0, auditBounding_js_1.oneOf)('answer-checks', 'argument-rules', 'argument-sources', 'names-and-numbers', 'result-period', 'result-shape', 'script-match', 'tool-coverage'),
262
+ ran: auditBounding_js_1.num,
263
+ of: auditBounding_js_1.num,
264
+ }));
265
+ /** A turn's answer assessment: verdict words, reason codes and check counts. */
266
+ const boundAnswerAssessment = (0, auditBounding_js_1.shapeOf)({
267
+ assessment: (0, auditBounding_js_1.oneOf)('known', 'not-applicable', 'unknown', 'unrefuted'),
268
+ standing: (0, auditBounding_js_1.oneOf)('ask', 'consistent', 'known', 'not-assessed', 'not-sure'),
269
+ reasons: boundAssessmentReasons,
270
+ checked: boundAssessmentChecks,
271
+ });
272
+ /** One context source's share of a slot: characters and pieces. */
273
+ const boundSourceShare = (0, auditBounding_js_1.shapeOf)({ chars: auditBounding_js_1.num, count: auditBounding_js_1.num });
274
+ /** A slot's share by context source — every source the library declares, by name. */
275
+ const boundSourceBreakdown = (0, auditBounding_js_1.shapeOf)({
276
+ assistant: boundSourceShare,
277
+ base: boundSourceShare,
278
+ custom: boundSourceShare,
279
+ 'evidence-recovery': boundSourceShare,
280
+ fact: boundSourceShare,
281
+ findings: boundSourceShare,
282
+ instructions: boundSourceShare,
283
+ memory: boundSourceShare,
284
+ ontology: boundSourceShare,
285
+ rag: boundSourceShare,
286
+ registry: boundSourceShare,
287
+ skill: boundSourceShare,
288
+ steering: boundSourceShare,
289
+ 'tool-result': boundSourceShare,
290
+ user: boundSourceShare,
291
+ });
292
+ const requestReason = (0, auditBounding_js_1.oneOf)('answered', 'cancelled', 'changes-without-key', 'exhausted', 'no-time-left', 'not-permitted', 'not-replayable', 'not-retryable', 'retryable', 'wait-limit');
293
+ const requestFailure = (0, auditBounding_js_1.oneOf)('auth', 'network', 'permanent', 'rate-limited', 'server', 'timeout', 'unknown');
294
+ const requestRefusalKind = (0, auditBounding_js_1.oneOf)('session-busy', 'throttle');
295
+ const requestEffect = (0, auditBounding_js_1.oneOf)('applied', 'none', 'unknown');
296
+ /** A request's error: one of the library's two fixed sentences, and a category — never the error itself. */
297
+ const requestError = (0, auditBounding_js_1.shapeOf)({
298
+ message: (0, auditBounding_js_1.oneOf)('The call ran out of time before an answer arrived.', 'The request failed before an answer arrived. Its error is not kept.'),
299
+ code: requestFailure,
300
+ });
301
+ /** One try of a tool's request: outcome, reason, timing and the library's categories. */
302
+ const boundRequestAttempt = (0, auditBounding_js_1.shapeOf)({
303
+ attempt: auditBounding_js_1.num,
304
+ outcome: (0, auditBounding_js_1.oneOf)('answered', 'cut', 'failed', 'refused', 'timed-out'),
305
+ reason: requestReason,
306
+ status: auditBounding_js_1.num,
307
+ kind: requestRefusalKind,
308
+ failure: requestFailure,
309
+ waitMs: auditBounding_js_1.num,
310
+ retryAfterMs: auditBounding_js_1.num,
311
+ error: requestError,
312
+ remote: (0, auditBounding_js_1.oneOf)('unknown'),
313
+ effect: requestEffect,
314
+ permission: (0, auditBounding_js_1.shapeOf)({
315
+ by: (0, auditBounding_js_1.oneOf)('adapter', 'compatibility', 'declaration'),
316
+ on: (0, auditBounding_js_1.oneOf)('network', 'throttle'),
317
+ assumes: (0, auditBounding_js_1.oneOf)('refused-before-execution'),
318
+ deduplicated: auditBounding_js_1.bool,
319
+ }),
320
+ durationMs: auditBounding_js_1.num,
321
+ });
322
+ /** How a tool's request ended. */
323
+ const boundRequestEnd = (0, auditBounding_js_1.shapeOf)({
324
+ outcome: (0, auditBounding_js_1.oneOf)('answered', 'cancelled', 'cut', 'failed', 'refused', 'timed-out'),
325
+ reason: requestReason,
326
+ status: auditBounding_js_1.num,
327
+ kind: requestRefusalKind,
328
+ failure: requestFailure,
329
+ during: (0, auditBounding_js_1.oneOf)('request', 'wait'),
330
+ error: requestError,
331
+ remote: (0, auditBounding_js_1.oneOf)('unknown'),
332
+ attempts: auditBounding_js_1.num,
333
+ effect: requestEffect,
334
+ mayHaveRun: auditBounding_js_1.bool,
335
+ });
336
+ /**
337
+ * Each record's meta: the run and stage ids, paths, indices and engine
338
+ * coordinates the dispatcher stamps — and the who the caller named
339
+ * (`sessionId`, `principal`, `tenant`), kept by contract. A field `EventMeta`
340
+ * does not declare, or a value of another kind, is a marker. (`wallClockMs` is
341
+ * the record's `timestamp`; `runId` its run anchor — `audit.ts` lifts both.)
342
+ */
343
+ exports.boundMeta = (0, auditBounding_js_1.shapeOf)({
344
+ wallClockMs: auditBounding_js_1.num,
345
+ runOffsetMs: auditBounding_js_1.num,
346
+ sourcePosition: (0, auditBounding_js_1.shapeOf)({
347
+ engineRunId: auditBounding_js_1.str,
348
+ logRunId: auditBounding_js_1.str,
349
+ drillPath: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
350
+ committedThroughIdx: auditBounding_js_1.num,
351
+ }),
352
+ runtimeStageId: auditBounding_js_1.str,
353
+ subflowPath: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
354
+ compositionPath: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
355
+ turnIndex: auditBounding_js_1.num,
356
+ iterIndex: auditBounding_js_1.num,
357
+ traceId: auditBounding_js_1.str,
358
+ spanId: auditBounding_js_1.str,
359
+ correlationId: auditBounding_js_1.str,
360
+ runId: auditBounding_js_1.str,
361
+ sessionId: auditKeptByContract_js_1.metaIdentity,
362
+ principal: auditKeptByContract_js_1.metaIdentity,
363
+ tenant: auditKeptByContract_js_1.metaIdentity,
364
+ });
365
+ /** What a tool returned, as `describedResult()` declared it: the data is content;
366
+ * its kinds, field and column names, counts and the library's static note stay. */
367
+ const boundSemantics = (0, auditBounding_js_1.shapeOf)({
368
+ af_semantics: auditBounding_js_1.bool,
369
+ series: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
370
+ t: auditBounding_js_1.charsMarker,
371
+ entity: auditBounding_js_1.charsMarker,
372
+ metric: auditBounding_js_1.str,
373
+ value: auditBounding_js_1.charsMarker,
374
+ })),
375
+ // An open record: `entity` and every other value is the data; the keys stay.
376
+ facts: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({ entity: auditBounding_js_1.charsMarker })),
377
+ edges: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({ from: auditBounding_js_1.charsMarker, to: auditBounding_js_1.charsMarker, kind: auditBounding_js_1.str })),
378
+ grain: (0, auditBounding_js_1.shapeOf)({
379
+ interval: auditBounding_js_1.str,
380
+ aggregation: auditBounding_js_1.str,
381
+ is_counter: auditBounding_js_1.bool,
382
+ collapsed: auditBounding_js_1.charsMarker,
383
+ }),
384
+ provenance: (0, auditBounding_js_1.shapeOf)({
385
+ measured_at: auditBounding_js_1.charsMarker,
386
+ age_seconds: auditBounding_js_1.num,
387
+ source: auditBounding_js_1.charsMarker,
388
+ source_export_date: auditBounding_js_1.charsMarker,
389
+ }),
390
+ period: (0, auditBounding_js_1.shapeOf)({ queried: boundInstants, held: boundHeld, read_at: auditBounding_js_1.charsMarker }),
391
+ resolved: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
392
+ argument: auditBounding_js_1.str,
393
+ id: auditBounding_js_1.charsMarker,
394
+ name: auditBounding_js_1.charsMarker,
395
+ aliases: (0, auditBounding_js_1.listOf)(auditBounding_js_1.charsMarker),
396
+ })),
397
+ // `null` says there is no next page; a cursor or page number is a value.
398
+ paging: (0, auditBounding_js_1.shapeOf)({ next: (0, auditBounding_js_1.nullOr)(auditBounding_js_1.charsMarker) }),
399
+ coverage: (0, auditBounding_js_1.shapeOf)({
400
+ checked: (0, auditBounding_js_1.listOf)(boundCoverageItem),
401
+ not_checked: (0, auditBounding_js_1.listOf)(boundCoverageItem),
402
+ cannot_cover: (0, auditBounding_js_1.listOf)(boundCoverageItem),
403
+ }),
404
+ not_covered: (0, auditBounding_js_1.listOf)(auditBounding_js_1.charsMarker),
405
+ clarify: (0, auditBounding_js_1.nullOr)((0, auditBounding_js_1.shapeOf)({ question: auditBounding_js_1.charsMarker, candidates: (0, auditBounding_js_1.listOf)(auditBounding_js_1.charsMarker) })),
406
+ render: (0, auditBounding_js_1.shapeOf)({
407
+ default: auditBounding_js_1.str,
408
+ columns: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
409
+ sort: auditBounding_js_1.str,
410
+ filter_note: auditBounding_js_1.charsMarker,
411
+ chart_hint: auditBounding_js_1.charsMarker,
412
+ }),
413
+ // "The static sentence. Never interpolated."
414
+ note: auditBounding_js_1.str,
415
+ });
416
+ /**
417
+ * The whole-event shapes as a `Map`, by event type — what `audit.ts` looks an
418
+ * event up in. An event's name is the emitter's to choose (`agent.emit()`
419
+ * takes any string), so it is never a key into a plain object: a name
420
+ * `Object.prototype` holds (`constructor`, `toString`, `__proto__`) finds no
421
+ * shape here, and that event is bounded as unknown — every field a marker.
422
+ */
423
+ function eventShapeTable(toolRan) {
424
+ return new Map(Object.entries(eventShapes(toolRan)));
425
+ }
426
+ exports.eventShapeTable = eventShapeTable;
427
+ /**
428
+ * The whole-event shapes, by event type. `toolRan` answers whether this
429
+ * strategy has seen a tool of that name run (`createToolRunTracker`): a
430
+ * `tryInsteadTool` names another tool, and that name is kept only then —
431
+ * otherwise it is the tool author's word for a tool this agent may not hold
432
+ * (`otel.ts` · `coverageAttrs`, the same rule).
433
+ */
434
+ function eventShapes(toolRan) {
435
+ return {
436
+ // ── The seven a tool, the model or the person writes into ──────────
437
+ 'agentfootprint.tools.absent': eventShape({
438
+ toolName: auditBounding_js_1.str,
439
+ toolCallId: auditBounding_js_1.str,
440
+ iteration: auditBounding_js_1.num,
441
+ lookedFor: auditBounding_js_1.charsMarker,
442
+ checked: (0, auditBounding_js_1.listOf)(boundCoverageItem),
443
+ notChecked: (0, auditBounding_js_1.listOf)(boundCoverageItem),
444
+ cannotCover: (0, auditBounding_js_1.listOf)(boundCoverageItem),
445
+ tryInstead: auditBounding_js_1.charsMarker,
446
+ tryInsteadTool: (0, auditBounding_js_1.shapeOf)({
447
+ tool: (0, auditKeptByContract_js_1.seenToolName)(toolRan),
448
+ why: auditBounding_js_1.charsMarker,
449
+ }),
450
+ provenance: boundProvenance,
451
+ period: boundPeriod,
452
+ composition: boundComposition,
453
+ lookedForRef: (0, auditBounding_js_1.shapeOf)({
454
+ resultId: auditBounding_js_1.str,
455
+ field: (0, auditBounding_js_1.oneOf)('lookedFor'),
456
+ }),
457
+ }),
458
+ 'agentfootprint.tools.coverage_declared': eventShape({
459
+ toolName: auditBounding_js_1.str,
460
+ toolCallId: auditBounding_js_1.str,
461
+ iteration: auditBounding_js_1.num,
462
+ checked: (0, auditBounding_js_1.listOf)(boundCoverageItem),
463
+ notChecked: (0, auditBounding_js_1.listOf)(boundCoverageItem),
464
+ cannotCover: (0, auditBounding_js_1.listOf)(boundCoverageItem),
465
+ period: boundPeriod,
466
+ inProgress: (0, auditBounding_js_1.listOf)(boundInProgressItem),
467
+ composition: boundComposition,
468
+ }),
469
+ 'agentfootprint.tools.semantics_declared': eventShape({
470
+ toolName: auditBounding_js_1.str,
471
+ toolCallId: auditBounding_js_1.str,
472
+ iteration: auditBounding_js_1.num,
473
+ semantics: boundSemantics,
474
+ }),
475
+ 'agentfootprint.agent.evidence_checked': eventShape({
476
+ iteration: auditBounding_js_1.num,
477
+ posture: (0, auditBounding_js_1.oneOf)('assist', 'guard', 'rails'),
478
+ candidates: auditBounding_js_1.num,
479
+ lookedUp: auditBounding_js_1.num,
480
+ unsupported: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
481
+ value: auditBounding_js_1.charsMarker,
482
+ shape: auditBounding_js_1.str,
483
+ region: (0, auditBounding_js_1.oneOf)('prose', 'code'),
484
+ })),
485
+ action: (0, auditBounding_js_1.oneOf)('flagged', 'grounded', 'refused', 'revision-asked'),
486
+ afterRevision: auditBounding_js_1.bool,
487
+ evidenceTruncated: auditBounding_js_1.bool,
488
+ carriedBy: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
489
+ toolCallId: auditBounding_js_1.str,
490
+ values: auditBounding_js_1.num,
491
+ only: auditBounding_js_1.num,
492
+ })),
493
+ stagedRefs: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
494
+ ref: auditBounding_js_1.str,
495
+ kind: auditBounding_js_1.str,
496
+ })),
497
+ spenderTools: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
498
+ // `from` names the operands — and a unit-scaled figure's source value.
499
+ computed: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
500
+ value: auditBounding_js_1.charsMarker,
501
+ shape: auditBounding_js_1.str,
502
+ derivation: auditBounding_js_1.str,
503
+ from: auditBounding_js_1.charsMarker,
504
+ })),
505
+ scripts: boundScriptsVerdict,
506
+ }),
507
+ 'agentfootprint.integrity.external_ground_used': eventShape({
508
+ toolName: auditBounding_js_1.str,
509
+ toolCallId: auditBounding_js_1.str,
510
+ path: auditBounding_js_1.str,
511
+ value: auditBounding_js_1.charsMarker,
512
+ source: auditBounding_js_1.str,
513
+ iteration: auditBounding_js_1.num,
514
+ }),
515
+ 'agentfootprint.map.engaged': eventShape({
516
+ mapId: auditBounding_js_1.str,
517
+ iteration: auditBounding_js_1.num,
518
+ by: (0, auditBounding_js_1.oneOf)('assumed', 'explicit', 'lexical', 'semantic', 'structural'),
519
+ witness: auditBounding_js_1.charsMarker,
520
+ reengaged: auditBounding_js_1.bool,
521
+ upgraded: auditBounding_js_1.bool,
522
+ foundedBy: (0, auditBounding_js_1.oneOf)('assumed', 'explicit', 'lexical', 'semantic', 'structural'),
523
+ tenantChanged: auditBounding_js_1.bool,
524
+ at: auditBounding_js_1.str,
525
+ }),
526
+ 'agentfootprint.skill.turn_routed': eventShape({
527
+ by: (0, auditBounding_js_1.oneOf)('continuity', 'decider', 'entry', 'intent', 'menu', 'none'),
528
+ from: auditBounding_js_1.str,
529
+ to: auditBounding_js_1.str,
530
+ scorer: auditBounding_js_1.str,
531
+ scores: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
532
+ id: auditBounding_js_1.str,
533
+ score: auditBounding_js_1.num,
534
+ relevance: auditBounding_js_1.num,
535
+ })),
536
+ runnerUp: (0, auditBounding_js_1.shapeOf)({
537
+ id: auditBounding_js_1.str,
538
+ gap: auditBounding_js_1.num,
539
+ }),
540
+ decisive: auditBounding_js_1.bool,
541
+ witness: boundWitness,
542
+ offered: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
543
+ stayOffered: auditBounding_js_1.bool,
544
+ policy: (0, auditBounding_js_1.shapeOf)({
545
+ nearTieMargin: auditBounding_js_1.num,
546
+ menuSize: auditBounding_js_1.num,
547
+ floor: auditBounding_js_1.num,
548
+ }),
549
+ window: auditBounding_js_1.num,
550
+ droppedResume: (0, auditBounding_js_1.shapeOf)({
551
+ id: auditBounding_js_1.str,
552
+ reason: (0, auditBounding_js_1.oneOf)('unknown-skill'),
553
+ }),
554
+ decider: (0, auditBounding_js_1.shapeOf)({
555
+ provider: auditBounding_js_1.str,
556
+ model: auditBounding_js_1.str,
557
+ picked: auditBounding_js_1.str,
558
+ }),
559
+ }),
560
+ // ── The same rule, everywhere else the run's words ride ────────────
561
+ 'agentfootprint.map.parked': eventShape({
562
+ mapId: auditBounding_js_1.str,
563
+ iteration: auditBounding_js_1.num,
564
+ by: (0, auditBounding_js_1.oneOf)('assumed', 'explicit', 'lexical', 'semantic', 'structural'),
565
+ idleCalls: auditBounding_js_1.num,
566
+ witness: auditBounding_js_1.charsMarker,
567
+ }),
568
+ // A guard's conditions are the engine's decision evidence (kept, see audit.ts).
569
+ 'agentfootprint.context.evaluated': eventShape({
570
+ iteration: auditBounding_js_1.num,
571
+ activeCount: auditBounding_js_1.num,
572
+ skippedCount: auditBounding_js_1.num,
573
+ evaluatedTotal: auditBounding_js_1.num,
574
+ activeIds: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
575
+ skippedDetails: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
576
+ id: auditBounding_js_1.str,
577
+ reason: (0, auditBounding_js_1.oneOf)('hidden', 'parked', 'predicate-threw', 'unknown-fact', 'unknown-trigger-kind'),
578
+ error: auditBounding_js_1.charsMarker,
579
+ })),
580
+ triggerKindCounts: (0, auditBounding_js_1.recordOf)(auditBounding_js_1.num),
581
+ // The catalog and the routing provenance are what the app declared.
582
+ skillCatalog: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
583
+ id: auditBounding_js_1.str,
584
+ description: auditBounding_js_1.str,
585
+ })),
586
+ routing: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
587
+ injectionId: auditBounding_js_1.str,
588
+ flavor: auditBounding_js_1.str,
589
+ via: auditBounding_js_1.str,
590
+ path: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({ label: auditBounding_js_1.str, branch: auditBounding_js_1.str })),
591
+ label: auditBounding_js_1.str,
592
+ from: auditBounding_js_1.str,
593
+ triggerKind: auditBounding_js_1.str,
594
+ tools: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
595
+ })),
596
+ cursorMove: (0, auditBounding_js_1.shapeOf)({
597
+ from: auditBounding_js_1.str,
598
+ to: auditBounding_js_1.str,
599
+ by: auditBounding_js_1.str,
600
+ offered: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
601
+ declinedOffer: auditBounding_js_1.bool,
602
+ witness: boundWitness,
603
+ guard: boundGuard,
604
+ guardsClosed: (0, auditBounding_js_1.listOf)(boundGuard),
605
+ reachable: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
606
+ }),
607
+ supersededIds: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
608
+ }),
609
+ 'agentfootprint.validation.args_invalid': eventShape({
610
+ toolName: auditBounding_js_1.str,
611
+ toolCallId: auditBounding_js_1.str,
612
+ iteration: auditBounding_js_1.num,
613
+ issues: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
614
+ path: auditBounding_js_1.str,
615
+ expected: auditBounding_js_1.str,
616
+ got: auditBounding_js_1.str,
617
+ value: auditBounding_js_1.charsMarker,
618
+ hint: auditBounding_js_1.str,
619
+ })),
620
+ enforced: auditBounding_js_1.bool,
621
+ }),
622
+ 'agentfootprint.agent.output_schema_validation_failed': eventShape({
623
+ message: auditBounding_js_1.charsMarker,
624
+ stage: (0, auditBounding_js_1.oneOf)('json-parse', 'schema-validate'),
625
+ path: auditBounding_js_1.str,
626
+ rawOutput: auditBounding_js_1.charsMarker,
627
+ draftWithheld: auditBounding_js_1.bool,
628
+ attempt: auditBounding_js_1.num,
629
+ cumulativeRetries: auditBounding_js_1.num,
630
+ }),
631
+ 'agentfootprint.resilience.output_fallback_triggered': eventShape({
632
+ stage: (0, auditBounding_js_1.oneOf)('json-parse', 'schema-validate'),
633
+ rawOutputPreview: auditBounding_js_1.charsMarker,
634
+ primaryErrorMessage: auditBounding_js_1.charsMarker,
635
+ retriesSpent: auditBounding_js_1.num,
636
+ }),
637
+ 'agentfootprint.resilience.output_canned_used': eventShape({
638
+ rawOutputPreview: auditBounding_js_1.charsMarker,
639
+ fallbackErrorMessage: auditBounding_js_1.charsMarker,
640
+ retriesSpent: auditBounding_js_1.num,
641
+ }),
642
+ 'agentfootprint.stream.tool_progress': eventShape({
643
+ toolCallId: auditBounding_js_1.str,
644
+ toolName: auditBounding_js_1.str,
645
+ iteration: auditBounding_js_1.num,
646
+ payload: auditBounding_js_1.keysMarker,
647
+ }),
648
+ 'agentfootprint.checkin.request': eventShape({
649
+ toolName: auditBounding_js_1.str,
650
+ toolCallId: auditBounding_js_1.str,
651
+ iteration: auditBounding_js_1.num,
652
+ request: auditBounding_js_1.keysMarker,
653
+ }),
654
+ 'agentfootprint.checkin.decision': eventShape({
655
+ toolName: auditBounding_js_1.str,
656
+ toolCallId: auditBounding_js_1.str,
657
+ iteration: auditBounding_js_1.num,
658
+ requestId: auditBounding_js_1.str,
659
+ approved: auditBounding_js_1.bool,
660
+ by: auditBounding_js_1.str,
661
+ note: auditBounding_js_1.charsMarker,
662
+ componentId: auditBounding_js_1.str,
663
+ }),
664
+ 'agentfootprint.middleware.decision': eventShape({
665
+ middleware: auditBounding_js_1.str,
666
+ moment: (0, auditBounding_js_1.oneOf)('after-tool', 'before-tool', 'input', 'output', 'window'),
667
+ at: (0, auditBounding_js_1.oneOf)('message', 'tool'),
668
+ phase: (0, auditBounding_js_1.oneOf)('input', 'output'),
669
+ toolName: auditBounding_js_1.str,
670
+ toolCallId: auditBounding_js_1.str,
671
+ iteration: auditBounding_js_1.num,
672
+ outcome: (0, auditBounding_js_1.oneOf)('allow', 'ask', 'deny'),
673
+ changed: auditBounding_js_1.bool,
674
+ why: auditBounding_js_1.charsMarker,
675
+ componentId: auditBounding_js_1.str,
676
+ }),
677
+ 'agentfootprint.skill.step_skipped': eventShape({
678
+ skillId: auditBounding_js_1.str,
679
+ // The step the app declared — its tool and note.
680
+ step: (0, auditBounding_js_1.shapeOf)({
681
+ index: auditBounding_js_1.num,
682
+ total: auditBounding_js_1.num,
683
+ tool: auditBounding_js_1.str,
684
+ note: auditBounding_js_1.str,
685
+ }),
686
+ reason: auditBounding_js_1.charsMarker,
687
+ policy: (0, auditBounding_js_1.oneOf)('advance', 'hold'),
688
+ iteration: auditBounding_js_1.num,
689
+ toolCallId: auditBounding_js_1.str,
690
+ }),
691
+ 'agentfootprint.stream.llm_start': eventShape({
692
+ iteration: auditBounding_js_1.num,
693
+ provider: auditBounding_js_1.str,
694
+ model: auditBounding_js_1.str,
695
+ systemPromptChars: auditBounding_js_1.num,
696
+ systemPromptText: auditBounding_js_1.charsMarker,
697
+ messagesCount: auditBounding_js_1.num,
698
+ toolsCount: auditBounding_js_1.num,
699
+ // The catalog the model saw: names and the descriptions the tools declared.
700
+ tools: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
701
+ name: auditBounding_js_1.str,
702
+ description: auditBounding_js_1.str,
703
+ })),
704
+ estimatedPromptTokens: auditBounding_js_1.num,
705
+ temperature: auditBounding_js_1.num,
706
+ providerRequestRef: auditBounding_js_1.str,
707
+ brain: (0, auditBounding_js_1.shapeOf)({
708
+ via: (0, auditBounding_js_1.oneOf)('escalation', 'skill'),
709
+ skillId: auditBounding_js_1.str,
710
+ }),
711
+ }),
712
+ 'agentfootprint.credential.failed': eventShape({
713
+ service: auditBounding_js_1.str,
714
+ reason: auditBounding_js_1.charsMarker,
715
+ tool: auditBounding_js_1.str,
716
+ errorClass: auditBounding_js_1.str,
717
+ toolCallId: auditBounding_js_1.str,
718
+ iteration: auditBounding_js_1.num,
719
+ }),
720
+ 'agentfootprint.fallback.triggered': eventShape({
721
+ kind: (0, auditBounding_js_1.oneOf)('provider', 'skill', 'tool'),
722
+ primary: auditBounding_js_1.str,
723
+ fallback: auditBounding_js_1.str,
724
+ reason: auditBounding_js_1.charsMarker,
725
+ }),
726
+ 'agentfootprint.memory.retrieved': eventShape({
727
+ strategy: auditBounding_js_1.str,
728
+ queryHash: auditBounding_js_1.str,
729
+ k: auditBounding_js_1.num,
730
+ threshold: auditBounding_js_1.num,
731
+ maxChars: auditBounding_js_1.num,
732
+ charsUsed: auditBounding_js_1.num,
733
+ embedderId: auditBounding_js_1.str,
734
+ dimensions: auditBounding_js_1.num,
735
+ consideredCount: auditBounding_js_1.num,
736
+ admittedCount: auditBounding_js_1.num,
737
+ rejectedCount: auditBounding_js_1.num,
738
+ candidates: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
739
+ id: auditBounding_js_1.str,
740
+ score: auditBounding_js_1.num,
741
+ rank: auditBounding_js_1.num,
742
+ admitted: auditBounding_js_1.bool,
743
+ reason: (0, auditBounding_js_1.oneOf)('below-threshold', 'over-budget', 'over-char-budget', 'over-max-entries'),
744
+ docUri: auditBounding_js_1.str,
745
+ page: auditBounding_js_1.num,
746
+ heading: auditBounding_js_1.charsMarker,
747
+ })),
748
+ candidatesComplete: auditBounding_js_1.bool,
749
+ candidatesOmittedReason: auditBounding_js_1.str,
750
+ corpusEmpty: auditBounding_js_1.bool,
751
+ namespace: auditBounding_js_1.str,
752
+ }),
753
+ 'agentfootprint.integrity.context_error': eventShape({
754
+ kind: (0, auditBounding_js_1.oneOf)('column-type-mismatch', 'dangling-reference', 'duplicate-execution', 'empty-lookup', 'invariant-violation', 'missing-column', 'prior-turn-evidence', 'unsupported-argument', 'unsupported-claim'),
755
+ seam: (0, auditBounding_js_1.oneOf)('choice', 'claim', 'compose', 'wire', 'write'),
756
+ subjects: (0, auditBounding_js_1.listOf)(boundSubject),
757
+ witnesses: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
758
+ subject: boundSubject,
759
+ predicate: auditBounding_js_1.str,
760
+ value: auditBounding_js_1.charsMarker,
761
+ epoch: auditBounding_js_1.num,
762
+ stratum: (0, auditBounding_js_1.oneOf)('asserted', 'quoted'),
763
+ provenance: auditBounding_js_1.charsMarker,
764
+ runtimeStageId: auditBounding_js_1.str,
765
+ synthetic: auditBounding_js_1.bool,
766
+ })),
767
+ predicate: auditBounding_js_1.str,
768
+ epoch: auditBounding_js_1.num,
769
+ synthetic: auditBounding_js_1.bool,
770
+ advisory: auditBounding_js_1.bool,
771
+ message: auditBounding_js_1.charsMarker,
772
+ iteration: auditBounding_js_1.num,
773
+ }),
774
+ 'agentfootprint.tools.effect': eventShape({
775
+ kind: (0, auditBounding_js_1.oneOf)('propose-transition', 'require-instruction'),
776
+ outcome: (0, auditBounding_js_1.oneOf)('accepted', 'refused', 'superseded'),
777
+ stay: auditBounding_js_1.bool,
778
+ toolName: auditBounding_js_1.str,
779
+ toolCallId: auditBounding_js_1.str,
780
+ iteration: auditBounding_js_1.num,
781
+ targetSkillId: auditBounding_js_1.str,
782
+ reason: auditBounding_js_1.charsMarker,
783
+ instructionId: auditBounding_js_1.str,
784
+ deliveryLease: (0, auditBounding_js_1.oneOf)('next-call', 'until-skill-exit'),
785
+ refusalReason: auditBounding_js_1.str,
786
+ supersededBy: (0, auditBounding_js_1.oneOf)('earlier-proposal'),
787
+ }),
788
+ // `reason` is `pauseData.reason` — the same words `questionPayload` hides.
789
+ 'agentfootprint.pause.request': eventShape({
790
+ // The library's own pause sentence stays; a pause's own reason is its data.
791
+ reason: (0, auditBounding_js_1.oneOf)(FIXED_PAUSE_REASON),
792
+ questionPayload: auditBounding_js_1.keysMarker,
793
+ }),
794
+ 'agentfootprint.artifacts.minted': eventShape({
795
+ ref: auditBounding_js_1.str,
796
+ kind: auditBounding_js_1.str,
797
+ mediaType: auditBounding_js_1.str,
798
+ bytes: auditBounding_js_1.num,
799
+ label: auditBounding_js_1.charsMarker,
800
+ digest: auditBounding_js_1.str,
801
+ expiresAt: auditBounding_js_1.num,
802
+ origin: (0, auditBounding_js_1.shapeOf)({
803
+ runId: auditBounding_js_1.str,
804
+ toolCallId: auditBounding_js_1.str,
805
+ }),
806
+ parentRefs: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
807
+ // The column, zone and interval the rows declare.
808
+ timeAxis: (0, auditBounding_js_1.shapeOf)({
809
+ column: auditBounding_js_1.str,
810
+ unit: (0, auditBounding_js_1.oneOf)('epoch-ms', 'epoch-s', 'iso'),
811
+ zone: auditBounding_js_1.str,
812
+ interval: auditBounding_js_1.str,
813
+ // One aggregate for every column, or one per column.
814
+ aggregate: (0, auditBounding_js_1.either)((0, auditBounding_js_1.oneOf)('avg', 'count', 'last', 'max', 'min', 'raw', 'sum'), (0, auditBounding_js_1.recordOf)((0, auditBounding_js_1.oneOf)('avg', 'count', 'last', 'max', 'min', 'sum'))),
815
+ }),
816
+ tool: auditBounding_js_1.str,
817
+ }),
818
+ 'agentfootprint.artifacts.presented': eventShape({
819
+ ref: auditBounding_js_1.str,
820
+ as: auditBounding_js_1.str,
821
+ snapshot: (0, auditBounding_js_1.shapeOf)({
822
+ kind: auditBounding_js_1.str,
823
+ mediaType: auditBounding_js_1.str,
824
+ bytes: auditBounding_js_1.num,
825
+ label: auditBounding_js_1.charsMarker,
826
+ }),
827
+ toolCallId: auditBounding_js_1.str,
828
+ iteration: auditBounding_js_1.num,
829
+ }),
830
+ 'agentfootprint.artifacts.refused': eventShape({
831
+ op: (0, auditBounding_js_1.oneOf)('delete', 'dispatch', 'get', 'head', 'list', 'put'),
832
+ reason: (0, auditBounding_js_1.oneOf)('digest-mismatch', 'invalid-input', 'kind-mismatch', 'missing-or-expired', 'no-store', 'unknown-parent'),
833
+ ref: auditBounding_js_1.str,
834
+ detail: auditBounding_js_1.charsMarker,
835
+ tool: auditBounding_js_1.str,
836
+ }),
837
+ 'agentfootprint.reliability.fail_fast': eventShape({
838
+ phase: (0, auditBounding_js_1.oneOf)('post-decide', 'pre-check'),
839
+ kind: auditBounding_js_1.str,
840
+ attempt: auditBounding_js_1.num,
841
+ label: auditBounding_js_1.str,
842
+ reason: auditBounding_js_1.charsMarker,
843
+ providerUsed: auditBounding_js_1.str,
844
+ errorKind: auditBounding_js_1.str,
845
+ errorMessage: auditBounding_js_1.charsMarker,
846
+ }),
847
+ 'agentfootprint.agent.handoff': eventShape({
848
+ fromAgentId: auditBounding_js_1.str,
849
+ toAgentId: auditBounding_js_1.str,
850
+ reason: auditBounding_js_1.charsMarker,
851
+ viaProtocol: (0, auditBounding_js_1.oneOf)('http', 'mcp', 'native'),
852
+ }),
853
+ // A policy's `reason` is its telemetry tag; its `rationale` is prose per decision.
854
+ 'agentfootprint.permission.check': eventShape({
855
+ capability: (0, auditBounding_js_1.oneOf)('external_net', 'memory_read', 'memory_write', 'skill_read', 'tool_call', 'user_data'),
856
+ actor: auditBounding_js_1.str,
857
+ target: auditBounding_js_1.str,
858
+ result: (0, auditBounding_js_1.oneOf)('allow', 'deny', 'gate_open', 'halt'),
859
+ policyEngine: (0, auditBounding_js_1.oneOf)('cerbos', 'custom', 'opa'),
860
+ policyRuleId: auditBounding_js_1.str,
861
+ rationale: auditBounding_js_1.charsMarker,
862
+ reason: auditKeptByContract_js_1.policyReasonTag,
863
+ toolCallId: auditBounding_js_1.str,
864
+ iteration: auditBounding_js_1.num,
865
+ }),
866
+ // `tellLLM` is the tool result the model read in place of the call.
867
+ 'agentfootprint.permission.halt': eventShape({
868
+ checkerId: auditBounding_js_1.str,
869
+ target: auditBounding_js_1.str,
870
+ reason: auditKeptByContract_js_1.policyReasonTag,
871
+ tellLLM: auditBounding_js_1.charsMarker,
872
+ iteration: auditBounding_js_1.num,
873
+ sequenceLength: auditBounding_js_1.num,
874
+ toolCallId: auditBounding_js_1.str,
875
+ }),
876
+ // A router's `{ reason }` is the routing model's own words; `decide()`
877
+ // evidence is the engine's, kept (see audit.ts).
878
+ 'agentfootprint.composition.route_decided': eventShape({
879
+ conditionalId: auditBounding_js_1.str,
880
+ chosen: auditBounding_js_1.str,
881
+ rationale: auditBounding_js_1.str,
882
+ evidence: auditKeptByContract_js_1.routeEvidence,
883
+ }),
884
+ // ── Every other event: structure, and the fields bounded whole ─────
885
+ 'agentfootprint.composition.enter': eventShape({
886
+ kind: (0, auditBounding_js_1.oneOf)('Conditional', 'Loop', 'Parallel', 'Sequence'),
887
+ id: auditBounding_js_1.str,
888
+ name: auditBounding_js_1.str,
889
+ childCount: auditBounding_js_1.num,
890
+ }),
891
+ 'agentfootprint.composition.exit': eventShape({
892
+ kind: (0, auditBounding_js_1.oneOf)('Conditional', 'Loop', 'Parallel', 'Sequence'),
893
+ id: auditBounding_js_1.str,
894
+ name: auditBounding_js_1.str,
895
+ status: (0, auditBounding_js_1.oneOf)('break', 'budget_exhausted', 'err', 'ok'),
896
+ durationMs: auditBounding_js_1.num,
897
+ }),
898
+ 'agentfootprint.composition.fork_start': eventShape({
899
+ parentId: auditBounding_js_1.str,
900
+ branches: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
901
+ id: auditBounding_js_1.str,
902
+ name: auditBounding_js_1.str,
903
+ })),
904
+ }),
905
+ 'agentfootprint.composition.branch_complete': eventShape({
906
+ parentId: auditBounding_js_1.str,
907
+ branchId: auditBounding_js_1.str,
908
+ status: (0, auditBounding_js_1.oneOf)('err', 'ok'),
909
+ durationMs: auditBounding_js_1.num,
910
+ }),
911
+ 'agentfootprint.composition.merge_end': eventShape({
912
+ parentId: auditBounding_js_1.str,
913
+ strategy: (0, auditBounding_js_1.oneOf)('fn', 'llm', 'outcomes-fn'),
914
+ resultSummary: auditBounding_js_1.charsMarker,
915
+ mergedBranchCount: auditBounding_js_1.num,
916
+ totalBranchCount: auditBounding_js_1.num,
917
+ }),
918
+ 'agentfootprint.composition.iteration_start': eventShape({
919
+ loopId: auditBounding_js_1.str,
920
+ iteration: auditBounding_js_1.num,
921
+ }),
922
+ 'agentfootprint.composition.iteration_exit': eventShape({
923
+ loopId: auditBounding_js_1.str,
924
+ iteration: auditBounding_js_1.num,
925
+ reason: (0, auditBounding_js_1.oneOf)('body_complete', 'break', 'budget', 'guard_false'),
926
+ }),
927
+ 'agentfootprint.agent.turn_start': eventShape({
928
+ turnIndex: auditBounding_js_1.num,
929
+ userPrompt: auditBounding_js_1.charsMarker,
930
+ }),
931
+ 'agentfootprint.agent.turn_end': eventShape({
932
+ turnIndex: auditBounding_js_1.num,
933
+ finalContent: auditBounding_js_1.charsMarker,
934
+ totalInputTokens: auditBounding_js_1.num,
935
+ totalOutputTokens: auditBounding_js_1.num,
936
+ iterationCount: auditBounding_js_1.num,
937
+ durationMs: auditBounding_js_1.num,
938
+ stoppedEarly: (0, auditBounding_js_1.shapeOf)({
939
+ reason: (0, auditBounding_js_1.oneOf)('cost-budget', 'max-iterations'),
940
+ iteration: auditBounding_js_1.num,
941
+ pendingToolCalls: auditBounding_js_1.num,
942
+ wrappedUp: auditBounding_js_1.bool,
943
+ }),
944
+ answerCoverage: exports.boundAnswerCoverage,
945
+ answerAssessment: boundAnswerAssessment,
946
+ standingLineNames: (0, auditBounding_js_1.recordOf)(auditBounding_js_1.str),
947
+ answerNegatives: exports.boundAnswerNegatives,
948
+ scripts: exports.boundScripts,
949
+ refused: (0, auditBounding_js_1.shapeOf)({
950
+ by: (0, auditBounding_js_1.oneOf)('evidence-rails'),
951
+ }),
952
+ }),
953
+ 'agentfootprint.agent.iteration_start': eventShape({
954
+ turnIndex: auditBounding_js_1.num,
955
+ iterIndex: auditBounding_js_1.num,
956
+ }),
957
+ 'agentfootprint.agent.iteration_end': eventShape({
958
+ turnIndex: auditBounding_js_1.num,
959
+ iterIndex: auditBounding_js_1.num,
960
+ toolCallCount: auditBounding_js_1.num,
961
+ history: auditBounding_js_1.messagesMarker,
962
+ }),
963
+ 'agentfootprint.agent.route_decided': eventShape({
964
+ turnIndex: auditBounding_js_1.num,
965
+ iterIndex: auditBounding_js_1.num,
966
+ chosen: (0, auditBounding_js_1.oneOf)('evidence-recheck', 'final', 'negative-recheck', 'output-retry', 'step-nudge', 'tool-calls', 'wrap-up'),
967
+ // A fixed sentence, or one the library composes (a count, a skill's name).
968
+ rationale: auditBounding_js_1.str,
969
+ }),
970
+ 'agentfootprint.agent.output_contract_unmet': eventShape({
971
+ stage: (0, auditBounding_js_1.oneOf)('json-parse', 'schema-validate'),
972
+ error: auditBounding_js_1.charsMarker,
973
+ path: auditBounding_js_1.str,
974
+ attempts: auditBounding_js_1.num,
975
+ retriesSpent: auditBounding_js_1.num,
976
+ fallbackConfigured: auditBounding_js_1.bool,
977
+ iteration: auditBounding_js_1.num,
978
+ brokenBy: auditBounding_js_1.str,
979
+ }),
980
+ 'agentfootprint.agent.output_schema_retry': eventShape({
981
+ attempt: auditBounding_js_1.num,
982
+ retriesRemaining: auditBounding_js_1.num,
983
+ iteration: auditBounding_js_1.num,
984
+ stage: (0, auditBounding_js_1.oneOf)('json-parse', 'schema-validate'),
985
+ error: auditBounding_js_1.charsMarker,
986
+ path: auditBounding_js_1.str,
987
+ correctiveMessageHash: auditBounding_js_1.str,
988
+ }),
989
+ 'agentfootprint.agent.grounding_nudged': eventShape({
990
+ iteration: auditBounding_js_1.num,
991
+ refs: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
992
+ ref: auditBounding_js_1.str,
993
+ kind: auditBounding_js_1.str,
994
+ })),
995
+ refsOmitted: auditBounding_js_1.num,
996
+ tools: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
997
+ }),
998
+ 'agentfootprint.agent.run_configured': eventShape({
999
+ agentId: auditBounding_js_1.str,
1000
+ llm: (0, auditBounding_js_1.shapeOf)({
1001
+ provider: auditBounding_js_1.str,
1002
+ model: auditBounding_js_1.str,
1003
+ modelOverrides: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.oneOf)('configure', 'skill-brains')),
1004
+ }),
1005
+ cache: (0, auditBounding_js_1.shapeOf)({
1006
+ requested: (0, auditBounding_js_1.oneOf)('default', 'explicit'),
1007
+ strategy: (0, auditBounding_js_1.oneOf)('none'),
1008
+ status: (0, auditBounding_js_1.oneOf)('not-applicable'),
1009
+ }),
1010
+ reactMode: (0, auditBounding_js_1.oneOf)('classic', 'dynamic', 'dynamic-grouped'),
1011
+ memories: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
1012
+ id: auditBounding_js_1.str,
1013
+ type: (0, auditBounding_js_1.oneOf)('causal', 'episodic', 'narrative', 'semantic'),
1014
+ strategy: (0, auditBounding_js_1.oneOf)('budget', 'decay', 'extract', 'hybrid', 'summarize', 'topK', 'window'),
1015
+ retrieval: auditBounding_js_1.str,
1016
+ embedderId: auditBounding_js_1.str,
1017
+ flavor: (0, auditBounding_js_1.oneOf)('memory', 'rag'),
1018
+ })),
1019
+ window: auditBounding_js_1.str,
1020
+ skillGraph: (0, auditBounding_js_1.shapeOf)({
1021
+ routing: (0, auditBounding_js_1.oneOf)('assist', 'guard', 'rails'),
1022
+ continuity: (0, auditBounding_js_1.oneOf)('conversation', 'turn'),
1023
+ scorer: auditBounding_js_1.str,
1024
+ }),
1025
+ evidenceGate: (0, auditBounding_js_1.oneOf)('assist', 'guard', 'rails'),
1026
+ artifacts: (0, auditBounding_js_1.shapeOf)({
1027
+ placement: auditBounding_js_1.bool,
1028
+ recordings: auditBounding_js_1.bool,
1029
+ }),
1030
+ recipes: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
1031
+ id: auditBounding_js_1.str,
1032
+ version: auditBounding_js_1.str,
1033
+ })),
1034
+ }),
1035
+ 'agentfootprint.agent.thinking_parse_failed': eventShape({
1036
+ providerName: auditBounding_js_1.str,
1037
+ subflowId: auditBounding_js_1.str,
1038
+ error: auditBounding_js_1.charsMarker,
1039
+ errorName: auditBounding_js_1.str,
1040
+ iteration: auditBounding_js_1.num,
1041
+ }),
1042
+ 'agentfootprint.agent.thinking_omitted': eventShape({
1043
+ providerName: auditBounding_js_1.str,
1044
+ model: auditBounding_js_1.str,
1045
+ messageIndex: auditBounding_js_1.num,
1046
+ blockIndex: auditBounding_js_1.num,
1047
+ reason: (0, auditBounding_js_1.oneOf)('content-changed', 'missing-signature', 'prefix-changed', 'sequence-changed', 'thinking-retired'),
1048
+ phase: (0, auditBounding_js_1.oneOf)('prepared'),
1049
+ }),
1050
+ 'agentfootprint.agent.budget_exhausted': eventShape({
1051
+ reason: (0, auditBounding_js_1.oneOf)('cost-budget', 'max-iterations'),
1052
+ iteration: auditBounding_js_1.num,
1053
+ limit: auditBounding_js_1.num,
1054
+ pendingToolCalls: auditBounding_js_1.num,
1055
+ action: (0, auditBounding_js_1.oneOf)('cut-short', 'wrapped-up'),
1056
+ }),
1057
+ 'agentfootprint.stream.llm_end': eventShape({
1058
+ iteration: auditBounding_js_1.num,
1059
+ content: auditBounding_js_1.charsMarker,
1060
+ contentWithheld: auditBounding_js_1.bool,
1061
+ toolCallCount: auditBounding_js_1.num,
1062
+ // A provider's counts. Its usage object can carry more than these (structural
1063
+ // typing lets it): a child the type does not declare is a marker.
1064
+ usage: (0, auditBounding_js_1.shapeOf)({
1065
+ input: auditBounding_js_1.num,
1066
+ output: auditBounding_js_1.num,
1067
+ cacheRead: auditBounding_js_1.num,
1068
+ cacheWrite: auditBounding_js_1.num,
1069
+ thinking: auditBounding_js_1.num,
1070
+ }),
1071
+ stopReason: auditBounding_js_1.str,
1072
+ durationMs: auditBounding_js_1.num,
1073
+ providerResponseRef: auditBounding_js_1.str,
1074
+ }),
1075
+ 'agentfootprint.stream.token': eventShape({
1076
+ iteration: auditBounding_js_1.num,
1077
+ tokenIndex: auditBounding_js_1.num,
1078
+ content: auditBounding_js_1.charsMarker,
1079
+ }),
1080
+ 'agentfootprint.stream.tool_start': eventShape({
1081
+ toolName: auditBounding_js_1.str,
1082
+ toolCallId: auditBounding_js_1.str,
1083
+ args: auditBounding_js_1.keysMarker,
1084
+ parallelCount: auditBounding_js_1.num,
1085
+ protocol: (0, auditBounding_js_1.oneOf)('http', 'mcp', 'native', 'python-fn'),
1086
+ notDispatched: (0, auditBounding_js_1.shapeOf)({
1087
+ pausedCall: (0, auditBounding_js_1.shapeOf)({
1088
+ toolCallId: auditBounding_js_1.str,
1089
+ toolName: auditBounding_js_1.str,
1090
+ }),
1091
+ }),
1092
+ }),
1093
+ 'agentfootprint.stream.tool_end': eventShape({
1094
+ toolCallId: auditBounding_js_1.str,
1095
+ result: auditBounding_js_1.typeMarker,
1096
+ error: auditBounding_js_1.bool,
1097
+ durationMs: auditBounding_js_1.num,
1098
+ status: (0, auditBounding_js_1.oneOf)('absent', 'denied', 'failure', 'invalid', 'partial', 'pending', 'success'),
1099
+ notDispatched: (0, auditBounding_js_1.shapeOf)({
1100
+ pausedCall: (0, auditBounding_js_1.shapeOf)({
1101
+ toolCallId: auditBounding_js_1.str,
1102
+ toolName: auditBounding_js_1.str,
1103
+ }),
1104
+ }),
1105
+ modelResult: auditBounding_js_1.typeMarker,
1106
+ changedArgKeys: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
1107
+ notExecuted: auditBounding_js_1.bool,
1108
+ }),
1109
+ 'agentfootprint.stream.thinking_delta': eventShape({
1110
+ iteration: auditBounding_js_1.num,
1111
+ tokenIndex: auditBounding_js_1.num,
1112
+ content: auditBounding_js_1.charsMarker,
1113
+ }),
1114
+ 'agentfootprint.stream.thinking_end': eventShape({
1115
+ iteration: auditBounding_js_1.num,
1116
+ blockCount: auditBounding_js_1.num,
1117
+ totalChars: auditBounding_js_1.num,
1118
+ tokens: auditBounding_js_1.num,
1119
+ blocks: auditBounding_js_1.blocksMarker,
1120
+ }),
1121
+ 'agentfootprint.context.injected': eventShape({
1122
+ contentSummary: auditBounding_js_1.charsMarker,
1123
+ contentHash: auditBounding_js_1.str,
1124
+ rawContent: auditBounding_js_1.charsMarker,
1125
+ slot: (0, auditBounding_js_1.oneOf)('messages', 'system-prompt', 'tools'),
1126
+ asRole: (0, auditBounding_js_1.oneOf)('assistant', 'system', 'tool', 'user'),
1127
+ asRecency: (0, auditBounding_js_1.oneOf)('earlier', 'latest'),
1128
+ position: auditBounding_js_1.num,
1129
+ sectionTag: auditBounding_js_1.str,
1130
+ source: (0, auditBounding_js_1.oneOf)('assistant', 'base', 'custom', 'evidence-recovery', 'fact', 'findings', 'instructions', 'memory', 'ontology', 'rag', 'registry', 'skill', 'steering', 'tool-result', 'user'),
1131
+ sourceId: auditBounding_js_1.str,
1132
+ upstreamRef: auditBounding_js_1.str,
1133
+ reason: auditBounding_js_1.str,
1134
+ retrievalScore: auditBounding_js_1.num,
1135
+ rankPosition: auditBounding_js_1.num,
1136
+ threshold: auditBounding_js_1.num,
1137
+ budgetSpent: (0, auditBounding_js_1.shapeOf)({
1138
+ tokens: auditBounding_js_1.num,
1139
+ fractionOfCap: auditBounding_js_1.num,
1140
+ }),
1141
+ expiresAfter: (0, auditBounding_js_1.oneOf)('iteration', 'persistent', 'run', 'turn'),
1142
+ }),
1143
+ 'agentfootprint.context.evicted': eventShape({
1144
+ slot: (0, auditBounding_js_1.oneOf)('messages', 'system-prompt', 'tools'),
1145
+ contentHash: auditBounding_js_1.str,
1146
+ reason: (0, auditBounding_js_1.oneOf)('budget', 'low_score', 'policy', 'stale', 'user_revoked'),
1147
+ survivalMs: auditBounding_js_1.num,
1148
+ }),
1149
+ 'agentfootprint.context.slot_composed': eventShape({
1150
+ slot: (0, auditBounding_js_1.oneOf)('messages', 'system-prompt', 'tools'),
1151
+ iteration: auditBounding_js_1.num,
1152
+ budget: (0, auditBounding_js_1.shapeOf)({
1153
+ cap: auditBounding_js_1.num,
1154
+ used: auditBounding_js_1.num,
1155
+ headroomChars: auditBounding_js_1.num,
1156
+ }),
1157
+ sourceBreakdown: boundSourceBreakdown,
1158
+ orderingStrategy: auditBounding_js_1.str,
1159
+ droppedCount: auditBounding_js_1.num,
1160
+ droppedSummaries: auditBounding_js_1.summariesMarker,
1161
+ }),
1162
+ 'agentfootprint.context.budget_pressure': eventShape({
1163
+ slot: (0, auditBounding_js_1.oneOf)('messages', 'system-prompt', 'tools'),
1164
+ overflowBy: auditBounding_js_1.num,
1165
+ planAction: (0, auditBounding_js_1.oneOf)('abort', 'evict', 'none', 'summarize'),
1166
+ unit: (0, auditBounding_js_1.oneOf)('chars', 'tokens'),
1167
+ cap: auditBounding_js_1.num,
1168
+ projected: auditBounding_js_1.num,
1169
+ }),
1170
+ 'agentfootprint.memory.strategy_applied': eventShape({
1171
+ strategyId: auditBounding_js_1.str,
1172
+ strategyKind: (0, auditBounding_js_1.oneOf)('fact-extraction', 'hybrid', 'semantic', 'sliding-window', 'summarizing'),
1173
+ reason: auditBounding_js_1.str,
1174
+ scoreEvidence: auditBounding_js_1.keysMarker,
1175
+ inputMemoryCount: auditBounding_js_1.num,
1176
+ outputMemoryCount: auditBounding_js_1.num,
1177
+ droppedIds: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
1178
+ addedIds: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
1179
+ }),
1180
+ 'agentfootprint.memory.attached': eventShape({
1181
+ memoryId: auditBounding_js_1.str,
1182
+ contentSummary: auditBounding_js_1.charsMarker,
1183
+ score: auditBounding_js_1.num,
1184
+ rank: auditBounding_js_1.num,
1185
+ source: (0, auditBounding_js_1.oneOf)('auto-extract', 'manual', 'store'),
1186
+ retriever: (0, auditBounding_js_1.oneOf)('chroma', 'custom', 'pinecone', 'qdrant', 'weaviate'),
1187
+ }),
1188
+ 'agentfootprint.memory.detached': eventShape({
1189
+ memoryId: auditBounding_js_1.str,
1190
+ reason: (0, auditBounding_js_1.oneOf)('budget', 'policy', 'score_low', 'stale'),
1191
+ }),
1192
+ 'agentfootprint.memory.written': eventShape({
1193
+ memoryId: auditBounding_js_1.str,
1194
+ contentSummary: auditBounding_js_1.charsMarker,
1195
+ source: (0, auditBounding_js_1.oneOf)('auto', 'manual'),
1196
+ actor: auditBounding_js_1.str,
1197
+ }),
1198
+ 'agentfootprint.tools.offered': eventShape({
1199
+ availableIds: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
1200
+ withheldIds: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
1201
+ withheldReasons: (0, auditBounding_js_1.recordOf)((0, auditBounding_js_1.oneOf)('cost_guard', 'gated', 'permission', 'skill_inactive')),
1202
+ reason: auditKeptByContract_js_1.appReasonWord,
1203
+ }),
1204
+ 'agentfootprint.tools.activated': eventShape({
1205
+ toolId: auditBounding_js_1.str,
1206
+ reason: (0, auditBounding_js_1.oneOf)('autoActivate', 'permission_granted', 'skill_activated'),
1207
+ source: auditBounding_js_1.str,
1208
+ }),
1209
+ 'agentfootprint.tools.deactivated': eventShape({
1210
+ toolId: auditBounding_js_1.str,
1211
+ reason: (0, auditBounding_js_1.oneOf)('permission_revoked', 'skill_deactivated'),
1212
+ }),
1213
+ 'agentfootprint.tools.discovery_started': eventShape({
1214
+ providerId: auditBounding_js_1.str,
1215
+ iteration: auditBounding_js_1.num,
1216
+ }),
1217
+ 'agentfootprint.tools.discovery_completed': eventShape({
1218
+ providerId: auditBounding_js_1.str,
1219
+ iteration: auditBounding_js_1.num,
1220
+ durationMs: auditBounding_js_1.num,
1221
+ toolCount: auditBounding_js_1.num,
1222
+ }),
1223
+ 'agentfootprint.tools.discovery_failed': eventShape({
1224
+ providerId: auditBounding_js_1.str,
1225
+ error: auditBounding_js_1.charsMarker,
1226
+ errorName: auditBounding_js_1.str,
1227
+ iteration: auditBounding_js_1.num,
1228
+ durationMs: auditBounding_js_1.num,
1229
+ }),
1230
+ 'agentfootprint.tools.shadowed': eventShape({
1231
+ toolName: auditBounding_js_1.str,
1232
+ iteration: auditBounding_js_1.num,
1233
+ schemaFrom: (0, auditBounding_js_1.oneOf)('framework', 'provider', 'registry', 'skill'),
1234
+ schemaFromId: auditBounding_js_1.str,
1235
+ dispatchTo: (0, auditBounding_js_1.oneOf)('framework', 'provider', 'registry', 'skill'),
1236
+ dispatchToId: auditBounding_js_1.str,
1237
+ }),
1238
+ 'agentfootprint.tools.claim_swallowed': eventShape({
1239
+ toolName: auditBounding_js_1.str,
1240
+ iteration: auditBounding_js_1.num,
1241
+ lostBy: (0, auditBounding_js_1.oneOf)('framework', 'provider', 'registry', 'skill'),
1242
+ lostById: auditBounding_js_1.str,
1243
+ wonBy: (0, auditBounding_js_1.oneOf)('framework', 'provider', 'registry', 'skill'),
1244
+ wonById: auditBounding_js_1.str,
1245
+ }),
1246
+ 'agentfootprint.tools.answered_off_wire': eventShape({
1247
+ toolName: auditBounding_js_1.str,
1248
+ toolCallId: auditBounding_js_1.str,
1249
+ iteration: auditBounding_js_1.num,
1250
+ answeredBy: (0, auditBounding_js_1.oneOf)('framework', 'provider', 'registry', 'skill'),
1251
+ answeredById: auditBounding_js_1.str,
1252
+ }),
1253
+ 'agentfootprint.tools.session_started': eventShape({
1254
+ tool: auditBounding_js_1.str,
1255
+ scope: (0, auditBounding_js_1.oneOf)('call', 'run', 'session', 'shutdown'),
1256
+ keyHash: auditBounding_js_1.str,
1257
+ runnerId: auditBounding_js_1.str,
1258
+ label: auditBounding_js_1.str,
1259
+ }),
1260
+ 'agentfootprint.tools.session_reused': eventShape({
1261
+ calls: auditBounding_js_1.num,
1262
+ tool: auditBounding_js_1.str,
1263
+ scope: (0, auditBounding_js_1.oneOf)('call', 'run', 'session', 'shutdown'),
1264
+ keyHash: auditBounding_js_1.str,
1265
+ runnerId: auditBounding_js_1.str,
1266
+ label: auditBounding_js_1.str,
1267
+ }),
1268
+ 'agentfootprint.tools.session_closed': eventShape({
1269
+ reason: (0, auditBounding_js_1.oneOf)('call-end', 'evicted', 'idle', 'run-end', 'session-end', 'shutdown'),
1270
+ durationMs: auditBounding_js_1.num,
1271
+ tool: auditBounding_js_1.str,
1272
+ scope: (0, auditBounding_js_1.oneOf)('call', 'run', 'session', 'shutdown'),
1273
+ keyHash: auditBounding_js_1.str,
1274
+ runnerId: auditBounding_js_1.str,
1275
+ label: auditBounding_js_1.str,
1276
+ }),
1277
+ 'agentfootprint.tools.result_refused': eventShape({
1278
+ toolName: auditBounding_js_1.str,
1279
+ toolCallId: auditBounding_js_1.str,
1280
+ iteration: auditBounding_js_1.num,
1281
+ sizeChars: auditBounding_js_1.num,
1282
+ maxChars: auditBounding_js_1.num,
1283
+ narrowBy: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
1284
+ declaredStatus: (0, auditBounding_js_1.oneOf)('absent', 'denied', 'failure', 'invalid', 'partial', 'pending', 'success'),
1285
+ }),
1286
+ 'agentfootprint.tools.repeated_call': eventShape({
1287
+ toolName: auditBounding_js_1.str,
1288
+ toolCallId: auditBounding_js_1.str,
1289
+ iteration: auditBounding_js_1.num,
1290
+ occurrences: auditBounding_js_1.num,
1291
+ argsFingerprint: auditBounding_js_1.str,
1292
+ resultFingerprint: auditBounding_js_1.str,
1293
+ mode: (0, auditBounding_js_1.oneOf)('arguments'),
1294
+ }),
1295
+ 'agentfootprint.tools.code_run': eventShape({
1296
+ tool: auditBounding_js_1.str,
1297
+ language: auditBounding_js_1.str,
1298
+ stagedInputs: auditBounding_js_1.num,
1299
+ outputChars: auditBounding_js_1.num,
1300
+ truncated: auditBounding_js_1.bool,
1301
+ ok: auditBounding_js_1.bool,
1302
+ exitCode: auditBounding_js_1.num,
1303
+ serviceError: auditBounding_js_1.bool,
1304
+ terminatedBy: auditBounding_js_1.str,
1305
+ shapeHash: auditBounding_js_1.str,
1306
+ }),
1307
+ // One use of an MCP client pool: "ids, digests, evidence and outcomes only" —
1308
+ // never an identity value, a session handle, an argument, a result or a server's text.
1309
+ 'agentfootprint.tools.mcp_client': eventShape({
1310
+ server: auditBounding_js_1.str,
1311
+ at: (0, auditBounding_js_1.oneOf)('call', 'list'),
1312
+ toolCallId: auditBounding_js_1.str,
1313
+ keyHash: auditBounding_js_1.str,
1314
+ clientId: auditBounding_js_1.str,
1315
+ generation: auditBounding_js_1.num,
1316
+ client: (0, auditBounding_js_1.oneOf)('expired', 'handle-lost', 'joined', 'not-needed', 'opened', 'refused', 'reused'),
1317
+ previous: (0, auditBounding_js_1.oneOf)('evicted', 'expired', 'handle-lost', 'idle', 'terminated'),
1318
+ evidence: (0, auditBounding_js_1.oneOf)('server-404', 'transport-forgot-handle'),
1319
+ refusal: (0, auditBounding_js_1.oneOf)('binding-changed', 'closed', 'ending-full', 'identity-mismatch', 'incomplete-identity', 'init-failed', 'init-timeout', 'lease-expired', 'no-identity', 'operations-full', 'pool-full', 'principal-full', 'request-unmatched', 'stale-tools'),
1320
+ initMs: auditBounding_js_1.num,
1321
+ definitions: (0, auditBounding_js_1.oneOf)('listed', 'shared'),
1322
+ definitionsAgeMs: auditBounding_js_1.num,
1323
+ revalidated: (0, auditBounding_js_1.oneOf)('kept', 'refused'),
1324
+ }),
1325
+ 'agentfootprint.tools.request_attempts': eventShape({
1326
+ toolCallId: auditBounding_js_1.str,
1327
+ toolName: auditBounding_js_1.str,
1328
+ iteration: auditBounding_js_1.num,
1329
+ endpoint: auditBounding_js_1.str,
1330
+ origin: auditBounding_js_1.str,
1331
+ attempts: (0, auditBounding_js_1.listOf)(boundRequestAttempt),
1332
+ omitted: auditBounding_js_1.num,
1333
+ end: boundRequestEnd,
1334
+ }),
1335
+ 'agentfootprint.tools.session_close_failed': eventShape({
1336
+ reason: (0, auditBounding_js_1.oneOf)('call-end', 'evicted', 'idle', 'run-end', 'session-end', 'shutdown'),
1337
+ durationMs: auditBounding_js_1.num,
1338
+ error: auditBounding_js_1.charsMarker,
1339
+ errorClass: auditBounding_js_1.str,
1340
+ tool: auditBounding_js_1.str,
1341
+ scope: (0, auditBounding_js_1.oneOf)('call', 'run', 'session', 'shutdown'),
1342
+ keyHash: auditBounding_js_1.str,
1343
+ runnerId: auditBounding_js_1.str,
1344
+ label: auditBounding_js_1.str,
1345
+ }),
1346
+ 'agentfootprint.skill.activated': eventShape({
1347
+ skillId: auditBounding_js_1.str,
1348
+ reason: (0, auditBounding_js_1.oneOf)('autoActivate', 'manual', 'read_skill_result'),
1349
+ injectedTools: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
1350
+ injectedSystemPromptChars: auditBounding_js_1.num,
1351
+ }),
1352
+ 'agentfootprint.skill.graph_declared': eventShape({
1353
+ nodes: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
1354
+ id: auditBounding_js_1.str,
1355
+ kind: auditBounding_js_1.str,
1356
+ description: auditBounding_js_1.str,
1357
+ label: auditBounding_js_1.str,
1358
+ title: auditBounding_js_1.str,
1359
+ })),
1360
+ edges: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
1361
+ from: (0, auditBounding_js_1.nullOr)(auditBounding_js_1.str),
1362
+ to: auditBounding_js_1.str,
1363
+ kind: auditBounding_js_1.str,
1364
+ label: auditBounding_js_1.str,
1365
+ guard: (0, auditBounding_js_1.shapeOf)({
1366
+ conditions: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
1367
+ key: auditBounding_js_1.str,
1368
+ op: auditBounding_js_1.str,
1369
+ // The value the app declared to compare against: one, or a list.
1370
+ value: (0, auditBounding_js_1.orList)(auditKeptByContract_js_1.declaredValue),
1371
+ })),
1372
+ }),
1373
+ })),
1374
+ }),
1375
+ 'agentfootprint.skill.deactivated': eventShape({
1376
+ skillId: auditBounding_js_1.str,
1377
+ reason: auditKeptByContract_js_1.appReasonWord,
1378
+ }),
1379
+ 'agentfootprint.skill.rejected': eventShape({
1380
+ requestedId: auditBounding_js_1.str,
1381
+ currentSkillId: auditBounding_js_1.str,
1382
+ allowed: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
1383
+ iteration: auditBounding_js_1.num,
1384
+ posture: (0, auditBounding_js_1.oneOf)('guard', 'rails'),
1385
+ reason: (0, auditBounding_js_1.oneOf)('posture', 'self-call', 'unreachable'),
1386
+ }),
1387
+ 'agentfootprint.skill.reroute_superseded': eventShape({
1388
+ volunteeredId: auditBounding_js_1.str,
1389
+ wonId: auditBounding_js_1.str,
1390
+ fromSkillId: auditBounding_js_1.str,
1391
+ iteration: auditBounding_js_1.num,
1392
+ source: (0, auditBounding_js_1.oneOf)('tool-proposal'),
1393
+ }),
1394
+ 'agentfootprint.skill.route_conflict': eventShape({
1395
+ iteration: auditBounding_js_1.num,
1396
+ fromSkillId: auditBounding_js_1.str,
1397
+ winner: (0, auditBounding_js_1.shapeOf)({
1398
+ toolCallId: auditBounding_js_1.str,
1399
+ toolName: auditBounding_js_1.str,
1400
+ target: auditBounding_js_1.str,
1401
+ }),
1402
+ losers: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
1403
+ toolCallId: auditBounding_js_1.str,
1404
+ toolName: auditBounding_js_1.str,
1405
+ target: auditBounding_js_1.str,
1406
+ })),
1407
+ source: (0, auditBounding_js_1.oneOf)('tool-proposal'),
1408
+ }),
1409
+ 'agentfootprint.skill.step_advanced': eventShape({
1410
+ skillId: auditBounding_js_1.str,
1411
+ step: (0, auditBounding_js_1.shapeOf)({
1412
+ index: auditBounding_js_1.num,
1413
+ total: auditBounding_js_1.num,
1414
+ tool: auditBounding_js_1.str,
1415
+ note: auditBounding_js_1.str,
1416
+ }),
1417
+ iteration: auditBounding_js_1.num,
1418
+ toolCallId: auditBounding_js_1.str,
1419
+ completed: auditBounding_js_1.bool,
1420
+ }),
1421
+ 'agentfootprint.skill.steps_unfinished': eventShape({
1422
+ skillId: auditBounding_js_1.str,
1423
+ remaining: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
1424
+ index: auditBounding_js_1.num,
1425
+ tool: auditBounding_js_1.str,
1426
+ note: auditBounding_js_1.str,
1427
+ })),
1428
+ total: auditBounding_js_1.num,
1429
+ action: (0, auditBounding_js_1.oneOf)('accepted', 'cut-short', 'nudged'),
1430
+ iteration: auditBounding_js_1.num,
1431
+ }),
1432
+ 'agentfootprint.skill.escalated': eventShape({
1433
+ iteration: auditBounding_js_1.num,
1434
+ afterRefusals: auditBounding_js_1.num,
1435
+ refusals: auditBounding_js_1.num,
1436
+ from: (0, auditBounding_js_1.shapeOf)({
1437
+ provider: auditBounding_js_1.str,
1438
+ model: auditBounding_js_1.str,
1439
+ }),
1440
+ to: (0, auditBounding_js_1.shapeOf)({
1441
+ provider: auditBounding_js_1.str,
1442
+ model: auditBounding_js_1.str,
1443
+ }),
1444
+ }),
1445
+ 'agentfootprint.permission.gate_opened': eventShape({
1446
+ gateId: auditBounding_js_1.str,
1447
+ openedBy: auditBounding_js_1.str,
1448
+ expiresAt: auditBounding_js_1.num,
1449
+ }),
1450
+ 'agentfootprint.permission.gate_closed': eventShape({
1451
+ gateId: auditBounding_js_1.str,
1452
+ reason: auditKeptByContract_js_1.appReasonWord,
1453
+ }),
1454
+ 'agentfootprint.credential.requested': eventShape({
1455
+ service: auditBounding_js_1.str,
1456
+ mode: (0, auditBounding_js_1.oneOf)('machine', 'user'),
1457
+ toolCallId: auditBounding_js_1.str,
1458
+ iteration: auditBounding_js_1.num,
1459
+ }),
1460
+ 'agentfootprint.credential.acquired': eventShape({
1461
+ service: auditBounding_js_1.str,
1462
+ kind: auditBounding_js_1.str,
1463
+ expiresAt: auditBounding_js_1.num,
1464
+ toolCallId: auditBounding_js_1.str,
1465
+ iteration: auditBounding_js_1.num,
1466
+ }),
1467
+ 'agentfootprint.credential.authorization_required': eventShape({
1468
+ service: auditBounding_js_1.str,
1469
+ sessionId: auditBounding_js_1.str,
1470
+ toolCallId: auditBounding_js_1.str,
1471
+ iteration: auditBounding_js_1.num,
1472
+ }),
1473
+ 'agentfootprint.cost.tick': eventShape({
1474
+ scope: (0, auditBounding_js_1.oneOf)('iteration', 'run', 'turn'),
1475
+ model: auditBounding_js_1.str,
1476
+ provider: auditBounding_js_1.str,
1477
+ tokensInput: auditBounding_js_1.num,
1478
+ tokensOutput: auditBounding_js_1.num,
1479
+ estimatedUsd: auditBounding_js_1.num,
1480
+ cumulative: (0, auditBounding_js_1.shapeOf)({
1481
+ tokensInput: auditBounding_js_1.num,
1482
+ tokensOutput: auditBounding_js_1.num,
1483
+ estimatedUsd: auditBounding_js_1.num,
1484
+ }),
1485
+ }),
1486
+ 'agentfootprint.cost.limit_hit': eventShape({
1487
+ kind: (0, auditBounding_js_1.oneOf)('max_cost', 'max_iterations', 'max_tokens', 'max_wallclock'),
1488
+ limit: auditBounding_js_1.num,
1489
+ actual: auditBounding_js_1.num,
1490
+ action: (0, auditBounding_js_1.oneOf)('abort', 'degrade', 'warn'),
1491
+ }),
1492
+ 'agentfootprint.eval.score': eventShape({
1493
+ metricId: auditBounding_js_1.str,
1494
+ value: auditBounding_js_1.num,
1495
+ threshold: auditBounding_js_1.num,
1496
+ target: (0, auditBounding_js_1.oneOf)('iteration', 'run', 'toolCall', 'turn'),
1497
+ targetRef: auditBounding_js_1.str,
1498
+ evaluator: (0, auditBounding_js_1.oneOf)('fn', 'heuristic', 'llm'),
1499
+ evidence: auditBounding_js_1.keysMarker,
1500
+ label: auditBounding_js_1.str,
1501
+ explanation: auditBounding_js_1.charsMarker,
1502
+ }),
1503
+ 'agentfootprint.eval.threshold_crossed': eventShape({
1504
+ metricId: auditBounding_js_1.str,
1505
+ direction: (0, auditBounding_js_1.oneOf)('above', 'below'),
1506
+ value: auditBounding_js_1.num,
1507
+ threshold: auditBounding_js_1.num,
1508
+ actionTaken: auditBounding_js_1.str,
1509
+ }),
1510
+ 'agentfootprint.error.retried': eventShape({
1511
+ attempt: auditBounding_js_1.num,
1512
+ maxAttempts: auditBounding_js_1.num,
1513
+ lastError: auditBounding_js_1.charsMarker,
1514
+ backoffMs: auditBounding_js_1.num,
1515
+ reason: auditBounding_js_1.str,
1516
+ statedWaitMs: auditBounding_js_1.num,
1517
+ }),
1518
+ 'agentfootprint.error.recovered': eventShape({
1519
+ attempt: auditBounding_js_1.num,
1520
+ totalDurationMs: auditBounding_js_1.num,
1521
+ }),
1522
+ 'agentfootprint.error.fatal': eventShape({
1523
+ error: auditBounding_js_1.charsMarker,
1524
+ stage: auditBounding_js_1.str,
1525
+ scope: auditBounding_js_1.str,
1526
+ }),
1527
+ 'agentfootprint.error.circuit_changed': eventShape({
1528
+ state: (0, auditBounding_js_1.oneOf)('closed', 'half-open', 'open'),
1529
+ reason: auditBounding_js_1.str,
1530
+ providerName: auditBounding_js_1.str,
1531
+ }),
1532
+ 'agentfootprint.reliability.retried': eventShape({
1533
+ attempt: auditBounding_js_1.num,
1534
+ action: (0, auditBounding_js_1.oneOf)('retry', 'retry-other'),
1535
+ errorKind: auditBounding_js_1.str,
1536
+ errorMessage: auditBounding_js_1.charsMarker,
1537
+ fromProvider: auditBounding_js_1.str,
1538
+ toProvider: auditBounding_js_1.str,
1539
+ }),
1540
+ 'agentfootprint.reliability.recovered': eventShape({
1541
+ attempt: auditBounding_js_1.num,
1542
+ recoveredVia: (0, auditBounding_js_1.oneOf)('fallback', 'retry', 'retry-other'),
1543
+ priorFailures: auditBounding_js_1.num,
1544
+ errorKind: auditBounding_js_1.str,
1545
+ }),
1546
+ 'agentfootprint.pause.resume': eventShape({
1547
+ resumeInput: auditBounding_js_1.keysMarker,
1548
+ pausedDurationMs: auditBounding_js_1.num,
1549
+ componentId: auditBounding_js_1.str,
1550
+ }),
1551
+ 'agentfootprint.findings.declared': eventShape({
1552
+ toolName: auditBounding_js_1.str,
1553
+ toolCallId: auditBounding_js_1.str,
1554
+ iteration: auditBounding_js_1.num,
1555
+ basis: (0, auditBounding_js_1.oneOf)('direct', 'exploratory'),
1556
+ expect: (0, auditBounding_js_1.oneOf)('high', 'low', 'medium'),
1557
+ hasProposition: auditBounding_js_1.bool,
1558
+ malformed: auditBounding_js_1.num,
1559
+ }),
1560
+ 'agentfootprint.findings.standing': eventShape({
1561
+ toolCallId: auditBounding_js_1.str,
1562
+ toolName: auditBounding_js_1.str,
1563
+ iteration: auditBounding_js_1.num,
1564
+ standing: (0, auditBounding_js_1.oneOf)('fact', 'noise', 'open', 'ruled-out'),
1565
+ declaredOn: (0, auditBounding_js_1.oneOf)('answer', 'tool-call'),
1566
+ assertionCount: auditBounding_js_1.num,
1567
+ conflictKeys: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
1568
+ unknownId: auditBounding_js_1.bool,
1569
+ agrees: auditBounding_js_1.bool,
1570
+ }),
1571
+ 'agentfootprint.findings.judged': eventShape({
1572
+ toolCallId: auditBounding_js_1.str,
1573
+ toolName: auditBounding_js_1.str,
1574
+ iteration: auditBounding_js_1.num,
1575
+ against: (0, auditBounding_js_1.oneOf)('proposition', 'question'),
1576
+ standing: (0, auditBounding_js_1.oneOf)('fact', 'noise', 'open', 'ruled-out'),
1577
+ confidence: auditBounding_js_1.num,
1578
+ latencyMs: auditBounding_js_1.num,
1579
+ inputTokens: auditBounding_js_1.num,
1580
+ outputTokens: auditBounding_js_1.num,
1581
+ }),
1582
+ 'agentfootprint.findings.judge_failed': eventShape({
1583
+ toolCallId: auditBounding_js_1.str,
1584
+ toolName: auditBounding_js_1.str,
1585
+ iteration: auditBounding_js_1.num,
1586
+ status: auditBounding_js_1.num,
1587
+ latencyMs: auditBounding_js_1.num,
1588
+ }),
1589
+ 'agentfootprint.findings.contingent': eventShape({
1590
+ iteration: auditBounding_js_1.num,
1591
+ declaredOn: (0, auditBounding_js_1.oneOf)('answer', 'tool-call'),
1592
+ toolCallId: auditBounding_js_1.str,
1593
+ carriers: auditBounding_js_1.num,
1594
+ standings: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.oneOf)('fact', 'noise', 'open', 'ruled-out')),
1595
+ valueChars: auditBounding_js_1.num,
1596
+ }),
1597
+ 'agentfootprint.findings.argument': eventShape({
1598
+ toolCallId: auditBounding_js_1.str,
1599
+ toolName: auditBounding_js_1.str,
1600
+ iteration: auditBounding_js_1.num,
1601
+ turn: auditBounding_js_1.num,
1602
+ argument: auditBounding_js_1.str,
1603
+ rule: (0, auditBounding_js_1.oneOf)('ask', 'assume'),
1604
+ period: auditBounding_js_1.bool,
1605
+ source: (0, auditBounding_js_1.oneOf)('answered', 'app', 'default', 'model', 'result', 'said'),
1606
+ asked: (0, auditBounding_js_1.oneOf)('invalid-answer', 'missing', 'unverified'),
1607
+ claimed: (0, auditBounding_js_1.oneOf)('app', 'assumed', 'none', 'result', 'turn', 'user'),
1608
+ matched: (0, auditBounding_js_1.oneOf)('mention', 'phrase', 'quote', 'spelling'),
1609
+ reading: auditBounding_js_1.bool,
1610
+ earlier: auditBounding_js_1.bool,
1611
+ setAside: (0, auditBounding_js_1.oneOf)('noise', 'open', 'ruled-out'),
1612
+ argumentsFrom: (0, auditBounding_js_1.oneOf)('listed', 'unlisted'),
1613
+ coincides: (0, auditBounding_js_1.oneOf)('app', 'person', 'result'),
1614
+ free: auditBounding_js_1.bool,
1615
+ failed: (0, auditBounding_js_1.oneOf)('composed-message', 'no-earlier-turn', 'not-in-app-text', 'not-in-earlier-turns', 'not-in-result', 'only-in-model-answer', 'placed-result', 'quote-not-found', 'uncheckable', 'unknown-result'),
1616
+ malformed: auditBounding_js_1.num,
1617
+ valueChars: auditBounding_js_1.num,
1618
+ }),
1619
+ 'agentfootprint.findings.period': eventShape({
1620
+ toolCallId: auditBounding_js_1.str,
1621
+ toolName: auditBounding_js_1.str,
1622
+ iteration: auditBounding_js_1.num,
1623
+ turn: auditBounding_js_1.num,
1624
+ verdict: (0, auditBounding_js_1.oneOf)('covered', 'not-held', 'partly-held', 'undeclared', 'unknown'),
1625
+ timeChecks: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.oneOf)('partly-beyond-retention', 'period-beyond-retention', 'period-differs-from-asked', 'period-shifted')),
1626
+ }),
1627
+ 'agentfootprint.findings.negative_claim': eventShape({
1628
+ iteration: auditBounding_js_1.num,
1629
+ turn: auditBounding_js_1.num,
1630
+ field: auditBounding_js_1.str,
1631
+ span: (0, auditBounding_js_1.shapeOf)({
1632
+ start: auditBounding_js_1.num,
1633
+ end: auditBounding_js_1.num,
1634
+ }),
1635
+ packVersion: auditBounding_js_1.str,
1636
+ phraseId: auditBounding_js_1.str,
1637
+ truncated: auditBounding_js_1.bool,
1638
+ kind: (0, auditBounding_js_1.oneOf)('negative-claim', 'negative-claim-note'),
1639
+ // A claim row's checker codes and native result ids; a note row's code.
1640
+ claim: (0, auditBounding_js_1.oneOf)('complete', 'none'),
1641
+ notes: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
1642
+ results: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
1643
+ code: auditBounding_js_1.str,
1644
+ }),
1645
+ 'agentfootprint.tool_choice.picked': eventShape({
1646
+ iteration: auditBounding_js_1.num,
1647
+ chosen: auditBounding_js_1.str,
1648
+ confidence: auditBounding_js_1.num,
1649
+ offered: auditBounding_js_1.num,
1650
+ served: auditBounding_js_1.num,
1651
+ narrowed: auditBounding_js_1.bool,
1652
+ narrowedSkipped: (0, auditBounding_js_1.oneOf)('after-miss', 'evidence-revision', 'too-few', 'unavailable', 'wrap-up'),
1653
+ latencyMs: auditBounding_js_1.num,
1654
+ inputTokens: auditBounding_js_1.num,
1655
+ outputTokens: auditBounding_js_1.num,
1656
+ }),
1657
+ 'agentfootprint.tool_choice.outcome': eventShape({
1658
+ iteration: auditBounding_js_1.num,
1659
+ called: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
1660
+ firstAgrees: auditBounding_js_1.bool,
1661
+ missed: (0, auditBounding_js_1.listOf)(auditBounding_js_1.str),
1662
+ }),
1663
+ 'agentfootprint.tool_choice.failed': eventShape({
1664
+ iteration: auditBounding_js_1.num,
1665
+ status: auditBounding_js_1.num,
1666
+ latencyMs: auditBounding_js_1.num,
1667
+ }),
1668
+ 'agentfootprint.ontology.served': eventShape({
1669
+ iteration: auditBounding_js_1.num,
1670
+ id: auditBounding_js_1.str,
1671
+ version: auditBounding_js_1.str,
1672
+ hash: auditBounding_js_1.str,
1673
+ nodes: auditBounding_js_1.num,
1674
+ sources: auditBounding_js_1.num,
1675
+ edges: auditBounding_js_1.num,
1676
+ }),
1677
+ 'agentfootprint.answer.assessed': eventShape({
1678
+ turn: auditBounding_js_1.num,
1679
+ iteration: auditBounding_js_1.num,
1680
+ assessment: (0, auditBounding_js_1.oneOf)('known', 'not-applicable', 'unknown', 'unrefuted'),
1681
+ standing: (0, auditBounding_js_1.oneOf)('ask', 'consistent', 'known', 'not-assessed', 'not-sure'),
1682
+ reasons: boundAssessmentReasons,
1683
+ checked: boundAssessmentChecks,
1684
+ }),
1685
+ 'agentfootprint.embedding.generated': eventShape({
1686
+ model: auditBounding_js_1.str,
1687
+ provider: (0, auditBounding_js_1.oneOf)('cohere', 'custom', 'local', 'openai', 'voyage'),
1688
+ inputKind: (0, auditBounding_js_1.oneOf)('document', 'query'),
1689
+ dimension: auditBounding_js_1.num,
1690
+ count: auditBounding_js_1.num,
1691
+ durationMs: auditBounding_js_1.num,
1692
+ tokensSpent: auditBounding_js_1.num,
1693
+ }),
1694
+ 'agentfootprint.artifacts.resolved': eventShape({
1695
+ ref: auditBounding_js_1.str,
1696
+ via: (0, auditBounding_js_1.oneOf)('get', 'head'),
1697
+ kind: auditBounding_js_1.str,
1698
+ bytes: auditBounding_js_1.num,
1699
+ tool: auditBounding_js_1.str,
1700
+ }),
1701
+ 'agentfootprint.artifacts.expired': eventShape({
1702
+ ref: auditBounding_js_1.str,
1703
+ reason: (0, auditBounding_js_1.oneOf)('max-bytes', 'max-count', 'ttl'),
1704
+ kind: auditBounding_js_1.str,
1705
+ bytes: auditBounding_js_1.num,
1706
+ tool: auditBounding_js_1.str,
1707
+ }),
1708
+ 'agentfootprint.artifacts.hand_over_failed': eventShape({
1709
+ cause: (0, auditBounding_js_1.oneOf)('abort', 'expired', 'hook', 'operation', 'timeout'),
1710
+ op: (0, auditBounding_js_1.oneOf)('delete', 'dispatch', 'get', 'head', 'list', 'put'),
1711
+ errorClass: auditBounding_js_1.str,
1712
+ errorCode: auditBounding_js_1.str,
1713
+ }),
1714
+ 'agentfootprint.integrity.disposition': eventShape({
1715
+ posture: (0, auditBounding_js_1.oneOf)('dev', 'observe'),
1716
+ workExisted: auditBounding_js_1.bool,
1717
+ rows: (0, auditBounding_js_1.listOf)((0, auditBounding_js_1.shapeOf)({
1718
+ check: auditBounding_js_1.str,
1719
+ seam: (0, auditBounding_js_1.oneOf)('choice', 'claim', 'compose', 'wire', 'write'),
1720
+ checked: auditBounding_js_1.num,
1721
+ findings: auditBounding_js_1.num,
1722
+ notApplicable: auditBounding_js_1.num,
1723
+ unreachable: auditBounding_js_1.num,
1724
+ lastFiredAt: auditBounding_js_1.num,
1725
+ synthetic: auditBounding_js_1.num,
1726
+ })),
1727
+ }),
1728
+ };
1729
+ }
1730
+ exports.eventShapes = eventShapes;
1731
+ //# sourceMappingURL=auditShapes.js.map