@niscorp/nisc 0.9.1 → 0.9.3

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/AGENTS.md CHANGED
@@ -100,7 +100,7 @@ Pick per need; every piece works standalone. Nova is the only mandatory one for
100
100
  **Principals**
101
101
 
102
102
  10. The charter is the app's policy document: role names → glob selections over the app's universes — `actions` (which action ids exist for a principal), `data` (`table.verb` capabilities, compiled into the Vex `ScopePolicy`) and `functions` (which of the app's functions a principal's shell holds: a role with none may call none). Grant each role the functions its actions call, deliberately: moss refuses to boot and lists every call whose grants miss, for each role on its own, each combination people wear and `public`, and says where a role allows every function (`'*'`); `server.checkFunctions()`, called once the app holds the server and has mounted every route of its own, before it listens (nobody's shell makes its reads in-process, and the server takes no route once it has answered one), builds nobody's shell once to read the functions and refuses every call to one the app does not have. The charter compiles; it never enforces and never shapes. Moss resolves it per principal and refuses to boot incoherent. Assignments (principal → roles) are app data beside it; row-level semantics the charter can't express are `behaviors`, compiled into the policy. One role name is fixed: a request with no session, and a signed-in principal with no assignment, resolve to `public`, so every charter defines it — `public: []` where it grants nothing. Boot does not check for it; without it those requests fail (`Unknown role "public"`).
103
- 10a. The `data` universe is the INTROSPECTED database, not your schema file: it holds the engine's own tables too — moss's `integrations` (integration key hashes), `integration_actions`, `moss_generation`, `sessions` (session token hashes, under moss's credential), the `strata_ledger`, the vex cache. A role granted a data wildcard (`*.read`) denies them explicitly (`data: { allow: ['*.read'], deny: [...] }`; denies do not inherit, so every role that grants the wildcard denies). A charter check resolves against the universe boot resolves against — the app's migrations and moss's run on a scratch database, then introspected — or it proves nothing about wildcards.
103
+ 10a. The `data` universe is the INTROSPECTED database, not your schema file: it has the engine's own tables too — moss's `integrations` (integration key hashes), `integration_actions`, `moss_generation`, `artifacts`, `artifact_saves`, `sessions` (session token hashes, under moss's credential), the `strata_ledger`, the vex cache. A role granted a data wildcard (`*.read`) denies them explicitly (`data: { allow: ['*.read'], deny: [...] }`; denies do not inherit, so every role that grants the wildcard denies). A charter check resolves against the universe boot resolves against — the app's migrations and moss's run on a scratch database, then introspected — or it proves nothing about wildcards.
104
104
  11. Per-principal UI is existence or a served variant, never a conditional. An action a principal lacks does not exist in their shell (ring 1); a different shape of the same action is a served variant (ring 2). Layouts and components never branch on roles or capability data. Ring 1 does the deriving: a canvas's `initial` takes a **candidate list** and the first id the principal actually holds mounts — members boot their home, anonymous boots the login, and nobody configures which. An ungranted candidate simply isn't there.
105
105
  11a. Per-principal boot has two hooks, and they are twins. `inputs` derives boot **data** — merged over each canvas's static seed, read from action data downstream. `seeds` derives boot **instances** — which actions to push onto which canvases, computed from the session and its own reads over the session's wire, ring-1-filtered like every other mount. A composed surface (a home, an agent's column) is `seeds` plus a `list` canvas; hand-authoring the same arrangement names it twice. Branching chrome on `inputs` is a stopgap where a served variant doesn't exist yet.
106
106
  11b. A page is drawn for whoever asks, and what it has for them is ring 1 like everything else: a strip naming the signed-in person is an action a member is granted, on a canvas whose candidates a stranger is granted none of. A page never knows less about a signed-in person than the app does, and never keeps a shell for them. **Who may keep a drawn page follows from who asked, and from nothing else** — drawn for nobody it is the same for everybody and may be cached or written to a file; drawn for somebody it is theirs. No page, route or app declares which; a static build only ever asks for the page as nobody.
@@ -119,7 +119,7 @@ Pick per need; every piece works standalone. Nova is the only mandatory one for
119
119
  **Versions** (`@niscorp/strata`; the why is `packages/strata/DESIGN.md`)
120
120
 
121
121
  17. No package — and no app, where it can help it — runs DDL outside a strata sequence. Tables change by APPENDING a migration to their owner's sequence; a migration that has run is history, checksummed in the ledger, and editing it makes every database that ran it refuse to boot. The first migration of a sequence may be the old `IF NOT EXISTS` DDL verbatim — split with `sqlSteps(ddl)`, never on every `;` — and that is how an existing database adopts. An app's own tables are its `<app>.app` sequence, handed to moss in `runtime.tables` — with `TIDE_SEQUENCE` (from `@niscorp/tide/postgres`, the store made `migrate: false`) when it keeps tide's tables — and a real database's tables change only through `nisc migrate`: a boot checks them and refuses to start while a migration is pending (`migrations: 'verify'`, the default); only a runtime whose database starts empty every time (PGlite in memory) writes `migrations: 'apply'`. The function that opens a runtime migrates nothing, seeds nothing and calls no `cache.init()`: what it changes itself is changed before the step can check it. A sequence that has run on a database stays in `runtime.tables` even when nothing uses it any more — the run refuses a ledger that records a sequence nobody names (`UNKNOWN_SEQUENCE`) — and its tables go by an appended migration that drops them. One app per database schema: a schema has one ledger. `nisc migrate` refuses a run that removes a table or column or changes a column's type unless it is given `--allow-removal`. Rows an app needs in order to start are written by a migration step, in the same transaction as its tables; a seed that runs at start is for development and demos.
122
- 18. A grammar change is a migration. Changing a schema behind a document kind — nova's actions and layouts, Prism's config, an app kit's component props (`NiscApp.grammars`) — appends to that grammar's sequence: an empty marker for an addition (strict readers must still refuse the newer documents), document steps (a Prism config over ONE node; the grammar's embeddings find every node) for anything else. `pnpm check:grammars` refuses the change until it does, and checks every captured document still upgrades and parses. A grammar version is history — its migrations, and every corpus file captured at an earlier stamp. Its snapshot is its fingerprint: when the grammar did not change but what records it did (a validator describing the same schema differently, strata reading it differently), the current version is re-recorded with `pnpm strata:snapshot --rebaseline` (an app kit: its own snapshot script with `--rebaseline`) in a commit that changes nothing else, and only while the corpus passes — never edited by hand, never answered with a marker.
122
+ 18. A grammar change is a migration. Changing a schema behind a document kind — nova's actions and layouts, Prism's config, vex's entries, an app kit's component props (`NiscApp.grammars`) — appends to that grammar's sequence: an empty marker for an addition (strict readers must still refuse the newer documents), document steps (a Prism config over ONE node; the grammar's embeddings find every node) for anything else. `pnpm check:grammars` refuses the change until it does, and checks every captured document still upgrades and parses. A grammar version is history — its migrations, and every corpus file captured at an earlier stamp. Its snapshot is its fingerprint: when the grammar did not change but what records it did (a validator describing the same schema differently, strata reading it differently), the current version is re-recorded with `pnpm strata:snapshot --rebaseline` (an app kit: its own snapshot script with `--rebaseline`) in a commit that changes nothing else, and only while the corpus passes — never edited by hand, never answered with a marker.
123
123
  19. Stored and submitted documents carry the stamp they were written at and are upgraded where they are read. Ahead of the reader on any grammar the reader was given is refused (`TOO_NEW`), never guessed at: the reader upgrades first — host before add-on, server before terminal.
124
124
  20. An app's source records its grammars in `strata.lock.json`. When a grammar moves: `pnpm strata upgrade` writes the exact expected JSON and a report; edit what it lists; `pnpm strata verify` holds the edit to that JSON and only then moves the lock. Never edit the lock by hand, and never "fix" an edit toward a green verify by any route but the expected JSON. `pnpm check:sources` fails an app whose source is behind.
125
125
 
@@ -174,7 +174,7 @@ export const todosInputSchema = z.toJSONSchema(
174
174
  );
175
175
  ```
176
176
 
177
- **`todos.layout.ts`** — JSON. Domain-blind primitives driven by spec props (rule 2); `ref` is what the trigger catches. Component names resolve against the app's registry in `ui/`. Nova ships a headless base set per adapter (`Stack`, `Box`, `Text`, `Input`, `Button`, `Panel`, `JsonTree`, plus the `CanvasSlot` / `ActionSlot` markers) via `registerNovaReactComponents` — but both exemplars take only the two slot markers and build the rest themselves, because the kit is where the app's look lives (order of work, step 3). Assume every other name here is one you define.
177
+ **`todos.layout.ts`** — JSON. Domain-blind primitives driven by spec props (rule 2); `ref` is what the trigger catches. Component names resolve against the app's registry in `ui/`. Nova ships a headless base set per adapter (`Stack`, `Box`, `Text`, `Input`, `Button`, `Panel`, `JsonTree`, plus the `CanvasSlot` / `ActionSlot` markers) via `registerNovaReactComponents` — but the reference apps take at most the two slot markers and build the rest themselves, because the kit is where the app's look lives (order of work, step 3). Assume every other name here is one you define.
178
178
 
179
179
  ```ts
180
180
  import type { LayoutNode } from '@niscorp/nova';
@@ -434,7 +434,7 @@ What changes is only who assembles and serves:
434
434
 
435
435
  Say this out loud in the interview, because it is the part a user cannot infer: **in a degrade app the charter is not enforcement.** Ring 1 still decides what exists in the shell, and that is honest UI, but the data is in the browser and the policy is in the browser with it. Nothing here is a security boundary. An app that needs one needs a server (D1) — offer that rather than a scope rule that looks like a lock.
436
436
 
437
- `fable` and `mythos` predate the `app/`-is-artifacts-only tree above and are arranged differently (`nova/`, `api/`, `vex/`, `boot.ts`) — read them for the boot and engine wiring, not for the layout.
437
+ `fable` and `mythos` predate the `app/`-is-artifacts-only tree above and are arranged differently (`nova/`, `api/`, `vex/`, and mythos's `boot.ts`) — read them for the boot and engine wiring, not for the layout.
438
438
 
439
439
  ## Order of work
440
440
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @niscorp/nisc
2
2
 
3
+ ## 0.9.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [a740e2a]
8
+ - @niscorp/moss@0.9.2
9
+
10
+ ## 0.9.2
11
+
12
+ ### Patch Changes
13
+
14
+ - efd576c: The rulebook catches up: `REVIEW.md`'s versions item names the check an app runs (`strata status --check`), not this repository's scripts; `AGENTS.md` lists moss's `artifacts` and `artifact_saves` among the engine's tables and vex's entries among the document kinds, and no longer speaks of exemplars; the README lists `REVIEW.md`.
15
+
16
+ **What to change:** nothing. Documentation only.
17
+
18
+ - Updated dependencies [febd8b7]
19
+ - Updated dependencies [41ac0c7]
20
+ - Updated dependencies [efd5d03]
21
+ - Updated dependencies [501e355]
22
+ - Updated dependencies [e4dfb25]
23
+ - Updated dependencies [4e76fe8]
24
+ - Updated dependencies [a2d2df0]
25
+ - Updated dependencies [2a44642]
26
+ - Updated dependencies [2fc1bf0]
27
+ - Updated dependencies [d70f22c]
28
+ - @niscorp/charter@0.1.5
29
+ - @niscorp/cortex@0.1.6
30
+ - @niscorp/moss@0.9.1
31
+ - @niscorp/nova@0.5.2
32
+ - @niscorp/prism@0.3.3
33
+ - @niscorp/signal@0.1.9
34
+ - @niscorp/solid@0.1.3
35
+ - @niscorp/strata@0.1.9
36
+ - @niscorp/tide@0.1.10
37
+ - @niscorp/vex@0.4.4
38
+
3
39
  ## 0.9.1
4
40
 
5
41
  ### Patch Changes
package/README.md CHANGED
@@ -24,8 +24,9 @@ refuses a plan that is missing either the approval or this.
24
24
  ## The rulebook
25
25
 
26
26
  It also carries the rules a nisc application is built by, for the versions it
27
- pins: [`AGENTS.md`](AGENTS.md) — the decision points, the rules, the order of
28
- work, what a review checks — and [`STYLE_GUIDE.md`](STYLE_GUIDE.md). They are
27
+ pins: [`AGENTS.md`](AGENTS.md) (the decision points, the rules, the order of
28
+ work), [`REVIEW.md`](REVIEW.md) (what a review checks) and
29
+ [`STYLE_GUIDE.md`](STYLE_GUIDE.md). They are
29
30
  written for the coding agent building the app as much as for a person. An app
30
31
  made by `npm create nisc` has a short `AGENTS.md` of its own that points here,
31
32
  so the rules it follows are always the ones for what it has installed.
package/REVIEW.md CHANGED
@@ -42,7 +42,7 @@ These numbers are not rules. They say where a design has drifted. In the lab app
42
42
  - **d.** Where pages are drawn on the server: a check opens the drawn page with the real wire and target and the terminal adopts it with nothing said (rule 2a), at every window width the kit distinguishes; a page drawn for somebody goes out `private, no-store`; and every sign-in the app answers over HTTP sets the session cookie on its response and hands the page nothing (rule 12).
43
43
  7. Style guide bans (rule 16): `any`, `enum`, classes, default exports, `function` declarations, type assertions and non-null `!` — read by the compiler, not by grep, which cannot tell negation from assertion. Declared shim exceptions are honored.
44
44
  8. Decision points: each of D1–D5 is recorded in the app's `PLAN.md` with its tier — answered, delegated by name, or derived — never assumed silently.
45
- 9. Versions (rules 17–20): `pnpm check:grammars` and `pnpm check:sources` pass; no DDL outside a sequence; no edited migration, snapshot, early-stamp corpus file or hand-moved lock.
45
+ 9. Versions (rules 17–20): the check suite's `strata status --check` passes (the source is written at the installed grammars, `strata.lock.json`); no DDL outside a sequence; no edited migration, snapshot, early-stamp corpus file or hand-moved lock.
46
46
 
47
47
  ## What to look for
48
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@niscorp/nisc",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "description": "The nisc platform as one known-compatible set: every @niscorp package, each pinned to the exact version it was released with.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -19,18 +19,18 @@
19
19
  "node": ">=22.12"
20
20
  },
21
21
  "dependencies": {
22
- "@niscorp/charter": "0.1.4",
23
- "@niscorp/cortex": "0.1.5",
24
- "@niscorp/cli": "0.9.1",
22
+ "@niscorp/charter": "0.1.5",
25
23
  "@niscorp/loom": "0.5.0",
26
- "@niscorp/moss": "0.9.0",
27
- "@niscorp/nova": "0.5.1",
28
- "@niscorp/prism": "0.3.2",
29
- "@niscorp/signal": "0.1.8",
30
- "@niscorp/solid": "0.1.2",
31
- "@niscorp/strata": "0.1.8",
32
- "@niscorp/tide": "0.1.9",
33
- "@niscorp/vex": "0.4.3"
24
+ "@niscorp/cortex": "0.1.6",
25
+ "@niscorp/cli": "0.9.1",
26
+ "@niscorp/moss": "0.9.2",
27
+ "@niscorp/prism": "0.3.3",
28
+ "@niscorp/nova": "0.5.2",
29
+ "@niscorp/signal": "0.1.9",
30
+ "@niscorp/solid": "0.1.3",
31
+ "@niscorp/strata": "0.1.9",
32
+ "@niscorp/tide": "0.1.10",
33
+ "@niscorp/vex": "0.4.4"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "zod": "^4.2.0"