@dxos/assistant-toolkit 0.8.4-main.bc674ce → 0.8.4-main.c85a9c8dae
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/{browser → neutral}/index.mjs +3244 -2496
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/testing/index.mjs +81 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/types/src/blueprints/browser/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/browser/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/browser/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/browser/index.d.ts +2 -0
- package/dist/types/src/blueprints/browser/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/database/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/context-add.d.ts +6 -0
- package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts +6 -0
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/index.d.ts +57 -0
- package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/load.d.ts +6 -0
- package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/object-create.d.ts +6 -0
- package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts +6 -0
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/object-update.d.ts +9 -0
- package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/query.d.ts +9 -0
- package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts +9 -0
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +6 -0
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +1 -0
- package/dist/types/src/{initiative/functions/update.d.ts → blueprints/database/functions/schema-add.d.ts} +3 -3
- package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts +5 -0
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +7 -0
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -0
- package/dist/types/src/blueprints/database/index.d.ts +3 -0
- package/dist/types/src/blueprints/database/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/design/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/design/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/design/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/design/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/design/index.d.ts +1 -2
- package/dist/types/src/blueprints/design/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/functions/fetch-messages.test.d.ts.map +1 -0
- package/dist/types/src/{functions/discord → blueprints/discord/functions}/index.d.ts +3 -3
- package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/index.d.ts +1 -2
- package/dist/types/src/blueprints/discord/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -0
- package/dist/types/src/blueprints/github/functions/index.d.ts +7 -0
- package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/github/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +10 -6
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -0
- package/dist/types/src/{functions/linear → blueprints/linear/functions}/index.d.ts +3 -3
- package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/functions/linear.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/index.d.ts +1 -2
- package/dist/types/src/blueprints/linear/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/markdown/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/markdown/blueprint.d.ts.map +1 -0
- package/dist/types/src/{functions/document/update.d.ts → blueprints/markdown/functions/create.d.ts} +2 -2
- package/dist/types/src/blueprints/markdown/functions/create.d.ts.map +1 -0
- package/dist/types/src/blueprints/markdown/functions/index.d.ts +30 -0
- package/dist/types/src/blueprints/markdown/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/markdown/functions/read.d.ts +14 -0
- package/dist/types/src/blueprints/markdown/functions/read.d.ts.map +1 -0
- package/dist/types/src/blueprints/markdown/functions/update.d.ts +13 -0
- package/dist/types/src/blueprints/markdown/functions/update.d.ts.map +1 -0
- package/dist/types/src/blueprints/markdown/index.d.ts +3 -0
- package/dist/types/src/blueprints/markdown/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/index.d.ts +10 -0
- package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +9 -0
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/index.d.ts +1 -2
- package/dist/types/src/blueprints/planning/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning-old/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/planning-old/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/planning-old/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/functions/index.d.ts +29 -0
- package/dist/types/src/blueprints/planning-old/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/functions/read.d.ts +14 -0
- package/dist/types/src/blueprints/planning-old/functions/read.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/functions/update.d.ts +16 -0
- package/dist/types/src/blueprints/planning-old/functions/update.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning-old/index.d.ts +2 -0
- package/dist/types/src/blueprints/planning-old/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/project/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +7 -0
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/agent.d.ts +62 -0
- package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/get-context.d.ts +13 -0
- package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/index.d.ts +133 -0
- package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts +60 -0
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/index.d.ts +3 -0
- package/dist/types/src/blueprints/project/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/research/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/research/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/{functions/research → blueprints/research/functions}/document-create.d.ts +2 -1
- package/dist/types/src/blueprints/research/functions/document-create.d.ts.map +1 -0
- package/dist/types/src/{functions/research → blueprints/research/functions}/index.d.ts +6 -8
- package/dist/types/src/blueprints/research/functions/index.d.ts.map +1 -0
- package/dist/types/src/{functions/research → blueprints/research/functions}/research.d.ts +1 -1
- package/dist/types/src/blueprints/research/functions/research.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/functions/research.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/index.d.ts +2 -2
- package/dist/types/src/blueprints/research/index.d.ts.map +1 -1
- package/dist/types/src/{functions/research/research-graph.d.ts → blueprints/research/types/ResearchGraph.d.ts} +5 -6
- package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/types/index.d.ts +7 -0
- package/dist/types/src/blueprints/research/types/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/testing.d.ts +17 -3
- package/dist/types/src/blueprints/testing.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/index.d.ts +2 -3
- package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/{websearch-toolkit.d.ts → toolkit.d.ts} +1 -1
- package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -0
- package/dist/types/src/crud/graph.d.ts +6 -6
- package/dist/types/src/crud/graph.d.ts.map +1 -1
- package/dist/types/src/functions/agent/index.d.ts +84 -4
- package/dist/types/src/functions/agent/index.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.d.ts +9 -1
- package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +8 -3
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +1 -1
- package/dist/types/src/functions/entity-extraction/index.d.ts +10 -6
- package/dist/types/src/functions/entity-extraction/index.d.ts.map +1 -1
- package/dist/types/src/functions/exa/index.d.ts +8 -2
- package/dist/types/src/functions/exa/index.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +1 -5
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/plugins.d.ts.map +1 -1
- package/dist/types/src/toolkits/WebToolkit.d.ts +38 -0
- package/dist/types/src/toolkits/WebToolkit.d.ts.map +1 -0
- package/dist/types/src/toolkits/index.d.ts +1 -2
- package/dist/types/src/toolkits/index.d.ts.map +1 -1
- package/dist/types/src/types/Chat.d.ts +31 -0
- package/dist/types/src/types/Chat.d.ts.map +1 -0
- package/dist/types/src/types/Plan.d.ts +77 -0
- package/dist/types/src/types/Plan.d.ts.map +1 -0
- package/dist/types/src/types/Project.d.ts +67 -0
- package/dist/types/src/types/Project.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -43
- package/src/blueprints/browser/blueprint.conversations.json +1 -0
- package/src/blueprints/browser/blueprint.test.ts +70 -0
- package/src/blueprints/browser/blueprint.ts +41 -0
- package/src/blueprints/browser/index.ts +5 -0
- package/src/blueprints/database/blueprint.conversations.json +1 -0
- package/src/blueprints/database/blueprint.test.ts +321 -0
- package/src/blueprints/database/blueprint.ts +39 -0
- package/src/blueprints/database/functions/context-add.ts +35 -0
- package/src/blueprints/database/functions/context-remove.ts +35 -0
- package/src/blueprints/database/functions/index.ts +33 -0
- package/src/blueprints/database/functions/load.ts +31 -0
- package/src/blueprints/database/functions/object-create.ts +35 -0
- package/src/blueprints/database/functions/object-delete.ts +27 -0
- package/src/blueprints/database/functions/object-update.ts +32 -0
- package/src/blueprints/database/functions/query.ts +126 -0
- package/src/blueprints/database/functions/relation-create.ts +47 -0
- package/src/blueprints/database/functions/relation-delete.ts +28 -0
- package/src/blueprints/database/functions/schema-add.ts +40 -0
- package/src/blueprints/database/functions/schema-list.ts +34 -0
- package/src/blueprints/database/functions/tag-add.ts +31 -0
- package/src/blueprints/database/functions/tag-remove.ts +30 -0
- package/src/blueprints/database/index.ts +6 -0
- package/src/blueprints/design/{design-blueprint.test.ts → blueprint.test.ts} +12 -21
- package/src/blueprints/design/{design-blueprint.ts → blueprint.ts} +25 -10
- package/src/blueprints/design/index.ts +1 -3
- package/src/blueprints/discord/blueprint.ts +46 -0
- package/src/{functions/discord → blueprints/discord/functions}/fetch-messages.test.ts +4 -7
- package/src/blueprints/discord/functions/index.ts +9 -0
- package/src/blueprints/discord/index.ts +1 -3
- package/src/blueprints/github/functions/index.ts +9 -0
- package/src/blueprints/index.ts +10 -6
- package/src/blueprints/linear/blueprint.ts +47 -0
- package/src/blueprints/linear/functions/index.ts +9 -0
- package/src/blueprints/linear/functions/linear.test.ts +58 -0
- package/src/{functions/linear → blueprints/linear/functions}/sync-issues.ts +6 -6
- package/src/blueprints/linear/index.ts +1 -3
- package/src/blueprints/markdown/blueprint.ts +38 -0
- package/src/blueprints/markdown/functions/create.ts +29 -0
- package/src/blueprints/markdown/functions/index.ts +13 -0
- package/src/blueprints/markdown/functions/read.ts +32 -0
- package/src/{functions/document → blueprints/markdown/functions}/update.ts +5 -6
- package/src/blueprints/markdown/index.ts +6 -0
- package/src/blueprints/planning/blueprint.ts +28 -0
- package/src/blueprints/planning/functions/index.ts +9 -0
- package/src/blueprints/planning/functions/update-tasks.ts +168 -0
- package/src/blueprints/planning/index.ts +2 -4
- package/src/blueprints/{planning/planning-blueprint.test.ts → planning-old/blueprint.test.ts} +12 -16
- package/src/blueprints/{planning/planning-blueprint.ts → planning-old/blueprint.ts} +24 -10
- package/src/blueprints/planning-old/functions/index.ts +11 -0
- package/src/{functions/tasks → blueprints/planning-old/functions}/read.ts +5 -6
- package/src/{functions/tasks → blueprints/planning-old/functions}/update.ts +5 -6
- package/src/blueprints/planning-old/index.ts +5 -0
- package/src/{initiative/initiative.test.ts → blueprints/project/blueprint.test.ts} +138 -44
- package/src/blueprints/project/blueprint.ts +68 -0
- package/src/blueprints/project/functions/add-artifact.ts +41 -0
- package/src/blueprints/project/functions/agent.ts +72 -0
- package/src/blueprints/project/functions/get-context.ts +63 -0
- package/src/blueprints/project/functions/index.ts +15 -0
- package/src/blueprints/project/functions/qualifier.ts +96 -0
- package/src/blueprints/project/index.ts +6 -0
- package/src/blueprints/research/{research-blueprint.ts → blueprint.ts} +25 -11
- package/src/{functions/research → blueprints/research/functions}/document-create.ts +8 -11
- package/src/blueprints/research/functions/index.ts +11 -0
- package/src/blueprints/research/functions/research.conversations.json +1 -0
- package/src/{functions/research → blueprints/research/functions}/research.test.ts +33 -55
- package/src/{functions/research → blueprints/research/functions}/research.ts +13 -27
- package/src/blueprints/research/index.ts +2 -3
- package/src/blueprints/research/types/ResearchGraph.ts +49 -0
- package/src/{functions/research/types.ts → blueprints/research/types/index.ts} +12 -6
- package/src/blueprints/testing.ts +35 -4
- package/src/blueprints/websearch/blueprint.ts +32 -0
- package/src/blueprints/websearch/index.ts +2 -5
- package/src/crud/graph.test.ts +2 -2
- package/src/crud/graph.ts +9 -9
- package/src/functions/READ_THIS.md +5 -0
- package/src/functions/agent/index.ts +4 -6
- package/src/functions/agent/prompt.ts +15 -25
- package/src/functions/entity-extraction/entity-extraction.conversations.json +1 -6597
- package/src/functions/entity-extraction/entity-extraction.test.ts +11 -30
- package/src/functions/entity-extraction/entity-extraction.ts +12 -14
- package/src/functions/entity-extraction/index.ts +4 -4
- package/src/functions/exa/exa.ts +2 -2
- package/src/functions/exa/index.ts +7 -2
- package/src/functions/index.ts +1 -5
- package/src/index.ts +2 -1
- package/src/sync/sync.ts +2 -2
- package/src/testing/index.ts +1 -0
- package/src/testing/plugins.tsx +21 -17
- package/src/toolkits/WebToolkit.ts +33 -0
- package/src/toolkits/index.ts +1 -2
- package/src/types/Chat.ts +49 -0
- package/src/types/Plan.ts +107 -0
- package/src/types/Project.ts +196 -0
- package/src/types/index.ts +7 -0
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/testing/index.mjs +0 -43
- package/dist/lib/browser/testing/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -2881
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/testing/index.mjs +0 -44
- package/dist/lib/node-esm/testing/index.mjs.map +0 -7
- package/dist/types/src/blueprints/design/design-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/design/design-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/design-blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/design/design-blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/discord/discord-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/discord/discord-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/linear/linear-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/linear/linear-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning/planning-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/planning/planning-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/research-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/research/research-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/research-blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/research/research-blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts +0 -18
- package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/websearch/websearch-toolkit.d.ts.map +0 -1
- package/dist/types/src/experimental/feed.test.d.ts +0 -2
- package/dist/types/src/experimental/feed.test.d.ts.map +0 -1
- package/dist/types/src/functions/discord/fetch-messages.d.ts.map +0 -1
- package/dist/types/src/functions/discord/fetch-messages.test.d.ts.map +0 -1
- package/dist/types/src/functions/discord/index.d.ts.map +0 -1
- package/dist/types/src/functions/document/index.d.ts +0 -13
- package/dist/types/src/functions/document/index.d.ts.map +0 -1
- package/dist/types/src/functions/document/read.d.ts +0 -7
- package/dist/types/src/functions/document/read.d.ts.map +0 -1
- package/dist/types/src/functions/document/update.d.ts.map +0 -1
- package/dist/types/src/functions/github/fetch-prs.d.ts.map +0 -1
- package/dist/types/src/functions/linear/index.d.ts.map +0 -1
- package/dist/types/src/functions/linear/linear.test.d.ts.map +0 -1
- package/dist/types/src/functions/linear/sync-issues.d.ts.map +0 -1
- package/dist/types/src/functions/research/document-create.d.ts.map +0 -1
- package/dist/types/src/functions/research/index.d.ts.map +0 -1
- package/dist/types/src/functions/research/research-graph.d.ts.map +0 -1
- package/dist/types/src/functions/research/research.d.ts.map +0 -1
- package/dist/types/src/functions/research/research.test.d.ts.map +0 -1
- package/dist/types/src/functions/research/types.d.ts +0 -6
- package/dist/types/src/functions/research/types.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/index.d.ts +0 -15
- package/dist/types/src/functions/tasks/index.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/read.d.ts +0 -7
- package/dist/types/src/functions/tasks/read.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/task-list.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/task-list.test.d.ts.map +0 -1
- package/dist/types/src/functions/tasks/update.d.ts +0 -9
- package/dist/types/src/functions/tasks/update.d.ts.map +0 -1
- package/dist/types/src/initiative/Initiative.d.ts +0 -84
- package/dist/types/src/initiative/Initiative.d.ts.map +0 -1
- package/dist/types/src/initiative/InitiativeSchema.d.ts +0 -19
- package/dist/types/src/initiative/InitiativeSchema.d.ts.map +0 -1
- package/dist/types/src/initiative/functions/agent.d.ts +0 -37
- package/dist/types/src/initiative/functions/agent.d.ts.map +0 -1
- package/dist/types/src/initiative/functions/getContext.d.ts +0 -17
- package/dist/types/src/initiative/functions/getContext.d.ts.map +0 -1
- package/dist/types/src/initiative/functions/index.d.ts +0 -4
- package/dist/types/src/initiative/functions/index.d.ts.map +0 -1
- package/dist/types/src/initiative/functions/update.d.ts.map +0 -1
- package/dist/types/src/initiative/index.d.ts.map +0 -1
- package/dist/types/src/initiative/initiative.test.d.ts +0 -2
- package/dist/types/src/initiative/initiative.test.d.ts.map +0 -1
- package/dist/types/src/toolkits/AssistantToolkit.d.ts +0 -43
- package/dist/types/src/toolkits/AssistantToolkit.d.ts.map +0 -1
- package/dist/types/src/toolkits/AssistantToolkit.test.d.ts +0 -2
- package/dist/types/src/toolkits/AssistantToolkit.test.d.ts.map +0 -1
- package/dist/types/src/toolkits/SystemToolkit.d.ts +0 -99
- package/dist/types/src/toolkits/SystemToolkit.d.ts.map +0 -1
- package/src/blueprints/discord/discord-blueprint.ts +0 -32
- package/src/blueprints/linear/linear-blueprint.ts +0 -33
- package/src/blueprints/websearch/websearch-blueprint.ts +0 -18
- package/src/experimental/feed.test.ts +0 -111
- package/src/functions/discord/index.ts +0 -9
- package/src/functions/document/index.ts +0 -12
- package/src/functions/document/read.ts +0 -30
- package/src/functions/linear/index.ts +0 -9
- package/src/functions/linear/linear.test.ts +0 -84
- package/src/functions/research/index.ts +0 -14
- package/src/functions/research/research-graph.ts +0 -49
- package/src/functions/research/research.conversations.json +0 -1
- package/src/functions/tasks/index.ts +0 -11
- package/src/initiative/Initiative.ts +0 -99
- package/src/initiative/InitiativeSchema.ts +0 -37
- package/src/initiative/functions/agent.ts +0 -57
- package/src/initiative/functions/getContext.ts +0 -74
- package/src/initiative/functions/index.ts +0 -7
- package/src/initiative/functions/update.ts +0 -63
- package/src/initiative/initiative.conversations.json +0 -1
- package/src/toolkits/AssistantToolkit.conversations.json +0 -1
- package/src/toolkits/AssistantToolkit.test.ts +0 -94
- package/src/toolkits/AssistantToolkit.ts +0 -70
- package/src/toolkits/SystemToolkit.ts +0 -299
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
- /package/dist/types/src/{functions/discord → blueprints/discord/functions}/fetch-messages.d.ts +0 -0
- /package/dist/types/src/{functions/discord → blueprints/discord/functions}/fetch-messages.test.d.ts +0 -0
- /package/dist/types/src/{functions/github → blueprints/github/functions}/fetch-prs.d.ts +0 -0
- /package/dist/types/src/{initiative → blueprints/github}/index.d.ts +0 -0
- /package/dist/types/src/{functions/linear → blueprints/linear/functions}/linear.test.d.ts +0 -0
- /package/dist/types/src/{functions/linear → blueprints/linear/functions}/sync-issues.d.ts +0 -0
- /package/dist/types/src/{functions/tasks → blueprints/planning-old/functions}/task-list.d.ts +0 -0
- /package/dist/types/src/{functions/tasks → blueprints/planning-old/functions}/task-list.test.d.ts +0 -0
- /package/dist/types/src/{functions/research → blueprints/research/functions}/research.test.d.ts +0 -0
- /package/src/{functions/discord → blueprints/discord/functions}/fetch-messages.ts +0 -0
- /package/src/{functions/github → blueprints/github/functions}/fetch-prs.ts +0 -0
- /package/src/{initiative → blueprints/github}/index.ts +0 -0
- /package/src/{functions/tasks → blueprints/planning-old/functions}/task-list.test.ts +0 -0
- /package/src/{functions/tasks → blueprints/planning-old/functions}/task-list.ts +0 -0
- /package/src/blueprints/research/{research-blueprint.test.ts → blueprint.test.ts} +0 -0
- /package/src/{functions/research → blueprints/research/functions}/research-instructions.tpl +0 -0
- /package/src/blueprints/websearch/{websearch-toolkit.ts → toolkit.ts} +0 -0
|
@@ -0,0 +1,126 @@
|
|
|
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 { Entity, Filter, Obj, Query } from '@dxos/echo';
|
|
9
|
+
import { Database } from '@dxos/echo';
|
|
10
|
+
import { defineFunction } from '@dxos/functions';
|
|
11
|
+
import { trim } from '@dxos/util';
|
|
12
|
+
|
|
13
|
+
// TODO(burdon): Move to toolkit (i.e., tool not function).
|
|
14
|
+
export default defineFunction({
|
|
15
|
+
key: 'dxos.org/function/database/query',
|
|
16
|
+
name: 'Query',
|
|
17
|
+
description: trim`
|
|
18
|
+
Query for objects in ECHO.
|
|
19
|
+
Use this tool when searching for information in the space (both automerge and queues).
|
|
20
|
+
Currently, two types of queries are supported:
|
|
21
|
+
- Full-text search - terms may appear anywhere in the object.
|
|
22
|
+
- Type-based search - objects of a specific type.
|
|
23
|
+
You can use them together, for example, to search for objects of a specific type that match a full-text query.
|
|
24
|
+
Important: Whem querying by typename, make sure to list the schema first, to get the exact typename.
|
|
25
|
+
|
|
26
|
+
Omit both typename and text to search for all objects.
|
|
27
|
+
|
|
28
|
+
<output_format>
|
|
29
|
+
You can choose to either return the full object data, or just the DXN, type and label.
|
|
30
|
+
When expecting a lot of results, run with includeContent=false to not pollute the context, and then load specific objects using the load tool.
|
|
31
|
+
|
|
32
|
+
You can choose to get the content right away, if you don't expect a lot of results.
|
|
33
|
+
To load content right away, run with includeContent=true.
|
|
34
|
+
When loading content, set an appropriate limit on the number of results to avoid overwhelming the context.
|
|
35
|
+
</output_format>
|
|
36
|
+
|
|
37
|
+
<example description="All tasks related to Cyberdyne and Bob">
|
|
38
|
+
{
|
|
39
|
+
"typename": "dxos.org/type/Task",
|
|
40
|
+
"text": "cyberdyne bob",
|
|
41
|
+
}
|
|
42
|
+
</example>
|
|
43
|
+
|
|
44
|
+
<example description="Financial report Q1 2026">
|
|
45
|
+
{
|
|
46
|
+
"typename": "dxos.org/type/Document",
|
|
47
|
+
"text": "financial report Q1 2026",
|
|
48
|
+
"includeContent": true
|
|
49
|
+
"limit": 3
|
|
50
|
+
}
|
|
51
|
+
</example>
|
|
52
|
+
`,
|
|
53
|
+
inputSchema: Schema.Struct({
|
|
54
|
+
typename: Schema.optional(
|
|
55
|
+
Schema.String.annotations({
|
|
56
|
+
description: 'The typename of the objects to list.',
|
|
57
|
+
example: 'dxos.org/type/Task',
|
|
58
|
+
}),
|
|
59
|
+
),
|
|
60
|
+
text: Schema.optional(
|
|
61
|
+
Schema.String.annotations({
|
|
62
|
+
description: 'Full text search query.',
|
|
63
|
+
example: 'email cyberdyne bob',
|
|
64
|
+
}),
|
|
65
|
+
),
|
|
66
|
+
includeContent: Schema.optional(
|
|
67
|
+
Schema.Boolean.annotations({
|
|
68
|
+
description: 'Include the full object data in the response.',
|
|
69
|
+
default: false,
|
|
70
|
+
}),
|
|
71
|
+
),
|
|
72
|
+
limit: Schema.optional(
|
|
73
|
+
Schema.Number.annotations({
|
|
74
|
+
description: 'The maximum number of results to return.',
|
|
75
|
+
default: 10,
|
|
76
|
+
}),
|
|
77
|
+
),
|
|
78
|
+
// TODO(dmaretskyi): There's a problem with querying queues, that the agent keeps finding message from agent threads.
|
|
79
|
+
// Let's think about a better way to do this.
|
|
80
|
+
// And queues don't have predicatble ids, so queue DXNs blow up the conversation cache.
|
|
81
|
+
includeQueues: Schema.optional(
|
|
82
|
+
Schema.Boolean.annotations({
|
|
83
|
+
description: 'Search in queues as well as spaces. Only use this if searching for emails.',
|
|
84
|
+
default: false,
|
|
85
|
+
}),
|
|
86
|
+
),
|
|
87
|
+
}),
|
|
88
|
+
outputSchema: Schema.Array(Schema.Unknown),
|
|
89
|
+
handler: Effect.fn(function* ({
|
|
90
|
+
data: { typename, text, includeContent = false, limit = 10, includeQueues = false },
|
|
91
|
+
}) {
|
|
92
|
+
let query: Query.Any;
|
|
93
|
+
if (text) {
|
|
94
|
+
query = Query.all(...text.split(' ').map((term) => Query.select(Filter.text(term, { type: 'full-text' }))));
|
|
95
|
+
if (typename !== undefined) {
|
|
96
|
+
const schema = yield* Database.runSchemaQuery({ typename, location: ['database', 'runtime'] });
|
|
97
|
+
if (schema.length === 0) {
|
|
98
|
+
return yield* Effect.fail(new Error(`Schema ${typename} not found`));
|
|
99
|
+
}
|
|
100
|
+
// NOTE: Query by typename string doesn't work for dynamic schemas.
|
|
101
|
+
query = query.select(Filter.type(schema[0]));
|
|
102
|
+
}
|
|
103
|
+
} else if (typename) {
|
|
104
|
+
query = Query.select(Filter.type(typename));
|
|
105
|
+
} else {
|
|
106
|
+
query = Query.select(Filter.everything());
|
|
107
|
+
}
|
|
108
|
+
query = query.limit(limit);
|
|
109
|
+
if (includeQueues) {
|
|
110
|
+
query = query.from({ allQueuesFromSpaces: true });
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Update indexes before querying to make sure we get the latest results.
|
|
114
|
+
yield* Database.flush({ indexes: true });
|
|
115
|
+
const results = yield* Database.runQuery(query);
|
|
116
|
+
if (includeContent) {
|
|
117
|
+
return results.map((obj) => Entity.toJSON(obj));
|
|
118
|
+
} else {
|
|
119
|
+
return results.map((obj) => ({
|
|
120
|
+
dxn: Obj.getDXN(obj).toString(),
|
|
121
|
+
typename: Obj.getTypename(obj),
|
|
122
|
+
label: Obj.getLabel(obj),
|
|
123
|
+
}));
|
|
124
|
+
}
|
|
125
|
+
}),
|
|
126
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
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, Entity, Obj, Ref, Relation, Type } from '@dxos/echo';
|
|
9
|
+
import { defineFunction } from '@dxos/functions';
|
|
10
|
+
import { invariant } from '@dxos/invariant';
|
|
11
|
+
import { trim } from '@dxos/util';
|
|
12
|
+
|
|
13
|
+
export default defineFunction({
|
|
14
|
+
key: 'dxos.org/function/database/relation-create',
|
|
15
|
+
name: 'Create relation',
|
|
16
|
+
description: trim`
|
|
17
|
+
Creates a new relation and adds it to the current space.
|
|
18
|
+
Get the schema from the schema-list tool and ensure that the data matches the corresponding schema.
|
|
19
|
+
`,
|
|
20
|
+
inputSchema: Schema.Struct({
|
|
21
|
+
typename: Schema.String,
|
|
22
|
+
source: Ref.Ref(Obj.Unknown),
|
|
23
|
+
target: Ref.Ref(Obj.Unknown),
|
|
24
|
+
properties: Schema.Any.annotations({
|
|
25
|
+
description: 'The data to be stored in the relation.',
|
|
26
|
+
}),
|
|
27
|
+
}),
|
|
28
|
+
outputSchema: Schema.Unknown,
|
|
29
|
+
handler: Effect.fn(function* ({ data: { typename, source, target, properties } }) {
|
|
30
|
+
const { db } = yield* Database.Service;
|
|
31
|
+
const schema = yield* Effect.promise(() =>
|
|
32
|
+
db.schemaRegistry.query({ typename, location: ['database', 'runtime'] }).first(),
|
|
33
|
+
);
|
|
34
|
+
invariant(Type.isRelationSchema(schema), 'Schema is not a relation schema');
|
|
35
|
+
|
|
36
|
+
const sourceObj = yield* Database.load(source);
|
|
37
|
+
const targetObj = yield* Database.load(target);
|
|
38
|
+
const relation = db.add(
|
|
39
|
+
Relation.make(schema, {
|
|
40
|
+
[Relation.Source]: sourceObj,
|
|
41
|
+
[Relation.Target]: targetObj,
|
|
42
|
+
...properties,
|
|
43
|
+
}),
|
|
44
|
+
);
|
|
45
|
+
return Entity.toJSON(relation);
|
|
46
|
+
}),
|
|
47
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
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, Relation } from '@dxos/echo';
|
|
9
|
+
import { defineFunction } from '@dxos/functions';
|
|
10
|
+
import { trim } from '@dxos/util';
|
|
11
|
+
|
|
12
|
+
export default defineFunction({
|
|
13
|
+
key: 'dxos.org/function/database/relation-delete',
|
|
14
|
+
name: 'Delete relation',
|
|
15
|
+
description: trim`
|
|
16
|
+
Deletes the relation.
|
|
17
|
+
`,
|
|
18
|
+
inputSchema: Schema.Struct({
|
|
19
|
+
rel: Ref.Ref(Relation.Unknown),
|
|
20
|
+
}),
|
|
21
|
+
outputSchema: Schema.Void,
|
|
22
|
+
handler: Effect.fn(function* ({ data: { rel } }) {
|
|
23
|
+
const { db } = yield* Database.Service;
|
|
24
|
+
const relation = yield* Database.load(rel);
|
|
25
|
+
// TODO(dmaretskyi): Echo types broken.
|
|
26
|
+
db.remove(relation as any);
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
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 } from '@dxos/echo';
|
|
9
|
+
import { defineFunction } from '@dxos/functions';
|
|
10
|
+
import { trim } from '@dxos/util';
|
|
11
|
+
|
|
12
|
+
export default defineFunction({
|
|
13
|
+
key: 'dxos.org/function/database/schema-add',
|
|
14
|
+
name: 'Add schema',
|
|
15
|
+
description: trim`
|
|
16
|
+
Adds a schema to the space.
|
|
17
|
+
The name will be used when displayed to the user.
|
|
18
|
+
`,
|
|
19
|
+
inputSchema: Schema.Struct({
|
|
20
|
+
name: Schema.String,
|
|
21
|
+
typename: Schema.String.annotations({
|
|
22
|
+
description: 'The typename of the schema in the format of "example.com/type/Type".',
|
|
23
|
+
}),
|
|
24
|
+
jsonSchema: Schema.Any,
|
|
25
|
+
}),
|
|
26
|
+
outputSchema: Schema.Void,
|
|
27
|
+
handler: Effect.fn(function* ({ data: { name, typename, jsonSchema } }) {
|
|
28
|
+
const { db } = yield* Database.Service;
|
|
29
|
+
yield* Effect.promise(() =>
|
|
30
|
+
db.schemaRegistry.register([
|
|
31
|
+
{
|
|
32
|
+
typename,
|
|
33
|
+
version: '0.1.0',
|
|
34
|
+
jsonSchema,
|
|
35
|
+
name,
|
|
36
|
+
},
|
|
37
|
+
]),
|
|
38
|
+
);
|
|
39
|
+
}),
|
|
40
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
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, JsonSchema, Type } from '@dxos/echo';
|
|
9
|
+
import { defineFunction } from '@dxos/functions';
|
|
10
|
+
import { trim } from '@dxos/util';
|
|
11
|
+
|
|
12
|
+
export default defineFunction({
|
|
13
|
+
key: 'dxos.org/function/database/schema-list',
|
|
14
|
+
name: 'List schemas',
|
|
15
|
+
description: trim`
|
|
16
|
+
Lists schemas definitions.
|
|
17
|
+
`,
|
|
18
|
+
inputSchema: Schema.Struct({
|
|
19
|
+
limit: Schema.optional(Schema.Number),
|
|
20
|
+
}),
|
|
21
|
+
outputSchema: Schema.Array(Schema.Unknown),
|
|
22
|
+
handler: Effect.fn(function* () {
|
|
23
|
+
const { db } = yield* Database.Service;
|
|
24
|
+
const schema = yield* Effect.promise(() => db.schemaRegistry.query({ location: ['database', 'runtime'] }).run());
|
|
25
|
+
return schema.map((schema) => {
|
|
26
|
+
const meta = Type.getMeta(schema);
|
|
27
|
+
return {
|
|
28
|
+
typename: Type.getTypename(schema),
|
|
29
|
+
jsonSchema: JsonSchema.toJsonSchema(schema),
|
|
30
|
+
kind: meta?.sourceSchema ? 'relation' : 'record',
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
}),
|
|
34
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
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, Entity, Obj, Ref, Tag } from '@dxos/echo';
|
|
9
|
+
import { defineFunction } from '@dxos/functions';
|
|
10
|
+
import { trim } from '@dxos/util';
|
|
11
|
+
|
|
12
|
+
export default defineFunction({
|
|
13
|
+
key: 'dxos.org/function/database/tag-add',
|
|
14
|
+
name: 'Add tag',
|
|
15
|
+
description: trim`
|
|
16
|
+
Adds a tag to an object.
|
|
17
|
+
Tags are objects of type ${Tag.Tag.typename}.
|
|
18
|
+
You must search database for available tags, or create a new one.
|
|
19
|
+
`,
|
|
20
|
+
inputSchema: Schema.Struct({
|
|
21
|
+
tag: Ref.Ref(Obj.Unknown),
|
|
22
|
+
obj: Ref.Ref(Obj.Unknown),
|
|
23
|
+
}),
|
|
24
|
+
outputSchema: Schema.Unknown,
|
|
25
|
+
handler: Effect.fn(function* ({ data: { tag, obj } }) {
|
|
26
|
+
const object = yield* Database.load(obj);
|
|
27
|
+
const tagObj = yield* Database.load(tag);
|
|
28
|
+
Entity.change(object, (obj) => Entity.addTag(obj, Obj.getDXN(tagObj).toString()));
|
|
29
|
+
return Entity.toJSON(object);
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
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, Entity, Obj, Ref, Tag } from '@dxos/echo';
|
|
9
|
+
import { defineFunction } from '@dxos/functions';
|
|
10
|
+
import { trim } from '@dxos/util';
|
|
11
|
+
|
|
12
|
+
export default defineFunction({
|
|
13
|
+
key: 'dxos.org/function/database/tag-remove',
|
|
14
|
+
name: 'Remove tag',
|
|
15
|
+
description: trim`
|
|
16
|
+
Removes a tag from an object.
|
|
17
|
+
Tags are objects of type ${Tag.Tag.typename}.
|
|
18
|
+
`,
|
|
19
|
+
inputSchema: Schema.Struct({
|
|
20
|
+
tag: Ref.Ref(Obj.Unknown),
|
|
21
|
+
obj: Ref.Ref(Obj.Unknown),
|
|
22
|
+
}),
|
|
23
|
+
outputSchema: Schema.Unknown,
|
|
24
|
+
handler: Effect.fn(function* ({ data: { tag, obj } }) {
|
|
25
|
+
const object = yield* Database.load(obj);
|
|
26
|
+
const tagObj = yield* Database.load(tag);
|
|
27
|
+
Entity.change(object, (obj) => Entity.removeTag(obj, Obj.getDXN(tagObj).toString()));
|
|
28
|
+
return Entity.toJSON(object);
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
@@ -7,14 +7,9 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import * as Layer from 'effect/Layer';
|
|
8
8
|
|
|
9
9
|
import { AiService, ConsolePrinter } from '@dxos/ai';
|
|
10
|
+
import { GenericToolkit } from '@dxos/ai';
|
|
10
11
|
import { AiServiceTestingPreset } from '@dxos/ai/testing';
|
|
11
|
-
import {
|
|
12
|
-
AiConversation,
|
|
13
|
-
type ContextBinding,
|
|
14
|
-
GenerationObserver,
|
|
15
|
-
makeToolExecutionServiceFromFunctions,
|
|
16
|
-
makeToolResolverFromFunctions,
|
|
17
|
-
} from '@dxos/assistant';
|
|
12
|
+
import { AiConversation, type ContextBinding, GenerationObserver, ToolExecutionServices } from '@dxos/assistant';
|
|
18
13
|
import { Blueprint } from '@dxos/blueprints';
|
|
19
14
|
import { Obj, Ref } from '@dxos/echo';
|
|
20
15
|
import { Database } from '@dxos/echo';
|
|
@@ -28,10 +23,9 @@ import { Text } from '@dxos/schema';
|
|
|
28
23
|
import { type Message } from '@dxos/types';
|
|
29
24
|
import { trim } from '@dxos/util';
|
|
30
25
|
|
|
31
|
-
import {
|
|
32
|
-
import { testToolkit } from '../testing';
|
|
26
|
+
import { MarkdownFunctions } from '../markdown';
|
|
33
27
|
|
|
34
|
-
import
|
|
28
|
+
import DesignBlueprint from './blueprint';
|
|
35
29
|
|
|
36
30
|
describe('Design Blueprint', { timeout: 120_000 }, () => {
|
|
37
31
|
it.scoped(
|
|
@@ -42,14 +36,15 @@ describe('Design Blueprint', { timeout: 120_000 }, () => {
|
|
|
42
36
|
const queue = yield* QueueService.createQueue<Message.Message | ContextBinding>();
|
|
43
37
|
const conversation = yield* acquireReleaseResource(() => new AiConversation({ queue }));
|
|
44
38
|
|
|
45
|
-
|
|
39
|
+
const blueprint = DesignBlueprint.make();
|
|
40
|
+
yield* Database.add(blueprint);
|
|
46
41
|
yield* Effect.promise(() =>
|
|
47
42
|
conversation.context.bind({
|
|
48
43
|
blueprints: [Ref.make(blueprint)],
|
|
49
44
|
}),
|
|
50
45
|
);
|
|
51
46
|
|
|
52
|
-
const artifact = yield* Database.
|
|
47
|
+
const artifact = yield* Database.add(Markdown.make({ content: 'Hello, world!' }));
|
|
53
48
|
let prevContent = artifact.content;
|
|
54
49
|
|
|
55
50
|
{
|
|
@@ -84,17 +79,13 @@ describe('Design Blueprint', { timeout: 120_000 }, () => {
|
|
|
84
79
|
}
|
|
85
80
|
},
|
|
86
81
|
Effect.provide(
|
|
87
|
-
Layer.mergeAll(
|
|
88
|
-
makeToolResolverFromFunctions([Document.read, Document.update], testToolkit),
|
|
89
|
-
makeToolExecutionServiceFromFunctions(testToolkit, testToolkit.toLayer({}) as any),
|
|
90
|
-
AiService.model('@anthropic/claude-3-5-sonnet-20241022'),
|
|
91
|
-
).pipe(
|
|
82
|
+
Layer.mergeAll(ToolExecutionServices, AiService.model('@anthropic/claude-3-5-sonnet-20241022')).pipe(
|
|
92
83
|
Layer.provideMerge(TestDatabaseLayer({ types: [Text.Text, Markdown.Document, Blueprint.Blueprint] })),
|
|
93
|
-
Layer.provideMerge(AiServiceTestingPreset('direct')),
|
|
84
|
+
Layer.provideMerge(Layer.mergeAll(GenericToolkit.providerEmpty, AiServiceTestingPreset('direct'))),
|
|
94
85
|
Layer.provideMerge(
|
|
95
|
-
FunctionInvocationServiceLayerTestMocked({
|
|
96
|
-
|
|
97
|
-
),
|
|
86
|
+
FunctionInvocationServiceLayerTestMocked({
|
|
87
|
+
functions: Object.values(MarkdownFunctions),
|
|
88
|
+
}).pipe(Layer.provideMerge(TracingService.layerNoop)),
|
|
98
89
|
),
|
|
99
90
|
),
|
|
100
91
|
),
|
|
@@ -3,12 +3,18 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { ToolId } from '@dxos/ai';
|
|
6
|
+
import { type AppCapabilities } from '@dxos/app-toolkit';
|
|
6
7
|
import { Blueprint } from '@dxos/blueprints';
|
|
7
8
|
import { Ref } from '@dxos/echo';
|
|
8
9
|
import { Text } from '@dxos/schema';
|
|
9
10
|
import { trim } from '@dxos/util';
|
|
10
11
|
|
|
11
|
-
import {
|
|
12
|
+
import { MarkdownFunctions } from '../markdown';
|
|
13
|
+
|
|
14
|
+
const BLUEPRINT_KEY = 'dxos.org/blueprint/design';
|
|
15
|
+
|
|
16
|
+
// TODO(burdon): Should this expose the functions directly or just reference them? How do we manage cross blueprint function dependencies?
|
|
17
|
+
const functions = Object.values(MarkdownFunctions);
|
|
12
18
|
|
|
13
19
|
const instructions = trim`
|
|
14
20
|
You manage a design spec based on the conversation.
|
|
@@ -20,12 +26,21 @@ const instructions = trim`
|
|
|
20
26
|
Do not announce when you read or write the design spec document.
|
|
21
27
|
`;
|
|
22
28
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const make = () =>
|
|
30
|
+
Blueprint.make({
|
|
31
|
+
key: BLUEPRINT_KEY,
|
|
32
|
+
name: 'Design Spec',
|
|
33
|
+
description: 'Preserve the conversation in the design spec.',
|
|
34
|
+
instructions: {
|
|
35
|
+
source: Ref.make(Text.make(instructions)),
|
|
36
|
+
},
|
|
37
|
+
tools: functions.map((fn) => ToolId.make(fn.key)),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const blueprint: AppCapabilities.BlueprintDefinition = {
|
|
41
|
+
key: BLUEPRINT_KEY,
|
|
42
|
+
functions,
|
|
43
|
+
make,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default blueprint;
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { DiscordFunctions } from './functions';
|
|
13
|
+
|
|
14
|
+
const BLUEPRINT_KEY = 'dxos.org/blueprint/discord';
|
|
15
|
+
|
|
16
|
+
const functions = Object.values(DiscordFunctions);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Agent prompt instructions for managing hierarchical task lists.
|
|
20
|
+
*/
|
|
21
|
+
const instructions = trim`
|
|
22
|
+
You are able to fetch messages from Discord servers.
|
|
23
|
+
|
|
24
|
+
Known servers:
|
|
25
|
+
|
|
26
|
+
DXOS serverId: 837138313172353095
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
const make = () =>
|
|
30
|
+
Blueprint.make({
|
|
31
|
+
key: BLUEPRINT_KEY,
|
|
32
|
+
name: 'Discord',
|
|
33
|
+
description: 'Discord integration.',
|
|
34
|
+
instructions: {
|
|
35
|
+
source: Ref.make(Text.make(instructions)),
|
|
36
|
+
},
|
|
37
|
+
tools: [ToolId.make(DiscordFunctions.Fetch.key)],
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const blueprint: AppCapabilities.BlueprintDefinition = {
|
|
41
|
+
key: BLUEPRINT_KEY,
|
|
42
|
+
functions,
|
|
43
|
+
make,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default blueprint;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import * as Toolkit from '@effect/ai/Toolkit';
|
|
6
5
|
import * as FetchHttpClient from '@effect/platform/FetchHttpClient';
|
|
7
6
|
import { describe, it } from '@effect/vitest';
|
|
8
7
|
import * as Config from 'effect/Config';
|
|
@@ -10,21 +9,19 @@ import * as Effect from 'effect/Effect';
|
|
|
10
9
|
import * as Layer from 'effect/Layer';
|
|
11
10
|
|
|
12
11
|
import { AiService } from '@dxos/ai';
|
|
12
|
+
import { GenericToolkit } from '@dxos/ai';
|
|
13
13
|
import { AiServiceTestingPreset } from '@dxos/ai/testing';
|
|
14
|
-
import {
|
|
14
|
+
import { ToolExecutionServices } from '@dxos/assistant';
|
|
15
15
|
import { TestHelpers } from '@dxos/effect/testing';
|
|
16
16
|
import { CredentialsService, FunctionInvocationService, TracingService } from '@dxos/functions';
|
|
17
17
|
import { FunctionInvocationServiceLayerTestMocked, TestDatabaseLayer } from '@dxos/functions-runtime/testing';
|
|
18
18
|
|
|
19
19
|
import { default as fetchMessages } from './fetch-messages';
|
|
20
20
|
|
|
21
|
-
const TestLayer = Layer.mergeAll(
|
|
22
|
-
AiService.model('@anthropic/claude-opus-4-0'),
|
|
23
|
-
makeToolResolverFromFunctions([], Toolkit.make()),
|
|
24
|
-
makeToolExecutionServiceFromFunctions(Toolkit.make() as any, Layer.empty as any),
|
|
25
|
-
).pipe(
|
|
21
|
+
const TestLayer = Layer.mergeAll(AiService.model('@anthropic/claude-opus-4-0'), ToolExecutionServices).pipe(
|
|
26
22
|
Layer.provideMerge(
|
|
27
23
|
Layer.mergeAll(
|
|
24
|
+
GenericToolkit.providerEmpty,
|
|
28
25
|
AiServiceTestingPreset('direct'),
|
|
29
26
|
TestDatabaseLayer({}),
|
|
30
27
|
CredentialsService.layerConfig([{ service: 'discord.com', apiKey: Config.redacted('DISCORD_TOKEN') }]),
|
package/src/blueprints/index.ts
CHANGED
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
5
|
+
export * from './design';
|
|
6
|
+
export * from './discord';
|
|
7
|
+
export * from './project';
|
|
8
|
+
export * from './linear';
|
|
9
|
+
export * from './markdown';
|
|
10
|
+
export * from './planning';
|
|
11
|
+
export * from './research';
|
|
12
|
+
export * from './websearch';
|
|
13
|
+
export * from './browser';
|
|
14
|
+
export * from './database';
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { LinearFunctions } from './functions';
|
|
13
|
+
|
|
14
|
+
const BLUEPRINT_KEY = 'dxos.org/blueprint/linear';
|
|
15
|
+
|
|
16
|
+
const functions = Object.values(LinearFunctions);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Agent prompt instructions for managing hierarchical task lists.
|
|
20
|
+
*/
|
|
21
|
+
const instructions = trim`
|
|
22
|
+
You are able to sync Linear workspaces.
|
|
23
|
+
Sometimes sync does not complete in one go and you need to call the function again.
|
|
24
|
+
|
|
25
|
+
Known workspaces:
|
|
26
|
+
|
|
27
|
+
DXOS teamId: 1127c63a-6f77-4725-9229-50f6cd47321c
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
const make = () =>
|
|
31
|
+
Blueprint.make({
|
|
32
|
+
key: BLUEPRINT_KEY,
|
|
33
|
+
name: 'Linear',
|
|
34
|
+
description: 'Syncs Linear workspaces.',
|
|
35
|
+
instructions: {
|
|
36
|
+
source: Ref.make(Text.make(instructions)),
|
|
37
|
+
},
|
|
38
|
+
tools: functions.map((tool) => ToolId.make(tool.key)),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const blueprint: AppCapabilities.BlueprintDefinition = {
|
|
42
|
+
key: BLUEPRINT_KEY,
|
|
43
|
+
functions,
|
|
44
|
+
make,
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default blueprint;
|