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

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 (169) hide show
  1. package/dist/lib/browser/AutomationPanel-ITYXSN5Z.mjs +132 -0
  2. package/dist/lib/browser/AutomationPanel-ITYXSN5Z.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-HKX3D3ZP.mjs → chunk-OFDNNRLE.mjs} +4 -7
  4. package/dist/lib/browser/{chunk-HKX3D3ZP.mjs.map → chunk-OFDNNRLE.mjs.map} +3 -3
  5. package/dist/lib/browser/chunk-U7QLNY2S.mjs +8 -0
  6. package/dist/lib/browser/chunk-U7QLNY2S.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-WY2C7JY4.mjs +119 -0
  8. package/dist/lib/browser/chunk-WY2C7JY4.mjs.map +7 -0
  9. package/dist/lib/browser/complementary-panel-4CPOJL4Y.mjs +56 -0
  10. package/dist/lib/browser/complementary-panel-4CPOJL4Y.mjs.map +7 -0
  11. package/dist/lib/browser/index.mjs +21 -313
  12. package/dist/lib/browser/index.mjs.map +4 -4
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/{react-surface-LL72F3F4.mjs → react-surface-SAPMN4PF.mjs} +4 -11
  15. package/dist/lib/browser/react-surface-SAPMN4PF.mjs.map +7 -0
  16. package/dist/lib/node/{AutomationPanel-PPODB5XA.cjs → AutomationPanel-X33HHDMQ.cjs} +19 -117
  17. package/dist/lib/node/AutomationPanel-X33HHDMQ.cjs.map +7 -0
  18. package/dist/lib/node/chunk-7Q5SNGCL.cjs +148 -0
  19. package/dist/lib/node/chunk-7Q5SNGCL.cjs.map +7 -0
  20. package/dist/lib/node/{chunk-25AQIF3L.cjs → chunk-CB5OB6JH.cjs} +5 -8
  21. package/dist/lib/node/chunk-CB5OB6JH.cjs.map +7 -0
  22. package/dist/lib/node/{chunk-5VF5JKUN.cjs → chunk-ORMEYEBE.cjs} +7 -10
  23. package/dist/lib/node/{chunk-5VF5JKUN.cjs.map → chunk-ORMEYEBE.cjs.map} +3 -3
  24. package/dist/lib/node/complementary-panel-ZYJJ42ZU.cjs +72 -0
  25. package/dist/lib/node/complementary-panel-ZYJJ42ZU.cjs.map +7 -0
  26. package/dist/lib/node/index.cjs +26 -318
  27. package/dist/lib/node/index.cjs.map +4 -4
  28. package/dist/lib/node/meta.json +1 -1
  29. package/dist/lib/node/{react-surface-DVAU4MGD.cjs → react-surface-2WRVAPGR.cjs} +9 -15
  30. package/dist/lib/node/react-surface-2WRVAPGR.cjs.map +7 -0
  31. package/dist/lib/node-esm/AutomationPanel-HY3GB4BT.mjs +133 -0
  32. package/dist/lib/node-esm/AutomationPanel-HY3GB4BT.mjs.map +7 -0
  33. package/dist/lib/node-esm/{chunk-X3LPRWIL.mjs → chunk-6MUUH67V.mjs} +4 -7
  34. package/dist/lib/node-esm/{chunk-X3LPRWIL.mjs.map → chunk-6MUUH67V.mjs.map} +3 -3
  35. package/dist/lib/node-esm/{chunk-XW7TEQA3.mjs → chunk-R3P2WPBQ.mjs} +2 -4
  36. package/dist/lib/node-esm/chunk-R3P2WPBQ.mjs.map +7 -0
  37. package/dist/lib/node-esm/chunk-UDD2VA6G.mjs +120 -0
  38. package/dist/lib/node-esm/chunk-UDD2VA6G.mjs.map +7 -0
  39. package/dist/lib/node-esm/complementary-panel-S42RIIAY.mjs +57 -0
  40. package/dist/lib/node-esm/complementary-panel-S42RIIAY.mjs.map +7 -0
  41. package/dist/lib/node-esm/index.mjs +21 -313
  42. package/dist/lib/node-esm/index.mjs.map +4 -4
  43. package/dist/lib/node-esm/meta.json +1 -1
  44. package/dist/lib/node-esm/{react-surface-4BED2PZ4.mjs → react-surface-QWLPOYXO.mjs} +4 -11
  45. package/dist/lib/node-esm/react-surface-QWLPOYXO.mjs.map +7 -0
  46. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  47. package/dist/types/src/capabilities/complementary-panel.d.ts +4 -0
  48. package/dist/types/src/capabilities/complementary-panel.d.ts.map +1 -0
  49. package/dist/types/src/capabilities/index.d.ts +2 -178
  50. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  51. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  52. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -2
  53. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  54. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
  55. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -2
  56. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  57. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
  58. package/dist/types/src/components/index.d.ts +2 -2
  59. package/dist/types/src/components/index.d.ts.map +1 -1
  60. package/dist/types/src/index.d.ts +1 -3
  61. package/dist/types/src/index.d.ts.map +1 -1
  62. package/dist/types/src/meta.d.ts +0 -1
  63. package/dist/types/src/meta.d.ts.map +1 -1
  64. package/dist/types/src/testing/index.d.ts +1 -1
  65. package/dist/types/src/testing/index.d.ts.map +1 -1
  66. package/dist/types/src/testing/{testing.d.ts → test-functions.d.ts} +1 -1
  67. package/dist/types/src/testing/test-functions.d.ts.map +1 -0
  68. package/dist/types/src/translations.d.ts +2 -20
  69. package/dist/types/src/translations.d.ts.map +1 -1
  70. package/package.json +23 -57
  71. package/src/AutomationPlugin.tsx +10 -42
  72. package/src/capabilities/complementary-panel.ts +56 -0
  73. package/src/capabilities/index.ts +1 -1
  74. package/src/capabilities/react-surface.tsx +1 -6
  75. package/src/components/AutomationPanel/AutomationPanel.stories.tsx +1 -2
  76. package/src/components/AutomationPanel/AutomationPanel.tsx +56 -49
  77. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +1 -2
  78. package/src/components/TriggerEditor/TriggerEditor.tsx +25 -18
  79. package/src/components/index.ts +2 -1
  80. package/src/index.ts +2 -3
  81. package/src/meta.ts +3 -3
  82. package/src/testing/index.ts +1 -1
  83. package/src/testing/{testing.ts → test-functions.ts} +2 -2
  84. package/src/translations.ts +2 -23
  85. package/dist/lib/browser/AssistantPanel-N276BTPV.mjs +0 -339
  86. package/dist/lib/browser/AssistantPanel-N276BTPV.mjs.map +0 -7
  87. package/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs +0 -232
  88. package/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs.map +0 -7
  89. package/dist/lib/browser/app-graph-builder-IJTTULDP.mjs +0 -131
  90. package/dist/lib/browser/app-graph-builder-IJTTULDP.mjs.map +0 -7
  91. package/dist/lib/browser/chunk-4AIMDHKY.mjs +0 -10
  92. package/dist/lib/browser/chunk-4AIMDHKY.mjs.map +0 -7
  93. package/dist/lib/browser/chunk-DL6LB2NI.mjs +0 -43
  94. package/dist/lib/browser/chunk-DL6LB2NI.mjs.map +0 -7
  95. package/dist/lib/browser/react-surface-LL72F3F4.mjs.map +0 -7
  96. package/dist/lib/browser/types/index.mjs +0 -13
  97. package/dist/lib/browser/types/index.mjs.map +0 -7
  98. package/dist/lib/node/AssistantPanel-Z4GVHUF3.cjs +0 -359
  99. package/dist/lib/node/AssistantPanel-Z4GVHUF3.cjs.map +0 -7
  100. package/dist/lib/node/AutomationPanel-PPODB5XA.cjs.map +0 -7
  101. package/dist/lib/node/app-graph-builder-MF5M4QRS.cjs +0 -147
  102. package/dist/lib/node/app-graph-builder-MF5M4QRS.cjs.map +0 -7
  103. package/dist/lib/node/chunk-25AQIF3L.cjs.map +0 -7
  104. package/dist/lib/node/chunk-JNDMZQH7.cjs +0 -68
  105. package/dist/lib/node/chunk-JNDMZQH7.cjs.map +0 -7
  106. package/dist/lib/node/react-surface-DVAU4MGD.cjs.map +0 -7
  107. package/dist/lib/node/types/index.cjs +0 -35
  108. package/dist/lib/node/types/index.cjs.map +0 -7
  109. package/dist/lib/node-esm/AssistantPanel-DDCQHBJX.mjs +0 -340
  110. package/dist/lib/node-esm/AssistantPanel-DDCQHBJX.mjs.map +0 -7
  111. package/dist/lib/node-esm/AutomationPanel-R3D6CRF5.mjs +0 -233
  112. package/dist/lib/node-esm/AutomationPanel-R3D6CRF5.mjs.map +0 -7
  113. package/dist/lib/node-esm/app-graph-builder-5N7OK23B.mjs +0 -132
  114. package/dist/lib/node-esm/app-graph-builder-5N7OK23B.mjs.map +0 -7
  115. package/dist/lib/node-esm/chunk-GIAYUM5I.mjs +0 -45
  116. package/dist/lib/node-esm/chunk-GIAYUM5I.mjs.map +0 -7
  117. package/dist/lib/node-esm/chunk-XW7TEQA3.mjs.map +0 -7
  118. package/dist/lib/node-esm/react-surface-4BED2PZ4.mjs.map +0 -7
  119. package/dist/lib/node-esm/types/index.mjs +0 -14
  120. package/dist/lib/node-esm/types/index.mjs.map +0 -7
  121. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -180
  122. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  123. package/dist/types/src/components/AssistantPanel/AssistantPanel.d.ts +0 -8
  124. package/dist/types/src/components/AssistantPanel/AssistantPanel.d.ts.map +0 -1
  125. package/dist/types/src/components/AssistantPanel/index.d.ts +0 -3
  126. package/dist/types/src/components/AssistantPanel/index.d.ts.map +0 -1
  127. package/dist/types/src/components/AssistantPanel/system-instructions.d.ts +0 -6
  128. package/dist/types/src/components/AssistantPanel/system-instructions.d.ts.map +0 -1
  129. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts +0 -10
  130. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts.map +0 -1
  131. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts +0 -6
  132. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts.map +0 -1
  133. package/dist/types/src/components/PromptEditor/index.d.ts +0 -2
  134. package/dist/types/src/components/PromptEditor/index.d.ts.map +0 -1
  135. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts +0 -4
  136. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts.map +0 -1
  137. package/dist/types/src/components/PromptEditor/types.d.ts +0 -18
  138. package/dist/types/src/components/PromptEditor/types.d.ts.map +0 -1
  139. package/dist/types/src/hooks/email.d.ts +0 -4
  140. package/dist/types/src/hooks/email.d.ts.map +0 -1
  141. package/dist/types/src/hooks/index.d.ts +0 -2
  142. package/dist/types/src/hooks/index.d.ts.map +0 -1
  143. package/dist/types/src/hooks/invocation-handler.d.ts +0 -5
  144. package/dist/types/src/hooks/invocation-handler.d.ts.map +0 -1
  145. package/dist/types/src/hooks/useLocalTriggerManager.d.ts +0 -3
  146. package/dist/types/src/hooks/useLocalTriggerManager.d.ts.map +0 -1
  147. package/dist/types/src/presets.d.ts +0 -9
  148. package/dist/types/src/presets.d.ts.map +0 -1
  149. package/dist/types/src/testing/testing.d.ts.map +0 -1
  150. package/dist/types/src/types/index.d.ts +0 -2
  151. package/dist/types/src/types/index.d.ts.map +0 -1
  152. package/dist/types/src/types/schema.d.ts +0 -63
  153. package/dist/types/src/types/schema.d.ts.map +0 -1
  154. package/src/capabilities/app-graph-builder.ts +0 -127
  155. package/src/components/AssistantPanel/AssistantPanel.tsx +0 -230
  156. package/src/components/AssistantPanel/index.ts +0 -7
  157. package/src/components/AssistantPanel/system-instructions.ts +0 -166
  158. package/src/components/PromptEditor/PromptEditor.stories.tsx +0 -64
  159. package/src/components/PromptEditor/PromptEditor.tsx +0 -222
  160. package/src/components/PromptEditor/index.ts +0 -5
  161. package/src/components/PromptEditor/prompt-extension.ts +0 -43
  162. package/src/components/PromptEditor/types.tsx +0 -28
  163. package/src/hooks/email.ts +0 -49
  164. package/src/hooks/index.ts +0 -5
  165. package/src/hooks/invocation-handler.ts +0 -109
  166. package/src/hooks/useLocalTriggerManager.ts +0 -82
  167. package/src/presets.ts +0 -248
  168. package/src/types/index.ts +0 -5
  169. package/src/types/schema.ts +0 -38
@@ -1,180 +0,0 @@
1
- import { type PluginsContext } from '@dxos/app-framework';
2
- declare const _default: (context: PluginsContext) => import("@dxos/app-framework").Capability<Readonly<{
3
- id: string;
4
- disposition: import("packages/common/util/dist/types/src").Disposition;
5
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
6
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
7
- relation?: import("@dxos/plugin-graph").Relation;
8
- type?: string;
9
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
10
- }> | Readonly<{
11
- id: string;
12
- disposition: import("packages/common/util/dist/types/src").Disposition;
13
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
14
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
15
- relation?: import("@dxos/plugin-graph").Relation;
16
- type?: string;
17
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
18
- }>[] | (Readonly<{
19
- id: string;
20
- disposition: import("packages/common/util/dist/types/src").Disposition;
21
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
22
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
23
- relation?: import("@dxos/plugin-graph").Relation;
24
- type?: string;
25
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
26
- }> | Readonly<{
27
- id: string;
28
- disposition: import("packages/common/util/dist/types/src").Disposition;
29
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
30
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
31
- relation?: import("@dxos/plugin-graph").Relation;
32
- type?: string;
33
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
34
- }>[] | (Readonly<{
35
- id: string;
36
- disposition: import("packages/common/util/dist/types/src").Disposition;
37
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
38
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
39
- relation?: import("@dxos/plugin-graph").Relation;
40
- type?: string;
41
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
42
- }> | Readonly<{
43
- id: string;
44
- disposition: import("packages/common/util/dist/types/src").Disposition;
45
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
46
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
47
- relation?: import("@dxos/plugin-graph").Relation;
48
- type?: string;
49
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
50
- }>[] | (Readonly<{
51
- id: string;
52
- disposition: import("packages/common/util/dist/types/src").Disposition;
53
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
54
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
55
- relation?: import("@dxos/plugin-graph").Relation;
56
- type?: string;
57
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
58
- }> | Readonly<{
59
- id: string;
60
- disposition: import("packages/common/util/dist/types/src").Disposition;
61
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
62
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
63
- relation?: import("@dxos/plugin-graph").Relation;
64
- type?: string;
65
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
66
- }>[] | (Readonly<{
67
- id: string;
68
- disposition: import("packages/common/util/dist/types/src").Disposition;
69
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
70
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
71
- relation?: import("@dxos/plugin-graph").Relation;
72
- type?: string;
73
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
74
- }> | Readonly<{
75
- id: string;
76
- disposition: import("packages/common/util/dist/types/src").Disposition;
77
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
78
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
79
- relation?: import("@dxos/plugin-graph").Relation;
80
- type?: string;
81
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
82
- }>[] | (Readonly<{
83
- id: string;
84
- disposition: import("packages/common/util/dist/types/src").Disposition;
85
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
86
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
87
- relation?: import("@dxos/plugin-graph").Relation;
88
- type?: string;
89
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
90
- }> | Readonly<{
91
- id: string;
92
- disposition: import("packages/common/util/dist/types/src").Disposition;
93
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
94
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
95
- relation?: import("@dxos/plugin-graph").Relation;
96
- type?: string;
97
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
98
- }>[] | (Readonly<{
99
- id: string;
100
- disposition: import("packages/common/util/dist/types/src").Disposition;
101
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
102
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
103
- relation?: import("@dxos/plugin-graph").Relation;
104
- type?: string;
105
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
106
- }> | Readonly<{
107
- id: string;
108
- disposition: import("packages/common/util/dist/types/src").Disposition;
109
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
110
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
111
- relation?: import("@dxos/plugin-graph").Relation;
112
- type?: string;
113
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
114
- }>[] | (Readonly<{
115
- id: string;
116
- disposition: import("packages/common/util/dist/types/src").Disposition;
117
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
118
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
119
- relation?: import("@dxos/plugin-graph").Relation;
120
- type?: string;
121
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
122
- }> | Readonly<{
123
- id: string;
124
- disposition: import("packages/common/util/dist/types/src").Disposition;
125
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
126
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
127
- relation?: import("@dxos/plugin-graph").Relation;
128
- type?: string;
129
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
130
- }>[] | (Readonly<{
131
- id: string;
132
- disposition: import("packages/common/util/dist/types/src").Disposition;
133
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
134
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
135
- relation?: import("@dxos/plugin-graph").Relation;
136
- type?: string;
137
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
138
- }> | Readonly<{
139
- id: string;
140
- disposition: import("packages/common/util/dist/types/src").Disposition;
141
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
142
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
143
- relation?: import("@dxos/plugin-graph").Relation;
144
- type?: string;
145
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
146
- }>[] | (Readonly<{
147
- id: string;
148
- disposition: import("packages/common/util/dist/types/src").Disposition;
149
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
150
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
151
- relation?: import("@dxos/plugin-graph").Relation;
152
- type?: string;
153
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
154
- }> | Readonly<{
155
- id: string;
156
- disposition: import("packages/common/util/dist/types/src").Disposition;
157
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
158
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
159
- relation?: import("@dxos/plugin-graph").Relation;
160
- type?: string;
161
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
162
- }>[] | (any[] | Readonly<{
163
- id: string;
164
- disposition: import("packages/common/util/dist/types/src").Disposition;
165
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
166
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
167
- relation?: import("@dxos/plugin-graph").Relation;
168
- type?: string;
169
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
170
- }> | Readonly<{
171
- id: string;
172
- disposition: import("packages/common/util/dist/types/src").Disposition;
173
- resolver?: import("@dxos/plugin-graph").ResolverExtension;
174
- connector?: import("@dxos/plugin-graph").ConnectorExtension;
175
- relation?: import("@dxos/plugin-graph").Relation;
176
- type?: string;
177
- filter?: (node: import("@dxos/plugin-graph").Node) => boolean;
178
- }>[])[])[])[])[])[])[])[])[])[])[]>;
179
- export default _default;
180
- //# sourceMappingURL=app-graph-builder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/app-graph-builder.ts"],"names":[],"mappings":"AAIA,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;kCAQ5D,cAAc;;wBAmHklC,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAA2F,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAA2F,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAA2F,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAA2F,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAA2F,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAA2F,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAA2F,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAA2F,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAA2F,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAA2F,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;;wBAAwF,qCAAY;sBAAyC,oBAAiB;uBAAgD,oBAAiB;sBAAgD,oBAAiB;;2BAAkE,oBAAiB;;AAnHjiS,wBAkHE"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ReactiveEchoObject } from '@dxos/echo-db';
3
- import { type ThemedClassName } from '@dxos/react-ui';
4
- export type AssistantPanelProps = ThemedClassName<{
5
- subject?: ReactiveEchoObject<any>;
6
- }>;
7
- export declare const AssistantPanel: ({ subject, classNames }: AssistantPanelProps) => React.JSX.Element;
8
- //# sourceMappingURL=AssistantPanel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AssistantPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssistantPanel/AssistantPanel.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGxD,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAUnE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;IAChD,OAAO,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;CACnC,CAAC,CAAC;AAEH,eAAO,MAAM,cAAc,4BAA6B,mBAAmB,sBA2I1E,CAAC"}
@@ -1,3 +0,0 @@
1
- import { AssistantPanel } from './AssistantPanel';
2
- export default AssistantPanel;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssistantPanel/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAe,cAAc,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { ReactiveEchoObject } from '@dxos/echo-db';
2
- export type ThreadContext = {
3
- subject?: ReactiveEchoObject<any>;
4
- };
5
- export declare const createSystemInstructions: (context: ThreadContext) => Promise<string>;
6
- //# sourceMappingURL=system-instructions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"system-instructions.d.ts","sourceRoot":"","sources":["../../../../../src/components/AssistantPanel/system-instructions.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAMxD,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,wBAAwB,YAAmB,aAAa,KAAG,OAAO,CAAC,MAAM,CAyBrF,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type Schema as S } from '@effect/schema';
2
- import React from 'react';
3
- import { type ChainPromptType } from '../../types';
4
- export type PromptEditorProps = {
5
- prompt: ChainPromptType;
6
- commandEditable?: boolean;
7
- schema?: S.Schema<any, any, any>;
8
- };
9
- export declare const PromptEditor: ({ prompt, commandEditable }: PromptEditorProps) => React.JSX.Element;
10
- //# sourceMappingURL=PromptEditor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PromptEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/PromptEditor/PromptEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,IAAI,CAAC,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAoB,MAAM,OAAO,CAAC;AAezC,OAAO,EAAmC,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAiFpF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,eAAe,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,YAAY,gCAAwC,iBAAiB,sBAkHjF,CAAC"}
@@ -1,6 +0,0 @@
1
- import '@dxos-theme';
2
- import { type Meta } from '@storybook/react';
3
- export declare const Default: {};
4
- declare const meta: Meta;
5
- export default meta;
6
- //# sourceMappingURL=PromptEditor.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PromptEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/PromptEditor/PromptEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AA0C7C,eAAO,MAAM,OAAO,IAAK,CAAC;AAE1B,QAAA,MAAM,IAAI,EAAE,IAWX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './PromptEditor';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/PromptEditor/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { type Extension } from '@codemirror/state';
2
- export declare const nameRegex: RegExp;
3
- export declare const promptExtension: Extension;
4
- //# sourceMappingURL=prompt-extension.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompt-extension.d.ts","sourceRoot":"","sources":["../../../../../src/components/PromptEditor/prompt-extension.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,eAAO,MAAM,SAAS,QAAgB,CAAC;AAgCvC,eAAO,MAAM,eAAe,EAAE,SAAyD,CAAC"}
@@ -1,18 +0,0 @@
1
- export type Step = {
2
- id: string;
3
- };
4
- export type Variable = {
5
- name: string;
6
- type: 'value' | 'function' | 'query' | 'retriever' | 'pass-through';
7
- };
8
- export type Prompt = Step & {
9
- title?: string;
10
- description?: string;
11
- template: string;
12
- variables: Variable[];
13
- };
14
- export type Sequence = Step & {
15
- runnable: Step[];
16
- };
17
- export type Chain = {};
18
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/PromptEditor/types.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,GAAG,cAAc,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG;IAC5B,QAAQ,EAAE,IAAI,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,EAAE,CAAC"}
@@ -1,4 +0,0 @@
1
- import { type Space } from '@dxos/react-client/echo';
2
- export declare const SOURCE_ID = "hub.dxos.network/api/mailbox";
3
- export declare const handleEmail: (space: Space, data: any) => Promise<number>;
4
- //# sourceMappingURL=email.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../src/hooks/email.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,KAAK,EAA2B,MAAM,yBAAyB,CAAC;AAE9E,eAAO,MAAM,SAAS,iCAAiC,CAAC;AAExD,eAAO,MAAM,WAAW,UAAiB,KAAK,QAAQ,GAAG,oBAmCxD,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './useLocalTriggerManager';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,0BAA0B,CAAC"}
@@ -1,5 +0,0 @@
1
- import { type FunctionTrigger } from '@dxos/functions';
2
- import { type Client } from '@dxos/react-client';
3
- import { type Space } from '@dxos/react-client/echo';
4
- export declare const invokeFunction: (client: Client, space: Space, trigger: FunctionTrigger, data: any) => Promise<number>;
5
- //# sourceMappingURL=invocation-handler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"invocation-handler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/invocation-handler.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIvD,OAAO,EAAE,KAAK,MAAM,EAAe,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAgCrD,eAAO,MAAM,cAAc,WAAkB,MAAM,SAAS,KAAK,WAAW,eAAe,QAAQ,GAAG,oBA2BrG,CAAC"}
@@ -1,3 +0,0 @@
1
- import { type Space } from '@dxos/react-client/echo';
2
- export declare const useLocalTriggerManager: (space: Space) => void;
3
- //# sourceMappingURL=useLocalTriggerManager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLocalTriggerManager.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useLocalTriggerManager.ts"],"names":[],"mappings":"AAaA,OAAO,EAAU,KAAK,KAAK,EAAY,MAAM,yBAAyB,CAAC;AAMvE,eAAO,MAAM,sBAAsB,UAAW,KAAK,SA8DlD,CAAC"}
@@ -1,9 +0,0 @@
1
- import { ChainPromptType } from './types';
2
- export declare const str: (...text: (string | undefined | boolean)[]) => string;
3
- export type Preset = {
4
- id: string;
5
- title: string;
6
- createPrompt: () => ChainPromptType;
7
- };
8
- export declare const chainPresets: Preset[];
9
- //# sourceMappingURL=presets.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../src/presets.ts"],"names":[],"mappings":"AAMA,OAAO,EAAkB,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1D,eAAO,MAAM,GAAG,YAAa,CAAC,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,EAAE,KAAG,MAIjD,CAAC;AAEhB,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,eAAe,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,MAAM,EAmOhC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/testing/testing.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;;;;;;;;IA2BrB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './schema';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC"}
@@ -1,63 +0,0 @@
1
- import { S } from '@dxos/echo-schema';
2
- export declare enum ChainInputType {
3
- VALUE = 0,
4
- PASS_THROUGH = 1,
5
- RETRIEVER = 2,
6
- FUNCTION = 3,
7
- QUERY = 4,
8
- RESOLVER = 5,
9
- CONTEXT = 6,
10
- SCHEMA = 7
11
- }
12
- export declare const ChainInputSchema: S.mutable<S.Struct<{
13
- name: typeof S.String;
14
- type: S.optional<S.Enums<typeof ChainInputType>>;
15
- value: S.optional<typeof S.String>;
16
- }>>;
17
- export type ChainInput = S.Schema.Type<typeof ChainInputSchema>;
18
- declare const ChainPromptType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
19
- command: S.optional<typeof S.String>;
20
- template: typeof S.String;
21
- inputs: S.optional<S.mutable<S.Array$<S.mutable<S.Struct<{
22
- name: typeof S.String;
23
- type: S.optional<S.Enums<typeof ChainInputType>>;
24
- value: S.optional<typeof S.String>;
25
- }>>>>>;
26
- }, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>, S.Struct.Encoded<{
27
- command: S.optional<typeof S.String>;
28
- template: typeof S.String;
29
- inputs: S.optional<S.mutable<S.Array$<S.mutable<S.Struct<{
30
- name: typeof S.String;
31
- type: S.optional<S.Enums<typeof ChainInputType>>;
32
- value: S.optional<typeof S.String>;
33
- }>>>>>;
34
- }>>;
35
- export declare class ChainPromptType extends ChainPromptType_base {
36
- }
37
- declare const ChainType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
38
- name: S.optional<typeof S.String>;
39
- prompts: S.optional<S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
40
- command: S.optional<typeof S.String>;
41
- template: typeof S.String;
42
- inputs: S.optional<S.mutable<S.Array$<S.mutable<S.Struct<{
43
- name: typeof S.String;
44
- type: S.optional<S.Enums<typeof ChainInputType>>;
45
- value: S.optional<typeof S.String>;
46
- }>>>>>;
47
- }, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>>>;
48
- }, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>, S.Struct.Encoded<{
49
- name: S.optional<typeof S.String>;
50
- prompts: S.optional<S.mutable<S.Array$<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
51
- command: S.optional<typeof S.String>;
52
- template: typeof S.String;
53
- inputs: S.optional<S.mutable<S.Array$<S.mutable<S.Struct<{
54
- name: typeof S.String;
55
- type: S.optional<S.Enums<typeof ChainInputType>>;
56
- value: S.optional<typeof S.String>;
57
- }>>>>>;
58
- }, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>>>;
59
- }>>;
60
- export declare class ChainType extends ChainType_base {
61
- }
62
- export {};
63
- //# sourceMappingURL=schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAO,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAGxD,oBAAY,cAAc;IACxB,KAAK,IAAI;IACT,YAAY,IAAI;IAChB,SAAS,IAAI;IACb,QAAQ,IAAI;IACZ,KAAK,IAAI;IACT,QAAQ,IAAI;IACZ,OAAO,IAAI;IACX,MAAM,IAAI;CACX;AAED,eAAO,MAAM,gBAAgB;;;;GAM5B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;;;;;;;;;;;;;;;;;;AAEhE,qBAAa,eAAgB,SAAQ,oBAInC;CAAG;;;;;;;;;;;;;;;;;;;;;;;;AAEL,qBAAa,SAAU,SAAQ,cAG7B;CAAG"}
@@ -1,127 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';
6
- import { ClientCapabilities } from '@dxos/plugin-client';
7
- import { createExtension, toSignal } from '@dxos/plugin-graph';
8
- import { memoizeQuery } from '@dxos/plugin-space';
9
- import { getTypename, parseId, SpaceState } from '@dxos/react-client/echo';
10
-
11
- import { AUTOMATION_PLUGIN } from '../meta';
12
-
13
- export default (context: PluginsContext) => {
14
- const resolve = (typename: string) =>
15
- context.requestCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};
16
-
17
- return contributes(Capabilities.AppGraphBuilder, [
18
- createExtension({
19
- id: `${AUTOMATION_PLUGIN}/automation-for-subject`,
20
- resolver: ({ id }) => {
21
- if (!id.endsWith('~automation')) {
22
- return;
23
- }
24
-
25
- const type = 'orphan-settings-for-subject';
26
- const icon = 'ph--magic-wand--regular';
27
-
28
- const client = context.requestCapability(ClientCapabilities.Client);
29
- const [subjectId] = id.split('~');
30
- const { spaceId, objectId } = parseId(subjectId);
31
- const spaces = toSignal(
32
- (onChange) => client.spaces.subscribe(() => onChange()).unsubscribe,
33
- () => client.spaces.get(),
34
- );
35
- const space = spaces?.find((space) => space.id === spaceId && space.state.get() === SpaceState.SPACE_READY);
36
- if (!objectId) {
37
- // TODO(burdon): Ref SPACE_PLUGIN ns.
38
- const label = space
39
- ? space.properties.name || ['unnamed space label', { ns: AUTOMATION_PLUGIN }]
40
- : ['unnamed object settings label', { ns: AUTOMATION_PLUGIN }];
41
-
42
- // TODO(wittjosiah): Support comments for arbitrary subjects.
43
- // This is to ensure that the comments panel is not stuck on an old object.
44
- return {
45
- id,
46
- type,
47
- data: null,
48
- properties: {
49
- icon,
50
- label,
51
- showResolvedThreads: false,
52
- object: null,
53
- space,
54
- },
55
- };
56
- }
57
-
58
- const [object] = memoizeQuery(space, { id: objectId });
59
- if (!object || !subjectId) {
60
- return;
61
- }
62
-
63
- const meta = resolve(getTypename(object) ?? '');
64
- const label = meta.label?.(object) ||
65
- object.name ||
66
- meta.placeholder || ['unnamed object settings label', { ns: AUTOMATION_PLUGIN }];
67
-
68
- return {
69
- id,
70
- type,
71
- data: null,
72
- properties: {
73
- icon,
74
- label,
75
- object,
76
- },
77
- };
78
- },
79
- }),
80
- createExtension({
81
- id: `${AUTOMATION_PLUGIN}/assistant-for-subject`,
82
- resolver: ({ id }) => {
83
- // TODO(Zan): Find util (or make one). Effect schema!!
84
- if (!id.endsWith('~assistant')) {
85
- return;
86
- }
87
-
88
- const client = context.requestCapability(ClientCapabilities.Client);
89
- const [subjectId] = id.split('~');
90
- const { spaceId, objectId } = parseId(subjectId);
91
- const spaces = toSignal(
92
- (onChange) => client.spaces.subscribe(() => onChange()).unsubscribe,
93
- () => client.spaces.get(),
94
- );
95
- const space = spaces?.find((space) => space.id === spaceId && space.state.get() === SpaceState.SPACE_READY);
96
- if (!objectId) {
97
- // TODO(wittjosiah): Support assistant for arbitrary subjects.
98
- // This is to ensure that the assistant panel is not stuck on an old object.
99
- return {
100
- id,
101
- type: 'orphan-automation-for-subject',
102
- data: null,
103
- properties: {
104
- icon: 'ph--atom--regular',
105
- label: ['assistant panel label', { ns: AUTOMATION_PLUGIN }],
106
- object: null,
107
- space,
108
- },
109
- };
110
- }
111
-
112
- const [object] = memoizeQuery(space, { id: objectId });
113
-
114
- return {
115
- id,
116
- type: 'orphan-automation-for-subject',
117
- data: null,
118
- properties: {
119
- icon: 'ph--atom--regular',
120
- label: ['assistant panel label', { ns: AUTOMATION_PLUGIN }],
121
- object,
122
- },
123
- };
124
- },
125
- }),
126
- ]);
127
- };