lua-cli 3.48.0 → 3.49.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.
@@ -628,7 +628,7 @@ lua decisions [command] [name] [version] [options]
628
628
  $ lua decisions
629
629
  🧭 triage
630
630
  Routes inbound support messages
631
- Current version: 1.0.1
631
+ Current version: 1.0.2
632
632
  Source: from code
633
633
  Created: 10/1/2026, 10:00:00 AM
634
634
 
@@ -643,14 +643,16 @@ Duration: 184ms
643
643
  Tokens: 412
644
644
  Fallback: none
645
645
 
646
- $ lua decisions publish triage 1.0.0 --force
647
- ✅ "triage": 1.0.1 → 1.0.0
646
+ $ lua decisions publish triage 1.0.1 --force
647
+ ✅ "triage": 1.0.2 → 1.0.1
648
648
  Questions removed: team
649
649
  ```
650
650
 
651
- The next `lua version promote` sets each decision to the version that agent version included.
651
+ The first push of a decision writes 1.0.1: like every versioned primitive, a push bumps the version in `lua.skill.yaml` (1.0.0 for a new entry) before it writes.
652
652
 
653
- `publish` on a deleted decision turns it back on. If another decision has taken its name since, the server answers 409 and the command exits 10.
653
+ Promoting a different agent version sets each decision back to what that version pins. Promoting the agent version that is already active changes nothing.
654
+
655
+ `publish` and `versions` also find a deleted decision, and `publish` on a deleted decision turns it back on. If another decision has taken its name since, the server answers 409 and the command exits 10. `list`, `run` and `delete` see only decisions that are on.
654
656
 
655
657
  A failed `run` prints the decision error's own message, so a timeout or a provider outage (both 503) reads as one and exits 11. `lua logs --type decisions` shows the failed call's log row.
656
658
 
package/docs/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # lua-cli v3.47.0
1
+ # lua-cli v3.49.0
2
2
 
3
- Welcome to the comprehensive API documentation for lua-cli v3.47.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.0. 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.47.0
266
+ **Version:** 3.49.0
267
267
  **Last Updated:** October 2026
268
268
 
269
269
  ---
@@ -83,6 +83,8 @@ if (team.type === 'choice' && !team.uncertain) {
83
83
 
84
84
  `defineDecision({...})` takes the same config and is detected the same way.
85
85
 
86
+ The compiler reads each decision from its source, so write it as `new LuaDecision({...})` or `defineDecision({...})` with literal questions, exported under a name. A decision built by a helper function (`export const a = makeDecision('x')`) cannot be read, and listing it in `decisions` fails the compile with an error naming the export. You can list a decision through a named import or a namespace import (`decisions: [shared.triage]`). Two decisions with the same name in one project fail the compile too, and the error names both files.
87
+
86
88
  ## Versions
87
89
 
88
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.
@@ -99,11 +101,15 @@ Each lua-core pod caches the current version. A promote, a publish, a rename or
99
101
 
100
102
  `lua decisions run triage --message 'I want a refund'` runs the current version and prints one line per answer, then the provider, rule, model, duration, tokens and fallback. Pass `--state '<json>'` to decide on structured state instead, and `--provider` or `--min-confidence` to override the version's options for that run.
101
103
 
102
- `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 promote` sets it back to the version that agent version included.
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
+
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.
107
+
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.
103
109
 
104
- `lua decisions delete triage` deactivates the decision after asking and keeps its versions. From then on `Decisions.run('triage', ...)` throws `decision_not_found`. Publishing a version of a deleted decision turns it back on.
110
+ If a decision is deleted or renamed on the server while your code still declares it, the next `lua push` says so in one line and pushes to an active decision with the name in your code, creating it when there is none, and rewrites `lua.skill.yaml`.
105
111
 
106
- `lua version status` lists each decision with the version the active agent version runs and the version in `lua.skill.yaml`.
112
+ `lua version status` lists each decision with the version live on the server, the version the active agent version pins when that differs (`live 1.5.0, agent version pins 2.0.7`, or `deleted`), and the version in `lua.skill.yaml`.
107
113
 
108
114
  ## Errors
109
115
 
@@ -48,7 +48,7 @@ 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'`), `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'`), `workspace?`, `outputVisibility?` (see [Output visibility](../workflows/output-visibility.md)), `env.template()` overlays (see [Env overlays](../workflows/env-overlays.md)).
52
52
 
53
53
  ### Builder verbs and the placement rule
54
54
 
@@ -22,13 +22,13 @@ Inside a sandbox (tools, jobs, webhooks, workflow code steps) `Workflows` is als
22
22
 
23
23
  ## Concurrency per correlation key
24
24
 
25
- `concurrencyPolicy: 'forbid'` alone is workflow-wide: one in-flight run blocks every other start of that workflow. Adding `concurrencyKey: 'correlationKey'` (set on the push API request next to `concurrencyPolicy`; the CLI / SDK declaration follows) narrows the guard to runs that share a `correlationKey`:
25
+ `concurrencyPolicy: 'forbid'` alone is workflow-wide: one in-flight run blocks every other start of that workflow. Adding `concurrencyKey: 'correlationKey'` (declare it as `createWorkflow({ concurrencyPolicy: 'forbid', concurrencyKey: 'correlationKey' })`; `lua push` sends it next to `concurrencyPolicy`, and `lua workflows export` emits it so an export then push round trip keeps the per-key scope) narrows the guard to runs that share a `correlationKey`:
26
26
 
27
27
  - A start is refused only while a **non-terminal** run (`queued`, `running`, `cancellation_requested`, `gated`, `suspended`, `waiting`) of the same workflow carries the **same** `correlationKey`. `completed`, `failed`, `cancelled`, `abandoned` and `timed_out` runs free the key.
28
28
  - Starts with **different** keys run in parallel (for example one release per agent).
29
29
  - 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.
30
30
  - Without `concurrencyKey` nothing changes: the guard stays workflow-wide.
31
- - `concurrencyKey` requires `concurrencyPolicy: 'forbid'`; otherwise the push is a 400 `VALIDATION_FAILED` (`concurrency-key-requires-forbid`).
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
33
  - A scheduled fire that collides on its rendered `correlationKeyTemplate` key records `skipped_overlap`; a fire with a different key dispatches.
34
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lua-cli",
3
- "version": "3.48.0",
3
+ "version": "3.49.0",
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",
119
118
  "@lua/shared-source-sync": "0.0.1",
120
119
  "@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.48.0",
23
+ "lua-cli": "^3.49.0",
24
24
  "openai": "^5.23.0",
25
25
  "uuid": "^13.0.0",
26
26
  "zod": "^3.24.1"