Skip to content

Commit f37cd61

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-27401-mcp-tool-snapshot
# Conflicts: # content/docs/automation/connectors.mdx # packages/connectors/connector-mcp/src/mcp-provider.ts
2 parents f5e02da + 99fc050 commit f37cd61

87 files changed

Lines changed: 5693 additions & 408 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-ui and objectstack-i18n teach six keys the platform already draws — `pressed`, the `{{ }}` copy slots `description` / `helpText` / `outcomeMessages`, the param dialog's `submitText` and its translation slot, the form thank-you translation keys, `kanban.lanes` and report chart `seriesBy`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **Before.** Each key shipped in the spec and the console drew it, but no published skill taught it: an agent authoring from the skills wrote a toggle header action with no `pressed`, spelled the dialog line, a param hint or a per-outcome toast with `${…}` holes that `os validate` refuses, left the param dialog's button at "Confirm", translated no thank-you panel, could neither order kanban lanes nor drop an always-empty one, and split a chart by a second dimension with a `matrix` workaround.
11+
- **Now.** `objectstack-ui/rules/actions.md` teaches `pressed` (display-only reader state over an `attachedOnRead` block; a boolean literal is refused), names all five `{{ }}` copy slots with one example each, and teaches `submitText` beside `params` (with the `confirmText` contrast and the refused spellings); its `ReassignLeadAction` example sets `submitText`, and eval 11 asks for a param dialog whose button reads the verb. `rules/list-views.md` shows `kanban.lanes` in the kanban example — a choice of lanes and their order, not a record filter. `rules/dashboards.md` sets `seriesBy` on the report chart example and says where it is refused (an undeclared dimension, the `xAxis` dimension, a single-series type). `objectstack-i18n/SKILL.md` lists `_views.{view}.submitBehavior.title` / `.message` and `_actions.{action}.submitText`.
12+
- Every file stays at or under its token ceiling: the actions, list-views and dashboards additions are paid for by condensing text in the same file (the `ctx` section's blessed-name code block, which restates the objectstack-data hooks reference; two ADR-0047 renderer notes folded into the code comments they repeat; two engine- and Studio-facing notes that told an author nothing to write). No ceiling moves, no frontmatter changes, no schema, key or behaviour changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the objectstack-data field-types rule teaches `percentDisplay` and `lookupAutofill`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- The `percent` row of the field-type table lists `percentDisplay`: unset or `'bar'` draws the progress bar, `'plain'` prints the number alone, for a rate or a probability.
11+
- The Relational section teaches `lookupAutofill: [{ target, source, overwrite? }]` on a single-value `lookup` / `master_detail`: which targets a pick may fill, which sources it may copy, the overwrite rule, that the fill is client-side only, and how it relates to a line-item grid column's `autofill`.
12+
- Paid inside the file's token ceiling: the `Select with Default`, `Email with Uniqueness` and `Lookup (Many-to-Many)` examples go (each restated a rule the skill carries elsewhere), and the `vectorConfig` trap folds into the invented-key list at the top of the file.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/connector-mcp': patch
3+
'@objectstack/service-automation': patch
4+
---
5+
6+
fix(connector-mcp): when a server that was sent the instance's credential does not list an `include`d tool, the instance is degraded as a credential refusal instead of failing the boot as a declaration fault
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
Some MCP servers list only the tools the credential they are sent may use: GitHub's hides each tool a classic personal access token's scopes do not cover. Its `tools/list` answer says nothing about what it hid, so a tool missing from it may be hidden from this credential or may not exist on the server at all.
12+
13+
- **Before.** When `providerConfig.include` named a tool the server did not list, the `mcp` provider refused with a plain configuration fault in every case. With the credential in an environment variable, the whole boot failed. With a credential stored through the credential door, the instance was degraded with a reason telling the administrator to fix the app's declaration.
14+
- **Now.** When the handshake carried the instance's `auth` credential (an `http` transport, the credential sent as a header), the refusal is a `ConnectorCredentialRejectedError` with status `403`. Its message names the missing tools and the tools the server does list for that credential, and it names both causes with the fix for each: give the credential the scopes those tools need and set it again, or fix `providerConfig.include`. The materializer handles it as it handles a `401` / `403`: the instance is degraded and the boot does not fail. A stored credential is marked `rejected` and held until it is set again; an environment or vault credential is retried on the backoff, so widening the token's scopes where it was issued recovers the instance without a restart.
15+
- **Unchanged.** An instance whose handshake carried no static credential (no `auth`, an `api-key` sent as a query parameter, a `stdio` transport, or a grant-bearing `oauth2` / `app-credential` instance, whose token is borrowed per request from an organization's connection) keeps the plain configuration fault, fatal at boot, with the same message as before.
16+
- **Where it reads.** The `sys_connector_credential.status` field description (`@objectstack/service-automation`) now names this second way a stored credential becomes `rejected`.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
'@objectstack/rest': patch
3+
'@objectstack/runtime': patch
4+
'@objectstack/plugin-auth': patch
5+
---
6+
7+
feat(runtime, rest, plugin-auth): an AI agent connected over OAuth can run `api` actions that forward to identity routes and other same-origin routes, as the agent
8+
9+
Clause-②: yes (widening, at the two named cells only)
10+
Metadata-protocol: none
11+
12+
An `api` action runs by forwarding a request to its `target` inside the server. Until now an agent connected over OAuth was refused by name before that forward unless the target was the MCP endpoint, because its access token is honoured there alone. So the identity actions ADR-0011 exposes to agents (update my profile, the confirmed admin actions) never ran for one.
13+
14+
Now, per ADR-0090 D10 rule 5, the forward carries a credential the server mints for that one forward instead of the agent's token. It is bound to the forward's method and route and to the action run, spent by its first use, revoked when the target answers, and redeemable only inside the server's own in-process call. At the target it resolves to the same agent: its scope ceiling, the user it acts for and its client. At the identity routes, the auth library is shown the delegating user for that one request only; no session is created, and the user's own permissions there still decide. Writes the agent makes are recorded with both the agent and its user.
15+
16+
What changes, at exactly two cells of the forward table:
17+
18+
- an agent at an identity route: refused by name before, now forwarded as the agent;
19+
- an agent at any other same-origin route: refused by name before, now forwarded as the agent when the connection holds `actions:execute` and `data:write`.
20+
21+
What does not change:
22+
23+
- An API key is still refused by name at an identity route.
24+
- A state-changing request to the metadata endpoint is never forwarded for an agent; it is refused `403` by name.
25+
- An agent without `data:write` is refused `403` by name, and `list_actions` marks those actions the same way.
26+
- Nothing the target mints, such as a rotated session token or cookie, comes back to an agent.
27+
- An OAuth access token presented directly to the data API or to an identity route is still refused.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
---
4+
5+
feat(service-automation): a suspended run resumes on the flow body it started on, not on the definition registered under its name (#28405)
6+
7+
Clause-②: yes (widening: a nullable `flow_checksum` column on `sys_automation_run`, the optional `SuspendedRun.flowChecksum`, and `AutomationEngine.setFlowHistorySource` with its exported `FlowHistorySource` type)
8+
Metadata-protocol: none
9+
10+
An approval or screen step can wait for days. A flow republished meanwhile used to move the waiting run onto the new definition, or end it `RUN_NOT_FOUND` when its parked node was renamed. A customer can now change a flow without breaking the runs already in flight.
11+
12+
- **What a run records.** At its pause, the content checksum of the body it is executing: `hashSpec(body, 'flow')`, the checksum `sys_metadata_history` keys a stored flow's versions by. It is kept in the new `sys_automation_run.flow_checksum` column. `flow_version` stays the author's display number, which two bodies can share.
13+
- **What a resume runs.** The body with that checksum: the armed definition when it matches, else the stored version read back from the metadata history (`getByHash`), else a body this process registered under the name (a code-loaded one). The pre-flight `unresumableSuspensionCause` classifies through the same read. New runs keep starting on the armed definition.
14+
- **Unchanged.** A row written before this column (no checksum) resumes on the armed definition, its node checked, as before. A flow no longer registered at all is still `RUN_NOT_FOUND`.
15+
- **A pinned body that cannot be recovered anywhere** (a code package upgraded under the run) resumes on the armed definition, node checked, and logs a `warn` naming the flow version and checksum it could not recover.
16+
- **A metadata history that cannot be read** answers the retryable `STORE_UNAVAILABLE` and leaves the run parked, as an unreadable suspended-run store already does.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/runtime': patch
3+
'@objectstack/client': patch
4+
---
5+
6+
fix(runtime): the package doors record the signed-in caller in metadata history, never a name the request body supplies
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
Metadata history and package commits are what an administrator reads to decide what to roll back and whom to ask. Five package doors — `POST /packages/:id/discard-drafts`, `POST /packages/:id/commits/:commitId/revert`, `POST /packages/:id/rollback`, `POST /packages/:id/adopt-orphans` and `POST /packages/:id/duplicate` — and the app re-save that `POST /packages/:id/publish-drafts` performs to unhide a package's apps used to record whatever `actor` the request body named, so any caller allowed to manage metadata could make a change look as if someone else made it.
12+
13+
They now record the request's authenticated user, the same identity the single-item metadata doors record. A body `actor` is ignored, not refused: a client that still sends one keeps working and is recorded as itself. A system call with no user keeps recording no actor (`null`), as before.
14+
15+
In `@objectstack/client`, the `actor` option of `packages.discardDrafts`, `packages.revertCommit`, `packages.rollback`, `packages.adoptOrphans` and `packages.duplicate` is marked deprecated: the server ignores it. Drop it from your calls; nothing else changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-data eval case 3 answers the code-defined datasource credential route and pins it
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **Before.** `evals/hooks-security-seeds-datasources.json` case 3 (a read-only `legacy_customer` object over the `customers` table of a Postgres reporting database) answered "a `defineDatasource` entry (`credentialsRef`, never inline credentials)". `rules/datasources.md` now teaches that a datasource defined in code reads its password at connect from `OS_DATASOURCE_<NAME>_PASSWORD` behind the host switch `OS_DATASOURCE_ENV_CREDENTIALS`, and that nothing mints a `sys_secret:` handle for one; the eval's `must_contain` pinned neither route, so the eval stayed green while its model answer taught a handle the connect could never resolve.
11+
- **Now.** The model answer names the environment route the rule teaches (`OS_DATASOURCE_REPORTING_PASSWORD` for a datasource named `reporting`, the switch and the hosts that default it on), `schemaMode: 'external'`, the object's `datasource` / `external.remoteName` / `columnMap` binding and the closed write gate (`allowWrites`, `writable`). `must_contain` keeps `defineDatasource`, `datasource`, `remoteName`, `columnMap` and `schemaMode` and adds `OS_DATASOURCE_ENV_CREDENTIALS` and `_PASSWORD`, so an answer that teaches only the old route goes red.
12+
- Eval fixtures are measured but not ratcheted; no SKILL.md, rules, references, schema, key or behaviour changes.

‎.github/workflows/ci.yml‎

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,19 @@ jobs:
173173
# the objectui skill bundle; see the filter below);
174174
# ui_consumers — one of the seven packages objectui installs from this
175175
# tree changed, so the Console is compiled (Type Check
176-
# UI) and built (Build & E2E UI) against the new shape in
177-
# the PR that moves it;
176+
# UI), built (Build & E2E UI) and tested (Test UI, since
177+
# objectstack#28220) against the new shape in the PR
178+
# that moves it;
178179
# ui_tree — `ui/package.json` exists in this checkout.
179180
# On merge_group `ui` and `ui_consumers` come from the queue diff
180181
# (objectstack#25867): an entry whose merged diff against
181182
# `merge_group.base_sha` touches no ui path and none of the seven
182183
# packages skips the five ui jobs, exactly as the same diff does on its
183-
# PR head; an entry that touches one runs them. If the step fails (the
184-
# base cannot be fetched, the diff errors), it is `continue-on-error`
185-
# there, its outputs are empty and `|| 'true'` runs every ui job.
184+
# PR head; an entry that touches one runs them (Lint UI reads `ui`
185+
# alone, so one of the seven by itself does not start it). If the step
186+
# fails (the base cannot be fetched, the diff errors), it is
187+
# `continue-on-error` there, its outputs are empty and `|| 'true'` runs
188+
# every ui job.
186189
#
187190
# `ui_tree` is what keeps the ui jobs SKIPPED, not failed, on a tree that
188191
# does not carry ui/ yet: `ui` and `ui_consumers` fall back to 'true' on
@@ -557,9 +560,11 @@ jobs:
557560
# skipped on the PR and in the queue alike.
558561
- 'package.json'
559562
# The seven packages objectui installs from this tree (the set its
560-
# `.objectstack-pin` used to pack). A change here compiles and builds
561-
# the Console in the same PR — the check the retired Spec Shape Gate
562-
# ran hourly against a clone of objectui main.
563+
# `.objectstack-pin` used to pack). A change here compiles, builds
564+
# and tests the Console in the same PR — the check the retired Spec
565+
# Shape Gate ran hourly against a clone of objectui main. Test UI
566+
# reads this list since objectstack#28220: its selector already
567+
# turns full for any of these packages.
563568
ui_consumers:
564569
- 'packages/spec/**'
565570
- 'packages/client/**'
@@ -3727,10 +3732,25 @@ jobs:
37273732
# non-documentation root file, `patches/`, one of the seven packages the
37283733
# `ui_consumers` filter names). The selector's header states the rules and
37293734
# what it does not see; the full battery on `main` is the backstop.
3735+
#
3736+
# ── Test UI: when the shards start (objectstack#28220, ruling A) ─────────
3737+
# On `ui` OR `ui_consumers`, the shape Build UI Deps, Type Check UI and
3738+
# Build & E2E UI already read. Until this entry the shards read `ui` alone,
3739+
# so a diff confined to one of the seven packages compiled and built the
3740+
# Console against the new shape and never ran a ui test that pins it: the
3741+
# selector above already answered `mode=full` for such a diff, but the job
3742+
# it answers in never started. The queue build of objectstack#28192
3743+
# (packages/lint/** + packages/metadata-protocol/**, run 41091107812)
3744+
# skipped all sixteen shards; the next queue build that started them
3745+
# (objectstack#28197) failed a ui test that imports @objectstack/lint, and a
3746+
# bystander was ejected for it. Which files run stays the selector's answer.
3747+
# The Test UI aggregate below explains a skip only when both outputs said
3748+
# false, so an `if:` that drops `ui_consumers` again reds there on the first
3749+
# such diff. Lint UI keeps `ui` alone: its eslint reads none of the seven.
37303750
test-ui:
37313751
name: Test UI (${{ matrix.shard }}/16)
37323752
needs: [filter, ui-deps]
3733-
if: ${{ !cancelled() && needs.filter.outputs.ui_tree != 'false' && needs.filter.outputs.ui != 'false' }}
3753+
if: ${{ !cancelled() && needs.filter.outputs.ui_tree != 'false' && (needs.filter.outputs.ui != 'false' || needs.filter.outputs.ui_consumers != 'false') }}
37343754
runs-on: ubuntu-latest
37353755
timeout-minutes: 30
37363756
permissions:
@@ -3895,7 +3915,8 @@ jobs:
38953915
#
38963916
# The verdict reads the matrix rollup `needs.test-ui.result`, and only
38973917
# `success` passes, with one exception: `skipped`, when `filter` concluded
3898-
# `success` AND said the diff reaches no ui path (the shards' own `if:`).
3918+
# `success` AND said the diff reaches no ui path and none of the seven
3919+
# packages ui consumes (the shards' own `if:`, objectstack#28220).
38993920
# That is #4928's skipped-only-when-filter-succeeded guard, and it makes a
39003921
# queue build or PR that touches no ui path read green here the way Lint
39013922
# UI and Build & E2E UI read `skipped` there. Everything else is red:
@@ -3926,17 +3947,18 @@ jobs:
39263947
OS_FILTER_RESULT: ${{ needs.filter.result }}
39273948
OS_UI_TREE: ${{ needs.filter.outputs.ui_tree }}
39283949
OS_UI: ${{ needs.filter.outputs.ui }}
3950+
OS_UI_CONSUMERS: ${{ needs.filter.outputs.ui_consumers }}
39293951
run: |
3930-
echo "Test UI (k/16) rollup: '$OS_TEST_UI_RESULT'; filter: '$OS_FILTER_RESULT' (ui_tree='$OS_UI_TREE', ui='$OS_UI')."
3952+
echo "Test UI (k/16) rollup: '$OS_TEST_UI_RESULT'; filter: '$OS_FILTER_RESULT' (ui_tree='$OS_UI_TREE', ui='$OS_UI', ui_consumers='$OS_UI_CONSUMERS')."
39313953
case "$OS_TEST_UI_RESULT" in
39323954
success)
39333955
echo "✓ Test UI: every shard concluded success."
39343956
;;
39353957
skipped)
3936-
if [ "$OS_FILTER_RESULT" = 'success' ] && { [ "$OS_UI_TREE" = 'false' ] || [ "$OS_UI" = 'false' ]; }; then
3937-
echo "✓ Test UI: the shards were skipped because filter found no ui path in this diff."
3958+
if [ "$OS_FILTER_RESULT" = 'success' ] && { [ "$OS_UI_TREE" = 'false' ] || { [ "$OS_UI" = 'false' ] && [ "$OS_UI_CONSUMERS" = 'false' ]; }; }; then
3959+
echo "✓ Test UI: the shards were skipped because filter found no ui path and no ui-consumed package in this diff."
39383960
else
3939-
echo "::error title=Test UI::the Test UI shards were skipped, but filter (result '$OS_FILTER_RESULT', ui_tree='$OS_UI_TREE', ui='$OS_UI') does not explain the skip. A skip passes only when filter succeeded and said the diff reaches no ui path (#4928)."
3961+
echo "::error title=Test UI::the Test UI shards were skipped, but filter (result '$OS_FILTER_RESULT', ui_tree='$OS_UI_TREE', ui='$OS_UI', ui_consumers='$OS_UI_CONSUMERS') does not explain the skip. A skip passes only when filter succeeded and said the diff reaches no ui path and none of the seven packages ui consumes (#4928)."
39403962
exit 1
39413963
fi
39423964
;;

0 commit comments

Comments
 (0)