@dxos/assistant-toolkit 0.8.4-main.3c1ae3b → 0.8.4-main.3fbcb4aa9b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/neutral/add-artifact-ZUJ5DMSY.mjs +30 -0
- package/dist/lib/neutral/add-artifact-ZUJ5DMSY.mjs.map +7 -0
- package/dist/lib/neutral/agent-5NIKAYUK.mjs +65 -0
- package/dist/lib/neutral/agent-5NIKAYUK.mjs.map +7 -0
- package/dist/lib/neutral/chunk-246ACKSH.mjs +100 -0
- package/dist/lib/neutral/chunk-246ACKSH.mjs.map +7 -0
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs +73 -0
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs +140 -0
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GV66MKAQ.mjs +60 -0
- package/dist/lib/neutral/chunk-GV66MKAQ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-IKBIORQX.mjs +332 -0
- package/dist/lib/neutral/chunk-IKBIORQX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-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/{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/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 +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 +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 +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} +3 -1
- package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -0
- package/dist/types/src/crud/graph.d.ts +11 -9
- package/dist/types/src/crud/graph.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +41 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/functions/agent/definitions.d.ts +62 -0
- package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
- package/dist/types/src/functions/agent/index.d.ts +3 -4
- package/dist/types/src/functions/agent/index.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.d.ts +2 -7
- 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 +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/sync/sync.d.ts +2 -2
- 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 +1 -2
- package/dist/types/src/toolkits/index.d.ts.map +1 -1
- package/dist/types/src/types/Agent.d.ts +77 -0
- package/dist/types/src/types/Agent.d.ts.map +1 -0
- package/dist/types/src/types/Chat.d.ts +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 +45 -40
- 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 +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 +58 -0
- package/src/{functions/linear → blueprints/linear/functions}/sync-issues.ts +37 -44
- 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/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 +3 -4
- 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 +23 -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 +12 -38
- package/src/crud/graph.ts +15 -18
- 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 +81 -0
- package/src/functions/agent/prompt.ts +212 -105
- package/src/functions/index.ts +0 -6
- package/src/index.ts +2 -2
- package/src/sync/sync.ts +51 -30
- 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 +1 -2
- 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/dist/lib/browser/index.mjs +0 -2789
- 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 -2790
- 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 -19
- package/dist/types/src/blueprints/discord/discord-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/linear/linear-blueprint.d.ts +0 -19
- 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 -13
- 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 -172
- 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 -173
- 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/document-create.d.ts +0 -9
- package/dist/types/src/functions/research/document-create.d.ts.map +0 -1
- package/dist/types/src/functions/research/index.d.ts +0 -21
- package/dist/types/src/functions/research/index.d.ts.map +0 -1
- package/dist/types/src/functions/research/research-graph.d.ts +0 -19
- package/dist/types/src/functions/research/research-graph.d.ts.map +0 -1
- package/dist/types/src/functions/research/research.d.ts +0 -14
- 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 -6
- 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/dist/types/src/toolkits/AssistantToolkit.d.ts +0 -17
- package/dist/types/src/toolkits/AssistantToolkit.d.ts.map +0 -1
- package/dist/types/src/toolkits/AssistantToolkit.test.d.ts +0 -2
- package/dist/types/src/toolkits/AssistantToolkit.test.d.ts.map +0 -1
- package/dist/types/src/toolkits/SystemToolkit.d.ts +0 -67
- package/dist/types/src/toolkits/SystemToolkit.d.ts.map +0 -1
- package/src/blueprints/design/design-blueprint.test.ts +0 -105
- 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 -126
- 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 -53
- package/src/blueprints/websearch/websearch-blueprint.ts +0 -20
- package/src/experimental/feed.test.ts +0 -111
- package/src/functions/discord/fetch-messages.test.ts +0 -58
- package/src/functions/discord/fetch-messages.ts +0 -252
- package/src/functions/discord/index.ts +0 -9
- package/src/functions/document/index.ts +0 -12
- package/src/functions/document/read.ts +0 -30
- package/src/functions/document/update.ts +0 -31
- package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -1
- package/src/functions/entity-extraction/entity-extraction.test.ts +0 -93
- package/src/functions/entity-extraction/entity-extraction.ts +0 -174
- 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 -84
- package/src/functions/research/document-create.ts +0 -76
- package/src/functions/research/index.ts +0 -14
- package/src/functions/research/research-graph.ts +0 -49
- package/src/functions/research/research-instructions.tpl +0 -106
- package/src/functions/research/research.conversations.json +0 -1
- package/src/functions/research/research.test.ts +0 -175
- package/src/functions/research/research.ts +0 -191
- package/src/functions/research/types.ts +0 -26
- package/src/functions/tasks/index.ts +0 -11
- package/src/functions/tasks/read.ts +0 -35
- 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 -53
- 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/src/toolkits/AssistantToolkit.conversations.json +0 -1
- package/src/toolkits/AssistantToolkit.test.ts +0 -90
- package/src/toolkits/AssistantToolkit.ts +0 -47
- package/src/toolkits/SystemToolkit.ts +0 -231
- /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/src/functions/index.ts
CHANGED
package/src/index.ts
CHANGED
package/src/sync/sync.ts
CHANGED
|
@@ -18,18 +18,27 @@ import { log } from '@dxos/log';
|
|
|
18
18
|
* @param opts.foreignKeyId - The key to use for matching objects.
|
|
19
19
|
*/
|
|
20
20
|
export const syncObjects: (
|
|
21
|
-
objs: Obj.
|
|
21
|
+
objs: Obj.Unknown[],
|
|
22
22
|
opts: { foreignKeyId: string },
|
|
23
|
-
) => Effect.Effect<Obj.
|
|
23
|
+
) => Effect.Effect<Obj.Unknown[], never, Database.Service> = Effect.fn('syncObjects')(function* (
|
|
24
|
+
objs,
|
|
25
|
+
{ foreignKeyId },
|
|
26
|
+
) {
|
|
24
27
|
return yield* Effect.forEach(
|
|
25
28
|
objs,
|
|
26
29
|
Effect.fnUntraced(function* (obj) {
|
|
27
30
|
// Sync referenced objects.
|
|
28
31
|
for (const key of Object.keys(obj)) {
|
|
29
|
-
if (typeof key !== 'string' || key === 'id')
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (!
|
|
32
|
+
if (typeof key !== 'string' || key === 'id') {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (!Ref.isRef((obj as any)[key])) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
const ref: Ref.Unknown = (obj as any)[key];
|
|
39
|
+
if (!ref.target) {
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
33
42
|
if (Obj.getDXN(ref.target).isLocalObjectId()) {
|
|
34
43
|
// obj not persisted to db.
|
|
35
44
|
const [target] = yield* syncObjects([ref.target], { foreignKeyId });
|
|
@@ -39,7 +48,7 @@ export const syncObjects: (
|
|
|
39
48
|
|
|
40
49
|
const schema = Obj.getSchema(obj) ?? failedInvariant('No schema.');
|
|
41
50
|
const foreignId = Obj.getKeys(obj, foreignKeyId)[0]?.id ?? failedInvariant('No foreign key.');
|
|
42
|
-
const [existing] = yield* Database.
|
|
51
|
+
const [existing] = yield* Database.runQuery(
|
|
43
52
|
Query.select(Filter.foreignKeys(schema, [{ source: foreignKeyId, id: foreignId }])),
|
|
44
53
|
);
|
|
45
54
|
log('sync object', {
|
|
@@ -48,7 +57,7 @@ export const syncObjects: (
|
|
|
48
57
|
existing: existing ? Obj.getDXN(existing) : undefined,
|
|
49
58
|
});
|
|
50
59
|
if (!existing) {
|
|
51
|
-
yield* Database.
|
|
60
|
+
yield* Database.add(obj);
|
|
52
61
|
return obj;
|
|
53
62
|
} else {
|
|
54
63
|
copyObjectData(existing, obj);
|
|
@@ -59,27 +68,39 @@ export const syncObjects: (
|
|
|
59
68
|
);
|
|
60
69
|
});
|
|
61
70
|
|
|
62
|
-
const copyObjectData = (existing: Obj.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
const copyObjectData = (existing: Obj.Unknown, newObj: Obj.Unknown) => {
|
|
72
|
+
Obj.update(existing, (existing) => {
|
|
73
|
+
// Copy properties from newObj to existing.
|
|
74
|
+
for (const key of Object.keys(newObj)) {
|
|
75
|
+
if (typeof key !== 'string' || key === 'id') {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
if (
|
|
79
|
+
typeof (newObj as any)[key] !== 'string' &&
|
|
80
|
+
typeof (newObj as any)[key] !== 'number' &&
|
|
81
|
+
typeof (newObj as any)[key] !== 'boolean' &&
|
|
82
|
+
!Ref.isRef((newObj as any)[key])
|
|
83
|
+
) {
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
(existing as any)[key] = (newObj as any)[key];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Delete properties that don't exist in newObj.
|
|
90
|
+
for (const key of Object.keys(existing)) {
|
|
91
|
+
if (typeof key !== 'string' || key === 'id') {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
if (!(key in newObj)) {
|
|
95
|
+
delete (existing as any)[key];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Update foreign keys.
|
|
100
|
+
for (const foreignKey of Obj.getMeta(newObj).keys) {
|
|
101
|
+
Obj.deleteKeys(existing, foreignKey.source);
|
|
102
|
+
// TODO(dmaretskyi): Doesn't work: `Obj.getMeta(existing).keys.push(foreignKey);`
|
|
103
|
+
Obj.getMeta(existing).keys.push({ ...foreignKey });
|
|
78
104
|
}
|
|
79
|
-
}
|
|
80
|
-
for (const foreignKey of Obj.getMeta(newObj).keys) {
|
|
81
|
-
Obj.deleteKeys(existing, foreignKey.source);
|
|
82
|
-
// TODO(dmaretskyi): Doesn't work: `Obj.getMeta(existing).keys.push(foreignKey);`
|
|
83
|
-
Obj.getMeta(existing).keys.push({ ...foreignKey });
|
|
84
|
-
}
|
|
105
|
+
});
|
|
85
106
|
};
|
package/src/testing/index.ts
CHANGED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { Format, type Obj, Type } from '@dxos/echo';
|
|
11
|
+
import { Card } from '@dxos/react-ui';
|
|
12
|
+
import { Syntax } from '@dxos/react-ui-syntax-highlighter';
|
|
13
|
+
|
|
14
|
+
export const MapSchema = Schema.Struct({
|
|
15
|
+
coordinates: Format.GeoPoint,
|
|
16
|
+
}).pipe(
|
|
17
|
+
Type.object({
|
|
18
|
+
typename: 'com.example.type.map',
|
|
19
|
+
version: '0.1.0',
|
|
20
|
+
}),
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
export type MapSchema = Schema.Schema.Type<typeof MapSchema>;
|
|
24
|
+
|
|
25
|
+
// TODO(burdon): Move to ECHO def.
|
|
26
|
+
export type ArtifactsContext = {
|
|
27
|
+
items: Obj.Unknown[];
|
|
28
|
+
getArtifacts: () => Obj.Unknown[];
|
|
29
|
+
addArtifact: (artifact: Obj.Unknown) => void;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
declare global {
|
|
33
|
+
interface ToolContextExtensions {
|
|
34
|
+
artifacts?: ArtifactsContext;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// TODO(dmaretskyi): Removed images from conductor GPT implementation.
|
|
39
|
+
const isImage = (data: any): data is any => false;
|
|
40
|
+
|
|
41
|
+
export const capabilities: Capability.Any[] = [
|
|
42
|
+
Capability.contributes(
|
|
43
|
+
Capabilities.ReactSurface,
|
|
44
|
+
Surface.create({
|
|
45
|
+
id: 'plugin-image',
|
|
46
|
+
role: 'card--content',
|
|
47
|
+
filter: (data: any): data is any => isImage(data.value),
|
|
48
|
+
component: ({ data }) => (
|
|
49
|
+
<Card.Content>
|
|
50
|
+
<img
|
|
51
|
+
className='grow object-cover'
|
|
52
|
+
src={`data:image/jpeg;base64,${data.value.source.data}`}
|
|
53
|
+
alt={data.value.prompt ?? `Generated image [id=${data.value.id}]`}
|
|
54
|
+
/>
|
|
55
|
+
</Card.Content>
|
|
56
|
+
),
|
|
57
|
+
}),
|
|
58
|
+
),
|
|
59
|
+
Capability.contributes(
|
|
60
|
+
Capabilities.ReactSurface,
|
|
61
|
+
Surface.create({
|
|
62
|
+
id: 'plugin-default',
|
|
63
|
+
role: 'card--content',
|
|
64
|
+
position: 'fallback',
|
|
65
|
+
component: ({ data }) => (
|
|
66
|
+
<Card.Content>
|
|
67
|
+
<Syntax.Root data={data}>
|
|
68
|
+
<Syntax.Content>
|
|
69
|
+
<Syntax.Filter />
|
|
70
|
+
<Syntax.Viewport>
|
|
71
|
+
<Syntax.Code />
|
|
72
|
+
</Syntax.Viewport>
|
|
73
|
+
</Syntax.Content>
|
|
74
|
+
</Syntax.Root>
|
|
75
|
+
</Card.Content>
|
|
76
|
+
),
|
|
77
|
+
}),
|
|
78
|
+
),
|
|
79
|
+
];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as AnthropicTool from '@effect/ai-anthropic/AnthropicTool';
|
|
6
|
+
import * as Tool from '@effect/ai/Tool';
|
|
7
|
+
import * as Toolkit from '@effect/ai/Toolkit';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
import * as Schema from 'effect/Schema';
|
|
10
|
+
|
|
11
|
+
// TODO(dmaretskyi): Testing only.
|
|
12
|
+
export const WebToolkit = Toolkit.make(
|
|
13
|
+
AnthropicTool.WebSearch_20250305({}).pipe(
|
|
14
|
+
// TODO(dmaretskyi): Effect bug -- provider-defined tools don't support annotations.
|
|
15
|
+
// ToolFormatter.assign({
|
|
16
|
+
// debugFormatResult: (result) =>
|
|
17
|
+
// Array.isArray(result) ? result.map(Struct.pick('title', 'type', 'url', 'page_age')) : result,
|
|
18
|
+
// }),
|
|
19
|
+
),
|
|
20
|
+
Tool.make('WebFetch', {
|
|
21
|
+
parameters: {
|
|
22
|
+
url: Schema.String,
|
|
23
|
+
},
|
|
24
|
+
success: Schema.String,
|
|
25
|
+
}),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
export const layer = WebToolkit.toLayer({
|
|
29
|
+
WebFetch: Effect.fnUntraced(function* ({ url }) {
|
|
30
|
+
const response = yield* Effect.promise(() => fetch(url).then((response) => response.text()));
|
|
31
|
+
return response;
|
|
32
|
+
}),
|
|
33
|
+
});
|
package/src/toolkits/index.ts
CHANGED
|
@@ -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> {}
|