@kdonev/termscape 0.1.0 → 0.1.2
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 +211 -79
- package/dist/agents/detect.d.ts +27 -0
- package/dist/agents/detect.d.ts.map +1 -0
- package/dist/agents/detect.js +210 -0
- package/dist/agents/detect.js.map +1 -0
- package/dist/agents/profiles.d.ts +119 -2
- package/dist/agents/profiles.d.ts.map +1 -1
- package/dist/agents/profiles.js +224 -4
- package/dist/agents/profiles.js.map +1 -1
- package/dist/agents/templates.d.ts +100 -0
- package/dist/agents/templates.d.ts.map +1 -0
- package/dist/agents/templates.js +165 -0
- package/dist/agents/templates.js.map +1 -0
- package/dist/agents/wiring.d.ts +30 -1
- package/dist/agents/wiring.d.ts.map +1 -1
- package/dist/agents/wiring.js +182 -10
- package/dist/agents/wiring.js.map +1 -1
- package/dist/cli.js +51 -14
- package/dist/cli.js.map +1 -1
- package/dist/db/migrations.d.ts.map +1 -1
- package/dist/db/migrations.js +73 -0
- package/dist/db/migrations.js.map +1 -1
- package/dist/db/store.d.ts +53 -1
- package/dist/db/store.d.ts.map +1 -1
- package/dist/db/store.js +118 -5
- package/dist/db/store.js.map +1 -1
- package/dist/hub.d.ts +264 -6
- package/dist/hub.d.ts.map +1 -1
- package/dist/hub.js +549 -33
- package/dist/hub.js.map +1 -1
- package/dist/hub.tgz +0 -0
- package/dist/mcp/server.d.ts +3 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +27 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/protocol/domain.d.ts +88 -0
- package/dist/protocol/domain.d.ts.map +1 -1
- package/dist/protocol/domain.js +114 -0
- package/dist/protocol/domain.js.map +1 -1
- package/dist/protocol/mcp-tools.d.ts +43 -0
- package/dist/protocol/mcp-tools.d.ts.map +1 -1
- package/dist/protocol/mcp-tools.js +65 -0
- package/dist/protocol/mcp-tools.js.map +1 -1
- package/dist/protocol/peer.d.ts +38 -1
- package/dist/protocol/peer.d.ts.map +1 -1
- package/dist/protocol/peer.js +41 -2
- package/dist/protocol/peer.js.map +1 -1
- package/dist/protocol/ws.d.ts +259 -0
- package/dist/protocol/ws.d.ts.map +1 -1
- package/dist/protocol/ws.js +169 -5
- package/dist/protocol/ws.js.map +1 -1
- package/dist/remote/deployer.d.ts.map +1 -1
- package/dist/remote/deployer.js +15 -2
- package/dist/remote/deployer.js.map +1 -1
- package/dist/remote/join-script.d.ts.map +1 -1
- package/dist/remote/join-script.js +34 -2
- package/dist/remote/join-script.js.map +1 -1
- package/dist/remote/lan.d.ts +73 -5
- package/dist/remote/lan.d.ts.map +1 -1
- package/dist/remote/lan.js +119 -10
- package/dist/remote/lan.js.map +1 -1
- package/dist/remote/peer-serve.d.ts.map +1 -1
- package/dist/remote/peer-serve.js +32 -3
- package/dist/remote/peer-serve.js.map +1 -1
- package/dist/remote/peer.d.ts +7 -0
- package/dist/remote/peer.d.ts.map +1 -1
- package/dist/remote/peer.js +22 -0
- package/dist/remote/peer.js.map +1 -1
- package/dist/remote/registry.d.ts +70 -2
- package/dist/remote/registry.d.ts.map +1 -1
- package/dist/remote/registry.js +134 -10
- package/dist/remote/registry.js.map +1 -1
- package/dist/server.d.ts +22 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +239 -117
- package/dist/server.js.map +1 -1
- package/dist/session/manager.d.ts +60 -4
- package/dist/session/manager.d.ts.map +1 -1
- package/dist/session/manager.js +198 -41
- package/dist/session/manager.js.map +1 -1
- package/dist/session/pty.d.ts +19 -0
- package/dist/session/pty.d.ts.map +1 -1
- package/dist/session/pty.js +84 -1
- package/dist/session/pty.js.map +1 -1
- package/package.json +1 -1
- package/web/assets/{index-BOqZOoep.js → index-9Z_8xZqk.js} +10 -6
- package/web/assets/index-DheUm5dl.css +1 -0
- package/web/index.html +2 -2
- package/web/assets/index-B2JtCtHa.css +0 -1
package/dist/protocol/ws.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { Host, Message, Session, Viewport, Workspace, WindowRect, AgentProfileInfo, } from './domain.js';
|
|
2
|
+
import { Host, Message, Session, Viewport, Workspace, WindowRect, AgentProfileInfo, AgentTemplateInfo, TemplateProposal, } from './domain.js';
|
|
3
3
|
/* ------------------------------------------------------------------ *
|
|
4
4
|
* Binary framing for PTY traffic.
|
|
5
5
|
*
|
|
@@ -38,6 +38,16 @@ export function decodeBinaryFrame(buf) {
|
|
|
38
38
|
/* ------------------------------------------------------------------ *
|
|
39
39
|
* Control messages
|
|
40
40
|
* ------------------------------------------------------------------ */
|
|
41
|
+
/**
|
|
42
|
+
* Correlates one mutation with its answer.
|
|
43
|
+
*
|
|
44
|
+
* A form that fires and forgets can only report failure as a toast in the
|
|
45
|
+
* corner, arriving after it has closed and next to nothing that explains it.
|
|
46
|
+
* A dialog carries a requestId, and the hub answers that id with an `ack`
|
|
47
|
+
* whether it worked or not — so the dialog can stay open, put the message
|
|
48
|
+
* beside the field that caused it, and close only on success.
|
|
49
|
+
*/
|
|
50
|
+
const requestId = z.string().optional();
|
|
41
51
|
export const ClientMsg = z.discriminatedUnion('t', [
|
|
42
52
|
z.object({ t: z.literal('hello'), token: z.string() }),
|
|
43
53
|
// terminal attach / detach drives the LOD swap on the canvas
|
|
@@ -45,18 +55,95 @@ export const ClientMsg = z.discriminatedUnion('t', [
|
|
|
45
55
|
z.object({ t: z.literal('detach'), sessionId: z.string() }),
|
|
46
56
|
z.object({ t: z.literal('resize'), sessionId: z.string(), cols: z.number().int().positive(), rows: z.number().int().positive() }),
|
|
47
57
|
// workspaces
|
|
48
|
-
z.object({ t: z.literal('createWorkspace'), name: z.string().min(1), rootPath: z.string().min(1), hostId: z.string().nullable().optional() }),
|
|
49
|
-
|
|
58
|
+
z.object({ t: z.literal('createWorkspace'), requestId, name: z.string().min(1), rootPath: z.string().min(1), hostId: z.string().nullable().optional() }),
|
|
59
|
+
/**
|
|
60
|
+
* Rename a workspace or repoint it at another folder. Both are optional and
|
|
61
|
+
* only what is given changes, so the dialog sends the whole form and the hub
|
|
62
|
+
* decides what actually moved.
|
|
63
|
+
*/
|
|
64
|
+
z.object({
|
|
65
|
+
t: z.literal('updateWorkspace'),
|
|
66
|
+
requestId,
|
|
67
|
+
workspaceId: z.string(),
|
|
68
|
+
name: z.string().min(1).optional(),
|
|
69
|
+
rootPath: z.string().min(1).optional(),
|
|
70
|
+
}),
|
|
71
|
+
z.object({ t: z.literal('removeWorkspace'), requestId, workspaceId: z.string() }),
|
|
72
|
+
// templates
|
|
73
|
+
/**
|
|
74
|
+
* Make a template, or edit one.
|
|
75
|
+
*
|
|
76
|
+
* One message for both, because a template is identified by the name a
|
|
77
|
+
* person picked and there is no separate id to rename around: saving the
|
|
78
|
+
* dialog means "let `id` be this". The hub refuses an id `agents.toml` has
|
|
79
|
+
* claimed rather than shadowing it, and refuses a model or an effort the
|
|
80
|
+
* named agent cannot spell - the same rule the loader applies, so the
|
|
81
|
+
* dialog gets the refusal instead of the list quietly gaining a broken row.
|
|
82
|
+
*
|
|
83
|
+
* The whole form is sent every time. A template is four fields, and a patch
|
|
84
|
+
* API would only make clearing a model harder to say than setting one.
|
|
85
|
+
*/
|
|
86
|
+
z.object({
|
|
87
|
+
t: z.literal('saveTemplate'),
|
|
88
|
+
requestId,
|
|
89
|
+
id: z.string().min(1),
|
|
90
|
+
agent: z.string().min(1),
|
|
91
|
+
description: z.string().nullable().optional(),
|
|
92
|
+
model: z.string().nullable().optional(),
|
|
93
|
+
effort: z.string().nullable().optional(),
|
|
94
|
+
prompt: z.string().nullable().optional(),
|
|
95
|
+
/** Extra environment for the agent process. Absent means "leave as is". */
|
|
96
|
+
env: z.record(z.string(), z.string()).optional(),
|
|
97
|
+
}),
|
|
98
|
+
z.object({ t: z.literal('removeTemplate'), requestId, id: z.string() }),
|
|
99
|
+
/**
|
|
100
|
+
* Answer an agent's proposal.
|
|
101
|
+
*
|
|
102
|
+
* The fields ride along because this is a proposal rather than a yes/no
|
|
103
|
+
* question: the likeliest outcome is a human who keeps the idea and changes
|
|
104
|
+
* the name or the model, so what is accepted is what the dialog shows, not
|
|
105
|
+
* what the agent asked for. Omitted on a rejection.
|
|
106
|
+
*/
|
|
107
|
+
z.object({
|
|
108
|
+
t: z.literal('resolveTemplateProposal'),
|
|
109
|
+
requestId,
|
|
110
|
+
proposalId: z.string(),
|
|
111
|
+
accept: z.boolean(),
|
|
112
|
+
id: z.string().min(1).optional(),
|
|
113
|
+
agent: z.string().min(1).optional(),
|
|
114
|
+
description: z.string().nullable().optional(),
|
|
115
|
+
model: z.string().nullable().optional(),
|
|
116
|
+
effort: z.string().nullable().optional(),
|
|
117
|
+
prompt: z.string().nullable().optional(),
|
|
118
|
+
/**
|
|
119
|
+
* Only ever the human's own. A proposal carries no environment: an agent
|
|
120
|
+
* that could name variables for every future launch of a template would
|
|
121
|
+
* be choosing what the next agent's credentials are, which is not a thing
|
|
122
|
+
* to ask a human to review one dialog at a time.
|
|
123
|
+
*/
|
|
124
|
+
env: z.record(z.string(), z.string()).optional(),
|
|
125
|
+
}),
|
|
50
126
|
// sessions
|
|
51
127
|
z.object({
|
|
52
128
|
t: z.literal('startSession'),
|
|
129
|
+
requestId,
|
|
53
130
|
workspaceId: z.string(),
|
|
131
|
+
/**
|
|
132
|
+
* A template id. Still called `profile` on the wire, and still resolved
|
|
133
|
+
* as a profile id when no template has that name, so a client from before
|
|
134
|
+
* templates existed keeps working — every agent has a bare template under
|
|
135
|
+
* its own name, so the two agree for all the old values.
|
|
136
|
+
*/
|
|
54
137
|
profile: z.string(),
|
|
138
|
+
/** Overrides for what the template already decided, from the dialog. */
|
|
139
|
+
model: z.string().optional(),
|
|
140
|
+
effort: z.string().optional(),
|
|
141
|
+
prompt: z.string().optional(),
|
|
55
142
|
name: z.string().optional(),
|
|
56
143
|
cwd: z.string().optional(),
|
|
57
144
|
}),
|
|
58
145
|
z.object({ t: z.literal('stopSession'), sessionId: z.string() }),
|
|
59
|
-
z.object({ t: z.literal('removeSession'), sessionId: z.string() }),
|
|
146
|
+
z.object({ t: z.literal('removeSession'), requestId, sessionId: z.string() }),
|
|
60
147
|
z.object({ t: z.literal('resumeSession'), sessionId: z.string() }),
|
|
61
148
|
z.object({ t: z.literal('resumeWorkspace'), workspaceId: z.string() }),
|
|
62
149
|
// canvas layout
|
|
@@ -65,14 +152,33 @@ export const ClientMsg = z.discriminatedUnion('t', [
|
|
|
65
152
|
// hosts
|
|
66
153
|
z.object({
|
|
67
154
|
t: z.literal('addHost'),
|
|
155
|
+
requestId,
|
|
68
156
|
label: z.string(),
|
|
69
157
|
sshHost: z.string(),
|
|
70
158
|
sshUser: z.string(),
|
|
71
159
|
sshPort: z.number().int().positive().default(22),
|
|
72
160
|
privateKeyPath: z.string().optional(),
|
|
73
161
|
}),
|
|
74
|
-
|
|
162
|
+
/**
|
|
163
|
+
* Fix a host's details after the fact. An enrolled host has no ssh fields to
|
|
164
|
+
* correct - it dialled us - so for one of those only the label applies, and
|
|
165
|
+
* the hub refuses the rest rather than storing details nothing will read.
|
|
166
|
+
*/
|
|
167
|
+
z.object({
|
|
168
|
+
t: z.literal('updateHost'),
|
|
169
|
+
requestId,
|
|
170
|
+
hostId: z.string(),
|
|
171
|
+
label: z.string().optional(),
|
|
172
|
+
sshHost: z.string().optional(),
|
|
173
|
+
sshUser: z.string().optional(),
|
|
174
|
+
sshPort: z.number().int().positive().optional(),
|
|
175
|
+
/** Empty string clears it back to using the ssh agent. */
|
|
176
|
+
privateKeyPath: z.string().optional(),
|
|
177
|
+
}),
|
|
178
|
+
z.object({ t: z.literal('removeHost'), requestId, hostId: z.string() }),
|
|
75
179
|
z.object({ t: z.literal('connectHost'), hostId: z.string() }),
|
|
180
|
+
/** Re-probe what is installed, here and on every attached machine. */
|
|
181
|
+
z.object({ t: z.literal('refreshAgents') }),
|
|
76
182
|
]);
|
|
77
183
|
export const HubState = z.object({
|
|
78
184
|
hubVersion: z.string(),
|
|
@@ -92,19 +198,60 @@ export const HubState = z.object({
|
|
|
92
198
|
sessions: z.array(Session),
|
|
93
199
|
messages: z.array(Message),
|
|
94
200
|
viewport: Viewport,
|
|
201
|
+
/** What this machine has. */
|
|
95
202
|
profiles: z.array(AgentProfileInfo),
|
|
203
|
+
/** What the picker offers: agents plus the models and efforts already chosen. */
|
|
204
|
+
templates: z.array(AgentTemplateInfo),
|
|
205
|
+
/**
|
|
206
|
+
* Proposals waiting on a human. Sent with the rest of the state because a
|
|
207
|
+
* browser that was closed when one arrived would otherwise never see it, and
|
|
208
|
+
* the agent that asked is still waiting.
|
|
209
|
+
*/
|
|
210
|
+
templateProposals: z.array(TemplateProposal),
|
|
211
|
+
/**
|
|
212
|
+
* What each attached machine has, by host id. Separate from `profiles`
|
|
213
|
+
* because the answer is per machine: a host has its own PATH, and the
|
|
214
|
+
* picker for a workspace over there has to offer that machine's agents
|
|
215
|
+
* rather than this one's.
|
|
216
|
+
*/
|
|
217
|
+
hostProfiles: z.record(z.string(), z.array(AgentProfileInfo)),
|
|
96
218
|
});
|
|
97
219
|
export const ServerMsg = z.discriminatedUnion('t', [
|
|
98
220
|
z.object({ t: z.literal('ready'), state: HubState }),
|
|
99
221
|
z.object({ t: z.literal('sessionUpserted'), session: Session }),
|
|
100
222
|
z.object({ t: z.literal('sessionRemoved'), sessionId: z.string() }),
|
|
101
223
|
z.object({ t: z.literal('workspaceUpserted'), workspace: Workspace }),
|
|
224
|
+
/**
|
|
225
|
+
* The whole list, not one row.
|
|
226
|
+
*
|
|
227
|
+
* A per-row upsert cannot say what actually happens here: removing a stored
|
|
228
|
+
* template that shadowed a bare one does not remove a row, it reveals the
|
|
229
|
+
* derived one underneath, and adding one to `agents.toml` changes an
|
|
230
|
+
* existing row's source. The list is a handful of small records and is
|
|
231
|
+
* recomputed anyway, so sending it whole is both simpler and the only shape
|
|
232
|
+
* that can express the result.
|
|
233
|
+
*/
|
|
234
|
+
z.object({ t: z.literal('templatesChanged'), templates: z.array(AgentTemplateInfo) }),
|
|
235
|
+
z.object({ t: z.literal('templateProposed'), proposal: TemplateProposal }),
|
|
236
|
+
z.object({ t: z.literal('templateProposalResolved'), proposalId: z.string() }),
|
|
102
237
|
z.object({ t: z.literal('workspaceRemoved'), workspaceId: z.string() }),
|
|
103
238
|
z.object({ t: z.literal('hostUpserted'), host: Host }),
|
|
104
239
|
z.object({ t: z.literal('hostRemoved'), hostId: z.string() }),
|
|
105
240
|
// Deploy progress. A remote install rebuilds native modules and takes
|
|
106
241
|
// minutes; without this the panel is a frozen button.
|
|
107
242
|
z.object({ t: z.literal('hostLog'), hostId: z.string(), line: z.string() }),
|
|
243
|
+
/**
|
|
244
|
+
* Detection finishing, here or on a peer. It runs after the hub is already
|
|
245
|
+
* serving - never before, so it can never hold up a page load - which means
|
|
246
|
+
* the first `ready` usually arrives with nothing probed yet and this is what
|
|
247
|
+
* fills the picker in.
|
|
248
|
+
*/
|
|
249
|
+
z.object({
|
|
250
|
+
t: z.literal('agentsDetected'),
|
|
251
|
+
/** null for this machine. */
|
|
252
|
+
hostId: z.string().nullable(),
|
|
253
|
+
profiles: z.array(AgentProfileInfo),
|
|
254
|
+
}),
|
|
108
255
|
z.object({ t: z.literal('messageSent'), message: Message }),
|
|
109
256
|
// sent on attach: serialized screen, replayed before the live stream
|
|
110
257
|
z.object({
|
|
@@ -115,5 +262,22 @@ export const ServerMsg = z.discriminatedUnion('t', [
|
|
|
115
262
|
rows: z.number(),
|
|
116
263
|
}),
|
|
117
264
|
z.object({ t: z.literal('error'), message: z.string(), sessionId: z.string().optional() }),
|
|
265
|
+
/**
|
|
266
|
+
* The answer to a mutation that carried a requestId. A failure arrives here
|
|
267
|
+
* and *not* as an `error`, so it lands in the dialog that asked rather than
|
|
268
|
+
* in the corner of the screen.
|
|
269
|
+
*/
|
|
270
|
+
z.object({
|
|
271
|
+
t: z.literal('ack'),
|
|
272
|
+
requestId: z.string(),
|
|
273
|
+
ok: z.boolean(),
|
|
274
|
+
message: z.string().optional(),
|
|
275
|
+
/**
|
|
276
|
+
* What the mutation created, when it created anything: the dialog that
|
|
277
|
+
* started an agent wants to focus the window it just brought into being,
|
|
278
|
+
* and the broadcast alone does not tell it which session was its own.
|
|
279
|
+
*/
|
|
280
|
+
sessionId: z.string().optional(),
|
|
281
|
+
}),
|
|
118
282
|
]);
|
|
119
283
|
//# sourceMappingURL=ws.js.map
|
package/dist/protocol/ws.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws.js","sourceRoot":"","sources":["../src/ws.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,IAAI,EACJ,OAAO,EACP,OAAO,EACP,QAAQ,EACR,SAAS,EACT,UAAU,EACV,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB;;;;;;;;;wEASwE;AAExE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;CACN,CAAC;AAIX,MAAM,UAAU,iBAAiB,CAC/B,IAAqB,EACrB,SAAiB,EACjB,OAAmB;IAEnB,MAAM,EAAE,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC/C,IAAI,EAAE,CAAC,MAAM,GAAG,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC7E,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACd,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IACnB,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACf,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC;IACh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,CAAC,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,CAAC,CAOjE;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAW1E;AAED,MAAM,WAAW,KAAK;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,wEAAwE;AACxE,wBAAsB,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,SAAqB,GAAG,OAAO,CAAC,KAAK,CAAC,CAW3F;AAWD;;;;GAIG;AACH,wBAAsB,SAAS,CAC7B,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,IAAI,CAAC,CAuFf;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAqC5C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,SAAS,EACf,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC,CAqBnD;AAED,qDAAqD;AACrD,wBAAsB,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAqCvE"}
|
package/dist/remote/deployer.js
CHANGED
|
@@ -90,18 +90,31 @@ export async function provision(conn, opts) {
|
|
|
90
90
|
// Node ABI those modules were built against, and the platform.
|
|
91
91
|
const stamp = `"$(cat deps.fingerprint 2>/dev/null || echo none)-` +
|
|
92
92
|
`$(node -p 'process.versions.node.split(".")[0] + "-" + process.platform + "-" + process.arch')"`;
|
|
93
|
-
// The stamp claims the tree still works; the
|
|
93
|
+
// The stamp claims the tree still works; the import confirms it does.
|
|
94
94
|
// Trusting the stamp alone would trade a slow deploy for a remote hub that
|
|
95
95
|
// cannot load its own modules.
|
|
96
|
+
//
|
|
97
|
+
// The hub's own entry rather than the two native modules, because linking
|
|
98
|
+
// the whole graph is what catches a stale @termscape/protocol - a missing
|
|
99
|
+
// named export is a link-time error and nothing a `require` of node-pty
|
|
100
|
+
// would ever notice. Importing it starts nothing; only cli.js does.
|
|
96
101
|
const reusable = await exec(conn, `cd ${remoteDir}/hub && [ -d node_modules ]` +
|
|
97
102
|
` && [ "$(cat ../deps.stamp 2>/dev/null)" = ${stamp} ]` +
|
|
98
|
-
` && node -e '
|
|
103
|
+
` && node -e 'import("./dist/hub.js").catch(e => { console.error(e); process.exit(1) })'`);
|
|
99
104
|
if (reusable.code === 0) {
|
|
100
105
|
log('dependencies unchanged; keeping the modules already there');
|
|
101
106
|
return;
|
|
102
107
|
}
|
|
103
108
|
// A half-finished tree must not inherit the last deploy's stamp.
|
|
104
109
|
await exec(conn, `rm -f ${remoteDir}/deps.stamp`);
|
|
110
|
+
// And the vendored workspace package goes before npm runs. Every other
|
|
111
|
+
// dependency is a registry package whose version moves when its code does;
|
|
112
|
+
// @termscape/protocol is a `file:` tarball whose version stands still while
|
|
113
|
+
// its code changes underneath, and npm reads the copy already in
|
|
114
|
+
// node_modules as satisfying the spec and leaves last deploy's there. The
|
|
115
|
+
// native modules beside it - the whole reason the tree is kept - are not
|
|
116
|
+
// touched.
|
|
117
|
+
await exec(conn, `rm -rf ${remoteDir}/hub/node_modules/@termscape`);
|
|
105
118
|
// Prebuilt binaries first: node-pty and better-sqlite3 publish them for the
|
|
106
119
|
// mainstream platforms, and downloading one beats compiling it every time.
|
|
107
120
|
let install = await exec(conn, `cd ${remoteDir}/hub && npm install --omit=dev --no-audit --no-fund 2>&1 | tail -20`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployer.js","sourceRoot":"","sources":["../../src/remote/deployer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA4B,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,MAAM,IAAI,SAAS,EAAsB,MAAM,MAAM,CAAC;AA0C/D,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAE1C,SAAS,aAAa,CAAC,CAAkB;IACvC,MAAM,GAAG,GAAkB;QACzB,IAAI,EAAE,CAAC,CAAC,OAAO;QACf,IAAI,EAAE,CAAC,CAAC,OAAO;QACf,QAAQ,EAAE,CAAC,CAAC,OAAO;QACnB,YAAY,EAAE,MAAM;KACrB,CAAC;IACF,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;QACrB,GAAG,CAAC,UAAU,GAAG,YAAY,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;QAChD,IAAI,CAAC,CAAC,UAAU;YAAE,GAAG,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC;IAClD,CAAC;SAAM,CAAC;QACN,sEAAsE;QACtE,iEAAiE;QACjE,GAAG,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAClG,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,CAAkB;IAC3C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC;QAC7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AAO,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;gBAC5D,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,CAAC;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,GAAG,EAAE,CAAC;QACX,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"join-script.d.ts","sourceRoot":"","sources":["../../src/remote/join-script.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAUH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"join-script.d.ts","sourceRoot":"","sources":["../../src/remote/join-script.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAUH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAmUrE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CA+X1E"}
|
|
@@ -243,10 +243,19 @@ WANT_STAMP="$FINGERPRINT-$NODE_ABI"
|
|
|
243
243
|
# The stamp claims this tree still works. Confirming it does costs one Node
|
|
244
244
|
# start, and is the whole difference between an optimisation and a machine
|
|
245
245
|
# that joins with a hub unable to load its own modules.
|
|
246
|
+
#
|
|
247
|
+
# The confirmation is an import of the hub's own entry point rather than a
|
|
248
|
+
# require of the two native modules. It links the whole graph - node-pty and
|
|
249
|
+
# better-sqlite3 among it - so it still catches a module built for the wrong
|
|
250
|
+
# ABI, and it additionally catches the one thing a require of those two never
|
|
251
|
+
# could: a stale @termscape/protocol, which fails at link time with "does not
|
|
252
|
+
# provide an export named X". Importing it is side-effect free and leaves no
|
|
253
|
+
# handles open; the hub only starts from cli.js.
|
|
246
254
|
deps_reusable() {
|
|
247
255
|
[ -d "$HOME_DIR/hub/node_modules" ] || return 1
|
|
248
256
|
[ "$(cat "$STAMP_FILE" 2>/dev/null || true)" = "$WANT_STAMP" ] || return 1
|
|
249
|
-
"$NODE_BIN" -e "
|
|
257
|
+
"$NODE_BIN" -e "import('./dist/hub.js').catch(e => { console.error(e); process.exit(1); })" \\
|
|
258
|
+
>>"$HOME_DIR/install.log" 2>&1
|
|
250
259
|
}
|
|
251
260
|
|
|
252
261
|
install_deps() {
|
|
@@ -254,6 +263,18 @@ install_deps() {
|
|
|
254
263
|
# A half-finished tree must not inherit the last run's stamp.
|
|
255
264
|
rm -f "$STAMP_FILE"
|
|
256
265
|
|
|
266
|
+
# The vendored workspace package has to go before npm runs.
|
|
267
|
+
#
|
|
268
|
+
# Every other dependency is a registry package whose version moves when its
|
|
269
|
+
# code does, so npm reinstalls it on its own. @termscape/protocol is a
|
|
270
|
+
# file: tarball whose version stands still across builds while its code
|
|
271
|
+
# changes underneath, and npm reads the copy already in node_modules as
|
|
272
|
+
# satisfying the spec and leaves it there - so a hub built against a new
|
|
273
|
+
# protocol was installed beside last build's copy, and died on its first
|
|
274
|
+
# import. Deleting it is what makes npm extract the tarball again; the
|
|
275
|
+
# expensive native modules beside it are untouched.
|
|
276
|
+
rm -rf "$HOME_DIR/hub/node_modules/@termscape"
|
|
277
|
+
|
|
257
278
|
# Prebuilt binaries first: node-pty and better-sqlite3 publish them for the
|
|
258
279
|
# mainstream platforms, and downloading one beats compiling it every time.
|
|
259
280
|
if run_ticking "installing" "$NPM_BIN" install --omit=dev --no-audit --no-fund; then
|
|
@@ -608,7 +629,13 @@ if ((Test-Path $hubModules) -and ($haveStamp -eq $wantStamp)) {
|
|
|
608
629
|
# its own errors and reports through stdout and an exit code, so nothing
|
|
609
630
|
# reaches PowerShell's error stream - where 5.1 turns a native command's
|
|
610
631
|
# stderr into a terminating error.
|
|
611
|
-
|
|
632
|
+
#
|
|
633
|
+
# It imports the hub's own entry rather than requiring the two native
|
|
634
|
+
# modules: that links the whole graph, so it still catches a module built
|
|
635
|
+
# for the wrong ABI and additionally catches a stale @termscape/protocol,
|
|
636
|
+
# which fails at link time with "does not provide an export named X". See
|
|
637
|
+
# the POSIX half for why that can happen at all.
|
|
638
|
+
$probe = "import('./dist/hub.js').catch(e => { console.log('dependency probe failed: ' + e.message); process.exit(1) })"
|
|
612
639
|
& $NodeExe -e $probe > $log
|
|
613
640
|
$reusable = ($LASTEXITCODE -eq 0)
|
|
614
641
|
}
|
|
@@ -620,6 +647,11 @@ if ($reusable) {
|
|
|
620
647
|
# A half-finished tree must not inherit the last run's stamp.
|
|
621
648
|
if (Test-Path $stampFile) { Remove-Item $stampFile -Force }
|
|
622
649
|
|
|
650
|
+
# The vendored workspace package has to go before npm runs - see the POSIX
|
|
651
|
+
# half for why npm will otherwise keep last build's copy of it.
|
|
652
|
+
$vendored = Join-Path $hubModules '@termscape'
|
|
653
|
+
if (Test-Path $vendored) { Remove-Item $vendored -Recurse -Force }
|
|
654
|
+
|
|
623
655
|
# Prebuilt binaries first; compiling is the fallback, not the default.
|
|
624
656
|
$npmArgs = '"' + $NpmCli + '" install --omit=dev --no-audit --no-fund'
|
|
625
657
|
$rc = Invoke-Ticking 'installing' $NodeExe $npmArgs $log
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"join-script.js","sourceRoot":"","sources":["../../src/remote/join-script.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,kFAAkF;AAClF,SAAS,EAAE,CAAC,CAAS;IACnB,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC;AACzC,CAAC;AAED,uEAAuE;AACvE,MAAM,SAAS,GAAG,sCAAsC,CAAC;AAEzD,MAAM,UAAU,eAAe,CAAC,MAAc,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsX3B,CAAC;AACF,CAAC"}
|
package/dist/remote/lan.d.ts
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The IPv4 address another machine should be pointed at.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Public beats private beats link-local, and a real NIC beats a virtual one
|
|
5
|
+
* within each class. Ties keep the order the OS reported, which is the closest
|
|
6
|
+
* thing to a preference the machine itself expresses.
|
|
7
7
|
*/
|
|
8
|
-
/** First non-internal IPv4 address, preferring real NICs over virtual ones. */
|
|
9
8
|
export declare function lanAddress(): string | null;
|
|
9
|
+
/** One entry of what `os.networkInterfaces()` returns, narrowed to what matters. */
|
|
10
|
+
export interface NicAddress {
|
|
11
|
+
address: string;
|
|
12
|
+
family: string;
|
|
13
|
+
internal: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The pick itself, over an interface map rather than the machine's own.
|
|
17
|
+
*
|
|
18
|
+
* Split out so the ordering can be tested against a machine shape that is not
|
|
19
|
+
* the one running the test — a VPS with a public address beside a Docker
|
|
20
|
+
* bridge is exactly the case this exists for, and no CI runner has one.
|
|
21
|
+
*/
|
|
22
|
+
export declare function pickLanAddress(interfaces: Record<string, NicAddress[] | undefined>): string | null;
|
|
10
23
|
/**
|
|
11
24
|
* Turn a `--listen` value into a bind address.
|
|
12
25
|
*
|
|
@@ -16,8 +29,63 @@ export declare function lanAddress(): string | null;
|
|
|
16
29
|
* config points. Binding the LAN address by itself would take the hub off
|
|
17
30
|
* 127.0.0.1 and break both. The LAN address is still what gets *advertised* —
|
|
18
31
|
* see advertisedHost.
|
|
32
|
+
*
|
|
33
|
+
* `loopback` is the way back. It was not needed while loopback was the
|
|
34
|
+
* default and nothing could be narrower; now that a hub with a UI binds wide
|
|
35
|
+
* on its own, there has to be a spelling for "only this machine".
|
|
19
36
|
*/
|
|
20
37
|
export declare function resolveBindHost(spec: string): string;
|
|
38
|
+
/** What a hub binds and whether it hands out enrollments. */
|
|
39
|
+
export interface ListenPlan {
|
|
40
|
+
/** The address passed to listen(). */
|
|
41
|
+
host: string;
|
|
42
|
+
/**
|
|
43
|
+
* Whether `/join` answers. Separate from the bind on purpose: see
|
|
44
|
+
* listenPlan.
|
|
45
|
+
*/
|
|
46
|
+
enroll: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Decide what to bind, and whether to hand out enrollments, from `--listen`.
|
|
50
|
+
*
|
|
51
|
+
* A hub with a UI binds wide by default, and hands out enrollments on that
|
|
52
|
+
* bind. The canvas is worth opening on a phone or a second screen and a second
|
|
53
|
+
* machine is worth attaching, and neither is discoverable from a hub that only
|
|
54
|
+
* ever prints 127.0.0.1.
|
|
55
|
+
*
|
|
56
|
+
* Enrollment used to be the exception — reachable by default, enrollable only
|
|
57
|
+
* on `--listen lan`. That was the wrong line to draw, for a plain reason: the
|
|
58
|
+
* add-machine dialog is the *only* place a second machine is ever attached
|
|
59
|
+
* from, and on a default hub it had nothing to show but an instruction to
|
|
60
|
+
* restart with a flag. A feature reachable only by restarting the process with
|
|
61
|
+
* a flag you have to already know about is a feature nobody uses, and this one
|
|
62
|
+
* is the product. So the default now answers `/join`, and `--listen loopback`
|
|
63
|
+
* is the way to say no.
|
|
64
|
+
*
|
|
65
|
+
* What that costs is worth stating plainly, because it is real: `/join` is the
|
|
66
|
+
* one route served without the client token — it has to be typed by hand on a
|
|
67
|
+
* machine that has nothing yet — so on a network you do not trust, anyone who
|
|
68
|
+
* can reach this hub can pull the installer and put a machine on your canvas.
|
|
69
|
+
* That is what `--listen loopback` is for, and what the banner says out loud on
|
|
70
|
+
* every start. Everything else still needs the token.
|
|
71
|
+
*
|
|
72
|
+
* One thing is still *not* covered by the default:
|
|
73
|
+
*
|
|
74
|
+
* - **A headless hub stays on loopback, and never enrolls.** Headless means a
|
|
75
|
+
* hub that joined a canvas or was deployed over SSH, and the SSH one is
|
|
76
|
+
* reached only through its tunnel — binding it wide would put a hub on a
|
|
77
|
+
* network that its operator never asked to expose and cannot see. It has no
|
|
78
|
+
* UI to reach anyway, and a machine attaching to *it* rather than to the
|
|
79
|
+
* canvas is not a thing anyone wants.
|
|
80
|
+
*
|
|
81
|
+
* `hasLan` is injected so this is testable without a network interface; the
|
|
82
|
+
* fallback matters because a machine with no non-loopback address must still
|
|
83
|
+
* start rather than throw the way an explicit `--listen lan` does.
|
|
84
|
+
*/
|
|
85
|
+
export declare function listenPlan(spec: string | undefined, opts?: {
|
|
86
|
+
headless?: boolean;
|
|
87
|
+
hasLan?: boolean;
|
|
88
|
+
}): ListenPlan;
|
|
21
89
|
/** Whether a bind on this address also answers on 127.0.0.1. */
|
|
22
90
|
export declare function coversLoopback(host: string): boolean;
|
|
23
91
|
/** Bracket a bare IPv6 literal so it can sit in a URL. */
|
package/dist/remote/lan.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lan.d.ts","sourceRoot":"","sources":["../../src/remote/lan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lan.d.ts","sourceRoot":"","sources":["../../src/remote/lan.ts"],"names":[],"mappings":"AAgDA;;;;;;GAMG;AACH,wBAAgB,UAAU,IAAI,MAAM,GAAG,IAAI,CAE1C;AAED,oFAAoF;AACpF,MAAM,WA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