@dxos/assistant-toolkit 0.8.4-main.03d5cd7b56
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 +8 -0
- package/README.md +3 -0
- package/dist/lib/neutral/add-artifact-ZUJ5DMSY.mjs +30 -0
- package/dist/lib/neutral/add-artifact-ZUJ5DMSY.mjs.map +7 -0
- package/dist/lib/neutral/agent-5NIKAYUK.mjs +65 -0
- package/dist/lib/neutral/agent-5NIKAYUK.mjs.map +7 -0
- package/dist/lib/neutral/chunk-246ACKSH.mjs +100 -0
- package/dist/lib/neutral/chunk-246ACKSH.mjs.map +7 -0
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs +73 -0
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs +140 -0
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GV66MKAQ.mjs +60 -0
- package/dist/lib/neutral/chunk-GV66MKAQ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-IKBIORQX.mjs +332 -0
- package/dist/lib/neutral/chunk-IKBIORQX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-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-NR3GTWRC.mjs +53 -0
- package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-P4ZMYO4K.mjs +294 -0
- package/dist/lib/neutral/chunk-P4ZMYO4K.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QO5SU37C.mjs +70 -0
- package/dist/lib/neutral/chunk-QO5SU37C.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ROMZO4CB.mjs +108 -0
- package/dist/lib/neutral/chunk-ROMZO4CB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TO5IX24K.mjs +67 -0
- package/dist/lib/neutral/chunk-TO5IX24K.mjs.map +7 -0
- package/dist/lib/neutral/chunk-WLR3BGO4.mjs +25 -0
- package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +7 -0
- package/dist/lib/neutral/chunk-XUF53B6B.mjs +75 -0
- package/dist/lib/neutral/chunk-XUF53B6B.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs +73 -0
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +7 -0
- package/dist/lib/neutral/context-add-VB7AOY3G.mjs +22 -0
- package/dist/lib/neutral/context-add-VB7AOY3G.mjs.map +7 -0
- package/dist/lib/neutral/context-remove-VCM3VPSO.mjs +22 -0
- package/dist/lib/neutral/context-remove-VCM3VPSO.mjs.map +7 -0
- package/dist/lib/neutral/create-project-EIF4OJMY.mjs +35 -0
- package/dist/lib/neutral/create-project-EIF4OJMY.mjs.map +7 -0
- package/dist/lib/neutral/delete-J3PMWP7Z.mjs +19 -0
- package/dist/lib/neutral/delete-J3PMWP7Z.mjs.map +7 -0
- package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs +47 -0
- package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs.map +7 -0
- package/dist/lib/neutral/fetch-KHMHV7JR.mjs +16 -0
- package/dist/lib/neutral/fetch-KHMHV7JR.mjs.map +7 -0
- package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs +139 -0
- package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs.map +7 -0
- package/dist/lib/neutral/get-context-TN7X7U2H.mjs +35 -0
- package/dist/lib/neutral/get-context-TN7X7U2H.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +916 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/load-ALP3TK2E.mjs +17 -0
- package/dist/lib/neutral/load-ALP3TK2E.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/object-create-Z57Y3X6Y.mjs +35 -0
- package/dist/lib/neutral/object-create-Z57Y3X6Y.mjs.map +7 -0
- package/dist/lib/neutral/object-delete-X53LS37B.mjs +18 -0
- package/dist/lib/neutral/object-delete-X53LS37B.mjs.map +7 -0
- package/dist/lib/neutral/object-update-GVKSBR7T.mjs +28 -0
- package/dist/lib/neutral/object-update-GVKSBR7T.mjs.map +7 -0
- package/dist/lib/neutral/project-HPHTZ2CI.mjs +23 -0
- package/dist/lib/neutral/project-HPHTZ2CI.mjs.map +7 -0
- package/dist/lib/neutral/project-rules-IVDHKSKI.mjs +78 -0
- package/dist/lib/neutral/project-rules-IVDHKSKI.mjs.map +7 -0
- package/dist/lib/neutral/prompt-Y7NN7M5D.mjs +170 -0
- package/dist/lib/neutral/prompt-Y7NN7M5D.mjs.map +7 -0
- package/dist/lib/neutral/qualifier-VDOY5CWU.mjs +88 -0
- package/dist/lib/neutral/qualifier-VDOY5CWU.mjs.map +7 -0
- package/dist/lib/neutral/query-PPJU5622.mjs +70 -0
- package/dist/lib/neutral/query-PPJU5622.mjs.map +7 -0
- package/dist/lib/neutral/query-U56GNEV6.mjs +32 -0
- package/dist/lib/neutral/query-U56GNEV6.mjs.map +7 -0
- package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs +16 -0
- package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs.map +7 -0
- package/dist/lib/neutral/relation-create-XJ2IX6X3.mjs +34 -0
- package/dist/lib/neutral/relation-create-XJ2IX6X3.mjs.map +7 -0
- package/dist/lib/neutral/relation-delete-EP4KXAFL.mjs +18 -0
- package/dist/lib/neutral/relation-delete-EP4KXAFL.mjs.map +7 -0
- package/dist/lib/neutral/save-GWAPLT3Z.mjs +23 -0
- package/dist/lib/neutral/save-GWAPLT3Z.mjs.map +7 -0
- package/dist/lib/neutral/schema-add-Z5CY6P24.mjs +24 -0
- package/dist/lib/neutral/schema-add-Z5CY6P24.mjs.map +7 -0
- package/dist/lib/neutral/schema-list-W326VPVX.mjs +38 -0
- package/dist/lib/neutral/schema-list-W326VPVX.mjs.map +7 -0
- package/dist/lib/neutral/sync-issues-4YE5XAK5.mjs +167 -0
- package/dist/lib/neutral/sync-issues-4YE5XAK5.mjs.map +7 -0
- package/dist/lib/neutral/sync-triggers-CDMJVW6E.mjs +136 -0
- package/dist/lib/neutral/sync-triggers-CDMJVW6E.mjs.map +7 -0
- package/dist/lib/neutral/tag-add-VNIIOVJA.mjs +19 -0
- package/dist/lib/neutral/tag-add-VNIIOVJA.mjs.map +7 -0
- package/dist/lib/neutral/tag-remove-6R2R27W3.mjs +19 -0
- package/dist/lib/neutral/tag-remove-6R2R27W3.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +76 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs +16 -0
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs.map +7 -0
- package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs +46 -0
- package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs.map +7 -0
- package/dist/types/src/blueprints/automation/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/automation/index.d.ts +2 -0
- package/dist/types/src/blueprints/automation/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts +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 +63 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +37 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +28 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/index.d.ts +3 -0
- package/dist/types/src/blueprints/blueprint-manager/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/browser/blueprint.d.ts +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 +13 -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/blueprints/discord/functions/fetch-messages.d.ts +12 -0
- 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 +2 -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 +3 -0
- package/dist/types/src/blueprints/discord/index.d.ts.map +1 -0
- 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 +12 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- 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 +2 -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 +3 -0
- package/dist/types/src/blueprints/linear/index.d.ts.map +1 -0
- 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/definitions.d.ts +11 -0
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/index.d.ts +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 +11 -0
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/index.d.ts +3 -0
- package/dist/types/src/blueprints/planning/index.d.ts.map +1 -0
- 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 +8 -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 +158 -0
- package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/get-context.d.ts +15 -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 +73 -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 +51 -0
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +96 -0
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +48 -0
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/index.d.ts +3 -0
- package/dist/types/src/blueprints/project-wizard/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/testing.d.ts +16 -0
- package/dist/types/src/blueprints/testing.d.ts.map +1 -0
- 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 +4 -0
- package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/toolkit.d.ts +29 -0
- package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -0
- package/dist/types/src/crud/graph.d.ts +67 -0
- package/dist/types/src/crud/graph.d.ts.map +1 -0
- package/dist/types/src/crud/graph.test.d.ts +2 -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 +62 -0
- package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
- package/dist/types/src/functions/agent/index.d.ts +4 -0
- package/dist/types/src/functions/agent/index.d.ts.map +1 -0
- package/dist/types/src/functions/agent/prompt.d.ts +4 -0
- package/dist/types/src/functions/agent/prompt.d.ts.map +1 -0
- 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 +2 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +7 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/sync/index.d.ts +2 -0
- package/dist/types/src/sync/index.d.ts.map +1 -0
- package/dist/types/src/sync/sync.d.ts +15 -0
- package/dist/types/src/sync/sync.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- 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 +77 -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 +22 -0
- package/dist/types/src/util/graphql.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +2 -0
- package/dist/types/src/util/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +74 -0
- package/src/blueprints/automation/blueprint.ts +105 -0
- package/src/blueprints/automation/index.ts +5 -0
- package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -0
- package/src/blueprints/blueprint-manager/blueprint.test.ts +198 -0
- package/src/blueprints/blueprint-manager/blueprint.ts +49 -0
- package/src/blueprints/blueprint-manager/functions/definitions.ts +57 -0
- package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +43 -0
- package/src/blueprints/blueprint-manager/functions/index.ts +13 -0
- package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +18 -0
- package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +18 -0
- package/src/blueprints/blueprint-manager/index.ts +6 -0
- package/src/blueprints/browser/blueprint.test.ts +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 +64 -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 +45 -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 +6 -0
- 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 +15 -0
- 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 +58 -0
- package/src/blueprints/linear/functions/sync-issues.ts +183 -0
- package/src/blueprints/linear/index.ts +6 -0
- package/src/blueprints/memory/blueprint.conversations.json +1 -0
- package/src/blueprints/memory/blueprint.test.ts +139 -0
- package/src/blueprints/memory/blueprint.ts +41 -0
- package/src/blueprints/memory/functions/definitions.ts +68 -0
- package/src/blueprints/memory/functions/delete.ts +20 -0
- package/src/blueprints/memory/functions/index.ts +13 -0
- package/src/blueprints/memory/functions/query.ts +32 -0
- package/src/blueprints/memory/functions/save.ts +20 -0
- package/src/blueprints/memory/index.ts +6 -0
- package/src/blueprints/planning/blueprint.ts +24 -0
- package/src/blueprints/planning/functions/definitions.ts +137 -0
- package/src/blueprints/planning/functions/index.ts +9 -0
- package/src/blueprints/planning/functions/update-tasks.ts +45 -0
- package/src/blueprints/planning/index.ts +6 -0
- package/src/blueprints/project/blueprint.conversations.json +1 -0
- package/src/blueprints/project/blueprint.test.ts +714 -0
- package/src/blueprints/project/blueprint.ts +64 -0
- package/src/blueprints/project/functions/add-artifact.ts +30 -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 +46 -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 +158 -0
- package/src/blueprints/project-wizard/index.ts +6 -0
- package/src/blueprints/testing.ts +49 -0
- 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 +7 -0
- package/src/blueprints/websearch/toolkit.ts +13 -0
- package/src/crud/graph.test.ts +44 -0
- package/src/crud/graph.ts +380 -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 +9 -0
- package/src/functions/agent/prompt.conversations.json +1 -0
- package/src/functions/agent/prompt.test.ts +81 -0
- package/src/functions/agent/prompt.ts +224 -0
- package/src/functions/index.ts +5 -0
- package/src/index.ts +10 -0
- package/src/sync/index.ts +5 -0
- package/src/sync/sync.ts +106 -0
- package/src/testing/index.ts +6 -0
- package/src/testing/plugins.tsx +79 -0
- package/src/toolkits/WebToolkit.ts +33 -0
- package/src/toolkits/index.ts +5 -0
- package/src/typedefs.d.ts +8 -0
- package/src/types/Agent.ts +240 -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 +110 -0
- package/src/types/index.ts +9 -0
- package/src/util/graphql.ts +31 -0
- package/src/util/index.ts +5 -0
|
@@ -0,0 +1,240 @@
|
|
|
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 { AiContextBinder, AiContextService } 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 { Queue } from '@dxos/echo-db';
|
|
15
|
+
import { type ObjectNotFoundError } from '@dxos/echo/Err';
|
|
16
|
+
import { FormInputAnnotation } from '@dxos/echo/internal';
|
|
17
|
+
import { acquireReleaseResource } from '@dxos/effect';
|
|
18
|
+
import { QueueService } from '@dxos/functions';
|
|
19
|
+
import { invariant } from '@dxos/invariant';
|
|
20
|
+
import { Text } from '@dxos/schema';
|
|
21
|
+
|
|
22
|
+
import * as Chat from './Chat';
|
|
23
|
+
import * as Plan from './Plan';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Agent schema definition.
|
|
27
|
+
*/
|
|
28
|
+
export const Agent = Schema.Struct({
|
|
29
|
+
name: Schema.optional(Schema.String),
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* When false, agent triggers are disabled after sync-triggers runs.
|
|
33
|
+
*/
|
|
34
|
+
enabled: Schema.optional(Schema.Boolean).annotations({
|
|
35
|
+
title: 'Enabled',
|
|
36
|
+
description: 'Master switch for agent automation; propagated to all triggers on sync.',
|
|
37
|
+
}),
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Instructions for the agent.
|
|
41
|
+
*/
|
|
42
|
+
instructions: Ref.Ref(Text.Text).pipe(
|
|
43
|
+
Format.FormatAnnotation.set(Format.TypeFormat.Markdown),
|
|
44
|
+
Schema.annotations({ title: 'Instructions' }),
|
|
45
|
+
),
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Primary chat for the agent.
|
|
49
|
+
*/
|
|
50
|
+
// TODO(dmaretskyi): Multiple chats; RB: branching hierarchy.
|
|
51
|
+
chat: Schema.optional(Ref.Ref(Chat.Chat).pipe(FormInputAnnotation.set(false))),
|
|
52
|
+
|
|
53
|
+
// TODO(burdon): Is this used? Should it be an artifact?
|
|
54
|
+
// Format.FormatAnnotation.set(Format.TypeFormat.Markdown)
|
|
55
|
+
plan: Ref.Ref(Plan.Plan).pipe(FormInputAnnotation.set(false)),
|
|
56
|
+
|
|
57
|
+
// TODO(burdon): Currently Memory.Memory objects are global to the space; make them artifacts?
|
|
58
|
+
artifacts: Schema.Array(
|
|
59
|
+
Schema.Struct({
|
|
60
|
+
// TODO(dmaretskyi): Consider gettings names from the artifact itself using Obj.getLabel.
|
|
61
|
+
name: Schema.String,
|
|
62
|
+
// TODO(burdon): Rename object.
|
|
63
|
+
data: Ref.Ref(Obj.Unknown),
|
|
64
|
+
}),
|
|
65
|
+
).pipe(FormInputAnnotation.set(false)),
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* References to objects with a canonical queue property.
|
|
69
|
+
* Schema must have the QueueAnnotation.
|
|
70
|
+
*/
|
|
71
|
+
// Change to trigger.
|
|
72
|
+
// TODO(dmaretskyi): Turn into an array of objects when form-data
|
|
73
|
+
subscriptions: Schema.Array(Ref.Ref(Obj.Unknown)).pipe(FormInputAnnotation.set(false)),
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Cron expression for a timer trigger that invokes the agent worker on a schedule.
|
|
77
|
+
* The timer trigger bypasses the qualifier and goes straight to the agent worker.
|
|
78
|
+
*/
|
|
79
|
+
// Change to trigger.
|
|
80
|
+
cron: Schema.optional(Schema.String).annotations({
|
|
81
|
+
title: 'Cron',
|
|
82
|
+
description: 'Cron expression for a timer trigger that invokes the agent on a schedule.',
|
|
83
|
+
}),
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Allow the agent to filter events.
|
|
87
|
+
* Related events will be added to the input queue of the agent.
|
|
88
|
+
* It is recommended to enable this.
|
|
89
|
+
* @deprecated
|
|
90
|
+
*/
|
|
91
|
+
filterEvents: Schema.optional(Schema.Boolean).annotations({
|
|
92
|
+
title: 'Filter events',
|
|
93
|
+
description: 'Allow the agent to filter events.',
|
|
94
|
+
}),
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Input feed for subscriptions.
|
|
98
|
+
* @deprecated Subscriptions will write directly to the agent.
|
|
99
|
+
*/
|
|
100
|
+
queue: Schema.optional(Ref.Ref(Queue).pipe(FormInputAnnotation.set(false))),
|
|
101
|
+
}).pipe(
|
|
102
|
+
Type.object({
|
|
103
|
+
typename: 'org.dxos.type.agent',
|
|
104
|
+
version: '0.1.0',
|
|
105
|
+
}),
|
|
106
|
+
Annotation.LabelAnnotation.set(['name']),
|
|
107
|
+
Annotation.IconAnnotation.set({
|
|
108
|
+
icon: 'ph--drone--regular',
|
|
109
|
+
hue: 'sky',
|
|
110
|
+
}),
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
export interface Agent extends Schema.Schema.Type<typeof Agent> {}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Creates a fully initialized Agent with chat, queue, and context bindings.
|
|
117
|
+
*
|
|
118
|
+
* @param props - Agent properties including spec, plan, blueprints, and context objects.
|
|
119
|
+
* @param blueprint - The blueprint to use for the agent context.
|
|
120
|
+
* @returns An Effect that yields the initialized Agent.
|
|
121
|
+
*/
|
|
122
|
+
export const makeInitialized = (
|
|
123
|
+
props: Omit<Obj.MakeProps<typeof Agent>, 'instructions' | 'plan' | 'artifacts' | 'subscriptions' | 'chat'> &
|
|
124
|
+
Partial<Pick<Obj.MakeProps<typeof Agent>, 'artifacts' | 'subscriptions'>> & {
|
|
125
|
+
instructions: string;
|
|
126
|
+
blueprints?: Ref.Ref<Blueprint.Blueprint>[];
|
|
127
|
+
contextObjects?: Ref.Ref<Obj.Any>[];
|
|
128
|
+
},
|
|
129
|
+
blueprint: Blueprint.Blueprint,
|
|
130
|
+
): Effect.Effect<Agent, never, QueueService | Feed.FeedService | Database.Service> =>
|
|
131
|
+
Effect.gen(function* () {
|
|
132
|
+
const agent = Obj.make(Agent, {
|
|
133
|
+
...props,
|
|
134
|
+
instructions: Ref.make(Text.make({ content: props.instructions })),
|
|
135
|
+
plan: Ref.make(Plan.makePlan({ tasks: [] })),
|
|
136
|
+
artifacts: props.artifacts ?? [],
|
|
137
|
+
subscriptions: props.subscriptions ?? [],
|
|
138
|
+
filterEvents: props.filterEvents ?? true,
|
|
139
|
+
enabled: props.enabled ?? true,
|
|
140
|
+
});
|
|
141
|
+
yield* Database.add(agent);
|
|
142
|
+
const feed = yield* Database.add(Feed.make());
|
|
143
|
+
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
144
|
+
const contextBinder = new AiContextBinder({ feed, runtime });
|
|
145
|
+
// TODO(dmaretskyi): Blueprint registry.
|
|
146
|
+
const agentBlueprint = yield* Database.add(Obj.clone(blueprint, { deep: true }));
|
|
147
|
+
yield* Effect.promise(() =>
|
|
148
|
+
contextBinder.bind({
|
|
149
|
+
blueprints: [Ref.make(agentBlueprint), ...(props.blueprints ?? [])],
|
|
150
|
+
objects: [Ref.make(agent), ...(props.contextObjects ?? [])],
|
|
151
|
+
}),
|
|
152
|
+
);
|
|
153
|
+
const chat = yield* Database.add(
|
|
154
|
+
Chat.make({
|
|
155
|
+
[Obj.Parent]: agent,
|
|
156
|
+
feed: Ref.make(feed),
|
|
157
|
+
}),
|
|
158
|
+
);
|
|
159
|
+
Obj.setParent(feed, chat);
|
|
160
|
+
yield* Database.add(
|
|
161
|
+
Relation.make(Chat.CompanionTo, {
|
|
162
|
+
[Relation.Source]: chat,
|
|
163
|
+
[Relation.Target]: agent,
|
|
164
|
+
}),
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
const inputQueue = yield* QueueService.createQueue();
|
|
168
|
+
|
|
169
|
+
Obj.update(agent, (agent) => {
|
|
170
|
+
agent.chat = Ref.make(chat);
|
|
171
|
+
agent.queue = Ref.fromDXN(inputQueue.dxn);
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
return agent;
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Resets the agent chat history by rebuilding the chat context.
|
|
179
|
+
* Preserves the existing blueprints and objects from the current chat context.
|
|
180
|
+
*
|
|
181
|
+
* @param agent - The agent whose chat history should be reset. Must have an existing chat.
|
|
182
|
+
* @returns An Effect that resets the chat history.
|
|
183
|
+
*/
|
|
184
|
+
export const resetChatHistory = (
|
|
185
|
+
agent: Agent,
|
|
186
|
+
): Effect.Effect<void, ObjectNotFoundError, Feed.FeedService | Database.Service> =>
|
|
187
|
+
Effect.gen(function* () {
|
|
188
|
+
invariant(agent.chat, 'Agent must have an existing chat to reset.');
|
|
189
|
+
|
|
190
|
+
const existingFeed = yield* agent.chat.pipe(Database.load).pipe(
|
|
191
|
+
Effect.map((_) => _.feed),
|
|
192
|
+
Effect.flatMap(Database.load),
|
|
193
|
+
);
|
|
194
|
+
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
195
|
+
const existingContextBinder = yield* acquireReleaseResource(
|
|
196
|
+
() =>
|
|
197
|
+
new AiContextBinder({
|
|
198
|
+
feed: existingFeed,
|
|
199
|
+
runtime,
|
|
200
|
+
}),
|
|
201
|
+
);
|
|
202
|
+
const blueprints = existingContextBinder.getBlueprints().map((blueprint) => Ref.make(blueprint));
|
|
203
|
+
const objects = existingContextBinder.getObjects().map((object) => Ref.make(object));
|
|
204
|
+
|
|
205
|
+
const feed = yield* Database.add(Feed.make());
|
|
206
|
+
const contextBinder = new AiContextBinder({ feed, runtime });
|
|
207
|
+
yield* Effect.promise(() =>
|
|
208
|
+
contextBinder.bind({
|
|
209
|
+
blueprints,
|
|
210
|
+
objects,
|
|
211
|
+
}),
|
|
212
|
+
);
|
|
213
|
+
|
|
214
|
+
const chat = yield* Database.add(
|
|
215
|
+
Chat.make({
|
|
216
|
+
feed: Ref.make(feed),
|
|
217
|
+
}),
|
|
218
|
+
);
|
|
219
|
+
Obj.setParent(feed, chat);
|
|
220
|
+
Obj.update(agent, (agent) => {
|
|
221
|
+
agent.chat = Ref.make(chat);
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
yield* Database.add(
|
|
225
|
+
Relation.make(Chat.CompanionTo, {
|
|
226
|
+
[Relation.Source]: chat,
|
|
227
|
+
[Relation.Target]: agent,
|
|
228
|
+
}),
|
|
229
|
+
);
|
|
230
|
+
}).pipe(Effect.scoped);
|
|
231
|
+
|
|
232
|
+
export const getFromChatContext: Effect.Effect<Agent, Error, AiContextService> = Effect.gen(function* () {
|
|
233
|
+
const agents = yield* Function.pipe(AiContextService.findObjects(Agent));
|
|
234
|
+
if (agents.length !== 1) {
|
|
235
|
+
return yield* Effect.fail(new Error(`There should be exactly one agent in context. Got: ${agents.length}`));
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
const agent = agents[0];
|
|
239
|
+
return agent;
|
|
240
|
+
});
|
|
@@ -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,110 @@
|
|
|
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
|
+
export interface Task extends Schema.Schema.Type<typeof Task> {}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Hierarchical collection of tasks for humans and agents to track progress.
|
|
44
|
+
*/
|
|
45
|
+
export const Plan = Schema.Struct({
|
|
46
|
+
tasks: Schema.Array(Task),
|
|
47
|
+
}).pipe(
|
|
48
|
+
Type.object({
|
|
49
|
+
typename: 'org.dxos.type.plan',
|
|
50
|
+
version: '0.1.0',
|
|
51
|
+
}),
|
|
52
|
+
Annotation.SystemTypeAnnotation.set(true),
|
|
53
|
+
);
|
|
54
|
+
export interface Plan extends Schema.Schema.Type<typeof Plan> {}
|
|
55
|
+
|
|
56
|
+
export const generateTaskId = (plan: Plan): TaskId => {
|
|
57
|
+
const existingIds = plan.tasks
|
|
58
|
+
.map((task) => {
|
|
59
|
+
const [num, letter] = task.id.split('-');
|
|
60
|
+
return parseInt(num);
|
|
61
|
+
})
|
|
62
|
+
.filter((_) => !isNaN(_));
|
|
63
|
+
let newId;
|
|
64
|
+
if (existingIds.length === 0) {
|
|
65
|
+
newId = 1;
|
|
66
|
+
} else {
|
|
67
|
+
newId = Math.max(...existingIds) + 1;
|
|
68
|
+
}
|
|
69
|
+
// Add random suffix to avoid collisions.
|
|
70
|
+
return TaskId.make(`${newId}-${crypto.randomUUID().slice(0, 2)}`);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Add new tasks to a plan, generating IDs for new tasks.
|
|
75
|
+
* Use inside an `Obj.update` callback.
|
|
76
|
+
*/
|
|
77
|
+
export const addTasks = (
|
|
78
|
+
plan: Obj.Mutable<Plan>,
|
|
79
|
+
tasks: (Pick<Task, 'title'> & Partial<Pick<Task, 'status' | 'parent' | 'chat'>>)[],
|
|
80
|
+
) => {
|
|
81
|
+
for (const task of tasks) {
|
|
82
|
+
const taskId = generateTaskId(plan);
|
|
83
|
+
plan.tasks.push({ id: taskId, ...task, status: task.status ?? 'todo' });
|
|
84
|
+
}
|
|
85
|
+
return plan;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
interface MakePlanProps {
|
|
89
|
+
tasks: {
|
|
90
|
+
title: string;
|
|
91
|
+
status?: 'todo' | 'in-progress' | 'done';
|
|
92
|
+
}[];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const makePlan = (props: MakePlanProps): Plan => {
|
|
96
|
+
const plan = Obj.make(Plan, { tasks: [] });
|
|
97
|
+
Obj.update(plan, (plan) => {
|
|
98
|
+
addTasks(plan, props.tasks);
|
|
99
|
+
});
|
|
100
|
+
return plan;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Formats plan to markdown format.
|
|
105
|
+
*/
|
|
106
|
+
export const formatPlan = (plan: Plan): string => {
|
|
107
|
+
return plan.tasks
|
|
108
|
+
.map((task) => `- **${task.status?.toLocaleUpperCase()}**: ${task.title ?? 'No title'} <!-- id=${task.id} -->`)
|
|
109
|
+
.join('\n');
|
|
110
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as HttpBody from '@effect/platform/HttpBody';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Template tag literal to get syntax highlighting for the query.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const query = gql`
|
|
13
|
+
* query Team($teamId: String!) {
|
|
14
|
+
* team(id: $teamId) {
|
|
15
|
+
* id
|
|
16
|
+
* name
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
* `;
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export const gql = (query: string) => query;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @returns JSON body for the graphql request.
|
|
26
|
+
*/
|
|
27
|
+
export const graphqlRequestBody = (query: string, variables: Record<string, any> = {}) =>
|
|
28
|
+
HttpBody.json({
|
|
29
|
+
query,
|
|
30
|
+
variables,
|
|
31
|
+
});
|