@dxos/assistant-toolkit 0.8.4-main.ae835ea → 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/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/index.mjs +2989 -1842
- 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/blueprints/database/functions/schema-add.d.ts +7 -0
- 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/{functions/discord → blueprints/discord/functions}/fetch-messages.d.ts +1 -1
- 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 +4 -4
- 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/{functions/github → blueprints/github/functions}/fetch-prs.d.ts +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 +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/blueprints/linear/functions/index.d.ts +9 -0
- 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/{functions/linear → blueprints/linear/functions}/sync-issues.d.ts +2 -2
- 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/research/create-document.d.ts → blueprints/markdown/functions/create.d.ts} +2 -3
- 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/blueprints/research/functions/document-create.d.ts +10 -0
- package/dist/types/src/blueprints/research/functions/document-create.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/functions/index.d.ts +19 -0
- 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 +4 -3
- 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/blueprints/research/types/ResearchGraph.d.ts +18 -0
- 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 +18 -4
- 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} +2 -1
- package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -0
- package/dist/types/src/{functions/research → crud}/graph.d.ts +14 -11
- package/dist/types/src/crud/graph.d.ts.map +1 -0
- package/dist/types/src/crud/graph.test.d.ts.map +1 -0
- package/dist/types/src/crud/index.d.ts +2 -0
- package/dist/types/src/crud/index.d.ts.map +1 -0
- 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 +81 -8
- package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +142 -136
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +1 -1
- package/dist/types/src/functions/entity-extraction/index.d.ts +144 -139
- package/dist/types/src/functions/entity-extraction/index.d.ts.map +1 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts.map +1 -0
- package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts.map +1 -0
- package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts.map +1 -0
- package/dist/types/src/functions/exa/data/index.d.ts.map +1 -0
- package/dist/types/src/functions/exa/exa.d.ts +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/exa/mock.d.ts +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 +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/sync/sync.d.ts +3 -3
- package/dist/types/src/sync/sync.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/plugins.d.ts +19 -0
- package/dist/types/src/testing/plugins.d.ts.map +1 -0
- 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 +2 -0
- package/dist/types/src/toolkits/index.d.ts.map +1 -0
- 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 +49 -38
- 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} +25 -37
- package/src/blueprints/design/blueprint.ts +46 -0
- 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 +10 -14
- package/src/{functions/discord → blueprints/discord/functions}/fetch-messages.ts +11 -10
- package/src/blueprints/discord/functions/index.ts +9 -0
- package/src/blueprints/discord/index.ts +1 -3
- package/src/{functions/github → blueprints/github/functions}/fetch-prs.ts +3 -2
- package/src/blueprints/github/functions/index.ts +9 -0
- package/src/blueprints/github/index.ts +3 -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 +17 -15
- 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 +9 -7
- 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} +25 -32
- package/src/blueprints/{planning/planning-blueprint.ts → planning-old/blueprint.ts} +24 -12
- package/src/blueprints/planning-old/functions/index.ts +11 -0
- package/src/{functions/tasks → blueprints/planning-old/functions}/read.ts +6 -6
- package/src/{functions/tasks → blueprints/planning-old/functions}/update.ts +6 -6
- package/src/blueprints/planning-old/index.ts +5 -0
- package/src/blueprints/project/blueprint.test.ts +579 -0
- 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/blueprint.ts +65 -0
- package/src/blueprints/research/functions/document-create.ts +73 -0
- package/src/blueprints/research/functions/index.ts +11 -0
- package/src/{functions/research/instructions-research.tpl → blueprints/research/functions/research-instructions.tpl} +14 -6
- package/src/blueprints/research/functions/research.conversations.json +1 -0
- package/src/blueprints/research/functions/research.test.ts +149 -0
- package/src/blueprints/research/functions/research.ts +175 -0
- package/src/blueprints/research/index.ts +2 -3
- package/src/blueprints/research/types/ResearchGraph.ts +49 -0
- package/src/blueprints/research/types/index.ts +32 -0
- package/src/blueprints/testing.ts +36 -5
- package/src/blueprints/websearch/blueprint.ts +32 -0
- package/src/blueprints/websearch/index.ts +2 -4
- package/src/crud/graph.test.ts +46 -0
- package/src/{functions/research → crud}/graph.ts +32 -40
- package/src/crud/index.ts +5 -0
- package/src/functions/READ_THIS.md +5 -0
- package/src/functions/agent/index.ts +4 -6
- package/src/functions/agent/prompt.ts +32 -25
- package/src/functions/entity-extraction/entity-extraction.conversations.json +1 -1
- package/src/functions/entity-extraction/entity-extraction.test.ts +17 -43
- package/src/functions/entity-extraction/entity-extraction.ts +54 -36
- 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/exa/mock.ts +1 -1
- package/src/functions/index.ts +1 -5
- package/src/index.ts +3 -1
- package/src/sync/sync.ts +38 -30
- package/src/testing/index.ts +2 -1
- package/src/testing/plugins.tsx +72 -0
- package/src/toolkits/WebToolkit.ts +33 -0
- package/src/toolkits/index.ts +5 -0
- 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/node-esm/index.mjs +0 -2483
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/types/src/blueprints/design/design-blueprint.d.ts +0 -4
- 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 -4
- 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 -4
- 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 -4
- 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 -12
- 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 +0 -6
- 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 +0 -9
- 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/create-document.d.ts.map +0 -1
- package/dist/types/src/functions/research/graph.d.ts.map +0 -1
- package/dist/types/src/functions/research/graph.test.d.ts.map +0 -1
- package/dist/types/src/functions/research/index.d.ts +0 -19
- package/dist/types/src/functions/research/index.d.ts.map +0 -1
- package/dist/types/src/functions/research/research-graph.d.ts +0 -18
- 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 -384
- 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/plugins.d.ts +0 -19
- package/dist/types/src/plugins.d.ts.map +0 -1
- package/dist/types/src/testing/data/exa-search-1748337321991.d.ts.map +0 -1
- package/dist/types/src/testing/data/exa-search-1748337331526.d.ts.map +0 -1
- package/dist/types/src/testing/data/exa-search-1748337344119.d.ts.map +0 -1
- package/dist/types/src/testing/data/index.d.ts.map +0 -1
- package/src/blueprints/design/design-blueprint.ts +0 -33
- package/src/blueprints/discord/discord-blueprint.ts +0 -34
- package/src/blueprints/linear/linear-blueprint.ts +0 -35
- package/src/blueprints/research/research-blueprint.ts +0 -45
- package/src/blueprints/websearch/websearch-blueprint.ts +0 -20
- package/src/experimental/feed.test.ts +0 -108
- package/src/functions/discord/index.ts +0 -9
- package/src/functions/document/index.ts +0 -11
- package/src/functions/document/read.ts +0 -29
- package/src/functions/linear/index.ts +0 -9
- package/src/functions/linear/linear.test.ts +0 -86
- package/src/functions/research/create-document.ts +0 -69
- package/src/functions/research/graph.test.ts +0 -69
- package/src/functions/research/index.ts +0 -15
- package/src/functions/research/research-graph.ts +0 -47
- package/src/functions/research/research.conversations.json +0 -10714
- package/src/functions/research/research.test.ts +0 -240
- package/src/functions/research/research.ts +0 -155
- package/src/functions/research/types.ts +0 -24
- package/src/functions/tasks/index.ts +0 -11
- package/src/plugins.tsx +0 -68
- /package/dist/types/src/{functions/discord → blueprints/discord/functions}/fetch-messages.test.d.ts +0 -0
- /package/dist/types/src/{functions/linear → blueprints/linear/functions}/linear.test.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/dist/types/src/{functions/research → crud}/graph.test.d.ts +0 -0
- /package/dist/types/src/{testing → functions/exa}/data/exa-search-1748337321991.d.ts +0 -0
- /package/dist/types/src/{testing → functions/exa}/data/exa-search-1748337331526.d.ts +0 -0
- /package/dist/types/src/{testing → functions/exa}/data/exa-search-1748337344119.d.ts +0 -0
- /package/dist/types/src/{testing → functions/exa}/data/index.d.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/blueprints/websearch/{websearch-toolkit.ts → toolkit.ts} +0 -0
- /package/src/{testing → functions/exa}/data/exa-search-1748337321991.ts +0 -0
- /package/src/{testing → functions/exa}/data/exa-search-1748337331526.ts +0 -0
- /package/src/{testing → functions/exa}/data/exa-search-1748337344119.ts +0 -0
- /package/src/{testing → functions/exa}/data/index.ts +0 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Schema from 'effect/Schema';
|
|
7
|
+
|
|
8
|
+
import { AiContextService } from '@dxos/assistant';
|
|
9
|
+
import { Database, Obj } from '@dxos/echo';
|
|
10
|
+
import { defineFunction } from '@dxos/functions';
|
|
11
|
+
import { trim } from '@dxos/util';
|
|
12
|
+
|
|
13
|
+
import { Plan, Project } from '../../../types';
|
|
14
|
+
|
|
15
|
+
const INSTRUCTIONS = trim`
|
|
16
|
+
TASK MANAGEMENT TOOL - USAGE GUIDELINES
|
|
17
|
+
|
|
18
|
+
This tool maintains an organized task list during work sessions to track progress, break down objectives, and ensure thoroughness. After creating initial tasks, update them silently without announcing changes to the user.
|
|
19
|
+
|
|
20
|
+
=== CORE USAGE PRINCIPLES ===
|
|
21
|
+
|
|
22
|
+
Create and manage tasks for: multi-step objectives requiring 3+ distinct actions, complex projects needing careful sequencing, user requests for task organization, multiple deliverables provided together, new instructions (capture as tasks immediately with new IDs), completed work (mark done and add follow-ups), and active work (mark as 'in-progress', limit one at a time).
|
|
23
|
+
|
|
24
|
+
Skip task management for: single straightforward actions, simple requests achievable in 1-2 steps, informational queries, quick lookups or clarifications, and avoid creating verification tasks unless requested.
|
|
25
|
+
|
|
26
|
+
=== TOOL SPECIFICATION ===
|
|
27
|
+
|
|
28
|
+
update-tasks requires an array of task objects. Each task object contains:
|
|
29
|
+
- id (string, required): unique identifier like "task_1" or "research_sources"
|
|
30
|
+
- title (string, optional): update to clarify or refine task description
|
|
31
|
+
- status (string, optional): 'todo' | 'in-progress' | 'done'
|
|
32
|
+
|
|
33
|
+
Task status meanings: 'todo' means not yet started, 'in-progress' means currently being worked on, 'done' means completed successfully.
|
|
34
|
+
|
|
35
|
+
=== OPERATIONAL GUIDELINES ===
|
|
36
|
+
|
|
37
|
+
Update tasks in real-time as work progresses. Mark tasks 'done' immediately upon completion. Maintain only ONE task with 'in-progress' status at a time. Complete current tasks before starting new ones. Use specific, actionable task titles. Break complex work into manageable logical pieces. Batch task updates with other actions when possible for efficiency.
|
|
38
|
+
|
|
39
|
+
=== USAGE EXAMPLES ===
|
|
40
|
+
|
|
41
|
+
<example type="research_project">
|
|
42
|
+
<user_message>I need to research sustainable packaging options and write a report comparing costs and environmental impact.</user_message>
|
|
43
|
+
<assistant_action>
|
|
44
|
+
Creates tasks:
|
|
45
|
+
1. {id: "research_materials", title: "Research sustainable packaging materials", status: "in-progress"}
|
|
46
|
+
2. {id: "compare_costs", title: "Compile cost comparison data", status: "todo"}
|
|
47
|
+
3. {id: "assess_impact", title: "Evaluate environmental impact metrics", status: "todo"}
|
|
48
|
+
4. {id: "draft_report", title: "Write comparative analysis report", status: "todo"}
|
|
49
|
+
|
|
50
|
+
Begins research work immediately in same response.
|
|
51
|
+
</assistant_action>
|
|
52
|
+
<reasoning>Multi-phase project requiring systematic tracking across research, analysis, and writing stages.</reasoning>
|
|
53
|
+
</example>
|
|
54
|
+
|
|
55
|
+
<example type="event_planning">
|
|
56
|
+
<user_message>Help me plan a team retreat - venue, agenda, catering, and send invitations.</user_message>
|
|
57
|
+
<assistant_action>
|
|
58
|
+
Creates tasks:
|
|
59
|
+
1. {id: "venue_options", title: "Research and recommend venues", status: "in-progress"}
|
|
60
|
+
2. {id: "draft_agenda", title: "Create retreat agenda", status: "todo"}
|
|
61
|
+
3. {id: "arrange_catering", title: "Coordinate catering options", status: "todo"}
|
|
62
|
+
4. {id: "send_invites", title: "Draft and send invitations", status: "todo"}
|
|
63
|
+
</assistant_action>
|
|
64
|
+
<reasoning>Multiple distinct deliverables with dependencies requiring organized tracking.</reasoning>
|
|
65
|
+
</example>
|
|
66
|
+
|
|
67
|
+
<example type="document_analysis">
|
|
68
|
+
<user_message>Review this 30-page contract for key terms, risks, and negotiation points.</user_message>
|
|
69
|
+
<assistant_action>
|
|
70
|
+
Creates tasks:
|
|
71
|
+
1. {id: "extract_key_terms", title: "Identify key contractual terms", status: "in-progress"}
|
|
72
|
+
2. {id: "flag_risks", title: "Flag potential risks and liabilities", status: "todo"}
|
|
73
|
+
3. {id: "negotiation_points", title: "Compile negotiation recommendations", status: "todo"}
|
|
74
|
+
4. {id: "summary_doc", title: "Prepare executive summary", status: "todo"}
|
|
75
|
+
</assistant_action>
|
|
76
|
+
<reasoning>Substantial analysis work requiring methodical breakdown and systematic review.</reasoning>
|
|
77
|
+
</example>
|
|
78
|
+
|
|
79
|
+
<example type="multiple_deliverables">
|
|
80
|
+
<user_message>I need: 1) competitor analysis for three companies, 2) SWOT analysis, 3) market positioning recommendations.</user_message>
|
|
81
|
+
<assistant_action>
|
|
82
|
+
Creates tasks:
|
|
83
|
+
1. {id: "competitor_research", title: "Research three competitor companies", status: "in-progress"}
|
|
84
|
+
2. {id: "swot_analysis", title: "Develop SWOT analysis", status: "todo"}
|
|
85
|
+
3. {id: "positioning_recs", title: "Create market positioning recommendations", status: "todo"}
|
|
86
|
+
</assistant_action>
|
|
87
|
+
<reasoning>User provided numbered list of distinct deliverables requiring separate effort.</reasoning>
|
|
88
|
+
</example>
|
|
89
|
+
|
|
90
|
+
<example type="skip_simple_question">
|
|
91
|
+
<user_message>What's the difference between renewable and sustainable energy?</user_message>
|
|
92
|
+
<assistant_action>Provides explanation directly without creating tasks.</assistant_action>
|
|
93
|
+
<reasoning>Informational request with no actionable work to complete or track.</reasoning>
|
|
94
|
+
</example>
|
|
95
|
+
|
|
96
|
+
<example type="skip_quick_lookup">
|
|
97
|
+
<user_message>Find the population of Tokyo.</user_message>
|
|
98
|
+
<assistant_action>Searches and provides answer without task tracking.</assistant_action>
|
|
99
|
+
<reasoning>Single straightforward lookup completable immediately.</reasoning>
|
|
100
|
+
</example>
|
|
101
|
+
|
|
102
|
+
<example type="skip_trivial_task">
|
|
103
|
+
<user_message>Summarize this 2-paragraph email.</user_message>
|
|
104
|
+
<assistant_action>Provides summary directly without creating tasks.</assistant_action>
|
|
105
|
+
<reasoning>Single simple action requiring no breakdown or progress tracking.</reasoning>
|
|
106
|
+
</example>
|
|
107
|
+
|
|
108
|
+
<example type="skip_single_action">
|
|
109
|
+
<user_message>Check if my flight is on time.</user_message>
|
|
110
|
+
<assistant_action>Performs lookup and reports status without task management.</assistant_action>
|
|
111
|
+
<reasoning>One-step action with immediate completion, no organizational benefit from tasks.</reasoning>
|
|
112
|
+
</example>
|
|
113
|
+
|
|
114
|
+
=== BEST PRACTICES ===
|
|
115
|
+
|
|
116
|
+
For task creation: use descriptive unique IDs reflecting the work, start first task as 'in-progress', batch initial creation with beginning work. For progress tracking: update status immediately upon completion, keep only one 'in-progress' task unless parallel work is natural, add follow-up tasks as they emerge. For task breakdown: aim for reasonably-scoped tasks, group related small actions into logical units, split tasks requiring different approaches.
|
|
117
|
+
|
|
118
|
+
When uncertain whether to use task management, err on the side of creating tasks. Proactive organization demonstrates thoroughness and ensures comprehensive work completion.
|
|
119
|
+
`;
|
|
120
|
+
|
|
121
|
+
const TaskProps = Schema.Struct({
|
|
122
|
+
id: Plan.TaskId,
|
|
123
|
+
title: Schema.String,
|
|
124
|
+
status: Schema.Literal('todo', 'in-progress', 'done'),
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
export default defineFunction({
|
|
128
|
+
key: 'dxos.org/function/planning/update-tasks',
|
|
129
|
+
name: 'Update tasks',
|
|
130
|
+
description: INSTRUCTIONS,
|
|
131
|
+
inputSchema: Schema.Struct({
|
|
132
|
+
tasks: Schema.Array(TaskProps),
|
|
133
|
+
}),
|
|
134
|
+
handler: Effect.fn(function* ({ data: { tasks: newTasks } }) {
|
|
135
|
+
const project = yield* Project.getFromChatContext;
|
|
136
|
+
const plan = yield* Database.load(project.plan);
|
|
137
|
+
|
|
138
|
+
Obj.change(plan, (plan) => {
|
|
139
|
+
for (const task of newTasks) {
|
|
140
|
+
const existingTask = plan.tasks.find((t) => t.id === task.id);
|
|
141
|
+
if (existingTask) {
|
|
142
|
+
existingTask.title = task.title;
|
|
143
|
+
existingTask.status = task.status;
|
|
144
|
+
} else {
|
|
145
|
+
plan.tasks.push({
|
|
146
|
+
id: task.id,
|
|
147
|
+
title: task.title,
|
|
148
|
+
status: task.status,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// console.log('\n====== TASKS ======\n');
|
|
155
|
+
// for (const task of tasks) {
|
|
156
|
+
// console.log(`- **${task.status?.toLocaleUpperCase()}**: ${task.title ?? 'No title'} (id: ${task.id})`);
|
|
157
|
+
// }
|
|
158
|
+
// console.log('\n====== END TASKS ======\n');
|
|
159
|
+
|
|
160
|
+
return trim`
|
|
161
|
+
Tasks updated. Don't forget to mark tasks as done when you're done with them or update their status to 'in-progress' when you start working on them.
|
|
162
|
+
Current plan:
|
|
163
|
+
<plan>
|
|
164
|
+
${Plan.formatPlan(plan)}
|
|
165
|
+
</plan>
|
|
166
|
+
`;
|
|
167
|
+
}, AiContextService.fixFunctionHandlerType),
|
|
168
|
+
});
|
package/src/blueprints/{planning/planning-blueprint.test.ts → planning-old/blueprint.test.ts}
RENAMED
|
@@ -7,51 +7,45 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import * as Layer from 'effect/Layer';
|
|
8
8
|
|
|
9
9
|
import { AiService } 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
|
-
makeToolExecutionServiceFromFunctions,
|
|
15
|
-
makeToolResolverFromFunctions,
|
|
16
|
-
} from '@dxos/assistant';
|
|
12
|
+
import { AiConversation, type ContextBinding, ToolExecutionServices } from '@dxos/assistant';
|
|
17
13
|
import { Blueprint } from '@dxos/blueprints';
|
|
18
14
|
import { Obj, Ref } from '@dxos/echo';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
QueueService,
|
|
26
|
-
TracingService,
|
|
27
|
-
} from '@dxos/functions';
|
|
28
|
-
import { TestDatabaseLayer } from '@dxos/functions/testing';
|
|
15
|
+
import { Database } from '@dxos/echo';
|
|
16
|
+
import { acquireReleaseResource } from '@dxos/effect';
|
|
17
|
+
import { TestHelpers } from '@dxos/effect/testing';
|
|
18
|
+
import { QueueService, TracingService } from '@dxos/functions';
|
|
19
|
+
import { FunctionImplementationResolver } from '@dxos/functions-runtime';
|
|
20
|
+
import { FunctionInvocationServiceLayerTestMocked, TestDatabaseLayer } from '@dxos/functions-runtime/testing';
|
|
29
21
|
import { log } from '@dxos/log';
|
|
30
22
|
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
31
|
-
import {
|
|
23
|
+
import { Text } from '@dxos/schema';
|
|
24
|
+
import { type Message } from '@dxos/types';
|
|
32
25
|
import { trim } from '@dxos/util';
|
|
33
26
|
|
|
34
|
-
import {
|
|
35
|
-
import { type TestStep, runSteps, testToolkit } from '../testing';
|
|
27
|
+
import { type TestStep, runSteps } from '../testing';
|
|
36
28
|
|
|
37
|
-
import
|
|
29
|
+
import PlanningOldBlueprint from './blueprint';
|
|
30
|
+
import { TaskFunctions } from './functions';
|
|
38
31
|
|
|
39
32
|
describe('Planning Blueprint', { timeout: 120_000 }, () => {
|
|
33
|
+
const blueprint = PlanningOldBlueprint.make();
|
|
40
34
|
it.scoped(
|
|
41
35
|
'planning blueprint',
|
|
42
36
|
Effect.fn(
|
|
43
37
|
function* ({ expect }) {
|
|
44
|
-
const queue = yield* QueueService.createQueue<
|
|
45
|
-
const conversation = yield* acquireReleaseResource(() => new AiConversation(queue));
|
|
38
|
+
const queue = yield* QueueService.createQueue<Message.Message | ContextBinding>();
|
|
39
|
+
const conversation = yield* acquireReleaseResource(() => new AiConversation({ queue }));
|
|
46
40
|
|
|
47
|
-
yield*
|
|
41
|
+
yield* Database.add(blueprint);
|
|
48
42
|
yield* Effect.promise(() =>
|
|
49
43
|
conversation.context.bind({
|
|
50
44
|
blueprints: [Ref.make(blueprint)],
|
|
51
45
|
}),
|
|
52
46
|
);
|
|
53
47
|
|
|
54
|
-
const artifact = yield*
|
|
48
|
+
const artifact = yield* Database.add(Markdown.make());
|
|
55
49
|
let prevContent = artifact.content;
|
|
56
50
|
const matchList =
|
|
57
51
|
({ includes = [], excludes = [] }: { includes: RegExp[]; excludes?: RegExp[] }) =>
|
|
@@ -107,22 +101,21 @@ describe('Planning Blueprint', { timeout: 120_000 }, () => {
|
|
|
107
101
|
},
|
|
108
102
|
Effect.provide(
|
|
109
103
|
Layer.mergeAll(
|
|
110
|
-
TestDatabaseLayer({ types: [
|
|
111
|
-
|
|
112
|
-
makeToolExecutionServiceFromFunctions(testToolkit, testToolkit.toLayer({}) as any),
|
|
104
|
+
TestDatabaseLayer({ types: [Text.Text, Markdown.Document, Blueprint.Blueprint] }),
|
|
105
|
+
ToolExecutionServices,
|
|
113
106
|
AiService.model('@anthropic/claude-3-5-sonnet-20241022'),
|
|
114
107
|
).pipe(
|
|
115
108
|
Layer.provideMerge(
|
|
116
|
-
|
|
117
|
-
Layer.provideMerge(ComputeEventLogger.layerFromTracing),
|
|
109
|
+
FunctionInvocationServiceLayerTestMocked({ functions: Object.values(TaskFunctions) }).pipe(
|
|
118
110
|
Layer.provideMerge(TracingService.layerNoop),
|
|
119
111
|
),
|
|
120
112
|
),
|
|
121
|
-
Layer.provideMerge(FunctionImplementationResolver.layerTest({ functions:
|
|
122
|
-
Layer.provideMerge(TestDatabaseLayer({ types: [
|
|
123
|
-
Layer.provideMerge(AiServiceTestingPreset('direct')),
|
|
113
|
+
Layer.provideMerge(FunctionImplementationResolver.layerTest({ functions: Object.values(TaskFunctions) })),
|
|
114
|
+
Layer.provideMerge(TestDatabaseLayer({ types: [Text.Text, Markdown.Document, Blueprint.Blueprint] })),
|
|
115
|
+
Layer.provideMerge(Layer.mergeAll(GenericToolkit.providerEmpty, AiServiceTestingPreset('direct'))),
|
|
124
116
|
),
|
|
125
117
|
),
|
|
118
|
+
TestHelpers.provideTestContext,
|
|
126
119
|
TestHelpers.taggedTest('llm'),
|
|
127
120
|
),
|
|
128
121
|
);
|
|
@@ -3,12 +3,17 @@
|
|
|
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
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import { Ref } from '@dxos/echo';
|
|
9
|
+
import { Text } from '@dxos/schema';
|
|
9
10
|
import { trim } from '@dxos/util';
|
|
10
11
|
|
|
11
|
-
import {
|
|
12
|
+
import { TaskFunctions } from './functions';
|
|
13
|
+
|
|
14
|
+
const BLUEPRINT_KEY = 'dxos.org/blueprint/planning';
|
|
15
|
+
|
|
16
|
+
const functions = Object.values(TaskFunctions);
|
|
12
17
|
|
|
13
18
|
/**
|
|
14
19
|
* Agent prompt instructions for managing hierarchical task lists.
|
|
@@ -85,14 +90,21 @@ const instructions = trim`
|
|
|
85
90
|
- Be precise with task descriptions and hierarchy levels
|
|
86
91
|
`;
|
|
87
92
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
const make = () =>
|
|
94
|
+
Blueprint.make({
|
|
95
|
+
key: BLUEPRINT_KEY,
|
|
96
|
+
name: 'Planning',
|
|
97
|
+
description: 'Plans and tracks complex tasks with artifact management.',
|
|
98
|
+
instructions: {
|
|
99
|
+
source: Ref.make(Text.make(instructions)),
|
|
100
|
+
},
|
|
101
|
+
tools: functions.map((fn) => ToolId.make(fn.key)),
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
const blueprint: AppCapabilities.BlueprintDefinition = {
|
|
105
|
+
key: BLUEPRINT_KEY,
|
|
106
|
+
functions,
|
|
107
|
+
make,
|
|
108
|
+
};
|
|
97
109
|
|
|
98
110
|
export default blueprint;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import * as Schema from 'effect/Schema';
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { Database, Ref } from '@dxos/echo';
|
|
9
|
+
import { defineFunction } from '@dxos/functions';
|
|
10
10
|
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
11
11
|
|
|
12
12
|
export default defineFunction({
|
|
@@ -14,18 +14,18 @@ export default defineFunction({
|
|
|
14
14
|
name: 'Read',
|
|
15
15
|
description: 'Read markdown tasks.',
|
|
16
16
|
inputSchema: Schema.Struct({
|
|
17
|
-
|
|
17
|
+
doc: Ref.Ref(Markdown.Document).annotations({
|
|
18
18
|
description: 'The ID of the document to read.',
|
|
19
19
|
}),
|
|
20
20
|
}),
|
|
21
21
|
outputSchema: Schema.Struct({
|
|
22
22
|
content: Schema.String,
|
|
23
23
|
}),
|
|
24
|
-
handler: Effect.fn(function* ({ data: {
|
|
25
|
-
const
|
|
24
|
+
handler: Effect.fn(function* ({ data: { doc } }) {
|
|
25
|
+
const document = yield* Database.load(doc);
|
|
26
26
|
|
|
27
27
|
// Return content with line numbers prefixed.
|
|
28
|
-
const { content } = yield*
|
|
28
|
+
const { content } = yield* Database.load(document.content);
|
|
29
29
|
const lines = content.split('\n');
|
|
30
30
|
const len = String(lines.length).length;
|
|
31
31
|
const numbered = lines.map((line, i) => `${String(i + 1).padStart(len, ' ')}. ${line}`).join('\n');
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import * as Schema from 'effect/Schema';
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { Database, Ref } from '@dxos/echo';
|
|
9
|
+
import { defineFunction } from '@dxos/functions';
|
|
10
10
|
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
11
11
|
|
|
12
12
|
import { MarkdownTasks, type TaskOperation } from './task-list';
|
|
@@ -16,7 +16,7 @@ export default defineFunction({
|
|
|
16
16
|
name: 'Update markdown',
|
|
17
17
|
description: 'Creates and updates tasks in markdown documents.',
|
|
18
18
|
inputSchema: Schema.Struct({
|
|
19
|
-
|
|
19
|
+
doc: Ref.Ref(Markdown.Document).annotations({
|
|
20
20
|
description: 'The ID of the document to update.',
|
|
21
21
|
}),
|
|
22
22
|
operations: Schema.optional(
|
|
@@ -33,11 +33,11 @@ export default defineFunction({
|
|
|
33
33
|
description: 'Content with line numbers for agent reference.',
|
|
34
34
|
}),
|
|
35
35
|
}),
|
|
36
|
-
handler: Effect.fn(function* ({ data: {
|
|
37
|
-
const
|
|
36
|
+
handler: Effect.fn(function* ({ data: { doc, operations = [] } }) {
|
|
37
|
+
const document = yield* Database.load(doc);
|
|
38
38
|
|
|
39
39
|
// Create task manager and apply operations if provided.
|
|
40
|
-
const { content } = yield*
|
|
40
|
+
const { content } = yield* Database.load(document.content);
|
|
41
41
|
const taskManager = new MarkdownTasks(content);
|
|
42
42
|
if (operations.length > 0) {
|
|
43
43
|
taskManager.applyOperations(operations as TaskOperation[]);
|