@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,196 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Function from 'effect/Function';
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
import { AiContextBinder, AiContextService, type ContextBinding } from '@dxos/assistant';
|
|
10
|
+
import { type Blueprint } from '@dxos/blueprints';
|
|
11
|
+
import { Annotation, Type } from '@dxos/echo';
|
|
12
|
+
import { Database, Obj, Ref, Relation } from '@dxos/echo';
|
|
13
|
+
import { type ObjectNotFoundError } from '@dxos/echo/Err';
|
|
14
|
+
import { FormInputAnnotation } from '@dxos/echo/internal';
|
|
15
|
+
import { Queue } from '@dxos/echo-db';
|
|
16
|
+
import { acquireReleaseResource } from '@dxos/effect';
|
|
17
|
+
import { QueueService } from '@dxos/functions';
|
|
18
|
+
import { invariant } from '@dxos/invariant';
|
|
19
|
+
import { QueueAnnotation, Text } from '@dxos/schema';
|
|
20
|
+
import type { Message } from '@dxos/types';
|
|
21
|
+
|
|
22
|
+
import * as Chat from './Chat';
|
|
23
|
+
import * as Plan from './Plan';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Project schema definition.
|
|
27
|
+
*/
|
|
28
|
+
export const Project = Schema.Struct({
|
|
29
|
+
name: Schema.String,
|
|
30
|
+
|
|
31
|
+
spec: Ref.Ref(Text.Text).pipe(FormInputAnnotation.set(false)),
|
|
32
|
+
plan: Ref.Ref(Plan.Plan).pipe(FormInputAnnotation.set(false)),
|
|
33
|
+
|
|
34
|
+
artifacts: Schema.Array(
|
|
35
|
+
Schema.Struct({
|
|
36
|
+
// TODO(dmaretskyi): Consider gettings names from the artifact itself using Obj.getLabel.
|
|
37
|
+
name: Schema.String,
|
|
38
|
+
data: Ref.Ref(Obj.Unknown),
|
|
39
|
+
}),
|
|
40
|
+
).pipe(FormInputAnnotation.set(false)),
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Incoming queue that the agent processes.
|
|
44
|
+
*/
|
|
45
|
+
// NOTE: Named `queue` to conform to subscribable schema (see QueueAnnotation).
|
|
46
|
+
queue: Schema.optional(Ref.Ref(Queue).pipe(FormInputAnnotation.set(false))),
|
|
47
|
+
|
|
48
|
+
// TODO(dmaretskyi): Multiple chats.
|
|
49
|
+
chat: Schema.optional(Ref.Ref(Chat.Chat).pipe(FormInputAnnotation.set(false))),
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* References to objects with a canonical queue property.
|
|
53
|
+
* Schema must have the QueueAnnotation.
|
|
54
|
+
*/
|
|
55
|
+
// TODO(dmaretskyi): Turn into an array of objects when form-data
|
|
56
|
+
subscriptions: Schema.Array(Ref.Ref(Obj.Unknown)).pipe(FormInputAnnotation.set(false)),
|
|
57
|
+
|
|
58
|
+
useQualifyingAgent: Schema.optional(Schema.Boolean).annotations({
|
|
59
|
+
title: 'Use qualifying agent on subscriptions',
|
|
60
|
+
description:
|
|
61
|
+
'If enabled, the qualifying agent will be used to determine if the event is relevant to the project. Related events will be added to the input queue of the project. It is recommended to enable this.',
|
|
62
|
+
}),
|
|
63
|
+
}).pipe(
|
|
64
|
+
Type.object({
|
|
65
|
+
typename: 'dxos.org/type/Project',
|
|
66
|
+
version: '0.1.0',
|
|
67
|
+
}),
|
|
68
|
+
Annotation.IconAnnotation.set({
|
|
69
|
+
icon: 'ph--circuitry--regular',
|
|
70
|
+
hue: 'green',
|
|
71
|
+
}),
|
|
72
|
+
QueueAnnotation.set(true),
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
export interface Project extends Schema.Schema.Type<typeof Project> {}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Creates a fully initialized Project with chat, queue, and context bindings.
|
|
79
|
+
*
|
|
80
|
+
* @param props - Project properties including spec, plan, blueprints, and context objects.
|
|
81
|
+
* @param blueprint - The blueprint to use for the project context.
|
|
82
|
+
* @returns An Effect that yields the initialized Project.
|
|
83
|
+
*/
|
|
84
|
+
// TODO(burdon): Rename make and move into Project.ts?
|
|
85
|
+
export const makeInitialized = (
|
|
86
|
+
props: Omit<Obj.MakeProps<typeof Project>, 'spec' | 'plan' | 'artifacts' | 'subscriptions' | 'chat'> &
|
|
87
|
+
Partial<Pick<Obj.MakeProps<typeof Project>, 'artifacts' | 'subscriptions'>> & {
|
|
88
|
+
spec: string;
|
|
89
|
+
blueprints?: Ref.Ref<Blueprint.Blueprint>[];
|
|
90
|
+
contextObjects?: Ref.Ref<Obj.Any>[];
|
|
91
|
+
},
|
|
92
|
+
blueprint: Blueprint.Blueprint,
|
|
93
|
+
): Effect.Effect<Project, never, QueueService | Database.Service> =>
|
|
94
|
+
Effect.gen(function* () {
|
|
95
|
+
const project = Obj.make(Project, {
|
|
96
|
+
...props,
|
|
97
|
+
spec: Ref.make(Text.make(props.spec)),
|
|
98
|
+
plan: Ref.make(Plan.makePlan({ tasks: [] })),
|
|
99
|
+
artifacts: props.artifacts ?? [],
|
|
100
|
+
subscriptions: props.subscriptions ?? [],
|
|
101
|
+
useQualifyingAgent: props.useQualifyingAgent ?? true,
|
|
102
|
+
});
|
|
103
|
+
yield* Database.add(project);
|
|
104
|
+
const queue = yield* QueueService.createQueue<Message.Message | ContextBinding>();
|
|
105
|
+
const contextBinder = new AiContextBinder({ queue });
|
|
106
|
+
// TODO(dmaretskyi): Blueprint registry.
|
|
107
|
+
const projectBlueprint = yield* Database.add(Obj.clone(blueprint, { deep: true }));
|
|
108
|
+
yield* Effect.promise(() =>
|
|
109
|
+
contextBinder.bind({
|
|
110
|
+
blueprints: [Ref.make(projectBlueprint), ...(props.blueprints ?? [])],
|
|
111
|
+
objects: [Ref.make(project), ...(props.contextObjects ?? [])],
|
|
112
|
+
}),
|
|
113
|
+
);
|
|
114
|
+
const chat = yield* Database.add(
|
|
115
|
+
Chat.make({
|
|
116
|
+
[Obj.Parent]: project,
|
|
117
|
+
queue: Ref.fromDXN(queue.dxn),
|
|
118
|
+
}),
|
|
119
|
+
);
|
|
120
|
+
yield* Database.add(
|
|
121
|
+
Relation.make(Chat.CompanionTo, {
|
|
122
|
+
[Relation.Source]: chat,
|
|
123
|
+
[Relation.Target]: project,
|
|
124
|
+
}),
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
const inputQueue = yield* QueueService.createQueue();
|
|
128
|
+
|
|
129
|
+
Obj.change(project, (project) => {
|
|
130
|
+
project.chat = Ref.make(chat);
|
|
131
|
+
project.queue = Ref.fromDXN(inputQueue.dxn);
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
return project;
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Resets the project chat history by rebuilding the chat context.
|
|
139
|
+
* Preserves the existing blueprints and objects from the current chat context.
|
|
140
|
+
*
|
|
141
|
+
* @param project - The project whose chat history should be reset. Must have an existing chat.
|
|
142
|
+
* @returns An Effect that resets the chat history.
|
|
143
|
+
*/
|
|
144
|
+
export const resetChatHistory = (
|
|
145
|
+
project: Project,
|
|
146
|
+
): Effect.Effect<void, ObjectNotFoundError, QueueService | Database.Service> =>
|
|
147
|
+
Effect.gen(function* () {
|
|
148
|
+
invariant(project.chat, 'Project must have an existing chat to reset.');
|
|
149
|
+
|
|
150
|
+
const existingQueue = yield* project.chat.pipe(Database.load).pipe(
|
|
151
|
+
Effect.map((_) => _.queue),
|
|
152
|
+
Effect.flatMap(Database.load),
|
|
153
|
+
);
|
|
154
|
+
const existingContextBinder = yield* acquireReleaseResource(
|
|
155
|
+
() =>
|
|
156
|
+
new AiContextBinder({
|
|
157
|
+
queue: existingQueue,
|
|
158
|
+
}),
|
|
159
|
+
);
|
|
160
|
+
const blueprints = existingContextBinder.getBlueprints().map((blueprint) => Ref.make(blueprint));
|
|
161
|
+
const objects = existingContextBinder.getObjects().map((object) => Ref.make(object));
|
|
162
|
+
|
|
163
|
+
const queue = yield* QueueService.createQueue();
|
|
164
|
+
const contextBinder = new AiContextBinder({ queue });
|
|
165
|
+
yield* Effect.promise(() =>
|
|
166
|
+
contextBinder.bind({
|
|
167
|
+
blueprints,
|
|
168
|
+
objects,
|
|
169
|
+
}),
|
|
170
|
+
);
|
|
171
|
+
const chat = yield* Database.add(
|
|
172
|
+
Chat.make({
|
|
173
|
+
queue: Ref.fromDXN(queue.dxn),
|
|
174
|
+
}),
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
Obj.change(project, (project) => {
|
|
178
|
+
project.chat = Ref.make(chat);
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
yield* Database.add(
|
|
182
|
+
Relation.make(Chat.CompanionTo, {
|
|
183
|
+
[Relation.Source]: chat,
|
|
184
|
+
[Relation.Target]: project,
|
|
185
|
+
}),
|
|
186
|
+
);
|
|
187
|
+
}).pipe(Effect.scoped);
|
|
188
|
+
|
|
189
|
+
export const getFromChatContext: Effect.Effect<Project, never, AiContextService> = Effect.gen(function* () {
|
|
190
|
+
const projects = yield* Function.pipe(AiContextService.findObjects(Project));
|
|
191
|
+
if (projects.length !== 1) {
|
|
192
|
+
throw new Error('There should be exactly one project in context. Got: ' + projects.length);
|
|
193
|
+
}
|
|
194
|
+
const project = projects[0];
|
|
195
|
+
return project;
|
|
196
|
+
});
|