Repository navigation
feat(cli): create --currency and --usd-rate seed what the app bills in - #440
Merged
Merged
Conversation
Every item ships messages/mn/<item>.json beside its English file. An architecture test holds each translation to the English keys and ICU arguments (a plural branch's body is text, not an argument), so a key added in English fails until it is translated. intelligo sync merges a shipped translation like English: untouched values take the new text, reworded ones are kept. intelligo create --locales en,mn routes those locales, the first as the default, through __LOCALES__ and __DEFAULT_LOCALE__ in the scaffold's i18n/routing.ts. substitute() fills both with English when a recorded app has no value, so an app made before the flag re-generates to the same file. app-scaffold template 1.24.0.
The composition root's ensureBillingSettingsRow call takes the currency and its rate per USD from __CURRENCY__ and __USD_RATE_MICROS__. The row is seeded once, so the choice belongs before the first boot, where the scaffold put USD unasked. A currency other than USD without a rate is refused, as is a code that is not ISO 4217, before any question is asked. Without the flags the call renders as before, USD at 1, so an existing app re-generates to the same file. app-scaffold template 1.25.0.
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
intelligo-web | 53ea247 | Commit Preview URL Branch Preview URL |
Oct 25 2026, 04:18 PM |
# Conflicts: # CHANGELOG.md # apps/app/intelligo.manifest.json # apps/website/src/data/proof.json # packages/cli/src/__tests__/template-versions.json # packages/cli/templates/manifest.json
…at/create-currency # Conflicts: # CHANGELOG.md # apps/app/intelligo.manifest.json # apps/website/src/data/proof.json # packages/cli/src/__tests__/template-versions.json # packages/cli/templates/manifest.json
…nsport (#436) mastraStreamTurn({ agent, maxSteps, memory, streamOptions }) is a streamTurn that runs a turn with agent.stream and renders it through @mastra/ai-sdk, so auth, admission, persistence and settlement stay the transport's. Usage settles from every finished step, summed from onStepFinish: Mastra's totalUsage rejects on a stopped or failed run, and never settles when the reader cancels, which left the turn waiting or settled at zero. memory: true scopes Mastra memory to the conversation under the workspace and the user and sends only the new message, as Mastra's chat route does. The chat item's server config now points at the item instead of a hand-written binding. Pinned against a real Mastra agent on a mock model: a two-step tool loop settles both steps, a stopped turn settles the finished one, a turn that spent nothing fails, and the binding's own options win over streamOptions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The scaffold's composition root always seeded
currency: "USD", usdRateMicros: 1_000_000, and the row is seeded once. A product that sells in another currency had to know to editlib/intelligo.tsbefore the dev server first started. Nothing said so until it was too late, and the ledger was then in USD.intelligo create my-app --currency MNT --usd-rate 3450writescurrency: "MNT", usdRateMicros: 3_450_000_000into theensureBillingSettingsRowcall. The values reach the template through__CURRENCY__/__USD_RATE_MICROS__.--usd-rate, a non-positive rate, a code that is not ISO 4217, or USD with a rate other than 1 is refused before any question is asked.substitute()'s defaults. An existing app re-generates to a byte-identical file, andapps/app/lib/intelligo.tsis unchanged.Stacked on #439, which adds the default-variable mechanism; it retargets to
mainonce that merges.doctordoes not check the currency. The choice lives in the composition root, which doctor does not read, and the database row is authoritative once seeded. A check would have to guess intent, so it was left out.Review
.github/CODEOWNERS); the review-window check holds it for 24 hours after it is first seen as high-riskRead line by line:
packages/cli/src/commands/create.ts(currencyVariables) andcreate-flow.ts(flag parsing). Changed assertion:template-versions.jsonpins 1.25.0.Checklist
tests/architecture/for a boundary change)pnpm type-check && pnpm lint && pnpm testpass locallyCHANGELOG.mdentry under[Unreleased]for anything a consumer noticespackages/registry/base/instead)