@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.
Files changed (89) hide show
  1. package/README.md +211 -79
  2. package/dist/agents/detect.d.ts +27 -0
  3. package/dist/agents/detect.d.ts.map +1 -0
  4. package/dist/agents/detect.js +210 -0
  5. package/dist/agents/detect.js.map +1 -0
  6. package/dist/agents/profiles.d.ts +119 -2
  7. package/dist/agents/profiles.d.ts.map +1 -1
  8. package/dist/agents/profiles.js +224 -4
  9. package/dist/agents/profiles.js.map +1 -1
  10. package/dist/agents/templates.d.ts +100 -0
  11. package/dist/agents/templates.d.ts.map +1 -0
  12. package/dist/agents/templates.js +165 -0
  13. package/dist/agents/templates.js.map +1 -0
  14. package/dist/agents/wiring.d.ts +30 -1
  15. package/dist/agents/wiring.d.ts.map +1 -1
  16. package/dist/agents/wiring.js +182 -10
  17. package/dist/agents/wiring.js.map +1 -1
  18. package/dist/cli.js +51 -14
  19. package/dist/cli.js.map +1 -1
  20. package/dist/db/migrations.d.ts.map +1 -1
  21. package/dist/db/migrations.js +73 -0
  22. package/dist/db/migrations.js.map +1 -1
  23. package/dist/db/store.d.ts +53 -1
  24. package/dist/db/store.d.ts.map +1 -1
  25. package/dist/db/store.js +118 -5
  26. package/dist/db/store.js.map +1 -1
  27. package/dist/hub.d.ts +264 -6
  28. package/dist/hub.d.ts.map +1 -1
  29. package/dist/hub.js +549 -33
  30. package/dist/hub.js.map +1 -1
  31. package/dist/hub.tgz +0 -0
  32. package/dist/mcp/server.d.ts +3 -0
  33. package/dist/mcp/server.d.ts.map +1 -1
  34. package/dist/mcp/server.js +27 -2
  35. package/dist/mcp/server.js.map +1 -1
  36. package/dist/protocol/domain.d.ts +88 -0
  37. package/dist/protocol/domain.d.ts.map +1 -1
  38. package/dist/protocol/domain.js +114 -0
  39. package/dist/protocol/domain.js.map +1 -1
  40. package/dist/protocol/mcp-tools.d.ts +43 -0
  41. package/dist/protocol/mcp-tools.d.ts.map +1 -1
  42. package/dist/protocol/mcp-tools.js +65 -0
  43. package/dist/protocol/mcp-tools.js.map +1 -1
  44. package/dist/protocol/peer.d.ts +38 -1
  45. package/dist/protocol/peer.d.ts.map +1 -1
  46. package/dist/protocol/peer.js +41 -2
  47. package/dist/protocol/peer.js.map +1 -1
  48. package/dist/protocol/ws.d.ts +259 -0
  49. package/dist/protocol/ws.d.ts.map +1 -1
  50. package/dist/protocol/ws.js +169 -5
  51. package/dist/protocol/ws.js.map +1 -1
  52. package/dist/remote/deployer.d.ts.map +1 -1
  53. package/dist/remote/deployer.js +15 -2
  54. package/dist/remote/deployer.js.map +1 -1
  55. package/dist/remote/join-script.d.ts.map +1 -1
  56. package/dist/remote/join-script.js +34 -2
  57. package/dist/remote/join-script.js.map +1 -1
  58. package/dist/remote/lan.d.ts +73 -5
  59. package/dist/remote/lan.d.ts.map +1 -1
  60. package/dist/remote/lan.js +119 -10
  61. package/dist/remote/lan.js.map +1 -1
  62. package/dist/remote/peer-serve.d.ts.map +1 -1
  63. package/dist/remote/peer-serve.js +32 -3
  64. package/dist/remote/peer-serve.js.map +1 -1
  65. package/dist/remote/peer.d.ts +7 -0
  66. package/dist/remote/peer.d.ts.map +1 -1
  67. package/dist/remote/peer.js +22 -0
  68. package/dist/remote/peer.js.map +1 -1
  69. package/dist/remote/registry.d.ts +70 -2
  70. package/dist/remote/registry.d.ts.map +1 -1
  71. package/dist/remote/registry.js +134 -10
  72. package/dist/remote/registry.js.map +1 -1
  73. package/dist/server.d.ts +22 -3
  74. package/dist/server.d.ts.map +1 -1
  75. package/dist/server.js +239 -117
  76. package/dist/server.js.map +1 -1
  77. package/dist/session/manager.d.ts +60 -4
  78. package/dist/session/manager.d.ts.map +1 -1
  79. package/dist/session/manager.js +198 -41
  80. package/dist/session/manager.js.map +1 -1
  81. package/dist/session/pty.d.ts +19 -0
  82. package/dist/session/pty.d.ts.map +1 -1
  83. package/dist/session/pty.js +84 -1
  84. package/dist/session/pty.js.map +1 -1
  85. package/package.json +1 -1
  86. package/web/assets/{index-BOqZOoep.js → index-9Z_8xZqk.js} +10 -6
  87. package/web/assets/index-DheUm5dl.css +1 -0
  88. package/web/index.html +2 -2
  89. package/web/assets/index-B2JtCtHa.css +0 -1
package/dist/hub.d.ts CHANGED
@@ -1,15 +1,17 @@
1
1
  import { EventEmitter } from 'node:events';
2
- import { type Message, type Host, type Session, type Viewport, type WindowRect, type Workspace } from './protocol/index.js';
2
+ import { type AgentTemplateInfo, type Message, type Host, type Session, type TemplateProposal, type Viewport, type WindowRect, type Workspace } from './protocol/index.js';
3
3
  import { type Db } from './db/index.js';
4
4
  import { Store } from './db/store.js';
5
5
  import { ProfileRegistry } from './agents/profiles.js';
6
+ import { AgentDetector } from './agents/detect.js';
7
+ import { TemplateRegistry } from './agents/templates.js';
6
8
  import { TokenRegistry } from './agents/tokens.js';
7
9
  import { MessageRouter } from './agents/router.js';
8
10
  import { SessionManager } from './session/manager.js';
9
11
  import type { AgentApi } from './mcp/server.js';
10
12
  import { PeerRegistry } from './remote/registry.js';
11
13
  import type { Uplink } from './remote/peer-serve.js';
12
- export declare const HUB_VERSION = "0.1.0";
14
+ export declare const HUB_VERSION = "0.1.2";
13
15
  /** How many agents one workspace may hold, bounding runaway recursive spawns. */
14
16
  export declare const DEFAULT_SPAWN_CAP = 12;
15
17
  export interface HubOptions {
@@ -24,6 +26,16 @@ export declare class Hub extends EventEmitter implements AgentApi {
24
26
  readonly db: Db;
25
27
  readonly store: Store;
26
28
  readonly profiles: ProfileRegistry;
29
+ /**
30
+ * What the picker offers: an agent plus a model, an effort and a first task.
31
+ *
32
+ * Reassigned rather than mutated when a template is saved or removed: the
33
+ * list is a merge of three sources and one write can change a row nobody
34
+ * touched, so the answer is a fresh load rather than a patched one.
35
+ */
36
+ templates: TemplateRegistry;
37
+ /** What of those profiles this machine actually has installed. */
38
+ readonly agents: AgentDetector;
27
39
  readonly tokens: TokenRegistry;
28
40
  readonly sessions: SessionManager;
29
41
  readonly router: MessageRouter;
@@ -38,6 +50,18 @@ export declare class Hub extends EventEmitter implements AgentApi {
38
50
  /** Live SSH tunnels, keyed by host id. Not persisted: they die with the hub. */
39
51
  private readonly tunnels;
40
52
  private readonly spawnCap;
53
+ /**
54
+ * Proposals waiting on a human, newest last. In memory on purpose: the agent
55
+ * waiting for the answer dies with the hub, so a proposal that outlived both
56
+ * would be a dialog nobody could be told the outcome of.
57
+ */
58
+ private readonly proposals;
59
+ /**
60
+ * How many browsers are looking. The hub cannot see its own sockets - the
61
+ * server owns those - so it is told, and it only uses this to answer an
62
+ * agent honestly about whether anyone is there to decide.
63
+ */
64
+ private viewers;
41
65
  constructor(opts?: HubOptions);
42
66
  /**
43
67
  * A persisted `connected` is a lie the moment this process starts: the
@@ -65,7 +89,125 @@ export declare class Hub extends EventEmitter implements AgentApi {
65
89
  setUplink(uplink: Uplink | null): void;
66
90
  setOrigin(origin: string): void;
67
91
  createWorkspace(name: string, rootPath: string, hostId?: string | null): Workspace;
92
+ /**
93
+ * Rename a workspace, or point it at a different folder.
94
+ *
95
+ * The rename is the fussy half. A workspace's name is the first segment of
96
+ * every agent address in it (`workspace/agent`), and those addresses are
97
+ * stored on the session rows, written into each agent's brief, and held by
98
+ * peers on other machines. Rewriting all of that under running agents would
99
+ * change what they had already been told they were called, so a rename is
100
+ * refused while anything is running here. Stopping an agent is a cheap thing
101
+ * to ask and an honest one; silently breaking message delivery is not.
102
+ *
103
+ * Repointing the folder is not fussy at all: a session records its own cwd
104
+ * at launch and resume rebuilds from that, so only agents started afterwards
105
+ * see the new path.
106
+ */
107
+ updateWorkspace(id: string, patch: {
108
+ name?: string;
109
+ rootPath?: string;
110
+ }): Workspace;
68
111
  removeWorkspace(id: string): Promise<void>;
112
+ /**
113
+ * Create a template or replace one, from the panel.
114
+ *
115
+ * Refusals happen here, on the values, before anything is written - which is
116
+ * the whole reason this carries a requestId. The rules are the loader's own,
117
+ * called rather than restated: an agent that declares no way to spell a
118
+ * model or an effort cannot be given one.
119
+ *
120
+ * An id `agents.toml` has claimed is refused outright instead of being
121
+ * stored and then silently losing to the file at load. Storing it would
122
+ * leave a row in the database that never appears in the list, which is a
123
+ * worse thing to explain than a dialog that says no.
124
+ */
125
+ saveTemplate(input: {
126
+ id: string;
127
+ agent: string;
128
+ description?: string | null;
129
+ model?: string | null;
130
+ effort?: string | null;
131
+ prompt?: string | null;
132
+ env?: Record<string, string>;
133
+ }): AgentTemplateInfo;
134
+ /**
135
+ * Everything that can say no about a template, in one place.
136
+ *
137
+ * Shared by the panel and by an agent's proposal so the two cannot drift:
138
+ * an agent should be refused by exactly the rule a human would be, and a
139
+ * proposal that would fail on accept must fail while the agent is still
140
+ * there to be told why.
141
+ */
142
+ private candidateTemplate;
143
+ /**
144
+ * Remove a stored template.
145
+ *
146
+ * Nothing running is disturbed, and nothing pretends otherwise: a session
147
+ * records what its template resolved to precisely so resume cannot drift, so
148
+ * the agents this one started keep their model, their effort and their
149
+ * ability to come back. Removing one that shadowed an agent's bare template
150
+ * reveals that bare one again rather than emptying a row.
151
+ */
152
+ removeTemplate(id: string): void;
153
+ /**
154
+ * Rebuild the merged list and tell everyone.
155
+ *
156
+ * Rebuilt rather than patched because the merge is what changed: one write
157
+ * can alter a row nobody touched - removing a stored template reveals the
158
+ * derived one under it - and only a fresh load knows that.
159
+ */
160
+ private reloadTemplates;
161
+ /** Told by the server, which owns the sockets. */
162
+ setViewers(n: number): void;
163
+ pendingProposals(): TemplateProposal[];
164
+ /**
165
+ * An agent asking for a template.
166
+ *
167
+ * Everything that can be refused is refused here, before a human is shown
168
+ * anything: nobody should be asked to approve a template that cannot load.
169
+ * What survives is put in front of whoever is watching, and the tool returns
170
+ * at once - a call that blocked until somebody wandered back to the canvas
171
+ * would be a stalled agent, and MCP clients time out.
172
+ */
173
+ proposeTemplate(sessionId: string, input: {
174
+ id: string;
175
+ agent: string;
176
+ description?: string;
177
+ model?: string;
178
+ effort?: string;
179
+ prompt?: string;
180
+ }): Promise<{
181
+ proposalId: string;
182
+ status: string;
183
+ anyoneWatching: boolean;
184
+ note: string;
185
+ }>;
186
+ /**
187
+ * A human's answer.
188
+ *
189
+ * What is accepted is what the dialog showed rather than what the agent
190
+ * asked for, because this is a proposal and editing it is the likely path -
191
+ * so the fields come back with the answer.
192
+ */
193
+ resolveTemplateProposal(proposalId: string, accept: boolean, edits?: {
194
+ id?: string;
195
+ agent?: string;
196
+ description?: string | null;
197
+ model?: string | null;
198
+ effort?: string | null;
199
+ prompt?: string | null;
200
+ env?: Record<string, string>;
201
+ }): void;
202
+ /**
203
+ * A notice from the hub itself, typed into an agent's terminal.
204
+ *
205
+ * Its own prefix, deliberately neither `[from <address>]` nor bare text: it
206
+ * is not a peer talking and it is not the human either, and an agent that
207
+ * mistook it for one of those would either reply into the void or treat it
208
+ * as an instruction.
209
+ */
210
+ private tellAgent;
69
211
  addHost(input: {
70
212
  label: string;
71
213
  sshHost: string;
@@ -73,6 +215,21 @@ export declare class Hub extends EventEmitter implements AgentApi {
73
215
  sshPort: number;
74
216
  privateKeyPath?: string;
75
217
  }): Host;
218
+ /**
219
+ * Correct a host's details after the fact.
220
+ *
221
+ * Nothing here reconnects: an ssh detail that was wrong is usually being
222
+ * fixed while the host sits in `error`, and the reconnect is the next thing
223
+ * the operator does on purpose. Saving and dialling in one step would also
224
+ * mean a typo in the label re-runs a deploy.
225
+ */
226
+ updateHost(hostId: string, patch: {
227
+ label?: string;
228
+ sshHost?: string;
229
+ sshUser?: string;
230
+ sshPort?: number;
231
+ privateKeyPath?: string;
232
+ }): Host;
76
233
  /**
77
234
  * Drop a host from the canvas, and stop the hub running on it.
78
235
  *
@@ -88,13 +245,69 @@ export declare class Hub extends EventEmitter implements AgentApi {
88
245
  * the local database.
89
246
  */
90
247
  connectHost(hostId: string): Promise<void>;
248
+ /**
249
+ * Turn what the picker sent into an agent, a model and an effort.
250
+ *
251
+ * `profile` on the wire is a *template* id, and it is still called profile
252
+ * because every agent has a bare template under its own name - so the value
253
+ * a client sent before templates existed still resolves, to the same thing
254
+ * it always did. Anything the caller passed explicitly beats the template,
255
+ * which is what makes the dialog's model dropdown an override rather than a
256
+ * second source of truth.
257
+ */
258
+ private resolveTemplate;
91
259
  startSession(opts: {
92
260
  workspaceId: string;
93
261
  profile: string;
262
+ model?: string;
263
+ effort?: string;
264
+ prompt?: string;
265
+ name?: string;
266
+ cwd?: string;
267
+ spawnedBy?: string | null;
268
+ }): Promise<Session>;
269
+ /**
270
+ * Start an agent whose template has already been resolved to values.
271
+ *
272
+ * Its own entry point because the peer path must not resolve again. A
273
+ * template is config and the two machines do not share config: if this hub
274
+ * happened to declare `[template.claude]` with a model, re-resolving an
275
+ * agent id the canvas sent would apply a choice the canvas never made.
276
+ */
277
+ startResolved(opts: {
278
+ workspaceId: string;
279
+ agent: string;
280
+ /** The id to start under, chosen by the canvas when this is a peer start. */
281
+ id?: string;
282
+ template?: string | null;
283
+ model?: string;
284
+ effort?: string;
285
+ prompt?: string;
286
+ env?: Record<string, string>;
94
287
  name?: string;
95
288
  cwd?: string;
96
289
  spawnedBy?: string | null;
97
290
  }): Promise<Session>;
291
+ /**
292
+ * The brief for an agent that cannot be handed one, or null.
293
+ *
294
+ * Read back off disk rather than re-rendered: the wiring wrote exactly this
295
+ * text a moment ago, and rendering it twice is two chances to render it
296
+ * differently. A profile with `brief: 'flag'` returns null here because its
297
+ * argv already carries the path.
298
+ */
299
+ private typedBrief;
300
+ /**
301
+ * Bring a stopped session back, and re-brief it if its brief was typed.
302
+ *
303
+ * The re-brief is why this exists rather than callers reaching for
304
+ * `sessions.resume` directly. A CLI that had to be told where it is by
305
+ * having text typed at it remembers none of that across a restart, and
306
+ * neither of the two in that position is resumable in the first place - so
307
+ * what comes back is a fresh conversation that has never been told it has an
308
+ * address or any peers.
309
+ */
310
+ resumeSession(sessionId: string): Promise<Session>;
98
311
  resumeWorkspace(workspaceId: string): Promise<Session[]>;
99
312
  moveWindow(sessionId: string, rect: WindowRect): void;
100
313
  setViewport(v: Viewport): void;
@@ -111,6 +324,40 @@ export declare class Hub extends EventEmitter implements AgentApi {
111
324
  * care whether a peer is on this machine or a remote one; the address is
112
325
  * the whole interface.
113
326
  */
327
+ /**
328
+ * The templates an agent can start something from.
329
+ *
330
+ * Exposed because spawn_agent takes a template id and there was no way to
331
+ * find out what the ids were: an agent could only pass its own profile, or
332
+ * guess. The environment a template sets is deliberately *not* returned —
333
+ * knowing that a template exists is what an agent needs to use it, and the
334
+ * values in there are credentials more often than not.
335
+ */
336
+ listTemplates(sessionId: string, id?: string): Promise<{
337
+ id: string;
338
+ description: string;
339
+ agent: string;
340
+ model: string | null;
341
+ effort: string | null;
342
+ prompt: string | null;
343
+ /** Names only, so a template's own config is described but not leaked. */
344
+ envNames: string[];
345
+ error: string | null;
346
+ source: "derived" | "stored" | "file";
347
+ } | {
348
+ templates: {
349
+ id: string;
350
+ description: string;
351
+ agent: string;
352
+ model: string | null;
353
+ effort: string | null;
354
+ prompt: string | null;
355
+ /** Names only, so a template's own config is described but not leaked. */
356
+ envNames: string[];
357
+ error: string | null;
358
+ source: "derived" | "stored" | "file";
359
+ }[];
360
+ }>;
114
361
  listAgents(sessionId: string, workspace?: string): Promise<{
115
362
  address: string;
116
363
  workspace: string | null;
@@ -164,11 +411,22 @@ export declare class Hub extends EventEmitter implements AgentApi {
164
411
  promptQueued: boolean;
165
412
  }>;
166
413
  /**
167
- * Wait for a freshly spawned agent to produce output (its prompt) before
168
- * injecting the first instruction. Bounded so a CLI that never prints
169
- * cannot leave this hanging.
414
+ * A template's opening instruction, typed in plainly.
415
+ *
416
+ * Deliberately without the `[from <address>]` prefix: that is right for a
417
+ * message from a peer and wrong for an instruction from the human sitting in
418
+ * front of the canvas. The agent's brief tells it that a `[from ...]` line is
419
+ * a colleague rather than the human, so wearing that prefix here would be a
420
+ * lie about who is asking.
421
+ */
422
+ private deliverOpeningInstruction;
423
+ /**
424
+ * Wait for the CLI to be up, then type. Written straight away the text lands
425
+ * before the program is reading it; the wait is for output to arrive and
426
+ * then pause, which is as close to "it has drawn its prompt" as this gets
427
+ * without knowing the CLI.
170
428
  */
171
- private deliverInitialPrompt;
429
+ private typeWhenReady;
172
430
  readScreen(sessionId: string, address: string, lines?: number): Promise<unknown>;
173
431
  /**
174
432
  * read_screen for a caller this hub has already established — either an
package/dist/hub.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,IAAI,EAGT,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAU,KAAK,EAAE,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAKrD,eAAO,MAAM,WAAW,UAAU,CAAC;AAmBnC,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,qBAAa,GAAI,SAAQ,YAAa,YAAW,QAAQ;IACvD,QAAQ,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