@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
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Hierarchical Task List Manager.
|
|
7
|
-
*
|
|
8
|
-
* A framework for managing hierarchical task lists where each line is a task.
|
|
9
|
-
* Designed to work with language model agents that receive documents with line numbers.
|
|
10
|
-
*/
|
|
11
|
-
export class MarkdownTasks {
|
|
12
|
-
private _lineEndings: string;
|
|
13
|
-
private _content: string[];
|
|
14
|
-
|
|
15
|
-
constructor(initialContent: string = '') {
|
|
16
|
-
// Detect line endings.
|
|
17
|
-
this._lineEndings = initialContent.includes('\r\n') ? '\r\n' : '\n';
|
|
18
|
-
this._content = initialContent ? initialContent.split(this._lineEndings) : [];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Get the current document content with line numbers prefixed.
|
|
23
|
-
*/
|
|
24
|
-
getNumberedContent(): string {
|
|
25
|
-
return this._content
|
|
26
|
-
.map((line, index) => `${(index + 1).toString().padStart(3, ' ')}→${line}`)
|
|
27
|
-
.join(this._lineEndings);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Get the raw document content without line numbers.
|
|
32
|
-
*/
|
|
33
|
-
getRawContent(): string {
|
|
34
|
-
return this._content.join(this._lineEndings);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Insert a new task at the specified line number (1-based).
|
|
39
|
-
* Indentation level determines hierarchy (0, 2, 4, 6 spaces etc.)
|
|
40
|
-
*/
|
|
41
|
-
insertTask(lineNumber: number, taskText: string, completed: boolean = false, indent: number = 0): void {
|
|
42
|
-
const indentStr = ' '.repeat(indent);
|
|
43
|
-
const taskLine = completed ? `${indentStr}- [x] ${taskText}` : `${indentStr}- [ ] ${taskText}`;
|
|
44
|
-
const insertIndex = Math.max(0, Math.min(lineNumber - 1, this._content.length));
|
|
45
|
-
this._content.splice(insertIndex, 0, taskLine);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Delete a task at the specified line number (1-based).
|
|
50
|
-
*/
|
|
51
|
-
deleteTask(lineNumber: number): boolean {
|
|
52
|
-
if (lineNumber < 1 || lineNumber > this._content.length) {
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
|
-
this._content.splice(lineNumber - 1, 1);
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Update the text of a task at the specified line number (1-based).
|
|
61
|
-
*/
|
|
62
|
-
updateTaskText(lineNumber: number, newText: string): boolean {
|
|
63
|
-
if (lineNumber < 1 || lineNumber > this._content.length) {
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const currentLine = this._content[lineNumber - 1];
|
|
68
|
-
const taskMatch = currentLine.match(/^(\s*- \[[x ]\] )(.*)$/);
|
|
69
|
-
|
|
70
|
-
if (taskMatch) {
|
|
71
|
-
this._content[lineNumber - 1] = `${taskMatch[1]}${newText}`;
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Mark a task as complete or incomplete at the specified line number (1-based).
|
|
79
|
-
*/
|
|
80
|
-
toggleTaskCompletion(lineNumber: number, completed?: boolean): boolean {
|
|
81
|
-
if (lineNumber < 1 || lineNumber > this._content.length) {
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const currentLine = this._content[lineNumber - 1];
|
|
86
|
-
const taskMatch = currentLine.match(/^(\s*- \[)([x ])(.*)$/);
|
|
87
|
-
if (taskMatch) {
|
|
88
|
-
const isCurrentlyComplete = taskMatch[2] === 'x';
|
|
89
|
-
const newStatus = completed !== undefined ? completed : !isCurrentlyComplete;
|
|
90
|
-
const statusChar = newStatus ? 'x' : ' ';
|
|
91
|
-
this._content[lineNumber - 1] = `${taskMatch[1]}${statusChar}${taskMatch[3]}`;
|
|
92
|
-
return true;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Change the indentation level of a task (for hierarchy).
|
|
100
|
-
*/
|
|
101
|
-
setTaskIndent(lineNumber: number, indent: number): boolean {
|
|
102
|
-
if (lineNumber < 1 || lineNumber > this._content.length) {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
const currentLine = this._content[lineNumber - 1];
|
|
107
|
-
const taskMatch = currentLine.match(/^\s*- (\[[x ]\] .*)$/);
|
|
108
|
-
if (taskMatch) {
|
|
109
|
-
const indentStr = ' '.repeat(indent);
|
|
110
|
-
this._content[lineNumber - 1] = `${indentStr}- ${taskMatch[1]}`;
|
|
111
|
-
return true;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Get the total number of lines in the document.
|
|
119
|
-
*/
|
|
120
|
-
getLineCount(): number {
|
|
121
|
-
return this._content.length;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Apply multiple operations atomically.
|
|
126
|
-
*/
|
|
127
|
-
applyOperations(operations: TaskOperation[]): void {
|
|
128
|
-
// Sort operations by line number in descending order to avoid index shifts.
|
|
129
|
-
const sortedOps = [...operations].sort((a, b) => {
|
|
130
|
-
const aLine = 'lineNumber' in a ? a.lineNumber : 0;
|
|
131
|
-
const bLine = 'lineNumber' in b ? b.lineNumber : 0;
|
|
132
|
-
return bLine - aLine;
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
for (const op of sortedOps) {
|
|
136
|
-
switch (op.type) {
|
|
137
|
-
case 'insertTask':
|
|
138
|
-
this.insertTask(op.lineNumber, op.text, op.completed, op.indent);
|
|
139
|
-
break;
|
|
140
|
-
case 'deleteTask':
|
|
141
|
-
this.deleteTask(op.lineNumber);
|
|
142
|
-
break;
|
|
143
|
-
case 'updateTaskText':
|
|
144
|
-
this.updateTaskText(op.lineNumber, op.text);
|
|
145
|
-
break;
|
|
146
|
-
case 'toggleTaskCompletion':
|
|
147
|
-
this.toggleTaskCompletion(op.lineNumber, op.completed);
|
|
148
|
-
break;
|
|
149
|
-
case 'setTaskIndent':
|
|
150
|
-
this.setTaskIndent(op.lineNumber, op.indent);
|
|
151
|
-
break;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Operation types for batch task updates.
|
|
159
|
-
*/
|
|
160
|
-
export type TaskOperation =
|
|
161
|
-
| { type: 'insertTask'; lineNumber: number; text: string; completed?: boolean; indent?: number }
|
|
162
|
-
| { type: 'deleteTask'; lineNumber: number }
|
|
163
|
-
| { type: 'updateTaskText'; lineNumber: number; text: string }
|
|
164
|
-
| { type: 'toggleTaskCompletion'; lineNumber: number; completed?: boolean }
|
|
165
|
-
| { type: 'setTaskIndent'; lineNumber: number; indent: number };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as Schema from 'effect/Schema';
|
|
7
|
-
|
|
8
|
-
import { Database, Ref } from '@dxos/echo';
|
|
9
|
-
import { defineFunction } from '@dxos/functions';
|
|
10
|
-
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
11
|
-
|
|
12
|
-
import { MarkdownTasks, type TaskOperation } from './task-list';
|
|
13
|
-
|
|
14
|
-
export default defineFunction({
|
|
15
|
-
key: 'dxos.org/function/markdown/update-tasks',
|
|
16
|
-
name: 'Update markdown',
|
|
17
|
-
description: 'Creates and updates tasks in markdown documents.',
|
|
18
|
-
inputSchema: Schema.Struct({
|
|
19
|
-
doc: Ref.Ref(Markdown.Document).annotations({
|
|
20
|
-
description: 'The ID of the document to update.',
|
|
21
|
-
}),
|
|
22
|
-
operations: Schema.optional(
|
|
23
|
-
Schema.Array(
|
|
24
|
-
Schema.Any.annotations({
|
|
25
|
-
description: 'Task operations to apply.',
|
|
26
|
-
}),
|
|
27
|
-
),
|
|
28
|
-
),
|
|
29
|
-
}),
|
|
30
|
-
outputSchema: Schema.Struct({
|
|
31
|
-
content: Schema.String,
|
|
32
|
-
numberedContent: Schema.String.annotations({
|
|
33
|
-
description: 'Content with line numbers for agent reference.',
|
|
34
|
-
}),
|
|
35
|
-
}),
|
|
36
|
-
handler: Effect.fn(function* ({ data: { doc, operations = [] } }) {
|
|
37
|
-
const document = yield* Database.load(doc);
|
|
38
|
-
|
|
39
|
-
// Create task manager and apply operations if provided.
|
|
40
|
-
const { content } = yield* Database.load(document.content);
|
|
41
|
-
const taskManager = new MarkdownTasks(content);
|
|
42
|
-
if (operations.length > 0) {
|
|
43
|
-
taskManager.applyOperations(operations as TaskOperation[]);
|
|
44
|
-
// TODO: Update the document content when database operations are fixed.
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return {
|
|
48
|
-
content: taskManager.getRawContent(),
|
|
49
|
-
numberedContent: taskManager.getNumberedContent(),
|
|
50
|
-
};
|
|
51
|
-
}),
|
|
52
|
-
});
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { ToolId } from '@dxos/ai';
|
|
6
|
-
import { type AppCapabilities } from '@dxos/app-toolkit';
|
|
7
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
8
|
-
import { Ref } from '@dxos/echo';
|
|
9
|
-
import { Text } from '@dxos/schema';
|
|
10
|
-
import { trim } from '@dxos/util';
|
|
11
|
-
|
|
12
|
-
import { ResearchFunctions } from './functions';
|
|
13
|
-
|
|
14
|
-
const BLUEPRINT_KEY = 'dxos.org/blueprint/research';
|
|
15
|
-
|
|
16
|
-
const functions = Object.values(ResearchFunctions);
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Agent prompt instructions for managing hierarchical task lists.
|
|
20
|
-
*/
|
|
21
|
-
const instructions = trim`
|
|
22
|
-
{{! Research }}
|
|
23
|
-
|
|
24
|
-
You are an analyst that does research tasks using tools that scrape the web and create structured data.
|
|
25
|
-
Structured data extraction is an experimental feature -- only enable it if the user explicitly requests it in the prompt.
|
|
26
|
-
Prefer updating existing notes instead of creating new ones.
|
|
27
|
-
|
|
28
|
-
<structured_mode>
|
|
29
|
-
When you are done, reply with the created objects.
|
|
30
|
-
Do not print the data, instead reply with inline references to the created objects.
|
|
31
|
-
Those will be later substituted with the pills representing the created objects.
|
|
32
|
-
Print the rest of the created objects as block references after the main note.
|
|
33
|
-
|
|
34
|
-
<example>
|
|
35
|
-
Based on my research, Google was founded by @dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK464FSCKVQJAB2H662M and @dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK46K31DDW62PBW9H2ZQ
|
|
36
|
-
|
|
37
|
-
<object><dxn>dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK464FSCKVQJAB2H662M</dxn></object>
|
|
38
|
-
<object><dxn>dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK46K31DDW62PBW9H2ZQ</dxn></object>
|
|
39
|
-
<object><dxn>dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK46K31DDW62PBW92333</dxn></object>
|
|
40
|
-
</example>
|
|
41
|
-
</structured_mode>
|
|
42
|
-
|
|
43
|
-
<unstructured_mode>
|
|
44
|
-
Reply normally with the text mode of the result of your research.
|
|
45
|
-
</unstructured_mode>
|
|
46
|
-
`;
|
|
47
|
-
|
|
48
|
-
const make = () =>
|
|
49
|
-
Blueprint.make({
|
|
50
|
-
key: BLUEPRINT_KEY,
|
|
51
|
-
name: 'Research',
|
|
52
|
-
description: 'Researches the web and creates structured data.',
|
|
53
|
-
instructions: {
|
|
54
|
-
source: Ref.make(Text.make(instructions)),
|
|
55
|
-
},
|
|
56
|
-
tools: functions.map((fn) => ToolId.make(fn.key)),
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
const blueprint: AppCapabilities.BlueprintDefinition = {
|
|
60
|
-
key: BLUEPRINT_KEY,
|
|
61
|
-
functions,
|
|
62
|
-
make,
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export default blueprint;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
import * as Schema from 'effect/Schema';
|
|
7
|
-
|
|
8
|
-
import { Database, Obj, Ref, Relation } from '@dxos/echo';
|
|
9
|
-
import { TracingService, defineFunction } from '@dxos/functions';
|
|
10
|
-
import { log } from '@dxos/log';
|
|
11
|
-
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
12
|
-
import { HasSubject } from '@dxos/types';
|
|
13
|
-
import { trim } from '@dxos/util';
|
|
14
|
-
|
|
15
|
-
export default defineFunction({
|
|
16
|
-
key: 'dxos.org/function/research/document-create',
|
|
17
|
-
name: 'Create research document',
|
|
18
|
-
description: 'Creates a note summarizing the research.',
|
|
19
|
-
inputSchema: Schema.Struct({
|
|
20
|
-
subject: Ref.Ref(Obj.Unknown).annotations({
|
|
21
|
-
description: trim`
|
|
22
|
-
ID of the object (organization, contact, etc.) for which the research was performed.
|
|
23
|
-
`,
|
|
24
|
-
}),
|
|
25
|
-
name: Schema.String.annotations({
|
|
26
|
-
description: 'Name of the document.',
|
|
27
|
-
}),
|
|
28
|
-
content: Schema.String.annotations({
|
|
29
|
-
description: trim`
|
|
30
|
-
Content of the note.
|
|
31
|
-
Supports (and are prefered) references to research objects using @ syntax and <object> tags (refer to research blueprint instructions).
|
|
32
|
-
`,
|
|
33
|
-
}),
|
|
34
|
-
}),
|
|
35
|
-
outputSchema: Schema.Struct({
|
|
36
|
-
document: Schema.String.annotations({
|
|
37
|
-
description: 'DXN of the created document.',
|
|
38
|
-
}),
|
|
39
|
-
}),
|
|
40
|
-
handler: Effect.fnUntraced(function* ({ data: { subject, name, content } }) {
|
|
41
|
-
log.info('Creating research document', { subject, name, content });
|
|
42
|
-
|
|
43
|
-
// TODO(burdon): Auto flush before and after calling function?
|
|
44
|
-
yield* Database.flush({ indexes: true });
|
|
45
|
-
yield* TracingService.emitStatus({ message: 'Creating research document...' });
|
|
46
|
-
|
|
47
|
-
const target = yield* Database.load(subject);
|
|
48
|
-
|
|
49
|
-
// Create document.
|
|
50
|
-
const object = yield* Database.add(
|
|
51
|
-
Markdown.make({
|
|
52
|
-
name,
|
|
53
|
-
content,
|
|
54
|
-
}),
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
// Create relation.
|
|
58
|
-
yield* Database.add(
|
|
59
|
-
Relation.make(HasSubject.HasSubject, {
|
|
60
|
-
[Relation.Source]: object,
|
|
61
|
-
[Relation.Target]: target,
|
|
62
|
-
completedAt: new Date().toISOString(),
|
|
63
|
-
}),
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
yield* Database.flush({ indexes: true });
|
|
67
|
-
log.info('Created research document', { subject, object });
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
document: Obj.getDXN(object).toString(),
|
|
71
|
-
};
|
|
72
|
-
}),
|
|
73
|
-
});
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
You are the Research Agent.
|
|
2
|
-
|
|
3
|
-
The Research Agent is an expert assistant that conducts in-depth research using real-time web search.
|
|
4
|
-
The Research Agent outputs results in a structured format matching the schema provided.
|
|
5
|
-
|
|
6
|
-
The Research Agent is equipped with the ability to:
|
|
7
|
-
|
|
8
|
-
- Generate precise and effective search queries
|
|
9
|
-
- Request web pages by query.
|
|
10
|
-
- Synthesize accurate, clear, and structured answers using reliable information from the retrieved content
|
|
11
|
-
{{#if entityExtraction}}
|
|
12
|
-
- Search the local database for information using a vector index (through a `local_search` tool)
|
|
13
|
-
{{/if}}
|
|
14
|
-
|
|
15
|
-
The Research Agent always follows these principles:
|
|
16
|
-
|
|
17
|
-
- Relevance First: The Research Agent only returns facts supported by content in retrieved web pages. The Research Agent never fabricates or guesses information.
|
|
18
|
-
- Summarize, Don't Copy: The Research Agent synthesizes and rephrases content in its own words. The Research Agent quotes only when necessary.
|
|
19
|
-
- Multiple Sources: The Research Agent cross-references at least 2 sources before drawing conclusions, unless the information is directly stated and non-controversial.
|
|
20
|
-
- Transparency: The Research Agent mentions which sources were used and explains how it arrived at conclusions.
|
|
21
|
-
- Accuracy Over Brevity: The Research Agent prefers detailed, technically accurate explanations over shallow summaries.
|
|
22
|
-
- The Research Agent admits uncertainty rather than misleading.
|
|
23
|
-
{{#if entityExtraction}}
|
|
24
|
-
- The Research Agent picks the most concrete schema types for extracted information.
|
|
25
|
-
- The Research Agent fills schema fields completely with information it is confident about, and omits fields it is not confident about.
|
|
26
|
-
- When outputting results, the Research Agent adds extra data that fits the schema even if not directly related to the user's question.
|
|
27
|
-
- The Research Agent creates relations and references between new objects found and what's already in the database.
|
|
28
|
-
- The Research Agent does not create objects that are already in the database.
|
|
29
|
-
- The Research Agent re-uses existing object IDs as references when enriching existing objects.
|
|
30
|
-
- The Research Agent ALWAYS calls the `graph_writer` at the end to save the data. This conversation will be deleted, so only the data written to the graph will be preserved.
|
|
31
|
-
{{/if}}
|
|
32
|
-
|
|
33
|
-
The Research Agent may be asked for:
|
|
34
|
-
|
|
35
|
-
- Technical explanations
|
|
36
|
-
- Literature reviews
|
|
37
|
-
- Comparisons
|
|
38
|
-
- Emerging trends
|
|
39
|
-
- Implementation strategies
|
|
40
|
-
|
|
41
|
-
The Research Agent begins by interpreting the user's request, then:
|
|
42
|
-
|
|
43
|
-
The Research Agent breaks it into sub-questions (if applicable).
|
|
44
|
-
|
|
45
|
-
For each sub-question, the Research Agent generates a clear, concise web search query.
|
|
46
|
-
|
|
47
|
-
The Research Agent extracts and synthesizes relevant answers.
|
|
48
|
-
|
|
49
|
-
The Research Agent's output includes:
|
|
50
|
-
|
|
51
|
-
- A clear, structured answer to the user's question
|
|
52
|
-
- A citation list or link list of sources used
|
|
53
|
-
|
|
54
|
-
Optionally, the Research Agent provides follow-up suggestions or questions for deeper inquiry.
|
|
55
|
-
|
|
56
|
-
Here's how the Research Agent operates:
|
|
57
|
-
|
|
58
|
-
1. The Research Agent analyzes the user's request and identifies key topics to search for (3 or more), printing them out.
|
|
59
|
-
2. The Research Agent performs a web search for each topic.
|
|
60
|
-
3. The Research Agent reads and analyzes results, cross references information from multiple sources, and represents conflicting information as ranges of possible values.
|
|
61
|
-
|
|
62
|
-
{{#if entityExtraction}}
|
|
63
|
-
4. The Research Agent searches the local database for information using a vector index that might link to the user's question.
|
|
64
|
-
6. The Research Agent creates relations and references between new objects and existing database objects when related, using existing object IDs as references.
|
|
65
|
-
7. The Research Agent selects the most concrete schema types for extracted information, using multiple types as needed, and prints its decision and reasoning.
|
|
66
|
-
5. The Research Agent creates a clear, structured answer to the user's question.
|
|
67
|
-
8. The Research Agent submits results using the specific schema.
|
|
68
|
-
{{/if}}
|
|
69
|
-
|
|
70
|
-
{{#if entityExtraction}}
|
|
71
|
-
IMPORTANT:
|
|
72
|
-
- The Research Agent always runs the `local_search` tool to search the local database at least once before submitting results.
|
|
73
|
-
- The Research Agent does not create objects that already exist in the database.
|
|
74
|
-
- Ids that are not in the database are human-readable strings like `ivan_zhao_1`.
|
|
75
|
-
{{/if}}
|
|
76
|
-
|
|
77
|
-
Status reporting:
|
|
78
|
-
|
|
79
|
-
The Research Agent reports its status frequently using the `<status>` tags: <status>Searching for Google Founders</status>
|
|
80
|
-
The Research Agent reports its status in-between each tool call and before submitting results.
|
|
81
|
-
|
|
82
|
-
{{#if entityExtraction}}
|
|
83
|
-
<example>
|
|
84
|
-
|
|
85
|
-
Based on my research, I can now provide information about Google and it's founders.
|
|
86
|
-
|
|
87
|
-
The following objects are already in the database, I will not submit them again, but I'll re-use their IDs as references:
|
|
88
|
-
|
|
89
|
-
- 01JWRDEHPB5TT2JQQQC15038BT Google
|
|
90
|
-
- 01JWRDEHPA14CYW2NW9FAH6DJJ Larry Page
|
|
91
|
-
- 01JWRDEHPBN0BBJP57B9S108W6 Sergey Brin
|
|
92
|
-
|
|
93
|
-
I will use the following schema to construct new objects:
|
|
94
|
-
|
|
95
|
-
- type:dxos.org/type/Organization for Alphabet Inc.
|
|
96
|
-
- type:dxos.org/type/Person for Ivan Zhao
|
|
97
|
-
- type:dxos.org/type/Person for Simon Last
|
|
98
|
-
- dxn:type:dxos.org/relation/Employer for Ivan's employer
|
|
99
|
-
- dxn:type:dxos.org/relation/Employer for Simon's employer
|
|
100
|
-
|
|
101
|
-
<status>Formatting results</status>
|
|
102
|
-
|
|
103
|
-
</example>
|
|
104
|
-
{{/if}}
|
|
105
|
-
|
|
106
|
-
Last content block is the full research note -- the result of the research.
|