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,58 @@
1
+ /** The room as a value: who is in it, and the four verbs the wire lets the agent use on them. */
2
+ import type { Camel, CommandData, CommandType } from "@pinecall/protocol";
3
+ /** Who a participant is to the call. The wire's five kinds, from protocol/schema/defs.json. */
4
+ export type ParticipantKind = "caller" | "agent" | "supervisor" | "listener" | "sip";
5
+ /** One participant, as the room's own facts describe them. */
6
+ export interface Participant {
7
+ identity: string;
8
+ kind: ParticipantKind;
9
+ name?: string;
10
+ /** When participant.joined said so, in ms. */
11
+ joinedAt: number;
12
+ /** The room's voice activity for them right now; false until participant.speaking says otherwise. */
13
+ speaking: boolean;
14
+ }
15
+ /** How a call puts one command on the wire, already bound to the call it belongs to. */
16
+ export type Commander = <K extends CommandType>(type: K, data: Camel<CommandData<K>>) => void;
17
+ /** One participant, and what may be done to them. Returned by `call.participant(identity)`. */
18
+ export declare class ParticipantHandle {
19
+ readonly identity: string;
20
+ private readonly send;
21
+ constructor(identity: string, send: Commander);
22
+ /** Silence them for the rest of the call. There is no unmute: a leg that must speak is invited again. */
23
+ mute(): void;
24
+ /** Put them out of the room. Removing the caller ends the call. */
25
+ remove(): void;
26
+ }
27
+ /**
28
+ * Who is in the room right now, reduced from the room's own entries — never asked of LiveKit,
29
+ * which the class does not know exists. Reading it is free; the verbs are commands.
30
+ */
31
+ export declare class Room {
32
+ #private;
33
+ private readonly send;
34
+ constructor(send: Commander);
35
+ /** Everybody in the room, in the order they joined. */
36
+ get participants(): Participant[];
37
+ /** The person the agent is serving, when the room has named one. */
38
+ get caller(): Participant | undefined;
39
+ /** Whether anybody of this kind is in the room: `has("supervisor")` is the question worth asking. */
40
+ has(kind: ParticipantKind): boolean;
41
+ /** One participant by identity, as the room last saw them. */
42
+ get(identity: string): Participant | undefined;
43
+ /** Bring somebody else in: a number as a second SIP leg, or an identity as a seat. */
44
+ invite(to: string, options: {
45
+ kind: "sip" | "participant";
46
+ }): void;
47
+ /** Somebody joined. Re-joining under the same identity replaces the row rather than doubling it. */
48
+ joined(data: {
49
+ identity: string;
50
+ kind: ParticipantKind;
51
+ name?: string;
52
+ }, at: number): void;
53
+ /** Somebody left; they are gone from the room, and the log still remembers they were here. */
54
+ left(identity: string): void;
55
+ /** The room's voice activity for one participant flipped. Unknown identities are ignored. */
56
+ speaking(identity: string, speaking: boolean): void;
57
+ }
58
+ //# sourceMappingURL=room.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"room.d.ts","sourceRoot":"","sources":["../../src/call/room.ts"],"names":[],"mappings":"AAAA,iGAAiG;AAEjG,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE1E,+FAA+F;AAC/F,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,UAAU,GAAG,KAAK,CAAC;AAErF,8DAA8D;AAC9D,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,CAAC,EAAE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AAM,GAAG,IAAI,CAIzF;IAED,8FAA8F;IAC9F,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE3B;IAED,6FAA6F;IAC7F,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAGlD;CACF"}
@@ -0,0 +1,68 @@
1
+ /** The room as a value: who is in it, and the four verbs the wire lets the agent use on them. */
2
+ /** One participant, and what may be done to them. Returned by `call.participant(identity)`. */
3
+ export class ParticipantHandle {
4
+ identity;
5
+ send;
6
+ constructor(identity, send) {
7
+ this.identity = identity;
8
+ this.send = send;
9
+ }
10
+ /** Silence them for the rest of the call. There is no unmute: a leg that must speak is invited again. */
11
+ mute() {
12
+ this.send("participant.mute", { identity: this.identity });
13
+ }
14
+ /** Put them out of the room. Removing the caller ends the call. */
15
+ remove() {
16
+ this.send("participant.remove", { identity: this.identity });
17
+ }
18
+ }
19
+ /**
20
+ * Who is in the room right now, reduced from the room's own entries — never asked of LiveKit,
21
+ * which the class does not know exists. Reading it is free; the verbs are commands.
22
+ */
23
+ export class Room {
24
+ send;
25
+ #participants = new Map();
26
+ constructor(send) {
27
+ this.send = send;
28
+ }
29
+ /** Everybody in the room, in the order they joined. */
30
+ get participants() {
31
+ return [...this.#participants.values()];
32
+ }
33
+ /** The person the agent is serving, when the room has named one. */
34
+ get caller() {
35
+ return this.participants.find((one) => one.kind === "caller");
36
+ }
37
+ /** Whether anybody of this kind is in the room: `has("supervisor")` is the question worth asking. */
38
+ has(kind) {
39
+ return this.participants.some((one) => one.kind === kind);
40
+ }
41
+ /** One participant by identity, as the room last saw them. */
42
+ get(identity) {
43
+ return this.#participants.get(identity);
44
+ }
45
+ /** Bring somebody else in: a number as a second SIP leg, or an identity as a seat. */
46
+ invite(to, options) {
47
+ this.send("room.invite", { to, kind: options.kind });
48
+ }
49
+ // ── what the room's entries teach it ────────────────────────────────────────
50
+ /** Somebody joined. Re-joining under the same identity replaces the row rather than doubling it. */
51
+ joined(data, at) {
52
+ const one = { identity: data.identity, kind: data.kind, joinedAt: at, speaking: false };
53
+ if (data.name !== undefined)
54
+ one.name = data.name;
55
+ this.#participants.set(data.identity, one);
56
+ }
57
+ /** Somebody left; they are gone from the room, and the log still remembers they were here. */
58
+ left(identity) {
59
+ this.#participants.delete(identity);
60
+ }
61
+ /** The room's voice activity for one participant flipped. Unknown identities are ignored. */
62
+ speaking(identity, speaking) {
63
+ const one = this.#participants.get(identity);
64
+ if (one !== undefined)
65
+ one.speaking = speaking;
66
+ }
67
+ }
68
+ //# sourceMappingURL=room.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"room.js","sourceRoot":"","sources":["../../src/call/room.ts"],"names":[],"mappings":"AAAA,iGAAiG;AAqBjG,+FAA+F;AAC/F,MAAM,OAAO,iBAAiB;IAEjB,QAAQ;IACA,IAAI;IAFvB,YACW,QAAgB,EACR,IAAe;wBADvB,QAAQ;oBACA,IAAI;IACpB,CAAC;IAEJ,yGAAyG;IACzG,IAAI;QACF,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,mEAAmE;IACnE,MAAM;QACJ,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC/D,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,IAAI;IAGc,IAAI;IAFxB,aAAa,GAAG,IAAI,GAAG,EAAuB,CAAC;IAExD,YAA6B,IAAe;oBAAf,IAAI;IAAc,CAAC;IAEhD,uDAAuD;IACvD,IAAI,YAAY;QACd,OAAO,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,oEAAoE;IACpE,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG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K,SAAS;YAAE,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACjD,CAAC;CACF"}
@@ -0,0 +1,8 @@
1
+ /** Opening a URL in whatever this machine calls a browser, and saying so when it has none. */
2
+ /**
3
+ * Try to put this URL in front of the person. Whether it worked is not knowable and does not
4
+ * matter: the URL is printed either way, and a terminal on a server with no browser — over SSH,
5
+ * in a container — is the case this flow exists to serve. The person opens it wherever they are.
6
+ */
7
+ export declare function openInABrowser(url: string, platform?: string): void;
8
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/cli/browser.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAa9F;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAyB,GAAG,IAAI,CASrF"}
@@ -0,0 +1,27 @@
1
+ /** Opening a URL in whatever this machine calls a browser, and saying so when it has none. */
2
+ import { spawn } from "node:child_process";
3
+ // One command per platform, and nothing clever: `open` is macOS's, `xdg-open` is the freedesktop
4
+ // standard every Linux desktop implements, and `start` is cmd's built-in — which is why Windows
5
+ // needs a shell to run it and the other two do not.
6
+ const OPENERS = {
7
+ darwin: ["open", []],
8
+ win32: ["cmd", ["/c", "start", ""]],
9
+ };
10
+ const ELSEWHERE = ["xdg-open", []];
11
+ /**
12
+ * Try to put this URL in front of the person. Whether it worked is not knowable and does not
13
+ * matter: the URL is printed either way, and a terminal on a server with no browser — over SSH,
14
+ * in a container — is the case this flow exists to serve. The person opens it wherever they are.
15
+ */
16
+ export function openInABrowser(url, platform = process.platform) {
17
+ const [command, args] = OPENERS[platform] ?? ELSEWHERE;
18
+ try {
19
+ // Detached and with both ends of its output thrown away: a browser that writes to stderr must
20
+ // not land in the middle of the terminal's own lines, and this process must not wait for it.
21
+ spawn(command, [...args, url], { detached: true, stdio: "ignore" }).unref();
22
+ }
23
+ catch {
24
+ // A machine with no such command is a machine where the printed URL is the whole answer.
25
+ }
26
+ }
27
+ //# sourceMappingURL=browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/cli/browser.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAE9F,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,iGAAiG;AACjG,gGAAgG;AAChG,oDAAoD;AACpD,MAAM,OAAO,GAAuC;IAClD,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;IACpB,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;CACpC,CAAC;AACF,MAAM,SAAS,GAAuB,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAEvD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW,EAAE,QAAQ,GAAW,OAAO,CAAC,QAAQ;IAC7E,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,SAAS,CAAC;IACvD,IAAI,CAAC;QACH,8FAA8F;QAC9F,6FAA6F;QAC7F,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;IAC9E,CAAC;IAAC,MAAM,CAAC;QACP,yFAAyF;IAC3F,CAAC;AACH,CAAC"}
@@ -0,0 +1,26 @@
1
+ /** `pinecall callbacks`: the numbers people left when the fleet was full, for this org's app to dial. */
2
+ import type { Group } from "./groups.js";
3
+ import { type Door } from "./testing/gateway.js";
4
+ /** One request as the gateway lists it: the event's fields, plus where and when it was written. */
5
+ export interface Callback {
6
+ position: number;
7
+ agent: string;
8
+ ts: number;
9
+ channel: string;
10
+ number: string;
11
+ via: "overflow" | "widget";
12
+ call: string | null;
13
+ }
14
+ interface Page {
15
+ requests: Callback[];
16
+ next: number | null;
17
+ }
18
+ export declare const group: Group;
19
+ /** Resolve the door, read the page, print one line per request. */
20
+ export declare function run(argv: string[], out?: NodeJS.WritableStream, err?: NodeJS.WritableStream, env?: NodeJS.ProcessEnv): Promise<number>;
21
+ /** The page the gateway answers for these query parameters. */
22
+ export declare function callbacks(door: Door, query: URLSearchParams): Promise<Page>;
23
+ /** One request as a person reads it: when, who, the number, and who took it. */
24
+ export declare function lineOf(one: Callback): string;
25
+ export {};
26
+ //# sourceMappingURL=callbacks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../src/cli/callbacks.ts"],"names":[],"mappings":"AAAA,yGAAyG;AAGzG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAS,KAAK,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAMxD,mGAAmG;AACnG,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC3B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,UAAU,IAAI;IACZ,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,KAAK,EAAE,KAQnB,CAAC;AAEF,mEAAmE;AACnE,wBAAsB,GAAG,CACvB,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,GAAE,MAAM,CAAC,cAA+B,EAC3C,GAAG,GAAE,MAAM,CAAC,cAA+B,EAC3C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAAC,MAAM,CAAC,CA4BjB;AAED,+DAA+D;AAC/D,wBAAsB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAGjF;AAED,gFAAgF;AAChF,wBAAgB,MAAM,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAI5C"}
@@ -0,0 +1,68 @@
1
+ /** `pinecall callbacks`: the numbers people left when the fleet was full, for this org's app to dial. */
2
+ import { doorLine, theDoor } from "./env.js";
3
+ import { notASlug } from "./load.js";
4
+ import { asked } from "./testing/gateway.js";
5
+ import { refusal } from "./whoami.js";
6
+ // The door, written once: every request the org's agents took, oldest first, with a cursor.
7
+ const CALLBACKS = "/v1/callbacks";
8
+ export const group = {
9
+ purpose: "the numbers people left when every seat was taken: who to call back",
10
+ usage: `usage: pinecall callbacks [--agent <slug>] [--after <cursor>]
11
+
12
+ Every callback.requested this org's agents wrote — a phone caller the overflow agent answered,
13
+ or a web visitor who left a number at the widget — oldest first, with the cursor the next page
14
+ starts at. The runtime records them; dialing back is your app's.`,
15
+ run,
16
+ };
17
+ /** Resolve the door, read the page, print one line per request. */
18
+ export async function run(argv, out = process.stdout, err = process.stderr, env = process.env) {
19
+ const door = theDoor(env, err);
20
+ if (door === undefined)
21
+ return 2;
22
+ const query = new URLSearchParams();
23
+ const agent = flag(argv, "--agent");
24
+ const aFile = notASlug(agent);
25
+ if (aFile !== undefined) {
26
+ err.write(`${aFile}\n`);
27
+ return 2;
28
+ }
29
+ const after = flag(argv, "--after");
30
+ if (agent !== undefined)
31
+ query.set("agent", agent);
32
+ if (after !== undefined)
33
+ query.set("after", after);
34
+ let page;
35
+ try {
36
+ page = await callbacks(door, query);
37
+ }
38
+ catch (refused) {
39
+ err.write(`${refusal(refused)}\n`);
40
+ return 1;
41
+ }
42
+ out.write(`${doorLine(door)}\n`);
43
+ if (page.requests.length === 0) {
44
+ out.write("nobody is waiting for a call back\n");
45
+ return 0;
46
+ }
47
+ for (const one of page.requests)
48
+ out.write(`${lineOf(one)}\n`);
49
+ if (page.next !== null)
50
+ out.write(`more: --after ${page.next}\n`);
51
+ return 0;
52
+ }
53
+ /** The page the gateway answers for these query parameters. */
54
+ export async function callbacks(door, query) {
55
+ const suffix = query.size === 0 ? "" : `?${query.toString()}`;
56
+ return await asked(door, `${CALLBACKS}${suffix}`);
57
+ }
58
+ /** One request as a person reads it: when, who, the number, and who took it. */
59
+ export function lineOf(one) {
60
+ const when = new Date(one.ts * 1000).toISOString().slice(0, 16).replace("T", " ");
61
+ const took = one.via === "overflow" ? `overflow on ${one.call ?? "?"}` : "the widget";
62
+ return `${when} ${one.agent} ${one.number} ${one.channel} via ${took}`;
63
+ }
64
+ function flag(argv, name) {
65
+ const at = argv.indexOf(name);
66
+ return at === -1 ? undefined : argv[at + 1];
67
+ }
68
+ //# sourceMappingURL=callbacks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callbacks.js","sourceRoot":"","sources":["../../src/cli/callbacks.ts"],"names":[],"mappings":"AAAA,yGAAyG;AAEzG,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,KAAK,EAAa,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,4FAA4F;AAC5F,MAAM,SAAS,GAAG,eAAe,CAAC;AAkBlC,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,OAAO,EAAE,qEAAqE;IAC9E,KAAK,EAAE;;;;mEAI0D;IACjE,GAAG;CACJ,CAAC;AAEF,mEAAmE;AACnE,MAAM,CAAC,KAAK,UAAU,GAAG,CACvB,IAAc,EACd,GAAG,GAA0B,OAAO,CAAC,MAAM,EAC3C,GAAG,GAA0B,OAAO,CAAC,MAAM,EAC3C,GAAG,GAAsB,OAAO,CAAC,GAAG;IAEpC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,C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,0 +1,21 @@
1
+ /** `pinecall chat [agent]`: this directory's agent in this process, or a written call at one already held. */
2
+ import type { Group } from "./groups.js";
3
+ export declare const group: Group;
4
+ /**
5
+ * One process, both sides: the app socket registers the agent, and `WS /v1/chat?agent=<slug>` is
6
+ * the caller. Typing goes out as `{ text }`; everything that comes back is the call's own log,
7
+ * printed as it lands. The tools run in this process, so a breakpoint in a @tool is reachable.
8
+ *
9
+ * This is `rails console`: it works with no `pinecall run` up and it works with three of them,
10
+ * because the caller socket names THIS process's app id and the gateway serves the call from it.
11
+ *
12
+ * Named an agent instead, it mounts nothing and is only the caller's side: a written call at
13
+ * whatever is holding that slug — your own `run` in the other terminal, or a colleague's. The
14
+ * positional is a SLUG and `--file` is the file, because `--agent` meaning one thing in three
15
+ * verbs and the other in six was a flag nobody could read.
16
+ */
17
+ export declare function run(argv: string[]): Promise<number>;
18
+ /** The chat socket's address off the gateway's HTTP one: the scheme flips, the path is fixed. */
19
+ export declare function chatUrl(base: string, agent: string, app?: string, contact?: string): string;
20
+ export declare function lineOf(frame: string): string | null;
21
+ //# sourceMappingURL=chat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/cli/chat.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAU9G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAQzC,eAAO,MAAM,KAAK,EAAE,KAkBnB,CAAC;AASF;;;;;;;;;;;;GAYG;AACH,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAkEzD;AAED,iGAAiG;AACjG,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAc3F;AAoED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMnD"}
@@ -0,0 +1,214 @@
1
+ /** `pinecall chat [agent]`: this directory's agent in this process, or a written call at one already held. */
2
+ import { createInterface } from "node:readline";
3
+ import { parseArgs } from "node:util";
4
+ import { Pinecall } from "../client/index.js";
5
+ import WebSocket from "ws";
6
+ import { mount } from "../runtime/connect.js";
7
+ import { theDoor } from "./env.js";
8
+ import { load, mountOptions, notASlug } from "./load.js";
9
+ import { cannotTell, ENV_FLAG, notThisWorld, standing } from "./world.js";
10
+ import { BROKE, CALLER, lineFor } from "./view.js";
11
+ import { firstState } from "./prompt.js";
12
+ const PROMPT = `${CALLER} `;
13
+ export const group = {
14
+ purpose: "the app in this terminal's own process, and a prompt against it",
15
+ usage: `usage: pinecall chat [agent] [--file agent.tsx] [--as <contact>] [--state file [--case n]]
16
+
17
+ With nothing after it: the agent of this directory, mounted in THIS process, and a written
18
+ caller against it. The tools run here, so a breakpoint in a @tool is reachable.
19
+
20
+ With an agent's slug: a written call at the agent somebody is already holding — your own
21
+ \`pinecall run\` in another terminal, or a colleague's. Nothing is mounted here, so --state,
22
+ which opens a call in a class this process built, is refused.
23
+
24
+ --file <path> which class to mount, when the directory holds more than one
25
+ --env <world> the world you believe this key opens; refused when it opens the other
26
+ --as <contact> who is calling: the id memory files this call under (a phone number, a customer id)
27
+ --state file the state the call opens in — the same goldens file \`pinecall prompt\` reads
28
+ --case n which case of that file, when it holds several
29
+ --events one JSON line per log entry instead of the lines, for a pipe`,
30
+ run,
31
+ };
32
+ // --state is applied through mount's `opening` seam, which only exists in a class THIS process
33
+ // built. Reaching an agent somebody else is holding, there is no such seam and no honest place to
34
+ // put the state, so it is refused rather than silently dropped.
35
+ const NOT_YOURS_TO_OPEN = "--state opens a call in a class this process mounted, and `pinecall chat <agent>` mounts none:"
36
+ + " drop the slug to chat the agent of this directory.";
37
+ /**
38
+ * One process, both sides: the app socket registers the agent, and `WS /v1/chat?agent=<slug>` is
39
+ * the caller. Typing goes out as `{ text }`; everything that comes back is the call's own log,
40
+ * printed as it lands. The tools run in this process, so a breakpoint in a @tool is reachable.
41
+ *
42
+ * This is `rails console`: it works with no `pinecall run` up and it works with three of them,
43
+ * because the caller socket names THIS process's app id and the gateway serves the call from it.
44
+ *
45
+ * Named an agent instead, it mounts nothing and is only the caller's side: a written call at
46
+ * whatever is holding that slug — your own `run` in the other terminal, or a colleague's. The
47
+ * positional is a SLUG and `--file` is the file, because `--agent` meaning one thing in three
48
+ * verbs and the other in six was a flag nobody could read.
49
+ */
50
+ export async function run(argv) {
51
+ const { values, positionals } = parseArgs({
52
+ args: argv,
53
+ allowPositionals: true,
54
+ options: {
55
+ state: { type: "string" },
56
+ case: { type: "string" },
57
+ as: { type: "string" },
58
+ file: { type: "string" },
59
+ events: { type: "boolean", default: false },
60
+ ...ENV_FLAG,
61
+ },
62
+ });
63
+ const reach = positionals[0];
64
+ const aFile = notASlug(reach);
65
+ if (aFile !== undefined) {
66
+ process.stderr.write(`${aFile}\n`);
67
+ return 2;
68
+ }
69
+ if (reach !== undefined && values.state !== undefined) {
70
+ process.stderr.write(`${NOT_YOURS_TO_OPEN}\n`);
71
+ return 2;
72
+ }
73
+ const door = theDoor();
74
+ if (door === undefined)
75
+ return 2;
76
+ try {
77
+ const elsewhere = notThisWorld("chat", await standing(door), values.env);
78
+ if (elsewhere !== undefined) {
79
+ process.stderr.write(`${elsewhere}\n`);
80
+ return 2;
81
+ }
82
+ }
83
+ catch (failed) {
84
+ process.stderr.write(`${cannotTell("chat", failed)}\n`);
85
+ return 2;
86
+ }
87
+ const url = door.url;
88
+ if (reach !== undefined) {
89
+ return await talk(chatUrl(url, reach, undefined, values.as), door.apiKey, values.events === true);
90
+ }
91
+ const loaded = await load(values.file);
92
+ const pc = new Pinecall({ url, apiKey: door.apiKey });
93
+ // takesUnclaimed: false is the other half of the `?app=` below. Holding the agent is what makes
94
+ // this a console; taking a call nobody named would make it a server, and a real phone call would
95
+ // ring in this terminal. See the runtime's docs/decisions/dispatch.md: the registry is its.
96
+ // --state is the same file `pinecall prompt` reads, and it is applied where a call's opening
97
+ // state belongs: through mount's `opening` seam, after the class's own onCall and before the
98
+ // first render, so the model reads one view built from the whole state rather than one per field.
99
+ const preload = values.state === undefined ? undefined : firstState(values.state, values.case);
100
+ const mounted = mount(loaded.ctor, {
101
+ ...mountOptions(loaded, pc),
102
+ takesUnclaimed: false,
103
+ opening: () => preload,
104
+ });
105
+ // The app socket is this process's last handle: left open it keeps node alive after the last
106
+ // turn, and a `pinecall chat` nobody can kill is a process still holding this agent — one of
107
+ // several the gateway now allows, and one more than anybody wanted.
108
+ try {
109
+ await pc.connect();
110
+ // The id exists only after the register the connect awaited, which is why it is read here
111
+ // and not where the agent was mounted.
112
+ const address = chatUrl(url, mounted.slug, mounted.agent.app, values.as);
113
+ return await talk(address, door.apiKey, values.events === true);
114
+ }
115
+ finally {
116
+ pc.close();
117
+ }
118
+ }
119
+ /** The chat socket's address off the gateway's HTTP one: the scheme flips, the path is fixed. */
120
+ export function chatUrl(base, agent, app, contact) {
121
+ const url = new URL(base);
122
+ url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
123
+ url.pathname = `${url.pathname.replace(/\/$/, "")}/v1/chat`;
124
+ url.searchParams.set("agent", agent);
125
+ // Which process serves the call this socket opens. Without it the gateway picks the newest
126
+ // socket holding the agent, which in a terminal with a `run` running is the other one.
127
+ if (app !== undefined)
128
+ url.searchParams.set("app", app);
129
+ // A number names its caller; a web visitor is nobody until somebody says who they are, and
130
+ // `--as` is this terminal saying it: memory files the call under that id, so an agent that
131
+ // declares `memory` can be made to remember somebody from here. It is encoded on the way out,
132
+ // because a `+34600123456` written raw into a query string arrives at the gateway as a space.
133
+ if (contact !== undefined)
134
+ url.searchParams.set("contact", contact);
135
+ return url.toString();
136
+ }
137
+ // Every line typed is one turn; every frame received is one entry, printed as it lands. The key
138
+ // travels as the upgrade's Authorization header, never in the URL, which is the only thing the
139
+ // chat door accepts and the reason this socket is `ws` and not the runtime's global WebSocket.
140
+ function talk(url, apiKey, events) {
141
+ const socket = new WebSocket(url, { headers: { authorization: `Bearer ${apiKey}` } });
142
+ const lines = createInterface({ input: process.stdin, output: process.stdout, prompt: PROMPT });
143
+ // An entry can land after the keyboard is gone — a piped stdin ends the moment it is read, and
144
+ // the agent's greeting arrives after that — and readline throws on a prompt it has closed.
145
+ let typing = true;
146
+ // The keyboard waits for the socket: `ws` throws on a send while the upgrade is still in flight
147
+ // rather than queueing it. Paused, a line typed early stays in the stream and arrives as the
148
+ // first turn the moment the socket is up, which is what a person who typed it meant.
149
+ lines.pause();
150
+ return new Promise((done) => {
151
+ socket.on("open", () => {
152
+ lines.resume();
153
+ lines.prompt();
154
+ });
155
+ socket.on("message", (frame) => {
156
+ // --events is the wire itself, one JSON entry per line, exactly what `run --events` prints:
157
+ // the same word means the same thing in both verbs, and it is what a person reaches for when
158
+ // what is wrong is the stream and not the conversation.
159
+ const line = events ? frame.toString() : lineOf(frame.toString());
160
+ if (line === null)
161
+ return;
162
+ // The prompt is rewritten after every entry: one may land while the caller is still typing.
163
+ process.stdout.write(`\r${line}\n`);
164
+ if (typing)
165
+ lines.prompt();
166
+ });
167
+ socket.on("error", (failed) => {
168
+ process.stderr.write(`\rthe gateway refused the chat socket: ${failed.message}\n`);
169
+ lines.close();
170
+ done(1);
171
+ });
172
+ // A close that carries a reason is the gateway saying why it will not take this call — today
173
+ // that is an agent nobody is serving, and the sentence names it. A close with none is the
174
+ // conversation ending, which is how every chat ends and is not worth a line.
175
+ socket.on("close", (_code, reason) => {
176
+ lines.close();
177
+ const why = reason.toString();
178
+ if (why === "") {
179
+ done(0);
180
+ return;
181
+ }
182
+ process.stderr.write(`\r${why}\n`);
183
+ done(1);
184
+ });
185
+ lines.on("line", (line) => {
186
+ if (line.trim() !== "")
187
+ socket.send(JSON.stringify({ text: line.trim() }));
188
+ lines.prompt();
189
+ });
190
+ lines.on("close", () => {
191
+ typing = false;
192
+ socket.close();
193
+ });
194
+ });
195
+ }
196
+ // One entry off the socket, printed the way the live view draws it — cli/view.ts owns the four
197
+ // marks and the shortening. An entry it has no line for is machinery, and machinery is not the
198
+ // conversation: a state change, a re-render, a metric is printed by nobody here and read whole
199
+ // under --events. An error is the exception, because a tool that threw is the thing a person most
200
+ // needs to see, and it is shown in its own words rather than as the bare type.
201
+ // `turn.user` is the one entry of the conversation with no line: readline echoed those words at
202
+ // the `‹ ` prompt as they were typed, and printing the frame too puts the caller's own sentence on
203
+ // screen twice. `run`'s view is watching somebody else's call and still draws it, so this
204
+ // rule is chat's.
205
+ export function lineOf(frame) {
206
+ const entry = JSON.parse(frame);
207
+ if (entry.type === "turn.user")
208
+ return null;
209
+ if (entry.type === "error")
210
+ return `${BROKE} ${String(entry.data?.message)}`;
211
+ const line = lineFor({ ...entry, data: entry.data ?? {} });
212
+ return line === null ? null : `${line.mark} ${line.text}`;
213
+ }
214
+ //# sourceMappingURL=chat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/cli/chat.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAE9G,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAmB,MAAM,oBAAoB,CAAC;AAC/D,OAAO,SAAS,MAAM,IAAI,CAAC;AAE3B,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,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C,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACrB,MAAM,GAAG,KAAK,CAAC;YACf,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,+FAA+F;AAC/F,+FAA+F;AAC/F,+FAA+F;AAC/F,kGAAkG;AAClG,+EAA+E;AAC/E,gGAAgG;AAChG,mGAAmG;AACnG,0FAA0F;AAC1F,kBAAkB;AAClB,MAAM,UAAU,MAAM,CAAC,KAAa;IAClC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAsD,CAAC;IACrF,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC5C,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC;IAC7E,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE,EAAgB,CAAC,CAAC;IACzE,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,16 @@
1
+ /** `pinecall config` and `pinecall use`: the gateways this machine knows, and which one is in hand. */
2
+ import type { Group } from "./groups.js";
3
+ import { activeName } from "./profiles.js";
4
+ export declare const group: Group;
5
+ /** What the verb can be told besides the argv. Tests only: where to print, and which home. */
6
+ export interface Showing {
7
+ out?: NodeJS.WritableStream;
8
+ err?: NodeJS.WritableStream;
9
+ home?: string;
10
+ }
11
+ /** `config` with nothing after it prints them all; `use <name>` moves the mark. */
12
+ export declare function run(argv: string[], how?: Showing): Promise<number>;
13
+ /** The same verb under the name a person reaches for: `pinecall use box`. */
14
+ export declare function use(argv: string[], how?: Showing): Promise<number>;
15
+ export { activeName };
16
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/cli/config.ts"],"names":[],"mappings":"AAAA,uGAAuG;AAEvG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAY,UAAU,EAAoC,MAAM,eAAe,CAAC;AAMvF,eAAO,MAAM,KAAK,EAAE,KAgBnB,CAAC;AAEF,8FAA8F;AAC9F,MAAM,WAAW,OAAO;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,mFAAmF;AACnF,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,GAAE,OAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAO5E;AAED,6EAA6E;AAC7E,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,GAAE,OAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAO5E;AAmED,OAAO,EAAE,UAAU,EAAE,CAAC"}