@dxos/assistant-toolkit 0.8.4-main.c85a9c8dae → 0.8.4-main.dfabb4ec29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/neutral/add-artifact-ZUJ5DMSY.mjs +30 -0
- package/dist/lib/neutral/add-artifact-ZUJ5DMSY.mjs.map +7 -0
- package/dist/lib/neutral/agent-5NIKAYUK.mjs +65 -0
- package/dist/lib/neutral/agent-5NIKAYUK.mjs.map +7 -0
- package/dist/lib/neutral/chunk-246ACKSH.mjs +100 -0
- package/dist/lib/neutral/chunk-246ACKSH.mjs.map +7 -0
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs +73 -0
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs +140 -0
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GV66MKAQ.mjs +60 -0
- package/dist/lib/neutral/chunk-GV66MKAQ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-IKBIORQX.mjs +332 -0
- package/dist/lib/neutral/chunk-IKBIORQX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-KGU725LW.mjs +29 -0
- package/dist/lib/neutral/chunk-KGU725LW.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NR3GTWRC.mjs +53 -0
- package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-P4ZMYO4K.mjs +294 -0
- package/dist/lib/neutral/chunk-P4ZMYO4K.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QO5SU37C.mjs +70 -0
- package/dist/lib/neutral/chunk-QO5SU37C.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ROMZO4CB.mjs +108 -0
- package/dist/lib/neutral/chunk-ROMZO4CB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TO5IX24K.mjs +67 -0
- package/dist/lib/neutral/chunk-TO5IX24K.mjs.map +7 -0
- package/dist/lib/neutral/chunk-WLR3BGO4.mjs +25 -0
- package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +7 -0
- package/dist/lib/neutral/chunk-XUF53B6B.mjs +75 -0
- package/dist/lib/neutral/chunk-XUF53B6B.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs +73 -0
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +7 -0
- package/dist/lib/neutral/context-add-VB7AOY3G.mjs +22 -0
- package/dist/lib/neutral/context-add-VB7AOY3G.mjs.map +7 -0
- package/dist/lib/neutral/context-remove-VCM3VPSO.mjs +22 -0
- package/dist/lib/neutral/context-remove-VCM3VPSO.mjs.map +7 -0
- package/dist/lib/neutral/create-project-EIF4OJMY.mjs +35 -0
- package/dist/lib/neutral/create-project-EIF4OJMY.mjs.map +7 -0
- package/dist/lib/neutral/delete-J3PMWP7Z.mjs +19 -0
- package/dist/lib/neutral/delete-J3PMWP7Z.mjs.map +7 -0
- package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs +47 -0
- package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs.map +7 -0
- package/dist/lib/neutral/fetch-KHMHV7JR.mjs +16 -0
- package/dist/lib/neutral/fetch-KHMHV7JR.mjs.map +7 -0
- package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs +139 -0
- package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs.map +7 -0
- package/dist/lib/neutral/get-context-TN7X7U2H.mjs +35 -0
- package/dist/lib/neutral/get-context-TN7X7U2H.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +581 -3293
- package/dist/lib/neutral/index.mjs.map +4 -4
- package/dist/lib/neutral/load-ALP3TK2E.mjs +17 -0
- package/dist/lib/neutral/load-ALP3TK2E.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/object-create-Z57Y3X6Y.mjs +35 -0
- package/dist/lib/neutral/object-create-Z57Y3X6Y.mjs.map +7 -0
- package/dist/lib/neutral/object-delete-X53LS37B.mjs +18 -0
- package/dist/lib/neutral/object-delete-X53LS37B.mjs.map +7 -0
- package/dist/lib/neutral/object-update-GVKSBR7T.mjs +28 -0
- package/dist/lib/neutral/object-update-GVKSBR7T.mjs.map +7 -0
- package/dist/lib/neutral/project-HPHTZ2CI.mjs +23 -0
- package/dist/lib/neutral/project-HPHTZ2CI.mjs.map +7 -0
- package/dist/lib/neutral/project-rules-IVDHKSKI.mjs +78 -0
- package/dist/lib/neutral/project-rules-IVDHKSKI.mjs.map +7 -0
- package/dist/lib/neutral/prompt-Y7NN7M5D.mjs +170 -0
- package/dist/lib/neutral/prompt-Y7NN7M5D.mjs.map +7 -0
- package/dist/lib/neutral/qualifier-VDOY5CWU.mjs +88 -0
- package/dist/lib/neutral/qualifier-VDOY5CWU.mjs.map +7 -0
- package/dist/lib/neutral/query-PPJU5622.mjs +70 -0
- package/dist/lib/neutral/query-PPJU5622.mjs.map +7 -0
- package/dist/lib/neutral/query-U56GNEV6.mjs +32 -0
- package/dist/lib/neutral/query-U56GNEV6.mjs.map +7 -0
- package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs +16 -0
- package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs.map +7 -0
- package/dist/lib/neutral/relation-create-XJ2IX6X3.mjs +34 -0
- package/dist/lib/neutral/relation-create-XJ2IX6X3.mjs.map +7 -0
- package/dist/lib/neutral/relation-delete-EP4KXAFL.mjs +18 -0
- package/dist/lib/neutral/relation-delete-EP4KXAFL.mjs.map +7 -0
- package/dist/lib/neutral/save-GWAPLT3Z.mjs +23 -0
- package/dist/lib/neutral/save-GWAPLT3Z.mjs.map +7 -0
- package/dist/lib/neutral/schema-add-Z5CY6P24.mjs +24 -0
- package/dist/lib/neutral/schema-add-Z5CY6P24.mjs.map +7 -0
- package/dist/lib/neutral/schema-list-W326VPVX.mjs +38 -0
- package/dist/lib/neutral/schema-list-W326VPVX.mjs.map +7 -0
- package/dist/lib/neutral/sync-issues-4YE5XAK5.mjs +167 -0
- package/dist/lib/neutral/sync-issues-4YE5XAK5.mjs.map +7 -0
- package/dist/lib/neutral/sync-triggers-CDMJVW6E.mjs +136 -0
- package/dist/lib/neutral/sync-triggers-CDMJVW6E.mjs.map +7 -0
- package/dist/lib/neutral/tag-add-VNIIOVJA.mjs +19 -0
- package/dist/lib/neutral/tag-add-VNIIOVJA.mjs.map +7 -0
- package/dist/lib/neutral/tag-remove-6R2R27W3.mjs +19 -0
- package/dist/lib/neutral/tag-remove-6R2R27W3.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +9 -14
- package/dist/lib/neutral/testing/index.mjs.map +3 -3
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs +16 -0
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs.map +7 -0
- package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs +46 -0
- package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs.map +7 -0
- package/dist/types/src/blueprints/automation/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/automation/index.d.ts +2 -0
- package/dist/types/src/blueprints/automation/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +63 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +37 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +28 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/index.d.ts +3 -0
- package/dist/types/src/blueprints/blueprint-manager/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/browser/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/context-add.d.ts +5 -4
- package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts +5 -4
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/definitions.d.ts +59 -0
- package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/index.d.ts +3 -56
- package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/load.d.ts +5 -4
- package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/object-create.d.ts +5 -3
- package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts +5 -4
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/object-update.d.ts +5 -4
- package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/query.d.ts +7 -3
- package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts +6 -5
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +5 -4
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/schema-add.d.ts +4 -2
- package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts +4 -2
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts +4 -3
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +4 -3
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/index.d.ts +1 -1
- package/dist/types/src/blueprints/database/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts +15 -0
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts +3 -2
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/functions/index.d.ts +3 -11
- package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/index.d.ts +1 -0
- package/dist/types/src/blueprints/discord/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/definitions.d.ts +7 -0
- package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts +4 -2
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/index.d.ts +3 -6
- package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/index.d.ts +1 -0
- package/dist/types/src/blueprints/github/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +4 -3
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts +6 -0
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/functions/index.d.ts +3 -8
- package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +4 -6
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/index.d.ts +1 -0
- package/dist/types/src/blueprints/linear/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts +17 -0
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/delete.d.ts +10 -0
- package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/query.d.ts +8 -0
- package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/save.d.ts +8 -0
- package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/index.d.ts +3 -0
- package/dist/types/src/blueprints/memory/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts +11 -0
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/index.d.ts +3 -9
- package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +5 -3
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/index.d.ts +1 -0
- package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +4 -3
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/agent.d.ts +2 -60
- package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/definitions.d.ts +158 -0
- package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/get-context.d.ts +6 -4
- package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/index.d.ts +3 -132
- package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts +30 -17
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/index.d.ts +2 -2
- package/dist/types/src/blueprints/project/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +51 -0
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +96 -0
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +48 -0
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/index.d.ts +3 -0
- package/dist/types/src/blueprints/project-wizard/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/testing.d.ts +5 -15
- package/dist/types/src/blueprints/testing.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +5 -0
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +6 -0
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/index.d.ts +2 -1
- package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/toolkit.d.ts +2 -0
- package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -1
- package/dist/types/src/crud/graph.d.ts +1 -1
- package/dist/types/src/crud/graph.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +41 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/functions/agent/definitions.d.ts +62 -0
- package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
- package/dist/types/src/functions/agent/index.d.ts +3 -84
- package/dist/types/src/functions/agent/index.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.d.ts +2 -82
- package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.test.d.ts +2 -0
- package/dist/types/src/functions/agent/prompt.test.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +0 -2
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/sync/sync.d.ts.map +1 -1
- package/dist/types/src/testing/plugins.d.ts.map +1 -1
- package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -1
- package/dist/types/src/types/Agent.d.ts +77 -0
- package/dist/types/src/types/Agent.d.ts.map +1 -0
- package/dist/types/src/types/Chat.d.ts +32 -7
- package/dist/types/src/types/Chat.d.ts.map +1 -1
- package/dist/types/src/types/McpServer.d.ts +21 -0
- package/dist/types/src/types/McpServer.d.ts.map +1 -0
- package/dist/types/src/types/Memory.d.ts +12 -0
- package/dist/types/src/types/Memory.d.ts.map +1 -0
- package/dist/types/src/types/Plan.d.ts +23 -11
- package/dist/types/src/types/Plan.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util/graphql.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +27 -31
- package/src/blueprints/automation/blueprint.ts +105 -0
- package/src/blueprints/automation/index.ts +5 -0
- package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -0
- package/src/blueprints/blueprint-manager/blueprint.test.ts +198 -0
- package/src/blueprints/blueprint-manager/blueprint.ts +49 -0
- package/src/blueprints/blueprint-manager/functions/definitions.ts +57 -0
- package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +43 -0
- package/src/blueprints/blueprint-manager/functions/index.ts +13 -0
- package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +18 -0
- package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +18 -0
- package/src/blueprints/blueprint-manager/index.ts +6 -0
- package/src/blueprints/browser/blueprint.test.ts +23 -32
- package/src/blueprints/browser/blueprint.ts +5 -6
- package/src/blueprints/database/blueprint.conversations.json +1 -1
- package/src/blueprints/database/blueprint.test.ts +308 -98
- package/src/blueprints/database/blueprint.ts +37 -10
- package/src/blueprints/database/functions/context-add.ts +15 -26
- package/src/blueprints/database/functions/context-remove.ts +16 -27
- package/src/blueprints/database/functions/definitions.ts +318 -0
- package/src/blueprints/database/functions/index.ts +18 -28
- package/src/blueprints/database/functions/load.ts +11 -23
- package/src/blueprints/database/functions/object-create.ts +28 -25
- package/src/blueprints/database/functions/object-delete.ts +13 -20
- package/src/blueprints/database/functions/object-update.ts +23 -25
- package/src/blueprints/database/functions/query.ts +48 -110
- package/src/blueprints/database/functions/relation-create.ts +25 -38
- package/src/blueprints/database/functions/relation-delete.ts +14 -21
- package/src/blueprints/database/functions/schema-add.ts +19 -31
- package/src/blueprints/database/functions/schema-list.ts +26 -27
- package/src/blueprints/database/functions/tag-add.ts +14 -24
- package/src/blueprints/database/functions/tag-remove.ts +14 -23
- package/src/blueprints/database/index.ts +16 -1
- package/src/blueprints/discord/blueprint.ts +6 -11
- package/src/blueprints/discord/functions/definitions.ts +70 -0
- package/src/blueprints/discord/functions/fetch-messages.test.ts +15 -25
- package/src/blueprints/discord/functions/fetch-messages.ts +98 -152
- package/src/blueprints/discord/functions/index.ts +4 -4
- package/src/blueprints/discord/index.ts +1 -0
- package/src/blueprints/github/functions/definitions.ts +26 -0
- package/src/blueprints/github/functions/fetch-prs.ts +15 -22
- package/src/blueprints/github/functions/index.ts +4 -4
- package/src/blueprints/github/index.ts +2 -0
- package/src/blueprints/index.ts +4 -3
- package/src/blueprints/linear/blueprint.ts +6 -11
- package/src/blueprints/linear/functions/definitions.ts +23 -0
- package/src/blueprints/linear/functions/index.ts +4 -4
- package/src/blueprints/linear/functions/linear.test.ts +7 -7
- package/src/blueprints/linear/functions/sync-issues.ts +31 -39
- package/src/blueprints/linear/index.ts +1 -0
- package/src/blueprints/memory/blueprint.conversations.json +1 -0
- package/src/blueprints/memory/blueprint.test.ts +139 -0
- package/src/blueprints/memory/blueprint.ts +41 -0
- package/src/blueprints/memory/functions/definitions.ts +68 -0
- package/src/blueprints/memory/functions/delete.ts +20 -0
- package/src/blueprints/memory/functions/index.ts +13 -0
- package/src/blueprints/memory/functions/query.ts +32 -0
- package/src/blueprints/memory/functions/save.ts +20 -0
- package/src/blueprints/memory/index.ts +6 -0
- package/src/blueprints/planning/blueprint.ts +5 -9
- package/src/blueprints/planning/functions/definitions.ts +137 -0
- package/src/blueprints/planning/functions/index.ts +4 -4
- package/src/blueprints/planning/functions/update-tasks.ts +35 -158
- package/src/blueprints/planning/index.ts +1 -0
- package/src/blueprints/project/blueprint.conversations.json +1 -0
- package/src/blueprints/project/blueprint.test.ts +246 -111
- package/src/blueprints/project/blueprint.ts +21 -25
- package/src/blueprints/project/functions/add-artifact.ts +19 -30
- package/src/blueprints/project/functions/agent.ts +43 -46
- package/src/blueprints/project/functions/definitions.ts +92 -0
- package/src/blueprints/project/functions/get-context.ts +36 -53
- package/src/blueprints/project/functions/index.ts +9 -10
- package/src/blueprints/project/functions/qualifier.ts +66 -72
- package/src/blueprints/project/index.ts +2 -2
- package/src/blueprints/project-wizard/blueprint.ts +52 -0
- package/src/blueprints/project-wizard/functions/create-project.ts +32 -0
- package/src/blueprints/project-wizard/functions/definitions.ts +63 -0
- package/src/blueprints/project-wizard/functions/index.ts +13 -0
- package/src/blueprints/project-wizard/functions/project-rules.ts +77 -0
- package/src/blueprints/project-wizard/functions/sync-triggers.ts +158 -0
- package/src/blueprints/project-wizard/index.ts +6 -0
- package/src/blueprints/testing.ts +7 -23
- package/src/blueprints/websearch/blueprint.conversations.json +1 -0
- package/src/blueprints/websearch/blueprint.test.ts +39 -0
- package/src/blueprints/websearch/blueprint.ts +6 -8
- package/src/blueprints/websearch/functions/definitions.ts +25 -0
- package/src/blueprints/websearch/functions/fetch.ts +18 -0
- package/src/blueprints/websearch/functions/index.ts +9 -0
- package/src/blueprints/websearch/index.ts +2 -1
- package/src/blueprints/websearch/toolkit.ts +6 -1
- package/src/crud/graph.test.ts +10 -12
- package/src/crud/graph.ts +2 -2
- package/src/errors.ts +25 -0
- package/src/functions/agent/definitions.ts +56 -0
- package/src/functions/agent/index.ts +4 -4
- package/src/functions/agent/prompt.conversations.json +1 -0
- package/src/functions/agent/prompt.test.ts +81 -0
- package/src/functions/agent/prompt.ts +212 -96
- package/src/functions/index.ts +0 -2
- package/src/sync/sync.ts +23 -12
- package/src/testing/plugins.tsx +10 -3
- package/src/toolkits/WebToolkit.ts +1 -1
- package/src/types/Agent.ts +240 -0
- package/src/types/Chat.ts +24 -10
- package/src/types/McpServer.ts +37 -0
- package/src/types/Memory.ts +24 -0
- package/src/types/Plan.ts +7 -4
- package/src/types/index.ts +3 -1
- package/dist/types/src/blueprints/design/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/design/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/index.d.ts +0 -2
- package/dist/types/src/blueprints/design/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/markdown/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/create.d.ts +0 -6
- package/dist/types/src/blueprints/markdown/functions/create.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/index.d.ts +0 -30
- package/dist/types/src/blueprints/markdown/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/read.d.ts +0 -14
- package/dist/types/src/blueprints/markdown/functions/read.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/update.d.ts +0 -13
- package/dist/types/src/blueprints/markdown/functions/update.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/index.d.ts +0 -3
- package/dist/types/src/blueprints/markdown/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/planning-old/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/index.d.ts +0 -29
- package/dist/types/src/blueprints/planning-old/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/read.d.ts +0 -14
- package/dist/types/src/blueprints/planning-old/functions/read.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts +0 -74
- package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts +0 -2
- package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/update.d.ts +0 -16
- package/dist/types/src/blueprints/planning-old/functions/update.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/index.d.ts +0 -2
- package/dist/types/src/blueprints/planning-old/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/research/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/document-create.d.ts +0 -10
- package/dist/types/src/blueprints/research/functions/document-create.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/index.d.ts +0 -19
- package/dist/types/src/blueprints/research/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/research.d.ts +0 -14
- package/dist/types/src/blueprints/research/functions/research.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/research.test.d.ts +0 -2
- package/dist/types/src/blueprints/research/functions/research.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/index.d.ts +0 -3
- package/dist/types/src/blueprints/research/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts +0 -18
- package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/types/index.d.ts +0 -7
- package/dist/types/src/blueprints/research/types/index.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +0 -179
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts +0 -2
- package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/index.d.ts +0 -179
- package/dist/types/src/functions/entity-extraction/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts +0 -38
- package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts +0 -37
- package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts +0 -58
- package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/index.d.ts +0 -3
- package/dist/types/src/functions/exa/data/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/exa.d.ts +0 -5
- package/dist/types/src/functions/exa/exa.d.ts.map +0 -1
- package/dist/types/src/functions/exa/index.d.ts +0 -9
- package/dist/types/src/functions/exa/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/mock.d.ts +0 -5
- package/dist/types/src/functions/exa/mock.d.ts.map +0 -1
- package/dist/types/src/types/Project.d.ts +0 -67
- package/dist/types/src/types/Project.d.ts.map +0 -1
- package/src/blueprints/browser/blueprint.conversations.json +0 -1
- package/src/blueprints/design/blueprint.test.ts +0 -96
- package/src/blueprints/design/blueprint.ts +0 -46
- package/src/blueprints/design/index.ts +0 -5
- package/src/blueprints/markdown/blueprint.ts +0 -38
- package/src/blueprints/markdown/functions/create.ts +0 -29
- package/src/blueprints/markdown/functions/index.ts +0 -13
- package/src/blueprints/markdown/functions/read.ts +0 -32
- package/src/blueprints/markdown/functions/update.ts +0 -32
- package/src/blueprints/markdown/index.ts +0 -6
- package/src/blueprints/planning-old/blueprint.test.ts +0 -122
- package/src/blueprints/planning-old/blueprint.ts +0 -110
- package/src/blueprints/planning-old/functions/index.ts +0 -11
- package/src/blueprints/planning-old/functions/read.ts +0 -34
- package/src/blueprints/planning-old/functions/task-list.test.ts +0 -99
- package/src/blueprints/planning-old/functions/task-list.ts +0 -165
- package/src/blueprints/planning-old/functions/update.ts +0 -52
- package/src/blueprints/planning-old/index.ts +0 -5
- package/src/blueprints/research/blueprint.test.ts +0 -7
- package/src/blueprints/research/blueprint.ts +0 -65
- package/src/blueprints/research/functions/document-create.ts +0 -73
- package/src/blueprints/research/functions/index.ts +0 -11
- package/src/blueprints/research/functions/research-instructions.tpl +0 -106
- package/src/blueprints/research/functions/research.conversations.json +0 -1
- package/src/blueprints/research/functions/research.test.ts +0 -149
- package/src/blueprints/research/functions/research.ts +0 -175
- package/src/blueprints/research/index.ts +0 -6
- package/src/blueprints/research/types/ResearchGraph.ts +0 -49
- package/src/blueprints/research/types/index.ts +0 -32
- package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -1
- package/src/functions/entity-extraction/entity-extraction.test.ts +0 -74
- package/src/functions/entity-extraction/entity-extraction.ts +0 -181
- package/src/functions/entity-extraction/index.ts +0 -9
- package/src/functions/exa/data/exa-search-1748337321991.ts +0 -131
- package/src/functions/exa/data/exa-search-1748337331526.ts +0 -144
- package/src/functions/exa/data/exa-search-1748337344119.ts +0 -133
- package/src/functions/exa/data/index.ts +0 -11
- package/src/functions/exa/exa.ts +0 -37
- package/src/functions/exa/index.ts +0 -11
- package/src/functions/exa/mock.ts +0 -71
- package/src/types/Project.ts +0 -196
- /package/dist/types/src/blueprints/{design → blueprint-manager}/blueprint.test.d.ts +0 -0
- /package/dist/types/src/blueprints/{planning-old → memory}/blueprint.test.d.ts +0 -0
- /package/dist/types/src/blueprints/{research → websearch}/blueprint.test.d.ts +0 -0
|
@@ -3,33 +3,22 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as Schema from 'effect/Schema';
|
|
7
6
|
|
|
8
7
|
import { AiContextService } from '@dxos/assistant';
|
|
9
|
-
import {
|
|
10
|
-
import { defineFunction } from '@dxos/functions';
|
|
11
|
-
import { trim } from '@dxos/util';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
import { ContextAdd } from './definitions';
|
|
11
|
+
|
|
12
|
+
export default ContextAdd.pipe(
|
|
13
|
+
Operation.withHandler(
|
|
14
|
+
Effect.fn(function* ({ obj }) {
|
|
15
|
+
const { binder } = yield* AiContextService;
|
|
16
|
+
yield* Effect.promise(() =>
|
|
17
|
+
binder.bind({
|
|
18
|
+
blueprints: [],
|
|
19
|
+
objects: [obj],
|
|
20
|
+
}),
|
|
21
|
+
);
|
|
23
22
|
}),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
handler: Effect.fn(function* ({ data: { obj } }) {
|
|
27
|
-
const { binder } = yield* AiContextService;
|
|
28
|
-
yield* Effect.promise(() =>
|
|
29
|
-
binder.bind({
|
|
30
|
-
blueprints: [],
|
|
31
|
-
objects: [obj],
|
|
32
|
-
}),
|
|
33
|
-
);
|
|
34
|
-
}, AiContextService.fixFunctionHandlerType),
|
|
35
|
-
});
|
|
23
|
+
),
|
|
24
|
+
);
|
|
@@ -3,33 +3,22 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as Schema from 'effect/Schema';
|
|
7
6
|
|
|
8
7
|
import { AiContextService } from '@dxos/assistant';
|
|
9
|
-
import {
|
|
10
|
-
import { defineFunction } from '@dxos/functions';
|
|
11
|
-
import { trim } from '@dxos/util';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
yield* Effect.promise(() =>
|
|
29
|
-
binder.unbind({
|
|
30
|
-
blueprints: [],
|
|
31
|
-
objects: [obj],
|
|
32
|
-
}),
|
|
33
|
-
);
|
|
34
|
-
}, AiContextService.fixFunctionHandlerType),
|
|
35
|
-
});
|
|
10
|
+
import { ContextRemove } from './definitions';
|
|
11
|
+
|
|
12
|
+
export default ContextRemove.pipe(
|
|
13
|
+
Operation.withHandler(
|
|
14
|
+
Effect.fn(function* ({ obj }) {
|
|
15
|
+
const { binder } = yield* AiContextService;
|
|
16
|
+
yield* Effect.promise(() =>
|
|
17
|
+
binder.unbind({
|
|
18
|
+
blueprints: [],
|
|
19
|
+
objects: [obj],
|
|
20
|
+
}),
|
|
21
|
+
);
|
|
22
|
+
}) as any,
|
|
23
|
+
),
|
|
24
|
+
);
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
|
|
7
|
+
import { AiContextService } from '@dxos/assistant';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { Database, Obj, Ref, Relation, Tag } from '@dxos/echo';
|
|
10
|
+
import { trim } from '@dxos/util';
|
|
11
|
+
|
|
12
|
+
export const Query = Operation.make({
|
|
13
|
+
meta: {
|
|
14
|
+
key: 'org.dxos.function.database.query',
|
|
15
|
+
name: 'Query',
|
|
16
|
+
description: trim`
|
|
17
|
+
Query for objects in ECHO.
|
|
18
|
+
Use this tool when searching for information in the space (both automerge and queues).
|
|
19
|
+
Currently, two types of queries are supported:
|
|
20
|
+
- Full-text search - terms may appear anywhere in the object.
|
|
21
|
+
- Type-based search - objects of a specific type.
|
|
22
|
+
You can use them together, for example, to search for objects of a specific type that match a full-text query.
|
|
23
|
+
Important: Whem querying by typename, make sure to list the schema first, to get the exact typename.
|
|
24
|
+
|
|
25
|
+
Omit both typename and text to search for all objects.
|
|
26
|
+
|
|
27
|
+
<output_format>
|
|
28
|
+
You can choose to either return the full object data, or just the DXN, type and label.
|
|
29
|
+
When expecting a lot of results, run with includeContent=false to not pollute the context, and then load specific objects using the load tool.
|
|
30
|
+
|
|
31
|
+
You can choose to get the content right away, if you don't expect a lot of results.
|
|
32
|
+
To load content right away, run with includeContent=true.
|
|
33
|
+
When loading content, set an appropriate limit on the number of results to avoid overwhelming the context.
|
|
34
|
+
</output_format>
|
|
35
|
+
|
|
36
|
+
<example description="All tasks related to Cyberdyne and Bob">
|
|
37
|
+
{
|
|
38
|
+
"typename": "org.dxos.type.task",
|
|
39
|
+
"text": "cyberdyne bob",
|
|
40
|
+
}
|
|
41
|
+
</example>
|
|
42
|
+
|
|
43
|
+
<example description="Financial report Q1 2026">
|
|
44
|
+
{
|
|
45
|
+
"typename": "org.dxos.type.document",
|
|
46
|
+
"text": "financial report Q1 2026",
|
|
47
|
+
"includeContent": true
|
|
48
|
+
"limit": 3
|
|
49
|
+
}
|
|
50
|
+
</example>
|
|
51
|
+
|
|
52
|
+
<example description="Emails from specific mailboxes">
|
|
53
|
+
{
|
|
54
|
+
"in": [{"/" : "dxn:echo:@:YYYYYY"}, {"/" : "dxn:echo:@:XXXXXXX"}],
|
|
55
|
+
"typename": "org.dxos.type.email",
|
|
56
|
+
"includeContent": true,
|
|
57
|
+
"limit": 20
|
|
58
|
+
}
|
|
59
|
+
</example>
|
|
60
|
+
`,
|
|
61
|
+
},
|
|
62
|
+
input: Schema.Struct({
|
|
63
|
+
in: Schema.optional(
|
|
64
|
+
Schema.Array(Ref.Ref(Obj.Unknown)).annotations({
|
|
65
|
+
description:
|
|
66
|
+
'Scope the query to children of specific objects (transitively). ' +
|
|
67
|
+
'Use this to query items within containers such as feeds or folders. ' +
|
|
68
|
+
'For example, to find emails use `in: [mailbox1.feed, mailbox2.feed]`.',
|
|
69
|
+
}),
|
|
70
|
+
),
|
|
71
|
+
typename: Schema.optional(
|
|
72
|
+
Schema.String.annotations({
|
|
73
|
+
description: 'The typename of the objects to list.',
|
|
74
|
+
example: 'org.dxos.type.task',
|
|
75
|
+
}),
|
|
76
|
+
),
|
|
77
|
+
text: Schema.optional(
|
|
78
|
+
Schema.String.annotations({
|
|
79
|
+
description: 'Full text search query.',
|
|
80
|
+
example: 'email cyberdyne bob',
|
|
81
|
+
}),
|
|
82
|
+
),
|
|
83
|
+
includeContent: Schema.optional(
|
|
84
|
+
Schema.Boolean.annotations({
|
|
85
|
+
description: 'Include the full object data in the response.',
|
|
86
|
+
default: false,
|
|
87
|
+
}),
|
|
88
|
+
),
|
|
89
|
+
limit: Schema.optional(
|
|
90
|
+
Schema.Number.annotations({
|
|
91
|
+
description: 'The maximum number of results to return.',
|
|
92
|
+
default: 10,
|
|
93
|
+
}),
|
|
94
|
+
),
|
|
95
|
+
includeQueues: Schema.optional(
|
|
96
|
+
Schema.Boolean.annotations({
|
|
97
|
+
description: 'Search in queues as well as spaces. Only use this if searching for emails.',
|
|
98
|
+
default: false,
|
|
99
|
+
}),
|
|
100
|
+
),
|
|
101
|
+
}),
|
|
102
|
+
output: Schema.Array(Schema.Unknown),
|
|
103
|
+
services: [Database.Service],
|
|
104
|
+
}).pipe(Operation.intrinsic);
|
|
105
|
+
|
|
106
|
+
export const Load = Operation.make({
|
|
107
|
+
meta: {
|
|
108
|
+
key: 'org.dxos.function.database.load',
|
|
109
|
+
name: 'Load object',
|
|
110
|
+
description: trim`
|
|
111
|
+
Loads the object or relation content.
|
|
112
|
+
Can load multiple objects at at time.
|
|
113
|
+
Use the to read the data when you have a DXN.
|
|
114
|
+
Call this tool with an array of one or more DXNs or object IDs.
|
|
115
|
+
When use see a reference ({ '/': 'dxn:...' }), you can call this function to load the object.
|
|
116
|
+
Note that returned data is only a snapshot in time, and might have changed since the object was last loaded.
|
|
117
|
+
`,
|
|
118
|
+
},
|
|
119
|
+
input: Schema.Struct({
|
|
120
|
+
refs: Schema.Array(Ref.Ref(Obj.Unknown)),
|
|
121
|
+
}),
|
|
122
|
+
output: Schema.Unknown,
|
|
123
|
+
services: [Database.Service],
|
|
124
|
+
}).pipe(Operation.intrinsic);
|
|
125
|
+
|
|
126
|
+
export const ObjectCreate = Operation.make({
|
|
127
|
+
meta: {
|
|
128
|
+
key: 'org.dxos.function.database.object-create',
|
|
129
|
+
name: 'Create object',
|
|
130
|
+
description: trim`
|
|
131
|
+
Creates a new object and adds it to the current space.
|
|
132
|
+
Get the schema from the schema-list tool and ensure that the data matches the corresponding schema.
|
|
133
|
+
References are provided in the following format: { "/": "dxn:..." }.
|
|
134
|
+
Reference examples: { "/": "dxn:echo:@:01KG7R1ZXWFMWQ4DA1Q6TN1DG4" }, { "/": "dxn:queue:data:01KG7R1ZXWFMWQ4DA1Q6TN1DG4:01KG7R1ZXWFMWQ4DA1Q6TN1DG4" }
|
|
135
|
+
`,
|
|
136
|
+
},
|
|
137
|
+
input: Schema.Struct({
|
|
138
|
+
typename: Schema.String,
|
|
139
|
+
data: Schema.Any,
|
|
140
|
+
}),
|
|
141
|
+
output: Schema.Unknown,
|
|
142
|
+
services: [Database.Service],
|
|
143
|
+
}).pipe(Operation.intrinsic);
|
|
144
|
+
|
|
145
|
+
export const ObjectUpdate = Operation.make({
|
|
146
|
+
meta: {
|
|
147
|
+
key: 'org.dxos.function.database.object-update',
|
|
148
|
+
name: 'Update object',
|
|
149
|
+
description: trim`
|
|
150
|
+
Updates the object properties.
|
|
151
|
+
References are provided in the following format: { "/": "dxn:..." }.
|
|
152
|
+
Reference examples: { "/": "dxn:echo:@:01KG7R1ZXWFMWQ4DA1Q6TN1DG4" }, { "/": "dxn:queue:data:01KG7R1ZXWFMWQ4DA1Q6TN1DG4:01KG7R1ZXWFMWQ4DA1Q6TN1DG4" }
|
|
153
|
+
`,
|
|
154
|
+
},
|
|
155
|
+
input: Schema.Struct({
|
|
156
|
+
obj: Ref.Ref(Obj.Unknown),
|
|
157
|
+
properties: Schema.Record({ key: Schema.String, value: Schema.Any }),
|
|
158
|
+
}),
|
|
159
|
+
output: Schema.Unknown,
|
|
160
|
+
services: [Database.Service],
|
|
161
|
+
}).pipe(Operation.intrinsic);
|
|
162
|
+
|
|
163
|
+
export const ObjectDelete = Operation.make({
|
|
164
|
+
meta: {
|
|
165
|
+
key: 'org.dxos.function.database.object-delete',
|
|
166
|
+
name: 'Delete object',
|
|
167
|
+
description: trim`
|
|
168
|
+
Deletes the object.
|
|
169
|
+
`,
|
|
170
|
+
},
|
|
171
|
+
input: Schema.Struct({
|
|
172
|
+
obj: Ref.Ref(Obj.Unknown),
|
|
173
|
+
}),
|
|
174
|
+
output: Schema.Void,
|
|
175
|
+
services: [Database.Service],
|
|
176
|
+
}).pipe(Operation.intrinsic);
|
|
177
|
+
|
|
178
|
+
export const SchemaAdd = Operation.make({
|
|
179
|
+
meta: {
|
|
180
|
+
key: 'org.dxos.function.database.schema-add',
|
|
181
|
+
name: 'Add schema',
|
|
182
|
+
description: trim`
|
|
183
|
+
Adds a schema to the space.
|
|
184
|
+
The name will be used when displayed to the user.
|
|
185
|
+
`,
|
|
186
|
+
},
|
|
187
|
+
input: Schema.Struct({
|
|
188
|
+
name: Schema.String,
|
|
189
|
+
typename: Schema.String.annotations({
|
|
190
|
+
description: 'The typename of the schema in the format of "com.example.type.type".',
|
|
191
|
+
}),
|
|
192
|
+
jsonSchema: Schema.Any,
|
|
193
|
+
}),
|
|
194
|
+
output: Schema.Void,
|
|
195
|
+
services: [Database.Service],
|
|
196
|
+
}).pipe(Operation.intrinsic);
|
|
197
|
+
|
|
198
|
+
export const SchemaList = Operation.make({
|
|
199
|
+
meta: {
|
|
200
|
+
key: 'org.dxos.function.database.schema-list',
|
|
201
|
+
name: 'List schemas',
|
|
202
|
+
description: trim`
|
|
203
|
+
Lists schemas definitions.
|
|
204
|
+
`,
|
|
205
|
+
},
|
|
206
|
+
input: Schema.Struct({
|
|
207
|
+
limit: Schema.optional(Schema.Number),
|
|
208
|
+
}),
|
|
209
|
+
output: Schema.Array(Schema.Unknown),
|
|
210
|
+
services: [Database.Service],
|
|
211
|
+
}).pipe(Operation.intrinsic);
|
|
212
|
+
|
|
213
|
+
export const ContextAdd = Operation.make({
|
|
214
|
+
meta: {
|
|
215
|
+
key: 'org.dxos.function.database.context-add',
|
|
216
|
+
name: 'Add to context',
|
|
217
|
+
description: trim`
|
|
218
|
+
Adds the object to the chat context.
|
|
219
|
+
Use this it for objects that are useful long-term for the conversation.
|
|
220
|
+
`,
|
|
221
|
+
},
|
|
222
|
+
input: Schema.Struct({
|
|
223
|
+
obj: Ref.Ref(Obj.Unknown).annotations({
|
|
224
|
+
description: 'Object to add to the chat context.',
|
|
225
|
+
}),
|
|
226
|
+
}),
|
|
227
|
+
output: Schema.Void,
|
|
228
|
+
services: [AiContextService],
|
|
229
|
+
}).pipe(Operation.intrinsic);
|
|
230
|
+
|
|
231
|
+
export const ContextRemove = Operation.make({
|
|
232
|
+
meta: {
|
|
233
|
+
key: 'org.dxos.function.database.context-remove',
|
|
234
|
+
name: 'Remove from context',
|
|
235
|
+
description: trim`
|
|
236
|
+
Removes the object from the chat context.
|
|
237
|
+
Use this it for objects that are no longer useful for the conversation.
|
|
238
|
+
`,
|
|
239
|
+
},
|
|
240
|
+
input: Schema.Struct({
|
|
241
|
+
obj: Ref.Ref(Obj.Unknown).annotations({
|
|
242
|
+
description: 'Object to remove from the chat context.',
|
|
243
|
+
}),
|
|
244
|
+
}),
|
|
245
|
+
output: Schema.Void,
|
|
246
|
+
services: [AiContextService],
|
|
247
|
+
}).pipe(Operation.intrinsic);
|
|
248
|
+
|
|
249
|
+
export const RelationCreate = Operation.make({
|
|
250
|
+
meta: {
|
|
251
|
+
key: 'org.dxos.function.database.relation-create',
|
|
252
|
+
name: 'Create relation',
|
|
253
|
+
description: trim`
|
|
254
|
+
Creates a new relation and adds it to the current space.
|
|
255
|
+
Get the schema from the schema-list tool and ensure that the data matches the corresponding schema.
|
|
256
|
+
`,
|
|
257
|
+
},
|
|
258
|
+
input: Schema.Struct({
|
|
259
|
+
typename: Schema.String,
|
|
260
|
+
source: Ref.Ref(Obj.Unknown),
|
|
261
|
+
target: Ref.Ref(Obj.Unknown),
|
|
262
|
+
properties: Schema.Any.annotations({
|
|
263
|
+
description: 'The data to be stored in the relation.',
|
|
264
|
+
}),
|
|
265
|
+
}),
|
|
266
|
+
output: Schema.Unknown,
|
|
267
|
+
services: [Database.Service],
|
|
268
|
+
}).pipe(Operation.intrinsic);
|
|
269
|
+
|
|
270
|
+
export const RelationDelete = Operation.make({
|
|
271
|
+
meta: {
|
|
272
|
+
key: 'org.dxos.function.database.relation-delete',
|
|
273
|
+
name: 'Delete relation',
|
|
274
|
+
description: trim`
|
|
275
|
+
Deletes the relation.
|
|
276
|
+
`,
|
|
277
|
+
},
|
|
278
|
+
input: Schema.Struct({
|
|
279
|
+
rel: Ref.Ref(Relation.Unknown),
|
|
280
|
+
}),
|
|
281
|
+
output: Schema.Void,
|
|
282
|
+
services: [Database.Service],
|
|
283
|
+
}).pipe(Operation.intrinsic);
|
|
284
|
+
|
|
285
|
+
export const TagAdd = Operation.make({
|
|
286
|
+
meta: {
|
|
287
|
+
key: 'org.dxos.function.database.tag-add',
|
|
288
|
+
name: 'Add tag',
|
|
289
|
+
description: trim`
|
|
290
|
+
Adds a tag to an object.
|
|
291
|
+
Tags are objects of type ${Tag.Tag.typename}.
|
|
292
|
+
You must search database for available tags, or create a new one.
|
|
293
|
+
`,
|
|
294
|
+
},
|
|
295
|
+
input: Schema.Struct({
|
|
296
|
+
tag: Ref.Ref(Obj.Unknown),
|
|
297
|
+
obj: Ref.Ref(Obj.Unknown),
|
|
298
|
+
}),
|
|
299
|
+
output: Schema.Unknown,
|
|
300
|
+
services: [Database.Service],
|
|
301
|
+
}).pipe(Operation.intrinsic);
|
|
302
|
+
|
|
303
|
+
export const TagRemove = Operation.make({
|
|
304
|
+
meta: {
|
|
305
|
+
key: 'org.dxos.function.database.tag-remove',
|
|
306
|
+
name: 'Remove tag',
|
|
307
|
+
description: trim`
|
|
308
|
+
Removes a tag from an object.
|
|
309
|
+
Tags are objects of type ${Tag.Tag.typename}.
|
|
310
|
+
`,
|
|
311
|
+
},
|
|
312
|
+
input: Schema.Struct({
|
|
313
|
+
tag: Ref.Ref(Obj.Unknown),
|
|
314
|
+
obj: Ref.Ref(Obj.Unknown),
|
|
315
|
+
}),
|
|
316
|
+
output: Schema.Unknown,
|
|
317
|
+
services: [Database.Service],
|
|
318
|
+
}).pipe(Operation.intrinsic);
|
|
@@ -2,32 +2,22 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { default as ContextRemove } from './context-remove';
|
|
7
|
-
import { default as Load } from './load';
|
|
8
|
-
import { default as ObjectCreate } from './object-create';
|
|
9
|
-
import { default as ObjectDelete } from './object-delete';
|
|
10
|
-
import { default as ObjectUpdate } from './object-update';
|
|
11
|
-
import { default as Query } from './query';
|
|
12
|
-
import { default as RelationCreate } from './relation-create';
|
|
13
|
-
import { default as RelationDelete } from './relation-delete';
|
|
14
|
-
import { default as SchemaAdd } from './schema-add';
|
|
15
|
-
import { default as SchemaList } from './schema-list';
|
|
16
|
-
import { default as TagAdd } from './tag-add';
|
|
17
|
-
import { default as TagRemove } from './tag-remove';
|
|
5
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
18
6
|
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
7
|
+
export * from './definitions';
|
|
8
|
+
|
|
9
|
+
export const DatabaseHandlers = OperationHandlerSet.lazy(
|
|
10
|
+
() => import('./context-add'),
|
|
11
|
+
() => import('./context-remove'),
|
|
12
|
+
() => import('./load'),
|
|
13
|
+
() => import('./object-create'),
|
|
14
|
+
() => import('./object-delete'),
|
|
15
|
+
() => import('./object-update'),
|
|
16
|
+
() => import('./query'),
|
|
17
|
+
() => import('./relation-create'),
|
|
18
|
+
() => import('./relation-delete'),
|
|
19
|
+
() => import('./schema-add'),
|
|
20
|
+
() => import('./schema-list'),
|
|
21
|
+
() => import('./tag-add'),
|
|
22
|
+
() => import('./tag-remove'),
|
|
23
|
+
);
|
|
@@ -4,28 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Array from 'effect/Array';
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
|
-
import * as Schema from 'effect/Schema';
|
|
8
7
|
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { trim } from '@dxos/util';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { Database, Entity } from '@dxos/echo';
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Note that returned data is only a snapshot in time, and might have changed since the object was last loaded.
|
|
23
|
-
`,
|
|
24
|
-
inputSchema: Schema.Struct({
|
|
25
|
-
refs: Schema.Array(Ref.Ref(Obj.Unknown)),
|
|
26
|
-
}),
|
|
27
|
-
outputSchema: Schema.Unknown,
|
|
28
|
-
handler: Effect.fn(function* ({ data: { refs } }) {
|
|
29
|
-
return yield* Effect.forEach(refs, Database.load).pipe(Effect.map(Array.map(Entity.toJSON)));
|
|
30
|
-
}),
|
|
31
|
-
});
|
|
11
|
+
import { Load } from './definitions';
|
|
12
|
+
|
|
13
|
+
export default Load.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fn(function* ({ refs }) {
|
|
16
|
+
return yield* Effect.forEach(refs, Database.load).pipe(Effect.map(Array.map(Entity.toJSON)));
|
|
17
|
+
}),
|
|
18
|
+
),
|
|
19
|
+
);
|
|
@@ -3,33 +3,36 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as Schema from 'effect/Schema';
|
|
7
6
|
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
8
8
|
import { Database, Entity, Obj, Type } from '@dxos/echo';
|
|
9
|
-
import {
|
|
9
|
+
import { EncodedReference } from '@dxos/echo-protocol';
|
|
10
10
|
import { invariant } from '@dxos/invariant';
|
|
11
|
-
import {
|
|
11
|
+
import { deepMapValues } from '@dxos/util';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
key: 'dxos.org/function/database/object-create',
|
|
15
|
-
name: 'Create object',
|
|
16
|
-
description: trim`
|
|
17
|
-
Creates a new object and adds it to the current space.
|
|
18
|
-
Get the schema from the schema-list tool and ensure that the data matches the corresponding schema.
|
|
19
|
-
`,
|
|
20
|
-
inputSchema: Schema.Struct({
|
|
21
|
-
typename: Schema.String,
|
|
22
|
-
data: Schema.Any,
|
|
23
|
-
}),
|
|
24
|
-
outputSchema: Schema.Unknown,
|
|
25
|
-
handler: Effect.fn(function* ({ data: { typename, data } }) {
|
|
26
|
-
const { db } = yield* Database.Service;
|
|
27
|
-
const schema = yield* Effect.promise(() =>
|
|
28
|
-
db.schemaRegistry.query({ typename, location: ['database', 'runtime'] }).first(),
|
|
29
|
-
);
|
|
30
|
-
invariant(Type.isObjectSchema(schema), 'Schema is not an object schema');
|
|
13
|
+
import { ObjectCreate } from './definitions';
|
|
31
14
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
15
|
+
export default ObjectCreate.pipe(
|
|
16
|
+
Operation.withHandler(
|
|
17
|
+
Effect.fn(function* ({ typename, data }) {
|
|
18
|
+
const { db } = yield* Database.Service;
|
|
19
|
+
const schema = yield* Effect.promise(() =>
|
|
20
|
+
db.schemaRegistry.query({ typename, location: ['database', 'runtime'] }).first(),
|
|
21
|
+
);
|
|
22
|
+
invariant(Type.isObjectSchema(schema), 'Schema is not an object schema');
|
|
23
|
+
|
|
24
|
+
const object = db.add(
|
|
25
|
+
Obj.make(
|
|
26
|
+
schema,
|
|
27
|
+
deepMapValues(data, (value, recurse) => {
|
|
28
|
+
if (EncodedReference.isEncodedReference(value)) {
|
|
29
|
+
return db.makeRef(EncodedReference.toDXN(value));
|
|
30
|
+
}
|
|
31
|
+
return recurse(value);
|
|
32
|
+
}),
|
|
33
|
+
),
|
|
34
|
+
);
|
|
35
|
+
return Entity.toJSON(object);
|
|
36
|
+
}),
|
|
37
|
+
),
|
|
38
|
+
);
|
|
@@ -3,25 +3,18 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as Schema from 'effect/Schema';
|
|
7
6
|
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { trim } from '@dxos/util';
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
8
|
+
import { Database } from '@dxos/echo';
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const { db } = yield* Database.Service;
|
|
24
|
-
const object = yield* Database.load(obj);
|
|
25
|
-
db.remove(object);
|
|
26
|
-
}),
|
|
27
|
-
});
|
|
10
|
+
import { ObjectDelete } from './definitions';
|
|
11
|
+
|
|
12
|
+
export default ObjectDelete.pipe(
|
|
13
|
+
Operation.withHandler(
|
|
14
|
+
Effect.fn(function* ({ obj }) {
|
|
15
|
+
const { db } = yield* Database.Service;
|
|
16
|
+
const object = yield* Database.load(obj);
|
|
17
|
+
db.remove(object);
|
|
18
|
+
}),
|
|
19
|
+
),
|
|
20
|
+
);
|
|
@@ -3,30 +3,28 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as Schema from 'effect/Schema';
|
|
7
6
|
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
8
|
+
import { Database, Entity } from '@dxos/echo';
|
|
9
|
+
import { EncodedReference } from '@dxos/echo-protocol';
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
11
|
+
import { ObjectUpdate } from './definitions';
|
|
12
|
+
|
|
13
|
+
export default ObjectUpdate.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fn(function* ({ obj, properties }) {
|
|
16
|
+
const { db } = yield* Database.Service;
|
|
17
|
+
const object = yield* Database.load(obj);
|
|
18
|
+
Entity.update(object as Entity.Any, (obj) => {
|
|
19
|
+
for (const [key, value] of Object.entries(properties)) {
|
|
20
|
+
if (EncodedReference.isEncodedReference(value)) {
|
|
21
|
+
obj[key] = db.makeRef(EncodedReference.toDXN(value));
|
|
22
|
+
} else {
|
|
23
|
+
obj[key] = value;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return Entity.toJSON(object);
|
|
28
|
+
}),
|
|
29
|
+
),
|
|
30
|
+
);
|