@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,238 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
import * as Function from 'effect/Function';
|
|
9
|
+
import * as Schema from 'effect/Schema';
|
|
10
|
+
|
|
11
|
+
import { AiContext } from '@dxos/assistant';
|
|
12
|
+
import { type Blueprint } from '@dxos/compute';
|
|
13
|
+
import { Annotation, Database, Feed, Format, Obj, Ref, Relation, Type } from '@dxos/echo';
|
|
14
|
+
import { type ObjectNotFoundError } from '@dxos/echo/Err';
|
|
15
|
+
import { FormInputAnnotation } from '@dxos/echo/internal';
|
|
16
|
+
import { acquireReleaseResource } from '@dxos/effect';
|
|
17
|
+
import { invariant } from '@dxos/invariant';
|
|
18
|
+
import { Text } from '@dxos/schema';
|
|
19
|
+
|
|
20
|
+
import * as Chat from './Chat';
|
|
21
|
+
import * as Plan from './Plan';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Agent schema definition.
|
|
25
|
+
*/
|
|
26
|
+
export const Agent = Schema.Struct({
|
|
27
|
+
name: Schema.optional(Schema.String),
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* When false, agent triggers are disabled after sync-triggers runs.
|
|
31
|
+
*/
|
|
32
|
+
enabled: Schema.optional(Schema.Boolean).annotations({
|
|
33
|
+
title: 'Enabled',
|
|
34
|
+
description: 'Master switch for agent automation; propagated to all triggers on sync.',
|
|
35
|
+
}),
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Instructions for the agent.
|
|
39
|
+
*/
|
|
40
|
+
instructions: Ref.Ref(Text.Text).pipe(
|
|
41
|
+
Format.FormatAnnotation.set(Format.TypeFormat.Markdown),
|
|
42
|
+
Schema.annotations({ title: 'Instructions' }),
|
|
43
|
+
),
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Primary chat for the agent.
|
|
47
|
+
*/
|
|
48
|
+
// TODO(dmaretskyi): Multiple chats; RB: branching hierarchy.
|
|
49
|
+
chat: Schema.optional(Ref.Ref(Chat.Chat).pipe(FormInputAnnotation.set(false))),
|
|
50
|
+
|
|
51
|
+
// TODO(burdon): Is this used? Should it be an artifact?
|
|
52
|
+
// Format.FormatAnnotation.set(Format.TypeFormat.Markdown)
|
|
53
|
+
plan: Ref.Ref(Plan.Plan).pipe(FormInputAnnotation.set(false)),
|
|
54
|
+
|
|
55
|
+
// TODO(burdon): Currently Memory.Memory objects are global to the space; make them artifacts?
|
|
56
|
+
artifacts: Schema.Array(
|
|
57
|
+
Schema.Struct({
|
|
58
|
+
// TODO(dmaretskyi): Consider gettings names from the artifact itself using Obj.getLabel.
|
|
59
|
+
name: Schema.String,
|
|
60
|
+
// TODO(burdon): Rename object.
|
|
61
|
+
data: Ref.Ref(Obj.Unknown),
|
|
62
|
+
}),
|
|
63
|
+
).pipe(FormInputAnnotation.set(false)),
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* References to objects with a canonical queue property.
|
|
67
|
+
* Schema must have the QueueAnnotation.
|
|
68
|
+
*/
|
|
69
|
+
// Change to trigger.
|
|
70
|
+
// TODO(dmaretskyi): Turn into an array of objects when form-data
|
|
71
|
+
subscriptions: Schema.Array(Ref.Ref(Obj.Unknown)).pipe(FormInputAnnotation.set(false)),
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Cron expression for a timer trigger that invokes the agent worker on a schedule.
|
|
75
|
+
* The timer trigger bypasses the qualifier and goes straight to the agent worker.
|
|
76
|
+
*/
|
|
77
|
+
// Change to trigger.
|
|
78
|
+
cron: Schema.optional(Schema.String).annotations({
|
|
79
|
+
title: 'Cron',
|
|
80
|
+
description: 'Cron expression for a timer trigger that invokes the agent on a schedule.',
|
|
81
|
+
}),
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Allow the agent to filter events.
|
|
85
|
+
* Related events will be added to the input queue of the agent.
|
|
86
|
+
* It is recommended to enable this.
|
|
87
|
+
* @deprecated
|
|
88
|
+
*/
|
|
89
|
+
filterEvents: Schema.optional(Schema.Boolean).annotations({
|
|
90
|
+
title: 'Filter events',
|
|
91
|
+
description: 'Allow the agent to filter events.',
|
|
92
|
+
}),
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Input feed for subscriptions.
|
|
96
|
+
* @deprecated Subscriptions will write directly to the agent.
|
|
97
|
+
*/
|
|
98
|
+
feed: Schema.optional(Ref.Ref(Feed.Feed).pipe(FormInputAnnotation.set(false))),
|
|
99
|
+
}).pipe(
|
|
100
|
+
Type.object({
|
|
101
|
+
typename: 'org.dxos.type.agent',
|
|
102
|
+
version: '0.1.0',
|
|
103
|
+
}),
|
|
104
|
+
Annotation.LabelAnnotation.set(['name']),
|
|
105
|
+
Annotation.IconAnnotation.set({
|
|
106
|
+
icon: 'ph--drone--regular',
|
|
107
|
+
hue: 'sky',
|
|
108
|
+
}),
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
export interface Agent extends Schema.Schema.Type<typeof Agent> {}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Creates a fully initialized Agent with chat, queue, and context bindings.
|
|
115
|
+
*
|
|
116
|
+
* @param props - Agent properties including spec, plan, blueprints, and context objects.
|
|
117
|
+
* @param blueprint - The blueprint to use for the agent context.
|
|
118
|
+
* @returns An Effect that yields the initialized Agent.
|
|
119
|
+
*/
|
|
120
|
+
export const makeInitialized = (
|
|
121
|
+
props: Omit<Obj.MakeProps<typeof Agent>, 'instructions' | 'plan' | 'artifacts' | 'subscriptions' | 'chat'> &
|
|
122
|
+
Partial<Pick<Obj.MakeProps<typeof Agent>, 'artifacts' | 'subscriptions'>> & {
|
|
123
|
+
instructions: string;
|
|
124
|
+
blueprints?: Ref.Ref<Blueprint.Blueprint>[];
|
|
125
|
+
contextObjects?: Ref.Ref<Obj.Any>[];
|
|
126
|
+
},
|
|
127
|
+
blueprint: Blueprint.Blueprint,
|
|
128
|
+
): Effect.Effect<Agent, never, Feed.FeedService | Database.Service> =>
|
|
129
|
+
Effect.gen(function* () {
|
|
130
|
+
const agent = Obj.make(Agent, {
|
|
131
|
+
...props,
|
|
132
|
+
instructions: Ref.make(Text.make({ content: props.instructions })),
|
|
133
|
+
plan: Ref.make(Plan.makePlan({ tasks: [] })),
|
|
134
|
+
artifacts: props.artifacts ?? [],
|
|
135
|
+
subscriptions: props.subscriptions ?? [],
|
|
136
|
+
filterEvents: props.filterEvents ?? true,
|
|
137
|
+
enabled: props.enabled ?? true,
|
|
138
|
+
});
|
|
139
|
+
yield* Database.add(agent);
|
|
140
|
+
const feed = yield* Database.add(Feed.make());
|
|
141
|
+
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
142
|
+
const contextBinder = new AiContext.Binder({ feed, runtime });
|
|
143
|
+
// TODO(dmaretskyi): Blueprint registry.
|
|
144
|
+
const agentBlueprint = yield* Database.add(Obj.clone(blueprint, { deep: true }));
|
|
145
|
+
yield* Effect.promise(() =>
|
|
146
|
+
contextBinder.bind({
|
|
147
|
+
blueprints: [Ref.make(agentBlueprint), ...(props.blueprints ?? [])],
|
|
148
|
+
objects: [Ref.make(agent), ...(props.contextObjects ?? [])],
|
|
149
|
+
}),
|
|
150
|
+
);
|
|
151
|
+
const chat = yield* Database.add(
|
|
152
|
+
Chat.make({
|
|
153
|
+
[Obj.Parent]: agent,
|
|
154
|
+
feed: Ref.make(feed),
|
|
155
|
+
}),
|
|
156
|
+
);
|
|
157
|
+
Obj.setParent(feed, chat);
|
|
158
|
+
yield* Database.add(
|
|
159
|
+
Relation.make(Chat.CompanionTo, {
|
|
160
|
+
[Relation.Source]: chat,
|
|
161
|
+
[Relation.Target]: agent,
|
|
162
|
+
}),
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
const inputFeed = yield* Database.add(Feed.make());
|
|
166
|
+
|
|
167
|
+
Obj.update(agent, (agent) => {
|
|
168
|
+
agent.chat = Ref.make(chat);
|
|
169
|
+
agent.feed = Ref.make(inputFeed);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
return agent;
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Resets the agent chat history by rebuilding the chat context.
|
|
177
|
+
* Preserves the existing blueprints and objects from the current chat context.
|
|
178
|
+
*
|
|
179
|
+
* @param agent - The agent whose chat history should be reset. Must have an existing chat.
|
|
180
|
+
* @returns An Effect that resets the chat history.
|
|
181
|
+
*/
|
|
182
|
+
export const resetChatHistory = (
|
|
183
|
+
agent: Agent,
|
|
184
|
+
): Effect.Effect<void, ObjectNotFoundError, Feed.FeedService | Database.Service> =>
|
|
185
|
+
Effect.gen(function* () {
|
|
186
|
+
invariant(agent.chat, 'Agent must have an existing chat to reset.');
|
|
187
|
+
|
|
188
|
+
const existingFeed = yield* agent.chat.pipe(Database.load).pipe(
|
|
189
|
+
Effect.map((_) => _.feed),
|
|
190
|
+
Effect.flatMap(Database.load),
|
|
191
|
+
);
|
|
192
|
+
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
193
|
+
const existingContextBinder = yield* acquireReleaseResource(
|
|
194
|
+
() =>
|
|
195
|
+
new AiContext.Binder({
|
|
196
|
+
feed: existingFeed,
|
|
197
|
+
runtime,
|
|
198
|
+
}),
|
|
199
|
+
);
|
|
200
|
+
const blueprints = existingContextBinder.getBlueprints().map((blueprint) => Ref.make(blueprint));
|
|
201
|
+
const objects = existingContextBinder.getObjects().map((object) => Ref.make(object));
|
|
202
|
+
|
|
203
|
+
const feed = yield* Database.add(Feed.make());
|
|
204
|
+
const contextBinder = new AiContext.Binder({ feed, runtime });
|
|
205
|
+
yield* Effect.promise(() =>
|
|
206
|
+
contextBinder.bind({
|
|
207
|
+
blueprints,
|
|
208
|
+
objects,
|
|
209
|
+
}),
|
|
210
|
+
);
|
|
211
|
+
|
|
212
|
+
const chat = yield* Database.add(
|
|
213
|
+
Chat.make({
|
|
214
|
+
feed: Ref.make(feed),
|
|
215
|
+
}),
|
|
216
|
+
);
|
|
217
|
+
Obj.setParent(feed, chat);
|
|
218
|
+
Obj.update(agent, (agent) => {
|
|
219
|
+
agent.chat = Ref.make(chat);
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
yield* Database.add(
|
|
223
|
+
Relation.make(Chat.CompanionTo, {
|
|
224
|
+
[Relation.Source]: chat,
|
|
225
|
+
[Relation.Target]: agent,
|
|
226
|
+
}),
|
|
227
|
+
);
|
|
228
|
+
}).pipe(Effect.scoped);
|
|
229
|
+
|
|
230
|
+
export const getFromChatContext: Effect.Effect<Agent, Error, AiContext.Service> = Effect.gen(function* () {
|
|
231
|
+
const agents = yield* Function.pipe(AiContext.Service.findObjects(Agent));
|
|
232
|
+
if (agents.length !== 1) {
|
|
233
|
+
return yield* Effect.fail(new Error(`There should be exactly one agent in context. Got: ${agents.length}`));
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const agent = agents[0];
|
|
237
|
+
return agent;
|
|
238
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
import { Annotation, Feed, Obj, Ref, Type } from '@dxos/echo';
|
|
10
|
+
import { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* AI chat.
|
|
14
|
+
*/
|
|
15
|
+
export const Chat = Schema.Struct({
|
|
16
|
+
name: Schema.String.pipe(Schema.optional),
|
|
17
|
+
feed: Ref.Ref(Feed.Feed).pipe(FormInputAnnotation.set(false)),
|
|
18
|
+
view: Schema.String.pipe(Schema.optional),
|
|
19
|
+
}).pipe(
|
|
20
|
+
Type.object({
|
|
21
|
+
typename: 'org.dxos.type.assistant.chat',
|
|
22
|
+
version: '0.1.0',
|
|
23
|
+
}),
|
|
24
|
+
LabelAnnotation.set(['name']),
|
|
25
|
+
Annotation.IconAnnotation.set({
|
|
26
|
+
icon: 'ph--sparkle--regular',
|
|
27
|
+
hue: 'sky',
|
|
28
|
+
}),
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
export interface Chat extends Schema.Schema.Type<typeof Chat> {}
|
|
32
|
+
|
|
33
|
+
export const make = (props: Obj.MakeProps<typeof Chat>) => Obj.make(Chat, props);
|
|
34
|
+
|
|
35
|
+
/** @deprecated Use CompanionTo instead. */
|
|
36
|
+
export const LegacyCompanionTo = Schema.Struct({
|
|
37
|
+
id: Obj.ID,
|
|
38
|
+
}).pipe(
|
|
39
|
+
Type.relation({
|
|
40
|
+
typename: 'org.dxos.relation.assistant.companion-to',
|
|
41
|
+
version: '0.1.0',
|
|
42
|
+
source: Chat,
|
|
43
|
+
target: Obj.Unknown,
|
|
44
|
+
}),
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
export interface LegacyCompanionTo extends Schema.Schema.Type<typeof LegacyCompanionTo> {}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Relation between a Chat and companion objects (e.g., artifacts).
|
|
51
|
+
*/
|
|
52
|
+
export const CompanionTo = Schema.Struct({
|
|
53
|
+
id: Obj.ID,
|
|
54
|
+
}).pipe(
|
|
55
|
+
Type.relation({
|
|
56
|
+
typename: 'org.dxos.relation.assistant.companionTo',
|
|
57
|
+
version: '0.1.0',
|
|
58
|
+
source: Chat,
|
|
59
|
+
target: Obj.Unknown,
|
|
60
|
+
}),
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
export interface CompanionTo extends Schema.Schema.Type<typeof CompanionTo> {}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
import { McpServer as McpServerSpec } from '@dxos/compute';
|
|
10
|
+
import { Annotation, Type } from '@dxos/echo';
|
|
11
|
+
import { LabelAnnotation } from '@dxos/echo/internal';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* MCP server configuration stored as a space-level ECHO object.
|
|
15
|
+
*
|
|
16
|
+
* Composes the canonical connection spec from `@dxos/compute` (`url`, `protocol`, `apiKey`)
|
|
17
|
+
* and adds instance-level fields (`name`, `enabled`) plus ECHO annotations.
|
|
18
|
+
*
|
|
19
|
+
* NOTE: `apiKey` is stored in plaintext and replicated to all peers with access to the space.
|
|
20
|
+
* A future iteration should move secrets to per-device credential storage or use envelope encryption.
|
|
21
|
+
*/
|
|
22
|
+
export const McpServer = Schema.Struct({
|
|
23
|
+
...McpServerSpec.McpServer.fields,
|
|
24
|
+
enabled: Schema.optional(Schema.Boolean),
|
|
25
|
+
}).pipe(
|
|
26
|
+
Type.object({
|
|
27
|
+
typename: 'org.dxos.type.assistant.mcpServer',
|
|
28
|
+
version: '0.1.0',
|
|
29
|
+
}),
|
|
30
|
+
LabelAnnotation.set(['name']),
|
|
31
|
+
Annotation.IconAnnotation.set({
|
|
32
|
+
icon: 'ph--plugs-connected--regular',
|
|
33
|
+
hue: 'sky',
|
|
34
|
+
}),
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
export interface McpServer extends Schema.Schema.Type<typeof McpServer> {}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
|
|
7
|
+
import { Annotation, Type } from '@dxos/echo';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Unit of knowledge generated by an agent.
|
|
11
|
+
*/
|
|
12
|
+
export const Memory = Schema.Struct({
|
|
13
|
+
title: Schema.String,
|
|
14
|
+
content: Schema.String,
|
|
15
|
+
}).pipe(
|
|
16
|
+
Type.object({ typename: 'org.dxos.type.memory', version: '0.1.0' }),
|
|
17
|
+
Annotation.LabelAnnotation.set(['title']),
|
|
18
|
+
Annotation.IconAnnotation.set({
|
|
19
|
+
icon: 'ph--brain--regular',
|
|
20
|
+
hue: 'pink',
|
|
21
|
+
}),
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export interface Memory extends Schema.Schema.Type<typeof Memory> {}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
import { Annotation, Obj, Ref, Type } from '@dxos/echo';
|
|
10
|
+
|
|
11
|
+
import * as Chat from './Chat';
|
|
12
|
+
|
|
13
|
+
export const TaskId = Schema.String.pipe(Schema.brand('@dxos/assistant-toolkit/TaskId'));
|
|
14
|
+
export type TaskId = Schema.Schema.Type<typeof TaskId>;
|
|
15
|
+
|
|
16
|
+
export const Task = Schema.Struct({
|
|
17
|
+
/**
|
|
18
|
+
* Short task ID unique within the plan.
|
|
19
|
+
*/
|
|
20
|
+
id: TaskId,
|
|
21
|
+
|
|
22
|
+
title: Schema.String.annotations({
|
|
23
|
+
description: 'Task title and description.',
|
|
24
|
+
}),
|
|
25
|
+
|
|
26
|
+
status: Schema.Literal('todo', 'in-progress', 'done'),
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Parent task ID.
|
|
30
|
+
*/
|
|
31
|
+
parent: Schema.optional(TaskId).annotations({
|
|
32
|
+
description: 'Parent task ID.',
|
|
33
|
+
}),
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Chat object that this task is associated with.
|
|
37
|
+
*/
|
|
38
|
+
chat: Schema.optional(Ref.Ref(Chat.Chat)),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export interface Task extends Schema.Schema.Type<typeof Task> {}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Hierarchical collection of tasks for humans and agents to track progress.
|
|
45
|
+
*/
|
|
46
|
+
export const Plan = Schema.Struct({
|
|
47
|
+
tasks: Schema.Array(Task),
|
|
48
|
+
}).pipe(
|
|
49
|
+
Type.object({
|
|
50
|
+
typename: 'org.dxos.type.plan',
|
|
51
|
+
version: '0.1.0',
|
|
52
|
+
}),
|
|
53
|
+
Annotation.SystemTypeAnnotation.set(true),
|
|
54
|
+
);
|
|
55
|
+
export interface Plan extends Schema.Schema.Type<typeof Plan> {}
|
|
56
|
+
|
|
57
|
+
export const generateTaskId = (plan: Plan): TaskId => {
|
|
58
|
+
const existingIds = plan.tasks
|
|
59
|
+
.map((task) => {
|
|
60
|
+
const [num, letter] = task.id.split('-');
|
|
61
|
+
return parseInt(num);
|
|
62
|
+
})
|
|
63
|
+
.filter((_) => !isNaN(_));
|
|
64
|
+
let newId;
|
|
65
|
+
if (existingIds.length === 0) {
|
|
66
|
+
newId = 1;
|
|
67
|
+
} else {
|
|
68
|
+
newId = Math.max(...existingIds) + 1;
|
|
69
|
+
}
|
|
70
|
+
// Add random suffix to avoid collisions.
|
|
71
|
+
return TaskId.make(`${newId}-${crypto.randomUUID().slice(0, 2)}`);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Add new tasks to a plan, generating IDs for new tasks.
|
|
76
|
+
* Use inside an `Obj.update` callback.
|
|
77
|
+
*/
|
|
78
|
+
export const addTasks = (
|
|
79
|
+
plan: Obj.Mutable<Plan>,
|
|
80
|
+
tasks: (Pick<Task, 'title'> & Partial<Pick<Task, 'status' | 'parent' | 'chat'>>)[],
|
|
81
|
+
) => {
|
|
82
|
+
for (const task of tasks) {
|
|
83
|
+
const taskId = generateTaskId(plan);
|
|
84
|
+
plan.tasks.push({ id: taskId, ...task, status: task.status ?? 'todo' });
|
|
85
|
+
}
|
|
86
|
+
return plan;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
interface MakePlanProps {
|
|
90
|
+
tasks: {
|
|
91
|
+
title: string;
|
|
92
|
+
status?: 'todo' | 'in-progress' | 'done';
|
|
93
|
+
}[];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const makePlan = (props: MakePlanProps): Plan => {
|
|
97
|
+
const plan = Obj.make(Plan, { tasks: [] });
|
|
98
|
+
Obj.update(plan, (plan) => {
|
|
99
|
+
addTasks(plan, props.tasks);
|
|
100
|
+
});
|
|
101
|
+
return plan;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Formats plan to markdown format.
|
|
106
|
+
*/
|
|
107
|
+
export const formatPlan = (plan: Plan): string => {
|
|
108
|
+
return plan.tasks
|
|
109
|
+
.map((task) => `- **${task.status?.toLocaleUpperCase()}**: ${task.title ?? 'No title'} <!-- id=${task.id} -->`)
|
|
110
|
+
.join('\n');
|
|
111
|
+
};
|