@owlmeans/client-planning 0.1.18-rc.17 → 0.1.18-rc.19
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 @@ planning service runs in-process.
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
bun add @owlmeans/client-planning@^0.1.18-rc.
|
|
12
|
+
bun add @owlmeans/client-planning@^0.1.18-rc.19
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Concepts
|
|
@@ -119,7 +119,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
119
119
|
your project's skill store (`.agents/skills/`):
|
|
120
120
|
|
|
121
121
|
```sh
|
|
122
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
122
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.46
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/client-planning",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"version": "0.1.18-rc.19",
|
|
5
|
+
"generatedAt": "2026-10-03T15:33:53.022Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/client-planning
|
|
9
9
|
|
|
10
10
|
**Layer:** Client
|
|
11
|
-
**Install:** `"@owlmeans/client-planning": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/client-planning": "^0.1.18-rc.19"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
The client half of OwlMeans planning. It answers the `PlanningFacade` interface of
|
|
14
14
|
`@owlmeans/planning` over the protocol tree a server mounted with `@owlmeans/server-planning`, keeps
|
|
@@ -60,8 +60,8 @@ appendPlanningStores(context) // a browser mirror; a Node client usually
|
|
|
60
60
|
- `bind: false` when the host already bound the tree.
|
|
61
61
|
- The service answers under `PLANNING_SERVICE`, the alias the server's service uses, so
|
|
62
62
|
`context.planning().for(scope)` is the same call in a handler and in a screen. The scope is
|
|
63
|
-
**advisory
|
|
64
|
-
`actor` is never sent.
|
|
63
|
+
**advisory** — it changes nothing the server decides: the server takes the entity and the actor
|
|
64
|
+
from the credential. The execution's own `actor` is never sent.
|
|
65
65
|
- A client runs no middleware and folds nothing: `store()`, `committed()` and a plugin carrying
|
|
66
66
|
`before`/`after`/`store`/`mintCode` answer `PlanningUnsupported`. `use()` accepts a schemas-only
|
|
67
67
|
plugin, layered over the server's bundle.
|
|
@@ -87,16 +87,33 @@ whole cache — an organization-wide write reaches every project's layer — and
|
|
|
87
87
|
`model(card)` of a card resolves its type in its project's layer (a project's own id, a card's
|
|
88
88
|
`parent`); a specification's type is always code's. A tree without `definitions` has none of this.
|
|
89
89
|
|
|
90
|
+
## Mounting in a target
|
|
91
|
+
|
|
92
|
+
A generated target's web reads the STOCK tree its api serves (`server-planning` → Mounting in a
|
|
93
|
+
target) — the one `makePlanningProtocols({ base: { alias: 'api:planning' }, guards: DEFAULT_GUARD,
|
|
94
|
+
definitions: true })` declared in the target's common package.
|
|
95
|
+
|
|
96
|
+
- `appendPlanningClient(context, { protocols, bind: false })` — the target binds its common tree
|
|
97
|
+
itself — plus `appendPlanningStores(context)`. No `socket`: the target api serves no commit
|
|
98
|
+
socket, so `commits.wait` long-polls.
|
|
99
|
+
- Screens read the mirror with `useStoreList` / `useStoreModel` (`@owlmeans/client`), never a
|
|
100
|
+
fetched array kept in component state.
|
|
101
|
+
- Lists reach the store through `syncCards` or `makePlanningFeed` (with `refresh`), NEVER
|
|
102
|
+
`replace()` — the one card store holds every kind.
|
|
103
|
+
- Every write is `facade.execute(...)` with a `key` (a retried click or a double submit answers
|
|
104
|
+
the first receipt) and `{ wait: true }` where the screen shows the result.
|
|
105
|
+
- Never call a route with an empty id; a picker offers no archived parent (`intrinsic: closed`).
|
|
106
|
+
|
|
90
107
|
## Reading
|
|
91
108
|
|
|
92
109
|
```typescript
|
|
93
110
|
const planning = context.planning().for()
|
|
94
111
|
|
|
95
|
-
const
|
|
96
|
-
const board = await planning.cards.summary([
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
|
|
112
|
+
const tools = await planning.cards.list({ parent: shedId, type: 'shed:tool', sort: ['order'], size: 0 })
|
|
113
|
+
const board = await planning.cards.summary([shedId])
|
|
114
|
+
const rules = await planning.specifications.current(shedId, 'house-rules')
|
|
115
|
+
const drill = await planning.model(drillId)
|
|
116
|
+
drill.available().map(rule => rule.name)
|
|
100
117
|
```
|
|
101
118
|
|
|
102
119
|
- The facade takes the rich `WorkcardQuery`; it encodes the scalar wire shape itself
|
|
@@ -136,8 +153,8 @@ The fold rules, shared by `syncCards`, `applyCards`, `applyCommitEvent` and `com
|
|
|
136
153
|
|
|
137
154
|
```typescript
|
|
138
155
|
const feed = makePlanningFeed(context, {
|
|
139
|
-
query: { parent:
|
|
140
|
-
filter: { project:
|
|
156
|
+
query: { parent: shedId, type: 'shed:tool' },
|
|
157
|
+
filter: { project: shedId },
|
|
141
158
|
refresh: 15_000,
|
|
142
159
|
onChange: state => setState(state),
|
|
143
160
|
})
|
|
@@ -197,18 +214,14 @@ A Node client passes no opener and relies on the long poll.
|
|
|
197
214
|
(run by `execute` whenever stores are registered) raises the stored card's `head` to the new
|
|
198
215
|
transition's `seq`, so `model.pending()` is true before any frame arrives; the commit's fold brings
|
|
199
216
|
`seq` up to it. The mirror only ever grows `head`, so a list fetched before the append does not
|
|
200
|
-
clear the marker. A model's
|
|
201
|
-
gets `WorkcardConflict` — reload and retry.
|
|
217
|
+
clear the marker. A model's `expectSeq` default and its `WorkcardConflict` are `planning` → Models.
|
|
202
218
|
|
|
203
219
|
## Gotchas
|
|
204
220
|
|
|
205
221
|
- Mount a feed once per screen; read the store everywhere else.
|
|
206
|
-
- Do not `replace()` the card store — it holds every kind. Use `syncCards` with a `where`.
|
|
207
222
|
- A refusal crosses the hop as its class (`IllegalTransition`, `WorkcardConflict`,
|
|
208
223
|
`FieldsInvalid`, a plugin's own class) — branch on `instanceof`, never on message text.
|
|
209
224
|
- `CommitTimeout` is not a failure of the transition; re-wait or re-read the card.
|
|
210
|
-
- The scope passed to `for()` changes nothing the server decides; it exists so code written against
|
|
211
|
-
`PlanningFacade` reads the same on both sides.
|
|
212
225
|
|
|
213
226
|
## Depends On
|
|
214
227
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/client-planning",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.19",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The client half of OwlMeans planning — the remote planning facade, the state mirror and its commit fold, and the subscribe-then-poll commit wait. React-free: it runs in a browser and in a Node client alike.",
|
|
6
6
|
"type": "module",
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@owlmeans/auth": "^0.1.18-rc.
|
|
27
|
-
"@owlmeans/client-context": "^0.1.18-rc.
|
|
28
|
-
"@owlmeans/client-entrypoint": "^0.1.18-rc.
|
|
26
|
+
"@owlmeans/auth": "^0.1.18-rc.38",
|
|
27
|
+
"@owlmeans/client-context": "^0.1.18-rc.45",
|
|
28
|
+
"@owlmeans/client-entrypoint": "^0.1.18-rc.44",
|
|
29
29
|
"@owlmeans/context": "^0.1.18-rc.32",
|
|
30
|
-
"@owlmeans/entrypoint": "^0.1.18-rc.
|
|
30
|
+
"@owlmeans/entrypoint": "^0.1.18-rc.39",
|
|
31
31
|
"@owlmeans/error": "^0.1.18-rc.36",
|
|
32
|
-
"@owlmeans/planning": "^0.1.18-rc.
|
|
32
|
+
"@owlmeans/planning": "^0.1.18-rc.16",
|
|
33
33
|
"@owlmeans/resource": "^0.1.18-rc.37",
|
|
34
34
|
"@owlmeans/route": "^0.1.18-rc.33",
|
|
35
|
-
"@owlmeans/socket": "^0.1.18-rc.
|
|
35
|
+
"@owlmeans/socket": "^0.1.18-rc.37",
|
|
36
36
|
"@owlmeans/state": "^0.1.18-rc.36"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@owlmeans/dep-config": "workspace:*",
|
|
44
|
-
"@owlmeans/server-planning": "^0.1.18-rc.
|
|
44
|
+
"@owlmeans/server-planning": "^0.1.18-rc.19",
|
|
45
45
|
"@owlmeans/test": "^0.1.18-rc.33",
|
|
46
46
|
"@types/bun": "^1.4.0",
|
|
47
47
|
"ajv": "^8.17.1",
|