@minato-aqukin/autodl-cli 0.1.2 → 0.2.0
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 +61 -6
- package/README.zh-CN.md +55 -5
- package/dist/{app-3QXI65BE.js → app-V5GCG3MC.js} +1641 -208
- package/dist/chunk-2E2Y5GFH.js +1704 -0
- package/dist/{chunk-6QR4ZYQR.js → chunk-GHJVQKKC.js} +78 -32
- package/dist/{chunk-DLCDJE6I.js → chunk-JOOIUQLJ.js} +4 -4
- package/dist/{chunk-BMKVXRT7.js → chunk-MWYYK755.js} +4 -4
- package/dist/{chunk-NBWWTYSL.js → chunk-VEDMEYCW.js} +2 -2
- package/dist/{chunk-GJGHX55T.js → chunk-WN2CXPD2.js} +2 -2
- package/dist/cli.js +289 -22
- package/dist/index.d.ts +11 -2
- package/dist/index.js +6 -4
- package/dist/{tui-2JGNYYRA.js → tui-ZT5ZBVSQ.js} +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -745,7 +745,7 @@ interface ConnectOptions extends CredentialOptions {
|
|
|
745
745
|
connectAttempts?: number;
|
|
746
746
|
}
|
|
747
747
|
/**
|
|
748
|
-
* The single funnel for every SSH operation.
|
|
748
|
+
* The single funnel for every one-shot SSH operation.
|
|
749
749
|
*
|
|
750
750
|
* Each attempt re-reads the credentials, which covers both ways a connection can fail:
|
|
751
751
|
* the port may have been reassigned since the snapshot was taken, and sshd may simply
|
|
@@ -753,6 +753,15 @@ interface ConnectOptions extends CredentialOptions {
|
|
|
753
753
|
* second only by waiting — so attempts are spaced out rather than fired back to back.
|
|
754
754
|
*/
|
|
755
755
|
declare function withSSH<T>(client: AutoDLClient, uuid: string, fn: (conn: Client, creds: SSHCredentials) => Promise<T>, options?: ConnectOptions): Promise<T>;
|
|
756
|
+
/**
|
|
757
|
+
* Build one authenticated connection and hand ownership to the caller.
|
|
758
|
+
*
|
|
759
|
+
* Same retry policy as `withSSH` (fresh credentials per attempt, spaced retries
|
|
760
|
+
* for sshd-not-up-yet and port reassignment), except nothing is closed: the
|
|
761
|
+
* caller MUST eventually call `conn.end()`. Used for the file view's reusable
|
|
762
|
+
* browsing connection; one-shot operations should keep using `withSSH`.
|
|
763
|
+
*/
|
|
764
|
+
declare function connectSSH(client: AutoDLClient, uuid: string, options?: ConnectOptions): Promise<Client>;
|
|
756
765
|
|
|
757
766
|
/**
|
|
758
767
|
* Interactive login hands off to the system `ssh` binary rather than ssh2: the user
|
|
@@ -945,4 +954,4 @@ interface RunResult {
|
|
|
945
954
|
*/
|
|
946
955
|
declare function runWorkflow(client: AutoDLClient, options: RunOptions): Promise<RunResult>;
|
|
947
956
|
|
|
948
|
-
export { AuthError, AutoDLClient, AutoDLError, BASE_IMAGES, type Balance, type BaseImage, BudgetError, type ClientOptions, type Context, type CreateInstanceInput, DEFAULT_BASE_IMAGE, DEFAULT_BASE_URL, type DeployOptions, type DeployResult, type ErrorCode, type ExecOptions, type ExecResult, ExitCode, GPU_SPECS, type GlobalOptions, type GpuSpec, type GpuStockEntry, type IdleOptions, type IdleResult, type Instance, type InstanceSnapshot, type InstanceStatus, NoStockError, NotFoundError, type Pagination, type ParsedRepo, type PrivateImage, REGIONS, type Region, type RegionChoice, type RegionStock, type RunOptions, type RunResult, type SSHCredentials, SSHError, type ServiceEndpoint, type StockQuery, type StockSnapshot, type StoredConfig, TimeoutError, type TransferOptions, type TransferSummary, UsageError, VERSION, type WaitOptions, armTTLOverSSH, assertBudget, assertStockRegion, buildServer, buildTTLSnippet, chooseRegions, composeStartCommand, connectInteractive, createContext, createInstance, deployWorkflow, disarmTTLOverSSH, estimateCost, execCommand, execOnConnection, findBaseImage, findInstance, findRegionsWithStock, formatCudaVersion, formatDuration, formatRate, formatSSHCommand, formatYuan, getBalance, getCredentials, getInstanceSnapshot, getInstanceStatus, getRegionGpuStock, getStockByRegion, listAllInstances, listInstancesPage, listPrivateImages, milliToYuan, normalizeBalance, normalizeInstance, normalizeSnapshot, parseCudaVersion, parseDuration, parseRepo, parseUtilisation, powerOffInstance, powerOnInstance, pull, push, readConfig, recordTTL, redactCredentials, redactSnapshot, redactToken, releaseInstance, resolveGitToken, resolveGpuSpec, resolveMinBalance, resolveRegion, resolveToken, runWorkflow, saveImage, setNfsMount, specForStockName, startMcpServer, sweepExpired, toAutoDLError, updateConfig, waitForRunning, waitForShutdown, waitForStatus, watchIdle, withCredentials, withSSH, writeConfig, yuanToMilli };
|
|
957
|
+
export { AuthError, AutoDLClient, AutoDLError, BASE_IMAGES, type Balance, type BaseImage, BudgetError, type ClientOptions, type Context, type CreateInstanceInput, DEFAULT_BASE_IMAGE, DEFAULT_BASE_URL, type DeployOptions, type DeployResult, type ErrorCode, type ExecOptions, type ExecResult, ExitCode, GPU_SPECS, type GlobalOptions, type GpuSpec, type GpuStockEntry, type IdleOptions, type IdleResult, type Instance, type InstanceSnapshot, type InstanceStatus, NoStockError, NotFoundError, type Pagination, type ParsedRepo, type PrivateImage, REGIONS, type Region, type RegionChoice, type RegionStock, type RunOptions, type RunResult, type SSHCredentials, SSHError, type ServiceEndpoint, type StockQuery, type StockSnapshot, type StoredConfig, TimeoutError, type TransferOptions, type TransferSummary, UsageError, VERSION, type WaitOptions, armTTLOverSSH, assertBudget, assertStockRegion, buildServer, buildTTLSnippet, chooseRegions, composeStartCommand, connectInteractive, connectSSH, createContext, createInstance, deployWorkflow, disarmTTLOverSSH, estimateCost, execCommand, execOnConnection, findBaseImage, findInstance, findRegionsWithStock, formatCudaVersion, formatDuration, formatRate, formatSSHCommand, formatYuan, getBalance, getCredentials, getInstanceSnapshot, getInstanceStatus, getRegionGpuStock, getStockByRegion, listAllInstances, listInstancesPage, listPrivateImages, milliToYuan, normalizeBalance, normalizeInstance, normalizeSnapshot, parseCudaVersion, parseDuration, parseRepo, parseUtilisation, powerOffInstance, powerOnInstance, pull, push, readConfig, recordTTL, redactCredentials, redactSnapshot, redactToken, releaseInstance, resolveGitToken, resolveGpuSpec, resolveMinBalance, resolveRegion, resolveToken, runWorkflow, saveImage, setNfsMount, specForStockName, startMcpServer, sweepExpired, toAutoDLError, updateConfig, waitForRunning, waitForShutdown, waitForStatus, watchIdle, withCredentials, withSSH, writeConfig, yuanToMilli };
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
startMcpServer,
|
|
21
21
|
watchIdle,
|
|
22
22
|
withCredentials
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MWYYK755.js";
|
|
24
24
|
import {
|
|
25
25
|
BASE_IMAGES,
|
|
26
26
|
DEFAULT_BASE_IMAGE,
|
|
@@ -40,10 +40,10 @@ import {
|
|
|
40
40
|
resolveRegion,
|
|
41
41
|
setNfsMount,
|
|
42
42
|
specForStockName
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-WN2CXPD2.js";
|
|
44
44
|
import {
|
|
45
45
|
createContext
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-VEDMEYCW.js";
|
|
47
47
|
import {
|
|
48
48
|
AuthError,
|
|
49
49
|
AutoDLClient,
|
|
@@ -59,6 +59,7 @@ import {
|
|
|
59
59
|
armTTLOverSSH,
|
|
60
60
|
buildTTLSnippet,
|
|
61
61
|
composeStartCommand,
|
|
62
|
+
connectSSH,
|
|
62
63
|
createInstance,
|
|
63
64
|
disarmTTLOverSSH,
|
|
64
65
|
estimateCost,
|
|
@@ -95,7 +96,7 @@ import {
|
|
|
95
96
|
withSSH,
|
|
96
97
|
writeConfig,
|
|
97
98
|
yuanToMilli
|
|
98
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-GHJVQKKC.js";
|
|
99
100
|
export {
|
|
100
101
|
AuthError,
|
|
101
102
|
AutoDLClient,
|
|
@@ -121,6 +122,7 @@ export {
|
|
|
121
122
|
chooseRegions,
|
|
122
123
|
composeStartCommand,
|
|
123
124
|
connectInteractive,
|
|
125
|
+
connectSSH,
|
|
124
126
|
createContext,
|
|
125
127
|
createInstance,
|
|
126
128
|
deployWorkflow,
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
assertInteractive,
|
|
6
6
|
launchTui,
|
|
7
7
|
registerTuiCommand
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-JOOIUQLJ.js";
|
|
9
|
+
import "./chunk-VEDMEYCW.js";
|
|
10
|
+
import "./chunk-GHJVQKKC.js";
|
|
11
11
|
export {
|
|
12
12
|
assertInteractive,
|
|
13
13
|
launchTui,
|
|
14
14
|
registerTuiCommand
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=tui-
|
|
16
|
+
//# sourceMappingURL=tui-ZT5ZBVSQ.js.map
|
package/package.json
CHANGED