orchestrator-client 5.7.0 → 5.7.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.
package/dist/index.d.cts CHANGED
@@ -57,6 +57,10 @@ interface TaskCreateResponse {
57
57
  interface TaskCancelResponse {
58
58
  taskId: string;
59
59
  killed: boolean;
60
+ via: "local" | "remote" | "none" | "fallback";
61
+ holderId?: string;
62
+ reason?: string;
63
+ message: string;
60
64
  }
61
65
  interface VSATaskCreateResponse extends TaskCreateResponse {
62
66
  }
@@ -170,6 +174,10 @@ interface ErrorCountResult {
170
174
  interface ErrorPurgeResult {
171
175
  deleted: number;
172
176
  }
177
+ interface ErrorEventListResult {
178
+ items: ErrorEventDetail[];
179
+ pagination: Pagination$1;
180
+ }
173
181
 
174
182
  interface HealthStatus {
175
183
  status: string;
@@ -317,10 +325,30 @@ interface ConfigurationStatus {
317
325
  orchestratorModel: string | null;
318
326
  summaryModel: string | null;
319
327
  translateModel: string | null;
328
+ llmBackendsCount: number;
329
+ mcpServersCount: number;
330
+ totalTasks: number;
331
+ queuedTasks: number;
332
+ activeTasks: number;
333
+ pendingApprovalTasks: number;
334
+ subagentsEnabled: boolean;
320
335
  localizationTargets: Record<string, string>[];
321
- llmbackends: LLMBackendInfo[];
322
- mcpservers: MCPServerInfo[];
323
- builtinTools: string[];
336
+ }
337
+ interface SubagentsStatus {
338
+ subagentsEnabled: boolean;
339
+ }
340
+ interface ReloadServicesResult {
341
+ timestamp: string;
342
+ llmBackends: Record<string, unknown>;
343
+ mcpServers: Record<string, unknown>;
344
+ slotManager: Record<string, unknown>;
345
+ nextScheduledReload?: string;
346
+ }
347
+ interface ReloadStatus {
348
+ enabled: boolean;
349
+ intervalHours: number | null;
350
+ lastReload?: string;
351
+ nextScheduledReload?: string;
324
352
  }
325
353
 
326
354
  interface ToolInfo {
@@ -333,6 +361,35 @@ interface ToolsListResult {
333
361
  totalTools: number;
334
362
  servers: string[];
335
363
  }
364
+ interface ToolCatalogEntry {
365
+ name: string;
366
+ description: string;
367
+ provenanceKind: string;
368
+ provenanceServer?: string;
369
+ category: string;
370
+ tags: string[];
371
+ workflowIds?: string[];
372
+ dangerous: boolean;
373
+ hasFragment: boolean;
374
+ }
375
+ interface ToolCatalogResult {
376
+ tools: ToolCatalogEntry[];
377
+ totalTools: number;
378
+ providers: string[];
379
+ }
380
+ interface MCPRefreshResult {
381
+ results: Record<string, unknown>;
382
+ totalRefreshed: number;
383
+ }
384
+ interface CatalogValidationIssue {
385
+ toolName: string;
386
+ issueType: string;
387
+ detail: string;
388
+ }
389
+ interface CatalogValidationResult {
390
+ issues: CatalogValidationIssue[];
391
+ totalIssues: number;
392
+ }
336
393
 
337
394
  interface CompactionEvent {
338
395
  id: number;
@@ -375,12 +432,13 @@ interface AuthConfig {
375
432
  }
376
433
  interface WebSocketClientInfo {
377
434
  clientId: string;
378
- subscription: Record<string, unknown>;
379
- connected: boolean;
435
+ connectedAt: string;
380
436
  }
381
437
  interface WebSocketStatus {
382
438
  connectedClients: number;
383
439
  clients: WebSocketClientInfo[];
440
+ eventListenerHealthy: boolean;
441
+ lastEventTime?: string;
384
442
  }
385
443
 
386
444
  interface SuccessResponse {
@@ -388,11 +446,34 @@ interface SuccessResponse {
388
446
  }
389
447
  interface MioContext {
390
448
  taskId: string;
449
+ modelId: string;
391
450
  currentTokens: number;
392
451
  contextLimit: number;
393
452
  usagePercentage: number;
394
- archivedCount: number;
395
- activeCount: number;
453
+ totalMessages: number;
454
+ activeMessages: number;
455
+ archivedMessages: number;
456
+ messagesWithoutTokenCount: number;
457
+ }
458
+ interface MioMemoryItem {
459
+ id: string;
460
+ taskId: string | null;
461
+ title: string;
462
+ content: string;
463
+ tags: string[];
464
+ linkedTaskId: string | null;
465
+ createdAt: string;
466
+ updatedAt: string;
467
+ }
468
+ interface MioMemoriesResult {
469
+ memories: MioMemoryItem[];
470
+ total: number;
471
+ }
472
+ interface MessageDeleteMultipleResult {
473
+ deletedIds: number[];
474
+ failedIds: number[];
475
+ totalDeleted: number;
476
+ totalFailed: number;
396
477
  }
397
478
  interface WorkflowStates {
398
479
  validStates: Record<string, string[]>;
@@ -430,6 +511,15 @@ interface OrchestratorClientOptions {
430
511
  timeoutMs?: number;
431
512
  /** Max retry attempts on transient failures (default: 3). */
432
513
  maxRetries?: number;
514
+ /**
515
+ * Locale tag sent as `X-Locale` on every request (e.g. `"hu-hu"`, `"en-us"`).
516
+ *
517
+ * When set the API returns translated content where available.
518
+ * When not set the API returns its default (English) content.
519
+ * Per-call locale overrides (on `listTasks`, `getTaskStatus`, etc.)
520
+ * take precedence over this global setting.
521
+ */
522
+ locale?: string;
433
523
  /**
434
524
  * Custom fetch implementation override.
435
525
  *
@@ -457,6 +547,7 @@ declare class OrchestratorAsync {
457
547
  protected _getToken: (() => string | Promise<string>) | undefined;
458
548
  protected _timeoutMs: number;
459
549
  protected _maxRetries: number;
550
+ protected _locale: string | undefined;
460
551
  protected _fetch: typeof globalThis.fetch;
461
552
  protected _abortController: AbortController | null;
462
553
  constructor(opts?: OrchestratorClientOptions);
@@ -476,57 +567,75 @@ declare class OrchestratorAsync {
476
567
  protected _put<T>(path: string, body?: unknown): Promise<T>;
477
568
  protected _delete<T>(path: string): Promise<T>;
478
569
  listTasks(params?: {
479
- workflowId?: string;
480
- status?: string;
570
+ page?: number;
481
571
  limit?: number;
482
- offset?: number;
483
- sortBy?: string;
484
- sortOrder?: string;
572
+ orderBy?: string;
573
+ orderDirection?: string;
574
+ workflowId?: string;
575
+ locale?: string;
485
576
  }): Promise<TaskListResult>;
486
577
  createTask(params: {
487
578
  workflowId: string;
488
579
  goalPrompt: string;
489
580
  maxIterations?: number;
490
- options?: Record<string, boolean>;
581
+ reasoningEffort?: string;
582
+ systemPrompt?: string;
583
+ developerPrompt?: string;
491
584
  ticketId?: string;
492
- title?: string;
493
- modelId?: string;
585
+ ticketText?: string;
586
+ summary?: string;
587
+ problemSummary?: string;
588
+ solutionStrategy?: string;
589
+ agentModelId?: string;
590
+ orchestratorModelId?: string;
591
+ availableTools?: string[];
592
+ attachmentIds?: string[];
593
+ options?: Record<string, boolean>;
494
594
  }): Promise<TaskCreateResponse>;
495
- getTaskStatus(taskId: string): Promise<TaskDetail>;
496
- getTaskConversation(taskId: string): Promise<ConversationResult>;
595
+ getTaskStatus(taskId: string, locale?: string): Promise<TaskDetail>;
596
+ setTaskStatus(taskId: string, status: string): Promise<SuccessResponse>;
597
+ getTaskConversation(taskId: string, params?: {
598
+ includeSummaries?: boolean;
599
+ excludeArchived?: boolean;
600
+ locale?: string;
601
+ }): Promise<ConversationResult>;
497
602
  getArchivedMessageContent(taskId: string, messageId: number): Promise<Record<string, unknown>>;
498
603
  getTaskCompactions(taskId: string): Promise<CompactionEvent[]>;
499
604
  getTaskJournal(taskId: string): Promise<TaskJournal>;
500
- cancelTask(taskId: string): Promise<SuccessResponse>;
605
+ cancelTask(taskId: string): Promise<TaskCancelResponse>;
501
606
  deleteTask(taskId: string): Promise<TaskDeleteResult>;
502
607
  deleteTasks(taskIds: string[]): Promise<TaskDeleteResult>;
503
- uploadAttachment(taskId: string, file: File | Blob, filename?: string): Promise<AttachmentUploadResponse>;
504
- downloadAttachment(taskId: string, attachmentId: string): Promise<Blob>;
505
- sendInteractiveMessage(taskId: string, content: string): Promise<SuccessResponse>;
608
+ uploadAttachment(file: File | Blob, filename?: string): Promise<AttachmentUploadResponse>;
609
+ downloadAttachment(attachmentId: string): Promise<Blob>;
610
+ sendInteractiveMessage(taskId: string, message: string, attachmentIds?: string[]): Promise<SuccessResponse>;
506
611
  markInteractiveComplete(taskId: string): Promise<SuccessResponse>;
507
612
  markInteractiveFailed(taskId: string): Promise<SuccessResponse>;
508
- approveInteractiveAction(taskId: string): Promise<SuccessResponse>;
509
- sendProactiveGuide(taskId: string, guide: string): Promise<SuccessResponse>;
613
+ approveInteractiveAction(taskId: string, approved?: boolean): Promise<SuccessResponse>;
614
+ stopInteractive(taskId: string): Promise<SuccessResponse>;
615
+ sendProactiveGuide(taskId: string, message: string, attachmentIds?: string[]): Promise<SuccessResponse>;
510
616
  respondProactiveHelp(taskId: string, response: string): Promise<SuccessResponse>;
511
- approveProactiveAction(taskId: string): Promise<SuccessResponse>;
512
- sendTicketGuide(taskId: string, guide: string): Promise<SuccessResponse>;
617
+ approveProactiveAction(taskId: string, approved?: boolean): Promise<SuccessResponse>;
618
+ sendTicketGuide(taskId: string, message: string, attachmentIds?: string[]): Promise<SuccessResponse>;
513
619
  respondTicketHelp(taskId: string, response: string): Promise<SuccessResponse>;
514
- approveTicketAction(taskId: string): Promise<SuccessResponse>;
620
+ approveTicketAction(taskId: string, approved?: boolean): Promise<SuccessResponse>;
515
621
  wakeTicket(taskId: string): Promise<SuccessResponse>;
516
- sendMatrixMessage(taskId: string, content: string): Promise<SuccessResponse>;
622
+ sendMatrixMessage(taskId: string, message: string, attachmentIds?: string[]): Promise<SuccessResponse>;
517
623
  markMatrixComplete(taskId: string): Promise<SuccessResponse>;
518
624
  markMatrixFailed(taskId: string): Promise<SuccessResponse>;
519
- approveMatrixAction(taskId: string): Promise<SuccessResponse>;
520
- getMatrixConversation(taskId: string): Promise<MatrixConversationResult>;
625
+ approveMatrixAction(taskId: string, approved?: boolean): Promise<SuccessResponse>;
626
+ getMatrixConversation(taskId: string, phase?: number, includeSummaries?: boolean): Promise<MatrixConversationResult>;
521
627
  createVSATask(params: {
628
+ userId: string;
522
629
  goalPrompt: string;
523
630
  title?: string;
524
- modelId?: string;
525
- /** Short-lived AiDIT delegated token (RFC 8693). Stored encrypted;
526
- * transparently appended as `token` to mcp-aidit tool-call arguments. */
631
+ agentModelId?: string;
632
+ orchestratorModelId?: string;
633
+ attachmentIds?: string[];
634
+ options?: Record<string, boolean>;
527
635
  delegatedToken?: string;
528
636
  }): Promise<VSATaskCreateResponse>;
529
- sendVSAMessage(taskId: string, content: string, options?: {
637
+ sendVSAMessage(taskId: string, message: string, options?: {
638
+ attachmentIds?: string[];
530
639
  /** Short-lived AiDIT delegated token. When provided, overwrites the
531
640
  * token stored for the task. Omitting leaves the existing token unchanged. */
532
641
  delegatedToken?: string;
@@ -537,46 +646,58 @@ declare class OrchestratorAsync {
537
646
  markVSAFailed(taskId: string): Promise<SuccessResponse>;
538
647
  stopVSA(taskId: string): Promise<SuccessResponse>;
539
648
  deleteVSA(taskId: string): Promise<SuccessResponse>;
540
- listVSATasks(params?: {
541
- status?: string;
649
+ listVSATasks(userId: string, params?: {
542
650
  limit?: number;
543
651
  offset?: number;
544
652
  }): Promise<TaskListResult>;
545
- searchVSATasks(query: string): Promise<TaskListResult>;
546
- deleteVSATasksBulk(taskIds: string[]): Promise<SuccessResponse>;
547
- sendMioMessage(taskId: string, content: string): Promise<SuccessResponse>;
548
- approveMioAction(taskId: string): Promise<SuccessResponse>;
653
+ searchVSATasks(userId: string, query: string, limit?: number): Promise<TaskListResult>;
654
+ deleteVSATasksBulk(taskIds: string[]): Promise<TaskDeleteResult>;
655
+ sendMioMessage(taskId: string, message: string, attachmentIds?: string[]): Promise<SuccessResponse>;
656
+ approveMioAction(taskId: string, approved?: boolean, feedback?: string): Promise<SuccessResponse>;
549
657
  wakeMio(taskId: string): Promise<SuccessResponse>;
550
658
  sendMioUserAway(taskId: string): Promise<SuccessResponse>;
551
659
  markMioComplete(taskId: string): Promise<SuccessResponse>;
552
660
  markMioFailed(taskId: string): Promise<SuccessResponse>;
553
661
  archiveMio(taskId: string): Promise<SuccessResponse>;
554
662
  getMioContext(taskId: string): Promise<MioContext>;
663
+ getMioMemories(taskId: string, includeCommon?: boolean): Promise<MioMemoriesResult>;
555
664
  listTools(): Promise<ToolsListResult>;
665
+ getToolCatalog(): Promise<ToolCatalogResult>;
666
+ refreshMCPTools(): Promise<MCPRefreshResult>;
667
+ validateToolCatalog(): Promise<CatalogValidationResult>;
556
668
  getWorkflowStates(): Promise<WorkflowStates>;
557
669
  updateTaskModels(taskId: string, models: {
558
- agent?: string;
559
- orchestrator?: string;
670
+ agentModelId?: string;
671
+ orchestratorModelId?: string;
560
672
  }): Promise<SuccessResponse>;
561
- updateTaskIteration(taskId: string, iteration: number): Promise<SuccessResponse>;
673
+ updateTaskIteration(taskId: string, iteration?: number, maxIterations?: number): Promise<SuccessResponse>;
562
674
  updateTaskWorkflowData(taskId: string, workflowData: Record<string, unknown>): Promise<SuccessResponse>;
563
675
  deleteMessage(taskId: string, messageId: number): Promise<SuccessResponse>;
564
- deleteMessages(taskId: string, messageIds: number[]): Promise<SuccessResponse>;
676
+ deleteMessages(taskId: string, messageIds: number[]): Promise<MessageDeleteMultipleResult>;
565
677
  updateMessage(taskId: string, messageId: number, update: {
566
678
  content?: string;
567
679
  reasoning?: string;
568
680
  }): Promise<SuccessResponse>;
569
681
  resetMatrixToPhase(taskId: string, phase: number): Promise<SuccessResponse>;
570
- getMessageTranslations(taskId: string, messageId: number, locale?: string): Promise<MessageTranslationsResult>;
682
+ getMessageTranslations(taskId: string, messageId: number): Promise<MessageTranslationsResult>;
571
683
  listErrors(params?: {
572
- since?: string;
573
- severity?: string;
574
- source?: string;
684
+ page?: number;
575
685
  limit?: number;
576
- offset?: number;
577
- }): Promise<ErrorEventDetail[]>;
686
+ taskId?: string;
687
+ severity?: string[];
688
+ source?: string[];
689
+ workflowId?: string;
690
+ errorCode?: string;
691
+ exceptionType?: string;
692
+ holderId?: string;
693
+ requestId?: string;
694
+ search?: string;
695
+ since?: string;
696
+ until?: string;
697
+ orderDirection?: string;
698
+ }): Promise<ErrorEventListResult>;
578
699
  getErrorDetail(errorId: string): Promise<ErrorEventDetail>;
579
- getErrorStats(since?: string): Promise<ErrorStatsResult>;
700
+ getErrorStats(since?: string, topN?: number): Promise<ErrorStatsResult>;
580
701
  countErrors(since?: string): Promise<ErrorCountResult>;
581
702
  purgeErrors(): Promise<ErrorPurgeResult>;
582
703
  health(): Promise<HealthStatus>;
@@ -603,6 +724,10 @@ declare class OrchestratorAsync {
603
724
  setTranslateModel(modelName: string): Promise<SuccessResponse>;
604
725
  getTokenWorkerStatus(): Promise<TokenWorkerStatus>;
605
726
  getSlotsStatus(): Promise<SlotsStatus>;
727
+ getSubagentsStatus(): Promise<SubagentsStatus>;
728
+ setSubagentsEnabled(enabled: boolean): Promise<SuccessResponse>;
729
+ reloadServices(): Promise<ReloadServicesResult>;
730
+ getReloadStatus(): Promise<ReloadStatus>;
606
731
  getAuthConfig(): Promise<AuthConfig>;
607
732
  getWebSocketStatus(): Promise<WebSocketStatus>;
608
733
  streamTaskStatus(taskId: string): AsyncGenerator<Record<string, unknown>>;
@@ -621,34 +746,37 @@ declare class Orchestrator {
621
746
  close(): void;
622
747
  listTasks(params?: Parameters<OrchestratorAsync["listTasks"]>[0]): TaskListResult;
623
748
  createTask(params: Parameters<OrchestratorAsync["createTask"]>[0]): TaskCreateResponse;
624
- getTaskStatus(taskId: string): TaskDetail;
625
- getTaskConversation(taskId: string): ConversationResult;
749
+ getTaskStatus(taskId: string, locale?: string): TaskDetail;
750
+ setTaskStatus(taskId: string, status: string): SuccessResponse;
751
+ getTaskConversation(taskId: string, params?: Parameters<OrchestratorAsync["getTaskConversation"]>[1]): ConversationResult;
626
752
  getArchivedMessageContent(taskId: string, messageId: number): Record<string, unknown>;
627
753
  getTaskCompactions(taskId: string): CompactionEvent[];
628
754
  getTaskJournal(taskId: string): TaskJournal;
629
- cancelTask(taskId: string): SuccessResponse;
755
+ cancelTask(taskId: string): TaskCancelResponse;
630
756
  deleteTask(taskId: string): TaskDeleteResult;
631
757
  deleteTasks(taskIds: string[]): TaskDeleteResult;
632
- uploadAttachment(taskId: string, file: File | Blob, filename?: string): AttachmentUploadResponse;
633
- downloadAttachment(taskId: string, attachmentId: string): Blob;
634
- sendInteractiveMessage(taskId: string, content: string): SuccessResponse;
758
+ uploadAttachment(file: File | Blob, filename?: string): AttachmentUploadResponse;
759
+ downloadAttachment(attachmentId: string): Blob;
760
+ sendInteractiveMessage(taskId: string, message: string, attachmentIds?: string[]): SuccessResponse;
635
761
  markInteractiveComplete(taskId: string): SuccessResponse;
636
762
  markInteractiveFailed(taskId: string): SuccessResponse;
637
- approveInteractiveAction(taskId: string): SuccessResponse;
638
- sendProactiveGuide(taskId: string, guide: string): SuccessResponse;
763
+ approveInteractiveAction(taskId: string, approved?: boolean): SuccessResponse;
764
+ stopInteractive(taskId: string): SuccessResponse;
765
+ sendProactiveGuide(taskId: string, message: string, attachmentIds?: string[]): SuccessResponse;
639
766
  respondProactiveHelp(taskId: string, response: string): SuccessResponse;
640
- approveProactiveAction(taskId: string): SuccessResponse;
641
- sendTicketGuide(taskId: string, guide: string): SuccessResponse;
767
+ approveProactiveAction(taskId: string, approved?: boolean): SuccessResponse;
768
+ sendTicketGuide(taskId: string, message: string, attachmentIds?: string[]): SuccessResponse;
642
769
  respondTicketHelp(taskId: string, response: string): SuccessResponse;
643
- approveTicketAction(taskId: string): SuccessResponse;
770
+ approveTicketAction(taskId: string, approved?: boolean): SuccessResponse;
644
771
  wakeTicket(taskId: string): SuccessResponse;
645
- sendMatrixMessage(taskId: string, content: string): SuccessResponse;
772
+ sendMatrixMessage(taskId: string, message: string, attachmentIds?: string[]): SuccessResponse;
646
773
  markMatrixComplete(taskId: string): SuccessResponse;
647
774
  markMatrixFailed(taskId: string): SuccessResponse;
648
- approveMatrixAction(taskId: string): SuccessResponse;
649
- getMatrixConversation(taskId: string): MatrixConversationResult;
775
+ approveMatrixAction(taskId: string, approved?: boolean): SuccessResponse;
776
+ getMatrixConversation(taskId: string, phase?: number, includeSummaries?: boolean): MatrixConversationResult;
650
777
  createVSATask(params: Parameters<OrchestratorAsync["createVSATask"]>[0]): VSATaskCreateResponse;
651
- sendVSAMessage(taskId: string, content: string, options?: {
778
+ sendVSAMessage(taskId: string, message: string, options?: {
779
+ attachmentIds?: string[];
652
780
  delegatedToken?: string;
653
781
  }): SuccessResponse;
654
782
  renameVSATask(taskId: string, title: string): SuccessResponse;
@@ -657,34 +785,38 @@ declare class Orchestrator {
657
785
  markVSAFailed(taskId: string): SuccessResponse;
658
786
  stopVSA(taskId: string): SuccessResponse;
659
787
  deleteVSA(taskId: string): SuccessResponse;
660
- listVSATasks(params?: Parameters<OrchestratorAsync["listVSATasks"]>[0]): TaskListResult;
661
- searchVSATasks(query: string): TaskListResult;
662
- deleteVSATasksBulk(taskIds: string[]): SuccessResponse;
663
- sendMioMessage(taskId: string, content: string): SuccessResponse;
664
- approveMioAction(taskId: string): SuccessResponse;
788
+ listVSATasks(userId: string, params?: Parameters<OrchestratorAsync["listVSATasks"]>[1]): TaskListResult;
789
+ searchVSATasks(userId: string, query: string, limit?: number): TaskListResult;
790
+ deleteVSATasksBulk(taskIds: string[]): TaskDeleteResult;
791
+ sendMioMessage(taskId: string, message: string, attachmentIds?: string[]): SuccessResponse;
792
+ approveMioAction(taskId: string, approved?: boolean, feedback?: string): SuccessResponse;
665
793
  wakeMio(taskId: string): SuccessResponse;
666
794
  sendMioUserAway(taskId: string): SuccessResponse;
667
795
  markMioComplete(taskId: string): SuccessResponse;
668
796
  markMioFailed(taskId: string): SuccessResponse;
669
797
  archiveMio(taskId: string): SuccessResponse;
670
798
  getMioContext(taskId: string): MioContext;
799
+ getMioMemories(taskId: string, includeCommon?: boolean): MioMemoriesResult;
671
800
  listTools(): ToolsListResult;
801
+ getToolCatalog(): ToolCatalogResult;
802
+ refreshMCPTools(): MCPRefreshResult;
803
+ validateToolCatalog(): CatalogValidationResult;
672
804
  getWorkflowStates(): WorkflowStates;
673
805
  updateTaskModels(taskId: string, models: {
674
- agent?: string;
675
- orchestrator?: string;
806
+ agentModelId?: string;
807
+ orchestratorModelId?: string;
676
808
  }): SuccessResponse;
677
- updateTaskIteration(taskId: string, iteration: number): SuccessResponse;
809
+ updateTaskIteration(taskId: string, iteration?: number, maxIterations?: number): SuccessResponse;
678
810
  updateTaskWorkflowData(taskId: string, workflowData: Record<string, unknown>): SuccessResponse;
679
811
  deleteMessage(taskId: string, messageId: number): SuccessResponse;
680
- deleteMessages(taskId: string, messageIds: number[]): SuccessResponse;
812
+ deleteMessages(taskId: string, messageIds: number[]): MessageDeleteMultipleResult;
681
813
  updateMessage(taskId: string, messageId: number, update: {
682
814
  content?: string;
683
815
  reasoning?: string;
684
816
  }): SuccessResponse;
685
817
  resetMatrixToPhase(taskId: string, phase: number): SuccessResponse;
686
- getMessageTranslations(taskId: string, messageId: number, locale?: string): MessageTranslationsResult;
687
- listErrors(params?: Parameters<OrchestratorAsync["listErrors"]>[0]): ErrorEventDetail[];
818
+ getMessageTranslations(taskId: string, messageId: number): MessageTranslationsResult;
819
+ listErrors(params?: Parameters<OrchestratorAsync["listErrors"]>[0]): ErrorEventListResult;
688
820
  getErrorDetail(errorId: string): ErrorEventDetail;
689
821
  getErrorStats(since?: string): ErrorStatsResult;
690
822
  countErrors(since?: string): ErrorCountResult;
@@ -713,6 +845,10 @@ declare class Orchestrator {
713
845
  setTranslateModel(modelName: string): SuccessResponse;
714
846
  getTokenWorkerStatus(): TokenWorkerStatus;
715
847
  getSlotsStatus(): SlotsStatus;
848
+ getSubagentsStatus(): SubagentsStatus;
849
+ setSubagentsEnabled(enabled: boolean): SuccessResponse;
850
+ reloadServices(): ReloadServicesResult;
851
+ getReloadStatus(): ReloadStatus;
716
852
  getAuthConfig(): AuthConfig;
717
853
  getWebSocketStatus(): WebSocketStatus;
718
854
  streamTaskStatus(_taskId: string): Record<string, unknown>[];
@@ -800,31 +936,147 @@ interface RealtimeClientOptions {
800
936
  getToken?: (() => string | Promise<string>) | string;
801
937
  /** Whether to auto-connect on construction (default: false). */
802
938
  autoConnect?: boolean;
939
+ /**
940
+ * Client identifier sent as the `client_id` query parameter at connection
941
+ * time. The server uses this for logging/diagnostics.
942
+ * Defaults to `"orchestrator-client"`.
943
+ */
944
+ clientId?: string;
945
+ /**
946
+ * Locale tag sent as the `locale` query parameter at connection time
947
+ * (e.g. `"hu-hu"`, `"en-us"`). When set the server automatically joins
948
+ * the client into the matching `locale:<tag>` room so translation-ready
949
+ * events are delivered without a separate `subscribeLocale()` call.
950
+ */
951
+ locale?: string;
803
952
  }
804
953
  /**
805
954
  * Socket.IO-based realtime client for receiving orchestrator events.
955
+ *
956
+ * The server wraps all domain events in a `message` Socket.IO event with an
957
+ * inner `event_type` field. This client unwraps the envelope and dispatches
958
+ * to registered handlers by event_type.
959
+ *
960
+ * ## Two subscription APIs — choose one or mix them:
961
+ *
962
+ * ### 1. Event-type handlers via `on(event, handler)`
963
+ * Registers a callback for a specific event type string (e.g.
964
+ * `"task_status_changed"`). You still need to join the relevant rooms
965
+ * manually via `subscribeTask()`, `subscribeEvents()`, etc.
966
+ *
967
+ * ### 2. Room-scoped subscribers via `subscribe(handler, rooms)`
968
+ * Mirrors the WebSocketProvider pattern used in the webui. Each call
969
+ * returns an opaque subscription id. Calling `unsubscribe(id)` removes it.
970
+ * Room membership is kept in sync automatically: the client joins the union
971
+ * of all subscribers' rooms and leaves rooms that are no longer needed.
972
+ * The handler receives the unwrapped event dict for every event from those
973
+ * rooms, regardless of type.
806
974
  */
807
975
  declare class RealtimeClient {
808
976
  private _baseUrl;
809
977
  private _socketOptions;
810
978
  private _getToken?;
979
+ private _clientId;
980
+ private _locale?;
811
981
  private _socket;
812
982
  private _handlers;
813
983
  private _connected;
984
+ private _subscriptions;
985
+ private _currentRooms;
986
+ private _subIdCounter;
814
987
  constructor(baseUrl: string, opts: RealtimeClientOptions);
815
988
  get connected(): boolean;
816
989
  connect(): Promise<void>;
817
990
  disconnect(): Promise<void>;
991
+ /**
992
+ * Dispatch a message envelope to registered handlers and subscribers.
993
+ * The server sends: socket.emit("message", {type: "message", event: {..., event_type: "...", ...}})
994
+ */
995
+ private _dispatch;
818
996
  /**
819
997
  * Subscribe to realtime events for a specific task.
998
+ * Emits a `join` event with `{rooms: ["task:{taskId}"]}`.
820
999
  */
821
- subscribeTask(taskId: string): Promise<void>;
1000
+ subscribeTask(taskId: string): void;
822
1001
  /**
823
1002
  * Unsubscribe from realtime events for a specific task.
1003
+ * Emits a `leave` event with `{rooms: ["task:{taskId}"]}`.
1004
+ */
1005
+ unsubscribeTask(taskId: string): void;
1006
+ /**
1007
+ * Subscribe to event-type-scoped rooms.
1008
+ * e.g. subscribeEvents("task_created", "task_deleted")
1009
+ */
1010
+ subscribeEvents(...eventTypes: string[]): void;
1011
+ /**
1012
+ * Unsubscribe from event-type-scoped rooms.
1013
+ */
1014
+ unsubscribeEvents(...eventTypes: string[]): void;
1015
+ /**
1016
+ * Subscribe to the `all` broadcast room (receives all events).
1017
+ */
1018
+ subscribeAll(): void;
1019
+ /**
1020
+ * Subscribe to a locale-specific room.
1021
+ */
1022
+ subscribeLocale(locale: string): void;
1023
+ /**
1024
+ * Unsubscribe from a locale-specific room.
824
1025
  */
825
- unsubscribeTask(taskId: string): Promise<void>;
1026
+ unsubscribeLocale(locale: string): void;
1027
+ /**
1028
+ * Join arbitrary rooms by name.
1029
+ */
1030
+ joinRooms(rooms: string[]): void;
1031
+ /**
1032
+ * Leave arbitrary rooms by name.
1033
+ */
1034
+ leaveRooms(rooms: string[]): void;
1035
+ /**
1036
+ * Register a subscriber that receives all events from the given rooms.
1037
+ *
1038
+ * Room membership is managed automatically: the client joins the union
1039
+ * of all active subscribers' rooms and leaves rooms that are no longer
1040
+ * needed when the last subscriber referencing them is removed.
1041
+ *
1042
+ * The `handler` receives the unwrapped event dict (same object that
1043
+ * `on()` handlers receive).
1044
+ *
1045
+ * Returns an opaque subscription id that must be passed to
1046
+ * `unsubscribe()` to remove the subscription.
1047
+ *
1048
+ * Example — mirror the webui's per-component subscription pattern:
1049
+ *
1050
+ * const id = rt.subscribe((event) => {
1051
+ * if (event.event_type === "task_status_changed") { ... }
1052
+ * }, [`task:${taskId}`]);
1053
+ *
1054
+ * // later, on cleanup:
1055
+ * rt.unsubscribe(id);
1056
+ */
1057
+ subscribe(handler: EventHandler, rooms: string[]): string;
1058
+ /**
1059
+ * Remove a subscription registered via `subscribe()`.
1060
+ *
1061
+ * Rooms that are no longer referenced by any remaining subscriber are
1062
+ * left automatically.
1063
+ */
1064
+ unsubscribe(id: string): void;
1065
+ /**
1066
+ * Diff the union of all subscribers' rooms against the currently joined
1067
+ * rooms and emit `join`/`leave` for the delta. No-ops when not connected.
1068
+ */
1069
+ private _syncRooms;
1070
+ /**
1071
+ * Send a ping to the server.
1072
+ */
1073
+ ping(): void;
826
1074
  /**
827
1075
  * Register a handler for a specific event type.
1076
+ *
1077
+ * Domain events (task_created, task_status_changed, etc.) are dispatched
1078
+ * via the message envelope. Raw socket events (connect, disconnect,
1079
+ * connection_established, rooms_updated, pong) are wired directly.
828
1080
  */
829
1081
  on(event: string, handler: EventHandler): void;
830
1082
  /**