agentfootprint 14.1.1 → 14.2.1

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 (567) hide show
  1. package/CAPABILITIES.md +2 -0
  2. package/dist/context-bisect/ablation.js +29 -4
  3. package/dist/context-bisect/ablation.js.map +1 -1
  4. package/dist/context-bisect/bisect.js +30 -8
  5. package/dist/context-bisect/bisect.js.map +1 -1
  6. package/dist/context-bisect/conclusion.js +228 -0
  7. package/dist/context-bisect/conclusion.js.map +1 -0
  8. package/dist/context-bisect/conclusionTypes.js +6 -0
  9. package/dist/context-bisect/conclusionTypes.js.map +1 -0
  10. package/dist/context-bisect/format.js +98 -0
  11. package/dist/context-bisect/format.js.map +1 -0
  12. package/dist/context-bisect/index.js.map +1 -1
  13. package/dist/context-bisect/localize.js +25 -96
  14. package/dist/context-bisect/localize.js.map +1 -1
  15. package/dist/context-bisect/toBacktrackTrace.js +6 -1
  16. package/dist/context-bisect/toBacktrackTrace.js.map +1 -1
  17. package/dist/context-bisect/types.js +4 -0
  18. package/dist/context-bisect/types.js.map +1 -1
  19. package/dist/core/agent/arguments/ask/constants.js +30 -0
  20. package/dist/core/agent/arguments/ask/constants.js.map +1 -0
  21. package/dist/core/agent/arguments/ask/context.js +120 -0
  22. package/dist/core/agent/arguments/ask/context.js.map +1 -0
  23. package/dist/core/agent/arguments/ask/fields.js +307 -0
  24. package/dist/core/agent/arguments/ask/fields.js.map +1 -0
  25. package/dist/core/agent/arguments/ask/replyFields.js +48 -0
  26. package/dist/core/agent/arguments/ask/replyFields.js.map +1 -0
  27. package/dist/core/agent/arguments/ask/types.js +3 -0
  28. package/dist/core/agent/arguments/ask/types.js.map +1 -0
  29. package/dist/core/agent/arguments/ask/validation.js +195 -0
  30. package/dist/core/agent/arguments/ask/validation.js.map +1 -0
  31. package/dist/core/agent/arguments/ask/windowBinding/answer.js +84 -0
  32. package/dist/core/agent/arguments/ask/windowBinding/answer.js.map +1 -0
  33. package/dist/core/agent/arguments/ask/windowBinding/editedZone.js +29 -0
  34. package/dist/core/agent/arguments/ask/windowBinding/editedZone.js.map +1 -0
  35. package/dist/core/agent/arguments/ask/windowBinding/fills.js +85 -0
  36. package/dist/core/agent/arguments/ask/windowBinding/fills.js.map +1 -0
  37. package/dist/core/agent/arguments/ask/windowBinding/question.js +44 -0
  38. package/dist/core/agent/arguments/ask/windowBinding/question.js.map +1 -0
  39. package/dist/core/agent/arguments/ask/windowBinding/types.js +3 -0
  40. package/dist/core/agent/arguments/ask/windowBinding/types.js.map +1 -0
  41. package/dist/core/agent/arguments/ask/windowBinding.js +9 -0
  42. package/dist/core/agent/arguments/ask/windowBinding.js.map +1 -0
  43. package/dist/core/agent/arguments/ask/windowReply.js +69 -0
  44. package/dist/core/agent/arguments/ask/windowReply.js.map +1 -0
  45. package/dist/core/agent/arguments/ask.js +48 -898
  46. package/dist/core/agent/arguments/ask.js.map +1 -1
  47. package/dist/core/agent/arguments/dispatch.js +3 -3
  48. package/dist/core/agent/arguments/pendingPrivateAsk.js +3 -1
  49. package/dist/core/agent/arguments/pendingPrivateAsk.js.map +1 -1
  50. package/dist/core/agent/arguments/serve/assumed.js +110 -0
  51. package/dist/core/agent/arguments/serve/assumed.js.map +1 -0
  52. package/dist/core/agent/arguments/serve/clock.js +169 -0
  53. package/dist/core/agent/arguments/serve/clock.js.map +1 -0
  54. package/dist/core/agent/arguments/serve/fills.js +113 -0
  55. package/dist/core/agent/arguments/serve/fills.js.map +1 -0
  56. package/dist/core/agent/arguments/serve/refusals.js +158 -0
  57. package/dist/core/agent/arguments/serve/refusals.js.map +1 -0
  58. package/dist/core/agent/arguments/serve/schema.js +124 -0
  59. package/dist/core/agent/arguments/serve/schema.js.map +1 -0
  60. package/dist/core/agent/arguments/serve/values.js +21 -0
  61. package/dist/core/agent/arguments/serve/values.js.map +1 -0
  62. package/dist/core/agent/arguments/serve/windows.js +328 -0
  63. package/dist/core/agent/arguments/serve/windows.js.map +1 -0
  64. package/dist/core/agent/arguments/serve.js +32 -984
  65. package/dist/core/agent/arguments/serve.js.map +1 -1
  66. package/dist/core/agent/assessment/compose.js +2 -2
  67. package/dist/core/agent/assessment/compose.js.map +1 -1
  68. package/dist/core/agent/assessment/stage.js +1 -1
  69. package/dist/core/agent/buildAgentChart.js +1 -1
  70. package/dist/core/agent/findings/types.js.map +1 -1
  71. package/dist/core/agent/middleware/rewrites.js +2 -2
  72. package/dist/core/agent/middleware/rewrites.js.map +1 -1
  73. package/dist/core/agent/stages/answerCoverage.js +1 -1
  74. package/dist/core/agent/stages/argumentAsk.js +4 -3
  75. package/dist/core/agent/stages/argumentAsk.js.map +1 -1
  76. package/dist/core/agent/stages/callLLM.js +1 -1
  77. package/dist/core/agent/stages/callLLM.js.map +1 -1
  78. package/dist/core/agent/stages/prepareFinal.js +1 -1
  79. package/dist/core/agent/stages/toolCalls/execution/deliveredResult.js +1 -1
  80. package/dist/core/agent/stages/toolCalls/execution/deliveredResult.js.map +1 -1
  81. package/dist/core/agent/stages/toolCalls/helpers/sourceNote.js +1 -1
  82. package/dist/core/slots/buildToolsSlot.js +2 -2
  83. package/dist/core/slots/buildToolsSlot.js.map +1 -1
  84. package/dist/debug.js.map +1 -1
  85. package/dist/esm/context-bisect/ablation.d.ts +8 -0
  86. package/dist/esm/context-bisect/ablation.js +24 -3
  87. package/dist/esm/context-bisect/ablation.js.map +1 -1
  88. package/dist/esm/context-bisect/bisect.d.ts +15 -15
  89. package/dist/esm/context-bisect/bisect.js +27 -5
  90. package/dist/esm/context-bisect/bisect.js.map +1 -1
  91. package/dist/esm/context-bisect/conclusion.d.ts +51 -0
  92. package/dist/esm/context-bisect/conclusion.js +223 -0
  93. package/dist/esm/context-bisect/conclusion.js.map +1 -0
  94. package/dist/esm/context-bisect/conclusionTypes.d.ts +75 -0
  95. package/dist/esm/context-bisect/conclusionTypes.js +5 -0
  96. package/dist/esm/context-bisect/conclusionTypes.js.map +1 -0
  97. package/dist/esm/context-bisect/format.d.ts +10 -0
  98. package/dist/esm/context-bisect/format.js +94 -0
  99. package/dist/esm/context-bisect/format.js.map +1 -0
  100. package/dist/esm/context-bisect/index.d.ts +1 -1
  101. package/dist/esm/context-bisect/index.js.map +1 -1
  102. package/dist/esm/context-bisect/localize.d.ts +8 -10
  103. package/dist/esm/context-bisect/localize.js +24 -94
  104. package/dist/esm/context-bisect/localize.js.map +1 -1
  105. package/dist/esm/context-bisect/toBacktrackTrace.js +6 -1
  106. package/dist/esm/context-bisect/toBacktrackTrace.js.map +1 -1
  107. package/dist/esm/context-bisect/types.d.ts +33 -4
  108. package/dist/esm/context-bisect/types.js +4 -0
  109. package/dist/esm/context-bisect/types.js.map +1 -1
  110. package/dist/esm/core/agent/arguments/ask/constants.d.ts +16 -0
  111. package/dist/esm/core/agent/arguments/ask/constants.js +27 -0
  112. package/dist/esm/core/agent/arguments/ask/constants.js.map +1 -0
  113. package/dist/esm/core/agent/arguments/ask/context.d.ts +23 -0
  114. package/dist/esm/core/agent/arguments/ask/context.js +115 -0
  115. package/dist/esm/core/agent/arguments/ask/context.js.map +1 -0
  116. package/dist/esm/core/agent/arguments/ask/fields.d.ts +42 -0
  117. package/dist/esm/core/agent/arguments/ask/fields.js +300 -0
  118. package/dist/esm/core/agent/arguments/ask/fields.js.map +1 -0
  119. package/dist/esm/core/agent/arguments/ask/replyFields.d.ts +9 -0
  120. package/dist/esm/core/agent/arguments/ask/replyFields.js +42 -0
  121. package/dist/esm/core/agent/arguments/ask/replyFields.js.map +1 -0
  122. package/dist/esm/core/agent/arguments/ask/types.d.ts +195 -0
  123. package/dist/esm/core/agent/arguments/ask/types.js +2 -0
  124. package/dist/esm/core/agent/arguments/ask/types.js.map +1 -0
  125. package/dist/esm/core/agent/arguments/ask/validation.d.ts +42 -0
  126. package/dist/esm/core/agent/arguments/ask/validation.js +188 -0
  127. package/dist/esm/core/agent/arguments/ask/validation.js.map +1 -0
  128. package/dist/esm/core/agent/arguments/ask/windowBinding/answer.d.ts +17 -0
  129. package/dist/esm/core/agent/arguments/ask/windowBinding/answer.js +80 -0
  130. package/dist/esm/core/agent/arguments/ask/windowBinding/answer.js.map +1 -0
  131. package/dist/esm/core/agent/arguments/ask/windowBinding/editedZone.d.ts +11 -0
  132. package/dist/esm/core/agent/arguments/ask/windowBinding/editedZone.js +25 -0
  133. package/dist/esm/core/agent/arguments/ask/windowBinding/editedZone.js.map +1 -0
  134. package/dist/esm/core/agent/arguments/ask/windowBinding/fills.d.ts +18 -0
  135. package/dist/esm/core/agent/arguments/ask/windowBinding/fills.js +81 -0
  136. package/dist/esm/core/agent/arguments/ask/windowBinding/fills.js.map +1 -0
  137. package/dist/esm/core/agent/arguments/ask/windowBinding/question.d.ts +6 -0
  138. package/dist/esm/core/agent/arguments/ask/windowBinding/question.js +40 -0
  139. package/dist/esm/core/agent/arguments/ask/windowBinding/question.js.map +1 -0
  140. package/dist/esm/core/agent/arguments/ask/windowBinding/types.d.ts +35 -0
  141. package/dist/esm/core/agent/arguments/ask/windowBinding/types.js +2 -0
  142. package/dist/esm/core/agent/arguments/ask/windowBinding/types.js.map +1 -0
  143. package/dist/esm/core/agent/arguments/ask/windowBinding.d.ts +4 -0
  144. package/dist/esm/core/agent/arguments/ask/windowBinding.js +4 -0
  145. package/dist/esm/core/agent/arguments/ask/windowBinding.js.map +1 -0
  146. package/dist/esm/core/agent/arguments/ask/windowReply.d.ts +11 -0
  147. package/dist/esm/core/agent/arguments/ask/windowReply.js +65 -0
  148. package/dist/esm/core/agent/arguments/ask/windowReply.js.map +1 -0
  149. package/dist/esm/core/agent/arguments/ask.d.ts +9 -259
  150. package/dist/esm/core/agent/arguments/ask.js +20 -885
  151. package/dist/esm/core/agent/arguments/ask.js.map +1 -1
  152. package/dist/esm/core/agent/arguments/dispatch.d.ts +4 -4
  153. package/dist/esm/core/agent/arguments/dispatch.js +4 -4
  154. package/dist/esm/core/agent/arguments/pendingPrivateAsk.d.ts +1 -1
  155. package/dist/esm/core/agent/arguments/pendingPrivateAsk.js +3 -1
  156. package/dist/esm/core/agent/arguments/pendingPrivateAsk.js.map +1 -1
  157. package/dist/esm/core/agent/arguments/serve/assumed.d.ts +63 -0
  158. package/dist/esm/core/agent/arguments/serve/assumed.js +112 -0
  159. package/dist/esm/core/agent/arguments/serve/assumed.js.map +1 -0
  160. package/dist/esm/core/agent/arguments/serve/clock.d.ts +104 -0
  161. package/dist/esm/core/agent/arguments/serve/clock.js +162 -0
  162. package/dist/esm/core/agent/arguments/serve/clock.js.map +1 -0
  163. package/dist/esm/core/agent/arguments/serve/fills.d.ts +65 -0
  164. package/dist/esm/core/agent/arguments/serve/fills.js +109 -0
  165. package/dist/esm/core/agent/arguments/serve/fills.js.map +1 -0
  166. package/dist/esm/core/agent/arguments/serve/refusals.d.ts +67 -0
  167. package/dist/esm/core/agent/arguments/serve/refusals.js +148 -0
  168. package/dist/esm/core/agent/arguments/serve/refusals.js.map +1 -0
  169. package/dist/esm/core/agent/arguments/serve/schema.d.ts +67 -0
  170. package/dist/esm/core/agent/arguments/serve/schema.js +119 -0
  171. package/dist/esm/core/agent/arguments/serve/schema.js.map +1 -0
  172. package/dist/esm/core/agent/arguments/serve/values.d.ts +11 -0
  173. package/dist/esm/core/agent/arguments/serve/values.js +16 -0
  174. package/dist/esm/core/agent/arguments/serve/values.js.map +1 -0
  175. package/dist/esm/core/agent/arguments/serve/windows.d.ts +60 -0
  176. package/dist/esm/core/agent/arguments/serve/windows.js +324 -0
  177. package/dist/esm/core/agent/arguments/serve/windows.js.map +1 -0
  178. package/dist/esm/core/agent/arguments/serve.d.ts +12 -417
  179. package/dist/esm/core/agent/arguments/serve.js +7 -973
  180. package/dist/esm/core/agent/arguments/serve.js.map +1 -1
  181. package/dist/esm/core/agent/assessment/compose.d.ts +2 -2
  182. package/dist/esm/core/agent/assessment/compose.js +2 -2
  183. package/dist/esm/core/agent/assessment/compose.js.map +1 -1
  184. package/dist/esm/core/agent/assessment/stage.js +1 -1
  185. package/dist/esm/core/agent/buildAgentChart.d.ts +1 -1
  186. package/dist/esm/core/agent/buildAgentChart.js +1 -1
  187. package/dist/esm/core/agent/evidence/figures.d.ts +1 -1
  188. package/dist/esm/core/agent/evidence/figures.js +1 -1
  189. package/dist/esm/core/agent/findings/types.d.ts +2 -2
  190. package/dist/esm/core/agent/findings/types.js.map +1 -1
  191. package/dist/esm/core/agent/middleware/rewrites.d.ts +1 -1
  192. package/dist/esm/core/agent/middleware/rewrites.js +2 -2
  193. package/dist/esm/core/agent/middleware/rewrites.js.map +1 -1
  194. package/dist/esm/core/agent/stages/answerCoverage.d.ts +1 -1
  195. package/dist/esm/core/agent/stages/answerCoverage.js +1 -1
  196. package/dist/esm/core/agent/stages/argumentAsk.d.ts +1 -1
  197. package/dist/esm/core/agent/stages/argumentAsk.js +4 -3
  198. package/dist/esm/core/agent/stages/argumentAsk.js.map +1 -1
  199. package/dist/esm/core/agent/stages/callLLM.js +1 -1
  200. package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
  201. package/dist/esm/core/agent/stages/prepareFinal.d.ts +1 -1
  202. package/dist/esm/core/agent/stages/prepareFinal.js +1 -1
  203. package/dist/esm/core/agent/stages/seed.d.ts +2 -2
  204. package/dist/esm/core/agent/stages/toolCalls/contracts/access.d.ts +1 -1
  205. package/dist/esm/core/agent/stages/toolCalls/execution/deliveredResult.js +1 -1
  206. package/dist/esm/core/agent/stages/toolCalls/execution/deliveredResult.js.map +1 -1
  207. package/dist/esm/core/agent/stages/toolCalls/helpers/sourceNote.d.ts +1 -1
  208. package/dist/esm/core/agent/stages/toolCalls/helpers/sourceNote.js +1 -1
  209. package/dist/esm/core/agent/types.d.ts +1 -1
  210. package/dist/esm/core/slots/buildToolsSlot.d.ts +4 -4
  211. package/dist/esm/core/slots/buildToolsSlot.js +2 -2
  212. package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
  213. package/dist/esm/debug.d.ts +1 -1
  214. package/dist/esm/debug.js.map +1 -1
  215. package/dist/esm/events/payloads/agent.d.ts +1 -1
  216. package/dist/esm/index.d.ts +1 -1
  217. package/dist/esm/lib/saidByPerson.d.ts +2 -2
  218. package/dist/esm/lib/saidByPerson.js +2 -2
  219. package/dist/esm/locales/timeAsk.d.ts +2 -2
  220. package/dist/esm/locales/timeAsk.js +3 -1
  221. package/dist/esm/locales/timeAsk.js.map +1 -1
  222. package/dist/esm/semantics/coverage/answer.d.ts +3 -3
  223. package/dist/esm/semantics/coverage/answer.js +2 -2
  224. package/dist/esm/semantics/coverage/period.d.ts +1 -1
  225. package/dist/esm/semantics/coverage/period.js +1 -1
  226. package/dist/esm/semantics/coverage/timeLimitFacts.d.ts +1 -1
  227. package/dist/esm/semantics/coverage/timeLimitFacts.js +1 -1
  228. package/dist/esm/semantics/coverage/timeLimits.d.ts +1 -1
  229. package/dist/esm/semantics/coverage/timeLimits.js +1 -1
  230. package/dist/esm/time/ask.d.ts +8 -3
  231. package/dist/esm/time/ask.js +7 -0
  232. package/dist/esm/time/ask.js.map +1 -1
  233. package/dist/esm/time/forms.js +2 -2
  234. package/dist/esm/time/forms.js.map +1 -1
  235. package/dist/esm/time/readers/english/atoms.d.ts +3 -0
  236. package/dist/esm/time/readers/english/atoms.js +164 -0
  237. package/dist/esm/time/readers/english/atoms.js.map +1 -0
  238. package/dist/esm/time/readers/english/grammar.d.ts +49 -0
  239. package/dist/esm/time/readers/english/grammar.js +128 -0
  240. package/dist/esm/time/readers/english/grammar.js.map +1 -0
  241. package/dist/esm/time/readers/english/types.d.ts +11 -0
  242. package/dist/esm/time/readers/english/types.js +2 -0
  243. package/dist/esm/time/readers/english/types.js.map +1 -0
  244. package/dist/esm/time/readers/english/zones.d.ts +13 -0
  245. package/dist/esm/time/readers/english/zones.js +116 -0
  246. package/dist/esm/time/readers/english/zones.js.map +1 -0
  247. package/dist/esm/time/readers/english.d.ts +6 -13
  248. package/dist/esm/time/readers/english.js +10 -327
  249. package/dist/esm/time/readers/english.js.map +1 -1
  250. package/dist/esm/time/readingAsk.d.ts +1 -1
  251. package/dist/esm/time/readingAsk.js +11 -3
  252. package/dist/esm/time/readingAsk.js.map +1 -1
  253. package/dist/esm/time/reply/classify.d.ts +2 -0
  254. package/dist/esm/time/reply/classify.js +28 -0
  255. package/dist/esm/time/reply/classify.js.map +1 -0
  256. package/dist/esm/time/reply/decision.d.ts +2 -0
  257. package/dist/esm/time/reply/decision.js +28 -0
  258. package/dist/esm/time/reply/decision.js.map +1 -0
  259. package/dist/esm/time/reply/decode.d.ts +3 -0
  260. package/dist/esm/time/reply/decode.js +25 -0
  261. package/dist/esm/time/reply/decode.js.map +1 -0
  262. package/dist/esm/time/reply/project.d.ts +5 -0
  263. package/dist/esm/time/reply/project.js +36 -0
  264. package/dist/esm/time/reply/project.js.map +1 -0
  265. package/dist/esm/time/reply/resolve.d.ts +4 -0
  266. package/dist/esm/time/reply/resolve.js +63 -0
  267. package/dist/esm/time/reply/resolve.js.map +1 -0
  268. package/dist/esm/time/reply/types.d.ts +71 -0
  269. package/dist/esm/time/reply/types.js +14 -0
  270. package/dist/esm/time/reply/types.js.map +1 -0
  271. package/dist/esm/time/reply.d.ts +3 -0
  272. package/dist/esm/time/reply.js +3 -0
  273. package/dist/esm/time/reply.js.map +1 -0
  274. package/dist/esm/time/replyForm/bindings.d.ts +22 -0
  275. package/dist/esm/time/replyForm/bindings.js +55 -0
  276. package/dist/esm/time/replyForm/bindings.js.map +1 -0
  277. package/dist/esm/time/replyForm.d.ts +3 -0
  278. package/dist/esm/time/replyForm.js +3 -0
  279. package/dist/esm/time/replyForm.js.map +1 -0
  280. package/dist/esm/time/replyRecord.d.ts +8 -0
  281. package/dist/esm/time/replyRecord.js +26 -0
  282. package/dist/esm/time/replyRecord.js.map +1 -0
  283. package/dist/esm/time/resolve/agreement.d.ts +6 -0
  284. package/dist/esm/time/resolve/agreement.js +26 -0
  285. package/dist/esm/time/resolve/agreement.js.map +1 -0
  286. package/dist/esm/time/resolve/calendar.d.ts +22 -0
  287. package/dist/esm/time/resolve/calendar.js +145 -0
  288. package/dist/esm/time/resolve/calendar.js.map +1 -0
  289. package/dist/esm/time/resolve/lookback.d.ts +6 -0
  290. package/dist/esm/time/resolve/lookback.js +51 -0
  291. package/dist/esm/time/resolve/lookback.js.map +1 -0
  292. package/dist/esm/time/resolve/points.d.ts +24 -0
  293. package/dist/esm/time/resolve/points.js +97 -0
  294. package/dist/esm/time/resolve/points.js.map +1 -0
  295. package/dist/esm/time/resolve/types.d.ts +11 -0
  296. package/dist/esm/time/resolve/types.js +2 -0
  297. package/dist/esm/time/resolve/types.js.map +1 -0
  298. package/dist/esm/time/resolve/wallClock.d.ts +28 -0
  299. package/dist/esm/time/resolve/wallClock.js +70 -0
  300. package/dist/esm/time/resolve/wallClock.js.map +1 -0
  301. package/dist/esm/time/resolve/zones.d.ts +57 -0
  302. package/dist/esm/time/resolve/zones.js +147 -0
  303. package/dist/esm/time/resolve/zones.js.map +1 -0
  304. package/dist/esm/time/resolve.d.ts +2 -13
  305. package/dist/esm/time/resolve.js +28 -492
  306. package/dist/esm/time/resolve.js.map +1 -1
  307. package/dist/esm/time/resolveRecord.d.ts +6 -1
  308. package/dist/esm/time/resolveRecord.js +2 -0
  309. package/dist/esm/time/resolveRecord.js.map +1 -1
  310. package/dist/esm/time/rows/meaning.d.ts +2 -0
  311. package/dist/esm/time/rows/meaning.js +27 -0
  312. package/dist/esm/time/rows/meaning.js.map +1 -0
  313. package/dist/esm/time/rows/types.d.ts +225 -0
  314. package/dist/esm/time/rows/types.js +2 -0
  315. package/dist/esm/time/rows/types.js.map +1 -0
  316. package/dist/esm/time/rows.d.ts +9 -210
  317. package/dist/esm/time/rows.js +19 -6
  318. package/dist/esm/time/rows.js.map +1 -1
  319. package/dist/esm/time/windows.d.ts +2 -0
  320. package/dist/esm/time/windows.js +3 -2
  321. package/dist/esm/time/windows.js.map +1 -1
  322. package/dist/esm/tools/declare.d.ts +1 -1
  323. package/dist/esm/tools/declare.js +1 -1
  324. package/dist/esm/tools/inputRequest/data.d.ts +4 -0
  325. package/dist/esm/tools/inputRequest/data.js +27 -0
  326. package/dist/esm/tools/inputRequest/data.js.map +1 -0
  327. package/dist/esm/tools/inputRequest/response.d.ts +36 -0
  328. package/dist/esm/tools/inputRequest/response.js +65 -0
  329. package/dist/esm/tools/inputRequest/response.js.map +1 -0
  330. package/dist/esm/tools/inputRequest.d.ts +3 -11
  331. package/dist/esm/tools/inputRequest.js +5 -90
  332. package/dist/esm/tools/inputRequest.js.map +1 -1
  333. package/dist/lib/saidByPerson.js +2 -2
  334. package/dist/locales/timeAsk.js +3 -1
  335. package/dist/locales/timeAsk.js.map +1 -1
  336. package/dist/semantics/coverage/answer.js +2 -2
  337. package/dist/semantics/coverage/period.js +1 -1
  338. package/dist/semantics/coverage/timeLimitFacts.js +1 -1
  339. package/dist/semantics/coverage/timeLimits.js +1 -1
  340. package/dist/time/ask.js +8 -1
  341. package/dist/time/ask.js.map +1 -1
  342. package/dist/time/forms.js +2 -2
  343. package/dist/time/forms.js.map +1 -1
  344. package/dist/time/readers/english/atoms.js +168 -0
  345. package/dist/time/readers/english/atoms.js.map +1 -0
  346. package/dist/time/readers/english/grammar.js +132 -0
  347. package/dist/time/readers/english/grammar.js.map +1 -0
  348. package/dist/time/readers/english/types.js +3 -0
  349. package/dist/time/readers/english/types.js.map +1 -0
  350. package/dist/time/readers/english/zones.js +121 -0
  351. package/dist/time/readers/english/zones.js.map +1 -0
  352. package/dist/time/readers/english.js +24 -336
  353. package/dist/time/readers/english.js.map +1 -1
  354. package/dist/time/readingAsk.js +10 -2
  355. package/dist/time/readingAsk.js.map +1 -1
  356. package/dist/time/reply/classify.js +32 -0
  357. package/dist/time/reply/classify.js.map +1 -0
  358. package/dist/time/reply/decision.js +32 -0
  359. package/dist/time/reply/decision.js.map +1 -0
  360. package/dist/time/reply/decode.js +29 -0
  361. package/dist/time/reply/decode.js.map +1 -0
  362. package/dist/time/reply/project.js +41 -0
  363. package/dist/time/reply/project.js.map +1 -0
  364. package/dist/time/reply/resolve.js +67 -0
  365. package/dist/time/reply/resolve.js.map +1 -0
  366. package/dist/time/reply/types.js +18 -0
  367. package/dist/time/reply/types.js.map +1 -0
  368. package/dist/time/reply.js +7 -0
  369. package/dist/time/reply.js.map +1 -0
  370. package/dist/time/replyForm/bindings.js +60 -0
  371. package/dist/time/replyForm/bindings.js.map +1 -0
  372. package/dist/time/replyForm.js +8 -0
  373. package/dist/time/replyForm.js.map +1 -0
  374. package/dist/time/replyRecord.js +30 -0
  375. package/dist/time/replyRecord.js.map +1 -0
  376. package/dist/time/resolve/agreement.js +31 -0
  377. package/dist/time/resolve/agreement.js.map +1 -0
  378. package/dist/time/resolve/calendar.js +151 -0
  379. package/dist/time/resolve/calendar.js.map +1 -0
  380. package/dist/time/resolve/lookback.js +55 -0
  381. package/dist/time/resolve/lookback.js.map +1 -0
  382. package/dist/time/resolve/points.js +101 -0
  383. package/dist/time/resolve/points.js.map +1 -0
  384. package/dist/time/resolve/types.js +3 -0
  385. package/dist/time/resolve/types.js.map +1 -0
  386. package/dist/time/resolve/wallClock.js +78 -0
  387. package/dist/time/resolve/wallClock.js.map +1 -0
  388. package/dist/time/resolve/zones.js +154 -0
  389. package/dist/time/resolve/zones.js.map +1 -0
  390. package/dist/time/resolve.js +34 -498
  391. package/dist/time/resolve.js.map +1 -1
  392. package/dist/time/resolveRecord.js +2 -0
  393. package/dist/time/resolveRecord.js.map +1 -1
  394. package/dist/time/rows/meaning.js +31 -0
  395. package/dist/time/rows/meaning.js.map +1 -0
  396. package/dist/time/rows/types.js +3 -0
  397. package/dist/time/rows/types.js.map +1 -0
  398. package/dist/time/rows.js +20 -6
  399. package/dist/time/rows.js.map +1 -1
  400. package/dist/time/windows.js +3 -2
  401. package/dist/time/windows.js.map +1 -1
  402. package/dist/tools/declare.js +1 -1
  403. package/dist/tools/inputRequest/data.js +34 -0
  404. package/dist/tools/inputRequest/data.js.map +1 -0
  405. package/dist/tools/inputRequest/response.js +71 -0
  406. package/dist/tools/inputRequest/response.js.map +1 -0
  407. package/dist/tools/inputRequest.js +31 -116
  408. package/dist/tools/inputRequest.js.map +1 -1
  409. package/dist/types/context-bisect/ablation.d.ts +8 -0
  410. package/dist/types/context-bisect/ablation.d.ts.map +1 -1
  411. package/dist/types/context-bisect/bisect.d.ts +15 -15
  412. package/dist/types/context-bisect/bisect.d.ts.map +1 -1
  413. package/dist/types/context-bisect/conclusion.d.ts +52 -0
  414. package/dist/types/context-bisect/conclusion.d.ts.map +1 -0
  415. package/dist/types/context-bisect/conclusionTypes.d.ts +76 -0
  416. package/dist/types/context-bisect/conclusionTypes.d.ts.map +1 -0
  417. package/dist/types/context-bisect/format.d.ts +11 -0
  418. package/dist/types/context-bisect/format.d.ts.map +1 -0
  419. package/dist/types/context-bisect/index.d.ts +1 -1
  420. package/dist/types/context-bisect/index.d.ts.map +1 -1
  421. package/dist/types/context-bisect/localize.d.ts +8 -10
  422. package/dist/types/context-bisect/localize.d.ts.map +1 -1
  423. package/dist/types/context-bisect/toBacktrackTrace.d.ts.map +1 -1
  424. package/dist/types/context-bisect/types.d.ts +33 -4
  425. package/dist/types/context-bisect/types.d.ts.map +1 -1
  426. package/dist/types/core/agent/arguments/ask/constants.d.ts +17 -0
  427. package/dist/types/core/agent/arguments/ask/constants.d.ts.map +1 -0
  428. package/dist/types/core/agent/arguments/ask/context.d.ts +24 -0
  429. package/dist/types/core/agent/arguments/ask/context.d.ts.map +1 -0
  430. package/dist/types/core/agent/arguments/ask/fields.d.ts +43 -0
  431. package/dist/types/core/agent/arguments/ask/fields.d.ts.map +1 -0
  432. package/dist/types/core/agent/arguments/ask/replyFields.d.ts +10 -0
  433. package/dist/types/core/agent/arguments/ask/replyFields.d.ts.map +1 -0
  434. package/dist/types/core/agent/arguments/ask/types.d.ts +196 -0
  435. package/dist/types/core/agent/arguments/ask/types.d.ts.map +1 -0
  436. package/dist/types/core/agent/arguments/ask/validation.d.ts +43 -0
  437. package/dist/types/core/agent/arguments/ask/validation.d.ts.map +1 -0
  438. package/dist/types/core/agent/arguments/ask/windowBinding/answer.d.ts +18 -0
  439. package/dist/types/core/agent/arguments/ask/windowBinding/answer.d.ts.map +1 -0
  440. package/dist/types/core/agent/arguments/ask/windowBinding/editedZone.d.ts +12 -0
  441. package/dist/types/core/agent/arguments/ask/windowBinding/editedZone.d.ts.map +1 -0
  442. package/dist/types/core/agent/arguments/ask/windowBinding/fills.d.ts +19 -0
  443. package/dist/types/core/agent/arguments/ask/windowBinding/fills.d.ts.map +1 -0
  444. package/dist/types/core/agent/arguments/ask/windowBinding/question.d.ts +7 -0
  445. package/dist/types/core/agent/arguments/ask/windowBinding/question.d.ts.map +1 -0
  446. package/dist/types/core/agent/arguments/ask/windowBinding/types.d.ts +36 -0
  447. package/dist/types/core/agent/arguments/ask/windowBinding/types.d.ts.map +1 -0
  448. package/dist/types/core/agent/arguments/ask/windowBinding.d.ts +5 -0
  449. package/dist/types/core/agent/arguments/ask/windowBinding.d.ts.map +1 -0
  450. package/dist/types/core/agent/arguments/ask/windowReply.d.ts +12 -0
  451. package/dist/types/core/agent/arguments/ask/windowReply.d.ts.map +1 -0
  452. package/dist/types/core/agent/arguments/ask.d.ts +9 -259
  453. package/dist/types/core/agent/arguments/ask.d.ts.map +1 -1
  454. package/dist/types/core/agent/arguments/dispatch.d.ts +4 -4
  455. package/dist/types/core/agent/arguments/pendingPrivateAsk.d.ts +1 -1
  456. package/dist/types/core/agent/arguments/pendingPrivateAsk.d.ts.map +1 -1
  457. package/dist/types/core/agent/arguments/serve/assumed.d.ts +64 -0
  458. package/dist/types/core/agent/arguments/serve/assumed.d.ts.map +1 -0
  459. package/dist/types/core/agent/arguments/serve/clock.d.ts +105 -0
  460. package/dist/types/core/agent/arguments/serve/clock.d.ts.map +1 -0
  461. package/dist/types/core/agent/arguments/serve/fills.d.ts +66 -0
  462. package/dist/types/core/agent/arguments/serve/fills.d.ts.map +1 -0
  463. package/dist/types/core/agent/arguments/serve/refusals.d.ts +68 -0
  464. package/dist/types/core/agent/arguments/serve/refusals.d.ts.map +1 -0
  465. package/dist/types/core/agent/arguments/serve/schema.d.ts +68 -0
  466. package/dist/types/core/agent/arguments/serve/schema.d.ts.map +1 -0
  467. package/dist/types/core/agent/arguments/serve/values.d.ts +12 -0
  468. package/dist/types/core/agent/arguments/serve/values.d.ts.map +1 -0
  469. package/dist/types/core/agent/arguments/serve/windows.d.ts +61 -0
  470. package/dist/types/core/agent/arguments/serve/windows.d.ts.map +1 -0
  471. package/dist/types/core/agent/arguments/serve.d.ts +12 -417
  472. package/dist/types/core/agent/arguments/serve.d.ts.map +1 -1
  473. package/dist/types/core/agent/assessment/compose.d.ts +2 -2
  474. package/dist/types/core/agent/buildAgentChart.d.ts +1 -1
  475. package/dist/types/core/agent/evidence/figures.d.ts +1 -1
  476. package/dist/types/core/agent/findings/types.d.ts +2 -2
  477. package/dist/types/core/agent/findings/types.d.ts.map +1 -1
  478. package/dist/types/core/agent/middleware/rewrites.d.ts +1 -1
  479. package/dist/types/core/agent/stages/answerCoverage.d.ts +1 -1
  480. package/dist/types/core/agent/stages/argumentAsk.d.ts +1 -1
  481. package/dist/types/core/agent/stages/argumentAsk.d.ts.map +1 -1
  482. package/dist/types/core/agent/stages/prepareFinal.d.ts +1 -1
  483. package/dist/types/core/agent/stages/seed.d.ts +2 -2
  484. package/dist/types/core/agent/stages/toolCalls/contracts/access.d.ts +1 -1
  485. package/dist/types/core/agent/stages/toolCalls/helpers/sourceNote.d.ts +1 -1
  486. package/dist/types/core/agent/types.d.ts +1 -1
  487. package/dist/types/core/slots/buildToolsSlot.d.ts +4 -4
  488. package/dist/types/debug.d.ts +1 -1
  489. package/dist/types/debug.d.ts.map +1 -1
  490. package/dist/types/events/payloads/agent.d.ts +1 -1
  491. package/dist/types/index.d.ts +1 -1
  492. package/dist/types/index.d.ts.map +1 -1
  493. package/dist/types/lib/saidByPerson.d.ts +2 -2
  494. package/dist/types/locales/timeAsk.d.ts +2 -2
  495. package/dist/types/locales/timeAsk.d.ts.map +1 -1
  496. package/dist/types/semantics/coverage/answer.d.ts +3 -3
  497. package/dist/types/semantics/coverage/period.d.ts +1 -1
  498. package/dist/types/semantics/coverage/timeLimitFacts.d.ts +1 -1
  499. package/dist/types/semantics/coverage/timeLimits.d.ts +1 -1
  500. package/dist/types/time/ask.d.ts +8 -3
  501. package/dist/types/time/ask.d.ts.map +1 -1
  502. package/dist/types/time/readers/english/atoms.d.ts +4 -0
  503. package/dist/types/time/readers/english/atoms.d.ts.map +1 -0
  504. package/dist/types/time/readers/english/grammar.d.ts +50 -0
  505. package/dist/types/time/readers/english/grammar.d.ts.map +1 -0
  506. package/dist/types/time/readers/english/types.d.ts +12 -0
  507. package/dist/types/time/readers/english/types.d.ts.map +1 -0
  508. package/dist/types/time/readers/english/zones.d.ts +14 -0
  509. package/dist/types/time/readers/english/zones.d.ts.map +1 -0
  510. package/dist/types/time/readers/english.d.ts +6 -13
  511. package/dist/types/time/readers/english.d.ts.map +1 -1
  512. package/dist/types/time/readingAsk.d.ts +1 -1
  513. package/dist/types/time/readingAsk.d.ts.map +1 -1
  514. package/dist/types/time/reply/classify.d.ts +3 -0
  515. package/dist/types/time/reply/classify.d.ts.map +1 -0
  516. package/dist/types/time/reply/decision.d.ts +3 -0
  517. package/dist/types/time/reply/decision.d.ts.map +1 -0
  518. package/dist/types/time/reply/decode.d.ts +4 -0
  519. package/dist/types/time/reply/decode.d.ts.map +1 -0
  520. package/dist/types/time/reply/project.d.ts +6 -0
  521. package/dist/types/time/reply/project.d.ts.map +1 -0
  522. package/dist/types/time/reply/resolve.d.ts +5 -0
  523. package/dist/types/time/reply/resolve.d.ts.map +1 -0
  524. package/dist/types/time/reply/types.d.ts +72 -0
  525. package/dist/types/time/reply/types.d.ts.map +1 -0
  526. package/dist/types/time/reply.d.ts +4 -0
  527. package/dist/types/time/reply.d.ts.map +1 -0
  528. package/dist/types/time/replyForm/bindings.d.ts +23 -0
  529. package/dist/types/time/replyForm/bindings.d.ts.map +1 -0
  530. package/dist/types/time/replyForm.d.ts +4 -0
  531. package/dist/types/time/replyForm.d.ts.map +1 -0
  532. package/dist/types/time/replyRecord.d.ts +9 -0
  533. package/dist/types/time/replyRecord.d.ts.map +1 -0
  534. package/dist/types/time/resolve/agreement.d.ts +7 -0
  535. package/dist/types/time/resolve/agreement.d.ts.map +1 -0
  536. package/dist/types/time/resolve/calendar.d.ts +23 -0
  537. package/dist/types/time/resolve/calendar.d.ts.map +1 -0
  538. package/dist/types/time/resolve/lookback.d.ts +7 -0
  539. package/dist/types/time/resolve/lookback.d.ts.map +1 -0
  540. package/dist/types/time/resolve/points.d.ts +25 -0
  541. package/dist/types/time/resolve/points.d.ts.map +1 -0
  542. package/dist/types/time/resolve/types.d.ts +12 -0
  543. package/dist/types/time/resolve/types.d.ts.map +1 -0
  544. package/dist/types/time/resolve/wallClock.d.ts +29 -0
  545. package/dist/types/time/resolve/wallClock.d.ts.map +1 -0
  546. package/dist/types/time/resolve/zones.d.ts +58 -0
  547. package/dist/types/time/resolve/zones.d.ts.map +1 -0
  548. package/dist/types/time/resolve.d.ts +2 -13
  549. package/dist/types/time/resolve.d.ts.map +1 -1
  550. package/dist/types/time/resolveRecord.d.ts +6 -1
  551. package/dist/types/time/resolveRecord.d.ts.map +1 -1
  552. package/dist/types/time/rows/meaning.d.ts +3 -0
  553. package/dist/types/time/rows/meaning.d.ts.map +1 -0
  554. package/dist/types/time/rows/types.d.ts +226 -0
  555. package/dist/types/time/rows/types.d.ts.map +1 -0
  556. package/dist/types/time/rows.d.ts +9 -210
  557. package/dist/types/time/rows.d.ts.map +1 -1
  558. package/dist/types/time/windows.d.ts +2 -0
  559. package/dist/types/time/windows.d.ts.map +1 -1
  560. package/dist/types/tools/declare.d.ts +1 -1
  561. package/dist/types/tools/inputRequest/data.d.ts +5 -0
  562. package/dist/types/tools/inputRequest/data.d.ts.map +1 -0
  563. package/dist/types/tools/inputRequest/response.d.ts +37 -0
  564. package/dist/types/tools/inputRequest/response.d.ts.map +1 -0
  565. package/dist/types/tools/inputRequest.d.ts +3 -11
  566. package/dist/types/tools/inputRequest.d.ts.map +1 -1
  567. package/package.json +1 -1
@@ -0,0 +1,162 @@
1
+ import { renderTimeLimits } from '../../../../semantics/coverage/timeLimits.js';
2
+ import { LIBRARY_NOTE_OPENING } from '../../../../lib/saidByPerson.js';
3
+ import { presentInstant } from '../../../../time/present.js';
4
+ /**
5
+ * The served time limits from the Tools mount's `timeLimits` FACTS
6
+ * (`semantics/coverage/timeLimitFacts.ts` · `TimeLimitFacts`): rendered for the MODEL
7
+ * (`semantics/coverage/timeLimits.ts` · `renderTimeLimits` — the one composer the
8
+ * limits block asks too), then {@link timeLimitsSentence}. The facts cross
9
+ * the mount unrendered so the renderer loads here, under the arm, and never
10
+ * on the graph a plain agent loads.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * timeLimitsLine(undefined); // undefined — the turn's reads match what was asked
15
+ * ```
16
+ */
17
+ export function timeLimitsLine(facts) {
18
+ return timeLimitsSentence(renderTimeLimits(facts, 'model'));
19
+ }
20
+ // LENS · late-line · request-ephemeral
21
+ // reads: the turn's `period` rows whose result checks hold and its `source-clock` rows, composed by
22
+ // the ONE owner of the limits lines (`semantics/coverage/timeLimits.ts` · `timeLimitLinesOf`,
23
+ // audience `model`) — the same lines the limits block prints for the person after the answer
24
+ // law: the library's CONCLUSION about what each call READ against what it ASKED (step T8), both
25
+ // ranges in the person's zone, and what an answer built on it states; it names what the record
26
+ // holds for calls that already ran and promises nothing a later call can break. A source that
27
+ // holds none or part of the asked time is named with ITS span in the person's zone (`held`):
28
+ // the zone conversion is the library's, never the model's.
29
+ /**
30
+ * The time limits an answer states (time step T8's serving placement): the
31
+ * result checks that hold this turn — a read narrower, wider or shifted from
32
+ * what was asked, a window older than the source keeps, sources on different
33
+ * clocks — served to the MODEL as the library's conclusion, LATE, at the
34
+ * decision point, in the ONE served time line (TQ13) after the windows'
35
+ * halves. The step-7b bench showed why: raw facts on a result are not
36
+ * compared by the model, a conclusion served at the decision point is.
37
+ *
38
+ * `undefined` when nothing holds — a turn whose reads match what was asked
39
+ * serves no sentence at all. It carries no opening: {@link timeLine} opens
40
+ * the served line once with {@link TIME_LINE_SOURCE}.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * timeLimitsSentence({ period: ['client_activity read less than was asked — asked: …; read: …'], clocks: [] });
45
+ * // 'The time the tools read is not the time asked about — client_activity read less than was
46
+ * // asked — asked: …; read: …. So the answer to the person states the time each result read and
47
+ * // claims nothing about time no result read.'
48
+ * ```
49
+ */
50
+ export function timeLimitsSentence(lines) {
51
+ if (lines === undefined)
52
+ return undefined;
53
+ const parts = [];
54
+ if (lines.period.length > 0) {
55
+ parts.push(`the time the tools read is not the time asked about — ${lines.period.join('; ')}. So ` +
56
+ `the answer to the person states the time each result read and claims nothing about ` +
57
+ `time no result read.`);
58
+ }
59
+ // A source that holds none or only part of the asked time (take 3): the spans in the person's
60
+ // zone, so the answer names what the source holds without converting a UTC instant itself.
61
+ if (lines.held !== undefined && lines.held.length > 0) {
62
+ parts.push(`what the sources hold is not all of the time asked about — ${lines.held.join('; ')}. So ` +
63
+ `the answer to the person states what each source holds and claims nothing about the ` +
64
+ `time it does not hold.`);
65
+ }
66
+ if (lines.clocks.length > 0) {
67
+ parts.push(`Clocks: ${lines.clocks.join('; ')}.`);
68
+ }
69
+ if (parts.length === 0)
70
+ return undefined;
71
+ const capital = (part) => part.charAt(0).toUpperCase() + part.slice(1);
72
+ return parts.map(capital).join(' ');
73
+ }
74
+ /** What a line says when the run's clock zone is unknown (G15) — the zone is never guessed. */
75
+ export const UNKNOWN_ZONE_CLAUSE = "the person's time zone is not known";
76
+ // LENS · late-line · request-ephemeral
77
+ // reads: the turn's `clock` row — its `now` and zone (`zoneSource: 'unknown'` → the UTC spelling)
78
+ // law: the library's clock as a CONCLUSION, one short sentence, to the minute, the weekday named
79
+ // (a model re-derives a weekday wrong), the zone always named — and named as not known when
80
+ // it is, never guessed (G15).
81
+ /**
82
+ * The run clock, for the model (G16): the turn's `now` to the minute, its
83
+ * weekday and date in the person's zone, the zone named — so the model never
84
+ * answers "today" or "this morning" from its training date. Under `.time()`
85
+ * it is the first part of the ONE served time line on every request; never
86
+ * without it. `undefined` when there is no clock (or it cannot be spelled).
87
+ *
88
+ * @example
89
+ * ```ts
90
+ * clockSentence({ now: '2026-10-09T15:40:00Z', zone: 'America/Los_Angeles' });
91
+ * // "This turn's time: Friday 2026-10-09 08:40 America/Los_Angeles (UTC-07:00)."
92
+ * clockSentence({ now: '2026-10-09T15:40:00Z', zone: 'UTC', zoneUnknown: true });
93
+ * // "This turn's time: Friday 2026-10-09 15:40 UTC (the person's time zone is not known)."
94
+ * ```
95
+ */
96
+ export function clockSentence(clock) {
97
+ if (clock === undefined)
98
+ return undefined;
99
+ const ms = Date.parse(clock.now);
100
+ if (!Number.isFinite(ms))
101
+ return undefined;
102
+ try {
103
+ const minute = new Date(Math.floor(ms / 60_000) * 60_000).toISOString();
104
+ const at = presentInstant(minute, { zone: clock.zone });
105
+ const weekday = new Intl.DateTimeFormat('en-US', {
106
+ weekday: 'long',
107
+ timeZone: clock.zone,
108
+ }).format(ms);
109
+ const unknown = clock.zoneUnknown === true ? ` (${UNKNOWN_ZONE_CLAUSE})` : '';
110
+ return `This turn's time: ${weekday} ${at}${unknown}.`;
111
+ }
112
+ catch {
113
+ return undefined;
114
+ }
115
+ }
116
+ /**
117
+ * The ONE served time line's opening: WHO says it — the library, not the
118
+ * person. The line is a request-only `user` message, so an unmarked one reads
119
+ * as the person talking. Measured twice: the T8 bench's first paid round
120
+ * (stopped at 41 runs) — 15 of 15 answers to the limits sentence opened
121
+ * "You're right" / "I apologize", and naming the library alone (round 1,
122
+ * stopped at 46) still drew "Thank you for the clarification"; the T6b paid
123
+ * run, whose windows halves carried no opening — 37 of 37 answers after the
124
+ * unconfirmed-call sentence opened "You're right… I apologize". So it also
125
+ * says the note is no correction, and how an answer uses it. It says nothing
126
+ * about WHEN to answer: the pending half names a call as the next step.
127
+ * Applied once, by {@link timeLine}, whichever halves the line holds.
128
+ *
129
+ * The bytes are the authorship registry's (`lib/saidByPerson.ts` ·
130
+ * `LIBRARY_NOTE_OPENING`, one of `LIBRARY_AUTHORED_PREFIXES`), so the line
131
+ * that is served LAST on every request under `.time()` is never read as the
132
+ * person's words by `isSaidByPerson` — the last `role: 'user'` message of a
133
+ * request is the library's, and "this turn" is not (G17).
134
+ */
135
+ export const TIME_LINE_SOURCE = LIBRARY_NOTE_OPENING;
136
+ // LENS · late-line · request-ephemeral
137
+ // reads: the composed halves of the turn's ONE served time line — the person's windows
138
+ // (`timeWindowsLine`) and the time limits (`timeLimitsLine`) — and nothing else
139
+ // law: one line, one opening: the source is said ONCE, first, whichever halves are present; no half
140
+ // carries its own, so the opening never repeats inside the line.
141
+ /**
142
+ * The ONE served time line (TQ13): its parts in order — the windows' halves,
143
+ * then the limits — opened ONCE with {@link TIME_LINE_SOURCE}. The tools
144
+ * slot's one decoration site (`core/slots/buildToolsSlot.ts` · `commitWire`)
145
+ * calls it, `callLLM` appends the result LAST to the request, and
146
+ * `time-travel/servedView.ts` rebuilds it byte for byte from the same
147
+ * committed `timeLine` key. `undefined` when no part has anything to say — a
148
+ * turn with nothing to say serves no line (and without `.time()` nothing here
149
+ * runs at all).
150
+ *
151
+ * @example
152
+ * ```ts
153
+ * timeLine([undefined, timeLimitsLine(facts)]);
154
+ * // '[A note from the library that runs the tools — …] The time the tools read is not …'
155
+ * timeLine([undefined, undefined]); // undefined
156
+ * ```
157
+ */
158
+ export function timeLine(parts) {
159
+ const present = parts.filter((p) => p !== undefined && p.length > 0);
160
+ return present.length === 0 ? undefined : [TIME_LINE_SOURCE, ...present].join(' ');
161
+ }
162
+ //# sourceMappingURL=clock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clock.js","sourceRoot":"","sources":["../../../../../../src/core/agent/arguments/serve/clock.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAA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CAAC,EAAE,CAAC;QAC9E,OAAO,qBAAqB,OAAO,IAAI,EAAE,GAAG,OAAO,GAAG,CAAC;IACzD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAW,oBAAoB,CAAC;AAE7D,uCAAuC;AACvC,uFAAuF;AACvF,uFAAuF;AACvF,oGAAoG;AACpG,sEAAsE;AACtE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAsC;IAC7D,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,CAAC,KAAK,SAAS,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAClF,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,gBAAgB,EAAE,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrF,CAAC"}
@@ -0,0 +1,65 @@
1
+ /** Lens: the unchanged past-tense notes on calls that ran with filled arguments. */
2
+ import type { InputValue } from '../../../../tools/inputRequest.js';
3
+ import type { ServeOptions } from './schema.js';
4
+ /** One filled argument, as the note names it. */
5
+ export interface FilledArgument {
6
+ readonly argument: string;
7
+ /** A window fill of an `object` form is an object (printed as JSON). */
8
+ readonly value: InputValue | Readonly<Record<string, InputValue>>;
9
+ readonly hidden: boolean;
10
+ /**
11
+ * `answered`: the person's answer to the batch ask filled it. `window`: the
12
+ * turn's one window of the person's did (the time layer), `from` saying
13
+ * whose. Absent: the tool's rule assumed it.
14
+ */
15
+ readonly source?: 'answered' | 'window';
16
+ /**
17
+ * On a `window` fill: the person's words, a `model` reader's unconfirmed
18
+ * reading of them, a UI control — or the window the person CHOSE when the
19
+ * library asked about their words (`answered`, the lazy word-driven ask).
20
+ */
21
+ readonly from?: 'said' | 'derived-from-reading' | 'control' | 'answered';
22
+ /**
23
+ * On a `window` fill: no form held the window exactly, so the value reads a
24
+ * WIDER one (the time layer, step T5b) — `reads-more`, or `tool-trims` when
25
+ * the tool declares that it drops the rows outside the asked window.
26
+ */
27
+ readonly wider?: 'reads-more' | 'tool-trims';
28
+ /**
29
+ * The value the call had CARRIED, which the person's answer replaced
30
+ * (declared sources: an untraced value is asked about). Absent: the call
31
+ * had left the argument out.
32
+ */
33
+ readonly carried?: InputValue;
34
+ }
35
+ /**
36
+ * The past-tense note ToolCalls appends to the result of a call that RAN on a
37
+ * value the library filled — one bracket per filled argument the call really
38
+ * ran with (a clause whose fill a before-tool middleware rewrote is left
39
+ * out), after the tool's own bytes. The message then carries `toolChars`, and
40
+ * every reader of a result's content as the TOOL's words reads through that
41
+ * cut (`lib/toolBytes.ts` · `toolBytesOf`): the evidence index, the answer's
42
+ * standing and the answer account's in-view results, the unsupported-argument
43
+ * seam's grounded corpus and the empty-lookup seam's producer corpus. The
44
+ * value is kept in the note because the model needs it to reason about what
45
+ * ran ("no errors in 2h"); it is never evidence for that value, and it never
46
+ * hides a reading of the tool's own bytes.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * filledNote('search_logs', [{ argument: 'window', value: '2h', hidden: false }]);
51
+ * // '\n\n[window was not in the search_logs call this result answers; the call ran with "2h",
52
+ * // the value the tool's rule assumes — recorded as assumed, not as the person's.]'
53
+ * ```
54
+ */
55
+ export declare function filledNote(toolName: string, fills: readonly FilledArgument[], options?: ServeOptions): string;
56
+ /**
57
+ * The clause an answered note gains under declared sources: a later call may
58
+ * name the person's answer as its source — `turn`, checked against the
59
+ * ledger's `answered` rows (`checks.ts` · `checkTurn`). A permission, never a
60
+ * promise: the claim is still checked. In the paid step-5 run the model sent
61
+ * an answered period again on the next turn with no `from` entry (and so was
62
+ * asked again) or left it out (and so was asked again): nothing it was served
63
+ * said an earlier ANSWER was a source it could name.
64
+ */
65
+ export declare const ANSWERED_SOURCE_CLAUSE = "; a later call may cite that answer in `_findings.from` with source 'turn'";
@@ -0,0 +1,109 @@
1
+ import { printedValue } from './values.js';
2
+ // LENS · tool-result · persistent-history
3
+ // reads: the call's own fill (`argumentResolutions`, the layer's entry for this toolCallId), kept only
4
+ // where the call RAN with it (`core/agent/arguments/dispatch.ts` · `fillsThatRan` — a middleware may rewrite one)
5
+ // law: may omit, never deny; every clause anchored to the call it was composed on — past tense,
6
+ // naming the call this result answers, so a later call of the turn re-reading it reads a true sentence.
7
+ /**
8
+ * The past-tense note ToolCalls appends to the result of a call that RAN on a
9
+ * value the library filled — one bracket per filled argument the call really
10
+ * ran with (a clause whose fill a before-tool middleware rewrote is left
11
+ * out), after the tool's own bytes. The message then carries `toolChars`, and
12
+ * every reader of a result's content as the TOOL's words reads through that
13
+ * cut (`lib/toolBytes.ts` · `toolBytesOf`): the evidence index, the answer's
14
+ * standing and the answer account's in-view results, the unsupported-argument
15
+ * seam's grounded corpus and the empty-lookup seam's producer corpus. The
16
+ * value is kept in the note because the model needs it to reason about what
17
+ * ran ("no errors in 2h"); it is never evidence for that value, and it never
18
+ * hides a reading of the tool's own bytes.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * filledNote('search_logs', [{ argument: 'window', value: '2h', hidden: false }]);
23
+ * // '\n\n[window was not in the search_logs call this result answers; the call ran with "2h",
24
+ * // the value the tool's rule assumes — recorded as assumed, not as the person's.]'
25
+ * ```
26
+ */
27
+ export function filledNote(toolName, fills, options) {
28
+ return fills
29
+ .map((f) => f.source === 'answered'
30
+ ? answeredClause(toolName, f, options?.sources === true)
31
+ : f.source === 'window'
32
+ ? windowClause(toolName, f)
33
+ : assumedClause(toolName, f))
34
+ .join('');
35
+ }
36
+ /** A filled value as a note prints it — an object form's value as JSON. */
37
+ function printedFill(value) {
38
+ return typeof value === 'object' ? JSON.stringify(value) : printedValue(value);
39
+ }
40
+ // LENS · tool-result · persistent-history
41
+ // reads: the call's window fill (`argumentResolutions`: the turn's ONE window of the person's, converted
42
+ // into the tool's form — `time/bind.ts`), kept only where the call RAN with it, and whose window
43
+ // it was (the person's words, a model reader's unconfirmed reading of them, a UI control)
44
+ // law: may omit, never deny; past tense, naming the call this result answers; a reading of the person's
45
+ // words is never called their words.
46
+ /** The clause for a value the turn's one window of the person's filled (the time layer, step T5a). */
47
+ function windowClause(toolName, f) {
48
+ const whose = f.from === 'control'
49
+ ? 'from the window the person set in the app — recorded as set in the app'
50
+ : f.from === 'answered'
51
+ ? 'from the window the person chose when asked what their words meant — recorded as ' +
52
+ "the person's answer"
53
+ : f.from === 'derived-from-reading'
54
+ ? "from a reading of the person's words they have not confirmed — recorded as a reading, " +
55
+ "not as the person's"
56
+ : "from the window the person's own words gave — recorded as the person's";
57
+ const wider = f.wider === 'reads-more'
58
+ ? "; the tool's form could not hold that window exactly, so the value reads a wider one — " +
59
+ 'recorded as wider than asked'
60
+ : f.wider === 'tool-trims'
61
+ ? "; the tool's form could not hold that window exactly, so the value reads a wider one, " +
62
+ 'and the tool declares that it drops the rows outside the asked window'
63
+ : '';
64
+ return f.hidden
65
+ ? `\n\n[${f.argument} was not in the ${toolName} call this result answers; the call ran with ` +
66
+ `a value ${whose} (the value is hidden by the tool's view)${wider}.]`
67
+ : `\n\n[${f.argument} was not in the ${toolName} call this result answers; the call ran with ` +
68
+ `${printedFill(f.value)}, ${whose}${wider}.]`;
69
+ }
70
+ function assumedClause(toolName, f) {
71
+ return f.hidden
72
+ ? `\n\n[${f.argument} was not in the ${toolName} call this result answers; the call ran ` +
73
+ "with the value the tool's rule assumes (the value is hidden by the tool's view) — " +
74
+ "recorded as assumed, not as the person's.]"
75
+ : `\n\n[${f.argument} was not in the ${toolName} call this result answers; the call ran ` +
76
+ `with ${printedFill(f.value)}, the value the tool's rule assumes — recorded as ` +
77
+ "assumed, not as the person's.]";
78
+ }
79
+ /**
80
+ * The clause an answered note gains under declared sources: a later call may
81
+ * name the person's answer as its source — `turn`, checked against the
82
+ * ledger's `answered` rows (`checks.ts` · `checkTurn`). A permission, never a
83
+ * promise: the claim is still checked. In the paid step-5 run the model sent
84
+ * an answered period again on the next turn with no `from` entry (and so was
85
+ * asked again) or left it out (and so was asked again): nothing it was served
86
+ * said an earlier ANSWER was a source it could name.
87
+ */
88
+ export const ANSWERED_SOURCE_CLAUSE = "; a later call may cite that answer in `_findings.from` with source 'turn'";
89
+ // LENS · tool-result · persistent-history
90
+ // reads: the call's answered fill (the batch ask's answer bound to this toolCallId), kept only where the
91
+ // call RAN with it (`core/agent/arguments/dispatch.ts` · `fillsThatRan`), the value the call had carried, if any, and
92
+ // whether declared sources are armed (the `turn` clause)
93
+ // law: may omit, never deny; past tense, naming the call this result answers; the `turn` clause is a
94
+ // permission ("may cite"), never an outcome — the claim is checked like any other.
95
+ function answeredClause(toolName, f, sources) {
96
+ const before = f.carried === undefined
97
+ ? 'the call had left it out'
98
+ : f.hidden
99
+ ? 'the call had carried a value of its own'
100
+ : `the call had carried ${printedValue(f.carried)}`;
101
+ // A hidden answer is on the record as 'REDACTED' — a `turn` claim for it cannot be checked
102
+ // (`checks.ts` · `checkTurn`: `uncheckable`), so its clause offers none.
103
+ return f.hidden
104
+ ? `\n\n[${f.argument} in the ${toolName} call this result answers was chosen by the person ` +
105
+ `when asked (the value is hidden by the tool's view; ${before}).]`
106
+ : `\n\n[${f.argument} = ${printedFill(f.value)} in the ${toolName} call this result answers ` +
107
+ `was chosen by the person when asked (${before})${sources ? ANSWERED_SOURCE_CLAUSE : ''}.]`;
108
+ }
109
+ //# sourceMappingURL=fills.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fills.js","sourceRoot":"","sources":["../../../../../../src/core/agent/arguments/serve/fills.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAoC3C,0CAA0C;AAC1C,uGAAuG;AACvG,yHAAyH;AACzH,gGAAgG;AAChG,wGAAwG;AACxG;;;;;;;;;;;;;;;;;;;GAmBG;AACH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QAAQ,CAAC,CAAC,QAAQ,WAAW,QAAQ,qDAAqD;YACxF,uDAAuD,MAAM,KAAK;QACtE,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,MAAM,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,QAAQ,4BAA4B;YACzF,wCAAwC,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC;AACpG,CAAC"}
@@ -0,0 +1,67 @@
1
+ /** Lens: the unchanged past-tense refusal and kept-answer sentences. */
2
+ import type { PeriodFacts, TimeRefusal } from '../../../../time/convert.js';
3
+ /** The result a call reads when its tool's rules could not be read at dispatch. */
4
+ export declare function unreadableRulesRefusal(toolName: string, reason: string): string;
5
+ /**
6
+ * The result a call reads when its tool declares argument rules and the agent
7
+ * was built without the inputs layer (a ToolProvider served the tool, and the
8
+ * build could not see it) — refused rather than run unruled, because
9
+ * configured-and-inert looks exactly like configured-and-working.
10
+ */
11
+ export declare function unmountedRulesRefusal(toolName: string): string;
12
+ /**
13
+ * The result a call reads when the person was asked for a ruled argument
14
+ * `MAX_ASK_ROUNDS` times and no answer fitted what the tool accepts — the call
15
+ * does not run. `expected` is the property schema's own expectation (never the
16
+ * person's answer).
17
+ */
18
+ export declare function unansweredRefusal(toolName: string, unanswered: readonly {
19
+ readonly argument: string;
20
+ readonly expected?: string;
21
+ }[]): string;
22
+ /**
23
+ * The result a call reads when it needed a person — its check-in consent gate
24
+ * tripped, or the tool itself asked to pause — in a batch that had ALREADY
25
+ * paused once, to ask the person for argument values: a resumed batch has no
26
+ * second pause to give (at most one human question per resume). The call did
27
+ * not finish; nothing about it is decided for the person.
28
+ */
29
+ export declare function secondPauseRefusal(toolName: string, why: 'check-in' | 'tool-pause'): string;
30
+ /**
31
+ * The result a call reads when it was refused BEFORE DISPATCH on its window
32
+ * (the time layer, step T5b — time design § 7.2): the window breaks one of the
33
+ * tool's declared facts, spans days for a tool that reads one day per call, a
34
+ * sent wall time is one the zone's clocks skip, or no form the tool declares
35
+ * can read the person's window, exactly or wider (`no-form-holds` — the tool's
36
+ * own default never stands in for it). Splitting a window into several calls
37
+ * is the model's choice, never the library's.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * timeRefusal('search_logs', 'time-future', { direction: 'past' });
42
+ * // 'search_logs was not run on that call: the window it asked for had not happened yet, and the
43
+ * // tool declares that its source holds only the past.'
44
+ * ```
45
+ */
46
+ export declare function timeRefusal(toolName: string, refusal: TimeRefusal, facts: PeriodFacts, argument?: string): string;
47
+ /**
48
+ * Why a window was refused before dispatch, in the tool's declared facts and
49
+ * an argument name only — never the window's value. ONE text per code: the
50
+ * refused call's result ({@link timeRefusal}) and the served line's
51
+ * conclusion (`refusedSentence`) both say it.
52
+ */
53
+ export declare function refusalReason(refusal: TimeRefusal, facts: PeriodFacts, argument?: string): string;
54
+ /**
55
+ * The clause a refusal by the one-question law gains when the refused call
56
+ * carried the person's answers: they were KEPT for the tool's next call that
57
+ * leaves those arguments out (`kept.ts`), so the model may propose the call
58
+ * again without them. Empty when the call carried none.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * keptAnswersNote('purge_logs', ['window']);
63
+ * // " The person's answer for window was kept for the next purge_logs call that leaves it out,
64
+ * // so the call may be proposed again without window."
65
+ * ```
66
+ */
67
+ export declare function keptAnswersNote(toolName: string, argumentNames: readonly string[]): string;
@@ -0,0 +1,148 @@
1
+ // ─── The refusals ───────────────────────────────────────────────────────
2
+ // LENS · tool-result · persistent-history
3
+ // reads: the dispatch re-read of the tool's rules (`tools/declare.ts` · `rulesOf`) — the assert's own sentence
4
+ // law: may omit, never deny; every clause anchored to the call it was composed on.
5
+ /** The result a call reads when its tool's rules could not be read at dispatch. */
6
+ export function unreadableRulesRefusal(toolName, reason) {
7
+ const why = reason.replace(/^defineTool\('[^']*'\):\s*/, '');
8
+ return `${toolName} was not run on that call: its argument rules could not be read (${why}).`;
9
+ }
10
+ // LENS · tool-result · persistent-history
11
+ // reads: nothing but the tool's declaration — the agent was built without the inputs layer
12
+ // law: may omit, never deny; every clause anchored to the call it was composed on.
13
+ /**
14
+ * The result a call reads when its tool declares argument rules and the agent
15
+ * was built without the inputs layer (a ToolProvider served the tool, and the
16
+ * build could not see it) — refused rather than run unruled, because
17
+ * configured-and-inert looks exactly like configured-and-working.
18
+ */
19
+ export function unmountedRulesRefusal(toolName) {
20
+ return `${toolName} was not run on that call: it declares argument rules this agent was not built to apply.`;
21
+ }
22
+ // LENS · tool-result · persistent-history
23
+ // reads: the batch ask's settled state — the arguments whose answers never fit, and the rule they failed
24
+ // law: may omit, never deny; every clause anchored to the call it was composed on.
25
+ /**
26
+ * The result a call reads when the person was asked for a ruled argument
27
+ * `MAX_ASK_ROUNDS` times and no answer fitted what the tool accepts — the call
28
+ * does not run. `expected` is the property schema's own expectation (never the
29
+ * person's answer).
30
+ */
31
+ export function unansweredRefusal(toolName, unanswered) {
32
+ const names = unanswered.map((u) => u.argument).join(', ');
33
+ const rules = unanswered.flatMap((u) => u.expected !== undefined ? [`${u.argument}: ${u.expected}`] : []);
34
+ return (`${toolName} was not run on that call: the person's answers for ${names} did not fit what ` +
35
+ `the tool accepts${rules.length > 0 ? ` (${rules.join('; ')})` : ''}.`);
36
+ }
37
+ // LENS · tool-result · persistent-history
38
+ // reads: nothing but the fact that this batch already paused once, for the library's own ask
39
+ // law: may omit, never deny; past tense, anchored to the call; names no destination.
40
+ /**
41
+ * The result a call reads when it needed a person — its check-in consent gate
42
+ * tripped, or the tool itself asked to pause — in a batch that had ALREADY
43
+ * paused once, to ask the person for argument values: a resumed batch has no
44
+ * second pause to give (at most one human question per resume). The call did
45
+ * not finish; nothing about it is decided for the person.
46
+ */
47
+ export function secondPauseRefusal(toolName, why) {
48
+ const need = why === 'check-in'
49
+ ? 'its check-in consent gate needed a person’s approval for those arguments'
50
+ : 'the tool asked to pause for a person';
51
+ return (`${toolName} was not run to completion on that call: ${need}, and this batch had already ` +
52
+ 'paused once — to ask the person for argument values — so there was no second pause to ' +
53
+ 'ask with.');
54
+ }
55
+ // LENS · tool-result · persistent-history
56
+ // reads: the call's `call-window` decision (`time/bind.ts` · `callWindowOf`: the window it asked
57
+ // for against the tool's DECLARED facts — `direction`, `retention`, `maxRange`, a `day`-only form,
58
+ // a sent wall time the zone skips, a person's window no declared form can read) and those facts'
59
+ // own spellings
60
+ // law: may omit, never deny; past tense, anchored to the call; prints no window value (it may be the
61
+ // person's) — only the tool's declared facts and an argument name; says what the model may do and
62
+ // promises no outcome.
63
+ /**
64
+ * The result a call reads when it was refused BEFORE DISPATCH on its window
65
+ * (the time layer, step T5b — time design § 7.2): the window breaks one of the
66
+ * tool's declared facts, spans days for a tool that reads one day per call, a
67
+ * sent wall time is one the zone's clocks skip, or no form the tool declares
68
+ * can read the person's window, exactly or wider (`no-form-holds` — the tool's
69
+ * own default never stands in for it). Splitting a window into several calls
70
+ * is the model's choice, never the library's.
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * timeRefusal('search_logs', 'time-future', { direction: 'past' });
75
+ * // 'search_logs was not run on that call: the window it asked for had not happened yet, and the
76
+ * // tool declares that its source holds only the past.'
77
+ * ```
78
+ */
79
+ export function timeRefusal(toolName, refusal, facts, argument) {
80
+ return `${toolName} was not run on that call: ${refusalReason(refusal, facts, argument)}.`;
81
+ }
82
+ /**
83
+ * Why a window was refused before dispatch, in the tool's declared facts and
84
+ * an argument name only — never the window's value. ONE text per code: the
85
+ * refused call's result ({@link timeRefusal}) and the served line's
86
+ * conclusion (`refusedSentence`) both say it.
87
+ */
88
+ export function refusalReason(refusal, facts, argument) {
89
+ switch (refusal) {
90
+ case 'time-future':
91
+ return ('the window it asked for had not happened yet, and the tool declares that its source ' +
92
+ 'holds only the past');
93
+ case 'time-past':
94
+ return ('the window it asked for had already ended, and the tool declares that its source ' +
95
+ 'holds only the future');
96
+ case 'beyond-retention':
97
+ return ('the window it asked for was wholly older than the oldest data the tool declares its ' +
98
+ `source keeps (${facts.retention ?? 'its retention'})`);
99
+ case 'over-max-range':
100
+ return ('the window it asked for was wider than the tool declares it reads at once ' +
101
+ `(maxRange ${facts.maxRange ?? 'undeclared'}); narrower windows, one call each, may be ` +
102
+ 'proposed instead');
103
+ case 'multi-day':
104
+ return ('the window it asked for spanned more than one calendar day, and the tool reads one day ' +
105
+ 'per call; one call per day may be proposed instead');
106
+ case 'dst-gap':
107
+ return (`the wall time sent for ${argument ?? 'its period'} does not exist in the tool's zone — ` +
108
+ 'the clocks skip it at a daylight-saving change');
109
+ case 'no-form-holds':
110
+ return ('no period form the tool declares can read the window it asked for, exactly or by ' +
111
+ 'reading a wider one' +
112
+ (facts.maxRange !== undefined
113
+ ? `, within the most the tool declares it reads at once (maxRange ${facts.maxRange})`
114
+ : ''));
115
+ }
116
+ }
117
+ // LENS · tool-result · persistent-history
118
+ // reads: the tool's name and the NAMES of the arguments whose answers the refused call carried
119
+ // (`kept.ts` keeps their values)
120
+ // law: past tense, anchored to the call it was composed on, so a later call of the turn re-reading it
121
+ // (after the kept answer was used) still reads a true sentence; says what the model may do and promises
122
+ // no outcome (a call proposed again may still be denied, refused, paused or asked); prints no value.
123
+ /**
124
+ * The clause a refusal by the one-question law gains when the refused call
125
+ * carried the person's answers: they were KEPT for the tool's next call that
126
+ * leaves those arguments out (`kept.ts`), so the model may propose the call
127
+ * again without them. Empty when the call carried none.
128
+ *
129
+ * @example
130
+ * ```ts
131
+ * keptAnswersNote('purge_logs', ['window']);
132
+ * // " The person's answer for window was kept for the next purge_logs call that leaves it out,
133
+ * // so the call may be proposed again without window."
134
+ * ```
135
+ */
136
+ export function keptAnswersNote(toolName, argumentNames) {
137
+ if (argumentNames.length === 0)
138
+ return '';
139
+ if (argumentNames.length === 1) {
140
+ const [name] = argumentNames;
141
+ return (` The person's answer for ${name} was kept for the next ${toolName} call that leaves ` +
142
+ `it out, so the call may be proposed again without ${name}.`);
143
+ }
144
+ const names = `${argumentNames.slice(0, -1).join(', ')} and ${argumentNames.at(-1)}`;
145
+ return (` The person's answers for ${names} were kept for the next ${toolName} call that leaves ` +
146
+ 'them out, so the call may be proposed again without them.');
147
+ }
148
+ //# sourceMappingURL=refusals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refusals.js","sourceRoot":"","sources":["../../../../../../src/core/agent/arguments/serve/refusals.ts"],"names":[],"mappings":"AAGA,2EAA2E;AAE3E,0CAA0C;AAC1C,+GAA+G;AAC/G,mFAAmF;AACnF,mFAAmF;AACnF,MAAM,UAAU,sBAAsB,CAAC,QAAgB,EAAE,MAAc;IACrE,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,4BAA4B,EAAE,EAAE,CAAC,CAAC;IAC7D,OAAO,GAAG,QAAQ,oEAAoE,GAAG,IAAI,CAAC;AAChG,CAAC;AAED,0CAA0C;AAC1C,2FAA2F;AAC3F,mFAAmF;AACnF;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAAgB;IACpD,OAAO,GAAG,QAAQ,0FAA0F,CAAC;AAC/G,CAAC;AAED,0CAA0C;AAC1C,yGAAyG;AACzG,mFAAmF;AACnF;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAAgB,EAChB,UAAgF;IAEhF,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CACrC,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CACjE,CAAC;IACF,OAAO,CACL,GAAG,QAAQ,uDAAuD,KAAK,oBAAoB;QAC3F,mBAAmB,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,C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kB,CACnB,CAAC;QACJ,KAAK,WAAW;YACd,OAAO,CACL,yFAAyF;gBACzF,oDAAoD,CACrD,CAAC;QACJ,KAAK,SAAS;YACZ,OAAO,CACL,0BAA0B,QAAQ,IAAI,YAAY,uCAAuC;gBACzF,gDAAgD,CACjD,CAAC;QACJ,KAAK,eAAe;YAClB,OAAO,CACL,mFAAmF;gBACnF,qBAAqB;gBACrB,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS;oBAC3B,CAAC,CAAC,kEAAkE,KAAK,CAAC,QAAQ,GAAG;oBACrF,CAAC,CAAC,EAAE,CAAC,CACR,CAAC;IACN,CAAC;AACH,CAAC;AAED,0CAA0C;AAC1C,+FAA+F;AAC/F,wCAAwC;AACxC,sGAAsG;AACtG,wGAAwG;AACxG,qGAAqG;AACrG;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB,EAAE,aAAgC;IAChF,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC1C,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,MAAM,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC;QAC7B,OAAO,CACL,4BAA4B,IAAI,0BAA0B,QAAQ,oBAAoB;YACtF,qDAAqD,IAAI,GAAG,CAC7D,CAAC;IACJ,CAAC;IACD,MAAM,KAAK,GAAG,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACrF,OAAO,CACL,6BAA6B,KAAK,2BAA2B,QAAQ,oBAAoB;QACzF,2DAA2D,CAC5D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,67 @@
1
+ /** Lens: the unchanged served copy of ruled tool schemas. */
2
+ import type { LLMToolSchema } from '../../../../provider-contract/types.js';
3
+ import { type RuledToolLike } from '../../../../tools/declare.js';
4
+ /**
5
+ * The sentence a ruled `ask` property carries in the served schema: the rule
6
+ * asks the person for the value, so the model may leave it out — and should,
7
+ * unless the person gave it. No value is printed: an `ask` rule has no default.
8
+ */
9
+ export declare const ASK_SENTENCE = "The tool's rule asks the person for this value; leave it out unless the person gave it.";
10
+ /**
11
+ * The sentence a ruled `ask` property carries under DECLARED SOURCES
12
+ * (`.findings({ argumentSources: true })`, `.inputsLayer({ argumentSources:
13
+ * true })`) in place of `ASK_SENTENCE`: the same rule, and — at the place the
14
+ * model decides whether to send the value — where it says the person gave it.
15
+ * Under the arm a present value with no traced source is asked of the person
16
+ * (`resolve.ts`), so "leave it out unless the person gave it" alone told the
17
+ * model that SENDING the value was the whole of its statement: in the paid
18
+ * step-5 run (`bench/inputs/runs/haiku45-step5`) it left the period out on 32
19
+ * of 32 calls where the person gave none — and a period the person HAD given
20
+ * was traced to their words, unasked, on 7 of 88 calls.
21
+ */
22
+ export declare const ASK_SOURCES_SENTENCE: string;
23
+ /** The options every served-schema composer here takes. */
24
+ export interface ServeOptions {
25
+ /**
26
+ * Declared sources are armed (`.findings({ argumentSources: true })` or
27
+ * `.inputsLayer({ argumentSources: true })`) AND this tool's served schema
28
+ * carries `_findings.from`: an `ask` property says where the model declares
29
+ * the person's words, and an answered note says a later call may cite the
30
+ * answer. The CALLER decides it per tool, by the rule the planters and the
31
+ * dispatch peel ask (`findings/reserved.ts` · `ownsReservedArgument`, which
32
+ * this leaf cannot import): a tool whose author owns `_findings` is served
33
+ * undecorated, so a sentence naming `_findings.from` would tell the model to
34
+ * write into the author's own argument. Absent → the sentences steps 3 and 4
35
+ * serve, byte for byte.
36
+ */
37
+ readonly sources?: boolean;
38
+ }
39
+ /**
40
+ * The served copy of a ruled tool's schema: every argument an `assume` or an
41
+ * `ask` rule governs leaves `required` (the library fills it, or asks the
42
+ * person for it, when the call leaves it out) and its property's description
43
+ * gains the rule's sentence (an `ask` rule's names `_findings.from` under the
44
+ * sources arm, `options.sources`). A rebuilt copy — the registry schema, which
45
+ * `validateToolArgs` judges and `mcpServe` serves, is never edited. The SAME
46
+ * reference back for a tool with no rules, rules that cannot be read (the
47
+ * dispatch re-read refuses its calls) or no tool at all (a chart with no
48
+ * claimant record) — so an agent whose tools declare nothing serves the bytes
49
+ * it always did.
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * withArgumentRules(searchLogs.schema, searchLogs).inputSchema.required; // ['service']
54
+ * ```
55
+ */
56
+ export declare function withArgumentRules(schema: LLMToolSchema, tool: RuledToolLike | undefined, options?: ServeOptions): LLMToolSchema;
57
+ /**
58
+ * The served list with each ruled tool's schema decorated (`withArgumentRules`,
59
+ * from the rules of the implementation that WINS each name), or the SAME list
60
+ * when no served schema changed — so an armed agent whose wire carries no
61
+ * ruled tool commits the bytes it always did. The tools slot's one decoration
62
+ * site (`core/slots/buildToolsSlot.ts` · `commitWire`) calls it under the arm.
63
+ * `optionsOf` gives each schema its own `ServeOptions`: under declared sources
64
+ * one wire can hold a tool that carries `_findings.from` beside a provider's
65
+ * tool whose author owns `_findings`, which does not.
66
+ */
67
+ export declare function rulesOnWire(served: readonly LLMToolSchema[], winningTools: ReadonlyMap<string, RuledToolLike>, optionsOf?: (schema: LLMToolSchema) => ServeOptions | undefined): readonly LLMToolSchema[];