@drawbridge/drawbridge-agents 0.1.28 → 0.1.30
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.
|
@@ -68,13 +68,20 @@ skill) so it stops living only in tribal memory.
|
|
|
68
68
|
after it produced five distinct defects, ending in a 60-second line-window overlap that billed
|
|
69
69
|
one correctly-delivered event twice. Do not reintroduce meter events, and do not "fix" a billing
|
|
70
70
|
discrepancy by reporting usage to Stripe — corrections are `billing.trueup` ledger rows.
|
|
71
|
-
- **`
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
`
|
|
71
|
+
- **`subscription.overrides` is the single home for sold/negotiated terms** —
|
|
72
|
+
`{ actions : { limit, overages }, conversion }`. `overrides.actions` is ALWAYS stamped at sale by
|
|
73
|
+
drawbridge-stripe (≥0.1.46) and re-stamped on plan change; `overrides.conversion` exists only when
|
|
74
|
+
an admin overrides the plan default, and api carries it onto the new document across plan changes.
|
|
75
|
+
Resolution is PER FIELD: `overrides.actions.X` → legacy `items.actions.X` (transitional) →
|
|
76
|
+
plans.js; conversion resolves ONLY through `conversionRate()` in utils (`overrides.conversion` →
|
|
77
|
+
legacy top-level `conversion` → plan → free; `??` throughout, 0 is a valid override). `overages`
|
|
78
|
+
is a NUMBER in cents per action — the string `'2.5'` shape exists only at the Stripe
|
|
79
|
+
`unit_amount_decimal` boundary. Deleting a key restores plan flow, which is why the admin PUT
|
|
80
|
+
unsets the legacy keys it supersedes. plans.js is the default for NEW sales only; repricing
|
|
81
|
+
existing customers is `repriceActionsSnapshot` (explicit, dry-runnable — and it overwrites
|
|
82
|
+
admin-negotiated actions values, so read the dry run). The legacy keys are copy-only until the
|
|
83
|
+
overrides cleanup release, and sync (reader) deploys before stripe (writer) on any shape change.
|
|
84
|
+
Detail: drawbridge-docs `reference/billing.md`.
|
|
78
85
|
- **No Stripe product backs actions (≥0.1.45).** Invoice items carry
|
|
79
86
|
currency/quantity/unit_amount_decimal/tax_behavior/description directly; the account keeps exactly
|
|
80
87
|
one product — the plan product behind `STRIPE_PRICE_*`. Never reintroduce a product-presence guard
|
package/package.json
CHANGED