@signalcore/ui 0.1.0 → 1.0.0-beta.1

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 (611) hide show
  1. package/README.md +896 -513
  2. package/dist/AgentAbout.d.ts +186 -0
  3. package/dist/AgentAbout.js +1020 -0
  4. package/dist/AgentAbout.js.map +1 -0
  5. package/dist/AgentCard.d.ts +49 -0
  6. package/dist/AgentCard.js +77 -0
  7. package/dist/AgentCard.js.map +1 -0
  8. package/dist/AgentChat.d.ts +233 -0
  9. package/dist/AgentChat.js +1127 -0
  10. package/dist/AgentChat.js.map +1 -0
  11. package/dist/AgentSpace.d.ts +112 -0
  12. package/dist/AgentSpace.js +339 -0
  13. package/dist/AgentSpace.js.map +1 -0
  14. package/dist/AgentTasks.d.ts +48 -0
  15. package/dist/AgentTasks.js +120 -0
  16. package/dist/AgentTasks.js.map +1 -0
  17. package/dist/BrowserView.d.ts +52 -0
  18. package/dist/BrowserView.js +328 -0
  19. package/dist/BrowserView.js.map +1 -0
  20. package/dist/FileView.d.ts +63 -0
  21. package/dist/FileView.js +449 -0
  22. package/dist/FileView.js.map +1 -0
  23. package/dist/Modes.d.ts +13 -0
  24. package/dist/Modes.js +75 -0
  25. package/dist/Modes.js.map +1 -0
  26. package/dist/VoiceCall.d.ts +91 -0
  27. package/dist/VoiceCall.js +302 -0
  28. package/dist/VoiceCall.js.map +1 -0
  29. package/dist/about.d.ts +212 -0
  30. package/dist/about.js +136 -0
  31. package/dist/about.js.map +1 -0
  32. package/dist/agentIcons.d.ts +33 -0
  33. package/dist/agentIcons.js +36 -0
  34. package/dist/agentIcons.js.map +1 -0
  35. package/dist/automation/Automation.d.ts +35 -0
  36. package/dist/automation/Automation.js +268 -0
  37. package/dist/automation/Automation.js.map +1 -0
  38. package/dist/automation/RunView.d.ts +25 -0
  39. package/dist/automation/RunView.js +187 -0
  40. package/dist/automation/RunView.js.map +1 -0
  41. package/dist/automation/cron.d.ts +41 -0
  42. package/dist/automation/cron.js +169 -0
  43. package/dist/automation/cron.js.map +1 -0
  44. package/dist/automation/marks.js +121 -0
  45. package/dist/automation/marks.js.map +1 -0
  46. package/dist/automation/messages.d.ts +113 -0
  47. package/dist/automation/messages.js +113 -0
  48. package/dist/automation/messages.js.map +1 -0
  49. package/dist/automation/record.d.ts +47 -0
  50. package/dist/automation/record.js +177 -0
  51. package/dist/automation/record.js.map +1 -0
  52. package/dist/automation/types.d.ts +143 -0
  53. package/dist/automation/when.d.ts +36 -0
  54. package/dist/automation/when.js +168 -0
  55. package/dist/automation/when.js.map +1 -0
  56. package/dist/blocks.d.ts +185 -0
  57. package/dist/browser.js +292 -0
  58. package/dist/browser.js.map +1 -0
  59. package/dist/call.d.ts +89 -0
  60. package/dist/call.js +218 -0
  61. package/dist/call.js.map +1 -0
  62. package/dist/channelParts.js +26 -0
  63. package/dist/channelParts.js.map +1 -0
  64. package/dist/classes.js +8 -3
  65. package/dist/classes.js.map +1 -0
  66. package/dist/client.d.ts +146 -54
  67. package/dist/client.js +204 -1
  68. package/dist/client.js.map +1 -0
  69. package/dist/conversationFiles.js +46 -0
  70. package/dist/conversationFiles.js.map +1 -0
  71. package/dist/credentials.d.ts +45 -0
  72. package/dist/credentials.js +98 -0
  73. package/dist/credentials.js.map +1 -0
  74. package/dist/dev.js +17 -0
  75. package/dist/dev.js.map +1 -0
  76. package/dist/es.d.ts +17 -0
  77. package/dist/es.js +382 -0
  78. package/dist/es.js.map +1 -0
  79. package/dist/files.d.ts +21 -0
  80. package/dist/files.js +214 -0
  81. package/dist/files.js.map +1 -0
  82. package/dist/frames.d.ts +115 -0
  83. package/dist/frames.js +219 -0
  84. package/dist/frames.js.map +1 -0
  85. package/dist/icons.js +29 -0
  86. package/dist/icons.js.map +1 -0
  87. package/dist/index.d.ts +63 -60
  88. package/dist/index.js +59 -45
  89. package/dist/kit/AudioPlayer.d.ts +20 -0
  90. package/dist/kit/AudioPlayer.js +116 -0
  91. package/dist/kit/AudioPlayer.js.map +1 -0
  92. package/dist/kit/Button.d.ts +29 -0
  93. package/dist/kit/Button.js +59 -0
  94. package/dist/kit/Button.js.map +1 -0
  95. package/dist/kit/Card.d.ts +16 -0
  96. package/dist/kit/Card.js +36 -0
  97. package/dist/kit/Card.js.map +1 -0
  98. package/dist/kit/Chart.js +152 -0
  99. package/dist/kit/Chart.js.map +1 -0
  100. package/dist/kit/Choices.d.ts +21 -0
  101. package/dist/kit/Choices.js +99 -0
  102. package/dist/kit/Choices.js.map +1 -0
  103. package/dist/kit/Combobox.d.ts +26 -0
  104. package/dist/kit/Combobox.js +190 -0
  105. package/dist/kit/Combobox.js.map +1 -0
  106. package/dist/kit/DateField.d.ts +17 -0
  107. package/dist/kit/DateField.js +133 -0
  108. package/dist/kit/DateField.js.map +1 -0
  109. package/dist/kit/Field.d.ts +40 -0
  110. package/dist/kit/Field.js +98 -0
  111. package/dist/kit/Field.js.map +1 -0
  112. package/dist/kit/FileField.d.ts +113 -0
  113. package/dist/kit/FileField.js +341 -0
  114. package/dist/kit/FileField.js.map +1 -0
  115. package/dist/kit/FileMark.d.ts +15 -0
  116. package/dist/kit/FileMark.js +39 -0
  117. package/dist/kit/FileMark.js.map +1 -0
  118. package/dist/kit/Inputs.d.ts +59 -0
  119. package/dist/kit/Inputs.js +205 -0
  120. package/dist/kit/Inputs.js.map +1 -0
  121. package/dist/kit/List.d.ts +47 -0
  122. package/dist/kit/List.js +85 -0
  123. package/dist/kit/List.js.map +1 -0
  124. package/dist/kit/Mark.d.ts +30 -0
  125. package/dist/kit/Mark.js +27 -0
  126. package/dist/kit/Mark.js.map +1 -0
  127. package/dist/kit/MarkStack.d.ts +15 -0
  128. package/dist/kit/MarkStack.js +26 -0
  129. package/dist/kit/MarkStack.js.map +1 -0
  130. package/dist/kit/Note.d.ts +11 -0
  131. package/dist/kit/Note.js +31 -0
  132. package/dist/kit/Note.js.map +1 -0
  133. package/dist/kit/Popover.js +90 -0
  134. package/dist/kit/Popover.js.map +1 -0
  135. package/dist/kit/RangeField.d.ts +14 -0
  136. package/dist/kit/RangeField.js +47 -0
  137. package/dist/kit/RangeField.js.map +1 -0
  138. package/dist/kit/RatingField.d.ts +14 -0
  139. package/dist/kit/RatingField.js +50 -0
  140. package/dist/kit/RatingField.js.map +1 -0
  141. package/dist/kit/Stat.d.ts +26 -0
  142. package/dist/kit/Stat.js +46 -0
  143. package/dist/kit/Stat.js.map +1 -0
  144. package/dist/kit/Switch.d.ts +14 -0
  145. package/dist/kit/Switch.js +21 -0
  146. package/dist/kit/Switch.js.map +1 -0
  147. package/dist/kit/Tag.d.ts +16 -0
  148. package/dist/kit/Tag.js +20 -0
  149. package/dist/kit/Tag.js.map +1 -0
  150. package/dist/kit/Tile.d.ts +34 -0
  151. package/dist/kit/Tile.js +52 -0
  152. package/dist/kit/Tile.js.map +1 -0
  153. package/dist/kit/TimeField.d.ts +31 -0
  154. package/dist/kit/TimeField.js +109 -0
  155. package/dist/kit/TimeField.js.map +1 -0
  156. package/dist/kit/context.d.ts +22 -0
  157. package/dist/kit/context.js +46 -0
  158. package/dist/kit/context.js.map +1 -0
  159. package/dist/kit/dates.d.ts +14 -0
  160. package/dist/kit/dates.js +129 -0
  161. package/dist/kit/dates.js.map +1 -0
  162. package/dist/kit/messages.d.ts +99 -0
  163. package/dist/kit/messages.js +66 -0
  164. package/dist/kit/messages.js.map +1 -0
  165. package/dist/kit/numbers.d.ts +12 -0
  166. package/dist/kit/numbers.js +40 -0
  167. package/dist/kit/numbers.js.map +1 -0
  168. package/dist/kit/options.d.ts +10 -0
  169. package/dist/kit/options.js +23 -0
  170. package/dist/kit/options.js.map +1 -0
  171. package/dist/kit/uploads.d.ts +42 -0
  172. package/dist/kit/uploads.js +165 -0
  173. package/dist/kit/uploads.js.map +1 -0
  174. package/dist/kit/waveform.js +76 -0
  175. package/dist/kit/waveform.js.map +1 -0
  176. package/dist/locale.d.ts +1 -0
  177. package/dist/locale.js +1 -0
  178. package/dist/markdown.js +84 -0
  179. package/dist/markdown.js.map +1 -0
  180. package/dist/marks.js +217 -0
  181. package/dist/marks.js.map +1 -0
  182. package/dist/reveal.js +48 -0
  183. package/dist/reveal.js.map +1 -0
  184. package/dist/stepGlyphs.js +62 -0
  185. package/dist/stepGlyphs.js.map +1 -0
  186. package/dist/surface/Form.js +264 -0
  187. package/dist/surface/Form.js.map +1 -0
  188. package/dist/surface/Markdown.js +42 -0
  189. package/dist/surface/Markdown.js.map +1 -0
  190. package/dist/surface/Surface.d.ts +31 -17
  191. package/dist/surface/Surface.js +480 -57
  192. package/dist/surface/Surface.js.map +1 -0
  193. package/dist/surface/scope.d.ts +32 -0
  194. package/dist/surface/scope.js +23 -0
  195. package/dist/surface/scope.js.map +1 -0
  196. package/dist/surface/values.d.ts +44 -0
  197. package/dist/surface/values.js +237 -0
  198. package/dist/surface/values.js.map +1 -0
  199. package/dist/tint.d.ts +10 -0
  200. package/dist/tint.js +19 -0
  201. package/dist/tint.js.map +1 -0
  202. package/dist/types.d.ts +541 -0
  203. package/dist/types.js +16 -0
  204. package/dist/types.js.map +1 -0
  205. package/dist/useAgentFace.d.ts +18 -0
  206. package/dist/useAgentFace.js +45 -0
  207. package/dist/useAgentFace.js.map +1 -0
  208. package/dist/useCall.d.ts +39 -0
  209. package/dist/useCall.js +273 -0
  210. package/dist/useCall.js.map +1 -0
  211. package/dist/useConversation.d.ts +77 -0
  212. package/dist/useConversation.js +523 -0
  213. package/dist/useConversation.js.map +1 -0
  214. package/dist/useDictation.d.ts +17 -0
  215. package/dist/useDictation.js +68 -0
  216. package/dist/useDictation.js.map +1 -0
  217. package/dist/useLive.d.ts +26 -0
  218. package/dist/useLive.js +88 -0
  219. package/dist/useLive.js.map +1 -0
  220. package/dist/usePolled.js +68 -0
  221. package/dist/usePolled.js.map +1 -0
  222. package/dist/voice/Orb.d.ts +10 -9
  223. package/dist/voice/Orb.js +43 -39
  224. package/dist/voice/Orb.js.map +1 -0
  225. package/dist/voice/StillOrb.js +33 -0
  226. package/dist/voice/StillOrb.js.map +1 -0
  227. package/dist/voice/WebGLOrb.js +98 -0
  228. package/dist/voice/WebGLOrb.js.map +1 -0
  229. package/dist/voice/fluidDots.js +161 -0
  230. package/dist/voice/fluidDots.js.map +1 -0
  231. package/dist/voice/motion.js +84 -0
  232. package/dist/voice/motion.js.map +1 -0
  233. package/dist/voice/orbs.d.ts +32 -0
  234. package/dist/voice/orbs.js +16 -0
  235. package/dist/voice/orbs.js.map +1 -0
  236. package/dist/voice/useReducedMotion.js +16 -16
  237. package/dist/voice/useReducedMotion.js.map +1 -0
  238. package/dist/voice/wave.js +116 -0
  239. package/dist/voice/wave.js.map +1 -0
  240. package/dist/voice/webgl.js +177 -0
  241. package/dist/voice/webgl.js.map +1 -0
  242. package/dist/widget.js +284 -8
  243. package/package.json +49 -39
  244. package/src/AgentAbout.tsx +1621 -0
  245. package/src/AgentCard.tsx +123 -0
  246. package/src/AgentChat.tsx +1812 -0
  247. package/src/AgentSpace.tsx +540 -0
  248. package/src/AgentTasks.tsx +163 -0
  249. package/src/BrowserView.tsx +442 -0
  250. package/src/FileView.tsx +620 -0
  251. package/src/Modes.tsx +112 -0
  252. package/src/VoiceCall.tsx +411 -0
  253. package/src/about.ts +355 -0
  254. package/src/agentIcons.ts +56 -0
  255. package/src/automation/Automation.tsx +308 -0
  256. package/src/automation/RunView.tsx +213 -0
  257. package/src/automation/cron.ts +196 -0
  258. package/src/automation/marks.tsx +144 -0
  259. package/src/automation/messages.ts +231 -0
  260. package/src/automation/record.ts +206 -0
  261. package/src/automation/types.ts +146 -0
  262. package/src/automation/when.ts +195 -0
  263. package/src/blocks.ts +249 -0
  264. package/src/browser.ts +334 -0
  265. package/src/call.ts +300 -0
  266. package/src/channelParts.ts +17 -0
  267. package/src/classes.ts +10 -0
  268. package/src/client.ts +397 -0
  269. package/src/conversationFiles.ts +54 -0
  270. package/src/credentials.ts +158 -0
  271. package/src/dev.ts +20 -0
  272. package/src/es.ts +423 -0
  273. package/src/files.ts +238 -0
  274. package/src/frames.ts +291 -0
  275. package/src/icons.tsx +49 -0
  276. package/src/index.ts +271 -0
  277. package/src/kit/AudioPlayer.tsx +129 -0
  278. package/src/kit/Button.tsx +97 -0
  279. package/src/kit/Card.tsx +47 -0
  280. package/src/kit/Chart.tsx +129 -0
  281. package/src/kit/Choices.tsx +131 -0
  282. package/src/kit/Combobox.tsx +247 -0
  283. package/src/kit/DateField.tsx +156 -0
  284. package/src/kit/Field.tsx +137 -0
  285. package/src/kit/FileField.tsx +492 -0
  286. package/src/kit/FileMark.tsx +56 -0
  287. package/src/kit/Inputs.tsx +250 -0
  288. package/src/kit/List.tsx +135 -0
  289. package/src/kit/Mark.tsx +64 -0
  290. package/src/kit/MarkStack.tsx +29 -0
  291. package/src/kit/Note.tsx +42 -0
  292. package/src/kit/Popover.tsx +121 -0
  293. package/src/kit/RangeField.tsx +53 -0
  294. package/src/kit/RatingField.tsx +62 -0
  295. package/src/kit/Stat.tsx +60 -0
  296. package/src/kit/Switch.tsx +28 -0
  297. package/src/kit/Tag.tsx +32 -0
  298. package/src/kit/Tile.tsx +74 -0
  299. package/src/kit/TimeField.tsx +157 -0
  300. package/src/kit/context.tsx +246 -0
  301. package/src/kit/dates.ts +150 -0
  302. package/src/kit/messages.ts +160 -0
  303. package/src/kit/numbers.ts +44 -0
  304. package/src/kit/options.ts +30 -0
  305. package/src/kit/uploads.ts +244 -0
  306. package/src/kit/waveform.ts +84 -0
  307. package/src/locale.ts +6 -0
  308. package/src/markdown.ts +69 -0
  309. package/src/marks.tsx +328 -0
  310. package/src/reveal.ts +52 -0
  311. package/src/stepGlyphs.ts +83 -0
  312. package/src/styles.css +6970 -0
  313. package/src/surface/Form.tsx +299 -0
  314. package/src/surface/Markdown.tsx +55 -0
  315. package/src/surface/Surface.tsx +605 -0
  316. package/src/surface/scope.ts +82 -0
  317. package/src/surface/values.ts +361 -0
  318. package/src/tint.ts +14 -0
  319. package/src/types.ts +604 -0
  320. package/src/useAgentFace.ts +47 -0
  321. package/src/useCall.ts +292 -0
  322. package/src/useConversation.ts +627 -0
  323. package/src/useDictation.ts +83 -0
  324. package/src/useLive.ts +115 -0
  325. package/src/usePolled.ts +60 -0
  326. package/src/voice/Orb.tsx +45 -0
  327. package/src/voice/StillOrb.tsx +29 -0
  328. package/src/voice/WebGLOrb.tsx +98 -0
  329. package/src/voice/fluidDots.tsx +171 -0
  330. package/src/voice/motion.ts +112 -0
  331. package/src/voice/orbs.ts +39 -0
  332. package/src/voice/useReducedMotion.ts +24 -0
  333. package/src/voice/wave.tsx +129 -0
  334. package/src/voice/webgl.ts +209 -0
  335. package/src/widget/css.d.ts +5 -0
  336. package/src/widget/element.tsx +535 -0
  337. package/src/widget/index.ts +10 -0
  338. package/src/widget/mount.ts +27 -0
  339. package/src/widget/widget.css +253 -0
  340. package/dist/SignalcoreProvider.d.ts +0 -113
  341. package/dist/SignalcoreProvider.js +0 -84
  342. package/dist/automations/AppMarks.d.ts +0 -11
  343. package/dist/automations/AppMarks.js +0 -18
  344. package/dist/automations/AutomationCard.d.ts +0 -27
  345. package/dist/automations/AutomationCard.js +0 -53
  346. package/dist/automations/AutomationsWindow.d.ts +0 -38
  347. package/dist/automations/AutomationsWindow.js +0 -57
  348. package/dist/automations/Card.d.ts +0 -46
  349. package/dist/automations/Card.js +0 -45
  350. package/dist/automations/ScheduleMarks.d.ts +0 -13
  351. package/dist/automations/ScheduleMarks.js +0 -24
  352. package/dist/automations/presentationIcons.d.ts +0 -7
  353. package/dist/automations/presentationIcons.js +0 -67
  354. package/dist/automations/schedule.d.ts +0 -25
  355. package/dist/automations/schedule.js +0 -59
  356. package/dist/automations/time.d.ts +0 -3
  357. package/dist/automations/time.js +0 -25
  358. package/dist/browser/BrowserView.d.ts +0 -43
  359. package/dist/browser/BrowserView.js +0 -94
  360. package/dist/browser/room.d.ts +0 -21
  361. package/dist/browser/room.js +0 -33
  362. package/dist/browser/useBrowserSession.d.ts +0 -17
  363. package/dist/browser/useBrowserSession.js +0 -67
  364. package/dist/builder/BuilderChat.d.ts +0 -32
  365. package/dist/builder/BuilderChat.js +0 -41
  366. package/dist/builder/BuilderTranscript.d.ts +0 -49
  367. package/dist/builder/BuilderTranscript.js +0 -62
  368. package/dist/builder/StatusLine.d.ts +0 -8
  369. package/dist/builder/StatusLine.js +0 -17
  370. package/dist/builder/answer.d.ts +0 -7
  371. package/dist/builder/answer.js +0 -8
  372. package/dist/builder/blocks.d.ts +0 -31
  373. package/dist/builder/blocks.js +0 -74
  374. package/dist/builder/items.d.ts +0 -15
  375. package/dist/builder/items.js +0 -21
  376. package/dist/builder/steps.d.ts +0 -20
  377. package/dist/builder/steps.js +0 -120
  378. package/dist/builder/time.d.ts +0 -4
  379. package/dist/builder/time.js +0 -24
  380. package/dist/builder/useBuildSession.d.ts +0 -36
  381. package/dist/builder/useBuildSession.js +0 -130
  382. package/dist/builder/workingOn.d.ts +0 -7
  383. package/dist/builder/workingOn.js +0 -15
  384. package/dist/chat/AgentChat.d.ts +0 -37
  385. package/dist/chat/AgentChat.js +0 -21
  386. package/dist/chat/ChatView.d.ts +0 -25
  387. package/dist/chat/ChatView.js +0 -34
  388. package/dist/chat/Composer.d.ts +0 -20
  389. package/dist/chat/Composer.js +0 -22
  390. package/dist/chat/MessageRow.d.ts +0 -22
  391. package/dist/chat/MessageRow.js +0 -32
  392. package/dist/chat/arrival.d.ts +0 -15
  393. package/dist/chat/arrival.js +0 -25
  394. package/dist/chat/history.d.ts +0 -24
  395. package/dist/chat/history.js +0 -45
  396. package/dist/chat/moments.d.ts +0 -25
  397. package/dist/chat/moments.js +0 -72
  398. package/dist/chat/types.d.ts +0 -12
  399. package/dist/chat/types.js +0 -1
  400. package/dist/chat/useComposer.d.ts +0 -46
  401. package/dist/chat/useComposer.js +0 -62
  402. package/dist/chat/useConversation.d.ts +0 -35
  403. package/dist/chat/useConversation.js +0 -71
  404. package/dist/chat/useStickToBottom.d.ts +0 -9
  405. package/dist/chat/useStickToBottom.js +0 -33
  406. package/dist/chat/useTurns.d.ts +0 -49
  407. package/dist/chat/useTurns.js +0 -111
  408. package/dist/classes.d.ts +0 -2
  409. package/dist/development.d.ts +0 -5
  410. package/dist/development.js +0 -8
  411. package/dist/flow/FlowWindow.d.ts +0 -42
  412. package/dist/flow/FlowWindow.js +0 -126
  413. package/dist/flow/index.d.ts +0 -16
  414. package/dist/flow/index.js +0 -16
  415. package/dist/flow/kinds.d.ts +0 -23
  416. package/dist/flow/kinds.js +0 -48
  417. package/dist/flow/map.d.ts +0 -44
  418. package/dist/flow/map.js +0 -225
  419. package/dist/flow/nodePaths.d.ts +0 -7
  420. package/dist/flow/nodePaths.js +0 -17
  421. package/dist/flow/relations.d.ts +0 -42
  422. package/dist/flow/relations.js +0 -174
  423. package/dist/host.d.ts +0 -124
  424. package/dist/host.js +0 -1
  425. package/dist/live/LiveView.d.ts +0 -28
  426. package/dist/live/LiveView.js +0 -55
  427. package/dist/live/capture.d.ts +0 -20
  428. package/dist/live/capture.js +0 -100
  429. package/dist/live/follow.d.ts +0 -26
  430. package/dist/live/follow.js +0 -72
  431. package/dist/live/paint.d.ts +0 -13
  432. package/dist/live/paint.js +0 -77
  433. package/dist/live/useLiveStream.d.ts +0 -16
  434. package/dist/live/useLiveStream.js +0 -57
  435. package/dist/look.d.ts +0 -33
  436. package/dist/look.js +0 -241
  437. package/dist/messages/en.d.ts +0 -3
  438. package/dist/messages/en.js +0 -251
  439. package/dist/messages/es.d.ts +0 -3
  440. package/dist/messages/es.js +0 -251
  441. package/dist/messages/index.d.ts +0 -16
  442. package/dist/messages/index.js +0 -33
  443. package/dist/messages/types.d.ts +0 -246
  444. package/dist/messages/types.js +0 -1
  445. package/dist/parts/Button.d.ts +0 -18
  446. package/dist/parts/Button.js +0 -17
  447. package/dist/parts/Icon.d.ts +0 -39
  448. package/dist/parts/Icon.js +0 -37
  449. package/dist/parts/Input.d.ts +0 -6
  450. package/dist/parts/Input.js +0 -11
  451. package/dist/parts/Spinner.d.ts +0 -2
  452. package/dist/parts/Spinner.js +0 -7
  453. package/dist/patterns.d.ts +0 -15
  454. package/dist/patterns.js +0 -5
  455. package/dist/presets.d.ts +0 -82
  456. package/dist/presets.js +0 -81
  457. package/dist/primitives.d.ts +0 -22
  458. package/dist/primitives.js +0 -58
  459. package/dist/request/RequestCard.d.ts +0 -34
  460. package/dist/request/RequestCard.js +0 -101
  461. package/dist/request/approval/ApprovalPreview.d.ts +0 -5
  462. package/dist/request/approval/ApprovalPreview.js +0 -27
  463. package/dist/request/approval/shapes.d.ts +0 -32
  464. package/dist/request/approval/shapes.js +0 -68
  465. package/dist/request/apps.d.ts +0 -11
  466. package/dist/request/apps.js +0 -27
  467. package/dist/request/cards.d.ts +0 -12
  468. package/dist/request/cards.js +0 -24
  469. package/dist/request/deliver.d.ts +0 -12
  470. package/dist/request/deliver.js +0 -21
  471. package/dist/request/handOver.d.ts +0 -18
  472. package/dist/request/handOver.js +0 -33
  473. package/dist/request/kinds/Approval.d.ts +0 -3
  474. package/dist/request/kinds/Approval.js +0 -9
  475. package/dist/request/kinds/Choice.d.ts +0 -3
  476. package/dist/request/kinds/Choice.js +0 -8
  477. package/dist/request/kinds/Connect.d.ts +0 -9
  478. package/dist/request/kinds/Connect.js +0 -119
  479. package/dist/request/kinds/FreeText.d.ts +0 -3
  480. package/dist/request/kinds/FreeText.js +0 -20
  481. package/dist/request/kinds/HandOver.d.ts +0 -13
  482. package/dist/request/kinds/HandOver.js +0 -20
  483. package/dist/request/kinds/Secret.d.ts +0 -7
  484. package/dist/request/kinds/Secret.js +0 -49
  485. package/dist/request/kinds/Upload.d.ts +0 -6
  486. package/dist/request/kinds/Upload.js +0 -47
  487. package/dist/request/types.d.ts +0 -83
  488. package/dist/request/types.js +0 -1
  489. package/dist/safeUrl.d.ts +0 -6
  490. package/dist/safeUrl.js +0 -8
  491. package/dist/stream/builder.d.ts +0 -176
  492. package/dist/stream/builder.js +0 -202
  493. package/dist/stream/reduce.d.ts +0 -51
  494. package/dist/stream/reduce.js +0 -58
  495. package/dist/stream/untilAborted.d.ts +0 -7
  496. package/dist/stream/untilAborted.js +0 -32
  497. package/dist/stream/useRunStream.d.ts +0 -26
  498. package/dist/stream/useRunStream.js +0 -137
  499. package/dist/styles.css +0 -2318
  500. package/dist/surface/HostNode.d.ts +0 -14
  501. package/dist/surface/HostNode.js +0 -30
  502. package/dist/surface/Node.d.ts +0 -7
  503. package/dist/surface/Node.js +0 -49
  504. package/dist/surface/SurfaceBoundary.d.ts +0 -26
  505. package/dist/surface/SurfaceBoundary.js +0 -20
  506. package/dist/surface/bindings.d.ts +0 -14
  507. package/dist/surface/bindings.js +0 -37
  508. package/dist/surface/check.d.ts +0 -27
  509. package/dist/surface/check.js +0 -102
  510. package/dist/surface/format.d.ts +0 -10
  511. package/dist/surface/format.js +0 -32
  512. package/dist/surface/hosts.d.ts +0 -6
  513. package/dist/surface/hosts.js +0 -11
  514. package/dist/surface/scene.d.ts +0 -21
  515. package/dist/surface/scene.js +0 -8
  516. package/dist/surface/templates/Browser.d.ts +0 -6
  517. package/dist/surface/templates/Browser.js +0 -11
  518. package/dist/surface/templates/Chart.d.ts +0 -6
  519. package/dist/surface/templates/Chart.js +0 -13
  520. package/dist/surface/templates/Choices.d.ts +0 -3
  521. package/dist/surface/templates/Choices.js +0 -12
  522. package/dist/surface/templates/Form.d.ts +0 -3
  523. package/dist/surface/templates/Form.js +0 -44
  524. package/dist/surface/templates/KeyValue.d.ts +0 -3
  525. package/dist/surface/templates/KeyValue.js +0 -7
  526. package/dist/surface/templates/Layout.d.ts +0 -5
  527. package/dist/surface/templates/Layout.js +0 -16
  528. package/dist/surface/templates/Live.d.ts +0 -6
  529. package/dist/surface/templates/Live.js +0 -9
  530. package/dist/surface/templates/Media.d.ts +0 -5
  531. package/dist/surface/templates/Media.js +0 -13
  532. package/dist/surface/templates/Slots.d.ts +0 -3
  533. package/dist/surface/templates/Slots.js +0 -19
  534. package/dist/surface/templates/Table.d.ts +0 -3
  535. package/dist/surface/templates/Table.js +0 -12
  536. package/dist/surface/templates/Text.d.ts +0 -4
  537. package/dist/surface/templates/Text.js +0 -15
  538. package/dist/surface/templates/index.d.ts +0 -7
  539. package/dist/surface/templates/index.js +0 -32
  540. package/dist/surface/types.d.ts +0 -68
  541. package/dist/surface/types.js +0 -6
  542. package/dist/theme.d.ts +0 -62
  543. package/dist/theme.js +0 -9
  544. package/dist/useTokens.d.ts +0 -7
  545. package/dist/useTokens.js +0 -41
  546. package/dist/voice/VoiceWindow.d.ts +0 -18
  547. package/dist/voice/VoiceWindow.js +0 -35
  548. package/dist/voice/index.d.ts +0 -13
  549. package/dist/voice/index.js +0 -12
  550. package/dist/voice/meter.d.ts +0 -16
  551. package/dist/voice/meter.js +0 -52
  552. package/dist/voice/orbColors.d.ts +0 -16
  553. package/dist/voice/orbColors.js +0 -75
  554. package/dist/voice/pushable.d.ts +0 -16
  555. package/dist/voice/pushable.js +0 -56
  556. package/dist/voice/useDictation.d.ts +0 -24
  557. package/dist/voice/useDictation.js +0 -60
  558. package/dist/voice/useReducedMotion.d.ts +0 -5
  559. package/dist/voice/useVoice.d.ts +0 -70
  560. package/dist/voice/useVoice.js +0 -197
  561. package/dist/voice/useVoicePrimitives.d.ts +0 -7
  562. package/dist/voice/useVoicePrimitives.js +0 -11
  563. package/dist/voice/voice.d.ts +0 -55
  564. package/dist/voice/voice.js +0 -9
  565. package/dist/voice/webSpeech.d.ts +0 -33
  566. package/dist/voice/webSpeech.js +0 -258
  567. package/dist/widget.js.map +0 -1
  568. package/dist/windows/AgentSpace.d.ts +0 -78
  569. package/dist/windows/AgentSpace.js +0 -135
  570. package/dist/windows/Captions.d.ts +0 -13
  571. package/dist/windows/Captions.js +0 -22
  572. package/dist/windows/Dock.d.ts +0 -37
  573. package/dist/windows/Dock.js +0 -22
  574. package/dist/windows/Journal.d.ts +0 -15
  575. package/dist/windows/Journal.js +0 -19
  576. package/dist/windows/KindMark.d.ts +0 -7
  577. package/dist/windows/KindMark.js +0 -31
  578. package/dist/windows/Pending.d.ts +0 -8
  579. package/dist/windows/Pending.js +0 -17
  580. package/dist/windows/Stage.d.ts +0 -18
  581. package/dist/windows/Stage.js +0 -21
  582. package/dist/windows/StatusLabel.d.ts +0 -9
  583. package/dist/windows/StatusLabel.js +0 -7
  584. package/dist/windows/Strip.d.ts +0 -17
  585. package/dist/windows/Strip.js +0 -42
  586. package/dist/windows/SurfaceWindow.d.ts +0 -20
  587. package/dist/windows/SurfaceWindow.js +0 -12
  588. package/dist/windows/WindowFrame.d.ts +0 -23
  589. package/dist/windows/WindowFrame.js +0 -22
  590. package/dist/windows/hearing.d.ts +0 -11
  591. package/dist/windows/hearing.js +0 -26
  592. package/dist/windows/kinds.d.ts +0 -47
  593. package/dist/windows/kinds.js +0 -28
  594. package/dist/windows/reduce.d.ts +0 -98
  595. package/dist/windows/reduce.js +0 -151
  596. package/dist/windows/registry.d.ts +0 -18
  597. package/dist/windows/registry.js +0 -61
  598. package/dist/windows/reveal.d.ts +0 -9
  599. package/dist/windows/reveal.js +0 -6
  600. package/dist/windows/space.d.ts +0 -21
  601. package/dist/windows/space.js +0 -6
  602. package/dist/windows/status.d.ts +0 -11
  603. package/dist/windows/status.js +0 -30
  604. package/dist/windows/types.d.ts +0 -15
  605. package/dist/windows/types.js +0 -1
  606. package/dist/windows/useLoaded.d.ts +0 -44
  607. package/dist/windows/useLoaded.js +0 -58
  608. package/dist/windows/useUnread.d.ts +0 -7
  609. package/dist/windows/useUnread.js +0 -21
  610. package/dist/windows/useWindows.d.ts +0 -70
  611. package/dist/windows/useWindows.js +0 -60
@@ -1,23 +0,0 @@
1
- /**
2
- * The package as the owner reads it: the folders of an agent's package
3
- * (`signalcore_core.package`) in the order the owner thinks in, each named by what it holds for
4
- * them, never by its path. The same words name the kinds of parts a change touched and the
5
- * columns of the map, so a folder and a change speak of the same thing.
6
- *
7
- * Pure. The words are the language's (`Messages["flow"]`), Spanish unless a caller passes
8
- * another, so the same function serves a host in any locale.
9
- */
10
- import type { Messages } from "../messages/types.js";
11
- /** The words the map and the package's vocabulary use: `useMessages().flow`. */
12
- export type FlowWords = Messages["flow"];
13
- declare const ORDER: readonly ["conduct", "channels", "automations", "actions", "records", "apps", "tests", "dependencies", "other", "readme"];
14
- export type PartKind = (typeof ORDER)[number];
15
- /** The kinds of parts in the package's order, for anything that lists them. */
16
- export declare const KINDS: readonly string[];
17
- /** How a kind of part reads to the owner ("automations" → "Qué hace"). */
18
- export declare const kindLabel: (kind: string, words?: FlowWords) => string;
19
- /** Which kind a file belongs to. Root files and unknown folders get a kind of their own. */
20
- export declare function kindOf(path: string): string;
21
- /** The stable name of a part, as the owner sees it: `automations/aviso.py` → `aviso`. */
22
- export declare function partName(path: string, words?: FlowWords): string;
23
- export {};
@@ -1,48 +0,0 @@
1
- /**
2
- * The package as the owner reads it: the folders of an agent's package
3
- * (`signalcore_core.package`) in the order the owner thinks in, each named by what it holds for
4
- * them, never by its path. The same words name the kinds of parts a change touched and the
5
- * columns of the map, so a folder and a change speak of the same thing.
6
- *
7
- * Pure. The words are the language's (`Messages["flow"]`), Spanish unless a caller passes
8
- * another, so the same function serves a host in any locale.
9
- */
10
- import { es } from "../messages/es.js";
11
- const ORDER = [
12
- "conduct",
13
- "channels",
14
- "automations",
15
- "actions",
16
- "records",
17
- "apps",
18
- "tests",
19
- "dependencies",
20
- "other",
21
- "readme",
22
- ];
23
- /** The kinds of parts in the package's order, for anything that lists them. */
24
- export const KINDS = ORDER;
25
- const isKind = (value) => KINDS.includes(value);
26
- /** How a kind of part reads to the owner ("automations" → "Qué hace"). */
27
- export const kindLabel = (kind, words = es.flow) => isKind(kind) ? words.kinds[kind] : kind;
28
- /** Which kind a file belongs to. Root files and unknown folders get a kind of their own. */
29
- export function kindOf(path) {
30
- if (path === "requirements.txt")
31
- return "dependencies";
32
- if (path === "README.md")
33
- return "readme";
34
- const [folder, rest] = path.split("/", 2);
35
- if (folder && rest !== undefined && isKind(folder))
36
- return folder;
37
- return "other";
38
- }
39
- /** The stable name of a part, as the owner sees it: `automations/aviso.py` → `aviso`. */
40
- export function partName(path, words = es.flow) {
41
- if (path === "conduct/instructions.md")
42
- return words.conductFiles.instructions;
43
- if (path === "conduct/agent.yaml")
44
- return words.conductFiles.settings;
45
- const file = path.split("/").at(-1) ?? path;
46
- const dot = file.lastIndexOf(".");
47
- return dot > 0 ? file.slice(0, dot) : file;
48
- }
@@ -1,44 +0,0 @@
1
- /**
2
- * The agent as a map: its parts as nodes, in columns from what starts things (the channels)
3
- * through what it does (automations, skills) and what those call (actions) to what they reach
4
- * (records, apps, the owner); the connections read from its code and its page. Pure and
5
- * deterministic, so the same agent always draws the same. The words on it (the line between two
6
- * parts, the word under a node) are the language's, Spanish unless a caller passes another.
7
- */
8
- import type { Overview } from "../windows/types.js";
9
- import { type FlowWords } from "./kinds.js";
10
- export type NodeKind = "channel" | "automation" | "skill" | "action" | "record" | "app" | "owner" | "browser" | "files" | "store";
11
- export interface MapNode {
12
- /** `automation:<id>`, `skill:<id>`, a channel's id, a file's path, `app:<alias>`, `owner`… */
13
- id: string;
14
- kind: NodeKind;
15
- label: string;
16
- detail: string | null;
17
- /** The file it lives in, when it has one. */
18
- path: string | null;
19
- /** For its logo, when it is a brand. */
20
- provider: string | null;
21
- /** An automation's, a channel's or an app's state, as the overview says it. */
22
- status: string | null;
23
- /** How an automation starts. */
24
- trigger: "cron" | "webhook" | "event" | null;
25
- x: number;
26
- y: number;
27
- }
28
- export interface MapEdge {
29
- id: string;
30
- from: string;
31
- to: string;
32
- label: string | null;
33
- }
34
- export declare const NODE_W = 232;
35
- export declare const NODE_H = 60;
36
- /** Which handler of a file a line belongs to: the last one that starts before it. */
37
- export declare function ownerOf(handlers: {
38
- id: string;
39
- first: number;
40
- }[] | undefined, line: number): string | null;
41
- export declare function agentMap(overview: Overview, files: Record<string, string>, words?: FlowWords): {
42
- nodes: MapNode[];
43
- edges: MapEdge[];
44
- };
package/dist/flow/map.js DELETED
@@ -1,225 +0,0 @@
1
- /**
2
- * The agent as a map: its parts as nodes, in columns from what starts things (the channels)
3
- * through what it does (automations, skills) and what those call (actions) to what they reach
4
- * (records, apps, the owner); the connections read from its code and its page. Pure and
5
- * deterministic, so the same agent always draws the same. The words on it (the line between two
6
- * parts, the word under a node) are the language's, Spanish unless a caller passes another.
7
- */
8
- import { es } from "../messages/es.js";
9
- import { kindOf, partName } from "./kinds.js";
10
- import { relationsOf } from "./relations.js";
11
- export const NODE_W = 232;
12
- export const NODE_H = 60;
13
- const COL_GAP = 104;
14
- const ROW_GAP = 28;
15
- const COLUMN = {
16
- channel: 0,
17
- automation: 1,
18
- skill: 1,
19
- action: 2,
20
- record: 3,
21
- app: 3,
22
- owner: 3,
23
- browser: 3,
24
- files: 3,
25
- store: 3,
26
- };
27
- const PSEUDO_KINDS = ["owner", "browser", "files", "store"];
28
- const isPseudo = (id) => PSEUDO_KINDS.includes(id);
29
- /** A node that is not a file of the package: what a part reaches outside it. */
30
- function outside(kind, words) {
31
- return {
32
- id: kind,
33
- kind,
34
- ...words.outside[kind],
35
- path: null,
36
- provider: null,
37
- status: null,
38
- trigger: null,
39
- };
40
- }
41
- /** The handlers a file holds, each with the first line it owns, so a call can be attributed. */
42
- function handlersByFile(overview) {
43
- const byFile = new Map();
44
- const put = (file, id, flow) => {
45
- const lines = flow.flatMap((step) => (step.line ? [step.line] : []));
46
- const list = byFile.get(file) ?? [];
47
- list.push({ id, first: lines.length ? Math.min(...lines) : 0 });
48
- byFile.set(file, list);
49
- };
50
- for (const a of overview.automations)
51
- put(a.file, `automation:${a.id}`, a.flow);
52
- for (const s of overview.skills)
53
- put(s.file, `skill:${s.id}`, s.flow);
54
- for (const list of byFile.values())
55
- list.sort((a, b) => a.first - b.first);
56
- return byFile;
57
- }
58
- /** Which handler of a file a line belongs to: the last one that starts before it. */
59
- export function ownerOf(handlers, line) {
60
- if (!handlers || handlers.length === 0)
61
- return null;
62
- const before = handlers.filter((handler) => handler.first <= line);
63
- return (before.at(-1) ?? handlers[0])?.id ?? null;
64
- }
65
- export function agentMap(overview, files, words = es.flow) {
66
- const nodes = new Map();
67
- const edges = new Map();
68
- const add = (node) => {
69
- if (!nodes.has(node.id))
70
- nodes.set(node.id, node);
71
- };
72
- const link = (from, to, label) => {
73
- if (from === to)
74
- return;
75
- const id = `${from}->${to}`;
76
- if (!edges.has(id))
77
- edges.set(id, { id, from, to, label });
78
- };
79
- const apps = (chips, from) => {
80
- for (const chip of chips) {
81
- add({
82
- id: `app:${chip.alias}`,
83
- kind: "app",
84
- label: chip.name,
85
- detail: chip.connected
86
- ? chip.uses.slice(0, 2).join(" · ") || words.detail.connected
87
- : words.detail.notConnected,
88
- path: null,
89
- provider: chip.provider ?? null,
90
- status: chip.connected ? "active" : "disconnected",
91
- trigger: null,
92
- });
93
- link(from, `app:${chip.alias}`, words.verbs["uses-app"]);
94
- }
95
- };
96
- for (const channel of overview.channels) {
97
- add({
98
- id: channel.id,
99
- kind: "channel",
100
- label: channel.title,
101
- detail: channel.name,
102
- path: null,
103
- provider: channel.provider,
104
- status: channel.status,
105
- trigger: null,
106
- });
107
- }
108
- for (const automation of overview.automations) {
109
- add({
110
- id: `automation:${automation.id}`,
111
- kind: "automation",
112
- label: automation.title,
113
- detail: automation.when,
114
- path: automation.file,
115
- provider: null,
116
- status: automation.status,
117
- trigger: automation.kind,
118
- });
119
- }
120
- for (const skill of overview.skills) {
121
- add({
122
- id: `skill:${skill.id}`,
123
- kind: "skill",
124
- label: skill.id,
125
- detail: skill.description,
126
- path: skill.file,
127
- provider: null,
128
- status: null,
129
- trigger: null,
130
- });
131
- }
132
- for (const path of Object.keys(files).sort()) {
133
- const kind = kindOf(path);
134
- if (kind === "actions" || kind === "records") {
135
- add({
136
- id: path,
137
- kind: kind === "actions" ? "action" : "record",
138
- label: partName(path, words),
139
- detail: kind === "actions" ? words.detail.action : words.detail.record,
140
- path,
141
- provider: null,
142
- status: null,
143
- trigger: null,
144
- });
145
- }
146
- }
147
- for (const automation of overview.automations)
148
- apps(automation.apps, `automation:${automation.id}`);
149
- for (const skill of overview.skills)
150
- apps(skill.apps, `skill:${skill.id}`);
151
- // A conversation may use any skill: every channel reaches every skill.
152
- for (const channel of overview.channels)
153
- for (const skill of overview.skills)
154
- link(channel.id, `skill:${skill.id}`, words.verbs.canUse);
155
- // What the code says, each call attributed to the handler that makes it.
156
- const handlers = handlersByFile(overview);
157
- for (const edge of relationsOf(files, words).edges) {
158
- const from = ownerOf(handlers.get(edge.from), edge.line) ?? (nodes.has(edge.from) ? edge.from : null);
159
- if (!from)
160
- continue;
161
- const to = targetOf(edge, add, words);
162
- if (!to)
163
- continue;
164
- if (edge.kind === "starts-from")
165
- link(to, from, words.verbs[edge.kind]);
166
- else
167
- link(from, to, edge.kind === "reaches" && to !== "owner" ? words.verbs.sends : words.verbs[edge.kind]);
168
- }
169
- return { nodes: place([...nodes.values()]), edges: [...edges.values()] };
170
- }
171
- /** The node an edge points at, made on the way when it is an app, a channel or a pseudo node. */
172
- function targetOf(edge, add, words) {
173
- if (isPseudo(edge.to)) {
174
- add(outside(edge.to, words));
175
- return edge.to;
176
- }
177
- const kind = kindOf(edge.to);
178
- if (kind === "apps") {
179
- const id = `app:${partName(edge.to, words)}`;
180
- add({
181
- id,
182
- kind: "app",
183
- label: partName(edge.to, words),
184
- detail: null,
185
- path: edge.to,
186
- provider: null,
187
- status: null,
188
- trigger: null,
189
- });
190
- return id;
191
- }
192
- if (kind === "channels") {
193
- add({
194
- id: edge.to,
195
- kind: "channel",
196
- label: partName(edge.to, words),
197
- detail: words.detail.channel,
198
- path: edge.to,
199
- provider: null,
200
- status: null,
201
- trigger: null,
202
- });
203
- return edge.to;
204
- }
205
- if (kind === "actions" || kind === "records")
206
- return edge.to;
207
- return null;
208
- }
209
- /** Columns by role, only the ones in use, each stacked and centred on the tallest. */
210
- function place(nodes) {
211
- const used = [...new Set(nodes.map((node) => COLUMN[node.kind]))].sort((a, b) => a - b);
212
- const rows = new Map();
213
- const placed = nodes.map((node) => {
214
- const column = used.indexOf(COLUMN[node.kind]);
215
- const row = rows.get(column) ?? 0;
216
- rows.set(column, row + 1);
217
- return { ...node, x: column * (NODE_W + COL_GAP), y: row * (NODE_H + ROW_GAP) };
218
- });
219
- const tallest = Math.max(0, ...rows.values());
220
- return placed.map((node) => {
221
- const column = used.indexOf(COLUMN[node.kind]);
222
- const offset = ((tallest - (rows.get(column) ?? 0)) * (NODE_H + ROW_GAP)) / 2;
223
- return { ...node, y: node.y + offset };
224
- });
225
- }
@@ -1,7 +0,0 @@
1
- import type { NodeKind } from "./map.js";
2
- /**
3
- * What marks each kind of part on the map, from Phosphor Icons (MIT, phosphoricons.com): the
4
- * solid weight for what the agent does, the regular one for what it reaches. Drawn here so the
5
- * package carries no icon dependency.
6
- */
7
- export declare const NODE_PATHS: Readonly<Record<NodeKind, string>>;
@@ -1,17 +0,0 @@
1
- /**
2
- * What marks each kind of part on the map, from Phosphor Icons (MIT, phosphoricons.com): the
3
- * solid weight for what the agent does, the regular one for what it reaches. Drawn here so the
4
- * package carries no icon dependency.
5
- */
6
- export const NODE_PATHS = {
7
- channel: "M232.07,186.76a80,80,0,0,0-62.5-114.17A80,80,0,1,0,23.93,138.76l-7.27,24.71a16,16,0,0,0,19.87,19.87l24.71-7.27a80.39,80.39,0,0,0,25.18,7.35,80,80,0,0,0,108.34,40.65l24.71,7.27a16,16,0,0,0,19.87-19.86ZM62,159.5a8.28,8.28,0,0,0-2.26.32L32,168l8.17-27.76a8,8,0,0,0-.63-6,64,64,0,1,1,26.26,26.26A8,8,0,0,0,62,159.5Zm153.79,28.73L224,216l-27.76-8.17a8,8,0,0,0-6,.63,64.05,64.05,0,0,1-85.87-24.88A79.93,79.93,0,0,0,174.7,89.71a64,64,0,0,1,41.75,92.48A8,8,0,0,0,215.82,188.23Z",
8
- automation: "M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z",
9
- skill: "M208,144a15.78,15.78,0,0,1-10.42,14.94L146,178l-19,51.62a15.92,15.92,0,0,1-29.88,0L78,178l-51.62-19a15.92,15.92,0,0,1,0-29.88L78,110l19-51.62a15.92,15.92,0,0,1,29.88,0L146,110l51.62,19A15.78,15.78,0,0,1,208,144ZM152,48h16V64a8,8,0,0,0,16,0V48h16a8,8,0,0,0,0-16H184V16a8,8,0,0,0-16,0V32H152a8,8,0,0,0,0,16Zm88,32h-8V72a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0V96h8a8,8,0,0,0,0-16Z",
10
- action: "M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z",
11
- record: "M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z",
12
- app: "M220.27,158.54a8,8,0,0,0-7.7-.46,20,20,0,1,1,0-36.16A8,8,0,0,0,224,114.69V72a16,16,0,0,0-16-16H171.78a35.36,35.36,0,0,0,.22-4,36.11,36.11,0,0,0-11.36-26.24,36,36,0,0,0-60.55,23.62,36.56,36.56,0,0,0,.14,6.62H64A16,16,0,0,0,48,72v32.22a35.36,35.36,0,0,0-4-.22,36.12,36.12,0,0,0-26.24,11.36,35.7,35.7,0,0,0-9.69,27,36.08,36.08,0,0,0,33.31,33.6,35.68,35.68,0,0,0,6.62-.14V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V165.31A8,8,0,0,0,220.27,158.54ZM208,208H64V165.31a8,8,0,0,0-11.43-7.23,20,20,0,1,1,0-36.16A8,8,0,0,0,64,114.69V72h46.69a8,8,0,0,0,7.23-11.43,20,20,0,1,1,36.16,0A8,8,0,0,0,161.31,72H208v32.23a35.68,35.68,0,0,0-6.62-.14A36,36,0,0,0,204,176a35.36,35.36,0,0,0,4-.22Z",
13
- owner: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24ZM74.08,197.5a64,64,0,0,1,107.84,0,87.83,87.83,0,0,1-107.84,0ZM96,120a32,32,0,1,1,32,32A32,32,0,0,1,96,120Zm97.76,66.41a79.66,79.66,0,0,0-36.06-28.75,48,48,0,1,0-59.4,0,79.66,79.66,0,0,0-36.06,28.75,88,88,0,1,1,131.52,0Z",
14
- browser: "M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z",
15
- files: "M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40ZM216,200H40V88H216Z",
16
- store: "M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z",
17
- };
@@ -1,42 +0,0 @@
1
- /**
2
- * How the parts of an agent relate, read from the package's files without running anything:
3
- * which part calls which action, writes which record, uses which app, reaches the owner. The
4
- * same references the server's manifest checks, found with the SDK's own spelling
5
- * (`sc.call("x")`, `sc.records.find("x")`, `sc.tool("alias", "Action")`…). A reference to
6
- * something that is not in the package is dropped, never an error: the map shows what is true.
7
- */
8
- import { type FlowWords } from "./kinds.js";
9
- export interface PartNode {
10
- /** The file's path, or `owner` / `browser` / `files` / `store` for what a part reaches outside the package. */
11
- path: string;
12
- kind: string;
13
- /** The part's stable name (`aviso`). */
14
- name: string;
15
- /** What its kind is called to the owner ("Qué hace"). */
16
- label: string;
17
- }
18
- export type EdgeKind = "calls" | "writes" | "reads" | "uses-app" | "reaches" | "starts-from";
19
- export interface Edge {
20
- from: string;
21
- to: string;
22
- kind: EdgeKind;
23
- /** The operation or action named at the reference (`find`, `notify`, `Gmail_SendEmail`). */
24
- label?: string;
25
- /** 1-based line of the first reference in `from`. */
26
- line: number;
27
- }
28
- export interface Trigger {
29
- kind: "cron" | "webhook" | "event" | "none";
30
- /** The schedule, the path or the event type, as written. */
31
- detail: string;
32
- }
33
- /** How an automation starts: the `@sc.cron`, `@sc.webhook` or `@sc.on` over its handler. */
34
- export declare function triggerOf(path: string, source: string): Trigger | null;
35
- /**
36
- * The parts of the package and how they relate. Edges to parts that do not exist are dropped.
37
- * The `words` name the kinds and what lies outside the package (Spanish unless given).
38
- */
39
- export declare function relationsOf(files: Record<string, string>, words?: FlowWords): {
40
- nodes: PartNode[];
41
- edges: Edge[];
42
- };
@@ -1,174 +0,0 @@
1
- /**
2
- * How the parts of an agent relate, read from the package's files without running anything:
3
- * which part calls which action, writes which record, uses which app, reaches the owner. The
4
- * same references the server's manifest checks, found with the SDK's own spelling
5
- * (`sc.call("x")`, `sc.records.find("x")`, `sc.tool("alias", "Action")`…). A reference to
6
- * something that is not in the package is dropped, never an error: the map shows what is true.
7
- */
8
- import { es } from "../messages/es.js";
9
- import { kindLabel, kindOf, partName } from "./kinds.js";
10
- /** Kinds of parts that take part in the map; tests, libraries and loose files do not. */
11
- const MAPPED_KINDS = new Set([
12
- "conduct",
13
- "channels",
14
- "automations",
15
- "actions",
16
- "records",
17
- "apps",
18
- ]);
19
- /** What a part can reach outside the package, by the path an edge points at. */
20
- const OUTSIDE = ["owner", "browser", "files", "store"];
21
- const isOutside = (path) => OUTSIDE.includes(path);
22
- /**
23
- * Which characters of Python source are code: not inside a comment, and not inside a string
24
- * (its quotes count as code, its content does not). Enough to ignore `# sc.call("x")` and
25
- * `"sc.call('x')"` without a parser.
26
- */
27
- function codeMask(source) {
28
- const mask = new Array(source.length).fill(true);
29
- let i = 0;
30
- while (i < source.length) {
31
- const ch = source[i];
32
- if (ch === "#") {
33
- while (i < source.length && source[i] !== "\n")
34
- mask[i++] = false;
35
- }
36
- else if (ch === '"' || ch === "'") {
37
- const triple = source.startsWith(ch.repeat(3), i);
38
- const quote = triple ? ch.repeat(3) : ch;
39
- i += quote.length;
40
- while (i < source.length && !source.startsWith(quote, i)) {
41
- if (source[i] === "\\")
42
- mask[i++] = false;
43
- else if (!triple && source[i] === "\n")
44
- break;
45
- mask[i++] = false;
46
- }
47
- i += quote.length;
48
- }
49
- else {
50
- i++;
51
- }
52
- }
53
- return mask;
54
- }
55
- const lineAt = (source, index) => {
56
- let line = 1;
57
- for (let i = 0; i < index; i++)
58
- if (source[i] === "\n")
59
- line++;
60
- return line;
61
- };
62
- /** Every match of `pattern` that starts in code, with its line. */
63
- function hits(source, mask, pattern) {
64
- const found = [];
65
- for (const match of source.matchAll(new RegExp(pattern, `${pattern.flags}g`))) {
66
- if (mask[match.index])
67
- found.push({ match, line: lineAt(source, match.index) });
68
- }
69
- return found;
70
- }
71
- const CALL = /\bsc\.call\(\s*(["'])([\w-]+)\1/;
72
- const RECORDS = /\bsc\.records\.(add|get|update|find|remove)\(\s*(["'])([\w-]+)\2/;
73
- const TOOL = /\bsc\.tool\(\s*(["'])([\w-]+)\1(?:\s*,\s*(["'])([\w.-]+)\3)?/;
74
- const OWNER = /\bsc\.owner\.(notify|ask|approve)\(/;
75
- const SEND_VIA = /\bsc\.send\([^)]*?\bvia\s*=\s*(["'])([\w-]+)\1/;
76
- const BROWSER = /\bsc\.browser\.(open|do|read|screenshot|show|close)\(/;
77
- const FILES = /\bsc\.files\.(put|get|list|url|delete)\(/;
78
- /** The key-value store (`sc.store`), what an agent keeps when it has no record of its own. */
79
- const STORE = /\bsc\.store\.(put|get|query|delete)\(/;
80
- const DECORATOR = /^[ \t]*@sc\.(cron|webhook|on)\(\s*(["'])([^"'\n]*)\2/m;
81
- const WRITES = new Set(["add", "update", "remove", "put", "delete"]);
82
- /** The trigger of an automation and the line it is declared on. */
83
- function declaredTrigger(path, source, mask) {
84
- if (kindOf(path) !== "automations")
85
- return null;
86
- const [found] = hits(source, mask, DECORATOR);
87
- if (!found)
88
- return { trigger: { kind: "none", detail: "" }, line: 1 };
89
- const [, decorator = "", , detail = ""] = found.match;
90
- const kind = decorator === "on" ? "event" : decorator;
91
- return { trigger: { kind, detail }, line: found.line };
92
- }
93
- /** How an automation starts: the `@sc.cron`, `@sc.webhook` or `@sc.on` over its handler. */
94
- export function triggerOf(path, source) {
95
- return declaredTrigger(path, source, codeMask(source))?.trigger ?? null;
96
- }
97
- /** The references one Python file makes, before they are checked against the package. */
98
- function referencesOf(path, source) {
99
- const mask = codeMask(source);
100
- const edge = (kind, to, line, label) => ({
101
- from: path,
102
- to,
103
- kind,
104
- line,
105
- ...(label !== undefined && { label }),
106
- });
107
- const edges = [];
108
- for (const { match, line } of hits(source, mask, CALL)) {
109
- edges.push(edge("calls", `actions/${match[2]}.py`, line));
110
- }
111
- for (const { match, line } of hits(source, mask, RECORDS)) {
112
- const op = match[1] ?? "";
113
- edges.push(edge(WRITES.has(op) ? "writes" : "reads", `records/${match[3]}.py`, line, op));
114
- }
115
- for (const { match, line } of hits(source, mask, TOOL)) {
116
- edges.push(edge("uses-app", `apps/${match[2]}.yaml`, line, match[4]));
117
- }
118
- for (const { match, line } of hits(source, mask, OWNER)) {
119
- edges.push(edge("reaches", "owner", line, match[1]));
120
- }
121
- for (const { match, line } of hits(source, mask, SEND_VIA)) {
122
- edges.push(edge("reaches", `channels/${match[2]}.yaml`, line, "send"));
123
- }
124
- for (const { match, line } of hits(source, mask, BROWSER)) {
125
- edges.push(edge("reaches", "browser", line, match[1]));
126
- }
127
- for (const { match, line } of hits(source, mask, FILES)) {
128
- const op = match[1] ?? "";
129
- edges.push(edge(WRITES.has(op) ? "writes" : "reads", "files", line, op));
130
- }
131
- for (const { match, line } of hits(source, mask, STORE)) {
132
- const op = match[1] ?? "";
133
- edges.push(edge(WRITES.has(op) ? "writes" : "reads", "store", line, op));
134
- }
135
- const declared = declaredTrigger(path, source, mask);
136
- const app = declared?.trigger.kind === "event"
137
- ? /^connection\.([\w-]+)\.(.+)$/.exec(declared.trigger.detail)
138
- : null;
139
- if (declared && app) {
140
- edges.push(edge("starts-from", `apps/${app[1]}.yaml`, declared.line, app[2]));
141
- }
142
- return edges;
143
- }
144
- /**
145
- * The parts of the package and how they relate. Edges to parts that do not exist are dropped.
146
- * The `words` name the kinds and what lies outside the package (Spanish unless given).
147
- */
148
- export function relationsOf(files, words = es.flow) {
149
- // The package's parts, and a loose `.py` at the root: the old layout's one `app.py`.
150
- const paths = Object.keys(files).filter((path) => MAPPED_KINDS.has(kindOf(path)) || (!path.includes("/") && path.endsWith(".py")));
151
- const known = new Set(paths);
152
- const seen = new Set();
153
- const edges = [];
154
- for (const path of paths.filter((p) => p.endsWith(".py"))) {
155
- for (const edge of referencesOf(path, files[path] ?? "")) {
156
- const key = [edge.from, edge.to, edge.kind, edge.label].join("|");
157
- if (seen.has(key) || !(known.has(edge.to) || isOutside(edge.to)))
158
- continue;
159
- seen.add(key);
160
- edges.push(edge);
161
- }
162
- }
163
- const nodes = paths.map((path) => {
164
- const kind = kindOf(path);
165
- return { path, kind, name: partName(path, words), label: kindLabel(kind, words) };
166
- });
167
- for (const outside of OUTSIDE) {
168
- if (edges.some((edge) => edge.to === outside)) {
169
- const { label } = words.outside[outside];
170
- nodes.push({ path: outside, kind: outside, name: outside, label });
171
- }
172
- }
173
- return { nodes, edges };
174
- }