@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
|
@@ -9,32 +9,30 @@ import * as Exit from 'effect/Exit';
|
|
|
9
9
|
import { MemoizedAiService } from '@dxos/ai/testing';
|
|
10
10
|
import { AiSession } from '@dxos/assistant';
|
|
11
11
|
import { SpaceProperties } from '@dxos/client-protocol';
|
|
12
|
-
import { Blueprint } from '@dxos/compute';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { Database, Feed, Filter, Obj, Query, Ref } from '@dxos/echo';
|
|
16
|
-
import { Collection } from '@dxos/echo';
|
|
17
|
-
import { acquireReleaseResource } from '@dxos/effect';
|
|
12
|
+
import { Blueprint, Trigger, Operation, OperationHandlerSet } from '@dxos/compute';
|
|
13
|
+
import { Collection, Database, Feed, Filter, Obj, Query, Ref } from '@dxos/echo';
|
|
14
|
+
import { EffectEx } from '@dxos/effect';
|
|
18
15
|
import { TestHelpers } from '@dxos/effect/testing';
|
|
19
16
|
import { TriggerDispatcher } from '@dxos/functions-runtime';
|
|
20
17
|
import { AssistantTestLayerWithTriggers } from '@dxos/functions-runtime/testing';
|
|
21
18
|
import { invariant } from '@dxos/invariant';
|
|
22
|
-
import {
|
|
23
|
-
import { MarkdownBlueprint } from '@dxos/plugin-markdown
|
|
24
|
-
import {
|
|
19
|
+
import { EntityId } from '@dxos/keys';
|
|
20
|
+
import { MarkdownBlueprint } from '@dxos/plugin-markdown';
|
|
21
|
+
import { Markdown } from '@dxos/plugin-markdown';
|
|
22
|
+
import { MarkdownOperationHandlerSet } from '@dxos/plugin-markdown/plugin';
|
|
25
23
|
import { WithProperties } from '@dxos/plugin-markdown/testing';
|
|
26
|
-
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
27
24
|
import { Text } from '@dxos/schema';
|
|
28
25
|
import { Message } from '@dxos/types';
|
|
29
26
|
import { trim } from '@dxos/util';
|
|
30
27
|
|
|
31
28
|
import { Chat, Plan, Agent } from '../../types';
|
|
29
|
+
import { AgentWizardHandlers, AgentWizardOperations } from '../agent-wizard';
|
|
32
30
|
import { PlanningBlueprint, PlanningHandlers } from '../planning';
|
|
33
|
-
import { AgentWizardHandlers, SyncTriggers } from '../project-wizard';
|
|
34
31
|
import AgentBlueprintDef from './blueprint';
|
|
35
|
-
import {
|
|
32
|
+
import { AgentBlueprintHandlers } from './operations';
|
|
33
|
+
import { AgentWorker } from './operations/definitions';
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
EntityId.dangerouslyDisableRandomness();
|
|
38
36
|
|
|
39
37
|
const TestLayer = AssistantTestLayerWithTriggers({
|
|
40
38
|
aiServicePreset: 'edge-remote',
|
|
@@ -75,8 +73,8 @@ describe('Agent', () => {
|
|
|
75
73
|
function* (_) {
|
|
76
74
|
const agent = yield* Agent.makeInitialized(
|
|
77
75
|
{
|
|
78
|
-
name: 'Test
|
|
79
|
-
instructions: 'A test
|
|
76
|
+
name: 'Test Agent',
|
|
77
|
+
instructions: 'A test agent for adding artifacts.',
|
|
80
78
|
blueprints: [Ref.make(MarkdownBlueprint.make())],
|
|
81
79
|
},
|
|
82
80
|
blueprint,
|
|
@@ -86,7 +84,7 @@ describe('Agent', () => {
|
|
|
86
84
|
const document = yield* Database.add(
|
|
87
85
|
Obj.make(Markdown.Document, {
|
|
88
86
|
name: 'Test Document',
|
|
89
|
-
content: Ref.make(Text.make('This is a test document with some content.')),
|
|
87
|
+
content: Ref.make(Text.make({ content: 'This is a test document with some content.' })),
|
|
90
88
|
}),
|
|
91
89
|
);
|
|
92
90
|
yield* Database.flush();
|
|
@@ -96,14 +94,16 @@ describe('Agent', () => {
|
|
|
96
94
|
const chatFeed = agent.chat?.target?.feed?.target;
|
|
97
95
|
invariant(chatFeed, 'Agent chat feed not found.');
|
|
98
96
|
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
99
|
-
const session = yield* acquireReleaseResource(
|
|
97
|
+
const session = yield* EffectEx.acquireReleaseResource(
|
|
98
|
+
() => new AiSession.Session({ feed: chatFeed, runtime }),
|
|
99
|
+
);
|
|
100
100
|
yield* Effect.promise(() => session.context.open());
|
|
101
101
|
|
|
102
|
-
const
|
|
102
|
+
const documentUri = Obj.getURI(document);
|
|
103
103
|
yield* session
|
|
104
104
|
.createRequest({
|
|
105
105
|
system: SYSTEM,
|
|
106
|
-
prompt: `Please add the document ${
|
|
106
|
+
prompt: `Please add the document ${documentUri} as an artifact named "My Test Document" to this agent.`,
|
|
107
107
|
})
|
|
108
108
|
.pipe(Effect.provide(session.makeToolExecutionServices()));
|
|
109
109
|
|
|
@@ -134,7 +134,9 @@ describe('Agent', () => {
|
|
|
134
134
|
invariant(chatFeed, 'Agent chat feed not found.');
|
|
135
135
|
yield* Database.flush();
|
|
136
136
|
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
137
|
-
const session = yield* acquireReleaseResource(
|
|
137
|
+
const session = yield* EffectEx.acquireReleaseResource(
|
|
138
|
+
() => new AiSession.Session({ feed: chatFeed, runtime }),
|
|
139
|
+
);
|
|
138
140
|
yield* Effect.promise(() => session.context.open());
|
|
139
141
|
|
|
140
142
|
yield* session
|
|
@@ -175,11 +177,11 @@ describe('Agent', () => {
|
|
|
175
177
|
);
|
|
176
178
|
yield* Database.flush();
|
|
177
179
|
|
|
178
|
-
const
|
|
180
|
+
const inboxFeed = yield* Database.add(Feed.make());
|
|
179
181
|
yield* Database.add(
|
|
180
182
|
Trigger.make({
|
|
181
183
|
enabled: true,
|
|
182
|
-
spec: Trigger.
|
|
184
|
+
spec: Trigger.specFeed(inboxFeed),
|
|
183
185
|
function: Ref.make(Operation.serialize(AgentWorker)),
|
|
184
186
|
input: {
|
|
185
187
|
agent: Ref.make(agent),
|
|
@@ -188,13 +190,13 @@ describe('Agent', () => {
|
|
|
188
190
|
}),
|
|
189
191
|
);
|
|
190
192
|
|
|
191
|
-
yield*
|
|
192
|
-
|
|
193
|
+
yield* Feed.append(
|
|
194
|
+
inboxFeed,
|
|
193
195
|
TEST_MESSAGES.map((message) => Obj.clone(message)),
|
|
194
196
|
);
|
|
195
197
|
|
|
196
198
|
const dispatcher = yield* TriggerDispatcher;
|
|
197
|
-
const invocations = yield* dispatcher.invokeScheduledTriggers({ kinds: ['
|
|
199
|
+
const invocations = yield* dispatcher.invokeScheduledTriggers({ kinds: ['feed'], untilExhausted: true });
|
|
198
200
|
expect(invocations.every((invocation) => Exit.isSuccess(invocation.result))).toBe(true);
|
|
199
201
|
|
|
200
202
|
console.log(yield* Effect.promise(() => dumpAgent(agent)));
|
|
@@ -222,11 +224,11 @@ describe('Agent', () => {
|
|
|
222
224
|
);
|
|
223
225
|
yield* Database.flush();
|
|
224
226
|
|
|
225
|
-
yield* Operation.invoke(SyncTriggers, { agent: Ref.make(agent) });
|
|
227
|
+
yield* Operation.invoke(AgentWizardOperations.SyncTriggers, { agent: Ref.make(agent) });
|
|
226
228
|
|
|
227
|
-
const triggers = yield* Database.
|
|
229
|
+
const triggers = yield* Database.query(
|
|
228
230
|
Query.select(Filter.type(Trigger.Trigger)).debugLabel('assistant-toolkit.blueprint.test.timer'),
|
|
229
|
-
);
|
|
231
|
+
).run;
|
|
230
232
|
const timerTriggers = triggers.filter(
|
|
231
233
|
(trigger) => trigger.spec?.kind === 'timer' && trigger.spec.cron === cron,
|
|
232
234
|
);
|
|
@@ -241,7 +243,7 @@ describe('Agent', () => {
|
|
|
241
243
|
invariant(timerTrigger.function);
|
|
242
244
|
const operation = yield* Database.load(timerTrigger.function);
|
|
243
245
|
invariant(Obj.instanceOf(Operation.PersistentOperation, operation));
|
|
244
|
-
expect(operation.key).toBe(AgentWorker.meta.key);
|
|
246
|
+
expect(Obj.getMeta(operation).key).toBe(AgentWorker.meta.key);
|
|
245
247
|
},
|
|
246
248
|
Effect.provide(TestLayer),
|
|
247
249
|
TestHelpers.provideTestContext,
|
|
@@ -287,7 +289,9 @@ describe('Agent', () => {
|
|
|
287
289
|
invariant(chatFeed, 'Agent chat feed not found.');
|
|
288
290
|
yield* Database.flush();
|
|
289
291
|
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
290
|
-
const session = yield* acquireReleaseResource(
|
|
292
|
+
const session = yield* EffectEx.acquireReleaseResource(
|
|
293
|
+
() => new AiSession.Session({ feed: chatFeed, runtime }),
|
|
294
|
+
);
|
|
291
295
|
yield* Effect.promise(() => session.context.open());
|
|
292
296
|
|
|
293
297
|
yield* session
|
|
@@ -322,22 +326,22 @@ describe('Agent', () => {
|
|
|
322
326
|
);
|
|
323
327
|
yield* Database.flush();
|
|
324
328
|
|
|
325
|
-
yield* Operation.invoke(SyncTriggers, { agent: Ref.make(agent) });
|
|
329
|
+
yield* Operation.invoke(AgentWizardOperations.SyncTriggers, { agent: Ref.make(agent) });
|
|
326
330
|
|
|
327
|
-
const triggers = yield* Database.
|
|
331
|
+
const triggers = yield* Database.query(
|
|
328
332
|
Query.select(Filter.type(Trigger.Trigger)).debugLabel('assistant-toolkit.blueprint.test.toggle-enabled'),
|
|
329
|
-
);
|
|
333
|
+
).run;
|
|
330
334
|
expect(triggers.every((trigger) => trigger.enabled === false)).toBe(true);
|
|
331
335
|
|
|
332
336
|
Obj.update(agent, (agent) => {
|
|
333
337
|
agent.enabled = true;
|
|
334
338
|
});
|
|
335
339
|
yield* Database.flush();
|
|
336
|
-
yield* Operation.invoke(SyncTriggers, { agent: Ref.make(agent) });
|
|
340
|
+
yield* Operation.invoke(AgentWizardOperations.SyncTriggers, { agent: Ref.make(agent) });
|
|
337
341
|
|
|
338
|
-
const triggersAfter = yield* Database.
|
|
342
|
+
const triggersAfter = yield* Database.query(
|
|
339
343
|
Query.select(Filter.type(Trigger.Trigger)).debugLabel('assistant-toolkit.blueprint.test.after'),
|
|
340
|
-
);
|
|
344
|
+
).run;
|
|
341
345
|
expect(triggersAfter).toHaveLength(triggers.length);
|
|
342
346
|
expect(triggersAfter.every((trigger) => trigger.enabled === true)).toBe(true);
|
|
343
347
|
},
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { Blueprint, Template } from '@dxos/compute';
|
|
6
6
|
import { trim } from '@dxos/util';
|
|
7
7
|
|
|
8
|
-
import { AddArtifact } from './
|
|
8
|
+
import { AddArtifact } from './operations/definitions';
|
|
9
9
|
|
|
10
10
|
const BLUEPRINT_KEY = 'org.dxos.blueprint.agent';
|
|
11
11
|
|
|
@@ -48,8 +48,8 @@ const make = () =>
|
|
|
48
48
|
inputs: [
|
|
49
49
|
{
|
|
50
50
|
name: 'agent',
|
|
51
|
-
kind: '
|
|
52
|
-
|
|
51
|
+
kind: 'operation',
|
|
52
|
+
operation: 'org.dxos.function.agent.getContext',
|
|
53
53
|
},
|
|
54
54
|
],
|
|
55
55
|
}),
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Operation } from '@dxos/compute';
|
|
8
|
-
import { Database, Obj } from '@dxos/echo';
|
|
9
8
|
|
|
10
9
|
import { Agent } from '../../../types';
|
|
11
10
|
import { AddArtifact } from './definitions';
|
|
@@ -13,18 +12,9 @@ import { AddArtifact } from './definitions';
|
|
|
13
12
|
export default AddArtifact.pipe(
|
|
14
13
|
Operation.withHandler(
|
|
15
14
|
Effect.fnUntraced(function* ({ name, artifact }) {
|
|
16
|
-
if (!(yield* Database.load(artifact))) {
|
|
17
|
-
throw new Error('Artifact not found.');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
15
|
const agent = yield* Agent.getFromChatContext;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
agent.artifacts.push({
|
|
24
|
-
name,
|
|
25
|
-
data: artifact,
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
}) as any,
|
|
16
|
+
yield* Agent.addArtifact(agent, { name, id: artifact });
|
|
17
|
+
}),
|
|
29
18
|
),
|
|
19
|
+
Operation.opaqueHandler,
|
|
30
20
|
);
|
|
@@ -9,7 +9,7 @@ import { AiService } from '@dxos/ai';
|
|
|
9
9
|
import { AiSession, ToolExecutionServices } from '@dxos/assistant';
|
|
10
10
|
import { Operation } from '@dxos/compute';
|
|
11
11
|
import { Database, Feed, Obj } from '@dxos/echo';
|
|
12
|
-
import {
|
|
12
|
+
import { EffectEx } from '@dxos/effect';
|
|
13
13
|
import { invariant } from '@dxos/invariant';
|
|
14
14
|
import { ContentBlock } from '@dxos/types';
|
|
15
15
|
|
|
@@ -20,7 +20,7 @@ export default AgentWorker.pipe(
|
|
|
20
20
|
Operation.withHandler(
|
|
21
21
|
Effect.fnUntraced(function* ({ agent: agentRef, prompt, event }) {
|
|
22
22
|
const agent = yield* Database.load(agentRef).pipe(
|
|
23
|
-
Effect.catchTag('
|
|
23
|
+
Effect.catchTag('EntityNotFoundError', () => Effect.die(new Error('Unable to load agent object.'))),
|
|
24
24
|
);
|
|
25
25
|
invariant(Obj.instanceOf(Agent.Agent, agent));
|
|
26
26
|
invariant(agent.chat, 'Agent has no chat.');
|
|
@@ -28,11 +28,11 @@ export default AgentWorker.pipe(
|
|
|
28
28
|
const chatFeed = yield* agent.chat.pipe(
|
|
29
29
|
Database.load,
|
|
30
30
|
Effect.flatMap((chat) => Database.load(chat.feed)),
|
|
31
|
-
Effect.catchTag('
|
|
31
|
+
Effect.catchTag('EntityNotFoundError', () => Effect.die(new Error('Unable to load agent chat feed object.'))),
|
|
32
32
|
);
|
|
33
33
|
invariant(chatFeed, 'Agent chat feed not found.');
|
|
34
34
|
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
35
|
-
const session = yield* acquireReleaseResource(() => new AiSession({ feed: chatFeed, runtime }));
|
|
35
|
+
const session = yield* EffectEx.acquireReleaseResource(() => new AiSession.Session({ feed: chatFeed, runtime }));
|
|
36
36
|
|
|
37
37
|
const agentsInContext = session.context.getObjects().filter(Obj.instanceOf(Agent.Agent));
|
|
38
38
|
if (agentsInContext.length !== 1) {
|
|
@@ -57,8 +57,8 @@ export default AgentWorker.pipe(
|
|
|
57
57
|
})
|
|
58
58
|
.pipe(
|
|
59
59
|
Effect.provide(
|
|
60
|
-
Layer.mergeAll(AiService.model('
|
|
61
|
-
Layer.provideMerge(Operation.withInvocationOptions({ conversation: Obj.
|
|
60
|
+
Layer.mergeAll(AiService.model('ai.claude.model.claude-opus-4-6'), ToolExecutionServices).pipe(
|
|
61
|
+
Layer.provideMerge(Operation.withInvocationOptions({ conversation: Obj.getURI(chatFeed) })),
|
|
62
62
|
),
|
|
63
63
|
),
|
|
64
64
|
Effect.retry({ times: 2 }),
|
|
@@ -5,18 +5,19 @@
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
7
|
import { AiService, OpaqueToolkit } from '@dxos/ai';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { AiContext } from '@dxos/assistant';
|
|
9
|
+
import { Trace, TriggerEvent, Operation } from '@dxos/compute';
|
|
10
|
+
import { Database, Feed, Ref, Registry } from '@dxos/echo';
|
|
11
|
+
import { DXN } from '@dxos/keys';
|
|
12
12
|
|
|
13
13
|
import { Agent } from '../../../types';
|
|
14
14
|
|
|
15
15
|
export const AgentWorker = Operation.make({
|
|
16
16
|
meta: {
|
|
17
|
-
key: 'org.dxos.function.agent.worker',
|
|
17
|
+
key: DXN.make('org.dxos.function.agent.worker'),
|
|
18
18
|
name: 'Agent Worker',
|
|
19
19
|
description: 'Agentic worker that drives the agent autonomously.',
|
|
20
|
+
icon: 'ph--brain--regular',
|
|
20
21
|
},
|
|
21
22
|
input: Schema.Struct({
|
|
22
23
|
agent: Schema.suspend(() => Ref.Ref(Agent.Agent)),
|
|
@@ -27,9 +28,8 @@ export const AgentWorker = Operation.make({
|
|
|
27
28
|
services: [
|
|
28
29
|
AiService.AiService,
|
|
29
30
|
Database.Service,
|
|
30
|
-
QueueService,
|
|
31
31
|
Feed.FeedService,
|
|
32
|
-
|
|
32
|
+
Registry.Service,
|
|
33
33
|
Trace.TraceService,
|
|
34
34
|
OpaqueToolkit.OpaqueToolkitProvider,
|
|
35
35
|
],
|
|
@@ -37,24 +37,26 @@ export const AgentWorker = Operation.make({
|
|
|
37
37
|
|
|
38
38
|
export const Qualifier = Operation.make({
|
|
39
39
|
meta: {
|
|
40
|
-
key: 'org.dxos.function.agent.qualifier',
|
|
40
|
+
key: DXN.make('org.dxos.function.agent.qualifier'),
|
|
41
41
|
name: 'Agent Qualifier',
|
|
42
42
|
description:
|
|
43
43
|
'Qualifier that determines if the event is relevant to the agent. Puts the data into the input queue of the agent.',
|
|
44
|
+
icon: 'ph--funnel--regular',
|
|
44
45
|
},
|
|
45
46
|
input: Schema.Struct({
|
|
46
47
|
agent: Schema.suspend(() => Ref.Ref(Agent.Agent)),
|
|
47
48
|
event: TriggerEvent.TriggerEvent,
|
|
48
49
|
}),
|
|
49
50
|
output: Schema.Void,
|
|
50
|
-
services: [AiService.AiService, Database.Service],
|
|
51
|
+
services: [AiService.AiService, Database.Service, Feed.FeedService],
|
|
51
52
|
});
|
|
52
53
|
|
|
53
54
|
export const GetContext = Operation.make({
|
|
54
55
|
meta: {
|
|
55
|
-
key: 'org.dxos.function.agent.
|
|
56
|
+
key: DXN.make('org.dxos.function.agent.getContext'),
|
|
56
57
|
name: 'Get Agent Context',
|
|
57
58
|
description: 'Get the context of an agent.',
|
|
59
|
+
icon: 'ph--info--regular',
|
|
58
60
|
},
|
|
59
61
|
input: Schema.Struct({}),
|
|
60
62
|
output: Schema.Struct({
|
|
@@ -70,23 +72,25 @@ export const GetContext = Operation.make({
|
|
|
70
72
|
}),
|
|
71
73
|
),
|
|
72
74
|
}),
|
|
73
|
-
services: [
|
|
75
|
+
services: [AiContext.Service, Database.Service],
|
|
74
76
|
});
|
|
75
77
|
|
|
76
78
|
export const AddArtifact = Operation.make({
|
|
77
79
|
meta: {
|
|
78
|
-
key: 'org.dxos.function.agent.
|
|
80
|
+
key: DXN.make('org.dxos.function.agent.addArtifact'),
|
|
79
81
|
name: 'Add artifact',
|
|
80
82
|
description: 'Adds a new artifact.',
|
|
83
|
+
icon: 'ph--plus--regular',
|
|
81
84
|
},
|
|
82
85
|
input: Schema.Struct({
|
|
83
86
|
name: Schema.String.annotations({
|
|
84
87
|
description: 'The name of the artifact to add.',
|
|
85
88
|
}),
|
|
86
|
-
artifact:
|
|
87
|
-
description:
|
|
89
|
+
artifact: Schema.String.annotations({
|
|
90
|
+
description:
|
|
91
|
+
'The id of the artifact to add, exactly as returned by the tool that created it. Do NOT guess or generate the id.',
|
|
88
92
|
}),
|
|
89
93
|
}),
|
|
90
94
|
output: Schema.Void,
|
|
91
|
-
services: [
|
|
95
|
+
services: [AiContext.Service, Database.Service],
|
|
92
96
|
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
+
import { AiContext } from '@dxos/assistant';
|
|
7
8
|
import { Operation } from '@dxos/compute';
|
|
8
9
|
import { Database, Obj } from '@dxos/echo';
|
|
9
10
|
|
|
@@ -13,19 +14,29 @@ import { GetContext } from './definitions';
|
|
|
13
14
|
export default GetContext.pipe(
|
|
14
15
|
Operation.withHandler(
|
|
15
16
|
Effect.fnUntraced(function* () {
|
|
16
|
-
|
|
17
|
+
// This runs unconditionally during system-prompt formatting. A delegated sub-agent has no
|
|
18
|
+
// agent bound to its context, so degrade gracefully for the zero-agent case — but still
|
|
19
|
+
// surface the "more than one agent" invariant rather than masking every failure.
|
|
20
|
+
const agents = yield* AiContext.Service.findObjects(Agent.Agent);
|
|
21
|
+
if (agents.length === 0) {
|
|
22
|
+
return { id: '', name: '', instructions: 'No agent context.', plan: 'No plan found.', artifacts: [] };
|
|
23
|
+
}
|
|
24
|
+
if (agents.length > 1) {
|
|
25
|
+
return yield* Effect.fail(new Error(`There should be exactly one agent in context. Got: ${agents.length}`));
|
|
26
|
+
}
|
|
27
|
+
const agent = agents[0];
|
|
17
28
|
|
|
18
29
|
return {
|
|
19
30
|
id: agent.id,
|
|
20
31
|
name: agent.name,
|
|
21
32
|
instructions: yield* agent.instructions.pipe(Database.load).pipe(
|
|
22
33
|
Effect.map((_) => _.content),
|
|
23
|
-
Effect.catchTag('
|
|
34
|
+
Effect.catchTag('EntityNotFoundError', () => Effect.succeed('No instructions found.')),
|
|
24
35
|
),
|
|
25
36
|
plan: yield* (
|
|
26
37
|
agent.plan?.pipe(Database.load).pipe(
|
|
27
38
|
Effect.map(Plan.formatPlan),
|
|
28
|
-
Effect.catchTag('
|
|
39
|
+
Effect.catchTag('EntityNotFoundError', () => Effect.succeed('No plan found.')),
|
|
29
40
|
) ?? Effect.succeed('No plan found.')
|
|
30
41
|
),
|
|
31
42
|
artifacts: yield* Effect.forEach(agent.artifacts, (artifact) =>
|
|
@@ -34,13 +45,14 @@ export default GetContext.pipe(
|
|
|
34
45
|
name: artifact.name,
|
|
35
46
|
type: yield* Database.load(artifact.data).pipe(
|
|
36
47
|
Effect.map(Obj.getTypename),
|
|
37
|
-
Effect.catchTag('
|
|
48
|
+
Effect.catchTag('EntityNotFoundError', () => Effect.succeed('Artifact not found.')),
|
|
38
49
|
),
|
|
39
|
-
dxn: artifact.data.
|
|
50
|
+
dxn: artifact.data.uri,
|
|
40
51
|
};
|
|
41
52
|
}),
|
|
42
53
|
),
|
|
43
54
|
};
|
|
44
55
|
}) as any,
|
|
45
56
|
),
|
|
57
|
+
Operation.opaqueHandler,
|
|
46
58
|
);
|
|
@@ -9,14 +9,14 @@ import * as Schema from 'effect/Schema';
|
|
|
9
9
|
|
|
10
10
|
import { AiService } from '@dxos/ai';
|
|
11
11
|
import { Operation } from '@dxos/compute';
|
|
12
|
-
import { Database, Obj, Ref } from '@dxos/echo';
|
|
12
|
+
import { Database, Feed, Obj, Ref } from '@dxos/echo';
|
|
13
13
|
import { invariant } from '@dxos/invariant';
|
|
14
14
|
import { trim } from '@dxos/util';
|
|
15
15
|
|
|
16
16
|
import { Plan, Agent } from '../../../types';
|
|
17
17
|
import { Qualifier } from './definitions';
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
const handler: Operation.WithHandler<typeof Qualifier> = Qualifier.pipe(
|
|
20
20
|
Operation.withHandler(
|
|
21
21
|
Effect.fnUntraced(
|
|
22
22
|
function* ({ agent: agentRef, event }) {
|
|
@@ -24,7 +24,7 @@ export default Qualifier.pipe(
|
|
|
24
24
|
invariant(Obj.instanceOf(Agent.Agent, agent));
|
|
25
25
|
invariant(agent.chat, 'Agent has no chat.');
|
|
26
26
|
|
|
27
|
-
const { id, name, queue } = agent;
|
|
27
|
+
const { id, name, feed: queue } = agent;
|
|
28
28
|
if (!queue) {
|
|
29
29
|
throw new Error('Agent has no queue.');
|
|
30
30
|
}
|
|
@@ -72,19 +72,20 @@ export default Qualifier.pipe(
|
|
|
72
72
|
const { isRelevant } = value as { isRelevant: boolean };
|
|
73
73
|
|
|
74
74
|
if (isRelevant) {
|
|
75
|
-
const
|
|
76
|
-
if ('
|
|
75
|
+
const feedTarget = yield* Database.load(queue);
|
|
76
|
+
if ('feed' in event && event.item) {
|
|
77
77
|
const obj = event.item;
|
|
78
|
-
yield*
|
|
78
|
+
yield* Feed.append(feedTarget, [obj]);
|
|
79
79
|
} else if ('subject' in event && Ref.isRef(event.subject)) {
|
|
80
80
|
const obj = yield* Database.load(event.subject);
|
|
81
|
-
yield*
|
|
81
|
+
yield* Feed.append(feedTarget, [obj]);
|
|
82
82
|
} else {
|
|
83
83
|
throw new Error('Invalid event.');
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
|
-
Effect.provide(AiService.model('
|
|
87
|
+
Effect.provide(AiService.model('ai.claude.model.claude-sonnet-4-5')),
|
|
88
88
|
),
|
|
89
89
|
),
|
|
90
90
|
);
|
|
91
|
+
export default handler;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import { Blueprint, Template } from '@dxos/compute';
|
|
6
6
|
import { trim } from '@dxos/util';
|
|
7
7
|
|
|
8
|
-
import { AgentRules, CreateAgent, SyncTriggers } from './
|
|
8
|
+
import { AgentRules, CreateAgent, SyncTriggers } from './operations/definitions';
|
|
9
9
|
|
|
10
|
-
const BLUEPRINT_KEY = 'org.dxos.blueprint.
|
|
10
|
+
const BLUEPRINT_KEY = 'org.dxos.blueprint.agentWizard';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Creates the Agent Wizard blueprint. This is a function to avoid circular dependency issues.
|
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { Blueprint } from '@dxos/compute';
|
|
8
|
-
import { Operation } from '@dxos/compute';
|
|
7
|
+
import { Blueprint, Operation } from '@dxos/compute';
|
|
9
8
|
import { Obj, Ref } from '@dxos/echo';
|
|
10
9
|
|
|
11
10
|
import { Agent } from '../../../types';
|
|
12
|
-
import { AgentBlueprint } from '../../
|
|
11
|
+
import { AgentBlueprint } from '../../agent';
|
|
13
12
|
import { CreateAgent, SyncTriggers } from './definitions';
|
|
14
13
|
|
|
15
14
|
export default CreateAgent.pipe(
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { Blueprint } from '@dxos/compute';
|
|
8
|
-
import { QueueService } from '@dxos/compute';
|
|
9
7
|
import { Operation } from '@dxos/compute';
|
|
10
|
-
import { Database, Feed, Obj, Ref } from '@dxos/echo';
|
|
8
|
+
import { Database, Feed, Obj, Ref, Registry, Type } from '@dxos/echo';
|
|
9
|
+
import { DXN } from '@dxos/keys';
|
|
11
10
|
|
|
12
11
|
import { Agent } from '../../../types';
|
|
13
12
|
|
|
14
13
|
export const AgentRules = Operation.make({
|
|
15
14
|
meta: {
|
|
16
|
-
key: 'org.dxos.function.
|
|
15
|
+
key: DXN.make('org.dxos.function.agentWizard.agentRules'),
|
|
17
16
|
name: 'Agent rules',
|
|
18
17
|
description: 'Gets the rules for creating an agent.',
|
|
18
|
+
icon: 'ph--book-open--regular',
|
|
19
19
|
},
|
|
20
20
|
input: Schema.Struct({}),
|
|
21
21
|
output: Schema.String,
|
|
@@ -23,9 +23,10 @@ export const AgentRules = Operation.make({
|
|
|
23
23
|
|
|
24
24
|
export const CreateAgent = Operation.make({
|
|
25
25
|
meta: {
|
|
26
|
-
key: 'org.dxos.function.
|
|
26
|
+
key: DXN.make('org.dxos.function.agentWizard.createAgent'),
|
|
27
27
|
name: 'Create agent',
|
|
28
28
|
description: 'Creates a new agent.',
|
|
29
|
+
icon: 'ph--brain--regular',
|
|
29
30
|
},
|
|
30
31
|
input: Schema.Struct({
|
|
31
32
|
name: Schema.String.annotations({
|
|
@@ -43,16 +44,17 @@ export const CreateAgent = Operation.make({
|
|
|
43
44
|
description: 'The objects to subscribe to for the agent. Can be references to mailboxes.',
|
|
44
45
|
}),
|
|
45
46
|
}),
|
|
46
|
-
output: Agent.Agent,
|
|
47
|
-
services: [
|
|
47
|
+
output: Type.getSchema(Agent.Agent),
|
|
48
|
+
services: [Registry.Service, Database.Service, Feed.FeedService],
|
|
48
49
|
});
|
|
49
50
|
|
|
50
51
|
export const SyncTriggers = Operation.make({
|
|
51
52
|
meta: {
|
|
52
|
-
key: 'org.dxos.function.agent.
|
|
53
|
+
key: DXN.make('org.dxos.function.agent.syncTriggers'),
|
|
53
54
|
name: 'Sync triggers',
|
|
54
55
|
description:
|
|
55
56
|
'Synchronizes triggers with the agent: subscriptions, cron, filter-events, and enabled (copied to every trigger). Call after editing those fields.',
|
|
57
|
+
icon: 'ph--arrows-clockwise--regular',
|
|
56
58
|
},
|
|
57
59
|
input: Schema.Struct({
|
|
58
60
|
agent: Ref.Ref(Agent.Agent).annotations({
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import { OperationHandlerSet } from '@dxos/compute';
|
|
6
6
|
|
|
7
|
-
export * from './definitions';
|
|
7
|
+
export * as AgentWizardOperations from './definitions';
|
|
8
8
|
|
|
9
9
|
export const AgentWizardHandlers = OperationHandlerSet.lazy(
|
|
10
|
-
() => import('./create-
|
|
11
|
-
() => import('./
|
|
10
|
+
() => import('./create-agent'),
|
|
11
|
+
() => import('./agent-rules'),
|
|
12
12
|
() => import('./sync-triggers'),
|
|
13
13
|
);
|