@terreno/admin-spa 57.20.0 → 57.21.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/CHANGELOG.md +50 -0
- package/README.md +32 -2
- package/package.json +9 -7
package/CHANGELOG.md
CHANGED
|
@@ -20,6 +20,56 @@ Upgrade notes for consumer action live in [`mcp-server/src/docs/upgrades/`](mcp-
|
|
|
20
20
|
|
|
21
21
|
Unreleased changes live in [`changelog/unreleased/`](changelog/unreleased/). Add one Markdown file per feature (see that directory's README) instead of editing this section.
|
|
22
22
|
|
|
23
|
+
## [57.21.0] - 2026-11-01
|
|
24
|
+
|
|
25
|
+
Upgrade note: [`mcp-server/src/docs/upgrades/57.21.0.md`](mcp-server/src/docs/upgrades/57.21.0.md).
|
|
26
|
+
|
|
27
|
+
### Breaking
|
|
28
|
+
|
|
29
|
+
- The `terreno-scan` plugin is now `terreno-loop`, and its skills are renamed from `terreno-scan-*` to `terreno-loop-*`. The resident loop `terreno-scan-loop` is now `terreno-loop-run`: `/terreno-loop:run` in Claude Code, `/terreno-loop-run` in Cursor, `$terreno-loop-run` in Codex. Claude Code moves existing installs over through the marketplace `renames` entry. In Cursor and Codex, uninstall `terreno-scan` and install `terreno-loop`. Campaign state stays at `.terreno/scan/<goal>.json`, so campaigns already in progress resume.
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- `@terreno/admin-spa` serves an MCP OAuth consent screen at `/console/oauth/consent`, so a backend with no product frontend can set `mcpOAuth.consentUrl` to `${issuer}/console/oauth/consent`. Any signed-in user can approve or deny a request with their Better Auth session; signed-out users sign in and return through the login screen's new `returnTo` parameter, which accepts only in-app paths.
|
|
34
|
+
- Claude Code plugins now publish to npm with every release, as `@terreno/agent-plugin` and `@terreno/agent-plugin-loop`. A new `terreno-releases` marketplace installs them at the latest stable release. To pin one release, add `TerrenoLabs/terreno#<version>` instead. See [Install agent skills](docs/how-to/install-agent-skills.md#pick-a-channel).
|
|
35
|
+
- The generated Claude plugin manifest no longer pins `version`. Before this change, plugins installed from the `TerrenoLabs/terreno` marketplace stayed on the `2.12.0` copy, because their version never changed. They now update on every commit. Run `/plugin update terreno@terreno-plugins` once to leave `2.12.0`.
|
|
36
|
+
- The `terreno-planning` lifecycle plugin (2.13.0) plans e2e tests and manual regression cases in every IP:
|
|
37
|
+
|
|
38
|
+
- Grow requires `## E2E tests` and `## Regression cases` sections (either may be `None — <reason>`), read from the e2e guide at `docs/testing/e2e.md` or a `## Testing conventions` override in AGENTS.md or CLAUDE.md.
|
|
39
|
+
- Regression cases stay minimal: most features add none. A case is only for what a developer or QA must check by hand, such as push notifications, and Roast fails one that repeats an existing case.
|
|
40
|
+
- Pick writes each planned spec in the task that delivers it, and Roast runs it; a missing or failing row is `FAIL`.
|
|
41
|
+
- Brew gates on every planned spec and merges regression cases into `docs/regression/<area>.md` with the next free ID.
|
|
42
|
+
- Taste re-checks both sections after behaviour-changing fixes and renumbers regression ID collisions with `master`.
|
|
43
|
+
- `bun run check:lifecycle-skills` enforces these phrases in every stage.
|
|
44
|
+
- New `backfill-regression` skill proposes manual regression cases one area at a time and writes only the sets the human approves.
|
|
45
|
+
- A consumer opts out of manual regression suites with `Regression suites | none` in its `## Testing conventions` table.
|
|
46
|
+
- The `terreno-planning` lifecycle plugin (2.14.0) grows an end-user guide with every feature:
|
|
47
|
+
|
|
48
|
+
- Every IP has a `## User guide` section listing the guide pages it adds, updates, or retires, or `None — <reason>`. Pages live in `docs/user-guide/<area>/<feature>.md`, one feature per page, with `title`, `audience`, `platforms`, and `questions` frontmatter that chat agents use to answer "how do I…" questions.
|
|
49
|
+
- Pick writes each page in the task that ships the feature, Roast checks it against the shipped screens, Brew gates on it and the index, and Taste keeps it current after fixes.
|
|
50
|
+
- A repo opts out with `| User guide | none — <reason> |` in a `## User guide conventions` table in AGENTS.md or CLAUDE.md.
|
|
51
|
+
- New `backfill-user-guide` skill drafts pages for features that shipped without one, one area at a time, and writes only the pages the human approves.
|
|
52
|
+
- `bun run check:user-guide` validates the pages and index (CI `repo-policies`); `--uncovered <app dir>` lists screens no page names.
|
|
53
|
+
- Terreno's own guide covers the example app's main features.
|
|
54
|
+
- `@terreno/api`: opt-in `mcpRequestLog` on `TerrenoApp` records one metadata-only `McpRequestLog` row per MCP tool call (tool, user, credential, service token or OAuth client, duration, outcome, error class; never arguments, results, or error text), expiring after `retentionDays` (default 30).
|
|
55
|
+
- `@terreno/api`: opt-in `mcpToolSettings` on `TerrenoApp` registers every MCP tool in `McpToolSetting` at startup; tools an admin switches off are hidden from `tools/list` and rejected by `tools/call`.
|
|
56
|
+
- `@terreno/api`: deleting an `McpOAuthToken` row revokes its whole connection (token family) and keeps the rows. New `McpOAuthToken.revokeAllForUser` and `McpServiceToken.revokeAllForUser`.
|
|
57
|
+
- `@terreno/admin-backend`: `mcpAdminModels()` adds MCP admin screens (service tokens, OAuth clients, OAuth connections, request log, tool switches), `mcpAdminStatements` for RBAC, and `mcpAdminScripts()` adds `mcp-sign-out-everywhere`. See [Manage MCP from the admin panel](docs/how-to/manage-mcp-in-admin.md).
|
|
58
|
+
- Docs: [Expose an MCP server safely](docs/how-to/expose-mcp-server-safely.md) (OAuth, service tokens, Cloudflare Tunnel, Access) and the `bootstrap-mcp-server` skill for a single-binary MCP server with the admin console embedded.
|
|
59
|
+
- Every workspace package has a real-process smoke test and an e2e page:
|
|
60
|
+
|
|
61
|
+
- Each package's `e2e/smoke.ts` (or `smoke.spec.ts` for browser packages) runs its built output through its public entry: a server on a real port, the compiled binary, or a page in Chromium. `bun run --cwd <package> smoke` runs one; `bun run smoke` runs them all and prints each package's time. The CircleCI `smoke` job runs them on every package change.
|
|
62
|
+
- `@terreno/test` adds the smoke helpers `smokeMongoUri()`, `spawnUntilReady()`, `spawnExampleBackend()`, `runBin()`, and `freePort()`.
|
|
63
|
+
- The [E2E testing guide](docs/testing/e2e.md) explains the test tiers and links one page per package under `docs/testing/e2e/`.
|
|
64
|
+
- Manual regression cases live in `docs/regression/<area>.md`, one file per area, and `bun run check:regression-suites` validates them.
|
|
65
|
+
- example-frontend's smoke serves a web export that `bun run --cwd example-frontend export:smoke` builds once with a placeholder API URL; the smoke swaps in a `freePort()` API URL as it serves the bundle, so the 30 s smoke no longer rebuilds the export. `spawnUntilReady()` takes `stopGraceMs`, and `spawnExampleBackend()` stops example-backend after 0.5 s instead of 5 s.
|
|
66
|
+
- Every workspace package has a `typecheck` script that runs `tsc` over source and test files through a new `tsconfig.typecheck.json`. Root `bun run lint` ends with `bun run typecheck`, and CircleCI runs it in a new `typecheck` job. Test files that had type errors were fixed.
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
|
|
70
|
+
- `@terreno/api`: deleting an `McpOAuthToken` row with document or query `deleteOne` now revokes that row's whole token family (the connection) and keeps the rows instead of removing one pair. `deleteMany` is unchanged.
|
|
71
|
+
- `@terreno/ui`: new `theme.field` tokens (`background`, `backgroundDisabled`, `border`, `borderFocus`, `borderError`, `borderDisabled`) style form inputs. `TextField`, `SelectField`, `DateTimeField`, `HeightField`, and `OtpField` read them instead of `surface.base` and `border.dark`. Defaults equal the old colors, but overriding `surface` or `border` no longer recolors those fields; use `setTheme({field: ...})`.
|
|
72
|
+
|
|
23
73
|
## [57.20.0] - 2026-10-30
|
|
24
74
|
|
|
25
75
|
Upgrade note: [`mcp-server/src/docs/upgrades/57.20.0.md`](mcp-server/src/docs/upgrades/57.20.0.md).
|
package/README.md
CHANGED
|
@@ -21,7 +21,37 @@ does) remains supported and unchanged.
|
|
|
21
21
|
|
|
22
22
|
Boot flow: `AppConfigGate` fetches `app-config.json` → `StoreProvider` builds the
|
|
23
23
|
Better-Auth client + Redux store → `AdminGate` syncs the session and redirects
|
|
24
|
-
anonymous users to `/login` and non-admins (admin API returns 403) to `/forbidden
|
|
24
|
+
anonymous users to `/login` and non-admins (admin API returns 403) to `/forbidden`,
|
|
25
|
+
except on the signed-in-only MCP OAuth consent route.
|
|
26
|
+
|
|
27
|
+
## MCP OAuth consent screen
|
|
28
|
+
|
|
29
|
+
The SPA ships a consent screen for `@terreno/api`'s MCP OAuth flow at
|
|
30
|
+
`${basePath}/oauth/consent`. A backend with no product frontend can point `consentUrl`
|
|
31
|
+
at it:
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
const issuer = "https://api.acme.com";
|
|
35
|
+
|
|
36
|
+
new TerrenoApp({
|
|
37
|
+
userModel: User,
|
|
38
|
+
mcpOAuth: {consentUrl: `${issuer}/console/oauth/consent`, enabled: true, issuer},
|
|
39
|
+
})
|
|
40
|
+
.register(new BetterAuthApp({config: betterAuthConfig, userModel: User}))
|
|
41
|
+
.register(new AdminSpaServeApp({basePath: "/console"}));
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- Any signed-in user can open it, not only admins. The admin gate and admin bootstrapping
|
|
45
|
+
(sync client, org context) are skipped on this route.
|
|
46
|
+
- A signed-out user goes to `/login?returnTo=/oauth/consent?request=<id>` and comes back
|
|
47
|
+
after sign-in. `returnTo` must be an in-app path (`/` but not `//`, no `\`, no scheme,
|
|
48
|
+
no whitespace); anything else is ignored.
|
|
49
|
+
- The screen calls `GET /oauth/authorize/:request` and `POST .../approve` or `.../deny`
|
|
50
|
+
with the same-origin Better Auth session cookie, then sends the browser to the returned
|
|
51
|
+
`redirectUrl`. It shows the client name, the redirect host, the requested scope, and the
|
|
52
|
+
signed-in email, plus states for a missing `request`, expired (400), already decided (409),
|
|
53
|
+
not found (404), and other errors.
|
|
54
|
+
- Keep the `/console` part of `consentUrl` equal to `basePath`.
|
|
25
55
|
|
|
26
56
|
## Install
|
|
27
57
|
|
|
@@ -110,7 +140,7 @@ bun run compile # compile the server plugin (src/ -> src/dist, CommonJS)
|
|
|
110
140
|
bun run build:web # produce the static export in dist/
|
|
111
141
|
bun run dev # expo start --web for local SPA development
|
|
112
142
|
bun run test:ci # serve-plugin unit tests (supertest)
|
|
113
|
-
bun run smoke # backend-free smoke
|
|
143
|
+
bun run smoke # backend-free smoke: compiled serve plugin + built dist/
|
|
114
144
|
bun run test:e2e # Playwright e2e (anonymous -> login) over the built dist/
|
|
115
145
|
```
|
|
116
146
|
|
package/package.json
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
"@expo/vector-icons": "^15.1.1",
|
|
8
8
|
"@react-native-async-storage/async-storage": "2.2.0",
|
|
9
9
|
"@reduxjs/toolkit": "^2.11.1",
|
|
10
|
-
"@terreno/admin-frontend": "57.
|
|
11
|
-
"@terreno/rtk": "57.
|
|
12
|
-
"@terreno/syncdb": "57.
|
|
13
|
-
"@terreno/ui": "57.
|
|
10
|
+
"@terreno/admin-frontend": "57.21.0",
|
|
11
|
+
"@terreno/rtk": "57.21.0",
|
|
12
|
+
"@terreno/syncdb": "57.21.0",
|
|
13
|
+
"@terreno/ui": "57.21.0",
|
|
14
14
|
"better-auth": "^1.6.25",
|
|
15
15
|
"expo": "~57.0.14",
|
|
16
16
|
"expo-constants": "~57.0.12",
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@biomejs/biome": "^2.3.6",
|
|
39
39
|
"@playwright/test": "^1.58.2",
|
|
40
|
-
"@terreno/api": "57.
|
|
40
|
+
"@terreno/api": "57.21.0",
|
|
41
|
+
"@terreno/test": "57.21.0",
|
|
41
42
|
"@types/bun": "^1.4.0",
|
|
42
43
|
"@types/express": "^5.0.6",
|
|
43
44
|
"@types/luxon": "^3.7.1",
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
"main": "expo-router/entry",
|
|
79
80
|
"name": "@terreno/admin-spa",
|
|
80
81
|
"peerDependencies": {
|
|
81
|
-
"@terreno/api": "57.
|
|
82
|
+
"@terreno/api": "57.21.0"
|
|
82
83
|
},
|
|
83
84
|
"publishConfig": {
|
|
84
85
|
"access": "public"
|
|
@@ -102,8 +103,9 @@
|
|
|
102
103
|
"test:coverage": "bun run ../scripts/check-coverage.ts",
|
|
103
104
|
"test:e2e": "playwright test",
|
|
104
105
|
"test:integration": "playwright test --config playwright.integration.config.ts",
|
|
106
|
+
"typecheck": "tsc -p tsconfig.typecheck.json",
|
|
105
107
|
"web": "expo start --web --port 8083"
|
|
106
108
|
},
|
|
107
109
|
"types": "./src/dist/index.d.ts",
|
|
108
|
-
"version": "57.
|
|
110
|
+
"version": "57.21.0"
|
|
109
111
|
}
|