@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
@@ -0,0 +1,79 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, expect, it } from '@effect/vitest';
6
+ import * as Effect from 'effect/Effect';
7
+ import * as Schema from 'effect/Schema';
8
+
9
+ import { Operation } from '@dxos/compute';
10
+ import { Database, Filter, JsonSchema, Query, Scope, Type } from '@dxos/echo';
11
+ import { TestHelpers } from '@dxos/effect/testing';
12
+ import { EntityId } from '@dxos/keys';
13
+
14
+ import { OperationTestLayer } from '../../../testing';
15
+ import { SchemaAdd } from './definitions';
16
+
17
+ EntityId.dangerouslyDisableRandomness();
18
+
19
+ // A representative draft-07 JSON Schema as a model would emit for the `add-schema` tool.
20
+ const PROJECT_JSON_SCHEMA = {
21
+ $schema: 'http://json-schema.org/draft-07/schema#',
22
+ type: 'object',
23
+ title: 'Project',
24
+ properties: {
25
+ name: { type: 'string' },
26
+ description: { type: 'string' },
27
+ status: { type: 'string' },
28
+ },
29
+ required: ['name'],
30
+ };
31
+
32
+ describe('SchemaAdd', () => {
33
+ it.effect(
34
+ 'schema-add: requires jsonSchema to be an object',
35
+ Effect.fnUntraced(function* (_) {
36
+ // The tool parameter is typed as an object so the model emits the JSON Schema as an object.
37
+ // An unconstrained parameter let some models emit a JSON-encoded string, which then corrupted
38
+ // the created type; a non-object is now rejected at the tool-call boundary.
39
+ const decode = Schema.decodeUnknown(SchemaAdd.input);
40
+ const base = { name: 'Project', typename: 'com.example.type.project' };
41
+
42
+ const fromObject = yield* decode({ ...base, jsonSchema: PROJECT_JSON_SCHEMA });
43
+ expect(fromObject.jsonSchema).toEqual(PROJECT_JSON_SCHEMA);
44
+
45
+ const fromString = yield* Effect.either(decode({ ...base, jsonSchema: JSON.stringify(PROJECT_JSON_SCHEMA) }));
46
+ expect(fromString._tag).toBe('Left');
47
+ }),
48
+ );
49
+
50
+ it.effect(
51
+ 'schema-add: creates a schema with the declared fields',
52
+ Effect.fnUntraced(
53
+ function* (_) {
54
+ // Run the handler and assert the created type carries the declared fields, not merely that a
55
+ // type with the typename exists.
56
+ yield* Operation.invoke(SchemaAdd, {
57
+ name: 'Project',
58
+ typename: 'com.example.type.project',
59
+ jsonSchema: PROJECT_JSON_SCHEMA,
60
+ });
61
+
62
+ const allTypes = yield* Database.query(
63
+ Query.select(Filter.type(Type.Type)).from(Scope.space(), Scope.registry()),
64
+ ).run;
65
+ const schemas = allTypes.filter((type) => Type.getTypename(type) === 'com.example.type.project');
66
+ expect(schemas).toHaveLength(1);
67
+ expectSchemaProperties(schemas[0], ['name', 'description', 'status']);
68
+ },
69
+ Effect.provide(OperationTestLayer),
70
+ TestHelpers.provideTestContext,
71
+ ),
72
+ );
73
+ });
74
+
75
+ // Asserts that the type's JSON Schema declares (at least) the given property names.
76
+ const expectSchemaProperties = (schema: Parameters<typeof JsonSchema.toJsonSchema>[0], expectedKeys: string[]) => {
77
+ const properties = JsonSchema.toJsonSchema(schema).properties ?? {};
78
+ expect(Object.keys(properties)).toEqual(expect.arrayContaining(expectedKeys));
79
+ };
@@ -0,0 +1,42 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, expect, it } from '@effect/vitest';
6
+ import * as Effect from 'effect/Effect';
7
+ import * as Schema from 'effect/Schema';
8
+
9
+ import { Operation, Skill } from '@dxos/compute';
10
+ import { Feed, Type } from '@dxos/echo';
11
+ import { TestHelpers } from '@dxos/effect/testing';
12
+ import { EntityId } from '@dxos/keys';
13
+ import { Employer, Organization, Person } from '@dxos/types';
14
+
15
+ import { OperationTestLayer } from '../../../testing';
16
+ import { SchemaList } from './definitions';
17
+
18
+ EntityId.dangerouslyDisableRandomness();
19
+
20
+ describe('SchemaList', () => {
21
+ it.effect(
22
+ 'schema-list: lists registered types and omits the excluded ones',
23
+ Effect.fnUntraced(
24
+ function* (_) {
25
+ const schemas = yield* Operation.invoke(SchemaList, {});
26
+
27
+ const rows = yield* Schema.decodeUnknown(
28
+ Schema.Array(Schema.Struct({ typename: Schema.String, kind: Schema.String })),
29
+ )(schemas);
30
+ const typenames = rows.map((row) => row.typename);
31
+ expect(typenames).toContain(Type.getTypename(Organization.Organization));
32
+ expect(typenames).toContain(Type.getTypename(Person.Person));
33
+ // Skill and Feed are on the handler's exclusion list, which keeps them out of the agent's context.
34
+ expect(typenames).not.toContain(Type.getTypename(Skill.Skill));
35
+ expect(typenames).not.toContain(Type.getTypename(Feed.Feed));
36
+ expect(rows.find((row) => row.typename === Type.getTypename(Employer.Employer))?.kind).toBe('relation');
37
+ },
38
+ Effect.provide(OperationTestLayer),
39
+ TestHelpers.provideTestContext,
40
+ ),
41
+ );
42
+ });
@@ -0,0 +1,41 @@
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 { Operation } from '@dxos/compute';
9
+ import { Database, Obj, Ref, Tag } from '@dxos/echo';
10
+ import { TestHelpers } from '@dxos/effect/testing';
11
+ import { EID, EntityId } from '@dxos/keys';
12
+ import { Organization } from '@dxos/types';
13
+
14
+ import { OperationTestLayer } from '../../../testing';
15
+ import { TagAdd } from './definitions';
16
+
17
+ EntityId.dangerouslyDisableRandomness();
18
+
19
+ describe('TagAdd', () => {
20
+ it.effect(
21
+ 'tag-add: attaches the tag to the object',
22
+ Effect.fnUntraced(
23
+ function* (_) {
24
+ const organization = yield* Database.add(Obj.make(Organization.Organization, { name: 'Tagged Corp' }));
25
+ const tag = yield* Database.add(Tag.make({ label: 'important' }));
26
+ yield* Database.flush();
27
+
28
+ yield* Operation.invoke(TagAdd, { tag: Ref.make(tag), obj: Ref.make(organization) });
29
+
30
+ expect(taggedIds(organization)).toContain(tag.id);
31
+ },
32
+ Effect.provide(OperationTestLayer),
33
+ TestHelpers.provideTestContext,
34
+ ),
35
+ );
36
+ });
37
+
38
+ // Compare by entity id: a same-space ref stores a local EID (`echo:/<id>`) while `Obj.getURI`
39
+ // returns the fully-qualified form (`echo://<space>/<id>`).
40
+ const taggedIds = (obj: Obj.Any): (string | undefined)[] =>
41
+ Obj.getMeta(obj).tags.map((ref) => EID.getEntityId(EID.parse(ref.uri)));
@@ -0,0 +1,43 @@
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 { Operation } from '@dxos/compute';
9
+ import { Database, Obj, Ref, Tag } from '@dxos/echo';
10
+ import { TestHelpers } from '@dxos/effect/testing';
11
+ import { EID, EntityId } from '@dxos/keys';
12
+ import { Organization } from '@dxos/types';
13
+
14
+ import { OperationTestLayer } from '../../../testing';
15
+ import { TagAdd, TagRemove } from './definitions';
16
+
17
+ EntityId.dangerouslyDisableRandomness();
18
+
19
+ describe('TagRemove', () => {
20
+ it.effect(
21
+ 'tag-remove: detaches the tag from the object',
22
+ Effect.fnUntraced(
23
+ function* (_) {
24
+ const organization = yield* Database.add(Obj.make(Organization.Organization, { name: 'Tagged Corp' }));
25
+ const tag = yield* Database.add(Tag.make({ label: 'important' }));
26
+ yield* Database.flush();
27
+ yield* Operation.invoke(TagAdd, { tag: Ref.make(tag), obj: Ref.make(organization) });
28
+ expect(taggedIds(organization)).toContain(tag.id);
29
+
30
+ yield* Operation.invoke(TagRemove, { tag: Ref.make(tag), obj: Ref.make(organization) });
31
+
32
+ expect(taggedIds(organization)).not.toContain(tag.id);
33
+ },
34
+ Effect.provide(OperationTestLayer),
35
+ TestHelpers.provideTestContext,
36
+ ),
37
+ );
38
+ });
39
+
40
+ // Compare by entity id: a same-space ref stores a local EID (`echo:/<id>`) while `Obj.getURI`
41
+ // returns the fully-qualified form (`echo://<space>/<id>`).
42
+ const taggedIds = (obj: Obj.Any): (string | undefined)[] =>
43
+ Obj.getMeta(obj).tags.map((ref) => EID.getEntityId(EID.parse(ref.uri)));
@@ -5,14 +5,16 @@
5
5
  import { describe, it } from '@effect/vitest';
6
6
  import * as Effect from 'effect/Effect';
7
7
 
8
+ import { AssistantTestLayer } from '@dxos/agent-runtime/testing';
8
9
  import { Operation, Skill } from '@dxos/compute';
9
- import { Database, Feed, Obj } from '@dxos/echo';
10
+ import { Database, Feed, Filter, Obj, Query } from '@dxos/echo';
10
11
  import { TestHelpers } from '@dxos/effect/testing';
11
- import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
12
12
  import { invariant } from '@dxos/invariant';
13
13
  import { EntityId } from '@dxos/keys';
14
+ import { Text } from '@dxos/schema';
15
+ import { Outline, Task, TaskSet } from '@dxos/types';
14
16
 
15
- import { Agent, Chat, Plan } from '../../../types';
17
+ import { Agent, Chat } from '../../../types';
16
18
  import DelegationSkill from '../skill';
17
19
  import { DelegateTask } from './delegate-task';
18
20
  import { DelegationHandlers } from './index';
@@ -21,19 +23,29 @@ EntityId.dangerouslyDisableRandomness();
21
23
 
22
24
  const TestLayer = AssistantTestLayer({
23
25
  operationHandlers: DelegationHandlers,
24
- types: [Agent.Agent, Plan.Plan, Chat.Chat, Chat.CompanionTo, Skill.Skill, Feed.Feed],
26
+ types: [
27
+ Agent.Agent,
28
+ Outline.Outline,
29
+ Task.Task,
30
+ TaskSet.TaskSet,
31
+ Text.Text,
32
+ Chat.Chat,
33
+ Chat.CompanionTo,
34
+ Skill.Skill,
35
+ Feed.Feed,
36
+ ],
25
37
  skills: [DelegationSkill.make()],
26
38
  disableLlmMemoization: true,
27
39
  });
28
40
 
29
- const invokeDelegateTask = (input: { id?: Plan.TaskId; title?: string }, chatFeed: Feed.Feed) =>
41
+ const invokeDelegateTask = (input: { title: string }, chatFeed: Feed.Feed) =>
30
42
  Operation.invoke(DelegateTask, input).pipe(
31
43
  Effect.provide(Operation.withInvocationOptions({ conversation: Obj.getURI(chatFeed) })),
32
44
  );
33
45
 
34
46
  describe('DelegateTask', () => {
35
47
  it.scoped(
36
- 'adds an in-progress task to the agent plan for delegated work',
48
+ 'promotes delegated work to a durable in-progress agent task',
37
49
  Effect.fnUntraced(
38
50
  function* ({ expect }) {
39
51
  const agent = yield* Agent.makeInitialized(
@@ -42,19 +54,29 @@ describe('DelegateTask', () => {
42
54
  );
43
55
  yield* Database.flush();
44
56
 
45
- const chatFeed = agent.chat?.target?.feed?.target;
57
+ const agentChat = yield* Agent.loadChat(agent);
58
+ const chatFeed = agentChat?.feed?.target;
46
59
  invariant(chatFeed, 'Agent chat feed not found.');
47
60
 
48
61
  yield* invokeDelegateTask({ title: 'Research widgets' }, chatFeed);
49
62
 
50
- const chat = yield* Database.load(agent.chat!);
51
- const plan = yield* Database.load(chat.plan!);
52
- expect(plan.tasks).toHaveLength(1);
53
- expect(plan.tasks[0]).toMatchObject({
63
+ // The durable task is parented to the outline's task set with an agent assignee.
64
+ const chat = yield* Agent.loadChat(agent);
65
+ invariant(chat, 'Agent chat not found.');
66
+ const outline = yield* Database.load(chat.outline!);
67
+ const taskSet = yield* Database.load(outline.taskSet!);
68
+ const children = yield* Database.query(Query.select(Filter.id(taskSet.id)).children()).run;
69
+ const tasks = children.filter((child): child is Task.Task => Obj.instanceOf(Task.Task, child));
70
+ expect(tasks).toHaveLength(1);
71
+ expect(tasks[0]).toMatchObject({
54
72
  title: 'Research widgets',
55
73
  status: 'in-progress',
56
- delegated: true,
74
+ assignee: { role: 'assistant' },
57
75
  });
76
+
77
+ // The checklist mirrors the item, unchecked until the sub-agent completes.
78
+ const text = yield* Database.load(outline.content);
79
+ expect(Outline.parseChecklist(text.content)).toEqual([{ title: 'Research widgets', done: false }]);
58
80
  },
59
81
  Effect.provide(TestLayer),
60
82
  TestHelpers.provideTestContext,
@@ -62,35 +84,29 @@ describe('DelegateTask', () => {
62
84
  );
63
85
 
64
86
  it.scoped(
65
- 'delegates an existing plan task by id without duplicating',
87
+ 'reuses the outline task set across delegations',
66
88
  Effect.fnUntraced(
67
89
  function* ({ expect }) {
68
90
  const agent = yield* Agent.makeInitialized(
69
91
  { name: 'Supervisor', instructions: 'Test.' },
70
92
  DelegationSkill.make(),
71
93
  );
72
- const chat = yield* Database.load(agent.chat!);
73
- const plan = yield* Chat.ensurePlan(chat);
74
- const taskId = Plan.TaskId.make('1-ab');
75
- Obj.update(plan, (plan) => {
76
- plan.tasks.push({ id: taskId, title: 'Research widgets', status: 'todo' });
77
- });
78
94
  yield* Database.flush();
79
95
 
80
- const chatFeed = agent.chat?.target?.feed?.target;
96
+ const agentChat = yield* Agent.loadChat(agent);
97
+ const chatFeed = agentChat?.feed?.target;
81
98
  invariant(chatFeed, 'Agent chat feed not found.');
82
99
 
83
- yield* invokeDelegateTask({ id: taskId }, chatFeed);
84
-
85
- const updatedChat = yield* Database.load(agent.chat!);
86
- const updated = yield* Database.load(updatedChat.plan!);
87
- expect(updated.tasks).toHaveLength(1);
88
- expect(updated.tasks[0]).toMatchObject({
89
- id: taskId,
90
- title: 'Research widgets',
91
- status: 'in-progress',
92
- delegated: true,
93
- });
100
+ yield* invokeDelegateTask({ title: 'Research widgets' }, chatFeed);
101
+ yield* invokeDelegateTask({ title: 'Summarize findings' }, chatFeed);
102
+
103
+ const chat = yield* Agent.loadChat(agent);
104
+ invariant(chat, 'Agent chat not found.');
105
+ const outline = yield* Database.load(chat.outline!);
106
+ const taskSet = yield* Database.load(outline.taskSet!);
107
+ const children = yield* Database.query(Query.select(Filter.id(taskSet.id)).children()).run;
108
+ const tasks = children.filter((child): child is Task.Task => Obj.instanceOf(Task.Task, child));
109
+ expect(tasks).toHaveLength(2);
94
110
  },
95
111
  Effect.provide(TestLayer),
96
112
  TestHelpers.provideTestContext,
@@ -98,7 +114,7 @@ describe('DelegateTask', () => {
98
114
  );
99
115
 
100
116
  it.scoped(
101
- 'fails when both id and title are provided',
117
+ 'fails on an empty title',
102
118
  Effect.fnUntraced(
103
119
  function* ({ expect }) {
104
120
  const agent = yield* Agent.makeInitialized(
@@ -107,12 +123,11 @@ describe('DelegateTask', () => {
107
123
  );
108
124
  yield* Database.flush();
109
125
 
110
- const chatFeed = agent.chat?.target?.feed?.target;
126
+ const agentChat = yield* Agent.loadChat(agent);
127
+ const chatFeed = agentChat?.feed?.target;
111
128
  invariant(chatFeed, 'Agent chat feed not found.');
112
129
 
113
- const exit = yield* invokeDelegateTask({ id: Plan.TaskId.make('1-ab'), title: 'New task' }, chatFeed).pipe(
114
- Effect.exit,
115
- );
130
+ const exit = yield* invokeDelegateTask({ title: '' }, chatFeed).pipe(Effect.exit);
116
131
  expect(exit._tag).toBe('Failure');
117
132
  },
118
133
  Effect.provide(TestLayer),
@@ -9,9 +9,10 @@ import { Harness } from '@dxos/assistant';
9
9
  import { Operation } from '@dxos/compute';
10
10
  import { Database, Obj } from '@dxos/echo';
11
11
  import { DXN } from '@dxos/keys';
12
+ import { Outline } from '@dxos/types';
12
13
  import { trim } from '@dxos/util';
13
14
 
14
- import { Chat, Plan } from '../../../types';
15
+ import { Chat } from '../../../types';
15
16
 
16
17
  export const DelegateTask = Operation.make({
17
18
  meta: {
@@ -19,17 +20,14 @@ export const DelegateTask = Operation.make({
19
20
  name: 'Delegate task',
20
21
  description: trim`
21
22
  Delegate a unit of work to a sub-agent.
22
- Provide either \`id\` (an existing plan task from update-tasks) or \`title\` (to create a new task).
23
- Marks the task in-progress and delegated so the supervisor spawns a background sub-agent.
23
+ Promotes the titled checklist item to a durable in-progress task assigned to an agent, so
24
+ the supervisor spawns a background sub-agent. Creates the checklist item if absent.
24
25
  `,
25
26
  icon: 'ph--share-network--regular',
26
27
  },
27
28
  input: Schema.Struct({
28
- id: Schema.optional(Plan.TaskId).annotations({
29
- description: 'Id of an existing plan task to delegate (from update-tasks).',
30
- }),
31
- title: Schema.optional(Schema.String).annotations({
32
- description: 'Title for a new task to create and delegate. Omit when delegating by id.',
29
+ title: Schema.String.annotations({
30
+ description: 'Title of the work to delegate (matched against the checklist, created if new).',
33
31
  }),
34
32
  }),
35
33
  output: Schema.Any,
@@ -37,56 +35,41 @@ export const DelegateTask = Operation.make({
37
35
  });
38
36
 
39
37
  /**
40
- * Records delegated work as an in-progress task on the current session plan.
38
+ * Delegation is the promotion moment: the scratch checklist item becomes a durable `Task`
39
+ * (parented to the outline's task set) assigned to an agent (`role: 'assistant'`), which the
40
+ * supervisor's reconcile loop picks up. The markdown line is checked off only when the sub-agent
41
+ * completes (see the delegation strategy).
41
42
  */
42
43
  export default DelegateTask.pipe(
43
44
  Operation.withHandler(
44
- Effect.fn(function* ({ id, title }) {
45
- const hasId = id !== undefined;
46
- const hasTitle = title !== undefined && title.length > 0;
47
- if (hasId === hasTitle) {
48
- return yield* Effect.fail(
49
- new Error('Provide exactly one of `id` (existing plan task) or `title` (new task to create).'),
50
- );
45
+ Effect.fn(function* ({ title }) {
46
+ if (title.length === 0) {
47
+ return yield* Effect.fail(new Error('Provide a non-empty task title.'));
51
48
  }
52
49
 
53
50
  const chat = yield* Chat.getFromContext;
54
- const plan = yield* Chat.ensurePlan(chat);
51
+ const { outline, text } = yield* Chat.ensureOutlineText(chat);
52
+ const { db } = yield* Database.Service;
55
53
 
56
- if (hasId) {
57
- const existing = plan.tasks.find((task) => task.id === id);
58
- if (!existing) {
59
- return yield* Effect.fail(new Error(`Plan task not found: ${id}`));
60
- }
61
- if (existing.status === 'done' || existing.status === 'failed') {
62
- return yield* Effect.fail(
63
- new Error(`Plan task "${id}" is already ${existing.status} and cannot be delegated.`),
64
- );
65
- }
54
+ const task = yield* Effect.promise(() =>
55
+ Outline.createTask(outline, db, title, {
56
+ status: 'in-progress',
57
+ assignee: { role: 'assistant' },
58
+ }),
59
+ );
66
60
 
67
- Obj.update(plan, (plan) => {
68
- const task = plan.tasks.find((task) => task.id === id);
69
- if (task) {
70
- task.delegated = true;
71
- task.status = 'in-progress';
72
- }
73
- });
74
- } else {
75
- if (title === undefined) {
76
- return yield* Effect.fail(
77
- new Error('Provide exactly one of `id` (existing plan task) or `title` (new task to create).'),
78
- );
79
- }
80
- Obj.update(plan, (plan) => {
81
- Plan.addTasks(plan, [{ title, status: 'in-progress', delegated: true }]);
82
- });
83
- }
61
+ // Ensure the checklist carries the item (unchecked until the sub-agent completes).
62
+ Obj.update(text, (text) => {
63
+ text.content = Outline.upsertChecklistItems(text.content, [{ title: task.title, done: false }]);
64
+ });
65
+ yield* Database.flush();
84
66
 
85
67
  return trim`
86
- Delegated work as an in-progress task. Current plan:
87
- <plan>
88
- ${Plan.formatPlan(plan)}
89
- </plan>
68
+ Delegated "${task.title}" as an in-progress agent task (id: ${task.id}).
69
+ Current checklist:
70
+ <checklist>
71
+ ${text.content}
72
+ </checklist>
90
73
  `;
91
74
  }),
92
75
  ),
@@ -8,10 +8,10 @@ import * as Config from 'effect/Config';
8
8
  import * as Effect from 'effect/Effect';
9
9
  import * as Layer from 'effect/Layer';
10
10
 
11
+ import { AssistantTestLayer } from '@dxos/agent-runtime/testing';
11
12
  import { Operation, OperationHandlerSet } from '@dxos/compute';
13
+ import { credentialsLayerConfig } from '@dxos/compute-runtime';
12
14
  import { TestHelpers } from '@dxos/effect/testing';
13
- import { credentialsLayerConfig } from '@dxos/functions';
14
- import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
15
15
 
16
16
  import { default as fetchMessages } from './fetch-messages';
17
17
 
@@ -6,7 +6,7 @@ import * as HttpClient from '@effect/platform/HttpClient';
6
6
  import * as Effect from 'effect/Effect';
7
7
 
8
8
  import { Credential, Operation } from '@dxos/compute';
9
- import { withAuthorization } from '@dxos/functions';
9
+ import { withAuthorization } from '@dxos/compute-runtime';
10
10
 
11
11
  import { FetchPrs } from './definitions';
12
12
 
@@ -15,4 +15,5 @@ export * from './discord';
15
15
  export * from './linear';
16
16
  export * from './memory';
17
17
  export * from './planning';
18
+ export * from './project';
18
19
  export * from './websearch';
@@ -5,10 +5,10 @@
5
5
  import { describe, it } from '@effect/vitest';
6
6
  import * as Effect from 'effect/Effect';
7
7
 
8
+ import { AssistantTestLayer } from '@dxos/agent-runtime/testing';
8
9
  import { Operation, OperationHandlerSet } from '@dxos/compute';
9
10
  import { Database, Obj, Query } from '@dxos/echo';
10
11
  import { TestHelpers } from '@dxos/effect/testing';
11
- import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
12
12
  import { Person, Pipeline, Task } from '@dxos/types';
13
13
 
14
14
  import { LINEAR_ID_KEY, default as fetchLinearIssues } from './sync-issues';
@@ -9,10 +9,10 @@ import * as Effect from 'effect/Effect';
9
9
  import * as Function from 'effect/Function';
10
10
 
11
11
  import { Credential, Operation } from '@dxos/compute';
12
+ import { withAuthorization } from '@dxos/compute-runtime';
12
13
  import { Database, Filter, Obj, Query, Ref, type Type } from '@dxos/echo';
13
- import { withAuthorization } from '@dxos/functions';
14
14
  import { log } from '@dxos/log';
15
- import { Person, Pipeline, Task } from '@dxos/types';
15
+ import { Person, Task } from '@dxos/types';
16
16
 
17
17
  import { syncObjects } from '../../../sync';
18
18
  import { graphqlRequestBody } from '../../../util';
@@ -156,27 +156,10 @@ const mapLinearIssue = (issue: LinearIssue, { teamId }: { teamId: string }): Tas
156
156
  },
157
157
  title: issue.title ?? undefined,
158
158
  description: issue.description ?? undefined,
159
- assigned: !issue.assignee ? undefined : Ref.make(mapLinearPerson(issue.assignee, { teamId })),
159
+ assignee: !issue.assignee ? undefined : { contact: Ref.make(mapLinearPerson(issue.assignee, { teamId })) },
160
160
  // TODO(dmaretskyi): Sync those (+ linear team as org?).
161
161
  // state: issue.state.name,
162
-
163
- project: !issue.project
164
- ? undefined
165
- : Ref.make(
166
- Pipeline.make({
167
- [Obj.Meta]: {
168
- keys: [
169
- {
170
- id: issue.project.id,
171
- source: LINEAR_ID_KEY,
172
- },
173
- {
174
- id: teamId,
175
- source: LINEAR_TEAM_ID_KEY,
176
- },
177
- ],
178
- },
179
- name: issue.project.name,
180
- }),
181
- ),
162
+ // Container membership (TaskSet parent edge) is not mapped here: `syncObjects` upserts
163
+ // detached objects, and parent edges need persisted objects — plugin-linear's sync owns
164
+ // real project mirroring.
182
165
  });
@@ -0,0 +1,37 @@
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 { Operation } from '@dxos/compute';
9
+ import { Database, Filter, Obj, Query, Ref } from '@dxos/echo';
10
+ import { TestHelpers } from '@dxos/effect/testing';
11
+ import { EntityId } from '@dxos/keys';
12
+
13
+ import { OperationTestLayer } from '../../../testing';
14
+ import { Memory } from '../../../types/Memory';
15
+ import { DeleteMemory } from './definitions';
16
+
17
+ EntityId.dangerouslyDisableRandomness();
18
+
19
+ describe('DeleteMemory', () => {
20
+ it.effect(
21
+ 'removes the memory from the database',
22
+ Effect.fnUntraced(
23
+ function* (_) {
24
+ const memory = yield* Database.add(Obj.make(Memory, { title: 'Outdated fact', content: 'Stale.' }));
25
+ const kept = yield* Database.add(Obj.make(Memory, { title: 'Current fact', content: 'Fresh.' }));
26
+ yield* Database.flush();
27
+
28
+ yield* Operation.invoke(DeleteMemory, { memory: Ref.make(memory) });
29
+
30
+ const memories = yield* Database.query(Query.select(Filter.type(Memory))).run;
31
+ expect(memories.map((entry) => entry.id)).toEqual([kept.id]);
32
+ },
33
+ Effect.provide(OperationTestLayer),
34
+ TestHelpers.provideTestContext,
35
+ ),
36
+ );
37
+ });