@vellumai/plugin-api 0.10.7-dev.202607102127.c1d0542 → 0.10.7-staging.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +230 -1820
  2. package/index.js +0 -25
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -60,40 +60,6 @@ declare interface AcpSessionUsage {
60
60
  outputTokens?: number;
61
61
  }
62
62
 
63
- /**
64
- * Append a message to a conversation. This is the low-level insert: it
65
- * persists and indexes the row only — it does not project the message into
66
- * the conversation's disk view and does not notify connected clients, so
67
- * background/internal writes stay silent. A user-visible append pairs this
68
- * with `syncMessageToDisk` and a client notification, as the host's own
69
- * out-of-pipeline writers do.
70
- */
71
- export declare function addMessage(conversationId: string, role: MessageRole, content: string, options?: AddMessageOptions): Promise<AddMessageResult>;
72
-
73
- /**
74
- * Persist a message and run post-insert side effects (memory indexing,
75
- * attention projection). Delegates the core insert + retry logic to
76
- * {@link insertMessageCore}.
77
- */
78
- declare function addMessage_2(conversationId: string, role: MessageRole, content: string, options?: AddMessageOptions): Promise<InsertedMessage>;
79
-
80
- /** Options for {@link addMessage}. Only `skipIndexing` and `clientMessageId`
81
- * have defaults; `metadata` is genuinely optional. */
82
- declare interface AddMessageOptions {
83
- metadata?: Record<string, unknown>;
84
- skipIndexing?: boolean;
85
- /** Client-generated nonce for idempotent inserts. When provided,
86
- * duplicate inserts for the same `(conversationId, clientMessageId)`
87
- * pair are silently skipped. */
88
- clientMessageId?: string;
89
- /** Pre-assigned message ID. When omitted, one is generated
90
- * internally. Pass the same value as `requestId` for user turns so
91
- * the persisted row ID matches the runtime correlation ID. */
92
- id?: string;
93
- }
94
-
95
- declare type AddMessageResult = Awaited<ReturnType<addMessage_2>>;
96
-
97
63
  /**
98
64
  * Why an agent turn reached a terminal state. Supplied to the `stop` hook via
99
65
  * {@link StopContext.exitReason} and emitted on the `agent_loop_exit` event,
@@ -135,6 +101,12 @@ export declare type AgentLoopExitReason =
135
101
  /** An unhandled error ended the turn. */
136
102
  | "error";
137
103
 
104
+ declare interface AllowlistOption {
105
+ label: string;
106
+ description: string;
107
+ pattern: string;
108
+ }
109
+
138
110
  declare interface AppDataResponse {
139
111
  type: "app_data_response";
140
112
  surfaceId: string;
@@ -189,6 +161,29 @@ declare interface AppRestoreResponse {
189
161
  error?: string;
190
162
  }
191
163
 
164
+ declare type ApprovalRequired = z.infer<typeof ApprovalRequiredSchema>;
165
+
166
+ declare const ApprovalRequiredSchema: z.ZodObject<{
167
+ proposal: z.ZodDiscriminatedUnion<[z.ZodObject<{
168
+ type: z.ZodLiteral<"http">;
169
+ credentialHandle: z.ZodString;
170
+ method: z.ZodString;
171
+ url: z.ZodString;
172
+ purpose: z.ZodString;
173
+ allowedUrlPatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
174
+ }, z.core.$strip>, z.ZodObject<{
175
+ type: z.ZodLiteral<"command">;
176
+ credentialHandle: z.ZodString;
177
+ command: z.ZodString;
178
+ purpose: z.ZodString;
179
+ allowedCommandPatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
180
+ }, z.core.$strip>], "type">;
181
+ proposalHash: z.ZodString;
182
+ renderedProposal: z.ZodString;
183
+ sessionId: z.ZodString;
184
+ conversationId: z.ZodOptional<z.ZodString>;
185
+ }, z.core.$strip>;
186
+
192
187
  declare interface AppsListResponse {
193
188
  type: "apps_list_response";
194
189
  apps: Array<{
@@ -211,19 +206,6 @@ declare interface AppUpdatePreviewResponse {
211
206
  appId: string;
212
207
  }
213
208
 
214
- /**
215
- * How {@link listConversations} (and friends) treats archived rows.
216
- *
217
- * - `"active"` — exclude rows with a non-null `archivedAt`. The default
218
- * for sidebar lists, restore, CLI pickers, and anything user-facing.
219
- * - `"archived"` — return ONLY archived rows. Powers the Archive page
220
- * so it does not have to pull the entire conversation history and
221
- * filter client-side.
222
- * - `"all"` — include both. Reserved for migrations and back-compat
223
- * call sites that genuinely want everything in one query.
224
- */
225
- declare type ArchiveStatusFilter = "active" | "archived" | "all";
226
-
227
209
  declare type AssistantActivityStateEvent = z.infer<typeof AssistantActivityStateEventSchema>;
228
210
 
229
211
  declare const AssistantActivityStateEventSchema: z.ZodObject<{
@@ -269,1098 +251,6 @@ declare interface AssistantAttention {
269
251
  lastSeenSignalType?: string;
270
252
  }
271
253
 
272
- declare type AssistantConfig = z.infer<typeof AssistantConfigSchema>;
273
-
274
- declare const AssistantConfigSchema: z.ZodObject<{
275
- services: z.ZodDefault<z.ZodObject<{
276
- inference: z.ZodDefault<z.ZodObject<{}, z.core.$strip>>;
277
- "image-generation": z.ZodDefault<z.ZodObject<{
278
- mode: z.ZodDefault<z.ZodEnum<{
279
- managed: "managed";
280
- "your-own": "your-own";
281
- }>>;
282
- provider: z.ZodDefault<z.ZodEnum<{
283
- openai: "openai";
284
- gemini: "gemini";
285
- }>>;
286
- model: z.ZodDefault<z.ZodString>;
287
- }, z.core.$strip>>;
288
- "web-search": z.ZodDefault<z.ZodObject<{
289
- mode: z.ZodDefault<z.ZodEnum<{
290
- managed: "managed";
291
- "your-own": "your-own";
292
- }>>;
293
- provider: z.ZodDefault<z.ZodEnum<{
294
- [x: string]: string;
295
- }>>;
296
- }, z.core.$strip>>;
297
- "web-fetch": z.ZodDefault<z.ZodObject<{
298
- mode: z.ZodDefault<z.ZodEnum<{
299
- managed: "managed";
300
- "your-own": "your-own";
301
- }>>;
302
- provider: z.ZodDefault<z.ZodEnum<{
303
- [x: string]: string;
304
- }>>;
305
- }, z.core.$strip>>;
306
- stt: z.ZodDefault<z.ZodObject<{
307
- mode: z.ZodDefault<z.ZodLiteral<"your-own">>;
308
- provider: z.ZodEnum<{
309
- deepgram: "deepgram";
310
- "google-gemini": "google-gemini";
311
- "openai-whisper": "openai-whisper";
312
- xai: "xai";
313
- }>;
314
- providers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
315
- }, z.core.$strip>>;
316
- tts: z.ZodDefault<z.ZodObject<{
317
- mode: z.ZodDefault<z.ZodLiteral<"your-own">>;
318
- provider: z.ZodDefault<z.ZodEnum<{
319
- deepgram: "deepgram";
320
- xai: "xai";
321
- elevenlabs: "elevenlabs";
322
- "fish-audio": "fish-audio";
323
- }>>;
324
- providers: z.ZodDefault<z.ZodObject<{
325
- elevenlabs: z.ZodDefault<z.ZodObject<{
326
- voiceId: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
327
- voiceModelId: z.ZodDefault<z.ZodString>;
328
- speed: z.ZodDefault<z.ZodNumber>;
329
- stability: z.ZodDefault<z.ZodNumber>;
330
- similarityBoost: z.ZodDefault<z.ZodNumber>;
331
- conversationTimeoutSeconds: z.ZodDefault<z.ZodNumber>;
332
- }, z.core.$strip>>;
333
- "fish-audio": z.ZodDefault<z.ZodObject<{
334
- referenceId: z.ZodDefault<z.ZodString>;
335
- chunkLength: z.ZodDefault<z.ZodNumber>;
336
- format: z.ZodDefault<z.ZodEnum<{
337
- mp3: "mp3";
338
- wav: "wav";
339
- opus: "opus";
340
- }>>;
341
- latency: z.ZodDefault<z.ZodEnum<{
342
- balanced: "balanced";
343
- normal: "normal";
344
- }>>;
345
- speed: z.ZodDefault<z.ZodNumber>;
346
- }, z.core.$strip>>;
347
- deepgram: z.ZodDefault<z.ZodObject<{
348
- model: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
349
- format: z.ZodDefault<z.ZodEnum<{
350
- mp3: "mp3";
351
- wav: "wav";
352
- opus: "opus";
353
- }>>;
354
- }, z.core.$strip>>;
355
- xai: z.ZodDefault<z.ZodObject<{
356
- voiceId: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
357
- language: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
358
- format: z.ZodDefault<z.ZodEnum<{
359
- mp3: "mp3";
360
- wav: "wav";
361
- }>>;
362
- sampleRate: z.ZodDefault<z.ZodNumber>;
363
- bitRate: z.ZodDefault<z.ZodNumber>;
364
- }, z.core.$strip>>;
365
- }, z.core.$strip>>;
366
- }, z.core.$strip>>;
367
- "google-oauth": z.ZodDefault<z.ZodObject<{
368
- mode: z.ZodDefault<z.ZodEnum<{
369
- managed: "managed";
370
- "your-own": "your-own";
371
- }>>;
372
- }, z.core.$strip>>;
373
- "outlook-oauth": z.ZodDefault<z.ZodObject<{
374
- mode: z.ZodDefault<z.ZodEnum<{
375
- managed: "managed";
376
- "your-own": "your-own";
377
- }>>;
378
- }, z.core.$strip>>;
379
- "linear-oauth": z.ZodDefault<z.ZodObject<{
380
- mode: z.ZodDefault<z.ZodEnum<{
381
- managed: "managed";
382
- "your-own": "your-own";
383
- }>>;
384
- }, z.core.$strip>>;
385
- "github-oauth": z.ZodDefault<z.ZodObject<{
386
- mode: z.ZodDefault<z.ZodEnum<{
387
- managed: "managed";
388
- "your-own": "your-own";
389
- }>>;
390
- }, z.core.$strip>>;
391
- "notion-oauth": z.ZodDefault<z.ZodObject<{
392
- mode: z.ZodDefault<z.ZodEnum<{
393
- managed: "managed";
394
- "your-own": "your-own";
395
- }>>;
396
- }, z.core.$strip>>;
397
- "twitter-oauth": z.ZodDefault<z.ZodObject<{
398
- mode: z.ZodDefault<z.ZodEnum<{
399
- managed: "managed";
400
- "your-own": "your-own";
401
- }>>;
402
- }, z.core.$strip>>;
403
- "asana-oauth": z.ZodDefault<z.ZodObject<{
404
- mode: z.ZodDefault<z.ZodEnum<{
405
- managed: "managed";
406
- "your-own": "your-own";
407
- }>>;
408
- }, z.core.$strip>>;
409
- "todoist-oauth": z.ZodDefault<z.ZodObject<{
410
- mode: z.ZodDefault<z.ZodEnum<{
411
- managed: "managed";
412
- "your-own": "your-own";
413
- }>>;
414
- }, z.core.$strip>>;
415
- "discord-oauth": z.ZodDefault<z.ZodObject<{
416
- mode: z.ZodDefault<z.ZodEnum<{
417
- managed: "managed";
418
- "your-own": "your-own";
419
- }>>;
420
- }, z.core.$strip>>;
421
- "hubspot-oauth": z.ZodDefault<z.ZodObject<{
422
- mode: z.ZodDefault<z.ZodEnum<{
423
- managed: "managed";
424
- "your-own": "your-own";
425
- }>>;
426
- }, z.core.$strip>>;
427
- }, z.core.$strip>>;
428
- memory: z.ZodDefault<z.ZodObject<{
429
- enabled: z.ZodDefault<z.ZodBoolean>;
430
- embeddings: z.ZodDefault<z.ZodObject<{
431
- required: z.ZodDefault<z.ZodBoolean>;
432
- provider: z.ZodDefault<z.ZodEnum<{
433
- openai: "openai";
434
- gemini: "gemini";
435
- ollama: "ollama";
436
- auto: "auto";
437
- local: "local";
438
- }>>;
439
- localModel: z.ZodDefault<z.ZodString>;
440
- openaiModel: z.ZodDefault<z.ZodString>;
441
- geminiModel: z.ZodDefault<z.ZodString>;
442
- geminiTaskType: z.ZodOptional<z.ZodEnum<{
443
- SEMANTIC_SIMILARITY: "SEMANTIC_SIMILARITY";
444
- CLASSIFICATION: "CLASSIFICATION";
445
- CLUSTERING: "CLUSTERING";
446
- RETRIEVAL_DOCUMENT: "RETRIEVAL_DOCUMENT";
447
- RETRIEVAL_QUERY: "RETRIEVAL_QUERY";
448
- CODE_RETRIEVAL_QUERY: "CODE_RETRIEVAL_QUERY";
449
- QUESTION_ANSWERING: "QUESTION_ANSWERING";
450
- FACT_VERIFICATION: "FACT_VERIFICATION";
451
- }>>;
452
- geminiDimensions: z.ZodOptional<z.ZodNumber>;
453
- ollamaModel: z.ZodDefault<z.ZodString>;
454
- }, z.core.$strip>>;
455
- qdrant: z.ZodDefault<z.ZodObject<{
456
- url: z.ZodDefault<z.ZodString>;
457
- collection: z.ZodDefault<z.ZodString>;
458
- vectorSize: z.ZodDefault<z.ZodNumber>;
459
- onDisk: z.ZodDefault<z.ZodBoolean>;
460
- quantization: z.ZodDefault<z.ZodEnum<{
461
- none: "none";
462
- scalar: "scalar";
463
- }>>;
464
- }, z.core.$strip>>;
465
- retrieval: z.ZodDefault<z.ZodObject<{
466
- maxInjectTokens: z.ZodDefault<z.ZodNumber>;
467
- freshness: z.ZodDefault<z.ZodObject<{
468
- enabled: z.ZodDefault<z.ZodBoolean>;
469
- maxAgeDays: z.ZodDefault<z.ZodObject<{
470
- identity: z.ZodDefault<z.ZodNumber>;
471
- preference: z.ZodDefault<z.ZodNumber>;
472
- project: z.ZodDefault<z.ZodNumber>;
473
- decision: z.ZodDefault<z.ZodNumber>;
474
- constraint: z.ZodDefault<z.ZodNumber>;
475
- event: z.ZodDefault<z.ZodNumber>;
476
- }, z.core.$strip>>;
477
- staleDecay: z.ZodDefault<z.ZodNumber>;
478
- reinforcementShieldDays: z.ZodDefault<z.ZodNumber>;
479
- }, z.core.$strip>>;
480
- scopePolicy: z.ZodDefault<z.ZodEnum<{
481
- allow_global_fallback: "allow_global_fallback";
482
- strict: "strict";
483
- }>>;
484
- dynamicBudget: z.ZodDefault<z.ZodObject<{
485
- enabled: z.ZodDefault<z.ZodBoolean>;
486
- minInjectTokens: z.ZodDefault<z.ZodNumber>;
487
- maxInjectTokens: z.ZodDefault<z.ZodNumber>;
488
- targetHeadroomTokens: z.ZodDefault<z.ZodNumber>;
489
- }, z.core.$strip>>;
490
- injection: z.ZodDefault<z.ZodObject<{
491
- contextLoad: z.ZodDefault<z.ZodObject<{
492
- maxNodes: z.ZodDefault<z.ZodNumber>;
493
- serendipitySlots: z.ZodDefault<z.ZodNumber>;
494
- capabilityReserve: z.ZodDefault<z.ZodNumber>;
495
- }, z.core.$strip>>;
496
- perTurn: z.ZodDefault<z.ZodObject<{
497
- maxNodes: z.ZodDefault<z.ZodNumber>;
498
- serendipitySlots: z.ZodDefault<z.ZodNumber>;
499
- capabilityReserve: z.ZodDefault<z.ZodNumber>;
500
- }, z.core.$strip>>;
501
- }, z.core.$strip>>;
502
- scratchpadInjection: z.ZodDefault<z.ZodObject<{
503
- enabled: z.ZodDefault<z.ZodBoolean>;
504
- }, z.core.$strip>>;
505
- }, z.core.$strip>>;
506
- segmentation: z.ZodDefault<z.ZodObject<{
507
- targetTokens: z.ZodDefault<z.ZodNumber>;
508
- overlapTokens: z.ZodDefault<z.ZodNumber>;
509
- }, z.core.$strip>>;
510
- jobs: z.ZodDefault<z.ZodPipe<z.ZodObject<{
511
- workerConcurrency: z.ZodOptional<z.ZodNumber>;
512
- stalledJobTimeoutMs: z.ZodDefault<z.ZodNumber>;
513
- slowLlmConcurrency: z.ZodOptional<z.ZodNumber>;
514
- fastConcurrency: z.ZodOptional<z.ZodNumber>;
515
- embedConcurrency: z.ZodOptional<z.ZodNumber>;
516
- }, z.core.$strip>, z.ZodTransform<{
517
- workerConcurrency: number;
518
- stalledJobTimeoutMs: number;
519
- slowLlmConcurrency: number;
520
- fastConcurrency: number;
521
- embedConcurrency: number;
522
- }, {
523
- stalledJobTimeoutMs: number;
524
- workerConcurrency?: number | undefined;
525
- slowLlmConcurrency?: number | undefined;
526
- fastConcurrency?: number | undefined;
527
- embedConcurrency?: number | undefined;
528
- }>>>;
529
- worker: z.ZodDefault<z.ZodObject<{
530
- enabled: z.ZodDefault<z.ZodBoolean>;
531
- }, z.core.$strip>>;
532
- retention: z.ZodDefault<z.ZodObject<{
533
- keepRawForever: z.ZodDefault<z.ZodBoolean>;
534
- }, z.core.$strip>>;
535
- cleanup: z.ZodDefault<z.ZodObject<{
536
- enabled: z.ZodDefault<z.ZodBoolean>;
537
- supersededItemRetentionMs: z.ZodDefault<z.ZodNumber>;
538
- conversationRetentionDays: z.ZodDefault<z.ZodNumber>;
539
- llmRequestLogRetentionMs: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
540
- }, z.core.$strip>>;
541
- maintenance: z.ZodDefault<z.ZodObject<{
542
- intervalMs: z.ZodDefault<z.ZodNumber>;
543
- quietPeriodMs: z.ZodDefault<z.ZodNumber>;
544
- skillPruneDays: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
545
- }, z.core.$strip>>;
546
- extraction: z.ZodDefault<z.ZodObject<{
547
- useLLM: z.ZodDefault<z.ZodBoolean>;
548
- extractFromAssistant: z.ZodDefault<z.ZodBoolean>;
549
- batchSize: z.ZodDefault<z.ZodNumber>;
550
- idleTimeoutMs: z.ZodDefault<z.ZodNumber>;
551
- }, z.core.$strip>>;
552
- summarization: z.ZodDefault<z.ZodObject<{
553
- useLLM: z.ZodDefault<z.ZodBoolean>;
554
- }, z.core.$strip>>;
555
- v2: z.ZodDefault<z.ZodObject<{
556
- enabled: z.ZodDefault<z.ZodBoolean>;
557
- sweep_enabled: z.ZodDefault<z.ZodBoolean>;
558
- d: z.ZodDefault<z.ZodNumber>;
559
- c_user: z.ZodDefault<z.ZodNumber>;
560
- c_assistant: z.ZodDefault<z.ZodNumber>;
561
- c_now: z.ZodDefault<z.ZodNumber>;
562
- k: z.ZodDefault<z.ZodNumber>;
563
- hops: z.ZodDefault<z.ZodNumber>;
564
- top_k: z.ZodDefault<z.ZodNumber>;
565
- ann_candidate_limit: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
566
- epsilon: z.ZodDefault<z.ZodNumber>;
567
- dense_weight: z.ZodDefault<z.ZodNumber>;
568
- sparse_weight: z.ZodDefault<z.ZodNumber>;
569
- min_sparse_spread: z.ZodOptional<z.ZodNumber>;
570
- full_sparse_spread: z.ZodOptional<z.ZodNumber>;
571
- bm25_k1: z.ZodDefault<z.ZodNumber>;
572
- bm25_b: z.ZodDefault<z.ZodNumber>;
573
- consolidation_interval_hours: z.ZodDefault<z.ZodNumber>;
574
- consolidation_max_buffer_lines: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
575
- consolidation_max_entries_per_run: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
576
- max_page_chars: z.ZodDefault<z.ZodNumber>;
577
- consolidation_prompt_path: z.ZodDefault<z.ZodNullable<z.ZodString>>;
578
- rerank: z.ZodDefault<z.ZodObject<{
579
- enabled: z.ZodDefault<z.ZodBoolean>;
580
- top_k: z.ZodDefault<z.ZodNumber>;
581
- alpha: z.ZodDefault<z.ZodNumber>;
582
- model: z.ZodDefault<z.ZodString>;
583
- dtype: z.ZodDefault<z.ZodEnum<{
584
- fp32: "fp32";
585
- fp16: "fp16";
586
- q8: "q8";
587
- int8: "int8";
588
- uint8: "uint8";
589
- q4: "q4";
590
- bnb4: "bnb4";
591
- q4f16: "q4f16";
592
- }>>;
593
- }, z.core.$strip>>;
594
- router: z.ZodDefault<z.ZodObject<{
595
- enabled: z.ZodDefault<z.ZodBoolean>;
596
- max_page_ids: z.ZodDefault<z.ZodNumber>;
597
- router_prompt_path: z.ZodDefault<z.ZodNullable<z.ZodString>>;
598
- batch_size: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
599
- tier1_size: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
600
- tier2_size: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
601
- historical_pairs: z.ZodDefault<z.ZodNumber>;
602
- historical_pairs_max_chars: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
603
- }, z.core.$strip>>;
604
- }, z.core.$strip>>;
605
- v3: z.ZodDefault<z.ZodObject<{
606
- live: z.ZodDefault<z.ZodBoolean>;
607
- prune: z.ZodDefault<z.ZodObject<{
608
- maxResidentBytes: z.ZodDefault<z.ZodNumber>;
609
- targetResidentBytes: z.ZodDefault<z.ZodNumber>;
610
- }, z.core.$strip>>;
611
- hotSet: z.ZodDefault<z.ZodObject<{
612
- k: z.ZodDefault<z.ZodNumber>;
613
- halfLifeDays: z.ZodDefault<z.ZodNumber>;
614
- }, z.core.$strip>>;
615
- freshSet: z.ZodDefault<z.ZodObject<{
616
- k: z.ZodDefault<z.ZodNumber>;
617
- }, z.core.$strip>>;
618
- learnedEdges: z.ZodDefault<z.ZodObject<{
619
- halfLifeDays: z.ZodDefault<z.ZodNumber>;
620
- minCount: z.ZodDefault<z.ZodNumber>;
621
- npmiFloor: z.ZodDefault<z.ZodNumber>;
622
- maxPerPage: z.ZodDefault<z.ZodNumber>;
623
- perSeed: z.ZodDefault<z.ZodNumber>;
624
- cap: z.ZodDefault<z.ZodNumber>;
625
- }, z.core.$strip>>;
626
- spotlight: z.ZodDefault<z.ZodObject<{
627
- n: z.ZodDefault<z.ZodNumber>;
628
- windowTurns: z.ZodDefault<z.ZodNumber>;
629
- }, z.core.$strip>>;
630
- needleK: z.ZodDefault<z.ZodNumber>;
631
- denseK: z.ZodDefault<z.ZodNumber>;
632
- replyQueryK: z.ZodDefault<z.ZodNumber>;
633
- selectorEnabled: z.ZodDefault<z.ZodBoolean>;
634
- selectorPromptPath: z.ZodDefault<z.ZodNullable<z.ZodString>>;
635
- edge: z.ZodDefault<z.ZodObject<{
636
- hubDegree: z.ZodDefault<z.ZodNumber>;
637
- seedCount: z.ZodDefault<z.ZodNumber>;
638
- perSeed: z.ZodDefault<z.ZodNumber>;
639
- cap: z.ZodDefault<z.ZodNumber>;
640
- }, z.core.$strip>>;
641
- entity: z.ZodDefault<z.ZodObject<{
642
- enabled: z.ZodDefault<z.ZodBoolean>;
643
- idfFloor: z.ZodDefault<z.ZodNumber>;
644
- cap: z.ZodDefault<z.ZodNumber>;
645
- }, z.core.$strip>>;
646
- gate: z.ZodDefault<z.ZodObject<{
647
- enabled: z.ZodDefault<z.ZodBoolean>;
648
- denseThreshold: z.ZodDefault<z.ZodNumber>;
649
- sparseThreshold: z.ZodDefault<z.ZodNumber>;
650
- sparseOnlyThreshold: z.ZodDefault<z.ZodNumber>;
651
- denseClusterThreshold: z.ZodDefault<z.ZodNumber>;
652
- denseClusterMaxDelta: z.ZodDefault<z.ZodNumber>;
653
- topK: z.ZodDefault<z.ZodNumber>;
654
- bm25NormK: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
655
- bypassForCore: z.ZodDefault<z.ZodBoolean>;
656
- }, z.core.$strip>>;
657
- }, z.core.$strip>>;
658
- retrospective: z.ZodDefault<z.ZodObject<{
659
- timeThresholdMs: z.ZodDefault<z.ZodNumber>;
660
- messageThreshold: z.ZodDefault<z.ZodNumber>;
661
- minCooldownMs: z.ZodDefault<z.ZodNumber>;
662
- keepSupersededRuns: z.ZodDefault<z.ZodBoolean>;
663
- matchConversationProfile: z.ZodDefault<z.ZodBoolean>;
664
- }, z.core.$strip>>;
665
- }, z.core.$strip>>;
666
- monitoring: z.ZodDefault<z.ZodObject<{
667
- sampleIntervalMs: z.ZodDefault<z.ZodNumber>;
668
- ringBufferSize: z.ZodDefault<z.ZodNumber>;
669
- highMemThresholdRatio: z.ZodDefault<z.ZodNumber>;
670
- snapshotCooldownMs: z.ZodDefault<z.ZodNumber>;
671
- pluginSourceScanIntervalMs: z.ZodDefault<z.ZodNumber>;
672
- baselineSnapshotIntervalMs: z.ZodDefault<z.ZodNumber>;
673
- }, z.core.$strip>>;
674
- schedules: z.ZodDefault<z.ZodObject<{
675
- worker: z.ZodDefault<z.ZodObject<{
676
- enabled: z.ZodDefault<z.ZodBoolean>;
677
- }, z.core.$strip>>;
678
- }, z.core.$strip>>;
679
- migrations: z.ZodDefault<z.ZodObject<{
680
- worker: z.ZodDefault<z.ZodObject<{
681
- enabled: z.ZodDefault<z.ZodBoolean>;
682
- }, z.core.$strip>>;
683
- }, z.core.$strip>>;
684
- dataDir: z.ZodDefault<z.ZodString>;
685
- timeouts: z.ZodDefault<z.ZodObject<{
686
- shellMaxTimeoutSec: z.ZodDefault<z.ZodNumber>;
687
- shellDefaultTimeoutSec: z.ZodDefault<z.ZodNumber>;
688
- permissionTimeoutSec: z.ZodDefault<z.ZodNumber>;
689
- questionResponseTimeoutSec: z.ZodDefault<z.ZodNumber>;
690
- toolExecutionTimeoutSec: z.ZodDefault<z.ZodNumber>;
691
- providerStreamTimeoutSec: z.ZodDefault<z.ZodNumber>;
692
- backgroundTurnTimeoutSec: z.ZodDefault<z.ZodNumber>;
693
- scheduleTurnTimeoutSec: z.ZodDefault<z.ZodNumber>;
694
- }, z.core.$strip>>;
695
- rateLimit: z.ZodDefault<z.ZodObject<{
696
- maxRequestsPerMinute: z.ZodDefault<z.ZodNumber>;
697
- }, z.core.$strip>>;
698
- secretDetection: z.ZodDefault<z.ZodObject<{
699
- enabled: z.ZodDefault<z.ZodBoolean>;
700
- blockIngress: z.ZodDefault<z.ZodBoolean>;
701
- allowOneTimeSend: z.ZodDefault<z.ZodBoolean>;
702
- }, z.core.$strip>>;
703
- auditLog: z.ZodDefault<z.ZodObject<{
704
- retentionDays: z.ZodDefault<z.ZodNumber>;
705
- }, z.core.$strip>>;
706
- logFile: z.ZodDefault<z.ZodObject<{
707
- dir: z.ZodOptional<z.ZodString>;
708
- retentionDays: z.ZodDefault<z.ZodNumber>;
709
- }, z.core.$strip>>;
710
- llm: z.ZodDefault<z.ZodObject<{
711
- default: z.ZodDefault<z.ZodObject<{
712
- provider: z.ZodDefault<z.ZodEnum<{
713
- anthropic: "anthropic";
714
- openai: "openai";
715
- gemini: "gemini";
716
- fireworks: "fireworks";
717
- openrouter: "openrouter";
718
- ollama: "ollama";
719
- "vercel-ai-gateway": "vercel-ai-gateway";
720
- "openai-compatible": "openai-compatible";
721
- minimax: "minimax";
722
- atlascloud: "atlascloud";
723
- together: "together";
724
- }>>;
725
- provider_connection: z.ZodOptional<z.ZodString>;
726
- model: z.ZodDefault<z.ZodString>;
727
- maxTokens: z.ZodDefault<z.ZodNumber>;
728
- effort: z.ZodDefault<z.ZodEnum<{
729
- low: "low";
730
- medium: "medium";
731
- high: "high";
732
- none: "none";
733
- xhigh: "xhigh";
734
- max: "max";
735
- }>>;
736
- speed: z.ZodDefault<z.ZodEnum<{
737
- standard: "standard";
738
- fast: "fast";
739
- }>>;
740
- verbosity: z.ZodDefault<z.ZodEnum<{
741
- low: "low";
742
- medium: "medium";
743
- high: "high";
744
- }>>;
745
- temperature: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
746
- topP: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
747
- thinking: z.ZodDefault<z.ZodObject<{
748
- enabled: z.ZodDefault<z.ZodBoolean>;
749
- streamThinking: z.ZodDefault<z.ZodBoolean>;
750
- level: z.ZodOptional<z.ZodEnum<{
751
- low: "low";
752
- medium: "medium";
753
- high: "high";
754
- minimal: "minimal";
755
- }>>;
756
- }, z.core.$strip>>;
757
- contextWindow: z.ZodDefault<z.ZodObject<{
758
- enabled: z.ZodDefault<z.ZodBoolean>;
759
- maxInputTokens: z.ZodDefault<z.ZodNumber>;
760
- targetBudgetRatio: z.ZodDefault<z.ZodNumber>;
761
- compactThreshold: z.ZodDefault<z.ZodNumber>;
762
- summaryBudgetRatio: z.ZodDefault<z.ZodNumber>;
763
- overflowRecovery: z.ZodDefault<z.ZodObject<{
764
- enabled: z.ZodDefault<z.ZodBoolean>;
765
- safetyMarginRatio: z.ZodDefault<z.ZodNumber>;
766
- maxAttempts: z.ZodDefault<z.ZodNumber>;
767
- interactiveLatestTurnCompression: z.ZodDefault<z.ZodEnum<{
768
- truncate: "truncate";
769
- summarize: "summarize";
770
- drop: "drop";
771
- }>>;
772
- nonInteractiveLatestTurnCompression: z.ZodDefault<z.ZodEnum<{
773
- truncate: "truncate";
774
- summarize: "summarize";
775
- drop: "drop";
776
- }>>;
777
- }, z.core.$strip>>;
778
- }, z.core.$strip>>;
779
- openrouter: z.ZodDefault<z.ZodObject<{
780
- only: z.ZodDefault<z.ZodArray<z.ZodString>>;
781
- }, z.core.$strip>>;
782
- logitBias: z.ZodOptional<z.ZodEnum<{
783
- "suppress-cjk": "suppress-cjk";
784
- }>>;
785
- disableCache: z.ZodOptional<z.ZodBoolean>;
786
- }, z.core.$strip>>;
787
- profiles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
788
- provider: z.ZodOptional<z.ZodEnum<{
789
- anthropic: "anthropic";
790
- openai: "openai";
791
- gemini: "gemini";
792
- fireworks: "fireworks";
793
- openrouter: "openrouter";
794
- ollama: "ollama";
795
- "vercel-ai-gateway": "vercel-ai-gateway";
796
- "openai-compatible": "openai-compatible";
797
- minimax: "minimax";
798
- atlascloud: "atlascloud";
799
- together: "together";
800
- }>>;
801
- model: z.ZodOptional<z.ZodString>;
802
- maxTokens: z.ZodOptional<z.ZodNumber>;
803
- effort: z.ZodOptional<z.ZodEnum<{
804
- low: "low";
805
- medium: "medium";
806
- high: "high";
807
- none: "none";
808
- xhigh: "xhigh";
809
- max: "max";
810
- }>>;
811
- speed: z.ZodOptional<z.ZodEnum<{
812
- standard: "standard";
813
- fast: "fast";
814
- }>>;
815
- verbosity: z.ZodOptional<z.ZodEnum<{
816
- low: "low";
817
- medium: "medium";
818
- high: "high";
819
- }>>;
820
- temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
821
- topP: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
822
- thinking: z.ZodOptional<z.ZodObject<{
823
- enabled: z.ZodOptional<z.ZodBoolean>;
824
- streamThinking: z.ZodOptional<z.ZodBoolean>;
825
- level: z.ZodOptional<z.ZodEnum<{
826
- low: "low";
827
- medium: "medium";
828
- high: "high";
829
- minimal: "minimal";
830
- }>>;
831
- }, z.core.$strip>>;
832
- contextWindow: z.ZodOptional<z.ZodObject<{
833
- enabled: z.ZodOptional<z.ZodBoolean>;
834
- maxInputTokens: z.ZodOptional<z.ZodNumber>;
835
- targetBudgetRatio: z.ZodOptional<z.ZodNumber>;
836
- compactThreshold: z.ZodOptional<z.ZodNumber>;
837
- summaryBudgetRatio: z.ZodOptional<z.ZodNumber>;
838
- overflowRecovery: z.ZodOptional<z.ZodObject<{
839
- enabled: z.ZodOptional<z.ZodBoolean>;
840
- safetyMarginRatio: z.ZodOptional<z.ZodNumber>;
841
- maxAttempts: z.ZodOptional<z.ZodNumber>;
842
- interactiveLatestTurnCompression: z.ZodOptional<z.ZodEnum<{
843
- truncate: "truncate";
844
- summarize: "summarize";
845
- drop: "drop";
846
- }>>;
847
- nonInteractiveLatestTurnCompression: z.ZodOptional<z.ZodEnum<{
848
- truncate: "truncate";
849
- summarize: "summarize";
850
- drop: "drop";
851
- }>>;
852
- }, z.core.$strip>>;
853
- }, z.core.$strip>>;
854
- openrouter: z.ZodOptional<z.ZodObject<{
855
- only: z.ZodOptional<z.ZodArray<z.ZodString>>;
856
- }, z.core.$strip>>;
857
- logitBias: z.ZodOptional<z.ZodEnum<{
858
- "suppress-cjk": "suppress-cjk";
859
- }>>;
860
- disableCache: z.ZodOptional<z.ZodBoolean>;
861
- source: z.ZodOptional<z.ZodEnum<{
862
- managed: "managed";
863
- user: "user";
864
- }>>;
865
- label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
866
- description: z.ZodOptional<z.ZodString>;
867
- provider_connection: z.ZodOptional<z.ZodString>;
868
- status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
869
- active: "active";
870
- disabled: "disabled";
871
- }>>>;
872
- mix: z.ZodOptional<z.ZodArray<z.ZodObject<{
873
- profile: z.ZodString;
874
- weight: z.ZodNumber;
875
- }, z.core.$strip>>>;
876
- }, z.core.$strip>>>;
877
- profileOrder: z.ZodDefault<z.ZodArray<z.ZodString>>;
878
- callSites: z.ZodDefault<z.ZodRecord<z.ZodEnum<{
879
- mainAgent: "mainAgent";
880
- subagentSpawn: "subagentSpawn";
881
- heartbeatAgent: "heartbeatAgent";
882
- filingAgent: "filingAgent";
883
- compactionAgent: "compactionAgent";
884
- callAgent: "callAgent";
885
- memoryExtraction: "memoryExtraction";
886
- memoryConsolidation: "memoryConsolidation";
887
- memoryRetrieval: "memoryRetrieval";
888
- memoryV2Migration: "memoryV2Migration";
889
- memoryV2Sweep: "memoryV2Sweep";
890
- memoryRouter: "memoryRouter";
891
- memoryV3SelectL2: "memoryV3SelectL2";
892
- memoryV2Consolidation: "memoryV2Consolidation";
893
- memoryRetrospective: "memoryRetrospective";
894
- recall: "recall";
895
- narrativeRefinement: "narrativeRefinement";
896
- patternScan: "patternScan";
897
- conversationSummarization: "conversationSummarization";
898
- conversationStarters: "conversationStarters";
899
- replySuggestion: "replySuggestion";
900
- conversationTitle: "conversationTitle";
901
- commitMessage: "commitMessage";
902
- identityIntro: "identityIntro";
903
- emptyStateGreeting: "emptyStateGreeting";
904
- notificationDecision: "notificationDecision";
905
- preferenceExtraction: "preferenceExtraction";
906
- guardianQuestionCopy: "guardianQuestionCopy";
907
- approvalCopy: "approvalCopy";
908
- approvalConversation: "approvalConversation";
909
- interactionClassifier: "interactionClassifier";
910
- styleAnalyzer: "styleAnalyzer";
911
- inviteInstructionGenerator: "inviteInstructionGenerator";
912
- skillCategoryInference: "skillCategoryInference";
913
- inference: "inference";
914
- vision: "vision";
915
- trustRuleSuggestion: "trustRuleSuggestion";
916
- homeGreeting: "homeGreeting";
917
- homeSuggestedPrompts: "homeSuggestedPrompts";
918
- workflowLeaf: "workflowLeaf";
919
- }> & z.core.$partial, z.ZodObject<{
920
- provider: z.ZodOptional<z.ZodEnum<{
921
- anthropic: "anthropic";
922
- openai: "openai";
923
- gemini: "gemini";
924
- fireworks: "fireworks";
925
- openrouter: "openrouter";
926
- ollama: "ollama";
927
- "vercel-ai-gateway": "vercel-ai-gateway";
928
- "openai-compatible": "openai-compatible";
929
- minimax: "minimax";
930
- atlascloud: "atlascloud";
931
- together: "together";
932
- }>>;
933
- model: z.ZodOptional<z.ZodString>;
934
- maxTokens: z.ZodOptional<z.ZodNumber>;
935
- effort: z.ZodOptional<z.ZodEnum<{
936
- low: "low";
937
- medium: "medium";
938
- high: "high";
939
- none: "none";
940
- xhigh: "xhigh";
941
- max: "max";
942
- }>>;
943
- speed: z.ZodOptional<z.ZodEnum<{
944
- standard: "standard";
945
- fast: "fast";
946
- }>>;
947
- verbosity: z.ZodOptional<z.ZodEnum<{
948
- low: "low";
949
- medium: "medium";
950
- high: "high";
951
- }>>;
952
- temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
953
- topP: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
954
- thinking: z.ZodOptional<z.ZodObject<{
955
- enabled: z.ZodOptional<z.ZodBoolean>;
956
- streamThinking: z.ZodOptional<z.ZodBoolean>;
957
- level: z.ZodOptional<z.ZodEnum<{
958
- low: "low";
959
- medium: "medium";
960
- high: "high";
961
- minimal: "minimal";
962
- }>>;
963
- }, z.core.$strip>>;
964
- contextWindow: z.ZodOptional<z.ZodObject<{
965
- enabled: z.ZodOptional<z.ZodBoolean>;
966
- maxInputTokens: z.ZodOptional<z.ZodNumber>;
967
- targetBudgetRatio: z.ZodOptional<z.ZodNumber>;
968
- compactThreshold: z.ZodOptional<z.ZodNumber>;
969
- summaryBudgetRatio: z.ZodOptional<z.ZodNumber>;
970
- overflowRecovery: z.ZodOptional<z.ZodObject<{
971
- enabled: z.ZodOptional<z.ZodBoolean>;
972
- safetyMarginRatio: z.ZodOptional<z.ZodNumber>;
973
- maxAttempts: z.ZodOptional<z.ZodNumber>;
974
- interactiveLatestTurnCompression: z.ZodOptional<z.ZodEnum<{
975
- truncate: "truncate";
976
- summarize: "summarize";
977
- drop: "drop";
978
- }>>;
979
- nonInteractiveLatestTurnCompression: z.ZodOptional<z.ZodEnum<{
980
- truncate: "truncate";
981
- summarize: "summarize";
982
- drop: "drop";
983
- }>>;
984
- }, z.core.$strip>>;
985
- }, z.core.$strip>>;
986
- openrouter: z.ZodOptional<z.ZodObject<{
987
- only: z.ZodOptional<z.ZodArray<z.ZodString>>;
988
- }, z.core.$strip>>;
989
- logitBias: z.ZodOptional<z.ZodEnum<{
990
- "suppress-cjk": "suppress-cjk";
991
- }>>;
992
- disableCache: z.ZodOptional<z.ZodBoolean>;
993
- profile: z.ZodOptional<z.ZodString>;
994
- }, z.core.$strip>>>;
995
- activeProfile: z.ZodOptional<z.ZodString>;
996
- advisorProfile: z.ZodOptional<z.ZodString>;
997
- defaultProvider: z.ZodCatch<z.ZodOptional<z.ZodObject<{
998
- provider: z.ZodEnum<{
999
- anthropic: "anthropic";
1000
- openai: "openai";
1001
- gemini: "gemini";
1002
- fireworks: "fireworks";
1003
- openrouter: "openrouter";
1004
- vellum: "vellum";
1005
- }>;
1006
- connectionName: z.ZodOptional<z.ZodString>;
1007
- }, z.core.$strip>>>;
1008
- profileSession: z.ZodDefault<z.ZodObject<{
1009
- defaultTtlSeconds: z.ZodDefault<z.ZodNumber>;
1010
- maxTtlSeconds: z.ZodDefault<z.ZodNumber>;
1011
- }, z.core.$strip>>;
1012
- pricingOverrides: z.ZodDefault<z.ZodArray<z.ZodObject<{
1013
- provider: z.ZodString;
1014
- modelPattern: z.ZodString;
1015
- inputPer1M: z.ZodNumber;
1016
- outputPer1M: z.ZodNumber;
1017
- }, z.core.$strip>>>;
1018
- }, z.core.$strip>>;
1019
- llmRequestLogs: z.ZodDefault<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1020
- enabled: z.ZodDefault<z.ZodBoolean>;
1021
- readSource: z.ZodLiteral<"local">;
1022
- }, z.core.$strip>, z.ZodObject<{
1023
- enabled: z.ZodDefault<z.ZodBoolean>;
1024
- readSource: z.ZodLiteral<"clickhouse">;
1025
- clickhouse: z.ZodDefault<z.ZodObject<{
1026
- database: z.ZodDefault<z.ZodString>;
1027
- table: z.ZodDefault<z.ZodString>;
1028
- user: z.ZodDefault<z.ZodString>;
1029
- }, z.core.$strip>>;
1030
- }, z.core.$strip>], "readSource">>>;
1031
- filing: z.ZodDefault<z.ZodObject<{
1032
- enabled: z.ZodDefault<z.ZodBoolean>;
1033
- intervalMs: z.ZodDefault<z.ZodNumber>;
1034
- compactionEnabled: z.ZodDefault<z.ZodBoolean>;
1035
- compactionIntervalMs: z.ZodDefault<z.ZodNumber>;
1036
- activeHoursStart: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1037
- activeHoursEnd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1038
- }, z.core.$strip>>;
1039
- heartbeat: z.ZodDefault<z.ZodObject<{
1040
- enabled: z.ZodDefault<z.ZodBoolean>;
1041
- intervalMs: z.ZodDefault<z.ZodNumber>;
1042
- cronExpression: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1043
- timezone: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1044
- activeHoursStart: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1045
- activeHoursEnd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1046
- maxConsecutiveRuns: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1047
- maxDailyRuns: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1048
- disposition: z.ZodDefault<z.ZodString>;
1049
- }, z.core.$strip>>;
1050
- hostBrowser: z.ZodDefault<z.ZodObject<{
1051
- cdpInspect: z.ZodDefault<z.ZodObject<{
1052
- enabled: z.ZodDefault<z.ZodBoolean>;
1053
- host: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1054
- port: z.ZodDefault<z.ZodNumber>;
1055
- probeTimeoutMs: z.ZodDefault<z.ZodNumber>;
1056
- desktopAuto: z.ZodDefault<z.ZodObject<{
1057
- enabled: z.ZodDefault<z.ZodBoolean>;
1058
- cooldownMs: z.ZodDefault<z.ZodNumber>;
1059
- }, z.core.$strip>>;
1060
- }, z.core.$strip>>;
1061
- }, z.core.$strip>>;
1062
- conversations: z.ZodDefault<z.ZodObject<{
1063
- skipAutoRetitling: z.ZodDefault<z.ZodBoolean>;
1064
- backgroundInjection: z.ZodDefault<z.ZodString>;
1065
- resumeProcessingOnStartup: z.ZodDefault<z.ZodBoolean>;
1066
- }, z.core.$strip>>;
1067
- journal: z.ZodDefault<z.ZodObject<{
1068
- contextWindowSize: z.ZodDefault<z.ZodNumber>;
1069
- }, z.core.$strip>>;
1070
- backup: z.ZodDefault<z.ZodObject<{
1071
- enabled: z.ZodDefault<z.ZodBoolean>;
1072
- intervalHours: z.ZodDefault<z.ZodNumber>;
1073
- retention: z.ZodDefault<z.ZodNumber>;
1074
- offsite: z.ZodDefault<z.ZodObject<{
1075
- enabled: z.ZodDefault<z.ZodBoolean>;
1076
- destinations: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodObject<{
1077
- path: z.ZodString;
1078
- encrypt: z.ZodDefault<z.ZodBoolean>;
1079
- }, z.core.$strip>>>>;
1080
- }, z.core.$strip>>;
1081
- localDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1082
- }, z.core.$strip>>;
1083
- mcp: z.ZodDefault<z.ZodObject<{
1084
- servers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1085
- transport: z.ZodDiscriminatedUnion<[z.ZodObject<{
1086
- type: z.ZodLiteral<"stdio">;
1087
- command: z.ZodString;
1088
- args: z.ZodDefault<z.ZodArray<z.ZodString>>;
1089
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1090
- }, z.core.$strip>, z.ZodObject<{
1091
- type: z.ZodLiteral<"sse">;
1092
- url: z.ZodString;
1093
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1094
- }, z.core.$strip>, z.ZodObject<{
1095
- type: z.ZodLiteral<"streamable-http">;
1096
- url: z.ZodString;
1097
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1098
- }, z.core.$strip>], "type">;
1099
- enabled: z.ZodDefault<z.ZodBoolean>;
1100
- defaultRiskLevel: z.ZodDefault<z.ZodEnum<{
1101
- low: "low";
1102
- medium: "medium";
1103
- high: "high";
1104
- }>>;
1105
- maxTools: z.ZodDefault<z.ZodNumber>;
1106
- allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1107
- blockedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1108
- }, z.core.$strip>>>;
1109
- globalMaxTools: z.ZodDefault<z.ZodNumber>;
1110
- }, z.core.$strip>>;
1111
- acp: z.ZodDefault<z.ZodObject<{
1112
- maxConcurrentSessions: z.ZodDefault<z.ZodNumber>;
1113
- agents: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1114
- command: z.ZodString;
1115
- args: z.ZodDefault<z.ZodArray<z.ZodString>>;
1116
- description: z.ZodOptional<z.ZodString>;
1117
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1118
- }, z.core.$strip>>>;
1119
- }, z.core.$strip>>;
1120
- skills: z.ZodDefault<z.ZodObject<{
1121
- entries: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1122
- enabled: z.ZodDefault<z.ZodBoolean>;
1123
- apiKey: z.ZodOptional<z.ZodString>;
1124
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1125
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1126
- }, z.core.$strip>>>;
1127
- load: z.ZodDefault<z.ZodObject<{
1128
- extraDirs: z.ZodDefault<z.ZodArray<z.ZodString>>;
1129
- watch: z.ZodDefault<z.ZodBoolean>;
1130
- watchDebounceMs: z.ZodDefault<z.ZodNumber>;
1131
- }, z.core.$strip>>;
1132
- install: z.ZodDefault<z.ZodObject<{
1133
- nodeManager: z.ZodDefault<z.ZodEnum<{
1134
- npm: "npm";
1135
- pnpm: "pnpm";
1136
- yarn: "yarn";
1137
- bun: "bun";
1138
- }>>;
1139
- }, z.core.$strip>>;
1140
- allowBundled: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1141
- remoteProviders: z.ZodDefault<z.ZodObject<{
1142
- skillssh: z.ZodDefault<z.ZodObject<{
1143
- enabled: z.ZodDefault<z.ZodBoolean>;
1144
- }, z.core.$strip>>;
1145
- clawhub: z.ZodDefault<z.ZodObject<{
1146
- enabled: z.ZodDefault<z.ZodBoolean>;
1147
- }, z.core.$strip>>;
1148
- }, z.core.$strip>>;
1149
- remotePolicy: z.ZodDefault<z.ZodObject<{
1150
- blockSuspicious: z.ZodDefault<z.ZodBoolean>;
1151
- blockMalware: z.ZodDefault<z.ZodBoolean>;
1152
- maxSkillsShRisk: z.ZodDefault<z.ZodEnum<{
1153
- low: "low";
1154
- medium: "medium";
1155
- high: "high";
1156
- safe: "safe";
1157
- critical: "critical";
1158
- }>>;
1159
- }, z.core.$strip>>;
1160
- }, z.core.$strip>>;
1161
- workspaceGit: z.ZodDefault<z.ZodObject<{
1162
- turnCommitMaxWaitMs: z.ZodDefault<z.ZodNumber>;
1163
- failureBackoffBaseMs: z.ZodDefault<z.ZodNumber>;
1164
- failureBackoffMaxMs: z.ZodDefault<z.ZodNumber>;
1165
- interactiveGitTimeoutMs: z.ZodDefault<z.ZodNumber>;
1166
- enrichmentQueueSize: z.ZodDefault<z.ZodNumber>;
1167
- enrichmentConcurrency: z.ZodDefault<z.ZodNumber>;
1168
- enrichmentJobTimeoutMs: z.ZodDefault<z.ZodNumber>;
1169
- enrichmentMaxRetries: z.ZodDefault<z.ZodNumber>;
1170
- commitMessageLLM: z.ZodDefault<z.ZodObject<{
1171
- enabled: z.ZodDefault<z.ZodBoolean>;
1172
- timeoutMs: z.ZodDefault<z.ZodNumber>;
1173
- maxFilesInPrompt: z.ZodDefault<z.ZodNumber>;
1174
- maxDiffBytes: z.ZodDefault<z.ZodNumber>;
1175
- minRemainingTurnBudgetMs: z.ZodDefault<z.ZodNumber>;
1176
- breaker: z.ZodDefault<z.ZodObject<{
1177
- openAfterFailures: z.ZodDefault<z.ZodNumber>;
1178
- backoffBaseMs: z.ZodDefault<z.ZodNumber>;
1179
- backoffMaxMs: z.ZodDefault<z.ZodNumber>;
1180
- }, z.core.$strip>>;
1181
- }, z.core.$strip>>;
1182
- }, z.core.$strip>>;
1183
- compaction: z.ZodDefault<z.ZodObject<{
1184
- enabled: z.ZodDefault<z.ZodBoolean>;
1185
- autoThreshold: z.ZodDefault<z.ZodNumber>;
1186
- prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1187
- }, z.core.$strip>>;
1188
- compactionLogs: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
1189
- destination: z.ZodLiteral<"none">;
1190
- }, z.core.$strip>, z.ZodObject<{
1191
- destination: z.ZodLiteral<"clickhouse">;
1192
- clickhouse: z.ZodDefault<z.ZodObject<{
1193
- database: z.ZodDefault<z.ZodString>;
1194
- table: z.ZodDefault<z.ZodString>;
1195
- user: z.ZodDefault<z.ZodString>;
1196
- }, z.core.$strip>>;
1197
- }, z.core.$strip>], "destination">>;
1198
- twilio: z.ZodDefault<z.ZodObject<{
1199
- accountSid: z.ZodDefault<z.ZodString>;
1200
- phoneNumber: z.ZodDefault<z.ZodString>;
1201
- setupStarted: z.ZodDefault<z.ZodBoolean>;
1202
- }, z.core.$strip>>;
1203
- calls: z.ZodDefault<z.ZodObject<{
1204
- enabled: z.ZodDefault<z.ZodBoolean>;
1205
- provider: z.ZodDefault<z.ZodEnum<{
1206
- twilio: "twilio";
1207
- }>>;
1208
- maxDurationSeconds: z.ZodDefault<z.ZodNumber>;
1209
- userConsultTimeoutSeconds: z.ZodDefault<z.ZodNumber>;
1210
- ttsPlaybackDelayMs: z.ZodDefault<z.ZodNumber>;
1211
- accessRequestPollIntervalMs: z.ZodDefault<z.ZodNumber>;
1212
- guardianWaitUpdateInitialIntervalMs: z.ZodDefault<z.ZodNumber>;
1213
- guardianWaitUpdateInitialWindowMs: z.ZodDefault<z.ZodNumber>;
1214
- guardianWaitUpdateSteadyMinIntervalMs: z.ZodDefault<z.ZodNumber>;
1215
- guardianWaitUpdateSteadyMaxIntervalMs: z.ZodDefault<z.ZodNumber>;
1216
- disclosure: z.ZodDefault<z.ZodObject<{
1217
- enabled: z.ZodDefault<z.ZodBoolean>;
1218
- text: z.ZodDefault<z.ZodString>;
1219
- }, z.core.$strip>>;
1220
- safety: z.ZodDefault<z.ZodObject<{
1221
- denyCategories: z.ZodDefault<z.ZodArray<z.ZodString>>;
1222
- }, z.core.$strip>>;
1223
- voice: z.ZodDefault<z.ZodObject<{
1224
- language: z.ZodDefault<z.ZodString>;
1225
- interruptSensitivity: z.ZodDefault<z.ZodEnum<{
1226
- low: "low";
1227
- medium: "medium";
1228
- high: "high";
1229
- }>>;
1230
- telephonyStreaming: z.ZodDefault<z.ZodBoolean>;
1231
- utteranceEndMs: z.ZodDefault<z.ZodNumber>;
1232
- }, z.core.$strip>>;
1233
- callerIdentity: z.ZodDefault<z.ZodObject<{
1234
- allowPerCallOverride: z.ZodDefault<z.ZodBoolean>;
1235
- userNumber: z.ZodOptional<z.ZodString>;
1236
- }, z.core.$strip>>;
1237
- verification: z.ZodDefault<z.ZodObject<{
1238
- enabled: z.ZodDefault<z.ZodBoolean>;
1239
- maxAttempts: z.ZodDefault<z.ZodNumber>;
1240
- codeLength: z.ZodDefault<z.ZodNumber>;
1241
- }, z.core.$strip>>;
1242
- }, z.core.$strip>>;
1243
- liveVoice: z.ZodDefault<z.ZodObject<{
1244
- mode: z.ZodDefault<z.ZodEnum<{
1245
- ptt: "ptt";
1246
- "open-mic": "open-mic";
1247
- }>>;
1248
- vad: z.ZodDefault<z.ZodObject<{
1249
- speechEnergyThreshold: z.ZodDefault<z.ZodNumber>;
1250
- silenceThresholdMs: z.ZodDefault<z.ZodNumber>;
1251
- maxTurnDurationMs: z.ZodDefault<z.ZodNumber>;
1252
- bargeInMinSpeechMs: z.ZodDefault<z.ZodNumber>;
1253
- }, z.core.$strip>>;
1254
- maxSessionDurationSeconds: z.ZodDefault<z.ZodNumber>;
1255
- }, z.core.$strip>>;
1256
- whatsapp: z.ZodDefault<z.ZodObject<{
1257
- phoneNumber: z.ZodDefault<z.ZodString>;
1258
- deliverAuthBypass: z.ZodDefault<z.ZodBoolean>;
1259
- timeoutMs: z.ZodDefault<z.ZodNumber>;
1260
- maxRetries: z.ZodDefault<z.ZodNumber>;
1261
- initialBackoffMs: z.ZodDefault<z.ZodNumber>;
1262
- }, z.core.$strip>>;
1263
- telegram: z.ZodDefault<z.ZodObject<{
1264
- botId: z.ZodDefault<z.ZodString>;
1265
- botUsername: z.ZodDefault<z.ZodString>;
1266
- apiBaseUrl: z.ZodDefault<z.ZodString>;
1267
- deliverAuthBypass: z.ZodDefault<z.ZodBoolean>;
1268
- timeoutMs: z.ZodDefault<z.ZodNumber>;
1269
- maxRetries: z.ZodDefault<z.ZodNumber>;
1270
- initialBackoffMs: z.ZodDefault<z.ZodNumber>;
1271
- }, z.core.$strip>>;
1272
- slack: z.ZodDefault<z.ZodObject<{
1273
- deliverAuthBypass: z.ZodDefault<z.ZodBoolean>;
1274
- teamId: z.ZodDefault<z.ZodString>;
1275
- teamName: z.ZodDefault<z.ZodString>;
1276
- teamUrl: z.ZodDefault<z.ZodString>;
1277
- botUserId: z.ZodDefault<z.ZodString>;
1278
- botUsername: z.ZodDefault<z.ZodString>;
1279
- threadMode: z.ZodDefault<z.ZodEnum<{
1280
- mention_only: "mention_only";
1281
- mention_then_thread: "mention_then_thread";
1282
- }>>;
1283
- }, z.core.$strip>>;
1284
- a2a: z.ZodDefault<z.ZodObject<{
1285
- enabled: z.ZodDefault<z.ZodBoolean>;
1286
- }, z.core.$strip>>;
1287
- ingress: z.ZodPipe<z.ZodDefault<z.ZodObject<{
1288
- enabled: z.ZodOptional<z.ZodBoolean>;
1289
- publicBaseUrl: z.ZodDefault<z.ZodString>;
1290
- webhook: z.ZodDefault<z.ZodObject<{
1291
- secret: z.ZodDefault<z.ZodString>;
1292
- timeoutMs: z.ZodDefault<z.ZodNumber>;
1293
- maxRetries: z.ZodDefault<z.ZodNumber>;
1294
- initialBackoffMs: z.ZodDefault<z.ZodNumber>;
1295
- maxPayloadBytes: z.ZodDefault<z.ZodNumber>;
1296
- }, z.core.$strip>>;
1297
- rateLimit: z.ZodDefault<z.ZodObject<{
1298
- maxRequestsPerMinute: z.ZodDefault<z.ZodNumber>;
1299
- maxRequestsPerHour: z.ZodDefault<z.ZodNumber>;
1300
- }, z.core.$strip>>;
1301
- shutdownDrainMs: z.ZodDefault<z.ZodNumber>;
1302
- }, z.core.$strip>>, z.ZodTransform<{
1303
- enabled: boolean | undefined;
1304
- publicBaseUrl: string;
1305
- webhook: {
1306
- secret: string;
1307
- timeoutMs: number;
1308
- maxRetries: number;
1309
- initialBackoffMs: number;
1310
- maxPayloadBytes: number;
1311
- };
1312
- rateLimit: {
1313
- maxRequestsPerMinute: number;
1314
- maxRequestsPerHour: number;
1315
- };
1316
- shutdownDrainMs: number;
1317
- }, {
1318
- publicBaseUrl: string;
1319
- webhook: {
1320
- secret: string;
1321
- timeoutMs: number;
1322
- maxRetries: number;
1323
- initialBackoffMs: number;
1324
- maxPayloadBytes: number;
1325
- };
1326
- rateLimit: {
1327
- maxRequestsPerMinute: number;
1328
- maxRequestsPerHour: number;
1329
- };
1330
- shutdownDrainMs: number;
1331
- enabled?: boolean | undefined;
1332
- }>>;
1333
- platform: z.ZodDefault<z.ZodObject<{
1334
- baseUrl: z.ZodDefault<z.ZodString>;
1335
- subdomain: z.ZodDefault<z.ZodString>;
1336
- }, z.core.$strip>>;
1337
- daemon: z.ZodDefault<z.ZodObject<{
1338
- startupSocketWaitMs: z.ZodDefault<z.ZodNumber>;
1339
- stopTimeoutMs: z.ZodDefault<z.ZodNumber>;
1340
- sigkillGracePeriodMs: z.ZodDefault<z.ZodNumber>;
1341
- standaloneRecording: z.ZodDefault<z.ZodBoolean>;
1342
- }, z.core.$strip>>;
1343
- notifications: z.ZodDefault<z.ZodObject<{}, z.core.$strip>>;
1344
- ui: z.ZodDefault<z.ZodObject<{
1345
- userTimezone: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1346
- detectedTimezone: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1347
- emptyStateGreetingCacheTtlMs: z.ZodDefault<z.ZodNumber>;
1348
- }, z.core.$strip>>;
1349
- tools: z.ZodDefault<z.ZodObject<{
1350
- exclude: z.ZodDefault<z.ZodArray<z.ZodString>>;
1351
- }, z.core.$strip>>;
1352
- workflows: z.ZodDefault<z.ZodObject<{
1353
- maxAgentsPerRun: z.ZodDefault<z.ZodNumber>;
1354
- maxConcurrentLeaves: z.ZodDefault<z.ZodNumber>;
1355
- maxConcurrentRuns: z.ZodDefault<z.ZodNumber>;
1356
- journalRetentionDays: z.ZodDefault<z.ZodNumber>;
1357
- }, z.core.$strip>>;
1358
- plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1359
- legacyTelemetryOptOut: z.ZodOptional<z.ZodBoolean>;
1360
- legacyDiagnosticsOptOut: z.ZodOptional<z.ZodBoolean>;
1361
- maxStepsPerSession: z.ZodDefault<z.ZodNumber>;
1362
- }, z.core.$strip>;
1363
-
1364
254
  /** Daemon-side specialization of the generic event envelope. */
1365
255
  export declare type AssistantEvent = BaseAssistantEvent<ServerMessage>;
1366
256
 
@@ -1584,12 +474,6 @@ declare const AssistantTurnStartEventSchema: z.ZodObject<{
1584
474
  conversationId: z.ZodOptional<z.ZodString>;
1585
475
  }, z.core.$strip>;
1586
476
 
1587
- declare interface AudioEmbeddingInput {
1588
- type: "audio";
1589
- data: Buffer;
1590
- mimeType: string;
1591
- }
1592
-
1593
477
  declare interface AuthResult {
1594
478
  type: "auth_result";
1595
479
  success: boolean;
@@ -1624,33 +508,6 @@ declare interface BackgroundToolStarted {
1624
508
  startedAt: number;
1625
509
  }
1626
510
 
1627
- /**
1628
- * Media payload for an image or file content block. One unified type covers
1629
- * both blocks and both storage forms:
1630
- *
1631
- * - `base64` — the bytes travel inline with the block. This is the runtime
1632
- * shape the provider transforms consume and the shape produced for a live
1633
- * (in-flight) turn.
1634
- * - `workspace_ref` — the bytes live somewhere in the workspace, not inline.
1635
- * This is the shape PERSISTED into `messages.content`, keeping large blobs
1636
- * out of the DB row and the lexical index. It is resolved back to inline
1637
- * bytes at the provider send boundary (`providers/media-resolve.ts`); any
1638
- * consumer that needs the raw bytes from stored content resolves it with
1639
- * `resolveMediaSourceData(source)`.
1640
- *
1641
- * `filename` is optional on both arms (present for file blocks and for
1642
- * generated-media references). For references, `sizeBytes` (and, for images,
1643
- * `width`/`height`) are captured at persist time so size-only consumers — the
1644
- * per-turn token estimator especially — can cost the block without reading the
1645
- * file back off disk.
1646
- */
1647
- declare interface Base64MediaSource {
1648
- type: "base64";
1649
- media_type: string;
1650
- data: string;
1651
- filename?: string;
1652
- }
1653
-
1654
511
  /**
1655
512
  * A single assistant event wrapping an outbound message payload.
1656
513
  *
@@ -1748,13 +605,6 @@ declare interface BookmarkSummary {
1748
605
  createdAt: number;
1749
606
  }
1750
607
 
1751
- /**
1752
- * Build a model-facing excerpt of stored message content around a query,
1753
- * preserving external-content envelopes so third-party boundaries stay
1754
- * visible.
1755
- */
1756
- export declare function buildMessageExcerpt(rawContent: string, query: string): Promise<string>;
1757
-
1758
608
  declare interface BundleAppResponse {
1759
609
  type: "bundle_app_response";
1760
610
  bundlePath: string;
@@ -1909,32 +759,6 @@ declare interface ClawhubSlimSkill extends SlimSkillBase {
1909
759
  version: string;
1910
760
  }
1911
761
 
1912
- export declare const CLI_COMMAND_HELP: readonly CliCommandHelp[];
1913
-
1914
- /**
1915
- * Fully declarative description of a top-level `assistant` CLI command and its
1916
- * subcommands. Plain data by design — no action handlers — so plugins (e.g. the
1917
- * memory capability indexer) can import a command's help and iterate over it
1918
- * without dragging in the CLI's daemon/IPC action graph. Command modules apply
1919
- * the same data via {@link applyCommandHelp}, then attach their handlers.
1920
- */
1921
- declare interface CliCommandHelp {
1922
- name: string;
1923
- /**
1924
- * Positional-argument spec appended to the name at registration, e.g.
1925
- * `"<command>"`. Use {@link commandSpec} to build the Commander registration
1926
- * string; `name` stays the bare command name so consumers (dedup, slugs,
1927
- * rendering) never parse argument syntax out of it.
1928
- */
1929
- args?: string;
1930
- description: string;
1931
- /** Options declared directly on the top-level command. */
1932
- options?: CliOptionHelp[];
1933
- /** Extra help appended after the option list (`addHelpText("after", …)`). */
1934
- helpText?: string;
1935
- subcommands?: CliSubcommandHelp[];
1936
- }
1937
-
1938
762
  declare interface ClientEntry extends BaseSubscriberEntry {
1939
763
  type: "client";
1940
764
  clientId: string;
@@ -1962,30 +786,6 @@ declare interface ClientSettingsUpdate {
1962
786
  value: string;
1963
787
  }
1964
788
 
1965
- declare interface CliOptionHelp {
1966
- /** Commander flag spec, e.g. `"--path <file>"` or `"-l, --limit <n>"`. */
1967
- flags: string;
1968
- description: string;
1969
- /** When true, applied via `requiredOption` (missing → error) rather than `option`. */
1970
- required?: boolean;
1971
- /** Default value passed to `option(flags, description, defaultValue)`. */
1972
- defaultValue?: string;
1973
- /** Allowed values, applied via Commander's `Option.choices()` (invalid → error). */
1974
- choices?: readonly string[];
1975
- }
1976
-
1977
- declare interface CliSubcommandHelp {
1978
- name: string;
1979
- /** Positional-argument spec, e.g. `"<path>"` — see {@link CliCommandHelp.args}. */
1980
- args?: string;
1981
- description: string;
1982
- options?: CliOptionHelp[];
1983
- /** Extra help appended after the option list (`addHelpText("after", …)`). */
1984
- helpText?: string;
1985
- /** Nested subcommand groups (e.g. `avatar character update`). */
1986
- subcommands?: CliSubcommandHelp[];
1987
- }
1988
-
1989
789
  declare type CompactionCircuitClosedEvent = z.infer<typeof CompactionCircuitClosedEventSchema>;
1990
790
 
1991
791
  declare const CompactionCircuitClosedEventSchema: z.ZodObject<{
@@ -2211,9 +1011,6 @@ declare interface ContextCompacted {
2211
1011
  summaryHadMemoryEcho?: boolean;
2212
1012
  }
2213
1013
 
2214
- /** How a conversation was created / its execution mode. */
2215
- declare type ConversationCreateType = "standard" | "background" | "scheduled";
2216
-
2217
1014
  /**
2218
1015
  * The full `conversation-deleted` context a hook receives — the dispatching
2219
1016
  * call site's {@link ConversationDeletedInputContext} plus the
@@ -2313,8 +1110,8 @@ declare type ConversationListInvalidatedEvent = z.infer<typeof ConversationListI
2313
1110
  declare const ConversationListInvalidatedEventSchema: z.ZodObject<{
2314
1111
  type: z.ZodLiteral<"conversation_list_invalidated">;
2315
1112
  reason: z.ZodEnum<{
2316
- created: "created";
2317
1113
  deleted: "deleted";
1114
+ created: "created";
2318
1115
  renamed: "renamed";
2319
1116
  reordered: "reordered";
2320
1117
  seen_changed: "seen_changed";
@@ -2381,40 +1178,6 @@ declare const ConversationNoticeEventSchema: z.ZodObject<{
2381
1178
  errorCategory: z.ZodOptional<z.ZodString>;
2382
1179
  }, z.core.$strip>;
2383
1180
 
2384
- export declare interface ConversationRow {
2385
- id: string;
2386
- title: string | null;
2387
- createdAt: number;
2388
- updatedAt: number;
2389
- totalInputTokens: number;
2390
- totalOutputTokens: number;
2391
- totalEstimatedCost: number;
2392
- contextSummary: string | null;
2393
- contextCompactedMessageCount: number;
2394
- contextCompactedAt: number | null;
2395
- historyStrippedAt: number | null;
2396
- slackContextCompactionWatermarkTs: string | null;
2397
- slackContextCompactionWatermarkAt: number | null;
2398
- conversationType: string;
2399
- source: string;
2400
- originChannel: string | null;
2401
- originInterface: string | null;
2402
- forkParentConversationId: string | null;
2403
- forkParentMessageId: string | null;
2404
- isAutoTitle: number;
2405
- scheduleJobId: string | null;
2406
- lastMessageAt: number | null;
2407
- archivedAt: number | null;
2408
- surfacedAt: number | null;
2409
- inferenceProfile: string | null;
2410
- /** Parsed plugin-id list scoping this chat; null = default (all globally-enabled). */
2411
- enabledPlugins: string[] | null;
2412
- inferenceProfileSessionId: string | null;
2413
- inferenceProfileExpiresAt: number | null;
2414
- lastNotifiedInferenceProfile: string | null;
2415
- processingStartedAt: number | null;
2416
- }
2417
-
2418
1181
  declare interface ConversationsClearResponse {
2419
1182
  type: "conversations_clear_response";
2420
1183
  cleared: number;
@@ -2453,9 +1216,6 @@ declare const ConversationTitleUpdatedEventSchema: z.ZodObject<{
2453
1216
 
2454
1217
  declare type ConversationType = "standard" | "background" | "scheduled";
2455
1218
 
2456
- /** Read-side alias of {@link ConversationCreateType}. */
2457
- declare type ConversationType_2 = ConversationCreateType;
2458
-
2459
1219
  declare interface CopyBlockSurfaceData {
2460
1220
  text: string;
2461
1221
  label?: string;
@@ -2466,15 +1226,6 @@ declare interface CustomSlimSkill extends SlimSkillBase {
2466
1226
  origin: "custom";
2467
1227
  }
2468
1228
 
2469
- /**
2470
- * Delete a conversation, yielding the event loop between row batches, and
2471
- * enqueue vector-store cleanup for the memory segments and summaries the
2472
- * delete cascaded away — the same vector-cleanup pairing the host's delete
2473
- * route performs, so facade callers never leave semantic vectors behind. The lexical-index
2474
- * purge runs inside the delete itself via the persistence hook.
2475
- */
2476
- export declare function deleteConversation(id: string): Promise<void>;
2477
-
2478
1229
  declare type _DiagnosticsServerMessages = EnvVarsResponse | DictationResponse;
2479
1230
 
2480
1231
  declare interface DictationResponse {
@@ -2502,9 +1253,9 @@ declare const DiskPressureStatusChangedEventSchema: z.ZodObject<{
2502
1253
  state: z.ZodEnum<{
2503
1254
  unknown: "unknown";
2504
1255
  disabled: "disabled";
2505
- critical: "critical";
2506
1256
  ok: "ok";
2507
1257
  warning: "warning";
1258
+ critical: "critical";
2508
1259
  }>;
2509
1260
  locked: z.ZodBoolean;
2510
1261
  acknowledged: z.ZodBoolean;
@@ -2670,33 +1421,13 @@ declare interface DynamicPageSurfaceData {
2670
1421
  preview?: DynamicPagePreview;
2671
1422
  }
2672
1423
 
2673
- /** Embed a target and upsert its vector into the vector store. */
2674
- export declare function embedAndUpsert(targetType: EmbeddingTargetType, targetId: string, input: EmbeddingInput, extraPayload?: Record<string, unknown>): Promise<void>;
2675
-
2676
- declare function embedAndUpsert_2(config: AssistantConfig, targetType: "segment" | "item" | "summary" | "media" | "graph_node" | "pkb_file", targetId: string, input: EmbeddingInput, extraPayload?: Record<string, unknown>): Promise<void>;
2677
-
2678
- /** Accepts raw strings as shorthand for text inputs. */
2679
- declare type EmbeddingInput = string | MultimodalEmbeddingInput;
2680
-
2681
- /**
2682
- * Plugin-facing facade over the embeddings subsystem: self-contained
2683
- * operations that resolve the live workspace config internally, so callers
2684
- * (plugins importing via `@vellumai/plugin-api`) hold no host config.
2685
- *
2686
- * The operations are loaded via dynamic `import()` inside each wrapper so
2687
- * that importing this module — which every `@vellumai/plugin-api` consumer
2688
- * does transitively — does not eagerly pull the embed/vector import graph
2689
- * (`job-utils`, `embedding-backend`). An eager pull would force those
2690
- * modules' named exports to resolve at instantiation, which breaks the
2691
- * intentional partial module mocks in tests.
2692
- */
2693
- declare type EmbeddingTargetType = Parameters<embedAndUpsert_2>[1];
2694
-
2695
1424
  declare interface EnvVarsResponse {
2696
1425
  type: "env_vars_response";
2697
1426
  vars: Record<string, string>;
2698
1427
  }
2699
1428
 
1429
+ declare type ErrorCategory = "permission_denied" | "auth" | "tool_failure" | "unexpected";
1430
+
2700
1431
  declare type ErrorEvent_2 = z.infer<typeof ErrorEventSchema>;
2701
1432
 
2702
1433
  declare const ErrorEventSchema: z.ZodObject<{
@@ -2709,19 +1440,74 @@ declare const ErrorEventSchema: z.ZodObject<{
2709
1440
  conversationId: z.ZodOptional<z.ZodString>;
2710
1441
  }, z.core.$strip>;
2711
1442
 
2712
- export declare function extractTextFromStoredMessageContent(raw: string | ContentBlock[]): string;
1443
+ /**
1444
+ * Tool-related type declarations: the neutral leaf module describing
1445
+ * tools, permission risk, and tool execution results.
1446
+ *
1447
+ * Pure type-level declarations only (+ the `RiskLevel` enum, which is a
1448
+ * value). No runtime helpers live here — the assistant keeps all behavior
1449
+ * functions in `assistant/src/tools/` and re-exports the types from this
1450
+ * file. This module imports nothing, so it can sit at the bottom of the
1451
+ * import graph and be consumed by `tools/types.ts`, `providers/types.ts`,
1452
+ * and `permissions/types.ts` without creating cycles.
1453
+ *
1454
+ * Heavy daemon-internal references (CES client, host-proxy classes, trust
1455
+ * classifications, interface IDs, content blocks, CES `ApprovalRequired`)
1456
+ * are held as opaque `unknown` / broadened-`string` placeholders here. The
1457
+ * assistant redeclares `Tool`, `ToolContext`, `ToolExecutionResult`,
1458
+ * `ToolExecutedEvent`, `ToolLifecycleEvent`, `ToolLifecycleEventHandler`,
1459
+ * and `ProxyToolResolver` in `assistant/src/tools/types.ts` with the
1460
+ * concrete types in place, so existing call sites keep their full type
1461
+ * information. The two sides are structurally independent — no inheritance,
1462
+ * no intersection — which avoids TypeScript's contravariance mismatches on
1463
+ * lifecycle-event handlers.
1464
+ */
1465
+ declare type ExecutionTarget = "sandbox" | "host";
1466
+
1467
+ /**
1468
+ * Telemetry fields stamped centrally by the executor's `emitLifecycleEvent`
1469
+ * on terminal (executed/error) lifecycle events.
1470
+ */
1471
+ declare interface ExecutorTelemetryStamp {
1472
+ /**
1473
+ * Model attribution snapshot for the conversation at invocation time.
1474
+ * Copied from {@link ToolContext.attribution} by the executor; `null` when
1475
+ * resolution failed or no attribution was available.
1476
+ */
1477
+ attribution?: UsageAttributionSnapshot | null;
1478
+ /**
1479
+ * Serialized byte size of the RAW tool input, stamped by the executor
1480
+ * before sensitive-field sanitization rewrites `input`. Only the size
1481
+ * leaves the device, never the payload.
1482
+ */
1483
+ inputBytes?: number | null;
1484
+ /**
1485
+ * Byte size of the RAW tool result content, stamped by the executor
1486
+ * before sensitive-output extraction rewrites `result.content`. Only
1487
+ * stamped on `executed` events: error events carry no executor-side
1488
+ * result — the audit listener sizes the error string it builds itself,
1489
+ * which never goes through sanitization, so it is already raw. Only the
1490
+ * size leaves the device, never the payload.
1491
+ */
1492
+ resultBytes?: number | null;
1493
+ }
2713
1494
 
2714
1495
  export declare interface FileContent {
2715
1496
  type: "file";
2716
- source: MediaSource_2;
1497
+ source: {
1498
+ type: "base64";
1499
+ media_type: string;
1500
+ data: string;
1501
+ filename: string;
1502
+ };
2717
1503
  extracted_text?: string;
2718
1504
  /**
2719
- * Internal id linking a base64 file block to a row in the attachments table
2720
- * so consumers (DB joins, inline-chip positioning) can correlate the block
2721
- * back to its attachment. Redundant once the block is a reference (use
2722
- * `source.attachmentId`); retained only while file media is still persisted
2723
- * inline as base64, and removed when file uploads move to references.
2724
- * Stripped by `daemon/handlers/shared.ts` before sending to the model.
1505
+ * Internal id linking this block to a row in the attachments table.
1506
+ * Set when the file block originates from a persisted user-message
1507
+ * attachment so downstream consumers (DB joins, inline-chip
1508
+ * positioning) can correlate the block back to its attachment id.
1509
+ * Stripped by `daemon/handlers/shared.ts` before sending to the
1510
+ * model.
2725
1511
  */
2726
1512
  _attachmentId?: string;
2727
1513
  }
@@ -2838,9 +1624,6 @@ declare const GenerationHandoffEventSchema: z.ZodObject<{
2838
1624
  attachmentWarnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
2839
1625
  }, z.core.$strip>;
2840
1626
 
2841
- /** Read the assistant's name from IDENTITY.md for personalized responses. */
2842
- export declare function getAssistantName(): string | null;
2843
-
2844
1627
  /**
2845
1628
  * Resolve the configured provider through the registry.
2846
1629
  * Thin wrapper around `resolveConfiguredProvider()` for callsites
@@ -2854,18 +1637,6 @@ export declare function getConfiguredProvider(callSite: LLMCallSite, opts?: {
2854
1637
  forceOverrideProfile?: boolean;
2855
1638
  }): Promise<Provider | null>;
2856
1639
 
2857
- /** Look up a conversation row by id. */
2858
- export declare function getConversation(id: string): Promise<ConversationRow | null>;
2859
-
2860
- /**
2861
- * Absolute path of a conversation's disk-view directory under the workspace
2862
- * naming scheme (timestamp-first, derived from id + creation time).
2863
- */
2864
- export declare function getConversationDirPath(id: string, createdAtMs: number): Promise<string>;
2865
-
2866
- /** All messages of a conversation in insertion order. */
2867
- export declare function getMessages(conversationId: string): Promise<MessageRow[]>;
2868
-
2869
1640
  /**
2870
1641
  * List the workspace inference profiles a plugin can route to, in the order the
2871
1642
  * `/model` picker presents them (`llm.profileOrder` first, then the rest
@@ -2947,9 +1718,6 @@ declare interface GuardianDecisionPrompt {
2947
1718
  executionTarget?: "sandbox" | "host";
2948
1719
  }
2949
1720
 
2950
- /** Whether the text tokenizes to at least one lexical search token. */
2951
- export declare function hasLexicalTokens(text: string): Promise<boolean>;
2952
-
2953
1721
  declare interface HeartbeatAlert {
2954
1722
  type: "heartbeat_alert";
2955
1723
  title: string;
@@ -3075,8 +1843,6 @@ declare interface HistoryResponseToolCall {
3075
1843
  imageData?: string;
3076
1844
  /** Base64-encoded image data from tool contentBlocks (e.g. browser_screenshot, image generation). */
3077
1845
  imageDataList?: string[];
3078
- /** Workspace attachment ids for tool-result images persisted as references; clients fetch bytes by id on render instead of embedding base64. */
3079
- imageAttachmentIds?: string[];
3080
1846
  /** Unix ms when the tool started executing. */
3081
1847
  startedAt?: number;
3082
1848
  /** Unix ms when the tool completed. */
@@ -3335,7 +2101,7 @@ declare interface HostBashRequest {
3335
2101
  command: string;
3336
2102
  working_dir?: string;
3337
2103
  timeout_seconds?: number;
3338
- /** Extra environment variables to inject into the subprocess (e.g. __CONVERSATION_ID). */
2104
+ /** Extra environment variables to inject into the subprocess (e.g. VELLUM_UNTRUSTED_SHELL). */
3339
2105
  env?: Record<string, string>;
3340
2106
  /** When set, route this request only to the client with this ID. */
3341
2107
  targetClientId?: string;
@@ -3497,13 +2263,11 @@ declare interface IdentityGetResponse {
3497
2263
 
3498
2264
  export declare interface ImageContent {
3499
2265
  type: "image";
3500
- source: MediaSource_2;
3501
- }
3502
-
3503
- declare interface ImageEmbeddingInput {
3504
- type: "image";
3505
- data: Buffer;
3506
- mimeType: string;
2266
+ source: {
2267
+ type: "base64";
2268
+ media_type: string;
2269
+ data: string;
2270
+ };
3507
2271
  }
3508
2272
 
3509
2273
  declare type _InboxServerMessages = ContactsInviteResponse | AssistantInboxEscalationResponse;
@@ -3555,18 +2319,6 @@ export declare interface InitContext {
3555
2319
  assistantVersion: string;
3556
2320
  }
3557
2321
 
3558
- /** Shape returned by {@link insertMessageCore} and its public wrappers. */
3559
- declare interface InsertedMessage {
3560
- id: string;
3561
- conversationId: string;
3562
- role: MessageRole;
3563
- content: string;
3564
- createdAt: number;
3565
- metadata?: string;
3566
- clientMessageId?: string;
3567
- deduplicated: boolean;
3568
- }
3569
-
3570
2322
  declare interface IntegrationConnectResult {
3571
2323
  type: "integration_connect_result";
3572
2324
  integrationId: string;
@@ -3598,11 +2350,11 @@ declare const InteractionResolvedEventSchema: z.ZodObject<{
3598
2350
  requestId: z.ZodString;
3599
2351
  conversationId: z.ZodString;
3600
2352
  state: z.ZodEnum<{
3601
- cancelled: "cancelled";
3602
- superseded: "superseded";
3603
2353
  approved: "approved";
2354
+ cancelled: "cancelled";
3604
2355
  rejected: "rejected";
3605
2356
  answered: "answered";
2357
+ superseded: "superseded";
3606
2358
  }>;
3607
2359
  kind: z.ZodString;
3608
2360
  }, z.core.$strip>;
@@ -3611,9 +2363,6 @@ declare const INTERFACE_IDS: readonly ["macos", "ios", "cli", "telegram", "phone
3611
2363
 
3612
2364
  declare type InterfaceId = (typeof INTERFACE_IDS)[number];
3613
2365
 
3614
- /** Whether the conversation currently has a turn in flight. */
3615
- export declare function isConversationProcessing(id: string): Promise<boolean>;
3616
-
3617
2366
  /**
3618
2367
  * Provider stop-reason classification.
3619
2368
  *
@@ -3631,33 +2380,6 @@ export declare function isConversationProcessing(id: string): Promise<boolean>;
3631
2380
  */
3632
2381
  export declare function isMaxTokensStopReason(stopReason: string | null | undefined): boolean;
3633
2382
 
3634
- /**
3635
- * The remote skill catalog, fetched via the shared catalog cache. Entries
3636
- * whose declared feature flag is disabled are reported with
3637
- * `state: "unavailable"`; all others are `state: "available"`. Not deduplicated
3638
- * against the installed catalog — callers that merge the two lists filter by
3639
- * installed ids themselves.
3640
- *
3641
- * A fetch failure never rejects: the underlying cache degrades through its
3642
- * fallback chain (stale cache → bundled local catalog → empty) and this
3643
- * returns whatever that yields. An empty result therefore means "could not
3644
- * enumerate the catalog" as much as "the catalog is empty" — callers must
3645
- * gate destructive reconciliation (pruning against the catalog id set) on a
3646
- * non-empty result. Unexpected errors from the catalog read propagate.
3647
- */
3648
- export declare function listCatalogSkills(): Promise<ResolvedSkillEntry[]>;
3649
-
3650
- /** List conversation rows, newest first. */
3651
- export declare function listConversations(limit?: number, conversationType?: ConversationType_2, offset?: number, archiveStatus?: ArchiveStatusFilter, originChannel?: string): Promise<ConversationRow[]>;
3652
-
3653
- /**
3654
- * The locally installed skill catalog with resolved states. Includes every
3655
- * catalog entry — skills dropped by flag gating or the bundled allowlist are
3656
- * reported with `state: "unavailable"` rather than omitted, so the returned
3657
- * ids are the complete installed universe.
3658
- */
3659
- export declare function listInstalledSkills(): Promise<ResolvedSkillEntry[]>;
3660
-
3661
2383
  declare interface ListItem {
3662
2384
  id: string;
3663
2385
  title: string;
@@ -3686,6 +2408,7 @@ declare const LLMCallSiteEnum: z.ZodEnum<{
3686
2408
  heartbeatAgent: "heartbeatAgent";
3687
2409
  filingAgent: "filingAgent";
3688
2410
  compactionAgent: "compactionAgent";
2411
+ analyzeConversation: "analyzeConversation";
3689
2412
  callAgent: "callAgent";
3690
2413
  memoryExtraction: "memoryExtraction";
3691
2414
  memoryConsolidation: "memoryConsolidation";
@@ -3723,8 +2446,6 @@ declare const LLMCallSiteEnum: z.ZodEnum<{
3723
2446
  workflowLeaf: "workflowLeaf";
3724
2447
  }>;
3725
2448
 
3726
- declare type MediaSource_2 = Base64MediaSource | WorkspaceRefMediaSource;
3727
-
3728
2449
  declare interface MemoryRecalled {
3729
2450
  type: "memory_recalled";
3730
2451
  provider: string;
@@ -3822,125 +2543,6 @@ declare const MessageDequeuedEventSchema: z.ZodObject<{
3822
2543
  requestId: z.ZodString;
3823
2544
  }, z.core.$strip>;
3824
2545
 
3825
- declare type MessageLexicalSearchResult = Awaited<ReturnType<searchMessageIdsLexical_2>>[number];
3826
-
3827
- declare interface MessageLexicalSearchResult_2 {
3828
- messageId: string;
3829
- score: number;
3830
- }
3831
-
3832
- /**
3833
- * Plugin-facing facade over the host conversation store: reads and writes on
3834
- * conversations and their message history, plus the lexical message-search
3835
- * surface. Every operation takes explicit parameters and resolves nothing
3836
- * from config, so the wrappers are pure pass-throughs.
3837
- *
3838
- * The store modules are loaded via dynamic `import()` inside each wrapper —
3839
- * they carry the DB/drizzle import graph and are among the most
3840
- * partial-mocked modules in the test suite, so importing this module (which
3841
- * every `@vellumai/plugin-api` consumer does transitively) must not force
3842
- * their named exports to resolve at instantiation. All type imports above are
3843
- * erased at compile time. Async for that reason, including the wrappers whose
3844
- * underlying functions are synchronous.
3845
- */
3846
- declare type MessageMetadata = ReturnType<parseMessageMetadata_2>;
3847
-
3848
- /** Validated shape of a persisted message's `metadata` column. */
3849
- declare type MessageMetadata_2 = z.infer<typeof messageMetadataSchema>;
3850
-
3851
- declare const messageMetadataSchema: z.ZodObject<{
3852
- userMessageChannel: z.ZodOptional<z.ZodEnum<{
3853
- vellum: "vellum";
3854
- telegram: "telegram";
3855
- phone: "phone";
3856
- whatsapp: "whatsapp";
3857
- slack: "slack";
3858
- email: "email";
3859
- platform: "platform";
3860
- a2a: "a2a";
3861
- }>>;
3862
- assistantMessageChannel: z.ZodOptional<z.ZodEnum<{
3863
- vellum: "vellum";
3864
- telegram: "telegram";
3865
- phone: "phone";
3866
- whatsapp: "whatsapp";
3867
- slack: "slack";
3868
- email: "email";
3869
- platform: "platform";
3870
- a2a: "a2a";
3871
- }>>;
3872
- userMessageInterface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | null, string>> & z.ZodType<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension", string, z.core.$ZodTypeInternals<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension", string>>>;
3873
- assistantMessageInterface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension" | null, string>> & z.ZodType<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension", string, z.core.$ZodTypeInternals<"telegram" | "phone" | "whatsapp" | "slack" | "email" | "a2a" | "macos" | "ios" | "cli" | "web" | "chrome-extension", string>>>;
3874
- client: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3875
- subagentNotification: z.ZodOptional<z.ZodObject<{
3876
- subagentId: z.ZodString;
3877
- label: z.ZodString;
3878
- status: z.ZodEnum<{
3879
- completed: "completed";
3880
- failed: "failed";
3881
- running: "running";
3882
- aborted: "aborted";
3883
- }>;
3884
- error: z.ZodOptional<z.ZodString>;
3885
- conversationId: z.ZodOptional<z.ZodString>;
3886
- objective: z.ZodOptional<z.ZodString>;
3887
- }, z.core.$strip>>;
3888
- acpNotification: z.ZodOptional<z.ZodObject<{
3889
- acpSessionId: z.ZodString;
3890
- agent: z.ZodOptional<z.ZodString>;
3891
- }, z.core.$strip>>;
3892
- provenanceTrustClass: z.ZodOptional<z.ZodEnum<{
3893
- unknown: "unknown";
3894
- guardian: "guardian";
3895
- trusted_contact: "trusted_contact";
3896
- unverified_contact: "unverified_contact";
3897
- }>>;
3898
- model: z.ZodOptional<z.ZodString>;
3899
- provenanceSourceChannel: z.ZodOptional<z.ZodEnum<{
3900
- vellum: "vellum";
3901
- telegram: "telegram";
3902
- phone: "phone";
3903
- whatsapp: "whatsapp";
3904
- slack: "slack";
3905
- email: "email";
3906
- platform: "platform";
3907
- a2a: "a2a";
3908
- }>>;
3909
- provenanceGuardianExternalUserId: z.ZodOptional<z.ZodString>;
3910
- provenanceRequesterIdentifier: z.ZodOptional<z.ZodString>;
3911
- automated: z.ZodOptional<z.ZodBoolean>;
3912
- hidden: z.ZodOptional<z.ZodBoolean>;
3913
- backgroundToolCompletion: z.ZodOptional<z.ZodObject<{
3914
- id: z.ZodString;
3915
- toolName: z.ZodString;
3916
- conversationId: z.ZodString;
3917
- command: z.ZodString;
3918
- startedAt: z.ZodNumber;
3919
- status: z.ZodEnum<{
3920
- cancelled: "cancelled";
3921
- completed: "completed";
3922
- failed: "failed";
3923
- }>;
3924
- exitCode: z.ZodNullable<z.ZodNumber>;
3925
- output: z.ZodString;
3926
- completedAt: z.ZodNumber;
3927
- }, z.core.$strip>>;
3928
- forkSourceMessageId: z.ZodOptional<z.ZodString>;
3929
- imageSourcePaths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3930
- attachmentStoredPaths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3931
- memoryInjectedBlock: z.ZodOptional<z.ZodString>;
3932
- memoryV3InjectedBlock: z.ZodOptional<z.ZodString>;
3933
- turnContextBlock: z.ZodOptional<z.ZodString>;
3934
- pkbSystemReminderBlock: z.ZodOptional<z.ZodString>;
3935
- workspaceBlock: z.ZodOptional<z.ZodString>;
3936
- nowScratchpadBlock: z.ZodOptional<z.ZodString>;
3937
- pkbContextBlock: z.ZodOptional<z.ZodString>;
3938
- memoryV2StaticBlock: z.ZodOptional<z.ZodString>;
3939
- backgroundTurnBlock: z.ZodOptional<z.ZodString>;
3940
- channelCapabilitiesBlock: z.ZodOptional<z.ZodString>;
3941
- nonInteractiveContextBlock: z.ZodOptional<z.ZodString>;
3942
- }, z.core.$loose>;
3943
-
3944
2546
  declare type MessageQueuedDeletedEvent = z.infer<typeof MessageQueuedDeletedEventSchema>;
3945
2547
 
3946
2548
  declare const MessageQueuedDeletedEventSchema: z.ZodObject<{
@@ -3967,27 +2569,6 @@ declare const MessageRequestCompleteEventSchema: z.ZodObject<{
3967
2569
  runStillActive: z.ZodOptional<z.ZodBoolean>;
3968
2570
  }, z.core.$strip>;
3969
2571
 
3970
- /** Allowed values for the `role` column on `messages`. */
3971
- declare type MessageRole = "user" | "assistant" | "system";
3972
-
3973
- declare interface MessageRow {
3974
- id: string;
3975
- conversationId: string;
3976
- role: string;
3977
- /**
3978
- * Typed content blocks, resolved at the row-fetch chokepoint by
3979
- * `resolveMessageContentBlocks`: inline JSON parses, file-backed
3980
- * `{ ref }` rows fold their delta file, and legacy plain strings arrive
3981
- * wrapped in a single text block.
3982
- */
3983
- content: ContentBlock[];
3984
- createdAt: number;
3985
- metadata: string | null;
3986
- clientMessageId: string | null;
3987
- /** 1 = content is complete; 0 = message is still streaming. */
3988
- finalized: number;
3989
- }
3990
-
3991
2572
  declare type _MessagesServerMessages = UserMessageEchoEvent | AssistantTurnStartEvent | AssistantTextDeltaEvent | AssistantThinkingDeltaEvent | ToolUseStartEvent | ToolUsePreviewStartEvent | ToolOutputChunkEvent | ToolInputDelta | ToolResultEvent | ConfirmationRequestEvent | SecretRequestEvent | QuestionRequestEvent | MessageCompleteEvent | ErrorEvent_2 | MessageQueuedEvent | MessageDequeuedEvent | MessageRequestCompleteEvent | MessageQueuedDeletedEvent | MessageSteered | SuggestionResponse | ConfirmationStateChanged | AssistantActivityStateEvent | ConversationInferenceProfileUpdated | InteractionResolvedEvent;
3992
2573
 
3993
2574
  declare interface MessageSteered {
@@ -4046,8 +2627,6 @@ export declare interface ModelProfileInfo {
4046
2627
  readonly isMix: boolean;
4047
2628
  }
4048
2629
 
4049
- declare type MultimodalEmbeddingInput = TextEmbeddingInput | ImageEmbeddingInput | AudioEmbeddingInput | VideoEmbeddingInput;
4050
-
4051
2630
  declare type NavigateSettingsEvent = z.infer<typeof NavigateSettingsEventSchema>;
4052
2631
 
4053
2632
  declare const NavigateSettingsEventSchema: z.ZodObject<{
@@ -4185,37 +2764,18 @@ declare const OpenUrlEventSchema: z.ZodObject<{
4185
2764
  }, z.core.$strip>;
4186
2765
 
4187
2766
  /**
4188
- * Identifies what owns a tool: the built-in default set, or a skill / plugin /
4189
- * MCP server / workspace override. Tracked by the tool registry keyed by tool
4190
- * name, not stored on the `Tool` object itself — query via
4191
- * {@link ../tools/registry.getToolOwner}.
2767
+ * Identifies which extension owns a tool (skill / plugin / MCP server).
2768
+ * Tracked by the tool registry keyed by tool name, not stored on the `Tool`
2769
+ * object itself — query via {@link ../tools/registry.getToolOwner}.
4192
2770
  */
4193
2771
  declare interface OwnerInfo {
4194
2772
  kind: OwnerKind;
4195
- /** ID of the owner: skill id / plugin name / MCP server id / workspace path, or `"default"` for built-ins. */
2773
+ /** ID of the owning extension (skill id / plugin name / MCP server id / workspace path). */
4196
2774
  id: string;
4197
2775
  }
4198
2776
 
4199
- /**
4200
- * The kind of entity that owns a tool. `"default"` is the built-in tool set
4201
- * that ships with the assistant; the others are extension surfaces. Every
4202
- * *registered* tool has an owner — {@link ../tools/registry.getToolOwner}
4203
- * returns `undefined` only for a name that is not registered at all.
4204
- */
4205
- declare type OwnerKind = "default" | "skill" | "mcp" | "plugin" | "workspace";
4206
-
4207
- /** Parse a stored message-metadata JSON string; undefined when absent/invalid. */
4208
- export declare function parseMessageMetadata(metadataJson: string | null): Promise<MessageMetadata>;
4209
-
4210
- /**
4211
- * Parse a persisted message's metadata JSON against {@link messageMetadataSchema}
4212
- * — the single source of truth for its shape — returning the validated fields,
4213
- * or `undefined` when the column is absent, not valid JSON, or fails validation.
4214
- * The single place the raw JSON.parse + safeParse dance lives, so callers read
4215
- * typed fields (e.g. `provenanceTrustClass`, `automated`, `subagentNotification`)
4216
- * instead of re-implementing it.
4217
- */
4218
- declare function parseMessageMetadata_2(metadataJson: string | null): MessageMetadata_2 | undefined;
2777
+ /** The kind of extension that owns a tool. Core tools have no owner. */
2778
+ declare type OwnerKind = "skill" | "mcp" | "plugin" | "workspace";
4219
2779
 
4220
2780
  declare interface PartnerAudit {
4221
2781
  risk: RiskLevel_2;
@@ -4808,70 +3368,6 @@ declare const RelationshipStateUpdatedEventSchema: z.ZodObject<{
4808
3368
  updatedAt: z.ZodString;
4809
3369
  }, z.core.$strip>;
4810
3370
 
4811
- /**
4812
- * Plugin-facing read API over the skill surface: the locally installed
4813
- * catalog with resolved enablement states, and the remote skill catalog —
4814
- * each composed host-side (catalog load + install-state resolution +
4815
- * feature-flag gating + install-meta read), so callers hold no host config
4816
- * and perform no flag checks of their own.
4817
- *
4818
- * The underlying skill and flag modules are loaded via dynamic `import()`
4819
- * inside each function so that importing this module — which every
4820
- * `@vellumai/plugin-api` consumer does transitively — does not eagerly pull
4821
- * the catalog/flag import graph. An eager pull would force those modules'
4822
- * named exports to resolve at instantiation, which breaks the intentional
4823
- * partial module mocks in tests.
4824
- */
4825
- /** One skill as seen by a plugin: capability fields plus resolved state. */
4826
- export declare interface ResolvedSkillEntry {
4827
- id: string;
4828
- displayName: string;
4829
- description: string;
4830
- /** Compact routing cues declared in frontmatter / catalog metadata. */
4831
- activationHints?: string[];
4832
- /** Conditions under which the skill should not be loaded. */
4833
- avoidWhen?: string[];
4834
- /** True when the skill is pinned into the memory selector pool every turn. */
4835
- alwaysCandidate?: boolean;
4836
- /** True for locally installed skills; false for remote catalog entries. */
4837
- installed: boolean;
4838
- /** Where the installed skill comes from. Unset for remote catalog entries. */
4839
- source?: SkillSource;
4840
- /**
4841
- * Resolved availability:
4842
- * - `enabled` / `disabled` — installed, per config and source defaults.
4843
- * - `unavailable` — gated off (feature flag disabled, or a bundled skill
4844
- * excluded by the `allowBundled` allowlist). Present so callers can still
4845
- * enumerate the full id universe.
4846
- * - `available` — a remote catalog entry that is not locally installed.
4847
- */
4848
- state: "enabled" | "disabled" | "unavailable" | "available";
4849
- /**
4850
- * Install metadata for user-installed skills (`managed` / `workspace` /
4851
- * `extra` sources): `null` when the directory has no install-meta file,
4852
- * unset for sources that never carry one (bundled, plugin, remote).
4853
- */
4854
- installMeta?: SkillInstallMeta | null;
4855
- }
4856
-
4857
- /**
4858
- * Resolve a media source to inline base64, reading a reference source back from
4859
- * its workspace location. Returns `null` when a reference can no longer be
4860
- * read. For consumers that hold an individual in-memory block (image
4861
- * captioning, media retry) and need its bytes outside the provider transform.
4862
- */
4863
- export declare function resolveMediaSourceData(source: MediaSource_2): {
4864
- data: string;
4865
- media_type: string;
4866
- } | null;
4867
-
4868
- /**
4869
- * Read the guardian's display name from `users/default.md`. We look for the
4870
- * markdown-bold "Name" label (matching the IDENTITY.md convention) and fall
4871
- * back to `null` on any miss; callers substitute a generic label.
4872
- */
4873
- export declare function resolveUserName(workspaceDir: string): string | null;
4874
-
4875
3371
  export declare enum RiskLevel {
4876
3372
  Low = "low",
4877
3373
  Medium = "medium",
@@ -4934,42 +3430,11 @@ declare interface SchedulesListResponse {
4934
3430
 
4935
3431
  declare type _SchedulesServerMessages = SchedulesListResponse | HeartbeatAlert | HeartbeatConversationCreated | HeartbeatConfigResponse | HeartbeatRunsListResponse | HeartbeatRunNowResponse | HeartbeatChecklistResponse | HeartbeatChecklistWriteResponse | FilingConfigResponse | FilingRunNowResponse;
4936
3432
 
4937
- /** Sparse lexical search over stored message text; ranked message-id hits. */
4938
- export declare function searchMessageIdsLexical(query: string, limit: number, opts?: {
4939
- conversationId?: string;
4940
- }): Promise<MessageLexicalSearchResult[]>;
4941
-
4942
- /**
4943
- * Resolve message-id candidates for `query` from the Qdrant lexical index,
4944
- * ranked by sparse similarity score (highest first).
4945
- *
4946
- * This is a **pure lexical candidate generator**: it returns the top-`limit`
4947
- * message ids by sparse score with NO visibility, source, or
4948
- * active-conversation filtering (the only scoping it applies is the optional
4949
- * `conversationId` restriction). Those exclusions (active conversation,
4950
- * private conversations, non-message sources) live in SQL at the read sites.
4951
- *
4952
- * Callers that apply such post-retrieval SQL filters MUST over-fetch: pass an
4953
- * inflated `limit` (the `QDRANT_RECALL_CANDIDATE_MULTIPLIER` /
4954
- * `QDRANT_SEARCH_CANDIDATE_LIMIT` pattern the read sites use) and re-limit
4955
- * after filtering in SQL. Applying the caller's real limit here first would
4956
- * let excluded rows consume the candidate slots and drop valid visible
4957
- * matches below the fold.
4958
- *
4959
- * @param query free-text search query
4960
- * @param limit maximum number of candidates to return
4961
- * @param opts.conversationId restrict results to a single conversation
4962
- */
4963
- declare function searchMessageIdsLexical_2(query: string, limit: number, opts?: {
4964
- conversationId?: string;
4965
- }): Promise<MessageLexicalSearchResult_2[]>;
3433
+ declare interface ScopeOption {
3434
+ label: string;
3435
+ scope: string;
3436
+ }
4966
3437
 
4967
- /**
4968
- * Result vocabulary for a secret prompt: how the value is delivered and the
4969
- * outcome of the prompt. Kept in a leaf module (no runtime dependencies) so
4970
- * type-only consumers can reference the shapes without importing the prompter
4971
- * implementation and its daemon-internal dependencies.
4972
- */
4973
3438
  declare type SecretDelivery = "store" | "transient_send";
4974
3439
 
4975
3440
  declare interface SecretPromptResult {
@@ -4980,22 +3445,11 @@ declare interface SecretPromptResult {
4980
3445
  /**
4981
3446
  * Why `value` is null. `"cancelled"` = the user explicitly dismissed the
4982
3447
  * prompt (a valid flow, not a failure); `"timed_out"` = no response within
4983
- * the permission-timeout window; `"superseded"` = a newer message in the
4984
- * conversation auto-denied the pending prompt before anyone answered it.
4985
- * Only meaningful when `value` is null and `error` is unset. Lets callers
4986
- * distinguish a deliberate cancel from a genuine failure instead of
4987
- * treating both as an error.
4988
- */
4989
- reason?: "cancelled" | "timed_out" | "superseded";
4990
- /**
4991
- * One-time collection URL minted when the channel cannot render the secure
4992
- * prompt. Set together with `error: "unsupported_channel"` — the caller
4993
- * relays the link so the user can supply the value out of band; the gateway
4994
- * stores the submitted value via the credential vault.
3448
+ * the permission-timeout window. Only meaningful when `value` is null and
3449
+ * `error` is unset. Lets callers distinguish a deliberate cancel from a
3450
+ * genuine failure instead of treating both as an error.
4995
3451
  */
4996
- collectionUrl?: string;
4997
- /** Expiry (epoch ms) of {@link SecretPromptResult.collectionUrl}. */
4998
- collectionExpiresAt?: number;
3452
+ reason?: "cancelled" | "timed_out";
4999
3453
  }
5000
3454
 
5001
3455
  declare type SecretRequestEvent = z.infer<typeof SecretRequestEventSchema>;
@@ -5015,9 +3469,6 @@ declare const SecretRequestEventSchema: z.ZodObject<{
5015
3469
  allowOneTimeSend: z.ZodOptional<z.ZodBoolean>;
5016
3470
  }, z.core.$strip>;
5017
3471
 
5018
- /** Whether the active embedding backend handles multimodal inputs. */
5019
- export declare function selectedBackendSupportsMultimodal(): Promise<boolean>;
5020
-
5021
3472
  export declare interface SendMessageConfig {
5022
3473
  model?: string;
5023
3474
  /**
@@ -5201,13 +3652,6 @@ declare interface ShowPlatformLogin {
5201
3652
  * The `assistantVersion` field mirrors the init context's so plugins that stash
5202
3653
  * a version stamp at init can compare against the same name on tear-down
5203
3654
  * without keeping their own copy.
5204
- *
5205
- * **`shutdown` may run in a different process than `init`.** A managed
5206
- * `uninstall` runs it in whichever process performs the removal (the CLI or the
5207
- * daemon), which is not necessarily the daemon process that ran `init`. Do not
5208
- * close over in-memory state established at `init` (open handles, timers,
5209
- * module-level singletons) and expect to tear it down here — reconstruct
5210
- * anything you need from the plugin's config and `data/` directory instead.
5211
3655
  */
5212
3656
  export declare interface ShutdownContext {
5213
3657
  /** Assistant semver for compatibility checks inside the plugin. */
@@ -5224,10 +3668,8 @@ export declare interface ShutdownContext {
5224
3668
  * - `disable` — the plugin was disabled at runtime (e.g. a `.disabled`
5225
3669
  * sentinel was added, or a feature flag turned it off).
5226
3670
  * - `reload` — a source file inside the plugin directory changed and the
5227
- * plugin is being redeployed in place; `shutdown` runs before the new version
5228
- * is imported and its `init` fires. Note the `shutdown` that runs is the one
5229
- * currently on disk, which is the previous version *unless* the edit was to
5230
- * `shutdown` itself.
3671
+ * plugin is being redeployed in place; the old version's `shutdown` runs
3672
+ * before the new version is imported and its `init` fires.
5231
3673
  */
5232
3674
  declare type ShutdownReason = "shutdown" | "uninstall" | "disable" | "reload";
5233
3675
 
@@ -5245,21 +3687,6 @@ declare interface SkillBodyResponse {
5245
3687
  error?: string;
5246
3688
  }
5247
3689
 
5248
- declare interface SkillInstallMeta {
5249
- origin: "vellum" | "clawhub" | "skillssh" | "custom";
5250
- installedAt: string;
5251
- installedBy?: string;
5252
- backfilledBy?: string;
5253
- version?: string;
5254
- slug?: string;
5255
- sourceRepo?: string;
5256
- contentHash?: string;
5257
- author?: "assistant" | "user";
5258
- sourceConversationId?: string;
5259
- retrospectiveConversationId?: string;
5260
- lastUsedAt?: string;
5261
- }
5262
-
5263
3690
  declare interface SkillsDraftResponse {
5264
3691
  type: "skills_draft_response";
5265
3692
  success: boolean;
@@ -5315,20 +3742,6 @@ declare interface SkillsListResponse {
5315
3742
  skills: SlimSkillResponse[];
5316
3743
  }
5317
3744
 
5318
- /**
5319
- * Origin of a skill in the merged catalog.
5320
- *
5321
- * - `bundled`: ships inside the assistant binary under `bundled-skills/`.
5322
- * - `managed`: installed into `$VELLUM_WORKSPACE_DIR/skills/` from our catalog.
5323
- * - `workspace`: user-authored skill living in a conversation's working dir.
5324
- * - `extra`: third-party directory roots passed via `loadSkillCatalog`'s
5325
- * `extraDirs` argument (primarily for tests).
5326
- * - `plugin`: shipped on disk inside an installed plugin at
5327
- * `<workspaceDir>/plugins/<name>/skills/<id>/SKILL.md`, attributed back to
5328
- * the owning plugin via its `owner` descriptor.
5329
- */
5330
- declare type SkillSource = "bundled" | "managed" | "workspace" | "extra" | "plugin";
5331
-
5332
3745
  declare type _SkillsServerMessages = SkillsListResponse | SkillBodyResponse | SkillStateChanged | SkillsInspectResponse | SkillsDraftResponse;
5333
3746
 
5334
3747
  declare interface SkillsshSlimSkill extends SlimSkillBase {
@@ -5431,23 +3844,6 @@ declare interface StopInputContext {
5431
3844
  readonly exitReason: AgentLoopExitReason;
5432
3845
  }
5433
3846
 
5434
- /**
5435
- * Coerce stored message content into a single human-readable text string,
5436
- * dropping non-text blocks (images, tool calls, tool results, thinking,
5437
- * …). Used by call sites that want only the spoken text — sweep-model
5438
- * context, RAG backfill, bookmark previews. For richer renderings that
5439
- * include tool metadata, use {@link extractTextFromStoredMessageContent}
5440
- * instead.
5441
- *
5442
- * Handles the two on-disk shapes:
5443
- * - Modern rows: JSON-serialized `ContentBlock[]`
5444
- * - Legacy rows: plain string
5445
- *
5446
- * Parse failures fall back to returning the raw input trimmed (the
5447
- * legacy-string path).
5448
- */
5449
- export declare function stringifyMessageContent(stored: string | ContentBlock[]): string;
5450
-
5451
3847
  declare interface SubagentDetailResponse {
5452
3848
  type: "subagent_detail_response";
5453
3849
  subagentId: string;
@@ -5534,32 +3930,6 @@ declare const SyncChangedEventSchema: z.ZodObject<{
5534
3930
 
5535
3931
  declare type _SyncInvalidationServerMessages = SyncChangedEvent;
5536
3932
 
5537
- /** Re-sync one persisted message into the conversation's disk view. */
5538
- export declare function syncMessageToDisk(conversationId: string, messageId: string, createdAtMs: number): Promise<void>;
5539
-
5540
- /**
5541
- * Synthesize text to audio using the globally configured TTS provider.
5542
- *
5543
- * 1. Resolves the active provider and its config via `tts-config-resolver`.
5544
- * 2. Looks up the provider adapter in the registry.
5545
- * 3. Delegates to the adapter's `synthesize` method.
5546
- *
5547
- * Throws {@link TtsSynthesisError} when the provider is not registered
5548
- * or synthesis fails.
5549
- */
5550
- export declare function synthesizeText(options: SynthesizeTextOptions): Promise<TtsSynthesisResult>;
5551
-
5552
- export declare interface SynthesizeTextOptions {
5553
- /** Text to speak. Sanitized internally — callers can pass raw model output. */
5554
- text: string;
5555
- /** Product surface requesting synthesis. */
5556
- useCase: TtsUseCase;
5557
- /** Optional voice override (provider-specific identifier). */
5558
- voiceId?: string;
5559
- /** Optional abort signal. */
5560
- signal?: AbortSignal;
5561
- }
5562
-
5563
3933
  declare interface TableCellValue {
5564
3934
  text: string;
5565
3935
  icon?: string;
@@ -5620,11 +3990,6 @@ export declare interface TextContent {
5620
3990
  text: string;
5621
3991
  }
5622
3992
 
5623
- declare interface TextEmbeddingInput {
5624
- type: "text";
5625
- text: string;
5626
- }
5627
-
5628
3993
  export declare interface ThinkingContent {
5629
3994
  type: "thinking";
5630
3995
  thinking: string;
@@ -5684,6 +4049,11 @@ export declare interface ToolContext {
5684
4049
  * @legacy
5685
4050
  */
5686
4051
  attribution?: UsageAttributionSnapshot | null;
4052
+ /**
4053
+ * Optional callback for tool lifecycle events (start/prompt/deny/execute/error).
4054
+ * @legacy
4055
+ */
4056
+ onToolLifecycleEvent?: ToolLifecycleEventHandler;
5687
4057
  /**
5688
4058
  * Optional resolver for proxy tools - delegates execution to an external client.
5689
4059
  * @legacy
@@ -5739,9 +4109,9 @@ export declare interface ToolContext {
5739
4109
  * "Always Allow" rules, or non-interactive auto-approve shortcuts may
5740
4110
  * bypass the prompt. This flag is independently sufficient: it
5741
4111
  * promotes allow → prompt decisions on its own and suppresses
5742
- * temporary override options in the prompt UI. Used by the `run_workflow`
5743
- * launch path so a human consents to a run whose capability manifest grants
5744
- * side-effecting tools.
4112
+ * temporary override options in the prompt UI. Used by
4113
+ * `manage_secure_command_tool` to ensure a human reviews each secure
4114
+ * bundle installation.
5745
4115
  * @legacy
5746
4116
  */
5747
4117
  requireFreshApproval?: boolean;
@@ -5951,6 +4321,54 @@ declare const ToolDefinitionSchema: z.ZodObject<{
5951
4321
  exclusive: z.ZodOptional<z.ZodBoolean>;
5952
4322
  }, z.core.$strip>;
5953
4323
 
4324
+ /**
4325
+ * `ToolExecutedEvent` carries a `result: ToolExecutionResult` field, so
4326
+ * the assistant re-declares it here to reference the assistant-side
4327
+ * `ToolExecutionResult` (which narrows `contentBlocks` to `ContentBlock[]`
4328
+ * and `cesApprovalRequired` to `ApprovalRequired`).
4329
+ */
4330
+ declare interface ToolExecutedEvent extends ExecutorTelemetryStamp {
4331
+ type: "executed";
4332
+ toolName: string;
4333
+ input: Record<string, unknown>;
4334
+ workingDir: string;
4335
+ conversationId: string;
4336
+ requestId?: string;
4337
+ executionTarget?: ExecutionTarget;
4338
+ riskLevel: string;
4339
+ /** ID of the trust rule that matched this invocation (if any). */
4340
+ matchedTrustRuleId?: string;
4341
+ /** How the approval decision was reached. Copied from PermissionDecision for analytics consumers. */
4342
+ approvalMode?: string;
4343
+ /** Why the approval decision was reached (stable enum). Copied from PermissionDecision for analytics consumers. */
4344
+ approvalReason?: string;
4345
+ decision: string;
4346
+ durationMs: number;
4347
+ result: ToolExecutionResult;
4348
+ }
4349
+
4350
+ /**
4351
+ * Extends the contracts declaration with the assistant-side telemetry
4352
+ * fields stamped centrally by the executor's `emitLifecycleEvent`.
4353
+ */
4354
+ declare interface ToolExecutionErrorEvent extends ToolExecutionErrorEvent_2, ExecutorTelemetryStamp {
4355
+ }
4356
+
4357
+ declare interface ToolExecutionErrorEvent_2 extends ToolLifecycleEventBase {
4358
+ type: "error";
4359
+ riskLevel: string;
4360
+ /** ID of the trust rule that matched this invocation (if any). */
4361
+ matchedTrustRuleId?: string;
4362
+ decision: string;
4363
+ durationMs: number;
4364
+ errorMessage: string;
4365
+ isExpected: boolean;
4366
+ /** Classifies the error for downstream consumers (audit, alerting, monitoring). */
4367
+ errorCategory: ErrorCategory;
4368
+ errorName?: string;
4369
+ errorStack?: string;
4370
+ }
4371
+
5954
4372
  export declare interface ToolExecutionResult {
5955
4373
  /** Textual result shown to the model in the tool-result block. Empty string is valid. */
5956
4374
  content: string;
@@ -6021,11 +4439,25 @@ export declare interface ToolExecutionResult {
6021
4439
  scope: string;
6022
4440
  label: string;
6023
4441
  }>;
4442
+ /**
4443
+ * When present, indicates that a CES tool returned an `approval_required`
4444
+ * response. The executor uses the approval bridge to prompt the guardian,
4445
+ * commit the grant decision to CES, and retry the original tool invocation
4446
+ * with the granted grantId. CES tools populate this field rather than
4447
+ * returning a textual error so the executor can intercept and handle the
4448
+ * approval flow transparently.
4449
+ */
4450
+ cesApprovalRequired?: ApprovalRequired;
6024
4451
  /** Structured activity metadata for client rendering (web search, web fetch, etc).
6025
4452
  * Populated by daemon-internal tools; plugins must not set this. */
6026
4453
  activityMetadata?: ToolActivityMetadata;
6027
4454
  }
6028
4455
 
4456
+ declare interface ToolExecutionStartEvent extends ToolLifecycleEventBase {
4457
+ type: "start";
4458
+ startedAtMs: number;
4459
+ }
4460
+
6029
4461
  declare interface ToolInputDelta {
6030
4462
  type: "tool_input_delta";
6031
4463
  toolName: string;
@@ -6049,6 +4481,19 @@ declare interface ToolInputSchema {
6049
4481
  required?: string[];
6050
4482
  }
6051
4483
 
4484
+ declare type ToolLifecycleEvent = ToolExecutionStartEvent | ToolPermissionPromptEvent | ToolPermissionDeniedEvent | ToolExecutedEvent | ToolExecutionErrorEvent;
4485
+
4486
+ declare interface ToolLifecycleEventBase {
4487
+ toolName: string;
4488
+ input: Record<string, unknown>;
4489
+ workingDir: string;
4490
+ conversationId: string;
4491
+ requestId?: string;
4492
+ executionTarget?: ExecutionTarget;
4493
+ }
4494
+
4495
+ declare type ToolLifecycleEventHandler = (event: ToolLifecycleEvent) => void | Promise<void>;
4496
+
6052
4497
  declare interface ToolNamesListResponse {
6053
4498
  type: "tool_names_list_response";
6054
4499
  /** Sorted list of all registered tool names. */
@@ -6076,6 +4521,30 @@ declare const ToolOutputChunkEventSchema: z.ZodObject<{
6076
4521
  messageId: z.ZodOptional<z.ZodString>;
6077
4522
  }, z.core.$strip>;
6078
4523
 
4524
+ declare interface ToolPermissionDeniedEvent extends ToolLifecycleEventBase {
4525
+ type: "permission_denied";
4526
+ riskLevel: string;
4527
+ /** Classifier-provided reason explaining why the risk level was assigned (bash/host_bash only). */
4528
+ riskReason?: string;
4529
+ /** ID of the trust rule that matched this invocation (if any). */
4530
+ matchedTrustRuleId?: string;
4531
+ decision: "deny" | "always_deny";
4532
+ reason: string;
4533
+ durationMs: number;
4534
+ }
4535
+
4536
+ declare interface ToolPermissionPromptEvent extends ToolLifecycleEventBase {
4537
+ type: "permission_prompt";
4538
+ riskLevel: string;
4539
+ /** Classifier-provided reason explaining why the risk level was assigned (bash/host_bash only). */
4540
+ riskReason?: string;
4541
+ reason: string;
4542
+ allowlistOptions: AllowlistOption[];
4543
+ scopeOptions: ScopeOption[];
4544
+ diff?: DiffInfo;
4545
+ persistentDecisionsAllowed?: boolean;
4546
+ }
4547
+
6079
4548
  declare interface ToolPermissionSimulateResponse {
6080
4549
  type: "tool_permission_simulate_response";
6081
4550
  success: boolean;
@@ -6247,31 +4716,6 @@ declare const trustClassSchema: z.ZodEnum<{
6247
4716
  unverified_contact: "unverified_contact";
6248
4717
  }>;
6249
4718
 
6250
- export declare class TtsSynthesisError extends Error {
6251
- readonly code: TtsSynthesisErrorCode;
6252
- constructor(code: TtsSynthesisErrorCode, message: string);
6253
- }
6254
-
6255
- declare type TtsSynthesisErrorCode = "TTS_PROVIDER_NOT_CONFIGURED" | "TTS_SYNTHESIS_FAILED";
6256
-
6257
- /** Output of a completed TTS synthesis call. */
6258
- export declare interface TtsSynthesisResult {
6259
- /** Complete audio buffer. */
6260
- audio: Buffer;
6261
- /** MIME type of the returned audio (e.g. `"audio/mpeg"`, `"audio/wav"`). */
6262
- contentType: string;
6263
- }
6264
-
6265
- /**
6266
- * Describes the product surface that is requesting synthesis so providers
6267
- * can tailor format, latency, and quality trade-offs.
6268
- */
6269
- declare type TtsUseCase =
6270
- /** Real-time phone call — prioritize low latency and streaming. */
6271
- "phone-call"
6272
- /** In-app message playback — buffer-oriented, higher quality acceptable. */
6273
- | "message-playback";
6274
-
6275
4719
  declare interface UiSurfaceComplete {
6276
4720
  type: "ui_surface_complete";
6277
4721
  conversationId: string;
@@ -6392,9 +4836,6 @@ declare interface UnpublishPageResponse {
6392
4836
  error?: string;
6393
4837
  }
6394
4838
 
6395
- /** Merge the given keys into a message's metadata JSON. */
6396
- export declare function updateMessageMetadata(messageId: string, updates: Record<string, unknown>): Promise<void>;
6397
-
6398
4839
  declare type _UpgradesServerMessages = ServiceGroupUpdateStarting | ServiceGroupUpdateProgress | ServiceGroupUpdateComplete;
6399
4840
 
6400
4841
  declare type UsageAttributionProfileSource = "call_site" | "conversation" | "active" | "default" | "unknown";
@@ -6530,8 +4971,8 @@ declare interface UserPromptSubmitInputContext {
6530
4971
  * `requestId` instead. Every path that starts an agent loop persists the
6531
4972
  * triggering user message under the turn's request ID before running, so
6532
4973
  * the message row id and the request's correlation ID are the same UUID.
6533
- * This holds for the standard submit, queue-drain, subagent, voice, and
6534
- * wake paths alike. This field will be removed in a
4974
+ * This holds for the standard submit, queue-drain, subagent, voice, wake,
4975
+ * and conversation-analysis paths alike. This field will be removed in a
6535
4976
  * future API version.
6536
4977
  */
6537
4978
  readonly userMessageId: string;
@@ -6604,12 +5045,6 @@ declare interface VercelApiConfigResponse {
6604
5045
  error?: string;
6605
5046
  }
6606
5047
 
6607
- declare interface VideoEmbeddingInput {
6608
- type: "video";
6609
- data: Buffer;
6610
- mimeType: string;
6611
- }
6612
-
6613
5048
  declare interface WebFetchMetadata {
6614
5049
  url: string;
6615
5050
  finalUrl: string;
@@ -7001,31 +5436,6 @@ declare interface WorkspaceFilesListResponse {
7001
5436
  }>;
7002
5437
  }
7003
5438
 
7004
- /**
7005
- * A reference to bytes stored in the workspace rather than inlined. The bytes
7006
- * live in the workspace attachment store, addressed by `attachmentId`, and are
7007
- * read back at the provider send boundary. User uploads are attachment rows
7008
- * already; tool-result media is materialized into attachment rows before it is
7009
- * referenced, so a single `attachmentId` resolves every case and needs no
7010
- * fallback locator.
7011
- *
7012
- * `sizeBytes` (and, for images, `width`/`height`) are the persist-time hints
7013
- * that let size-only consumers cost the block without a disk read.
7014
- */
7015
- declare interface WorkspaceRefMediaSource {
7016
- type: "workspace_ref";
7017
- media_type: string;
7018
- /** Attachment row id; resolves to bytes via the attachment store. */
7019
- attachmentId: string;
7020
- /** Byte length of the referenced file. */
7021
- sizeBytes: number;
7022
- filename?: string;
7023
- /** Decoded pixel width, when the reference is an image. */
7024
- width?: number;
7025
- /** Decoded pixel height, when the reference is an image. */
7026
- height?: number;
7027
- }
7028
-
7029
5439
  declare type _WorkspaceServerMessages = WorkspaceFilesListResponse | WorkspaceFileReadResponse | IdentityGetResponse | ToolPermissionSimulateResponse | ToolNamesListResponse | IdentityChangedEvent;
7030
5440
 
7031
5441
  export { }