lua-cli 3.49.0 → 3.49.1

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/docs/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # lua-cli v3.49.0
1
+ # lua-cli v3.49.1
2
2
 
3
- Welcome to the comprehensive API documentation for lua-cli v3.49.0. This guide covers every API, class, and function exported by the package.
3
+ Welcome to the comprehensive API documentation for lua-cli v3.49.1. This guide covers every API, class, and function exported by the package.
4
4
 
5
5
  ## 📚 Documentation Index
6
6
 
@@ -263,7 +263,7 @@ Each API doc includes:
263
263
 
264
264
  ---
265
265
 
266
- **Version:** 3.49.0
266
+ **Version:** 3.49.1
267
267
  **Last Updated:** October 2026
268
268
 
269
269
  ---
@@ -89,7 +89,7 @@ The compiler reads each decision from its source, so write it as `new LuaDecisio
89
89
 
90
90
  `lua push` stages a new version of every decision listed in `decisions`; it does not change what `Decisions.run` asks. `lua push decision --name triage` stages one decision. A staged version becomes current only through `lua version promote` or `lua decisions publish`. Until a decision has a current version, `Decisions.run` throws `decision_not_found` for it.
91
91
 
92
- A staged version goes live with the agent version that includes it: run `lua version create`, then `lua version promote <version>`. Promoting an older agent version brings back the decision versions it included, which is how you roll back a pushed decision.
92
+ A staged version goes live with the agent version that includes it: run `lua version create`, then `lua version promote <version>`. Promoting an older agent version brings back the decision versions it included, which is how you roll back a pushed decision. A decision that the promoted agent version does not include stops answering (`decision_not_found`) and keeps its versions, and promoting an agent version that includes it makes it current again.
93
93
 
94
94
  A version saved from the dashboard goes live when you publish it, and publishing an older version there rolls back too.
95
95
 
@@ -103,7 +103,7 @@ Each lua-core pod caches the current version. A promote, a publish, a rename or
103
103
 
104
104
  The first push of a decision writes 1.0.1, as for every versioned primitive: a push bumps the version in `lua.skill.yaml` (1.0.0 for a new entry) before it writes.
105
105
 
106
- `lua decisions publish triage 1.0.1` makes 1.0.1 the current version straight away, which is the quickest rollback. Promoting a different agent version sets it back to what that version pins; promoting the agent version that is already active changes nothing.
106
+ `lua decisions publish triage 1.0.1` makes 1.0.1 the current version straight away, which is the quickest rollback. The next `lua version create` keeps 1.0.1 unless you push a newer version of the decision after publishing. Promoting a different agent version sets it back to what that version pins; promoting the agent version that is already active changes nothing.
107
107
 
108
108
  `lua decisions delete triage` deactivates the decision after asking and keeps its versions. From then on `Decisions.run('triage', ...)` throws `decision_not_found`. `lua decisions versions triage` still lists its versions, and publishing one of them turns it back on.
109
109
 
@@ -48,7 +48,23 @@ A typed code step. `inputSchema` / `outputSchema` / `resumeSchema` are zod schem
48
48
 
49
49
  `createWorkflow(cfg)` opens a fluent builder; `.commit()` freezes it into the compiled graph. `defineWorkflow(cfg, (wf) => …)` is sugar for the same thing.
50
50
 
51
- Config: `name`, `description?`, `inputSchema`, `outputSchema?`, `budget?` (`maxCredits`, `maxDurationSeconds`, `maxJobSeconds?`), `schedule?` (`{ type:'cron', expression, timezone }`), `scheduleInput?`, `concurrencyPolicy?` (`'allow'|'forbid'`), `concurrencyKey?` (`'correlationKey'`, requires `concurrencyPolicy:'forbid'`), `workspace?`, `outputVisibility?` (see [Output visibility](../workflows/output-visibility.md)), `env.template()` overlays (see [Env overlays](../workflows/env-overlays.md)).
51
+ Config: `name`, `description?`, `inputSchema`, `outputSchema?`, `budget?` (`maxCredits`, `maxDurationSeconds`, `maxJobSeconds?`), `schedule?` (`{ type:'cron', expression, timezone }`), `scheduleInput?`, `concurrencyPolicy?` (`'allow'|'forbid'`), `concurrencyKey?` (`'correlationKey'`, requires `concurrencyPolicy:'forbid'`, see [Concurrency](#concurrency)), `workspace?`, `outputVisibility?` (see [Output visibility](../workflows/output-visibility.md)), `env.template()` overlays (see [Env overlays](../workflows/env-overlays.md)).
52
+
53
+ ### Concurrency
54
+
55
+ `concurrencyPolicy: 'forbid'` alone is workflow-wide: one in-flight run blocks every other start of that workflow. `concurrencyKey: 'correlationKey'` narrows the guard to runs that share a `correlationKey`:
56
+
57
+ - A start is refused only while a **non-terminal** run of the same workflow carries the **same** `correlationKey`. Starts with different keys run in parallel.
58
+ - Starts with **no** `correlationKey` share one null bucket: a second keyless start is refused while a keyless run is in flight. A keyless start and a keyed start never block each other.
59
+ - `concurrencyKey` requires `concurrencyPolicy: 'forbid'`; otherwise the push is a 400 `VALIDATION_FAILED` (`concurrency-key-requires-forbid`).
60
+
61
+ The refusal is a 409 `RUNS_IN_FLIGHT` whose body carries `blockingRunId`, `blockingStatus`, `concurrencyKey` and the colliding `correlationKey` (absent for the null bucket). `lua workflows start` prints it:
62
+
63
+ ```
64
+ ❌ "outreach" has concurrencyPolicy:'forbid' and run `wfr_0` is in flight for correlationKey "release-agent-42" — wait for it or cancel it: lua workflows cancel wfr_0
65
+ ```
66
+
67
+ For the null bucket it says the in-flight run was started without a `correlationKey` and that `--correlation-key <key>` starts in parallel. A 409 with no key fields (workflow-wide `forbid`) prints the message without the key part. `--json` always carries the full error body. See [Workflows](./Workflows.md#concurrency-per-correlation-key).
52
68
 
53
69
  ### Builder verbs and the placement rule
54
70
 
@@ -14,7 +14,7 @@ Inside a sandbox (tools, jobs, webhooks, workflow code steps) `Workflows` is als
14
14
 
15
15
  - `start` **never awaits execution** — it returns `{ runId, status }` immediately. `waitSeconds` (≤ 55) asks the server to hold the response for early terminal state; it changes the response, never the execution model.
16
16
  - Runs are idempotent on `idempotencyKey` — re-sending the same key returns the existing run instead of a duplicate.
17
- - A workflow with `concurrencyPolicy: 'forbid'` refuses a second start while one is in flight with a thrown `WorkflowApiError { code: 'RUNS_IN_FLIGHT', blockingRunId }` — never a 429, never a gate.
17
+ - A workflow with `concurrencyPolicy: 'forbid'` refuses a second start while one is in flight with a thrown `WorkflowApiError { code: 'RUNS_IN_FLIGHT', blockingRunId }` — never a 429, never a gate. A per-key refusal also carries `concurrencyKey` and the colliding `correlationKey`, and `lua workflows start` prints that key (see [Concurrency](./LuaWorkflow.md#concurrency)).
18
18
  - `status: 'gated'` means the run is parked (quota, billing or consent) and holds no slot. A **consent** gate is cleared by a person resolving its approval — from the desktop, or through the approvals API / inbox. `lua workflows approve` cannot clear one: it requires an `--approval wfa_…` id, which belongs to a workflow `approval` node, and a consent gate has no such id. `lua workflows status <runId>` reports a gated run, and exits 6 under `--strict`.
19
19
  - `nameOrId` resolves the workflow **name on the calling agent first**, then a workflow id.
20
20
  - `get` / `list` honour output visibility: a restricted run comes back with `restricted: true` and no `output` — never an error.
@@ -30,6 +30,7 @@ Inside a sandbox (tools, jobs, webhooks, workflow code steps) `Workflows` is als
30
30
  - Without `concurrencyKey` nothing changes: the guard stays workflow-wide.
31
31
  - `concurrencyKey` requires `concurrencyPolicy: 'forbid'`; otherwise `lua compile` / `lua push` fail with `concurrency-key-requires-forbid`, and a push that reaches the server is a 400 `VALIDATION_FAILED` (`concurrency-key-requires-forbid`). Any value other than `'correlationKey'` also fails the compile.
32
32
  - The refusal is a 409 `RUNS_IN_FLIGHT` whose body carries `blockingRunId`, `blockingStatus`, `concurrencyKey` and the colliding `correlationKey` (absent for the null bucket).
33
+ - `lua workflows start` names the colliding `correlationKey` in its error line (and says so when the in-flight run is the keyless one); the body is unchanged under `--json`.
33
34
  - A scheduled fire that collides on its rendered `correlationKeyTemplate` key records `skipped_overlap`; a fire with a different key dispatches.
34
35
 
35
36
  ## Methods
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lua-cli",
3
- "version": "3.49.0",
3
+ "version": "3.49.1",
4
4
  "description": "Build, test, and deploy AI agents with custom tools, webhooks, and scheduled jobs. Features LuaAgent unified configuration, streaming chat, and batch deployment.",
5
5
  "readmeFilename": "README.md",
6
6
  "main": "dist/api-exports.js",
@@ -115,9 +115,9 @@
115
115
  "ts-node": "^10.9.2",
116
116
  "tsup": "^8.5.1",
117
117
  "@lua/sandbox-runtime": "0.0.1",
118
+ "@lua/shared-sandbox": "0.0.1",
118
119
  "@lua/shared-source-sync": "0.0.1",
119
120
  "@lua/shared-types": "0.0.1",
120
- "@lua/shared-sandbox": "0.0.1",
121
121
  "@lua/workflow-graph": "0.0.1"
122
122
  },
123
123
  "scripts": {
@@ -20,7 +20,7 @@
20
20
  "inquirer": "^12.9.6",
21
21
  "stripe": "^17.5.0",
22
22
  "js-yaml": "^4.1.0",
23
- "lua-cli": "^3.49.0",
23
+ "lua-cli": "^3.49.1",
24
24
  "openai": "^5.23.0",
25
25
  "uuid": "^13.0.0",
26
26
  "zod": "^3.24.1"