@owlmeans/client-planning 0.1.18-rc.21 → 0.1.18-rc.23
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 +13 -8
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/client-planning/SKILL.md +24 -23
- package/build/client.js +2 -2
- package/build/client.js.map +1 -1
- package/build/commits.js +4 -4
- package/build/commits.js.map +1 -1
- package/build/consts.d.ts +12 -0
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +15 -0
- package/build/consts.js.map +1 -1
- package/build/definitions.js +2 -2
- package/build/definitions.js.map +1 -1
- package/build/events/types.d.ts +29 -0
- package/build/events/types.d.ts.map +1 -0
- package/build/events/types.js.map +1 -0
- package/build/events.d.ts +9 -20
- package/build/events.d.ts.map +1 -1
- package/build/events.js +97 -103
- package/build/events.js.map +1 -1
- package/build/facade.d.ts.map +1 -1
- package/build/facade.js +10 -10
- package/build/facade.js.map +1 -1
- package/build/feed.d.ts +4 -4
- package/build/feed.d.ts.map +1 -1
- package/build/feed.js +17 -15
- package/build/feed.js.map +1 -1
- package/build/helper/types.d.ts +15 -0
- package/build/helper/types.d.ts.map +1 -0
- package/build/helper/types.js +2 -0
- package/build/helper/types.js.map +1 -0
- package/build/helper.d.ts +7 -7
- package/build/helper.d.ts.map +1 -1
- package/build/helper.js +16 -8
- package/build/helper.js.map +1 -1
- package/build/index.d.ts +4 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/stores.d.ts +3 -10
- package/build/stores.d.ts.map +1 -1
- package/build/stores.js +9 -36
- package/build/stores.js.map +1 -1
- package/build/sync/types.d.ts +18 -0
- package/build/sync/types.d.ts.map +1 -0
- package/build/sync/types.js +2 -0
- package/build/{utils → sync}/types.js.map +1 -1
- package/build/sync.d.ts +4 -0
- package/build/sync.d.ts.map +1 -0
- package/build/sync.js +26 -0
- package/build/sync.js.map +1 -0
- package/build/utils/record/types.d.ts +28 -0
- package/build/utils/record/types.d.ts.map +1 -0
- package/build/utils/record/types.js +2 -0
- package/build/utils/record/types.js.map +1 -0
- package/build/utils/record.d.ts +3 -43
- package/build/utils/record.d.ts.map +1 -1
- package/build/utils/record.js +64 -72
- package/build/utils/record.js.map +1 -1
- package/package.json +15 -15
- package/src/client.ts +2 -2
- package/src/commits.ts +4 -4
- package/src/consts.ts +23 -0
- package/src/definitions.ts +2 -2
- package/src/events/types.ts +29 -0
- package/src/events.ts +105 -103
- package/src/facade.ts +11 -12
- package/src/feed.ts +17 -15
- package/src/helper/types.ts +15 -0
- package/src/helper.ts +27 -10
- package/src/index.ts +4 -1
- package/src/stores.ts +9 -39
- package/src/sync/types.ts +18 -0
- package/src/sync.ts +40 -0
- package/src/utils/record/types.ts +27 -0
- package/src/utils/record.ts +68 -75
- package/tests/events.spec.ts +12 -8
- package/tests/stores.spec.ts +13 -11
- package/build/utils/types.d.ts +0 -3
- package/build/utils/types.d.ts.map +0 -1
- package/build/utils.d.ts +0 -13
- package/build/utils.d.ts.map +0 -1
- package/build/utils.js +0 -15
- package/build/utils.js.map +0 -1
- package/src/utils/types.ts +0 -3
- package/src/utils.ts +0 -20
- /package/build/{utils → events}/types.js +0 -0
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.23
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Concepts
|
|
@@ -17,12 +17,12 @@ bun add @owlmeans/client-planning@^0.1.18-rc.21
|
|
|
17
17
|
- **Remote facade** — the same `PlanningFacade` interface the server answers; every method is one
|
|
18
18
|
entrypoint call, and `modelOf(record, facade)` models behave identically on both sides.
|
|
19
19
|
- **One id space** — projects, cards and specifications share ONE card store; a list reaches it
|
|
20
|
-
through `syncCards(store, items, where)`, never `replace()`.
|
|
20
|
+
through `syncHelper.syncCards(store, items, where)`, never `replace()`.
|
|
21
21
|
- **Commit** — `execute()` returns a receipt for a pending transition; `receipt.committed()` /
|
|
22
22
|
`commits.wait()` resolve with the folded card, or throw `CommitTimeout` / `CommitFailed`.
|
|
23
23
|
- **Socket seam** — the commit socket is opened by an injected `PlanningSocketOpener`; without one
|
|
24
24
|
the client long-polls.
|
|
25
|
-
- **`head > seq`** — a card with a transition allocated and not yet folded; `applyReceipt` marks it
|
|
25
|
+
- **`head > seq`** — a card with a transition allocated and not yet folded; the mirror's `applyReceipt` marks it
|
|
26
26
|
the moment the server answers.
|
|
27
27
|
|
|
28
28
|
## Usage
|
|
@@ -77,7 +77,7 @@ Give a browser its commit socket through the host's own opener:
|
|
|
77
77
|
```typescript
|
|
78
78
|
appendPlanningClient(context, {
|
|
79
79
|
protocols: planningProtocols,
|
|
80
|
-
socket: async (protocol, request) => await ws(context.entrypoint(protocol), request),
|
|
80
|
+
socket: async (protocol, request) => await socketClientHelper.ws(context.entrypoint(protocol), request),
|
|
81
81
|
})
|
|
82
82
|
```
|
|
83
83
|
|
|
@@ -85,10 +85,15 @@ appendPlanningClient(context, {
|
|
|
85
85
|
|
|
86
86
|
- `appendPlanningClient(context, options)`, `makePlanningClientService(context, options)`
|
|
87
87
|
- `makeRemoteFacade(context, protocols, scope, opts)`, `makeRemoteCommitSource(context, protocols, opts?)`
|
|
88
|
-
- `appendPlanningStores(context, aliases?)
|
|
89
|
-
- `
|
|
88
|
+
- `appendPlanningStores(context, aliases?)`
|
|
89
|
+
- `syncHelper` — `.syncCards(store, items, where?, opts?)`, `.syncLinks(store, items, where?, opts?)`
|
|
90
|
+
- `planningMirrorOf(stores)` (`makePlanningMirror`) — `.applyCommitEvent(event, facade?)`,
|
|
91
|
+
`.applyReceipt(view)`, `.applyCards(cards)`
|
|
90
92
|
- `makePlanningFeed(context, opts?)`
|
|
91
|
-
- `
|
|
93
|
+
- `planningContextOf(context)` (`makePlanningContextHelper`) — `.facade(scope?)`, `.model(card, scope?)`,
|
|
94
|
+
`.stores()`
|
|
95
|
+
- The former plain functions (`syncCards`, `applyCards`, `planningOf`, …) remain as deprecated
|
|
96
|
+
delegates.
|
|
92
97
|
- `CARDS`, `LINKS`, `COMMITS`, `DEFAULT_STORE_ALIASES`, `LONG_POLL_GRACE`, `EARLY_POLL_LADDER`, `EARLY_POLL_MS`
|
|
93
98
|
- Types: `PlanningClientOptions`, `PlanningClientService`, `WithPlanningClient`,
|
|
94
99
|
`PlanningSocketOpener`, `RemoteCommitSource`, `RemoteCommitSourceOptions`, `RemoteFacadeOptions`,
|
|
@@ -119,7 +124,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
119
124
|
your project's skill store (`.agents/skills/`):
|
|
120
125
|
|
|
121
126
|
```sh
|
|
122
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
127
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.51
|
|
123
128
|
```
|
|
124
129
|
|
|
125
130
|
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.23",
|
|
5
|
+
"generatedAt": "2026-10-06T11:45:57.667Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: client-planning
|
|
3
|
-
description: How to use @owlmeans/client-planning — appendPlanningClient for the remote planning facade, appendPlanningStores and
|
|
3
|
+
description: How to use @owlmeans/client-planning — appendPlanningClient for the remote planning facade, appendPlanningStores and planningMirrorOf for the state mirror, makePlanningFeed, commits.wait (subscribe then long-poll), and the models that are the same objects the server uses. Auto-invoked when reading planning data in a browser or a Node client, mounting the commit feed, or wiring optimistic transitions.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
@@ -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.23"` 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
|
|
@@ -25,13 +25,13 @@ CLI). React hooks over the mirror are `useStoreModel` / `useStoreList` from `@ow
|
|
|
25
25
|
| `makeRemoteFacade(context, protocols, scope, opts)` | One facade — every method is one entrypoint call |
|
|
26
26
|
| `makeRemoteCommitSource(context, protocols, opts?)` | `status` / `subscribe` / `wait` over `commit.get` and `commit.events` |
|
|
27
27
|
| `makeRemoteDefinitions(context, protocols, opts?)` | Data-defined types and flows over a tree declared with `definitions: true` |
|
|
28
|
-
| `appendPlanningStores(context, aliases?)` / `
|
|
29
|
-
| `syncCards(store, items, where?, opts?)` / `syncLinks(...)` | Make the mirror agree with a list WITHIN a scope |
|
|
30
|
-
| `applyCommitEvent(
|
|
28
|
+
| `appendPlanningStores(context, aliases?)` / `planningContextOf(context).stores()` | The state mirror, and a lookup that answers `null` without one |
|
|
29
|
+
| `syncHelper.syncCards(store, items, where?, opts?)` / `syncHelper.syncLinks(...)` | Make the mirror agree with a list WITHIN a scope |
|
|
30
|
+
| `planningMirrorOf(stores).applyCommitEvent(event, facade?)` / `.applyReceipt(view)` / `.applyCards(cards)` | The folds |
|
|
31
31
|
| `makePlanningFeed(context, opts?)` | Subscribe, seed, fold, refresh — `{ connected, seeded, error, ready, refresh, stop }` |
|
|
32
|
-
| `
|
|
32
|
+
| `planningContextOf(context).facade(scope?)` / `.model(card, scope?)` | The facade / a model with the schemas loaded |
|
|
33
33
|
| `CARDS`, `LINKS`, `COMMITS` | Store aliases (`planning-card-state`, `planning-link-state`, `planning-commit-state`) |
|
|
34
|
-
| Types | `PlanningClientOptions`, `PlanningClientService`, `WithPlanningClient`, `PlanningSocketOpener`, `RemoteCommitSource`, `RemoteDefinitions`, `RemoteDefinitionsOptions`, `PlanningStores`, `PlanningStoreAliases`, `WithPlanningStores`, `PlanningCommitRecord`, `PlanningFeed`, `PlanningFeedOptions`, `PlanningFeedState`, `SyncOptions` |
|
|
34
|
+
| Types | `PlanningClientOptions`, `PlanningClientService`, `WithPlanningClient`, `PlanningSocketOpener`, `RemoteCommitSource`, `RemoteDefinitions`, `RemoteDefinitionsOptions`, `PlanningStores`, `PlanningStoreAliases`, `WithPlanningStores`, `PlanningCommitRecord`, `PlanningFeed`, `PlanningFeedOptions`, `PlanningFeedState`, `SyncOptions`, `PlanningContextHelper`, `PlanningMirror`, `SyncHelper` |
|
|
35
35
|
|
|
36
36
|
## Wiring
|
|
37
37
|
|
|
@@ -96,7 +96,7 @@ The web half of the target mount (`planning` → Mounting in a target).
|
|
|
96
96
|
first use — plus `appendPlanningStores(context)`. No `socket`: the target serves no commit socket,
|
|
97
97
|
so `commits.wait` long-polls.
|
|
98
98
|
- Screens read the mirror with `useStoreList` / `useStoreModel` (`@owlmeans/client`), never a
|
|
99
|
-
fetched array kept in component state; lists reach the store through `syncCards` or
|
|
99
|
+
fetched array kept in component state; lists reach the store through `syncHelper.syncCards` or
|
|
100
100
|
`makePlanningFeed` (with `refresh`), NEVER `replace()` — the one card store holds every kind.
|
|
101
101
|
- Every write is `facade.execute(...)` with a `key` (a retried click or a double submit answers
|
|
102
102
|
the first receipt) and `{ wait: true }` where the screen shows the result.
|
|
@@ -115,7 +115,7 @@ drill.available().map(rule => rule.name)
|
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
- The facade takes the rich `WorkcardQuery`; it encodes the scalar wire shape itself
|
|
118
|
-
(`encodeWorkcardQuery` and its twins). Never pass a wire shape to the facade.
|
|
118
|
+
(`wireHelper.encodeWorkcardQuery` and its twins). Never pass a wire shape to the facade.
|
|
119
119
|
- `cards.load(id)` answers `null` for a missing card — and for another entity's card, which the
|
|
120
120
|
server deliberately reports the same way.
|
|
121
121
|
- `cards.count(query)` is a one-row list read for its `total`; the tree declares no count route.
|
|
@@ -129,13 +129,14 @@ drill.available().map(rule => rule.name)
|
|
|
129
129
|
share an id space on the server, so they share one store here: a store per kind lets a card list
|
|
130
130
|
that reloads drop the projects beside it.
|
|
131
131
|
|
|
132
|
-
That is also why a list reaches the store through **`syncCards(store, items, where)`,
|
|
133
|
-
`replace()`**: every card given is written, every card matching `where` that the list does not
|
|
134
|
-
is dropped, and everything outside `where` is left alone. An unchanged card is not rewritten, so a
|
|
132
|
+
That is also why a list reaches the store through **`syncHelper.syncCards(store, items, where)`,
|
|
133
|
+
never `replace()`**: every card given is written, every card matching `where` that the list does not
|
|
134
|
+
name is dropped, and everything outside `where` is left alone. An unchanged card is not rewritten, so a
|
|
135
135
|
periodic re-seed wakes no subscriber. `opts.keep` protects ids a commit wrote while the list was in
|
|
136
136
|
flight.
|
|
137
137
|
|
|
138
|
-
The fold rules, shared by `syncCards`, `applyCards
|
|
138
|
+
The fold rules, shared by `syncHelper.syncCards`, the mirror's `applyCards` and `applyCommitEvent`, and
|
|
139
|
+
`commits.wait`:
|
|
139
140
|
|
|
140
141
|
- an OLDER `seq` never overwrites a newer record — frames and list answers race;
|
|
141
142
|
- a committed `delete` removes the row and every link touching it; a project's delete also drops
|
|
@@ -162,11 +163,11 @@ await feed.stop() // stops folding; the shared socket stays open
|
|
|
162
163
|
```
|
|
163
164
|
|
|
164
165
|
1. Subscribes to commits FIRST (the socket, when an opener exists).
|
|
165
|
-
2. Seeds: `cards.list` (unpaged unless the query pages) → `syncCards` over `where`
|
|
166
|
-
(`criteriaOf(query)` by default). A PAGED seed only writes — a page cannot say what
|
|
167
|
-
exist.
|
|
168
|
-
3. Folds every frame with `applyCommitEvent`, and re-seeds every `refresh`
|
|
169
|
-
backstop to a socket that can drop frames.
|
|
166
|
+
2. Seeds: `cards.list` (unpaged unless the query pages) → `syncHelper.syncCards` over `where`
|
|
167
|
+
(`queryHelper.criteriaOf(query)` by default). A PAGED seed only writes — a page cannot say what
|
|
168
|
+
does not exist.
|
|
169
|
+
3. Folds every frame with `planningMirrorOf(stores).applyCommitEvent`, and re-seeds every `refresh`
|
|
170
|
+
ms — the authoritative backstop to a socket that can drop frames.
|
|
170
171
|
|
|
171
172
|
`connected` reports whether a socket was open when the feed subscribed; `seeded` tells "nothing
|
|
172
173
|
there" from "not loaded yet". A React hook wraps the feed in an effect and stops it on unmount.
|
|
@@ -208,10 +209,10 @@ A Node client passes no opener and relies on the long poll.
|
|
|
208
209
|
|
|
209
210
|
## Optimistic writes and `head > seq`
|
|
210
211
|
|
|
211
|
-
`seq` is the last transition folded into a card, `head` the highest allocated.
|
|
212
|
-
(run by `execute` whenever stores are registered) raises the stored card's `head` to
|
|
213
|
-
transition's `seq`, so `model.pending()` is true before any frame arrives; the commit's fold
|
|
214
|
-
`seq` up to it. The mirror only ever grows `head`, so a list fetched before the append does not
|
|
212
|
+
`seq` is the last transition folded into a card, `head` the highest allocated. The mirror's
|
|
213
|
+
`applyReceipt` (run by `execute` whenever stores are registered) raises the stored card's `head` to
|
|
214
|
+
the new transition's `seq`, so `model.pending()` is true before any frame arrives; the commit's fold
|
|
215
|
+
brings `seq` up to it. The mirror only ever grows `head`, so a list fetched before the append does not
|
|
215
216
|
clear the marker. A model's `expectSeq` default and its `WorkcardConflict` are `planning` → Models.
|
|
216
217
|
|
|
217
218
|
## Gotchas
|
|
@@ -232,4 +233,4 @@ clear the marker. A model's `expectSeq` default and its `WorkcardConflict` are `
|
|
|
232
233
|
- `planning` — records, flows, the fold, the models
|
|
233
234
|
- `server-planning` — the handlers this addresses, the executor, the commit hub
|
|
234
235
|
- `client-job` — the same seed-then-fold shape for safe application-job views
|
|
235
|
-
- `state` — `syncCards` is built on its criteria engine and `purge`
|
|
236
|
+
- `state` — `syncHelper.syncCards` is built on its criteria engine and `purge`
|
package/build/client.js
CHANGED
|
@@ -4,7 +4,7 @@ import { DEFAULT_PLUGIN_ORDER, makeSchemaRegistry, PLANNING_SERVICE, PlanningUns
|
|
|
4
4
|
import { makeRemoteCommitSource } from './commits.js';
|
|
5
5
|
import { makeRemoteDefinitions } from './definitions.js';
|
|
6
6
|
import { makeRemoteFacade } from './facade.js';
|
|
7
|
-
import {
|
|
7
|
+
import { planningContextOf } from './helper.js';
|
|
8
8
|
/**
|
|
9
9
|
* The client planning service: a remote facade factory under the SAME alias the server registers
|
|
10
10
|
* its service under, so `context.planning().for(scope)` is one call on both sides.
|
|
@@ -17,7 +17,7 @@ import { planningStoresOf } from './stores.js';
|
|
|
17
17
|
export const makePlanningClientService = (context, options) => {
|
|
18
18
|
const registry = makeSchemaRegistry();
|
|
19
19
|
const plugins = [];
|
|
20
|
-
const stores = () =>
|
|
20
|
+
const stores = () => planningContextOf(context).stores();
|
|
21
21
|
const commits = makeRemoteCommitSource(context, options.protocols, {
|
|
22
22
|
socket: options.socket, poll: options.poll, timeout: options.timeout, stores,
|
|
23
23
|
});
|
package/build/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEtF,OAAO,EACL,oBAAoB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,mBAAmB,GAChF,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc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AC,CAAA;IAClF,CAAC;IAED,MAAM,OAAO,GAAG,yBAAyB,CAAO,OAAO,EAAE,OAAO,CAAC,CAAA;IACjE,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;IAC5B,GAAG,CAAC,QAAQ,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,OAAO,CAAwB,gBAAgB,CAAC,CAAA;IAEzE,IAAI,OAAO,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;QAC9B,GAAG,CAAC,kBAAkB,CAAC;YACrB,IAAI,EAAE,cAAc,CAAC,OAAO;YAC5B,KAAK,EAAE,eAAe,CAAC,KAAK;YAC5B,KAAK,EAAE,KAAK,IAAI,EAAE;gBAChB,IAAI,CAAC;oBACH,MAAM,OAAO,CAAC,WAAW,EAAE,CAAA;gBAC7B,CAAC;gBAAC,MAAM,CAAC;oBACP,qCAAqC;gBACvC,CAAC;YACH,CAAC;SACF,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA"}
|
package/build/commits.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { logger } from '@owlmeans/log';
|
|
2
2
|
import { CommitFailed, CommitState, CommitTimeout, DEFAULT_COMMIT_POLL, DEFAULT_COMMIT_TIMEOUT, MAX_COMMIT_POLL, PLANNING_COMMIT_EVENT, PlanningError, WorkcardKind } from '@owlmeans/planning';
|
|
3
3
|
import { EARLY_POLL_LADDER, EARLY_POLL_MS, LONG_POLL_GRACE } from './consts.js';
|
|
4
|
-
import {
|
|
4
|
+
import { recordUtils } from './utils/record.js';
|
|
5
5
|
const log = logger('client-planning');
|
|
6
6
|
const matches = (filter, event) => filter == null || ((filter.entityId == null || filter.entityId === event.entityId)
|
|
7
7
|
&& (filter.project == null || filter.project === event.project)
|
|
@@ -96,17 +96,17 @@ export const makeRemoteCommitSource = (context, protocols, opts) => {
|
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
98
|
const known = await stores.commits.load(transition);
|
|
99
|
-
await
|
|
99
|
+
await recordUtils.putCommit(stores.commits, {
|
|
100
100
|
id: transition, state: settled.state, at: settled.at, error: settled.error,
|
|
101
101
|
});
|
|
102
102
|
if (settled.state !== CommitState.Committed) {
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
105
|
if (settled.card != null) {
|
|
106
|
-
await
|
|
106
|
+
await recordUtils.putCard(stores.cards, settled.card);
|
|
107
107
|
}
|
|
108
108
|
else if (settled.card === null && known?.card != null) {
|
|
109
|
-
await
|
|
109
|
+
await recordUtils.dropCard(stores, known.card, known.kind === WorkcardKind.Project);
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
112
|
const answer = async (transition, settled) => {
|
package/build/commits.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commits.js","sourceRoot":"","sources":["../src/commits.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,eAAe,EAAE,qBAAqB,EAAE,aAAa,EAAE,YAAY,EAAmH,MAAM,oBAAoB,CAAA;AAEhT,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAG/E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"commits.js","sourceRoot":"","sources":["../src/commits.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,eAAe,EAAE,qBAAqB,EAAE,aAAa,EAAE,YAAY,EAAmH,MAAM,oBAAoB,CAAA;AAEhT,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAG/E,OAAO,EAAE,WAAW,EAAE,MAAM,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AE,CAAA;YACf,CAAC;QACH,CAAC;QAED,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,IAAI;QAE7B,KAAK,EAAE,KAAK,IAAI,EAAE;YAChB,MAAM,EAAE,EAAE,CAAA;YACV,MAAM,GAAG,IAAI,CAAA;YACb,MAAM,UAAU,GAAG,IAAI,CAAA;YACvB,IAAI,GAAG,IAAI,CAAA;YACX,OAAO,GAAG,IAAI,CAAA;YACd,MAAM,UAAU,EAAE,KAAK,EAAE,CAAA;QAC3B,CAAC;KACF,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
package/build/consts.d.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
import type { Relationship, Workcard } from '@owlmeans/planning';
|
|
2
|
+
import type { StateAlias } from '@owlmeans/state';
|
|
3
|
+
import type { PlanningCommitRecord, PlanningStoreAliases } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* The ONE card store. Projects, cards and specifications share an id space on the server, so they
|
|
6
|
+
* share it here too — a store per kind would let a list reload of one kind drop another's rows.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CARDS: StateAlias<Workcard>;
|
|
9
|
+
export declare const LINKS: StateAlias<Relationship>;
|
|
10
|
+
/** What the client has learned about each transition it wrote or saw, keyed by transition id. */
|
|
11
|
+
export declare const COMMITS: StateAlias<PlanningCommitRecord>;
|
|
12
|
+
export declare const DEFAULT_STORE_ALIASES: Readonly<PlanningStoreAliases>;
|
|
1
13
|
/**
|
|
2
14
|
* How much longer than its own `wait` a long poll's HTTP deadline is, in milliseconds — a held
|
|
3
15
|
* response must outlast the hold, or every quiet poll reads as a broken connection.
|
package/build/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAK5E;;;GAGG;AACH,eAAO,MAAM,KAAK,EAA4B,UAAU,CAAC,QAAQ,CAAC,CAAA;AAElE,eAAO,MAAM,KAAK,EAA4B,UAAU,CAAC,YAAY,CAAC,CAAA;AAEtE,iGAAiG;AACjG,eAAO,MAAM,OAAO,EAA8B,UAAU,CAAC,oBAAoB,CAAC,CAAA;AAElF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,oBAAoB,CAI/D,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAS,CAAA;AAErC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAAuC,CAAA;AAEtF,0DAA0D;AAC1D,eAAO,MAAM,aAAa,MAAM,CAAA"}
|
package/build/consts.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// A state alias is the string itself at runtime (`stateAlias()` only attaches the record type), so
|
|
2
|
+
// each handle is declared as the constant it is.
|
|
3
|
+
/**
|
|
4
|
+
* The ONE card store. Projects, cards and specifications share an id space on the server, so they
|
|
5
|
+
* share it here too — a store per kind would let a list reload of one kind drop another's rows.
|
|
6
|
+
*/
|
|
7
|
+
export const CARDS = 'planning-card-state';
|
|
8
|
+
export const LINKS = 'planning-link-state';
|
|
9
|
+
/** What the client has learned about each transition it wrote or saw, keyed by transition id. */
|
|
10
|
+
export const COMMITS = 'planning-commit-state';
|
|
11
|
+
export const DEFAULT_STORE_ALIASES = Object.freeze({
|
|
12
|
+
cards: CARDS,
|
|
13
|
+
links: LINKS,
|
|
14
|
+
commits: COMMITS,
|
|
15
|
+
});
|
|
1
16
|
/**
|
|
2
17
|
* How much longer than its own `wait` a long poll's HTTP deadline is, in milliseconds — a held
|
|
3
18
|
* response must outlast the hold, or every quiet poll reads as a broken connection.
|
package/build/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAIA,mGAAmG;AACnG,iDAAiD;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,qBAA6C,CAAA;AAElE,MAAM,CAAC,MAAM,KAAK,GAAG,qBAAiD,CAAA;AAEtE,iGAAiG;AACjG,MAAM,CAAC,MAAM,OAAO,GAAG,uBAA2D,CAAA;AAElF,MAAM,CAAC,MAAM,qBAAqB,GAAmC,MAAM,CAAC,MAAM,CAAC;IACjF,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,OAAO;CACjB,CAAC,CAAA;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAA;AAErC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAsB,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAA;AAEtF,0DAA0D;AAC1D,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA"}
|
package/build/definitions.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlanningUnsupported, SchemaWriteMode,
|
|
1
|
+
import { PlanningUnsupported, SchemaWriteMode, scopedSchemaHelper } from '@owlmeans/planning';
|
|
2
2
|
const clean = (record) => Object.fromEntries(Object.entries(record).filter(([, value]) => value !== undefined));
|
|
3
3
|
/**
|
|
4
4
|
* Data-defined types and flows over a tree declared with `definitions: true`: a layer's registry is
|
|
@@ -22,7 +22,7 @@ export const makeRemoteDefinitions = (context, protocols, opts = {}) => {
|
|
|
22
22
|
const key = project ?? '';
|
|
23
23
|
let entry = cache.get(key);
|
|
24
24
|
if (entry == null) {
|
|
25
|
-
const loading = (async () => scopedRegistryOf(await context.entrypoint(protocols.schema.list).call({
|
|
25
|
+
const loading = (async () => scopedSchemaHelper.scopedRegistryOf(await context.entrypoint(protocols.schema.list).call({
|
|
26
26
|
query: project != null ? { project } : {}, timeout: opts.timeout,
|
|
27
27
|
})))();
|
|
28
28
|
entry = loading;
|
package/build/definitions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../src/definitions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../src/definitions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAM7F,MAAM,KAAK,GAAG,CAAmB,MAAS,EAAK,EAAE,CAC/C,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAM,CAAA;AAE5F;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,OAAU,EAAE,SAA4B,EAAE,IAAI,GAA6B,EAAE,EAC1D,EAAE;IACrB,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,MAAM,CAAA;IACtC,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,mBAAmB,CAAC,oBAAoB,CAAC,CAAA;IACrD,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,GAAG,EAAyC,CAAA;IAE9D,MAAM,UAAU,GAAG,GAAS,EAAE;QAC5B,KAAK,CAAC,KAAK,EAAE,CAAA;QACb,IAAI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AI,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;YACjC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAA;YACrF,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QACpC,CAAC;QAED,UAAU;KACX,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { CommitEvent, PlanningFacade, TransitionReceiptView, Workcard } from '@owlmeans/planning';
|
|
2
|
+
/** What one set of mirror stores learns from the server: commit frames, receipts and cards read. */
|
|
3
|
+
export interface PlanningMirror {
|
|
4
|
+
/**
|
|
5
|
+
* Fold one commit frame into the mirror.
|
|
6
|
+
*
|
|
7
|
+
* - An OLDER `seq` never overwrites a newer record — frames and list answers race.
|
|
8
|
+
* - A committed `delete` REMOVES the row and every link touching it (and, for a project, the rows
|
|
9
|
+
* under it — the server purged them in the same fold).
|
|
10
|
+
* - A frame for an id the store never saw still writes a row: a card created in another tab
|
|
11
|
+
* appears here without waiting for the next list.
|
|
12
|
+
* - A `failed` commit leaves the card alone; the reason is recorded in the commit store.
|
|
13
|
+
*
|
|
14
|
+
* A frame from a cross-process bus carries ids only. When `record` is absent the card is re-read
|
|
15
|
+
* through `facade`; without one there is nothing to write but the commit itself.
|
|
16
|
+
*/
|
|
17
|
+
applyCommitEvent: (event: CommitEvent, facade?: PlanningFacade) => Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Mark a receipt in the mirror the moment the server answers it.
|
|
20
|
+
*
|
|
21
|
+
* A pending transition raises the card's `head` to its `seq`, so `head > seq` — the model's
|
|
22
|
+
* `pending()` — is true before any frame arrives. A receipt that already carries the committed
|
|
23
|
+
* card writes it; a committed delete drops the row.
|
|
24
|
+
*/
|
|
25
|
+
applyReceipt: (receipt: TransitionReceiptView) => Promise<void>;
|
|
26
|
+
/** Write cards the caller read on its own, under the same newer-fold-wins rule as a commit. */
|
|
27
|
+
applyCards: (cards: Workcard[]) => Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/events/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAEtG,oGAAoG;AACpG,MAAM,WAAW,cAAc;IAC7B;;;;;;;;;;;;OAYG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAChF;;;;;;OAMG;IACH,YAAY,EAAE,CAAC,OAAO,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/D,+FAA+F;IAC/F,UAAU,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/events/types.ts"],"names":[],"mappings":""}
|
package/build/events.d.ts
CHANGED
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
import { type CommitEvent, type PlanningFacade, type TransitionReceiptView, type Workcard } from '@owlmeans/planning';
|
|
2
|
+
import type { PlanningMirror } from './events/types.js';
|
|
2
3
|
import type { PlanningStores } from './types.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* - A committed `delete` REMOVES the row and every link touching it (and, for a project, the rows
|
|
8
|
-
* under it — the server purged them in the same fold).
|
|
9
|
-
* - A frame for an id the store never saw still writes a row: a card created in another tab
|
|
10
|
-
* appears here without waiting for the next list.
|
|
11
|
-
* - A `failed` commit leaves the card alone; the reason is recorded in the commit store.
|
|
12
|
-
*
|
|
13
|
-
* A frame from a cross-process bus carries ids only. When `record` is absent the card is re-read
|
|
14
|
-
* through `facade`; without one there is nothing to write but the commit itself.
|
|
15
|
-
*/
|
|
4
|
+
export declare const makePlanningMirror: (stores: PlanningStores) => PlanningMirror;
|
|
5
|
+
/** The mirror of one set of stores — one per stores object. */
|
|
6
|
+
export declare const planningMirrorOf: (target: PlanningStores) => PlanningMirror;
|
|
7
|
+
/** @deprecated compat:factory-refactor — use `planningMirrorOf(stores).applyCommitEvent(…)` */
|
|
16
8
|
export declare const applyCommitEvent: (stores: PlanningStores, event: CommitEvent, facade?: PlanningFacade) => Promise<void>;
|
|
9
|
+
/** @deprecated compat:factory-refactor — use `planningMirrorOf(stores).applyReceipt(…)` */
|
|
10
|
+
export declare const applyReceipt: (stores: PlanningStores, receipt: TransitionReceiptView) => Promise<void>;
|
|
17
11
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* A pending transition raises the card's `head` to its `seq`, so `head > seq` — the model's
|
|
21
|
-
* `pending()` — is true before any frame arrives. A receipt that already carries the committed
|
|
22
|
-
* card writes it; a committed delete drops the row.
|
|
12
|
+
* @deprecated compat:factory-refactor — use `planningMirrorOf(stores).applyCards(…)`. Only `cards` is
|
|
13
|
+
* read, so a narrower stores object still works here.
|
|
23
14
|
*/
|
|
24
|
-
export declare const applyReceipt: (stores: PlanningStores, receipt: TransitionReceiptView) => Promise<void>;
|
|
25
|
-
/** Write cards the caller read on its own, under the same newer-fold-wins rule as a commit. */
|
|
26
15
|
export declare const applyCards: (stores: Pick<PlanningStores, 'cards'>, cards: Workcard[]) => Promise<void>;
|
|
27
16
|
//# sourceMappingURL=events.d.ts.map
|
package/build/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AACA,OAAO,EAA+C,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,KAAK,qBAAqB,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAClK,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAGhD,eAAO,MAAM,kBAAkB,WAAY,cAAc,KAAG,cA+F3D,CAAA;AAED,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB,4CAAyC,CAAA;AAEtE,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB,WACnB,cAAc,SAAS,WAAW,WAAW,cAAc,KAClE,OAAO,CAAC,IAAI,CAAmE,CAAA;AAElF,2FAA2F;AAC3F,eAAO,MAAM,YAAY,WAAkB,cAAc,WAAW,qBAAqB,KAAG,OAAO,CAAC,IAAI,CAClD,CAAA;AAEtD;;;GAGG;AACH,eAAO,MAAM,UAAU,WAAkB,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,SAAS,QAAQ,EAAE,KAAG,OAAO,CAAC,IAAI,CACpC,CAAA"}
|