codemie-sdk 0.1.429 → 0.1.431

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
@@ -440,6 +440,8 @@ interface MCPServerConfig {
440
440
  headers?: Record<string, string>;
441
441
  type?: string;
442
442
  auth_token?: string;
443
+ single_usage?: boolean;
444
+ audience?: string;
443
445
  }
444
446
  interface MCPServerDetails {
445
447
  name: string;
@@ -584,6 +586,17 @@ declare const AssistantListParamsSchema: z.ZodReadonly<z.ZodObject<{
584
586
  filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
585
587
  }, z.core.$strip>>;
586
588
  type AssistantListParams = Partial<z.infer<typeof AssistantListParamsSchema>>;
589
+ declare const MCPServerConfigSchema: z.ZodOptional<z.ZodObject<{
590
+ url: z.ZodOptional<z.ZodString>;
591
+ command: z.ZodOptional<z.ZodString>;
592
+ args: z.ZodOptional<z.ZodArray<z.ZodString>>;
593
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
594
+ auth_token: z.ZodOptional<z.ZodString>;
595
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
596
+ type: z.ZodOptional<z.ZodString>;
597
+ single_usage: z.ZodOptional<z.ZodBoolean>;
598
+ audience: z.ZodOptional<z.ZodString>;
599
+ }, z.core.$strip>>;
587
600
  declare const AssistantCreateParamsSchema: z.ZodReadonly<z.ZodObject<{
588
601
  name: z.ZodString;
589
602
  description: z.ZodString;
@@ -629,6 +642,10 @@ declare const AssistantCreateParamsSchema: z.ZodReadonly<z.ZodObject<{
629
642
  args: z.ZodOptional<z.ZodArray<z.ZodString>>;
630
643
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
631
644
  auth_token: z.ZodOptional<z.ZodString>;
645
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
646
+ type: z.ZodOptional<z.ZodString>;
647
+ single_usage: z.ZodOptional<z.ZodBoolean>;
648
+ audience: z.ZodOptional<z.ZodString>;
632
649
  }, z.core.$strip>>;
633
650
  mcp_connect_url: z.ZodOptional<z.ZodString>;
634
651
  tools_tokens_size_limit: z.ZodOptional<z.ZodNumber>;
@@ -692,6 +709,10 @@ declare const AssistantUpdateParamsSchema: z.ZodReadonly<z.ZodObject<{
692
709
  args: z.ZodOptional<z.ZodArray<z.ZodString>>;
693
710
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
694
711
  auth_token: z.ZodOptional<z.ZodString>;
712
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
713
+ type: z.ZodOptional<z.ZodString>;
714
+ single_usage: z.ZodOptional<z.ZodBoolean>;
715
+ audience: z.ZodOptional<z.ZodString>;
695
716
  }, z.core.$strip>>;
696
717
  mcp_connect_url: z.ZodOptional<z.ZodString>;
697
718
  tools_tokens_size_limit: z.ZodOptional<z.ZodNumber>;
@@ -737,6 +758,88 @@ declare const AssistantChatParamsSchema: z.ZodReadonly<z.ZodObject<{
737
758
  output_schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
738
759
  }, z.core.$strip>>;
739
760
  type AssistantChatParams = z.infer<typeof AssistantChatParamsSchema>;
761
+ declare const VirtualAssistantChatParamsSchema: z.ZodReadonly<z.ZodObject<{
762
+ system_prompt: z.ZodDefault<z.ZodString>;
763
+ llm_model_type: z.ZodOptional<z.ZodString>;
764
+ temperature: z.ZodOptional<z.ZodNumber>;
765
+ top_p: z.ZodOptional<z.ZodNumber>;
766
+ toolkits: z.ZodDefault<z.ZodArray<z.ZodObject<{
767
+ toolkit: z.ZodString;
768
+ tools: z.ZodArray<z.ZodObject<{
769
+ name: z.ZodString;
770
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
771
+ settings_config: z.ZodBoolean;
772
+ user_description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
773
+ settings: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
774
+ }, z.core.$strip>>;
775
+ label: z.ZodString;
776
+ settings_config: z.ZodBoolean;
777
+ is_external: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
778
+ settings: z.ZodOptional<z.ZodAny>;
779
+ }, z.core.$strip>>>;
780
+ context: z.ZodDefault<z.ZodArray<z.ZodObject<{
781
+ context_type: z.ZodEnum<{
782
+ knowledge_base: "knowledge_base";
783
+ code: "code";
784
+ }>;
785
+ name: z.ZodString;
786
+ }, z.core.$strip>>>;
787
+ mcp_servers: z.ZodDefault<z.ZodArray<z.ZodObject<{
788
+ name: z.ZodString;
789
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
790
+ enabled: z.ZodBoolean;
791
+ config: z.ZodOptional<z.ZodObject<{
792
+ command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
793
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
794
+ args: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
795
+ env: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
796
+ auth_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
797
+ }, z.core.$strip>>;
798
+ mcp_connect_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
799
+ tools_tokens_size_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
800
+ command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
801
+ arguments: z.ZodOptional<z.ZodNullable<z.ZodString>>;
802
+ settings: z.ZodOptional<z.ZodAny>;
803
+ mcp_connect_auth_token: z.ZodOptional<z.ZodAny>;
804
+ }, z.core.$strip>>>;
805
+ skill_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
806
+ assistant_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
807
+ agent_mode: z.ZodDefault<z.ZodEnum<{
808
+ general: "general";
809
+ plan_execute: "plan_execute";
810
+ }>>;
811
+ plan_prompt: z.ZodOptional<z.ZodString>;
812
+ smart_tool_selection_enabled: z.ZodDefault<z.ZodBoolean>;
813
+ prompt_variables: z.ZodDefault<z.ZodArray<z.ZodObject<{
814
+ key: z.ZodString;
815
+ description: z.ZodOptional<z.ZodString>;
816
+ default_value: z.ZodString;
817
+ }, z.core.$strip>>>;
818
+ conversation_id: z.ZodOptional<z.ZodString>;
819
+ text: z.ZodString;
820
+ content_raw: z.ZodOptional<z.ZodString>;
821
+ file_names: z.ZodOptional<z.ZodArray<z.ZodString>>;
822
+ history: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
823
+ role: z.ZodEnum<{
824
+ Assistant: "Assistant";
825
+ User: "User";
826
+ }>;
827
+ message: z.ZodOptional<z.ZodString>;
828
+ }, z.core.$strip>>, z.ZodString]>>;
829
+ stream: z.ZodOptional<z.ZodBoolean>;
830
+ output_schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
831
+ tools_config: z.ZodOptional<z.ZodArray<z.ZodObject<{
832
+ name: z.ZodString;
833
+ tool_creds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
834
+ integration_id: z.ZodOptional<z.ZodString>;
835
+ }, z.core.$strip>>>;
836
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
837
+ top_k: z.ZodDefault<z.ZodNumber>;
838
+ propagate_headers: z.ZodDefault<z.ZodBoolean>;
839
+ disable_cache: z.ZodOptional<z.ZodBoolean>;
840
+ mcp_server_single_usage: z.ZodOptional<z.ZodBoolean>;
841
+ }, z.core.$strip>>;
842
+ type VirtualAssistantChatParams = z.input<typeof VirtualAssistantChatParamsSchema>;
740
843
  declare const AssistantVersionsListParamsSchema: z.ZodReadonly<z.ZodObject<{
741
844
  page: z.ZodOptional<z.ZodNumber>;
742
845
  per_page: z.ZodOptional<z.ZodNumber>;
@@ -814,6 +917,11 @@ declare class AssistantService {
814
917
  * Send a chat request to an assistant by slug.
815
918
  */
816
919
  chatBySlug(assistantSlug: string, _params: AssistantChatParams, headers?: Record<string, string>): Promise<BaseModelResponse>;
920
+ /**
921
+ * Run inference using an inline (virtual) assistant definition.
922
+ * No database assistant record is required. History is never persisted.
923
+ */
924
+ askVirtual(_params: VirtualAssistantChatParams, headers?: Record<string, string>): Promise<BaseModelResponse>;
817
925
  /**
818
926
  * Compare two assistant versions.
819
927
  */
@@ -2641,4 +2749,4 @@ declare class NotFoundError extends ApiError {
2641
2749
  constructor(resourceType: string, resourceId: string);
2642
2750
  }
2643
2751
 
2644
- export { type AboutUser, type AboutUserResponse, type AgentErrorDetails, type AnalyticsQueryParams, AnalyticsQueryParamsSchema, AnalyticsService, type AnyJson, ApiError, type Assistant, type AssistantBase, type AssistantCategory, type AssistantChatParams, AssistantChatParamsSchema, type AssistantCreateParams, AssistantCreateParamsSchema, type AssistantCreateResponse, type AssistantDataItem, type AssistantDetailsData, type AssistantListParams, AssistantListParamsSchema, AssistantService, type AssistantUpdateParams, AssistantUpdateParamsSchema, type AssistantUpdateResponse, type AssistantVersion, type AssistantVersionsListParams, AssistantVersionsListParamsSchema, type AuthConfig, type AzureDevOpsWiki, type AzureDevOpsWikiDataSourceCreateDto, type AzureDevOpsWikiDataSourceCreateParams, type AzureDevOpsWikiDataSourceUpdateDto, type AzureDevOpsWikiDataSourceUpdateParams, type AzureDevOpsWorkItem, type AzureDevOpsWorkItemDataSourceCreateDto, type AzureDevOpsWorkItemDataSourceCreateParams, type AzureDevOpsWorkItemDataSourceUpdateDto, type AzureDevOpsWorkItemDataSourceUpdateParams, type BackgroundTaskEntity, BackgroundTaskStatus, type BackgroundTaskStatusType, type BaseCodeParams, type BaseConfluenceParams, type BaseDataSourceCreateDto, type BaseDataSourceCreateParams, type BaseDataSourceResponse, type BaseDataSourceUpdateDto, type BaseDataSourceUpdateParams, type BaseFileParams, type BaseGoogleParams, type BaseJiraParams, type BaseModelApiResponse, type BaseModelResponse, type BaseSharePointParams, type BaseUser, type Category, type CategoryCreateParams, type CategoryListResponse, type CategoryResponse, CategoryService, type CategoryUpdateParams, ChatRole, type Code, type CodeAnalysisProviderCreateParams, type CodeDataSourceCreateDto, type CodeDataSourceCreateParams, type CodeDataSourceResponse, CodeDataSourceType, type CodeDataSourceTypeType, type CodeDataSourceUpdateDto, type CodeDataSourceUpdateParams, type CodeExplorationProviderCreateParams, CodeMieClient, type CodeMieClientConfig, CodeMieError, type ColumnDefinition, type Confluence, type ConfluenceDataSourceCreateDto, type ConfluenceDataSourceCreateParams, type ConfluenceDataSourceUpdateDto, type ConfluenceDataSourceUpdateParams, type Context, type ContextItem, ContextType, type Conversation, type ConversationCreateParams, ConversationCreateParamsSchema, type ConversationCreateRequest, type ConversationDetails, type ConversationDetailsData, ConversationService, type CostConfig, CredentialTypes, type CredentialTypesType, type CredentialValues, type DataSource, type DataSourceCreateDto, type DataSourceCreateParams, type DataSourceListParams, type DataSourceProcessingInfo, type DataSourceProcessingInfoResponse, type DataSourceResponse, DataSourceStatus, type DataSourceStatusType, DataSourceType, type DataSourceTypeType, type DataSourceUpdateDto, type DataSourceUpdateParams, DatasourceService, ERROR_MESSAGE_PATTERNS, type ElasticsearchStats, ErrorCategory, ErrorCode, ErrorDetailLevel, type ErrorResponse, ExecutionStatus, type ExecutionStatusType, type File, type FileBulkUploadResponse, type FileDataSourceCreateDto, type FileDataSourceCreateParams, type FileDataSourceUpdateDto, type FileDataSourceUpdateParams, FileService, type FileToUpload, type FileUploadResponse, type Files, type Google, type GoogleDataSourceCreateDto, type GoogleDataSourceCreateParams, type GoogleDataSourceUpdateDto, type GoogleDataSourceUpdateParams, HTTP_STATUS_TO_ERROR_CODE, type HistoryItem, type HistoryMark, type Integration, type IntegrationCreateParams, IntegrationCreateParamsSchema, type IntegrationGetByAliasParams, IntegrationGetByAliasParamsSchema, type IntegrationGetParams, IntegrationGetParamsSchema, type IntegrationListParams, IntegrationListParamsSchema, IntegrationService, IntegrationType, type IntegrationTypeType, type IntegrationUpdateParams, IntegrationUpdateParamsSchema, type IntegrationValidationResult, type Jira, type JiraDataSourceCreateDto, type JiraDataSourceCreateParams, type JiraDataSourceUpdateDto, type JiraDataSourceUpdateParams, type LLMFeatures, type LLMModel, LLMProvider, type LLMProviderType, LLMService, type MCPServerConfig, type MCPServerDetails, type Mark, type Metric, type MissingIntegration, type MissingIntegrationsByCredentialType, NotFoundError, type Operator, type OtherDataSourceCreateParams, type OtherDataSourceUpdateParams, type PaginatedAnalyticsQueryParams, PaginatedAnalyticsQueryParamsSchema, type PaginatedResponse, type PaginationMetadata, type PaginationParams, type PromptVariable, type ProviderDataSourceRequest, type ResponseMetadata, type SharePoint, type SharePointAuthType, type SharePointDataSourceCreateDto, type SharePointDataSourceCreateParams, type SharePointDataSourceUpdateDto, type SharePointDataSourceUpdateParams, SkillCategory, type SkillCategoryItem, type SkillCreateParams, type SkillCreatedBy, type SkillDetail, type SkillImportParams, type SkillListItem, type SkillListPaginatedResponse, SkillScopeFilter, SkillService, SkillSortBy, type SkillUpdateParams, SkillVisibility, type SortOrder, type SummariesData, type SummariesResponse, type SystemPromptHistory, TIME_PERIOD_VALUES, type TabularData, type TabularResponse, TaskService, type TaskUser, type Thought, type TimePeriod, type TokensUsage, type ToolDetails, type ToolErrorDetails, type ToolItem, type ToolKitDetails, type UserData, type UserListItem, UserService, type UsersListData, type UsersListResponse, type VersionsListResponse, type Workflow, type WorkflowCreateParams, WorkflowCreateParamsSchema, type WorkflowExecution, type WorkflowExecutionCreateParams, WorkflowExecutionCreateParamsSchema, type WorkflowExecutionListParams, WorkflowExecutionListParamsSchema, type WorkflowExecutionResponse, WorkflowExecutionService, type WorkflowExecutionState, type WorkflowExecutionStateListParams, WorkflowExecutionStateListParamsSchema, type WorkflowExecutionStateOutput, WorkflowExecutionStateService, type WorkflowExecutionStateThought, type WorkflowListParams, WorkflowListParamsSchema, WorkflowMode, type WorkflowModeType, type WorkflowResponse, WorkflowService, type WorkflowUpdateParams, WorkflowUpdateParamsSchema, type XrayDataSourceCreateDto, type XrayDataSourceCreateParams, type XrayDataSourceUpdateDto, type XrayDataSourceUpdateParams, classifyHttpError, formatCookies, formatToolErrorForLevel, formatToolErrorFull, formatToolErrorMinimal, formatToolErrorStandard, isRecoverableError };
2752
+ export { type AboutUser, type AboutUserResponse, type AgentErrorDetails, type AnalyticsQueryParams, AnalyticsQueryParamsSchema, AnalyticsService, type AnyJson, ApiError, type Assistant, type AssistantBase, type AssistantCategory, type AssistantChatParams, AssistantChatParamsSchema, type AssistantCreateParams, AssistantCreateParamsSchema, type AssistantCreateResponse, type AssistantDataItem, type AssistantDetailsData, type AssistantListParams, AssistantListParamsSchema, AssistantService, type AssistantUpdateParams, AssistantUpdateParamsSchema, type AssistantUpdateResponse, type AssistantVersion, type AssistantVersionsListParams, AssistantVersionsListParamsSchema, type AuthConfig, type AzureDevOpsWiki, type AzureDevOpsWikiDataSourceCreateDto, type AzureDevOpsWikiDataSourceCreateParams, type AzureDevOpsWikiDataSourceUpdateDto, type AzureDevOpsWikiDataSourceUpdateParams, type AzureDevOpsWorkItem, type AzureDevOpsWorkItemDataSourceCreateDto, type AzureDevOpsWorkItemDataSourceCreateParams, type AzureDevOpsWorkItemDataSourceUpdateDto, type AzureDevOpsWorkItemDataSourceUpdateParams, type BackgroundTaskEntity, BackgroundTaskStatus, type BackgroundTaskStatusType, type BaseCodeParams, type BaseConfluenceParams, type BaseDataSourceCreateDto, type BaseDataSourceCreateParams, type BaseDataSourceResponse, type BaseDataSourceUpdateDto, type BaseDataSourceUpdateParams, type BaseFileParams, type BaseGoogleParams, type BaseJiraParams, type BaseModelApiResponse, type BaseModelResponse, type BaseSharePointParams, type BaseUser, type Category, type CategoryCreateParams, type CategoryListResponse, type CategoryResponse, CategoryService, type CategoryUpdateParams, ChatRole, type Code, type CodeAnalysisProviderCreateParams, type CodeDataSourceCreateDto, type CodeDataSourceCreateParams, type CodeDataSourceResponse, CodeDataSourceType, type CodeDataSourceTypeType, type CodeDataSourceUpdateDto, type CodeDataSourceUpdateParams, type CodeExplorationProviderCreateParams, CodeMieClient, type CodeMieClientConfig, CodeMieError, type ColumnDefinition, type Confluence, type ConfluenceDataSourceCreateDto, type ConfluenceDataSourceCreateParams, type ConfluenceDataSourceUpdateDto, type ConfluenceDataSourceUpdateParams, type Context, type ContextItem, ContextType, type Conversation, type ConversationCreateParams, ConversationCreateParamsSchema, type ConversationCreateRequest, type ConversationDetails, type ConversationDetailsData, ConversationService, type CostConfig, CredentialTypes, type CredentialTypesType, type CredentialValues, type DataSource, type DataSourceCreateDto, type DataSourceCreateParams, type DataSourceListParams, type DataSourceProcessingInfo, type DataSourceProcessingInfoResponse, type DataSourceResponse, DataSourceStatus, type DataSourceStatusType, DataSourceType, type DataSourceTypeType, type DataSourceUpdateDto, type DataSourceUpdateParams, DatasourceService, ERROR_MESSAGE_PATTERNS, type ElasticsearchStats, ErrorCategory, ErrorCode, ErrorDetailLevel, type ErrorResponse, ExecutionStatus, type ExecutionStatusType, type File, type FileBulkUploadResponse, type FileDataSourceCreateDto, type FileDataSourceCreateParams, type FileDataSourceUpdateDto, type FileDataSourceUpdateParams, FileService, type FileToUpload, type FileUploadResponse, type Files, type Google, type GoogleDataSourceCreateDto, type GoogleDataSourceCreateParams, type GoogleDataSourceUpdateDto, type GoogleDataSourceUpdateParams, HTTP_STATUS_TO_ERROR_CODE, type HistoryItem, type HistoryMark, type Integration, type IntegrationCreateParams, IntegrationCreateParamsSchema, type IntegrationGetByAliasParams, IntegrationGetByAliasParamsSchema, type IntegrationGetParams, IntegrationGetParamsSchema, type IntegrationListParams, IntegrationListParamsSchema, IntegrationService, IntegrationType, type IntegrationTypeType, type IntegrationUpdateParams, IntegrationUpdateParamsSchema, type IntegrationValidationResult, type Jira, type JiraDataSourceCreateDto, type JiraDataSourceCreateParams, type JiraDataSourceUpdateDto, type JiraDataSourceUpdateParams, type LLMFeatures, type LLMModel, LLMProvider, type LLMProviderType, LLMService, type MCPServerConfig, MCPServerConfigSchema, type MCPServerDetails, type Mark, type Metric, type MissingIntegration, type MissingIntegrationsByCredentialType, NotFoundError, type Operator, type OtherDataSourceCreateParams, type OtherDataSourceUpdateParams, type PaginatedAnalyticsQueryParams, PaginatedAnalyticsQueryParamsSchema, type PaginatedResponse, type PaginationMetadata, type PaginationParams, type PromptVariable, type ProviderDataSourceRequest, type ResponseMetadata, type SharePoint, type SharePointAuthType, type SharePointDataSourceCreateDto, type SharePointDataSourceCreateParams, type SharePointDataSourceUpdateDto, type SharePointDataSourceUpdateParams, SkillCategory, type SkillCategoryItem, type SkillCreateParams, type SkillCreatedBy, type SkillDetail, type SkillImportParams, type SkillListItem, type SkillListPaginatedResponse, SkillScopeFilter, SkillService, SkillSortBy, type SkillUpdateParams, SkillVisibility, type SortOrder, type SummariesData, type SummariesResponse, type SystemPromptHistory, TIME_PERIOD_VALUES, type TabularData, type TabularResponse, TaskService, type TaskUser, type Thought, type TimePeriod, type TokensUsage, type ToolDetails, type ToolErrorDetails, type ToolItem, type ToolKitDetails, type UserData, type UserListItem, UserService, type UsersListData, type UsersListResponse, type VersionsListResponse, type VirtualAssistantChatParams, VirtualAssistantChatParamsSchema, type Workflow, type WorkflowCreateParams, WorkflowCreateParamsSchema, type WorkflowExecution, type WorkflowExecutionCreateParams, WorkflowExecutionCreateParamsSchema, type WorkflowExecutionListParams, WorkflowExecutionListParamsSchema, type WorkflowExecutionResponse, WorkflowExecutionService, type WorkflowExecutionState, type WorkflowExecutionStateListParams, WorkflowExecutionStateListParamsSchema, type WorkflowExecutionStateOutput, WorkflowExecutionStateService, type WorkflowExecutionStateThought, type WorkflowListParams, WorkflowListParamsSchema, WorkflowMode, type WorkflowModeType, type WorkflowResponse, WorkflowService, type WorkflowUpdateParams, WorkflowUpdateParamsSchema, type XrayDataSourceCreateDto, type XrayDataSourceCreateParams, type XrayDataSourceUpdateDto, type XrayDataSourceUpdateParams, classifyHttpError, formatCookies, formatToolErrorForLevel, formatToolErrorFull, formatToolErrorMinimal, formatToolErrorStandard, isRecoverableError };
package/dist/index.d.ts CHANGED
@@ -440,6 +440,8 @@ interface MCPServerConfig {
440
440
  headers?: Record<string, string>;
441
441
  type?: string;
442
442
  auth_token?: string;
443
+ single_usage?: boolean;
444
+ audience?: string;
443
445
  }
444
446
  interface MCPServerDetails {
445
447
  name: string;
@@ -584,6 +586,17 @@ declare const AssistantListParamsSchema: z.ZodReadonly<z.ZodObject<{
584
586
  filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
585
587
  }, z.core.$strip>>;
586
588
  type AssistantListParams = Partial<z.infer<typeof AssistantListParamsSchema>>;
589
+ declare const MCPServerConfigSchema: z.ZodOptional<z.ZodObject<{
590
+ url: z.ZodOptional<z.ZodString>;
591
+ command: z.ZodOptional<z.ZodString>;
592
+ args: z.ZodOptional<z.ZodArray<z.ZodString>>;
593
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
594
+ auth_token: z.ZodOptional<z.ZodString>;
595
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
596
+ type: z.ZodOptional<z.ZodString>;
597
+ single_usage: z.ZodOptional<z.ZodBoolean>;
598
+ audience: z.ZodOptional<z.ZodString>;
599
+ }, z.core.$strip>>;
587
600
  declare const AssistantCreateParamsSchema: z.ZodReadonly<z.ZodObject<{
588
601
  name: z.ZodString;
589
602
  description: z.ZodString;
@@ -629,6 +642,10 @@ declare const AssistantCreateParamsSchema: z.ZodReadonly<z.ZodObject<{
629
642
  args: z.ZodOptional<z.ZodArray<z.ZodString>>;
630
643
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
631
644
  auth_token: z.ZodOptional<z.ZodString>;
645
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
646
+ type: z.ZodOptional<z.ZodString>;
647
+ single_usage: z.ZodOptional<z.ZodBoolean>;
648
+ audience: z.ZodOptional<z.ZodString>;
632
649
  }, z.core.$strip>>;
633
650
  mcp_connect_url: z.ZodOptional<z.ZodString>;
634
651
  tools_tokens_size_limit: z.ZodOptional<z.ZodNumber>;
@@ -692,6 +709,10 @@ declare const AssistantUpdateParamsSchema: z.ZodReadonly<z.ZodObject<{
692
709
  args: z.ZodOptional<z.ZodArray<z.ZodString>>;
693
710
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
694
711
  auth_token: z.ZodOptional<z.ZodString>;
712
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
713
+ type: z.ZodOptional<z.ZodString>;
714
+ single_usage: z.ZodOptional<z.ZodBoolean>;
715
+ audience: z.ZodOptional<z.ZodString>;
695
716
  }, z.core.$strip>>;
696
717
  mcp_connect_url: z.ZodOptional<z.ZodString>;
697
718
  tools_tokens_size_limit: z.ZodOptional<z.ZodNumber>;
@@ -737,6 +758,88 @@ declare const AssistantChatParamsSchema: z.ZodReadonly<z.ZodObject<{
737
758
  output_schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
738
759
  }, z.core.$strip>>;
739
760
  type AssistantChatParams = z.infer<typeof AssistantChatParamsSchema>;
761
+ declare const VirtualAssistantChatParamsSchema: z.ZodReadonly<z.ZodObject<{
762
+ system_prompt: z.ZodDefault<z.ZodString>;
763
+ llm_model_type: z.ZodOptional<z.ZodString>;
764
+ temperature: z.ZodOptional<z.ZodNumber>;
765
+ top_p: z.ZodOptional<z.ZodNumber>;
766
+ toolkits: z.ZodDefault<z.ZodArray<z.ZodObject<{
767
+ toolkit: z.ZodString;
768
+ tools: z.ZodArray<z.ZodObject<{
769
+ name: z.ZodString;
770
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
771
+ settings_config: z.ZodBoolean;
772
+ user_description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
773
+ settings: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
774
+ }, z.core.$strip>>;
775
+ label: z.ZodString;
776
+ settings_config: z.ZodBoolean;
777
+ is_external: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
778
+ settings: z.ZodOptional<z.ZodAny>;
779
+ }, z.core.$strip>>>;
780
+ context: z.ZodDefault<z.ZodArray<z.ZodObject<{
781
+ context_type: z.ZodEnum<{
782
+ knowledge_base: "knowledge_base";
783
+ code: "code";
784
+ }>;
785
+ name: z.ZodString;
786
+ }, z.core.$strip>>>;
787
+ mcp_servers: z.ZodDefault<z.ZodArray<z.ZodObject<{
788
+ name: z.ZodString;
789
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
790
+ enabled: z.ZodBoolean;
791
+ config: z.ZodOptional<z.ZodObject<{
792
+ command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
793
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
794
+ args: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
795
+ env: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
796
+ auth_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
797
+ }, z.core.$strip>>;
798
+ mcp_connect_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
799
+ tools_tokens_size_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
800
+ command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
801
+ arguments: z.ZodOptional<z.ZodNullable<z.ZodString>>;
802
+ settings: z.ZodOptional<z.ZodAny>;
803
+ mcp_connect_auth_token: z.ZodOptional<z.ZodAny>;
804
+ }, z.core.$strip>>>;
805
+ skill_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
806
+ assistant_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
807
+ agent_mode: z.ZodDefault<z.ZodEnum<{
808
+ general: "general";
809
+ plan_execute: "plan_execute";
810
+ }>>;
811
+ plan_prompt: z.ZodOptional<z.ZodString>;
812
+ smart_tool_selection_enabled: z.ZodDefault<z.ZodBoolean>;
813
+ prompt_variables: z.ZodDefault<z.ZodArray<z.ZodObject<{
814
+ key: z.ZodString;
815
+ description: z.ZodOptional<z.ZodString>;
816
+ default_value: z.ZodString;
817
+ }, z.core.$strip>>>;
818
+ conversation_id: z.ZodOptional<z.ZodString>;
819
+ text: z.ZodString;
820
+ content_raw: z.ZodOptional<z.ZodString>;
821
+ file_names: z.ZodOptional<z.ZodArray<z.ZodString>>;
822
+ history: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
823
+ role: z.ZodEnum<{
824
+ Assistant: "Assistant";
825
+ User: "User";
826
+ }>;
827
+ message: z.ZodOptional<z.ZodString>;
828
+ }, z.core.$strip>>, z.ZodString]>>;
829
+ stream: z.ZodOptional<z.ZodBoolean>;
830
+ output_schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
831
+ tools_config: z.ZodOptional<z.ZodArray<z.ZodObject<{
832
+ name: z.ZodString;
833
+ tool_creds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
834
+ integration_id: z.ZodOptional<z.ZodString>;
835
+ }, z.core.$strip>>>;
836
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
837
+ top_k: z.ZodDefault<z.ZodNumber>;
838
+ propagate_headers: z.ZodDefault<z.ZodBoolean>;
839
+ disable_cache: z.ZodOptional<z.ZodBoolean>;
840
+ mcp_server_single_usage: z.ZodOptional<z.ZodBoolean>;
841
+ }, z.core.$strip>>;
842
+ type VirtualAssistantChatParams = z.input<typeof VirtualAssistantChatParamsSchema>;
740
843
  declare const AssistantVersionsListParamsSchema: z.ZodReadonly<z.ZodObject<{
741
844
  page: z.ZodOptional<z.ZodNumber>;
742
845
  per_page: z.ZodOptional<z.ZodNumber>;
@@ -814,6 +917,11 @@ declare class AssistantService {
814
917
  * Send a chat request to an assistant by slug.
815
918
  */
816
919
  chatBySlug(assistantSlug: string, _params: AssistantChatParams, headers?: Record<string, string>): Promise<BaseModelResponse>;
920
+ /**
921
+ * Run inference using an inline (virtual) assistant definition.
922
+ * No database assistant record is required. History is never persisted.
923
+ */
924
+ askVirtual(_params: VirtualAssistantChatParams, headers?: Record<string, string>): Promise<BaseModelResponse>;
817
925
  /**
818
926
  * Compare two assistant versions.
819
927
  */
@@ -2641,4 +2749,4 @@ declare class NotFoundError extends ApiError {
2641
2749
  constructor(resourceType: string, resourceId: string);
2642
2750
  }
2643
2751
 
2644
- export { type AboutUser, type AboutUserResponse, type AgentErrorDetails, type AnalyticsQueryParams, AnalyticsQueryParamsSchema, AnalyticsService, type AnyJson, ApiError, type Assistant, type AssistantBase, type AssistantCategory, type AssistantChatParams, AssistantChatParamsSchema, type AssistantCreateParams, AssistantCreateParamsSchema, type AssistantCreateResponse, type AssistantDataItem, type AssistantDetailsData, type AssistantListParams, AssistantListParamsSchema, AssistantService, type AssistantUpdateParams, AssistantUpdateParamsSchema, type AssistantUpdateResponse, type AssistantVersion, type AssistantVersionsListParams, AssistantVersionsListParamsSchema, type AuthConfig, type AzureDevOpsWiki, type AzureDevOpsWikiDataSourceCreateDto, type AzureDevOpsWikiDataSourceCreateParams, type AzureDevOpsWikiDataSourceUpdateDto, type AzureDevOpsWikiDataSourceUpdateParams, type AzureDevOpsWorkItem, type AzureDevOpsWorkItemDataSourceCreateDto, type AzureDevOpsWorkItemDataSourceCreateParams, type AzureDevOpsWorkItemDataSourceUpdateDto, type AzureDevOpsWorkItemDataSourceUpdateParams, type BackgroundTaskEntity, BackgroundTaskStatus, type BackgroundTaskStatusType, type BaseCodeParams, type BaseConfluenceParams, type BaseDataSourceCreateDto, type BaseDataSourceCreateParams, type BaseDataSourceResponse, type BaseDataSourceUpdateDto, type BaseDataSourceUpdateParams, type BaseFileParams, type BaseGoogleParams, type BaseJiraParams, type BaseModelApiResponse, type BaseModelResponse, type BaseSharePointParams, type BaseUser, type Category, type CategoryCreateParams, type CategoryListResponse, type CategoryResponse, CategoryService, type CategoryUpdateParams, ChatRole, type Code, type CodeAnalysisProviderCreateParams, type CodeDataSourceCreateDto, type CodeDataSourceCreateParams, type CodeDataSourceResponse, CodeDataSourceType, type CodeDataSourceTypeType, type CodeDataSourceUpdateDto, type CodeDataSourceUpdateParams, type CodeExplorationProviderCreateParams, CodeMieClient, type CodeMieClientConfig, CodeMieError, type ColumnDefinition, type Confluence, type ConfluenceDataSourceCreateDto, type ConfluenceDataSourceCreateParams, type ConfluenceDataSourceUpdateDto, type ConfluenceDataSourceUpdateParams, type Context, type ContextItem, ContextType, type Conversation, type ConversationCreateParams, ConversationCreateParamsSchema, type ConversationCreateRequest, type ConversationDetails, type ConversationDetailsData, ConversationService, type CostConfig, CredentialTypes, type CredentialTypesType, type CredentialValues, type DataSource, type DataSourceCreateDto, type DataSourceCreateParams, type DataSourceListParams, type DataSourceProcessingInfo, type DataSourceProcessingInfoResponse, type DataSourceResponse, DataSourceStatus, type DataSourceStatusType, DataSourceType, type DataSourceTypeType, type DataSourceUpdateDto, type DataSourceUpdateParams, DatasourceService, ERROR_MESSAGE_PATTERNS, type ElasticsearchStats, ErrorCategory, ErrorCode, ErrorDetailLevel, type ErrorResponse, ExecutionStatus, type ExecutionStatusType, type File, type FileBulkUploadResponse, type FileDataSourceCreateDto, type FileDataSourceCreateParams, type FileDataSourceUpdateDto, type FileDataSourceUpdateParams, FileService, type FileToUpload, type FileUploadResponse, type Files, type Google, type GoogleDataSourceCreateDto, type GoogleDataSourceCreateParams, type GoogleDataSourceUpdateDto, type GoogleDataSourceUpdateParams, HTTP_STATUS_TO_ERROR_CODE, type HistoryItem, type HistoryMark, type Integration, type IntegrationCreateParams, IntegrationCreateParamsSchema, type IntegrationGetByAliasParams, IntegrationGetByAliasParamsSchema, type IntegrationGetParams, IntegrationGetParamsSchema, type IntegrationListParams, IntegrationListParamsSchema, IntegrationService, IntegrationType, type IntegrationTypeType, type IntegrationUpdateParams, IntegrationUpdateParamsSchema, type IntegrationValidationResult, type Jira, type JiraDataSourceCreateDto, type JiraDataSourceCreateParams, type JiraDataSourceUpdateDto, type JiraDataSourceUpdateParams, type LLMFeatures, type LLMModel, LLMProvider, type LLMProviderType, LLMService, type MCPServerConfig, type MCPServerDetails, type Mark, type Metric, type MissingIntegration, type MissingIntegrationsByCredentialType, NotFoundError, type Operator, type OtherDataSourceCreateParams, type OtherDataSourceUpdateParams, type PaginatedAnalyticsQueryParams, PaginatedAnalyticsQueryParamsSchema, type PaginatedResponse, type PaginationMetadata, type PaginationParams, type PromptVariable, type ProviderDataSourceRequest, type ResponseMetadata, type SharePoint, type SharePointAuthType, type SharePointDataSourceCreateDto, type SharePointDataSourceCreateParams, type SharePointDataSourceUpdateDto, type SharePointDataSourceUpdateParams, SkillCategory, type SkillCategoryItem, type SkillCreateParams, type SkillCreatedBy, type SkillDetail, type SkillImportParams, type SkillListItem, type SkillListPaginatedResponse, SkillScopeFilter, SkillService, SkillSortBy, type SkillUpdateParams, SkillVisibility, type SortOrder, type SummariesData, type SummariesResponse, type SystemPromptHistory, TIME_PERIOD_VALUES, type TabularData, type TabularResponse, TaskService, type TaskUser, type Thought, type TimePeriod, type TokensUsage, type ToolDetails, type ToolErrorDetails, type ToolItem, type ToolKitDetails, type UserData, type UserListItem, UserService, type UsersListData, type UsersListResponse, type VersionsListResponse, type Workflow, type WorkflowCreateParams, WorkflowCreateParamsSchema, type WorkflowExecution, type WorkflowExecutionCreateParams, WorkflowExecutionCreateParamsSchema, type WorkflowExecutionListParams, WorkflowExecutionListParamsSchema, type WorkflowExecutionResponse, WorkflowExecutionService, type WorkflowExecutionState, type WorkflowExecutionStateListParams, WorkflowExecutionStateListParamsSchema, type WorkflowExecutionStateOutput, WorkflowExecutionStateService, type WorkflowExecutionStateThought, type WorkflowListParams, WorkflowListParamsSchema, WorkflowMode, type WorkflowModeType, type WorkflowResponse, WorkflowService, type WorkflowUpdateParams, WorkflowUpdateParamsSchema, type XrayDataSourceCreateDto, type XrayDataSourceCreateParams, type XrayDataSourceUpdateDto, type XrayDataSourceUpdateParams, classifyHttpError, formatCookies, formatToolErrorForLevel, formatToolErrorFull, formatToolErrorMinimal, formatToolErrorStandard, isRecoverableError };
2752
+ export { type AboutUser, type AboutUserResponse, type AgentErrorDetails, type AnalyticsQueryParams, AnalyticsQueryParamsSchema, AnalyticsService, type AnyJson, ApiError, type Assistant, type AssistantBase, type AssistantCategory, type AssistantChatParams, AssistantChatParamsSchema, type AssistantCreateParams, AssistantCreateParamsSchema, type AssistantCreateResponse, type AssistantDataItem, type AssistantDetailsData, type AssistantListParams, AssistantListParamsSchema, AssistantService, type AssistantUpdateParams, AssistantUpdateParamsSchema, type AssistantUpdateResponse, type AssistantVersion, type AssistantVersionsListParams, AssistantVersionsListParamsSchema, type AuthConfig, type AzureDevOpsWiki, type AzureDevOpsWikiDataSourceCreateDto, type AzureDevOpsWikiDataSourceCreateParams, type AzureDevOpsWikiDataSourceUpdateDto, type AzureDevOpsWikiDataSourceUpdateParams, type AzureDevOpsWorkItem, type AzureDevOpsWorkItemDataSourceCreateDto, type AzureDevOpsWorkItemDataSourceCreateParams, type AzureDevOpsWorkItemDataSourceUpdateDto, type AzureDevOpsWorkItemDataSourceUpdateParams, type BackgroundTaskEntity, BackgroundTaskStatus, type BackgroundTaskStatusType, type BaseCodeParams, type BaseConfluenceParams, type BaseDataSourceCreateDto, type BaseDataSourceCreateParams, type BaseDataSourceResponse, type BaseDataSourceUpdateDto, type BaseDataSourceUpdateParams, type BaseFileParams, type BaseGoogleParams, type BaseJiraParams, type BaseModelApiResponse, type BaseModelResponse, type BaseSharePointParams, type BaseUser, type Category, type CategoryCreateParams, type CategoryListResponse, type CategoryResponse, CategoryService, type CategoryUpdateParams, ChatRole, type Code, type CodeAnalysisProviderCreateParams, type CodeDataSourceCreateDto, type CodeDataSourceCreateParams, type CodeDataSourceResponse, CodeDataSourceType, type CodeDataSourceTypeType, type CodeDataSourceUpdateDto, type CodeDataSourceUpdateParams, type CodeExplorationProviderCreateParams, CodeMieClient, type CodeMieClientConfig, CodeMieError, type ColumnDefinition, type Confluence, type ConfluenceDataSourceCreateDto, type ConfluenceDataSourceCreateParams, type ConfluenceDataSourceUpdateDto, type ConfluenceDataSourceUpdateParams, type Context, type ContextItem, ContextType, type Conversation, type ConversationCreateParams, ConversationCreateParamsSchema, type ConversationCreateRequest, type ConversationDetails, type ConversationDetailsData, ConversationService, type CostConfig, CredentialTypes, type CredentialTypesType, type CredentialValues, type DataSource, type DataSourceCreateDto, type DataSourceCreateParams, type DataSourceListParams, type DataSourceProcessingInfo, type DataSourceProcessingInfoResponse, type DataSourceResponse, DataSourceStatus, type DataSourceStatusType, DataSourceType, type DataSourceTypeType, type DataSourceUpdateDto, type DataSourceUpdateParams, DatasourceService, ERROR_MESSAGE_PATTERNS, type ElasticsearchStats, ErrorCategory, ErrorCode, ErrorDetailLevel, type ErrorResponse, ExecutionStatus, type ExecutionStatusType, type File, type FileBulkUploadResponse, type FileDataSourceCreateDto, type FileDataSourceCreateParams, type FileDataSourceUpdateDto, type FileDataSourceUpdateParams, FileService, type FileToUpload, type FileUploadResponse, type Files, type Google, type GoogleDataSourceCreateDto, type GoogleDataSourceCreateParams, type GoogleDataSourceUpdateDto, type GoogleDataSourceUpdateParams, HTTP_STATUS_TO_ERROR_CODE, type HistoryItem, type HistoryMark, type Integration, type IntegrationCreateParams, IntegrationCreateParamsSchema, type IntegrationGetByAliasParams, IntegrationGetByAliasParamsSchema, type IntegrationGetParams, IntegrationGetParamsSchema, type IntegrationListParams, IntegrationListParamsSchema, IntegrationService, IntegrationType, type IntegrationTypeType, type IntegrationUpdateParams, IntegrationUpdateParamsSchema, type IntegrationValidationResult, type Jira, type JiraDataSourceCreateDto, type JiraDataSourceCreateParams, type JiraDataSourceUpdateDto, type JiraDataSourceUpdateParams, type LLMFeatures, type LLMModel, LLMProvider, type LLMProviderType, LLMService, type MCPServerConfig, MCPServerConfigSchema, type MCPServerDetails, type Mark, type Metric, type MissingIntegration, type MissingIntegrationsByCredentialType, NotFoundError, type Operator, type OtherDataSourceCreateParams, type OtherDataSourceUpdateParams, type PaginatedAnalyticsQueryParams, PaginatedAnalyticsQueryParamsSchema, type PaginatedResponse, type PaginationMetadata, type PaginationParams, type PromptVariable, type ProviderDataSourceRequest, type ResponseMetadata, type SharePoint, type SharePointAuthType, type SharePointDataSourceCreateDto, type SharePointDataSourceCreateParams, type SharePointDataSourceUpdateDto, type SharePointDataSourceUpdateParams, SkillCategory, type SkillCategoryItem, type SkillCreateParams, type SkillCreatedBy, type SkillDetail, type SkillImportParams, type SkillListItem, type SkillListPaginatedResponse, SkillScopeFilter, SkillService, SkillSortBy, type SkillUpdateParams, SkillVisibility, type SortOrder, type SummariesData, type SummariesResponse, type SystemPromptHistory, TIME_PERIOD_VALUES, type TabularData, type TabularResponse, TaskService, type TaskUser, type Thought, type TimePeriod, type TokensUsage, type ToolDetails, type ToolErrorDetails, type ToolItem, type ToolKitDetails, type UserData, type UserListItem, UserService, type UsersListData, type UsersListResponse, type VersionsListResponse, type VirtualAssistantChatParams, VirtualAssistantChatParamsSchema, type Workflow, type WorkflowCreateParams, WorkflowCreateParamsSchema, type WorkflowExecution, type WorkflowExecutionCreateParams, WorkflowExecutionCreateParamsSchema, type WorkflowExecutionListParams, WorkflowExecutionListParamsSchema, type WorkflowExecutionResponse, WorkflowExecutionService, type WorkflowExecutionState, type WorkflowExecutionStateListParams, WorkflowExecutionStateListParamsSchema, type WorkflowExecutionStateOutput, WorkflowExecutionStateService, type WorkflowExecutionStateThought, type WorkflowListParams, WorkflowListParamsSchema, WorkflowMode, type WorkflowModeType, type WorkflowResponse, WorkflowService, type WorkflowUpdateParams, WorkflowUpdateParamsSchema, type XrayDataSourceCreateDto, type XrayDataSourceCreateParams, type XrayDataSourceUpdateDto, type XrayDataSourceUpdateParams, classifyHttpError, formatCookies, formatToolErrorForLevel, formatToolErrorFull, formatToolErrorMinimal, formatToolErrorStandard, isRecoverableError };
package/dist/index.js CHANGED
@@ -348,7 +348,10 @@ var AssistantMapper = class {
348
348
  time_elapsed: response.timeElapsed,
349
349
  tokens_used: response.tokensUsed,
350
350
  thoughts: response.thoughts,
351
- task_id: response.taskId
351
+ task_id: response.taskId,
352
+ success: response.success,
353
+ agent_error: response.agentError,
354
+ tool_errors: response.toolErrors
352
355
  });
353
356
  }
354
357
  };
@@ -370,6 +373,25 @@ var PromptVariableSchema = z2.object({
370
373
  description: z2.string().optional(),
371
374
  default_value: z2.string()
372
375
  });
376
+ var MCPServerConfigObjectSchema = z2.object({
377
+ url: z2.string().optional(),
378
+ command: z2.string().optional(),
379
+ args: z2.array(z2.string()).optional(),
380
+ env: z2.record(z2.string(), z2.unknown()).optional(),
381
+ auth_token: z2.string().optional(),
382
+ headers: z2.record(z2.string(), z2.string()).optional(),
383
+ type: z2.string().optional(),
384
+ single_usage: z2.boolean().optional(),
385
+ audience: z2.string().optional()
386
+ });
387
+ var MCPServerConfigSchema = MCPServerConfigObjectSchema.optional().refine((config) => {
388
+ if (!config) {
389
+ return true;
390
+ }
391
+ const hasUrl = !!config.url;
392
+ const hasCommand = !!config.command;
393
+ return hasUrl !== hasCommand;
394
+ }, "Either 'url' or 'command' must be provided in config, but not both");
373
395
  var AssistantCreateParamsSchema = z2.object({
374
396
  name: z2.string(),
375
397
  description: z2.string(),
@@ -413,23 +435,7 @@ var AssistantCreateParamsSchema = z2.object({
413
435
  name: z2.string(),
414
436
  description: z2.string().optional(),
415
437
  enabled: z2.boolean(),
416
- config: z2.object({
417
- url: z2.string().optional(),
418
- command: z2.string().optional(),
419
- args: z2.array(z2.string()).optional(),
420
- env: z2.record(z2.string(), z2.unknown()).optional(),
421
- auth_token: z2.string().optional()
422
- }).optional().refine(
423
- (config) => {
424
- if (!config) {
425
- return true;
426
- }
427
- const hasUrl = !!config.url;
428
- const hasCommand = !!config.command;
429
- return hasUrl !== hasCommand;
430
- },
431
- "Either 'url' or 'command' must be provided in config, but not both"
432
- ),
438
+ config: MCPServerConfigSchema,
433
439
  mcp_connect_url: z2.string().optional(),
434
440
  tools_tokens_size_limit: z2.number().optional(),
435
441
  command: z2.string().optional(),
@@ -472,6 +478,88 @@ var AssistantChatParamsSchema = z2.object({
472
478
  version: z2.number().optional(),
473
479
  output_schema: z2.union([z2.custom((val) => val instanceof z2.ZodType), z2.record(z2.string(), z2.unknown())]).optional()
474
480
  }).readonly();
481
+ var VirtualAssistantContextSchema = z2.object({
482
+ context_type: z2.enum(["knowledge_base", "code"]),
483
+ name: z2.string()
484
+ });
485
+ var VirtualAssistantToolSchema = z2.object({
486
+ name: z2.string(),
487
+ label: z2.string().nullable().optional(),
488
+ settings_config: z2.boolean(),
489
+ user_description: z2.string().nullable().optional(),
490
+ settings: z2.any().nullable().optional()
491
+ });
492
+ var VirtualAssistantToolKitSchema = z2.object({
493
+ toolkit: z2.string(),
494
+ tools: z2.array(VirtualAssistantToolSchema),
495
+ label: z2.string(),
496
+ settings_config: z2.boolean(),
497
+ is_external: z2.boolean().nullable().optional(),
498
+ settings: z2.any().optional()
499
+ });
500
+ var VirtualAssistantMCPServerConfigSchema = z2.object({
501
+ command: z2.string().nullable().optional(),
502
+ url: z2.string().nullable().optional(),
503
+ args: z2.array(z2.string()).nullable().optional(),
504
+ env: z2.record(z2.string(), z2.unknown()).nullable().optional(),
505
+ auth_token: z2.string().nullable().optional()
506
+ });
507
+ var VirtualAssistantMCPServerSchema = z2.object({
508
+ name: z2.string(),
509
+ description: z2.string().nullable().optional(),
510
+ enabled: z2.boolean(),
511
+ config: VirtualAssistantMCPServerConfigSchema.optional(),
512
+ mcp_connect_url: z2.string().nullable().optional(),
513
+ tools_tokens_size_limit: z2.number().nullable().optional(),
514
+ command: z2.string().nullable().optional(),
515
+ arguments: z2.string().nullable().optional(),
516
+ settings: z2.any().optional(),
517
+ mcp_connect_auth_token: z2.any().optional()
518
+ });
519
+ var VirtualAssistantChatParamsSchema = z2.object({
520
+ // Assistant definition fields
521
+ system_prompt: z2.string().default(""),
522
+ llm_model_type: z2.string().optional(),
523
+ temperature: z2.number().min(0).max(2).optional(),
524
+ top_p: z2.number().min(0).max(1).optional(),
525
+ toolkits: z2.array(VirtualAssistantToolKitSchema).default([]),
526
+ context: z2.array(VirtualAssistantContextSchema).default([]),
527
+ mcp_servers: z2.array(VirtualAssistantMCPServerSchema).default([]),
528
+ skill_ids: z2.array(z2.string()).default([]),
529
+ assistant_ids: z2.array(z2.string()).default([]),
530
+ agent_mode: z2.enum(["general", "plan_execute"]).default("general"),
531
+ plan_prompt: z2.string().optional(),
532
+ smart_tool_selection_enabled: z2.boolean().default(false),
533
+ prompt_variables: z2.array(PromptVariableSchema).default([]),
534
+ // Chat parameters
535
+ conversation_id: z2.string().optional(),
536
+ text: z2.string(),
537
+ content_raw: z2.string().optional(),
538
+ file_names: z2.array(z2.string()).optional(),
539
+ history: z2.union([
540
+ z2.array(
541
+ z2.object({
542
+ role: z2.enum(["Assistant", "User"]),
543
+ message: z2.string().optional()
544
+ })
545
+ ),
546
+ z2.string()
547
+ ]).default([]),
548
+ stream: z2.boolean().optional(),
549
+ output_schema: z2.union([z2.custom((val) => val instanceof z2.ZodType), z2.record(z2.string(), z2.unknown())]).optional(),
550
+ tools_config: z2.array(
551
+ z2.object({
552
+ name: z2.string(),
553
+ tool_creds: z2.record(z2.string(), z2.unknown()).optional(),
554
+ integration_id: z2.string().optional()
555
+ })
556
+ ).optional(),
557
+ metadata: z2.record(z2.string(), z2.unknown()).optional(),
558
+ top_k: z2.number().default(10),
559
+ propagate_headers: z2.boolean().default(false),
560
+ disable_cache: z2.boolean().optional(),
561
+ mcp_server_single_usage: z2.boolean().optional()
562
+ }).readonly();
475
563
  var AssistantVersionsListParamsSchema = z2.object({
476
564
  page: z2.number().optional(),
477
565
  per_page: z2.number().optional()
@@ -651,6 +739,32 @@ var AssistantService = class {
651
739
  }
652
740
  return mapped;
653
741
  }
742
+ /**
743
+ * Run inference using an inline (virtual) assistant definition.
744
+ * No database assistant record is required. History is never persisted.
745
+ */
746
+ async askVirtual(_params, headers) {
747
+ let zodSchema = void 0;
748
+ let params = { ..._params };
749
+ if (params.output_schema && params.output_schema instanceof z3.ZodType) {
750
+ zodSchema = params.output_schema;
751
+ params.output_schema = z3.toJSONSchema(zodSchema);
752
+ }
753
+ params = VirtualAssistantChatParamsSchema.parse(params);
754
+ const response = await this.api.post(
755
+ "/v1/assistants/virtual/model",
756
+ params,
757
+ {
758
+ responseType: params.stream ? "stream" : void 0
759
+ },
760
+ headers
761
+ );
762
+ const mapped = AssistantMapper.mapBaseModelApiResponse(response);
763
+ if (!params.stream && zodSchema && mapped.generated) {
764
+ mapped.generated = zodSchema.parse(mapped.generated);
765
+ }
766
+ return mapped;
767
+ }
654
768
  /**
655
769
  * Compare two assistant versions.
656
770
  */
@@ -2398,6 +2512,7 @@ export {
2398
2512
  IntegrationUpdateParamsSchema,
2399
2513
  LLMProvider,
2400
2514
  LLMService,
2515
+ MCPServerConfigSchema,
2401
2516
  NotFoundError,
2402
2517
  PaginatedAnalyticsQueryParamsSchema,
2403
2518
  SkillCategory,
@@ -2408,6 +2523,7 @@ export {
2408
2523
  TIME_PERIOD_VALUES,
2409
2524
  TaskService,
2410
2525
  UserService,
2526
+ VirtualAssistantChatParamsSchema,
2411
2527
  WorkflowCreateParamsSchema,
2412
2528
  WorkflowExecutionCreateParamsSchema,
2413
2529
  WorkflowExecutionListParamsSchema,