lua-cli 3.32.4 → 3.32.5

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.
@@ -102,10 +102,14 @@ lua compile [options]
102
102
 
103
103
  **Options:**
104
104
 
105
- - `--debug` - Show detailed compilation output
105
+ - `--verbose` - Show detailed progress output
106
+ - `--debug` - Show detailed compilation output (verbose esbuild, temp files kept)
107
+ - `--sync` - Check for drift against the server before compiling (reads only — nothing is written)
106
108
 
107
109
  **Description:**
108
- Compiles TypeScript to JavaScript bundles, validates primitives (tools, skills, webhooks, jobs, processors), and generates manifest.
110
+ Compiles TypeScript to JavaScript bundles, validates primitives (tools, skills, webhooks, jobs, processors, workflows), and generates the manifest.
111
+
112
+ `lua compile` is a **local build**: it reads no credential and makes no API call — with or without a credential configured, nothing is created or changed on the agent. The write is `lua push`: a skill or workflow the agent does not have yet is registered there (the push writes its server id into `lua.skill.yaml`), then the version is uploaded. `lua test`, `lua test workflow` and `lua workflows run` build the same way. (LUA-790 — earlier releases registered every new skill / workflow on the agent during a bare compile whenever a credential was configured.)
109
113
 
110
114
  **Output:**
111
115
 
package/docs/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # lua-cli v3.32.4
1
+ # lua-cli v3.32.5
2
2
 
3
- Welcome to the comprehensive API documentation for lua-cli v3.32.4. This guide covers every API, class, and function exported by the package.
3
+ Welcome to the comprehensive API documentation for lua-cli v3.32.5. This guide covers every API, class, and function exported by the package.
4
4
 
5
5
  ## 📚 Documentation Index
6
6
 
@@ -8,6 +8,10 @@ Per-run: `budget.maxCredits` (over the org's `maxCreditsPerRun` default 250 ⇒
8
8
 
9
9
  `budget.maxCredits` counts agent steps, never tokens. An inline agent step settles a flat **1** credit when it completes; a `tier:'job'` attempt settles a flat **4** at its first claim (a retry is a new attempt; a seat-metered org settles 0 and is metered from the `workflow:job` usage event instead). Before dispatching an agent step the engine checks `remaining = maxCredits − spent − reserved` against the step's reserve (1 inline, 4 Job) and parks the run `suspended{gate.kind:'budget'}` — `nextAction:'raise_budget'`, `lua workflows raise-budget <runId> --credits <n>` — when it is short. So `maxCredits: 40` buys ten Job-tier attempts, and a `maxCredits` under 4 can never dispatch one.
10
10
 
11
+ ### Payment required — the billing gate
12
+
13
+ The run's `maxCredits` is the run's own ceiling; the **workspace's wallet** is a separate gate. When the wallet refuses an agent step's reserve (an inline step's turn, or a Job-tier attempt's reserve — taken **before** any pod is spawned), the run parks `suspended{gate.kind:'billing', code:'insufficient_credits' | 'out_of_actions'}` and the step reads `suspended` (`suspend.kind:'billing'`) on `lua workflows status --steps`. `nextAction` is `top_up`: nothing on the run raises it — top up the workspace (or ask a workspace admin to). The engine re-checks the wallet every few minutes and re-arms the held step on its own; `lua workflows retry-step <runId> --step <stepId>` forces that re-check right away. A run still unpaid after the org's `billingGateExpiryHours` (default 168) fails with `billing_gate_expired`. The inbox card reads "Needs you — payment required" while it waits.
14
+
11
15
  Nothing meters a Job-tier attempt's tokens against the credits while it runs. Each attempt is bounded by its own ceilings: the step wall (`timeoutSeconds`), `maxInputTokens` (input-side tokens — prompt + cache read + cache creation — default **4M**, ≈ $1–13 per attempt on a Sonnet-class model; 1M..500M), `maxMessages` (default 400) and `maxTurns`. Crossing one ends the attempt `attempt_budget_exhausted` from its last checkpoint (see [Long steps and checkpoints](long-steps-and-checkpoints.md)). Size `maxInputTokens` for what one attempt may cost and `maxCredits` for how many attempts the run may make.
12
16
 
13
17
  ## Org pacing
@@ -4,7 +4,7 @@ _Source of truth: workflows-spec 03 §3.9 (WF-204/WF-225/WF-332). This page is t
4
4
 
5
5
  `lua test workflow <name>` (alias `lua workflows run <name>`) drives a compiled workflow **offline**: the same `compilePlan`, predicates and mappings the engine uses, code steps executed in the `lua test` sandbox, agent steps faked by default, waits fast-forwarded on a virtual clock. Exit codes: `0` completed · `2` usage/validation · `4` failed · `5` missing fixture.
6
6
 
7
- **No API call.** The verb compiles first, but that compile skips the server ↔ YAML sync every other `lua compile` performs — nothing is created on the agent and no run exists on the server. Only `lua push workflow` persists a definition; `lua workflows start` creates a run. The exceptions are the flags that ask for the platform: `--from-run <runId>` (reads the seed run) and `--agents live` (calls the dev API for agent steps).
7
+ **No API call.** The verb compiles first, and that compile is local like every `lua compile` (LUA-790) — nothing is created on the agent and no run exists on the server. Only `lua push workflow` persists a definition; `lua workflows start` creates a run. The exceptions are the flags that ask for the platform: `--from-run <runId>` (reads the seed run) and `--agents live` (calls the dev API for agent steps).
8
8
 
9
9
  ## Steering flags — fully scriptable, no stdin
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lua-cli",
3
- "version": "3.32.4",
3
+ "version": "3.32.5",
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",
@@ -114,10 +114,10 @@
114
114
  "ts-node": "^10.9.2",
115
115
  "tsup": "^8.5.1",
116
116
  "@lua/sandbox-runtime": "0.0.1",
117
+ "@lua/shared-source-sync": "0.0.1",
117
118
  "@lua/shared-sandbox": "0.0.1",
118
119
  "@lua/shared-types": "0.0.1",
119
- "@lua/workflow-graph": "0.0.1",
120
- "@lua/shared-source-sync": "0.0.1"
120
+ "@lua/workflow-graph": "0.0.1"
121
121
  },
122
122
  "scripts": {
123
123
  "clean": "rm -rf dist temp",
@@ -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.32.4",
23
+ "lua-cli": "^3.32.5",
24
24
  "openai": "^5.23.0",
25
25
  "uuid": "^13.0.0",
26
26
  "zod": "^3.24.1"