Skip to content

Commit 61ab4eb

Browse files
Merge branch 'main' into claude/project-thread-tksaen
2 parents e1fe666 + 60b99f8 commit 61ab4eb

439 files changed

Lines changed: 27318 additions & 1477 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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-data and objectstack-upgrade SKILL.md replace their "moved verbatim" stubs with index entries
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-data/SKILL.md` and `skills/objectstack-upgrade/SKILL.md` still carried eight "→ Moved verbatim to …" lines left by the split that moved worked examples into `references/`, and the runs of `---` around them. Each line said where a section went and linked only the top of the file. In objectstack-data, four of them are now entries in § Quick Reference, with a fragment where the target is a section: Quick-Start Template, Metadata Protection, Seed Data & Fixtures, and Linting & Generation Quality. The Lifecycle Hooks stub is gone, because the index already has a Lifecycle Hooks entry pointing to `references/data-hooks.md`. In objectstack-upgrade, the three stubs are one-line entries in place, linking §2.3 (the worked R1), §3.4 (the report template) and the v17-canonical shapes block by their headings. The orphaned `---` lines are removed. No rule's teaching changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-platform's manifest example is type-checked, and the plugin-development examples compile against the kernel's Plugin contract
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-platform/SKILL.md` § Manifest Reference showed a bare `manifest: { … }` fragment. It is now a `defineStack({ manifest: { … } })` call under the opt-in check marker, so `check:skill-examples` compiles it against `@objectstack/spec`. The comment on `engines` that restated the paragraph below it is gone, and `description` is still marked optional. In `references/plugin-development.md`, the complete audit-plugin example set `type: 'plugin'` on a kernel plugin object. That value is outside the closed `PluginType` set (`'standard'` plus the core plugin types), so it does not compile, and `kernel.use()` refuses it at boot with `PLUGIN_CONTRACT_VIOLATION`. The example now sets `type: 'standard'`. The Plugin Interface overview imported the `Plugin` it then declares, and used `PluginType` without importing it. It now imports `PluginContext` and `PluginType`. No other rule changes. The other platform blocks in these four files stay unmarked. Each one needs `@objectstack/core`, a runtime package or a project-local module, or it is a fragment, and the checker resolves `@objectstack/spec` only.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/client': patch
3+
---
4+
5+
feat(client): `automation.*`, `actions.invoke` and `meta.getItem` take an optional `namespace` and send the qualified address (ADR-0150 D5)
6+
7+
Clause-②: yes (widening) — the by-name calls of `@objectstack/client` gain an optional `namespace` (the holding package's manifest `namespace`, or `'_env'` for an item authored in the environment) and build the qualified path the server's doors already read: `/automation/:ns/:name[/…]`, `/automation/trigger/:ns/:name`, `/actions/:ns/:object/:action` and `/meta/:type/:ns/:name`. The package entry exports the `QualifiedAddressOptions` and `ActionInvokeResult` types. Without a namespace every call sends exactly the request it sent before.
8+
Metadata-protocol: none
9+
10+
**Addressing an item by its package.** When two installed packages ship a flow, an action or a metadata item under the same name, the bare call is refused by the server, and these calls can now name the package that holds it:
11+
12+
- `automation.trigger`, `get`, `update`, `delete`, `toggle`, `clone`, `runs.get`, `getFlow`, `execute`, `getRun`, `resume` and `getScreen` take a trailing `{ namespace }`; `runs.list` and `listRuns` take `namespace` beside `limit`.
13+
- `actions.invoke` and `actions.invokeGlobal` take `namespace` beside `recordId` and `params`.
14+
- `meta.getItem` takes `namespace` beside `packageId`.
15+
- The twins on `client.environment(id)` (`meta.getItem`, `automation.getFlow`, `execute`, `listRuns`, `getRun`, `resume`, `getScreen`) take the same.
16+
17+
**A `409` keeps its candidates.** The server picks no holder: a name it cannot resolve to one item is answered `409 RESOURCE_CONFLICT`. The `automation.*` and `meta.getItem` calls reject with it, and the error's `details.candidates` lists every holder (`{ kind: 'package', packageId }`). `actions.invoke` and `invokeGlobal`, which return their failures instead of throwing, now carry those candidates on the result as `candidates`.
18+
19+
**Addresses with no qualified path are refused before sending.** The server reads the segment after each door in a fixed order (the door's literals, then `_env`, then an installed namespace, else the bare address), so some pairs would be read as another request: a namespace outside the package-namespace grammar, a namespace that spells a door literal (`trigger` on `/automation`, `global` on `/actions`), a flow named like a flow sub-resource (`runs`, `toggle`, `clone`, `trigger`) under a package namespace, a flow named like a door literal under any namespace, and a metadata item named like a `/meta` sub-resource (`history`, `tree`, …). Each is refused with `code: 'VALIDATION_ERROR'` and `httpStatus: 400` (on `actions.*`, as `success: false`) and nothing is sent. Call such a flow bare, and read such a metadata item with `packageId`.
20+
21+
`meta.getHistory`, `getReferences`, `getAudit` and `diffItem` take no `namespace`: their server routes read no package.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
'@objectstack/service-automation': patch
3+
'@objectstack/metadata-protocol': patch
4+
'@objectstack/core': patch
5+
---
6+
7+
feat(automation)!: the engine holds, arms and runs flows by `(package, name)`, so two packages' same-named flows are both armed, each in its own slot (ADR-0150 D4, part of #31696)
8+
9+
Clause-②: yes (narrowing)
10+
Metadata-protocol: none
11+
12+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export is removed or renamed. What narrows is runtime behaviour (a composition with no flow-name resolver, and a credential save under a name two packages hold), so there is nothing for a migration to rewrite and no tombstone. -->
13+
14+
**BREAKING** accept-set narrowing in `@objectstack/service-automation`, in two places (listed below), both in favour of the ADR-0150 red line that a bare name two packages hold is never resolved by picking one of them.
15+
16+
Before, when two packages shipped a flow of the same name, the boot pull armed neither and logged a collision. Now each package's flow is armed in its own slot. While one package holds a name, its slot is filed under the bare name, so every key, log line and answer stays as it was. While two packages hold it, each slot is filed under `PACKAGE/NAME`.
17+
18+
- A bare name with two holders is refused with `RESOURCE_CONFLICT`, naming both. This covers `execute`, `getFlow`, `toggleFlow`, `unregisterFlow`, `withdrawFlow`, the version history, the rollback and the flow credential reads. The engine never picks one. A name the registry holds under two packages counts as two holders even while the engine holds only one of their flows (the other's body refused): the bare doors still refuse it, and that one slot is reached only by its own package and not armed on its trigger. The slot doors (`executeSlot`, `getFlowSlot`, `getFlowSlots`, `flowSlotKey`, `toggleFlowSlot`, `withdrawFlowSlot`) serve each holder.
19+
- No flow name contains `/`, so a bare door answers a `PACKAGE/NAME` spelling as a flow it does not hold (`execute` and `toggleFlow`: not found; `getFlow`: `null`; the version history: empty). Main answered the same, since no flow was named so.
20+
- The only new way a flow of a sealed-clash name runs in this release is a `subflow` or `map` call from a flow of its own package, which resolves the shared name from the caller's package. Triggers stay off for such a flow until the trigger packages bind by slot, and say so once per slot.
21+
- A run reads its own flow: a screen's progress and a stored run go by the run's own package. A paused run (`sys_automation_run.flow_package`) is stored as its flow's name and package, never as a key, even when its slot's key moves while the run is in flight.
22+
- Flow credentials are not yet read by package: the flow credential channel reads and writes by name. So a credential read for a flow of a name two packages hold (an http node's signing secret, an inbound hook's secret) is refused, naming the flow and its package, and never answered from another package's rows. A third-party `FlowCredentialSource` is asked for such a flow only when it declares `readsByPackage: true`.
23+
- Stored rows are not byte-identical to before for a name one package holds: a paused run and a terminal history row now carry that package in `flow_package`, which earlier releases wrote as null and ignore when they read.
24+
25+
**The activation ledger is addressed by `(package, name)` for flows** (`@objectstack/core`: `MetadataActivationStoreOptions.addressing`, `MetadataActivationWriteOptions.adoptPackageless`; the flow stores use `'package-and-name'`, every other type keeps `'name'`). Switching one package's flow writes that package's row and never re-attributes another package's row of the name.
26+
27+
- A disable row that names no package, read while one package held the name, becomes that package's own row when a second package arrives after the boot's flow holders have sealed (`sealFlowHolders`, at `kernel:bootstrapped`). The second package's flow stays off until that write lands. If the write fails, both stay off and one warning says why. A second package that arrives during the boot (an installed package's `kernel:ready` rehydrate) binds nothing: which package arrived first is boot order, not the row's owner, so the row is read as below.
28+
- A disable row that names no package, first read while two packages hold the name, keeps every package's flow of that name off that has no row of its own, with one warning. It is never bound to one of them later. To turn one on, switch that package's flow (`toggleFlowSlot`): that writes its own row.
29+
- An environment-authored body over a name two packages hold overlays neither, with one warning. Where that body changed something security-relevant (for example it removed an approval step), each package's own body now runs instead.
30+
31+
What narrows, and what an operator does about it:
32+
33+
1. **A composition with no flow-name resolver.** Before this release, such a composition armed one holder of a two-holder name by precedence and ran it on its trigger and on a bare `execute`. Now the bare name is refused and neither slot is armed on a trigger, so that flow stops running from its trigger and from `execute`. Run it through `executeSlot(packageId, name)`, or attach the resolver (`AutomationServicePlugin` does, unconditionally). Measured: 0 first-party compositions lack it. The five that register `AutomationServicePlugin` (`os serve`, the verify harness, the runtime's app artifact handler, the data-migration kernel, and the examples through `requires: ['automation']`) each run on a kernel with the ObjectQL service, and the plugin attaches the resolver at `init()`.
34+
2. **A credential save under a name two packages hold.** Before this release, such a save wrote and removed credential rows by name. Now a save or a publish that would write or remove a row of such a name is refused with `RESOURCE_CONFLICT`, naming both packages, and nothing is written: the save names no package, and every row of the name may be another package's credential. A save that writes and removes nothing still saves. Until the channel writes by package, change such a credential while one package holds the name.
35+
36+
Declared limits, not narrowings: a rolling upgrade across a sealed clash (a replica on an earlier release ignores `flow_package` and, with a resolver attached, fails such a paused run as unresumable, never continuing it on the other package's flow; finish the upgrade before resuming it). In a run of a flow whose name two packages hold, `@objectstack/plugin-approvals` still reads its flow by name for a send-back, a batch sign-off's map item and the step labels, so those answer `RESOURCE_CONFLICT` (fail closed) until the trigger packages bind by slot. The runtime's bare `getFlow` readers (the flow dispatch status, the start admission, the `/automation` doors and the MCP action listing) answer the same for such a name until those doors take a package.
37+
38+
Third-party `SuspendedRunStore` implementations that drop `flowPackage` make a paused run of a sealed-clash flow unresumable (it fails closed, never resumes on another package's flow). Third-party `FlowCredentialSource` implementations that do not declare `readsByPackage` are not asked for a sealed-clash flow's credentials: those reads are refused, naming the flow.
39+
40+
`@objectstack/metadata-protocol` fix: a package's declared `.custom` override of its own flow is now honored whichever same-named shipper registered first. Before, it was judged against the first shipper only.
41+
42+
New exports: `qualifiedFlowKey` and the `FlowSlot` type from `@objectstack/service-automation`; `MetadataActivationStoreOptions` and `MetadataActivationRowAddressing` from `@objectstack/core`. `FLOW_RUN_SLOT_KEY` (`Symbol.for('objectstack.automation.flowRunSlotKey')`) is a registry symbol and so readable from outside, though not exported. Widened signatures: `PackagedFlowSource` and `FlowCredentialSource` take an optional package, `FlowCredentialSource` gains an optional `readsByPackage`, `FlowCredentialChannel`'s constructor takes an optional shared-name reader, `SuspendedRun` and `RunRecord` gain an optional `flowPackage`, the stores' constructors take an optional `MetadataActivationStoreOptions`, and `AutomationEngine` gains `getRunFlow`, `flowKeyOfRun`, `flowActivationBinds`, `sealFlowHolders` and `packagedFlowSlotOwner`, and `FlowContender` and `FlowPrecedenceWinner` gain an optional `holder`.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/plugin-audit': patch
3+
---
4+
5+
feat(plugin-audit): register the audit checkpoint and signing-key objects ahead of the sealer
6+
7+
Clause-②: yes (widening) (two platform objects become registered; nothing main accepts is refused)
8+
Metadata-protocol: none (platform objects registered; no authorable key, value or metadata type moves)
9+
10+
The second slice of ADR-0154, in two parts. Nothing seals yet: no object declares `lifecycle.seal`, and the sealer and signer that write these objects land in the next part.
11+
12+
- **`@objectstack/plugin-audit`.** The plugin now registers `sys_audit_checkpoint` and `sys_audit_signing_key`. Their tables are provisioned at `kernel:ready` like the plugin's other objects. Both are private by default, written only by the platform, and empty in this release. Their labels and help text are in every locale bundle the plugin ships. `sys_audit_amendment` stays declared and unregistered until its first writer, the redaction amendments, lands.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/i18n': patch
3+
---
4+
5+
feat(ui): the hosted unmanaged install dialog shows and edits the namespace its copy takes
6+
7+
Clause-②: yes (widening) — `@object-ui/i18n` gains five `marketplace.install.targetNamespace.*` strings; `marketplaceApi`'s new `getInstallNamespace` export and optional `targetNamespace` input live in the private `@object-ui/app-shell`, so they publish nothing
8+
Metadata-protocol: none
9+
10+
On a hosted environment, an unmanaged install now draws a "Target namespace" field in the install dialog, pre-filled with the default the control plane would use (read through `GET /api/v1/cloud-connection/install-namespace`), and sends the value as `target_namespace`. When no default can be read (the runtime is not connected, or the control plane did not answer) the field starts empty and a typed name still installs; an empty field sends nothing and the control plane's default stands. A managed install draws no field and sends no namespace.
11+
12+
If the namespace belongs to another package, the dialog stays open, says the name is taken and asks for another. A malformed or reserved namespace shows the server's sentence beside the field. A second unmanaged copy of the same package is still refused, and no new namespace is offered for it, since a different namespace does not clear that refusal.
13+
14+
The strings are in all eleven locales of the `marketplace` namespace.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
'@objectstack/objectql': patch
3+
'@objectstack/rest': patch
4+
'@objectstack/service-automation': patch
5+
---
6+
7+
fix(objectql, rest, service-automation): a mapping name two packages hold is refused naming both, at `/meta`, the import door and the connector pull, instead of serving the first holder (ADR-0150 D3)
8+
9+
Clause-②: no (narrowing)
10+
Metadata-protocol: none
11+
12+
<!-- adr-0087: not-required (no-migration-prescription) no metadata shape, schema, stored row or registered node type changes: the change is which mapping a by-name read answers when two packages hold its name, the stored metadata is read exactly as before, so there is nothing for `objectstack migrate meta` to rewrite -->
13+
14+
`mapping` is now one of the types whose by-name readers consult `(package, name)`. The import door's `mappingName` (`POST /api/v1/data/:object/import` and the async import job) and the connector pull (a job's `pull`) read the mapping naming no package, so they resolve it as a caller with no package: the environment's own mapping, else the one package that holds the name. One holder answers exactly as before, including a package's mapping imported into an object another package owns.
15+
16+
**BREAKING** for answers that served one of two holders by registration order, now refused naming every holder (first-party count: 0; no example app or first-party package declares a mapping name another package declares):
17+
18+
1. `GET /api/v1/meta/mapping/NAME` for a name two packages hold answered `200` with the first registered package's mapping. It is now `409 RESOURCE_CONFLICT` naming both.
19+
2. An import by `mappingName` for such a name read the first holder's mapping: `200` when its target was the request's object, else `400 MAPPING_TARGET_MISMATCH` (the importer of the other package's object could never use its own mapping). It is now `409 RESOURCE_CONFLICT` naming both, and no row is written.
20+
3. A connector pull of such a name pulled through the first holder's mapping, writing into that mapping's target. It is now refused before any call or write: the pull fails with `409 RESOURCE_CONFLICT` (reason `mapping_name_refused`) naming both, and the job run records that failure.
21+
4. `GET /api/v1/meta/mapping/NAME?package=X`, `/meta/mapping/NS/NAME` and `/meta/mapping/_env/NAME`, where `X`, `NS` or the environment does not hold the name, answered `200` with the holder's mapping. They are now `409 RESOURCE_CONFLICT` naming the holder: the address is the exact qualifier (ADR-0150 D5), as it already is for apps, pages, dashboards, reports, books, analytics cubes, tools, skills, agents and APIs.
22+
23+
The fix for each:
24+
25+
- FROM a bare read of a two-holder name TO `?package=<id>` or `/meta/mapping/<namespace>/NAME`.
26+
- FROM importing or pulling by a two-holder name TO renaming one of the two mappings; the import door does not yet take a package, and the pull does not yet read the `callerPackageId` its request carries.
27+
- FROM an address naming a package that does not hold the name TO the holder the refusal names.
28+
29+
**TypeScript:** `ConnectorPullRefusalReason` (`@objectstack/service-automation`) gains the member `mapping_name_refused`. A `switch` over the union that must be exhaustive needs a case for it; code that only reads `reason` is unaffected.

0 commit comments

Comments
 (0)