@dxos/assistant-toolkit 0.8.4-main.c85a9c8dae → 0.8.4-main.dfabb4ec29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/neutral/add-artifact-ZUJ5DMSY.mjs +30 -0
- package/dist/lib/neutral/add-artifact-ZUJ5DMSY.mjs.map +7 -0
- package/dist/lib/neutral/agent-5NIKAYUK.mjs +65 -0
- package/dist/lib/neutral/agent-5NIKAYUK.mjs.map +7 -0
- package/dist/lib/neutral/chunk-246ACKSH.mjs +100 -0
- package/dist/lib/neutral/chunk-246ACKSH.mjs.map +7 -0
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs +73 -0
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs +140 -0
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GV66MKAQ.mjs +60 -0
- package/dist/lib/neutral/chunk-GV66MKAQ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-IKBIORQX.mjs +332 -0
- package/dist/lib/neutral/chunk-IKBIORQX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-KGU725LW.mjs +29 -0
- package/dist/lib/neutral/chunk-KGU725LW.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NR3GTWRC.mjs +53 -0
- package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-P4ZMYO4K.mjs +294 -0
- package/dist/lib/neutral/chunk-P4ZMYO4K.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QO5SU37C.mjs +70 -0
- package/dist/lib/neutral/chunk-QO5SU37C.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ROMZO4CB.mjs +108 -0
- package/dist/lib/neutral/chunk-ROMZO4CB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TO5IX24K.mjs +67 -0
- package/dist/lib/neutral/chunk-TO5IX24K.mjs.map +7 -0
- package/dist/lib/neutral/chunk-WLR3BGO4.mjs +25 -0
- package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +7 -0
- package/dist/lib/neutral/chunk-XUF53B6B.mjs +75 -0
- package/dist/lib/neutral/chunk-XUF53B6B.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs +73 -0
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +7 -0
- package/dist/lib/neutral/context-add-VB7AOY3G.mjs +22 -0
- package/dist/lib/neutral/context-add-VB7AOY3G.mjs.map +7 -0
- package/dist/lib/neutral/context-remove-VCM3VPSO.mjs +22 -0
- package/dist/lib/neutral/context-remove-VCM3VPSO.mjs.map +7 -0
- package/dist/lib/neutral/create-project-EIF4OJMY.mjs +35 -0
- package/dist/lib/neutral/create-project-EIF4OJMY.mjs.map +7 -0
- package/dist/lib/neutral/delete-J3PMWP7Z.mjs +19 -0
- package/dist/lib/neutral/delete-J3PMWP7Z.mjs.map +7 -0
- package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs +47 -0
- package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs.map +7 -0
- package/dist/lib/neutral/fetch-KHMHV7JR.mjs +16 -0
- package/dist/lib/neutral/fetch-KHMHV7JR.mjs.map +7 -0
- package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs +139 -0
- package/dist/lib/neutral/fetch-messages-QOBBCTGC.mjs.map +7 -0
- package/dist/lib/neutral/get-context-TN7X7U2H.mjs +35 -0
- package/dist/lib/neutral/get-context-TN7X7U2H.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +581 -3293
- package/dist/lib/neutral/index.mjs.map +4 -4
- package/dist/lib/neutral/load-ALP3TK2E.mjs +17 -0
- package/dist/lib/neutral/load-ALP3TK2E.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/object-create-Z57Y3X6Y.mjs +35 -0
- package/dist/lib/neutral/object-create-Z57Y3X6Y.mjs.map +7 -0
- package/dist/lib/neutral/object-delete-X53LS37B.mjs +18 -0
- package/dist/lib/neutral/object-delete-X53LS37B.mjs.map +7 -0
- package/dist/lib/neutral/object-update-GVKSBR7T.mjs +28 -0
- package/dist/lib/neutral/object-update-GVKSBR7T.mjs.map +7 -0
- package/dist/lib/neutral/project-HPHTZ2CI.mjs +23 -0
- package/dist/lib/neutral/project-HPHTZ2CI.mjs.map +7 -0
- package/dist/lib/neutral/project-rules-IVDHKSKI.mjs +78 -0
- package/dist/lib/neutral/project-rules-IVDHKSKI.mjs.map +7 -0
- package/dist/lib/neutral/prompt-Y7NN7M5D.mjs +170 -0
- package/dist/lib/neutral/prompt-Y7NN7M5D.mjs.map +7 -0
- package/dist/lib/neutral/qualifier-VDOY5CWU.mjs +88 -0
- package/dist/lib/neutral/qualifier-VDOY5CWU.mjs.map +7 -0
- package/dist/lib/neutral/query-PPJU5622.mjs +70 -0
- package/dist/lib/neutral/query-PPJU5622.mjs.map +7 -0
- package/dist/lib/neutral/query-U56GNEV6.mjs +32 -0
- package/dist/lib/neutral/query-U56GNEV6.mjs.map +7 -0
- package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs +16 -0
- package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs.map +7 -0
- package/dist/lib/neutral/relation-create-XJ2IX6X3.mjs +34 -0
- package/dist/lib/neutral/relation-create-XJ2IX6X3.mjs.map +7 -0
- package/dist/lib/neutral/relation-delete-EP4KXAFL.mjs +18 -0
- package/dist/lib/neutral/relation-delete-EP4KXAFL.mjs.map +7 -0
- package/dist/lib/neutral/save-GWAPLT3Z.mjs +23 -0
- package/dist/lib/neutral/save-GWAPLT3Z.mjs.map +7 -0
- package/dist/lib/neutral/schema-add-Z5CY6P24.mjs +24 -0
- package/dist/lib/neutral/schema-add-Z5CY6P24.mjs.map +7 -0
- package/dist/lib/neutral/schema-list-W326VPVX.mjs +38 -0
- package/dist/lib/neutral/schema-list-W326VPVX.mjs.map +7 -0
- package/dist/lib/neutral/sync-issues-4YE5XAK5.mjs +167 -0
- package/dist/lib/neutral/sync-issues-4YE5XAK5.mjs.map +7 -0
- package/dist/lib/neutral/sync-triggers-CDMJVW6E.mjs +136 -0
- package/dist/lib/neutral/sync-triggers-CDMJVW6E.mjs.map +7 -0
- package/dist/lib/neutral/tag-add-VNIIOVJA.mjs +19 -0
- package/dist/lib/neutral/tag-add-VNIIOVJA.mjs.map +7 -0
- package/dist/lib/neutral/tag-remove-6R2R27W3.mjs +19 -0
- package/dist/lib/neutral/tag-remove-6R2R27W3.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +9 -14
- package/dist/lib/neutral/testing/index.mjs.map +3 -3
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs +16 -0
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs.map +7 -0
- package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs +46 -0
- package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs.map +7 -0
- package/dist/types/src/blueprints/automation/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/automation/index.d.ts +2 -0
- package/dist/types/src/blueprints/automation/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +63 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +37 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +28 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +4 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +1 -0
- package/dist/types/src/blueprints/blueprint-manager/index.d.ts +3 -0
- package/dist/types/src/blueprints/blueprint-manager/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/browser/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/context-add.d.ts +5 -4
- package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts +5 -4
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/definitions.d.ts +59 -0
- package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/index.d.ts +3 -56
- package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/load.d.ts +5 -4
- package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/object-create.d.ts +5 -3
- package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts +5 -4
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/object-update.d.ts +5 -4
- package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/query.d.ts +7 -3
- package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts +6 -5
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +5 -4
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/schema-add.d.ts +4 -2
- package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts +4 -2
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts +4 -3
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +4 -3
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/index.d.ts +1 -1
- package/dist/types/src/blueprints/database/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts +15 -0
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts +3 -2
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/functions/index.d.ts +3 -11
- package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/index.d.ts +1 -0
- package/dist/types/src/blueprints/discord/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/definitions.d.ts +7 -0
- package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts +4 -2
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/index.d.ts +3 -6
- package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/index.d.ts +1 -0
- package/dist/types/src/blueprints/github/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +4 -3
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts +6 -0
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/functions/index.d.ts +3 -8
- package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +4 -6
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/index.d.ts +1 -0
- package/dist/types/src/blueprints/linear/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts +17 -0
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/delete.d.ts +10 -0
- package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/query.d.ts +8 -0
- package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/functions/save.d.ts +8 -0
- package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -0
- package/dist/types/src/blueprints/memory/index.d.ts +3 -0
- package/dist/types/src/blueprints/memory/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts +11 -0
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/index.d.ts +3 -9
- package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +5 -3
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/index.d.ts +1 -0
- package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +4 -3
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/agent.d.ts +2 -60
- package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/definitions.d.ts +158 -0
- package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/get-context.d.ts +6 -4
- package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/index.d.ts +3 -132
- package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts +30 -17
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/index.d.ts +2 -2
- package/dist/types/src/blueprints/project/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +51 -0
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +96 -0
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +4 -0
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +48 -0
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -0
- package/dist/types/src/blueprints/project-wizard/index.d.ts +3 -0
- package/dist/types/src/blueprints/project-wizard/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/testing.d.ts +5 -15
- package/dist/types/src/blueprints/testing.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +5 -0
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +6 -0
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/index.d.ts +2 -1
- package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/toolkit.d.ts +2 -0
- package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -1
- package/dist/types/src/crud/graph.d.ts +1 -1
- package/dist/types/src/crud/graph.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +41 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/functions/agent/definitions.d.ts +62 -0
- package/dist/types/src/functions/agent/definitions.d.ts.map +1 -0
- package/dist/types/src/functions/agent/index.d.ts +3 -84
- package/dist/types/src/functions/agent/index.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.d.ts +2 -82
- package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.test.d.ts +2 -0
- package/dist/types/src/functions/agent/prompt.test.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +0 -2
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/sync/sync.d.ts.map +1 -1
- package/dist/types/src/testing/plugins.d.ts.map +1 -1
- package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -1
- package/dist/types/src/types/Agent.d.ts +77 -0
- package/dist/types/src/types/Agent.d.ts.map +1 -0
- package/dist/types/src/types/Chat.d.ts +32 -7
- package/dist/types/src/types/Chat.d.ts.map +1 -1
- package/dist/types/src/types/McpServer.d.ts +21 -0
- package/dist/types/src/types/McpServer.d.ts.map +1 -0
- package/dist/types/src/types/Memory.d.ts +12 -0
- package/dist/types/src/types/Memory.d.ts.map +1 -0
- package/dist/types/src/types/Plan.d.ts +23 -11
- package/dist/types/src/types/Plan.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util/graphql.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +27 -31
- package/src/blueprints/automation/blueprint.ts +105 -0
- package/src/blueprints/automation/index.ts +5 -0
- package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -0
- package/src/blueprints/blueprint-manager/blueprint.test.ts +198 -0
- package/src/blueprints/blueprint-manager/blueprint.ts +49 -0
- package/src/blueprints/blueprint-manager/functions/definitions.ts +57 -0
- package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +43 -0
- package/src/blueprints/blueprint-manager/functions/index.ts +13 -0
- package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +18 -0
- package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +18 -0
- package/src/blueprints/blueprint-manager/index.ts +6 -0
- package/src/blueprints/browser/blueprint.test.ts +23 -32
- package/src/blueprints/browser/blueprint.ts +5 -6
- package/src/blueprints/database/blueprint.conversations.json +1 -1
- package/src/blueprints/database/blueprint.test.ts +308 -98
- package/src/blueprints/database/blueprint.ts +37 -10
- package/src/blueprints/database/functions/context-add.ts +15 -26
- package/src/blueprints/database/functions/context-remove.ts +16 -27
- package/src/blueprints/database/functions/definitions.ts +318 -0
- package/src/blueprints/database/functions/index.ts +18 -28
- package/src/blueprints/database/functions/load.ts +11 -23
- package/src/blueprints/database/functions/object-create.ts +28 -25
- package/src/blueprints/database/functions/object-delete.ts +13 -20
- package/src/blueprints/database/functions/object-update.ts +23 -25
- package/src/blueprints/database/functions/query.ts +48 -110
- package/src/blueprints/database/functions/relation-create.ts +25 -38
- package/src/blueprints/database/functions/relation-delete.ts +14 -21
- package/src/blueprints/database/functions/schema-add.ts +19 -31
- package/src/blueprints/database/functions/schema-list.ts +26 -27
- package/src/blueprints/database/functions/tag-add.ts +14 -24
- package/src/blueprints/database/functions/tag-remove.ts +14 -23
- package/src/blueprints/database/index.ts +16 -1
- package/src/blueprints/discord/blueprint.ts +6 -11
- package/src/blueprints/discord/functions/definitions.ts +70 -0
- package/src/blueprints/discord/functions/fetch-messages.test.ts +15 -25
- package/src/blueprints/discord/functions/fetch-messages.ts +98 -152
- package/src/blueprints/discord/functions/index.ts +4 -4
- package/src/blueprints/discord/index.ts +1 -0
- package/src/blueprints/github/functions/definitions.ts +26 -0
- package/src/blueprints/github/functions/fetch-prs.ts +15 -22
- package/src/blueprints/github/functions/index.ts +4 -4
- package/src/blueprints/github/index.ts +2 -0
- package/src/blueprints/index.ts +4 -3
- package/src/blueprints/linear/blueprint.ts +6 -11
- package/src/blueprints/linear/functions/definitions.ts +23 -0
- package/src/blueprints/linear/functions/index.ts +4 -4
- package/src/blueprints/linear/functions/linear.test.ts +7 -7
- package/src/blueprints/linear/functions/sync-issues.ts +31 -39
- package/src/blueprints/linear/index.ts +1 -0
- package/src/blueprints/memory/blueprint.conversations.json +1 -0
- package/src/blueprints/memory/blueprint.test.ts +139 -0
- package/src/blueprints/memory/blueprint.ts +41 -0
- package/src/blueprints/memory/functions/definitions.ts +68 -0
- package/src/blueprints/memory/functions/delete.ts +20 -0
- package/src/blueprints/memory/functions/index.ts +13 -0
- package/src/blueprints/memory/functions/query.ts +32 -0
- package/src/blueprints/memory/functions/save.ts +20 -0
- package/src/blueprints/memory/index.ts +6 -0
- package/src/blueprints/planning/blueprint.ts +5 -9
- package/src/blueprints/planning/functions/definitions.ts +137 -0
- package/src/blueprints/planning/functions/index.ts +4 -4
- package/src/blueprints/planning/functions/update-tasks.ts +35 -158
- package/src/blueprints/planning/index.ts +1 -0
- package/src/blueprints/project/blueprint.conversations.json +1 -0
- package/src/blueprints/project/blueprint.test.ts +246 -111
- package/src/blueprints/project/blueprint.ts +21 -25
- package/src/blueprints/project/functions/add-artifact.ts +19 -30
- package/src/blueprints/project/functions/agent.ts +43 -46
- package/src/blueprints/project/functions/definitions.ts +92 -0
- package/src/blueprints/project/functions/get-context.ts +36 -53
- package/src/blueprints/project/functions/index.ts +9 -10
- package/src/blueprints/project/functions/qualifier.ts +66 -72
- package/src/blueprints/project/index.ts +2 -2
- package/src/blueprints/project-wizard/blueprint.ts +52 -0
- package/src/blueprints/project-wizard/functions/create-project.ts +32 -0
- package/src/blueprints/project-wizard/functions/definitions.ts +63 -0
- package/src/blueprints/project-wizard/functions/index.ts +13 -0
- package/src/blueprints/project-wizard/functions/project-rules.ts +77 -0
- package/src/blueprints/project-wizard/functions/sync-triggers.ts +158 -0
- package/src/blueprints/project-wizard/index.ts +6 -0
- package/src/blueprints/testing.ts +7 -23
- package/src/blueprints/websearch/blueprint.conversations.json +1 -0
- package/src/blueprints/websearch/blueprint.test.ts +39 -0
- package/src/blueprints/websearch/blueprint.ts +6 -8
- package/src/blueprints/websearch/functions/definitions.ts +25 -0
- package/src/blueprints/websearch/functions/fetch.ts +18 -0
- package/src/blueprints/websearch/functions/index.ts +9 -0
- package/src/blueprints/websearch/index.ts +2 -1
- package/src/blueprints/websearch/toolkit.ts +6 -1
- package/src/crud/graph.test.ts +10 -12
- package/src/crud/graph.ts +2 -2
- package/src/errors.ts +25 -0
- package/src/functions/agent/definitions.ts +56 -0
- package/src/functions/agent/index.ts +4 -4
- package/src/functions/agent/prompt.conversations.json +1 -0
- package/src/functions/agent/prompt.test.ts +81 -0
- package/src/functions/agent/prompt.ts +212 -96
- package/src/functions/index.ts +0 -2
- package/src/sync/sync.ts +23 -12
- package/src/testing/plugins.tsx +10 -3
- package/src/toolkits/WebToolkit.ts +1 -1
- package/src/types/Agent.ts +240 -0
- package/src/types/Chat.ts +24 -10
- package/src/types/McpServer.ts +37 -0
- package/src/types/Memory.ts +24 -0
- package/src/types/Plan.ts +7 -4
- package/src/types/index.ts +3 -1
- package/dist/types/src/blueprints/design/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/design/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/index.d.ts +0 -2
- package/dist/types/src/blueprints/design/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/markdown/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/create.d.ts +0 -6
- package/dist/types/src/blueprints/markdown/functions/create.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/index.d.ts +0 -30
- package/dist/types/src/blueprints/markdown/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/read.d.ts +0 -14
- package/dist/types/src/blueprints/markdown/functions/read.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/update.d.ts +0 -13
- package/dist/types/src/blueprints/markdown/functions/update.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/index.d.ts +0 -3
- package/dist/types/src/blueprints/markdown/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/planning-old/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/index.d.ts +0 -29
- package/dist/types/src/blueprints/planning-old/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/read.d.ts +0 -14
- package/dist/types/src/blueprints/planning-old/functions/read.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts +0 -74
- package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts +0 -2
- package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/update.d.ts +0 -16
- package/dist/types/src/blueprints/planning-old/functions/update.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/index.d.ts +0 -2
- package/dist/types/src/blueprints/planning-old/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/research/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/document-create.d.ts +0 -10
- package/dist/types/src/blueprints/research/functions/document-create.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/index.d.ts +0 -19
- package/dist/types/src/blueprints/research/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/research.d.ts +0 -14
- package/dist/types/src/blueprints/research/functions/research.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/research.test.d.ts +0 -2
- package/dist/types/src/blueprints/research/functions/research.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/index.d.ts +0 -3
- package/dist/types/src/blueprints/research/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts +0 -18
- package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/types/index.d.ts +0 -7
- package/dist/types/src/blueprints/research/types/index.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +0 -179
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts +0 -2
- package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/index.d.ts +0 -179
- package/dist/types/src/functions/entity-extraction/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts +0 -38
- package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts +0 -37
- package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts +0 -58
- package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/index.d.ts +0 -3
- package/dist/types/src/functions/exa/data/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/exa.d.ts +0 -5
- package/dist/types/src/functions/exa/exa.d.ts.map +0 -1
- package/dist/types/src/functions/exa/index.d.ts +0 -9
- package/dist/types/src/functions/exa/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/mock.d.ts +0 -5
- package/dist/types/src/functions/exa/mock.d.ts.map +0 -1
- package/dist/types/src/types/Project.d.ts +0 -67
- package/dist/types/src/types/Project.d.ts.map +0 -1
- package/src/blueprints/browser/blueprint.conversations.json +0 -1
- package/src/blueprints/design/blueprint.test.ts +0 -96
- package/src/blueprints/design/blueprint.ts +0 -46
- package/src/blueprints/design/index.ts +0 -5
- package/src/blueprints/markdown/blueprint.ts +0 -38
- package/src/blueprints/markdown/functions/create.ts +0 -29
- package/src/blueprints/markdown/functions/index.ts +0 -13
- package/src/blueprints/markdown/functions/read.ts +0 -32
- package/src/blueprints/markdown/functions/update.ts +0 -32
- package/src/blueprints/markdown/index.ts +0 -6
- package/src/blueprints/planning-old/blueprint.test.ts +0 -122
- package/src/blueprints/planning-old/blueprint.ts +0 -110
- package/src/blueprints/planning-old/functions/index.ts +0 -11
- package/src/blueprints/planning-old/functions/read.ts +0 -34
- package/src/blueprints/planning-old/functions/task-list.test.ts +0 -99
- package/src/blueprints/planning-old/functions/task-list.ts +0 -165
- package/src/blueprints/planning-old/functions/update.ts +0 -52
- package/src/blueprints/planning-old/index.ts +0 -5
- package/src/blueprints/research/blueprint.test.ts +0 -7
- package/src/blueprints/research/blueprint.ts +0 -65
- package/src/blueprints/research/functions/document-create.ts +0 -73
- package/src/blueprints/research/functions/index.ts +0 -11
- package/src/blueprints/research/functions/research-instructions.tpl +0 -106
- package/src/blueprints/research/functions/research.conversations.json +0 -1
- package/src/blueprints/research/functions/research.test.ts +0 -149
- package/src/blueprints/research/functions/research.ts +0 -175
- package/src/blueprints/research/index.ts +0 -6
- package/src/blueprints/research/types/ResearchGraph.ts +0 -49
- package/src/blueprints/research/types/index.ts +0 -32
- package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -1
- package/src/functions/entity-extraction/entity-extraction.test.ts +0 -74
- package/src/functions/entity-extraction/entity-extraction.ts +0 -181
- package/src/functions/entity-extraction/index.ts +0 -9
- package/src/functions/exa/data/exa-search-1748337321991.ts +0 -131
- package/src/functions/exa/data/exa-search-1748337331526.ts +0 -144
- package/src/functions/exa/data/exa-search-1748337344119.ts +0 -133
- package/src/functions/exa/data/index.ts +0 -11
- package/src/functions/exa/exa.ts +0 -37
- package/src/functions/exa/index.ts +0 -11
- package/src/functions/exa/mock.ts +0 -71
- package/src/types/Project.ts +0 -196
- /package/dist/types/src/blueprints/{design → blueprint-manager}/blueprint.test.d.ts +0 -0
- /package/dist/types/src/blueprints/{planning-old → memory}/blueprint.test.d.ts +0 -0
- /package/dist/types/src/blueprints/{research → websearch}/blueprint.test.d.ts +0 -0
|
@@ -8,30 +8,21 @@ import * as Config from 'effect/Config';
|
|
|
8
8
|
import * as Effect from 'effect/Effect';
|
|
9
9
|
import * as Layer from 'effect/Layer';
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
import { GenericToolkit } from '@dxos/ai';
|
|
13
|
-
import { AiServiceTestingPreset } from '@dxos/ai/testing';
|
|
14
|
-
import { ToolExecutionServices } from '@dxos/assistant';
|
|
11
|
+
import { Operation, OperationHandlerSet } from '@dxos/compute';
|
|
15
12
|
import { TestHelpers } from '@dxos/effect/testing';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
13
|
+
import { credentialsLayerConfig } from '@dxos/functions';
|
|
14
|
+
import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
|
|
18
15
|
|
|
19
16
|
import { default as fetchMessages } from './fetch-messages';
|
|
20
17
|
|
|
21
|
-
const TestLayer =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
FunctionInvocationServiceLayerTestMocked({ functions: [fetchMessages] }).pipe(
|
|
30
|
-
Layer.provideMerge(TracingService.layerNoop),
|
|
31
|
-
),
|
|
32
|
-
),
|
|
33
|
-
),
|
|
34
|
-
);
|
|
18
|
+
const TestLayer = AssistantTestLayer({
|
|
19
|
+
operationHandlers: OperationHandlerSet.make(fetchMessages),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const TestLayerWithCredentials = Layer.mergeAll(
|
|
23
|
+
credentialsLayerConfig([{ service: 'discord.com', apiKey: Config.redacted('DISCORD_TOKEN') }]),
|
|
24
|
+
FetchHttpClient.layer,
|
|
25
|
+
).pipe(Layer.provideMerge(TestLayer));
|
|
35
26
|
|
|
36
27
|
const DXOS_SERVER_ID = '837138313172353095';
|
|
37
28
|
|
|
@@ -40,16 +31,15 @@ describe('Feed', { timeout: 600_000 }, () => {
|
|
|
40
31
|
'fetch discord messages',
|
|
41
32
|
Effect.fnUntraced(
|
|
42
33
|
function* (_) {
|
|
43
|
-
const messages = yield*
|
|
34
|
+
const messages = yield* Operation.invoke(fetchMessages, {
|
|
44
35
|
serverId: DXOS_SERVER_ID,
|
|
45
|
-
// channelId: '1404487604761526423',
|
|
46
36
|
last: '7d',
|
|
47
|
-
});
|
|
37
|
+
}).pipe(Effect.orDie);
|
|
48
38
|
console.log(messages);
|
|
49
39
|
},
|
|
50
|
-
Effect.provide(
|
|
40
|
+
Effect.provide(TestLayerWithCredentials),
|
|
51
41
|
TestHelpers.provideTestContext,
|
|
52
|
-
TestHelpers.taggedTest('sync'),
|
|
53
42
|
),
|
|
43
|
+
{ tags: ['sync'] },
|
|
54
44
|
);
|
|
55
45
|
});
|
|
@@ -16,44 +16,18 @@ import * as Effect from 'effect/Effect';
|
|
|
16
16
|
import * as Function from 'effect/Function';
|
|
17
17
|
import * as Layer from 'effect/Layer';
|
|
18
18
|
import * as Option from 'effect/Option';
|
|
19
|
-
import * as Schema from 'effect/Schema';
|
|
20
19
|
|
|
20
|
+
import { Credential, Trace, Operation } from '@dxos/compute';
|
|
21
21
|
import { Obj } from '@dxos/echo';
|
|
22
|
-
import { CredentialsService, TracingService, defineFunction } from '@dxos/functions';
|
|
23
22
|
import { log } from '@dxos/log';
|
|
24
23
|
import { Message } from '@dxos/types';
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
const TimeRange = class extends Schema.String.pipe(Schema.pattern(/\d+(s|m|h|d)/)).annotations({
|
|
28
|
-
description: 'Time range. 1d - 1 day, 2h - 2 hours, 30m - 30 minutes, 15s - 15 seconds.',
|
|
29
|
-
examples: ['1d', '2h', '30m', '15s'],
|
|
30
|
-
}) {
|
|
31
|
-
static toSeconds(timeRange: Schema.Schema.Type<typeof TimeRange>) {
|
|
32
|
-
const match = timeRange.match(/(\d+)(s|m|h|d)/);
|
|
33
|
-
if (!match) {
|
|
34
|
-
throw new Error(`Invalid time range: ${timeRange}`);
|
|
35
|
-
}
|
|
36
|
-
const [_, amount, unit] = match;
|
|
37
|
-
switch (unit) {
|
|
38
|
-
case 's':
|
|
39
|
-
return Number(amount);
|
|
40
|
-
case 'm':
|
|
41
|
-
return Number(amount) * 60;
|
|
42
|
-
case 'h':
|
|
43
|
-
return Number(amount) * 60 * 60;
|
|
44
|
-
case 'd':
|
|
45
|
-
return Number(amount) * 24 * 60 * 60;
|
|
46
|
-
default:
|
|
47
|
-
throw new Error(`Invalid time range unit: ${unit}`);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
type TimeRange = Schema.Schema.Type<typeof TimeRange>;
|
|
25
|
+
import { FetchMessages, TimeRange } from './definitions';
|
|
52
26
|
|
|
53
27
|
const DiscordConfigFromCredential = Layer.unwrapEffect(
|
|
54
28
|
Effect.gen(function* () {
|
|
55
29
|
return DiscordConfig.layer({
|
|
56
|
-
token: yield* CredentialsService.getApiKey({ service: 'discord.com' }),
|
|
30
|
+
token: yield* Credential.CredentialsService.getApiKey({ service: 'discord.com' }),
|
|
57
31
|
rest: {
|
|
58
32
|
baseUrl: 'https://api-proxy.dxos.workers.dev/discord.com/api/v10',
|
|
59
33
|
},
|
|
@@ -74,38 +48,10 @@ type Thread = {
|
|
|
74
48
|
messages: Message.Message[];
|
|
75
49
|
};
|
|
76
50
|
|
|
77
|
-
export default
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
serverId: Schema.String.annotations({
|
|
82
|
-
description: 'The ID of the server to fetch messages from.',
|
|
83
|
-
}),
|
|
84
|
-
channelId: Schema.optional(Schema.String).annotations({
|
|
85
|
-
description:
|
|
86
|
-
'The ID of the channel to fetch messages from. Will crawl all channels from the server if not specified.',
|
|
87
|
-
}),
|
|
88
|
-
after: Schema.optional(Schema.Number).annotations({
|
|
89
|
-
description:
|
|
90
|
-
'Fetch messages that were sent after a given date. Unix timestamp in seconds. Exclusive with `last`.',
|
|
91
|
-
}),
|
|
92
|
-
last: TimeRange.annotations({
|
|
93
|
-
description:
|
|
94
|
-
'Time range to fetch most recent messages. Specifies the range in the past, from now. "1d" would fetch messages from the last 24 hours.',
|
|
95
|
-
}),
|
|
96
|
-
limit: Schema.optional(Schema.Number).annotations({
|
|
97
|
-
description: 'The maximum number of messages to fetch.',
|
|
98
|
-
}),
|
|
99
|
-
pageSize: Schema.optional(Schema.Number).annotations({
|
|
100
|
-
description: 'The number of messages to fetch per page.',
|
|
101
|
-
}),
|
|
102
|
-
ignoreUsernames: Schema.optional(Schema.Array(Schema.String)).annotations({
|
|
103
|
-
description: 'Exclude messages from these usernames.',
|
|
104
|
-
}),
|
|
105
|
-
}),
|
|
106
|
-
handler: Effect.fnUntraced(
|
|
107
|
-
function* ({
|
|
108
|
-
data: {
|
|
51
|
+
export default FetchMessages.pipe(
|
|
52
|
+
Operation.withHandler(
|
|
53
|
+
Effect.fnUntraced(
|
|
54
|
+
function* ({
|
|
109
55
|
serverId,
|
|
110
56
|
channelId,
|
|
111
57
|
after,
|
|
@@ -113,101 +59,101 @@ export default defineFunction({
|
|
|
113
59
|
pageSize = 100,
|
|
114
60
|
limit = DEFAULT_LIMIT,
|
|
115
61
|
ignoreUsernames = DEFAULT_IGNORE_USERNAMES,
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
)
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
62
|
+
}) {
|
|
63
|
+
if (!after && !last) {
|
|
64
|
+
throw new Error('cannot specify both `after` and `last`');
|
|
65
|
+
}
|
|
66
|
+
const afterTs = last ? Date.now() / 1000 - TimeRange.toSeconds(last) : (after ?? DEFAULT_AFTER);
|
|
67
|
+
|
|
68
|
+
const rest = yield* DiscordREST;
|
|
69
|
+
|
|
70
|
+
let channels: DiscordChannel[] = [];
|
|
71
|
+
channels.push(...(yield* rest.listGuildChannels(serverId)));
|
|
72
|
+
const { threads: guildThreads } = yield* rest.getActiveGuildThreads(serverId);
|
|
73
|
+
channels.push(...guildThreads);
|
|
74
|
+
if (channelId) {
|
|
75
|
+
channels = channels.filter((channel) => channel.id === channelId);
|
|
76
|
+
}
|
|
77
|
+
if (channels.length === 0) {
|
|
78
|
+
throw new Error('no channels found');
|
|
79
|
+
}
|
|
80
|
+
for (const channel of channels) {
|
|
81
|
+
log.info('channel', { id: channel.id, name: 'name' in channel ? channel.name : undefined });
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
yield* Trace.emitStatus(`Will fetch from channels: ${channels.length}`);
|
|
85
|
+
|
|
86
|
+
const threads = yield* Effect.forEach(
|
|
87
|
+
channels,
|
|
88
|
+
Effect.fnUntraced(function* (channel) {
|
|
89
|
+
const allMessages: Message.Message[] = [];
|
|
90
|
+
|
|
91
|
+
let lastMessage: Option.Option<Message.Message> = Option.none();
|
|
92
|
+
while (true) {
|
|
93
|
+
const { id: lastId = undefined } = Function.pipe(
|
|
94
|
+
lastMessage,
|
|
95
|
+
Option.map(Obj.getKeys('discord.com')),
|
|
96
|
+
Option.flatMap(Option.fromIterable),
|
|
97
|
+
Option.getOrElse(() => ({ id: undefined })),
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
const options = {
|
|
101
|
+
after: !lastId ? `${generateSnowflake(afterTs)}` : lastId,
|
|
102
|
+
limit: pageSize,
|
|
103
|
+
};
|
|
104
|
+
log.info('fetching messages', {
|
|
105
|
+
lastId,
|
|
106
|
+
afterTs,
|
|
107
|
+
afterSnowflake: options.after,
|
|
108
|
+
after: parseSnowflake(options.after),
|
|
109
|
+
limit: options.limit,
|
|
110
|
+
});
|
|
111
|
+
const messages = yield* rest.listMessages(channel.id, options).pipe(
|
|
112
|
+
Effect.map(Array.map(makeMessage)),
|
|
113
|
+
Effect.map(Array.reverse),
|
|
114
|
+
Effect.catchTag('ErrorResponse', (err) =>
|
|
115
|
+
err.cause.code === 50001 ? Effect.succeed([]) : Effect.fail(err),
|
|
116
|
+
),
|
|
117
|
+
);
|
|
118
|
+
if (messages.length > 0) {
|
|
119
|
+
lastMessage = Option.fromNullable(messages.at(-1));
|
|
120
|
+
allMessages.push(...messages);
|
|
121
|
+
} else {
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
yield* Trace.emitStatus(`Fetched messages: ${allMessages.length}`);
|
|
125
|
+
if (allMessages.length >= limit) {
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
182
128
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
discordChannelId: channel.id,
|
|
132
|
+
name: 'name' in channel ? (channel.name ?? undefined) : undefined,
|
|
133
|
+
messages: allMessages
|
|
134
|
+
.filter((message) => !message.sender.name || !ignoreUsernames.includes(message.sender.name))
|
|
135
|
+
.filter((message) =>
|
|
136
|
+
message.blocks.some((block: any) => block._tag === 'text' && block.text.trim().length > 0),
|
|
137
|
+
),
|
|
138
|
+
} satisfies Thread;
|
|
139
|
+
}),
|
|
140
|
+
{ concurrency: 10 },
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
return threads
|
|
144
|
+
.filter((thread) => thread.messages.length > 0)
|
|
145
|
+
.map(serializeThread)
|
|
146
|
+
.join('\n');
|
|
147
|
+
},
|
|
148
|
+
Effect.provide(
|
|
149
|
+
DiscordRESTMemoryLive.pipe(Layer.provideMerge(DiscordConfigFromCredential)).pipe(
|
|
150
|
+
Layer.provide(FetchHttpClient.layer),
|
|
151
|
+
),
|
|
206
152
|
),
|
|
153
|
+
Effect.orDie,
|
|
207
154
|
),
|
|
208
|
-
Effect.orDie,
|
|
209
155
|
),
|
|
210
|
-
|
|
156
|
+
);
|
|
211
157
|
|
|
212
158
|
/**
|
|
213
159
|
* @param unixTimestamp in seconds
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
6
6
|
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export * from './definitions';
|
|
8
|
+
|
|
9
|
+
export const DiscordHandlers = OperationHandlerSet.lazy(() => import('./fetch-messages'));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as HttpClient from '@effect/platform/HttpClient';
|
|
6
|
+
import * as Schema from 'effect/Schema';
|
|
7
|
+
|
|
8
|
+
import { Credential, Operation } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
export const FetchPrs = Operation.make({
|
|
11
|
+
meta: {
|
|
12
|
+
key: 'org.dxos.function.github.fetch-prs',
|
|
13
|
+
name: 'Fetch PRs',
|
|
14
|
+
description: 'Fetches PRs from GitHub.',
|
|
15
|
+
},
|
|
16
|
+
input: Schema.Struct({
|
|
17
|
+
owner: Schema.String.annotations({
|
|
18
|
+
description: 'GitHub owner.',
|
|
19
|
+
}),
|
|
20
|
+
repo: Schema.String.annotations({
|
|
21
|
+
description: 'GitHub repository.',
|
|
22
|
+
}),
|
|
23
|
+
}),
|
|
24
|
+
output: Schema.Any,
|
|
25
|
+
services: [Credential.CredentialsService, HttpClient.HttpClient],
|
|
26
|
+
});
|
|
@@ -4,28 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
import * as HttpClient from '@effect/platform/HttpClient';
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
|
-
import * as Schema from 'effect/Schema';
|
|
8
7
|
|
|
9
|
-
import {
|
|
8
|
+
import { Credential, Operation } from '@dxos/compute';
|
|
9
|
+
import { withAuthorization } from '@dxos/functions';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
key: 'dxos.org/function/github/fetch-prs',
|
|
13
|
-
name: 'Fetch PRs',
|
|
14
|
-
description: 'Fetches PRs from GitHub.',
|
|
15
|
-
inputSchema: Schema.Struct({
|
|
16
|
-
owner: Schema.String.annotations({
|
|
17
|
-
description: 'GitHub owner.',
|
|
18
|
-
}),
|
|
19
|
-
repo: Schema.String.annotations({
|
|
20
|
-
description: 'GitHub repository.',
|
|
21
|
-
}),
|
|
22
|
-
}),
|
|
23
|
-
handler: Effect.fnUntraced(function* ({ data }) {
|
|
24
|
-
const credential = yield* CredentialsService.getCredential({ service: 'github.com' });
|
|
25
|
-
const client = yield* HttpClient.HttpClient.pipe(Effect.map(withAuthorization(credential.apiKey!)));
|
|
11
|
+
import { FetchPrs } from './definitions';
|
|
26
12
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
13
|
+
export default FetchPrs.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fnUntraced(function* ({ owner, repo }) {
|
|
16
|
+
const credential = yield* Credential.CredentialsService.getCredential({ service: 'github.com' });
|
|
17
|
+
const client = yield* HttpClient.HttpClient.pipe(Effect.map(withAuthorization(credential.apiKey!)));
|
|
18
|
+
|
|
19
|
+
const response = yield* client.get(`https://api.github.com/repos/${owner}/${repo}/pulls`);
|
|
20
|
+
const json: any = yield* response.json;
|
|
21
|
+
return json;
|
|
22
|
+
}),
|
|
23
|
+
),
|
|
24
|
+
);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2026 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
6
6
|
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export * from './definitions';
|
|
8
|
+
|
|
9
|
+
export const GithubHandlers = OperationHandlerSet.lazy(() => import('./fetch-prs'));
|
package/src/blueprints/index.ts
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export * from './design';
|
|
6
5
|
export * from './discord';
|
|
7
6
|
export * from './project';
|
|
8
7
|
export * from './linear';
|
|
9
|
-
export * from './markdown';
|
|
10
8
|
export * from './planning';
|
|
11
|
-
export * from './research';
|
|
12
9
|
export * from './websearch';
|
|
13
10
|
export * from './browser';
|
|
14
11
|
export * from './database';
|
|
12
|
+
export * from './memory';
|
|
13
|
+
export * from './automation';
|
|
14
|
+
export * from './blueprint-manager';
|
|
15
|
+
export * from './project-wizard';
|
|
@@ -2,18 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { type AppCapabilities } from '@dxos/app-toolkit';
|
|
7
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
5
|
+
import { Blueprint } from '@dxos/compute';
|
|
8
6
|
import { Ref } from '@dxos/echo';
|
|
9
7
|
import { Text } from '@dxos/schema';
|
|
10
8
|
import { trim } from '@dxos/util';
|
|
11
9
|
|
|
12
|
-
import {
|
|
10
|
+
import { SyncIssues } from './functions';
|
|
13
11
|
|
|
14
|
-
const BLUEPRINT_KEY = 'dxos.
|
|
15
|
-
|
|
16
|
-
const functions = Object.values(LinearFunctions);
|
|
12
|
+
const BLUEPRINT_KEY = 'org.dxos.blueprint.linear';
|
|
17
13
|
|
|
18
14
|
/**
|
|
19
15
|
* Agent prompt instructions for managing hierarchical task lists.
|
|
@@ -33,14 +29,13 @@ const make = () =>
|
|
|
33
29
|
name: 'Linear',
|
|
34
30
|
description: 'Syncs Linear workspaces.',
|
|
35
31
|
instructions: {
|
|
36
|
-
source: Ref.make(Text.make(instructions)),
|
|
32
|
+
source: Ref.make(Text.make({ content: instructions })),
|
|
37
33
|
},
|
|
38
|
-
tools:
|
|
34
|
+
tools: Blueprint.toolDefinitions({ operations: [SyncIssues] }),
|
|
39
35
|
});
|
|
40
36
|
|
|
41
|
-
const blueprint:
|
|
37
|
+
const blueprint: Blueprint.Definition = {
|
|
42
38
|
key: BLUEPRINT_KEY,
|
|
43
|
-
functions,
|
|
44
39
|
make,
|
|
45
40
|
};
|
|
46
41
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
|
|
7
|
+
import { Credential, Operation } from '@dxos/compute';
|
|
8
|
+
import { Database } from '@dxos/echo';
|
|
9
|
+
|
|
10
|
+
export const SyncIssues = Operation.make({
|
|
11
|
+
meta: {
|
|
12
|
+
key: 'org.dxos.function.linear.sync-issues',
|
|
13
|
+
name: 'Linear',
|
|
14
|
+
description: 'Sync issues from Linear.',
|
|
15
|
+
},
|
|
16
|
+
input: Schema.Struct({
|
|
17
|
+
team: Schema.String.annotations({
|
|
18
|
+
description: 'Linear team id.',
|
|
19
|
+
}),
|
|
20
|
+
}),
|
|
21
|
+
output: Schema.Any,
|
|
22
|
+
services: [Credential.CredentialsService, Database.Service],
|
|
23
|
+
});
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
6
6
|
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export * from './definitions';
|
|
8
|
+
|
|
9
|
+
export const LinearHandlers = OperationHandlerSet.lazy(() => import('./sync-issues'));
|
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
import { describe, it } from '@effect/vitest';
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { Operation, OperationHandlerSet } from '@dxos/compute';
|
|
9
9
|
import { Obj, Query } from '@dxos/echo';
|
|
10
10
|
import { Database } from '@dxos/echo';
|
|
11
11
|
import { TestHelpers } from '@dxos/effect/testing';
|
|
12
|
-
import {
|
|
12
|
+
import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
|
|
13
13
|
import { Person, Pipeline, Task } from '@dxos/types';
|
|
14
14
|
|
|
15
15
|
import { LINEAR_ID_KEY, default as fetchLinearIssues } from './sync-issues';
|
|
16
16
|
|
|
17
17
|
const TestLayer = AssistantTestLayer({
|
|
18
|
-
|
|
18
|
+
operationHandlers: OperationHandlerSet.make(fetchLinearIssues),
|
|
19
19
|
types: [Task.Task, Person.Person, Pipeline.Pipeline],
|
|
20
20
|
credentials: [{ service: 'linear.app', apiKey: process.env.LINEAR_API_KEY }],
|
|
21
21
|
tracing: 'pretty',
|
|
@@ -26,9 +26,9 @@ describe.skip('Linear', { timeout: 600_000 }, () => {
|
|
|
26
26
|
'sync',
|
|
27
27
|
Effect.fnUntraced(
|
|
28
28
|
function* (_) {
|
|
29
|
-
yield* Database.flush(
|
|
29
|
+
yield* Database.flush();
|
|
30
30
|
|
|
31
|
-
yield*
|
|
31
|
+
yield* Operation.invoke(fetchLinearIssues, {
|
|
32
32
|
team: '1127c63a-6f77-4725-9229-50f6cd47321c',
|
|
33
33
|
});
|
|
34
34
|
|
|
@@ -48,11 +48,11 @@ describe.skip('Linear', { timeout: 600_000 }, () => {
|
|
|
48
48
|
tasks: tasks.map((_) => `(${_.id}) ${Obj.getLabel(_)} [${Obj.getKeys(_, LINEAR_ID_KEY)[0]?.id}]`),
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
-
yield* Database.flush(
|
|
51
|
+
yield* Database.flush();
|
|
52
52
|
},
|
|
53
53
|
Effect.provide(TestLayer),
|
|
54
|
-
TestHelpers.taggedTest('sync'),
|
|
55
54
|
TestHelpers.provideTestContext,
|
|
56
55
|
),
|
|
56
|
+
{ tags: ['sync'] },
|
|
57
57
|
);
|
|
58
58
|
});
|