@lobu/runtime-device 21.2.1 → 22.0.0

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 (196) hide show
  1. package/dist/component.json +1 -1
  2. package/dist/dependencies.bun.lock +91 -83
  3. package/npm-shrinkwrap.json +492 -438
  4. package/package.json +12 -2
  5. package/vendor/cli/dist/commands/_lib/apply/apply-cmd.js +5 -6
  6. package/vendor/cli/dist/commands/_lib/apply/client.d.ts +1 -0
  7. package/vendor/cli/dist/commands/_lib/apply/client.js +26 -7
  8. package/vendor/cli/dist/commands/_lib/apply/desired-state.d.ts +9 -1
  9. package/vendor/cli/dist/commands/_lib/apply/diff.d.ts +1 -0
  10. package/vendor/cli/dist/commands/_lib/apply/diff.js +46 -4
  11. package/vendor/cli/dist/commands/_lib/apply/map-config.js +18 -38
  12. package/vendor/cli/dist/commands/_lib/init-from-org/bootstrap.js +5 -17
  13. package/vendor/cli/dist/commands/init.d.ts +0 -2
  14. package/vendor/cli/dist/commands/init.js +0 -27
  15. package/vendor/cli/dist/commands/login.d.ts +17 -0
  16. package/vendor/cli/dist/commands/login.js +43 -17
  17. package/vendor/cli/dist/commands/memory/_lib/errors.d.ts +0 -8
  18. package/vendor/cli/dist/commands/memory/_lib/errors.js +0 -12
  19. package/vendor/cli/dist/commands/memory/_lib/mcp.js +6 -6
  20. package/vendor/cli/dist/commands/memory/_lib/seed-cmd.js +4 -10
  21. package/vendor/cli/dist/config/define.d.ts +21 -15
  22. package/vendor/cli/dist/config/define.js +2 -2
  23. package/vendor/cli/dist/connectors/README.md +7 -5
  24. package/vendor/cli/dist/connectors/_google/actions.ts +270 -0
  25. package/vendor/cli/dist/connectors/_google/discovery/calendar_v3.json +1 -0
  26. package/vendor/cli/dist/connectors/_google/discovery/chat_v1.json +1 -0
  27. package/vendor/cli/dist/connectors/_google/discovery/docs_v1.json +1 -0
  28. package/vendor/cli/dist/connectors/_google/discovery/drive_v3.json +1 -0
  29. package/vendor/cli/dist/connectors/_google/discovery/gmail_v1.json +1 -0
  30. package/vendor/cli/dist/connectors/_google/discovery/people_v1.json +1 -0
  31. package/vendor/cli/dist/connectors/_google/discovery/sheets_v4.json +1 -0
  32. package/vendor/cli/dist/connectors/_google/discovery/tasks_v1.json +1 -0
  33. package/vendor/cli/dist/connectors/_google/discovery/youtube_v3.json +1 -0
  34. package/vendor/cli/dist/connectors/_google/discovery.ts +442 -0
  35. package/vendor/cli/dist/connectors/_google/errors.ts +91 -0
  36. package/vendor/cli/dist/connectors/_google/list-feed.ts +223 -0
  37. package/vendor/cli/dist/connectors/_google/policies.ts +127 -0
  38. package/vendor/cli/dist/connectors/agentid.ts +43 -0
  39. package/vendor/cli/dist/connectors/chat-user-identity.ts +2 -1
  40. package/vendor/cli/dist/connectors/github-automation-events.ts +9 -0
  41. package/vendor/cli/dist/connectors/github-identity.ts +28 -3
  42. package/vendor/cli/dist/connectors/github.ts +101 -59
  43. package/vendor/cli/dist/connectors/google_calendar.ts +207 -719
  44. package/vendor/cli/dist/connectors/google_drive.ts +16 -2
  45. package/vendor/cli/dist/connectors/google_gmail.ts +51 -33
  46. package/vendor/cli/dist/connectors/herdr.ts +406 -0
  47. package/vendor/cli/dist/connectors/jira.ts +6 -6
  48. package/vendor/cli/dist/connectors/linear.ts +7 -4
  49. package/vendor/cli/dist/connectors/postgres.ts +27 -2
  50. package/vendor/cli/dist/connectors/tiktok-inbox-page.js +230 -0
  51. package/vendor/cli/dist/connectors/tiktok-web-page.js +211 -0
  52. package/vendor/cli/dist/connectors/tiktok_web.ts +286 -0
  53. package/vendor/cli/dist/connectors/whatsapp-web-adapter.js +228 -10
  54. package/vendor/cli/dist/connectors/whatsapp-web-helpers.ts +47 -14
  55. package/vendor/cli/dist/connectors/whatsapp-web-identity.ts +121 -0
  56. package/vendor/cli/dist/connectors/whatsapp_web.ts +170 -29
  57. package/vendor/cli/dist/connectors/x.ts +276 -136
  58. package/vendor/cli/dist/index.js +1 -37
  59. package/vendor/cli/dist/internal/context.d.ts +10 -0
  60. package/vendor/cli/dist/internal/context.js +26 -16
  61. package/vendor/cli/dist/internal/node-version.d.ts +1 -1
  62. package/vendor/cli/dist/internal/node-version.js +1 -1
  63. package/vendor/cli/dist/internal/oauth.d.ts +3 -1
  64. package/vendor/cli/dist/internal/oauth.js +4 -3
  65. package/vendor/cli/dist/internal/runtime-components.d.ts +9 -0
  66. package/vendor/cli/dist/internal/runtime-components.js +67 -2
  67. package/vendor/cli/dist/mac-auth.js +17 -1
  68. package/vendor/cli/dist/providers.json +1 -1
  69. package/vendor/cli/dist/runtime-components.json +4 -4
  70. package/vendor/cli/dist/templates/AGENTS.md.tmpl +11 -4
  71. package/vendor/cli/dist/templates/README.md.tmpl +1 -1
  72. package/vendor/cli/dist/vendor/ora/.bun-tag-fde20e9a6df212fa +0 -0
  73. package/vendor/cli/dist/vendor/ora/index.d.ts +332 -0
  74. package/vendor/cli/dist/vendor/ora/index.js +424 -0
  75. package/vendor/cli/dist/vendor/ora/license +9 -0
  76. package/vendor/cli/dist/vendor/ora/package.json +64 -0
  77. package/vendor/cli/dist/vendor/ora/readme.md +329 -0
  78. package/vendor/cli/package.json +2 -2
  79. package/vendor/connector-sdk/dist/browser-requirement.d.ts +36 -0
  80. package/vendor/connector-sdk/dist/browser-requirement.js +60 -0
  81. package/vendor/connector-sdk/dist/connector-runtime.d.ts +3 -1
  82. package/vendor/connector-sdk/dist/connector-runtime.js +10 -0
  83. package/vendor/connector-sdk/dist/connector-types.d.ts +159 -45
  84. package/vendor/connector-sdk/dist/define-connector.d.ts +4 -2
  85. package/vendor/connector-sdk/dist/define-connector.js +3 -0
  86. package/vendor/connector-sdk/dist/index.d.ts +5 -2
  87. package/vendor/connector-sdk/dist/index.js +1 -0
  88. package/vendor/connector-sdk/dist/reaction-client-types.d.ts +16 -21
  89. package/vendor/connector-sdk/dist/reaction-client-types.typecheck.d.ts +5 -0
  90. package/vendor/connector-sdk/package.json +5 -1
  91. package/vendor/connector-worker/dist/agent-turn/guest-entry.js +31 -27
  92. package/vendor/connector-worker/dist/agent-turn/guest.bundle.js +131 -185
  93. package/vendor/connector-worker/dist/agent-turn/memory.d.ts +3 -2
  94. package/vendor/connector-worker/dist/agent-turn/memory.js +3 -20
  95. package/vendor/connector-worker/dist/agent-turn/types.d.ts +3 -15
  96. package/vendor/connector-worker/dist/agent-turn/workspace.d.ts +2 -2
  97. package/vendor/connector-worker/dist/agent-turn/workspace.js +2 -4
  98. package/vendor/connector-worker/dist/daemon/action-monitor.d.ts +12 -0
  99. package/vendor/connector-worker/dist/daemon/action-monitor.js +25 -0
  100. package/vendor/connector-worker/dist/daemon/agent-turn.js +0 -9
  101. package/vendor/connector-worker/dist/daemon/builtins/index.d.ts +12 -0
  102. package/vendor/connector-worker/dist/daemon/builtins/index.js +61 -1
  103. package/vendor/connector-worker/dist/daemon/builtins/os-shell.d.ts +2 -1
  104. package/vendor/connector-worker/dist/daemon/builtins/os-shell.js +40 -27
  105. package/vendor/connector-worker/dist/daemon/client.d.ts +5 -1
  106. package/vendor/connector-worker/dist/daemon/client.js +3 -0
  107. package/vendor/connector-worker/dist/daemon/device-concurrency.d.ts +8 -0
  108. package/vendor/connector-worker/dist/daemon/device-concurrency.js +13 -0
  109. package/vendor/connector-worker/dist/daemon/executor.d.ts +1 -1
  110. package/vendor/connector-worker/dist/daemon/executor.js +48 -117
  111. package/vendor/connector-worker/dist/daemon/log.d.ts +2 -0
  112. package/vendor/connector-worker/dist/daemon/log.js +23 -2
  113. package/vendor/connector-worker/dist/daemon/mac-device-daemon.d.ts +20 -4
  114. package/vendor/connector-worker/dist/daemon/mac-device-daemon.js +53 -13
  115. package/vendor/connector-worker/dist/daemon/native-bridge/client.d.ts +6 -0
  116. package/vendor/connector-worker/dist/daemon/native-bridge/client.js +15 -0
  117. package/vendor/connector-worker/dist/daemon/native-bridge/executor.js +2 -0
  118. package/vendor/connector-worker/dist/daemon/native-bridge/protocol.d.ts +1 -1
  119. package/vendor/connector-worker/dist/daemon/native-bridge/protocol.js +1 -0
  120. package/vendor/connector-worker/dist/daemon/poll-loop.d.ts +3 -0
  121. package/vendor/connector-worker/dist/daemon/poll-loop.js +5 -1
  122. package/vendor/connector-worker/dist/daemon/start.d.ts +1 -0
  123. package/vendor/connector-worker/dist/daemon/start.js +12 -5
  124. package/vendor/connector-worker/dist/executor/interface.d.ts +34 -2
  125. package/vendor/connector-worker/dist/executor/isolate.js +66 -15
  126. package/vendor/connector-worker/dist/executor/redact.d.ts +1 -0
  127. package/vendor/connector-worker/dist/executor/redact.js +97 -26
  128. package/vendor/connector-worker/dist/executor/runtime.d.ts +7 -0
  129. package/vendor/connector-worker/dist/executor/runtime.js +26 -0
  130. package/vendor/connector-worker/dist/isolate/bridge.js +3 -1
  131. package/vendor/connector-worker/dist/mac-device-daemon.js +10 -3
  132. package/vendor/connector-worker/package.json +2 -2
  133. package/vendor/core/dist/agent-policy.js +1 -1
  134. package/vendor/core/dist/agent-store.d.ts +2 -0
  135. package/vendor/core/dist/agent-tooling.d.ts +1 -1
  136. package/vendor/core/dist/agent-tooling.js +1 -1
  137. package/vendor/core/dist/capabilities.js +2 -0
  138. package/vendor/core/dist/contracts/agent-settings.d.ts +0 -11
  139. package/vendor/core/dist/contracts/agent-settings.js +1 -7
  140. package/vendor/core/dist/contracts/tools/collection-presentation.d.ts +93 -0
  141. package/vendor/core/dist/contracts/tools/collection-presentation.js +88 -0
  142. package/vendor/core/dist/contracts/tools/collection-selection.d.ts +47 -0
  143. package/vendor/core/dist/contracts/tools/collection-selection.js +74 -0
  144. package/vendor/core/dist/contracts/tools/manage-agents.d.ts +10 -4
  145. package/vendor/core/dist/contracts/tools/manage-auth-profiles.d.ts +1 -1
  146. package/vendor/core/dist/contracts/tools/manage-auth-profiles.js +5 -1
  147. package/vendor/core/dist/contracts/tools/manage-automations.d.ts +19 -4
  148. package/vendor/core/dist/contracts/tools/manage-automations.js +25 -8
  149. package/vendor/core/dist/contracts/tools/manage-connections.d.ts +1 -0
  150. package/vendor/core/dist/contracts/tools/manage-connections.js +3 -0
  151. package/vendor/core/dist/contracts/tools/manage-entity-schema.d.ts +11 -0
  152. package/vendor/core/dist/contracts/tools/manage-entity-schema.js +42 -3
  153. package/vendor/core/dist/contracts/tools/manage-entity.d.ts +181 -152
  154. package/vendor/core/dist/contracts/tools/manage-entity.js +118 -162
  155. package/vendor/core/dist/contracts/tools/manage-operations.d.ts +41 -3
  156. package/vendor/core/dist/contracts/tools/manage-operations.js +40 -2
  157. package/vendor/core/dist/contracts/tools/manage-views.d.ts +182 -7
  158. package/vendor/core/dist/contracts/tools/manage-views.js +49 -13
  159. package/vendor/core/dist/contracts/tools/read-knowledge.d.ts +11 -2
  160. package/vendor/core/dist/contracts/tools/read-knowledge.js +23 -3
  161. package/vendor/core/dist/contracts/tools/save-memory.d.ts +3 -6
  162. package/vendor/core/dist/contracts/tools/save-memory.js +2 -6
  163. package/vendor/core/dist/contracts/tools/view-attach.d.ts +2 -1
  164. package/vendor/core/dist/contracts/tools/view-attach.js +7 -2
  165. package/vendor/core/dist/contracts/worker/protocol.d.ts +122 -28
  166. package/vendor/core/dist/contracts/worker/protocol.js +81 -17
  167. package/vendor/core/dist/index.d.ts +3 -4
  168. package/vendor/core/dist/index.js +3 -6
  169. package/vendor/core/dist/json-template.d.ts +6 -10
  170. package/vendor/core/dist/json-template.js +5 -9
  171. package/vendor/core/dist/logger.js +11 -5
  172. package/vendor/core/dist/shell-safety.d.ts +9 -0
  173. package/vendor/core/dist/shell-safety.js +154 -0
  174. package/vendor/core/dist/suggestions.d.ts +1 -1
  175. package/vendor/core/dist/suggestions.js +1 -1
  176. package/vendor/core/dist/tool-trace-summary.d.ts +1 -1
  177. package/vendor/core/dist/tool-trace-summary.js +1 -1
  178. package/vendor/core/dist/types.d.ts +1 -3
  179. package/vendor/core/dist/utils/diagnostic-scrubber.d.ts +7 -0
  180. package/vendor/core/dist/utils/{sentry-scrubber.js → diagnostic-scrubber.js} +25 -53
  181. package/vendor/core/dist/worker/auth.d.ts +44 -6
  182. package/vendor/core/dist/worker/auth.js +44 -11
  183. package/vendor/core/package.json +15 -6
  184. package/vendor/ora/.bun-tag-fde20e9a6df212fa +0 -0
  185. package/vendor/ora/index.d.ts +332 -0
  186. package/vendor/ora/index.js +424 -0
  187. package/vendor/ora/license +9 -0
  188. package/vendor/ora/package.json +53 -0
  189. package/vendor/ora/readme.md +329 -0
  190. package/vendor/cli/dist/commands/telemetry.d.ts +0 -10
  191. package/vendor/cli/dist/commands/telemetry.js +0 -66
  192. package/vendor/core/dist/sentry.d.ts +0 -26
  193. package/vendor/core/dist/sentry.js +0 -133
  194. package/vendor/core/dist/tool-policy.d.ts +0 -74
  195. package/vendor/core/dist/tool-policy.js +0 -305
  196. package/vendor/core/dist/utils/sentry-scrubber.d.ts +0 -29
@@ -0,0 +1,329 @@
1
+ # ora
2
+
3
+ > Elegant terminal spinner
4
+
5
+ <p align="center">
6
+ <br>
7
+ <img src="screenshot.svg" width="500">
8
+ <br>
9
+ </p>
10
+
11
+ ## Install
12
+
13
+ ```sh
14
+ npm install ora
15
+ ```
16
+
17
+ *Check out [`yocto-spinner`](https://github.com/sindresorhus/yocto-spinner) for a smaller alternative.*
18
+
19
+ ## Usage
20
+
21
+ ```js
22
+ import ora from 'ora';
23
+
24
+ const spinner = ora('Loading unicorns').start();
25
+
26
+ setTimeout(() => {
27
+ spinner.color = 'yellow';
28
+ spinner.text = 'Loading rainbows';
29
+ }, 1000);
30
+ ```
31
+
32
+ ## API
33
+
34
+ ### ora(text)
35
+ ### ora(options)
36
+
37
+ If a string is provided, it is treated as a shortcut for [`options.text`](#text).
38
+
39
+ #### options
40
+
41
+ Type: `object`
42
+
43
+ ##### text
44
+
45
+ Type: `string`
46
+
47
+ The text to display next to the spinner.
48
+
49
+ ##### prefixText
50
+
51
+ Type: `string | () => string`
52
+
53
+ Text or a function that returns text to display before the spinner. No prefix text will be displayed if set to an empty string.
54
+
55
+ ##### suffixText
56
+
57
+ Type: `string | () => string`
58
+
59
+ Text or a function that returns text to display after the spinner text. No suffix text will be displayed if set to an empty string.
60
+
61
+ ##### spinner
62
+
63
+ Type: `string | object`\
64
+ Default: `'dots'` <img src="screenshot-spinner.gif" width="14">
65
+
66
+ The name of one of the [provided spinners](#spinners). See `example.js` in this repo if you want to test out different spinners. On Windows (except for Windows Terminal), it will always use the `line` spinner as the Windows command-line doesn't have proper Unicode support.
67
+
68
+ Or an object like:
69
+
70
+ ```js
71
+ {
72
+ frames: ['-', '+', '-'],
73
+ interval: 80 // Optional
74
+ }
75
+ ```
76
+
77
+ ##### color
78
+
79
+ Type: `string | boolean`\
80
+ Default: `'cyan'`\
81
+ Values: `'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray' | boolean`
82
+
83
+ The color of the spinner.
84
+
85
+ ##### hideCursor
86
+
87
+ Type: `boolean`\
88
+ Default: `true`
89
+
90
+ Set to `false` to stop Ora from hiding the cursor.
91
+
92
+ ##### indent
93
+
94
+ Type: `number`\
95
+ Default: `0`
96
+
97
+ Indent the spinner with the given number of spaces.
98
+
99
+ ##### interval
100
+
101
+ Type: `number`\
102
+ Default: Provided by the spinner or `100`
103
+
104
+ Interval between each frame.
105
+
106
+ Spinners provide their own recommended interval, so you don't really need to specify this.
107
+
108
+ ##### stream
109
+
110
+ Type: `stream.Writable`\
111
+ Default: `process.stderr`
112
+
113
+ Stream to write the output.
114
+
115
+ You could for example set this to `process.stdout` instead.
116
+
117
+ ##### isEnabled
118
+
119
+ Type: `boolean`
120
+
121
+ Force enable/disable the spinner. If not specified, the spinner will be enabled if the `stream` is being run inside a TTY context (not spawned or piped) and/or not in a CI environment.
122
+
123
+ Note that `{isEnabled: false}` doesn't mean it won't output anything. It just means it won't output the spinner, colors, and other ansi escape codes. It will still log text.
124
+
125
+ ##### isSilent
126
+
127
+ Type: `boolean`\
128
+ Default: `false`
129
+
130
+ Disable the spinner and all log text. All output is suppressed and `isEnabled` will be considered `false`.
131
+
132
+ ##### discardStdin
133
+
134
+ Type: `boolean`\
135
+ Default: `true`
136
+
137
+ Discard stdin input (except Ctrl+C) while running if it's TTY. This prevents the spinner from twitching on input, outputting broken lines on <kbd>Enter</kbd> key presses, and prevents buffering of input while the spinner is running.
138
+
139
+ This has no effect on Windows as there is no good way to implement discarding stdin properly there.
140
+
141
+ ### Instance
142
+
143
+ #### .text <sup>get/set</sup>
144
+
145
+ Change the text displayed after the spinner.
146
+
147
+ #### .prefixText <sup>get/set</sup>
148
+
149
+ Change the text before the spinner.
150
+
151
+ No prefix text will be displayed if set to an empty string.
152
+
153
+ #### .suffixText <sup>get/set</sup>
154
+
155
+ Change the text after the spinner text.
156
+
157
+ No suffix text will be displayed if set to an empty string.
158
+
159
+ #### .color <sup>get/set</sup>
160
+
161
+ Change the spinner color.
162
+
163
+ #### .spinner <sup>get/set</sup>
164
+
165
+ Change the spinner.
166
+
167
+ #### .indent <sup>get/set</sup>
168
+
169
+ Change the spinner indent.
170
+
171
+ #### .isSpinning <sup>get</sup>
172
+
173
+ A boolean indicating whether the instance is currently spinning.
174
+
175
+ #### .interval <sup>get</sup>
176
+
177
+ The interval between each frame.
178
+
179
+ The interval is decided by the chosen spinner.
180
+
181
+ #### .start(text?)
182
+
183
+ Start the spinner. Returns the instance. Set the current text if `text` is provided.
184
+
185
+ #### .stop()
186
+
187
+ Stop and clear the spinner. Returns the instance.
188
+
189
+ #### .succeed(text?)
190
+
191
+ Stop the spinner, change it to a green `✔` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.
192
+
193
+ #### .fail(text?)
194
+
195
+ Stop the spinner, change it to a red `✖` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.
196
+
197
+ #### .warn(text?)
198
+
199
+ Stop the spinner, change it to a yellow `⚠` and persist the current text, or `text` if provided. Returns the instance.
200
+
201
+ #### .info(text?)
202
+
203
+ Stop the spinner, change it to a blue `ℹ` and persist the current text, or `text` if provided. Returns the instance.
204
+
205
+ #### .stopAndPersist(options?)
206
+
207
+ Stop the spinner and change the symbol or text. Returns the instance. See the GIF below.
208
+
209
+ ##### options
210
+
211
+ Type: `object`
212
+
213
+ ###### symbol
214
+
215
+ Type: `string`\
216
+ Default: `' '`
217
+
218
+ Symbol to replace the spinner with.
219
+
220
+ ###### text
221
+
222
+ Type: `string`\
223
+ Default: Current `'text'`
224
+
225
+ Text to be persisted after the symbol.
226
+
227
+ ###### prefixText
228
+
229
+ Type: `string | () => string`\
230
+ Default: Current `prefixText`
231
+
232
+ Text or a function that returns text to be persisted before the symbol. No prefix text will be displayed if set to an empty string.
233
+
234
+ ###### suffixText
235
+
236
+ Type: `string | () => string`\
237
+ Default: Current `suffixText`
238
+
239
+ Text or a function that returns text to be persisted after the text after the symbol. No suffix text will be displayed if set to an empty string.
240
+
241
+ <img src="screenshot-2.gif" width="480">
242
+
243
+ #### .clear()
244
+
245
+ Clear the spinner. Returns the instance.
246
+
247
+ #### .render()
248
+
249
+ Manually render a new frame. Returns the instance.
250
+
251
+ #### .frame()
252
+
253
+ Get a new frame.
254
+
255
+ ### oraPromise(action, text)
256
+ ### oraPromise(action, options)
257
+
258
+ Starts a spinner for a promise or promise-returning function. The spinner is stopped with `.succeed()` if the promise fulfills or with `.fail()` if it rejects. Returns the promise.
259
+
260
+ ```js
261
+ import {oraPromise} from 'ora';
262
+
263
+ await oraPromise(somePromise);
264
+ ```
265
+
266
+ #### action
267
+
268
+ Type: `Promise | ((spinner: ora.Ora) => Promise)`
269
+
270
+ #### options
271
+
272
+ Type: `object`
273
+
274
+ All of the [options](#options) plus the following:
275
+
276
+ ##### successText
277
+
278
+ Type: `string | ((result: T) => string) | undefined`
279
+
280
+ The new text of the spinner when the promise is resolved.
281
+
282
+ Keeps the existing text if `undefined`.
283
+
284
+ ##### failText
285
+
286
+ Type: `string | ((error: Error) => string) | undefined`
287
+
288
+ The new text of the spinner when the promise is rejected.
289
+
290
+ Keeps the existing text if `undefined`.
291
+
292
+ ### spinners
293
+
294
+ Type: `Record<string, Spinner>`
295
+
296
+ All [provided spinners](https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json).
297
+
298
+ ## FAQ
299
+
300
+ ### How do I change the color of the text?
301
+
302
+ Use [`chalk`](https://github.com/chalk/chalk) or [`yoctocolors`](https://github.com/sindresorhus/yoctocolors):
303
+
304
+ ```js
305
+ import ora from 'ora';
306
+ import chalk from 'chalk';
307
+
308
+ const spinner = ora(`Loading ${chalk.red('unicorns')}`).start();
309
+ ```
310
+
311
+ ### Why does the spinner freeze?
312
+
313
+ JavaScript is single-threaded, so any synchronous operations will block the spinner's animation. To avoid this, prefer using asynchronous operations.
314
+
315
+ ## Related
316
+
317
+ - [yocto-spinner](https://github.com/sindresorhus/yocto-spinner) - Tiny terminal spinner
318
+ - [cli-spinners](https://github.com/sindresorhus/cli-spinners) - Spinners for use in the terminal
319
+
320
+ **Ports**
321
+
322
+ - [CLISpinner](https://github.com/kiliankoe/CLISpinner) - Terminal spinner library for Swift
323
+ - [halo](https://github.com/ManrajGrover/halo) - Python port
324
+ - [spinners](https://github.com/FGRibreau/spinners) - Terminal spinners for Rust
325
+ - [marquee-ora](https://github.com/joeycozza/marquee-ora) - Scrolling marquee spinner for Ora
326
+ - [briandowns/spinner](https://github.com/briandowns/spinner) - Terminal spinner/progress indicator for Go
327
+ - [tj/go-spin](https://github.com/tj/go-spin) - Terminal spinner package for Go
328
+ - [observablehq.com/@victordidenko/ora](https://observablehq.com/@victordidenko/ora) - Ora port to Observable notebooks
329
+ - [kia](https://github.com/HarryPeach/kia) - Simple terminal spinners for Deno 🦕
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobu/cli",
3
- "version": "21.2.1",
3
+ "version": "22.0.0",
4
4
  "description": "CLI for deploying and managing AI agents on Lobu",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -42,7 +42,7 @@
42
42
  "marked": "^17.0.4",
43
43
  "marked-terminal": "^7.3.0",
44
44
  "open": "^10.1.0",
45
- "ora": "^8.0.1",
45
+ "ora": "file:../ora",
46
46
  "postgres": "file:../postgres",
47
47
  "tar": "^7.4.3",
48
48
  "tinyglobby": "0.2.16",
@@ -0,0 +1,36 @@
1
+ import type { ChromeActionDispatcher } from './extension-network.js';
2
+ export declare const BROWSER_VERIFY_OPERATION = "verify_browser";
3
+ export declare const BROWSER_VERIFY_ACTION: {
4
+ name: string;
5
+ kind: "read";
6
+ description: string;
7
+ inputSchema: {
8
+ type: string;
9
+ properties: {};
10
+ additionalProperties: boolean;
11
+ };
12
+ };
13
+ /** A delegated browser resource, independent of connector worker placement. */
14
+ export interface ConnectorBrowserRequirement {
15
+ /** Exact HTTPS origins the connector may drive. */
16
+ origins: string[];
17
+ /** Omit for every auth mode; use ['browser'] for an OAuth/browser alternative. */
18
+ authMethods?: string[];
19
+ /** Connector-owned, read-only self-identity probe. Never reads source content. */
20
+ accountProbe?: {
21
+ url: string;
22
+ /** Page expression returning { accountId, displayName? }, or null when signed out. */
23
+ expression: string;
24
+ };
25
+ }
26
+ export declare function validateBrowserRequirement(value: unknown): asserts value is ConnectorBrowserRequirement;
27
+ /** One auth-mode mapping for setup, discovery and every execution path. */
28
+ export declare function browserAuthMethod(profileKind: string | null | undefined): string;
29
+ export declare function resolveBrowserRequirement(value: unknown, authMethod: string): ConnectorBrowserRequirement | null;
30
+ /** Replaces caller-supplied `allowed_origins` with the catalog grant; URLs must fall inside it. */
31
+ export declare function constrainBrowserInput(browser: ConnectorBrowserRequirement, actionKey: string, input: Record<string, unknown>): Record<string, unknown>;
32
+ /** Shared accessor for built-in and external connectors. The host owns the grant. */
33
+ export declare function requireBrowser(ctx: {
34
+ browser?: ChromeActionDispatcher;
35
+ }): ChromeActionDispatcher;
36
+ //# sourceMappingURL=browser-requirement.d.ts.map
@@ -0,0 +1,60 @@
1
+ export const BROWSER_VERIFY_OPERATION = 'verify_browser';
2
+ export const BROWSER_VERIFY_ACTION = {
3
+ name: 'Verify browser connection', kind: 'read',
4
+ description: 'Check the selected browser and any declared account identity without reading source content.',
5
+ inputSchema: { type: 'object', properties: {}, additionalProperties: false },
6
+ };
7
+ export function validateBrowserRequirement(value) {
8
+ if (!value || typeof value !== 'object' || Array.isArray(value))
9
+ throw new Error('Invalid browser requirement');
10
+ const browser = value;
11
+ if (!Array.isArray(browser.origins) || browser.origins.length === 0)
12
+ throw new Error('Browser origins must not be empty');
13
+ for (const origin of browser.origins) {
14
+ const url = new URL(origin);
15
+ if (url.protocol !== 'https:' || url.origin !== origin || url.username || url.password || url.hostname.includes('*')) {
16
+ throw new Error('Browser origins must be exact HTTPS origins');
17
+ }
18
+ }
19
+ if (browser.authMethods && (!Array.isArray(browser.authMethods) || !browser.authMethods.length || browser.authMethods.some(method => !['none', 'browser', 'oauth', 'env_keys', 'app_installation', 'interactive'].includes(method)))) {
20
+ throw new Error('Invalid browser authMethods');
21
+ }
22
+ if (browser.accountProbe && (!browser.origins.includes(new URL(browser.accountProbe.url).origin) || typeof browser.accountProbe.expression !== 'string' || !browser.accountProbe.expression.trim())) {
23
+ throw new Error('Browser account probe must target a declared origin and provide an expression');
24
+ }
25
+ }
26
+ /** One auth-mode mapping for setup, discovery and every execution path. */
27
+ export function browserAuthMethod(profileKind) {
28
+ return { oauth_account: 'oauth', oauth_app: 'oauth', env: 'env_keys', browser_session: 'browser' }[profileKind ?? ''] ?? profileKind ?? 'none';
29
+ }
30
+ export function resolveBrowserRequirement(value, authMethod) {
31
+ if (value == null)
32
+ return null;
33
+ validateBrowserRequirement(value);
34
+ return !value.authMethods || value.authMethods.includes(authMethod) ? value : null;
35
+ }
36
+ /** Replaces caller-supplied `allowed_origins` with the catalog grant; URLs must fall inside it. */
37
+ export function constrainBrowserInput(browser, actionKey, input) {
38
+ validateBrowserRequirement(browser);
39
+ const allowedActions = [BROWSER_VERIFY_OPERATION, 'navigate', 'evaluate', 'get_accessibility_tree', 'wait_for_selector', 'screenshot', 'click_ref', 'type_ref', 'press_key', 'scroll', 'focus_tab', 'close_tab', 'list_tabs', 'feed_listen', 'show_notification', 'network_intercept_start', 'network_intercept_drain', 'network_intercept_stop', 'network_intercept_replay', 'console_capture_start', 'console_capture_drain', 'console_capture_stop'];
40
+ if (!allowedActions.includes(actionKey))
41
+ throw new Error('Operation is outside the declared browser resource');
42
+ if (actionKey === 'navigate' && input.url === 'about:blank')
43
+ return { ...input, allowed_origins: browser.origins };
44
+ for (const key of ['url', 'click_url', 'landed_url']) {
45
+ if (input[key] !== undefined && (typeof input[key] !== 'string' || !browser.origins.includes(new URL(input[key]).origin))) {
46
+ throw new Error('Browser URL is outside the connector declared origins');
47
+ }
48
+ }
49
+ if (actionKey === 'navigate' && typeof input.url !== 'string') {
50
+ throw new Error('Browser navigation is outside the connector declared origins');
51
+ }
52
+ return { ...input, allowed_origins: browser.origins };
53
+ }
54
+ /** Shared accessor for built-in and external connectors. The host owns the grant. */
55
+ export function requireBrowser(ctx) {
56
+ if (!ctx.browser)
57
+ throw new Error('Browser setup is required for this connection');
58
+ return ctx.browser;
59
+ }
60
+ //# sourceMappingURL=browser-requirement.js.map
@@ -4,7 +4,7 @@
4
4
  * Abstract base class that all connectors must implement.
5
5
  * Provides the contract for feed sync, source reads, and connector actions.
6
6
  */
7
- import type { ActionContext, ActionResult, AuthContext, AuthResult, FeedReadContext, FeedReadResult, QueryContext, QueryResult, ReflectContext, ReflectResult, RuntimeConnectorDefinition, SyncContext, SyncResult, WebhookRegistration, WebhookRegistrationContext } from './connector-types.js';
7
+ import type { ActionContext, ActionResult, AuthContext, AuthResult, FeedObserveContext, FeedReadContext, FeedReadResult, QueryContext, QueryResult, ReflectContext, ReflectResult, RuntimeConnectorDefinition, SyncContext, SyncResult, WebhookRegistration, WebhookRegistrationContext } from './connector-types.js';
8
8
  /**
9
9
  * ConnectorRuntime is the base class for all connectors.
10
10
  *
@@ -51,6 +51,8 @@ export declare abstract class ConnectorRuntime<C = Record<string, unknown>, F =
51
51
  * kind or persistence flag.
52
52
  */
53
53
  read(ctx: FeedReadContext<F>): Promise<FeedReadResult>;
54
+ /** Attach/reconnect the connector-owned listener; reference delivery bypasses this hook. */
55
+ observe(ctx: FeedObserveContext<C, F>): Promise<void>;
54
56
  /**
55
57
  * Execute an action on the connected service.
56
58
  *
@@ -62,10 +62,20 @@ export class ConnectorRuntime {
62
62
  if (!handler) {
63
63
  throw new Error(`${this.definition.key} feed '${ctx.feedKey}' does not support source reads`);
64
64
  }
65
+ if (ctx.match && !feed.matchPaths?.includes(ctx.match.path)) {
66
+ throw new Error(`${this.definition.key} feed '${ctx.feedKey}' cannot filter on '${ctx.match.path}'`);
67
+ }
65
68
  const result = await handler(ctx);
66
69
  assertFeedReadWindow(result, ctx.window, feed.readWindowAxis);
67
70
  return result;
68
71
  }
72
+ /** Attach/reconnect the connector-owned listener; reference delivery bypasses this hook. */
73
+ async observe(ctx) {
74
+ const handler = this.definition.feeds?.[ctx.feedKey]?.observe;
75
+ if (!handler)
76
+ throw new Error(`${this.definition.key} feed '${ctx.feedKey}' has no source listener`);
77
+ await handler(ctx);
78
+ }
69
79
  /**
70
80
  * Execute an action on the connected service.
71
81
  *