feat(plugin): 1.4.0 — Job-tier billing is per model reply; lua-cli 3.37.0 cost read-outs (requires lua-cli 3.37.0, publishing today) - #13
Merged
Conversation
lua-stefan-kruger
force-pushed
the
feat/knowledge-job-billing
branch
from
September 20, 2026 14:25
324aa88 to
6dcb9f3
Compare
…a-cli 3.37.0 cost read-outs The plugin described a Job-tier attempt as a flat 4 credits and every run budget in "credits". Both are wrong for a priced run. Verified against lua-core-services main ebcf6689c (the lua-cli 3.37.0 release) — the CLI renderers, the wire shapes, lua-api's deploy advisory, the Job model legs and labels in shared-types and lua-core's Job rate module — never the docs. The rule (platform behaviour, true on every CLI, so NOT marked with a version gate): a Job step is billed per model REPLY, not per attempt — one credit per reply on a legacy plan, actions (price band × the model's multiplier per model call, cached prompt tokens at the fraction the provider charges) on a seat plan. The flat "1 credit / 4 credits" rule is kept, scoped to a run the platform is still metering flat, which is what `status` prints verbatim for such a run. A Job step runs on its own `model`, failing that the platform's Job default, failing that the org's — never the agent's — so leaving it off is a cost decision. `raise-budget --credits <n>` keeps its flag name on both plans but `<n>` is a cap in the run's own unit. The read-outs (marked ⏳ 3.37.0 and described as printed only when the server projects them): the `Tokens:` line and the Uncached/Cached/Output step columns (signals, not charges — never summed: a cache read is a subset of input), the ⚙ Job-model line, the engine-aware budget sentence and `finished past the cap`, the three budget events in `workflows logs`, the unit-aware `raise-budget` confirmation and the `job-model-default` deploy advisory. lua-cli 3.37.0 adds NO command and NO option — its only command-definitions change is the `--credits` help string — so every shape the plugin emits still runs on 3.36.0 and only prints less. `PINNED_MIN_LUA_CLI` moves to 3.37.0 because the subagents now read that output. `lint-pinned-version` is therefore red by design until 3.37.0 is on npm; it was not weakened. No permission rule, hook, tokenizer or lint verb list changed, because no command surface did. Audit: lua-docs-v2-plan/plan-job-billing/reviews/plugin-audit-2026-09-20.md Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lua-stefan-kruger
force-pushed
the
feat/knowledge-job-billing
branch
from
September 20, 2026 14:27
6dcb9f3 to
2dca5ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
⛔ Merge blocker: requires lua-cli 3.37.0 (publishing today)
PINNED_MIN_LUA_CLIis raised to 3.37.0, which is cut (ebcf6689c, release PR #3095) but not yet on npm — the publish follows today's production E2E.scripts/lint-pinned-version.mjscompares the pin with npm'sdist-tags.latestand is therefore red by design until then; it was not weakened. Merge after the npm publish: verifynpm view lua-cli version= 3.37.0 → re-runnpm run lint(18/18 green) → squash-merge.What this fixes
The plugin told agents a Job-tier attempt costs a flat 4 credits and that every run budget is counted in credits. Both are wrong for a priced run.
The billing rule — platform behaviour, already true in production on 3.36.0 and on every older CLI, so it carries no version marker (marking it ⏳ 3.37.0 would say a Job attempt costs 4 credits until you upgrade your CLI, which is the defect):
lua workflows statusstill prints for such a run.model, failing that the platform's Job default, failing that the organization's. Every reply bills at that model's multiplier, so leavingmodeloff a Job step is a cost decision.lua workflows raise-budget <runId> --credits <n>keeps its flag name on both plans, but<n>is a cap in the run's OWN unit (actions on a seat plan).The lua-cli 3.37.0 read-outs — marked ⏳ 3.37.0 and described as "printed only when the server projects it", so a missing line reads as "nobody reported", never as a defect:
status: theTokens:line (run-level), theUncached/Cached/Outputstep columns (—, never0), the⚙Job-model line (model · ×multiplier · chosen by leg), the engine-awareBudget:sentence andfinished past the cap.lua workflows logs:step.job_model_resolvedplus the three budget events (run.budget_parked/_raised/_exceeded), which below 3.37.0 it printed not at all; the unit inside them is the gate's own word, quoted verbatim.lua workflows deploy: thejob-model-defaultadvisory (⚠ <message>, advisory only, the deploy still succeeds), beside the olderjob-tier-not-enabled.raise-budgetnames the unit it raised; a seat run parked before its first priced call no longer reads the legacy sentence.Why the pin moves, when no shape changed
lua-cli 3.37.0's entire
src/cli/command-definitions.tsdiff is the--creditshelp string — no new command, no new option, no alias change — so every shape the plugin emits runs byte-identically on 3.36.0. The pin moves because the plugin's subagents now read output only 3.37.0 prints. Consequently nothing changed inlib/permissions-template.json,hooks/hooks.json, any other hook,lib/tokenizer.mjs,scripts/lint-knowledge-commands.mjs,scripts/lint-cli-flags.mjsortest/**— editing those would have meant a verb had been invented.Also recorded, so the next pass does not "fix" them:
budget.unit,budget.reservedandusage.engineare not new in 3.37.0 (3.36.0 already sent them;reservedhas no printed line at all), and the consent ladder's "≤ 20 credits" is a scoring quantity, not the run's billing unit — deliberately left in credits.Changed
Knowledge
workflows.md(§2 new "Reading what a run cost", §4 metering / Job model / limits, §7, §8),cli-reference.md,decision-trees.md,primitives.md(§11, §12, gotcha 35); commandslua-workflow,lua-logs,lua-status,lua-deploy,lua-push,lua-init,lua-update,lua-doctor; agentslua-architect,lua-debug,lua-deploy-pilot,lua-qa,lua-skill-builder;docs/USER_GUIDE.md(loop step 8, a troubleshooting bullet, an FAQ entry), both READMEs,CHANGELOG.md1.4.0;hooks/check-lua-version.mjspin 3.36.0 → 3.37.0; version 1.3.0 → 1.4.0 everywhere withmcp/lua-platform/dist/server.jsrebuilt.Checks (what CI runs)
npm run lint—lint-pinned-version✗ by design (pin 3.37.0 > npm latest 3.36.0). Every other check run individually: all green, including✓ Knowledge files: 819 lua … reference(s) check out against command-definitions.ts(againstebcf6689c) and✓ Release version 1.4.0 is consistent.npm test -- --coverage→ 18 suites / 428 tests passed;check-coverage.mjs✓.check-bundle-size.mjs✓ (0.10 MB).Full audit (claim → source anchor → verdict, 27 rows):
lua-docs-v2-plan/plan-job-billing/reviews/plugin-audit-2026-09-20.md.🤖 Generated with Claude Code