@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
package/src/crud/graph.ts
CHANGED
|
@@ -13,6 +13,8 @@ import * as SchemaAST from 'effect/SchemaAST';
|
|
|
13
13
|
|
|
14
14
|
import { Entity, Filter, Obj, Query, Type } from '@dxos/echo';
|
|
15
15
|
import { Database } from '@dxos/echo';
|
|
16
|
+
import { type Queue } from '@dxos/echo-db';
|
|
17
|
+
import { isEncodedReference } from '@dxos/echo-protocol';
|
|
16
18
|
import {
|
|
17
19
|
ReferenceAnnotationId,
|
|
18
20
|
RelationSourceDXNId,
|
|
@@ -23,8 +25,6 @@ import {
|
|
|
23
25
|
getTypeAnnotation,
|
|
24
26
|
getTypeIdentifierAnnotation,
|
|
25
27
|
} from '@dxos/echo/internal';
|
|
26
|
-
import { type Queue } from '@dxos/echo-db';
|
|
27
|
-
import { isEncodedReference } from '@dxos/echo-protocol';
|
|
28
28
|
import { mapAst } from '@dxos/effect';
|
|
29
29
|
import { ContextQueueService } from '@dxos/functions';
|
|
30
30
|
import { DXN, ObjectId } from '@dxos/keys';
|
package/src/errors.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { BaseError } from '@dxos/errors';
|
|
6
|
+
import { DXN } from '@dxos/keys';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Agent could not execute prompt.
|
|
10
|
+
*/
|
|
11
|
+
export class PromptError extends BaseError.extend('PromptError') {
|
|
12
|
+
constructor(
|
|
13
|
+
message: string,
|
|
14
|
+
context: {
|
|
15
|
+
description?: string;
|
|
16
|
+
prompt?: DXN.String;
|
|
17
|
+
chat?: DXN.String;
|
|
18
|
+
},
|
|
19
|
+
) {
|
|
20
|
+
super({
|
|
21
|
+
message,
|
|
22
|
+
context,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
|
|
7
|
+
import { AiService, OpaqueToolkit, ModelName } from '@dxos/ai';
|
|
8
|
+
import { Routine, Trace, Operation, OperationRegistry } from '@dxos/compute';
|
|
9
|
+
import { Database, Feed, Ref } from '@dxos/echo';
|
|
10
|
+
import { Text } from '@dxos/schema';
|
|
11
|
+
|
|
12
|
+
import * as Chat from '../../types/Chat';
|
|
13
|
+
|
|
14
|
+
// TODO(dmaretskyi): Rename to RunRoutine.
|
|
15
|
+
export const AgentPrompt = Operation.make({
|
|
16
|
+
meta: {
|
|
17
|
+
key: 'org.dxos.function.prompt',
|
|
18
|
+
name: 'Run Routine',
|
|
19
|
+
description: 'Agentic worker that executes a provided prompt using blueprints and tools.',
|
|
20
|
+
},
|
|
21
|
+
input: Schema.Struct({
|
|
22
|
+
prompt: Ref.Ref(Routine.Routine),
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* When set, runs in this chat (history, queue, and bound context). Routine blueprints and context objects are merged into the conversation for this request.
|
|
26
|
+
*/
|
|
27
|
+
chat: Schema.optional(Ref.Ref(Chat.Chat)),
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @default @anthropic/claude-opus-4-6
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
model: Schema.optional(ModelName),
|
|
34
|
+
/**
|
|
35
|
+
* Input object or data.
|
|
36
|
+
* References get auto-resolved.
|
|
37
|
+
*/
|
|
38
|
+
input: Schema.Any.pipe(Schema.annotations({ title: 'Input' })),
|
|
39
|
+
|
|
40
|
+
systemInstructions: Schema.optional(Schema.String).annotations({
|
|
41
|
+
description: 'Additional system instructions to add to the system prompt.',
|
|
42
|
+
}),
|
|
43
|
+
}),
|
|
44
|
+
output: Schema.Any,
|
|
45
|
+
// ECHO types that the handler loads via Database.load(). Declaring them here ensures the
|
|
46
|
+
// runtime registers their schema before remote invocation (e.g. via the EDGE function service).
|
|
47
|
+
types: [Routine.Routine, Text.Text, Feed.Feed, Chat.Chat],
|
|
48
|
+
services: [
|
|
49
|
+
AiService.AiService,
|
|
50
|
+
Database.Service,
|
|
51
|
+
Feed.FeedService,
|
|
52
|
+
OpaqueToolkit.OpaqueToolkitProvider,
|
|
53
|
+
OperationRegistry.Service,
|
|
54
|
+
Trace.TraceService,
|
|
55
|
+
],
|
|
56
|
+
}).pipe(Operation.intrinsic);
|
|
@@ -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 AgentHandlers = OperationHandlerSet.lazy(() => import('./prompt'));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"conversations":[{"parameters":{"model":"@anthropic/claude-opus-4-6","stream":true,"tools":[{"name":"completeJob","inputSchema":{"type":"object","required":[],"properties":{"success":{"$id":"/schemas/any","title":"any"},"failure":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Short message describing the error."},"description":{"type":"string","description":"Optional longer message describing in detail what went wrong"}},"additionalProperties":false}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"system","content":"You are an agent running in the non-interactive mode.\nThe user is unable to see what you are doing, and cannot answer any questions.\nDo not ask questions.\nComplete the task before you, and at the end call [completeJob] with the output.\nIf you are unable to complete the task, call [completeJob] with the failure reason.\nIf no output is required, call [completeJob] with an empty object: {}\nDo not stop until you call [completeJob].","options":{}},{"role":"user","content":"Reply with a single word: ack.\n<input>{}</input>","options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_01BNfgUBNqETGfNka6Y58SUS","modelId":"claude-opus-4-6","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"reasoning-start","id":"0","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"The","metadata":{}},{"type":"reasoning-delta","id":"0","delta":" user wants me to reply with a single word \"ack\" and complete the job.","metadata":{}},{"type":"reasoning-delta","id":"0","delta":"","metadata":{"anthropic":{"type":"thinking","signature":"EoQCClkIDRgCKkDmvWuElJmvgQqKv/OM8h45Qm9vFiau8OtHTiKeFGzABfFt5k5Oc9XiWXg1jeCrSXFmAcI3XEaKXp6jF8PCj/O0Mg9jbGF1ZGUtb3B1cy00LTY4ABIMidROWDebGP+ji8voGgyiyrnCLJU9DZTeWc0iMJ5ewfC96fa6DHSOj+APcM0VyN0tJiYPjIJI7DxYTiu277zCDVNdAUxNb/k45dQGripZikOeASjJaTuovSm8Ni01mepSojCietSMDfM1xBLbnyPHKxucO7akJRwDczuw8req/NjtOhY492FCt1lagajkZq8/rsICFxutxbPXyHXSY04cd/2+oY9cRAQYAQ=="}}},{"type":"reasoning-end","id":"0","metadata":{}},{"type":"tool-params-start","id":"toolu_01VQiUHtyF77TZd49DrKhnPR","name":"completeJob","providerExecuted":false,"metadata":{}},{"type":"tool-params-delta","id":"toolu_01VQiUHtyF77TZd49DrKhnPR","delta":"","metadata":{}},{"type":"tool-params-delta","id":"toolu_01VQiUHtyF77TZd49DrKhnPR","delta":"{\"success","metadata":{}},{"type":"tool-params-delta","id":"toolu_01VQiUHtyF77TZd49DrKhnPR","delta":"\": \"ack\"}","metadata":{}},{"type":"tool-params-end","id":"toolu_01VQiUHtyF77TZd49DrKhnPR","metadata":{}},{"type":"finish","reason":"tool-calls","usage":{"inputTokens":757,"outputTokens":89,"totalTokens":846},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":757,"output_tokens":9,"server_tool_use":null,"service_tier":"standard"}}}}]},{"parameters":{"model":"@anthropic/claude-opus-4-6","stream":true,"tools":[{"name":"completeJob","inputSchema":{"type":"object","required":[],"properties":{"success":{"$id":"/schemas/any","title":"any"},"failure":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Short message describing the error."},"description":{"type":"string","description":"Optional longer message describing in detail what went wrong"}},"additionalProperties":false}},"additionalProperties":false}}]},"prompt":{"content":[{"role":"system","content":"You are an agent running in the non-interactive mode.\nThe user is unable to see what you are doing, and cannot answer any questions.\nDo not ask questions.\nComplete the task before you, and at the end call [completeJob] with the output.\nIf you are unable to complete the task, call [completeJob] with the failure reason.\nIf no output is required, call [completeJob] with an empty object: {}\nDo not stop until you call [completeJob].","options":{}},{"role":"user","content":"Reply with a single word: ack.\n<input>{}</input>","options":{}},{"role":"assistant","content":[{"type":"reasoning","text":"The user wants me to reply with a single word \"ack\" and complete the job.","options":{}},{"type":"tool-call","id":"toolu_01VQiUHtyF77TZd49DrKhnPR","name":"completeJob","params":{"success":"ack"},"providerExecuted":false,"options":{}}],"options":{}},{"role":"tool","content":[{"type":"tool-result","id":"toolu_01VQiUHtyF77TZd49DrKhnPR","name":"completeJob","isFailure":false,"result":{},"providerExecuted":false,"options":{}}],"options":{"anthropic":{"cacheControl":{"ttl":"5m","type":"ephemeral"}}}}]},"response":[{"type":"response-metadata","id":"msg_017Q7gpzDqQTqmKWouYU2oKt","modelId":"claude-opus-4-6","timestamp":"1970-01-01T00:00:00.000Z","metadata":{}},{"type":"finish","reason":"stop","usage":{"inputTokens":824,"outputTokens":2,"totalTokens":826},"metadata":{"anthropic":{"usage":{"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0},"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":824,"output_tokens":2,"server_tool_use":null,"service_tier":"standard"}}}}]}]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, expect, it } from '@effect/vitest';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
|
|
8
|
+
import { ContextBinding } from '@dxos/assistant';
|
|
9
|
+
import { Routine, Operation, OperationHandlerSet } from '@dxos/compute';
|
|
10
|
+
import { Database, Feed, Obj, Ref } from '@dxos/echo';
|
|
11
|
+
import { TestHelpers } from '@dxos/effect/testing';
|
|
12
|
+
import { QueueService } from '@dxos/functions';
|
|
13
|
+
import { AssistantTestLayer } from '@dxos/functions-runtime/testing';
|
|
14
|
+
import { ObjectId } from '@dxos/keys';
|
|
15
|
+
import { Text } from '@dxos/schema';
|
|
16
|
+
import { Message } from '@dxos/types';
|
|
17
|
+
|
|
18
|
+
import * as Chat from '../../types/Chat';
|
|
19
|
+
import { AgentPrompt } from './definitions';
|
|
20
|
+
import defaultAgentPrompt from './prompt';
|
|
21
|
+
|
|
22
|
+
ObjectId.dangerouslyDisableRandomness();
|
|
23
|
+
|
|
24
|
+
const operationHandlerSet = OperationHandlerSet.make(defaultAgentPrompt);
|
|
25
|
+
|
|
26
|
+
const TestLayer = AssistantTestLayer({
|
|
27
|
+
operationHandlers: operationHandlerSet,
|
|
28
|
+
types: [Chat.Chat, Message.Message, ContextBinding, Text.Text],
|
|
29
|
+
aiServicePreset: 'edge-remote',
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const countQueueMessages = (queue: { queryObjects: () => Promise<Obj.Unknown[]> }) =>
|
|
33
|
+
Effect.promise(async () => {
|
|
34
|
+
const items = await queue.queryObjects();
|
|
35
|
+
return items.filter(Obj.instanceOf(Message.Message)).length;
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
describe('Agent prompt', () => {
|
|
39
|
+
it.effect(
|
|
40
|
+
'chat mode appends assistant messages to the chat queue',
|
|
41
|
+
Effect.fnUntraced(
|
|
42
|
+
function* (_) {
|
|
43
|
+
const feed = yield* Database.add(Feed.make());
|
|
44
|
+
const queueDxn = Feed.getQueueDxn(feed)!;
|
|
45
|
+
const queue = yield* QueueService.getQueue<Message.Message | ContextBinding>(queueDxn);
|
|
46
|
+
const messageCountBefore = yield* countQueueMessages(queue);
|
|
47
|
+
|
|
48
|
+
const chat = yield* Database.add(
|
|
49
|
+
Chat.make({
|
|
50
|
+
feed: Ref.make(feed),
|
|
51
|
+
}),
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const prompt = yield* Database.add(
|
|
55
|
+
Routine.make({
|
|
56
|
+
name: 'chat-mode-test',
|
|
57
|
+
instructions: 'Reply with a single word: ack.',
|
|
58
|
+
blueprints: [],
|
|
59
|
+
context: [],
|
|
60
|
+
}),
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
yield* Database.flush();
|
|
64
|
+
|
|
65
|
+
const result = yield* Operation.invoke(AgentPrompt, {
|
|
66
|
+
prompt: Ref.make(prompt),
|
|
67
|
+
input: {},
|
|
68
|
+
chat: Ref.make(chat),
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const messageCountAfter = yield* countQueueMessages(queue);
|
|
72
|
+
|
|
73
|
+
expect(messageCountAfter).toBeGreaterThan(messageCountBefore);
|
|
74
|
+
expect(result).toBe('ack');
|
|
75
|
+
},
|
|
76
|
+
Effect.provide(TestLayer),
|
|
77
|
+
TestHelpers.provideTestContext,
|
|
78
|
+
),
|
|
79
|
+
{ timeout: 60_000 },
|
|
80
|
+
);
|
|
81
|
+
});
|
|
@@ -2,107 +2,223 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import * as Tool from '@effect/ai/Tool';
|
|
6
|
+
import * as Toolkit from '@effect/ai/Toolkit';
|
|
5
7
|
import * as Array from 'effect/Array';
|
|
8
|
+
import * as Deferred from 'effect/Deferred';
|
|
6
9
|
import * as Effect from 'effect/Effect';
|
|
7
10
|
import * as Function from 'effect/Function';
|
|
11
|
+
import * as Layer from 'effect/Layer';
|
|
8
12
|
import * as Option from 'effect/Option';
|
|
9
13
|
import * as Schema from 'effect/Schema';
|
|
10
14
|
|
|
11
|
-
import { AiService,
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
import { AiService, OpaqueToolkit, ModelName } from '@dxos/ai';
|
|
16
|
+
import {
|
|
17
|
+
AiSession,
|
|
18
|
+
getOperationFromTool,
|
|
19
|
+
makeToolExecutionService,
|
|
20
|
+
makeToolResolverFromOperations,
|
|
21
|
+
} from '@dxos/assistant';
|
|
22
|
+
import { Template, Trace, Operation } from '@dxos/compute';
|
|
23
|
+
import { Database, Feed, Obj, Ref } from '@dxos/echo';
|
|
24
|
+
import { acquireReleaseResource } from '@dxos/effect';
|
|
25
|
+
import { invariant } from '@dxos/invariant';
|
|
16
26
|
import { log } from '@dxos/log';
|
|
27
|
+
import { trim } from '@dxos/util';
|
|
17
28
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
29
|
+
import { PromptError } from '../../errors';
|
|
30
|
+
import * as Chat from '../../types/Chat';
|
|
31
|
+
import { AgentPrompt } from './definitions';
|
|
32
|
+
|
|
33
|
+
const DEFAULT_MODEL: ModelName = '@anthropic/claude-opus-4-6';
|
|
34
|
+
|
|
35
|
+
export default AgentPrompt.pipe(
|
|
36
|
+
Operation.withHandler(
|
|
37
|
+
Effect.fnUntraced(
|
|
38
|
+
function* (data) {
|
|
39
|
+
log.info('processing input', { input: data.input });
|
|
40
|
+
|
|
41
|
+
const input = yield* Ref.isRef(data.input)
|
|
42
|
+
? Database.load(data.input).pipe(Effect.map(Obj.toJSON))
|
|
43
|
+
: Effect.succeed(data.input);
|
|
44
|
+
|
|
45
|
+
yield* Database.flush();
|
|
46
|
+
const prompt = yield* Database.load(data.prompt);
|
|
47
|
+
yield* Trace.emitStatus(`Running ${prompt.id}`);
|
|
48
|
+
|
|
49
|
+
log.info('starting agent', { prompt: prompt.id, input });
|
|
50
|
+
|
|
51
|
+
const blueprints = yield* Function.pipe(
|
|
52
|
+
prompt.blueprints,
|
|
53
|
+
Effect.forEach(Database.loadOption),
|
|
54
|
+
Effect.map(Array.filter(Option.isSome)),
|
|
55
|
+
Effect.map(Array.map((option) => option.value)),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const objects = yield* Function.pipe(
|
|
59
|
+
prompt.context,
|
|
60
|
+
Effect.forEach(Database.loadOption),
|
|
61
|
+
Effect.map(Array.filter(Option.isSome)),
|
|
62
|
+
Effect.map(Array.map((option) => option.value)),
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
const promptInstructions = yield* Database.load(prompt.instructions.source);
|
|
66
|
+
let promptText = Template.process(promptInstructions.content, input);
|
|
67
|
+
|
|
68
|
+
if (input !== undefined) {
|
|
69
|
+
promptText += `\n<input>${JSON.stringify(input)}</input>`;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
let systemText = trim`
|
|
73
|
+
You are an agent running in the non-interactive mode.
|
|
74
|
+
The user is unable to see what you are doing, and cannot answer any questions.
|
|
75
|
+
Do not ask questions.
|
|
76
|
+
Complete the task before you, and at the end call [completeJob] with the output.
|
|
77
|
+
If you are unable to complete the task, call [completeJob] with the failure reason.
|
|
78
|
+
If no output is required, call [completeJob] with an empty object: {}
|
|
79
|
+
Do not stop until you call [completeJob].
|
|
80
|
+
`;
|
|
81
|
+
if (data.systemInstructions) {
|
|
82
|
+
systemText += `\n\n${data.systemInstructions}`;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const modelLayer = AiService.model(data.model ?? DEFAULT_MODEL);
|
|
86
|
+
|
|
87
|
+
let feed: Feed.Feed;
|
|
88
|
+
if (data.chat) {
|
|
89
|
+
const chat = yield* Database.load(data.chat);
|
|
90
|
+
invariant(Obj.instanceOf(Chat.Chat, chat), 'Expected Chat object.');
|
|
91
|
+
feed = yield* Database.load(chat.feed);
|
|
92
|
+
} else {
|
|
93
|
+
feed = yield* Database.add(Feed.make());
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const resultSink = yield* Deferred.make<unknown, PromptError>();
|
|
97
|
+
const promptToolkit = makePromptAgentToolkit({
|
|
98
|
+
output: Schema.Any, // TODO(dmaretskyi): Use prompt's output schema.
|
|
99
|
+
resultSink,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const runtime = yield* Effect.runtime<Feed.FeedService>();
|
|
103
|
+
const session = yield* acquireReleaseResource(() => new AiSession({ feed, runtime }));
|
|
104
|
+
|
|
105
|
+
yield* Effect.promise(() =>
|
|
106
|
+
session.context.bind({
|
|
107
|
+
blueprints: blueprints.map((blueprint) => Ref.make(blueprint)),
|
|
108
|
+
objects: objects.map((object) => Ref.make(object as Obj.Unknown)),
|
|
109
|
+
}),
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
yield* session
|
|
113
|
+
.createRequest({
|
|
114
|
+
prompt: promptText,
|
|
115
|
+
system: systemText,
|
|
116
|
+
toolkit: promptToolkit,
|
|
117
|
+
})
|
|
118
|
+
.pipe(
|
|
119
|
+
Effect.provide(
|
|
120
|
+
Layer.mergeAll(modelLayer, ToolExecutionService({ feed }), makeToolResolverFromOperations()),
|
|
121
|
+
),
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
return yield* Deferred.poll(resultSink).pipe(
|
|
125
|
+
Effect.flatten,
|
|
126
|
+
Effect.flatten,
|
|
127
|
+
Effect.catchTag('NoSuchElementException', () =>
|
|
128
|
+
Effect.gen(function* () {
|
|
129
|
+
yield* session
|
|
130
|
+
.createRequest({
|
|
131
|
+
prompt: 'You must signal task completion by calling [completeJob] with the output or failure reason.',
|
|
132
|
+
system: systemText,
|
|
133
|
+
toolkit: promptToolkit,
|
|
134
|
+
})
|
|
135
|
+
.pipe(
|
|
136
|
+
Effect.provide(
|
|
137
|
+
Layer.mergeAll(modelLayer, ToolExecutionService({ feed }), makeToolResolverFromOperations()),
|
|
138
|
+
),
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
return yield* Deferred.poll(resultSink).pipe(
|
|
142
|
+
Effect.flatten,
|
|
143
|
+
Effect.flatten,
|
|
144
|
+
Effect.catchTag('NoSuchElementException', () =>
|
|
145
|
+
Effect.fail(new PromptError('Agent did not signal task completion.', {})),
|
|
146
|
+
),
|
|
147
|
+
);
|
|
148
|
+
}),
|
|
149
|
+
),
|
|
150
|
+
);
|
|
151
|
+
},
|
|
152
|
+
Effect.tapBoth({
|
|
153
|
+
onSuccess: () => Database.flush(),
|
|
154
|
+
onFailure: () => Database.flush(),
|
|
155
|
+
}),
|
|
156
|
+
Effect.scoped,
|
|
157
|
+
),
|
|
158
|
+
),
|
|
159
|
+
Operation.opaqueHandler,
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
const makePromptAgentToolkit = (options: {
|
|
163
|
+
output: Schema.Schema.Any;
|
|
164
|
+
resultSink: Deferred.Deferred<unknown, PromptError>;
|
|
165
|
+
}) => {
|
|
166
|
+
class PromptAgentToolkit extends Toolkit.make(
|
|
167
|
+
Tool.make('completeJob', {
|
|
168
|
+
parameters: {
|
|
169
|
+
success: Schema.optional(Schema.Any), // TODO(dmaretskyi): Pipe output schema here.
|
|
170
|
+
failure: Schema.optional(
|
|
171
|
+
Schema.Struct({
|
|
172
|
+
message: Schema.String.annotations({
|
|
173
|
+
description: 'Short message describing the error.',
|
|
174
|
+
}),
|
|
175
|
+
description: Schema.optional(Schema.String).annotations({
|
|
176
|
+
description: 'Optional longer message describing in detail what went wrong',
|
|
177
|
+
}),
|
|
178
|
+
}),
|
|
179
|
+
),
|
|
180
|
+
},
|
|
181
|
+
}),
|
|
182
|
+
) {}
|
|
183
|
+
const layer = PromptAgentToolkit.toLayer({
|
|
184
|
+
completeJob: Effect.fnUntraced(function* (result) {
|
|
185
|
+
if (result.failure) {
|
|
186
|
+
yield* Deferred.fail(
|
|
187
|
+
options.resultSink,
|
|
188
|
+
new PromptError(result.failure.message, {
|
|
189
|
+
description: result.failure.description,
|
|
190
|
+
}),
|
|
191
|
+
);
|
|
192
|
+
} else {
|
|
193
|
+
yield* Deferred.succeed(options.resultSink, result.success);
|
|
194
|
+
}
|
|
195
|
+
}),
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
return OpaqueToolkit.make(PromptAgentToolkit, layer);
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
interface ToolExecutionServiceOptions {
|
|
202
|
+
feed: Feed.Feed;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const ToolExecutionService = ({ feed }: ToolExecutionServiceOptions) =>
|
|
206
|
+
Layer.unwrapEffect(
|
|
207
|
+
Effect.gen(function* () {
|
|
208
|
+
const operationInvoker = yield* Operation.Service;
|
|
209
|
+
return makeToolExecutionService({
|
|
210
|
+
invoke: (tool, input) =>
|
|
211
|
+
Effect.gen(function* () {
|
|
212
|
+
const operationDef = getOperationFromTool(tool).pipe(Option.getOrThrow);
|
|
213
|
+
log('invoking operation', { operationDef, input });
|
|
214
|
+
const result = yield* operationInvoker
|
|
215
|
+
.invoke(operationDef, input, {
|
|
216
|
+
conversation: Obj.getDXN(feed).toString(),
|
|
217
|
+
})
|
|
218
|
+
.pipe(Effect.orDie);
|
|
219
|
+
log('result', { result });
|
|
220
|
+
return result;
|
|
221
|
+
}),
|
|
222
|
+
});
|
|
223
|
+
}),
|
|
224
|
+
);
|
package/src/functions/index.ts
CHANGED
package/src/sync/sync.ts
CHANGED
|
@@ -29,10 +29,16 @@ export const syncObjects: (
|
|
|
29
29
|
Effect.fnUntraced(function* (obj) {
|
|
30
30
|
// Sync referenced objects.
|
|
31
31
|
for (const key of Object.keys(obj)) {
|
|
32
|
-
if (typeof key !== 'string' || key === 'id')
|
|
33
|
-
|
|
32
|
+
if (typeof key !== 'string' || key === 'id') {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (!Ref.isRef((obj as any)[key])) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
34
38
|
const ref: Ref.Unknown = (obj as any)[key];
|
|
35
|
-
if (!ref.target)
|
|
39
|
+
if (!ref.target) {
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
36
42
|
if (Obj.getDXN(ref.target).isLocalObjectId()) {
|
|
37
43
|
// obj not persisted to db.
|
|
38
44
|
const [target] = yield* syncObjects([ref.target], { foreignKeyId });
|
|
@@ -63,33 +69,38 @@ export const syncObjects: (
|
|
|
63
69
|
});
|
|
64
70
|
|
|
65
71
|
const copyObjectData = (existing: Obj.Unknown, newObj: Obj.Unknown) => {
|
|
66
|
-
Obj.
|
|
72
|
+
Obj.update(existing, (existing) => {
|
|
67
73
|
// Copy properties from newObj to existing.
|
|
68
74
|
for (const key of Object.keys(newObj)) {
|
|
69
|
-
if (typeof key !== 'string' || key === 'id')
|
|
75
|
+
if (typeof key !== 'string' || key === 'id') {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
70
78
|
if (
|
|
71
79
|
typeof (newObj as any)[key] !== 'string' &&
|
|
72
80
|
typeof (newObj as any)[key] !== 'number' &&
|
|
73
81
|
typeof (newObj as any)[key] !== 'boolean' &&
|
|
74
82
|
!Ref.isRef((newObj as any)[key])
|
|
75
|
-
)
|
|
83
|
+
) {
|
|
76
84
|
continue;
|
|
77
|
-
|
|
85
|
+
}
|
|
86
|
+
(existing as any)[key] = (newObj as any)[key];
|
|
78
87
|
}
|
|
79
88
|
|
|
80
89
|
// Delete properties that don't exist in newObj.
|
|
81
|
-
for (const key of Object.keys(
|
|
82
|
-
if (typeof key !== 'string' || key === 'id')
|
|
90
|
+
for (const key of Object.keys(existing)) {
|
|
91
|
+
if (typeof key !== 'string' || key === 'id') {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
83
94
|
if (!(key in newObj)) {
|
|
84
|
-
delete (
|
|
95
|
+
delete (existing as any)[key];
|
|
85
96
|
}
|
|
86
97
|
}
|
|
87
98
|
|
|
88
99
|
// Update foreign keys.
|
|
89
100
|
for (const foreignKey of Obj.getMeta(newObj).keys) {
|
|
90
|
-
Obj.deleteKeys(
|
|
101
|
+
Obj.deleteKeys(existing, foreignKey.source);
|
|
91
102
|
// TODO(dmaretskyi): Doesn't work: `Obj.getMeta(existing).keys.push(foreignKey);`
|
|
92
|
-
Obj.getMeta(
|
|
103
|
+
Obj.getMeta(existing).keys.push({ ...foreignKey });
|
|
93
104
|
}
|
|
94
105
|
});
|
|
95
106
|
};
|
package/src/testing/plugins.tsx
CHANGED
|
@@ -9,13 +9,13 @@ import { Capabilities, Capability } from '@dxos/app-framework';
|
|
|
9
9
|
import { Surface } from '@dxos/app-framework/ui';
|
|
10
10
|
import { Format, type Obj, Type } from '@dxos/echo';
|
|
11
11
|
import { Card } from '@dxos/react-ui';
|
|
12
|
-
import {
|
|
12
|
+
import { Syntax } from '@dxos/react-ui-syntax-highlighter';
|
|
13
13
|
|
|
14
14
|
export const MapSchema = Schema.Struct({
|
|
15
15
|
coordinates: Format.GeoPoint,
|
|
16
16
|
}).pipe(
|
|
17
17
|
Type.object({
|
|
18
|
-
typename: 'example.
|
|
18
|
+
typename: 'com.example.type.map',
|
|
19
19
|
version: '0.1.0',
|
|
20
20
|
}),
|
|
21
21
|
);
|
|
@@ -64,7 +64,14 @@ export const capabilities: Capability.Any[] = [
|
|
|
64
64
|
position: 'fallback',
|
|
65
65
|
component: ({ data }) => (
|
|
66
66
|
<Card.Content>
|
|
67
|
-
<
|
|
67
|
+
<Syntax.Root data={data}>
|
|
68
|
+
<Syntax.Content>
|
|
69
|
+
<Syntax.Filter />
|
|
70
|
+
<Syntax.Viewport>
|
|
71
|
+
<Syntax.Code />
|
|
72
|
+
</Syntax.Viewport>
|
|
73
|
+
</Syntax.Content>
|
|
74
|
+
</Syntax.Root>
|
|
68
75
|
</Card.Content>
|
|
69
76
|
),
|
|
70
77
|
}),
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import * as AnthropicTool from '@effect/ai-anthropic/AnthropicTool';
|
|
5
6
|
import * as Tool from '@effect/ai/Tool';
|
|
6
7
|
import * as Toolkit from '@effect/ai/Toolkit';
|
|
7
|
-
import * as AnthropicTool from '@effect/ai-anthropic/AnthropicTool';
|
|
8
8
|
import * as Effect from 'effect/Effect';
|
|
9
9
|
import * as Schema from 'effect/Schema';
|
|
10
10
|
|