orchestrator-client 5.8.3 → 5.9.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
@@ -29,11 +29,21 @@ interface TaskSummary {
29
29
  approvalReason: string;
30
30
  ticketId: string | null;
31
31
  availableTools: string[] | null;
32
+ /** Resolved skill references (name + description snapshot) at creation. */
33
+ skills: {
34
+ name: string;
35
+ description: string;
36
+ }[] | null;
32
37
  insight: string | null;
33
38
  insightLocalized: string | null;
34
39
  createdAt: string;
35
40
  updatedAt: string;
36
41
  pendingTranslationsForLocales?: string[] | null;
42
+ /**
43
+ * Workflow-specific data blob. Present on list responses (the API's
44
+ * TaskStatusResponse carries workflow_data); null on legacy rows.
45
+ */
46
+ workflowData?: Record<string, unknown> | null;
37
47
  }
38
48
  /** Per-task feature toggles set at creation time. */
39
49
  interface TaskOptions {
@@ -387,6 +397,21 @@ interface ToolsListResult {
387
397
  totalTools: number;
388
398
  servers: string[];
389
399
  }
400
+ /** The default toolset one workflow (or workflow variant) resolves to. */
401
+ interface WorkflowToolDefaults {
402
+ workflowId: string;
403
+ /** Null for every workflow except `vsa`, which is variant-aware. */
404
+ variant: string | null;
405
+ tools: string[];
406
+ }
407
+ /**
408
+ * Default toolsets as returned by `GET /tools/defaults`.
409
+ *
410
+ * `vsa` appears once per variant; every other workflow gets a single entry.
411
+ */
412
+ interface ToolDefaultsResult {
413
+ workflows: WorkflowToolDefaults[];
414
+ }
390
415
  interface ToolCatalogEntry {
391
416
  name: string;
392
417
  description: string;
@@ -417,6 +442,48 @@ interface CatalogValidationResult {
417
442
  totalIssues: number;
418
443
  }
419
444
 
445
+ /** Skill availability mapping: which workflow/variant/tool a skill needs. */
446
+ interface SkillMapping {
447
+ id: number;
448
+ workflowId: string;
449
+ /** Null matches every variant of the workflow. */
450
+ variant: string | null;
451
+ /** Tool the task toolset must contain; null means no tool gate. */
452
+ requiredTool: string | null;
453
+ }
454
+ /** A skill definition with its availability mappings. */
455
+ interface Skill {
456
+ id: number;
457
+ name: string;
458
+ description: string;
459
+ content: string;
460
+ createdAt: string;
461
+ updatedAt: string;
462
+ mappings: SkillMapping[];
463
+ }
464
+ /** Result of `GET /skills`. */
465
+ interface SkillsListResult {
466
+ skills: Skill[];
467
+ total: number;
468
+ }
469
+ /** Payload for `POST /skills`. */
470
+ interface SkillCreatePayload {
471
+ name: string;
472
+ description: string;
473
+ content: string;
474
+ }
475
+ /** Payload for `PUT /skills/:id` — only provided fields are applied. */
476
+ interface SkillUpdatePayload {
477
+ description?: string;
478
+ content?: string;
479
+ }
480
+ /** Payload for `POST /skills/:id/mappings`. */
481
+ interface SkillMappingCreatePayload {
482
+ workflowId: string;
483
+ variant?: string | null;
484
+ requiredTool?: string | null;
485
+ }
486
+
420
487
  interface CompactionEvent {
421
488
  id: number;
422
489
  taskId: string;
@@ -615,7 +682,14 @@ declare class OrchestratorAsync {
615
682
  solutionStrategy?: string;
616
683
  agentModelId?: string;
617
684
  orchestratorModelId?: string;
618
- availableTools?: string[];
685
+ /**
686
+ * Complete tool list for the task, built-in tools included -- naming a
687
+ * subset also switches the built-ins off. Omit (or pass `null`) to get
688
+ * the workflow's default toolset, which is resolved and stored on the
689
+ * task at creation time; see {@link getToolDefaults}. Pass `[]` to run
690
+ * the agent with no tools at all.
691
+ */
692
+ availableTools?: string[] | null;
619
693
  attachmentIds?: string[];
620
694
  options?: Record<string, boolean>;
621
695
  }): Promise<TaskCreateResponse>;
@@ -660,6 +734,11 @@ declare class OrchestratorAsync {
660
734
  title?: string;
661
735
  agentModelId?: string;
662
736
  orchestratorModelId?: string;
737
+ /**
738
+ * Complete tool list for the task, built-ins included. Omit for the
739
+ * variant's default toolset; pass `[]` to run with no tools.
740
+ */
741
+ availableTools?: string[] | null;
663
742
  attachmentIds?: string[];
664
743
  options?: Record<string, boolean>;
665
744
  delegatedToken?: string;
@@ -692,9 +771,30 @@ declare class OrchestratorAsync {
692
771
  getMioContext(taskId: string): Promise<MioContext>;
693
772
  getMioMemories(taskId: string, includeCommon?: boolean): Promise<MioMemoriesResult>;
694
773
  listTools(): Promise<ToolsListResult>;
774
+ /**
775
+ * Default toolset every workflow uses when `availableTools` is omitted.
776
+ *
777
+ * Resolved against the live catalog, so it only names tools that are
778
+ * reachable right now -- the same list a task created at this moment
779
+ * would receive.
780
+ */
781
+ getToolDefaults(): Promise<ToolDefaultsResult>;
695
782
  getToolCatalog(): Promise<ToolCatalogResult>;
696
783
  refreshMCPTools(): Promise<MCPRefreshResult>;
697
784
  validateToolCatalog(): Promise<CatalogValidationResult>;
785
+ listSkills(): Promise<SkillsListResult>;
786
+ getSkill(skillId: number): Promise<Skill>;
787
+ createSkill(payload: SkillCreatePayload): Promise<Skill>;
788
+ updateSkill(skillId: number, payload: SkillUpdatePayload): Promise<Skill>;
789
+ deleteSkill(skillId: number): Promise<{
790
+ deleted: boolean;
791
+ skillId: number;
792
+ }>;
793
+ addSkillMapping(skillId: number, payload: SkillMappingCreatePayload): Promise<SkillMapping>;
794
+ deleteSkillMapping(skillId: number, mappingId: number): Promise<{
795
+ deleted: boolean;
796
+ mappingId: number;
797
+ }>;
698
798
  getWorkflowStates(): Promise<WorkflowStates>;
699
799
  updateTaskModels(taskId: string, models: {
700
800
  agentModelId?: string;
@@ -830,9 +930,23 @@ declare class Orchestrator {
830
930
  getMioContext(taskId: string): MioContext;
831
931
  getMioMemories(taskId: string, includeCommon?: boolean): MioMemoriesResult;
832
932
  listTools(): ToolsListResult;
933
+ getToolDefaults(): ToolDefaultsResult;
833
934
  getToolCatalog(): ToolCatalogResult;
834
935
  refreshMCPTools(): MCPRefreshResult;
835
936
  validateToolCatalog(): CatalogValidationResult;
937
+ listSkills(): SkillsListResult;
938
+ getSkill(skillId: number): Skill;
939
+ createSkill(payload: Parameters<OrchestratorAsync["createSkill"]>[0]): Skill;
940
+ updateSkill(skillId: number, payload: Parameters<OrchestratorAsync["updateSkill"]>[1]): Skill;
941
+ deleteSkill(skillId: number): {
942
+ deleted: boolean;
943
+ skillId: number;
944
+ };
945
+ addSkillMapping(skillId: number, payload: Parameters<OrchestratorAsync["addSkillMapping"]>[1]): SkillMapping;
946
+ deleteSkillMapping(skillId: number, mappingId: number): {
947
+ deleted: boolean;
948
+ mappingId: number;
949
+ };
836
950
  getWorkflowStates(): WorkflowStates;
837
951
  updateTaskModels(taskId: string, models: {
838
952
  agentModelId?: string;
@@ -1379,4 +1493,4 @@ declare function deepCamelCase<T>(obj: T): T;
1379
1493
  */
1380
1494
  declare const VERSION = "5.6.0";
1381
1495
 
1382
- export { type ArchivedContent, type AttachmentMeta, type AttachmentUploadResponse, type AuthConfig, type CompactionEvent, type ComponentHealth, type ConfigurationStatus, type ConversationResult, DEFAULT_FLOW_TIMEOUT_MS, EVENT_ERROR_EVENT_RECORDED, EVENT_MESSAGE_ADDED, EVENT_MESSAGE_STREAMING, EVENT_MESSAGE_SUMMARY_GENERATED, EVENT_MESSAGE_TRANSLATION_READY, EVENT_TASK_CREATED, EVENT_TASK_DELETED, EVENT_TASK_INSIGHT_UPDATED, EVENT_TASK_ITERATION_CHANGED, EVENT_TASK_RESULT_UPDATED, EVENT_TASK_STATUS_CHANGED, type ErrorCountResult, type ErrorEvent, type ErrorEventDetail, type ErrorEventListResult, type ErrorPurgeResult, type ErrorStatsResult, type EventHandler, Flow, FlowCancelledError, FlowError, type FlowRunParams, FlowTimeoutError, type HealthDetail, type HealthStatus, type LLMBackendInfo, type LLMBackendStatus, type LLMModelContextInfo, type LLMModelVisionInfo, type LeaderStatus, type LockStatus, type MCPServerInfo, type MCPServerStatus, type MatrixConversationResult, type Message, type MessageDeleteMultipleResult, type MessageTranslation, type MessageTranslationReadyEvent, type MessageTranslationsResult, type MetricSnapshot, type MioContext, type MioMemoriesResult, type MioMemoryItem, Orchestrator, OrchestratorAPIError, OrchestratorAsync, OrchestratorAuthError, type OrchestratorClientOptions, type OrchestratorConfig, OrchestratorConfigError, OrchestratorConnectionError, OrchestratorError, OrchestratorNotFoundError, type Pagination$1 as Pagination, type ReadinessCheck, type ReadinessResult, RealtimeClient, type RealtimeClientOptions, type ReloadServicesResult, type ReloadStatus, type SlotInfo, type SlotsStatus, type SubagentsStatus, type SuccessResponse, type SummaryWorkerStatus, type SystemStatus, type SystemStatusSettings, type TaskCancelResponse, type TaskCreateResponse, type TaskDeleteResult, type TaskDetail, type TaskHandlerCluster, type TaskHandlerReplica, type TaskHandlerStatus, type TaskHandlerStatusLocal, type TaskJournal, type TaskListResult, type TaskOptions, type TaskSummary, type TokenWorkerStatus, type ToolCall, type ToolInfo, type ToolsListResult, VERSION, type VSATaskCreateResponse, type WebSocketClientInfo, type WebSocketStatus, type WorkflowStates, camelToSnake, createInsecureFetch, deepCamelCase, extractJsonFromMessage, loadConfig, setupDefaultClient, snakeToCamel };
1496
+ export { type ArchivedContent, type AttachmentMeta, type AttachmentUploadResponse, type AuthConfig, type CompactionEvent, type ComponentHealth, type ConfigurationStatus, type ConversationResult, DEFAULT_FLOW_TIMEOUT_MS, EVENT_ERROR_EVENT_RECORDED, EVENT_MESSAGE_ADDED, EVENT_MESSAGE_STREAMING, EVENT_MESSAGE_SUMMARY_GENERATED, EVENT_MESSAGE_TRANSLATION_READY, EVENT_TASK_CREATED, EVENT_TASK_DELETED, EVENT_TASK_INSIGHT_UPDATED, EVENT_TASK_ITERATION_CHANGED, EVENT_TASK_RESULT_UPDATED, EVENT_TASK_STATUS_CHANGED, type ErrorCountResult, type ErrorEvent, type ErrorEventDetail, type ErrorEventListResult, type ErrorPurgeResult, type ErrorStatsResult, type EventHandler, Flow, FlowCancelledError, FlowError, type FlowRunParams, FlowTimeoutError, type HealthDetail, type HealthStatus, type LLMBackendInfo, type LLMBackendStatus, type LLMModelContextInfo, type LLMModelVisionInfo, type LeaderStatus, type LockStatus, type MCPServerInfo, type MCPServerStatus, type MatrixConversationResult, type Message, type MessageDeleteMultipleResult, type MessageTranslation, type MessageTranslationReadyEvent, type MessageTranslationsResult, type MetricSnapshot, type MioContext, type MioMemoriesResult, type MioMemoryItem, Orchestrator, OrchestratorAPIError, OrchestratorAsync, OrchestratorAuthError, type OrchestratorClientOptions, type OrchestratorConfig, OrchestratorConfigError, OrchestratorConnectionError, OrchestratorError, OrchestratorNotFoundError, type Pagination$1 as Pagination, type ReadinessCheck, type ReadinessResult, RealtimeClient, type RealtimeClientOptions, type ReloadServicesResult, type ReloadStatus, type SlotInfo, type SlotsStatus, type SubagentsStatus, type SuccessResponse, type SummaryWorkerStatus, type SystemStatus, type SystemStatusSettings, type TaskCancelResponse, type TaskCreateResponse, type TaskDeleteResult, type TaskDetail, type TaskHandlerCluster, type TaskHandlerReplica, type TaskHandlerStatus, type TaskHandlerStatusLocal, type TaskJournal, type TaskListResult, type TaskOptions, type TaskSummary, type TokenWorkerStatus, type ToolCall, type ToolDefaultsResult, type ToolInfo, type ToolsListResult, VERSION, type VSATaskCreateResponse, type WebSocketClientInfo, type WebSocketStatus, type WorkflowStates, type WorkflowToolDefaults, camelToSnake, createInsecureFetch, deepCamelCase, extractJsonFromMessage, loadConfig, setupDefaultClient, snakeToCamel };
package/dist/index.d.ts CHANGED
@@ -29,11 +29,21 @@ interface TaskSummary {
29
29
  approvalReason: string;
30
30
  ticketId: string | null;
31
31
  availableTools: string[] | null;
32
+ /** Resolved skill references (name + description snapshot) at creation. */
33
+ skills: {
34
+ name: string;
35
+ description: string;
36
+ }[] | null;
32
37
  insight: string | null;
33
38
  insightLocalized: string | null;
34
39
  createdAt: string;
35
40
  updatedAt: string;
36
41
  pendingTranslationsForLocales?: string[] | null;
42
+ /**
43
+ * Workflow-specific data blob. Present on list responses (the API's
44
+ * TaskStatusResponse carries workflow_data); null on legacy rows.
45
+ */
46
+ workflowData?: Record<string, unknown> | null;
37
47
  }
38
48
  /** Per-task feature toggles set at creation time. */
39
49
  interface TaskOptions {
@@ -387,6 +397,21 @@ interface ToolsListResult {
387
397
  totalTools: number;
388
398
  servers: string[];
389
399
  }
400
+ /** The default toolset one workflow (or workflow variant) resolves to. */
401
+ interface WorkflowToolDefaults {
402
+ workflowId: string;
403
+ /** Null for every workflow except `vsa`, which is variant-aware. */
404
+ variant: string | null;
405
+ tools: string[];
406
+ }
407
+ /**
408
+ * Default toolsets as returned by `GET /tools/defaults`.
409
+ *
410
+ * `vsa` appears once per variant; every other workflow gets a single entry.
411
+ */
412
+ interface ToolDefaultsResult {
413
+ workflows: WorkflowToolDefaults[];
414
+ }
390
415
  interface ToolCatalogEntry {
391
416
  name: string;
392
417
  description: string;
@@ -417,6 +442,48 @@ interface CatalogValidationResult {
417
442
  totalIssues: number;
418
443
  }
419
444
 
445
+ /** Skill availability mapping: which workflow/variant/tool a skill needs. */
446
+ interface SkillMapping {
447
+ id: number;
448
+ workflowId: string;
449
+ /** Null matches every variant of the workflow. */
450
+ variant: string | null;
451
+ /** Tool the task toolset must contain; null means no tool gate. */
452
+ requiredTool: string | null;
453
+ }
454
+ /** A skill definition with its availability mappings. */
455
+ interface Skill {
456
+ id: number;
457
+ name: string;
458
+ description: string;
459
+ content: string;
460
+ createdAt: string;
461
+ updatedAt: string;
462
+ mappings: SkillMapping[];
463
+ }
464
+ /** Result of `GET /skills`. */
465
+ interface SkillsListResult {
466
+ skills: Skill[];
467
+ total: number;
468
+ }
469
+ /** Payload for `POST /skills`. */
470
+ interface SkillCreatePayload {
471
+ name: string;
472
+ description: string;
473
+ content: string;
474
+ }
475
+ /** Payload for `PUT /skills/:id` — only provided fields are applied. */
476
+ interface SkillUpdatePayload {
477
+ description?: string;
478
+ content?: string;
479
+ }
480
+ /** Payload for `POST /skills/:id/mappings`. */
481
+ interface SkillMappingCreatePayload {
482
+ workflowId: string;
483
+ variant?: string | null;
484
+ requiredTool?: string | null;
485
+ }
486
+
420
487
  interface CompactionEvent {
421
488
  id: number;
422
489
  taskId: string;
@@ -615,7 +682,14 @@ declare class OrchestratorAsync {
615
682
  solutionStrategy?: string;
616
683
  agentModelId?: string;
617
684
  orchestratorModelId?: string;
618
- availableTools?: string[];
685
+ /**
686
+ * Complete tool list for the task, built-in tools included -- naming a
687
+ * subset also switches the built-ins off. Omit (or pass `null`) to get
688
+ * the workflow's default toolset, which is resolved and stored on the
689
+ * task at creation time; see {@link getToolDefaults}. Pass `[]` to run
690
+ * the agent with no tools at all.
691
+ */
692
+ availableTools?: string[] | null;
619
693
  attachmentIds?: string[];
620
694
  options?: Record<string, boolean>;
621
695
  }): Promise<TaskCreateResponse>;
@@ -660,6 +734,11 @@ declare class OrchestratorAsync {
660
734
  title?: string;
661
735
  agentModelId?: string;
662
736
  orchestratorModelId?: string;
737
+ /**
738
+ * Complete tool list for the task, built-ins included. Omit for the
739
+ * variant's default toolset; pass `[]` to run with no tools.
740
+ */
741
+ availableTools?: string[] | null;
663
742
  attachmentIds?: string[];
664
743
  options?: Record<string, boolean>;
665
744
  delegatedToken?: string;
@@ -692,9 +771,30 @@ declare class OrchestratorAsync {
692
771
  getMioContext(taskId: string): Promise<MioContext>;
693
772
  getMioMemories(taskId: string, includeCommon?: boolean): Promise<MioMemoriesResult>;
694
773
  listTools(): Promise<ToolsListResult>;
774
+ /**
775
+ * Default toolset every workflow uses when `availableTools` is omitted.
776
+ *
777
+ * Resolved against the live catalog, so it only names tools that are
778
+ * reachable right now -- the same list a task created at this moment
779
+ * would receive.
780
+ */
781
+ getToolDefaults(): Promise<ToolDefaultsResult>;
695
782
  getToolCatalog(): Promise<ToolCatalogResult>;
696
783
  refreshMCPTools(): Promise<MCPRefreshResult>;
697
784
  validateToolCatalog(): Promise<CatalogValidationResult>;
785
+ listSkills(): Promise<SkillsListResult>;
786
+ getSkill(skillId: number): Promise<Skill>;
787
+ createSkill(payload: SkillCreatePayload): Promise<Skill>;
788
+ updateSkill(skillId: number, payload: SkillUpdatePayload): Promise<Skill>;
789
+ deleteSkill(skillId: number): Promise<{
790
+ deleted: boolean;
791
+ skillId: number;
792
+ }>;
793
+ addSkillMapping(skillId: number, payload: SkillMappingCreatePayload): Promise<SkillMapping>;
794
+ deleteSkillMapping(skillId: number, mappingId: number): Promise<{
795
+ deleted: boolean;
796
+ mappingId: number;
797
+ }>;
698
798
  getWorkflowStates(): Promise<WorkflowStates>;
699
799
  updateTaskModels(taskId: string, models: {
700
800
  agentModelId?: string;
@@ -830,9 +930,23 @@ declare class Orchestrator {
830
930
  getMioContext(taskId: string): MioContext;
831
931
  getMioMemories(taskId: string, includeCommon?: boolean): MioMemoriesResult;
832
932
  listTools(): ToolsListResult;
933
+ getToolDefaults(): ToolDefaultsResult;
833
934
  getToolCatalog(): ToolCatalogResult;
834
935
  refreshMCPTools(): MCPRefreshResult;
835
936
  validateToolCatalog(): CatalogValidationResult;
937
+ listSkills(): SkillsListResult;
938
+ getSkill(skillId: number): Skill;
939
+ createSkill(payload: Parameters<OrchestratorAsync["createSkill"]>[0]): Skill;
940
+ updateSkill(skillId: number, payload: Parameters<OrchestratorAsync["updateSkill"]>[1]): Skill;
941
+ deleteSkill(skillId: number): {
942
+ deleted: boolean;
943
+ skillId: number;
944
+ };
945
+ addSkillMapping(skillId: number, payload: Parameters<OrchestratorAsync["addSkillMapping"]>[1]): SkillMapping;
946
+ deleteSkillMapping(skillId: number, mappingId: number): {
947
+ deleted: boolean;
948
+ mappingId: number;
949
+ };
836
950
  getWorkflowStates(): WorkflowStates;
837
951
  updateTaskModels(taskId: string, models: {
838
952
  agentModelId?: string;
@@ -1379,4 +1493,4 @@ declare function deepCamelCase<T>(obj: T): T;
1379
1493
  */
1380
1494
  declare const VERSION = "5.6.0";
1381
1495
 
1382
- export { type ArchivedContent, type AttachmentMeta, type AttachmentUploadResponse, type AuthConfig, type CompactionEvent, type ComponentHealth, type ConfigurationStatus, type ConversationResult, DEFAULT_FLOW_TIMEOUT_MS, EVENT_ERROR_EVENT_RECORDED, EVENT_MESSAGE_ADDED, EVENT_MESSAGE_STREAMING, EVENT_MESSAGE_SUMMARY_GENERATED, EVENT_MESSAGE_TRANSLATION_READY, EVENT_TASK_CREATED, EVENT_TASK_DELETED, EVENT_TASK_INSIGHT_UPDATED, EVENT_TASK_ITERATION_CHANGED, EVENT_TASK_RESULT_UPDATED, EVENT_TASK_STATUS_CHANGED, type ErrorCountResult, type ErrorEvent, type ErrorEventDetail, type ErrorEventListResult, type ErrorPurgeResult, type ErrorStatsResult, type EventHandler, Flow, FlowCancelledError, FlowError, type FlowRunParams, FlowTimeoutError, type HealthDetail, type HealthStatus, type LLMBackendInfo, type LLMBackendStatus, type LLMModelContextInfo, type LLMModelVisionInfo, type LeaderStatus, type LockStatus, type MCPServerInfo, type MCPServerStatus, type MatrixConversationResult, type Message, type MessageDeleteMultipleResult, type MessageTranslation, type MessageTranslationReadyEvent, type MessageTranslationsResult, type MetricSnapshot, type MioContext, type MioMemoriesResult, type MioMemoryItem, Orchestrator, OrchestratorAPIError, OrchestratorAsync, OrchestratorAuthError, type OrchestratorClientOptions, type OrchestratorConfig, OrchestratorConfigError, OrchestratorConnectionError, OrchestratorError, OrchestratorNotFoundError, type Pagination$1 as Pagination, type ReadinessCheck, type ReadinessResult, RealtimeClient, type RealtimeClientOptions, type ReloadServicesResult, type ReloadStatus, type SlotInfo, type SlotsStatus, type SubagentsStatus, type SuccessResponse, type SummaryWorkerStatus, type SystemStatus, type SystemStatusSettings, type TaskCancelResponse, type TaskCreateResponse, type TaskDeleteResult, type TaskDetail, type TaskHandlerCluster, type TaskHandlerReplica, type TaskHandlerStatus, type TaskHandlerStatusLocal, type TaskJournal, type TaskListResult, type TaskOptions, type TaskSummary, type TokenWorkerStatus, type ToolCall, type ToolInfo, type ToolsListResult, VERSION, type VSATaskCreateResponse, type WebSocketClientInfo, type WebSocketStatus, type WorkflowStates, camelToSnake, createInsecureFetch, deepCamelCase, extractJsonFromMessage, loadConfig, setupDefaultClient, snakeToCamel };
1496
+ export { type ArchivedContent, type AttachmentMeta, type AttachmentUploadResponse, type AuthConfig, type CompactionEvent, type ComponentHealth, type ConfigurationStatus, type ConversationResult, DEFAULT_FLOW_TIMEOUT_MS, EVENT_ERROR_EVENT_RECORDED, EVENT_MESSAGE_ADDED, EVENT_MESSAGE_STREAMING, EVENT_MESSAGE_SUMMARY_GENERATED, EVENT_MESSAGE_TRANSLATION_READY, EVENT_TASK_CREATED, EVENT_TASK_DELETED, EVENT_TASK_INSIGHT_UPDATED, EVENT_TASK_ITERATION_CHANGED, EVENT_TASK_RESULT_UPDATED, EVENT_TASK_STATUS_CHANGED, type ErrorCountResult, type ErrorEvent, type ErrorEventDetail, type ErrorEventListResult, type ErrorPurgeResult, type ErrorStatsResult, type EventHandler, Flow, FlowCancelledError, FlowError, type FlowRunParams, FlowTimeoutError, type HealthDetail, type HealthStatus, type LLMBackendInfo, type LLMBackendStatus, type LLMModelContextInfo, type LLMModelVisionInfo, type LeaderStatus, type LockStatus, type MCPServerInfo, type MCPServerStatus, type MatrixConversationResult, type Message, type MessageDeleteMultipleResult, type MessageTranslation, type MessageTranslationReadyEvent, type MessageTranslationsResult, type MetricSnapshot, type MioContext, type MioMemoriesResult, type MioMemoryItem, Orchestrator, OrchestratorAPIError, OrchestratorAsync, OrchestratorAuthError, type OrchestratorClientOptions, type OrchestratorConfig, OrchestratorConfigError, OrchestratorConnectionError, OrchestratorError, OrchestratorNotFoundError, type Pagination$1 as Pagination, type ReadinessCheck, type ReadinessResult, RealtimeClient, type RealtimeClientOptions, type ReloadServicesResult, type ReloadStatus, type SlotInfo, type SlotsStatus, type SubagentsStatus, type SuccessResponse, type SummaryWorkerStatus, type SystemStatus, type SystemStatusSettings, type TaskCancelResponse, type TaskCreateResponse, type TaskDeleteResult, type TaskDetail, type TaskHandlerCluster, type TaskHandlerReplica, type TaskHandlerStatus, type TaskHandlerStatusLocal, type TaskJournal, type TaskListResult, type TaskOptions, type TaskSummary, type TokenWorkerStatus, type ToolCall, type ToolDefaultsResult, type ToolInfo, type ToolsListResult, VERSION, type VSATaskCreateResponse, type WebSocketClientInfo, type WebSocketStatus, type WorkflowStates, type WorkflowToolDefaults, camelToSnake, createInsecureFetch, deepCamelCase, extractJsonFromMessage, loadConfig, setupDefaultClient, snakeToCamel };
package/dist/index.js CHANGED
@@ -80,6 +80,27 @@ function buildPagination(data) {
80
80
  hasPrev: p.hasPrev ?? false
81
81
  };
82
82
  }
83
+ function buildSkillMapping(m) {
84
+ return {
85
+ id: m.id ?? 0,
86
+ workflowId: m.workflowId ?? m.workflow_id ?? "",
87
+ variant: m.variant ?? null,
88
+ requiredTool: m.requiredTool ?? m.required_tool ?? null
89
+ };
90
+ }
91
+ function buildSkill(s) {
92
+ return {
93
+ id: s.id ?? 0,
94
+ name: s.name ?? "",
95
+ description: s.description ?? "",
96
+ content: s.content ?? "",
97
+ createdAt: s.createdAt ?? s.created_at ?? "",
98
+ updatedAt: s.updatedAt ?? s.updated_at ?? "",
99
+ mappings: (s.mappings ?? []).map(
100
+ (m) => buildSkillMapping(m)
101
+ )
102
+ };
103
+ }
83
104
  function buildTaskSummary(t) {
84
105
  return {
85
106
  id: t.id ?? "",
@@ -93,11 +114,23 @@ function buildTaskSummary(t) {
93
114
  approvalReason: t.approvalReason ?? "",
94
115
  ticketId: t.ticketId ?? null,
95
116
  availableTools: t.availableTools ?? null,
117
+ skills: t.skills ?? null,
96
118
  insight: t.insight ?? null,
97
119
  insightLocalized: t.insightLocalized ?? null,
98
120
  createdAt: t.createdAt ?? "",
99
121
  updatedAt: t.updatedAt ?? "",
100
- pendingTranslationsForLocales: t.pendingTranslationsForLocales ?? null
122
+ pendingTranslationsForLocales: t.pendingTranslationsForLocales ?? null,
123
+ workflowData: t.workflowData ?? null
124
+ };
125
+ }
126
+ function buildVsaTaskList(data) {
127
+ const raw = Array.isArray(data) ? data : data.tasks ?? [];
128
+ const tasks = raw.map(
129
+ (item) => typeof item === "string" ? { id: item } : buildTaskSummary(item)
130
+ );
131
+ return {
132
+ tasks,
133
+ pagination: buildPagination(data ?? {})
101
134
  };
102
135
  }
103
136
  function parseApiErrorBody(body, fallbackMessage) {
@@ -695,6 +728,7 @@ var OrchestratorAsync = class {
695
728
  title: params.title,
696
729
  agent_model_id: params.agentModelId,
697
730
  orchestrator_model_id: params.orchestratorModelId,
731
+ available_tools: params.availableTools,
698
732
  attachment_ids: params.attachmentIds,
699
733
  options: params.options
700
734
  };
@@ -771,10 +805,7 @@ var OrchestratorAsync = class {
771
805
  limit: params?.limit,
772
806
  offset: params?.offset
773
807
  });
774
- const tasks = (data.tasks ?? []).map(
775
- buildTaskSummary
776
- );
777
- return { tasks, pagination: buildPagination(data) };
808
+ return buildVsaTaskList(data);
778
809
  }
779
810
  async searchVSATasks(userId, query, limit) {
780
811
  const data = await this._get("/task/vsa/search", {
@@ -782,10 +813,7 @@ var OrchestratorAsync = class {
782
813
  query,
783
814
  limit
784
815
  });
785
- const tasks = (data.tasks ?? []).map(
786
- buildTaskSummary
787
- );
788
- return { tasks, pagination: buildPagination(data) };
816
+ return buildVsaTaskList(data);
789
817
  }
790
818
  async deleteVSATasksBulk(taskIds) {
791
819
  const data = await this._post(
@@ -891,6 +919,25 @@ var OrchestratorAsync = class {
891
919
  servers: data.servers ?? []
892
920
  };
893
921
  }
922
+ /**
923
+ * Default toolset every workflow uses when `availableTools` is omitted.
924
+ *
925
+ * Resolved against the live catalog, so it only names tools that are
926
+ * reachable right now -- the same list a task created at this moment
927
+ * would receive.
928
+ */
929
+ async getToolDefaults() {
930
+ const data = await this._get("/tools/defaults");
931
+ return {
932
+ workflows: (data.workflows ?? []).map(
933
+ (w) => ({
934
+ workflowId: w.workflowId ?? w.workflow_id ?? "",
935
+ variant: w.variant ?? null,
936
+ tools: w.tools ?? []
937
+ })
938
+ )
939
+ };
940
+ }
894
941
  async getToolCatalog() {
895
942
  return this._get("/tools/catalog");
896
943
  }
@@ -901,6 +948,63 @@ var OrchestratorAsync = class {
901
948
  return this._get("/tools/validate");
902
949
  }
903
950
  // ------------------------------------------------------------------
951
+ // Skills
952
+ // ------------------------------------------------------------------
953
+ async listSkills() {
954
+ const data = await this._get("/skills");
955
+ const skills = (data.skills ?? []).map(
956
+ (s) => buildSkill(s)
957
+ );
958
+ return {
959
+ skills,
960
+ total: data.total ?? skills.length
961
+ };
962
+ }
963
+ async getSkill(skillId) {
964
+ const data = await this._get(`/skills/${skillId}`);
965
+ return buildSkill(data);
966
+ }
967
+ async createSkill(payload) {
968
+ const data = await this._post("/skills", payload);
969
+ return buildSkill(data);
970
+ }
971
+ async updateSkill(skillId, payload) {
972
+ const data = await this._put(
973
+ `/skills/${skillId}`,
974
+ payload
975
+ );
976
+ return buildSkill(data);
977
+ }
978
+ async deleteSkill(skillId) {
979
+ const data = await this._delete(
980
+ `/skills/${skillId}`
981
+ );
982
+ return {
983
+ deleted: data.deleted ?? false,
984
+ skillId: data.skillId ?? data.skill_id ?? 0
985
+ };
986
+ }
987
+ async addSkillMapping(skillId, payload) {
988
+ const data = await this._post(
989
+ `/skills/${skillId}/mappings`,
990
+ {
991
+ workflow_id: payload.workflowId,
992
+ ...payload.variant ? { variant: payload.variant } : {},
993
+ ...payload.requiredTool ? { required_tool: payload.requiredTool } : {}
994
+ }
995
+ );
996
+ return buildSkillMapping(data);
997
+ }
998
+ async deleteSkillMapping(skillId, mappingId) {
999
+ const data = await this._delete(
1000
+ `/skills/${skillId}/mappings/${mappingId}`
1001
+ );
1002
+ return {
1003
+ deleted: data.deleted ?? false,
1004
+ mappingId: data.mappingId ?? data.mapping_id ?? 0
1005
+ };
1006
+ }
1007
+ // ------------------------------------------------------------------
904
1008
  // Debug / Admin
905
1009
  // ------------------------------------------------------------------
906
1010
  async getWorkflowStates() {
@@ -1489,6 +1593,9 @@ var Orchestrator = class {
1489
1593
  listTools() {
1490
1594
  return runSync(this._async.listTools());
1491
1595
  }
1596
+ getToolDefaults() {
1597
+ return runSync(this._async.getToolDefaults());
1598
+ }
1492
1599
  getToolCatalog() {
1493
1600
  return runSync(this._async.getToolCatalog());
1494
1601
  }
@@ -1498,6 +1605,27 @@ var Orchestrator = class {
1498
1605
  validateToolCatalog() {
1499
1606
  return runSync(this._async.validateToolCatalog());
1500
1607
  }
1608
+ listSkills() {
1609
+ return runSync(this._async.listSkills());
1610
+ }
1611
+ getSkill(skillId) {
1612
+ return runSync(this._async.getSkill(skillId));
1613
+ }
1614
+ createSkill(payload) {
1615
+ return runSync(this._async.createSkill(payload));
1616
+ }
1617
+ updateSkill(skillId, payload) {
1618
+ return runSync(this._async.updateSkill(skillId, payload));
1619
+ }
1620
+ deleteSkill(skillId) {
1621
+ return runSync(this._async.deleteSkill(skillId));
1622
+ }
1623
+ addSkillMapping(skillId, payload) {
1624
+ return runSync(this._async.addSkillMapping(skillId, payload));
1625
+ }
1626
+ deleteSkillMapping(skillId, mappingId) {
1627
+ return runSync(this._async.deleteSkillMapping(skillId, mappingId));
1628
+ }
1501
1629
  // ------------------------------------------------------------------
1502
1630
  // Debug / Admin
1503
1631
  // ------------------------------------------------------------------