@dxos/assistant-toolkit 0.8.4-main.3fbcb4aa9b → 0.8.4-main.43cb759274
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-ZUJ5DMSY.mjs → add-artifact-ADKF427P.mjs} +6 -6
- package/dist/lib/neutral/{add-artifact-ZUJ5DMSY.mjs.map → add-artifact-ADKF427P.mjs.map} +3 -3
- package/dist/lib/neutral/{agent-5NIKAYUK.mjs → agent-4HT4GKKI.mjs} +9 -9
- package/dist/lib/neutral/{agent-5NIKAYUK.mjs.map → agent-4HT4GKKI.mjs.map} +2 -2
- package/dist/lib/neutral/{chunk-TO5IX24K.mjs → chunk-3ZDYN7BG.mjs} +16 -27
- package/dist/lib/neutral/chunk-3ZDYN7BG.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-EJAQUAKM.mjs → chunk-53BZWMRB.mjs} +12 -8
- package/dist/lib/neutral/chunk-53BZWMRB.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-WLR3BGO4.mjs → chunk-6SYN5IV3.mjs} +4 -2
- package/dist/lib/neutral/chunk-6SYN5IV3.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-QO5SU37C.mjs → chunk-7OQIX2PP.mjs} +4 -4
- package/dist/lib/neutral/{chunk-QO5SU37C.mjs.map → chunk-7OQIX2PP.mjs.map} +1 -1
- package/dist/lib/neutral/{chunk-P4ZMYO4K.mjs → chunk-ALDU6VDG.mjs} +21 -33
- package/dist/lib/neutral/chunk-ALDU6VDG.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-GV66MKAQ.mjs → chunk-AYV2KMAV.mjs} +7 -5
- package/dist/lib/neutral/chunk-AYV2KMAV.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-ROMZO4CB.mjs → chunk-BB6X6NT6.mjs} +13 -10
- package/dist/lib/neutral/chunk-BB6X6NT6.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-XUF53B6B.mjs → chunk-DBUT6FKM.mjs} +16 -14
- package/dist/lib/neutral/chunk-DBUT6FKM.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-NR3GTWRC.mjs → chunk-GQRUBCMT.mjs} +8 -13
- package/dist/lib/neutral/chunk-GQRUBCMT.mjs.map +7 -0
- package/dist/lib/neutral/chunk-JRYAD4TG.mjs +67 -0
- package/dist/lib/neutral/chunk-JRYAD4TG.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-ZFXLTBZG.mjs → chunk-PHZNOLXL.mjs} +5 -3
- package/dist/lib/neutral/chunk-PHZNOLXL.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-KGU725LW.mjs → chunk-SOLG2NPH.mjs} +4 -7
- package/dist/lib/neutral/chunk-SOLG2NPH.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-246ACKSH.mjs → chunk-T3RP4AUP.mjs} +24 -20
- package/dist/lib/neutral/chunk-T3RP4AUP.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-IKBIORQX.mjs → chunk-V3PPVL3C.mjs} +57 -43
- package/dist/lib/neutral/chunk-V3PPVL3C.mjs.map +7 -0
- package/dist/lib/neutral/{context-add-VB7AOY3G.mjs → context-add-2G2CDRCK.mjs} +4 -4
- package/dist/lib/neutral/context-add-2G2CDRCK.mjs.map +7 -0
- package/dist/lib/neutral/{context-remove-VCM3VPSO.mjs → context-remove-QQOT57JC.mjs} +4 -4
- package/dist/lib/neutral/context-remove-QQOT57JC.mjs.map +7 -0
- package/dist/lib/neutral/{create-project-EIF4OJMY.mjs → create-project-LVIH4OLF.mjs} +7 -7
- package/dist/lib/neutral/{delete-J3PMWP7Z.mjs → delete-MRER3QMO.mjs} +3 -3
- package/dist/lib/neutral/{enable-blueprints-LBDZH2CY.mjs → enable-blueprints-GEIKTSRV.mjs} +12 -12
- package/dist/lib/neutral/enable-blueprints-GEIKTSRV.mjs.map +7 -0
- package/dist/lib/neutral/{fetch-KHMHV7JR.mjs → fetch-B2AYJK7F.mjs} +2 -2
- package/dist/lib/neutral/{fetch-messages-QOBBCTGC.mjs → fetch-messages-RUUU63L2.mjs} +2 -2
- package/dist/lib/neutral/{get-context-TN7X7U2H.mjs → get-context-3SXNFRXG.mjs} +10 -10
- package/dist/lib/neutral/{get-context-TN7X7U2H.mjs.map → get-context-3SXNFRXG.mjs.map} +3 -3
- package/dist/lib/neutral/index.mjs +94 -97
- package/dist/lib/neutral/index.mjs.map +3 -3
- package/dist/lib/neutral/{load-ALP3TK2E.mjs → load-YWYQ4THR.mjs} +2 -2
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/{object-create-Z57Y3X6Y.mjs → object-create-WME2XFGD.mjs} +9 -12
- package/dist/lib/neutral/object-create-WME2XFGD.mjs.map +7 -0
- package/dist/lib/neutral/{object-delete-X53LS37B.mjs → object-delete-I5OAPI32.mjs} +2 -2
- package/dist/lib/neutral/{object-update-GVKSBR7T.mjs → object-update-VCOL62NX.mjs} +3 -3
- package/dist/lib/neutral/{object-update-GVKSBR7T.mjs.map → object-update-VCOL62NX.mjs.map} +2 -2
- package/dist/lib/neutral/{project-HPHTZ2CI.mjs → project-4BYI2PZC.mjs} +6 -6
- package/dist/lib/neutral/{project-rules-IVDHKSKI.mjs → project-rules-7NYDDQ7K.mjs} +5 -5
- package/dist/lib/neutral/{prompt-Y7NN7M5D.mjs → prompt-DZP2K2NE.mjs} +6 -6
- package/dist/lib/neutral/prompt-DZP2K2NE.mjs.map +7 -0
- package/dist/lib/neutral/{qualifier-VDOY5CWU.mjs → qualifier-NLOWVZCM.mjs} +15 -14
- package/dist/lib/neutral/qualifier-NLOWVZCM.mjs.map +7 -0
- package/dist/lib/neutral/{query-PPJU5622.mjs → query-GZDTQRQ6.mjs} +12 -23
- package/dist/lib/neutral/query-GZDTQRQ6.mjs.map +7 -0
- package/dist/lib/neutral/{query-U56GNEV6.mjs → query-KBKGBYUO.mjs} +3 -3
- package/dist/lib/neutral/{query-blueprints-KXADGHSA.mjs → query-blueprints-MFXXRZBY.mjs} +5 -4
- package/dist/lib/neutral/query-blueprints-MFXXRZBY.mjs.map +7 -0
- package/dist/lib/neutral/{relation-create-XJ2IX6X3.mjs → relation-create-UHBWQQXS.mjs} +8 -11
- package/dist/lib/neutral/relation-create-UHBWQQXS.mjs.map +7 -0
- package/dist/lib/neutral/{relation-delete-EP4KXAFL.mjs → relation-delete-ZSB7JOHO.mjs} +2 -2
- package/dist/lib/neutral/{save-GWAPLT3Z.mjs → save-B2CSSFDG.mjs} +3 -3
- package/dist/lib/neutral/{schema-add-Z5CY6P24.mjs → schema-add-ZJ64RAZK.mjs} +13 -12
- package/dist/lib/neutral/schema-add-ZJ64RAZK.mjs.map +7 -0
- package/dist/lib/neutral/schema-list-3X3VNYYB.mjs +37 -0
- package/dist/lib/neutral/schema-list-3X3VNYYB.mjs.map +7 -0
- package/dist/lib/neutral/{sync-issues-4YE5XAK5.mjs → sync-issues-36TS2R7R.mjs} +5 -6
- package/dist/lib/neutral/sync-issues-36TS2R7R.mjs.map +7 -0
- package/dist/lib/neutral/{sync-triggers-CDMJVW6E.mjs → sync-triggers-MMHKQDNW.mjs} +39 -37
- package/dist/lib/neutral/sync-triggers-MMHKQDNW.mjs.map +7 -0
- package/dist/lib/neutral/{tag-add-VNIIOVJA.mjs → tag-add-7P5O3IAV.mjs} +4 -5
- package/dist/lib/neutral/tag-add-7P5O3IAV.mjs.map +7 -0
- package/dist/lib/neutral/{tag-remove-6R2R27W3.mjs → tag-remove-YZIMOFA4.mjs} +4 -5
- package/dist/lib/neutral/tag-remove-YZIMOFA4.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +9 -12
- package/dist/lib/neutral/testing/index.mjs.map +3 -3
- package/dist/lib/neutral/update-tasks-6MJCJ2KC.mjs +13 -0
- package/dist/lib/neutral/update-tasks-6MJCJ2KC.mjs.map +7 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +12 -15
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +7 -8
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +6 -6
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/context-add.d.ts +3 -3
- package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts +3 -3
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/definitions.d.ts +23 -17
- package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/load.d.ts +2 -2
- package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/object-update.d.ts +2 -2
- package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/query.d.ts +2 -3
- package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts +3 -3
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts +6 -3
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +6 -3
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts +2 -2
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/functions/delete.d.ts +2 -2
- package/dist/types/src/blueprints/planning/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +14 -1
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts +2 -0
- package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +1 -5
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/definitions.d.ts +60 -45
- package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/get-context.d.ts +1 -12
- package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts +3 -71
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +23 -19
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +45 -38
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +21 -17
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -1
- package/dist/types/src/blueprints/testing.d.ts +4 -4
- package/dist/types/src/blueprints/testing.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +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/definitions.d.ts +14 -23
- package/dist/types/src/functions/agent/definitions.d.ts.map +1 -1
- 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/types/Agent.d.ts +25 -24
- package/dist/types/src/types/Agent.d.ts.map +1 -1
- 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 +1 -2
- 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 +15 -17
- package/dist/types/src/types/Plan.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +30 -31
- package/src/blueprints/automation/blueprint.ts +3 -3
- package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -1
- package/src/blueprints/blueprint-manager/blueprint.test.ts +24 -67
- package/src/blueprints/blueprint-manager/blueprint.ts +5 -5
- package/src/blueprints/blueprint-manager/functions/definitions.ts +11 -20
- package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +10 -7
- package/src/blueprints/blueprint-manager/functions/index.ts +0 -1
- package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +3 -2
- package/src/blueprints/browser/blueprint.conversations.json +1 -0
- package/src/blueprints/browser/blueprint.test.ts +4 -3
- package/src/blueprints/database/blueprint.conversations.json +1 -1
- package/src/blueprints/database/blueprint.test.ts +25 -25
- package/src/blueprints/database/functions/context-add.ts +2 -2
- package/src/blueprints/database/functions/context-remove.ts +2 -2
- package/src/blueprints/database/functions/definitions.ts +54 -40
- package/src/blueprints/database/functions/object-create.ts +8 -5
- package/src/blueprints/database/functions/object-update.ts +1 -1
- package/src/blueprints/database/functions/query.ts +16 -11
- package/src/blueprints/database/functions/relation-create.ts +7 -4
- package/src/blueprints/database/functions/schema-add.ts +7 -12
- package/src/blueprints/database/functions/schema-list.ts +12 -7
- package/src/blueprints/database/functions/tag-add.ts +2 -3
- package/src/blueprints/database/functions/tag-remove.ts +2 -3
- package/src/blueprints/discord/functions/definitions.ts +3 -1
- package/src/blueprints/discord/functions/fetch-messages.test.ts +7 -2
- package/src/blueprints/github/functions/definitions.ts +3 -1
- package/src/blueprints/linear/functions/definitions.ts +3 -1
- package/src/blueprints/linear/functions/linear.test.ts +1 -2
- package/src/blueprints/linear/functions/sync-issues.ts +1 -2
- package/src/blueprints/memory/blueprint.conversations.json +1 -1
- package/src/blueprints/memory/blueprint.test.ts +2 -2
- package/src/blueprints/memory/functions/definitions.ts +7 -3
- package/src/blueprints/planning/blueprint.ts +1 -1
- package/src/blueprints/planning/functions/index.ts +1 -1
- package/src/blueprints/planning/functions/{definitions.ts → update-tasks.md} +29 -50
- package/src/blueprints/planning/functions/update-tasks.test.ts +55 -0
- package/src/blueprints/planning/functions/update-tasks.ts +27 -3
- package/src/blueprints/project/blueprint.conversations.json +1 -1
- package/src/blueprints/project/blueprint.test.ts +14 -16
- package/src/blueprints/project/blueprint.ts +1 -1
- package/src/blueprints/project/functions/add-artifact.ts +1 -0
- package/src/blueprints/project/functions/agent.ts +4 -4
- package/src/blueprints/project/functions/definitions.ts +17 -14
- package/src/blueprints/project/functions/get-context.ts +5 -4
- package/src/blueprints/project/functions/qualifier.ts +8 -7
- package/src/blueprints/project-wizard/blueprint.ts +1 -1
- package/src/blueprints/project-wizard/functions/definitions.ts +11 -8
- package/src/blueprints/project-wizard/functions/sync-triggers.ts +33 -35
- package/src/blueprints/testing.ts +10 -4
- package/src/blueprints/websearch/blueprint.conversations.json +1 -1
- package/src/blueprints/websearch/functions/definitions.ts +3 -1
- package/src/crud/graph.test.ts +1 -1
- package/src/crud/graph.ts +143 -153
- package/src/errors.ts +3 -3
- package/src/functions/agent/definitions.ts +5 -3
- package/src/functions/agent/prompt.conversations.json +1 -1
- package/src/functions/agent/prompt.test.ts +10 -13
- package/src/functions/agent/prompt.ts +3 -3
- package/src/sync/sync.ts +7 -6
- package/src/testing/plugins.tsx +10 -15
- package/src/types/Agent.ts +27 -35
- package/src/types/Chat.ts +10 -20
- package/src/types/McpServer.ts +4 -10
- package/src/types/Memory.ts +4 -7
- package/src/types/Plan.ts +4 -11
- package/dist/lib/neutral/chunk-246ACKSH.mjs.map +0 -7
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +0 -7
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs +0 -140
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs.map +0 -7
- package/dist/lib/neutral/chunk-GV66MKAQ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-IKBIORQX.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-P4ZMYO4K.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ROMZO4CB.mjs.map +0 -7
- package/dist/lib/neutral/chunk-TO5IX24K.mjs.map +0 -7
- package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +0 -7
- package/dist/lib/neutral/chunk-XUF53B6B.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +0 -7
- package/dist/lib/neutral/context-add-VB7AOY3G.mjs.map +0 -7
- package/dist/lib/neutral/context-remove-VCM3VPSO.mjs.map +0 -7
- package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs.map +0 -7
- package/dist/lib/neutral/object-create-Z57Y3X6Y.mjs.map +0 -7
- package/dist/lib/neutral/prompt-Y7NN7M5D.mjs.map +0 -7
- package/dist/lib/neutral/qualifier-VDOY5CWU.mjs.map +0 -7
- package/dist/lib/neutral/query-PPJU5622.mjs.map +0 -7
- package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs.map +0 -7
- package/dist/lib/neutral/relation-create-XJ2IX6X3.mjs.map +0 -7
- package/dist/lib/neutral/schema-add-Z5CY6P24.mjs.map +0 -7
- package/dist/lib/neutral/schema-list-W326VPVX.mjs +0 -38
- package/dist/lib/neutral/schema-list-W326VPVX.mjs.map +0 -7
- package/dist/lib/neutral/sync-issues-4YE5XAK5.mjs.map +0 -7
- package/dist/lib/neutral/sync-triggers-CDMJVW6E.mjs.map +0 -7
- package/dist/lib/neutral/tag-add-VNIIOVJA.mjs.map +0 -7
- package/dist/lib/neutral/tag-remove-6R2R27W3.mjs.map +0 -7
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs +0 -16
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs.map +0 -7
- package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs +0 -46
- package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs.map +0 -7
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +0 -4
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.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/src/blueprints/blueprint-manager/functions/update-blueprints.ts +0 -18
- /package/dist/lib/neutral/{create-project-EIF4OJMY.mjs.map → create-project-LVIH4OLF.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-J3PMWP7Z.mjs.map → delete-MRER3QMO.mjs.map} +0 -0
- /package/dist/lib/neutral/{fetch-KHMHV7JR.mjs.map → fetch-B2AYJK7F.mjs.map} +0 -0
- /package/dist/lib/neutral/{fetch-messages-QOBBCTGC.mjs.map → fetch-messages-RUUU63L2.mjs.map} +0 -0
- /package/dist/lib/neutral/{load-ALP3TK2E.mjs.map → load-YWYQ4THR.mjs.map} +0 -0
- /package/dist/lib/neutral/{object-delete-X53LS37B.mjs.map → object-delete-I5OAPI32.mjs.map} +0 -0
- /package/dist/lib/neutral/{project-HPHTZ2CI.mjs.map → project-4BYI2PZC.mjs.map} +0 -0
- /package/dist/lib/neutral/{project-rules-IVDHKSKI.mjs.map → project-rules-7NYDDQ7K.mjs.map} +0 -0
- /package/dist/lib/neutral/{query-U56GNEV6.mjs.map → query-KBKGBYUO.mjs.map} +0 -0
- /package/dist/lib/neutral/{relation-delete-EP4KXAFL.mjs.map → relation-delete-ZSB7JOHO.mjs.map} +0 -0
- /package/dist/lib/neutral/{save-GWAPLT3Z.mjs.map → save-B2CSSFDG.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/assistant-toolkit",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.43cb759274",
|
|
4
4
|
"description": "Assistant toolkit, definitions, and utilities.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"exports": {
|
|
@@ -28,45 +28,44 @@
|
|
|
28
28
|
"src"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@effect/ai": "0.
|
|
32
|
-
"@effect/ai-anthropic": "0.
|
|
33
|
-
"@effect/platform": "0.
|
|
31
|
+
"@effect/ai": "0.35.0",
|
|
32
|
+
"@effect/ai-anthropic": "0.25.0",
|
|
33
|
+
"@effect/platform": "0.96.1",
|
|
34
34
|
"dfx": "^0.127.0",
|
|
35
35
|
"exa-js": "^1.5.12",
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/echo-
|
|
42
|
-
"@dxos/echo
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/functions": "0.8.4-main.
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/log": "0.8.4-main.
|
|
51
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/util": "0.8.4-main.
|
|
55
|
-
"@dxos/types": "0.8.4-main.3fbcb4aa9b"
|
|
36
|
+
"@dxos/app-framework": "0.8.4-main.43cb759274",
|
|
37
|
+
"@dxos/ai": "0.8.4-main.43cb759274",
|
|
38
|
+
"@dxos/assistant": "0.8.4-main.43cb759274",
|
|
39
|
+
"@dxos/compute": "0.8.4-main.43cb759274",
|
|
40
|
+
"@dxos/client-protocol": "0.8.4-main.43cb759274",
|
|
41
|
+
"@dxos/echo-protocol": "0.8.4-main.43cb759274",
|
|
42
|
+
"@dxos/echo": "0.8.4-main.43cb759274",
|
|
43
|
+
"@dxos/errors": "0.8.4-main.43cb759274",
|
|
44
|
+
"@dxos/effect": "0.8.4-main.43cb759274",
|
|
45
|
+
"@dxos/functions": "0.8.4-main.43cb759274",
|
|
46
|
+
"@dxos/invariant": "0.8.4-main.43cb759274",
|
|
47
|
+
"@dxos/functions-runtime": "0.8.4-main.43cb759274",
|
|
48
|
+
"@dxos/keys": "0.8.4-main.43cb759274",
|
|
49
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.43cb759274",
|
|
50
|
+
"@dxos/log": "0.8.4-main.43cb759274",
|
|
51
|
+
"@dxos/react-ui": "0.8.4-main.43cb759274",
|
|
52
|
+
"@dxos/schema": "0.8.4-main.43cb759274",
|
|
53
|
+
"@dxos/types": "0.8.4-main.43cb759274",
|
|
54
|
+
"@dxos/util": "0.8.4-main.43cb759274"
|
|
56
55
|
},
|
|
57
56
|
"devDependencies": {
|
|
58
|
-
"effect": "3.
|
|
57
|
+
"effect": "3.21.2",
|
|
59
58
|
"react": "~19.2.3",
|
|
60
59
|
"react-dom": "~19.2.3",
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/plugin-markdown": "0.8.4-main.
|
|
63
|
-
"@dxos/
|
|
60
|
+
"@dxos/ui-theme": "0.8.4-main.43cb759274",
|
|
61
|
+
"@dxos/plugin-markdown": "0.8.4-main.43cb759274",
|
|
62
|
+
"@dxos/client-protocol": "0.8.4-main.43cb759274"
|
|
64
63
|
},
|
|
65
64
|
"peerDependencies": {
|
|
66
|
-
"effect": "3.
|
|
65
|
+
"effect": "3.21.2",
|
|
67
66
|
"react": "~19.2.3",
|
|
68
67
|
"react-dom": "~19.2.3",
|
|
69
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
68
|
+
"@dxos/ui-theme": "0.8.4-main.43cb759274"
|
|
70
69
|
},
|
|
71
70
|
"publishConfig": {
|
|
72
71
|
"access": "public"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Blueprint, Trigger, Operation } from '@dxos/compute';
|
|
6
|
-
import { Ref } from '@dxos/echo';
|
|
6
|
+
import { Ref, Type } from '@dxos/echo';
|
|
7
7
|
import { Text } from '@dxos/schema';
|
|
8
8
|
import { trim } from '@dxos/util';
|
|
9
9
|
|
|
@@ -19,7 +19,7 @@ const instructions = trim`
|
|
|
19
19
|
Triggers are configured by the properties of the Trigger object.
|
|
20
20
|
- enabled: Must be true for trigger to run.
|
|
21
21
|
- spec: Events that the trigger matches.
|
|
22
|
-
- function: Ref to a ${Operation.PersistentOperation
|
|
22
|
+
- function: Ref to a ${Type.getTypename(Operation.PersistentOperation)} object that will be invoked. Query the functions present in the space first, and reference them in the trigger.
|
|
23
23
|
- input: The spec of the input data that will be passed to the function.
|
|
24
24
|
|
|
25
25
|
## Input patterns
|
|
@@ -46,7 +46,7 @@ const instructions = trim`
|
|
|
46
46
|
|
|
47
47
|
## Editing triggers
|
|
48
48
|
|
|
49
|
-
Triggers are represented as objects of type ${Trigger.Trigger
|
|
49
|
+
Triggers are represented as objects of type ${Type.getTypename(Trigger.Trigger)}.
|
|
50
50
|
You need access to the Database blueprint to manipulate triggers.
|
|
51
51
|
Read trigger schema before manipulating triggers.
|
|
52
52
|
Having a Trigger object in the database is enough to setup an automation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"conversations":[{"parameters":{"model":"@anthropic/claude-opus-4-6","stream":true,"tools":[{"name":"query-blueprints","description":"Queries available blueprints.","inputSchema":{"
|
|
1
|
+
{"conversations":[{"parameters":{"model":"@anthropic/claude-opus-4-6","stream":true,"tools":[{"name":"query-blueprints","description":"Queries available blueprints.","inputSchema":{"$id":"/schemas/%7B%7D","anyOf":[{"type":"object"},{"type":"array"}]}},{"name":"enable-blueprints","description":"Enables blueprints in the current conversation by their keys. Only blueprints with agentCanEnable=true can be enabled. Always call [query-blueprints] first to discover available blueprint keys.","inputSchema":{"type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"type":"string"},"description":"The keys of the blueprints to enable.","examples":[["org.dxos.blueprint.memory","org.dxos.blueprint.database"]]}},"additionalProperties":false}},{"name":"refresh-blueprints","description":"Updates the blueprints saved to the database with the latest version from the registry. Sometimes blueprints in the database can become outdated. Use this function to pull in the latest versions.","inputSchema":{"$id":"/schemas/%7B%7D","anyOf":[{"type":"object"},{"type":"array"}]}}]},"prompt":{"content":[{"role":"system","content":"You can call blueprint manager tools. When asked to refresh or sync blueprints from the registry,\ncall the refresh blueprints tool once and then stop.\n\n## Blueprints Definitions\n\n<blueprint>\n You can query available blueprints and enable them in the current conversation.\n Use [query-blueprints] to refresh the list of available blueprints.\n Use [refresh-blueprints] to update blueprint objects stored in the database from the built-in registry when they have drifted.\n Use [enable-blueprints] to enable blueprints by their keys. Always call [query-blueprints] first.\n Only blueprints with agentCanEnable=true can be enabled by the agent.\n \n <available_blueprints>\n - \"Database\" -- Query and manipulate objects in the ECHO database. [agent-can-enable]\n - \"Discord\" -- Discord integration.\n - \"Memory\" -- Persistent memory storage and retrieval. [agent-can-enable]\n </available_blueprints>\n \n NOTE: You must enable the blueprint to use it, only then the tools from that blueprint will appear.\n</blueprint>","options":{}},{"role":"user","content":"Refresh blueprints from the registry so database copies match the built-in definitions.","options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01EnWRrZtYvker1hoFaUftiX","modelId":"claude-opus-4-6","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"reasoning-start","id":"0","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"The user wants to refresh blueprints from the registry. I should call the refresh-blueprints tool.","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"","metadata":{"anthropic":{"type":"thinking","signature":"EqgCCmMIDhgCKkBdz2UkSiBc+mB42bn4XBMulDdlfY744r6A3/CtRIj5ka8kLuAbmGbpsDHh15YA4AXwrTKjmGFVws1/iQVVcX0NMg9jbGF1ZGUtb3B1cy00LTY4AEIIdGhpbmtpbmcSDC1IWXx2nxKJlumiFBoMODifRWw+vJr3M9oxIjCNeGHzgul3HZTZVS1Y1fq36Z6+uk9jVJtfR1kiZDmfUabkraoD+PzSoABC7+HQSl4qc4hegrTArcyY5OVZiDXjw5cbBhF72gChkZu+A5b/wqIxjxdVTqj5Mk3W9dVK7gF5K9ATIOu8KeHLwz9wFEZgmK9vBQhhWrX+X0SaZ7Tds2fllZyPf+1u7EbqQUDP0fp8mjeXRSKJLeTBGTw/d5Ul0Y3/DIgYAQ=="}}},{"type":"reasoning-end","id":"0","metadata":{}},{"type":"text-start","id":"1","metadata":{}},{"type":"text-delta","id":"1","delta":"I","metadata":{}},{"type":"text-delta","id":"1","delta":"'ll refresh the blueprints from the registry now.","metadata":{}},{"type":"text-end","id":"1","metadata":{}},{"type":"tool-params-start","id":"toolu_0191HNbgqXmmaNXfW6keirtd","name":"refresh-blueprints","providerExecuted":false,"metadata":{}},{"type":"tool-params-delta","id":"toolu_0191HNbgqXmmaNXfW6keirtd","delta":"","metadata":{}},{"type":"tool-params-end","id":"toolu_0191HNbgqXmmaNXfW6keirtd","metadata":{}},{"type":"finish","reason":"tool-calls","usage":{"inputTokens":1086,"outputTokens":90,"totalTokens":1176},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":1086,"output_tokens":40,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-6","stream":true,"tools":[{"name":"query-blueprints","description":"Queries available blueprints.","inputSchema":{"$id":"/schemas/%7B%7D","anyOf":[{"type":"object"},{"type":"array"}]}},{"name":"enable-blueprints","description":"Enables blueprints in the current conversation by their keys. Only blueprints with agentCanEnable=true can be enabled. Always call [query-blueprints] first to discover available blueprint keys.","inputSchema":{"type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"type":"string"},"description":"The keys of the blueprints to enable.","examples":[["org.dxos.blueprint.memory","org.dxos.blueprint.database"]]}},"additionalProperties":false}},{"name":"refresh-blueprints","description":"Updates the blueprints saved to the database with the latest version from the registry. Sometimes blueprints in the database can become outdated. Use this function to pull in the latest versions.","inputSchema":{"$id":"/schemas/%7B%7D","anyOf":[{"type":"object"},{"type":"array"}]}}]},"prompt":{"content":[{"role":"system","content":"You can call blueprint manager tools. When asked to refresh or sync blueprints from the registry,\ncall the refresh blueprints tool once and then stop.\n\n## Blueprints Definitions\n\n<blueprint>\n You can query available blueprints and enable them in the current conversation.\n Use [query-blueprints] to refresh the list of available blueprints.\n Use [refresh-blueprints] to update blueprint objects stored in the database from the built-in registry when they have drifted.\n Use [enable-blueprints] to enable blueprints by their keys. Always call [query-blueprints] first.\n Only blueprints with agentCanEnable=true can be enabled by the agent.\n \n <available_blueprints>\n - \"Database\" -- Query and manipulate objects in the ECHO database. [agent-can-enable]\n - \"Discord\" -- Discord integration.\n - \"Memory\" -- Persistent memory storage and retrieval. [agent-can-enable]\n </available_blueprints>\n \n NOTE: You must enable the blueprint to use it, only then the tools from that blueprint will appear.\n</blueprint>","options":{}},{"role":"user","content":"Refresh blueprints from the registry so database copies match the built-in definitions.","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user wants to refresh blueprints from the registry. I should call the refresh-blueprints tool.","options":{}},{"type":"text","text":"I'll refresh the blueprints from the registry now.","options":{}},{"type":"tool-call","id":"toolu_0191HNbgqXmmaNXfW6keirtd","name":"refresh-blueprints","params":{},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_0191HNbgqXmmaNXfW6keirtd","name":"refresh-blueprints","isFailure":false,"result":{},"providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01UYmSHxnE5L1YWqDDnmQtpE","modelId":"claude-opus-4-6","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"text-start","id":"0","metadata":{}},{"type":"text-delta","id":"0","delta":"The blueprints stored","metadata":{}},{"type":"text-delta","id":"0","delta":" in the database have been updated to match the latest built-in definitions from the registry. Everything should","metadata":{}},{"type":"text-delta","id":"0","delta":" now be in sync.","metadata":{}},{"type":"text-end","id":"0","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":1149,"outputTokens":33,"totalTokens":1182},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":1149,"output_tokens":5,"server_tool_use":null,"service_tier":"standard"}}}}]}]}
|
|
@@ -6,20 +6,17 @@ import { describe, expect, it } from '@effect/vitest';
|
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
7
|
import * as Layer from 'effect/Layer';
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
import { AiContextService, AiSessionService } from '@dxos/assistant';
|
|
9
|
+
import { AiContext, AiSession } from '@dxos/assistant';
|
|
11
10
|
import { Blueprint, Operation } from '@dxos/compute';
|
|
12
|
-
import {
|
|
11
|
+
import { Obj } from '@dxos/echo';
|
|
13
12
|
import { TestHelpers } from '@dxos/effect/testing';
|
|
14
13
|
import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
|
|
15
|
-
import {
|
|
16
|
-
import { trim } from '@dxos/util';
|
|
14
|
+
import { EntityId } from '@dxos/keys';
|
|
17
15
|
|
|
18
16
|
import { DatabaseBlueprint, DiscordBlueprint, MemoryBlueprint } from '../index';
|
|
19
|
-
import BlueprintManagerDefinition from './blueprint';
|
|
20
17
|
import { BlueprintManagerHandlers, EnableBlueprints, QueryBlueprints } from './functions';
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
EntityId.dangerouslyDisableRandomness();
|
|
23
20
|
|
|
24
21
|
const TestLayer = AssistantTestLayer({
|
|
25
22
|
aiServicePreset: 'edge-remote',
|
|
@@ -29,14 +26,14 @@ const TestLayer = AssistantTestLayer({
|
|
|
29
26
|
tracing: 'pretty',
|
|
30
27
|
});
|
|
31
28
|
|
|
32
|
-
const provideTestLayers = Effect.provide(
|
|
29
|
+
const provideTestLayers = Effect.provide(AiSession.Service.layerNewFeed().pipe(Layer.provideMerge(TestLayer)));
|
|
33
30
|
|
|
34
31
|
/**
|
|
35
32
|
* Gets the conversation DXN for passing to Operation.invoke options.
|
|
36
33
|
*/
|
|
37
|
-
const
|
|
38
|
-
const session = yield*
|
|
39
|
-
return Obj.
|
|
34
|
+
const getConversationDXN = Effect.gen(function* () {
|
|
35
|
+
const session = yield* AiSession.Service;
|
|
36
|
+
return Obj.getURI(session.feed);
|
|
40
37
|
});
|
|
41
38
|
|
|
42
39
|
describe('Blueprint Manager', () => {
|
|
@@ -44,10 +41,10 @@ describe('Blueprint Manager', () => {
|
|
|
44
41
|
'query-blueprints: returns all registered blueprints',
|
|
45
42
|
Effect.fnUntraced(
|
|
46
43
|
function* (_) {
|
|
47
|
-
const conversation = yield*
|
|
44
|
+
const conversation = yield* getConversationDXN;
|
|
48
45
|
const result = yield* Operation.invoke(QueryBlueprints, {}, { conversation });
|
|
49
46
|
expect(result).toHaveLength(3);
|
|
50
|
-
const keys = result.map((blueprint: Blueprint.Blueprint) => blueprint.key);
|
|
47
|
+
const keys = result.map((blueprint: Blueprint.Blueprint) => Obj.getMeta(blueprint).key);
|
|
51
48
|
expect(keys).toContain('org.dxos.blueprint.database');
|
|
52
49
|
expect(keys).toContain('org.dxos.blueprint.memory');
|
|
53
50
|
expect(keys).toContain('org.dxos.blueprint.discord');
|
|
@@ -62,19 +59,21 @@ describe('Blueprint Manager', () => {
|
|
|
62
59
|
'enable-blueprints: enables blueprints with agentCanEnable=true',
|
|
63
60
|
Effect.fnUntraced(
|
|
64
61
|
function* (_) {
|
|
65
|
-
const conversation = yield*
|
|
62
|
+
const conversation = yield* getConversationDXN;
|
|
66
63
|
const { enabled, rejected } = yield* Operation.invoke(
|
|
67
64
|
EnableBlueprints,
|
|
68
65
|
{ keys: ['org.dxos.blueprint.database'] },
|
|
69
66
|
{ conversation },
|
|
70
67
|
);
|
|
71
68
|
expect(enabled).toHaveLength(1);
|
|
72
|
-
expect(enabled[0].key).toBe('org.dxos.blueprint.database');
|
|
69
|
+
expect(Obj.getMeta(enabled[0]).key).toBe('org.dxos.blueprint.database');
|
|
73
70
|
expect(rejected).toHaveLength(0);
|
|
74
71
|
|
|
75
|
-
const { binder } = yield*
|
|
72
|
+
const { binder } = yield* AiContext.Service;
|
|
76
73
|
const bound = binder.getBlueprints();
|
|
77
|
-
expect(bound.some((bp: Blueprint.Blueprint) => bp.key === 'org.dxos.blueprint.database')).toBe(
|
|
74
|
+
expect(bound.some((bp: Blueprint.Blueprint) => Obj.getMeta(bp).key === 'org.dxos.blueprint.database')).toBe(
|
|
75
|
+
true,
|
|
76
|
+
);
|
|
78
77
|
},
|
|
79
78
|
provideTestLayers,
|
|
80
79
|
TestHelpers.provideTestContext,
|
|
@@ -86,7 +85,7 @@ describe('Blueprint Manager', () => {
|
|
|
86
85
|
'enable-blueprints: rejects blueprints without agentCanEnable',
|
|
87
86
|
Effect.fnUntraced(
|
|
88
87
|
function* (_) {
|
|
89
|
-
const conversation = yield*
|
|
88
|
+
const conversation = yield* getConversationDXN;
|
|
90
89
|
const { enabled, rejected } = yield* Operation.invoke(
|
|
91
90
|
EnableBlueprints,
|
|
92
91
|
{ keys: ['org.dxos.blueprint.discord'] },
|
|
@@ -96,9 +95,11 @@ describe('Blueprint Manager', () => {
|
|
|
96
95
|
expect(rejected).toHaveLength(1);
|
|
97
96
|
expect(rejected[0].key).toBe('org.dxos.blueprint.discord');
|
|
98
97
|
|
|
99
|
-
const { binder } = yield*
|
|
98
|
+
const { binder } = yield* AiContext.Service;
|
|
100
99
|
const bound = binder.getBlueprints();
|
|
101
|
-
expect(bound.some((bp: Blueprint.Blueprint) => bp.key === 'org.dxos.blueprint.discord')).toBe(
|
|
100
|
+
expect(bound.some((bp: Blueprint.Blueprint) => Obj.getMeta(bp).key === 'org.dxos.blueprint.discord')).toBe(
|
|
101
|
+
false,
|
|
102
|
+
);
|
|
102
103
|
},
|
|
103
104
|
provideTestLayers,
|
|
104
105
|
TestHelpers.provideTestContext,
|
|
@@ -110,7 +111,7 @@ describe('Blueprint Manager', () => {
|
|
|
110
111
|
'enable-blueprints: mixed keys enables only allowed ones',
|
|
111
112
|
Effect.fnUntraced(
|
|
112
113
|
function* (_) {
|
|
113
|
-
const conversation = yield*
|
|
114
|
+
const conversation = yield* getConversationDXN;
|
|
114
115
|
const { enabled, rejected } = yield* Operation.invoke(
|
|
115
116
|
EnableBlueprints,
|
|
116
117
|
{
|
|
@@ -119,7 +120,7 @@ describe('Blueprint Manager', () => {
|
|
|
119
120
|
{ conversation },
|
|
120
121
|
);
|
|
121
122
|
expect(enabled).toHaveLength(2);
|
|
122
|
-
const enabledKeys = enabled.map((bp: Blueprint.Blueprint) => bp.key);
|
|
123
|
+
const enabledKeys = enabled.map((bp: Blueprint.Blueprint) => Obj.getMeta(bp).key);
|
|
123
124
|
expect(enabledKeys).toContain('org.dxos.blueprint.database');
|
|
124
125
|
expect(enabledKeys).toContain('org.dxos.blueprint.memory');
|
|
125
126
|
expect(rejected).toHaveLength(1);
|
|
@@ -135,7 +136,7 @@ describe('Blueprint Manager', () => {
|
|
|
135
136
|
'enable-blueprints: unknown keys are rejected with reason',
|
|
136
137
|
Effect.fnUntraced(
|
|
137
138
|
function* (_) {
|
|
138
|
-
const conversation = yield*
|
|
139
|
+
const conversation = yield* getConversationDXN;
|
|
139
140
|
const { enabled, rejected } = yield* Operation.invoke(
|
|
140
141
|
EnableBlueprints,
|
|
141
142
|
{ keys: ['org.dxos.blueprint.nonexistent'] },
|
|
@@ -151,48 +152,4 @@ describe('Blueprint Manager', () => {
|
|
|
151
152
|
),
|
|
152
153
|
{ timeout: 30_000 },
|
|
153
154
|
);
|
|
154
|
-
|
|
155
|
-
it.scoped(
|
|
156
|
-
'refresh-blueprints: agent syncs a mutated database blueprint from the registry',
|
|
157
|
-
Effect.fnUntraced(
|
|
158
|
-
function* (_) {
|
|
159
|
-
const registry = yield* Blueprint.RegistryService;
|
|
160
|
-
const canonical = registry.getByKey('org.dxos.blueprint.database');
|
|
161
|
-
expect(canonical).toBeDefined();
|
|
162
|
-
|
|
163
|
-
const stored = yield* Blueprint.upsert('org.dxos.blueprint.database');
|
|
164
|
-
const originalName = stored.name;
|
|
165
|
-
Obj.update(stored, (stored) => {
|
|
166
|
-
stored.name = '___TEST_MUTATED_BLUEPRINT_NAME___';
|
|
167
|
-
});
|
|
168
|
-
yield* Database.flush();
|
|
169
|
-
expect(stored.name).toBe('___TEST_MUTATED_BLUEPRINT_NAME___');
|
|
170
|
-
|
|
171
|
-
const session = yield* AiSessionService;
|
|
172
|
-
yield* Effect.promise(() => session.context.open());
|
|
173
|
-
yield* Effect.promise(() =>
|
|
174
|
-
session.context.bind({
|
|
175
|
-
blueprints: [Ref.make(BlueprintManagerDefinition.make())],
|
|
176
|
-
}),
|
|
177
|
-
);
|
|
178
|
-
|
|
179
|
-
yield* session
|
|
180
|
-
.createRequest({
|
|
181
|
-
system: trim`
|
|
182
|
-
You can call blueprint manager tools. When asked to refresh or sync blueprints from the registry,
|
|
183
|
-
call the refresh blueprints tool once and then stop.
|
|
184
|
-
`,
|
|
185
|
-
prompt: trim`
|
|
186
|
-
Refresh blueprints from the registry so database copies match the built-in definitions.
|
|
187
|
-
`,
|
|
188
|
-
})
|
|
189
|
-
.pipe(Effect.provide(session.makeToolExecutionServices()));
|
|
190
|
-
|
|
191
|
-
expect(stored.name).toBe(originalName);
|
|
192
|
-
},
|
|
193
|
-
provideTestLayers,
|
|
194
|
-
TestHelpers.provideTestContext,
|
|
195
|
-
),
|
|
196
|
-
MemoizedAiService.isGenerationEnabled() ? 240_000 : 60_000,
|
|
197
|
-
);
|
|
198
155
|
});
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Blueprint, Template } from '@dxos/compute';
|
|
6
|
+
import { DXN } from '@dxos/keys';
|
|
6
7
|
import { trim } from '@dxos/util';
|
|
7
8
|
|
|
8
|
-
import { EnableBlueprints, QueryBlueprints
|
|
9
|
+
import { EnableBlueprints, QueryBlueprints } from './functions';
|
|
9
10
|
|
|
10
|
-
const BLUEPRINT_KEY = 'org.dxos.blueprint.
|
|
11
|
+
const BLUEPRINT_KEY = 'org.dxos.blueprint.blueprintManager';
|
|
11
12
|
|
|
12
13
|
const make = () =>
|
|
13
14
|
Blueprint.make({
|
|
@@ -18,7 +19,6 @@ const make = () =>
|
|
|
18
19
|
source: trim`
|
|
19
20
|
You can query available blueprints and enable them in the current conversation.
|
|
20
21
|
Use [query-blueprints] to refresh the list of available blueprints.
|
|
21
|
-
Use [refresh-blueprints] to update blueprint objects stored in the database from the built-in registry when they have drifted.
|
|
22
22
|
Use [enable-blueprints] to enable blueprints by their keys. Always call [query-blueprints] first.
|
|
23
23
|
Only blueprints with agentCanEnable=true can be enabled by the agent.
|
|
24
24
|
|
|
@@ -34,11 +34,11 @@ const make = () =>
|
|
|
34
34
|
{
|
|
35
35
|
name: 'blueprints',
|
|
36
36
|
kind: 'operation',
|
|
37
|
-
operation: QueryBlueprints.meta.key,
|
|
37
|
+
operation: DXN.getName(QueryBlueprints.meta.key),
|
|
38
38
|
},
|
|
39
39
|
],
|
|
40
40
|
}),
|
|
41
|
-
tools: Blueprint.toolDefinitions({ operations: [QueryBlueprints, EnableBlueprints
|
|
41
|
+
tools: Blueprint.toolDefinitions({ operations: [QueryBlueprints, EnableBlueprints] }),
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
const blueprint: Blueprint.Definition = {
|
|
@@ -4,27 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { AiContext } from '@dxos/assistant';
|
|
8
8
|
import { Blueprint, Operation } from '@dxos/compute';
|
|
9
|
-
import { Database } from '@dxos/echo';
|
|
9
|
+
import { Database, Registry, Type } from '@dxos/echo';
|
|
10
|
+
import { DXN } from '@dxos/keys';
|
|
10
11
|
|
|
11
12
|
export const QueryBlueprints = Operation.make({
|
|
12
13
|
meta: {
|
|
13
|
-
key: 'org.dxos.function.
|
|
14
|
+
key: DXN.make('org.dxos.function.blueprintManager.queryBlueprints'),
|
|
14
15
|
name: 'Query blueprints',
|
|
15
16
|
description: 'Queries available blueprints.',
|
|
17
|
+
icon: 'ph--blueprint--regular',
|
|
16
18
|
},
|
|
17
19
|
input: Schema.Struct({}),
|
|
18
|
-
output: Schema.Array(Blueprint.Blueprint),
|
|
19
|
-
services: [
|
|
20
|
+
output: Schema.Array(Type.getSchema(Blueprint.Blueprint)),
|
|
21
|
+
services: [Registry.Service],
|
|
20
22
|
});
|
|
21
23
|
|
|
22
24
|
export const EnableBlueprints = Operation.make({
|
|
23
25
|
meta: {
|
|
24
|
-
key: 'org.dxos.function.
|
|
26
|
+
key: DXN.make('org.dxos.function.blueprintManager.enableBlueprints'),
|
|
25
27
|
name: 'Enable blueprints',
|
|
26
28
|
description:
|
|
27
29
|
'Enables blueprints in the current conversation by their keys. Only blueprints with agentCanEnable=true can be enabled. Always call [query-blueprints] first to discover available blueprint keys.',
|
|
30
|
+
icon: 'ph--plugs-connected--regular',
|
|
28
31
|
},
|
|
29
32
|
input: Schema.Struct({
|
|
30
33
|
keys: Schema.Array(Schema.String).annotations({
|
|
@@ -33,7 +36,7 @@ export const EnableBlueprints = Operation.make({
|
|
|
33
36
|
}),
|
|
34
37
|
}),
|
|
35
38
|
output: Schema.Struct({
|
|
36
|
-
enabled: Schema.Array(Blueprint.Blueprint),
|
|
39
|
+
enabled: Schema.Array(Type.getSchema(Blueprint.Blueprint)),
|
|
37
40
|
rejected: Schema.Array(
|
|
38
41
|
Schema.Struct({
|
|
39
42
|
key: Schema.String,
|
|
@@ -41,17 +44,5 @@ export const EnableBlueprints = Operation.make({
|
|
|
41
44
|
}),
|
|
42
45
|
),
|
|
43
46
|
}),
|
|
44
|
-
services: [
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
export const UpdateBlueprints = Operation.make({
|
|
48
|
-
meta: {
|
|
49
|
-
key: 'org.dxos.function.blueprint-manager.refresh-blueprints',
|
|
50
|
-
name: 'Refresh blueprints',
|
|
51
|
-
description:
|
|
52
|
-
'Updates the blueprints saved to the database with the latest version from the registry. Sometimes blueprints in the database can become outdated. Use this function to pull in the latest versions.',
|
|
53
|
-
},
|
|
54
|
-
input: Schema.Struct({}),
|
|
55
|
-
output: Schema.Void,
|
|
56
|
-
services: [Blueprint.RegistryService, Database.Service],
|
|
47
|
+
services: [Registry.Service, Database.Service, AiContext.Service],
|
|
57
48
|
});
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Either from 'effect/Either';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
+
import { AiContext } from '@dxos/assistant';
|
|
8
9
|
import { Blueprint, Operation } from '@dxos/compute';
|
|
9
10
|
import { Ref } from '@dxos/echo';
|
|
10
11
|
|
|
@@ -13,17 +14,19 @@ import { EnableBlueprints } from './definitions';
|
|
|
13
14
|
export default EnableBlueprints.pipe(
|
|
14
15
|
Operation.withHandler(
|
|
15
16
|
Effect.fnUntraced(function* ({ keys }) {
|
|
16
|
-
const registry = yield* Blueprint.RegistryService;
|
|
17
17
|
const enabled: Blueprint.Blueprint[] = [];
|
|
18
18
|
const rejected: { key: string; reason: string }[] = [];
|
|
19
19
|
|
|
20
20
|
for (const key of keys) {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
const result = yield* Blueprint.resolve(key).pipe(
|
|
22
|
+
Effect.mapError(() => ({ key, reason: 'Blueprint not found in registry.' })),
|
|
23
|
+
Effect.either,
|
|
24
|
+
);
|
|
25
|
+
if (Either.isLeft(result)) {
|
|
26
|
+
rejected.push(result.left);
|
|
24
27
|
continue;
|
|
25
28
|
}
|
|
26
|
-
if (!
|
|
29
|
+
if (!result.right.agentCanEnable) {
|
|
27
30
|
rejected.push({ key, reason: 'Blueprint does not allow agent auto-enable (agentCanEnable is not set).' });
|
|
28
31
|
continue;
|
|
29
32
|
}
|
|
@@ -32,7 +35,7 @@ export default EnableBlueprints.pipe(
|
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
if (enabled.length > 0) {
|
|
35
|
-
yield*
|
|
38
|
+
yield* AiContext.Service.bindContext({
|
|
36
39
|
blueprints: enabled.map(Ref.make),
|
|
37
40
|
});
|
|
38
41
|
}
|
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Blueprint, Operation } from '@dxos/compute';
|
|
8
|
+
import { Filter, Registry } from '@dxos/echo';
|
|
8
9
|
|
|
9
10
|
import { QueryBlueprints } from './definitions';
|
|
10
11
|
|
|
11
12
|
export default QueryBlueprints.pipe(
|
|
12
13
|
Operation.withHandler(
|
|
13
14
|
Effect.fnUntraced(function* () {
|
|
14
|
-
const
|
|
15
|
-
return
|
|
15
|
+
const blueprints = yield* Registry.runQuery(Filter.type(Blueprint.Blueprint));
|
|
16
|
+
return blueprints.slice().sort(({ name: a }, { name: b }) => a.localeCompare(b));
|
|
16
17
|
}),
|
|
17
18
|
),
|
|
18
19
|
);
|