agentfootprint 9.128.1 → 9.131.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 (603) hide show
  1. package/CAPABILITIES.md +13 -1
  2. package/dist/adapters/llm/AnthropicProvider.js +10 -111
  3. package/dist/adapters/llm/AnthropicProvider.js.map +1 -1
  4. package/dist/adapters/llm/BedrockProvider.js +11 -4
  5. package/dist/adapters/llm/BedrockProvider.js.map +1 -1
  6. package/dist/adapters/llm/InvokeModelGatewayProvider.js +167 -35
  7. package/dist/adapters/llm/InvokeModelGatewayProvider.js.map +1 -1
  8. package/dist/adapters/llm/OpenAIProvider.js +5 -0
  9. package/dist/adapters/llm/OpenAIProvider.js.map +1 -1
  10. package/dist/adapters/llm/anthropicMessagesWire.js +20 -6
  11. package/dist/adapters/llm/anthropicMessagesWire.js.map +1 -1
  12. package/dist/adapters/llm/retryAfter.js +61 -0
  13. package/dist/adapters/llm/retryAfter.js.map +1 -0
  14. package/dist/adapters/types.js.map +1 -1
  15. package/dist/artifacts/datasetResult.js +2 -2
  16. package/dist/artifacts/datasetResult.js.map +1 -1
  17. package/dist/artifacts/index.js +10 -8
  18. package/dist/artifacts/index.js.map +1 -1
  19. package/dist/artifacts/minting.js +2 -2
  20. package/dist/artifacts/minting.js.map +1 -1
  21. package/dist/core/Agent.js +229 -5
  22. package/dist/core/Agent.js.map +1 -1
  23. package/dist/core/agent/AgentBuilder.js +75 -1
  24. package/dist/core/agent/AgentBuilder.js.map +1 -1
  25. package/dist/core/agent/arguments/ask.js +356 -14
  26. package/dist/core/agent/arguments/ask.js.map +1 -1
  27. package/dist/core/agent/arguments/declare.js +260 -45
  28. package/dist/core/agent/arguments/declare.js.map +1 -1
  29. package/dist/core/agent/arguments/dispatch.js +25 -1
  30. package/dist/core/agent/arguments/dispatch.js.map +1 -1
  31. package/dist/core/agent/arguments/resolve.js +239 -6
  32. package/dist/core/agent/arguments/resolve.js.map +1 -1
  33. package/dist/core/agent/arguments/rows.js +37 -2
  34. package/dist/core/agent/arguments/rows.js.map +1 -1
  35. package/dist/core/agent/arguments/serve.js +332 -4
  36. package/dist/core/agent/arguments/serve.js.map +1 -1
  37. package/dist/core/agent/arguments/subflow.js +46 -7
  38. package/dist/core/agent/arguments/subflow.js.map +1 -1
  39. package/dist/core/agent/assessment/assess.js +45 -6
  40. package/dist/core/agent/assessment/assess.js.map +1 -1
  41. package/dist/core/agent/assessment/compose.js +3 -0
  42. package/dist/core/agent/assessment/compose.js.map +1 -1
  43. package/dist/core/agent/assessment/reasons.js +18 -0
  44. package/dist/core/agent/assessment/reasons.js.map +1 -1
  45. package/dist/core/agent/buildAgentChart.js +31 -1
  46. package/dist/core/agent/buildAgentChart.js.map +1 -1
  47. package/dist/core/agent/buildDynamicAgentChart.js +9 -0
  48. package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
  49. package/dist/core/agent/coverage/answer.js +24 -7
  50. package/dist/core/agent/coverage/answer.js.map +1 -1
  51. package/dist/core/agent/coverage/period.js +110 -69
  52. package/dist/core/agent/coverage/period.js.map +1 -1
  53. package/dist/core/agent/coverage/timeLimitFacts.js +70 -0
  54. package/dist/core/agent/coverage/timeLimitFacts.js.map +1 -0
  55. package/dist/core/agent/coverage/timeLimits.js +72 -0
  56. package/dist/core/agent/coverage/timeLimits.js.map +1 -0
  57. package/dist/core/agent/evidence/evidenceIndex.js +48 -7
  58. package/dist/core/agent/evidence/evidenceIndex.js.map +1 -1
  59. package/dist/core/agent/evidence/gate.js +9 -4
  60. package/dist/core/agent/evidence/gate.js.map +1 -1
  61. package/dist/core/agent/evidence/normalize.js +1 -105
  62. package/dist/core/agent/evidence/normalize.js.map +1 -1
  63. package/dist/core/agent/findings/ledger.js +14 -0
  64. package/dist/core/agent/findings/ledger.js.map +1 -1
  65. package/dist/core/agent/findings/types.js.map +1 -1
  66. package/dist/core/agent/honesty/mounts.js +105 -4
  67. package/dist/core/agent/honesty/mounts.js.map +1 -1
  68. package/dist/core/agent/results/subflow.js +43 -11
  69. package/dist/core/agent/results/subflow.js.map +1 -1
  70. package/dist/core/agent/stages/argumentAsk.js +85 -6
  71. package/dist/core/agent/stages/argumentAsk.js.map +1 -1
  72. package/dist/core/agent/stages/callLLM.js +16 -0
  73. package/dist/core/agent/stages/callLLM.js.map +1 -1
  74. package/dist/core/agent/stages/prepareFinal.js +61 -8
  75. package/dist/core/agent/stages/prepareFinal.js.map +1 -1
  76. package/dist/core/agent/stages/route.js +64 -6
  77. package/dist/core/agent/stages/route.js.map +1 -1
  78. package/dist/core/agent/stages/seed.js +29 -6
  79. package/dist/core/agent/stages/seed.js.map +1 -1
  80. package/dist/core/agent/stages/timeLayer.js +201 -0
  81. package/dist/core/agent/stages/timeLayer.js.map +1 -0
  82. package/dist/core/agent/stages/timeLineage.js +61 -0
  83. package/dist/core/agent/stages/timeLineage.js.map +1 -0
  84. package/dist/core/agent/stages/toolCalls.js +70 -0
  85. package/dist/core/agent/stages/toolCalls.js.map +1 -1
  86. package/dist/core/inputRequest.js +132 -5
  87. package/dist/core/inputRequest.js.map +1 -1
  88. package/dist/core/messageFrom.js +5 -2
  89. package/dist/core/messageFrom.js.map +1 -1
  90. package/dist/core/runCheckpoint.js +17 -2
  91. package/dist/core/runCheckpoint.js.map +1 -1
  92. package/dist/core/slots/buildToolsSlot.js +30 -2
  93. package/dist/core/slots/buildToolsSlot.js.map +1 -1
  94. package/dist/core/time/ask.js +239 -0
  95. package/dist/core/time/ask.js.map +1 -0
  96. package/dist/core/time/axis.js +469 -0
  97. package/dist/core/time/axis.js.map +1 -0
  98. package/dist/core/time/bind.js +235 -0
  99. package/dist/core/time/bind.js.map +1 -0
  100. package/dist/core/time/check.js +261 -0
  101. package/dist/core/time/check.js.map +1 -0
  102. package/dist/core/time/checkRecord.js +97 -0
  103. package/dist/core/time/checkRecord.js.map +1 -0
  104. package/dist/core/time/clock.js +260 -0
  105. package/dist/core/time/clock.js.map +1 -0
  106. package/dist/core/time/convert.js +634 -0
  107. package/dist/core/time/convert.js.map +1 -0
  108. package/dist/core/time/drift.js +96 -0
  109. package/dist/core/time/drift.js.map +1 -0
  110. package/dist/core/time/duration.js +125 -0
  111. package/dist/core/time/duration.js.map +1 -0
  112. package/dist/core/time/forms.js +273 -0
  113. package/dist/core/time/forms.js.map +1 -0
  114. package/dist/core/time/instant.js +141 -0
  115. package/dist/core/time/instant.js.map +1 -0
  116. package/dist/core/time/periodForm.js +392 -0
  117. package/dist/core/time/periodForm.js.map +1 -0
  118. package/dist/core/time/present.js +312 -0
  119. package/dist/core/time/present.js.map +1 -0
  120. package/dist/core/time/range.js +267 -0
  121. package/dist/core/time/range.js.map +1 -0
  122. package/dist/core/time/reader.js +209 -0
  123. package/dist/core/time/reader.js.map +1 -0
  124. package/dist/core/time/readers/english.js +576 -0
  125. package/dist/core/time/readers/english.js.map +1 -0
  126. package/dist/core/time/readingAsk.js +94 -0
  127. package/dist/core/time/readingAsk.js.map +1 -0
  128. package/dist/core/time/resolve.js +694 -0
  129. package/dist/core/time/resolve.js.map +1 -0
  130. package/dist/core/time/resolveRecord.js +164 -0
  131. package/dist/core/time/resolveRecord.js.map +1 -0
  132. package/dist/core/time/rows.js +412 -0
  133. package/dist/core/time/rows.js.map +1 -0
  134. package/dist/core/time/rowsBuild.js +193 -0
  135. package/dist/core/time/rowsBuild.js.map +1 -0
  136. package/dist/core/time/textForms.js +133 -0
  137. package/dist/core/time/textForms.js.map +1 -0
  138. package/dist/core/time/windows.js +172 -0
  139. package/dist/core/time/windows.js.map +1 -0
  140. package/dist/core/time/wire.js +86 -0
  141. package/dist/core/time/wire.js.map +1 -0
  142. package/dist/core/time/zone.js +253 -0
  143. package/dist/core/time/zone.js.map +1 -0
  144. package/dist/core/tools.js.map +1 -1
  145. package/dist/esm/adapters/llm/AnthropicProvider.js +8 -109
  146. package/dist/esm/adapters/llm/AnthropicProvider.js.map +1 -1
  147. package/dist/esm/adapters/llm/BedrockProvider.js +11 -4
  148. package/dist/esm/adapters/llm/BedrockProvider.js.map +1 -1
  149. package/dist/esm/adapters/llm/InvokeModelGatewayProvider.d.ts +38 -4
  150. package/dist/esm/adapters/llm/InvokeModelGatewayProvider.js +167 -35
  151. package/dist/esm/adapters/llm/InvokeModelGatewayProvider.js.map +1 -1
  152. package/dist/esm/adapters/llm/OpenAIProvider.js +5 -0
  153. package/dist/esm/adapters/llm/OpenAIProvider.js.map +1 -1
  154. package/dist/esm/adapters/llm/anthropicMessagesWire.d.ts +6 -1
  155. package/dist/esm/adapters/llm/anthropicMessagesWire.js +20 -6
  156. package/dist/esm/adapters/llm/anthropicMessagesWire.js.map +1 -1
  157. package/dist/esm/adapters/llm/retryAfter.d.ts +27 -0
  158. package/dist/esm/adapters/llm/retryAfter.js +56 -0
  159. package/dist/esm/adapters/llm/retryAfter.js.map +1 -0
  160. package/dist/esm/adapters/types.d.ts +9 -0
  161. package/dist/esm/adapters/types.js.map +1 -1
  162. package/dist/esm/artifacts/datasetResult.js +1 -1
  163. package/dist/esm/artifacts/datasetResult.js.map +1 -1
  164. package/dist/esm/artifacts/index.d.ts +1 -1
  165. package/dist/esm/artifacts/index.js +3 -2
  166. package/dist/esm/artifacts/index.js.map +1 -1
  167. package/dist/esm/artifacts/minting.js +1 -1
  168. package/dist/esm/artifacts/minting.js.map +1 -1
  169. package/dist/esm/artifacts/types.d.ts +2 -2
  170. package/dist/esm/core/Agent.d.ts +64 -0
  171. package/dist/esm/core/Agent.js +230 -6
  172. package/dist/esm/core/Agent.js.map +1 -1
  173. package/dist/esm/core/agent/AgentBuilder.d.ts +60 -0
  174. package/dist/esm/core/agent/AgentBuilder.js +75 -1
  175. package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
  176. package/dist/esm/core/agent/arguments/ask.d.ts +88 -5
  177. package/dist/esm/core/agent/arguments/ask.js +349 -8
  178. package/dist/esm/core/agent/arguments/ask.js.map +1 -1
  179. package/dist/esm/core/agent/arguments/checks.d.ts +1 -1
  180. package/dist/esm/core/agent/arguments/declare.d.ts +76 -15
  181. package/dist/esm/core/agent/arguments/declare.js +255 -44
  182. package/dist/esm/core/agent/arguments/declare.js.map +1 -1
  183. package/dist/esm/core/agent/arguments/dispatch.js +25 -1
  184. package/dist/esm/core/agent/arguments/dispatch.js.map +1 -1
  185. package/dist/esm/core/agent/arguments/resolve.d.ts +77 -7
  186. package/dist/esm/core/agent/arguments/resolve.js +239 -8
  187. package/dist/esm/core/agent/arguments/resolve.js.map +1 -1
  188. package/dist/esm/core/agent/arguments/rows.d.ts +31 -2
  189. package/dist/esm/core/agent/arguments/rows.js +35 -1
  190. package/dist/esm/core/agent/arguments/rows.js.map +1 -1
  191. package/dist/esm/core/agent/arguments/serve.d.ts +133 -4
  192. package/dist/esm/core/agent/arguments/serve.js +328 -4
  193. package/dist/esm/core/agent/arguments/serve.js.map +1 -1
  194. package/dist/esm/core/agent/arguments/subflow.d.ts +28 -0
  195. package/dist/esm/core/agent/arguments/subflow.js +47 -8
  196. package/dist/esm/core/agent/arguments/subflow.js.map +1 -1
  197. package/dist/esm/core/agent/assessment/assess.js +45 -6
  198. package/dist/esm/core/agent/assessment/assess.js.map +1 -1
  199. package/dist/esm/core/agent/assessment/compose.js +3 -0
  200. package/dist/esm/core/agent/assessment/compose.js.map +1 -1
  201. package/dist/esm/core/agent/assessment/reasons.js +18 -0
  202. package/dist/esm/core/agent/assessment/reasons.js.map +1 -1
  203. package/dist/esm/core/agent/assessment/types.d.ts +15 -1
  204. package/dist/esm/core/agent/buildAgentChart.d.ts +41 -0
  205. package/dist/esm/core/agent/buildAgentChart.js +28 -0
  206. package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
  207. package/dist/esm/core/agent/buildDynamicAgentChart.d.ts +1 -1
  208. package/dist/esm/core/agent/buildDynamicAgentChart.js +9 -0
  209. package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
  210. package/dist/esm/core/agent/coverage/answer.d.ts +20 -1
  211. package/dist/esm/core/agent/coverage/answer.js +23 -6
  212. package/dist/esm/core/agent/coverage/answer.js.map +1 -1
  213. package/dist/esm/core/agent/coverage/period.d.ts +49 -3
  214. package/dist/esm/core/agent/coverage/period.js +107 -68
  215. package/dist/esm/core/agent/coverage/period.js.map +1 -1
  216. package/dist/esm/core/agent/coverage/timeLimitFacts.d.ts +56 -0
  217. package/dist/esm/core/agent/coverage/timeLimitFacts.js +65 -0
  218. package/dist/esm/core/agent/coverage/timeLimitFacts.js.map +1 -0
  219. package/dist/esm/core/agent/coverage/timeLimits.d.ts +46 -0
  220. package/dist/esm/core/agent/coverage/timeLimits.js +67 -0
  221. package/dist/esm/core/agent/coverage/timeLimits.js.map +1 -0
  222. package/dist/esm/core/agent/evidence/evidenceIndex.d.ts +25 -2
  223. package/dist/esm/core/agent/evidence/evidenceIndex.js +47 -7
  224. package/dist/esm/core/agent/evidence/evidenceIndex.js.map +1 -1
  225. package/dist/esm/core/agent/evidence/gate.d.ts +7 -0
  226. package/dist/esm/core/agent/evidence/gate.js +9 -4
  227. package/dist/esm/core/agent/evidence/gate.js.map +1 -1
  228. package/dist/esm/core/agent/evidence/normalize.d.ts +0 -34
  229. package/dist/esm/core/agent/evidence/normalize.js +0 -103
  230. package/dist/esm/core/agent/evidence/normalize.js.map +1 -1
  231. package/dist/esm/core/agent/evidence/types.d.ts +12 -1
  232. package/dist/esm/core/agent/findings/ledger.js +14 -0
  233. package/dist/esm/core/agent/findings/ledger.js.map +1 -1
  234. package/dist/esm/core/agent/findings/types.d.ts +2 -1
  235. package/dist/esm/core/agent/findings/types.js.map +1 -1
  236. package/dist/esm/core/agent/honesty/mounts.d.ts +25 -0
  237. package/dist/esm/core/agent/honesty/mounts.js +104 -4
  238. package/dist/esm/core/agent/honesty/mounts.js.map +1 -1
  239. package/dist/esm/core/agent/results/subflow.d.ts +34 -2
  240. package/dist/esm/core/agent/results/subflow.js +43 -11
  241. package/dist/esm/core/agent/results/subflow.js.map +1 -1
  242. package/dist/esm/core/agent/stages/argumentAsk.d.ts +19 -0
  243. package/dist/esm/core/agent/stages/argumentAsk.js +85 -6
  244. package/dist/esm/core/agent/stages/argumentAsk.js.map +1 -1
  245. package/dist/esm/core/agent/stages/callLLM.d.ts +6 -0
  246. package/dist/esm/core/agent/stages/callLLM.js +16 -0
  247. package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
  248. package/dist/esm/core/agent/stages/prepareFinal.d.ts +13 -1
  249. package/dist/esm/core/agent/stages/prepareFinal.js +59 -7
  250. package/dist/esm/core/agent/stages/prepareFinal.js.map +1 -1
  251. package/dist/esm/core/agent/stages/route.d.ts +29 -1
  252. package/dist/esm/core/agent/stages/route.js +64 -7
  253. package/dist/esm/core/agent/stages/route.js.map +1 -1
  254. package/dist/esm/core/agent/stages/seed.d.ts +23 -0
  255. package/dist/esm/core/agent/stages/seed.js +29 -6
  256. package/dist/esm/core/agent/stages/seed.js.map +1 -1
  257. package/dist/esm/core/agent/stages/timeLayer.d.ts +94 -0
  258. package/dist/esm/core/agent/stages/timeLayer.js +193 -0
  259. package/dist/esm/core/agent/stages/timeLayer.js.map +1 -0
  260. package/dist/esm/core/agent/stages/timeLineage.d.ts +31 -0
  261. package/dist/esm/core/agent/stages/timeLineage.js +57 -0
  262. package/dist/esm/core/agent/stages/timeLineage.js.map +1 -0
  263. package/dist/esm/core/agent/stages/toolCalls.d.ts +32 -0
  264. package/dist/esm/core/agent/stages/toolCalls.js +70 -0
  265. package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
  266. package/dist/esm/core/agent/types.d.ts +37 -0
  267. package/dist/esm/core/inputRequest.d.ts +50 -6
  268. package/dist/esm/core/inputRequest.js +132 -5
  269. package/dist/esm/core/inputRequest.js.map +1 -1
  270. package/dist/esm/core/messageFrom.d.ts +5 -2
  271. package/dist/esm/core/messageFrom.js +5 -2
  272. package/dist/esm/core/messageFrom.js.map +1 -1
  273. package/dist/esm/core/runCheckpoint.js +17 -2
  274. package/dist/esm/core/runCheckpoint.js.map +1 -1
  275. package/dist/esm/core/slots/buildToolsSlot.d.ts +29 -0
  276. package/dist/esm/core/slots/buildToolsSlot.js +30 -2
  277. package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
  278. package/dist/esm/core/time/ask.d.ts +126 -0
  279. package/dist/esm/core/time/ask.js +230 -0
  280. package/dist/esm/core/time/ask.js.map +1 -0
  281. package/dist/esm/core/time/axis.d.ts +224 -0
  282. package/dist/esm/core/time/axis.js +462 -0
  283. package/dist/esm/core/time/axis.js.map +1 -0
  284. package/dist/esm/core/time/bind.d.ts +143 -0
  285. package/dist/esm/core/time/bind.js +227 -0
  286. package/dist/esm/core/time/bind.js.map +1 -0
  287. package/dist/esm/core/time/check.d.ts +113 -0
  288. package/dist/esm/core/time/check.js +252 -0
  289. package/dist/esm/core/time/check.js.map +1 -0
  290. package/dist/esm/core/time/checkRecord.d.ts +74 -0
  291. package/dist/esm/core/time/checkRecord.js +90 -0
  292. package/dist/esm/core/time/checkRecord.js.map +1 -0
  293. package/dist/esm/core/time/clock.d.ts +183 -0
  294. package/dist/esm/core/time/clock.js +252 -0
  295. package/dist/esm/core/time/clock.js.map +1 -0
  296. package/dist/esm/core/time/convert.d.ts +178 -0
  297. package/dist/esm/core/time/convert.js +609 -0
  298. package/dist/esm/core/time/convert.js.map +1 -0
  299. package/dist/esm/core/time/drift.d.ts +85 -0
  300. package/dist/esm/core/time/drift.js +91 -0
  301. package/dist/esm/core/time/drift.js.map +1 -0
  302. package/dist/esm/core/time/duration.d.ts +71 -0
  303. package/dist/esm/core/time/duration.js +117 -0
  304. package/dist/esm/core/time/duration.js.map +1 -0
  305. package/dist/esm/core/time/forms.d.ts +84 -0
  306. package/dist/esm/core/time/forms.js +268 -0
  307. package/dist/esm/core/time/forms.js.map +1 -0
  308. package/dist/esm/core/time/instant.d.ts +75 -0
  309. package/dist/esm/core/time/instant.js +131 -0
  310. package/dist/esm/core/time/instant.js.map +1 -0
  311. package/dist/esm/core/time/periodForm.d.ts +184 -0
  312. package/dist/esm/core/time/periodForm.js +376 -0
  313. package/dist/esm/core/time/periodForm.js.map +1 -0
  314. package/dist/esm/core/time/present.d.ts +107 -0
  315. package/dist/esm/core/time/present.js +305 -0
  316. package/dist/esm/core/time/present.js.map +1 -0
  317. package/dist/esm/core/time/range.d.ts +127 -0
  318. package/dist/esm/core/time/range.js +249 -0
  319. package/dist/esm/core/time/range.js.map +1 -0
  320. package/dist/esm/core/time/reader.d.ts +162 -0
  321. package/dist/esm/core/time/reader.js +203 -0
  322. package/dist/esm/core/time/reader.js.map +1 -0
  323. package/dist/esm/core/time/readers/english.d.ts +99 -0
  324. package/dist/esm/core/time/readers/english.js +572 -0
  325. package/dist/esm/core/time/readers/english.js.map +1 -0
  326. package/dist/esm/core/time/readingAsk.d.ts +45 -0
  327. package/dist/esm/core/time/readingAsk.js +90 -0
  328. package/dist/esm/core/time/readingAsk.js.map +1 -0
  329. package/dist/esm/core/time/resolve.d.ts +103 -0
  330. package/dist/esm/core/time/resolve.js +684 -0
  331. package/dist/esm/core/time/resolve.js.map +1 -0
  332. package/dist/esm/core/time/resolveRecord.d.ts +160 -0
  333. package/dist/esm/core/time/resolveRecord.js +158 -0
  334. package/dist/esm/core/time/resolveRecord.js.map +1 -0
  335. package/dist/esm/core/time/rows.d.ts +297 -0
  336. package/dist/esm/core/time/rows.js +397 -0
  337. package/dist/esm/core/time/rows.js.map +1 -0
  338. package/dist/esm/core/time/rowsBuild.d.ts +82 -0
  339. package/dist/esm/core/time/rowsBuild.js +185 -0
  340. package/dist/esm/core/time/rowsBuild.js.map +1 -0
  341. package/dist/esm/core/time/textForms.d.ts +53 -0
  342. package/dist/esm/core/time/textForms.js +126 -0
  343. package/dist/esm/core/time/textForms.js.map +1 -0
  344. package/dist/esm/core/time/windows.d.ts +113 -0
  345. package/dist/esm/core/time/windows.js +166 -0
  346. package/dist/esm/core/time/windows.js.map +1 -0
  347. package/dist/esm/core/time/wire.d.ts +63 -0
  348. package/dist/esm/core/time/wire.js +81 -0
  349. package/dist/esm/core/time/wire.js.map +1 -0
  350. package/dist/esm/core/time/zone.d.ts +115 -0
  351. package/dist/esm/core/time/zone.js +242 -0
  352. package/dist/esm/core/time/zone.js.map +1 -0
  353. package/dist/esm/core/tools.d.ts +26 -4
  354. package/dist/esm/core/tools.js.map +1 -1
  355. package/dist/esm/events/payloads.d.ts +16 -2
  356. package/dist/esm/index.d.ts +13 -1
  357. package/dist/esm/index.js +6 -1
  358. package/dist/esm/index.js.map +1 -1
  359. package/dist/esm/lib/answer-account/facts/howSure.js +7 -0
  360. package/dist/esm/lib/answer-account/facts/howSure.js.map +1 -1
  361. package/dist/esm/lib/answer-account/templates.d.ts +3 -0
  362. package/dist/esm/lib/answer-account/templates.js +4 -0
  363. package/dist/esm/lib/answer-account/templates.js.map +1 -1
  364. package/dist/esm/lib/mcp/elicitation.d.ts +84 -0
  365. package/dist/esm/lib/mcp/elicitation.js +181 -0
  366. package/dist/esm/lib/mcp/elicitation.js.map +1 -0
  367. package/dist/esm/lib/mcp/mcpClient.js +9 -3
  368. package/dist/esm/lib/mcp/mcpClient.js.map +1 -1
  369. package/dist/esm/lib/mcp/mcpServe.js +6 -2
  370. package/dist/esm/lib/mcp/mcpServe.js.map +1 -1
  371. package/dist/esm/lib/mcp/mockMcpClient.d.ts +9 -1
  372. package/dist/esm/lib/mcp/mockMcpClient.js +5 -3
  373. package/dist/esm/lib/mcp/mockMcpClient.js.map +1 -1
  374. package/dist/esm/lib/mcp/toolExtras.d.ts +21 -2
  375. package/dist/esm/lib/mcp/toolExtras.js +22 -0
  376. package/dist/esm/lib/mcp/toolExtras.js.map +1 -1
  377. package/dist/esm/lib/mcp/types.d.ts +8 -0
  378. package/dist/esm/lib/time-travel/receipt.d.ts +1 -1
  379. package/dist/esm/lib/time-travel/servedView.d.ts +1 -1
  380. package/dist/esm/lib/time-travel/servedView.js +9 -0
  381. package/dist/esm/lib/time-travel/servedView.js.map +1 -1
  382. package/dist/esm/locales/index.d.ts +6 -0
  383. package/dist/esm/locales/index.js +6 -0
  384. package/dist/esm/locales/index.js.map +1 -1
  385. package/dist/esm/locales/timeAsk.d.ts +29 -0
  386. package/dist/esm/locales/timeAsk.js +44 -0
  387. package/dist/esm/locales/timeAsk.js.map +1 -0
  388. package/dist/esm/recorders/core/resilienceHooks.js +1 -0
  389. package/dist/esm/recorders/core/resilienceHooks.js.map +1 -1
  390. package/dist/esm/resilience/statedWait.d.ts +22 -0
  391. package/dist/esm/resilience/statedWait.js +35 -0
  392. package/dist/esm/resilience/statedWait.js.map +1 -0
  393. package/dist/esm/resilience/withRetry.d.ts +13 -2
  394. package/dist/esm/resilience/withRetry.js +16 -1
  395. package/dist/esm/resilience/withRetry.js.map +1 -1
  396. package/dist/index.js +11 -1
  397. package/dist/index.js.map +1 -1
  398. package/dist/lib/answer-account/facts/howSure.js +7 -0
  399. package/dist/lib/answer-account/facts/howSure.js.map +1 -1
  400. package/dist/lib/answer-account/templates.js +4 -0
  401. package/dist/lib/answer-account/templates.js.map +1 -1
  402. package/dist/lib/mcp/elicitation.js +186 -0
  403. package/dist/lib/mcp/elicitation.js.map +1 -0
  404. package/dist/lib/mcp/mcpClient.js +8 -2
  405. package/dist/lib/mcp/mcpClient.js.map +1 -1
  406. package/dist/lib/mcp/mcpServe.js +5 -1
  407. package/dist/lib/mcp/mcpServe.js.map +1 -1
  408. package/dist/lib/mcp/mockMcpClient.js +4 -2
  409. package/dist/lib/mcp/mockMcpClient.js.map +1 -1
  410. package/dist/lib/mcp/toolExtras.js +25 -1
  411. package/dist/lib/mcp/toolExtras.js.map +1 -1
  412. package/dist/lib/time-travel/servedView.js +9 -0
  413. package/dist/lib/time-travel/servedView.js.map +1 -1
  414. package/dist/locales/index.js +8 -1
  415. package/dist/locales/index.js.map +1 -1
  416. package/dist/locales/timeAsk.js +47 -0
  417. package/dist/locales/timeAsk.js.map +1 -0
  418. package/dist/recorders/core/resilienceHooks.js +1 -0
  419. package/dist/recorders/core/resilienceHooks.js.map +1 -1
  420. package/dist/resilience/statedWait.js +39 -0
  421. package/dist/resilience/statedWait.js.map +1 -0
  422. package/dist/resilience/withRetry.js +16 -1
  423. package/dist/resilience/withRetry.js.map +1 -1
  424. package/dist/types/adapters/llm/AnthropicProvider.d.ts.map +1 -1
  425. package/dist/types/adapters/llm/BedrockProvider.d.ts.map +1 -1
  426. package/dist/types/adapters/llm/InvokeModelGatewayProvider.d.ts +38 -4
  427. package/dist/types/adapters/llm/InvokeModelGatewayProvider.d.ts.map +1 -1
  428. package/dist/types/adapters/llm/OpenAIProvider.d.ts.map +1 -1
  429. package/dist/types/adapters/llm/anthropicMessagesWire.d.ts +6 -1
  430. package/dist/types/adapters/llm/anthropicMessagesWire.d.ts.map +1 -1
  431. package/dist/types/adapters/llm/retryAfter.d.ts +28 -0
  432. package/dist/types/adapters/llm/retryAfter.d.ts.map +1 -0
  433. package/dist/types/adapters/types.d.ts +9 -0
  434. package/dist/types/adapters/types.d.ts.map +1 -1
  435. package/dist/types/artifacts/index.d.ts +1 -1
  436. package/dist/types/artifacts/index.d.ts.map +1 -1
  437. package/dist/types/artifacts/types.d.ts +2 -2
  438. package/dist/types/artifacts/types.d.ts.map +1 -1
  439. package/dist/types/core/Agent.d.ts +64 -0
  440. package/dist/types/core/Agent.d.ts.map +1 -1
  441. package/dist/types/core/agent/AgentBuilder.d.ts +60 -0
  442. package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
  443. package/dist/types/core/agent/arguments/ask.d.ts +88 -5
  444. package/dist/types/core/agent/arguments/ask.d.ts.map +1 -1
  445. package/dist/types/core/agent/arguments/checks.d.ts +1 -1
  446. package/dist/types/core/agent/arguments/checks.d.ts.map +1 -1
  447. package/dist/types/core/agent/arguments/declare.d.ts +76 -15
  448. package/dist/types/core/agent/arguments/declare.d.ts.map +1 -1
  449. package/dist/types/core/agent/arguments/dispatch.d.ts.map +1 -1
  450. package/dist/types/core/agent/arguments/resolve.d.ts +77 -7
  451. package/dist/types/core/agent/arguments/resolve.d.ts.map +1 -1
  452. package/dist/types/core/agent/arguments/rows.d.ts +31 -2
  453. package/dist/types/core/agent/arguments/rows.d.ts.map +1 -1
  454. package/dist/types/core/agent/arguments/serve.d.ts +133 -4
  455. package/dist/types/core/agent/arguments/serve.d.ts.map +1 -1
  456. package/dist/types/core/agent/arguments/subflow.d.ts +28 -0
  457. package/dist/types/core/agent/arguments/subflow.d.ts.map +1 -1
  458. package/dist/types/core/agent/assessment/assess.d.ts.map +1 -1
  459. package/dist/types/core/agent/assessment/compose.d.ts.map +1 -1
  460. package/dist/types/core/agent/assessment/reasons.d.ts.map +1 -1
  461. package/dist/types/core/agent/assessment/types.d.ts +15 -1
  462. package/dist/types/core/agent/assessment/types.d.ts.map +1 -1
  463. package/dist/types/core/agent/buildAgentChart.d.ts +41 -0
  464. package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
  465. package/dist/types/core/agent/buildDynamicAgentChart.d.ts +1 -1
  466. package/dist/types/core/agent/buildDynamicAgentChart.d.ts.map +1 -1
  467. package/dist/types/core/agent/coverage/answer.d.ts +20 -1
  468. package/dist/types/core/agent/coverage/answer.d.ts.map +1 -1
  469. package/dist/types/core/agent/coverage/period.d.ts +49 -3
  470. package/dist/types/core/agent/coverage/period.d.ts.map +1 -1
  471. package/dist/types/core/agent/coverage/timeLimitFacts.d.ts +57 -0
  472. package/dist/types/core/agent/coverage/timeLimitFacts.d.ts.map +1 -0
  473. package/dist/types/core/agent/coverage/timeLimits.d.ts +47 -0
  474. package/dist/types/core/agent/coverage/timeLimits.d.ts.map +1 -0
  475. package/dist/types/core/agent/evidence/evidenceIndex.d.ts +25 -2
  476. package/dist/types/core/agent/evidence/evidenceIndex.d.ts.map +1 -1
  477. package/dist/types/core/agent/evidence/gate.d.ts +7 -0
  478. package/dist/types/core/agent/evidence/gate.d.ts.map +1 -1
  479. package/dist/types/core/agent/evidence/normalize.d.ts +0 -34
  480. package/dist/types/core/agent/evidence/normalize.d.ts.map +1 -1
  481. package/dist/types/core/agent/evidence/types.d.ts +12 -1
  482. package/dist/types/core/agent/evidence/types.d.ts.map +1 -1
  483. package/dist/types/core/agent/findings/ledger.d.ts.map +1 -1
  484. package/dist/types/core/agent/findings/types.d.ts +2 -1
  485. package/dist/types/core/agent/findings/types.d.ts.map +1 -1
  486. package/dist/types/core/agent/honesty/mounts.d.ts +25 -0
  487. package/dist/types/core/agent/honesty/mounts.d.ts.map +1 -1
  488. package/dist/types/core/agent/results/subflow.d.ts +34 -2
  489. package/dist/types/core/agent/results/subflow.d.ts.map +1 -1
  490. package/dist/types/core/agent/stages/argumentAsk.d.ts +19 -0
  491. package/dist/types/core/agent/stages/argumentAsk.d.ts.map +1 -1
  492. package/dist/types/core/agent/stages/callLLM.d.ts +6 -0
  493. package/dist/types/core/agent/stages/callLLM.d.ts.map +1 -1
  494. package/dist/types/core/agent/stages/prepareFinal.d.ts +13 -1
  495. package/dist/types/core/agent/stages/prepareFinal.d.ts.map +1 -1
  496. package/dist/types/core/agent/stages/route.d.ts +29 -1
  497. package/dist/types/core/agent/stages/route.d.ts.map +1 -1
  498. package/dist/types/core/agent/stages/seed.d.ts +23 -0
  499. package/dist/types/core/agent/stages/seed.d.ts.map +1 -1
  500. package/dist/types/core/agent/stages/timeLayer.d.ts +95 -0
  501. package/dist/types/core/agent/stages/timeLayer.d.ts.map +1 -0
  502. package/dist/types/core/agent/stages/timeLineage.d.ts +32 -0
  503. package/dist/types/core/agent/stages/timeLineage.d.ts.map +1 -0
  504. package/dist/types/core/agent/stages/toolCalls.d.ts +32 -0
  505. package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
  506. package/dist/types/core/agent/types.d.ts +37 -0
  507. package/dist/types/core/agent/types.d.ts.map +1 -1
  508. package/dist/types/core/inputRequest.d.ts +50 -6
  509. package/dist/types/core/inputRequest.d.ts.map +1 -1
  510. package/dist/types/core/messageFrom.d.ts +5 -2
  511. package/dist/types/core/messageFrom.d.ts.map +1 -1
  512. package/dist/types/core/runCheckpoint.d.ts.map +1 -1
  513. package/dist/types/core/slots/buildToolsSlot.d.ts +29 -0
  514. package/dist/types/core/slots/buildToolsSlot.d.ts.map +1 -1
  515. package/dist/types/core/time/ask.d.ts +127 -0
  516. package/dist/types/core/time/ask.d.ts.map +1 -0
  517. package/dist/types/core/time/axis.d.ts +225 -0
  518. package/dist/types/core/time/axis.d.ts.map +1 -0
  519. package/dist/types/core/time/bind.d.ts +144 -0
  520. package/dist/types/core/time/bind.d.ts.map +1 -0
  521. package/dist/types/core/time/check.d.ts +114 -0
  522. package/dist/types/core/time/check.d.ts.map +1 -0
  523. package/dist/types/core/time/checkRecord.d.ts +75 -0
  524. package/dist/types/core/time/checkRecord.d.ts.map +1 -0
  525. package/dist/types/core/time/clock.d.ts +184 -0
  526. package/dist/types/core/time/clock.d.ts.map +1 -0
  527. package/dist/types/core/time/convert.d.ts +179 -0
  528. package/dist/types/core/time/convert.d.ts.map +1 -0
  529. package/dist/types/core/time/drift.d.ts +86 -0
  530. package/dist/types/core/time/drift.d.ts.map +1 -0
  531. package/dist/types/core/time/duration.d.ts +72 -0
  532. package/dist/types/core/time/duration.d.ts.map +1 -0
  533. package/dist/types/core/time/forms.d.ts +85 -0
  534. package/dist/types/core/time/forms.d.ts.map +1 -0
  535. package/dist/types/core/time/instant.d.ts +76 -0
  536. package/dist/types/core/time/instant.d.ts.map +1 -0
  537. package/dist/types/core/time/periodForm.d.ts +185 -0
  538. package/dist/types/core/time/periodForm.d.ts.map +1 -0
  539. package/dist/types/core/time/present.d.ts +108 -0
  540. package/dist/types/core/time/present.d.ts.map +1 -0
  541. package/dist/types/core/time/range.d.ts +128 -0
  542. package/dist/types/core/time/range.d.ts.map +1 -0
  543. package/dist/types/core/time/reader.d.ts +163 -0
  544. package/dist/types/core/time/reader.d.ts.map +1 -0
  545. package/dist/types/core/time/readers/english.d.ts +100 -0
  546. package/dist/types/core/time/readers/english.d.ts.map +1 -0
  547. package/dist/types/core/time/readingAsk.d.ts +46 -0
  548. package/dist/types/core/time/readingAsk.d.ts.map +1 -0
  549. package/dist/types/core/time/resolve.d.ts +104 -0
  550. package/dist/types/core/time/resolve.d.ts.map +1 -0
  551. package/dist/types/core/time/resolveRecord.d.ts +161 -0
  552. package/dist/types/core/time/resolveRecord.d.ts.map +1 -0
  553. package/dist/types/core/time/rows.d.ts +298 -0
  554. package/dist/types/core/time/rows.d.ts.map +1 -0
  555. package/dist/types/core/time/rowsBuild.d.ts +83 -0
  556. package/dist/types/core/time/rowsBuild.d.ts.map +1 -0
  557. package/dist/types/core/time/textForms.d.ts +54 -0
  558. package/dist/types/core/time/textForms.d.ts.map +1 -0
  559. package/dist/types/core/time/windows.d.ts +114 -0
  560. package/dist/types/core/time/windows.d.ts.map +1 -0
  561. package/dist/types/core/time/wire.d.ts +64 -0
  562. package/dist/types/core/time/wire.d.ts.map +1 -0
  563. package/dist/types/core/time/zone.d.ts +116 -0
  564. package/dist/types/core/time/zone.d.ts.map +1 -0
  565. package/dist/types/core/tools.d.ts +26 -4
  566. package/dist/types/core/tools.d.ts.map +1 -1
  567. package/dist/types/events/payloads.d.ts +16 -2
  568. package/dist/types/events/payloads.d.ts.map +1 -1
  569. package/dist/types/index.d.ts +13 -1
  570. package/dist/types/index.d.ts.map +1 -1
  571. package/dist/types/lib/answer-account/facts/howSure.d.ts.map +1 -1
  572. package/dist/types/lib/answer-account/templates.d.ts +3 -0
  573. package/dist/types/lib/answer-account/templates.d.ts.map +1 -1
  574. package/dist/types/lib/mcp/elicitation.d.ts +85 -0
  575. package/dist/types/lib/mcp/elicitation.d.ts.map +1 -0
  576. package/dist/types/lib/mcp/mcpServe.d.ts.map +1 -1
  577. package/dist/types/lib/mcp/mockMcpClient.d.ts +9 -1
  578. package/dist/types/lib/mcp/mockMcpClient.d.ts.map +1 -1
  579. package/dist/types/lib/mcp/toolExtras.d.ts +21 -2
  580. package/dist/types/lib/mcp/toolExtras.d.ts.map +1 -1
  581. package/dist/types/lib/mcp/types.d.ts +8 -0
  582. package/dist/types/lib/mcp/types.d.ts.map +1 -1
  583. package/dist/types/lib/time-travel/receipt.d.ts +1 -1
  584. package/dist/types/lib/time-travel/receipt.d.ts.map +1 -1
  585. package/dist/types/lib/time-travel/servedView.d.ts +1 -1
  586. package/dist/types/lib/time-travel/servedView.d.ts.map +1 -1
  587. package/dist/types/locales/index.d.ts +6 -0
  588. package/dist/types/locales/index.d.ts.map +1 -1
  589. package/dist/types/locales/timeAsk.d.ts +30 -0
  590. package/dist/types/locales/timeAsk.d.ts.map +1 -0
  591. package/dist/types/recorders/core/resilienceHooks.d.ts.map +1 -1
  592. package/dist/types/resilience/statedWait.d.ts +23 -0
  593. package/dist/types/resilience/statedWait.d.ts.map +1 -0
  594. package/dist/types/resilience/withRetry.d.ts +13 -2
  595. package/dist/types/resilience/withRetry.d.ts.map +1 -1
  596. package/package.json +1 -1
  597. package/dist/artifacts/timeAxis.js +0 -218
  598. package/dist/artifacts/timeAxis.js.map +0 -1
  599. package/dist/esm/artifacts/timeAxis.d.ts +0 -114
  600. package/dist/esm/artifacts/timeAxis.js +0 -212
  601. package/dist/esm/artifacts/timeAxis.js.map +0 -1
  602. package/dist/types/artifacts/timeAxis.d.ts +0 -115
  603. package/dist/types/artifacts/timeAxis.d.ts.map +0 -1
@@ -0,0 +1,298 @@
1
+ /**
2
+ * core/time/rows — the time layer's rows on the one honesty ledger
3
+ * (`AgentState.findingsLedger`), and the checkpoint door's test for each.
4
+ *
5
+ * Pattern: one owner of each row's shape (the `coverage/period.ts` ·
6
+ * `periodRowIsWellFormed` precedent): the module that defines a row
7
+ * also answers "is this a row I would have filed?", so the
8
+ * checkpoint door (`core/runCheckpoint.ts` · `ledgerRowIsWellFormed`)
9
+ * refuses exactly what the library never files.
10
+ * Role: core/ leaf (the time layer). Imports `instant.ts`, `zone.ts`,
11
+ * `range.ts`, `reader.ts` (the parts check), `resolveRecord.ts` (the
12
+ * candidate and choice checks), `convert.ts` (the refusal codes) and
13
+ * `clock.ts`' and `bind.ts`' types only — the rows are plain records
14
+ * the agent loop files (`agent/stages/timeLayer.ts`, the inputs
15
+ * layer). Their BUILDERS live in `rowsBuild.ts` — never re-exported
16
+ * here: they reach the resolver, which only an armed agent loads,
17
+ * while this module is on the checkpoint door's synchronous path.
18
+ * Emits: N/A — the rows fire no event of their own (the `conflict` row's
19
+ * precedent: no event field ships without a reader in the same
20
+ * release). The lens reads the rows.
21
+ *
22
+ * Eight kinds, each filed only while `.time()` is armed:
23
+ *
24
+ * | Kind | Filed | Carries |
25
+ * |------|-------|---------|
26
+ * | `clock` | once per turn, by seed | the turn's {@link TimeClock} and, when the run passed one, the `control` window |
27
+ * | `clock-on-resume` | first thing in the resumed leg's ToolCalls stage — either pause shape: the pausable resume door, or the stage re-run an `interrupt()` pause makes — when a resume passed a `time` that differs from the kept clock | what was passed and what was kept — the kept clock still rules |
28
+ * | `call` | once per dispatched call, just before the tool runs | `dispatchedAt`: the wall clock at dispatch (a look-back is evaluated by the TOOL at dispatch, which after a pause is later than `now`); `drift` when a look-back was sent more than the tool's step after `now` — `redrawn` into an absolute form, or `shifted` (§ 7.4, `drift.ts`) |
29
+ * | `call-window` | by the inputs layer, once per call to a tool that declares period forms, before it dispatches | which window the call carries: filled from the turn's one window (exactly, or wider — with what the read adds), bound to one (by quote or value), the model's own (beside the person's when it differs), unread, not filled and why, or refused before dispatch and why |
30
+ * | `time-reading` | by seed, once per MENTION the armed reader (`.time({ reader })`) found in the person's message — or ONE row with `mentions: 0` when it found none, so a retry knows the message was read | the quote, the parts, every candidate `resolve.ts` made of them, how the reading settled (`choice` — never settled by the library: every reading is a PROPOSAL, `open` with `confirm`, its candidates `said: []`), the reader's id, version, kind and locale, and the tz database version; a refused mention keeps only why |
31
+ * | `time-answer` | by the batch ask, once per mention the person settled in the time ask — the only door by which a window of words becomes the person's | the mention, the window and its zone, and `how`: `confirmed` (they picked a reading the library offered — the click) or `edited` (they wrote their own) |
32
+ * | `time-derived` | by the Route decider, once per judged answer that stands, when the evidence gate found values no tool result carried that the library itself spelled from this turn's time readings (§ 9.5, step T7 — `forms.ts` · `timeFormsOf`'s `derived` list) | the values, normalized and clipped as the gate reports them — the lineage `derived-from-reading`: never invented, never the person's |
33
+ * | `source-clock` | by ToolCalls, once per call and zone, when the call minted a dataset whose declared time axis names a `zone` (§ 9.6, step T8) | the tool, the call and the zone its rows' wall times are in — read by the limits block's `Clocks` lines and `check.ts` · `clocksDiffer` |
34
+ *
35
+ * Readers that switch over every row kind must skip one they do not know.
36
+ */
37
+ import { type InstantText } from './instant.js';
38
+ import { type TimeRange } from './range.js';
39
+ import { type ZoneName } from './zone.js';
40
+ import type { ClockChange, TimeClock } from './clock.js';
41
+ import { type MentionRefusal, type TimeParts } from './reader.js';
42
+ import type { CallWindow, WindowSource } from './bind.js';
43
+ import { type TimeRefusal } from './periodForm.js';
44
+ import { type ReadingChoice, type TimeCandidate } from './resolveRecord.js';
45
+ /** A window set in a UI, as the clock row records it. */
46
+ export interface ControlWindow extends TimeRange {
47
+ readonly source: 'control';
48
+ }
49
+ /** The turn's clock stamp — one per turn (time design § 4). */
50
+ export interface ClockRow extends TimeClock {
51
+ readonly kind: 'clock';
52
+ /** `AgentState.turnNumber` when the row was filed — the conversation turn. */
53
+ readonly turn: number;
54
+ /** The iteration seed filed it at (1). */
55
+ readonly iteration: number;
56
+ /** The run's `time.window`, when it passed one. */
57
+ readonly window?: ControlWindow;
58
+ }
59
+ /** A resume passed a `time` that differs from the frozen clock: recorded, not applied (TQ21). */
60
+ export interface ClockOnResumeRow {
61
+ readonly kind: 'clock-on-resume';
62
+ readonly turn: number;
63
+ /** The iteration the paused batch ran in. */
64
+ readonly iteration: number;
65
+ /** What the resume passed, as read (values as written, a `Date` spelled in UTC). */
66
+ readonly passed: ClockChange['passed'];
67
+ /** The frozen clock's values the passed ones would have replaced. */
68
+ readonly kept: ClockChange['kept'];
69
+ }
70
+ /** One dispatched call's wall-clock moment (time design § 4, § 7.4). */
71
+ export interface CallRow {
72
+ readonly kind: 'call';
73
+ readonly turn: number;
74
+ readonly iteration: number;
75
+ readonly toolCallId: string;
76
+ readonly toolName: string;
77
+ /** The wall clock when the library handed the call to the tool — UTC, millisecond precision. */
78
+ readonly dispatchedAt: InstantText;
79
+ /**
80
+ * The clock at dispatch (§ 7.4, step T5b) — present only when the call sent
81
+ * a LOOK-BACK and `dispatchedAt − now` (`byMs`, signed) is more than the
82
+ * tool's step. `redrawn`: the library's own look-back fill was re-sent as
83
+ * the asked range in absolute form `form`; `shifted`: the look-back ran as
84
+ * sent (the model's value, or no absolute form), so the tool read a window
85
+ * shifted by `byMs` — `period-shifted`.
86
+ */
87
+ readonly drift?: CallDrift;
88
+ }
89
+ /** A look-back call's dispatch drift (§ 7.4) — see {@link CallRow.drift}. */
90
+ export type CallDrift = {
91
+ readonly byMs: number;
92
+ readonly outcome: 'redrawn';
93
+ readonly form: number;
94
+ } | {
95
+ readonly byMs: number;
96
+ readonly outcome: 'shifted';
97
+ };
98
+ /** The reader a reading came from, as recorded. */
99
+ export interface TimeReaderStamp {
100
+ readonly id: string;
101
+ readonly version: string;
102
+ readonly kind: 'rule' | 'model';
103
+ readonly locale: string;
104
+ }
105
+ /**
106
+ * One mention the armed reader found in the person's message (time design
107
+ * § 5.2) — or, with `mentions: 0` and no mention fields, the record that the
108
+ * message was read and held none. Read back, never re-read: a resume and a
109
+ * retry of the same turn find these rows and do not call the reader.
110
+ */
111
+ export interface TimeReadingRow {
112
+ readonly kind: 'time-reading';
113
+ readonly turn: number;
114
+ readonly iteration: number;
115
+ readonly reader: TimeReaderStamp;
116
+ /** The tz database the candidates were resolved with (`process.versions.tz`), else `'unknown'`. */
117
+ readonly tzdata: string;
118
+ /** How many mentions the reading held. */
119
+ readonly mentions: number;
120
+ /** This row's mention, 0-based — absent on the `mentions: 0` row. */
121
+ readonly mention?: number;
122
+ /** A verbatim substring of the person's message. */
123
+ readonly quote?: string;
124
+ readonly parses?: readonly TimeParts[];
125
+ readonly problem?: 'unreadable';
126
+ /** Why the mention was refused — its quote was not in the message, or its parts were malformed. It keeps no text. */
127
+ readonly refused?: MentionRefusal;
128
+ /** Every window `resolve.ts` made of the parts. */
129
+ readonly candidates?: readonly TimeCandidate[];
130
+ /** How the reading settled under the policy — `open` waits for the person. */
131
+ readonly choice?: ReadingChoice;
132
+ }
133
+ /**
134
+ * The window the person settled for one mention in the time ask — the ONLY
135
+ * door by which a window of words becomes the person's (the owner's decision
136
+ * "Always confirm", time design TQ29). Filed by the batch ask when a window
137
+ * answer binds (`arguments/ask.ts` · `bindAnswer`); read back by
138
+ * `bind.ts` · `turnWindowsOf`, so the rest of the turn uses it as an
139
+ * `answered` window and the served sentence names it with its source.
140
+ */
141
+ export interface TimeAnswerRow extends TimeRange {
142
+ readonly kind: 'time-answer';
143
+ readonly turn: number;
144
+ readonly iteration: number;
145
+ /** The `time-reading` row's mention the answer settles. */
146
+ readonly mention: number;
147
+ /** The zone the window was answered in — the reading's, or the turn's clock for free entry. */
148
+ readonly zone: ZoneName;
149
+ /**
150
+ * `confirmed`: the person picked a reading the library offered (the
151
+ * pre-filled choice — their click); `edited`: they wrote a window of their
152
+ * own. Both are the person's answer.
153
+ */
154
+ readonly how: 'confirmed' | 'edited';
155
+ }
156
+ /** The person's window a `call-window` row names — its range, who gave it, and its mention. */
157
+ export interface PersonWindow extends TimeRange {
158
+ readonly source: WindowSource;
159
+ /** The `time-reading` row's mention index — absent on a `control` window. */
160
+ readonly mention?: number;
161
+ }
162
+ /**
163
+ * Which window one call to a tool that declares period forms carries (time
164
+ * design § 7.3) — one row per such call, filed by the inputs layer beside the
165
+ * call's `argument` rows, before the call dispatches.
166
+ *
167
+ * | `how` | Means |
168
+ * |-------|-------|
169
+ * | `filled` | the model left the period out; the turn's one window (`person`) went into form `form` exactly (`rounded`: an epoch-seconds bound or a look-back's length moved outward) |
170
+ * | `bound` | the sent window IS the person's window `person` — named by the model's quote (`by: 'quote'`) or equal in value (`by: 'value'`) |
171
+ * | `model-chosen` | the sent window (`asked`) differs from the person's (`person`, when one window is theirs): it ran as sent (the v1 law) |
172
+ * | `model` | the sent window, and no window of the person's this turn |
173
+ * | `unread` | a period argument was sent and no form reads the call back as a range |
174
+ * | `not-filled` | the period was left out and nothing was filled (`why`) — the tool's own rule applied |
175
+ * | `refused` | refused before dispatch (`refused`: a fact the window breaks, `multi-day`, `dst-gap` with its `argument`) — the call did not run |
176
+ *
177
+ * `asked` is the half-open range the call asks for: the person's on a fill,
178
+ * the sent value read back otherwise — what `ctx.time.asked` hands the tool.
179
+ * A WIDENED fill (no form holds the window exactly — § 7.2) carries `sent`,
180
+ * the range the tool reads, and either `differs.extra` (the parts read but
181
+ * not asked — `period-differs-from-asked`) or `trimmedByTool` (the tool
182
+ * declares `filtersToAsked`). `partlyBeyondRetention` marks a window that
183
+ * starts before the source's oldest data and ends after it: it dispatched.
184
+ */
185
+ export interface CallWindowRow {
186
+ readonly kind: 'call-window';
187
+ readonly turn: number;
188
+ readonly iteration: number;
189
+ readonly toolCallId: string;
190
+ readonly toolName: string;
191
+ readonly how: CallWindow['how'];
192
+ /** The index of the tool's form the call used (filled into, or read back from). */
193
+ readonly form?: number;
194
+ readonly asked?: TimeRange;
195
+ readonly person?: PersonWindow;
196
+ readonly by?: 'quote' | 'value';
197
+ readonly rounded?: true;
198
+ readonly why?: 'no-window' | 'several-mentions' | 'open-reading' | 'no-exact-form';
199
+ /** A widened fill: the range the tool reads with the sent values. */
200
+ readonly sent?: TimeRange;
201
+ /** A widened fill the tool does not trim: the parts read but not asked. */
202
+ readonly differs?: {
203
+ readonly extra: readonly TimeRange[];
204
+ };
205
+ /** A widened fill to a tool that declares `filtersToAsked`. */
206
+ readonly trimmedByTool?: true;
207
+ readonly partlyBeyondRetention?: true;
208
+ /** Why the call was refused before dispatch. */
209
+ readonly refused?: TimeRefusal;
210
+ /** On a `dst-gap` refusal: the argument whose wall time the zone skips. */
211
+ readonly argument?: string;
212
+ }
213
+ /**
214
+ * The answer's values the library itself spelled from a time reading of this
215
+ * turn (§ 9.5, step T7) — an implied year, an offset, the end-of-grain
216
+ * minute, a value of the served time line. The lineage `derived-from-reading`:
217
+ * the answer's standing reads it as "not sure" at most, never "known", and the
218
+ * gate never calls these invented.
219
+ */
220
+ export interface TimeDerivedRow {
221
+ readonly kind: 'time-derived';
222
+ readonly turn: number;
223
+ readonly iteration: number;
224
+ /** The values as the gate reports them — normalized, clipped, at most `MAX_DERIVED_VALUES`. */
225
+ readonly values: readonly string[];
226
+ }
227
+ /** The most values one `time-derived` row carries (the gate's report bound). */
228
+ export declare const MAX_DERIVED_VALUES = 12;
229
+ /** The longest value a `time-derived` row carries (the gate's clip). */
230
+ export declare const MAX_DERIVED_VALUE_CHARS = 64;
231
+ /**
232
+ * A wall-clock source (§ 9.6, step T8): the call minted a dataset whose
233
+ * declared time axis (`axis.ts` · `DatasetTimeAxis`, its `zone`) says its rows are
234
+ * wall times in `zone`. One row per call and zone. A period's offset is never
235
+ * read as a clock — only a declared axis zone files this row.
236
+ */
237
+ export interface SourceClockRow {
238
+ readonly kind: 'source-clock';
239
+ readonly turn: number;
240
+ readonly iteration: number;
241
+ readonly toolCallId: string;
242
+ readonly toolName: string;
243
+ readonly zone: ZoneName;
244
+ }
245
+ /** Every time-layer row kind. */
246
+ export type TimeRow = ClockRow | ClockOnResumeRow | CallRow | TimeReadingRow | CallWindowRow | TimeAnswerRow | TimeDerivedRow | SourceClockRow;
247
+ /** This turn's `call-window` row for one call, if the inputs layer filed one — `ctx.time` reads it. */
248
+ export declare function callWindowOfCall(ledger: readonly unknown[] | undefined, toolCallId: string, turn: number): CallWindowRow | undefined;
249
+ /** The `time-reading` rows filed for `turn` — read back on a resume or a retry, never re-read. */
250
+ export declare function readingsOf(ledger: readonly unknown[] | undefined, turn: number): readonly TimeReadingRow[];
251
+ /** The `time-answer` row for one window the person settled in the time ask. */
252
+ export declare function timeAnswerRow(answer: {
253
+ readonly mention: number;
254
+ readonly range: TimeRange;
255
+ readonly zone: ZoneName;
256
+ readonly how: 'confirmed' | 'edited';
257
+ }, at: {
258
+ readonly turn: number;
259
+ readonly iteration: number;
260
+ }): TimeAnswerRow;
261
+ /** The `time-derived` row for one judged answer — `values` cut to {@link MAX_DERIVED_VALUES}. */
262
+ export declare function timeDerivedRow(values: readonly string[], at: {
263
+ readonly turn: number;
264
+ readonly iteration: number;
265
+ }): TimeDerivedRow;
266
+ /** The `source-clock` row for one call's dataset whose declared axis names `zone`. */
267
+ export declare function sourceClockRow(call: {
268
+ readonly toolCallId: string;
269
+ readonly toolName: string;
270
+ }, at: {
271
+ readonly turn: number;
272
+ readonly iteration: number;
273
+ }, zone: ZoneName): SourceClockRow;
274
+ /** This turn's `call` row for one call — the last filed (a resumed leg files its own). */
275
+ export declare function callRowOfCall(ledger: readonly unknown[] | undefined, toolCallId: string, turn: number): CallRow | undefined;
276
+ /** The `source-clock` rows filed for `turn`, in the order filed. */
277
+ export declare function sourceClocksOf(ledger: readonly unknown[] | undefined, turn: number | undefined): readonly SourceClockRow[];
278
+ /** The `time-answer` rows filed for `turn`, in the order filed. */
279
+ export declare function answersOf(ledger: readonly unknown[] | undefined, turn: number): readonly TimeAnswerRow[];
280
+ /**
281
+ * The clock of the LATEST turn on the ledger — the last `clock` row — or
282
+ * `undefined` when none was filed (an agent without `.time()`, or a turn
283
+ * paused by a runtime that had none). A continued conversation carries one
284
+ * row per turn; the last one is this turn's, because each turn's seed files
285
+ * exactly one (last in seed, before any stage of the turn can read it).
286
+ */
287
+ export declare function clockOf(ledger: readonly unknown[] | undefined): ClockRow | undefined;
288
+ /**
289
+ * The checkpoint door's test for a time-layer row — `true` only for a row of
290
+ * one of the eight kinds with every field this module files, well formed.
291
+ * Any other kind answers `false` (the caller routes by kind first).
292
+ */
293
+ export declare function timeRowIsWellFormed(row: Readonly<Record<string, unknown>>): boolean;
294
+ /** Whether a ledger row is one of the time layer's kinds (the router's question). */
295
+ export declare function isTimeRowKind(kind: unknown): kind is TimeRow['kind'];
296
+ /** The zone the answer's lines are rendered in — the clock's (no reader is armed yet, so the run's). */
297
+ export declare function presentationZoneOf(ledger: readonly unknown[] | undef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AIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,OAAO,CAqCnF;AAED,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAWpE;AAED,wGAAwG;AACxG,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAE/F"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * core/time/rowsBuild — the builders of the time layer's rows (`rows.ts` owns
3
+ * the shapes, the readers and the checkpoint door's checks).
4
+ *
5
+ * Pattern: one builder per row kind, each returning the plain record the
6
+ * ledger's one writer files.
7
+ * Role: core/ leaf (the time layer). Split from `rows.ts` because
8
+ * `timeReadingRows` runs the resolver (`resolve.ts`), which only an
9
+ * armed agent loads — its callers (`agent/stages/timeLayer.ts`, the
10
+ * inputs layer's `arguments/resolve.ts`) are reached through
11
+ * `import()` — while `rows.ts` sits on the checkpoint door's
12
+ * synchronous path (the optional-family law of docs-next's site
13
+ * budget). Import a builder from HERE — `rows.ts` does not re-export
14
+ * them, or a bundler would place them on its synchronous path.
15
+ * Emits: N/A.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * clockRow(clock, { turn: 1, iteration: 1 }); // { kind: 'clock', turn: 1, … }
20
+ * ```
21
+ */
22
+ import type { TimeRange } from './range.js';
23
+ import { type ReadRunTime, type TimeClock } from './clock.js';
24
+ import type { CheckedMention } from './reader.js';
25
+ import type { CallWindow } from './bind.js';
26
+ import { type TimePolicy } from './resolve.js';
27
+ import type { CallDrift, CallRow, CallWindowRow, ClockOnResumeRow, ClockRow, TimeReaderStamp, TimeReadingRow } from './rows.js';
28
+ /** The clock stamp for one turn. */
29
+ export declare function clockRow(clock: TimeClock, at: {
30
+ readonly turn: number;
31
+ readonly iteration: number;
32
+ }, window?: TimeRange): ClockRow;
33
+ /**
34
+ * The row for one dispatched call. `nowMs` is the wall clock — the second of
35
+ * the layer's two recorded wall-clock reads (the first is a default `now`).
36
+ */
37
+ export declare function callRow(call: {
38
+ readonly toolCallId: string;
39
+ readonly toolName: string;
40
+ }, at: {
41
+ readonly turn: number;
42
+ readonly iteration: number;
43
+ }, nowMs: number, drift?: CallDrift): CallRow;
44
+ /**
45
+ * The row for a resume whose passed `time` differs from the turn's kept clock
46
+ * (`clock.ts` · `clockChange`), or `undefined` when nothing differs. The kept
47
+ * clock is the turn's `clock` row; it is never replaced.
48
+ */
49
+ export declare function clockOnResumeRow(passed: ReadRunTime, kept: ClockRow, at: {
50
+ readonly turn: number;
51
+ readonly iteration: number;
52
+ }): ClockOnResumeRow | undefined;
53
+ /**
54
+ * The `time-reading` rows for one checked reading (`reader.ts` ·
55
+ * `checkReading`): one per mention, resolved against the turn's clock — or
56
+ * one `mentions: 0` row. The one owner of the law "a reading only PROPOSES"
57
+ * (the owner's decision "Always confirm", time design TQ29): whatever the
58
+ * reader's kind, no reading is settled by the library and none is the
59
+ * person's words — its candidates carry `said: []` and its choice stays
60
+ * `open` with `confirm` (the policy may still remove readings), so the time
61
+ * ask offers it, pre-filled with its window and zone, and only the person's
62
+ * answer settles it (`rows.ts` · `TimeAnswerRow`).
63
+ */
64
+ export declare function timeReadingRows(input: {
65
+ readonly mentions: readonly CheckedMention[];
66
+ readonly clock: TimeClock;
67
+ readonly policy: TimePolicy;
68
+ readonly reader: TimeReaderStamp;
69
+ readonly tzdata: string;
70
+ readonly at: {
71
+ readonly turn: number;
72
+ readonly iteration: number;
73
+ };
74
+ }): TimeReadingRow[];
75
+ /** The `call-window` row for one call's decision (`bind.ts` · `callWindowOf`). */
76
+ export declare function callWindowRow(call: {
77
+ readonly toolCallId: string;
78
+ readonly toolName: string;
79
+ }, decision: CallWindow, at: {
80
+ readonly turn: number;
81
+ readonly iteration: number;
82
+ }): CallWindowRow;
83
+ //# sourceMapping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AQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACxD,gBAAgB,GAAG,SAAS,CAc9B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,QAAQ,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CACpE,GAAG,cAAc,EAAE,CAwBnB;AASD,kFAAkF;AAClF,wBAAgB,aAAa,CAC3B,IAAI,EAAE;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,EAChE,QAAQ,EAAE,UAAU,EACpB,EAAE,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACxD,aAAa,CAgEf"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * core/time/textForms — the spellings of the times written in TEXT (time
3
+ * design § 9.5, step T7): the text rule of `forms.ts` · `timeFormsOf`, and
4
+ * the small spelling parts both halves share.
5
+ *
6
+ * Pattern: pure regular expressions over the text — no reading, no resolver.
7
+ * Role: split from `forms.ts` BY FILE for the synchronous doors: the
8
+ * evidence gate's exempt corpus (`evidence/evidenceIndex.ts` ·
9
+ * `addExempt`) runs on every agent with a gate, and a bundler places
10
+ * a whole file on the synchronous graph — so the window half, which
11
+ * re-resolves a recorded reading (`resolve.ts`), stays behind
12
+ * `import()` (the optional-family law,
13
+ * `test/lib/trace-toolpack/browserGraph.test.ts`). Imports nothing.
14
+ * Emits: N/A.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * timeFormsOfText('2026-10-09').said; // ['2026', '10', '9']
19
+ * timeFormsOfText('took 2h'); // { said: [], derived: [] }
20
+ * ```
21
+ */
22
+ /** The two lineages of the spellings of one source — see the file header. */
23
+ export interface TimeForms {
24
+ readonly said: readonly string[];
25
+ readonly derived: readonly string[];
26
+ }
27
+ /**
28
+ * The spellings of the times written in `text` — `said` only (the text rule of
29
+ * `forms.ts` · `timeFormsOf`, which delegates here): an ISO date → its year,
30
+ * month and day; a 12-hour or 24-hour clock reading → its spellings. Slash
31
+ * dates and durations are never read.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * timeFormsOfText('what connected 8 Am to 8:40 AM PST').said;
36
+ * // ['8:00', '08:00', '8:00am', '8:40', '08:40', '8:40am']
37
+ * ```
38
+ */
39
+ export declare function timeFormsOfText(text: string): TimeForms;
40
+ /**
41
+ * The spellings of ONE clock time: the 24-hour form bare and padded
42
+ * (`8:00`, `08:00`, `20:00`), the 12-hour colon form (`8:00`) and its glued
43
+ * suffix form (`8:00pm`). After tokenizing, `8:00 PM` and `8:00 AM` both read
44
+ * `8:00` — the same hour on a 12-hour dial.
45
+ */
46
+ export declare function clockSpellings(h24: number, minutes: string): readonly string[];
47
+ export declare const pad2: (n: number) => string;
48
+ /** An insertion-ordered set of spellings. */
49
+ export declare class Spellings {
50
+ private readonly seen;
51
+ push(...forms: readonly string[]): void;
52
+ list(): readonly string[];
53
+ }
54
+ //# sourceMappingURL=textForms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textForms.d.ts","sourceRoot":"","sources":["../../../../src/core/time/textForms.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,6EAA6E;AAC7E,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAoCD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAEvD;AA6BD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAS9E;AAID,eAAO,MAAM,IAAI,MAAO,MAAM,KAAG,MAAoC,CAAC;AAEtE,6CAA6C;AAC7C,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqB;IAC1C,IAAI,CAAC,GAAG,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI;IAGvC,IAAI,IAAI,SAAS,MAAM,EAAE;CAG1B"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * core/time/windows — the turn's windows, read from the record (time design
3
+ * § 5.6): the window the person settled in the time ask (`answered`), a
4
+ * `model` reader's one reading waiting for confirmation
5
+ * (`derived-from-reading`) and the clock's `control` window; the quotes still
6
+ * waiting on the person; and what the served sentence names
7
+ * (`readerWindowsOf`).
8
+ *
9
+ * Pattern: Walker over recorded rows — never over words, never the resolver.
10
+ * Role: the record half of `bind.ts`, split out BY FILE for the synchronous
11
+ * doors: the Tools mount's `inputMapper` (`agent/buildAgentChart.ts` ·
12
+ * `timeWindowsArg`) and the evidence gate's lineage read it before
13
+ * any `import()` can run, and a bundler places a whole file on the
14
+ * synchronous graph — so this file imports only the leaves and the
15
+ * row readers, never `convert.ts` or `resolve.ts` (the optional-family
16
+ * law, `test/lib/trace-toolpack/browserGraph.test.ts`). `bind.ts`
17
+ * re-exports every public name.
18
+ * Emits: N/A (pure).
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * readerWindowsOf(ledger);
23
+ * // { now: '2026-10-09T15:40:00Z', windows: [{ source: 'answered', quote: 'yesterday', … }] }
24
+ * ```
25
+ */
26
+ import type { DurationText } from './duration.js';
27
+ import type { InstantText } from './instant.js';
28
+ import { type TimeRange } from './range.js';
29
+ import { type ClockRow, type TimeAnswerRow, type TimeReadingRow } from './rows.js';
30
+ import type { ZoneName } from './zone.js';
31
+ /**
32
+ * Who a window is: the window the person settled in the time ask
33
+ * (`answered`), a `model` reader's unconfirmed reading (`derived-from-reading`),
34
+ * or a UI control. `said` — a `rule` reading filed as the person's words — is
35
+ * no longer filed (the owner's decision "Always confirm", time design TQ29);
36
+ * it stays in the union so a record an earlier version filed still reads.
37
+ */
38
+ export type WindowSource = 'said' | 'derived-from-reading' | 'answered' | 'control';
39
+ /** One window of the turn — a mention that resolved to one window, or the `control` window. */
40
+ export interface TurnWindow {
41
+ readonly source: WindowSource;
42
+ /** The `time-reading` row's mention index — absent on the `control` window. */
43
+ readonly mention?: number;
44
+ /** The person's words it was read from — absent on the `control` window. */
45
+ readonly quote?: string;
46
+ readonly range: TimeRange;
47
+ /** The look-back it was said as, when it was one. */
48
+ readonly lookback?: DurationText;
49
+ /** The zone the person meant, else the clock's. */
50
+ readonly zone: ZoneName;
51
+ /** On an `answered` window: whether the person picked the offered reading (`confirmed`) or wrote their own (`edited`). */
52
+ readonly answer?: TimeAnswerRow['how'];
53
+ }
54
+ /** The turn's windows, and how many mentions the turn holds in all (resolved or not). */
55
+ export interface TurnWindows {
56
+ readonly windows: readonly TurnWindow[];
57
+ /** Every mention with a quote, plus the `control` window — the "exactly one" count. */
58
+ readonly mentions: number;
59
+ /**
60
+ * Per mention still OPEN (the person has not chosen), the ranges of the
61
+ * readings left — what a tool's facts can already rule out (§ 6.3: every
62
+ * reading outside a tool's `direction` → nothing is asked, the call is
63
+ * refused). Absent when no mention is open with candidates.
64
+ */
65
+ readonly open?: readonly (readonly TimeRange[])[];
66
+ }
67
+ /**
68
+ * This turn's windows, read from the record: per mention, the window the
69
+ * person settled in the time ask (`answered`, its latest `time-answer` row),
70
+ * else a `model` reader's one window waiting for confirmation
71
+ * (`derived-from-reading`); and the clock's `control` window. A `rule`
72
+ * reading the person has not answered is counted and is OPEN.
73
+ */
74
+ export declare function turnWindowsOf(readings: readonly TimeReadingRow[], clock: ClockRow | undefined, answers?: readonly TimeAnswerRow[]): TurnWindows;
75
+ /** The windows of the person's words this turn, with the turn's clock — what the served sentence names. */
76
+ export interface ReaderWindows {
77
+ readonly now: InstantText;
78
+ /** Each settled mention's window (`answered`, or a `model` reading's), in mention order — never the `control` window. */
79
+ readonly windows: readonly TurnWindow[];
80
+ /**
81
+ * The quote of each mention the library holds only as a PROPOSAL — a `rule`
82
+ * reading the person has not answered yet (its choice still `open`: a zone
83
+ * to name, readings to confirm) — in mention order. The served sentence
84
+ * names them as not confirmed, so a model that would write its own window
85
+ * leaves the period out and the time ask confirms it (step T6b bench,
86
+ * `bench/time/`). Absent when none is pending.
87
+ */
88
+ readonly pending?: readonly string[];
89
+ /**
90
+ * A mention is pending AND a call of this turn already ran on a window the
91
+ * model wrote into it (a `call-window` row `how: 'model'` — § 7.3: it runs
92
+ * as sent, unconfirmed). The served line then names that limit for the
93
+ * answer instead of the move that would have asked the person. Absent
94
+ * otherwise.
95
+ */
96
+ readonly ranUnconfirmed?: true;
97
+ }
98
+ /**
99
+ * The quotes of this turn's mentions still waiting on the person: a reading
100
+ * with a quote whose choice is `open`, not answered in the time ask, and not a
101
+ * `model` reading's one window (that one is served as a reading). Unreadable
102
+ * and refused mentions offer nothing to confirm and are not named.
103
+ */
104
+ export declare function pendingQuotesOf(readings: readonly TimeReadingRow[], answers?: readonly TimeAnswerRow[]): readonly string[];
105
+ /**
106
+ * The latest turn's windows of the person's words, read off the ledger (its
107
+ * last `clock` row and that turn's `time-reading` and `time-answer` rows) —
108
+ * `undefined` when the turn has no clock, no settled mention and none
109
+ * pending. A `rule` reading is named as a window only once the person
110
+ * answered it in the time ask; before that its quote is `pending`. The
111
+ * `control` window is not a reading and is not named (TQ13).
112
+ */
113
+ export declare function readerWindowsOf(ledger: readonly unknown[] | undefined): ReaderWindows | undefined;
114
+ //# sourceMappingURL=windows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windows.d.ts","sourceRoot":"","sources":["../../../../src/core/time/windows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvD,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAI1C;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,sBAAsB,GAAG,UAAU,GAAG,SAAS,CAAC;AAEpF,+FAA+F;AAC/F,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,qDAAqD;IACrD,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACjC,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,0HAA0H;IAC1H,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;CACxC;AAED,yFAAyF;AACzF,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC,uFAAuF;IACvF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,SAAS,EAAE,CAAC,EAAE,CAAC;CACnD;AAgBD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,SAAS,cAAc,EAAE,EACnC,KAAK,EAAE,QAAQ,GAAG,SAAS,EAC3B,OAAO,GAAE,SAAS,aAAa,EAAO,GACrC,WAAW,CAyDb;AAED,2GAA2G;AAC3G,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;IAC1B,yHAAyH;IACzH,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;IACxC;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC;CAChC;AAgBD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,cAAc,EAAE,EACnC,OAAO,GAAE,SAAS,aAAa,EAAO,GACrC,SAAS,MAAM,EAAE,CAWnB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAejG"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * core/time/wire — the time layer's JSON that crosses a transport (time
3
+ * design § 7.5): `ctx.time`, the window a call asks for, handed to the tool.
4
+ *
5
+ * Pattern: one versioned shape, the same object in process and on the wire.
6
+ * In process it is `ToolExecutionContext.time`; over MCP it travels
7
+ * in the `tools/call` request's `_meta.agentfootprint.time`
8
+ * (`lib/mcp/mcpClient.ts` sends it, `lib/mcp/mcpServe.ts` hands it
9
+ * to the served tool); a transport with no metadata slot sends
10
+ * nothing, and the tool declares its period from its own arguments.
11
+ * A tool's `period` declaration itself travels in the listing's
12
+ * `_meta.agentfootprint.period`, judged by `arguments/declare.ts`.
13
+ * Role: core/ leaf (the time layer). Imports `instant.ts`, `range.ts` and
14
+ * `zone.ts` only.
15
+ * Emits: N/A.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * timeContextOf({ asked: { from: '2026-10-09T08:00:00-07:00', to: '2026-10-09T08:41:00-07:00' } },
20
+ * { now: '2026-10-09T15:40:00Z', zone: 'America/Los_Angeles' }, '2026-10-09T15:40:02.114Z');
21
+ * // { version: 1, asked: { from: …, to: …, edge: 'exclusive' }, zone: 'America/Los_Angeles',
22
+ * // now: '2026-10-09T15:40:00Z', dispatchedAt: '2026-10-09T15:40:02.114Z' }
23
+ * ```
24
+ */
25
+ import { type InstantText } from './instant.js';
26
+ import { type TimeRange } from './range.js';
27
+ import { type ZoneName } from './zone.js';
28
+ /** The shape's version — a reader refuses one it does not know. */
29
+ export declare const TIME_CONTEXT_VERSION = 1;
30
+ /** The `_meta.agentfootprint` key the call's time travels under over MCP. */
31
+ export declare const TIME_CONTEXT_META_KEY = "time";
32
+ /**
33
+ * What a tool that declares a period is handed about the call's time
34
+ * (`ctx.time`). `asked` is the half-open range the call asks for — the
35
+ * person's window when the library filled or bound it, the sent value read
36
+ * back otherwise — so a tool can declare the `period.queried` its read covered
37
+ * without parsing its own argument. Absent when no form read the call back.
38
+ */
39
+ export interface TimeContext {
40
+ readonly version: typeof TIME_CONTEXT_VERSION;
41
+ readonly asked?: TimeRange & {
42
+ readonly edge: 'exclusive';
43
+ };
44
+ /** The person's zone for this run (the clock's). */
45
+ readonly zone: ZoneName;
46
+ /** The turn's frozen clock (§ 4). */
47
+ readonly now: InstantText;
48
+ /** The wall clock when the library handed the call to the tool — the `call` row's. */
49
+ readonly dispatchedAt: InstantText;
50
+ }
51
+ /** The context for one call, from its `call-window` row's `asked`, the turn's clock and the dispatch moment. */
52
+ export declare function timeContextOf(window: {
53
+ readonly asked?: TimeRange;
54
+ } | undefined, clock: {
55
+ readonly now: InstantText;
56
+ readonly zone: ZoneName;
57
+ }, dispatchedAt: InstantText): TimeContext;
58
+ /**
59
+ * A received context read — the version this runtime knows, every field well
60
+ * formed — or `undefined`. What a served tool is handed from the wire; never
61
+ * repaired.
62
+ */
63
+ export declare function readTimeContext(value: unknown): TimeContext | undefined;
64
+ //# sourceMappingURL=wire.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../../../src/core/time/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEtD,mEAAmE;AACnE,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,SAAS,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,oBAAoB,CAAC;IAC9C,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG;QAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;KAAE,CAAC;IAC5D,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,qCAAqC;IACrC,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;IAC1B,sFAAsF;IACtF,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC;CACpC;AAED,gHAAgH;AAChH,wBAAgB,aAAa,CAC3B,MAAM,EAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,EAClD,KAAK,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,EAC7D,YAAY,EAAE,WAAW,GACxB,WAAW,CAWb;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CA4BvE"}