@dxos/assistant-toolkit 0.8.4-main.c85a9c8dae → 0.8.4-main.dfabb4ec29
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-ZUJ5DMSY.mjs +30 -0
- package/dist/lib/neutral/add-artifact-ZUJ5DMSY.mjs.map +7 -0
- package/dist/lib/neutral/agent-5NIKAYUK.mjs +65 -0
- package/dist/lib/neutral/agent-5NIKAYUK.mjs.map +7 -0
- package/dist/lib/neutral/chunk-246ACKSH.mjs +100 -0
- package/dist/lib/neutral/chunk-246ACKSH.mjs.map +7 -0
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs +73 -0
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs +140 -0
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GV66MKAQ.mjs +60 -0
- package/dist/lib/neutral/chunk-GV66MKAQ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-IKBIORQX.mjs +332 -0
- package/dist/lib/neutral/chunk-IKBIORQX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-KGU725LW.mjs +29 -0
- package/dist/lib/neutral/chunk-KGU725LW.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NR3GTWRC.mjs +53 -0
- package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-P4ZMYO4K.mjs +294 -0
- package/dist/lib/neutral/chunk-P4ZMYO4K.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QO5SU37C.mjs +70 -0
- package/dist/lib/neutral/chunk-QO5SU37C.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ROMZO4CB.mjs +108 -0
- package/dist/lib/neutral/chunk-ROMZO4CB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TO5IX24K.mjs +67 -0
- package/dist/lib/neutral/chunk-TO5IX24K.mjs.map +7 -0
- package/dist/lib/neutral/chunk-WLR3BGO4.mjs +25 -0
- package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +7 -0
- package/dist/lib/neutral/chunk-XUF53B6B.mjs +75 -0
- package/dist/lib/neutral/chunk-XUF53B6B.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs +73 -0
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +7 -0
- package/dist/lib/neutral/context-add-VB7AOY3G.mjs +22 -0
- package/dist/lib/neutral/context-add-VB7AOY3G.mjs.map +7 -0
- package/dist/lib/neutral/context-remove-VCM3VPSO.mjs +22 -0
- package/dist/lib/neutral/context-remove-VCM3VPSO.mjs.map +7 -0
- package/dist/lib/neutral/create-project-EIF4OJMY.mjs +35 -0
- package/dist/lib/neutral/create-project-EIF4OJMY.mjs.map +7 -0
- package/dist/lib/neutral/delete-J3PMWP7Z.mjs +19 -0
- package/dist/lib/neutral/delete-J3PMWP7Z.mjs.map +7 -0
- package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs +47 -0
- package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs.map +7 -0
- package/dist/lib/neutral/fetch-KHMHV7JR.mjs +16 -0
- package/dist/lib/neutral/fetch-KHMHV7JR.mjs.map +7 -0
- package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs +139 -0
- package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs.map +7 -0
- package/dist/lib/neutral/get-context-TN7X7U2H.mjs +35 -0
- package/dist/lib/neutral/get-context-TN7X7U2H.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +581 -3293
- package/dist/lib/neutral/index.mjs.map +4 -4
- package/dist/lib/neutral/load-ALP3TK2E.mjs +17 -0
- package/dist/lib/neutral/load-ALP3TK2E.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/object-create-Z57Y3X6Y.mjs +35 -0
- package/dist/lib/neutral/object-create-Z57Y3X6Y.mjs.map +7 -0
- package/dist/lib/neutral/object-delete-X53LS37B.mjs +18 -0
- package/dist/lib/neutral/object-delete-X53LS37B.mjs.map +7 -0
- package/dist/lib/neutral/object-update-GVKSBR7T.mjs +28 -0
- package/dist/lib/neutral/object-update-GVKSBR7T.mjs.map +7 -0
- package/dist/lib/neutral/project-HPHTZ2CI.mjs +23 -0
- package/dist/lib/neutral/project-HPHTZ2CI.mjs.map +7 -0
- package/dist/lib/neutral/project-rules-IVDHKSKI.mjs +78 -0
- package/dist/lib/neutral/project-rules-IVDHKSKI.mjs.map +7 -0
- package/dist/lib/neutral/prompt-Y7NN7M5D.mjs +170 -0
- package/dist/lib/neutral/prompt-Y7NN7M5D.mjs.map +7 -0
- package/dist/lib/neutral/qualifier-VDOY5CWU.mjs +88 -0
- package/dist/lib/neutral/qualifier-VDOY5CWU.mjs.map +7 -0
- package/dist/lib/neutral/query-PPJU5622.mjs +70 -0
- package/dist/lib/neutral/query-PPJU5622.mjs.map +7 -0
- package/dist/lib/neutral/query-U56GNEV6.mjs +32 -0
- package/dist/lib/neutral/query-U56GNEV6.mjs.map +7 -0
- package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs +16 -0
- package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs.map +7 -0
- package/dist/lib/neutral/relation-create-XJ2IX6X3.mjs +34 -0
- package/dist/lib/neutral/relation-create-XJ2IX6X3.mjs.map +7 -0
- package/dist/lib/neutral/relation-delete-EP4KXAFL.mjs +18 -0
- package/dist/lib/neutral/relation-delete-EP4KXAFL.mjs.map +7 -0
- package/dist/lib/neutral/save-GWAPLT3Z.mjs +23 -0
- package/dist/lib/neutral/save-GWAPLT3Z.mjs.map +7 -0
- package/dist/lib/neutral/schema-add-Z5CY6P24.mjs +24 -0
- package/dist/lib/neutral/schema-add-Z5CY6P24.mjs.map +7 -0
- package/dist/lib/neutral/schema-list-W326VPVX.mjs +38 -0
- package/dist/lib/neutral/schema-list-W326VPVX.mjs.map +7 -0
- package/dist/lib/neutral/sync-issues-4YE5XAK5.mjs +167 -0
- package/dist/lib/neutral/sync-issues-4YE5XAK5.mjs.map +7 -0
- package/dist/lib/neutral/sync-triggers-CDMJVW6E.mjs +136 -0
- package/dist/lib/neutral/sync-triggers-CDMJVW6E.mjs.map +7 -0
- package/dist/lib/neutral/tag-add-VNIIOVJA.mjs +19 -0
- package/dist/lib/neutral/tag-add-VNIIOVJA.mjs.map +7 -0
- package/dist/lib/neutral/tag-remove-6R2R27W3.mjs +19 -0
- package/dist/lib/neutral/tag-remove-6R2R27W3.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +9 -14
- package/dist/lib/neutral/testing/index.mjs.map +3 -3
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs +16 -0
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs.map +7 -0
- package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs +46 -0
- package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs.map +7 -0
- package/dist/types/src/blueprints/automation/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/automation/index.d.ts +2 -0
- package/dist/types/src/blueprints/automation/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +63 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +37 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +28 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/index.d.ts +3 -0
- package/dist/types/src/blueprints/blueprint-manager/index.d.ts.map +1 -0
- 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 +5 -4
- 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 +5 -4
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/definitions.d.ts +59 -0
- package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/index.d.ts +3 -56
- package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/load.d.ts +5 -4
- package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/object-create.d.ts +5 -3
- 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 +5 -4
- 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 +5 -4
- package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/query.d.ts +7 -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 +6 -5
- 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 +5 -4
- 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 +4 -2
- 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 +4 -2
- 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 +4 -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 +4 -3
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/index.d.ts +1 -1
- package/dist/types/src/blueprints/database/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/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 +15 -0
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts +3 -2
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/functions/index.d.ts +3 -11
- package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/index.d.ts +1 -0
- package/dist/types/src/blueprints/discord/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/definitions.d.ts +7 -0
- package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts +4 -2
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/index.d.ts +3 -6
- package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/index.d.ts +1 -0
- package/dist/types/src/blueprints/github/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +4 -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 +6 -0
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/functions/index.d.ts +3 -8
- package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +4 -6
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/index.d.ts +1 -0
- package/dist/types/src/blueprints/linear/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts +17 -0
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/delete.d.ts +10 -0
- package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/query.d.ts +8 -0
- package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/save.d.ts +8 -0
- package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/index.d.ts +3 -0
- package/dist/types/src/blueprints/memory/index.d.ts.map +1 -0
- 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 +11 -0
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/index.d.ts +3 -9
- package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +5 -3
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/index.d.ts +1 -0
- package/dist/types/src/blueprints/planning/index.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 +4 -3
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/agent.d.ts +2 -60
- package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/definitions.d.ts +158 -0
- package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/get-context.d.ts +6 -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 +3 -132
- package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts +30 -17
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/index.d.ts +2 -2
- package/dist/types/src/blueprints/project/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +51 -0
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +96 -0
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +48 -0
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/index.d.ts +3 -0
- package/dist/types/src/blueprints/project-wizard/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/testing.d.ts +5 -15
- 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/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +5 -0
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +6 -0
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/index.d.ts +2 -1
- package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/toolkit.d.ts +2 -0
- 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 +41 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/functions/agent/definitions.d.ts +62 -0
- package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
- package/dist/types/src/functions/agent/index.d.ts +3 -84
- package/dist/types/src/functions/agent/index.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.d.ts +2 -82
- package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.test.d.ts +2 -0
- package/dist/types/src/functions/agent/prompt.test.d.ts.map +1 -0
- 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/toolkits/WebToolkit.d.ts.map +1 -1
- package/dist/types/src/types/Agent.d.ts +77 -0
- package/dist/types/src/types/Agent.d.ts.map +1 -0
- package/dist/types/src/types/Chat.d.ts +32 -7
- package/dist/types/src/types/Chat.d.ts.map +1 -1
- package/dist/types/src/types/McpServer.d.ts +21 -0
- package/dist/types/src/types/McpServer.d.ts.map +1 -0
- package/dist/types/src/types/Memory.d.ts +12 -0
- package/dist/types/src/types/Memory.d.ts.map +1 -0
- package/dist/types/src/types/Plan.d.ts +23 -11
- package/dist/types/src/types/Plan.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +3 -1
- 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 +27 -31
- package/src/blueprints/automation/blueprint.ts +105 -0
- package/src/blueprints/automation/index.ts +5 -0
- package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -0
- package/src/blueprints/blueprint-manager/blueprint.test.ts +198 -0
- package/src/blueprints/blueprint-manager/blueprint.ts +49 -0
- package/src/blueprints/blueprint-manager/functions/definitions.ts +57 -0
- package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +43 -0
- package/src/blueprints/blueprint-manager/functions/index.ts +13 -0
- package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +18 -0
- package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +18 -0
- package/src/blueprints/blueprint-manager/index.ts +6 -0
- package/src/blueprints/browser/blueprint.test.ts +23 -32
- package/src/blueprints/browser/blueprint.ts +5 -6
- package/src/blueprints/database/blueprint.conversations.json +1 -1
- package/src/blueprints/database/blueprint.test.ts +308 -98
- package/src/blueprints/database/blueprint.ts +37 -10
- package/src/blueprints/database/functions/context-add.ts +15 -26
- package/src/blueprints/database/functions/context-remove.ts +16 -27
- package/src/blueprints/database/functions/definitions.ts +318 -0
- package/src/blueprints/database/functions/index.ts +18 -28
- package/src/blueprints/database/functions/load.ts +11 -23
- package/src/blueprints/database/functions/object-create.ts +28 -25
- package/src/blueprints/database/functions/object-delete.ts +13 -20
- package/src/blueprints/database/functions/object-update.ts +23 -25
- package/src/blueprints/database/functions/query.ts +48 -110
- package/src/blueprints/database/functions/relation-create.ts +25 -38
- package/src/blueprints/database/functions/relation-delete.ts +14 -21
- package/src/blueprints/database/functions/schema-add.ts +19 -31
- package/src/blueprints/database/functions/schema-list.ts +26 -27
- package/src/blueprints/database/functions/tag-add.ts +14 -24
- package/src/blueprints/database/functions/tag-remove.ts +14 -23
- package/src/blueprints/database/index.ts +16 -1
- package/src/blueprints/discord/blueprint.ts +6 -11
- package/src/blueprints/discord/functions/definitions.ts +70 -0
- package/src/blueprints/discord/functions/fetch-messages.test.ts +15 -25
- package/src/blueprints/discord/functions/fetch-messages.ts +98 -152
- package/src/blueprints/discord/functions/index.ts +4 -4
- package/src/blueprints/discord/index.ts +1 -0
- package/src/blueprints/github/functions/definitions.ts +26 -0
- package/src/blueprints/github/functions/fetch-prs.ts +15 -22
- package/src/blueprints/github/functions/index.ts +4 -4
- package/src/blueprints/github/index.ts +2 -0
- package/src/blueprints/index.ts +4 -3
- package/src/blueprints/linear/blueprint.ts +6 -11
- package/src/blueprints/linear/functions/definitions.ts +23 -0
- package/src/blueprints/linear/functions/index.ts +4 -4
- package/src/blueprints/linear/functions/linear.test.ts +7 -7
- package/src/blueprints/linear/functions/sync-issues.ts +31 -39
- package/src/blueprints/linear/index.ts +1 -0
- package/src/blueprints/memory/blueprint.conversations.json +1 -0
- package/src/blueprints/memory/blueprint.test.ts +139 -0
- package/src/blueprints/memory/blueprint.ts +41 -0
- package/src/blueprints/memory/functions/definitions.ts +68 -0
- package/src/blueprints/memory/functions/delete.ts +20 -0
- package/src/blueprints/memory/functions/index.ts +13 -0
- package/src/blueprints/memory/functions/query.ts +32 -0
- package/src/blueprints/memory/functions/save.ts +20 -0
- package/src/blueprints/memory/index.ts +6 -0
- package/src/blueprints/planning/blueprint.ts +5 -9
- package/src/blueprints/planning/functions/definitions.ts +137 -0
- package/src/blueprints/planning/functions/index.ts +4 -4
- package/src/blueprints/planning/functions/update-tasks.ts +35 -158
- package/src/blueprints/planning/index.ts +1 -0
- package/src/blueprints/project/blueprint.conversations.json +1 -0
- package/src/blueprints/project/blueprint.test.ts +246 -111
- package/src/blueprints/project/blueprint.ts +21 -25
- package/src/blueprints/project/functions/add-artifact.ts +19 -30
- package/src/blueprints/project/functions/agent.ts +43 -46
- package/src/blueprints/project/functions/definitions.ts +92 -0
- package/src/blueprints/project/functions/get-context.ts +36 -53
- package/src/blueprints/project/functions/index.ts +9 -10
- package/src/blueprints/project/functions/qualifier.ts +66 -72
- package/src/blueprints/project/index.ts +2 -2
- package/src/blueprints/project-wizard/blueprint.ts +52 -0
- package/src/blueprints/project-wizard/functions/create-project.ts +32 -0
- package/src/blueprints/project-wizard/functions/definitions.ts +63 -0
- package/src/blueprints/project-wizard/functions/index.ts +13 -0
- package/src/blueprints/project-wizard/functions/project-rules.ts +77 -0
- package/src/blueprints/project-wizard/functions/sync-triggers.ts +158 -0
- package/src/blueprints/project-wizard/index.ts +6 -0
- package/src/blueprints/testing.ts +7 -23
- package/src/blueprints/websearch/blueprint.conversations.json +1 -0
- package/src/blueprints/websearch/blueprint.test.ts +39 -0
- package/src/blueprints/websearch/blueprint.ts +6 -8
- package/src/blueprints/websearch/functions/definitions.ts +25 -0
- package/src/blueprints/websearch/functions/fetch.ts +18 -0
- package/src/blueprints/websearch/functions/index.ts +9 -0
- package/src/blueprints/websearch/index.ts +2 -1
- package/src/blueprints/websearch/toolkit.ts +6 -1
- package/src/crud/graph.test.ts +10 -12
- package/src/crud/graph.ts +2 -2
- package/src/errors.ts +25 -0
- package/src/functions/agent/definitions.ts +56 -0
- package/src/functions/agent/index.ts +4 -4
- package/src/functions/agent/prompt.conversations.json +1 -0
- package/src/functions/agent/prompt.test.ts +81 -0
- package/src/functions/agent/prompt.ts +212 -96
- package/src/functions/index.ts +0 -2
- package/src/sync/sync.ts +23 -12
- package/src/testing/plugins.tsx +10 -3
- package/src/toolkits/WebToolkit.ts +1 -1
- package/src/types/Agent.ts +240 -0
- package/src/types/Chat.ts +24 -10
- package/src/types/McpServer.ts +37 -0
- package/src/types/Memory.ts +24 -0
- package/src/types/Plan.ts +7 -4
- package/src/types/index.ts +3 -1
- 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.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 -6
- package/dist/types/src/blueprints/markdown/functions/create.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/index.d.ts +0 -30
- package/dist/types/src/blueprints/markdown/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/read.d.ts +0 -14
- package/dist/types/src/blueprints/markdown/functions/read.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/update.d.ts +0 -13
- 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.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/index.d.ts +0 -29
- 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 -14
- 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 -16
- 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 -2
- 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.map +0 -1
- package/dist/types/src/blueprints/research/functions/document-create.d.ts +0 -10
- 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 -19
- package/dist/types/src/blueprints/research/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/research.d.ts +0 -14
- 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 -3
- package/dist/types/src/blueprints/research/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts +0 -18
- 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/entity-extraction.d.ts +0 -179
- 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 -179
- 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/exa.d.ts +0 -5
- package/dist/types/src/functions/exa/exa.d.ts.map +0 -1
- package/dist/types/src/functions/exa/index.d.ts +0 -9
- package/dist/types/src/functions/exa/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/mock.d.ts +0 -5
- package/dist/types/src/functions/exa/mock.d.ts.map +0 -1
- package/dist/types/src/types/Project.d.ts +0 -67
- package/dist/types/src/types/Project.d.ts.map +0 -1
- package/src/blueprints/browser/blueprint.conversations.json +0 -1
- package/src/blueprints/design/blueprint.test.ts +0 -96
- package/src/blueprints/design/blueprint.ts +0 -46
- package/src/blueprints/design/index.ts +0 -5
- package/src/blueprints/markdown/blueprint.ts +0 -38
- package/src/blueprints/markdown/functions/create.ts +0 -29
- package/src/blueprints/markdown/functions/index.ts +0 -13
- package/src/blueprints/markdown/functions/read.ts +0 -32
- package/src/blueprints/markdown/functions/update.ts +0 -32
- package/src/blueprints/markdown/index.ts +0 -6
- package/src/blueprints/planning-old/blueprint.test.ts +0 -122
- package/src/blueprints/planning-old/blueprint.ts +0 -110
- package/src/blueprints/planning-old/functions/index.ts +0 -11
- package/src/blueprints/planning-old/functions/read.ts +0 -34
- 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 -52
- package/src/blueprints/planning-old/index.ts +0 -5
- package/src/blueprints/research/blueprint.test.ts +0 -7
- package/src/blueprints/research/blueprint.ts +0 -65
- package/src/blueprints/research/functions/document-create.ts +0 -73
- package/src/blueprints/research/functions/index.ts +0 -11
- 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 -149
- package/src/blueprints/research/functions/research.ts +0 -175
- package/src/blueprints/research/index.ts +0 -6
- package/src/blueprints/research/types/ResearchGraph.ts +0 -49
- package/src/blueprints/research/types/index.ts +0 -32
- 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 -181
- 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/exa.ts +0 -37
- package/src/functions/exa/index.ts +0 -11
- package/src/functions/exa/mock.ts +0 -71
- package/src/types/Project.ts +0 -196
- /package/dist/types/src/blueprints/{design → blueprint-manager}/blueprint.test.d.ts +0 -0
- /package/dist/types/src/blueprints/{planning-old → memory}/blueprint.test.d.ts +0 -0
- /package/dist/types/src/blueprints/{research → websearch}/blueprint.test.d.ts +0 -0
|
@@ -3,70 +3,67 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as
|
|
6
|
+
import * as Layer from 'effect/Layer';
|
|
7
7
|
|
|
8
8
|
import { AiService } from '@dxos/ai';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { AiSession, ToolExecutionServices } from '@dxos/assistant';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
|
+
import { Database, Feed, Obj } from '@dxos/echo';
|
|
12
12
|
import { acquireReleaseResource } from '@dxos/effect';
|
|
13
|
-
import { TriggerEvent, defineFunction } from '@dxos/functions';
|
|
14
13
|
import { invariant } from '@dxos/invariant';
|
|
15
|
-
import {
|
|
14
|
+
import { ContentBlock } from '@dxos/types';
|
|
16
15
|
|
|
17
|
-
import {
|
|
16
|
+
import { Agent } from '../../../types';
|
|
17
|
+
import { AgentWorker } from './definitions';
|
|
18
18
|
|
|
19
|
-
export default
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}),
|
|
28
|
-
outputSchema: Schema.Void,
|
|
29
|
-
services: [AiContextService],
|
|
30
|
-
handler: Effect.fnUntraced(
|
|
31
|
-
function* ({ data }) {
|
|
32
|
-
const project = yield* Database.load(data.project);
|
|
33
|
-
invariant(Obj.instanceOf(Project.Project, project));
|
|
34
|
-
invariant(project.chat, 'Project has no chat.');
|
|
19
|
+
export default AgentWorker.pipe(
|
|
20
|
+
Operation.withHandler(
|
|
21
|
+
Effect.fnUntraced(function* ({ agent: agentRef, prompt, event }) {
|
|
22
|
+
const agent = yield* Database.load(agentRef).pipe(
|
|
23
|
+
Effect.catchTag('ObjectNotFoundError', () => Effect.die(new Error('Unable to load agent object.'))),
|
|
24
|
+
);
|
|
25
|
+
invariant(Obj.instanceOf(Agent.Agent, agent));
|
|
26
|
+
invariant(agent.chat, 'Agent has no chat.');
|
|
35
27
|
|
|
36
|
-
const
|
|
28
|
+
const chatFeed = yield* agent.chat.pipe(
|
|
37
29
|
Database.load,
|
|
38
|
-
Effect.flatMap((chat) => Database.load(chat.
|
|
39
|
-
|
|
40
|
-
invariant(chatQueue, 'Project chat queue not found.');
|
|
41
|
-
const conversation = yield* acquireReleaseResource(
|
|
42
|
-
() => new AiConversation({ queue: chatQueue as Queue<Message.Message | ContextBinding> }),
|
|
30
|
+
Effect.flatMap((chat) => Database.load(chat.feed)),
|
|
31
|
+
Effect.catchTag('ObjectNotFoundError', () => Effect.die(new Error('Unable to load agent chat feed object.'))),
|
|
43
32
|
);
|
|
33
|
+
invariant(chatFeed, 'Agent chat feed not found.');
|
|
34
|
+
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
35
|
+
const session = yield* acquireReleaseResource(() => new AiSession({ feed: chatFeed, runtime }));
|
|
44
36
|
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
throw new Error('There should be exactly one
|
|
37
|
+
const agentsInContext = session.context.getObjects().filter(Obj.instanceOf(Agent.Agent));
|
|
38
|
+
if (agentsInContext.length !== 1) {
|
|
39
|
+
throw new Error('There should be exactly one agent in context. Got: ' + agentsInContext.length);
|
|
48
40
|
}
|
|
49
41
|
|
|
50
|
-
if (!
|
|
42
|
+
if (!prompt && !event) {
|
|
51
43
|
throw new Error('Either prompt or event must be provided.');
|
|
52
44
|
}
|
|
53
45
|
|
|
54
|
-
let input =
|
|
55
|
-
if (
|
|
56
|
-
input
|
|
46
|
+
let input: ContentBlock.Any[] = [];
|
|
47
|
+
if (prompt) {
|
|
48
|
+
input.push({ _tag: 'text', text: prompt, disposition: 'synthetic' });
|
|
57
49
|
}
|
|
58
|
-
if (
|
|
59
|
-
input
|
|
50
|
+
if (event) {
|
|
51
|
+
input.push({ _tag: 'text', text: JSON.stringify(event), disposition: 'synthetic' });
|
|
60
52
|
}
|
|
61
53
|
|
|
62
|
-
yield*
|
|
54
|
+
yield* session
|
|
63
55
|
.createRequest({
|
|
64
56
|
prompt: input,
|
|
65
57
|
})
|
|
66
|
-
.pipe(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
})
|
|
58
|
+
.pipe(
|
|
59
|
+
Effect.provide(
|
|
60
|
+
Layer.mergeAll(AiService.model('@anthropic/claude-opus-4-6'), ToolExecutionServices).pipe(
|
|
61
|
+
Layer.provideMerge(Operation.withInvocationOptions({ conversation: Obj.getDXN(chatFeed).toString() })),
|
|
62
|
+
),
|
|
63
|
+
),
|
|
64
|
+
Effect.retry({ times: 2 }),
|
|
65
|
+
);
|
|
66
|
+
}, Effect.scoped),
|
|
67
|
+
),
|
|
68
|
+
Operation.opaqueHandler,
|
|
69
|
+
);
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
|
|
7
|
+
import { AiService, OpaqueToolkit } from '@dxos/ai';
|
|
8
|
+
import { AiContextService } from '@dxos/assistant';
|
|
9
|
+
import { Trace, TriggerEvent, Operation, OperationRegistry } from '@dxos/compute';
|
|
10
|
+
import { Database, Feed, Obj, Ref } from '@dxos/echo';
|
|
11
|
+
import { QueueService } from '@dxos/functions';
|
|
12
|
+
|
|
13
|
+
import { Agent } from '../../../types';
|
|
14
|
+
|
|
15
|
+
export const AgentWorker = Operation.make({
|
|
16
|
+
meta: {
|
|
17
|
+
key: 'org.dxos.function.agent.worker',
|
|
18
|
+
name: 'Agent Worker',
|
|
19
|
+
description: 'Agentic worker that drives the agent autonomously.',
|
|
20
|
+
},
|
|
21
|
+
input: Schema.Struct({
|
|
22
|
+
agent: Schema.suspend(() => Ref.Ref(Agent.Agent)),
|
|
23
|
+
prompt: Schema.optional(Schema.String),
|
|
24
|
+
event: Schema.optional(TriggerEvent.TriggerEvent),
|
|
25
|
+
}),
|
|
26
|
+
output: Schema.Void,
|
|
27
|
+
services: [
|
|
28
|
+
AiService.AiService,
|
|
29
|
+
Database.Service,
|
|
30
|
+
QueueService,
|
|
31
|
+
Feed.FeedService,
|
|
32
|
+
OperationRegistry.Service,
|
|
33
|
+
Trace.TraceService,
|
|
34
|
+
OpaqueToolkit.OpaqueToolkitProvider,
|
|
35
|
+
],
|
|
36
|
+
}).pipe(Operation.intrinsic);
|
|
37
|
+
|
|
38
|
+
export const Qualifier = Operation.make({
|
|
39
|
+
meta: {
|
|
40
|
+
key: 'org.dxos.function.agent.qualifier',
|
|
41
|
+
name: 'Agent Qualifier',
|
|
42
|
+
description:
|
|
43
|
+
'Qualifier that determines if the event is relevant to the agent. Puts the data into the input queue of the agent.',
|
|
44
|
+
},
|
|
45
|
+
input: Schema.Struct({
|
|
46
|
+
agent: Schema.suspend(() => Ref.Ref(Agent.Agent)),
|
|
47
|
+
event: TriggerEvent.TriggerEvent,
|
|
48
|
+
}),
|
|
49
|
+
output: Schema.Void,
|
|
50
|
+
services: [AiService.AiService, Database.Service],
|
|
51
|
+
}).pipe(Operation.intrinsic);
|
|
52
|
+
|
|
53
|
+
export const GetContext = Operation.make({
|
|
54
|
+
meta: {
|
|
55
|
+
key: 'org.dxos.function.agent.get-context',
|
|
56
|
+
name: 'Get Agent Context',
|
|
57
|
+
description: 'Get the context of an agent.',
|
|
58
|
+
},
|
|
59
|
+
input: Schema.Struct({}),
|
|
60
|
+
output: Schema.Struct({
|
|
61
|
+
id: Schema.String,
|
|
62
|
+
name: Schema.String,
|
|
63
|
+
instructions: Schema.String,
|
|
64
|
+
plan: Schema.String,
|
|
65
|
+
artifacts: Schema.Array(
|
|
66
|
+
Schema.Struct({
|
|
67
|
+
name: Schema.String,
|
|
68
|
+
type: Schema.optional(Schema.String),
|
|
69
|
+
dxn: Schema.optional(Schema.String),
|
|
70
|
+
}),
|
|
71
|
+
),
|
|
72
|
+
}),
|
|
73
|
+
services: [AiContextService, Database.Service],
|
|
74
|
+
}).pipe(Operation.intrinsic);
|
|
75
|
+
|
|
76
|
+
export const AddArtifact = Operation.make({
|
|
77
|
+
meta: {
|
|
78
|
+
key: 'org.dxos.function.agent.add-artifact',
|
|
79
|
+
name: 'Add artifact',
|
|
80
|
+
description: 'Adds a new artifact.',
|
|
81
|
+
},
|
|
82
|
+
input: Schema.Struct({
|
|
83
|
+
name: Schema.String.annotations({
|
|
84
|
+
description: 'The name of the artifact to add.',
|
|
85
|
+
}),
|
|
86
|
+
artifact: Ref.Ref(Obj.Unknown).annotations({
|
|
87
|
+
description: 'The artifact to add. Do NOT guess or try to generate the ID.',
|
|
88
|
+
}),
|
|
89
|
+
}),
|
|
90
|
+
output: Schema.Void,
|
|
91
|
+
services: [AiContextService, Database.Service],
|
|
92
|
+
}).pipe(Operation.intrinsic);
|
|
@@ -3,61 +3,44 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as Schema from 'effect/Schema';
|
|
7
6
|
|
|
8
|
-
import {
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
9
8
|
import { Database, Obj } from '@dxos/echo';
|
|
10
|
-
import { defineFunction } from '@dxos/functions';
|
|
11
9
|
|
|
12
|
-
import { Plan,
|
|
10
|
+
import { Plan, Agent } from '../../../types';
|
|
11
|
+
import { GetContext } from './definitions';
|
|
13
12
|
|
|
14
|
-
export default
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
inputSchema: Schema.Struct({}),
|
|
19
|
-
outputSchema: Schema.Struct({
|
|
20
|
-
id: Schema.String,
|
|
21
|
-
name: Schema.String,
|
|
22
|
-
spec: Schema.String,
|
|
23
|
-
plan: Schema.String,
|
|
24
|
-
artifacts: Schema.Array(
|
|
25
|
-
Schema.Struct({
|
|
26
|
-
name: Schema.String,
|
|
27
|
-
type: Schema.optional(Schema.String),
|
|
28
|
-
dxn: Schema.optional(Schema.String),
|
|
29
|
-
}),
|
|
30
|
-
),
|
|
31
|
-
}),
|
|
32
|
-
services: [AiContextService],
|
|
33
|
-
handler: Effect.fnUntraced(function* ({ data: _data }) {
|
|
34
|
-
const project = yield* Project.getFromChatContext;
|
|
13
|
+
export default GetContext.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fnUntraced(function* () {
|
|
16
|
+
const agent = yield* Agent.getFromChatContext;
|
|
35
17
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
18
|
+
return {
|
|
19
|
+
id: agent.id,
|
|
20
|
+
name: agent.name,
|
|
21
|
+
instructions: yield* agent.instructions.pipe(Database.load).pipe(
|
|
22
|
+
Effect.map((_) => _.content),
|
|
23
|
+
Effect.catchTag('ObjectNotFoundError', () => Effect.succeed('No instructions found.')),
|
|
24
|
+
),
|
|
25
|
+
plan: yield* (
|
|
26
|
+
agent.plan?.pipe(Database.load).pipe(
|
|
27
|
+
Effect.map(Plan.formatPlan),
|
|
28
|
+
Effect.catchTag('ObjectNotFoundError', () => Effect.succeed('No plan found.')),
|
|
29
|
+
) ?? Effect.succeed('No plan found.')
|
|
30
|
+
),
|
|
31
|
+
artifacts: yield* Effect.forEach(agent.artifacts, (artifact) =>
|
|
32
|
+
Effect.gen(function* () {
|
|
33
|
+
return {
|
|
34
|
+
name: artifact.name,
|
|
35
|
+
type: yield* Database.load(artifact.data).pipe(
|
|
36
|
+
Effect.map(Obj.getTypename),
|
|
37
|
+
Effect.catchTag('ObjectNotFoundError', () => Effect.succeed('Artifact not found.')),
|
|
38
|
+
),
|
|
39
|
+
dxn: artifact.data.dxn.toString(),
|
|
40
|
+
};
|
|
41
|
+
}),
|
|
42
|
+
),
|
|
43
|
+
};
|
|
44
|
+
}) as any,
|
|
45
|
+
),
|
|
46
|
+
);
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
// Copyright 2026 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { default as Agent } from './agent';
|
|
7
|
-
import { default as GetContext } from './get-context';
|
|
8
|
-
import { default as Qualifier } from './qualifier';
|
|
5
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
9
6
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
export * from './definitions';
|
|
8
|
+
|
|
9
|
+
export const AgentBlueprintHandlers = OperationHandlerSet.lazy(
|
|
10
|
+
() => import('./add-artifact'),
|
|
11
|
+
() => import('./agent'),
|
|
12
|
+
() => import('./get-context'),
|
|
13
|
+
() => import('./qualifier'),
|
|
14
|
+
);
|
|
@@ -8,89 +8,83 @@ 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
|
-
import { TriggerEvent, defineFunction } from '@dxos/functions';
|
|
13
13
|
import { invariant } from '@dxos/invariant';
|
|
14
14
|
import { trim } from '@dxos/util';
|
|
15
15
|
|
|
16
|
-
import { Plan,
|
|
16
|
+
import { Plan, Agent } from '../../../types';
|
|
17
|
+
import { Qualifier } from './definitions';
|
|
17
18
|
|
|
18
|
-
export default
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
event: TriggerEvent.TriggerEvent,
|
|
26
|
-
}),
|
|
27
|
-
outputSchema: Schema.Void,
|
|
28
|
-
services: [],
|
|
29
|
-
handler: Effect.fnUntraced(
|
|
30
|
-
function* ({ data }) {
|
|
31
|
-
const project = yield* Database.load(data.project);
|
|
32
|
-
invariant(Obj.instanceOf(Project.Project, project));
|
|
33
|
-
invariant(project.chat, 'Project has no chat.');
|
|
19
|
+
export default Qualifier.pipe(
|
|
20
|
+
Operation.withHandler(
|
|
21
|
+
Effect.fnUntraced(
|
|
22
|
+
function* ({ agent: agentRef, event }) {
|
|
23
|
+
const agent = yield* Database.load(agentRef);
|
|
24
|
+
invariant(Obj.instanceOf(Agent.Agent, agent));
|
|
25
|
+
invariant(agent.chat, 'Agent has no chat.');
|
|
34
26
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
const { id, name, queue } = agent;
|
|
28
|
+
if (!queue) {
|
|
29
|
+
throw new Error('Agent has no queue.');
|
|
30
|
+
}
|
|
39
31
|
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
const plan = yield* Database.load(agent.plan);
|
|
33
|
+
const instructions = yield* Database.load(agent.instructions);
|
|
42
34
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
</project>
|
|
64
|
-
`,
|
|
65
|
-
}),
|
|
66
|
-
Prompt.userMessage({
|
|
67
|
-
content: [
|
|
68
|
-
Prompt.makePart('text', {
|
|
69
|
-
text: trim`
|
|
70
|
-
<event>
|
|
71
|
-
${JSON.stringify(data.event, null, 2)}
|
|
72
|
-
</event>
|
|
35
|
+
const { value } = yield* Effect.scoped(
|
|
36
|
+
LanguageModel.generateObject({
|
|
37
|
+
schema: Schema.Struct({
|
|
38
|
+
isRelevant: Schema.Boolean,
|
|
39
|
+
}),
|
|
40
|
+
prompt: Prompt.fromMessages([
|
|
41
|
+
Prompt.systemMessage({
|
|
42
|
+
content: trim`
|
|
43
|
+
You are a qualifying agent that determines if the event is relevant to the agent.
|
|
44
|
+
Respond with true if the event is relevant to the agent, false otherwise.
|
|
45
|
+
If you are not sure, return true.
|
|
46
|
+
The qualified events will be forwarded to the larger agent that will process them.
|
|
47
|
+
<agent id="${id}" name="${name}">
|
|
48
|
+
<instructions>
|
|
49
|
+
${instructions.content}
|
|
50
|
+
</instructions>
|
|
51
|
+
<plan>
|
|
52
|
+
${Plan.formatPlan(plan)}
|
|
53
|
+
</plan>
|
|
54
|
+
</agent>
|
|
73
55
|
`,
|
|
74
56
|
}),
|
|
75
|
-
|
|
57
|
+
Prompt.userMessage({
|
|
58
|
+
content: [
|
|
59
|
+
Prompt.makePart('text', {
|
|
60
|
+
text: trim`
|
|
61
|
+
<event>
|
|
62
|
+
${JSON.stringify(event, null, 2)}
|
|
63
|
+
</event>
|
|
64
|
+
`,
|
|
65
|
+
}),
|
|
66
|
+
],
|
|
67
|
+
}),
|
|
68
|
+
]),
|
|
76
69
|
}),
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
const { isRelevant } = value as { isRelevant: boolean };
|
|
79
73
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
74
|
+
if (isRelevant) {
|
|
75
|
+
const queueTarget = yield* Database.load(queue);
|
|
76
|
+
if ('queue' in event && event.item) {
|
|
77
|
+
const obj = event.item;
|
|
78
|
+
yield* Effect.promise(() => queueTarget.append([obj]));
|
|
79
|
+
} else if ('subject' in event && Ref.isRef(event.subject)) {
|
|
80
|
+
const obj = yield* Database.load(event.subject);
|
|
81
|
+
yield* Effect.promise(() => queueTarget.append([obj]));
|
|
82
|
+
} else {
|
|
83
|
+
throw new Error('Invalid event.');
|
|
84
|
+
}
|
|
90
85
|
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Effect.provide(AiService.model('@anthropic/claude-sonnet-4-5')),
|
|
86
|
+
},
|
|
87
|
+
Effect.provide(AiService.model('@anthropic/claude-sonnet-4-5')),
|
|
88
|
+
),
|
|
95
89
|
),
|
|
96
|
-
|
|
90
|
+
);
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export { default as
|
|
6
|
-
export {
|
|
5
|
+
export { default as AgentBlueprint } from './blueprint';
|
|
6
|
+
export { AgentWorker, Qualifier, GetContext, AddArtifact, AgentBlueprintHandlers } from './functions';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Blueprint, Template } from '@dxos/compute';
|
|
6
|
+
import { trim } from '@dxos/util';
|
|
7
|
+
|
|
8
|
+
import { AgentRules, CreateAgent, SyncTriggers } from './functions';
|
|
9
|
+
|
|
10
|
+
const BLUEPRINT_KEY = 'org.dxos.blueprint.agent-wizard';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Creates the Agent Wizard blueprint. This is a function to avoid circular dependency issues.
|
|
14
|
+
*/
|
|
15
|
+
// TODO(dmaretskyi): Combine with Agent Blueprint.
|
|
16
|
+
const make = () =>
|
|
17
|
+
Blueprint.make({
|
|
18
|
+
key: BLUEPRINT_KEY,
|
|
19
|
+
name: 'Agent Wizard',
|
|
20
|
+
description: 'Help the user create a new agent (subscriptions, optional cron timer, sync-triggers after edits).',
|
|
21
|
+
agentCanEnable: true,
|
|
22
|
+
instructions: Template.make({
|
|
23
|
+
source: trim`
|
|
24
|
+
You are a wizard that helps the user create a new agent.
|
|
25
|
+
|
|
26
|
+
Agents are goal oriented and autonomously driven.
|
|
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).
|
|
29
|
+
The agent has a number of associated artifacts to work with.
|
|
30
|
+
Agents can subscribe to emails.
|
|
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
|
+
|
|
37
|
+
The agent itself is an ECHO object and can be edited like any other object using the database blueprint.
|
|
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).
|
|
40
|
+
|
|
41
|
+
IMPORTANT: Before attempting to create an agent call the [agent-rules] tool to get the rules for creating an agent.
|
|
42
|
+
`,
|
|
43
|
+
}),
|
|
44
|
+
tools: Blueprint.toolDefinitions({ operations: [AgentRules, CreateAgent, SyncTriggers] }),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const blueprint: Blueprint.Definition = {
|
|
48
|
+
key: BLUEPRINT_KEY,
|
|
49
|
+
make,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default blueprint;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Blueprint, Operation } from '@dxos/compute';
|
|
8
|
+
import { Obj, Ref } from '@dxos/echo';
|
|
9
|
+
|
|
10
|
+
import { Agent } from '../../../types';
|
|
11
|
+
import { AgentBlueprint } from '../../project';
|
|
12
|
+
import { CreateAgent, SyncTriggers } from './definitions';
|
|
13
|
+
|
|
14
|
+
export default CreateAgent.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* ({ name, instructions, blueprints, subscriptions }) {
|
|
17
|
+
const agent = yield* Agent.makeInitialized(
|
|
18
|
+
{
|
|
19
|
+
name,
|
|
20
|
+
instructions,
|
|
21
|
+
blueprints: yield* Effect.forEach(blueprints, (key) =>
|
|
22
|
+
Blueprint.upsert(key).pipe(Effect.map(Ref.make), Effect.orDie),
|
|
23
|
+
),
|
|
24
|
+
subscriptions,
|
|
25
|
+
},
|
|
26
|
+
Obj.clone(AgentBlueprint.make()),
|
|
27
|
+
);
|
|
28
|
+
yield* Operation.invoke(SyncTriggers, { agent: Ref.make(agent) });
|
|
29
|
+
return agent;
|
|
30
|
+
}),
|
|
31
|
+
),
|
|
32
|
+
);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
|
|
7
|
+
import { Blueprint, Operation } from '@dxos/compute';
|
|
8
|
+
import { Database, Feed, Obj, Ref } from '@dxos/echo';
|
|
9
|
+
import { QueueService } from '@dxos/functions';
|
|
10
|
+
|
|
11
|
+
import { Agent } from '../../../types';
|
|
12
|
+
|
|
13
|
+
export const AgentRules = Operation.make({
|
|
14
|
+
meta: {
|
|
15
|
+
key: 'org.dxos.function.agent-wizard.agent-rules',
|
|
16
|
+
name: 'Agent rules',
|
|
17
|
+
description: 'Gets the rules for creating an agent.',
|
|
18
|
+
},
|
|
19
|
+
input: Schema.Struct({}),
|
|
20
|
+
output: Schema.String,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const CreateAgent = Operation.make({
|
|
24
|
+
meta: {
|
|
25
|
+
key: 'org.dxos.function.agent-wizard.create-agent',
|
|
26
|
+
name: 'Create agent',
|
|
27
|
+
description: 'Creates a new agent.',
|
|
28
|
+
},
|
|
29
|
+
input: Schema.Struct({
|
|
30
|
+
name: Schema.String.annotations({
|
|
31
|
+
description: 'The name of the agent to create.',
|
|
32
|
+
}),
|
|
33
|
+
instructions: Schema.String.annotations({
|
|
34
|
+
description:
|
|
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.',
|
|
36
|
+
}),
|
|
37
|
+
blueprints: Schema.Array(Schema.String).annotations({
|
|
38
|
+
description: 'The blueprint keys to use for the agent.',
|
|
39
|
+
examples: [['org.dxos.blueprint.markdown', 'org.dxos.blueprint.database']],
|
|
40
|
+
}),
|
|
41
|
+
subscriptions: Schema.Array(Ref.Ref(Obj.Unknown)).annotations({
|
|
42
|
+
description: 'The objects to subscribe to for the agent. Can be references to mailboxes.',
|
|
43
|
+
}),
|
|
44
|
+
}),
|
|
45
|
+
output: Agent.Agent,
|
|
46
|
+
services: [Blueprint.RegistryService, Database.Service, QueueService, Feed.FeedService],
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const SyncTriggers = Operation.make({
|
|
50
|
+
meta: {
|
|
51
|
+
key: 'org.dxos.function.agent.sync-triggers',
|
|
52
|
+
name: 'Sync triggers',
|
|
53
|
+
description:
|
|
54
|
+
'Synchronizes triggers with the agent: subscriptions, cron, filter-events, and enabled (copied to every trigger). Call after editing those fields.',
|
|
55
|
+
},
|
|
56
|
+
input: Schema.Struct({
|
|
57
|
+
agent: Ref.Ref(Agent.Agent).annotations({
|
|
58
|
+
description: 'The agent whose triggers should be synced.',
|
|
59
|
+
}),
|
|
60
|
+
}),
|
|
61
|
+
output: Schema.Void,
|
|
62
|
+
services: [Database.Service],
|
|
63
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
6
|
+
|
|
7
|
+
export * from './definitions';
|
|
8
|
+
|
|
9
|
+
export const AgentWizardHandlers = OperationHandlerSet.lazy(
|
|
10
|
+
() => import('./create-project'),
|
|
11
|
+
() => import('./project-rules'),
|
|
12
|
+
() => import('./sync-triggers'),
|
|
13
|
+
);
|