@hearsay-tools/squawk 0.19.0-pr4591.9107 → 0.19.0-pr4592.9114
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/dist/contract/hosts.d.ts +47 -5
- package/dist/contract/index.js +19 -1
- package/dist/features/hosts/bootstrap.d.ts +120 -0
- package/dist/features/hosts/bootstrap.js +469 -0
- package/dist/features/hosts/bootstrap.js.map +1 -0
- package/dist/features/hosts/cli.d.ts +13 -3
- package/dist/features/hosts/cli.js +199 -27
- package/dist/features/hosts/cli.js.map +1 -1
- package/dist/features/hosts/host-actions.d.ts +56 -0
- package/dist/features/hosts/host-actions.js +367 -0
- package/dist/features/hosts/host-actions.js.map +1 -0
- package/dist/features/hosts/host-server-cli.js +21 -3
- package/dist/features/hosts/host-server-cli.js.map +1 -1
- package/dist/features/hosts/host-server.d.ts +10 -1
- package/dist/features/hosts/host-server.js +74 -0
- package/dist/features/hosts/host-server.js.map +1 -1
- package/dist/features/hosts/index.d.ts +4 -2
- package/dist/features/hosts/index.js +14 -2
- package/dist/features/hosts/index.js.map +1 -1
- package/dist/features/hosts/registry.d.ts +28 -0
- package/dist/features/hosts/registry.js +42 -1
- package/dist/features/hosts/registry.js.map +1 -1
- package/dist/features/hosts/routes.d.ts +5 -3
- package/dist/features/hosts/routes.js +14 -7
- package/dist/features/hosts/routes.js.map +1 -1
- package/dist/features/hosts/ssh.d.ts +85 -0
- package/dist/features/hosts/ssh.js +271 -0
- package/dist/features/hosts/ssh.js.map +1 -0
- package/dist/features/hosts/supervisor.d.ts +191 -0
- package/dist/features/hosts/supervisor.js +620 -0
- package/dist/features/hosts/supervisor.js.map +1 -0
- package/dist/features/hosts/tunnel.d.ts +46 -0
- package/dist/features/hosts/tunnel.js +244 -0
- package/dist/features/hosts/tunnel.js.map +1 -0
- package/dist/features/webhooks/routes.d.ts +13 -13
- package/package.json +4 -4
- package/web/dist/assets/{accounts-section-DL3fIJ3Y.js → accounts-section-qBZ5-RXj.js} +1 -1
- package/web/dist/assets/{activity-motion-nt1FXMrF.js → activity-motion-B9_5XF5v.js} +1 -1
- package/web/dist/assets/{activity-route-xVy2K_Fi.js → activity-route-DDL70lAh.js} +1 -1
- package/web/dist/assets/{agent-config-section-nFavGeR2.js → agent-config-section-BTaLvuxh.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-CN0pC4xG.js → agent-defaults-section-VLUss9RM.js} +1 -1
- package/web/dist/assets/{appearance-zGuTSgIy.js → appearance-T8z_1h0U.js} +1 -1
- package/web/dist/assets/{archive-on-merge-field-BaKNf-j4.js → archive-on-merge-field-B1evTz6G.js} +1 -1
- package/web/dist/assets/{ask-card-huOW3GMV.js → ask-card-Cy2wek5M.js} +1 -1
- package/web/dist/assets/{automations-route-GBaRU2IS.js → automations-route-CNJznv4j.js} +1 -1
- package/web/dist/assets/{commit-list-x-75vYko.js → commit-list-CXzSImbK.js} +1 -1
- package/web/dist/assets/{diff-Bhh_CAtI.js → diff-BQKKR814.js} +2 -2
- package/web/dist/assets/{diff-controls-BOnMrLuP.js → diff-controls-C8_X3pGh.js} +1 -1
- package/web/dist/assets/{diff-view-DiPeQi9D.js → diff-view-DG1UPpcV.js} +1 -1
- package/web/dist/assets/{discard-changes-dialog-BMofaFwH.js → discard-changes-dialog-BwiG6PUl.js} +1 -1
- package/web/dist/assets/{file-preview-ChwOU1Uc.js → file-preview-DXFAfzRZ.js} +1 -1
- package/web/dist/assets/{git-toolbar-BdhjSQLm.js → git-toolbar-DMwDBZHQ.js} +1 -1
- package/web/dist/assets/{github-DqXXUCBy.js → github-tms-xpXp.js} +1 -1
- package/web/dist/assets/{global-activity-route-CZJRu2G1.js → global-activity-route-BZVh2SuF.js} +1 -1
- package/web/dist/assets/{index-CbSPKU4g.js → index-By89A7EE.js} +4 -4
- package/web/dist/assets/index-CMmxKxy6.css +1 -0
- package/web/dist/assets/{markdown-DMFXz4xY.js → markdown-SnVO2DaH.js} +1 -1
- package/web/dist/assets/{option-select-Cq_bhgu6.js → option-select-DsG7Q73v.js} +1 -1
- package/web/dist/assets/{preferences-section-CHhUi72X.js → preferences-section-Da9B4Z8D.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-DH9rjYI7.js → preview-pane-connected-CdgEdzP5.js} +1 -1
- package/web/dist/assets/{project-location-CSXt_Yk6.js → project-location-RZjKydrb.js} +1 -1
- package/web/dist/assets/{projects-section-CSBdiEM-.js → projects-section-C_sYrdIT.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-DaJbpROr.js → prompt-templates-section-CjgNc9ZO.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-Chx8LxP6.js → remote-settings-notice-D9VYD4by.js} +1 -1
- package/web/dist/assets/{repo-git-D8Sn_897.js → repo-git-CD5G34tp.js} +1 -1
- package/web/dist/assets/{report-reader-Ccymt9jp.js → report-reader-DtEXo7Fw.js} +1 -1
- package/web/dist/assets/{reports-GvAw7DYA.js → reports-B9Cs-YvK.js} +1 -1
- package/web/dist/assets/{resources-section-BWqoBxtC.js → resources-section-CcKLIO4H.js} +1 -1
- package/web/dist/assets/{review-notes-drafts-BKzyNpXo.js → review-notes-drafts-BI4aCHM1.js} +1 -1
- package/web/dist/assets/{review-panel-DxAlY6hQ.js → review-panel-B0Oa_Lws.js} +1 -1
- package/web/dist/assets/{review-strip-QDKNuOm9.js → review-strip-D1N_qYlD.js} +1 -1
- package/web/dist/assets/run-header-BC8OtX85.js +2 -0
- package/web/dist/assets/{select-DVQEFrtF.js → select-BQDojwao.js} +1 -1
- package/web/dist/assets/{session-context-section-YxCcDlRl.js → session-context-section-BvdzKbKF.js} +1 -1
- package/web/dist/assets/{settings-agent-picker-CDyluV99.js → settings-agent-picker-CHuJTKf-.js} +1 -1
- package/web/dist/assets/{settings-save-bar-CMJaZn_P.js → settings-save-bar-BA7OrIIE.js} +1 -1
- package/web/dist/assets/{settings-shell-DHVB7FYt.js → settings-shell-CGYHUMju.js} +1 -1
- package/web/dist/assets/{sidebar-section-hphp-63V.js → sidebar-section-BTuFmolj.js} +1 -1
- package/web/dist/assets/{skills-BlHcP8uc.js → skills-CPIJ4Uwy.js} +1 -1
- package/web/dist/assets/{task-changes-DWMFWq5g.js → task-changes-oDqYSSbu.js} +1 -1
- package/web/dist/assets/{task-commits-q5Cn_tdG.js → task-commits-C9xXuud1.js} +1 -1
- package/web/dist/assets/{task-file-scope-BKjO7lKK.js → task-file-scope-DqKm-YPL.js} +1 -1
- package/web/dist/assets/{task-files-DbRJAKAg.js → task-files-B-cW59Yz.js} +1 -1
- package/web/dist/assets/{task-github-item-DV6uUcx2.js → task-github-item-BEdp-0M2.js} +1 -1
- package/web/dist/assets/{task-thread-05LMMzIs.js → task-thread-BDXrjYe2.js} +1 -1
- package/web/dist/assets/{thread-state-uf_28v2G.js → thread-state-C0pmupBX.js} +1 -1
- package/web/dist/assets/{use-finish-run-BsTPLn1d.js → use-finish-run-DmmQCQGl.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-DyjrAs-3.js → use-hand-to-agent-state-D-5nky1R.js} +1 -1
- package/web/dist/assets/use-path-bases-CyQIGumQ.js +1 -0
- package/web/dist/assets/{workflows-B5xr64g0.js → workflows-BUonf3es.js} +1 -1
- package/web/dist/assets/{workspace-tools-DGlrX2Uj.js → workspace-tools-BUUqNxd8.js} +1 -1
- package/web/dist/assets/{worktrees-section-D2bbdi3Y.js → worktrees-section-CUsYktyM.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-CSgBel_0.css +0 -1
- package/web/dist/assets/run-header-BS7SXYup.js +0 -2
- package/web/dist/assets/use-path-bases-hbJkikc4.js +0 -1
package/dist/contract/hosts.d.ts
CHANGED
|
@@ -18,16 +18,23 @@ export declare const hostPortSchema: z.ZodNumber;
|
|
|
18
18
|
/** Derive the default host id from an SSH alias (lowercased, non-alphanumeric runs to `-`, max 32). */
|
|
19
19
|
export declare function slugHostId(sshAlias: string): string;
|
|
20
20
|
/**
|
|
21
|
-
* Host states
|
|
22
|
-
* (`connecting`, `connected`, `unreachable`, `needs-node`, `version-mismatch`, `not-hosted`,
|
|
23
|
-
* `identity-changed`, `several-servers`, `paused`, `cannot-persist`).
|
|
21
|
+
* Host states (spec § 6, hearsay-tools/squawk#4539).
|
|
24
22
|
*/
|
|
25
|
-
export declare const HOST_STATES: readonly ['unreachable'];
|
|
23
|
+
export declare const HOST_STATES: readonly ['connecting', 'connected', 'unreachable', 'needs-node', 'version-mismatch', 'not-hosted', 'identity-changed', 'several-servers', 'paused', 'cannot-persist'];
|
|
26
24
|
export declare const hostStateSchema: z.ZodEnum<{
|
|
25
|
+
"cannot-persist": "cannot-persist";
|
|
26
|
+
connected: "connected";
|
|
27
|
+
connecting: "connecting";
|
|
28
|
+
"identity-changed": "identity-changed";
|
|
29
|
+
"needs-node": "needs-node";
|
|
30
|
+
"not-hosted": "not-hosted";
|
|
31
|
+
paused: "paused";
|
|
32
|
+
"several-servers": "several-servers";
|
|
27
33
|
unreachable: "unreachable";
|
|
34
|
+
"version-mismatch": "version-mismatch";
|
|
28
35
|
}>;
|
|
29
36
|
export type HostState = z.infer<typeof hostStateSchema>;
|
|
30
|
-
/** Default unreachable reason
|
|
37
|
+
/** Default unreachable reason before the supervisor has connected to a host. */
|
|
31
38
|
export declare const HOST_NOT_CONNECTED_REASON = "not connected yet";
|
|
32
39
|
/** Saved host entry in `<config>/hosts.json` (spec § Architecture 1). */
|
|
33
40
|
export declare const hostEntrySchema: z.ZodObject<{
|
|
@@ -63,7 +70,16 @@ export declare const hostSummarySchema: z.ZodObject<{
|
|
|
63
70
|
id: z.ZodString;
|
|
64
71
|
label: z.ZodString;
|
|
65
72
|
state: z.ZodEnum<{
|
|
73
|
+
"cannot-persist": "cannot-persist";
|
|
74
|
+
connected: "connected";
|
|
75
|
+
connecting: "connecting";
|
|
76
|
+
"identity-changed": "identity-changed";
|
|
77
|
+
"needs-node": "needs-node";
|
|
78
|
+
"not-hosted": "not-hosted";
|
|
79
|
+
paused: "paused";
|
|
80
|
+
"several-servers": "several-servers";
|
|
66
81
|
unreachable: "unreachable";
|
|
82
|
+
"version-mismatch": "version-mismatch";
|
|
67
83
|
}>;
|
|
68
84
|
reason: z.ZodOptional<z.ZodString>;
|
|
69
85
|
kind: z.ZodOptional<z.ZodLiteral<"ssh">>;
|
|
@@ -83,7 +99,16 @@ export declare const hostsListResponseSchema: z.ZodObject<{
|
|
|
83
99
|
id: z.ZodString;
|
|
84
100
|
label: z.ZodString;
|
|
85
101
|
state: z.ZodEnum<{
|
|
102
|
+
"cannot-persist": "cannot-persist";
|
|
103
|
+
connected: "connected";
|
|
104
|
+
connecting: "connecting";
|
|
105
|
+
"identity-changed": "identity-changed";
|
|
106
|
+
"needs-node": "needs-node";
|
|
107
|
+
"not-hosted": "not-hosted";
|
|
108
|
+
paused: "paused";
|
|
109
|
+
"several-servers": "several-servers";
|
|
86
110
|
unreachable: "unreachable";
|
|
111
|
+
"version-mismatch": "version-mismatch";
|
|
87
112
|
}>;
|
|
88
113
|
reason: z.ZodOptional<z.ZodString>;
|
|
89
114
|
kind: z.ZodOptional<z.ZodLiteral<"ssh">>;
|
|
@@ -122,7 +147,16 @@ export declare const hostResponseSchema: z.ZodObject<{
|
|
|
122
147
|
id: z.ZodString;
|
|
123
148
|
label: z.ZodString;
|
|
124
149
|
state: z.ZodEnum<{
|
|
150
|
+
"cannot-persist": "cannot-persist";
|
|
151
|
+
connected: "connected";
|
|
152
|
+
connecting: "connecting";
|
|
153
|
+
"identity-changed": "identity-changed";
|
|
154
|
+
"needs-node": "needs-node";
|
|
155
|
+
"not-hosted": "not-hosted";
|
|
156
|
+
paused: "paused";
|
|
157
|
+
"several-servers": "several-servers";
|
|
125
158
|
unreachable: "unreachable";
|
|
159
|
+
"version-mismatch": "version-mismatch";
|
|
126
160
|
}>;
|
|
127
161
|
reason: z.ZodOptional<z.ZodString>;
|
|
128
162
|
kind: z.ZodOptional<z.ZodLiteral<"ssh">>;
|
|
@@ -300,3 +334,11 @@ export declare const hostServerInstallRuntimeResultSchema: z.ZodObject<{
|
|
|
300
334
|
prunedVersions: z.ZodArray<z.ZodString>;
|
|
301
335
|
}, z.core.$strip>;
|
|
302
336
|
export type HostServerInstallRuntimeResult = z.infer<typeof hostServerInstallRuntimeResultSchema>;
|
|
337
|
+
/** Output contract of `hsq host-server active-tasks --port <n> --json`. */
|
|
338
|
+
export declare const hostServerActiveTasksResultSchema: z.ZodObject<{
|
|
339
|
+
ok: z.ZodLiteral<true>;
|
|
340
|
+
action: z.ZodLiteral<"active-tasks">;
|
|
341
|
+
port: z.ZodNumber;
|
|
342
|
+
activeCount: z.ZodNumber;
|
|
343
|
+
}, z.core.$strip>;
|
|
344
|
+
export type HostServerActiveTasksResult = z.infer<typeof hostServerActiveTasksResultSchema>;
|
package/dist/contract/index.js
CHANGED
|
@@ -6521,7 +6521,18 @@ var hostPortSchema = z61.number().int("port must be an integer").min(1, "port mu
|
|
|
6521
6521
|
function slugHostId(sshAlias) {
|
|
6522
6522
|
return sshAlias.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 32).replace(/-+$/g, "");
|
|
6523
6523
|
}
|
|
6524
|
-
var HOST_STATES = [
|
|
6524
|
+
var HOST_STATES = [
|
|
6525
|
+
"connecting",
|
|
6526
|
+
"connected",
|
|
6527
|
+
"unreachable",
|
|
6528
|
+
"needs-node",
|
|
6529
|
+
"version-mismatch",
|
|
6530
|
+
"not-hosted",
|
|
6531
|
+
"identity-changed",
|
|
6532
|
+
"several-servers",
|
|
6533
|
+
"paused",
|
|
6534
|
+
"cannot-persist"
|
|
6535
|
+
];
|
|
6525
6536
|
var hostStateSchema = z61.enum(HOST_STATES);
|
|
6526
6537
|
var HOST_NOT_CONNECTED_REASON = "not connected yet";
|
|
6527
6538
|
var hostEntrySchema = z61.object({
|
|
@@ -6705,6 +6716,12 @@ var hostServerInstallRuntimeResultSchema = z61.object({
|
|
|
6705
6716
|
alreadyInstalled: z61.boolean(),
|
|
6706
6717
|
prunedVersions: z61.array(z61.string())
|
|
6707
6718
|
});
|
|
6719
|
+
var hostServerActiveTasksResultSchema = z61.object({
|
|
6720
|
+
ok: z61.literal(true),
|
|
6721
|
+
action: z61.literal("active-tasks"),
|
|
6722
|
+
port: hostPortSchema,
|
|
6723
|
+
activeCount: z61.number().int().min(0)
|
|
6724
|
+
});
|
|
6708
6725
|
export {
|
|
6709
6726
|
ACTIVITY_CHECKS_MAX,
|
|
6710
6727
|
ACTIVITY_CHECK_NAME_MAX,
|
|
@@ -7067,6 +7084,7 @@ export {
|
|
|
7067
7084
|
hostPortSchema,
|
|
7068
7085
|
hostResponseSchema,
|
|
7069
7086
|
hostRouteParamsSchema,
|
|
7087
|
+
hostServerActiveTasksResultSchema,
|
|
7070
7088
|
hostServerClaimPhaseSchema,
|
|
7071
7089
|
hostServerClaimSummarySchema,
|
|
7072
7090
|
hostServerEnsureResultSchema,
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { Writable } from 'node:stream';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { type HostEntry, type HostServerStatusResult, type HostState } from '../../contract/index.js';
|
|
4
|
+
import type { Home } from '../../home/home.ts';
|
|
5
|
+
import { type SshTransportDeps } from './ssh.ts';
|
|
6
|
+
import { type HostTunnel, type TunnelDeps } from './tunnel.ts';
|
|
7
|
+
declare const remoteProbeOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8
|
+
ok: z.ZodLiteral<false>;
|
|
9
|
+
code: z.ZodLiteral<"missing-node">;
|
|
10
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
11
|
+
ok: z.ZodLiteral<true>;
|
|
12
|
+
nodePath: z.ZodString;
|
|
13
|
+
nodeVersion: z.ZodString;
|
|
14
|
+
platform: z.ZodString;
|
|
15
|
+
dataDir: z.ZodString;
|
|
16
|
+
configDir: z.ZodString;
|
|
17
|
+
runtimeDir: z.ZodString;
|
|
18
|
+
runtimeEntry: z.ZodString;
|
|
19
|
+
runtimeInstalled: z.ZodBoolean;
|
|
20
|
+
installId: z.ZodNullable<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>], "ok">;
|
|
22
|
+
export type RemoteHostProbe = Extract<z.infer<typeof remoteProbeOutputSchema>, {
|
|
23
|
+
ok: true;
|
|
24
|
+
}>;
|
|
25
|
+
export interface BootstrapStepRecord {
|
|
26
|
+
readonly step: 'probe' | 'install' | 'ensure' | 'tunnel' | 'verify';
|
|
27
|
+
readonly status: 'ok' | 'skipped' | 'failed';
|
|
28
|
+
readonly detail: string;
|
|
29
|
+
}
|
|
30
|
+
export interface HostBootstrapDeps extends TunnelDeps {
|
|
31
|
+
packageRoot?: string | undefined;
|
|
32
|
+
mainVersion?: string | undefined;
|
|
33
|
+
requiredNode?: string | undefined;
|
|
34
|
+
streamArchive?: ((destination: Writable, packageRoot: string) => Promise<void>) | undefined;
|
|
35
|
+
probeTimeoutMs?: number | undefined;
|
|
36
|
+
installTimeoutMs?: number | undefined;
|
|
37
|
+
ensureTimeoutMs?: number | undefined;
|
|
38
|
+
statusTimeoutMs?: number | undefined;
|
|
39
|
+
controlTimeoutMs?: number | undefined;
|
|
40
|
+
tunnelTimeoutMs?: number | undefined;
|
|
41
|
+
}
|
|
42
|
+
export interface BootstrapHostResult {
|
|
43
|
+
readonly state: HostState;
|
|
44
|
+
readonly reason?: string | undefined;
|
|
45
|
+
readonly steps: BootstrapStepRecord[];
|
|
46
|
+
readonly tunnel?: HostTunnel | undefined;
|
|
47
|
+
readonly remotePort?: number | undefined;
|
|
48
|
+
readonly remotePid?: number | undefined;
|
|
49
|
+
readonly ownership?: 'managed' | 'unmanaged' | undefined;
|
|
50
|
+
readonly managedByStarter?: boolean | undefined;
|
|
51
|
+
readonly remoteVersion?: string | undefined;
|
|
52
|
+
readonly remoteInstallId?: string | undefined;
|
|
53
|
+
readonly probe?: RemoteHostProbe | undefined;
|
|
54
|
+
}
|
|
55
|
+
/** Package version and `engines.node` requirement of the running main Squawk server. */
|
|
56
|
+
export declare function readOwnPackageMeta(packageRoot?: string): {
|
|
57
|
+
version: string;
|
|
58
|
+
requiredNode: string;
|
|
59
|
+
};
|
|
60
|
+
/** True when `actualVersion` satisfies a minimum Node requirement such as `>=24.21.0`. */
|
|
61
|
+
export declare function satisfiesMinNodeVersion(actualVersion: string, requiredRange: string): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Operator-facing reason for `identity-changed`: names the exact confirmation sequence
|
|
64
|
+
* (`hsq host remove <id>` followed by `hsq host add <sshAlias>`).
|
|
65
|
+
*/
|
|
66
|
+
export declare function formatIdentityChangedReason(entry: Pick<HostEntry, 'id' | 'sshAlias'>, expectedInstallId: string, actualInstallId: string | null | undefined): string;
|
|
67
|
+
export declare function readMainInstallId(home: Home): string;
|
|
68
|
+
export declare function resolveMeta(deps: HostBootstrapDeps): {
|
|
69
|
+
packageRoot: string;
|
|
70
|
+
mainVersion: string;
|
|
71
|
+
requiredNode: string;
|
|
72
|
+
};
|
|
73
|
+
export declare function buildHostServerCliCommand(nodePath: string, runtimeEntry: string, args: readonly string[]): string;
|
|
74
|
+
/**
|
|
75
|
+
* Parse a remote command's JSON object stdout robustly: tolerate shell rc banners or extra lines
|
|
76
|
+
* before the JSON by checking the whole trimmed stdout first, then scanning from the last
|
|
77
|
+
* non-empty line upward for the last JSON object line, and validating it with `schema`.
|
|
78
|
+
*/
|
|
79
|
+
export declare function parseJsonStdout<T>(stdout: string, schema: z.ZodType<T>, label: string): {
|
|
80
|
+
ok: true;
|
|
81
|
+
data: T;
|
|
82
|
+
} | {
|
|
83
|
+
ok: false;
|
|
84
|
+
reason: string;
|
|
85
|
+
};
|
|
86
|
+
/** Step 1: probe Node.js version, remote Squawk home paths, runtime presence, and install id. */
|
|
87
|
+
export declare function probeRemoteHost(sshAlias: string, deps?: HostBootstrapDeps, signal?: AbortSignal): Promise<{
|
|
88
|
+
ok: true;
|
|
89
|
+
probe: RemoteHostProbe;
|
|
90
|
+
} | {
|
|
91
|
+
ok: false;
|
|
92
|
+
state: 'unreachable' | 'needs-node';
|
|
93
|
+
reason: string;
|
|
94
|
+
}>;
|
|
95
|
+
/** Step 2: stream the runtime `.tar.gz` archive to a staged temp folder and activate it atomically. */
|
|
96
|
+
export declare function installRemoteRuntime(sshAlias: string, probe: RemoteHostProbe, deps?: HostBootstrapDeps, signal?: AbortSignal): Promise<{
|
|
97
|
+
ok: true;
|
|
98
|
+
runtimeDir: string;
|
|
99
|
+
alreadyInstalled: boolean;
|
|
100
|
+
} | {
|
|
101
|
+
ok: false;
|
|
102
|
+
reason: string;
|
|
103
|
+
}>;
|
|
104
|
+
/** Run `hsq host-server status --starter-id <id> --json` on the remote machine over SSH. */
|
|
105
|
+
export declare function checkRemoteHostStatus(sshAlias: string, runtime: Pick<RemoteHostProbe, 'nodePath' | 'runtimeEntry'>, mainInstallId: string, port: number | undefined, deps?: Pick<HostBootstrapDeps, keyof SshTransportDeps | 'statusTimeoutMs'>, signal?: AbortSignal): Promise<{
|
|
106
|
+
ok: true;
|
|
107
|
+
status: HostServerStatusResult;
|
|
108
|
+
} | {
|
|
109
|
+
ok: false;
|
|
110
|
+
reason: string;
|
|
111
|
+
}>;
|
|
112
|
+
/**
|
|
113
|
+
* Execute the full 5-step bootstrap (Probe -> Install -> Adopt/Start -> Tunnel -> Verify) for
|
|
114
|
+
* host `hostId`. On `connected`, returns an open `tunnel` whose lifecycle the caller owns.
|
|
115
|
+
*/
|
|
116
|
+
export declare function bootstrapHost(home: Home, hostId: string, deps?: HostBootstrapDeps, options?: {
|
|
117
|
+
signal?: AbortSignal | undefined;
|
|
118
|
+
preProbed?: RemoteHostProbe | undefined;
|
|
119
|
+
}): Promise<BootstrapHostResult>;
|
|
120
|
+
export {};
|