@dxos/assistant-toolkit 0.8.4-main.ae835ea → 0.8.4-main.bcb3aa67d6
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-OBP4D5RN.mjs +30 -0
- package/dist/lib/neutral/add-artifact-OBP4D5RN.mjs.map +7 -0
- package/dist/lib/neutral/agent-27Z7BESA.mjs +95 -0
- package/dist/lib/neutral/agent-27Z7BESA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-2NKPVOXM.mjs +267 -0
- package/dist/lib/neutral/chunk-2NKPVOXM.mjs.map +7 -0
- package/dist/lib/neutral/chunk-3ZUJIEFV.mjs +184 -0
- package/dist/lib/neutral/chunk-3ZUJIEFV.mjs.map +7 -0
- package/dist/lib/neutral/chunk-4QGZEDWS.mjs +140 -0
- package/dist/lib/neutral/chunk-4QGZEDWS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-6FL4C6KD.mjs +86 -0
- package/dist/lib/neutral/chunk-6FL4C6KD.mjs.map +7 -0
- package/dist/lib/neutral/chunk-6IAJ2JI5.mjs +54 -0
- package/dist/lib/neutral/chunk-6IAJ2JI5.mjs.map +7 -0
- package/dist/lib/neutral/chunk-AGG6OZNB.mjs +74 -0
- package/dist/lib/neutral/chunk-AGG6OZNB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-AKMBURAD.mjs +320 -0
- package/dist/lib/neutral/chunk-AKMBURAD.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BO4ZVH7M.mjs +73 -0
- package/dist/lib/neutral/chunk-BO4ZVH7M.mjs.map +7 -0
- package/dist/lib/neutral/chunk-CJUCONUJ.mjs +99 -0
- package/dist/lib/neutral/chunk-CJUCONUJ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GAJ6MKJX.mjs +363 -0
- package/dist/lib/neutral/chunk-GAJ6MKJX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HEFG73F2.mjs +53 -0
- package/dist/lib/neutral/chunk-HEFG73F2.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HZM3HNAS.mjs +78 -0
- package/dist/lib/neutral/chunk-HZM3HNAS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ILZ2ODWC.mjs +95 -0
- package/dist/lib/neutral/chunk-ILZ2ODWC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-IQNOIB23.mjs +58 -0
- package/dist/lib/neutral/chunk-IQNOIB23.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-KWZG4QBN.mjs +685 -0
- package/dist/lib/neutral/chunk-KWZG4QBN.mjs.map +7 -0
- package/dist/lib/neutral/chunk-LI6VMCJW.mjs +27 -0
- package/dist/lib/neutral/chunk-LI6VMCJW.mjs.map +7 -0
- package/dist/lib/neutral/chunk-MEZ4UFR6.mjs +25 -0
- package/dist/lib/neutral/chunk-MEZ4UFR6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-VBSCQN37.mjs +52 -0
- package/dist/lib/neutral/chunk-VBSCQN37.mjs.map +7 -0
- package/dist/lib/neutral/chunk-VDEDVOS6.mjs +39 -0
- package/dist/lib/neutral/chunk-VDEDVOS6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-YBTLIXQK.mjs +29 -0
- package/dist/lib/neutral/chunk-YBTLIXQK.mjs.map +7 -0
- package/dist/lib/neutral/context-add-U5LSEQLG.mjs +22 -0
- package/dist/lib/neutral/context-add-U5LSEQLG.mjs.map +7 -0
- package/dist/lib/neutral/context-remove-3YGXLVRA.mjs +22 -0
- package/dist/lib/neutral/context-remove-3YGXLVRA.mjs.map +7 -0
- package/dist/lib/neutral/create-P6I22VS5.mjs +23 -0
- package/dist/lib/neutral/create-P6I22VS5.mjs.map +7 -0
- package/dist/lib/neutral/create-project-YEDZU75J.mjs +34 -0
- package/dist/lib/neutral/create-project-YEDZU75J.mjs.map +7 -0
- package/dist/lib/neutral/delete-LHMZDJFA.mjs +19 -0
- package/dist/lib/neutral/delete-LHMZDJFA.mjs.map +7 -0
- package/dist/lib/neutral/document-create-53ZVNGFR.mjs +57 -0
- package/dist/lib/neutral/document-create-53ZVNGFR.mjs.map +7 -0
- package/dist/lib/neutral/enable-blueprints-Q5NXGX2G.mjs +48 -0
- package/dist/lib/neutral/enable-blueprints-Q5NXGX2G.mjs.map +7 -0
- package/dist/lib/neutral/entity-extraction-CFXRZWZK.mjs +196 -0
- package/dist/lib/neutral/entity-extraction-CFXRZWZK.mjs.map +7 -0
- package/dist/lib/neutral/exa-P4G3DCYB.mjs +28 -0
- package/dist/lib/neutral/exa-P4G3DCYB.mjs.map +7 -0
- package/dist/lib/neutral/fetch-TLKREIZA.mjs +16 -0
- package/dist/lib/neutral/fetch-TLKREIZA.mjs.map +7 -0
- package/dist/lib/neutral/fetch-messages-AFX7ZAVE.mjs +154 -0
- package/dist/lib/neutral/fetch-messages-AFX7ZAVE.mjs.map +7 -0
- package/dist/lib/neutral/get-context-MKM4CEGH.mjs +35 -0
- package/dist/lib/neutral/get-context-MKM4CEGH.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +248 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/load-KHLICMGJ.mjs +17 -0
- package/dist/lib/neutral/load-KHLICMGJ.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/{browser/index.mjs → neutral/mock-JSY4GY77.mjs} +28 -1953
- package/dist/lib/neutral/mock-JSY4GY77.mjs.map +7 -0
- package/dist/lib/neutral/object-create-7J7D53FT.mjs +43 -0
- package/dist/lib/neutral/object-create-7J7D53FT.mjs.map +7 -0
- package/dist/lib/neutral/object-delete-QFXUHJ2D.mjs +18 -0
- package/dist/lib/neutral/object-delete-QFXUHJ2D.mjs.map +7 -0
- package/dist/lib/neutral/object-update-C73HRM5F.mjs +28 -0
- package/dist/lib/neutral/object-update-C73HRM5F.mjs.map +7 -0
- package/dist/lib/neutral/project-rules-ZVV4TFOQ.mjs +77 -0
- package/dist/lib/neutral/project-rules-ZVV4TFOQ.mjs.map +7 -0
- package/dist/lib/neutral/prompt-J2XSDAWH.mjs +138 -0
- package/dist/lib/neutral/prompt-J2XSDAWH.mjs.map +7 -0
- package/dist/lib/neutral/qualifier-WRYRVSET.mjs +104 -0
- package/dist/lib/neutral/qualifier-WRYRVSET.mjs.map +7 -0
- package/dist/lib/neutral/query-FUFKLAN2.mjs +66 -0
- package/dist/lib/neutral/query-FUFKLAN2.mjs.map +7 -0
- package/dist/lib/neutral/query-U4LWIBNG.mjs +32 -0
- package/dist/lib/neutral/query-U4LWIBNG.mjs.map +7 -0
- package/dist/lib/neutral/query-blueprints-Y5CXJLCT.mjs +17 -0
- package/dist/lib/neutral/query-blueprints-Y5CXJLCT.mjs.map +7 -0
- package/dist/lib/neutral/read-JJN7YXHI.mjs +19 -0
- package/dist/lib/neutral/read-JJN7YXHI.mjs.map +7 -0
- package/dist/lib/neutral/relation-create-YWV2TUKS.mjs +42 -0
- package/dist/lib/neutral/relation-create-YWV2TUKS.mjs.map +7 -0
- package/dist/lib/neutral/relation-delete-JGGA4CYQ.mjs +18 -0
- package/dist/lib/neutral/relation-delete-JGGA4CYQ.mjs.map +7 -0
- package/dist/lib/neutral/research-UBK6ZGX7.mjs +109 -0
- package/dist/lib/neutral/research-UBK6ZGX7.mjs.map +7 -0
- package/dist/lib/neutral/save-JZ73KUMA.mjs +23 -0
- package/dist/lib/neutral/save-JZ73KUMA.mjs.map +7 -0
- package/dist/lib/neutral/schema-add-7WKPPKW4.mjs +24 -0
- package/dist/lib/neutral/schema-add-7WKPPKW4.mjs.map +7 -0
- package/dist/lib/neutral/schema-list-MIAIKERK.mjs +30 -0
- package/dist/lib/neutral/schema-list-MIAIKERK.mjs.map +7 -0
- package/dist/lib/neutral/sync-issues-FIRE3XR6.mjs +179 -0
- package/dist/lib/neutral/sync-issues-FIRE3XR6.mjs.map +7 -0
- package/dist/lib/neutral/tag-add-IKD4ADDM.mjs +19 -0
- package/dist/lib/neutral/tag-add-IKD4ADDM.mjs.map +7 -0
- package/dist/lib/neutral/tag-remove-PCSKCFT2.mjs +19 -0
- package/dist/lib/neutral/tag-remove-PCSKCFT2.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +81 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/neutral/update-HZ7A3ZA5.mjs +20 -0
- package/dist/lib/neutral/update-HZ7A3ZA5.mjs.map +7 -0
- package/dist/lib/neutral/update-tasks-TZ65WZ44.mjs +46 -0
- package/dist/lib/neutral/update-tasks-TZ65WZ44.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 +59 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +36 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +27 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/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 +58 -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 +11 -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/design/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/design/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/design/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/design/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/design/index.d.ts +1 -2
- package/dist/types/src/blueprints/design/index.d.ts.map +1 -1
- 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 +16 -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 +4 -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 +8 -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 +9 -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 +14 -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 +7 -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 +11 -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/markdown/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/markdown/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/markdown/functions/create.d.ts +8 -0
- package/dist/types/src/blueprints/markdown/functions/create.d.ts.map +1 -0
- package/dist/types/src/blueprints/markdown/functions/definitions.d.ts +45 -0
- package/dist/types/src/blueprints/markdown/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/markdown/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/markdown/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/markdown/functions/read.d.ts +17 -0
- package/dist/types/src/blueprints/markdown/functions/read.d.ts.map +1 -0
- package/dist/types/src/blueprints/markdown/functions/update.d.ts +16 -0
- package/dist/types/src/blueprints/markdown/functions/update.d.ts.map +1 -0
- package/dist/types/src/blueprints/markdown/index.d.ts +3 -0
- package/dist/types/src/blueprints/markdown/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/memory/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts +17 -0
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/delete.d.ts +10 -0
- package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/query.d.ts +8 -0
- package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/save.d.ts +8 -0
- package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/index.d.ts +3 -0
- package/dist/types/src/blueprints/memory/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts +11 -0
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +11 -0
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/index.d.ts +2 -2
- package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning-old/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/planning-old/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/planning-old/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/functions/definitions.d.ts +31 -0
- package/dist/types/src/blueprints/planning-old/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/planning-old/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/functions/read.d.ts +17 -0
- package/dist/types/src/blueprints/planning-old/functions/read.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/functions/update.d.ts +19 -0
- package/dist/types/src/blueprints/planning-old/functions/update.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/index.d.ts +3 -0
- package/dist/types/src/blueprints/planning-old/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/project/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +8 -0
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/agent.d.ts +4 -0
- package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/definitions.d.ts +150 -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 +69 -0
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/index.d.ts +4 -0
- package/dist/types/src/blueprints/project/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/sync-triggers.d.ts +11 -0
- package/dist/types/src/blueprints/project/sync-triggers.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 +48 -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 +49 -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/index.d.ts +3 -0
- package/dist/types/src/blueprints/project-wizard/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/research/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/research/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/functions/definitions.d.ts +21 -0
- package/dist/types/src/blueprints/research/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/functions/document-create.d.ts +12 -0
- package/dist/types/src/blueprints/research/functions/document-create.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/research/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/functions/research.d.ts +18 -0
- package/dist/types/src/blueprints/research/functions/research.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/functions/research.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/index.d.ts +3 -2
- package/dist/types/src/blueprints/research/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts +24 -0
- package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/types/index.d.ts +7 -0
- package/dist/types/src/blueprints/research/types/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/testing.d.ts +16 -4
- package/dist/types/src/blueprints/testing.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/websearch/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +5 -0
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +6 -0
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/index.d.ts +3 -3
- package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/{websearch-toolkit.d.ts → toolkit.d.ts} +4 -1
- package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -0
- package/dist/types/src/{functions/research → crud}/graph.d.ts +14 -11
- package/dist/types/src/crud/graph.d.ts.map +1 -0
- package/dist/types/src/crud/graph.test.d.ts.map +1 -0
- package/dist/types/src/crud/index.d.ts +2 -0
- package/dist/types/src/crud/index.d.ts.map +1 -0
- package/dist/types/src/functions/agent/definitions.d.ts +101 -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 +100 -9
- package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.test.d.ts +2 -0
- package/dist/types/src/functions/agent/prompt.test.d.ts.map +1 -0
- package/dist/types/src/functions/entity-extraction/definitions.d.ts +182 -0
- package/dist/types/src/functions/entity-extraction/definitions.d.ts.map +1 -0
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +2 -171
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +1 -1
- package/dist/types/src/functions/entity-extraction/index.d.ts +3 -173
- package/dist/types/src/functions/entity-extraction/index.d.ts.map +1 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts.map +1 -0
- package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts.map +1 -0
- package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts.map +1 -0
- package/dist/types/src/functions/exa/data/index.d.ts.map +1 -0
- package/dist/types/src/functions/exa/definitions.d.ts +9 -0
- package/dist/types/src/functions/exa/definitions.d.ts.map +1 -0
- package/dist/types/src/functions/exa/exa.d.ts +4 -2
- package/dist/types/src/functions/exa/exa.d.ts.map +1 -1
- package/dist/types/src/functions/exa/index.d.ts +3 -2
- package/dist/types/src/functions/exa/index.d.ts.map +1 -1
- package/dist/types/src/functions/exa/mock.d.ts +3 -2
- package/dist/types/src/functions/exa/mock.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +1 -5
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/sync/sync.d.ts +3 -3
- package/dist/types/src/sync/sync.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/plugins.d.ts +19 -0
- package/dist/types/src/testing/plugins.d.ts.map +1 -0
- package/dist/types/src/toolkits/WebToolkit.d.ts +38 -0
- package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -0
- package/dist/types/src/toolkits/index.d.ts +2 -0
- package/dist/types/src/toolkits/index.d.ts.map +1 -0
- package/dist/types/src/types/Chat.d.ts +52 -0
- package/dist/types/src/types/Chat.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 +86 -0
- package/dist/types/src/types/Plan.d.ts.map +1 -0
- package/dist/types/src/types/Project.d.ts +73 -0
- package/dist/types/src/types/Project.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +5 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +50 -38
- package/src/blueprints/automation/blueprint.ts +109 -0
- package/src/blueprints/automation/index.ts +5 -0
- package/src/blueprints/blueprint-manager/blueprint.test.ts +130 -0
- package/src/blueprints/blueprint-manager/blueprint.ts +49 -0
- package/src/blueprints/blueprint-manager/functions/definitions.ts +46 -0
- package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +44 -0
- package/src/blueprints/blueprint-manager/functions/index.ts +12 -0
- package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +19 -0
- package/src/blueprints/blueprint-manager/index.ts +6 -0
- package/src/blueprints/browser/blueprint.conversations.json +1 -0
- package/src/blueprints/browser/blueprint.test.ts +64 -0
- package/src/blueprints/browser/blueprint.ts +41 -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 +343 -0
- package/src/blueprints/database/blueprint.ts +67 -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 +301 -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 +56 -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 +27 -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/design/{design-blueprint.test.ts → blueprint.test.ts} +26 -37
- package/src/blueprints/design/{design-blueprint.ts → blueprint.ts} +21 -13
- package/src/blueprints/design/index.ts +1 -3
- package/src/blueprints/discord/blueprint.ts +42 -0
- package/src/blueprints/discord/functions/definitions.ts +71 -0
- package/src/{functions/discord → blueprints/discord/functions}/fetch-messages.test.ts +11 -14
- package/src/blueprints/discord/functions/fetch-messages.ts +199 -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 +27 -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 +14 -6
- package/src/blueprints/linear/blueprint.ts +43 -0
- package/src/blueprints/linear/functions/definitions.ts +24 -0
- package/src/blueprints/linear/functions/index.ts +9 -0
- package/src/blueprints/linear/functions/linear.test.ts +60 -0
- package/src/{functions/linear → blueprints/linear/functions}/sync-issues.ts +44 -50
- package/src/blueprints/linear/index.ts +2 -3
- package/src/blueprints/markdown/blueprint.ts +36 -0
- package/src/blueprints/markdown/functions/create.ts +20 -0
- package/src/blueprints/markdown/functions/definitions.ts +80 -0
- package/src/blueprints/markdown/functions/index.ts +13 -0
- package/src/blueprints/markdown/functions/read.ts +22 -0
- package/src/blueprints/markdown/functions/update.ts +22 -0
- package/src/blueprints/markdown/index.ts +11 -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 +42 -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 +25 -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/{planning/planning-blueprint.test.ts → planning-old/blueprint.test.ts} +26 -33
- package/src/blueprints/{planning/planning-blueprint.ts → planning-old/blueprint.ts} +21 -13
- package/src/blueprints/planning-old/functions/definitions.ts +53 -0
- package/src/blueprints/planning-old/functions/index.ts +12 -0
- package/src/blueprints/planning-old/functions/read.ts +24 -0
- package/src/blueprints/planning-old/functions/update.ts +31 -0
- package/src/blueprints/planning-old/index.ts +6 -0
- package/src/blueprints/project/blueprint.conversations.json +1 -0
- package/src/blueprints/project/blueprint.test.ts +587 -0
- package/src/blueprints/project/blueprint.ts +65 -0
- package/src/blueprints/project/functions/add-artifact.ts +30 -0
- package/src/blueprints/project/functions/agent.ts +75 -0
- package/src/blueprints/project/functions/definitions.ts +91 -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 +7 -0
- package/src/blueprints/project/sync-triggers.ts +149 -0
- package/src/blueprints/project-wizard/blueprint.ts +43 -0
- package/src/blueprints/project-wizard/functions/create-project.ts +33 -0
- package/src/blueprints/project-wizard/functions/definitions.ts +48 -0
- package/src/blueprints/project-wizard/functions/index.ts +12 -0
- package/src/blueprints/project-wizard/functions/project-rules.ts +76 -0
- package/src/blueprints/project-wizard/index.ts +6 -0
- package/src/blueprints/research/blueprint.ts +61 -0
- package/src/blueprints/research/functions/definitions.ts +87 -0
- package/src/blueprints/research/functions/document-create.ts +50 -0
- package/src/blueprints/research/functions/index.ts +12 -0
- package/src/{functions/research/instructions-research.tpl → blueprints/research/functions/research-instructions.tpl} +19 -11
- package/src/blueprints/research/functions/research.conversations.json +1 -0
- package/src/blueprints/research/functions/research.test.ts +152 -0
- package/src/blueprints/research/functions/research.ts +138 -0
- package/src/blueprints/research/index.ts +3 -3
- package/src/blueprints/research/types/ResearchGraph.ts +62 -0
- package/src/blueprints/research/types/index.ts +32 -0
- package/src/blueprints/testing.ts +34 -5
- package/src/blueprints/websearch/blueprint.conversations.json +1 -0
- package/src/blueprints/websearch/blueprint.test.ts +39 -0
- package/src/blueprints/websearch/blueprint.ts +31 -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} +4 -0
- package/src/crud/graph.test.ts +46 -0
- package/src/{functions/research → crud}/graph.ts +32 -40
- package/src/crud/index.ts +5 -0
- package/src/functions/READ_THIS.md +5 -0
- package/src/functions/agent/definitions.ts +53 -0
- package/src/functions/agent/index.ts +3 -5
- package/src/functions/agent/prompt.test.ts +144 -0
- package/src/functions/agent/prompt.ts +120 -85
- package/src/functions/entity-extraction/definitions.ts +44 -0
- package/src/functions/entity-extraction/entity-extraction.conversations.json +1 -1
- package/src/functions/entity-extraction/entity-extraction.test.ts +19 -43
- package/src/functions/entity-extraction/entity-extraction.ts +84 -88
- package/src/functions/entity-extraction/index.ts +4 -4
- package/src/functions/exa/definitions.ts +37 -0
- package/src/functions/exa/exa.ts +22 -27
- package/src/functions/exa/index.ts +8 -2
- package/src/functions/exa/mock.ts +26 -35
- package/src/functions/index.ts +1 -5
- package/src/index.ts +3 -1
- package/src/sync/sync.ts +38 -30
- package/src/testing/index.ts +2 -1
- package/src/testing/plugins.tsx +77 -0
- package/src/toolkits/WebToolkit.ts +33 -0
- package/src/toolkits/index.ts +5 -0
- package/src/types/Chat.ts +62 -0
- package/src/types/Memory.ts +23 -0
- package/src/types/Plan.ts +110 -0
- package/src/types/Project.ts +208 -0
- package/src/types/index.ts +8 -0
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/node-esm/index.mjs +0 -2483
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/types/src/blueprints/design/design-blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/design/design-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/design-blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/design/design-blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/discord/discord-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/discord/discord-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/linear/linear-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/linear/linear-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning/planning-blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/planning/planning-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/research-blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/research/research-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/research-blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/research/research-blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/websearch/websearch-toolkit.d.ts.map +0 -1
- package/dist/types/src/experimental/feed.test.d.ts +0 -2
- package/dist/types/src/experimental/feed.test.d.ts.map +0 -1
- package/dist/types/src/functions/discord/fetch-messages.d.ts.map +0 -1
- package/dist/types/src/functions/discord/fetch-messages.test.d.ts.map +0 -1
- package/dist/types/src/functions/discord/index.d.ts +0 -12
- package/dist/types/src/functions/discord/index.d.ts.map +0 -1
- package/dist/types/src/functions/document/index.d.ts +0 -12
- package/dist/types/src/functions/document/index.d.ts.map +0 -1
- package/dist/types/src/functions/document/read.d.ts +0 -7
- package/dist/types/src/functions/document/read.d.ts.map +0 -1
- package/dist/types/src/functions/document/update.d.ts +0 -6
- package/dist/types/src/functions/document/update.d.ts.map +0 -1
- package/dist/types/src/functions/github/fetch-prs.d.ts +0 -6
- package/dist/types/src/functions/github/fetch-prs.d.ts.map +0 -1
- package/dist/types/src/functions/linear/index.d.ts +0 -9
- package/dist/types/src/functions/linear/index.d.ts.map +0 -1
- package/dist/types/src/functions/linear/linear.test.d.ts.map +0 -1
- package/dist/types/src/functions/linear/sync-issues.d.ts +0 -12
- package/dist/types/src/functions/linear/sync-issues.d.ts.map +0 -1
- package/dist/types/src/functions/research/create-document.d.ts +0 -7
- package/dist/types/src/functions/research/create-document.d.ts.map +0 -1
- package/dist/types/src/functions/research/graph.d.ts.map +0 -1
- package/dist/types/src/functions/research/graph.test.d.ts.map +0 -1
- package/dist/types/src/functions/research/index.d.ts +0 -19
- package/dist/types/src/functions/research/index.d.ts.map +0 -1
- package/dist/types/src/functions/research/research-graph.d.ts +0 -18
- package/dist/types/src/functions/research/research-graph.d.ts.map +0 -1
- package/dist/types/src/functions/research/research.d.ts +0 -13
- package/dist/types/src/functions/research/research.d.ts.map +0 -1
- package/dist/types/src/functions/research/research.test.d.ts.map +0 -1
- package/dist/types/src/functions/research/types.d.ts +0 -384
- package/dist/types/src/functions/research/types.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/index.d.ts +0 -15
- package/dist/types/src/functions/tasks/index.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/read.d.ts +0 -7
- package/dist/types/src/functions/tasks/read.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/task-list.d.ts.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- package/dist/types/src/testing/data/index.d.ts.map +0 -1
- package/src/blueprints/discord/discord-blueprint.ts +0 -34
- package/src/blueprints/linear/linear-blueprint.ts +0 -35
- package/src/blueprints/research/research-blueprint.ts +0 -45
- package/src/blueprints/websearch/websearch-blueprint.ts +0 -20
- package/src/experimental/feed.test.ts +0 -108
- package/src/functions/discord/fetch-messages.ts +0 -251
- package/src/functions/discord/index.ts +0 -9
- package/src/functions/document/index.ts +0 -11
- package/src/functions/document/read.ts +0 -29
- package/src/functions/document/update.ts +0 -30
- package/src/functions/github/fetch-prs.ts +0 -30
- package/src/functions/linear/index.ts +0 -9
- package/src/functions/linear/linear.test.ts +0 -86
- package/src/functions/research/create-document.ts +0 -69
- package/src/functions/research/graph.test.ts +0 -69
- package/src/functions/research/index.ts +0 -15
- package/src/functions/research/research-graph.ts +0 -47
- package/src/functions/research/research.conversations.json +0 -10714
- package/src/functions/research/research.test.ts +0 -240
- package/src/functions/research/research.ts +0 -155
- package/src/functions/research/types.ts +0 -24
- package/src/functions/tasks/index.ts +0 -11
- package/src/functions/tasks/read.ts +0 -34
- package/src/functions/tasks/update.ts +0 -52
- package/src/plugins.tsx +0 -68
- /package/dist/types/src/{functions/discord → blueprints/discord/functions}/fetch-messages.test.d.ts +0 -0
- /package/dist/types/src/{functions/linear → blueprints/linear/functions}/linear.test.d.ts +0 -0
- /package/dist/types/src/{functions/tasks → blueprints/planning-old/functions}/task-list.d.ts +0 -0
- /package/dist/types/src/{functions/tasks → blueprints/planning-old/functions}/task-list.test.d.ts +0 -0
- /package/dist/types/src/{functions/research → blueprints/research/functions}/research.test.d.ts +0 -0
- /package/dist/types/src/{functions/research → crud}/graph.test.d.ts +0 -0
- /package/dist/types/src/{testing → functions/exa}/data/exa-search-1748337321991.d.ts +0 -0
- /package/dist/types/src/{testing → functions/exa}/data/exa-search-1748337331526.d.ts +0 -0
- /package/dist/types/src/{testing → functions/exa}/data/exa-search-1748337344119.d.ts +0 -0
- /package/dist/types/src/{testing → functions/exa}/data/index.d.ts +0 -0
- /package/src/{functions/tasks → blueprints/planning-old/functions}/task-list.test.ts +0 -0
- /package/src/{functions/tasks → blueprints/planning-old/functions}/task-list.ts +0 -0
- /package/src/blueprints/research/{research-blueprint.test.ts → blueprint.test.ts} +0 -0
- /package/src/{testing → functions/exa}/data/exa-search-1748337321991.ts +0 -0
- /package/src/{testing → functions/exa}/data/exa-search-1748337331526.ts +0 -0
- /package/src/{testing → functions/exa}/data/exa-search-1748337344119.ts +0 -0
- /package/src/{testing → functions/exa}/data/index.ts +0 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
|
|
7
|
+
import { AiContextService } from '@dxos/assistant';
|
|
8
|
+
import { Database, Obj, Ref, Relation, Tag } from '@dxos/echo';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
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
|
+
},
|
|
53
|
+
input: Schema.Struct({
|
|
54
|
+
typename: Schema.optional(
|
|
55
|
+
Schema.String.annotations({
|
|
56
|
+
description: 'The typename of the objects to list.',
|
|
57
|
+
example: 'org.dxos.type.task',
|
|
58
|
+
}),
|
|
59
|
+
),
|
|
60
|
+
text: Schema.optional(
|
|
61
|
+
Schema.String.annotations({
|
|
62
|
+
description: 'Full text search query.',
|
|
63
|
+
example: 'email cyberdyne bob',
|
|
64
|
+
}),
|
|
65
|
+
),
|
|
66
|
+
includeContent: Schema.optional(
|
|
67
|
+
Schema.Boolean.annotations({
|
|
68
|
+
description: 'Include the full object data in the response.',
|
|
69
|
+
default: false,
|
|
70
|
+
}),
|
|
71
|
+
),
|
|
72
|
+
limit: Schema.optional(
|
|
73
|
+
Schema.Number.annotations({
|
|
74
|
+
description: 'The maximum number of results to return.',
|
|
75
|
+
default: 10,
|
|
76
|
+
}),
|
|
77
|
+
),
|
|
78
|
+
includeQueues: Schema.optional(
|
|
79
|
+
Schema.Boolean.annotations({
|
|
80
|
+
description: 'Search in queues as well as spaces. Only use this if searching for emails.',
|
|
81
|
+
default: false,
|
|
82
|
+
}),
|
|
83
|
+
),
|
|
84
|
+
}),
|
|
85
|
+
output: Schema.Array(Schema.Unknown),
|
|
86
|
+
services: [Database.Service],
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export const Load = Operation.make({
|
|
90
|
+
meta: {
|
|
91
|
+
key: 'org.dxos.function.database.load',
|
|
92
|
+
name: 'Load object',
|
|
93
|
+
description: trim`
|
|
94
|
+
Loads the object or relation content.
|
|
95
|
+
Can load multiple objects at at time.
|
|
96
|
+
Use the to read the data when you have a DXN.
|
|
97
|
+
Call this tool with an array of one or more DXNs or object IDs.
|
|
98
|
+
When use see a reference ({ '/': 'dxn:...' }), you can call this function to load the object.
|
|
99
|
+
Note that returned data is only a snapshot in time, and might have changed since the object was last loaded.
|
|
100
|
+
`,
|
|
101
|
+
},
|
|
102
|
+
input: Schema.Struct({
|
|
103
|
+
refs: Schema.Array(Ref.Ref(Obj.Unknown)),
|
|
104
|
+
}),
|
|
105
|
+
output: Schema.Unknown,
|
|
106
|
+
services: [Database.Service],
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
export const ObjectCreate = Operation.make({
|
|
110
|
+
meta: {
|
|
111
|
+
key: 'org.dxos.function.database.object-create',
|
|
112
|
+
name: 'Create object',
|
|
113
|
+
description: trim`
|
|
114
|
+
Creates a new object and adds it to the current space.
|
|
115
|
+
Get the schema from the schema-list tool and ensure that the data matches the corresponding schema.
|
|
116
|
+
References are provided in the following format: { "/": "dxn:..." }.
|
|
117
|
+
Reference examples: { "/": "dxn:echo:@:01KG7R1ZXWFMWQ4DA1Q6TN1DG4" }, { "/": "dxn:queue:data:01KG7R1ZXWFMWQ4DA1Q6TN1DG4:01KG7R1ZXWFMWQ4DA1Q6TN1DG4" }
|
|
118
|
+
`,
|
|
119
|
+
},
|
|
120
|
+
input: Schema.Struct({
|
|
121
|
+
typename: Schema.String,
|
|
122
|
+
data: Schema.Any,
|
|
123
|
+
}),
|
|
124
|
+
output: Schema.Unknown,
|
|
125
|
+
services: [Database.Service],
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
export const ObjectUpdate = Operation.make({
|
|
129
|
+
meta: {
|
|
130
|
+
key: 'org.dxos.function.database.object-update',
|
|
131
|
+
name: 'Update object',
|
|
132
|
+
description: trim`
|
|
133
|
+
Updates the object properties.
|
|
134
|
+
References are provided in the following format: { "/": "dxn:..." }.
|
|
135
|
+
Reference examples: { "/": "dxn:echo:@:01KG7R1ZXWFMWQ4DA1Q6TN1DG4" }, { "/": "dxn:queue:data:01KG7R1ZXWFMWQ4DA1Q6TN1DG4:01KG7R1ZXWFMWQ4DA1Q6TN1DG4" }
|
|
136
|
+
`,
|
|
137
|
+
},
|
|
138
|
+
input: Schema.Struct({
|
|
139
|
+
obj: Ref.Ref(Obj.Unknown),
|
|
140
|
+
properties: Schema.Record({ key: Schema.String, value: Schema.Any }),
|
|
141
|
+
}),
|
|
142
|
+
output: Schema.Unknown,
|
|
143
|
+
services: [Database.Service],
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
export const ObjectDelete = Operation.make({
|
|
147
|
+
meta: {
|
|
148
|
+
key: 'org.dxos.function.database.object-delete',
|
|
149
|
+
name: 'Delete object',
|
|
150
|
+
description: trim`
|
|
151
|
+
Deletes the object.
|
|
152
|
+
`,
|
|
153
|
+
},
|
|
154
|
+
input: Schema.Struct({
|
|
155
|
+
obj: Ref.Ref(Obj.Unknown),
|
|
156
|
+
}),
|
|
157
|
+
output: Schema.Void,
|
|
158
|
+
services: [Database.Service],
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
export const SchemaAdd = Operation.make({
|
|
162
|
+
meta: {
|
|
163
|
+
key: 'org.dxos.function.database.schema-add',
|
|
164
|
+
name: 'Add schema',
|
|
165
|
+
description: trim`
|
|
166
|
+
Adds a schema to the space.
|
|
167
|
+
The name will be used when displayed to the user.
|
|
168
|
+
`,
|
|
169
|
+
},
|
|
170
|
+
input: Schema.Struct({
|
|
171
|
+
name: Schema.String,
|
|
172
|
+
typename: Schema.String.annotations({
|
|
173
|
+
description: 'The typename of the schema in the format of "com.example.type.type".',
|
|
174
|
+
}),
|
|
175
|
+
jsonSchema: Schema.Any,
|
|
176
|
+
}),
|
|
177
|
+
output: Schema.Void,
|
|
178
|
+
services: [Database.Service],
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
export const SchemaList = Operation.make({
|
|
182
|
+
meta: {
|
|
183
|
+
key: 'org.dxos.function.database.schema-list',
|
|
184
|
+
name: 'List schemas',
|
|
185
|
+
description: trim`
|
|
186
|
+
Lists schemas definitions.
|
|
187
|
+
`,
|
|
188
|
+
},
|
|
189
|
+
input: Schema.Struct({
|
|
190
|
+
limit: Schema.optional(Schema.Number),
|
|
191
|
+
}),
|
|
192
|
+
output: Schema.Array(Schema.Unknown),
|
|
193
|
+
services: [Database.Service],
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
export const ContextAdd = Operation.make({
|
|
197
|
+
meta: {
|
|
198
|
+
key: 'org.dxos.function.database.context-add',
|
|
199
|
+
name: 'Add to context',
|
|
200
|
+
description: trim`
|
|
201
|
+
Adds the object to the chat context.
|
|
202
|
+
Use this it for objects that are useful long-term for the conversation.
|
|
203
|
+
`,
|
|
204
|
+
},
|
|
205
|
+
input: Schema.Struct({
|
|
206
|
+
obj: Ref.Ref(Obj.Unknown).annotations({
|
|
207
|
+
description: 'Object to add to the chat context.',
|
|
208
|
+
}),
|
|
209
|
+
}),
|
|
210
|
+
output: Schema.Void,
|
|
211
|
+
services: [AiContextService],
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
export const ContextRemove = Operation.make({
|
|
215
|
+
meta: {
|
|
216
|
+
key: 'org.dxos.function.database.context-remove',
|
|
217
|
+
name: 'Remove from context',
|
|
218
|
+
description: trim`
|
|
219
|
+
Removes the object from the chat context.
|
|
220
|
+
Use this it for objects that are no longer useful for the conversation.
|
|
221
|
+
`,
|
|
222
|
+
},
|
|
223
|
+
input: Schema.Struct({
|
|
224
|
+
obj: Ref.Ref(Obj.Unknown).annotations({
|
|
225
|
+
description: 'Object to remove from the chat context.',
|
|
226
|
+
}),
|
|
227
|
+
}),
|
|
228
|
+
output: Schema.Void,
|
|
229
|
+
services: [AiContextService],
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
export const RelationCreate = Operation.make({
|
|
233
|
+
meta: {
|
|
234
|
+
key: 'org.dxos.function.database.relation-create',
|
|
235
|
+
name: 'Create relation',
|
|
236
|
+
description: trim`
|
|
237
|
+
Creates a new relation and adds it to the current space.
|
|
238
|
+
Get the schema from the schema-list tool and ensure that the data matches the corresponding schema.
|
|
239
|
+
`,
|
|
240
|
+
},
|
|
241
|
+
input: Schema.Struct({
|
|
242
|
+
typename: Schema.String,
|
|
243
|
+
source: Ref.Ref(Obj.Unknown),
|
|
244
|
+
target: Ref.Ref(Obj.Unknown),
|
|
245
|
+
properties: Schema.Any.annotations({
|
|
246
|
+
description: 'The data to be stored in the relation.',
|
|
247
|
+
}),
|
|
248
|
+
}),
|
|
249
|
+
output: Schema.Unknown,
|
|
250
|
+
services: [Database.Service],
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
export const RelationDelete = Operation.make({
|
|
254
|
+
meta: {
|
|
255
|
+
key: 'org.dxos.function.database.relation-delete',
|
|
256
|
+
name: 'Delete relation',
|
|
257
|
+
description: trim`
|
|
258
|
+
Deletes the relation.
|
|
259
|
+
`,
|
|
260
|
+
},
|
|
261
|
+
input: Schema.Struct({
|
|
262
|
+
rel: Ref.Ref(Relation.Unknown),
|
|
263
|
+
}),
|
|
264
|
+
output: Schema.Void,
|
|
265
|
+
services: [Database.Service],
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
export const TagAdd = Operation.make({
|
|
269
|
+
meta: {
|
|
270
|
+
key: 'org.dxos.function.database.tag-add',
|
|
271
|
+
name: 'Add tag',
|
|
272
|
+
description: trim`
|
|
273
|
+
Adds a tag to an object.
|
|
274
|
+
Tags are objects of type ${Tag.Tag.typename}.
|
|
275
|
+
You must search database for available tags, or create a new one.
|
|
276
|
+
`,
|
|
277
|
+
},
|
|
278
|
+
input: Schema.Struct({
|
|
279
|
+
tag: Ref.Ref(Obj.Unknown),
|
|
280
|
+
obj: Ref.Ref(Obj.Unknown),
|
|
281
|
+
}),
|
|
282
|
+
output: Schema.Unknown,
|
|
283
|
+
services: [Database.Service],
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
export const TagRemove = Operation.make({
|
|
287
|
+
meta: {
|
|
288
|
+
key: 'org.dxos.function.database.tag-remove',
|
|
289
|
+
name: 'Remove tag',
|
|
290
|
+
description: trim`
|
|
291
|
+
Removes a tag from an object.
|
|
292
|
+
Tags are objects of type ${Tag.Tag.typename}.
|
|
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
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { OperationHandlerSet } from '@dxos/operation';
|
|
6
|
+
|
|
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
|
+
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Array from 'effect/Array';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
|
|
8
|
+
import { Database, Entity } from '@dxos/echo';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
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
|
+
);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Database, Entity, Obj, Type } from '@dxos/echo';
|
|
8
|
+
import { EncodedReference } from '@dxos/echo-protocol';
|
|
9
|
+
import { invariant } from '@dxos/invariant';
|
|
10
|
+
import { Operation } from '@dxos/operation';
|
|
11
|
+
import { deepMapValues } from '@dxos/util';
|
|
12
|
+
|
|
13
|
+
import { ObjectCreate } from './definitions';
|
|
14
|
+
|
|
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
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Database } from '@dxos/echo';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
|
|
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
|
+
);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Database, Entity } from '@dxos/echo';
|
|
8
|
+
import { EncodedReference } from '@dxos/echo-protocol';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
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.change(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
|
+
);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Entity, Filter, Obj, Query as EchoQuery } from '@dxos/echo';
|
|
8
|
+
import { Database } from '@dxos/echo';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
11
|
+
import { Query } from './definitions';
|
|
12
|
+
|
|
13
|
+
// TODO(burdon): Move to toolkit (i.e., tool not function).
|
|
14
|
+
export default Query.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fn(function* ({ typename, text, includeContent = false, limit = 10, includeQueues = false }) {
|
|
17
|
+
let query: EchoQuery.Any;
|
|
18
|
+
if (text) {
|
|
19
|
+
query = EchoQuery.all(
|
|
20
|
+
...text.split(' ').map((term) => EchoQuery.select(Filter.text(term, { type: 'full-text' }))),
|
|
21
|
+
);
|
|
22
|
+
if (typename !== undefined) {
|
|
23
|
+
const schema = yield* Database.runSchemaQuery({ typename, location: ['database', 'runtime'] });
|
|
24
|
+
if (schema.length === 0) {
|
|
25
|
+
return yield* Effect.fail(new Error(`Schema ${typename} not found`));
|
|
26
|
+
}
|
|
27
|
+
query = query.select(Filter.type(schema[0]));
|
|
28
|
+
}
|
|
29
|
+
} else if (typename) {
|
|
30
|
+
const schema = yield* Database.runSchemaQuery({ typename, location: ['database', 'runtime'] });
|
|
31
|
+
if (schema.length === 0) {
|
|
32
|
+
return yield* Effect.fail(new Error(`Schema ${typename} not found`));
|
|
33
|
+
}
|
|
34
|
+
query = EchoQuery.select(Filter.type(schema[0]));
|
|
35
|
+
} else {
|
|
36
|
+
query = EchoQuery.select(Filter.everything());
|
|
37
|
+
}
|
|
38
|
+
query = query.limit(limit);
|
|
39
|
+
if (includeQueues) {
|
|
40
|
+
query = query.from({ allQueuesFromSpaces: true });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
yield* Database.flush();
|
|
44
|
+
const results = yield* Database.runQuery(query);
|
|
45
|
+
if (includeContent) {
|
|
46
|
+
return results.map((obj) => Entity.toJSON(obj));
|
|
47
|
+
} else {
|
|
48
|
+
return results.map((obj) => ({
|
|
49
|
+
dxn: Obj.getDXN(obj).toString(),
|
|
50
|
+
typename: Obj.getTypename(obj),
|
|
51
|
+
label: Obj.getLabel(obj),
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
}),
|
|
55
|
+
),
|
|
56
|
+
);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Database, Entity, Relation, Type } from '@dxos/echo';
|
|
8
|
+
import { invariant } from '@dxos/invariant';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
11
|
+
import { RelationCreate } from './definitions';
|
|
12
|
+
|
|
13
|
+
export default RelationCreate.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fn(function* ({ typename, source, target, properties }) {
|
|
16
|
+
const { db } = yield* Database.Service;
|
|
17
|
+
const schema = yield* Effect.promise(() =>
|
|
18
|
+
db.schemaRegistry.query({ typename, location: ['database', 'runtime'] }).first(),
|
|
19
|
+
);
|
|
20
|
+
invariant(Type.isRelationSchema(schema), 'Schema is not a relation schema');
|
|
21
|
+
|
|
22
|
+
const sourceObj = yield* Database.load(source);
|
|
23
|
+
const targetObj = yield* Database.load(target);
|
|
24
|
+
const relation = db.add(
|
|
25
|
+
Relation.make(schema, {
|
|
26
|
+
[Relation.Source]: sourceObj,
|
|
27
|
+
[Relation.Target]: targetObj,
|
|
28
|
+
...properties,
|
|
29
|
+
}),
|
|
30
|
+
);
|
|
31
|
+
return Entity.toJSON(relation);
|
|
32
|
+
}),
|
|
33
|
+
),
|
|
34
|
+
);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Database } from '@dxos/echo';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
import { RelationDelete } from './definitions';
|
|
11
|
+
|
|
12
|
+
export default RelationDelete.pipe(
|
|
13
|
+
Operation.withHandler(
|
|
14
|
+
Effect.fn(function* ({ rel }) {
|
|
15
|
+
const { db } = yield* Database.Service;
|
|
16
|
+
const relation = yield* Database.load(rel);
|
|
17
|
+
// TODO(dmaretskyi): Echo types broken.
|
|
18
|
+
db.remove(relation as any);
|
|
19
|
+
}),
|
|
20
|
+
),
|
|
21
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Database } from '@dxos/echo';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
import { SchemaAdd } from './definitions';
|
|
11
|
+
|
|
12
|
+
export default SchemaAdd.pipe(
|
|
13
|
+
Operation.withHandler(
|
|
14
|
+
Effect.fn(function* ({ name, typename, jsonSchema }) {
|
|
15
|
+
const { db } = yield* Database.Service;
|
|
16
|
+
yield* Effect.promise(() =>
|
|
17
|
+
db.schemaRegistry.register([
|
|
18
|
+
{
|
|
19
|
+
typename,
|
|
20
|
+
version: '0.1.0',
|
|
21
|
+
jsonSchema,
|
|
22
|
+
name,
|
|
23
|
+
},
|
|
24
|
+
]),
|
|
25
|
+
);
|
|
26
|
+
}),
|
|
27
|
+
),
|
|
28
|
+
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Database, JsonSchema, Type } from '@dxos/echo';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
import { SchemaList } from './definitions';
|
|
11
|
+
|
|
12
|
+
export default SchemaList.pipe(
|
|
13
|
+
Operation.withHandler(
|
|
14
|
+
Effect.fn(function* () {
|
|
15
|
+
const { db } = yield* Database.Service;
|
|
16
|
+
const schema = yield* Effect.promise(() => db.schemaRegistry.query({ location: ['database', 'runtime'] }).run());
|
|
17
|
+
return schema.map((schema) => {
|
|
18
|
+
const meta = Type.getMeta(schema);
|
|
19
|
+
return {
|
|
20
|
+
typename: Type.getTypename(schema),
|
|
21
|
+
jsonSchema: JsonSchema.toJsonSchema(schema),
|
|
22
|
+
kind: meta?.sourceSchema ? 'relation' : 'record',
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
}),
|
|
26
|
+
),
|
|
27
|
+
);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Database, Entity, Obj } from '@dxos/echo';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
import { TagAdd } from './definitions';
|
|
11
|
+
|
|
12
|
+
export default TagAdd.pipe(
|
|
13
|
+
Operation.withHandler(
|
|
14
|
+
Effect.fn(function* ({ tag, obj }) {
|
|
15
|
+
const object = yield* Database.load(obj);
|
|
16
|
+
const tagObj = yield* Database.load(tag);
|
|
17
|
+
Entity.change(object, (obj) => Entity.addTag(obj, Obj.getDXN(tagObj).toString()));
|
|
18
|
+
return Entity.toJSON(object);
|
|
19
|
+
}),
|
|
20
|
+
),
|
|
21
|
+
);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Database, Entity, Obj } from '@dxos/echo';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
import { TagRemove } from './definitions';
|
|
11
|
+
|
|
12
|
+
export default TagRemove.pipe(
|
|
13
|
+
Operation.withHandler(
|
|
14
|
+
Effect.fn(function* ({ tag, obj }) {
|
|
15
|
+
const object = yield* Database.load(obj);
|
|
16
|
+
const tagObj = yield* Database.load(tag);
|
|
17
|
+
Entity.change(object, (obj) => Entity.removeTag(obj, Obj.getDXN(tagObj).toString()));
|
|
18
|
+
return Entity.toJSON(object);
|
|
19
|
+
}),
|
|
20
|
+
),
|
|
21
|
+
);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
export { default as DatabaseBlueprint } from './blueprint';
|
|
6
|
+
export {
|
|
7
|
+
Query as DatabaseQuery,
|
|
8
|
+
Load as DatabaseLoad,
|
|
9
|
+
ObjectCreate,
|
|
10
|
+
ObjectUpdate,
|
|
11
|
+
ObjectDelete,
|
|
12
|
+
SchemaAdd,
|
|
13
|
+
SchemaList,
|
|
14
|
+
ContextAdd,
|
|
15
|
+
ContextRemove,
|
|
16
|
+
RelationCreate,
|
|
17
|
+
RelationDelete,
|
|
18
|
+
TagAdd,
|
|
19
|
+
TagRemove,
|
|
20
|
+
DatabaseHandlers,
|
|
21
|
+
} from './functions';
|