From fe1b8116cba0a3316c7d18b8019f979b4da06917 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 9 Jul 2026 11:14:02 +0000 Subject: [PATCH] chore: version packages --- .changeset/adr-0090-p1-breaking-wave.md | 47 ---- .changeset/adr-0090-p2-audience-anchors.md | 25 -- .../adr-0090-p3-linter-delegated-admin.md | 21 -- .changeset/adr-0090-p4-explain-matrix.md | 16 -- .changeset/capability-reference-lint.md | 31 --- .changeset/fls-mask-write-response.md | 10 - .../hono-server-405-method-not-allowed.md | 17 -- .changeset/mcp-default-on.md | 29 --- .changeset/mcp-oauth-authorization.md | 56 ----- .../per-operation-required-permissions.md | 22 -- .changeset/redos-email-regex-validators.md | 13 - .../remove-dead-compliance-subsystems.md | 36 --- .../secure-by-default-system-objects.md | 34 --- .changeset/skill-document-action-tools.md | 17 -- .changeset/skill-surface-drift-guard.md | 12 - .changeset/studio-namespace-prefix.md | 29 --- examples/app-crm/CHANGELOG.md | 17 ++ examples/app-crm/package.json | 2 +- examples/app-showcase/CHANGELOG.md | 21 ++ examples/app-showcase/package.json | 2 +- examples/app-todo/CHANGELOG.md | 27 ++ examples/app-todo/package.json | 2 +- examples/embed-objectql/CHANGELOG.md | 18 ++ examples/embed-objectql/package.json | 2 +- packages/adapters/hono/CHANGELOG.md | 13 + packages/adapters/hono/package.json | 2 +- packages/apps/account/CHANGELOG.md | 17 ++ packages/apps/account/package.json | 2 +- packages/apps/setup/CHANGELOG.md | 17 ++ packages/apps/setup/package.json | 2 +- packages/apps/studio/CHANGELOG.md | 17 ++ packages/apps/studio/package.json | 2 +- packages/cli/CHANGELOG.md | 170 +++++++++++++ packages/cli/package.json | 2 +- packages/client-react/CHANGELOG.md | 17 ++ packages/client-react/package.json | 2 +- packages/client/CHANGELOG.md | 16 ++ packages/client/package.json | 2 +- packages/cloud-connection/CHANGELOG.md | 19 ++ packages/cloud-connection/package.json | 2 +- .../connectors/connector-mcp/CHANGELOG.md | 16 ++ .../connectors/connector-mcp/package.json | 2 +- .../connectors/connector-openapi/CHANGELOG.md | 16 ++ .../connectors/connector-openapi/package.json | 2 +- .../connectors/connector-rest/CHANGELOG.md | 16 ++ .../connectors/connector-rest/package.json | 2 +- .../connectors/connector-slack/CHANGELOG.md | 16 ++ .../connectors/connector-slack/package.json | 2 +- packages/console/CHANGELOG.md | 2 + packages/console/package.json | 2 +- packages/core/CHANGELOG.md | 69 ++++++ packages/core/package.json | 2 +- packages/create-objectstack/CHANGELOG.md | 2 + packages/create-objectstack/package.json | 2 +- packages/dogfood/CHANGELOG.md | 22 ++ packages/dogfood/package.json | 2 +- packages/downstream-contract/CHANGELOG.md | 15 ++ packages/downstream-contract/package.json | 2 +- packages/formula/CHANGELOG.md | 48 ++++ packages/formula/package.json | 2 +- packages/lint/CHANGELOG.md | 68 ++++++ packages/lint/package.json | 2 +- packages/mcp/CHANGELOG.md | 114 +++++++++ packages/mcp/package.json | 2 +- packages/metadata-core/CHANGELOG.md | 15 ++ packages/metadata-core/package.json | 2 +- packages/metadata-fs/CHANGELOG.md | 6 + packages/metadata-fs/package.json | 2 +- packages/metadata-protocol/CHANGELOG.md | 47 ++++ packages/metadata-protocol/package.json | 2 +- packages/metadata/CHANGELOG.md | 55 +++++ packages/metadata/package.json | 2 +- packages/objectql/CHANGELOG.md | 63 +++++ packages/objectql/package.json | 2 +- packages/observability/CHANGELOG.md | 15 ++ packages/observability/package.json | 2 +- packages/platform-objects/CHANGELOG.md | 96 ++++++++ packages/platform-objects/package.json | 2 +- packages/plugins/driver-memory/CHANGELOG.md | 16 ++ packages/plugins/driver-memory/package.json | 2 +- packages/plugins/driver-mongodb/CHANGELOG.md | 16 ++ packages/plugins/driver-mongodb/package.json | 2 +- packages/plugins/driver-sql/CHANGELOG.md | 18 ++ packages/plugins/driver-sql/package.json | 2 +- .../plugins/driver-sqlite-wasm/CHANGELOG.md | 17 ++ .../plugins/driver-sqlite-wasm/package.json | 2 +- packages/plugins/embedder-openai/CHANGELOG.md | 15 ++ packages/plugins/embedder-openai/package.json | 2 +- .../plugins/knowledge-memory/CHANGELOG.md | 17 ++ .../plugins/knowledge-memory/package.json | 2 +- .../plugins/knowledge-ragflow/CHANGELOG.md | 17 ++ .../plugins/knowledge-ragflow/package.json | 2 +- .../plugins/plugin-approvals/CHANGELOG.md | 20 ++ .../plugins/plugin-approvals/package.json | 2 +- packages/plugins/plugin-audit/CHANGELOG.md | 18 ++ packages/plugins/plugin-audit/package.json | 2 +- packages/plugins/plugin-auth/CHANGELOG.md | 126 ++++++++++ packages/plugins/plugin-auth/package.json | 2 +- packages/plugins/plugin-dev/CHANGELOG.md | 31 +++ packages/plugins/plugin-dev/package.json | 2 +- packages/plugins/plugin-email/CHANGELOG.md | 28 +++ packages/plugins/plugin-email/package.json | 2 +- .../plugins/plugin-hono-server/CHANGELOG.md | 33 +++ .../plugins/plugin-hono-server/package.json | 2 +- packages/plugins/plugin-reports/CHANGELOG.md | 18 ++ packages/plugins/plugin-reports/package.json | 2 +- packages/plugins/plugin-security/CHANGELOG.md | 146 +++++++++++ packages/plugins/plugin-security/package.json | 2 +- packages/plugins/plugin-sharing/CHANGELOG.md | 54 ++++ packages/plugins/plugin-sharing/package.json | 2 +- packages/plugins/plugin-webhooks/CHANGELOG.md | 17 ++ packages/plugins/plugin-webhooks/package.json | 2 +- packages/rest/CHANGELOG.md | 77 ++++++ packages/rest/package.json | 2 +- packages/runtime/CHANGELOG.md | 158 ++++++++++++ packages/runtime/package.json | 2 +- packages/sdui-parser/CHANGELOG.md | 2 + packages/sdui-parser/package.json | 2 +- .../services/service-analytics/CHANGELOG.md | 16 ++ .../services/service-analytics/package.json | 2 +- .../services/service-automation/CHANGELOG.md | 50 ++++ .../services/service-automation/package.json | 2 +- packages/services/service-cache/CHANGELOG.md | 17 ++ packages/services/service-cache/package.json | 2 +- .../service-cluster-redis/CHANGELOG.md | 16 ++ .../service-cluster-redis/package.json | 2 +- .../services/service-cluster/CHANGELOG.md | 16 ++ .../services/service-cluster/package.json | 2 +- .../services/service-datasource/CHANGELOG.md | 16 ++ .../services/service-datasource/package.json | 2 +- packages/services/service-i18n/CHANGELOG.md | 16 ++ packages/services/service-i18n/package.json | 2 +- packages/services/service-job/CHANGELOG.md | 18 ++ packages/services/service-job/package.json | 2 +- .../services/service-knowledge/CHANGELOG.md | 16 ++ .../services/service-knowledge/package.json | 2 +- .../services/service-messaging/CHANGELOG.md | 16 ++ .../services/service-messaging/package.json | 2 +- .../services/service-package/CHANGELOG.md | 16 ++ .../services/service-package/package.json | 2 +- packages/services/service-queue/CHANGELOG.md | 18 ++ packages/services/service-queue/package.json | 2 +- .../services/service-realtime/CHANGELOG.md | 18 ++ .../services/service-realtime/package.json | 2 +- .../services/service-settings/CHANGELOG.md | 20 ++ .../services/service-settings/package.json | 2 +- .../services/service-storage/CHANGELOG.md | 19 ++ .../services/service-storage/package.json | 2 +- packages/spec/CHANGELOG.md | 231 ++++++++++++++++++ packages/spec/package.json | 2 +- packages/triggers/trigger-api/CHANGELOG.md | 16 ++ packages/triggers/trigger-api/package.json | 2 +- .../trigger-record-change/CHANGELOG.md | 49 ++++ .../trigger-record-change/package.json | 2 +- .../triggers/trigger-schedule/CHANGELOG.md | 16 ++ .../triggers/trigger-schedule/package.json | 2 +- packages/types/CHANGELOG.md | 38 +++ packages/types/package.json | 2 +- packages/verify/CHANGELOG.md | 32 +++ packages/verify/package.json | 2 +- packages/vscode-objectstack/CHANGELOG.md | 2 + packages/vscode-objectstack/package.json | 2 +- 162 files changed, 2659 insertions(+), 488 deletions(-) delete mode 100644 .changeset/adr-0090-p1-breaking-wave.md delete mode 100644 .changeset/adr-0090-p2-audience-anchors.md delete mode 100644 .changeset/adr-0090-p3-linter-delegated-admin.md delete mode 100644 .changeset/adr-0090-p4-explain-matrix.md delete mode 100644 .changeset/capability-reference-lint.md delete mode 100644 .changeset/fls-mask-write-response.md delete mode 100644 .changeset/hono-server-405-method-not-allowed.md delete mode 100644 .changeset/mcp-default-on.md delete mode 100644 .changeset/mcp-oauth-authorization.md delete mode 100644 .changeset/per-operation-required-permissions.md delete mode 100644 .changeset/redos-email-regex-validators.md delete mode 100644 .changeset/remove-dead-compliance-subsystems.md delete mode 100644 .changeset/secure-by-default-system-objects.md delete mode 100644 .changeset/skill-document-action-tools.md delete mode 100644 .changeset/skill-surface-drift-guard.md delete mode 100644 .changeset/studio-namespace-prefix.md diff --git a/.changeset/adr-0090-p1-breaking-wave.md b/.changeset/adr-0090-p1-breaking-wave.md deleted file mode 100644 index ce0c2b64bc..0000000000 --- a/.changeset/adr-0090-p1-breaking-wave.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -'@objectstack/spec': major -'@objectstack/core': major -'@objectstack/runtime': major -'@objectstack/objectql': major -'@objectstack/formula': major -'@objectstack/rest': major -'@objectstack/cli': major -'@objectstack/plugin-security': major -'@objectstack/plugin-sharing': major -'@objectstack/plugin-auth': major -'@objectstack/service-automation': major -'@objectstack/trigger-record-change': major -'@objectstack/platform-objects': major -'@objectstack/metadata': major ---- - -ADR-0090 P1 breaking wave — permission model v2 concept convergence. - -Pre-launch one-step renames and secure defaults (no compatibility aliases, per -ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): - -- `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field - `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` - (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → - `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; - hierarchy lives on the business-unit tree). -- `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract - `current_user.roles` → `current_user.positions` (formula validators updated); - stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → - `position` (profile kind removed). -- `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` - narrows to an install-time suggestion; `appDefaultProfileName` → - `appDefaultPermissionSetName` (isDefault-only). -- OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional - `externalSharingModel` (external dial, `private` default) lands as P1 spec - shape (ADR-0090 D11). -- **Secure default (D1)**: a custom object with an owner field and NO - `sharingModel` now resolves `private` (was: fully public). System objects - keep their explicit posture. Unrecognised stored values fail closed. -- ExecutionContext gains the P1 principal-taxonomy shape (D10): - `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in - later). -- Sharing recipients: `role` → `position` (expanded via `sys_user_position` - ∪ the better-auth membership transition source); `role_and_subordinates` - removed — `unit_and_subordinates` now expands the business-unit subtree - (finishes ADR-0057 D5's re-homing). diff --git a/.changeset/adr-0090-p2-audience-anchors.md b/.changeset/adr-0090-p2-audience-anchors.md deleted file mode 100644 index df8c8b3435..0000000000 --- a/.changeset/adr-0090-p2-audience-anchors.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'@objectstack/spec': minor -'@objectstack/core': minor -'@objectstack/runtime': minor -'@objectstack/plugin-security': minor ---- - -ADR-0090 P2 — audience anchors: `everyone`/`guest` builtin positions. - -- `EVERYONE_POSITION` / `GUEST_POSITION` constants in `@objectstack/spec`; - both anchors seeded (system-managed) alongside the builtin identity names. -- Every authenticated principal implicitly holds `everyone` in - `ctx.positions`, so sets bound to it resolve as ordinary position-bound - grants — ADDITIVE. The fallback CLIFF is abolished: the configured - baseline (`fallbackPermissionSet`, default `member_default`) now applies - in addition to explicit grants instead of only when the user had none, - and is also seeded as an `everyone` binding (same table/audit/explain - path as admin-authored defaults). -- Sessionless HTTP principals resolve as `principalKind: 'guest'` holding - exactly `['guest']`; internal bare contexts are untouched. -- Audience-anchor binding gate: `sys_position_permission_set` writes that - would bind a high-privilege set (VAMA, delete/purge/transfer, system - permissions, `'*'` wildcard) to `everyone`/`guest` are rejected at the - data layer, unconditionally (`describeHighPrivilegeBits` predicate is - exported and shared with the seed-time validation). diff --git a/.changeset/adr-0090-p3-linter-delegated-admin.md b/.changeset/adr-0090-p3-linter-delegated-admin.md deleted file mode 100644 index e7ad012e4f..0000000000 --- a/.changeset/adr-0090-p3-linter-delegated-admin.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -"@objectstack/spec": minor -"@objectstack/lint": minor -"@objectstack/cli": minor -"@objectstack/plugin-security": major -"@objectstack/platform-objects": major ---- - -ADR-0090 P3 — security-domain publish linter (D7) and delegated administration (D12). - -**D7 — `validateSecurityPosture` (@objectstack/lint), wired into `os compile` (errors gate the build) and `os lint`.** Rules, each with a failing fixture: `security-owd-unset` (custom object with no `sharingModel` — the objectui#2348 leave_request shape), `security-owd-alias` (retired D4 alias values, with fix-it), `security-external-wider-than-internal` (D11 `external ≤ internal`), `security-wildcard-vama` (`'*'` + View/Modify All outside the platform admin set, ADR-0066), `security-anchor-high-privilege` (an `isDefault`/everyone-suggested set carrying anchor-forbidden bits), `security-role-word` (D3 vocabulary freeze in security identifiers/labels; ARIA/page roles exempt), and advisory `security-private-no-readscope`. - -**D12 — delegated administration (@objectstack/plugin-security `DelegatedAdminGate`).** `PermissionSetSchema.adminScope` (new in spec, persisted as `sys_permission_set.admin_scope`) declares WHERE (a `sys_business_unit` subtree), WHAT (`manageAssignments` / `manageBindings` / `authorEnvironmentSets`), and WHICH sets a delegate may hand out (`assignablePermissionSets` allowlist). Writes to `sys_user_position`, `sys_position_permission_set`, `sys_user_permission_set`, and `sys_permission_set` are now governed: tenant-level admins (ADR-0066 superuser wildcard) pass through; delegates need a covering scope — inside their subtree, allowlisted sets only (to others AND themselves), single-row writes, `granted_by` audit-stamped; everyone else (including holders of plain CRUD on RBAC tables) is denied. Granting or authoring a set that itself carries an `adminScope` requires a held scope that STRICTLY contains it. The `everyone`/`guest` anchors stay tenant-level only, and direct position assignments to an anchor are rejected for every caller. - -**ADR-0090 Addendum — assignment-level BU anchor.** `sys_user_position.business_unit_id` lands with its three consumers scoped: D12 delegation boundary (enforced here), audit fact, and the depth-anchor contract for enterprise `hierarchy-scope-resolver` implementations (documented on `IHierarchyScopeResolver`). - -**D9 tier tightening.** `describeHighPrivilegeBits` moved to `@objectstack/spec/security` (re-exported from plugin-security) alongside new `describeAnchorForbiddenBits`: `guest` bindings now additionally reject edit bits (read-only by default; create stays the case-by-case exception). - -**BREAKING (@objectstack/plugin-security):** exports renamed to the ADR-0090 D3 vocabulary — `SysRole`→`SysPosition`, `SysUserRole`→`SysUserPosition`, `SysRolePermissionSet`→`SysPositionPermissionSet` (no aliases, pre-launch one-step rename). `sys_position` row actions/list views renamed (`activate_position`, …), labels relabeled Role→Position. Non-tenant-admin writes to the RBAC link tables without an `adminScope` are now denied (previously any CRUD grant on those tables sufficed). - -**BREAKING (@objectstack/platform-objects):** `sys_business_unit_member.role_in_business_unit` → `function_in_business_unit` (D3 reserved-word sweep; values member/lead/deputy unchanged). diff --git a/.changeset/adr-0090-p4-explain-matrix.md b/.changeset/adr-0090-p4-explain-matrix.md deleted file mode 100644 index 45ab1f12a0..0000000000 --- a/.changeset/adr-0090-p4-explain-matrix.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"@objectstack/spec": minor -"@objectstack/lint": minor -"@objectstack/cli": minor -"@objectstack/plugin-security": minor ---- - -ADR-0090 P4 — explain engine (D6), access-matrix snapshot gate, recalibrated benchmark. - -**Explain contract (@objectstack/spec).** `ExplainRequestSchema` / `ExplainDecisionSchema` / `ExplainLayerSchema`: `explain(principal, object, operation)` reports the verdict of every evaluation-pipeline layer in order (principal → required_permissions → object_crud → fls → owd_baseline → depth → sharing → vama_bypass → rls), with per-layer contributor attribution (which permission set, reached via which position/baseline) and — for reads — the composed row filter as the machine artifact. Carries the D10 dual attribution (`principalKind`, `onBehalfOf`). - -**Explain engine (@objectstack/plugin-security).** `explainAccess` is "explained by construction": it calls the SAME permission-set resolution, evaluator, FLS mask, and RLS composition the enforcement middleware calls (injected from `SecurityPlugin`), so the report cannot drift from enforcement. Exposed on the `security` kernel service as `explain(request, callerContext)`; explaining another user requires `manage_users` (the target's context is reconstructed from `sys_user_position` / `sys_user_permission_set` with everyone-anchor semantics via `buildContextForUser`). - -**Access-matrix snapshot gate (@objectstack/lint + os compile).** `buildAccessMatrix(stack)` derives the (permission set × object) capability matrix purely from metadata; `diffAccessMatrix` renders semantic review lines ("'crm_admin' gains delete on 'crm_lead'", depth changes, OWD swings, entry add/remove). `os compile` gains an opt-in gate: with `access-matrix.json` committed next to the config, any drift fails the build with those lines until re-snapshotted via `--update-access-matrix` — every capability change becomes a reviewable diff. Seeded for `examples/app-crm`. - -**Benchmark (ADR-0090 Addendum).** `scripts/bench/permission-bench.mts` — single-org 10k users × 1M rows per the recalibrated topology; asserts the O()-shape property (per-request cost independent of user population; unit-depth IN-set cost tracks unit size). Passing at 0.1µs/eval and 59ms/1M-row IN-set scan. diff --git a/.changeset/capability-reference-lint.md b/.changeset/capability-reference-lint.md deleted file mode 100644 index de67396dc4..0000000000 --- a/.changeset/capability-reference-lint.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -'@objectstack/spec': minor -'@objectstack/lint': minor -'@objectstack/plugin-security': patch -'@objectstack/cli': patch ---- - -Author-time capability-reference lint (ADR-0066 ⑨) — `os validate` / `os lint` -now warn when a `requiredPermissions` names a capability that is registered -nowhere. - -`requiredPermissions` (on objects, fields, apps, actions) is a free string, so a -typo like `mange_users` is schema-valid and fails closed at runtime (the caller -is denied) — safe, but silent. The new `validateCapabilityReferences` rule -(`@objectstack/lint`) resolves every reference against the author-time known set -and warns on the unresolved ones: - -- built-in platform capabilities — now sourced from a single canonical list in - `@objectstack/spec` (`security/capabilities.ts`: `PLATFORM_CAPABILITIES` / - `PLATFORM_CAPABILITY_NAMES`), which `@objectstack/plugin-security`'s - `bootstrapSystemCapabilities` also seeds from (one source of truth, no drift), -- any capability a permission set in the stack grants via `systemPermissions` - (granting is what declares it — mirrors the runtime derived-defaults rule), and -- any `sys_capability` row shipped as seed data. - -It is a **warning**, not an error: a single package can't see capabilities -declared by other installed packages, and the reference fails closed anyway. -`systemPermissions` itself is never flagged — it is the declaration side, and a -package legitimately introduces new capabilities there. The object case also -understands the per-operation `requiredPermissions` map form (ADR-0066 ⑤) and -points a finding at the exact operation slice. diff --git a/.changeset/fls-mask-write-response.md b/.changeset/fls-mask-write-response.md deleted file mode 100644 index 45077be17b..0000000000 --- a/.changeset/fls-mask-write-response.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@objectstack/plugin-security": patch ---- - -Fix field-level-security read leak on mutation responses. The security -middleware only masked read-protected fields on `find`/`findOne` results, so a -caller with edit-but-not-field-read could `insert`/`update` a record and read a -read-protected field back out of the echoed post-image (field WRITES were -already blocked, but the response image was not masked). The mask now also -covers `insert`/`update` results, matching read behavior. diff --git a/.changeset/hono-server-405-method-not-allowed.md b/.changeset/hono-server-405-method-not-allowed.md deleted file mode 100644 index ba2a932f16..0000000000 --- a/.changeset/hono-server-405-method-not-allowed.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@objectstack/plugin-hono-server': patch ---- - -Return `405 Method Not Allowed` (with an accurate `Allow` header and a -descriptive body) instead of an opaque `{"error":"Not found"}` 404 when a -request hits a registered path under the wrong HTTP method. - -Hono routes a method mismatch to the same `notFound` sink as a genuinely -missing path, so a `POST` to a `PUT`-only route (e.g. the metadata save -endpoint `PUT /api/v1/meta/:type/:name`) gave callers no hint that the path -exists under another verb (#2684). The server now tracks every registered -`(method, pattern)` pair and re-matches the request path in the `notFound` -handler: matching another method yields a 405; matching nothing stays a 404. -This is framework-wide — every registered endpoint benefits. Static/SPA -catch-alls registered straight on the raw Hono app are not tracked and never -produce a spurious 405. diff --git a/.changeset/mcp-default-on.md b/.changeset/mcp-default-on.md deleted file mode 100644 index e5cff9c396..0000000000 --- a/.changeset/mcp-default-on.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -'@objectstack/types': minor -'@objectstack/runtime': minor -'@objectstack/rest': minor -'@objectstack/cli': minor -'@objectstack/mcp': minor -'@objectstack/plugin-auth': minor ---- - -feat(mcp): the MCP surface is now **default-on** — a core platform capability (#2698) - -`/api/v1/mcp` is served (and advertised in `/discovery`) out of the box; the -OAuth 2.1 authorization track and Dynamic Client Registration follow it, so a -fresh deployment is connectable by any MCP client with zero configuration. -Operators opt OUT with `OS_MCP_SERVER_ENABLED=false`. - -- New single decision point `isMcpServerEnabled()` in `@objectstack/types` - (default on; explicit `false`/`0`/`off`/`no` disables). The runtime - dispatcher's `/mcp` route gate, the CLI's MCP plugin auto-load, the REST - `/discovery` advertisement, and the auth service's OAuth/DCR follow-defaults - all delegate to it — the served route, the advertised route, and the - authorization track can never disagree. -- The env var is now effectively tri-state: unset → HTTP surface on; - explicit `true` → additionally auto-start the long-lived **stdio** transport - at boot (unchanged, still opt-in — a default must not claim the process's - stdin/stdout); explicit `false` → everything off, fail-closed (404, no - metadata, no DCR). -- The OAuth 2.1 TLS rule is unaffected: on a plain-HTTP non-loopback origin - the OAuth track stays dark and the default-on surface remains API-key-only. diff --git a/.changeset/mcp-oauth-authorization.md b/.changeset/mcp-oauth-authorization.md deleted file mode 100644 index 2f2152029d..0000000000 --- a/.changeset/mcp-oauth-authorization.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -'@objectstack/spec': minor -'@objectstack/plugin-auth': minor -'@objectstack/runtime': minor -'@objectstack/mcp': minor ---- - -feat(mcp): spec-compliant OAuth 2.1 authorization for `/api/v1/mcp` (#2698) - -Any OAuth-capable MCP client (claude.ai custom connectors, Claude Desktop, -Claude Code) can now connect to a deployment **self-serve**: no admin-minted -API key, no central registry — you sign in through the browser as yourself and -every tool call runs under your own permissions and row-level security. - -**Each deployment is its own authorization server**, backed by the embedded -better-auth instance (`@better-auth/oauth-provider`). Rationale for the design -decisions lives in #2698; the moving parts: - -- **Discovery**: `/.well-known/oauth-protected-resource` (RFC 9728, incl. the - path-inserted variant for `/api/v1/mcp`) and - `/.well-known/oauth-authorization-server` (RFC 8414, incl. the path-inserted - variant for the `/api/v1/auth` issuer) are served from the deployment origin. - 401s from `/api/v1/mcp` advertise the resource metadata via - `WWW-Authenticate`, so clients bootstrap the flow automatically. -- **Dynamic Client Registration (RFC 7591)** is enabled (unauthenticated, as - the MCP spec requires) whenever the MCP surface is on — every deployment is a - distinct AS, so clients cannot ship pre-registered IDs. Force it either way - with `OS_OIDC_DCR_ENABLED` or the new `plugins.dynamicClientRegistration` - auth-config field. The embedded AS itself auto-enables whenever the MCP - surface is on — which is now the default (explicit - `OS_OIDC_PROVIDER_ENABLED=false` still wins). -- **Authorization-code + PKCE** flow with RFC 8707 resource binding: access - tokens are minted with `aud=/api/v1/mcp` and verified locally - (signature/issuer/audience/expiry) against the deployment's own JWKS — - fail-closed parity with API keys: unknown/expired/wrong-audience tokens, - sub-less M2M tokens, or a presented-but-invalid bearer never fall back to an - ambient session, they 401. -- **Token → ExecutionContext**: a valid access token resolves to the same - principal-bound `ExecutionContext` as every other credential, single-sourced - through `resolveAuthzContext` — OAuth adds a second *provenance* for the - principal, not a second authz model. `ExecutionContext` gains an optional - `oauthScopes` field carrying the token's granted scopes. -- **Coarse scopes → tool families**, enforced at tool dispatch: `data:read` - (list/describe/query/get), `data:write` (create/update/delete), - `actions:execute` (list_actions/run_action). Constants live in - `@objectstack/spec/ai` (`MCP_OAUTH_SCOPES`). Tools outside the grant are not - registered — and therefore rejected — for that request. API-key and session - principals are unaffected (not scope-limited). -- **TLS required, localhost exempt** (OAuth 2.1): on a plain-HTTP non-loopback - origin the OAuth track stays dark (no metadata, no bearer acceptance) and the - endpoint remains API-key-only. Local clients reach intranet deployments; - claude.ai web connectors additionally need public HTTPS reachability. - -**API keys are unchanged** (dual-track): `x-api-key` / `Authorization: ApiKey` / -`Authorization: Bearer osk_…` keep working exactly as before for CI and -headless agents — covered by new regression tests. diff --git a/.changeset/per-operation-required-permissions.md b/.changeset/per-operation-required-permissions.md deleted file mode 100644 index de8f466056..0000000000 --- a/.changeset/per-operation-required-permissions.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -'@objectstack/spec': minor -'@objectstack/plugin-security': minor ---- - -Per-operation object `requiredPermissions` (ADR-0066 ⑤) — an object can now be -read-open / write-gated instead of gating all of CRUD on one capability set. - -`Object.requiredPermissions` accepts either the original `string[]` (capabilities -required for **all** operations) **or** a `{ read?, create?, update?, delete? }` -map that gates each operation class independently — mirroring how Salesforce and -Dataverse separate capability by operation. plugin-security enforces the caps for -the request's operation class as the same D3 AND-gate (checked before the CRUD -grant, fail-closed). The mapping folds `transfer`/`restore` into `update` and -`purge` into `delete`, derived from the existing CRUD permission bits so it stays -in lockstep with them. - -Backward-compatible: the `string[]` form keeps its gate-every-operation semantics -(normalized into an `all` bucket that unions with the per-operation bucket), so -existing objects are unaffected. The per-operation map's keys are validated -`.strict()`, so a mistyped key (e.g. `reads`) is rejected at author time rather -than silently ignored. diff --git a/.changeset/redos-email-regex-validators.md b/.changeset/redos-email-regex-validators.md deleted file mode 100644 index 27fa418c32..0000000000 --- a/.changeset/redos-email-regex-validators.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@objectstack/objectql": patch -"@objectstack/plugin-email": patch ---- - -fix(validation): remove polynomial ReDoS in email validation regexes - -The email validators used `/^[^\s@]+@[^\s@]+\.[^\s@]+$/`, whose quantifiers -around `\.` overlap (the literal dot is also matched by `[^\s@]`) and backtrack -polynomially on adversarial input. The domain part is rewritten as -`[^\s@.]+(?:\.[^\s@.]+)+` so labels exclude `.` and matching is linear. Valid -addresses (including multi-label domains) are unaffected; addresses with an -empty label such as `a@b..c` are now correctly rejected. diff --git a/.changeset/remove-dead-compliance-subsystems.md b/.changeset/remove-dead-compliance-subsystems.md deleted file mode 100644 index 096e23071c..0000000000 --- a/.changeset/remove-dead-compliance-subsystems.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -'@objectstack/spec': minor ---- - -BREAKING (pre-launch): remove the three declared-but-never-enforced compliance -subsystems per ADR-0056 D8 ("design + enforce, or remove"), and mark the AI -agent `visibility` property EXPERIMENTAL (#1901). - -Removed — none of these were read by any runtime path, and compliance-grade -configuration must never merely look live: - -- `ComplianceConfigSchema` / `GDPRConfigSchema` / `HIPAAConfigSchema` (and the - rest of `system/compliance.zod.ts`) — there is no data-subject-rights engine, - retention enforcer, or BAA gate. FROM `import { ComplianceConfigSchema } from - '@objectstack/spec/system'` TO: delete the reference — a real compliance - subsystem will be designed top-down when scheduled. -- `MaskingConfigSchema` / `MaskingRuleSchema` (`system/masking.zod.ts`) — no - redaction layer applies them. FROM masking config TO: field-level security - (permission-set field rules, enforced by plugin-security's field masker); a - subtractive masking/deny layer arrives with ADR-0066 ⑦/⑧ if needed. -- `RLSConfigSchema` / `RLSAuditEventSchema` / `RLSAuditConfigSchema` - (`security/rls.zod.ts`) — the enforced RLS path never read the global config. - FROM global `RLSConfig` TO: per-policy `RowLevelSecurityPolicySchema` (the - live, enforced surface — unchanged). - -Kept, still `[EXPERIMENTAL]`: `EncryptionConfigSchema` (at-rest field -encryption) — a real enterprise roadmap item with a stable shape; carrying it -marked costs less than remove-and-re-add (ADR-0087). - -Marked `[EXPERIMENTAL — NOT ENFORCED]` (#1901): `AgentSchema.visibility` — the -chat-access evaluator deliberately excludes it and the agent list route does -not filter by it, so `private` does not hide an agent. The schema description -and the authoring form now say so; use `access` / `permissions` (both enforced -at the chat route since #1884) for real gating. The ADR-0056 D10 conformance -matrix tracks all dispositions (`agent-visibility` experimental; -`compliance-configs` / `data-masking` / `rls-config-global` removed). diff --git a/.changeset/secure-by-default-system-objects.md b/.changeset/secure-by-default-system-objects.md deleted file mode 100644 index eb3c895db1..0000000000 --- a/.changeset/secure-by-default-system-objects.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -'@objectstack/platform-objects': minor ---- - -Secure-by-default posture for sensitive system objects (ADR-0066 ④, system-object -slice) — the platform's raw secret/credential stores no longer ride the wildcard -`'*'` permission grant. - -`sys_secret` (encrypted settings/datasource secrets), `sys_jwks` (JWT signing -keys), `sys_verification` (password-reset / verify tokens), -`sys_oauth_access_token`, `sys_oauth_refresh_token` (live bearer credentials), -and `sys_device_code` (pending device-grant codes) now declare -`access: { default: 'private' }`: an ordinary member's generic data-layer -read/write gets 403 instead of being covered by `member_default`'s -`'*': allowRead`. Platform admins retain access via the posture-gated -`viewAllRecords`/`modifyAllRecords` superuser bypass, and every runtime consumer -is unaffected — better-auth reads via its adapter (system context), -`engine.resolveSecret` reads at driver level, and SettingsService / the -datasource secret-binder read principal-less (middleware falls open for internal -calls). - -`sys_scim_provider` (SCIM bearer-token config) gains the object-level -`requiredPermissions: ['manage_platform_settings']` capability gate, mirroring -its sibling `sys_sso_provider`. The Setup nav item for Signing Keys (JWKS) is -now capability-gated like API Keys, so non-admins don't see a menu entry that -can only 403. - -Member self-service objects (`sys_session`, `sys_api_key`, -`sys_oauth_application`, `sys_two_factor`) deliberately keep the public posture — -the Account app ("My Sessions" / "My API Keys" / "My Apps" / 2FA "My -Enrollment") reads them through the generic data layer as the member; row -scoping remains their guard. The declarations are pinned by -`platform-objects.test.ts` and the ADR-0056 D10 conformance-matrix row -`secure-by-default-posture`, so dropping the flag from a secret store fails CI. diff --git a/.changeset/skill-document-action-tools.md b/.changeset/skill-document-action-tools.md deleted file mode 100644 index f2338ce197..0000000000 --- a/.changeset/skill-document-action-tools.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@objectstack/mcp': patch ---- - -fix(mcp): the generated SKILL.md now documents the business-action tools - -`renderSkillMarkdown()` listed only the 7 object-CRUD tools; the MCP surface -exposes 9 — `list_actions` / `run_action` (business actions) were missing, so -agents installing the skill never learned they can run approvals, conversions, -or flow triggers directly. The skill now covers the full native tool surface -and teaches action preference: when `list_actions` offers a matching action, -call it instead of hand-editing the records it would have touched (actions -carry the app's validation and side effects), confirming destructive or -confirmation-flagged actions with the user first. - -Prerequisite for the distribution shells (#2714 Phase 0): every shell repo -copies this rendered content, so the gap had to close before fan-out. diff --git a/.changeset/skill-surface-drift-guard.md b/.changeset/skill-surface-drift-guard.md deleted file mode 100644 index fa26b3f3fd..0000000000 --- a/.changeset/skill-surface-drift-guard.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@objectstack/mcp': patch ---- - -test(mcp): drift guard — SKILL.md must document every registered native tool - -The registered surface is obtained by driving the real registration path (a -`tools/list` round-trip against `MCPServerRuntime` with a full data+action -bridge), not a hand-maintained list, so adding a tool to `mcp-http-tools.ts` -without teaching `skill.ts` fails the suite. Guards against a recurrence of -the 7-of-9 gap fixed in #2715; red-proven by temporarily removing -`run_action` from the skill. diff --git a/.changeset/studio-namespace-prefix.md b/.changeset/studio-namespace-prefix.md deleted file mode 100644 index e6966cc3e4..0000000000 --- a/.changeset/studio-namespace-prefix.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -"@objectstack/metadata-protocol": minor -"@objectstack/spec": minor ---- - -Enforce the package namespace-prefix rule for Studio-authored packages. - -The protocol requires every object name in a package to carry the package's -`manifest.namespace` prefix (`crm_account`); `defineStack()` enforces this at -compile time via `validateNamespacePrefix`. Studio/runtime-authored packages -never take that path, and they were created without a namespace at all — so the -rule was silently inert and objects published with bare, collision-prone names. - -Two runtime changes close the gap: - -- `protocol.installPackage` now derives a default namespace from the package id - (`com.example.leave` → `leave`) when the manifest declares none, and persists - it on the manifest (in-memory registry + `sys_packages`). An explicitly - declared namespace always wins (e.g. HotCRM's `crm`). -- `protocol.publishPackageDrafts` now rejects any object draft whose name lacks - the package namespace prefix, before promoting anything (atomic), with an - actionable message (`Rename it to 'leave_ticket'`). Packages that declare no - namespace are grandfathered — mirroring `defineStack`, the rule is not - invented at enforcement time. - -The per-object prefix check and the id→namespace derivation are extracted into -`@objectstack/spec/kernel` (`validateObjectNamespacePrefix`, -`deriveNamespaceFromPackageId`) as the single source shared by `defineStack` and -the runtime publish path, so the two enforcement points cannot drift. diff --git a/examples/app-crm/CHANGELOG.md b/examples/app-crm/CHANGELOG.md index 02f5fb4abf..4bfc8fafeb 100644 --- a/examples/app-crm/CHANGELOG.md +++ b/examples/app-crm/CHANGELOG.md @@ -1,5 +1,22 @@ # @objectstack/example-crm +## 4.0.77 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/runtime@13.0.0 + ## 4.0.76 ### Patch Changes diff --git a/examples/app-crm/package.json b/examples/app-crm/package.json index c41ff59dfa..acd7acfb06 100644 --- a/examples/app-crm/package.json +++ b/examples/app-crm/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/example-crm", - "version": "4.0.76", + "version": "4.0.77", "description": "Minimal CRM example — a smoke-test workspace that exercises the metadata loading pipeline (objects → views → app → dashboard → hook → flow → seed). For a full-featured enterprise CRM see https://github.com/objectstack-ai/hotcrm.", "license": "Apache-2.0", "private": true, diff --git a/examples/app-showcase/CHANGELOG.md b/examples/app-showcase/CHANGELOG.md index 4b6b1e0f50..09fa68be03 100644 --- a/examples/app-showcase/CHANGELOG.md +++ b/examples/app-showcase/CHANGELOG.md @@ -1,5 +1,26 @@ # @objectstack/example-showcase +## 0.2.23 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/runtime@13.0.0 + - @objectstack/cloud-connection@13.0.0 + - @objectstack/connector-rest@13.0.0 + - @objectstack/connector-slack@13.0.0 + - @objectstack/driver-sql@13.0.0 + ## 0.2.22 ### Patch Changes diff --git a/examples/app-showcase/package.json b/examples/app-showcase/package.json index 2dd3c1ff5c..1c64fa5759 100644 --- a/examples/app-showcase/package.json +++ b/examples/app-showcase/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/example-showcase", - "version": "0.2.22", + "version": "0.2.23", "description": "Kitchen-sink showcase workspace — exercises every metadata type, every view type, every chart type, and the major end-to-end capability chains (security, automation, analytics). Built for demonstration, debugging, and coverage-driven verification.", "license": "Apache-2.0", "private": true, diff --git a/examples/app-todo/CHANGELOG.md b/examples/app-todo/CHANGELOG.md index 390ad016d1..ad5dbd9b6c 100644 --- a/examples/app-todo/CHANGELOG.md +++ b/examples/app-todo/CHANGELOG.md @@ -1,5 +1,32 @@ # @objectstack/example-todo +## 4.0.77 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [a1766fe] +- Updated dependencies [2bee609] +- Updated dependencies [e097576] +- Updated dependencies [148beb4] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/runtime@13.0.0 + - @objectstack/objectql@13.0.0 + - @objectstack/metadata@13.0.0 + - @objectstack/mcp@13.0.0 + - @objectstack/client@13.0.0 + - @objectstack/driver-sqlite-wasm@13.0.0 + - @objectstack/knowledge-memory@13.0.0 + - @objectstack/service-knowledge@13.0.0 + ## 4.0.76 ### Patch Changes diff --git a/examples/app-todo/package.json b/examples/app-todo/package.json index c7bdd9d407..3d8a7d2113 100644 --- a/examples/app-todo/package.json +++ b/examples/app-todo/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/example-todo", - "version": "4.0.76", + "version": "4.0.77", "description": "Example Todo App using ObjectStack Protocol", "license": "Apache-2.0", "private": true, diff --git a/examples/embed-objectql/CHANGELOG.md b/examples/embed-objectql/CHANGELOG.md index f89524b814..86f7aea6b3 100644 --- a/examples/embed-objectql/CHANGELOG.md +++ b/examples/embed-objectql/CHANGELOG.md @@ -1,5 +1,23 @@ # @objectstack/example-embed-objectql +## 0.0.17 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [a1766fe] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/objectql@13.0.0 + - @objectstack/driver-memory@13.0.0 + ## 0.0.16 ### Patch Changes diff --git a/examples/embed-objectql/package.json b/examples/embed-objectql/package.json index 1508bc5c70..e74b3cfa1c 100644 --- a/examples/embed-objectql/package.json +++ b/examples/embed-objectql/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/example-embed-objectql", - "version": "0.0.16", + "version": "0.0.17", "private": true, "description": "Embed the ObjectQL engine as a plain library via @objectstack/objectql/core — no kernel, no plugins, no metadata protocol (ADR-0076).", "type": "module", diff --git a/packages/adapters/hono/CHANGELOG.md b/packages/adapters/hono/CHANGELOG.md index 75e4d9ae73..c1a1400d65 100644 --- a/packages/adapters/hono/CHANGELOG.md +++ b/packages/adapters/hono/CHANGELOG.md @@ -1,5 +1,18 @@ # @objectstack/hono +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b1081b8] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] + - @objectstack/runtime@13.0.0 + - @objectstack/plugin-hono-server@13.0.0 + - @objectstack/types@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/adapters/hono/package.json b/packages/adapters/hono/package.json index 95f7bbac8c..81be7a3ca0 100644 --- a/packages/adapters/hono/package.json +++ b/packages/adapters/hono/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/hono", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/apps/account/CHANGELOG.md b/packages/apps/account/CHANGELOG.md index f05ee20b9a..b096a41bbd 100644 --- a/packages/apps/account/CHANGELOG.md +++ b/packages/apps/account/CHANGELOG.md @@ -1,5 +1,22 @@ # @objectstack/account +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/platform-objects@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/apps/account/package.json b/packages/apps/account/package.json index bc88d09741..0e70486ce3 100644 --- a/packages/apps/account/package.json +++ b/packages/apps/account/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/account", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "ObjectStack Account — the end-user account/self-service console app, packaged as its own ObjectStack app package (ADR-0048: one app per package).", "main": "dist/index.js", diff --git a/packages/apps/setup/CHANGELOG.md b/packages/apps/setup/CHANGELOG.md index b212b993b3..22c2d2b7d1 100644 --- a/packages/apps/setup/CHANGELOG.md +++ b/packages/apps/setup/CHANGELOG.md @@ -1,5 +1,22 @@ # @objectstack/setup +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/platform-objects@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/apps/setup/package.json b/packages/apps/setup/package.json index a546b192fd..648c93b620 100644 --- a/packages/apps/setup/package.json +++ b/packages/apps/setup/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/setup", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "ObjectStack Setup — the platform administration app, packaged as its own ObjectStack app package (ADR-0048: one app per package).", "main": "dist/index.js", diff --git a/packages/apps/studio/CHANGELOG.md b/packages/apps/studio/CHANGELOG.md index 7b965a3304..f797929ee7 100644 --- a/packages/apps/studio/CHANGELOG.md +++ b/packages/apps/studio/CHANGELOG.md @@ -1,5 +1,22 @@ # @objectstack/studio +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/platform-objects@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/apps/studio/package.json b/packages/apps/studio/package.json index e8ea5ffc67..9fc3e1aa90 100644 --- a/packages/apps/studio/package.json +++ b/packages/apps/studio/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/studio", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "ObjectStack Studio — the metadata builder app, packaged as its own ObjectStack app package (ADR-0048: one app per package).", "main": "dist/index.js", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index fe7829062c..eb2c2184cf 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,175 @@ # @objectstack/cli +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +### Minor Changes + +- b271691: ADR-0090 P3 — security-domain publish linter (D7) and delegated administration (D12). + + **D7 — `validateSecurityPosture` (@objectstack/lint), wired into `os compile` (errors gate the build) and `os lint`.** Rules, each with a failing fixture: `security-owd-unset` (custom object with no `sharingModel` — the objectui#2348 leave_request shape), `security-owd-alias` (retired D4 alias values, with fix-it), `security-external-wider-than-internal` (D11 `external ≤ internal`), `security-wildcard-vama` (`'*'` + View/Modify All outside the platform admin set, ADR-0066), `security-anchor-high-privilege` (an `isDefault`/everyone-suggested set carrying anchor-forbidden bits), `security-role-word` (D3 vocabulary freeze in security identifiers/labels; ARIA/page roles exempt), and advisory `security-private-no-readscope`. + + **D12 — delegated administration (@objectstack/plugin-security `DelegatedAdminGate`).** `PermissionSetSchema.adminScope` (new in spec, persisted as `sys_permission_set.admin_scope`) declares WHERE (a `sys_business_unit` subtree), WHAT (`manageAssignments` / `manageBindings` / `authorEnvironmentSets`), and WHICH sets a delegate may hand out (`assignablePermissionSets` allowlist). Writes to `sys_user_position`, `sys_position_permission_set`, `sys_user_permission_set`, and `sys_permission_set` are now governed: tenant-level admins (ADR-0066 superuser wildcard) pass through; delegates need a covering scope — inside their subtree, allowlisted sets only (to others AND themselves), single-row writes, `granted_by` audit-stamped; everyone else (including holders of plain CRUD on RBAC tables) is denied. Granting or authoring a set that itself carries an `adminScope` requires a held scope that STRICTLY contains it. The `everyone`/`guest` anchors stay tenant-level only, and direct position assignments to an anchor are rejected for every caller. + + **ADR-0090 Addendum — assignment-level BU anchor.** `sys_user_position.business_unit_id` lands with its three consumers scoped: D12 delegation boundary (enforced here), audit fact, and the depth-anchor contract for enterprise `hierarchy-scope-resolver` implementations (documented on `IHierarchyScopeResolver`). + + **D9 tier tightening.** `describeHighPrivilegeBits` moved to `@objectstack/spec/security` (re-exported from plugin-security) alongside new `describeAnchorForbiddenBits`: `guest` bindings now additionally reject edit bits (read-only by default; create stays the case-by-case exception). + + **BREAKING (@objectstack/plugin-security):** exports renamed to the ADR-0090 D3 vocabulary — `SysRole`→`SysPosition`, `SysUserRole`→`SysUserPosition`, `SysRolePermissionSet`→`SysPositionPermissionSet` (no aliases, pre-launch one-step rename). `sys_position` row actions/list views renamed (`activate_position`, …), labels relabeled Role→Position. Non-tenant-admin writes to the RBAC link tables without an `adminScope` are now denied (previously any CRUD grant on those tables sufficed). + + **BREAKING (@objectstack/platform-objects):** `sys_business_unit_member.role_in_business_unit` → `function_in_business_unit` (D3 reserved-word sweep; values member/lead/deputy unchanged). + +- a5a1e41: ADR-0090 P4 — explain engine (D6), access-matrix snapshot gate, recalibrated benchmark. + + **Explain contract (@objectstack/spec).** `ExplainRequestSchema` / `ExplainDecisionSchema` / `ExplainLayerSchema`: `explain(principal, object, operation)` reports the verdict of every evaluation-pipeline layer in order (principal → required_permissions → object_crud → fls → owd_baseline → depth → sharing → vama_bypass → rls), with per-layer contributor attribution (which permission set, reached via which position/baseline) and — for reads — the composed row filter as the machine artifact. Carries the D10 dual attribution (`principalKind`, `onBehalfOf`). + + **Explain engine (@objectstack/plugin-security).** `explainAccess` is "explained by construction": it calls the SAME permission-set resolution, evaluator, FLS mask, and RLS composition the enforcement middleware calls (injected from `SecurityPlugin`), so the report cannot drift from enforcement. Exposed on the `security` kernel service as `explain(request, callerContext)`; explaining another user requires `manage_users` (the target's context is reconstructed from `sys_user_position` / `sys_user_permission_set` with everyone-anchor semantics via `buildContextForUser`). + + **Access-matrix snapshot gate (@objectstack/lint + os compile).** `buildAccessMatrix(stack)` derives the (permission set × object) capability matrix purely from metadata; `diffAccessMatrix` renders semantic review lines ("'crm_admin' gains delete on 'crm_lead'", depth changes, OWD swings, entry add/remove). `os compile` gains an opt-in gate: with `access-matrix.json` committed next to the config, any drift fails the build with those lines until re-snapshotted via `--update-access-matrix` — every capability change becomes a reviewable diff. Seeded for `examples/app-crm`. + + **Benchmark (ADR-0090 Addendum).** `scripts/bench/permission-bench.mts` — single-org 10k users × 1M rows per the recalibrated topology; asserts the O()-shape property (per-request cost independent of user population; unit-depth IN-set cost tracks unit size). Passing at 0.1µs/eval and 59ms/1M-row IN-set scan. + +- 57b89b4: feat(mcp): the MCP surface is now **default-on** — a core platform capability (#2698) + + `/api/v1/mcp` is served (and advertised in `/discovery`) out of the box; the + OAuth 2.1 authorization track and Dynamic Client Registration follow it, so a + fresh deployment is connectable by any MCP client with zero configuration. + Operators opt OUT with `OS_MCP_SERVER_ENABLED=false`. + + - New single decision point `isMcpServerEnabled()` in `@objectstack/types` + (default on; explicit `false`/`0`/`off`/`no` disables). The runtime + dispatcher's `/mcp` route gate, the CLI's MCP plugin auto-load, the REST + `/discovery` advertisement, and the auth service's OAuth/DCR follow-defaults + all delegate to it — the served route, the advertised route, and the + authorization track can never disagree. + - The env var is now effectively tri-state: unset → HTTP surface on; + explicit `true` → additionally auto-start the long-lived **stdio** transport + at boot (unchanged, still opt-in — a default must not claim the process's + stdin/stdout); explicit `false` → everything off, fail-closed (404, no + metadata, no DCR). + - The OAuth 2.1 TLS rule is unaffected: on a plain-HTTP non-loopback origin + the OAuth track stays dark and the default-on surface remains API-key-only. + +### Patch Changes + +- 466adf6: Author-time capability-reference lint (ADR-0066 ⑨) — `os validate` / `os lint` + now warn when a `requiredPermissions` names a capability that is registered + nowhere. + + `requiredPermissions` (on objects, fields, apps, actions) is a free string, so a + typo like `mange_users` is schema-valid and fails closed at runtime (the caller + is denied) — safe, but silent. The new `validateCapabilityReferences` rule + (`@objectstack/lint`) resolves every reference against the author-time known set + and warns on the unresolved ones: + + - built-in platform capabilities — now sourced from a single canonical list in + `@objectstack/spec` (`security/capabilities.ts`: `PLATFORM_CAPABILITIES` / + `PLATFORM_CAPABILITY_NAMES`), which `@objectstack/plugin-security`'s + `bootstrapSystemCapabilities` also seeds from (one source of truth, no drift), + - any capability a permission set in the stack grants via `systemPermissions` + (granting is what declares it — mirrors the runtime derived-defaults rule), and + - any `sys_capability` row shipped as seed data. + + It is a **warning**, not an error: a single package can't see capabilities + declared by other installed packages, and the reference fails closed anyway. + `systemPermissions` itself is never flagged — it is the declaration side, and a + package legitimately introduces new capabilities there. The object case also + understands the per-operation `requiredPermissions` map form (ADR-0066 ⑤) and + points a finding at the exact operation slice. + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [799b285] +- Updated dependencies [b1081b8] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [a1766fe] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [e097576] +- Updated dependencies [148beb4] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/runtime@13.0.0 + - @objectstack/objectql@13.0.0 + - @objectstack/formula@13.0.0 + - @objectstack/rest@13.0.0 + - @objectstack/plugin-security@13.0.0 + - @objectstack/plugin-sharing@13.0.0 + - @objectstack/plugin-auth@13.0.0 + - @objectstack/service-automation@13.0.0 + - @objectstack/trigger-record-change@13.0.0 + - @objectstack/platform-objects@13.0.0 + - @objectstack/lint@13.0.0 + - @objectstack/plugin-hono-server@13.0.0 + - @objectstack/types@13.0.0 + - @objectstack/mcp@13.0.0 + - @objectstack/plugin-email@13.0.0 + - @objectstack/account@13.0.0 + - @objectstack/setup@13.0.0 + - @objectstack/client@13.0.0 + - @objectstack/cloud-connection@13.0.0 + - @objectstack/observability@13.0.0 + - @objectstack/driver-memory@13.0.0 + - @objectstack/driver-mongodb@13.0.0 + - @objectstack/driver-sql@13.0.0 + - @objectstack/driver-sqlite-wasm@13.0.0 + - @objectstack/plugin-approvals@13.0.0 + - @objectstack/plugin-audit@13.0.0 + - @objectstack/plugin-reports@13.0.0 + - @objectstack/plugin-webhooks@13.0.0 + - @objectstack/service-analytics@13.0.0 + - @objectstack/service-cache@13.0.0 + - @objectstack/service-datasource@13.0.0 + - @objectstack/service-job@13.0.0 + - @objectstack/service-messaging@13.0.0 + - @objectstack/service-package@13.0.0 + - @objectstack/service-queue@13.0.0 + - @objectstack/service-realtime@13.0.0 + - @objectstack/service-settings@13.0.0 + - @objectstack/service-storage@13.0.0 + - @objectstack/trigger-api@13.0.0 + - @objectstack/trigger-schedule@13.0.0 + - @objectstack/verify@13.0.0 + - @objectstack/console@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index e73f8ce5ac..75a35e1d93 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/cli", - "version": "12.6.0", + "version": "13.0.0", "description": "Command Line Interface for ObjectStack Protocol", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/client-react/CHANGELOG.md b/packages/client-react/CHANGELOG.md index ab04344454..3ee32376f3 100644 --- a/packages/client-react/CHANGELOG.md +++ b/packages/client-react/CHANGELOG.md @@ -1,5 +1,22 @@ # @objectstack/client-react +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/client@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/client-react/package.json b/packages/client-react/package.json index 947ecdafdc..41cac66f59 100644 --- a/packages/client-react/package.json +++ b/packages/client-react/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/client-react", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "React hooks for ObjectStack Client SDK", "main": "dist/index.js", diff --git a/packages/client/CHANGELOG.md b/packages/client/CHANGELOG.md index 7a7a221829..bfe0ef4522 100644 --- a/packages/client/CHANGELOG.md +++ b/packages/client/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/client +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/client/package.json b/packages/client/package.json index 4686156690..99b1e5ed73 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/client", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Official Client SDK for ObjectStack Protocol", "main": "dist/index.js", diff --git a/packages/cloud-connection/CHANGELOG.md b/packages/cloud-connection/CHANGELOG.md index 271cff3222..3dd965fb7f 100644 --- a/packages/cloud-connection/CHANGELOG.md +++ b/packages/cloud-connection/CHANGELOG.md @@ -1,5 +1,24 @@ # @objectstack/cloud-connection +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/runtime@13.0.0 + - @objectstack/types@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/cloud-connection/package.json b/packages/cloud-connection/package.json index 775cb4d57c..a046fc2c4c 100644 --- a/packages/cloud-connection/package.json +++ b/packages/cloud-connection/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/cloud-connection", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Runtime-side client for an ObjectStack cloud control plane — marketplace browse proxy, install-local, device-code binding, org catalog and installed views, and the /api/v1/runtime/config discovery endpoint. Open mechanism (ADR-0008): the hub service, plan policy, and entitlements stay server-side.", "type": "module", diff --git a/packages/connectors/connector-mcp/CHANGELOG.md b/packages/connectors/connector-mcp/CHANGELOG.md index 403a7c4e6d..828dcc182c 100644 --- a/packages/connectors/connector-mcp/CHANGELOG.md +++ b/packages/connectors/connector-mcp/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/connector-mcp +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/connectors/connector-mcp/package.json b/packages/connectors/connector-mcp/package.json index fc47ece42c..a2656190a8 100644 --- a/packages/connectors/connector-mcp/package.json +++ b/packages/connectors/connector-mcp/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/connector-mcp", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Model Context Protocol (MCP) connector for ObjectStack — a generic adapter that turns any MCP server's tools into a connector's actions on the automation engine's connector registry (ADR-0024).", "main": "dist/index.js", diff --git a/packages/connectors/connector-openapi/CHANGELOG.md b/packages/connectors/connector-openapi/CHANGELOG.md index 12025f1b29..6bc11662c6 100644 --- a/packages/connectors/connector-openapi/CHANGELOG.md +++ b/packages/connectors/connector-openapi/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/connector-openapi +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/connectors/connector-openapi/package.json b/packages/connectors/connector-openapi/package.json index ebc0c1953c..149ba6662d 100644 --- a/packages/connectors/connector-openapi/package.json +++ b/packages/connectors/connector-openapi/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/connector-openapi", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "OpenAPI 3.x connector generator for ObjectStack — turns a declarative OpenAPI document into connector actions on the automation engine's registry, with a self-contained static-auth HTTP transport (ADR-0023).", "main": "dist/index.js", diff --git a/packages/connectors/connector-rest/CHANGELOG.md b/packages/connectors/connector-rest/CHANGELOG.md index 52f9d897b9..8dee1119ff 100644 --- a/packages/connectors/connector-rest/CHANGELOG.md +++ b/packages/connectors/connector-rest/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/connector-rest +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/connectors/connector-rest/package.json b/packages/connectors/connector-rest/package.json index 0a0f124538..f36a54a73f 100644 --- a/packages/connectors/connector-rest/package.json +++ b/packages/connectors/connector-rest/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/connector-rest", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Generic REST connector for ObjectStack — the reference concrete connector that registers a `request` action on the automation engine's connector registry (ADR-0018 §Addendum).", "main": "dist/index.js", diff --git a/packages/connectors/connector-slack/CHANGELOG.md b/packages/connectors/connector-slack/CHANGELOG.md index 0818fb09ef..f3ed901702 100644 --- a/packages/connectors/connector-slack/CHANGELOG.md +++ b/packages/connectors/connector-slack/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/connector-slack +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/connectors/connector-slack/package.json b/packages/connectors/connector-slack/package.json index c72859dd01..b73991676d 100644 --- a/packages/connectors/connector-slack/package.json +++ b/packages/connectors/connector-slack/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/connector-slack", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Slack Web API connector for ObjectStack — registers `chat.postMessage` / `chat.update` / `call` actions on the automation engine's connector registry (ADR-0018 §Addendum, ADR-0022).", "main": "dist/index.js", diff --git a/packages/console/CHANGELOG.md b/packages/console/CHANGELOG.md index c340ac9446..60e4fbf816 100644 --- a/packages/console/CHANGELOG.md +++ b/packages/console/CHANGELOG.md @@ -1,5 +1,7 @@ # @objectstack/console +## 13.0.0 + ## 12.6.0 ## 12.5.0 diff --git a/packages/console/package.json b/packages/console/package.json index 986243e2ab..f910280f0e 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/console", - "version": "12.6.0", + "version": "13.0.0", "description": "Prebuilt Console SPA pinned to this @objectstack/framework release. Source of truth: @object-ui/console (https://github.com/objectstack-ai/objectui).", "license": "Apache-2.0", "homepage": "https://github.com/objectstack-ai/framework/tree/main/packages/console", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 6945ee9bb5..2ce5bdd64f 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,74 @@ # @objectstack/core +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +### Minor Changes + +- 01917c2: ADR-0090 P2 — audience anchors: `everyone`/`guest` builtin positions. + + - `EVERYONE_POSITION` / `GUEST_POSITION` constants in `@objectstack/spec`; + both anchors seeded (system-managed) alongside the builtin identity names. + - Every authenticated principal implicitly holds `everyone` in + `ctx.positions`, so sets bound to it resolve as ordinary position-bound + grants — ADDITIVE. The fallback CLIFF is abolished: the configured + baseline (`fallbackPermissionSet`, default `member_default`) now applies + in addition to explicit grants instead of only when the user had none, + and is also seeded as an `everyone` binding (same table/audit/explain + path as admin-authored defaults). + - Sessionless HTTP principals resolve as `principalKind: 'guest'` holding + exactly `['guest']`; internal bare contexts are untouched. + - Audience-anchor binding gate: `sys_position_permission_set` writes that + would bind a high-privilege set (VAMA, delete/purge/transfer, system + permissions, `'*'` wildcard) to `everyone`/`guest` are rejected at the + data layer, unconditionally (`describeHighPrivilegeBits` predicate is + exported and shared with the seed-time validation). + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + ## 12.6.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index 849debdb06..3b2e196f4b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/core", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Microkernel Core for ObjectStack", "type": "module", diff --git a/packages/create-objectstack/CHANGELOG.md b/packages/create-objectstack/CHANGELOG.md index 3695748d39..dd7773eca9 100644 --- a/packages/create-objectstack/CHANGELOG.md +++ b/packages/create-objectstack/CHANGELOG.md @@ -1,5 +1,7 @@ # create-objectstack +## 13.0.0 + ## 12.6.0 ## 12.5.0 diff --git a/packages/create-objectstack/package.json b/packages/create-objectstack/package.json index 48f1b02f8d..1b558fb5c6 100644 --- a/packages/create-objectstack/package.json +++ b/packages/create-objectstack/package.json @@ -1,6 +1,6 @@ { "name": "create-objectstack", - "version": "12.6.0", + "version": "13.0.0", "description": "Create a new ObjectStack project — npx create-objectstack", "bin": { "create-objectstack": "./bin/create-objectstack.js" diff --git a/packages/dogfood/CHANGELOG.md b/packages/dogfood/CHANGELOG.md index fbbb833aa8..96dff2f3c9 100644 --- a/packages/dogfood/CHANGELOG.md +++ b/packages/dogfood/CHANGELOG.md @@ -1,5 +1,27 @@ # @objectstack/dogfood +## 0.0.25 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [799b285] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [a1766fe] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/objectql@13.0.0 + - @objectstack/plugin-security@13.0.0 + - @objectstack/example-crm@4.0.77 + - @objectstack/example-showcase@0.2.23 + - @objectstack/verify@13.0.0 + ## 0.0.24 ### Patch Changes diff --git a/packages/dogfood/package.json b/packages/dogfood/package.json index e3a6fa7273..0540beff0f 100644 --- a/packages/dogfood/package.json +++ b/packages/dogfood/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/dogfood", - "version": "0.0.24", + "version": "0.0.25", "private": true, "license": "Apache-2.0", "description": "Dogfood regression gate — hand-written golden tests that boot real example apps through @objectstack/verify's in-process HTTP stack, pinning historical runtime regressions (#2018 timezone bucketing, #1994 cross-owner RLS, #2004 field fidelity) that static checks miss.", diff --git a/packages/downstream-contract/CHANGELOG.md b/packages/downstream-contract/CHANGELOG.md index abb6e34e99..2593a67af5 100644 --- a/packages/downstream-contract/CHANGELOG.md +++ b/packages/downstream-contract/CHANGELOG.md @@ -1,5 +1,20 @@ # @objectstack/downstream-contract +## 0.0.23 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + ## 0.0.22 ### Patch Changes diff --git a/packages/downstream-contract/package.json b/packages/downstream-contract/package.json index 7f83534a39..bc776781f5 100644 --- a/packages/downstream-contract/package.json +++ b/packages/downstream-contract/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/downstream-contract", - "version": "0.0.22", + "version": "0.0.23", "description": "Frozen third-party consumer fixture — a backward-compatibility gate for @objectstack/spec. Authored the way an external project on a published release authors metadata; if a spec change breaks it, that change is breaking (#2035).", "license": "Apache-2.0", "private": true, diff --git a/packages/formula/CHANGELOG.md b/packages/formula/CHANGELOG.md index 9736aae31c..66f29a6bcb 100644 --- a/packages/formula/CHANGELOG.md +++ b/packages/formula/CHANGELOG.md @@ -1,5 +1,53 @@ # @objectstack/formula +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/formula/package.json b/packages/formula/package.json index b3675f536c..a0eadec9df 100644 --- a/packages/formula/package.json +++ b/packages/formula/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/formula", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "ObjectStack canonical expression engine — CEL (cel-js) + ObjectStack stdlib + dialect registry", "main": "dist/index.js", diff --git a/packages/lint/CHANGELOG.md b/packages/lint/CHANGELOG.md index 452c29d4e8..99116ef7aa 100644 --- a/packages/lint/CHANGELOG.md +++ b/packages/lint/CHANGELOG.md @@ -1,5 +1,73 @@ # @objectstack/lint +## 13.0.0 + +### Minor Changes + +- b271691: ADR-0090 P3 — security-domain publish linter (D7) and delegated administration (D12). + + **D7 — `validateSecurityPosture` (@objectstack/lint), wired into `os compile` (errors gate the build) and `os lint`.** Rules, each with a failing fixture: `security-owd-unset` (custom object with no `sharingModel` — the objectui#2348 leave_request shape), `security-owd-alias` (retired D4 alias values, with fix-it), `security-external-wider-than-internal` (D11 `external ≤ internal`), `security-wildcard-vama` (`'*'` + View/Modify All outside the platform admin set, ADR-0066), `security-anchor-high-privilege` (an `isDefault`/everyone-suggested set carrying anchor-forbidden bits), `security-role-word` (D3 vocabulary freeze in security identifiers/labels; ARIA/page roles exempt), and advisory `security-private-no-readscope`. + + **D12 — delegated administration (@objectstack/plugin-security `DelegatedAdminGate`).** `PermissionSetSchema.adminScope` (new in spec, persisted as `sys_permission_set.admin_scope`) declares WHERE (a `sys_business_unit` subtree), WHAT (`manageAssignments` / `manageBindings` / `authorEnvironmentSets`), and WHICH sets a delegate may hand out (`assignablePermissionSets` allowlist). Writes to `sys_user_position`, `sys_position_permission_set`, `sys_user_permission_set`, and `sys_permission_set` are now governed: tenant-level admins (ADR-0066 superuser wildcard) pass through; delegates need a covering scope — inside their subtree, allowlisted sets only (to others AND themselves), single-row writes, `granted_by` audit-stamped; everyone else (including holders of plain CRUD on RBAC tables) is denied. Granting or authoring a set that itself carries an `adminScope` requires a held scope that STRICTLY contains it. The `everyone`/`guest` anchors stay tenant-level only, and direct position assignments to an anchor are rejected for every caller. + + **ADR-0090 Addendum — assignment-level BU anchor.** `sys_user_position.business_unit_id` lands with its three consumers scoped: D12 delegation boundary (enforced here), audit fact, and the depth-anchor contract for enterprise `hierarchy-scope-resolver` implementations (documented on `IHierarchyScopeResolver`). + + **D9 tier tightening.** `describeHighPrivilegeBits` moved to `@objectstack/spec/security` (re-exported from plugin-security) alongside new `describeAnchorForbiddenBits`: `guest` bindings now additionally reject edit bits (read-only by default; create stays the case-by-case exception). + + **BREAKING (@objectstack/plugin-security):** exports renamed to the ADR-0090 D3 vocabulary — `SysRole`→`SysPosition`, `SysUserRole`→`SysUserPosition`, `SysRolePermissionSet`→`SysPositionPermissionSet` (no aliases, pre-launch one-step rename). `sys_position` row actions/list views renamed (`activate_position`, …), labels relabeled Role→Position. Non-tenant-admin writes to the RBAC link tables without an `adminScope` are now denied (previously any CRUD grant on those tables sufficed). + + **BREAKING (@objectstack/platform-objects):** `sys_business_unit_member.role_in_business_unit` → `function_in_business_unit` (D3 reserved-word sweep; values member/lead/deputy unchanged). + +- a5a1e41: ADR-0090 P4 — explain engine (D6), access-matrix snapshot gate, recalibrated benchmark. + + **Explain contract (@objectstack/spec).** `ExplainRequestSchema` / `ExplainDecisionSchema` / `ExplainLayerSchema`: `explain(principal, object, operation)` reports the verdict of every evaluation-pipeline layer in order (principal → required_permissions → object_crud → fls → owd_baseline → depth → sharing → vama_bypass → rls), with per-layer contributor attribution (which permission set, reached via which position/baseline) and — for reads — the composed row filter as the machine artifact. Carries the D10 dual attribution (`principalKind`, `onBehalfOf`). + + **Explain engine (@objectstack/plugin-security).** `explainAccess` is "explained by construction": it calls the SAME permission-set resolution, evaluator, FLS mask, and RLS composition the enforcement middleware calls (injected from `SecurityPlugin`), so the report cannot drift from enforcement. Exposed on the `security` kernel service as `explain(request, callerContext)`; explaining another user requires `manage_users` (the target's context is reconstructed from `sys_user_position` / `sys_user_permission_set` with everyone-anchor semantics via `buildContextForUser`). + + **Access-matrix snapshot gate (@objectstack/lint + os compile).** `buildAccessMatrix(stack)` derives the (permission set × object) capability matrix purely from metadata; `diffAccessMatrix` renders semantic review lines ("'crm_admin' gains delete on 'crm_lead'", depth changes, OWD swings, entry add/remove). `os compile` gains an opt-in gate: with `access-matrix.json` committed next to the config, any drift fails the build with those lines until re-snapshotted via `--update-access-matrix` — every capability change becomes a reviewable diff. Seeded for `examples/app-crm`. + + **Benchmark (ADR-0090 Addendum).** `scripts/bench/permission-bench.mts` — single-org 10k users × 1M rows per the recalibrated topology; asserts the O()-shape property (per-request cost independent of user population; unit-depth IN-set cost tracks unit size). Passing at 0.1µs/eval and 59ms/1M-row IN-set scan. + +- 466adf6: Author-time capability-reference lint (ADR-0066 ⑨) — `os validate` / `os lint` + now warn when a `requiredPermissions` names a capability that is registered + nowhere. + + `requiredPermissions` (on objects, fields, apps, actions) is a free string, so a + typo like `mange_users` is schema-valid and fails closed at runtime (the caller + is denied) — safe, but silent. The new `validateCapabilityReferences` rule + (`@objectstack/lint`) resolves every reference against the author-time known set + and warns on the unresolved ones: + + - built-in platform capabilities — now sourced from a single canonical list in + `@objectstack/spec` (`security/capabilities.ts`: `PLATFORM_CAPABILITIES` / + `PLATFORM_CAPABILITY_NAMES`), which `@objectstack/plugin-security`'s + `bootstrapSystemCapabilities` also seeds from (one source of truth, no drift), + - any capability a permission set in the stack grants via `systemPermissions` + (granting is what declares it — mirrors the runtime derived-defaults rule), and + - any `sys_capability` row shipped as seed data. + + It is a **warning**, not an error: a single package can't see capabilities + declared by other installed packages, and the reference fails closed anyway. + `systemPermissions` itself is never flagged — it is the declaration side, and a + package legitimately introduces new capabilities there. The object case also + understands the per-operation `requiredPermissions` map form (ADR-0066 ⑤) and + points a finding at the exact operation slice. + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/formula@13.0.0 + - @objectstack/sdui-parser@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/lint/package.json b/packages/lint/package.json index 0f7c410855..83a8e0fe8b 100644 --- a/packages/lint/package.json +++ b/packages/lint/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/lint", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Static, build-time validation for an ObjectStack metadata graph — dashboard widget bindings, CEL/predicate expressions, and more. Pure (stack) => Issue[] functions shared by the CLI's `os validate` and any other consumer (e.g. AI authoring). Depends on @objectstack/spec; never on a runtime.", "type": "module", diff --git a/packages/mcp/CHANGELOG.md b/packages/mcp/CHANGELOG.md index f212a7aa6b..a0123308c3 100644 --- a/packages/mcp/CHANGELOG.md +++ b/packages/mcp/CHANGELOG.md @@ -1,5 +1,119 @@ # @objectstack/plugin-mcp-server +## 13.0.0 + +### Minor Changes + +- 57b89b4: feat(mcp): the MCP surface is now **default-on** — a core platform capability (#2698) + + `/api/v1/mcp` is served (and advertised in `/discovery`) out of the box; the + OAuth 2.1 authorization track and Dynamic Client Registration follow it, so a + fresh deployment is connectable by any MCP client with zero configuration. + Operators opt OUT with `OS_MCP_SERVER_ENABLED=false`. + + - New single decision point `isMcpServerEnabled()` in `@objectstack/types` + (default on; explicit `false`/`0`/`off`/`no` disables). The runtime + dispatcher's `/mcp` route gate, the CLI's MCP plugin auto-load, the REST + `/discovery` advertisement, and the auth service's OAuth/DCR follow-defaults + all delegate to it — the served route, the advertised route, and the + authorization track can never disagree. + - The env var is now effectively tri-state: unset → HTTP surface on; + explicit `true` → additionally auto-start the long-lived **stdio** transport + at boot (unchanged, still opt-in — a default must not claim the process's + stdin/stdout); explicit `false` → everything off, fail-closed (404, no + metadata, no DCR). + - The OAuth 2.1 TLS rule is unaffected: on a plain-HTTP non-loopback origin + the OAuth track stays dark and the default-on surface remains API-key-only. + +- 5be00c3: feat(mcp): spec-compliant OAuth 2.1 authorization for `/api/v1/mcp` (#2698) + + Any OAuth-capable MCP client (claude.ai custom connectors, Claude Desktop, + Claude Code) can now connect to a deployment **self-serve**: no admin-minted + API key, no central registry — you sign in through the browser as yourself and + every tool call runs under your own permissions and row-level security. + + **Each deployment is its own authorization server**, backed by the embedded + better-auth instance (`@better-auth/oauth-provider`). Rationale for the design + decisions lives in #2698; the moving parts: + + - **Discovery**: `/.well-known/oauth-protected-resource` (RFC 9728, incl. the + path-inserted variant for `/api/v1/mcp`) and + `/.well-known/oauth-authorization-server` (RFC 8414, incl. the path-inserted + variant for the `/api/v1/auth` issuer) are served from the deployment origin. + 401s from `/api/v1/mcp` advertise the resource metadata via + `WWW-Authenticate`, so clients bootstrap the flow automatically. + - **Dynamic Client Registration (RFC 7591)** is enabled (unauthenticated, as + the MCP spec requires) whenever the MCP surface is on — every deployment is a + distinct AS, so clients cannot ship pre-registered IDs. Force it either way + with `OS_OIDC_DCR_ENABLED` or the new `plugins.dynamicClientRegistration` + auth-config field. The embedded AS itself auto-enables whenever the MCP + surface is on — which is now the default (explicit + `OS_OIDC_PROVIDER_ENABLED=false` still wins). + - **Authorization-code + PKCE** flow with RFC 8707 resource binding: access + tokens are minted with `aud=/api/v1/mcp` and verified locally + (signature/issuer/audience/expiry) against the deployment's own JWKS — + fail-closed parity with API keys: unknown/expired/wrong-audience tokens, + sub-less M2M tokens, or a presented-but-invalid bearer never fall back to an + ambient session, they 401. + - **Token → ExecutionContext**: a valid access token resolves to the same + principal-bound `ExecutionContext` as every other credential, single-sourced + through `resolveAuthzContext` — OAuth adds a second _provenance_ for the + principal, not a second authz model. `ExecutionContext` gains an optional + `oauthScopes` field carrying the token's granted scopes. + - **Coarse scopes → tool families**, enforced at tool dispatch: `data:read` + (list/describe/query/get), `data:write` (create/update/delete), + `actions:execute` (list_actions/run_action). Constants live in + `@objectstack/spec/ai` (`MCP_OAUTH_SCOPES`). Tools outside the grant are not + registered — and therefore rejected — for that request. API-key and session + principals are unaffected (not scope-limited). + - **TLS required, localhost exempt** (OAuth 2.1): on a plain-HTTP non-loopback + origin the OAuth track stays dark (no metadata, no bearer acceptance) and the + endpoint remains API-key-only. Local clients reach intranet deployments; + claude.ai web connectors additionally need public HTTPS reachability. + + **API keys are unchanged** (dual-track): `x-api-key` / `Authorization: ApiKey` / + `Authorization: Bearer osk_…` keep working exactly as before for CI and + headless agents — covered by new regression tests. + +### Patch Changes + +- e097576: fix(mcp): the generated SKILL.md now documents the business-action tools + + `renderSkillMarkdown()` listed only the 7 object-CRUD tools; the MCP surface + exposes 9 — `list_actions` / `run_action` (business actions) were missing, so + agents installing the skill never learned they can run approvals, conversions, + or flow triggers directly. The skill now covers the full native tool surface + and teaches action preference: when `list_actions` offers a matching action, + call it instead of hand-editing the records it would have touched (actions + carry the app's validation and side effects), confirming destructive or + confirmation-flagged actions with the user first. + + Prerequisite for the distribution shells (#2714 Phase 0): every shell repo + copies this rendered content, so the gap had to close before fan-out. + +- 148beb4: test(mcp): drift guard — SKILL.md must document every registered native tool + + The registered surface is obtained by driving the real registration path (a + `tools/list` round-trip against `MCPServerRuntime` with a full data+action + bridge), not a hand-maintained list, so adding a tool to `mcp-http-tools.ts` + without teaching `skill.ts` fails the suite. Guards against a recurrence of + the 7-of-9 gap fixed in #2715; red-proven by temporarily removing + `run_action` from the skill. + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/types@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/mcp/package.json b/packages/mcp/package.json index a4b58b9d1a..b72c1867f5 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/mcp", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "ObjectStack as an MCP server — exposes your app's objects (and AI tools) over the Model Context Protocol (stdio + Streamable HTTP)", "type": "module", diff --git a/packages/metadata-core/CHANGELOG.md b/packages/metadata-core/CHANGELOG.md index 0ffb2cfc4f..72c6349fcb 100644 --- a/packages/metadata-core/CHANGELOG.md +++ b/packages/metadata-core/CHANGELOG.md @@ -1,5 +1,20 @@ # @objectstack/metadata-core +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/metadata-core/package.json b/packages/metadata-core/package.json index 741f9cd3b9..ae74eb871d 100644 --- a/packages/metadata-core/package.json +++ b/packages/metadata-core/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/metadata-core", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Metadata Repository contracts: types, canonicalization, errors, interface (ADR-0008).", "type": "module", diff --git a/packages/metadata-fs/CHANGELOG.md b/packages/metadata-fs/CHANGELOG.md index 8e02ca7b14..27acd7ee12 100644 --- a/packages/metadata-fs/CHANGELOG.md +++ b/packages/metadata-fs/CHANGELOG.md @@ -1,5 +1,11 @@ # @objectstack/metadata-fs +## 13.0.0 + +### Patch Changes + +- @objectstack/metadata-core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/metadata-fs/package.json b/packages/metadata-fs/package.json index 065d004758..b8d8117353 100644 --- a/packages/metadata-fs/package.json +++ b/packages/metadata-fs/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/metadata-fs", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "FileSystemRepository: Node-only Repository implementation backed by JSON files and a JSONL change log (ADR-0008).", "type": "module", diff --git a/packages/metadata-protocol/CHANGELOG.md b/packages/metadata-protocol/CHANGELOG.md index 690cca638f..133c0782dc 100644 --- a/packages/metadata-protocol/CHANGELOG.md +++ b/packages/metadata-protocol/CHANGELOG.md @@ -1,5 +1,52 @@ # @objectstack/metadata-protocol +## 13.0.0 + +### Minor Changes + +- fc7e7f7: Enforce the package namespace-prefix rule for Studio-authored packages. + + The protocol requires every object name in a package to carry the package's + `manifest.namespace` prefix (`crm_account`); `defineStack()` enforces this at + compile time via `validateNamespacePrefix`. Studio/runtime-authored packages + never take that path, and they were created without a namespace at all — so the + rule was silently inert and objects published with bare, collision-prone names. + + Two runtime changes close the gap: + + - `protocol.installPackage` now derives a default namespace from the package id + (`com.example.leave` → `leave`) when the manifest declares none, and persists + it on the manifest (in-memory registry + `sys_packages`). An explicitly + declared namespace always wins (e.g. HotCRM's `crm`). + - `protocol.publishPackageDrafts` now rejects any object draft whose name lacks + the package namespace prefix, before promoting anything (atomic), with an + actionable message (`Rename it to 'leave_ticket'`). Packages that declare no + namespace are grandfathered — mirroring `defineStack`, the rule is not + invented at enforcement time. + + The per-object prefix check and the id→namespace derivation are extracted into + `@objectstack/spec/kernel` (`validateObjectNamespacePrefix`, + `deriveNamespaceFromPackageId`) as the single source shared by `defineStack` and + the runtime publish path, so the two enforcement points cannot drift. + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/formula@13.0.0 + - @objectstack/types@13.0.0 + - @objectstack/metadata-core@13.0.0 + ## 12.6.0 ### Minor Changes diff --git a/packages/metadata-protocol/package.json b/packages/metadata-protocol/package.json index a89c175082..a46a53c1dd 100644 --- a/packages/metadata-protocol/package.json +++ b/packages/metadata-protocol/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/metadata-protocol", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "ObjectStack metadata management protocol: sys_metadata CRUD, draft/publish, locks, package ownership, diagnostics (ADR-0076).", "type": "module", diff --git a/packages/metadata/CHANGELOG.md b/packages/metadata/CHANGELOG.md index 84a04ed2c1..7bab99defe 100644 --- a/packages/metadata/CHANGELOG.md +++ b/packages/metadata/CHANGELOG.md @@ -1,5 +1,60 @@ # @objectstack/metadata +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/platform-objects@13.0.0 + - @objectstack/types@13.0.0 + - @objectstack/metadata-core@13.0.0 + - @objectstack/metadata-fs@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 0afb0364a5..89139d4a30 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/metadata", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Metadata loading, saving, and persistence for ObjectStack", "type": "module", diff --git a/packages/objectql/CHANGELOG.md b/packages/objectql/CHANGELOG.md index 5e59bb2143..b45ee9946b 100644 --- a/packages/objectql/CHANGELOG.md +++ b/packages/objectql/CHANGELOG.md @@ -1,5 +1,68 @@ # @objectstack/objectql +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +### Patch Changes + +- a1766fe: fix(validation): remove polynomial ReDoS in email validation regexes + + The email validators used `/^[^\s@]+@[^\s@]+\.[^\s@]+$/`, whose quantifiers + around `\.` overlap (the literal dot is also matched by `[^\s@]`) and backtrack + polynomially on adversarial input. The domain part is rewritten as + `[^\s@.]+(?:\.[^\s@.]+)+` so labels exclude `.` and matching is linear. Valid + addresses (including multi-label domains) are unaffected; addresses with an + empty label such as `a@b..c` are now correctly rejected. + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/formula@13.0.0 + - @objectstack/types@13.0.0 + - @objectstack/metadata-protocol@13.0.0 + - @objectstack/metadata-core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/objectql/package.json b/packages/objectql/package.json index 0758316043..17a803971c 100644 --- a/packages/objectql/package.json +++ b/packages/objectql/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/objectql", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Isomorphic ObjectQL Engine for ObjectStack", "main": "dist/index.js", diff --git a/packages/observability/CHANGELOG.md b/packages/observability/CHANGELOG.md index 4cadaacf78..f4fa693ee6 100644 --- a/packages/observability/CHANGELOG.md +++ b/packages/observability/CHANGELOG.md @@ -1,5 +1,20 @@ # @objectstack/observability +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/observability/package.json b/packages/observability/package.json index f70c5ec599..b8e496d49b 100644 --- a/packages/observability/package.json +++ b/packages/observability/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/observability", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Observability contracts and exporters for ObjectStack — MetricsRegistry, ErrorReporter, Logger plus noop/console/OTLP-HTTP exporters. Deployment-target neutral; runtime and services depend on this so the same instrumentation works on Cloudflare Workers, Node, and self-hosted Kubernetes.", "type": "module", diff --git a/packages/platform-objects/CHANGELOG.md b/packages/platform-objects/CHANGELOG.md index 74ee3aa443..42523cbe2f 100644 --- a/packages/platform-objects/CHANGELOG.md +++ b/packages/platform-objects/CHANGELOG.md @@ -1,5 +1,101 @@ # @objectstack/platform-objects +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +- b271691: ADR-0090 P3 — security-domain publish linter (D7) and delegated administration (D12). + + **D7 — `validateSecurityPosture` (@objectstack/lint), wired into `os compile` (errors gate the build) and `os lint`.** Rules, each with a failing fixture: `security-owd-unset` (custom object with no `sharingModel` — the objectui#2348 leave_request shape), `security-owd-alias` (retired D4 alias values, with fix-it), `security-external-wider-than-internal` (D11 `external ≤ internal`), `security-wildcard-vama` (`'*'` + View/Modify All outside the platform admin set, ADR-0066), `security-anchor-high-privilege` (an `isDefault`/everyone-suggested set carrying anchor-forbidden bits), `security-role-word` (D3 vocabulary freeze in security identifiers/labels; ARIA/page roles exempt), and advisory `security-private-no-readscope`. + + **D12 — delegated administration (@objectstack/plugin-security `DelegatedAdminGate`).** `PermissionSetSchema.adminScope` (new in spec, persisted as `sys_permission_set.admin_scope`) declares WHERE (a `sys_business_unit` subtree), WHAT (`manageAssignments` / `manageBindings` / `authorEnvironmentSets`), and WHICH sets a delegate may hand out (`assignablePermissionSets` allowlist). Writes to `sys_user_position`, `sys_position_permission_set`, `sys_user_permission_set`, and `sys_permission_set` are now governed: tenant-level admins (ADR-0066 superuser wildcard) pass through; delegates need a covering scope — inside their subtree, allowlisted sets only (to others AND themselves), single-row writes, `granted_by` audit-stamped; everyone else (including holders of plain CRUD on RBAC tables) is denied. Granting or authoring a set that itself carries an `adminScope` requires a held scope that STRICTLY contains it. The `everyone`/`guest` anchors stay tenant-level only, and direct position assignments to an anchor are rejected for every caller. + + **ADR-0090 Addendum — assignment-level BU anchor.** `sys_user_position.business_unit_id` lands with its three consumers scoped: D12 delegation boundary (enforced here), audit fact, and the depth-anchor contract for enterprise `hierarchy-scope-resolver` implementations (documented on `IHierarchyScopeResolver`). + + **D9 tier tightening.** `describeHighPrivilegeBits` moved to `@objectstack/spec/security` (re-exported from plugin-security) alongside new `describeAnchorForbiddenBits`: `guest` bindings now additionally reject edit bits (read-only by default; create stays the case-by-case exception). + + **BREAKING (@objectstack/plugin-security):** exports renamed to the ADR-0090 D3 vocabulary — `SysRole`→`SysPosition`, `SysUserRole`→`SysUserPosition`, `SysRolePermissionSet`→`SysPositionPermissionSet` (no aliases, pre-launch one-step rename). `sys_position` row actions/list views renamed (`activate_position`, …), labels relabeled Role→Position. Non-tenant-admin writes to the RBAC link tables without an `adminScope` are now denied (previously any CRUD grant on those tables sufficed). + + **BREAKING (@objectstack/platform-objects):** `sys_business_unit_member.role_in_business_unit` → `function_in_business_unit` (D3 reserved-word sweep; values member/lead/deputy unchanged). + +### Minor Changes + +- 9fa84f9: Secure-by-default posture for sensitive system objects (ADR-0066 ④, system-object + slice) — the platform's raw secret/credential stores no longer ride the wildcard + `'*'` permission grant. + + `sys_secret` (encrypted settings/datasource secrets), `sys_jwks` (JWT signing + keys), `sys_verification` (password-reset / verify tokens), + `sys_oauth_access_token`, `sys_oauth_refresh_token` (live bearer credentials), + and `sys_device_code` (pending device-grant codes) now declare + `access: { default: 'private' }`: an ordinary member's generic data-layer + read/write gets 403 instead of being covered by `member_default`'s + `'*': allowRead`. Platform admins retain access via the posture-gated + `viewAllRecords`/`modifyAllRecords` superuser bypass, and every runtime consumer + is unaffected — better-auth reads via its adapter (system context), + `engine.resolveSecret` reads at driver level, and SettingsService / the + datasource secret-binder read principal-less (middleware falls open for internal + calls). + + `sys_scim_provider` (SCIM bearer-token config) gains the object-level + `requiredPermissions: ['manage_platform_settings']` capability gate, mirroring + its sibling `sys_sso_provider`. The Setup nav item for Signing Keys (JWKS) is + now capability-gated like API Keys, so non-admins don't see a menu entry that + can only 403. + + Member self-service objects (`sys_session`, `sys_api_key`, + `sys_oauth_application`, `sys_two_factor`) deliberately keep the public posture — + the Account app ("My Sessions" / "My API Keys" / "My Apps" / 2FA "My + Enrollment") reads them through the generic data layer as the member; row + scoping remains their guard. The declarations are pinned by + `platform-objects.test.ts` and the ADR-0056 D10 conformance-matrix row + `secure-by-default-posture`, so dropping the flag from a secret store fails CI. + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/metadata-core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/platform-objects/package.json b/packages/platform-objects/package.json index cf1d1e753e..534f84af14 100644 --- a/packages/platform-objects/package.json +++ b/packages/platform-objects/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/platform-objects", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Core platform object schemas for ObjectStack — identity, security, audit, tenant, and metadata objects", "main": "dist/index.js", diff --git a/packages/plugins/driver-memory/CHANGELOG.md b/packages/plugins/driver-memory/CHANGELOG.md index 780bf21e79..049c4bfd06 100644 --- a/packages/plugins/driver-memory/CHANGELOG.md +++ b/packages/plugins/driver-memory/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/driver-memory +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/driver-memory/package.json b/packages/plugins/driver-memory/package.json index 6e8a505306..5584842d98 100644 --- a/packages/plugins/driver-memory/package.json +++ b/packages/plugins/driver-memory/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/driver-memory", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "In-Memory Driver for ObjectStack (Reference Implementation)", "main": "dist/index.js", diff --git a/packages/plugins/driver-mongodb/CHANGELOG.md b/packages/plugins/driver-mongodb/CHANGELOG.md index 1ed1770b15..cf9c14bf7a 100644 --- a/packages/plugins/driver-mongodb/CHANGELOG.md +++ b/packages/plugins/driver-mongodb/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/driver-mongodb +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/driver-mongodb/package.json b/packages/plugins/driver-mongodb/package.json index 03f0faa24e..e90f0faebd 100644 --- a/packages/plugins/driver-mongodb/package.json +++ b/packages/plugins/driver-mongodb/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/driver-mongodb", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "MongoDB Driver for ObjectStack - Native document database driver via official mongodb client", "main": "dist/index.js", diff --git a/packages/plugins/driver-sql/CHANGELOG.md b/packages/plugins/driver-sql/CHANGELOG.md index 1b5bb92265..c585bca09d 100644 --- a/packages/plugins/driver-sql/CHANGELOG.md +++ b/packages/plugins/driver-sql/CHANGELOG.md @@ -1,5 +1,23 @@ # @objectstack/driver-sql +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/types@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/driver-sql/package.json b/packages/plugins/driver-sql/package.json index 54c064f4d6..af1e4a2d03 100644 --- a/packages/plugins/driver-sql/package.json +++ b/packages/plugins/driver-sql/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/driver-sql", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "SQL Driver for ObjectStack - Supports PostgreSQL, MySQL, SQLite via Knex", "main": "dist/index.js", diff --git a/packages/plugins/driver-sqlite-wasm/CHANGELOG.md b/packages/plugins/driver-sqlite-wasm/CHANGELOG.md index ab228658a0..421f2e379c 100644 --- a/packages/plugins/driver-sqlite-wasm/CHANGELOG.md +++ b/packages/plugins/driver-sqlite-wasm/CHANGELOG.md @@ -1,5 +1,22 @@ # @objectstack/driver-sqlite-wasm +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/driver-sql@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/driver-sqlite-wasm/package.json b/packages/plugins/driver-sqlite-wasm/package.json index 65dadd2701..b23090f038 100644 --- a/packages/plugins/driver-sqlite-wasm/package.json +++ b/packages/plugins/driver-sqlite-wasm/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/driver-sqlite-wasm", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "WASM SQLite Driver for ObjectStack — runs in browser/WebContainer (StackBlitz) without native bindings", "keywords": [ diff --git a/packages/plugins/embedder-openai/CHANGELOG.md b/packages/plugins/embedder-openai/CHANGELOG.md index f965d915ab..5d5f189e01 100644 --- a/packages/plugins/embedder-openai/CHANGELOG.md +++ b/packages/plugins/embedder-openai/CHANGELOG.md @@ -1,5 +1,20 @@ # @objectstack/embedder-openai +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/embedder-openai/package.json b/packages/plugins/embedder-openai/package.json index f59e931ab9..bb359199a2 100644 --- a/packages/plugins/embedder-openai/package.json +++ b/packages/plugins/embedder-openai/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/embedder-openai", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "OpenAI-compatible embedder for ObjectStack — works against OpenAI, 阿里通义 DashScope, 智谱 BigModel, 硅基流动 SiliconFlow, 火山引擎 Doubao, MiniMax, Ollama, and any drop-in OpenAI-shape endpoint.", "main": "dist/index.js", diff --git a/packages/plugins/knowledge-memory/CHANGELOG.md b/packages/plugins/knowledge-memory/CHANGELOG.md index e4f5a77bf7..46369f8979 100644 --- a/packages/plugins/knowledge-memory/CHANGELOG.md +++ b/packages/plugins/knowledge-memory/CHANGELOG.md @@ -1,5 +1,22 @@ # @objectstack/knowledge-memory +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/service-knowledge@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/knowledge-memory/package.json b/packages/plugins/knowledge-memory/package.json index ebe436f7ca..2e9817370f 100644 --- a/packages/plugins/knowledge-memory/package.json +++ b/packages/plugins/knowledge-memory/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/knowledge-memory", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "In-memory knowledge adapter for ObjectStack (dev / test reference implementation).", "main": "dist/index.js", diff --git a/packages/plugins/knowledge-ragflow/CHANGELOG.md b/packages/plugins/knowledge-ragflow/CHANGELOG.md index 1d8cba4f3a..09d307589c 100644 --- a/packages/plugins/knowledge-ragflow/CHANGELOG.md +++ b/packages/plugins/knowledge-ragflow/CHANGELOG.md @@ -1,5 +1,22 @@ # @objectstack/knowledge-ragflow +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/service-knowledge@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/knowledge-ragflow/package.json b/packages/plugins/knowledge-ragflow/package.json index fe25fe8aac..a79e34603a 100644 --- a/packages/plugins/knowledge-ragflow/package.json +++ b/packages/plugins/knowledge-ragflow/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/knowledge-ragflow", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "RAGFlow knowledge adapter for ObjectStack — production-grade RAG via the Apache 2.0 RAGFlow REST API.", "main": "dist/index.js", diff --git a/packages/plugins/plugin-approvals/CHANGELOG.md b/packages/plugins/plugin-approvals/CHANGELOG.md index eea7cc8499..db56b12fbe 100644 --- a/packages/plugins/plugin-approvals/CHANGELOG.md +++ b/packages/plugins/plugin-approvals/CHANGELOG.md @@ -1,5 +1,25 @@ # @objectstack/plugin-approvals +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/formula@13.0.0 + - @objectstack/platform-objects@13.0.0 + - @objectstack/metadata-core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/plugin-approvals/package.json b/packages/plugins/plugin-approvals/package.json index 4c4e15e200..ea5fe43792 100644 --- a/packages/plugins/plugin-approvals/package.json +++ b/packages/plugins/plugin-approvals/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/plugin-approvals", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Multi-step approval engine for ObjectStack — sys_approval_process + sys_approval_request + sys_approval_action + IApprovalService.", "main": "dist/index.js", diff --git a/packages/plugins/plugin-audit/CHANGELOG.md b/packages/plugins/plugin-audit/CHANGELOG.md index 2778a32c7f..137c97a478 100644 --- a/packages/plugins/plugin-audit/CHANGELOG.md +++ b/packages/plugins/plugin-audit/CHANGELOG.md @@ -1,5 +1,23 @@ # @objectstack/plugin-audit +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/platform-objects@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/plugin-audit/package.json b/packages/plugins/plugin-audit/package.json index 3153059dfc..684aaa544e 100644 --- a/packages/plugins/plugin-audit/package.json +++ b/packages/plugins/plugin-audit/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/plugin-audit", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Audit Plugin for ObjectStack — System audit log object and audit trail", "main": "dist/index.js", diff --git a/packages/plugins/plugin-auth/CHANGELOG.md b/packages/plugins/plugin-auth/CHANGELOG.md index baff8b719c..f5c21f6377 100644 --- a/packages/plugins/plugin-auth/CHANGELOG.md +++ b/packages/plugins/plugin-auth/CHANGELOG.md @@ -1,5 +1,131 @@ # Changelog +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +### Minor Changes + +- 57b89b4: feat(mcp): the MCP surface is now **default-on** — a core platform capability (#2698) + + `/api/v1/mcp` is served (and advertised in `/discovery`) out of the box; the + OAuth 2.1 authorization track and Dynamic Client Registration follow it, so a + fresh deployment is connectable by any MCP client with zero configuration. + Operators opt OUT with `OS_MCP_SERVER_ENABLED=false`. + + - New single decision point `isMcpServerEnabled()` in `@objectstack/types` + (default on; explicit `false`/`0`/`off`/`no` disables). The runtime + dispatcher's `/mcp` route gate, the CLI's MCP plugin auto-load, the REST + `/discovery` advertisement, and the auth service's OAuth/DCR follow-defaults + all delegate to it — the served route, the advertised route, and the + authorization track can never disagree. + - The env var is now effectively tri-state: unset → HTTP surface on; + explicit `true` → additionally auto-start the long-lived **stdio** transport + at boot (unchanged, still opt-in — a default must not claim the process's + stdin/stdout); explicit `false` → everything off, fail-closed (404, no + metadata, no DCR). + - The OAuth 2.1 TLS rule is unaffected: on a plain-HTTP non-loopback origin + the OAuth track stays dark and the default-on surface remains API-key-only. + +- 5be00c3: feat(mcp): spec-compliant OAuth 2.1 authorization for `/api/v1/mcp` (#2698) + + Any OAuth-capable MCP client (claude.ai custom connectors, Claude Desktop, + Claude Code) can now connect to a deployment **self-serve**: no admin-minted + API key, no central registry — you sign in through the browser as yourself and + every tool call runs under your own permissions and row-level security. + + **Each deployment is its own authorization server**, backed by the embedded + better-auth instance (`@better-auth/oauth-provider`). Rationale for the design + decisions lives in #2698; the moving parts: + + - **Discovery**: `/.well-known/oauth-protected-resource` (RFC 9728, incl. the + path-inserted variant for `/api/v1/mcp`) and + `/.well-known/oauth-authorization-server` (RFC 8414, incl. the path-inserted + variant for the `/api/v1/auth` issuer) are served from the deployment origin. + 401s from `/api/v1/mcp` advertise the resource metadata via + `WWW-Authenticate`, so clients bootstrap the flow automatically. + - **Dynamic Client Registration (RFC 7591)** is enabled (unauthenticated, as + the MCP spec requires) whenever the MCP surface is on — every deployment is a + distinct AS, so clients cannot ship pre-registered IDs. Force it either way + with `OS_OIDC_DCR_ENABLED` or the new `plugins.dynamicClientRegistration` + auth-config field. The embedded AS itself auto-enables whenever the MCP + surface is on — which is now the default (explicit + `OS_OIDC_PROVIDER_ENABLED=false` still wins). + - **Authorization-code + PKCE** flow with RFC 8707 resource binding: access + tokens are minted with `aud=/api/v1/mcp` and verified locally + (signature/issuer/audience/expiry) against the deployment's own JWKS — + fail-closed parity with API keys: unknown/expired/wrong-audience tokens, + sub-less M2M tokens, or a presented-but-invalid bearer never fall back to an + ambient session, they 401. + - **Token → ExecutionContext**: a valid access token resolves to the same + principal-bound `ExecutionContext` as every other credential, single-sourced + through `resolveAuthzContext` — OAuth adds a second _provenance_ for the + principal, not a second authz model. `ExecutionContext` gains an optional + `oauthScopes` field carrying the token's granted scopes. + - **Coarse scopes → tool families**, enforced at tool dispatch: `data:read` + (list/describe/query/get), `data:write` (create/update/delete), + `actions:execute` (list_actions/run_action). Constants live in + `@objectstack/spec/ai` (`MCP_OAUTH_SCOPES`). Tools outside the grant are not + registered — and therefore rejected — for that request. API-key and session + principals are unaffected (not scope-limited). + - **TLS required, localhost exempt** (OAuth 2.1): on a plain-HTTP non-loopback + origin the OAuth track stays dark (no metadata, no bearer acceptance) and the + endpoint remains API-key-only. Local clients reach intranet deployments; + claude.ai web connectors additionally need public HTTPS reachability. + + **API keys are unchanged** (dual-track): `x-api-key` / `Authorization: ApiKey` / + `Authorization: Bearer osk_…` keep working exactly as before for CI and + headless agents — covered by new regression tests. + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/platform-objects@13.0.0 + - @objectstack/types@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/plugin-auth/package.json b/packages/plugins/plugin-auth/package.json index a17b8aec01..1ff3ad46d5 100644 --- a/packages/plugins/plugin-auth/package.json +++ b/packages/plugins/plugin-auth/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/plugin-auth", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Authentication & Identity Plugin for ObjectStack", "main": "dist/index.js", diff --git a/packages/plugins/plugin-dev/CHANGELOG.md b/packages/plugins/plugin-dev/CHANGELOG.md index 0e2cf549c6..18adab63fd 100644 --- a/packages/plugins/plugin-dev/CHANGELOG.md +++ b/packages/plugins/plugin-dev/CHANGELOG.md @@ -1,5 +1,36 @@ # @objectstack/plugin-dev +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [799b285] +- Updated dependencies [b1081b8] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [a1766fe] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/runtime@13.0.0 + - @objectstack/objectql@13.0.0 + - @objectstack/rest@13.0.0 + - @objectstack/plugin-security@13.0.0 + - @objectstack/plugin-auth@13.0.0 + - @objectstack/plugin-hono-server@13.0.0 + - @objectstack/types@13.0.0 + - @objectstack/account@13.0.0 + - @objectstack/setup@13.0.0 + - @objectstack/driver-memory@13.0.0 + - @objectstack/service-i18n@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/plugin-dev/package.json b/packages/plugins/plugin-dev/package.json index 2179563bce..41c5a6547b 100644 --- a/packages/plugins/plugin-dev/package.json +++ b/packages/plugins/plugin-dev/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/plugin-dev", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Development Mode Plugin for ObjectStack — auto-enables all services with in-memory implementations", "main": "dist/index.js", diff --git a/packages/plugins/plugin-email/CHANGELOG.md b/packages/plugins/plugin-email/CHANGELOG.md index 522dc01972..e02f41c127 100644 --- a/packages/plugins/plugin-email/CHANGELOG.md +++ b/packages/plugins/plugin-email/CHANGELOG.md @@ -1,5 +1,33 @@ # @objectstack/plugin-email +## 13.0.0 + +### Patch Changes + +- a1766fe: fix(validation): remove polynomial ReDoS in email validation regexes + + The email validators used `/^[^\s@]+@[^\s@]+\.[^\s@]+$/`, whose quantifiers + around `\.` overlap (the literal dot is also matched by `[^\s@]`) and backtrack + polynomially on adversarial input. The domain part is rewritten as + `[^\s@.]+(?:\.[^\s@.]+)+` so labels exclude `.` and matching is linear. Valid + addresses (including multi-label domains) are unaffected; addresses with an + empty label such as `a@b..c` are now correctly rejected. + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/formula@13.0.0 + - @objectstack/platform-objects@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/plugin-email/package.json b/packages/plugins/plugin-email/package.json index 83fb37c1af..dd2e1df704 100644 --- a/packages/plugins/plugin-email/package.json +++ b/packages/plugins/plugin-email/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/plugin-email", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Email service plugin for ObjectStack — IEmailService + transport-pluggable outbound delivery with sys_email persistence.", "main": "dist/index.js", diff --git a/packages/plugins/plugin-hono-server/CHANGELOG.md b/packages/plugins/plugin-hono-server/CHANGELOG.md index 891067a8b9..04ad00b870 100644 --- a/packages/plugins/plugin-hono-server/CHANGELOG.md +++ b/packages/plugins/plugin-hono-server/CHANGELOG.md @@ -1,5 +1,38 @@ # @objectstack/plugin-hono-server +## 13.0.0 + +### Patch Changes + +- b1081b8: Return `405 Method Not Allowed` (with an accurate `Allow` header and a + descriptive body) instead of an opaque `{"error":"Not found"}` 404 when a + request hits a registered path under the wrong HTTP method. + + Hono routes a method mismatch to the same `notFound` sink as a genuinely + missing path, so a `POST` to a `PUT`-only route (e.g. the metadata save + endpoint `PUT /api/v1/meta/:type/:name`) gave callers no hint that the path + exists under another verb (#2684). The server now tracks every registered + `(method, pattern)` pair and re-matches the request path in the `notFound` + handler: matching another method yields a 405; matching nothing stays a 404. + This is framework-wide — every registered endpoint benefits. Static/SPA + catch-alls registered straight on the raw Hono app are not tracked and never + produce a spurious 405. + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/types@13.0.0 + - @objectstack/observability@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/plugin-hono-server/package.json b/packages/plugins/plugin-hono-server/package.json index 8974a4fd46..c76788e571 100644 --- a/packages/plugins/plugin-hono-server/package.json +++ b/packages/plugins/plugin-hono-server/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/plugin-hono-server", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Standard Hono Server Adapter for ObjectStack Runtime", "main": "dist/index.js", diff --git a/packages/plugins/plugin-reports/CHANGELOG.md b/packages/plugins/plugin-reports/CHANGELOG.md index 9ae12b86d4..9c6e58c100 100644 --- a/packages/plugins/plugin-reports/CHANGELOG.md +++ b/packages/plugins/plugin-reports/CHANGELOG.md @@ -1,5 +1,23 @@ # @objectstack/plugin-reports +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/platform-objects@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/plugin-reports/package.json b/packages/plugins/plugin-reports/package.json index 2fed24d2eb..99289754d3 100644 --- a/packages/plugins/plugin-reports/package.json +++ b/packages/plugins/plugin-reports/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/plugin-reports", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Saved reports + scheduled email digests for ObjectStack — sys_saved_report + sys_report_schedule + IReportService.", "main": "dist/index.js", diff --git a/packages/plugins/plugin-security/CHANGELOG.md b/packages/plugins/plugin-security/CHANGELOG.md index 85558f0ed7..3db3b20b08 100644 --- a/packages/plugins/plugin-security/CHANGELOG.md +++ b/packages/plugins/plugin-security/CHANGELOG.md @@ -1,5 +1,151 @@ # @objectstack/plugin-security +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +- b271691: ADR-0090 P3 — security-domain publish linter (D7) and delegated administration (D12). + + **D7 — `validateSecurityPosture` (@objectstack/lint), wired into `os compile` (errors gate the build) and `os lint`.** Rules, each with a failing fixture: `security-owd-unset` (custom object with no `sharingModel` — the objectui#2348 leave_request shape), `security-owd-alias` (retired D4 alias values, with fix-it), `security-external-wider-than-internal` (D11 `external ≤ internal`), `security-wildcard-vama` (`'*'` + View/Modify All outside the platform admin set, ADR-0066), `security-anchor-high-privilege` (an `isDefault`/everyone-suggested set carrying anchor-forbidden bits), `security-role-word` (D3 vocabulary freeze in security identifiers/labels; ARIA/page roles exempt), and advisory `security-private-no-readscope`. + + **D12 — delegated administration (@objectstack/plugin-security `DelegatedAdminGate`).** `PermissionSetSchema.adminScope` (new in spec, persisted as `sys_permission_set.admin_scope`) declares WHERE (a `sys_business_unit` subtree), WHAT (`manageAssignments` / `manageBindings` / `authorEnvironmentSets`), and WHICH sets a delegate may hand out (`assignablePermissionSets` allowlist). Writes to `sys_user_position`, `sys_position_permission_set`, `sys_user_permission_set`, and `sys_permission_set` are now governed: tenant-level admins (ADR-0066 superuser wildcard) pass through; delegates need a covering scope — inside their subtree, allowlisted sets only (to others AND themselves), single-row writes, `granted_by` audit-stamped; everyone else (including holders of plain CRUD on RBAC tables) is denied. Granting or authoring a set that itself carries an `adminScope` requires a held scope that STRICTLY contains it. The `everyone`/`guest` anchors stay tenant-level only, and direct position assignments to an anchor are rejected for every caller. + + **ADR-0090 Addendum — assignment-level BU anchor.** `sys_user_position.business_unit_id` lands with its three consumers scoped: D12 delegation boundary (enforced here), audit fact, and the depth-anchor contract for enterprise `hierarchy-scope-resolver` implementations (documented on `IHierarchyScopeResolver`). + + **D9 tier tightening.** `describeHighPrivilegeBits` moved to `@objectstack/spec/security` (re-exported from plugin-security) alongside new `describeAnchorForbiddenBits`: `guest` bindings now additionally reject edit bits (read-only by default; create stays the case-by-case exception). + + **BREAKING (@objectstack/plugin-security):** exports renamed to the ADR-0090 D3 vocabulary — `SysRole`→`SysPosition`, `SysUserRole`→`SysUserPosition`, `SysRolePermissionSet`→`SysPositionPermissionSet` (no aliases, pre-launch one-step rename). `sys_position` row actions/list views renamed (`activate_position`, …), labels relabeled Role→Position. Non-tenant-admin writes to the RBAC link tables without an `adminScope` are now denied (previously any CRUD grant on those tables sufficed). + + **BREAKING (@objectstack/platform-objects):** `sys_business_unit_member.role_in_business_unit` → `function_in_business_unit` (D3 reserved-word sweep; values member/lead/deputy unchanged). + +### Minor Changes + +- 01917c2: ADR-0090 P2 — audience anchors: `everyone`/`guest` builtin positions. + + - `EVERYONE_POSITION` / `GUEST_POSITION` constants in `@objectstack/spec`; + both anchors seeded (system-managed) alongside the builtin identity names. + - Every authenticated principal implicitly holds `everyone` in + `ctx.positions`, so sets bound to it resolve as ordinary position-bound + grants — ADDITIVE. The fallback CLIFF is abolished: the configured + baseline (`fallbackPermissionSet`, default `member_default`) now applies + in addition to explicit grants instead of only when the user had none, + and is also seeded as an `everyone` binding (same table/audit/explain + path as admin-authored defaults). + - Sessionless HTTP principals resolve as `principalKind: 'guest'` holding + exactly `['guest']`; internal bare contexts are untouched. + - Audience-anchor binding gate: `sys_position_permission_set` writes that + would bind a high-privilege set (VAMA, delete/purge/transfer, system + permissions, `'*'` wildcard) to `everyone`/`guest` are rejected at the + data layer, unconditionally (`describeHighPrivilegeBits` predicate is + exported and shared with the seed-time validation). + +- a5a1e41: ADR-0090 P4 — explain engine (D6), access-matrix snapshot gate, recalibrated benchmark. + + **Explain contract (@objectstack/spec).** `ExplainRequestSchema` / `ExplainDecisionSchema` / `ExplainLayerSchema`: `explain(principal, object, operation)` reports the verdict of every evaluation-pipeline layer in order (principal → required_permissions → object_crud → fls → owd_baseline → depth → sharing → vama_bypass → rls), with per-layer contributor attribution (which permission set, reached via which position/baseline) and — for reads — the composed row filter as the machine artifact. Carries the D10 dual attribution (`principalKind`, `onBehalfOf`). + + **Explain engine (@objectstack/plugin-security).** `explainAccess` is "explained by construction": it calls the SAME permission-set resolution, evaluator, FLS mask, and RLS composition the enforcement middleware calls (injected from `SecurityPlugin`), so the report cannot drift from enforcement. Exposed on the `security` kernel service as `explain(request, callerContext)`; explaining another user requires `manage_users` (the target's context is reconstructed from `sys_user_position` / `sys_user_permission_set` with everyone-anchor semantics via `buildContextForUser`). + + **Access-matrix snapshot gate (@objectstack/lint + os compile).** `buildAccessMatrix(stack)` derives the (permission set × object) capability matrix purely from metadata; `diffAccessMatrix` renders semantic review lines ("'crm_admin' gains delete on 'crm_lead'", depth changes, OWD swings, entry add/remove). `os compile` gains an opt-in gate: with `access-matrix.json` committed next to the config, any drift fails the build with those lines until re-snapshotted via `--update-access-matrix` — every capability change becomes a reviewable diff. Seeded for `examples/app-crm`. + + **Benchmark (ADR-0090 Addendum).** `scripts/bench/permission-bench.mts` — single-org 10k users × 1M rows per the recalibrated topology; asserts the O()-shape property (per-request cost independent of user population; unit-depth IN-set cost tracks unit size). Passing at 0.1µs/eval and 59ms/1M-row IN-set scan. + +- 466adf6: Per-operation object `requiredPermissions` (ADR-0066 ⑤) — an object can now be + read-open / write-gated instead of gating all of CRUD on one capability set. + + `Object.requiredPermissions` accepts either the original `string[]` (capabilities + required for **all** operations) **or** a `{ read?, create?, update?, delete? }` + map that gates each operation class independently — mirroring how Salesforce and + Dataverse separate capability by operation. plugin-security enforces the caps for + the request's operation class as the same D3 AND-gate (checked before the CRUD + grant, fail-closed). The mapping folds `transfer`/`restore` into `update` and + `purge` into `delete`, derived from the existing CRUD permission bits so it stays + in lockstep with them. + + Backward-compatible: the `string[]` form keeps its gate-every-operation semantics + (normalized into an `all` bucket that unions with the per-operation bucket), so + existing objects are unaffected. The per-operation map's keys are validated + `.strict()`, so a mistyped key (e.g. `reads`) is rejected at author time rather + than silently ignored. + +### Patch Changes + +- 466adf6: Author-time capability-reference lint (ADR-0066 ⑨) — `os validate` / `os lint` + now warn when a `requiredPermissions` names a capability that is registered + nowhere. + + `requiredPermissions` (on objects, fields, apps, actions) is a free string, so a + typo like `mange_users` is schema-valid and fails closed at runtime (the caller + is denied) — safe, but silent. The new `validateCapabilityReferences` rule + (`@objectstack/lint`) resolves every reference against the author-time known set + and warns on the unresolved ones: + + - built-in platform capabilities — now sourced from a single canonical list in + `@objectstack/spec` (`security/capabilities.ts`: `PLATFORM_CAPABILITIES` / + `PLATFORM_CAPABILITY_NAMES`), which `@objectstack/plugin-security`'s + `bootstrapSystemCapabilities` also seeds from (one source of truth, no drift), + - any capability a permission set in the stack grants via `systemPermissions` + (granting is what declares it — mirrors the runtime derived-defaults rule), and + - any `sys_capability` row shipped as seed data. + + It is a **warning**, not an error: a single package can't see capabilities + declared by other installed packages, and the reference fails closed anyway. + `systemPermissions` itself is never flagged — it is the declaration side, and a + package legitimately introduces new capabilities there. The object case also + understands the per-operation `requiredPermissions` map form (ADR-0066 ⑤) and + points a finding at the exact operation slice. + +- 799b285: Fix field-level-security read leak on mutation responses. The security + middleware only masked read-protected fields on `find`/`findOne` results, so a + caller with edit-but-not-field-read could `insert`/`update` a record and read a + read-protected field back out of the echoed post-image (field WRITES were + already blocked, but the response image was not masked). The mask now also + covers `insert`/`update` results, matching read behavior. +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/formula@13.0.0 + - @objectstack/platform-objects@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/plugin-security/package.json b/packages/plugins/plugin-security/package.json index 51babb3f4d..eba946c5c3 100644 --- a/packages/plugins/plugin-security/package.json +++ b/packages/plugins/plugin-security/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/plugin-security", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Security Plugin for ObjectStack — RBAC, RLS, and Field-Level Security Runtime", "main": "dist/index.js", diff --git a/packages/plugins/plugin-sharing/CHANGELOG.md b/packages/plugins/plugin-sharing/CHANGELOG.md index 1c3ced0026..8705e5ff76 100644 --- a/packages/plugins/plugin-sharing/CHANGELOG.md +++ b/packages/plugins/plugin-sharing/CHANGELOG.md @@ -1,5 +1,59 @@ # @objectstack/plugin-sharing +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [a1766fe] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/objectql@13.0.0 + - @objectstack/formula@13.0.0 + - @objectstack/platform-objects@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/plugin-sharing/package.json b/packages/plugins/plugin-sharing/package.json index cb50961c66..6fd1811920 100644 --- a/packages/plugins/plugin-sharing/package.json +++ b/packages/plugins/plugin-sharing/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/plugin-sharing", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Record-level sharing for ObjectStack — sys_record_share + middleware that enforces sharingModel + ISharingService.", "main": "dist/index.js", diff --git a/packages/plugins/plugin-webhooks/CHANGELOG.md b/packages/plugins/plugin-webhooks/CHANGELOG.md index 8023d56379..3198616e87 100644 --- a/packages/plugins/plugin-webhooks/CHANGELOG.md +++ b/packages/plugins/plugin-webhooks/CHANGELOG.md @@ -1,5 +1,22 @@ # @objectstack/plugin-webhooks +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/service-messaging@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/plugins/plugin-webhooks/package.json b/packages/plugins/plugin-webhooks/package.json index 7b71f1bdd1..56b31a07fc 100644 --- a/packages/plugins/plugin-webhooks/package.json +++ b/packages/plugins/plugin-webhooks/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/plugin-webhooks", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Persistent, cluster-aware webhook dispatcher. Durable outbox + per-partition cluster.lock for exactly-once-ish delivery across nodes. See content/docs/concepts/webhook-delivery.mdx.", "type": "module", diff --git a/packages/rest/CHANGELOG.md b/packages/rest/CHANGELOG.md index 5236bdb337..d824b0cdeb 100644 --- a/packages/rest/CHANGELOG.md +++ b/packages/rest/CHANGELOG.md @@ -1,5 +1,82 @@ # @objectstack/rest +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +### Minor Changes + +- 57b89b4: feat(mcp): the MCP surface is now **default-on** — a core platform capability (#2698) + + `/api/v1/mcp` is served (and advertised in `/discovery`) out of the box; the + OAuth 2.1 authorization track and Dynamic Client Registration follow it, so a + fresh deployment is connectable by any MCP client with zero configuration. + Operators opt OUT with `OS_MCP_SERVER_ENABLED=false`. + + - New single decision point `isMcpServerEnabled()` in `@objectstack/types` + (default on; explicit `false`/`0`/`off`/`no` disables). The runtime + dispatcher's `/mcp` route gate, the CLI's MCP plugin auto-load, the REST + `/discovery` advertisement, and the auth service's OAuth/DCR follow-defaults + all delegate to it — the served route, the advertised route, and the + authorization track can never disagree. + - The env var is now effectively tri-state: unset → HTTP surface on; + explicit `true` → additionally auto-start the long-lived **stdio** transport + at boot (unchanged, still opt-in — a default must not claim the process's + stdin/stdout); explicit `false` → everything off, fail-closed (404, no + metadata, no DCR). + - The OAuth 2.1 TLS rule is unaffected: on a plain-HTTP non-loopback origin + the OAuth track stays dark and the default-on surface remains API-key-only. + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/platform-objects@13.0.0 + - @objectstack/types@13.0.0 + - @objectstack/service-package@13.0.0 + ## 12.6.0 ### Minor Changes diff --git a/packages/rest/package.json b/packages/rest/package.json index b8985a690c..3361aff102 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/rest", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "ObjectStack REST API Server - automatic REST endpoint generation from protocol", "type": "module", diff --git a/packages/runtime/CHANGELOG.md b/packages/runtime/CHANGELOG.md index f32f83cd26..991cdca5be 100644 --- a/packages/runtime/CHANGELOG.md +++ b/packages/runtime/CHANGELOG.md @@ -1,5 +1,163 @@ # @objectstack/runtime +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +### Minor Changes + +- 01917c2: ADR-0090 P2 — audience anchors: `everyone`/`guest` builtin positions. + + - `EVERYONE_POSITION` / `GUEST_POSITION` constants in `@objectstack/spec`; + both anchors seeded (system-managed) alongside the builtin identity names. + - Every authenticated principal implicitly holds `everyone` in + `ctx.positions`, so sets bound to it resolve as ordinary position-bound + grants — ADDITIVE. The fallback CLIFF is abolished: the configured + baseline (`fallbackPermissionSet`, default `member_default`) now applies + in addition to explicit grants instead of only when the user had none, + and is also seeded as an `everyone` binding (same table/audit/explain + path as admin-authored defaults). + - Sessionless HTTP principals resolve as `principalKind: 'guest'` holding + exactly `['guest']`; internal bare contexts are untouched. + - Audience-anchor binding gate: `sys_position_permission_set` writes that + would bind a high-privilege set (VAMA, delete/purge/transfer, system + permissions, `'*'` wildcard) to `everyone`/`guest` are rejected at the + data layer, unconditionally (`describeHighPrivilegeBits` predicate is + exported and shared with the seed-time validation). + +- 57b89b4: feat(mcp): the MCP surface is now **default-on** — a core platform capability (#2698) + + `/api/v1/mcp` is served (and advertised in `/discovery`) out of the box; the + OAuth 2.1 authorization track and Dynamic Client Registration follow it, so a + fresh deployment is connectable by any MCP client with zero configuration. + Operators opt OUT with `OS_MCP_SERVER_ENABLED=false`. + + - New single decision point `isMcpServerEnabled()` in `@objectstack/types` + (default on; explicit `false`/`0`/`off`/`no` disables). The runtime + dispatcher's `/mcp` route gate, the CLI's MCP plugin auto-load, the REST + `/discovery` advertisement, and the auth service's OAuth/DCR follow-defaults + all delegate to it — the served route, the advertised route, and the + authorization track can never disagree. + - The env var is now effectively tri-state: unset → HTTP surface on; + explicit `true` → additionally auto-start the long-lived **stdio** transport + at boot (unchanged, still opt-in — a default must not claim the process's + stdin/stdout); explicit `false` → everything off, fail-closed (404, no + metadata, no DCR). + - The OAuth 2.1 TLS rule is unaffected: on a plain-HTTP non-loopback origin + the OAuth track stays dark and the default-on surface remains API-key-only. + +- 5be00c3: feat(mcp): spec-compliant OAuth 2.1 authorization for `/api/v1/mcp` (#2698) + + Any OAuth-capable MCP client (claude.ai custom connectors, Claude Desktop, + Claude Code) can now connect to a deployment **self-serve**: no admin-minted + API key, no central registry — you sign in through the browser as yourself and + every tool call runs under your own permissions and row-level security. + + **Each deployment is its own authorization server**, backed by the embedded + better-auth instance (`@better-auth/oauth-provider`). Rationale for the design + decisions lives in #2698; the moving parts: + + - **Discovery**: `/.well-known/oauth-protected-resource` (RFC 9728, incl. the + path-inserted variant for `/api/v1/mcp`) and + `/.well-known/oauth-authorization-server` (RFC 8414, incl. the path-inserted + variant for the `/api/v1/auth` issuer) are served from the deployment origin. + 401s from `/api/v1/mcp` advertise the resource metadata via + `WWW-Authenticate`, so clients bootstrap the flow automatically. + - **Dynamic Client Registration (RFC 7591)** is enabled (unauthenticated, as + the MCP spec requires) whenever the MCP surface is on — every deployment is a + distinct AS, so clients cannot ship pre-registered IDs. Force it either way + with `OS_OIDC_DCR_ENABLED` or the new `plugins.dynamicClientRegistration` + auth-config field. The embedded AS itself auto-enables whenever the MCP + surface is on — which is now the default (explicit + `OS_OIDC_PROVIDER_ENABLED=false` still wins). + - **Authorization-code + PKCE** flow with RFC 8707 resource binding: access + tokens are minted with `aud=/api/v1/mcp` and verified locally + (signature/issuer/audience/expiry) against the deployment's own JWKS — + fail-closed parity with API keys: unknown/expired/wrong-audience tokens, + sub-less M2M tokens, or a presented-but-invalid bearer never fall back to an + ambient session, they 401. + - **Token → ExecutionContext**: a valid access token resolves to the same + principal-bound `ExecutionContext` as every other credential, single-sourced + through `resolveAuthzContext` — OAuth adds a second _provenance_ for the + principal, not a second authz model. `ExecutionContext` gains an optional + `oauthScopes` field carrying the token's granted scopes. + - **Coarse scopes → tool families**, enforced at tool dispatch: `data:read` + (list/describe/query/get), `data:write` (create/update/delete), + `actions:execute` (list_actions/run_action). Constants live in + `@objectstack/spec/ai` (`MCP_OAUTH_SCOPES`). Tools outside the grant are not + registered — and therefore rejected — for that request. API-key and session + principals are unaffected (not scope-limited). + - **TLS required, localhost exempt** (OAuth 2.1): on a plain-HTTP non-loopback + origin the OAuth track stays dark (no metadata, no bearer acceptance) and the + endpoint remains API-key-only. Local clients reach intranet deployments; + claude.ai web connectors additionally need public HTTPS reachability. + + **API keys are unchanged** (dual-track): `x-api-key` / `Authorization: ApiKey` / + `Authorization: Bearer osk_…` keep working exactly as before for CI and + headless agents — covered by new regression tests. + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [799b285] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [a1766fe] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/objectql@13.0.0 + - @objectstack/formula@13.0.0 + - @objectstack/rest@13.0.0 + - @objectstack/plugin-security@13.0.0 + - @objectstack/plugin-auth@13.0.0 + - @objectstack/metadata@13.0.0 + - @objectstack/types@13.0.0 + - @objectstack/observability@13.0.0 + - @objectstack/driver-memory@13.0.0 + - @objectstack/driver-sql@13.0.0 + - @objectstack/driver-sqlite-wasm@13.0.0 + - @objectstack/service-cluster@13.0.0 + - @objectstack/service-datasource@13.0.0 + - @objectstack/service-i18n@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/runtime/package.json b/packages/runtime/package.json index 9fa4d30000..cdd80dd86c 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/runtime", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "ObjectStack Core Runtime & Query Engine", "type": "module", diff --git a/packages/sdui-parser/CHANGELOG.md b/packages/sdui-parser/CHANGELOG.md index 40bc3dd046..08de09e446 100644 --- a/packages/sdui-parser/CHANGELOG.md +++ b/packages/sdui-parser/CHANGELOG.md @@ -1,5 +1,7 @@ # @objectstack/sdui-parser +## 13.0.0 + ## 12.6.0 ## 12.5.0 diff --git a/packages/sdui-parser/package.json b/packages/sdui-parser/package.json index 5277114f94..f437b411b9 100644 --- a/packages/sdui-parser/package.json +++ b/packages/sdui-parser/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/sdui-parser", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "ObjectStack constrained JSX-source → SDUI SchemaNode tree compiler (parse, never execute). Isomorphic, zero React. ADR-0080.", "main": "dist/index.js", diff --git a/packages/services/service-analytics/CHANGELOG.md b/packages/services/service-analytics/CHANGELOG.md index 33a9a98d5e..63d0fda955 100644 --- a/packages/services/service-analytics/CHANGELOG.md +++ b/packages/services/service-analytics/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog — @objectstack/service-analytics +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/services/service-analytics/package.json b/packages/services/service-analytics/package.json index c00de93d46..faba51890f 100644 --- a/packages/services/service-analytics/package.json +++ b/packages/services/service-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-analytics", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Analytics Service for ObjectStack — implements IAnalyticsService with multi-driver strategy pattern (NativeSQL, ObjectQL, InMemory)", "type": "module", diff --git a/packages/services/service-automation/CHANGELOG.md b/packages/services/service-automation/CHANGELOG.md index 0a30f0099f..043458baea 100644 --- a/packages/services/service-automation/CHANGELOG.md +++ b/packages/services/service-automation/CHANGELOG.md @@ -1,5 +1,55 @@ # @objectstack/service-automation +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/formula@13.0.0 + ## 12.6.0 ### Minor Changes diff --git a/packages/services/service-automation/package.json b/packages/services/service-automation/package.json index 5cffef888d..7980011628 100644 --- a/packages/services/service-automation/package.json +++ b/packages/services/service-automation/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-automation", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Automation Service for ObjectStack — implements IAutomationService with plugin-based DAG flow execution engine", "type": "module", diff --git a/packages/services/service-cache/CHANGELOG.md b/packages/services/service-cache/CHANGELOG.md index e10cbfdbe5..6955601c1d 100644 --- a/packages/services/service-cache/CHANGELOG.md +++ b/packages/services/service-cache/CHANGELOG.md @@ -1,5 +1,22 @@ # @objectstack/service-cache +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/observability@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/services/service-cache/package.json b/packages/services/service-cache/package.json index 0f640c8fc2..7666688a49 100644 --- a/packages/services/service-cache/package.json +++ b/packages/services/service-cache/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-cache", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Cache Service for ObjectStack — implements ICacheService with in-memory and Redis adapters", "type": "module", diff --git a/packages/services/service-cluster-redis/CHANGELOG.md b/packages/services/service-cluster-redis/CHANGELOG.md index 49248d6a5c..924b1243e9 100644 --- a/packages/services/service-cluster-redis/CHANGELOG.md +++ b/packages/services/service-cluster-redis/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/service-cluster-redis +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/service-cluster@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/services/service-cluster-redis/package.json b/packages/services/service-cluster-redis/package.json index 1df1084c81..0aad5140ad 100644 --- a/packages/services/service-cluster-redis/package.json +++ b/packages/services/service-cluster-redis/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-cluster-redis", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Redis cluster driver for ObjectStack — implements IPubSub/ILock/IKV/ICounter against Redis using ioredis.", "type": "module", diff --git a/packages/services/service-cluster/CHANGELOG.md b/packages/services/service-cluster/CHANGELOG.md index d9b8b00c95..a02ebe26ce 100644 --- a/packages/services/service-cluster/CHANGELOG.md +++ b/packages/services/service-cluster/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/service-cluster +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/services/service-cluster/package.json b/packages/services/service-cluster/package.json index 0f7f01ce3c..6c59817b20 100644 --- a/packages/services/service-cluster/package.json +++ b/packages/services/service-cluster/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-cluster", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Cluster Service for ObjectStack — pluggable PubSub/Lock/KV/Counter primitives. Memory driver included; postgres/redis drivers ship separately.", "type": "module", diff --git a/packages/services/service-datasource/CHANGELOG.md b/packages/services/service-datasource/CHANGELOG.md index 94a17df7f9..ca5af8d1e8 100644 --- a/packages/services/service-datasource/CHANGELOG.md +++ b/packages/services/service-datasource/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/service-external-datasource +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/services/service-datasource/package.json b/packages/services/service-datasource/package.json index 5084e4f1f8..f522cc3cd0 100644 --- a/packages/services/service-datasource/package.json +++ b/packages/services/service-datasource/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-datasource", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "The datasource service (ADR-0015): external-table federation (introspect/draft/import/validate) + runtime UI datasource lifecycle (list/test/create/update/remove + REST routes). Open-source mechanism; the tier line falls on which ICryptoProvider / driver factory a host injects.", "type": "module", diff --git a/packages/services/service-i18n/CHANGELOG.md b/packages/services/service-i18n/CHANGELOG.md index c0fd417a88..815d21fae0 100644 --- a/packages/services/service-i18n/CHANGELOG.md +++ b/packages/services/service-i18n/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/service-i18n +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/services/service-i18n/package.json b/packages/services/service-i18n/package.json index 22160bedb0..c7eca7f603 100644 --- a/packages/services/service-i18n/package.json +++ b/packages/services/service-i18n/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-i18n", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "I18n Service for ObjectStack — implements II18nService with file-based locale loading", "type": "module", diff --git a/packages/services/service-job/CHANGELOG.md b/packages/services/service-job/CHANGELOG.md index 0b8db31962..c725e1467e 100644 --- a/packages/services/service-job/CHANGELOG.md +++ b/packages/services/service-job/CHANGELOG.md @@ -1,5 +1,23 @@ # @objectstack/service-job +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/platform-objects@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/services/service-job/package.json b/packages/services/service-job/package.json index 3bb0a62173..4a40c46b1f 100644 --- a/packages/services/service-job/package.json +++ b/packages/services/service-job/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-job", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Job Service for ObjectStack — implements IJobService with setInterval and cron scheduling", "type": "module", diff --git a/packages/services/service-knowledge/CHANGELOG.md b/packages/services/service-knowledge/CHANGELOG.md index 25869bc319..e0b4350f98 100644 --- a/packages/services/service-knowledge/CHANGELOG.md +++ b/packages/services/service-knowledge/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/service-knowledge +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/services/service-knowledge/package.json b/packages/services/service-knowledge/package.json index 2bf739e6fb..c8b98c8ffe 100644 --- a/packages/services/service-knowledge/package.json +++ b/packages/services/service-knowledge/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-knowledge", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Knowledge Service for ObjectStack — orchestrator implementing IKnowledgeService over pluggable IKnowledgeAdapter backends (RAGFlow, LlamaIndex, Dify, in-memory).", "type": "module", diff --git a/packages/services/service-messaging/CHANGELOG.md b/packages/services/service-messaging/CHANGELOG.md index 505f7711c5..53b9ad5190 100644 --- a/packages/services/service-messaging/CHANGELOG.md +++ b/packages/services/service-messaging/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/service-messaging +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/services/service-messaging/package.json b/packages/services/service-messaging/package.json index e49989d5c5..82feb1a313 100644 --- a/packages/services/service-messaging/package.json +++ b/packages/services/service-messaging/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-messaging", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Messaging Service for ObjectStack — outbound notification dispatch (ADR-0012). Ships the MessagingChannel registry, emit() fan-out, and the always-on inbox channel; other channels (email/webhook/push/IM) plug in.", "type": "module", diff --git a/packages/services/service-package/CHANGELOG.md b/packages/services/service-package/CHANGELOG.md index b32c7437ee..1f0034c090 100644 --- a/packages/services/service-package/CHANGELOG.md +++ b/packages/services/service-package/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/service-package +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/services/service-package/package.json b/packages/services/service-package/package.json index e556e61a47..564943d692 100644 --- a/packages/services/service-package/package.json +++ b/packages/services/service-package/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-package", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Package management service for ObjectStack — publish, install, and manage packages", "type": "module", diff --git a/packages/services/service-queue/CHANGELOG.md b/packages/services/service-queue/CHANGELOG.md index 8b6b050dfc..2550dc5a0d 100644 --- a/packages/services/service-queue/CHANGELOG.md +++ b/packages/services/service-queue/CHANGELOG.md @@ -1,5 +1,23 @@ # @objectstack/service-queue +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/platform-objects@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/services/service-queue/package.json b/packages/services/service-queue/package.json index c5e50b8359..02babef483 100644 --- a/packages/services/service-queue/package.json +++ b/packages/services/service-queue/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-queue", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Queue Service for ObjectStack — implements IQueueService with in-memory and durable DB-backed (sys_job_queue) adapters", "type": "module", diff --git a/packages/services/service-realtime/CHANGELOG.md b/packages/services/service-realtime/CHANGELOG.md index f898f27709..eba15d95f5 100644 --- a/packages/services/service-realtime/CHANGELOG.md +++ b/packages/services/service-realtime/CHANGELOG.md @@ -1,5 +1,23 @@ # @objectstack/service-realtime +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/platform-objects@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/services/service-realtime/package.json b/packages/services/service-realtime/package.json index 2ff5076bfa..3ecdea2f45 100644 --- a/packages/services/service-realtime/package.json +++ b/packages/services/service-realtime/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-realtime", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Realtime Service for ObjectStack — implements IRealtimeService with WebSocket and in-memory pub/sub", "type": "module", diff --git a/packages/services/service-settings/CHANGELOG.md b/packages/services/service-settings/CHANGELOG.md index 9def2e8945..801ac562df 100644 --- a/packages/services/service-settings/CHANGELOG.md +++ b/packages/services/service-settings/CHANGELOG.md @@ -1,5 +1,25 @@ # @objectstack/service-settings +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/platform-objects@13.0.0 + - @objectstack/types@13.0.0 + ## 12.6.0 ### Minor Changes diff --git a/packages/services/service-settings/package.json b/packages/services/service-settings/package.json index ffa5693417..a5a08906ca 100644 --- a/packages/services/service-settings/package.json +++ b/packages/services/service-settings/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-settings", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Settings service for ObjectStack — manifest registry + K/V resolver (OS_* env > Tenant > User > Default) + REST routes. See ADR-0007.", "type": "module", diff --git a/packages/services/service-storage/CHANGELOG.md b/packages/services/service-storage/CHANGELOG.md index d6d543b5dc..ac398e6fb6 100644 --- a/packages/services/service-storage/CHANGELOG.md +++ b/packages/services/service-storage/CHANGELOG.md @@ -1,5 +1,24 @@ # @objectstack/service-storage +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [9fa84f9] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/platform-objects@13.0.0 + - @objectstack/observability@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/services/service-storage/package.json b/packages/services/service-storage/package.json index 2e99ce695b..47110bd20f 100644 --- a/packages/services/service-storage/package.json +++ b/packages/services/service-storage/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/service-storage", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Storage Service for ObjectStack — implements IStorageService with local filesystem and S3 adapter skeleton", "type": "module", diff --git a/packages/spec/CHANGELOG.md b/packages/spec/CHANGELOG.md index 38b2e505b8..9309543120 100644 --- a/packages/spec/CHANGELOG.md +++ b/packages/spec/CHANGELOG.md @@ -1,5 +1,236 @@ # @objectstack/spec +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +### Minor Changes + +- 01917c2: ADR-0090 P2 — audience anchors: `everyone`/`guest` builtin positions. + + - `EVERYONE_POSITION` / `GUEST_POSITION` constants in `@objectstack/spec`; + both anchors seeded (system-managed) alongside the builtin identity names. + - Every authenticated principal implicitly holds `everyone` in + `ctx.positions`, so sets bound to it resolve as ordinary position-bound + grants — ADDITIVE. The fallback CLIFF is abolished: the configured + baseline (`fallbackPermissionSet`, default `member_default`) now applies + in addition to explicit grants instead of only when the user had none, + and is also seeded as an `everyone` binding (same table/audit/explain + path as admin-authored defaults). + - Sessionless HTTP principals resolve as `principalKind: 'guest'` holding + exactly `['guest']`; internal bare contexts are untouched. + - Audience-anchor binding gate: `sys_position_permission_set` writes that + would bind a high-privilege set (VAMA, delete/purge/transfer, system + permissions, `'*'` wildcard) to `everyone`/`guest` are rejected at the + data layer, unconditionally (`describeHighPrivilegeBits` predicate is + exported and shared with the seed-time validation). + +- b271691: ADR-0090 P3 — security-domain publish linter (D7) and delegated administration (D12). + + **D7 — `validateSecurityPosture` (@objectstack/lint), wired into `os compile` (errors gate the build) and `os lint`.** Rules, each with a failing fixture: `security-owd-unset` (custom object with no `sharingModel` — the objectui#2348 leave_request shape), `security-owd-alias` (retired D4 alias values, with fix-it), `security-external-wider-than-internal` (D11 `external ≤ internal`), `security-wildcard-vama` (`'*'` + View/Modify All outside the platform admin set, ADR-0066), `security-anchor-high-privilege` (an `isDefault`/everyone-suggested set carrying anchor-forbidden bits), `security-role-word` (D3 vocabulary freeze in security identifiers/labels; ARIA/page roles exempt), and advisory `security-private-no-readscope`. + + **D12 — delegated administration (@objectstack/plugin-security `DelegatedAdminGate`).** `PermissionSetSchema.adminScope` (new in spec, persisted as `sys_permission_set.admin_scope`) declares WHERE (a `sys_business_unit` subtree), WHAT (`manageAssignments` / `manageBindings` / `authorEnvironmentSets`), and WHICH sets a delegate may hand out (`assignablePermissionSets` allowlist). Writes to `sys_user_position`, `sys_position_permission_set`, `sys_user_permission_set`, and `sys_permission_set` are now governed: tenant-level admins (ADR-0066 superuser wildcard) pass through; delegates need a covering scope — inside their subtree, allowlisted sets only (to others AND themselves), single-row writes, `granted_by` audit-stamped; everyone else (including holders of plain CRUD on RBAC tables) is denied. Granting or authoring a set that itself carries an `adminScope` requires a held scope that STRICTLY contains it. The `everyone`/`guest` anchors stay tenant-level only, and direct position assignments to an anchor are rejected for every caller. + + **ADR-0090 Addendum — assignment-level BU anchor.** `sys_user_position.business_unit_id` lands with its three consumers scoped: D12 delegation boundary (enforced here), audit fact, and the depth-anchor contract for enterprise `hierarchy-scope-resolver` implementations (documented on `IHierarchyScopeResolver`). + + **D9 tier tightening.** `describeHighPrivilegeBits` moved to `@objectstack/spec/security` (re-exported from plugin-security) alongside new `describeAnchorForbiddenBits`: `guest` bindings now additionally reject edit bits (read-only by default; create stays the case-by-case exception). + + **BREAKING (@objectstack/plugin-security):** exports renamed to the ADR-0090 D3 vocabulary — `SysRole`→`SysPosition`, `SysUserRole`→`SysUserPosition`, `SysRolePermissionSet`→`SysPositionPermissionSet` (no aliases, pre-launch one-step rename). `sys_position` row actions/list views renamed (`activate_position`, …), labels relabeled Role→Position. Non-tenant-admin writes to the RBAC link tables without an `adminScope` are now denied (previously any CRUD grant on those tables sufficed). + + **BREAKING (@objectstack/platform-objects):** `sys_business_unit_member.role_in_business_unit` → `function_in_business_unit` (D3 reserved-word sweep; values member/lead/deputy unchanged). + +- a5a1e41: ADR-0090 P4 — explain engine (D6), access-matrix snapshot gate, recalibrated benchmark. + + **Explain contract (@objectstack/spec).** `ExplainRequestSchema` / `ExplainDecisionSchema` / `ExplainLayerSchema`: `explain(principal, object, operation)` reports the verdict of every evaluation-pipeline layer in order (principal → required_permissions → object_crud → fls → owd_baseline → depth → sharing → vama_bypass → rls), with per-layer contributor attribution (which permission set, reached via which position/baseline) and — for reads — the composed row filter as the machine artifact. Carries the D10 dual attribution (`principalKind`, `onBehalfOf`). + + **Explain engine (@objectstack/plugin-security).** `explainAccess` is "explained by construction": it calls the SAME permission-set resolution, evaluator, FLS mask, and RLS composition the enforcement middleware calls (injected from `SecurityPlugin`), so the report cannot drift from enforcement. Exposed on the `security` kernel service as `explain(request, callerContext)`; explaining another user requires `manage_users` (the target's context is reconstructed from `sys_user_position` / `sys_user_permission_set` with everyone-anchor semantics via `buildContextForUser`). + + **Access-matrix snapshot gate (@objectstack/lint + os compile).** `buildAccessMatrix(stack)` derives the (permission set × object) capability matrix purely from metadata; `diffAccessMatrix` renders semantic review lines ("'crm_admin' gains delete on 'crm_lead'", depth changes, OWD swings, entry add/remove). `os compile` gains an opt-in gate: with `access-matrix.json` committed next to the config, any drift fails the build with those lines until re-snapshotted via `--update-access-matrix` — every capability change becomes a reviewable diff. Seeded for `examples/app-crm`. + + **Benchmark (ADR-0090 Addendum).** `scripts/bench/permission-bench.mts` — single-org 10k users × 1M rows per the recalibrated topology; asserts the O()-shape property (per-request cost independent of user population; unit-depth IN-set cost tracks unit size). Passing at 0.1µs/eval and 59ms/1M-row IN-set scan. + +- 466adf6: Author-time capability-reference lint (ADR-0066 ⑨) — `os validate` / `os lint` + now warn when a `requiredPermissions` names a capability that is registered + nowhere. + + `requiredPermissions` (on objects, fields, apps, actions) is a free string, so a + typo like `mange_users` is schema-valid and fails closed at runtime (the caller + is denied) — safe, but silent. The new `validateCapabilityReferences` rule + (`@objectstack/lint`) resolves every reference against the author-time known set + and warns on the unresolved ones: + + - built-in platform capabilities — now sourced from a single canonical list in + `@objectstack/spec` (`security/capabilities.ts`: `PLATFORM_CAPABILITIES` / + `PLATFORM_CAPABILITY_NAMES`), which `@objectstack/plugin-security`'s + `bootstrapSystemCapabilities` also seeds from (one source of truth, no drift), + - any capability a permission set in the stack grants via `systemPermissions` + (granting is what declares it — mirrors the runtime derived-defaults rule), and + - any `sys_capability` row shipped as seed data. + + It is a **warning**, not an error: a single package can't see capabilities + declared by other installed packages, and the reference fails closed anyway. + `systemPermissions` itself is never flagged — it is the declaration side, and a + package legitimately introduces new capabilities there. The object case also + understands the per-operation `requiredPermissions` map form (ADR-0066 ⑤) and + points a finding at the exact operation slice. + +- 5be00c3: feat(mcp): spec-compliant OAuth 2.1 authorization for `/api/v1/mcp` (#2698) + + Any OAuth-capable MCP client (claude.ai custom connectors, Claude Desktop, + Claude Code) can now connect to a deployment **self-serve**: no admin-minted + API key, no central registry — you sign in through the browser as yourself and + every tool call runs under your own permissions and row-level security. + + **Each deployment is its own authorization server**, backed by the embedded + better-auth instance (`@better-auth/oauth-provider`). Rationale for the design + decisions lives in #2698; the moving parts: + + - **Discovery**: `/.well-known/oauth-protected-resource` (RFC 9728, incl. the + path-inserted variant for `/api/v1/mcp`) and + `/.well-known/oauth-authorization-server` (RFC 8414, incl. the path-inserted + variant for the `/api/v1/auth` issuer) are served from the deployment origin. + 401s from `/api/v1/mcp` advertise the resource metadata via + `WWW-Authenticate`, so clients bootstrap the flow automatically. + - **Dynamic Client Registration (RFC 7591)** is enabled (unauthenticated, as + the MCP spec requires) whenever the MCP surface is on — every deployment is a + distinct AS, so clients cannot ship pre-registered IDs. Force it either way + with `OS_OIDC_DCR_ENABLED` or the new `plugins.dynamicClientRegistration` + auth-config field. The embedded AS itself auto-enables whenever the MCP + surface is on — which is now the default (explicit + `OS_OIDC_PROVIDER_ENABLED=false` still wins). + - **Authorization-code + PKCE** flow with RFC 8707 resource binding: access + tokens are minted with `aud=/api/v1/mcp` and verified locally + (signature/issuer/audience/expiry) against the deployment's own JWKS — + fail-closed parity with API keys: unknown/expired/wrong-audience tokens, + sub-less M2M tokens, or a presented-but-invalid bearer never fall back to an + ambient session, they 401. + - **Token → ExecutionContext**: a valid access token resolves to the same + principal-bound `ExecutionContext` as every other credential, single-sourced + through `resolveAuthzContext` — OAuth adds a second _provenance_ for the + principal, not a second authz model. `ExecutionContext` gains an optional + `oauthScopes` field carrying the token's granted scopes. + - **Coarse scopes → tool families**, enforced at tool dispatch: `data:read` + (list/describe/query/get), `data:write` (create/update/delete), + `actions:execute` (list_actions/run_action). Constants live in + `@objectstack/spec/ai` (`MCP_OAUTH_SCOPES`). Tools outside the grant are not + registered — and therefore rejected — for that request. API-key and session + principals are unaffected (not scope-limited). + - **TLS required, localhost exempt** (OAuth 2.1): on a plain-HTTP non-loopback + origin the OAuth track stays dark (no metadata, no bearer acceptance) and the + endpoint remains API-key-only. Local clients reach intranet deployments; + claude.ai web connectors additionally need public HTTPS reachability. + + **API keys are unchanged** (dual-track): `x-api-key` / `Authorization: ApiKey` / + `Authorization: Bearer osk_…` keep working exactly as before for CI and + headless agents — covered by new regression tests. + +- 466adf6: Per-operation object `requiredPermissions` (ADR-0066 ⑤) — an object can now be + read-open / write-gated instead of gating all of CRUD on one capability set. + + `Object.requiredPermissions` accepts either the original `string[]` (capabilities + required for **all** operations) **or** a `{ read?, create?, update?, delete? }` + map that gates each operation class independently — mirroring how Salesforce and + Dataverse separate capability by operation. plugin-security enforces the caps for + the request's operation class as the same D3 AND-gate (checked before the CRUD + grant, fail-closed). The mapping folds `transfer`/`restore` into `update` and + `purge` into `delete`, derived from the existing CRUD permission bits so it stays + in lockstep with them. + + Backward-compatible: the `string[]` form keeps its gate-every-operation semantics + (normalized into an `all` bucket that unions with the per-operation bucket), so + existing objects are unaffected. The per-operation map's keys are validated + `.strict()`, so a mistyped key (e.g. `reads`) is rejected at author time rather + than silently ignored. + +- 2bee609: BREAKING (pre-launch): remove the three declared-but-never-enforced compliance + subsystems per ADR-0056 D8 ("design + enforce, or remove"), and mark the AI + agent `visibility` property EXPERIMENTAL (#1901). + + Removed — none of these were read by any runtime path, and compliance-grade + configuration must never merely look live: + + - `ComplianceConfigSchema` / `GDPRConfigSchema` / `HIPAAConfigSchema` (and the + rest of `system/compliance.zod.ts`) — there is no data-subject-rights engine, + retention enforcer, or BAA gate. FROM `import { ComplianceConfigSchema } from +'@objectstack/spec/system'` TO: delete the reference — a real compliance + subsystem will be designed top-down when scheduled. + - `MaskingConfigSchema` / `MaskingRuleSchema` (`system/masking.zod.ts`) — no + redaction layer applies them. FROM masking config TO: field-level security + (permission-set field rules, enforced by plugin-security's field masker); a + subtractive masking/deny layer arrives with ADR-0066 ⑦/⑧ if needed. + - `RLSConfigSchema` / `RLSAuditEventSchema` / `RLSAuditConfigSchema` + (`security/rls.zod.ts`) — the enforced RLS path never read the global config. + FROM global `RLSConfig` TO: per-policy `RowLevelSecurityPolicySchema` (the + live, enforced surface — unchanged). + + Kept, still `[EXPERIMENTAL]`: `EncryptionConfigSchema` (at-rest field + encryption) — a real enterprise roadmap item with a stable shape; carrying it + marked costs less than remove-and-re-add (ADR-0087). + + Marked `[EXPERIMENTAL — NOT ENFORCED]` (#1901): `AgentSchema.visibility` — the + chat-access evaluator deliberately excludes it and the agent list route does + not filter by it, so `private` does not hide an agent. The schema description + and the authoring form now say so; use `access` / `permissions` (both enforced + at the chat route since #1884) for real gating. The ADR-0056 D10 conformance + matrix tracks all dispositions (`agent-visibility` experimental; + `compliance-configs` / `data-masking` / `rls-config-global` removed). + +- fc7e7f7: Enforce the package namespace-prefix rule for Studio-authored packages. + + The protocol requires every object name in a package to carry the package's + `manifest.namespace` prefix (`crm_account`); `defineStack()` enforces this at + compile time via `validateNamespacePrefix`. Studio/runtime-authored packages + never take that path, and they were created without a namespace at all — so the + rule was silently inert and objects published with bare, collision-prone names. + + Two runtime changes close the gap: + + - `protocol.installPackage` now derives a default namespace from the package id + (`com.example.leave` → `leave`) when the manifest declares none, and persists + it on the manifest (in-memory registry + `sys_packages`). An explicitly + declared namespace always wins (e.g. HotCRM's `crm`). + - `protocol.publishPackageDrafts` now rejects any object draft whose name lacks + the package namespace prefix, before promoting anything (atomic), with an + actionable message (`Rename it to 'leave_ticket'`). Packages that declare no + namespace are grandfathered — mirroring `defineStack`, the rule is not + invented at enforcement time. + + The per-object prefix check and the id→namespace derivation are extracted into + `@objectstack/spec/kernel` (`validateObjectNamespacePrefix`, + `deriveNamespaceFromPackageId`) as the single source shared by `defineStack` and + the runtime publish path, so the two enforcement points cannot drift. + ## 12.6.0 ### Minor Changes diff --git a/packages/spec/package.json b/packages/spec/package.json index b1dc36cb0d..6fd5f42ee5 100644 --- a/packages/spec/package.json +++ b/packages/spec/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/spec", - "version": "12.6.0", + "version": "13.0.0", "description": "ObjectStack Protocol & Specification - TypeScript Interfaces, JSON Schemas, and Convention Configurations", "license": "Apache-2.0", "main": "dist/index.js", diff --git a/packages/triggers/trigger-api/CHANGELOG.md b/packages/triggers/trigger-api/CHANGELOG.md index c105ee7da3..0ec9854159 100644 --- a/packages/triggers/trigger-api/CHANGELOG.md +++ b/packages/triggers/trigger-api/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/trigger-api +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/triggers/trigger-api/package.json b/packages/triggers/trigger-api/package.json index 8982dbf2a6..172bf45c38 100644 --- a/packages/triggers/trigger-api/package.json +++ b/packages/triggers/trigger-api/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/trigger-api", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Inbound HTTP/webhook flow trigger for ObjectStack — per-flow HMAC-verified endpoints with queue-backed ingestion (ADR-0041)", "main": "dist/index.js", diff --git a/packages/triggers/trigger-record-change/CHANGELOG.md b/packages/triggers/trigger-record-change/CHANGELOG.md index 7ae20a3855..cc4caedd35 100644 --- a/packages/triggers/trigger-record-change/CHANGELOG.md +++ b/packages/triggers/trigger-record-change/CHANGELOG.md @@ -1,5 +1,54 @@ # @objectstack/plugin-trigger-record-change +## 13.0.0 + +### Major Changes + +- 6d83431: ADR-0090 P1 breaking wave — permission model v2 concept convergence. + + Pre-launch one-step renames and secure defaults (no compatibility aliases, per + ADR-0090 D3/D4 superseding ADR-0057 D5/D7's alias discipline): + + - `sys_role` → `sys_position`, `sys_user_role` → `sys_user_position` (field + `role` → `position`), `sys_role_permission_set` → `sys_position_permission_set` + (field `role_id` → `position_id`); `RoleSchema`/`defineRole` → + `PositionSchema`/`definePosition` with **no `parent`** (positions are flat; + hierarchy lives on the business-unit tree). + - `ExecutionContext.roles[]` → `positions[]`; the EvalUser/CEL contract + `current_user.roles` → `current_user.positions` (formula validators updated); + stack property `roles:` → `positions:`; metadata kinds `role`/`profile` → + `position` (profile kind removed). + - `isProfile` removed from `PermissionSetSchema` (ADR-0090 D2); `isDefault` + narrows to an install-time suggestion; `appDefaultProfileName` → + `appDefaultPermissionSetName` (isDefault-only). + - OWD enum drops legacy aliases `read`/`read_write`/`full`; new optional + `externalSharingModel` (external dial, `private` default) lands as P1 spec + shape (ADR-0090 D11). + - **Secure default (D1)**: a custom object with an owner field and NO + `sharingModel` now resolves `private` (was: fully public). System objects + keep their explicit posture. Unrecognised stored values fail closed. + - ExecutionContext gains the P1 principal-taxonomy shape (D10): + `principalKind` / `audience` / `onBehalfOf` (optional, semantics phase in + later). + - Sharing recipients: `role` → `position` (expanded via `sys_user_position` + ∪ the better-auth membership transition source); `role_and_subordinates` + removed — `unit_and_subordinates` now expands the business-unit subtree + (finishes ADR-0057 D5's re-homing). + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/triggers/trigger-record-change/package.json b/packages/triggers/trigger-record-change/package.json index 55867f110f..7d8313205a 100644 --- a/packages/triggers/trigger-record-change/package.json +++ b/packages/triggers/trigger-record-change/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/trigger-record-change", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Record-change flow trigger for ObjectStack — auto-launches flows on object insert/update/delete via ObjectQL lifecycle hooks (ADR-0018)", "main": "dist/index.js", diff --git a/packages/triggers/trigger-schedule/CHANGELOG.md b/packages/triggers/trigger-schedule/CHANGELOG.md index 574e6f9cc8..ffdaced211 100644 --- a/packages/triggers/trigger-schedule/CHANGELOG.md +++ b/packages/triggers/trigger-schedule/CHANGELOG.md @@ -1,5 +1,21 @@ # @objectstack/plugin-trigger-schedule +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/triggers/trigger-schedule/package.json b/packages/triggers/trigger-schedule/package.json index 992b9e7a1a..9d16c9585a 100644 --- a/packages/triggers/trigger-schedule/package.json +++ b/packages/triggers/trigger-schedule/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/trigger-schedule", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Schedule flow trigger for ObjectStack — auto-launches flows on a cron/interval/once schedule via the IJobService (ADR-0018)", "main": "dist/index.js", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index f24016d7d0..de2769dd73 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,5 +1,43 @@ # @objectstack/types +## 13.0.0 + +### Minor Changes + +- 57b89b4: feat(mcp): the MCP surface is now **default-on** — a core platform capability (#2698) + + `/api/v1/mcp` is served (and advertised in `/discovery`) out of the box; the + OAuth 2.1 authorization track and Dynamic Client Registration follow it, so a + fresh deployment is connectable by any MCP client with zero configuration. + Operators opt OUT with `OS_MCP_SERVER_ENABLED=false`. + + - New single decision point `isMcpServerEnabled()` in `@objectstack/types` + (default on; explicit `false`/`0`/`off`/`no` disables). The runtime + dispatcher's `/mcp` route gate, the CLI's MCP plugin auto-load, the REST + `/discovery` advertisement, and the auth service's OAuth/DCR follow-defaults + all delegate to it — the served route, the advertised route, and the + authorization track can never disagree. + - The env var is now effectively tri-state: unset → HTTP surface on; + explicit `true` → additionally auto-start the long-lived **stdio** transport + at boot (unchanged, still opt-in — a default must not claim the process's + stdin/stdout); explicit `false` → everything off, fail-closed (404, no + metadata, no DCR). + - The OAuth 2.1 TLS rule is unaffected: on a plain-HTTP non-loopback origin + the OAuth track stays dark and the default-on surface remains API-key-only. + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + ## 12.6.0 ### Patch Changes diff --git a/packages/types/package.json b/packages/types/package.json index c65b938fef..e02716347b 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/types", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Shared interfaces describing the ObjectStack Runtime environment", "main": "dist/index.js", diff --git a/packages/verify/CHANGELOG.md b/packages/verify/CHANGELOG.md index f0ec105d22..55f48adef8 100644 --- a/packages/verify/CHANGELOG.md +++ b/packages/verify/CHANGELOG.md @@ -1,5 +1,37 @@ # @objectstack/verify +## 13.0.0 + +### Patch Changes + +- Updated dependencies [6d83431] +- Updated dependencies [01917c2] +- Updated dependencies [b271691] +- Updated dependencies [a5a1e41] +- Updated dependencies [466adf6] +- Updated dependencies [799b285] +- Updated dependencies [b1081b8] +- Updated dependencies [57b89b4] +- Updated dependencies [5be00c3] +- Updated dependencies [466adf6] +- Updated dependencies [a1766fe] +- Updated dependencies [2bee609] +- Updated dependencies [fc7e7f7] + - @objectstack/spec@13.0.0 + - @objectstack/core@13.0.0 + - @objectstack/runtime@13.0.0 + - @objectstack/objectql@13.0.0 + - @objectstack/rest@13.0.0 + - @objectstack/plugin-security@13.0.0 + - @objectstack/plugin-sharing@13.0.0 + - @objectstack/plugin-auth@13.0.0 + - @objectstack/service-automation@13.0.0 + - @objectstack/plugin-hono-server@13.0.0 + - @objectstack/driver-sqlite-wasm@13.0.0 + - @objectstack/service-analytics@13.0.0 + - @objectstack/service-datasource@13.0.0 + - @objectstack/service-settings@13.0.0 + ## 12.6.0 ### Minor Changes diff --git a/packages/verify/package.json b/packages/verify/package.json index 1a751dac9c..73330cafb5 100644 --- a/packages/verify/package.json +++ b/packages/verify/package.json @@ -1,6 +1,6 @@ { "name": "@objectstack/verify", - "version": "12.6.0", + "version": "13.0.0", "license": "Apache-2.0", "description": "Boot any ObjectStack app in-process and verify it through the real HTTP stack — auto-derived CRUD round-trip fidelity plus the cross-owner RLS invariant. Catches runtime regressions that static checks miss.", "type": "module", diff --git a/packages/vscode-objectstack/CHANGELOG.md b/packages/vscode-objectstack/CHANGELOG.md index 5990175a61..7c13fd0f9d 100644 --- a/packages/vscode-objectstack/CHANGELOG.md +++ b/packages/vscode-objectstack/CHANGELOG.md @@ -1,5 +1,7 @@ # objectstack-vscode +## 13.0.0 + ## 12.6.0 ## 12.5.0 diff --git a/packages/vscode-objectstack/package.json b/packages/vscode-objectstack/package.json index ebd0a29f5d..dc3969ca37 100644 --- a/packages/vscode-objectstack/package.json +++ b/packages/vscode-objectstack/package.json @@ -2,7 +2,7 @@ "name": "objectstack-vscode", "displayName": "ObjectStack", "description": "ObjectStack Protocol — Autocomplete, validation, and inline diagnostics for .object.ts, .view.ts, and objectstack.config.ts files", - "version": "12.6.0", + "version": "13.0.0", "publisher": "objectstack", "license": "Apache-2.0", "repository": {