bailian-cli-core 2.6.2 → 2.7.1

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.mts CHANGED
@@ -1410,6 +1410,14 @@ export declare function makeConfigStore(configName?: string): ConfigStore;
1410
1410
  //#region src/auth/types.d.ts
1411
1411
  /** Where a resolved credential came from (shown by `bl auth status`). */
1412
1412
  type CredentialSource = "flag" | "env" | "config";
1413
+ /**
1414
+ * Winning sources for the model-domain connection pair.
1415
+ * Missing `baseUrlSource` means the built-in REGIONS.cn default.
1416
+ */
1417
+ interface ModelConnectionProvenance {
1418
+ apiKeySource?: CredentialSource;
1419
+ baseUrlSource?: CredentialSource;
1420
+ }
1413
1421
  /** Credential for the **model domain** (DashScope data plane). Always an API key. */
1414
1422
  interface ApiKeyCredential {
1415
1423
  token: string;
@@ -2098,6 +2106,17 @@ export declare function buildSources(flags: Partial<SourceFlags>): ResolutionSou
2098
2106
  export declare function buildSettings(s: ResolutionSources): Settings;
2099
2107
  //#endregion
2100
2108
  //#region src/auth/resolver.d.ts
2109
+ /** Winning api_key source (flag > env > file), or undefined if none. */
2110
+ export declare function resolveApiKeySource(sources: ResolutionSources): CredentialSource | undefined;
2111
+ /**
2112
+ * Winning explicit base_url source (flag > env > file).
2113
+ * Undefined means the built-in REGIONS.cn default will be used.
2114
+ */
2115
+ export declare function resolveModelBaseUrlSource(sources: ResolutionSources): CredentialSource | undefined;
2116
+ /** Provenance for the model connection pair (no secrets). */
2117
+ export declare function resolveModelConnectionProvenance(sources: ResolutionSources): ModelConnectionProvenance;
2118
+ /** True only when both sides are explicit and disagree. */
2119
+ export declare function isModelConnectionSourceMismatch(provenance: ModelConnectionProvenance): boolean;
2101
2120
  /** Preserve whether the shared base URL chain selected a configured origin or its default. */
2102
2121
  export declare function resolveModelBaseUrlState(sources: ResolutionSources, fallback?: string): {
2103
2122
  baseUrl: string;
@@ -2182,6 +2201,9 @@ export declare function refreshAccessToken(opts: {
2182
2201
  }): Promise<string | null>;
2183
2202
  //#endregion
2184
2203
  //#region src/client/endpoints.d.ts
2204
+ export declare function parsexBaseUrl(workspaceId: string): string;
2205
+ /** The shared credential resolver normalizes --base-url to an origin. */
2206
+ export declare function parsexEndpoint(baseUrl: string, operation: "parse" | "extract", action: "submit" | "result"): string;
2185
2207
  export declare function chatPath(): string;
2186
2208
  export declare function responsesPath(): string;
2187
2209
  export declare function decisionPath(): string;
@@ -3356,6 +3378,67 @@ export declare function unwrapDecisionQuestions(parsed: unknown): unknown;
3356
3378
  /** 去掉每个问题上的训练字段(label / target),返回新对象,不修改入参。 */
3357
3379
  export declare function stripDecisionTrainingFields(questions: unknown): unknown;
3358
3380
  //#endregion
3381
+ //#region src/parsex/types.d.ts
3382
+ export type ParsexOperation = "parse" | "extract";
3383
+ export type ParsexStatus = "init" | "processing" | "success" | "failed";
3384
+ export interface ParsexOssCredentials {
3385
+ access_key_id: string;
3386
+ access_key_secret: string;
3387
+ security_token?: string;
3388
+ }
3389
+ export interface ParsexOssConfig extends ParsexOssCredentials {
3390
+ bucket: string;
3391
+ endpoint: string;
3392
+ }
3393
+ export interface ParsexSubmitRequest {
3394
+ file_url?: string;
3395
+ parsed_file_biz_id?: string;
3396
+ file_name?: string;
3397
+ file_name_extension?: string;
3398
+ config_id?: string;
3399
+ processing?: Record<string, unknown>;
3400
+ output?: {
3401
+ output_file_format?: string[];
3402
+ layout_table_format?: string;
3403
+ oss_config?: ParsexOssConfig;
3404
+ };
3405
+ }
3406
+ export interface ParsexResultRequest {
3407
+ biz_id: string;
3408
+ step_start?: number;
3409
+ step_size?: number;
3410
+ oss_config?: ParsexOssCredentials;
3411
+ }
3412
+ export interface ParsexResponse<Data> {
3413
+ request_id?: string;
3414
+ data: Data;
3415
+ }
3416
+ /** Preserve all result fields, including layouts, media segments and citations. */
3417
+ export interface ParsexResultData {
3418
+ status: ParsexStatus | (string & {});
3419
+ processing?: number;
3420
+ code?: string;
3421
+ message?: string;
3422
+ [field: string]: unknown;
3423
+ }
3424
+ export type ParsexSubmitResponse = ParsexResponse<{
3425
+ biz_id: string;
3426
+ }>;
3427
+ export type ParsexResultResponse = ParsexResponse<ParsexResultData>;
3428
+ //#endregion
3429
+ //#region src/parsex/request.d.ts
3430
+ export declare function submitParsexTask(client: Client, baseUrl: string, operation: ParsexOperation, body: ParsexSubmitRequest): Promise<ParsexSubmitResponse>;
3431
+ export declare function getParsexResult(client: Client, baseUrl: string, operation: ParsexOperation, body: ParsexResultRequest, signal?: AbortSignal): Promise<ParsexResultResponse>;
3432
+ //#endregion
3433
+ //#region src/parsex/poll.d.ts
3434
+ /** The deadline covers both in-flight requests and the interval between requests. */
3435
+ export declare function followParsexResult(client: Client, baseUrl: string, operation: ParsexOperation, body: ParsexResultRequest, options: {
3436
+ interval: number;
3437
+ pollTimeout: number;
3438
+ signal?: AbortSignal;
3439
+ progress?: (response: ParsexResultResponse) => void;
3440
+ }): Promise<ParsexResultResponse>;
3441
+ //#endregion
3359
3442
  //#region src/finetune/types.d.ts
3360
3443
  /**
3361
3444
  * Fine-tune job API types.
@@ -5959,4 +6042,4 @@ export declare function installSkillWithFanout(name: string, entry: SkillIndexEn
5959
6042
  export declare function listSkillDirsOnDisk(): string[];
5960
6043
  export declare function computeSkillStatuses(index: SkillsIndex, lock: SkillLockFile, diskNames: string[]): SkillStatusRow[];
5961
6044
  //#endregion
5962
- export { type AcsQueryParams, type AcsSignConfig, type AgentResult, type AgentTarget, type AnyCommand, type ApiErrorBody, type ApiKeyCredential, type ApiKeyLoginKind, type ApiKeyResolutionSourceSelection, type AppCompletionRequest, type AppCompletionResponse, type AppStreamChunk, type AsrApiKind, type AsrApiRoute, type AsrContextMessage, type AsrFlashFamily, type AuthPersistPatch, type AuthRequirement, type AuthState, type AuthStore, type BailianControlAuth, type Budget, type BuildAsrFlashRequestOpts, type CallerAttribution, type Capability, type ChatChoice, type ChatMessage, type ChatMessageContent, type ChatRequest, type ChatResponse, type ChatResponseFormat, type ChatTool, type Clarification, type ClientOpenApiJsonOpts, type ClientOpenApiQueryOpts, type ClientRequestOpts, type Command, type CommandContext, type CommandNotice, type CommandPack, type CommandPackApiKeyContext, type CommandPackCommand, type CommandPackContext, type CommandPackCredentials, type CommandPackErrorOptions, type CommandPackErrors, type CommandPackManager, type CommandPackMeta, type CommandPackMutationResult, type CommandPackOutput, type CommandPackOutputOptions, type CommandPackReport, type CommandPreparation, type CommandRisk, type CommandRiskLevel, type Complexity, type ConfigFile, type ConfigProfiles, type ConfigStore, type ConnectBailianMcpOptions, type ConsoleCall, type ConsoleCredential, type ConsoleGatewayRequest, type ConsoleGatewayTarget, type ConsoleSite, type ContextNeed, type CreateUserReqDTO, type CredentialSource, type DashScopeASRRequest, type DashScopeASRTaskResult, type DashScopeASRTranscriptionItem, type DashScopeAsyncResponse, type DashScopeImageRequest, type DashScopeImageSyncResponse, type DashScopeTTSRequest, type DashScopeTTSResponse, type DashScopeTTSStreamChunk, type DashScopeTaskResponse, type DashScopeVideoEditRequest, type DashScopeVideoRefRequest, type DashScopeVideoRequest, type DataModality, type DatasetSchema, type Degradation, type IntentProfile as EngineIntentProfile, type RecommendResult as EngineRecommendResult, type RecommendSuccess as EngineRecommendSuccess, type RecommendSuccess, type Recommendation as EngineRecommendation, type StepRecommendation as EngineStepRecommendation, type ExecutionPlan, type FamilyProfile, type FanoutOutcome, type Feature, type FetchImplementation, type FlagDef, type FlagsDef, type HttpDeps, type Identity, type ImageApiKind, type ImageApiRoute, type ImageInputStyle, type ImageSizeProfile, type InstallMethod, type InstallMethodIdentity, type InstalledSkill, type IntentSegment, type Interaction, type KnowledgeChatContentPart, type KnowledgeChatMessage, type KnowledgeChatRequest, type KnowledgeChatStreamChunk, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type LLMClient, type LLMClientOptions, type LLMErrorKind, type LLMStage, type Language, type IntentProfile$1 as LegacyIntentProfile, type ModelProfile as LegacyModelProfile, type RecommendResult$1 as LegacyRecommendResult, type LinkResult, type LocalizedText, type McpConnectedClient, type McpTool, type McpToolResult, type MemoryAddAsyncResponse, type MemoryAddRequest, type MemoryContentPart, type MemoryEvent, type MemoryEventResourceType, type MemoryEventResponse, type MemoryEventResult, type MemoryEventStatus, type MemoryExtractScene, type MemoryMessage, type MemoryNode, type MemoryNodeDetailResponse, type MemoryNodeListResponse, type MemoryNodeUpdateRequest, type MemoryPlanVersion, type MemorySearchRequest, type MemorySearchResponse, type MemorySkillExportResponse, type MemoryToolCall, type MemoryType, type Modality, type ModelCategory, type ModelGroup, type ModelGroupItem, type ModelGroupParams, type ModelGroupResult, type ModelListParams, type ModelListResult, type ModelOfflineInfo, type ModelOfflineNotice, type ModelPreference, type ModelPrice, type ModelPriceInfo, type ModelSampleCodeV2, type ModelSampleSnippet, type OpenApiCredential, type OutputFormat, type ParsedFlags, type PipelineResult, type PipelineStep, type PredictConfigEntry, type PreferenceMode, type ProfileAttribute, type ProfileSchemaAttribute, type ProfileSchemaAttributeOperation, type ProfileSchemaCreateRequest, type ProfileSchemaCreateResponse, type ProfileSchemaDetailResponse, type ProfileSchemaListResponse, type ProfileSchemaSummary, type ProfileSchemaUpdateRequest, type QpmLimit, type QualityPreference, type RagAddCategoryData, type RagAddCategoryResponse, type RagAddConnectorResponse, type RagAddFileData, type RagAddFileResponse, type RagAgentConfig, type RagAgentDetail, type RagAgentGetData, type RagAgentGetResponse, type RagAgentListData, type RagAgentListResponse, type RagAgentMutationData, type RagAgentMutationResponse, type RagAgentRow, type RagBatchUpdateTagResponse, type RagCategory, type RagChunkListData, type RagChunkListResponse, type RagChunkNode, type RagChunkNodeMetadata, type RagConnectorInfo, type RagConnectorResponse, type RagCreateIndexV2Data, type RagCreateIndexV2Response, type RagDataCenterFile, type RagDeleteFileData, type RagDeleteFileResponse, type RagDescribeFileResponse, type RagGetConnectorResponse, type RagIndexFileDetailRow, type RagIndexFileDetailsResponse, type RagIndexFileRow, type RagIndexFilesData, type RagIndexFilesResponse, type RagIndexJobDoc, type RagIndexJobStatusData, type RagIndexJobStatusResponse, type RagIndexListData, type RagIndexListResponse, type RagIndexRow, type RagJobCreateData, type RagJobCreateResponse, type RagListCategoryData, type RagListCategoryResponse, type RagListFileData, type RagListFileResponse, type RagMonitorData, type RagMonitorResponse, type RagMutationResponse, type RagOssImportData, type RagOssImportFileResult, type RagOssImportResponse, type RagQpsMonitorData, type RagResponse, type RagStorageMonitorData, type RagUploadLeaseData, type RagUploadLeaseParam, type RagUploadLeaseResponse, type RecommendDeps, type RecommendSession, type RecommendedModel, type Region, type RequestOpts, type ResolutionSources, type ResponsesOutputContent, type ResponsesOutputItem, type ResponsesRequest, type ResponsesResponse, type ResponsesStreamEvent, type SecurityAlert, type SecurityAlertList, type SecurityOverview, type SecurityRiskLevel, type SecurityScanStat, type SecurityToggle, type ServerSentEvent, type Settings, type SingleResult, type SkillIndexEntry, type SkillInstallRecord, type SkillLockEntry, type SkillLockFile, type SkillMeta, type SkillStatus, type SkillStatusRow, type SkillsIndex, type SourceFlags, type StreamChoice, type StreamChunk, type ToolDeps, type TrackingDeps, type TrackingEvent, type TrackingIdentity, type TrainingProfile, type TrajectoryEvent, type UserProfileAttribute, type UserProfileResponse, type UserProfileValueItem, type UserProfileValueUpdateRequest, type ValidateOpts, type ValidationIssue, type ValidationResult, type ValidationSeverity, type ValidationStats, type ValidatorSpec, type VocabularyEntry, type VocabularyEnvelope, type VocabularyListItem, type VocabularyRequest, analyzeIntent as analyzeEngineIntent, recommend as recommendEngine, route as routeEngine };
6045
+ export { type AcsQueryParams, type AcsSignConfig, type AgentResult, type AgentTarget, type AnyCommand, type ApiErrorBody, type ApiKeyCredential, type ApiKeyLoginKind, type ApiKeyResolutionSourceSelection, type AppCompletionRequest, type AppCompletionResponse, type AppStreamChunk, type AsrApiKind, type AsrApiRoute, type AsrContextMessage, type AsrFlashFamily, type AuthPersistPatch, type AuthRequirement, type AuthState, type AuthStore, type BailianControlAuth, type Budget, type BuildAsrFlashRequestOpts, type CallerAttribution, type Capability, type ChatChoice, type ChatMessage, type ChatMessageContent, type ChatRequest, type ChatResponse, type ChatResponseFormat, type ChatTool, type Clarification, type ClientOpenApiJsonOpts, type ClientOpenApiQueryOpts, type ClientRequestOpts, type Command, type CommandContext, type CommandNotice, type CommandPack, type CommandPackApiKeyContext, type CommandPackCommand, type CommandPackContext, type CommandPackCredentials, type CommandPackErrorOptions, type CommandPackErrors, type CommandPackManager, type CommandPackMeta, type CommandPackMutationResult, type CommandPackOutput, type CommandPackOutputOptions, type CommandPackReport, type CommandPreparation, type CommandRisk, type CommandRiskLevel, type Complexity, type ConfigFile, type ConfigProfiles, type ConfigStore, type ConnectBailianMcpOptions, type ConsoleCall, type ConsoleCredential, type ConsoleGatewayRequest, type ConsoleGatewayTarget, type ConsoleSite, type ContextNeed, type CreateUserReqDTO, type CredentialSource, type DashScopeASRRequest, type DashScopeASRTaskResult, type DashScopeASRTranscriptionItem, type DashScopeAsyncResponse, type DashScopeImageRequest, type DashScopeImageSyncResponse, type DashScopeTTSRequest, type DashScopeTTSResponse, type DashScopeTTSStreamChunk, type DashScopeTaskResponse, type DashScopeVideoEditRequest, type DashScopeVideoRefRequest, type DashScopeVideoRequest, type DataModality, type DatasetSchema, type Degradation, type IntentProfile as EngineIntentProfile, type RecommendResult as EngineRecommendResult, type RecommendSuccess as EngineRecommendSuccess, type RecommendSuccess, type Recommendation as EngineRecommendation, type StepRecommendation as EngineStepRecommendation, type ExecutionPlan, type FamilyProfile, type FanoutOutcome, type Feature, type FetchImplementation, type FlagDef, type FlagsDef, type HttpDeps, type Identity, type ImageApiKind, type ImageApiRoute, type ImageInputStyle, type ImageSizeProfile, type InstallMethod, type InstallMethodIdentity, type InstalledSkill, type IntentSegment, type Interaction, type KnowledgeChatContentPart, type KnowledgeChatMessage, type KnowledgeChatRequest, type KnowledgeChatStreamChunk, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type LLMClient, type LLMClientOptions, type LLMErrorKind, type LLMStage, type Language, type IntentProfile$1 as LegacyIntentProfile, type ModelProfile as LegacyModelProfile, type RecommendResult$1 as LegacyRecommendResult, type LinkResult, type LocalizedText, type McpConnectedClient, type McpTool, type McpToolResult, type MemoryAddAsyncResponse, type MemoryAddRequest, type MemoryContentPart, type MemoryEvent, type MemoryEventResourceType, type MemoryEventResponse, type MemoryEventResult, type MemoryEventStatus, type MemoryExtractScene, type MemoryMessage, type MemoryNode, type MemoryNodeDetailResponse, type MemoryNodeListResponse, type MemoryNodeUpdateRequest, type MemoryPlanVersion, type MemorySearchRequest, type MemorySearchResponse, type MemorySkillExportResponse, type MemoryToolCall, type MemoryType, type Modality, type ModelCategory, type ModelConnectionProvenance, type ModelGroup, type ModelGroupItem, type ModelGroupParams, type ModelGroupResult, type ModelListParams, type ModelListResult, type ModelOfflineInfo, type ModelOfflineNotice, type ModelPreference, type ModelPrice, type ModelPriceInfo, type ModelSampleCodeV2, type ModelSampleSnippet, type OpenApiCredential, type OutputFormat, type ParsedFlags, type PipelineResult, type PipelineStep, type PredictConfigEntry, type PreferenceMode, type ProfileAttribute, type ProfileSchemaAttribute, type ProfileSchemaAttributeOperation, type ProfileSchemaCreateRequest, type ProfileSchemaCreateResponse, type ProfileSchemaDetailResponse, type ProfileSchemaListResponse, type ProfileSchemaSummary, type ProfileSchemaUpdateRequest, type QpmLimit, type QualityPreference, type RagAddCategoryData, type RagAddCategoryResponse, type RagAddConnectorResponse, type RagAddFileData, type RagAddFileResponse, type RagAgentConfig, type RagAgentDetail, type RagAgentGetData, type RagAgentGetResponse, type RagAgentListData, type RagAgentListResponse, type RagAgentMutationData, type RagAgentMutationResponse, type RagAgentRow, type RagBatchUpdateTagResponse, type RagCategory, type RagChunkListData, type RagChunkListResponse, type RagChunkNode, type RagChunkNodeMetadata, type RagConnectorInfo, type RagConnectorResponse, type RagCreateIndexV2Data, type RagCreateIndexV2Response, type RagDataCenterFile, type RagDeleteFileData, type RagDeleteFileResponse, type RagDescribeFileResponse, type RagGetConnectorResponse, type RagIndexFileDetailRow, type RagIndexFileDetailsResponse, type RagIndexFileRow, type RagIndexFilesData, type RagIndexFilesResponse, type RagIndexJobDoc, type RagIndexJobStatusData, type RagIndexJobStatusResponse, type RagIndexListData, type RagIndexListResponse, type RagIndexRow, type RagJobCreateData, type RagJobCreateResponse, type RagListCategoryData, type RagListCategoryResponse, type RagListFileData, type RagListFileResponse, type RagMonitorData, type RagMonitorResponse, type RagMutationResponse, type RagOssImportData, type RagOssImportFileResult, type RagOssImportResponse, type RagQpsMonitorData, type RagResponse, type RagStorageMonitorData, type RagUploadLeaseData, type RagUploadLeaseParam, type RagUploadLeaseResponse, type RecommendDeps, type RecommendSession, type RecommendedModel, type Region, type RequestOpts, type ResolutionSources, type ResponsesOutputContent, type ResponsesOutputItem, type ResponsesRequest, type ResponsesResponse, type ResponsesStreamEvent, type SecurityAlert, type SecurityAlertList, type SecurityOverview, type SecurityRiskLevel, type SecurityScanStat, type SecurityToggle, type ServerSentEvent, type Settings, type SingleResult, type SkillIndexEntry, type SkillInstallRecord, type SkillLockEntry, type SkillLockFile, type SkillMeta, type SkillStatus, type SkillStatusRow, type SkillsIndex, type SourceFlags, type StreamChoice, type StreamChunk, type ToolDeps, type TrackingDeps, type TrackingEvent, type TrackingIdentity, type TrainingProfile, type TrajectoryEvent, type UserProfileAttribute, type UserProfileResponse, type UserProfileValueItem, type UserProfileValueUpdateRequest, type ValidateOpts, type ValidationIssue, type ValidationResult, type ValidationSeverity, type ValidationStats, type ValidatorSpec, type VocabularyEntry, type VocabularyEnvelope, type VocabularyListItem, type VocabularyRequest, analyzeIntent as analyzeEngineIntent, recommend as recommendEngine, route as routeEngine };