@evolinkai/cli 0.13.0 → 0.14.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/README.md +20 -6
- package/package.json +1 -1
- package/skills/evolink-cli/SKILL.md +21 -7
- package/skills/evolink-cli/references/capabilities.md +1 -1
- package/skills/evolink-cli/references/media-workflows.md +1 -1
- package/skills/evolink-cli/references/usage-and-budget.md +5 -3
- package/src/cli.mjs +76 -21
- package/src/help.mjs +12 -5
- package/src/media.mjs +142 -37
- package/src/platform/core/src/data/model-constraints.js +8 -5
- package/src/platform/core/src/data/model-params.overrides.generated.js +1 -1
- package/src/platform/core/src/services/api-client.js +1 -1
- package/src/platform/core/src/services/batch-generation.js +117 -0
- package/src/platform/core/src/services/gpt-image-tokens.js +264 -0
- package/src/platform/core/src/services/omni-tokens.js +245 -0
- package/src/platform/core/src/services/param-validator.js +48 -1
- package/src/platform/core/src/services/pricing-call-limit.js +4 -4
- package/src/platform/core/src/services/pricing-derived.js +3 -3
- package/src/platform/core/src/services/pricing-rules-client.js +23 -5
- package/src/platform/core/src/services/pricing-rules-estimate.js +266 -67
- package/src/platform/core/src/tool-guidance.js +25 -2
- package/src/platform/core/src/tools/estimate-cost.js +201 -60
- package/src/platform/core/src/tools/generate.js +497 -75
- package/src/platform/core/src/tools/get-model.js +15 -3
- package/src/platform/core/src/tools/get-pricing-rules.js +4 -3
- package/src/platform/core/src/tools/shared.js +1 -1
- package/src/platform/core/src/version.js +1 -1
- package/src/platform/source.json +41 -35
package/README.md
CHANGED
|
@@ -112,14 +112,26 @@ evolink estimate --model MODEL --input-file input.json --json
|
|
|
112
112
|
evolink generate image --quote QUOTE_ID --confirm --json
|
|
113
113
|
evolink tasks wait TASK_ID --json
|
|
114
114
|
evolink download TASK_ID --output /absolute/result.png --json
|
|
115
|
+
|
|
116
|
+
# Several inputs of one model: one quote, one approval, one submission.
|
|
117
|
+
evolink estimate --model MODEL --inputs-file inputs.jsonl --json
|
|
118
|
+
evolink generate image --quote QUOTE_ID --confirm --json
|
|
119
|
+
evolink tasks batch --ids TASK_A,TASK_B --json
|
|
120
|
+
|
|
121
|
+
# Only when the user explicitly said not to estimate or confirm:
|
|
122
|
+
evolink generate image --model MODEL --input-file input.json --skip-estimate --json
|
|
115
123
|
```
|
|
116
124
|
|
|
117
|
-
For video/audio, choose the corresponding generation command and a model's documented input. `estimate` never submits a task. Quotes
|
|
125
|
+
For video/audio, choose the corresponding generation command and a model's documented input. `estimate` never submits a task. Quotes are current for at most 24 hours and never outlive the returned pricing approval. They bind to the login and exact input, and are checked again before generation. A changed quote requires a new approval; an expired quote whose input and price are unchanged is submitted under its approval, and the result says so (`approval_expired`). `--confirm` conveys the user's approval; the CLI cannot verify a conversation by itself.
|
|
118
126
|
|
|
119
|
-
Show the estimated cost and ask the user to confirm the task. The CLI does not turn that estimate into a spending cap. If the user explicitly specifies a budget, compare the estimate with it; pause if it exceeds that budget or cannot be fully estimated. The legacy `--max-cost-usd` option remains compatible for this estimate comparison and does not limit the final charge. `--media-seconds` is a pricing hint, never a model parameter. Actual-usage billing requires explaining the relevant uncertainty; a missing price is refused.
|
|
127
|
+
Show the estimated cost and ask the user to confirm the task. The CLI does not turn that estimate into a spending cap. If the user explicitly specifies a budget, compare the estimate with it; pause if it exceeds that budget or cannot be fully estimated. The legacy `--max-cost-usd` option remains compatible for this estimate comparison and does not limit the final charge. `--media-seconds` is a pricing hint, never a model parameter. Actual-usage billing requires explaining the relevant uncertainty; a missing price is refused. GPT Image token models (`gpt-image-1.5`, `gpt-image-2`, `gpt-image-2.5-*`, `gpt-image-2.6-*`) return a `token_billed` reference price, what EvoLink reserves at submission for the exact input; the task settles at the tokens it actually uses, and a `--max-cost-usd` budget must cover 1.5 times the reference price. Gemini Omni Flash video models (`gemini-omni-flash-*`, `gemini-omni-1.1-flash-*`, `gemini-omni-1.2-flash-*`) get a reference price the same way; give an input or reference video's length with `--media-seconds` (for several reference videos, the longest one's). EvoLink reads that video's resolution at submission, so the reference counts it at 4k and the estimate also gives the price at a lower resolution.
|
|
120
128
|
|
|
121
129
|
A failed or blocked estimate is not a quote. Catalog starting prices must not replace a task quote. Fix the reported problem and quote again while retaining the user's cap; do not ask for generation approval or submit using an invented total. Quote errors report `submission_allowed: false` and preserve the supplied budget.
|
|
122
130
|
|
|
131
|
+
`--skip-estimate` is for a user who explicitly said not to estimate or confirm, for one task, a batch or the rest of a conversation. `generate --model MODEL --input-file FILE --skip-estimate` (or `--inputs-file`) submits without a quote: the price is not checked, the task is charged by actual usage, and the result says so (`estimate_skipped`, `estimate_skip_reason`). Invalid input and an explicit `--max-cost-usd` are still refused; the command saves a record with its own request ID, so `tasks resume --quote QUOTE_ID` recovers an uncertain submission. When an estimate fails and the user has not opted out, ask once whether to generate anyway; on yes use `--skip-estimate`.
|
|
132
|
+
|
|
133
|
+
`--inputs-file` takes a JSON array, or JSONL with one input object per line, of 1-50 inputs for one model. `estimate --inputs-file` returns each input's price, the total and one quote for the batch; `generate --quote QUOTE_ID --confirm` submits every input at once (up to 10 at a time) and returns each input's task ID or error without waiting (`--wait` is for one task). Collect the results with `tasks batch --ids`. If some inputs were not submitted or their outcome is unknown, `tasks resume --quote QUOTE_ID` finishes the batch with the same request ID within 24 hours: accepted inputs return their original tasks without a new charge. Never resubmit those inputs with a new estimate or generate command.
|
|
134
|
+
|
|
123
135
|
For the five Seedance 2.5 generation models, `draft: true` with omitted `quality` uses `480p` for both pricing and submission. Estimates expose `effective_input` and `defaults_applied`; show these applied defaults before approval. Draft-to-video conversion and other model IDs retain their own inputs. The new checks match the resolved model and endpoint, including when catalog documentation is borrowed through an alias.
|
|
124
136
|
|
|
125
137
|
For `seedance-2.5-video-edit`, keep `input.duration: -1`; this selects editing rather than supplying a negative output length. Expected output seconds belong in `pricing_parameters.duration_seconds`, alongside any required input-video usage. They do not change the generation setting or guarantee final usage.
|
|
@@ -166,7 +178,7 @@ Task-list filters are case-sensitive:
|
|
|
166
178
|
|
|
167
179
|
An invalid status is rejected locally before login or a platform request. The `invalid_status` error includes `param`, the supplied `value`, `allowed_values`, `queued_filter`, `request_sent: false` and a recovery `next_step`. Correct the free query rather than creating another paid task. A successful query with an empty list, or a task whose `status` is `failed`, is not a failed CLI invocation.
|
|
168
180
|
|
|
169
|
-
The CLI persists the request ID before paid submission. Recovery reuses that ID; it never silently submits with a new one. For an uncertain submission, omit `--status` so completed or failed tasks remain visible. Lists are account-wide, newest first and limited to the returned recent batch; `--since` filters that batch rather than searching all history. An empty list does not prove no task was created. Keep the original IDs and use `tasks get` or `tasks resume` as appropriate; after
|
|
181
|
+
The CLI persists the request ID before paid submission. Recovery reuses that ID; it never silently submits with a new one. For an uncertain submission, omit `--status` so completed or failed tasks remain visible. Lists are account-wide, newest first and limited to the returned recent batch; `--since` filters that batch rather than searching all history. An empty list does not prove no task was created. Keep the original IDs and use `tasks get` or `tasks resume` as appropriate. `tasks resume` replays the original request ID only within 23 hours of its first submission, inside the 24 hours EvoLink keeps it; after that it refuses (`recovery_window_passed`): inspect recent tasks before considering another paid submission. Ctrl-C stops local waiting, not generation. Task links expire after 24 hours.
|
|
170
182
|
|
|
171
183
|
Uploads stream up to 95 MiB directly to the file service using a short-lived upload token issued by the platform. The OAuth access token is never sent to the file service. `uploads get` reads a saved local receipt. A lost response without a saved receipt reports `outcome_unknown` and `result_verified: false`; it does not retry or claim that a result was recovered. The file service has no lookup by client request ID. Legacy proxy slots can be recovered with CLI 0.6.0. Downloads use a product User-Agent, validate redirect destinations, check content types and common media file headers, stream at most 1 GiB per result, and refuse to overwrite existing files. HTTP 200 HTML/error documents are rejected with `invalid_download_content`, with no final file left behind. Header checks do not fully decode codecs. These commands transfer originals and do not alter the generated content or guarantee host inline previews. Missing files/directories, denied permissions and exhausted disk space have separate error codes; fix the local problem and retry the same task's download.
|
|
172
184
|
|
|
@@ -273,7 +285,7 @@ A failed task is not charged: the credits reserved at submission are returned au
|
|
|
273
285
|
`evolink estimate` reads the published full pricing policy for the canonical model.
|
|
274
286
|
The local `quote_id` stores input binding, pricing fingerprint, integer UC subtotal
|
|
275
287
|
and expiry; there is no backend `estimate_id`. The local quote shares the core's
|
|
276
|
-
|
|
288
|
+
24-hour approval window and never outlives the returned approval. Before first submission, the CLI reads the rules
|
|
277
289
|
again and refuses changed prices, policy or usage until a new estimate is approved.
|
|
278
290
|
Neither backend Quote nor new OAuth quote access is required. Existing login,
|
|
279
291
|
shared MCP key, quota and permissions remain.
|
|
@@ -290,5 +302,7 @@ readable after expiry; check the original task before preparing another request.
|
|
|
290
302
|
Supply required measured or expected billing usage with
|
|
291
303
|
`--pricing-parameters '{"input_seconds":5.77}'`. Default `--pricing-source pricing_rules`
|
|
292
304
|
and old `account`/`public_reference` aliases use the same published full rules.
|
|
293
|
-
Partial estimates name missing usage and cannot check a budget.
|
|
294
|
-
|
|
305
|
+
Partial estimates name missing usage and cannot check a budget. GPT Image token
|
|
306
|
+
models and Gemini Omni Flash video models need no token counts; `--pricing-parameters`
|
|
307
|
+
token counts are not used for them. Estimates exclude personal discounts and do not reserve quota or guarantee
|
|
308
|
+
the final charge.
|
package/package.json
CHANGED
|
@@ -20,9 +20,15 @@ After loading this skill, continue the requested workflow by executing its requi
|
|
|
20
20
|
- By default, show the estimated cost and ask for approval. Do not invent or display an additional spending cap, and never derive `max_cost_usd` from the quote.
|
|
21
21
|
- If the user explicitly specifies a budget, compare the estimate with it and preserve that budget on every attempt. The compatibility option `--max-cost-usd` carries this estimate comparison; it does not limit the final charge. Pause if the estimate exceeds the budget or is incomplete. If the user requires a guaranteed final maximum, explain that this client cannot enforce it before obtaining approval for any changed requirement.
|
|
22
22
|
- If the host denies an estimate command by policy, **stop this task for the current turn**. Tell the user that the quote is unavailable and the estimate needs permission. Do not issue another estimate command with fewer flags, a different shell or another tool. Resume only after the host's normal permission flow permits the original request with its unchanged budget.
|
|
23
|
-
- If estimation fails, there is no usable quote
|
|
23
|
+
- If estimation fails for a reason other than invalid input, there is no usable quote. Catalog starting prices cannot replace a task's total. When the user has opted out of estimates (below), generate with `--skip-estimate`; otherwise report the failure and ask once, in one sentence, whether to generate anyway with the cost settled by actual usage, and on yes use `--skip-estimate`. Retain any budget the user gave.
|
|
24
24
|
- When supported, `models pricing --model MODEL --view full --json` reads public default rules without login. Coverage follows the returned published policies and legacy text adapters; missing rules do not mean free. Preserve fractional UC decimal strings, signed parameter bounds, allowed `values`, lookup keys and tables, nested expressions, minimum charges, tiers, price scope and validity. `meta.price_selection=route_priority` means a web-aligned reference; absent metadata means legacy minimum configuration prices. Public rates may differ from account prices and failover settlement. This response never replaces `estimate`, creates a quote or establishes a final spending cap.
|
|
25
25
|
|
|
26
|
+
## Generating without an estimate
|
|
27
|
+
|
|
28
|
+
When the user explicitly says not to estimate or not to confirm (for example "generate directly", "no need to estimate", "stop asking", "from now on just generate"), skip `estimate` and the confirmation and submit with `--skip-estimate`, within the scope the user gave: this task, this batch, or every later generation in this conversation; if the scope is unclear, only this task. Never infer it from silence, the balance or your own suggestion. When the user opts out for the rest of the conversation, tell them once, clearly, that later generations in this conversation will be submitted without asking, and that they can start a new conversation or ask you to restore estimates to bring them back.
|
|
29
|
+
|
|
30
|
+
`evolink generate image|video|audio --model MODEL --input-file /absolute/input.json --skip-estimate --json` (or `--inputs-file` for a batch, below) submits without a quote. Invalid input is still refused, and `--max-cost-usd` for a budget the user gave is still checked: when no price can be computed it is refused, and you ask the user whether to proceed without that budget. `--skip-estimate` does not approve enabling model web or image search and does not change what is charged; after submitting, tell the user what was reserved or charged (`tasks get` shows the final charge). The command saves a record with its own request ID and returns its `quote_id`: recover an uncertain submission with `tasks resume --quote QUOTE_ID`, never by running the command again.
|
|
31
|
+
|
|
26
32
|
## Connect
|
|
27
33
|
|
|
28
34
|
First check whether the command is available. In a POSIX shell, use a conditional so first-time absence is a normal setup result:
|
|
@@ -57,7 +63,7 @@ For image edits, reference-based video, speech or music, read [media workflows](
|
|
|
57
63
|
- When comparing reference support, retrieving schemas or searching model documentation, read [Discovery and delivery extensions](references/capabilities.md). Use `models recommend`, `models schema` and `docs search` only when the installed CLI supports them. Keep the user's chosen model; recommendations explain alternatives, not automatic approval.
|
|
58
64
|
- For a local reference, run `evolink upload /absolute/path --json` and use its `file_url` in the model input. A chat attachment must have a readable local file or public URL. Keep the original `upload_id` if a response is lost. `uploads get ID` reads the saved receipt and, when supported by the file service, recovers a completed upload without resending bytes. If it returns `outcome_unknown` and `result_verified: false`, no result was verified; check the user's files before uploading again. A missing receipt from an older service does not prove the file failed to arrive. Legacy MCP upload slots require the older CLI version.
|
|
59
65
|
- Prepare a JSON input file using the model's documented parameters. Run `evolink estimate --model MODEL --input-file /absolute/input.json --json`, adding `--max-cost-usd` only for a user-specified cap. `--media-seconds` is an estimation hint, not a model `duration` parameter or a billing guarantee.
|
|
60
|
-
- Show the user the model, input/reference, number/duration, output settings, estimated total and material uncertainties. For token billing or unknown duration, show the rates and state that the total is unknown. A partial estimate is not a total. Do not add a separate cap to the default confirmation; if the user gave a budget, say whether the estimate fits it.
|
|
66
|
+
- Show the user the model, input/reference, number/duration, output settings, estimated total and material uncertainties. For a `token_billed` reference price (GPT Image token models and Gemini Omni Flash video models), present it as a reference price: billed by actual token usage and settled when the task finishes, so the final charge may be lower or slightly higher. For a Gemini Omni video with an input or reference video, pass its length as `--media-seconds`; the reference counts that video at the highest resolution (4k), so also show the lower-resolution price the estimate gives. For other token billing or unknown duration, show the rates and state that the total is unknown. A partial estimate is not a total. Do not add a separate cap to the default confirmation; if the user gave a budget, say whether the estimate fits it.
|
|
61
67
|
|
|
62
68
|
Only a successful `estimate` response with `ok: true` and a returned `quote_id` can be approved. For invalid input, unavailable pricing, insufficient balance or an uncheckable cap, report the error and correct that problem before quoting again with the same budget. Do not invent a total or quote ID, run `generate --confirm`, or disable host permission controls.
|
|
63
69
|
|
|
@@ -65,15 +71,21 @@ Use a brief confirmation in English by default unless the user explicitly reques
|
|
|
65
71
|
|
|
66
72
|
## Submit after approval
|
|
67
73
|
|
|
68
|
-
Every paid task requires an explicit user approval of the quoted task. General generation intent, a prior task's approval, or approval to install/login does not authorize a new paid task. After that approval, use the returned quote ID:
|
|
74
|
+
Every paid task requires an explicit user approval of the quoted task, unless the user explicitly opted out of estimates (Generating without an estimate, above). General generation intent, a prior task's approval, or approval to install/login does not authorize a new paid task. After that approval, use the returned quote ID:
|
|
69
75
|
|
|
70
76
|
`evolink generate image|video|audio --quote QUOTE_ID --confirm --json`
|
|
71
77
|
|
|
72
|
-
The saved model and input are the submitted model and input. A changed
|
|
78
|
+
The saved model and input are the submitted model and input. A changed quote requires a new estimate and approval. An expired quote still holds while its input and price are unchanged: `generate` estimates again before submitting, refuses a changed price with `price_changed`, and otherwise submits under the original approval and says so (`approval_expired`). Do not remove or increase a user cap to make a request succeed. `--confirm` conveys an approval already obtained; it is not permission to approve on the user's behalf.
|
|
79
|
+
|
|
80
|
+
## Several images or tasks
|
|
81
|
+
|
|
82
|
+
For several images or tasks of one model, write the inputs (1–50, each like a single input) to a JSON array or JSONL file and run `evolink estimate --model MODEL --inputs-file /absolute/inputs.json --json`: one quote shows each input's price and the total, and one approval covers that batch. After approval, `evolink generate image|video|audio --quote QUOTE_ID --confirm --json` submits every input at once and returns each input's task ID or error right away (`--wait` does not apply to a batch). Collect the results with `evolink tasks batch --ids ID,ID --json` (free, up to 50 IDs). Tell the user the tasks generate at the same time. For tasks of different models, quote and submit each one separately. Do not rely on `n` for the count: some models, such as GPT Image, often return fewer images than `n`.
|
|
83
|
+
|
|
84
|
+
If some inputs were not submitted or their outcome is unknown, finish the batch with `evolink tasks resume --quote QUOTE_ID --json` within 24 hours: accepted inputs return their original tasks without a new charge, and only the rest are submitted. Never resubmit accepted, not-submitted or unknown-outcome inputs with a new estimate or generate command: that creates and charges new tasks. An input refused because it differs from what its request ID submitted earlier is a new task that needs a new estimate and approval.
|
|
73
85
|
|
|
74
86
|
## Recover and deliver
|
|
75
87
|
|
|
76
|
-
- Preserve `quote_id`, `client_request_id` and `task_id`. If submission outcome is unknown, use `tasks resume --quote QUOTE_ID` or `tasks list --since 30m --json`. Do not create a new quote/request ID to retry an uncertain submission. A known refused request can be corrected and quoted again.
|
|
88
|
+
- Preserve `quote_id`, `client_request_id` and `task_id`. If submission outcome is unknown, use `tasks resume --quote QUOTE_ID` or `tasks list --since 30m --json`. Do not create a new quote/request ID to retry an uncertain submission. `tasks resume` replays the original request ID only within 23 hours of the first submission; after that (`recovery_window_passed`) check recent tasks instead. A known refused request can be corrected and quoted again.
|
|
77
89
|
- `tasks list --status` accepts only the case-sensitive filters `processing`, `completed`, `failed`, `cancelled`. `processing` includes queued tasks. Do not use `pending`, `queued`, `canceled` or `all` as filter values. A task response may report `pending`; do not copy that response value into `--status`. Omit `--status` to read recent tasks across states, especially when recovering an uncertain submission that may already have completed or failed.
|
|
78
90
|
- For active tasks, use `evolink tasks list --status processing --json`. To find recent completed videos, use `evolink tasks list --status completed --type video --limit 50 --json`. Task-list `--type` accepts only `image`, `video`, `audio`; omit it for all types. `--limit` is 1–50 (default 20); `--since` accepts ISO 8601, Unix seconds or a relative time such as `30m`, `2h`, `1d`. It filters the selected page, not the entire history. Use `--page` and follow `next_page`; `--model` and `--until` narrow results. `total` is before time filtering. An empty list does not prove no task was submitted; retain the original IDs and use recovery. `cancelled` is a read filter, not a CLI cancellation feature.
|
|
79
91
|
- Poll with `tasks get TASK_ID --json` or `tasks wait TASK_ID --json`. Never poll with `generate`. Ctrl-C and the `tasks wait --timeout` limit stop only local waiting; they do not cancel the paid task. A `wait_timeout` error reports `status_check`: `verified` gives the last read `last_status` and its `read_at`, not a live status; `unverified` means the latest status could not be read. Continue with the returned `recovery` command, never with a new generation.
|
|
@@ -93,12 +105,14 @@ For setup problems, run `evolink doctor --agent NAME --json` if the installed ve
|
|
|
93
105
|
|
|
94
106
|
|
|
95
107
|
Estimates use published full pricing rules and show public default prices, excluding
|
|
96
|
-
personal discounts. Local approvals
|
|
108
|
+
personal discounts. Local approvals are current for up to 24 hours; submission verifies fresh rules, and an expired approval still submits while the input and price are unchanged.
|
|
97
109
|
Use `evolink estimate --refresh-quote ID` only for an unsubmitted approval; preserve
|
|
98
110
|
the input and explicit user budget and obtain approval again. The refreshed quote
|
|
99
111
|
replaces the old one and keeps its request ID: submit only the newest quote, which
|
|
100
112
|
`quote_superseded` names. Supply missing billing
|
|
101
113
|
usage with `--pricing-parameters JSON`; never invent unknown token counts or media
|
|
102
|
-
lengths.
|
|
114
|
+
lengths. GPT Image token models and Gemini Omni Flash video models (`gemini-omni-flash-*`, `gemini-omni-1.1-flash-*`, `gemini-omni-1.2-flash-*`) need no
|
|
115
|
+
token counts: their reference price comes from the input, and a `--max-cost-usd` budget must cover 1.5 times it.
|
|
116
|
+
For a Gemini Omni video, give an input or reference video's length with `--media-seconds` (for several reference videos, the longest one's). EvoLink reads that video's resolution at submission, so the reference counts it at 4k and the estimate also gives the price at a lower resolution. Partial subtotals cannot check a budget. If rules are unavailable or change,
|
|
103
117
|
pause and preserve the budget. Actual usage can change the final charge; final
|
|
104
118
|
settlement caps require gateway/Worker support.
|
|
@@ -24,7 +24,7 @@ evolink tasks batch --ids TASK_A,TASK_B --json
|
|
|
24
24
|
evolink tasks list --model MODEL --page 2 --limit 50 --json
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
`tasks batch` deduplicates up to 50 task IDs and reports `missing
|
|
27
|
+
`tasks batch` deduplicates up to 50 task IDs and reports `missing`; it also collects the tasks of a batch quote (`task_ids` of `generate --quote` with `--inputs-file`). Missing/foreign/expired IDs must not trigger automatic regeneration. Preserve `outputs` when a task returns a reusable `voice`, `voice_id`, `persona_id` or `result_id`. Verify the next model's actual input parameter before passing that resource onward. Returning an identifier does not establish a separate voice library, character training or resource-management product.
|
|
28
28
|
|
|
29
29
|
## All-result downloads
|
|
30
30
|
|
|
@@ -22,4 +22,4 @@ Use these notes when the user requests an image edit, a reference-based video, s
|
|
|
22
22
|
|
|
23
23
|
## Several outputs
|
|
24
24
|
|
|
25
|
-
Keep each quote bound to its exact inputs and budget. Approval must cover the concrete quoted outputs.
|
|
25
|
+
Keep each quote bound to its exact inputs and budget. Approval must cover the concrete quoted outputs. For several outputs of one model, prefer one batch quote (`estimate --inputs-file`, up to 50 inputs): one approval covers the listed inputs, and its quote ID finishes or recovers the whole batch with `tasks resume`. Otherwise record each quote and task ID separately so a lost reply can be recovered without submitting duplicate tasks. If a task is already running, waiting or downloading its results does not authorize another generation.
|
|
@@ -12,19 +12,21 @@ evolink usage --since 2026-10-01T00:00:00Z --until 2026-10-09T00:00:00Z --model
|
|
|
12
12
|
|
|
13
13
|
Always show the interval, account-wide scope, completed-task cost, missing-cost count and coverage. `complete_for_retained_tasks` means all currently retained matching tasks were scanned under the observed pagination; historical retention and snapshot consistency are not guaranteed. `truncated`, invalid rows or detected concurrent changes prevent claiming a full total. Do not turn missing costs into zero or infer a refund from failed/cancelled task status. This summary excludes reservations, payments, refunds and non-task charges. It is not a bill, tax invoice or a transactions API.
|
|
14
14
|
|
|
15
|
-
The default flow shows the estimated cost and asks for approval; it creates no spending cap. When the user specifies a budget, compare the estimate with that budget and preserve it across retries. The compatibility option `--max-cost-usd` checks this estimate comparison, not the final charge. Unknown totals, token usage, generated audio duration or incompletely priced reference inputs can prevent a complete comparison. Pause if the estimate exceeds the budget or cannot be checked; explain the uncertainty before accepting any changed requirement.
|
|
15
|
+
The default flow shows the estimated cost and asks for approval; it creates no spending cap. A user who explicitly opts out of estimates gets `--skip-estimate` instead: no quote and no confirmation, charged by actual usage, while a budget they gave is still checked. When the user specifies a budget, compare the estimate with that budget and preserve it across retries. The compatibility option `--max-cost-usd` checks this estimate comparison, not the final charge. Unknown totals, token usage, generated audio duration or incompletely priced reference inputs can prevent a complete comparison. Pause if the estimate exceeds the budget or cannot be checked; explain the uncertainty before accepting any changed requirement.
|
|
16
16
|
|
|
17
17
|
A final task/workflow cap requires server-side reservation and settlement enforcement with an authoritative quote and ledger. This client cannot create that guarantee by polling, summing history or stopping local waiting. Do not label this version as supporting final settlement budgets or downloadable invoices.
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
Estimates use published full pricing rules and show public default prices, excluding
|
|
21
|
-
personal discounts. Local approvals
|
|
21
|
+
personal discounts. Local approvals are current for up to 24 hours; submission verifies fresh rules, and an expired approval still submits while the input and price are unchanged.
|
|
22
22
|
Use `evolink estimate --refresh-quote ID` only for an unsubmitted approval; preserve
|
|
23
23
|
the input and explicit user budget and obtain approval again. The refreshed quote
|
|
24
24
|
replaces the old one and keeps its request ID: submit only the newest quote, which
|
|
25
25
|
`quote_superseded` names. Supply missing billing
|
|
26
26
|
usage with `--pricing-parameters JSON`; never invent unknown token counts or media
|
|
27
|
-
lengths.
|
|
27
|
+
lengths. GPT Image token models and Gemini Omni Flash video models (`gemini-omni-flash-*`, `gemini-omni-1.1-flash-*`, `gemini-omni-1.2-flash-*`) need no
|
|
28
|
+
token counts: their reference price comes from the input, and a `--max-cost-usd` budget must cover 1.5 times it.
|
|
29
|
+
For a Gemini Omni video, give an input or reference video's length with `--media-seconds` (for several reference videos, the longest one's). EvoLink reads that video's resolution at submission, so the reference counts it at 4k and the estimate also gives the price at a lower resolution. Partial subtotals cannot check a budget. If rules are unavailable or change,
|
|
28
30
|
pause and preserve the budget. Actual usage can change the final charge; final
|
|
29
31
|
settlement caps require gateway/Worker support.
|
|
30
32
|
|
package/src/cli.mjs
CHANGED
|
@@ -13,6 +13,7 @@ import { setup } from './setup.mjs';
|
|
|
13
13
|
import { checkForUpdate, updateNotice } from './update.mjs';
|
|
14
14
|
import { CLI_VERSION } from './version.mjs';
|
|
15
15
|
import { CliError, requireThat, errorView, localFile } from './errors.mjs';
|
|
16
|
+
import { MAX_BATCH_ITEMS } from './platform/core/src/services/batch-generation.js';
|
|
16
17
|
|
|
17
18
|
const TASK_STATUS_FILTERS = Object.freeze(['processing', 'completed', 'failed', 'cancelled']);
|
|
18
19
|
const TASK_STATUS_HELP = `Allowed task status filters: ${TASK_STATUS_FILTERS.join(', ')}.
|
|
@@ -64,8 +65,12 @@ const HELP = `EvoLink CLI ${CLI_VERSION} (Node.js 22+)
|
|
|
64
65
|
docs search --query TEXT Search official model reference excerpts (free)
|
|
65
66
|
estimate --model MODEL --input-file FILE [--media-seconds N]
|
|
66
67
|
[--pricing-parameters JSON] [--pricing-source pricing_rules]
|
|
68
|
+
estimate --model MODEL --inputs-file FILE
|
|
69
|
+
One quote for 1-50 inputs of one model (JSON array or JSONL)
|
|
67
70
|
estimate --refresh-quote ID Refresh saved input and budget; approval required
|
|
68
71
|
generate image|video|audio --quote ID --confirm [--wait] [--timeout SECONDS]
|
|
72
|
+
generate image|video|audio --model MODEL --input-file FILE|--inputs-file FILE --skip-estimate
|
|
73
|
+
Submit without a quote, only when the user opted out of estimates
|
|
69
74
|
tasks get ID | tasks wait ID [--timeout SECONDS]
|
|
70
75
|
tasks list [--type TYPE] [--status STATUS] [--since TIME] [--limit N]
|
|
71
76
|
[--until TIME] [--model MODEL] [--page N]
|
|
@@ -88,7 +93,8 @@ Options: --json, --server RESOURCE_URL, --api-url URL, --files-url URL,
|
|
|
88
93
|
The CLI calls the platform API directly. --server identifies the OAuth resource.
|
|
89
94
|
Agents: all (default), codex, claude-code, cursor, gemini, opencode, copilot,
|
|
90
95
|
openclaw, hermes.
|
|
91
|
-
Input: --input JSON or --input-file FILE, plus optional --prompt TEXT
|
|
96
|
+
Input: --input JSON or --input-file FILE, plus optional --prompt TEXT; --inputs-file FILE
|
|
97
|
+
holds a batch: a JSON array or JSONL of 1-50 inputs for one model.
|
|
92
98
|
${TASK_STATUS_HELP}
|
|
93
99
|
Task list types: image, video, audio; omit --type to include all types.
|
|
94
100
|
Task list example: evolink tasks list --status processing --json
|
|
@@ -102,8 +108,13 @@ newer release exists. EVOLINK_CLI_UPDATE_CHECK=0 turns these npm registry checks
|
|
|
102
108
|
|
|
103
109
|
Login timeout: 30-900 seconds, default 180. On SSH, forward the callback port.
|
|
104
110
|
The CLI verifies skill files; your assistant must confirm it loads evolink-cli.
|
|
105
|
-
Quotes
|
|
106
|
-
|
|
111
|
+
Quotes are current for at most 24 hours, never beyond the returned approval expiry.
|
|
112
|
+
generate estimates again before submitting: an expired quote whose input and price
|
|
113
|
+
are unchanged is submitted under its approval; a changed price needs a new approval.
|
|
114
|
+
--confirm is only for an already approved quote. --skip-estimate is only for a user
|
|
115
|
+
who explicitly said not to estimate or confirm.
|
|
116
|
+
A batch quote submits all its inputs in one call; tasks resume finishes the rest
|
|
117
|
+
with the same request ID within 24 hours.
|
|
107
118
|
Spending caps protect the estimate at submission, not final settlement.
|
|
108
119
|
Ctrl-C stops local waiting; submitted tasks continue on EvoLink.
|
|
109
120
|
`;
|
|
@@ -111,9 +122,9 @@ Ctrl-C stops local waiting; submitted tasks continue on EvoLink.
|
|
|
111
122
|
// setup, doctor and auth login report the update status in their own result; auth status stays offline.
|
|
112
123
|
const NO_UPDATE_NOTICE = new Set(['setup', 'doctor', 'auth login', 'auth status']);
|
|
113
124
|
|
|
114
|
-
const OPTIONS = Object.fromEntries(['server', 'api-url', 'files-url', 'query', 'type', 'limit', 'model', 'modality', 'view', 'product-id', 'operation', 'lifecycle', 'input', 'input-file', 'prompt', 'media-seconds',
|
|
125
|
+
const OPTIONS = Object.fromEntries(['server', 'api-url', 'files-url', 'query', 'type', 'limit', 'model', 'modality', 'view', 'product-id', 'operation', 'lifecycle', 'input', 'input-file', 'inputs-file', 'prompt', 'media-seconds',
|
|
115
126
|
'pricing-source', 'pricing-parameters', 'refresh-quote', 'max-cost-usd', 'quote', 'timeout', 'status', 'since', 'until', 'page', 'ids', 'references', 'max-pages', 'output', 'output-dir', 'template', 'index', 'upload-path', 'agent'].map(k => [k, { type: 'string' }]));
|
|
116
|
-
for (const k of ['json', 'token-stdin', 'no-browser', 'replace-modified', 'confirm', 'wait', 'all', 'resume', 'help', 'version']) OPTIONS[k] = { type: 'boolean' };
|
|
127
|
+
for (const k of ['json', 'token-stdin', 'no-browser', 'replace-modified', 'confirm', 'skip-estimate', 'wait', 'all', 'resume', 'help', 'version']) OPTIONS[k] = { type: 'boolean' };
|
|
117
128
|
|
|
118
129
|
function number(value, name, min, max, integer = false) {
|
|
119
130
|
if (value === undefined) return undefined;
|
|
@@ -131,8 +142,9 @@ export function validateCommand(args, options) {
|
|
|
131
142
|
'models pricing': [2, 'model', 'modality', 'view', 'product-id', 'operation', 'lifecycle'],
|
|
132
143
|
'models recommend': [2, 'type', 'query', 'references', 'limit'], 'docs search': [2, 'query', 'type', 'limit'],
|
|
133
144
|
usage: [1, 'since', 'until', 'type', 'model', 'max-pages'],
|
|
134
|
-
estimate: [1, 'model', 'input', 'input-file', 'prompt', 'media-seconds', 'max-cost-usd', 'pricing-source', 'pricing-parameters', 'refresh-quote'],
|
|
135
|
-
'
|
|
145
|
+
estimate: [1, 'model', 'input', 'input-file', 'inputs-file', 'prompt', 'media-seconds', 'max-cost-usd', 'pricing-source', 'pricing-parameters', 'refresh-quote'],
|
|
146
|
+
...Object.fromEntries(['image', 'video', 'audio'].map(type => [`generate ${type}`, [2, 'quote', 'confirm', 'wait', 'timeout',
|
|
147
|
+
'skip-estimate', 'model', 'input', 'input-file', 'inputs-file', 'prompt', 'media-seconds', 'pricing-parameters', 'max-cost-usd']])),
|
|
136
148
|
'tasks get': [3], 'tasks wait': [3, 'timeout'], 'tasks batch': [2, 'ids'], 'tasks list': [2, 'type', 'status', 'since', 'until', 'model', 'page', 'limit'], 'tasks resume': [2, 'quote'],
|
|
137
149
|
upload: [2, 'upload-path'], 'uploads get': [3], download: [2, 'output', 'index', 'all', 'output-dir', 'template', 'resume'],
|
|
138
150
|
'skills install': [2, 'agent', 'replace-modified'], 'skills status': [2, 'agent'], doctor: [1, 'agent'],
|
|
@@ -154,6 +166,16 @@ export function validateCommand(args, options) {
|
|
|
154
166
|
if (options.references !== undefined) references(options.references);
|
|
155
167
|
}
|
|
156
168
|
if (command === 'docs') requireThat(options.query?.trim(), 'missing_query', 'Pass --query with model reference keywords.');
|
|
169
|
+
if (command === 'generate') {
|
|
170
|
+
if (options['skip-estimate']) {
|
|
171
|
+
requireThat(options.quote === undefined && !options.confirm, 'invalid_option',
|
|
172
|
+
'--skip-estimate submits without a quote, only when the user explicitly said not to estimate or confirm; --quote and --confirm are for an approved quote.');
|
|
173
|
+
requireThat(!(options.wait && options['inputs-file']), 'invalid_option', BATCH_WAIT);
|
|
174
|
+
} else {
|
|
175
|
+
requireThat(!DIRECT_OPTIONS.some(key => options[key] !== undefined), 'invalid_option',
|
|
176
|
+
'Generation submits the saved quote as approved; change its input with a new estimate. These options are only for --skip-estimate.');
|
|
177
|
+
}
|
|
178
|
+
}
|
|
157
179
|
if (command === 'tasks' && action === 'batch') taskIds(options.ids);
|
|
158
180
|
if (command === 'download') {
|
|
159
181
|
requireThat(options.all ? options['output-dir'] && !options.output && !options.index : options.output && !options['output-dir'] && !options.template && !options.resume,
|
|
@@ -181,17 +203,46 @@ function taskIds(value) {
|
|
|
181
203
|
return [...new Set(ids)];
|
|
182
204
|
}
|
|
183
205
|
|
|
206
|
+
const BATCH_FILE_FORMAT = 'The inputs file must contain a JSON array of input objects, or one JSON object per line (JSONL).';
|
|
207
|
+
const BATCH_WAIT = '--wait follows one task. A batch returns its task IDs right away; collect them with evolink tasks batch --ids.';
|
|
208
|
+
/** The input of a generation without a quote (--skip-estimate); a quoted generation submits its saved input. */
|
|
209
|
+
const DIRECT_OPTIONS = ['model', 'input', 'input-file', 'inputs-file', 'prompt', 'media-seconds', 'pricing-parameters', 'max-cost-usd'];
|
|
210
|
+
|
|
211
|
+
/** --inputs-file: a JSON array of model inputs, or JSONL with one input object per line (blank lines ignored). */
|
|
212
|
+
async function batchInputs(file) {
|
|
213
|
+
const raw = await localFile(() => fs.readFile(file, 'utf8'), { file });
|
|
214
|
+
let items;
|
|
215
|
+
try { items = JSON.parse(raw); }
|
|
216
|
+
catch {
|
|
217
|
+
try { items = raw.split(/\r?\n/).filter(line => line.trim()).map(line => JSON.parse(line)); }
|
|
218
|
+
catch { throw new CliError('invalid_input', BATCH_FILE_FORMAT); }
|
|
219
|
+
}
|
|
220
|
+
// A JSONL file of one line is a batch of one.
|
|
221
|
+
if (items && typeof items === 'object' && !Array.isArray(items)) items = [items];
|
|
222
|
+
requireThat(Array.isArray(items) && items.every(item => item && typeof item === 'object' && !Array.isArray(item)), 'invalid_input', BATCH_FILE_FORMAT);
|
|
223
|
+
requireThat(items.length >= 1 && items.length <= MAX_BATCH_ITEMS, 'invalid_input',
|
|
224
|
+
`The inputs file must contain 1-${MAX_BATCH_ITEMS} inputs for one model; it has ${items.length}.`, { inputs: items.length, maximum: MAX_BATCH_ITEMS });
|
|
225
|
+
return items;
|
|
226
|
+
}
|
|
227
|
+
|
|
184
228
|
async function estimateArgs(options) {
|
|
185
229
|
requireThat(options.model, 'missing_model', 'Pass --model.');
|
|
186
|
-
requireThat(
|
|
187
|
-
let
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
input
|
|
230
|
+
requireThat(['input', 'input-file', 'inputs-file'].filter(key => options[key] !== undefined).length <= 1, 'invalid_input', 'Choose one of --input, --input-file or --inputs-file.');
|
|
231
|
+
let body;
|
|
232
|
+
if (options['inputs-file'] !== undefined) {
|
|
233
|
+
requireThat(options.prompt === undefined, 'invalid_input', '--prompt is for one input; put each prompt in its item of --inputs-file.');
|
|
234
|
+
body = { inputs: await batchInputs(options['inputs-file']) };
|
|
235
|
+
} else {
|
|
236
|
+
let input = {};
|
|
237
|
+
const raw = options['input-file'] ? await localFile(() => fs.readFile(options['input-file'], 'utf8'), { file: options['input-file'] }) : options.input || '{}';
|
|
238
|
+
try { input = JSON.parse(raw); }
|
|
239
|
+
catch { throw new CliError('invalid_input', 'The input must contain valid JSON.'); }
|
|
240
|
+
requireThat(input && typeof input === 'object' && !Array.isArray(input), 'invalid_input', 'The model input must be a JSON object.');
|
|
241
|
+
if (options.prompt !== undefined) {
|
|
242
|
+
requireThat(input.prompt === undefined || input.prompt === options.prompt, 'invalid_input', 'prompt was supplied twice with different values.');
|
|
243
|
+
input.prompt = options.prompt;
|
|
244
|
+
}
|
|
245
|
+
body = { input };
|
|
195
246
|
}
|
|
196
247
|
let pricingParameters;
|
|
197
248
|
if (options['pricing-parameters'] !== undefined) {
|
|
@@ -201,7 +252,7 @@ async function estimateArgs(options) {
|
|
|
201
252
|
requireThat(options['pricing-source'] === undefined || ['pricing_rules', 'account', 'public_reference'].includes(options['pricing-source']), 'invalid_option', 'pricing-source must be pricing_rules (account/public_reference remain compatibility aliases).');
|
|
202
253
|
const media = number(options['media-seconds'], 'media-seconds', Number.MIN_VALUE, 3600);
|
|
203
254
|
const cap = number(options['max-cost-usd'], 'max-cost-usd', Number.MIN_VALUE, 10_000);
|
|
204
|
-
return { model: options.model,
|
|
255
|
+
return { model: options.model, ...body, ...(pricingParameters !== undefined ? { pricing_parameters: pricingParameters } : {}), ...(options['pricing-source'] ? { pricing_source: options['pricing-source'] } : {}), ...(media !== undefined ? { media_seconds: media } : {}), ...(cap !== undefined ? { max_cost_usd: cap } : {}) };
|
|
205
256
|
}
|
|
206
257
|
|
|
207
258
|
export async function dispatch(positionals, options, { state, server, credentials, client, mcp = client, signal, progress, skillHome, updates, budget }) {
|
|
@@ -250,12 +301,16 @@ export async function dispatch(positionals, options, { state, server, credential
|
|
|
250
301
|
return media.estimate(await estimateArgs(options));
|
|
251
302
|
}
|
|
252
303
|
if (command === 'generate') {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
304
|
+
let result;
|
|
305
|
+
if (options['skip-estimate']) result = await media.direct(action, await estimateArgs(options));
|
|
306
|
+
else {
|
|
307
|
+
requireThat(options.quote, 'missing_quote', 'Run estimate and obtain user approval before generation. Use --skip-estimate only when the user explicitly said not to estimate or confirm.');
|
|
308
|
+
if (options.wait) requireThat(!Array.isArray((await state.read('quotes', options.quote))?.args?.inputs), 'invalid_option', BATCH_WAIT);
|
|
309
|
+
result = await media.generate(action, options.quote, { confirmed: options.confirm });
|
|
310
|
+
}
|
|
256
311
|
if (options.wait && result.task_id && result.status !== 'completed') {
|
|
257
312
|
const task = await media.wait(result.task_id, { timeout: number(options.timeout, 'timeout', 1, 86400, true) || 1800, signal, progress, budget });
|
|
258
|
-
return { ...task, quote_id:
|
|
313
|
+
return { ...task, quote_id: result.quote_id, client_request_id: result.client_request_id };
|
|
259
314
|
}
|
|
260
315
|
return result;
|
|
261
316
|
}
|
package/src/help.mjs
CHANGED
|
@@ -24,8 +24,9 @@ const COMMANDS = {
|
|
|
24
24
|
'models schema': ['MODEL', 'Read versioned input and generation-submission response schemas. The response schema may omit final task outputs; runtime constraints also apply.', {}],
|
|
25
25
|
'models recommend': ['--type TYPE [options]', 'Compare documented available alternatives with selection reasons. Unit rates are not total quotes.', { type: media, query: string('Search keywords; every term must match'), references: string('Comma-separated image,video,audio'), limit: integer(1, 10, 3) }],
|
|
26
26
|
'docs search': ['--query TEXT [options]', 'Search versioned official model reference excerpts, not the live full website.', { query: string('Required model reference keywords'), type: allMedia, limit: integer(1, 20, 5) }],
|
|
27
|
-
estimate: ['--model MODEL --input-file FILE [options] | --refresh-quote ID', 'Prepare an estimate valid until the returned approval expiry, at most
|
|
28
|
-
model: string('Required model ID'), input: string('JSON object; mutually exclusive with input-file'), 'input-file': string('Local JSON file; mutually exclusive with input
|
|
27
|
+
estimate: ['--model MODEL --input-file FILE|--inputs-file FILE [options] | --refresh-quote ID', 'Prepare an estimate valid until the returned approval expiry, at most 24 hours; generate estimates again and still submits an expired quote whose input and price are unchanged. Show the estimated cost and material uncertainty, then obtain user approval. No spending cap is created from the estimate. --inputs-file prepares one quote for a batch: one approval covers all its inputs.', {
|
|
28
|
+
model: string('Required model ID'), input: string('JSON object; mutually exclusive with input-file and inputs-file'), 'input-file': string('Local JSON file; mutually exclusive with input and inputs-file'),
|
|
29
|
+
'inputs-file': string('Local JSON array or JSONL file of 1-50 inputs for one model, estimated and later submitted together'), prompt: string('Optional prompt; not with inputs-file'),
|
|
29
30
|
'pricing-source': choice(['account', 'public_reference']), 'pricing-parameters': string('JSON object containing declared billing usage'),
|
|
30
31
|
'refresh-quote': string('Refresh an unsubmitted saved quote with its existing input and budget'),
|
|
31
32
|
'max-cost-usd': { type: 'number', exclusive_minimum: 0, maximum: 10000, description: 'Compatibility option for an explicit user budget: compare the estimate only; it does not cap the final charge' }, 'media-seconds': { type: 'number', exclusive_minimum: 0, maximum: 3600 },
|
|
@@ -36,7 +37,7 @@ const COMMANDS = {
|
|
|
36
37
|
'tasks list': ['[options]', 'Page through account tasks. since/until filter only the selected page; total is before time filtering. Empty results do not prove no task was submitted.', {
|
|
37
38
|
status: choice(['processing', 'completed', 'failed', 'cancelled']), type: media, since: time, until: time, model: string('Exact model ID'), page: integer(1, 100000, 1), limit: integer(1, 50, 20),
|
|
38
39
|
}],
|
|
39
|
-
'tasks resume': ['--quote ID', 'Recover an uncertain submission with the original request ID. Use generate for an approved quote that has never been submitted.', { quote: string('Original quote ID') }],
|
|
40
|
+
'tasks resume': ['--quote ID', 'Recover an uncertain submission, or finish a partly submitted batch, with the original request ID within 24 hours of its first submission. Accepted inputs return their tasks without a new charge. Use generate for an approved quote that has never been submitted.', { quote: string('Original quote ID') }],
|
|
40
41
|
usage: ['[options]', 'Summarize reported completed-task credits by creation time. Account-wide retained tasks; bounded scan with coverage and missing-cost metadata. Excludes payments/refunds and pending reservations. Not a bill or final budget.', {
|
|
41
42
|
since: { ...time, default: '30d' }, until: time, model: string('Exact model ID'), type: media, 'max-pages': integer(1, 20, 5),
|
|
42
43
|
}],
|
|
@@ -51,8 +52,14 @@ const COMMANDS = {
|
|
|
51
52
|
doctor: ['[options]', 'Check prerequisites, connection, model discovery, skill contents and CLI updates separately. An available update, and installed skill findings without --agent, are guidance only. Free.', { agent }],
|
|
52
53
|
};
|
|
53
54
|
for (const type of ['image', 'video', 'audio']) COMMANDS[`generate ${type}`] = [
|
|
54
|
-
'--quote ID --confirm [options]
|
|
55
|
-
|
|
55
|
+
'--quote ID --confirm [options] | --model MODEL --input-file FILE|--inputs-file FILE --skip-estimate [options]',
|
|
56
|
+
'Submit the saved quote after explicit user approval. Changes require a new quote. --skip-estimate submits without a quote, only when the user explicitly said not to estimate or confirm; invalid input and an explicit budget are still refused, and the task is charged by actual usage. A batch returns its task IDs at once. Never call generate to poll progress.',
|
|
57
|
+
{ quote: string('Approved quote ID'), confirm: flag, wait: { ...flag, description: 'Wait for one task; not for a batch' }, timeout: integer(1, 86400, 1800),
|
|
58
|
+
'skip-estimate': { ...flag, description: 'Submit without a quote: only when the user explicitly opted out of estimates' },
|
|
59
|
+
model: string('Model ID, with skip-estimate'), input: string('JSON object, with skip-estimate'), 'input-file': string('Local JSON file, with skip-estimate'),
|
|
60
|
+
'inputs-file': string('Local JSON array or JSONL file of 1-50 inputs for one model, with skip-estimate'), prompt: string('Optional prompt, with skip-estimate and one input'),
|
|
61
|
+
'media-seconds': { type: 'number', exclusive_minimum: 0, maximum: 3600, description: 'With skip-estimate' }, 'pricing-parameters': string('JSON object of declared billing usage, with skip-estimate'),
|
|
62
|
+
'max-cost-usd': { type: 'number', exclusive_minimum: 0, maximum: 10000, description: 'An explicit user budget, with skip-estimate; still checked before submitting' } },
|
|
56
63
|
];
|
|
57
64
|
|
|
58
65
|
export function commandHelp(positionals) {
|