codemie-sdk 0.1.429 → 0.1.430
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.cjs +114 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +88 -1
- package/dist/index.d.ts +88 -1
- package/dist/index.js +113 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -737,6 +737,88 @@ declare const AssistantChatParamsSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
737
737
|
output_schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
738
738
|
}, z.core.$strip>>;
|
|
739
739
|
type AssistantChatParams = z.infer<typeof AssistantChatParamsSchema>;
|
|
740
|
+
declare const VirtualAssistantChatParamsSchema: z.ZodReadonly<z.ZodObject<{
|
|
741
|
+
system_prompt: z.ZodDefault<z.ZodString>;
|
|
742
|
+
llm_model_type: z.ZodOptional<z.ZodString>;
|
|
743
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
744
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
745
|
+
toolkits: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
746
|
+
toolkit: z.ZodString;
|
|
747
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
748
|
+
name: z.ZodString;
|
|
749
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
750
|
+
settings_config: z.ZodBoolean;
|
|
751
|
+
user_description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
752
|
+
settings: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
753
|
+
}, z.core.$strip>>;
|
|
754
|
+
label: z.ZodString;
|
|
755
|
+
settings_config: z.ZodBoolean;
|
|
756
|
+
is_external: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
757
|
+
settings: z.ZodOptional<z.ZodAny>;
|
|
758
|
+
}, z.core.$strip>>>;
|
|
759
|
+
context: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
760
|
+
context_type: z.ZodEnum<{
|
|
761
|
+
knowledge_base: "knowledge_base";
|
|
762
|
+
code: "code";
|
|
763
|
+
}>;
|
|
764
|
+
name: z.ZodString;
|
|
765
|
+
}, z.core.$strip>>>;
|
|
766
|
+
mcp_servers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
767
|
+
name: z.ZodString;
|
|
768
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
769
|
+
enabled: z.ZodBoolean;
|
|
770
|
+
config: z.ZodOptional<z.ZodObject<{
|
|
771
|
+
command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
772
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
773
|
+
args: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
774
|
+
env: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
775
|
+
auth_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
776
|
+
}, z.core.$strip>>;
|
|
777
|
+
mcp_connect_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
778
|
+
tools_tokens_size_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
779
|
+
command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
780
|
+
arguments: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
781
|
+
settings: z.ZodOptional<z.ZodAny>;
|
|
782
|
+
mcp_connect_auth_token: z.ZodOptional<z.ZodAny>;
|
|
783
|
+
}, z.core.$strip>>>;
|
|
784
|
+
skill_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
785
|
+
assistant_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
786
|
+
agent_mode: z.ZodDefault<z.ZodEnum<{
|
|
787
|
+
general: "general";
|
|
788
|
+
plan_execute: "plan_execute";
|
|
789
|
+
}>>;
|
|
790
|
+
plan_prompt: z.ZodOptional<z.ZodString>;
|
|
791
|
+
smart_tool_selection_enabled: z.ZodDefault<z.ZodBoolean>;
|
|
792
|
+
prompt_variables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
793
|
+
key: z.ZodString;
|
|
794
|
+
description: z.ZodOptional<z.ZodString>;
|
|
795
|
+
default_value: z.ZodString;
|
|
796
|
+
}, z.core.$strip>>>;
|
|
797
|
+
conversation_id: z.ZodOptional<z.ZodString>;
|
|
798
|
+
text: z.ZodString;
|
|
799
|
+
content_raw: z.ZodOptional<z.ZodString>;
|
|
800
|
+
file_names: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
801
|
+
history: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
802
|
+
role: z.ZodEnum<{
|
|
803
|
+
Assistant: "Assistant";
|
|
804
|
+
User: "User";
|
|
805
|
+
}>;
|
|
806
|
+
message: z.ZodOptional<z.ZodString>;
|
|
807
|
+
}, z.core.$strip>>, z.ZodString]>>;
|
|
808
|
+
stream: z.ZodOptional<z.ZodBoolean>;
|
|
809
|
+
output_schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
810
|
+
tools_config: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
811
|
+
name: z.ZodString;
|
|
812
|
+
tool_creds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
813
|
+
integration_id: z.ZodOptional<z.ZodString>;
|
|
814
|
+
}, z.core.$strip>>>;
|
|
815
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
816
|
+
top_k: z.ZodDefault<z.ZodNumber>;
|
|
817
|
+
propagate_headers: z.ZodDefault<z.ZodBoolean>;
|
|
818
|
+
disable_cache: z.ZodOptional<z.ZodBoolean>;
|
|
819
|
+
mcp_server_single_usage: z.ZodOptional<z.ZodBoolean>;
|
|
820
|
+
}, z.core.$strip>>;
|
|
821
|
+
type VirtualAssistantChatParams = z.input<typeof VirtualAssistantChatParamsSchema>;
|
|
740
822
|
declare const AssistantVersionsListParamsSchema: z.ZodReadonly<z.ZodObject<{
|
|
741
823
|
page: z.ZodOptional<z.ZodNumber>;
|
|
742
824
|
per_page: z.ZodOptional<z.ZodNumber>;
|
|
@@ -814,6 +896,11 @@ declare class AssistantService {
|
|
|
814
896
|
* Send a chat request to an assistant by slug.
|
|
815
897
|
*/
|
|
816
898
|
chatBySlug(assistantSlug: string, _params: AssistantChatParams, headers?: Record<string, string>): Promise<BaseModelResponse>;
|
|
899
|
+
/**
|
|
900
|
+
* Run inference using an inline (virtual) assistant definition.
|
|
901
|
+
* No database assistant record is required. History is never persisted.
|
|
902
|
+
*/
|
|
903
|
+
askVirtual(_params: VirtualAssistantChatParams, headers?: Record<string, string>): Promise<BaseModelResponse>;
|
|
817
904
|
/**
|
|
818
905
|
* Compare two assistant versions.
|
|
819
906
|
*/
|
|
@@ -2641,4 +2728,4 @@ declare class NotFoundError extends ApiError {
|
|
|
2641
2728
|
constructor(resourceType: string, resourceId: string);
|
|
2642
2729
|
}
|
|
2643
2730
|
|
|
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 };
|
|
2731
|
+
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 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
|
@@ -737,6 +737,88 @@ declare const AssistantChatParamsSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
737
737
|
output_schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
738
738
|
}, z.core.$strip>>;
|
|
739
739
|
type AssistantChatParams = z.infer<typeof AssistantChatParamsSchema>;
|
|
740
|
+
declare const VirtualAssistantChatParamsSchema: z.ZodReadonly<z.ZodObject<{
|
|
741
|
+
system_prompt: z.ZodDefault<z.ZodString>;
|
|
742
|
+
llm_model_type: z.ZodOptional<z.ZodString>;
|
|
743
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
744
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
745
|
+
toolkits: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
746
|
+
toolkit: z.ZodString;
|
|
747
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
748
|
+
name: z.ZodString;
|
|
749
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
750
|
+
settings_config: z.ZodBoolean;
|
|
751
|
+
user_description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
752
|
+
settings: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
753
|
+
}, z.core.$strip>>;
|
|
754
|
+
label: z.ZodString;
|
|
755
|
+
settings_config: z.ZodBoolean;
|
|
756
|
+
is_external: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
757
|
+
settings: z.ZodOptional<z.ZodAny>;
|
|
758
|
+
}, z.core.$strip>>>;
|
|
759
|
+
context: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
760
|
+
context_type: z.ZodEnum<{
|
|
761
|
+
knowledge_base: "knowledge_base";
|
|
762
|
+
code: "code";
|
|
763
|
+
}>;
|
|
764
|
+
name: z.ZodString;
|
|
765
|
+
}, z.core.$strip>>>;
|
|
766
|
+
mcp_servers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
767
|
+
name: z.ZodString;
|
|
768
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
769
|
+
enabled: z.ZodBoolean;
|
|
770
|
+
config: z.ZodOptional<z.ZodObject<{
|
|
771
|
+
command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
772
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
773
|
+
args: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
774
|
+
env: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
775
|
+
auth_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
776
|
+
}, z.core.$strip>>;
|
|
777
|
+
mcp_connect_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
778
|
+
tools_tokens_size_limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
779
|
+
command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
780
|
+
arguments: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
781
|
+
settings: z.ZodOptional<z.ZodAny>;
|
|
782
|
+
mcp_connect_auth_token: z.ZodOptional<z.ZodAny>;
|
|
783
|
+
}, z.core.$strip>>>;
|
|
784
|
+
skill_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
785
|
+
assistant_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
786
|
+
agent_mode: z.ZodDefault<z.ZodEnum<{
|
|
787
|
+
general: "general";
|
|
788
|
+
plan_execute: "plan_execute";
|
|
789
|
+
}>>;
|
|
790
|
+
plan_prompt: z.ZodOptional<z.ZodString>;
|
|
791
|
+
smart_tool_selection_enabled: z.ZodDefault<z.ZodBoolean>;
|
|
792
|
+
prompt_variables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
793
|
+
key: z.ZodString;
|
|
794
|
+
description: z.ZodOptional<z.ZodString>;
|
|
795
|
+
default_value: z.ZodString;
|
|
796
|
+
}, z.core.$strip>>>;
|
|
797
|
+
conversation_id: z.ZodOptional<z.ZodString>;
|
|
798
|
+
text: z.ZodString;
|
|
799
|
+
content_raw: z.ZodOptional<z.ZodString>;
|
|
800
|
+
file_names: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
801
|
+
history: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
802
|
+
role: z.ZodEnum<{
|
|
803
|
+
Assistant: "Assistant";
|
|
804
|
+
User: "User";
|
|
805
|
+
}>;
|
|
806
|
+
message: z.ZodOptional<z.ZodString>;
|
|
807
|
+
}, z.core.$strip>>, z.ZodString]>>;
|
|
808
|
+
stream: z.ZodOptional<z.ZodBoolean>;
|
|
809
|
+
output_schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
810
|
+
tools_config: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
811
|
+
name: z.ZodString;
|
|
812
|
+
tool_creds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
813
|
+
integration_id: z.ZodOptional<z.ZodString>;
|
|
814
|
+
}, z.core.$strip>>>;
|
|
815
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
816
|
+
top_k: z.ZodDefault<z.ZodNumber>;
|
|
817
|
+
propagate_headers: z.ZodDefault<z.ZodBoolean>;
|
|
818
|
+
disable_cache: z.ZodOptional<z.ZodBoolean>;
|
|
819
|
+
mcp_server_single_usage: z.ZodOptional<z.ZodBoolean>;
|
|
820
|
+
}, z.core.$strip>>;
|
|
821
|
+
type VirtualAssistantChatParams = z.input<typeof VirtualAssistantChatParamsSchema>;
|
|
740
822
|
declare const AssistantVersionsListParamsSchema: z.ZodReadonly<z.ZodObject<{
|
|
741
823
|
page: z.ZodOptional<z.ZodNumber>;
|
|
742
824
|
per_page: z.ZodOptional<z.ZodNumber>;
|
|
@@ -814,6 +896,11 @@ declare class AssistantService {
|
|
|
814
896
|
* Send a chat request to an assistant by slug.
|
|
815
897
|
*/
|
|
816
898
|
chatBySlug(assistantSlug: string, _params: AssistantChatParams, headers?: Record<string, string>): Promise<BaseModelResponse>;
|
|
899
|
+
/**
|
|
900
|
+
* Run inference using an inline (virtual) assistant definition.
|
|
901
|
+
* No database assistant record is required. History is never persisted.
|
|
902
|
+
*/
|
|
903
|
+
askVirtual(_params: VirtualAssistantChatParams, headers?: Record<string, string>): Promise<BaseModelResponse>;
|
|
817
904
|
/**
|
|
818
905
|
* Compare two assistant versions.
|
|
819
906
|
*/
|
|
@@ -2641,4 +2728,4 @@ declare class NotFoundError extends ApiError {
|
|
|
2641
2728
|
constructor(resourceType: string, resourceId: string);
|
|
2642
2729
|
}
|
|
2643
2730
|
|
|
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 };
|
|
2731
|
+
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 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
|
};
|
|
@@ -472,6 +475,88 @@ var AssistantChatParamsSchema = z2.object({
|
|
|
472
475
|
version: z2.number().optional(),
|
|
473
476
|
output_schema: z2.union([z2.custom((val) => val instanceof z2.ZodType), z2.record(z2.string(), z2.unknown())]).optional()
|
|
474
477
|
}).readonly();
|
|
478
|
+
var VirtualAssistantContextSchema = z2.object({
|
|
479
|
+
context_type: z2.enum(["knowledge_base", "code"]),
|
|
480
|
+
name: z2.string()
|
|
481
|
+
});
|
|
482
|
+
var VirtualAssistantToolSchema = z2.object({
|
|
483
|
+
name: z2.string(),
|
|
484
|
+
label: z2.string().nullable().optional(),
|
|
485
|
+
settings_config: z2.boolean(),
|
|
486
|
+
user_description: z2.string().nullable().optional(),
|
|
487
|
+
settings: z2.any().nullable().optional()
|
|
488
|
+
});
|
|
489
|
+
var VirtualAssistantToolKitSchema = z2.object({
|
|
490
|
+
toolkit: z2.string(),
|
|
491
|
+
tools: z2.array(VirtualAssistantToolSchema),
|
|
492
|
+
label: z2.string(),
|
|
493
|
+
settings_config: z2.boolean(),
|
|
494
|
+
is_external: z2.boolean().nullable().optional(),
|
|
495
|
+
settings: z2.any().optional()
|
|
496
|
+
});
|
|
497
|
+
var VirtualAssistantMCPServerConfigSchema = z2.object({
|
|
498
|
+
command: z2.string().nullable().optional(),
|
|
499
|
+
url: z2.string().nullable().optional(),
|
|
500
|
+
args: z2.array(z2.string()).nullable().optional(),
|
|
501
|
+
env: z2.record(z2.string(), z2.unknown()).nullable().optional(),
|
|
502
|
+
auth_token: z2.string().nullable().optional()
|
|
503
|
+
});
|
|
504
|
+
var VirtualAssistantMCPServerSchema = z2.object({
|
|
505
|
+
name: z2.string(),
|
|
506
|
+
description: z2.string().nullable().optional(),
|
|
507
|
+
enabled: z2.boolean(),
|
|
508
|
+
config: VirtualAssistantMCPServerConfigSchema.optional(),
|
|
509
|
+
mcp_connect_url: z2.string().nullable().optional(),
|
|
510
|
+
tools_tokens_size_limit: z2.number().nullable().optional(),
|
|
511
|
+
command: z2.string().nullable().optional(),
|
|
512
|
+
arguments: z2.string().nullable().optional(),
|
|
513
|
+
settings: z2.any().optional(),
|
|
514
|
+
mcp_connect_auth_token: z2.any().optional()
|
|
515
|
+
});
|
|
516
|
+
var VirtualAssistantChatParamsSchema = z2.object({
|
|
517
|
+
// Assistant definition fields
|
|
518
|
+
system_prompt: z2.string().default(""),
|
|
519
|
+
llm_model_type: z2.string().optional(),
|
|
520
|
+
temperature: z2.number().min(0).max(2).optional(),
|
|
521
|
+
top_p: z2.number().min(0).max(1).optional(),
|
|
522
|
+
toolkits: z2.array(VirtualAssistantToolKitSchema).default([]),
|
|
523
|
+
context: z2.array(VirtualAssistantContextSchema).default([]),
|
|
524
|
+
mcp_servers: z2.array(VirtualAssistantMCPServerSchema).default([]),
|
|
525
|
+
skill_ids: z2.array(z2.string()).default([]),
|
|
526
|
+
assistant_ids: z2.array(z2.string()).default([]),
|
|
527
|
+
agent_mode: z2.enum(["general", "plan_execute"]).default("general"),
|
|
528
|
+
plan_prompt: z2.string().optional(),
|
|
529
|
+
smart_tool_selection_enabled: z2.boolean().default(false),
|
|
530
|
+
prompt_variables: z2.array(PromptVariableSchema).default([]),
|
|
531
|
+
// Chat parameters
|
|
532
|
+
conversation_id: z2.string().optional(),
|
|
533
|
+
text: z2.string(),
|
|
534
|
+
content_raw: z2.string().optional(),
|
|
535
|
+
file_names: z2.array(z2.string()).optional(),
|
|
536
|
+
history: z2.union([
|
|
537
|
+
z2.array(
|
|
538
|
+
z2.object({
|
|
539
|
+
role: z2.enum(["Assistant", "User"]),
|
|
540
|
+
message: z2.string().optional()
|
|
541
|
+
})
|
|
542
|
+
),
|
|
543
|
+
z2.string()
|
|
544
|
+
]).default([]),
|
|
545
|
+
stream: z2.boolean().optional(),
|
|
546
|
+
output_schema: z2.union([z2.custom((val) => val instanceof z2.ZodType), z2.record(z2.string(), z2.unknown())]).optional(),
|
|
547
|
+
tools_config: z2.array(
|
|
548
|
+
z2.object({
|
|
549
|
+
name: z2.string(),
|
|
550
|
+
tool_creds: z2.record(z2.string(), z2.unknown()).optional(),
|
|
551
|
+
integration_id: z2.string().optional()
|
|
552
|
+
})
|
|
553
|
+
).optional(),
|
|
554
|
+
metadata: z2.record(z2.string(), z2.unknown()).optional(),
|
|
555
|
+
top_k: z2.number().default(10),
|
|
556
|
+
propagate_headers: z2.boolean().default(false),
|
|
557
|
+
disable_cache: z2.boolean().optional(),
|
|
558
|
+
mcp_server_single_usage: z2.boolean().optional()
|
|
559
|
+
}).readonly();
|
|
475
560
|
var AssistantVersionsListParamsSchema = z2.object({
|
|
476
561
|
page: z2.number().optional(),
|
|
477
562
|
per_page: z2.number().optional()
|
|
@@ -651,6 +736,32 @@ var AssistantService = class {
|
|
|
651
736
|
}
|
|
652
737
|
return mapped;
|
|
653
738
|
}
|
|
739
|
+
/**
|
|
740
|
+
* Run inference using an inline (virtual) assistant definition.
|
|
741
|
+
* No database assistant record is required. History is never persisted.
|
|
742
|
+
*/
|
|
743
|
+
async askVirtual(_params, headers) {
|
|
744
|
+
let zodSchema = void 0;
|
|
745
|
+
let params = { ..._params };
|
|
746
|
+
if (params.output_schema && params.output_schema instanceof z3.ZodType) {
|
|
747
|
+
zodSchema = params.output_schema;
|
|
748
|
+
params.output_schema = z3.toJSONSchema(zodSchema);
|
|
749
|
+
}
|
|
750
|
+
params = VirtualAssistantChatParamsSchema.parse(params);
|
|
751
|
+
const response = await this.api.post(
|
|
752
|
+
"/v1/assistants/virtual/model",
|
|
753
|
+
params,
|
|
754
|
+
{
|
|
755
|
+
responseType: params.stream ? "stream" : void 0
|
|
756
|
+
},
|
|
757
|
+
headers
|
|
758
|
+
);
|
|
759
|
+
const mapped = AssistantMapper.mapBaseModelApiResponse(response);
|
|
760
|
+
if (!params.stream && zodSchema && mapped.generated) {
|
|
761
|
+
mapped.generated = zodSchema.parse(mapped.generated);
|
|
762
|
+
}
|
|
763
|
+
return mapped;
|
|
764
|
+
}
|
|
654
765
|
/**
|
|
655
766
|
* Compare two assistant versions.
|
|
656
767
|
*/
|
|
@@ -2408,6 +2519,7 @@ export {
|
|
|
2408
2519
|
TIME_PERIOD_VALUES,
|
|
2409
2520
|
TaskService,
|
|
2410
2521
|
UserService,
|
|
2522
|
+
VirtualAssistantChatParamsSchema,
|
|
2411
2523
|
WorkflowCreateParamsSchema,
|
|
2412
2524
|
WorkflowExecutionCreateParamsSchema,
|
|
2413
2525
|
WorkflowExecutionListParamsSchema,
|