@revturbine/cli 0.21.3 → 0.21.4

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.
Files changed (2) hide show
  1. package/dist/cli.js +34 -6
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -29285,12 +29285,19 @@ var AnalyticsGateSettingsAppliedSchema = z8.discriminatedUnion("status", [
29285
29285
  analytics_min_sample: TenantConfigSchema.shape.analytics_min_sample.unwrap().meta(Unrestricted5)
29286
29286
  })
29287
29287
  }),
29288
- z8.strictObject({ status: z8.literal("not_applied") })
29288
+ z8.strictObject({ status: z8.literal("not_applied") }),
29289
+ // BL-0498: the Gates outcome carrier applies the approved snapshot; these are the values it actually used.
29290
+ z8.strictObject({
29291
+ status: z8.literal("approved"),
29292
+ policy: z8.literal(APPROVED_GATE_SETTINGS_POLICY),
29293
+ carrier: z8.literal("gate_outcomes"),
29294
+ values: AnalyticsGateSettingsValuesSchema
29295
+ })
29289
29296
  ]).meta(meta2("AnalyticsGateSettingsApplied"));
29290
- var AnalyticsGateSettingsTargetSchema = z8.strictObject({
29291
- status: z8.literal("unavailable").meta(Unrestricted5),
29292
- prerequisite: z8.literal("BL-0497").meta(Unrestricted5)
29293
- }).meta(meta2("AnalyticsGateSettingsTarget"));
29297
+ var AnalyticsGateSettingsTargetSchema = z8.discriminatedUnion("status", [
29298
+ z8.strictObject({ status: z8.literal("unavailable").meta(Unrestricted5), prerequisite: z8.literal("BL-0498").meta(Unrestricted5) }),
29299
+ z8.strictObject({ status: z8.literal("available").meta(Unrestricted5), carrier: z8.literal("gate_outcomes").meta(Unrestricted5) })
29300
+ ]).meta(meta2("AnalyticsGateSettingsTarget"));
29294
29301
  var AnalyticsGateSettingsMetaSchema = z8.strictObject({
29295
29302
  /** Configured identity only. Tenant scoping/hash custody is verified by the
29296
29303
  * serving context, which this context-free schema cannot establish. */
@@ -39817,6 +39824,12 @@ var METRIC_SEMANTICS = {
39817
39824
  "entitlement.touched_accounts": daily30(NOT_MONETARY),
39818
39825
  "entitlement.decision_accounts": daily30(NOT_MONETARY),
39819
39826
  "entitlement.unclassified_exposures": daily30(NOT_MONETARY),
39827
+ // BL-0498: the Gates outcomes are read as of a declared instant over the gate's own touch window (default 28-84 days
39828
+ // before it, the approved tenant settings); the result declares that window, never the page period.
39829
+ "entitlement.outcome_share": asOfDay(NOT_MONETARY),
39830
+ "entitlement.baseline_share": asOfDay(NOT_MONETARY),
39831
+ "entitlement.verdict": asOfDay(NOT_MONETARY),
39832
+ "entitlement.mature_touched_accounts": asOfDay(NOT_MONETARY),
39820
39833
  "event.accounts": daily30(NOT_MONETARY),
39821
39834
  "event.count": daily30(NOT_MONETARY),
39822
39835
  "event.dwell_ms": daily30(NOT_MONETARY),
@@ -40688,6 +40701,10 @@ var placementCheckoutStartedAccountsMetric = { id: "placement.checkout_started_a
40688
40701
  var entitlementTouchedAccountsMetric = { id: "entitlement.touched_accounts", label: "Gate-stamped exposures (attribution)", value_type: "number", source_scope: "revturbine_tracked", statistical_type: "count", direction: "neutral", preferred_analysis_unit: "account", layer: "primitive", catalog_status: "tested", derivation: { carried_by: ["gate_table"], input_origin: "platform", ingested_events: [], ingested_datasources: ["placement_presentations"], note: `Real accounts with a gate-stamped exposure: a presented row the SDK stamped trigger_source = 'gate' (gate_table.exposure_touched_accounts, deduped on exposure_id). SEMANTIC CHANGE (ST-912): it used to count any gate decision; that is entitlement.decision_accounts (telemetry). Unstamped exposures are entitlement.unclassified_exposures, never inferred. ${GATE_TABLE_TESTED_NOTE}` } };
40689
40702
  var entitlementDecisionAccountsMetric = { id: "entitlement.decision_accounts", label: "Gate decisions (telemetry)", value_type: "number", source_scope: "revturbine_tracked", statistical_type: "count", direction: "neutral", preferred_analysis_unit: "account", layer: "primitive", catalog_status: "tested", derivation: { carried_by: ["gate_table"], input_origin: "platform", ingested_events: ["gate_evaluated", "gate_attempted", "gate_allowed", "gate_denied"], ingested_datasources: ["gate_event_fields"], note: `Telemetry: real accounts with any gate decision event (gate_table.touched_accounts; touch_rule applies here only), an allowed one included. Never an attribution touch: that is a gate-stamped exposure, entitlement.touched_accounts (ST-912). ${GATE_TABLE_TESTED_NOTE}` } };
40690
40703
  var entitlementUnclassifiedExposuresMetric = { id: "entitlement.unclassified_exposures", label: "Unclassified exposures", value_type: "number", source_scope: "revturbine_tracked", statistical_type: "count", direction: "neutral", preferred_analysis_unit: "account", layer: "primitive", catalog_status: "tested", derivation: { carried_by: ["gate_table"], input_origin: "platform", ingested_events: [], ingested_datasources: ["placement_presentations"], note: `Disclosure: distinct presented exposures with no trigger_source stamp (an older SDK, or a slot not requested through a gate); gate_table.unclassified_exposures, the same value on every row. Placement touches only, never assigned to a gate or inferred from configuration. ${GATE_TABLE_TESTED_NOTE}` } };
40704
+ var entitlementOutcomeShareMetric = { id: "entitlement.outcome_share", label: "Gate outcome share", description: `Share of a gate's mature touched accounts in one outcome (Bought, No change, Left, went quiet or downgraded), served one row per gate, pool (paying, not paying, overall) and outcome. The shares partition the mature touched accounts of the pool; a share below the minimum sample is null ("not enough data yet"); shares never sum across gates.`, value_type: "percent", format: { type: "percent", decimals: 1 }, source_scope: "revturbine_influenced", statistical_type: "binary", direction: "neutral", aggregation_semantics: "non_additive", preferred_analysis_unit: "account", layer: "derived", catalog_status: "tested", derivation: { carried_by: ["gate_outcomes"], input_origin: "mixed", ingested_events: [], ingested_datasources: ["placement_presentations", "events_clickstream", "attribution_credits", "mrr_movements_daily", "mrr_daily"], note: "Served by the gate_outcomes block (BL-0498), classified by deriveGateOutcomes over gate_exposure_touches, account_active_days and Neon credits, movements and MRR. Touch: a gate-stamped exposure in [max(activation, T-84d), T-28d). Mature: the follow-up (and, if not Bought or churned, the quiet interval) has elapsed before the as-of. Precedence: Bought (a live positive gate-lane credit inside the follow-up), then Left (account churn, or a complete quiet interval), then No change. Window and horizons come from the approved tenant settings, declared on the result." } };
40705
+ var entitlementBaselineShareMetric = { id: "entitlement.baseline_share", label: "Gate baseline outcome share", description: "Share of the same-pool no-touch baseline in one outcome (Bought, No change, Left), followed from the touch-window end for the gate follow-up. The baseline is the same-pool accounts with tracked activity in the touch window and no gate-stamped exposure of this gate in [T-84d, T). The common window-end anchor is an approximation to the touched accounts' individual anchors, disclosed on the result.", value_type: "percent", format: { type: "percent", decimals: 1 }, source_scope: "revturbine_influenced", statistical_type: "binary", direction: "neutral", aggregation_semantics: "non_additive", preferred_analysis_unit: "account", layer: "derived", catalog_status: "tested", derivation: { carried_by: ["gate_outcomes"], input_origin: "mixed", ingested_events: [], ingested_datasources: ["placement_presentations", "events_clickstream", "mrr_movements_daily", "mrr_daily"], note: "Served by the gate_outcomes block (BL-0498), classified by deriveGateOutcomes with the same rules as the touched accounts, without the credit requirement: Bought is any positive movement (new, expansion, reactivation) in the follow-up. The minimum sample applies to the baseline denominator separately; pool membership is read at the window-end day." } };
40706
+ var entitlementVerdictMetric = { id: "entitlement.verdict", label: "Gate verdict", description: "Working, Working but costly, Hurting, Within expected range, or Not enough data yet, per gate and pool, from the mature touched shares against the pool baseline. Bought is high at a share of at least 5%, or at least 1.3 times the baseline and two points above it; Left is high at least 1.3 times the baseline and five points above it. The headline is the majority pool; a tie is shown as a tie. An observational comparison, not proof of cause.", value_type: "string", source_scope: "revturbine_influenced", statistical_type: "binary", direction: "neutral", preferred_analysis_unit: "account", layer: "derived", catalog_status: "tested", derivation: { carried_by: ["gate_outcomes"], input_origin: "mixed", ingested_events: [], ingested_datasources: ["placement_presentations", "events_clickstream", "attribution_credits", "mrr_movements_daily", "mrr_daily"], note: 'gateVerdictOf over entitlement.outcome_share and entitlement.baseline_share (BL-0498). The thresholds are named oracle constants (GATE_VERDICT_THRESHOLDS), not Playbook or tenant settings. Insufficient mature samples in the touched or the baseline population produce "Not enough data yet".' } };
40707
+ var entitlementMatureTouchedAccountsMetric = { id: "entitlement.mature_touched_accounts", label: "Mature gate-stamped exposures", description: "Accounts with a gate-stamped placement exposure in the gate's touch window whose full follow-up has elapsed: the denominator of entitlement.outcome_share, per gate and pool. Accounts not yet mature are reported separately and never classified.", value_type: "number", source_scope: "revturbine_tracked", statistical_type: "count", direction: "neutral", aggregation_semantics: "non_additive", preferred_analysis_unit: "account", layer: "derived", catalog_status: "tested", derivation: { carried_by: ["gate_outcomes"], input_origin: "mixed", ingested_events: [], ingested_datasources: ["placement_presentations", "events_clickstream", "mrr_daily"], note: "Served by the gate_outcomes block (BL-0498). Counts do not add across gates: one account may touch several gates. The pool is read from mrr_daily at the account's touch day (sum of mrr_minor_units > 0)." } };
40691
40708
  var coverageManagedShareMetric = { id: "coverage.managed_share", label: "Managed MRR share", value_type: "percent", format: { type: "percent", decimals: 1 }, source_scope: "total", statistical_type: "continuous", direction: "increase", preferred_analysis_unit: "account", layer: "derived", catalog_status: "unavailable", derivation: { carried_by: [], input_origin: "none", ingested_events: [], note: "retired by Kent 2026-10-30 (ST-1398 Q-1): the V1 stock it was computed on was never correct" } };
40692
40709
  var revenueNewManagedRevenueMetric = { id: "revenue.new_managed_revenue", label: "New managed revenue", value_type: "currency", source_scope: "total", statistical_type: "revenue", direction: "increase", preferred_analysis_unit: "account", layer: "derived", catalog_status: "unavailable", derivation: { carried_by: [], input_origin: "none", ingested_events: [], note: "retired by Kent 2026-10-30 (ST-1398 Q-1): the V1 stock it was computed on was never correct" } };
40693
40710
  var eventCountMetric = { id: "event.count", label: "Event count", value_type: "number", statistical_type: "count", direction: "neutral", preferred_analysis_unit: "account", layer: "primitive", catalog_status: "tested", derivation: { carried_by: ["analytics_customer_event_timeseries", "analytics_customer_event_breakdown", "analytics_customer_timeline"], input_origin: "mixed", ingested_events: [], ingested_datasources: ["events_clickstream"], note: "Counts whatever is on the stream \u2014 platform events and customer track() names alike \u2014 so it is the one metric that never goes dark." } };
@@ -41198,6 +41215,11 @@ var monetizationEntitlementDecisionConcept = {
41198
41215
  // and the disclosure of exposures no SDK stamp classified.
41199
41216
  "entitlement.decision_accounts",
41200
41217
  "entitlement.unclassified_exposures",
41218
+ // BL-0498: the Gates view outcomes, served by the gate_outcomes block.
41219
+ "entitlement.mature_touched_accounts",
41220
+ "entitlement.outcome_share",
41221
+ "entitlement.baseline_share",
41222
+ "entitlement.verdict",
41201
41223
  "entitlement.ctr"
41202
41224
  ],
41203
41225
  query_families: ["scalar", "timeseries", "breakdown", "funnel", "table"],
@@ -41253,6 +41275,8 @@ var monetizationEntitlementDecisionConcept = {
41253
41275
  { kind: "datasource", ref: "gate_event_fields", note: "Plan 282 TASK-13: gate_evaluated, gate_attempted, gate_allowed and gate_denied lifted from events_clickstream (entitlement_handle, outcome, limit, used, decision_id); gate_table reads the touches here." },
41254
41276
  { kind: "datasource", ref: "events_clickstream", note: "SDK telemetry." },
41255
41277
  { kind: "build", ref: "exposure_breakdown" },
41278
+ { kind: "build", ref: "gate_exposure_touches", note: "BL-0498: the gate-stamped exposures per (gate, account, user) with the last exposure instant, read by the Gates outcome block." },
41279
+ { kind: "build", ref: "account_active_days", note: "BL-0498: per real account, the UTC dates with clickstream activity (the baseline population and the quiet interval)." },
41256
41280
  { kind: "build", ref: "gate_table", note: "The retained per-gate table: gate decisions (telemetry), gate-stamped exposures (attribution), the unclassified-exposure disclosure and presentation CTR." }
41257
41281
  ],
41258
41282
  oracle_family: { family: "presentation" },
@@ -42065,6 +42089,10 @@ var AUTHORED_METRIC_ENTRIES = [
42065
42089
  entitlementTouchedAccountsMetric,
42066
42090
  entitlementDecisionAccountsMetric,
42067
42091
  entitlementUnclassifiedExposuresMetric,
42092
+ entitlementOutcomeShareMetric,
42093
+ entitlementBaselineShareMetric,
42094
+ entitlementVerdictMetric,
42095
+ entitlementMatureTouchedAccountsMetric,
42068
42096
  coverageManagedShareMetric,
42069
42097
  revenueNewManagedRevenueMetric,
42070
42098
  eventCountMetric,
@@ -53093,7 +53121,7 @@ function formatFieldPath(path3) {
53093
53121
  }
53094
53122
 
53095
53123
  // src/schema/version.ts
53096
- var SCHEMA_VERSION = "0.1.545";
53124
+ var SCHEMA_VERSION = "0.1.546";
53097
53125
 
53098
53126
  // src/lib/credentials.ts
53099
53127
  import { chmodSync, existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revturbine/cli",
3
- "version": "0.21.3",
3
+ "version": "0.21.4",
4
4
  "description": "revturbine — validate RevTurbine Playbooks and ship them to a RevTurbine instance through the playbook-version lifecycle (draft → Release).",
5
5
  "license": "MIT",
6
6
  "repository": {