linkshell-cli 0.5.42 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/cli/src/commands/host.d.ts +23 -0
  2. package/dist/cli/src/commands/host.js +264 -0
  3. package/dist/cli/src/commands/host.js.map +1 -0
  4. package/dist/cli/src/commands/pair.d.ts +1 -0
  5. package/dist/cli/src/commands/pair.js +48 -0
  6. package/dist/cli/src/commands/pair.js.map +1 -0
  7. package/dist/cli/src/index.js +68 -0
  8. package/dist/cli/src/index.js.map +1 -1
  9. package/dist/cli/src/utils/daemon.d.ts +1 -1
  10. package/dist/cli/src/utils/daemon.js +3 -2
  11. package/dist/cli/src/utils/daemon.js.map +1 -1
  12. package/dist/cli/tsconfig.tsbuildinfo +1 -1
  13. package/dist/host/src/drivers/acp/connection.d.ts +61 -0
  14. package/dist/host/src/drivers/acp/connection.js +121 -0
  15. package/dist/host/src/drivers/acp/connection.js.map +1 -0
  16. package/dist/host/src/drivers/acp/driver.d.ts +110 -0
  17. package/dist/host/src/drivers/acp/driver.js +438 -0
  18. package/dist/host/src/drivers/acp/driver.js.map +1 -0
  19. package/dist/host/src/drivers/acp/mapper.d.ts +49 -0
  20. package/dist/host/src/drivers/acp/mapper.js +411 -0
  21. package/dist/host/src/drivers/acp/mapper.js.map +1 -0
  22. package/dist/host/src/drivers/auth.d.ts +7 -0
  23. package/dist/host/src/drivers/auth.js +57 -0
  24. package/dist/host/src/drivers/auth.js.map +1 -0
  25. package/dist/host/src/drivers/claude/driver.d.ts +76 -0
  26. package/dist/host/src/drivers/claude/driver.js +331 -0
  27. package/dist/host/src/drivers/claude/driver.js.map +1 -0
  28. package/dist/host/src/drivers/claude/transcript.d.ts +335 -0
  29. package/dist/host/src/drivers/claude/transcript.js +516 -0
  30. package/dist/host/src/drivers/claude/transcript.js.map +1 -0
  31. package/dist/host/src/drivers/codex/app-server.d.ts +36 -0
  32. package/dist/host/src/drivers/codex/app-server.js +144 -0
  33. package/dist/host/src/drivers/codex/app-server.js.map +1 -0
  34. package/dist/host/src/drivers/codex/driver.d.ts +89 -0
  35. package/dist/host/src/drivers/codex/driver.js +452 -0
  36. package/dist/host/src/drivers/codex/driver.js.map +1 -0
  37. package/dist/host/src/drivers/codex/mapper.d.ts +61 -0
  38. package/dist/host/src/drivers/codex/mapper.js +623 -0
  39. package/dist/host/src/drivers/codex/mapper.js.map +1 -0
  40. package/dist/host/src/drivers/codex/settings.d.ts +51 -0
  41. package/dist/host/src/drivers/codex/settings.js +107 -0
  42. package/dist/host/src/drivers/codex/settings.js.map +1 -0
  43. package/dist/host/src/drivers/images.d.ts +11 -0
  44. package/dist/host/src/drivers/images.js +34 -0
  45. package/dist/host/src/drivers/images.js.map +1 -0
  46. package/dist/host/src/drivers/nesting.d.ts +6 -0
  47. package/dist/host/src/drivers/nesting.js +25 -0
  48. package/dist/host/src/drivers/nesting.js.map +1 -0
  49. package/dist/host/src/drivers/registry.d.ts +21 -0
  50. package/dist/host/src/drivers/registry.js +30 -0
  51. package/dist/host/src/drivers/registry.js.map +1 -0
  52. package/dist/host/src/drivers/types.d.ts +105 -0
  53. package/dist/host/src/drivers/types.js +2 -0
  54. package/dist/host/src/drivers/types.js.map +1 -0
  55. package/dist/host/src/fs.d.ts +69 -0
  56. package/dist/host/src/fs.js +198 -0
  57. package/dist/host/src/fs.js.map +1 -0
  58. package/dist/host/src/gateway.d.ts +55 -0
  59. package/dist/host/src/gateway.js +263 -0
  60. package/dist/host/src/gateway.js.map +1 -0
  61. package/dist/host/src/host.d.ts +51 -0
  62. package/dist/host/src/host.js +133 -0
  63. package/dist/host/src/host.js.map +1 -0
  64. package/dist/host/src/hub.d.ts +89 -0
  65. package/dist/host/src/hub.js +592 -0
  66. package/dist/host/src/hub.js.map +1 -0
  67. package/dist/host/src/index.d.ts +10 -0
  68. package/dist/host/src/index.js +10 -0
  69. package/dist/host/src/index.js.map +1 -0
  70. package/dist/host/src/ports.d.ts +24 -0
  71. package/dist/host/src/ports.js +201 -0
  72. package/dist/host/src/ports.js.map +1 -0
  73. package/dist/host/src/rpc/client.d.ts +9 -0
  74. package/dist/host/src/rpc/client.js +42 -0
  75. package/dist/host/src/rpc/client.js.map +1 -0
  76. package/dist/host/src/rpc/server.d.ts +52 -0
  77. package/dist/host/src/rpc/server.js +293 -0
  78. package/dist/host/src/rpc/server.js.map +1 -0
  79. package/dist/host/src/screen.d.ts +30 -0
  80. package/dist/host/src/screen.js +230 -0
  81. package/dist/host/src/screen.js.map +1 -0
  82. package/dist/host/src/shell-env.d.ts +8 -0
  83. package/dist/host/src/shell-env.js +39 -0
  84. package/dist/host/src/shell-env.js.map +1 -0
  85. package/dist/host/src/store.d.ts +75 -0
  86. package/dist/host/src/store.js +265 -0
  87. package/dist/host/src/store.js.map +1 -0
  88. package/dist/host/src/terminals.d.ts +55 -0
  89. package/dist/host/src/terminals.js +367 -0
  90. package/dist/host/src/terminals.js.map +1 -0
  91. package/dist/shared-protocol/src/index.d.ts +3345 -3345
  92. package/dist/wire/src/crypto.d.ts +65 -0
  93. package/dist/wire/src/crypto.js +253 -0
  94. package/dist/wire/src/crypto.js.map +1 -0
  95. package/dist/wire/src/index.d.ts +8 -0
  96. package/dist/wire/src/index.js +9 -0
  97. package/dist/wire/src/index.js.map +1 -0
  98. package/dist/wire/src/model.d.ts +704 -0
  99. package/dist/wire/src/model.js +163 -0
  100. package/dist/wire/src/model.js.map +1 -0
  101. package/dist/wire/src/peer.d.ts +42 -0
  102. package/dist/wire/src/peer.js +143 -0
  103. package/dist/wire/src/peer.js.map +1 -0
  104. package/dist/wire/src/relay-client.d.ts +82 -0
  105. package/dist/wire/src/relay-client.js +259 -0
  106. package/dist/wire/src/relay-client.js.map +1 -0
  107. package/dist/wire/src/relay.d.ts +481 -0
  108. package/dist/wire/src/relay.js +129 -0
  109. package/dist/wire/src/relay.js.map +1 -0
  110. package/dist/wire/src/rpc.d.ts +4170 -0
  111. package/dist/wire/src/rpc.js +332 -0
  112. package/dist/wire/src/rpc.js.map +1 -0
  113. package/dist/wire/src/shell.d.ts +2 -0
  114. package/dist/wire/src/shell.js +62 -0
  115. package/dist/wire/src/shell.js.map +1 -0
  116. package/dist/wire/src/updates.d.ts +3325 -0
  117. package/dist/wire/src/updates.js +210 -0
  118. package/dist/wire/src/updates.js.map +1 -0
  119. package/package.json +8 -3
  120. package/src/commands/host.ts +283 -0
  121. package/src/commands/pair.ts +47 -0
  122. package/src/index.ts +73 -0
  123. package/src/utils/daemon.ts +4 -3
  124. package/dist/cli/src/commands/hook.d.ts +0 -6
  125. package/dist/cli/src/commands/hook.js +0 -120
  126. package/dist/cli/src/commands/hook.js.map +0 -1
  127. package/dist/cli/src/runtime/acp/agent-workspace-git.d.ts +0 -63
  128. package/dist/cli/src/runtime/acp/agent-workspace-git.js +0 -297
  129. package/dist/cli/src/runtime/acp/agent-workspace-git.js.map +0 -1
  130. package/dist/cli/src/runtime/acp-relay.d.ts +0 -23
  131. package/dist/cli/src/runtime/acp-relay.js +0 -73
  132. package/dist/cli/src/runtime/acp-relay.js.map +0 -1
  133. package/dist/cli/src/runtime/hook-permission-server.d.ts +0 -36
  134. package/dist/cli/src/runtime/hook-permission-server.js +0 -147
  135. package/dist/cli/src/runtime/hook-permission-server.js.map +0 -1
@@ -0,0 +1,704 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * How far LinkShell can take a given agent. The UI renders capabilities from
4
+ * this instead of guessing:
5
+ * - multi_client: desktop TUI and remote devices are live clients of one agent
6
+ * server (Codex app-server, OpenCode server).
7
+ * - handoff: the native TUI owns the session on the desktop; a remote device can
8
+ * take it over and the session continues headlessly under the same id.
9
+ * - remote: structured control only; the desktop uses LinkShell's own UI.
10
+ * - terminal: PTY only.
11
+ */
12
+ export declare const agentTierSchema: z.ZodEnum<["multi_client", "handoff", "remote", "terminal"]>;
13
+ export type AgentTier = z.infer<typeof agentTierSchema>;
14
+ export declare const agentCapabilitiesSchema: z.ZodObject<{
15
+ interrupt: z.ZodBoolean;
16
+ /** Inject a message into a running turn instead of queueing it. */
17
+ steer: z.ZodBoolean;
18
+ permissions: z.ZodBoolean;
19
+ images: z.ZodBoolean;
20
+ fork: z.ZodBoolean;
21
+ models: z.ZodBoolean;
22
+ modes: z.ZodBoolean;
23
+ }, "strip", z.ZodTypeAny, {
24
+ models: boolean;
25
+ modes: boolean;
26
+ steer: boolean;
27
+ images: boolean;
28
+ fork: boolean;
29
+ permissions: boolean;
30
+ interrupt: boolean;
31
+ }, {
32
+ models: boolean;
33
+ modes: boolean;
34
+ steer: boolean;
35
+ images: boolean;
36
+ fork: boolean;
37
+ permissions: boolean;
38
+ interrupt: boolean;
39
+ }>;
40
+ export type AgentCapabilities = z.infer<typeof agentCapabilitiesSchema>;
41
+ /**
42
+ * How the agent authenticates on this machine, as the agent itself reports it
43
+ * (e.g. `claude auth status`, `codex login status`). LinkShell never handles
44
+ * the credentials; it runs agents with the user's own environment and config.
45
+ */
46
+ export declare const agentAuthSchema: z.ZodObject<{
47
+ state: z.ZodEnum<["ok", "missing", "unknown"]>;
48
+ /** e.g. "claude.ai", "api_key", "oauth_token", "chatgpt", "bedrock". */
49
+ method: z.ZodOptional<z.ZodString>;
50
+ /** What the user should do when state is "missing". */
51
+ hint: z.ZodOptional<z.ZodString>;
52
+ }, "strip", z.ZodTypeAny, {
53
+ state: "unknown" | "ok" | "missing";
54
+ method?: string | undefined;
55
+ hint?: string | undefined;
56
+ }, {
57
+ state: "unknown" | "ok" | "missing";
58
+ method?: string | undefined;
59
+ hint?: string | undefined;
60
+ }>;
61
+ export type AgentAuth = z.infer<typeof agentAuthSchema>;
62
+ export declare const agentInfoSchema: z.ZodObject<{
63
+ id: z.ZodString;
64
+ label: z.ZodString;
65
+ tier: z.ZodEnum<["multi_client", "handoff", "remote", "terminal"]>;
66
+ installed: z.ZodBoolean;
67
+ version: z.ZodOptional<z.ZodString>;
68
+ /** Human-readable reason when the agent is installed but unusable. */
69
+ problem: z.ZodOptional<z.ZodString>;
70
+ auth: z.ZodOptional<z.ZodObject<{
71
+ state: z.ZodEnum<["ok", "missing", "unknown"]>;
72
+ /** e.g. "claude.ai", "api_key", "oauth_token", "chatgpt", "bedrock". */
73
+ method: z.ZodOptional<z.ZodString>;
74
+ /** What the user should do when state is "missing". */
75
+ hint: z.ZodOptional<z.ZodString>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ state: "unknown" | "ok" | "missing";
78
+ method?: string | undefined;
79
+ hint?: string | undefined;
80
+ }, {
81
+ state: "unknown" | "ok" | "missing";
82
+ method?: string | undefined;
83
+ hint?: string | undefined;
84
+ }>>;
85
+ capabilities: z.ZodObject<{
86
+ interrupt: z.ZodBoolean;
87
+ /** Inject a message into a running turn instead of queueing it. */
88
+ steer: z.ZodBoolean;
89
+ permissions: z.ZodBoolean;
90
+ images: z.ZodBoolean;
91
+ fork: z.ZodBoolean;
92
+ models: z.ZodBoolean;
93
+ modes: z.ZodBoolean;
94
+ }, "strip", z.ZodTypeAny, {
95
+ models: boolean;
96
+ modes: boolean;
97
+ steer: boolean;
98
+ images: boolean;
99
+ fork: boolean;
100
+ permissions: boolean;
101
+ interrupt: boolean;
102
+ }, {
103
+ models: boolean;
104
+ modes: boolean;
105
+ steer: boolean;
106
+ images: boolean;
107
+ fork: boolean;
108
+ permissions: boolean;
109
+ interrupt: boolean;
110
+ }>;
111
+ }, "strip", z.ZodTypeAny, {
112
+ id: string;
113
+ label: string;
114
+ capabilities: {
115
+ models: boolean;
116
+ modes: boolean;
117
+ steer: boolean;
118
+ images: boolean;
119
+ fork: boolean;
120
+ permissions: boolean;
121
+ interrupt: boolean;
122
+ };
123
+ tier: "multi_client" | "handoff" | "remote" | "terminal";
124
+ installed: boolean;
125
+ auth?: {
126
+ state: "unknown" | "ok" | "missing";
127
+ method?: string | undefined;
128
+ hint?: string | undefined;
129
+ } | undefined;
130
+ version?: string | undefined;
131
+ problem?: string | undefined;
132
+ }, {
133
+ id: string;
134
+ label: string;
135
+ capabilities: {
136
+ models: boolean;
137
+ modes: boolean;
138
+ steer: boolean;
139
+ images: boolean;
140
+ fork: boolean;
141
+ permissions: boolean;
142
+ interrupt: boolean;
143
+ };
144
+ tier: "multi_client" | "handoff" | "remote" | "terminal";
145
+ installed: boolean;
146
+ auth?: {
147
+ state: "unknown" | "ok" | "missing";
148
+ method?: string | undefined;
149
+ hint?: string | undefined;
150
+ } | undefined;
151
+ version?: string | undefined;
152
+ problem?: string | undefined;
153
+ }>;
154
+ export type AgentInfo = z.infer<typeof agentInfoSchema>;
155
+ /**
156
+ * Who is driving a handoff session right now: the desktop's native UI, this
157
+ * host on behalf of a device, or nobody (either side can continue).
158
+ */
159
+ export declare const sessionDriverSchema: z.ZodEnum<["desktop", "remote", "none"]>;
160
+ export type SessionDriver = z.infer<typeof sessionDriverSchema>;
161
+ export declare const sessionStateSchema: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
162
+ export type SessionState = z.infer<typeof sessionStateSchema>;
163
+ export declare const toolKindSchema: z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "other"]>;
164
+ export type ToolKind = z.infer<typeof toolKindSchema>;
165
+ export declare const permissionOptionSchema: z.ZodObject<{
166
+ optionId: z.ZodString;
167
+ name: z.ZodString;
168
+ kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ name: string;
171
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
172
+ optionId: string;
173
+ }, {
174
+ name: string;
175
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
176
+ optionId: string;
177
+ }>;
178
+ export type PermissionOption = z.infer<typeof permissionOptionSchema>;
179
+ /** What a running session is doing right now, for list rows. Live only. */
180
+ export declare const sessionActivitySchema: z.ZodObject<{
181
+ kind: z.ZodEnum<["thinking", "responding", "tool"]>;
182
+ title: z.ZodOptional<z.ZodString>;
183
+ toolKind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "other"]>>;
184
+ }, "strip", z.ZodTypeAny, {
185
+ kind: "thinking" | "tool" | "responding";
186
+ title?: string | undefined;
187
+ toolKind?: "search" | "other" | "read" | "edit" | "delete" | "move" | "execute" | "think" | "fetch" | undefined;
188
+ }, {
189
+ kind: "thinking" | "tool" | "responding";
190
+ title?: string | undefined;
191
+ toolKind?: "search" | "other" | "read" | "edit" | "delete" | "move" | "execute" | "think" | "fetch" | undefined;
192
+ }>;
193
+ export type SessionActivity = z.infer<typeof sessionActivitySchema>;
194
+ /** The oldest unanswered permission request, so lists can offer approval inline. Live only. */
195
+ export declare const pendingPermissionSchema: z.ZodObject<{
196
+ requestId: z.ZodString;
197
+ toolCallId: z.ZodOptional<z.ZodString>;
198
+ title: z.ZodString;
199
+ detail: z.ZodOptional<z.ZodString>;
200
+ options: z.ZodArray<z.ZodObject<{
201
+ optionId: z.ZodString;
202
+ name: z.ZodString;
203
+ kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
204
+ }, "strip", z.ZodTypeAny, {
205
+ name: string;
206
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
207
+ optionId: string;
208
+ }, {
209
+ name: string;
210
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
211
+ optionId: string;
212
+ }>, "many">;
213
+ }, "strip", z.ZodTypeAny, {
214
+ options: {
215
+ name: string;
216
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
217
+ optionId: string;
218
+ }[];
219
+ requestId: string;
220
+ title: string;
221
+ detail?: string | undefined;
222
+ toolCallId?: string | undefined;
223
+ }, {
224
+ options: {
225
+ name: string;
226
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
227
+ optionId: string;
228
+ }[];
229
+ requestId: string;
230
+ title: string;
231
+ detail?: string | undefined;
232
+ toolCallId?: string | undefined;
233
+ }>;
234
+ export type PendingPermissionSummary = z.infer<typeof pendingPermissionSchema>;
235
+ export declare const sessionSummarySchema: z.ZodObject<{
236
+ /** `${agent}:${nativeId}` — stable across daemon restarts and rediscovery. */
237
+ id: z.ZodString;
238
+ agent: z.ZodString;
239
+ nativeId: z.ZodString;
240
+ title: z.ZodOptional<z.ZodString>;
241
+ preview: z.ZodOptional<z.ZodString>;
242
+ cwd: z.ZodString;
243
+ state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
244
+ driver: z.ZodOptional<z.ZodEnum<["desktop", "remote", "none"]>>;
245
+ pendingPermissions: z.ZodNumber;
246
+ model: z.ZodOptional<z.ZodString>;
247
+ createdAt: z.ZodNumber;
248
+ updatedAt: z.ZodNumber;
249
+ lastSeq: z.ZodNumber;
250
+ archived: z.ZodBoolean;
251
+ activity: z.ZodOptional<z.ZodObject<{
252
+ kind: z.ZodEnum<["thinking", "responding", "tool"]>;
253
+ title: z.ZodOptional<z.ZodString>;
254
+ toolKind: z.ZodOptional<z.ZodEnum<["read", "edit", "delete", "move", "search", "execute", "think", "fetch", "other"]>>;
255
+ }, "strip", z.ZodTypeAny, {
256
+ kind: "thinking" | "tool" | "responding";
257
+ title?: string | undefined;
258
+ toolKind?: "search" | "other" | "read" | "edit" | "delete" | "move" | "execute" | "think" | "fetch" | undefined;
259
+ }, {
260
+ kind: "thinking" | "tool" | "responding";
261
+ title?: string | undefined;
262
+ toolKind?: "search" | "other" | "read" | "edit" | "delete" | "move" | "execute" | "think" | "fetch" | undefined;
263
+ }>>;
264
+ permission: z.ZodOptional<z.ZodObject<{
265
+ requestId: z.ZodString;
266
+ toolCallId: z.ZodOptional<z.ZodString>;
267
+ title: z.ZodString;
268
+ detail: z.ZodOptional<z.ZodString>;
269
+ options: z.ZodArray<z.ZodObject<{
270
+ optionId: z.ZodString;
271
+ name: z.ZodString;
272
+ kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
273
+ }, "strip", z.ZodTypeAny, {
274
+ name: string;
275
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
276
+ optionId: string;
277
+ }, {
278
+ name: string;
279
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
280
+ optionId: string;
281
+ }>, "many">;
282
+ }, "strip", z.ZodTypeAny, {
283
+ options: {
284
+ name: string;
285
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
286
+ optionId: string;
287
+ }[];
288
+ requestId: string;
289
+ title: string;
290
+ detail?: string | undefined;
291
+ toolCallId?: string | undefined;
292
+ }, {
293
+ options: {
294
+ name: string;
295
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
296
+ optionId: string;
297
+ }[];
298
+ requestId: string;
299
+ title: string;
300
+ detail?: string | undefined;
301
+ toolCallId?: string | undefined;
302
+ }>>;
303
+ }, "strip", z.ZodTypeAny, {
304
+ id: string;
305
+ cwd: string;
306
+ createdAt: number;
307
+ pendingPermissions: number;
308
+ updatedAt: number;
309
+ archived: boolean;
310
+ state: "idle" | "error" | "running" | "waiting" | "offline";
311
+ agent: string;
312
+ nativeId: string;
313
+ lastSeq: number;
314
+ title?: string | undefined;
315
+ model?: string | undefined;
316
+ permission?: {
317
+ options: {
318
+ name: string;
319
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
320
+ optionId: string;
321
+ }[];
322
+ requestId: string;
323
+ title: string;
324
+ detail?: string | undefined;
325
+ toolCallId?: string | undefined;
326
+ } | undefined;
327
+ preview?: string | undefined;
328
+ driver?: "none" | "desktop" | "remote" | undefined;
329
+ activity?: {
330
+ kind: "thinking" | "tool" | "responding";
331
+ title?: string | undefined;
332
+ toolKind?: "search" | "other" | "read" | "edit" | "delete" | "move" | "execute" | "think" | "fetch" | undefined;
333
+ } | undefined;
334
+ }, {
335
+ id: string;
336
+ cwd: string;
337
+ createdAt: number;
338
+ pendingPermissions: number;
339
+ updatedAt: number;
340
+ archived: boolean;
341
+ state: "idle" | "error" | "running" | "waiting" | "offline";
342
+ agent: string;
343
+ nativeId: string;
344
+ lastSeq: number;
345
+ title?: string | undefined;
346
+ model?: string | undefined;
347
+ permission?: {
348
+ options: {
349
+ name: string;
350
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
351
+ optionId: string;
352
+ }[];
353
+ requestId: string;
354
+ title: string;
355
+ detail?: string | undefined;
356
+ toolCallId?: string | undefined;
357
+ } | undefined;
358
+ preview?: string | undefined;
359
+ driver?: "none" | "desktop" | "remote" | undefined;
360
+ activity?: {
361
+ kind: "thinking" | "tool" | "responding";
362
+ title?: string | undefined;
363
+ toolKind?: "search" | "other" | "read" | "edit" | "delete" | "move" | "execute" | "think" | "fetch" | undefined;
364
+ } | undefined;
365
+ }>;
366
+ export type SessionSummary = z.infer<typeof sessionSummarySchema>;
367
+ export declare function sessionIdFor(agent: string, nativeId: string): string;
368
+ export declare function parseSessionId(id: string): {
369
+ agent: string;
370
+ nativeId: string;
371
+ } | null;
372
+ export declare const projectSummarySchema: z.ZodObject<{
373
+ cwd: z.ZodString;
374
+ name: z.ZodString;
375
+ lastActiveAt: z.ZodNumber;
376
+ sessionCount: z.ZodNumber;
377
+ }, "strip", z.ZodTypeAny, {
378
+ cwd: string;
379
+ name: string;
380
+ lastActiveAt: number;
381
+ sessionCount: number;
382
+ }, {
383
+ cwd: string;
384
+ name: string;
385
+ lastActiveAt: number;
386
+ sessionCount: number;
387
+ }>;
388
+ export type ProjectSummary = z.infer<typeof projectSummarySchema>;
389
+ export declare const machineInfoSchema: z.ZodObject<{
390
+ machineId: z.ZodString;
391
+ hostname: z.ZodString;
392
+ platform: z.ZodString;
393
+ hostVersion: z.ZodString;
394
+ agents: z.ZodArray<z.ZodObject<{
395
+ id: z.ZodString;
396
+ label: z.ZodString;
397
+ tier: z.ZodEnum<["multi_client", "handoff", "remote", "terminal"]>;
398
+ installed: z.ZodBoolean;
399
+ version: z.ZodOptional<z.ZodString>;
400
+ /** Human-readable reason when the agent is installed but unusable. */
401
+ problem: z.ZodOptional<z.ZodString>;
402
+ auth: z.ZodOptional<z.ZodObject<{
403
+ state: z.ZodEnum<["ok", "missing", "unknown"]>;
404
+ /** e.g. "claude.ai", "api_key", "oauth_token", "chatgpt", "bedrock". */
405
+ method: z.ZodOptional<z.ZodString>;
406
+ /** What the user should do when state is "missing". */
407
+ hint: z.ZodOptional<z.ZodString>;
408
+ }, "strip", z.ZodTypeAny, {
409
+ state: "unknown" | "ok" | "missing";
410
+ method?: string | undefined;
411
+ hint?: string | undefined;
412
+ }, {
413
+ state: "unknown" | "ok" | "missing";
414
+ method?: string | undefined;
415
+ hint?: string | undefined;
416
+ }>>;
417
+ capabilities: z.ZodObject<{
418
+ interrupt: z.ZodBoolean;
419
+ /** Inject a message into a running turn instead of queueing it. */
420
+ steer: z.ZodBoolean;
421
+ permissions: z.ZodBoolean;
422
+ images: z.ZodBoolean;
423
+ fork: z.ZodBoolean;
424
+ models: z.ZodBoolean;
425
+ modes: z.ZodBoolean;
426
+ }, "strip", z.ZodTypeAny, {
427
+ models: boolean;
428
+ modes: boolean;
429
+ steer: boolean;
430
+ images: boolean;
431
+ fork: boolean;
432
+ permissions: boolean;
433
+ interrupt: boolean;
434
+ }, {
435
+ models: boolean;
436
+ modes: boolean;
437
+ steer: boolean;
438
+ images: boolean;
439
+ fork: boolean;
440
+ permissions: boolean;
441
+ interrupt: boolean;
442
+ }>;
443
+ }, "strip", z.ZodTypeAny, {
444
+ id: string;
445
+ label: string;
446
+ capabilities: {
447
+ models: boolean;
448
+ modes: boolean;
449
+ steer: boolean;
450
+ images: boolean;
451
+ fork: boolean;
452
+ permissions: boolean;
453
+ interrupt: boolean;
454
+ };
455
+ tier: "multi_client" | "handoff" | "remote" | "terminal";
456
+ installed: boolean;
457
+ auth?: {
458
+ state: "unknown" | "ok" | "missing";
459
+ method?: string | undefined;
460
+ hint?: string | undefined;
461
+ } | undefined;
462
+ version?: string | undefined;
463
+ problem?: string | undefined;
464
+ }, {
465
+ id: string;
466
+ label: string;
467
+ capabilities: {
468
+ models: boolean;
469
+ modes: boolean;
470
+ steer: boolean;
471
+ images: boolean;
472
+ fork: boolean;
473
+ permissions: boolean;
474
+ interrupt: boolean;
475
+ };
476
+ tier: "multi_client" | "handoff" | "remote" | "terminal";
477
+ installed: boolean;
478
+ auth?: {
479
+ state: "unknown" | "ok" | "missing";
480
+ method?: string | undefined;
481
+ hint?: string | undefined;
482
+ } | undefined;
483
+ version?: string | undefined;
484
+ problem?: string | undefined;
485
+ }>, "many">;
486
+ }, "strip", z.ZodTypeAny, {
487
+ machineId: string;
488
+ hostname: string;
489
+ platform: string;
490
+ agents: {
491
+ id: string;
492
+ label: string;
493
+ capabilities: {
494
+ models: boolean;
495
+ modes: boolean;
496
+ steer: boolean;
497
+ images: boolean;
498
+ fork: boolean;
499
+ permissions: boolean;
500
+ interrupt: boolean;
501
+ };
502
+ tier: "multi_client" | "handoff" | "remote" | "terminal";
503
+ installed: boolean;
504
+ auth?: {
505
+ state: "unknown" | "ok" | "missing";
506
+ method?: string | undefined;
507
+ hint?: string | undefined;
508
+ } | undefined;
509
+ version?: string | undefined;
510
+ problem?: string | undefined;
511
+ }[];
512
+ hostVersion: string;
513
+ }, {
514
+ machineId: string;
515
+ hostname: string;
516
+ platform: string;
517
+ agents: {
518
+ id: string;
519
+ label: string;
520
+ capabilities: {
521
+ models: boolean;
522
+ modes: boolean;
523
+ steer: boolean;
524
+ images: boolean;
525
+ fork: boolean;
526
+ permissions: boolean;
527
+ interrupt: boolean;
528
+ };
529
+ tier: "multi_client" | "handoff" | "remote" | "terminal";
530
+ installed: boolean;
531
+ auth?: {
532
+ state: "unknown" | "ok" | "missing";
533
+ method?: string | undefined;
534
+ hint?: string | undefined;
535
+ } | undefined;
536
+ version?: string | undefined;
537
+ problem?: string | undefined;
538
+ }[];
539
+ hostVersion: string;
540
+ }>;
541
+ export type MachineInfo = z.infer<typeof machineInfoSchema>;
542
+ /** A server listening on the host, which a device can preview through the encrypted channel. */
543
+ export declare const portInfoSchema: z.ZodObject<{
544
+ port: z.ZodNumber;
545
+ /** The listening process ("node", "python3.12"). */
546
+ process: z.ZodString;
547
+ pid: z.ZodOptional<z.ZodNumber>;
548
+ /** The process's working directory: which project the server belongs to. */
549
+ cwd: z.ZodOptional<z.ZodString>;
550
+ /** The page title, when the port answers HTTP with an HTML page. */
551
+ title: z.ZodOptional<z.ZodString>;
552
+ /** Answers HTTP at all (a dev server, not a database). */
553
+ http: z.ZodBoolean;
554
+ }, "strip", z.ZodTypeAny, {
555
+ port: number;
556
+ process: string;
557
+ http: boolean;
558
+ cwd?: string | undefined;
559
+ title?: string | undefined;
560
+ pid?: number | undefined;
561
+ }, {
562
+ port: number;
563
+ process: string;
564
+ http: boolean;
565
+ cwd?: string | undefined;
566
+ title?: string | undefined;
567
+ pid?: number | undefined;
568
+ }>;
569
+ export type PortInfo = z.infer<typeof portInfoSchema>;
570
+ /** A shell the host keeps open, independent of any device connection. */
571
+ export declare const terminalInfoSchema: z.ZodObject<{
572
+ id: z.ZodString;
573
+ /** What's running in the foreground (the shell or its current command). */
574
+ title: z.ZodString;
575
+ cwd: z.ZodString;
576
+ cols: z.ZodNumber;
577
+ rows: z.ZodNumber;
578
+ createdAt: z.ZodNumber;
579
+ /** Last output time. */
580
+ activeAt: z.ZodNumber;
581
+ /** The command it was started to run, if any (else it's a plain shell). */
582
+ command: z.ZodOptional<z.ZodString>;
583
+ /** Set once the shell ended; the terminal and its output stay until deleted. */
584
+ exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
585
+ /** Ended without an exit code: the host stopped while it ran. */
586
+ interrupted: z.ZodOptional<z.ZodBoolean>;
587
+ }, "strip", z.ZodTypeAny, {
588
+ id: string;
589
+ cols: number;
590
+ rows: number;
591
+ cwd: string;
592
+ createdAt: number;
593
+ title: string;
594
+ activeAt: number;
595
+ exitCode?: number | null | undefined;
596
+ command?: string | undefined;
597
+ interrupted?: boolean | undefined;
598
+ }, {
599
+ id: string;
600
+ cols: number;
601
+ rows: number;
602
+ cwd: string;
603
+ createdAt: number;
604
+ title: string;
605
+ activeAt: number;
606
+ exitCode?: number | null | undefined;
607
+ command?: string | undefined;
608
+ interrupted?: boolean | undefined;
609
+ }>;
610
+ export type TerminalInfo = z.infer<typeof terminalInfoSchema>;
611
+ /** The host's link to a v2 gateway, for `linkshell status` and the app's computer page. */
612
+ export declare const gatewayStatusSchema: z.ZodObject<{
613
+ url: z.ZodOptional<z.ZodString>;
614
+ status: z.ZodEnum<["off", "connecting", "online", "offline"]>;
615
+ error: z.ZodOptional<z.ZodObject<{
616
+ code: z.ZodString;
617
+ message: z.ZodString;
618
+ }, "strip", z.ZodTypeAny, {
619
+ code: string;
620
+ message: string;
621
+ }, {
622
+ code: string;
623
+ message: string;
624
+ }>>;
625
+ machine: z.ZodOptional<z.ZodObject<{
626
+ id: z.ZodString;
627
+ name: z.ZodString;
628
+ }, "strip", z.ZodTypeAny, {
629
+ id: string;
630
+ name: string;
631
+ }, {
632
+ id: string;
633
+ name: string;
634
+ }>>;
635
+ account: z.ZodOptional<z.ZodObject<{
636
+ userId: z.ZodString;
637
+ email: z.ZodOptional<z.ZodString>;
638
+ }, "strip", z.ZodTypeAny, {
639
+ userId: string;
640
+ email?: string | undefined;
641
+ }, {
642
+ userId: string;
643
+ email?: string | undefined;
644
+ }>>;
645
+ devices: z.ZodArray<z.ZodObject<{
646
+ id: z.ZodString;
647
+ name: z.ZodString;
648
+ pairedAt: z.ZodNumber;
649
+ online: z.ZodBoolean;
650
+ }, "strip", z.ZodTypeAny, {
651
+ id: string;
652
+ name: string;
653
+ online: boolean;
654
+ pairedAt: number;
655
+ }, {
656
+ id: string;
657
+ name: string;
658
+ online: boolean;
659
+ pairedAt: number;
660
+ }>, "many">;
661
+ }, "strip", z.ZodTypeAny, {
662
+ status: "connecting" | "off" | "offline" | "online";
663
+ devices: {
664
+ id: string;
665
+ name: string;
666
+ online: boolean;
667
+ pairedAt: number;
668
+ }[];
669
+ error?: {
670
+ code: string;
671
+ message: string;
672
+ } | undefined;
673
+ url?: string | undefined;
674
+ machine?: {
675
+ id: string;
676
+ name: string;
677
+ } | undefined;
678
+ account?: {
679
+ userId: string;
680
+ email?: string | undefined;
681
+ } | undefined;
682
+ }, {
683
+ status: "connecting" | "off" | "offline" | "online";
684
+ devices: {
685
+ id: string;
686
+ name: string;
687
+ online: boolean;
688
+ pairedAt: number;
689
+ }[];
690
+ error?: {
691
+ code: string;
692
+ message: string;
693
+ } | undefined;
694
+ url?: string | undefined;
695
+ machine?: {
696
+ id: string;
697
+ name: string;
698
+ } | undefined;
699
+ account?: {
700
+ userId: string;
701
+ email?: string | undefined;
702
+ } | undefined;
703
+ }>;
704
+ export type GatewayStatus = z.infer<typeof gatewayStatusSchema>;