plans:margin
plans family
What each plan earned ONE against its floor: per plan, the credits granted, the credits billed, the model cost from gateway_calls.cost_usd and the margin as a percent of that provider cost against platform_floor_pct. Reads a window (24h, 7d, 30d, 90d, mtd, all) that never reaches back past the live rate (2026-09-27). Margin is read on billed charges that have a priced model call; unpriced calls, billed charges with no call and unbilled calls are counted per plan and make the margin a bound (bound: true), never a fact. A plan with no subscribed group says cohort no_paying_cohort_yet. Test money, transfers, unlimited groups and our own groups are left out. Platform owners only: per-plan cost across every tenant is ONE's books (text/billing.md promise 9)
- Effect
- ask
- Awaits an outcome — the call returns the response below.
- Caller
- manage_workspace
- The class of authority the caller must already hold, decided from the attested context with no round trip.
- Authority action
- read_revenue
- Also gated per node — the caller must be permitted this action over the workspace it names.
- Cost
- free
- What one call costs, so you can budget before acting.
- Reversible
- yes
- The effect can be undone by a later call.
- Idempotent
- yes
- Safe to retry as-is.
- Version
- 1.0.0
- Pin this to keep a contract stable; additive bumps never break callers.