@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.
- package/dist/component.json +1 -1
- package/dist/dependencies.bun.lock +91 -83
- package/npm-shrinkwrap.json +492 -438
- package/package.json +12 -2
- package/vendor/cli/dist/commands/_lib/apply/apply-cmd.js +5 -6
- package/vendor/cli/dist/commands/_lib/apply/client.d.ts +1 -0
- package/vendor/cli/dist/commands/_lib/apply/client.js +26 -7
- package/vendor/cli/dist/commands/_lib/apply/desired-state.d.ts +9 -1
- package/vendor/cli/dist/commands/_lib/apply/diff.d.ts +1 -0
- package/vendor/cli/dist/commands/_lib/apply/diff.js +46 -4
- package/vendor/cli/dist/commands/_lib/apply/map-config.js +18 -38
- package/vendor/cli/dist/commands/_lib/init-from-org/bootstrap.js +5 -17
- package/vendor/cli/dist/commands/init.d.ts +0 -2
- package/vendor/cli/dist/commands/init.js +0 -27
- package/vendor/cli/dist/commands/login.d.ts +17 -0
- package/vendor/cli/dist/commands/login.js +43 -17
- package/vendor/cli/dist/commands/memory/_lib/errors.d.ts +0 -8
- package/vendor/cli/dist/commands/memory/_lib/errors.js +0 -12
- package/vendor/cli/dist/commands/memory/_lib/mcp.js +6 -6
- package/vendor/cli/dist/commands/memory/_lib/seed-cmd.js +4 -10
- package/vendor/cli/dist/config/define.d.ts +21 -15
- package/vendor/cli/dist/config/define.js +2 -2
- package/vendor/cli/dist/connectors/README.md +7 -5
- package/vendor/cli/dist/connectors/_google/actions.ts +270 -0
- package/vendor/cli/dist/connectors/_google/discovery/calendar_v3.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/chat_v1.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/docs_v1.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/drive_v3.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/gmail_v1.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/people_v1.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/sheets_v4.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/tasks_v1.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/youtube_v3.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery.ts +442 -0
- package/vendor/cli/dist/connectors/_google/errors.ts +91 -0
- package/vendor/cli/dist/connectors/_google/list-feed.ts +223 -0
- package/vendor/cli/dist/connectors/_google/policies.ts +127 -0
- package/vendor/cli/dist/connectors/agentid.ts +43 -0
- package/vendor/cli/dist/connectors/chat-user-identity.ts +2 -1
- package/vendor/cli/dist/connectors/github-automation-events.ts +9 -0
- package/vendor/cli/dist/connectors/github-identity.ts +28 -3
- package/vendor/cli/dist/connectors/github.ts +101 -59
- package/vendor/cli/dist/connectors/google_calendar.ts +207 -719
- package/vendor/cli/dist/connectors/google_drive.ts +16 -2
- package/vendor/cli/dist/connectors/google_gmail.ts +51 -33
- package/vendor/cli/dist/connectors/herdr.ts +406 -0
- package/vendor/cli/dist/connectors/jira.ts +6 -6
- package/vendor/cli/dist/connectors/linear.ts +7 -4
- package/vendor/cli/dist/connectors/postgres.ts +27 -2
- package/vendor/cli/dist/connectors/tiktok-inbox-page.js +230 -0
- package/vendor/cli/dist/connectors/tiktok-web-page.js +211 -0
- package/vendor/cli/dist/connectors/tiktok_web.ts +286 -0
- package/vendor/cli/dist/connectors/whatsapp-web-adapter.js +228 -10
- package/vendor/cli/dist/connectors/whatsapp-web-helpers.ts +47 -14
- package/vendor/cli/dist/connectors/whatsapp-web-identity.ts +121 -0
- package/vendor/cli/dist/connectors/whatsapp_web.ts +170 -29
- package/vendor/cli/dist/connectors/x.ts +276 -136
- package/vendor/cli/dist/index.js +1 -37
- package/vendor/cli/dist/internal/context.d.ts +10 -0
- package/vendor/cli/dist/internal/context.js +26 -16
- package/vendor/cli/dist/internal/node-version.d.ts +1 -1
- package/vendor/cli/dist/internal/node-version.js +1 -1
- package/vendor/cli/dist/internal/oauth.d.ts +3 -1
- package/vendor/cli/dist/internal/oauth.js +4 -3
- package/vendor/cli/dist/internal/runtime-components.d.ts +9 -0
- package/vendor/cli/dist/internal/runtime-components.js +67 -2
- package/vendor/cli/dist/mac-auth.js +17 -1
- package/vendor/cli/dist/providers.json +1 -1
- package/vendor/cli/dist/runtime-components.json +4 -4
- package/vendor/cli/dist/templates/AGENTS.md.tmpl +11 -4
- package/vendor/cli/dist/templates/README.md.tmpl +1 -1
- package/vendor/cli/dist/vendor/ora/.bun-tag-fde20e9a6df212fa +0 -0
- package/vendor/cli/dist/vendor/ora/index.d.ts +332 -0
- package/vendor/cli/dist/vendor/ora/index.js +424 -0
- package/vendor/cli/dist/vendor/ora/license +9 -0
- package/vendor/cli/dist/vendor/ora/package.json +64 -0
- package/vendor/cli/dist/vendor/ora/readme.md +329 -0
- package/vendor/cli/package.json +2 -2
- package/vendor/connector-sdk/dist/browser-requirement.d.ts +36 -0
- package/vendor/connector-sdk/dist/browser-requirement.js +60 -0
- package/vendor/connector-sdk/dist/connector-runtime.d.ts +3 -1
- package/vendor/connector-sdk/dist/connector-runtime.js +10 -0
- package/vendor/connector-sdk/dist/connector-types.d.ts +159 -45
- package/vendor/connector-sdk/dist/define-connector.d.ts +4 -2
- package/vendor/connector-sdk/dist/define-connector.js +3 -0
- package/vendor/connector-sdk/dist/index.d.ts +5 -2
- package/vendor/connector-sdk/dist/index.js +1 -0
- package/vendor/connector-sdk/dist/reaction-client-types.d.ts +16 -21
- package/vendor/connector-sdk/dist/reaction-client-types.typecheck.d.ts +5 -0
- package/vendor/connector-sdk/package.json +5 -1
- package/vendor/connector-worker/dist/agent-turn/guest-entry.js +31 -27
- package/vendor/connector-worker/dist/agent-turn/guest.bundle.js +131 -185
- package/vendor/connector-worker/dist/agent-turn/memory.d.ts +3 -2
- package/vendor/connector-worker/dist/agent-turn/memory.js +3 -20
- package/vendor/connector-worker/dist/agent-turn/types.d.ts +3 -15
- package/vendor/connector-worker/dist/agent-turn/workspace.d.ts +2 -2
- package/vendor/connector-worker/dist/agent-turn/workspace.js +2 -4
- package/vendor/connector-worker/dist/daemon/action-monitor.d.ts +12 -0
- package/vendor/connector-worker/dist/daemon/action-monitor.js +25 -0
- package/vendor/connector-worker/dist/daemon/agent-turn.js +0 -9
- package/vendor/connector-worker/dist/daemon/builtins/index.d.ts +12 -0
- package/vendor/connector-worker/dist/daemon/builtins/index.js +61 -1
- package/vendor/connector-worker/dist/daemon/builtins/os-shell.d.ts +2 -1
- package/vendor/connector-worker/dist/daemon/builtins/os-shell.js +40 -27
- package/vendor/connector-worker/dist/daemon/client.d.ts +5 -1
- package/vendor/connector-worker/dist/daemon/client.js +3 -0
- package/vendor/connector-worker/dist/daemon/device-concurrency.d.ts +8 -0
- package/vendor/connector-worker/dist/daemon/device-concurrency.js +13 -0
- package/vendor/connector-worker/dist/daemon/executor.d.ts +1 -1
- package/vendor/connector-worker/dist/daemon/executor.js +48 -117
- package/vendor/connector-worker/dist/daemon/log.d.ts +2 -0
- package/vendor/connector-worker/dist/daemon/log.js +23 -2
- package/vendor/connector-worker/dist/daemon/mac-device-daemon.d.ts +20 -4
- package/vendor/connector-worker/dist/daemon/mac-device-daemon.js +53 -13
- package/vendor/connector-worker/dist/daemon/native-bridge/client.d.ts +6 -0
- package/vendor/connector-worker/dist/daemon/native-bridge/client.js +15 -0
- package/vendor/connector-worker/dist/daemon/native-bridge/executor.js +2 -0
- package/vendor/connector-worker/dist/daemon/native-bridge/protocol.d.ts +1 -1
- package/vendor/connector-worker/dist/daemon/native-bridge/protocol.js +1 -0
- package/vendor/connector-worker/dist/daemon/poll-loop.d.ts +3 -0
- package/vendor/connector-worker/dist/daemon/poll-loop.js +5 -1
- package/vendor/connector-worker/dist/daemon/start.d.ts +1 -0
- package/vendor/connector-worker/dist/daemon/start.js +12 -5
- package/vendor/connector-worker/dist/executor/interface.d.ts +34 -2
- package/vendor/connector-worker/dist/executor/isolate.js +66 -15
- package/vendor/connector-worker/dist/executor/redact.d.ts +1 -0
- package/vendor/connector-worker/dist/executor/redact.js +97 -26
- package/vendor/connector-worker/dist/executor/runtime.d.ts +7 -0
- package/vendor/connector-worker/dist/executor/runtime.js +26 -0
- package/vendor/connector-worker/dist/isolate/bridge.js +3 -1
- package/vendor/connector-worker/dist/mac-device-daemon.js +10 -3
- package/vendor/connector-worker/package.json +2 -2
- package/vendor/core/dist/agent-policy.js +1 -1
- package/vendor/core/dist/agent-store.d.ts +2 -0
- package/vendor/core/dist/agent-tooling.d.ts +1 -1
- package/vendor/core/dist/agent-tooling.js +1 -1
- package/vendor/core/dist/capabilities.js +2 -0
- package/vendor/core/dist/contracts/agent-settings.d.ts +0 -11
- package/vendor/core/dist/contracts/agent-settings.js +1 -7
- package/vendor/core/dist/contracts/tools/collection-presentation.d.ts +93 -0
- package/vendor/core/dist/contracts/tools/collection-presentation.js +88 -0
- package/vendor/core/dist/contracts/tools/collection-selection.d.ts +47 -0
- package/vendor/core/dist/contracts/tools/collection-selection.js +74 -0
- package/vendor/core/dist/contracts/tools/manage-agents.d.ts +10 -4
- package/vendor/core/dist/contracts/tools/manage-auth-profiles.d.ts +1 -1
- package/vendor/core/dist/contracts/tools/manage-auth-profiles.js +5 -1
- package/vendor/core/dist/contracts/tools/manage-automations.d.ts +19 -4
- package/vendor/core/dist/contracts/tools/manage-automations.js +25 -8
- package/vendor/core/dist/contracts/tools/manage-connections.d.ts +1 -0
- package/vendor/core/dist/contracts/tools/manage-connections.js +3 -0
- package/vendor/core/dist/contracts/tools/manage-entity-schema.d.ts +11 -0
- package/vendor/core/dist/contracts/tools/manage-entity-schema.js +42 -3
- package/vendor/core/dist/contracts/tools/manage-entity.d.ts +181 -152
- package/vendor/core/dist/contracts/tools/manage-entity.js +118 -162
- package/vendor/core/dist/contracts/tools/manage-operations.d.ts +41 -3
- package/vendor/core/dist/contracts/tools/manage-operations.js +40 -2
- package/vendor/core/dist/contracts/tools/manage-views.d.ts +182 -7
- package/vendor/core/dist/contracts/tools/manage-views.js +49 -13
- package/vendor/core/dist/contracts/tools/read-knowledge.d.ts +11 -2
- package/vendor/core/dist/contracts/tools/read-knowledge.js +23 -3
- package/vendor/core/dist/contracts/tools/save-memory.d.ts +3 -6
- package/vendor/core/dist/contracts/tools/save-memory.js +2 -6
- package/vendor/core/dist/contracts/tools/view-attach.d.ts +2 -1
- package/vendor/core/dist/contracts/tools/view-attach.js +7 -2
- package/vendor/core/dist/contracts/worker/protocol.d.ts +122 -28
- package/vendor/core/dist/contracts/worker/protocol.js +81 -17
- package/vendor/core/dist/index.d.ts +3 -4
- package/vendor/core/dist/index.js +3 -6
- package/vendor/core/dist/json-template.d.ts +6 -10
- package/vendor/core/dist/json-template.js +5 -9
- package/vendor/core/dist/logger.js +11 -5
- package/vendor/core/dist/shell-safety.d.ts +9 -0
- package/vendor/core/dist/shell-safety.js +154 -0
- package/vendor/core/dist/suggestions.d.ts +1 -1
- package/vendor/core/dist/suggestions.js +1 -1
- package/vendor/core/dist/tool-trace-summary.d.ts +1 -1
- package/vendor/core/dist/tool-trace-summary.js +1 -1
- package/vendor/core/dist/types.d.ts +1 -3
- package/vendor/core/dist/utils/diagnostic-scrubber.d.ts +7 -0
- package/vendor/core/dist/utils/{sentry-scrubber.js → diagnostic-scrubber.js} +25 -53
- package/vendor/core/dist/worker/auth.d.ts +44 -6
- package/vendor/core/dist/worker/auth.js +44 -11
- package/vendor/core/package.json +15 -6
- package/vendor/ora/.bun-tag-fde20e9a6df212fa +0 -0
- package/vendor/ora/index.d.ts +332 -0
- package/vendor/ora/index.js +424 -0
- package/vendor/ora/license +9 -0
- package/vendor/ora/package.json +53 -0
- package/vendor/ora/readme.md +329 -0
- package/vendor/cli/dist/commands/telemetry.d.ts +0 -10
- package/vendor/cli/dist/commands/telemetry.js +0 -66
- package/vendor/core/dist/sentry.d.ts +0 -26
- package/vendor/core/dist/sentry.js +0 -133
- package/vendor/core/dist/tool-policy.d.ts +0 -74
- package/vendor/core/dist/tool-policy.js +0 -305
- 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,10 +0,0 @@
|
|
|
1
|
-
interface TelemetryOptions {
|
|
2
|
-
cwd?: string;
|
|
3
|
-
}
|
|
4
|
-
export declare function telemetryStatusCommand(options?: TelemetryOptions): Promise<void>;
|
|
5
|
-
export declare function telemetryOnCommand(options?: TelemetryOptions & {
|
|
6
|
-
dsn?: string;
|
|
7
|
-
}): Promise<void>;
|
|
8
|
-
export declare function telemetryOffCommand(options?: TelemetryOptions): Promise<void>;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=telemetry.d.ts.map
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { readFile, writeFile } from "node:fs/promises";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import chalk from "chalk";
|
|
4
|
-
import { setLocalEnvValue } from "../internal/local-env.js";
|
|
5
|
-
import { readProjectEnvFile } from "../internal/env-file.js";
|
|
6
|
-
const SENTRY_DSN_DEFAULT = "https://63abd848f1338116c41d4a8a29091c7c@o4511547660042240.ingest.us.sentry.io/4511547664171008";
|
|
7
|
-
export async function telemetryStatusCommand(options = {}) {
|
|
8
|
-
const cwd = options.cwd ?? process.cwd();
|
|
9
|
-
const env = await readProjectEnvFile(cwd);
|
|
10
|
-
const dsn = env.SENTRY_DSN ?? process.env.SENTRY_DSN;
|
|
11
|
-
if (dsn) {
|
|
12
|
-
console.log(chalk.green("\n Telemetry: on"));
|
|
13
|
-
console.log(chalk.dim(` SENTRY_DSN: ${redactDsn(dsn)}\n`));
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
console.log(chalk.dim("\n Telemetry: off"));
|
|
17
|
-
console.log(chalk.dim(" No SENTRY_DSN configured.\n"));
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export async function telemetryOnCommand(options = {}) {
|
|
21
|
-
const cwd = options.cwd ?? process.cwd();
|
|
22
|
-
const dsn = options.dsn ?? SENTRY_DSN_DEFAULT;
|
|
23
|
-
await setLocalEnvValue(cwd, "SENTRY_DSN", dsn);
|
|
24
|
-
// The shared community DSN points at the same Sentry project as the hosted
|
|
25
|
-
// deployment, and instrument.ts defaults environment to "production" when
|
|
26
|
-
// ENVIRONMENT is unset — so without this tag a self-hosted install's errors
|
|
27
|
-
// are indistinguishable from real prod incidents in the feed.
|
|
28
|
-
if (!options.dsn) {
|
|
29
|
-
await setLocalEnvValue(cwd, "ENVIRONMENT", "self-host");
|
|
30
|
-
}
|
|
31
|
-
console.log(chalk.green("\n Telemetry enabled."));
|
|
32
|
-
console.log(chalk.dim(` Wrote SENTRY_DSN to ${join(cwd, ".env")}\n`));
|
|
33
|
-
}
|
|
34
|
-
export async function telemetryOffCommand(options = {}) {
|
|
35
|
-
const cwd = options.cwd ?? process.cwd();
|
|
36
|
-
const envPath = join(cwd, ".env");
|
|
37
|
-
let raw = "";
|
|
38
|
-
try {
|
|
39
|
-
raw = await readFile(envPath, "utf-8");
|
|
40
|
-
}
|
|
41
|
-
catch {
|
|
42
|
-
console.log(chalk.dim("\n No .env to update — telemetry already off.\n"));
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const filtered = raw
|
|
46
|
-
.split("\n")
|
|
47
|
-
.filter((line) => !line.trim().startsWith("SENTRY_DSN="))
|
|
48
|
-
.join("\n");
|
|
49
|
-
await writeFile(envPath, filtered.endsWith("\n") ? filtered : `${filtered}\n`);
|
|
50
|
-
console.log(chalk.green("\n Telemetry disabled."));
|
|
51
|
-
console.log(chalk.dim(` Removed SENTRY_DSN from ${envPath}\n`));
|
|
52
|
-
}
|
|
53
|
-
function redactDsn(dsn) {
|
|
54
|
-
try {
|
|
55
|
-
const url = new URL(dsn);
|
|
56
|
-
// The Sentry public key (URL username) is genuinely public. Only
|
|
57
|
-
// a deprecated DSN format includes a secret in the URL password.
|
|
58
|
-
if (url.password)
|
|
59
|
-
url.password = "***";
|
|
60
|
-
return url.toString();
|
|
61
|
-
}
|
|
62
|
-
catch {
|
|
63
|
-
return "***";
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=telemetry.js.map
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolve the egress proxy URL the Sentry transport must use.
|
|
3
|
-
*
|
|
4
|
-
* Worker subprocesses reach the network ONLY through the gateway egress proxy
|
|
5
|
-
* (HTTP_PROXY=http://localhost:8118); prod additionally pins the kernel to
|
|
6
|
-
* IPAddressDeny=any + allow-loopback, so any direct (non-proxied) connection is
|
|
7
|
-
* dropped. @sentry/node-core's transport reads ONLY the lowercase
|
|
8
|
-
* http_proxy/https_proxy env vars (node_modules/@sentry/node-core/.../
|
|
9
|
-
* transports/http.js), which the spawn env does not set — so without passing
|
|
10
|
-
* the proxy explicitly via transportOptions.proxy the capture is silently
|
|
11
|
-
* kernel-blocked in prod. Returns undefined in the server/dev (no proxy) →
|
|
12
|
-
* direct egress, which is correct there.
|
|
13
|
-
*/
|
|
14
|
-
export declare function resolveSentryEgressProxy(env?: NodeJS.ProcessEnv): string | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* Initialize Sentry with configuration from environment variables.
|
|
17
|
-
* Only initializes if SENTRY_DSN is set — no implicit error reporting.
|
|
18
|
-
* Uses dynamic import to avoid module resolution issues in dev mode.
|
|
19
|
-
*/
|
|
20
|
-
export declare function initSentry(): Promise<void>;
|
|
21
|
-
/**
|
|
22
|
-
* Get the initialized Sentry instance
|
|
23
|
-
* @returns Sentry instance or null if not initialized
|
|
24
|
-
*/
|
|
25
|
-
export declare function getSentry(): typeof import("@sentry/node") | null;
|
|
26
|
-
//# sourceMappingURL=sentry.d.ts.map
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.resolveSentryEgressProxy = resolveSentryEgressProxy;
|
|
37
|
-
exports.initSentry = initSentry;
|
|
38
|
-
exports.getSentry = getSentry;
|
|
39
|
-
const logger_1 = require("./logger");
|
|
40
|
-
const sentry_scrubber_1 = require("./utils/sentry-scrubber");
|
|
41
|
-
// Lazy logger initialization to avoid circular dependency
|
|
42
|
-
let _logger = null;
|
|
43
|
-
function getLogger() {
|
|
44
|
-
if (!_logger) {
|
|
45
|
-
_logger = (0, logger_1.createLogger)("sentry");
|
|
46
|
-
}
|
|
47
|
-
return _logger;
|
|
48
|
-
}
|
|
49
|
-
let sentryInstance = null;
|
|
50
|
-
/**
|
|
51
|
-
* Resolve the egress proxy URL the Sentry transport must use.
|
|
52
|
-
*
|
|
53
|
-
* Worker subprocesses reach the network ONLY through the gateway egress proxy
|
|
54
|
-
* (HTTP_PROXY=http://localhost:8118); prod additionally pins the kernel to
|
|
55
|
-
* IPAddressDeny=any + allow-loopback, so any direct (non-proxied) connection is
|
|
56
|
-
* dropped. @sentry/node-core's transport reads ONLY the lowercase
|
|
57
|
-
* http_proxy/https_proxy env vars (node_modules/@sentry/node-core/.../
|
|
58
|
-
* transports/http.js), which the spawn env does not set — so without passing
|
|
59
|
-
* the proxy explicitly via transportOptions.proxy the capture is silently
|
|
60
|
-
* kernel-blocked in prod. Returns undefined in the server/dev (no proxy) →
|
|
61
|
-
* direct egress, which is correct there.
|
|
62
|
-
*/
|
|
63
|
-
function resolveSentryEgressProxy(env = process.env) {
|
|
64
|
-
return env.HTTP_PROXY || env.HTTPS_PROXY || undefined;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Initialize Sentry with configuration from environment variables.
|
|
68
|
-
* Only initializes if SENTRY_DSN is set — no implicit error reporting.
|
|
69
|
-
* Uses dynamic import to avoid module resolution issues in dev mode.
|
|
70
|
-
*/
|
|
71
|
-
async function initSentry() {
|
|
72
|
-
const sentryDsn = process.env.SENTRY_DSN;
|
|
73
|
-
if (!sentryDsn) {
|
|
74
|
-
getLogger().debug("Sentry disabled (no SENTRY_DSN configured)");
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
// transportOptions.proxy has highest priority in @sentry/node-core's
|
|
78
|
-
// transport; pass the gateway proxy through explicitly so worker captures
|
|
79
|
-
// route through it (the ingest host is allowlisted in
|
|
80
|
-
// gateway/config/network-allowlist.ts). See resolveSentryEgressProxy.
|
|
81
|
-
const egressProxy = resolveSentryEgressProxy();
|
|
82
|
-
try {
|
|
83
|
-
const Sentry = await Promise.resolve().then(() => __importStar(require("@sentry/node")));
|
|
84
|
-
sentryInstance = Sentry;
|
|
85
|
-
Sentry.init({
|
|
86
|
-
dsn: sentryDsn,
|
|
87
|
-
transportOptions: egressProxy ? { proxy: egressProxy } : undefined,
|
|
88
|
-
// Tag worker events with the same environment/release the server uses
|
|
89
|
-
// (instrument.ts) so worker and server issues group and filter together.
|
|
90
|
-
// ENVIRONMENT / SENTRY_RELEASE come from the pod env; APP_GIT_SHA is
|
|
91
|
-
// the image-baked fallback when SENTRY_RELEASE is unset.
|
|
92
|
-
environment: process.env.ENVIRONMENT || "production",
|
|
93
|
-
release: process.env.SENTRY_RELEASE || process.env.APP_GIT_SHA || undefined,
|
|
94
|
-
// Do not ship IP/cookies/headers by default — user content and identifiers
|
|
95
|
-
// travel through this stack and Sentry has no scrubbing for our schema.
|
|
96
|
-
sendDefaultPii: false,
|
|
97
|
-
// Worker Sentry exists for ISSUES (provider/model failures), not tracing.
|
|
98
|
-
// Every agent run spawns a worker; at 1.0 the fleet would burn the org's
|
|
99
|
-
// span quota (5M/mo on the current plan was exhausted by the server alone
|
|
100
|
-
// at 0.1) and drown the server's traces. Errors are unaffected — error
|
|
101
|
-
// capture uses sampleRate (default 1.0), not tracesSampleRate.
|
|
102
|
-
tracesSampleRate: 0,
|
|
103
|
-
integrations: [
|
|
104
|
-
Sentry.consoleLoggingIntegration({ levels: ["log", "warn", "error"] }),
|
|
105
|
-
],
|
|
106
|
-
// Same scrubbing the gateway installs (packages/server/src/instrument.ts).
|
|
107
|
-
// These three cover error events, transactions, and the breadcrumbs Node's
|
|
108
|
-
// default consoleIntegration derives from console output -- the paths that
|
|
109
|
-
// carry provider URLs, OAuth callback URLs and connector arguments, and so
|
|
110
|
-
// the `?token=`/`?code=` values in them. Without these the credentials the
|
|
111
|
-
// gateway stopped leaking still left the fleet through the worker.
|
|
112
|
-
//
|
|
113
|
-
// Note this does NOT cover consoleLoggingIntegration above: that routes
|
|
114
|
-
// through _INTERNAL_captureLog, which is filtered by beforeSendLog and is
|
|
115
|
-
// inert entirely unless `enableLogs` is set, which it is not here.
|
|
116
|
-
beforeSend: sentry_scrubber_1.scrubSentryErrorEvent,
|
|
117
|
-
beforeSendTransaction: sentry_scrubber_1.scrubSentryTransactionEvent,
|
|
118
|
-
beforeBreadcrumb: sentry_scrubber_1.scrubSentryBreadcrumb,
|
|
119
|
-
});
|
|
120
|
-
getLogger().debug("Sentry monitoring initialized");
|
|
121
|
-
}
|
|
122
|
-
catch (error) {
|
|
123
|
-
getLogger().warn("Sentry initialization failed (continuing without monitoring):", error);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Get the initialized Sentry instance
|
|
128
|
-
* @returns Sentry instance or null if not initialized
|
|
129
|
-
*/
|
|
130
|
-
function getSentry() {
|
|
131
|
-
return sentryInstance;
|
|
132
|
-
}
|
|
133
|
-
//# sourceMappingURL=sentry.js.map
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Per-agent tool policy: which tools an agent may use, and the bash
|
|
3
|
-
* prefix allow/deny lists derived from the same patterns.
|
|
4
|
-
*
|
|
5
|
-
* Shared by every lane that assembles an agent's tool list or runs its shell —
|
|
6
|
-
* the agent worker, the gateway producer that hands an isolate turn its tools,
|
|
7
|
-
* and the isolate guest that runs the turn's bash — so one agent gets one
|
|
8
|
-
* answer whichever lane runs the turn. Everything here is pure: the isolate
|
|
9
|
-
* guest imports this module by its own subpath (`@lobu/core/tool-policy`),
|
|
10
|
-
* so it must never grow a Node import or a root `@lobu/core` import.
|
|
11
|
-
*/
|
|
12
|
-
import type { ToolsConfig } from "./contracts/agent-settings";
|
|
13
|
-
export type BashCommandPolicy = {
|
|
14
|
-
allowAll: boolean;
|
|
15
|
-
allowPrefixes: string[];
|
|
16
|
-
denyPrefixes: string[];
|
|
17
|
-
};
|
|
18
|
-
export type ToolPolicy = {
|
|
19
|
-
toolsConfig?: ToolsConfig;
|
|
20
|
-
allowedPatterns: string[];
|
|
21
|
-
deniedPatterns: string[];
|
|
22
|
-
strictMode: boolean;
|
|
23
|
-
bashPolicy: BashCommandPolicy;
|
|
24
|
-
};
|
|
25
|
-
export declare const DEFAULT_PACKAGE_MANAGER_DENY_PREFIXES: string[];
|
|
26
|
-
export declare function normalizeToolList(value?: string | string[]): string[];
|
|
27
|
-
export declare function buildToolPolicy(params: {
|
|
28
|
-
toolsConfig?: ToolsConfig;
|
|
29
|
-
allowedTools?: string | string[];
|
|
30
|
-
disallowedTools?: string | string[];
|
|
31
|
-
}): ToolPolicy;
|
|
32
|
-
export declare function isToolAllowedByPolicy(toolName: string, policy: ToolPolicy): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Advisory detector for an honestly-typed package-manager install/acquire
|
|
35
|
-
* command, used to return a helpful "declare it in nixPackages instead" message
|
|
36
|
-
* instead of a bare "command not found". Callers: the agent worker's bash
|
|
37
|
-
* preflight (`runtime/tools.ts`) and the isolate guest's workspace `bash`.
|
|
38
|
-
*
|
|
39
|
-
* This is a conservative TEXT hint, NOT the security boundary. It does not try
|
|
40
|
-
* to out-parse the shell, so it misses a quoted, escaped, or path-qualified
|
|
41
|
-
* name (`"nix" run`, `n\ix run`, `/usr/bin/nix run`), a manager behind an exec
|
|
42
|
-
* wrapper (`env nix run`, `xargs npm install`), a name built at runtime, and
|
|
43
|
-
* the body of an interpreter reached by path or long option (`/bin/bash -c`,
|
|
44
|
-
* `bash --login -c`). It also over-denies a manager named as an argument in a
|
|
45
|
-
* position the argument-data words do not cover (`for f in npm install`,
|
|
46
|
-
* `sudo grep nix run x`).
|
|
47
|
-
*
|
|
48
|
-
* That direction is chosen, not tolerated: over-denial is a confusing error on
|
|
49
|
-
* a harmless command, under-detection is a missing guard rail. So every
|
|
50
|
-
* uncertain case falls back to the base detector and flags, and only a word
|
|
51
|
-
* whose operand provably cannot be a command narrows it.
|
|
52
|
-
*
|
|
53
|
-
* Those misses are not holes on either shell that runs today. On the agent
|
|
54
|
-
* worker's default local backend the manager is not a runnable command:
|
|
55
|
-
* `UNSANDBOXED_INTERPRETERS` in the worker's `embedded/just-bash-bootstrap.ts`
|
|
56
|
-
* keeps it out of the just-bash registry, and that lookup is on the RESOLVED
|
|
57
|
-
* binary name, which quoting and paths cannot change. The isolate guest's
|
|
58
|
-
* workspace has no package manager registered at all. Either way the
|
|
59
|
-
* spellings above end in "command not found"; declared `nixPackages` is the
|
|
60
|
-
* sanctioned way to get tooling.
|
|
61
|
-
*
|
|
62
|
-
* Remote runtime providers (opt-in, e.g. `vercel`) have no discovery filter,
|
|
63
|
-
* but the worker's preflight runs before dispatch, so these deny prefixes
|
|
64
|
-
* apply there too and are what keeps a manager from reaching the provider at
|
|
65
|
-
* all. Loosening that for the sandbox tier would be a deliberate, separate
|
|
66
|
-
* change.
|
|
67
|
-
*
|
|
68
|
-
* Making this matcher airtight means reimplementing bash's lexer; attempts to
|
|
69
|
-
* do so produced false positives on honest commands and no gain in
|
|
70
|
-
* enforcement. Prefer widening the discovery filter over widening this regex.
|
|
71
|
-
*/
|
|
72
|
-
export declare function isDirectPackageInstallCommand(command: string): boolean;
|
|
73
|
-
export declare function enforceBashCommandPolicy(command: string, policy: BashCommandPolicy): void;
|
|
74
|
-
//# sourceMappingURL=tool-policy.d.ts.map
|