pinecall 0.1.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 (431) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +134 -0
  3. package/dist/agent/accepts.d.ts +32 -0
  4. package/dist/agent/accepts.d.ts.map +1 -0
  5. package/dist/agent/accepts.js +28 -0
  6. package/dist/agent/accepts.js.map +1 -0
  7. package/dist/agent/agent.d.ts +189 -0
  8. package/dist/agent/agent.d.ts.map +1 -0
  9. package/dist/agent/agent.js +262 -0
  10. package/dist/agent/agent.js.map +1 -0
  11. package/dist/agent/authors.d.ts +12 -0
  12. package/dist/agent/authors.d.ts.map +1 -0
  13. package/dist/agent/authors.js +28 -0
  14. package/dist/agent/authors.js.map +1 -0
  15. package/dist/agent/decorators.d.ts +22 -0
  16. package/dist/agent/decorators.d.ts.map +1 -0
  17. package/dist/agent/decorators.js +49 -0
  18. package/dist/agent/decorators.js.map +1 -0
  19. package/dist/agent/docstrings.d.ts +43 -0
  20. package/dist/agent/docstrings.d.ts.map +1 -0
  21. package/dist/agent/docstrings.js +311 -0
  22. package/dist/agent/docstrings.js.map +1 -0
  23. package/dist/agent/lifecycle.d.ts +29 -0
  24. package/dist/agent/lifecycle.d.ts.map +1 -0
  25. package/dist/agent/lifecycle.js +11 -0
  26. package/dist/agent/lifecycle.js.map +1 -0
  27. package/dist/agent/stages.d.ts +28 -0
  28. package/dist/agent/stages.d.ts.map +1 -0
  29. package/dist/agent/stages.js +32 -0
  30. package/dist/agent/stages.js.map +1 -0
  31. package/dist/agent/state.d.ts +43 -0
  32. package/dist/agent/state.d.ts.map +1 -0
  33. package/dist/agent/state.js +104 -0
  34. package/dist/agent/state.js.map +1 -0
  35. package/dist/agent/tools.d.ts +66 -0
  36. package/dist/agent/tools.d.ts.map +1 -0
  37. package/dist/agent/tools.js +148 -0
  38. package/dist/agent/tools.js.map +1 -0
  39. package/dist/agent/visibility.d.ts +40 -0
  40. package/dist/agent/visibility.d.ts.map +1 -0
  41. package/dist/agent/visibility.js +89 -0
  42. package/dist/agent/visibility.js.map +1 -0
  43. package/dist/call/call.d.ts +55 -0
  44. package/dist/call/call.d.ts.map +1 -0
  45. package/dist/call/call.js +108 -0
  46. package/dist/call/call.js.map +1 -0
  47. package/dist/call/history.d.ts +34 -0
  48. package/dist/call/history.d.ts.map +1 -0
  49. package/dist/call/history.js +38 -0
  50. package/dist/call/history.js.map +1 -0
  51. package/dist/call/room.d.ts +58 -0
  52. package/dist/call/room.d.ts.map +1 -0
  53. package/dist/call/room.js +68 -0
  54. package/dist/call/room.js.map +1 -0
  55. package/dist/cli/browser.d.ts +8 -0
  56. package/dist/cli/browser.d.ts.map +1 -0
  57. package/dist/cli/browser.js +27 -0
  58. package/dist/cli/browser.js.map +1 -0
  59. package/dist/cli/callbacks.d.ts +26 -0
  60. package/dist/cli/callbacks.d.ts.map +1 -0
  61. package/dist/cli/callbacks.js +68 -0
  62. package/dist/cli/callbacks.js.map +1 -0
  63. package/dist/cli/chat.d.ts +21 -0
  64. package/dist/cli/chat.d.ts.map +1 -0
  65. package/dist/cli/chat.js +214 -0
  66. package/dist/cli/chat.js.map +1 -0
  67. package/dist/cli/config.d.ts +16 -0
  68. package/dist/cli/config.d.ts.map +1 -0
  69. package/dist/cli/config.js +94 -0
  70. package/dist/cli/config.js.map +1 -0
  71. package/dist/cli/connected.d.ts +30 -0
  72. package/dist/cli/connected.d.ts.map +1 -0
  73. package/dist/cli/connected.js +32 -0
  74. package/dist/cli/connected.js.map +1 -0
  75. package/dist/cli/credentials.d.ts +41 -0
  76. package/dist/cli/credentials.d.ts.map +1 -0
  77. package/dist/cli/credentials.js +98 -0
  78. package/dist/cli/credentials.js.map +1 -0
  79. package/dist/cli/ear.d.ts +3 -0
  80. package/dist/cli/ear.d.ts.map +1 -0
  81. package/dist/cli/ear.js +59 -0
  82. package/dist/cli/ear.js.map +1 -0
  83. package/dist/cli/env.d.ts +40 -0
  84. package/dist/cli/env.d.ts.map +1 -0
  85. package/dist/cli/env.js +45 -0
  86. package/dist/cli/env.js.map +1 -0
  87. package/dist/cli/eval.d.ts +37 -0
  88. package/dist/cli/eval.d.ts.map +1 -0
  89. package/dist/cli/eval.js +83 -0
  90. package/dist/cli/eval.js.map +1 -0
  91. package/dist/cli/groups.d.ts +17 -0
  92. package/dist/cli/groups.d.ts.map +1 -0
  93. package/dist/cli/groups.js +38 -0
  94. package/dist/cli/groups.js.map +1 -0
  95. package/dist/cli/index.d.ts +16 -0
  96. package/dist/cli/index.d.ts.map +1 -0
  97. package/dist/cli/index.js +169 -0
  98. package/dist/cli/index.js.map +1 -0
  99. package/dist/cli/keys.d.ts +28 -0
  100. package/dist/cli/keys.d.ts.map +1 -0
  101. package/dist/cli/keys.js +137 -0
  102. package/dist/cli/keys.js.map +1 -0
  103. package/dist/cli/knowledge.d.ts +35 -0
  104. package/dist/cli/knowledge.d.ts.map +1 -0
  105. package/dist/cli/knowledge.js +174 -0
  106. package/dist/cli/knowledge.js.map +1 -0
  107. package/dist/cli/line.d.ts +33 -0
  108. package/dist/cli/line.d.ts.map +1 -0
  109. package/dist/cli/line.js +134 -0
  110. package/dist/cli/line.js.map +1 -0
  111. package/dist/cli/listening.d.ts +38 -0
  112. package/dist/cli/listening.d.ts.map +1 -0
  113. package/dist/cli/listening.js +124 -0
  114. package/dist/cli/listening.js.map +1 -0
  115. package/dist/cli/load.d.ts +38 -0
  116. package/dist/cli/load.d.ts.map +1 -0
  117. package/dist/cli/load.js +99 -0
  118. package/dist/cli/load.js.map +1 -0
  119. package/dist/cli/login.d.ts +30 -0
  120. package/dist/cli/login.d.ts.map +1 -0
  121. package/dist/cli/login.js +158 -0
  122. package/dist/cli/login.js.map +1 -0
  123. package/dist/cli/machine.d.ts +8 -0
  124. package/dist/cli/machine.d.ts.map +1 -0
  125. package/dist/cli/machine.js +41 -0
  126. package/dist/cli/machine.js.map +1 -0
  127. package/dist/cli/memory.d.ts +26 -0
  128. package/dist/cli/memory.d.ts.map +1 -0
  129. package/dist/cli/memory.js +148 -0
  130. package/dist/cli/memory.js.map +1 -0
  131. package/dist/cli/numbers.d.ts +25 -0
  132. package/dist/cli/numbers.d.ts.map +1 -0
  133. package/dist/cli/numbers.js +132 -0
  134. package/dist/cli/numbers.js.map +1 -0
  135. package/dist/cli/personas.d.ts +5 -0
  136. package/dist/cli/personas.d.ts.map +1 -0
  137. package/dist/cli/personas.js +94 -0
  138. package/dist/cli/personas.js.map +1 -0
  139. package/dist/cli/pipeline.d.ts +52 -0
  140. package/dist/cli/pipeline.d.ts.map +1 -0
  141. package/dist/cli/pipeline.js +184 -0
  142. package/dist/cli/pipeline.js.map +1 -0
  143. package/dist/cli/profiles.d.ts +70 -0
  144. package/dist/cli/profiles.d.ts.map +1 -0
  145. package/dist/cli/profiles.js +210 -0
  146. package/dist/cli/profiles.js.map +1 -0
  147. package/dist/cli/prompt.d.ts +20 -0
  148. package/dist/cli/prompt.d.ts.map +1 -0
  149. package/dist/cli/prompt.js +58 -0
  150. package/dist/cli/prompt.js.map +1 -0
  151. package/dist/cli/providers.d.ts +14 -0
  152. package/dist/cli/providers.d.ts.map +1 -0
  153. package/dist/cli/providers.js +116 -0
  154. package/dist/cli/providers.js.map +1 -0
  155. package/dist/cli/remember.d.ts +29 -0
  156. package/dist/cli/remember.d.ts.map +1 -0
  157. package/dist/cli/remember.js +112 -0
  158. package/dist/cli/remember.js.map +1 -0
  159. package/dist/cli/run.d.ts +20 -0
  160. package/dist/cli/run.d.ts.map +1 -0
  161. package/dist/cli/run.js +347 -0
  162. package/dist/cli/run.js.map +1 -0
  163. package/dist/cli/runs/candidate.d.ts +51 -0
  164. package/dist/cli/runs/candidate.d.ts.map +1 -0
  165. package/dist/cli/runs/candidate.js +127 -0
  166. package/dist/cli/runs/candidate.js.map +1 -0
  167. package/dist/cli/runs/drift.d.ts +75 -0
  168. package/dist/cli/runs/drift.d.ts.map +1 -0
  169. package/dist/cli/runs/drift.js +151 -0
  170. package/dist/cli/runs/drift.js.map +1 -0
  171. package/dist/cli/runs/index.d.ts +5 -0
  172. package/dist/cli/runs/index.d.ts.map +1 -0
  173. package/dist/cli/runs/index.js +99 -0
  174. package/dist/cli/runs/index.js.map +1 -0
  175. package/dist/cli/runs/suites.d.ts +16 -0
  176. package/dist/cli/runs/suites.d.ts.map +1 -0
  177. package/dist/cli/runs/suites.js +63 -0
  178. package/dist/cli/runs/suites.js.map +1 -0
  179. package/dist/cli/secret.d.ts +18 -0
  180. package/dist/cli/secret.d.ts.map +1 -0
  181. package/dist/cli/secret.js +41 -0
  182. package/dist/cli/secret.js.map +1 -0
  183. package/dist/cli/sessions.d.ts +21 -0
  184. package/dist/cli/sessions.d.ts.map +1 -0
  185. package/dist/cli/sessions.js +174 -0
  186. package/dist/cli/sessions.js.map +1 -0
  187. package/dist/cli/signup.d.ts +25 -0
  188. package/dist/cli/signup.d.ts.map +1 -0
  189. package/dist/cli/signup.js +122 -0
  190. package/dist/cli/signup.js.map +1 -0
  191. package/dist/cli/simulate.d.ts +45 -0
  192. package/dist/cli/simulate.d.ts.map +1 -0
  193. package/dist/cli/simulate.js +320 -0
  194. package/dist/cli/simulate.js.map +1 -0
  195. package/dist/cli/supervise.d.ts +18 -0
  196. package/dist/cli/supervise.d.ts.map +1 -0
  197. package/dist/cli/supervise.js +134 -0
  198. package/dist/cli/supervise.js.map +1 -0
  199. package/dist/cli/test.d.ts +12 -0
  200. package/dist/cli/test.d.ts.map +1 -0
  201. package/dist/cli/test.js +128 -0
  202. package/dist/cli/test.js.map +1 -0
  203. package/dist/cli/testing/caller.d.ts +28 -0
  204. package/dist/cli/testing/caller.d.ts.map +1 -0
  205. package/dist/cli/testing/caller.js +30 -0
  206. package/dist/cli/testing/caller.js.map +1 -0
  207. package/dist/cli/testing/gateway.d.ts +172 -0
  208. package/dist/cli/testing/gateway.d.ts.map +1 -0
  209. package/dist/cli/testing/gateway.js +96 -0
  210. package/dist/cli/testing/gateway.js.map +1 -0
  211. package/dist/cli/testing/goldens.d.ts +61 -0
  212. package/dist/cli/testing/goldens.d.ts.map +1 -0
  213. package/dist/cli/testing/goldens.js +54 -0
  214. package/dist/cli/testing/goldens.js.map +1 -0
  215. package/dist/cli/testing/latency.d.ts +15 -0
  216. package/dist/cli/testing/latency.d.ts.map +1 -0
  217. package/dist/cli/testing/latency.js +44 -0
  218. package/dist/cli/testing/latency.js.map +1 -0
  219. package/dist/cli/testing/matrix.d.ts +12 -0
  220. package/dist/cli/testing/matrix.d.ts.map +1 -0
  221. package/dist/cli/testing/matrix.js +103 -0
  222. package/dist/cli/testing/matrix.js.map +1 -0
  223. package/dist/cli/testing/progress.d.ts +26 -0
  224. package/dist/cli/testing/progress.d.ts.map +1 -0
  225. package/dist/cli/testing/progress.js +185 -0
  226. package/dist/cli/testing/progress.js.map +1 -0
  227. package/dist/cli/testing/reproduction.d.ts +19 -0
  228. package/dist/cli/testing/reproduction.d.ts.map +1 -0
  229. package/dist/cli/testing/reproduction.js +65 -0
  230. package/dist/cli/testing/reproduction.js.map +1 -0
  231. package/dist/cli/testing/score.d.ts +11 -0
  232. package/dist/cli/testing/score.d.ts.map +1 -0
  233. package/dist/cli/testing/score.js +54 -0
  234. package/dist/cli/testing/score.js.map +1 -0
  235. package/dist/cli/testing/seeding.d.ts +32 -0
  236. package/dist/cli/testing/seeding.d.ts.map +1 -0
  237. package/dist/cli/testing/seeding.js +44 -0
  238. package/dist/cli/testing/seeding.js.map +1 -0
  239. package/dist/cli/testing/suite.d.ts +40 -0
  240. package/dist/cli/testing/suite.d.ts.map +1 -0
  241. package/dist/cli/testing/suite.js +103 -0
  242. package/dist/cli/testing/suite.js.map +1 -0
  243. package/dist/cli/testing/voice.d.ts +37 -0
  244. package/dist/cli/testing/voice.d.ts.map +1 -0
  245. package/dist/cli/testing/voice.js +53 -0
  246. package/dist/cli/testing/voice.js.map +1 -0
  247. package/dist/cli/ui/admin/assets/index-C3WMXdfL.css +1 -0
  248. package/dist/cli/ui/admin/assets/index-DR1mxoAh.js +58 -0
  249. package/dist/cli/ui/admin/index.html +20 -0
  250. package/dist/cli/ui/asked.d.ts +16 -0
  251. package/dist/cli/ui/asked.d.ts.map +1 -0
  252. package/dist/cli/ui/asked.js +53 -0
  253. package/dist/cli/ui/asked.js.map +1 -0
  254. package/dist/cli/ui/browser.d.ts +10 -0
  255. package/dist/cli/ui/browser.d.ts.map +1 -0
  256. package/dist/cli/ui/browser.js +30 -0
  257. package/dist/cli/ui/browser.js.map +1 -0
  258. package/dist/cli/ui/chatting.d.ts +62 -0
  259. package/dist/cli/ui/chatting.d.ts.map +1 -0
  260. package/dist/cli/ui/chatting.js +171 -0
  261. package/dist/cli/ui/chatting.js.map +1 -0
  262. package/dist/cli/ui/console/assets/index-DCTnou52.css +1 -0
  263. package/dist/cli/ui/console/assets/index-dOcE4usU.js +99 -0
  264. package/dist/cli/ui/console/index.html +20 -0
  265. package/dist/cli/ui/console/logo-mark.png +0 -0
  266. package/dist/cli/ui/doors.d.ts +37 -0
  267. package/dist/cli/ui/doors.d.ts.map +1 -0
  268. package/dist/cli/ui/doors.js +70 -0
  269. package/dist/cli/ui/doors.js.map +1 -0
  270. package/dist/cli/ui/drifting.d.ts +23 -0
  271. package/dist/cli/ui/drifting.d.ts.map +1 -0
  272. package/dist/cli/ui/drifting.js +33 -0
  273. package/dist/cli/ui/drifting.js.map +1 -0
  274. package/dist/cli/ui/index.d.ts +15 -0
  275. package/dist/cli/ui/index.d.ts.map +1 -0
  276. package/dist/cli/ui/index.js +117 -0
  277. package/dist/cli/ui/index.js.map +1 -0
  278. package/dist/cli/ui/knowing.d.ts +36 -0
  279. package/dist/cli/ui/knowing.d.ts.map +1 -0
  280. package/dist/cli/ui/knowing.js +86 -0
  281. package/dist/cli/ui/knowing.js.map +1 -0
  282. package/dist/cli/ui/promoting.d.ts +26 -0
  283. package/dist/cli/ui/promoting.d.ts.map +1 -0
  284. package/dist/cli/ui/promoting.js +44 -0
  285. package/dist/cli/ui/promoting.js.map +1 -0
  286. package/dist/cli/ui/refusal.d.ts +18 -0
  287. package/dist/cli/ui/refusal.d.ts.map +1 -0
  288. package/dist/cli/ui/refusal.js +26 -0
  289. package/dist/cli/ui/refusal.js.map +1 -0
  290. package/dist/cli/ui/refused.d.ts +8 -0
  291. package/dist/cli/ui/refused.d.ts.map +1 -0
  292. package/dist/cli/ui/refused.js +11 -0
  293. package/dist/cli/ui/refused.js.map +1 -0
  294. package/dist/cli/ui/remembering.d.ts +38 -0
  295. package/dist/cli/ui/remembering.d.ts.map +1 -0
  296. package/dist/cli/ui/remembering.js +87 -0
  297. package/dist/cli/ui/remembering.js.map +1 -0
  298. package/dist/cli/ui/reproducing.d.ts +23 -0
  299. package/dist/cli/ui/reproducing.d.ts.map +1 -0
  300. package/dist/cli/ui/reproducing.js +52 -0
  301. package/dist/cli/ui/reproducing.js.map +1 -0
  302. package/dist/cli/ui/server.d.ts +22 -0
  303. package/dist/cli/ui/server.d.ts.map +1 -0
  304. package/dist/cli/ui/server.js +211 -0
  305. package/dist/cli/ui/server.js.map +1 -0
  306. package/dist/cli/ui/simulating.d.ts +47 -0
  307. package/dist/cli/ui/simulating.d.ts.map +1 -0
  308. package/dist/cli/ui/simulating.js +86 -0
  309. package/dist/cli/ui/simulating.js.map +1 -0
  310. package/dist/cli/ui/testing.d.ts +49 -0
  311. package/dist/cli/ui/testing.d.ts.map +1 -0
  312. package/dist/cli/ui/testing.js +104 -0
  313. package/dist/cli/ui/testing.js.map +1 -0
  314. package/dist/cli/view.d.ts +43 -0
  315. package/dist/cli/view.d.ts.map +1 -0
  316. package/dist/cli/view.js +137 -0
  317. package/dist/cli/view.js.map +1 -0
  318. package/dist/cli/whoami.d.ts +37 -0
  319. package/dist/cli/whoami.d.ts.map +1 -0
  320. package/dist/cli/whoami.js +78 -0
  321. package/dist/cli/whoami.js.map +1 -0
  322. package/dist/cli/world.d.ts +33 -0
  323. package/dist/cli/world.d.ts.map +1 -0
  324. package/dist/cli/world.js +48 -0
  325. package/dist/cli/world.js.map +1 -0
  326. package/dist/client/agent.d.ts +87 -0
  327. package/dist/client/agent.d.ts.map +1 -0
  328. package/dist/client/agent.js +209 -0
  329. package/dist/client/agent.js.map +1 -0
  330. package/dist/client/calls.d.ts +77 -0
  331. package/dist/client/calls.d.ts.map +1 -0
  332. package/dist/client/calls.js +153 -0
  333. package/dist/client/calls.js.map +1 -0
  334. package/dist/client/client.d.ts +58 -0
  335. package/dist/client/client.d.ts.map +1 -0
  336. package/dist/client/client.js +146 -0
  337. package/dist/client/client.js.map +1 -0
  338. package/dist/client/connection.d.ts +47 -0
  339. package/dist/client/connection.d.ts.map +1 -0
  340. package/dist/client/connection.js +141 -0
  341. package/dist/client/connection.js.map +1 -0
  342. package/dist/client/endpoints.d.ts +7 -0
  343. package/dist/client/endpoints.d.ts.map +1 -0
  344. package/dist/client/endpoints.js +21 -0
  345. package/dist/client/endpoints.js.map +1 -0
  346. package/dist/client/frames.d.ts +24 -0
  347. package/dist/client/frames.d.ts.map +1 -0
  348. package/dist/client/frames.js +49 -0
  349. package/dist/client/frames.js.map +1 -0
  350. package/dist/client/index.d.ts +15 -0
  351. package/dist/client/index.d.ts.map +1 -0
  352. package/dist/client/index.js +14 -0
  353. package/dist/client/index.js.map +1 -0
  354. package/dist/client/listeners.d.ts +36 -0
  355. package/dist/client/listeners.d.ts.map +1 -0
  356. package/dist/client/listeners.js +61 -0
  357. package/dist/client/listeners.js.map +1 -0
  358. package/dist/client/observe.d.ts +44 -0
  359. package/dist/client/observe.d.ts.map +1 -0
  360. package/dist/client/observe.js +122 -0
  361. package/dist/client/observe.js.map +1 -0
  362. package/dist/client/testing/gateway.d.ts +39 -0
  363. package/dist/client/testing/gateway.d.ts.map +1 -0
  364. package/dist/client/testing/gateway.js +129 -0
  365. package/dist/client/testing/gateway.js.map +1 -0
  366. package/dist/client/testing/index.d.ts +4 -0
  367. package/dist/client/testing/index.d.ts.map +1 -0
  368. package/dist/client/testing/index.js +4 -0
  369. package/dist/client/testing/index.js.map +1 -0
  370. package/dist/client/testing/log.d.ts +26 -0
  371. package/dist/client/testing/log.d.ts.map +1 -0
  372. package/dist/client/testing/log.js +111 -0
  373. package/dist/client/testing/log.js.map +1 -0
  374. package/dist/client/testing/loopback.d.ts +3 -0
  375. package/dist/client/testing/loopback.d.ts.map +1 -0
  376. package/dist/client/testing/loopback.js +3 -0
  377. package/dist/client/testing/loopback.js.map +1 -0
  378. package/dist/index.d.ts +22 -0
  379. package/dist/index.d.ts.map +1 -0
  380. package/dist/index.js +35 -0
  381. package/dist/index.js.map +1 -0
  382. package/dist/runtime/channels.d.ts +16 -0
  383. package/dist/runtime/channels.d.ts.map +1 -0
  384. package/dist/runtime/channels.js +30 -0
  385. package/dist/runtime/channels.js.map +1 -0
  386. package/dist/runtime/connect.d.ts +51 -0
  387. package/dist/runtime/connect.d.ts.map +1 -0
  388. package/dist/runtime/connect.js +284 -0
  389. package/dist/runtime/connect.js.map +1 -0
  390. package/dist/runtime/dispatch.d.ts +37 -0
  391. package/dist/runtime/dispatch.d.ts.map +1 -0
  392. package/dist/runtime/dispatch.js +52 -0
  393. package/dist/runtime/dispatch.js.map +1 -0
  394. package/dist/runtime/grounding.d.ts +15 -0
  395. package/dist/runtime/grounding.d.ts.map +1 -0
  396. package/dist/runtime/grounding.js +72 -0
  397. package/dist/runtime/grounding.js.map +1 -0
  398. package/dist/runtime/recall.d.ts +10 -0
  399. package/dist/runtime/recall.d.ts.map +1 -0
  400. package/dist/runtime/recall.js +13 -0
  401. package/dist/runtime/recall.js.map +1 -0
  402. package/dist/runtime/run-tool.d.ts +26 -0
  403. package/dist/runtime/run-tool.d.ts.map +1 -0
  404. package/dist/runtime/run-tool.js +82 -0
  405. package/dist/runtime/run-tool.js.map +1 -0
  406. package/dist/views/components.d.ts +17 -0
  407. package/dist/views/components.d.ts.map +1 -0
  408. package/dist/views/components.js +33 -0
  409. package/dist/views/components.js.map +1 -0
  410. package/dist/views/jsx-dev-runtime.d.ts +3 -0
  411. package/dist/views/jsx-dev-runtime.d.ts.map +1 -0
  412. package/dist/views/jsx-dev-runtime.js +5 -0
  413. package/dist/views/jsx-dev-runtime.js.map +1 -0
  414. package/dist/views/jsx-runtime.d.ts +49 -0
  415. package/dist/views/jsx-runtime.d.ts.map +1 -0
  416. package/dist/views/jsx-runtime.js +67 -0
  417. package/dist/views/jsx-runtime.js.map +1 -0
  418. package/dist/views/lang.d.ts +17 -0
  419. package/dist/views/lang.d.ts.map +1 -0
  420. package/dist/views/lang.js +46 -0
  421. package/dist/views/lang.js.map +1 -0
  422. package/dist/views/layout.d.ts +19 -0
  423. package/dist/views/layout.d.ts.map +1 -0
  424. package/dist/views/layout.js +62 -0
  425. package/dist/views/layout.js.map +1 -0
  426. package/dist/views/render.d.ts +19 -0
  427. package/dist/views/render.d.ts.map +1 -0
  428. package/dist/views/render.js +26 -0
  429. package/dist/views/render.js.map +1 -0
  430. package/package.json +76 -0
  431. package/tsconfig.tenant.json +24 -0
@@ -0,0 +1,44 @@
1
+ /** The latency a golden was answered with: the median of every turn's own metrics entry. */
2
+ import { TURN_METRICS } from "../view.js";
3
+ /**
4
+ * The medians of one call. The median and not the mean: one cold first turn would drag an average
5
+ * of four turns somewhere no caller ever waited, and the number here is meant to be the one a
6
+ * typical caller felt. Nothing is computed that the log does not already carry — a metric the
7
+ * session never measured is absent from the answer rather than reported as a zero.
8
+ */
9
+ export function mediansOf(entries) {
10
+ const medians = {};
11
+ for (const name of TURN_METRICS) {
12
+ const measured = takenPerTurn(entries, name);
13
+ if (measured.length > 0)
14
+ medians[name] = median(measured);
15
+ }
16
+ return medians;
17
+ }
18
+ /** The medians on one line, in the order a person reads them: the wait first, then where it went. */
19
+ export function latencyLine(medians) {
20
+ const parts = TURN_METRICS.filter((name) => medians[name] !== undefined).map((name) => `${name} ${Math.round(medians[name] * 1000)}ms`);
21
+ return parts.join(" · ");
22
+ }
23
+ // Every finished agent turn carries the block livekit measured for it under livekit's own field
24
+ // names, which is where these three are read from — never from a second, summarised copy.
25
+ function takenPerTurn(entries, name) {
26
+ const taken = [];
27
+ for (const entry of entries) {
28
+ if (entry.type !== "turn.agent")
29
+ continue;
30
+ const metrics = entry.data["metrics"];
31
+ const value = typeof metrics === "object" && metrics !== null
32
+ ? metrics[name]
33
+ : undefined;
34
+ if (typeof value === "number")
35
+ taken.push(value);
36
+ }
37
+ return taken;
38
+ }
39
+ function median(values) {
40
+ const sorted = [...values].sort((one, two) => one - two);
41
+ const middle = Math.floor(sorted.length / 2);
42
+ return sorted.length % 2 === 1 ? sorted[middle] : (sorted[middle - 1] + sorted[middle]) / 2;
43
+ }
44
+ //# sourceMappingURL=latency.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"latency.js","sourceRoot":"","sources":["../../../src/cli/testing/latency.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAE5F,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM1C;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,OAAgB;IACxC,MAAM,OAAO,GAAY,EAAE,CAAC;IAC5B,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;QAChC,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC7C,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,qGAAqG;AACrG,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,MAAM,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC,CAAC,GAAG,CAC1E,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAE,GAAG,IAAI,CAAC,IAAI,CAC3D,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED,gGAAgG;AAChG,0FAA0F;AAC1F,SAAS,YAAY,CAAC,OAAgB,EAAE,IAAY;IAClD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY;YAAE,SAAS;QAC1C,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,MAAM,KAAK,GAAG,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI;YAC3D,CAAC,CAAE,OAAmC,CAAC,IAAI,CAAC;YAC5C,CAAC,CAAC,SAAS,CAAC;QACd,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,MAAM,CAAC,MAAgB;IAC9B,MAAM,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC7C,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAE,GAAG,MAAM,CAAC,MAAM,CAAE,CAAC,GAAG,CAAC,CAAC;AACjG,CAAC"}
@@ -0,0 +1,12 @@
1
+ /** A finished run as a person reads it: a line per golden, the evidence under the ones that broke. */
2
+ import type { EvalRun } from "./gateway.js";
3
+ import { type Medians } from "./latency.js";
4
+ export declare const DECLARED = "declared";
5
+ /** The medians of each call the run opened, by call id: what `latency.ts` read off each log. */
6
+ export type Latencies = Record<string, Medians>;
7
+ /**
8
+ * The whole report. `declaredAs` is what the tenant's class wrote — `llm = "haiku"` — so the
9
+ * header names the model a person recognises instead of the runner's placeholder column.
10
+ */
11
+ export declare function reportOf(run: EvalRun, latencies: Latencies, declaredAs: string): string[];
12
+ //# sourceMappingURL=matrix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../../src/cli/testing/matrix.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,OAAO,KAAK,EAAQ,OAAO,EAAiB,MAAM,cAAc,CAAC;AACjE,OAAO,EAAe,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AAOzD,eAAO,MAAM,QAAQ,aAAa,CAAC;AAEnC,gGAAgG;AAChG,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAqBzF"}
@@ -0,0 +1,103 @@
1
+ /** A finished run as a person reads it: a line per golden, the evidence under the ones that broke. */
2
+ import { latencyLine } from "./latency.js";
3
+ // The two marks a verdict wears, from the one module that defines them: a judge that held and one
4
+ // that did not mean the same thing here as they do on a call's own score.
5
+ import { BROKEN, HELD, reasonOf } from "./score.js";
6
+ // The column a conversation is drawn under when nobody named a model — the runner's own word for
7
+ // "whatever the agent declared". The report puts the class's own word in its place.
8
+ export const DECLARED = "declared";
9
+ /**
10
+ * The whole report. `declaredAs` is what the tenant's class wrote — `llm = "haiku"` — so the
11
+ * header names the model a person recognises instead of the runner's placeholder column.
12
+ */
13
+ export function reportOf(run, latencies, declaredAs) {
14
+ const matrix = run.matrix;
15
+ if (matrix === null)
16
+ return [`${run.agent} ${run.status}${run.error === null ? "" : `: ${run.error}`}`];
17
+ const models = matrix.models.map((model) => named(model, declaredAs));
18
+ const counted = `${matrix.goldens.length} golden${matrix.goldens.length === 1 ? "" : "s"}`;
19
+ const lines = [`${run.agent} · ${counted} · ${models.join(" · ")}`];
20
+ // With two models each golden is drawn twice, so the model heads its own block; with one there
21
+ // is nothing to head and the goldens sit directly under the line that already names it.
22
+ const compared = matrix.models.length > 1;
23
+ for (const model of matrix.models) {
24
+ if (compared)
25
+ lines.push(` ${named(model, declaredAs)}`);
26
+ for (const cell of matrix.runs.filter((one) => one.model === model)) {
27
+ lines.push(...linesOfCell(cell, callOf(run, cell), latencies, compared));
28
+ }
29
+ }
30
+ lines.push(...divergences(matrix, declaredAs), footer(run, matrix));
31
+ // A run that stopped keeps the cells it had scored, so it has both a matrix and a reason. The
32
+ // reason goes last, under the count: without it the footer reads as a score rather than as a
33
+ // fragment — `8/20 held` of a suite whose app walked out after eight.
34
+ if (run.error !== null)
35
+ lines.push(` ${run.error}`);
36
+ return lines;
37
+ }
38
+ /** What the calls themselves cost in provider fees, summed from each one's own `call.summary`. */
39
+ function callCost(matrix) {
40
+ return matrix.runs.reduce((total, cell) => total + (cell.summary?.cost?.eur ?? 0), 0);
41
+ }
42
+ // One golden under one model: the mark, its name, and — only when something broke — a line per
43
+ // judge that did not hold, and the call to open. A green golden is one line, because a suite of
44
+ // thirty green goldens must stay readable on one screen.
45
+ function linesOfCell(cell, call, latencies, indented) {
46
+ const pad = indented ? " " : " ";
47
+ const broken = cell.scores.filter((score) => !score.passed);
48
+ const measured = latencyLine(latencies[call] ?? {});
49
+ if (broken.length === 0) {
50
+ return [`${pad}${HELD} ${cell.golden}${measured === "" ? "" : ` ${measured}`}`];
51
+ }
52
+ const width = Math.max(...broken.map((score) => score.metric.length), "log".length);
53
+ return [
54
+ `${pad}${BROKEN} ${cell.golden}`,
55
+ ...broken.map((score) => `${pad} ${score.metric.padEnd(width)} broken ${reasonOf(score)}`),
56
+ `${pad} ${"log".padEnd(width)} ${call}`,
57
+ ];
58
+ }
59
+ // The one thing a matrix is for: a golden two models do not agree about. Same judge, same golden,
60
+ // one model holding it and another not — printed on its own, because it is the finding.
61
+ function divergences(matrix, declaredAs) {
62
+ if (matrix.models.length < 2)
63
+ return [];
64
+ const lines = [];
65
+ for (const golden of matrix.goldens) {
66
+ for (const metric of matrix.metrics) {
67
+ const known = matrix.models
68
+ .map((model) => ({ model, score: scoreAt(matrix, model, golden, metric) }))
69
+ .filter((one) => one.score !== undefined);
70
+ if (known.length < 2)
71
+ continue;
72
+ if (new Set(known.map((one) => one.score.passed)).size === 1)
73
+ continue;
74
+ const said = known
75
+ .map((one) => `${one.score.passed ? HELD : BROKEN} ${named(one.model, declaredAs)}`)
76
+ .join(" ");
77
+ lines.push(` ${golden} ${metric} ${said}`);
78
+ }
79
+ }
80
+ return lines.length === 0 ? [] : [" divergences", ...lines];
81
+ }
82
+ // The last line, and the one read first: how many held, what the judge was asked, what the calls
83
+ // cost, and how long a person waited for it.
84
+ function footer(run, matrix) {
85
+ const cells = matrix.runs.length;
86
+ const held = cells - new Set(matrix.failures.map((one) => `${one.model} ${one.golden}`)).size;
87
+ const seconds = Math.round((run.finished_at ?? run.started_at) - run.started_at);
88
+ const cost = callCost(matrix).toFixed(4);
89
+ const asked = matrix.judge_calls;
90
+ return ` ${held}/${cells} · ${asked} judge call${asked === 1 ? "" : "s"} · ${cost} EUR · ${seconds}s`;
91
+ }
92
+ function scoreAt(matrix, model, golden, metric) {
93
+ const cell = matrix.runs.find((one) => one.model === model && one.golden === golden);
94
+ return cell?.scores.find((one) => one.metric === metric);
95
+ }
96
+ function callOf(run, cell) {
97
+ const opened = run.calls.find((one) => one.golden === cell.golden && one.model === cell.model);
98
+ return opened?.call ?? "";
99
+ }
100
+ function named(model, declaredAs) {
101
+ return model === DECLARED ? declaredAs : model;
102
+ }
103
+ //# sourceMappingURL=matrix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matr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E,IAAI,IAAI,EAAE,CAAC;AAC5B,CAAC;AAED,SAAS,KAAK,CAAC,KAAa,EAAE,UAAkB;IAC9C,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;AACjD,CAAC"}
@@ -0,0 +1,26 @@
1
+ /** What `pinecall test` draws while the runtime works: the header, a line per golden, a bar, in place. */
2
+ import { type Door, type EvalRun } from "./gateway.js";
3
+ /** What this terminal knows before the gateway has a row: whose run, its size, and its names. */
4
+ export interface Watched {
5
+ agent: string;
6
+ goldens: number;
7
+ /** The models as a person says them: the class's own word, or the ones named on the command line. */
8
+ models: string[];
9
+ /** The word the runner's `declared` column is printed as — the same word `matrix.ts` is handed. */
10
+ declaredAs: string;
11
+ }
12
+ /**
13
+ * The run, followed until the POST that started it answers. The runner rewrites the run's row as
14
+ * it goes — the call before its first turn, the cell the moment it is judged — so this reads that
15
+ * row every half second and draws it; the answer to the POST is the run that is returned. On a
16
+ * stream that is not a terminal only the header is written, and under `--json` nothing at all, so
17
+ * a CI log never fills with redraws and a JSON reader never meets a line that is not JSON.
18
+ *
19
+ * `sharing` is every other stream that reaches the same terminal, hooked for as long as the block
20
+ * is live; a test hands a fake stream and an empty list, so the real process is never touched.
21
+ */
22
+ export declare function followed(door: Door, watched: Watched, pending: Promise<EvalRun>, out: NodeJS.WritableStream, asJson: boolean, sharing?: NodeJS.WritableStream[]): Promise<EvalRun>;
23
+ /** The first line, the moment the run has an id: whose suite, how big, under which model, which run. */
24
+ export declare function header(watched: Watched, id: string): string;
25
+ export declare function inFlight(door: Door, agent: string): Promise<string | undefined>;
26
+ //# sourceMappingURL=progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/cli/testing/progress.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAE1G,OAAO,EAA8B,KAAK,IAAI,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AAMnF,iGAAiG;AACjG,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,qGAAqG;IACrG,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,mGAAmG;IACnG,UAAU,EAAE,MAAM,CAAC;CACpB;AAWD;;;;;;;;;GASG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,EACzB,GAAG,EAAE,MAAM,CAAC,cAAc,EAC1B,MAAM,EAAE,OAAO,EACf,OAAO,GAAE,MAAM,CAAC,cAAc,EAAmD,GAChF,OAAO,CAAC,OAAO,CAAC,CA0BlB;AAwBD,wGAAwG;AACxG,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAG3D;AAID,wBAAsB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAGrF"}
@@ -0,0 +1,185 @@
1
+ /** What `pinecall test` draws while the runtime works: the header, a line per golden, a bar, in place. */
2
+ import { oneRun, theRuns } from "./gateway.js";
3
+ import { DECLARED, reportOf } from "./matrix.js";
4
+ // How often the run's row is read while it is going: a local gateway answers in a millisecond.
5
+ const EVERY_MS = 500;
6
+ const OPEN = "○";
7
+ const READING = "reading…";
8
+ const BAR_WIDTH = 20;
9
+ const FILLED = "█";
10
+ const EMPTY = "░";
11
+ // How much of a call id the live line shows: enough to tell two apart, and the whole of it is on
12
+ // the report the moment the golden breaks, and on `runs show` always.
13
+ const A_CALL_SHOWN = 12;
14
+ /**
15
+ * The run, followed until the POST that started it answers. The runner rewrites the run's row as
16
+ * it goes — the call before its first turn, the cell the moment it is judged — so this reads that
17
+ * row every half second and draws it; the answer to the POST is the run that is returned. On a
18
+ * stream that is not a terminal only the header is written, and under `--json` nothing at all, so
19
+ * a CI log never fills with redraws and a JSON reader never meets a line that is not JSON.
20
+ *
21
+ * `sharing` is every other stream that reaches the same terminal, hooked for as long as the block
22
+ * is live; a test hands a fake stream and an empty list, so the real process is never touched.
23
+ */
24
+ export async function followed(door, watched, pending, out, asJson, sharing = out === process.stdout ? [process.stderr] : []) {
25
+ const knocked = Date.now();
26
+ const live = !asJson && isTerminal(out);
27
+ const total = watched.goldens * Math.max(watched.models.length, 1);
28
+ let settled = false;
29
+ const answered = pending.finally(() => (settled = true));
30
+ let id;
31
+ const bottom = new Bottom(out);
32
+ if (live)
33
+ bottom.own(sharing);
34
+ try {
35
+ while (!settled) {
36
+ await Promise.race([answered.catch(() => undefined), sleep(EVERY_MS)]);
37
+ if (settled)
38
+ break;
39
+ if (id === undefined) {
40
+ id = await inFlight(door, watched.agent);
41
+ if (id !== undefined && !asJson)
42
+ out.write(`${header(watched, id)}\n`);
43
+ }
44
+ if (id === undefined || !live)
45
+ continue;
46
+ const soFar = await oneRun(door, id);
47
+ bottom.draw([...settledLines(soFar, watched), ...readingLines(soFar), bar(soFar, total, knocked)]);
48
+ }
49
+ bottom.erase();
50
+ return await settledRun(door, answered, id);
51
+ }
52
+ finally {
53
+ bottom.giveBack();
54
+ }
55
+ }
56
+ // A spoken suite is minutes of real calls, and the POST that started it is one request held open
57
+ // the whole time: node's fetch gives up on a response that has not begun in five, and a run of
58
+ // ten spoken goldens crosses that. The run itself is fine — the gateway is still driving it and
59
+ // writing its row — so a connection that died is not a run that died. The row is the answer.
60
+ async function settledRun(door, answered, id) {
61
+ try {
62
+ return await answered;
63
+ }
64
+ catch (lost) {
65
+ if (id === undefined)
66
+ throw lost;
67
+ return await untilItStops(door, id);
68
+ }
69
+ }
70
+ /** Poll one run's row until it is no longer running, and answer with it however it ended. */
71
+ async function untilItStops(door, id) {
72
+ for (;;) {
73
+ const run = await oneRun(door, id);
74
+ if (run.status !== "running")
75
+ return run;
76
+ await sleep(EVERY_MS);
77
+ }
78
+ }
79
+ /** The first line, the moment the run has an id: whose suite, how big, under which model, which run. */
80
+ export function header(watched, id) {
81
+ const counted = `${watched.goldens} golden${watched.goldens === 1 ? "" : "s"}`;
82
+ return `${watched.agent} · ${counted} · ${watched.models.join(" · ")} · ${id}`;
83
+ }
84
+ // The run that has the gateway right now, by the door that lists them: the runner admits one run
85
+ // at a time and writes its row before the first call, so the newest running row is this one.
86
+ export async function inFlight(door, agent) {
87
+ const newest = (await theRuns(door, 1, agent))[0];
88
+ return newest?.status === "running" ? newest.id : undefined;
89
+ }
90
+ // Every cell judged so far, drawn as the report will draw it: the report is asked for one cell at
91
+ // a time, so a golden's live line and its final line come from the same code and cannot differ.
92
+ // With two models the model heads its block, exactly as the report heads it.
93
+ function settledLines(run, watched) {
94
+ const lines = [];
95
+ let heading;
96
+ for (const cell of run.matrix?.runs ?? []) {
97
+ if (watched.models.length > 1 && cell.model !== heading) {
98
+ heading = cell.model;
99
+ lines.push(` ${cell.model === DECLARED ? watched.declaredAs : cell.model}`);
100
+ }
101
+ lines.push(...reportOf(narrowed(run, cell), {}, watched.declaredAs).slice(1, -1));
102
+ }
103
+ return lines;
104
+ }
105
+ // The same run with one cell in its matrix: what `reportOf` prints for it is that golden's lines
106
+ // between the header and the footer, and nothing about any other golden.
107
+ function narrowed(run, cell) {
108
+ const matrix = run.matrix;
109
+ const failures = matrix.failures.filter((one) => one.golden === cell.golden && one.model === cell.model);
110
+ return { ...run, matrix: { ...matrix, models: [cell.model], goldens: [cell.golden], runs: [cell], failures } };
111
+ }
112
+ // A call the row names and no cell answers for yet is the conversation being driven right now.
113
+ function readingLines(run) {
114
+ const judged = run.matrix?.runs.length ?? 0;
115
+ return run.calls
116
+ .slice(judged)
117
+ .map((opened) => ` ${OPEN} ${opened.golden} ${opened.call.slice(0, A_CALL_SHOWN)}… ${READING}`);
118
+ }
119
+ function bar(run, total, knocked) {
120
+ const judged = run.matrix?.runs.length ?? 0;
121
+ const filled = total === 0 ? BAR_WIDTH : Math.round((judged / total) * BAR_WIDTH);
122
+ const seconds = Math.round((Date.now() - knocked) / 1000);
123
+ return `[${FILLED.repeat(filled)}${EMPTY.repeat(BAR_WIDTH - filled)}] ${judged}/${total} · ${seconds}s`;
124
+ }
125
+ // What a terminal that has not said its width is taken to be: a pty with no window size reports 0.
126
+ const A_TERMINAL_WIDTH = 80;
127
+ /**
128
+ * The bottom of the terminal while the run is going: the block is redrawn over itself by climbing
129
+ * back the rows it drew last time, so anything else writing to the same terminal in between would
130
+ * leave that climb counting rows the block no longer owns and the next redraw would eat the wrong
131
+ * lines. So every stream that reaches this terminal is owned for as long as the block is live: a
132
+ * write from anywhere else takes the block away first and scrolls above it, and the next half
133
+ * second draws the block again underneath, whole.
134
+ */
135
+ class Bottom {
136
+ out;
137
+ #rows = 0;
138
+ #write;
139
+ #borrowed = new Map();
140
+ constructor(out) {
141
+ this.out = out;
142
+ this.#write = out.write.bind(out);
143
+ }
144
+ /** Take over `write` on this stream and every other one that reaches the same terminal. */
145
+ own(sharing) {
146
+ for (const stream of [this.out, ...sharing]) {
147
+ const owned = stream;
148
+ if (this.#borrowed.has(owned))
149
+ continue;
150
+ const raw = owned.write.bind(stream);
151
+ this.#borrowed.set(owned, raw);
152
+ owned.write = (...args) => {
153
+ this.erase();
154
+ return raw(...args);
155
+ };
156
+ }
157
+ }
158
+ /** Give every stream its own `write` back, whatever the run did. */
159
+ giveBack() {
160
+ for (const [owned, raw] of this.#borrowed)
161
+ owned.write = raw;
162
+ this.#borrowed.clear();
163
+ }
164
+ /** The block, drawn over the one before it: climb to where it began, clear everything below. */
165
+ draw(lines) {
166
+ // A line wider than the terminal takes more than one row, and the climb counts rows, not
167
+ // lines, or the second redraw would land in the middle of the first.
168
+ const columns = this.out.columns || A_TERMINAL_WIDTH;
169
+ const climb = this.#rows > 0 ? `\x1b[${this.#rows}A` : "";
170
+ this.#write(`${climb}\x1b[0J${lines.map((line) => `${line}\n`).join("")}`);
171
+ this.#rows = lines.reduce((rows, line) => rows + Math.max(1, Math.ceil([...line].length / columns)), 0);
172
+ }
173
+ /** Take the block away and leave the cursor where it began. A block already gone costs nothing. */
174
+ erase() {
175
+ if (this.#rows > 0)
176
+ this.draw([]);
177
+ }
178
+ }
179
+ function isTerminal(out) {
180
+ return out.isTTY === true;
181
+ }
182
+ function sleep(ms) {
183
+ return new Promise((resolve) => setTimeout(resolve, ms));
184
+ }
185
+ //# sourceMappingURL=progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.js","sourceRoot":"","sources":["../../../src/cli/testing/progress.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAE1G,OAAO,EAAE,MAAM,EAAE,OAAO,EAAsC,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEjD,+FAA+F;AAC/F,MAAM,QAAQ,GAAG,GAAG,CAAC;AAYrB,MAAM,IAAI,GAAG,GAAG,CAAC;AACjB,MAAM,OAAO,GAAG,UAAU,CAAC;AAC3B,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,MAAM,GAAG,GAAG,CAAC;AACnB,MAAM,KAAK,GAAG,GAAG,CAAC;AAClB,iGAAiG;AACjG,sEAAsE;AACtE,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,IAAU,EACV,OAAgB,EAChB,OAAyB,EACzB,GAA0B,EAC1B,MAAe,EACf,OAAO,GAA4B,GAAG,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;IAEjF,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC3B,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAA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Ae;QAClB,yFAAyF;QACzF,qEAAqE;QACrE,MAAM,OAAO,GAAI,IAAI,CAAC,GAA0B,CAAC,OAAO,IAAI,gBAAgB,CAAC;QAC7E,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1D,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,UAAU,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAC3E,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1G,CAAC;IAED,mGAAmG;IACnG,KAAK;QACH,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC;CACF;AAED,SAAS,UAAU,CAAC,GAA0B;IAC5C,OAAQ,GAA0B,CAAC,KAAK,KAAK,IAAI,CAAC;AACpD,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,19 @@
1
+ /** A golden that broke, written out whole: what the model was asked, and everything that happened. */
2
+ import type { Entry, EvalRun } from "./gateway.js";
3
+ import type { Golden } from "./goldens.js";
4
+ /** Where a broken golden is left, under the directory the suite was run in. One folder per run. */
5
+ export declare const REPRODUCTIONS = ".pinecall/evals";
6
+ /** What stands in for the requests when nobody kept them: the reason, not an empty list. */
7
+ export declare const NOT_RECORDED: string;
8
+ /**
9
+ * One file per broken golden, and nothing at all when the suite is green. It carries the four
10
+ * things a person needs to disagree with a verdict without running anything: the golden as it was
11
+ * written, the requests the model answered — the region order, the tool list, the view, verbatim —
12
+ * the whole log of the call, and what each judge said. The prompt is here and nowhere else: the
13
+ * log keeps a hash of each block on purpose (protocol/schema/events/prompt.changed.json), so a
14
+ * run that is being reproduced is the one reader that asks the runtime for the text.
15
+ */
16
+ export declare function writtenOut(run: EvalRun, goldens: Golden[], logs: Record<string, Entry[]>, under?: string): string[];
17
+ /** The line the report prints under a broken golden, once, naming the folder and not each file. */
18
+ export declare function whereTheyAre(paths: string[]): string[];
19
+ //# sourceMappingURL=reproduction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reproduction.d.ts","sourceRoot":"","sources":["../../../src/cli/testing/reproduction.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAKtG,OAAO,KAAK,EAAQ,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,mGAAmG;AACnG,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAE/C,4FAA4F;AAC5F,eAAO,MAAM,YAAY,QAEyD,CAAC;AAEnF;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,EAC7B,KAAK,GAAE,MAAsB,GAC5B,MAAM,EAAE,CAWV;AAiCD,mGAAmG;AACnG,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAItD"}
@@ -0,0 +1,65 @@
1
+ /** A golden that broke, written out whole: what the model was asked, and everything that happened. */
2
+ import { mkdirSync, writeFileSync } from "node:fs";
3
+ import { dirname, join } from "node:path";
4
+ /** Where a broken golden is left, under the directory the suite was run in. One folder per run. */
5
+ export const REPRODUCTIONS = ".pinecall/evals";
6
+ /** What stands in for the requests when nobody kept them: the reason, not an empty list. */
7
+ export const NOT_RECORDED = "not recorded: this call's requests were built in the worker process, which a spoken run " +
8
+ "drives over LiveKit. The log below is the whole of what this call left behind.";
9
+ /**
10
+ * One file per broken golden, and nothing at all when the suite is green. It carries the four
11
+ * things a person needs to disagree with a verdict without running anything: the golden as it was
12
+ * written, the requests the model answered — the region order, the tool list, the view, verbatim —
13
+ * the whole log of the call, and what each judge said. The prompt is here and nowhere else: the
14
+ * log keeps a hash of each block on purpose (protocol/schema/events/prompt.changed.json), so a
15
+ * run that is being reproduced is the one reader that asks the runtime for the text.
16
+ */
17
+ export function writtenOut(run, goldens, logs, under = REPRODUCTIONS) {
18
+ const broken = (run.matrix?.runs ?? []).filter((cell) => cell.scores.some((score) => !score.passed));
19
+ if (broken.length === 0)
20
+ return [];
21
+ const folder = join(under, run.id);
22
+ mkdirSync(folder, { recursive: true });
23
+ return broken.map((cell) => {
24
+ const call = callOf(run, cell);
25
+ const path = join(folder, `${cell.golden}.json`);
26
+ writeFileSync(path, `${JSON.stringify(aReproduction(run, cell, call, goldens, logs[call] ?? []), null, 2)}\n`);
27
+ return path;
28
+ });
29
+ }
30
+ /** One broken cell as a file: the declaration, the requests, the log, and every verdict on it. */
31
+ function aReproduction(run, cell, call, goldens, log) {
32
+ return {
33
+ run: run.id,
34
+ agent: run.agent,
35
+ golden: cell.golden,
36
+ model: cell.model,
37
+ call,
38
+ // The golden as it was written: the state it seeded, what the caller said, what it expected.
39
+ declared: goldens.find((one) => one.name === cell.golden) ?? null,
40
+ verdicts: cell.scores.map((score) => ({
41
+ metric: score.metric,
42
+ passed: score.passed,
43
+ criteria: score.criteria,
44
+ reason: score.reason,
45
+ })),
46
+ // In the order they went out: one per request, so a turn that ran a tool has more than one.
47
+ // The runtime says null when the run kept none — a spoken run builds its requests in the
48
+ // worker process — and here that is the sentence saying so, never an empty list: `tools: []`
49
+ // under a call whose finding was "ran no tool at all" misled this project once already.
50
+ asked: cell.asked ?? NOT_RECORDED,
51
+ log,
52
+ };
53
+ }
54
+ /** The line the report prints under a broken golden, once, naming the folder and not each file. */
55
+ export function whereTheyAre(paths) {
56
+ if (paths.length === 0)
57
+ return [];
58
+ const folder = dirname(paths[0]);
59
+ return [` ${paths.length} reproduction${paths.length === 1 ? "" : "s"} written to ${folder}/`];
60
+ }
61
+ /** Which call a cell was answered by: the run names it when it opens, before the first turn. */
62
+ function callOf(run, cell) {
63
+ return run.calls.find((one) => one.golden === cell.golden && one.model === cell.model)?.call ?? "";
64
+ }
65
+ //# sourceMappingURL=reproduction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reproduction.js","sourceRoot":"","sources":["../../../src/cli/testing/reproduction.ts"],"names":[],"mappings":"AAAA,sGAAsG;AAEtG,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAK1C,mGAAmG;AACnG,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAE/C,4FAA4F;AAC5F,MAAM,CAAC,MAAM,YAAY,GACvB,0FAA0F;IAC1F,gFAAgF,CAAC;AAEnF;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CACxB,GAAY,EACZ,OAAiB,EACjB,IAA6B,EAC7B,KAAK,GAAW,aAAa;IAE7B,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACrG,IAAI,MAAM,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,EAAE,KAAK,CAAC,MAAM;YACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,CAAC,CAAC;QACH,4FAA4F;QAC5F,yFAAyF;QACzF,6FAA6F;QAC7F,wFAAwF;QACxF,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,YAAY;QACjC,GAAG;KACJ,CAAC;AACJ,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,YAAY,CAAC,KAAe;IAC1C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAClC,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC;IAClC,OAAO,CAAC,KAAK,KAAK,CAAC,MAAM,gBAAgB,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,eAAe,MAAM,GAAG,CAAC,CAAC;AAClG,CAAC;AAED,gGAAgG;AAChG,SAAS,MAAM,CAAC,GAAY,EAAE,IAAU;IACtC,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,IAAI,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC;AACrG,CAAC"}
@@ -0,0 +1,11 @@
1
+ /** The `call.score` entry as a person reads it: what each judge said, and what the asking cost. */
2
+ import type { CallScore } from "@pinecall/protocol";
3
+ export declare const HELD = "\u2713";
4
+ export declare const BROKEN = "\u2717";
5
+ /** The sentence a judge or a graph wrote when it decided. A hard policy writes the seqs for free. */
6
+ export declare function reasonOf(said: {
7
+ reason: string;
8
+ }): string;
9
+ /** The score as the terminal prints it: the headline, a line per judge, then what it cost. */
10
+ export declare function linesOfScore(score: CallScore): string[];
11
+ //# sourceMappingURL=score.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"score.d.ts","sourceRoot":"","sources":["../../../src/cli/testing/score.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAEnG,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,oBAAoB,CAAC;AAI9D,eAAO,MAAM,IAAI,WAAM,CAAC;AACxB,eAAO,MAAM,MAAM,WAAM,CAAC;AAoB1B,qGAAqG;AACrG,wBAAgB,QAAQ,CAAC,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEzD;AAED,8FAA8F;AAC9F,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,EAAE,CAEvD"}
@@ -0,0 +1,54 @@
1
+ /** The `call.score` entry as a person reads it: what each judge said, and what the asking cost. */
2
+ // The mark a verdict wears. `held` and `broken` are the two the matrix draws too, so they are
3
+ // defined here once and imported there: one glyph, one meaning, wherever a verdict is printed.
4
+ export const HELD = "✓";
5
+ export const BROKEN = "✗";
6
+ const DEFERRED = "?";
7
+ const SKIPPED = "·";
8
+ // livekit's three verdicts said in ours, plus the fourth that is ours alone. See scoring.md.
9
+ const MARK = {
10
+ held: HELD,
11
+ broken: BROKEN,
12
+ deferred: DEFERRED,
13
+ skipped: SKIPPED,
14
+ };
15
+ // `passed` means no judge answered broken, which is the answer to a question somebody asked. A
16
+ // call nobody asked about has NO answer: the field is absent, and absent is a third thing that
17
+ // must read as neither green nor red. The runtime's docs/decisions/scoring.md says so, and this
18
+ // line is that.
19
+ const NOBODY_JUDGED = "nobody judged this call";
20
+ const NO_REASON = "no reason was written down";
21
+ /** The sentence a judge or a graph wrote when it decided. A hard policy writes the seqs for free. */
22
+ export function reasonOf(said) {
23
+ return said.reason === "" ? NO_REASON : said.reason;
24
+ }
25
+ /** The score as the terminal prints it: the headline, a line per judge, then what it cost. */
26
+ export function linesOfScore(score) {
27
+ return [headline(score), ...score.judges.map(oneJudge), costLine(score)];
28
+ }
29
+ // The one line read first. Three states and never two: held, broken, or nobody looked — and when
30
+ // nobody looked, the reason the entry carries is printed rather than a verdict invented for it.
31
+ function headline(score) {
32
+ if (score.passed === undefined || score.passed === null) {
33
+ return `${SKIPPED} ${NOBODY_JUDGED}: ${score.not_judged ?? "the entry says nothing about why"}`;
34
+ }
35
+ return `${score.passed ? HELD : BROKEN} ${score.passed ? "every judge held" : "a judge answered broken"}`;
36
+ }
37
+ // One judge: its mark, its name, the sentence it wrote, and the seqs that sentence named — which
38
+ // are what a person opens the log at to disagree with it.
39
+ function oneJudge(judgment) {
40
+ const seqs = judgment.evidence.seqs;
41
+ const at = seqs.length === 0 ? "" : ` [seq ${seqs.join(", ")}]`;
42
+ return ` ${MARK[judgment.verdict] ?? SKIPPED} ${judgment.name.padEnd(10)} ${reasonOf(judgment)}${at}`;
43
+ }
44
+ // What judging cost: the count of questions that actually reached a model, and the bill when one
45
+ // could be priced. An unknown bill is left unsaid rather than printed as a zero — a model nobody
46
+ // reported tokens for has no price, not a free one.
47
+ function costLine(score) {
48
+ const asked = score.judge_calls;
49
+ const priced = score.judge_cost_eur === undefined || score.judge_cost_eur === null
50
+ ? ""
51
+ : ` · ${score.judge_cost_eur.toFixed(4)} EUR`;
52
+ return ` ${asked} judge call${asked === 1 ? "" : "s"}${priced}`;
53
+ }
54
+ //# sourceMappingURL=score.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"score.js","sourceRoot":"","sources":["../../../src/cli/testing/score.ts"],"names":[],"mappings":"AAAA,mGAAmG;AAInG,8FAA8F;AAC9F,+FAA+F;AAC/F,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;AAC1B,MAAM,QAAQ,GAAG,GAAG,CAAC;AACrB,MAAM,OAAO,GAAG,GAAG,CAAC;AAEpB,6FAA6F;AAC7F,MAAM,IAAI,GAA2B;IACnC,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,MAAM;IACd,QAA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AC,UAAU,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IACjE,OAAO,KAAK,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC;AACzG,CAAC;AAED,iGAAiG;AACjG,iGAAiG;AACjG,oDAAoD;AACpD,SAAS,QAAQ,CAAC,KAAgB;IAChC,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,CAAC;IAChC,MAAM,MAAM,GACV,KAAK,CAAC,cAAc,KAAK,SAAS,IAAI,KAAK,CAAC,cAAc,KAAK,IAAI;QACjE,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,MAAM,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;IAClD,OAAO,KAAK,KAAK,cAAc,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,EAAE,CAAC;AACnE,CAAC"}
@@ -0,0 +1,32 @@
1
+ /** Which golden's state a starting call opens in, and the check that it was the right one. */
2
+ import type { Call as SdkCall } from "../../client/index.js";
3
+ import type { Snapshot } from "../../agent/state.js";
4
+ import type { EvalRun } from "./gateway.js";
5
+ import type { Golden } from "./goldens.js";
6
+ /** What to say when the calls did not arrive in the order the run says it opened them in. */
7
+ export declare const OUT_OF_ORDER = "the calls did not arrive in the order the run opened them: {said} took the state of {seeded}";
8
+ /**
9
+ * The states a run is about to open, handed out as its calls start.
10
+ *
11
+ * The seed cannot come off the log: `session.configure {state}` writes `state.changed` into the
12
+ * call and stops there — the tenant's class is another process and nothing on the wire moves it —
13
+ * and by the time that entry reaches this terminal the bridge is re-rendering on every field, so
14
+ * restoring three fields would show the model two states the call was never in. `mount`'s own
15
+ * `opening` seam is the moment between `onCall` and the first render, and this is what fills it.
16
+ *
17
+ * Which state belongs to which call is the runner's order: one run at a time (a second is refused
18
+ * with 409) and one conversation at a time inside it, models outermost. `mismatched` checks that
19
+ * afterwards against what the run says it opened, so a wrong seed is a loud line and never a
20
+ * golden that quietly tested something else.
21
+ */
22
+ export declare class Openings {
23
+ private waiting;
24
+ private readonly seeded;
25
+ /** The goldens this run will open, once per model, in the order the runner will walk them. */
26
+ expects(goldens: Golden[], models: number): void;
27
+ /** The state this starting call opens in: the next golden's, or none when no run opened it. */
28
+ opening(call: SdkCall): Snapshot | undefined;
29
+ /** The sentence to print when a call took a state that was not its golden's, or nothing. */
30
+ mismatched(run: EvalRun): string | undefined;
31
+ }
32
+ //# sourceMappingURL=seeding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seeding.d.ts","sourceRoot":"","sources":["../../../src/cli/testing/seeding.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAE9F,OAAO,KAAK,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,6FAA6F;AAC7F,eAAO,MAAM,YAAY,iGACuE,CAAC;AAEjG;;;;;;;;;;;;;GAaG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IAEvC,8FAA8F;IAC9F,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAG/C;IAED,+FAA+F;IAC/F,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,CAM3C;IAED,4FAA4F;IAC5F,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAO3C;CACF"}