@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 +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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16220},"packages/plugins/experimental/plugin-automation/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DL6LB2NI.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-4AIMDHKY.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-HKX3D3ZP.mjs","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/browser/app-graph-builder-IJTTULDP.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/react-surface-LL72F3F4.mjs","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/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-automation/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DL6LB2NI.mjs","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/browser/chunk-DL6LB2NI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2081},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DL6LB2NI.mjs":{"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/browser/app-graph-builder-IJTTULDP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7468},"packages/plugins/experimental/plugin-automation/dist/lib/browser/app-graph-builder-IJTTULDP.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-HKX3D3ZP.mjs","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/browser/AssistantPanel-N276BTPV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":22398},"packages/plugins/experimental/plugin-automation/dist/lib/browser/AssistantPanel-N276BTPV.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-HKX3D3ZP.mjs","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/browser/AutomationPanel-IHZ4JKVS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18804},"packages/plugins/experimental/plugin-automation/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-HKX3D3ZP.mjs","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/browser/react-surface-LL72F3F4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1915},"packages/plugins/experimental/plugin-automation/dist/lib/browser/react-surface-LL72F3F4.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-4AIMDHKY.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-HKX3D3ZP.mjs","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/browser/chunk-4AIMDHKY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":503},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-4AIMDHKY.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/AssistantPanel-N276BTPV.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs","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/browser/chunk-HKX3D3ZP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":778},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-HKX3D3ZP.mjs":{"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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16189},"packages/plugins/experimental/plugin-automation/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DL6LB2NI.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-4ODBJDXM.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DQ7ZSYJJ.mjs","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/browser/app-graph-builder-6FSMLMT4.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/react-surface-5YTE5MRE.mjs","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/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-automation/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DL6LB2NI.mjs","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/browser/chunk-DL6LB2NI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2081},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DL6LB2NI.mjs":{"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/browser/app-graph-builder-6FSMLMT4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7468},"packages/plugins/experimental/plugin-automation/dist/lib/browser/app-graph-builder-6FSMLMT4.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DQ7ZSYJJ.mjs","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/browser/AssistantPanel-NTOUHOWA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":22315},"packages/plugins/experimental/plugin-automation/dist/lib/browser/AssistantPanel-NTOUHOWA.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DQ7ZSYJJ.mjs","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/browser/AutomationPanel-KT3YFV56.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18642},"packages/plugins/experimental/plugin-automation/dist/lib/browser/AutomationPanel-KT3YFV56.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DQ7ZSYJJ.mjs","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/browser/react-surface-5YTE5MRE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1915},"packages/plugins/experimental/plugin-automation/dist/lib/browser/react-surface-5YTE5MRE.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-4ODBJDXM.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DQ7ZSYJJ.mjs","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/browser/chunk-4ODBJDXM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":503},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-4ODBJDXM.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/AssistantPanel-NTOUHOWA.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/AutomationPanel-KT3YFV56.mjs","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/browser/chunk-DQ7ZSYJJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":892},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DQ7ZSYJJ.mjs":{"imports":[],"exports":["AUTOMATION_PLUGIN","meta"],"inputs":{"packages/plugins/experimental/plugin-automation/src/meta.ts":{"bytesInOutput":434}},"bytes":582}}}
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  AssistantPanel,
3
3
  AutomationPanel
4
- } from "./chunk-4AIMDHKY.mjs";
4
+ } from "./chunk-4ODBJDXM.mjs";
5
5
  import {
6
6
  AUTOMATION_PLUGIN
7
- } from "./chunk-HKX3D3ZP.mjs";
7
+ } from "./chunk-DQ7ZSYJJ.mjs";
8
8
 
9
9
  // packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx
10
10
  import React from "react";
@@ -31,4 +31,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
31
31
  export {
32
32
  react_surface_default as default
33
33
  };
34
- //# sourceMappingURL=react-surface-LL72F3F4.mjs.map
34
+ //# sourceMappingURL=react-surface-5YTE5MRE.mjs.map
@@ -26,12 +26,12 @@ 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 AssistantPanel_Z4GVHUF3_exports = {};
30
- __export(AssistantPanel_Z4GVHUF3_exports, {
29
+ var AssistantPanel_U7GDWPRC_exports = {};
30
+ __export(AssistantPanel_U7GDWPRC_exports, {
31
31
  default: () => AssistantPanel_default
32
32
  });
33
- module.exports = __toCommonJS(AssistantPanel_Z4GVHUF3_exports);
34
- var import_chunk_5VF5JKUN = require("./chunk-5VF5JKUN.cjs");
33
+ module.exports = __toCommonJS(AssistantPanel_U7GDWPRC_exports);
34
+ var import_chunk_TQEDPRY5 = require("./chunk-TQEDPRY5.cjs");
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_assistant = require("@dxos/assistant");
37
37
  var import_keys = require("@dxos/keys");
@@ -188,7 +188,7 @@ var RE_OPEN_TAG_LINE = /^[ ]*<[a-zA-Z0-9\-_]+>[ ]*$/;
188
188
  var RE_CLOSE_TAG_LINE = /^[ ]*<\/[a-zA-Z0-9\-_]+>[ ]*$/;
189
189
  var PROPERTIES_ASSISTANT_KEY = "dxos.assistant.beta.properties";
190
190
  var AssistantPanel = ({ subject, classNames }) => {
191
- const { t } = (0, import_react_ui2.useTranslation)(import_chunk_5VF5JKUN.AUTOMATION_PLUGIN);
191
+ const { t } = (0, import_react_ui2.useTranslation)(import_chunk_TQEDPRY5.AUTOMATION_PLUGIN);
192
192
  const config = (0, import_react_client.useConfig)();
193
193
  const client = (0, import_react_client.useClient)();
194
194
  const aiClient = (0, import_react.useRef)();
@@ -316,7 +316,7 @@ var MessageItem = ({ classNames, message }) => {
316
316
  return /* @__PURE__ */ import_react.default.createElement("div", {
317
317
  key: i,
318
318
  role: "none",
319
- className: (0, import_react_ui_theme.mx)(styleContainer, role === "user" ? "bg-primary-400 dark:bg-primary-600" : "bg-hoverSurface")
319
+ className: (0, import_react_ui_theme.mx)(styleContainer, role === "user" ? "bg-accentSurface" : "bg-input")
320
320
  }, cot && /* @__PURE__ */ import_react.default.createElement("div", {
321
321
  className: "p-2 whitespace-pre-wrap text-xs text-subdued"
322
322
  }, cot), /* @__PURE__ */ import_react.default.createElement("div", {
@@ -356,4 +356,4 @@ var parseMessage = (text) => {
356
356
  };
357
357
  };
358
358
  var AssistantPanel_default = AssistantPanel;
359
- //# sourceMappingURL=AssistantPanel-Z4GVHUF3.cjs.map
359
+ //# sourceMappingURL=AssistantPanel-U7GDWPRC.cjs.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": ";;;;;;;;;;;;;;;;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cAACC,OAAAA,MACC,6BAAAD,QAAA,cAACmC,QAAAA;UAAKjC,WAAU;WAAmB,aAAA,GAAkB,MAAG9F,SAAQqI,SAAS,GAE3E,6BAAAzC,QAAA,cAACqC,sDAAAA;UAAkBC,UAAS;WAAQlI,SAAQA,OAAO,CAAA;MAGzD;IACF;AAEA,WAAO;EACT,CAAA,CAAA;AAGN;AAGA,IAAM8H,eAAe,CAAC/C,SAAAA;AACpB,QAAMuD,QAAQ;AACd,QAAMzG,QAAQkD,KAAKlD,MAAMyG,KAAAA;AACzB,SAAO;IACLT,KAAKhG,QAAQ,CAAA,EAAG0G,KAAAA;IAChBtC,SAASpE,QAAQ,CAAA,KAAMkD,QAAQ;EACjC;AACF;AE/NA,IAAA,yBAAe3C;",
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,mBAAmD;AAEnD,uBAAkF;AAElF,kBAAwB;AACxB,0BAAqC;AACrC,sBAAkD;AAClD,IAAAA,mBAAqD;AACrD,yCAAkC;AAClC,4BAAmB;ACXnB,mBAA6B;AAE7B,yBAA4B;AAC5B,iBAAoB;AACpB,kBAA+C;;AAOxC,IAAMC,2BAA2B,OAAOC,YAAAA;AAC7C,MAAIC,eAAe;;;;;;;;;;qBAUD,oBAAIC,KAAAA,GAAOC,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AAQkD,KAAKlD,MAAMyG,KAAAA;AACzB,SAAO;IACLT,KAAKhG,QAAQ,CAAA,EAAG0G,KAAAA;IAChBtC,SAASpE,QAAQ,CAAA,KAAMkD,QAAQ;EACjC;AACF;AE5NA,IAAA,yBAAe3C;",
6
6
  "names": ["import_react_ui", "createSystemInstructions", "context", "instructions", "Date", "toLocaleString", "subject", "formatContextObject", "looseFormatXml", "object", "data", "asyncTimeout", "preprocessContextObject", "CONTEXT_OBJECT_QUERY_TIMEOUT", "err", "log", "error", "getTypename", "id", "formatObjectAsXMLTags", "space", "getSpace", "db", "query", "format", "ResultFormat", "Plain", "include", "content", "first", "threads", "undefined", "schema", "view", "schemaRegistry", "getSchema", "type", "objects", "rows", "Filter", "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", "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", "spaceId", "role", "text", "insertMessages", "generationStream", "generate", "model", "tools", "systemPrompt", "getSystemPrompt", "historyBefore", "_event", "accumulatedMessages", "complete", "clearThread", "React", "div", "className", "mx", "length", "message", "MessageItem", "Toolbar", "Root", "Input", "TextInput", "autoFocus", "placeholder", "onChange", "ev", "target", "onKeyDown", "ContextMenu", "Trigger", "asChild", "Button", "onClick", "Icon", "icon", "size", "Portal", "Content", "Viewport", "Item", "console", "_", "styleContainer", "i", "cot", "parseMessage", "span", "name", "SyntaxHighlighter", "language", "inputJson", "isError", "toolUseId", "regex", "trim"]
7
7
  }
@@ -26,12 +26,12 @@ 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 AutomationPanel_PPODB5XA_exports = {};
30
- __export(AutomationPanel_PPODB5XA_exports, {
29
+ var AutomationPanel_H5WE4FIU_exports = {};
30
+ __export(AutomationPanel_H5WE4FIU_exports, {
31
31
  default: () => AutomationPanel_default
32
32
  });
33
- module.exports = __toCommonJS(AutomationPanel_PPODB5XA_exports);
34
- var import_chunk_5VF5JKUN = require("./chunk-5VF5JKUN.cjs");
33
+ module.exports = __toCommonJS(AutomationPanel_H5WE4FIU_exports);
34
+ var import_chunk_TQEDPRY5 = require("./chunk-TQEDPRY5.cjs");
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_echo_schema = require("@dxos/echo-schema");
37
37
  var import_functions = require("@dxos/functions");
@@ -46,7 +46,7 @@ var import_echo2 = require("@dxos/react-client/echo");
46
46
  var import_react_ui2 = require("@dxos/react-ui");
47
47
  var import_react_ui_form = require("@dxos/react-ui-form");
48
48
  var TriggerEditor = ({ space, trigger, onSave, onCancel }) => {
49
- const { t } = (0, import_react_ui2.useTranslation)(import_chunk_5VF5JKUN.AUTOMATION_PLUGIN);
49
+ const { t } = (0, import_react_ui2.useTranslation)(import_chunk_TQEDPRY5.AUTOMATION_PLUGIN);
50
50
  const functions = (0, import_echo2.useQuery)(space, import_echo2.Filter.schema(import_functions2.FunctionType));
51
51
  const scripts = (0, import_echo2.useQuery)(space, import_echo2.Filter.schema(import_functions2.ScriptType));
52
52
  const handleSave = (values) => {
@@ -73,9 +73,9 @@ var TriggerEditor = ({ space, trigger, onSave, onCancel }) => {
73
73
  }))
74
74
  }),
75
75
  ["meta"]: (props) => {
76
- const meta = props.getValue("meta");
76
+ const meta = props.getValue();
77
77
  const [newMetaFieldName, setNewMetaFieldName] = (0, import_react2.useState)("");
78
- import_react2.default.useEffect(() => props.onValueChange("meta", "object", {
78
+ import_react2.default.useEffect(() => props.onValueChange("object", {
79
79
  ...meta
80
80
  }), []);
81
81
  return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("div", null, props.label), [
@@ -91,7 +91,6 @@ var TriggerEditor = ({ space, trigger, onSave, onCancel }) => {
91
91
  className: "flex-1"
92
92
  }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui_form.TextInput, {
93
93
  ...props,
94
- property: compositeKey,
95
94
  type: "string",
96
95
  label: key
97
96
  })), /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.IconButton, {
@@ -101,10 +100,10 @@ var TriggerEditor = ({ space, trigger, onSave, onCancel }) => {
101
100
  label: t("trigger meta remove"),
102
101
  onClick: () => {
103
102
  const newValues = {
104
- ...props.getValue("meta")
103
+ ...props.getValue()
105
104
  };
106
105
  delete newValues[key];
107
- props.onValueChange("meta", "object", newValues);
106
+ props.onValueChange("object", newValues);
108
107
  }
109
108
  }));
110
109
  }), /* @__PURE__ */ import_react2.default.createElement("div", {
@@ -123,13 +122,13 @@ var TriggerEditor = ({ space, trigger, onSave, onCancel }) => {
123
122
  label: t("trigger meta add"),
124
123
  onClick: () => {
125
124
  if (newMetaFieldName.length) {
126
- const meta2 = props.getValue("meta") ?? {};
125
+ const meta2 = props.getValue() ?? {};
127
126
  const metaWithNewProp = {
128
127
  ...meta2,
129
128
  [newMetaFieldName]: ""
130
129
  };
131
130
  setNewMetaFieldName("");
132
- props.onValueChange("meta", "object", metaWithNewProp);
131
+ props.onValueChange("object", metaWithNewProp);
133
132
  }
134
133
  }
135
134
  })));
@@ -142,7 +141,7 @@ var getFunctionName = (scripts, fn) => {
142
141
  };
143
142
  var grid = "grid grid-cols-[40px_1fr_32px] min-bs-[2.5rem]";
144
143
  var AutomationPanel = ({ space, object }) => {
145
- const { t } = (0, import_react_ui.useTranslation)(import_chunk_5VF5JKUN.AUTOMATION_PLUGIN);
144
+ const { t } = (0, import_react_ui.useTranslation)(import_chunk_TQEDPRY5.AUTOMATION_PLUGIN);
146
145
  const client = (0, import_react_client.useClient)();
147
146
  const triggers = (0, import_echo.useQuery)(space, import_echo.Filter.schema(import_functions.FunctionTrigger));
148
147
  const functions = (0, import_echo.useQuery)(space, import_echo.Filter.schema(import_functions.FunctionType));
@@ -249,4 +248,4 @@ var getFunctionName2 = (scripts, functions, trigger) => {
249
248
  return scripts.find((s) => functionObject.source?.target?.id === s.id)?.name ?? shortId;
250
249
  };
251
250
  var AutomationPanel_default = AutomationPanel;
252
- //# sourceMappingURL=AutomationPanel-PPODB5XA.cjs.map
251
+ //# sourceMappingURL=AutomationPanel-H5WE4FIU.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/AutomationPanel/AutomationPanel.tsx", "../../../src/components/TriggerEditor/TriggerEditor.tsx", "../../../src/components/AutomationPanel/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { S } from '@dxos/echo-schema';\nimport {\n FunctionType,\n FunctionTrigger,\n FunctionTriggerSchema,\n TriggerKind,\n type FunctionTriggerType,\n ScriptType,\n} from '@dxos/functions';\nimport { type Client, useClient } from '@dxos/react-client';\nimport { create, Filter, useQuery, type Space, type ReactiveObject, getSpace } from '@dxos/react-client/echo';\nimport { IconButton, Input, useTranslation, Button } from '@dxos/react-ui';\nimport { List } from '@dxos/react-ui-list';\nimport { ghostHover, mx } from '@dxos/react-ui-theme';\n\nimport { AUTOMATION_PLUGIN } from '../../meta';\nimport { TriggerEditor, type TriggerEditorProps } from '../TriggerEditor';\n\nconst grid = 'grid grid-cols-[40px_1fr_32px] min-bs-[2.5rem]';\n\nexport type AutomationPanelProps = {\n space: Space;\n object?: ReactiveObject<any>;\n};\n\n// TODO(burdon): Factor out common layout with ViewEditor.\nexport const AutomationPanel = ({ space, object }: AutomationPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const client = useClient();\n const triggers = useQuery(space, Filter.schema(FunctionTrigger));\n const functions = useQuery(space, Filter.schema(FunctionType));\n const scripts = useQuery(space, Filter.schema(ScriptType));\n\n const [trigger, setTrigger] = useState<FunctionTriggerType>();\n const [selected, setSelected] = useState<FunctionTrigger>();\n\n const handleSelect = (trigger: FunctionTrigger) => {\n const { id: _, ...values } = trigger;\n setTrigger(values);\n setSelected(trigger);\n };\n\n const handleAdd = () => {\n setTrigger(create(FunctionTriggerSchema, { meta: {} }));\n setSelected(undefined);\n };\n\n const handleDelete = (trigger: FunctionTrigger) => {\n space.db.remove(trigger);\n setTrigger(undefined);\n setSelected(undefined);\n };\n\n const handleSave: TriggerEditorProps['onSave'] = (trigger) => {\n if (selected) {\n Object.assign(selected, trigger);\n } else {\n space.db.add(create(FunctionTrigger, trigger));\n }\n\n setTrigger(undefined);\n setSelected(undefined);\n };\n\n const handleCancel: TriggerEditorProps['onCancel'] = () => {\n setTrigger(undefined);\n };\n\n return (\n <div className='flex flex-col w-full divide-y divide-separator overflow-y-auto'>\n <List.Root<FunctionTrigger> items={triggers} isItem={S.is(FunctionTrigger)} getId={(field) => field.id}>\n {({ items: triggers }) => (\n <div role='list' className='flex flex-col w-full'>\n {triggers?.map((trigger) => {\n const copyAction = getCopyAction(client, trigger);\n return (\n <List.Item<FunctionTrigger>\n key={trigger.id}\n item={trigger}\n classNames={mx(grid, ghostHover, 'items-center', 'px-2')}\n >\n <Input.Root>\n <Input.Switch\n checked={trigger.enabled}\n onCheckedChange={(checked) => (trigger.enabled = checked)}\n />\n </Input.Root>\n\n <div className={'flex'}>\n <List.ItemTitle\n classNames='px-1 cursor-pointer w-0 shrink truncate'\n onClick={() => handleSelect(trigger)}\n >\n {getFunctionName(scripts, functions, trigger) ?? '∅'}\n </List.ItemTitle>\n\n {/* TODO: a better way to expose copy action */}\n {copyAction && (\n <Button onClick={() => navigator.clipboard.writeText(copyAction.contentProvider())}>\n {t(copyAction.translationKey)}\n </Button>\n )}\n </div>\n\n <List.ItemDeleteButton onClick={() => handleDelete(trigger)} />\n </List.Item>\n );\n })}\n </div>\n )}\n </List.Root>\n\n {trigger && <TriggerEditor space={space} trigger={trigger} onSave={handleSave} onCancel={handleCancel} />}\n\n {!trigger && (\n <div className='flex p-2 justify-center'>\n <IconButton icon='ph--plus--regular' label={t('new trigger')} onClick={handleAdd} />\n </div>\n )}\n </div>\n );\n};\n\nconst getCopyAction = (client: Client, trigger: FunctionTrigger | undefined) => {\n if (trigger?.spec?.type === TriggerKind.Email) {\n return { translationKey: 'trigger copy email', contentProvider: () => `${getSpace(trigger)!.id}@dxos.network` };\n }\n\n if (trigger?.spec?.type === TriggerKind.Webhook) {\n return { translationKey: 'trigger copy url', contentProvider: () => getWebhookUrl(client, trigger) };\n }\n\n return undefined;\n};\n\nconst getWebhookUrl = (client: Client, trigger: FunctionTrigger) => {\n const spaceId = getSpace(trigger)!.id;\n const edgeUrl = new URL(client.config.values.runtime!.services!.edge!.url!);\n const isSecure = edgeUrl.protocol.startsWith('https') || edgeUrl.protocol.startsWith('wss');\n edgeUrl.protocol = isSecure ? 'https' : 'http';\n return new URL(`/webhook/${spaceId}:${trigger.id}`, edgeUrl).toString();\n};\n\nconst getFunctionName = (scripts: ScriptType[], functions: FunctionType[], trigger: FunctionTriggerType) => {\n const shortId = trigger.function && `${trigger.function?.slice(0, 16)}…`;\n const functionObject = functions.find((fn) => fn.name === trigger.function);\n if (!functionObject) {\n return shortId;\n }\n return scripts.find((s) => functionObject.source?.target?.id === s.id)?.name ?? shortId;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport {\n FunctionType,\n FunctionTriggerSchema,\n type FunctionTriggerType,\n type FunctionTrigger,\n ScriptType,\n TriggerKind,\n} from '@dxos/functions';\nimport { Filter, useQuery, type Space } from '@dxos/react-client/echo';\nimport { IconButton, Input, useTranslation } from '@dxos/react-ui';\nimport { Form, SelectInput, TextInput } from '@dxos/react-ui-form';\n\nimport { AUTOMATION_PLUGIN } from '../../meta';\n\nexport type TriggerEditorProps = {\n space: Space;\n trigger: FunctionTriggerType;\n onSave?: (trigger: Omit<FunctionTrigger, 'id'>) => void;\n onCancel?: () => void;\n};\n\nexport const TriggerEditor = ({ space, trigger, onSave, onCancel }: TriggerEditorProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n\n const functions = useQuery(space, Filter.schema(FunctionType));\n const scripts = useQuery(space, Filter.schema(ScriptType));\n\n const handleSave = (values: FunctionTriggerType) => {\n onSave?.(values);\n };\n\n return (\n <Form<FunctionTriggerType>\n schema={FunctionTriggerSchema}\n values={trigger}\n onSave={handleSave}\n onCancel={onCancel}\n Custom={{\n ['function' satisfies keyof FunctionTriggerType]: (props) => (\n <SelectInput\n {...props}\n options={functions.map((fn) => ({\n value: fn.name,\n label: getFunctionName(scripts, fn),\n }))}\n />\n ),\n ['spec.type' as const]: (props) => (\n <SelectInput\n {...props}\n options={Object.values(TriggerKind).map((kind) => ({\n value: kind,\n label: t(`trigger type ${kind}`),\n }))}\n />\n ),\n ['meta' as const]: (props) => {\n const meta = props.getValue()!;\n\n const [newMetaFieldName, setNewMetaFieldName] = useState('');\n\n React.useEffect(() => props.onValueChange('object', { ...meta }), []);\n\n return (\n <>\n <div>{props.label}</div>\n {[...Object.keys(meta)].map((key) => {\n const compositeKey: any = `meta.${key}`;\n return (\n <div key={compositeKey} role='none' className='flex items-center mt-2 gap-1'>\n <div role='none' className='flex-1'>\n <TextInput {...props} type={'string'} label={key} />\n </div>\n <IconButton\n icon='ph--trash--regular'\n iconOnly\n classNames={'mt-6'}\n label={t('trigger meta remove')}\n onClick={() => {\n const newValues: any = { ...props.getValue() };\n delete newValues[key];\n props.onValueChange('object', newValues);\n }}\n />\n </div>\n );\n })}\n <div role='none' className='flex items-center mt-2 gap-1 plb-1'>\n <div role='none' className='flex-1'>\n <Input.Root>\n <Input.TextInput\n placeholder={t('trigger meta prop name placeholder')}\n value={newMetaFieldName}\n onChange={(event) => setNewMetaFieldName(event.target.value)}\n />\n </Input.Root>\n </div>\n <IconButton\n icon='ph--plus--regular'\n iconOnly\n label={t('trigger meta add')}\n onClick={() => {\n if (newMetaFieldName.length) {\n const meta = props.getValue() ?? {};\n const metaWithNewProp = { ...meta, [newMetaFieldName]: '' };\n setNewMetaFieldName('');\n props.onValueChange('object', metaWithNewProp);\n }\n }}\n />\n </div>\n </>\n );\n },\n }}\n />\n );\n};\n\nconst getFunctionName = (scripts: ScriptType[], fn: FunctionType) => {\n return scripts.find((s) => fn.source?.target?.id === s.id)?.name ?? fn.name;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { AutomationPanel } from './AutomationPanel';\n\nexport default AutomationPanel;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAgC;AAEhC,yBAAkB;AAClB,uBAOO;AACP,0BAAuC;AACvC,kBAAoF;AACpF,sBAA0D;AAC1D,2BAAqB;AACrB,4BAA+B;ACf/B,IAAAA,gBAAgC;AAEhC,IAAAC,oBAOO;AACP,IAAAC,eAA6C;AAC7C,IAAAC,mBAAkD;AAClD,2BAA6C;AAWtC,IAAMC,gBAAgB,CAAC,EAAEC,OAAOC,SAASC,QAAQC,SAAQ,MAAsB;AACpF,QAAM,EAAEC,EAAC,QAAKC,iCAAeC,uCAAAA;AAE7B,QAAMC,gBAAYC,uBAASR,OAAOS,oBAAOC,OAAOC,8BAAAA,CAAAA;AAChD,QAAMC,cAAUJ,uBAASR,OAAOS,oBAAOC,OAAOG,4BAAAA,CAAAA;AAE9C,QAAMC,aAAa,CAACC,WAAAA;AAClBb,aAASa,MAAAA;EACX;AAEA,SACE,8BAAAC,QAAA,cAACC,2BAAAA;IACCP,QAAQQ;IACRH,QAAQd;IACRC,QAAQY;IACRX;IACAgB,QAAQ;MACN,CAAC,UAAA,GAAiD,CAACC,UACj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,gBAAgB;MAAsBD,iBAAiB,MAAM,OAAGK,sBAAShH,OAAAA,EAAU+D,EAAE;IAAgB;EAChH;AAEA,MAAI/D,SAAS8G,MAAMjE,SAAShB,iBAAAA,YAAYoF,SAAS;AAC/C,WAAO;MAAEL,gBAAgB;MAAoBD,iBAAiB,MAAMO,cAAc/C,QAAQnE,OAAAA;IAAS;EACrG;AAEA,SAAO8E;AACT;AAEA,IAAMoC,gBAAgB,CAAC/C,QAAgBnE,YAAAA;AACrC,QAAMmH,cAAUH,sBAAShH,OAAAA,EAAU+D;AACnC,QAAMqD,UAAU,IAAIC,IAAIlD,OAAOmD,OAAOxG,OAAOyG,QAASC,SAAUC,KAAMC,GAAG;AACzE,QAAMC,WAAWP,QAAQQ,SAASC,WAAW,OAAA,KAAYT,QAAQQ,SAASC,WAAW,KAAA;AACrFT,UAAQQ,WAAWD,WAAW,UAAU;AACxC,SAAO,IAAIN,IAAI,YAAYF,OAAAA,IAAWnH,QAAQ+D,EAAE,IAAIqD,OAAAA,EAASU,SAAQ;AACvE;AAEA,IAAMnG,mBAAkB,CAAChB,SAAuBL,WAA2BN,YAAAA;AACzE,QAAM+H,UAAU/H,QAAQgI,YAAY,GAAGhI,QAAQgI,UAAUC,MAAM,GAAG,EAAA,CAAA;AAClE,QAAMC,iBAAiB5H,UAAUsD,KAAK,CAACrC,OAAOA,GAAGE,SAASzB,QAAQgI,QAAQ;AAC1E,MAAI,CAACE,gBAAgB;AACnB,WAAOH;EACT;AACA,SAAOpH,QAAQiD,KAAK,CAACC,MAAMqE,eAAepE,QAAQL,QAAQM,OAAOF,EAAEE,EAAE,GAAGtC,QAAQsG;AAClF;AEtJA,IAAA,0BAAe9D;",
6
+ "names": ["import_react", "import_functions", "import_echo", "import_react_ui", "TriggerEditor", "space", "trigger", "onSave", "onCancel", "t", "useTranslation", "AUTOMATION_PLUGIN", "functions", "useQuery", "Filter", "schema", "FunctionType", "scripts", "ScriptType", "handleSave", "values", "React", "Form", "FunctionTriggerSchema", "Custom", "props", "SelectInput", "options", "map", "fn", "value", "name", "label", "getFunctionName", "Object", "TriggerKind", "kind", "meta", "getValue", "newMetaFieldName", "setNewMetaFieldName", "useState", "useEffect", "onValueChange", "div", "keys", "key", "compositeKey", "role", "className", "TextInput", "type", "IconButton", "icon", "iconOnly", "classNames", "onClick", "newValues", "Input", "Root", "placeholder", "onChange", "event", "target", "length", "metaWithNewProp", "find", "s", "source", "id", "grid", "AutomationPanel", "object", "client", "useClient", "triggers", "FunctionTrigger", "setTrigger", "selected", "setSelected", "handleSelect", "_", "handleAdd", "create", "undefined", "handleDelete", "db", "remove", "assign", "add", "handleCancel", "List", "items", "isItem", "S", "is", "getId", "field", "copyAction", "getCopyAction", "Item", "item", "mx", "ghostHover", "Switch", "checked", "enabled", "onCheckedChange", "ItemTitle", "Button", "navigator", "clipboard", "writeText", "contentProvider", "translationKey", "ItemDeleteButton", "spec", "Email", "getSpace", "Webhook", "getWebhookUrl", "spaceId", "edgeUrl", "URL", "config", "runtime", "services", "edge", "url", "isSecure", "protocol", "startsWith", "toString", "shortId", "function", "slice", "functionObject"]
7
+ }
@@ -16,12 +16,12 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var app_graph_builder_MF5M4QRS_exports = {};
20
- __export(app_graph_builder_MF5M4QRS_exports, {
19
+ var app_graph_builder_65TBXO3I_exports = {};
20
+ __export(app_graph_builder_65TBXO3I_exports, {
21
21
  default: () => app_graph_builder_default
22
22
  });
23
- module.exports = __toCommonJS(app_graph_builder_MF5M4QRS_exports);
24
- var import_chunk_5VF5JKUN = require("./chunk-5VF5JKUN.cjs");
23
+ module.exports = __toCommonJS(app_graph_builder_65TBXO3I_exports);
24
+ var import_chunk_TQEDPRY5 = require("./chunk-TQEDPRY5.cjs");
25
25
  var import_app_framework = require("@dxos/app-framework");
26
26
  var import_plugin_client = require("@dxos/plugin-client");
27
27
  var import_plugin_graph = require("@dxos/plugin-graph");
@@ -31,7 +31,7 @@ var app_graph_builder_default = (context) => {
31
31
  const resolve = (typename) => context.requestCapabilities(import_app_framework.Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};
32
32
  return (0, import_app_framework.contributes)(import_app_framework.Capabilities.AppGraphBuilder, [
33
33
  (0, import_plugin_graph.createExtension)({
34
- id: `${import_chunk_5VF5JKUN.AUTOMATION_PLUGIN}/automation-for-subject`,
34
+ id: `${import_chunk_TQEDPRY5.AUTOMATION_PLUGIN}/automation-for-subject`,
35
35
  resolver: ({ id }) => {
36
36
  if (!id.endsWith("~automation")) {
37
37
  return;
@@ -47,12 +47,12 @@ var app_graph_builder_default = (context) => {
47
47
  const label2 = space ? space.properties.name || [
48
48
  "unnamed space label",
49
49
  {
50
- ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
50
+ ns: import_chunk_TQEDPRY5.AUTOMATION_PLUGIN
51
51
  }
52
52
  ] : [
53
53
  "unnamed object settings label",
54
54
  {
55
- ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
55
+ ns: import_chunk_TQEDPRY5.AUTOMATION_PLUGIN
56
56
  }
57
57
  ];
58
58
  return {
@@ -78,7 +78,7 @@ var app_graph_builder_default = (context) => {
78
78
  const label = meta.label?.(object) || object.name || meta.placeholder || [
79
79
  "unnamed object settings label",
80
80
  {
81
- ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
81
+ ns: import_chunk_TQEDPRY5.AUTOMATION_PLUGIN
82
82
  }
83
83
  ];
84
84
  return {
@@ -94,7 +94,7 @@ var app_graph_builder_default = (context) => {
94
94
  }
95
95
  }),
96
96
  (0, import_plugin_graph.createExtension)({
97
- id: `${import_chunk_5VF5JKUN.AUTOMATION_PLUGIN}/assistant-for-subject`,
97
+ id: `${import_chunk_TQEDPRY5.AUTOMATION_PLUGIN}/assistant-for-subject`,
98
98
  resolver: ({ id }) => {
99
99
  if (!id.endsWith("~assistant")) {
100
100
  return;
@@ -114,7 +114,7 @@ var app_graph_builder_default = (context) => {
114
114
  label: [
115
115
  "assistant panel label",
116
116
  {
117
- ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
117
+ ns: import_chunk_TQEDPRY5.AUTOMATION_PLUGIN
118
118
  }
119
119
  ],
120
120
  object: null,
@@ -134,7 +134,7 @@ var app_graph_builder_default = (context) => {
134
134
  label: [
135
135
  "assistant panel label",
136
136
  {
137
- ns: import_chunk_5VF5JKUN.AUTOMATION_PLUGIN
137
+ ns: import_chunk_TQEDPRY5.AUTOMATION_PLUGIN
138
138
  }
139
139
  ],
140
140
  object
@@ -144,4 +144,4 @@ var app_graph_builder_default = (context) => {
144
144
  })
145
145
  ]);
146
146
  };
147
- //# sourceMappingURL=app-graph-builder-MF5M4QRS.cjs.map
147
+ //# sourceMappingURL=app-graph-builder-65TBXO3I.cjs.map
@@ -26,18 +26,18 @@ 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 chunk_25AQIF3L_exports = {};
30
- __export(chunk_25AQIF3L_exports, {
29
+ var chunk_JUSXT4U5_exports = {};
30
+ __export(chunk_JUSXT4U5_exports, {
31
31
  AssistantPanel: () => AssistantPanel,
32
32
  AutomationPanel: () => AutomationPanel
33
33
  });
34
- module.exports = __toCommonJS(chunk_25AQIF3L_exports);
34
+ module.exports = __toCommonJS(chunk_JUSXT4U5_exports);
35
35
  var import_react = require("react");
36
- var AssistantPanel = (0, import_react.lazy)(() => import("./AssistantPanel-Z4GVHUF3.cjs"));
37
- var AutomationPanel = (0, import_react.lazy)(() => import("./AutomationPanel-PPODB5XA.cjs"));
36
+ var AssistantPanel = (0, import_react.lazy)(() => import("./AssistantPanel-U7GDWPRC.cjs"));
37
+ var AutomationPanel = (0, import_react.lazy)(() => import("./AutomationPanel-H5WE4FIU.cjs"));
38
38
  // Annotate the CommonJS export names for ESM import in node:
39
39
  0 && (module.exports = {
40
40
  AssistantPanel,
41
41
  AutomationPanel
42
42
  });
43
- //# sourceMappingURL=chunk-25AQIF3L.cjs.map
43
+ //# sourceMappingURL=chunk-JUSXT4U5.cjs.map
@@ -16,17 +16,17 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_5VF5JKUN_exports = {};
20
- __export(chunk_5VF5JKUN_exports, {
19
+ var chunk_TQEDPRY5_exports = {};
20
+ __export(chunk_TQEDPRY5_exports, {
21
21
  AUTOMATION_PLUGIN: () => AUTOMATION_PLUGIN,
22
22
  meta: () => meta
23
23
  });
24
- module.exports = __toCommonJS(chunk_5VF5JKUN_exports);
24
+ module.exports = __toCommonJS(chunk_TQEDPRY5_exports);
25
25
  var AUTOMATION_PLUGIN = "dxos.org/plugin/automation";
26
26
  var meta = {
27
27
  id: AUTOMATION_PLUGIN,
28
28
  name: "Automation",
29
- description: "Automation workflows.",
29
+ description: "The Automation tab allows you to trigger pre-defined workflows related to the element you are interacting with inside of Composer.",
30
30
  icon: "ph--magic-wand--regular",
31
31
  source: "https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-automation",
32
32
  tags: [
@@ -38,4 +38,4 @@ var meta = {
38
38
  AUTOMATION_PLUGIN,
39
39
  meta
40
40
  });
41
- //# sourceMappingURL=chunk-5VF5JKUN.cjs.map
41
+ //# sourceMappingURL=chunk-TQEDPRY5.cjs.map