@owlmeans/planning 0.1.18-rc.16 → 0.1.18-rc.17

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/README.md CHANGED
@@ -9,7 +9,7 @@ the executor with `@owlmeans/server-planning` and reads remotely with `@owlmeans
9
9
  ## Installation
10
10
 
11
11
  ```sh
12
- bun add @owlmeans/planning@^0.1.18-rc.16 ajv ajv-formats
12
+ bun add @owlmeans/planning@^0.1.18-rc.17 ajv ajv-formats
13
13
  ```
14
14
 
15
15
  ## Concepts
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/planning",
4
- "version": "0.1.18-rc.16",
5
- "generatedAt": "2026-10-03T15:33:53.021Z",
4
+ "version": "0.1.18-rc.17",
5
+ "generatedAt": "2026-10-04T01:01:54.402Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -8,7 +8,7 @@ user-invocable: false
8
8
  # @owlmeans/planning
9
9
 
10
10
  **Layer:** Cross-cutting domain
11
- **Install:** `"@owlmeans/planning": "^0.1.18-rc.16"` in `dependencies` (`ajv` and `ajv-formats` are peers)
11
+ **Install:** `"@owlmeans/planning": "^0.1.18-rc.17"` in `dependencies` (`ajv` and `ajv-formats` are peers)
12
12
 
13
13
  The contracts of project planning: record shapes, schemas, refusals, the protocol tree, the pure
14
14
  fold and the models. No database, no fastify, no React. The executor, the plugin registry, the
@@ -270,19 +270,21 @@ A client calls `encodeWorkcardQuery(query)` before `call({ query })`; a handler
270
270
 
271
271
  ## Mounting in a target
272
272
 
273
- A generated target serves this tree as it is — no hand-written card, transition or schema routes:
274
-
275
- - **common**: `makePlanningProtocols({ base: { alias: 'api:planning' }, guards: DEFAULT_GUARD,
276
- definitions: true })`, beside the `PLANNING` plugin in `sources/common/src/planning.ts`.
277
- - **api**: `servePlanningEntrypoints(tree, { access })` minus the `commit.events` socket entry; the
278
- resolver answers `{ entityId, projects, writes, grants }` (view ids, modify ids, create/admin
279
- grants) — `server-planning` → The access resolver.
280
- - **web**: `appendPlanningClient({ protocols, bind: false })` + `appendPlanningStores`, long poll
281
- only — `client-planning` → Mounting in a target.
282
- - **Kit literals**: card types and flows are LITERAL objects inside `PLANNING.schemas.flows` /
283
- `.types`, above the `// owlmeans: add planning flows|types above this line` sentinels (a spread
284
- hides them from the library's registration checks); card types and flows `overridable: true`,
285
- `fields` open (`additionalProperties: true`), the container project type `scopedCardTypes: true`.
273
+ A generated target serves this tree as it is — no hand-written card, transition, schema or document
274
+ routes; domain rules are `before` plugins. This section is the hub; each package skill has its half.
275
+
276
+ - **common** declares the one tree the api and the web share: `makePlanningProtocols({ base: {
277
+ alias: 'api:planning' }, guards: DEFAULT_GUARD, definitions: true })`, in its own module beside
278
+ the `PLANNING` plugin (`sources/common/src/planning.ts`).
279
+ - **api** — `server-planning` → Mounting in a target (stock handlers, no commit socket, the
280
+ resolver answering `writes`). **web** — `client-planning` → Mounting in a target. **store** —
281
+ `planning-postgres`.
282
+ - **Kit literals**: card types and flows are LITERAL objects in `PLANNING.schemas.flows` / `.types`,
283
+ above the `// owlmeans: add planning flows|types above this line` sentinels — a spread or an
284
+ imported constant hides them from the library's registration checks. Card types and flows carry
285
+ `overridable: true` with open `fields` (`additionalProperties: true`); the container project type
286
+ (always sealed) carries `scopedCardTypes: true`, so the app's people override and extend them as
287
+ data through `schema.define`.
286
288
 
287
289
  ## Models
288
290
 
@@ -320,7 +322,7 @@ the marker survives a hop where the class is unknown, so match on it there:
320
322
  | `WorkcardConflict` | `workcard-conflict:` — stale `expectSeq` | 409 |
321
323
  | `SchemaConflict` / `SchemaInUse` | `schema-conflict:` (lost version CAS) / `schema-in-use:` (retiring a flow a live type runs) | 409 |
322
324
  | `SchemaSealed` / `SchemaInvalid` | `schema-sealed:` / `schema-invalid:` | 422 |
323
- | `PlanningForbidden` | `forbidden:<grant>:<target>` — the request's access lacks a grant | 403 |
325
+ | `PlanningForbidden` | `forbidden:<grant>:<target>` — the request's access lacks a grant; `forbidden:writes:<id>` — the card or project is outside its `writes` | 403 |
324
326
  | `CommitTimeout` / `CommitFailed` | `commit-timeout:` (still pending, nothing undone) / `commit-failed:` | 500 |
325
327
  | `PlanningScopeMismatch` / `PlanningUnsupported` | `scope-mismatch:` / `unsupported:` | 404 / 500 |
326
328
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/planning",
3
- "version": "0.1.18-rc.16",
3
+ "version": "0.1.18-rc.17",
4
4
  "license": "MIT",
5
5
  "description": "Runtime-free project-planning contracts — the workcard super type, projects, specifications, typed relationships, status flows with three intrinsic states, the transition event and its pure fold, the schema registry, the models and the protocol tree.",
6
6
  "type": "module",