@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
@@ -11,6 +11,21 @@ export const ListAgentsInput = z.object({
11
11
  .optional()
12
12
  .describe('Limit to one workspace. Defaults to all workspaces on all hosts.'),
13
13
  });
14
+ /**
15
+ * Listing templates, and reading one in full.
16
+ *
17
+ * One tool rather than two. The list is short — a handful of names — and the
18
+ * only reason to ask for details is to decide between them, so a second
19
+ * round-trip to fetch what the first should have carried is a step nobody
20
+ * benefits from. `id` narrows it to one, which is what "template details"
21
+ * means when there are enough of them to want just one.
22
+ */
23
+ export const ListTemplatesInput = z.object({
24
+ id: z
25
+ .string()
26
+ .optional()
27
+ .describe('Just this one template, in full. Omit to list them all.'),
28
+ });
14
29
  export const SendMessageInput = z.object({
15
30
  to: z
16
31
  .string()
@@ -39,8 +54,58 @@ export const SetStatusInput = z.object({
39
54
  export const StopAgentInput = z.object({
40
55
  address: z.string().describe('Agent to stop. You may only stop agents you spawned.'),
41
56
  });
57
+ /**
58
+ * Note the verb. This asks; it does not do. A template changes how *future*
59
+ * agents are launched, on every machine, with nobody necessarily watching, so
60
+ * a human confirms it before it exists. The tool returns as soon as the
61
+ * proposal is put in front of them, and the answer arrives in your terminal.
62
+ *
63
+ * The name is about the mechanism, and the description has to make up for it.
64
+ * The commonest case is not an agent volunteering a template - it is a human
65
+ * saying "add a template", which an agent will otherwise read as a change to
66
+ * Termscape's own source code and go looking for a checkout. So the
67
+ * description leads with that, and says plainly that a Termscape template is
68
+ * made here rather than in a repository.
69
+ */
70
+ export const ProposeTemplateInput = z.object({
71
+ id: z
72
+ .string()
73
+ .min(1)
74
+ .max(60)
75
+ .describe('Name for the template, as it will appear in the picker, e.g. "reviewer".'),
76
+ agent: z
77
+ .string()
78
+ .min(1)
79
+ .describe('Agent profile id it launches, e.g. "claude". Use list_agents to see what exists.'),
80
+ description: z
81
+ .string()
82
+ .max(200)
83
+ .optional()
84
+ .describe('One line shown beside the name in the picker.'),
85
+ model: z
86
+ .string()
87
+ .optional()
88
+ .describe('Model to launch on. Refused if that agent takes no model on the command line.'),
89
+ effort: z
90
+ .string()
91
+ .optional()
92
+ .describe('Reasoning effort. Refused if that agent has no effort setting.'),
93
+ prompt: z
94
+ .string()
95
+ .max(4000)
96
+ .optional()
97
+ .describe('First instruction, typed in once the agent is up.'),
98
+ });
42
99
  /** Max bytes accepted in a single send_message body (mirrors the zod cap). */
43
100
  export const MAX_MESSAGE_BYTES = 8000;
44
101
  /** Per-sender delivery budget, enforced by the router. */
45
102
  export const MESSAGE_RATE_LIMIT = { windowMs: 10_000, max: 20 };
103
+ /**
104
+ * How many proposals one agent may have waiting at once.
105
+ *
106
+ * Bounded for the reason send_message is: a confused agent must not be able to
107
+ * bury the canvas in dialogs. Small, because a human answers these one at a
108
+ * time and an agent with three unanswered questions does not need a fourth.
109
+ */
110
+ export const MAX_PENDING_PROPOSALS = 3;
46
111
  //# sourceMappingURL=mcp-tools.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-tools.js","sourceRoot":"","sources":["../src/mcp-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAExC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,kEAAkE,CAAC;CAChF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,CAAC;SACF,MAAM,EAAE;SACR,QAAQ,CAAC,sEAAsE,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GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,kFAAkF,CAAC;IAC/F,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,+CAA+C,CAAC;IAC5D,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,+EAA+E,CAAC;IAC5F,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gEAAgE,CAAC;IAC7E,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,IAAI,CAAC;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,mDAAmD,CAAC;CACjE,CAAC,CAAC;AAYH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AACtC,0DAA0D;AAC1D,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAW,CAAC;AACzE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC"}
@@ -93,14 +93,23 @@ export declare const PeerRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
93
93
  }, z.core.$strip>, z.ZodObject<{
94
94
  t: z.ZodLiteral<"listSessions">;
95
95
  id: z.ZodString;
96
+ }, z.core.$strip>, z.ZodObject<{
97
+ t: z.ZodLiteral<"listAgents">;
98
+ id: z.ZodString;
96
99
  }, z.core.$strip>, z.ZodObject<{
97
100
  t: z.ZodLiteral<"startSession">;
98
101
  id: z.ZodString;
99
102
  workspaceName: z.ZodString;
100
103
  rootPath: z.ZodString;
101
104
  profile: z.ZodString;
105
+ template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
+ model: z.ZodOptional<z.ZodString>;
107
+ effort: z.ZodOptional<z.ZodString>;
108
+ prompt: z.ZodOptional<z.ZodString>;
109
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
102
110
  name: z.ZodOptional<z.ZodString>;
103
111
  spawnedByAddress: z.ZodNullable<z.ZodString>;
112
+ sessionId: z.ZodOptional<z.ZodString>;
104
113
  }, z.core.$strip>, z.ZodObject<{
105
114
  t: z.ZodLiteral<"stopSession">;
106
115
  id: z.ZodString;
@@ -198,6 +207,9 @@ export declare const PeerResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
198
207
  name: z.ZodString;
199
208
  address: z.ZodString;
200
209
  profile: z.ZodString;
210
+ template: z.ZodNullable<z.ZodString>;
211
+ model: z.ZodNullable<z.ZodString>;
212
+ effort: z.ZodNullable<z.ZodString>;
201
213
  cwd: z.ZodString;
202
214
  agentSessionUuid: z.ZodNullable<z.ZodString>;
203
215
  spawnedBy: z.ZodNullable<z.ZodString>;
@@ -232,6 +244,28 @@ export declare const PeerResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
232
244
  collapsed: z.ZodBoolean;
233
245
  }, z.core.$strip>;
234
246
  }, z.core.$strip>>;
247
+ }, z.core.$strip>, z.ZodObject<{
248
+ t: z.ZodLiteral<"agents">;
249
+ agents: z.ZodArray<z.ZodObject<{
250
+ id: z.ZodString;
251
+ description: z.ZodString;
252
+ mcp: z.ZodBoolean;
253
+ resumable: z.ZodBoolean;
254
+ command: z.ZodString;
255
+ commandPath: z.ZodNullable<z.ZodString>;
256
+ available: z.ZodNullable<z.ZodBoolean>;
257
+ version: z.ZodNullable<z.ZodString>;
258
+ detail: z.ZodNullable<z.ZodString>;
259
+ models: z.ZodArray<z.ZodString>;
260
+ modelSource: z.ZodEnum<{
261
+ listed: "listed";
262
+ declared: "declared";
263
+ none: "none";
264
+ }>;
265
+ takesModel: z.ZodBoolean;
266
+ takesEffort: z.ZodBoolean;
267
+ efforts: z.ZodArray<z.ZodString>;
268
+ }, z.core.$strip>>;
235
269
  }, z.core.$strip>, z.ZodObject<{
236
270
  t: z.ZodLiteral<"sessionUpserted">;
237
271
  session: z.ZodObject<{
@@ -240,6 +274,9 @@ export declare const PeerResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
240
274
  name: z.ZodString;
241
275
  address: z.ZodString;
242
276
  profile: z.ZodString;
277
+ template: z.ZodNullable<z.ZodString>;
278
+ model: z.ZodNullable<z.ZodString>;
279
+ effort: z.ZodNullable<z.ZodString>;
243
280
  cwd: z.ZodString;
244
281
  agentSessionUuid: z.ZodNullable<z.ZodString>;
245
282
  spawnedBy: z.ZodNullable<z.ZodString>;
@@ -300,5 +337,5 @@ export type PeerResponse = z.infer<typeof PeerResponse>;
300
337
  * Bumped whenever the peer protocol or the DB schema changes shape. Hubs
301
338
  * refuse to connect across a mismatch rather than corrupting each other.
302
339
  */
303
- export declare const PEER_SCHEMA_VERSION = 5;
340
+ export declare const PEER_SCHEMA_VERSION = 6;
304
341
  //# sourceMappingURL=peer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"peer.d.ts","sourceRoot":"","sources":["../src/peer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;iBASpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD;;;;;;;;GAQG;AACH;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;;;;;;;;;wBAcvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,eAAO,MAAM,SAAS;;;;;;;;;;;iBAkBpB,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0BvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { AgentStatus, Session, SessionState } from './domain.js';
2
+ import { AgentProfileInfo, AgentStatus, Session, SessionState } from './domain.js';
3
3
  /**
4
4
  * Hub-to-hub RPC.
5
5
  *
@@ -84,14 +84,50 @@ export const PeerHello = z.object({
84
84
  export const PeerRequest = z.discriminatedUnion('t', [
85
85
  PeerHello,
86
86
  z.object({ t: z.literal('listSessions'), id: z.string() }),
87
+ /**
88
+ * What agent CLIs that machine has. Asked rather than assumed: a host has
89
+ * its own PATH, and starting an agent over there sends a profile id which
90
+ * it resolves against its own config - so an agent it does not have fails
91
+ * at launch with a spawn error the canvas could have predicted.
92
+ */
93
+ z.object({ t: z.literal('listAgents'), id: z.string() }),
87
94
  z.object({
88
95
  t: z.literal('startSession'),
89
96
  id: z.string(),
90
97
  workspaceName: z.string(),
91
98
  rootPath: z.string(),
99
+ /** The *agent* id, resolved from the template before it crossed. */
92
100
  profile: z.string(),
101
+ /**
102
+ * Resolved values rather than a template id.
103
+ *
104
+ * A template is config, and the two machines do not share config: a name
105
+ * that means "opus, high effort" here may mean nothing over there, or
106
+ * something else. Resolving before the request crosses is the smaller
107
+ * change and the only one that works when the two disagree. The template
108
+ * id travels only so the window can say which one was picked.
109
+ */
110
+ template: z.string().nullable().optional(),
111
+ model: z.string().optional(),
112
+ effort: z.string().optional(),
113
+ prompt: z.string().optional(),
114
+ /**
115
+ * Extra environment the template asked for, already resolved to values —
116
+ * the template itself never crosses, for the reason above.
117
+ */
118
+ env: z.record(z.string(), z.string()).optional(),
93
119
  name: z.string().optional(),
94
120
  spawnedByAddress: z.string().nullable(),
121
+ /**
122
+ * The id the canvas has already chosen for the child.
123
+ *
124
+ * The child's first upsert crosses before the start request's reply does,
125
+ * and the canvas keeps the lineage — who spawned this — keyed on this id,
126
+ * so it can stamp that first upsert no matter what the child ends up
127
+ * being called. Without it the canvas could only guess the address from a
128
+ * name that may not even have been given.
129
+ */
130
+ sessionId: z.string().optional(),
95
131
  }),
96
132
  z.object({ t: z.literal('stopSession'), id: z.string(), address: z.string() }),
97
133
  // Closing a window has to reach the hub that owns the PTY. Handled locally
@@ -167,6 +203,9 @@ export const PeerResponse = z.discriminatedUnion('t', [
167
203
  z.object({ t: z.literal('err'), id: z.string(), message: z.string() }),
168
204
  // Unsolicited: the peer pushing state changes and terminal output.
169
205
  z.object({ t: z.literal('sessions'), sessions: z.array(Session) }),
206
+ // Unsolicited as well as in reply: that machine's detection finishes after
207
+ // it connects, and again whenever it is refreshed over there.
208
+ z.object({ t: z.literal('agents'), agents: z.array(AgentProfileInfo) }),
170
209
  z.object({ t: z.literal('sessionUpserted'), session: Session }),
171
210
  z.object({ t: z.literal('sessionRemoved'), address: z.string() }),
172
211
  z.object({ t: z.literal('output'), address: z.string(), data: z.string() }),
@@ -179,5 +218,5 @@ export const PeerResponse = z.discriminatedUnion('t', [
179
218
  * Bumped whenever the peer protocol or the DB schema changes shape. Hubs
180
219
  * refuse to connect across a mismatch rather than corrupting each other.
181
220
  */
182
- export const PEER_SCHEMA_VERSION = 5;
221
+ export const PEER_SCHEMA_VERSION = 6;
183
222
  //# sourceMappingURL=peer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"peer.js","sourceRoot":"","sources":["../src/peer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEjE;;;;;;;;;;;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AO,CAAC,EAAE,CAAC;IAClE,2EAA2E;IAC3E,8DAA8D;IAC9D,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC;IACvE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC/D,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IACjE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IAC3E,0EAA0E;IAC1E,sEAAsE;IACtE,mDAAmD;IACnD,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC;CAC5E,CAAC,CAAC;AAGH;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC"}
@@ -27,16 +27,54 @@ export declare const ClientMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
27
27
  rows: z.ZodNumber;
28
28
  }, z.core.$strip>, z.ZodObject<{
29
29
  t: z.ZodLiteral<"createWorkspace">;
30
+ requestId: z.ZodOptional<z.ZodString>;
30
31
  name: z.ZodString;
31
32
  rootPath: z.ZodString;
32
33
  hostId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ }, z.core.$strip>, z.ZodObject<{
35
+ t: z.ZodLiteral<"updateWorkspace">;
36
+ requestId: z.ZodOptional<z.ZodString>;
37
+ workspaceId: z.ZodString;
38
+ name: z.ZodOptional<z.ZodString>;
39
+ rootPath: z.ZodOptional<z.ZodString>;
33
40
  }, z.core.$strip>, z.ZodObject<{
34
41
  t: z.ZodLiteral<"removeWorkspace">;
42
+ requestId: z.ZodOptional<z.ZodString>;
35
43
  workspaceId: z.ZodString;
44
+ }, z.core.$strip>, z.ZodObject<{
45
+ t: z.ZodLiteral<"saveTemplate">;
46
+ requestId: z.ZodOptional<z.ZodString>;
47
+ id: z.ZodString;
48
+ agent: z.ZodString;
49
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
+ effort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
+ prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
54
+ }, z.core.$strip>, z.ZodObject<{
55
+ t: z.ZodLiteral<"removeTemplate">;
56
+ requestId: z.ZodOptional<z.ZodString>;
57
+ id: z.ZodString;
58
+ }, z.core.$strip>, z.ZodObject<{
59
+ t: z.ZodLiteral<"resolveTemplateProposal">;
60
+ requestId: z.ZodOptional<z.ZodString>;
61
+ proposalId: z.ZodString;
62
+ accept: z.ZodBoolean;
63
+ id: z.ZodOptional<z.ZodString>;
64
+ agent: z.ZodOptional<z.ZodString>;
65
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
67
+ effort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
68
+ prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
36
70
  }, z.core.$strip>, z.ZodObject<{
37
71
  t: z.ZodLiteral<"startSession">;
72
+ requestId: z.ZodOptional<z.ZodString>;
38
73
  workspaceId: z.ZodString;
39
74
  profile: z.ZodString;
75
+ model: z.ZodOptional<z.ZodString>;
76
+ effort: z.ZodOptional<z.ZodString>;
77
+ prompt: z.ZodOptional<z.ZodString>;
40
78
  name: z.ZodOptional<z.ZodString>;
41
79
  cwd: z.ZodOptional<z.ZodString>;
42
80
  }, z.core.$strip>, z.ZodObject<{
@@ -44,6 +82,7 @@ export declare const ClientMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
44
82
  sessionId: z.ZodString;
45
83
  }, z.core.$strip>, z.ZodObject<{
46
84
  t: z.ZodLiteral<"removeSession">;
85
+ requestId: z.ZodOptional<z.ZodString>;
47
86
  sessionId: z.ZodString;
48
87
  }, z.core.$strip>, z.ZodObject<{
49
88
  t: z.ZodLiteral<"resumeSession">;
@@ -71,19 +110,42 @@ export declare const ClientMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
71
110
  }, z.core.$strip>;
72
111
  }, z.core.$strip>, z.ZodObject<{
73
112
  t: z.ZodLiteral<"addHost">;
113
+ requestId: z.ZodOptional<z.ZodString>;
74
114
  label: z.ZodString;
75
115
  sshHost: z.ZodString;
76
116
  sshUser: z.ZodString;
77
117
  sshPort: z.ZodDefault<z.ZodNumber>;
78
118
  privateKeyPath: z.ZodOptional<z.ZodString>;
119
+ }, z.core.$strip>, z.ZodObject<{
120
+ t: z.ZodLiteral<"updateHost">;
121
+ requestId: z.ZodOptional<z.ZodString>;
122
+ hostId: z.ZodString;
123
+ label: z.ZodOptional<z.ZodString>;
124
+ sshHost: z.ZodOptional<z.ZodString>;
125
+ sshUser: z.ZodOptional<z.ZodString>;
126
+ sshPort: z.ZodOptional<z.ZodNumber>;
127
+ privateKeyPath: z.ZodOptional<z.ZodString>;
79
128
  }, z.core.$strip>, z.ZodObject<{
80
129
  t: z.ZodLiteral<"removeHost">;
130
+ requestId: z.ZodOptional<z.ZodString>;
81
131
  hostId: z.ZodString;
82
132
  }, z.core.$strip>, z.ZodObject<{
83
133
  t: z.ZodLiteral<"connectHost">;
84
134
  hostId: z.ZodString;
135
+ }, z.core.$strip>, z.ZodObject<{
136
+ t: z.ZodLiteral<"refreshAgents">;
85
137
  }, z.core.$strip>], "t">;
86
138
  export type ClientMsg = z.infer<typeof ClientMsg>;
139
+ /**
140
+ * The mutations a dialog drives, and so the ones that can be awaited.
141
+ *
142
+ * Listed by name rather than derived from the presence of `requestId`,
143
+ * because every message is structurally assignable to "might have a
144
+ * requestId" and the derived version would quietly include all of them.
145
+ */
146
+ export type AckableMsg = Extract<ClientMsg, {
147
+ t: 'createWorkspace' | 'updateWorkspace' | 'removeWorkspace' | 'saveTemplate' | 'removeTemplate' | 'resolveTemplateProposal' | 'startSession' | 'removeSession' | 'addHost' | 'updateHost' | 'removeHost';
148
+ }>;
87
149
  export declare const HubState: z.ZodObject<{
88
150
  hubVersion: z.ZodString;
89
151
  enrollUrl: z.ZodNullable<z.ZodString>;
@@ -128,6 +190,9 @@ export declare const HubState: z.ZodObject<{
128
190
  name: z.ZodString;
129
191
  address: z.ZodString;
130
192
  profile: z.ZodString;
193
+ template: z.ZodNullable<z.ZodString>;
194
+ model: z.ZodNullable<z.ZodString>;
195
+ effort: z.ZodNullable<z.ZodString>;
131
196
  cwd: z.ZodString;
132
197
  agentSessionUuid: z.ZodNullable<z.ZodString>;
133
198
  spawnedBy: z.ZodNullable<z.ZodString>;
@@ -185,7 +250,69 @@ export declare const HubState: z.ZodObject<{
185
250
  description: z.ZodString;
186
251
  mcp: z.ZodBoolean;
187
252
  resumable: z.ZodBoolean;
253
+ command: z.ZodString;
254
+ commandPath: z.ZodNullable<z.ZodString>;
255
+ available: z.ZodNullable<z.ZodBoolean>;
256
+ version: z.ZodNullable<z.ZodString>;
257
+ detail: z.ZodNullable<z.ZodString>;
258
+ models: z.ZodArray<z.ZodString>;
259
+ modelSource: z.ZodEnum<{
260
+ listed: "listed";
261
+ declared: "declared";
262
+ none: "none";
263
+ }>;
264
+ takesModel: z.ZodBoolean;
265
+ takesEffort: z.ZodBoolean;
266
+ efforts: z.ZodArray<z.ZodString>;
267
+ }, z.core.$strip>>;
268
+ templates: z.ZodArray<z.ZodObject<{
269
+ id: z.ZodString;
270
+ description: z.ZodString;
271
+ agent: z.ZodString;
272
+ model: z.ZodNullable<z.ZodString>;
273
+ effort: z.ZodNullable<z.ZodString>;
274
+ prompt: z.ZodNullable<z.ZodString>;
275
+ env: z.ZodRecord<z.ZodString, z.ZodString>;
276
+ error: z.ZodNullable<z.ZodString>;
277
+ source: z.ZodEnum<{
278
+ derived: "derived";
279
+ stored: "stored";
280
+ file: "file";
281
+ }>;
188
282
  }, z.core.$strip>>;
283
+ templateProposals: z.ZodArray<z.ZodObject<{
284
+ id: z.ZodString;
285
+ fromAddr: z.ZodString;
286
+ proposedAt: z.ZodNumber;
287
+ template: z.ZodObject<{
288
+ id: z.ZodString;
289
+ agent: z.ZodString;
290
+ description: z.ZodNullable<z.ZodString>;
291
+ model: z.ZodNullable<z.ZodString>;
292
+ effort: z.ZodNullable<z.ZodString>;
293
+ prompt: z.ZodNullable<z.ZodString>;
294
+ }, z.core.$strip>;
295
+ }, z.core.$strip>>;
296
+ hostProfiles: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
297
+ id: z.ZodString;
298
+ description: z.ZodString;
299
+ mcp: z.ZodBoolean;
300
+ resumable: z.ZodBoolean;
301
+ command: z.ZodString;
302
+ commandPath: z.ZodNullable<z.ZodString>;
303
+ available: z.ZodNullable<z.ZodBoolean>;
304
+ version: z.ZodNullable<z.ZodString>;
305
+ detail: z.ZodNullable<z.ZodString>;
306
+ models: z.ZodArray<z.ZodString>;
307
+ modelSource: z.ZodEnum<{
308
+ listed: "listed";
309
+ declared: "declared";
310
+ none: "none";
311
+ }>;
312
+ takesModel: z.ZodBoolean;
313
+ takesEffort: z.ZodBoolean;
314
+ efforts: z.ZodArray<z.ZodString>;
315
+ }, z.core.$strip>>>;
189
316
  }, z.core.$strip>;
190
317
  export type HubState = z.infer<typeof HubState>;
191
318
  export declare const ServerMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -234,6 +361,9 @@ export declare const ServerMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
234
361
  name: z.ZodString;
235
362
  address: z.ZodString;
236
363
  profile: z.ZodString;
364
+ template: z.ZodNullable<z.ZodString>;
365
+ model: z.ZodNullable<z.ZodString>;
366
+ effort: z.ZodNullable<z.ZodString>;
237
367
  cwd: z.ZodString;
238
368
  agentSessionUuid: z.ZodNullable<z.ZodString>;
239
369
  spawnedBy: z.ZodNullable<z.ZodString>;
@@ -291,7 +421,69 @@ export declare const ServerMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
291
421
  description: z.ZodString;
292
422
  mcp: z.ZodBoolean;
293
423
  resumable: z.ZodBoolean;
424
+ command: z.ZodString;
425
+ commandPath: z.ZodNullable<z.ZodString>;
426
+ available: z.ZodNullable<z.ZodBoolean>;
427
+ version: z.ZodNullable<z.ZodString>;
428
+ detail: z.ZodNullable<z.ZodString>;
429
+ models: z.ZodArray<z.ZodString>;
430
+ modelSource: z.ZodEnum<{
431
+ listed: "listed";
432
+ declared: "declared";
433
+ none: "none";
434
+ }>;
435
+ takesModel: z.ZodBoolean;
436
+ takesEffort: z.ZodBoolean;
437
+ efforts: z.ZodArray<z.ZodString>;
438
+ }, z.core.$strip>>;
439
+ templates: z.ZodArray<z.ZodObject<{
440
+ id: z.ZodString;
441
+ description: z.ZodString;
442
+ agent: z.ZodString;
443
+ model: z.ZodNullable<z.ZodString>;
444
+ effort: z.ZodNullable<z.ZodString>;
445
+ prompt: z.ZodNullable<z.ZodString>;
446
+ env: z.ZodRecord<z.ZodString, z.ZodString>;
447
+ error: z.ZodNullable<z.ZodString>;
448
+ source: z.ZodEnum<{
449
+ derived: "derived";
450
+ stored: "stored";
451
+ file: "file";
452
+ }>;
294
453
  }, z.core.$strip>>;
454
+ templateProposals: z.ZodArray<z.ZodObject<{
455
+ id: z.ZodString;
456
+ fromAddr: z.ZodString;
457
+ proposedAt: z.ZodNumber;
458
+ template: z.ZodObject<{
459
+ id: z.ZodString;
460
+ agent: z.ZodString;
461
+ description: z.ZodNullable<z.ZodString>;
462
+ model: z.ZodNullable<z.ZodString>;
463
+ effort: z.ZodNullable<z.ZodString>;
464
+ prompt: z.ZodNullable<z.ZodString>;
465
+ }, z.core.$strip>;
466
+ }, z.core.$strip>>;
467
+ hostProfiles: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
468
+ id: z.ZodString;
469
+ description: z.ZodString;
470
+ mcp: z.ZodBoolean;
471
+ resumable: z.ZodBoolean;
472
+ command: z.ZodString;
473
+ commandPath: z.ZodNullable<z.ZodString>;
474
+ available: z.ZodNullable<z.ZodBoolean>;
475
+ version: z.ZodNullable<z.ZodString>;
476
+ detail: z.ZodNullable<z.ZodString>;
477
+ models: z.ZodArray<z.ZodString>;
478
+ modelSource: z.ZodEnum<{
479
+ listed: "listed";
480
+ declared: "declared";
481
+ none: "none";
482
+ }>;
483
+ takesModel: z.ZodBoolean;
484
+ takesEffort: z.ZodBoolean;
485
+ efforts: z.ZodArray<z.ZodString>;
486
+ }, z.core.$strip>>>;
295
487
  }, z.core.$strip>;
296
488
  }, z.core.$strip>, z.ZodObject<{
297
489
  t: z.ZodLiteral<"sessionUpserted">;
@@ -301,6 +493,9 @@ export declare const ServerMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
301
493
  name: z.ZodString;
302
494
  address: z.ZodString;
303
495
  profile: z.ZodString;
496
+ template: z.ZodNullable<z.ZodString>;
497
+ model: z.ZodNullable<z.ZodString>;
498
+ effort: z.ZodNullable<z.ZodString>;
304
499
  cwd: z.ZodString;
305
500
  agentSessionUuid: z.ZodNullable<z.ZodString>;
306
501
  spawnedBy: z.ZodNullable<z.ZodString>;
@@ -353,6 +548,41 @@ export declare const ServerMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
353
548
  createdAt: z.ZodNumber;
354
549
  archivedAt: z.ZodNullable<z.ZodNumber>;
355
550
  }, z.core.$strip>;
551
+ }, z.core.$strip>, z.ZodObject<{
552
+ t: z.ZodLiteral<"templatesChanged">;
553
+ templates: z.ZodArray<z.ZodObject<{
554
+ id: z.ZodString;
555
+ description: z.ZodString;
556
+ agent: z.ZodString;
557
+ model: z.ZodNullable<z.ZodString>;
558
+ effort: z.ZodNullable<z.ZodString>;
559
+ prompt: z.ZodNullable<z.ZodString>;
560
+ env: z.ZodRecord<z.ZodString, z.ZodString>;
561
+ error: z.ZodNullable<z.ZodString>;
562
+ source: z.ZodEnum<{
563
+ derived: "derived";
564
+ stored: "stored";
565
+ file: "file";
566
+ }>;
567
+ }, z.core.$strip>>;
568
+ }, z.core.$strip>, z.ZodObject<{
569
+ t: z.ZodLiteral<"templateProposed">;
570
+ proposal: z.ZodObject<{
571
+ id: z.ZodString;
572
+ fromAddr: z.ZodString;
573
+ proposedAt: z.ZodNumber;
574
+ template: z.ZodObject<{
575
+ id: z.ZodString;
576
+ agent: z.ZodString;
577
+ description: z.ZodNullable<z.ZodString>;
578
+ model: z.ZodNullable<z.ZodString>;
579
+ effort: z.ZodNullable<z.ZodString>;
580
+ prompt: z.ZodNullable<z.ZodString>;
581
+ }, z.core.$strip>;
582
+ }, z.core.$strip>;
583
+ }, z.core.$strip>, z.ZodObject<{
584
+ t: z.ZodLiteral<"templateProposalResolved">;
585
+ proposalId: z.ZodString;
356
586
  }, z.core.$strip>, z.ZodObject<{
357
587
  t: z.ZodLiteral<"workspaceRemoved">;
358
588
  workspaceId: z.ZodString;
@@ -386,6 +616,29 @@ export declare const ServerMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
386
616
  t: z.ZodLiteral<"hostLog">;
387
617
  hostId: z.ZodString;
388
618
  line: z.ZodString;
619
+ }, z.core.$strip>, z.ZodObject<{
620
+ t: z.ZodLiteral<"agentsDetected">;
621
+ hostId: z.ZodNullable<z.ZodString>;
622
+ profiles: z.ZodArray<z.ZodObject<{
623
+ id: z.ZodString;
624
+ description: z.ZodString;
625
+ mcp: z.ZodBoolean;
626
+ resumable: z.ZodBoolean;
627
+ command: z.ZodString;
628
+ commandPath: z.ZodNullable<z.ZodString>;
629
+ available: z.ZodNullable<z.ZodBoolean>;
630
+ version: z.ZodNullable<z.ZodString>;
631
+ detail: z.ZodNullable<z.ZodString>;
632
+ models: z.ZodArray<z.ZodString>;
633
+ modelSource: z.ZodEnum<{
634
+ listed: "listed";
635
+ declared: "declared";
636
+ none: "none";
637
+ }>;
638
+ takesModel: z.ZodBoolean;
639
+ takesEffort: z.ZodBoolean;
640
+ efforts: z.ZodArray<z.ZodString>;
641
+ }, z.core.$strip>>;
389
642
  }, z.core.$strip>, z.ZodObject<{
390
643
  t: z.ZodLiteral<"messageSent">;
391
644
  message: z.ZodObject<{
@@ -411,6 +664,12 @@ export declare const ServerMsg: z.ZodDiscriminatedUnion<[z.ZodObject<{
411
664
  t: z.ZodLiteral<"error">;
412
665
  message: z.ZodString;
413
666
  sessionId: z.ZodOptional<z.ZodString>;
667
+ }, z.core.$strip>, z.ZodObject<{
668
+ t: z.ZodLiteral<"ack">;
669
+ requestId: z.ZodString;
670
+ ok: z.ZodBoolean;
671
+ message: z.ZodOptional<z.ZodString>;
672
+ sessionId: z.ZodOptional<z.ZodString>;
414
673
  }, z.core.$strip>], "t">;
415
674
  export type ServerMsg = z.infer<typeof ServerMsg>;
416
675
  //# sourceMappingURL=ws.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ws.d.ts","sourceRoot":"","sources":["../src/ws.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AACX,MAAM,MAAM,eAAe,GACzB,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEzD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,eAAe,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,UAAU,GAClB,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