lua-cli 3.32.2 → 3.32.3
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/api-exports.d.ts +82 -8
- package/dist/api-exports.js +765 -304
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +2082 -549
- package/dist/index.js.map +1 -1
- package/dist/workflow-builder.d.ts +11 -7
- package/dist/workflow-builder.js +588 -244
- package/dist/workflow-builder.js.map +1 -1
- package/docs/CLI_REFERENCE.md +126 -4
- package/docs/README.md +2 -2
- package/docs/workflows/approvals.md +24 -6
- package/docs/workflows/goals.md +2 -2
- package/docs/workflows/replay-local.md +9 -3
- package/docs/workflows/schedules.md +1 -1
- package/docs/workflows/script-form.md +4 -4
- package/docs/workflows/testing-offline.md +33 -21
- package/package.json +4 -3
- package/template/examples/workflows/CLAUDE.md +17 -11
- package/template/examples/workflows/adversarial-verify.workflow.script.js +20 -16
- package/template/examples/workflows/outreach.ts +31 -15
- package/template/examples/workflows/refund-approval.ts +26 -12
- package/template/package.json +1 -1
|
@@ -365,13 +365,17 @@ export declare interface LuaWorkflowConfig {
|
|
|
365
365
|
* `maxDurationSeconds` default 604 800; 2 592 000 when the graph contains an approval / waitForSignal / suspend-capable
|
|
366
366
|
* step (P1-4). The three members the SDK forwards, spelled by the ONE definition budget (`WorkflowDefinitionBudget`).
|
|
367
367
|
*
|
|
368
|
-
* `maxCredits`
|
|
369
|
-
* completes, a `tier:'job'` attempt a flat 4 at its first
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
368
|
+
* `maxCredits` never meters tokens (LUA-708). Flat metering (every run while `LUA_WORKFLOWS_METERING_V2` is off):
|
|
369
|
+
* an inline agent step settles a flat 1 credit when it completes, a `tier:'job'` attempt a flat 4 at its first
|
|
370
|
+
* claim (a retry is a new attempt) — so `maxCredits: 40` buys ten Job-tier attempts, and a value under 4 never
|
|
371
|
+
* dispatches one. Priced metering (LUA-724, the flag on): an inline agent step settles what chat charged for the
|
|
372
|
+
* turn — one credit per model call on the legacy plan, `tier × model multiplier` actions on a seat plan (then the
|
|
373
|
+
* cap is compared in actions) — and `lua workflows status` says which mode a run used (`usage.metering`). Either
|
|
374
|
+
* way the run parks on a budget gate (`nextAction:'raise_budget'`, `lua workflows raise-budget`) when what remains
|
|
375
|
+
* is under the next agent step's reserve. Each Job-tier attempt then runs to its own wall (`timeoutSeconds`),
|
|
376
|
+
* `maxInputTokens` (default 4M ≈ $1–13 on a Sonnet-class model), `maxMessages` and `maxTurns`; nothing meters its
|
|
377
|
+
* tokens against the credits mid-attempt. Size `maxInputTokens` for what one attempt may cost and `maxCredits`
|
|
378
|
+
* for how many attempts the run may make.
|
|
375
379
|
*/
|
|
376
380
|
budget?: Pick<WorkflowDefinitionBudget, 'maxCredits' | 'maxSteps' | 'maxDurationSeconds'>;
|
|
377
381
|
/** verbatim LuaJob union (D12) → Job{kind:'workflow'} on publish */
|