@letta-ai/letta-code 0.27.8 → 0.27.10
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 +2 -2
- package/dist/app-server-client.js +387 -0
- package/dist/app-server-client.js.map +10 -0
- package/dist/types/app-server-client.d.ts +99 -0
- package/dist/types/app-server-client.d.ts.map +1 -0
- package/dist/types/types/app-server-protocol.d.ts +3 -0
- package/dist/types/types/app-server-protocol.d.ts.map +1 -0
- package/dist/types/types/protocol.d.ts.map +1 -0
- package/dist/types/types/protocol_v2.d.ts +2277 -0
- package/dist/types/types/protocol_v2.d.ts.map +1 -0
- package/letta.js +33889 -30137
- package/package.json +11 -2
- package/scripts/check-test-coverage.cjs +1 -1
- package/scripts/run-unit-tests.cjs +1 -1
- package/skills/{creating-extensions → creating-mods}/SKILL.md +30 -30
- package/skills/{creating-extensions → creating-mods}/references/architecture.md +9 -9
- package/skills/{creating-extensions → creating-mods}/references/commands.md +10 -10
- package/skills/{creating-extensions → creating-mods}/references/events.md +16 -14
- package/skills/{creating-extensions → creating-mods}/references/permissions.md +3 -3
- package/skills/{creating-extensions → creating-mods}/references/plan-mode.md +10 -8
- package/skills/{creating-extensions → creating-mods}/references/providers.md +7 -7
- package/skills/{creating-extensions → creating-mods}/references/tools.md +22 -3
- package/skills/{creating-extensions → creating-mods}/references/ui.md +6 -4
- package/skills/customizing-commands/SKILL.md +18 -18
- package/skills/customizing-statusline/SKILL.md +11 -11
- package/skills/customizing-statusline/references/api.md +9 -12
- package/skills/customizing-statusline/references/examples.md +3 -5
- package/skills/customizing-statusline/references/migration.md +2 -3
- package/skills/editing-letta-code-desktop-preferences/SKILL.md +67 -0
- package/skills/image-generation/SKILL.md +30 -16
- package/skills/modifying-the-harness/SKILL.md +21 -2
- package/skills/modifying-the-harness/scripts/add_permission.py +2 -1
- package/skills/modifying-the-harness/scripts/show_config.py +4 -3
- package/vendor/ink-text-input/build/index.js +5 -3
- package/dist/types/protocol.d.ts.map +0 -1
- /package/dist/types/{protocol.d.ts → types/protocol.d.ts} +0 -0
|
@@ -0,0 +1,2277 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Protocol V2 (alpha hard-cut contract)
|
|
3
|
+
*
|
|
4
|
+
* This file defines the runtime-scoped websocket contract for device-mode UIs.
|
|
5
|
+
* It is intentionally self-defined and does not import transport/event shapes
|
|
6
|
+
* from the legacy protocol.ts surface.
|
|
7
|
+
*/
|
|
8
|
+
import type { AgentCreateParams, AgentListParams, AgentState, AgentUpdateParams, MessageCreate } from "@letta-ai/letta-client/resources/agents/agents";
|
|
9
|
+
import type { Message as LettaMessage, LettaStreamingResponse } from "@letta-ai/letta-client/resources/agents/messages";
|
|
10
|
+
import type { Conversation, ConversationCreateParams, ConversationListParams, ConversationRecompileParams, ConversationUpdateParams } from "@letta-ai/letta-client/resources/conversations/conversations";
|
|
11
|
+
import type { CompactionResponse, MessageCompactParams, MessageListParams } from "@letta-ai/letta-client/resources/conversations/messages";
|
|
12
|
+
import type { StopReasonType } from "@letta-ai/letta-client/resources/runs/runs";
|
|
13
|
+
export type DmPolicy = "pairing" | "allowlist" | "open";
|
|
14
|
+
export type ExperimentId = "conversation_titles" | "desktop_conversation_bootstrap" | "diffs" | "node" | "tui_cron";
|
|
15
|
+
export type ExperimentSource = "override" | "env" | "default";
|
|
16
|
+
export interface ExperimentSnapshot {
|
|
17
|
+
id: ExperimentId;
|
|
18
|
+
label: string;
|
|
19
|
+
description: string;
|
|
20
|
+
envVar?: string;
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
source: ExperimentSource;
|
|
23
|
+
override: boolean | null;
|
|
24
|
+
}
|
|
25
|
+
export type CronTaskStatus = "active" | "fired" | "missed" | "cancelled";
|
|
26
|
+
export type CronCancelReason = "conversation_not_found" | "expired";
|
|
27
|
+
export type CronRunOutcome = "queued" | "missed" | "failed" | "skipped";
|
|
28
|
+
export type CronRunReason = "scheduled_time_matched" | "one_off_due" | "scheduler_inactive" | "started_too_late" | "queue_full" | "runtime_unavailable" | "task_cancelled" | "scheduler_error";
|
|
29
|
+
export interface CronTask {
|
|
30
|
+
id: string;
|
|
31
|
+
agent_id: string;
|
|
32
|
+
conversation_id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
description: string;
|
|
35
|
+
cron: string;
|
|
36
|
+
timezone: string;
|
|
37
|
+
recurring: boolean;
|
|
38
|
+
prompt: string;
|
|
39
|
+
status: CronTaskStatus;
|
|
40
|
+
created_at: string;
|
|
41
|
+
expires_at: string | null;
|
|
42
|
+
last_fired_at: string | null;
|
|
43
|
+
fire_count: number;
|
|
44
|
+
cancel_reason: CronCancelReason | null;
|
|
45
|
+
jitter_offset_ms: number;
|
|
46
|
+
last_run_at: string | null;
|
|
47
|
+
last_run_outcome: CronRunOutcome | null;
|
|
48
|
+
last_run_reason: CronRunReason | null;
|
|
49
|
+
last_run_error: string | null;
|
|
50
|
+
last_missed_at: string | null;
|
|
51
|
+
missed_count: number;
|
|
52
|
+
failed_count: number;
|
|
53
|
+
scheduled_for: string | null;
|
|
54
|
+
fired_at: string | null;
|
|
55
|
+
missed_at: string | null;
|
|
56
|
+
}
|
|
57
|
+
export type CronRunLogStatus = "ok" | "error" | "skipped";
|
|
58
|
+
export interface CronRunLogEntry {
|
|
59
|
+
ts: number;
|
|
60
|
+
jobId: string;
|
|
61
|
+
action: "finished";
|
|
62
|
+
status?: CronRunLogStatus;
|
|
63
|
+
outcome?: CronRunOutcome;
|
|
64
|
+
reason?: CronRunReason;
|
|
65
|
+
error?: string;
|
|
66
|
+
summary?: string;
|
|
67
|
+
agentId?: string;
|
|
68
|
+
conversationId?: string;
|
|
69
|
+
runId?: string;
|
|
70
|
+
runAtMs?: number;
|
|
71
|
+
queueItemId?: string;
|
|
72
|
+
scheduledFor?: string | null;
|
|
73
|
+
firedAt?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface CronRunLogPage {
|
|
76
|
+
entries: CronRunLogEntry[];
|
|
77
|
+
total: number;
|
|
78
|
+
offset: number;
|
|
79
|
+
limit: number;
|
|
80
|
+
hasMore: boolean;
|
|
81
|
+
nextOffset: number | null;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Runtime identity for all state and delta events.
|
|
85
|
+
*
|
|
86
|
+
* `acting_user_id` is set by cloud-api on inbound `input`
|
|
87
|
+
* create_message frames (the WS subscriber's authenticated cloud
|
|
88
|
+
* user id). The listener echoes it back as the
|
|
89
|
+
* `X-Letta-Acting-User-Id` HTTP header on the outbound
|
|
90
|
+
* createMessage call so cloud can attribute credits + rate limits
|
|
91
|
+
* to the actual sender — not the user whose API key happens to
|
|
92
|
+
* spawn the sandbox / desktop runtime. Other event types (state,
|
|
93
|
+
* delta, control) ignore this field.
|
|
94
|
+
*/
|
|
95
|
+
export interface RuntimeScope {
|
|
96
|
+
agent_id: string;
|
|
97
|
+
conversation_id: string;
|
|
98
|
+
acting_user_id?: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Base envelope shared by all v2 websocket messages.
|
|
102
|
+
*/
|
|
103
|
+
export interface RuntimeEnvelope {
|
|
104
|
+
runtime: RuntimeScope;
|
|
105
|
+
event_seq: number;
|
|
106
|
+
emitted_at: string;
|
|
107
|
+
idempotency_key: string;
|
|
108
|
+
}
|
|
109
|
+
export type DevicePermissionMode = "standard" | "acceptEdits" | "memory" | "unrestricted";
|
|
110
|
+
export type ToolsetName = "codex" | "codex_snake" | "default" | "gemini" | "gemini_snake" | "none";
|
|
111
|
+
export type ToolsetPreference = ToolsetName | "auto";
|
|
112
|
+
export interface AvailableSkillSummary {
|
|
113
|
+
id: string;
|
|
114
|
+
name: string;
|
|
115
|
+
description: string;
|
|
116
|
+
path: string;
|
|
117
|
+
source: "bundled" | "global" | "agent" | "project";
|
|
118
|
+
}
|
|
119
|
+
export interface BashBackgroundProcessSummary {
|
|
120
|
+
process_id: string;
|
|
121
|
+
kind: "bash";
|
|
122
|
+
command: string;
|
|
123
|
+
started_at_ms: number | null;
|
|
124
|
+
status: string;
|
|
125
|
+
exit_code: number | null;
|
|
126
|
+
}
|
|
127
|
+
export interface AgentTaskBackgroundProcessSummary {
|
|
128
|
+
process_id: string;
|
|
129
|
+
kind: "agent_task";
|
|
130
|
+
task_type: string;
|
|
131
|
+
description: string;
|
|
132
|
+
started_at_ms: number;
|
|
133
|
+
status: string;
|
|
134
|
+
subagent_id: string | null;
|
|
135
|
+
error?: string;
|
|
136
|
+
}
|
|
137
|
+
export type BackgroundProcessSummary = BashBackgroundProcessSummary | AgentTaskBackgroundProcessSummary;
|
|
138
|
+
export interface DiffHunkLine {
|
|
139
|
+
type: "context" | "add" | "remove";
|
|
140
|
+
content: string;
|
|
141
|
+
}
|
|
142
|
+
export interface DiffHunk {
|
|
143
|
+
oldStart: number;
|
|
144
|
+
oldLines: number;
|
|
145
|
+
newStart: number;
|
|
146
|
+
newLines: number;
|
|
147
|
+
lines: DiffHunkLine[];
|
|
148
|
+
}
|
|
149
|
+
export type DiffPreview = {
|
|
150
|
+
mode: "advanced";
|
|
151
|
+
fileName: string;
|
|
152
|
+
hunks: DiffHunk[];
|
|
153
|
+
} | {
|
|
154
|
+
mode: "fallback";
|
|
155
|
+
fileName: string;
|
|
156
|
+
reason: string;
|
|
157
|
+
} | {
|
|
158
|
+
mode: "unpreviewable";
|
|
159
|
+
fileName: string;
|
|
160
|
+
reason: string;
|
|
161
|
+
};
|
|
162
|
+
export interface PermissionSuggestion {
|
|
163
|
+
id: string;
|
|
164
|
+
text: string;
|
|
165
|
+
}
|
|
166
|
+
export interface CanUseToolControlRequestBody {
|
|
167
|
+
subtype: "can_use_tool";
|
|
168
|
+
tool_name: string;
|
|
169
|
+
input: Record<string, unknown>;
|
|
170
|
+
tool_call_id: string;
|
|
171
|
+
permission_suggestions: PermissionSuggestion[];
|
|
172
|
+
blocked_path: string | null;
|
|
173
|
+
diffs?: DiffPreview[];
|
|
174
|
+
}
|
|
175
|
+
export type ControlRequestBody = CanUseToolControlRequestBody;
|
|
176
|
+
export interface ControlRequest {
|
|
177
|
+
type: "control_request";
|
|
178
|
+
request_id: string;
|
|
179
|
+
request: ControlRequestBody;
|
|
180
|
+
agent_id?: string;
|
|
181
|
+
conversation_id?: string;
|
|
182
|
+
}
|
|
183
|
+
export interface PendingControlRequest {
|
|
184
|
+
request_id: string;
|
|
185
|
+
request: ControlRequestBody;
|
|
186
|
+
}
|
|
187
|
+
export type ReflectionTriggerMode = "off" | "step-count" | "compaction-event";
|
|
188
|
+
export type ReflectionSettingsScope = "local_project" | "global" | "both";
|
|
189
|
+
export interface ReflectionSettingsSnapshot {
|
|
190
|
+
agent_id: string;
|
|
191
|
+
trigger: ReflectionTriggerMode;
|
|
192
|
+
step_count: number;
|
|
193
|
+
}
|
|
194
|
+
export type ChannelId = string;
|
|
195
|
+
export type ChannelPluginConfig = Record<string, unknown>;
|
|
196
|
+
export interface ChannelConfigFieldBase {
|
|
197
|
+
key: string;
|
|
198
|
+
label: string;
|
|
199
|
+
description?: string;
|
|
200
|
+
required?: boolean;
|
|
201
|
+
restartRequired?: boolean;
|
|
202
|
+
scope?: "app" | "account";
|
|
203
|
+
}
|
|
204
|
+
export interface ChannelConfigTextField extends ChannelConfigFieldBase {
|
|
205
|
+
type: "text";
|
|
206
|
+
default?: string;
|
|
207
|
+
placeholder?: string;
|
|
208
|
+
}
|
|
209
|
+
export interface ChannelConfigSecretField extends ChannelConfigFieldBase {
|
|
210
|
+
type: "secret";
|
|
211
|
+
placeholder?: string;
|
|
212
|
+
}
|
|
213
|
+
export interface ChannelConfigSelectOption {
|
|
214
|
+
value: string;
|
|
215
|
+
label: string;
|
|
216
|
+
}
|
|
217
|
+
export interface ChannelConfigSelectField extends ChannelConfigFieldBase {
|
|
218
|
+
type: "select";
|
|
219
|
+
options: ChannelConfigSelectOption[];
|
|
220
|
+
default?: string;
|
|
221
|
+
}
|
|
222
|
+
export interface ChannelConfigBooleanField extends ChannelConfigFieldBase {
|
|
223
|
+
type: "boolean";
|
|
224
|
+
default?: boolean;
|
|
225
|
+
}
|
|
226
|
+
export interface ChannelConfigNumberField extends ChannelConfigFieldBase {
|
|
227
|
+
type: "number";
|
|
228
|
+
default?: number;
|
|
229
|
+
min?: number;
|
|
230
|
+
max?: number;
|
|
231
|
+
step?: number;
|
|
232
|
+
suffix?: string;
|
|
233
|
+
placeholder?: string;
|
|
234
|
+
}
|
|
235
|
+
export interface ChannelConfigStringArrayField extends ChannelConfigFieldBase {
|
|
236
|
+
type: "string-array";
|
|
237
|
+
default?: string[];
|
|
238
|
+
placeholder?: string;
|
|
239
|
+
}
|
|
240
|
+
export interface ChannelConfigKeyValueMapField extends ChannelConfigFieldBase {
|
|
241
|
+
type: "key-value-map";
|
|
242
|
+
valueType: "string" | "number";
|
|
243
|
+
default?: Record<string, string | number>;
|
|
244
|
+
keyLabel?: string;
|
|
245
|
+
valueLabel?: string;
|
|
246
|
+
keyPlaceholder?: string;
|
|
247
|
+
valuePlaceholder?: string;
|
|
248
|
+
}
|
|
249
|
+
export type ChannelConfigField = ChannelConfigTextField | ChannelConfigSecretField | ChannelConfigSelectField | ChannelConfigBooleanField | ChannelConfigNumberField | ChannelConfigStringArrayField | ChannelConfigKeyValueMapField;
|
|
250
|
+
export interface ChannelConfigSchema {
|
|
251
|
+
version: 1;
|
|
252
|
+
fields: ChannelConfigField[];
|
|
253
|
+
}
|
|
254
|
+
export interface ChannelSummary {
|
|
255
|
+
channel_id: ChannelId;
|
|
256
|
+
display_name: string;
|
|
257
|
+
configured: boolean;
|
|
258
|
+
enabled: boolean;
|
|
259
|
+
running: boolean;
|
|
260
|
+
dm_policy: DmPolicy | null;
|
|
261
|
+
pending_pairings_count: number;
|
|
262
|
+
approved_users_count: number;
|
|
263
|
+
routes_count: number;
|
|
264
|
+
/** Declarative config schema for dynamic settings UI, or null. */
|
|
265
|
+
config_schema: ChannelConfigSchema | null;
|
|
266
|
+
}
|
|
267
|
+
export interface ChannelConfigSnapshot {
|
|
268
|
+
channel_id: ChannelId;
|
|
269
|
+
account_id: string;
|
|
270
|
+
display_name?: string;
|
|
271
|
+
enabled: boolean;
|
|
272
|
+
dm_policy: DmPolicy;
|
|
273
|
+
allowed_users: string[];
|
|
274
|
+
/** Plugin-owned redacted config/settings payload. */
|
|
275
|
+
config: ChannelPluginConfig;
|
|
276
|
+
}
|
|
277
|
+
export interface ChannelAccountSnapshot {
|
|
278
|
+
channel_id: ChannelId;
|
|
279
|
+
account_id: string;
|
|
280
|
+
display_name?: string;
|
|
281
|
+
enabled: boolean;
|
|
282
|
+
configured: boolean;
|
|
283
|
+
running: boolean;
|
|
284
|
+
dm_policy: DmPolicy;
|
|
285
|
+
allowed_users: string[];
|
|
286
|
+
/** Plugin-owned redacted config/settings payload. */
|
|
287
|
+
config: ChannelPluginConfig;
|
|
288
|
+
created_at: string;
|
|
289
|
+
updated_at: string;
|
|
290
|
+
}
|
|
291
|
+
export interface ChannelPendingPairing {
|
|
292
|
+
account_id: string;
|
|
293
|
+
code: string;
|
|
294
|
+
sender_id: string;
|
|
295
|
+
sender_name?: string;
|
|
296
|
+
chat_id: string;
|
|
297
|
+
created_at: string;
|
|
298
|
+
expires_at: string;
|
|
299
|
+
}
|
|
300
|
+
export interface ChannelRouteSnapshot {
|
|
301
|
+
channel_id: ChannelId;
|
|
302
|
+
account_id: string;
|
|
303
|
+
chat_id: string;
|
|
304
|
+
chat_type?: "direct" | "channel";
|
|
305
|
+
thread_id?: string | null;
|
|
306
|
+
agent_id: string;
|
|
307
|
+
conversation_id: string;
|
|
308
|
+
enabled: boolean;
|
|
309
|
+
created_at: string;
|
|
310
|
+
updated_at: string;
|
|
311
|
+
}
|
|
312
|
+
export interface ChannelTargetSnapshot {
|
|
313
|
+
channel_id: ChannelId;
|
|
314
|
+
account_id: string;
|
|
315
|
+
target_id: string;
|
|
316
|
+
target_type: "channel";
|
|
317
|
+
chat_id: string;
|
|
318
|
+
label: string;
|
|
319
|
+
discovered_at: string;
|
|
320
|
+
last_seen_at: string;
|
|
321
|
+
last_message_id?: string;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Git repository state for the current working directory.
|
|
325
|
+
* Null when the CWD is not inside a git repository.
|
|
326
|
+
*/
|
|
327
|
+
export interface GitContext {
|
|
328
|
+
/** Current branch name. Null on detached HEAD or repos with no commits. */
|
|
329
|
+
branch: string | null;
|
|
330
|
+
/** Up to 10 local branches sorted by most-recently-committed, excluding the current branch. */
|
|
331
|
+
recent_branches: string[];
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Bottom-bar and device execution context state.
|
|
335
|
+
*/
|
|
336
|
+
export interface DeviceStatus {
|
|
337
|
+
current_connection_id: string | null;
|
|
338
|
+
connection_name: string | null;
|
|
339
|
+
is_online: boolean;
|
|
340
|
+
is_processing: boolean;
|
|
341
|
+
current_permission_mode: DevicePermissionMode;
|
|
342
|
+
current_working_directory: string | null;
|
|
343
|
+
git_context: GitContext | null;
|
|
344
|
+
letta_code_version: string | null;
|
|
345
|
+
current_toolset: ToolsetName | null;
|
|
346
|
+
current_toolset_preference: ToolsetPreference;
|
|
347
|
+
current_loaded_tools: string[];
|
|
348
|
+
current_available_skills: AvailableSkillSummary[];
|
|
349
|
+
background_processes: BackgroundProcessSummary[];
|
|
350
|
+
pending_control_requests: PendingControlRequest[];
|
|
351
|
+
experiments: ExperimentSnapshot[];
|
|
352
|
+
memory_directory: string | null;
|
|
353
|
+
/**
|
|
354
|
+
* Persisted CWD overrides keyed by listener scope key.
|
|
355
|
+
*
|
|
356
|
+
* Key format:
|
|
357
|
+
* - `conversation:<conversation_id>` for conversation-scoped overrides
|
|
358
|
+
* - `agent:<agent_id>::conversation:default` for an agent's default conversation scope
|
|
359
|
+
*
|
|
360
|
+
* Example: `conversation:conv_123` or `agent:agent_123::conversation:default`
|
|
361
|
+
*/
|
|
362
|
+
cwd_map?: Record<string, string>;
|
|
363
|
+
/** Listener boot CWD used when a conversation has no matching formatted key in `cwd_map`. */
|
|
364
|
+
boot_working_directory?: string | null;
|
|
365
|
+
should_doctor?: boolean;
|
|
366
|
+
reflection_settings: ReflectionSettingsSnapshot | null;
|
|
367
|
+
/** Remote slash command IDs this letta-code version can handle via `execute_command`. */
|
|
368
|
+
supported_commands: string[];
|
|
369
|
+
}
|
|
370
|
+
export type LoopStatus = "SENDING_API_REQUEST" | "WAITING_FOR_API_RESPONSE" | "RETRYING_API_REQUEST" | "PROCESSING_API_RESPONSE" | "EXECUTING_CLIENT_SIDE_TOOL" | "EXECUTING_COMMAND" | "WAITING_ON_APPROVAL" | "WAITING_ON_INPUT";
|
|
371
|
+
export type QueueMessageKind = "message" | "task_notification" | "cron_prompt" | "approval_result" | "overlay_action";
|
|
372
|
+
export type QueueMessageSource = "user" | "task_notification" | "cron" | "subagent" | "system" | "channel";
|
|
373
|
+
export interface QueueMessage {
|
|
374
|
+
id: string;
|
|
375
|
+
client_message_id: string;
|
|
376
|
+
kind: QueueMessageKind;
|
|
377
|
+
source: QueueMessageSource;
|
|
378
|
+
content: MessageCreate["content"] | string;
|
|
379
|
+
enqueued_at: string;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Loop state is intentionally small and finite.
|
|
383
|
+
* Message-level details are projected from runtime deltas.
|
|
384
|
+
*
|
|
385
|
+
* Queue state is delivered separately via `update_queue` messages.
|
|
386
|
+
*/
|
|
387
|
+
export interface LoopState {
|
|
388
|
+
status: LoopStatus;
|
|
389
|
+
active_run_ids: string[];
|
|
390
|
+
}
|
|
391
|
+
export interface DeviceStatusUpdateMessage extends RuntimeEnvelope {
|
|
392
|
+
type: "update_device_status";
|
|
393
|
+
device_status: DeviceStatus;
|
|
394
|
+
}
|
|
395
|
+
export interface LoopStatusUpdateMessage extends RuntimeEnvelope {
|
|
396
|
+
type: "update_loop_status";
|
|
397
|
+
loop_status: LoopState;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Full snapshot of the turn queue.
|
|
401
|
+
* Emitted on every queue mutation (enqueue, dequeue, clear, drop).
|
|
402
|
+
* Queue is typically 0-5 items so full snapshot is cheap and idempotent.
|
|
403
|
+
*/
|
|
404
|
+
export interface QueueUpdateMessage extends RuntimeEnvelope {
|
|
405
|
+
type: "update_queue";
|
|
406
|
+
queue: QueueMessage[];
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Standard Letta message delta forwarded through the stream channel.
|
|
410
|
+
*/
|
|
411
|
+
export type MessageDelta = {
|
|
412
|
+
type: "message";
|
|
413
|
+
} & LettaStreamingResponse;
|
|
414
|
+
export interface UmiLifecycleMessageBase {
|
|
415
|
+
id: string;
|
|
416
|
+
date: string;
|
|
417
|
+
message_type: string;
|
|
418
|
+
run_id?: string;
|
|
419
|
+
}
|
|
420
|
+
export interface ClientToolStartMessage extends UmiLifecycleMessageBase {
|
|
421
|
+
message_type: "client_tool_start";
|
|
422
|
+
tool_call_id: string;
|
|
423
|
+
}
|
|
424
|
+
export interface ClientToolEndMessage extends UmiLifecycleMessageBase {
|
|
425
|
+
message_type: "client_tool_end";
|
|
426
|
+
tool_call_id: string;
|
|
427
|
+
status: "success" | "error";
|
|
428
|
+
}
|
|
429
|
+
export interface CommandStartMessage extends UmiLifecycleMessageBase {
|
|
430
|
+
message_type: "command_start";
|
|
431
|
+
command_id: string;
|
|
432
|
+
input: string;
|
|
433
|
+
}
|
|
434
|
+
export interface CommandEndMessage extends UmiLifecycleMessageBase {
|
|
435
|
+
message_type: "command_end";
|
|
436
|
+
command_id: string;
|
|
437
|
+
input: string;
|
|
438
|
+
output: string;
|
|
439
|
+
success: boolean;
|
|
440
|
+
dim_output?: boolean;
|
|
441
|
+
preformatted?: boolean;
|
|
442
|
+
}
|
|
443
|
+
export interface SlashCommandStartMessage extends UmiLifecycleMessageBase {
|
|
444
|
+
message_type: "slash_command_start";
|
|
445
|
+
command_id: string;
|
|
446
|
+
input: string;
|
|
447
|
+
}
|
|
448
|
+
export interface SlashCommandEndMessage extends UmiLifecycleMessageBase {
|
|
449
|
+
message_type: "slash_command_end";
|
|
450
|
+
command_id: string;
|
|
451
|
+
input: string;
|
|
452
|
+
output: string;
|
|
453
|
+
success: boolean;
|
|
454
|
+
}
|
|
455
|
+
export interface StatusMessage extends UmiLifecycleMessageBase {
|
|
456
|
+
message_type: "status";
|
|
457
|
+
message: string;
|
|
458
|
+
level: "info" | "success" | "warning";
|
|
459
|
+
}
|
|
460
|
+
export interface RetryMessage extends UmiLifecycleMessageBase {
|
|
461
|
+
message_type: "retry";
|
|
462
|
+
message: string;
|
|
463
|
+
reason: StopReasonType;
|
|
464
|
+
attempt: number;
|
|
465
|
+
max_attempts: number;
|
|
466
|
+
delay_ms: number;
|
|
467
|
+
}
|
|
468
|
+
export interface LoopErrorMessage extends UmiLifecycleMessageBase {
|
|
469
|
+
message_type: "loop_error";
|
|
470
|
+
message: string;
|
|
471
|
+
stop_reason: StopReasonType;
|
|
472
|
+
is_terminal: boolean;
|
|
473
|
+
api_error?: LettaStreamingResponse.LettaErrorMessage;
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Expanded message-delta union.
|
|
477
|
+
* stream_delta is the only message stream event the WS server emits in v2.
|
|
478
|
+
*/
|
|
479
|
+
export type StreamDelta = MessageDelta | ClientToolStartMessage | ClientToolEndMessage | CommandStartMessage | CommandEndMessage | SlashCommandStartMessage | SlashCommandEndMessage | StatusMessage | RetryMessage | LoopErrorMessage;
|
|
480
|
+
export interface StreamDeltaMessage extends RuntimeEnvelope {
|
|
481
|
+
type: "stream_delta";
|
|
482
|
+
delta: StreamDelta;
|
|
483
|
+
subagent_id?: string;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Subagent state snapshot.
|
|
487
|
+
* Emitted via `update_subagent_state` on every subagent mutation.
|
|
488
|
+
*/
|
|
489
|
+
export interface SubagentSnapshotToolCall {
|
|
490
|
+
id: string;
|
|
491
|
+
name: string;
|
|
492
|
+
args: string;
|
|
493
|
+
}
|
|
494
|
+
export interface SubagentSnapshot {
|
|
495
|
+
subagent_id: string;
|
|
496
|
+
subagent_type: string;
|
|
497
|
+
description: string;
|
|
498
|
+
status: "pending" | "running" | "completed" | "error";
|
|
499
|
+
agent_url: string | null;
|
|
500
|
+
model?: string;
|
|
501
|
+
is_background?: boolean;
|
|
502
|
+
silent?: boolean;
|
|
503
|
+
tool_call_id?: string;
|
|
504
|
+
parent_agent_id?: string;
|
|
505
|
+
parent_conversation_id?: string;
|
|
506
|
+
start_time: number;
|
|
507
|
+
tool_calls: SubagentSnapshotToolCall[];
|
|
508
|
+
total_tokens: number;
|
|
509
|
+
duration_ms: number;
|
|
510
|
+
error?: string;
|
|
511
|
+
}
|
|
512
|
+
export interface SubagentStateUpdateMessage extends RuntimeEnvelope {
|
|
513
|
+
type: "update_subagent_state";
|
|
514
|
+
subagents: SubagentSnapshot[];
|
|
515
|
+
}
|
|
516
|
+
export interface ApprovalResponseAllowDecision {
|
|
517
|
+
behavior: "allow";
|
|
518
|
+
message?: string;
|
|
519
|
+
updated_input?: Record<string, unknown> | null;
|
|
520
|
+
selected_permission_suggestion_ids?: string[];
|
|
521
|
+
}
|
|
522
|
+
export interface ApprovalResponseDenyDecision {
|
|
523
|
+
behavior: "deny";
|
|
524
|
+
message: string;
|
|
525
|
+
}
|
|
526
|
+
export type ApprovalResponseDecision = ApprovalResponseAllowDecision | ApprovalResponseDenyDecision;
|
|
527
|
+
export type ApprovalResponseBody = {
|
|
528
|
+
request_id: string;
|
|
529
|
+
decision: ApprovalResponseDecision;
|
|
530
|
+
} | {
|
|
531
|
+
request_id: string;
|
|
532
|
+
error: string;
|
|
533
|
+
};
|
|
534
|
+
/**
|
|
535
|
+
* Controller -> execution-environment commands.
|
|
536
|
+
* In v2, the WS server accepts runtime-scoped chat/device commands plus
|
|
537
|
+
* device capability commands (filesystem, memory, cron, terminals).
|
|
538
|
+
*/
|
|
539
|
+
export interface InputCreateMessagePayload {
|
|
540
|
+
kind: "create_message";
|
|
541
|
+
messages: Array<MessageCreate & {
|
|
542
|
+
client_message_id?: string;
|
|
543
|
+
}>;
|
|
544
|
+
/**
|
|
545
|
+
* Optional request-scoped allowlist for locally executed client tools.
|
|
546
|
+
* Undefined preserves the listener's normal toolset; an empty array means no
|
|
547
|
+
* client tools for this turn.
|
|
548
|
+
*/
|
|
549
|
+
client_tool_allowlist?: string[];
|
|
550
|
+
/**
|
|
551
|
+
* Optional scoped external tools to expose for this turn. Runtime-start
|
|
552
|
+
* external tools with a scope_id stay hidden unless selected here; unscoped
|
|
553
|
+
* external tools for the runtime remain available normally.
|
|
554
|
+
*/
|
|
555
|
+
external_tool_scope_ids?: string[];
|
|
556
|
+
}
|
|
557
|
+
export type InputApprovalResponsePayload = {
|
|
558
|
+
kind: "approval_response";
|
|
559
|
+
} & ApprovalResponseBody;
|
|
560
|
+
export type InputPayload = InputCreateMessagePayload | InputApprovalResponsePayload;
|
|
561
|
+
export interface InputCommand {
|
|
562
|
+
type: "input";
|
|
563
|
+
runtime: RuntimeScope;
|
|
564
|
+
payload: InputPayload;
|
|
565
|
+
}
|
|
566
|
+
export interface ChangeDeviceStatePayload {
|
|
567
|
+
mode?: DevicePermissionMode;
|
|
568
|
+
cwd?: string;
|
|
569
|
+
agent_id?: string | null;
|
|
570
|
+
conversation_id?: string | null;
|
|
571
|
+
}
|
|
572
|
+
export interface ChangeDeviceStateCommand {
|
|
573
|
+
type: "change_device_state";
|
|
574
|
+
runtime: RuntimeScope;
|
|
575
|
+
payload: ChangeDeviceStatePayload;
|
|
576
|
+
}
|
|
577
|
+
export interface AbortMessageCommand {
|
|
578
|
+
type: "abort_message";
|
|
579
|
+
runtime: RuntimeScope;
|
|
580
|
+
/** When provided, app-server sends abort_message_response on the control channel. */
|
|
581
|
+
request_id?: string;
|
|
582
|
+
run_id?: string | null;
|
|
583
|
+
}
|
|
584
|
+
export interface SyncCommand {
|
|
585
|
+
type: "sync";
|
|
586
|
+
runtime: RuntimeScope;
|
|
587
|
+
/** When provided, app-server sends sync_response after replaying state. */
|
|
588
|
+
request_id?: string;
|
|
589
|
+
/**
|
|
590
|
+
* Whether the device should probe backend state for stale pending approvals.
|
|
591
|
+
* Defaults to true for older clients. Lightweight status/recovery syncs should
|
|
592
|
+
* set this false and only replay in-memory listener state.
|
|
593
|
+
*/
|
|
594
|
+
recover_approvals?: boolean;
|
|
595
|
+
/**
|
|
596
|
+
* Force the sync replay to include update_device_status even when the
|
|
597
|
+
* listener's last device-status snapshot for this socket/scope is unchanged.
|
|
598
|
+
*/
|
|
599
|
+
force_device_status?: boolean;
|
|
600
|
+
}
|
|
601
|
+
export interface RuntimeStartCreateAgentOptions {
|
|
602
|
+
/** Body forwarded to the Letta agents create API. */
|
|
603
|
+
body: AgentCreateParams;
|
|
604
|
+
/** Whether to pin the created agent globally. Defaults to true. */
|
|
605
|
+
pin_global?: boolean;
|
|
606
|
+
}
|
|
607
|
+
export interface RuntimeStartCreateConversationOptions {
|
|
608
|
+
/** Body forwarded to the Letta conversations create API. */
|
|
609
|
+
body?: Omit<ConversationCreateParams, "agent_id">;
|
|
610
|
+
}
|
|
611
|
+
export interface RuntimeStartClientInfo {
|
|
612
|
+
name: string;
|
|
613
|
+
title?: string;
|
|
614
|
+
version?: string;
|
|
615
|
+
}
|
|
616
|
+
export interface ExternalToolDefinitionPayload {
|
|
617
|
+
name: string;
|
|
618
|
+
label?: string;
|
|
619
|
+
description: string;
|
|
620
|
+
parameters: Record<string, unknown>;
|
|
621
|
+
}
|
|
622
|
+
export interface RuntimeStartExternalToolsGroup {
|
|
623
|
+
/** Hidden controller-defined scope used to select these tools on input turns. */
|
|
624
|
+
scope_id?: string;
|
|
625
|
+
tools: readonly ExternalToolDefinitionPayload[];
|
|
626
|
+
}
|
|
627
|
+
export interface RuntimeStartCommand {
|
|
628
|
+
type: "runtime_start";
|
|
629
|
+
/** Echoed back in the response for request correlation. */
|
|
630
|
+
request_id: string;
|
|
631
|
+
/** Existing agent to start/resume a runtime for. Mutually exclusive with create_agent. */
|
|
632
|
+
agent_id?: string;
|
|
633
|
+
/** Create a new agent before starting the runtime. Mutually exclusive with agent_id. */
|
|
634
|
+
create_agent?: RuntimeStartCreateAgentOptions;
|
|
635
|
+
/** Existing conversation to start/resume. Mutually exclusive with create_conversation. */
|
|
636
|
+
conversation_id?: string;
|
|
637
|
+
/** Create a new conversation for the resolved agent before starting the runtime. */
|
|
638
|
+
create_conversation?: RuntimeStartCreateConversationOptions;
|
|
639
|
+
/** Initial working directory for this runtime scope. Null resets to listener boot CWD. */
|
|
640
|
+
cwd?: string | null;
|
|
641
|
+
/** Initial permission mode for this runtime scope. */
|
|
642
|
+
mode?: DevicePermissionMode;
|
|
643
|
+
/** Optional client metadata for diagnostics/future protocol negotiation. */
|
|
644
|
+
client_info?: RuntimeStartClientInfo;
|
|
645
|
+
/** Whether to probe backend state for stale pending approvals before replaying state. Defaults to true. */
|
|
646
|
+
recover_approvals?: boolean;
|
|
647
|
+
/** Force the initial state replay to include update_device_status. Defaults to true. */
|
|
648
|
+
force_device_status?: boolean;
|
|
649
|
+
/** Controller-owned tools registered atomically with the resolved runtime. */
|
|
650
|
+
external_tools?: readonly RuntimeStartExternalToolsGroup[];
|
|
651
|
+
}
|
|
652
|
+
export interface ExternalToolCallRequestMessage {
|
|
653
|
+
type: "external_tool_call_request";
|
|
654
|
+
request_id: string;
|
|
655
|
+
runtime?: RuntimeScope;
|
|
656
|
+
scope_id?: string;
|
|
657
|
+
tool_call_id: string;
|
|
658
|
+
tool_name: string;
|
|
659
|
+
input: Record<string, unknown>;
|
|
660
|
+
}
|
|
661
|
+
export interface ExternalToolCallResultContent {
|
|
662
|
+
type: string;
|
|
663
|
+
text?: string;
|
|
664
|
+
data?: string;
|
|
665
|
+
mimeType?: string;
|
|
666
|
+
}
|
|
667
|
+
export interface ExternalToolCallResult {
|
|
668
|
+
content: readonly ExternalToolCallResultContent[];
|
|
669
|
+
is_error?: boolean;
|
|
670
|
+
}
|
|
671
|
+
export interface ExternalToolCallResponseCommand {
|
|
672
|
+
type: "external_tool_call_response";
|
|
673
|
+
request_id: string;
|
|
674
|
+
result?: ExternalToolCallResult;
|
|
675
|
+
error?: string;
|
|
676
|
+
}
|
|
677
|
+
export interface TerminalSpawnCommand {
|
|
678
|
+
type: "terminal_spawn";
|
|
679
|
+
terminal_id: string;
|
|
680
|
+
cols: number;
|
|
681
|
+
rows: number;
|
|
682
|
+
/** Agent's current working directory. Falls back to bootWorkingDirectory if absent. */
|
|
683
|
+
cwd?: string;
|
|
684
|
+
}
|
|
685
|
+
export interface TerminalInputCommand {
|
|
686
|
+
type: "terminal_input";
|
|
687
|
+
terminal_id: string;
|
|
688
|
+
data: string;
|
|
689
|
+
}
|
|
690
|
+
export interface TerminalResizeCommand {
|
|
691
|
+
type: "terminal_resize";
|
|
692
|
+
terminal_id: string;
|
|
693
|
+
cols: number;
|
|
694
|
+
rows: number;
|
|
695
|
+
}
|
|
696
|
+
export interface TerminalKillCommand {
|
|
697
|
+
type: "terminal_kill";
|
|
698
|
+
terminal_id: string;
|
|
699
|
+
}
|
|
700
|
+
export interface TerminalOutputMessage {
|
|
701
|
+
type: "terminal_output";
|
|
702
|
+
terminal_id: string;
|
|
703
|
+
data: string;
|
|
704
|
+
}
|
|
705
|
+
export interface TerminalSpawnedMessage {
|
|
706
|
+
type: "terminal_spawned";
|
|
707
|
+
terminal_id: string;
|
|
708
|
+
pid: number;
|
|
709
|
+
}
|
|
710
|
+
export interface TerminalExitedMessage {
|
|
711
|
+
type: "terminal_exited";
|
|
712
|
+
terminal_id: string;
|
|
713
|
+
exitCode: number;
|
|
714
|
+
error?: string;
|
|
715
|
+
}
|
|
716
|
+
export interface AbortMessageResponseMessage {
|
|
717
|
+
type: "abort_message_response";
|
|
718
|
+
request_id: string;
|
|
719
|
+
runtime: RuntimeScope;
|
|
720
|
+
/** True when an active turn or pending approval was interrupted. */
|
|
721
|
+
aborted: boolean;
|
|
722
|
+
success: boolean;
|
|
723
|
+
error?: string;
|
|
724
|
+
}
|
|
725
|
+
export interface SyncResponseMessage {
|
|
726
|
+
type: "sync_response";
|
|
727
|
+
request_id: string;
|
|
728
|
+
runtime: RuntimeScope;
|
|
729
|
+
success: boolean;
|
|
730
|
+
error?: string;
|
|
731
|
+
}
|
|
732
|
+
export interface SearchFilesCommand {
|
|
733
|
+
type: "search_files";
|
|
734
|
+
/** Substring to match against file paths. Empty string returns top files by mtime. */
|
|
735
|
+
query: string;
|
|
736
|
+
/** Echoed back in the response for request correlation. */
|
|
737
|
+
request_id: string;
|
|
738
|
+
/** Maximum number of results to return. Defaults to 5. */
|
|
739
|
+
max_results?: number;
|
|
740
|
+
/** Working directory to scope the search to. When provided, only files
|
|
741
|
+
* within this directory (relative to the index root) are returned. */
|
|
742
|
+
cwd?: string;
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Listener command — IntelliJ-style "find in files" content search.
|
|
746
|
+
* Returns line-level matches (text + line/column range) instead of
|
|
747
|
+
* just the file list so the client can render an IDE-grade results
|
|
748
|
+
* pane with snippet previews.
|
|
749
|
+
*/
|
|
750
|
+
export interface GrepInFilesCommand {
|
|
751
|
+
type: "grep_in_files";
|
|
752
|
+
/** Echoed back in the response for request correlation. */
|
|
753
|
+
request_id: string;
|
|
754
|
+
/** Literal or regex pattern depending on `is_regex`. */
|
|
755
|
+
query: string;
|
|
756
|
+
/** When true, `query` is treated as a regex. Defaults to false. */
|
|
757
|
+
is_regex?: boolean;
|
|
758
|
+
/** Case-sensitive match. Defaults to false. */
|
|
759
|
+
case_sensitive?: boolean;
|
|
760
|
+
/** Whole-word match. Defaults to false. */
|
|
761
|
+
whole_word?: boolean;
|
|
762
|
+
/** Glob filter (e.g. "*.tsx" or "src/** /*.ts"). Empty = no filter. */
|
|
763
|
+
glob?: string;
|
|
764
|
+
/** Scope search to this absolute dir. Falls back to the index root. */
|
|
765
|
+
cwd?: string;
|
|
766
|
+
/** Max match lines returned (not files). Defaults to 500. */
|
|
767
|
+
max_results?: number;
|
|
768
|
+
/** Lines of context before/after each match. Defaults to 2. */
|
|
769
|
+
context_lines?: number;
|
|
770
|
+
}
|
|
771
|
+
export interface GrepInFilesMatch {
|
|
772
|
+
/** Path relative to the search root. */
|
|
773
|
+
path: string;
|
|
774
|
+
/** 1-based line number of the matched line. */
|
|
775
|
+
line: number;
|
|
776
|
+
/** 1-based column (character offset of match start, inclusive). */
|
|
777
|
+
column: number;
|
|
778
|
+
/** 1-based column of match end (exclusive). */
|
|
779
|
+
column_end: number;
|
|
780
|
+
/** The full matched line's text (no trailing newline). */
|
|
781
|
+
text: string;
|
|
782
|
+
/** Lines immediately before the match (up to context_lines). */
|
|
783
|
+
before?: string[];
|
|
784
|
+
/** Lines immediately after the match (up to context_lines). */
|
|
785
|
+
after?: string[];
|
|
786
|
+
}
|
|
787
|
+
export interface SearchFilesEntry {
|
|
788
|
+
path: string;
|
|
789
|
+
type: "file";
|
|
790
|
+
}
|
|
791
|
+
export interface SearchFilesResponseMessage {
|
|
792
|
+
type: "search_files_response";
|
|
793
|
+
request_id: string;
|
|
794
|
+
files: SearchFilesEntry[];
|
|
795
|
+
success: boolean;
|
|
796
|
+
error?: string;
|
|
797
|
+
}
|
|
798
|
+
export interface GrepInFilesResponseMessage {
|
|
799
|
+
type: "grep_in_files_response";
|
|
800
|
+
request_id: string;
|
|
801
|
+
success: boolean;
|
|
802
|
+
matches: GrepInFilesMatch[];
|
|
803
|
+
total_matches: number;
|
|
804
|
+
total_files: number;
|
|
805
|
+
truncated: boolean;
|
|
806
|
+
error?: string;
|
|
807
|
+
}
|
|
808
|
+
export interface ListInDirectoryCommand {
|
|
809
|
+
type: "list_in_directory";
|
|
810
|
+
/** Absolute path to list entries in. */
|
|
811
|
+
path: string;
|
|
812
|
+
/** When true, response includes non-directory entries in `files`. */
|
|
813
|
+
include_files?: boolean;
|
|
814
|
+
/** Max entries to return (folders + files combined). */
|
|
815
|
+
limit?: number;
|
|
816
|
+
/** Number of entries to skip before returning. */
|
|
817
|
+
offset?: number;
|
|
818
|
+
/** Echoed back in the response for request correlation. */
|
|
819
|
+
request_id?: string;
|
|
820
|
+
}
|
|
821
|
+
export interface ListInDirectoryResponseMessage {
|
|
822
|
+
type: "list_in_directory_response";
|
|
823
|
+
path: string;
|
|
824
|
+
folders: string[];
|
|
825
|
+
files?: string[];
|
|
826
|
+
hasMore: boolean;
|
|
827
|
+
total?: number;
|
|
828
|
+
success: boolean;
|
|
829
|
+
error?: string;
|
|
830
|
+
request_id?: string;
|
|
831
|
+
}
|
|
832
|
+
export interface GetTreeCommand {
|
|
833
|
+
type: "get_tree";
|
|
834
|
+
/** Absolute path to the root of the subtree to fetch. */
|
|
835
|
+
path: string;
|
|
836
|
+
/** Maximum depth of the subtree to return (e.g. 3). */
|
|
837
|
+
depth: number;
|
|
838
|
+
/** Echoed back in the response for request correlation. */
|
|
839
|
+
request_id: string;
|
|
840
|
+
}
|
|
841
|
+
export interface TreeEntry {
|
|
842
|
+
path: string;
|
|
843
|
+
type: "file" | "dir";
|
|
844
|
+
}
|
|
845
|
+
export interface GetTreeResponseMessage {
|
|
846
|
+
type: "get_tree_response";
|
|
847
|
+
path: string;
|
|
848
|
+
request_id: string;
|
|
849
|
+
entries: TreeEntry[];
|
|
850
|
+
has_more_depth: boolean;
|
|
851
|
+
success: boolean;
|
|
852
|
+
error?: string;
|
|
853
|
+
}
|
|
854
|
+
export interface ReadFileCommand {
|
|
855
|
+
type: "read_file";
|
|
856
|
+
/** Absolute path to the file to read. */
|
|
857
|
+
path: string;
|
|
858
|
+
/** Echoed back in the response for request correlation. */
|
|
859
|
+
request_id: string;
|
|
860
|
+
}
|
|
861
|
+
export interface ReadFileResponseMessage {
|
|
862
|
+
type: "read_file_response";
|
|
863
|
+
request_id: string;
|
|
864
|
+
path: string;
|
|
865
|
+
content: string | null;
|
|
866
|
+
success: boolean;
|
|
867
|
+
error?: string;
|
|
868
|
+
}
|
|
869
|
+
export interface WriteFileCommand {
|
|
870
|
+
type: "write_file";
|
|
871
|
+
/** Absolute path to the file to write. */
|
|
872
|
+
path: string;
|
|
873
|
+
/** The full file content to write. */
|
|
874
|
+
content: string;
|
|
875
|
+
/** Echoed back in the response for request correlation. */
|
|
876
|
+
request_id: string;
|
|
877
|
+
}
|
|
878
|
+
export interface WriteFileResponseMessage {
|
|
879
|
+
type: "write_file_response";
|
|
880
|
+
request_id: string;
|
|
881
|
+
path: string;
|
|
882
|
+
success: boolean;
|
|
883
|
+
error?: string;
|
|
884
|
+
}
|
|
885
|
+
export interface WatchFileCommand {
|
|
886
|
+
type: "watch_file";
|
|
887
|
+
/** Absolute path to the file to watch for external changes. */
|
|
888
|
+
path: string;
|
|
889
|
+
request_id: string;
|
|
890
|
+
}
|
|
891
|
+
export interface UnwatchFileCommand {
|
|
892
|
+
type: "unwatch_file";
|
|
893
|
+
/** Absolute path to the file to stop watching. */
|
|
894
|
+
path: string;
|
|
895
|
+
request_id: string;
|
|
896
|
+
}
|
|
897
|
+
/** Bidirectional: Egwalker CRDT ops for collaborative editing. */
|
|
898
|
+
export interface FileOpsCommand {
|
|
899
|
+
type: "file_ops";
|
|
900
|
+
/** Absolute path to the file being edited. */
|
|
901
|
+
path: string;
|
|
902
|
+
/** Serialized causal-graph entries. */
|
|
903
|
+
cg_entries: {
|
|
904
|
+
agent: string;
|
|
905
|
+
seq: number;
|
|
906
|
+
len: number;
|
|
907
|
+
parents: [string, number][];
|
|
908
|
+
}[];
|
|
909
|
+
/** The operations (insert / delete). */
|
|
910
|
+
ops: {
|
|
911
|
+
type: "ins" | "del";
|
|
912
|
+
pos: number;
|
|
913
|
+
content?: string;
|
|
914
|
+
}[];
|
|
915
|
+
/** Who generated these ops (e.g. 'window-abc', 'agent-xyz'). */
|
|
916
|
+
source: string;
|
|
917
|
+
/** Full document content after these ops were applied. */
|
|
918
|
+
document_content?: string;
|
|
919
|
+
}
|
|
920
|
+
export interface EditFileCommand {
|
|
921
|
+
type: "edit_file";
|
|
922
|
+
/** Absolute path to the file to edit. */
|
|
923
|
+
file_path: string;
|
|
924
|
+
/** The exact text to find and replace. */
|
|
925
|
+
old_string: string;
|
|
926
|
+
/** The replacement text. */
|
|
927
|
+
new_string: string;
|
|
928
|
+
/** When true, replace all occurrences. */
|
|
929
|
+
replace_all?: boolean;
|
|
930
|
+
/** Expected number of replacements (validation). */
|
|
931
|
+
expected_replacements?: number;
|
|
932
|
+
/** Echoed back in the response for request correlation. */
|
|
933
|
+
request_id: string;
|
|
934
|
+
}
|
|
935
|
+
export interface EditFileResponseMessage {
|
|
936
|
+
type: "edit_file_response";
|
|
937
|
+
request_id: string;
|
|
938
|
+
file_path: string;
|
|
939
|
+
message: string | null;
|
|
940
|
+
replacements: number;
|
|
941
|
+
start_line?: number;
|
|
942
|
+
success: boolean;
|
|
943
|
+
error?: string;
|
|
944
|
+
}
|
|
945
|
+
export interface FileChangedMessage {
|
|
946
|
+
type: "file_changed";
|
|
947
|
+
path: string;
|
|
948
|
+
lastModified: number;
|
|
949
|
+
}
|
|
950
|
+
export interface ListMemoryCommand {
|
|
951
|
+
type: "list_memory";
|
|
952
|
+
/** Echoed back in every response chunk for request correlation. */
|
|
953
|
+
request_id: string;
|
|
954
|
+
/** The agent whose memory to list. */
|
|
955
|
+
agent_id: string;
|
|
956
|
+
/** When true, include parsed file references for graph edges. */
|
|
957
|
+
include_references?: boolean;
|
|
958
|
+
}
|
|
959
|
+
export interface MemoryHistoryCommand {
|
|
960
|
+
type: "memory_history";
|
|
961
|
+
/** Echoed back in the response for request correlation. */
|
|
962
|
+
request_id: string;
|
|
963
|
+
/** The agent whose memory history to fetch. */
|
|
964
|
+
agent_id: string;
|
|
965
|
+
/** Relative path within the memory directory (e.g. "system/persona.md"). Omit for global history across all files. */
|
|
966
|
+
file_path?: string;
|
|
967
|
+
/** Max commits to return (default 50). */
|
|
968
|
+
limit?: number;
|
|
969
|
+
}
|
|
970
|
+
export interface MemoryFileAtRefCommand {
|
|
971
|
+
type: "memory_file_at_ref";
|
|
972
|
+
/** Echoed back in the response for request correlation. */
|
|
973
|
+
request_id: string;
|
|
974
|
+
/** The agent whose memory to read. */
|
|
975
|
+
agent_id: string;
|
|
976
|
+
/** Relative path within the memory directory. */
|
|
977
|
+
file_path: string;
|
|
978
|
+
/** Git SHA to read the file at. */
|
|
979
|
+
ref: string;
|
|
980
|
+
}
|
|
981
|
+
/** Read a file from the agent's MemFS working tree. Use base64 for binary. */
|
|
982
|
+
export interface ReadMemoryFileCommand {
|
|
983
|
+
type: "read_memory_file";
|
|
984
|
+
/** Echoed back in the response for request correlation. */
|
|
985
|
+
request_id: string;
|
|
986
|
+
/** The agent whose memory to read. */
|
|
987
|
+
agent_id: string;
|
|
988
|
+
/** Relative to the memory root. */
|
|
989
|
+
path: string;
|
|
990
|
+
/** Defaults to "utf8". */
|
|
991
|
+
encoding?: "utf8" | "base64";
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* Write a file into the agent's MemFS and commit.
|
|
995
|
+
*
|
|
996
|
+
* Use for agent memory writes (e.g. profile images). Path is
|
|
997
|
+
* relative to the memory root and is rejected if it escapes the root.
|
|
998
|
+
*/
|
|
999
|
+
export interface WriteMemoryFileCommand {
|
|
1000
|
+
type: "write_memory_file";
|
|
1001
|
+
/** Echoed back in the response for request correlation. */
|
|
1002
|
+
request_id: string;
|
|
1003
|
+
/** The agent whose memory to write to. */
|
|
1004
|
+
agent_id: string;
|
|
1005
|
+
/** Relative path within the memory directory (e.g. "profile.png"). */
|
|
1006
|
+
path: string;
|
|
1007
|
+
/** Content to write — utf8 string or base64-encoded bytes. */
|
|
1008
|
+
content: string;
|
|
1009
|
+
/** Encoding of `content`. Defaults to "utf8". */
|
|
1010
|
+
encoding?: "utf8" | "base64";
|
|
1011
|
+
/** Optional commit message; defaults to a sensible fallback. */
|
|
1012
|
+
commit_message?: string;
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* Delete a single file from the agent's MemFS working tree and commit
|
|
1016
|
+
* the deletion. Idempotent: if the file is already absent, the handler
|
|
1017
|
+
* returns success without producing a commit.
|
|
1018
|
+
*/
|
|
1019
|
+
export interface DeleteMemoryFileCommand {
|
|
1020
|
+
type: "delete_memory_file";
|
|
1021
|
+
/** Echoed back in the response for request correlation. */
|
|
1022
|
+
request_id: string;
|
|
1023
|
+
/** The agent whose memory to delete from. */
|
|
1024
|
+
agent_id: string;
|
|
1025
|
+
/** Relative path within the memory directory. */
|
|
1026
|
+
path: string;
|
|
1027
|
+
/** Optional commit message; defaults to a sensible fallback. */
|
|
1028
|
+
commit_message?: string;
|
|
1029
|
+
}
|
|
1030
|
+
export interface MemoryCommitDiffCommand {
|
|
1031
|
+
type: "memory_commit_diff";
|
|
1032
|
+
/** Echoed back in the response for request correlation. */
|
|
1033
|
+
request_id: string;
|
|
1034
|
+
/** The agent whose memory to read. */
|
|
1035
|
+
agent_id: string;
|
|
1036
|
+
/** Git SHA of the commit to show. */
|
|
1037
|
+
sha: string;
|
|
1038
|
+
}
|
|
1039
|
+
export interface EnableMemfsCommand {
|
|
1040
|
+
type: "enable_memfs";
|
|
1041
|
+
/** Echoed back in the response for request correlation. */
|
|
1042
|
+
request_id: string;
|
|
1043
|
+
/** The agent to enable memfs for. */
|
|
1044
|
+
agent_id: string;
|
|
1045
|
+
}
|
|
1046
|
+
export interface MemoryFileEntry {
|
|
1047
|
+
relative_path: string;
|
|
1048
|
+
is_system: boolean;
|
|
1049
|
+
description: string | null;
|
|
1050
|
+
content: string;
|
|
1051
|
+
size: number;
|
|
1052
|
+
references?: string[];
|
|
1053
|
+
}
|
|
1054
|
+
export interface ListMemoryResponseMessage {
|
|
1055
|
+
type: "list_memory_response";
|
|
1056
|
+
request_id: string;
|
|
1057
|
+
entries: MemoryFileEntry[];
|
|
1058
|
+
done: boolean;
|
|
1059
|
+
total: number;
|
|
1060
|
+
success: boolean;
|
|
1061
|
+
error?: string;
|
|
1062
|
+
memfs_enabled?: boolean;
|
|
1063
|
+
memfs_initialized?: boolean;
|
|
1064
|
+
}
|
|
1065
|
+
export interface MemoryHistoryCommitEntry {
|
|
1066
|
+
sha: string;
|
|
1067
|
+
message: string;
|
|
1068
|
+
timestamp: string;
|
|
1069
|
+
author_name: string | null;
|
|
1070
|
+
}
|
|
1071
|
+
export interface MemoryHistoryResponseMessage {
|
|
1072
|
+
type: "memory_history_response";
|
|
1073
|
+
request_id: string;
|
|
1074
|
+
file_path: string;
|
|
1075
|
+
commits: MemoryHistoryCommitEntry[];
|
|
1076
|
+
success: boolean;
|
|
1077
|
+
error?: string;
|
|
1078
|
+
}
|
|
1079
|
+
export interface MemoryFileAtRefResponseMessage {
|
|
1080
|
+
type: "memory_file_at_ref_response";
|
|
1081
|
+
request_id: string;
|
|
1082
|
+
file_path: string;
|
|
1083
|
+
ref: string;
|
|
1084
|
+
content: string | null;
|
|
1085
|
+
success: boolean;
|
|
1086
|
+
error?: string;
|
|
1087
|
+
}
|
|
1088
|
+
export interface ReadMemoryFileResponseMessage {
|
|
1089
|
+
type: "read_memory_file_response";
|
|
1090
|
+
request_id: string;
|
|
1091
|
+
agent_id: string;
|
|
1092
|
+
path: string;
|
|
1093
|
+
content: string | null;
|
|
1094
|
+
encoding: "utf8" | "base64";
|
|
1095
|
+
success: boolean;
|
|
1096
|
+
error?: string;
|
|
1097
|
+
}
|
|
1098
|
+
export interface WriteMemoryFileResponseMessage {
|
|
1099
|
+
type: "write_memory_file_response";
|
|
1100
|
+
request_id: string;
|
|
1101
|
+
agent_id: string;
|
|
1102
|
+
path: string;
|
|
1103
|
+
success: boolean;
|
|
1104
|
+
committed?: boolean;
|
|
1105
|
+
commit_sha?: string;
|
|
1106
|
+
error?: string;
|
|
1107
|
+
}
|
|
1108
|
+
export interface DeleteMemoryFileResponseMessage {
|
|
1109
|
+
type: "delete_memory_file_response";
|
|
1110
|
+
request_id: string;
|
|
1111
|
+
agent_id: string;
|
|
1112
|
+
path: string;
|
|
1113
|
+
success: boolean;
|
|
1114
|
+
committed?: boolean;
|
|
1115
|
+
commit_sha?: string;
|
|
1116
|
+
error?: string;
|
|
1117
|
+
}
|
|
1118
|
+
export interface MemoryCommitDiffResponseMessage {
|
|
1119
|
+
type: "memory_commit_diff_response";
|
|
1120
|
+
request_id: string;
|
|
1121
|
+
sha: string;
|
|
1122
|
+
diff: string | null;
|
|
1123
|
+
success: boolean;
|
|
1124
|
+
error?: string;
|
|
1125
|
+
}
|
|
1126
|
+
export interface EnableMemfsResponseMessage {
|
|
1127
|
+
type: "enable_memfs_response";
|
|
1128
|
+
request_id: string;
|
|
1129
|
+
success: boolean;
|
|
1130
|
+
memory_directory?: string;
|
|
1131
|
+
error?: string;
|
|
1132
|
+
}
|
|
1133
|
+
export interface MemoryUpdatedMessage {
|
|
1134
|
+
type: "memory_updated";
|
|
1135
|
+
affected_paths: string[];
|
|
1136
|
+
timestamp: number;
|
|
1137
|
+
}
|
|
1138
|
+
export interface ListModelsCommand {
|
|
1139
|
+
type: "list_models";
|
|
1140
|
+
/** Echoed back in the response for request correlation. */
|
|
1141
|
+
request_id: string;
|
|
1142
|
+
}
|
|
1143
|
+
export type ConnectProviderStorageTarget = "local";
|
|
1144
|
+
export interface ListConnectProvidersCommand {
|
|
1145
|
+
type: "list_connect_providers";
|
|
1146
|
+
/** Echoed back in the response for request correlation. */
|
|
1147
|
+
request_id: string;
|
|
1148
|
+
/** Provider store to inspect. MVP supports local provider storage. */
|
|
1149
|
+
target: ConnectProviderStorageTarget;
|
|
1150
|
+
}
|
|
1151
|
+
export interface ConnectProviderCommand {
|
|
1152
|
+
type: "connect_provider";
|
|
1153
|
+
/** Echoed back in the response for request correlation. */
|
|
1154
|
+
request_id: string;
|
|
1155
|
+
/** Provider store to write. MVP supports local provider storage. */
|
|
1156
|
+
target: ConnectProviderStorageTarget;
|
|
1157
|
+
/** Provider id from list_connect_providers. */
|
|
1158
|
+
provider_id: string;
|
|
1159
|
+
/** Optional auth method id for providers with multiple auth methods. */
|
|
1160
|
+
auth_method_id?: string;
|
|
1161
|
+
/** User-provided connection fields keyed by field id. */
|
|
1162
|
+
fields: Record<string, string>;
|
|
1163
|
+
}
|
|
1164
|
+
export interface DisconnectProviderCommand {
|
|
1165
|
+
type: "disconnect_provider";
|
|
1166
|
+
/** Echoed back in the response for request correlation. */
|
|
1167
|
+
request_id: string;
|
|
1168
|
+
/** Provider store to write. MVP supports local provider storage. */
|
|
1169
|
+
target: ConnectProviderStorageTarget;
|
|
1170
|
+
/** Provider id from list_connect_providers. */
|
|
1171
|
+
provider_id: string;
|
|
1172
|
+
}
|
|
1173
|
+
export interface ConnectProviderField {
|
|
1174
|
+
key: string;
|
|
1175
|
+
label: string;
|
|
1176
|
+
placeholder?: string;
|
|
1177
|
+
secret?: boolean;
|
|
1178
|
+
required?: boolean;
|
|
1179
|
+
}
|
|
1180
|
+
export interface ConnectProviderAuthMethod {
|
|
1181
|
+
id: string;
|
|
1182
|
+
label: string;
|
|
1183
|
+
description: string;
|
|
1184
|
+
fields: ConnectProviderField[];
|
|
1185
|
+
}
|
|
1186
|
+
export interface ConnectProviderConnectionState {
|
|
1187
|
+
is_connected: boolean;
|
|
1188
|
+
id?: string;
|
|
1189
|
+
provider_name?: string;
|
|
1190
|
+
provider_type?: string;
|
|
1191
|
+
auth_type?: "api" | "oauth";
|
|
1192
|
+
base_url?: string;
|
|
1193
|
+
timeout?: number | false;
|
|
1194
|
+
region?: string;
|
|
1195
|
+
}
|
|
1196
|
+
export interface ConnectProviderEntry {
|
|
1197
|
+
id: string;
|
|
1198
|
+
display_name: string;
|
|
1199
|
+
description: string;
|
|
1200
|
+
provider_type: string;
|
|
1201
|
+
provider_name: string;
|
|
1202
|
+
provider_names: string[];
|
|
1203
|
+
is_oauth?: boolean;
|
|
1204
|
+
oauth_provider_id?: string;
|
|
1205
|
+
requires_api_key: boolean;
|
|
1206
|
+
fields?: ConnectProviderField[];
|
|
1207
|
+
auth_methods?: ConnectProviderAuthMethod[];
|
|
1208
|
+
connected: ConnectProviderConnectionState;
|
|
1209
|
+
}
|
|
1210
|
+
export interface ListConnectProvidersResponseMessage {
|
|
1211
|
+
type: "list_connect_providers_response";
|
|
1212
|
+
request_id: string;
|
|
1213
|
+
success: boolean;
|
|
1214
|
+
target: ConnectProviderStorageTarget;
|
|
1215
|
+
providers: ConnectProviderEntry[];
|
|
1216
|
+
error?: string;
|
|
1217
|
+
}
|
|
1218
|
+
export interface ConnectProviderResponseMessage {
|
|
1219
|
+
type: "connect_provider_response";
|
|
1220
|
+
request_id: string;
|
|
1221
|
+
success: boolean;
|
|
1222
|
+
target: ConnectProviderStorageTarget;
|
|
1223
|
+
providers: ConnectProviderEntry[];
|
|
1224
|
+
models_may_have_changed: boolean;
|
|
1225
|
+
error?: string;
|
|
1226
|
+
}
|
|
1227
|
+
export interface DisconnectProviderResponseMessage {
|
|
1228
|
+
type: "disconnect_provider_response";
|
|
1229
|
+
request_id: string;
|
|
1230
|
+
success: boolean;
|
|
1231
|
+
target: ConnectProviderStorageTarget;
|
|
1232
|
+
providers: ConnectProviderEntry[];
|
|
1233
|
+
models_may_have_changed: boolean;
|
|
1234
|
+
error?: string;
|
|
1235
|
+
}
|
|
1236
|
+
export interface UpdateModelPayload {
|
|
1237
|
+
/** Preferred model identifier from models.json (e.g. "sonnet") */
|
|
1238
|
+
model_id?: string;
|
|
1239
|
+
/** Optional direct handle override (e.g. "anthropic/claude-sonnet-4-6") */
|
|
1240
|
+
model_handle?: string;
|
|
1241
|
+
}
|
|
1242
|
+
export interface UpdateModelCommand {
|
|
1243
|
+
type: "update_model";
|
|
1244
|
+
/** Echoed back in the response for request correlation. */
|
|
1245
|
+
request_id: string;
|
|
1246
|
+
/** Runtime scope — identifies which agent + conversation this targets */
|
|
1247
|
+
runtime: RuntimeScope;
|
|
1248
|
+
payload: UpdateModelPayload;
|
|
1249
|
+
}
|
|
1250
|
+
export interface ListModelsResponseModelEntry {
|
|
1251
|
+
id: string;
|
|
1252
|
+
handle: string;
|
|
1253
|
+
label: string;
|
|
1254
|
+
description: string;
|
|
1255
|
+
isDefault?: boolean;
|
|
1256
|
+
isFeatured?: boolean;
|
|
1257
|
+
free?: boolean;
|
|
1258
|
+
updateArgs?: Record<string, unknown>;
|
|
1259
|
+
}
|
|
1260
|
+
export interface ListModelsResponseMessage {
|
|
1261
|
+
type: "list_models_response";
|
|
1262
|
+
request_id: string;
|
|
1263
|
+
success: boolean;
|
|
1264
|
+
entries: ListModelsResponseModelEntry[];
|
|
1265
|
+
/** Handles available to this user from the API. null = lookup failed; absent = old server. */
|
|
1266
|
+
available_handles?: string[] | null;
|
|
1267
|
+
/** BYOK provider name → base provider (e.g. "lc-anthropic" → "anthropic") */
|
|
1268
|
+
byok_provider_aliases?: Record<string, string>;
|
|
1269
|
+
error?: string;
|
|
1270
|
+
}
|
|
1271
|
+
export interface UpdateModelResponseMessage {
|
|
1272
|
+
type: "update_model_response";
|
|
1273
|
+
request_id: string;
|
|
1274
|
+
success: boolean;
|
|
1275
|
+
runtime?: RuntimeScope;
|
|
1276
|
+
applied_to?: "agent" | "conversation";
|
|
1277
|
+
model_id?: string;
|
|
1278
|
+
model_handle?: string;
|
|
1279
|
+
model_settings?: Record<string, unknown> | null;
|
|
1280
|
+
error?: string;
|
|
1281
|
+
}
|
|
1282
|
+
export interface UpdateToolsetCommand {
|
|
1283
|
+
type: "update_toolset";
|
|
1284
|
+
/** Echoed back in the response for request correlation. */
|
|
1285
|
+
request_id: string;
|
|
1286
|
+
/** Runtime scope — identifies which agent + conversation this targets */
|
|
1287
|
+
runtime: RuntimeScope;
|
|
1288
|
+
/** The toolset preference to apply (e.g. "auto", "default", "codex", "gemini") */
|
|
1289
|
+
toolset_preference: ToolsetPreference;
|
|
1290
|
+
}
|
|
1291
|
+
export interface UpdateToolsetResponseMessage {
|
|
1292
|
+
type: "update_toolset_response";
|
|
1293
|
+
request_id: string;
|
|
1294
|
+
success: boolean;
|
|
1295
|
+
runtime?: RuntimeScope;
|
|
1296
|
+
current_toolset?: ToolsetName;
|
|
1297
|
+
current_toolset_preference?: ToolsetPreference;
|
|
1298
|
+
error?: string;
|
|
1299
|
+
}
|
|
1300
|
+
export interface CronListCommand {
|
|
1301
|
+
type: "cron_list";
|
|
1302
|
+
/** Echoed back in the response for request correlation. */
|
|
1303
|
+
request_id: string;
|
|
1304
|
+
/** Optional agent filter. */
|
|
1305
|
+
agent_id?: string;
|
|
1306
|
+
/** Optional conversation filter. */
|
|
1307
|
+
conversation_id?: string;
|
|
1308
|
+
}
|
|
1309
|
+
export interface CronAddCommand {
|
|
1310
|
+
type: "cron_add";
|
|
1311
|
+
/** Echoed back in the response for request correlation. */
|
|
1312
|
+
request_id: string;
|
|
1313
|
+
agent_id: string;
|
|
1314
|
+
/**
|
|
1315
|
+
* Conversation target for scheduled fires.
|
|
1316
|
+
* - omitted/"default": agent default conversation
|
|
1317
|
+
* - "new": create a fresh conversation for every fire
|
|
1318
|
+
* - any other string: existing conversation id
|
|
1319
|
+
*/
|
|
1320
|
+
conversation_id?: string;
|
|
1321
|
+
name: string;
|
|
1322
|
+
description: string;
|
|
1323
|
+
cron: string;
|
|
1324
|
+
timezone?: string;
|
|
1325
|
+
recurring: boolean;
|
|
1326
|
+
prompt: string;
|
|
1327
|
+
/** Optional ISO timestamp for one-shot tasks. */
|
|
1328
|
+
scheduled_for?: string | null;
|
|
1329
|
+
}
|
|
1330
|
+
export interface CronGetCommand {
|
|
1331
|
+
type: "cron_get";
|
|
1332
|
+
/** Echoed back in the response for request correlation. */
|
|
1333
|
+
request_id: string;
|
|
1334
|
+
task_id: string;
|
|
1335
|
+
}
|
|
1336
|
+
export interface CronRunsCommand {
|
|
1337
|
+
type: "cron_runs";
|
|
1338
|
+
/** Echoed back in the response for request correlation. */
|
|
1339
|
+
request_id: string;
|
|
1340
|
+
task_id: string;
|
|
1341
|
+
/** Maximum run-log entries to return. */
|
|
1342
|
+
limit?: number;
|
|
1343
|
+
/** Page offset for run-log entries. */
|
|
1344
|
+
offset?: number;
|
|
1345
|
+
/** Optional run id filter. */
|
|
1346
|
+
run_id?: string;
|
|
1347
|
+
}
|
|
1348
|
+
export interface CronTriggerCommand {
|
|
1349
|
+
type: "cron_trigger";
|
|
1350
|
+
/** Echoed back in the response for request correlation. */
|
|
1351
|
+
request_id: string;
|
|
1352
|
+
task_id: string;
|
|
1353
|
+
}
|
|
1354
|
+
export interface CronUpdateCommand {
|
|
1355
|
+
type: "cron_update";
|
|
1356
|
+
/** Echoed back in the response for request correlation. */
|
|
1357
|
+
request_id: string;
|
|
1358
|
+
task_id: string;
|
|
1359
|
+
name?: string;
|
|
1360
|
+
description?: string;
|
|
1361
|
+
conversation_id?: string;
|
|
1362
|
+
cron?: string;
|
|
1363
|
+
timezone?: string;
|
|
1364
|
+
recurring?: boolean;
|
|
1365
|
+
prompt?: string;
|
|
1366
|
+
/** Optional ISO timestamp for one-shot tasks. */
|
|
1367
|
+
scheduled_for?: string | null;
|
|
1368
|
+
}
|
|
1369
|
+
export interface CronDeleteCommand {
|
|
1370
|
+
type: "cron_delete";
|
|
1371
|
+
/** Echoed back in the response for request correlation. */
|
|
1372
|
+
request_id: string;
|
|
1373
|
+
task_id: string;
|
|
1374
|
+
}
|
|
1375
|
+
export interface CronDeleteAllCommand {
|
|
1376
|
+
type: "cron_delete_all";
|
|
1377
|
+
/** Echoed back in the response for request correlation. */
|
|
1378
|
+
request_id: string;
|
|
1379
|
+
agent_id: string;
|
|
1380
|
+
}
|
|
1381
|
+
export interface SkillEnableCommand {
|
|
1382
|
+
type: "skill_enable";
|
|
1383
|
+
/** Echoed back in the response for request correlation. */
|
|
1384
|
+
request_id: string;
|
|
1385
|
+
/** Absolute path to the skill directory on the local machine. */
|
|
1386
|
+
skill_path: string;
|
|
1387
|
+
}
|
|
1388
|
+
export interface SkillEnableResponseMessage {
|
|
1389
|
+
type: "skill_enable_response";
|
|
1390
|
+
request_id: string;
|
|
1391
|
+
success: boolean;
|
|
1392
|
+
skill_name?: string;
|
|
1393
|
+
error?: string;
|
|
1394
|
+
}
|
|
1395
|
+
export interface SkillDisableCommand {
|
|
1396
|
+
type: "skill_disable";
|
|
1397
|
+
/** Echoed back in the response for request correlation. */
|
|
1398
|
+
request_id: string;
|
|
1399
|
+
/** Skill name (symlink name in ~/.letta/skills/). */
|
|
1400
|
+
name: string;
|
|
1401
|
+
}
|
|
1402
|
+
export interface SkillDisableResponseMessage {
|
|
1403
|
+
type: "skill_disable_response";
|
|
1404
|
+
request_id: string;
|
|
1405
|
+
success: boolean;
|
|
1406
|
+
skill_name?: string;
|
|
1407
|
+
error?: string;
|
|
1408
|
+
}
|
|
1409
|
+
export interface SkillsUpdatedMessage {
|
|
1410
|
+
type: "skills_updated";
|
|
1411
|
+
timestamp: number;
|
|
1412
|
+
}
|
|
1413
|
+
export interface CreateAgentCommand {
|
|
1414
|
+
type: "create_agent";
|
|
1415
|
+
/** Echoed back in the response for request correlation. */
|
|
1416
|
+
request_id: string;
|
|
1417
|
+
/** Built-in personality preset to create. */
|
|
1418
|
+
personality: "memo" | "tutorial" | "blank" | "linus" | "kawaii";
|
|
1419
|
+
/** Model identifier (e.g. "sonnet", "gpt-4o"). Uses default if omitted. */
|
|
1420
|
+
model?: string;
|
|
1421
|
+
/** Whether to pin the agent globally after creation. Defaults to true. */
|
|
1422
|
+
pin_global?: boolean;
|
|
1423
|
+
}
|
|
1424
|
+
export interface AgentListCommand {
|
|
1425
|
+
type: "agent_list";
|
|
1426
|
+
/** Echoed back in the response for request correlation. */
|
|
1427
|
+
request_id: string;
|
|
1428
|
+
/** Query params forwarded to the Letta agents list API. */
|
|
1429
|
+
query?: AgentListParams;
|
|
1430
|
+
}
|
|
1431
|
+
export interface AgentRetrieveCommand {
|
|
1432
|
+
type: "agent_retrieve";
|
|
1433
|
+
/** Echoed back in the response for request correlation. */
|
|
1434
|
+
request_id: string;
|
|
1435
|
+
agent_id: string;
|
|
1436
|
+
}
|
|
1437
|
+
export interface AgentCreateCommand {
|
|
1438
|
+
type: "agent_create";
|
|
1439
|
+
/** Echoed back in the response for request correlation. */
|
|
1440
|
+
request_id: string;
|
|
1441
|
+
/** Body forwarded to the Letta agents create API. */
|
|
1442
|
+
body: AgentCreateParams;
|
|
1443
|
+
}
|
|
1444
|
+
export interface AgentUpdateCommand {
|
|
1445
|
+
type: "agent_update";
|
|
1446
|
+
/** Echoed back in the response for request correlation. */
|
|
1447
|
+
request_id: string;
|
|
1448
|
+
agent_id: string;
|
|
1449
|
+
/** Body forwarded to the Letta agents update API. */
|
|
1450
|
+
body: AgentUpdateParams;
|
|
1451
|
+
}
|
|
1452
|
+
export interface AgentDeleteCommand {
|
|
1453
|
+
type: "agent_delete";
|
|
1454
|
+
/** Echoed back in the response for request correlation. */
|
|
1455
|
+
request_id: string;
|
|
1456
|
+
agent_id: string;
|
|
1457
|
+
}
|
|
1458
|
+
export interface ConversationListCommand {
|
|
1459
|
+
type: "conversation_list";
|
|
1460
|
+
/** Echoed back in the response for request correlation. */
|
|
1461
|
+
request_id: string;
|
|
1462
|
+
/** Query params forwarded to the Letta conversations list API. */
|
|
1463
|
+
query?: ConversationListParams;
|
|
1464
|
+
}
|
|
1465
|
+
export interface ConversationRetrieveCommand {
|
|
1466
|
+
type: "conversation_retrieve";
|
|
1467
|
+
/** Echoed back in the response for request correlation. */
|
|
1468
|
+
request_id: string;
|
|
1469
|
+
conversation_id: string;
|
|
1470
|
+
}
|
|
1471
|
+
export interface ConversationCreateCommand {
|
|
1472
|
+
type: "conversation_create";
|
|
1473
|
+
/** Echoed back in the response for request correlation. */
|
|
1474
|
+
request_id: string;
|
|
1475
|
+
/** Body forwarded to the Letta conversations create API. */
|
|
1476
|
+
body: ConversationCreateParams;
|
|
1477
|
+
}
|
|
1478
|
+
export interface ConversationUpdateCommand {
|
|
1479
|
+
type: "conversation_update";
|
|
1480
|
+
/** Echoed back in the response for request correlation. */
|
|
1481
|
+
request_id: string;
|
|
1482
|
+
conversation_id: string;
|
|
1483
|
+
/** Body forwarded to the Letta conversations update API. */
|
|
1484
|
+
body: ConversationUpdateParams;
|
|
1485
|
+
}
|
|
1486
|
+
export interface ConversationRecompileCommand {
|
|
1487
|
+
type: "conversation_recompile";
|
|
1488
|
+
/** Echoed back in the response for request correlation. */
|
|
1489
|
+
request_id: string;
|
|
1490
|
+
conversation_id: string;
|
|
1491
|
+
/** Body/query forwarded to the Letta conversations recompile API. */
|
|
1492
|
+
body?: ConversationRecompileParams;
|
|
1493
|
+
}
|
|
1494
|
+
export interface ConversationForkBody {
|
|
1495
|
+
/** Agent ID for agent-direct mode with the default conversation. */
|
|
1496
|
+
agent_id?: string | null;
|
|
1497
|
+
/** Whether the forked conversation should be hidden. */
|
|
1498
|
+
hidden?: boolean;
|
|
1499
|
+
}
|
|
1500
|
+
export interface ConversationForkCommand {
|
|
1501
|
+
type: "conversation_fork";
|
|
1502
|
+
/** Echoed back in the response for request correlation. */
|
|
1503
|
+
request_id: string;
|
|
1504
|
+
conversation_id: string;
|
|
1505
|
+
body?: ConversationForkBody;
|
|
1506
|
+
}
|
|
1507
|
+
export interface ConversationMessagesListCommand {
|
|
1508
|
+
type: "conversation_messages_list";
|
|
1509
|
+
/** Echoed back in the response for request correlation. */
|
|
1510
|
+
request_id: string;
|
|
1511
|
+
conversation_id: string;
|
|
1512
|
+
/** Query params forwarded to the Letta conversation messages list API. */
|
|
1513
|
+
query?: MessageListParams;
|
|
1514
|
+
}
|
|
1515
|
+
export interface ConversationCompactCommand {
|
|
1516
|
+
type: "conversation_compact";
|
|
1517
|
+
/** Echoed back in the response for request correlation. */
|
|
1518
|
+
request_id: string;
|
|
1519
|
+
conversation_id: string;
|
|
1520
|
+
/** Body forwarded to the Letta conversation messages compact API. */
|
|
1521
|
+
body?: MessageCompactParams;
|
|
1522
|
+
}
|
|
1523
|
+
export interface GetCwdMapCommand {
|
|
1524
|
+
type: "get_cwd_map";
|
|
1525
|
+
/** Echoed back in the response for request correlation. */
|
|
1526
|
+
request_id: string;
|
|
1527
|
+
}
|
|
1528
|
+
export interface GetCwdMapResponseMessage {
|
|
1529
|
+
type: "get_cwd_map_response";
|
|
1530
|
+
request_id: string;
|
|
1531
|
+
success: boolean;
|
|
1532
|
+
/** Persisted per-conversation CWD overrides, keyed by listener scope key. */
|
|
1533
|
+
cwd_map: Record<string, string>;
|
|
1534
|
+
/** Listener boot CWD used when a conversation has no entry in cwd_map. */
|
|
1535
|
+
boot_working_directory: string | null;
|
|
1536
|
+
error?: string;
|
|
1537
|
+
}
|
|
1538
|
+
export type ConversationPinScope = "global" | "local_project" | "both";
|
|
1539
|
+
export type ConversationPinAction = "pin" | "unpin" | "toggle";
|
|
1540
|
+
export interface ListConversationPinsCommand {
|
|
1541
|
+
type: "list_conversation_pins";
|
|
1542
|
+
request_id: string;
|
|
1543
|
+
runtime: RuntimeScope;
|
|
1544
|
+
}
|
|
1545
|
+
export interface ListConversationPinsResponseMessage {
|
|
1546
|
+
type: "list_conversation_pins_response";
|
|
1547
|
+
request_id: string;
|
|
1548
|
+
success: boolean;
|
|
1549
|
+
pins: Array<{
|
|
1550
|
+
conversation_id: string;
|
|
1551
|
+
is_local: boolean;
|
|
1552
|
+
}>;
|
|
1553
|
+
error?: string;
|
|
1554
|
+
}
|
|
1555
|
+
export interface SetConversationPinCommand {
|
|
1556
|
+
type: "set_conversation_pin";
|
|
1557
|
+
request_id: string;
|
|
1558
|
+
runtime: RuntimeScope;
|
|
1559
|
+
conversation_id: string;
|
|
1560
|
+
action: ConversationPinAction;
|
|
1561
|
+
scope?: ConversationPinScope;
|
|
1562
|
+
}
|
|
1563
|
+
export interface SetConversationPinResponseMessage {
|
|
1564
|
+
type: "set_conversation_pin_response";
|
|
1565
|
+
request_id: string;
|
|
1566
|
+
success: boolean;
|
|
1567
|
+
conversation_id: string;
|
|
1568
|
+
pinned: boolean;
|
|
1569
|
+
pins: Array<{
|
|
1570
|
+
conversation_id: string;
|
|
1571
|
+
is_local: boolean;
|
|
1572
|
+
}>;
|
|
1573
|
+
error?: string;
|
|
1574
|
+
}
|
|
1575
|
+
export interface GetReflectionSettingsCommand {
|
|
1576
|
+
type: "get_reflection_settings";
|
|
1577
|
+
/** Echoed back in the response for request correlation. */
|
|
1578
|
+
request_id: string;
|
|
1579
|
+
runtime: RuntimeScope;
|
|
1580
|
+
}
|
|
1581
|
+
export interface SetReflectionSettingsCommand {
|
|
1582
|
+
type: "set_reflection_settings";
|
|
1583
|
+
/** Echoed back in the response for request correlation. */
|
|
1584
|
+
request_id: string;
|
|
1585
|
+
runtime: RuntimeScope;
|
|
1586
|
+
settings: {
|
|
1587
|
+
trigger: ReflectionTriggerMode;
|
|
1588
|
+
step_count: number;
|
|
1589
|
+
};
|
|
1590
|
+
scope?: ReflectionSettingsScope;
|
|
1591
|
+
}
|
|
1592
|
+
export interface GetExperimentsCommand {
|
|
1593
|
+
type: "get_experiments";
|
|
1594
|
+
request_id: string;
|
|
1595
|
+
}
|
|
1596
|
+
export interface SetExperimentCommand {
|
|
1597
|
+
type: "set_experiment";
|
|
1598
|
+
request_id: string;
|
|
1599
|
+
experiment_id: ExperimentId;
|
|
1600
|
+
enabled: boolean;
|
|
1601
|
+
}
|
|
1602
|
+
export interface ChannelsListCommand {
|
|
1603
|
+
type: "channels_list";
|
|
1604
|
+
request_id: string;
|
|
1605
|
+
}
|
|
1606
|
+
export interface ChannelAccountsListCommand {
|
|
1607
|
+
type: "channel_accounts_list";
|
|
1608
|
+
request_id: string;
|
|
1609
|
+
channel_id: ChannelId;
|
|
1610
|
+
}
|
|
1611
|
+
export interface ChannelAccountCreatePayload {
|
|
1612
|
+
account_id?: string;
|
|
1613
|
+
display_name?: string;
|
|
1614
|
+
enabled?: boolean;
|
|
1615
|
+
dm_policy?: DmPolicy;
|
|
1616
|
+
allowed_users?: string[];
|
|
1617
|
+
/** Plugin-owned account config. New fields should be added here, not centrally. */
|
|
1618
|
+
config?: ChannelPluginConfig;
|
|
1619
|
+
}
|
|
1620
|
+
export interface ChannelAccountCreateCommand {
|
|
1621
|
+
type: "channel_account_create";
|
|
1622
|
+
request_id: string;
|
|
1623
|
+
channel_id: ChannelId;
|
|
1624
|
+
account: ChannelAccountCreatePayload;
|
|
1625
|
+
}
|
|
1626
|
+
export interface ChannelAccountUpdateCommand {
|
|
1627
|
+
type: "channel_account_update";
|
|
1628
|
+
request_id: string;
|
|
1629
|
+
channel_id: ChannelId;
|
|
1630
|
+
account_id: string;
|
|
1631
|
+
patch: Omit<ChannelAccountCreatePayload, "account_id">;
|
|
1632
|
+
}
|
|
1633
|
+
export interface ChannelAccountBindCommand {
|
|
1634
|
+
type: "channel_account_bind";
|
|
1635
|
+
request_id: string;
|
|
1636
|
+
channel_id: ChannelId;
|
|
1637
|
+
account_id: string;
|
|
1638
|
+
runtime: RuntimeScope;
|
|
1639
|
+
}
|
|
1640
|
+
export interface ChannelAccountUnbindCommand {
|
|
1641
|
+
type: "channel_account_unbind";
|
|
1642
|
+
request_id: string;
|
|
1643
|
+
channel_id: ChannelId;
|
|
1644
|
+
account_id: string;
|
|
1645
|
+
}
|
|
1646
|
+
export interface ChannelAccountDeleteCommand {
|
|
1647
|
+
type: "channel_account_delete";
|
|
1648
|
+
request_id: string;
|
|
1649
|
+
channel_id: ChannelId;
|
|
1650
|
+
account_id: string;
|
|
1651
|
+
}
|
|
1652
|
+
export interface ChannelAccountStartCommand {
|
|
1653
|
+
type: "channel_account_start";
|
|
1654
|
+
request_id: string;
|
|
1655
|
+
channel_id: ChannelId;
|
|
1656
|
+
account_id: string;
|
|
1657
|
+
}
|
|
1658
|
+
export interface ChannelAccountStopCommand {
|
|
1659
|
+
type: "channel_account_stop";
|
|
1660
|
+
request_id: string;
|
|
1661
|
+
channel_id: ChannelId;
|
|
1662
|
+
account_id: string;
|
|
1663
|
+
}
|
|
1664
|
+
export interface ChannelGetConfigCommand {
|
|
1665
|
+
type: "channel_get_config";
|
|
1666
|
+
request_id: string;
|
|
1667
|
+
channel_id: ChannelId;
|
|
1668
|
+
account_id?: string;
|
|
1669
|
+
}
|
|
1670
|
+
export interface ChannelSetConfigCommand {
|
|
1671
|
+
type: "channel_set_config";
|
|
1672
|
+
request_id: string;
|
|
1673
|
+
channel_id: ChannelId;
|
|
1674
|
+
account_id?: string;
|
|
1675
|
+
config: {
|
|
1676
|
+
dm_policy?: DmPolicy;
|
|
1677
|
+
allowed_users?: string[];
|
|
1678
|
+
plugin_config?: ChannelPluginConfig;
|
|
1679
|
+
};
|
|
1680
|
+
}
|
|
1681
|
+
export interface ChannelStartCommand {
|
|
1682
|
+
type: "channel_start";
|
|
1683
|
+
request_id: string;
|
|
1684
|
+
channel_id: ChannelId;
|
|
1685
|
+
account_id?: string;
|
|
1686
|
+
}
|
|
1687
|
+
export interface ChannelStopCommand {
|
|
1688
|
+
type: "channel_stop";
|
|
1689
|
+
request_id: string;
|
|
1690
|
+
channel_id: ChannelId;
|
|
1691
|
+
account_id?: string;
|
|
1692
|
+
}
|
|
1693
|
+
export interface ChannelPairingsListCommand {
|
|
1694
|
+
type: "channel_pairings_list";
|
|
1695
|
+
request_id: string;
|
|
1696
|
+
channel_id: ChannelId;
|
|
1697
|
+
account_id?: string;
|
|
1698
|
+
}
|
|
1699
|
+
export interface ChannelPairingBindCommand {
|
|
1700
|
+
type: "channel_pairing_bind";
|
|
1701
|
+
request_id: string;
|
|
1702
|
+
channel_id: ChannelId;
|
|
1703
|
+
account_id?: string;
|
|
1704
|
+
runtime: RuntimeScope;
|
|
1705
|
+
code: string;
|
|
1706
|
+
}
|
|
1707
|
+
export interface ChannelRoutesListCommand {
|
|
1708
|
+
type: "channel_routes_list";
|
|
1709
|
+
request_id: string;
|
|
1710
|
+
channel_id?: ChannelId;
|
|
1711
|
+
account_id?: string;
|
|
1712
|
+
agent_id?: string;
|
|
1713
|
+
conversation_id?: string;
|
|
1714
|
+
}
|
|
1715
|
+
export interface ChannelTargetsListCommand {
|
|
1716
|
+
type: "channel_targets_list";
|
|
1717
|
+
request_id: string;
|
|
1718
|
+
channel_id: ChannelId;
|
|
1719
|
+
account_id?: string;
|
|
1720
|
+
}
|
|
1721
|
+
export interface ChannelTargetBindCommand {
|
|
1722
|
+
type: "channel_target_bind";
|
|
1723
|
+
request_id: string;
|
|
1724
|
+
channel_id: ChannelId;
|
|
1725
|
+
account_id?: string;
|
|
1726
|
+
runtime: RuntimeScope;
|
|
1727
|
+
target_id: string;
|
|
1728
|
+
}
|
|
1729
|
+
export interface ChannelRouteRemoveCommand {
|
|
1730
|
+
type: "channel_route_remove";
|
|
1731
|
+
request_id: string;
|
|
1732
|
+
channel_id: ChannelId;
|
|
1733
|
+
account_id?: string;
|
|
1734
|
+
chat_id: string;
|
|
1735
|
+
}
|
|
1736
|
+
export interface ChannelRouteUpdateCommand {
|
|
1737
|
+
type: "channel_route_update";
|
|
1738
|
+
request_id: string;
|
|
1739
|
+
channel_id: ChannelId;
|
|
1740
|
+
account_id?: string;
|
|
1741
|
+
chat_id: string;
|
|
1742
|
+
runtime: RuntimeScope;
|
|
1743
|
+
}
|
|
1744
|
+
export interface CronListResponseMessage {
|
|
1745
|
+
type: "cron_list_response";
|
|
1746
|
+
request_id: string;
|
|
1747
|
+
tasks: CronTask[];
|
|
1748
|
+
success: boolean;
|
|
1749
|
+
error?: string;
|
|
1750
|
+
}
|
|
1751
|
+
export interface CronAddResponseMessage {
|
|
1752
|
+
type: "cron_add_response";
|
|
1753
|
+
request_id: string;
|
|
1754
|
+
success: boolean;
|
|
1755
|
+
task?: CronTask;
|
|
1756
|
+
warning?: string;
|
|
1757
|
+
error?: string;
|
|
1758
|
+
}
|
|
1759
|
+
export interface CronGetResponseMessage {
|
|
1760
|
+
type: "cron_get_response";
|
|
1761
|
+
request_id: string;
|
|
1762
|
+
success: boolean;
|
|
1763
|
+
found: boolean;
|
|
1764
|
+
task: CronTask | null;
|
|
1765
|
+
error?: string;
|
|
1766
|
+
}
|
|
1767
|
+
export interface CronRunsResponseMessage {
|
|
1768
|
+
type: "cron_runs_response";
|
|
1769
|
+
request_id: string;
|
|
1770
|
+
success: boolean;
|
|
1771
|
+
page?: CronRunLogPage;
|
|
1772
|
+
error?: string;
|
|
1773
|
+
}
|
|
1774
|
+
export interface CronTriggerResponseMessage {
|
|
1775
|
+
type: "cron_trigger_response";
|
|
1776
|
+
request_id: string;
|
|
1777
|
+
success: boolean;
|
|
1778
|
+
found: boolean;
|
|
1779
|
+
task?: CronTask;
|
|
1780
|
+
error?: string;
|
|
1781
|
+
}
|
|
1782
|
+
export interface CronUpdateResponseMessage {
|
|
1783
|
+
type: "cron_update_response";
|
|
1784
|
+
request_id: string;
|
|
1785
|
+
success: boolean;
|
|
1786
|
+
task?: CronTask;
|
|
1787
|
+
error?: string;
|
|
1788
|
+
}
|
|
1789
|
+
export interface CronDeleteResponseMessage {
|
|
1790
|
+
type: "cron_delete_response";
|
|
1791
|
+
request_id: string;
|
|
1792
|
+
success: boolean;
|
|
1793
|
+
found: boolean;
|
|
1794
|
+
error?: string;
|
|
1795
|
+
}
|
|
1796
|
+
export interface CronDeleteAllResponseMessage {
|
|
1797
|
+
type: "cron_delete_all_response";
|
|
1798
|
+
request_id: string;
|
|
1799
|
+
success: boolean;
|
|
1800
|
+
agent_id: string;
|
|
1801
|
+
deleted: number;
|
|
1802
|
+
error?: string;
|
|
1803
|
+
}
|
|
1804
|
+
export interface CronsUpdatedMessage {
|
|
1805
|
+
type: "crons_updated";
|
|
1806
|
+
timestamp: number;
|
|
1807
|
+
agent_id?: string;
|
|
1808
|
+
conversation_id?: string | null;
|
|
1809
|
+
}
|
|
1810
|
+
export interface CreateAgentResponseMessage {
|
|
1811
|
+
type: "create_agent_response";
|
|
1812
|
+
request_id: string;
|
|
1813
|
+
success: boolean;
|
|
1814
|
+
agent_id?: string;
|
|
1815
|
+
name?: string;
|
|
1816
|
+
model?: string;
|
|
1817
|
+
error?: string;
|
|
1818
|
+
}
|
|
1819
|
+
export interface AgentListResponseMessage {
|
|
1820
|
+
type: "agent_list_response";
|
|
1821
|
+
request_id: string;
|
|
1822
|
+
success: boolean;
|
|
1823
|
+
agents: AgentState[];
|
|
1824
|
+
error?: string;
|
|
1825
|
+
}
|
|
1826
|
+
export interface AgentRetrieveResponseMessage {
|
|
1827
|
+
type: "agent_retrieve_response";
|
|
1828
|
+
request_id: string;
|
|
1829
|
+
success: boolean;
|
|
1830
|
+
agent: AgentState | null;
|
|
1831
|
+
error?: string;
|
|
1832
|
+
}
|
|
1833
|
+
export interface AgentCreateResponseMessage {
|
|
1834
|
+
type: "agent_create_response";
|
|
1835
|
+
request_id: string;
|
|
1836
|
+
success: boolean;
|
|
1837
|
+
agent: AgentState | null;
|
|
1838
|
+
error?: string;
|
|
1839
|
+
}
|
|
1840
|
+
export interface AgentUpdateResponseMessage {
|
|
1841
|
+
type: "agent_update_response";
|
|
1842
|
+
request_id: string;
|
|
1843
|
+
success: boolean;
|
|
1844
|
+
agent: AgentState | null;
|
|
1845
|
+
error?: string;
|
|
1846
|
+
}
|
|
1847
|
+
export interface AgentDeleteResponseMessage {
|
|
1848
|
+
type: "agent_delete_response";
|
|
1849
|
+
request_id: string;
|
|
1850
|
+
success: boolean;
|
|
1851
|
+
agent_id: string;
|
|
1852
|
+
error?: string;
|
|
1853
|
+
}
|
|
1854
|
+
export interface ConversationListResponseMessage {
|
|
1855
|
+
type: "conversation_list_response";
|
|
1856
|
+
request_id: string;
|
|
1857
|
+
success: boolean;
|
|
1858
|
+
conversations: Conversation[];
|
|
1859
|
+
error?: string;
|
|
1860
|
+
}
|
|
1861
|
+
export interface ConversationRetrieveResponseMessage {
|
|
1862
|
+
type: "conversation_retrieve_response";
|
|
1863
|
+
request_id: string;
|
|
1864
|
+
success: boolean;
|
|
1865
|
+
conversation: Conversation | null;
|
|
1866
|
+
error?: string;
|
|
1867
|
+
}
|
|
1868
|
+
export interface ConversationCreateResponseMessage {
|
|
1869
|
+
type: "conversation_create_response";
|
|
1870
|
+
request_id: string;
|
|
1871
|
+
success: boolean;
|
|
1872
|
+
conversation: Conversation | null;
|
|
1873
|
+
error?: string;
|
|
1874
|
+
}
|
|
1875
|
+
export interface ConversationUpdateResponseMessage {
|
|
1876
|
+
type: "conversation_update_response";
|
|
1877
|
+
request_id: string;
|
|
1878
|
+
success: boolean;
|
|
1879
|
+
conversation: Conversation | null;
|
|
1880
|
+
error?: string;
|
|
1881
|
+
}
|
|
1882
|
+
export interface ConversationRecompileResponseMessage {
|
|
1883
|
+
type: "conversation_recompile_response";
|
|
1884
|
+
request_id: string;
|
|
1885
|
+
success: boolean;
|
|
1886
|
+
result: string | null;
|
|
1887
|
+
error?: string;
|
|
1888
|
+
}
|
|
1889
|
+
export interface ForkedConversationReference {
|
|
1890
|
+
id: string;
|
|
1891
|
+
}
|
|
1892
|
+
export interface ConversationForkResponseMessage {
|
|
1893
|
+
type: "conversation_fork_response";
|
|
1894
|
+
request_id: string;
|
|
1895
|
+
success: boolean;
|
|
1896
|
+
conversation: ForkedConversationReference | null;
|
|
1897
|
+
error?: string;
|
|
1898
|
+
}
|
|
1899
|
+
export interface ConversationMessagesListResponseMessage {
|
|
1900
|
+
type: "conversation_messages_list_response";
|
|
1901
|
+
request_id: string;
|
|
1902
|
+
success: boolean;
|
|
1903
|
+
messages: LettaMessage[];
|
|
1904
|
+
error?: string;
|
|
1905
|
+
}
|
|
1906
|
+
export interface ConversationCompactResponseMessage {
|
|
1907
|
+
type: "conversation_compact_response";
|
|
1908
|
+
request_id: string;
|
|
1909
|
+
success: boolean;
|
|
1910
|
+
compaction: CompactionResponse | null;
|
|
1911
|
+
error?: string;
|
|
1912
|
+
}
|
|
1913
|
+
export interface RuntimeStartResponseMessage {
|
|
1914
|
+
type: "runtime_start_response";
|
|
1915
|
+
request_id: string;
|
|
1916
|
+
success: boolean;
|
|
1917
|
+
runtime: RuntimeScope | null;
|
|
1918
|
+
agent: AgentState | null;
|
|
1919
|
+
conversation: Conversation | null;
|
|
1920
|
+
created: {
|
|
1921
|
+
agent: boolean;
|
|
1922
|
+
conversation: boolean;
|
|
1923
|
+
};
|
|
1924
|
+
error?: string;
|
|
1925
|
+
}
|
|
1926
|
+
export interface GetReflectionSettingsResponseMessage {
|
|
1927
|
+
type: "get_reflection_settings_response";
|
|
1928
|
+
request_id: string;
|
|
1929
|
+
success: boolean;
|
|
1930
|
+
reflection_settings: ReflectionSettingsSnapshot | null;
|
|
1931
|
+
error?: string;
|
|
1932
|
+
}
|
|
1933
|
+
export interface SetReflectionSettingsResponseMessage {
|
|
1934
|
+
type: "set_reflection_settings_response";
|
|
1935
|
+
request_id: string;
|
|
1936
|
+
success: boolean;
|
|
1937
|
+
reflection_settings: ReflectionSettingsSnapshot | null;
|
|
1938
|
+
scope: ReflectionSettingsScope;
|
|
1939
|
+
error?: string;
|
|
1940
|
+
}
|
|
1941
|
+
export interface GetExperimentsResponseMessage {
|
|
1942
|
+
type: "get_experiments_response";
|
|
1943
|
+
request_id: string;
|
|
1944
|
+
success: boolean;
|
|
1945
|
+
experiments: ExperimentSnapshot[];
|
|
1946
|
+
error?: string;
|
|
1947
|
+
}
|
|
1948
|
+
export interface SetExperimentResponseMessage {
|
|
1949
|
+
type: "set_experiment_response";
|
|
1950
|
+
request_id: string;
|
|
1951
|
+
success: boolean;
|
|
1952
|
+
experiments: ExperimentSnapshot[];
|
|
1953
|
+
error?: string;
|
|
1954
|
+
}
|
|
1955
|
+
export interface ChannelsListResponseMessage {
|
|
1956
|
+
type: "channels_list_response";
|
|
1957
|
+
request_id: string;
|
|
1958
|
+
success: boolean;
|
|
1959
|
+
channels: ChannelSummary[];
|
|
1960
|
+
error?: string;
|
|
1961
|
+
}
|
|
1962
|
+
export interface ChannelAccountsListResponseMessage {
|
|
1963
|
+
type: "channel_accounts_list_response";
|
|
1964
|
+
request_id: string;
|
|
1965
|
+
success: boolean;
|
|
1966
|
+
channel_id: ChannelId;
|
|
1967
|
+
accounts: ChannelAccountSnapshot[];
|
|
1968
|
+
error?: string;
|
|
1969
|
+
}
|
|
1970
|
+
export interface ChannelAccountCreateResponseMessage {
|
|
1971
|
+
type: "channel_account_create_response";
|
|
1972
|
+
request_id: string;
|
|
1973
|
+
success: boolean;
|
|
1974
|
+
channel_id: ChannelId;
|
|
1975
|
+
account: ChannelAccountSnapshot | null;
|
|
1976
|
+
error?: string;
|
|
1977
|
+
}
|
|
1978
|
+
export interface ChannelAccountUpdateResponseMessage {
|
|
1979
|
+
type: "channel_account_update_response";
|
|
1980
|
+
request_id: string;
|
|
1981
|
+
success: boolean;
|
|
1982
|
+
channel_id: ChannelId;
|
|
1983
|
+
account: ChannelAccountSnapshot | null;
|
|
1984
|
+
error?: string;
|
|
1985
|
+
}
|
|
1986
|
+
export interface ChannelAccountBindResponseMessage {
|
|
1987
|
+
type: "channel_account_bind_response";
|
|
1988
|
+
request_id: string;
|
|
1989
|
+
success: boolean;
|
|
1990
|
+
channel_id: ChannelId;
|
|
1991
|
+
account: ChannelAccountSnapshot | null;
|
|
1992
|
+
error?: string;
|
|
1993
|
+
}
|
|
1994
|
+
export interface ChannelAccountUnbindResponseMessage {
|
|
1995
|
+
type: "channel_account_unbind_response";
|
|
1996
|
+
request_id: string;
|
|
1997
|
+
success: boolean;
|
|
1998
|
+
channel_id: ChannelId;
|
|
1999
|
+
account: ChannelAccountSnapshot | null;
|
|
2000
|
+
error?: string;
|
|
2001
|
+
}
|
|
2002
|
+
export interface ChannelAccountDeleteResponseMessage {
|
|
2003
|
+
type: "channel_account_delete_response";
|
|
2004
|
+
request_id: string;
|
|
2005
|
+
success: boolean;
|
|
2006
|
+
channel_id: ChannelId;
|
|
2007
|
+
account_id: string;
|
|
2008
|
+
deleted: boolean;
|
|
2009
|
+
error?: string;
|
|
2010
|
+
}
|
|
2011
|
+
export interface ChannelAccountStartResponseMessage {
|
|
2012
|
+
type: "channel_account_start_response";
|
|
2013
|
+
request_id: string;
|
|
2014
|
+
success: boolean;
|
|
2015
|
+
channel_id: ChannelId;
|
|
2016
|
+
account: ChannelAccountSnapshot | null;
|
|
2017
|
+
error?: string;
|
|
2018
|
+
}
|
|
2019
|
+
export interface ChannelAccountStopResponseMessage {
|
|
2020
|
+
type: "channel_account_stop_response";
|
|
2021
|
+
request_id: string;
|
|
2022
|
+
success: boolean;
|
|
2023
|
+
channel_id: ChannelId;
|
|
2024
|
+
account: ChannelAccountSnapshot | null;
|
|
2025
|
+
error?: string;
|
|
2026
|
+
}
|
|
2027
|
+
export interface ChannelGetConfigResponseMessage {
|
|
2028
|
+
type: "channel_get_config_response";
|
|
2029
|
+
request_id: string;
|
|
2030
|
+
success: boolean;
|
|
2031
|
+
config: ChannelConfigSnapshot | null;
|
|
2032
|
+
error?: string;
|
|
2033
|
+
}
|
|
2034
|
+
export interface ChannelSetConfigResponseMessage {
|
|
2035
|
+
type: "channel_set_config_response";
|
|
2036
|
+
request_id: string;
|
|
2037
|
+
success: boolean;
|
|
2038
|
+
config: ChannelConfigSnapshot | null;
|
|
2039
|
+
error?: string;
|
|
2040
|
+
}
|
|
2041
|
+
export interface ChannelStartResponseMessage {
|
|
2042
|
+
type: "channel_start_response";
|
|
2043
|
+
request_id: string;
|
|
2044
|
+
success: boolean;
|
|
2045
|
+
channel: ChannelSummary | null;
|
|
2046
|
+
error?: string;
|
|
2047
|
+
}
|
|
2048
|
+
export interface ChannelStopResponseMessage {
|
|
2049
|
+
type: "channel_stop_response";
|
|
2050
|
+
request_id: string;
|
|
2051
|
+
success: boolean;
|
|
2052
|
+
channel: ChannelSummary | null;
|
|
2053
|
+
error?: string;
|
|
2054
|
+
}
|
|
2055
|
+
export interface ChannelPairingsListResponseMessage {
|
|
2056
|
+
type: "channel_pairings_list_response";
|
|
2057
|
+
request_id: string;
|
|
2058
|
+
success: boolean;
|
|
2059
|
+
channel_id: ChannelId;
|
|
2060
|
+
pending: ChannelPendingPairing[];
|
|
2061
|
+
error?: string;
|
|
2062
|
+
}
|
|
2063
|
+
export interface ChannelPairingBindResponseMessage {
|
|
2064
|
+
type: "channel_pairing_bind_response";
|
|
2065
|
+
request_id: string;
|
|
2066
|
+
success: boolean;
|
|
2067
|
+
channel_id: ChannelId;
|
|
2068
|
+
chat_id?: string;
|
|
2069
|
+
route?: ChannelRouteSnapshot | null;
|
|
2070
|
+
error?: string;
|
|
2071
|
+
}
|
|
2072
|
+
export interface ChannelRoutesListResponseMessage {
|
|
2073
|
+
type: "channel_routes_list_response";
|
|
2074
|
+
request_id: string;
|
|
2075
|
+
success: boolean;
|
|
2076
|
+
channel_id?: ChannelId;
|
|
2077
|
+
routes: ChannelRouteSnapshot[];
|
|
2078
|
+
error?: string;
|
|
2079
|
+
}
|
|
2080
|
+
export interface ChannelRouteRemoveResponseMessage {
|
|
2081
|
+
type: "channel_route_remove_response";
|
|
2082
|
+
request_id: string;
|
|
2083
|
+
success: boolean;
|
|
2084
|
+
channel_id: ChannelId;
|
|
2085
|
+
chat_id: string;
|
|
2086
|
+
found: boolean;
|
|
2087
|
+
error?: string;
|
|
2088
|
+
}
|
|
2089
|
+
export interface ChannelRouteUpdateResponseMessage {
|
|
2090
|
+
type: "channel_route_update_response";
|
|
2091
|
+
request_id: string;
|
|
2092
|
+
success: boolean;
|
|
2093
|
+
channel_id: ChannelId;
|
|
2094
|
+
chat_id: string;
|
|
2095
|
+
route?: ChannelRouteSnapshot | null;
|
|
2096
|
+
error?: string;
|
|
2097
|
+
}
|
|
2098
|
+
export interface ChannelTargetsListResponseMessage {
|
|
2099
|
+
type: "channel_targets_list_response";
|
|
2100
|
+
request_id: string;
|
|
2101
|
+
success: boolean;
|
|
2102
|
+
channel_id: ChannelId;
|
|
2103
|
+
targets: ChannelTargetSnapshot[];
|
|
2104
|
+
error?: string;
|
|
2105
|
+
}
|
|
2106
|
+
export interface ChannelTargetBindResponseMessage {
|
|
2107
|
+
type: "channel_target_bind_response";
|
|
2108
|
+
request_id: string;
|
|
2109
|
+
success: boolean;
|
|
2110
|
+
channel_id: ChannelId;
|
|
2111
|
+
target_id: string;
|
|
2112
|
+
chat_id?: string;
|
|
2113
|
+
route?: ChannelRouteSnapshot | null;
|
|
2114
|
+
error?: string;
|
|
2115
|
+
}
|
|
2116
|
+
export interface ChannelsUpdatedMessage {
|
|
2117
|
+
type: "channels_updated";
|
|
2118
|
+
timestamp: number;
|
|
2119
|
+
channel_id?: ChannelId;
|
|
2120
|
+
}
|
|
2121
|
+
export interface ChannelAccountsUpdatedMessage {
|
|
2122
|
+
type: "channel_accounts_updated";
|
|
2123
|
+
timestamp: number;
|
|
2124
|
+
channel_id: ChannelId;
|
|
2125
|
+
account_id?: string;
|
|
2126
|
+
}
|
|
2127
|
+
export interface ChannelPairingsUpdatedMessage {
|
|
2128
|
+
type: "channel_pairings_updated";
|
|
2129
|
+
timestamp: number;
|
|
2130
|
+
channel_id: ChannelId;
|
|
2131
|
+
}
|
|
2132
|
+
export interface ChannelRoutesUpdatedMessage {
|
|
2133
|
+
type: "channel_routes_updated";
|
|
2134
|
+
timestamp: number;
|
|
2135
|
+
channel_id: ChannelId;
|
|
2136
|
+
agent_id?: string;
|
|
2137
|
+
conversation_id?: string | null;
|
|
2138
|
+
}
|
|
2139
|
+
export interface ChannelTargetsUpdatedMessage {
|
|
2140
|
+
type: "channel_targets_updated";
|
|
2141
|
+
timestamp: number;
|
|
2142
|
+
channel_id: ChannelId;
|
|
2143
|
+
}
|
|
2144
|
+
/**
|
|
2145
|
+
* Generic slash-command dispatch from the web app.
|
|
2146
|
+
* The device handles the `command_id` and emits `command_start` /
|
|
2147
|
+
* `command_end` stream deltas with the result.
|
|
2148
|
+
*/
|
|
2149
|
+
export interface ExecuteCommandCommand {
|
|
2150
|
+
type: "execute_command";
|
|
2151
|
+
/** Which slash command to run (e.g., "clear") */
|
|
2152
|
+
command_id: string;
|
|
2153
|
+
/** Correlation id (echoed in the response stream deltas) */
|
|
2154
|
+
request_id: string;
|
|
2155
|
+
/** Runtime scope — identifies which agent + conversation this targets */
|
|
2156
|
+
runtime: RuntimeScope;
|
|
2157
|
+
/** Optional command arguments (everything after the command name). */
|
|
2158
|
+
args?: string;
|
|
2159
|
+
}
|
|
2160
|
+
/**
|
|
2161
|
+
* Remove a specific item from the queue by ID.
|
|
2162
|
+
* Used by desktop to implement queue editing (load into input, remove from queue).
|
|
2163
|
+
*/
|
|
2164
|
+
export interface RemoveQueueItemCommand {
|
|
2165
|
+
type: "remove_queue_item";
|
|
2166
|
+
/** Correlation id (echoed back in the response for request correlation). */
|
|
2167
|
+
request_id: string;
|
|
2168
|
+
/** Runtime scope — identifies which agent + conversation this targets. */
|
|
2169
|
+
runtime: RuntimeScope;
|
|
2170
|
+
/** The queue item ID to remove. */
|
|
2171
|
+
item_id: string;
|
|
2172
|
+
}
|
|
2173
|
+
export interface GitBranchInfo {
|
|
2174
|
+
name: string;
|
|
2175
|
+
is_current: boolean;
|
|
2176
|
+
is_remote: boolean;
|
|
2177
|
+
}
|
|
2178
|
+
export interface SearchBranchesCommand {
|
|
2179
|
+
type: "search_branches";
|
|
2180
|
+
/** Echoed back in the response for request correlation. */
|
|
2181
|
+
request_id: string;
|
|
2182
|
+
/** Substring filter for branch names. Empty string returns all branches. */
|
|
2183
|
+
query: string;
|
|
2184
|
+
/** Maximum number of results to return. Defaults to 20. */
|
|
2185
|
+
max_results?: number;
|
|
2186
|
+
/** Working directory to run git in. Falls back to conversation cwd. */
|
|
2187
|
+
cwd?: string;
|
|
2188
|
+
}
|
|
2189
|
+
export interface SearchBranchesResponse {
|
|
2190
|
+
type: "search_branches_response";
|
|
2191
|
+
request_id: string;
|
|
2192
|
+
branches: GitBranchInfo[];
|
|
2193
|
+
success: boolean;
|
|
2194
|
+
error?: string;
|
|
2195
|
+
}
|
|
2196
|
+
export interface CheckoutBranchCommand {
|
|
2197
|
+
type: "checkout_branch";
|
|
2198
|
+
/** Echoed back in the response for request correlation. */
|
|
2199
|
+
request_id: string;
|
|
2200
|
+
/** Branch name to checkout. */
|
|
2201
|
+
branch: string;
|
|
2202
|
+
/** Create a new branch if it doesn't exist. */
|
|
2203
|
+
create?: boolean;
|
|
2204
|
+
/** Working directory to run git in. Falls back to conversation cwd. */
|
|
2205
|
+
cwd?: string;
|
|
2206
|
+
}
|
|
2207
|
+
export interface CheckoutBranchResponse {
|
|
2208
|
+
type: "checkout_branch_response";
|
|
2209
|
+
request_id: string;
|
|
2210
|
+
/** The branch now checked out. */
|
|
2211
|
+
branch: string;
|
|
2212
|
+
success: boolean;
|
|
2213
|
+
error?: string;
|
|
2214
|
+
}
|
|
2215
|
+
/**
|
|
2216
|
+
* Refresh the local secrets cache from core and return the available
|
|
2217
|
+
* secrets. The modal needs the plaintext values to populate the form, so
|
|
2218
|
+
* this command intentionally exposes them. The CLI's `/secret list` uses a
|
|
2219
|
+
* separate code path that returns names only.
|
|
2220
|
+
*/
|
|
2221
|
+
export interface SecretListCommand {
|
|
2222
|
+
type: "secret_list";
|
|
2223
|
+
request_id: string;
|
|
2224
|
+
/** Agent whose secrets to list. */
|
|
2225
|
+
agent_id: string;
|
|
2226
|
+
}
|
|
2227
|
+
export interface SecretListResponse {
|
|
2228
|
+
type: "secret_list_response";
|
|
2229
|
+
request_id: string;
|
|
2230
|
+
success: boolean;
|
|
2231
|
+
/** Sorted secret entries (key + plaintext value). Empty on failure. */
|
|
2232
|
+
secrets: Array<{
|
|
2233
|
+
key: string;
|
|
2234
|
+
value: string;
|
|
2235
|
+
}>;
|
|
2236
|
+
error?: string;
|
|
2237
|
+
}
|
|
2238
|
+
/**
|
|
2239
|
+
* Apply a batch of secret mutations atomically. The device computes the
|
|
2240
|
+
* resulting map (current ∪ set) ∖ unset and PATCHes core in a single call,
|
|
2241
|
+
* eliminating the read-modify-write race that would plague parallel
|
|
2242
|
+
* per-key calls. This is the only WS-surfaced write — single-key set/unset
|
|
2243
|
+
* are CLI-only via `setSecretOnServer` / `deleteSecretOnServer`.
|
|
2244
|
+
*
|
|
2245
|
+
* Keys provided in `set` override any existing values; `unset` keys are
|
|
2246
|
+
* removed from the final map. Keys appearing in both lists resolve to
|
|
2247
|
+
* `unset` (defensive — clients shouldn't send both).
|
|
2248
|
+
*/
|
|
2249
|
+
export interface SecretApplyCommand {
|
|
2250
|
+
type: "secret_apply";
|
|
2251
|
+
request_id: string;
|
|
2252
|
+
agent_id: string;
|
|
2253
|
+
/** Keys to add or replace, with their plaintext values. */
|
|
2254
|
+
set: Record<string, string>;
|
|
2255
|
+
/** Keys to remove. Normalized to uppercase server-side. */
|
|
2256
|
+
unset: string[];
|
|
2257
|
+
}
|
|
2258
|
+
export interface SecretApplyResponse {
|
|
2259
|
+
type: "secret_apply_response";
|
|
2260
|
+
request_id: string;
|
|
2261
|
+
success: boolean;
|
|
2262
|
+
/** Sorted secret names after the apply. Empty on failure. */
|
|
2263
|
+
names: string[];
|
|
2264
|
+
error?: string;
|
|
2265
|
+
}
|
|
2266
|
+
export interface RemoveQueueItemResponse {
|
|
2267
|
+
type: "remove_queue_item_response";
|
|
2268
|
+
request_id: string;
|
|
2269
|
+
success: boolean;
|
|
2270
|
+
item_id: string;
|
|
2271
|
+
}
|
|
2272
|
+
export type WsProtocolCommand = InputCommand | ChangeDeviceStateCommand | AbortMessageCommand | SyncCommand | RuntimeStartCommand | ExternalToolCallResponseCommand | TerminalSpawnCommand | TerminalInputCommand | TerminalResizeCommand | TerminalKillCommand | SearchFilesCommand | GrepInFilesCommand | ListInDirectoryCommand | GetTreeCommand | ReadFileCommand | WriteFileCommand | WatchFileCommand | UnwatchFileCommand | EditFileCommand | FileOpsCommand | ListMemoryCommand | MemoryHistoryCommand | MemoryFileAtRefCommand | MemoryCommitDiffCommand | ReadMemoryFileCommand | WriteMemoryFileCommand | DeleteMemoryFileCommand | EnableMemfsCommand | ListModelsCommand | ListConnectProvidersCommand | ConnectProviderCommand | DisconnectProviderCommand | UpdateModelCommand | UpdateToolsetCommand | CronListCommand | CronAddCommand | CronGetCommand | CronRunsCommand | CronTriggerCommand | CronUpdateCommand | CronDeleteCommand | CronDeleteAllCommand | SkillEnableCommand | SkillDisableCommand | CreateAgentCommand | AgentListCommand | AgentRetrieveCommand | AgentCreateCommand | AgentUpdateCommand | AgentDeleteCommand | ConversationListCommand | ConversationRetrieveCommand | ConversationCreateCommand | ConversationUpdateCommand | ConversationRecompileCommand | ConversationForkCommand | ConversationMessagesListCommand | ConversationCompactCommand | GetCwdMapCommand | ListConversationPinsCommand | SetConversationPinCommand | GetReflectionSettingsCommand | SetReflectionSettingsCommand | GetExperimentsCommand | SetExperimentCommand | ChannelsListCommand | ChannelAccountsListCommand | ChannelAccountCreateCommand | ChannelAccountUpdateCommand | ChannelAccountBindCommand | ChannelAccountUnbindCommand | ChannelAccountDeleteCommand | ChannelAccountStartCommand | ChannelAccountStopCommand | ChannelGetConfigCommand | ChannelSetConfigCommand | ChannelStartCommand | ChannelStopCommand | ChannelPairingsListCommand | ChannelPairingBindCommand | ChannelRoutesListCommand | ChannelTargetsListCommand | ChannelTargetBindCommand | ChannelRouteRemoveCommand | ChannelRouteUpdateCommand | ExecuteCommandCommand | RemoveQueueItemCommand | SearchBranchesCommand | CheckoutBranchCommand | SecretListCommand | SecretApplyCommand;
|
|
2273
|
+
export type WsProtocolCommandType = WsProtocolCommand["type"];
|
|
2274
|
+
export type WsProtocolMessage = DeviceStatusUpdateMessage | LoopStatusUpdateMessage | QueueUpdateMessage | StreamDeltaMessage | SubagentStateUpdateMessage | ExternalToolCallRequestMessage | AbortMessageResponseMessage | SyncResponseMessage | TerminalOutputMessage | TerminalSpawnedMessage | TerminalExitedMessage | SearchFilesResponseMessage | GrepInFilesResponseMessage | ListInDirectoryResponseMessage | GetTreeResponseMessage | ReadFileResponseMessage | WriteFileResponseMessage | FileOpsCommand | EditFileResponseMessage | FileChangedMessage | ListMemoryResponseMessage | MemoryHistoryResponseMessage | MemoryFileAtRefResponseMessage | MemoryCommitDiffResponseMessage | ReadMemoryFileResponseMessage | WriteMemoryFileResponseMessage | DeleteMemoryFileResponseMessage | EnableMemfsResponseMessage | MemoryUpdatedMessage | ListModelsResponseMessage | ListConnectProvidersResponseMessage | ConnectProviderResponseMessage | DisconnectProviderResponseMessage | UpdateModelResponseMessage | UpdateToolsetResponseMessage | CronListResponseMessage | CronAddResponseMessage | CronGetResponseMessage | CronRunsResponseMessage | CronTriggerResponseMessage | CronUpdateResponseMessage | CronDeleteResponseMessage | CronDeleteAllResponseMessage | CronsUpdatedMessage | SkillEnableResponseMessage | SkillDisableResponseMessage | SkillsUpdatedMessage | CreateAgentResponseMessage | AgentListResponseMessage | AgentRetrieveResponseMessage | AgentCreateResponseMessage | AgentUpdateResponseMessage | AgentDeleteResponseMessage | ConversationListResponseMessage | ConversationRetrieveResponseMessage | ConversationCreateResponseMessage | ConversationUpdateResponseMessage | ConversationRecompileResponseMessage | ConversationForkResponseMessage | ConversationMessagesListResponseMessage | ConversationCompactResponseMessage | RuntimeStartResponseMessage | GetExperimentsResponseMessage | SetExperimentResponseMessage | ListConversationPinsResponseMessage | SetConversationPinResponseMessage | GetReflectionSettingsResponseMessage | SetReflectionSettingsResponseMessage | ChannelsListResponseMessage | ChannelAccountsListResponseMessage | ChannelAccountCreateResponseMessage | ChannelAccountUpdateResponseMessage | ChannelAccountBindResponseMessage | ChannelAccountUnbindResponseMessage | ChannelAccountDeleteResponseMessage | ChannelAccountStartResponseMessage | ChannelAccountStopResponseMessage | ChannelGetConfigResponseMessage | ChannelSetConfigResponseMessage | ChannelStartResponseMessage | ChannelStopResponseMessage | ChannelPairingsListResponseMessage | ChannelPairingBindResponseMessage | ChannelRoutesListResponseMessage | ChannelTargetsListResponseMessage | ChannelTargetBindResponseMessage | ChannelRouteRemoveResponseMessage | ChannelRouteUpdateResponseMessage | ChannelsUpdatedMessage | ChannelAccountsUpdatedMessage | ChannelPairingsUpdatedMessage | ChannelRoutesUpdatedMessage | ChannelTargetsUpdatedMessage | GetCwdMapResponseMessage | SearchBranchesResponse | CheckoutBranchResponse | SecretListResponse | SecretApplyResponse | RemoveQueueItemResponse;
|
|
2275
|
+
export type WsProtocolMessageType = WsProtocolMessage["type"];
|
|
2276
|
+
export type { StopReasonType };
|
|
2277
|
+
//# sourceMappingURL=protocol_v2.d.ts.map
|