@dxos/plugin-assistant 0.8.4-main.c1de068 → 0.8.4-main.c4373fc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{TemplateContainer-RPJ2LBOB.mjs → BlueprintContainer-TO35YXHT.mjs} +11 -9
- package/dist/lib/browser/BlueprintContainer-TO35YXHT.mjs.map +7 -0
- package/dist/lib/browser/ChatCompanion-ZIKNUUSU.mjs +127 -0
- package/dist/lib/browser/ChatCompanion-ZIKNUUSU.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-M3IHQLRS.mjs → ChatContainer-MA5BVDGH.mjs} +33 -14
- package/dist/lib/browser/ChatContainer-MA5BVDGH.mjs.map +7 -0
- package/dist/lib/browser/{ChatDialog-X6VN6QZI.mjs → ChatDialog-7OXLIWZI.mjs} +26 -12
- package/dist/lib/browser/ChatDialog-7OXLIWZI.mjs.map +7 -0
- package/dist/lib/browser/{SequenceContainer-3UDVKWPA.mjs → SequenceContainer-2FEWMQGW.mjs} +7 -19
- package/dist/lib/browser/SequenceContainer-2FEWMQGW.mjs.map +7 -0
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs +19 -0
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-VKFRYY2N.mjs +154 -0
- package/dist/lib/browser/app-graph-builder-VKFRYY2N.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-NSJARW5U.mjs +12 -0
- package/dist/lib/browser/blueprint-definition-NSJARW5U.mjs.map +7 -0
- package/dist/lib/browser/chunk-2CE2KPKZ.mjs +175 -0
- package/dist/lib/browser/chunk-2CE2KPKZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-43I2LR6O.mjs +216 -0
- package/dist/lib/browser/chunk-43I2LR6O.mjs.map +7 -0
- package/dist/lib/browser/chunk-5EGXHCAZ.mjs +16 -0
- package/dist/lib/browser/chunk-5EGXHCAZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-5RICKAMN.mjs +18 -0
- package/dist/lib/browser/chunk-5RICKAMN.mjs.map +7 -0
- package/dist/lib/browser/chunk-B2RCJXEO.mjs +202 -0
- package/dist/lib/browser/chunk-B2RCJXEO.mjs.map +7 -0
- package/dist/lib/browser/chunk-BRJMNZOS.mjs +169 -0
- package/dist/lib/browser/chunk-BRJMNZOS.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-P5P7QXBS.mjs +296 -0
- package/dist/lib/browser/chunk-P5P7QXBS.mjs.map +7 -0
- package/dist/lib/browser/chunk-UDH4MR7H.mjs +1744 -0
- package/dist/lib/browser/chunk-UDH4MR7H.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs +18 -0
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +161 -68
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-5LB25ZRN.mjs +112 -0
- package/dist/lib/browser/intent-resolver-5LB25ZRN.mjs.map +7 -0
- package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs +17 -0
- package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-WQZXU624.mjs +107 -0
- package/dist/lib/browser/react-surface-WQZXU624.mjs.map +7 -0
- package/dist/lib/browser/{settings-2DGP3UTS.mjs → settings-4B2NA4CE.mjs} +8 -7
- package/dist/lib/{node-esm/settings-47RYZOU4.mjs.map → browser/settings-4B2NA4CE.mjs.map} +1 -1
- package/dist/lib/browser/state-LXTS54DI.mjs +21 -0
- package/dist/lib/browser/state-LXTS54DI.mjs.map +7 -0
- package/dist/lib/browser/toolkit-NQ2GXCF5.mjs +199 -0
- package/dist/lib/browser/toolkit-NQ2GXCF5.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -4
- package/dist/lib/node-esm/{TemplateContainer-A3NAQCZE.mjs → BlueprintContainer-J664LTU3.mjs} +11 -9
- package/dist/lib/node-esm/BlueprintContainer-J664LTU3.mjs.map +7 -0
- package/dist/lib/node-esm/ChatCompanion-YDXJIVCF.mjs +128 -0
- package/dist/lib/node-esm/ChatCompanion-YDXJIVCF.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-VZT74PO2.mjs → ChatContainer-WLTOQLHH.mjs} +33 -14
- package/dist/lib/node-esm/ChatContainer-WLTOQLHH.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatDialog-RJ6FDX4Q.mjs → ChatDialog-ADKF62SY.mjs} +26 -12
- package/dist/lib/node-esm/ChatDialog-ADKF62SY.mjs.map +7 -0
- package/dist/lib/node-esm/{SequenceContainer-RQQH5XOC.mjs → SequenceContainer-PGGJUQ46.mjs} +7 -19
- package/dist/lib/node-esm/SequenceContainer-PGGJUQ46.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs +20 -0
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-K6AYO4YM.mjs +155 -0
- package/dist/lib/node-esm/app-graph-builder-K6AYO4YM.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-WD2IVMAI.mjs +13 -0
- package/dist/lib/node-esm/blueprint-definition-WD2IVMAI.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-73ABYRYX.mjs +20 -0
- package/dist/lib/node-esm/chunk-73ABYRYX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DBDKOC3I.mjs +203 -0
- package/dist/lib/node-esm/chunk-DBDKOC3I.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DSE2IILK.mjs +217 -0
- package/dist/lib/node-esm/chunk-DSE2IILK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-I7BZMIAG.mjs +170 -0
- package/dist/lib/node-esm/chunk-I7BZMIAG.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-TBQOICXZ.mjs +297 -0
- package/dist/lib/node-esm/chunk-TBQOICXZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-U2NYUS2N.mjs +177 -0
- package/dist/lib/node-esm/chunk-U2NYUS2N.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UPPSDTOJ.mjs +1745 -0
- package/dist/lib/node-esm/chunk-UPPSDTOJ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XQGWSZ4T.mjs +17 -0
- package/dist/lib/node-esm/chunk-XQGWSZ4T.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs +19 -0
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +161 -68
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/intent-resolver-I64MNI4C.mjs +113 -0
- package/dist/lib/node-esm/intent-resolver-I64MNI4C.mjs.map +7 -0
- package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs +18 -0
- package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-TVVVRIR3.mjs +108 -0
- package/dist/lib/node-esm/react-surface-TVVVRIR3.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-47RYZOU4.mjs → settings-7Y3CRASE.mjs} +8 -7
- package/dist/lib/{browser/settings-2DGP3UTS.mjs.map → node-esm/settings-7Y3CRASE.mjs.map} +1 -1
- package/dist/lib/node-esm/state-BO6GUFLB.mjs +22 -0
- package/dist/lib/node-esm/state-BO6GUFLB.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-V57PRJNG.mjs +200 -0
- package/dist/lib/node-esm/toolkit-V57PRJNG.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -4
- package/dist/types/src/AssistantPlugin.d.ts +1 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +4 -0
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +7 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +11 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +4 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +11 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +10 -0
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +4 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit.d.ts +4 -0
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/BlueprintContainer.d.ts +8 -0
- package/dist/types/src/components/BlueprintContainer.d.ts.map +1 -0
- package/dist/types/src/components/Chat/Chat.d.ts +20 -17
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +5 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatCompanion.d.ts +13 -0
- package/dist/types/src/components/ChatCompanion.d.ts.map +1 -0
- package/dist/types/src/components/ChatContainer.d.ts +4 -4
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +7 -0
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -0
- package/dist/types/src/components/ChatProgress/index.d.ts +2 -0
- package/dist/types/src/components/ChatProgress/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +20 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +4 -5
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +6 -4
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +10 -7
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +115 -75
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/reducers.d.ts +40 -0
- package/dist/types/src/components/ChatThread/reducers.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/registry.d.ts +11 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.d.ts +36 -0
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts.map +1 -0
- package/dist/types/src/components/PromptSettings.d.ts.map +1 -1
- package/dist/types/src/components/SequenceContainer.d.ts.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +264 -3
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +2 -6
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +262 -7
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +3 -2
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +259 -2
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts +12 -0
- package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +19 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
- package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +5 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/index.d.ts +2 -0
- package/dist/types/src/components/Toolbar/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts +11 -0
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +4 -9
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +262 -5
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +5 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/functions/analysis.d.ts +5 -0
- package/dist/types/src/functions/analysis.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +4 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/list.d.ts +10 -0
- package/dist/types/src/functions/list.d.ts.map +1 -0
- package/dist/types/src/functions/load.d.ts +8 -0
- package/dist/types/src/functions/load.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +7 -3
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +25 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +8 -21
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +5 -6
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts +4 -0
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
- package/dist/types/src/hooks/useFlush.d.ts +6 -0
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
- package/dist/types/src/hooks/useItemTypes.d.ts +4 -0
- package/dist/types/src/hooks/useItemTypes.d.ts.map +1 -0
- package/dist/types/src/hooks/useOnline.d.ts +3 -0
- package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
- package/dist/types/src/hooks/usePresets.d.ts +7 -0
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/processor/index.d.ts +3 -0
- package/dist/types/src/processor/index.d.ts.map +1 -0
- package/dist/types/src/{hooks → processor}/presets.d.ts +3 -3
- package/dist/types/src/processor/presets.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +74 -0
- package/dist/types/src/processor/processor.d.ts.map +1 -0
- package/dist/types/src/processor/processor.test.d.ts +2 -0
- package/dist/types/src/processor/processor.test.d.ts.map +1 -0
- package/dist/types/src/stories/Chat.stories.d.ts +29 -246
- package/dist/types/src/stories/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/stories/QueryEditor.stories.d.ts +7 -0
- package/dist/types/src/stories/QueryEditor.stories.d.ts.map +1 -0
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +4 -0
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ChessContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ChessContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/CommentsContainer.d.ts +4 -0
- package/dist/types/src/stories/components/CommentsContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/DebugCard.d.ts +8 -0
- package/dist/types/src/stories/components/DebugCard.d.ts.map +1 -0
- package/dist/types/src/stories/components/ExecutionGraphContainer.d.ts +7 -0
- package/dist/types/src/stories/components/ExecutionGraphContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/GraphContainer.d.ts +6 -0
- package/dist/types/src/stories/components/GraphContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/InvocationsContainer.d.ts +4 -0
- package/dist/types/src/stories/components/InvocationsContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/MessageContainer.d.ts +4 -0
- package/dist/types/src/stories/components/MessageContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ProjectContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ProjectContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/PromptContainer.d.ts +6 -0
- package/dist/types/src/stories/components/PromptContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ResearchInputStack.d.ts +4 -0
- package/dist/types/src/stories/components/ResearchInputStack.d.ts.map +1 -0
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts +4 -0
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts.map +1 -0
- package/dist/types/src/stories/components/ScriptContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ScriptContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts +4 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts +3 -0
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/TriggersContainer.d.ts +3 -0
- package/dist/types/src/stories/components/TriggersContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/index.d.ts +18 -0
- package/dist/types/src/stories/components/index.d.ts.map +1 -0
- package/dist/types/src/stories/components/types.d.ts +7 -0
- package/dist/types/src/stories/components/types.d.ts.map +1 -0
- package/dist/types/src/stories/testing/data.d.ts +9 -0
- package/dist/types/src/stories/testing/data.d.ts.map +1 -0
- package/dist/types/src/stories/testing/index.d.ts +3 -0
- package/dist/types/src/stories/testing/index.d.ts.map +1 -0
- package/dist/types/src/stories/testing/schema.d.ts +7 -0
- package/dist/types/src/stories/testing/schema.d.ts.map +1 -0
- package/dist/types/src/stories/testing/testing.d.ts +51 -0
- package/dist/types/src/stories/testing/testing.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-data.d.ts +14 -0
- package/dist/types/src/testing/test-data.d.ts.map +1 -0
- package/dist/types/src/testing/test-functions.d.ts +5 -2
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +7 -0
- package/dist/types/src/testing/test-generator.d.ts.map +1 -0
- package/dist/types/src/testing/test-sequence.d.ts +0 -4
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +29 -22
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +42 -0
- package/dist/types/src/types/Assistant.d.ts.map +1 -0
- package/dist/types/src/types/AssistantAction.d.ts +107 -0
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -0
- package/dist/types/src/types/defs.d.ts +2 -0
- package/dist/types/src/types/defs.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +15 -12
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +113 -92
- package/src/AssistantPlugin.tsx +151 -82
- package/src/capabilities/ai-service.ts +27 -0
- package/src/capabilities/app-graph-builder.ts +47 -137
- package/src/capabilities/blueprint-definition.ts +64 -0
- package/src/capabilities/capabilities.ts +18 -0
- package/src/capabilities/edge-model-resolver.ts +25 -0
- package/src/capabilities/index.ts +9 -0
- package/src/capabilities/intent-resolver.ts +51 -15
- package/src/capabilities/local-model-resolver.ts +30 -0
- package/src/capabilities/react-surface.tsx +17 -64
- package/src/capabilities/state.ts +20 -0
- package/src/capabilities/toolkit.ts +168 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +83 -76
- package/src/components/BlueprintContainer.tsx +24 -0
- package/src/components/Chat/Chat.tsx +180 -176
- package/src/components/Chat/events.ts +7 -0
- package/src/components/ChatCompanion.tsx +114 -0
- package/src/components/ChatContainer.tsx +19 -13
- package/src/components/ChatDialog.tsx +18 -14
- package/src/components/ChatProgress/ChatProgress.tsx +67 -0
- package/src/components/ChatProgress/index.ts +5 -0
- package/src/components/ChatPrompt/ChatActions.tsx +10 -24
- package/src/components/ChatPrompt/ChatOptions.tsx +225 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +1 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +31 -36
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +25 -22
- package/src/components/ChatPrompt/index.ts +1 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +98 -112
- package/src/components/ChatThread/ChatThread.tsx +65 -29
- package/src/components/ChatThread/Link.tsx +26 -0
- package/src/components/ChatThread/reducers.ts +151 -0
- package/src/components/ChatThread/registry.tsx +184 -0
- package/src/components/ChatThread/sync.test.ts +81 -0
- package/src/components/ChatThread/sync.ts +113 -0
- package/src/components/PromptSettings.tsx +1 -0
- package/src/components/SequenceContainer.tsx +29 -30
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +11 -8
- package/src/components/SequenceEditor/SequenceEditor.tsx +3 -3
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +28 -17
- package/src/components/TemplateEditor/TemplateEditor.tsx +21 -52
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +18 -13
- package/src/components/TemplateEditor/TemplateForm.tsx +7 -4
- package/src/components/TemplateEditor/handlebars-extension.ts +165 -0
- package/src/components/ToolBlock/ToolBlock.tsx +152 -0
- package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
- package/src/components/ToolBlock/index.ts +6 -0
- package/src/components/Toolbar/Toolbar.tsx +21 -0
- package/src/components/Toolbar/index.ts +5 -0
- package/src/components/Toolbar/useChatToolbarActions.ts +126 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +13 -22
- package/src/components/Toolbox/Toolbox.tsx +21 -51
- package/src/components/index.ts +4 -5
- package/src/events.ts +2 -2
- package/src/functions/analysis.ts +22 -0
- package/src/functions/index.ts +7 -0
- package/src/functions/list.ts +48 -0
- package/src/functions/load.ts +46 -0
- package/src/hooks/index.ts +7 -4
- package/src/hooks/useBlueprintRegistry.ts +94 -0
- package/src/hooks/useChatProcessor.ts +21 -98
- package/src/hooks/useChatServices.ts +29 -71
- package/src/hooks/useContextBinder.ts +18 -0
- package/src/hooks/useContextObjects.ts +58 -0
- package/src/hooks/useFlush.ts +35 -0
- package/src/hooks/useItemTypes.ts +37 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +44 -0
- package/src/hooks/useReferencesProvider.ts +11 -9
- package/src/meta.ts +4 -6
- package/src/processor/index.ts +6 -0
- package/src/{hooks → processor}/presets.ts +15 -7
- package/src/processor/processor.test.ts +81 -0
- package/src/processor/processor.ts +303 -0
- package/src/queue-logger.ts +10 -10
- package/src/stories/Chat.stories.tsx +818 -314
- package/src/stories/QueryEditor.stories.tsx +114 -0
- package/src/stories/components/BlueprintContainer.tsx +34 -0
- package/src/stories/components/ChatContainer.tsx +74 -0
- package/src/stories/components/ChessContainer.tsx +17 -0
- package/src/stories/components/CommentsContainer.tsx +25 -0
- package/src/stories/components/DebugCard.tsx +61 -0
- package/src/stories/components/ExecutionGraphContainer.tsx +30 -0
- package/src/stories/components/GraphContainer.tsx +106 -0
- package/src/stories/components/InvocationsContainer.tsx +17 -0
- package/src/stories/components/MessageContainer.tsx +22 -0
- package/src/stories/components/ProjectContainer.tsx +17 -0
- package/src/stories/components/PromptContainer.tsx +52 -0
- package/src/stories/components/ResearchInputStack.tsx +30 -0
- package/src/stories/components/ResearchOutputStack.tsx +29 -0
- package/src/stories/components/ScriptContainer.tsx +28 -0
- package/src/stories/components/TasksContainer.tsx +47 -0
- package/src/stories/components/TokenManagerContainer.tsx +14 -0
- package/src/stories/components/TriggersContainer.tsx +12 -0
- package/src/stories/components/index.ts +22 -0
- package/src/stories/components/types.ts +11 -0
- package/src/stories/testing/data.ts +135 -0
- package/src/stories/testing/index.ts +6 -0
- package/src/stories/testing/schema.ts +17 -0
- package/src/stories/testing/testing.tsx +291 -0
- package/src/testing/index.ts +3 -1
- package/src/testing/test-data.ts +248 -0
- package/src/testing/test-functions.ts +8 -3
- package/src/testing/test-generator.ts +261 -0
- package/src/testing/test-sequence.ts +2 -27
- package/src/translations.ts +32 -22
- package/src/types/Assistant.ts +61 -0
- package/src/types/AssistantAction.ts +62 -0
- package/src/types/defs.ts +5 -0
- package/src/types/index.ts +4 -1
- package/src/types/service.ts +2 -2
- package/src/vite-env.d.ts +30 -0
- package/dist/lib/browser/ChatContainer-M3IHQLRS.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-X6VN6QZI.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs.map +0 -7
- package/dist/lib/browser/TemplateContainer-RPJ2LBOB.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-JTXBKE7O.mjs +0 -223
- package/dist/lib/browser/app-graph-builder-JTXBKE7O.mjs.map +0 -7
- package/dist/lib/browser/chunk-AEAEKWOC.mjs +0 -98
- package/dist/lib/browser/chunk-AEAEKWOC.mjs.map +0 -7
- package/dist/lib/browser/chunk-EQDW6BYQ.mjs +0 -108
- package/dist/lib/browser/chunk-EQDW6BYQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-FDCJSQYF.mjs +0 -40
- package/dist/lib/browser/chunk-FDCJSQYF.mjs.map +0 -7
- package/dist/lib/browser/chunk-JQBVLTM5.mjs +0 -158
- package/dist/lib/browser/chunk-JQBVLTM5.mjs.map +0 -7
- package/dist/lib/browser/chunk-OWY4CUQY.mjs +0 -2245
- package/dist/lib/browser/chunk-OWY4CUQY.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs +0 -60
- package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-66VY37YQ.mjs +0 -150
- package/dist/lib/browser/react-surface-66VY37YQ.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-VZT74PO2.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-RJ6FDX4Q.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs.map +0 -7
- package/dist/lib/node-esm/TemplateContainer-A3NAQCZE.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-OWSOXFTD.mjs +0 -224
- package/dist/lib/node-esm/app-graph-builder-OWSOXFTD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2XL6MNPE.mjs +0 -99
- package/dist/lib/node-esm/chunk-2XL6MNPE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BISJDTBK.mjs +0 -159
- package/dist/lib/node-esm/chunk-BISJDTBK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E33DNNDW.mjs +0 -109
- package/dist/lib/node-esm/chunk-E33DNNDW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs +0 -41
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SENTQAEO.mjs +0 -2246
- package/dist/lib/node-esm/chunk-SENTQAEO.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs +0 -61
- package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-RJMRBR2M.mjs +0 -151
- package/dist/lib/node-esm/react-surface-RJMRBR2M.mjs.map +0 -7
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts +0 -9
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -17
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -19
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/reducer.d.ts +0 -12
- package/dist/types/src/components/ChatThread/reducer.d.ts.map +0 -1
- package/dist/types/src/components/TemplateContainer.d.ts +0 -8
- package/dist/types/src/components/TemplateContainer.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.d.ts +0 -86
- package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.test.d.ts +0 -2
- package/dist/types/src/hooks/chat-processor.test.d.ts.map +0 -1
- package/dist/types/src/hooks/presets.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlueprints.d.ts +0 -9
- package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.d.ts +0 -4
- package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
- package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
- package/dist/types/src/parser/index.d.ts +0 -4
- package/dist/types/src/parser/index.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.d.ts +0 -15
- package/dist/types/src/parser/query-parser.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.test.d.ts +0 -2
- package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
- package/dist/types/src/parser/types.d.ts +0 -24
- package/dist/types/src/parser/types.d.ts.map +0 -1
- package/dist/types/src/tools/function.d.ts +0 -5
- package/dist/types/src/tools/function.d.ts.map +0 -1
- package/dist/types/src/tools/index.d.ts +0 -3
- package/dist/types/src/tools/index.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.d.ts +0 -10
- package/dist/types/src/tools/openapi.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.test.d.ts +0 -2
- package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -88
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
- package/src/components/ChatThread/ChatMessage.tsx +0 -268
- package/src/components/ChatThread/ToolBlock.tsx +0 -121
- package/src/components/ChatThread/reducer.ts +0 -52
- package/src/components/TemplateContainer.tsx +0 -24
- package/src/hooks/chat-processor.test.ts +0 -16
- package/src/hooks/chat-processor.ts +0 -314
- package/src/hooks/useBlueprints.ts +0 -57
- package/src/parser/filter-generator.test.ts +0 -32
- package/src/parser/filter-generator.ts +0 -81
- package/src/parser/index.ts +0 -7
- package/src/parser/query-parser.test.ts +0 -139
- package/src/parser/query-parser.ts +0 -199
- package/src/parser/types.ts +0 -34
- package/src/shims.d.ts +0 -8
- package/src/tools/function.ts +0 -46
- package/src/tools/index.ts +0 -6
- package/src/tools/openapi.test.ts +0 -217
- package/src/tools/openapi.ts +0 -338
- package/src/types/schema.ts +0 -95
- package/src/typings.d.ts +0 -9
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Filter, Obj } from '@dxos/echo';
|
|
8
|
+
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
9
|
+
import { createDocAccessor, useQuery } from '@dxos/react-client/echo';
|
|
10
|
+
import { Toolbar, useThemeContext } from '@dxos/react-ui';
|
|
11
|
+
import {
|
|
12
|
+
Editor,
|
|
13
|
+
createBasicExtensions,
|
|
14
|
+
createDataExtensions,
|
|
15
|
+
createMarkdownExtensions,
|
|
16
|
+
createThemeExtensions,
|
|
17
|
+
outliner,
|
|
18
|
+
} from '@dxos/react-ui-editor';
|
|
19
|
+
|
|
20
|
+
import { type ComponentProps } from './types';
|
|
21
|
+
|
|
22
|
+
export const TasksContainer = ({ space }: ComponentProps) => {
|
|
23
|
+
const { themeMode } = useThemeContext();
|
|
24
|
+
const [document] = useQuery(space, Filter.type(Markdown.Document));
|
|
25
|
+
if (!document?.content.target) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<>
|
|
31
|
+
<Toolbar.Root classNames='border-b border-subduedSeparator'>
|
|
32
|
+
<h2>{Obj.getLabel(document)}</h2>
|
|
33
|
+
</Toolbar.Root>
|
|
34
|
+
<Editor
|
|
35
|
+
id={document.id}
|
|
36
|
+
classNames='h-full p-2 overflow-hidden'
|
|
37
|
+
extensions={[
|
|
38
|
+
createDataExtensions({ id: document.id, text: createDocAccessor(document.content.target, ['content']) }),
|
|
39
|
+
createBasicExtensions({ readOnly: false }),
|
|
40
|
+
createMarkdownExtensions(),
|
|
41
|
+
createThemeExtensions({ themeMode }),
|
|
42
|
+
outliner(),
|
|
43
|
+
]}
|
|
44
|
+
/>
|
|
45
|
+
</>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface } from '@dxos/app-framework';
|
|
8
|
+
import { meta } from '@dxos/plugin-token-manager';
|
|
9
|
+
|
|
10
|
+
export const TokenManagerContainer = () => {
|
|
11
|
+
const data = useMemo(() => ({ subject: `${meta.id}/space-settings` }), []);
|
|
12
|
+
|
|
13
|
+
return <Surface role='article' data={data} limit={1} />;
|
|
14
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface } from '@dxos/app-framework';
|
|
8
|
+
import { meta as automationMeta } from '@dxos/plugin-automation';
|
|
9
|
+
|
|
10
|
+
export const TriggersContainer = () => {
|
|
11
|
+
return <Surface role='article' data={{ subject: `${automationMeta.id}/space-settings-automation` }} />;
|
|
12
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
export * from './types';
|
|
6
|
+
|
|
7
|
+
export * from './BlueprintContainer';
|
|
8
|
+
export * from './ChatContainer';
|
|
9
|
+
export * from './ChessContainer';
|
|
10
|
+
export * from './CommentsContainer';
|
|
11
|
+
export * from './ExecutionGraphContainer';
|
|
12
|
+
export * from './GraphContainer';
|
|
13
|
+
export * from './InvocationsContainer';
|
|
14
|
+
export * from './MessageContainer';
|
|
15
|
+
export * from './ProjectContainer';
|
|
16
|
+
export * from './PromptContainer';
|
|
17
|
+
export * from './ResearchInputStack';
|
|
18
|
+
export * from './ResearchOutputStack';
|
|
19
|
+
export * from './ScriptContainer';
|
|
20
|
+
export * from './TasksContainer';
|
|
21
|
+
export * from './TokenManagerContainer';
|
|
22
|
+
export * from './TriggersContainer';
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Live, type Space } from '@dxos/client/echo';
|
|
6
|
+
import { Obj, Relation, type Type } from '@dxos/echo';
|
|
7
|
+
import { invariant } from '@dxos/invariant';
|
|
8
|
+
import { DataType } from '@dxos/schema';
|
|
9
|
+
|
|
10
|
+
export const testTypes: Type.Obj.Any[] = [
|
|
11
|
+
DataType.Organization,
|
|
12
|
+
DataType.Person,
|
|
13
|
+
DataType.Employer,
|
|
14
|
+
DataType.HasConnection,
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
export const organizations: (Type.Properties<DataType.Organization> & { id: string })[] = [
|
|
18
|
+
{ id: 'dxos', name: 'DXOS', website: 'https://dxos.org' },
|
|
19
|
+
{ id: 'socket_supply', name: 'Socket Supply', website: 'https://socketsupply.com' },
|
|
20
|
+
{ id: 'ink_and_switch', name: 'Ink & Switch', website: 'https://inkandswitch.com' },
|
|
21
|
+
{ id: 'effectful', name: 'Effectful', website: 'https://effect.co' },
|
|
22
|
+
{ id: 'blueyard', name: 'Blue Yard', website: 'https://blueyard.com' },
|
|
23
|
+
{ id: 'backed', name: 'Backed', website: 'https://backed.vc' },
|
|
24
|
+
{ id: 'protocol_labs', name: 'Protocol Labs', website: 'https://protocol.ai' },
|
|
25
|
+
{ id: 'newlab', name: 'Newlab', website: 'https://newlab.com' },
|
|
26
|
+
{ id: 'google', name: 'Google', website: 'https://google.com' },
|
|
27
|
+
{ id: 'microsoft', name: 'Microsoft', website: 'https://microsoft.com' },
|
|
28
|
+
{ id: 'openai', name: 'OpenAI', website: 'https://openai.com' },
|
|
29
|
+
{ id: 'anthropic', name: 'Anthropic', website: 'https://anthropic.com' },
|
|
30
|
+
{ id: 'amazon', name: 'Amazon', website: 'https://amazon.com' },
|
|
31
|
+
{ id: 'deshaw', name: 'D. E. Shaw & Co.', website: 'https://deshaw.com' },
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
const people: (Type.Properties<DataType.Person> & { id: string })[] = [
|
|
35
|
+
{ id: 'rich_burdon', fullName: 'Rich Burdon' },
|
|
36
|
+
{ id: 'josiah_witt', fullName: 'Josiah Witt' },
|
|
37
|
+
{ id: 'dima_dmaretskyi', fullName: 'Dima Maretskyi' },
|
|
38
|
+
{ id: 'chad_fowler', fullName: 'Chad Fowler' },
|
|
39
|
+
{ id: 'ciaran_oleary', fullName: "Ciarán O'Leary" },
|
|
40
|
+
{ id: 'jason_whitmire', fullName: 'Jason Whitmire' },
|
|
41
|
+
{ id: 'alex_brunicki', fullName: 'Alex Brunicki' },
|
|
42
|
+
{ id: 'andre_de_haes', fullName: 'Andre de Haes' },
|
|
43
|
+
{ id: 'scott_cohen', fullName: 'Scott Cohen' },
|
|
44
|
+
{ id: 'juan_benet', fullName: 'Juan Benet' },
|
|
45
|
+
{ id: 'satya_nadella', fullName: 'Satya Nadella' },
|
|
46
|
+
{ id: 'kevin_scott', fullName: 'Kevin Scott' },
|
|
47
|
+
{ id: 'jeff_bezos', fullName: 'Jeff Bezos' },
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
const testObjects: Record<string, any[]> = {
|
|
51
|
+
[DataType.Organization.typename]: organizations,
|
|
52
|
+
[DataType.Person.typename]: people,
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const testRelationships: Record<
|
|
56
|
+
string,
|
|
57
|
+
({
|
|
58
|
+
source: string;
|
|
59
|
+
target: string;
|
|
60
|
+
} & Record<string, any>)[]
|
|
61
|
+
> = {
|
|
62
|
+
[DataType.Employer.typename]: [
|
|
63
|
+
// prettier-ignore
|
|
64
|
+
{ source: 'rich_burdon', target: 'dxos' },
|
|
65
|
+
{ source: 'rich_burdon', target: 'google', active: false }, // TODO(burdon): Should not contribute to force.
|
|
66
|
+
{ source: 'rich_burdon', target: 'deshaw', active: false },
|
|
67
|
+
{ source: 'josiah_witt', target: 'dxos' },
|
|
68
|
+
{ source: 'dima_dmaretskyi', target: 'dxos' },
|
|
69
|
+
{ source: 'chad_fowler', target: 'blueyard' },
|
|
70
|
+
{ source: 'chad_fowler', target: 'microsoft', active: false },
|
|
71
|
+
{ source: 'ciaran_oleary', target: 'blueyard' },
|
|
72
|
+
{ source: 'jason_whitmire', target: 'blueyard' },
|
|
73
|
+
{ source: 'juan_benet', target: 'protocol_labs' },
|
|
74
|
+
{ source: 'alex_brunicki', target: 'backed' },
|
|
75
|
+
{ source: 'andre_de_haes', target: 'backed' },
|
|
76
|
+
{ source: 'scott_cohen', target: 'newlab' },
|
|
77
|
+
{ source: 'satya_nadella', target: 'microsoft' },
|
|
78
|
+
{ source: 'kevin_scott', target: 'microsoft' },
|
|
79
|
+
{ source: 'kevin_scott', target: 'google', active: false },
|
|
80
|
+
{ source: 'jeff_bezos', target: 'amazon' },
|
|
81
|
+
{ source: 'jeff_bezos', target: 'deshaw', active: false },
|
|
82
|
+
],
|
|
83
|
+
|
|
84
|
+
// TODO(burdon): Limit graph view to selected relationship types.
|
|
85
|
+
[DataType.HasConnection.typename]: [
|
|
86
|
+
// prettier-ignore
|
|
87
|
+
{ kind: 'partner', source: 'dxos', target: 'ink_and_switch' },
|
|
88
|
+
{ kind: 'partner', source: 'dxos', target: 'effectful' },
|
|
89
|
+
{ kind: 'partner', source: 'dxos', target: 'socket_supply' },
|
|
90
|
+
|
|
91
|
+
// prettier-ignore
|
|
92
|
+
{ kind: 'investor', source: 'blueyard', target: 'dxos' },
|
|
93
|
+
{ kind: 'investor', source: 'blueyard', target: 'protocol_labs' },
|
|
94
|
+
{ kind: 'investor', source: 'protocol_labs', target: 'dxos' },
|
|
95
|
+
{ kind: 'investor', source: 'backed', target: 'dxos' },
|
|
96
|
+
{ kind: 'investor', source: 'newlab', target: 'dxos' },
|
|
97
|
+
{ kind: 'investor', source: 'microsoft', target: 'openai' },
|
|
98
|
+
{ kind: 'investor', source: 'google', target: 'anthropic' },
|
|
99
|
+
{ kind: 'investor', source: 'amazon', target: 'anthropic' },
|
|
100
|
+
],
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const addTestData = async (space: Space): Promise<void> => {
|
|
104
|
+
const objectMap = new Map<string, Live<any>>();
|
|
105
|
+
|
|
106
|
+
for (const [typename, objects] of Object.entries(testObjects)) {
|
|
107
|
+
const schema = space.db.graph.schemaRegistry.getSchema(typename);
|
|
108
|
+
invariant(schema, `Schema not found: ${typename}`);
|
|
109
|
+
for (const { id, ...data } of objects) {
|
|
110
|
+
const object = space.db.add(Obj.make(schema, data));
|
|
111
|
+
objectMap.set(id, object);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
for (const [typename, relationships] of Object.entries(testRelationships)) {
|
|
116
|
+
const schema = space.db.graph.schemaRegistry.getSchema(typename);
|
|
117
|
+
invariant(schema, `Schema not found: ${typename}`);
|
|
118
|
+
|
|
119
|
+
for (const { source, target, ...data } of relationships) {
|
|
120
|
+
const sourceObject = objectMap.get(source);
|
|
121
|
+
const targetObject = objectMap.get(target);
|
|
122
|
+
invariant(sourceObject, `Source object not found: ${source}`);
|
|
123
|
+
invariant(targetObject, `Target object not found: ${target}`);
|
|
124
|
+
|
|
125
|
+
space.db.add(
|
|
126
|
+
Relation.make(schema, {
|
|
127
|
+
// TODO(burdon): Test source/target types match.
|
|
128
|
+
[Relation.Source]: sourceObject,
|
|
129
|
+
[Relation.Target]: targetObject,
|
|
130
|
+
...data,
|
|
131
|
+
}),
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
|
|
7
|
+
import { Type } from '@dxos/echo';
|
|
8
|
+
import { Queue } from '@dxos/echo-db';
|
|
9
|
+
|
|
10
|
+
export const ResearchInputQueue = Schema.Struct({
|
|
11
|
+
queue: Type.Ref(Queue),
|
|
12
|
+
}).pipe(
|
|
13
|
+
Type.Obj({
|
|
14
|
+
typename: 'dxos.org/type/ResearchInputQueue',
|
|
15
|
+
version: '0.1.0',
|
|
16
|
+
}),
|
|
17
|
+
);
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Tool from '@effect/ai/Tool';
|
|
6
|
+
import * as Toolkit from '@effect/ai/Toolkit';
|
|
7
|
+
import * as Console from 'effect/Console';
|
|
8
|
+
import * as Schema from 'effect/Schema';
|
|
9
|
+
|
|
10
|
+
import { SERVICES_CONFIG } from '@dxos/ai/testing';
|
|
11
|
+
import {
|
|
12
|
+
Capabilities,
|
|
13
|
+
Events,
|
|
14
|
+
IntentPlugin,
|
|
15
|
+
LayoutAction,
|
|
16
|
+
type Plugin,
|
|
17
|
+
type PluginContext,
|
|
18
|
+
SettingsPlugin,
|
|
19
|
+
allOf,
|
|
20
|
+
contributes,
|
|
21
|
+
createIntent,
|
|
22
|
+
createResolver,
|
|
23
|
+
defineModule,
|
|
24
|
+
definePlugin,
|
|
25
|
+
} from '@dxos/app-framework';
|
|
26
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
27
|
+
import { AiContextBinder, ArtifactId } from '@dxos/assistant';
|
|
28
|
+
import {
|
|
29
|
+
DESIGN_BLUEPRINT,
|
|
30
|
+
PLANNING_BLUEPRINT,
|
|
31
|
+
agent,
|
|
32
|
+
createResearchNote,
|
|
33
|
+
readDocument,
|
|
34
|
+
readTasks,
|
|
35
|
+
research,
|
|
36
|
+
updateDocument,
|
|
37
|
+
updateTasks,
|
|
38
|
+
} from '@dxos/assistant-testing';
|
|
39
|
+
import { Blueprint, Prompt } from '@dxos/blueprints';
|
|
40
|
+
import { type Space } from '@dxos/client/echo';
|
|
41
|
+
import { Obj, Ref } from '@dxos/echo';
|
|
42
|
+
import { FunctionTrigger, FunctionType, exampleFunctions } from '@dxos/functions';
|
|
43
|
+
import { log } from '@dxos/log';
|
|
44
|
+
import { AttentionPlugin } from '@dxos/plugin-attention';
|
|
45
|
+
import { AutomationPlugin } from '@dxos/plugin-automation';
|
|
46
|
+
import { ClientCapabilities, ClientEvents, ClientPlugin } from '@dxos/plugin-client';
|
|
47
|
+
import { type ClientPluginOptions } from '@dxos/plugin-client/types';
|
|
48
|
+
import { DeckAction } from '@dxos/plugin-deck/types';
|
|
49
|
+
import { GraphPlugin } from '@dxos/plugin-graph';
|
|
50
|
+
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
51
|
+
import { PreviewPlugin } from '@dxos/plugin-preview';
|
|
52
|
+
import { SpacePlugin } from '@dxos/plugin-space';
|
|
53
|
+
import { StorybookLayoutPlugin } from '@dxos/plugin-storybook-layout';
|
|
54
|
+
import { ThemePlugin } from '@dxos/plugin-theme';
|
|
55
|
+
import { type Client, Config } from '@dxos/react-client';
|
|
56
|
+
import { defaultTx } from '@dxos/react-ui-theme';
|
|
57
|
+
import { DataType } from '@dxos/schema';
|
|
58
|
+
import { trim } from '@dxos/util';
|
|
59
|
+
|
|
60
|
+
import { AssistantPlugin } from '../../AssistantPlugin';
|
|
61
|
+
import { Assistant, AssistantAction } from '../../types';
|
|
62
|
+
|
|
63
|
+
// TODO(burdon): Factor out.
|
|
64
|
+
export const config = {
|
|
65
|
+
remote: new Config({
|
|
66
|
+
runtime: {
|
|
67
|
+
services: SERVICES_CONFIG.REMOTE,
|
|
68
|
+
},
|
|
69
|
+
}),
|
|
70
|
+
persistent: new Config({
|
|
71
|
+
runtime: {
|
|
72
|
+
client: {
|
|
73
|
+
storage: {
|
|
74
|
+
persistent: true,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
services: SERVICES_CONFIG.REMOTE,
|
|
78
|
+
},
|
|
79
|
+
}),
|
|
80
|
+
local: new Config({
|
|
81
|
+
runtime: {
|
|
82
|
+
services: SERVICES_CONFIG.LOCAL,
|
|
83
|
+
},
|
|
84
|
+
}),
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
class TestingToolkit extends Toolkit.make(
|
|
88
|
+
Tool.make('open-item', {
|
|
89
|
+
description: trim`
|
|
90
|
+
Opens an item in the application.
|
|
91
|
+
`,
|
|
92
|
+
parameters: {
|
|
93
|
+
id: ArtifactId,
|
|
94
|
+
},
|
|
95
|
+
success: Schema.Any,
|
|
96
|
+
failure: Schema.Never,
|
|
97
|
+
}),
|
|
98
|
+
) {
|
|
99
|
+
static layer = (_context: PluginContext) =>
|
|
100
|
+
TestingToolkit.toLayer({
|
|
101
|
+
'open-item': ({ id }) => Console.log('Called open-item', { id }),
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
type DecoratorsProps = Omit<ClientPluginOptions, 'onClientInitialized' | 'onSpacesReady'> &
|
|
106
|
+
Pick<StoryPluginOptions, 'onChatCreated'> & {
|
|
107
|
+
plugins?: Plugin[];
|
|
108
|
+
accessTokens?: DataType.AccessToken[];
|
|
109
|
+
onInit?: (props: { client: Client; space: Space }) => Promise<void>;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Create storybook decorators.
|
|
114
|
+
*/
|
|
115
|
+
export const getDecorators = ({
|
|
116
|
+
types = [],
|
|
117
|
+
plugins = [],
|
|
118
|
+
accessTokens = [],
|
|
119
|
+
onInit,
|
|
120
|
+
onChatCreated,
|
|
121
|
+
...props
|
|
122
|
+
}: DecoratorsProps) => [
|
|
123
|
+
withPluginManager({
|
|
124
|
+
plugins: [
|
|
125
|
+
// System plugins.
|
|
126
|
+
AttentionPlugin(),
|
|
127
|
+
AutomationPlugin(),
|
|
128
|
+
GraphPlugin(),
|
|
129
|
+
IntentPlugin(),
|
|
130
|
+
SettingsPlugin(),
|
|
131
|
+
SpacePlugin({}),
|
|
132
|
+
ClientPlugin({
|
|
133
|
+
types: [
|
|
134
|
+
Markdown.Document,
|
|
135
|
+
Assistant.Chat,
|
|
136
|
+
Blueprint.Blueprint,
|
|
137
|
+
Prompt.Prompt,
|
|
138
|
+
DataType.AccessToken,
|
|
139
|
+
FunctionTrigger,
|
|
140
|
+
FunctionType,
|
|
141
|
+
...types,
|
|
142
|
+
],
|
|
143
|
+
onClientInitialized: async ({ client }) => {
|
|
144
|
+
log('onClientInitialized', { identity: client.halo.identity.get()?.did });
|
|
145
|
+
// Abort if already initialized.
|
|
146
|
+
if (client.halo.identity.get()) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
await client.halo.createIdentity();
|
|
151
|
+
await client.spaces.waitUntilReady();
|
|
152
|
+
|
|
153
|
+
const space = client.spaces.default;
|
|
154
|
+
// TODO(burdon): Should not require this.
|
|
155
|
+
// ERROR: invariant violation: Database was not initialized with root object.
|
|
156
|
+
// TODO(burdon): onSpacesReady is never called.
|
|
157
|
+
await space.waitUntilReady();
|
|
158
|
+
|
|
159
|
+
// Add tokens.
|
|
160
|
+
for (const accessToken of accessTokens) {
|
|
161
|
+
space.db.add(Obj.clone(accessToken));
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
await space.db.flush({ indexes: true });
|
|
165
|
+
await onInit?.({ client, space });
|
|
166
|
+
await space.db.flush({ indexes: true });
|
|
167
|
+
},
|
|
168
|
+
...props,
|
|
169
|
+
}),
|
|
170
|
+
|
|
171
|
+
// Cards
|
|
172
|
+
ThemePlugin({ tx: defaultTx }),
|
|
173
|
+
StorybookLayoutPlugin({}),
|
|
174
|
+
PreviewPlugin(),
|
|
175
|
+
|
|
176
|
+
// User plugins.
|
|
177
|
+
AssistantPlugin(),
|
|
178
|
+
StoryPlugin({ onChatCreated }),
|
|
179
|
+
|
|
180
|
+
// Test-specific.
|
|
181
|
+
...plugins,
|
|
182
|
+
],
|
|
183
|
+
}),
|
|
184
|
+
];
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Creates access tokens from environment variables.
|
|
188
|
+
* @param tokens - Record of token sources mapped to their VITE_ prefixed environment variable values
|
|
189
|
+
* @returns Array of AccessToken objects for non-empty token values
|
|
190
|
+
* @example
|
|
191
|
+
* ```tsx
|
|
192
|
+
* const tokens = accessTokensFromEnv({
|
|
193
|
+
* 'exa.ai': process.env.VITE_EXA_API_KEY,
|
|
194
|
+
* 'linear.app': process.env.VITE_LINEAR_API_KEY
|
|
195
|
+
* });
|
|
196
|
+
* ```
|
|
197
|
+
* @note All environment variables should use the VITE_ prefix for proper Vite bundling
|
|
198
|
+
*/
|
|
199
|
+
|
|
200
|
+
export const accessTokensFromEnv = (tokens: Record<string, string | undefined>) => {
|
|
201
|
+
return Object.entries(tokens)
|
|
202
|
+
.filter(([, token]) => !!token)
|
|
203
|
+
.map(([source, token]) => Obj.make(DataType.AccessToken, { source, token: token! }));
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
type StoryPluginOptions = {
|
|
207
|
+
onChatCreated?: (props: { space: Space; chat: Assistant.Chat; binder: AiContextBinder }) => Promise<void>;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
const StoryPlugin = definePlugin<StoryPluginOptions>(
|
|
211
|
+
{
|
|
212
|
+
id: 'example.com/plugin/testing',
|
|
213
|
+
name: 'Testing',
|
|
214
|
+
},
|
|
215
|
+
({ onChatCreated }) => [
|
|
216
|
+
defineModule({
|
|
217
|
+
id: 'example.com/plugin/testing/module/testing',
|
|
218
|
+
activatesOn: Events.SetupArtifactDefinition,
|
|
219
|
+
activate: () => [
|
|
220
|
+
// TODO(burdon): Move into assistnat?
|
|
221
|
+
contributes(Capabilities.BlueprintDefinition, DESIGN_BLUEPRINT),
|
|
222
|
+
contributes(Capabilities.BlueprintDefinition, PLANNING_BLUEPRINT),
|
|
223
|
+
contributes(Capabilities.Functions, [agent]),
|
|
224
|
+
contributes(Capabilities.Functions, [readDocument, updateDocument]),
|
|
225
|
+
contributes(Capabilities.Functions, [readTasks, updateTasks]),
|
|
226
|
+
contributes(Capabilities.Functions, [research, createResearchNote]),
|
|
227
|
+
contributes(Capabilities.Functions, [exampleFunctions.reply]),
|
|
228
|
+
],
|
|
229
|
+
}),
|
|
230
|
+
defineModule({
|
|
231
|
+
id: 'example.com/plugin/testing/module/toolkit',
|
|
232
|
+
activatesOn: Events.Startup,
|
|
233
|
+
activate: (context) => [
|
|
234
|
+
contributes(Capabilities.Toolkit, TestingToolkit),
|
|
235
|
+
contributes(Capabilities.ToolkitHandler, TestingToolkit.layer(context)),
|
|
236
|
+
],
|
|
237
|
+
}),
|
|
238
|
+
defineModule({
|
|
239
|
+
id: 'example.com/plugin/testing/module/setup',
|
|
240
|
+
activatesOn: allOf(Events.DispatcherReady, ClientEvents.SpacesReady),
|
|
241
|
+
activate: async (context) => {
|
|
242
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
243
|
+
const space = client.spaces.default;
|
|
244
|
+
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
245
|
+
|
|
246
|
+
// Ensure workspace is set.
|
|
247
|
+
await dispatch(createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: space.id }));
|
|
248
|
+
|
|
249
|
+
// Create initial chat.
|
|
250
|
+
await dispatch(createIntent(AssistantAction.CreateChat, { space }));
|
|
251
|
+
|
|
252
|
+
return [];
|
|
253
|
+
},
|
|
254
|
+
}),
|
|
255
|
+
defineModule({
|
|
256
|
+
id: 'example.com/plugin/testing/module/intent-resolver',
|
|
257
|
+
activatesOn: Events.SetupIntentResolver,
|
|
258
|
+
activate: () => [
|
|
259
|
+
contributes(Capabilities.IntentResolver, [
|
|
260
|
+
createResolver({
|
|
261
|
+
intent: DeckAction.ChangeCompanion,
|
|
262
|
+
resolve: () => ({}),
|
|
263
|
+
}),
|
|
264
|
+
createResolver({
|
|
265
|
+
intent: AssistantAction.CreateChat,
|
|
266
|
+
position: 'hoist',
|
|
267
|
+
resolve: async ({ space, name }) => {
|
|
268
|
+
const queue = space.queues.create();
|
|
269
|
+
const traceQueue = space.queues.create();
|
|
270
|
+
const chat = Obj.make(Assistant.Chat, {
|
|
271
|
+
name,
|
|
272
|
+
queue: Ref.fromDXN(queue.dxn),
|
|
273
|
+
traceQueue: Ref.fromDXN(traceQueue.dxn),
|
|
274
|
+
});
|
|
275
|
+
const binder = new AiContextBinder(queue);
|
|
276
|
+
|
|
277
|
+
// Story-specific behaviour to allow chat creation to be extended.
|
|
278
|
+
space.db.add(chat);
|
|
279
|
+
await space.db.flush({ indexes: true });
|
|
280
|
+
await onChatCreated?.({ space, chat, binder });
|
|
281
|
+
|
|
282
|
+
return {
|
|
283
|
+
data: { object: chat },
|
|
284
|
+
};
|
|
285
|
+
},
|
|
286
|
+
}),
|
|
287
|
+
]),
|
|
288
|
+
],
|
|
289
|
+
}),
|
|
290
|
+
],
|
|
291
|
+
);
|
package/src/testing/index.ts
CHANGED