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,94 @@
1
+ /** `pinecall config` and `pinecall use`: the gateways this machine knows, and which one is in hand. */
2
+ import { activate, activeName, forget, readConfig } from "./profiles.js";
3
+ const USAGE = `usage: pinecall config the gateways this machine knows
4
+ pinecall config rm <name> forget one
5
+ pinecall use <profile> the one the next verb goes to`;
6
+ export const group = {
7
+ purpose: "the gateways this machine knows, and which one the next verb goes to",
8
+ usage: `${USAGE}
9
+
10
+ One file — ~/.pinecall/config.json — holds them, and \`pinecall login\` writes one per gateway
11
+ you sign in to. Nothing is exported, and there is no order of precedence to remember: the
12
+ profile with the ▸ is the one every verb uses until \`pinecall use\` moves it.
13
+
14
+ It prints no key. What a listing may say about one is that it is there, and its fingerprint is
15
+ the Keys screen's business — not a prefix, not a hint. The org and the world beside each name
16
+ are what \`whoami\` last said, kept as a label so this list reads without a network.
17
+
18
+ \`config rm\` takes a row out — a gateway that has moved, a key that was revoked. It forgets the
19
+ row here and nothing else: the key itself is stopped from the Keys screen, and a row left behind
20
+ is a key somebody will trust tomorrow and a refusal they will read as the gateway's fault.`,
21
+ run,
22
+ };
23
+ /** `config` with nothing after it prints them all; `use <name>` moves the mark. */
24
+ export async function run(argv, how = {}) {
25
+ const out = how.out ?? process.stdout;
26
+ const err = how.err ?? process.stderr;
27
+ const [named, ...rest] = argv;
28
+ if (named === undefined)
29
+ return listed(out, how.home);
30
+ if (named === "rm")
31
+ return dropped(rest[0], out, err, how.home);
32
+ return chosen(named, out, err, how.home);
33
+ }
34
+ /** The same verb under the name a person reaches for: `pinecall use box`. */
35
+ export async function use(argv, how = {}) {
36
+ const [named] = argv;
37
+ if (named === undefined) {
38
+ (how.err ?? process.stderr).write(`${USAGE}\n`);
39
+ return 2;
40
+ }
41
+ return await run(argv, how);
42
+ }
43
+ function listed(out, home) {
44
+ const config = readConfig(home);
45
+ const names = Object.keys(config.profiles).sort();
46
+ if (names.length === 0) {
47
+ out.write("no gateway yet: `pinecall login <url>`\n");
48
+ return 0;
49
+ }
50
+ const rows = names.map((name) => [
51
+ name === config.active ? `▸ ${name}` : ` ${name}`,
52
+ config.profiles[name].url,
53
+ said(config.profiles[name]),
54
+ ]);
55
+ for (const line of asColumns(rows))
56
+ out.write(`${line}\n`);
57
+ return 0;
58
+ }
59
+ function dropped(name, out, err, home) {
60
+ if (name === undefined) {
61
+ err.write(`${USAGE}\n`);
62
+ return 2;
63
+ }
64
+ if (forget(name, home)) {
65
+ out.write(`forgot ${name}\n`);
66
+ return 0;
67
+ }
68
+ return noSuchProfile(name, err, home);
69
+ }
70
+ function chosen(name, out, err, home) {
71
+ if (activate(name, home)) {
72
+ out.write(`▸ ${name}\n`);
73
+ return 0;
74
+ }
75
+ return noSuchProfile(name, err, home);
76
+ }
77
+ /** The one refusal both `use` and `rm` give, naming what this machine does know. */
78
+ function noSuchProfile(name, err, home) {
79
+ const known = Object.keys(readConfig(home).profiles).sort();
80
+ const has = known.length === 0 ? "none yet: `pinecall login <url>`" : known.join(" · ");
81
+ err.write(`no profile called ${name}: ${has}\n`);
82
+ return 2;
83
+ }
84
+ /** Whose org and which world, as the gateway last said them. A label, never a check. */
85
+ function said(profile) {
86
+ return [profile.org, profile.env].filter((word) => word !== undefined).join(" · ");
87
+ }
88
+ /** Every column as wide as its widest value: nothing is cut to make a table line up. */
89
+ function asColumns(rows) {
90
+ const widths = rows[0].map((_, column) => Math.max(...rows.map((row) => (row[column] ?? "").length)));
91
+ return rows.map((row) => row.map((value, column) => (value ?? "").padEnd(widths[column])).join(" ").trimEnd());
92
+ }
93
+ export { activeName };
94
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/cli/config.ts"],"names":[],"mappings":"AAAA,uGAAuG;AAGvG,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAgB,MAAM,eAAe,CAAC;AAEvF,MAAM,KAAK,GAAG;;kEAEoD,CAAC;AAEnE,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,OAAO,EAAE,sEAAsE;IAC/E,KAAK,EAAE,GAAG,KAAK;;;;;;;;;;;;6FAY4E;IAC3F,GAAG;CACJ,CAAC;AASF,mFAAmF;AACnF,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,IAAc,EAAE,GAAG,GAAY,EAAE;IACzD,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;IACtC,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;IACtC,MAAM,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAC9B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IACtD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAA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AAC,CAAC;AACX,CAAC;AAED,wFAAwF;AACxF,SAAS,IAAI,CAAC,OAAgB;IAC5B,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACrF,CAAC;AAED,wFAAwF;AACxF,SAAS,SAAS,CAAC,IAAgB;IACjC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACvG,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AACnH,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,30 @@
1
+ /** The one line `pinecall run` prints when the socket is up: who registered, where, and as whom. */
2
+ import type { RouteInput } from "../client/index.js";
3
+ export interface Connected {
4
+ slug: string;
5
+ url: string;
6
+ tools: number;
7
+ doors: string[];
8
+ /** Whose org took it, and which of the two worlds. Absent when the gateway would not say. */
9
+ org?: string;
10
+ env?: string;
11
+ /** Which profile's key opened the door. Said because it is the thing that decides the two
12
+ * above, and because it used to be decided by whatever was exported in the shell. */
13
+ source?: string;
14
+ }
15
+ /**
16
+ * The one line `pinecall run` prints when the socket is up.
17
+ *
18
+ * It used to say the gateway and nothing else, and that cost an afternoon: a key exported in the
19
+ * shell wins over the one `pinecall login` just kept, so an agent could register into another org
20
+ * and another world with this line reading exactly the same. Where you are IS the key you hold,
21
+ * so the line says which key, whose org, and which world — the same four things `whoami` says.
22
+ *
23
+ * Three things a person needs and nothing this process had to invent: who registered, which
24
+ * gateway took it, and what the class declared. It names no page: the gateway serves none. An
25
+ * agent that declared no door prints no `doors` at all rather than an empty one.
26
+ */
27
+ export declare function connectedLine(agent: Connected): string;
28
+ /** Each door the class declared, as the line names it: the channel, and its number when it has one. */
29
+ export declare function doorsOf(routes: RouteInput[] | undefined): string[];
30
+ //# sourceMappingURL=connected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connected.d.ts","sourceRoot":"","sources":["../../src/cli/connected.ts"],"names":[],"mappings":"AAAA,oGAAoG;AAEpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,6FAA6F;IAC7F,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;yFACqF;IACrF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAStD;AAED,uGAAuG;AACvG,wBAAgB,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAIlE"}
@@ -0,0 +1,32 @@
1
+ /** The one line `pinecall run` prints when the socket is up: who registered, where, and as whom. */
2
+ /**
3
+ * The one line `pinecall run` prints when the socket is up.
4
+ *
5
+ * It used to say the gateway and nothing else, and that cost an afternoon: a key exported in the
6
+ * shell wins over the one `pinecall login` just kept, so an agent could register into another org
7
+ * and another world with this line reading exactly the same. Where you are IS the key you hold,
8
+ * so the line says which key, whose org, and which world — the same four things `whoami` says.
9
+ *
10
+ * Three things a person needs and nothing this process had to invent: who registered, which
11
+ * gateway took it, and what the class declared. It names no page: the gateway serves none. An
12
+ * agent that declared no door prints no `doors` at all rather than an empty one.
13
+ */
14
+ export function connectedLine(agent) {
15
+ const said = [agent.slug];
16
+ if (agent.org !== undefined)
17
+ said.push(agent.org);
18
+ if (agent.env !== undefined)
19
+ said.push(agent.env);
20
+ said.push(`connected to ${agent.url}`);
21
+ if (agent.source !== undefined)
22
+ said.push(`key from ${agent.source}`);
23
+ said.push(`tools ${agent.tools}`);
24
+ if (agent.doors.length > 0)
25
+ said.push(`doors ${agent.doors.join(", ")}`);
26
+ return said.join(" · ");
27
+ }
28
+ /** Each door the class declared, as the line names it: the channel, and its number when it has one. */
29
+ export function doorsOf(routes) {
30
+ return (routes ?? []).map((route) => route.number === null || route.number === undefined ? route.channel : `${route.channel} ${route.number}`);
31
+ }
32
+ //# sourceMappingURL=connected.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connected.js","sourceRoot":"","sources":["../../src/cli/connected.ts"],"names":[],"mappings":"AAAA,oGAAoG;AAiBpG;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,KAAgB;IAC5C,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS;QAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClD,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS;QAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClD,IAAI,CAAC,IAAI,CAAC,gBAAgB,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IACvC,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS;QAAE,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACtE,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;IAClC,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzE,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAED,uGAAuG;AACvG,MAAM,UAAU,OAAO,CAAC,MAAgC;IACtD,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAClC,KAAK,CAAC,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,EAAE,CACzG,CAAC;AACJ,CAAC"}
@@ -0,0 +1,41 @@
1
+ /** ~/.pinecall: the keys this machine keeps — the gateways it logged in to, and the local one. */
2
+ /** The directory both files live in: ~/.pinecall, or the one PINECALL_HOME names instead. */
3
+ export declare function pinecallHome(env?: NodeJS.ProcessEnv): string;
4
+ /** One gateway this machine has logged in to: the key, the org it opened, and when it was kept. */
5
+ export interface GatewayEntry {
6
+ api_key: string;
7
+ org: string;
8
+ logged_in_at: string;
9
+ /** The phone this person calls FROM, so a ring in the sandbox reaches their own agent rather
10
+ * than whoever holds the line. Said once with `pinecall line from`, and re-sent by every
11
+ * `pinecall run` — the gateway keeps it beside its live table, not in a row. */
12
+ calling?: string;
13
+ }
14
+ /**
15
+ * The credentials file as it is on disk.
16
+ *
17
+ * `api_key` is v1's own field — one key, no URL — and it is still read by the v1 CLI on this same
18
+ * machine. Nothing here writes over it: a login adds a row under `gateways` and leaves the rest of
19
+ * the file exactly as it found it.
20
+ */
21
+ export interface Credentials {
22
+ api_key?: string;
23
+ gateways: Record<string, GatewayEntry>;
24
+ }
25
+ /** The whole file. A missing one, an unreadable one and a broken one are all an empty table. */
26
+ export declare function readCredentials(home?: string): Credentials;
27
+ /** One gateway's row, by the URL as `normalised` writes it. Nothing logged in is nothing here. */
28
+ export declare function gatewayFor(url: string, home?: string): GatewayEntry | undefined;
29
+ /** Keep one gateway's key, the rest of the file untouched, and the file readable by nobody else. */
30
+ export declare function writeGateway(url: string, entry: Omit<GatewayEntry, "logged_in_at">, home?: string): void;
31
+ /**
32
+ * Remember which phone this person calls from, on the row for this gateway.
33
+ *
34
+ * A row only, never a login: `line from` is said by somebody already logged in, and rewriting the
35
+ * key here would be a second place that decides what the key is. Nothing happens for a gateway
36
+ * with no row — you cannot say which phone is yours at a gateway you have not signed in to.
37
+ */
38
+ export declare function writeCalling(url: string, calling: string | undefined, home?: string): boolean;
39
+ /** The URL as a key in the table: lowercase scheme and host, and no trailing slash. */
40
+ export declare function normalised(url: string): string;
41
+ //# sourceMappingURL=credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../src/cli/credentials.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAgBlG,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAEzE;AAED,mGAAmG;AACnG,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB;;oFAEgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACxC;AAED,gGAAgG;AAChG,wBAAgB,eAAe,CAAC,IAAI,GAAE,MAAuB,GAAG,WAAW,CAO1E;AAED,kGAAkG;AAClG,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,MAAuB,GAAG,YAAY,GAAG,SAAS,CAE/F;AAED,oGAAoG;AACpG,wBAAgB,YAAY,CAC1B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,EACzC,IAAI,GAAE,MAAuB,GAC5B,IAAI,CASN;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,GAAE,MAAuB,GAAG,OAAO,CAW7G;AAED,uFAAuF;AACvF,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO9C"}
@@ -0,0 +1,98 @@
1
+ /** ~/.pinecall: the keys this machine keeps — the gateways it logged in to, and the local one. */
2
+ import { chmodSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
3
+ import { homedir, userInfo } from "node:os";
4
+ import { join } from "node:path";
5
+ // The directory is a person's, not a machine's: 0700 so another account on the same box cannot
6
+ // list it, and 0600 on every file so it cannot read one whose name it guessed.
7
+ const DIRECTORY_MODE = 0o700;
8
+ const FILE_MODE = 0o600;
9
+ // Every bit outside the owner's. A file that has one of them is readable by somebody else, and a
10
+ // key somebody else can read is not a key we are willing to send anywhere.
11
+ const OTHERS = 0o077;
12
+ const CREDENTIALS = "credentials";
13
+ /** The directory both files live in: ~/.pinecall, or the one PINECALL_HOME names instead. */
14
+ export function pinecallHome(env = process.env) {
15
+ return env["PINECALL_HOME"] ?? join(homedir(), ".pinecall");
16
+ }
17
+ /** The whole file. A missing one, an unreadable one and a broken one are all an empty table. */
18
+ export function readCredentials(home = pinecallHome()) {
19
+ const read = parsed(join(home, CREDENTIALS));
20
+ if (read === undefined)
21
+ return { gateways: {} };
22
+ const gateways = read["gateways"];
23
+ const kept = { gateways: isTable(gateways) ? gateways : {} };
24
+ if (typeof read["api_key"] === "string")
25
+ kept.api_key = read["api_key"];
26
+ return kept;
27
+ }
28
+ /** One gateway's row, by the URL as `normalised` writes it. Nothing logged in is nothing here. */
29
+ export function gatewayFor(url, home = pinecallHome()) {
30
+ return readCredentials(home).gateways[normalised(url)];
31
+ }
32
+ /** Keep one gateway's key, the rest of the file untouched, and the file readable by nobody else. */
33
+ export function writeGateway(url, entry, home = pinecallHome()) {
34
+ const kept = readCredentials(home);
35
+ kept.gateways[normalised(url)] = { ...entry, logged_in_at: new Date().toISOString() };
36
+ mkdirSync(home, { recursive: true, mode: DIRECTORY_MODE });
37
+ const path = join(home, CREDENTIALS);
38
+ writeFileSync(path, `${JSON.stringify(kept, null, 2)}\n`, { mode: FILE_MODE });
39
+ // writeFileSync's mode applies only when it creates the file, so a file that was already there
40
+ // keeps whatever mode it had — including one an editor widened.
41
+ chmodSync(path, FILE_MODE);
42
+ }
43
+ /**
44
+ * Remember which phone this person calls from, on the row for this gateway.
45
+ *
46
+ * A row only, never a login: `line from` is said by somebody already logged in, and rewriting the
47
+ * key here would be a second place that decides what the key is. Nothing happens for a gateway
48
+ * with no row — you cannot say which phone is yours at a gateway you have not signed in to.
49
+ */
50
+ export function writeCalling(url, calling, home = pinecallHome()) {
51
+ const kept = readCredentials(home);
52
+ const row = kept.gateways[normalised(url)];
53
+ if (row === undefined)
54
+ return false;
55
+ kept.gateways[normalised(url)] = { ...row, ...(calling === undefined ? {} : { calling }) };
56
+ if (calling === undefined)
57
+ delete kept.gateways[normalised(url)]?.calling;
58
+ mkdirSync(home, { recursive: true, mode: DIRECTORY_MODE });
59
+ const path = join(home, CREDENTIALS);
60
+ writeFileSync(path, `${JSON.stringify(kept, null, 2)}\n`, { mode: FILE_MODE });
61
+ chmodSync(path, FILE_MODE);
62
+ return true;
63
+ }
64
+ /** The URL as a key in the table: lowercase scheme and host, and no trailing slash. */
65
+ export function normalised(url) {
66
+ try {
67
+ const parsedUrl = new URL(url);
68
+ return `${parsedUrl.origin}${parsedUrl.pathname}`.replace(/\/+$/, "");
69
+ }
70
+ catch {
71
+ return url.replace(/\/+$/, "");
72
+ }
73
+ }
74
+ // One JSON object off disk, or nothing: a file that is not there, cannot be read or does not parse
75
+ // are the same answer to every caller here, and none of them is worth an exception.
76
+ function parsed(path) {
77
+ try {
78
+ const read = JSON.parse(readFileSync(path, "utf8"));
79
+ return isTable(read) ? read : undefined;
80
+ }
81
+ catch {
82
+ return undefined;
83
+ }
84
+ }
85
+ // Owned by this account and readable by nobody else.
86
+ function ours(path) {
87
+ try {
88
+ const about = statSync(path);
89
+ return about.uid === userInfo().uid && (about.mode & OTHERS) === 0;
90
+ }
91
+ catch {
92
+ return false;
93
+ }
94
+ }
95
+ function isTable(value) {
96
+ return typeof value === "object" && value !== null && !Array.isArray(value);
97
+ }
98
+ //# sourceMappingURL=credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../src/cli/credentials.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAElG,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,+FAA+F;AAC/F,+EAA+E;AAC/E,MAAM,cAAc,GAAG,KAAK,CAAC;AAC7B,MAAM,SAAS,GAAG,KAAK,CAAC;AACxB,iGAAiG;AACjG,2EAA2E;AAC3E,MAAM,MAAM,GAAG,KAAK,CAAC;AAErB,MAAM,WAAW,GAAG,aAAa,CAAC;AAElC,6FAA6F;AAC7F,MAAM,UAAU,YAAY,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IA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KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** The ear as its own process: one room joined, both tracks mixed, raw PCM out on fd 3, nothing else said. */
2
+ export {};
3
+ //# sourceMappingURL=ear.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ear.d.ts","sourceRoot":"","sources":["../../src/cli/ear.ts"],"names":[],"mappings":"AAAA,8GAA8G"}
@@ -0,0 +1,59 @@
1
+ /** The ear as its own process: one room joined, both tracks mixed, raw PCM out on fd 3, nothing else said. */
2
+ import { writeSync } from "node:fs";
3
+ import { AudioMixer, AudioStream, Room, RoomEvent, TrackKind } from "@livekit/rtc-node";
4
+ // This file is a PROGRAM, started by cli/listening.ts and by nothing else. It exists because the
5
+ // room library is a native build with a logger that writes to the file descriptor, at debug, and
6
+ // is exported nowhere: kept in its own process, its three hundred lines of chatter go to a stdout
7
+ // nobody reads, its threads cannot hold the CLI open after the call, and the CLI's own environment
8
+ // is never touched to quiet it. The contract is small: the rate and the channel count on argv,
9
+ // one JSON line on stdin — `{server_url, participant_token}` — and int16 frames on fd 3 until
10
+ // stdin closes, which is the parent saying leave.
11
+ const PCM = 3;
12
+ /** One line of stdin: the seat. It stays open afterwards, because its closing is the way out. */
13
+ function theSeat() {
14
+ return new Promise((answer) => {
15
+ let read = "";
16
+ const take = (chunk) => {
17
+ read += chunk.toString();
18
+ const line = read.indexOf("\n");
19
+ if (line === -1)
20
+ return;
21
+ process.stdin.off("data", take);
22
+ answer(JSON.parse(read.slice(0, line)));
23
+ };
24
+ process.stdin.on("data", take);
25
+ });
26
+ }
27
+ async function listen() {
28
+ const [rate, channels] = process.argv.slice(2).map(Number);
29
+ if (rate === undefined || channels === undefined)
30
+ throw new Error("usage: ear <rate> <channels>");
31
+ const seat = await theSeat();
32
+ const room = new Room();
33
+ const mixer = new AudioMixer(rate, channels);
34
+ // Both sides of the call are one stream: the caller's track and the agent's, mixed, so the
35
+ // speakers hear the conversation and not whichever track arrived first.
36
+ room.on(RoomEvent.TrackSubscribed, (track) => {
37
+ if (track.kind === TrackKind.KIND_AUDIO)
38
+ mixer.addStream(new AudioStream(track, rate, channels));
39
+ });
40
+ const leaving = new Promise((left) => {
41
+ process.stdin.once("end", () => left());
42
+ process.stdin.once("close", () => left());
43
+ room.on(RoomEvent.Disconnected, () => left());
44
+ });
45
+ await room.connect(seat.server_url, seat.participant_token, { autoSubscribe: true, dynacast: false });
46
+ void leaving.then(async () => {
47
+ await mixer.aclose();
48
+ await room.disconnect();
49
+ process.exit(0);
50
+ });
51
+ for await (const frame of mixer) {
52
+ writeSync(PCM, Buffer.from(frame.data.buffer, frame.data.byteOffset, frame.data.byteLength));
53
+ }
54
+ }
55
+ listen().catch((failed) => {
56
+ process.stderr.write(`${failed instanceof Error ? failed.message : String(failed)}\n`);
57
+ process.exit(1);
58
+ });
59
+ //# sourceMappingURL=ear.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ear.js","sourceRoot":"","sources":["../../src/cli/ear.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAE9G,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAExF,iGAAiG;AACjG,iGAAiG;AACjG,kGAAkG;AAClG,mGAAmG;AACnG,+FAA+F;AAC/F,8FAA8F;AAC9F,kDAAkD;AAClD,MAAM,GAAG,GAAG,CAAC,CAAC;AAEd,iGAAiG;AACjG,SAAS,OAAO;IACd,OAAO,IAAI,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAC5B,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,MAAM,IAAI,GAAG,CAAC,KAAa,EAAQ,EAAE;YACnC,IAAI,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAA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way a developer runs on their own machine, which is where `pinecall run` starts. */
3
+ export declare const DEFAULT_URL = "http://localhost:8080";
4
+ /** Pinecall's own cloud: where `pinecall signup` makes an org when no other gateway is named. */
5
+ export declare const CLOUD_URL = "https://box.pinecall.io";
6
+ /** Where the key came from, so a verb can say it and a person can check it without grepping. */
7
+ export type Source = "profile" | "none";
8
+ /** What the resolution found: the gateway, the key if there is one, and where the key came from. */
9
+ export interface Found {
10
+ url: string;
11
+ apiKey: string | undefined;
12
+ source: Source;
13
+ }
14
+ /** A gateway with the key in hand: what a verb holds after `theDoor` answered. */
15
+ export interface Open {
16
+ url: string;
17
+ apiKey: string;
18
+ source: Source;
19
+ }
20
+ /**
21
+ * Which gateway and which key: one profile, and there is nothing else.
22
+ *
23
+ * There used to be four files and three variables answering these two questions, in an order
24
+ * nobody was ever told — and the one that won was the one you had not chosen. `pinecall login`
25
+ * kept a key, an export from another project beat it, and a verb registered into another org in
26
+ * another world with every line reading exactly the same.
27
+ *
28
+ * Now: the profile `--profile` names, or the active one. `pinecall config` prints which. A
29
+ * machine with no browser writes one off stdin — `pinecall login --key-stdin` — so a key is never
30
+ * in an environment every child process and every `ps` can read. `PINECALL_HOME` says where the
31
+ * file is, and that is the only variable this file knows about.
32
+ */
33
+ export declare function doorFrom(env?: NodeJS.ProcessEnv, home?: string, profile?: string | undefined): Found;
34
+ /** The gateway a verb knocks at, or nothing once it has said why it cannot: every verb's first act. */
35
+ export declare function theDoor(env?: NodeJS.ProcessEnv, err?: NodeJS.WritableStream): Open | undefined;
36
+ /** What to say when this machine knows no gateway: the verb that fixes it, and CI's way in. */
37
+ export declare function noKey(url: string): string;
38
+ /** The first line a verb that connects prints: which gateway, and where its key was found. */
39
+ export declare function doorLine(door: Open): string;
40
+ //# sourceMappingURL=env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/cli/env.ts"],"names":[],"mappings":"AAAA,yGAAyG;AAKzG,+FAA+F;AAC/F,eAAO,MAAM,WAAW,0BAA0B,CAAC;AAEnD,iGAAiG;AACjG,eAAO,MAAM,SAAS,4BAA4B,CAAC;AAEnD,gGAAgG;AAChG,MAAM,MAAM,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAExC,oGAAoG;AACpG,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,kFAAkF;AAClF,MAAM,WAAW,IAAI;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CACtB,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,IAAI,GAAE,MAA0B,EAChC,OAAO,GAAE,MAAM,GAAG,SAA8B,GAC/C,KAAK,CAIP;AAED,uGAAuG;AACvG,wBAAgB,OAAO,CACrB,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,GAAG,GAAE,MAAM,CAAC,cAA+B,GAC1C,IAAI,GAAG,SAAS,CAOlB;AAED,+FAA+F;AAC/F,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKzC;AAED,8FAA8F;AAC9F,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE3C"}
@@ -0,0 +1,45 @@
1
+ /** Where the CLI is pointed and what opens the door: the one place that decides both, for every verb. */
2
+ import { pinecallHome } from "./credentials.js";
3
+ import { profileFor, theChosenProfile } from "./profiles.js";
4
+ /** The gateway a developer runs on their own machine, which is where `pinecall run` starts. */
5
+ export const DEFAULT_URL = "http://localhost:8080";
6
+ /** Pinecall's own cloud: where `pinecall signup` makes an org when no other gateway is named. */
7
+ export const CLOUD_URL = "https://box.pinecall.io";
8
+ /**
9
+ * Which gateway and which key: one profile, and there is nothing else.
10
+ *
11
+ * There used to be four files and three variables answering these two questions, in an order
12
+ * nobody was ever told — and the one that won was the one you had not chosen. `pinecall login`
13
+ * kept a key, an export from another project beat it, and a verb registered into another org in
14
+ * another world with every line reading exactly the same.
15
+ *
16
+ * Now: the profile `--profile` names, or the active one. `pinecall config` prints which. A
17
+ * machine with no browser writes one off stdin — `pinecall login --key-stdin` — so a key is never
18
+ * in an environment every child process and every `ps` can read. `PINECALL_HOME` says where the
19
+ * file is, and that is the only variable this file knows about.
20
+ */
21
+ export function doorFrom(env = process.env, home = pinecallHome(env), profile = theChosenProfile()) {
22
+ const chosen = profileFor(profile, home);
23
+ if (chosen === undefined)
24
+ return { url: DEFAULT_URL, apiKey: undefined, source: "none" };
25
+ return { url: chosen.url, apiKey: chosen.key, source: "profile" };
26
+ }
27
+ /** The gateway a verb knocks at, or nothing once it has said why it cannot: every verb's first act. */
28
+ export function theDoor(env = process.env, err = process.stderr) {
29
+ const found = doorFrom(env);
30
+ if (found.apiKey === undefined) {
31
+ err.write(`${noKey(found.url)}\n`);
32
+ return undefined;
33
+ }
34
+ return { url: found.url, apiKey: found.apiKey, source: found.source };
35
+ }
36
+ /** What to say when this machine knows no gateway: the verb that fixes it, and CI's way in. */
37
+ export function noKey(url) {
38
+ return (`no gateway: \`pinecall login ${url}\`, or \`pinecall use <profile>\` for one already kept`
39
+ + " (`pinecall config` lists them)");
40
+ }
41
+ /** The first line a verb that connects prints: which gateway, and where its key was found. */
42
+ export function doorLine(door) {
43
+ return `gateway ${door.url} · key from ${door.source}`;
44
+ }
45
+ //# sourceMappingURL=env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/cli/env.ts"],"names":[],"mappings":"AAAA,yGAAyG;AAEzG,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE7D,+FAA+F;AAC/F,MAAM,CAAC,MAA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AAM,UAAU,QAAQ,CAAC,IAAU;IACjC,OAAO,WAAW,IAAI,CAAC,GAAG,eAAe,IAAI,CAAC,MAAM,EAAE,CAAC;AACzD,CAAC"}
@@ -0,0 +1,37 @@
1
+ /** `pinecall eval <call-id>`: ring 3 — one real call, re-evaluated by the runtime's code checks. */
2
+ import type { Group } from "./groups.js";
3
+ /** One check's answer, as `POST /v1/evals/replay/{call}` writes it: three strings, no nesting. */
4
+ export interface Verdict {
5
+ check: string;
6
+ status: string;
7
+ detail: string;
8
+ }
9
+ /** What the door answers about one call: who it was, whether it holds, and the verdicts. */
10
+ export interface Answer {
11
+ call: string;
12
+ agent: string;
13
+ passed: boolean;
14
+ verdicts: Verdict[];
15
+ }
16
+ /** The words a business will not have its agent say, and the latencies it holds a call to. */
17
+ export interface Case {
18
+ banned?: string[];
19
+ budget?: Record<string, number>;
20
+ }
21
+ export declare const group: Group;
22
+ /**
23
+ * The judgement runs in the runtime, which is where the log, the store and the judges are. This
24
+ * verb builds the case and prints the answer, so a person needs no Python to read a call.
25
+ */
26
+ export declare function run(argv: string[], out?: NodeJS.WritableStream): Promise<number>;
27
+ /**
28
+ * The four code checks over one call, asked of the gateway. `simulate --judge` asks it again after
29
+ * every turn, which is why the request lives here rather than inside this verb's own argument
30
+ * parsing: one door, one sentence when it refuses.
31
+ */
32
+ export declare function replayed(base: string, apiKey: string, call: string, said: Case): Promise<Answer>;
33
+ /** The door this verb knocks at: the gateway's HTTP address and the call, nothing in a query. */
34
+ export declare function replayUrl(base: string, call: string): string;
35
+ /** The case as a person reads it: the call on top, then a line per check, aligned by name. */
36
+ export declare function linesOf(answer: Answer): string[];
37
+ //# sourceMappingURL=eval.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eval.d.ts","sourceRoot":"","sources":["../../src/cli/eval.ts"],"names":[],"mappings":"AAAA,oGAAoG;AAMpG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,kGAAkG;AAClG,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,4FAA4F;AAC5F,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,8FAA8F;AAC9F,MAAM,WAAW,IAAI;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,KAAK,EAAE,KAanB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,GAAE,MAAM,CAAC,cAA+B,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBtG;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAStG;AAED,iGAAiG;AACjG,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,8FAA8F;AAC9F,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAQhD"}
@@ -0,0 +1,83 @@
1
+ /** `pinecall eval <call-id>`: ring 3 — one real call, re-evaluated by the runtime's code checks. */
2
+ import { readFile } from "node:fs/promises";
3
+ import { parseArgs } from "node:util";
4
+ import { theDoor } from "./env.js";
5
+ export const group = {
6
+ purpose: "ring 3: one real call, re-evaluated",
7
+ usage: `usage: pinecall eval <call-id> [--policy policy.json] [--json]
8
+
9
+ One finished call rebuilt from its log and answered by the runtime's four CODE checks —
10
+ consent, register, errors, latency. Nothing is re-run and no model is asked; the verdicts are
11
+ the operator's vocabulary (passed · failed · deferred · skipped), never a judge's four words.
12
+ Exits 1 when a check did not hold.
13
+
14
+ --policy file {"banned": ["…"], "budget": {"llm_ttft": 1.5}} — the words this business will
15
+ not have its agent say, and the latencies it holds a call to
16
+ --json the answer as the door wrote it`,
17
+ run,
18
+ };
19
+ /**
20
+ * The judgement runs in the runtime, which is where the log, the store and the judges are. This
21
+ * verb builds the case and prints the answer, so a person needs no Python to read a call.
22
+ */
23
+ export async function run(argv, out = process.stdout) {
24
+ const { values, positionals } = parseArgs({
25
+ args: argv,
26
+ allowPositionals: true,
27
+ options: { json: { type: "boolean", default: false }, policy: { type: "string" } },
28
+ });
29
+ const call = positionals[0];
30
+ if (call === undefined) {
31
+ process.stderr.write("usage: pinecall eval <call-id> [--policy policy.json] [--json]\n");
32
+ return 2;
33
+ }
34
+ const door = theDoor();
35
+ if (door === undefined)
36
+ return 2;
37
+ let answer;
38
+ try {
39
+ answer = await replayed(door.url, door.apiKey, call, await theCase(values.policy));
40
+ }
41
+ catch (refused) {
42
+ process.stderr.write(`${refused instanceof Error ? refused.message : String(refused)}\n`);
43
+ return 1;
44
+ }
45
+ out.write(values.json === true ? `${JSON.stringify(answer)}\n` : `${linesOf(answer).join("\n")}\n`);
46
+ return answer.passed ? 0 : 1;
47
+ }
48
+ /**
49
+ * The four code checks over one call, asked of the gateway. `simulate --judge` asks it again after
50
+ * every turn, which is why the request lives here rather than inside this verb's own argument
51
+ * parsing: one door, one sentence when it refuses.
52
+ */
53
+ export async function replayed(base, apiKey, call, said) {
54
+ const answered = await fetch(replayUrl(base, call), {
55
+ method: "POST",
56
+ headers: { authorization: `Bearer ${apiKey}`, "content-type": "application/json" },
57
+ body: JSON.stringify(said),
58
+ });
59
+ const body = await answered.text();
60
+ if (!answered.ok)
61
+ throw new Error(`the gateway answered ${answered.status}: ${body}`);
62
+ return JSON.parse(body);
63
+ }
64
+ /** The door this verb knocks at: the gateway's HTTP address and the call, nothing in a query. */
65
+ export function replayUrl(base, call) {
66
+ return `${base.replace(/\/$/, "")}/v1/evals/replay/${encodeURIComponent(call)}`;
67
+ }
68
+ /** The case as a person reads it: the call on top, then a line per check, aligned by name. */
69
+ export function linesOf(answer) {
70
+ const width = Math.max(...answer.verdicts.map((verdict) => verdict.check.length));
71
+ return [
72
+ `${answer.call} ${answer.agent}`,
73
+ ...answer.verdicts.map((verdict) => ` ${verdict.check.padEnd(width)} ${verdict.status.padEnd(8)} ${verdict.detail}`),
74
+ ];
75
+ }
76
+ // The words and the budget are the business's, so they come out of a file the business keeps.
77
+ // A generated `evals/policies` would be the same JSON; nothing here cares which wrote it.
78
+ async function theCase(policy) {
79
+ if (policy === undefined)
80
+ return {};
81
+ return JSON.parse(await readFile(policy, "utf8"));
82
+ }
83
+ //# sourceMappingURL=eval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eval.js","sourceRoot":"","sources":["../../src/cli/eval.ts"],"names":[],"mappings":"AAAA,oGAAoG;AAEpG,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAwBnC,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,OAAO,EAAE,qCAAqC;IAC9C,KAAK,EAAE;;;;;;;;;kDASyC;IAChD,GAAG;CACJ,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,IAAc,EAAE,GAAG,GAA0B,OAAO,CAAC,MAAM;IACnF,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;QACxC,IAAI,EAAE,IAAI;QACV,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,E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