@everystack/mcp 0.4.8 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to `@everystack/mcp` are documented here.
4
4
 
5
5
  Format based on [Keep a Changelog](https://keepachangelog.com/).
6
6
 
7
+ ## [0.4.9] - 2026-09-08
8
+
9
+ ### Documentation
10
+
11
+ - schema-patterns 'how a write compiles' is the shipped rule
12
+
7
13
  ## [0.4.8] - 2026-09-07
8
14
 
9
15
  ### Added
package/dist/index.cjs CHANGED
@@ -23764,7 +23764,7 @@ async function runGovernanceCli(argv) {
23764
23764
  }
23765
23765
 
23766
23766
  // src/index.ts
23767
- var version2 = (true ? "0.4.8" : null) ?? "0.3.0-dev";
23767
+ var version2 = (true ? "0.4.9" : null) ?? "0.3.0-dev";
23768
23768
  var INSTRUCTIONS = [
23769
23769
  "You govern how any agent builds everystack \u2014 a self-hosted application stack for Expo apps on AWS.",
23770
23770
  "Your job is not only to advise but to keep the build on-script: the architecture the maintainer",
@@ -158,24 +158,31 @@ RLS policy, and RLS is on for every model with abilities, so a grant with no pol
158
158
  an INSERT fails loudly (`new row violates row-level security policy`), while an UPDATE or
159
159
  DELETE with no policy affects **0 rows silently** — no error, nothing changes.
160
160
 
161
- - `owner:` / `via:` writes compile the owner-checked policy (`<t>_insert_own`, `_update_own`,
162
- `_delete_own`) for `authenticated`. On such a model a bare `can('create')` or
163
- `can('create', { role: 'authenticated' })` is ALSO the owner-checked insert — the example above.
164
- - `can('manage', { role: 'admin' })` is the admin bypass: one `ALL` policy, `true`/`true`.
165
- - **Known gap (cli 0.4.80):** a role-scoped or bare write with NO owner on the model and no
166
- `where:` `can('create', { role: 'authenticated' })` on an owner-less table, `can('delete',
167
- { role: 'admin' })`, `can('manage', { role: 'editor' })` compiles the grant and NO policy. It
168
- reads as access and grants none. A vacuous `where: sql\`true\`` does NOT help: the compiler
169
- discards a `true` predicate and still emits nothing. What compiles today: `owner:` / `via:`
170
- for row-scoped writes; `can('manage', { role: 'admin' })` for the admin bypass; and, for
171
- `authenticated` only, a real (non-vacuous) `where:` on a `create`/`update`/`delete`, which
172
- compiles a predicate-only policy for `authenticated`. There is no in-model spelling for a
173
- role-wide write by any other role — and do not try a `where:` on another role's write: the
174
- write compiler never reads the declared role, so `can('update', { role: 'editor', where })`
175
- grants editor and lands the predicate on the **`authenticated`** policy. Run that write on the
176
- trusted admin connection until the write-policy matrix ships.
177
- - `check:` is the WITH CHECK half verbatim it REPLACES the owner term, it does not narrow it
178
- so a `check:` on an owner model must carry the owner term itself.
161
+ Every declared write compiles a policy there is no shape that grants and then leaves the
162
+ role dark. The rule, by who the write is for:
163
+
164
+ - **`authenticated`** named `role: 'authenticated'` or the role-less default:
165
+ - on a **row-scoped model** (some ability declares `owner:` or `via:`) it is ALWAYS
166
+ owner-checked: `<t>_insert_own` / `_update_own` / `_delete_own`. A bare `can('create')`,
167
+ `can('create', { role: 'authenticated' })`, or a `create` carrying only a `where:` all
168
+ compile the owner-checked insert on such a model the role can never write a row it does
169
+ not own.
170
+ - on a model with **no row scope** it compiles `<t>_<verb>_authenticated`: `USING = where`
171
+ (or `true`), `WITH CHECK = check ?? where` (or `true`). A bare `can('create', { role:
172
+ 'authenticated' })` on an owner-less table is a real `INSERT` policy with `WITH CHECK true`.
173
+ - **any other role**`admin`, `editor`, a custom role gets its OWN policy, never folded
174
+ into `_own`. `can('update', { role: 'editor', where })` compiles `<t>_update_editor` carrying
175
+ the editor predicate; a `where:` on one role never lands on another's rows.
176
+ - **`can('manage', { role })`** — for `authenticated`/role-less on a row-scoped model it is
177
+ manage-own (the four `_own` verbs); for any other role, or for `authenticated` with no row
178
+ scope, it is one `ALL` policy `<t>_<role>`, `true`/`true` (`<t>_admin` is just the first
179
+ instance of that rule).
180
+ - A vacuous `where: sql\`true\`` is discarded (no `WHERE true` noise), but the policy still
181
+ exists — the predicate collapses to `true`, it does not delete the policy.
182
+ - `check:` is the WITH CHECK half and it NARROWS: the compiled check is `rowScope AND check`,
183
+ symmetric with `USING = rowScope AND where`. The owner term is never removable — a `check:`
184
+ can tighten what a row may BECOME (a state guard the read did not carry) but can never let an
185
+ owner write a row into someone else's name.
179
186
 
180
187
  ## Handler Config for Schema
181
188
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everystack/mcp",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "description": "Governance layer that governs how any agent builds everystack — grounding, cheat gates, and Model-aware tooling over MCP",
5
5
  "license": "AGPL-3.0-only",
6
6
  "author": "Scalable Technology, Inc. <licensing@scalable.technology>",
@@ -42,7 +42,7 @@
42
42
  "tsx": "4.21.0",
43
43
  "typescript": "5.9.3",
44
44
  "zod": "3.25.67",
45
- "@everystack/cli": "0.4.80",
45
+ "@everystack/cli": "0.4.81",
46
46
  "@everystack/server": "0.4.30",
47
47
  "@everystack/model": "0.4.17"
48
48
  },
@@ -158,24 +158,31 @@ RLS policy, and RLS is on for every model with abilities, so a grant with no pol
158
158
  an INSERT fails loudly (`new row violates row-level security policy`), while an UPDATE or
159
159
  DELETE with no policy affects **0 rows silently** — no error, nothing changes.
160
160
 
161
- - `owner:` / `via:` writes compile the owner-checked policy (`<t>_insert_own`, `_update_own`,
162
- `_delete_own`) for `authenticated`. On such a model a bare `can('create')` or
163
- `can('create', { role: 'authenticated' })` is ALSO the owner-checked insert — the example above.
164
- - `can('manage', { role: 'admin' })` is the admin bypass: one `ALL` policy, `true`/`true`.
165
- - **Known gap (cli 0.4.80):** a role-scoped or bare write with NO owner on the model and no
166
- `where:` `can('create', { role: 'authenticated' })` on an owner-less table, `can('delete',
167
- { role: 'admin' })`, `can('manage', { role: 'editor' })` compiles the grant and NO policy. It
168
- reads as access and grants none. A vacuous `where: sql\`true\`` does NOT help: the compiler
169
- discards a `true` predicate and still emits nothing. What compiles today: `owner:` / `via:`
170
- for row-scoped writes; `can('manage', { role: 'admin' })` for the admin bypass; and, for
171
- `authenticated` only, a real (non-vacuous) `where:` on a `create`/`update`/`delete`, which
172
- compiles a predicate-only policy for `authenticated`. There is no in-model spelling for a
173
- role-wide write by any other role — and do not try a `where:` on another role's write: the
174
- write compiler never reads the declared role, so `can('update', { role: 'editor', where })`
175
- grants editor and lands the predicate on the **`authenticated`** policy. Run that write on the
176
- trusted admin connection until the write-policy matrix ships.
177
- - `check:` is the WITH CHECK half verbatim it REPLACES the owner term, it does not narrow it
178
- so a `check:` on an owner model must carry the owner term itself.
161
+ Every declared write compiles a policy there is no shape that grants and then leaves the
162
+ role dark. The rule, by who the write is for:
163
+
164
+ - **`authenticated`** named `role: 'authenticated'` or the role-less default:
165
+ - on a **row-scoped model** (some ability declares `owner:` or `via:`) it is ALWAYS
166
+ owner-checked: `<t>_insert_own` / `_update_own` / `_delete_own`. A bare `can('create')`,
167
+ `can('create', { role: 'authenticated' })`, or a `create` carrying only a `where:` all
168
+ compile the owner-checked insert on such a model the role can never write a row it does
169
+ not own.
170
+ - on a model with **no row scope** it compiles `<t>_<verb>_authenticated`: `USING = where`
171
+ (or `true`), `WITH CHECK = check ?? where` (or `true`). A bare `can('create', { role:
172
+ 'authenticated' })` on an owner-less table is a real `INSERT` policy with `WITH CHECK true`.
173
+ - **any other role**`admin`, `editor`, a custom role gets its OWN policy, never folded
174
+ into `_own`. `can('update', { role: 'editor', where })` compiles `<t>_update_editor` carrying
175
+ the editor predicate; a `where:` on one role never lands on another's rows.
176
+ - **`can('manage', { role })`** — for `authenticated`/role-less on a row-scoped model it is
177
+ manage-own (the four `_own` verbs); for any other role, or for `authenticated` with no row
178
+ scope, it is one `ALL` policy `<t>_<role>`, `true`/`true` (`<t>_admin` is just the first
179
+ instance of that rule).
180
+ - A vacuous `where: sql\`true\`` is discarded (no `WHERE true` noise), but the policy still
181
+ exists — the predicate collapses to `true`, it does not delete the policy.
182
+ - `check:` is the WITH CHECK half and it NARROWS: the compiled check is `rowScope AND check`,
183
+ symmetric with `USING = rowScope AND where`. The owner term is never removable — a `check:`
184
+ can tighten what a row may BECOME (a state guard the read did not carry) but can never let an
185
+ owner write a row into someone else's name.
179
186
 
180
187
  ## Handler Config for Schema
181
188