@dxos/assistant-toolkit 0.10.0 → 0.11.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 (397) hide show
  1. package/dist/lib/chunk-Chat.mjs +144 -0
  2. package/dist/lib/chunk-Chat.mjs.map +1 -0
  3. package/dist/lib/chunk-Memory.mjs +19 -0
  4. package/dist/lib/chunk-Memory.mjs.map +1 -0
  5. package/dist/lib/{neutral/agent-rules-KWCBKJ5W.mjs → chunk-agent-rules.mjs} +8 -15
  6. package/dist/lib/chunk-agent-rules.mjs.map +1 -0
  7. package/dist/lib/chunk-agent.mjs +45 -0
  8. package/dist/lib/chunk-agent.mjs.map +1 -0
  9. package/dist/lib/chunk-artifact-add.mjs +31 -0
  10. package/dist/lib/chunk-artifact-add.mjs.map +1 -0
  11. package/dist/lib/chunk-artifact-list.mjs +23 -0
  12. package/dist/lib/chunk-artifact-list.mjs.map +1 -0
  13. package/dist/lib/chunk-context-add.mjs +16 -0
  14. package/dist/lib/chunk-context-add.mjs.map +1 -0
  15. package/dist/lib/chunk-context-remove.mjs +16 -0
  16. package/dist/lib/chunk-context-remove.mjs.map +1 -0
  17. package/dist/lib/chunk-create-agent.mjs +23 -0
  18. package/dist/lib/chunk-create-agent.mjs.map +1 -0
  19. package/dist/lib/chunk-definitions.mjs +52 -0
  20. package/dist/lib/chunk-definitions.mjs.map +1 -0
  21. package/dist/lib/chunk-definitions2.mjs +56 -0
  22. package/dist/lib/chunk-definitions2.mjs.map +1 -0
  23. package/dist/lib/chunk-definitions3.mjs +24 -0
  24. package/dist/lib/chunk-definitions3.mjs.map +1 -0
  25. package/dist/lib/chunk-delete.mjs +14 -0
  26. package/dist/lib/chunk-delete.mjs.map +1 -0
  27. package/dist/lib/chunk-enable-skills.mjs +39 -0
  28. package/dist/lib/chunk-enable-skills.mjs.map +1 -0
  29. package/dist/lib/chunk-fetch-messages.mjs +113 -0
  30. package/dist/lib/chunk-fetch-messages.mjs.map +1 -0
  31. package/dist/lib/chunk-fetch.mjs +20 -0
  32. package/dist/lib/chunk-fetch.mjs.map +1 -0
  33. package/dist/lib/chunk-get-context.mjs +55 -0
  34. package/dist/lib/chunk-get-context.mjs.map +1 -0
  35. package/dist/lib/chunk-get-current-date.mjs +17 -0
  36. package/dist/lib/chunk-get-current-date.mjs.map +1 -0
  37. package/dist/lib/chunk-load.mjs +13 -0
  38. package/dist/lib/chunk-load.mjs.map +1 -0
  39. package/dist/lib/chunk-object-create.mjs +42 -0
  40. package/dist/lib/chunk-object-create.mjs.map +1 -0
  41. package/dist/lib/chunk-object-delete.mjs +14 -0
  42. package/dist/lib/chunk-object-delete.mjs.map +1 -0
  43. package/dist/lib/chunk-object-update.mjs +19 -0
  44. package/dist/lib/chunk-object-update.mjs.map +1 -0
  45. package/dist/lib/chunk-operations.mjs +714 -0
  46. package/dist/lib/chunk-operations.mjs.map +1 -0
  47. package/dist/lib/chunk-plan-reminder.mjs +80 -0
  48. package/dist/lib/chunk-plan-reminder.mjs.map +1 -0
  49. package/dist/lib/chunk-query-skills.mjs +12 -0
  50. package/dist/lib/chunk-query-skills.mjs.map +1 -0
  51. package/dist/lib/chunk-query.mjs +36 -0
  52. package/dist/lib/chunk-query.mjs.map +1 -0
  53. package/dist/lib/chunk-query2.mjs +18 -0
  54. package/dist/lib/chunk-query2.mjs.map +1 -0
  55. package/dist/lib/chunk-relation-create.mjs +41 -0
  56. package/dist/lib/chunk-relation-create.mjs.map +1 -0
  57. package/dist/lib/chunk-relation-delete.mjs +14 -0
  58. package/dist/lib/chunk-relation-delete.mjs.map +1 -0
  59. package/dist/lib/chunk-relay.mjs +76 -0
  60. package/dist/lib/chunk-relay.mjs.map +1 -0
  61. package/dist/lib/chunk-rolldown-runtime.mjs +13 -0
  62. package/dist/lib/chunk-run-instructions.mjs +145 -0
  63. package/dist/lib/chunk-run-instructions.mjs.map +1 -0
  64. package/dist/lib/chunk-save.mjs +17 -0
  65. package/dist/lib/chunk-save.mjs.map +1 -0
  66. package/dist/lib/chunk-schema-add.mjs +19 -0
  67. package/dist/lib/chunk-schema-add.mjs.map +1 -0
  68. package/dist/lib/chunk-schema-list.mjs +29 -0
  69. package/dist/lib/chunk-schema-list.mjs.map +1 -0
  70. package/dist/lib/chunk-set-alarm.mjs +55 -0
  71. package/dist/lib/chunk-set-alarm.mjs.map +1 -0
  72. package/dist/lib/chunk-sync-automation.mjs +130 -0
  73. package/dist/lib/chunk-sync-automation.mjs.map +1 -0
  74. package/dist/lib/chunk-sync-issues.mjs +127 -0
  75. package/dist/lib/chunk-sync-issues.mjs.map +1 -0
  76. package/dist/lib/chunk-sync.mjs +91 -0
  77. package/dist/lib/chunk-sync.mjs.map +1 -0
  78. package/dist/lib/chunk-tag-add.mjs +14 -0
  79. package/dist/lib/chunk-tag-add.mjs.map +1 -0
  80. package/dist/lib/chunk-tag-remove.mjs +14 -0
  81. package/dist/lib/chunk-tag-remove.mjs.map +1 -0
  82. package/dist/lib/chunk-types.mjs +198 -0
  83. package/dist/lib/chunk-types.mjs.map +1 -0
  84. package/dist/lib/chunk-update-tasks.mjs +34 -0
  85. package/dist/lib/chunk-update-tasks.mjs.map +1 -0
  86. package/dist/lib/index.mjs +614 -0
  87. package/dist/lib/index.mjs.map +1 -0
  88. package/dist/lib/testing.mjs +102 -0
  89. package/dist/lib/testing.mjs.map +1 -0
  90. package/dist/types/src/skills/agent/operations/definitions.d.ts +16 -46
  91. package/dist/types/src/skills/agent/operations/definitions.d.ts.map +1 -1
  92. package/dist/types/src/skills/agent/operations/get-context.test.d.ts +2 -0
  93. package/dist/types/src/skills/agent/operations/get-context.test.d.ts.map +1 -0
  94. package/dist/types/src/skills/agent/operations/index.d.ts.map +1 -1
  95. package/dist/types/src/skills/agent/operations/relay.d.ts +11 -0
  96. package/dist/types/src/skills/agent/operations/relay.d.ts.map +1 -0
  97. package/dist/types/src/skills/agent/operations/relay.test.d.ts +2 -0
  98. package/dist/types/src/skills/agent/operations/relay.test.d.ts.map +1 -0
  99. package/dist/types/src/skills/agent/skill.d.ts.map +1 -1
  100. package/dist/types/src/skills/agent-wizard/operations/definitions.d.ts +4 -1
  101. package/dist/types/src/skills/agent-wizard/operations/definitions.d.ts.map +1 -1
  102. package/dist/types/src/skills/agent-wizard/operations/sync-automation.d.ts +26 -0
  103. package/dist/types/src/skills/agent-wizard/operations/sync-automation.d.ts.map +1 -0
  104. package/dist/types/src/skills/agent-wizard/operations/sync-automation.test.d.ts +2 -0
  105. package/dist/types/src/skills/agent-wizard/operations/sync-automation.test.d.ts.map +1 -0
  106. package/dist/types/src/skills/agent-wizard/skill.d.ts.map +1 -1
  107. package/dist/types/src/skills/database/operations/context-add.test.d.ts +2 -0
  108. package/dist/types/src/skills/database/operations/context-add.test.d.ts.map +1 -0
  109. package/dist/types/src/skills/database/operations/context-remove.test.d.ts +2 -0
  110. package/dist/types/src/skills/database/operations/context-remove.test.d.ts.map +1 -0
  111. package/dist/types/src/skills/database/operations/definitions.d.ts +7 -2
  112. package/dist/types/src/skills/database/operations/definitions.d.ts.map +1 -1
  113. package/dist/types/src/skills/database/operations/load.test.d.ts +2 -0
  114. package/dist/types/src/skills/database/operations/load.test.d.ts.map +1 -0
  115. package/dist/types/src/skills/database/operations/object-create.d.ts +4 -1
  116. package/dist/types/src/skills/database/operations/object-create.d.ts.map +1 -1
  117. package/dist/types/src/skills/database/operations/object-create.test.d.ts +2 -0
  118. package/dist/types/src/skills/database/operations/object-create.test.d.ts.map +1 -0
  119. package/dist/types/src/skills/database/operations/object-delete.test.d.ts +2 -0
  120. package/dist/types/src/skills/database/operations/object-delete.test.d.ts.map +1 -0
  121. package/dist/types/src/skills/database/operations/object-update.test.d.ts +2 -0
  122. package/dist/types/src/skills/database/operations/object-update.test.d.ts.map +1 -0
  123. package/dist/types/src/skills/database/operations/query.test.d.ts +2 -0
  124. package/dist/types/src/skills/database/operations/query.test.d.ts.map +1 -0
  125. package/dist/types/src/skills/database/operations/relation-create.test.d.ts +2 -0
  126. package/dist/types/src/skills/database/operations/relation-create.test.d.ts.map +1 -0
  127. package/dist/types/src/skills/database/operations/schema-add.d.ts +3 -1
  128. package/dist/types/src/skills/database/operations/schema-add.test.d.ts +2 -0
  129. package/dist/types/src/skills/database/operations/schema-add.test.d.ts.map +1 -0
  130. package/dist/types/src/skills/database/operations/schema-list.test.d.ts +2 -0
  131. package/dist/types/src/skills/database/operations/schema-list.test.d.ts.map +1 -0
  132. package/dist/types/src/skills/database/operations/tag-add.test.d.ts +2 -0
  133. package/dist/types/src/skills/database/operations/tag-add.test.d.ts.map +1 -0
  134. package/dist/types/src/skills/database/operations/tag-remove.test.d.ts +2 -0
  135. package/dist/types/src/skills/database/operations/tag-remove.test.d.ts.map +1 -0
  136. package/dist/types/src/skills/delegation/operations/delegate-task.d.ts +6 -5
  137. package/dist/types/src/skills/delegation/operations/delegate-task.d.ts.map +1 -1
  138. package/dist/types/src/skills/index.d.ts +1 -0
  139. package/dist/types/src/skills/index.d.ts.map +1 -1
  140. package/dist/types/src/skills/linear/operations/sync-issues.d.ts.map +1 -1
  141. package/dist/types/src/skills/memory/operations/delete.test.d.ts +2 -0
  142. package/dist/types/src/skills/memory/operations/delete.test.d.ts.map +1 -0
  143. package/dist/types/src/skills/memory/operations/query.test.d.ts +2 -0
  144. package/dist/types/src/skills/memory/operations/query.test.d.ts.map +1 -0
  145. package/dist/types/src/skills/memory/operations/save.test.d.ts +2 -0
  146. package/dist/types/src/skills/memory/operations/save.test.d.ts.map +1 -0
  147. package/dist/types/src/skills/planning/operations/definitions.d.ts +1 -3
  148. package/dist/types/src/skills/planning/operations/definitions.d.ts.map +1 -1
  149. package/dist/types/src/skills/planning/operations/plan-reminder.d.ts +7 -6
  150. package/dist/types/src/skills/planning/operations/plan-reminder.d.ts.map +1 -1
  151. package/dist/types/src/skills/planning/operations/plan-reminder.test.d.ts +2 -0
  152. package/dist/types/src/skills/planning/operations/plan-reminder.test.d.ts.map +1 -0
  153. package/dist/types/src/skills/planning/operations/update-tasks.d.ts +3 -1
  154. package/dist/types/src/skills/planning/operations/update-tasks.d.ts.map +1 -1
  155. package/dist/types/src/skills/project/index.d.ts +3 -0
  156. package/dist/types/src/skills/project/index.d.ts.map +1 -0
  157. package/dist/types/src/skills/project/operations/artifact-add.d.ts +5 -0
  158. package/dist/types/src/skills/project/operations/artifact-add.d.ts.map +1 -0
  159. package/dist/types/src/skills/project/operations/artifact-list.d.ts +5 -0
  160. package/dist/types/src/skills/project/operations/artifact-list.d.ts.map +1 -0
  161. package/dist/types/src/skills/project/operations/definitions.d.ts +23 -0
  162. package/dist/types/src/skills/project/operations/definitions.d.ts.map +1 -0
  163. package/dist/types/src/skills/project/operations/index.d.ts +4 -0
  164. package/dist/types/src/skills/project/operations/index.d.ts.map +1 -0
  165. package/dist/types/src/skills/project/skill.d.ts +4 -0
  166. package/dist/types/src/skills/project/skill.d.ts.map +1 -0
  167. package/dist/types/src/skills/project/skill.test.d.ts.map +1 -0
  168. package/dist/types/src/skills/skill-manager/skill.d.ts.map +1 -1
  169. package/dist/types/src/supervisor/delegation-strategy.d.ts +5 -5
  170. package/dist/types/src/supervisor/delegation-strategy.d.ts.map +1 -1
  171. package/dist/types/src/supervisor/delegation-strategy.test.d.ts +2 -0
  172. package/dist/types/src/supervisor/delegation-strategy.test.d.ts.map +1 -0
  173. package/dist/types/src/sync/sync.test.d.ts +2 -0
  174. package/dist/types/src/sync/sync.test.d.ts.map +1 -0
  175. package/dist/types/src/testing/index.d.ts +1 -0
  176. package/dist/types/src/testing/index.d.ts.map +1 -1
  177. package/dist/types/src/testing/operations.d.ts +7 -0
  178. package/dist/types/src/testing/operations.d.ts.map +1 -0
  179. package/dist/types/src/types/Agent.d.ts +28 -31
  180. package/dist/types/src/types/Agent.d.ts.map +1 -1
  181. package/dist/types/src/types/Chat.d.ts +28 -14
  182. package/dist/types/src/types/Chat.d.ts.map +1 -1
  183. package/dist/types/src/types/Chat.test.d.ts +2 -0
  184. package/dist/types/src/types/Chat.test.d.ts.map +1 -0
  185. package/dist/types/src/types/index.d.ts +1 -2
  186. package/dist/types/src/types/index.d.ts.map +1 -1
  187. package/dist/types/tsconfig.tsbuildinfo +1 -1
  188. package/package.json +30 -29
  189. package/src/operations/run-instructions.test.ts +26 -34
  190. package/src/operations/skill-resolution.test.ts +6 -1
  191. package/src/skills/agent/operations/definitions.ts +18 -62
  192. package/src/skills/agent/operations/get-context.test.ts +81 -0
  193. package/src/skills/agent/operations/get-context.ts +9 -36
  194. package/src/skills/agent/operations/index.ts +1 -3
  195. package/src/skills/agent/operations/relay.test.ts +63 -0
  196. package/src/skills/agent/operations/relay.ts +124 -0
  197. package/src/skills/agent/skill.ts +3 -15
  198. package/src/skills/agent-wizard/operations/create-agent.ts +3 -3
  199. package/src/skills/agent-wizard/operations/definitions.ts +19 -4
  200. package/src/skills/agent-wizard/operations/index.ts +1 -1
  201. package/src/skills/agent-wizard/operations/sync-automation.test.ts +103 -0
  202. package/src/skills/agent-wizard/operations/sync-automation.ts +205 -0
  203. package/src/skills/agent-wizard/skill.ts +9 -10
  204. package/src/skills/alarm/skill.test.ts +2 -2
  205. package/src/skills/browser/skill.test.ts +4 -4
  206. package/src/skills/database/operations/context-add.test.ts +46 -0
  207. package/src/skills/database/operations/context-remove.test.ts +46 -0
  208. package/src/skills/database/operations/definitions.ts +23 -7
  209. package/src/skills/database/operations/load.test.ts +38 -0
  210. package/src/skills/database/operations/object-create.test.ts +116 -0
  211. package/src/skills/database/operations/object-create.ts +13 -2
  212. package/src/skills/database/operations/object-delete.test.ts +37 -0
  213. package/src/skills/database/operations/object-update.test.ts +39 -0
  214. package/src/skills/database/operations/query.test.ts +128 -0
  215. package/src/skills/database/operations/relation-create.test.ts +46 -0
  216. package/src/skills/database/operations/schema-add.test.ts +79 -0
  217. package/src/skills/database/operations/schema-list.test.ts +42 -0
  218. package/src/skills/database/operations/tag-add.test.ts +41 -0
  219. package/src/skills/database/operations/tag-remove.test.ts +43 -0
  220. package/src/skills/delegation/operations/delegate-task.test.ts +51 -36
  221. package/src/skills/delegation/operations/delegate-task.ts +31 -48
  222. package/src/skills/discord/operations/fetch-messages.test.ts +2 -2
  223. package/src/skills/github/operations/fetch-prs.ts +1 -1
  224. package/src/skills/index.ts +1 -0
  225. package/src/skills/linear/operations/linear.test.ts +1 -1
  226. package/src/skills/linear/operations/sync-issues.ts +6 -23
  227. package/src/skills/memory/operations/delete.test.ts +37 -0
  228. package/src/skills/memory/operations/query.test.ts +76 -0
  229. package/src/skills/memory/operations/save.test.ts +43 -0
  230. package/src/skills/planning/operations/definitions.ts +9 -6
  231. package/src/skills/planning/operations/plan-reminder.test.ts +123 -0
  232. package/src/skills/planning/operations/plan-reminder.ts +49 -31
  233. package/src/skills/planning/operations/update-tasks.md +23 -22
  234. package/src/skills/planning/operations/update-tasks.test.ts +31 -17
  235. package/src/skills/planning/operations/update-tasks.ts +17 -25
  236. package/src/skills/project/index.ts +6 -0
  237. package/src/skills/project/operations/artifact-add.ts +47 -0
  238. package/src/skills/project/operations/artifact-list.ts +41 -0
  239. package/src/skills/project/operations/definitions.ts +63 -0
  240. package/src/skills/project/operations/index.ts +12 -0
  241. package/src/skills/project/skill.test.ts +78 -0
  242. package/src/skills/project/skill.ts +42 -0
  243. package/src/skills/skill-manager/operations/definitions.ts +1 -1
  244. package/src/skills/skill-manager/skill.test.ts +1 -1
  245. package/src/skills/skill-manager/skill.ts +7 -5
  246. package/src/skills/websearch/skill.test.ts +2 -2
  247. package/src/supervisor/delegation-strategy.test.ts +129 -0
  248. package/src/supervisor/delegation-strategy.ts +92 -56
  249. package/src/sync/sync.test.ts +95 -0
  250. package/src/sync/sync.ts +5 -3
  251. package/src/testing/index.ts +1 -0
  252. package/src/testing/operations.ts +65 -0
  253. package/src/types/Agent.test.ts +36 -66
  254. package/src/types/Agent.ts +108 -137
  255. package/src/types/Chat.test.ts +234 -0
  256. package/src/types/Chat.ts +80 -26
  257. package/src/types/index.ts +1 -2
  258. package/dist/lib/neutral/add-artifact-5JNUYLCA.mjs +0 -24
  259. package/dist/lib/neutral/add-artifact-5JNUYLCA.mjs.map +0 -7
  260. package/dist/lib/neutral/agent-BFAYIBJI.mjs +0 -65
  261. package/dist/lib/neutral/agent-BFAYIBJI.mjs.map +0 -7
  262. package/dist/lib/neutral/agent-rules-KWCBKJ5W.mjs.map +0 -7
  263. package/dist/lib/neutral/chunk-3KA66YBF.mjs +0 -62
  264. package/dist/lib/neutral/chunk-3KA66YBF.mjs.map +0 -7
  265. package/dist/lib/neutral/chunk-6SGNFL6I.mjs +0 -85
  266. package/dist/lib/neutral/chunk-6SGNFL6I.mjs.map +0 -7
  267. package/dist/lib/neutral/chunk-BDTGFPM7.mjs +0 -113
  268. package/dist/lib/neutral/chunk-BDTGFPM7.mjs.map +0 -7
  269. package/dist/lib/neutral/chunk-EPQCDGIV.mjs +0 -27
  270. package/dist/lib/neutral/chunk-EPQCDGIV.mjs.map +0 -7
  271. package/dist/lib/neutral/chunk-H4W22FFJ.mjs +0 -232
  272. package/dist/lib/neutral/chunk-H4W22FFJ.mjs.map +0 -7
  273. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
  274. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
  275. package/dist/lib/neutral/chunk-JBTXZQ5G.mjs +0 -60
  276. package/dist/lib/neutral/chunk-JBTXZQ5G.mjs.map +0 -7
  277. package/dist/lib/neutral/chunk-JKOOA5OS.mjs +0 -97
  278. package/dist/lib/neutral/chunk-JKOOA5OS.mjs.map +0 -7
  279. package/dist/lib/neutral/chunk-JTEBE7KA.mjs +0 -66
  280. package/dist/lib/neutral/chunk-JTEBE7KA.mjs.map +0 -7
  281. package/dist/lib/neutral/chunk-KLFXJ2Z3.mjs +0 -36
  282. package/dist/lib/neutral/chunk-KLFXJ2Z3.mjs.map +0 -7
  283. package/dist/lib/neutral/chunk-LBA5UOLF.mjs +0 -87
  284. package/dist/lib/neutral/chunk-LBA5UOLF.mjs.map +0 -7
  285. package/dist/lib/neutral/chunk-LL3MOQUZ.mjs +0 -120
  286. package/dist/lib/neutral/chunk-LL3MOQUZ.mjs.map +0 -7
  287. package/dist/lib/neutral/chunk-MFVIGJBW.mjs +0 -68
  288. package/dist/lib/neutral/chunk-MFVIGJBW.mjs.map +0 -7
  289. package/dist/lib/neutral/chunk-PBARVBNJ.mjs +0 -86
  290. package/dist/lib/neutral/chunk-PBARVBNJ.mjs.map +0 -7
  291. package/dist/lib/neutral/chunk-VJ5QBYM5.mjs +0 -61
  292. package/dist/lib/neutral/chunk-VJ5QBYM5.mjs.map +0 -7
  293. package/dist/lib/neutral/chunk-YQSQRSXG.mjs +0 -367
  294. package/dist/lib/neutral/chunk-YQSQRSXG.mjs.map +0 -7
  295. package/dist/lib/neutral/chunk-Z2HFOZXK.mjs +0 -191
  296. package/dist/lib/neutral/chunk-Z2HFOZXK.mjs.map +0 -7
  297. package/dist/lib/neutral/context-add-DZTPB3FK.mjs +0 -22
  298. package/dist/lib/neutral/context-add-DZTPB3FK.mjs.map +0 -7
  299. package/dist/lib/neutral/context-remove-XSBOM4VJ.mjs +0 -22
  300. package/dist/lib/neutral/context-remove-XSBOM4VJ.mjs.map +0 -7
  301. package/dist/lib/neutral/create-agent-5WTOFIEK.mjs +0 -35
  302. package/dist/lib/neutral/create-agent-5WTOFIEK.mjs.map +0 -7
  303. package/dist/lib/neutral/definitions-VRR5OGXI.mjs +0 -17
  304. package/dist/lib/neutral/definitions-VRR5OGXI.mjs.map +0 -7
  305. package/dist/lib/neutral/delegate-task-UX64NK4M.mjs +0 -13
  306. package/dist/lib/neutral/delegate-task-UX64NK4M.mjs.map +0 -7
  307. package/dist/lib/neutral/delete-IU7HPU3K.mjs +0 -19
  308. package/dist/lib/neutral/delete-IU7HPU3K.mjs.map +0 -7
  309. package/dist/lib/neutral/enable-skills-FHEJXQVB.mjs +0 -47
  310. package/dist/lib/neutral/enable-skills-FHEJXQVB.mjs.map +0 -7
  311. package/dist/lib/neutral/fetch-5LY25EBR.mjs +0 -24
  312. package/dist/lib/neutral/fetch-5LY25EBR.mjs.map +0 -7
  313. package/dist/lib/neutral/fetch-messages-CQMDI36G.mjs +0 -139
  314. package/dist/lib/neutral/fetch-messages-CQMDI36G.mjs.map +0 -7
  315. package/dist/lib/neutral/get-context-Q4YY6DRV.mjs +0 -77
  316. package/dist/lib/neutral/get-context-Q4YY6DRV.mjs.map +0 -7
  317. package/dist/lib/neutral/get-current-date-JR5F7ZS3.mjs +0 -17
  318. package/dist/lib/neutral/get-current-date-JR5F7ZS3.mjs.map +0 -7
  319. package/dist/lib/neutral/index.mjs +0 -875
  320. package/dist/lib/neutral/index.mjs.map +0 -7
  321. package/dist/lib/neutral/load-S6HC5TGX.mjs +0 -17
  322. package/dist/lib/neutral/load-S6HC5TGX.mjs.map +0 -7
  323. package/dist/lib/neutral/meta.json +0 -1
  324. package/dist/lib/neutral/object-create-PVDQ62CG.mjs +0 -32
  325. package/dist/lib/neutral/object-create-PVDQ62CG.mjs.map +0 -7
  326. package/dist/lib/neutral/object-delete-3CSL6XI6.mjs +0 -18
  327. package/dist/lib/neutral/object-delete-3CSL6XI6.mjs.map +0 -7
  328. package/dist/lib/neutral/object-update-NIGMZINM.mjs +0 -28
  329. package/dist/lib/neutral/object-update-NIGMZINM.mjs.map +0 -7
  330. package/dist/lib/neutral/plan-reminder-N4X6JPBI.mjs +0 -88
  331. package/dist/lib/neutral/plan-reminder-N4X6JPBI.mjs.map +0 -7
  332. package/dist/lib/neutral/qualifier-5CIRZYX5.mjs +0 -91
  333. package/dist/lib/neutral/qualifier-5CIRZYX5.mjs.map +0 -7
  334. package/dist/lib/neutral/query-K4R7UHLU.mjs +0 -32
  335. package/dist/lib/neutral/query-K4R7UHLU.mjs.map +0 -7
  336. package/dist/lib/neutral/query-NCTCRYTD.mjs +0 -59
  337. package/dist/lib/neutral/query-NCTCRYTD.mjs.map +0 -7
  338. package/dist/lib/neutral/query-skills-7GQFSU4V.mjs +0 -17
  339. package/dist/lib/neutral/query-skills-7GQFSU4V.mjs.map +0 -7
  340. package/dist/lib/neutral/relation-create-QKXHTL7G.mjs +0 -34
  341. package/dist/lib/neutral/relation-create-QKXHTL7G.mjs.map +0 -7
  342. package/dist/lib/neutral/relation-delete-PDIWT2JX.mjs +0 -18
  343. package/dist/lib/neutral/relation-delete-PDIWT2JX.mjs.map +0 -7
  344. package/dist/lib/neutral/run-instructions-72ASH5EZ.mjs +0 -165
  345. package/dist/lib/neutral/run-instructions-72ASH5EZ.mjs.map +0 -7
  346. package/dist/lib/neutral/save-UYVRA4RS.mjs +0 -23
  347. package/dist/lib/neutral/save-UYVRA4RS.mjs.map +0 -7
  348. package/dist/lib/neutral/schema-add-5NOK2RWE.mjs +0 -25
  349. package/dist/lib/neutral/schema-add-5NOK2RWE.mjs.map +0 -7
  350. package/dist/lib/neutral/schema-list-BZUR5KMX.mjs +0 -37
  351. package/dist/lib/neutral/schema-list-BZUR5KMX.mjs.map +0 -7
  352. package/dist/lib/neutral/set-alarm-BD3NEYSU.mjs +0 -65
  353. package/dist/lib/neutral/set-alarm-BD3NEYSU.mjs.map +0 -7
  354. package/dist/lib/neutral/sync-issues-O76MCMD3.mjs +0 -166
  355. package/dist/lib/neutral/sync-issues-O76MCMD3.mjs.map +0 -7
  356. package/dist/lib/neutral/sync-triggers-YBTLPCUB.mjs +0 -138
  357. package/dist/lib/neutral/sync-triggers-YBTLPCUB.mjs.map +0 -7
  358. package/dist/lib/neutral/tag-add-L5WNOBYY.mjs +0 -18
  359. package/dist/lib/neutral/tag-add-L5WNOBYY.mjs.map +0 -7
  360. package/dist/lib/neutral/tag-remove-WV5RPE5W.mjs +0 -18
  361. package/dist/lib/neutral/tag-remove-WV5RPE5W.mjs.map +0 -7
  362. package/dist/lib/neutral/testing/index.mjs +0 -65
  363. package/dist/lib/neutral/testing/index.mjs.map +0 -7
  364. package/dist/lib/neutral/update-tasks-HX4ILWOU.mjs +0 -46
  365. package/dist/lib/neutral/update-tasks-HX4ILWOU.mjs.map +0 -7
  366. package/dist/types/src/skills/agent/operations/add-artifact.d.ts +0 -4
  367. package/dist/types/src/skills/agent/operations/add-artifact.d.ts.map +0 -1
  368. package/dist/types/src/skills/agent/operations/agent.d.ts +0 -4
  369. package/dist/types/src/skills/agent/operations/agent.d.ts.map +0 -1
  370. package/dist/types/src/skills/agent/operations/qualifier.d.ts +0 -5
  371. package/dist/types/src/skills/agent/operations/qualifier.d.ts.map +0 -1
  372. package/dist/types/src/skills/agent/skill.test.d.ts.map +0 -1
  373. package/dist/types/src/skills/agent-wizard/operations/sync-triggers.d.ts +0 -8
  374. package/dist/types/src/skills/agent-wizard/operations/sync-triggers.d.ts.map +0 -1
  375. package/dist/types/src/skills/database/skill.test.d.ts +0 -2
  376. package/dist/types/src/skills/database/skill.test.d.ts.map +0 -1
  377. package/dist/types/src/skills/memory/skill.test.d.ts +0 -2
  378. package/dist/types/src/skills/memory/skill.test.d.ts.map +0 -1
  379. package/dist/types/src/skills/planning/skill.test.d.ts +0 -2
  380. package/dist/types/src/skills/planning/skill.test.d.ts.map +0 -1
  381. package/dist/types/src/types/Plan.d.ts +0 -80
  382. package/dist/types/src/types/Plan.d.ts.map +0 -1
  383. package/src/operations/run-instructions.conversations.json +0 -1
  384. package/src/skills/agent/operations/add-artifact.ts +0 -20
  385. package/src/skills/agent/operations/agent.ts +0 -69
  386. package/src/skills/agent/operations/qualifier.ts +0 -97
  387. package/src/skills/agent/skill.conversations.json +0 -1
  388. package/src/skills/agent/skill.test.ts +0 -728
  389. package/src/skills/agent-wizard/operations/sync-triggers.ts +0 -169
  390. package/src/skills/database/skill.conversations.json +0 -1
  391. package/src/skills/database/skill.test.ts +0 -531
  392. package/src/skills/memory/skill.conversations.json +0 -1
  393. package/src/skills/memory/skill.test.ts +0 -138
  394. package/src/skills/planning/skill.conversations.json +0 -1
  395. package/src/skills/planning/skill.test.ts +0 -123
  396. package/src/types/Plan.ts +0 -123
  397. /package/dist/types/src/skills/{agent → project}/skill.test.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/assistant-toolkit",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "Assistant toolkit, definitions, and utilities.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -15,12 +15,12 @@
15
15
  ".": {
16
16
  "source": "./src/index.ts",
17
17
  "types": "./dist/types/src/index.d.ts",
18
- "default": "./dist/lib/neutral/index.mjs"
18
+ "import": "./dist/lib/index.mjs"
19
19
  },
20
20
  "./testing": {
21
21
  "source": "./src/testing/index.ts",
22
22
  "types": "./dist/types/src/testing/index.d.ts",
23
- "default": "./dist/lib/neutral/testing/index.mjs"
23
+ "import": "./dist/lib/testing.mjs"
24
24
  }
25
25
  },
26
26
  "files": [
@@ -33,42 +33,43 @@
33
33
  "@effect/platform": "0.96.2",
34
34
  "dfx": "^0.127.0",
35
35
  "exa-js": "^1.5.12",
36
- "@dxos/ai": "0.10.0",
37
- "@dxos/app-framework": "0.10.0",
38
- "@dxos/assistant": "0.10.0",
39
- "@dxos/client-protocol": "0.10.0",
40
- "@dxos/echo": "0.10.0",
41
- "@dxos/app-toolkit": "0.10.0",
42
- "@dxos/compute": "0.10.0",
43
- "@dxos/compute-runtime": "0.10.0",
44
- "@dxos/edge-client": "0.10.0",
45
- "@dxos/errors": "0.10.0",
46
- "@dxos/echo-protocol": "0.10.0",
47
- "@dxos/functions": "0.10.0",
48
- "@dxos/effect": "0.10.0",
49
- "@dxos/invariant": "0.10.0",
50
- "@dxos/functions-runtime": "0.10.0",
51
- "@dxos/react-ui": "0.10.0",
52
- "@dxos/keys": "0.10.0",
53
- "@dxos/react-ui-syntax-highlighter": "0.10.0",
54
- "@dxos/schema": "0.10.0",
55
- "@dxos/types": "0.10.0",
56
- "@dxos/util": "0.10.0",
57
- "@dxos/log": "0.10.0"
36
+ "@dxos/agent-runtime": "0.11.1",
37
+ "@dxos/ai": "0.11.1",
38
+ "@dxos/app-framework": "0.11.1",
39
+ "@dxos/app-toolkit": "0.11.1",
40
+ "@dxos/assistant": "0.11.1",
41
+ "@dxos/client-protocol": "0.11.1",
42
+ "@dxos/compute": "0.11.1",
43
+ "@dxos/echo": "0.11.1",
44
+ "@dxos/echo-protocol": "0.11.1",
45
+ "@dxos/compute-runtime": "0.11.1",
46
+ "@dxos/edge-client": "0.11.1",
47
+ "@dxos/effect": "0.11.1",
48
+ "@dxos/errors": "0.11.1",
49
+ "@dxos/invariant": "0.11.1",
50
+ "@dxos/keys": "0.11.1",
51
+ "@dxos/log": "0.11.1",
52
+ "@dxos/protocols": "0.11.1",
53
+ "@dxos/react-ui": "0.11.1",
54
+ "@dxos/react-ui-syntax-highlighter": "0.11.1",
55
+ "@dxos/schema": "0.11.1",
56
+ "@dxos/types": "0.11.1",
57
+ "@dxos/util": "0.11.1"
58
58
  },
59
59
  "devDependencies": {
60
60
  "effect": "3.21.4",
61
61
  "react": "~19.2.7",
62
62
  "react-dom": "~19.2.7",
63
- "@dxos/client-protocol": "0.10.0",
64
- "@dxos/plugin-markdown": "0.10.0",
65
- "@dxos/ui-theme": "0.10.0"
63
+ "@dxos/echo-client": "0.11.1",
64
+ "@dxos/plugin-markdown": "0.11.1",
65
+ "@dxos/ui-theme": "0.11.1",
66
+ "@dxos/client-protocol": "0.11.1"
66
67
  },
67
68
  "peerDependencies": {
68
69
  "effect": "3.21.4",
69
70
  "react": "~19.2.7",
70
71
  "react-dom": "~19.2.7",
71
- "@dxos/ui-theme": "0.10.0"
72
+ "@dxos/ui-theme": "^0.11.1"
72
73
  },
73
74
  "publishConfig": {
74
75
  "access": "public"
@@ -6,31 +6,37 @@ import { describe, expect, it } from '@effect/vitest';
6
6
  import * as Effect from 'effect/Effect';
7
7
  import * as Schema from 'effect/Schema';
8
8
 
9
+ import { AssistantTestLayer } from '@dxos/agent-runtime/testing';
10
+ import { ScriptedLanguageModel } from '@dxos/ai/testing';
9
11
  import { AiContext } from '@dxos/assistant';
10
12
  import { Instructions, Operation, OperationHandlerSet } from '@dxos/compute';
11
13
  import { Database, Feed, Filter, JsonSchema, Obj, Ref } from '@dxos/echo';
12
14
  import { TestHelpers } from '@dxos/effect/testing';
13
- import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
14
15
  import { EntityId } from '@dxos/keys';
15
16
  import { Text } from '@dxos/schema';
16
- import { Message } from '@dxos/types';
17
+ import { Message, Outline } from '@dxos/types';
17
18
 
18
19
  import * as Chat from '../types/Chat';
19
- import * as Plan from '../types/Plan';
20
20
  import { RunInstructions } from './definitions';
21
21
  import defaultAgentPrompt from './run-instructions';
22
22
 
23
23
  EntityId.dangerouslyDisableRandomness();
24
24
 
25
- const operationHandlerSet = OperationHandlerSet.make(defaultAgentPrompt);
26
-
27
- const TestLayer = AssistantTestLayer({
28
- operationHandlers: operationHandlerSet,
29
- types: [Chat.Chat, Message.Message, AiContext.Binding, Text.Text, Plan.Plan],
30
- aiServicePreset: 'edge-remote',
31
- });
25
+ // The agent finishes by calling `completeJob`; scripting that call drives the whole operation
26
+ // without a live model, so what is asserted is the operation's own behaviour rather than the
27
+ // model's. A scripted turn replaces the memoized conversation this file used to replay.
28
+ const layerWithResult = (success: unknown) =>
29
+ AssistantTestLayer({
30
+ operationHandlers: OperationHandlerSet.make(defaultAgentPrompt),
31
+ types: [Chat.Chat, Message.Message, AiContext.Binding, Text.Text, Outline.Outline],
32
+ aiService: ScriptedLanguageModel.scriptedAiService([
33
+ { parts: [ScriptedLanguageModel.toolCall('completeJob', { success })] },
34
+ // The loop asks again once the tool result is fed back; a text-only turn stops it.
35
+ { parts: [ScriptedLanguageModel.text('Done.')] },
36
+ ]),
37
+ });
32
38
 
33
- describe('Agent prompt', () => {
39
+ describe('RunInstructions', () => {
34
40
  it.effect(
35
41
  'chat mode appends assistant messages to the chat queue',
36
42
  Effect.fnUntraced(
@@ -38,12 +44,7 @@ describe('Agent prompt', () => {
38
44
  const feed = yield* Database.add(Feed.make());
39
45
  const messageCountBefore = yield* countFeedMessages(feed);
40
46
 
41
- const chat = yield* Database.add(
42
- Chat.make({
43
- feed: Ref.make(feed),
44
- }),
45
- );
46
-
47
+ const chat = yield* Database.add(Chat.make({ feed: Ref.make(feed) }));
47
48
  const instructions = yield* Database.add(
48
49
  Instructions.make({
49
50
  name: 'chat-mode-test',
@@ -52,7 +53,6 @@ describe('Agent prompt', () => {
52
53
  output: Schema.String,
53
54
  }),
54
55
  );
55
-
56
56
  yield* Database.flush();
57
57
 
58
58
  const result = yield* Operation.invoke(RunInstructions, {
@@ -62,34 +62,28 @@ describe('Agent prompt', () => {
62
62
  });
63
63
 
64
64
  const messageCountAfter = yield* countFeedMessages(feed);
65
-
66
65
  expect(messageCountAfter).toBeGreaterThan(messageCountBefore);
67
66
  expect(result).toBe('ack');
68
67
  },
69
- Effect.provide(TestLayer),
68
+ Effect.provide(layerWithResult('ack')),
70
69
  TestHelpers.provideTestContext,
71
70
  ),
72
- { timeout: 60_000 },
73
71
  );
74
72
 
75
73
  it.effect(
76
- 'generates an object conforming to the instructions output schema',
74
+ 'returns an object conforming to the instructions output schema',
77
75
  Effect.fnUntraced(
78
76
  function* (_) {
79
- const Person = Schema.Struct({
80
- name: Schema.String,
81
- age: Schema.Number,
82
- });
77
+ const Person = Schema.Struct({ name: Schema.String, age: Schema.Number });
83
78
 
84
79
  const instructions = yield* Database.add(
85
80
  Instructions.make({
86
81
  name: 'output-schema-test',
87
- text: 'Invent a fictional person and call completeJob with the success object describing them (name and age).',
82
+ text: 'Invent a fictional person and call completeJob with the success object describing them.',
88
83
  output: Person,
89
84
  skills: [],
90
85
  }),
91
86
  );
92
-
93
87
  yield* Database.flush();
94
88
 
95
89
  const result = yield* Operation.invoke(RunInstructions, {
@@ -97,17 +91,15 @@ describe('Agent prompt', () => {
97
91
  input: {},
98
92
  });
99
93
 
100
- // The instructions persists its declared output as a JSON schema; decode it back and assert the
101
- // agent-produced object satisfies that schema.
94
+ // The instructions persist their declared output as a JSON schema; decode it back and assert
95
+ // the returned object satisfies that schema.
102
96
  const outputSchema = JsonSchema.toEffectSchema(instructions.output);
103
97
  const decoded = Schema.decodeUnknownSync(outputSchema)(result);
104
- expect(typeof decoded.name).toBe('string');
105
- expect(typeof decoded.age).toBe('number');
98
+ expect(decoded).toEqual({ name: 'Ada Lovelace', age: 36 });
106
99
  },
107
- Effect.provide(TestLayer),
100
+ Effect.provide(layerWithResult({ name: 'Ada Lovelace', age: 36 })),
108
101
  TestHelpers.provideTestContext,
109
102
  ),
110
- { timeout: 60_000 },
111
103
  );
112
104
  });
113
105
 
@@ -6,11 +6,11 @@ import { describe, it } from '@effect/vitest';
6
6
  import * as Duration from 'effect/Duration';
7
7
  import * as Effect from 'effect/Effect';
8
8
 
9
+ import { AssistantTestLayer } from '@dxos/agent-runtime/testing';
9
10
  import { AiContext } from '@dxos/assistant';
10
11
  import { Instructions, Skill } from '@dxos/compute';
11
12
  import { Database, Feed, Ref } from '@dxos/echo';
12
13
  import { TestHelpers } from '@dxos/effect/testing';
13
- import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
14
14
  import { Text } from '@dxos/schema';
15
15
 
16
16
  import { WebSearchSkill } from '../skills';
@@ -111,6 +111,11 @@ describe('Skill binding resolution (registry refs)', () => {
111
111
  yield* Effect.promise(() => writer.open());
112
112
  yield* Effect.promise(() => writer.bind({ skills: [Ref.make(skill)], objects: [] }));
113
113
 
114
+ // Model a spawned process reading the feed cold: drop the in-memory feed handle so the
115
+ // reader re-decodes the binding freshly, without the writer's identity-preserved instance
116
+ // (whose ref still carries the in-memory skill target).
117
+ yield* Effect.promise(() => db.evictFeedHandle(feed));
118
+
114
119
  const reader = new AiContext.Binder({ feed, runtime });
115
120
  yield* Effect.promise(() => reader.open()).pipe(
116
121
  Effect.timeoutFail({
@@ -4,50 +4,33 @@
4
4
 
5
5
  import * as Schema from 'effect/Schema';
6
6
 
7
- import { AiService, OpaqueToolkit } from '@dxos/ai';
7
+ import { AiService } from '@dxos/ai';
8
8
  import { Harness } from '@dxos/assistant';
9
- import { Operation, Trace, TriggerEvent } from '@dxos/compute';
10
- import { Database, Ref, Registry } from '@dxos/echo';
9
+ import { Operation, TriggerEvent } from '@dxos/compute';
10
+ import { AgentService } from '@dxos/compute/AgentService';
11
+ import { Database, Ref } from '@dxos/echo';
11
12
  import { DXN } from '@dxos/keys';
12
13
 
13
- import { Agent } from '../../../types';
14
+ import { Chat } from '../../../types';
14
15
 
15
- export const AgentWorker = Operation.make({
16
+ export const Relay = Operation.make({
16
17
  meta: {
17
- key: DXN.make('org.dxos.function.agent.worker'),
18
- name: 'Agent Worker',
19
- description: 'Agentic worker that drives the agent autonomously.',
20
- icon: 'ph--brain--regular',
21
- },
22
- input: Schema.Struct({
23
- agent: Schema.suspend(() => Ref.Ref(Agent.Agent)),
24
- prompt: Schema.optional(Schema.String),
25
- event: Schema.optional(TriggerEvent.TriggerEvent),
26
- }),
27
- output: Schema.Void,
28
- services: [
29
- AiService.AiService,
30
- Database.Service,
31
- Registry.Service,
32
- Trace.TraceService,
33
- OpaqueToolkit.OpaqueToolkitProvider,
34
- ],
35
- });
36
-
37
- export const Qualifier = Operation.make({
38
- meta: {
39
- key: DXN.make('org.dxos.function.agent.qualifier'),
40
- name: 'Agent Qualifier',
41
- description:
42
- 'Qualifier that determines if the event is relevant to the agent. Puts the data into the input queue of the agent.',
18
+ key: DXN.make('org.dxos.function.agent.relay'),
19
+ name: 'Agent Relay',
20
+ description: 'Qualifies a subscription event with a cheap model and forwards it onto the durable agent session.',
43
21
  icon: 'ph--funnel--regular',
44
22
  },
45
23
  input: Schema.Struct({
46
- agent: Schema.suspend(() => Ref.Ref(Agent.Agent)),
47
- event: TriggerEvent.TriggerEvent,
24
+ /** The chat whose durable session receives the event (carries feed, instructions, and agent). */
25
+ chat: Schema.suspend(() => Ref.Ref(Chat.Chat)),
26
+ event: Schema.optional(TriggerEvent.TriggerEvent),
27
+ /** Synthetic wake prompt (e.g. a cron tick) delivered instead of an event payload. */
28
+ prompt: Schema.optional(Schema.String),
29
+ /** Skip the cheap-model relevance check (default: qualify when an event is present). */
30
+ qualify: Schema.optional(Schema.Boolean),
48
31
  }),
49
32
  output: Schema.Void,
50
- services: [AiService.AiService, Database.Service],
33
+ services: [AiService.AiService, Database.Service, AgentService],
51
34
  });
52
35
 
53
36
  export const GetContext = Operation.make({
@@ -62,34 +45,7 @@ export const GetContext = Operation.make({
62
45
  id: Schema.String,
63
46
  name: Schema.String,
64
47
  instructions: Schema.String,
65
- plan: Schema.String,
66
- artifacts: Schema.Array(
67
- Schema.Struct({
68
- name: Schema.String,
69
- type: Schema.optional(Schema.String),
70
- dxn: Schema.optional(Schema.String),
71
- }),
72
- ),
48
+ checklist: Schema.String,
73
49
  }),
74
50
  services: [Harness.HarnessService, Database.Service],
75
51
  });
76
-
77
- export const AddArtifact = Operation.make({
78
- meta: {
79
- key: DXN.make('org.dxos.function.agent.addArtifact'),
80
- name: 'Add artifact',
81
- description: 'Adds a new artifact.',
82
- icon: 'ph--plus--regular',
83
- },
84
- input: Schema.Struct({
85
- name: Schema.String.annotations({
86
- description: 'The name of the artifact to add.',
87
- }),
88
- artifact: Schema.String.annotations({
89
- description:
90
- 'The id of the artifact to add, exactly as returned by the tool that created it. Do NOT guess or generate the id.',
91
- }),
92
- }),
93
- output: Schema.Void,
94
- services: [Harness.HarnessService, Database.Service],
95
- });
@@ -0,0 +1,81 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, expect, it } from '@effect/vitest';
6
+ import * as Effect from 'effect/Effect';
7
+
8
+ import { AiContext } from '@dxos/assistant';
9
+ import { Operation } from '@dxos/compute';
10
+ import { Database, Obj, Ref } from '@dxos/echo';
11
+ import { TestHelpers } from '@dxos/effect/testing';
12
+ import { invariant } from '@dxos/invariant';
13
+ import { EntityId } from '@dxos/keys';
14
+ import { Outline } from '@dxos/types';
15
+
16
+ import { OperationTestLayer } from '../../../testing';
17
+ import { Agent, Chat } from '../../../types';
18
+ import AgentSkillDef from '../skill';
19
+ import * as AgentSkillOperations from './definitions';
20
+
21
+ EntityId.dangerouslyDisableRandomness();
22
+
23
+ describe('GetContext', () => {
24
+ it.effect(
25
+ 'reports the bound agent name and instructions',
26
+ Effect.fnUntraced(
27
+ function* (_) {
28
+ const { agent, conversation } = yield* setupBoundAgent();
29
+
30
+ const context = yield* Operation.invoke(AgentSkillOperations.GetContext, {}).pipe(Effect.provide(conversation));
31
+
32
+ expect(context.id).toBe(agent.id);
33
+ expect(context.name).toBe('Test Agent');
34
+ expect(context.instructions).toBe('A test agent for context.');
35
+ expect(context.checklist).toBe('No checklist found.');
36
+ },
37
+ Effect.provide(OperationTestLayer),
38
+ TestHelpers.provideTestContext,
39
+ ),
40
+ );
41
+
42
+ it.effect(
43
+ 'formats the chat checklist once one exists',
44
+ Effect.fnUntraced(
45
+ function* (_) {
46
+ const { agent, conversation } = yield* setupBoundAgent();
47
+ const chat = yield* Agent.loadChat(agent);
48
+ invariant(chat, 'Agent chat not found.');
49
+ const { text } = yield* Chat.ensureOutlineText(chat);
50
+ Obj.update(text, (text) => {
51
+ text.content = Outline.upsertChecklistItems(text.content, [{ title: 'Buy eggs', done: false }]);
52
+ });
53
+ yield* Database.flush();
54
+
55
+ const context = yield* Operation.invoke(AgentSkillOperations.GetContext, {}).pipe(Effect.provide(conversation));
56
+
57
+ expect(context.checklist).toContain('Buy eggs');
58
+ },
59
+ Effect.provide(OperationTestLayer),
60
+ TestHelpers.provideTestContext,
61
+ ),
62
+ );
63
+ });
64
+
65
+ // Creates an agent and binds it to its own chat feed so the harness-scoped operation resolves it.
66
+ const setupBoundAgent = Effect.fnUntraced(function* () {
67
+ const agent = yield* Agent.makeInitialized(
68
+ { name: 'Test Agent', instructions: 'A test agent for context.' },
69
+ AgentSkillDef.make(),
70
+ );
71
+ yield* Database.flush();
72
+
73
+ const chat = yield* Agent.loadChat(agent);
74
+ const chatFeed = chat?.feed?.target;
75
+ invariant(chatFeed, 'Agent chat feed not found.');
76
+ const runtime = yield* Effect.runtime<Database.Service>();
77
+ const binder = new AiContext.Binder({ feed: chatFeed, runtime });
78
+ yield* Effect.promise(() => binder.bind({ objects: [Ref.make(agent)] }));
79
+
80
+ return { agent, conversation: Operation.withInvocationOptions({ conversation: Obj.getURI(chatFeed) }) };
81
+ });
@@ -6,21 +6,13 @@ import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Harness } from '@dxos/assistant';
8
8
  import { Operation } from '@dxos/compute';
9
- import { Database, Filter, Obj } from '@dxos/echo';
9
+ import { Filter } from '@dxos/echo';
10
10
  import { invariant } from '@dxos/invariant';
11
11
 
12
12
  import { HarnessContextError } from '../../../errors';
13
- import { Agent, Chat, Plan } from '../../../types';
13
+ import { Agent, Chat } from '../../../types';
14
14
  import { GetContext } from './definitions';
15
15
 
16
- const formatPlan = (chat: Chat.Chat) =>
17
- chat.plan
18
- ? chat.plan.pipe(Database.load).pipe(
19
- Effect.map(Plan.formatPlan),
20
- Effect.catchTag('EntityNotFoundError', () => Effect.succeed('No plan found.')),
21
- )
22
- : Effect.succeed('No plan found.');
23
-
24
16
  export default GetContext.pipe(
25
17
  Operation.withHandler(
26
18
  Effect.fnUntraced(function* () {
@@ -28,7 +20,7 @@ export default GetContext.pipe(
28
20
  const chats = yield* Harness.queryContext(Filter.type(Chat.Chat));
29
21
 
30
22
  if (agents.length === 0 && chats.length === 0) {
31
- return { id: '', name: '', instructions: 'No agent context.', plan: 'No plan found.', artifacts: [] };
23
+ return { id: '', name: '', instructions: 'No agent context.', checklist: 'No checklist found.' };
32
24
  }
33
25
  if (agents.length > 1) {
34
26
  return yield* Effect.fail(new HarnessContextError({ type: 'agent', count: agents.length }));
@@ -37,15 +29,9 @@ export default GetContext.pipe(
37
29
  return yield* Effect.fail(new HarnessContextError({ type: 'chat', count: chats.length }));
38
30
  }
39
31
 
40
- // Prefer the directly bound chat; fall back to the agent's own chat ref when no chat is bound.
32
+ // Prefer the directly bound chat; fall back to the agent's companion chat when no chat is bound.
41
33
  const directChat = chats.length === 1 ? chats[0] : undefined;
42
- const chat =
43
- directChat ??
44
- (agents.length > 0 && agents[0].chat
45
- ? yield* agents[0].chat
46
- .pipe(Database.load)
47
- .pipe(Effect.catchTag('EntityNotFoundError', () => Effect.succeed(undefined)))
48
- : undefined);
34
+ const chat = directChat ?? (agents.length > 0 ? yield* Agent.loadChat(agents[0]) : undefined);
49
35
 
50
36
  if (agents.length === 0) {
51
37
  invariant(chat, 'Expected a bound chat when no agent is in context.');
@@ -53,8 +39,7 @@ export default GetContext.pipe(
53
39
  id: chat.id,
54
40
  name: chat.name ?? '',
55
41
  instructions: 'No agent context.',
56
- plan: yield* formatPlan(chat),
57
- artifacts: [],
42
+ checklist: yield* Chat.formatChecklist(chat),
58
43
  };
59
44
  }
60
45
 
@@ -63,23 +48,11 @@ export default GetContext.pipe(
63
48
  return {
64
49
  id: agent.id,
65
50
  name: agent.name,
66
- instructions: yield* agent.instructions.pipe(Database.load).pipe(
67
- Effect.map((_) => _.content),
51
+ instructions: yield* Agent.loadInstructions(agent).pipe(
52
+ Effect.map((_) => _.text),
68
53
  Effect.catchTag('EntityNotFoundError', () => Effect.succeed('No instructions found.')),
69
54
  ),
70
- plan: yield* chat ? formatPlan(chat) : Effect.succeed('No plan found.'),
71
- artifacts: yield* Effect.forEach(agent.artifacts, (artifact) =>
72
- Effect.gen(function* () {
73
- return {
74
- name: artifact.name,
75
- type: yield* Database.load(artifact.data).pipe(
76
- Effect.map(Obj.getTypename),
77
- Effect.catchTag('EntityNotFoundError', () => Effect.succeed('Artifact not found.')),
78
- ),
79
- dxn: artifact.data.uri,
80
- };
81
- }),
82
- ),
55
+ checklist: yield* chat ? Chat.formatChecklist(chat) : Effect.succeed('No checklist found.'),
83
56
  };
84
57
  }) as any,
85
58
  ),
@@ -7,8 +7,6 @@ import { OperationHandlerSet } from '@dxos/compute';
7
7
  export * as AgentSkillOperations from './definitions';
8
8
 
9
9
  export const AgentSkillHandlers = OperationHandlerSet.lazy(
10
- () => import('./add-artifact'),
11
- () => import('./agent'),
12
10
  () => import('./get-context'),
13
- () => import('./qualifier'),
11
+ () => import('./relay'),
14
12
  );
@@ -0,0 +1,63 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, it } from '@effect/vitest';
6
+ import * as Effect from 'effect/Effect';
7
+ import { expect } from 'vitest';
8
+
9
+ import { AssistantTestLayer } from '@dxos/agent-runtime/testing';
10
+ import { Instructions, Operation, OperationHandlerSet, Process } from '@dxos/compute';
11
+ import { ProcessManager } from '@dxos/compute-runtime';
12
+ import { Database, Feed, Obj, Ref } from '@dxos/echo';
13
+ import { TestHelpers } from '@dxos/effect/testing';
14
+ import { Text } from '@dxos/schema';
15
+
16
+ import { Chat } from '../../../types';
17
+ import { Relay } from './definitions';
18
+ import relayHandler from './relay';
19
+
20
+ const TestLayer = AssistantTestLayer({
21
+ operationHandlers: OperationHandlerSet.make(relayHandler),
22
+ types: [Chat.Chat, Instructions.Instructions, Text.Text, Feed.Feed],
23
+ });
24
+
25
+ // Control-plane only: the qualify:false path needs no LLM turn, so it runs ungated in CI.
26
+ // Qualification itself (cheap-model relevance) is covered by the memoized agent-skill suite.
27
+ describe('Agent relay (control plane)', () => {
28
+ it.scoped(
29
+ 'forwards onto the durable session for the chat feed',
30
+ Effect.fnUntraced(
31
+ function* (_) {
32
+ const processManager = yield* ProcessManager.ProcessManagerService;
33
+
34
+ const instructions = yield* Database.add(Instructions.make({ text: 'Relay target.' }));
35
+ const feed = yield* Database.add(Feed.make());
36
+ const chat = yield* Database.add(
37
+ Chat.make({ name: 'Relay chat', feed: Ref.make(feed), instructions: Ref.make(instructions) }),
38
+ );
39
+ yield* Database.flush();
40
+
41
+ yield* Operation.invoke(Relay, {
42
+ chat: Ref.make(chat),
43
+ prompt: 'Wake up.',
44
+ qualify: false,
45
+ });
46
+
47
+ // Delivery lands on the durable process keyed by the chat feed (spawned on demand).
48
+ const target = Obj.getURI(feed);
49
+ const processes = yield* processManager.list({ target });
50
+ expect(processes.length).toBeGreaterThanOrEqual(1);
51
+
52
+ // Terminate before the turn runs — this test proves delivery, not the LLM turn.
53
+ for (const handle of processes) {
54
+ if (handle.status.state === Process.State.RUNNING) {
55
+ yield* handle.terminate();
56
+ }
57
+ }
58
+ },
59
+ Effect.provide(TestLayer),
60
+ TestHelpers.provideTestContext,
61
+ ),
62
+ );
63
+ });