Skip to content

Commit 0d0078f

Browse files
committed
Merge branch 'main' of https://github.com/objectstack-ai/objectstack into claude/project-thread-j4n4b0
# Conflicts: # packages/runtime/src/domains/packages.ts
2 parents 23ca501 + f19350b commit 0d0078f

392 files changed

Lines changed: 13031 additions & 3439 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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): four published skills follow merged code — audit sealing, the compare widget's date key, i18n wording, nested relation conditions
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-data/rules/lifecycle.md` § Sealing: each sealed hour becomes one checkpoint, or consecutive checkpoints of at most 10,000 rows, per organization chain; `chainField` (optional, default `tenant_id`) names the chain column and is fixed once checkpoints exist; `os audit verify` exits 1 on a changed row or a chain fault, `listed_twice` included. The graded eval case in `evals/objects-fields-relationships.json` says the same.
11+
12+
`skills/objectstack-ui/rules/dashboards.md` § `compareTo`: a compare widget's window reaches the dataset query as a time dimension named after the date-range field, so the dataset declares a date dimension of that name (or one over a related-record date path), else `400 INVALID_FIELD`.
13+
14+
`skills/objectstack-i18n/SKILL.md`: the stale aside about the schema docstring is gone (activity-milestone summaries keep their `{field}` tokens); the wiring sentence is a statement again ("You do not need to wire this plugin"); `getSourceLocale()` returns the declared locale only, else `undefined`; the i18n routes answer signed-in callers, and the locales answer carries the declared `fallbackChain`.
15+
16+
`skills/objectstack-query/SKILL.md` and `rules/filters.md`: on a read verb a single-valued relation condition is one in-database subquery per relationship, up to three relationships, on drivers declaring `readableIdsLeaf` (MongoDB and OData refuse it); the 1000-id cap stays only where ids are still read. `filters.md` § Operator Reference lists one example per operator; the SQL equivalents live in `SKILL.md` **Filter Operators**.
17+
18+
No token ceiling moved: every addition is paid by a deletion in the same file.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
fix(app-shell): the tool preview says beside "Open in API Console" that a call needing the server model runs in a chat
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The tool preview's "Open in API Console" link presets the tool's direct run route. That run happens outside a chat turn, and on the hosted cloud it gets no server-side model, so a call that needs one is refused there with nothing on the preview saying why. The link now stays for every tool with a short note beside it (also the link's accessible description): it runs the tool directly, outside a chat, and on the hosted cloud a call that needs the server-side model is refused, so try it in a chat. The note names no tool: tool metadata carries no field saying which calls need the model, and for some tools that depends on the call's arguments. New studio string `engine.toolPreview.openApiConsoleNote` in `en` and `zh`; other languages fall back to `en`.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
feat(spec): `PLATFORM_TOOLS_BY_PACKAGE['service-ai-studio']` lists `list_flow_runs`
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
The cloud build agent gains a read-only `list_flow_runs` tool: it reads one flow's recent runs as the caller, so the agent can answer "did my automation work?" from a run's own outcome. The registry lists the name in its alphabetical place, so `PLATFORM_PROVIDED_TOOL_NAMES` carries it and `isPlatformProvidedToolName('list_flow_runs')` answers `true`. A skill whose `tools[]` names `list_flow_runs` now resolves under ADR-0109 reference integrity instead of being reported as a fictional tool (`ai-skill-tool-unresolved`). The chat panel's step label for the tool is in every built-in locale pack. No schema shape changes and no export is added or removed.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'@objectstack/lint': minor
3+
'@objectstack/spec': patch
4+
---
5+
6+
fix(lint)!: publish-time checks for views, dashboards and the app shell that save and do not work
7+
8+
Clause-②: yes (narrowing)
9+
Metadata-protocol: narrowed
10+
11+
<!-- adr-0087: registered publish-refuses-views-and-dashboards-that-save-and-do-not-work -->
12+
13+
**BREAKING** for a list view filter keyed on a `formula` field: it was accepted before and is refused now, with the fix named in the finding. The schema is unchanged and stored metadata is not rewritten or refused at boot; the refusal comes at the next publish, and from `os validate` / `lint` / `compile` / `build`.
14+
15+
- `list-view-filter-field-virtual` (error): a list view's own `filter`, or a `userFilters.tabs[]` preset, keyed on a field computed on read (`formula`). The engine refuses every query filtered on such a field (`400 INVALID_FIELD`), so the view opens on that error every time. Refused at the runtime publish door on a `view` write and on an `object` write through the object's own `listViews`. A dotted key whose head is a formula stays `list-view-field-dotted`; the filter bar's field list (`userFilters.fields`) is not judged.
16+
- `dashboard-without-widgets` (warning, every door): a dashboard with `widgets: []`, which opens on its header over an empty canvas. Advisory because the shape breaks no request and the platform's own create steps (Studio, the spec's create seed, `os generate dashboard`) write it and fill it afterwards.
17+
- `list-view-kanban-group-field-uncategorical` (warning): a `kanban` board grouped by a field with no fixed set of lanes. A text, number or date field gets one lane per distinct value on the loaded cards and no lane for a value no card holds; a multi-valued field puts a card holding several values in one lane named by all of them. A `select` / `radio`, a boolean and a single-valued reference are silent. Runs on the runtime `view` and `object` doors.
18+
- `app-navigation-empty` (warning): an app with no entry in `navigation` nor in any `areas[].navigation` (a separator or an empty group counts as nothing), and no navigation the stack contributes into it. It opens on the "no access" empty state for every member. Runs on the runtime `app` door.
19+
- `object-unreachable-from-navigation` and `object-without-view` (warnings, `os validate` / `lint` / `build` only): an object no navigation entry opens (not judged: a `master_detail` child, an object another object names in `relatedLists`, an object a page names when navigation opens that page, an API-disabled object, and a stack with no app), and an object navigation opens as a list that declares no `listViews` entry and no bound `views` item, which then opens on the console's own "All records" tab. Fix: `listViews: { all: { type: 'grid', columns: [...] } }` on the object, or a `views` entry bound to it.
20+
21+
## FROM → TO
22+
23+
- `filter: [{ field: 'is_overdue', operator: 'equals', value: true }]` where `is_overdue` is a `formula` → `filter: [{ field: 'due_date', operator: 'lt', value: '{today}' }]` (the stored field the formula reads), or a stored field written when its sources change.
24+
25+
`@objectstack/lint` exports six rule id constants (`LIST_VIEW_FILTER_FIELD_VIRTUAL`, `LIST_VIEW_KANBAN_GROUP_FIELD_UNCATEGORICAL`, `DASHBOARD_WITHOUT_WIDGETS`, `APP_NAVIGATION_EMPTY`, `OBJECT_UNREACHABLE_FROM_NAVIGATION`, `OBJECT_WITHOUT_VIEW`) so `os explain` carries an entry for each; the two new rule functions are not exported. `@objectstack/spec` adds only the upgrade-guide entry `publish-refuses-views-and-dashboards-that-save-and-do-not-work`.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): `objectstack-data` states the bounds of a hook transaction, and the measured MongoDB and PostgreSQL rule
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-data/references/data-hooks.md`, the `api.transaction` row: `ctx.api.transaction` goes one level per body (a nested call is refused, "nested ctx.api.transaction is not supported"); inside an open unit it joins it, including a unit an action body opened with its own `ctx.api.transaction`, and the hooks of a write made inside that unit run in it and join it too; a write to another datasource is refused except an append-only ledger (`lifecycle.class` `audit` / `telemetry` / `event`), written outside the unit; on PostgreSQL and a MongoDB replica set a failed statement aborts the whole unit even when caught; a driver with no transactions runs the callback with none and no warning.
11+
12+
The `before*` Transaction cell drops "MongoDB needs a replica set (read in code, not measured)" for the measured rule: a standalone MongoDB refuses every write of such a transaction (`501 NOT_IMPLEMENTED`) and a single-node replica set is enough; on PostgreSQL and a MongoDB replica set a failed `ctx.api` statement refuses the outer write even when caught, logged or retried (`25P02` / `251`), while SQLite lets it through. Two eval cases in `skills/objectstack-data/evals/hooks-security-seeds-datasources.json` expect the same.
13+
14+
Nothing an author can write changes. The page stays at its token ceiling (10120): the added sentences are paid by cutting restating code comments and labels in the same file.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol): the served type schemas no longer offer the keys the platform stamps
6+
7+
Clause-②: no (narrowing — a key leaves a served description; nothing a client could save before is refused)
8+
Metadata-protocol: none
9+
10+
`GET /meta/types` (and the MCP draft door's `contract: true` read of `list_metadata_items`, which answers from it) describes what an author may write for each metadata type. Every type spreads the ADR-0010 protection envelope, so the served JSON Schema listed `_lock`, `_lockReason`, `_lockSource`, `_provenance`, `_packageId`, `_packageVersion` and `_lockDocsUrl` among each type's properties, and again inside every schema embedded in one (an object's field entries, each arm of a view). Studio's panels and an MCP client told to write only the keys the contract shows read those as writable.
11+
12+
They are the platform's to write: a package's loader and the registration stamp them, and an author declares a lock through `protection` in a code package's source. The served schema now leaves them out, at every depth, the same way it already leaves out a retired key's tombstone.
13+
14+
- **What a client sends is unchanged.** The save door refuses and accepts exactly what it did, and the Zod schemas still declare the envelope, so a served body re-parses.
15+
- **What changes is the description only.** A client that built a form or a key list from the served schema no longer shows these seven keys.
16+
17+
Nothing to migrate.
18+
19+
<!-- adr-0087: not-required (no-migration-prescription) No schema key, accepted value or metadata type is added, removed or renamed, and nothing stored is rewritten: the Zod schemas keep declaring the envelope and the save door is unchanged. What moves is the served JSON Schema description, which stops listing seven keys only the platform writes; there is nothing for a migration to rewrite. -->
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@object-ui/types': minor
3+
'@objectstack/spec': minor
4+
---
5+
6+
feat(types)!: a static chart node's series refuses the renderer-internal `measureFormat` carrier by name
7+
8+
Clause-②: yes (narrowing)
9+
Metadata-protocol: narrowed
10+
11+
<!-- adr-0087: registered chart-series-measure-format-carrier-refused -->
12+
13+
**BREAKING** accept-set narrowing on the static SDUI `chart` node: `ChartDataSeriesSchema` refuses `series[].measureFormat`, and the `ChartDataSeries` TS twin types it `?: never`.
14+
15+
`measureFormat` (`{ format, currency, percentScale }`) is the chart renderer's internal carrier of a dataset measure's display facts. The report and dashboard chart producers fill it from the dataset answer so a value axis prints the measure's units; it is not meant to be authored. Until now the non-strict series schema refused only its sibling `aggregate` by name, so a hand-written `measureFormat` on a static chart node was kept and honoured, and could claim a currency or a percent scale the data does not have.
16+
17+
| FROM | TO |
18+
|:--|:--|
19+
| `{ type: 'chart', series: [{ name: 'amount', measureFormat: { format: '0,0.00', currency: 'CNY' } }] }` | delete `measureFormat`; to print the value axis in a unit, write the axis `format` on the chart: `yAxis: [{ field: 'amount', format: '$0,0' }]` |
20+
21+
The one-line fix: delete `measureFormat` from every authored chart series. The parse now refuses it with one issue at `series.N.measureFormat` naming the key (a series that also writes `aggregate` is refused at both), and a typed `ChartDataSeries` literal that writes it fails `tsc`. Report and dashboard charts are unchanged: their producers keep filling the carrier past this schema. The D3 entry `chart-series-measure-format-carrier-refused` (`@objectstack/spec` migration registry) records the narrowing; there is no D2 conversion, because the carrier has no authored equivalent to rewrite into.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/mcp': patch
3+
---
4+
5+
fix(mcp): a tool argument that fails the published JSON Schema is refused with the platform's coded refusal
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On both MCP doors (Streamable HTTP and stdio), a `tools/call` whose arguments fail the tool's published JSON Schema used to come back as the SDK's own text, `MCP error -32602: Input validation error: …`, with no `code` and no `status`, and with every unknown key echoed exactly as sent (a raw newline or NUL included, however many there were).
11+
12+
It now answers the same coded tool error every other refusal on these doors answers: `isError: true`, one text content holding `{ "error": { "code": "VALIDATION_ERROR", "status": 400, "message": "Invalid arguments for tool NAME: …" } }`. The message still names each problem at its path, and an unknown key's rename advice (`sort` → `orderBy`) is kept. The keys are echoed bounded and sanitised: at most five unknown keys per object are named and the rest are counted, each key is cut at 64 characters, and every control character is written as its escape. A client that matched the `-32602` text should branch on `error.code` instead.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/scenarios': patch
3+
---
4+
5+
test(scenarios): the `order_to_cash` card asks for a field no object records
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The open card library's `order_to_cash` card gains an eleventh question, `cedar_shipping_charges`: "How much shipping is charged on Cedar Logistics' sales orders?" (zh 「Cedar Logistics 的销售订单上运费一共是多少?」). No seeded object records a shipping charge, so its truth is `unanswerable` and a correct reply says the data does not record it rather than inventing a figure. The card's other unanswerable question asks for an object the app does not have (a commission plan); this one names a field the order itself lacks, the case the data tools answer as not recorded.
11+
12+
The card README's default band is now 8–11 questions (was 8–10), and its per-kind table counts two `unanswerable` turns on `order_to_cash`. The card's sha256 moves, so ask-round records split at the new hash; the verified build is unchanged and reads the same against the new card (Build 174/174), and its provenance re-pins `cardSha256` with an `amended` entry.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/data-objectstack': patch
3+
---
4+
5+
fix(data-objectstack): `uploadFile` and `uploadFiles` send through the injected `fetch`, not the global one
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The two upload methods called the global `fetch`, which sends the session cookie alone. A host that hands the adapter its authenticated fetch (the console hands `createAuthenticatedFetch()`) had every other request signed with the stored bearer, while an upload under a bearer-only session (the cookie replaced, blocked as third-party, or cleared) went out anonymous. Both methods now call the injected `fetch` as given. They still sit outside the connection-state tracking, so an upload's outcome does not move the connection state, as the README already says. The request URL, body and headers are unchanged.

0 commit comments

Comments
 (0)