@wrongstack/cli 1.0.24 → 1.0.27
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/data/providers.json +44 -0
- package/dist/{acp-AJWSKWE5.js → acp-M4565YUW.js} +33 -20
- package/dist/ascii-mode-SG4PRNLP.js +7 -0
- package/dist/{auth-GRBZ7Y3D.js → auth-TE55JF4Z.js} +14 -14
- package/dist/{bench-N5K7Z5O3.js → bench-GTLPM22B.js} +2 -2
- package/dist/boot/append-system-prompt.d.ts +10 -0
- package/dist/boot/ascii-mode.d.ts +12 -0
- package/dist/boot/container-wiring.d.ts +4 -2
- package/dist/boot/dispatch-singleshot.d.ts +12 -1
- package/dist/boot/dispatch-webui.d.ts +2 -0
- package/dist/boot/goal-tui-default.d.ts +10 -0
- package/dist/boot/mcp-config-flag.d.ts +22 -0
- package/dist/boot/piped-stdin.d.ts +40 -0
- package/dist/boot/restricted-mode.d.ts +15 -0
- package/dist/boot/safe-mode.d.ts +30 -0
- package/dist/boot/single-shot-budget.d.ts +30 -0
- package/dist/boot/stream-json.d.ts +36 -0
- package/dist/boot/structured-output.d.ts +16 -0
- package/dist/boot/system-prompt-builder.d.ts +2 -0
- package/dist/boot/tool-restriction-flags.d.ts +36 -0
- package/dist/boot/worktree-sessions.d.ts +21 -0
- package/dist/boot-provider-selection.d.ts +67 -0
- package/dist/boot.d.ts +1 -38
- package/dist/{chunk-LFMVHT3R.js → chunk-2ERX3RPN.js} +11 -13
- package/dist/chunk-4TVYGG6G.js +62 -0
- package/dist/chunk-5JYDKG5B.js +154 -0
- package/dist/{chunk-3VXYY5JC.js → chunk-5UZBUV2H.js} +3 -19
- package/dist/chunk-CZTXF6HY.js +140 -0
- package/dist/{chunk-DRM7PSW7.js → chunk-ENRYW73H.js} +527 -381
- package/dist/{chunk-SKPDE62W.js → chunk-EPR42SWM.js} +36 -6
- package/dist/{chunk-YBUCXXYZ.js → chunk-F5DCFAKI.js} +1 -1
- package/dist/chunk-HDMFKTT3.js +157 -0
- package/dist/{chunk-PGKJ2OQP.js → chunk-HFZH2XJN.js} +5 -5
- package/dist/chunk-HLSHFXTO.js +97 -0
- package/dist/{chunk-QFPQXKCG.js → chunk-KOEO4CJG.js} +21 -6
- package/dist/chunk-LBPLTTZ6.js +105 -0
- package/dist/{chunk-3OCUS3VN.js → chunk-LDCGZJTC.js} +4 -4
- package/dist/chunk-LKPEBZBE.js +143 -0
- package/dist/chunk-N57IU5FG.js +58 -0
- package/dist/{chunk-2EBVTYJR.js → chunk-NRXWOMK7.js} +17 -3
- package/dist/chunk-PZQBGUVZ.js +18 -0
- package/dist/{chunk-MHEBWVXL.js → chunk-Q4INH2DG.js} +46 -2
- package/dist/{chunk-5SEYGOCH.js → chunk-RDGGWMTI.js} +2 -2
- package/dist/{chunk-BLD5DSVA.js → chunk-RGFWGUAB.js} +27 -15
- package/dist/{chunk-ZZRSG7VK.js → chunk-RZ4ZDRYA.js} +3 -3
- package/dist/{chunk-S4FFHDJG.js → chunk-SDJCLEK6.js} +6 -2
- package/dist/{chunk-U46QR4WR.js → chunk-TI7KLHYX.js} +132 -3
- package/dist/chunk-X756ZS72.js +329 -0
- package/dist/{chunk-JF2MULWF.js → chunk-YHYINL47.js} +47 -15
- package/dist/{cli-context-34Q5IJRA.js → cli-context-C7RBSWHF.js} +434 -327
- package/dist/{cli-main-AELJDBGU.js → cli-main-TQTH73ZK.js} +2948 -2315
- package/dist/cli-update-notice.d.ts +2 -1
- package/dist/config-doctor.d.ts +1 -1
- package/dist/{diag-doctor-WIFJH3XH.js → diag-doctor-BIZAFIAT.js} +2 -2
- package/dist/{execution-PYC5FCS4.js → execution-3STBD2U7.js} +2167 -1831
- package/dist/execution-chimera-review.d.ts +18 -1
- package/dist/fleet/host-types.d.ts +3 -1
- package/dist/goal-commands.d.ts +47 -0
- package/dist/goal-host.d.ts +1 -14
- package/dist/{hq-JTUTFI4L.js → hq-44F4OQH2.js} +9 -8
- package/dist/hq-fleet-control.d.ts +36 -0
- package/dist/hq-live-status.d.ts +22 -0
- package/dist/hq-publisher.d.ts +18 -0
- package/dist/hq-server/routes/command-handlers.d.ts +12 -1
- package/dist/hq-server/routes/data-handlers.d.ts +1 -1
- package/dist/hq-server/socket-credentials.d.ts +63 -0
- package/dist/hq-server/upgrade-handler.d.ts +2 -0
- package/dist/hq-server/ws.d.ts +24 -0
- package/dist/{hq-server-PC7GZMPT.js → hq-server-UIB24LU6.js} +2 -2
- package/dist/{hq-service-NW56MUP2.js → hq-service-BMMJAHRT.js} +4 -4
- package/dist/import-claude-code-AYG24RG2.js +268 -0
- package/dist/index.js +12 -8
- package/dist/live-settings-input.d.ts +1 -0
- package/dist/{mailbox-serve-WDOCH6KR.js → mailbox-serve-GNGXEQ2R.js} +3 -3
- package/dist/{modeldiag-36OGAL5C.js → modeldiag-W7XAE625.js} +9 -9
- package/dist/{per-subcommand-help-XE77MTGJ.js → per-subcommand-help-QDAQASPZ.js} +2 -2
- package/dist/permission-prompt.d.ts +14 -0
- package/dist/permission-rules-view.d.ts +18 -0
- package/dist/{permissions-CFDLXETM.js → permissions-PL27UHYD.js} +67 -45
- package/dist/{plugin-usage-S5LVGMBW.js → plugin-usage-CIGOOTX3.js} +2 -2
- package/dist/{plugins-RHBIVLI7.js → plugins-HQTXUD6A.js} +4 -2
- package/dist/preflight.d.ts +1 -1
- package/dist/{projects-LMNAGGEU.js → projects-T4CZCA25.js} +3 -6
- package/dist/provider-helpers.d.ts +7 -11
- package/dist/{providers-models-2CFG46RD.js → providers-models-5Z2PJTEW.js} +5 -5
- package/dist/release-asset-download.d.ts +10 -0
- package/dist/release-attestation.d.ts +28 -0
- package/dist/remote/remote-session.d.ts +64 -0
- package/dist/remote/remote-target.d.ts +69 -0
- package/dist/remote-GB5VXCCT.js +576 -0
- package/dist/{replay-Z3FTJEMM.js → replay-DEI566CW.js} +2 -2
- package/dist/services/commit-message.d.ts +2 -1
- package/dist/session-move-P2EC2COA.js +44 -0
- package/dist/session-move.d.ts +20 -0
- package/dist/session-stats.d.ts +10 -0
- package/dist/{sessions-config-IQUH2GXT.js → sessions-config-XHLXJ5C3.js} +109 -10
- package/dist/short-circuit-flags-5TNTJPQR.js +10 -0
- package/dist/slash-commands/command-context.d.ts +15 -5
- package/dist/slash-commands/goal-refiner.d.ts +4 -49
- package/dist/slash-commands/mcp.d.ts +2 -1
- package/dist/slash-commands/permissions.d.ts +4 -0
- package/dist/slash-commands/settings-context-mutations.d.ts +5 -0
- package/dist/slash-commands/settings-limits-mutations.d.ts +12 -0
- package/dist/slash-commands/theme.d.ts +15 -1
- package/dist/standalone-auto-update-TOTRGCSA.js +249 -0
- package/dist/standalone-auto-update.d.ts +65 -0
- package/dist/standalone-update-LZO3MNLH.js +24 -0
- package/dist/standalone-update.d.ts +37 -1
- package/dist/subcommands/handlers/import-claude-code.d.ts +52 -0
- package/dist/subcommands/handlers/permissions.d.ts +9 -3
- package/dist/subcommands/handlers/remote.d.ts +6 -0
- package/dist/subcommands/handlers/sessions-fleet.d.ts +0 -12
- package/dist/subcommands/handlers/version-help.d.ts +5 -0
- package/dist/{subcommands-ZTSIN7LG.js → subcommands-BHQYLDSD.js} +2 -2
- package/dist/tui-resume-callback.d.ts +18 -0
- package/dist/{typesafe-HVEVPA6R.js → typesafe-U7YB2RRV.js} +5 -5
- package/dist/{typesafe-topic-replay-4W73BOLV.js → typesafe-topic-replay-ZILIU3WS.js} +18 -2
- package/dist/{update-7XIOEXTD.js → update-TDZX4IL2.js} +4 -4
- package/dist/{update-check-2POMBHFB.js → update-check-J5ZVKS73.js} +3 -3
- package/dist/version-JB2UAV2A.js +11 -0
- package/dist/version-help-XJJQ7YSH.js +10 -0
- package/dist/webui-server/route-contexts.d.ts +1 -1
- package/dist/webui-server/session-start-payload.d.ts +5 -1
- package/dist/{webui-server-L2SICPTB.js → webui-server-GCXIO3JY.js} +515 -365
- package/dist/webui-server-lifecycle.d.ts +57 -0
- package/dist/webui-server-options.d.ts +10 -0
- package/dist/webui-server.d.ts +0 -14
- package/dist/wiring/brain-and-orchestration.d.ts +3 -1
- package/dist/wiring/cli-prompt-and-tools-setup.d.ts +9 -0
- package/dist/wiring/cli-slash-commands-setup.d.ts +1 -0
- package/dist/wiring/command-host-state.d.ts +2 -0
- package/dist/wiring/hq-telemetry.d.ts +12 -0
- package/dist/wiring/lifecycle-plugins.d.ts +4 -2
- package/dist/wiring/metrics.d.ts +9 -1
- package/dist/wiring/pipeline.d.ts +2 -7
- package/dist/wiring/plugins.d.ts +3 -0
- package/dist/wiring/provider-status.d.ts +1 -0
- package/dist/wiring/provider-utility-tools.d.ts +3 -1
- package/package.json +29 -28
- package/dist/chunk-2BKFWIER.js +0 -98
- package/dist/chunk-424ORSE7.js +0 -56
- package/dist/chunk-OWNC7LMD.js +0 -78
- package/dist/chunk-QBBF7GIK.js +0 -65
- package/dist/short-circuit-flags-SDT53OML.js +0 -10
- package/dist/standalone-update-MW47J3AK.js +0 -164
- package/dist/version-help-WZ623NWM.js +0 -10
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
// src/subcommands/handlers/projects.ts
|
|
3
|
+
import { color } from "@wrongstack/core/utils";
|
|
3
4
|
import * as fs from "node:fs/promises";
|
|
4
5
|
import * as path from "node:path";
|
|
5
|
-
import { color } from "@wrongstack/core/utils";
|
|
6
6
|
var projectsCmd = async (_args, deps) => {
|
|
7
7
|
const manifestPath = path.join(deps.paths.globalRoot, "projects.json");
|
|
8
8
|
let entries;
|
|
@@ -18,10 +18,7 @@ var projectsCmd = async (_args, deps) => {
|
|
|
18
18
|
return 0;
|
|
19
19
|
}
|
|
20
20
|
const sorted = [...entries].sort((a, b) => (b.lastSeen ?? "").localeCompare(a.lastSeen ?? ""));
|
|
21
|
-
const slugWidth = Math.min(
|
|
22
|
-
Math.max(...sorted.map((entry) => (entry.slug ?? "").length), 4),
|
|
23
|
-
40
|
|
24
|
-
);
|
|
21
|
+
const slugWidth = Math.min(Math.max(...sorted.map((entry) => (entry.slug ?? "").length), 4), 40);
|
|
25
22
|
for (const entry of sorted) {
|
|
26
23
|
const slug = (entry.slug ?? "?").padEnd(slugWidth);
|
|
27
24
|
const seen = entry.lastSeen ?? "";
|
|
@@ -33,4 +30,4 @@ var projectsCmd = async (_args, deps) => {
|
|
|
33
30
|
export {
|
|
34
31
|
projectsCmd
|
|
35
32
|
};
|
|
36
|
-
//# sourceMappingURL=projects-
|
|
33
|
+
//# sourceMappingURL=projects-T4CZCA25.js.map
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared provider-config helpers used by the picker, main boot sequence,
|
|
3
|
+
* and subcommands. Keeps provider key detection and alias resolution in
|
|
4
|
+
* one place so the logic doesn't drift between call sites.
|
|
5
|
+
*/
|
|
6
|
+
import { isKeylessLocalProvider } from '@wrongstack/core/models';
|
|
1
7
|
import type { Config, ModelsRegistry, ProviderConfig, ResolvedProvider } from '@wrongstack/core/types';
|
|
8
|
+
export { isKeylessLocalProvider };
|
|
2
9
|
/** Return the provider's visible model ids: models.dev plus anything the saved
|
|
3
10
|
* config names that the catalog does not carry.
|
|
4
11
|
*
|
|
@@ -23,17 +30,6 @@ import type { Config, ModelsRegistry, ProviderConfig, ResolvedProvider } from '@
|
|
|
23
30
|
* request time rather than being silently unselectable, which is the better
|
|
24
31
|
* failure: visible and actionable. */
|
|
25
32
|
export declare function visibleModelIds(providerId: string, config: Config, catalogModelIds: string[], cfg?: ProviderConfig | undefined): string[];
|
|
26
|
-
/**
|
|
27
|
-
* Is this a keyless local gateway — a server on a loopback address that
|
|
28
|
-
* declares no API-key env vars (omniroute, LiteLLM/vLLM/LM Studio/Ollama
|
|
29
|
-
* running locally, …)? These need no credential, so they belong in the
|
|
30
|
-
* picker even though `hasApiKey` returns false for them. Accepts the
|
|
31
|
-
* minimal shape both call sites can supply.
|
|
32
|
-
*/
|
|
33
|
-
export declare function isKeylessLocalProvider(provider: {
|
|
34
|
-
apiBase?: string | undefined;
|
|
35
|
-
envVars?: string[] | undefined;
|
|
36
|
-
}): boolean;
|
|
37
33
|
/**
|
|
38
34
|
* Does this provider have an API key available — either in the
|
|
39
35
|
* environment (via one of its known env vars) or stored in config
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
visibleModelIds
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
activeProfileConfigPath
|
|
6
|
-
} from "./chunk-YMXXOOFN.js";
|
|
3
|
+
} from "./chunk-5UZBUV2H.js";
|
|
7
4
|
import {
|
|
8
5
|
mutateConfigProviders
|
|
9
6
|
} from "./chunk-LUMETJFO.js";
|
|
7
|
+
import {
|
|
8
|
+
activeProfileConfigPath
|
|
9
|
+
} from "./chunk-YMXXOOFN.js";
|
|
10
10
|
|
|
11
11
|
// src/subcommands/handlers/providers-models.ts
|
|
12
12
|
import * as fs from "node:fs/promises";
|
|
@@ -670,4 +670,4 @@ export {
|
|
|
670
670
|
modelsCmd,
|
|
671
671
|
providersCmd
|
|
672
672
|
};
|
|
673
|
-
//# sourceMappingURL=providers-models-
|
|
673
|
+
//# sourceMappingURL=providers-models-5Z2PJTEW.js.map
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
/** Download one release asset without buffering beyond its configured ceiling. */
|
|
2
2
|
export declare function downloadReleaseAsset(url: string, timeoutMs: number, maxBytes: number): Promise<Buffer>;
|
|
3
|
+
/**
|
|
4
|
+
* Stream one release asset into `file` (created exclusively) and return its
|
|
5
|
+
* SHA-256. The background self-update uses this so a 100+ MB executable never
|
|
6
|
+
* sits in the session's heap. `file` is removed when the download fails.
|
|
7
|
+
*/
|
|
8
|
+
export declare function downloadReleaseAssetToFile(url: string, file: string, options: {
|
|
9
|
+
timeoutMs: number;
|
|
10
|
+
maxBytes: number;
|
|
11
|
+
signal?: AbortSignal | undefined;
|
|
12
|
+
}): Promise<string>;
|
|
3
13
|
//# sourceMappingURL=release-asset-download.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build-provenance check for a downloaded standalone executable.
|
|
3
|
+
*
|
|
4
|
+
* SHA256SUMS comes from the same release as the binary, so it catches a
|
|
5
|
+
* corrupted download but not a forged one: whoever can upload the binary can
|
|
6
|
+
* upload a matching SHA256SUMS. The release workflow also attests every
|
|
7
|
+
* binary (`actions/attest-build-provenance`), and GitHub serves those
|
|
8
|
+
* attestations by digest. A binary is accepted only if one of them says this
|
|
9
|
+
* exact digest was built by `binaries.yml`, called from `release.yml`, for the
|
|
10
|
+
* push of the tag `v<version>` in this repository, on a GitHub-hosted runner.
|
|
11
|
+
* A build from a branch or a manual run is not a release and does not count.
|
|
12
|
+
*
|
|
13
|
+
* The Sigstore signature over the statement is not verified here: the
|
|
14
|
+
* statement is trusted as served by GitHub's API over TLS.
|
|
15
|
+
*/
|
|
16
|
+
/** GitHub repository the standalone executables are released from. */
|
|
17
|
+
export declare const RELEASES_REPO = "WrongStack/WrongStack";
|
|
18
|
+
export interface AttestationSubject {
|
|
19
|
+
/** Release asset name, e.g. `wstack-windows-x64.exe`. */
|
|
20
|
+
assetName: string;
|
|
21
|
+
/** Lowercase hex SHA-256 of the downloaded bytes. */
|
|
22
|
+
sha256: string;
|
|
23
|
+
/** Release version without the `v`, e.g. `1.0.25`. */
|
|
24
|
+
version: string;
|
|
25
|
+
}
|
|
26
|
+
/** Throws unless GitHub holds a release attestation for `subject`. */
|
|
27
|
+
export declare function verifyReleaseAttestation(subject: AttestationSubject, signal?: AbortSignal): Promise<void>;
|
|
28
|
+
//# sourceMappingURL=release-attestation.d.ts.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `wstack remote user@host:/path`: the agent, its tools and its project
|
|
3
|
+
* daemons run on the remote machine; the WebUI is opened locally through an
|
|
4
|
+
* SSH tunnel. WrongStack's own build is uploaded to the remote on first use
|
|
5
|
+
* (per version, next to nothing the user installed), the WebUI host is started
|
|
6
|
+
* detached so a dropped connection does not end it, and the tunnel is reopened
|
|
7
|
+
* when it drops.
|
|
8
|
+
*
|
|
9
|
+
* SSH is the system `ssh`, so the user's `~/.ssh/config`, agent and known
|
|
10
|
+
* hosts apply. Credentials are not copied: the remote WrongStack uses its own
|
|
11
|
+
* configuration, which the remote WebUI sets up like a local first run.
|
|
12
|
+
*
|
|
13
|
+
* @module remote/remote-session
|
|
14
|
+
*/
|
|
15
|
+
import { type ChildProcess } from 'node:child_process';
|
|
16
|
+
import type { Readable } from 'node:stream';
|
|
17
|
+
import { type RemoteTarget } from './remote-target.js';
|
|
18
|
+
export interface SshResult {
|
|
19
|
+
code: number;
|
|
20
|
+
stdout: string;
|
|
21
|
+
}
|
|
22
|
+
/** Runs one command on the remote host; `input` is its stdin. */
|
|
23
|
+
export type SshRunner = (remoteCommand: string, input: string | Readable) => Promise<SshResult>;
|
|
24
|
+
/** Opens the tunnel; the returned process lives as long as the tunnel does. */
|
|
25
|
+
export type TunnelOpener = (localPort: number, remotePort: number) => ChildProcess;
|
|
26
|
+
export interface RemoteBinary {
|
|
27
|
+
file: string;
|
|
28
|
+
/** Names the build on the remote machine. */
|
|
29
|
+
version: string;
|
|
30
|
+
}
|
|
31
|
+
export interface RemoteSessionOptions {
|
|
32
|
+
target: RemoteTarget;
|
|
33
|
+
/** Preferred local port for the WebUI (the next free one is used). */
|
|
34
|
+
localPort: number;
|
|
35
|
+
/** Leave the remote WebUI running after this command ends. */
|
|
36
|
+
keep: boolean;
|
|
37
|
+
open: boolean;
|
|
38
|
+
signal: AbortSignal;
|
|
39
|
+
log: (line: string) => void;
|
|
40
|
+
ssh: SshRunner;
|
|
41
|
+
tunnel: TunnelOpener;
|
|
42
|
+
/** The build for a remote `buildTarget` (`bun-linux-x64`, …); may download it. */
|
|
43
|
+
resolveBinary: (buildTarget: string, installed: readonly string[]) => Promise<RemoteBinary>;
|
|
44
|
+
openUrl?: ((url: string) => void) | undefined;
|
|
45
|
+
/** Waits before a reconnect attempt; injected in tests. */
|
|
46
|
+
sleep?: ((ms: number) => Promise<void>) | undefined;
|
|
47
|
+
/** How long the WebUI gets to answer through a new tunnel. */
|
|
48
|
+
readyTimeoutMs?: number | undefined;
|
|
49
|
+
}
|
|
50
|
+
export declare function sha256File(file: string): Promise<string>;
|
|
51
|
+
/** The first free port at or above `start` on the local loopback. */
|
|
52
|
+
export declare function freeLocalPort(start: number): Promise<number>;
|
|
53
|
+
export declare function runRemoteSession(opts: RemoteSessionOptions): Promise<number>;
|
|
54
|
+
export declare function systemSsh(target: RemoteTarget, options: {
|
|
55
|
+
sshConfig?: string | undefined;
|
|
56
|
+
batch: boolean;
|
|
57
|
+
}): {
|
|
58
|
+
run: SshRunner;
|
|
59
|
+
tunnel: TunnelOpener;
|
|
60
|
+
};
|
|
61
|
+
/** Cached download location for release builds. */
|
|
62
|
+
export declare function releaseCacheFile(root: string, version: string, assetName: string): string;
|
|
63
|
+
export declare function cachedFile(file: string): Promise<string | undefined>;
|
|
64
|
+
//# sourceMappingURL=remote-session.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pure half of `wstack remote`: where to connect, which build the remote
|
|
3
|
+
* machine needs, and the POSIX sh scripts run there. No process is started
|
|
4
|
+
* here, so all of it is testable without an SSH server.
|
|
5
|
+
*
|
|
6
|
+
* @module remote/remote-target
|
|
7
|
+
*/
|
|
8
|
+
export interface RemoteTarget {
|
|
9
|
+
/** What `ssh` connects to: `user@host`, `host`, or a `~/.ssh/config` alias. */
|
|
10
|
+
destination: string;
|
|
11
|
+
port?: number | undefined;
|
|
12
|
+
/** Project directory on the remote machine. */
|
|
13
|
+
path: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* `user@host:/path`, `host:~/path`, or `ssh://user@host:2222/path`. The path
|
|
17
|
+
* is required: it is the remote project the agent works in.
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseRemoteTarget(input: string): RemoteTarget;
|
|
20
|
+
/** One argument for a POSIX shell, single-quoted. */
|
|
21
|
+
export declare function shQuote(value: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* The build for a machine, from `uname -s`, `uname -m` and whether its libc is
|
|
24
|
+
* musl. Windows hosts are not supported: the remote scripts are POSIX sh.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildTargetFor(os: string, arch: string, musl: boolean): string;
|
|
27
|
+
export interface ProbeResult {
|
|
28
|
+
os: string;
|
|
29
|
+
arch: string;
|
|
30
|
+
musl: boolean;
|
|
31
|
+
pathExists: boolean;
|
|
32
|
+
/** Versions already installed under `~/.wrongstack/remote`. */
|
|
33
|
+
versions: string[];
|
|
34
|
+
/** A server a previous run left running for this path. */
|
|
35
|
+
server?: {
|
|
36
|
+
pid: number;
|
|
37
|
+
port: number;
|
|
38
|
+
version: string;
|
|
39
|
+
token: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
}
|
|
42
|
+
/** Reports the machine, the project path, the builds present and a running server. */
|
|
43
|
+
export declare function probeScript(path: string): string;
|
|
44
|
+
export declare function parseProbe(output: string): ProbeResult;
|
|
45
|
+
/** The remote file a version's build lives in. */
|
|
46
|
+
export declare function remoteBinaryPath(version: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* Receives a build on stdin, makes it executable, and prints its SHA-256 so
|
|
49
|
+
* the caller can compare it with what it sent. Run with `sh -c`.
|
|
50
|
+
*/
|
|
51
|
+
export declare function installScript(version: string): string;
|
|
52
|
+
/**
|
|
53
|
+
* Starts the WebUI host for `path` detached from the SSH session (a dropped
|
|
54
|
+
* connection must not end it), bound to the remote loopback only, and waits
|
|
55
|
+
* for it to report its port. The token travels inside this script, which is
|
|
56
|
+
* sent on stdin: it never appears on a command line another user can see.
|
|
57
|
+
*
|
|
58
|
+
* A remote machine WrongStack has not been set up on has no provider it can
|
|
59
|
+
* use; the host is then started in setup mode, and one is chosen in the WebUI.
|
|
60
|
+
*/
|
|
61
|
+
export declare function startScript(options: {
|
|
62
|
+
path: string;
|
|
63
|
+
version: string;
|
|
64
|
+
token: string;
|
|
65
|
+
preferredPort: number;
|
|
66
|
+
}): string;
|
|
67
|
+
/** Stops the server a start left for `path`, if it is still running. */
|
|
68
|
+
export declare function stopScript(path: string): string;
|
|
69
|
+
//# sourceMappingURL=remote-target.d.ts.map
|