mirror of
https://github.com/superdesigndev/treg.git
synced 2026-10-02 03:24:35 +08:00
Jason's review of the maker page: a script can say its own price, so three pricing modes are one
too many (docs/hub-pricing-decisions.md round 4).
- A steps recipe: "pricing": {"price_usd": N}, a fixed price per successful run. It has no code.
- A script: "pricing": {"max_price_usd": N}, and ctx.charge(usd, note) lines in run.js: a fee,
per result, a margin on ctx.call's cost_usd, a vendor's cost. The caller sees the cap before
the run; the runner holds it and settles the sum of the lines, refunding the rest. No pricing
block: free, and ctx.charge is refused.
- per_result, percent, max_charge_usd and the 2026-09-14 aliases are removed, with _worst_case,
_final_price and hub_units_invalid. The hub is off in production, so no published tool used them.
- Labels read "$0.01 a run" and "up to $0.05 a run". The maker's own runs price the range from
their ctx.charge lines. `treg hub price` sets a recipe's price or a script's cap.
- The six example tools and seven worked recipes move to the new rule; `treg hub init` scaffolds
it; skill.md, llms.txt, USAGE.md, AGENTS.md and the dashboard Price tab say it.
Also: skill.md and llms.txt said data.csv may be 50 MB; the limit in the code is 5 MB.
Tests: the pricing tests are rewritten for the two rules, plus a price edit on a script.
Updates docs/context/architecture/hub.md.