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,75 @@
1
+ /**
2
+ * core/time/checkRecord — the record half of the result checks (time design
3
+ * § 9.2, § 9.6, step T8): the shapes a `period` row carries
4
+ * (`PeriodDiffers`, `ReadSource`), the checkpoint door's tests for them
5
+ * (`isPeriodDiffers`, `isShifted`), and the two reads over the turn's
6
+ * wall-clock sources (`distinctSources`, `clocksDiffer`).
7
+ *
8
+ * Pattern: pure shapes and guards; no conversion, no drift, no clock.
9
+ * Role: split from `check.ts` BY FILE for the synchronous doors — the
10
+ * checkpoint door's row test (`coverage/period.ts` ·
11
+ * `periodRowIsWellFormed`) is on every agent's graph, and a bundler
12
+ * places a whole file there — so this file imports only
13
+ * `instant.ts` and the range and zone types (the optional-family
14
+ * law, `test/lib/trace-toolpack/browserGraph.test.ts`). `check.ts`
15
+ * re-exports every public name.
16
+ * Emits: N/A.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * clocksDiffer([
21
+ * { toolName: 'orders', zone: 'America/New_York' },
22
+ * { toolName: 'tickets', zone: 'Europe/Berlin' },
23
+ * ]); // { tools: ['orders', 'tickets'], zones: ['America/New_York', 'Europe/Berlin'] }
24
+ * ```
25
+ */
26
+ import type { TimeRange } from './range.js';
27
+ import type { ZoneName } from './zone.js';
28
+ /** Where a check's read range came from — see the module table. */
29
+ export type ReadSource = 'declared' | 'sent' | 'shifted' | 'asked';
30
+ /**
31
+ * `period-differs-from-asked` (§ 9.2): the range compared against, what was
32
+ * read, and the two lists — each piece half-open, in time order, spelled in
33
+ * UTC. At least one list is non-empty (an empty check is not filed).
34
+ */
35
+ export interface PeriodDiffers {
36
+ /** `asked` — the call's asked range; `person` — the person's window, for a window the model chose. */
37
+ readonly against: 'asked' | 'person';
38
+ /** The range compared against. */
39
+ readonly asked: TimeRange;
40
+ /** What the call read — one range per declared period, else one. */
41
+ readonly read: readonly TimeRange[];
42
+ readonly source: ReadSource;
43
+ /** The step a declared inclusive end was read back with (§ 3.3) — `source: 'declared'` only. */
44
+ readonly stepMs?: number;
45
+ /** Asked but not read. */
46
+ readonly missing: readonly TimeRange[];
47
+ /** Read but not asked. */
48
+ readonly extra: readonly TimeRange[];
49
+ }
50
+ /** A dataset of one call whose declared time axis names a zone — a wall-clock source. */
51
+ export interface SourceClock {
52
+ readonly toolName: string;
53
+ readonly zone: ZoneName;
54
+ }
55
+ /** `clocks-differ` (§ 9.6): the wall-clock sources of one answer, when they declare different zones. */
56
+ export interface ClocksDiffer {
57
+ readonly tools: readonly string[];
58
+ readonly zones: readonly ZoneName[];
59
+ }
60
+ /**
61
+ * The wall-clock sources of one answer, one per tool and zone in the order
62
+ * met — the limits block names each. Fresh plain objects.
63
+ */
64
+ export declare function distinctSources(sources: readonly SourceClock[]): SourceClock[];
65
+ /**
66
+ * `clocks-differ` (§ 9.6) — the tools and zones when the wall-clock sources
67
+ * of one answer declare more than one zone; `undefined` otherwise. A label
68
+ * only: it changes no standing, and every comparison is made on instants.
69
+ */
70
+ export declare function clocksDiffer(sources: readonly SourceClock[]): ClocksDiffer | undefined;
71
+ /** The checkpoint door's test for a row's {@link PeriodDiffers}. */
72
+ export declare function isPeriodDiffers(value: unknown): value is PeriodDiffers;
73
+ /** The checkpoint door's test for a row's `shifted`. */
74
+ export declare function isShifted(value: unknown): boolean;
75
+ //# sourceMappingURL=checkRecord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkRecord.d.ts","sourceRoot":"","sources":["../../../../src/core/time/checkRecord.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAI1C,mEAAmE;AACnE,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEnE;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,sGAAsG;IACtG,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,CAAC;IACrC,kCAAkC;IAClC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,oEAAoE;IACpE,QAAQ,CAAC,IAAI,EAAE,SAAS,SAAS,EAAE,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,gGAAgG;IAChG,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,0BAA0B;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,SAAS,EAAE,CAAC;IACvC,0BAA0B;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;CACtC;AAED,yFAAyF;AACzF,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;CACzB;AAED,wGAAwG;AACxG,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAC;CACrC;AAID;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,EAAE,CAU9E;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,GAAG,YAAY,GAAG,SAAS,CAKtF;AAaD,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAiBtE;AAED,wDAAwD;AACxD,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMjD"}
@@ -0,0 +1,184 @@
1
+ /**
2
+ * core/time/clock — the run clock: a declared, recorded input, never a hidden read.
3
+ *
4
+ * Pattern: normalize-or-refuse at a boundary (`core/runInput.ts`'s shape): the
5
+ * app's `.time({ zone })` and the run's `time: { now, zone, window }`
6
+ * are read here into one {@link TimeClock}, or refused by name.
7
+ * Role: core/ leaf (the time layer's one owner). Imports `instant.ts`,
8
+ * `zone.ts`, `range.ts`, `reader.ts` (the reader's check) and
9
+ * `resolve.ts` (the policy's) only. The Agent reads the two inputs
10
+ * (`Agent.run`, `Agent.resume`); seed stamps the clock once per turn
11
+ * (`rows.ts` · `ClockRow`); the ToolCalls resume door compares a
12
+ * resume's `time` with the kept clock ({@link clockChange}).
13
+ * Emits: N/A.
14
+ *
15
+ * ## The laws (time design § 4)
16
+ *
17
+ * - **The zone is per run; the builder's is a fallback.** The run's
18
+ * `time.zone` wins, `.time({ zone })` is used when the run names none, and
19
+ * with neither the run is REFUSED before the turn starts — never the
20
+ * server's zone ({@link draftClock} answers `'no-zone'`).
21
+ * - **`now` is the app's, else the turn's start** — admitted as
22
+ * `nowSource: 'default'`, like any default nobody chose.
23
+ * - **Frozen across a pause.** The clock is written once per turn. A resume
24
+ * that passes a different `time` keeps the frozen clock and records what was
25
+ * passed ({@link clockChange}); it is not refused, because an app that
26
+ * passes the current time on every call is doing nothing wrong.
27
+ * - **A window set in a UI is a run input** (`time.window`), recorded with
28
+ * `source: 'control'` — the person's own typed value, never filed as an
29
+ * answer to an ask.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const run = readRunTime({ now: '2026-10-09T15:40:00Z', zone: 'America/Los_Angeles' });
34
+ * const draft = draftClock(run.value, readTimeOptions({}).value!);
35
+ * // { now: '2026-10-09T15:40:00Z', zone: 'America/Los_Angeles', zoneSource: 'run' }
36
+ * completeClock(draft as ClockDraft, Date.parse('2026-10-09T15:40:02Z'));
37
+ * // { now: '2026-10-09T15:40:00Z', nowSource: 'app', zone: 'America/Los_Angeles', zoneSource: 'run' }
38
+ * ```
39
+ */
40
+ import { type InstantText } from './instant.js';
41
+ import { type TimeRange } from './range.js';
42
+ import { type ZoneName } from './zone.js';
43
+ import { type TimeReader } from './reader.js';
44
+ import { type TimePolicy } from './resolveRecord.js';
45
+ import { type TimeAskMessages } from './ask.js';
46
+ /** The run's clock, stamped once per turn (time design § 4). */
47
+ export interface TimeClock {
48
+ /** The anchor for this turn — the app's `now`, else the turn's start. */
49
+ readonly now: InstantText;
50
+ /** The app passed `now`, or the library took the turn's start. */
51
+ readonly nowSource: 'app' | 'default';
52
+ /** The person's zone for this run — an IANA name. */
53
+ readonly zone: ZoneName;
54
+ /** The run's `time.zone`, else the `.time({ zone })` fallback. */
55
+ readonly zoneSource: 'run' | 'builder';
56
+ }
57
+ /**
58
+ * The run's time input — `agent.run({ message, time })`, or the options bag of
59
+ * `run`, `followUp`, `resume` and `resumeOnError`. Every key is optional; a
60
+ * run with no zone here needs the builder's fallback.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * await agent.run({ message: 'errors since 8?', time: { now: sentAt, zone: 'America/Los_Angeles' } });
65
+ * ```
66
+ */
67
+ export interface RunTime {
68
+ /**
69
+ * The turn's anchor — the MESSAGE's time, so a replay or a late resume
70
+ * reads "yesterday" the same way. An ISO 8601 instant with a zone (upper
71
+ * case `T` and `Z`, no leap second), or a `Date`. Omitted: the turn's start,
72
+ * recorded `nowSource: 'default'`.
73
+ */
74
+ readonly now?: string | Date;
75
+ /** The person's IANA zone for this run (`'America/Los_Angeles'`). Never an abbreviation. */
76
+ readonly zone?: string;
77
+ /**
78
+ * A window set in a UI — a brushed chart range, a range picker — as a
79
+ * half-open `{ from, to }` of instants. Recorded with `source: 'control'`.
80
+ */
81
+ readonly window?: TimeRange;
82
+ }
83
+ /** The builder's `.time(options)` — the fallback zone, the reader and its policy (time design § 11). */
84
+ export interface TimeOptions {
85
+ /** The fallback zone for a run that names none. Omitted: every run must name its own. */
86
+ readonly zone?: string;
87
+ /**
88
+ * The strategy that reads the person's words into time parts (`TimeReader`).
89
+ * No default: without one, the person's words are not read — no
90
+ * `time-reading` row is filed.
91
+ */
92
+ readonly reader?: TimeReader;
93
+ /**
94
+ * How the library picks among a reading's candidates (needs `reader`).
95
+ * `dateOrder` (default `'ask'`): a numeric date's orders become choices,
96
+ * or the one order your people write (`'MDY'`, `'DMY'`, `'YMD'`), recorded
97
+ * as assumed. `year` (default `'ask'`): a date said without a year is
98
+ * asked, or `'current'` — the clock's year, recorded as assumed.
99
+ */
100
+ readonly policy?: {
101
+ readonly dateOrder?: TimePolicy['dateOrder'];
102
+ readonly year?: TimePolicy['year'];
103
+ };
104
+ /**
105
+ * Your words for the time ask (`defaultTimeAskMessages` keys → sentence):
106
+ * the reason a refused time answer is re-asked with, the ask's questions,
107
+ * the label on a reading to confirm. A key you leave out keeps the default.
108
+ */
109
+ readonly messages?: Partial<TimeAskMessages>;
110
+ }
111
+ /** {@link RunTime} as read: every value checked and kept as written, a `Date` spelled in UTC. */
112
+ export interface ReadRunTime {
113
+ readonly now?: InstantText;
114
+ readonly zone?: ZoneName;
115
+ readonly window?: TimeRange;
116
+ }
117
+ /** {@link TimeOptions} as read — the policy's defaults filled in when a reader is armed. */
118
+ export interface ReadTimeOptions {
119
+ readonly zone?: ZoneName;
120
+ readonly reader?: TimeReader;
121
+ readonly policy?: TimePolicy;
122
+ /** The app's catalog overrides — every key one the catalog has. */
123
+ readonly messages?: Partial<TimeAskMessages>;
124
+ }
125
+ /** What a turn's clock is before seed knows the turn's start. */
126
+ export interface ClockDraft {
127
+ readonly now?: InstantText;
128
+ readonly zone: ZoneName;
129
+ readonly zoneSource: 'run' | 'builder';
130
+ readonly window?: TimeRange;
131
+ }
132
+ /** A read answer: the value, or a problem named in words. */
133
+ export type Read<T> = {
134
+ readonly value: T;
135
+ } | {
136
+ readonly problem: string;
137
+ };
138
+ /**
139
+ * The run's `time` input, checked. `undefined` reads as "nothing passed".
140
+ * Refused, by name: a non-object, an unknown key, a zone that is not an IANA
141
+ * name, a `now` that is not an instant with a zone, a `window` that is not two
142
+ * strict instants with `from` before `to`.
143
+ */
144
+ export declare function readRunTime(value: unknown): Read<ReadRunTime | undefined>;
145
+ /**
146
+ * The builder's `.time(options)`, checked. `undefined` reads as `{}` — the
147
+ * layer armed with no fallback zone, so every run names its own.
148
+ */
149
+ export declare function readTimeOptions(value: unknown): Read<ReadTimeOptions>;
150
+ /**
151
+ * The turn's clock as far as the run's inputs decide it — or `'no-zone'`
152
+ * when neither the run nor the builder names a zone (the run is then refused;
153
+ * never the server's zone).
154
+ */
155
+ export declare function draftClock(run: ReadRunTime | undefined, options: ReadTimeOptions): ClockDraft | 'no-zone';
156
+ /** The clock, once the turn's start is known: `now` is the app's, else that start. */
157
+ export declare function completeClock(draft: ClockDraft, turnStartMs: number): TimeClock;
158
+ /** What a resume passed that differs from the kept clock, and the kept values it would have replaced. */
159
+ export interface ClockChange {
160
+ readonly passed: ReadRunTime;
161
+ readonly kept: {
162
+ readonly now: InstantText;
163
+ readonly zone: ZoneName;
164
+ readonly window?: TimeRange;
165
+ };
166
+ }
167
+ /**
168
+ * The difference between a resume's `time` and the turn's frozen clock, or
169
+ * `undefined` when every value passed equals the kept one (a key not passed
170
+ * is no difference). `now` compares as text: a resume passing the same
171
+ * instant in another spelling is recorded, because the record keeps spellings.
172
+ *
173
+ * @example
174
+ * ```ts
175
+ * clockChange({ now: '2026-10-09T16:10:00Z' }, { now: '2026-10-09T15:40:00Z', zone: 'UTC' });
176
+ * // { passed: { now: '2026-10-09T16:10:00Z' }, kept: { now: '2026-10-09T15:40:00Z', zone: 'UTC' } }
177
+ * ```
178
+ */
179
+ export declare function clockChange(passed: ReadRunTime, kept: {
180
+ readonly now: InstantText;
181
+ readonly zone: ZoneName;
182
+ readonly window?: TimeRange;
183
+ }): ClockChange | undefined;
184
+ //# sourceMappingURL=clock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clock.d.ts","sourceRoot":"","sources":["../../../../src/core/time/clock.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,179 @@
1
+ /**
2
+ * core/time/convert — a tool's period FORMS (time design § 7.1) and the EXACT
3
+ * conversions of one range into them (§ 7.2), with the inverse a binding reads.
4
+ *
5
+ * Pattern: one table per direction. A tool declares every SHAPE its period
6
+ * takes (`PeriodForm` — two arguments, one joined string, an object,
7
+ * a day, a look-back); the library converts a resolved range into the
8
+ * first form that holds it EXACTLY ({@link convertExact}) and reads a
9
+ * sent value back into a range ({@link readBack}). Both cross the
10
+ * argument boundary of § 3.3 through `range.ts` (`boundInto` /
11
+ * `boundFrom` for a `to` bound; `lookbackRange` for a look-back) —
12
+ * never inline.
13
+ * Role: core/ leaf (the time layer). Imports `instant.ts`, `duration.ts`,
14
+ * `range.ts`, `zone.ts` and `periodForm.ts` — the declaration half
15
+ * (the shapes, the sugar, each form's own rules, a declared value's
16
+ * spelling, the tool's facts), split out for the synchronous doors
17
+ * (`arguments/declare.ts`, `ask.ts`, `rows.ts`) and re-exported
18
+ * here. Asked by `bind.ts` (the fill and the binding) and `drift.ts`,
19
+ * which only an armed agent loads.
20
+ * Emits: N/A.
21
+ *
22
+ * ## The sugar (§ 7.1)
23
+ *
24
+ * | Sugar | Means |
25
+ * |-------|-------|
26
+ * | `{ argument, spelling: 'lookback' }` | `{ kind: 'lookback', argument, signed: false }` |
27
+ * | `spelling: 'signed-lookback'` | the same with `signed: true` |
28
+ * | `spelling: 'iso-range'` | `{ kind: 'joined', argument, as: 'iso', joiner: '..', edge: 'inclusive' }` |
29
+ * | `'wall-range'` + `zoneArgument` | `{ kind: 'joined', argument, as: 'wall', joiner: '..', edge: 'inclusive', zone: { argument } }` |
30
+ * | `accepts: [a, b]` | `[sugar(a), sugar(b)]` |
31
+ *
32
+ * ## The exact rows (§ 7.2) — what {@link convertExact} sends
33
+ *
34
+ * | Asked | Form | Sent | Note |
35
+ * |-------|------|------|------|
36
+ * | a look-back | `lookback` | the same length, the sign added or removed, respelled in the form's `units` | none when no unit of `units` spells it |
37
+ * | a look-back | `bounds` / `joined` / `object` | `[now − L, now)` in that `as` | |
38
+ * | a range | `bounds` / `joined` / `object`, `as` `iso` · `epoch-ms` · `epoch-s` | the range; a `to` bound per its `edge` | `epoch-s` rounds outward to whole seconds: `rounded` |
39
+ * | a range | `as: 'wall'` / `'date'` + a zone | the wall times (dates) in the zone | exact only when the tool reads back the same instants (no doubled hour; a date only at midnights) |
40
+ * | a whole day | `day` | that day | any other range is not exact — see the inexact rows |
41
+ * | a range ending at now (within `granularity`) | `lookback` | the smallest spelling in `units` that covers `from` | `rounded` when it is longer |
42
+ *
43
+ * Every other row of § 7.2 is not exact, and {@link convertExact} answers
44
+ * `undefined` for it.
45
+ *
46
+ * ## The inexact rows (§ 7.2, step T5b) — what {@link convertWidened} sends
47
+ *
48
+ * | Asked | Form | Sent | Reads |
49
+ * |-------|------|------|-------|
50
+ * | a range inside one calendar day (in the form's zone) | `day` | that day | the whole day — the rest of it is `extra` |
51
+ * | a range ending before now (past the tool's step) | `lookback` | the covering look-back from now, in the form's units | `[now − L, now]` — the gap after the range (and any rounding before it) is `extra` |
52
+ *
53
+ * A form whose read would be wider than the tool's `maxRange` is skipped.
54
+ * The refusals are tests the binding asks: a range across days when every
55
+ * form is a `day` ({@link spansDaysForDayOnly}), a sent wall time the zone
56
+ * skips ({@link wallGapArgument}), and the facts ({@link periodFactProblem};
57
+ * a range only partly older than `retention` runs —
58
+ * {@link partlyBeyondRetention}).
59
+ *
60
+ * ## Precision and the inclusive edge
61
+ *
62
+ * An ISO or wall bound is written to the second when the instant is a whole
63
+ * second, else to the millisecond; an inclusive `to` is "the last instant
64
+ * inside at that precision" (`to − 1 s`, or `to − 1 ms`). Read back, a bound's
65
+ * precision is how it was written: minutes (`to + 1 min`), seconds, or a
66
+ * fraction (`+ 1 ms`). An epoch bound's precision is its unit; a date's is
67
+ * the calendar day in the zone.
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * const forms = sugarForms({ argument: 'window', spelling: 'iso-range' });
72
+ * convertExact(
73
+ * { range: { from: '2026-10-09T08:00:00-07:00', to: '2026-10-09T08:41:00-07:00' } },
74
+ * forms,
75
+ * { now: '2026-10-09T15:40:00Z', zone: 'America/Los_Angeles', granularityMs: 60_000 },
76
+ * );
77
+ * // { form: 0, values: { window: '2026-10-09T08:00:00-07:00..2026-10-09T08:40:59-07:00' } }
78
+ * ```
79
+ */
80
+ import { type DurationText } from './duration.js';
81
+ import { type InstantText } from './instant.js';
82
+ import { sameRange, type TimeRange } from './range.js';
83
+ export { sameRange };
84
+ import { type ZoneName } from './zone.js';
85
+ import { type PeriodFacts, type PeriodForm } from './periodForm.js';
86
+ export { BOUND_AS, DEFAULT_GRANULARITY_MS, FACT_UNITS, FORM_KINDS, formArguments, formIssue, isBoundValue, needsZone, parsesUnderForm, PERIOD_SPELLINGS, periodFactProblem, primaryArgument, sugarForm, sugarForms, TIME_REFUSALS, } from './periodForm.js';
87
+ export type { Bound, BoundAs, FormArgument, PeriodDirection, PeriodFactProblem, PeriodFacts, PeriodForm, PeriodShapes, PeriodSpelling, TimeRefusal, ToBound, ZoneArgument, } from './periodForm.js';
88
+ /** What a conversion knows beyond the window: the turn's clock, the zones, the tool's step. */
89
+ export interface ConvertContext {
90
+ /** The turn's clock (§ 4) — a look-back ends here. */
91
+ readonly now: InstantText;
92
+ /** The zone a wall or date form is written in and its zone argument is sent: the window's. */
93
+ readonly zone: ZoneName;
94
+ /** The app's `.time({ zone })` — the zone of a form that declares `wallZone: 'app'` and no zone argument. */
95
+ readonly appZone?: ZoneName;
96
+ /** The tool's `granularity` in milliseconds, else {@link DEFAULT_GRANULARITY_MS}. */
97
+ readonly granularityMs: number;
98
+ }
99
+ /** The window to convert: its half-open range and, when it was said as one, its look-back. */
100
+ export interface WindowToConvert {
101
+ readonly range: TimeRange;
102
+ /** The look-back length the window was said as (`smhdw`), ending at the clock's `now`. */
103
+ readonly lookback?: DurationText;
104
+ }
105
+ /** One exact conversion: the form used (its index), the argument values, and whether it rounded outward. */
106
+ export interface Conversion {
107
+ readonly form: number;
108
+ readonly values: Readonly<Record<string, unknown>>;
109
+ readonly rounded?: true;
110
+ }
111
+ /**
112
+ * The first form (in declared order) that holds `window` EXACTLY — the exact
113
+ * rows of § 7.2 — as the argument values to send, or `undefined` when no form
114
+ * does. A form that would widen, shift or drop part of the window is never
115
+ * chosen here.
116
+ */
117
+ export declare function convertExact(window: WindowToConvert, forms: readonly PeriodForm[], ctx: ConvertContext): Conversion | undefined;
118
+ /**
119
+ * One conversion that holds MORE than the window: the form, the values, the
120
+ * range the tool reads with them (`sent`, half-open) and the parts of it the
121
+ * window did not ask for (`extra` — one or two ranges, in time order).
122
+ */
123
+ export interface WidenedConversion extends Conversion {
124
+ readonly sent: TimeRange;
125
+ readonly extra: readonly TimeRange[];
126
+ }
127
+ /**
128
+ * The first form (in declared order) that holds `window` by READING MORE than
129
+ * it — the inexact rows of § 7.2: a range inside one calendar day → that day
130
+ * (`day`); a range ending before now → the covering look-back from now
131
+ * (`lookback`). `widestMs` (the tool's `maxRange`) skips a form whose read
132
+ * would be wider than the tool reads at once. Asked only after
133
+ * {@link convertExact} found no exact form.
134
+ */
135
+ export declare function convertWidened(window: WindowToConvert, forms: readonly PeriodForm[], ctx: ConvertContext, widestMs?: number): WidenedConversion | undefined;
136
+ /**
137
+ * Whether every form is a `day` and the window spans more than one calendar
138
+ * day in the form's zone — the row § 7.2 refuses before dispatch: one call per
139
+ * day is the model's choice, not the library's.
140
+ */
141
+ export declare function spansDaysForDayOnly(window: WindowToConvert, forms: readonly PeriodForm[], ctx: ConvertContext): boolean;
142
+ /**
143
+ * The first argument of `form` whose sent value is a wall time the zone
144
+ * SKIPS (a spring-forward gap) — the tool would read a time that never
145
+ * happened; refused before dispatch (§ 7.2). `undefined` when the form reads
146
+ * no wall bound, the zone is unknown, or every wall value exists.
147
+ */
148
+ export declare function wallGapArgument(args: Readonly<Record<string, unknown>>, form: PeriodForm, ctx: {
149
+ readonly appZone?: ZoneName;
150
+ }): string | undefined;
151
+ /**
152
+ * The half-open range the arguments of `form` name — the § 3.3 conversion back
153
+ * from each bound — or `undefined` when they do not name one (missing,
154
+ * misspelled, a wall time the zone doubles or skips, `from` not before `to`).
155
+ * A look-back is read at the turn's clock (`lookbackRange`). The range is
156
+ * spelled in UTC: compare it as instants ({@link sameRange}).
157
+ */
158
+ export declare function readBack(args: Readonly<Record<string, unknown>>, form: PeriodForm, ctx: {
159
+ readonly now: InstantText;
160
+ readonly appZone?: ZoneName;
161
+ }): TimeRange | undefined;
162
+ /**
163
+ * The absolute range a look-back window was sent as to a bounds form —
164
+ * `[now − L, now)`, which reads back one millisecond shorter than the
165
+ * look-back's own `[now − L, now]` — so a binding recognises either.
166
+ */
167
+ export declare function lookbackAsBounds(now: InstantText, lookback: DurationText): TimeRange | undefined;
168
+ /** The tool's step in milliseconds — its `granularity`, else one minute (§ 7.4). */
169
+ export declare function granularityMsOf(facts: PeriodFacts | undefined): number;
170
+ /**
171
+ * Whether a half-open range is PARTLY older than what the source keeps — it
172
+ * starts before `now − retention` and ends after it. It dispatches as asked
173
+ * (§ 7.2); the result's `held` decides `partly-held`. `false` when the tool
174
+ * declares no `retention`.
175
+ */
176
+ export declare function partlyBeyondRetention(range: TimeRange, facts: PeriodFacts, now: InstantText): boolean;
177
+ /** The widest window the tool reads at once (`maxRange`) in milliseconds, when it declares one. */
178
+ export declare function widestMsOf(facts: PeriodFacts | undefined): number | undefined;
179
+ //# sourceMappingURL=convert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../../src/core/time/convert.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * core/time/drift — the clock at dispatch (time design § 7.4, step T5b).
3
+ *
4
+ * Pattern: one pure decision per dispatched call. The turn's clock is frozen
5
+ * at the message (§ 4); a LOOK-BACK is evaluated by the tool, against
6
+ * its own clock, when it is handed the call. After a pause (or with
7
+ * an app `now` far from the wall clock) the two differ by
8
+ * `drift = dispatchedAt − now`. Within the tool's step nothing
9
+ * changes; past it, the library re-sends its OWN look-back fill as
10
+ * the asked range in the tool's first absolute form that holds it
11
+ * exactly, and records a look-back it cannot re-send — the model's
12
+ * own (never written over, § 7.3), or a tool with no absolute form —
13
+ * as shifted.
14
+ * Role: core/ leaf (the time layer). Imports `convert.ts` and `range.ts`
15
+ * types only. Asked by ToolCalls (`stages/toolCalls.ts` ·
16
+ * `timeAtDispatch`) at both execute sites, just before the tool
17
+ * runs; the answer rides the `call` row (`rows.ts` · `CallDrift`).
18
+ * Emits: N/A.
19
+ *
20
+ * | Drift | The call sent | Tool has an absolute form | Sent | Recorded |
21
+ * |-------|---------------|---------------------------|------|----------|
22
+ * | ≤ the tool's step (one minute when none) | — | — | as it was | nothing |
23
+ * | larger | the library's look-back fill | yes | the asked range in that form | `drift: { outcome: 'redrawn', form }` |
24
+ * | larger | the library's look-back fill | no | the look-back | `drift: { outcome: 'shifted' }` |
25
+ * | larger | the model's look-back | — | the look-back, as sent | `drift: { outcome: 'shifted' }` |
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * driftAtDispatch(
30
+ * { how: 'filled', form: 0, asked: { from: '2026-10-09T14:40:00Z', to: '2026-10-09T15:40:00.001Z' } },
31
+ * [{ kind: 'lookback', argument: 'window', signed: false },
32
+ * { kind: 'bounds', from: { argument: 'start', as: 'epoch-ms' },
33
+ * to: { argument: 'end', as: 'epoch-ms', edge: 'exclusive' } }],
34
+ * { now: '2026-10-09T15:40:00Z', dispatchedAt: '2026-10-09T16:10:00.000Z', granularityMs: 60_000 },
35
+ * );
36
+ * // { byMs: 1_800_000, outcome: 'redrawn', form: 1,
37
+ * // values: { start: 1791556800000, end: 1791560400001 } }
38
+ * ```
39
+ */
40
+ import { type PeriodForm } from './convert.js';
41
+ import { type InstantText } from './instant.js';
42
+ import type { TimeRange } from './range.js';
43
+ import type { ZoneName } from './zone.js';
44
+ /** What a call's `call-window` row says about its window — the fields the decision reads. */
45
+ export interface DispatchedWindow {
46
+ readonly how: string;
47
+ readonly form?: number;
48
+ readonly asked?: TimeRange;
49
+ }
50
+ /** The clocks and the tool's step. */
51
+ export interface DispatchClock {
52
+ /** The turn's frozen clock. */
53
+ readonly now: InstantText;
54
+ /** The wall clock at dispatch — the `call` row's. */
55
+ readonly dispatchedAt: InstantText;
56
+ /** The tool's `granularity` in milliseconds, else one minute. */
57
+ readonly granularityMs: number;
58
+ /** The clock's zone — a wall or date form's zone argument is sent in it. */
59
+ readonly zone?: ZoneName;
60
+ /** The app's `.time({ zone })`, for a form that declares `wallZone: 'app'`. */
61
+ readonly appZone?: ZoneName;
62
+ }
63
+ /** The decision: nothing, a redraw (with the values to send), or a shift. */
64
+ export type DispatchDrift = {
65
+ readonly byMs: number;
66
+ readonly outcome: 'redrawn';
67
+ readonly form: number;
68
+ readonly values: Readonly<Record<string, unknown>>;
69
+ } | {
70
+ readonly byMs: number;
71
+ readonly outcome: 'shifted';
72
+ };
73
+ /**
74
+ * Whether the call SENT a look-back: its `call-window` row names a form, that
75
+ * form is a `lookback`, and the call dispatched with a window in it (filled,
76
+ * bound, or the model's). The one reading of it — the drift decision here and
77
+ * the result checks' step allowance (`check.ts` · `differsOf`) both ask it.
78
+ */
79
+ export declare function sentLookback(window: Pick<DispatchedWindow, 'how' | 'form'>, forms: readonly PeriodForm[]): boolean;
80
+ /**
81
+ * The drift decision for one dispatched call (the module table), or
82
+ * `undefined` when the call sent no look-back or the drift is within the
83
+ * tool's step. Pure.
84
+ */
85
+ export declare function driftAtDispatch(window: DispatchedWindow | undefined, forms: readonly PeriodForm[], clock: DispatchClock): DispatchDrift | undefined;
86
+ //# sourceMappingURL=drift.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drift.d.ts","sourceRoot":"","sources":["../../../../src/core/time/drift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,6FAA6F;AAC7F,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;CAC5B;AAED,sCAAsC;AACtC,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;IAC1B,qDAAqD;IACrD,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC;IACnC,iEAAiE;IACjE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC;IACzB,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;CAC7B;AAED,6EAA6E;AAC7E,MAAM,MAAM,aAAa,GACrB;IACE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACpD,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;CAAE,CAAC;AAE3D;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,MAAM,CAAC,EAC9C,KAAK,EAAE,SAAS,UAAU,EAAE,GAC3B,OAAO,CAQT;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,gBAAgB,GAAG,SAAS,EACpC,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,KAAK,EAAE,aAAa,GACnB,aAAa,GAAG,SAAS,CA8B3B"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * core/time/duration — the ONE duration grammar, with a unit set per use.
3
+ *
4
+ * Pattern: one grammar, units narrowed per use (never a second regex). A
5
+ * duration is a MACHINE spelling an author declared — a tool's
6
+ * `-40m` argument, a `retention: '30d'`, a dataset's `interval:
7
+ * '5m'` — never a person's words ("the last 40 minutes" is read only
8
+ * by an armed reader). This is the T-spellings law of the time
9
+ * design (`docs/design/time/README.md`, § 5.4).
10
+ * Role: core/ leaf (the time layer's one owner). Imports nothing. Asked by
11
+ * `arguments/declare.ts` · `parsesUnderSpelling` for a look-back.
12
+ * Emits: N/A.
13
+ *
14
+ * ## The grammar
15
+ *
16
+ * `^[1-9][0-9]*[smhdw]$` — a positive integer with no leading zero, then one
17
+ * unit. NO digit cap: `1000000m` is a look-back today and stays one. The UNIT
18
+ * SET is named by every caller, because widening it is a behaviour change:
19
+ *
20
+ * | Use | Units | Why |
21
+ * |-----|-------|-----|
22
+ * | a look-back argument ({@link LOOKBACK_UNITS}) | `mhdw` | today's spelling; a backend that never took seconds is never sent `30s` unless its tool declares `units: 'smhdw'` |
23
+ * | a dataset's interval ({@link AXIS_UNITS}) | `smhdw` | a series can be bucketed by the second |
24
+ *
25
+ * `d` is 24 hours and `w` is 7 days: a machine duration, not a calendar day
26
+ * (a calendar day in a zone with DST is `zone.ts`'s question).
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * isDuration('30m', LOOKBACK_UNITS); // true
31
+ * isDuration('30s', LOOKBACK_UNITS); // false — seconds are opt-in
32
+ * isDuration('30s', AXIS_UNITS); // true
33
+ * durationMs('2h', LOOKBACK_UNITS); // 7200000
34
+ * spellDuration(7_200_000, LOOKBACK_UNITS); // '2h' — the smallest exact spelling
35
+ * ```
36
+ */
37
+ /** The one duration grammar's text: `^[1-9][0-9]*[smhdw]$`, units narrowed per use. */
38
+ export type DurationText = string;
39
+ /** One unit: second, minute, hour, day (24 h), week (7 d). */
40
+ export type DurationUnit = 's' | 'm' | 'h' | 'd' | 'w';
41
+ /** Every unit, smallest first. */
42
+ export declare const DURATION_UNITS: readonly DurationUnit[];
43
+ /** A look-back's units — today's `mhdw`; `s` only by the tool's own opt-in. */
44
+ export declare const LOOKBACK_UNITS = "mhdw";
45
+ /** A dataset interval's units. */
46
+ export declare const AXIS_UNITS = "smhdw";
47
+ /**
48
+ * Whether `units` is a unit set: a non-empty string of distinct letters from
49
+ * `smhdw`, in any order.
50
+ */
51
+ export declare function isUnitSet(units: unknown): units is string;
52
+ /** The count (as written, digits) and unit of a duration, or `undefined` when it is not one under `units`. */
53
+ export declare function durationParts(value: unknown, units: string): {
54
+ readonly digits: string;
55
+ readonly unit: DurationUnit;
56
+ } | undefined;
57
+ /** Whether `value` is a duration under `units`. A format check: any number of digits. */
58
+ export declare function isDuration(value: unknown, units: string): value is DurationText;
59
+ /**
60
+ * The milliseconds a duration names, or `undefined` when it is not a duration
61
+ * under `units` — or names more milliseconds than a double holds exactly (the
62
+ * spelling is still a duration; it just cannot be measured).
63
+ */
64
+ export declare function durationMs(value: unknown, units: string): number | undefined;
65
+ /**
66
+ * The smallest exact spelling of `ms` in `units` — the largest unit that
67
+ * divides it — or `undefined` when no unit in the set divides it (or `ms` is
68
+ * not a positive whole number of milliseconds). `durationMs(spellDuration(x))`
69
+ * is `x` whenever it is defined.
70
+ */
71
+ export declare function spellDuration(ms: number, units: string): DurationText | undefined;
72
+ //# sourceMappingURL=duration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duration.d.ts","sourceRoot":"","sources":["../../../../src/core/time/duration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,uFAAuF;AACvF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,8DAA8D;AAC9D,MAAM,MAAM,YAAY,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEvD,kCAAkC;AAClC,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAA6C,CAAC;AAEhG,+EAA+E;AAC/E,eAAO,MAAM,cAAc,SAAS,CAAC;AAErC,kCAAkC;AAClC,eAAO,MAAM,UAAU,UAAU,CAAC;AAYlC;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAUzD;AAUD,8GAA8G;AAC9G,wBAAgB,aAAa,CAC3B,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,GACZ;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GAAG,SAAS,CAMtE;AAED,yFAAyF;AACzF,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,YAAY,CAE/E;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAK5E;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CASjF"}