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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim",
3
- "version": "2.1.8-dev.101.1",
3
+ "version": "2.1.8-dev.95.1",
4
4
  "description": "Sim CLI - talk to the Sim API from your terminal",
5
5
  "type": "module",
6
6
  "imports": {
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>;
@@ -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 {};