@dxos/assistant-toolkit 0.8.4-main.9735255 → 0.8.4-main.abd8ff62ef
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-BA5WQRDU.mjs +30 -0
- package/dist/lib/neutral/add-artifact-BA5WQRDU.mjs.map +7 -0
- package/dist/lib/neutral/agent-M2EW5M36.mjs +65 -0
- package/dist/lib/neutral/agent-M2EW5M36.mjs.map +7 -0
- package/dist/lib/neutral/chunk-CLHVRIYF.mjs +293 -0
- package/dist/lib/neutral/chunk-CLHVRIYF.mjs.map +7 -0
- package/dist/lib/neutral/chunk-CVUA23QI.mjs +332 -0
- package/dist/lib/neutral/chunk-CVUA23QI.mjs.map +7 -0
- package/dist/lib/neutral/chunk-D5MG5OKX.mjs +75 -0
- package/dist/lib/neutral/chunk-D5MG5OKX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-E2XRNXWP.mjs +100 -0
- package/dist/lib/neutral/chunk-E2XRNXWP.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-J37DYY7A.mjs +51 -0
- package/dist/lib/neutral/chunk-J37DYY7A.mjs.map +7 -0
- package/dist/lib/neutral/chunk-JCYLFOFK.mjs +70 -0
- package/dist/lib/neutral/chunk-JCYLFOFK.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-KY2TIPJ5.mjs +108 -0
- package/dist/lib/neutral/chunk-KY2TIPJ5.mjs.map +7 -0
- package/dist/lib/neutral/chunk-MMTKJBB5.mjs +140 -0
- package/dist/lib/neutral/chunk-MMTKJBB5.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-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-ZFXLTBZG.mjs +73 -0
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +7 -0
- package/dist/lib/neutral/context-add-IIDPRRVB.mjs +22 -0
- package/dist/lib/neutral/context-add-IIDPRRVB.mjs.map +7 -0
- package/dist/lib/neutral/context-remove-RDYV4PD4.mjs +22 -0
- package/dist/lib/neutral/context-remove-RDYV4PD4.mjs.map +7 -0
- package/dist/lib/neutral/create-project-GLDEAWTT.mjs +35 -0
- package/dist/lib/neutral/create-project-GLDEAWTT.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-PWGUG5G3.mjs +139 -0
- package/dist/lib/neutral/fetch-messages-PWGUG5G3.mjs.map +7 -0
- package/dist/lib/neutral/get-context-B55SX5Y4.mjs +35 -0
- package/dist/lib/neutral/get-context-B55SX5Y4.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +904 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/load-LI7HHVD6.mjs +17 -0
- package/dist/lib/neutral/load-LI7HHVD6.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/object-create-52Z7YKIA.mjs +35 -0
- package/dist/lib/neutral/object-create-52Z7YKIA.mjs.map +7 -0
- package/dist/lib/neutral/object-delete-I266YAXI.mjs +18 -0
- package/dist/lib/neutral/object-delete-I266YAXI.mjs.map +7 -0
- package/dist/lib/neutral/object-update-HY4GI7LA.mjs +28 -0
- package/dist/lib/neutral/object-update-HY4GI7LA.mjs.map +7 -0
- package/dist/lib/neutral/project-2YBPW5N7.mjs +23 -0
- package/dist/lib/neutral/project-rules-XUBEPDP6.mjs +78 -0
- package/dist/lib/neutral/project-rules-XUBEPDP6.mjs.map +7 -0
- package/dist/lib/neutral/prompt-2WZQERT4.mjs +167 -0
- package/dist/lib/neutral/prompt-2WZQERT4.mjs.map +7 -0
- package/dist/lib/neutral/qualifier-2AC2ICOB.mjs +88 -0
- package/dist/lib/neutral/qualifier-2AC2ICOB.mjs.map +7 -0
- package/dist/lib/neutral/query-B3NOYFCK.mjs +70 -0
- package/dist/lib/neutral/query-B3NOYFCK.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-Z3NGW4VU.mjs +34 -0
- package/dist/lib/neutral/relation-create-Z3NGW4VU.mjs.map +7 -0
- package/dist/lib/neutral/relation-delete-LXY7W2YO.mjs +18 -0
- package/dist/lib/neutral/relation-delete-LXY7W2YO.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-4TXJO2V7.mjs +24 -0
- package/dist/lib/neutral/schema-add-4TXJO2V7.mjs.map +7 -0
- package/dist/lib/neutral/schema-list-PJS5AFZ3.mjs +38 -0
- package/dist/lib/neutral/schema-list-PJS5AFZ3.mjs.map +7 -0
- package/dist/lib/neutral/sync-issues-LOLHZNFL.mjs +167 -0
- package/dist/lib/neutral/sync-issues-LOLHZNFL.mjs.map +7 -0
- package/dist/lib/neutral/sync-triggers-EYJM4QWR.mjs +136 -0
- package/dist/lib/neutral/sync-triggers-EYJM4QWR.mjs.map +7 -0
- package/dist/lib/neutral/tag-add-5NOHUTIE.mjs +19 -0
- package/dist/lib/neutral/tag-add-5NOHUTIE.mjs.map +7 -0
- package/dist/lib/neutral/tag-remove-QTKYDJAW.mjs +19 -0
- package/dist/lib/neutral/tag-remove-QTKYDJAW.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +76 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs +16 -0
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs.map +7 -0
- package/dist/lib/neutral/update-tasks-ML2FCYU5.mjs +46 -0
- package/dist/lib/neutral/update-tasks-ML2FCYU5.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 +35 -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 +26 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/index.d.ts +3 -0
- package/dist/types/src/blueprints/blueprint-manager/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/browser/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/browser/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/browser/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/browser/index.d.ts +2 -0
- package/dist/types/src/blueprints/browser/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/database/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/context-add.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/definitions.d.ts +59 -0
- package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/load.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/object-create.d.ts +8 -0
- package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/object-update.d.ts +10 -0
- package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/query.d.ts +13 -0
- package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts +10 -0
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/schema-add.d.ts +9 -0
- package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts +8 -0
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +8 -0
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/index.d.ts +3 -0
- package/dist/types/src/blueprints/database/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts +15 -0
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/{functions/discord → blueprints/discord/functions}/fetch-messages.d.ts +3 -2
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/functions/fetch-messages.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/index.d.ts +2 -2
- package/dist/types/src/blueprints/discord/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/definitions.d.ts +7 -0
- package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts +8 -0
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -0
- package/dist/types/src/blueprints/github/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/github/index.d.ts +2 -0
- package/dist/types/src/blueprints/github/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +11 -6
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts +6 -0
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/functions/linear.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +10 -0
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/index.d.ts +2 -2
- package/dist/types/src/blueprints/linear/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/memory/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts +17 -0
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/delete.d.ts +10 -0
- package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/query.d.ts +8 -0
- package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/save.d.ts +8 -0
- package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/index.d.ts +3 -0
- package/dist/types/src/blueprints/memory/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts +11 -0
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +11 -0
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/index.d.ts +2 -2
- package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/project/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +8 -0
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/agent.d.ts +4 -0
- package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/definitions.d.ts +158 -0
- package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/get-context.d.ts +15 -0
- package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts +73 -0
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/index.d.ts +3 -0
- package/dist/types/src/blueprints/project/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +51 -0
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +96 -0
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +48 -0
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/index.d.ts +3 -0
- package/dist/types/src/blueprints/project-wizard/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/testing.d.ts +9 -5
- package/dist/types/src/blueprints/testing.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/websearch/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +5 -0
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +6 -0
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/index.d.ts +3 -3
- package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/{websearch-toolkit.d.ts → toolkit.d.ts} +3 -1
- package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -0
- package/dist/types/src/crud/graph.d.ts +7 -7
- 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 +60 -0
- package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
- package/dist/types/src/functions/agent/index.d.ts +3 -4
- package/dist/types/src/functions/agent/index.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.d.ts +2 -74
- package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.test.d.ts +2 -0
- package/dist/types/src/functions/agent/prompt.test.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +0 -6
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/sync/sync.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/plugins.d.ts.map +1 -1
- package/dist/types/src/toolkits/WebToolkit.d.ts +38 -0
- package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -0
- package/dist/types/src/toolkits/index.d.ts +1 -2
- package/dist/types/src/toolkits/index.d.ts.map +1 -1
- package/dist/types/src/types/Agent.d.ts +77 -0
- package/dist/types/src/types/Agent.d.ts.map +1 -0
- package/dist/types/src/types/Chat.d.ts +56 -0
- package/dist/types/src/types/Chat.d.ts.map +1 -0
- package/dist/types/src/types/McpServer.d.ts +18 -0
- package/dist/types/src/types/McpServer.d.ts.map +1 -0
- package/dist/types/src/types/Memory.d.ts +12 -0
- package/dist/types/src/types/Memory.d.ts.map +1 -0
- package/dist/types/src/types/Plan.d.ts +89 -0
- package/dist/types/src/types/Plan.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +6 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/util/graphql.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +34 -43
- package/src/blueprints/automation/blueprint.ts +105 -0
- package/src/blueprints/automation/index.ts +5 -0
- package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -0
- package/src/blueprints/blueprint-manager/blueprint.test.ts +198 -0
- package/src/blueprints/blueprint-manager/blueprint.ts +49 -0
- package/src/blueprints/blueprint-manager/functions/definitions.ts +57 -0
- package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +43 -0
- package/src/blueprints/blueprint-manager/functions/index.ts +13 -0
- package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +18 -0
- package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +18 -0
- package/src/blueprints/blueprint-manager/index.ts +6 -0
- package/src/blueprints/browser/blueprint.test.ts +61 -0
- package/src/blueprints/browser/blueprint.ts +40 -0
- package/src/blueprints/browser/index.ts +5 -0
- package/src/blueprints/database/blueprint.conversations.json +1 -0
- package/src/blueprints/database/blueprint.test.ts +531 -0
- package/src/blueprints/database/blueprint.ts +66 -0
- package/src/blueprints/database/functions/context-add.ts +24 -0
- package/src/blueprints/database/functions/context-remove.ts +24 -0
- package/src/blueprints/database/functions/definitions.ts +318 -0
- package/src/blueprints/database/functions/index.ts +23 -0
- package/src/blueprints/database/functions/load.ts +19 -0
- package/src/blueprints/database/functions/object-create.ts +38 -0
- package/src/blueprints/database/functions/object-delete.ts +20 -0
- package/src/blueprints/database/functions/object-update.ts +30 -0
- package/src/blueprints/database/functions/query.ts +64 -0
- package/src/blueprints/database/functions/relation-create.ts +34 -0
- package/src/blueprints/database/functions/relation-delete.ts +21 -0
- package/src/blueprints/database/functions/schema-add.ts +28 -0
- package/src/blueprints/database/functions/schema-list.ts +33 -0
- package/src/blueprints/database/functions/tag-add.ts +21 -0
- package/src/blueprints/database/functions/tag-remove.ts +21 -0
- package/src/blueprints/database/index.ts +21 -0
- package/src/blueprints/discord/blueprint.ts +41 -0
- package/src/blueprints/discord/functions/definitions.ts +70 -0
- package/src/blueprints/discord/functions/fetch-messages.test.ts +45 -0
- package/src/blueprints/discord/functions/fetch-messages.ts +198 -0
- package/src/blueprints/discord/functions/index.ts +9 -0
- package/src/blueprints/discord/index.ts +2 -3
- package/src/blueprints/github/functions/definitions.ts +26 -0
- package/src/blueprints/github/functions/fetch-prs.ts +24 -0
- package/src/blueprints/github/functions/index.ts +9 -0
- package/src/blueprints/github/index.ts +5 -0
- package/src/blueprints/index.ts +11 -6
- package/src/blueprints/linear/blueprint.ts +42 -0
- package/src/blueprints/linear/functions/definitions.ts +23 -0
- package/src/blueprints/linear/functions/index.ts +9 -0
- package/src/blueprints/linear/functions/linear.test.ts +58 -0
- package/src/{functions/linear → blueprints/linear/functions}/sync-issues.ts +37 -45
- package/src/blueprints/linear/index.ts +2 -3
- package/src/blueprints/memory/blueprint.conversations.json +1 -0
- package/src/blueprints/memory/blueprint.test.ts +139 -0
- package/src/blueprints/memory/blueprint.ts +41 -0
- package/src/blueprints/memory/functions/definitions.ts +68 -0
- package/src/blueprints/memory/functions/delete.ts +20 -0
- package/src/blueprints/memory/functions/index.ts +13 -0
- package/src/blueprints/memory/functions/query.ts +32 -0
- package/src/blueprints/memory/functions/save.ts +20 -0
- package/src/blueprints/memory/index.ts +6 -0
- package/src/blueprints/planning/blueprint.ts +24 -0
- package/src/blueprints/planning/functions/definitions.ts +137 -0
- package/src/blueprints/planning/functions/index.ts +9 -0
- package/src/blueprints/planning/functions/update-tasks.ts +45 -0
- package/src/blueprints/planning/index.ts +3 -4
- package/src/blueprints/project/blueprint.conversations.json +1 -0
- package/src/{initiative/initiative.test.ts → blueprints/project/blueprint.test.ts} +279 -50
- package/src/blueprints/project/blueprint.ts +64 -0
- package/src/blueprints/project/functions/add-artifact.ts +30 -0
- package/src/blueprints/project/functions/agent.ts +69 -0
- package/src/blueprints/project/functions/definitions.ts +92 -0
- package/src/blueprints/project/functions/get-context.ts +46 -0
- package/src/blueprints/project/functions/index.ts +14 -0
- package/src/blueprints/project/functions/qualifier.ts +90 -0
- package/src/blueprints/project/index.ts +6 -0
- package/src/blueprints/project-wizard/blueprint.ts +52 -0
- package/src/blueprints/project-wizard/functions/create-project.ts +32 -0
- package/src/blueprints/project-wizard/functions/definitions.ts +63 -0
- package/src/blueprints/project-wizard/functions/index.ts +13 -0
- package/src/blueprints/project-wizard/functions/project-rules.ts +77 -0
- package/src/blueprints/project-wizard/functions/sync-triggers.ts +158 -0
- package/src/blueprints/project-wizard/index.ts +6 -0
- package/src/blueprints/testing.ts +23 -8
- package/src/blueprints/websearch/blueprint.conversations.json +1 -0
- package/src/blueprints/websearch/blueprint.test.ts +39 -0
- package/src/blueprints/websearch/blueprint.ts +30 -0
- package/src/blueprints/websearch/functions/definitions.ts +25 -0
- package/src/blueprints/websearch/functions/fetch.ts +18 -0
- package/src/blueprints/websearch/functions/index.ts +9 -0
- package/src/blueprints/websearch/index.ts +3 -5
- package/src/blueprints/websearch/{websearch-toolkit.ts → toolkit.ts} +6 -1
- package/src/crud/graph.test.ts +12 -14
- package/src/crud/graph.ts +11 -11
- package/src/errors.ts +25 -0
- package/src/functions/READ_THIS.md +5 -0
- package/src/functions/agent/definitions.ts +51 -0
- package/src/functions/agent/index.ts +3 -5
- package/src/functions/agent/prompt.conversations.json +1 -0
- package/src/functions/agent/prompt.test.ts +81 -0
- package/src/functions/agent/prompt.ts +209 -106
- package/src/functions/index.ts +0 -6
- package/src/index.ts +2 -1
- package/src/sync/sync.ts +25 -14
- package/src/testing/index.ts +1 -0
- package/src/testing/plugins.tsx +30 -19
- package/src/toolkits/WebToolkit.ts +33 -0
- package/src/toolkits/index.ts +1 -2
- package/src/types/Agent.ts +239 -0
- package/src/types/Chat.ts +63 -0
- package/src/types/McpServer.ts +37 -0
- package/src/types/Memory.ts +24 -0
- package/src/types/Plan.ts +110 -0
- package/src/types/index.ts +9 -0
- package/dist/lib/browser/index.mjs +0 -2880
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/testing/index.mjs +0 -43
- package/dist/lib/browser/testing/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/index.mjs +0 -2881
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/testing/index.mjs +0 -44
- package/dist/lib/node-esm/testing/index.mjs.map +0 -7
- package/dist/types/src/blueprints/design/design-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/design/design-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/design-blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/design/design-blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/index.d.ts +0 -3
- package/dist/types/src/blueprints/design/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/discord/discord-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/discord/discord-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/linear/linear-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/linear/linear-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning/planning-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/planning/planning-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/index.d.ts +0 -3
- package/dist/types/src/blueprints/research/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/research-blueprint.d.ts +0 -18
- 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 -18
- package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/websearch/websearch-toolkit.d.ts.map +0 -1
- package/dist/types/src/experimental/feed.test.d.ts +0 -2
- package/dist/types/src/experimental/feed.test.d.ts.map +0 -1
- package/dist/types/src/functions/discord/fetch-messages.d.ts.map +0 -1
- package/dist/types/src/functions/discord/fetch-messages.test.d.ts.map +0 -1
- package/dist/types/src/functions/discord/index.d.ts +0 -12
- package/dist/types/src/functions/discord/index.d.ts.map +0 -1
- package/dist/types/src/functions/document/index.d.ts +0 -13
- package/dist/types/src/functions/document/index.d.ts.map +0 -1
- package/dist/types/src/functions/document/read.d.ts +0 -7
- package/dist/types/src/functions/document/read.d.ts.map +0 -1
- package/dist/types/src/functions/document/update.d.ts +0 -6
- package/dist/types/src/functions/document/update.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +0 -174
- 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 -175
- 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 -3
- package/dist/types/src/functions/exa/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/mock.d.ts +0 -5
- package/dist/types/src/functions/exa/mock.d.ts.map +0 -1
- package/dist/types/src/functions/github/fetch-prs.d.ts +0 -6
- package/dist/types/src/functions/github/fetch-prs.d.ts.map +0 -1
- package/dist/types/src/functions/linear/index.d.ts +0 -9
- package/dist/types/src/functions/linear/index.d.ts.map +0 -1
- package/dist/types/src/functions/linear/linear.test.d.ts.map +0 -1
- package/dist/types/src/functions/linear/sync-issues.d.ts +0 -12
- package/dist/types/src/functions/linear/sync-issues.d.ts.map +0 -1
- package/dist/types/src/functions/research/document-create.d.ts +0 -9
- package/dist/types/src/functions/research/document-create.d.ts.map +0 -1
- package/dist/types/src/functions/research/index.d.ts +0 -21
- package/dist/types/src/functions/research/index.d.ts.map +0 -1
- package/dist/types/src/functions/research/research-graph.d.ts +0 -19
- package/dist/types/src/functions/research/research-graph.d.ts.map +0 -1
- package/dist/types/src/functions/research/research.d.ts +0 -14
- package/dist/types/src/functions/research/research.d.ts.map +0 -1
- package/dist/types/src/functions/research/research.test.d.ts +0 -2
- package/dist/types/src/functions/research/research.test.d.ts.map +0 -1
- package/dist/types/src/functions/research/types.d.ts +0 -6
- package/dist/types/src/functions/research/types.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/index.d.ts +0 -15
- package/dist/types/src/functions/tasks/index.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/read.d.ts +0 -7
- package/dist/types/src/functions/tasks/read.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/task-list.d.ts +0 -74
- package/dist/types/src/functions/tasks/task-list.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/task-list.test.d.ts +0 -2
- package/dist/types/src/functions/tasks/task-list.test.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/update.d.ts +0 -9
- package/dist/types/src/functions/tasks/update.d.ts.map +0 -1
- package/dist/types/src/initiative/Initiative.d.ts +0 -84
- package/dist/types/src/initiative/Initiative.d.ts.map +0 -1
- package/dist/types/src/initiative/InitiativeSchema.d.ts +0 -19
- package/dist/types/src/initiative/InitiativeSchema.d.ts.map +0 -1
- package/dist/types/src/initiative/functions/agent.d.ts +0 -37
- package/dist/types/src/initiative/functions/agent.d.ts.map +0 -1
- package/dist/types/src/initiative/functions/getContext.d.ts +0 -17
- package/dist/types/src/initiative/functions/getContext.d.ts.map +0 -1
- package/dist/types/src/initiative/functions/index.d.ts +0 -4
- package/dist/types/src/initiative/functions/index.d.ts.map +0 -1
- package/dist/types/src/initiative/functions/update.d.ts +0 -7
- package/dist/types/src/initiative/functions/update.d.ts.map +0 -1
- package/dist/types/src/initiative/index.d.ts +0 -1
- package/dist/types/src/initiative/index.d.ts.map +0 -1
- package/dist/types/src/initiative/initiative.test.d.ts +0 -2
- package/dist/types/src/initiative/initiative.test.d.ts.map +0 -1
- package/dist/types/src/toolkits/AssistantToolkit.d.ts +0 -43
- package/dist/types/src/toolkits/AssistantToolkit.d.ts.map +0 -1
- package/dist/types/src/toolkits/AssistantToolkit.test.d.ts +0 -2
- package/dist/types/src/toolkits/AssistantToolkit.test.d.ts.map +0 -1
- package/dist/types/src/toolkits/SystemToolkit.d.ts +0 -99
- package/dist/types/src/toolkits/SystemToolkit.d.ts.map +0 -1
- package/src/blueprints/design/design-blueprint.test.ts +0 -105
- package/src/blueprints/design/design-blueprint.ts +0 -31
- package/src/blueprints/design/index.ts +0 -7
- package/src/blueprints/discord/discord-blueprint.ts +0 -32
- package/src/blueprints/linear/linear-blueprint.ts +0 -33
- package/src/blueprints/planning/planning-blueprint.test.ts +0 -126
- package/src/blueprints/planning/planning-blueprint.ts +0 -96
- package/src/blueprints/research/index.ts +0 -7
- package/src/blueprints/research/research-blueprint.test.ts +0 -7
- package/src/blueprints/research/research-blueprint.ts +0 -51
- package/src/blueprints/websearch/websearch-blueprint.ts +0 -18
- package/src/experimental/feed.test.ts +0 -111
- package/src/functions/discord/fetch-messages.test.ts +0 -58
- package/src/functions/discord/fetch-messages.ts +0 -252
- package/src/functions/discord/index.ts +0 -9
- package/src/functions/document/index.ts +0 -12
- package/src/functions/document/read.ts +0 -30
- package/src/functions/document/update.ts +0 -33
- package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -6597
- package/src/functions/entity-extraction/entity-extraction.test.ts +0 -93
- package/src/functions/entity-extraction/entity-extraction.ts +0 -183
- 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 -6
- package/src/functions/exa/mock.ts +0 -71
- package/src/functions/github/fetch-prs.ts +0 -31
- package/src/functions/linear/index.ts +0 -9
- package/src/functions/linear/linear.test.ts +0 -84
- package/src/functions/research/document-create.ts +0 -76
- package/src/functions/research/index.ts +0 -14
- package/src/functions/research/research-graph.ts +0 -49
- package/src/functions/research/research-instructions.tpl +0 -106
- package/src/functions/research/research.conversations.json +0 -1
- package/src/functions/research/research.test.ts +0 -171
- package/src/functions/research/research.ts +0 -189
- package/src/functions/research/types.ts +0 -26
- package/src/functions/tasks/index.ts +0 -11
- package/src/functions/tasks/read.ts +0 -35
- package/src/functions/tasks/task-list.test.ts +0 -99
- package/src/functions/tasks/task-list.ts +0 -165
- package/src/functions/tasks/update.ts +0 -53
- package/src/initiative/Initiative.ts +0 -99
- package/src/initiative/InitiativeSchema.ts +0 -37
- package/src/initiative/functions/agent.ts +0 -57
- package/src/initiative/functions/getContext.ts +0 -74
- package/src/initiative/functions/index.ts +0 -7
- package/src/initiative/functions/update.ts +0 -63
- package/src/initiative/index.ts +0 -3
- package/src/initiative/initiative.conversations.json +0 -1
- package/src/toolkits/AssistantToolkit.conversations.json +0 -1
- package/src/toolkits/AssistantToolkit.test.ts +0 -94
- package/src/toolkits/AssistantToolkit.ts +0 -70
- package/src/toolkits/SystemToolkit.ts +0 -299
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/project-2YBPW5N7.mjs.map} +0 -0
- /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
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { describe, it } from '@effect/vitest';
|
|
6
|
-
import * as Effect from 'effect/Effect';
|
|
7
|
-
import * as Layer from 'effect/Layer';
|
|
8
|
-
|
|
9
|
-
import { AiService, ConsolePrinter } from '@dxos/ai';
|
|
10
|
-
import { AiServiceTestingPreset } from '@dxos/ai/testing';
|
|
11
|
-
import {
|
|
12
|
-
AiConversation,
|
|
13
|
-
type ContextBinding,
|
|
14
|
-
GenerationObserver,
|
|
15
|
-
makeToolExecutionServiceFromFunctions,
|
|
16
|
-
makeToolResolverFromFunctions,
|
|
17
|
-
} from '@dxos/assistant';
|
|
18
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
19
|
-
import { Obj, Ref } from '@dxos/echo';
|
|
20
|
-
import { Database } from '@dxos/echo';
|
|
21
|
-
import { acquireReleaseResource } from '@dxos/effect';
|
|
22
|
-
import { TestHelpers } from '@dxos/effect/testing';
|
|
23
|
-
import { QueueService, TracingService } from '@dxos/functions';
|
|
24
|
-
import { FunctionInvocationServiceLayerTestMocked, TestDatabaseLayer } from '@dxos/functions-runtime/testing';
|
|
25
|
-
import { log } from '@dxos/log';
|
|
26
|
-
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
27
|
-
import { Text } from '@dxos/schema';
|
|
28
|
-
import { type Message } from '@dxos/types';
|
|
29
|
-
import { trim } from '@dxos/util';
|
|
30
|
-
|
|
31
|
-
import { Document } from '../../functions';
|
|
32
|
-
import { testToolkit } from '../testing';
|
|
33
|
-
|
|
34
|
-
import { blueprint } from './design-blueprint';
|
|
35
|
-
|
|
36
|
-
describe('Design Blueprint', { timeout: 120_000 }, () => {
|
|
37
|
-
it.scoped(
|
|
38
|
-
'design blueprint',
|
|
39
|
-
Effect.fn(
|
|
40
|
-
function* ({ expect }) {
|
|
41
|
-
const observer = GenerationObserver.fromPrinter(new ConsolePrinter());
|
|
42
|
-
const queue = yield* QueueService.createQueue<Message.Message | ContextBinding>();
|
|
43
|
-
const conversation = yield* acquireReleaseResource(() => new AiConversation({ queue }));
|
|
44
|
-
|
|
45
|
-
yield* Database.Service.add(blueprint);
|
|
46
|
-
yield* Effect.promise(() =>
|
|
47
|
-
conversation.context.bind({
|
|
48
|
-
blueprints: [Ref.make(blueprint)],
|
|
49
|
-
}),
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
const artifact = yield* Database.Service.add(Markdown.make({ content: 'Hello, world!' }));
|
|
53
|
-
let prevContent = artifact.content;
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
const prompt = trim`
|
|
57
|
-
I want to design a new feature for our product.
|
|
58
|
-
|
|
59
|
-
We need to add a user profile system with the following requirements:
|
|
60
|
-
1. Users should be able to create and edit their profiles
|
|
61
|
-
2. Profile should include basic info like name, bio, avatar
|
|
62
|
-
3. Users can control privacy settings for their profile
|
|
63
|
-
4. Profile should show user's activity history
|
|
64
|
-
5. Need to consider data storage and security implications
|
|
65
|
-
|
|
66
|
-
Let's capture the key design decisions in our spec in ${Obj.getDXN(artifact)}
|
|
67
|
-
`;
|
|
68
|
-
|
|
69
|
-
yield* conversation.createRequest({ prompt, observer });
|
|
70
|
-
log.info('spec', { doc: artifact });
|
|
71
|
-
expect(artifact.content).not.toBe(prevContent);
|
|
72
|
-
prevContent = artifact.content;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
{
|
|
76
|
-
const prompt = trim`
|
|
77
|
-
I want this to be built on top of Durable Objects and SQLite database.
|
|
78
|
-
Adjust the spec to reflect this.
|
|
79
|
-
`;
|
|
80
|
-
|
|
81
|
-
yield* conversation.createRequest({ observer, prompt });
|
|
82
|
-
expect(artifact.content).not.toBe(prevContent);
|
|
83
|
-
prevContent = artifact.content;
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
Effect.provide(
|
|
87
|
-
Layer.mergeAll(
|
|
88
|
-
makeToolResolverFromFunctions([Document.read, Document.update], testToolkit),
|
|
89
|
-
makeToolExecutionServiceFromFunctions(testToolkit, testToolkit.toLayer({}) as any),
|
|
90
|
-
AiService.model('@anthropic/claude-3-5-sonnet-20241022'),
|
|
91
|
-
).pipe(
|
|
92
|
-
Layer.provideMerge(TestDatabaseLayer({ types: [Text.Text, Markdown.Document, Blueprint.Blueprint] })),
|
|
93
|
-
Layer.provideMerge(AiServiceTestingPreset('direct')),
|
|
94
|
-
Layer.provideMerge(
|
|
95
|
-
FunctionInvocationServiceLayerTestMocked({ functions: [Document.read, Document.update] }).pipe(
|
|
96
|
-
Layer.provideMerge(TracingService.layerNoop),
|
|
97
|
-
),
|
|
98
|
-
),
|
|
99
|
-
),
|
|
100
|
-
),
|
|
101
|
-
TestHelpers.provideTestContext,
|
|
102
|
-
TestHelpers.taggedTest('llm'),
|
|
103
|
-
),
|
|
104
|
-
);
|
|
105
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { ToolId } from '@dxos/ai';
|
|
6
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
7
|
-
import { Ref } from '@dxos/echo';
|
|
8
|
-
import { Text } from '@dxos/schema';
|
|
9
|
-
import { trim } from '@dxos/util';
|
|
10
|
-
|
|
11
|
-
import { Document } from '../../functions';
|
|
12
|
-
|
|
13
|
-
const instructions = trim`
|
|
14
|
-
You manage a design spec based on the conversation.
|
|
15
|
-
The design spec is a markdown document that is used to record the tasks.
|
|
16
|
-
The design spec document follows a hierarchical structure, with nested markdown bulleted sections.
|
|
17
|
-
Use the appropriate tools to read and write the design spec document.
|
|
18
|
-
Maintain the document so that it can convey all relevant points from the conversation.
|
|
19
|
-
When replying to the user, be terse with your comments about design doc handling.
|
|
20
|
-
Do not announce when you read or write the design spec document.
|
|
21
|
-
`;
|
|
22
|
-
|
|
23
|
-
export const blueprint = Blueprint.make({
|
|
24
|
-
key: 'dxos.org/blueprint/design',
|
|
25
|
-
name: 'Design Spec',
|
|
26
|
-
description: 'Preserve the conversation in the design spec.',
|
|
27
|
-
instructions: {
|
|
28
|
-
source: Ref.make(Text.make(instructions)),
|
|
29
|
-
},
|
|
30
|
-
tools: [Document.read, Document.update].map((fn) => ToolId.make(fn.key)),
|
|
31
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { ToolId } from '@dxos/ai';
|
|
6
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
7
|
-
import { Ref } from '@dxos/echo';
|
|
8
|
-
import { Text } from '@dxos/schema';
|
|
9
|
-
import { trim } from '@dxos/util';
|
|
10
|
-
|
|
11
|
-
import { Discord } from '../../functions';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Agent prompt instructions for managing hierarchical task lists.
|
|
15
|
-
*/
|
|
16
|
-
const instructions = trim`
|
|
17
|
-
You are able to fetch messages from Discord servers.
|
|
18
|
-
|
|
19
|
-
Known servers:
|
|
20
|
-
|
|
21
|
-
DXOS serverId: 837138313172353095
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
export const blueprint = Blueprint.make({
|
|
25
|
-
key: 'dxos.org/blueprint/discord',
|
|
26
|
-
name: 'Discord',
|
|
27
|
-
description: 'Discord integration.',
|
|
28
|
-
instructions: {
|
|
29
|
-
source: Ref.make(Text.make(instructions)),
|
|
30
|
-
},
|
|
31
|
-
tools: [ToolId.make(Discord.fetch.key)],
|
|
32
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { ToolId } from '@dxos/ai';
|
|
6
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
7
|
-
import { Ref } from '@dxos/echo';
|
|
8
|
-
import { Text } from '@dxos/schema';
|
|
9
|
-
import { trim } from '@dxos/util';
|
|
10
|
-
|
|
11
|
-
import { Linear } from '../../functions';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Agent prompt instructions for managing hierarchical task lists.
|
|
15
|
-
*/
|
|
16
|
-
const instructions = trim`
|
|
17
|
-
You are able to sync Linear workspaces.
|
|
18
|
-
Sometimes sync does not complete in one go and you need to call the function again.
|
|
19
|
-
|
|
20
|
-
Known workspaces:
|
|
21
|
-
|
|
22
|
-
DXOS teamId: 1127c63a-6f77-4725-9229-50f6cd47321c
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
export const blueprint = Blueprint.make({
|
|
26
|
-
key: 'dxos.org/blueprint/linear',
|
|
27
|
-
name: 'Linear',
|
|
28
|
-
description: 'Syncs Linear workspaces.',
|
|
29
|
-
instructions: {
|
|
30
|
-
source: Ref.make(Text.make(instructions)),
|
|
31
|
-
},
|
|
32
|
-
tools: [Linear.sync].map((tool) => ToolId.make(tool.key)),
|
|
33
|
-
});
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { describe, it } from '@effect/vitest';
|
|
6
|
-
import * as Effect from 'effect/Effect';
|
|
7
|
-
import * as Layer from 'effect/Layer';
|
|
8
|
-
|
|
9
|
-
import { AiService } from '@dxos/ai';
|
|
10
|
-
import { AiServiceTestingPreset } from '@dxos/ai/testing';
|
|
11
|
-
import {
|
|
12
|
-
AiConversation,
|
|
13
|
-
type ContextBinding,
|
|
14
|
-
makeToolExecutionServiceFromFunctions,
|
|
15
|
-
makeToolResolverFromFunctions,
|
|
16
|
-
} from '@dxos/assistant';
|
|
17
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
18
|
-
import { Obj, Ref } from '@dxos/echo';
|
|
19
|
-
import { Database } from '@dxos/echo';
|
|
20
|
-
import { acquireReleaseResource } from '@dxos/effect';
|
|
21
|
-
import { TestHelpers } from '@dxos/effect/testing';
|
|
22
|
-
import { QueueService, TracingService } from '@dxos/functions';
|
|
23
|
-
import { FunctionImplementationResolver } from '@dxos/functions-runtime';
|
|
24
|
-
import { FunctionInvocationServiceLayerTestMocked, TestDatabaseLayer } from '@dxos/functions-runtime/testing';
|
|
25
|
-
import { log } from '@dxos/log';
|
|
26
|
-
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
27
|
-
import { Text } from '@dxos/schema';
|
|
28
|
-
import { type Message } from '@dxos/types';
|
|
29
|
-
import { trim } from '@dxos/util';
|
|
30
|
-
|
|
31
|
-
import { Tasks } from '../../functions';
|
|
32
|
-
import { type TestStep, runSteps, testToolkit } from '../testing';
|
|
33
|
-
|
|
34
|
-
import { blueprint } from './planning-blueprint';
|
|
35
|
-
|
|
36
|
-
describe('Planning Blueprint', { timeout: 120_000 }, () => {
|
|
37
|
-
it.scoped(
|
|
38
|
-
'planning blueprint',
|
|
39
|
-
Effect.fn(
|
|
40
|
-
function* ({ expect }) {
|
|
41
|
-
const queue = yield* QueueService.createQueue<Message.Message | ContextBinding>();
|
|
42
|
-
const conversation = yield* acquireReleaseResource(() => new AiConversation({ queue }));
|
|
43
|
-
|
|
44
|
-
yield* Database.Service.add(blueprint);
|
|
45
|
-
yield* Effect.promise(() =>
|
|
46
|
-
conversation.context.bind({
|
|
47
|
-
blueprints: [Ref.make(blueprint)],
|
|
48
|
-
}),
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
const artifact = yield* Database.Service.add(Markdown.make());
|
|
52
|
-
let prevContent = artifact.content;
|
|
53
|
-
const matchList =
|
|
54
|
-
({ includes = [], excludes = [] }: { includes: RegExp[]; excludes?: RegExp[] }) =>
|
|
55
|
-
async () => {
|
|
56
|
-
const { content } = await artifact.content.load();
|
|
57
|
-
log.info('spec', { doc: artifact.content.target?.content });
|
|
58
|
-
expect(content).not.toBe(prevContent);
|
|
59
|
-
const text = content.toLowerCase();
|
|
60
|
-
for (const include of includes) {
|
|
61
|
-
expect(text.match(include), `does not include: ${include}`).toBeTruthy();
|
|
62
|
-
}
|
|
63
|
-
for (const exclude of excludes) {
|
|
64
|
-
expect(text.match(exclude), `includes: ${exclude}`).toBeFalsy();
|
|
65
|
-
}
|
|
66
|
-
prevContent = artifact.content;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const system = 'You are a helpful assistant.';
|
|
70
|
-
const steps: TestStep[] = [
|
|
71
|
-
{
|
|
72
|
-
system,
|
|
73
|
-
prompt: trim`
|
|
74
|
-
I'm building a shelf.
|
|
75
|
-
Maintain a shopping list here: ${Obj.getDXN(artifact)}
|
|
76
|
-
I need a hammer, nails, and a saw.
|
|
77
|
-
`,
|
|
78
|
-
test: matchList({
|
|
79
|
-
includes: [/- \[.+hammer/, /- \[.+nails/, /- \[.+saw/],
|
|
80
|
-
}),
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
system,
|
|
84
|
-
prompt: trim`
|
|
85
|
-
I will need a board too.
|
|
86
|
-
`,
|
|
87
|
-
test: matchList({
|
|
88
|
-
includes: [/- \[.+board/],
|
|
89
|
-
}),
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
system,
|
|
93
|
-
prompt: trim`
|
|
94
|
-
Actually I'm going to use screws and a screwdriver.
|
|
95
|
-
`,
|
|
96
|
-
test: matchList({
|
|
97
|
-
includes: [/- \[.+screwdriver/, /- \[.+screws/],
|
|
98
|
-
excludes: [/- \[.+hammer/, /- \[.+nails/],
|
|
99
|
-
}),
|
|
100
|
-
},
|
|
101
|
-
];
|
|
102
|
-
|
|
103
|
-
yield* runSteps(conversation, steps);
|
|
104
|
-
},
|
|
105
|
-
Effect.provide(
|
|
106
|
-
Layer.mergeAll(
|
|
107
|
-
TestDatabaseLayer({ types: [Text.Text, Markdown.Document, Blueprint.Blueprint] }),
|
|
108
|
-
makeToolResolverFromFunctions([Tasks.read, Tasks.update], testToolkit),
|
|
109
|
-
makeToolExecutionServiceFromFunctions(testToolkit, testToolkit.toLayer({}) as any),
|
|
110
|
-
AiService.model('@anthropic/claude-3-5-sonnet-20241022'),
|
|
111
|
-
).pipe(
|
|
112
|
-
Layer.provideMerge(
|
|
113
|
-
FunctionInvocationServiceLayerTestMocked({ functions: [Tasks.read, Tasks.update] }).pipe(
|
|
114
|
-
Layer.provideMerge(TracingService.layerNoop),
|
|
115
|
-
),
|
|
116
|
-
),
|
|
117
|
-
Layer.provideMerge(FunctionImplementationResolver.layerTest({ functions: [Tasks.read, Tasks.update] })),
|
|
118
|
-
Layer.provideMerge(TestDatabaseLayer({ types: [Text.Text, Markdown.Document, Blueprint.Blueprint] })),
|
|
119
|
-
Layer.provideMerge(AiServiceTestingPreset('direct')),
|
|
120
|
-
),
|
|
121
|
-
),
|
|
122
|
-
TestHelpers.provideTestContext,
|
|
123
|
-
TestHelpers.taggedTest('llm'),
|
|
124
|
-
),
|
|
125
|
-
);
|
|
126
|
-
});
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { ToolId } from '@dxos/ai';
|
|
6
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
7
|
-
import { Ref } from '@dxos/echo';
|
|
8
|
-
import { Text } from '@dxos/schema';
|
|
9
|
-
import { trim } from '@dxos/util';
|
|
10
|
-
|
|
11
|
-
import { Tasks } from '../../functions';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Agent prompt instructions for managing hierarchical task lists.
|
|
15
|
-
*/
|
|
16
|
-
const instructions = trim`
|
|
17
|
-
You are a task management agent that maintains hierarchical task lists where each line is a task.
|
|
18
|
-
|
|
19
|
-
## Document Format
|
|
20
|
-
You will receive task lists with line numbers prefixed like:
|
|
21
|
-
|
|
22
|
-
${'```'}
|
|
23
|
-
1. - [ ] First main task
|
|
24
|
-
2. - [ ] Subtask 1: Research phase
|
|
25
|
-
3. - [x] Literature review
|
|
26
|
-
4. - [ ] Stakeholder interviews
|
|
27
|
-
5. - [ ] Subtask 2: Implementation
|
|
28
|
-
6. - [ ] Setup infrastructure
|
|
29
|
-
7. - [ ] Write core functionality
|
|
30
|
-
8. - [ ] Another main task
|
|
31
|
-
${'```'}
|
|
32
|
-
|
|
33
|
-
## Task Hierarchy
|
|
34
|
-
- 0 spaces: Top-level tasks
|
|
35
|
-
- 2 spaces: First-level subtasks
|
|
36
|
-
- 4 spaces: Second-level subtasks
|
|
37
|
-
- 6 spaces: Third-level subtasks (and so on)
|
|
38
|
-
|
|
39
|
-
## Available Operations
|
|
40
|
-
You can modify the task list using these operations:
|
|
41
|
-
|
|
42
|
-
1. **insertTask(lineNumber, text, completed?, indent?)** - Insert a new task
|
|
43
|
-
2. **deleteTask(lineNumber)** - Delete a task
|
|
44
|
-
3. **updateTaskText(lineNumber, text)** - Change task description
|
|
45
|
-
4. **toggleTaskCompletion(lineNumber, completed?)** - Mark task complete/incomplete
|
|
46
|
-
5. **setTaskIndent(lineNumber, indent)** - Change task hierarchy level
|
|
47
|
-
|
|
48
|
-
## Examples
|
|
49
|
-
|
|
50
|
-
### Example 1: Adding a subtask
|
|
51
|
-
**User:** "Add a subtask 'Code review' under the task on line 1"
|
|
52
|
-
**Response:** \`insertTask(2, "Code review", false, 2)\`
|
|
53
|
-
|
|
54
|
-
### Example 2: Marking a task complete
|
|
55
|
-
**User:** "Mark the task on line 3 as complete"
|
|
56
|
-
**Response:** \`toggleTaskCompletion(3, true)\`
|
|
57
|
-
|
|
58
|
-
### Example 3: Updating task text
|
|
59
|
-
**User:** "Change the task on line 5 to 'Backend implementation'"
|
|
60
|
-
**Response:** \`updateTaskText(5, "Backend implementation")\`
|
|
61
|
-
|
|
62
|
-
### Example 4: Creating a task hierarchy
|
|
63
|
-
**User:** "Add a main task 'Testing phase' with two subtasks"
|
|
64
|
-
**Response:**
|
|
65
|
-
\`\`\`
|
|
66
|
-
insertTask(999, "Testing phase", false, 0)
|
|
67
|
-
insertTask(999, "Unit tests", false, 2)
|
|
68
|
-
insertTask(999, "Integration tests", false, 2)
|
|
69
|
-
\`\`\`
|
|
70
|
-
|
|
71
|
-
### Example 5: Reorganizing hierarchy
|
|
72
|
-
**User:** "Move the task on line 4 to be a main task (top level)"
|
|
73
|
-
**Response:** \`setTaskIndent(4, 0)\`
|
|
74
|
-
|
|
75
|
-
### Example 6: Adding nested subtasks
|
|
76
|
-
**User:** "Add a sub-subtask 'Write test cases' under line 6"
|
|
77
|
-
**Response:** \`insertTask(7, "Write test cases", false, 4)\`
|
|
78
|
-
|
|
79
|
-
## Guidelines
|
|
80
|
-
- Always reference line numbers from the numbered document you receive
|
|
81
|
-
- Use line number 999 to append to the end of the document
|
|
82
|
-
- Maintain logical hierarchy (subtasks should be indented under their parent)
|
|
83
|
-
- Use appropriate indentation levels (0, 2, 4, 6, etc. spaces)
|
|
84
|
-
- When creating subtasks, consider the parent task's completion status
|
|
85
|
-
- Be precise with task descriptions and hierarchy levels
|
|
86
|
-
`;
|
|
87
|
-
|
|
88
|
-
export const blueprint = Blueprint.make({
|
|
89
|
-
key: 'dxos.org/blueprint/planning',
|
|
90
|
-
name: 'Planning',
|
|
91
|
-
description: 'Plans and tracks complex tasks with artifact management.',
|
|
92
|
-
instructions: {
|
|
93
|
-
source: Ref.make(Text.make(instructions)),
|
|
94
|
-
},
|
|
95
|
-
tools: [Tasks.read, Tasks.update].map((fn) => ToolId.make(fn.key)),
|
|
96
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { ToolId } from '@dxos/ai';
|
|
6
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
7
|
-
import { Ref } from '@dxos/echo';
|
|
8
|
-
import { Text } from '@dxos/schema';
|
|
9
|
-
import { trim } from '@dxos/util';
|
|
10
|
-
|
|
11
|
-
import { Research } from '../../functions';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Agent prompt instructions for managing hierarchical task lists.
|
|
15
|
-
*/
|
|
16
|
-
const instructions = trim`
|
|
17
|
-
{{! Research }}
|
|
18
|
-
|
|
19
|
-
You are an analyst that does research tasks using tools that scrape the web and create structured data.
|
|
20
|
-
Structured data extraction is an experimental feature -- only enable it if the user explicitly requests it in the prompt.
|
|
21
|
-
Prefer updating existing notes instead of creating new ones.
|
|
22
|
-
|
|
23
|
-
<strcutured_mode>
|
|
24
|
-
When you are done, reply with the created objects.
|
|
25
|
-
Do not print the data, instead reply with inline references to the created objects.
|
|
26
|
-
Those will be later substituted with the pills representing the created objects.
|
|
27
|
-
Print the rest of the created objects as block references after the main note.
|
|
28
|
-
|
|
29
|
-
<example>
|
|
30
|
-
Based on my research, Google was founded by @dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK464FSCKVQJAB2H662M and @dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK46K31DDW62PBW9H2ZQ
|
|
31
|
-
|
|
32
|
-
<object><dxn>dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK464FSCKVQJAB2H662M</dxn></object>
|
|
33
|
-
<object><dxn>dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK46K31DDW62PBW9H2ZQ</dxn></object>
|
|
34
|
-
<object><dxn>dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK46K31DDW62PBW92333</dxn></object>
|
|
35
|
-
</example>
|
|
36
|
-
</structured_mode>
|
|
37
|
-
|
|
38
|
-
<unstructured_mode>
|
|
39
|
-
Reply normally with the text mode of the result of your research.
|
|
40
|
-
</unstructured_mode>
|
|
41
|
-
`;
|
|
42
|
-
|
|
43
|
-
export const blueprint = Blueprint.make({
|
|
44
|
-
key: 'dxos.org/blueprint/research',
|
|
45
|
-
name: 'Research',
|
|
46
|
-
description: 'Researches the web and creates structured data.',
|
|
47
|
-
instructions: {
|
|
48
|
-
source: Ref.make(Text.make(instructions)),
|
|
49
|
-
},
|
|
50
|
-
tools: [Research.create, Research.research].map((fn) => ToolId.make(fn.key)),
|
|
51
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { ToolId } from '@dxos/ai';
|
|
6
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
7
|
-
import { Ref } from '@dxos/echo';
|
|
8
|
-
import { Text } from '@dxos/schema';
|
|
9
|
-
|
|
10
|
-
export const blueprint = Blueprint.make({
|
|
11
|
-
key: 'dxos.org/blueprint/web-search',
|
|
12
|
-
name: 'Web Search',
|
|
13
|
-
description: 'Search the web.',
|
|
14
|
-
instructions: {
|
|
15
|
-
source: Ref.make(Text.make()),
|
|
16
|
-
},
|
|
17
|
-
tools: [ToolId.make('AnthropicWebSearch')],
|
|
18
|
-
});
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Toolkit from '@effect/ai/Toolkit';
|
|
6
|
-
import * as FetchHttpClient from '@effect/platform/FetchHttpClient';
|
|
7
|
-
import { describe, it } from '@effect/vitest';
|
|
8
|
-
import * as Config from 'effect/Config';
|
|
9
|
-
import * as Effect from 'effect/Effect';
|
|
10
|
-
import * as Layer from 'effect/Layer';
|
|
11
|
-
import * as Redacted from 'effect/Redacted';
|
|
12
|
-
|
|
13
|
-
import { AiService } from '@dxos/ai';
|
|
14
|
-
import { AiServiceTestingPreset, EXA_API_KEY } from '@dxos/ai/testing';
|
|
15
|
-
import { makeToolExecutionServiceFromFunctions, makeToolResolverFromFunctions } from '@dxos/assistant';
|
|
16
|
-
import { TestHelpers } from '@dxos/effect/testing';
|
|
17
|
-
import { CredentialsService, FunctionInvocationService } from '@dxos/functions';
|
|
18
|
-
import { TracingServiceExt } from '@dxos/functions-runtime';
|
|
19
|
-
import {
|
|
20
|
-
FunctionInvocationServiceLayerTestMocked,
|
|
21
|
-
TestDatabaseLayer,
|
|
22
|
-
testStoragePath,
|
|
23
|
-
} from '@dxos/functions-runtime/testing';
|
|
24
|
-
|
|
25
|
-
import { Discord, Linear } from '../functions';
|
|
26
|
-
|
|
27
|
-
const TestLayer = Layer.mergeAll(
|
|
28
|
-
AiService.model('@anthropic/claude-opus-4-0'),
|
|
29
|
-
makeToolResolverFromFunctions([], Toolkit.make()),
|
|
30
|
-
makeToolExecutionServiceFromFunctions(Toolkit.make() as any, Layer.empty as any),
|
|
31
|
-
).pipe(
|
|
32
|
-
Layer.provideMerge(
|
|
33
|
-
Layer.mergeAll(
|
|
34
|
-
AiServiceTestingPreset('direct'),
|
|
35
|
-
TestDatabaseLayer({
|
|
36
|
-
indexing: { vector: true },
|
|
37
|
-
types: [],
|
|
38
|
-
storagePath: testStoragePath({ name: 'feed-test' }),
|
|
39
|
-
}),
|
|
40
|
-
CredentialsService.layerConfig([
|
|
41
|
-
{ service: 'exa.ai', apiKey: Config.succeed(Redacted.make(EXA_API_KEY)) },
|
|
42
|
-
{ service: 'discord.com', apiKey: Config.redacted('DISCORD_TOKEN') },
|
|
43
|
-
{ service: 'linear.app', apiKey: Config.redacted('LINEAR_API_KEY') },
|
|
44
|
-
]),
|
|
45
|
-
FunctionInvocationServiceLayerTestMocked({ functions: [Linear.sync, Discord.fetch] }).pipe(
|
|
46
|
-
Layer.provideMerge(TracingServiceExt.layerLogInfo()),
|
|
47
|
-
),
|
|
48
|
-
FetchHttpClient.layer,
|
|
49
|
-
),
|
|
50
|
-
),
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
describe('Feed', { timeout: 600_000 }, () => {
|
|
54
|
-
it.effect(
|
|
55
|
-
'fetch discord messages',
|
|
56
|
-
Effect.fnUntraced(
|
|
57
|
-
function* (_) {
|
|
58
|
-
// const messages = yield* LocalFunctionExecutionService.invokeFunction(fetchDiscordMessages, {
|
|
59
|
-
// serverId: '837138313172353095',
|
|
60
|
-
// // channelId: '1404487604761526423',
|
|
61
|
-
// after: Date.now() / 1000 - 128 * 3600,
|
|
62
|
-
// });
|
|
63
|
-
// for (const message of messages) {
|
|
64
|
-
// console.log(message.sender.name, message.blocks.find((block) => block._tag === 'text')?.text);
|
|
65
|
-
// }
|
|
66
|
-
// console.log(`Fetched ${messages.length} messages`);
|
|
67
|
-
|
|
68
|
-
// const result = yield* AiSession.run({
|
|
69
|
-
// history: [
|
|
70
|
-
// Obj.make(Message.Message, {
|
|
71
|
-
// created: new Date().toISOString(),
|
|
72
|
-
// sender: { role: 'user' },
|
|
73
|
-
// blocks: messages
|
|
74
|
-
// .map(
|
|
75
|
-
// (message) =>
|
|
76
|
-
// ({
|
|
77
|
-
// _tag: 'text',
|
|
78
|
-
// text: message.sender.name + ': ' + message.blocks.find((block) => block._tag === 'text')?.text,
|
|
79
|
-
// }) as const,
|
|
80
|
-
// )
|
|
81
|
-
// .filter((block) => block._tag === 'text' && block.text.trim().length > 0),
|
|
82
|
-
// }),
|
|
83
|
-
// ],
|
|
84
|
-
// prompt: 'Summarize the messages.',
|
|
85
|
-
// system: 'Summarize the messages.',
|
|
86
|
-
// }).pipe(Effect.provide(AiService.model('@anthropic/claude-3-5-haiku-latest')));
|
|
87
|
-
// console.log(result);
|
|
88
|
-
|
|
89
|
-
const linearIssues = yield* FunctionInvocationService.invokeFunction(Linear.sync, {
|
|
90
|
-
team: '1127c63a-6f77-4725-9229-50f6cd47321c',
|
|
91
|
-
});
|
|
92
|
-
console.log(linearIssues);
|
|
93
|
-
|
|
94
|
-
// const result = yield* AiSession.run({
|
|
95
|
-
// history: [
|
|
96
|
-
// Obj.make(Message.Message, {
|
|
97
|
-
// created: new Date().toISOString(),
|
|
98
|
-
// sender: { role: 'user' },
|
|
99
|
-
// blocks: [{ _tag: 'text', text: JSON.stringify(linearIssues) }],
|
|
100
|
-
// }),
|
|
101
|
-
// ],
|
|
102
|
-
// prompt: 'Summarize the whats new.',
|
|
103
|
-
// system: 'Summarize the whats new. Reference specific people by name.',
|
|
104
|
-
// }).pipe(Effect.provide(AiService.model('@anthropic/claude-sonnet-4-0')));
|
|
105
|
-
// console.log(result.at(-1)?.blocks.find((block) => block._tag === 'text')?.text);
|
|
106
|
-
},
|
|
107
|
-
Effect.provide(TestLayer),
|
|
108
|
-
TestHelpers.taggedTest('llm'),
|
|
109
|
-
),
|
|
110
|
-
);
|
|
111
|
-
});
|