lua-cli 3.32.2 → 3.32.4
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 +87 -11
- package/dist/api-exports.js +1554 -756
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +3512 -1459
- package/dist/index.js.map +1 -1
- package/dist/workflow-builder.d.ts +16 -10
- package/dist/workflow-builder.js +1216 -702
- package/dist/workflow-builder.js.map +1 -1
- package/docs/CLI_REFERENCE.md +126 -4
- package/docs/README.md +2 -2
- package/docs/api/LuaWorkflow.md +1 -1
- package/docs/workflows/approvals.md +26 -6
- package/docs/workflows/goals.md +2 -2
- package/docs/workflows/recovery.md +1 -1
- package/docs/workflows/replay-local.md +9 -3
- package/docs/workflows/schedules.md +13 -4
- 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/examples/workflows/research-brief.ts +29 -16
- package/template/package.json +1 -1
|
@@ -103,9 +103,11 @@ declare interface BuiltWorkflow {
|
|
|
103
103
|
/**
|
|
104
104
|
* A container arm: a `StepRef` — a `createStep` object, or a string naming an entry declared elsewhere in the chain
|
|
105
105
|
* (`agentStep` / `specialistStep` / `toolStep` / `workflow`, and since LUA-684 `approval` / `waitForSignal`, so an
|
|
106
|
-
* approval can run concurrently with another row) — or
|
|
107
|
-
*
|
|
108
|
-
*
|
|
106
|
+
* approval can run concurrently with another row) — or the two-element pair `[mapConfig, stepRef]`: the step runs
|
|
107
|
+
* with the map as its own `input` (LUA-780 — a `parallel` arm only; a `foreach` / `loop` body receives its item /
|
|
108
|
+
* the previous output and refuses the pair, `mapping-placement`, unless the target is a `.workflow()` node, whose
|
|
109
|
+
* `input` is the child run's). A HITL arm takes the previous output as its payload, so it never heads a
|
|
110
|
+
* `[map, step]` pair, and a `loop` body cannot be one until the engine proves it (`node-type-unsupported-in-container`).
|
|
109
111
|
*/
|
|
110
112
|
export declare type ContainerArm = StepRef | [LuaMapConfig, StepRef];
|
|
111
113
|
|
|
@@ -365,13 +367,17 @@ export declare interface LuaWorkflowConfig {
|
|
|
365
367
|
* `maxDurationSeconds` default 604 800; 2 592 000 when the graph contains an approval / waitForSignal / suspend-capable
|
|
366
368
|
* step (P1-4). The three members the SDK forwards, spelled by the ONE definition budget (`WorkflowDefinitionBudget`).
|
|
367
369
|
*
|
|
368
|
-
* `maxCredits`
|
|
369
|
-
* completes, a `tier:'job'` attempt a flat 4 at its first
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
370
|
+
* `maxCredits` never meters tokens (LUA-708). Flat metering (every run while `LUA_WORKFLOWS_METERING_V2` is off):
|
|
371
|
+
* an inline agent step settles a flat 1 credit when it completes, a `tier:'job'` attempt a flat 4 at its first
|
|
372
|
+
* claim (a retry is a new attempt) — so `maxCredits: 40` buys ten Job-tier attempts, and a value under 4 never
|
|
373
|
+
* dispatches one. Priced metering (LUA-724, the flag on): an inline agent step settles what chat charged for the
|
|
374
|
+
* turn — one credit per model call on the legacy plan, `tier × model multiplier` actions on a seat plan (then the
|
|
375
|
+
* cap is compared in actions) — and `lua workflows status` says which mode a run used (`usage.metering`). Either
|
|
376
|
+
* way the run parks on a budget gate (`nextAction:'raise_budget'`, `lua workflows raise-budget`) when what remains
|
|
377
|
+
* is under the next agent step's reserve. Each Job-tier attempt then runs to its own wall (`timeoutSeconds`),
|
|
378
|
+
* `maxInputTokens` (default 4M ≈ $1–13 on a Sonnet-class model), `maxMessages` and `maxTurns`; nothing meters its
|
|
379
|
+
* tokens against the credits mid-attempt. Size `maxInputTokens` for what one attempt may cost and `maxCredits`
|
|
380
|
+
* for how many attempts the run may make.
|
|
375
381
|
*/
|
|
376
382
|
budget?: Pick<WorkflowDefinitionBudget, 'maxCredits' | 'maxSteps' | 'maxDurationSeconds'>;
|
|
377
383
|
/** verbatim LuaJob union (D12) → Job{kind:'workflow'} on publish */
|