@dxos/plugin-automation 0.7.5-main.9d2a38b → 0.7.5-main.e9bb01b

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.
Files changed (58) hide show
  1. package/dist/lib/browser/{AssistantPanel-N276BTPV.mjs → AssistantPanel-NTOUHOWA.mjs} +3 -3
  2. package/dist/lib/browser/{AssistantPanel-N276BTPV.mjs.map → AssistantPanel-NTOUHOWA.mjs.map} +2 -2
  3. package/dist/lib/browser/{AutomationPanel-IHZ4JKVS.mjs → AutomationPanel-KT3YFV56.mjs} +8 -9
  4. package/dist/lib/browser/AutomationPanel-KT3YFV56.mjs.map +7 -0
  5. package/dist/lib/browser/{app-graph-builder-IJTTULDP.mjs → app-graph-builder-6FSMLMT4.mjs} +2 -2
  6. package/dist/lib/browser/chunk-4ODBJDXM.mjs +10 -0
  7. package/dist/lib/browser/{chunk-HKX3D3ZP.mjs → chunk-DQ7ZSYJJ.mjs} +2 -2
  8. package/dist/lib/browser/{chunk-HKX3D3ZP.mjs.map → chunk-DQ7ZSYJJ.mjs.map} +2 -2
  9. package/dist/lib/browser/index.mjs +8 -8
  10. package/dist/lib/browser/index.mjs.map +3 -3
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/lib/browser/{react-surface-LL72F3F4.mjs → react-surface-5YTE5MRE.mjs} +3 -3
  13. package/dist/lib/node/{AssistantPanel-Z4GVHUF3.cjs → AssistantPanel-U7GDWPRC.cjs} +7 -7
  14. package/dist/lib/node/{AssistantPanel-Z4GVHUF3.cjs.map → AssistantPanel-U7GDWPRC.cjs.map} +2 -2
  15. package/dist/lib/node/{AutomationPanel-PPODB5XA.cjs → AutomationPanel-H5WE4FIU.cjs} +13 -14
  16. package/dist/lib/node/AutomationPanel-H5WE4FIU.cjs.map +7 -0
  17. package/dist/lib/node/{app-graph-builder-MF5M4QRS.cjs → app-graph-builder-65TBXO3I.cjs} +12 -12
  18. package/dist/lib/node/{chunk-25AQIF3L.cjs → chunk-JUSXT4U5.cjs} +6 -6
  19. package/dist/lib/node/{chunk-5VF5JKUN.cjs → chunk-TQEDPRY5.cjs} +5 -5
  20. package/dist/lib/node/{chunk-5VF5JKUN.cjs.map → chunk-TQEDPRY5.cjs.map} +2 -2
  21. package/dist/lib/node/index.cjs +22 -22
  22. package/dist/lib/node/index.cjs.map +3 -3
  23. package/dist/lib/node/meta.json +1 -1
  24. package/dist/lib/node/{react-surface-DVAU4MGD.cjs → react-surface-S6U5ISJ6.cjs} +10 -10
  25. package/dist/lib/node-esm/{AssistantPanel-DDCQHBJX.mjs → AssistantPanel-M67P24GS.mjs} +3 -3
  26. package/dist/lib/node-esm/{AssistantPanel-DDCQHBJX.mjs.map → AssistantPanel-M67P24GS.mjs.map} +2 -2
  27. package/dist/lib/node-esm/{AutomationPanel-R3D6CRF5.mjs → AutomationPanel-MW42U6I4.mjs} +8 -9
  28. package/dist/lib/node-esm/{AutomationPanel-R3D6CRF5.mjs.map → AutomationPanel-MW42U6I4.mjs.map} +3 -3
  29. package/dist/lib/node-esm/{app-graph-builder-5N7OK23B.mjs → app-graph-builder-4SD4F3KN.mjs} +2 -2
  30. package/dist/lib/node-esm/{chunk-X3LPRWIL.mjs → chunk-JFHI22MF.mjs} +2 -2
  31. package/dist/lib/node-esm/{chunk-X3LPRWIL.mjs.map → chunk-JFHI22MF.mjs.map} +2 -2
  32. package/dist/lib/node-esm/{chunk-XW7TEQA3.mjs → chunk-XVIEXSEZ.mjs} +3 -3
  33. package/dist/lib/node-esm/index.mjs +8 -8
  34. package/dist/lib/node-esm/index.mjs.map +3 -3
  35. package/dist/lib/node-esm/meta.json +1 -1
  36. package/dist/lib/node-esm/{react-surface-4BED2PZ4.mjs → react-surface-RWTR3TKT.mjs} +3 -3
  37. package/dist/types/src/capabilities/app-graph-builder.d.ts +22 -22
  38. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  39. package/dist/types/src/capabilities/index.d.ts +25 -25
  40. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  41. package/dist/types/src/meta.d.ts.map +1 -1
  42. package/package.json +38 -38
  43. package/src/AutomationPlugin.tsx +4 -4
  44. package/src/components/AssistantPanel/AssistantPanel.tsx +1 -4
  45. package/src/components/TriggerEditor/TriggerEditor.tsx +9 -9
  46. package/src/meta.ts +2 -1
  47. package/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs.map +0 -7
  48. package/dist/lib/browser/chunk-4AIMDHKY.mjs +0 -10
  49. package/dist/lib/node/AutomationPanel-PPODB5XA.cjs.map +0 -7
  50. /package/dist/lib/browser/{app-graph-builder-IJTTULDP.mjs.map → app-graph-builder-6FSMLMT4.mjs.map} +0 -0
  51. /package/dist/lib/browser/{chunk-4AIMDHKY.mjs.map → chunk-4ODBJDXM.mjs.map} +0 -0
  52. /package/dist/lib/browser/{react-surface-LL72F3F4.mjs.map → react-surface-5YTE5MRE.mjs.map} +0 -0
  53. /package/dist/lib/node/{app-graph-builder-MF5M4QRS.cjs.map → app-graph-builder-65TBXO3I.cjs.map} +0 -0
  54. /package/dist/lib/node/{chunk-25AQIF3L.cjs.map → chunk-JUSXT4U5.cjs.map} +0 -0
  55. /package/dist/lib/node/{react-surface-DVAU4MGD.cjs.map → react-surface-S6U5ISJ6.cjs.map} +0 -0
  56. /package/dist/lib/node-esm/{app-graph-builder-5N7OK23B.mjs.map → app-graph-builder-4SD4F3KN.mjs.map} +0 -0
  57. /package/dist/lib/node-esm/{chunk-XW7TEQA3.mjs.map → chunk-XVIEXSEZ.mjs.map} +0 -0
  58. /package/dist/lib/node-esm/{react-surface-4BED2PZ4.mjs.map → react-surface-RWTR3TKT.mjs.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const AUTOMATION_PLUGIN = 'dxos.org/plugin/automation';\n\nexport const meta = {\n id: AUTOMATION_PLUGIN,\n name: 'Automation',\n description: 'Automation workflows.',\n icon: 'ph--magic-wand--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-automation',\n tags: ['experimental'],\n} satisfies PluginMeta;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAMA,oBAAoB;AAE1B,IAAMC,OAAO;EAClBC,IAAIF;EACJG,MAAM;EACNC,aAAa;EACbC,MAAM;EACNC,QAAQ;EACRC,MAAM;IAAC;;AACT;",
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const AUTOMATION_PLUGIN = 'dxos.org/plugin/automation';\n\nexport const meta = {\n id: AUTOMATION_PLUGIN,\n name: 'Automation',\n description:\n 'The Automation tab allows you to trigger pre-defined workflows related to the element you are interacting with inside of Composer.',\n icon: 'ph--magic-wand--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-automation',\n tags: ['experimental'],\n} satisfies PluginMeta;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAMA,oBAAoB;AAE1B,IAAMC,OAAO;EAClBC,IAAIF;EACJG,MAAM;EACNC,aACE;EACFC,MAAM;EACNC,QAAQ;EACRC,MAAM;IAAC;;AACT;",
6
6
  "names": ["AUTOMATION_PLUGIN", "meta", "id", "name", "description", "icon", "source", "tags"]
7
7
  }
@@ -28,22 +28,22 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var node_exports = {};
30
30
  __export(node_exports, {
31
- AUTOMATION_PLUGIN: () => import_chunk_5VF5JKUN.AUTOMATION_PLUGIN,
32
- AssistantPanel: () => import_chunk_25AQIF3L.AssistantPanel,
33
- AutomationPanel: () => import_chunk_25AQIF3L.AutomationPanel,
31
+ AUTOMATION_PLUGIN: () => import_chunk_TQEDPRY5.AUTOMATION_PLUGIN,
32
+ AssistantPanel: () => import_chunk_JUSXT4U5.AssistantPanel,
33
+ AutomationPanel: () => import_chunk_JUSXT4U5.AutomationPanel,
34
34
  AutomationPlugin: () => AutomationPlugin,
35
35
  ChainInputSchema: () => import_chunk_JNDMZQH7.ChainInputSchema,
36
36
  ChainInputType: () => import_chunk_JNDMZQH7.ChainInputType,
37
37
  ChainPromptType: () => import_chunk_JNDMZQH7.ChainPromptType,
38
38
  ChainType: () => import_chunk_JNDMZQH7.ChainType,
39
39
  chainPresets: () => chainPresets,
40
- meta: () => import_chunk_5VF5JKUN.meta,
40
+ meta: () => import_chunk_TQEDPRY5.meta,
41
41
  str: () => str
42
42
  });
43
43
  module.exports = __toCommonJS(node_exports);
44
44
  var import_chunk_JNDMZQH7 = require("./chunk-JNDMZQH7.cjs");
45
- var import_chunk_25AQIF3L = require("./chunk-25AQIF3L.cjs");
46
- var import_chunk_5VF5JKUN = require("./chunk-5VF5JKUN.cjs");
45
+ var import_chunk_JUSXT4U5 = require("./chunk-JUSXT4U5.cjs");
46
+ var import_chunk_TQEDPRY5 = require("./chunk-TQEDPRY5.cjs");
47
47
  var import_app_framework = require("@dxos/app-framework");
48
48
  var import_functions = require("@dxos/functions");
49
49
  var import_plugin_client = require("@dxos/plugin-client");
@@ -51,12 +51,12 @@ var import_plugin_deck = require("@dxos/plugin-deck");
51
51
  var import_echo = require("@dxos/react-client/echo");
52
52
  var import_app_framework2 = require("@dxos/app-framework");
53
53
  var import_live_object = require("@dxos/live-object");
54
- var AppGraphBuilder = (0, import_app_framework2.lazy)(() => import("./app-graph-builder-MF5M4QRS.cjs"));
55
- var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-DVAU4MGD.cjs"));
54
+ var AppGraphBuilder = (0, import_app_framework2.lazy)(() => import("./app-graph-builder-65TBXO3I.cjs"));
55
+ var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-S6U5ISJ6.cjs"));
56
56
  var translations_default = [
57
57
  {
58
58
  "en-US": {
59
- [import_chunk_5VF5JKUN.AUTOMATION_PLUGIN]: {
59
+ [import_chunk_TQEDPRY5.AUTOMATION_PLUGIN]: {
60
60
  "plugin name": "Automation",
61
61
  "object placeholder": "New prompt",
62
62
  "create object label": "Create prompt",
@@ -93,22 +93,22 @@ var translations_default = [
93
93
  }
94
94
  }
95
95
  ];
96
- var AutomationPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_5VF5JKUN.meta, [
96
+ var AutomationPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_TQEDPRY5.meta, [
97
97
  (0, import_app_framework.defineModule)({
98
- id: `${import_chunk_5VF5JKUN.meta.id}/module/translations`,
98
+ id: `${import_chunk_TQEDPRY5.meta.id}/module/translations`,
99
99
  activatesOn: import_app_framework.Events.SetupTranslations,
100
100
  activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Translations, translations_default)
101
101
  }),
102
102
  (0, import_app_framework.defineModule)({
103
- id: `${import_chunk_5VF5JKUN.meta.id}/module/metadata`,
104
- activatesOn: (0, import_app_framework.oneOf)(import_app_framework.Events.Startup, import_app_framework.Events.SetupAppGraph),
103
+ id: `${import_chunk_TQEDPRY5.meta.id}/module/metadata`,
104
+ activatesOn: import_app_framework.Events.SetupMetadata,
105
105
  activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Metadata, {
106
106
  id: import_chunk_JNDMZQH7.ChainType.typename,
107
107
  metadata: {
108
108
  placeholder: [
109
109
  "object placeholder",
110
110
  {
111
- ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
111
+ ns: import_chunk_TQEDPRY5.AUTOMATION_PLUGIN
112
112
  }
113
113
  ],
114
114
  icon: "ph--magic-wand--regular",
@@ -118,8 +118,8 @@ var AutomationPlugin = () => (0, import_app_framework.definePlugin)(import_chunk
118
118
  })
119
119
  }),
120
120
  (0, import_app_framework.defineModule)({
121
- id: `${import_chunk_5VF5JKUN.meta.id}/module/schema`,
122
- activatesOn: import_plugin_client.ClientEvents.SetupClient,
121
+ id: `${import_chunk_TQEDPRY5.meta.id}/module/schema`,
122
+ activatesOn: import_plugin_client.ClientEvents.SetupSchema,
123
123
  activate: () => (0, import_app_framework.contributes)(import_plugin_client.ClientCapabilities.SystemSchema, [
124
124
  import_chunk_JNDMZQH7.ChainType,
125
125
  import_chunk_JNDMZQH7.ChainPromptType,
@@ -127,7 +127,7 @@ var AutomationPlugin = () => (0, import_app_framework.definePlugin)(import_chunk
127
127
  ])
128
128
  }),
129
129
  (0, import_app_framework.defineModule)({
130
- id: `${import_chunk_5VF5JKUN.meta.id}/module/complementary-panels`,
130
+ id: `${import_chunk_TQEDPRY5.meta.id}/module/complementary-panels`,
131
131
  activatesOn: import_app_framework.Events.Startup,
132
132
  activate: () => [
133
133
  (0, import_app_framework.contributes)(import_plugin_deck.DeckCapabilities.ComplementaryPanel, {
@@ -135,7 +135,7 @@ var AutomationPlugin = () => (0, import_app_framework.definePlugin)(import_chunk
135
135
  label: [
136
136
  "automation panel label",
137
137
  {
138
- ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
138
+ ns: import_chunk_TQEDPRY5.AUTOMATION_PLUGIN
139
139
  }
140
140
  ],
141
141
  icon: "ph--magic-wand--regular"
@@ -145,7 +145,7 @@ var AutomationPlugin = () => (0, import_app_framework.definePlugin)(import_chunk
145
145
  label: [
146
146
  "assistant panel label",
147
147
  {
148
- ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
148
+ ns: import_chunk_TQEDPRY5.AUTOMATION_PLUGIN
149
149
  }
150
150
  ],
151
151
  icon: "ph--atom--regular"
@@ -153,12 +153,12 @@ var AutomationPlugin = () => (0, import_app_framework.definePlugin)(import_chunk
153
153
  ]
154
154
  }),
155
155
  (0, import_app_framework.defineModule)({
156
- id: `${import_chunk_5VF5JKUN.meta.id}/module/react-surface`,
157
- activatesOn: import_app_framework.Events.Startup,
156
+ id: `${import_chunk_TQEDPRY5.meta.id}/module/react-surface`,
157
+ activatesOn: import_app_framework.Events.SetupSurfaces,
158
158
  activate: ReactSurface
159
159
  }),
160
160
  (0, import_app_framework.defineModule)({
161
- id: `${import_chunk_5VF5JKUN.meta.id}/module/app-graph-builder`,
161
+ id: `${import_chunk_TQEDPRY5.meta.id}/module/app-graph-builder`,
162
162
  activatesOn: import_app_framework.Events.SetupAppGraph,
163
163
  activate: AppGraphBuilder
164
164
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/AutomationPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts", "../../../src/presets.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, defineModule, definePlugin, Events, oneOf } from '@dxos/app-framework';\nimport { FunctionTrigger } from '@dxos/functions';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { DeckCapabilities } from '@dxos/plugin-deck';\nimport { RefArray } from '@dxos/react-client/echo';\n\nimport { AppGraphBuilder, ReactSurface } from './capabilities';\nimport { AUTOMATION_PLUGIN, meta } from './meta';\nimport translations from './translations';\nimport { ChainPromptType, ChainType } from './types';\n\nexport const AutomationPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: ChainType.typename,\n metadata: {\n placeholder: ['object placeholder', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--magic-wand--regular',\n // TODO(wittjosiah): Move out of metadata.\n loadReferences: async (chain: ChainType) => await RefArray.loadAll(chain.prompts ?? []),\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupClient,\n activate: () => contributes(ClientCapabilities.SystemSchema, [ChainType, ChainPromptType, FunctionTrigger]),\n }),\n defineModule({\n id: `${meta.id}/module/complementary-panels`,\n activatesOn: Events.Startup,\n activate: () => [\n contributes(DeckCapabilities.ComplementaryPanel, {\n id: 'automation',\n label: ['automation panel label', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--magic-wand--regular',\n }),\n contributes(DeckCapabilities.ComplementaryPanel, {\n id: 'assistant',\n label: ['assistant panel label', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--atom--regular',\n }),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.Startup,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/app-graph-builder`,\n activatesOn: Events.SetupAppGraph,\n activate: AppGraphBuilder,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(() => import('./app-graph-builder'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { AUTOMATION_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [AUTOMATION_PLUGIN]: {\n 'plugin name': 'Automation',\n 'object placeholder': 'New prompt',\n 'create object label': 'Create prompt',\n 'create trigger label': 'Create trigger',\n 'create stack section label': 'Create prompt',\n 'command placeholder': 'Enter slash command...',\n 'template placeholder': 'Enter template...',\n 'value placeholder': 'Enter value...',\n 'select preset template placeholder': 'Select preset',\n 'open automation panel label': 'Show Automations',\n 'automation panel label': 'Automations',\n\n 'function select label': 'Function',\n 'function select placeholder': 'Select function',\n 'function enabled': 'Enabled',\n 'trigger select label': 'Trigger',\n 'trigger select placeholder': 'Trigger type',\n\n 'trigger type timer': 'Timer',\n 'trigger type webhook': 'Webhook',\n 'trigger type websocket': 'Websocket',\n 'trigger type subscription': 'Subscription',\n 'trigger type email': 'Email',\n\n 'trigger filter': 'Filter',\n 'trigger cron': 'Cron',\n 'trigger method': 'Method',\n 'trigger endpoint': 'Endpoint',\n\n 'trigger copy url': 'Copy URL',\n 'trigger copy email': 'Copy Email',\n\n 'trigger meta add': 'Add',\n 'trigger meta remove': 'Remove',\n 'trigger meta prop name placeholder': 'New meta property name',\n\n 'open assistant panel label': 'Show Assistant',\n 'assistant panel label': 'Assistant',\n },\n },\n },\n];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { create } from '@dxos/live-object';\n\nimport { ChainInputType, ChainPromptType } from './types';\n\nexport const str = (...text: (string | undefined | boolean)[]): string =>\n text\n .filter((value) => value !== undefined && value !== false)\n .flat()\n .join('\\n');\n\nexport type Preset = {\n id: string;\n title: string;\n createPrompt: () => ChainPromptType;\n};\n\nexport const chainPresets: Preset[] = [\n {\n id: 'dxos.org/prompt/translate',\n title: 'Translate',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'say',\n template: str(\n // prettier-ignore\n 'Translate the following into {language}:',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.VALUE,\n name: 'language',\n value: 'japanese',\n },\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'input',\n },\n // TODO(burdon): Message.\n // {\n // type: ChainInputType.CONTEXT,\n // name: 'input',\n // value: 'object.text',\n // },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/chess',\n title: 'Chess',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'hint',\n template: str(\n // prettier-ignore\n 'You are a machine that is an expert chess player.',\n '',\n 'The move history of the current game is: {history}',\n '',\n 'Suggest the next move and very briefly explain your strategy in a couple of sentences.',\n ),\n inputs: [\n {\n type: ChainInputType.CONTEXT,\n name: 'history',\n value: 'object.pgn',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/mermaid',\n title: 'Mermaid',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'draw',\n template: str(\n // prettier-ignore\n 'Create a simplified mermaid graph representing the text below.',\n 'Do not explain anything.',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'input',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/list',\n title: 'List',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'list',\n template: str(\n // prettier-ignore\n 'You are a machine that only replies with valid, iterable RFC8259 compliant JSON in your responses.',\n 'Your entire response should be a single array of JSON objects.',\n '',\n 'Your entire response should be a map where the key is the type and the value is a single array of JSON objects conforming to the following types:',\n '',\n '{schema}',\n '',\n '---',\n '',\n '{question}',\n ),\n inputs: [\n {\n type: ChainInputType.SCHEMA,\n name: 'schema',\n value: 'example.com/type/project',\n },\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'question',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/base',\n title: 'RAG',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'rag',\n template: str(\n // prettier-ignore\n \"Very briefly answer the question based only on the following context and say if you don't know the answer.\",\n // 'answer the question using the following context as well as your training data:',\n '',\n '{context}',\n '',\n '---',\n '',\n 'question: {question}',\n ),\n inputs: [\n {\n type: ChainInputType.RETRIEVER,\n name: 'context',\n },\n {\n type: ChainInputType.CONTEXT,\n name: 'question',\n value: 'object.text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/lookup',\n title: 'Lookup',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'lookup',\n template: str(\n // prettier-ignore\n 'Lookup and very briefly summarize the following topic in one or two sentences:',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.CONTEXT,\n name: 'input',\n value: 'text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/extract',\n title: 'Extract',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'extract',\n template: str(\n // prettier-ignore\n 'List all people and companies mentioned in the text below.',\n '',\n 'You are a machine that only replies with valid, iterable RFC8259 compliant JSON in your responses.',\n 'Your entire response should be a map where the key is the type and the value is a single array of JSON objects conforming to the following types:',\n '',\n '{contact}',\n '{company}',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.SCHEMA,\n name: 'contact',\n value: 'example.com/type/contact',\n },\n {\n type: ChainInputType.SCHEMA,\n name: 'company',\n value: 'example.com/type/organization',\n },\n {\n type: ChainInputType.CONTEXT,\n name: 'input',\n value: 'text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/discord',\n title: 'Summarize',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'summarize',\n template: str(\n // prettier-ignore\n 'Summarize what the team is working on and format it as a markdown table without any explanation.',\n '',\n '---',\n '',\n '{context}',\n ),\n inputs: [\n {\n type: ChainInputType.RESOLVER,\n name: 'context',\n value: 'discord.messages.recent',\n },\n ],\n }),\n },\n];\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAqF;AACrF,uBAAgC;AAChC,2BAAiD;AACjD,yBAAiC;AACjC,kBAAyB;ACJzB,IAAAA,wBAAqB;AEArB,yBAAuB;AFEhB,IAAMC,sBAAkBC,4BAAK,MAAM,OAAO,kCAAA,CAAA;AAC1C,IAAMC,mBAAeD,4BAAK,MAAM,OAAO,8BAAA,CAAA;ACD9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,uCAAAA,GAAoB;QACnB,eAAe;QACf,sBAAsB;QACtB,uBAAuB;QACvB,wBAAwB;QACxB,8BAA8B;QAC9B,uBAAuB;QACvB,wBAAwB;QACxB,qBAAqB;QACrB,sCAAsC;QACtC,+BAA+B;QAC/B,0BAA0B;QAE1B,yBAAyB;QACzB,+BAA+B;QAC/B,oBAAoB;QACpB,wBAAwB;QACxB,8BAA8B;QAE9B,sBAAsB;QACtB,wBAAwB;QACxB,0BAA0B;QAC1B,6BAA6B;QAC7B,sBAAsB;QAEtB,kBAAkB;QAClB,gBAAgB;QAChB,kBAAkB;QAClB,oBAAoB;QAEpB,oBAAoB;QACpB,sBAAsB;QAEtB,oBAAoB;Q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IACPC,cAAc,UACZC,2BAAOf,uCAAiB;MACtBgB,SAAS;MACTC,UAAUZ;;QAER;;QAEA;QACA;QACA;QACA;QACA;QACA;MAAA;MAEFa,QAAQ;QACN;UACEC,MAAMC,qCAAeM;UACrBJ,MAAM;QACR;QACA;UACEH,MAAMC,qCAAeI;UACrBF,MAAM;UACNd,OAAO;QACT;;IAEJ,CAAA;EACJ;EACA;IACEpC,IAAI;IACJyC,OAAO;IACPC,cAAc,UACZC,2BAAOf,uCAAiB;MACtBgB,SAAS;MACTC,UAAUZ;;QAER;QACA;QACA;QACA;QACA;MAAA;MAEFa,QAAQ;QACN;UACEC,MAAMC,qCAAeI;UACrBF,MAAM;UACNd,OAAO;QACT;;IAEJ,CAAA;EACJ;EACA;IACEpC,IAAI;IACJyC,OAAO;IACPC,cAAc,UACZC,2BAAOf,uCAAiB;MACtBgB,SAAS;MACTC,UAAUZ;;QAER;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MAAA;MAEFa,QAAQ;QACN;UACEC,MAAMC,qCAAeK;UACrBH,MAAM;UACNd,OAAO;QACT;QACA;UACEW,MAAMC,qCAAeK;UACrBH,MAAM;UACNd,OAAO;QACT;QACA;UACEW,MAAMC,qCAAeI;UACrBF,MAAM;UACNd,OAAO;QACT;;IAEJ,CAAA;EACJ;EACA;IACEpC,IAAI;IACJyC,OAAO;IACPC,cAAc,UACZC,2BAAOf,uCAAiB;MACtBgB,SAAS;MACTC,UAAUZ;;QAER;QACA;QACA;QACA;QACA;MAAA;MAEFa,QAAQ;QACN;UACEC,MAAMC,qCAAeO;UACrBL,MAAM;UACNd,OAAO;QACT;;IAEJ,CAAA;EACJ;;",
6
- "names": ["import_app_framework", "AppGraphBuilder", "lazy", "ReactSurface", "AUTOMATION_PLUGIN", "AutomationPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "oneOf", "Startup", "SetupAppGraph", "Metadata", "ChainType", "typename", "metadata", "placeholder", "ns", "icon", "loadReferences", "chain", "RefArray", "loadAll", "prompts", "ClientEvents", "SetupClient", "ClientCapabilities", "SystemSchema", "ChainPromptType", "FunctionTrigger", "DeckCapabilities", "ComplementaryPanel", "label", "str", "text", "filter", "value", "undefined", "flat", "join", "chainPresets", "title", "createPrompt", "create", "command", "template", "inputs", "type", "ChainInputType", "VALUE", "name", "PASS_THROUGH", "CONTEXT", "SCHEMA", "RETRIEVER", "RESOLVER"]
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { FunctionTrigger } from '@dxos/functions';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { DeckCapabilities } from '@dxos/plugin-deck';\nimport { RefArray } from '@dxos/react-client/echo';\n\nimport { AppGraphBuilder, ReactSurface } from './capabilities';\nimport { AUTOMATION_PLUGIN, meta } from './meta';\nimport translations from './translations';\nimport { ChainPromptType, ChainType } from './types';\n\nexport const AutomationPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: ChainType.typename,\n metadata: {\n placeholder: ['object placeholder', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--magic-wand--regular',\n // TODO(wittjosiah): Move out of metadata.\n loadReferences: async (chain: ChainType) => await RefArray.loadAll(chain.prompts ?? []),\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => contributes(ClientCapabilities.SystemSchema, [ChainType, ChainPromptType, FunctionTrigger]),\n }),\n defineModule({\n id: `${meta.id}/module/complementary-panels`,\n activatesOn: Events.Startup,\n activate: () => [\n contributes(DeckCapabilities.ComplementaryPanel, {\n id: 'automation',\n label: ['automation panel label', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--magic-wand--regular',\n }),\n contributes(DeckCapabilities.ComplementaryPanel, {\n id: 'assistant',\n label: ['assistant panel label', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--atom--regular',\n }),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupSurfaces,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/app-graph-builder`,\n activatesOn: Events.SetupAppGraph,\n activate: AppGraphBuilder,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(() => import('./app-graph-builder'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { AUTOMATION_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [AUTOMATION_PLUGIN]: {\n 'plugin name': 'Automation',\n 'object placeholder': 'New prompt',\n 'create object label': 'Create prompt',\n 'create trigger label': 'Create trigger',\n 'create stack section label': 'Create prompt',\n 'command placeholder': 'Enter slash command...',\n 'template placeholder': 'Enter template...',\n 'value placeholder': 'Enter value...',\n 'select preset template placeholder': 'Select preset',\n 'open automation panel label': 'Show Automations',\n 'automation panel label': 'Automations',\n\n 'function select label': 'Function',\n 'function select placeholder': 'Select function',\n 'function enabled': 'Enabled',\n 'trigger select label': 'Trigger',\n 'trigger select placeholder': 'Trigger type',\n\n 'trigger type timer': 'Timer',\n 'trigger type webhook': 'Webhook',\n 'trigger type websocket': 'Websocket',\n 'trigger type subscription': 'Subscription',\n 'trigger type email': 'Email',\n\n 'trigger filter': 'Filter',\n 'trigger cron': 'Cron',\n 'trigger method': 'Method',\n 'trigger endpoint': 'Endpoint',\n\n 'trigger copy url': 'Copy URL',\n 'trigger copy email': 'Copy Email',\n\n 'trigger meta add': 'Add',\n 'trigger meta remove': 'Remove',\n 'trigger meta prop name placeholder': 'New meta property name',\n\n 'open assistant panel label': 'Show Assistant',\n 'assistant panel label': 'Assistant',\n },\n },\n },\n];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { create } from '@dxos/live-object';\n\nimport { ChainInputType, ChainPromptType } from './types';\n\nexport const str = (...text: (string | undefined | boolean)[]): string =>\n text\n .filter((value) => value !== undefined && value !== false)\n .flat()\n .join('\\n');\n\nexport type Preset = {\n id: string;\n title: string;\n createPrompt: () => ChainPromptType;\n};\n\nexport const chainPresets: Preset[] = [\n {\n id: 'dxos.org/prompt/translate',\n title: 'Translate',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'say',\n template: str(\n // prettier-ignore\n 'Translate the following into {language}:',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.VALUE,\n name: 'language',\n value: 'japanese',\n },\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'input',\n },\n // TODO(burdon): Message.\n // {\n // type: ChainInputType.CONTEXT,\n // name: 'input',\n // value: 'object.text',\n // },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/chess',\n title: 'Chess',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'hint',\n template: str(\n // prettier-ignore\n 'You are a machine that is an expert chess player.',\n '',\n 'The move history of the current game is: {history}',\n '',\n 'Suggest the next move and very briefly explain your strategy in a couple of sentences.',\n ),\n inputs: [\n {\n type: ChainInputType.CONTEXT,\n name: 'history',\n value: 'object.pgn',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/mermaid',\n title: 'Mermaid',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'draw',\n template: str(\n // prettier-ignore\n 'Create a simplified mermaid graph representing the text below.',\n 'Do not explain anything.',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'input',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/list',\n title: 'List',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'list',\n template: str(\n // prettier-ignore\n 'You are a machine that only replies with valid, iterable RFC8259 compliant JSON in your responses.',\n 'Your entire response should be a single array of JSON objects.',\n '',\n 'Your entire response should be a map where the key is the type and the value is a single array of JSON objects conforming to the following types:',\n '',\n '{schema}',\n '',\n '---',\n '',\n '{question}',\n ),\n inputs: [\n {\n type: ChainInputType.SCHEMA,\n name: 'schema',\n value: 'example.com/type/project',\n },\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'question',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/base',\n title: 'RAG',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'rag',\n template: str(\n // prettier-ignore\n \"Very briefly answer the question based only on the following context and say if you don't know the answer.\",\n // 'answer the question using the following context as well as your training data:',\n '',\n '{context}',\n '',\n '---',\n '',\n 'question: {question}',\n ),\n inputs: [\n {\n type: ChainInputType.RETRIEVER,\n name: 'context',\n },\n {\n type: ChainInputType.CONTEXT,\n name: 'question',\n value: 'object.text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/lookup',\n title: 'Lookup',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'lookup',\n template: str(\n // prettier-ignore\n 'Lookup and very briefly summarize the following topic in one or two sentences:',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.CONTEXT,\n name: 'input',\n value: 'text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/extract',\n title: 'Extract',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'extract',\n template: str(\n // prettier-ignore\n 'List all people and companies mentioned in the text below.',\n '',\n 'You are a machine that only replies with valid, iterable RFC8259 compliant JSON in your responses.',\n 'Your entire response should be a map where the key is the type and the value is a single array of JSON objects conforming to the following types:',\n '',\n '{contact}',\n '{company}',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.SCHEMA,\n name: 'contact',\n value: 'example.com/type/contact',\n },\n {\n type: ChainInputType.SCHEMA,\n name: 'company',\n value: 'example.com/type/organization',\n },\n {\n type: ChainInputType.CONTEXT,\n name: 'input',\n value: 'text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/discord',\n title: 'Summarize',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'summarize',\n template: str(\n // prettier-ignore\n 'Summarize what the team is working on and format it as a markdown table without any explanation.',\n '',\n '---',\n '',\n '{context}',\n ),\n inputs: [\n {\n type: ChainInputType.RESOLVER,\n name: 'context',\n value: 'discord.messages.recent',\n },\n ],\n }),\n },\n];\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAA8E;AAC9E,uBAAgC;AAChC,2BAAiD;AACjD,yBAAiC;AACjC,kBAAyB;ACJzB,IAAAA,wBAAqB;AEArB,yBAAuB;AFEhB,IAAMC,sBAAkBC,4BAAK,MAAM,OAAO,kCAAA,CAAA;AAC1C,IAAMC,mBAAeD,4BAAK,MAAM,OAAO,8BAAA,CAAA;ACD9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,uCAAAA,GAAoB;QACnB,eAAe;QACf,sBAAsB;QACtB,uBAAuB;QACvB,wBAAwB;QACxB,8BAA8B;QAC9B,uBAAuB;QACvB,wBAAwB;QACxB,qBAAqB;QACrB,sCAAsC;QACtC,+BAA+B;QAC/B,0BAA0B;QAE1B,yBAAyB;QACzB,+BAA+B;QAC/B,oBAAoB;QACpB,wBAAwB;QACxB,8BAA8B;QAE9B,sBAAsB;QACtB,wBAAwB;QACxB,0BAA0B;QAC1B,6BAA6B;QAC7B,sBAAsB;QAEtB,kBAAkB;QAClB,gBAAgB;QAChB,kBAAkB;QAClB,oBAAoB;QAEpB,oBAAoB;QACpB,sBAAsB;QAEtB,oBAAoB;QACpB,uBAAuB;QACvB,sCAAsC;QAEtC,8BAA8B;QAC9B,yBAAyB;MAC3B;IACF;EACF;;AFnCK,IAAMC,mBAAmB,UAC9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AEFa,QAAQ;QACN;UACEC,MAAMC,qCAAeM;UACrBJ,MAAM;QACR;QACA;UACEH,MAAMC,qCAAeI;UACrBF,MAAM;UACNd,OAAO;QACT;;IAEJ,CAAA;EACJ;EACA;IACErC,IAAI;IACJ0C,OAAO;IACPC,cAAc,UACZC,2BAAOlB,uCAAiB;MACtBmB,SAAS;MACTC,UAAUZ;;QAER;QACA;QACA;QACA;QACA;MAAA;MAEFa,QAAQ;QACN;UACEC,MAAMC,qCAAeI;UACrBF,MAAM;UACNd,OAAO;QACT;;IAEJ,CAAA;EACJ;EACA;IACErC,IAAI;IACJ0C,OAAO;IACPC,cAAc,UACZC,2BAAOlB,uCAAiB;MACtBmB,SAAS;MACTC,UAAUZ;;QAER;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MAAA;MAEFa,QAAQ;QACN;UACEC,MAAMC,qCAAeK;UACrBH,MAAM;UACNd,OAAO;QACT;QACA;UACEW,MAAMC,qCAAeK;UACrBH,MAAM;UACNd,OAAO;QACT;QACA;UACEW,MAAMC,qCAAeI;UACrBF,MAAM;UACNd,OAAO;QACT;;IAEJ,CAAA;EACJ;EACA;IACErC,IAAI;IACJ0C,OAAO;IACPC,cAAc,UACZC,2BAAOlB,uCAAiB;MACtBmB,SAAS;MACTC,UAAUZ;;QAER;QACA;QACA;QACA;QACA;MAAA;MAEFa,QAAQ;QACN;UACEC,MAAMC,qCAAeO;UACrBL,MAAM;UACNd,OAAO;QACT;;IAEJ,CAAA;EACJ;;",
6
+ "names": ["import_app_framework", "AppGraphBuilder", "lazy", "ReactSurface", "AUTOMATION_PLUGIN", "AutomationPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "ChainType", "typename", "metadata", "placeholder", "ns", "icon", "loadReferences", "chain", "RefArray", "loadAll", "prompts", "ClientEvents", "SetupSchema", "ClientCapabilities", "SystemSchema", "ChainPromptType", "FunctionTrigger", "Startup", "DeckCapabilities", "ComplementaryPanel", "label", "SetupSurfaces", "SetupAppGraph", "str", "text", "filter", "value", "undefined", "flat", "join", "chainPresets", "title", "createPrompt", "create", "command", "template", "inputs", "type", "ChainInputType", "VALUE", "name", "PASS_THROUGH", "CONTEXT", "SCHEMA", "RETRIEVER", "RESOLVER"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/experimental/plugin-automation/src/meta.ts":{"bytes":1663,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/capabilities/app-graph-builder.ts":{"bytes":16198,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/system-instructions.ts":{"bytes":16049,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/AssistantPanel.tsx":{"bytes":28000,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/system-instructions.ts","kind":"import-statement","original":"./system-instructions"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts":{"bytes":739,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/AssistantPanel.tsx","kind":"import-statement","original":"./AssistantPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx":{"bytes":15553,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts":{"bytes":557,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx","kind":"import-statement","original":"./TriggerEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/AutomationPanel.tsx":{"bytes":19445,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts","kind":"import-statement","original":"../TriggerEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts":{"bytes":751,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/index.ts":{"bytes":1078,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts","kind":"dynamic-import","original":"./AssistantPanel"},{"path":"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts","kind":"dynamic-import","original":"./AutomationPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx":{"bytes":3922,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/capabilities/index.ts":{"bytes":1109,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/capabilities/app-graph-builder.ts","kind":"dynamic-import","original":"./app-graph-builder"},{"path":"packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/translations.ts":{"bytes":5419,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/types/schema.ts":{"bytes":4248,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/types/index.ts":{"bytes":519,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/types/schema.ts","kind":"import-statement","original":"./schema"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx":{"bytes":10110,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-automation/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/presets.ts":{"bytes":19268,"imports":[{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/index.ts":{"bytes":885,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx","kind":"import-statement","original":"./AutomationPlugin"},{"path":"packages/plugins/experimental/plugin-automation/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-automation/src/presets.ts","kind":"import-statement","original":"./presets"},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-automation/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16220},"packages/plugins/experimental/plugin-automation/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-JNDMZQH7.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-25AQIF3L.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-5VF5JKUN.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/app-graph-builder-MF5M4QRS.cjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/react-surface-DVAU4MGD.cjs","kind":"dynamic-import"},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["AUTOMATION_PLUGIN","AssistantPanel","AutomationPanel","AutomationPlugin","ChainInputSchema","ChainInputType","ChainPromptType","ChainType","chainPresets","meta","str"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/index.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx":{"bytesInOutput":2261},"packages/plugins/experimental/plugin-automation/src/capabilities/index.ts":{"bytesInOutput":193},"packages/plugins/experimental/plugin-automation/src/translations.ts":{"bytesInOutput":1597},"packages/plugins/experimental/plugin-automation/src/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-automation/src/presets.ts":{"bytesInOutput":5489}},"bytes":10389},"packages/plugins/experimental/plugin-automation/dist/lib/node/types/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-automation/dist/lib/node/types/index.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-JNDMZQH7.cjs","kind":"import-statement"}],"exports":["ChainInputSchema","ChainInputType","ChainPromptType","ChainType"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/types/index.ts","inputs":{},"bytes":226},"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-JNDMZQH7.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2081},"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-JNDMZQH7.cjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["ChainInputSchema","ChainInputType","ChainPromptType","ChainType"],"inputs":{"packages/plugins/experimental/plugin-automation/src/types/schema.ts":{"bytesInOutput":1247},"packages/plugins/experimental/plugin-automation/src/types/index.ts":{"bytesInOutput":0}},"bytes":1444},"packages/plugins/experimental/plugin-automation/dist/lib/node/app-graph-builder-MF5M4QRS.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7468},"packages/plugins/experimental/plugin-automation/dist/lib/node/app-graph-builder-MF5M4QRS.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-5VF5JKUN.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/capabilities/app-graph-builder.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/capabilities/app-graph-builder.ts":{"bytesInOutput":3950}},"bytes":4207},"packages/plugins/experimental/plugin-automation/dist/lib/node/AssistantPanel-Z4GVHUF3.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":22398},"packages/plugins/experimental/plugin-automation/dist/lib/node/AssistantPanel-Z4GVHUF3.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-5VF5JKUN.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/AssistantPanel.tsx":{"bytesInOutput":7244},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/system-instructions.ts":{"bytesInOutput":4067},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts":{"bytesInOutput":45}},"bytes":11915},"packages/plugins/experimental/plugin-automation/dist/lib/node/AutomationPanel-PPODB5XA.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18804},"packages/plugins/experimental/plugin-automation/dist/lib/node/AutomationPanel-PPODB5XA.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-5VF5JKUN.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/AutomationPanel.tsx":{"bytesInOutput":4886},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx":{"bytesInOutput":3947},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts":{"bytesInOutput":47}},"bytes":9440},"packages/plugins/experimental/plugin-automation/dist/lib/node/react-surface-DVAU4MGD.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1915},"packages/plugins/experimental/plugin-automation/dist/lib/node/react-surface-DVAU4MGD.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-25AQIF3L.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-5VF5JKUN.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx":{"bytesInOutput":812}},"bytes":1134},"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-25AQIF3L.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":503},"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-25AQIF3L.cjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/AssistantPanel-Z4GVHUF3.cjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/AutomationPanel-PPODB5XA.cjs","kind":"dynamic-import"}],"exports":["AssistantPanel","AutomationPanel"],"inputs":{"packages/plugins/experimental/plugin-automation/src/components/index.ts":{"bytesInOutput":180}},"bytes":348},"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-5VF5JKUN.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":778},"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-5VF5JKUN.cjs":{"imports":[],"exports":["AUTOMATION_PLUGIN","meta"],"inputs":{"packages/plugins/experimental/plugin-automation/src/meta.ts":{"bytesInOutput":325}},"bytes":473}}}
1
+ {"inputs":{"packages/plugins/experimental/plugin-automation/src/meta.ts":{"bytes":1924,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/capabilities/app-graph-builder.ts":{"bytes":16198,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/system-instructions.ts":{"bytes":16049,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/AssistantPanel.tsx":{"bytes":27867,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/system-instructions.ts","kind":"import-statement","original":"./system-instructions"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts":{"bytes":739,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/AssistantPanel.tsx","kind":"import-statement","original":"./AssistantPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx":{"bytes":15243,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts":{"bytes":557,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx","kind":"import-statement","original":"./TriggerEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/AutomationPanel.tsx":{"bytes":19445,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts","kind":"import-statement","original":"../TriggerEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts":{"bytes":751,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/index.ts":{"bytes":1078,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts","kind":"dynamic-import","original":"./AssistantPanel"},{"path":"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts","kind":"dynamic-import","original":"./AutomationPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx":{"bytes":3922,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/capabilities/index.ts":{"bytes":1109,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/capabilities/app-graph-builder.ts","kind":"dynamic-import","original":"./app-graph-builder"},{"path":"packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/translations.ts":{"bytes":5419,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/types/schema.ts":{"bytes":4248,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/types/index.ts":{"bytes":519,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/types/schema.ts","kind":"import-statement","original":"./schema"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx":{"bytes":10038,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-automation/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/presets.ts":{"bytes":19268,"imports":[{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/index.ts":{"bytes":885,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx","kind":"import-statement","original":"./AutomationPlugin"},{"path":"packages/plugins/experimental/plugin-automation/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-automation/src/presets.ts","kind":"import-statement","original":"./presets"},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-automation/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16189},"packages/plugins/experimental/plugin-automation/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-JNDMZQH7.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-JUSXT4U5.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-TQEDPRY5.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/app-graph-builder-65TBXO3I.cjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/react-surface-S6U5ISJ6.cjs","kind":"dynamic-import"},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["AUTOMATION_PLUGIN","AssistantPanel","AutomationPanel","AutomationPlugin","ChainInputSchema","ChainInputType","ChainPromptType","ChainType","chainPresets","meta","str"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/index.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx":{"bytesInOutput":2237},"packages/plugins/experimental/plugin-automation/src/capabilities/index.ts":{"bytesInOutput":193},"packages/plugins/experimental/plugin-automation/src/translations.ts":{"bytesInOutput":1597},"packages/plugins/experimental/plugin-automation/src/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-automation/src/presets.ts":{"bytesInOutput":5489}},"bytes":10365},"packages/plugins/experimental/plugin-automation/dist/lib/node/types/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-automation/dist/lib/node/types/index.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-JNDMZQH7.cjs","kind":"import-statement"}],"exports":["ChainInputSchema","ChainInputType","ChainPromptType","ChainType"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/types/index.ts","inputs":{},"bytes":226},"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-JNDMZQH7.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2081},"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-JNDMZQH7.cjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["ChainInputSchema","ChainInputType","ChainPromptType","ChainType"],"inputs":{"packages/plugins/experimental/plugin-automation/src/types/schema.ts":{"bytesInOutput":1247},"packages/plugins/experimental/plugin-automation/src/types/index.ts":{"bytesInOutput":0}},"bytes":1444},"packages/plugins/experimental/plugin-automation/dist/lib/node/app-graph-builder-65TBXO3I.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7468},"packages/plugins/experimental/plugin-automation/dist/lib/node/app-graph-builder-65TBXO3I.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-TQEDPRY5.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/capabilities/app-graph-builder.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/capabilities/app-graph-builder.ts":{"bytesInOutput":3950}},"bytes":4207},"packages/plugins/experimental/plugin-automation/dist/lib/node/AssistantPanel-U7GDWPRC.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":22315},"packages/plugins/experimental/plugin-automation/dist/lib/node/AssistantPanel-U7GDWPRC.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-TQEDPRY5.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/AssistantPanel.tsx":{"bytesInOutput":7219},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/system-instructions.ts":{"bytesInOutput":4067},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts":{"bytesInOutput":45}},"bytes":11890},"packages/plugins/experimental/plugin-automation/dist/lib/node/AutomationPanel-H5WE4FIU.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18642},"packages/plugins/experimental/plugin-automation/dist/lib/node/AutomationPanel-H5WE4FIU.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-TQEDPRY5.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/AutomationPanel.tsx":{"bytesInOutput":4886},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx":{"bytesInOutput":3869},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts":{"bytesInOutput":47}},"bytes":9362},"packages/plugins/experimental/plugin-automation/dist/lib/node/react-surface-S6U5ISJ6.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1915},"packages/plugins/experimental/plugin-automation/dist/lib/node/react-surface-S6U5ISJ6.cjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-JUSXT4U5.cjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-TQEDPRY5.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx":{"bytesInOutput":812}},"bytes":1134},"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-JUSXT4U5.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":503},"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-JUSXT4U5.cjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/AssistantPanel-U7GDWPRC.cjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node/AutomationPanel-H5WE4FIU.cjs","kind":"dynamic-import"}],"exports":["AssistantPanel","AutomationPanel"],"inputs":{"packages/plugins/experimental/plugin-automation/src/components/index.ts":{"bytesInOutput":180}},"bytes":348},"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-TQEDPRY5.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":892},"packages/plugins/experimental/plugin-automation/dist/lib/node/chunk-TQEDPRY5.cjs":{"imports":[],"exports":["AUTOMATION_PLUGIN","meta"],"inputs":{"packages/plugins/experimental/plugin-automation/src/meta.ts":{"bytesInOutput":434}},"bytes":582}}}
@@ -26,32 +26,32 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var react_surface_DVAU4MGD_exports = {};
30
- __export(react_surface_DVAU4MGD_exports, {
29
+ var react_surface_S6U5ISJ6_exports = {};
30
+ __export(react_surface_S6U5ISJ6_exports, {
31
31
  default: () => react_surface_default
32
32
  });
33
- module.exports = __toCommonJS(react_surface_DVAU4MGD_exports);
34
- var import_chunk_25AQIF3L = require("./chunk-25AQIF3L.cjs");
35
- var import_chunk_5VF5JKUN = require("./chunk-5VF5JKUN.cjs");
33
+ module.exports = __toCommonJS(react_surface_S6U5ISJ6_exports);
34
+ var import_chunk_JUSXT4U5 = require("./chunk-JUSXT4U5.cjs");
35
+ var import_chunk_TQEDPRY5 = require("./chunk-TQEDPRY5.cjs");
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_app_framework = require("@dxos/app-framework");
38
38
  var import_echo = require("@dxos/react-client/echo");
39
39
  var react_surface_default = () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactSurface, [
40
40
  (0, import_app_framework.createSurface)({
41
- id: `${import_chunk_5VF5JKUN.AUTOMATION_PLUGIN}/assistant`,
41
+ id: `${import_chunk_TQEDPRY5.AUTOMATION_PLUGIN}/assistant`,
42
42
  role: "complementary--assistant",
43
- component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_25AQIF3L.AssistantPanel, {
43
+ component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_JUSXT4U5.AssistantPanel, {
44
44
  subject: data.subject
45
45
  })
46
46
  }),
47
47
  (0, import_app_framework.createSurface)({
48
- id: `${import_chunk_5VF5JKUN.AUTOMATION_PLUGIN}/automation`,
48
+ id: `${import_chunk_TQEDPRY5.AUTOMATION_PLUGIN}/automation`,
49
49
  role: "complementary--automation",
50
50
  filter: (data) => (0, import_echo.isEchoObject)(data.subject) && !!(0, import_echo.getSpace)(data.subject),
51
- component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_25AQIF3L.AutomationPanel, {
51
+ component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_JUSXT4U5.AutomationPanel, {
52
52
  space: (0, import_echo.getSpace)(data.subject),
53
53
  object: data.subject
54
54
  })
55
55
  })
56
56
  ]);
57
- //# sourceMappingURL=react-surface-DVAU4MGD.cjs.map
57
+ //# sourceMappingURL=react-surface-S6U5ISJ6.cjs.map
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
3
  AUTOMATION_PLUGIN
4
- } from "./chunk-X3LPRWIL.mjs";
4
+ } from "./chunk-JFHI22MF.mjs";
5
5
 
6
6
  // packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/AssistantPanel.tsx
7
7
  import React, { useEffect, useRef, useState } from "react";
@@ -292,7 +292,7 @@ var MessageItem = ({ classNames, message }) => {
292
292
  return /* @__PURE__ */ React.createElement("div", {
293
293
  key: i,
294
294
  role: "none",
295
- className: mx(styleContainer, role === "user" ? "bg-primary-400 dark:bg-primary-600" : "bg-hoverSurface")
295
+ className: mx(styleContainer, role === "user" ? "bg-accentSurface" : "bg-input")
296
296
  }, cot && /* @__PURE__ */ React.createElement("div", {
297
297
  className: "p-2 whitespace-pre-wrap text-xs text-subdued"
298
298
  }, cot), /* @__PURE__ */ React.createElement("div", {
@@ -337,4 +337,4 @@ var AssistantPanel_default = AssistantPanel;
337
337
  export {
338
338
  AssistantPanel_default as default
339
339
  };
340
- //# sourceMappingURL=AssistantPanel-DDCQHBJX.mjs.map
340
+ //# sourceMappingURL=AssistantPanel-M67P24GS.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/AssistantPanel/AssistantPanel.tsx", "../../../src/components/AssistantPanel/system-instructions.ts", "../../../src/components/AssistantPanel/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\n/* eslint-disable no-console */\n\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport { type AIServiceClient, AIServiceClientImpl, ObjectId, type Message } from '@dxos/assistant';\nimport type { ReactiveEchoObject } from '@dxos/echo-db';\nimport { SpaceId } from '@dxos/keys';\nimport { useClient, useConfig } from '@dxos/react-client';\nimport { ContextMenu, type ThemedClassName } from '@dxos/react-ui';\nimport { Icon, Input, Toolbar, useTranslation } from '@dxos/react-ui';\nimport { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { createSystemInstructions } from './system-instructions';\nimport { AUTOMATION_PLUGIN } from '../../meta';\n\nconst PROPERTIES_ASSISTANT_KEY = 'dxos.assistant.beta.properties';\n\nexport type AssistantPanelProps = ThemedClassName<{\n subject?: ReactiveEchoObject<any>;\n}>;\n\nexport const AssistantPanel = ({ subject, classNames }: AssistantPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const config = useConfig();\n const client = useClient();\n const aiClient = useRef<AIServiceClient>();\n const [contextSpaceId, setContextSpaceId] = useState<SpaceId | undefined>();\n const [threadId, setThreadId] = useState<ObjectId | undefined>();\n const [history, setHistory] = useState<Message[]>([]);\n const [input, setInput] = useState('');\n\n useEffect(() => {\n if (!aiClient.current) {\n const endpoint = config.values.runtime?.services?.ai?.server;\n if (!endpoint) {\n throw new Error('AI service endpoint is not configured');\n }\n aiClient.current = new AIServiceClientImpl({\n endpoint,\n });\n }\n\n queueMicrotask(async () => {\n const properties = client.spaces.default.properties;\n\n properties[PROPERTIES_ASSISTANT_KEY] ??= {};\n properties[PROPERTIES_ASSISTANT_KEY].contextSpaceId ??= SpaceId.random();\n properties[PROPERTIES_ASSISTANT_KEY].threadId ??= ObjectId.random();\n\n const contextSpaceId = properties[PROPERTIES_ASSISTANT_KEY].contextSpaceId;\n const threadId = properties[PROPERTIES_ASSISTANT_KEY].threadId;\n\n setContextSpaceId(contextSpaceId);\n setThreadId(threadId);\n\n const messages = await aiClient.current!.getMessagesInThread(contextSpaceId, threadId);\n setHistory(messages);\n });\n }, []);\n\n const handleRequest = async (input: string) => {\n if (input === '') {\n return;\n }\n\n setInput('');\n\n // TODO(dmaretskyi): Can we call `create(Message, { ... })` here?\n const userMessage: Message = {\n id: ObjectId.random(),\n spaceId: contextSpaceId!,\n threadId: threadId!,\n role: 'user',\n content: [{ type: 'text', text: input }],\n };\n await aiClient.current!.insertMessages([userMessage]);\n setHistory([...history, userMessage]);\n\n const generationStream = await aiClient.current!.generate({\n model: '@anthropic/claude-3-5-sonnet-20241022',\n spaceId: contextSpaceId!,\n threadId: threadId!,\n tools: [],\n systemPrompt: await getSystemPrompt(),\n });\n\n const historyBefore = [...history, userMessage];\n for await (const _event of generationStream) {\n setHistory([...historyBefore, ...generationStream.accumulatedMessages]);\n }\n\n await aiClient.current!.insertMessages(await generationStream.complete());\n };\n\n const getSystemPrompt = async () => {\n return createSystemInstructions({ subject });\n };\n\n const clearThread = async () => {\n const properties = client.spaces.default.properties;\n\n properties[PROPERTIES_ASSISTANT_KEY] ??= {};\n // properties[PROPERTIES_ASSISTANT_KEY].contextSpaceId ??= SpaceId.random();\n properties[PROPERTIES_ASSISTANT_KEY].threadId = ObjectId.random();\n\n // const contextSpaceId = properties[PROPERTIES_ASSISTANT_KEY].contextSpaceId;\n const threadId = properties[PROPERTIES_ASSISTANT_KEY].threadId;\n\n // setContextSpaceId(contextSpaceId);\n setThreadId(threadId);\n\n const messages = await aiClient.current!.getMessagesInThread(contextSpaceId!, threadId);\n setHistory(messages);\n };\n\n // TODO(burdon): Factor out with script plugin.\n return (\n <div className={mx('flex flex-col h-full overflow-hidden', classNames)}>\n {history.length > 0 && (\n <div className='flex flex-col gap-6 h-full p-2 overflow-x-hidden overflow-y-auto'>\n {history.map((message) => (\n <MessageItem key={message.id} message={message} />\n ))}\n </div>\n )}\n\n <Toolbar.Root classNames='p-1'>\n <Input.Root>\n <Input.TextInput\n autoFocus\n placeholder={t('ask me anything')}\n value={input}\n onChange={(ev) => setInput(ev.target.value)}\n onKeyDown={(ev) => ev.key === 'Enter' && handleRequest(input)}\n />\n </Input.Root>\n <ContextMenu.Root>\n <ContextMenu.Trigger asChild>\n <Toolbar.Button onClick={() => handleRequest(input)}>\n <Icon icon='ph--play--regular' size={4} />\n </Toolbar.Button>\n </ContextMenu.Trigger>\n <ContextMenu.Portal>\n <ContextMenu.Content>\n <ContextMenu.Viewport>\n <ContextMenu.Item onClick={clearThread}>Clear thread</ContextMenu.Item>\n <ContextMenu.Item onClick={async () => console.log(await getSystemPrompt())}>\n Print instructions to console\n </ContextMenu.Item>\n </ContextMenu.Viewport>\n </ContextMenu.Content>\n </ContextMenu.Portal>\n </ContextMenu.Root>\n\n {/* <Toolbar.Button onClick={() => (state ? handleStop() : handleClear())}>\n <Icon icon={state ? 'ph--stop--regular' : 'ph--trash--regular'} size={4} />\n </Toolbar.Button> */}\n </Toolbar.Root>\n </div>\n );\n};\n\nconst MessageItem = ({ classNames, message }: ThemedClassName<{ message: Message }>) => {\n const { id: _, role, content } = message;\n const styleContainer = 'flex flex-col overflow-x-hidden overflow-y-auto rounded-md gap-2 divide-y divide-separator';\n\n return (\n <div className={mx('flex', role === 'user' ? 'ml-[1rem] justify-end' : 'mr-[1rem]', classNames)}>\n {content.map((content, i) => {\n switch (content.type) {\n case 'text': {\n const { cot, message } = parseMessage(content.text);\n return (\n <div\n key={i}\n role='none'\n className={mx(\n styleContainer,\n role === 'user' ? 'bg-primary-400 dark:bg-primary-600' : 'bg-hoverSurface',\n )}\n >\n {cot && <div className='p-2 whitespace-pre-wrap text-xs text-subdued'>{cot}</div>}\n <div className='p-2 whitespace-pre-wrap'>{message}</div>\n </div>\n );\n }\n\n case 'tool_use': {\n return (\n <div key={i} className={mx(styleContainer, 'text-xs')}>\n <div>\n <span className='p-2 text-primary'>Tool use</span>: {content.name} {content.id}\n </div>\n <SyntaxHighlighter language='json'>{content.inputJson}</SyntaxHighlighter>\n </div>\n );\n }\n\n case 'tool_result': {\n return (\n <div key={i} className={mx(styleContainer, 'text-xs', content.isError && 'text-error')}>\n <div>\n <span className='p-2 text-primary'>Tool result</span>: {content.toolUseId}\n </div>\n <SyntaxHighlighter language='json'>{content.content}</SyntaxHighlighter>\n </div>\n );\n }\n }\n\n return null;\n })}\n </div>\n );\n};\n\n// TODO(burdon): Move to server-side parsing.\nconst parseMessage = (text: string): { cot?: string; message: string } => {\n const regex = /<cot>([\\s\\S]*?)<\\/cot>\\s*([\\s\\S]*)/;\n const match = text.match(regex);\n return {\n cot: match?.[1].trim(),\n message: match?.[2] ?? text ?? '\\u00D8',\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { asyncTimeout } from '@dxos/async';\nimport type { ReactiveEchoObject } from '@dxos/echo-db';\nimport { getTypename } from '@dxos/echo-schema';\nimport { log } from '@dxos/log';\nimport { Filter, getSpace, ResultFormat } from '@dxos/react-client/echo';\n\n// TODO(burdon): Move into assistant-protocol.\nexport type ThreadContext = {\n subject?: ReactiveEchoObject<any>;\n};\n\nexport const createSystemInstructions = async (context: ThreadContext): Promise<string> => {\n let instructions = `\n <instructions>\n Before replying always think step-by-step on how to proceed.\n Print your thoughts inside <cot> tags.\n\n <example>\n <cot>To answer the question I need to ...</cot>\n </example>\n </instructions>\n\n <current_time>${new Date().toLocaleString()}</current_time>\n `;\n\n if (context.subject) {\n instructions += `\n <user_attention>\n The user is currently interacting with an object in Composer application:\n\n ${await formatContextObject(context.subject)}\n </user_attention>\n `;\n }\n\n return looseFormatXml(instructions);\n};\n\nconst formatContextObject = async (object: ReactiveEchoObject<any>): Promise<string> => {\n let data;\n try {\n data = await asyncTimeout(preprocessContextObject(object), CONTEXT_OBJECT_QUERY_TIMEOUT);\n } catch (err: any) {\n log.error('Failed to preprocess context object:', { err });\n data = object;\n }\n\n if (typeof data === 'string') {\n return data;\n } else {\n return `\n <object>\n <type>${getTypename(object)}</type>\n <id>${object.id}</id>\n ${formatObjectAsXMLTags(data)}\n </object>\n `;\n }\n};\n\nconst preprocessContextObject = async (object: ReactiveEchoObject<any>): Promise<Record<string, any> | string> => {\n const space = getSpace(object);\n if (!space) {\n return { ...object };\n }\n\n // TODO(dmaretskyi): Serialize based on schema annotations.\n switch (getTypename(object)) {\n // TODO(dmaretskyi): Reference types somehow without plugin-automation depending on other plugins.\n case 'dxos.org/type/Document': {\n const data = space.db\n .query({ id: object.id }, { format: ResultFormat.Plain, include: { content: true } })\n .first() ?? { content: { content: '' } };\n\n return {\n ...data,\n threads: undefined,\n };\n }\n\n case 'dxos.org/type/Table': {\n // TODO(dmaretskyi): Load references.\n const schema = object.view ? space?.db.schemaRegistry.getSchema(object.view.query.type) : undefined;\n const { objects: rows } =\n (schema &&\n (await space.db\n .query(Filter.schema(schema), { format: ResultFormat.Plain, limit: TABLE_ROWS_LIMIT })\n .run())) ??\n {};\n\n // TODO(dmaretskyi): Format table schema.\n return `\n <object>\n <id>${object.id}</id>\n <type>${getTypename(object)}</type>\n ${formatObjectAsXMLTags(object)}\n\n <rows>\n <!-- Limited to first ${TABLE_ROWS_LIMIT} rows. -->\n ${rows\n ?.map(\n (row: any) => `<row>\n ${formatObjectAsXMLTags(row)}\n </row>`,\n )\n .join('\\n')}\n </rows>\n\n `;\n }\n\n default:\n return { ...object };\n }\n};\n\nconst formatObjectAsXMLTags = (object: any, depth = 1): string => {\n return Object.entries(object)\n .filter(([key, value]) => ['string', 'number', 'boolean', 'object'].includes(typeof value))\n .map(([key, value]) => {\n if (typeof value === 'object' && value !== null) {\n if (depth === 0) {\n return '';\n } else {\n return `<${key}>\n ${formatObjectAsXMLTags(value, depth - 1)}\n </${key}>`;\n }\n }\n\n return `<${key}>${value}</${key}>`;\n })\n .join('\\n');\n};\n\nconst CONTEXT_OBJECT_QUERY_TIMEOUT = 5_000;\n\nconst TABLE_ROWS_LIMIT = 10;\n\n/**\n * Formats XML indentation for instructions so they are easier to read during debugging.\n */\nconst looseFormatXml = (xml: string): string => {\n let currentIndent = 0;\n\n return xml\n .split('\\n')\n .map((line) => {\n if (line.match(RE_CLOSE_TAG_LINE)) {\n currentIndent--;\n }\n const indent = currentIndent;\n if (line.match(RE_OPEN_TAG_LINE)) {\n currentIndent++;\n }\n return ' '.repeat(indent * 2) + line.trimStart();\n })\n .join('\\n');\n};\n\nconst RE_OPEN_TAG_LINE = /^[ ]*<[a-zA-Z0-9\\-_]+>[ ]*$/;\nconst RE_CLOSE_TAG_LINE = /^[ ]*<\\/[a-zA-Z0-9\\-_]+>[ ]*$/;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { AssistantPanel } from './AssistantPanel';\n\nexport default AssistantPanel;\n"],
5
- "mappings": ";;;;;;AAMA,OAAOA,SAASC,WAAWC,QAAQC,gBAAgB;AAEnD,SAA+BC,qBAAqBC,gBAA8B;AAElF,SAASC,eAAe;AACxB,SAASC,WAAWC,iBAAiB;AACrC,SAASC,mBAAyC;AAClD,SAASC,MAAMC,OAAOC,SAASC,sBAAsB;AACrD,SAASC,yBAAyB;AAClC,SAASC,UAAU;;;ACXnB,SAASC,oBAAoB;AAE7B,SAASC,mBAAmB;AAC5B,SAASC,WAAW;AACpB,SAASC,QAAQC,UAAUC,oBAAoB;;AAOxC,IAAMC,2BAA2B,OAAOC,YAAAA;AAC7C,MAAIC,eAAe;;;;;;;;;;qBAUD,oBAAIC,KAAAA,GAAOC,eAAc,CAAA;;AAG3C,MAAIH,QAAQI,SAAS;AACnBH,oBAAgB;;;;UAIV,MAAMI,oBAAoBL,QAAQI,OAAO,CAAA;;;EAGjD;AAEA,SAAOE,eAAeL,YAAAA;AACxB;AAEA,IAAMI,sBAAsB,OAAOE,WAAAA;AACjC,MAAIC;AACJ,MAAI;AACFA,WAAO,MAAMf,aAAagB,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YAAY;AACf,eACE,sBAAA,cAACL,OAAAA;UAAIO,KAAK4B;UAAGlC,WAAWC,GAAGgC,gBAAgB,SAAA;WACzC,sBAAA,cAAClC,OAAAA,MACC,sBAAA,cAACsC,QAAAA;UAAKrC,WAAU;WAAmB,UAAA,GAAe,MAAGjB,SAAQuD,MAAK,KAAEvD,SAAQH,EAAE,GAEhF,sBAAA,cAAC2D,mBAAAA;UAAkBC,UAAS;WAAQzD,SAAQ0D,SAAS,CAAA;MAG3D;MAEA,KAAK,eAAe;AAClB,eACE,sBAAA,cAAC1C,OAAAA;UAAIO,KAAK4B;UAAGlC,WAAWC,GAAGgC,gBAAgB,WAAWlD,SAAQ2D,WAAW,YAAA;WACvE,sBAAA,cAAC3C,OAAAA,MACC,sBAAA,cAACsC,QAAAA;UAAKrC,WAAU;WAAmB,aAAA,GAAkB,MAAGjB,SAAQ4D,SAAS,GAE3E,sBAAA,cAACJ,mBAAAA;UAAkBC,UAAS;WAAQzD,SAAQA,OAAO,CAAA;MAGzD;IACF;AAEA,WAAO;EACT,CAAA,CAAA;AAGN;AAGA,IAAMqD,eAAe,CAACnD,SAAAA;AACpB,QAAM2D,QAAQ;AACd,QAAMC,QAAQ5D,KAAK4D,MAAMD,KAAAA;AACzB,SAAO;IACLT,KAAKU,QAAQ,CAAA,EAAGC,KAAAA;IAChB1C,SAASyC,QAAQ,CAAA,KAAM5D,QAAQ;EACjC;AACF;;;AE/NA,IAAA,yBAAe8D;",
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\n/* eslint-disable no-console */\n\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport { type AIServiceClient, AIServiceClientImpl, ObjectId, type Message } from '@dxos/assistant';\nimport type { ReactiveEchoObject } from '@dxos/echo-db';\nimport { SpaceId } from '@dxos/keys';\nimport { useClient, useConfig } from '@dxos/react-client';\nimport { ContextMenu, type ThemedClassName } from '@dxos/react-ui';\nimport { Icon, Input, Toolbar, useTranslation } from '@dxos/react-ui';\nimport { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { createSystemInstructions } from './system-instructions';\nimport { AUTOMATION_PLUGIN } from '../../meta';\n\nconst PROPERTIES_ASSISTANT_KEY = 'dxos.assistant.beta.properties';\n\nexport type AssistantPanelProps = ThemedClassName<{\n subject?: ReactiveEchoObject<any>;\n}>;\n\nexport const AssistantPanel = ({ subject, classNames }: AssistantPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const config = useConfig();\n const client = useClient();\n const aiClient = useRef<AIServiceClient>();\n const [contextSpaceId, setContextSpaceId] = useState<SpaceId | undefined>();\n const [threadId, setThreadId] = useState<ObjectId | undefined>();\n const [history, setHistory] = useState<Message[]>([]);\n const [input, setInput] = useState('');\n\n useEffect(() => {\n if (!aiClient.current) {\n const endpoint = config.values.runtime?.services?.ai?.server;\n if (!endpoint) {\n throw new Error('AI service endpoint is not configured');\n }\n aiClient.current = new AIServiceClientImpl({\n endpoint,\n });\n }\n\n queueMicrotask(async () => {\n const properties = client.spaces.default.properties;\n\n properties[PROPERTIES_ASSISTANT_KEY] ??= {};\n properties[PROPERTIES_ASSISTANT_KEY].contextSpaceId ??= SpaceId.random();\n properties[PROPERTIES_ASSISTANT_KEY].threadId ??= ObjectId.random();\n\n const contextSpaceId = properties[PROPERTIES_ASSISTANT_KEY].contextSpaceId;\n const threadId = properties[PROPERTIES_ASSISTANT_KEY].threadId;\n\n setContextSpaceId(contextSpaceId);\n setThreadId(threadId);\n\n const messages = await aiClient.current!.getMessagesInThread(contextSpaceId, threadId);\n setHistory(messages);\n });\n }, []);\n\n const handleRequest = async (input: string) => {\n if (input === '') {\n return;\n }\n\n setInput('');\n\n // TODO(dmaretskyi): Can we call `create(Message, { ... })` here?\n const userMessage: Message = {\n id: ObjectId.random(),\n spaceId: contextSpaceId!,\n threadId: threadId!,\n role: 'user',\n content: [{ type: 'text', text: input }],\n };\n await aiClient.current!.insertMessages([userMessage]);\n setHistory([...history, userMessage]);\n\n const generationStream = await aiClient.current!.generate({\n model: '@anthropic/claude-3-5-sonnet-20241022',\n spaceId: contextSpaceId!,\n threadId: threadId!,\n tools: [],\n systemPrompt: await getSystemPrompt(),\n });\n\n const historyBefore = [...history, userMessage];\n for await (const _event of generationStream) {\n setHistory([...historyBefore, ...generationStream.accumulatedMessages]);\n }\n\n await aiClient.current!.insertMessages(await generationStream.complete());\n };\n\n const getSystemPrompt = async () => {\n return createSystemInstructions({ subject });\n };\n\n const clearThread = async () => {\n const properties = client.spaces.default.properties;\n\n properties[PROPERTIES_ASSISTANT_KEY] ??= {};\n // properties[PROPERTIES_ASSISTANT_KEY].contextSpaceId ??= SpaceId.random();\n properties[PROPERTIES_ASSISTANT_KEY].threadId = ObjectId.random();\n\n // const contextSpaceId = properties[PROPERTIES_ASSISTANT_KEY].contextSpaceId;\n const threadId = properties[PROPERTIES_ASSISTANT_KEY].threadId;\n\n // setContextSpaceId(contextSpaceId);\n setThreadId(threadId);\n\n const messages = await aiClient.current!.getMessagesInThread(contextSpaceId!, threadId);\n setHistory(messages);\n };\n\n // TODO(burdon): Factor out with script plugin.\n return (\n <div className={mx('flex flex-col h-full overflow-hidden', classNames)}>\n {history.length > 0 && (\n <div className='flex flex-col gap-6 h-full p-2 overflow-x-hidden overflow-y-auto'>\n {history.map((message) => (\n <MessageItem key={message.id} message={message} />\n ))}\n </div>\n )}\n\n <Toolbar.Root classNames='p-1'>\n <Input.Root>\n <Input.TextInput\n autoFocus\n placeholder={t('ask me anything')}\n value={input}\n onChange={(ev) => setInput(ev.target.value)}\n onKeyDown={(ev) => ev.key === 'Enter' && handleRequest(input)}\n />\n </Input.Root>\n <ContextMenu.Root>\n <ContextMenu.Trigger asChild>\n <Toolbar.Button onClick={() => handleRequest(input)}>\n <Icon icon='ph--play--regular' size={4} />\n </Toolbar.Button>\n </ContextMenu.Trigger>\n <ContextMenu.Portal>\n <ContextMenu.Content>\n <ContextMenu.Viewport>\n <ContextMenu.Item onClick={clearThread}>Clear thread</ContextMenu.Item>\n <ContextMenu.Item onClick={async () => console.log(await getSystemPrompt())}>\n Print instructions to console\n </ContextMenu.Item>\n </ContextMenu.Viewport>\n </ContextMenu.Content>\n </ContextMenu.Portal>\n </ContextMenu.Root>\n\n {/* <Toolbar.Button onClick={() => (state ? handleStop() : handleClear())}>\n <Icon icon={state ? 'ph--stop--regular' : 'ph--trash--regular'} size={4} />\n </Toolbar.Button> */}\n </Toolbar.Root>\n </div>\n );\n};\n\nconst MessageItem = ({ classNames, message }: ThemedClassName<{ message: Message }>) => {\n const { id: _, role, content } = message;\n const styleContainer = 'flex flex-col overflow-x-hidden overflow-y-auto rounded-md gap-2 divide-y divide-separator';\n\n return (\n <div className={mx('flex', role === 'user' ? 'ml-[1rem] justify-end' : 'mr-[1rem]', classNames)}>\n {content.map((content, i) => {\n switch (content.type) {\n case 'text': {\n const { cot, message } = parseMessage(content.text);\n return (\n <div\n key={i}\n role='none'\n className={mx(styleContainer, role === 'user' ? 'bg-accentSurface' : 'bg-input')}\n >\n {cot && <div className='p-2 whitespace-pre-wrap text-xs text-subdued'>{cot}</div>}\n <div className='p-2 whitespace-pre-wrap'>{message}</div>\n </div>\n );\n }\n\n case 'tool_use': {\n return (\n <div key={i} className={mx(styleContainer, 'text-xs')}>\n <div>\n <span className='p-2 text-primary'>Tool use</span>: {content.name} {content.id}\n </div>\n <SyntaxHighlighter language='json'>{content.inputJson}</SyntaxHighlighter>\n </div>\n );\n }\n\n case 'tool_result': {\n return (\n <div key={i} className={mx(styleContainer, 'text-xs', content.isError && 'text-error')}>\n <div>\n <span className='p-2 text-primary'>Tool result</span>: {content.toolUseId}\n </div>\n <SyntaxHighlighter language='json'>{content.content}</SyntaxHighlighter>\n </div>\n );\n }\n }\n\n return null;\n })}\n </div>\n );\n};\n\n// TODO(burdon): Move to server-side parsing.\nconst parseMessage = (text: string): { cot?: string; message: string } => {\n const regex = /<cot>([\\s\\S]*?)<\\/cot>\\s*([\\s\\S]*)/;\n const match = text.match(regex);\n return {\n cot: match?.[1].trim(),\n message: match?.[2] ?? text ?? '\\u00D8',\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { asyncTimeout } from '@dxos/async';\nimport type { ReactiveEchoObject } from '@dxos/echo-db';\nimport { getTypename } from '@dxos/echo-schema';\nimport { log } from '@dxos/log';\nimport { Filter, getSpace, ResultFormat } from '@dxos/react-client/echo';\n\n// TODO(burdon): Move into assistant-protocol.\nexport type ThreadContext = {\n subject?: ReactiveEchoObject<any>;\n};\n\nexport const createSystemInstructions = async (context: ThreadContext): Promise<string> => {\n let instructions = `\n <instructions>\n Before replying always think step-by-step on how to proceed.\n Print your thoughts inside <cot> tags.\n\n <example>\n <cot>To answer the question I need to ...</cot>\n </example>\n </instructions>\n\n <current_time>${new Date().toLocaleString()}</current_time>\n `;\n\n if (context.subject) {\n instructions += `\n <user_attention>\n The user is currently interacting with an object in Composer application:\n\n ${await formatContextObject(context.subject)}\n </user_attention>\n `;\n }\n\n return looseFormatXml(instructions);\n};\n\nconst formatContextObject = async (object: ReactiveEchoObject<any>): Promise<string> => {\n let data;\n try {\n data = await asyncTimeout(preprocessContextObject(object), CONTEXT_OBJECT_QUERY_TIMEOUT);\n } catch (err: any) {\n log.error('Failed to preprocess context object:', { err });\n data = object;\n }\n\n if (typeof data === 'string') {\n return data;\n } else {\n return `\n <object>\n <type>${getTypename(object)}</type>\n <id>${object.id}</id>\n ${formatObjectAsXMLTags(data)}\n </object>\n `;\n }\n};\n\nconst preprocessContextObject = async (object: ReactiveEchoObject<any>): Promise<Record<string, any> | string> => {\n const space = getSpace(object);\n if (!space) {\n return { ...object };\n }\n\n // TODO(dmaretskyi): Serialize based on schema annotations.\n switch (getTypename(object)) {\n // TODO(dmaretskyi): Reference types somehow without plugin-automation depending on other plugins.\n case 'dxos.org/type/Document': {\n const data = space.db\n .query({ id: object.id }, { format: ResultFormat.Plain, include: { content: true } })\n .first() ?? { content: { content: '' } };\n\n return {\n ...data,\n threads: undefined,\n };\n }\n\n case 'dxos.org/type/Table': {\n // TODO(dmaretskyi): Load references.\n const schema = object.view ? space?.db.schemaRegistry.getSchema(object.view.query.type) : undefined;\n const { objects: rows } =\n (schema &&\n (await space.db\n .query(Filter.schema(schema), { format: ResultFormat.Plain, limit: TABLE_ROWS_LIMIT })\n .run())) ??\n {};\n\n // TODO(dmaretskyi): Format table schema.\n return `\n <object>\n <id>${object.id}</id>\n <type>${getTypename(object)}</type>\n ${formatObjectAsXMLTags(object)}\n\n <rows>\n <!-- Limited to first ${TABLE_ROWS_LIMIT} rows. -->\n ${rows\n ?.map(\n (row: any) => `<row>\n ${formatObjectAsXMLTags(row)}\n </row>`,\n )\n .join('\\n')}\n </rows>\n\n `;\n }\n\n default:\n return { ...object };\n }\n};\n\nconst formatObjectAsXMLTags = (object: any, depth = 1): string => {\n return Object.entries(object)\n .filter(([key, value]) => ['string', 'number', 'boolean', 'object'].includes(typeof value))\n .map(([key, value]) => {\n if (typeof value === 'object' && value !== null) {\n if (depth === 0) {\n return '';\n } else {\n return `<${key}>\n ${formatObjectAsXMLTags(value, depth - 1)}\n </${key}>`;\n }\n }\n\n return `<${key}>${value}</${key}>`;\n })\n .join('\\n');\n};\n\nconst CONTEXT_OBJECT_QUERY_TIMEOUT = 5_000;\n\nconst TABLE_ROWS_LIMIT = 10;\n\n/**\n * Formats XML indentation for instructions so they are easier to read during debugging.\n */\nconst looseFormatXml = (xml: string): string => {\n let currentIndent = 0;\n\n return xml\n .split('\\n')\n .map((line) => {\n if (line.match(RE_CLOSE_TAG_LINE)) {\n currentIndent--;\n }\n const indent = currentIndent;\n if (line.match(RE_OPEN_TAG_LINE)) {\n currentIndent++;\n }\n return ' '.repeat(indent * 2) + line.trimStart();\n })\n .join('\\n');\n};\n\nconst RE_OPEN_TAG_LINE = /^[ ]*<[a-zA-Z0-9\\-_]+>[ ]*$/;\nconst RE_CLOSE_TAG_LINE = /^[ ]*<\\/[a-zA-Z0-9\\-_]+>[ ]*$/;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { AssistantPanel } from './AssistantPanel';\n\nexport default AssistantPanel;\n"],
5
+ "mappings": ";;;;;;AAMA,OAAOA,SAASC,WAAWC,QAAQC,gBAAgB;AAEnD,SAA+BC,qBAAqBC,gBAA8B;AAElF,SAASC,eAAe;AACxB,SAASC,WAAWC,iBAAiB;AACrC,SAASC,mBAAyC;AAClD,SAASC,MAAMC,OAAOC,SAASC,sBAAsB;AACrD,SAASC,yBAAyB;AAClC,SAASC,UAAU;;;ACXnB,SAASC,oBAAoB;AAE7B,SAASC,mBAAmB;AAC5B,SAASC,WAAW;AACpB,SAASC,QAAQC,UAAUC,oBAAoB;;AAOxC,IAAMC,2BAA2B,OAAOC,YAAAA;AAC7C,MAAIC,eAAe;;;;;;;;;;qBAUD,oBAAIC,KAAAA,GAAOC,eAAc,CAAA;;AAG3C,MAAIH,QAAQI,SAAS;AACnBH,oBAAgB;;;;UAIV,MAAMI,oBAAoBL,QAAQI,OAAO,CAAA;;;EAGjD;AAEA,SAAOE,eAAeL,YAAAA;AACxB;AAEA,IAAMI,sBAAsB,OAAOE,WAAAA;AACjC,MAAIC;AACJ,MAAI;AACFA,WAAO,MAAMf,aAAagB,wBAAwBF,MAAAA,GAASG,4BAAAA;EAC7D,SAASC,KAAU;AACjBhB,QAAIiB,MAAM,wCAAwC;MAAED;IAAI,GAAA;;;;;;AACxDH,WAAOD;EACT;AAEA,MAAI,OAAOC,SAAS,UAAU;AAC5B,WAAOA;EACT,OAAO;AACL,WAAO;;gBAEKd,YAAYa,MAAAA,CAAAA;cACdA,OAAOM,EAAE;UACbC,sBAAsBN,IAAAA,CAAAA;;;EAG9B;AACF;AAEA,IAAMC,0BAA0B,OAAOF,WAAAA;AACrC,QAAMQ,QAAQlB,SAASU,MAAAA;AACvB,MAAI,CAACQ,OAAO;AACV,WAAO;MAAE,GAAGR;IAAO;EACrB;AAGA,UAAQb,YAAYa,MAAAA,GAAAA;;IAElB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AAA,MACC,sBAAA,cAACsC,QAAAA;UAAKrC,WAAU;WAAmB,aAAA,GAAkB,MAAGjB,SAAQ4D,SAAS,GAE3E,sBAAA,cAACJ,mBAAAA;UAAkBC,UAAS;WAAQzD,SAAQA,OAAO,CAAA;MAGzD;IACF;AAEA,WAAO;EACT,CAAA,CAAA;AAGN;AAGA,IAAMqD,eAAe,CAACnD,SAAAA;AACpB,QAAM2D,QAAQ;AACd,QAAMC,QAAQ5D,KAAK4D,MAAMD,KAAAA;AACzB,SAAO;IACLT,KAAKU,QAAQ,CAAA,EAAGC,KAAAA;IAChB1C,SAASyC,QAAQ,CAAA,KAAM5D,QAAQ;EACjC;AACF;;;AE5NA,IAAA,yBAAe8D;",
6
6
  "names": ["React", "useEffect", "useRef", "useState", "AIServiceClientImpl", "ObjectId", "SpaceId", "useClient", "useConfig", "ContextMenu", "Icon", "Input", "Toolbar", "useTranslation", "SyntaxHighlighter", "mx", "asyncTimeout", "getTypename", "log", "Filter", "getSpace", "ResultFormat", "createSystemInstructions", "context", "instructions", "Date", "toLocaleString", "subject", "formatContextObject", "looseFormatXml", "object", "data", "preprocessContextObject", "CONTEXT_OBJECT_QUERY_TIMEOUT", "err", "error", "id", "formatObjectAsXMLTags", "space", "db", "query", "format", "Plain", "include", "content", "first", "threads", "undefined", "schema", "view", "schemaRegistry", "getSchema", "type", "objects", "rows", "limit", "TABLE_ROWS_LIMIT", "run", "map", "row", "join", "depth", "Object", "entries", "filter", "key", "value", "includes", "xml", "currentIndent", "split", "line", "match", "RE_CLOSE_TAG_LINE", "indent", "RE_OPEN_TAG_LINE", "repeat", "trimStart", "PROPERTIES_ASSISTANT_KEY", "AssistantPanel", "subject", "classNames", "t", "useTranslation", "AUTOMATION_PLUGIN", "config", "useConfig", "client", "useClient", "aiClient", "useRef", "contextSpaceId", "setContextSpaceId", "useState", "threadId", "setThreadId", "history", "setHistory", "input", "setInput", "useEffect", "current", "endpoint", "values", "runtime", "services", "ai", "server", "Error", "AIServiceClientImpl", "queueMicrotask", "properties", "spaces", "default", "SpaceId", "random", "ObjectId", "messages", "getMessagesInThread", "handleRequest", "userMessage", "id", "spaceId", "role", "content", "type", "text", "insertMessages", "generationStream", "generate", "model", "tools", "systemPrompt", "getSystemPrompt", "historyBefore", "_event", "accumulatedMessages", "complete", "createSystemInstructions", "clearThread", "div", "className", "mx", "length", "map", "message", "MessageItem", "key", "Toolbar", "Root", "Input", "TextInput", "autoFocus", "placeholder", "value", "onChange", "ev", "target", "onKeyDown", "ContextMenu", "Trigger", "asChild", "Button", "onClick", "Icon", "icon", "size", "Portal", "Content", "Viewport", "Item", "console", "log", "_", "styleContainer", "i", "cot", "parseMessage", "span", "name", "SyntaxHighlighter", "language", "inputJson", "isError", "toolUseId", "regex", "match", "trim", "AssistantPanel"]
7
7
  }