sim 2.1.28 → 2.2.0-preview.172.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 +21 -6
- package/THIRD_PARTY_LICENSES +3 -0
- package/dist/commands/search.d.ts +10 -0
- package/dist/config/index.d.ts +1 -1
- package/dist/config/profile.d.ts +6 -0
- package/dist/index.js +1161 -10
- package/dist/program.d.ts +10 -1
- package/dist/runtime.js +1161 -10
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -166,7 +166,7 @@ is saved with the profile.
|
|
|
166
166
|
sim profiles
|
|
167
167
|
sim configure --profile work
|
|
168
168
|
sim configure --profile work --set-workspace <workspaceId>
|
|
169
|
-
sim configure --profile work --set-output
|
|
169
|
+
sim configure --profile work --set-output table
|
|
170
170
|
sim configure --profile local --set-endpoint http://localhost:3000
|
|
171
171
|
sim whoami --profile work
|
|
172
172
|
```
|
|
@@ -198,6 +198,17 @@ sim workflows --help
|
|
|
198
198
|
sim tables rows query --help
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
+
Or describe the task and let the CLI find the command. Search ranks the commands
|
|
202
|
+
this version ships, locally; your query is never sent anywhere:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
sim cli search "cancel a running workflow"
|
|
206
|
+
sim --output table cli search list table rows
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
It returns the five best matches. When a coding agent runs the CLI, root and
|
|
210
|
+
group `--help` open with a note pointing it to `sim cli search`.
|
|
211
|
+
|
|
201
212
|
The commands you will use most often are:
|
|
202
213
|
|
|
203
214
|
| Task | Command |
|
|
@@ -242,16 +253,20 @@ argument, and flag.
|
|
|
242
253
|
|
|
243
254
|
## JSON input and output
|
|
244
255
|
|
|
245
|
-
|
|
246
|
-
|
|
256
|
+
JSON is the default, so agents and scripts can parse every result directly.
|
|
257
|
+
Use `table` for aligned human-readable output, YAML if you prefer it, and `text`
|
|
258
|
+
for tab-separated shell output:
|
|
247
259
|
|
|
248
260
|
```bash
|
|
249
|
-
sim workflows list --output
|
|
250
|
-
sim logs list
|
|
261
|
+
sim workflows list --output table
|
|
262
|
+
sim logs list | jq -r '.data[].runId'
|
|
251
263
|
SIM_OUTPUT=yaml sim tables get <tableId>
|
|
252
|
-
sim configure --set-output
|
|
264
|
+
sim configure --set-output table
|
|
253
265
|
```
|
|
254
266
|
|
|
267
|
+
Scripts that must not depend on a profile's saved format can still pass
|
|
268
|
+
`--output json` explicitly.
|
|
269
|
+
|
|
255
270
|
Paginated lists return `{ "data": [...], "nextCursor": "..." }` in JSON and YAML.
|
|
256
271
|
`nextCursor` is `null` when no pages remain. Resource lists and directory `ls`
|
|
257
272
|
fetch every page by default; use `--limit N` to cap them. Table rows (including
|
package/THIRD_PARTY_LICENSES
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
export interface SearchResult {
|
|
3
|
+
command: string;
|
|
4
|
+
summary: string;
|
|
5
|
+
}
|
|
6
|
+
/** Ranks every command in `program` against a plain-language query, best first. */
|
|
7
|
+
export declare function searchCommands(program: Command, query: string, exclude: Command): SearchResult[];
|
|
8
|
+
export declare function searchCommand(): Command;
|
|
9
|
+
/** Commands about the CLI itself rather than a Sim resource. */
|
|
10
|
+
export declare function cliCommand(): Command;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { configDir, configPath, credentialsPath, telemetryStatePath } from './paths';
|
|
2
|
-
export { DEFAULT_ENDPOINT, DEFAULT_PROFILE, deleteProfile, FORBIDDEN_IN_VALUE, listAuthenticationDependents, listProfiles, normalizeEndpoint, normalizeWorkspaceId, OUTPUT_FORMATS, type OutputFormat, oauthIssuerForEndpoint, PROFILE_NAME_PATTERN, ProfileConfigError, type ProfileOverrides, type ResolvedProfile, readConfigProfile, readCredentialsProfile, readStoredCredential, readStoredOAuth, resolveAuthenticationProfileName, resolveProfile, type SettingSource, type StoredCredential, type StoredOAuthCredential, validateProfileName, withCredentialsLock, withProfileLoginLease, writeConfigProfile, writeCredentialsProfile, } from './profile';
|
|
2
|
+
export { DEFAULT_ENDPOINT, DEFAULT_OUTPUT_FORMAT, DEFAULT_PROFILE, deleteProfile, FORBIDDEN_IN_VALUE, listAuthenticationDependents, listProfiles, normalizeEndpoint, normalizeWorkspaceId, OUTPUT_FORMATS, type OutputFormat, oauthIssuerForEndpoint, PROFILE_NAME_PATTERN, ProfileConfigError, type ProfileOverrides, type ResolvedProfile, readConfigProfile, readCredentialsProfile, readStoredCredential, readStoredOAuth, resolveAuthenticationProfileName, resolveProfile, type SettingSource, type StoredCredential, type StoredOAuthCredential, validateProfileName, withCredentialsLock, withProfileLoginLease, writeConfigProfile, writeCredentialsProfile, } from './profile';
|
package/dist/config/profile.d.ts
CHANGED
|
@@ -20,6 +20,12 @@ export declare const DEFAULT_ENDPOINT = "https://www.sim.ai";
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const OUTPUT_FORMATS: readonly ['table', 'json', 'yaml', 'text'];
|
|
22
22
|
export type OutputFormat = (typeof OUTPUT_FORMATS)[number];
|
|
23
|
+
/**
|
|
24
|
+
* JSON unless the flag, `SIM_OUTPUT`, or the profile says otherwise: agents and
|
|
25
|
+
* scripts are the main callers and parse it directly, and a person who prefers
|
|
26
|
+
* tables saves that once with `sim configure --set-output table`.
|
|
27
|
+
*/
|
|
28
|
+
export declare const DEFAULT_OUTPUT_FORMAT: OutputFormat;
|
|
23
29
|
export { FORBIDDEN_IN_VALUE, ProfileConfigError } from './ini';
|
|
24
30
|
/**
|
|
25
31
|
* Makes a rejected value safe to quote inside an error message.
|