@dxos/assistant-toolkit 0.8.4-main.ae835ea → 0.8.4-main.bc2380dfbc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/dist/lib/neutral/add-artifact-4IVGW6CI.mjs +30 -0
- package/dist/lib/neutral/add-artifact-4IVGW6CI.mjs.map +7 -0
- package/dist/lib/neutral/agent-F4L7UXME.mjs +65 -0
- package/dist/lib/neutral/agent-F4L7UXME.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5GPL2WXU.mjs +292 -0
- package/dist/lib/neutral/chunk-5GPL2WXU.mjs.map +7 -0
- package/dist/lib/neutral/chunk-7UCYAP3T.mjs +332 -0
- package/dist/lib/neutral/chunk-7UCYAP3T.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ANSF2BHN.mjs +67 -0
- package/dist/lib/neutral/chunk-ANSF2BHN.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BCT55UTL.mjs +75 -0
- package/dist/lib/neutral/chunk-BCT55UTL.mjs.map +7 -0
- package/dist/lib/neutral/chunk-COL54UJ3.mjs +60 -0
- package/dist/lib/neutral/chunk-COL54UJ3.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-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.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-KS3IA6FQ.mjs +101 -0
- package/dist/lib/neutral/chunk-KS3IA6FQ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-MMQ7HFL4.mjs +107 -0
- package/dist/lib/neutral/chunk-MMQ7HFL4.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-PLGEBNTO.mjs +65 -0
- package/dist/lib/neutral/chunk-PLGEBNTO.mjs.map +7 -0
- package/dist/lib/neutral/chunk-W2722TC5.mjs +70 -0
- package/dist/lib/neutral/chunk-W2722TC5.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-ZFXLTBZG.mjs +73 -0
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +7 -0
- package/dist/lib/neutral/context-add-S5MBW2NA.mjs +22 -0
- package/dist/lib/neutral/context-add-S5MBW2NA.mjs.map +7 -0
- package/dist/lib/neutral/context-remove-35O5T5N5.mjs +22 -0
- package/dist/lib/neutral/context-remove-35O5T5N5.mjs.map +7 -0
- package/dist/lib/neutral/create-project-3AGXJ4TD.mjs +35 -0
- package/dist/lib/neutral/create-project-3AGXJ4TD.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-IVKST3WH.mjs +47 -0
- package/dist/lib/neutral/enable-blueprints-IVKST3WH.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-FBYWIP72.mjs +35 -0
- package/dist/lib/neutral/get-context-FBYWIP72.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +914 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/load-GAT3T2AD.mjs +17 -0
- package/dist/lib/neutral/load-GAT3T2AD.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/object-create-PL3WRP74.mjs +35 -0
- package/dist/lib/neutral/object-create-PL3WRP74.mjs.map +7 -0
- package/dist/lib/neutral/object-delete-PZJQN5KW.mjs +18 -0
- package/dist/lib/neutral/object-delete-PZJQN5KW.mjs.map +7 -0
- package/dist/lib/neutral/object-update-R43N3VJX.mjs +28 -0
- package/dist/lib/neutral/object-update-R43N3VJX.mjs.map +7 -0
- package/dist/lib/neutral/project-VVXXUMAI.mjs +23 -0
- package/dist/lib/neutral/project-VVXXUMAI.mjs.map +7 -0
- package/dist/lib/neutral/project-rules-KSVSOZJV.mjs +78 -0
- package/dist/lib/neutral/project-rules-KSVSOZJV.mjs.map +7 -0
- package/dist/lib/neutral/prompt-INL55Q2B.mjs +170 -0
- package/dist/lib/neutral/prompt-INL55Q2B.mjs.map +7 -0
- package/dist/lib/neutral/qualifier-DAF4H7V3.mjs +88 -0
- package/dist/lib/neutral/qualifier-DAF4H7V3.mjs.map +7 -0
- package/dist/lib/neutral/query-MP5NSQKO.mjs +69 -0
- package/dist/lib/neutral/query-MP5NSQKO.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-PLWYVOI3.mjs +16 -0
- package/dist/lib/neutral/query-blueprints-PLWYVOI3.mjs.map +7 -0
- package/dist/lib/neutral/relation-create-YAAAFTR2.mjs +34 -0
- package/dist/lib/neutral/relation-create-YAAAFTR2.mjs.map +7 -0
- package/dist/lib/neutral/relation-delete-IEPKERFR.mjs +18 -0
- package/dist/lib/neutral/relation-delete-IEPKERFR.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-5BNIINRS.mjs +24 -0
- package/dist/lib/neutral/schema-add-5BNIINRS.mjs.map +7 -0
- package/dist/lib/neutral/schema-list-54UK7S4R.mjs +38 -0
- package/dist/lib/neutral/schema-list-54UK7S4R.mjs.map +7 -0
- package/dist/lib/neutral/sync-issues-DWY76B3M.mjs +166 -0
- package/dist/lib/neutral/sync-issues-DWY76B3M.mjs.map +7 -0
- package/dist/lib/neutral/sync-triggers-NOIQLELD.mjs +135 -0
- package/dist/lib/neutral/sync-triggers-NOIQLELD.mjs.map +7 -0
- package/dist/lib/neutral/tag-add-NLVRGTC6.mjs +19 -0
- package/dist/lib/neutral/tag-add-NLVRGTC6.mjs.map +7 -0
- package/dist/lib/neutral/tag-remove-N4HFBIA2.mjs +19 -0
- package/dist/lib/neutral/tag-remove-N4HFBIA2.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +76 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/neutral/update-blueprints-2SNK6HLG.mjs +16 -0
- package/dist/lib/neutral/update-blueprints-2SNK6HLG.mjs.map +7 -0
- package/dist/lib/neutral/update-tasks-QQUR53RN.mjs +13 -0
- package/dist/lib/neutral/update-tasks-QQUR53RN.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 +2 -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 +61 -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 +36 -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 +27 -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 +4 -0
- package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/browser/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/browser/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/browser/index.d.ts +2 -0
- package/dist/types/src/blueprints/browser/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/database/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/context-add.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -0
- 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 +4 -0
- package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/load.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/object-create.d.ts +8 -0
- package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/object-update.d.ts +10 -0
- package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/query.d.ts +12 -0
- package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts +10 -0
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/schema-add.d.ts +9 -0
- package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts +8 -0
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +8 -0
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/index.d.ts +3 -0
- package/dist/types/src/blueprints/database/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -0
- 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/{functions/discord → blueprints/discord/functions}/fetch-messages.d.ts +3 -2
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/functions/fetch-messages.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/index.d.ts +2 -2
- 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 +8 -0
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -0
- package/dist/types/src/blueprints/github/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/github/index.d.ts +2 -0
- package/dist/types/src/blueprints/github/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +11 -6
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -0
- 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 +4 -0
- package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/functions/linear.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +10 -0
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/index.d.ts +2 -2
- 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 +2 -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 +4 -0
- package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +24 -0
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts +2 -0
- package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/index.d.ts +2 -2
- package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/project/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +4 -0
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/agent.d.ts +4 -0
- package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/definitions.d.ts +166 -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 +4 -0
- package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts +77 -0
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/index.d.ts +3 -0
- package/dist/types/src/blueprints/project/index.d.ts.map +1 -0
- 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 +55 -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 +104 -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 +52 -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 +9 -5
- package/dist/types/src/blueprints/testing.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/blueprint.test.d.ts +2 -0
- 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 +3 -3
- package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/{websearch-toolkit.d.ts → toolkit.d.ts} +4 -1
- package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -0
- package/dist/types/src/{functions/research → crud}/graph.d.ts +12 -11
- package/dist/types/src/crud/graph.d.ts.map +1 -0
- package/dist/types/src/crud/graph.test.d.ts.map +1 -0
- package/dist/types/src/crud/index.d.ts +2 -0
- package/dist/types/src/crud/index.d.ts.map +1 -0
- 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 +61 -0
- package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
- package/dist/types/src/functions/agent/index.d.ts +3 -4
- package/dist/types/src/functions/agent/index.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.d.ts +2 -9
- 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 -6
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/sync/sync.d.ts +3 -4
- package/dist/types/src/sync/sync.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/plugins.d.ts +19 -0
- package/dist/types/src/testing/plugins.d.ts.map +1 -0
- package/dist/types/src/toolkits/WebToolkit.d.ts +38 -0
- package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -0
- package/dist/types/src/toolkits/index.d.ts +2 -0
- package/dist/types/src/toolkits/index.d.ts.map +1 -0
- package/dist/types/src/types/Agent.d.ts +79 -0
- package/dist/types/src/types/Agent.d.ts.map +1 -0
- package/dist/types/src/types/Chat.d.ts +56 -0
- package/dist/types/src/types/Chat.d.ts.map +1 -0
- 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 +89 -0
- package/dist/types/src/types/Plan.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +6 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/util/graphql.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +46 -39
- 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 +202 -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 +61 -0
- package/src/blueprints/browser/blueprint.ts +40 -0
- package/src/blueprints/browser/index.ts +5 -0
- package/src/blueprints/database/blueprint.conversations.json +1 -0
- package/src/blueprints/database/blueprint.test.ts +531 -0
- package/src/blueprints/database/blueprint.ts +66 -0
- package/src/blueprints/database/functions/context-add.ts +24 -0
- package/src/blueprints/database/functions/context-remove.ts +24 -0
- package/src/blueprints/database/functions/definitions.ts +318 -0
- package/src/blueprints/database/functions/index.ts +23 -0
- package/src/blueprints/database/functions/load.ts +19 -0
- package/src/blueprints/database/functions/object-create.ts +38 -0
- package/src/blueprints/database/functions/object-delete.ts +20 -0
- package/src/blueprints/database/functions/object-update.ts +30 -0
- package/src/blueprints/database/functions/query.ts +63 -0
- package/src/blueprints/database/functions/relation-create.ts +34 -0
- package/src/blueprints/database/functions/relation-delete.ts +21 -0
- package/src/blueprints/database/functions/schema-add.ts +28 -0
- package/src/blueprints/database/functions/schema-list.ts +33 -0
- package/src/blueprints/database/functions/tag-add.ts +21 -0
- package/src/blueprints/database/functions/tag-remove.ts +21 -0
- package/src/blueprints/database/index.ts +21 -0
- package/src/blueprints/discord/blueprint.ts +41 -0
- package/src/blueprints/discord/functions/definitions.ts +70 -0
- package/src/blueprints/discord/functions/fetch-messages.test.ts +50 -0
- package/src/blueprints/discord/functions/fetch-messages.ts +198 -0
- package/src/blueprints/discord/functions/index.ts +9 -0
- package/src/blueprints/discord/index.ts +2 -3
- package/src/blueprints/github/functions/definitions.ts +26 -0
- package/src/blueprints/github/functions/fetch-prs.ts +24 -0
- package/src/blueprints/github/functions/index.ts +9 -0
- package/src/blueprints/github/index.ts +5 -0
- package/src/blueprints/index.ts +11 -6
- package/src/blueprints/linear/blueprint.ts +42 -0
- package/src/blueprints/linear/functions/definitions.ts +23 -0
- package/src/blueprints/linear/functions/index.ts +9 -0
- package/src/blueprints/linear/functions/linear.test.ts +57 -0
- package/src/{functions/linear → blueprints/linear/functions}/sync-issues.ts +44 -51
- package/src/blueprints/linear/index.ts +2 -3
- 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 +24 -0
- package/src/blueprints/planning/functions/index.ts +9 -0
- package/src/blueprints/planning/functions/update-tasks.md +116 -0
- package/src/blueprints/planning/functions/update-tasks.test.ts +55 -0
- package/src/blueprints/planning/functions/update-tasks.ts +67 -0
- package/src/blueprints/planning/index.ts +3 -4
- package/src/blueprints/project/blueprint.conversations.json +1 -0
- package/src/blueprints/project/blueprint.test.ts +712 -0
- package/src/blueprints/project/blueprint.ts +64 -0
- package/src/blueprints/project/functions/add-artifact.ts +31 -0
- package/src/blueprints/project/functions/agent.ts +69 -0
- package/src/blueprints/project/functions/definitions.ts +92 -0
- package/src/blueprints/project/functions/get-context.ts +47 -0
- package/src/blueprints/project/functions/index.ts +14 -0
- package/src/blueprints/project/functions/qualifier.ts +90 -0
- package/src/blueprints/project/index.ts +6 -0
- 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 +153 -0
- package/src/blueprints/project-wizard/index.ts +6 -0
- package/src/blueprints/testing.ts +29 -8
- package/src/blueprints/websearch/blueprint.conversations.json +1 -0
- package/src/blueprints/websearch/blueprint.test.ts +39 -0
- package/src/blueprints/websearch/blueprint.ts +30 -0
- 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 +3 -4
- package/src/blueprints/websearch/{websearch-toolkit.ts → toolkit.ts} +6 -1
- package/src/crud/graph.test.ts +44 -0
- package/src/crud/graph.ts +378 -0
- package/src/crud/index.ts +5 -0
- package/src/errors.ts +25 -0
- package/src/functions/READ_THIS.md +5 -0
- package/src/functions/agent/definitions.ts +56 -0
- package/src/functions/agent/index.ts +3 -5
- package/src/functions/agent/prompt.conversations.json +1 -0
- package/src/functions/agent/prompt.test.ts +78 -0
- package/src/functions/agent/prompt.ts +210 -87
- package/src/functions/index.ts +0 -6
- package/src/index.ts +3 -1
- package/src/sync/sync.ts +52 -34
- package/src/testing/index.ts +2 -1
- package/src/testing/plugins.tsx +79 -0
- package/src/toolkits/WebToolkit.ts +33 -0
- package/src/toolkits/index.ts +5 -0
- package/src/types/Agent.ts +238 -0
- package/src/types/Chat.ts +63 -0
- package/src/types/McpServer.ts +37 -0
- package/src/types/Memory.ts +24 -0
- package/src/types/Plan.ts +111 -0
- package/src/types/index.ts +9 -0
- package/dist/lib/browser/index.mjs +0 -2481
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/node-esm/index.mjs +0 -2483
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/types/src/blueprints/design/design-blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/design/design-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/design-blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/design/design-blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/index.d.ts +0 -3
- package/dist/types/src/blueprints/design/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/discord/discord-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/discord/discord-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/linear/linear-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/linear/linear-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning/planning-blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/planning/planning-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/planning/planning-blueprint.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/research-blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/research/research-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/research-blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/research/research-blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/websearch/websearch-toolkit.d.ts.map +0 -1
- package/dist/types/src/experimental/feed.test.d.ts +0 -2
- package/dist/types/src/experimental/feed.test.d.ts.map +0 -1
- package/dist/types/src/functions/discord/fetch-messages.d.ts.map +0 -1
- package/dist/types/src/functions/discord/fetch-messages.test.d.ts.map +0 -1
- package/dist/types/src/functions/discord/index.d.ts +0 -12
- package/dist/types/src/functions/discord/index.d.ts.map +0 -1
- package/dist/types/src/functions/document/index.d.ts +0 -12
- package/dist/types/src/functions/document/index.d.ts.map +0 -1
- package/dist/types/src/functions/document/read.d.ts +0 -7
- package/dist/types/src/functions/document/read.d.ts.map +0 -1
- package/dist/types/src/functions/document/update.d.ts +0 -6
- package/dist/types/src/functions/document/update.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +0 -173
- 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 -174
- package/dist/types/src/functions/entity-extraction/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 -3
- 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/functions/github/fetch-prs.d.ts +0 -6
- package/dist/types/src/functions/github/fetch-prs.d.ts.map +0 -1
- package/dist/types/src/functions/linear/index.d.ts +0 -9
- package/dist/types/src/functions/linear/index.d.ts.map +0 -1
- package/dist/types/src/functions/linear/linear.test.d.ts.map +0 -1
- package/dist/types/src/functions/linear/sync-issues.d.ts +0 -12
- package/dist/types/src/functions/linear/sync-issues.d.ts.map +0 -1
- package/dist/types/src/functions/research/create-document.d.ts +0 -7
- package/dist/types/src/functions/research/create-document.d.ts.map +0 -1
- package/dist/types/src/functions/research/graph.d.ts.map +0 -1
- package/dist/types/src/functions/research/graph.test.d.ts.map +0 -1
- package/dist/types/src/functions/research/index.d.ts +0 -19
- package/dist/types/src/functions/research/index.d.ts.map +0 -1
- package/dist/types/src/functions/research/research-graph.d.ts +0 -18
- package/dist/types/src/functions/research/research-graph.d.ts.map +0 -1
- package/dist/types/src/functions/research/research.d.ts +0 -13
- package/dist/types/src/functions/research/research.d.ts.map +0 -1
- package/dist/types/src/functions/research/research.test.d.ts +0 -2
- package/dist/types/src/functions/research/research.test.d.ts.map +0 -1
- package/dist/types/src/functions/research/types.d.ts +0 -384
- package/dist/types/src/functions/research/types.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/index.d.ts +0 -15
- package/dist/types/src/functions/tasks/index.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/read.d.ts +0 -7
- package/dist/types/src/functions/tasks/read.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/task-list.d.ts +0 -74
- package/dist/types/src/functions/tasks/task-list.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/task-list.test.d.ts +0 -2
- package/dist/types/src/functions/tasks/task-list.test.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/update.d.ts +0 -9
- package/dist/types/src/functions/tasks/update.d.ts.map +0 -1
- package/dist/types/src/plugins.d.ts +0 -19
- package/dist/types/src/plugins.d.ts.map +0 -1
- package/dist/types/src/testing/data/exa-search-1748337321991.d.ts +0 -38
- package/dist/types/src/testing/data/exa-search-1748337321991.d.ts.map +0 -1
- package/dist/types/src/testing/data/exa-search-1748337331526.d.ts +0 -37
- package/dist/types/src/testing/data/exa-search-1748337331526.d.ts.map +0 -1
- package/dist/types/src/testing/data/exa-search-1748337344119.d.ts +0 -58
- package/dist/types/src/testing/data/exa-search-1748337344119.d.ts.map +0 -1
- package/dist/types/src/testing/data/index.d.ts +0 -3
- package/dist/types/src/testing/data/index.d.ts.map +0 -1
- package/src/blueprints/design/design-blueprint.test.ts +0 -108
- package/src/blueprints/design/design-blueprint.ts +0 -33
- package/src/blueprints/design/index.ts +0 -7
- package/src/blueprints/discord/discord-blueprint.ts +0 -34
- package/src/blueprints/linear/linear-blueprint.ts +0 -35
- package/src/blueprints/planning/planning-blueprint.test.ts +0 -129
- package/src/blueprints/planning/planning-blueprint.ts +0 -98
- package/src/blueprints/research/index.ts +0 -7
- package/src/blueprints/research/research-blueprint.test.ts +0 -7
- package/src/blueprints/research/research-blueprint.ts +0 -45
- package/src/blueprints/websearch/websearch-blueprint.ts +0 -20
- package/src/experimental/feed.test.ts +0 -108
- package/src/functions/discord/fetch-messages.test.ts +0 -59
- package/src/functions/discord/fetch-messages.ts +0 -251
- package/src/functions/discord/index.ts +0 -9
- package/src/functions/document/index.ts +0 -11
- package/src/functions/document/read.ts +0 -29
- package/src/functions/document/update.ts +0 -30
- package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -1
- package/src/functions/entity-extraction/entity-extraction.test.ts +0 -100
- package/src/functions/entity-extraction/entity-extraction.ts +0 -163
- package/src/functions/entity-extraction/index.ts +0 -9
- package/src/functions/exa/exa.ts +0 -37
- package/src/functions/exa/index.ts +0 -6
- package/src/functions/exa/mock.ts +0 -71
- package/src/functions/github/fetch-prs.ts +0 -30
- package/src/functions/linear/index.ts +0 -9
- package/src/functions/linear/linear.test.ts +0 -86
- package/src/functions/research/create-document.ts +0 -69
- package/src/functions/research/graph.test.ts +0 -69
- package/src/functions/research/graph.ts +0 -388
- package/src/functions/research/index.ts +0 -15
- package/src/functions/research/instructions-research.tpl +0 -98
- package/src/functions/research/research-graph.ts +0 -47
- package/src/functions/research/research.conversations.json +0 -10714
- package/src/functions/research/research.test.ts +0 -240
- package/src/functions/research/research.ts +0 -155
- package/src/functions/research/types.ts +0 -24
- package/src/functions/tasks/index.ts +0 -11
- package/src/functions/tasks/read.ts +0 -34
- package/src/functions/tasks/task-list.test.ts +0 -99
- package/src/functions/tasks/task-list.ts +0 -165
- package/src/functions/tasks/update.ts +0 -52
- package/src/plugins.tsx +0 -68
- package/src/testing/data/exa-search-1748337321991.ts +0 -131
- package/src/testing/data/exa-search-1748337331526.ts +0 -144
- package/src/testing/data/exa-search-1748337344119.ts +0 -133
- package/src/testing/data/index.ts +0 -11
- /package/dist/types/src/{functions/discord → blueprints/discord/functions}/fetch-messages.test.d.ts +0 -0
- /package/dist/types/src/{functions/linear → blueprints/linear/functions}/linear.test.d.ts +0 -0
- /package/dist/types/src/{functions/research → crud}/graph.test.d.ts +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Blueprint, Template } from '@dxos/compute';
|
|
6
|
+
import { trim } from '@dxos/util';
|
|
7
|
+
|
|
8
|
+
import { AddArtifact } from './functions';
|
|
9
|
+
|
|
10
|
+
const BLUEPRINT_KEY = 'org.dxos.blueprint.agent';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Creates the Agent blueprint. This is a function to avoid circular dependency issues.
|
|
14
|
+
*/
|
|
15
|
+
// TODO(dmaretskyi): Combine with Agent Wizard.
|
|
16
|
+
const make = () =>
|
|
17
|
+
Blueprint.make({
|
|
18
|
+
key: BLUEPRINT_KEY,
|
|
19
|
+
name: 'Agent blueprint',
|
|
20
|
+
instructions: Template.make({
|
|
21
|
+
source: trim`
|
|
22
|
+
You work on an agent. Each agent has instructions - the goal of the agent.
|
|
23
|
+
The agent plan shows the current progress of the agent.
|
|
24
|
+
Agent has a number of associated artifacts you can read/write.
|
|
25
|
+
You can edit them if necessary.
|
|
26
|
+
|
|
27
|
+
IMPORTANT: When creating a new artifact, always add it to the agent using the add-artifact function.
|
|
28
|
+
|
|
29
|
+
{{#with agent}}
|
|
30
|
+
<agent id="{{id}}" name="{{name}}">
|
|
31
|
+
<instructions>
|
|
32
|
+
{{instructions}}
|
|
33
|
+
</instructions>
|
|
34
|
+
<plan>
|
|
35
|
+
{{plan}}
|
|
36
|
+
</plan>
|
|
37
|
+
|
|
38
|
+
<artifacts>
|
|
39
|
+
{{#each artifacts}}
|
|
40
|
+
<artifact type="{{type}}" dxn="{{dxn}}">
|
|
41
|
+
{{name}}
|
|
42
|
+
</artifact>
|
|
43
|
+
{{/each}}
|
|
44
|
+
</artifacts>
|
|
45
|
+
</agent>
|
|
46
|
+
{{/with}}
|
|
47
|
+
`,
|
|
48
|
+
inputs: [
|
|
49
|
+
{
|
|
50
|
+
name: 'agent',
|
|
51
|
+
kind: 'operation',
|
|
52
|
+
operation: 'org.dxos.function.agent.get-context',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
}),
|
|
56
|
+
tools: Blueprint.toolDefinitions({ operations: [AddArtifact] }),
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const blueprint: Blueprint.Definition = {
|
|
60
|
+
key: BLUEPRINT_KEY,
|
|
61
|
+
make,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export default blueprint;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
8
|
+
import { Database, Obj } from '@dxos/echo';
|
|
9
|
+
|
|
10
|
+
import { Agent } from '../../../types';
|
|
11
|
+
import { AddArtifact } from './definitions';
|
|
12
|
+
|
|
13
|
+
export default AddArtifact.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fnUntraced(function* ({ name, artifact }) {
|
|
16
|
+
if (!(yield* Database.load(artifact))) {
|
|
17
|
+
throw new Error('Artifact not found.');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const agent = yield* Agent.getFromChatContext;
|
|
21
|
+
|
|
22
|
+
Obj.update(agent, (agent) => {
|
|
23
|
+
agent.artifacts.push({
|
|
24
|
+
name,
|
|
25
|
+
data: artifact,
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}) as any,
|
|
29
|
+
),
|
|
30
|
+
Operation.opaqueHandler,
|
|
31
|
+
);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Layer from 'effect/Layer';
|
|
7
|
+
|
|
8
|
+
import { AiService } from '@dxos/ai';
|
|
9
|
+
import { AiSession, ToolExecutionServices } from '@dxos/assistant';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
|
+
import { Database, Feed, Obj } from '@dxos/echo';
|
|
12
|
+
import { acquireReleaseResource } from '@dxos/effect';
|
|
13
|
+
import { invariant } from '@dxos/invariant';
|
|
14
|
+
import { ContentBlock } from '@dxos/types';
|
|
15
|
+
|
|
16
|
+
import { Agent } from '../../../types';
|
|
17
|
+
import { AgentWorker } from './definitions';
|
|
18
|
+
|
|
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.');
|
|
27
|
+
|
|
28
|
+
const chatFeed = yield* agent.chat.pipe(
|
|
29
|
+
Database.load,
|
|
30
|
+
Effect.flatMap((chat) => Database.load(chat.feed)),
|
|
31
|
+
Effect.catchTag('ObjectNotFoundError', () => Effect.die(new Error('Unable to load agent chat feed object.'))),
|
|
32
|
+
);
|
|
33
|
+
invariant(chatFeed, 'Agent chat feed not found.');
|
|
34
|
+
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
35
|
+
const session = yield* acquireReleaseResource(() => new AiSession.Session({ feed: chatFeed, runtime }));
|
|
36
|
+
|
|
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);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (!prompt && !event) {
|
|
43
|
+
throw new Error('Either prompt or event must be provided.');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
let input: ContentBlock.Any[] = [];
|
|
47
|
+
if (prompt) {
|
|
48
|
+
input.push({ _tag: 'text', text: prompt, disposition: 'synthetic' });
|
|
49
|
+
}
|
|
50
|
+
if (event) {
|
|
51
|
+
input.push({ _tag: 'text', text: JSON.stringify(event), disposition: 'synthetic' });
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
yield* session
|
|
55
|
+
.createRequest({
|
|
56
|
+
prompt: input,
|
|
57
|
+
})
|
|
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 { AiContext } 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, Feed.FeedService],
|
|
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: [AiContext.Service, 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: [AiContext.Service, Database.Service],
|
|
92
|
+
}).pipe(Operation.intrinsic);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
8
|
+
import { Database, Obj } from '@dxos/echo';
|
|
9
|
+
|
|
10
|
+
import { Plan, Agent } from '../../../types';
|
|
11
|
+
import { GetContext } from './definitions';
|
|
12
|
+
|
|
13
|
+
export default GetContext.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fnUntraced(function* () {
|
|
16
|
+
const agent = yield* Agent.getFromChatContext;
|
|
17
|
+
|
|
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
|
+
Operation.opaqueHandler,
|
|
47
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
6
|
+
|
|
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
|
+
);
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as LanguageModel from '@effect/ai/LanguageModel';
|
|
6
|
+
import * as Prompt from '@effect/ai/Prompt';
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
import * as Schema from 'effect/Schema';
|
|
9
|
+
|
|
10
|
+
import { AiService } from '@dxos/ai';
|
|
11
|
+
import { Operation } from '@dxos/compute';
|
|
12
|
+
import { Database, Feed, Obj, Ref } from '@dxos/echo';
|
|
13
|
+
import { invariant } from '@dxos/invariant';
|
|
14
|
+
import { trim } from '@dxos/util';
|
|
15
|
+
|
|
16
|
+
import { Plan, Agent } from '../../../types';
|
|
17
|
+
import { Qualifier } from './definitions';
|
|
18
|
+
|
|
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.');
|
|
26
|
+
|
|
27
|
+
const { id, name, feed: queue } = agent;
|
|
28
|
+
if (!queue) {
|
|
29
|
+
throw new Error('Agent has no queue.');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const plan = yield* Database.load(agent.plan);
|
|
33
|
+
const instructions = yield* Database.load(agent.instructions);
|
|
34
|
+
|
|
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>
|
|
55
|
+
`,
|
|
56
|
+
}),
|
|
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
|
+
]),
|
|
69
|
+
}),
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
const { isRelevant } = value as { isRelevant: boolean };
|
|
73
|
+
|
|
74
|
+
if (isRelevant) {
|
|
75
|
+
const feedTarget = yield* Database.load(queue);
|
|
76
|
+
if ('queue' in event && event.item) {
|
|
77
|
+
const obj = event.item;
|
|
78
|
+
yield* Feed.append(feedTarget, [obj]);
|
|
79
|
+
} else if ('subject' in event && Ref.isRef(event.subject)) {
|
|
80
|
+
const obj = yield* Database.load(event.subject);
|
|
81
|
+
yield* Feed.append(feedTarget, [obj]);
|
|
82
|
+
} else {
|
|
83
|
+
throw new Error('Invalid event.');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
Effect.provide(AiService.model('@anthropic/claude-sonnet-4-5')),
|
|
88
|
+
),
|
|
89
|
+
),
|
|
90
|
+
);
|
|
@@ -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
|
+
);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
8
|
+
import { trim } from '@dxos/util';
|
|
9
|
+
|
|
10
|
+
import { AgentRules } from './definitions';
|
|
11
|
+
|
|
12
|
+
export default AgentRules.pipe(
|
|
13
|
+
Operation.withHandler(
|
|
14
|
+
Effect.fnUntraced(function* () {
|
|
15
|
+
return trim`
|
|
16
|
+
You can ask the user for qualifying questions about the agents.
|
|
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.
|
|
19
|
+
Use [query-blueprints] from the Blueprint Manager to query for available blueprints and their keys.
|
|
20
|
+
Use [create-agent] function to create a new agent.
|
|
21
|
+
|
|
22
|
+
Notable blueprints (query to get their keys):
|
|
23
|
+
|
|
24
|
+
- Blueprint Manger - allows agent to self-enable blueprints (always include this one).
|
|
25
|
+
- Database -- CRUD on objects in the ECHO database.
|
|
26
|
+
- Markdown -- Create and edit markdown documents.
|
|
27
|
+
- Websearch -- Search the web for information.
|
|
28
|
+
- Browser -- Virtual browser via playwright when simple WebSearch is not enough.
|
|
29
|
+
- Memory -- Memory to store and retrieve information.
|
|
30
|
+
|
|
31
|
+
Experimental blueprints that are discouraged:
|
|
32
|
+
|
|
33
|
+
- Research
|
|
34
|
+
- Design
|
|
35
|
+
- Agent (not wizard) -- those are agent internals, they are auto-added to every new agent.
|
|
36
|
+
|
|
37
|
+
<example_agent>
|
|
38
|
+
## CRM from your inbox
|
|
39
|
+
|
|
40
|
+
Blueprints: database, websearch, browser
|
|
41
|
+
|
|
42
|
+
Subscribe to your inboxes.
|
|
43
|
+
Spec says that on every email we should extract People and Organizations and save them to the database, but first query the database for existing people and organizations to avoid duplicates.
|
|
44
|
+
Also run a quick research on the web to find more information about the person or organization and save it to the database.
|
|
45
|
+
</example_agent>
|
|
46
|
+
|
|
47
|
+
<example_agent>
|
|
48
|
+
## Parcel tracking
|
|
49
|
+
|
|
50
|
+
Blueprints: database
|
|
51
|
+
|
|
52
|
+
Based on emails from vendors (amazon, fedex, etc.) track the status of the parcels ordered online and keep a table of orders.
|
|
53
|
+
|
|
54
|
+
Before creating an agent, use the Database blueprint to create an Order schema:
|
|
55
|
+
- seller
|
|
56
|
+
- name
|
|
57
|
+
- price
|
|
58
|
+
- status (enum of: pending, shipped, waiting for pickup, delivered, cancelled, returned)
|
|
59
|
+
- tracking numbers/notes
|
|
60
|
+
- date of delivery
|
|
61
|
+
- shipping address
|
|
62
|
+
</example_agent>
|
|
63
|
+
|
|
64
|
+
<example_agent>
|
|
65
|
+
## Comms assistant
|
|
66
|
+
|
|
67
|
+
Blueprints: database, markdown, inbox
|
|
68
|
+
|
|
69
|
+
Helps user maintain comms with external parites via email.
|
|
70
|
+
Ask user specifically who they want to communicate with and on what topic.
|
|
71
|
+
Agent should keep a markdown document in artifacts outlining the current state of the comms.
|
|
72
|
+
Agent should propose drafts to follow up on the comms. Only propose sensible drafts, do not propose drafts that are not relevant or actionable.
|
|
73
|
+
</example_agent>
|
|
74
|
+
`;
|
|
75
|
+
}),
|
|
76
|
+
),
|
|
77
|
+
);
|