@ultimat3/cli 31.45.0 → 31.47.0
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.
- package/CLAUDE.md +1 -1
- package/README.md +1 -1
- package/package.json +29 -29
- package/src/affected.ts +3 -2
- package/src/app-config-load.ts +8 -5
- package/src/app-mcp.ts +2 -5
- package/src/app-runtime.ts +4 -4
- package/src/cmd-cache.ts +8 -4
- package/src/cmd-deploy-compose.ts +11 -12
- package/src/cmd-deploy-helm.ts +5 -8
- package/src/cmd-exercise-spec.ts +2 -2
- package/src/cmd-exercise.ts +7 -19
- package/src/cmd-new.ts +4 -3
- package/src/cmd-planned.ts +11 -76
- package/src/cmd-shot-matrix.ts +3 -2
- package/src/cmd-token.ts +11 -3
- package/src/codemods/ci-weekly-schedule.ts +61 -0
- package/src/codemods/index.ts +2 -0
- package/src/codemods/vendored-guards.ts +3 -5
- package/src/codemods/verify-floor-skips.ts +4 -6
- package/src/codemods/verify-floor-steps.ts +4 -3
- package/src/db-seed.ts +3 -2
- package/src/dispatch.ts +2 -11
- package/src/duplicate-packages.ts +4 -4
- package/src/exercise-findings.ts +4 -3
- package/src/exercise-floor.ts +1 -1
- package/src/exercise-seed.ts +34 -0
- package/src/fix-command.ts +2 -3
- package/src/flag-reads.ts +6 -3
- package/src/generate-files.ts +10 -6
- package/src/gitignore.ts +4 -3
- package/src/guards-built-in.ts +3 -6
- package/src/guards.ts +5 -8
- package/src/island-bundle.ts +3 -2
- package/src/island-sources.ts +4 -3
- package/src/island-states-load.ts +4 -3
- package/src/island-store.ts +3 -2
- package/src/json-merge.ts +8 -6
- package/src/lint-findings.ts +4 -7
- package/src/mcp-errors.ts +1 -1
- package/src/messages.ts +1 -0
- package/src/prerender-out.ts +4 -3
- package/src/publish-closure.ts +4 -6
- package/src/pwa-manifest-locales.ts +5 -8
- package/src/registry.ts +0 -7
- package/src/root-env.ts +3 -2
- package/src/runtime-admin.ts +2 -4
- package/src/runtime-keys.ts +5 -2
- package/src/static-report.ts +5 -8
- package/src/templates/github/ci-schedule.ts +86 -0
- package/src/templates/github/ci.yml.ts +6 -8
- package/src/templates/github/dependabot.yml.ts +6 -1
- package/src/templates/invite-tests.ts +43 -6
- package/src/templates/invite.ts +12 -14
- package/src/templates/scaffold-docs.ts +1 -0
- package/src/templates/shapes/overlay.ts +4 -7
- package/src/templates/sign-in-action-tests.ts +71 -21
- package/src/templates/sign-in-password.ts +9 -5
- package/src/templates/sign-in-shared.ts +7 -15
- package/src/upgrade-guards-baseline.ts +3 -5
- package/src/verify-merge-skips.ts +2 -4
- package/src/verify-merge.ts +13 -8
- package/src/verify-part-step.ts +5 -7
- package/src/worker-bundle.ts +4 -2
- package/wiki/Actions.md +69 -5
- package/wiki/Agents.md +13 -0
- package/wiki/Auth.md +4 -0
- package/wiki/Batching-And-Preloading.md +77 -3
- package/wiki/CLI-Reference.md +18 -5
- package/wiki/Caching-And-Invalidation.md +76 -23
- package/wiki/Client-Navigation.md +2 -0
- package/wiki/Configuration.md +17 -4
- package/wiki/Entities-And-Migrations.md +168 -6
- package/wiki/FAQ.md +1 -1
- package/wiki/Feature-Flags.md +3 -0
- package/wiki/Getting-Started.md +27 -1
- package/wiki/Jobs-And-Workflows.md +70 -13
- package/wiki/Known-Gaps.md +58 -49
- package/wiki/MCP-And-AI.md +43 -3
- package/wiki/Mail.md +6 -0
- package/wiki/Migrations-And-Backfills.md +13 -0
- package/wiki/Money.md +20 -1
- package/wiki/N-Plus-One-Detection.md +31 -1
- package/wiki/Notify.md +13 -2
- package/wiki/PWA-And-Offline.md +34 -4
- package/wiki/Policies-And-Authz.md +27 -5
- package/wiki/Queries-And-Live-Queries.md +41 -4
- package/wiki/Realtime.md +22 -0
- package/wiki/Resource-Management.md +6 -1
- package/wiki/Routes-And-Render-Modes.md +54 -6
- package/wiki/SEO.md +24 -2
- package/wiki/Scheduled-Tasks.md +29 -11
- package/wiki/Scraping.md +33 -2
- package/wiki/Static-Assets.md +1 -0
- package/wiki/Storage-And-Uploads.md +8 -1
- package/wiki/Testing.md +120 -13
- package/wiki/The-Eight-Primitives.md +125 -6
- package/wiki/Timezones-And-Dates.md +13 -5
- package/wiki/Troubleshooting.md +1 -1
- package/wiki/Tutorial-02-First-Feature.md +6 -0
- package/wiki/Tutorial-03-Auth-And-Admin.md +8 -0
- package/wiki/Tutorial-04-Jobs-And-Realtime.md +40 -2
- package/wiki/Tutorial-06-Growing-Up.md +1 -2
- package/wiki/UI-Components.md +14 -5
- package/wiki/Upgrading.md +42 -4
package/wiki/Upgrading.md
CHANGED
|
@@ -315,6 +315,9 @@ A setter still on a package's `.` barrel is `X_ADAPTER_PORT_INCOMPLETE` on the `
|
|
|
315
315
|
| `x new`'s `ci.yml` uploads each `verify-part-*` document with `retention-days: 1` (**31.45.0**): the verdict job reads it in the same run, and GitHub's 90-day default let one adopter's parts fill the org's artifact storage quota until CI could not run | nothing: `x upgrade` applies codemod `ci-artifact-retention`; an upload that already sets `retention-days` is left as it is. Artifacts already stored keep their 90 days: delete them from the repository's Actions storage settings if the quota is already full |
|
|
316
316
|
| codemod `ci-pinned-actions` pins any tagged major of `actions/checkout`, `cache`, `upload-artifact` and `download-artifact` (**31.45.0**), and adds `persist-credentials: false` to each checkout it pins, inside the step's own `with:` when it has one; 31.43–31.44 skipped a workflow on another major (`actions/checkout@v5`) | nothing: `x doctor` names it as `X_UPGRADE_CODEMODS_PENDING`, and `x upgrade --json` applies it. A SHA-pinned line and an action with no pin are never touched |
|
|
317
317
|
| the shipped `undeclared-env` guard's fix changes (**31.45.0**), built in; its findings do not: `X_UNDECLARED_ENV` still opens with the `envSchema` line to paste, and adds a second branch for a build-time constant injected by `bun build --define process.env.X=…` (declare a global, `--define NAME=…`), which no deploy sets. A copy still in `guards/` keeps the old text until `x upgrade` migrates it to the release after 31.44.0 | nothing; for a `--define` constant, follow the second branch rather than declaring an env var |
|
|
318
|
+
| `x g sign-in --password` and `x g invite` declare `native: { success: (output) => output.next }` on their six actions and drop the `landAt()` helper (**31.46.0**); an app scaffolded before keeps its `landAt`, whose `setRedirect` still answers its forms with a 303 | nothing. Optional, to have one redirect path: on each action, add `native: { success: (output) => output.next }`, replace `landAt(x)` with `x`, delete `landAt` from `sign-in-flow.ts` / `invite.ts`, and move the test that asserted `request.redirect` to a form post through `httpServer({ routes: [toRoute(target)] }).fetch(…)` with `accept: text/html`, asserting `303` and the `Location` — a fresh `x g sign-in --password` writes that test. Then `x verify --only unit,manifest` |
|
|
319
|
+
| an offline replay sends `x-ultimate-replay-scope`, and the action route answers a session other than the queue's owner `409 X_REPLAY_PRINCIPAL_MISMATCH`, the entry kept `pending` (**31.47.0**, [Realtime](Realtime#tier-3-shipped-in-2100)); `DEFAULT_CORS.allowHeaders` lists the header | an app setting `cors.allowHeaders` replaces that list (`packages/http/src/config.ts`): add `x-ultimate-replay-scope` to it. A cross-origin caller sending the header needs this; the page outbox replays to a same-origin path, which has no preflight. An app on several processes sets `SESSION_SECRET` (32+ characters), or a replay reaching another process is refused |
|
|
320
|
+
| `x exercise` with no `--seed`, and so `x verify`'s `exercise` step, runs one constant seed (**31.47.0**) where each run drew a random one, and `seed` in `.x/exercise.json` is always the number used, never `null`. One tree now gets one verdict, but an `exercise.unprovenMax` measured under random seeds can sit just below the constant seed's figure, so the first gate after the hop can be `X_EXERCISE_UNPROVEN_ABOVE_FLOOR`. `x upgrade` writes a figure only where the app states none, and never raises one | `x exercise --json`, then fix the helper or override each `unproven` record names: pick rows by what they are, never by id order, and assume no order between sized calls ([Testing](Testing)). If the figure that remains is the honest one, raising `unprovenMax` to it is your own reviewed edit of `x.verify.json`. `x exercise --seed random` looks for seed-dependent helpers |
|
|
318
321
|
|
|
319
322
|
## 29.x → 30.0.0, entry by entry
|
|
320
323
|
|
|
@@ -1039,7 +1042,7 @@ published limits and prices into the app's own `models.ts`, with the source and
|
|
|
1039
1042
|
each, as `examples/dummy/apps/web/app/models.ts` does.
|
|
1040
1043
|
|
|
1041
1044
|
```ts
|
|
1042
|
-
import { anthropicProvider,
|
|
1045
|
+
import { anthropicProvider, providerGateway, registerModel } from '@ultimat3/ai';
|
|
1043
1046
|
|
|
1044
1047
|
const usd = (minor: number) => ({ minor, currency: 'USD' }) as const;
|
|
1045
1048
|
|
|
@@ -1054,12 +1057,13 @@ export const appModel = registerModel({
|
|
|
1054
1057
|
reasoning: { effort: true, adaptive: true, disableThinkingUpTo: undefined },
|
|
1055
1058
|
});
|
|
1056
1059
|
|
|
1057
|
-
|
|
1058
|
-
|
|
1060
|
+
// apps/<app>/runtime.ts — the boot installs it
|
|
1061
|
+
export const runtime = {
|
|
1062
|
+
aiGateway: providerGateway({
|
|
1059
1063
|
providers: [anthropicProvider({ models: [appModel.id] })],
|
|
1060
1064
|
defaultModel: appModel.id,
|
|
1061
1065
|
}),
|
|
1062
|
-
}
|
|
1066
|
+
};
|
|
1063
1067
|
```
|
|
1064
1068
|
|
|
1065
1069
|
```diff
|
|
@@ -2563,6 +2567,11 @@ connection after the caller's socket had already been answered `X_TIMEOUT`.
|
|
|
2563
2567
|
`X_MCP_RATE_LIMITED`, 429, with `Retry-After`.
|
|
2564
2568
|
|
|
2565
2569
|
```ts
|
|
2570
|
+
import { type DefineAppMcpInput, type McpServer, mcpHttpRoute } from '@ultimat3/mcp';
|
|
2571
|
+
|
|
2572
|
+
declare const server: McpServer;
|
|
2573
|
+
declare const resolveToken: NonNullable<DefineAppMcpInput['resolveToken']>;
|
|
2574
|
+
|
|
2566
2575
|
mcpHttpRoute({ server, resolveToken, rateLimits: { read: 600, write: 60 } });
|
|
2567
2576
|
// or defineAppMcp({ …, rateLimits: { read: 600, write: 60 } })
|
|
2568
2577
|
```
|
|
@@ -2577,6 +2586,14 @@ honest for `x mcp serve` and a lie for N replicas behind one URL, each enforcing
|
|
|
2577
2586
|
on its own:
|
|
2578
2587
|
|
|
2579
2588
|
```ts
|
|
2589
|
+
import type { PgExecutor } from '@ultimat3/action';
|
|
2590
|
+
import { postgresRateLimitStore } from '@ultimat3/http';
|
|
2591
|
+
import { type DefineAppMcpInput, type McpServer, mcpHttpRoute } from '@ultimat3/mcp';
|
|
2592
|
+
|
|
2593
|
+
declare const server: McpServer;
|
|
2594
|
+
declare const resolveToken: NonNullable<DefineAppMcpInput['resolveToken']>;
|
|
2595
|
+
declare const executor: PgExecutor;
|
|
2596
|
+
|
|
2580
2597
|
mcpHttpRoute({ server, resolveToken, rateLimitStore: postgresRateLimitStore({ executor }) });
|
|
2581
2598
|
```
|
|
2582
2599
|
|
|
@@ -2765,6 +2782,8 @@ your own that should keep its authored cause needs a status of its own — that
|
|
|
2765
2782
|
classified:
|
|
2766
2783
|
|
|
2767
2784
|
```ts
|
|
2785
|
+
import { registerErrorStatus } from '@ultimat3/http';
|
|
2786
|
+
|
|
2768
2787
|
registerErrorStatus({ X_PAYMENTS_UNREACHABLE: 502 }); // from @ultimat3/http, once at boot
|
|
2769
2788
|
```
|
|
2770
2789
|
|
|
@@ -3010,6 +3029,12 @@ worker and nothing in the framework calls `generateServiceWorker`; the generated
|
|
|
3010
3029
|
`regenerate:` header names the call for that reason.
|
|
3011
3030
|
|
|
3012
3031
|
```ts
|
|
3032
|
+
import { generateServiceWorker, type PwaRoute, type ServiceWorkerConfig } from '@ultimat3/pwa';
|
|
3033
|
+
|
|
3034
|
+
declare const routes: readonly PwaRoute[];
|
|
3035
|
+
declare const config: ServiceWorkerConfig;
|
|
3036
|
+
declare const buildId: string;
|
|
3037
|
+
|
|
3013
3038
|
generateServiceWorker(routes, config, buildId); // from @ultimat3/pwa
|
|
3014
3039
|
```
|
|
3015
3040
|
|
|
@@ -3393,6 +3418,15 @@ was not: you were on Postgres the whole time.
|
|
|
3393
3418
|
Which driver runs is `setJobDriver(driver)`, and only that:
|
|
3394
3419
|
|
|
3395
3420
|
```ts
|
|
3421
|
+
import type { PgExecutor } from '@ultimat3/action';
|
|
3422
|
+
|
|
3423
|
+
// This release's API, declared because it is gone: since 31.0.0 the driver is `jobs:` in
|
|
3424
|
+
// `apps/<app>/runtime.ts`.
|
|
3425
|
+
declare function setJobDriver(driver: unknown): void;
|
|
3426
|
+
declare function createPgDriver(options: { executor: PgExecutor }): unknown;
|
|
3427
|
+
declare function createMemoryDriver(): unknown;
|
|
3428
|
+
declare const executor: PgExecutor;
|
|
3429
|
+
|
|
3396
3430
|
setJobDriver(createPgDriver({ executor })) // production
|
|
3397
3431
|
setJobDriver(createMemoryDriver()) // a test
|
|
3398
3432
|
```
|
|
@@ -3577,6 +3611,8 @@ Two things are not compile errors and are the ones to read first: the **seven be
|
|
|
3577
3611
|
Entry 18's pair, both sides or neither:
|
|
3578
3612
|
|
|
3579
3613
|
```ts
|
|
3614
|
+
import { configureLifecycle } from '@ultimat3/core';
|
|
3615
|
+
|
|
3580
3616
|
configureLifecycle({ deadlineMs: 600_000 }); // and terminationGracePeriodSeconds >= 600
|
|
3581
3617
|
```
|
|
3582
3618
|
|
|
@@ -3876,6 +3912,8 @@ Full detail: [PWA and offline](PWA-And-Offline).
|
|
|
3876
3912
|
|
|
3877
3913
|
## Migrating jobs between drivers — **still nowhere to migrate to**
|
|
3878
3914
|
|
|
3915
|
+
**Superseded `As of 2026-11-18`:** this section records the state before `redisJobDriver()` shipped (`@ultimat3/jobs/redis`, 2026-10) and before 31.0.0 replaced `setJobDriver` with `jobs:` in `apps/<app>/runtime.ts`. Current drivers: [Jobs and workflows](Jobs-And-Workflows). `x jobs drain` no longer exists; moving in-flight rows is the app's own migration.
|
|
3916
|
+
|
|
3879
3917
|
**There is no `jobs.driver` field.** 5.0.0 deleted it, because it selected nothing: boot always built the Postgres driver, so `jobs: { driver: 'redis' }` gave you Postgres in silence; since 25.0.0 the key is refused by name (`X_CONFIG_INVALID`). Which driver runs is `setJobDriver(driver)` at boot, and only that.
|
|
3880
3918
|
|
|
3881
3919
|
**There is no driver migration to perform**, `As of 2026-10`. Postgres is the only durable driver — 25.0.0 deleted the NATS and Redis stubs, whose every method threw `X_NOT_IMPLEMENTED` — and `x jobs drain` is planned: it exits `X_NOT_IMPLEMENTED` before the queue boots, pointing at `x jobs list --json`. Its `--to` and `--dry-run` flags went with the drain body in 25.0.0 and are now `X_CLI_BAD_FLAG`. Before that a drain onto either stub leased the pending batch for five minutes, failed every enqueue and nacked it back; and the `memory` target, refused by name since 2026-09, acked every durable row off the source and lost the copy when the command exited — a target that dies with the command is not a migration.
|