Expand description
Sellable-addon commerce model (Track B — generalising the ctxpkg paid artifact to addons).
Context packs are already sellable (price metadata + Stripe checkout + 402 download gating + verified publisher, GL #529/#516). This module generalises the artifact-side model to addons:
AddonPricing— optional[pricing]an addon carries (one-time or usage-metered). Absent ⇒ free.paid_listing_gate— the mandatory security gate before money: an addon may only be listed/sold once it clears the P3 capability audit (super::audit::AuditReport::paid_eligible) and is a verified-publisher entry. This is the in-repo half of the plan’s “Security-Gate = Pflicht vor Paid”; the payment execution (Stripe checkout, 402 gating, Connect payouts — GL #532) reuses the existing ctxpkg billing rails, generalised toartifact_type = addonin the billing service.usage_charge_cents— turns the P5 per-addon usage meter into a billable amount for usage-metered pricing.
Pure + deterministic (#498): the same gate result for the same manifest, so the CLI preview, the registry validator and a future publish endpoint agree.
Structs§
- Addon
Pricing [pricing]— optional commerce metadata for a sellable addon.- Paid
Gate - Outcome of the paid-listing gate: eligibility + the concrete blockers.
Enums§
- Pricing
Model - How a paid addon is billed.
Functions§
- paid_
listing_ gate - The mandatory security gate before an addon may be listed or sold for
money (the plan’s gate before paid; depends on the P3 audit + #516 verified
publisher). A free addon (no
[pricing], or zero price) is always eligible — the gate only governs paid artifacts. - usage_
charge_ cents - The billable amount in cents for
callstool calls under usage pricing, prorated from the per-1k rate.0for non-usage pricing.