@dxos/plugin-assistant 0.8.3 → 0.8.4-main.1f223c7
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-QQHVOTSI.mjs → BlueprintContainer-BFNN6K46.mjs} +11 -10
- package/dist/lib/browser/BlueprintContainer-BFNN6K46.mjs.map +7 -0
- package/dist/lib/browser/ChatCompanion-DOVN34C7.mjs +126 -0
- package/dist/lib/browser/ChatCompanion-DOVN34C7.mjs.map +7 -0
- package/dist/lib/browser/ChatContainer-XIVJTCC2.mjs +75 -0
- package/dist/lib/browser/ChatContainer-XIVJTCC2.mjs.map +7 -0
- package/dist/lib/browser/ChatDialog-EJJMK3WL.mjs +88 -0
- package/dist/lib/browser/ChatDialog-EJJMK3WL.mjs.map +7 -0
- package/dist/lib/browser/SequenceContainer-TF5QNXYM.mjs +150 -0
- package/dist/lib/browser/SequenceContainer-TF5QNXYM.mjs.map +7 -0
- package/dist/lib/browser/ai-service-YC2EQPHA.mjs +22 -0
- package/dist/lib/browser/ai-service-YC2EQPHA.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-3C43MLCD.mjs +153 -0
- package/dist/lib/browser/app-graph-builder-3C43MLCD.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-VHFSRTEJ.mjs +12 -0
- package/dist/lib/browser/blueprint-definition-VHFSRTEJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-C4Q2RYQM.mjs +1974 -0
- package/dist/lib/browser/chunk-C4Q2RYQM.mjs.map +7 -0
- package/dist/lib/browser/chunk-EZUSNS2J.mjs +19 -0
- package/dist/lib/browser/chunk-EZUSNS2J.mjs.map +7 -0
- package/dist/lib/browser/chunk-GLWD66TA.mjs +161 -0
- package/dist/lib/browser/chunk-GLWD66TA.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-XOZ7YMO3.mjs → chunk-O4LUJEDV.mjs} +3 -3
- package/dist/lib/browser/{chunk-XOZ7YMO3.mjs.map → chunk-O4LUJEDV.mjs.map} +1 -1
- package/dist/lib/browser/chunk-PQI3MGDN.mjs +169 -0
- package/dist/lib/browser/chunk-PQI3MGDN.mjs.map +7 -0
- package/dist/lib/browser/chunk-QD4UUISH.mjs +299 -0
- package/dist/lib/browser/chunk-QD4UUISH.mjs.map +7 -0
- package/dist/lib/browser/chunk-R6LRGW3I.mjs +216 -0
- package/dist/lib/browser/chunk-R6LRGW3I.mjs.map +7 -0
- package/dist/lib/browser/chunk-SMIVXXAI.mjs +202 -0
- package/dist/lib/browser/chunk-SMIVXXAI.mjs.map +7 -0
- package/dist/lib/browser/compute-runtime-X6IREJN3.mjs +155 -0
- package/dist/lib/browser/compute-runtime-X6IREJN3.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-JNEB355N.mjs +22 -0
- package/dist/lib/browser/edge-model-resolver-JNEB355N.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +195 -128
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-I6M3ZDAS.mjs +112 -0
- package/dist/lib/browser/intent-resolver-I6M3ZDAS.mjs.map +7 -0
- package/dist/lib/browser/local-model-resolver-EUXSRZ7X.mjs +21 -0
- package/dist/lib/browser/local-model-resolver-EUXSRZ7X.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-E4NAGB6R.mjs +109 -0
- package/dist/lib/browser/react-surface-E4NAGB6R.mjs.map +7 -0
- package/dist/lib/browser/{settings-XRHXVWGB.mjs → settings-36V3VUMW.mjs} +7 -6
- package/dist/lib/browser/settings-36V3VUMW.mjs.map +7 -0
- package/dist/lib/browser/state-AINRYS5W.mjs +21 -0
- package/dist/lib/browser/state-AINRYS5W.mjs.map +7 -0
- package/dist/lib/browser/toolkit-MPUS3U64.mjs +191 -0
- package/dist/lib/browser/toolkit-MPUS3U64.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -20
- package/dist/lib/node-esm/{TemplateContainer-SOEWY2ZN.mjs → BlueprintContainer-X4MRBKDR.mjs} +11 -10
- package/dist/lib/node-esm/BlueprintContainer-X4MRBKDR.mjs.map +7 -0
- package/dist/lib/node-esm/ChatCompanion-ICWYVPRD.mjs +127 -0
- package/dist/lib/node-esm/ChatCompanion-ICWYVPRD.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-LMMMQD4K.mjs +76 -0
- package/dist/lib/node-esm/ChatContainer-LMMMQD4K.mjs.map +7 -0
- package/dist/lib/node-esm/ChatDialog-UUE3F7BT.mjs +89 -0
- package/dist/lib/node-esm/ChatDialog-UUE3F7BT.mjs.map +7 -0
- package/dist/lib/node-esm/SequenceContainer-UXOVZPZO.mjs +151 -0
- package/dist/lib/node-esm/SequenceContainer-UXOVZPZO.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-XUMZVFCK.mjs +23 -0
- package/dist/lib/node-esm/ai-service-XUMZVFCK.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-NM3JDLQ2.mjs +154 -0
- package/dist/lib/node-esm/app-graph-builder-NM3JDLQ2.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-4E6XTLVN.mjs +13 -0
- package/dist/lib/node-esm/blueprint-definition-4E6XTLVN.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4WLFSXZG.mjs +170 -0
- package/dist/lib/node-esm/chunk-4WLFSXZG.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs +203 -0
- package/dist/lib/node-esm/chunk-7YOGZI66.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-LVTG5JTW.mjs +217 -0
- package/dist/lib/node-esm/chunk-LVTG5JTW.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-QG2KT3AT.mjs +163 -0
- package/dist/lib/node-esm/chunk-QG2KT3AT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-V44ZG7CU.mjs +1975 -0
- package/dist/lib/node-esm/chunk-V44ZG7CU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-BB2TAT4P.mjs → chunk-VFY2JG62.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-BB2TAT4P.mjs.map → chunk-VFY2JG62.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-XD4CDA4R.mjs +20 -0
- package/dist/lib/node-esm/chunk-XD4CDA4R.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-YU62ZWJN.mjs +300 -0
- package/dist/lib/node-esm/chunk-YU62ZWJN.mjs.map +7 -0
- package/dist/lib/node-esm/compute-runtime-NRHLLTSC.mjs +156 -0
- package/dist/lib/node-esm/compute-runtime-NRHLLTSC.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-UE5TLLJZ.mjs +23 -0
- package/dist/lib/node-esm/edge-model-resolver-UE5TLLJZ.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +195 -128
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/intent-resolver-VIINHFMT.mjs +113 -0
- package/dist/lib/node-esm/intent-resolver-VIINHFMT.mjs.map +7 -0
- package/dist/lib/node-esm/local-model-resolver-JBEFVVZA.mjs +22 -0
- package/dist/lib/node-esm/local-model-resolver-JBEFVVZA.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-5WQLRTCH.mjs +110 -0
- package/dist/lib/node-esm/react-surface-5WQLRTCH.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-5IAY6BT4.mjs → settings-7ZCZ6AS5.mjs} +7 -6
- package/dist/lib/node-esm/settings-7ZCZ6AS5.mjs.map +7 -0
- package/dist/lib/node-esm/state-EQS5KP6M.mjs +22 -0
- package/dist/lib/node-esm/state-EQS5KP6M.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-PKVYDZ4H.mjs +192 -0
- package/dist/lib/node-esm/toolkit-PKVYDZ4H.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -20
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +5 -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 +29 -3
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/compute-runtime.d.ts +5 -0
- package/dist/types/src/capabilities/compute-runtime.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 +12 -5
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- 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 +2 -2
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/BlueprintContainer.d.ts +5 -6
- package/dist/types/src/components/BlueprintContainer.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +50 -0
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -0
- package/dist/types/src/components/Chat/events.d.ts +35 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -0
- package/dist/types/src/components/Chat/index.d.ts +3 -0
- package/dist/types/src/components/Chat/index.d.ts.map +1 -0
- 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 +7 -7
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChatDialog.d.ts +8 -0
- package/dist/types/src/components/ChatDialog.d.ts.map +1 -0
- 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 +11 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -0
- 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 +11 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +10 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +10 -0
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/index.d.ts +6 -0
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +22 -0
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +282 -0
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -0
- 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/index.d.ts +2 -0
- package/dist/types/src/components/ChatThread/index.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 +2 -2
- package/dist/types/src/components/PromptSettings.d.ts.map +1 -1
- package/dist/types/src/components/SequenceContainer.d.ts +8 -0
- package/dist/types/src/components/SequenceContainer.d.ts.map +1 -0
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +13 -0
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +1 -0
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +267 -0
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/SequenceEditor/index.d.ts +2 -0
- package/dist/types/src/components/SequenceEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +4 -8
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +261 -6
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +5 -4
- 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 +10 -8
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +262 -4
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +9 -12
- 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/execution-graph/execution-graph.d.ts +21 -0
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -0
- package/dist/types/src/execution-graph/index.d.ts +2 -0
- package/dist/types/src/execution-graph/index.d.ts.map +1 -0
- 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 +11 -5
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +24 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +12 -13
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +13 -0
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -0
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +8 -0
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -0
- 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/useExecutionGraph.d.ts +6 -0
- package/dist/types/src/hooks/useExecutionGraph.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 +7 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -0
- 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/processor/presets.d.ts +13 -0
- package/dist/types/src/processor/presets.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +73 -0
- package/dist/types/src/processor/processor.d.ts.map +1 -0
- package/dist/types/src/processor/processor.test.d.ts.map +1 -0
- package/dist/types/src/queue-logger.d.ts +5 -5
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/stories/Chat.stories.d.ts +30 -0
- package/dist/types/src/stories/Chat.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/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/LoggingContainer.d.ts +7 -0
- package/dist/types/src/stories/components/LoggingContainer.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/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/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 +14 -0
- package/dist/types/src/stories/components/TriggersContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/index.d.ts +16 -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 +48 -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 +4 -0
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +84 -113
- 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 -3
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +9 -6
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +111 -81
- package/src/AssistantPlugin.tsx +87 -43
- package/src/capabilities/ai-service.ts +28 -0
- package/src/capabilities/app-graph-builder.ts +58 -144
- package/src/capabilities/blueprint-definition.ts +58 -0
- package/src/capabilities/capabilities.ts +61 -5
- package/src/capabilities/compute-runtime.ts +124 -0
- package/src/capabilities/edge-model-resolver.ts +27 -0
- package/src/capabilities/index.ts +8 -1
- package/src/capabilities/intent-resolver.ts +67 -18
- package/src/capabilities/local-model-resolver.ts +32 -0
- package/src/capabilities/react-surface.tsx +40 -86
- package/src/capabilities/settings.ts +3 -3
- package/src/capabilities/state.ts +20 -0
- package/src/capabilities/toolkit.ts +163 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +86 -79
- package/src/components/BlueprintContainer.tsx +9 -133
- package/src/components/Chat/Chat.tsx +389 -0
- package/src/components/Chat/events.ts +57 -0
- package/src/components/Chat/index.ts +7 -0
- package/src/components/ChatCompanion.tsx +111 -0
- package/src/components/ChatContainer.tsx +33 -21
- package/src/components/ChatDialog.tsx +68 -0
- package/src/components/ChatProgress/ChatProgress.tsx +68 -0
- package/src/components/{AmbientDialog → ChatProgress}/index.ts +1 -1
- package/src/components/ChatPrompt/ChatActions.tsx +57 -0
- package/src/components/ChatPrompt/ChatOptions.tsx +233 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +29 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +48 -0
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +42 -0
- package/src/components/ChatPrompt/index.ts +9 -0
- package/src/components/ChatThread/ChatThread.stories.tsx +130 -0
- package/src/components/ChatThread/ChatThread.tsx +93 -0
- package/src/components/ChatThread/Link.tsx +26 -0
- package/src/components/ChatThread/index.ts +5 -0
- package/src/components/ChatThread/reducers.ts +151 -0
- package/src/components/ChatThread/registry.tsx +189 -0
- package/src/components/ChatThread/sync.test.ts +81 -0
- package/src/components/ChatThread/sync.ts +113 -0
- package/src/components/PromptSettings.tsx +44 -45
- package/src/components/SequenceContainer.tsx +131 -0
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +33 -0
- package/src/components/{BlueprintEditor/BlueprintEditor.tsx → SequenceEditor/SequenceEditor.tsx} +8 -8
- package/src/components/SequenceEditor/index.ts +5 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +45 -37
- package/src/components/TemplateEditor/TemplateEditor.tsx +28 -46
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +26 -19
- package/src/components/TemplateEditor/TemplateForm.tsx +52 -57
- 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/{experimental/transcription → components/Toolbar}/index.ts +2 -0
- package/src/components/Toolbar/useChatToolbarActions.ts +126 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +12 -19
- package/src/components/Toolbox/Toolbox.tsx +53 -27
- package/src/components/index.ts +6 -8
- package/src/events.ts +3 -3
- package/src/execution-graph/execution-graph.ts +211 -0
- package/src/execution-graph/index.ts +5 -0
- package/src/functions/analysis.ts +20 -0
- package/src/functions/index.ts +7 -0
- package/src/functions/list.ts +46 -0
- package/src/functions/load.ts +42 -0
- package/src/hooks/index.ts +11 -6
- package/src/hooks/useBlueprintRegistry.ts +80 -0
- package/src/hooks/useChatProcessor.ts +66 -0
- package/src/hooks/useChatServices.ts +48 -0
- package/src/hooks/useComputeRuntimeCallback.ts +25 -0
- package/src/hooks/useContextBinder.ts +18 -0
- package/src/hooks/useContextObjects.ts +58 -0
- package/src/hooks/useExecutionGraph.ts +20 -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/{useContextProvider.ts → useReferencesProvider.ts} +22 -20
- package/src/meta.ts +1 -1
- package/src/processor/index.ts +6 -0
- package/src/processor/presets.ts +60 -0
- package/src/processor/processor.test.ts +77 -0
- package/src/processor/processor.ts +302 -0
- package/src/queue-logger.ts +16 -16
- package/src/stories/Chat.stories.tsx +657 -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/GraphContainer.tsx +119 -0
- package/src/stories/components/InvocationsContainer.tsx +17 -0
- package/src/stories/components/LoggingContainer.tsx +33 -0
- package/src/stories/components/MessageContainer.tsx +22 -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/TasksContainer.tsx +49 -0
- package/src/stories/components/TokenManagerContainer.tsx +14 -0
- package/src/stories/components/TriggersContainer.tsx +75 -0
- package/src/stories/components/index.ts +20 -0
- package/src/stories/components/types.ts +11 -0
- package/src/stories/{test-data.ts → testing/data.ts} +23 -9
- package/src/stories/testing/index.ts +6 -0
- package/src/stories/testing/schema.ts +17 -0
- package/src/stories/testing/testing.tsx +279 -0
- package/src/testing/index.ts +3 -1
- package/src/testing/test-data.ts +245 -0
- package/src/testing/test-functions.ts +9 -4
- package/src/testing/test-generator.ts +257 -0
- package/src/testing/test-sequence.ts +26 -0
- package/src/translations.ts +58 -28
- 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 -3
- package/src/vite-env.d.ts +30 -0
- package/dist/lib/browser/AssistantDialog-MQOOR364.mjs +0 -47
- package/dist/lib/browser/AssistantDialog-MQOOR364.mjs.map +0 -7
- package/dist/lib/browser/BlueprintContainer-AT5Y7EXG.mjs +0 -321
- package/dist/lib/browser/BlueprintContainer-AT5Y7EXG.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-C2NEAS3A.mjs +0 -40
- package/dist/lib/browser/ChatContainer-C2NEAS3A.mjs.map +0 -7
- package/dist/lib/browser/TemplateContainer-QQHVOTSI.mjs.map +0 -7
- package/dist/lib/browser/ai-client-MK2ZZII2.mjs +0 -39
- package/dist/lib/browser/ai-client-MK2ZZII2.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-E4H5DCOJ.mjs +0 -225
- package/dist/lib/browser/app-graph-builder-E4H5DCOJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-AAOKC2JN.mjs +0 -208
- package/dist/lib/browser/chunk-AAOKC2JN.mjs.map +0 -7
- package/dist/lib/browser/chunk-BI6AHRNJ.mjs +0 -157
- package/dist/lib/browser/chunk-BI6AHRNJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-JO4W3MF7.mjs +0 -2101
- package/dist/lib/browser/chunk-JO4W3MF7.mjs.map +0 -7
- package/dist/lib/browser/chunk-JQFUME3B.mjs +0 -87
- package/dist/lib/browser/chunk-JQFUME3B.mjs.map +0 -7
- package/dist/lib/browser/chunk-MEGMOFJB.mjs +0 -16
- package/dist/lib/browser/chunk-MEGMOFJB.mjs.map +0 -7
- package/dist/lib/browser/chunk-Q6UZ4F3H.mjs +0 -96
- package/dist/lib/browser/chunk-Q6UZ4F3H.mjs.map +0 -7
- package/dist/lib/browser/chunk-UE3IZ4PN.mjs +0 -15
- package/dist/lib/browser/chunk-UE3IZ4PN.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-3UICTGPM.mjs +0 -43
- package/dist/lib/browser/intent-resolver-3UICTGPM.mjs.map +0 -7
- package/dist/lib/browser/react-surface-LXCNUSZN.mjs +0 -159
- package/dist/lib/browser/react-surface-LXCNUSZN.mjs.map +0 -7
- package/dist/lib/browser/settings-XRHXVWGB.mjs.map +0 -7
- package/dist/lib/node/AssistantDialog-AN4Z6YUV.cjs +0 -73
- package/dist/lib/node/AssistantDialog-AN4Z6YUV.cjs.map +0 -7
- package/dist/lib/node/BlueprintContainer-NOWLDYCZ.cjs +0 -344
- package/dist/lib/node/BlueprintContainer-NOWLDYCZ.cjs.map +0 -7
- package/dist/lib/node/ChatContainer-VKYBQHUB.cjs +0 -68
- package/dist/lib/node/ChatContainer-VKYBQHUB.cjs.map +0 -7
- package/dist/lib/node/TemplateContainer-JZF2DCCG.cjs +0 -58
- package/dist/lib/node/TemplateContainer-JZF2DCCG.cjs.map +0 -7
- package/dist/lib/node/ai-client-7HNSMUMT.cjs +0 -53
- package/dist/lib/node/ai-client-7HNSMUMT.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-PPR5B5KU.cjs +0 -235
- package/dist/lib/node/app-graph-builder-PPR5B5KU.cjs.map +0 -7
- package/dist/lib/node/chunk-4EEWTDQK.cjs +0 -117
- package/dist/lib/node/chunk-4EEWTDQK.cjs.map +0 -7
- package/dist/lib/node/chunk-FUAGEO7Q.cjs +0 -52
- package/dist/lib/node/chunk-FUAGEO7Q.cjs.map +0 -7
- package/dist/lib/node/chunk-HRNIUYVQ.cjs +0 -128
- package/dist/lib/node/chunk-HRNIUYVQ.cjs.map +0 -7
- package/dist/lib/node/chunk-IKZBMHSW.cjs +0 -184
- package/dist/lib/node/chunk-IKZBMHSW.cjs.map +0 -7
- package/dist/lib/node/chunk-LMDJEGZ2.cjs +0 -233
- package/dist/lib/node/chunk-LMDJEGZ2.cjs.map +0 -7
- package/dist/lib/node/chunk-NIDICM57.cjs +0 -2080
- package/dist/lib/node/chunk-NIDICM57.cjs.map +0 -7
- package/dist/lib/node/chunk-P74TWGMG.cjs +0 -44
- package/dist/lib/node/chunk-P74TWGMG.cjs.map +0 -7
- package/dist/lib/node/chunk-QGPWY6GW.cjs +0 -34
- package/dist/lib/node/chunk-QGPWY6GW.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -289
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-QSWGTKON.cjs +0 -58
- package/dist/lib/node/intent-resolver-QSWGTKON.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-D3NBYRZ6.cjs +0 -172
- package/dist/lib/node/react-surface-D3NBYRZ6.cjs.map +0 -7
- package/dist/lib/node/settings-2JXLKYGE.cjs +0 -36
- package/dist/lib/node/settings-2JXLKYGE.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -54
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/AssistantDialog-6WEMLUPU.mjs +0 -48
- package/dist/lib/node-esm/AssistantDialog-6WEMLUPU.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintContainer-STOJAVML.mjs +0 -322
- package/dist/lib/node-esm/BlueprintContainer-STOJAVML.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-3MVBTUJN.mjs +0 -41
- package/dist/lib/node-esm/ChatContainer-3MVBTUJN.mjs.map +0 -7
- package/dist/lib/node-esm/TemplateContainer-SOEWY2ZN.mjs.map +0 -7
- package/dist/lib/node-esm/ai-client-XGZBJ6BE.mjs +0 -40
- package/dist/lib/node-esm/ai-client-XGZBJ6BE.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-3SY5MBIK.mjs +0 -226
- package/dist/lib/node-esm/app-graph-builder-3SY5MBIK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-34EX6E5Q.mjs +0 -18
- package/dist/lib/node-esm/chunk-34EX6E5Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3UEZLJ2V.mjs +0 -16
- package/dist/lib/node-esm/chunk-3UEZLJ2V.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CDAILLCU.mjs +0 -98
- package/dist/lib/node-esm/chunk-CDAILLCU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-J6UXXZGJ.mjs +0 -209
- package/dist/lib/node-esm/chunk-J6UXXZGJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OD574YIU.mjs +0 -2102
- package/dist/lib/node-esm/chunk-OD574YIU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OYN6HLXZ.mjs +0 -88
- package/dist/lib/node-esm/chunk-OYN6HLXZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UCOFKNKN.mjs +0 -158
- package/dist/lib/node-esm/chunk-UCOFKNKN.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-E6MXTYAU.mjs +0 -44
- package/dist/lib/node-esm/intent-resolver-E6MXTYAU.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-7HA5EDWY.mjs +0 -160
- package/dist/lib/node-esm/react-surface-7HA5EDWY.mjs.map +0 -7
- package/dist/lib/node-esm/settings-5IAY6BT4.mjs.map +0 -7
- package/dist/types/src/capabilities/ai-client.d.ts +0 -5
- package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
- package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts +0 -10
- package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts.map +0 -1
- package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts +0 -8
- package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/AmbientDialog/index.d.ts +0 -2
- package/dist/types/src/components/AmbientDialog/index.d.ts.map +0 -1
- package/dist/types/src/components/AssistantDialog.d.ts +0 -7
- package/dist/types/src/components/AssistantDialog.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.d.ts +0 -13
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.stories.d.ts +0 -8
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintEditor/index.d.ts +0 -2
- package/dist/types/src/components/BlueprintEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/Prompt.d.ts +0 -23
- package/dist/types/src/components/Prompt/Prompt.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts +0 -13
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/PromptBar.d.ts +0 -16
- package/dist/types/src/components/Prompt/PromptBar.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/PromptBar.stories.d.ts +0 -9
- package/dist/types/src/components/Prompt/PromptBar.stories.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/autocomplete.d.ts +0 -25
- package/dist/types/src/components/Prompt/autocomplete.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/index.d.ts +0 -3
- package/dist/types/src/components/Prompt/index.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/references.d.ts +0 -30
- package/dist/types/src/components/Prompt/references.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/components/Thread/Thread.d.ts +0 -28
- package/dist/types/src/components/Thread/Thread.d.ts.map +0 -1
- package/dist/types/src/components/Thread/Thread.stories.d.ts +0 -11
- package/dist/types/src/components/Thread/Thread.stories.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ThreadContainer.d.ts +0 -13
- package/dist/types/src/components/Thread/ThreadContainer.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts +0 -16
- package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ThreadMessage.d.ts +0 -16
- package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ToolInvocations.d.ts +0 -13
- package/dist/types/src/components/Thread/ToolInvocations.d.ts.map +0 -1
- package/dist/types/src/components/Thread/index.d.ts +0 -3
- package/dist/types/src/components/Thread/index.d.ts.map +0 -1
- package/dist/types/src/components/Thread/reducer.d.ts +0 -12
- package/dist/types/src/components/Thread/reducer.d.ts.map +0 -1
- package/dist/types/src/experimental/transcription/index.d.ts +0 -1
- package/dist/types/src/experimental/transcription/index.d.ts.map +0 -1
- package/dist/types/src/hooks/processor.d.ts +0 -72
- package/dist/types/src/hooks/processor.d.ts.map +0 -1
- package/dist/types/src/hooks/processor.test.d.ts.map +0 -1
- package/dist/types/src/hooks/useContextProvider.d.ts +0 -17
- package/dist/types/src/hooks/useContextProvider.d.ts.map +0 -1
- package/dist/types/src/hooks/useMessageQueue.d.ts +0 -42
- package/dist/types/src/hooks/useMessageQueue.d.ts.map +0 -1
- package/dist/types/src/hooks/useServices.d.ts +0 -7
- package/dist/types/src/hooks/useServices.d.ts.map +0 -1
- package/dist/types/src/hooks/useTextInputEvents.d.ts +0 -13
- package/dist/types/src/hooks/useTextInputEvents.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/stories/Prompt.stories.d.ts +0 -8
- package/dist/types/src/stories/Prompt.stories.d.ts.map +0 -1
- package/dist/types/src/stories/Query.stories.d.ts +0 -19
- package/dist/types/src/stories/Query.stories.d.ts.map +0 -1
- package/dist/types/src/stories/Research.stories.d.ts +0 -15
- package/dist/types/src/stories/Research.stories.d.ts.map +0 -1
- package/dist/types/src/stories/test-data.d.ts +0 -3
- package/dist/types/src/stories/test-data.d.ts.map +0 -1
- package/dist/types/src/stories/testing.d.ts +0 -12
- package/dist/types/src/stories/testing.d.ts.map +0 -1
- package/dist/types/src/testing/test-blueprint.d.ts +0 -8
- package/dist/types/src/testing/test-blueprint.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/chat.d.ts +0 -23
- package/dist/types/src/types/chat.d.ts.map +0 -1
- package/dist/types/src/types/template.d.ts +0 -56
- package/dist/types/src/types/template.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts +0 -50
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/capabilities/ai-client.ts +0 -42
- package/src/components/AmbientDialog/AmbientDialog.stories.tsx +0 -84
- package/src/components/AmbientDialog/AmbientDialog.tsx +0 -117
- package/src/components/AssistantDialog.tsx +0 -37
- package/src/components/BlueprintEditor/BlueprintEditor.stories.tsx +0 -32
- package/src/components/BlueprintEditor/index.ts +0 -5
- package/src/components/Prompt/Prompt.stories.tsx +0 -121
- package/src/components/Prompt/Prompt.tsx +0 -124
- package/src/components/Prompt/PromptBar.stories.tsx +0 -69
- package/src/components/Prompt/PromptBar.tsx +0 -105
- package/src/components/Prompt/autocomplete.ts +0 -218
- package/src/components/Prompt/index.ts +0 -6
- package/src/components/Prompt/references.ts +0 -180
- package/src/components/TemplateContainer.tsx +0 -23
- package/src/components/Thread/Thread.stories.tsx +0 -201
- package/src/components/Thread/Thread.tsx +0 -118
- package/src/components/Thread/ThreadContainer.stories.tsx +0 -283
- package/src/components/Thread/ThreadContainer.tsx +0 -105
- package/src/components/Thread/ThreadMessage.tsx +0 -234
- package/src/components/Thread/ToolInvocations.tsx +0 -106
- package/src/components/Thread/index.ts +0 -6
- package/src/components/Thread/reducer.ts +0 -52
- package/src/hooks/processor.test.ts +0 -15
- package/src/hooks/processor.ts +0 -238
- package/src/hooks/useChatProcessor.tsx +0 -97
- package/src/hooks/useMessageQueue.ts +0 -22
- package/src/hooks/useServices.ts +0 -28
- package/src/hooks/useTextInputEvents.ts +0 -49
- 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/stories/Prompt.stories.tsx +0 -60
- package/src/stories/Query.stories.tsx +0 -514
- package/src/stories/Research.stories.tsx +0 -482
- package/src/stories/testing.ts +0 -60
- package/src/testing/test-blueprint.ts +0 -58
- 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/chat.ts +0 -32
- package/src/types/template.ts +0 -66
- package/src/types/types.ts +0 -48
- package/src/typings.d.ts +0 -9
- /package/dist/types/src/{hooks → processor}/processor.test.d.ts +0 -0
|
@@ -3,11 +3,25 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type Live, type Space } from '@dxos/client/echo';
|
|
6
|
-
import { Obj,
|
|
6
|
+
import { Obj, Relation, type Type } from '@dxos/echo';
|
|
7
7
|
import { invariant } from '@dxos/invariant';
|
|
8
8
|
import { DataType } from '@dxos/schema';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// import { faker } from '@dxos/random';
|
|
11
|
+
// import { DataType } from '@dxos/schema';
|
|
12
|
+
// import { type ValueGenerator, createGenerator } from '@dxos/schema/testing';
|
|
13
|
+
// faker.seed(1);
|
|
14
|
+
// const generator = faker as any as ValueGenerator;
|
|
15
|
+
// const objectGenerator = createGenerator(generator, DataType.Organization, { force: true });
|
|
16
|
+
|
|
17
|
+
export const testTypes: Type.Obj.Any[] = [
|
|
18
|
+
DataType.Organization,
|
|
19
|
+
DataType.Person,
|
|
20
|
+
DataType.Employer,
|
|
21
|
+
DataType.HasConnection,
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
export const organizations: (Type.Properties<DataType.Organization> & { id: string })[] = [
|
|
11
25
|
{ id: 'dxos', name: 'DXOS', website: 'https://dxos.org' },
|
|
12
26
|
{ id: 'socket_supply', name: 'Socket Supply', website: 'https://socketsupply.com' },
|
|
13
27
|
{ id: 'ink_and_switch', name: 'Ink & Switch', website: 'https://inkandswitch.com' },
|
|
@@ -41,8 +55,8 @@ const people: (Type.Properties<DataType.Person> & { id: string })[] = [
|
|
|
41
55
|
];
|
|
42
56
|
|
|
43
57
|
const testObjects: Record<string, any[]> = {
|
|
44
|
-
[
|
|
45
|
-
[
|
|
58
|
+
[DataType.Organization.typename]: organizations,
|
|
59
|
+
[DataType.Person.typename]: people,
|
|
46
60
|
};
|
|
47
61
|
|
|
48
62
|
const testRelationships: Record<
|
|
@@ -52,8 +66,8 @@ const testRelationships: Record<
|
|
|
52
66
|
target: string;
|
|
53
67
|
} & Record<string, any>)[]
|
|
54
68
|
> = {
|
|
55
|
-
[
|
|
56
|
-
//
|
|
69
|
+
[DataType.Employer.typename]: [
|
|
70
|
+
// prettier-ignore
|
|
57
71
|
{ source: 'rich_burdon', target: 'dxos' },
|
|
58
72
|
{ source: 'rich_burdon', target: 'google', active: false }, // TODO(burdon): Should not contribute to force.
|
|
59
73
|
{ source: 'rich_burdon', target: 'deshaw', active: false },
|
|
@@ -75,13 +89,13 @@ const testRelationships: Record<
|
|
|
75
89
|
],
|
|
76
90
|
|
|
77
91
|
// TODO(burdon): Limit graph view to selected relationship types.
|
|
78
|
-
[
|
|
79
|
-
//
|
|
92
|
+
[DataType.HasConnection.typename]: [
|
|
93
|
+
// prettier-ignore
|
|
80
94
|
{ kind: 'partner', source: 'dxos', target: 'ink_and_switch' },
|
|
81
95
|
{ kind: 'partner', source: 'dxos', target: 'effectful' },
|
|
82
96
|
{ kind: 'partner', source: 'dxos', target: 'socket_supply' },
|
|
83
97
|
|
|
84
|
-
//
|
|
98
|
+
// prettier-ignore
|
|
85
99
|
{ kind: 'investor', source: 'blueyard', target: 'dxos' },
|
|
86
100
|
{ kind: 'investor', source: 'blueyard', target: 'protocol_labs' },
|
|
87
101
|
{ kind: 'investor', source: 'protocol_labs', target: 'dxos' },
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Schema } from 'effect';
|
|
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,279 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { AiTool, AiToolkit } from '@effect/ai';
|
|
6
|
+
import { Console, Schema } from 'effect';
|
|
7
|
+
|
|
8
|
+
import { SERVICES_CONFIG } from '@dxos/ai/testing';
|
|
9
|
+
import {
|
|
10
|
+
Capabilities,
|
|
11
|
+
Events,
|
|
12
|
+
IntentPlugin,
|
|
13
|
+
LayoutAction,
|
|
14
|
+
type Plugin,
|
|
15
|
+
type PluginContext,
|
|
16
|
+
SettingsPlugin,
|
|
17
|
+
allOf,
|
|
18
|
+
contributes,
|
|
19
|
+
createIntent,
|
|
20
|
+
createResolver,
|
|
21
|
+
defineModule,
|
|
22
|
+
definePlugin,
|
|
23
|
+
} from '@dxos/app-framework';
|
|
24
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
25
|
+
import { AiContextBinder, ArtifactId } from '@dxos/assistant';
|
|
26
|
+
import {
|
|
27
|
+
DESIGN_BLUEPRINT,
|
|
28
|
+
PLANNING_BLUEPRINT,
|
|
29
|
+
readDocument,
|
|
30
|
+
readTasks,
|
|
31
|
+
research,
|
|
32
|
+
updateDocument,
|
|
33
|
+
updateTasks,
|
|
34
|
+
} from '@dxos/assistant-testing';
|
|
35
|
+
import { Blueprint, Prompt } from '@dxos/blueprints';
|
|
36
|
+
import { type Space } from '@dxos/client/echo';
|
|
37
|
+
import { Obj, Ref } from '@dxos/echo';
|
|
38
|
+
import { FunctionTrigger, FunctionType, exampleFunctions } from '@dxos/functions';
|
|
39
|
+
import { log } from '@dxos/log';
|
|
40
|
+
import { AttentionPlugin } from '@dxos/plugin-attention';
|
|
41
|
+
import { ClientCapabilities, ClientEvents, ClientPlugin } from '@dxos/plugin-client';
|
|
42
|
+
import { type ClientPluginOptions } from '@dxos/plugin-client/types';
|
|
43
|
+
import { DeckAction } from '@dxos/plugin-deck/types';
|
|
44
|
+
import { GraphPlugin } from '@dxos/plugin-graph';
|
|
45
|
+
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
46
|
+
import { PreviewPlugin } from '@dxos/plugin-preview';
|
|
47
|
+
import { SpacePlugin } from '@dxos/plugin-space';
|
|
48
|
+
import { StorybookLayoutPlugin } from '@dxos/plugin-storybook-layout';
|
|
49
|
+
import { ThemePlugin } from '@dxos/plugin-theme';
|
|
50
|
+
import { Config } from '@dxos/react-client';
|
|
51
|
+
import { defaultTx } from '@dxos/react-ui-theme';
|
|
52
|
+
import { DataType } from '@dxos/schema';
|
|
53
|
+
import { withLayout } from '@dxos/storybook-utils';
|
|
54
|
+
import { trim } from '@dxos/util';
|
|
55
|
+
|
|
56
|
+
import { AssistantPlugin } from '../../AssistantPlugin';
|
|
57
|
+
import { Assistant, AssistantAction } from '../../types';
|
|
58
|
+
|
|
59
|
+
// TODO(burdon): Factor out.
|
|
60
|
+
export const config = {
|
|
61
|
+
remote: new Config({
|
|
62
|
+
runtime: {
|
|
63
|
+
services: SERVICES_CONFIG.REMOTE,
|
|
64
|
+
},
|
|
65
|
+
}),
|
|
66
|
+
persistent: new Config({
|
|
67
|
+
runtime: {
|
|
68
|
+
client: {
|
|
69
|
+
storage: {
|
|
70
|
+
persistent: true,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
services: SERVICES_CONFIG.REMOTE,
|
|
74
|
+
},
|
|
75
|
+
}),
|
|
76
|
+
local: new Config({
|
|
77
|
+
runtime: {
|
|
78
|
+
services: SERVICES_CONFIG.LOCAL,
|
|
79
|
+
},
|
|
80
|
+
}),
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
class TestingToolkit extends AiToolkit.make(
|
|
84
|
+
AiTool.make('open-item', {
|
|
85
|
+
description: trim`
|
|
86
|
+
Opens an item in the application.
|
|
87
|
+
`,
|
|
88
|
+
parameters: {
|
|
89
|
+
id: ArtifactId,
|
|
90
|
+
},
|
|
91
|
+
success: Schema.Any,
|
|
92
|
+
failure: Schema.Never,
|
|
93
|
+
}),
|
|
94
|
+
) {
|
|
95
|
+
static layer = (_context: PluginContext) =>
|
|
96
|
+
TestingToolkit.toLayer({
|
|
97
|
+
'open-item': ({ id }) => Console.log('Called open-item', { id }),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
type DecoratorsProps = Omit<ClientPluginOptions, 'onClientInitialized' | 'onSpacesReady'> & {
|
|
102
|
+
plugins?: Plugin[];
|
|
103
|
+
accessTokens?: DataType.AccessToken[];
|
|
104
|
+
onInit?: (props: { space: Space }) => Promise<void>;
|
|
105
|
+
onChatCreated?: (props: { space: Space; chat: Assistant.Chat; binder: AiContextBinder }) => Promise<void>;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Create storybook decorators.
|
|
110
|
+
*/
|
|
111
|
+
export const getDecorators = ({
|
|
112
|
+
types = [],
|
|
113
|
+
plugins = [],
|
|
114
|
+
accessTokens = [],
|
|
115
|
+
onInit,
|
|
116
|
+
onChatCreated,
|
|
117
|
+
...props
|
|
118
|
+
}: DecoratorsProps) => [
|
|
119
|
+
withPluginManager({
|
|
120
|
+
plugins: [
|
|
121
|
+
// System plugins.
|
|
122
|
+
AttentionPlugin(),
|
|
123
|
+
GraphPlugin(),
|
|
124
|
+
IntentPlugin(),
|
|
125
|
+
SettingsPlugin(),
|
|
126
|
+
SpacePlugin(),
|
|
127
|
+
ClientPlugin({
|
|
128
|
+
types: [
|
|
129
|
+
Markdown.Document,
|
|
130
|
+
Assistant.Chat,
|
|
131
|
+
Blueprint.Blueprint,
|
|
132
|
+
Prompt.Prompt,
|
|
133
|
+
DataType.AccessToken,
|
|
134
|
+
FunctionTrigger,
|
|
135
|
+
FunctionType,
|
|
136
|
+
...types,
|
|
137
|
+
],
|
|
138
|
+
onClientInitialized: async ({ client }) => {
|
|
139
|
+
log('onClientInitialized', { identity: client.halo.identity.get()?.did });
|
|
140
|
+
// Abort if already initialized.
|
|
141
|
+
if (client.halo.identity.get()) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
await client.halo.createIdentity();
|
|
146
|
+
await client.spaces.waitUntilReady();
|
|
147
|
+
|
|
148
|
+
const space = client.spaces.default;
|
|
149
|
+
// TODO(burdon): Should not require this.
|
|
150
|
+
// ERROR: invariant violation: Database was not initialized with root object.
|
|
151
|
+
// TODO(burdon): onSpacesReady is never called.
|
|
152
|
+
await space.waitUntilReady();
|
|
153
|
+
|
|
154
|
+
// Add tokens.
|
|
155
|
+
for (const accessToken of accessTokens) {
|
|
156
|
+
space.db.add(Obj.clone(accessToken));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
await space.db.flush({ indexes: true });
|
|
160
|
+
await onInit?.({ space });
|
|
161
|
+
await space.db.flush({ indexes: true });
|
|
162
|
+
},
|
|
163
|
+
...props,
|
|
164
|
+
}),
|
|
165
|
+
|
|
166
|
+
// Cards
|
|
167
|
+
ThemePlugin({ tx: defaultTx }),
|
|
168
|
+
StorybookLayoutPlugin(),
|
|
169
|
+
PreviewPlugin(),
|
|
170
|
+
|
|
171
|
+
// User plugins.
|
|
172
|
+
AssistantPlugin(),
|
|
173
|
+
|
|
174
|
+
// Custom.
|
|
175
|
+
definePlugin({ id: 'example.com/plugin/testing', name: 'Testing' }, [
|
|
176
|
+
defineModule({
|
|
177
|
+
id: 'example.com/plugin/testing/module/testing',
|
|
178
|
+
activatesOn: Events.SetupArtifactDefinition,
|
|
179
|
+
activate: () => [
|
|
180
|
+
// TODO(burdon): Move into assistnat?
|
|
181
|
+
contributes(Capabilities.BlueprintDefinition, DESIGN_BLUEPRINT),
|
|
182
|
+
contributes(Capabilities.BlueprintDefinition, PLANNING_BLUEPRINT),
|
|
183
|
+
contributes(Capabilities.Functions, [readDocument, updateDocument]),
|
|
184
|
+
contributes(Capabilities.Functions, [readTasks, updateTasks]),
|
|
185
|
+
contributes(Capabilities.Functions, [research]),
|
|
186
|
+
contributes(Capabilities.Functions, [exampleFunctions.reply]),
|
|
187
|
+
],
|
|
188
|
+
}),
|
|
189
|
+
defineModule({
|
|
190
|
+
id: 'example.com/plugin/testing/module/toolkit',
|
|
191
|
+
activatesOn: Events.Startup,
|
|
192
|
+
activate: (context) => [
|
|
193
|
+
contributes(Capabilities.Toolkit, TestingToolkit),
|
|
194
|
+
contributes(Capabilities.ToolkitHandler, TestingToolkit.layer(context)),
|
|
195
|
+
],
|
|
196
|
+
}),
|
|
197
|
+
defineModule({
|
|
198
|
+
id: 'example.com/plugin/testing/module/setup',
|
|
199
|
+
activatesOn: allOf(Events.DispatcherReady, ClientEvents.SpacesReady),
|
|
200
|
+
activate: async (context) => {
|
|
201
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
202
|
+
const space = client.spaces.default;
|
|
203
|
+
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
204
|
+
|
|
205
|
+
// Ensure workspace is set.
|
|
206
|
+
await dispatch(createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: space.id }));
|
|
207
|
+
|
|
208
|
+
// Create initial chat.
|
|
209
|
+
await dispatch(createIntent(AssistantAction.CreateChat, { space }));
|
|
210
|
+
|
|
211
|
+
return [];
|
|
212
|
+
},
|
|
213
|
+
}),
|
|
214
|
+
defineModule({
|
|
215
|
+
id: 'example.com/plugin/testing/module/intent-resolver',
|
|
216
|
+
activatesOn: Events.SetupIntentResolver,
|
|
217
|
+
activate: () => [
|
|
218
|
+
contributes(Capabilities.IntentResolver, [
|
|
219
|
+
createResolver({
|
|
220
|
+
intent: DeckAction.ChangeCompanion,
|
|
221
|
+
resolve: () => ({}),
|
|
222
|
+
}),
|
|
223
|
+
createResolver({
|
|
224
|
+
intent: AssistantAction.CreateChat,
|
|
225
|
+
position: 'hoist',
|
|
226
|
+
resolve: async ({ space, name }) => {
|
|
227
|
+
const queue = space.queues.create();
|
|
228
|
+
const traceQueue = space.queues.create();
|
|
229
|
+
const chat = Obj.make(Assistant.Chat, {
|
|
230
|
+
name,
|
|
231
|
+
queue: Ref.fromDXN(queue.dxn),
|
|
232
|
+
traceQueue: Ref.fromDXN(traceQueue.dxn),
|
|
233
|
+
});
|
|
234
|
+
const binder = new AiContextBinder(queue);
|
|
235
|
+
|
|
236
|
+
// Story-specific behaviour to allow chat creation to be extended.
|
|
237
|
+
space.db.add(chat);
|
|
238
|
+
await space.db.flush({ indexes: true });
|
|
239
|
+
await onChatCreated?.({ space, chat, binder });
|
|
240
|
+
|
|
241
|
+
return {
|
|
242
|
+
data: { object: chat },
|
|
243
|
+
};
|
|
244
|
+
},
|
|
245
|
+
}),
|
|
246
|
+
]),
|
|
247
|
+
],
|
|
248
|
+
}),
|
|
249
|
+
]),
|
|
250
|
+
|
|
251
|
+
// Test-specific.
|
|
252
|
+
...plugins,
|
|
253
|
+
],
|
|
254
|
+
}),
|
|
255
|
+
withLayout({
|
|
256
|
+
fullscreen: true,
|
|
257
|
+
classNames: 'justify-center bg-deckSurface',
|
|
258
|
+
}),
|
|
259
|
+
];
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Creates access tokens from environment variables.
|
|
263
|
+
* @param tokens - Record of token sources mapped to their VITE_ prefixed environment variable values
|
|
264
|
+
* @returns Array of AccessToken objects for non-empty token values
|
|
265
|
+
* @example
|
|
266
|
+
* ```tsx
|
|
267
|
+
* const tokens = accessTokensFromEnv({
|
|
268
|
+
* 'exa.ai': process.env.VITE_EXA_API_KEY,
|
|
269
|
+
* 'linear.app': process.env.VITE_LINEAR_API_KEY
|
|
270
|
+
* });
|
|
271
|
+
* ```
|
|
272
|
+
* @note All environment variables should use the VITE_ prefix for proper Vite bundling
|
|
273
|
+
*/
|
|
274
|
+
|
|
275
|
+
export const accessTokensFromEnv = (tokens: Record<string, string | undefined>) => {
|
|
276
|
+
return Object.entries(tokens)
|
|
277
|
+
.filter(([, token]) => !!token)
|
|
278
|
+
.map(([source, token]) => Obj.make(DataType.AccessToken, { source, token: token! }));
|
|
279
|
+
};
|
package/src/testing/index.ts
CHANGED
|
@@ -0,0 +1,245 @@
|
|
|
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
|
+
// import { faker } from '@dxos/random';
|
|
11
|
+
// import { DataType } from '@dxos/schema';
|
|
12
|
+
// import { type ValueGenerator, createGenerator } from '@dxos/schema/testing';
|
|
13
|
+
// faker.seed(1);
|
|
14
|
+
// const generator = faker as any as ValueGenerator;
|
|
15
|
+
// const objectGenerator = createGenerator(generator, DataType.Organization, { force: true });
|
|
16
|
+
|
|
17
|
+
export const testTypes: Type.Obj.Any[] = [
|
|
18
|
+
DataType.Organization,
|
|
19
|
+
DataType.Person,
|
|
20
|
+
DataType.Employer,
|
|
21
|
+
DataType.HasConnection,
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
export const organizations: (Type.Properties<DataType.Organization> & { id: string })[] = [
|
|
25
|
+
{ id: 'dxos', name: 'DXOS', website: 'https://dxos.org' },
|
|
26
|
+
{ id: 'socket_supply', name: 'Socket Supply', website: 'https://socketsupply.com' },
|
|
27
|
+
{ id: 'ink_and_switch', name: 'Ink & Switch', website: 'https://inkandswitch.com' },
|
|
28
|
+
{ id: 'effectful', name: 'Effectful', website: 'https://effect.co' },
|
|
29
|
+
{ id: 'blueyard', name: 'Blue Yard', website: 'https://blueyard.com' },
|
|
30
|
+
{ id: 'backed', name: 'Backed', website: 'https://backed.vc' },
|
|
31
|
+
{ id: 'protocol_labs', name: 'Protocol Labs', website: 'https://protocol.ai' },
|
|
32
|
+
{ id: 'newlab', name: 'Newlab', website: 'https://newlab.com' },
|
|
33
|
+
{ id: 'google', name: 'Google', website: 'https://google.com' },
|
|
34
|
+
{ id: 'microsoft', name: 'Microsoft', website: 'https://microsoft.com' },
|
|
35
|
+
{ id: 'openai', name: 'OpenAI', website: 'https://openai.com' },
|
|
36
|
+
{ id: 'anthropic', name: 'Anthropic', website: 'https://anthropic.com' },
|
|
37
|
+
{ id: 'amazon', name: 'Amazon', website: 'https://amazon.com' },
|
|
38
|
+
{ id: 'deshaw', name: 'D. E. Shaw & Co.', website: 'https://deshaw.com' },
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
export const people: (Type.Properties<DataType.Person> & { id: string })[] = [
|
|
42
|
+
{ id: 'rich_burdon', fullName: 'Rich Burdon' },
|
|
43
|
+
{ id: 'josiah_witt', fullName: 'Josiah Witt' },
|
|
44
|
+
{ id: 'dima_dmaretskyi', fullName: 'Dima Maretskyi' },
|
|
45
|
+
{ id: 'chad_fowler', fullName: 'Chad Fowler' },
|
|
46
|
+
{ id: 'ciaran_oleary', fullName: "Ciarán O'Leary" },
|
|
47
|
+
{ id: 'jason_whitmire', fullName: 'Jason Whitmire' },
|
|
48
|
+
{ id: 'alex_brunicki', fullName: 'Alex Brunicki' },
|
|
49
|
+
{ id: 'andre_de_haes', fullName: 'Andre de Haes' },
|
|
50
|
+
{ id: 'scott_cohen', fullName: 'Scott Cohen' },
|
|
51
|
+
{ id: 'juan_benet', fullName: 'Juan Benet' },
|
|
52
|
+
{ id: 'satya_nadella', fullName: 'Satya Nadella' },
|
|
53
|
+
{ id: 'kevin_scott', fullName: 'Kevin Scott' },
|
|
54
|
+
{ id: 'jeff_bezos', fullName: 'Jeff Bezos' },
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
const testObjects: Record<string, any[]> = {
|
|
58
|
+
[DataType.Organization.typename]: organizations,
|
|
59
|
+
[DataType.Person.typename]: people,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const testRelationships: Record<
|
|
63
|
+
string,
|
|
64
|
+
({
|
|
65
|
+
source: string;
|
|
66
|
+
target: string;
|
|
67
|
+
} & Record<string, any>)[]
|
|
68
|
+
> = {
|
|
69
|
+
[DataType.Employer.typename]: [
|
|
70
|
+
// prettier-ignore
|
|
71
|
+
{ source: 'rich_burdon', target: 'dxos' },
|
|
72
|
+
{ source: 'rich_burdon', target: 'google', active: false }, // TODO(burdon): Should not contribute to force.
|
|
73
|
+
{ source: 'rich_burdon', target: 'deshaw', active: false },
|
|
74
|
+
{ source: 'josiah_witt', target: 'dxos' },
|
|
75
|
+
{ source: 'dima_dmaretskyi', target: 'dxos' },
|
|
76
|
+
{ source: 'chad_fowler', target: 'blueyard' },
|
|
77
|
+
{ source: 'chad_fowler', target: 'microsoft', active: false },
|
|
78
|
+
{ source: 'ciaran_oleary', target: 'blueyard' },
|
|
79
|
+
{ source: 'jason_whitmire', target: 'blueyard' },
|
|
80
|
+
{ source: 'juan_benet', target: 'protocol_labs' },
|
|
81
|
+
{ source: 'alex_brunicki', target: 'backed' },
|
|
82
|
+
{ source: 'andre_de_haes', target: 'backed' },
|
|
83
|
+
{ source: 'scott_cohen', target: 'newlab' },
|
|
84
|
+
{ source: 'satya_nadella', target: 'microsoft' },
|
|
85
|
+
{ source: 'kevin_scott', target: 'microsoft' },
|
|
86
|
+
{ source: 'kevin_scott', target: 'google', active: false },
|
|
87
|
+
{ source: 'jeff_bezos', target: 'amazon' },
|
|
88
|
+
{ source: 'jeff_bezos', target: 'deshaw', active: false },
|
|
89
|
+
],
|
|
90
|
+
|
|
91
|
+
// TODO(burdon): Limit graph view to selected relationship types.
|
|
92
|
+
[DataType.HasConnection.typename]: [
|
|
93
|
+
// prettier-ignore
|
|
94
|
+
{ kind: 'partner', source: 'dxos', target: 'ink_and_switch' },
|
|
95
|
+
{ kind: 'partner', source: 'dxos', target: 'effectful' },
|
|
96
|
+
{ kind: 'partner', source: 'dxos', target: 'socket_supply' },
|
|
97
|
+
|
|
98
|
+
// prettier-ignore
|
|
99
|
+
{ kind: 'investor', source: 'blueyard', target: 'dxos' },
|
|
100
|
+
{ kind: 'investor', source: 'blueyard', target: 'protocol_labs' },
|
|
101
|
+
{ kind: 'investor', source: 'protocol_labs', target: 'dxos' },
|
|
102
|
+
{ kind: 'investor', source: 'backed', target: 'dxos' },
|
|
103
|
+
{ kind: 'investor', source: 'newlab', target: 'dxos' },
|
|
104
|
+
{ kind: 'investor', source: 'microsoft', target: 'openai' },
|
|
105
|
+
{ kind: 'investor', source: 'google', target: 'anthropic' },
|
|
106
|
+
{ kind: 'investor', source: 'amazon', target: 'anthropic' },
|
|
107
|
+
],
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const addTestData = async (space: Space): Promise<void> => {
|
|
111
|
+
const objectMap = new Map<string, Live<any>>();
|
|
112
|
+
|
|
113
|
+
for (const [typename, objects] of Object.entries(testObjects)) {
|
|
114
|
+
const schema = space.db.graph.schemaRegistry.getSchema(typename);
|
|
115
|
+
invariant(schema, `Schema not found: ${typename}`);
|
|
116
|
+
for (const { id, ...data } of objects) {
|
|
117
|
+
const object = space.db.add(Obj.make(schema, data));
|
|
118
|
+
objectMap.set(id, object);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
for (const [typename, relationships] of Object.entries(testRelationships)) {
|
|
123
|
+
const schema = space.db.graph.schemaRegistry.getSchema(typename);
|
|
124
|
+
invariant(schema, `Schema not found: ${typename}`);
|
|
125
|
+
|
|
126
|
+
for (const { source, target, ...data } of relationships) {
|
|
127
|
+
const sourceObject = objectMap.get(source);
|
|
128
|
+
const targetObject = objectMap.get(target);
|
|
129
|
+
invariant(sourceObject, `Source object not found: ${source}`);
|
|
130
|
+
invariant(targetObject, `Target object not found: ${target}`);
|
|
131
|
+
|
|
132
|
+
space.db.add(
|
|
133
|
+
Relation.make(schema, {
|
|
134
|
+
// TODO(burdon): Test source/target types match.
|
|
135
|
+
[Relation.Source]: sourceObject,
|
|
136
|
+
[Relation.Target]: targetObject,
|
|
137
|
+
...data,
|
|
138
|
+
}),
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export const createTestTranscription = (): DataType.Message[] => {
|
|
145
|
+
const timeInterval = 1_000;
|
|
146
|
+
const transcription: DataType.Message[] = [
|
|
147
|
+
{
|
|
148
|
+
text: 'Hey everyone, glad we could all connect today. I was thinking we could discuss where AI might be heading in the next decade.',
|
|
149
|
+
sender: 'Mykola',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
text: 'Yeah, that sounds great. Personally, I think AI will get deeply integrated into daily life—like assistants that don’t just answer questions but anticipate our needs.',
|
|
153
|
+
sender: 'Rich',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
text: 'That’s true, but there are risks too. If AI predicts too much, we might lose the sense of making decisions ourselves.',
|
|
157
|
+
sender: 'Dima',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
text: 'Good point. I think the balance will come from better human-AI collaboration rather than pure automation.',
|
|
161
|
+
sender: 'Dima',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
text: 'Right, like AI as a co-pilot instead of a replacement. I see that happening a lot in creative fields already.',
|
|
165
|
+
sender: 'Mykola',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
text: 'Exactly. And in science, too—AI models can suggest hypotheses humans wouldn’t think of, speeding up discoveries.',
|
|
169
|
+
sender: 'Rich',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
text: 'So it looks like the future is less about AI replacing us, and more about AI amplifying what humans can do.',
|
|
173
|
+
sender: 'Dima',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
text: 'I think we should research alignment of AI with human values.',
|
|
177
|
+
sender: 'Mykola',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
text: 'I agree. We should also research the risks of AI generating content and polluting knowledge bases.',
|
|
181
|
+
sender: 'Rich',
|
|
182
|
+
},
|
|
183
|
+
].map((message, index, array) => {
|
|
184
|
+
const created = new Date(Date.now() - (array.length - index) * timeInterval);
|
|
185
|
+
return Obj.make(DataType.Message, {
|
|
186
|
+
created: created.toISOString(),
|
|
187
|
+
blocks: [{ _tag: 'transcript', started: created.toISOString(), text: message.text }],
|
|
188
|
+
sender: { identityDid: message.sender },
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
return transcription;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
// TODO(wittjosiah): Find way to use data generator to generate substantive messages that could be summarized.
|
|
196
|
+
export const createTestMailbox = (): DataType.Message[] => {
|
|
197
|
+
const timeInterval = 1000;
|
|
198
|
+
const messages: DataType.Message[] = [
|
|
199
|
+
{
|
|
200
|
+
text: 'Subject: Project Kickoff\n\nHi team,\n\nWe are excited to announce the kickoff of the Apollo project. Please review the attached roadmap and be prepared for our first meeting on Monday.\n\nBest,\nAlice',
|
|
201
|
+
sender: 'alice.johnson@acme-corp.com',
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
text: 'Subject: Sales Update\n\nDear all,\n\nQ2 sales numbers have exceeded expectations. Congratulations to everyone for their hard work!\n\nRegards,\nBob',
|
|
205
|
+
sender: 'bob.smith@salesforce.biz',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
text: 'Subject: Invoice Reminder\n\nHello,\n\nThis is a friendly reminder that invoice #12345 is due next week. Please let us know if you have any questions.\n\nThank you,\nCarol',
|
|
209
|
+
sender: 'carol.finance@invoicesolutions.com',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
text: 'Subject: Meeting Rescheduled\n\nHi team,\n\nTomorrow’s product design meeting has been moved to Friday at 2pm. Please update your calendars.\n\nThanks,\nDavid',
|
|
213
|
+
sender: 'david.lee@productdesign.io',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
text: 'Subject: Welcome Aboard!\n\nWelcome to the company, Emily! We are thrilled to have you join the marketing department.\n\nBest,\nFiona',
|
|
217
|
+
sender: 'fiona.hr@enterpriseco.com',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
text: 'Subject: IT Maintenance\n\nDear colleagues,\n\nScheduled IT maintenance will occur this Saturday from 1am to 5am. Please save your work accordingly.\n\nSincerely,\nGreg',
|
|
221
|
+
sender: 'greg.it@supporthub.net',
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
text: 'Subject: Lunch & Learn\n\nJoin us for a Lunch & Learn session on cloud security this Thursday in the main conference room.\n\nSee you there,\nHelen',
|
|
225
|
+
sender: 'helen.training@acme-corp.com',
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
text: 'Subject: Client Feedback\n\nHi,\n\nOur client, InnovateX, sent positive feedback on the recent deployment. Great job, everyone!\n\nCheers,\nIvan',
|
|
229
|
+
sender: 'ivan.account@consultingpartners.org',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
text: 'Subject: Policy Update\n\nPlease review the updated remote work policy attached to this email. Let us know if you have any questions.\n\nBest regards,\nJulia',
|
|
233
|
+
sender: 'julia.admin@acme-corp.com',
|
|
234
|
+
},
|
|
235
|
+
].map((message, index, array) => {
|
|
236
|
+
const created = new Date(Date.now() - (array.length - index) * timeInterval);
|
|
237
|
+
return Obj.make(DataType.Message, {
|
|
238
|
+
created: created.toISOString(),
|
|
239
|
+
blocks: [{ _tag: 'text', text: message.text }],
|
|
240
|
+
sender: { email: message.sender },
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
return messages;
|
|
245
|
+
};
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { DEFAULT_EDGE_MODEL
|
|
6
|
-
import { createSystemPrompt } from '@dxos/
|
|
5
|
+
import { DEFAULT_EDGE_MODEL } from '@dxos/ai';
|
|
6
|
+
import { createSystemPrompt } from '@dxos/assistant';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import { type AiChatProcessorOptions } from '../processor';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated
|
|
12
|
+
*/
|
|
13
|
+
export const createProcessorOptions = (): Pick<AiChatProcessorOptions, 'model' | 'system'> => ({
|
|
9
14
|
model: DEFAULT_EDGE_MODEL,
|
|
10
|
-
|
|
15
|
+
system: createSystemPrompt({}),
|
|
11
16
|
});
|