@dxos/assistant-toolkit 0.8.4-main.abd8ff62ef → 0.8.4-main.bc2380dfbc

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 (193) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/{add-artifact-BA5WQRDU.mjs → add-artifact-4IVGW6CI.mjs} +4 -4
  3. package/dist/lib/neutral/{add-artifact-BA5WQRDU.mjs.map → add-artifact-4IVGW6CI.mjs.map} +3 -3
  4. package/dist/lib/neutral/{agent-M2EW5M36.mjs → agent-F4L7UXME.mjs} +5 -5
  5. package/dist/lib/neutral/{agent-M2EW5M36.mjs.map → agent-F4L7UXME.mjs.map} +2 -2
  6. package/dist/lib/neutral/{chunk-CLHVRIYF.mjs → chunk-5GPL2WXU.mjs} +35 -36
  7. package/dist/lib/neutral/chunk-5GPL2WXU.mjs.map +7 -0
  8. package/dist/lib/neutral/{chunk-CVUA23QI.mjs → chunk-7UCYAP3T.mjs} +17 -17
  9. package/dist/lib/neutral/chunk-7UCYAP3T.mjs.map +7 -0
  10. package/dist/lib/neutral/{chunk-TO5IX24K.mjs → chunk-ANSF2BHN.mjs} +3 -3
  11. package/dist/lib/neutral/chunk-ANSF2BHN.mjs.map +7 -0
  12. package/dist/lib/neutral/{chunk-D5MG5OKX.mjs → chunk-BCT55UTL.mjs} +2 -2
  13. package/dist/lib/neutral/{chunk-J37DYY7A.mjs → chunk-COL54UJ3.mjs} +12 -3
  14. package/dist/lib/neutral/chunk-COL54UJ3.mjs.map +7 -0
  15. package/dist/lib/neutral/{chunk-E2XRNXWP.mjs → chunk-KS3IA6FQ.mjs} +11 -10
  16. package/dist/lib/neutral/chunk-KS3IA6FQ.mjs.map +7 -0
  17. package/dist/lib/neutral/{chunk-KY2TIPJ5.mjs → chunk-MMQ7HFL4.mjs} +4 -5
  18. package/dist/lib/neutral/chunk-MMQ7HFL4.mjs.map +7 -0
  19. package/dist/lib/neutral/chunk-PLGEBNTO.mjs +65 -0
  20. package/dist/lib/neutral/chunk-PLGEBNTO.mjs.map +7 -0
  21. package/dist/lib/neutral/{chunk-JCYLFOFK.mjs → chunk-W2722TC5.mjs} +5 -5
  22. package/dist/lib/neutral/{chunk-JCYLFOFK.mjs.map → chunk-W2722TC5.mjs.map} +3 -3
  23. package/dist/lib/neutral/{context-add-IIDPRRVB.mjs → context-add-S5MBW2NA.mjs} +4 -4
  24. package/dist/lib/neutral/context-add-S5MBW2NA.mjs.map +7 -0
  25. package/dist/lib/neutral/{context-remove-RDYV4PD4.mjs → context-remove-35O5T5N5.mjs} +4 -4
  26. package/dist/lib/neutral/context-remove-35O5T5N5.mjs.map +7 -0
  27. package/dist/lib/neutral/{create-project-GLDEAWTT.mjs → create-project-3AGXJ4TD.mjs} +5 -5
  28. package/dist/lib/neutral/{enable-blueprints-LBDZH2CY.mjs → enable-blueprints-IVKST3WH.mjs} +4 -4
  29. package/dist/lib/neutral/enable-blueprints-IVKST3WH.mjs.map +7 -0
  30. package/dist/lib/neutral/{fetch-messages-PWGUG5G3.mjs → fetch-messages-QOBBCTGC.mjs} +2 -2
  31. package/dist/lib/neutral/{get-context-B55SX5Y4.mjs → get-context-FBYWIP72.mjs} +4 -4
  32. package/dist/lib/neutral/{get-context-B55SX5Y4.mjs.map → get-context-FBYWIP72.mjs.map} +3 -3
  33. package/dist/lib/neutral/index.mjs +67 -57
  34. package/dist/lib/neutral/index.mjs.map +3 -3
  35. package/dist/lib/neutral/{load-LI7HHVD6.mjs → load-GAT3T2AD.mjs} +2 -2
  36. package/dist/lib/neutral/meta.json +1 -1
  37. package/dist/lib/neutral/{object-create-52Z7YKIA.mjs → object-create-PL3WRP74.mjs} +3 -3
  38. package/dist/lib/neutral/{object-delete-I266YAXI.mjs → object-delete-PZJQN5KW.mjs} +2 -2
  39. package/dist/lib/neutral/{object-update-HY4GI7LA.mjs → object-update-R43N3VJX.mjs} +2 -2
  40. package/dist/lib/neutral/{project-2YBPW5N7.mjs → project-VVXXUMAI.mjs} +4 -4
  41. package/dist/lib/neutral/{project-rules-XUBEPDP6.mjs → project-rules-KSVSOZJV.mjs} +3 -3
  42. package/dist/lib/neutral/{prompt-2WZQERT4.mjs → prompt-INL55Q2B.mjs} +10 -7
  43. package/dist/lib/neutral/{prompt-2WZQERT4.mjs.map → prompt-INL55Q2B.mjs.map} +3 -3
  44. package/dist/lib/neutral/{qualifier-2AC2ICOB.mjs → qualifier-DAF4H7V3.mjs} +11 -11
  45. package/dist/lib/neutral/qualifier-DAF4H7V3.mjs.map +7 -0
  46. package/dist/lib/neutral/{query-B3NOYFCK.mjs → query-MP5NSQKO.mjs} +3 -4
  47. package/dist/lib/neutral/query-MP5NSQKO.mjs.map +7 -0
  48. package/dist/lib/neutral/{query-blueprints-KXADGHSA.mjs → query-blueprints-PLWYVOI3.mjs} +2 -2
  49. package/dist/lib/neutral/{relation-create-Z3NGW4VU.mjs → relation-create-YAAAFTR2.mjs} +3 -3
  50. package/dist/lib/neutral/{relation-delete-LXY7W2YO.mjs → relation-delete-IEPKERFR.mjs} +2 -2
  51. package/dist/lib/neutral/{schema-add-4TXJO2V7.mjs → schema-add-5BNIINRS.mjs} +2 -2
  52. package/dist/lib/neutral/{schema-list-PJS5AFZ3.mjs → schema-list-54UK7S4R.mjs} +2 -2
  53. package/dist/lib/neutral/{sync-issues-LOLHZNFL.mjs → sync-issues-DWY76B3M.mjs} +6 -7
  54. package/dist/lib/neutral/sync-issues-DWY76B3M.mjs.map +7 -0
  55. package/dist/lib/neutral/{sync-triggers-EYJM4QWR.mjs → sync-triggers-NOIQLELD.mjs} +8 -9
  56. package/dist/lib/neutral/{sync-triggers-EYJM4QWR.mjs.map → sync-triggers-NOIQLELD.mjs.map} +3 -3
  57. package/dist/lib/neutral/{tag-add-5NOHUTIE.mjs → tag-add-NLVRGTC6.mjs} +2 -2
  58. package/dist/lib/neutral/{tag-remove-QTKYDJAW.mjs → tag-remove-N4HFBIA2.mjs} +2 -2
  59. package/dist/lib/neutral/testing/index.mjs +3 -3
  60. package/dist/lib/neutral/testing/index.mjs.map +3 -3
  61. package/dist/lib/neutral/{update-blueprints-N2AK2VUR.mjs → update-blueprints-2SNK6HLG.mjs} +2 -2
  62. package/dist/lib/neutral/update-tasks-QQUR53RN.mjs +13 -0
  63. package/dist/lib/neutral/update-tasks-QQUR53RN.mjs.map +7 -0
  64. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +10 -8
  65. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -1
  66. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +6 -5
  67. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -1
  68. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +4 -3
  69. package/dist/types/src/blueprints/database/functions/context-add.d.ts +2 -2
  70. package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -1
  71. package/dist/types/src/blueprints/database/functions/context-remove.d.ts +2 -2
  72. package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -1
  73. package/dist/types/src/blueprints/database/functions/definitions.d.ts +3 -3
  74. package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -1
  75. package/dist/types/src/blueprints/database/functions/query.d.ts +1 -2
  76. package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -1
  77. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -1
  78. package/dist/types/src/blueprints/planning/functions/index.d.ts +1 -1
  79. package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -1
  80. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +14 -1
  81. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -1
  82. package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts +2 -0
  83. package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts.map +1 -0
  84. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +1 -5
  85. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -1
  86. package/dist/types/src/blueprints/project/functions/definitions.d.ts +16 -8
  87. package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -1
  88. package/dist/types/src/blueprints/project/functions/get-context.d.ts +1 -12
  89. package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -1
  90. package/dist/types/src/blueprints/project/functions/qualifier.d.ts +8 -4
  91. package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -1
  92. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +6 -2
  93. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +12 -4
  94. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -1
  95. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +6 -2
  96. package/dist/types/src/blueprints/testing.d.ts +4 -4
  97. package/dist/types/src/blueprints/testing.d.ts.map +1 -1
  98. package/dist/types/src/crud/graph.d.ts +5 -7
  99. package/dist/types/src/crud/graph.d.ts.map +1 -1
  100. package/dist/types/src/functions/agent/definitions.d.ts +6 -5
  101. package/dist/types/src/functions/agent/definitions.d.ts.map +1 -1
  102. package/dist/types/src/sync/sync.d.ts +1 -2
  103. package/dist/types/src/sync/sync.d.ts.map +1 -1
  104. package/dist/types/src/types/Agent.d.ts +9 -7
  105. package/dist/types/src/types/Agent.d.ts.map +1 -1
  106. package/dist/types/src/types/McpServer.d.ts +4 -1
  107. package/dist/types/src/types/McpServer.d.ts.map +1 -1
  108. package/dist/types/src/types/Plan.d.ts.map +1 -1
  109. package/dist/types/tsconfig.tsbuildinfo +1 -1
  110. package/package.json +26 -26
  111. package/src/blueprints/automation/blueprint.ts +1 -1
  112. package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -1
  113. package/src/blueprints/blueprint-manager/blueprint.test.ts +21 -17
  114. package/src/blueprints/blueprint-manager/blueprint.ts +2 -2
  115. package/src/blueprints/blueprint-manager/functions/definitions.ts +2 -2
  116. package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +2 -2
  117. package/src/blueprints/browser/blueprint.test.ts +3 -3
  118. package/src/blueprints/browser/blueprint.ts +1 -1
  119. package/src/blueprints/database/blueprint.conversations.json +1 -1
  120. package/src/blueprints/database/blueprint.test.ts +6 -6
  121. package/src/blueprints/database/blueprint.ts +1 -1
  122. package/src/blueprints/database/functions/context-add.ts +2 -2
  123. package/src/blueprints/database/functions/context-remove.ts +2 -2
  124. package/src/blueprints/database/functions/definitions.ts +16 -16
  125. package/src/blueprints/database/functions/query.ts +2 -3
  126. package/src/blueprints/discord/blueprint.ts +1 -1
  127. package/src/blueprints/discord/functions/fetch-messages.test.ts +7 -2
  128. package/src/blueprints/linear/blueprint.ts +1 -1
  129. package/src/blueprints/linear/functions/linear.test.ts +1 -2
  130. package/src/blueprints/linear/functions/sync-issues.ts +1 -2
  131. package/src/blueprints/memory/blueprint.conversations.json +1 -1
  132. package/src/blueprints/memory/blueprint.ts +1 -1
  133. package/src/blueprints/planning/blueprint.ts +1 -1
  134. package/src/blueprints/planning/functions/index.ts +1 -1
  135. package/src/blueprints/planning/functions/{definitions.ts → update-tasks.md} +29 -50
  136. package/src/blueprints/planning/functions/update-tasks.test.ts +55 -0
  137. package/src/blueprints/planning/functions/update-tasks.ts +25 -3
  138. package/src/blueprints/project/blueprint.conversations.json +1 -1
  139. package/src/blueprints/project/blueprint.test.ts +15 -17
  140. package/src/blueprints/project/blueprint.ts +2 -2
  141. package/src/blueprints/project/functions/add-artifact.ts +1 -0
  142. package/src/blueprints/project/functions/agent.ts +1 -1
  143. package/src/blueprints/project/functions/definitions.ts +8 -8
  144. package/src/blueprints/project/functions/get-context.ts +1 -0
  145. package/src/blueprints/project/functions/qualifier.ts +5 -5
  146. package/src/blueprints/project-wizard/functions/sync-triggers.ts +4 -9
  147. package/src/blueprints/testing.ts +10 -4
  148. package/src/blueprints/websearch/blueprint.conversations.json +1 -1
  149. package/src/crud/graph.test.ts +1 -1
  150. package/src/crud/graph.ts +125 -127
  151. package/src/functions/agent/definitions.ts +8 -3
  152. package/src/functions/agent/prompt.conversations.json +1 -1
  153. package/src/functions/agent/prompt.test.ts +8 -11
  154. package/src/functions/agent/prompt.ts +5 -2
  155. package/src/sync/sync.ts +1 -2
  156. package/src/types/Agent.ts +28 -29
  157. package/src/types/McpServer.ts +5 -5
  158. package/src/types/Plan.ts +1 -0
  159. package/dist/lib/neutral/chunk-CLHVRIYF.mjs.map +0 -7
  160. package/dist/lib/neutral/chunk-CVUA23QI.mjs.map +0 -7
  161. package/dist/lib/neutral/chunk-E2XRNXWP.mjs.map +0 -7
  162. package/dist/lib/neutral/chunk-J37DYY7A.mjs.map +0 -7
  163. package/dist/lib/neutral/chunk-KY2TIPJ5.mjs.map +0 -7
  164. package/dist/lib/neutral/chunk-MMTKJBB5.mjs +0 -140
  165. package/dist/lib/neutral/chunk-MMTKJBB5.mjs.map +0 -7
  166. package/dist/lib/neutral/chunk-TO5IX24K.mjs.map +0 -7
  167. package/dist/lib/neutral/context-add-IIDPRRVB.mjs.map +0 -7
  168. package/dist/lib/neutral/context-remove-RDYV4PD4.mjs.map +0 -7
  169. package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs.map +0 -7
  170. package/dist/lib/neutral/qualifier-2AC2ICOB.mjs.map +0 -7
  171. package/dist/lib/neutral/query-B3NOYFCK.mjs.map +0 -7
  172. package/dist/lib/neutral/sync-issues-LOLHZNFL.mjs.map +0 -7
  173. package/dist/lib/neutral/update-tasks-ML2FCYU5.mjs +0 -46
  174. package/dist/lib/neutral/update-tasks-ML2FCYU5.mjs.map +0 -7
  175. package/dist/types/src/blueprints/planning/functions/definitions.d.ts +0 -11
  176. package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +0 -1
  177. /package/dist/lib/neutral/{chunk-D5MG5OKX.mjs.map → chunk-BCT55UTL.mjs.map} +0 -0
  178. /package/dist/lib/neutral/{create-project-GLDEAWTT.mjs.map → create-project-3AGXJ4TD.mjs.map} +0 -0
  179. /package/dist/lib/neutral/{fetch-messages-PWGUG5G3.mjs.map → fetch-messages-QOBBCTGC.mjs.map} +0 -0
  180. /package/dist/lib/neutral/{load-LI7HHVD6.mjs.map → load-GAT3T2AD.mjs.map} +0 -0
  181. /package/dist/lib/neutral/{object-create-52Z7YKIA.mjs.map → object-create-PL3WRP74.mjs.map} +0 -0
  182. /package/dist/lib/neutral/{object-delete-I266YAXI.mjs.map → object-delete-PZJQN5KW.mjs.map} +0 -0
  183. /package/dist/lib/neutral/{object-update-HY4GI7LA.mjs.map → object-update-R43N3VJX.mjs.map} +0 -0
  184. /package/dist/lib/neutral/{project-2YBPW5N7.mjs.map → project-VVXXUMAI.mjs.map} +0 -0
  185. /package/dist/lib/neutral/{project-rules-XUBEPDP6.mjs.map → project-rules-KSVSOZJV.mjs.map} +0 -0
  186. /package/dist/lib/neutral/{query-blueprints-KXADGHSA.mjs.map → query-blueprints-PLWYVOI3.mjs.map} +0 -0
  187. /package/dist/lib/neutral/{relation-create-Z3NGW4VU.mjs.map → relation-create-YAAAFTR2.mjs.map} +0 -0
  188. /package/dist/lib/neutral/{relation-delete-LXY7W2YO.mjs.map → relation-delete-IEPKERFR.mjs.map} +0 -0
  189. /package/dist/lib/neutral/{schema-add-4TXJO2V7.mjs.map → schema-add-5BNIINRS.mjs.map} +0 -0
  190. /package/dist/lib/neutral/{schema-list-PJS5AFZ3.mjs.map → schema-list-54UK7S4R.mjs.map} +0 -0
  191. /package/dist/lib/neutral/{tag-add-5NOHUTIE.mjs.map → tag-add-NLVRGTC6.mjs.map} +0 -0
  192. /package/dist/lib/neutral/{tag-remove-QTKYDJAW.mjs.map → tag-remove-N4HFBIA2.mjs.map} +0 -0
  193. /package/dist/lib/neutral/{update-blueprints-N2AK2VUR.mjs.map → update-blueprints-2SNK6HLG.mjs.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/blueprints/blueprint-manager/functions/definitions.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { AiContext } from '@dxos/assistant';\nimport { Blueprint, Operation } from '@dxos/compute';\nimport { Database } from '@dxos/echo';\n\nexport const QueryBlueprints = Operation.make({\n meta: {\n key: 'org.dxos.function.blueprint-manager.query-blueprints',\n name: 'Query blueprints',\n description: 'Queries available blueprints.',\n },\n input: Schema.Struct({}),\n output: Schema.Array(Blueprint.Blueprint),\n services: [Blueprint.RegistryService],\n});\n\nexport const EnableBlueprints = Operation.make({\n meta: {\n key: 'org.dxos.function.blueprint-manager.enable-blueprints',\n name: 'Enable blueprints',\n description:\n 'Enables blueprints in the current conversation by their keys. Only blueprints with agentCanEnable=true can be enabled. Always call [query-blueprints] first to discover available blueprint keys.',\n },\n input: Schema.Struct({\n keys: Schema.Array(Schema.String).annotations({\n description: 'The keys of the blueprints to enable.',\n examples: [['org.dxos.blueprint.memory', 'org.dxos.blueprint.database']],\n }),\n }),\n output: Schema.Struct({\n enabled: Schema.Array(Blueprint.Blueprint),\n rejected: Schema.Array(\n Schema.Struct({\n key: Schema.String,\n reason: Schema.String,\n }),\n ),\n }),\n services: [Blueprint.RegistryService, Database.Service, AiContext.Service],\n});\n\nexport const UpdateBlueprints = Operation.make({\n meta: {\n key: 'org.dxos.function.blueprint-manager.refresh-blueprints',\n name: 'Refresh blueprints',\n description:\n 'Updates the blueprints saved to the database with the latest version from the registry. Sometimes blueprints in the database can become outdated. Use this function to pull in the latest versions.',\n },\n input: Schema.Struct({}),\n output: Schema.Void,\n services: [Blueprint.RegistryService, Database.Service],\n});\n"],
5
+ "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,WAAWC,iBAAiB;AACrC,SAASC,gBAAgB;AAElB,IAAMC,kBAAkBF,UAAUG,KAAK;EAC5CC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO,CAAC,CAAA;EACtBC,QAAeC,aAAMZ,UAAUA,SAAS;EACxCa,UAAU;IAACb,UAAUc;;AACvB,CAAA;AAEO,IAAMC,mBAAmBd,UAAUG,KAAK;EAC7CC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aACE;EACJ;EACAC,OAAcC,cAAO;IACnBM,MAAaJ,aAAaK,aAAM,EAAEC,YAAY;MAC5CV,aAAa;MACbW,UAAU;QAAC;UAAC;UAA6B;;;IAC3C,CAAA;EACF,CAAA;EACAR,QAAeD,cAAO;IACpBU,SAAgBR,aAAMZ,UAAUA,SAAS;IACzCqB,UAAiBT,aACRF,cAAO;MACZJ,KAAYW;MACZK,QAAeL;IACjB,CAAA,CAAA;EAEJ,CAAA;EACAJ,UAAU;IAACb,UAAUc;IAAiBZ,SAASqB;IAASxB,UAAUwB;;AACpE,CAAA;AAEO,IAAMC,mBAAmBvB,UAAUG,KAAK;EAC7CC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aACE;EACJ;EACAC,OAAcC,cAAO,CAAC,CAAA;EACtBC,QAAec;EACfZ,UAAU;IAACb,UAAUc;IAAiBZ,SAASqB;;AACjD,CAAA;",
6
+ "names": ["Schema", "AiContext", "Blueprint", "Operation", "Database", "QueryBlueprints", "make", "meta", "key", "name", "description", "input", "Struct", "output", "Array", "services", "RegistryService", "EnableBlueprints", "keys", "String", "annotations", "examples", "enabled", "rejected", "reason", "Service", "UpdateBlueprints", "Void"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Agent_exports
3
- } from "./chunk-CLHVRIYF.mjs";
3
+ } from "./chunk-5GPL2WXU.mjs";
4
4
 
5
5
  // src/blueprints/project-wizard/functions/definitions.ts
6
6
  import * as Schema from "effect/Schema";
@@ -72,4 +72,4 @@ export {
72
72
  CreateAgent,
73
73
  SyncTriggers
74
74
  };
75
- //# sourceMappingURL=chunk-D5MG5OKX.mjs.map
75
+ //# sourceMappingURL=chunk-BCT55UTL.mjs.map
@@ -7,10 +7,11 @@ import * as Schema from "effect/Schema";
7
7
  import { AiService, OpaqueToolkit, ModelName } from "@dxos/ai";
8
8
  import { Routine, Trace, Operation, OperationRegistry } from "@dxos/compute";
9
9
  import { Database, Feed, Ref } from "@dxos/echo";
10
+ import { Text } from "@dxos/schema";
10
11
  var AgentPrompt = Operation.make({
11
12
  meta: {
12
13
  key: "org.dxos.function.prompt",
13
- name: "Agent",
14
+ name: "Run Routine",
14
15
  description: "Agentic worker that executes a provided prompt using blueprints and tools."
15
16
  },
16
17
  input: Schema.Struct({
@@ -35,6 +36,14 @@ var AgentPrompt = Operation.make({
35
36
  })
36
37
  }),
37
38
  output: Schema.Any,
39
+ // ECHO types that the handler loads via Database.load(). Declaring them here ensures the
40
+ // runtime registers their schema before remote invocation (e.g. via the EDGE function service).
41
+ types: [
42
+ Routine.Routine,
43
+ Text.Text,
44
+ Feed.Feed,
45
+ Chat
46
+ ],
38
47
  services: [
39
48
  AiService.AiService,
40
49
  Database.Service,
@@ -43,9 +52,9 @@ var AgentPrompt = Operation.make({
43
52
  OperationRegistry.Service,
44
53
  Trace.TraceService
45
54
  ]
46
- });
55
+ }).pipe(Operation.intrinsic);
47
56
 
48
57
  export {
49
58
  AgentPrompt
50
59
  };
51
- //# sourceMappingURL=chunk-J37DYY7A.mjs.map
60
+ //# sourceMappingURL=chunk-COL54UJ3.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/functions/agent/definitions.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { AiService, OpaqueToolkit, ModelName } from '@dxos/ai';\nimport { Routine, Trace, Operation, OperationRegistry } from '@dxos/compute';\nimport { Database, Feed, Ref } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\n\nimport * as Chat from '../../types/Chat';\n\n// TODO(dmaretskyi): Rename to RunRoutine.\nexport const AgentPrompt = Operation.make({\n meta: {\n key: 'org.dxos.function.prompt',\n name: 'Run Routine',\n description: 'Agentic worker that executes a provided prompt using blueprints and tools.',\n },\n input: Schema.Struct({\n prompt: Ref.Ref(Routine.Routine),\n\n /**\n * When set, runs in this chat (history, queue, and bound context). Routine blueprints and context objects are merged into the conversation for this request.\n */\n chat: Schema.optional(Ref.Ref(Chat.Chat)),\n\n /**\n * @default @anthropic/claude-opus-4-6\n */\n model: Schema.optional(ModelName),\n\n /**\n * Input object or data.\n * References get auto-resolved.\n */\n input: Schema.Any.pipe(Schema.annotations({ title: 'Input' })),\n\n systemInstructions: Schema.optional(Schema.String).annotations({\n description: 'Additional system instructions to add to the system prompt.',\n }),\n }),\n output: Schema.Any,\n // ECHO types that the handler loads via Database.load(). Declaring them here ensures the\n // runtime registers their schema before remote invocation (e.g. via the EDGE function service).\n types: [Routine.Routine, Text.Text, Feed.Feed, Chat.Chat],\n services: [\n AiService.AiService,\n Database.Service,\n Feed.FeedService,\n OpaqueToolkit.OpaqueToolkitProvider,\n OperationRegistry.Service,\n Trace.TraceService,\n ],\n}).pipe(Operation.intrinsic);\n"],
5
+ "mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,WAAWC,eAAeC,iBAAiB;AACpD,SAASC,SAASC,OAAOC,WAAWC,yBAAyB;AAC7D,SAASC,UAAUC,MAAMC,WAAW;AACpC,SAASC,YAAY;AAKd,IAAMC,cAAcC,UAAUC,KAAK;EACxCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,QAAQC,IAAIA,IAAIC,QAAQA,OAAO;;;;IAK/BC,MAAaC,gBAASH,IAAIA,IAASI,IAAI,CAAA;;;;IAKvCC,OAAcF,gBAASG,SAAAA;;;;;IAMvBT,OAAcU,WAAIC,KAAYC,mBAAY;MAAEC,OAAO;IAAQ,CAAA,CAAA;IAE3DC,oBAA2BR,gBAAgBS,aAAM,EAAEH,YAAY;MAC7Db,aAAa;IACf,CAAA;EACF,CAAA;EACAiB,QAAeN;;;EAGfO,OAAO;IAACb,QAAQA;IAASc,KAAKA;IAAMC,KAAKA;IAAWZ;;EACpDa,UAAU;IACRC,UAAUA;IACVC,SAASC;IACTJ,KAAKK;IACLC,cAAcC;IACdC,kBAAkBJ;IAClBK,MAAMC;;AAEV,CAAA,EAAGlB,KAAKjB,UAAUoC,SAAS;",
6
+ "names": ["Schema", "AiService", "OpaqueToolkit", "ModelName", "Routine", "Trace", "Operation", "OperationRegistry", "Database", "Feed", "Ref", "Text", "AgentPrompt", "Operation", "make", "meta", "key", "name", "description", "input", "Struct", "prompt", "Ref", "Routine", "chat", "optional", "Chat", "model", "ModelName", "Any", "pipe", "annotations", "title", "systemInstructions", "String", "output", "types", "Text", "Feed", "services", "AiService", "Database", "Service", "FeedService", "OpaqueToolkit", "OpaqueToolkitProvider", "OperationRegistry", "Trace", "TraceService", "intrinsic"]
7
+ }
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  Agent_exports
3
- } from "./chunk-CLHVRIYF.mjs";
3
+ } from "./chunk-5GPL2WXU.mjs";
4
4
 
5
5
  // src/blueprints/project/functions/definitions.ts
6
6
  import * as Schema from "effect/Schema";
7
7
  import { AiService, OpaqueToolkit } from "@dxos/ai";
8
- import { AiContextService } from "@dxos/assistant";
8
+ import { AiContext } from "@dxos/assistant";
9
9
  import { Trace, TriggerEvent, Operation, OperationRegistry } from "@dxos/compute";
10
10
  import { Database, Feed, Obj, Ref } from "@dxos/echo";
11
11
  import { QueueService } from "@dxos/functions";
@@ -30,7 +30,7 @@ var AgentWorker = Operation.make({
30
30
  Trace.TraceService,
31
31
  OpaqueToolkit.OpaqueToolkitProvider
32
32
  ]
33
- });
33
+ }).pipe(Operation.intrinsic);
34
34
  var Qualifier = Operation.make({
35
35
  meta: {
36
36
  key: "org.dxos.function.agent.qualifier",
@@ -44,9 +44,10 @@ var Qualifier = Operation.make({
44
44
  output: Schema.Void,
45
45
  services: [
46
46
  AiService.AiService,
47
- Database.Service
47
+ Database.Service,
48
+ Feed.FeedService
48
49
  ]
49
- });
50
+ }).pipe(Operation.intrinsic);
50
51
  var GetContext = Operation.make({
51
52
  meta: {
52
53
  key: "org.dxos.function.agent.get-context",
@@ -66,10 +67,10 @@ var GetContext = Operation.make({
66
67
  }))
67
68
  }),
68
69
  services: [
69
- AiContextService,
70
+ AiContext.Service,
70
71
  Database.Service
71
72
  ]
72
- });
73
+ }).pipe(Operation.intrinsic);
73
74
  var AddArtifact = Operation.make({
74
75
  meta: {
75
76
  key: "org.dxos.function.agent.add-artifact",
@@ -86,10 +87,10 @@ var AddArtifact = Operation.make({
86
87
  }),
87
88
  output: Schema.Void,
88
89
  services: [
89
- AiContextService,
90
+ AiContext.Service,
90
91
  Database.Service
91
92
  ]
92
- });
93
+ }).pipe(Operation.intrinsic);
93
94
 
94
95
  export {
95
96
  AgentWorker,
@@ -97,4 +98,4 @@ export {
97
98
  GetContext,
98
99
  AddArtifact
99
100
  };
100
- //# sourceMappingURL=chunk-E2XRNXWP.mjs.map
101
+ //# sourceMappingURL=chunk-KS3IA6FQ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/blueprints/project/functions/definitions.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { AiService, OpaqueToolkit } from '@dxos/ai';\nimport { AiContext } from '@dxos/assistant';\nimport { Trace, TriggerEvent, Operation, OperationRegistry } from '@dxos/compute';\nimport { Database, Feed, Obj, Ref } from '@dxos/echo';\nimport { QueueService } from '@dxos/functions';\n\nimport { Agent } from '../../../types';\n\nexport const AgentWorker = Operation.make({\n meta: {\n key: 'org.dxos.function.agent.worker',\n name: 'Agent Worker',\n description: 'Agentic worker that drives the agent autonomously.',\n },\n input: Schema.Struct({\n agent: Schema.suspend(() => Ref.Ref(Agent.Agent)),\n prompt: Schema.optional(Schema.String),\n event: Schema.optional(TriggerEvent.TriggerEvent),\n }),\n output: Schema.Void,\n services: [\n AiService.AiService,\n Database.Service,\n QueueService,\n Feed.FeedService,\n OperationRegistry.Service,\n Trace.TraceService,\n OpaqueToolkit.OpaqueToolkitProvider,\n ],\n}).pipe(Operation.intrinsic);\n\nexport const Qualifier = Operation.make({\n meta: {\n key: 'org.dxos.function.agent.qualifier',\n name: 'Agent Qualifier',\n description:\n 'Qualifier that determines if the event is relevant to the agent. Puts the data into the input queue of the agent.',\n },\n input: Schema.Struct({\n agent: Schema.suspend(() => Ref.Ref(Agent.Agent)),\n event: TriggerEvent.TriggerEvent,\n }),\n output: Schema.Void,\n services: [AiService.AiService, Database.Service, Feed.FeedService],\n}).pipe(Operation.intrinsic);\n\nexport const GetContext = Operation.make({\n meta: {\n key: 'org.dxos.function.agent.get-context',\n name: 'Get Agent Context',\n description: 'Get the context of an agent.',\n },\n input: Schema.Struct({}),\n output: Schema.Struct({\n id: Schema.String,\n name: Schema.String,\n instructions: Schema.String,\n plan: Schema.String,\n artifacts: Schema.Array(\n Schema.Struct({\n name: Schema.String,\n type: Schema.optional(Schema.String),\n dxn: Schema.optional(Schema.String),\n }),\n ),\n }),\n services: [AiContext.Service, Database.Service],\n}).pipe(Operation.intrinsic);\n\nexport const AddArtifact = Operation.make({\n meta: {\n key: 'org.dxos.function.agent.add-artifact',\n name: 'Add artifact',\n description: 'Adds a new artifact.',\n },\n input: Schema.Struct({\n name: Schema.String.annotations({\n description: 'The name of the artifact to add.',\n }),\n artifact: Ref.Ref(Obj.Unknown).annotations({\n description: 'The artifact to add. Do NOT guess or try to generate the ID.',\n }),\n }),\n output: Schema.Void,\n services: [AiContext.Service, Database.Service],\n}).pipe(Operation.intrinsic);\n"],
5
+ "mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,WAAWC,qBAAqB;AACzC,SAASC,iBAAiB;AAC1B,SAASC,OAAOC,cAAcC,WAAWC,yBAAyB;AAClE,SAASC,UAAUC,MAAMC,KAAKC,WAAW;AACzC,SAASC,oBAAoB;AAItB,IAAMC,cAAcC,UAAUC,KAAK;EACxCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,OAAcC,eAAQ,MAAMC,IAAIA,IAAIC,cAAMA,KAAK,CAAA;IAC/CC,QAAeC,gBAAgBC,aAAM;IACrCC,OAAcF,gBAASG,aAAaA,YAAY;EAClD,CAAA;EACAC,QAAeC;EACfC,UAAU;IACRC,UAAUA;IACVC,SAASC;IACTC;IACAC,KAAKC;IACLC,kBAAkBJ;IAClBK,MAAMC;IACNC,cAAcC;;AAElB,CAAA,EAAGC,KAAK/B,UAAUgC,SAAS;AAEpB,IAAMC,YAAYjC,UAAUC,KAAK;EACtCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aACE;EACJ;EACAC,OAAcC,cAAO;IACnBC,OAAcC,eAAQ,MAAMC,IAAIA,IAAIC,cAAMA,KAAK,CAAA;IAC/CI,OAAOC,aAAaA;EACtB,CAAA;EACAC,QAAeC;EACfC,UAAU;IAACC,UAAUA;IAAWC,SAASC;IAASE,KAAKC;;AACzD,CAAA,EAAGM,KAAK/B,UAAUgC,SAAS;AAEpB,IAAME,aAAalC,UAAUC,KAAK;EACvCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO,CAAC,CAAA;EACtBU,QAAeV,cAAO;IACpB4B,IAAWrB;IACXV,MAAaU;IACbsB,cAAqBtB;IACrBuB,MAAavB;IACbwB,WAAkBC,aACThC,cAAO;MACZH,MAAaU;MACb0B,MAAa3B,gBAAgBC,aAAM;MACnC2B,KAAY5B,gBAAgBC,aAAM;IACpC,CAAA,CAAA;EAEJ,CAAA;EACAK,UAAU;IAACuB,UAAUpB;IAASD,SAASC;;AACzC,CAAA,EAAGS,KAAK/B,UAAUgC,SAAS;AAEpB,IAAMW,cAAc3C,UAAUC,KAAK;EACxCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBH,MAAaU,cAAO8B,YAAY;MAC9BvC,aAAa;IACf,CAAA;IACAwC,UAAUnC,IAAIA,IAAIoC,IAAIC,OAAO,EAAEH,YAAY;MACzCvC,aAAa;IACf,CAAA;EACF,CAAA;EACAY,QAAeC;EACfC,UAAU;IAACuB,UAAUpB;IAASD,SAASC;;AACzC,CAAA,EAAGS,KAAK/B,UAAUgC,SAAS;",
6
+ "names": ["Schema", "AiService", "OpaqueToolkit", "AiContext", "Trace", "TriggerEvent", "Operation", "OperationRegistry", "Database", "Feed", "Obj", "Ref", "QueueService", "AgentWorker", "Operation", "make", "meta", "key", "name", "description", "input", "Struct", "agent", "suspend", "Ref", "Agent", "prompt", "optional", "String", "event", "TriggerEvent", "output", "Void", "services", "AiService", "Database", "Service", "QueueService", "Feed", "FeedService", "OperationRegistry", "Trace", "TraceService", "OpaqueToolkit", "OpaqueToolkitProvider", "pipe", "intrinsic", "Qualifier", "GetContext", "id", "instructions", "plan", "artifacts", "Array", "type", "dxn", "AiContext", "AddArtifact", "annotations", "artifact", "Obj", "Unknown"]
7
+ }
@@ -22,11 +22,10 @@ var SyncIssues = Operation.make({
22
22
 
23
23
  // src/sync/sync.ts
24
24
  import * as Effect from "effect/Effect";
25
- import { Filter, Obj, Query, Ref } from "@dxos/echo";
26
- import { Database as Database2 } from "@dxos/echo";
25
+ import { Database as Database2, Filter, Obj, Query, Ref } from "@dxos/echo";
27
26
  import { failedInvariant } from "@dxos/invariant";
28
27
  import { log } from "@dxos/log";
29
- var __dxlog_file = "/__w/dxos/dxos/packages/core/assistant-toolkit/src/sync/sync.ts";
28
+ var __dxlog_file = "/__w/dxos/dxos/packages/core/compute/assistant-toolkit/src/sync/sync.ts";
30
29
  var syncObjects = Effect.fn("syncObjects")(function* (objs, { foreignKeyId }) {
31
30
  return yield* Effect.forEach(objs, Effect.fnUntraced(function* (obj) {
32
31
  for (const key of Object.keys(obj)) {
@@ -61,7 +60,7 @@ var syncObjects = Effect.fn("syncObjects")(function* (objs, { foreignKeyId }) {
61
60
  type: Obj.getTypename(obj),
62
61
  foreignId,
63
62
  existing: existing ? Obj.getDXN(existing) : void 0
64
- }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 48, S: this });
63
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 47, S: this });
65
64
  if (!existing) {
66
65
  yield* Database2.add(obj);
67
66
  return obj;
@@ -105,4 +104,4 @@ export {
105
104
  SyncIssues,
106
105
  syncObjects
107
106
  };
108
- //# sourceMappingURL=chunk-KY2TIPJ5.mjs.map
107
+ //# sourceMappingURL=chunk-MMQ7HFL4.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/blueprints/linear/functions/definitions.ts", "../../../src/sync/sync.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Credential, Operation } from '@dxos/compute';\nimport { Database } from '@dxos/echo';\n\nexport const SyncIssues = Operation.make({\n meta: {\n key: 'org.dxos.function.linear.sync-issues',\n name: 'Linear',\n description: 'Sync issues from Linear.',\n },\n input: Schema.Struct({\n team: Schema.String.annotations({\n description: 'Linear team id.',\n }),\n }),\n output: Schema.Any,\n services: [Credential.CredentialsService, Database.Service],\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Database, Filter, Obj, Query, Ref } from '@dxos/echo';\nimport { failedInvariant } from '@dxos/invariant';\nimport { log } from '@dxos/log';\n\n/**\n * Syncs objects to the database.\n * If there's an object with a matching foreign key in the database, it will be updated.\n * Otherwise, a new object will be added.\n * Recursively syncs top-level refs.\n *\n * @param opts.foreignKeyId - The key to use for matching objects.\n */\nexport const syncObjects: (\n objs: Obj.Unknown[],\n opts: { foreignKeyId: string },\n) => Effect.Effect<Obj.Unknown[], never, Database.Service> = Effect.fn('syncObjects')(function* (\n objs,\n { foreignKeyId },\n) {\n return yield* Effect.forEach(\n objs,\n Effect.fnUntraced(function* (obj) {\n // Sync referenced objects.\n for (const key of Object.keys(obj)) {\n if (typeof key !== 'string' || key === 'id') {\n continue;\n }\n if (!Ref.isRef((obj as any)[key])) {\n continue;\n }\n const ref: Ref.Unknown = (obj as any)[key];\n if (!ref.target) {\n continue;\n }\n if (Obj.getDXN(ref.target).isLocalObjectId()) {\n // obj not persisted to db.\n const [target] = yield* syncObjects([ref.target], { foreignKeyId });\n (obj as any)[key] = Ref.make(target);\n }\n }\n\n const schema = Obj.getSchema(obj) ?? failedInvariant('No schema.');\n const foreignId = Obj.getKeys(obj, foreignKeyId)[0]?.id ?? failedInvariant('No foreign key.');\n const [existing] = yield* Database.runQuery(\n Query.select(Filter.foreignKeys(schema, [{ source: foreignKeyId, id: foreignId }])),\n );\n log('sync object', {\n type: Obj.getTypename(obj),\n foreignId,\n existing: existing ? Obj.getDXN(existing) : undefined,\n });\n if (!existing) {\n yield* Database.add(obj);\n return obj;\n } else {\n copyObjectData(existing, obj);\n return existing;\n }\n }),\n { concurrency: 1 },\n );\n});\n\nconst copyObjectData = (existing: Obj.Unknown, newObj: Obj.Unknown) => {\n Obj.update(existing, (existing) => {\n // Copy properties from newObj to existing.\n for (const key of Object.keys(newObj)) {\n if (typeof key !== 'string' || key === 'id') {\n continue;\n }\n if (\n typeof (newObj as any)[key] !== 'string' &&\n typeof (newObj as any)[key] !== 'number' &&\n typeof (newObj as any)[key] !== 'boolean' &&\n !Ref.isRef((newObj as any)[key])\n ) {\n continue;\n }\n (existing as any)[key] = (newObj as any)[key];\n }\n\n // Delete properties that don't exist in newObj.\n for (const key of Object.keys(existing)) {\n if (typeof key !== 'string' || key === 'id') {\n continue;\n }\n if (!(key in newObj)) {\n delete (existing as any)[key];\n }\n }\n\n // Update foreign keys.\n for (const foreignKey of Obj.getMeta(newObj).keys) {\n Obj.deleteKeys(existing, foreignKey.source);\n // TODO(dmaretskyi): Doesn't work: `Obj.getMeta(existing).keys.push(foreignKey);`\n Obj.getMeta(existing).keys.push({ ...foreignKey });\n }\n });\n};\n"],
5
+ "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,iBAAiB;AACtC,SAASC,gBAAgB;AAElB,IAAMC,aAAaF,UAAUG,KAAK;EACvCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,MAAaC,cAAOC,YAAY;MAC9BL,aAAa;IACf,CAAA;EACF,CAAA;EACAM,QAAeC;EACfC,UAAU;IAAChB,WAAWiB;IAAoBf,SAASgB;;AACrD,CAAA;;;AClBA,YAAYC,YAAY;AAExB,SAASC,YAAAA,WAAUC,QAAQC,KAAKC,OAAOC,WAAW;AAClD,SAASC,uBAAuB;AAChC,SAASC,WAAW;AAEpB,IAAA,eAAA;AAkBM,IAAA,cAA2B,UAAA,aAAA,EAAA,WAAA,MAAA,EAAA,aAAA,GAAA;SAC3B,OAAWC,eAAcC,MAAW,kBAAA,WAAA,KAAA;eAEhC,OAAA,OAAA,KAAA,GAAA,GAAA;AACF,UAAA,OAAA,QAAA,YAAA,QAAA,MAAA;AACI;;AAEJ,UAAA,CAAA,IAAA,MAAA,IAAA,GAAA,CAAA,GAAA;AACA;MACA;YACE,MAAA,IAAA,GAAA;AACF,UAAA,CAAA,IAAA,QAAA;AACIN;;UAEF,IAAA,OAAOO,IAAO,MAAG,EAAA,gBAAmB,GAAA;cAAc,CAAA,MAAA,IAAA,OAAA,YAAA;UAAEC,IAAAA;QAAa,GAAA;UACpDH;QACf,CAAA;AACF,YAAA,GAAA,IAAA,IAAA,KAAA,MAAA;MAEA;IACA;AACA,UAAM,SAACI,IAAY,UAAOX,GAAAA,KAASY,gBAC3BC,YAAcC;UAAqB,YAAA,IAAA,QAAA,KAAA,YAAA,EAAA,CAAA,GAAA,MAAA,gBAAA,iBAAA;mBAAEC,IAAQL,OAAAA,UAAAA,SAAAA,MAAAA,OAAAA,OAAAA,YAAAA,QAAAA;;QAA4B,QAAA;QAAE,IAAA;MAE/E;;QAEFM,eAAAA;MACAL,MAAAA,IAAUA,YAAWT,GAAIe;MAC3B;MACI,UAACN,WAAU,IAAA,OAAA,QAAA,IAAA;qBACNX,YAAakB,GAAAA,cAAAA,GAAAA,IAAAA,GAAAA,KAAAA,CAAAA;QACpB,CAAA,UAAOA;AACT,aAAOlB,UAAA,IAAA,GAAA;AACLmB,aAAAA;WACA;AACF,qBAAA,UAAA,GAAA;AAEF,aAAA;IAAEC;EAAe,CAAA,GAAA;IAElB,aAAA;EAEH,CAAA;;qBAEI,CAAA,UAAA,WAAA;MACA,OAAK,UAAMb,CAAOc,cAAW;eAEzB,OAAA,OAAA,KAAA,MAAA,GAAA;AACF,UAAA,OAAA,QAAA,YAAA,QAAA,MAAA;AAEE;;AAMF,UAAA,OAAA,OAAA,GAAA,MAAA,YAAA,OAAA,OAAA,GAAA,MAAA,YAAA,OAAA,OAAA,GAAA,MAAA,aAAA,CAAA,IAAA,MAAA,OAAA,GAAA,CAAA,GAAA;AACCV;MACH;AAEA,MAAAA,UAAA,GAAA,IAAA,OAAA,GAAA;IACA;eAEI,OAAA,OAAA,KAAAA,SAAA,GAAA;AACF,UAAA,OAAA,QAAA,YAAA,QAAA,MAAA;AACI;;AAEJ,UAAA,EAAA,OAAA,SAAA;AACF,eAAAA,UAAA,GAAA;MAEA;IACA;eAEE,cAAA,IAAA,QAAA,MAAA,EAAA,MAAA;AACAT,UAAIoB,WAAQX,WAAUH,WAAU,MAAA;AAAgB,UAAA,QAAAG,SAAA,EAAA,KAAA,KAAA;QAClD,GAAA;MACF,CAAA;IACF;;;",
6
+ "names": ["Schema", "Credential", "Operation", "Database", "SyncIssues", "make", "meta", "key", "name", "description", "input", "Struct", "team", "String", "annotations", "output", "Any", "services", "CredentialsService", "Service", "Effect", "Database", "Filter", "Obj", "Query", "Ref", "failedInvariant", "log", "key", "keys", "target", "foreignKeyId", "existing", "runQuery", "select", "foreignKeys", "source", "foreignId", "getDXN", "obj", "copyObjectData", "concurrency", "Object", "getMeta"]
7
+ }
@@ -0,0 +1,65 @@
1
+ import {
2
+ Agent_exports,
3
+ Plan_exports
4
+ } from "./chunk-5GPL2WXU.mjs";
5
+
6
+ // src/blueprints/planning/functions/update-tasks.ts
7
+ import * as Effect from "effect/Effect";
8
+ import * as Schema from "effect/Schema";
9
+ import { AiContext } from "@dxos/assistant";
10
+ import { Operation } from "@dxos/compute";
11
+ import { Database, Obj } from "@dxos/echo";
12
+ import { trim } from "@dxos/util";
13
+
14
+ // raw-loader:/__w/dxos/dxos/packages/core/compute/assistant-toolkit/src/blueprints/planning/functions/update-tasks.md?raw
15
+ var update_tasks_default = '## PLANNING TOOL\n\nThis tool maintains an organized task list.\nUse this to track progress, break down objectives, and ensure thoroughness.\nIf you are asked to create a plan use this tool instead of creating a new document.\nAfter creating initial tasks, update them silently without announcing changes to the user.\nImportant: Do not show or summarize the contents of the task list unless the user asks for this.\n\n### CORE USAGE PRINCIPLES\n\nCreate and manage tasks for: multi-step objectives requiring 3+ distinct actions, complex projects needing careful sequencing,\nuser requests for task organization, multiple deliverables provided together, new instructions (capture as tasks immediately with new IDs),\ncompleted work (mark `done` and add follow-ups), and active work (mark as `in-progress`, limit one at a time).\n\nSkip task management for: single straightforward actions, simple requests achievable in 1-2 steps,\ninformational queries, quick lookups or clarifications, and avoid creating verification tasks unless requested.\n\n### TOOL SPECIFICATION\n\n`update-tasks` requires an array of task objects. Each task object contains:\n\n- id (string, required): unique identifier like "task_1" or "research_sources"\n- title (string, optional): update to clarify or refine task description\n- status (string, optional): `todo` | `in-progress` | `done`\n\nTask status meanings: \'todo\' means not yet started, `in-progress` means currently being worked on, `done` means completed successfully.\n\n### OPERATIONAL GUIDELINES\n\nUpdate tasks in realtime as work progresses. Mark tasks `done` immediately upon completion.\nMaintain only ONE task with `in-progress` status at a time. Complete current tasks before starting new ones.\nUse specific, actionable task titles. Break complex work into manageable logical pieces.\nBatch task updates with other actions when possible for efficiency.\n\n### USAGE EXAMPLES\n\n<example type="research_project">\n<user_message>I need to research sustainable packaging options and write a report comparing costs and environmental impact.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: "research_materials", title: "Research sustainable packaging materials", status: "in-progress"}\n2. {id: "compare_costs", title: "Compile cost comparison data", status: "todo"}\n3. {id: "assess_impact", title: "Evaluate environmental impact metrics", status: "todo"}\n4. {id: "draft_report", title: "Write comparative analysis report", status: "todo"}\n\nBegins research work immediately in same response.\n</assistant_action>\n<reasoning>Multi-phase project requiring systematic tracking across research, analysis, and writing stages.</reasoning>\n</example>\n\n<example type="event_planning">\n<user_message>Help me plan a team retreat - venue, agenda, catering, and send invitations.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: "venue_options", title: "Research and recommend venues", status: "in-progress"}\n2. {id: "draft_agenda", title: "Create retreat agenda", status: "todo"}\n3. {id: "arrange_catering", title: "Coordinate catering options", status: "todo"}\n4. {id: "send_invites", title: "Draft and send invitations", status: "todo"}\n</assistant_action>\n<reasoning>Multiple distinct deliverables with dependencies requiring organized tracking.</reasoning>\n</example>\n\n<example type="document_analysis">\n<user_message>Review this 30-page contract for key terms, risks, and negotiation points.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: "extract_key_terms", title: "Identify key contractual terms", status: "in-progress"}\n2. {id: "flag_risks", title: "Flag potential risks and liabilities", status: "todo"}\n3. {id: "negotiation_points", title: "Compile negotiation recommendations", status: "todo"}\n4. {id: "summary_doc", title: "Prepare executive summary", status: "todo"}\n</assistant_action>\n<reasoning>Substantial analysis work requiring methodical breakdown and systematic review.</reasoning>\n</example>\n\n<example type="multiple_deliverables">\n<user_message>I need: 1) competitor analysis for three companies, 2) SWOT analysis, 3) market positioning recommendations.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: "competitor_research", title: "Research three competitor companies", status: "in-progress"}\n2. {id: "swot_analysis", title: "Develop SWOT analysis", status: "todo"}\n3. {id: "positioning_recs", title: "Create market positioning recommendations", status: "todo"}\n</assistant_action>\n<reasoning>User provided numbered list of distinct deliverables requiring separate effort.</reasoning>\n</example>\n\n<example type="skip_simple_question">\n<user_message>What\'s the difference between renewable and sustainable energy?</user_message>\n<assistant_action>Provides explanation directly without creating tasks.</assistant_action>\n<reasoning>Informational request with no actionable work to complete or track.</reasoning>\n</example>\n\n<example type="skip_quick_lookup">\n<user_message>Find the population of Tokyo.</user_message>\n<assistant_action>Searches and provides answer without task tracking.</assistant_action>\n<reasoning>Single straightforward lookup completable immediately.</reasoning>\n</example>\n\n<example type="skip_trivial_task">\n<user_message>Summarize this 2-paragraph email.</user_message>\n<assistant_action>Provides summary directly without creating tasks.</assistant_action>\n<reasoning>Single simple action requiring no breakdown or progress tracking.</reasoning>\n</example>\n\n<example type="skip_single_action">\n<user_message>Check if my flight is on time.</user_message>\n<assistant_action>Performs lookup and reports status without task management.</assistant_action>\n<reasoning>One-step action with immediate completion, no organizational benefit from tasks.</reasoning>\n</example>\n\n### BEST PRACTICES\n\nFor task creation: use descriptive unique IDs reflecting the work, start first task as `in-progress`, batch initial creation with beginning work.\nFor progress tracking: update status immediately upon completion, keep only one `in-progress` task unless parallel work is natural, add follow-up tasks as they emerge. For task breakdown: aim for reasonably-scoped tasks, group related small actions into logical units, split tasks requiring different approaches.\n\nWhen uncertain whether to use task management, err on the side of creating tasks.\nProactive organization demonstrates thoroughness and ensures comprehensive work completion.\n';
16
+
17
+ // src/blueprints/planning/functions/update-tasks.ts
18
+ var SimpleTask = Plan_exports.Task.omit("chat");
19
+ var UpdateTasks = Operation.make({
20
+ meta: {
21
+ key: "org.dxos.function.planning.update-tasks",
22
+ name: "Update tasks",
23
+ description: update_tasks_default
24
+ },
25
+ input: Schema.Struct({
26
+ tasks: Schema.Array(SimpleTask)
27
+ }),
28
+ output: Schema.Any,
29
+ services: [
30
+ AiContext.Service,
31
+ Database.Service
32
+ ]
33
+ });
34
+ var update_tasks_default2 = UpdateTasks.pipe(Operation.withHandler(Effect.fn(function* ({ tasks: newTasks }) {
35
+ const agent = yield* Agent_exports.getFromChatContext;
36
+ const plan = yield* Database.load(agent.plan);
37
+ Obj.update(plan, (plan2) => {
38
+ for (const task of newTasks) {
39
+ const existingTask = plan2.tasks.find((t) => t.id === task.id);
40
+ if (existingTask) {
41
+ existingTask.title = task.title;
42
+ existingTask.status = task.status;
43
+ } else {
44
+ plan2.tasks.push({
45
+ id: task.id,
46
+ title: task.title,
47
+ status: task.status
48
+ });
49
+ }
50
+ }
51
+ });
52
+ return trim`
53
+ You must update the task status to 'in-progress' when you start and 'done' when complete.
54
+ Current plan updated:
55
+ <plan>
56
+ ${Plan_exports.formatPlan(plan)}
57
+ </plan>
58
+ `;
59
+ })));
60
+
61
+ export {
62
+ UpdateTasks,
63
+ update_tasks_default2 as update_tasks_default
64
+ };
65
+ //# sourceMappingURL=chunk-PLGEBNTO.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/blueprints/planning/functions/update-tasks.ts", "raw-loader:/__w/dxos/dxos/packages/core/compute/assistant-toolkit/src/blueprints/planning/functions/update-tasks.md?raw"],
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { AiContext } from '@dxos/assistant';\nimport { Operation } from '@dxos/compute';\nimport { Database, Obj } from '@dxos/echo';\nimport { trim } from '@dxos/util';\n\nimport { Plan, Agent } from '../../../types';\nimport INSTRUCTIONS from './update-tasks.md?raw';\n\nconst SimpleTask = Plan.Task.omit('chat');\n\nexport const UpdateTasks = Operation.make({\n meta: {\n key: 'org.dxos.function.planning.update-tasks', // TODO(burdon): Are hyphens allowed?\n name: 'Update tasks',\n description: INSTRUCTIONS,\n },\n input: Schema.Struct({\n tasks: Schema.Array(SimpleTask),\n }),\n output: Schema.Any,\n services: [AiContext.Service, Database.Service],\n});\n\n/**\n * Updates the planning document (Agent.plan) with the given tasks.\n */\nexport default UpdateTasks.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ tasks: newTasks }) {\n const agent = yield* Agent.getFromChatContext;\n // TODO(burdon): How to specify requirements/preconditions before calling?\n // TODO(burdon): How to report non-technical error?\n const plan = yield* Database.load(agent.plan);\n\n Obj.update(plan, (plan) => {\n for (const task of newTasks) {\n const existingTask = plan.tasks.find((t) => t.id === task.id);\n if (existingTask) {\n existingTask.title = task.title;\n existingTask.status = task.status;\n } else {\n plan.tasks.push({\n id: task.id,\n title: task.title,\n status: task.status,\n });\n }\n }\n });\n\n return trim`\n You must update the task status to 'in-progress' when you start and 'done' when complete.\n Current plan updated:\n <plan>\n ${Plan.formatPlan(plan)}\n </plan>\n `;\n }) as any,\n ),\n);\n", "## PLANNING TOOL\n\nThis tool maintains an organized task list.\nUse this to track progress, break down objectives, and ensure thoroughness.\nIf you are asked to create a plan use this tool instead of creating a new document.\nAfter creating initial tasks, update them silently without announcing changes to the user.\nImportant: Do not show or summarize the contents of the task list unless the user asks for this.\n\n### CORE USAGE PRINCIPLES\n\nCreate and manage tasks for: multi-step objectives requiring 3+ distinct actions, complex projects needing careful sequencing,\nuser requests for task organization, multiple deliverables provided together, new instructions (capture as tasks immediately with new IDs),\ncompleted work (mark `done` and add follow-ups), and active work (mark as `in-progress`, limit one at a time).\n\nSkip task management for: single straightforward actions, simple requests achievable in 1-2 steps,\ninformational queries, quick lookups or clarifications, and avoid creating verification tasks unless requested.\n\n### TOOL SPECIFICATION\n\n`update-tasks` requires an array of task objects. Each task object contains:\n\n- id (string, required): unique identifier like \"task_1\" or \"research_sources\"\n- title (string, optional): update to clarify or refine task description\n- status (string, optional): `todo` | `in-progress` | `done`\n\nTask status meanings: 'todo' means not yet started, `in-progress` means currently being worked on, `done` means completed successfully.\n\n### OPERATIONAL GUIDELINES\n\nUpdate tasks in realtime as work progresses. Mark tasks `done` immediately upon completion.\nMaintain only ONE task with `in-progress` status at a time. Complete current tasks before starting new ones.\nUse specific, actionable task titles. Break complex work into manageable logical pieces.\nBatch task updates with other actions when possible for efficiency.\n\n### USAGE EXAMPLES\n\n<example type=\"research_project\">\n<user_message>I need to research sustainable packaging options and write a report comparing costs and environmental impact.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: \"research_materials\", title: \"Research sustainable packaging materials\", status: \"in-progress\"}\n2. {id: \"compare_costs\", title: \"Compile cost comparison data\", status: \"todo\"}\n3. {id: \"assess_impact\", title: \"Evaluate environmental impact metrics\", status: \"todo\"}\n4. {id: \"draft_report\", title: \"Write comparative analysis report\", status: \"todo\"}\n\nBegins research work immediately in same response.\n</assistant_action>\n<reasoning>Multi-phase project requiring systematic tracking across research, analysis, and writing stages.</reasoning>\n</example>\n\n<example type=\"event_planning\">\n<user_message>Help me plan a team retreat - venue, agenda, catering, and send invitations.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: \"venue_options\", title: \"Research and recommend venues\", status: \"in-progress\"}\n2. {id: \"draft_agenda\", title: \"Create retreat agenda\", status: \"todo\"}\n3. {id: \"arrange_catering\", title: \"Coordinate catering options\", status: \"todo\"}\n4. {id: \"send_invites\", title: \"Draft and send invitations\", status: \"todo\"}\n</assistant_action>\n<reasoning>Multiple distinct deliverables with dependencies requiring organized tracking.</reasoning>\n</example>\n\n<example type=\"document_analysis\">\n<user_message>Review this 30-page contract for key terms, risks, and negotiation points.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: \"extract_key_terms\", title: \"Identify key contractual terms\", status: \"in-progress\"}\n2. {id: \"flag_risks\", title: \"Flag potential risks and liabilities\", status: \"todo\"}\n3. {id: \"negotiation_points\", title: \"Compile negotiation recommendations\", status: \"todo\"}\n4. {id: \"summary_doc\", title: \"Prepare executive summary\", status: \"todo\"}\n</assistant_action>\n<reasoning>Substantial analysis work requiring methodical breakdown and systematic review.</reasoning>\n</example>\n\n<example type=\"multiple_deliverables\">\n<user_message>I need: 1) competitor analysis for three companies, 2) SWOT analysis, 3) market positioning recommendations.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: \"competitor_research\", title: \"Research three competitor companies\", status: \"in-progress\"}\n2. {id: \"swot_analysis\", title: \"Develop SWOT analysis\", status: \"todo\"}\n3. {id: \"positioning_recs\", title: \"Create market positioning recommendations\", status: \"todo\"}\n</assistant_action>\n<reasoning>User provided numbered list of distinct deliverables requiring separate effort.</reasoning>\n</example>\n\n<example type=\"skip_simple_question\">\n<user_message>What's the difference between renewable and sustainable energy?</user_message>\n<assistant_action>Provides explanation directly without creating tasks.</assistant_action>\n<reasoning>Informational request with no actionable work to complete or track.</reasoning>\n</example>\n\n<example type=\"skip_quick_lookup\">\n<user_message>Find the population of Tokyo.</user_message>\n<assistant_action>Searches and provides answer without task tracking.</assistant_action>\n<reasoning>Single straightforward lookup completable immediately.</reasoning>\n</example>\n\n<example type=\"skip_trivial_task\">\n<user_message>Summarize this 2-paragraph email.</user_message>\n<assistant_action>Provides summary directly without creating tasks.</assistant_action>\n<reasoning>Single simple action requiring no breakdown or progress tracking.</reasoning>\n</example>\n\n<example type=\"skip_single_action\">\n<user_message>Check if my flight is on time.</user_message>\n<assistant_action>Performs lookup and reports status without task management.</assistant_action>\n<reasoning>One-step action with immediate completion, no organizational benefit from tasks.</reasoning>\n</example>\n\n### BEST PRACTICES\n\nFor task creation: use descriptive unique IDs reflecting the work, start first task as `in-progress`, batch initial creation with beginning work.\nFor progress tracking: update status immediately upon completion, keep only one `in-progress` task unless parallel work is natural, add follow-up tasks as they emerge. For task breakdown: aim for reasonably-scoped tasks, group related small actions into logical units, split tasks requiring different approaches.\n\nWhen uncertain whether to use task management, err on the side of creating tasks.\nProactive organization demonstrates thoroughness and ensures comprehensive work completion.\n"],
5
+ "mappings": ";;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,UAAUC,WAAW;AAC9B,SAASC,YAAY;;;ACVrB;;;ADeA,IAAMC,aAAaC,aAAKC,KAAKC,KAAK,MAAA;AAE3B,IAAMC,cAAcC,UAAUC,KAAK;EACxCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAaC;EACf;EACAC,OAAcC,cAAO;IACnBC,OAAcC,aAAMf,UAAAA;EACtB,CAAA;EACAgB,QAAeC;EACfC,UAAU;IAACC,UAAUC;IAASC,SAASD;;AACzC,CAAA;AAKA,IAAAE,wBAAelB,YAAYmB,KACzBlB,UAAUmB,YACDC,UAAG,WAAW,EAAEX,OAAOY,SAAQ,GAAE;AACtC,QAAMC,QAAQ,OAAOC,cAAMC;AAG3B,QAAMC,OAAO,OAAOT,SAASU,KAAKJ,MAAMG,IAAI;AAE5CE,MAAIC,OAAOH,MAAM,CAACA,UAAAA;AAChB,eAAWI,QAAQR,UAAU;AAC3B,YAAMS,eAAeL,MAAKhB,MAAMsB,KAAK,CAACC,MAAMA,EAAEC,OAAOJ,KAAKI,EAAE;AAC5D,UAAIH,cAAc;AAChBA,qBAAaI,QAAQL,KAAKK;AAC1BJ,qBAAaK,SAASN,KAAKM;MAC7B,OAAO;AACLV,QAAAA,MAAKhB,MAAM2B,KAAK;UACdH,IAAIJ,KAAKI;UACTC,OAAOL,KAAKK;UACZC,QAAQN,KAAKM;QACf,CAAA;MACF;IACF;EACF,CAAA;AAEA,SAAOE;;;;YAIDzC,aAAK0C,WAAWb,IAAAA,CAAAA;;;AAGxB,CAAA,CAAA,CAAA;",
6
+ "names": ["Effect", "Schema", "AiContext", "Operation", "Database", "Obj", "trim", "SimpleTask", "Plan", "Task", "omit", "UpdateTasks", "Operation", "make", "meta", "key", "name", "description", "INSTRUCTIONS", "input", "Struct", "tasks", "Array", "output", "Any", "services", "AiContext", "Service", "Database", "update_tasks_default", "pipe", "withHandler", "fn", "newTasks", "agent", "Agent", "getFromChatContext", "plan", "load", "Obj", "update", "task", "existingTask", "find", "t", "id", "title", "status", "push", "trim", "formatPlan"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AddArtifact
3
- } from "./chunk-E2XRNXWP.mjs";
3
+ } from "./chunk-KS3IA6FQ.mjs";
4
4
 
5
5
  // src/blueprints/project/blueprint.ts
6
6
  import { Blueprint, Template } from "@dxos/compute";
@@ -8,7 +8,7 @@ import { trim } from "@dxos/util";
8
8
 
9
9
  // src/blueprints/project/functions/index.ts
10
10
  import { OperationHandlerSet } from "@dxos/compute";
11
- var AgentBlueprintHandlers = OperationHandlerSet.lazy(() => import("./add-artifact-BA5WQRDU.mjs"), () => import("./agent-M2EW5M36.mjs"), () => import("./get-context-B55SX5Y4.mjs"), () => import("./qualifier-2AC2ICOB.mjs"));
11
+ var AgentBlueprintHandlers = OperationHandlerSet.lazy(() => import("./add-artifact-4IVGW6CI.mjs"), () => import("./agent-F4L7UXME.mjs"), () => import("./get-context-FBYWIP72.mjs"), () => import("./qualifier-DAF4H7V3.mjs"));
12
12
 
13
13
  // src/blueprints/project/blueprint.ts
14
14
  var BLUEPRINT_KEY = "org.dxos.blueprint.agent";
@@ -46,8 +46,8 @@ var make = () => Blueprint.make({
46
46
  inputs: [
47
47
  {
48
48
  name: "agent",
49
- kind: "function",
50
- function: "org.dxos.function.agent.get-context"
49
+ kind: "operation",
50
+ operation: "org.dxos.function.agent.get-context"
51
51
  }
52
52
  ]
53
53
  }),
@@ -67,4 +67,4 @@ export {
67
67
  AgentBlueprintHandlers,
68
68
  blueprint_default
69
69
  };
70
- //# sourceMappingURL=chunk-JCYLFOFK.mjs.map
70
+ //# sourceMappingURL=chunk-W2722TC5.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/blueprints/project/blueprint.ts", "../../../src/blueprints/project/functions/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Blueprint, Template } from '@dxos/compute';\nimport { trim } from '@dxos/util';\n\nimport { AddArtifact } from './functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.agent';\n\n/**\n * Creates the Agent blueprint. This is a function to avoid circular dependency issues.\n */\n// TODO(dmaretskyi): Combine with Agent Wizard.\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Agent blueprint',\n instructions: Template.make({\n source: trim`\n You work on an agent. Each agent has instructions - the goal of the agent.\n The agent plan shows the current progress of the agent.\n Agent has a number of associated artifacts you can read/write.\n You can edit them if necessary.\n\n IMPORTANT: When creating a new artifact, always add it to the agent using the add-artifact function.\n\n {{#with agent}}\n <agent id=\"{{id}}\" name=\"{{name}}\">\n <instructions>\n {{instructions}}\n </instructions>\n <plan>\n {{plan}}\n </plan>\n\n <artifacts>\n {{#each artifacts}}\n <artifact type=\"{{type}}\" dxn=\"{{dxn}}\">\n {{name}}\n </artifact>\n {{/each}}\n </artifacts>\n </agent>\n {{/with}}\n `,\n inputs: [\n {\n name: 'agent',\n kind: 'function',\n function: 'org.dxos.function.agent.get-context',\n },\n ],\n }),\n tools: Blueprint.toolDefinitions({ operations: [AddArtifact] }),\n });\n\nconst blueprint: Blueprint.Definition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport * from './definitions';\n\nexport const AgentBlueprintHandlers = OperationHandlerSet.lazy(\n () => import('./add-artifact'),\n () => import('./agent'),\n () => import('./get-context'),\n () => import('./qualifier'),\n);\n"],
5
- "mappings": ";;;;;AAIA,SAASA,WAAWC,gBAAgB;AACpC,SAASC,YAAY;;;ACDrB,SAASC,2BAA2B;AAI7B,IAAMC,yBAAyBD,oBAAoBE,KACxD,MAAM,OAAO,6BAAA,GACb,MAAM,OAAO,sBAAA,GACb,MAAM,OAAO,4BAAA,GACb,MAAM,OAAO,0BAAA,CAAA;;;ADHf,IAAMC,gBAAgB;AAMtB,IAAMC,OAAO,MACXC,UAAUD,KAAK;EACbE,KAAKH;EACLI,MAAM;EACNC,cAAcC,SAASL,KAAK;IAC1BM,QAAQC;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2BRC,QAAQ;MACN;QACEL,MAAM;QACNM,MAAM;QACNC,UAAU;MACZ;;EAEJ,CAAA;EACAC,OAAOV,UAAUW,gBAAgB;IAAEC,YAAY;MAACC;;EAAa,CAAA;AAC/D,CAAA;AAEF,IAAMC,YAAkC;EACtCb,KAAKH;EACLC;AACF;AAEA,IAAA,oBAAee;",
6
- "names": ["Blueprint", "Template", "trim", "OperationHandlerSet", "AgentBlueprintHandlers", "lazy", "BLUEPRINT_KEY", "make", "Blueprint", "key", "name", "instructions", "Template", "source", "trim", "inputs", "kind", "function", "tools", "toolDefinitions", "operations", "AddArtifact", "blueprint"]
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Blueprint, Template } from '@dxos/compute';\nimport { trim } from '@dxos/util';\n\nimport { AddArtifact } from './functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.agent';\n\n/**\n * Creates the Agent blueprint. This is a function to avoid circular dependency issues.\n */\n// TODO(dmaretskyi): Combine with Agent Wizard.\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Agent blueprint',\n instructions: Template.make({\n source: trim`\n You work on an agent. Each agent has instructions - the goal of the agent.\n The agent plan shows the current progress of the agent.\n Agent has a number of associated artifacts you can read/write.\n You can edit them if necessary.\n\n IMPORTANT: When creating a new artifact, always add it to the agent using the add-artifact function.\n\n {{#with agent}}\n <agent id=\"{{id}}\" name=\"{{name}}\">\n <instructions>\n {{instructions}}\n </instructions>\n <plan>\n {{plan}}\n </plan>\n\n <artifacts>\n {{#each artifacts}}\n <artifact type=\"{{type}}\" dxn=\"{{dxn}}\">\n {{name}}\n </artifact>\n {{/each}}\n </artifacts>\n </agent>\n {{/with}}\n `,\n inputs: [\n {\n name: 'agent',\n kind: 'operation',\n operation: 'org.dxos.function.agent.get-context',\n },\n ],\n }),\n tools: Blueprint.toolDefinitions({ operations: [AddArtifact] }),\n });\n\nconst blueprint: Blueprint.Definition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport * from './definitions';\n\nexport const AgentBlueprintHandlers = OperationHandlerSet.lazy(\n () => import('./add-artifact'),\n () => import('./agent'),\n () => import('./get-context'),\n () => import('./qualifier'),\n);\n"],
5
+ "mappings": ";;;;;AAIA,SAASA,WAAWC,gBAAgB;AACpC,SAASC,YAAY;;;ACDrB,SAASC,2BAA2B;AAI7B,IAAMC,yBAAyBD,oBAAoBE,KACxD,MAAM,OAAO,6BAAA,GACb,MAAM,OAAO,sBAAA,GACb,MAAM,OAAO,4BAAA,GACb,MAAM,OAAO,0BAAA,CAAA;;;ADHf,IAAMC,gBAAgB;AAMtB,IAAMC,OAAO,MACXC,UAAUD,KAAK;EACbE,KAAKH;EACLI,MAAM;EACNC,cAAcC,SAASL,KAAK;IAC1BM,QAAQC;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2BRC,QAAQ;MACN;QACEL,MAAM;QACNM,MAAM;QACNC,WAAW;MACb;;EAEJ,CAAA;EACAC,OAAOV,UAAUW,gBAAgB;IAAEC,YAAY;MAACC;;EAAa,CAAA;AAC/D,CAAA;AAEF,IAAMC,YAAkC;EACtCb,KAAKH;EACLC;AACF;AAEA,IAAA,oBAAee;",
6
+ "names": ["Blueprint", "Template", "trim", "OperationHandlerSet", "AgentBlueprintHandlers", "lazy", "BLUEPRINT_KEY", "make", "Blueprint", "key", "name", "instructions", "Template", "source", "trim", "inputs", "kind", "operation", "tools", "toolDefinitions", "operations", "AddArtifact", "blueprint"]
7
7
  }
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  ContextAdd
3
- } from "./chunk-CVUA23QI.mjs";
3
+ } from "./chunk-7UCYAP3T.mjs";
4
4
  import "./chunk-J5LGTIGS.mjs";
5
5
 
6
6
  // src/blueprints/database/functions/context-add.ts
7
7
  import * as Effect from "effect/Effect";
8
- import { AiContextService } from "@dxos/assistant";
8
+ import { AiContext } from "@dxos/assistant";
9
9
  import { Operation } from "@dxos/compute";
10
10
  var context_add_default = ContextAdd.pipe(Operation.withHandler(Effect.fn(function* ({ obj }) {
11
- const { binder } = yield* AiContextService;
11
+ const { binder } = yield* AiContext.Service;
12
12
  yield* Effect.promise(() => binder.bind({
13
13
  blueprints: [],
14
14
  objects: [
@@ -19,4 +19,4 @@ var context_add_default = ContextAdd.pipe(Operation.withHandler(Effect.fn(functi
19
19
  export {
20
20
  context_add_default as default
21
21
  };
22
- //# sourceMappingURL=context-add-IIDPRRVB.mjs.map
22
+ //# sourceMappingURL=context-add-S5MBW2NA.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/blueprints/database/functions/context-add.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { AiContext } from '@dxos/assistant';\nimport { Operation } from '@dxos/compute';\n\nimport { ContextAdd } from './definitions';\n\nexport default ContextAdd.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ obj }) {\n const { binder } = yield* AiContext.Service;\n yield* Effect.promise(() =>\n binder.bind({\n blueprints: [],\n objects: [obj],\n }),\n );\n }),\n ),\n);\n"],
5
+ "mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAI1B,IAAA,sBAAeC,WAAWC,KACxBC,UAAUC,YACDC,UAAG,WAAW,EAAEC,IAAG,GAAE;AAC1B,QAAM,EAAEC,OAAM,IAAK,OAAOC,UAAUC;AACpC,SAAcC,eAAQ,MACpBH,OAAOI,KAAK;IACVC,YAAY,CAAA;IACZC,SAAS;MAACP;;EACZ,CAAA,CAAA;AAEJ,CAAA,CAAA,CAAA;",
6
+ "names": ["Effect", "AiContext", "Operation", "ContextAdd", "pipe", "Operation", "withHandler", "fn", "obj", "binder", "AiContext", "Service", "promise", "bind", "blueprints", "objects"]
7
+ }
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  ContextRemove
3
- } from "./chunk-CVUA23QI.mjs";
3
+ } from "./chunk-7UCYAP3T.mjs";
4
4
  import "./chunk-J5LGTIGS.mjs";
5
5
 
6
6
  // src/blueprints/database/functions/context-remove.ts
7
7
  import * as Effect from "effect/Effect";
8
- import { AiContextService } from "@dxos/assistant";
8
+ import { AiContext } from "@dxos/assistant";
9
9
  import { Operation } from "@dxos/compute";
10
10
  var context_remove_default = ContextRemove.pipe(Operation.withHandler(Effect.fn(function* ({ obj }) {
11
- const { binder } = yield* AiContextService;
11
+ const { binder } = yield* AiContext.Service;
12
12
  yield* Effect.promise(() => binder.unbind({
13
13
  blueprints: [],
14
14
  objects: [
@@ -19,4 +19,4 @@ var context_remove_default = ContextRemove.pipe(Operation.withHandler(Effect.fn(
19
19
  export {
20
20
  context_remove_default as default
21
21
  };
22
- //# sourceMappingURL=context-remove-RDYV4PD4.mjs.map
22
+ //# sourceMappingURL=context-remove-35O5T5N5.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/blueprints/database/functions/context-remove.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { AiContext } from '@dxos/assistant';\nimport { Operation } from '@dxos/compute';\n\nimport { ContextRemove } from './definitions';\n\nexport default ContextRemove.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ obj }) {\n const { binder } = yield* AiContext.Service;\n yield* Effect.promise(() =>\n binder.unbind({\n blueprints: [],\n objects: [obj],\n }),\n );\n }) as any,\n ),\n);\n"],
5
+ "mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAI1B,IAAA,yBAAeC,cAAcC,KAC3BC,UAAUC,YACDC,UAAG,WAAW,EAAEC,IAAG,GAAE;AAC1B,QAAM,EAAEC,OAAM,IAAK,OAAOC,UAAUC;AACpC,SAAcC,eAAQ,MACpBH,OAAOI,OAAO;IACZC,YAAY,CAAA;IACZC,SAAS;MAACP;;EACZ,CAAA,CAAA;AAEJ,CAAA,CAAA,CAAA;",
6
+ "names": ["Effect", "AiContext", "Operation", "ContextRemove", "pipe", "Operation", "withHandler", "fn", "obj", "binder", "AiContext", "Service", "promise", "unbind", "blueprints", "objects"]
7
+ }
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  CreateAgent,
3
3
  SyncTriggers
4
- } from "./chunk-D5MG5OKX.mjs";
4
+ } from "./chunk-BCT55UTL.mjs";
5
5
  import {
6
6
  blueprint_default
7
- } from "./chunk-JCYLFOFK.mjs";
8
- import "./chunk-E2XRNXWP.mjs";
7
+ } from "./chunk-W2722TC5.mjs";
8
+ import "./chunk-KS3IA6FQ.mjs";
9
9
  import {
10
10
  Agent_exports
11
- } from "./chunk-CLHVRIYF.mjs";
11
+ } from "./chunk-5GPL2WXU.mjs";
12
12
  import "./chunk-NR3GTWRC.mjs";
13
13
  import "./chunk-KGU725LW.mjs";
14
14
  import "./chunk-J5LGTIGS.mjs";
@@ -32,4 +32,4 @@ var create_project_default = CreateAgent.pipe(Operation.withHandler(Effect.fnUnt
32
32
  export {
33
33
  create_project_default as default
34
34
  };
35
- //# sourceMappingURL=create-project-GLDEAWTT.mjs.map
35
+ //# sourceMappingURL=create-project-3AGXJ4TD.mjs.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  EnableBlueprints
3
- } from "./chunk-TO5IX24K.mjs";
3
+ } from "./chunk-ANSF2BHN.mjs";
4
4
  import "./chunk-J5LGTIGS.mjs";
5
5
 
6
6
  // src/blueprints/blueprint-manager/functions/enable-blueprints.ts
7
7
  import * as Effect from "effect/Effect";
8
- import { AiContextService } from "@dxos/assistant";
8
+ import { AiContext } from "@dxos/assistant";
9
9
  import { Blueprint, Operation } from "@dxos/compute";
10
10
  import { Ref } from "@dxos/echo";
11
11
  var enable_blueprints_default = EnableBlueprints.pipe(Operation.withHandler(Effect.fnUntraced(function* ({ keys }) {
@@ -32,7 +32,7 @@ var enable_blueprints_default = EnableBlueprints.pipe(Operation.withHandler(Effe
32
32
  enabled.push(dbBlueprint);
33
33
  }
34
34
  if (enabled.length > 0) {
35
- yield* AiContextService.bindContext({
35
+ yield* AiContext.Service.bindContext({
36
36
  blueprints: enabled.map(Ref.make)
37
37
  });
38
38
  }
@@ -44,4 +44,4 @@ var enable_blueprints_default = EnableBlueprints.pipe(Operation.withHandler(Effe
44
44
  export {
45
45
  enable_blueprints_default as default
46
46
  };
47
- //# sourceMappingURL=enable-blueprints-LBDZH2CY.mjs.map
47
+ //# sourceMappingURL=enable-blueprints-IVKST3WH.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/blueprints/blueprint-manager/functions/enable-blueprints.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { AiContext } from '@dxos/assistant';\nimport { Blueprint, Operation } from '@dxos/compute';\nimport { Ref } from '@dxos/echo';\n\nimport { EnableBlueprints } from './definitions';\n\nexport default EnableBlueprints.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ keys }) {\n const registry = yield* Blueprint.RegistryService;\n const enabled: Blueprint.Blueprint[] = [];\n const rejected: { key: string; reason: string }[] = [];\n\n for (const key of keys) {\n const blueprint = registry.getByKey(key);\n if (!blueprint) {\n rejected.push({ key, reason: 'Blueprint not found in registry.' });\n continue;\n }\n if (!blueprint.agentCanEnable) {\n rejected.push({ key, reason: 'Blueprint does not allow agent auto-enable (agentCanEnable is not set).' });\n continue;\n }\n const dbBlueprint = yield* Blueprint.upsert(key).pipe(Effect.orDie);\n enabled.push(dbBlueprint);\n }\n\n if (enabled.length > 0) {\n yield* AiContext.Service.bindContext({\n blueprints: enabled.map(Ref.make),\n });\n }\n\n return { enabled, rejected };\n }),\n ),\n);\n"],
5
+ "mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,WAAWC,iBAAiB;AACrC,SAASC,WAAW;AAIpB,IAAA,4BAAeC,iBAAiBC,KAC9BC,UAAUC,YACDC,kBAAW,WAAW,EAAEC,KAAI,GAAE;AACnC,QAAMC,WAAW,OAAOC,UAAUC;AAClC,QAAMC,UAAiC,CAAA;AACvC,QAAMC,WAA8C,CAAA;AAEpD,aAAWC,OAAON,MAAM;AACtB,UAAMO,YAAYN,SAASO,SAASF,GAAAA;AACpC,QAAI,CAACC,WAAW;AACdF,eAASI,KAAK;QAAEH;QAAKI,QAAQ;MAAmC,CAAA;AAChE;IACF;AACA,QAAI,CAACH,UAAUI,gBAAgB;AAC7BN,eAASI,KAAK;QAAEH;QAAKI,QAAQ;MAA0E,CAAA;AACvG;IACF;AACA,UAAME,cAAc,OAAOV,UAAUW,OAAOP,GAAAA,EAAKV,KAAYkB,YAAK;AAClEV,YAAQK,KAAKG,WAAAA;EACf;AAEA,MAAIR,QAAQW,SAAS,GAAG;AACtB,WAAOC,UAAUC,QAAQC,YAAY;MACnCC,YAAYf,QAAQgB,IAAIC,IAAIC,IAAI;IAClC,CAAA;EACF;AAEA,SAAO;IAAElB;IAASC;EAAS;AAC7B,CAAA,CAAA,CAAA;",
6
+ "names": ["Effect", "AiContext", "Blueprint", "Operation", "Ref", "EnableBlueprints", "pipe", "Operation", "withHandler", "fnUntraced", "keys", "registry", "Blueprint", "RegistryService", "enabled", "rejected", "key", "blueprint", "getByKey", "push", "reason", "agentCanEnable", "dbBlueprint", "upsert", "orDie", "length", "AiContext", "Service", "bindContext", "blueprints", "map", "Ref", "make"]
7
+ }
@@ -16,7 +16,7 @@ import { Credential, Trace, Operation } from "@dxos/compute";
16
16
  import { Obj } from "@dxos/echo";
17
17
  import { log } from "@dxos/log";
18
18
  import { Message } from "@dxos/types";
19
- var __dxlog_file = "/__w/dxos/dxos/packages/core/assistant-toolkit/src/blueprints/discord/functions/fetch-messages.ts";
19
+ var __dxlog_file = "/__w/dxos/dxos/packages/core/compute/assistant-toolkit/src/blueprints/discord/functions/fetch-messages.ts";
20
20
  var DiscordConfigFromCredential = Layer.unwrapEffect(Effect.gen(function* () {
21
21
  return DiscordConfig.layer({
22
22
  token: yield* Credential.CredentialsService.getApiKey({
@@ -136,4 +136,4 @@ ${thread.messages.map((message) => ` ${message.sender.name}: ${message.blocks.f
136
136
  export {
137
137
  fetch_messages_default as default
138
138
  };
139
- //# sourceMappingURL=fetch-messages-PWGUG5G3.mjs.map
139
+ //# sourceMappingURL=fetch-messages-QOBBCTGC.mjs.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  GetContext
3
- } from "./chunk-E2XRNXWP.mjs";
3
+ } from "./chunk-KS3IA6FQ.mjs";
4
4
  import {
5
5
  Agent_exports,
6
6
  Plan_exports
7
- } from "./chunk-CLHVRIYF.mjs";
7
+ } from "./chunk-5GPL2WXU.mjs";
8
8
  import "./chunk-NR3GTWRC.mjs";
9
9
  import "./chunk-KGU725LW.mjs";
10
10
  import "./chunk-J5LGTIGS.mjs";
@@ -28,8 +28,8 @@ var get_context_default = GetContext.pipe(Operation.withHandler(Effect.fnUntrace
28
28
  };
29
29
  }))
30
30
  };
31
- })));
31
+ })), Operation.opaqueHandler);
32
32
  export {
33
33
  get_context_default as default
34
34
  };
35
- //# sourceMappingURL=get-context-B55SX5Y4.mjs.map
35
+ //# sourceMappingURL=get-context-FBYWIP72.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/blueprints/project/functions/get-context.ts"],
4
- "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Operation } from '@dxos/compute';\nimport { Database, Obj } from '@dxos/echo';\n\nimport { Plan, Agent } from '../../../types';\nimport { GetContext } from './definitions';\n\nexport default GetContext.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* () {\n const agent = yield* Agent.getFromChatContext;\n\n return {\n id: agent.id,\n name: agent.name,\n instructions: yield* agent.instructions.pipe(Database.load).pipe(\n Effect.map((_) => _.content),\n Effect.catchTag('ObjectNotFoundError', () => Effect.succeed('No instructions found.')),\n ),\n plan: yield* (\n agent.plan?.pipe(Database.load).pipe(\n Effect.map(Plan.formatPlan),\n Effect.catchTag('ObjectNotFoundError', () => Effect.succeed('No plan found.')),\n ) ?? Effect.succeed('No plan found.')\n ),\n artifacts: yield* Effect.forEach(agent.artifacts, (artifact) =>\n Effect.gen(function* () {\n return {\n name: artifact.name,\n type: yield* Database.load(artifact.data).pipe(\n Effect.map(Obj.getTypename),\n Effect.catchTag('ObjectNotFoundError', () => Effect.succeed('Artifact not found.')),\n ),\n dxn: artifact.data.dxn.toString(),\n };\n }),\n ),\n };\n }) as any,\n ),\n);\n"],
5
- "mappings": ";;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,UAAUC,WAAW;AAK9B,IAAA,sBAAeC,WAAWC,KACxBC,UAAUC,YACDC,kBAAW,aAAA;AAChB,QAAMC,QAAQ,OAAOC,cAAMC;AAE3B,SAAO;IACLC,IAAIH,MAAMG;IACVC,MAAMJ,MAAMI;IACZC,cAAc,OAAOL,MAAMK,aAAaT,KAAKU,SAASC,IAAI,EAAEX,KACnDY,WAAI,CAACC,MAAMA,EAAEC,OAAO,GACpBC,gBAAS,uBAAuB,MAAaC,eAAQ,wBAAA,CAAA,CAAA;IAE9DC,MAAM,OACJb,MAAMa,MAAMjB,KAAKU,SAASC,IAAI,EAAEX,KACvBY,WAAIM,aAAKC,UAAU,GACnBJ,gBAAS,uBAAuB,MAAaC,eAAQ,gBAAA,CAAA,CAAA,KAClDA,eAAQ,gBAAA;IAEtBI,WAAW,OAAcC,eAAQjB,MAAMgB,WAAW,CAACE,aAC1CC,WAAI,aAAA;AACT,aAAO;QACLf,MAAMc,SAASd;QACfgB,MAAM,OAAOd,SAASC,KAAKW,SAASG,IAAI,EAAEzB,KACjCY,WAAIc,IAAIC,WAAW,GACnBZ,gBAAS,uBAAuB,MAAaC,eAAQ,qBAAA,CAAA,CAAA;QAE9DY,KAAKN,SAASG,KAAKG,IAAIC,SAAQ;MACjC;IACF,CAAA,CAAA;EAEJ;AACF,CAAA,CAAA,CAAA;",
6
- "names": ["Effect", "Operation", "Database", "Obj", "GetContext", "pipe", "Operation", "withHandler", "fnUntraced", "agent", "Agent", "getFromChatContext", "id", "name", "instructions", "Database", "load", "map", "_", "content", "catchTag", "succeed", "plan", "Plan", "formatPlan", "artifacts", "forEach", "artifact", "gen", "type", "data", "Obj", "getTypename", "dxn", "toString"]
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Operation } from '@dxos/compute';\nimport { Database, Obj } from '@dxos/echo';\n\nimport { Plan, Agent } from '../../../types';\nimport { GetContext } from './definitions';\n\nexport default GetContext.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* () {\n const agent = yield* Agent.getFromChatContext;\n\n return {\n id: agent.id,\n name: agent.name,\n instructions: yield* agent.instructions.pipe(Database.load).pipe(\n Effect.map((_) => _.content),\n Effect.catchTag('ObjectNotFoundError', () => Effect.succeed('No instructions found.')),\n ),\n plan: yield* (\n agent.plan?.pipe(Database.load).pipe(\n Effect.map(Plan.formatPlan),\n Effect.catchTag('ObjectNotFoundError', () => Effect.succeed('No plan found.')),\n ) ?? Effect.succeed('No plan found.')\n ),\n artifacts: yield* Effect.forEach(agent.artifacts, (artifact) =>\n Effect.gen(function* () {\n return {\n name: artifact.name,\n type: yield* Database.load(artifact.data).pipe(\n Effect.map(Obj.getTypename),\n Effect.catchTag('ObjectNotFoundError', () => Effect.succeed('Artifact not found.')),\n ),\n dxn: artifact.data.dxn.toString(),\n };\n }),\n ),\n };\n }) as any,\n ),\n Operation.opaqueHandler,\n);\n"],
5
+ "mappings": ";;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,UAAUC,WAAW;AAK9B,IAAA,sBAAeC,WAAWC,KACxBC,UAAUC,YACDC,kBAAW,aAAA;AAChB,QAAMC,QAAQ,OAAOC,cAAMC;AAE3B,SAAO;IACLC,IAAIH,MAAMG;IACVC,MAAMJ,MAAMI;IACZC,cAAc,OAAOL,MAAMK,aAAaT,KAAKU,SAASC,IAAI,EAAEX,KACnDY,WAAI,CAACC,MAAMA,EAAEC,OAAO,GACpBC,gBAAS,uBAAuB,MAAaC,eAAQ,wBAAA,CAAA,CAAA;IAE9DC,MAAM,OACJb,MAAMa,MAAMjB,KAAKU,SAASC,IAAI,EAAEX,KACvBY,WAAIM,aAAKC,UAAU,GACnBJ,gBAAS,uBAAuB,MAAaC,eAAQ,gBAAA,CAAA,CAAA,KAClDA,eAAQ,gBAAA;IAEtBI,WAAW,OAAcC,eAAQjB,MAAMgB,WAAW,CAACE,aAC1CC,WAAI,aAAA;AACT,aAAO;QACLf,MAAMc,SAASd;QACfgB,MAAM,OAAOd,SAASC,KAAKW,SAASG,IAAI,EAAEzB,KACjCY,WAAIc,IAAIC,WAAW,GACnBZ,gBAAS,uBAAuB,MAAaC,eAAQ,qBAAA,CAAA,CAAA;QAE9DY,KAAKN,SAASG,KAAKG,IAAIC,SAAQ;MACjC;IACF,CAAA,CAAA;EAEJ;AACF,CAAA,CAAA,GAEF5B,UAAU6B,aAAa;",
6
+ "names": ["Effect", "Operation", "Database", "Obj", "GetContext", "pipe", "Operation", "withHandler", "fnUntraced", "agent", "Agent", "getFromChatContext", "id", "name", "instructions", "Database", "load", "map", "_", "content", "catchTag", "succeed", "plan", "Plan", "formatPlan", "artifacts", "forEach", "artifact", "gen", "type", "data", "Obj", "getTypename", "dxn", "toString", "opaqueHandler"]
7
7
  }