sim 2.1.18-dev.133.1 → 2.1.18

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 (75) hide show
  1. package/dist/index.js +3654 -4127
  2. package/package.json +2 -12
  3. package/dist/auth/device-flow.d.ts +0 -39
  4. package/dist/auth/oauth-flow.d.ts +0 -119
  5. package/dist/auth/refresh.d.ts +0 -16
  6. package/dist/commands/auth.d.ts +0 -5
  7. package/dist/commands/configure.d.ts +0 -2
  8. package/dist/commands/credentials.d.ts +0 -3
  9. package/dist/commands/protocol/chat.d.ts +0 -11
  10. package/dist/commands/protocol/files-get.d.ts +0 -25
  11. package/dist/commands/protocol/files-upload.d.ts +0 -2
  12. package/dist/commands/protocol/index.d.ts +0 -3
  13. package/dist/commands/protocol/knowledge-document-upload.d.ts +0 -2
  14. package/dist/commands/protocol/knowledge-export.d.ts +0 -14
  15. package/dist/commands/protocol/logs-follow.d.ts +0 -39
  16. package/dist/commands/protocol/resource-directory.d.ts +0 -24
  17. package/dist/commands/protocol/result.d.ts +0 -2
  18. package/dist/commands/protocol/tables-import.d.ts +0 -2
  19. package/dist/commands/protocol/workflow-run-follow.d.ts +0 -56
  20. package/dist/commands/protocol/workflow-run-get.d.ts +0 -15
  21. package/dist/commands/protocol/workflow-run-wait.d.ts +0 -3
  22. package/dist/commands/protocol/workspace-operation-wait.d.ts +0 -14
  23. package/dist/commands/secrets.d.ts +0 -3
  24. package/dist/commands/telemetry.d.ts +0 -2
  25. package/dist/commands/update.d.ts +0 -2
  26. package/dist/config/index.d.ts +0 -2
  27. package/dist/config/ini.d.ts +0 -111
  28. package/dist/config/json-file.d.ts +0 -18
  29. package/dist/config/paths.d.ts +0 -29
  30. package/dist/config/profile.d.ts +0 -210
  31. package/dist/context.d.ts +0 -21
  32. package/dist/contract/commands.d.ts +0 -14
  33. package/dist/contract/types.d.ts +0 -306
  34. package/dist/embed-context.d.ts +0 -79
  35. package/dist/embed-output.d.ts +0 -15
  36. package/dist/embed.d.ts +0 -40
  37. package/dist/environment.d.ts +0 -22
  38. package/dist/generated/v2-api.d.ts +0 -15057
  39. package/dist/helpers.d.ts +0 -9
  40. package/dist/http/client.d.ts +0 -173
  41. package/dist/http/environment.d.ts +0 -24
  42. package/dist/http/ndjson.d.ts +0 -5
  43. package/dist/output/io.d.ts +0 -5
  44. package/dist/output/presentation.d.ts +0 -4
  45. package/dist/output/render.d.ts +0 -60
  46. package/dist/output/terminal-text.d.ts +0 -17
  47. package/dist/output/trace.d.ts +0 -3
  48. package/dist/output/truncation.d.ts +0 -3
  49. package/dist/program.d.ts +0 -21
  50. package/dist/runtime/build.d.ts +0 -38
  51. package/dist/runtime/derive.d.ts +0 -20
  52. package/dist/runtime/execute.d.ts +0 -32
  53. package/dist/runtime/naming.d.ts +0 -25
  54. package/dist/runtime/options.d.ts +0 -9
  55. package/dist/runtime/renamed.d.ts +0 -6
  56. package/dist/runtime/request.d.ts +0 -110
  57. package/dist/runtime/result.d.ts +0 -41
  58. package/dist/runtime/types.d.ts +0 -23
  59. package/dist/runtime.d.ts +0 -5
  60. package/dist/runtime.js +0 -21864
  61. package/dist/telemetry/client-info.d.ts +0 -20
  62. package/dist/telemetry/coding-agent.d.ts +0 -31
  63. package/dist/telemetry/index.d.ts +0 -4
  64. package/dist/telemetry/invocation.d.ts +0 -98
  65. package/dist/telemetry/policy.d.ts +0 -38
  66. package/dist/telemetry/state.d.ts +0 -47
  67. package/dist/telemetry/transport.d.ts +0 -47
  68. package/dist/terminal/secret-input.d.ts +0 -15
  69. package/dist/terminal.d.ts +0 -7
  70. package/dist/transfer/local-file.d.ts +0 -16
  71. package/dist/transfer/streaming-upload.d.ts +0 -16
  72. package/dist/transfer/upload-session.d.ts +0 -18
  73. package/dist/update/check.d.ts +0 -53
  74. package/dist/update/install.d.ts +0 -20
  75. package/dist/version.d.ts +0 -10
@@ -1,20 +0,0 @@
1
- /**
2
- * The `X-Sim-Client-Info` value: the same facts as the user agent, in the
3
- * header every official client sends, plus the AI coding agent driving this
4
- * shell (`none` when none is detected). The server reads this header, not the user
5
- * agent, so a request from the CLI is attributed to the CLI on every log line
6
- * and analytics event it produces.
7
- *
8
- * The agent is usage data, so it goes only where usage reporting is allowed:
9
- * `DO_NOT_TRACK`, `SIM_TELEMETRY_DISABLED`, and `sim telemetry disable` all
10
- * withhold it. Whether this build has a reporting destination is irrelevant —
11
- * the server, not the CLI, is what records it. Computed once per process.
12
- */
13
- export declare function clientInfoHeader(env?: NodeJS.ProcessEnv): string;
14
- /**
15
- * The headers that identify the CLI on every request it makes to a Sim
16
- * deployment: the user agent and `X-Sim-Client-Info`. One definition, so the
17
- * API client and the login flows cannot drift into identifying themselves
18
- * differently.
19
- */
20
- export declare function identityHeaders(): Record<string, string>;
@@ -1,31 +0,0 @@
1
- /**
2
- * Detects the AI coding agent whose shell this process runs in.
3
- *
4
- * Agents mark the shells they spawn with an environment variable, and the CLI
5
- * reports that mark so usage driven by an agent can be told apart from a person
6
- * at a terminal. The checks, their order, and the names follow the GitHub CLI's
7
- * `internal/agents/detect.go` exactly: the generic `AI_AGENT` declaration
8
- * first, then vendor markers, with a more specific agent ahead of a broader
9
- * marker it also sets (Amp and Cowork both set `CLAUDECODE`).
10
- *
11
- * Four of that table's signals are deliberately left out, each one the GitHub
12
- * CLI itself marks as low confidence: `REPL_ID` (present in every Replit
13
- * environment), `GOOSE_PROVIDER` (Goose is merely configured),
14
- * `TERM_PROGRAM=kiro` (Kiro's terminal, which a person uses too), and a
15
- * `.pi/agent` entry on `PATH`. Each describes where a person is working rather
16
- * than an agent driving the command, so reporting it would attribute that
17
- * person's own commands to an agent.
18
- */
19
- /**
20
- * What the CLI reports when no agent is detected: a person at a terminal, or a
21
- * script. Sent explicitly so that an absent value means only that the client
22
- * did not report one — an older release, or reporting turned off.
23
- */
24
- export declare const NO_CODING_AGENT = "none";
25
- /**
26
- * The agent driving this shell, or `undefined` for a person at a terminal.
27
- *
28
- * `AI_AGENT` is the generic convention agents use to name themselves, and wins
29
- * over every vendor marker when it holds a well-formed name.
30
- */
31
- export declare function detectCodingAgent(env?: NodeJS.ProcessEnv): string | undefined;
@@ -1,4 +0,0 @@
1
- export { createCommandTelemetry } from './invocation';
2
- export { DO_NOT_TRACK_VARIABLE, TELEMETRY_DISABLED_VARIABLE, type TelemetryStatus, telemetryStatus, } from './policy';
3
- export { loadTelemetryState, readTelemetryState, writeTelemetryState } from './state';
4
- export { builtInIngestTarget } from './transport';
@@ -1,98 +0,0 @@
1
- import type { Command } from 'commander';
2
- import { type IngestTarget, sendCapture } from './transport';
3
- /**
4
- * Usage reporting for one CLI invocation: what ran, whether it worked, and
5
- * how long it took. One event per command, sent after the command finishes.
6
- *
7
- * What is sent is the smallest set that answers "how is the CLI used": the
8
- * command's name, the names of the flags typed, how many positional arguments
9
- * there were, the exit code, the duration, and the runtime it ran on. What is
10
- * never sent is anything the user typed — no argument values, flag values,
11
- * paths, or error messages — matching the policy the Stripe, GitHub, and
12
- * Supabase CLIs converge on. See {@link CommandEventProperties}.
13
- */
14
- export declare const COMMAND_EVENT = "cli_command_executed";
15
- /** The user-facing name of this reporting, as `$lib` in each event. */
16
- declare const LIBRARY_NAME = "sim-cli";
17
- export declare const USAGE_DATA_DOCS_URL = "https://docs.sim.ai/cli/usage-data";
18
- /**
19
- * Printed once, the first time reporting would happen on an interactive
20
- * terminal, the way the Vercel and Next.js notices are. The run that shows it
21
- * is not reported, so nothing leaves the machine before the user has read
22
- * that something will.
23
- */
24
- export declare const FIRST_RUN_NOTICE: string;
25
- /**
26
- * The event's properties. Kept in one place so the documentation page can be
27
- * checked against it and a new property is a deliberate addition here.
28
- */
29
- export interface CommandEventProperties {
30
- /** Analytics library conventions: the reporting client and its version. */
31
- $lib: typeof LIBRARY_NAME;
32
- $lib_version: string;
33
- /** Events are anonymous and must not create a person profile per device. */
34
- $process_person_profile: false;
35
- /** Commands close in time share a session, so a sequence of commands can be read back. */
36
- $session_id: string;
37
- /** The command's position within its session. */
38
- session_sequence: number;
39
- /** The same surface name the server stamps on requests carrying `X-Sim-Client-Info`. */
40
- surface: 'cli';
41
- /** The command's path, such as `workflows list` — never its arguments. */
42
- command: string;
43
- /** The long names of flags that were typed, such as `--output`; never their values. */
44
- flags: string[];
45
- /** How many positional arguments were given; never what they were. */
46
- arg_count: number;
47
- exit_code: number;
48
- /** Time from process start to completion, in milliseconds. */
49
- duration_ms: number;
50
- /** The failure's class name, such as `SimApiError`; never its message. */
51
- error_name?: string;
52
- /** The API's machine-readable error code, such as `NOT_FOUND`. */
53
- error_code?: string;
54
- http_status?: number;
55
- cli_version: string;
56
- node_version: string;
57
- os: string;
58
- arch: string;
59
- /** Whether stdout was a terminal, which separates people from scripts. */
60
- is_tty: boolean;
61
- is_ci: boolean;
62
- /** The AI coding agent driving this shell, or `none` when none was detected. */
63
- coding_agent: string;
64
- /** Whether the profile targets Sim's hosted deployment or a self-hosted one; never the address. */
65
- endpoint_kind?: 'hosted' | 'self_hosted';
66
- }
67
- export interface InvocationOutcome {
68
- exitCode: number;
69
- error?: unknown;
70
- }
71
- export interface CommandTelemetryOptions {
72
- env?: NodeJS.ProcessEnv;
73
- ingestTarget?: () => IngestTarget | undefined;
74
- send?: typeof sendCapture;
75
- now?: () => Date;
76
- /** Milliseconds since the process started, for the duration. */
77
- elapsed?: () => number;
78
- /** Whether stdout is a terminal: the `is_tty` property, which separates people from scripts. */
79
- stdoutIsTty?: boolean;
80
- /** Whether stderr is a terminal: where the notice would go, so whether anyone would see it. */
81
- stderrIsTty?: boolean;
82
- /** Where the first-run notice goes; stderr, so piped output stays clean. */
83
- write?: (message: string) => void;
84
- /** Registers the listener that reports when the process ends; the real process by default. */
85
- onExit?: (listener: (exitCode: number) => void) => void;
86
- }
87
- export interface CommandTelemetry {
88
- /** Installs the hook that records which command is about to run, and the exit listener that reports it. */
89
- observe(program: Command): void;
90
- /**
91
- * Reports the recorded command, given how it ended. Idempotent, and a no-op
92
- * when nothing was recorded: the entrypoint calls it with the failure it
93
- * explained, and the exit listener calls it for every other way out.
94
- */
95
- complete(outcome: InvocationOutcome): void;
96
- }
97
- export declare function createCommandTelemetry(options?: CommandTelemetryOptions): CommandTelemetry;
98
- export {};
@@ -1,38 +0,0 @@
1
- import type { TelemetryState } from './state';
2
- /**
3
- * The switch every CLI that reports usage honours before its own: `DO_NOT_TRACK=1`
4
- * expresses a lack of consent to any usage reporting, from any tool. Spec at
5
- * consoledonottrack.com; `true` is accepted as well, as Turborepo, Wrangler,
6
- * and the GitHub CLI do.
7
- */
8
- export declare const DO_NOT_TRACK_VARIABLE = "DO_NOT_TRACK";
9
- /** The CLI's own switch, for turning reporting off in one environment or CI job. */
10
- export declare const TELEMETRY_DISABLED_VARIABLE = "SIM_TELEMETRY_DISABLED";
11
- export type TelemetryDisabledReason =
12
- /** `DO_NOT_TRACK` is set. */
13
- 'do_not_track'
14
- /** `SIM_TELEMETRY_DISABLED` is set. */
15
- | 'environment'
16
- /** The user ran `sim telemetry disable`. */
17
- | 'setting'
18
- /** This build was made without a reporting destination, so there is nowhere to send to. */
19
- | 'unconfigured';
20
- export type TelemetryStatus = {
21
- enabled: true;
22
- } | {
23
- enabled: false;
24
- reason: TelemetryDisabledReason;
25
- };
26
- export interface TelemetryStatusInput {
27
- env: NodeJS.ProcessEnv;
28
- state: Pick<TelemetryState, 'enabled'>;
29
- /** Whether the build carries a reporting destination. */
30
- configured: boolean;
31
- }
32
- /**
33
- * Whether usage reporting is on, and if not, the first reason that turns it
34
- * off. The order is the order of authority: the universal opt-out, then the
35
- * environment, then the saved setting, then whether this build can report at
36
- * all — so `sim telemetry status` names the reason the user can act on.
37
- */
38
- export declare function telemetryStatus({ env, state, configured }: TelemetryStatusInput): TelemetryStatus;
@@ -1,47 +0,0 @@
1
- /**
2
- * Two commands closer together than this belong to one session, the way the
3
- * Vercel and Supabase CLIs group them. Far above a person's pause between
4
- * commands and far below a lunch break, so a session reads as one sitting.
5
- */
6
- export declare const SESSION_IDLE_MS: number;
7
- declare const STATE_VERSION = 1;
8
- export interface TelemetrySession {
9
- id: string;
10
- /** When the last command in this session ran, for the idle cutoff. */
11
- lastActiveAt: string;
12
- /** Commands recorded in this session so far; the next one is `sequence + 1`. */
13
- sequence: number;
14
- }
15
- export interface TelemetryState {
16
- /** Unknown versions are treated as absent. */
17
- version: typeof STATE_VERSION;
18
- /**
19
- * A random id for this installation, minted the first time telemetry runs.
20
- * It ties one device's commands together and nothing else: it is not derived
21
- * from hardware, the account, or the network.
22
- */
23
- deviceId: string;
24
- /** `false` after `sim telemetry disable`; absent or `true` otherwise. */
25
- enabled?: boolean;
26
- /** When the first-run notice was printed; absent until it has been. */
27
- noticeShownAt?: string;
28
- session?: TelemetrySession;
29
- }
30
- /**
31
- * The persisted state, or `null` when there is none worth trusting.
32
- *
33
- * Validated field by field: the file is the user's to edit or corrupt, and a
34
- * document that fails validation is replaced rather than repaired, so a bad
35
- * `deviceId` never leaks into an event.
36
- */
37
- export declare function readTelemetryState(path?: string): TelemetryState | null;
38
- /** The persisted state, or a fresh one when there is none. */
39
- export declare function loadTelemetryState(path?: string): TelemetryState;
40
- export declare function writeTelemetryState(state: TelemetryState, path?: string): void;
41
- /**
42
- * The session the next command belongs to: the current one, advanced by one,
43
- * when it was active within {@link SESSION_IDLE_MS}; otherwise a new one. A
44
- * clock that moved backwards reads as idle, which only starts a new session.
45
- */
46
- export declare function nextSession(state: TelemetryState, now: Date): TelemetrySession;
47
- export {};
@@ -1,47 +0,0 @@
1
- import { type ChildProcess } from 'node:child_process';
2
- export declare const DEFAULT_INGEST_HOST = "https://us.i.posthog.com";
3
- export interface IngestTarget {
4
- key: string;
5
- host: string;
6
- }
7
- /**
8
- * The destination this build was made with, if any. The key is a PostHog
9
- * project token — a public, write-only value — baked into the published build
10
- * by `bun build --env='SIM_CLI_TELEMETRY_*'` the way the Supabase CLI injects
11
- * its own at link time. A checkout built without one has no destination and
12
- * reports nothing, and a self-hosted deployment can point its own build at its
13
- * own project.
14
- *
15
- * Both reads must stay literal `process.env.<NAME>` expressions, the only form
16
- * the bundler substitutes. They are made on each call rather than at module
17
- * load so that, unbundled, the answer follows the environment a caller set.
18
- */
19
- export declare function builtInIngestTarget(): IngestTarget | undefined;
20
- /** One event in the shape PostHog's capture endpoint accepts. */
21
- export interface CaptureRequest<Properties extends object = Record<string, unknown>> {
22
- api_key: string;
23
- event: string;
24
- distinct_id: string;
25
- timestamp: string;
26
- properties: Properties;
27
- }
28
- export type SpawnSender = (command: string, args: readonly string[], options: {
29
- detached: boolean;
30
- env: NodeJS.ProcessEnv;
31
- stdio: 'ignore';
32
- windowsHide: boolean;
33
- }) => Pick<ChildProcess, 'unref' | 'once'>;
34
- /**
35
- * Sends one event from a process whose lifetime is its own.
36
- *
37
- * The command has finished and the user has their prompt back; nothing about
38
- * delivery should change that. An in-process request would keep the event loop
39
- * alive for as long as the network took to answer — a DNS lookup on a dead
40
- * network cannot be cancelled at all — so the request is made by a detached
41
- * child that the parent does not wait for, the way the GitHub and Vercel CLIs
42
- * send theirs. The child bounds its own life with a deadline. The request
43
- * travels in the child's environment rather than on argv because the
44
- * environment is handed over at spawn time, so the parent can exit at once
45
- * without a pipe left half-written.
46
- */
47
- export declare function sendCapture(target: IngestTarget, request: CaptureRequest<object>, spawnSender?: SpawnSender): void;
@@ -1,15 +0,0 @@
1
- import type { ReadStream } from 'node:tty';
2
- import { SimApiError } from '../http/client';
3
- /**
4
- * Raised when the user abandons the prompt with Ctrl-C or Ctrl-D, so the caller
5
- * can exit 130 rather than folding an abort into the generic failure code.
6
- */
7
- export declare class SecretInputCancelledError extends SimApiError {
8
- constructor();
9
- }
10
- interface SecretOutput {
11
- write(value: string): unknown;
12
- }
13
- /** Reads a secret from a TTY while rendering one mask character per entered character. */
14
- export declare function promptSecret(input?: ReadStream, output?: SecretOutput): Promise<string>;
15
- export {};
@@ -1,7 +0,0 @@
1
- import type { Command } from 'commander';
2
- /**
3
- * Anything the CLI can explain prints as one line and exits with its code. A
4
- * failure is reported here, where its class and code are known; every other
5
- * way the process ends is reported from the exit listener telemetry installs.
6
- */
7
- export declare function runTerminalCli(suppliedProgram?: Command): Promise<void>;
@@ -1,16 +0,0 @@
1
- import { type EmbedContext } from '../embed-context';
2
- /** Both positional file spellings address the caller's same path. */
3
- export declare function embeddedFileKey(path: string): string;
4
- /**
5
- * An embedded run executes in-process on the hosting server, so a positional path must
6
- * never reach the server's filesystem. Only the caller-provided file reader may
7
- * resolve it; missing capabilities and read failures stay explicit.
8
- */
9
- export declare function embeddedFileContent(embedded: EmbedContext, path: string): Promise<string | Uint8Array<ArrayBuffer>>;
10
- export declare function contentTypeFor(name: string): string;
11
- export interface LocalFile {
12
- name: string;
13
- size: number;
14
- }
15
- /** Validates the size and name shared by every local-file transfer. */
16
- export declare function localFile(path: string, override?: string): Promise<LocalFile>;
@@ -1,16 +0,0 @@
1
- /** One forward-only file stream shared by a PUT or successive multipart requests. */
2
- export declare class StreamingUpload {
3
- private readonly size;
4
- private position;
5
- private pending;
6
- private closed;
7
- private readonly reader;
8
- private readonly onAbort;
9
- private readonly stopped;
10
- readonly signal: AbortSignal;
11
- constructor(stream: ReadableStream<Uint8Array>, size: number, signal?: AbortSignal);
12
- slice(start: number, end: number): ReadableStream<Uint8Array>;
13
- assertConsumed(end: number): void;
14
- verifyComplete(): Promise<void>;
15
- close(): Promise<void>;
16
- }
@@ -1,18 +0,0 @@
1
- import { SimClient } from '../http/client';
2
- export type UploadTransfer = {
3
- method: 'put';
4
- url: string;
5
- headers: Record<string, string>;
6
- } | {
7
- method: 'multipart';
8
- partSize: number;
9
- partCount: number;
10
- };
11
- export interface UploadSession {
12
- basePath: string;
13
- uploadToken: string;
14
- transfer: UploadTransfer;
15
- size: number;
16
- }
17
- /** Uploads and completes a signed transfer, aborting its session if the transfer fails. */
18
- export declare function finishUploadSession<T>(client: SimClient, workspaceId: string, session: UploadSession, path: string): Promise<T>;
@@ -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
- * Registry and cache failures suppress the courtesy notice. Installation only
10
- * happens when the user explicitly runs `sim update`.
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 {};
@@ -1,20 +0,0 @@
1
- export declare class CliUpdateError extends Error {
2
- }
3
- declare const PACKAGE_MANAGERS: readonly ['npm', 'pnpm', 'bun', 'yarn'];
4
- export type PackageManager = (typeof PACKAGE_MANAGERS)[number];
5
- interface PackageManagerOptions {
6
- env: NodeJS.ProcessEnv;
7
- capture: boolean;
8
- }
9
- type RunPackageManager = (manager: PackageManager, args: string[], options: PackageManagerOptions) => Promise<string>;
10
- interface InstallUpdateOptions {
11
- modulePath?: string;
12
- env?: NodeJS.ProcessEnv;
13
- currentVersion?: string;
14
- packageManager?: PackageManager;
15
- run?: RunPackageManager;
16
- write?: (message: string) => void;
17
- }
18
- /** Updates the verified global installation and reports the version actually installed. */
19
- export declare function installUpdate(options?: InstallUpdateOptions): Promise<void>;
20
- export {};
package/dist/version.d.ts DELETED
@@ -1,10 +0,0 @@
1
- export declare function cliVersion(): string;
2
- /**
3
- * Identifies the CLI to the API, the way every other terminal client does.
4
- *
5
- * Without it a CLI request is indistinguishable from any other API traffic, so
6
- * a bug that only reproduces on one CLI version cannot be found in the server's
7
- * own logs. The runtime and platform ride along for the same reason: they are
8
- * the first things asked about a transport failure that only some users see.
9
- */
10
- export declare function userAgent(): string;