@dxos/assistant-toolkit 0.8.4-main.cb12b3f963 → 0.8.4-main.d05539e30a

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 (192) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/{add-artifact-TWTWAY3H.mjs → add-artifact-4IVGW6CI.mjs} +4 -4
  3. package/dist/lib/neutral/{add-artifact-TWTWAY3H.mjs.map → add-artifact-4IVGW6CI.mjs.map} +3 -3
  4. package/dist/lib/neutral/{agent-7ROVDSSY.mjs → agent-F4L7UXME.mjs} +4 -4
  5. package/dist/lib/neutral/{agent-7ROVDSSY.mjs.map → agent-F4L7UXME.mjs.map} +2 -2
  6. package/dist/lib/neutral/{chunk-DN4LTRFN.mjs → chunk-5GPL2WXU.mjs} +34 -35
  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-OHDGJMVE.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-2Q63LLSY.mjs → chunk-KS3IA6FQ.mjs} +11 -10
  16. package/dist/lib/neutral/chunk-KS3IA6FQ.mjs.map +7 -0
  17. package/dist/lib/neutral/{chunk-ROMZO4CB.mjs → chunk-MMQ7HFL4.mjs} +3 -4
  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-2XK7EWKJ.mjs → chunk-W2722TC5.mjs} +5 -5
  22. package/dist/lib/neutral/{chunk-2XK7EWKJ.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-WEQYCL7A.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/{get-context-S735CUYM.mjs → get-context-FBYWIP72.mjs} +4 -4
  31. package/dist/lib/neutral/{get-context-S735CUYM.mjs.map → get-context-FBYWIP72.mjs.map} +3 -3
  32. package/dist/lib/neutral/index.mjs +65 -55
  33. package/dist/lib/neutral/index.mjs.map +3 -3
  34. package/dist/lib/neutral/{load-LI7HHVD6.mjs → load-GAT3T2AD.mjs} +2 -2
  35. package/dist/lib/neutral/meta.json +1 -1
  36. package/dist/lib/neutral/{object-create-ZRBHR72E.mjs → object-create-PL3WRP74.mjs} +2 -2
  37. package/dist/lib/neutral/{object-delete-I266YAXI.mjs → object-delete-PZJQN5KW.mjs} +2 -2
  38. package/dist/lib/neutral/{object-update-HY4GI7LA.mjs → object-update-R43N3VJX.mjs} +2 -2
  39. package/dist/lib/neutral/{project-KEZSS5UM.mjs → project-VVXXUMAI.mjs} +4 -4
  40. package/dist/lib/neutral/{project-rules-UGFRHIX7.mjs → project-rules-KSVSOZJV.mjs} +3 -3
  41. package/dist/lib/neutral/{prompt-NPOR2MVC.mjs → prompt-INL55Q2B.mjs} +9 -6
  42. package/dist/lib/neutral/{prompt-NPOR2MVC.mjs.map → prompt-INL55Q2B.mjs.map} +3 -3
  43. package/dist/lib/neutral/{qualifier-NW5VBP64.mjs → qualifier-DAF4H7V3.mjs} +10 -10
  44. package/dist/lib/neutral/qualifier-DAF4H7V3.mjs.map +7 -0
  45. package/dist/lib/neutral/{query-B3NOYFCK.mjs → query-MP5NSQKO.mjs} +3 -4
  46. package/dist/lib/neutral/query-MP5NSQKO.mjs.map +7 -0
  47. package/dist/lib/neutral/{query-blueprints-KXADGHSA.mjs → query-blueprints-PLWYVOI3.mjs} +2 -2
  48. package/dist/lib/neutral/{relation-create-E7VOVXHU.mjs → relation-create-YAAAFTR2.mjs} +2 -2
  49. package/dist/lib/neutral/{relation-delete-LXY7W2YO.mjs → relation-delete-IEPKERFR.mjs} +2 -2
  50. package/dist/lib/neutral/{schema-add-4TXJO2V7.mjs → schema-add-5BNIINRS.mjs} +2 -2
  51. package/dist/lib/neutral/{schema-list-PJS5AFZ3.mjs → schema-list-54UK7S4R.mjs} +2 -2
  52. package/dist/lib/neutral/{sync-issues-4YE5XAK5.mjs → sync-issues-DWY76B3M.mjs} +5 -6
  53. package/dist/lib/neutral/sync-issues-DWY76B3M.mjs.map +7 -0
  54. package/dist/lib/neutral/{sync-triggers-RFM3YGKG.mjs → sync-triggers-NOIQLELD.mjs} +8 -9
  55. package/dist/lib/neutral/{sync-triggers-RFM3YGKG.mjs.map → sync-triggers-NOIQLELD.mjs.map} +3 -3
  56. package/dist/lib/neutral/{tag-add-5NOHUTIE.mjs → tag-add-NLVRGTC6.mjs} +2 -2
  57. package/dist/lib/neutral/{tag-remove-QTKYDJAW.mjs → tag-remove-N4HFBIA2.mjs} +2 -2
  58. package/dist/lib/neutral/testing/index.mjs +3 -3
  59. package/dist/lib/neutral/testing/index.mjs.map +3 -3
  60. package/dist/lib/neutral/{update-blueprints-N2AK2VUR.mjs → update-blueprints-2SNK6HLG.mjs} +2 -2
  61. package/dist/lib/neutral/update-tasks-QQUR53RN.mjs +13 -0
  62. package/dist/lib/neutral/update-tasks-QQUR53RN.mjs.map +7 -0
  63. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +10 -8
  64. package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -1
  65. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +6 -5
  66. package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -1
  67. package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +4 -3
  68. package/dist/types/src/blueprints/database/functions/context-add.d.ts +2 -2
  69. package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -1
  70. package/dist/types/src/blueprints/database/functions/context-remove.d.ts +2 -2
  71. package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -1
  72. package/dist/types/src/blueprints/database/functions/definitions.d.ts +3 -3
  73. package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -1
  74. package/dist/types/src/blueprints/database/functions/query.d.ts +1 -2
  75. package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -1
  76. package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -1
  77. package/dist/types/src/blueprints/planning/functions/index.d.ts +1 -1
  78. package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -1
  79. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +14 -1
  80. package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -1
  81. package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts +2 -0
  82. package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts.map +1 -0
  83. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +1 -5
  84. package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -1
  85. package/dist/types/src/blueprints/project/functions/definitions.d.ts +16 -8
  86. package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -1
  87. package/dist/types/src/blueprints/project/functions/get-context.d.ts +1 -12
  88. package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -1
  89. package/dist/types/src/blueprints/project/functions/qualifier.d.ts +8 -4
  90. package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -1
  91. package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +6 -2
  92. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +12 -4
  93. package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -1
  94. package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +6 -2
  95. package/dist/types/src/blueprints/testing.d.ts +4 -4
  96. package/dist/types/src/blueprints/testing.d.ts.map +1 -1
  97. package/dist/types/src/crud/graph.d.ts +5 -7
  98. package/dist/types/src/crud/graph.d.ts.map +1 -1
  99. package/dist/types/src/functions/agent/definitions.d.ts +6 -5
  100. package/dist/types/src/functions/agent/definitions.d.ts.map +1 -1
  101. package/dist/types/src/sync/sync.d.ts +1 -2
  102. package/dist/types/src/sync/sync.d.ts.map +1 -1
  103. package/dist/types/src/types/Agent.d.ts +9 -7
  104. package/dist/types/src/types/Agent.d.ts.map +1 -1
  105. package/dist/types/src/types/McpServer.d.ts +4 -1
  106. package/dist/types/src/types/McpServer.d.ts.map +1 -1
  107. package/dist/types/src/types/Plan.d.ts.map +1 -1
  108. package/dist/types/tsconfig.tsbuildinfo +1 -1
  109. package/package.json +26 -26
  110. package/src/blueprints/automation/blueprint.ts +1 -1
  111. package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -1
  112. package/src/blueprints/blueprint-manager/blueprint.test.ts +21 -17
  113. package/src/blueprints/blueprint-manager/blueprint.ts +2 -2
  114. package/src/blueprints/blueprint-manager/functions/definitions.ts +2 -2
  115. package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +2 -2
  116. package/src/blueprints/browser/blueprint.test.ts +3 -3
  117. package/src/blueprints/browser/blueprint.ts +1 -1
  118. package/src/blueprints/database/blueprint.conversations.json +1 -1
  119. package/src/blueprints/database/blueprint.test.ts +6 -6
  120. package/src/blueprints/database/blueprint.ts +1 -1
  121. package/src/blueprints/database/functions/context-add.ts +2 -2
  122. package/src/blueprints/database/functions/context-remove.ts +2 -2
  123. package/src/blueprints/database/functions/definitions.ts +16 -16
  124. package/src/blueprints/database/functions/query.ts +2 -3
  125. package/src/blueprints/discord/blueprint.ts +1 -1
  126. package/src/blueprints/discord/functions/fetch-messages.test.ts +7 -2
  127. package/src/blueprints/linear/blueprint.ts +1 -1
  128. package/src/blueprints/linear/functions/linear.test.ts +1 -2
  129. package/src/blueprints/linear/functions/sync-issues.ts +1 -2
  130. package/src/blueprints/memory/blueprint.conversations.json +1 -1
  131. package/src/blueprints/memory/blueprint.ts +1 -1
  132. package/src/blueprints/planning/blueprint.ts +1 -1
  133. package/src/blueprints/planning/functions/index.ts +1 -1
  134. package/src/blueprints/planning/functions/{definitions.ts → update-tasks.md} +29 -50
  135. package/src/blueprints/planning/functions/update-tasks.test.ts +55 -0
  136. package/src/blueprints/planning/functions/update-tasks.ts +25 -3
  137. package/src/blueprints/project/blueprint.conversations.json +1 -1
  138. package/src/blueprints/project/blueprint.test.ts +15 -17
  139. package/src/blueprints/project/blueprint.ts +2 -2
  140. package/src/blueprints/project/functions/add-artifact.ts +1 -0
  141. package/src/blueprints/project/functions/agent.ts +1 -1
  142. package/src/blueprints/project/functions/definitions.ts +8 -8
  143. package/src/blueprints/project/functions/get-context.ts +1 -0
  144. package/src/blueprints/project/functions/qualifier.ts +5 -5
  145. package/src/blueprints/project-wizard/functions/sync-triggers.ts +4 -9
  146. package/src/blueprints/testing.ts +10 -4
  147. package/src/blueprints/websearch/blueprint.conversations.json +1 -1
  148. package/src/crud/graph.test.ts +1 -1
  149. package/src/crud/graph.ts +125 -127
  150. package/src/functions/agent/definitions.ts +8 -3
  151. package/src/functions/agent/prompt.conversations.json +1 -1
  152. package/src/functions/agent/prompt.test.ts +8 -11
  153. package/src/functions/agent/prompt.ts +5 -2
  154. package/src/sync/sync.ts +1 -2
  155. package/src/testing/plugins.tsx +1 -1
  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-2Q63LLSY.mjs.map +0 -7
  160. package/dist/lib/neutral/chunk-43U4ZAOZ.mjs +0 -140
  161. package/dist/lib/neutral/chunk-43U4ZAOZ.mjs.map +0 -7
  162. package/dist/lib/neutral/chunk-CVUA23QI.mjs.map +0 -7
  163. package/dist/lib/neutral/chunk-DN4LTRFN.mjs.map +0 -7
  164. package/dist/lib/neutral/chunk-J37DYY7A.mjs.map +0 -7
  165. package/dist/lib/neutral/chunk-ROMZO4CB.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-NW5VBP64.mjs.map +0 -7
  171. package/dist/lib/neutral/query-B3NOYFCK.mjs.map +0 -7
  172. package/dist/lib/neutral/sync-issues-4YE5XAK5.mjs.map +0 -7
  173. package/dist/lib/neutral/update-tasks-QN2EMFUU.mjs +0 -46
  174. package/dist/lib/neutral/update-tasks-QN2EMFUU.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-OHDGJMVE.mjs.map → chunk-BCT55UTL.mjs.map} +0 -0
  178. /package/dist/lib/neutral/{create-project-WEQYCL7A.mjs.map → create-project-3AGXJ4TD.mjs.map} +0 -0
  179. /package/dist/lib/neutral/{load-LI7HHVD6.mjs.map → load-GAT3T2AD.mjs.map} +0 -0
  180. /package/dist/lib/neutral/{object-create-ZRBHR72E.mjs.map → object-create-PL3WRP74.mjs.map} +0 -0
  181. /package/dist/lib/neutral/{object-delete-I266YAXI.mjs.map → object-delete-PZJQN5KW.mjs.map} +0 -0
  182. /package/dist/lib/neutral/{object-update-HY4GI7LA.mjs.map → object-update-R43N3VJX.mjs.map} +0 -0
  183. /package/dist/lib/neutral/{project-KEZSS5UM.mjs.map → project-VVXXUMAI.mjs.map} +0 -0
  184. /package/dist/lib/neutral/{project-rules-UGFRHIX7.mjs.map → project-rules-KSVSOZJV.mjs.map} +0 -0
  185. /package/dist/lib/neutral/{query-blueprints-KXADGHSA.mjs.map → query-blueprints-PLWYVOI3.mjs.map} +0 -0
  186. /package/dist/lib/neutral/{relation-create-E7VOVXHU.mjs.map → relation-create-YAAAFTR2.mjs.map} +0 -0
  187. /package/dist/lib/neutral/{relation-delete-LXY7W2YO.mjs.map → relation-delete-IEPKERFR.mjs.map} +0 -0
  188. /package/dist/lib/neutral/{schema-add-4TXJO2V7.mjs.map → schema-add-5BNIINRS.mjs.map} +0 -0
  189. /package/dist/lib/neutral/{schema-list-PJS5AFZ3.mjs.map → schema-list-54UK7S4R.mjs.map} +0 -0
  190. /package/dist/lib/neutral/{tag-add-5NOHUTIE.mjs.map → tag-add-NLVRGTC6.mjs.map} +0 -0
  191. /package/dist/lib/neutral/{tag-remove-QTKYDJAW.mjs.map → tag-remove-N4HFBIA2.mjs.map} +0 -0
  192. /package/dist/lib/neutral/{update-blueprints-N2AK2VUR.mjs.map → update-blueprints-2SNK6HLG.mjs.map} +0 -0
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AddArtifact
3
- } from "./chunk-2Q63LLSY.mjs";
3
+ } from "./chunk-KS3IA6FQ.mjs";
4
4
  import {
5
5
  Agent_exports
6
- } from "./chunk-DN4LTRFN.mjs";
6
+ } from "./chunk-5GPL2WXU.mjs";
7
7
  import "./chunk-NR3GTWRC.mjs";
8
8
  import "./chunk-KGU725LW.mjs";
9
9
  import "./chunk-J5LGTIGS.mjs";
@@ -23,8 +23,8 @@ var add_artifact_default = AddArtifact.pipe(Operation.withHandler(Effect.fnUntra
23
23
  data: artifact
24
24
  });
25
25
  });
26
- })));
26
+ })), Operation.opaqueHandler);
27
27
  export {
28
28
  add_artifact_default as default
29
29
  };
30
- //# sourceMappingURL=add-artifact-TWTWAY3H.mjs.map
30
+ //# sourceMappingURL=add-artifact-4IVGW6CI.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/blueprints/project/functions/add-artifact.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Operation } from '@dxos/compute';\nimport { Database, Obj } from '@dxos/echo';\n\nimport { Agent } from '../../../types';\nimport { AddArtifact } from './definitions';\n\nexport default AddArtifact.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ name, artifact }) {\n if (!(yield* Database.load(artifact))) {\n throw new Error('Artifact not found.');\n }\n\n const agent = yield* Agent.getFromChatContext;\n\n Obj.update(agent, (agent) => {\n agent.artifacts.push({\n name,\n data: artifact,\n });\n });\n }) as any,\n ),\n);\n"],
5
- "mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,UAAUC,WAAW;AAK9B,IAAA,uBAAeC,YAAYC,KACzBC,UAAUC,YACDC,kBAAW,WAAW,EAAEC,MAAMC,SAAQ,GAAE;AAC7C,MAAI,EAAE,OAAOC,SAASC,KAAKF,QAAAA,IAAY;AACrC,UAAM,IAAIG,MAAM,qBAAA;EAClB;AAEA,QAAMC,QAAQ,OAAOC,cAAMC;AAE3BC,MAAIC,OAAOJ,OAAO,CAACA,WAAAA;AACjBA,IAAAA,OAAMK,UAAUC,KAAK;MACnBX;MACAY,MAAMX;IACR,CAAA;EACF,CAAA;AACF,CAAA,CAAA,CAAA;",
6
- "names": ["Effect", "Operation", "Database", "Obj", "AddArtifact", "pipe", "Operation", "withHandler", "fnUntraced", "name", "artifact", "Database", "load", "Error", "agent", "Agent", "getFromChatContext", "Obj", "update", "artifacts", "push", "data"]
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Operation } from '@dxos/compute';\nimport { Database, Obj } from '@dxos/echo';\n\nimport { Agent } from '../../../types';\nimport { AddArtifact } from './definitions';\n\nexport default AddArtifact.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ name, artifact }) {\n if (!(yield* Database.load(artifact))) {\n throw new Error('Artifact not found.');\n }\n\n const agent = yield* Agent.getFromChatContext;\n\n Obj.update(agent, (agent) => {\n agent.artifacts.push({\n name,\n data: artifact,\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,uBAAeC,YAAYC,KACzBC,UAAUC,YACDC,kBAAW,WAAW,EAAEC,MAAMC,SAAQ,GAAE;AAC7C,MAAI,EAAE,OAAOC,SAASC,KAAKF,QAAAA,IAAY;AACrC,UAAM,IAAIG,MAAM,qBAAA;EAClB;AAEA,QAAMC,QAAQ,OAAOC,cAAMC;AAE3BC,MAAIC,OAAOJ,OAAO,CAACA,WAAAA;AACjBA,IAAAA,OAAMK,UAAUC,KAAK;MACnBX;MACAY,MAAMX;IACR,CAAA;EACF,CAAA;AACF,CAAA,CAAA,GAEFJ,UAAUgB,aAAa;",
6
+ "names": ["Effect", "Operation", "Database", "Obj", "AddArtifact", "pipe", "Operation", "withHandler", "fnUntraced", "name", "artifact", "Database", "load", "Error", "agent", "Agent", "getFromChatContext", "Obj", "update", "artifacts", "push", "data", "opaqueHandler"]
7
7
  }
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AgentWorker
3
- } from "./chunk-2Q63LLSY.mjs";
3
+ } from "./chunk-KS3IA6FQ.mjs";
4
4
  import {
5
5
  Agent_exports
6
- } from "./chunk-DN4LTRFN.mjs";
6
+ } from "./chunk-5GPL2WXU.mjs";
7
7
  import "./chunk-NR3GTWRC.mjs";
8
8
  import "./chunk-KGU725LW.mjs";
9
9
  import "./chunk-J5LGTIGS.mjs";
@@ -25,7 +25,7 @@ var agent_default = AgentWorker.pipe(Operation.withHandler(Effect.fnUntraced(fun
25
25
  const chatFeed = yield* agent.chat.pipe(Database.load, Effect.flatMap((chat) => Database.load(chat.feed)), Effect.catchTag("ObjectNotFoundError", () => Effect.die(new Error("Unable to load agent chat feed object."))));
26
26
  invariant(chatFeed, "Agent chat feed not found.", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 19, S: this, A: ["chatFeed", "'Agent chat feed not found.'"] });
27
27
  const runtime2 = yield* Effect.runtime();
28
- const session = yield* acquireReleaseResource(() => new AiSession({
28
+ const session = yield* acquireReleaseResource(() => new AiSession.Session({
29
29
  feed: chatFeed,
30
30
  runtime: runtime2
31
31
  }));
@@ -62,4 +62,4 @@ var agent_default = AgentWorker.pipe(Operation.withHandler(Effect.fnUntraced(fun
62
62
  export {
63
63
  agent_default as default
64
64
  };
65
- //# sourceMappingURL=agent-7ROVDSSY.mjs.map
65
+ //# sourceMappingURL=agent-F4L7UXME.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/blueprints/project/functions/agent.ts"],
4
- "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\n\nimport { AiService } from '@dxos/ai';\nimport { AiSession, ToolExecutionServices } from '@dxos/assistant';\nimport { Operation } from '@dxos/compute';\nimport { Database, Feed, Obj } from '@dxos/echo';\nimport { acquireReleaseResource } from '@dxos/effect';\nimport { invariant } from '@dxos/invariant';\nimport { ContentBlock } from '@dxos/types';\n\nimport { Agent } from '../../../types';\nimport { AgentWorker } from './definitions';\n\nexport default AgentWorker.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ agent: agentRef, prompt, event }) {\n const agent = yield* Database.load(agentRef).pipe(\n Effect.catchTag('ObjectNotFoundError', () => Effect.die(new Error('Unable to load agent object.'))),\n );\n invariant(Obj.instanceOf(Agent.Agent, agent));\n invariant(agent.chat, 'Agent has no chat.');\n\n const chatFeed = yield* agent.chat.pipe(\n Database.load,\n Effect.flatMap((chat) => Database.load(chat.feed)),\n Effect.catchTag('ObjectNotFoundError', () => Effect.die(new Error('Unable to load agent chat feed object.'))),\n );\n invariant(chatFeed, 'Agent chat feed not found.');\n const runtime = yield* Effect.runtime<Feed.FeedService>();\n const session = yield* acquireReleaseResource(() => new AiSession({ feed: chatFeed, runtime }));\n\n const agentsInContext = session.context.getObjects().filter(Obj.instanceOf(Agent.Agent));\n if (agentsInContext.length !== 1) {\n throw new Error('There should be exactly one agent in context. Got: ' + agentsInContext.length);\n }\n\n if (!prompt && !event) {\n throw new Error('Either prompt or event must be provided.');\n }\n\n let input: ContentBlock.Any[] = [];\n if (prompt) {\n input.push({ _tag: 'text', text: prompt, disposition: 'synthetic' });\n }\n if (event) {\n input.push({ _tag: 'text', text: JSON.stringify(event), disposition: 'synthetic' });\n }\n\n yield* session\n .createRequest({\n prompt: input,\n })\n .pipe(\n Effect.provide(\n Layer.mergeAll(AiService.model('@anthropic/claude-opus-4-6'), ToolExecutionServices).pipe(\n Layer.provideMerge(Operation.withInvocationOptions({ conversation: Obj.getDXN(chatFeed).toString() })),\n ),\n ),\n Effect.retry({ times: 2 }),\n );\n }, Effect.scoped),\n ),\n Operation.opaqueHandler,\n);\n"],
5
- "mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,WAAW;AAEvB,SAASC,iBAAiB;AAC1B,SAASC,WAAWC,6BAA6B;AACjD,SAASC,iBAAiB;AAC1B,SAASC,UAAgBC,WAAW;AACpC,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAM1B,IAAA,eAAeC;IAMTC,gBAAUC,YAAIC,KAAWC,UAAaC,YAAAA,kBAAAA,WAAAA,EAAAA,OAAAA,UAAAA,QAAAA,MAAAA,GAAAA;AACtCJ,QAAAA,QAAUI,OAAU,SAAE,KAAA,QAAA,EAAA,KAAA,gBAAA,uBAAA,MAAA,WAAA,IAAA,MAAA,8BAAA,CAAA,CAAA,CAAA;AAEtB,YAAMC,IAAAA,WAAkBD,cAAME,OAAKC,KACjCC,GAAAA,QAASC,EAAI,YACNC,YAASJ,GAAAA,cAAkBG,GAAKH,IAAAA,GAAKK,MAAI,GAAA,CAChDC,sCAAgB,EAAuB,EAAA,CAAA;AAEzCZ,YAAUK,MAAAA,MAAU,sBAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,cAAA,sBAAA,EAAA,CAAA;AACpB,QAAMQ,WAAU,OAAOD,MAAOC,KAAAA,KAAO,SAAA,MAAA,eAAA,CAAA,SAAA,SAAA,KAAA,KAAA,IAAA,CAAA,GAAA,gBAAA,uBAAA,MAAA,WAAA,IAAA,MAAA,wCAAA,CAAA,CAAA,CAAA;AACrC,YAAMC,UAAU,8BAA8B,EAAM,YAAIC,YAAU,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,YAAA,8BAAA,EAAA,CAAA;mBAAQV,OAAAA,eAAAA;kBAAUQ,OAAAA,uBAAAA,MAAAA,IAAAA,UAAAA;IAAQ,MAAA;IAEtFG,SAAAA;EACFA,CAAAA,CAAAA;QACF,kBAAgB,QAAA,QAAA,WAAA,EAAA,OAAA,IAAA,WAAA,cAAwDA,KAAAA,CAAAA;AAC1E,MAAA,gBAAA,WAAA,GAAA;AAEI,UAACC,IAAAA,MAAWC,wDAAO,gBAAA,MAAA;;AAEvB,MAAA,CAAA,UAAA,CAAA,OAAA;AAEIC,UAAAA,IAA8B,MAAA,0CAAA;EAClC;MACEA,QAAMC,CAAAA;cAAOC;UAAcC,KAAML;MAAQM,MAAAA;MAAyB,MAAA;MACpE,aAAA;IACIL,CAAAA;;aACWG;UAAcC,KAAME;MAAuBD,MAAAA;MAAyB,MAAA,KAAA,UAAA,KAAA;MACnF,aAAA;IAEA,CAAA;;AAGE,SACK,QACIE,cACCC;IACiDC,QAAAA;EAA8C,CAAA,EAAA,KAGhGC,eAAM,eAAA,UAAA,MAAA,4BAAA,GAAA,qBAAA,EAAA,KAAA,mBAAA,UAAA,sBAAA;IAAEC,cAAO,IAAA,OAAA,QAAA,EAAA,SAAA;EAAE,CAAA,CAAA,CAAA,CAAA,GAAA,aAAA;IAE3BjB,OAAOkB;;;",
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\n\nimport { AiService } from '@dxos/ai';\nimport { AiSession, ToolExecutionServices } from '@dxos/assistant';\nimport { Operation } from '@dxos/compute';\nimport { Database, Feed, Obj } from '@dxos/echo';\nimport { acquireReleaseResource } from '@dxos/effect';\nimport { invariant } from '@dxos/invariant';\nimport { ContentBlock } from '@dxos/types';\n\nimport { Agent } from '../../../types';\nimport { AgentWorker } from './definitions';\n\nexport default AgentWorker.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ agent: agentRef, prompt, event }) {\n const agent = yield* Database.load(agentRef).pipe(\n Effect.catchTag('ObjectNotFoundError', () => Effect.die(new Error('Unable to load agent object.'))),\n );\n invariant(Obj.instanceOf(Agent.Agent, agent));\n invariant(agent.chat, 'Agent has no chat.');\n\n const chatFeed = yield* agent.chat.pipe(\n Database.load,\n Effect.flatMap((chat) => Database.load(chat.feed)),\n Effect.catchTag('ObjectNotFoundError', () => Effect.die(new Error('Unable to load agent chat feed object.'))),\n );\n invariant(chatFeed, 'Agent chat feed not found.');\n const runtime = yield* Effect.runtime<Feed.FeedService>();\n const session = yield* acquireReleaseResource(() => new AiSession.Session({ feed: chatFeed, runtime }));\n\n const agentsInContext = session.context.getObjects().filter(Obj.instanceOf(Agent.Agent));\n if (agentsInContext.length !== 1) {\n throw new Error('There should be exactly one agent in context. Got: ' + agentsInContext.length);\n }\n\n if (!prompt && !event) {\n throw new Error('Either prompt or event must be provided.');\n }\n\n let input: ContentBlock.Any[] = [];\n if (prompt) {\n input.push({ _tag: 'text', text: prompt, disposition: 'synthetic' });\n }\n if (event) {\n input.push({ _tag: 'text', text: JSON.stringify(event), disposition: 'synthetic' });\n }\n\n yield* session\n .createRequest({\n prompt: input,\n })\n .pipe(\n Effect.provide(\n Layer.mergeAll(AiService.model('@anthropic/claude-opus-4-6'), ToolExecutionServices).pipe(\n Layer.provideMerge(Operation.withInvocationOptions({ conversation: Obj.getDXN(chatFeed).toString() })),\n ),\n ),\n Effect.retry({ times: 2 }),\n );\n }, Effect.scoped),\n ),\n Operation.opaqueHandler,\n);\n"],
5
+ "mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,WAAW;AAEvB,SAASC,iBAAiB;AAC1B,SAASC,WAAWC,6BAA6B;AACjD,SAASC,iBAAiB;AAC1B,SAASC,UAAgBC,WAAW;AACpC,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAM1B,IAAA,eAAeC;IAMTC,gBAAUC,YAAIC,KAAWC,UAAaC,YAAAA,kBAAAA,WAAAA,EAAAA,OAAAA,UAAAA,QAAAA,MAAAA,GAAAA;AACtCJ,QAAAA,QA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AAA;IAEA,CAAA;;AAGE,SACK,QACIE,cACCC;IACiDC,QAAAA;EAA8C,CAAA,EAAA,KAGhGC,eAAM,eAAA,UAAA,MAAA,4BAAA,GAAA,qBAAA,EAAA,KAAA,mBAAA,UAAA,sBAAA;IAAEC,cAAO,IAAA,OAAA,QAAA,EAAA,SAAA;EAAE,CAAA,CAAA,CAAA,CAAA,GAAA,aAAA;IAE3BjB,OAAOkB;;;",
6
6
  "names": ["Effect", "Layer", "AiService", "AiSession", "ToolExecutionServices", "Operation", "Database", "Obj", "acquireReleaseResource", "invariant", "AgentWorker", "invariant", "Obj", "instanceOf", "Agent", "agent", "chatFeed", "chat", "pipe", "Database", "load", "flatMap", "feed", "Effect", "runtime", "session", "AiSession", "agentsInContext", "prompt", "event", "input", "push", "_tag", "text", "disposition", "JSON", "provide", "mergeAll", "conversation", "retry", "times", "scoped"]
7
7
  }
@@ -95,14 +95,12 @@ __export(Agent_exports, {
95
95
  import * as Effect from "effect/Effect";
96
96
  import * as Function from "effect/Function";
97
97
  import * as Schema2 from "effect/Schema";
98
- import { AiContextBinder, AiContextService } from "@dxos/assistant";
98
+ import { AiContext } from "@dxos/assistant";
99
99
  import { Annotation as Annotation2, Database, Feed, Format, Obj as Obj2, Ref as Ref2, Relation, Type as Type2 } from "@dxos/echo";
100
- import { Queue } from "@dxos/echo-db";
101
- import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/internal";
100
+ import { FormInputAnnotation } from "@dxos/echo/internal";
102
101
  import { acquireReleaseResource } from "@dxos/effect";
103
- import { QueueService } from "@dxos/functions";
104
102
  import { invariant } from "@dxos/invariant";
105
- import { QueueAnnotation, Text } from "@dxos/schema";
103
+ import { Text } from "@dxos/schema";
106
104
  var __dxlog_file = "/__w/dxos/dxos/packages/core/compute/assistant-toolkit/src/types/Agent.ts";
107
105
  var Agent = Schema2.Struct({
108
106
  name: Schema2.optional(Schema2.String),
@@ -135,47 +133,51 @@ var Agent = Schema2.Struct({
135
133
  data: Ref2.Ref(Obj2.Unknown)
136
134
  })).pipe(FormInputAnnotation.set(false)),
137
135
  /**
138
- * Input feed for subscriptions.
139
- */
140
- // TODO(burdon): Rename to Feed?
141
- // NOTE: Named `queue` to conform to subscribable schema (see QueueAnnotation).
142
- queue: Schema2.optional(Ref2.Ref(Queue).pipe(FormInputAnnotation.set(false))),
143
- /**
144
136
  * References to objects with a canonical queue property.
145
137
  * Schema must have the QueueAnnotation.
146
138
  */
139
+ // Change to trigger.
147
140
  // TODO(dmaretskyi): Turn into an array of objects when form-data
148
141
  subscriptions: Schema2.Array(Ref2.Ref(Obj2.Unknown)).pipe(FormInputAnnotation.set(false)),
149
142
  /**
143
+ * Cron expression for a timer trigger that invokes the agent worker on a schedule.
144
+ * The timer trigger bypasses the qualifier and goes straight to the agent worker.
145
+ */
146
+ // Change to trigger.
147
+ cron: Schema2.optional(Schema2.String).annotations({
148
+ title: "Cron",
149
+ description: "Cron expression for a timer trigger that invokes the agent on a schedule."
150
+ }),
151
+ /**
150
152
  * Allow the agent to filter events.
151
153
  * Related events will be added to the input queue of the agent.
152
154
  * It is recommended to enable this.
155
+ * @deprecated
153
156
  */
154
157
  filterEvents: Schema2.optional(Schema2.Boolean).annotations({
155
158
  title: "Filter events",
156
159
  description: "Allow the agent to filter events."
157
160
  }),
158
161
  /**
159
- * Cron expression for a timer trigger that invokes the agent worker on a schedule.
160
- * The timer trigger bypasses the qualifier and goes straight to the agent worker.
162
+ * Input feed for subscriptions.
163
+ * @deprecated Subscriptions will write directly to the agent.
161
164
  */
162
- cron: Schema2.optional(Schema2.String).annotations({
163
- title: "Cron",
164
- description: "Cron expression for a timer trigger that invokes the agent on a schedule."
165
- })
165
+ feed: Schema2.optional(Ref2.Ref(Feed.Feed).pipe(FormInputAnnotation.set(false)))
166
166
  }).pipe(Type2.object({
167
167
  typename: "org.dxos.type.agent",
168
168
  version: "0.1.0"
169
- }), LabelAnnotation.set([
169
+ }), Annotation2.LabelAnnotation.set([
170
170
  "name"
171
- ]), QueueAnnotation.set(true), Annotation2.IconAnnotation.set({
171
+ ]), Annotation2.IconAnnotation.set({
172
172
  icon: "ph--drone--regular",
173
173
  hue: "sky"
174
174
  }));
175
175
  var makeInitialized = (props, blueprint) => Effect.gen(function* () {
176
176
  const agent = Obj2.make(Agent, {
177
177
  ...props,
178
- instructions: Ref2.make(Text.make(props.instructions)),
178
+ instructions: Ref2.make(Text.make({
179
+ content: props.instructions
180
+ })),
179
181
  plan: Ref2.make(makePlan({
180
182
  tasks: []
181
183
  })),
@@ -187,7 +189,7 @@ var makeInitialized = (props, blueprint) => Effect.gen(function* () {
187
189
  yield* Database.add(agent);
188
190
  const feed = yield* Database.add(Feed.make());
189
191
  const runtime2 = yield* Effect.runtime();
190
- const contextBinder = new AiContextBinder({
192
+ const contextBinder = new AiContext.Binder({
191
193
  feed,
192
194
  runtime: runtime2
193
195
  });
@@ -213,25 +215,25 @@ var makeInitialized = (props, blueprint) => Effect.gen(function* () {
213
215
  [Relation.Source]: chat,
214
216
  [Relation.Target]: agent
215
217
  }));
216
- const inputQueue = yield* QueueService.createQueue();
218
+ const inputFeed = yield* Database.add(Feed.make());
217
219
  Obj2.update(agent, (agent2) => {
218
220
  agent2.chat = Ref2.make(chat);
219
- agent2.queue = Ref2.fromDXN(inputQueue.dxn);
221
+ agent2.feed = Ref2.make(inputFeed);
220
222
  });
221
223
  return agent;
222
224
  });
223
225
  var resetChatHistory = (agent) => Effect.gen(function* () {
224
- invariant(agent.chat, "Agent must have an existing chat to reset.", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 143, S: this, A: ["agent.chat", "'Agent must have an existing chat to reset.'"] });
226
+ invariant(agent.chat, "Agent must have an existing chat to reset.", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 145, S: this, A: ["agent.chat", "'Agent must have an existing chat to reset.'"] });
225
227
  const existingFeed = yield* agent.chat.pipe(Database.load).pipe(Effect.map((_) => _.feed), Effect.flatMap(Database.load));
226
228
  const runtime2 = yield* Effect.runtime();
227
- const existingContextBinder = yield* acquireReleaseResource(() => new AiContextBinder({
229
+ const existingContextBinder = yield* acquireReleaseResource(() => new AiContext.Binder({
228
230
  feed: existingFeed,
229
231
  runtime: runtime2
230
232
  }));
231
233
  const blueprints = existingContextBinder.getBlueprints().map((blueprint) => Ref2.make(blueprint));
232
234
  const objects = existingContextBinder.getObjects().map((object) => Ref2.make(object));
233
235
  const feed = yield* Database.add(Feed.make());
234
- const contextBinder = new AiContextBinder({
236
+ const contextBinder = new AiContext.Binder({
235
237
  feed,
236
238
  runtime: runtime2
237
239
  });
@@ -252,7 +254,7 @@ var resetChatHistory = (agent) => Effect.gen(function* () {
252
254
  }));
253
255
  }).pipe(Effect.scoped);
254
256
  var getFromChatContext = Effect.gen(function* () {
255
- const agents = yield* Function.pipe(AiContextService.findObjects(Agent));
257
+ const agents = yield* Function.pipe(AiContext.Service.findObjects(Agent));
256
258
  if (agents.length !== 1) {
257
259
  return yield* Effect.fail(new Error(`There should be exactly one agent in context. Got: ${agents.length}`));
258
260
  }
@@ -266,19 +268,16 @@ __export(McpServer_exports, {
266
268
  McpServer: () => McpServer
267
269
  });
268
270
  import * as Schema3 from "effect/Schema";
271
+ import { McpServer as McpServerSpec } from "@dxos/compute";
269
272
  import { Annotation as Annotation3, Type as Type3 } from "@dxos/echo";
270
- import { LabelAnnotation as LabelAnnotation2 } from "@dxos/echo/internal";
273
+ import { LabelAnnotation } from "@dxos/echo/internal";
271
274
  var McpServer = Schema3.Struct({
272
- name: Schema3.String,
273
- url: Schema3.String,
274
- protocol: Schema3.Union(Schema3.Literal("sse"), Schema3.Literal("http")),
275
- /** Stored in plaintext; replicated to all peers in the space. */
276
- apiKey: Schema3.optional(Schema3.String),
275
+ ...McpServerSpec.McpServer.fields,
277
276
  enabled: Schema3.optional(Schema3.Boolean)
278
277
  }).pipe(Type3.object({
279
278
  typename: "org.dxos.type.assistant.mcpServer",
280
279
  version: "0.1.0"
281
- }), LabelAnnotation2.set([
280
+ }), LabelAnnotation.set([
282
281
  "name"
283
282
  ]), Annotation3.IconAnnotation.set({
284
283
  icon: "ph--plugs-connected--regular",
@@ -290,4 +289,4 @@ export {
290
289
  Agent_exports,
291
290
  McpServer_exports
292
291
  };
293
- //# sourceMappingURL=chunk-DN4LTRFN.mjs.map
292
+ //# sourceMappingURL=chunk-5GPL2WXU.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/Plan.ts", "../../../src/types/Agent.ts", "../../../src/types/McpServer.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { Annotation, Obj, Ref, Type } from '@dxos/echo';\n\nimport * as Chat from './Chat';\n\nexport const TaskId = Schema.String.pipe(Schema.brand('@dxos/assistant-toolkit/TaskId'));\nexport type TaskId = Schema.Schema.Type<typeof TaskId>;\n\nexport const Task = Schema.Struct({\n /**\n * Short task ID unique within the plan.\n */\n id: TaskId,\n\n title: Schema.String.annotations({\n description: 'Task title and description.',\n }),\n\n status: Schema.Literal('todo', 'in-progress', 'done'),\n\n /**\n * Parent task ID.\n */\n parent: Schema.optional(TaskId).annotations({\n description: 'Parent task ID.',\n }),\n\n /**\n * Chat object that this task is associated with.\n */\n chat: Schema.optional(Ref.Ref(Chat.Chat)),\n});\n\nexport interface Task extends Schema.Schema.Type<typeof Task> {}\n\n/**\n * Hierarchical collection of tasks for humans and agents to track progress.\n */\nexport const Plan = Schema.Struct({\n tasks: Schema.Array(Task),\n}).pipe(\n Type.object({\n typename: 'org.dxos.type.plan',\n version: '0.1.0',\n }),\n Annotation.SystemTypeAnnotation.set(true),\n);\nexport interface Plan extends Schema.Schema.Type<typeof Plan> {}\n\nexport const generateTaskId = (plan: Plan): TaskId => {\n const existingIds = plan.tasks\n .map((task) => {\n const [num, letter] = task.id.split('-');\n return parseInt(num);\n })\n .filter((_) => !isNaN(_));\n let newId;\n if (existingIds.length === 0) {\n newId = 1;\n } else {\n newId = Math.max(...existingIds) + 1;\n }\n // Add random suffix to avoid collisions.\n return TaskId.make(`${newId}-${crypto.randomUUID().slice(0, 2)}`);\n};\n\n/**\n * Add new tasks to a plan, generating IDs for new tasks.\n * Use inside an `Obj.update` callback.\n */\nexport const addTasks = (\n plan: Obj.Mutable<Plan>,\n tasks: (Pick<Task, 'title'> & Partial<Pick<Task, 'status' | 'parent' | 'chat'>>)[],\n) => {\n for (const task of tasks) {\n const taskId = generateTaskId(plan);\n plan.tasks.push({ id: taskId, ...task, status: task.status ?? 'todo' });\n }\n return plan;\n};\n\ninterface MakePlanProps {\n tasks: {\n title: string;\n status?: 'todo' | 'in-progress' | 'done';\n }[];\n}\n\nexport const makePlan = (props: MakePlanProps): Plan => {\n const plan = Obj.make(Plan, { tasks: [] });\n Obj.update(plan, (plan) => {\n addTasks(plan, props.tasks);\n });\n return plan;\n};\n\n/**\n * Formats plan to markdown format.\n */\nexport const formatPlan = (plan: Plan): string => {\n return plan.tasks\n .map((task) => `- **${task.status?.toLocaleUpperCase()}**: ${task.title ?? 'No title'} <!-- id=${task.id} -->`)\n .join('\\n');\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Schema from 'effect/Schema';\n\nimport { AiContext } from '@dxos/assistant';\nimport { type Blueprint } from '@dxos/compute';\nimport { Annotation, Database, Feed, Format, Obj, Ref, Relation, Type } from '@dxos/echo';\nimport { type ObjectNotFoundError } from '@dxos/echo/Err';\nimport { FormInputAnnotation } from '@dxos/echo/internal';\nimport { acquireReleaseResource } from '@dxos/effect';\nimport { invariant } from '@dxos/invariant';\nimport { Text } from '@dxos/schema';\n\nimport * as Chat from './Chat';\nimport * as Plan from './Plan';\n\n/**\n * Agent schema definition.\n */\nexport const Agent = Schema.Struct({\n name: Schema.optional(Schema.String),\n\n /**\n * When false, agent triggers are disabled after sync-triggers runs.\n */\n enabled: Schema.optional(Schema.Boolean).annotations({\n title: 'Enabled',\n description: 'Master switch for agent automation; propagated to all triggers on sync.',\n }),\n\n /**\n * Instructions for the agent.\n */\n instructions: Ref.Ref(Text.Text).pipe(\n Format.FormatAnnotation.set(Format.TypeFormat.Markdown),\n Schema.annotations({ title: 'Instructions' }),\n ),\n\n /**\n * Primary chat for the agent.\n */\n // TODO(dmaretskyi): Multiple chats; RB: branching hierarchy.\n chat: Schema.optional(Ref.Ref(Chat.Chat).pipe(FormInputAnnotation.set(false))),\n\n // TODO(burdon): Is this used? Should it be an artifact?\n // Format.FormatAnnotation.set(Format.TypeFormat.Markdown)\n plan: Ref.Ref(Plan.Plan).pipe(FormInputAnnotation.set(false)),\n\n // TODO(burdon): Currently Memory.Memory objects are global to the space; make them artifacts?\n artifacts: Schema.Array(\n Schema.Struct({\n // TODO(dmaretskyi): Consider gettings names from the artifact itself using Obj.getLabel.\n name: Schema.String,\n // TODO(burdon): Rename object.\n data: Ref.Ref(Obj.Unknown),\n }),\n ).pipe(FormInputAnnotation.set(false)),\n\n /**\n * References to objects with a canonical queue property.\n * Schema must have the QueueAnnotation.\n */\n // Change to trigger.\n // TODO(dmaretskyi): Turn into an array of objects when form-data\n subscriptions: Schema.Array(Ref.Ref(Obj.Unknown)).pipe(FormInputAnnotation.set(false)),\n\n /**\n * Cron expression for a timer trigger that invokes the agent worker on a schedule.\n * The timer trigger bypasses the qualifier and goes straight to the agent worker.\n */\n // Change to trigger.\n cron: Schema.optional(Schema.String).annotations({\n title: 'Cron',\n description: 'Cron expression for a timer trigger that invokes the agent on a schedule.',\n }),\n\n /**\n * Allow the agent to filter events.\n * Related events will be added to the input queue of the agent.\n * It is recommended to enable this.\n * @deprecated\n */\n filterEvents: Schema.optional(Schema.Boolean).annotations({\n title: 'Filter events',\n description: 'Allow the agent to filter events.',\n }),\n\n /**\n * Input feed for subscriptions.\n * @deprecated Subscriptions will write directly to the agent.\n */\n feed: Schema.optional(Ref.Ref(Feed.Feed).pipe(FormInputAnnotation.set(false))),\n}).pipe(\n Type.object({\n typename: 'org.dxos.type.agent',\n version: '0.1.0',\n }),\n Annotation.LabelAnnotation.set(['name']),\n Annotation.IconAnnotation.set({\n icon: 'ph--drone--regular',\n hue: 'sky',\n }),\n);\n\nexport interface Agent extends Schema.Schema.Type<typeof Agent> {}\n\n/**\n * Creates a fully initialized Agent with chat, queue, and context bindings.\n *\n * @param props - Agent properties including spec, plan, blueprints, and context objects.\n * @param blueprint - The blueprint to use for the agent context.\n * @returns An Effect that yields the initialized Agent.\n */\nexport const makeInitialized = (\n props: Omit<Obj.MakeProps<typeof Agent>, 'instructions' | 'plan' | 'artifacts' | 'subscriptions' | 'chat'> &\n Partial<Pick<Obj.MakeProps<typeof Agent>, 'artifacts' | 'subscriptions'>> & {\n instructions: string;\n blueprints?: Ref.Ref<Blueprint.Blueprint>[];\n contextObjects?: Ref.Ref<Obj.Any>[];\n },\n blueprint: Blueprint.Blueprint,\n): Effect.Effect<Agent, never, Feed.FeedService | Database.Service> =>\n Effect.gen(function* () {\n const agent = Obj.make(Agent, {\n ...props,\n instructions: Ref.make(Text.make({ content: props.instructions })),\n plan: Ref.make(Plan.makePlan({ tasks: [] })),\n artifacts: props.artifacts ?? [],\n subscriptions: props.subscriptions ?? [],\n filterEvents: props.filterEvents ?? true,\n enabled: props.enabled ?? true,\n });\n yield* Database.add(agent);\n const feed = yield* Database.add(Feed.make());\n const runtime = yield* Effect.runtime<Feed.FeedService>();\n const contextBinder = new AiContext.Binder({ feed, runtime });\n // TODO(dmaretskyi): Blueprint registry.\n const agentBlueprint = yield* Database.add(Obj.clone(blueprint, { deep: true }));\n yield* Effect.promise(() =>\n contextBinder.bind({\n blueprints: [Ref.make(agentBlueprint), ...(props.blueprints ?? [])],\n objects: [Ref.make(agent), ...(props.contextObjects ?? [])],\n }),\n );\n const chat = yield* Database.add(\n Chat.make({\n [Obj.Parent]: agent,\n feed: Ref.make(feed),\n }),\n );\n Obj.setParent(feed, chat);\n yield* Database.add(\n Relation.make(Chat.CompanionTo, {\n [Relation.Source]: chat,\n [Relation.Target]: agent,\n }),\n );\n\n const inputFeed = yield* Database.add(Feed.make());\n\n Obj.update(agent, (agent) => {\n agent.chat = Ref.make(chat);\n agent.feed = Ref.make(inputFeed);\n });\n\n return agent;\n });\n\n/**\n * Resets the agent chat history by rebuilding the chat context.\n * Preserves the existing blueprints and objects from the current chat context.\n *\n * @param agent - The agent whose chat history should be reset. Must have an existing chat.\n * @returns An Effect that resets the chat history.\n */\nexport const resetChatHistory = (\n agent: Agent,\n): Effect.Effect<void, ObjectNotFoundError, Feed.FeedService | Database.Service> =>\n Effect.gen(function* () {\n invariant(agent.chat, 'Agent must have an existing chat to reset.');\n\n const existingFeed = yield* agent.chat.pipe(Database.load).pipe(\n Effect.map((_) => _.feed),\n Effect.flatMap(Database.load),\n );\n const runtime = yield* Effect.runtime<Feed.FeedService>();\n const existingContextBinder = yield* acquireReleaseResource(\n () =>\n new AiContext.Binder({\n feed: existingFeed,\n runtime,\n }),\n );\n const blueprints = existingContextBinder.getBlueprints().map((blueprint) => Ref.make(blueprint));\n const objects = existingContextBinder.getObjects().map((object) => Ref.make(object));\n\n const feed = yield* Database.add(Feed.make());\n const contextBinder = new AiContext.Binder({ feed, runtime });\n yield* Effect.promise(() =>\n contextBinder.bind({\n blueprints,\n objects,\n }),\n );\n\n const chat = yield* Database.add(\n Chat.make({\n feed: Ref.make(feed),\n }),\n );\n Obj.setParent(feed, chat);\n Obj.update(agent, (agent) => {\n agent.chat = Ref.make(chat);\n });\n\n yield* Database.add(\n Relation.make(Chat.CompanionTo, {\n [Relation.Source]: chat,\n [Relation.Target]: agent,\n }),\n );\n }).pipe(Effect.scoped);\n\nexport const getFromChatContext: Effect.Effect<Agent, Error, AiContext.Service> = Effect.gen(function* () {\n const agents = yield* Function.pipe(AiContext.Service.findObjects(Agent));\n if (agents.length !== 1) {\n return yield* Effect.fail(new Error(`There should be exactly one agent in context. Got: ${agents.length}`));\n }\n\n const agent = agents[0];\n return agent;\n});\n", "//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { McpServer as McpServerSpec } from '@dxos/compute';\nimport { Annotation, Type } from '@dxos/echo';\nimport { LabelAnnotation } from '@dxos/echo/internal';\n\n/**\n * MCP server configuration stored as a space-level ECHO object.\n *\n * Composes the canonical connection spec from `@dxos/compute` (`url`, `protocol`, `apiKey`)\n * and adds instance-level fields (`name`, `enabled`) plus ECHO annotations.\n *\n * NOTE: `apiKey` is stored in plaintext and replicated to all peers with access to the space.\n * A future iteration should move secrets to per-device credential storage or use envelope encryption.\n */\nexport const McpServer = Schema.Struct({\n ...McpServerSpec.McpServer.fields,\n enabled: Schema.optional(Schema.Boolean),\n}).pipe(\n Type.object({\n typename: 'org.dxos.type.assistant.mcpServer',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n Annotation.IconAnnotation.set({\n icon: 'ph--plugs-connected--regular',\n hue: 'sky',\n }),\n);\n\nexport interface McpServer extends Schema.Schema.Type<typeof McpServer> {}\n"],
5
+ "mappings": ";;;;;;;;;;AAAA;;;;;;;;;;AAMA,YAAYA,YAAY;AAExB,SAASC,YAAYC,KAAKC,KAAKC,YAAY;AAIpC,IAAMC,SAAgBC,cAAOC,KAAYC,aAAM,gCAAA,CAAA;AAG/C,IAAMC,OAAcC,cAAO;;;;EAIhCC,IAAIN;EAEJO,OAAcN,cAAOO,YAAY;IAC/BC,aAAa;EACf,CAAA;EAEAC,QAAeC,eAAQ,QAAQ,eAAe,MAAA;;;;EAK9CC,QAAeC,gBAASb,MAAAA,EAAQQ,YAAY;IAC1CC,aAAa;EACf,CAAA;;;;EAKAK,MAAaD,gBAASE,IAAIA,IAASC,IAAI,CAAA;AACzC,CAAA;AAOO,IAAMC,OAAcZ,cAAO;EAChCa,OAAcC,aAAMf,IAAAA;AACtB,CAAA,EAAGF,KACDkB,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GAC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A;AAEA,WAAMvB,OAAiB,YAAA,IAAA,MAAA,sDAAA,OAAA,MAAA,EAAA,CAAA;EACvB;AACC,QAAA,QAAA,OAAA,CAAA;;;;;AC7OH;;;;AAMA,YAAYwB,aAAY;AAExB,SAASC,aAAaC,qBAAqB;AAC3C,SAASC,cAAAA,aAAYC,QAAAA,aAAY;AACjC,SAASC,uBAAuB;AAWzB,IAAMJ,YAAmBK,eAAO;EACrC,GAAGJ,cAAcD,UAAUM;EAC3BC,SAAgBC,iBAAgBC,eAAO;AACzC,CAAA,EAAGC,KACDP,MAAKQ,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAT,gBAAgBU,IAAI;EAAC;CAAO,GAC5BZ,YAAWa,eAAeD,IAAI;EAC5BE,MAAM;EACNC,KAAK;AACP,CAAA,CAAA;",
6
+ "names": ["Schema", "Annotation", "Obj", "Ref", "Type", "TaskId", "String", "pipe", "brand", "Task", "Struct", "id", "title", "annotations", "description", "status", "Literal", "parent", "optional", "chat", "Ref", "Chat", "Plan", "tasks", "Array", "Type", "object", "typename", "version", "Annotation", "SystemTypeAnnotation", "set", "generateTaskId", "plan", "existingIds", "map", "task", "num", "letter", "split", "parseInt", "filter", "_", "isNaN", "newId", "length", "Math", "max", "make", "crypto", "randomUUID", "slice", "addTasks", "taskId", "push", "makePlan", "props", "Obj", "update", "formatPlan", "toLocaleUpperCase", "join", "Effect", "Function", "Schema", "AiContext", "Annotation", "Database", "Feed", "Format", "Obj", "Ref", "Relation", "Type", "FormInputAnnotation", "acquireReleaseResource", "invariant", "Text", "Ref", "artifacts", "Array", "Schema", "String", "data", "Obj", "description", "typename", "version", "Annotation", "IconAnnotation", "set", "icon", "hue", "props", "instructions", "make", "Text", "plan", "Plan", "subscriptions", "filterEvents", "enabled", "Database", "agent", "runtime", "Effect", "contextBinder", "AiContext", "Binder", "feed", "agentBlueprint", "objects", "chat", "setParent", "Source", "Relation", "Target", "inputFeed", "existingFeed", "pipe", "existingContextBinder", "acquireReleaseResource", "blueprints", "add", "scoped", "agents", "Error", "Schema", "McpServer", "McpServerSpec", "Annotation", "Type", "LabelAnnotation", "Struct", "fields", "enabled", "optional", "Boolean", "pipe", "object", "typename", "version", "set", "IconAnnotation", "icon", "hue"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  // src/blueprints/database/functions/definitions.ts
2
2
  import * as Schema from "effect/Schema";
3
- import { AiContextService } from "@dxos/assistant";
3
+ import { AiContext } from "@dxos/assistant";
4
4
  import { Operation } from "@dxos/compute";
5
5
  import { Database, Obj, Ref, Relation, Tag } from "@dxos/echo";
6
6
  import { trim } from "@dxos/util";
@@ -83,7 +83,7 @@ var Query = Operation.make({
83
83
  services: [
84
84
  Database.Service
85
85
  ]
86
- });
86
+ }).pipe(Operation.intrinsic);
87
87
  var Load = Operation.make({
88
88
  meta: {
89
89
  key: "org.dxos.function.database.load",
@@ -104,7 +104,7 @@ var Load = Operation.make({
104
104
  services: [
105
105
  Database.Service
106
106
  ]
107
- });
107
+ }).pipe(Operation.intrinsic);
108
108
  var ObjectCreate = Operation.make({
109
109
  meta: {
110
110
  key: "org.dxos.function.database.object-create",
@@ -124,7 +124,7 @@ var ObjectCreate = Operation.make({
124
124
  services: [
125
125
  Database.Service
126
126
  ]
127
- });
127
+ }).pipe(Operation.intrinsic);
128
128
  var ObjectUpdate = Operation.make({
129
129
  meta: {
130
130
  key: "org.dxos.function.database.object-update",
@@ -146,7 +146,7 @@ var ObjectUpdate = Operation.make({
146
146
  services: [
147
147
  Database.Service
148
148
  ]
149
- });
149
+ }).pipe(Operation.intrinsic);
150
150
  var ObjectDelete = Operation.make({
151
151
  meta: {
152
152
  key: "org.dxos.function.database.object-delete",
@@ -162,7 +162,7 @@ var ObjectDelete = Operation.make({
162
162
  services: [
163
163
  Database.Service
164
164
  ]
165
- });
165
+ }).pipe(Operation.intrinsic);
166
166
  var SchemaAdd = Operation.make({
167
167
  meta: {
168
168
  key: "org.dxos.function.database.schema-add",
@@ -183,7 +183,7 @@ var SchemaAdd = Operation.make({
183
183
  services: [
184
184
  Database.Service
185
185
  ]
186
- });
186
+ }).pipe(Operation.intrinsic);
187
187
  var SchemaList = Operation.make({
188
188
  meta: {
189
189
  key: "org.dxos.function.database.schema-list",
@@ -199,7 +199,7 @@ var SchemaList = Operation.make({
199
199
  services: [
200
200
  Database.Service
201
201
  ]
202
- });
202
+ }).pipe(Operation.intrinsic);
203
203
  var ContextAdd = Operation.make({
204
204
  meta: {
205
205
  key: "org.dxos.function.database.context-add",
@@ -216,9 +216,9 @@ var ContextAdd = Operation.make({
216
216
  }),
217
217
  output: Schema.Void,
218
218
  services: [
219
- AiContextService
219
+ AiContext.Service
220
220
  ]
221
- });
221
+ }).pipe(Operation.intrinsic);
222
222
  var ContextRemove = Operation.make({
223
223
  meta: {
224
224
  key: "org.dxos.function.database.context-remove",
@@ -235,9 +235,9 @@ var ContextRemove = Operation.make({
235
235
  }),
236
236
  output: Schema.Void,
237
237
  services: [
238
- AiContextService
238
+ AiContext.Service
239
239
  ]
240
- });
240
+ }).pipe(Operation.intrinsic);
241
241
  var RelationCreate = Operation.make({
242
242
  meta: {
243
243
  key: "org.dxos.function.database.relation-create",
@@ -259,7 +259,7 @@ var RelationCreate = Operation.make({
259
259
  services: [
260
260
  Database.Service
261
261
  ]
262
- });
262
+ }).pipe(Operation.intrinsic);
263
263
  var RelationDelete = Operation.make({
264
264
  meta: {
265
265
  key: "org.dxos.function.database.relation-delete",
@@ -275,7 +275,7 @@ var RelationDelete = Operation.make({
275
275
  services: [
276
276
  Database.Service
277
277
  ]
278
- });
278
+ }).pipe(Operation.intrinsic);
279
279
  var TagAdd = Operation.make({
280
280
  meta: {
281
281
  key: "org.dxos.function.database.tag-add",
@@ -294,7 +294,7 @@ var TagAdd = Operation.make({
294
294
  services: [
295
295
  Database.Service
296
296
  ]
297
- });
297
+ }).pipe(Operation.intrinsic);
298
298
  var TagRemove = Operation.make({
299
299
  meta: {
300
300
  key: "org.dxos.function.database.tag-remove",
@@ -312,7 +312,7 @@ var TagRemove = Operation.make({
312
312
  services: [
313
313
  Database.Service
314
314
  ]
315
- });
315
+ }).pipe(Operation.intrinsic);
316
316
 
317
317
  export {
318
318
  Query,
@@ -329,4 +329,4 @@ export {
329
329
  TagAdd,
330
330
  TagRemove
331
331
  };
332
- //# sourceMappingURL=chunk-CVUA23QI.mjs.map
332
+ //# sourceMappingURL=chunk-7UCYAP3T.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/blueprints/database/functions/definitions.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { AiContext } from '@dxos/assistant';\nimport { Operation } from '@dxos/compute';\nimport { Database, Obj, Ref, Relation, Tag } from '@dxos/echo';\nimport { trim } from '@dxos/util';\n\nexport const Query = Operation.make({\n meta: {\n key: 'org.dxos.function.database.query',\n name: 'Query',\n description: trim`\n Query for objects in ECHO.\n Use this tool when searching for information in the space (both automerge and queues).\n Currently, two types of queries are supported:\n - Full-text search - terms may appear anywhere in the object.\n - Type-based search - objects of a specific type.\n You can use them together, for example, to search for objects of a specific type that match a full-text query.\n Important: Whem querying by typename, make sure to list the schema first, to get the exact typename.\n\n Omit both typename and text to search for all objects.\n\n <output_format>\n You can choose to either return the full object data, or just the DXN, type and label.\n When expecting a lot of results, run with includeContent=false to not pollute the context, and then load specific objects using the load tool.\n\n You can choose to get the content right away, if you don't expect a lot of results.\n To load content right away, run with includeContent=true.\n When loading content, set an appropriate limit on the number of results to avoid overwhelming the context.\n </output_format>\n\n <example description=\"All tasks related to Cyberdyne and Bob\">\n {\n \"typename\": \"org.dxos.type.task\",\n \"text\": \"cyberdyne bob\",\n }\n </example>\n\n <example description=\"Financial report Q1 2026\">\n {\n \"typename\": \"org.dxos.type.document\",\n \"text\": \"financial report Q1 2026\",\n \"includeContent\": true\n \"limit\": 3\n }\n </example>\n\n <example description=\"Emails from specific mailboxes\">\n {\n \"in\": [{\"/\" : \"dxn:echo:@:YYYYYY\"}, {\"/\" : \"dxn:echo:@:XXXXXXX\"}],\n \"typename\": \"org.dxos.type.email\",\n \"includeContent\": true,\n \"limit\": 20\n }\n </example>\n `,\n },\n input: Schema.Struct({\n in: Schema.optional(\n Schema.Array(Ref.Ref(Obj.Unknown)).annotations({\n description:\n 'Scope the query to children of specific objects (transitively). ' +\n 'Use this to query items within containers such as feeds or folders. ' +\n 'For example, to find emails use `in: [mailbox1.feed, mailbox2.feed]`.',\n }),\n ),\n typename: Schema.optional(\n Schema.String.annotations({\n description: 'The typename of the objects to list.',\n example: 'org.dxos.type.task',\n }),\n ),\n text: Schema.optional(\n Schema.String.annotations({\n description: 'Full text search query.',\n example: 'email cyberdyne bob',\n }),\n ),\n includeContent: Schema.optional(\n Schema.Boolean.annotations({\n description: 'Include the full object data in the response.',\n default: false,\n }),\n ),\n limit: Schema.optional(\n Schema.Number.annotations({\n description: 'The maximum number of results to return.',\n default: 10,\n }),\n ),\n includeQueues: Schema.optional(\n Schema.Boolean.annotations({\n description: 'Search in queues as well as spaces. Only use this if searching for emails.',\n default: false,\n }),\n ),\n }),\n output: Schema.Array(Schema.Unknown),\n services: [Database.Service],\n}).pipe(Operation.intrinsic);\n\nexport const Load = Operation.make({\n meta: {\n key: 'org.dxos.function.database.load',\n name: 'Load object',\n description: trim`\n Loads the object or relation content.\n Can load multiple objects at at time.\n Use the to read the data when you have a DXN.\n Call this tool with an array of one or more DXNs or object IDs.\n When use see a reference ({ '/': 'dxn:...' }), you can call this function to load the object.\n Note that returned data is only a snapshot in time, and might have changed since the object was last loaded.\n `,\n },\n input: Schema.Struct({\n refs: Schema.Array(Ref.Ref(Obj.Unknown)),\n }),\n output: Schema.Unknown,\n services: [Database.Service],\n}).pipe(Operation.intrinsic);\n\nexport const ObjectCreate = Operation.make({\n meta: {\n key: 'org.dxos.function.database.object-create',\n name: 'Create object',\n description: trim`\n Creates a new object and adds it to the current space.\n Get the schema from the schema-list tool and ensure that the data matches the corresponding schema.\n References are provided in the following format: { \"/\": \"dxn:...\" }.\n Reference examples: { \"/\": \"dxn:echo:@:01KG7R1ZXWFMWQ4DA1Q6TN1DG4\" }, { \"/\": \"dxn:queue:data:01KG7R1ZXWFMWQ4DA1Q6TN1DG4:01KG7R1ZXWFMWQ4DA1Q6TN1DG4\" }\n `,\n },\n input: Schema.Struct({\n typename: Schema.String,\n data: Schema.Any,\n }),\n output: Schema.Unknown,\n services: [Database.Service],\n}).pipe(Operation.intrinsic);\n\nexport const ObjectUpdate = Operation.make({\n meta: {\n key: 'org.dxos.function.database.object-update',\n name: 'Update object',\n description: trim`\n Updates the object properties.\n References are provided in the following format: { \"/\": \"dxn:...\" }.\n Reference examples: { \"/\": \"dxn:echo:@:01KG7R1ZXWFMWQ4DA1Q6TN1DG4\" }, { \"/\": \"dxn:queue:data:01KG7R1ZXWFMWQ4DA1Q6TN1DG4:01KG7R1ZXWFMWQ4DA1Q6TN1DG4\" }\n `,\n },\n input: Schema.Struct({\n obj: Ref.Ref(Obj.Unknown),\n properties: Schema.Record({ key: Schema.String, value: Schema.Any }),\n }),\n output: Schema.Unknown,\n services: [Database.Service],\n}).pipe(Operation.intrinsic);\n\nexport const ObjectDelete = Operation.make({\n meta: {\n key: 'org.dxos.function.database.object-delete',\n name: 'Delete object',\n description: trim`\n Deletes the object.\n `,\n },\n input: Schema.Struct({\n obj: Ref.Ref(Obj.Unknown),\n }),\n output: Schema.Void,\n services: [Database.Service],\n}).pipe(Operation.intrinsic);\n\nexport const SchemaAdd = Operation.make({\n meta: {\n key: 'org.dxos.function.database.schema-add',\n name: 'Add schema',\n description: trim`\n Adds a schema to the space.\n The name will be used when displayed to the user.\n `,\n },\n input: Schema.Struct({\n name: Schema.String,\n typename: Schema.String.annotations({\n description: 'The typename of the schema in the format of \"com.example.type.type\".',\n }),\n jsonSchema: Schema.Any,\n }),\n output: Schema.Void,\n services: [Database.Service],\n}).pipe(Operation.intrinsic);\n\nexport const SchemaList = Operation.make({\n meta: {\n key: 'org.dxos.function.database.schema-list',\n name: 'List schemas',\n description: trim`\n Lists schemas definitions.\n `,\n },\n input: Schema.Struct({\n limit: Schema.optional(Schema.Number),\n }),\n output: Schema.Array(Schema.Unknown),\n services: [Database.Service],\n}).pipe(Operation.intrinsic);\n\nexport const ContextAdd = Operation.make({\n meta: {\n key: 'org.dxos.function.database.context-add',\n name: 'Add to context',\n description: trim`\n Adds the object to the chat context.\n Use this it for objects that are useful long-term for the conversation.\n `,\n },\n input: Schema.Struct({\n obj: Ref.Ref(Obj.Unknown).annotations({\n description: 'Object to add to the chat context.',\n }),\n }),\n output: Schema.Void,\n services: [AiContext.Service],\n}).pipe(Operation.intrinsic);\n\nexport const ContextRemove = Operation.make({\n meta: {\n key: 'org.dxos.function.database.context-remove',\n name: 'Remove from context',\n description: trim`\n Removes the object from the chat context.\n Use this it for objects that are no longer useful for the conversation.\n `,\n },\n input: Schema.Struct({\n obj: Ref.Ref(Obj.Unknown).annotations({\n description: 'Object to remove from the chat context.',\n }),\n }),\n output: Schema.Void,\n services: [AiContext.Service],\n}).pipe(Operation.intrinsic);\n\nexport const RelationCreate = Operation.make({\n meta: {\n key: 'org.dxos.function.database.relation-create',\n name: 'Create relation',\n description: trim`\n Creates a new relation and adds it to the current space.\n Get the schema from the schema-list tool and ensure that the data matches the corresponding schema.\n `,\n },\n input: Schema.Struct({\n typename: Schema.String,\n source: Ref.Ref(Obj.Unknown),\n target: Ref.Ref(Obj.Unknown),\n properties: Schema.Any.annotations({\n description: 'The data to be stored in the relation.',\n }),\n }),\n output: Schema.Unknown,\n services: [Database.Service],\n}).pipe(Operation.intrinsic);\n\nexport const RelationDelete = Operation.make({\n meta: {\n key: 'org.dxos.function.database.relation-delete',\n name: 'Delete relation',\n description: trim`\n Deletes the relation.\n `,\n },\n input: Schema.Struct({\n rel: Ref.Ref(Relation.Unknown),\n }),\n output: Schema.Void,\n services: [Database.Service],\n}).pipe(Operation.intrinsic);\n\nexport const TagAdd = Operation.make({\n meta: {\n key: 'org.dxos.function.database.tag-add',\n name: 'Add tag',\n description: trim`\n Adds a tag to an object.\n Tags are objects of type ${Tag.Tag.typename}.\n You must search database for available tags, or create a new one.\n `,\n },\n input: Schema.Struct({\n tag: Ref.Ref(Obj.Unknown),\n obj: Ref.Ref(Obj.Unknown),\n }),\n output: Schema.Unknown,\n services: [Database.Service],\n}).pipe(Operation.intrinsic);\n\nexport const TagRemove = Operation.make({\n meta: {\n key: 'org.dxos.function.database.tag-remove',\n name: 'Remove tag',\n description: trim`\n Removes a tag from an object.\n Tags are objects of type ${Tag.Tag.typename}.\n `,\n },\n input: Schema.Struct({\n tag: Ref.Ref(Obj.Unknown),\n obj: Ref.Ref(Obj.Unknown),\n }),\n output: Schema.Unknown,\n services: [Database.Service],\n}).pipe(Operation.intrinsic);\n"],
5
+ "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,UAAUC,KAAKC,KAAKC,UAAUC,WAAW;AAClD,SAASC,YAAY;AAEd,IAAMC,QAAQP,UAAUQ,KAAK;EAClCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAaN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6Cf;EACAO,OAAcC,cAAO;IACnBC,IAAWC,gBACFC,aAAMd,IAAIA,IAAID,IAAIgB,OAAO,CAAA,EAAGC,YAAY;MAC7CP,aACE;IAGJ,CAAA,CAAA;IAEFQ,UAAiBJ,gBACRK,cAAOF,YAAY;MACxBP,aAAa;MACbU,SAAS;IACX,CAAA,CAAA;IAEFC,MAAaP,gBACJK,cAAOF,YAAY;MACxBP,aAAa;MACbU,SAAS;IACX,CAAA,CAAA;IAEFE,gBAAuBR,gBACdS,eAAQN,YAAY;MACzBP,aAAa;MACbc,SAAS;IACX,CAAA,CAAA;IAEFC,OAAcX,gBACLY,cAAOT,YAAY;MACxBP,aAAa;MACbc,SAAS;IACX,C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Z;EACfa,UAAU;IAAC9B,SAAS+B;;AACtB,CAAA,EAAGC,KAAKjC,UAAUkC,SAAS;",
6
+ "names": ["Schema", "AiContext", "Operation", "Database", "Obj", "Ref", "Relation", "Tag", "trim", "Query", "make", "meta", "key", "name", "description", "input", "Struct", "in", "optional", "Array", "Unknown", "annotations", "typename", "String", "example", "text", "includeContent", "Boolean", "default", "limit", "Number", "includeQueues", "output", "services", "Service", "pipe", "intrinsic", "Load", "refs", "ObjectCreate", "data", "Any", "ObjectUpdate", "obj", "properties", "Record", "value", "ObjectDelete", "Void", "SchemaAdd", "jsonSchema", "SchemaList", "ContextAdd", "ContextRemove", "RelationCreate", "source", "target", "RelationDelete", "rel", "TagAdd", "tag", "TagRemove"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  // src/blueprints/blueprint-manager/functions/definitions.ts
2
2
  import * as Schema from "effect/Schema";
3
- import { AiContextService } from "@dxos/assistant";
3
+ import { AiContext } from "@dxos/assistant";
4
4
  import { Blueprint, Operation } from "@dxos/compute";
5
5
  import { Database } from "@dxos/echo";
6
6
  var QueryBlueprints = Operation.make({
@@ -42,7 +42,7 @@ var EnableBlueprints = Operation.make({
42
42
  services: [
43
43
  Blueprint.RegistryService,
44
44
  Database.Service,
45
- AiContextService
45
+ AiContext.Service
46
46
  ]
47
47
  });
48
48
  var UpdateBlueprints = Operation.make({
@@ -64,4 +64,4 @@ export {
64
64
  EnableBlueprints,
65
65
  UpdateBlueprints
66
66
  };
67
- //# sourceMappingURL=chunk-TO5IX24K.mjs.map
67
+ //# sourceMappingURL=chunk-ANSF2BHN.mjs.map
@@ -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
+ }