@dxos/assistant-toolkit 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef
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/dist/lib/neutral/{add-artifact-5TOKSVLY.mjs → add-artifact-BA5WQRDU.mjs} +7 -7
- package/dist/lib/neutral/add-artifact-BA5WQRDU.mjs.map +7 -0
- package/dist/lib/neutral/agent-M2EW5M36.mjs +65 -0
- package/dist/lib/neutral/agent-M2EW5M36.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-V77TCYSP.mjs → chunk-CLHVRIYF.mjs} +76 -29
- package/dist/lib/neutral/chunk-CLHVRIYF.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-IVXBQQDJ.mjs → chunk-CVUA23QI.mjs} +2 -2
- package/dist/lib/neutral/chunk-CVUA23QI.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-MEQYXSDY.mjs → chunk-D5MG5OKX.mjs} +5 -6
- package/dist/lib/neutral/chunk-D5MG5OKX.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-B5NOGNUG.mjs → chunk-E2XRNXWP.mjs} +7 -10
- package/dist/lib/neutral/chunk-E2XRNXWP.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-BO4ZVH7M.mjs → chunk-EJAQUAKM.mjs} +3 -3
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-PWGX4QYR.mjs → chunk-J37DYY7A.mjs} +7 -9
- package/dist/lib/neutral/chunk-J37DYY7A.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-TCRQCJEJ.mjs → chunk-JCYLFOFK.mjs} +9 -9
- package/dist/lib/neutral/chunk-JCYLFOFK.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-YBTLIXQK.mjs → chunk-KGU725LW.mjs} +2 -2
- package/dist/lib/neutral/{chunk-YBTLIXQK.mjs.map → chunk-KGU725LW.mjs.map} +3 -3
- package/dist/lib/neutral/{chunk-VD2WAUU2.mjs → chunk-KY2TIPJ5.mjs} +47 -17
- package/dist/lib/neutral/chunk-KY2TIPJ5.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-B35UIL3R.mjs → chunk-MMTKJBB5.mjs} +3 -3
- package/dist/lib/neutral/chunk-MMTKJBB5.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-DV5DCOUE.mjs → chunk-NR3GTWRC.mjs} +3 -2
- package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-6DPL2YY5.mjs → chunk-TO5IX24K.mjs} +3 -4
- package/dist/lib/neutral/chunk-TO5IX24K.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-MEZ4UFR6.mjs → chunk-WLR3BGO4.mjs} +2 -2
- package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-AGG6OZNB.mjs → chunk-ZFXLTBZG.mjs} +4 -5
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +7 -0
- package/dist/lib/neutral/{context-add-QAHU6I24.mjs → context-add-IIDPRRVB.mjs} +3 -3
- package/dist/lib/neutral/{context-add-QAHU6I24.mjs.map → context-add-IIDPRRVB.mjs.map} +1 -1
- package/dist/lib/neutral/{context-remove-VMZPMZ4E.mjs → context-remove-RDYV4PD4.mjs} +3 -3
- package/dist/lib/neutral/{context-remove-VMZPMZ4E.mjs.map → context-remove-RDYV4PD4.mjs.map} +1 -1
- package/dist/lib/neutral/{create-project-SI5SZ7LJ.mjs → create-project-GLDEAWTT.mjs} +10 -11
- package/dist/lib/neutral/create-project-GLDEAWTT.mjs.map +7 -0
- package/dist/lib/neutral/{delete-LHMZDJFA.mjs → delete-J3PMWP7Z.mjs} +4 -4
- package/dist/lib/neutral/delete-J3PMWP7Z.mjs.map +7 -0
- package/dist/lib/neutral/{enable-blueprints-4UMPKGUD.mjs → enable-blueprints-LBDZH2CY.mjs} +3 -4
- package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs.map +7 -0
- package/dist/lib/neutral/{fetch-TLKREIZA.mjs → fetch-KHMHV7JR.mjs} +3 -3
- package/dist/lib/neutral/{fetch-TLKREIZA.mjs.map → fetch-KHMHV7JR.mjs.map} +1 -1
- package/dist/lib/neutral/{fetch-messages-AFX7ZAVE.mjs → fetch-messages-PWGUG5G3.mjs} +8 -23
- package/dist/lib/neutral/fetch-messages-PWGUG5G3.mjs.map +7 -0
- package/dist/lib/neutral/{get-context-57JQM4HZ.mjs → get-context-B55SX5Y4.mjs} +7 -7
- package/dist/lib/neutral/get-context-B55SX5Y4.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +787 -131
- package/dist/lib/neutral/index.mjs.map +4 -4
- package/dist/lib/neutral/{load-ZTOGVHWP.mjs → load-LI7HHVD6.mjs} +3 -3
- package/dist/lib/neutral/{load-ZTOGVHWP.mjs.map → load-LI7HHVD6.mjs.map} +3 -3
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/{object-create-7QCGL56E.mjs → object-create-52Z7YKIA.mjs} +4 -12
- package/dist/lib/neutral/object-create-52Z7YKIA.mjs.map +7 -0
- package/dist/lib/neutral/{object-delete-KXBWC4Q4.mjs → object-delete-I266YAXI.mjs} +3 -3
- package/dist/lib/neutral/object-delete-I266YAXI.mjs.map +7 -0
- package/dist/lib/neutral/{object-update-B7RDX3JC.mjs → object-update-HY4GI7LA.mjs} +4 -4
- package/dist/lib/neutral/object-update-HY4GI7LA.mjs.map +7 -0
- package/dist/lib/neutral/{project-3J3AJCJK.mjs → project-2YBPW5N7.mjs} +6 -6
- package/dist/lib/neutral/{project-rules-NO3QVDZS.mjs → project-rules-XUBEPDP6.mjs} +7 -7
- package/dist/lib/neutral/project-rules-XUBEPDP6.mjs.map +7 -0
- package/dist/lib/neutral/{prompt-K5CIRXOD.mjs → prompt-2WZQERT4.mjs} +39 -65
- package/dist/lib/neutral/prompt-2WZQERT4.mjs.map +7 -0
- package/dist/lib/neutral/{qualifier-KSGP4CFL.mjs → qualifier-2AC2ICOB.mjs} +12 -28
- package/dist/lib/neutral/qualifier-2AC2ICOB.mjs.map +7 -0
- package/dist/lib/neutral/{query-FMGIPWJG.mjs → query-B3NOYFCK.mjs} +4 -5
- package/dist/lib/neutral/query-B3NOYFCK.mjs.map +7 -0
- package/dist/lib/neutral/{query-MN5B3MQF.mjs → query-U56GNEV6.mjs} +4 -4
- package/dist/lib/neutral/query-U56GNEV6.mjs.map +7 -0
- package/dist/lib/neutral/{query-blueprints-EKHEZAGD.mjs → query-blueprints-KXADGHSA.mjs} +3 -4
- package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs.map +7 -0
- package/dist/lib/neutral/{relation-create-FSHBM5CJ.mjs → relation-create-Z3NGW4VU.mjs} +4 -12
- package/dist/lib/neutral/relation-create-Z3NGW4VU.mjs.map +7 -0
- package/dist/lib/neutral/{relation-delete-CYYQUIZY.mjs → relation-delete-LXY7W2YO.mjs} +3 -3
- package/dist/lib/neutral/relation-delete-LXY7W2YO.mjs.map +7 -0
- package/dist/lib/neutral/{save-ZWWNTBOD.mjs → save-GWAPLT3Z.mjs} +4 -4
- package/dist/lib/neutral/save-GWAPLT3Z.mjs.map +7 -0
- package/dist/lib/neutral/{schema-add-RVV364G6.mjs → schema-add-4TXJO2V7.mjs} +3 -3
- package/dist/lib/neutral/schema-add-4TXJO2V7.mjs.map +7 -0
- package/dist/lib/neutral/{schema-list-DVKEWYIU.mjs → schema-list-PJS5AFZ3.mjs} +13 -5
- package/dist/lib/neutral/schema-list-PJS5AFZ3.mjs.map +7 -0
- package/dist/lib/neutral/{sync-issues-BBAMXSZN.mjs → sync-issues-LOLHZNFL.mjs} +8 -20
- package/dist/lib/neutral/sync-issues-LOLHZNFL.mjs.map +7 -0
- package/dist/lib/neutral/{sync-triggers-6EXPBHIQ.mjs → sync-triggers-EYJM4QWR.mjs} +39 -20
- package/dist/lib/neutral/sync-triggers-EYJM4QWR.mjs.map +7 -0
- package/dist/lib/neutral/{tag-add-OUDUBR3E.mjs → tag-add-5NOHUTIE.mjs} +4 -4
- package/dist/lib/neutral/tag-add-5NOHUTIE.mjs.map +7 -0
- package/dist/lib/neutral/{tag-remove-DI3ZSLFK.mjs → tag-remove-QTKYDJAW.mjs} +4 -4
- package/dist/lib/neutral/tag-remove-QTKYDJAW.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +7 -12
- package/dist/lib/neutral/testing/index.mjs.map +3 -3
- package/dist/lib/neutral/{update-blueprints-ZNWR7BBN.mjs → update-blueprints-N2AK2VUR.mjs} +3 -4
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs.map +7 -0
- package/dist/lib/neutral/{update-tasks-3YZ3YXIU.mjs → update-tasks-ML2FCYU5.mjs} +7 -7
- package/dist/lib/neutral/update-tasks-ML2FCYU5.mjs.map +7 -0
- package/dist/types/src/blueprints/automation/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +11 -12
- 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 +6 -7
- 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 +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 +5 -6
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +2 -3
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +1 -1
- package/dist/types/src/blueprints/browser/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/context-add.d.ts +1 -1
- 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 +1 -1
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/definitions.d.ts +5 -5
- package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/load.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/object-create.d.ts +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-delete.d.ts.map +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 +3 -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 +2 -2
- 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/relation-delete.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/schema-add.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 +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 +1 -1
- 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 +1 -1
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts +2 -3
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts +2 -3
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/definitions.d.ts +2 -3
- package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts +2 -3
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +0 -3
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts +2 -3
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +2 -3
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts +4 -4
- 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/memory/functions/delete.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/functions/query.d.ts +2 -2
- package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/functions/save.d.ts +2 -2
- package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts +3 -3
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +1 -1
- 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 +3 -3
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +2 -2
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/agent.d.ts +1 -1
- package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/definitions.d.ts +46 -39
- package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/get-context.d.ts +4 -4
- package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts +20 -16
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +20 -17
- 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 +36 -29
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +17 -13
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -1
- package/dist/types/src/blueprints/testing.d.ts +5 -13
- package/dist/types/src/blueprints/testing.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +1 -1
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +1 -1
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/websearch/functions/index.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/toolkit.d.ts +2 -2
- package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -1
- package/dist/types/src/crud/graph.d.ts +1 -1
- package/dist/types/src/crud/graph.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +6 -6
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/functions/agent/definitions.d.ts +15 -15
- package/dist/types/src/functions/agent/definitions.d.ts.map +1 -1
- package/dist/types/src/functions/agent/index.d.ts +1 -1
- package/dist/types/src/functions/agent/index.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.d.ts +1 -1
- package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +0 -2
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/sync/sync.d.ts.map +1 -1
- package/dist/types/src/testing/plugins.d.ts.map +1 -1
- package/dist/types/src/types/Agent.d.ts +19 -15
- package/dist/types/src/types/Agent.d.ts.map +1 -1
- package/dist/types/src/types/Chat.d.ts +8 -4
- package/dist/types/src/types/Chat.d.ts.map +1 -1
- package/dist/types/src/types/McpServer.d.ts +18 -0
- package/dist/types/src/types/McpServer.d.ts.map +1 -0
- package/dist/types/src/types/Memory.d.ts +1 -1
- package/dist/types/src/types/Memory.d.ts.map +1 -1
- package/dist/types/src/types/Plan.d.ts +17 -14
- package/dist/types/src/types/Plan.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util/graphql.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -30
- package/src/blueprints/automation/blueprint.ts +2 -5
- package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -1
- package/src/blueprints/blueprint-manager/blueprint.test.ts +59 -37
- package/src/blueprints/blueprint-manager/blueprint.ts +2 -3
- package/src/blueprints/blueprint-manager/functions/definitions.ts +2 -3
- package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +1 -2
- package/src/blueprints/blueprint-manager/functions/index.ts +1 -1
- package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +1 -2
- package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +1 -2
- package/src/blueprints/browser/blueprint.test.ts +6 -8
- package/src/blueprints/browser/blueprint.ts +2 -3
- package/src/blueprints/database/blueprint.conversations.json +1 -1
- package/src/blueprints/database/blueprint.test.ts +49 -8
- package/src/blueprints/database/blueprint.ts +2 -3
- package/src/blueprints/database/functions/context-add.ts +1 -1
- package/src/blueprints/database/functions/context-remove.ts +1 -1
- package/src/blueprints/database/functions/definitions.ts +1 -1
- package/src/blueprints/database/functions/index.ts +1 -1
- package/src/blueprints/database/functions/load.ts +1 -1
- package/src/blueprints/database/functions/object-create.ts +1 -1
- package/src/blueprints/database/functions/object-delete.ts +1 -1
- package/src/blueprints/database/functions/object-update.ts +2 -2
- package/src/blueprints/database/functions/query.ts +2 -3
- package/src/blueprints/database/functions/relation-create.ts +1 -1
- package/src/blueprints/database/functions/relation-delete.ts +1 -1
- package/src/blueprints/database/functions/schema-add.ts +1 -1
- package/src/blueprints/database/functions/schema-list.ts +16 -10
- package/src/blueprints/database/functions/tag-add.ts +2 -2
- package/src/blueprints/database/functions/tag-remove.ts +2 -2
- package/src/blueprints/discord/blueprint.ts +2 -3
- package/src/blueprints/discord/functions/definitions.ts +2 -3
- package/src/blueprints/discord/functions/fetch-messages.test.ts +15 -26
- package/src/blueprints/discord/functions/fetch-messages.ts +4 -5
- package/src/blueprints/discord/functions/index.ts +1 -1
- package/src/blueprints/github/functions/definitions.ts +2 -3
- package/src/blueprints/github/functions/fetch-prs.ts +3 -3
- package/src/blueprints/github/functions/index.ts +1 -1
- package/src/blueprints/index.ts +0 -3
- package/src/blueprints/linear/blueprint.ts +2 -3
- package/src/blueprints/linear/functions/definitions.ts +2 -3
- package/src/blueprints/linear/functions/index.ts +1 -1
- package/src/blueprints/linear/functions/linear.test.ts +4 -5
- package/src/blueprints/linear/functions/sync-issues.ts +3 -3
- package/src/blueprints/memory/blueprint.conversations.json +1 -1
- package/src/blueprints/memory/blueprint.test.ts +5 -5
- package/src/blueprints/memory/blueprint.ts +3 -4
- package/src/blueprints/memory/functions/definitions.ts +1 -1
- package/src/blueprints/memory/functions/delete.ts +1 -1
- package/src/blueprints/memory/functions/index.ts +1 -1
- package/src/blueprints/memory/functions/query.ts +1 -1
- package/src/blueprints/memory/functions/save.ts +1 -1
- package/src/blueprints/planning/blueprint.ts +2 -3
- package/src/blueprints/planning/functions/definitions.ts +1 -1
- package/src/blueprints/planning/functions/index.ts +1 -1
- package/src/blueprints/planning/functions/update-tasks.ts +2 -2
- package/src/blueprints/project/blueprint.conversations.json +1 -1
- package/src/blueprints/project/blueprint.test.ts +127 -36
- package/src/blueprints/project/blueprint.ts +6 -7
- package/src/blueprints/project/functions/add-artifact.ts +2 -2
- package/src/blueprints/project/functions/agent.ts +15 -37
- package/src/blueprints/project/functions/definitions.ts +5 -8
- package/src/blueprints/project/functions/get-context.ts +3 -3
- package/src/blueprints/project/functions/index.ts +1 -1
- package/src/blueprints/project/functions/qualifier.ts +5 -5
- package/src/blueprints/project-wizard/blueprint.ts +12 -8
- package/src/blueprints/project-wizard/functions/create-project.ts +3 -4
- package/src/blueprints/project-wizard/functions/definitions.ts +3 -4
- package/src/blueprints/project-wizard/functions/index.ts +1 -1
- package/src/blueprints/project-wizard/functions/project-rules.ts +2 -2
- package/src/blueprints/project-wizard/functions/sync-triggers.ts +34 -15
- package/src/blueprints/testing.ts +7 -21
- package/src/blueprints/websearch/blueprint.conversations.json +1 -1
- package/src/blueprints/websearch/blueprint.test.ts +4 -4
- package/src/blueprints/websearch/blueprint.ts +2 -3
- package/src/blueprints/websearch/functions/definitions.ts +1 -1
- package/src/blueprints/websearch/functions/fetch.ts +1 -1
- package/src/blueprints/websearch/functions/index.ts +1 -1
- package/src/blueprints/websearch/index.ts +1 -1
- package/src/blueprints/websearch/toolkit.ts +2 -2
- package/src/crud/graph.test.ts +10 -12
- package/src/functions/agent/definitions.ts +5 -7
- package/src/functions/agent/index.ts +1 -1
- package/src/functions/agent/prompt.conversations.json +1 -1
- package/src/functions/agent/prompt.test.ts +5 -6
- package/src/functions/agent/prompt.ts +44 -42
- package/src/functions/index.ts +0 -2
- package/src/sync/sync.ts +18 -7
- package/src/testing/plugins.tsx +9 -7
- package/src/types/Agent.ts +51 -20
- package/src/types/Chat.ts +1 -0
- package/src/types/McpServer.ts +37 -0
- package/src/types/Memory.ts +2 -1
- package/src/types/Plan.ts +2 -2
- package/src/types/index.ts +1 -0
- package/dist/lib/neutral/add-artifact-5TOKSVLY.mjs.map +0 -7
- package/dist/lib/neutral/agent-SZV3Q7CN.mjs +0 -97
- package/dist/lib/neutral/agent-SZV3Q7CN.mjs.map +0 -7
- package/dist/lib/neutral/chunk-6DPL2YY5.mjs.map +0 -7
- package/dist/lib/neutral/chunk-6FL4C6KD.mjs +0 -86
- package/dist/lib/neutral/chunk-6FL4C6KD.mjs.map +0 -7
- package/dist/lib/neutral/chunk-AGG6OZNB.mjs.map +0 -7
- package/dist/lib/neutral/chunk-B35UIL3R.mjs.map +0 -7
- package/dist/lib/neutral/chunk-B5NOGNUG.mjs.map +0 -7
- package/dist/lib/neutral/chunk-BO4ZVH7M.mjs.map +0 -7
- package/dist/lib/neutral/chunk-DV5DCOUE.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ILZ2ODWC.mjs +0 -95
- package/dist/lib/neutral/chunk-ILZ2ODWC.mjs.map +0 -7
- package/dist/lib/neutral/chunk-IVXBQQDJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-LI6VMCJW.mjs +0 -27
- package/dist/lib/neutral/chunk-LI6VMCJW.mjs.map +0 -7
- package/dist/lib/neutral/chunk-MEQYXSDY.mjs.map +0 -7
- package/dist/lib/neutral/chunk-MEZ4UFR6.mjs.map +0 -7
- package/dist/lib/neutral/chunk-PWGX4QYR.mjs.map +0 -7
- package/dist/lib/neutral/chunk-RW4H4TKD.mjs +0 -694
- package/dist/lib/neutral/chunk-RW4H4TKD.mjs.map +0 -7
- package/dist/lib/neutral/chunk-TCRQCJEJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-V77TCYSP.mjs.map +0 -7
- package/dist/lib/neutral/chunk-VD2WAUU2.mjs.map +0 -7
- package/dist/lib/neutral/chunk-VDEDVOS6.mjs +0 -39
- package/dist/lib/neutral/chunk-VDEDVOS6.mjs.map +0 -7
- package/dist/lib/neutral/chunk-XT5ZSUS6.mjs +0 -363
- package/dist/lib/neutral/chunk-XT5ZSUS6.mjs.map +0 -7
- package/dist/lib/neutral/create-P6I22VS5.mjs +0 -23
- package/dist/lib/neutral/create-P6I22VS5.mjs.map +0 -7
- package/dist/lib/neutral/create-project-SI5SZ7LJ.mjs.map +0 -7
- package/dist/lib/neutral/delete-LHMZDJFA.mjs.map +0 -7
- package/dist/lib/neutral/document-create-53ZVNGFR.mjs +0 -57
- package/dist/lib/neutral/document-create-53ZVNGFR.mjs.map +0 -7
- package/dist/lib/neutral/enable-blueprints-4UMPKGUD.mjs.map +0 -7
- package/dist/lib/neutral/entity-extraction-B2CTBGNA.mjs +0 -196
- package/dist/lib/neutral/entity-extraction-B2CTBGNA.mjs.map +0 -7
- package/dist/lib/neutral/exa-P4G3DCYB.mjs +0 -28
- package/dist/lib/neutral/exa-P4G3DCYB.mjs.map +0 -7
- package/dist/lib/neutral/fetch-messages-AFX7ZAVE.mjs.map +0 -7
- package/dist/lib/neutral/get-context-57JQM4HZ.mjs.map +0 -7
- package/dist/lib/neutral/mock-2ARYZ54S.mjs +0 -556
- package/dist/lib/neutral/mock-2ARYZ54S.mjs.map +0 -7
- package/dist/lib/neutral/object-create-7QCGL56E.mjs.map +0 -7
- package/dist/lib/neutral/object-delete-KXBWC4Q4.mjs.map +0 -7
- package/dist/lib/neutral/object-update-B7RDX3JC.mjs.map +0 -7
- package/dist/lib/neutral/project-rules-NO3QVDZS.mjs.map +0 -7
- package/dist/lib/neutral/prompt-K5CIRXOD.mjs.map +0 -7
- package/dist/lib/neutral/qualifier-KSGP4CFL.mjs.map +0 -7
- package/dist/lib/neutral/query-FMGIPWJG.mjs.map +0 -7
- package/dist/lib/neutral/query-MN5B3MQF.mjs.map +0 -7
- package/dist/lib/neutral/query-blueprints-EKHEZAGD.mjs.map +0 -7
- package/dist/lib/neutral/read-JJN7YXHI.mjs +0 -19
- package/dist/lib/neutral/read-JJN7YXHI.mjs.map +0 -7
- package/dist/lib/neutral/relation-create-FSHBM5CJ.mjs.map +0 -7
- package/dist/lib/neutral/relation-delete-CYYQUIZY.mjs.map +0 -7
- package/dist/lib/neutral/research-7JQEX7MU.mjs +0 -109
- package/dist/lib/neutral/research-7JQEX7MU.mjs.map +0 -7
- package/dist/lib/neutral/save-ZWWNTBOD.mjs.map +0 -7
- package/dist/lib/neutral/schema-add-RVV364G6.mjs.map +0 -7
- package/dist/lib/neutral/schema-list-DVKEWYIU.mjs.map +0 -7
- package/dist/lib/neutral/sync-issues-BBAMXSZN.mjs.map +0 -7
- package/dist/lib/neutral/sync-triggers-6EXPBHIQ.mjs.map +0 -7
- package/dist/lib/neutral/tag-add-OUDUBR3E.mjs.map +0 -7
- package/dist/lib/neutral/tag-remove-DI3ZSLFK.mjs.map +0 -7
- package/dist/lib/neutral/update-J64AYUS5.mjs +0 -20
- package/dist/lib/neutral/update-J64AYUS5.mjs.map +0 -7
- package/dist/lib/neutral/update-blueprints-ZNWR7BBN.mjs.map +0 -7
- package/dist/lib/neutral/update-tasks-3YZ3YXIU.mjs.map +0 -7
- package/dist/types/src/blueprints/design/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/design/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/design/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/index.d.ts +0 -2
- package/dist/types/src/blueprints/design/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/markdown/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/create.d.ts +0 -8
- package/dist/types/src/blueprints/markdown/functions/create.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/definitions.d.ts +0 -45
- package/dist/types/src/blueprints/markdown/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/index.d.ts +0 -4
- package/dist/types/src/blueprints/markdown/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/read.d.ts +0 -17
- package/dist/types/src/blueprints/markdown/functions/read.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/update.d.ts +0 -16
- package/dist/types/src/blueprints/markdown/functions/update.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/index.d.ts +0 -3
- package/dist/types/src/blueprints/markdown/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/planning-old/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/planning-old/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/definitions.d.ts +0 -31
- package/dist/types/src/blueprints/planning-old/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/index.d.ts +0 -4
- package/dist/types/src/blueprints/planning-old/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/read.d.ts +0 -17
- package/dist/types/src/blueprints/planning-old/functions/read.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts +0 -74
- package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts +0 -2
- package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/update.d.ts +0 -19
- package/dist/types/src/blueprints/planning-old/functions/update.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/index.d.ts +0 -3
- package/dist/types/src/blueprints/planning-old/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/research/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/research/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/definitions.d.ts +0 -21
- package/dist/types/src/blueprints/research/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/document-create.d.ts +0 -12
- package/dist/types/src/blueprints/research/functions/document-create.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/index.d.ts +0 -4
- package/dist/types/src/blueprints/research/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/research.d.ts +0 -18
- package/dist/types/src/blueprints/research/functions/research.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/research.test.d.ts +0 -2
- package/dist/types/src/blueprints/research/functions/research.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/index.d.ts +0 -4
- package/dist/types/src/blueprints/research/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts +0 -24
- package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/types/index.d.ts +0 -7
- package/dist/types/src/blueprints/research/types/index.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/definitions.d.ts +0 -182
- package/dist/types/src/functions/entity-extraction/definitions.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +0 -4
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts +0 -2
- package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/index.d.ts +0 -4
- package/dist/types/src/functions/entity-extraction/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts +0 -38
- package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts +0 -37
- package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts +0 -58
- package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/index.d.ts +0 -3
- package/dist/types/src/functions/exa/data/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/definitions.d.ts +0 -9
- package/dist/types/src/functions/exa/definitions.d.ts.map +0 -1
- package/dist/types/src/functions/exa/exa.d.ts +0 -7
- package/dist/types/src/functions/exa/exa.d.ts.map +0 -1
- package/dist/types/src/functions/exa/index.d.ts +0 -4
- package/dist/types/src/functions/exa/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/mock.d.ts +0 -6
- package/dist/types/src/functions/exa/mock.d.ts.map +0 -1
- package/src/blueprints/browser/blueprint.conversations.json +0 -1
- package/src/blueprints/design/blueprint.test.ts +0 -97
- package/src/blueprints/design/blueprint.ts +0 -41
- package/src/blueprints/design/index.ts +0 -5
- package/src/blueprints/markdown/blueprint.ts +0 -36
- package/src/blueprints/markdown/functions/create.ts +0 -20
- package/src/blueprints/markdown/functions/definitions.ts +0 -80
- package/src/blueprints/markdown/functions/index.ts +0 -13
- package/src/blueprints/markdown/functions/read.ts +0 -22
- package/src/blueprints/markdown/functions/update.ts +0 -22
- package/src/blueprints/markdown/index.ts +0 -11
- package/src/blueprints/planning-old/blueprint.test.ts +0 -122
- package/src/blueprints/planning-old/blueprint.ts +0 -106
- package/src/blueprints/planning-old/functions/definitions.ts +0 -53
- package/src/blueprints/planning-old/functions/index.ts +0 -12
- package/src/blueprints/planning-old/functions/read.ts +0 -24
- package/src/blueprints/planning-old/functions/task-list.test.ts +0 -99
- package/src/blueprints/planning-old/functions/task-list.ts +0 -165
- package/src/blueprints/planning-old/functions/update.ts +0 -31
- package/src/blueprints/planning-old/index.ts +0 -6
- package/src/blueprints/research/blueprint.test.ts +0 -7
- package/src/blueprints/research/blueprint.ts +0 -61
- package/src/blueprints/research/functions/definitions.ts +0 -87
- package/src/blueprints/research/functions/document-create.ts +0 -50
- package/src/blueprints/research/functions/index.ts +0 -12
- package/src/blueprints/research/functions/research-instructions.tpl +0 -106
- package/src/blueprints/research/functions/research.conversations.json +0 -1
- package/src/blueprints/research/functions/research.test.ts +0 -150
- package/src/blueprints/research/functions/research.ts +0 -137
- package/src/blueprints/research/index.ts +0 -7
- package/src/blueprints/research/types/ResearchGraph.ts +0 -62
- package/src/blueprints/research/types/index.ts +0 -32
- package/src/functions/entity-extraction/definitions.ts +0 -44
- package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -1
- package/src/functions/entity-extraction/entity-extraction.test.ts +0 -74
- package/src/functions/entity-extraction/entity-extraction.ts +0 -159
- package/src/functions/entity-extraction/index.ts +0 -9
- package/src/functions/exa/data/exa-search-1748337321991.ts +0 -131
- package/src/functions/exa/data/exa-search-1748337331526.ts +0 -144
- package/src/functions/exa/data/exa-search-1748337344119.ts +0 -133
- package/src/functions/exa/data/index.ts +0 -11
- package/src/functions/exa/definitions.ts +0 -37
- package/src/functions/exa/exa.ts +0 -32
- package/src/functions/exa/index.ts +0 -12
- package/src/functions/exa/mock.ts +0 -62
- /package/dist/lib/neutral/{project-3J3AJCJK.mjs.map → project-2YBPW5N7.mjs.map} +0 -0
|
@@ -7,19 +7,20 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import * as Exit from 'effect/Exit';
|
|
8
8
|
|
|
9
9
|
import { MemoizedAiService } from '@dxos/ai/testing';
|
|
10
|
-
import {
|
|
11
|
-
import { AssistantTestLayerWithTriggers } from '@dxos/assistant/testing';
|
|
12
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
10
|
+
import { AiSession } from '@dxos/assistant';
|
|
13
11
|
import { SpaceProperties } from '@dxos/client-protocol';
|
|
14
|
-
import {
|
|
12
|
+
import { Blueprint, Trigger, Operation, OperationHandlerSet } from '@dxos/compute';
|
|
13
|
+
import { Database, Feed, Filter, Obj, Query, Ref } from '@dxos/echo';
|
|
15
14
|
import { Collection } from '@dxos/echo';
|
|
16
15
|
import { acquireReleaseResource } from '@dxos/effect';
|
|
17
16
|
import { TestHelpers } from '@dxos/effect/testing';
|
|
18
|
-
import { QueueService
|
|
17
|
+
import { QueueService } from '@dxos/functions';
|
|
19
18
|
import { TriggerDispatcher } from '@dxos/functions-runtime';
|
|
19
|
+
import { AssistantTestLayerWithTriggers } from '@dxos/functions-runtime/testing';
|
|
20
20
|
import { invariant } from '@dxos/invariant';
|
|
21
21
|
import { ObjectId } from '@dxos/keys';
|
|
22
|
-
import {
|
|
22
|
+
import { MarkdownBlueprint } from '@dxos/plugin-markdown/blueprints';
|
|
23
|
+
import { MarkdownOperationHandlerSet } from '@dxos/plugin-markdown/operations';
|
|
23
24
|
import { WithProperties } from '@dxos/plugin-markdown/testing';
|
|
24
25
|
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
25
26
|
import { Text } from '@dxos/schema';
|
|
@@ -27,8 +28,8 @@ import { Message } from '@dxos/types';
|
|
|
27
28
|
import { trim } from '@dxos/util';
|
|
28
29
|
|
|
29
30
|
import { Chat, Plan, Agent } from '../../types';
|
|
30
|
-
import { MarkdownBlueprint, MarkdownHandlers } from '../markdown';
|
|
31
31
|
import { PlanningBlueprint, PlanningHandlers } from '../planning';
|
|
32
|
+
import { AgentWizardHandlers, SyncTriggers } from '../project-wizard';
|
|
32
33
|
import AgentBlueprintDef from './blueprint';
|
|
33
34
|
import { AgentWorker, AgentBlueprintHandlers } from './functions';
|
|
34
35
|
|
|
@@ -36,7 +37,12 @@ ObjectId.dangerouslyDisableRandomness();
|
|
|
36
37
|
|
|
37
38
|
const TestLayer = AssistantTestLayerWithTriggers({
|
|
38
39
|
aiServicePreset: 'edge-remote',
|
|
39
|
-
operationHandlers: OperationHandlerSet.merge(
|
|
40
|
+
operationHandlers: OperationHandlerSet.merge(
|
|
41
|
+
AgentBlueprintHandlers,
|
|
42
|
+
AgentWizardHandlers,
|
|
43
|
+
MarkdownOperationHandlerSet,
|
|
44
|
+
PlanningHandlers,
|
|
45
|
+
),
|
|
40
46
|
types: [
|
|
41
47
|
Agent.Agent,
|
|
42
48
|
Plan.Plan,
|
|
@@ -69,7 +75,7 @@ describe('Agent', () => {
|
|
|
69
75
|
const agent = yield* Agent.makeInitialized(
|
|
70
76
|
{
|
|
71
77
|
name: 'Test Project',
|
|
72
|
-
|
|
78
|
+
instructions: 'A test project for adding artifacts.',
|
|
73
79
|
blueprints: [Ref.make(MarkdownBlueprint.make())],
|
|
74
80
|
},
|
|
75
81
|
blueprint,
|
|
@@ -89,14 +95,16 @@ describe('Agent', () => {
|
|
|
89
95
|
const chatFeed = agent.chat?.target?.feed?.target;
|
|
90
96
|
invariant(chatFeed, 'Agent chat feed not found.');
|
|
91
97
|
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
92
|
-
const
|
|
93
|
-
yield* Effect.promise(() =>
|
|
98
|
+
const session = yield* acquireReleaseResource(() => new AiSession({ feed: chatFeed, runtime }));
|
|
99
|
+
yield* Effect.promise(() => session.context.open());
|
|
94
100
|
|
|
95
101
|
const documentDxn = Obj.getDXN(document);
|
|
96
|
-
yield*
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
yield* session
|
|
103
|
+
.createRequest({
|
|
104
|
+
system: SYSTEM,
|
|
105
|
+
prompt: `Please add the document ${documentDxn} as an artifact named "My Test Document" to this agent.`,
|
|
106
|
+
})
|
|
107
|
+
.pipe(Effect.provide(session.makeToolExecutionServices()));
|
|
100
108
|
|
|
101
109
|
expect(agent.artifacts).toHaveLength(1);
|
|
102
110
|
expect(agent.artifacts[0].name).toBe('My Test Document');
|
|
@@ -116,7 +124,7 @@ describe('Agent', () => {
|
|
|
116
124
|
const agent = yield* Agent.makeInitialized(
|
|
117
125
|
{
|
|
118
126
|
name: 'Shopping list',
|
|
119
|
-
|
|
127
|
+
instructions: 'Keep a shopping list of items to buy.',
|
|
120
128
|
blueprints: [Ref.make(MarkdownBlueprint.make())],
|
|
121
129
|
},
|
|
122
130
|
blueprint,
|
|
@@ -125,13 +133,15 @@ describe('Agent', () => {
|
|
|
125
133
|
invariant(chatFeed, 'Agent chat feed not found.');
|
|
126
134
|
yield* Database.flush();
|
|
127
135
|
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
128
|
-
const
|
|
129
|
-
yield* Effect.promise(() =>
|
|
136
|
+
const session = yield* acquireReleaseResource(() => new AiSession({ feed: chatFeed, runtime }));
|
|
137
|
+
yield* Effect.promise(() => session.context.open());
|
|
130
138
|
|
|
131
|
-
yield*
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
139
|
+
yield* session
|
|
140
|
+
.createRequest({
|
|
141
|
+
system: SYSTEM,
|
|
142
|
+
prompt: `List ingredients for a scrambled eggs on a toast breakfast.`,
|
|
143
|
+
})
|
|
144
|
+
.pipe(Effect.provide(session.makeToolExecutionServices()));
|
|
135
145
|
|
|
136
146
|
console.log(yield* Effect.promise(() => dumpAgent(agent)));
|
|
137
147
|
},
|
|
@@ -148,7 +158,7 @@ describe('Agent', () => {
|
|
|
148
158
|
const agent = yield* Agent.makeInitialized(
|
|
149
159
|
{
|
|
150
160
|
name: 'Expense tracking',
|
|
151
|
-
|
|
161
|
+
instructions: trim`
|
|
152
162
|
Keep a list of expenses in a markdown document (create artifact "Expenses").
|
|
153
163
|
Process incoming emails, add the relevant ones to the list.
|
|
154
164
|
|
|
@@ -168,10 +178,7 @@ describe('Agent', () => {
|
|
|
168
178
|
yield* Database.add(
|
|
169
179
|
Trigger.make({
|
|
170
180
|
enabled: true,
|
|
171
|
-
spec:
|
|
172
|
-
kind: 'queue',
|
|
173
|
-
queue: inboxQueue.dxn.toString(),
|
|
174
|
-
},
|
|
181
|
+
spec: Trigger.specQueue(inboxQueue.dxn.toString()),
|
|
175
182
|
function: Ref.make(Operation.serialize(AgentWorker)),
|
|
176
183
|
input: {
|
|
177
184
|
agent: Ref.make(agent),
|
|
@@ -198,6 +205,48 @@ describe('Agent', () => {
|
|
|
198
205
|
MemoizedAiService.isGenerationEnabled() ? 240_000 : 30_000,
|
|
199
206
|
);
|
|
200
207
|
|
|
208
|
+
it.scoped(
|
|
209
|
+
'cron field creates a timer trigger that invokes the agent worker',
|
|
210
|
+
Effect.fnUntraced(
|
|
211
|
+
function* ({ expect }) {
|
|
212
|
+
const cron = '*/5 * * * *';
|
|
213
|
+
const agent = yield* Agent.makeInitialized(
|
|
214
|
+
{
|
|
215
|
+
name: 'Scheduled agent',
|
|
216
|
+
instructions: 'A scheduled agent that runs on a timer.',
|
|
217
|
+
blueprints: [Ref.make(MarkdownBlueprint.make())],
|
|
218
|
+
cron,
|
|
219
|
+
},
|
|
220
|
+
blueprint,
|
|
221
|
+
);
|
|
222
|
+
yield* Database.flush();
|
|
223
|
+
|
|
224
|
+
yield* Operation.invoke(SyncTriggers, { agent: Ref.make(agent) });
|
|
225
|
+
|
|
226
|
+
const triggers = yield* Database.runQuery(
|
|
227
|
+
Query.select(Filter.type(Trigger.Trigger)).debugLabel('assistant-toolkit.blueprint.test.timer'),
|
|
228
|
+
);
|
|
229
|
+
const timerTriggers = triggers.filter(
|
|
230
|
+
(trigger) => trigger.spec?.kind === 'timer' && trigger.spec.cron === cron,
|
|
231
|
+
);
|
|
232
|
+
expect(timerTriggers).toHaveLength(1);
|
|
233
|
+
|
|
234
|
+
const timerTrigger = timerTriggers[0];
|
|
235
|
+
invariant(timerTrigger.spec?.kind === 'timer');
|
|
236
|
+
expect(timerTrigger.spec.cron).toBe(cron);
|
|
237
|
+
expect(timerTrigger.enabled).toBe(true);
|
|
238
|
+
|
|
239
|
+
// Timer trigger bypasses the qualifier and points to the agent worker.
|
|
240
|
+
invariant(timerTrigger.function);
|
|
241
|
+
const operation = yield* Database.load(timerTrigger.function);
|
|
242
|
+
invariant(Obj.instanceOf(Operation.PersistentOperation, operation));
|
|
243
|
+
expect(operation.key).toBe(AgentWorker.meta.key);
|
|
244
|
+
},
|
|
245
|
+
Effect.provide(TestLayer),
|
|
246
|
+
TestHelpers.provideTestContext,
|
|
247
|
+
),
|
|
248
|
+
);
|
|
249
|
+
|
|
201
250
|
it.scoped(
|
|
202
251
|
'planning',
|
|
203
252
|
Effect.fnUntraced(
|
|
@@ -205,7 +254,7 @@ describe('Agent', () => {
|
|
|
205
254
|
const agent = yield* Agent.makeInitialized(
|
|
206
255
|
{
|
|
207
256
|
name: 'Egg making',
|
|
208
|
-
|
|
257
|
+
instructions: trim`
|
|
209
258
|
I'm testing how planning (task management) works.
|
|
210
259
|
Create tasks to make scrambled eggs.
|
|
211
260
|
|
|
@@ -237,13 +286,15 @@ describe('Agent', () => {
|
|
|
237
286
|
invariant(chatFeed, 'Agent chat feed not found.');
|
|
238
287
|
yield* Database.flush();
|
|
239
288
|
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
240
|
-
const
|
|
241
|
-
yield* Effect.promise(() =>
|
|
289
|
+
const session = yield* acquireReleaseResource(() => new AiSession({ feed: chatFeed, runtime }));
|
|
290
|
+
yield* Effect.promise(() => session.context.open());
|
|
242
291
|
|
|
243
|
-
yield*
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
292
|
+
yield* session
|
|
293
|
+
.createRequest({
|
|
294
|
+
system: SYSTEM,
|
|
295
|
+
prompt: `Go`,
|
|
296
|
+
})
|
|
297
|
+
.pipe(Effect.provide(session.makeToolExecutionServices()));
|
|
247
298
|
|
|
248
299
|
console.log(yield* Effect.promise(() => dumpAgent(agent)));
|
|
249
300
|
},
|
|
@@ -253,13 +304,53 @@ describe('Agent', () => {
|
|
|
253
304
|
),
|
|
254
305
|
MemoizedAiService.isGenerationEnabled() ? 240_000 : 30_000,
|
|
255
306
|
);
|
|
307
|
+
|
|
308
|
+
it.scoped(
|
|
309
|
+
'sync-triggers sets trigger enabled from agent.enabled',
|
|
310
|
+
Effect.fnUntraced(
|
|
311
|
+
function* ({ expect }) {
|
|
312
|
+
const agent = yield* Agent.makeInitialized(
|
|
313
|
+
{
|
|
314
|
+
name: 'Toggle agent',
|
|
315
|
+
instructions: 'Test enabled propagation.',
|
|
316
|
+
blueprints: [Ref.make(MarkdownBlueprint.make())],
|
|
317
|
+
enabled: false,
|
|
318
|
+
cron: '0 9 * * *',
|
|
319
|
+
},
|
|
320
|
+
blueprint,
|
|
321
|
+
);
|
|
322
|
+
yield* Database.flush();
|
|
323
|
+
|
|
324
|
+
yield* Operation.invoke(SyncTriggers, { agent: Ref.make(agent) });
|
|
325
|
+
|
|
326
|
+
const triggers = yield* Database.runQuery(
|
|
327
|
+
Query.select(Filter.type(Trigger.Trigger)).debugLabel('assistant-toolkit.blueprint.test.toggle-enabled'),
|
|
328
|
+
);
|
|
329
|
+
expect(triggers.every((trigger) => trigger.enabled === false)).toBe(true);
|
|
330
|
+
|
|
331
|
+
Obj.update(agent, (agent) => {
|
|
332
|
+
agent.enabled = true;
|
|
333
|
+
});
|
|
334
|
+
yield* Database.flush();
|
|
335
|
+
yield* Operation.invoke(SyncTriggers, { agent: Ref.make(agent) });
|
|
336
|
+
|
|
337
|
+
const triggersAfter = yield* Database.runQuery(
|
|
338
|
+
Query.select(Filter.type(Trigger.Trigger)).debugLabel('assistant-toolkit.blueprint.test.after'),
|
|
339
|
+
);
|
|
340
|
+
expect(triggersAfter).toHaveLength(triggers.length);
|
|
341
|
+
expect(triggersAfter.every((trigger) => trigger.enabled === true)).toBe(true);
|
|
342
|
+
},
|
|
343
|
+
Effect.provide(TestLayer),
|
|
344
|
+
TestHelpers.provideTestContext,
|
|
345
|
+
),
|
|
346
|
+
);
|
|
256
347
|
});
|
|
257
348
|
|
|
258
349
|
const dumpAgent = async (agent: Agent.Agent) => {
|
|
259
350
|
let text = '';
|
|
260
351
|
text += `============== Agent: ${agent.name} ==============\n\n`;
|
|
261
|
-
text += `==============
|
|
262
|
-
text += `${await agent.
|
|
352
|
+
text += `============== Instructions ==============\n\n`;
|
|
353
|
+
text += `${await agent.instructions.load().then((_) => _.content)}\n`;
|
|
263
354
|
text += `============== Plan ==============\n\n`;
|
|
264
355
|
text += `${await agent.plan?.load().then((_) => Plan.formatPlan(_))}\n`;
|
|
265
356
|
text += `============== Artifacts ==============\n\n`;
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
// Copyright 2026 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { Blueprint, Template } from '@dxos/blueprints';
|
|
5
|
+
import { Blueprint, Template } from '@dxos/compute';
|
|
7
6
|
import { trim } from '@dxos/util';
|
|
8
7
|
|
|
9
8
|
import { AddArtifact } from './functions';
|
|
@@ -20,7 +19,7 @@ const make = () =>
|
|
|
20
19
|
name: 'Agent blueprint',
|
|
21
20
|
instructions: Template.make({
|
|
22
21
|
source: trim`
|
|
23
|
-
You work on an agent. Each agent has
|
|
22
|
+
You work on an agent. Each agent has instructions - the goal of the agent.
|
|
24
23
|
The agent plan shows the current progress of the agent.
|
|
25
24
|
Agent has a number of associated artifacts you can read/write.
|
|
26
25
|
You can edit them if necessary.
|
|
@@ -29,9 +28,9 @@ const make = () =>
|
|
|
29
28
|
|
|
30
29
|
{{#with agent}}
|
|
31
30
|
<agent id="{{id}}" name="{{name}}">
|
|
32
|
-
<
|
|
33
|
-
{{
|
|
34
|
-
</
|
|
31
|
+
<instructions>
|
|
32
|
+
{{instructions}}
|
|
33
|
+
</instructions>
|
|
35
34
|
<plan>
|
|
36
35
|
{{plan}}
|
|
37
36
|
</plan>
|
|
@@ -57,7 +56,7 @@ const make = () =>
|
|
|
57
56
|
tools: Blueprint.toolDefinitions({ operations: [AddArtifact] }),
|
|
58
57
|
});
|
|
59
58
|
|
|
60
|
-
const blueprint:
|
|
59
|
+
const blueprint: Blueprint.Definition = {
|
|
61
60
|
key: BLUEPRINT_KEY,
|
|
62
61
|
make,
|
|
63
62
|
};
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
7
8
|
import { Database, Obj } from '@dxos/echo';
|
|
8
|
-
import { Operation } from '@dxos/operation';
|
|
9
9
|
|
|
10
10
|
import { Agent } from '../../../types';
|
|
11
11
|
import { AddArtifact } from './definitions';
|
|
@@ -19,7 +19,7 @@ export default AddArtifact.pipe(
|
|
|
19
19
|
|
|
20
20
|
const agent = yield* Agent.getFromChatContext;
|
|
21
21
|
|
|
22
|
-
Obj.
|
|
22
|
+
Obj.update(agent, (agent) => {
|
|
23
23
|
agent.artifacts.push({
|
|
24
24
|
name,
|
|
25
25
|
data: artifact,
|
|
@@ -6,56 +6,35 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
import * as Layer from 'effect/Layer';
|
|
7
7
|
|
|
8
8
|
import { AiService } from '@dxos/ai';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { AiSession, ToolExecutionServices } from '@dxos/assistant';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
|
+
import { Database, Feed, Obj } from '@dxos/echo';
|
|
11
12
|
import { acquireReleaseResource } from '@dxos/effect';
|
|
12
|
-
import { FunctionInvocationService, FunctionNotFoundError } from '@dxos/functions';
|
|
13
13
|
import { invariant } from '@dxos/invariant';
|
|
14
|
-
import {
|
|
14
|
+
import { ContentBlock } from '@dxos/types';
|
|
15
15
|
|
|
16
16
|
import { Agent } from '../../../types';
|
|
17
17
|
import { AgentWorker } from './definitions';
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* Creates a FunctionInvocationService that propagates the conversation DXN to child operations.
|
|
21
|
-
* This ensures nested operations (e.g., get-context) can resolve AiContextService.
|
|
22
|
-
*/
|
|
23
|
-
const functionInvocationServiceWithConversation = (
|
|
24
|
-
conversationDxn: DXN,
|
|
25
|
-
): Layer.Layer<FunctionInvocationService, never, OperationRegistry.Service | Operation.Service> =>
|
|
26
|
-
Layer.effect(
|
|
27
|
-
FunctionInvocationService,
|
|
28
|
-
Effect.gen(function* () {
|
|
29
|
-
const operationRegistry = yield* OperationRegistry.Service;
|
|
30
|
-
const operationInvoker = yield* Operation.Service;
|
|
31
|
-
return FunctionInvocationService.of({
|
|
32
|
-
invokeFunction: <I, O>(operationDef: Operation.Definition<I, O, any>, input: I) =>
|
|
33
|
-
operationInvoker.invoke(operationDef, input, { conversation: conversationDxn.toString() }).pipe(Effect.orDie),
|
|
34
|
-
resolveFunction: (key: string) =>
|
|
35
|
-
operationRegistry.resolve(key).pipe(
|
|
36
|
-
Effect.flatten,
|
|
37
|
-
Effect.catchTag('NoSuchElementException', () => Effect.fail(new FunctionNotFoundError(key))),
|
|
38
|
-
),
|
|
39
|
-
});
|
|
40
|
-
}),
|
|
41
|
-
);
|
|
42
|
-
|
|
43
19
|
export default AgentWorker.pipe(
|
|
44
20
|
Operation.withHandler(
|
|
45
21
|
Effect.fnUntraced(function* ({ agent: agentRef, prompt, event }) {
|
|
46
|
-
const agent = yield* Database.load(agentRef)
|
|
22
|
+
const agent = yield* Database.load(agentRef).pipe(
|
|
23
|
+
Effect.catchTag('ObjectNotFoundError', () => Effect.die(new Error('Unable to load agent object.'))),
|
|
24
|
+
);
|
|
47
25
|
invariant(Obj.instanceOf(Agent.Agent, agent));
|
|
48
26
|
invariant(agent.chat, 'Agent has no chat.');
|
|
49
27
|
|
|
50
28
|
const chatFeed = yield* agent.chat.pipe(
|
|
51
29
|
Database.load,
|
|
52
30
|
Effect.flatMap((chat) => Database.load(chat.feed)),
|
|
31
|
+
Effect.catchTag('ObjectNotFoundError', () => Effect.die(new Error('Unable to load agent chat feed object.'))),
|
|
53
32
|
);
|
|
54
33
|
invariant(chatFeed, 'Agent chat feed not found.');
|
|
55
34
|
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
56
|
-
const
|
|
35
|
+
const session = yield* acquireReleaseResource(() => new AiSession({ feed: chatFeed, runtime }));
|
|
57
36
|
|
|
58
|
-
const agentsInContext =
|
|
37
|
+
const agentsInContext = session.context.getObjects().filter(Obj.instanceOf(Agent.Agent));
|
|
59
38
|
if (agentsInContext.length !== 1) {
|
|
60
39
|
throw new Error('There should be exactly one agent in context. Got: ' + agentsInContext.length);
|
|
61
40
|
}
|
|
@@ -64,23 +43,22 @@ export default AgentWorker.pipe(
|
|
|
64
43
|
throw new Error('Either prompt or event must be provided.');
|
|
65
44
|
}
|
|
66
45
|
|
|
67
|
-
let input =
|
|
46
|
+
let input: ContentBlock.Any[] = [];
|
|
68
47
|
if (prompt) {
|
|
69
|
-
input
|
|
48
|
+
input.push({ _tag: 'text', text: prompt, disposition: 'synthetic' });
|
|
70
49
|
}
|
|
71
50
|
if (event) {
|
|
72
|
-
input
|
|
51
|
+
input.push({ _tag: 'text', text: JSON.stringify(event), disposition: 'synthetic' });
|
|
73
52
|
}
|
|
74
53
|
|
|
75
|
-
|
|
76
|
-
yield* conversation
|
|
54
|
+
yield* session
|
|
77
55
|
.createRequest({
|
|
78
56
|
prompt: input,
|
|
79
57
|
})
|
|
80
58
|
.pipe(
|
|
81
59
|
Effect.provide(
|
|
82
60
|
Layer.mergeAll(AiService.model('@anthropic/claude-opus-4-6'), ToolExecutionServices).pipe(
|
|
83
|
-
Layer.provideMerge(
|
|
61
|
+
Layer.provideMerge(Operation.withInvocationOptions({ conversation: Obj.getDXN(chatFeed).toString() })),
|
|
84
62
|
),
|
|
85
63
|
),
|
|
86
64
|
Effect.retry({ times: 2 }),
|
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { AiService,
|
|
7
|
+
import { AiService, OpaqueToolkit } from '@dxos/ai';
|
|
8
8
|
import { AiContextService } from '@dxos/assistant';
|
|
9
|
+
import { Trace, TriggerEvent, Operation, OperationRegistry } from '@dxos/compute';
|
|
9
10
|
import { Database, Feed, Obj, Ref } from '@dxos/echo';
|
|
10
|
-
import { QueueService
|
|
11
|
-
import { Trace } from '@dxos/functions';
|
|
12
|
-
import { Operation, OperationRegistry } from '@dxos/operation';
|
|
11
|
+
import { QueueService } from '@dxos/functions';
|
|
13
12
|
|
|
14
13
|
import { Agent } from '../../../types';
|
|
15
14
|
|
|
@@ -31,10 +30,8 @@ export const AgentWorker = Operation.make({
|
|
|
31
30
|
QueueService,
|
|
32
31
|
Feed.FeedService,
|
|
33
32
|
OperationRegistry.Service,
|
|
34
|
-
// @deprecated TracingService kept for backward compat with tool handlers.
|
|
35
|
-
TracingService,
|
|
36
33
|
Trace.TraceService,
|
|
37
|
-
|
|
34
|
+
OpaqueToolkit.OpaqueToolkitProvider,
|
|
38
35
|
],
|
|
39
36
|
});
|
|
40
37
|
|
|
@@ -63,7 +60,7 @@ export const GetContext = Operation.make({
|
|
|
63
60
|
output: Schema.Struct({
|
|
64
61
|
id: Schema.String,
|
|
65
62
|
name: Schema.String,
|
|
66
|
-
|
|
63
|
+
instructions: Schema.String,
|
|
67
64
|
plan: Schema.String,
|
|
68
65
|
artifacts: Schema.Array(
|
|
69
66
|
Schema.Struct({
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
7
8
|
import { Database, Obj } from '@dxos/echo';
|
|
8
|
-
import { Operation } from '@dxos/operation';
|
|
9
9
|
|
|
10
10
|
import { Plan, Agent } from '../../../types';
|
|
11
11
|
import { GetContext } from './definitions';
|
|
@@ -18,9 +18,9 @@ export default GetContext.pipe(
|
|
|
18
18
|
return {
|
|
19
19
|
id: agent.id,
|
|
20
20
|
name: agent.name,
|
|
21
|
-
|
|
21
|
+
instructions: yield* agent.instructions.pipe(Database.load).pipe(
|
|
22
22
|
Effect.map((_) => _.content),
|
|
23
|
-
Effect.catchTag('ObjectNotFoundError', () => Effect.succeed('No
|
|
23
|
+
Effect.catchTag('ObjectNotFoundError', () => Effect.succeed('No instructions found.')),
|
|
24
24
|
),
|
|
25
25
|
plan: yield* (
|
|
26
26
|
agent.plan?.pipe(Database.load).pipe(
|
|
@@ -8,9 +8,9 @@ import * as Effect from 'effect/Effect';
|
|
|
8
8
|
import * as Schema from 'effect/Schema';
|
|
9
9
|
|
|
10
10
|
import { AiService } from '@dxos/ai';
|
|
11
|
+
import { Operation } from '@dxos/compute';
|
|
11
12
|
import { Database, Obj, Ref } from '@dxos/echo';
|
|
12
13
|
import { invariant } from '@dxos/invariant';
|
|
13
|
-
import { Operation } from '@dxos/operation';
|
|
14
14
|
import { trim } from '@dxos/util';
|
|
15
15
|
|
|
16
16
|
import { Plan, Agent } from '../../../types';
|
|
@@ -30,7 +30,7 @@ export default Qualifier.pipe(
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
const plan = yield* Database.load(agent.plan);
|
|
33
|
-
const
|
|
33
|
+
const instructions = yield* Database.load(agent.instructions);
|
|
34
34
|
|
|
35
35
|
const { value } = yield* Effect.scoped(
|
|
36
36
|
LanguageModel.generateObject({
|
|
@@ -45,9 +45,9 @@ export default Qualifier.pipe(
|
|
|
45
45
|
If you are not sure, return true.
|
|
46
46
|
The qualified events will be forwarded to the larger agent that will process them.
|
|
47
47
|
<agent id="${id}" name="${name}">
|
|
48
|
-
<
|
|
49
|
-
${
|
|
50
|
-
</
|
|
48
|
+
<instructions>
|
|
49
|
+
${instructions.content}
|
|
50
|
+
</instructions>
|
|
51
51
|
<plan>
|
|
52
52
|
${Plan.formatPlan(plan)}
|
|
53
53
|
</plan>
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
// Copyright 2026 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { Blueprint, Template } from '@dxos/blueprints';
|
|
5
|
+
import { Blueprint, Template } from '@dxos/compute';
|
|
7
6
|
import { trim } from '@dxos/util';
|
|
8
7
|
|
|
9
8
|
import { AgentRules, CreateAgent, SyncTriggers } from './functions';
|
|
@@ -18,21 +17,26 @@ const make = () =>
|
|
|
18
17
|
Blueprint.make({
|
|
19
18
|
key: BLUEPRINT_KEY,
|
|
20
19
|
name: 'Agent Wizard',
|
|
21
|
-
description: 'Help the user create a new agent.',
|
|
20
|
+
description: 'Help the user create a new agent (subscriptions, optional cron timer, sync-triggers after edits).',
|
|
22
21
|
agentCanEnable: true,
|
|
23
22
|
instructions: Template.make({
|
|
24
23
|
source: trim`
|
|
25
24
|
You are a wizard that helps the user create a new agent.
|
|
26
25
|
|
|
27
26
|
Agents are goal oriented and autonomously driven.
|
|
28
|
-
Each agent has
|
|
29
|
-
The
|
|
27
|
+
Each agent has instructions - the goal of the agent.
|
|
28
|
+
The instructions also typically describe what actions to perform in reaction to events (emails).
|
|
30
29
|
The agent has a number of associated artifacts to work with.
|
|
31
30
|
Agents can subscribe to emails.
|
|
32
31
|
|
|
32
|
+
Agents have a \`cron\` field: when set, the agent runs on a timer on that schedule (standard cron syntax).
|
|
33
|
+
Use \`cron\` when the user wants the agent to run periodically (e.g. "every morning", "once a day", "every 5 minutes").
|
|
34
|
+
Examples: \`0 9 * * *\` for daily at 09:00, or \`*/5 * * * *\` for every 5 minutes.
|
|
35
|
+
Timer triggers bypass the qualifier and invoke the agent worker directly on the schedule.
|
|
36
|
+
|
|
33
37
|
The agent itself is an ECHO object and can be edited like any other object using the database blueprint.
|
|
34
|
-
You can edit the agent's
|
|
35
|
-
If you edit the agent's subscriptions array, you MUST call the sync-triggers function afterward to synchronize the triggers.
|
|
38
|
+
You can edit the agent's instructions, name, and other properties directly.
|
|
39
|
+
If you edit the agent's \`enabled\` field, \`filterEvents\` field, subscriptions array, or \`cron\` field, you MUST call the sync-triggers function afterward to synchronize the triggers (\`enabled\` is applied to all triggers).
|
|
36
40
|
|
|
37
41
|
IMPORTANT: Before attempting to create an agent call the [agent-rules] tool to get the rules for creating an agent.
|
|
38
42
|
`,
|
|
@@ -40,7 +44,7 @@ const make = () =>
|
|
|
40
44
|
tools: Blueprint.toolDefinitions({ operations: [AgentRules, CreateAgent, SyncTriggers] }),
|
|
41
45
|
});
|
|
42
46
|
|
|
43
|
-
const blueprint:
|
|
47
|
+
const blueprint: Blueprint.Definition = {
|
|
44
48
|
key: BLUEPRINT_KEY,
|
|
45
49
|
make,
|
|
46
50
|
};
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { Blueprint } from '@dxos/
|
|
7
|
+
import { Blueprint, Operation } from '@dxos/compute';
|
|
8
8
|
import { Obj, Ref } from '@dxos/echo';
|
|
9
|
-
import { Operation } from '@dxos/operation';
|
|
10
9
|
|
|
11
10
|
import { Agent } from '../../../types';
|
|
12
11
|
import { AgentBlueprint } from '../../project';
|
|
@@ -14,11 +13,11 @@ import { CreateAgent, SyncTriggers } from './definitions';
|
|
|
14
13
|
|
|
15
14
|
export default CreateAgent.pipe(
|
|
16
15
|
Operation.withHandler(
|
|
17
|
-
Effect.fnUntraced(function* ({ name,
|
|
16
|
+
Effect.fnUntraced(function* ({ name, instructions, blueprints, subscriptions }) {
|
|
18
17
|
const agent = yield* Agent.makeInitialized(
|
|
19
18
|
{
|
|
20
19
|
name,
|
|
21
|
-
|
|
20
|
+
instructions,
|
|
22
21
|
blueprints: yield* Effect.forEach(blueprints, (key) =>
|
|
23
22
|
Blueprint.upsert(key).pipe(Effect.map(Ref.make), Effect.orDie),
|
|
24
23
|
),
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { Blueprint } from '@dxos/
|
|
7
|
+
import { Blueprint, Operation } from '@dxos/compute';
|
|
8
8
|
import { Database, Feed, Obj, Ref } from '@dxos/echo';
|
|
9
9
|
import { QueueService } from '@dxos/functions';
|
|
10
|
-
import { Operation } from '@dxos/operation';
|
|
11
10
|
|
|
12
11
|
import { Agent } from '../../../types';
|
|
13
12
|
|
|
@@ -31,7 +30,7 @@ export const CreateAgent = Operation.make({
|
|
|
31
30
|
name: Schema.String.annotations({
|
|
32
31
|
description: 'The name of the agent to create.',
|
|
33
32
|
}),
|
|
34
|
-
|
|
33
|
+
instructions: Schema.String.annotations({
|
|
35
34
|
description:
|
|
36
35
|
'The goal of the agent. Be specific but not too verbose. The agent will use this as a core objective and set of rules to follow.',
|
|
37
36
|
}),
|
|
@@ -52,7 +51,7 @@ export const SyncTriggers = Operation.make({
|
|
|
52
51
|
key: 'org.dxos.function.agent.sync-triggers',
|
|
53
52
|
name: 'Sync triggers',
|
|
54
53
|
description:
|
|
55
|
-
'Synchronizes triggers
|
|
54
|
+
'Synchronizes triggers with the agent: subscriptions, cron, filter-events, and enabled (copied to every trigger). Call after editing those fields.',
|
|
56
55
|
},
|
|
57
56
|
input: Schema.Struct({
|
|
58
57
|
agent: Ref.Ref(Agent.Agent).annotations({
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { Operation } from '@dxos/
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
8
8
|
import { trim } from '@dxos/util';
|
|
9
9
|
|
|
10
10
|
import { AgentRules } from './definitions';
|
|
@@ -15,9 +15,9 @@ export default AgentRules.pipe(
|
|
|
15
15
|
return trim`
|
|
16
16
|
You can ask the user for qualifying questions about the agents.
|
|
17
17
|
If agents should actively read incoming emails, query for mailboxes and add a subscription to them.
|
|
18
|
+
If the user wants the agent to run on a schedule (e.g. "every morning", "every 5 minutes"), set the agent's \`cron\` field to a standard cron expression (e.g. \`0 9 * * *\` for daily at 09:00, \`*/5 * * * *\` for every 5 minutes). Timer triggers bypass the qualifier and invoke the agent worker directly on the schedule.
|
|
18
19
|
Use [query-blueprints] from the Blueprint Manager to query for available blueprints and their keys.
|
|
19
20
|
Use [create-agent] function to create a new agent.
|
|
20
|
-
After creating an agent, explicitly remind the user to enable local triggers so the agent can be driven autonomously.
|
|
21
21
|
|
|
22
22
|
Notable blueprints (query to get their keys):
|
|
23
23
|
|