bailian-cli-core 2.0.0 → 2.1.0
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 +245 -32
- package/dist/index.mjs +32 -19
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1900,6 +1900,7 @@ export declare function speechVocabularyPath(): string;
|
|
|
1900
1900
|
export declare function profileSchemaPath(): string;
|
|
1901
1901
|
export declare function userProfilePath(schemaId: string): string;
|
|
1902
1902
|
export declare function knowledgeRetrievePath(): string;
|
|
1903
|
+
export declare function workspaceMaaSBaseUrl(workspaceId: string): string;
|
|
1903
1904
|
export declare function knowledgeSearchEndpoint(workspaceId: string): string;
|
|
1904
1905
|
export declare function knowledgeChatEndpoint(workspaceId: string): string;
|
|
1905
1906
|
/** Per-workspace AgentStudio host (same shape as {@link ragEndpoint}'s host). */
|
|
@@ -1909,6 +1910,18 @@ export declare function securityOverviewEndpoint(host: string): string;
|
|
|
1909
1910
|
/** GET alert list (agent_logs); filters / pagination go in the query string. */
|
|
1910
1911
|
export declare function securityAgentLogsEndpoint(host: string): string;
|
|
1911
1912
|
export declare function mcpWebSearchPath(): string;
|
|
1913
|
+
/** GET /api/v1/deployments/{deployed_model}/capacity-instances */
|
|
1914
|
+
export declare function deploymentCapacityInstancesPath(code: string): string;
|
|
1915
|
+
/** GET /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id} */
|
|
1916
|
+
export declare function deploymentCapacityInstancePath(code: string, id: string): string;
|
|
1917
|
+
/** PUT /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}/scale */
|
|
1918
|
+
export declare function deploymentCapacityInstanceScalePath(code: string, id: string): string;
|
|
1919
|
+
/** PUT /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}/renew */
|
|
1920
|
+
export declare function deploymentCapacityInstanceRenewPath(code: string, id: string): string;
|
|
1921
|
+
/** PUT /api/v1/deployments/{deployed_model}/update-overflowstrategy */
|
|
1922
|
+
export declare function deploymentOverflowPath(code: string): string;
|
|
1923
|
+
/** GET /api/v1/deployments/{deployed_model}/capacity-operations/{operation_id} */
|
|
1924
|
+
export declare function deploymentCapacityOperationPath(code: string, id: string): string;
|
|
1912
1925
|
export declare function ragEndpoint(workspaceId: string, path: string): string;
|
|
1913
1926
|
/** AgentStudio workspace files; template uploads send source=sandbox_template. */
|
|
1914
1927
|
export declare function agentStudioFilesPath(): string;
|
|
@@ -2826,6 +2839,8 @@ export interface CreateFineTuneRequest {
|
|
|
2826
2839
|
hyper_parameters?: FineTuneHyperParameters;
|
|
2827
2840
|
/** Display name for the job (optional, server generates if omitted). */
|
|
2828
2841
|
job_name?: string;
|
|
2842
|
+
/** Requested scheduling priority; the service determines the effective priority. */
|
|
2843
|
+
priority?: string;
|
|
2829
2844
|
/** Output model name. Either bring your own or let the server generate one. */
|
|
2830
2845
|
model_name?: string;
|
|
2831
2846
|
/** Suffix appended by the platform; field is `finetuned_output_suffix` (NOT `suffix`). */
|
|
@@ -3237,6 +3252,18 @@ export interface Deployment {
|
|
|
3237
3252
|
/** PTU-only token-rate limits. */
|
|
3238
3253
|
input_tpm?: number;
|
|
3239
3254
|
output_tpm?: number;
|
|
3255
|
+
/** Aggregate effective reservation capacity, in kTPM. */
|
|
3256
|
+
ptu_capacity?: ReservationCapacity;
|
|
3257
|
+
/** ptu_fast | ptu_default | future service tiers. */
|
|
3258
|
+
ptu_service_tier?: string;
|
|
3259
|
+
pre_paid_info?: PrePaidInfo;
|
|
3260
|
+
pre_paid_instance_id?: string;
|
|
3261
|
+
pre_paid_gmt_expired?: string;
|
|
3262
|
+
/** enable | disable | future overflow strategies. */
|
|
3263
|
+
overflow_strategy?: string;
|
|
3264
|
+
fail_reason?: string;
|
|
3265
|
+
operation_id?: string;
|
|
3266
|
+
instance_id?: string;
|
|
3240
3267
|
enable_thinking?: boolean;
|
|
3241
3268
|
max_context_length?: number;
|
|
3242
3269
|
workspace_id?: string;
|
|
@@ -3247,6 +3274,71 @@ export interface Deployment {
|
|
|
3247
3274
|
/** Free-form additional fields are preserved by callers. */
|
|
3248
3275
|
[k: string]: unknown;
|
|
3249
3276
|
}
|
|
3277
|
+
/** Reservation capacity returned by queries; separate from legacy PTU write input. */
|
|
3278
|
+
export interface ReservationCapacity {
|
|
3279
|
+
/** Input capacity in kTPM (1 kTPM = 1000 tokens/minute); zero is valid. */
|
|
3280
|
+
input_tpm?: number;
|
|
3281
|
+
/** Output capacity in kTPM; zero is valid. */
|
|
3282
|
+
output_tpm?: number;
|
|
3283
|
+
[key: string]: unknown;
|
|
3284
|
+
}
|
|
3285
|
+
/** Prepaid purchase and renewal configuration returned by queries. */
|
|
3286
|
+
export interface PrePaidInfo {
|
|
3287
|
+
/** Purchase / renewal duration in days. */
|
|
3288
|
+
duration?: number;
|
|
3289
|
+
auto_renewal?: boolean;
|
|
3290
|
+
/** Automatic renewal duration in days. */
|
|
3291
|
+
auto_renewal_duration?: number;
|
|
3292
|
+
/** Renewal cycle unit, e.g. Day. */
|
|
3293
|
+
auto_renewal_cycle?: string;
|
|
3294
|
+
[key: string]: unknown;
|
|
3295
|
+
}
|
|
3296
|
+
/** A capacity instance returned by list/detail queries, including released instances. */
|
|
3297
|
+
export interface CapacityInstance {
|
|
3298
|
+
/** The deployment's ModelCode. Identifiers are opaque strings. */
|
|
3299
|
+
model_service_id?: string;
|
|
3300
|
+
instance_id?: string;
|
|
3301
|
+
/** pre_paid | post_paid | future charge types. */
|
|
3302
|
+
charge_type?: string;
|
|
3303
|
+
/** Instance lifecycle state; future states are preserved. */
|
|
3304
|
+
status?: string;
|
|
3305
|
+
deleted?: boolean;
|
|
3306
|
+
/** Currently confirmed serving capacity. */
|
|
3307
|
+
effective_capacity?: ReservationCapacity;
|
|
3308
|
+
/** Configured / contracted capacity, which may remain while stopped or suspended. */
|
|
3309
|
+
configured_capacity?: ReservationCapacity;
|
|
3310
|
+
/** Pending target, not effective capacity; may be absent or null in a stable state. */
|
|
3311
|
+
target_capacity?: ReservationCapacity | null;
|
|
3312
|
+
pre_paid_info?: PrePaidInfo;
|
|
3313
|
+
gmt_expired?: string;
|
|
3314
|
+
can_scale?: boolean;
|
|
3315
|
+
can_renew?: boolean;
|
|
3316
|
+
can_delete?: boolean;
|
|
3317
|
+
fail_reason?: string;
|
|
3318
|
+
gmt_created?: string;
|
|
3319
|
+
gmt_modified?: string;
|
|
3320
|
+
gmt_deleted?: string;
|
|
3321
|
+
[key: string]: unknown;
|
|
3322
|
+
}
|
|
3323
|
+
/** A capacity operation returned by a query; no state or identifier normalization. */
|
|
3324
|
+
export interface CapacityOperation {
|
|
3325
|
+
operation_id?: string;
|
|
3326
|
+
/** Original operation request ID, distinct from the query response's request_id. */
|
|
3327
|
+
request_id?: string;
|
|
3328
|
+
/** CREATE | SCALE | RENEW | DELETE | STOP | REFUND | future operation types. */
|
|
3329
|
+
operation_type?: string;
|
|
3330
|
+
/** PROCESSING | SUCCEEDED | FAILED | future operation states. */
|
|
3331
|
+
operation_status?: string;
|
|
3332
|
+
model_service_id?: string;
|
|
3333
|
+
instance_id?: string;
|
|
3334
|
+
from_status?: string;
|
|
3335
|
+
current_status?: string;
|
|
3336
|
+
error_code?: string;
|
|
3337
|
+
error_message?: string;
|
|
3338
|
+
gmt_created?: string;
|
|
3339
|
+
gmt_finished?: string;
|
|
3340
|
+
[key: string]: unknown;
|
|
3341
|
+
}
|
|
3250
3342
|
/** A single deployable model record (GET /deployments/models). */
|
|
3251
3343
|
export interface DeployableModel {
|
|
3252
3344
|
model_name?: string;
|
|
@@ -3314,20 +3406,23 @@ export interface DeployableTemplate {
|
|
|
3314
3406
|
export interface CreateDeploymentRequest {
|
|
3315
3407
|
/** Required. The catalog or fine-tuned model identifier. */
|
|
3316
3408
|
model_name: string;
|
|
3317
|
-
/**
|
|
3318
|
-
name
|
|
3409
|
+
/** Optional display name; PTU creation generates one when omitted. */
|
|
3410
|
+
name?: string;
|
|
3319
3411
|
/** Required. Billing plan: mu | cu | ptu | lora. CLI defaults to "lora". */
|
|
3320
3412
|
plan: string;
|
|
3413
|
+
/** Required for PTU creation; distinct from instance billing_method. */
|
|
3414
|
+
charge_type?: "pre_paid" | "post_paid";
|
|
3415
|
+
/** PTU performance tier; the service defaults to ptu_fast. */
|
|
3416
|
+
service_tier?: "ptu_fast" | "ptu_default";
|
|
3417
|
+
/** Optional ModelCode suffix; generated by the service when omitted. */
|
|
3418
|
+
suffix?: string;
|
|
3419
|
+
/** Required for prepaid PTU creation; omitted for postpaid. */
|
|
3420
|
+
pre_paid_info?: PrePaidInfo;
|
|
3321
3421
|
/** Required by API even for token-billed (lora) plans where it is ignored — CLI injects 1. */
|
|
3322
3422
|
capacity?: number;
|
|
3323
3423
|
/** Deploy spec id (e.g. "MU1", "dps-..."), sent as `deploy_spec` in POST body. */
|
|
3324
3424
|
deploy_spec?: string;
|
|
3325
|
-
/**
|
|
3326
|
-
* PTU capacity (provisioned throughput limits). Only effective when
|
|
3327
|
-
* `plan === "ptu"`. The doc says this defaults to 10000/1000 when omitted,
|
|
3328
|
-
* but the platform currently rejects creation without it ("Miss ptu capacity
|
|
3329
|
-
* info"), so the CLI treats it as required for ptu.
|
|
3330
|
-
*/
|
|
3425
|
+
/** Required PTU capacity in kTPM; values are forwarded without conversion. */
|
|
3331
3426
|
ptu_capacity?: PtuCapacity;
|
|
3332
3427
|
/**
|
|
3333
3428
|
* AIGC generation config for fine-tuned Wan video (i2v/kf2v) LoRA deployments.
|
|
@@ -3350,13 +3445,13 @@ export interface AigcConfig {
|
|
|
3350
3445
|
prompt?: string;
|
|
3351
3446
|
lora_prompt_default?: string;
|
|
3352
3447
|
}
|
|
3353
|
-
/** PTU
|
|
3448
|
+
/** Legacy PTU input shape, retained for source compatibility. */
|
|
3354
3449
|
export interface PtuCapacity {
|
|
3355
|
-
/**
|
|
3450
|
+
/** Input capacity in kTPM. */
|
|
3356
3451
|
input_tpm?: number;
|
|
3357
|
-
/**
|
|
3452
|
+
/** Output capacity in kTPM. */
|
|
3358
3453
|
output_tpm?: number;
|
|
3359
|
-
/**
|
|
3454
|
+
/** @deprecated Current reservation models do not support separate thinking-output capacity. */
|
|
3360
3455
|
thinking_output_tpm?: number;
|
|
3361
3456
|
}
|
|
3362
3457
|
/** POST /api/v1/deployments response. */
|
|
@@ -3389,18 +3484,69 @@ export interface GetDeploymentResponse {
|
|
|
3389
3484
|
output?: Deployment;
|
|
3390
3485
|
data?: Deployment;
|
|
3391
3486
|
}
|
|
3392
|
-
/**
|
|
3393
|
-
export interface
|
|
3487
|
+
/** GET /api/v1/deployments/{deployed_model}/capacity-instances response. */
|
|
3488
|
+
export interface ListCapacityInstancesResponse {
|
|
3394
3489
|
request_id?: string;
|
|
3395
3490
|
output?: {
|
|
3491
|
+
records?: CapacityInstance[];
|
|
3492
|
+
/** Total record count, not the current page's records. */
|
|
3493
|
+
items?: number;
|
|
3494
|
+
page?: number;
|
|
3495
|
+
itemsPerPage?: number;
|
|
3496
|
+
pageCount?: number;
|
|
3497
|
+
[key: string]: unknown;
|
|
3498
|
+
};
|
|
3499
|
+
data?: ListCapacityInstancesResponse["output"];
|
|
3500
|
+
[key: string]: unknown;
|
|
3501
|
+
}
|
|
3502
|
+
/** GET /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id} response. */
|
|
3503
|
+
export interface GetCapacityInstanceResponse {
|
|
3504
|
+
request_id?: string;
|
|
3505
|
+
output?: CapacityInstance;
|
|
3506
|
+
data?: CapacityInstance;
|
|
3507
|
+
[key: string]: unknown;
|
|
3508
|
+
}
|
|
3509
|
+
/** GET /api/v1/deployments/{deployed_model}/capacity-operations/{operation_id} response. */
|
|
3510
|
+
export interface GetCapacityOperationResponse {
|
|
3511
|
+
request_id?: string;
|
|
3512
|
+
output?: CapacityOperation;
|
|
3513
|
+
data?: CapacityOperation;
|
|
3514
|
+
[key: string]: unknown;
|
|
3515
|
+
}
|
|
3516
|
+
/** Instance writes return an operation, including HTTP 200 responses with status FAILED. */
|
|
3517
|
+
export type CapacityOperationResponse = GetCapacityOperationResponse;
|
|
3518
|
+
/** POST /api/v1/deployments/{deployed_model}/capacity-instances request body. */
|
|
3519
|
+
export interface CreateCapacityInstanceRequest {
|
|
3520
|
+
billing_method: "PRE_PAY" | "POST_PAY";
|
|
3521
|
+
ptu_capacity: ReservationCapacity;
|
|
3522
|
+
/** Required for PRE_PAY; omitted for POST_PAY. */
|
|
3523
|
+
pre_paid_info?: PrePaidInfo;
|
|
3524
|
+
}
|
|
3525
|
+
/** PUT /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}/scale body. */
|
|
3526
|
+
export interface ScaleCapacityInstanceRequest {
|
|
3527
|
+
/** Absolute target capacity for this instance, not a delta or deployment total. */
|
|
3528
|
+
ptu_capacity: ReservationCapacity;
|
|
3529
|
+
/** Omit to reuse saved prepaid information; do not send for postpaid. */
|
|
3530
|
+
pre_paid_info?: PrePaidInfo;
|
|
3531
|
+
order_type?: "UPGRADE" | "DOWNGRADE";
|
|
3532
|
+
}
|
|
3533
|
+
/** PUT /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}/renew body. */
|
|
3534
|
+
export interface RenewCapacityInstanceRequest {
|
|
3535
|
+
pre_paid_info: PrePaidInfo;
|
|
3536
|
+
/** Required to be true when changing capacity; defaults to false on the service. */
|
|
3537
|
+
is_change?: boolean;
|
|
3538
|
+
ptu_capacity?: ReservationCapacity;
|
|
3539
|
+
}
|
|
3540
|
+
/** PUT /api/v1/deployments/{deployed_model}/update-overflowstrategy response. */
|
|
3541
|
+
export type UpdateDeploymentOverflowResponse = GetDeploymentResponse;
|
|
3542
|
+
/** DELETE /api/v1/deployments/{deployed_model} response, including legacy deleted flags. */
|
|
3543
|
+
export interface DeleteDeploymentResponse {
|
|
3544
|
+
request_id?: string;
|
|
3545
|
+
output?: Deployment & {
|
|
3396
3546
|
deleted?: boolean;
|
|
3397
|
-
deployed_model?: string;
|
|
3398
|
-
[k: string]: unknown;
|
|
3399
3547
|
};
|
|
3400
|
-
data?: {
|
|
3548
|
+
data?: Deployment & {
|
|
3401
3549
|
deleted?: boolean;
|
|
3402
|
-
deployed_model?: string;
|
|
3403
|
-
[k: string]: unknown;
|
|
3404
3550
|
};
|
|
3405
3551
|
}
|
|
3406
3552
|
/** GET /api/v1/deployments/models response. */
|
|
@@ -3423,9 +3569,15 @@ export interface ListDeployableModelsResponse {
|
|
|
3423
3569
|
}
|
|
3424
3570
|
/** PUT /api/v1/deployments/{deployed_model}/scale request body. */
|
|
3425
3571
|
export interface ScaleDeploymentRequest {
|
|
3426
|
-
/** New capacity in plan units.
|
|
3572
|
+
/** New capacity in legacy MU plan units. */
|
|
3427
3573
|
capacity?: number;
|
|
3428
|
-
/** PTU
|
|
3574
|
+
/** Required for PTU when more than one undeleted instance exists. */
|
|
3575
|
+
instance_id?: string;
|
|
3576
|
+
/** Absolute PTU target capacity for the selected instance, in kTPM. */
|
|
3577
|
+
ptu_capacity?: ReservationCapacity;
|
|
3578
|
+
pre_paid_info?: PrePaidInfo;
|
|
3579
|
+
order_type?: "UPGRADE" | "DOWNGRADE";
|
|
3580
|
+
/** Legacy top-level PTU fields retained for source compatibility. */
|
|
3429
3581
|
input_tpm?: number;
|
|
3430
3582
|
output_tpm?: number;
|
|
3431
3583
|
[k: string]: unknown;
|
|
@@ -3456,18 +3608,52 @@ export interface UpdateDeploymentResponse {
|
|
|
3456
3608
|
}
|
|
3457
3609
|
//#endregion
|
|
3458
3610
|
//#region src/deploy/api.d.ts
|
|
3459
|
-
/**
|
|
3611
|
+
/** Caller-owned idempotency key; wrappers never generate keys or retry writes. */
|
|
3612
|
+
export interface CapacityWriteOptions {
|
|
3613
|
+
requestId?: string;
|
|
3614
|
+
signal?: AbortSignal;
|
|
3615
|
+
}
|
|
3616
|
+
/** POST /api/v1/deployments; initial ModelCode creation has no instance-idempotency guarantee. */
|
|
3460
3617
|
export declare function createDeployment(client: Client, body: CreateDeploymentRequest, signal?: AbortSignal): Promise<CreateDeploymentResponse>;
|
|
3461
3618
|
export interface ListDeploymentsParams {
|
|
3462
3619
|
pageNo?: number;
|
|
3463
3620
|
pageSize?: number;
|
|
3464
|
-
|
|
3621
|
+
plan?: string;
|
|
3465
3622
|
signal?: AbortSignal;
|
|
3466
3623
|
}
|
|
3467
3624
|
/** GET /api/v1/deployments */
|
|
3468
3625
|
export declare function listDeployments(client: Client, params?: ListDeploymentsParams): Promise<ListDeploymentsResponse>;
|
|
3469
3626
|
/** GET /api/v1/deployments/{deployed_model} */
|
|
3470
3627
|
export declare function getDeployment(client: Client, deployedModel: string, signal?: AbortSignal): Promise<GetDeploymentResponse>;
|
|
3628
|
+
export interface ListCapacityInstancesParams {
|
|
3629
|
+
pageNo?: number;
|
|
3630
|
+
pageSize?: number;
|
|
3631
|
+
includeDeleted?: boolean;
|
|
3632
|
+
statuses?: string[];
|
|
3633
|
+
chargeTypes?: string[];
|
|
3634
|
+
signal?: AbortSignal;
|
|
3635
|
+
}
|
|
3636
|
+
/** GET /api/v1/deployments/{deployed_model}/capacity-instances */
|
|
3637
|
+
export declare function listCapacityInstances(client: Client, code: string, params?: ListCapacityInstancesParams): Promise<ListCapacityInstancesResponse>;
|
|
3638
|
+
/** GET /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id} */
|
|
3639
|
+
export declare function getCapacityInstance(client: Client, code: string, id: string, signal?: AbortSignal): Promise<GetCapacityInstanceResponse>;
|
|
3640
|
+
/** GET /api/v1/deployments/{deployed_model}/capacity-operations/{operation_id} */
|
|
3641
|
+
export declare function getCapacityOperation(client: Client, code: string, id: string, signal?: AbortSignal): Promise<GetCapacityOperationResponse>;
|
|
3642
|
+
/**
|
|
3643
|
+
* POST /api/v1/deployments/{deployed_model}/capacity-instances
|
|
3644
|
+
* All instance writes return operations verbatim; callers must check operation_status, even on HTTP 200.
|
|
3645
|
+
*/
|
|
3646
|
+
export declare function createCapacityInstance(client: Client, code: string, body: CreateCapacityInstanceRequest, options?: CapacityWriteOptions): Promise<CapacityOperationResponse>;
|
|
3647
|
+
/** PUT /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}/scale */
|
|
3648
|
+
export declare function scaleCapacityInstance(client: Client, code: string, id: string, body: ScaleCapacityInstanceRequest, options?: CapacityWriteOptions): Promise<CapacityOperationResponse>;
|
|
3649
|
+
/** PUT /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}/renew */
|
|
3650
|
+
export declare function renewCapacityInstance(client: Client, code: string, id: string, body: RenewCapacityInstanceRequest, options?: CapacityWriteOptions): Promise<CapacityOperationResponse>;
|
|
3651
|
+
/** DELETE /api/v1/deployments/{deployed_model}/capacity-instances/{instance_id}; no JSON body. */
|
|
3652
|
+
export declare function deleteCapacityInstance(client: Client, code: string, id: string, options?: CapacityWriteOptions & {
|
|
3653
|
+
reason?: string;
|
|
3654
|
+
}): Promise<CapacityOperationResponse>;
|
|
3655
|
+
/** PUT /api/v1/deployments/{deployed_model}/update-overflowstrategy */
|
|
3656
|
+
export declare function updateDeploymentOverflow(client: Client, code: string, strategy: "enable" | "disable", signal?: AbortSignal): Promise<UpdateDeploymentOverflowResponse>;
|
|
3471
3657
|
/** DELETE /api/v1/deployments/{deployed_model} */
|
|
3472
3658
|
export declare function deleteDeployment(client: Client, deployedModel: string, signal?: AbortSignal): Promise<DeleteDeploymentResponse>;
|
|
3473
3659
|
export interface ListDeployableModelsParams {
|
|
@@ -3482,7 +3668,7 @@ export interface ListDeployableModelsParams {
|
|
|
3482
3668
|
/** GET /api/v1/deployments/models */
|
|
3483
3669
|
export declare function listDeployableModels(client: Client, params?: ListDeployableModelsParams): Promise<ListDeployableModelsResponse>;
|
|
3484
3670
|
/** PUT /api/v1/deployments/{deployed_model}/scale */
|
|
3485
|
-
export declare function scaleDeployment(client: Client, deployedModel: string, body: ScaleDeploymentRequest, signal?: AbortSignal): Promise<ScaleDeploymentResponse>;
|
|
3671
|
+
export declare function scaleDeployment(client: Client, deployedModel: string, body: ScaleDeploymentRequest, signal?: AbortSignal, requestId?: string): Promise<ScaleDeploymentResponse>;
|
|
3486
3672
|
/**
|
|
3487
3673
|
* PUT /api/v1/deployments/{deployed_model}/update
|
|
3488
3674
|
*
|
|
@@ -3538,15 +3724,36 @@ export declare const CHARGE_TYPE: {
|
|
|
3538
3724
|
};
|
|
3539
3725
|
export type ChargeType = (typeof CHARGE_TYPE)[keyof typeof CHARGE_TYPE];
|
|
3540
3726
|
//#endregion
|
|
3727
|
+
//#region src/deploy/reservation.d.ts
|
|
3728
|
+
/** Shared flags for reservation creation, scaling and renewal; capacity is in kTPM. */
|
|
3729
|
+
export interface ReservationFlags {
|
|
3730
|
+
inputTpm?: number;
|
|
3731
|
+
outputTpm?: number;
|
|
3732
|
+
duration?: number;
|
|
3733
|
+
autoRenewal?: boolean;
|
|
3734
|
+
autoRenewalDuration?: number;
|
|
3735
|
+
autoRenewalCycle?: string;
|
|
3736
|
+
}
|
|
3737
|
+
/** Validate paired capacity locally; model-specific steps and limits belong to the service. */
|
|
3738
|
+
export declare function validateReservationCapacity(flags: ReservationFlags, required: boolean): string | undefined;
|
|
3739
|
+
/** Build validated capacity without converting units or dropping zero. */
|
|
3740
|
+
export declare function buildReservationCapacity(flags: ReservationFlags): ReservationCapacity;
|
|
3741
|
+
export declare function hasPrepaidFlags(flags: ReservationFlags): boolean;
|
|
3742
|
+
/** Validate a complete prepaid block whenever any prepaid field is supplied. */
|
|
3743
|
+
export declare function validatePrepaidFlags(flags: ReservationFlags, required: boolean): string | undefined;
|
|
3744
|
+
/** Build validated prepaid information, preserving explicit false and omitting absent fields. */
|
|
3745
|
+
export declare function buildPrepaidInfo(flags: ReservationFlags): PrePaidInfo | undefined;
|
|
3746
|
+
//#endregion
|
|
3541
3747
|
//#region src/deploy/plans.d.ts
|
|
3542
3748
|
/** Plan-relevant subset of `deploy <modality> create` flags (parsed flags satisfy this shape). */
|
|
3543
|
-
export interface CreatePlanFlags {
|
|
3749
|
+
export interface CreatePlanFlags extends ReservationFlags {
|
|
3544
3750
|
plan?: string;
|
|
3545
3751
|
deploySpec?: string;
|
|
3546
3752
|
capacity?: number;
|
|
3547
3753
|
billingMethod?: string;
|
|
3548
|
-
|
|
3549
|
-
|
|
3754
|
+
chargeType?: string;
|
|
3755
|
+
serviceTier?: string;
|
|
3756
|
+
suffix?: string;
|
|
3550
3757
|
thinkingOutputTpm?: number;
|
|
3551
3758
|
}
|
|
3552
3759
|
export interface PlanContext {
|
|
@@ -3558,8 +3765,8 @@ export interface PlanContext {
|
|
|
3558
3765
|
flags: CreatePlanFlags;
|
|
3559
3766
|
/** Underlying model identifier (`--model`). */
|
|
3560
3767
|
model: string;
|
|
3561
|
-
/**
|
|
3562
|
-
name
|
|
3768
|
+
/** Optional console display name (`--name`); PTU can use the generated name. */
|
|
3769
|
+
name?: string;
|
|
3563
3770
|
}
|
|
3564
3771
|
export interface PlanResolved {
|
|
3565
3772
|
/**
|
|
@@ -4387,11 +4594,17 @@ export declare function extractTarBr(tarBrBuffer: Buffer, destDir: string): Prom
|
|
|
4387
4594
|
* Symmetric with computeContentHash in FC skills-publish.mjs.
|
|
4388
4595
|
*/
|
|
4389
4596
|
export declare function computeDirContentHash(dir: string): string;
|
|
4597
|
+
interface AtomicSwapOptions {
|
|
4598
|
+
/** Test seam; defaults to enabled only on Windows. */
|
|
4599
|
+
allowInPlaceFallback?: boolean;
|
|
4600
|
+
}
|
|
4390
4601
|
/**
|
|
4391
4602
|
* Atomic swap: replace destDir with the extracted content from tmpDir.
|
|
4392
4603
|
* tmpDir must be on the same volume as destDir (same parent) for renameSync to be atomic.
|
|
4604
|
+
* If Windows blocks renaming an agent-open directory, preserve a copied backup and
|
|
4605
|
+
* reconcile its children in place so the stable directory handle remains valid.
|
|
4393
4606
|
*/
|
|
4394
|
-
export declare function atomicSwap(tmpDir: string, destDir: string): void;
|
|
4607
|
+
export declare function atomicSwap(tmpDir: string, destDir: string, options?: AtomicSwapOptions): void;
|
|
4395
4608
|
//#endregion
|
|
4396
4609
|
//#region src/skills/agents.d.ts
|
|
4397
4610
|
/**
|
|
@@ -4483,9 +4696,9 @@ interface InstalledSkill {
|
|
|
4483
4696
|
meta: SkillMeta;
|
|
4484
4697
|
}
|
|
4485
4698
|
/** Install from an in-memory tar.br archive (the download-and-onwards half of installSkill; test-friendly) */
|
|
4486
|
-
export declare function installSkillFromBuffer(name: string, tarBrBuffer: Buffer, expectedContentHash?: string): Promise<InstalledSkill>;
|
|
4699
|
+
export declare function installSkillFromBuffer(name: string, tarBrBuffer: Buffer, expectedContentHash?: string, windowsPathRoots?: string[]): Promise<InstalledSkill>;
|
|
4487
4700
|
/** Install a single skill by index entry (download + validate + write to disk) */
|
|
4488
|
-
export declare function installSkill(name: string, entry: SkillIndexEntry, downloadAttempts?: number): Promise<InstalledSkill>;
|
|
4701
|
+
export declare function installSkill(name: string, entry: SkillIndexEntry, downloadAttempts?: number, windowsPathRoots?: string[]): Promise<InstalledSkill>;
|
|
4489
4702
|
/** Remove the skill directory under canonical; returns whether it was actually deleted (dir absent → false) */
|
|
4490
4703
|
export declare function removeSkillDir(name: string): boolean;
|
|
4491
4704
|
/**
|