@terreno/admin-backend 58.0.5 → 58.1.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 +58 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -20,6 +20,64 @@ 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
|
+
## [58.1.0] - 2026-11-21
|
|
24
|
+
|
|
25
|
+
Upgrade note: [`mcp-server/src/docs/upgrades/58.1.0.md`](mcp-server/src/docs/upgrades/58.1.0.md).
|
|
26
|
+
|
|
27
|
+
### Breaking
|
|
28
|
+
|
|
29
|
+
- **@terreno/ui:** `GPTChat` now reads as a transcript: user messages in a light bubble, assistant text on the page in a 760px column, and tool calls as one expandable row capped at 240px. Breaking changes for apps and e2e suites that select these elements:
|
|
30
|
+
|
|
31
|
+
- `gpt-copy-image` is removed. Use `gpt-copy-msg-<index>` for copy. It copies the image for an image-only reply and the text when a reply has both.
|
|
32
|
+
- Tool rows are labeled `Tool: <name>` instead of `Result: <name>`.
|
|
33
|
+
- **Tools** (`gpt-tools-button`) appears beside the composer only when `mcpTools` has entries.
|
|
34
|
+
- A user or assistant message with no text, content parts, or blocks renders nothing, including its action row.
|
|
35
|
+
|
|
36
|
+
Download for an image reply is `gpt-download-image-<index>`. The **Tools** modal hides arguments until **Show arguments** is checked, and it resets to hidden when closed.
|
|
37
|
+
- **Upgrade:** switching an app with connected clients from the default `mcp` scope to `grants` ends access for live `mcp`-scoped tokens (users reconnect), and confidential clients stored with `scope: "mcp"` get `invalid_scope` at `/oauth/token` until their stored scope is updated. Custom tools from `registerMCPTool` default to `write`, so add `access: "read"` to read-only tools or read-only grants will not see them. Bearer-mode web apps add the consent path to `oauthHandoff.callbackPaths`. See [Enable MCP OAuth](docs/how-to/enable-mcp-oauth.md).
|
|
38
|
+
- **Behavior change, even without `grants`:** a confidential client whose stored `scope` lists only scopes the server no longer supports now gets `invalid_scope` from `client_credentials`, where it used to get a token. Update the client's `scope`, or leave it unset to receive every supported scope.
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- **@terreno/admin-frontend:** AI Prompts nest by folder. A slash in a prompt name is a folder level: each folder is a table row you open, and an up row returns to the parent. Tag and search filters match prompts in every folder. The list filters by one tag.
|
|
43
|
+
- **@terreno/ai:** `GET /ai/observability/prompts` returns each prompt's `tags`, which the admin list filters on.
|
|
44
|
+
- **@terreno/admin-frontend:** dataset items open on their own page. Expected output is a form built from `expectedOutputSchema`, or from the stored JSON when no schema is set. The expected output is the golden label, and **Save and next** moves through the Needs review queue in list order.
|
|
45
|
+
- **@terreno/admin-frontend:** `AdminRolesList` takes `isActionVisible({resource, action})`. Return false to hide a statement action from the role list and the role editor. Hidden actions stay on a saved role and are written back unchanged. The predicate receives the resource, so the same verb can be hidden on one model and shown on another.
|
|
46
|
+
- **@terreno/ai:** end users can give feedback on any AI output. `POST /ai/observability/traces/:id/feedback` (trace owner only) records thumbs with an optional comment and outcome class as `user-feedback` scores, passive signals (`accepted`, `dismissed`, `copied`, `edited`, `regenerated`) as the new `user-signal` score source, and `flagDataset`. `recordTraceFeedback` exposes the same logic to server code.
|
|
47
|
+
- **@terreno/ai:** `createTraceId()` and the `traceId` generate option let a route return an output's trace id. `/gpt/prompt` stores `traceId` on each assistant reply, and `PATCH /gpt/histories/:id/rating` accepts a `comment` and records the rating on the reply's trace.
|
|
48
|
+
- **@terreno/ai:** `ObservabilityApp({feedbackReview: {evaluatorName}})` queues every thumbs-down trace in the review queue with reason `feedback`.
|
|
49
|
+
- **@terreno/ai:** `GET /ai/observability/traces` filters by `thumbs`, `signal`, and `hasComment`. Adding a trace the user rejected to a dataset now lands it `proofread: false` with a `user:` tag and `metadata.userFeedback`, so known-bad outputs never become gold labels.
|
|
50
|
+
- **@terreno/ui:** `ThumbsUpDownFeedback` takes `onCommentSubmit` for an optional comment (new `FeedbackCommentField`), and `GPTChat` takes `onRateComment` and `onMessageSignal`.
|
|
51
|
+
- **@terreno/admin-frontend:** AI Observability Traces adds **Thumbs**, **Signal**, and **Has comment** filters, shows each score's source, and shows user comments (collapsed on sensitive traces).
|
|
52
|
+
- **@terreno/admin-frontend:** dataset items open with review steps and an explanation of the golden label. **Save and next** on a Needs review item opens the next unproofread item in list order (wrapping), and the last one returns to the Needs review tab. The dataset shows a golden-label note and a Needs review empty state, and `?tab=needsReview` opens that tab.
|
|
53
|
+
- **@terreno/cli:** every MCP tool is now a `terreno` command, so an agent with a shell needs no MCP configuration. New commands: `terreno syncdb action` and `terreno syncdb snapshot`, `terreno storage read|write`, `terreno dev list|run`, `terreno dispatch`, `terreno docs notes search|get|ask`, and `terreno validate blocks`. `terreno tool list|schema|call` reaches any tool by its MCP name.
|
|
54
|
+
- **@terreno/cli:** `terreno browser <action>` drives one web page across separate commands. The page and SyncDB snapshots live in a background CLI session (`terreno session start|stop|status`) that those commands start themselves.
|
|
55
|
+
- **@terreno/cli:** `terreno login` signs in with Better Auth or JWT and saves a token that `terreno api` sends to the same API origin. `terreno logout` removes it.
|
|
56
|
+
- **@terreno/mcp:** new exports `@terreno/mcp/project-root` (`resolveTerrenoProjectRoot`) and `@terreno/mcp/local-tool-names` (`LOCAL_TOOL_NAMES`), and `checkUiBlocks` on `@terreno/mcp/tools`, which reports whether a block document is valid along with the `terreno-blocks validate` text.
|
|
57
|
+
- **@terreno/api:** `mcpOAuth.grants` enforces MCP OAuth scopes. Pass `"readOnly"` (`mcp:read`), `"readWrite"` (`mcp:read`, `mcp:write`), or your own `McpOAuthGrant[]` (`{scope, label, description?, access: "read" | "write"}`). Every MCP tool is `read` or `write` (CRUD `list`/`read` and GET actions are `read`; the rest are `write`), and an OAuth token sees and can call only the tools its grants allow. Write implies read. `MCPConfig.scopes`, an action's `mcp.scope`, and `registerMCPTool({access, scope})` tag tools; `canUseMcpTool` and `MCP_OAUTH_GRANT_PRESETS` are exported. Without `grants`, nothing changes.
|
|
58
|
+
- **@terreno/api:** `POST /oauth/authorize/:request/approve` accepts an optional `{scope}` so the user can approve a subset of the requested scopes, and `GET /oauth/authorize/:request` returns `grants` with each grant's label and description. `client_credentials` now intersects a client's stored scope with the supported scopes and answers `invalid_scope` when nothing is left.
|
|
59
|
+
- **@terreno/syncdb:** `TerrenoOAuthConsentScreen` is a drop-in MCP OAuth consent page: `TerrenoLoginScreen` inline while signed out, then the client, redirect host, a checkbox per grant, and Approve and Deny. `useMcpOAuthConsent` is the hook behind it. `TerrenoLoginScreen` and `useLoginController` take `methods` to show only some of the server's sign-in methods.
|
|
60
|
+
- **@terreno/api:** `modelRouter` takes an opt-in `bulk` option (`true` or `{maxItems, methods}`) that mounts `POST /<route>/bulk`. One request carries up to 100 create, update, and delete operations, each run through the router's permissions, hooks, validation, audit, and `responseHandler`. By default the batch runs in one MongoDB transaction and commits or rolls back together (replica set required); `"atomic": false` runs each operation on its own and returns a status per operation. See `docs/reference/api.md` ("modelRouter bulk writes").
|
|
61
|
+
- **@terreno/api:** `validateModelRouterBody`, which validates one create or update body the way `POST /` and `PATCH /:id` do.
|
|
62
|
+
- Role permissions can carry an optional description. `createAccess({ statementDescriptions })` merges app labels over the framework labels, and `GET /rbac/statements` returns them as `data.statementDescriptions`. The admin roles screen shows each label beside its action badge. Pass `showActionBadges={false}` to hide the badges and stack one label per line.
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
|
|
66
|
+
- Admin shell content padding uses longhand values. react-native-web drops a multi-value `padding` string, so admin pages sat flush against the sidebar.
|
|
67
|
+
- Data table alternate rows in light mode use `neutral100` (`#E6E6E6`) instead of `neutralLight` (`#CDCDCD`).
|
|
68
|
+
- **@terreno/ui:** `DraggableList` accepts `variableHeight`. Each row is as tall as its content, and the next row starts below it. During a drag, rows use their measured heights to pick the drop slot. `itemHeight` is the placeholder until a row is measured.
|
|
69
|
+
- **@terreno/admin-frontend:** arrays of subdocuments, such as feature-flag rules and variants, use `variableHeight`. A rule with a long user list no longer covers the Type and Variants fields below it.
|
|
70
|
+
- **@terreno/admin-frontend:** reordering an array of subdocuments by drag keeps the new order. Before, the rows snapped back to their original order after release.
|
|
71
|
+
- `@terreno/test`: `registerBackendPreload` and `registerSimpleMongoPreload` apply `testEnv` when they are called, not only in `beforeEach`. An app built in a test file's `beforeAll` used to miss it, so the first file in a run built its app without `TOKEN_SECRET`: `TerrenoApp` skipped the JWT strategy, and anonymous requests got 500 `Unknown authentication strategy "jwt"`.
|
|
72
|
+
- `@terreno/test`: new `testRequest(app)`, a drop-in for `supertest(app)` that binds 127.0.0.1. Under Bun, `supertest(app)` listens on the IPv6 wildcard only and sends to `127.0.0.1`, so on macOS another local process holding that port could answer, failing random tests with its 404 or 401. Bun also left each supertest server open after its request; these now close. `authAsUser` and `authWithToken` use the same server. `createLoopbackServer(app)` returns it for your own use.
|
|
73
|
+
- Web spell check is on again for prose `TextField` and `TextArea` values; browser autocorrect stays off on web so controlled inputs do not oscillate between two spellings.
|
|
74
|
+
|
|
75
|
+
## [58.0.6] - 2026-11-14
|
|
76
|
+
|
|
77
|
+
### Fixed
|
|
78
|
+
|
|
79
|
+
- `@terreno/ai` accepts `@ai-sdk/mcp` from `^1.0.21` again. 58.0.5 required `^1.0.104`, a version published days earlier, which apps that only install packages older than a minimum release age could not resolve.
|
|
80
|
+
|
|
23
81
|
## [58.0.5] - 2026-11-14
|
|
24
82
|
|
|
25
83
|
### Fixed
|
package/package.json
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@google-cloud/storage": "^7.15.0",
|
|
8
|
-
"@terreno/api": "58.0
|
|
9
|
-
"@terreno/jobs": "58.0
|
|
8
|
+
"@terreno/api": "58.1.0",
|
|
9
|
+
"@terreno/jobs": "58.1.0",
|
|
10
10
|
"express": "^5.2.1",
|
|
11
11
|
"luxon": "^3.7.2",
|
|
12
12
|
"multer": "2.5.0"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"description": "Admin panel backend plugin for @terreno/api — part of Terreno, the batteries-included TypeScript framework for universal apps.",
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@biomejs/biome": "2.5.13",
|
|
17
|
-
"@terreno/test": "58.0
|
|
17
|
+
"@terreno/test": "58.1.0",
|
|
18
18
|
"@types/bun": "^1.4.0",
|
|
19
19
|
"@types/express": "^5.0.6",
|
|
20
20
|
"@types/luxon": "^3.7.1",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"typecheck": "tsc -p tsconfig.typecheck.json"
|
|
66
66
|
},
|
|
67
67
|
"types": "dist/index.d.ts",
|
|
68
|
-
"version": "58.0
|
|
68
|
+
"version": "58.1.0"
|
|
69
69
|
}
|