@dxos/assistant-toolkit 0.8.4-main.fcc0d83b33 → 0.8.4-staging.60fe92afc8
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.
- package/LICENSE +102 -5
- package/dist/lib/neutral/add-artifact-54DVWE53.mjs +24 -0
- package/dist/lib/neutral/add-artifact-54DVWE53.mjs.map +7 -0
- package/dist/lib/neutral/{agent-6OHUAIA2.mjs → agent-LCBDWP74.mjs} +13 -13
- package/dist/lib/neutral/agent-LCBDWP74.mjs.map +7 -0
- package/dist/lib/neutral/{project-rules-FLUQQRPB.mjs → agent-rules-3TBAIVTS.mjs} +8 -8
- package/dist/lib/neutral/{project-rules-FLUQQRPB.mjs.map → agent-rules-3TBAIVTS.mjs.map} +2 -2
- package/dist/lib/neutral/{chunk-WIV7ZVRS.mjs → chunk-24L572PJ.mjs} +27 -16
- package/dist/lib/neutral/chunk-24L572PJ.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-4T3LJGXI.mjs → chunk-3YH7MWSD.mjs} +27 -16
- package/dist/lib/neutral/chunk-3YH7MWSD.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-CVUA23QI.mjs → chunk-4LFE5PQ3.mjs} +67 -32
- package/dist/lib/neutral/chunk-4LFE5PQ3.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-JN4GARRQ.mjs → chunk-BOB6M2YM.mjs} +20 -11
- package/dist/lib/neutral/chunk-BOB6M2YM.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-EJAQUAKM.mjs → chunk-DLVIJSH6.mjs} +24 -10
- package/dist/lib/neutral/chunk-DLVIJSH6.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-WLR3BGO4.mjs → chunk-FQNZX2SH.mjs} +15 -4
- package/dist/lib/neutral/chunk-FQNZX2SH.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-YXOVSRFU.mjs → chunk-JRUTUKPS.mjs} +11 -13
- package/dist/lib/neutral/chunk-JRUTUKPS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-KC2LPECT.mjs +76 -0
- package/dist/lib/neutral/chunk-KC2LPECT.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NSAUN2IX.mjs +66 -0
- package/dist/lib/neutral/chunk-NSAUN2IX.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-GSG4JGIY.mjs → chunk-RNIUE4LK.mjs} +38 -23
- package/dist/lib/neutral/chunk-RNIUE4LK.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-KGU725LW.mjs → chunk-SYUTQPSB.mjs} +4 -7
- package/dist/lib/neutral/chunk-SYUTQPSB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-U5FCQXA2.mjs +69 -0
- package/dist/lib/neutral/chunk-U5FCQXA2.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-SVI25Z2Y.mjs → chunk-URUJQGI6.mjs} +72 -58
- package/dist/lib/neutral/chunk-URUJQGI6.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-NR3GTWRC.mjs → chunk-Z3KITY4U.mjs} +9 -14
- package/dist/lib/neutral/chunk-Z3KITY4U.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-VSDP6SRY.mjs → chunk-ZQDWSV26.mjs} +19 -8
- package/dist/lib/neutral/chunk-ZQDWSV26.mjs.map +7 -0
- package/dist/lib/neutral/{context-add-IIDPRRVB.mjs → context-add-KWEKPGMI.mjs} +5 -5
- package/dist/lib/neutral/context-add-KWEKPGMI.mjs.map +7 -0
- package/dist/lib/neutral/{context-remove-RDYV4PD4.mjs → context-remove-HIQFSVHW.mjs} +5 -5
- package/dist/lib/neutral/context-remove-HIQFSVHW.mjs.map +7 -0
- package/dist/lib/neutral/{create-project-MPAMKQ3T.mjs → create-agent-KUTBEXLJ.mjs} +13 -14
- package/dist/lib/neutral/create-agent-KUTBEXLJ.mjs.map +7 -0
- package/dist/lib/neutral/definitions-6HU2P7R7.mjs +17 -0
- package/dist/lib/neutral/delegate-task-E7WLHT6S.mjs +13 -0
- package/dist/lib/neutral/delegate-task-E7WLHT6S.mjs.map +7 -0
- package/dist/lib/neutral/{delete-J3PMWP7Z.mjs → delete-QHGM7N23.mjs} +4 -4
- package/dist/lib/neutral/{delete-J3PMWP7Z.mjs.map → delete-QHGM7N23.mjs.map} +1 -1
- package/dist/lib/neutral/{enable-blueprints-LELPQHY5.mjs → enable-blueprints-OGYSQ7HD.mjs} +14 -15
- package/dist/lib/neutral/enable-blueprints-OGYSQ7HD.mjs.map +7 -0
- package/dist/lib/neutral/fetch-O6G46HJH.mjs +24 -0
- package/dist/lib/neutral/fetch-O6G46HJH.mjs.map +7 -0
- package/dist/lib/neutral/{fetch-messages-OS74FP76.mjs → fetch-messages-4EVGVEQK.mjs} +8 -9
- package/dist/lib/neutral/fetch-messages-4EVGVEQK.mjs.map +7 -0
- package/dist/lib/neutral/{get-context-JRTOOA5O.mjs → get-context-X4FCUMLK.mjs} +26 -12
- package/dist/lib/neutral/get-context-X4FCUMLK.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +640 -479
- package/dist/lib/neutral/index.mjs.map +4 -4
- package/dist/lib/neutral/{load-LI7HHVD6.mjs → load-C4OPO7RD.mjs} +3 -3
- package/dist/lib/neutral/{load-LI7HHVD6.mjs.map → load-C4OPO7RD.mjs.map} +1 -1
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/object-create-F7R7IRW5.mjs +32 -0
- package/dist/lib/neutral/object-create-F7R7IRW5.mjs.map +7 -0
- package/dist/lib/neutral/{object-delete-I266YAXI.mjs → object-delete-3TJ3XMLN.mjs} +3 -3
- package/dist/lib/neutral/{object-delete-I266YAXI.mjs.map → object-delete-3TJ3XMLN.mjs.map} +1 -1
- package/dist/lib/neutral/{object-update-HY4GI7LA.mjs → object-update-EBRM5AKN.mjs} +4 -4
- package/dist/lib/neutral/{object-update-HY4GI7LA.mjs.map → object-update-EBRM5AKN.mjs.map} +3 -3
- package/dist/lib/neutral/{prompt-4UMXX6QU.mjs → prompt-QL7TTLM3.mjs} +22 -24
- package/dist/lib/neutral/prompt-QL7TTLM3.mjs.map +7 -0
- package/dist/lib/neutral/{qualifier-7BUCOEKK.mjs → qualifier-QAW6LSYF.mjs} +18 -17
- package/dist/lib/neutral/qualifier-QAW6LSYF.mjs.map +7 -0
- package/dist/lib/neutral/{query-U56GNEV6.mjs → query-6XCQIIZC.mjs} +5 -5
- package/dist/lib/neutral/{query-U56GNEV6.mjs.map → query-6XCQIIZC.mjs.map} +4 -4
- package/dist/lib/neutral/{query-B3NOYFCK.mjs → query-QGSHZMCD.mjs} +14 -25
- package/dist/lib/neutral/query-QGSHZMCD.mjs.map +7 -0
- package/dist/lib/neutral/query-blueprints-7NDHHM7U.mjs +17 -0
- package/dist/lib/neutral/query-blueprints-7NDHHM7U.mjs.map +7 -0
- package/dist/lib/neutral/relation-create-WA2DM76W.mjs +31 -0
- package/dist/lib/neutral/relation-create-WA2DM76W.mjs.map +7 -0
- package/dist/lib/neutral/{relation-delete-LXY7W2YO.mjs → relation-delete-66XP7KL7.mjs} +3 -3
- package/dist/lib/neutral/{relation-delete-LXY7W2YO.mjs.map → relation-delete-66XP7KL7.mjs.map} +1 -1
- package/dist/lib/neutral/{save-GWAPLT3Z.mjs → save-HQY35ACW.mjs} +4 -4
- package/dist/lib/neutral/{save-GWAPLT3Z.mjs.map → save-HQY35ACW.mjs.map} +1 -1
- package/dist/lib/neutral/schema-add-2AWYVGOC.mjs +25 -0
- package/dist/lib/neutral/schema-add-2AWYVGOC.mjs.map +7 -0
- package/dist/lib/neutral/schema-list-74CQW2N3.mjs +37 -0
- package/dist/lib/neutral/schema-list-74CQW2N3.mjs.map +7 -0
- package/dist/lib/neutral/{sync-issues-A2RJNPEF.mjs → sync-issues-VUX4OWPO.mjs} +13 -14
- package/dist/lib/neutral/sync-issues-VUX4OWPO.mjs.map +7 -0
- package/dist/lib/neutral/{sync-triggers-NV4JCRN5.mjs → sync-triggers-JEVTYIGU.mjs} +45 -44
- package/dist/lib/neutral/sync-triggers-JEVTYIGU.mjs.map +7 -0
- package/dist/lib/neutral/{tag-add-5NOHUTIE.mjs → tag-add-6EGIY2CC.mjs} +5 -6
- package/dist/lib/neutral/tag-add-6EGIY2CC.mjs.map +7 -0
- package/dist/lib/neutral/{tag-remove-QTKYDJAW.mjs → tag-remove-XVTYJRI7.mjs} +5 -6
- package/dist/lib/neutral/tag-remove-XVTYJRI7.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +10 -13
- package/dist/lib/neutral/testing/index.mjs.map +3 -3
- package/dist/lib/neutral/update-tasks-N65UQUHS.mjs +13 -0
- package/dist/lib/neutral/update-tasks-N65UQUHS.mjs.map +7 -0
- package/dist/types/src/blueprints/agent/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/agent/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/agent/index.d.ts +3 -0
- package/dist/types/src/blueprints/agent/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/agent/operations/add-artifact.d.ts +4 -0
- package/dist/types/src/blueprints/agent/operations/add-artifact.d.ts.map +1 -0
- package/dist/types/src/blueprints/agent/operations/agent.d.ts.map +1 -0
- package/dist/types/src/blueprints/{project/functions → agent/operations}/definitions.d.ts +68 -51
- package/dist/types/src/blueprints/agent/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/agent/operations/get-context.d.ts +4 -0
- package/dist/types/src/blueprints/agent/operations/get-context.d.ts.map +1 -0
- package/dist/types/src/blueprints/{project/functions → agent/operations}/index.d.ts +1 -1
- package/dist/types/src/blueprints/agent/operations/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/agent/operations/qualifier.d.ts +5 -0
- package/dist/types/src/blueprints/agent/operations/qualifier.d.ts.map +1 -0
- package/dist/types/src/blueprints/agent-wizard/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/agent-wizard/index.d.ts +3 -0
- package/dist/types/src/blueprints/agent-wizard/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/{project-wizard/functions/project-rules.d.ts → agent-wizard/operations/agent-rules.d.ts} +1 -1
- package/dist/types/src/blueprints/agent-wizard/operations/agent-rules.d.ts.map +1 -0
- package/dist/types/src/blueprints/agent-wizard/operations/create-agent.d.ts +56 -0
- package/dist/types/src/blueprints/agent-wizard/operations/create-agent.d.ts.map +1 -0
- package/dist/types/src/blueprints/agent-wizard/operations/definitions.d.ts +105 -0
- package/dist/types/src/blueprints/agent-wizard/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/{project-wizard/functions → agent-wizard/operations}/index.d.ts +1 -1
- package/dist/types/src/blueprints/agent-wizard/operations/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/{project-wizard/functions → agent-wizard/operations}/sync-triggers.d.ts +24 -19
- package/dist/types/src/blueprints/agent-wizard/operations/sync-triggers.d.ts.map +1 -0
- package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/index.d.ts +1 -1
- package/dist/types/src/blueprints/blueprint-manager/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/{functions → operations}/definitions.d.ts +19 -19
- package/dist/types/src/blueprints/blueprint-manager/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/{functions → operations}/enable-blueprints.d.ts +10 -10
- package/dist/types/src/blueprints/blueprint-manager/operations/enable-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/{functions → operations}/index.d.ts +1 -1
- package/dist/types/src/blueprints/blueprint-manager/operations/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/{functions → operations}/query-blueprints.d.ts +9 -8
- package/dist/types/src/blueprints/blueprint-manager/operations/query-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/index.d.ts +1 -1
- package/dist/types/src/blueprints/database/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/operations/context-add.d.ts +7 -0
- package/dist/types/src/blueprints/database/operations/context-add.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/operations/context-remove.d.ts +7 -0
- package/dist/types/src/blueprints/database/operations/context-remove.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/operations/definitions.d.ts +65 -0
- package/dist/types/src/blueprints/database/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/{functions → operations}/index.d.ts +1 -1
- package/dist/types/src/blueprints/database/operations/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/operations/load.d.ts +7 -0
- package/dist/types/src/blueprints/database/operations/load.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/operations/object-create.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/{functions → operations}/object-delete.d.ts +1 -1
- package/dist/types/src/blueprints/database/operations/object-delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/operations/object-update.d.ts +10 -0
- package/dist/types/src/blueprints/database/operations/object-update.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/{functions → operations}/query.d.ts +2 -3
- package/dist/types/src/blueprints/database/operations/query.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/operations/relation-create.d.ts +10 -0
- package/dist/types/src/blueprints/database/operations/relation-create.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/operations/relation-delete.d.ts +7 -0
- package/dist/types/src/blueprints/database/operations/relation-delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/operations/schema-add.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/operations/schema-list.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/operations/tag-add.d.ts +11 -0
- package/dist/types/src/blueprints/database/operations/tag-add.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/operations/tag-remove.d.ts +11 -0
- package/dist/types/src/blueprints/database/operations/tag-remove.d.ts.map +1 -0
- package/dist/types/src/blueprints/delegation/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/delegation/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/delegation/index.d.ts +3 -0
- package/dist/types/src/blueprints/delegation/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/delegation/operations/delegate-task.d.ts +14 -0
- package/dist/types/src/blueprints/delegation/operations/delegate-task.d.ts.map +1 -0
- package/dist/types/src/blueprints/delegation/operations/delegate-task.test.d.ts +2 -0
- package/dist/types/src/blueprints/delegation/operations/delegate-task.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/delegation/operations/index.d.ts +4 -0
- package/dist/types/src/blueprints/delegation/operations/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/index.d.ts +1 -1
- package/dist/types/src/blueprints/discord/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/{functions → operations}/definitions.d.ts +2 -3
- package/dist/types/src/blueprints/discord/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/{functions → operations}/fetch-messages.d.ts +2 -3
- package/dist/types/src/blueprints/discord/operations/fetch-messages.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/operations/fetch-messages.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/{functions → operations}/index.d.ts +1 -1
- package/dist/types/src/blueprints/discord/operations/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/github/index.d.ts +1 -1
- package/dist/types/src/blueprints/github/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/operations/definitions.d.ts +7 -0
- package/dist/types/src/blueprints/github/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/github/{functions → operations}/fetch-prs.d.ts +2 -3
- package/dist/types/src/blueprints/github/operations/fetch-prs.d.ts.map +1 -0
- package/dist/types/src/blueprints/github/{functions → operations}/index.d.ts +1 -1
- package/dist/types/src/blueprints/github/operations/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +8 -7
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/index.d.ts +1 -1
- package/dist/types/src/blueprints/linear/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/operations/definitions.d.ts +6 -0
- package/dist/types/src/blueprints/linear/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/{functions → operations}/index.d.ts +1 -1
- package/dist/types/src/blueprints/linear/operations/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/operations/linear.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/{functions → operations}/sync-issues.d.ts +2 -3
- package/dist/types/src/blueprints/linear/operations/sync-issues.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/index.d.ts +1 -1
- package/dist/types/src/blueprints/memory/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/{functions → operations}/definitions.d.ts +2 -2
- package/dist/types/src/blueprints/memory/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/{functions → operations}/delete.d.ts +2 -2
- package/dist/types/src/blueprints/memory/operations/delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/{functions → operations}/index.d.ts +1 -1
- package/dist/types/src/blueprints/memory/operations/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/operations/query.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/operations/save.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/index.d.ts +1 -1
- package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/{functions → operations}/index.d.ts +1 -1
- package/dist/types/src/blueprints/planning/operations/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/operations/update-tasks.d.ts +24 -0
- package/dist/types/src/blueprints/planning/operations/update-tasks.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/operations/update-tasks.test.d.ts +2 -0
- package/dist/types/src/blueprints/planning/operations/update-tasks.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/testing.d.ts +5 -5
- package/dist/types/src/blueprints/testing.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/index.d.ts +1 -1
- package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/operations/fetch.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/{functions → operations}/index.d.ts +1 -1
- package/dist/types/src/blueprints/websearch/operations/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/toolkit.d.ts +1 -1
- package/dist/types/src/crud/graph.d.ts +8 -11
- package/dist/types/src/crud/graph.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +3 -3
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/functions/agent/blueprint-resolution.test.d.ts +2 -0
- package/dist/types/src/functions/agent/blueprint-resolution.test.d.ts.map +1 -0
- package/dist/types/src/functions/agent/definitions.d.ts +22 -30
- package/dist/types/src/functions/agent/definitions.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/supervisor/delegation-strategy.d.ts +9 -0
- package/dist/types/src/supervisor/delegation-strategy.d.ts.map +1 -0
- package/dist/types/src/supervisor/index.d.ts +2 -0
- package/dist/types/src/supervisor/index.d.ts.map +1 -0
- package/dist/types/src/sync/sync.d.ts +1 -2
- package/dist/types/src/sync/sync.d.ts.map +1 -1
- package/dist/types/src/testing/plugins.d.ts +1 -1
- package/dist/types/src/testing/plugins.d.ts.map +1 -1
- package/dist/types/src/toolkits/WebToolkit.d.ts +1 -1
- package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -1
- package/dist/types/src/types/Agent.d.ts +47 -30
- package/dist/types/src/types/Agent.d.ts.map +1 -1
- package/dist/types/src/types/Agent.test.d.ts +2 -0
- package/dist/types/src/types/Agent.test.d.ts.map +1 -0
- package/dist/types/src/types/Chat.d.ts +17 -20
- package/dist/types/src/types/Chat.d.ts.map +1 -1
- package/dist/types/src/types/McpServer.d.ts +5 -3
- package/dist/types/src/types/McpServer.d.ts.map +1 -1
- package/dist/types/src/types/Memory.d.ts +1 -2
- package/dist/types/src/types/Memory.d.ts.map +1 -1
- package/dist/types/src/types/Plan.d.ts +28 -25
- package/dist/types/src/types/Plan.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +32 -30
- package/src/blueprints/AGENTS.md +13 -0
- package/src/blueprints/agent/blueprint.conversations.json +1 -0
- package/src/blueprints/{project → agent}/blueprint.test.ts +40 -36
- package/src/blueprints/{project → agent}/blueprint.ts +3 -3
- package/src/blueprints/agent/index.ts +6 -0
- package/src/blueprints/{project/functions → agent/operations}/add-artifact.ts +3 -13
- package/src/blueprints/{project/functions → agent/operations}/agent.ts +6 -6
- package/src/blueprints/{project/functions → agent/operations}/definitions.ts +19 -15
- package/src/blueprints/{project/functions → agent/operations}/get-context.ts +17 -5
- package/src/blueprints/{project/functions → agent/operations}/index.ts +1 -1
- package/src/blueprints/{project/functions → agent/operations}/qualifier.ts +9 -8
- package/src/blueprints/{project-wizard → agent-wizard}/blueprint.ts +2 -2
- package/src/blueprints/{project-wizard → agent-wizard}/index.ts +1 -1
- package/src/blueprints/{project-wizard/functions/create-project.ts → agent-wizard/operations/create-agent.ts} +2 -3
- package/src/blueprints/{project-wizard/functions → agent-wizard/operations}/definitions.ts +10 -8
- package/src/blueprints/{project-wizard/functions → agent-wizard/operations}/index.ts +3 -3
- package/src/blueprints/{project-wizard/functions → agent-wizard/operations}/sync-triggers.ts +51 -41
- package/src/blueprints/automation/blueprint.ts +12 -14
- package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -1
- package/src/blueprints/blueprint-manager/blueprint.test.ts +27 -70
- package/src/blueprints/blueprint-manager/blueprint.ts +6 -6
- package/src/blueprints/blueprint-manager/index.ts +1 -1
- package/src/blueprints/blueprint-manager/operations/definitions.ts +48 -0
- package/src/blueprints/blueprint-manager/{functions → operations}/enable-blueprints.ts +11 -9
- package/src/blueprints/blueprint-manager/{functions → operations}/index.ts +1 -2
- package/src/blueprints/blueprint-manager/operations/query-blueprints.ts +19 -0
- package/src/blueprints/browser/blueprint.conversations.json +1 -0
- package/src/blueprints/browser/blueprint.test.ts +10 -10
- package/src/blueprints/browser/blueprint.ts +1 -1
- package/src/blueprints/database/blueprint.conversations.json +1 -1
- package/src/blueprints/database/blueprint.test.ts +38 -39
- package/src/blueprints/database/blueprint.ts +2 -2
- package/src/blueprints/database/index.ts +1 -16
- package/src/blueprints/database/{functions → operations}/context-add.ts +2 -2
- package/src/blueprints/database/{functions → operations}/context-remove.ts +2 -2
- package/src/blueprints/database/{functions → operations}/definitions.ts +41 -27
- package/src/blueprints/database/{functions → operations}/index.ts +1 -1
- package/src/blueprints/database/{functions → operations}/object-create.ts +8 -6
- package/src/blueprints/database/{functions → operations}/object-update.ts +1 -1
- package/src/blueprints/database/{functions → operations}/query.ts +17 -12
- package/src/blueprints/database/{functions → operations}/relation-create.ts +7 -5
- package/src/blueprints/database/operations/schema-add.ts +23 -0
- package/src/blueprints/database/{functions → operations}/schema-list.ts +12 -9
- package/src/blueprints/database/{functions → operations}/tag-add.ts +2 -3
- package/src/blueprints/database/{functions → operations}/tag-remove.ts +2 -3
- package/src/blueprints/delegation/blueprint.ts +24 -0
- package/src/blueprints/delegation/index.ts +6 -0
- package/src/blueprints/delegation/operations/delegate-task.test.ts +55 -0
- package/src/blueprints/delegation/operations/delegate-task.ts +57 -0
- package/src/blueprints/delegation/operations/index.ts +9 -0
- package/src/blueprints/discord/blueprint.ts +2 -2
- package/src/blueprints/discord/index.ts +1 -1
- package/src/blueprints/discord/{functions → operations}/definitions.ts +5 -4
- package/src/blueprints/discord/{functions → operations}/fetch-messages.test.ts +8 -3
- package/src/blueprints/discord/{functions → operations}/fetch-messages.ts +2 -3
- package/src/blueprints/discord/{functions → operations}/index.ts +1 -1
- package/src/blueprints/github/index.ts +1 -1
- package/src/blueprints/github/{functions → operations}/definitions.ts +5 -4
- package/src/blueprints/github/{functions → operations}/fetch-prs.ts +3 -3
- package/src/blueprints/github/{functions → operations}/index.ts +1 -1
- package/src/blueprints/index.ts +8 -7
- package/src/blueprints/linear/blueprint.ts +2 -2
- package/src/blueprints/linear/index.ts +1 -1
- package/src/blueprints/linear/{functions → operations}/definitions.ts +5 -4
- package/src/blueprints/linear/{functions → operations}/index.ts +1 -1
- package/src/blueprints/linear/{functions → operations}/linear.test.ts +5 -7
- package/src/blueprints/linear/{functions → operations}/sync-issues.ts +6 -7
- package/src/blueprints/memory/blueprint.conversations.json +1 -1
- package/src/blueprints/memory/blueprint.test.ts +11 -12
- package/src/blueprints/memory/blueprint.ts +2 -2
- package/src/blueprints/memory/index.ts +1 -1
- package/src/blueprints/memory/{functions → operations}/definitions.ts +7 -3
- package/src/blueprints/memory/{functions → operations}/index.ts +1 -1
- package/src/blueprints/memory/{functions → operations}/query.ts +1 -1
- package/src/blueprints/planning/blueprint.ts +2 -2
- package/src/blueprints/planning/index.ts +1 -1
- package/src/blueprints/planning/{functions → operations}/index.ts +1 -1
- package/src/blueprints/planning/{functions/definitions.ts → operations/update-tasks.md} +29 -50
- package/src/blueprints/planning/operations/update-tasks.test.ts +55 -0
- package/src/blueprints/planning/operations/update-tasks.ts +71 -0
- package/src/blueprints/testing.ts +12 -6
- package/src/blueprints/websearch/blueprint.conversations.json +1 -1
- package/src/blueprints/websearch/blueprint.test.ts +3 -2
- package/src/blueprints/websearch/blueprint.ts +3 -3
- package/src/blueprints/websearch/index.ts +1 -1
- package/src/blueprints/websearch/{functions → operations}/definitions.ts +3 -1
- package/src/blueprints/websearch/operations/fetch.ts +26 -0
- package/src/blueprints/websearch/{functions → operations}/index.ts +1 -1
- package/src/crud/graph.test.ts +1 -1
- package/src/crud/graph.ts +149 -165
- package/src/errors.ts +3 -3
- package/src/functions/agent/blueprint-resolution.test.ts +131 -0
- package/src/functions/agent/definitions.ts +14 -9
- package/src/functions/agent/prompt.conversations.json +1 -1
- package/src/functions/agent/prompt.test.ts +11 -16
- package/src/functions/agent/prompt.ts +27 -24
- package/src/index.ts +1 -0
- package/src/supervisor/delegation-strategy.ts +188 -0
- package/src/supervisor/index.ts +5 -0
- package/src/sync/sync.ts +9 -8
- package/src/testing/plugins.tsx +10 -15
- package/src/toolkits/WebToolkit.ts +13 -2
- package/src/types/Agent.test.ts +93 -0
- package/src/types/Agent.ts +97 -62
- package/src/types/Chat.ts +11 -21
- package/src/types/McpServer.ts +10 -16
- package/src/types/Memory.ts +5 -7
- package/src/types/Plan.ts +14 -17
- package/dist/lib/neutral/add-artifact-XDFUXRY5.mjs +0 -30
- package/dist/lib/neutral/add-artifact-XDFUXRY5.mjs.map +0 -7
- package/dist/lib/neutral/agent-6OHUAIA2.mjs.map +0 -7
- package/dist/lib/neutral/chunk-4T3LJGXI.mjs.map +0 -7
- package/dist/lib/neutral/chunk-CVUA23QI.mjs.map +0 -7
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +0 -7
- package/dist/lib/neutral/chunk-GSG4JGIY.mjs.map +0 -7
- package/dist/lib/neutral/chunk-JN4GARRQ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-KGU725LW.mjs.map +0 -7
- package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +0 -7
- package/dist/lib/neutral/chunk-P5LAPHCG.mjs +0 -140
- package/dist/lib/neutral/chunk-P5LAPHCG.mjs.map +0 -7
- package/dist/lib/neutral/chunk-SVI25Z2Y.mjs.map +0 -7
- package/dist/lib/neutral/chunk-VSDP6SRY.mjs.map +0 -7
- package/dist/lib/neutral/chunk-WIV7ZVRS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +0 -7
- package/dist/lib/neutral/chunk-YSYNXOZA.mjs +0 -68
- package/dist/lib/neutral/chunk-YSYNXOZA.mjs.map +0 -7
- package/dist/lib/neutral/chunk-YXOVSRFU.mjs.map +0 -7
- package/dist/lib/neutral/context-add-IIDPRRVB.mjs.map +0 -7
- package/dist/lib/neutral/context-remove-RDYV4PD4.mjs.map +0 -7
- package/dist/lib/neutral/create-project-MPAMKQ3T.mjs.map +0 -7
- package/dist/lib/neutral/enable-blueprints-LELPQHY5.mjs.map +0 -7
- package/dist/lib/neutral/fetch-KHMHV7JR.mjs +0 -16
- package/dist/lib/neutral/fetch-KHMHV7JR.mjs.map +0 -7
- package/dist/lib/neutral/fetch-messages-OS74FP76.mjs.map +0 -7
- package/dist/lib/neutral/get-context-JRTOOA5O.mjs.map +0 -7
- package/dist/lib/neutral/object-create-52Z7YKIA.mjs +0 -35
- package/dist/lib/neutral/object-create-52Z7YKIA.mjs.map +0 -7
- package/dist/lib/neutral/project-JAU3A7AX.mjs +0 -23
- package/dist/lib/neutral/prompt-4UMXX6QU.mjs.map +0 -7
- package/dist/lib/neutral/qualifier-7BUCOEKK.mjs.map +0 -7
- package/dist/lib/neutral/query-B3NOYFCK.mjs.map +0 -7
- package/dist/lib/neutral/query-blueprints-Z576ABT5.mjs +0 -17
- package/dist/lib/neutral/query-blueprints-Z576ABT5.mjs.map +0 -7
- package/dist/lib/neutral/relation-create-Z3NGW4VU.mjs +0 -34
- package/dist/lib/neutral/relation-create-Z3NGW4VU.mjs.map +0 -7
- package/dist/lib/neutral/schema-add-4TXJO2V7.mjs +0 -24
- package/dist/lib/neutral/schema-add-4TXJO2V7.mjs.map +0 -7
- package/dist/lib/neutral/schema-list-Q7HRRKGR.mjs +0 -39
- package/dist/lib/neutral/schema-list-Q7HRRKGR.mjs.map +0 -7
- package/dist/lib/neutral/sync-issues-A2RJNPEF.mjs.map +0 -7
- package/dist/lib/neutral/sync-triggers-NV4JCRN5.mjs.map +0 -7
- package/dist/lib/neutral/tag-add-5NOHUTIE.mjs.map +0 -7
- package/dist/lib/neutral/tag-remove-QTKYDJAW.mjs.map +0 -7
- package/dist/lib/neutral/update-blueprints-K7A5SHBZ.mjs +0 -17
- package/dist/lib/neutral/update-blueprints-K7A5SHBZ.mjs.map +0 -7
- package/dist/lib/neutral/update-tasks-UGGHWXT5.mjs +0 -46
- package/dist/lib/neutral/update-tasks-UGGHWXT5.mjs.map +0 -7
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +0 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +0 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +0 -5
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/context-add.d.ts +0 -7
- package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts +0 -7
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/definitions.d.ts +0 -59
- package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/load.d.ts +0 -7
- package/dist/types/src/blueprints/database/functions/load.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/object-update.d.ts +0 -10
- package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/query.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts +0 -10
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +0 -7
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts +0 -8
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +0 -1
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +0 -8
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +0 -1
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +0 -1
- package/dist/types/src/blueprints/discord/functions/fetch-messages.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/discord/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/github/functions/definitions.d.ts +0 -8
- package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +0 -1
- package/dist/types/src/blueprints/github/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts +0 -7
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/linear/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/linear/functions/linear.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +0 -1
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +0 -1
- package/dist/types/src/blueprints/memory/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/memory/functions/query.d.ts.map +0 -1
- package/dist/types/src/blueprints/memory/functions/save.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts +0 -11
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +0 -11
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +0 -1
- package/dist/types/src/blueprints/project/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/project/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +0 -8
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +0 -1
- package/dist/types/src/blueprints/project/functions/agent.d.ts.map +0 -1
- package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/project/functions/get-context.d.ts +0 -15
- package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +0 -1
- package/dist/types/src/blueprints/project/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts +0 -73
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +0 -1
- package/dist/types/src/blueprints/project/index.d.ts +0 -3
- package/dist/types/src/blueprints/project/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +0 -52
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +0 -1
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +0 -97
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +0 -1
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +0 -1
- package/dist/types/src/blueprints/project-wizard/index.d.ts +0 -3
- package/dist/types/src/blueprints/project-wizard/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +0 -1
- package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +0 -1
- package/src/blueprints/blueprint-manager/functions/definitions.ts +0 -58
- package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +0 -19
- package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +0 -19
- package/src/blueprints/database/functions/schema-add.ts +0 -28
- package/src/blueprints/planning/functions/update-tasks.ts +0 -45
- package/src/blueprints/project/blueprint.conversations.json +0 -1
- package/src/blueprints/project/index.ts +0 -6
- package/src/blueprints/websearch/functions/fetch.ts +0 -18
- /package/dist/lib/neutral/{project-JAU3A7AX.mjs.map → definitions-6HU2P7R7.mjs.map} +0 -0
- /package/dist/types/src/blueprints/{project → agent}/blueprint.d.ts +0 -0
- /package/dist/types/src/blueprints/{project → agent}/blueprint.test.d.ts +0 -0
- /package/dist/types/src/blueprints/{project/functions → agent/operations}/agent.d.ts +0 -0
- /package/dist/types/src/blueprints/{project-wizard → agent-wizard}/blueprint.d.ts +0 -0
- /package/dist/types/src/blueprints/database/{functions → operations}/object-create.d.ts +0 -0
- /package/dist/types/src/blueprints/database/{functions → operations}/schema-add.d.ts +0 -0
- /package/dist/types/src/blueprints/database/{functions → operations}/schema-list.d.ts +0 -0
- /package/dist/types/src/blueprints/discord/{functions → operations}/fetch-messages.test.d.ts +0 -0
- /package/dist/types/src/blueprints/linear/{functions → operations}/linear.test.d.ts +0 -0
- /package/dist/types/src/blueprints/memory/{functions → operations}/query.d.ts +0 -0
- /package/dist/types/src/blueprints/memory/{functions → operations}/save.d.ts +0 -0
- /package/dist/types/src/blueprints/websearch/{functions → operations}/definitions.d.ts +0 -0
- /package/dist/types/src/blueprints/websearch/{functions → operations}/fetch.d.ts +0 -0
- /package/src/blueprints/{project-wizard/functions/project-rules.ts → agent-wizard/operations/agent-rules.ts} +0 -0
- /package/src/blueprints/database/{functions → operations}/load.ts +0 -0
- /package/src/blueprints/database/{functions → operations}/object-delete.ts +0 -0
- /package/src/blueprints/database/{functions → operations}/relation-delete.ts +0 -0
- /package/src/blueprints/memory/{functions → operations}/delete.ts +0 -0
- /package/src/blueprints/memory/{functions → operations}/save.ts +0 -0
package/src/testing/plugins.tsx
CHANGED
|
@@ -7,20 +7,15 @@ import React from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
-
import { Format, type Obj, Type } from '@dxos/echo';
|
|
10
|
+
import { DXN, Format, type Obj, Type } from '@dxos/echo';
|
|
11
11
|
import { Card } from '@dxos/react-ui';
|
|
12
12
|
import { Syntax } from '@dxos/react-ui-syntax-highlighter';
|
|
13
13
|
|
|
14
14
|
export const MapSchema = Schema.Struct({
|
|
15
15
|
coordinates: Format.GeoPoint,
|
|
16
|
-
}).pipe(
|
|
17
|
-
Type.object({
|
|
18
|
-
typename: 'com.example.type.map',
|
|
19
|
-
version: '0.1.0',
|
|
20
|
-
}),
|
|
21
|
-
);
|
|
16
|
+
}).pipe(Type.makeObject(DXN.make('com.example.type.map', '0.1.0')));
|
|
22
17
|
|
|
23
|
-
export type MapSchema =
|
|
18
|
+
export type MapSchema = Type.InstanceType<typeof MapSchema>;
|
|
24
19
|
|
|
25
20
|
// TODO(burdon): Move to ECHO def.
|
|
26
21
|
export type ArtifactsContext = {
|
|
@@ -42,28 +37,28 @@ export const capabilities: Capability.Any[] = [
|
|
|
42
37
|
Capability.contributes(
|
|
43
38
|
Capabilities.ReactSurface,
|
|
44
39
|
Surface.create({
|
|
45
|
-
id: '
|
|
40
|
+
id: 'pluginImage',
|
|
46
41
|
role: 'card--content',
|
|
47
42
|
filter: (data: any): data is any => isImage(data.value),
|
|
48
43
|
component: ({ data }) => (
|
|
49
|
-
<Card.
|
|
44
|
+
<Card.Body>
|
|
50
45
|
<img
|
|
51
46
|
className='grow object-cover'
|
|
52
47
|
src={`data:image/jpeg;base64,${data.value.source.data}`}
|
|
53
48
|
alt={data.value.prompt ?? `Generated image [id=${data.value.id}]`}
|
|
54
49
|
/>
|
|
55
|
-
</Card.
|
|
50
|
+
</Card.Body>
|
|
56
51
|
),
|
|
57
52
|
}),
|
|
58
53
|
),
|
|
59
54
|
Capability.contributes(
|
|
60
55
|
Capabilities.ReactSurface,
|
|
61
56
|
Surface.create({
|
|
62
|
-
id: '
|
|
57
|
+
id: 'pluginDefault',
|
|
63
58
|
role: 'card--content',
|
|
64
|
-
position: '
|
|
59
|
+
position: 'last',
|
|
65
60
|
component: ({ data }) => (
|
|
66
|
-
<Card.
|
|
61
|
+
<Card.Body>
|
|
67
62
|
<Syntax.Root data={data}>
|
|
68
63
|
<Syntax.Content>
|
|
69
64
|
<Syntax.Filter />
|
|
@@ -72,7 +67,7 @@ export const capabilities: Capability.Any[] = [
|
|
|
72
67
|
</Syntax.Viewport>
|
|
73
68
|
</Syntax.Content>
|
|
74
69
|
</Syntax.Root>
|
|
75
|
-
</Card.
|
|
70
|
+
</Card.Body>
|
|
76
71
|
),
|
|
77
72
|
}),
|
|
78
73
|
),
|
|
@@ -8,6 +8,8 @@ import * as Toolkit from '@effect/ai/Toolkit';
|
|
|
8
8
|
import * as Effect from 'effect/Effect';
|
|
9
9
|
import * as Schema from 'effect/Schema';
|
|
10
10
|
|
|
11
|
+
import { proxyFetchLegacy } from '@dxos/edge-client/cors-proxy';
|
|
12
|
+
|
|
11
13
|
// TODO(dmaretskyi): Testing only.
|
|
12
14
|
export const WebToolkit = Toolkit.make(
|
|
13
15
|
AnthropicTool.WebSearch_20250305({}).pipe(
|
|
@@ -27,7 +29,16 @@ export const WebToolkit = Toolkit.make(
|
|
|
27
29
|
|
|
28
30
|
export const layer = WebToolkit.toLayer({
|
|
29
31
|
WebFetch: Effect.fnUntraced(function* ({ url }) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
return yield* Effect.tryPromise({
|
|
33
|
+
try: async (): Promise<string> => {
|
|
34
|
+
const response = await proxyFetchLegacy(new URL(url));
|
|
35
|
+
if (!response.ok) {
|
|
36
|
+
const body = await response.text();
|
|
37
|
+
return `Fetch failed with status ${response.status}: ${body.slice(0, 256)}`;
|
|
38
|
+
}
|
|
39
|
+
return await response.text();
|
|
40
|
+
},
|
|
41
|
+
catch: (cause) => new Error(String(cause)),
|
|
42
|
+
}).pipe(Effect.catchAll((err) => Effect.succeed(err.message)));
|
|
32
43
|
}),
|
|
33
44
|
});
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, it } from '@effect/vitest';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
|
|
8
|
+
import { Blueprint } from '@dxos/compute';
|
|
9
|
+
import { Database, Feed, Obj } from '@dxos/echo';
|
|
10
|
+
import { TestHelpers } from '@dxos/effect/testing';
|
|
11
|
+
import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
|
|
12
|
+
import { EntityId } from '@dxos/keys';
|
|
13
|
+
import { Text } from '@dxos/schema';
|
|
14
|
+
|
|
15
|
+
import { Agent, Chat, Plan } from '../types';
|
|
16
|
+
|
|
17
|
+
EntityId.dangerouslyDisableRandomness();
|
|
18
|
+
|
|
19
|
+
const TestLayer = AssistantTestLayer({
|
|
20
|
+
types: [Agent.Agent, Plan.Plan, Chat.Chat, Chat.CompanionTo, Blueprint.Blueprint, Feed.Feed, Text.Text],
|
|
21
|
+
disableLlmMemoization: true,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const makeAgent = Effect.fnUntraced(function* () {
|
|
25
|
+
return yield* Agent.makeInitialized(
|
|
26
|
+
{ name: 'Test', instructions: '' },
|
|
27
|
+
Blueprint.make({ key: 'org.dxos.test.blueprint', name: 'Test' }),
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
describe('Agent.addArtifact', () => {
|
|
32
|
+
// The id forms a tool may hand back: a bare entity id, or a fully-qualified ECHO URI. LLMs commonly
|
|
33
|
+
// strip a returned URI down to the bare id, so both must resolve.
|
|
34
|
+
it.scoped(
|
|
35
|
+
'adds a freshly-created object by bare entity id',
|
|
36
|
+
Effect.fnUntraced(
|
|
37
|
+
function* ({ expect }) {
|
|
38
|
+
const agent = yield* makeAgent();
|
|
39
|
+
const doc = yield* Database.add(Text.make({ content: 'hello' }));
|
|
40
|
+
|
|
41
|
+
yield* Agent.addArtifact(agent, { name: 'Doc', id: doc.id });
|
|
42
|
+
|
|
43
|
+
expect(agent.artifacts).toHaveLength(1);
|
|
44
|
+
expect(agent.artifacts[0]!.name).toBe('Doc');
|
|
45
|
+
const loaded = yield* Database.load(agent.artifacts[0]!.data);
|
|
46
|
+
expect(loaded.id).toBe(doc.id);
|
|
47
|
+
},
|
|
48
|
+
Effect.provide(TestLayer),
|
|
49
|
+
TestHelpers.provideTestContext,
|
|
50
|
+
),
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
it.scoped(
|
|
54
|
+
'adds an object by fully-qualified ECHO URI',
|
|
55
|
+
Effect.fnUntraced(
|
|
56
|
+
function* ({ expect }) {
|
|
57
|
+
const agent = yield* makeAgent();
|
|
58
|
+
const doc = yield* Database.add(Text.make({ content: 'world' }));
|
|
59
|
+
|
|
60
|
+
yield* Agent.addArtifact(agent, { name: 'Doc', id: Obj.getURI(doc) });
|
|
61
|
+
|
|
62
|
+
expect(agent.artifacts).toHaveLength(1);
|
|
63
|
+
const loaded = yield* Database.load(agent.artifacts[0]!.data);
|
|
64
|
+
expect(loaded.id).toBe(doc.id);
|
|
65
|
+
},
|
|
66
|
+
Effect.provide(TestLayer),
|
|
67
|
+
TestHelpers.provideTestContext,
|
|
68
|
+
),
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
// Best-effort: the reference is stored without resolving (the artifact may be created by a separate
|
|
72
|
+
// invocation and not yet visible); resolution happens lazily when the artifact is later read.
|
|
73
|
+
it.scoped(
|
|
74
|
+
'stores a reference without resolving it (resolves lazily)',
|
|
75
|
+
Effect.fnUntraced(
|
|
76
|
+
function* ({ expect }) {
|
|
77
|
+
const agent = yield* makeAgent();
|
|
78
|
+
const doc = yield* Database.add(Text.make({ content: 'later' }));
|
|
79
|
+
const bareId = doc.id;
|
|
80
|
+
|
|
81
|
+
// Add by bare id; the helper must not require the artifact to be resolvable at add time.
|
|
82
|
+
yield* Agent.addArtifact(agent, { name: 'Doc', id: bareId });
|
|
83
|
+
expect(agent.artifacts).toHaveLength(1);
|
|
84
|
+
|
|
85
|
+
// The stored ref still resolves to the object.
|
|
86
|
+
const loaded = yield* Database.load(agent.artifacts[0]!.data);
|
|
87
|
+
expect(loaded.id).toBe(doc.id);
|
|
88
|
+
},
|
|
89
|
+
Effect.provide(TestLayer),
|
|
90
|
+
TestHelpers.provideTestContext,
|
|
91
|
+
),
|
|
92
|
+
);
|
|
93
|
+
});
|
package/src/types/Agent.ts
CHANGED
|
@@ -8,16 +8,15 @@ import * as Effect from 'effect/Effect';
|
|
|
8
8
|
import * as Function from 'effect/Function';
|
|
9
9
|
import * as Schema from 'effect/Schema';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { AiContext } from '@dxos/assistant';
|
|
12
12
|
import { type Blueprint } from '@dxos/compute';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';
|
|
18
|
-
import { acquireReleaseResource } from '@dxos/effect';
|
|
13
|
+
import { DXN, Annotation, Database, Feed, Format, Obj, Ref, Relation, Type } from '@dxos/echo';
|
|
14
|
+
import { FormInputAnnotation } from '@dxos/echo/Annotation';
|
|
15
|
+
import { type EntityNotFoundError } from '@dxos/echo/Err';
|
|
16
|
+
import { EffectEx } from '@dxos/effect';
|
|
19
17
|
import { invariant } from '@dxos/invariant';
|
|
20
|
-
import {
|
|
18
|
+
import { EID, type EntityId } from '@dxos/keys';
|
|
19
|
+
import { Text } from '@dxos/schema';
|
|
21
20
|
|
|
22
21
|
import * as Chat from './Chat';
|
|
23
22
|
import * as Plan from './Plan';
|
|
@@ -64,52 +63,57 @@ export const Agent = Schema.Struct({
|
|
|
64
63
|
}),
|
|
65
64
|
).pipe(FormInputAnnotation.set(false)),
|
|
66
65
|
|
|
67
|
-
/**
|
|
68
|
-
* Input feed for subscriptions.
|
|
69
|
-
*/
|
|
70
|
-
// TODO(burdon): Rename to Feed?
|
|
71
|
-
// NOTE: Named `queue` to conform to subscribable schema (see QueueAnnotation).
|
|
72
|
-
queue: Schema.optional(Ref.Ref(Queue).pipe(FormInputAnnotation.set(false))),
|
|
73
|
-
|
|
74
66
|
/**
|
|
75
67
|
* References to objects with a canonical queue property.
|
|
76
68
|
* Schema must have the QueueAnnotation.
|
|
77
69
|
*/
|
|
70
|
+
// Change to trigger.
|
|
78
71
|
// TODO(dmaretskyi): Turn into an array of objects when form-data
|
|
79
72
|
subscriptions: Schema.Array(Ref.Ref(Obj.Unknown)).pipe(FormInputAnnotation.set(false)),
|
|
80
73
|
|
|
74
|
+
/**
|
|
75
|
+
* Cron expression for a timer trigger that invokes the agent worker on a schedule.
|
|
76
|
+
* The timer trigger bypasses the qualifier and goes straight to the agent worker.
|
|
77
|
+
*/
|
|
78
|
+
// Change to trigger.
|
|
79
|
+
cron: Schema.optional(Schema.String).annotations({
|
|
80
|
+
title: 'Cron',
|
|
81
|
+
description: 'Cron expression for a timer trigger that invokes the agent on a schedule.',
|
|
82
|
+
}),
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Input feed for subscriptions.
|
|
86
|
+
* @deprecated Subscriptions will write directly to the agent.
|
|
87
|
+
*/
|
|
88
|
+
feed: Schema.optional(Ref.Ref(Feed.Feed).pipe(FormInputAnnotation.set(false))),
|
|
89
|
+
|
|
81
90
|
/**
|
|
82
91
|
* Allow the agent to filter events.
|
|
83
92
|
* Related events will be added to the input queue of the agent.
|
|
84
93
|
* It is recommended to enable this.
|
|
94
|
+
* @deprecated
|
|
85
95
|
*/
|
|
86
96
|
filterEvents: Schema.optional(Schema.Boolean).annotations({
|
|
87
97
|
title: 'Filter events',
|
|
88
98
|
description: 'Allow the agent to filter events.',
|
|
89
99
|
}),
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Cron expression for a timer trigger that invokes the agent worker on a schedule.
|
|
93
|
-
* The timer trigger bypasses the qualifier and goes straight to the agent worker.
|
|
94
|
-
*/
|
|
95
|
-
cron: Schema.optional(Schema.String).annotations({
|
|
96
|
-
title: 'Cron',
|
|
97
|
-
description: 'Cron expression for a timer trigger that invokes the agent on a schedule.',
|
|
98
|
-
}),
|
|
99
100
|
}).pipe(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}),
|
|
104
|
-
LabelAnnotation.set(['name']),
|
|
105
|
-
QueueAnnotation.set(true),
|
|
106
|
-
Annotation.IconAnnotation.set({
|
|
107
|
-
icon: 'ph--drone--regular',
|
|
108
|
-
hue: 'sky',
|
|
109
|
-
}),
|
|
101
|
+
Annotation.LabelAnnotation.set(['name']),
|
|
102
|
+
Annotation.IconAnnotation.set({ icon: 'ph--drone--regular', hue: 'sky' }),
|
|
103
|
+
Type.makeObject(DXN.make('org.dxos.type.agent', '0.1.0')),
|
|
110
104
|
);
|
|
111
105
|
|
|
112
|
-
export
|
|
106
|
+
export type Agent = Type.InstanceType<typeof Agent>;
|
|
107
|
+
|
|
108
|
+
export type MakeProps = Omit<
|
|
109
|
+
Obj.MakeProps<typeof Agent>,
|
|
110
|
+
'instructions' | 'plan' | 'artifacts' | 'subscriptions' | 'chat'
|
|
111
|
+
> &
|
|
112
|
+
Partial<Pick<Obj.MakeProps<typeof Agent>, 'artifacts' | 'subscriptions'>> & {
|
|
113
|
+
instructions: string;
|
|
114
|
+
blueprints?: Ref.Ref<Blueprint.Blueprint>[];
|
|
115
|
+
contextObjects?: Ref.Ref<Obj.Any>[];
|
|
116
|
+
};
|
|
113
117
|
|
|
114
118
|
/**
|
|
115
119
|
* Creates a fully initialized Agent with chat, queue, and context bindings.
|
|
@@ -119,28 +123,25 @@ export interface Agent extends Schema.Schema.Type<typeof Agent> {}
|
|
|
119
123
|
* @returns An Effect that yields the initialized Agent.
|
|
120
124
|
*/
|
|
121
125
|
export const makeInitialized = (
|
|
122
|
-
props:
|
|
123
|
-
|
|
124
|
-
instructions: string;
|
|
125
|
-
blueprints?: Ref.Ref<Blueprint.Blueprint>[];
|
|
126
|
-
contextObjects?: Ref.Ref<Obj.Any>[];
|
|
127
|
-
},
|
|
126
|
+
props: MakeProps,
|
|
127
|
+
// TODO(burdon): Reconcile with props.blueprints.
|
|
128
128
|
blueprint: Blueprint.Blueprint,
|
|
129
|
-
): Effect.Effect<Agent, never,
|
|
129
|
+
): Effect.Effect<Agent, never, Feed.FeedService | Database.Service> =>
|
|
130
130
|
Effect.gen(function* () {
|
|
131
|
-
const agent =
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
131
|
+
const agent = yield* Database.add(
|
|
132
|
+
Obj.make(Agent, {
|
|
133
|
+
...props,
|
|
134
|
+
instructions: Ref.make(Text.make({ content: props.instructions })),
|
|
135
|
+
plan: Ref.make(Plan.makePlan({ tasks: [] })),
|
|
136
|
+
artifacts: props.artifacts ?? [],
|
|
137
|
+
subscriptions: props.subscriptions ?? [],
|
|
138
|
+
filterEvents: props.filterEvents ?? true,
|
|
139
|
+
enabled: props.enabled ?? true,
|
|
140
|
+
}),
|
|
141
|
+
);
|
|
141
142
|
const feed = yield* Database.add(Feed.make());
|
|
142
143
|
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
143
|
-
const contextBinder = new
|
|
144
|
+
const contextBinder = new AiContext.Binder({ feed, runtime });
|
|
144
145
|
// TODO(dmaretskyi): Blueprint registry.
|
|
145
146
|
const agentBlueprint = yield* Database.add(Obj.clone(blueprint, { deep: true }));
|
|
146
147
|
yield* Effect.promise(() =>
|
|
@@ -149,6 +150,7 @@ export const makeInitialized = (
|
|
|
149
150
|
objects: [Ref.make(agent), ...(props.contextObjects ?? [])],
|
|
150
151
|
}),
|
|
151
152
|
);
|
|
153
|
+
|
|
152
154
|
const chat = yield* Database.add(
|
|
153
155
|
Chat.make({
|
|
154
156
|
[Obj.Parent]: agent,
|
|
@@ -163,11 +165,10 @@ export const makeInitialized = (
|
|
|
163
165
|
}),
|
|
164
166
|
);
|
|
165
167
|
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
+
const inputFeed = yield* Database.add(Feed.make());
|
|
168
169
|
Obj.update(agent, (agent) => {
|
|
169
170
|
agent.chat = Ref.make(chat);
|
|
170
|
-
agent.
|
|
171
|
+
agent.feed = Ref.make(inputFeed);
|
|
171
172
|
});
|
|
172
173
|
|
|
173
174
|
return agent;
|
|
@@ -182,7 +183,7 @@ export const makeInitialized = (
|
|
|
182
183
|
*/
|
|
183
184
|
export const resetChatHistory = (
|
|
184
185
|
agent: Agent,
|
|
185
|
-
): Effect.Effect<void,
|
|
186
|
+
): Effect.Effect<void, EntityNotFoundError, Feed.FeedService | Database.Service> =>
|
|
186
187
|
Effect.gen(function* () {
|
|
187
188
|
invariant(agent.chat, 'Agent must have an existing chat to reset.');
|
|
188
189
|
|
|
@@ -191,9 +192,9 @@ export const resetChatHistory = (
|
|
|
191
192
|
Effect.flatMap(Database.load),
|
|
192
193
|
);
|
|
193
194
|
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
194
|
-
const existingContextBinder = yield* acquireReleaseResource(
|
|
195
|
+
const existingContextBinder = yield* EffectEx.acquireReleaseResource(
|
|
195
196
|
() =>
|
|
196
|
-
new
|
|
197
|
+
new AiContext.Binder({
|
|
197
198
|
feed: existingFeed,
|
|
198
199
|
runtime,
|
|
199
200
|
}),
|
|
@@ -202,7 +203,7 @@ export const resetChatHistory = (
|
|
|
202
203
|
const objects = existingContextBinder.getObjects().map((object) => Ref.make(object));
|
|
203
204
|
|
|
204
205
|
const feed = yield* Database.add(Feed.make());
|
|
205
|
-
const contextBinder = new
|
|
206
|
+
const contextBinder = new AiContext.Binder({ feed, runtime });
|
|
206
207
|
yield* Effect.promise(() =>
|
|
207
208
|
contextBinder.bind({
|
|
208
209
|
blueprints,
|
|
@@ -228,8 +229,8 @@ export const resetChatHistory = (
|
|
|
228
229
|
);
|
|
229
230
|
}).pipe(Effect.scoped);
|
|
230
231
|
|
|
231
|
-
export const getFromChatContext: Effect.Effect<Agent, Error,
|
|
232
|
-
const agents = yield* Function.pipe(
|
|
232
|
+
export const getFromChatContext: Effect.Effect<Agent, Error, AiContext.Service> = Effect.gen(function* () {
|
|
233
|
+
const agents = yield* Function.pipe(AiContext.Service.findObjects(Agent));
|
|
233
234
|
if (agents.length !== 1) {
|
|
234
235
|
return yield* Effect.fail(new Error(`There should be exactly one agent in context. Got: ${agents.length}`));
|
|
235
236
|
}
|
|
@@ -237,3 +238,37 @@ export const getFromChatContext: Effect.Effect<Agent, Error, AiContextService> =
|
|
|
237
238
|
const agent = agents[0];
|
|
238
239
|
return agent;
|
|
239
240
|
});
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Adds an object to the agent's artifacts (context), resolving it by id within the agent's space.
|
|
244
|
+
*
|
|
245
|
+
* Accepts whatever reference a tool returned — a bare entity id (e.g. `01J…`) or a full ECHO URI
|
|
246
|
+
* (`echo:/…`, `echo://…`). LLMs frequently strip a returned URI down to the bare id, which is not
|
|
247
|
+
* a resolvable URI on its own; resolving by entity id within the space tolerates both forms.
|
|
248
|
+
*
|
|
249
|
+
* Returns the fully-qualified {@link Ref.Ref} that was stored (also usable for an inline message
|
|
250
|
+
* reference block).
|
|
251
|
+
*/
|
|
252
|
+
export const addArtifact = (
|
|
253
|
+
agent: Agent,
|
|
254
|
+
{ name, id }: { name: string; id: string },
|
|
255
|
+
): Effect.Effect<Ref.Ref<Obj.Unknown>, Error, Database.Service> =>
|
|
256
|
+
Effect.gen(function* () {
|
|
257
|
+
// Untyped, LLM-provided reference: normalize to the entity id, falling back to the raw value
|
|
258
|
+
// (a bare id is already an entity id) — a genuine external-data boundary.
|
|
259
|
+
const parsed = EID.tryParse(id);
|
|
260
|
+
const entityId = ((parsed ? EID.getEntityId(parsed) : undefined) ?? id) as EntityId;
|
|
261
|
+
|
|
262
|
+
// Store a FULLY-QUALIFIED ref (`echo://<space>/<id>`), not a local `echo:/<id>` one: the artifact
|
|
263
|
+
// is created by a separate tool/process invocation, and a space-less local ref does not resolve
|
|
264
|
+
// when the agent is later read from a different db view (e.g. the UI). It is not resolved here —
|
|
265
|
+
// it resolves lazily when read, by which point the artifact is persisted.
|
|
266
|
+
const { db } = yield* Database.Service;
|
|
267
|
+
const ref = db.makeRef<Obj.Unknown>(EID.make({ spaceId: db.spaceId, entityId }));
|
|
268
|
+
|
|
269
|
+
Obj.update(agent, (agent) => {
|
|
270
|
+
agent.artifacts.push({ name, data: ref });
|
|
271
|
+
});
|
|
272
|
+
yield* Database.flush();
|
|
273
|
+
return ref;
|
|
274
|
+
});
|
package/src/types/Chat.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
import * as Schema from 'effect/Schema';
|
|
8
8
|
|
|
9
|
-
import { Annotation, Feed, Obj, Ref, Type } from '@dxos/echo';
|
|
10
|
-
import { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/
|
|
9
|
+
import { DXN, Annotation, Feed, Obj, Ref, Type } from '@dxos/echo';
|
|
10
|
+
import { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/Annotation';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* AI chat.
|
|
@@ -17,47 +17,37 @@ export const Chat = Schema.Struct({
|
|
|
17
17
|
feed: Ref.Ref(Feed.Feed).pipe(FormInputAnnotation.set(false)),
|
|
18
18
|
view: Schema.String.pipe(Schema.optional),
|
|
19
19
|
}).pipe(
|
|
20
|
-
Type.object({
|
|
21
|
-
typename: 'org.dxos.type.assistant.chat',
|
|
22
|
-
version: '0.1.0',
|
|
23
|
-
}),
|
|
24
20
|
LabelAnnotation.set(['name']),
|
|
25
|
-
Annotation.IconAnnotation.set({
|
|
26
|
-
|
|
27
|
-
hue: 'sky',
|
|
28
|
-
}),
|
|
21
|
+
Annotation.IconAnnotation.set({ icon: 'ph--sparkle--regular', hue: 'sky' }),
|
|
22
|
+
Type.makeObject(DXN.make('org.dxos.type.assistant.chat', '0.1.0')),
|
|
29
23
|
);
|
|
30
24
|
|
|
31
|
-
export
|
|
32
|
-
|
|
25
|
+
export type Chat = Type.InstanceType<typeof Chat>;
|
|
33
26
|
export const make = (props: Obj.MakeProps<typeof Chat>) => Obj.make(Chat, props);
|
|
34
27
|
|
|
35
28
|
/** @deprecated Use CompanionTo instead. */
|
|
36
29
|
export const LegacyCompanionTo = Schema.Struct({
|
|
37
30
|
id: Obj.ID,
|
|
38
31
|
}).pipe(
|
|
39
|
-
Type.
|
|
40
|
-
|
|
41
|
-
version: '0.1.0',
|
|
32
|
+
Type.makeRelation({
|
|
33
|
+
dxn: DXN.make('org.dxos.relation.assistant.companionTo', '0.1.0'),
|
|
42
34
|
source: Chat,
|
|
43
35
|
target: Obj.Unknown,
|
|
44
36
|
}),
|
|
45
37
|
);
|
|
46
38
|
|
|
47
|
-
export
|
|
48
|
-
|
|
39
|
+
export type LegacyCompanionTo = Type.InstanceType<typeof LegacyCompanionTo>;
|
|
49
40
|
/**
|
|
50
41
|
* Relation between a Chat and companion objects (e.g., artifacts).
|
|
51
42
|
*/
|
|
52
43
|
export const CompanionTo = Schema.Struct({
|
|
53
44
|
id: Obj.ID,
|
|
54
45
|
}).pipe(
|
|
55
|
-
Type.
|
|
56
|
-
|
|
57
|
-
version: '0.1.0',
|
|
46
|
+
Type.makeRelation({
|
|
47
|
+
dxn: DXN.make('org.dxos.relation.assistant.companionTo', '0.1.0'),
|
|
58
48
|
source: Chat,
|
|
59
49
|
target: Obj.Unknown,
|
|
60
50
|
}),
|
|
61
51
|
);
|
|
62
52
|
|
|
63
|
-
export
|
|
53
|
+
export type CompanionTo = Type.InstanceType<typeof CompanionTo>;
|
package/src/types/McpServer.ts
CHANGED
|
@@ -6,32 +6,26 @@
|
|
|
6
6
|
|
|
7
7
|
import * as Schema from 'effect/Schema';
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { McpServer as McpServerSpec } from '@dxos/compute';
|
|
10
|
+
import { DXN, Annotation, Type } from '@dxos/echo';
|
|
11
|
+
import { LabelAnnotation } from '@dxos/echo/Annotation';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* MCP server configuration stored as a space-level ECHO object.
|
|
14
15
|
*
|
|
16
|
+
* Composes the canonical connection spec from `@dxos/compute` (`url`, `protocol`, `apiKey`)
|
|
17
|
+
* and adds instance-level fields (`name`, `enabled`) plus ECHO annotations.
|
|
18
|
+
*
|
|
15
19
|
* NOTE: `apiKey` is stored in plaintext and replicated to all peers with access to the space.
|
|
16
20
|
* A future iteration should move secrets to per-device credential storage or use envelope encryption.
|
|
17
21
|
*/
|
|
18
22
|
export const McpServer = Schema.Struct({
|
|
19
|
-
|
|
20
|
-
url: Schema.String,
|
|
21
|
-
protocol: Schema.Union(Schema.Literal('sse'), Schema.Literal('http')),
|
|
22
|
-
/** Stored in plaintext; replicated to all peers in the space. */
|
|
23
|
-
apiKey: Schema.optional(Schema.String),
|
|
23
|
+
...McpServerSpec.McpServer.fields,
|
|
24
24
|
enabled: Schema.optional(Schema.Boolean),
|
|
25
25
|
}).pipe(
|
|
26
|
-
Type.object({
|
|
27
|
-
typename: 'org.dxos.type.assistant.mcpServer',
|
|
28
|
-
version: '0.1.0',
|
|
29
|
-
}),
|
|
30
26
|
LabelAnnotation.set(['name']),
|
|
31
|
-
Annotation.IconAnnotation.set({
|
|
32
|
-
|
|
33
|
-
hue: 'sky',
|
|
34
|
-
}),
|
|
27
|
+
Annotation.IconAnnotation.set({ icon: 'ph--plugs-connected--regular', hue: 'sky' }),
|
|
28
|
+
Type.makeObject(DXN.make('org.dxos.type.assistant.mcpServer', '0.1.0')),
|
|
35
29
|
);
|
|
36
30
|
|
|
37
|
-
export
|
|
31
|
+
export type McpServer = Type.InstanceType<typeof McpServer>;
|
package/src/types/Memory.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { Annotation, Type } from '@dxos/echo';
|
|
7
|
+
import { DXN, Annotation, Type } from '@dxos/echo';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Unit of knowledge generated by an agent.
|
|
@@ -13,12 +13,10 @@ export const Memory = Schema.Struct({
|
|
|
13
13
|
title: Schema.String,
|
|
14
14
|
content: Schema.String,
|
|
15
15
|
}).pipe(
|
|
16
|
-
Type.object({ typename: 'org.dxos.type.memory', version: '0.1.0' }),
|
|
17
16
|
Annotation.LabelAnnotation.set(['title']),
|
|
18
|
-
Annotation.IconAnnotation.set({
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}),
|
|
17
|
+
Annotation.IconAnnotation.set({ icon: 'ph--brain--regular', hue: 'pink' }),
|
|
18
|
+
Annotation.HiddenAnnotation.set(true),
|
|
19
|
+
Type.makeObject(DXN.make('org.dxos.type.memory', '0.1.0')),
|
|
22
20
|
);
|
|
23
21
|
|
|
24
|
-
export
|
|
22
|
+
export type Memory = Type.InstanceType<typeof Memory>;
|
package/src/types/Plan.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as Schema from 'effect/Schema';
|
|
8
8
|
|
|
9
|
-
import { Annotation, Obj, Ref, Type } from '@dxos/echo';
|
|
9
|
+
import { DXN, Annotation, Obj, Ref, Type } from '@dxos/echo';
|
|
10
10
|
|
|
11
11
|
import * as Chat from './Chat';
|
|
12
12
|
|
|
@@ -23,7 +23,14 @@ export const Task = Schema.Struct({
|
|
|
23
23
|
description: 'Task title and description.',
|
|
24
24
|
}),
|
|
25
25
|
|
|
26
|
-
status: Schema.Literal('todo', 'in-progress', 'done'),
|
|
26
|
+
status: Schema.Literal('todo', 'in-progress', 'done', 'failed'),
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Whether this task was handed to a sub-agent via the delegation tool. Only delegated tasks are
|
|
30
|
+
* picked up by the supervisor's reconcile loop, so a task created via ordinary planning
|
|
31
|
+
* (`update-tasks`) is not double-spawned as a sub-agent.
|
|
32
|
+
*/
|
|
33
|
+
delegated: Schema.optional(Schema.Boolean),
|
|
27
34
|
|
|
28
35
|
/**
|
|
29
36
|
* Parent task ID.
|
|
@@ -37,22 +44,15 @@ export const Task = Schema.Struct({
|
|
|
37
44
|
*/
|
|
38
45
|
chat: Schema.optional(Ref.Ref(Chat.Chat)),
|
|
39
46
|
});
|
|
40
|
-
export interface Task extends Schema.Schema.Type<typeof Task> {}
|
|
41
47
|
|
|
48
|
+
export type Task = Schema.Schema.Type<typeof Task>;
|
|
42
49
|
/**
|
|
43
50
|
* Hierarchical collection of tasks for humans and agents to track progress.
|
|
44
51
|
*/
|
|
45
52
|
export const Plan = Schema.Struct({
|
|
46
53
|
tasks: Schema.Array(Task),
|
|
47
|
-
}).pipe(
|
|
48
|
-
|
|
49
|
-
typename: 'org.dxos.type.plan',
|
|
50
|
-
version: '0.1.0',
|
|
51
|
-
}),
|
|
52
|
-
Annotation.SystemTypeAnnotation.set(true),
|
|
53
|
-
);
|
|
54
|
-
export interface Plan extends Schema.Schema.Type<typeof Plan> {}
|
|
55
|
-
|
|
54
|
+
}).pipe(Annotation.HiddenAnnotation.set(true), Type.makeObject(DXN.make('org.dxos.type.plan', '0.1.0')));
|
|
55
|
+
export type Plan = Type.InstanceType<typeof Plan>;
|
|
56
56
|
export const generateTaskId = (plan: Plan): TaskId => {
|
|
57
57
|
const existingIds = plan.tasks
|
|
58
58
|
.map((task) => {
|
|
@@ -76,7 +76,7 @@ export const generateTaskId = (plan: Plan): TaskId => {
|
|
|
76
76
|
*/
|
|
77
77
|
export const addTasks = (
|
|
78
78
|
plan: Obj.Mutable<Plan>,
|
|
79
|
-
tasks: (Pick<Task, 'title'> & Partial<Pick<Task, 'status' | 'parent' | 'chat'>>)[],
|
|
79
|
+
tasks: (Pick<Task, 'title'> & Partial<Pick<Task, 'status' | 'parent' | 'chat' | 'delegated'>>)[],
|
|
80
80
|
) => {
|
|
81
81
|
for (const task of tasks) {
|
|
82
82
|
const taskId = generateTaskId(plan);
|
|
@@ -86,10 +86,7 @@ export const addTasks = (
|
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
interface MakePlanProps {
|
|
89
|
-
tasks:
|
|
90
|
-
title: string;
|
|
91
|
-
status?: 'todo' | 'in-progress' | 'done';
|
|
92
|
-
}[];
|
|
89
|
+
tasks: (Pick<Task, 'title'> & Partial<Pick<Task, 'status'>>)[];
|
|
93
90
|
}
|
|
94
91
|
|
|
95
92
|
export const makePlan = (props: MakePlanProps): Plan => {
|