sim 2.1.8-dev.94.1 → 2.1.8-preview.100.1
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/README.md +52 -20
- package/THIRD_PARTY_LICENSES +42 -0
- package/dist/index.js +3713 -1160
- package/package.json +6 -16
- package/dist/auth/device-flow.d.ts +0 -38
- package/dist/commands/auth.d.ts +0 -5
- package/dist/commands/configure.d.ts +0 -2
- package/dist/commands/credentials.d.ts +0 -3
- package/dist/commands/protocol/chat.d.ts +0 -11
- package/dist/commands/protocol/files-get.d.ts +0 -25
- package/dist/commands/protocol/files-upload.d.ts +0 -2
- package/dist/commands/protocol/index.d.ts +0 -3
- package/dist/commands/protocol/knowledge-document-upload.d.ts +0 -2
- package/dist/commands/protocol/logs-follow.d.ts +0 -39
- package/dist/commands/protocol/resource-directory.d.ts +0 -24
- package/dist/commands/protocol/result.d.ts +0 -2
- package/dist/commands/protocol/tables-import.d.ts +0 -2
- package/dist/commands/protocol/workflow-run-follow.d.ts +0 -56
- package/dist/commands/protocol/workflow-run-get.d.ts +0 -15
- package/dist/commands/protocol/workflow-run-wait.d.ts +0 -3
- package/dist/commands/secrets.d.ts +0 -3
- package/dist/config/index.d.ts +0 -2
- package/dist/config/ini.d.ts +0 -111
- package/dist/config/paths.d.ts +0 -10
- package/dist/config/profile.d.ts +0 -158
- package/dist/context.d.ts +0 -21
- package/dist/contract/commands.d.ts +0 -14
- package/dist/contract/types.d.ts +0 -292
- package/dist/embed-context.d.ts +0 -83
- package/dist/embed-output.d.ts +0 -15
- package/dist/generated/v2-api.d.ts +0 -12969
- package/dist/helpers.d.ts +0 -9
- package/dist/http/client.d.ts +0 -166
- package/dist/http/environment.d.ts +0 -32
- package/dist/output/presentation.d.ts +0 -4
- package/dist/output/render.d.ts +0 -60
- package/dist/output/terminal-text.d.ts +0 -17
- package/dist/output/trace.d.ts +0 -3
- package/dist/program.d.ts +0 -21
- package/dist/runtime/build.d.ts +0 -38
- package/dist/runtime/derive.d.ts +0 -20
- package/dist/runtime/execute.d.ts +0 -30
- package/dist/runtime/naming.d.ts +0 -25
- package/dist/runtime/options.d.ts +0 -7
- package/dist/runtime/renamed.d.ts +0 -20
- package/dist/runtime/request.d.ts +0 -109
- package/dist/runtime/result.d.ts +0 -50
- package/dist/runtime/types.d.ts +0 -23
- package/dist/runtime.d.ts +0 -4
- package/dist/runtime.js +0 -16832
- package/dist/terminal/secret-input.d.ts +0 -15
- package/dist/terminal.d.ts +0 -6
- package/dist/transfer/local-file.d.ts +0 -16
- package/dist/transfer/streaming-upload.d.ts +0 -16
- package/dist/transfer/upload-session.d.ts +0 -18
- package/dist/version.d.ts +0 -10
package/README.md
CHANGED
|
@@ -33,23 +33,37 @@ Sign in to the default profile:
|
|
|
33
33
|
sim login
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
browser
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
With no `--method`, the CLI prefers OAuth when the server offers it and a local
|
|
37
|
+
browser callback is possible. It selects API-key pairing for remote terminals
|
|
38
|
+
or servers without OAuth. Use `sim login --method oauth` to require OAuth;
|
|
39
|
+
if the server does not offer it, login fails without creating an API key.
|
|
40
|
+
|
|
41
|
+
OAuth login opens Sim in your browser, asks you to approve the requested access,
|
|
42
|
+
and receives the one-time authorization code on a loopback callback. It stores
|
|
43
|
+
a short-lived OAuth login that renews automatically and can be revoked under
|
|
44
|
+
**Settings → General → Authorized apps**. Choose a default workspace afterward with
|
|
45
|
+
`sim configure --set-workspace <id>`.
|
|
46
|
+
|
|
47
|
+
Use `--no-browser` with either method to print the approval URL without opening
|
|
48
|
+
it. OAuth still needs the browser to reach the CLI's loopback callback. Over SSH
|
|
49
|
+
or in a container without port forwarding, use
|
|
50
|
+
`sim login --method api-key --no-browser` to approve from another device and
|
|
51
|
+
create a permanent personal API key. `--method api-key` creates a new key;
|
|
52
|
+
set `SIM_API_KEY` to supply an existing one.
|
|
53
|
+
|
|
54
|
+
Pairing requires a server that supports `platform` API keys. Upgrade older
|
|
55
|
+
deployments that only issue `copilot` keys before login; they are not compatible
|
|
56
|
+
with the platform CLI. OAuth discovery does not check pairing compatibility.
|
|
57
|
+
|
|
58
|
+
Check the active profile and verify that its endpoint, credential, and workspace
|
|
45
59
|
work together:
|
|
46
60
|
|
|
47
61
|
```bash
|
|
48
62
|
sim whoami
|
|
49
63
|
```
|
|
50
64
|
|
|
51
|
-
This also reports whether the active
|
|
52
|
-
|
|
65
|
+
This also reports whether the active credential is an OAuth login or an API
|
|
66
|
+
key. Some administrative operations require a personal credential.
|
|
53
67
|
|
|
54
68
|
Then list and run workflows:
|
|
55
69
|
|
|
@@ -73,7 +87,7 @@ not a workflow.
|
|
|
73
87
|
A profile is a named CLI configuration. It determines:
|
|
74
88
|
|
|
75
89
|
- which Sim deployment to use
|
|
76
|
-
- which API key to authenticate with
|
|
90
|
+
- which stored login or API key to authenticate with
|
|
77
91
|
- which workspace to target by default
|
|
78
92
|
- how command output is formatted
|
|
79
93
|
|
|
@@ -94,8 +108,8 @@ There are two common ways to create profiles.
|
|
|
94
108
|
|
|
95
109
|
### Use one login with several workspaces
|
|
96
110
|
|
|
97
|
-
After `sim login`, create another profile that shares the active profile's
|
|
98
|
-
|
|
111
|
+
After `sim login`, create another profile that shares the active profile's
|
|
112
|
+
credential but has its own default workspace:
|
|
99
113
|
|
|
100
114
|
```bash
|
|
101
115
|
sim workspaces list
|
|
@@ -105,7 +119,7 @@ sim --profile acme whoami
|
|
|
105
119
|
|
|
106
120
|
If you omit `--workspace` in an interactive terminal, the CLI asks you to choose
|
|
107
121
|
one. The new profile stores an `auth_profile` reference to the active login; it
|
|
108
|
-
does not copy the
|
|
122
|
+
does not copy the credential.
|
|
109
123
|
|
|
110
124
|
### Use a separate account or deployment
|
|
111
125
|
|
|
@@ -117,8 +131,8 @@ sim login --profile work
|
|
|
117
131
|
sim login --profile local --endpoint http://localhost:3000
|
|
118
132
|
```
|
|
119
133
|
|
|
120
|
-
Each of these profiles stores its own
|
|
121
|
-
|
|
134
|
+
Each of these profiles stores its own login. The endpoint selected during login
|
|
135
|
+
is saved with the profile.
|
|
122
136
|
|
|
123
137
|
### View and change profiles
|
|
124
138
|
|
|
@@ -134,8 +148,9 @@ sim whoami --profile work
|
|
|
134
148
|
`sim profiles` marks the active profile with `*`. Running `sim configure` with
|
|
135
149
|
no setting flags prints the saved settings for that profile.
|
|
136
150
|
|
|
137
|
-
Non-secret settings are stored in `~/.sim/config`. API keys are
|
|
138
|
-
in `~/.sim/credentials`, which is written with `0600`
|
|
151
|
+
Non-secret settings are stored in `~/.sim/config`. OAuth tokens and API keys are
|
|
152
|
+
stored separately in `~/.sim/credentials`, which is written with `0600`
|
|
153
|
+
permissions. Set
|
|
139
154
|
`SIM_CONFIG_DIR` to use a different directory.
|
|
140
155
|
|
|
141
156
|
For each setting, the CLI uses the first available value in this order:
|
|
@@ -256,9 +271,26 @@ The main environment variables are:
|
|
|
256
271
|
| `SIM_API_KEY` | API key, usually for CI |
|
|
257
272
|
| `SIM_WORKSPACE` | Workspace to target |
|
|
258
273
|
| `SIM_OUTPUT` | `table`, `json`, `yaml`, or `text` |
|
|
259
|
-
| `SIM_CONFIG_DIR` |
|
|
274
|
+
| `SIM_CONFIG_DIR` | Base directory for CLI config, credentials, and the update cache |
|
|
260
275
|
| `SIM_TIMEOUT_SECONDS` | Per-request timeout; `0` waits indefinitely |
|
|
261
276
|
| `SIM_DEBUG` | Print request diagnostics to stderr |
|
|
277
|
+
| `SIM_NO_UPDATE_CHECK` | Turn off the update notice |
|
|
278
|
+
|
|
279
|
+
On eligible interactive invocations, `sim` uses a daily cache before asking
|
|
280
|
+
`registry.npmjs.org` what is published under the `latest` tag and prints one
|
|
281
|
+
line on stderr when a newer version exists. Prerelease installs are skipped
|
|
282
|
+
entirely. The cache lives in `~/.sim` by default and follows `SIM_CONFIG_DIR`;
|
|
283
|
+
without a writable cache, each eligible invocation checks again. Concurrent
|
|
284
|
+
invocations can also perform duplicate checks. The registry request has a
|
|
285
|
+
one-second deadline; the short-lived request process is terminated on expiry.
|
|
286
|
+
Apart from the configured registry URL, it sends only its own version and never
|
|
287
|
+
your Sim API key. If `npm_config_registry` points at a private mirror, its query
|
|
288
|
+
string is preserved, including any query-string credentials. Registry URLs
|
|
289
|
+
containing username/password userinfo are rejected. Set
|
|
290
|
+
`SIM_NO_UPDATE_CHECK=1` to turn it off. Empty or whitespace-only registry values
|
|
291
|
+
use the public default; non-empty malformed or non-HTTP(S) values fail closed.
|
|
292
|
+
The full list of cases where it stays quiet is in the
|
|
293
|
+
[configuration guide](https://docs.sim.ai/cli/configuration).
|
|
262
294
|
|
|
263
295
|
## Documentation
|
|
264
296
|
|
package/THIRD_PARTY_LICENSES
CHANGED
|
@@ -9,6 +9,13 @@ Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
|
|
9
9
|
js-yaml
|
|
10
10
|
Copyright (C) 2011-2015 by Vitaly Puzrin
|
|
11
11
|
|
|
12
|
+
proper-lockfile
|
|
13
|
+
Copyright (c) 2018 Made With MOXY Lda <hello@moxy.studio>
|
|
14
|
+
|
|
15
|
+
retry
|
|
16
|
+
Copyright (c) 2011 Tim Koschützki (tim@debuggable.com)
|
|
17
|
+
Copyright (c) 2011 Felix Geisendörfer (felix@debuggable.com)
|
|
18
|
+
|
|
12
19
|
Each dependency above is licensed under the MIT License:
|
|
13
20
|
|
|
14
21
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -28,3 +35,38 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
28
35
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
36
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
37
|
SOFTWARE.
|
|
38
|
+
|
|
39
|
+
graceful-fs
|
|
40
|
+
The ISC License
|
|
41
|
+
|
|
42
|
+
Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
|
|
43
|
+
|
|
44
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
45
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
46
|
+
copyright notice and this permission notice appear in all copies.
|
|
47
|
+
|
|
48
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
49
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
50
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
51
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
52
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
53
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
54
|
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
55
|
+
|
|
56
|
+
signal-exit
|
|
57
|
+
The ISC License
|
|
58
|
+
|
|
59
|
+
Copyright (c) 2015, Contributors
|
|
60
|
+
|
|
61
|
+
Permission to use, copy, modify, and/or distribute this software
|
|
62
|
+
for any purpose with or without fee is hereby granted, provided
|
|
63
|
+
that the above copyright notice and this permission notice
|
|
64
|
+
appear in all copies.
|
|
65
|
+
|
|
66
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
67
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
|
68
|
+
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
|
|
69
|
+
LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
|
70
|
+
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
71
|
+
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
72
|
+
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|