@owlmeans/server-planning 0.1.18-rc.29 → 0.1.18-rc.30
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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The server half of `@owlmeans/planning`: the planning service and its plugin registry, the
|
|
4
4
|
transition executor every write goes through, the in-memory reference store, the commit hub and the
|
|
5
|
-
protocol handlers. A backend appends the service once, binds the handlers to the shared protocol
|
|
5
|
+
protocol handlers, versioned auxiliary resource commands and schema-governed hierarchy. A backend appends the service once, binds the handlers to the shared protocol
|
|
6
6
|
tree, and reads and writes through a scoped facade. A browser or Node client uses
|
|
7
7
|
`@owlmeans/client-planning` against the same tree; a durable store implements the ports and reuses
|
|
8
8
|
the `@owlmeans/server-planning/store` subpath.
|
|
@@ -10,7 +10,7 @@ the `@owlmeans/server-planning/store` subpath.
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
|
-
bun add @owlmeans/server-planning@^0.1.18-rc.
|
|
13
|
+
bun add @owlmeans/server-planning@^0.1.18-rc.30 @owlmeans/planning@^0.1.18-rc.26 ajv
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Concepts
|
|
@@ -29,6 +29,8 @@ bun add @owlmeans/server-planning@^0.1.18-rc.29 @owlmeans/planning@^0.1.18-rc.25
|
|
|
29
29
|
`after` chain exactly once and publishes a commit event.
|
|
30
30
|
- **Store** — `makeMemoryPlanningStore()` for tests and single-process tools; a durable store in
|
|
31
31
|
anything with more than one process.
|
|
32
|
+
- **Resource facade** — `assignees`, `teams`, `comments` and `mentions` use native versioned ports.
|
|
33
|
+
Organization units serialize dependent writes, schema changes and derived relationships.
|
|
32
34
|
|
|
33
35
|
## Usage
|
|
34
36
|
|
|
@@ -40,6 +42,8 @@ import { makePlanningProtocols } from '@owlmeans/planning'
|
|
|
40
42
|
export const planningProtocols = makePlanningProtocols({
|
|
41
43
|
base: { alias: 'app:planning', path: '/planning' },
|
|
42
44
|
guards: DEFAULT_GUARD,
|
|
45
|
+
resources: true,
|
|
46
|
+
definitions: true,
|
|
43
47
|
})
|
|
44
48
|
```
|
|
45
49
|
|
|
@@ -100,6 +104,36 @@ appendPlanningService(testContext, { store: makeMemoryPlanningStore({ sync: fals
|
|
|
100
104
|
const cards = await planningHandlerOf(ctx).planningFor(req, { channel: 'web' }).cards.list({ parent: projectId })
|
|
101
105
|
```
|
|
102
106
|
|
|
107
|
+
## Native planning resources
|
|
108
|
+
|
|
109
|
+
Register assignee type schemas through `schemas.assigneeTypes` or the facade's definitions.
|
|
110
|
+
The scoped facade exposes versioned `assignees.create/update/retire`, `teams.create/update/remove`,
|
|
111
|
+
`comments.create/update/remove` and derived `mentions` reads/rebuilds. Resource updates and
|
|
112
|
+
removals require `{ version: record.version }`; they do not allocate card transitions.
|
|
113
|
+
|
|
114
|
+
Supply a verified `assigneeId` in the trusted scope for comment authors. Hosts may also supply
|
|
115
|
+
`defaultAssigneeId`; `@owlmeans/planning-auth` resolves verified authentication subjects and groups
|
|
116
|
+
to planning ids and can attribute missing card reporters. Never accept author or organization
|
|
117
|
+
claims from an untrusted resource request. Human authentication requirements come from assignee
|
|
118
|
+
type schemas, while nicknames identify participants only within an organization entity.
|
|
119
|
+
|
|
120
|
+
Use `teams.addMember/removeMember`, `teams.attach/detach`, `teams.members`, `teams.projects` and
|
|
121
|
+
`teams.assignees`. They reuse the relationship store and preserve reusable organization teams.
|
|
122
|
+
Schema reference fields maintain their canonical edges and named inverse views in the same
|
|
123
|
+
organization unit. Explicit relationship writes cannot contradict a field-authoritative edge.
|
|
124
|
+
|
|
125
|
+
`parent`, `parents` and derived `parentType` are the hierarchy. Schema parent/child rules validate
|
|
126
|
+
creates and reparenting; recursive project scope is checked before paging, including comments,
|
|
127
|
+
history, specifications and relationships. Project `mode` is access-policy metadata, separate
|
|
128
|
+
from status. Deleting a card removes its comments and mention cache. Project purge follows
|
|
129
|
+
current ancestry and retains unrelated organization assignees, reusable teams and reparented
|
|
130
|
+
survivors, even when an older log or edge caches the deleted project id.
|
|
131
|
+
|
|
132
|
+
Mount `resources: true` and `definitions: true` in the shared protocol tree, then bind stock
|
|
133
|
+
`servePlanningEntrypoints`. Its access resolver authorizes resource commands and conceals records
|
|
134
|
+
outside scope. Stock replies remove native `entityId` metadata from known record/envelope
|
|
135
|
+
positions, while application fields, schema definitions and transition changes remain opaque.
|
|
136
|
+
|
|
103
137
|
## API
|
|
104
138
|
|
|
105
139
|
- Service: `appendPlanningService`, `ensurePlanningService`, `makePlanningService`,
|
|
@@ -145,6 +179,7 @@ const cards = await planningHandlerOf(ctx).planningFor(req, { channel: 'web' }).
|
|
|
145
179
|
|
|
146
180
|
- `after` hooks run where the transition is FOLDED, once per commit — register the same plugins in
|
|
147
181
|
every folding process, and never run hooks from a commit-bus subscription.
|
|
182
|
+
- Organization locks are released before `after` hooks, so a hook may write into the same scope.
|
|
148
183
|
- The memory store is per-process heap: wrong for multiple processes or restarts.
|
|
149
184
|
- `actor` comes from the scope; a wire `actor` or `createdBy` is ignored.
|
|
150
185
|
- A create's `createdBy` defaults to the scope's subject (`profileId`, else `userId`, else the
|
|
@@ -160,6 +195,9 @@ const cards = await planningHandlerOf(ctx).planningFor(req, { channel: 'web' }).
|
|
|
160
195
|
- `opts.access` makes the resolver the only source of the organization; a `grants` object refuses
|
|
161
196
|
every flag it leaves out.
|
|
162
197
|
- A durable store is not done until it passes `@owlmeans/server-planning/conformance`.
|
|
198
|
+
- Resource writes require their current `version`; assignee/team `fields` replace the previous
|
|
199
|
+
object, while card `changes.fields` merge. A field-backed relationship is changed through its
|
|
200
|
+
field, not by writing an independent link.
|
|
163
201
|
|
|
164
202
|
## Related packages
|
|
165
203
|
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/server-planning",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"version": "0.1.18-rc.30",
|
|
5
|
+
"generatedAt": "2026-10-09T20:19:04.321Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/server-planning
|
|
9
9
|
|
|
10
10
|
**Layer:** Server
|
|
11
|
-
**Install:** `"@owlmeans/server-planning": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/server-planning": "^0.1.18-rc.30"` in `dependencies` (`ajv` is a peer)
|
|
12
12
|
|
|
13
13
|
The general implementation of `@owlmeans/planning`: the planning service (a plugin host), the
|
|
14
14
|
scoped facade, the executor every write goes through, the in-memory reference store, the commit
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/server-planning",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.30",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The general planning implementation — the planning service and its plugin/middleware registry, the transition executor, the in-memory store, the protocol handlers and the commit feed.",
|
|
6
6
|
"type": "module",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@owlmeans/context": "^0.1.18-rc.34",
|
|
51
51
|
"@owlmeans/entrypoint": "^0.1.18-rc.41",
|
|
52
52
|
"@owlmeans/error": "^0.1.18-rc.38",
|
|
53
|
-
"@owlmeans/planning": "^0.1.18-rc.
|
|
53
|
+
"@owlmeans/planning": "^0.1.18-rc.26",
|
|
54
54
|
"@owlmeans/queue": "^0.1.18-rc.44",
|
|
55
55
|
"@owlmeans/resource": "^0.1.18-rc.40",
|
|
56
56
|
"@owlmeans/log": "^0.1.18-rc.3",
|