@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,579 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, expect, it } from '@effect/vitest';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Exit from 'effect/Exit';
|
|
8
|
+
|
|
9
|
+
import { MemoizedAiService } from '@dxos/ai/testing';
|
|
10
|
+
import { AiConversation } from '@dxos/assistant';
|
|
11
|
+
import { AssistantTestLayerWithTriggers } from '@dxos/assistant/testing';
|
|
12
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
13
|
+
import { SpaceProperties } from '@dxos/client-protocol';
|
|
14
|
+
import { Database, Obj, Ref } from '@dxos/echo';
|
|
15
|
+
import { Collection } from '@dxos/echo';
|
|
16
|
+
import { acquireReleaseResource } from '@dxos/effect';
|
|
17
|
+
import { TestHelpers } from '@dxos/effect/testing';
|
|
18
|
+
import { FunctionDefinition, QueueService, Trigger } from '@dxos/functions';
|
|
19
|
+
import { TriggerDispatcher } from '@dxos/functions-runtime';
|
|
20
|
+
import { invariant } from '@dxos/invariant';
|
|
21
|
+
import { ObjectId } from '@dxos/keys';
|
|
22
|
+
import { MarkdownBlueprint } from '@dxos/plugin-markdown/blueprints';
|
|
23
|
+
import { WithProperties } from '@dxos/plugin-markdown/testing';
|
|
24
|
+
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
25
|
+
import { Text } from '@dxos/schema';
|
|
26
|
+
import { Message } from '@dxos/types';
|
|
27
|
+
import { trim } from '@dxos/util';
|
|
28
|
+
|
|
29
|
+
import { Chat, Plan, Project } from '../../types';
|
|
30
|
+
import { PlanningBlueprint } from '../planning';
|
|
31
|
+
|
|
32
|
+
import ProjectBlueprintDef from './blueprint';
|
|
33
|
+
import { ProjectFunctions } from './functions';
|
|
34
|
+
|
|
35
|
+
ObjectId.dangerouslyDisableRandomness();
|
|
36
|
+
|
|
37
|
+
const TestLayer = AssistantTestLayerWithTriggers({
|
|
38
|
+
aiServicePreset: 'edge-remote',
|
|
39
|
+
functions: [...Object.values(ProjectFunctions), ...MarkdownBlueprint.functions],
|
|
40
|
+
types: [
|
|
41
|
+
Project.Project,
|
|
42
|
+
Plan.Plan,
|
|
43
|
+
Chat.CompanionTo,
|
|
44
|
+
Chat.Chat,
|
|
45
|
+
SpaceProperties,
|
|
46
|
+
Blueprint.Blueprint,
|
|
47
|
+
Trigger.Trigger,
|
|
48
|
+
Text.Text,
|
|
49
|
+
Markdown.Document,
|
|
50
|
+
Collection.Collection,
|
|
51
|
+
],
|
|
52
|
+
tracing: 'pretty',
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const SYSTEM = trim`
|
|
56
|
+
You are a helpful assistant that can help with tasks in the outside world.
|
|
57
|
+
Be transparent about what you are doing and what you are not doing.
|
|
58
|
+
If you do not have tools to complete the task, inform the user.
|
|
59
|
+
DO NOT PRETEND TO DO SOMETHING YOU CAN'T DO.
|
|
60
|
+
`;
|
|
61
|
+
|
|
62
|
+
describe.runIf(TestHelpers.tagEnabled('flaky'))('Project', () => {
|
|
63
|
+
const blueprint = ProjectBlueprintDef.make();
|
|
64
|
+
it.scoped(
|
|
65
|
+
'shopping list',
|
|
66
|
+
Effect.fnUntraced(
|
|
67
|
+
function* (_) {
|
|
68
|
+
const project = yield* Database.add(
|
|
69
|
+
yield* Project.makeInitialized(
|
|
70
|
+
{
|
|
71
|
+
name: 'Shopping list',
|
|
72
|
+
spec: 'Keep a shopping list of items to buy.',
|
|
73
|
+
blueprints: [Ref.make(MarkdownBlueprint.make())],
|
|
74
|
+
},
|
|
75
|
+
blueprint,
|
|
76
|
+
),
|
|
77
|
+
);
|
|
78
|
+
const chatQueue = project.chat?.target?.queue?.target as any;
|
|
79
|
+
invariant(chatQueue, 'Project chat queue not found.');
|
|
80
|
+
yield* Database.flush({ indexes: true });
|
|
81
|
+
const conversation = yield* acquireReleaseResource(() => new AiConversation({ queue: chatQueue }));
|
|
82
|
+
yield* Effect.promise(() => conversation.context.open());
|
|
83
|
+
|
|
84
|
+
yield* conversation.createRequest({
|
|
85
|
+
system: SYSTEM,
|
|
86
|
+
prompt: `List ingredients for a scrambled eggs on a toast breakfast.`,
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
console.log(yield* Effect.promise(() => dumpProject(project)));
|
|
90
|
+
},
|
|
91
|
+
Effect.provide(TestLayer),
|
|
92
|
+
TestHelpers.provideTestContext,
|
|
93
|
+
),
|
|
94
|
+
MemoizedAiService.isGenerationEnabled() ? 240_000 : 30_000,
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
it.scoped(
|
|
98
|
+
'expense tracking list',
|
|
99
|
+
Effect.fnUntraced(
|
|
100
|
+
function* (_) {
|
|
101
|
+
const project = yield* Database.add(
|
|
102
|
+
yield* Project.makeInitialized(
|
|
103
|
+
{
|
|
104
|
+
name: 'Expense tracking',
|
|
105
|
+
spec: trim`
|
|
106
|
+
Keep a list of expenses in a markdown document (create artifact "Expenses").
|
|
107
|
+
Process incoming emails, add the relevant ones to the list.
|
|
108
|
+
|
|
109
|
+
Format:
|
|
110
|
+
|
|
111
|
+
## Expenses
|
|
112
|
+
- Flight to London (2026-02-01): £100
|
|
113
|
+
- Hotel in London (2026-02-01): £100
|
|
114
|
+
`,
|
|
115
|
+
blueprints: [Ref.make(MarkdownBlueprint.make())],
|
|
116
|
+
},
|
|
117
|
+
blueprint,
|
|
118
|
+
),
|
|
119
|
+
);
|
|
120
|
+
yield* Database.flush({ indexes: true });
|
|
121
|
+
|
|
122
|
+
const inboxQueue = yield* QueueService.createQueue();
|
|
123
|
+
yield* Database.add(
|
|
124
|
+
Trigger.make({
|
|
125
|
+
enabled: true,
|
|
126
|
+
spec: {
|
|
127
|
+
kind: 'queue',
|
|
128
|
+
queue: inboxQueue.dxn.toString(),
|
|
129
|
+
},
|
|
130
|
+
function: Ref.make(FunctionDefinition.serialize(ProjectFunctions.Agent)),
|
|
131
|
+
input: {
|
|
132
|
+
project: Ref.make(project),
|
|
133
|
+
event: '{{event}}',
|
|
134
|
+
},
|
|
135
|
+
}),
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
yield* QueueService.append(
|
|
139
|
+
inboxQueue,
|
|
140
|
+
TEST_MESSAGES.map((message) => Obj.clone(message)),
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
const dispatcher = yield* TriggerDispatcher;
|
|
144
|
+
const invocations = yield* dispatcher.invokeScheduledTriggers({ kinds: ['queue'], untilExhausted: true });
|
|
145
|
+
expect(invocations.every((invocation) => Exit.isSuccess(invocation.result))).toBe(true);
|
|
146
|
+
|
|
147
|
+
console.log(yield* Effect.promise(() => dumpProject(project)));
|
|
148
|
+
},
|
|
149
|
+
WithProperties,
|
|
150
|
+
Effect.provide(TestLayer),
|
|
151
|
+
TestHelpers.provideTestContext,
|
|
152
|
+
),
|
|
153
|
+
MemoizedAiService.isGenerationEnabled() ? 240_000 : 30_000,
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
it.scoped(
|
|
157
|
+
'planning',
|
|
158
|
+
Effect.fnUntraced(
|
|
159
|
+
function* (_) {
|
|
160
|
+
const project = yield* Database.add(
|
|
161
|
+
yield* Project.makeInitialized(
|
|
162
|
+
{
|
|
163
|
+
name: 'Egg making',
|
|
164
|
+
spec: trim`
|
|
165
|
+
I'm testing how planning (task management) works.
|
|
166
|
+
Create tasks to make scrambled eggs.
|
|
167
|
+
|
|
168
|
+
Then simulate this plan execution in a markdown document.
|
|
169
|
+
The document should reflect the state of all objects involved in the cooking process.
|
|
170
|
+
The document should also have the log of actions taken.
|
|
171
|
+
|
|
172
|
+
Important: simualte actions one by one, in the order they are listed.
|
|
173
|
+
Simlate by updating the local document.
|
|
174
|
+
|
|
175
|
+
<example>
|
|
176
|
+
# State
|
|
177
|
+
|
|
178
|
+
- 2 raw eggs
|
|
179
|
+
- 1 frying pan
|
|
180
|
+
|
|
181
|
+
# Action log
|
|
182
|
+
|
|
183
|
+
- Taken 2 raw eggs out of the fridge.
|
|
184
|
+
</example>
|
|
185
|
+
`,
|
|
186
|
+
blueprints: [Ref.make(MarkdownBlueprint.make()), Ref.make(Obj.clone(PlanningBlueprint.make()))],
|
|
187
|
+
},
|
|
188
|
+
blueprint,
|
|
189
|
+
),
|
|
190
|
+
);
|
|
191
|
+
yield* Database.flush({ indexes: true });
|
|
192
|
+
|
|
193
|
+
const chatQueue = project.chat?.target?.queue?.target as any;
|
|
194
|
+
invariant(chatQueue, 'Project chat queue not found.');
|
|
195
|
+
yield* Database.flush({ indexes: true });
|
|
196
|
+
const conversation = yield* acquireReleaseResource(() => new AiConversation({ queue: chatQueue }));
|
|
197
|
+
yield* Effect.promise(() => conversation.context.open());
|
|
198
|
+
|
|
199
|
+
yield* conversation.createRequest({
|
|
200
|
+
system: SYSTEM,
|
|
201
|
+
prompt: `Go`,
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
console.log(yield* Effect.promise(() => dumpProject(project)));
|
|
205
|
+
},
|
|
206
|
+
WithProperties,
|
|
207
|
+
Effect.provide(TestLayer),
|
|
208
|
+
TestHelpers.provideTestContext,
|
|
209
|
+
),
|
|
210
|
+
MemoizedAiService.isGenerationEnabled() ? 240_000 : 30_000,
|
|
211
|
+
);
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
const dumpProject = async (project: Project.Project) => {
|
|
215
|
+
let text = '';
|
|
216
|
+
text += `============== Project: ${project.name} ==============\n\n`;
|
|
217
|
+
text += `============== Spec ==============\n\n`;
|
|
218
|
+
text += `${await project.spec.load().then((_) => _.content)}\n`;
|
|
219
|
+
text += `============== Plan ==============\n\n`;
|
|
220
|
+
text += `${await project.plan?.load().then((_) => Plan.formatPlan(_))}\n`;
|
|
221
|
+
text += `============== Artifacts ==============\n\n`;
|
|
222
|
+
for (const artifact of project.artifacts) {
|
|
223
|
+
const data = await artifact.data.load();
|
|
224
|
+
text += `============== ${artifact.name} (${Obj.getTypename(data)}) ==============\n`;
|
|
225
|
+
if (Obj.instanceOf(Markdown.Document, data)) {
|
|
226
|
+
text += `# ${Obj.getLabel(data)}\n\n${await data.content.load().then((_) => _.content)}\n`;
|
|
227
|
+
} else {
|
|
228
|
+
text += ` ${JSON.stringify(data, null, 2)}\n`;
|
|
229
|
+
}
|
|
230
|
+
text += '\n';
|
|
231
|
+
}
|
|
232
|
+
return text;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
const TEST_MESSAGES = [
|
|
236
|
+
// Expense-related emails
|
|
237
|
+
Obj.make(Message.Message, {
|
|
238
|
+
created: new Date('2026-01-28T10:15:00Z').toISOString(),
|
|
239
|
+
sender: { email: 'receipts@britishairways.com' },
|
|
240
|
+
blocks: [
|
|
241
|
+
{
|
|
242
|
+
_tag: 'text',
|
|
243
|
+
text: trim`
|
|
244
|
+
From: receipts@britishairways.com
|
|
245
|
+
Subject: Your British Airways booking confirmation - BA287
|
|
246
|
+
|
|
247
|
+
Dear Mr. Smith,
|
|
248
|
+
|
|
249
|
+
Thank you for booking with British Airways. Your flight reservation is confirmed.
|
|
250
|
+
|
|
251
|
+
BOOKING REFERENCE: XK7M2P
|
|
252
|
+
|
|
253
|
+
FLIGHT DETAILS
|
|
254
|
+
─────────────────────────────────────
|
|
255
|
+
Flight: BA287
|
|
256
|
+
Date: 15 February 2026
|
|
257
|
+
Route: San Francisco (SFO) → London Heathrow (LHR)
|
|
258
|
+
Departure: 17:45 PST
|
|
259
|
+
Arrival: 12:15 GMT (+1 day)
|
|
260
|
+
Class: Economy
|
|
261
|
+
|
|
262
|
+
PASSENGER
|
|
263
|
+
─────────────────────────────────────
|
|
264
|
+
John Smith
|
|
265
|
+
|
|
266
|
+
PAYMENT SUMMARY
|
|
267
|
+
─────────────────────────────────────
|
|
268
|
+
Base fare: £485.00
|
|
269
|
+
Taxes and fees: £127.50
|
|
270
|
+
─────────────────────────────────────
|
|
271
|
+
TOTAL PAID: £612.50
|
|
272
|
+
|
|
273
|
+
Payment method: Visa ending in 4521
|
|
274
|
+
Transaction date: 28 January 2026
|
|
275
|
+
|
|
276
|
+
Please keep this email for your records.
|
|
277
|
+
|
|
278
|
+
Kind regards,
|
|
279
|
+
British Airways
|
|
280
|
+
`,
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
}),
|
|
284
|
+
Obj.make(Message.Message, {
|
|
285
|
+
created: new Date('2026-01-29T14:30:00Z').toISOString(),
|
|
286
|
+
sender: { email: 'noreply@booking.com' },
|
|
287
|
+
blocks: [
|
|
288
|
+
{
|
|
289
|
+
_tag: 'text',
|
|
290
|
+
text: trim`
|
|
291
|
+
From: noreply@booking.com
|
|
292
|
+
Subject: Booking Confirmation - The Savoy London
|
|
293
|
+
|
|
294
|
+
Booking Confirmation
|
|
295
|
+
|
|
296
|
+
Dear John Smith,
|
|
297
|
+
|
|
298
|
+
Your booking is confirmed!
|
|
299
|
+
|
|
300
|
+
Hotel: The Savoy London
|
|
301
|
+
Address: Strand, London WC2R 0EU, United Kingdom
|
|
302
|
+
Check-in: 15 February 2026, 15:00
|
|
303
|
+
Check-out: 18 February 2026, 11:00
|
|
304
|
+
Guests: 1 adult
|
|
305
|
+
Room: Deluxe King Room
|
|
306
|
+
|
|
307
|
+
Total amount: £450.00
|
|
308
|
+
Payment: Paid via credit card ending in 4521
|
|
309
|
+
Booking reference: BK-789456123
|
|
310
|
+
|
|
311
|
+
We look forward to welcoming you!
|
|
312
|
+
|
|
313
|
+
Best regards,
|
|
314
|
+
Booking.com
|
|
315
|
+
`,
|
|
316
|
+
},
|
|
317
|
+
],
|
|
318
|
+
}),
|
|
319
|
+
Obj.make(Message.Message, {
|
|
320
|
+
created: new Date('2026-02-15T19:45:00Z').toISOString(),
|
|
321
|
+
sender: { email: 'receipt@uber.com' },
|
|
322
|
+
blocks: [
|
|
323
|
+
{
|
|
324
|
+
_tag: 'text',
|
|
325
|
+
text: trim`
|
|
326
|
+
From: receipt@uber.com
|
|
327
|
+
Subject: Your trip receipt
|
|
328
|
+
|
|
329
|
+
Trip Receipt
|
|
330
|
+
|
|
331
|
+
Trip Date: February 15, 2026 at 7:30 PM
|
|
332
|
+
Trip ID: 1A2B3C4D5E
|
|
333
|
+
|
|
334
|
+
Route: London Heathrow Airport → The Savoy London
|
|
335
|
+
Distance: 18.2 miles
|
|
336
|
+
Duration: 45 minutes
|
|
337
|
+
|
|
338
|
+
Fare breakdown:
|
|
339
|
+
Base fare: £12.50
|
|
340
|
+
Distance: £18.20
|
|
341
|
+
Time: £11.25
|
|
342
|
+
Booking fee: £2.50
|
|
343
|
+
─────────────────────────────────────
|
|
344
|
+
Subtotal: £44.45
|
|
345
|
+
VAT (20%): £8.89
|
|
346
|
+
─────────────────────────────────────
|
|
347
|
+
Total: £53.34
|
|
348
|
+
|
|
349
|
+
Payment method: Visa •••• 4521
|
|
350
|
+
|
|
351
|
+
Thank you for riding with Uber!
|
|
352
|
+
`,
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
}),
|
|
356
|
+
Obj.make(Message.Message, {
|
|
357
|
+
created: new Date('2026-02-16T20:15:00Z').toISOString(),
|
|
358
|
+
sender: { email: 'receipts@opentable.com' },
|
|
359
|
+
blocks: [
|
|
360
|
+
{
|
|
361
|
+
_tag: 'text',
|
|
362
|
+
text: trim`
|
|
363
|
+
From: receipts@opentable.com
|
|
364
|
+
Subject: Your receipt from The Ivy
|
|
365
|
+
|
|
366
|
+
Receipt
|
|
367
|
+
|
|
368
|
+
Restaurant: The Ivy
|
|
369
|
+
Address: 1-5 West Street, London WC2H 9NQ
|
|
370
|
+
Date: February 16, 2026
|
|
371
|
+
Time: 8:00 PM
|
|
372
|
+
Table: 12
|
|
373
|
+
Guests: 2
|
|
374
|
+
|
|
375
|
+
Order Summary:
|
|
376
|
+
─────────────────────────────────────
|
|
377
|
+
Starter - Scallops £18.00
|
|
378
|
+
Main - Ribeye Steak £32.00
|
|
379
|
+
Main - Sea Bass £28.00
|
|
380
|
+
Side - Truffle Fries £8.50
|
|
381
|
+
Wine - Chardonnay (bottle) £45.00
|
|
382
|
+
Dessert - Chocolate Soufflé £12.00
|
|
383
|
+
─────────────────────────────────────
|
|
384
|
+
Subtotal: £143.50
|
|
385
|
+
Service charge (12.5%): £17.94
|
|
386
|
+
─────────────────────────────────────
|
|
387
|
+
Total: £161.44
|
|
388
|
+
|
|
389
|
+
Payment: Card ending in 4521
|
|
390
|
+
Reservation ID: OT-987654321
|
|
391
|
+
|
|
392
|
+
Thank you for dining with us!
|
|
393
|
+
`,
|
|
394
|
+
},
|
|
395
|
+
],
|
|
396
|
+
}),
|
|
397
|
+
Obj.make(Message.Message, {
|
|
398
|
+
created: new Date('2026-02-17T09:00:00Z').toISOString(),
|
|
399
|
+
sender: { email: 'receipts@amazon.co.uk' },
|
|
400
|
+
blocks: [
|
|
401
|
+
{
|
|
402
|
+
_tag: 'text',
|
|
403
|
+
text: trim`
|
|
404
|
+
From: receipts@amazon.co.uk
|
|
405
|
+
Subject: Your Amazon.co.uk order #123-4567890-1234567
|
|
406
|
+
|
|
407
|
+
Order Confirmation
|
|
408
|
+
|
|
409
|
+
Hello John Smith,
|
|
410
|
+
|
|
411
|
+
We've received your order and will send a confirmation when it ships.
|
|
412
|
+
|
|
413
|
+
Order #123-4567890-1234567
|
|
414
|
+
Order Date: February 17, 2026
|
|
415
|
+
|
|
416
|
+
Items Ordered:
|
|
417
|
+
─────────────────────────────────────
|
|
418
|
+
1x London Travel Guide 2026 £12.99
|
|
419
|
+
1x Universal Travel Adapter £8.50
|
|
420
|
+
─────────────────────────────────────
|
|
421
|
+
Items: £21.49
|
|
422
|
+
Shipping & Handling: £4.99
|
|
423
|
+
─────────────────────────────────────
|
|
424
|
+
Order Total: £26.48
|
|
425
|
+
|
|
426
|
+
Payment method: Visa ending in 4521
|
|
427
|
+
Shipping to: The Savoy London, Strand, London WC2R 0EU
|
|
428
|
+
|
|
429
|
+
Estimated delivery: February 18, 2026
|
|
430
|
+
|
|
431
|
+
Thank you for your order!
|
|
432
|
+
`,
|
|
433
|
+
},
|
|
434
|
+
],
|
|
435
|
+
}),
|
|
436
|
+
// Unrelated emails
|
|
437
|
+
Obj.make(Message.Message, {
|
|
438
|
+
created: new Date('2026-01-30T08:00:00Z').toISOString(),
|
|
439
|
+
sender: { email: 'newsletter@techcrunch.com' },
|
|
440
|
+
blocks: [
|
|
441
|
+
{
|
|
442
|
+
_tag: 'text',
|
|
443
|
+
text: trim`
|
|
444
|
+
From: newsletter@techcrunch.com
|
|
445
|
+
Subject: Weekly Tech Roundup - AI Breakthroughs & Startup News
|
|
446
|
+
|
|
447
|
+
TechCrunch Weekly Newsletter
|
|
448
|
+
|
|
449
|
+
This week in tech:
|
|
450
|
+
|
|
451
|
+
• OpenAI announces GPT-5 with enhanced reasoning capabilities
|
|
452
|
+
• New quantum computing milestone achieved by IBM
|
|
453
|
+
• 5 startups that raised over $100M this week
|
|
454
|
+
• The future of autonomous vehicles: what's next?
|
|
455
|
+
|
|
456
|
+
Read the full stories: https://techcrunch.com/weekly
|
|
457
|
+
|
|
458
|
+
Unsubscribe | Manage preferences
|
|
459
|
+
`,
|
|
460
|
+
},
|
|
461
|
+
],
|
|
462
|
+
}),
|
|
463
|
+
Obj.make(Message.Message, {
|
|
464
|
+
created: new Date('2026-02-01T12:00:00Z').toISOString(),
|
|
465
|
+
sender: { email: 'sarah.johnson@gmail.com' },
|
|
466
|
+
blocks: [
|
|
467
|
+
{
|
|
468
|
+
_tag: 'text',
|
|
469
|
+
text: trim`
|
|
470
|
+
From: sarah.johnson@gmail.com
|
|
471
|
+
Subject: Re: Coffee next week?
|
|
472
|
+
|
|
473
|
+
Hey John,
|
|
474
|
+
|
|
475
|
+
Sounds great! How about Tuesday at 2pm? The usual place?
|
|
476
|
+
|
|
477
|
+
Let me know if that works for you.
|
|
478
|
+
|
|
479
|
+
Cheers,
|
|
480
|
+
Sarah
|
|
481
|
+
`,
|
|
482
|
+
},
|
|
483
|
+
],
|
|
484
|
+
}),
|
|
485
|
+
Obj.make(Message.Message, {
|
|
486
|
+
created: new Date('2026-02-10T10:30:00Z').toISOString(),
|
|
487
|
+
sender: { email: 'promotions@nike.com' },
|
|
488
|
+
blocks: [
|
|
489
|
+
{
|
|
490
|
+
_tag: 'text',
|
|
491
|
+
text: trim`
|
|
492
|
+
From: promotions@nike.com
|
|
493
|
+
Subject: 🏃♂️ 30% Off Running Shoes - Limited Time!
|
|
494
|
+
|
|
495
|
+
Don't miss out!
|
|
496
|
+
|
|
497
|
+
Get 30% off all running shoes this week only. Use code RUN30 at checkout.
|
|
498
|
+
|
|
499
|
+
Shop now: https://nike.com/sale
|
|
500
|
+
|
|
501
|
+
Valid until February 17, 2026.
|
|
502
|
+
|
|
503
|
+
Unsubscribe | View in browser
|
|
504
|
+
`,
|
|
505
|
+
},
|
|
506
|
+
],
|
|
507
|
+
}),
|
|
508
|
+
Obj.make(Message.Message, {
|
|
509
|
+
created: new Date('2026-02-14T16:20:00Z').toISOString(),
|
|
510
|
+
sender: { email: 'notifications@github.com' },
|
|
511
|
+
blocks: [
|
|
512
|
+
{
|
|
513
|
+
_tag: 'text',
|
|
514
|
+
text: trim`
|
|
515
|
+
From: notifications@github.com
|
|
516
|
+
Subject: [dxos/dxos] New pull request: feat: add expense tracking
|
|
517
|
+
|
|
518
|
+
johnsmith opened a pull request in dxos/dxos
|
|
519
|
+
|
|
520
|
+
Title: feat: add expense tracking
|
|
521
|
+
Branch: feature/expense-tracking → main
|
|
522
|
+
|
|
523
|
+
This PR adds a new expense tracking feature to the assistant toolkit.
|
|
524
|
+
|
|
525
|
+
Review it here: https://github.com/dxos/dxos/pull/1234
|
|
526
|
+
|
|
527
|
+
You're receiving this because you're watching this repository.
|
|
528
|
+
`,
|
|
529
|
+
},
|
|
530
|
+
],
|
|
531
|
+
}),
|
|
532
|
+
Obj.make(Message.Message, {
|
|
533
|
+
created: new Date('2026-02-18T11:00:00Z').toISOString(),
|
|
534
|
+
sender: { email: 'receipts@britishairways.com' },
|
|
535
|
+
blocks: [
|
|
536
|
+
{
|
|
537
|
+
_tag: 'text',
|
|
538
|
+
text: trim`
|
|
539
|
+
From: receipts@britishairways.com
|
|
540
|
+
Subject: Your British Airways booking confirmation - BA288
|
|
541
|
+
|
|
542
|
+
Dear Mr. Smith,
|
|
543
|
+
|
|
544
|
+
Thank you for booking with British Airways. Your return flight reservation is confirmed.
|
|
545
|
+
|
|
546
|
+
BOOKING REFERENCE: YK8N3Q
|
|
547
|
+
|
|
548
|
+
FLIGHT DETAILS
|
|
549
|
+
─────────────────────────────────────
|
|
550
|
+
Flight: BA288
|
|
551
|
+
Date: 20 February 2026
|
|
552
|
+
Route: London Heathrow (LHR) → San Francisco (SFO)
|
|
553
|
+
Departure: 10:30 GMT
|
|
554
|
+
Arrival: 13:15 PST
|
|
555
|
+
Class: Economy
|
|
556
|
+
|
|
557
|
+
PASSENGER
|
|
558
|
+
─────────────────────────────────────
|
|
559
|
+
John Smith
|
|
560
|
+
|
|
561
|
+
PAYMENT SUMMARY
|
|
562
|
+
─────────────────────────────────────
|
|
563
|
+
Base fare: £520.00
|
|
564
|
+
Taxes and fees: £135.00
|
|
565
|
+
─────────────────────────────────────
|
|
566
|
+
TOTAL PAID: £655.00
|
|
567
|
+
|
|
568
|
+
Payment method: Visa ending in 4521
|
|
569
|
+
Transaction date: 18 February 2026
|
|
570
|
+
|
|
571
|
+
Please keep this email for your records.
|
|
572
|
+
|
|
573
|
+
Kind regards,
|
|
574
|
+
British Airways
|
|
575
|
+
`,
|
|
576
|
+
},
|
|
577
|
+
],
|
|
578
|
+
}),
|
|
579
|
+
];
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type AppCapabilities } from '@dxos/app-toolkit';
|
|
6
|
+
import { Blueprint, Template } from '@dxos/blueprints';
|
|
7
|
+
import { trim } from '@dxos/util';
|
|
8
|
+
|
|
9
|
+
import { ProjectFunctions } from './functions';
|
|
10
|
+
|
|
11
|
+
const BLUEPRINT_KEY = 'dxos.org/blueprint/project';
|
|
12
|
+
|
|
13
|
+
const functions = [ProjectFunctions.AddArtifact];
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Creates the Project blueprint. This is a function to avoid circular dependency issues.
|
|
17
|
+
*/
|
|
18
|
+
const make = () =>
|
|
19
|
+
Blueprint.make({
|
|
20
|
+
key: BLUEPRINT_KEY,
|
|
21
|
+
name: 'Project blueprint',
|
|
22
|
+
instructions: Template.make({
|
|
23
|
+
source: trim`
|
|
24
|
+
You work on an project. Each project has a spec - the goal of the project.
|
|
25
|
+
The project plan shows the current progress of the project.
|
|
26
|
+
Project has an number of associated artifacts you can read/write.
|
|
27
|
+
Spec and plan are also artifacts.
|
|
28
|
+
You can edit them if necessary.
|
|
29
|
+
|
|
30
|
+
IMPORTANT: When create a new artifact, always add it to the project using the add-artifact function.
|
|
31
|
+
|
|
32
|
+
{{#with project}}
|
|
33
|
+
<project id="{{id}}" name="{{name}}">
|
|
34
|
+
<spec>
|
|
35
|
+
{{spec}}
|
|
36
|
+
</spec>
|
|
37
|
+
<plan>
|
|
38
|
+
{{plan}}
|
|
39
|
+
</plan>
|
|
40
|
+
|
|
41
|
+
<artifacts>
|
|
42
|
+
{{#each artifacts}}
|
|
43
|
+
<artifact type="{{type}}" dxn="{{dxn}}">
|
|
44
|
+
{{name}}
|
|
45
|
+
</artifact>
|
|
46
|
+
{{/each}}
|
|
47
|
+
</artifacts>
|
|
48
|
+
</project>
|
|
49
|
+
{{/with}}
|
|
50
|
+
`,
|
|
51
|
+
inputs: [
|
|
52
|
+
{
|
|
53
|
+
name: 'project',
|
|
54
|
+
kind: 'function',
|
|
55
|
+
function: 'dxos.org/function/project/get-context',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
}),
|
|
59
|
+
tools: Blueprint.toolDefinitions({ functions }),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const blueprint: AppCapabilities.BlueprintDefinition = {
|
|
63
|
+
key: BLUEPRINT_KEY,
|
|
64
|
+
functions,
|
|
65
|
+
make,
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export default blueprint;
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { AiContextService } from '@dxos/assistant';
|
|
9
|
+
import { Database, Obj, Ref } from '@dxos/echo';
|
|
10
|
+
import { defineFunction } from '@dxos/functions';
|
|
11
|
+
|
|
12
|
+
import { Project } from '../../../types';
|
|
13
|
+
|
|
14
|
+
export default defineFunction({
|
|
15
|
+
key: 'dxos.org/function/project/add-artifact',
|
|
16
|
+
name: 'Add artifact',
|
|
17
|
+
description: 'Adds a new artifact.',
|
|
18
|
+
inputSchema: Schema.Struct({
|
|
19
|
+
name: Schema.String.annotations({
|
|
20
|
+
description: 'The name of the artifact to add.',
|
|
21
|
+
}),
|
|
22
|
+
artifact: Ref.Ref(Obj.Unknown).annotations({
|
|
23
|
+
description: 'The artifact to add. Do NOT guess or try to generate the ID.',
|
|
24
|
+
}),
|
|
25
|
+
}),
|
|
26
|
+
services: [AiContextService],
|
|
27
|
+
handler: Effect.fnUntraced(function* ({ data }) {
|
|
28
|
+
if (!(yield* Database.load(data.artifact))) {
|
|
29
|
+
throw new Error('Artifact not found.');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const project = yield* Project.getFromChatContext;
|
|
33
|
+
|
|
34
|
+
Obj.change(project, (project) => {
|
|
35
|
+
project.artifacts.push({
|
|
36
|
+
name: data.name,
|
|
37
|
+
data: data.artifact,
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}, AiContextService.fixFunctionHandlerType),
|
|
41
|
+
});
|