sim 2.1.8-dev.101.1 → 2.1.8-dev.95.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 +1 -18
- package/dist/config/paths.d.ts +0 -11
- package/dist/contract/types.d.ts +0 -12
- package/dist/generated/v2-api.d.ts +13 -542
- package/dist/index.js +23 -678
- package/dist/runtime/request.d.ts +6 -4
- package/dist/runtime.d.ts +0 -1
- package/dist/runtime.js +8713 -9535
- package/package.json +1 -1
- package/dist/embed.d.ts +0 -39
- package/dist/update/check.d.ts +0 -53
package/package.json
CHANGED
package/dist/embed.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
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>;
|
package/dist/update/check.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The once-a-day "there is a newer sim" notice.
|
|
3
|
-
*
|
|
4
|
-
* It exists because a missing subcommand is indistinguishable from a feature
|
|
5
|
-
* that was never built: someone on 2.1.2 looking for `sim tools execute` — added
|
|
6
|
-
* in 2.1.5 — sees a help listing without it and concludes the CLI cannot do it.
|
|
7
|
-
* The version is the only thing that can tell them otherwise.
|
|
8
|
-
*
|
|
9
|
-
* Everything here fails silently. A courtesy notice that breaks a command, or
|
|
10
|
-
* that writes anything to stdout, is worse than no notice at all.
|
|
11
|
-
*/
|
|
12
|
-
export interface UpdateCheckOptions {
|
|
13
|
-
/** Current working directory. Injected so project-local installation detection is testable. */
|
|
14
|
-
cwd?: string;
|
|
15
|
-
currentVersion?: string;
|
|
16
|
-
env?: NodeJS.ProcessEnv;
|
|
17
|
-
/** Whether stderr is a terminal. Injected so the suppression rule is testable. */
|
|
18
|
-
isTty?: boolean;
|
|
19
|
-
/** Location of the running module, used to recognise npx and local builds. */
|
|
20
|
-
modulePath?: string;
|
|
21
|
-
now?: Date;
|
|
22
|
-
/** Registry transport. Injectable so network behavior can be tested without global state. */
|
|
23
|
-
registryRequest?: RegistryRequest;
|
|
24
|
-
write?: (message: string) => void;
|
|
25
|
-
}
|
|
26
|
-
interface RegistryRequestOptions {
|
|
27
|
-
headers: Record<string, string>;
|
|
28
|
-
maxResponseBytes: number;
|
|
29
|
-
timeoutMs: number;
|
|
30
|
-
}
|
|
31
|
-
type RegistryRequest = (url: URL, options: RegistryRequestOptions) => Promise<string | null>;
|
|
32
|
-
/**
|
|
33
|
-
* The command that upgrades *this* installation.
|
|
34
|
-
*
|
|
35
|
-
* The path is asked first because it describes the installation; the
|
|
36
|
-
* environment is a fallback because for a globally installed CLI it usually
|
|
37
|
-
* describes nothing but the shell that happened to invoke it.
|
|
38
|
-
*/
|
|
39
|
-
export declare function upgradeCommand(modulePath?: string, env?: NodeJS.ProcessEnv): string;
|
|
40
|
-
/**
|
|
41
|
-
* Uses a daily cache before telling the user their installation is out of date.
|
|
42
|
-
*
|
|
43
|
-
* Wired as a root `preAction` hook rather than a teardown in the entrypoint for
|
|
44
|
-
* two structural reasons: commander answers `--help` and `--version` during
|
|
45
|
-
* parsing, before any action hook runs, so the two most latency-sensitive
|
|
46
|
-
* invocations are excluded by construction rather than by a check; and some
|
|
47
|
-
* commands call `process.exit` directly, which a `finally` would never see.
|
|
48
|
-
*
|
|
49
|
-
* Never throws, writes only plain text to stderr, and stays silent when stderr
|
|
50
|
-
* is redirected. The caller runs this before the user's actual command.
|
|
51
|
-
*/
|
|
52
|
-
export declare function announceUpdateIfAvailable(options?: UpdateCheckOptions): Promise<void>;
|
|
53
|
-
export {};
|