sim 2.1.7-preview.92.1 → 2.1.8-dev.101.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.
Files changed (57) hide show
  1. package/dist/auth/device-flow.d.ts +38 -0
  2. package/dist/commands/auth.d.ts +5 -0
  3. package/dist/commands/configure.d.ts +2 -0
  4. package/dist/commands/credentials.d.ts +3 -0
  5. package/dist/commands/protocol/chat.d.ts +11 -0
  6. package/dist/commands/protocol/files-get.d.ts +25 -0
  7. package/dist/commands/protocol/files-upload.d.ts +2 -0
  8. package/dist/commands/protocol/index.d.ts +3 -0
  9. package/dist/commands/protocol/knowledge-document-upload.d.ts +2 -0
  10. package/dist/commands/protocol/logs-follow.d.ts +39 -0
  11. package/dist/commands/protocol/resource-directory.d.ts +24 -0
  12. package/dist/commands/protocol/result.d.ts +2 -0
  13. package/dist/commands/protocol/tables-import.d.ts +2 -0
  14. package/dist/commands/protocol/workflow-run-follow.d.ts +56 -0
  15. package/dist/commands/protocol/workflow-run-get.d.ts +15 -0
  16. package/dist/commands/protocol/workflow-run-wait.d.ts +3 -0
  17. package/dist/commands/secrets.d.ts +3 -0
  18. package/dist/config/index.d.ts +2 -0
  19. package/dist/config/ini.d.ts +111 -0
  20. package/dist/config/paths.d.ts +21 -0
  21. package/dist/config/profile.d.ts +158 -0
  22. package/dist/context.d.ts +21 -0
  23. package/dist/contract/commands.d.ts +14 -0
  24. package/dist/contract/types.d.ts +304 -0
  25. package/dist/embed-context.d.ts +77 -0
  26. package/dist/embed-output.d.ts +15 -0
  27. package/dist/embed.d.ts +39 -0
  28. package/dist/generated/v2-api.d.ts +13498 -0
  29. package/dist/helpers.d.ts +9 -0
  30. package/dist/http/client.d.ts +166 -0
  31. package/dist/http/environment.d.ts +24 -0
  32. package/dist/index.js +768 -281
  33. package/dist/output/io.d.ts +5 -0
  34. package/dist/output/presentation.d.ts +4 -0
  35. package/dist/output/render.d.ts +60 -0
  36. package/dist/output/terminal-text.d.ts +17 -0
  37. package/dist/output/trace.d.ts +3 -0
  38. package/dist/program.d.ts +21 -0
  39. package/dist/runtime/build.d.ts +38 -0
  40. package/dist/runtime/derive.d.ts +20 -0
  41. package/dist/runtime/execute.d.ts +30 -0
  42. package/dist/runtime/naming.d.ts +25 -0
  43. package/dist/runtime/options.d.ts +7 -0
  44. package/dist/runtime/renamed.d.ts +6 -0
  45. package/dist/runtime/request.d.ts +107 -0
  46. package/dist/runtime/result.d.ts +50 -0
  47. package/dist/runtime/types.d.ts +23 -0
  48. package/dist/runtime.d.ts +5 -0
  49. package/dist/runtime.js +17708 -0
  50. package/dist/terminal/secret-input.d.ts +15 -0
  51. package/dist/terminal.d.ts +6 -0
  52. package/dist/transfer/local-file.d.ts +16 -0
  53. package/dist/transfer/streaming-upload.d.ts +16 -0
  54. package/dist/transfer/upload-session.d.ts +18 -0
  55. package/dist/update/check.d.ts +53 -0
  56. package/dist/version.d.ts +10 -0
  57. package/package.json +15 -2
@@ -0,0 +1,304 @@
1
+ import type { V2OperationName } from '../generated/v2-api';
2
+ /**
3
+ * The CLI contract: how the terminal surface maps onto the v2 API.
4
+ *
5
+ * Most of a command is derivable and is NOT stated here. Method, path, path
6
+ * params, field types, enum values, defaults, and required-ness all come from
7
+ * the generated operation table, which comes from the Zod route contracts. The
8
+ * command name itself usually derives from `<resource> <sub-resource> <verb>`.
9
+ *
10
+ * This file carries only what a schema cannot say:
11
+ *
12
+ * - `command` — when the derived name collides or reads badly. REST overloads
13
+ * one path for single and bulk (`DELETE /rows` vs `DELETE /rows/[rowId]`), so
14
+ * those need a human to pick `delete` vs `batch-delete`.
15
+ * - `flags` — when a field's *type* misdescribes its *meaning*. `workflowIds`
16
+ * is `z.string()` that the route splits on commas; nothing in the schema says
17
+ * "list". Also friendlier aliases (`conflictTarget` → `--on`).
18
+ * - `pathFlags` — when a parent path segment is command context rather than the
19
+ * resource being acted on (`workflows runs get <runId> --workflow <id>`).
20
+ * - `pathArgumentNames` — when a route's generic `[id]` needs a clearer CLI
21
+ * placeholder (`<knowledgeBaseId>`).
22
+ * - `profileWorkspacePath` — when `[workspaceId]` is the active profile target,
23
+ * not a resource argument (`workspaces get`).
24
+ * - `columns` — which of a response's fields belong in a table. Editorial.
25
+ * - `confirm` — which operations are destructive enough to demand `--yes`.
26
+ *
27
+ * An operation with nothing unusual needs no entry at all.
28
+ */
29
+ /** How one request field is exposed as a flag. */
30
+ export interface FlagSpec {
31
+ /** Flag name, kebab-case, without `--`. Defaults to the kebab-cased field name. */
32
+ name?: string;
33
+ /** Short alias, e.g. `w` for `--workspace`. */
34
+ short?: string;
35
+ /**
36
+ * Flag names this field used to answer to, such as `predicate` before the
37
+ * count command's filter was spelled the same as its six siblings'.
38
+ *
39
+ * Kept only so an existing script does not break: hidden from help and from
40
+ * the generated docs, warns on stderr, and refuses when combined with the
41
+ * current spelling rather than silently picking one.
42
+ */
43
+ renamedFrom?: readonly string[];
44
+ /**
45
+ * Accept one or more space-separated values, or `@path` / `@-` with one
46
+ * value per line.
47
+ *
48
+ * Only says that several values are allowed — how they reach the wire is
49
+ * decided by the field's kind, not here. A `string` field is one the route
50
+ * splits on commas (`workflowIds`), so the values are joined; anything else
51
+ * genuinely wants an array (`rowIds`, `knowledgeBaseIds`). Conflating the two
52
+ * turned multi-value `--kb` and `--row` into a single bogus value.
53
+ *
54
+ * Still needed on the string case because "this string is really a list" is
55
+ * invisible to any type-driven generator.
56
+ */
57
+ list?: boolean;
58
+ /**
59
+ * The list's natural source is a manifest file, so `@path` / `@-` skip blank
60
+ * lines and `#` comments instead of refusing them.
61
+ *
62
+ * The shared reader treats a blank line as a typo, which is right for an id
63
+ * list. A dependency list is pasted from a requirements file or a lockfile,
64
+ * where blank lines and comments are how people structure it, and the API
65
+ * already ignores both — the terminal was the only surface that refused
66
+ * them. Inline argv values are untouched: an empty argument is still an
67
+ * error, and a literal `#` value can still be passed.
68
+ */
69
+ manifest?: true;
70
+ /** Take a JSON string. Implied for object/array/unknown fields. */
71
+ json?: boolean;
72
+ /**
73
+ * Accept a plain whole number and send the route's `{ type: 'rows', max: n }`.
74
+ *
75
+ * A deliberate one-off for `tables dispatches create --max-rows`: the only
76
+ * request field in the CLI whose object shape holds exactly one free value,
77
+ * because its `type` is a `z.literal('rows')`. Left as JSON, the flag made a
78
+ * caller type `{"type":"rows","max":100}` — four tokens of ceremony to say
79
+ * `100`, in a shape nothing in the terminal spells out. Not a general
80
+ * value-transform hook: no second field wants one, and a second one arriving
81
+ * is the point at which this should become one.
82
+ */
83
+ rowCap?: true;
84
+ /** Overrides the help text otherwise taken from the OpenAPI description. */
85
+ describe?: string;
86
+ /**
87
+ * Value sent when the caller passes nothing, in place of the server's default.
88
+ *
89
+ * For a command whose declared `columns` read a field the API only sends at a
90
+ * heavier setting: `logs list` shows `workflow.name`, which `details=basic`
91
+ * omits, so the primary debugging table had a permanently empty column. It is
92
+ * a request default, not a flag default — whatever the caller types wins,
93
+ * including a deliberate `--details basic`.
94
+ */
95
+ requestDefault?: string;
96
+ /** Accepted values when the generated descriptor cannot recover an enum. */
97
+ choices?: readonly string[];
98
+ /**
99
+ * Expose a string-backed API boolean as a conventional terminal toggle.
100
+ *
101
+ * A toggle declared here carries no generated `--no-<name>` twin by default,
102
+ * because sending false is usually either meaningless — the server already
103
+ * defaults the field to false — or rejected outright, as on a field the API
104
+ * declares as `z.literal(true)`. {@link negatable} asks for the twin back on
105
+ * the one kind of field where false is a real request.
106
+ */
107
+ boolean?: true;
108
+ /**
109
+ * Give a {@link boolean} toggle its `--no-<name>` twin after all.
110
+ *
111
+ * Withholding the twin is right for a one-way switch: most string-backed
112
+ * toggles sit on a field the server already defaults to false, so a negation
113
+ * would only restate the default, and on a `z.literal(true)` field it would
114
+ * send a request the route rejects. `files list --recursive` is neither — the
115
+ * API turns it on by itself as soon as a search is set, so without a spelling
116
+ * for false there is no way to search one folder without descending into it.
117
+ * Declared per flag rather than derived from the union's false spellings,
118
+ * which every one of these toggles publishes whether or not sending one means
119
+ * anything.
120
+ */
121
+ negatable?: true;
122
+ /**
123
+ * This field carries a folder path, so percent-encode each of its segments.
124
+ *
125
+ * The API's canonical folder path is percent-encoded per segment, which made
126
+ * the terminal the only place a folder had to be spelled `/Folder%201`
127
+ * instead of the `/Folder 1` shown everywhere else; typing what you see was
128
+ * rejected with a message that never mentioned encoding. Marked rather than
129
+ * inferred from the field's name: `files upload` and `knowledge documents
130
+ * upload` take a `path` that is a LOCAL file, and encoding one of those would
131
+ * break the read.
132
+ */
133
+ folderPath?: true;
134
+ /**
135
+ * Never expose this field as a flag, and never send it.
136
+ *
137
+ * For request fields the terminal cannot honor — `stream: true` switches the
138
+ * response to SSE, which the JSON client would try to `JSON.parse`. Offering
139
+ * the flag would advertise a mode that breaks; a bespoke streaming command
140
+ * owns that instead.
141
+ */
142
+ omit?: boolean;
143
+ /** Accept and send this generated field, but hide its low-level flag from help. */
144
+ hidden?: boolean;
145
+ }
146
+ /** How a route path parameter is exposed as a required named option. */
147
+ export interface PathFlagSpec {
148
+ /** Flag name, kebab-case, without `--`. Defaults to the kebab-cased path parameter. */
149
+ name?: string;
150
+ /** Help placeholder without angle brackets. Defaults to `value`. */
151
+ placeholder?: string;
152
+ /** Short alias, e.g. `k` for `--kb`. */
153
+ short?: string;
154
+ /** One-line help for the scope selected by this path parameter. */
155
+ describe?: string;
156
+ }
157
+ /** A column in table-mode output. */
158
+ export interface ColumnSpec {
159
+ /** Header, and the default path into the row when `value` is omitted. */
160
+ header: string;
161
+ /** Dot path into the row. Defaults to `header`. */
162
+ path?: string;
163
+ /**
164
+ * Narrowest this column may lock to when a renderer fixes its widths before
165
+ * it has seen the rows.
166
+ *
167
+ * `logs list` sizes every column from the page it is about to print, so it
168
+ * never needs this. A follow cannot: it locks the widths on its first batch so
169
+ * the stream reads as one table, and `logs follow -n 0` locks them on no rows
170
+ * at all — every column collapsed to its header label, and a run id printed as
171
+ * `9f…`. The floor is what the column's own rendering is known to need (a
172
+ * timestamp is 19 characters, a run id 36), so it is stated here beside the
173
+ * `format` that produces it rather than guessed by the renderer. Capped by the
174
+ * renderer's own maximum cell width; a floor above that is a spec bug.
175
+ */
176
+ minWidth?: number;
177
+ /**
178
+ * Rendering hint; `auto` inspects the value.
179
+ *
180
+ * `folder-path` is the display half of `FlagSpec.folderPath`: it undoes the
181
+ * wire encoding for the human formats, so a folder no longer prints as
182
+ * `/cli-test-a/nested%20one` in the same row as the `nested one` the server
183
+ * put in the adjacent name column.
184
+ *
185
+ * `score` fixes a similarity to four decimals. The raw double arrives as
186
+ * `0.2818957269585687`, a nineteen-character column whose last dozen digits
187
+ * cannot separate one result from another.
188
+ */
189
+ format?: 'auto' | 'timestamp' | 'bytes' | 'duration' | 'bool' | 'cost' | 'count' | 'trace-count' | 'folder-path' | 'score';
190
+ }
191
+ export interface BodyVariantSpec {
192
+ /** User-facing flag name, without `--`. */
193
+ name: string;
194
+ /** Request-body property populated by this variant. */
195
+ property: string;
196
+ /** JSON shape accepted by this variant. */
197
+ kind: 'object' | 'array';
198
+ /** One-line help describing when to use this variant. */
199
+ describe: string;
200
+ }
201
+ export interface CommandVariantSpec {
202
+ /** Full alternate command path, such as `workflows mv`. */
203
+ command: string;
204
+ /** Request fields exposed as required positional arguments. */
205
+ positionals?: readonly string[];
206
+ /** Request fields available on this narrower command surface. */
207
+ requestFields?: readonly string[];
208
+ /** One-line help for the alternate command. */
209
+ describe?: string;
210
+ }
211
+ export interface CommandSpec {
212
+ /**
213
+ * Command path, space-separated. Omit to accept the derived
214
+ * `<resource> [sub-resource] <verb>` name.
215
+ */
216
+ command?: string;
217
+ /** Run this operation when its top-level group is invoked without a subcommand. */
218
+ groupDefault?: boolean;
219
+ /** Alternate leaf command names, such as `ls` for `list`. */
220
+ aliases?: readonly string[];
221
+ /**
222
+ * Full command paths this operation used to answer to, such as
223
+ * `tables count create` before it became `tables rows count`.
224
+ *
225
+ * Unlike {@link aliases}, these are kept only so an existing script does not
226
+ * break: each is hidden from help and from the generated docs, and warns on
227
+ * stderr with the current spelling. Give the whole path, because a rename can
228
+ * move a command between groups rather than just retitle its leaf.
229
+ */
230
+ renamedFrom?: readonly string[];
231
+ /** Route path parameters exposed as required named options instead of positionals. */
232
+ pathFlags?: Record<string, PathFlagSpec>;
233
+ /** Friendly placeholders for route path parameters that remain positional. */
234
+ pathArgumentNames?: Record<string, string>;
235
+ /** Fill a `[workspaceId]` route segment from the active profile instead of an argument. */
236
+ profileWorkspacePath?: boolean;
237
+ /** Request fields exposed as required positional arguments, in order. */
238
+ positionals?: readonly string[];
239
+ /** Restrict this command to these request fields; profile fields remain implicit. */
240
+ requestFields?: readonly string[];
241
+ /** Additional command shapes backed by the same API operation. */
242
+ variants?: readonly CommandVariantSpec[];
243
+ /** One-line help. Falls back to the OpenAPI summary for the operation. */
244
+ describe?: string;
245
+ /** Per-field flag overrides, keyed by the contract's field name. */
246
+ flags?: Record<string, FlagSpec>;
247
+ /** Friendly mutually-exclusive flags for an otherwise opaque union body. */
248
+ bodyVariants?: readonly BodyVariantSpec[];
249
+ /** Columns for table output. Omit on non-list commands to print a record. */
250
+ columns?: ColumnSpec[];
251
+ /** Fields shown for a single record in human formats. Machine output stays raw. */
252
+ fields?: ColumnSpec[];
253
+ /** Add `--trace` to expand recursive trace spans in human-readable output. */
254
+ expandedTrace?: boolean;
255
+ /** Dot path to a nested result array rendered as the command's human list. */
256
+ itemsPath?: string;
257
+ /**
258
+ * A page-envelope field that qualifies the whole list, stated once for the
259
+ * human formats.
260
+ *
261
+ * `billing logs` answers a different question depending on the kind of API
262
+ * key that asked — a personal key sees the caller's own events, a workspace
263
+ * key the whole workspace ledger — and the response says which. The value
264
+ * belongs to the query rather than to any row, so it is not a column; it goes
265
+ * to stderr so that a `--output text` consumer cutting tab-separated fields
266
+ * still reads only rows. `json` and `yaml` print the unwrapped `data` array
267
+ * and so drop the field too, which is why the note is not limited to the
268
+ * human formats — see `runtime/result`.
269
+ */
270
+ pageNote?: {
271
+ path: string;
272
+ label: string;
273
+ };
274
+ /** Allow an optional workspaceId field to omit the configured workspace filter. */
275
+ allWorkspaces?: boolean;
276
+ /**
277
+ * Require `--yes`. The message should say what is about to be destroyed —
278
+ * the point is that the caller can tell whether they meant it.
279
+ */
280
+ confirm?: string;
281
+ /**
282
+ * Discover table columns from inside this nested field as well as from the
283
+ * row's own scalars.
284
+ *
285
+ * For rows whose real content sits in a wrapper the server chose — a table
286
+ * row's user-defined cells live under `data` — the inferred columns would
287
+ * otherwise be `id` and two timestamps, because a nested object cannot be a
288
+ * column. Only meaningful when `columns` is absent.
289
+ */
290
+ expand?: string;
291
+ /**
292
+ * The response IS a document, not a record to look at.
293
+ *
294
+ * `workflows export` exists to be redirected into a file and fed back to
295
+ * `import`, so a key/value view of it is wrong at any fidelity — the useful
296
+ * artifact is the payload itself. Document commands emit raw JSON (or YAML
297
+ * when the profile says so) whatever the profile's display format is.
298
+ */
299
+ document?: boolean;
300
+ /** Keep the operation out of the CLI surface entirely. */
301
+ hidden?: boolean;
302
+ }
303
+ /** The contract: operation name → how it appears in the terminal. */
304
+ export type CliContract = Partial<Record<V2OperationName, CommandSpec>>;
@@ -0,0 +1,77 @@
1
+ import { AsyncLocalStorage } from 'node:async_hooks';
2
+ import type { ResolvedProfile } from './config/profile';
3
+ import type { EmbeddedOutput } from './embed-output';
4
+ /**
5
+ * The async-context plumbing for embedded (in-process) CLI runs, split from
6
+ * `embed.ts` so `config/profile.ts` can consult it without a runtime import
7
+ * cycle (this module imports nothing from the CLI beyond a type).
8
+ */
9
+ export interface EmbeddedCliIdentity {
10
+ endpoint: string;
11
+ apiKey: string;
12
+ workspaceId?: string;
13
+ /**
14
+ * How requests reach the endpoint. A host that serves the v2 routes itself passes a
15
+ * transport that dispatches to them in-process, so an embedded run never leaves the
16
+ * server: no network hop, no proxy body ceiling, no per-key rate limit meant for
17
+ * callers on the wire. Absent, requests go over `fetch` like the installed CLI's.
18
+ */
19
+ transport?: typeof fetch;
20
+ /** Cancellation belongs to this invocation, never to the hosting process. */
21
+ signal?: AbortSignal;
22
+ }
23
+ /** A host-owned immutable file, streamed once and released when the invocation ends. */
24
+ export interface EmbeddedFileSnapshot {
25
+ size: number;
26
+ /** The host's read lease also bounds outstanding upload requests. */
27
+ signal?: AbortSignal;
28
+ stream(): Promise<ReadableStream<Uint8Array>>;
29
+ dispose(): Promise<void>;
30
+ }
31
+ export interface EmbedContext {
32
+ identity: EmbeddedCliIdentity;
33
+ stdout: EmbeddedOutput;
34
+ stderr: EmbeddedOutput;
35
+ /**
36
+ * Reads bounded structured arguments from the caller's machine on demand.
37
+ * The CLI owns path syntax; the host receives the resolved path without `@`.
38
+ * An embedded invocation never falls back to the server's filesystem.
39
+ */
40
+ readFile?: (path: string) => Promise<string | Uint8Array>;
41
+ /** File transfers use a snapshot; structured arguments use the separate bounded reader. */
42
+ openFile?: (path: string) => Promise<EmbeddedFileSnapshot>;
43
+ /**
44
+ * Soft-fail exit code (a failed run outcome, `runs wait` timeout). Embedded
45
+ * commands write here INSTEAD of process.exitCode: that global is shared, so
46
+ * two parallel embedded invocations raced on it — one run could observe and
47
+ * clear another's failure.
48
+ */
49
+ softExitCode?: number;
50
+ /**
51
+ * Where a download lands when embedded: the host writes to the caller's own machine
52
+ * (through its file adapter), never to the server's disk. Resolves only after publication;
53
+ * a refused or uncertain write throws. The host consumes or cancels the stream;
54
+ * it must not buffer the complete download. Overwrite policy must hold atomically.
55
+ */
56
+ writeFile?: (path: string, content: ReadableStream<Uint8Array>, options: {
57
+ overwrite: boolean;
58
+ }) => Promise<void>;
59
+ }
60
+ /** The embedded-vs-standalone seam for soft-fail codes: context when embedded, global otherwise. */
61
+ export declare function setSoftExitCode(code: number): void;
62
+ export declare const embedStore: AsyncLocalStorage<EmbedContext>;
63
+ /** Thrown in place of process.exit inside an embedded run. */
64
+ export declare class EmbeddedExit extends Error {
65
+ readonly code: number;
66
+ constructor(code: number);
67
+ }
68
+ /**
69
+ * The profile resolver consults this before touching env or config files: an
70
+ * embedded run's identity comes entirely from the hosting server (it already
71
+ * authenticated the caller and knows the workspace), never from profiles,
72
+ * login state, or the host process env. Null outside an embedded run, which
73
+ * keeps the installed CLI's behavior byte-identical.
74
+ */
75
+ export declare function embeddedProfile(): ResolvedProfile | null;
76
+ /** Exits the terminal CLI without terminating an embedding host. */
77
+ export declare function exitCli(code: number): never;
@@ -0,0 +1,15 @@
1
+ export declare class EmbeddedOutputLimitError extends Error {
2
+ constructor();
3
+ }
4
+ /** Byte capture preserves write boundaries and bounds both bytes and allocation count. */
5
+ export declare class EmbeddedOutput {
6
+ private readonly blocks;
7
+ private pending;
8
+ private used;
9
+ private total;
10
+ limitError: EmbeddedOutputLimitError | undefined;
11
+ write(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
12
+ /** Error rendering and cleanup must still finish when diagnostic capture fills up. */
13
+ diagnostic(message: string): void;
14
+ text(): string;
15
+ }
@@ -0,0 +1,39 @@
1
+ import { type EmbedContext, type EmbeddedCliIdentity } from './embed-context';
2
+ import { SimClient } from './http/client';
3
+ /**
4
+ * In-process execution of one CLI invocation, for a server that already knows
5
+ * who is calling: the caller supplies endpoint + credential + workspace
6
+ * directly and the profile machinery (config files, env vars, login state) is
7
+ * bypassed entirely. Everything else — command tree, flag parsing, request
8
+ * building, output rendering — is the exact code the installed CLI runs, so
9
+ * the two surfaces cannot drift.
10
+ *
11
+ * Concurrency-safe by construction: the identity and the output capture both
12
+ * live in an AsyncLocalStorage context, so parallel embedded invocations (and
13
+ * any ordinary console logging around them) never interleave.
14
+ */
15
+ export type { EmbeddedCliIdentity, EmbeddedFileSnapshot } from './embed-context';
16
+ export type { ExportWorkflowResponse, ListFilesResponse, ListWorkflowsResponse, ReadFileTextResponse, } from './generated/v2-api';
17
+ export { SimClient } from './http/client';
18
+ export interface EmbeddedCliResult {
19
+ exitCode: number;
20
+ stdout: string;
21
+ stderr: string;
22
+ }
23
+ /**
24
+ * A typed v2 client bound to an embedded identity — for server-side augmentation
25
+ * commands that reuse the v2 surface directly instead of re-parsing rendered
26
+ * CLI output. Same endpoint/credential semantics as {@link runEmbeddedCli}.
27
+ */
28
+ export declare function createEmbeddedClient(identity: EmbeddedCliIdentity): SimClient;
29
+ /**
30
+ * Runs one CLI invocation in-process. `argv` is the token list exactly as the
31
+ * terminal would receive it (no leading node/binary tokens). Errors the
32
+ * installed CLI would print-and-exit-1 on come back the same way: rendered to
33
+ * stderr, exitCode 1 — never thrown.
34
+ */
35
+ export declare function runEmbeddedCli(argv: string[], identity: EmbeddedCliIdentity, options?: {
36
+ readFile?: EmbedContext['readFile'];
37
+ openFile?: EmbedContext['openFile'];
38
+ writeFile?: EmbedContext['writeFile'];
39
+ }): Promise<EmbeddedCliResult>;