bailian-cli-core 2.8.4 → 2.8.6
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 +122 -12
- package/dist/index.mjs +35 -35
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1791,6 +1791,7 @@ interface ValueFlag {
|
|
|
1791
1791
|
description: LocalizedText;
|
|
1792
1792
|
valueHint: string;
|
|
1793
1793
|
required?: boolean;
|
|
1794
|
+
implicitValue?: boolean;
|
|
1794
1795
|
/**
|
|
1795
1796
|
* Restrict to a fixed set of values. The parser rejects anything else and the
|
|
1796
1797
|
* parsed type narrows to the union. Declare with `as const` so the literals
|
|
@@ -2851,6 +2852,14 @@ export declare const httpTransport: {
|
|
|
2851
2852
|
fetch(this: void, input: string | URL | Request, init?: RequestInit): Promise<Response>;
|
|
2852
2853
|
};
|
|
2853
2854
|
//#endregion
|
|
2855
|
+
//#region src/console/response.d.ts
|
|
2856
|
+
/**
|
|
2857
|
+
* Read the known Console protocol layers, not arbitrary business `data` fields.
|
|
2858
|
+
* Unlike the legacy unwrapResponse, failures are checked before discarding the
|
|
2859
|
+
* envelope and a successful null payload remains null. Used by the typed reads.
|
|
2860
|
+
*/
|
|
2861
|
+
export declare function unwrapConsoleResponse(raw: unknown): unknown;
|
|
2862
|
+
//#endregion
|
|
2854
2863
|
//#region src/console/models.d.ts
|
|
2855
2864
|
export declare const MODEL_LIST_API = "zeldaHttp.dashscopeModel./zelda/api/v1/modelCenter/listFoundationModels";
|
|
2856
2865
|
export declare const PREDICT_CONFIG_API = "zeldaEasy.bmp.modelPredictRpcService.getPredictParamConfig";
|
|
@@ -3080,14 +3089,19 @@ export declare function resolveFileUrl(input: string, apiKey: string, model: str
|
|
|
3080
3089
|
timeout?: number;
|
|
3081
3090
|
}): Promise<string>;
|
|
3082
3091
|
//#endregion
|
|
3092
|
+
//#region src/files/url.d.ts
|
|
3093
|
+
export declare const CONSOLE_FILE_URL_API = "zeldaEasy.bmp.ossRpcService.download";
|
|
3094
|
+
export declare function getConsoleFileUrl(client: Pick<Client, "console">, fileKey: string): Promise<Record<string, unknown> & {
|
|
3095
|
+
url: string;
|
|
3096
|
+
}>;
|
|
3097
|
+
//#endregion
|
|
3083
3098
|
//#region src/dataset/types.d.ts
|
|
3084
3099
|
/**
|
|
3085
3100
|
* Dataset API types.
|
|
3086
3101
|
*
|
|
3087
3102
|
* Maps DashScope `/api/v1/files` responses. The same endpoint backs every
|
|
3088
|
-
* dataset purpose the platform supports today
|
|
3089
|
-
*
|
|
3090
|
-
* purposes can be plugged in without schema changes.
|
|
3103
|
+
* dataset purpose the platform supports today — these types are deliberately
|
|
3104
|
+
* purpose-agnostic so new purposes can be plugged in without schema changes.
|
|
3091
3105
|
*/
|
|
3092
3106
|
/** A single uploaded dataset file as returned by the platform. */
|
|
3093
3107
|
export interface DatasetFile {
|
|
@@ -3099,7 +3113,7 @@ export interface DatasetFile {
|
|
|
3099
3113
|
size?: number;
|
|
3100
3114
|
/** Content hash (server-computed). */
|
|
3101
3115
|
md5?: string;
|
|
3102
|
-
/** Free-form purpose tag, e.g. "fine-tune"
|
|
3116
|
+
/** Free-form purpose tag, e.g. "fine-tune". */
|
|
3103
3117
|
purpose?: string;
|
|
3104
3118
|
/** Optional internal/external URL (kept for parity with the API). */
|
|
3105
3119
|
url?: string;
|
|
@@ -3176,7 +3190,7 @@ export interface DatasetUploadParams {
|
|
|
3176
3190
|
/**
|
|
3177
3191
|
* Purpose tag forwarded to the platform. Defaults to "fine-tune" because
|
|
3178
3192
|
* the API requires the field, but callers should set this explicitly when
|
|
3179
|
-
* uploading
|
|
3193
|
+
* uploading other dataset kinds.
|
|
3180
3194
|
*/
|
|
3181
3195
|
purpose?: string;
|
|
3182
3196
|
/** 已由调用方校验的不可变字节;提供时不再读取 filePath。 */
|
|
@@ -3205,6 +3219,65 @@ export declare function getDataset(client: Client, fileId: string, signal?: Abor
|
|
|
3205
3219
|
/** DELETE /api/v1/files/{file_id} */
|
|
3206
3220
|
export declare function deleteDataset(client: Client, fileId: string, signal?: AbortSignal): Promise<DatasetDeleteResponse>;
|
|
3207
3221
|
//#endregion
|
|
3222
|
+
//#region src/dataset/console.d.ts
|
|
3223
|
+
export declare const CONSOLE_DATASET_BY_ID_API = "zeldaEasy.broadscope-platform.dataset.queryByDatasetId.m_efm";
|
|
3224
|
+
export declare const CONSOLE_DATASET_VERSIONS_API = "zeldaEasy.broadscope-platform.dataset.query.m_efm";
|
|
3225
|
+
export declare const CONSOLE_DATASET_GROUPS_API = "zeldaEasy.broadscope-platform.datasetGroup.query.m_efm";
|
|
3226
|
+
export interface ListConsoleDatasetGroupsParams {
|
|
3227
|
+
page?: number;
|
|
3228
|
+
pageSize?: number;
|
|
3229
|
+
name?: string;
|
|
3230
|
+
}
|
|
3231
|
+
export interface ConsoleDatasetGroupsPage extends Record<string, unknown> {
|
|
3232
|
+
records: Record<string, unknown>[];
|
|
3233
|
+
page: number;
|
|
3234
|
+
itemsPerPage: number;
|
|
3235
|
+
items: number;
|
|
3236
|
+
}
|
|
3237
|
+
export interface ConsoleDatasetVersionsResult extends Record<string, unknown> {
|
|
3238
|
+
result: Record<string, unknown>[];
|
|
3239
|
+
}
|
|
3240
|
+
export declare function buildConsoleDatasetGroupsRequest(params?: ListConsoleDatasetGroupsParams): {
|
|
3241
|
+
input: {
|
|
3242
|
+
datasetPageSize: number;
|
|
3243
|
+
datasetTaskTypeList: number[];
|
|
3244
|
+
datasetTaskPageSize: number;
|
|
3245
|
+
name?: string | undefined;
|
|
3246
|
+
datasetGroupPageNo: number;
|
|
3247
|
+
datasetGroupPageSize: number;
|
|
3248
|
+
};
|
|
3249
|
+
};
|
|
3250
|
+
/** One page of Console groups with one embedded version preview per group. */
|
|
3251
|
+
export declare function listConsoleDatasetGroups(client: Pick<Client, "console">, params?: ListConsoleDatasetGroupsParams): Promise<ConsoleDatasetGroupsPage>;
|
|
3252
|
+
export declare function buildConsoleDatasetVersionsRequest(datasetGroupId: string): {
|
|
3253
|
+
input: {
|
|
3254
|
+
datasetGroupId: string;
|
|
3255
|
+
datasetTaskTypeList: number[];
|
|
3256
|
+
datasetTaskPageSize: number;
|
|
3257
|
+
};
|
|
3258
|
+
};
|
|
3259
|
+
/** Query one group; expose version IDs without inventing pagination/completeness. */
|
|
3260
|
+
export declare function listConsoleDatasetVersions(client: Pick<Client, "console">, datasetGroupId: string): Promise<ConsoleDatasetVersionsResult>;
|
|
3261
|
+
/** datasetId identifies a Console version, not an API-domain file. */
|
|
3262
|
+
export declare function getConsoleDatasetById(client: Pick<Client, "console">, datasetId: string): Promise<Record<string, unknown>>;
|
|
3263
|
+
export declare function buildConsoleDatasetVersionRequest(datasetId: string, datasetGroupId: string): {
|
|
3264
|
+
input: {
|
|
3265
|
+
datasetId: string;
|
|
3266
|
+
datasetGroupId: string;
|
|
3267
|
+
page: number;
|
|
3268
|
+
itemsPerPage: number;
|
|
3269
|
+
datasetTaskTypeList: number[];
|
|
3270
|
+
datasetTaskPageSize: number;
|
|
3271
|
+
};
|
|
3272
|
+
};
|
|
3273
|
+
/** Exact match only: never fall back to the first or a different version. */
|
|
3274
|
+
export declare function queryConsoleDatasetVersion(client: Pick<Client, "console">, datasetId: string, datasetGroupId: string): Promise<Record<string, unknown> | null>;
|
|
3275
|
+
/** A presence report, not a release, validation, or training-readiness decision. */
|
|
3276
|
+
export declare function consoleDatasetStatusAvailability(version: Record<string, unknown> | null): {
|
|
3277
|
+
release_status: string;
|
|
3278
|
+
import_status: string;
|
|
3279
|
+
};
|
|
3280
|
+
//#endregion
|
|
3208
3281
|
//#region src/dataset/validate/types.d.ts
|
|
3209
3282
|
/**
|
|
3210
3283
|
* Validator types — the registry contract that every format adheres to.
|
|
@@ -4330,11 +4403,7 @@ export interface BatchSizeGateInput {
|
|
|
4330
4403
|
* platform.
|
|
4331
4404
|
*/
|
|
4332
4405
|
recordCount: number;
|
|
4333
|
-
/**
|
|
4334
|
-
* Effective batch_size the job will run with — after the CLI's clamp
|
|
4335
|
-
* ([8, 1024]) and small-file auto-adjust, or the platform default (16) when
|
|
4336
|
-
* neither the user nor auto-adjust set one.
|
|
4337
|
-
*/
|
|
4406
|
+
/** Effective batch_size from the user override or the model-specific service default. */
|
|
4338
4407
|
batchSize: number;
|
|
4339
4408
|
}
|
|
4340
4409
|
export interface BatchSizeGateResult {
|
|
@@ -4359,6 +4428,15 @@ export interface BatchSizeGateResult {
|
|
|
4359
4428
|
* pre-check, and the hint nudges users to leave margin for the split.
|
|
4360
4429
|
*/
|
|
4361
4430
|
export declare function preflightBatchSizeGate(input: BatchSizeGateInput): BatchSizeGateResult;
|
|
4431
|
+
export type FineTuneHyperParameterIssueCode = "unsupported" | "not_editable" | "invalid_type" | "not_supported" | "out_of_range" | "invalid_step";
|
|
4432
|
+
export interface FineTuneHyperParameterIssue {
|
|
4433
|
+
parameter: string;
|
|
4434
|
+
value: unknown;
|
|
4435
|
+
code: FineTuneHyperParameterIssueCode;
|
|
4436
|
+
expected?: string;
|
|
4437
|
+
}
|
|
4438
|
+
export declare function validateFineTuneHyperParameterOverrides(schema: FineTuneParamHyperParam[], overrides: Record<string, unknown>): FineTuneHyperParameterIssue[];
|
|
4439
|
+
export declare function getFineTuneHyperParameterDefaultNumber(schema: FineTuneParamHyperParam[], parameter: string): number | undefined;
|
|
4362
4440
|
//#endregion
|
|
4363
4441
|
//#region src/finetune/profiles/registry.d.ts
|
|
4364
4442
|
/** Look up a profile by its CLI training-type name. Throws USAGE if unknown. */
|
|
@@ -5018,6 +5096,35 @@ export declare function listIndependentDeployedModels(client: Client): Promise<M
|
|
|
5018
5096
|
*/
|
|
5019
5097
|
export declare function findDeploymentEntry(entries: ModelServiceEntry[], deployedModel: string): ModelServiceEntry | undefined;
|
|
5020
5098
|
//#endregion
|
|
5099
|
+
//#region src/deploy/instances.d.ts
|
|
5100
|
+
export declare const CONSOLE_DEPLOY_INSTANCES_API = "zeldaEasy.broadscope-platform.modelInstance.listIndependentDeployedModel.m_efm";
|
|
5101
|
+
export interface ListConsoleDeploymentInstancesParams {
|
|
5102
|
+
page?: number;
|
|
5103
|
+
pageSize?: number;
|
|
5104
|
+
keyword?: string;
|
|
5105
|
+
modelServiceId?: string;
|
|
5106
|
+
}
|
|
5107
|
+
/** One raw page of independent deployment services, not capacity instances or replicas. */
|
|
5108
|
+
export interface ConsoleDeploymentInstancesPage {
|
|
5109
|
+
records: Record<string, unknown>[];
|
|
5110
|
+
/** Total number of matching services, not the records array. */
|
|
5111
|
+
items: number;
|
|
5112
|
+
itemsPerPage: number;
|
|
5113
|
+
page: number;
|
|
5114
|
+
pageCount: number;
|
|
5115
|
+
[key: string]: unknown;
|
|
5116
|
+
}
|
|
5117
|
+
export declare function buildConsoleDeploymentInstancesRequest(params?: ListConsoleDeploymentInstancesParams): {
|
|
5118
|
+
input: {
|
|
5119
|
+
modelServiceId?: string | undefined;
|
|
5120
|
+
searchNameKeyword?: string | undefined;
|
|
5121
|
+
page: number;
|
|
5122
|
+
itemsPerPage: number;
|
|
5123
|
+
};
|
|
5124
|
+
};
|
|
5125
|
+
/** Fetch only the requested page and preserve every business-response field verbatim. */
|
|
5126
|
+
export declare function listConsoleDeploymentInstances(client: Pick<Client, "console">, params?: ListConsoleDeploymentInstancesParams): Promise<ConsoleDeploymentInstancesPage>;
|
|
5127
|
+
//#endregion
|
|
5021
5128
|
//#region src/model-import/types.d.ts
|
|
5022
5129
|
/**
|
|
5023
5130
|
* Custom model import API types.
|
|
@@ -5415,7 +5522,7 @@ export declare function resolveBooleanFlag(flagValue: unknown, defaultWhenUnset:
|
|
|
5415
5522
|
export declare function resolveWatermark(flagValue: unknown, configuredValue?: boolean): boolean;
|
|
5416
5523
|
//#endregion
|
|
5417
5524
|
//#region src/telemetry/caller.d.ts
|
|
5418
|
-
/** Parse BAILIAN_CALLER_*.
|
|
5525
|
+
/** Parse BAILIAN_CALLER_*. Explicit agent/ai_agent → agent; explicit script → script; everything else → unknown. */
|
|
5419
5526
|
type CallerAttribution = {
|
|
5420
5527
|
callerType: "unknown";
|
|
5421
5528
|
} | {
|
|
@@ -5423,6 +5530,9 @@ type CallerAttribution = {
|
|
|
5423
5530
|
callerName: string;
|
|
5424
5531
|
skillName?: string;
|
|
5425
5532
|
skillVersion?: string;
|
|
5533
|
+
} | {
|
|
5534
|
+
callerType: "script";
|
|
5535
|
+
callerName: string;
|
|
5426
5536
|
};
|
|
5427
5537
|
/** Env-only attribution; no TTY or install-path heuristics. */
|
|
5428
5538
|
export declare function readCaller(env: NodeJS.ProcessEnv): CallerAttribution;
|
|
@@ -5443,7 +5553,7 @@ interface TrackingEvent {
|
|
|
5443
5553
|
os: string;
|
|
5444
5554
|
authMethod?: AuthRequirement;
|
|
5445
5555
|
params?: Record<string, unknown>;
|
|
5446
|
-
/** Always present on new CLI events: `agent`
|
|
5556
|
+
/** Always present on new CLI events: `agent` | `script` | `unknown`. */
|
|
5447
5557
|
callerType: CallerAttribution["callerType"];
|
|
5448
5558
|
callerName?: string;
|
|
5449
5559
|
skillName?: string;
|