Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# dependencies
node_modules/

# build
dist/
*.tsbuildinfo
.DS_Store

# logs
*.log

# editor and OS
.DS_Store
Thumbs.db
.idea/
.vscode/
*.swp
2 changes: 1 addition & 1 deletion src/commands/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const runLoginAction = async (options: LoginCommandOptions): Promise<void> => {
/**
* `genshot login` — store a `gsk_` API key for this machine.
*
* Default path (ADR-0025): browser Google OAuth via a device-code flow. The CLI
* Default path: browser Google OAuth via a device-code flow. The CLI
* opens a verification URL, the user finishes Google sign-in, and the CLI polls
* until a one-time key is ready.
*
Expand Down
4 changes: 2 additions & 2 deletions vendor/shared/billing/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const BillingPricingResponse = Schema.Struct({
default: () => CENTS_PER_CREDIT,
}).annotations({
description:
'List price in USD cents for one credit / one successful image from D1 runtime state (ADR-0028)',
'List price in USD cents for one credit / one successful image from D1 runtime state',
}),
pwywMinCents: Schema.optionalWith(Schema.Int.pipe(Schema.greaterThan(0)), {
default: () => Math.max(LEMON_PWYW_PLATFORM_MIN_CENTS, CENTS_PER_CREDIT),
Expand All @@ -140,7 +140,7 @@ export const BillingPricingResponse = Schema.Struct({
costMultiplier: Schema.optionalWith(Schema.Number.pipe(Schema.greaterThan(0)), {
default: () => COST_PRICE_MULTIPLIER,
}).annotations({
description: 'ADR-0026 measured-cost to list multiplier applied when remeasuring packs',
description: 'Measured-cost to list multiplier applied when remeasuring packs',
}),
pricingSource: Schema.optionalWith(Schema.Literal('seed', 'd1_remeasure', 'manual', 'unknown'), {
default: () => 'seed' as const,
Expand Down
10 changes: 5 additions & 5 deletions vendor/shared/billing/pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* buys one successfully generated image. Price per image is flat; pack sizes
* amortize checkout fees rather than offering a volume discount.
*
* **List price (ADR-0026 + ADR-0028):** target = measured average cost per
* **List price:** target = measured average cost per
* successful image × {@link COST_PRICE_MULTIPLIER}. Compile-time
* {@link CREDIT_PACKS} / {@link CENTS_PER_CREDIT} are the **seed** defaults.
* The worker’s D1 `billing_pricing_state.cents_per_credit` is the runtime SSOT
Expand Down Expand Up @@ -57,7 +57,7 @@ export const CREDIT_PACKS = {
} as const;

/**
* Seed list cents per credit / successful image (ADR-0026). Used when D1 has no
* Seed list cents per credit / successful image. Used when D1 has no
* pricing row yet. Fixed pack seed amounts are `credits × CENTS_PER_CREDIT`.
*/
export const CENTS_PER_CREDIT =
Expand All @@ -70,7 +70,7 @@ export const SEED_MEASURED_AVG_COST_CENTS = 19;
export const DYNAMIC_CREDIT_PACK_ID = 'image_credits_custom' as const;

/**
* Margin multiplier over measured provider cost (ADR-0026). List price target is
* Margin multiplier over measured provider cost. List price target is
* `round(costCents × COST_PRICE_MULTIPLIER)`, not the older ×3 floor story.
*/
export const COST_PRICE_MULTIPLIER = 1.5;
Expand Down Expand Up @@ -117,7 +117,7 @@ export const creditsFromPaidAmountCents = (
};

/**
* Convert measured per-image provider cost (integer USD cents) into the ADR-0026
* Convert measured per-image provider cost (integer USD cents) into the
* list-price target in cents: `round(cost × 1.5)`.
*
* @param costCents - Measured average cost per successful image, in USD cents.
Expand Down Expand Up @@ -186,7 +186,7 @@ export type RemeasureDecision =

/**
* Pure remeasure gate: avg provider cost → list cents; apply only when sample
* count and absolute delta thresholds pass (ADR-0028).
* count and absolute delta thresholds pass.
*
* @param input - Aggregate cost stats and current runtime cents.
* @returns Apply with next cents, or skip with a machine reason.
Expand Down
Loading