@niscorp/moss 0.9.0 → 0.9.2
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/CHANGELOG.md +22 -0
- package/DESIGN.md +1 -1
- package/DOCS.md +95 -25
- package/dist/{chunk-WTWRLOPK.js → chunk-5ZB7FZ2J.js} +3 -3
- package/dist/{chunk-WTWRLOPK.js.map → chunk-5ZB7FZ2J.js.map} +1 -1
- package/dist/{chunk-E6YAYR7G.cjs → chunk-6ZWMC2OV.cjs} +6 -6
- package/dist/{chunk-E6YAYR7G.cjs.map → chunk-6ZWMC2OV.cjs.map} +1 -1
- package/dist/{chunk-UUOATPZ7.js → chunk-FUJRIO4N.js} +20 -4
- package/dist/chunk-FUJRIO4N.js.map +1 -0
- package/dist/{chunk-TGKDS2T7.cjs → chunk-IY5BOFLK.cjs} +222 -37
- package/dist/chunk-IY5BOFLK.cjs.map +1 -0
- package/dist/{chunk-LKTS4PCD.cjs → chunk-KMZT6NVL.cjs} +23 -7
- package/dist/chunk-KMZT6NVL.cjs.map +1 -0
- package/dist/{chunk-L2GHVTJW.cjs → chunk-KVXP6OTW.cjs} +88 -81
- package/dist/chunk-KVXP6OTW.cjs.map +1 -0
- package/dist/{chunk-3RIWTXGI.cjs → chunk-NCQBGK3E.cjs} +6 -2
- package/dist/chunk-NCQBGK3E.cjs.map +1 -0
- package/dist/{chunk-4ZGAFZGS.js → chunk-TKXYPO2Y.js} +6 -2
- package/dist/chunk-TKXYPO2Y.js.map +1 -0
- package/dist/{chunk-TLNRFAQ6.js → chunk-UTFOMFCH.js} +207 -22
- package/dist/chunk-UTFOMFCH.js.map +1 -0
- package/dist/{chunk-Y7PRASR3.js → chunk-WMIJU6ZZ.js} +12 -5
- package/dist/chunk-WMIJU6ZZ.js.map +1 -0
- package/dist/client/node.d.cts +2 -2
- package/dist/client/node.d.ts +2 -2
- package/dist/client.cjs +5 -5
- package/dist/client.d.cts +7 -4
- package/dist/client.d.ts +7 -4
- package/dist/client.js +2 -2
- package/dist/{env-CY8EGWnD.d.cts → env-3qvvochI.d.cts} +3 -1
- package/dist/{env-DEPqqHEb.d.ts → env-DBPDpfU8.d.ts} +3 -1
- package/dist/index.cjs +15 -15
- package/dist/index.js +3 -3
- package/dist/{messages-CSwCJgH3.d.cts → messages-OSnNJL80.d.cts} +2 -0
- package/dist/{messages-CSwCJgH3.d.ts → messages-OSnNJL80.d.ts} +2 -0
- package/dist/node.cjs +8 -8
- package/dist/node.js +4 -4
- package/dist/protocol.cjs +5 -5
- package/dist/protocol.d.cts +1 -1
- package/dist/protocol.d.ts +1 -1
- package/dist/protocol.js +1 -1
- package/dist/terminal/dom/index.d.cts +2 -2
- package/dist/terminal/dom/index.d.ts +2 -2
- package/dist/terminal/index.cjs +3 -3
- package/dist/terminal/index.d.cts +2 -2
- package/dist/terminal/index.d.ts +2 -2
- package/dist/terminal/index.js +2 -2
- package/dist/terminal/react/index.d.cts +2 -2
- package/dist/terminal/react/index.d.ts +2 -2
- package/dist/terminal/react/server.d.cts +2 -2
- package/dist/terminal/react/server.d.ts +2 -2
- package/dist/terminal/tty/index.d.cts +2 -2
- package/dist/terminal/tty/index.d.ts +2 -2
- package/dist/terminal/vue/index.d.cts +2 -2
- package/dist/terminal/vue/index.d.ts +2 -2
- package/dist/terminal/vue/server.d.cts +2 -2
- package/dist/terminal/vue/server.d.ts +2 -2
- package/dist/unverified.cjs +3 -3
- package/dist/unverified.js +2 -2
- package/dist/vite.cjs +9 -9
- package/dist/vite.js +4 -4
- package/package.json +13 -13
- package/dist/chunk-3RIWTXGI.cjs.map +0 -1
- package/dist/chunk-4ZGAFZGS.js.map +0 -1
- package/dist/chunk-L2GHVTJW.cjs.map +0 -1
- package/dist/chunk-LKTS4PCD.cjs.map +0 -1
- package/dist/chunk-TGKDS2T7.cjs.map +0 -1
- package/dist/chunk-TLNRFAQ6.js.map +0 -1
- package/dist/chunk-UUOATPZ7.js.map +0 -1
- package/dist/chunk-Y7PRASR3.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @niscorp/moss
|
|
2
2
|
|
|
3
|
+
## 0.9.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a740e2a: A terminal on a phone no longer loses what is pressed around a reconnect, and either end finds out when a socket has died.
|
|
8
|
+
- **Connected means the screen arrived.** The wire reads `'open'` from the connection's first frame, not from the socket opening: an event sent in between reached a server that was not listening yet, and was lost without a word. A server that serves no shell now sends an empty frame too.
|
|
9
|
+
- **The page coming back is a check.** `WireEnv.onResume` (in `browserEnv`: `visibilitychange`, a `pageshow` from the back-forward cache, `online`) makes a closed connection again at once instead of after the backoff, and asks an open one for its screen (`resync`) while its status stays `'open'`; one that answers nothing within 2 seconds, or closes meanwhile, is replaced at once.
|
|
10
|
+
- **A quiet socket is checked too.** After 25 seconds of hearing nothing, while the page is visible (`WireEnv.visible`), the wire sends a `ping`, which the server answers `pong`; no answer within 10 seconds replaces the socket. Nothing waits for the answer meanwhile. `ping` comes without a protocol of its own: a server from before it answers `invalid_message`, which counts as an answer.
|
|
11
|
+
- **An event pressed while nothing can carry it is kept**, with the tree of its canvas, and sent once that canvas comes back exactly as it was — all kept events together, in order, or none of them; a press on the live screen, or 5 seconds, or a change of who is signed in, drops them. `droppedEvents()` on what `createWire` returns counts them (optional on the `Wire` type, so a stand-in wire an app makes itself still fits).
|
|
12
|
+
- **The server finds connections that are gone.** The Node transport pings every connection every 30 seconds (the WebSocket protocol's own ping, which a browser that is awake answers by itself, whatever its moss) and closes one that has not answered the last ping. A phone that went away without closing no longer keeps its shell for nobody, or its place under `anonymousShellMax`, until TCP gives up, and a signed-in person's shell starts its idle time. A phone that has put the page away answers nothing either: its shell for nobody is disposed after about a minute instead of whenever TCP gave up.
|
|
13
|
+
- **A screen sent again draws nothing.** A frame or canvas identical to the one on screen notifies no subscriber: a page coming back does not redraw an unchanged app, and a reconnect redraws no canvas that did not change.
|
|
14
|
+
|
|
15
|
+
**What to change:** nothing. An app that wants to tell the person a press was dropped reads `wire.droppedEvents()`. Update the server before its pages: a terminal of this release against a server of an earlier one logs an `invalid_message` warning for each ping, and against one that serves no shell it stays `'connecting'`.
|
|
16
|
+
|
|
17
|
+
## 0.9.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- efd5d03: The docs say what a boot does with the tables since `nisc migrate`: it checks them and refuses to start while a migration is pending, and applies them only under `migrations: 'apply'`. The sessions table, the boot order, a feature's sequences and how an old database adopts the ledger now read that way.
|
|
22
|
+
|
|
23
|
+
**What to change:** nothing. Documentation only.
|
|
24
|
+
|
|
3
25
|
## 0.9.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/DESIGN.md
CHANGED
|
@@ -320,7 +320,7 @@ that made the table:
|
|
|
320
320
|
|
|
321
321
|
| Table | Whose | Where its statements are written | What is somewhere else, and why |
|
|
322
322
|
|---|---|---|---|
|
|
323
|
-
| `sessions` | `identity` | `identity/sessions.ts`: five statements straight to the pool, before anybody is signed in | Its table is made in `data`'s one migration run, from a sequence `identity` declares |
|
|
323
|
+
| `sessions` | `identity` | `identity/sessions.ts`: five statements straight to the pool, before anybody is signed in | Its table is made in `data`'s one migration run (`migrateTables`, or boot under `migrations: 'apply'`; otherwise boot only checks it), from a sequence `identity` declares |
|
|
324
324
|
| `moss_generation` | `data` | `data/own-entries.ts`: two entries, one that reads and one that moves | `artifactory` decides when it moves (`artifactory/generation.ts`), through a function `data` hands over |
|
|
325
325
|
| `artifact_saves`, `artifacts` | `artifactory` | `artifactory/saves.ts`: three vex entries and the row rule they run under, replayed through a function `data` hands over (`Data.artifactEntries`) | The two tables are made by the core's sequence (`data/tables.ts`, `nisc.moss/5`). Their rows are somebody's, unlike the pointer's: the entries are replayed with the caller's scope, and vex keeps every read and write to the rows whose `principal` is the caller's `userId`. What is published for everybody is the rows of the principal `*`, replayed with that as the `userId` by the server's own code and by no caller. Moss updates and deletes no row, so a stored body is not rewritten when a grammar moves: it is brought to the current grammars where it is read |
|
|
326
326
|
| `integrations`, `integration_actions` | the `integrations` feature | `integrations/entries.ts`: vex entries, replayed through the seam the feature is handed | The two tables are made by the core's own sequence (`data/tables.ts`, `nisc.moss`): that is the history every database has run, and it is not edited. The documents stored in `integration_actions` are brought to the current grammars by `data`, which holds the pool, when the feature asks through its seam |
|
package/DOCS.md
CHANGED
|
@@ -874,6 +874,14 @@ it does nothing else:
|
|
|
874
874
|
has every place, and every other visitor with nobody signed in is sent
|
|
875
875
|
`at_capacity` until one of those closes. People who are signed in go on
|
|
876
876
|
being served.
|
|
877
|
+
- A connection whose other end went away without closing — a phone killed, out
|
|
878
|
+
of battery, out of signal — keeps its place for at most a minute. The Node
|
|
879
|
+
transport sends every connection the WebSocket protocol's own ping every 30
|
|
880
|
+
seconds, and closes one that has not answered the last one. A browser that is
|
|
881
|
+
awake answers it by itself, whatever its moss; one that is asleep (a phone
|
|
882
|
+
that has put the page away) does not, and its connection is closed too. That
|
|
883
|
+
close is like any other: the place is given back, a shell for nobody is
|
|
884
|
+
disposed, and a signed-in person's shell starts its idle time.
|
|
877
885
|
- It is counted by the process that takes the connection. A deployment of N
|
|
878
886
|
processes holds up to N times the limit.
|
|
879
887
|
- Moss builds no limit for each address, because the address is not moss's
|
|
@@ -921,9 +929,9 @@ the row.
|
|
|
921
929
|
this is for signing out somebody else (an owner removes a member).
|
|
922
930
|
No exported call deletes one token and leaves the principal's others.
|
|
923
931
|
- Who a token is, is asked of the server: `server.principalOf(token)`. The
|
|
924
|
-
table is made by `
|
|
925
|
-
`session: 'sessions'` and only then.
|
|
926
|
-
credential.
|
|
932
|
+
table is made by `migrateTables` (`nisc migrate`), and by `createServer`
|
|
933
|
+
under `migrations: 'apply'`, under `session: 'sessions'` and only then.
|
|
934
|
+
Nothing else is exported of the stored credential.
|
|
927
935
|
- **They are for a deployment whose `session` is `'sessions'`, and for no
|
|
928
936
|
other.** The stored sessions are what that verifier reads, and nothing else
|
|
929
937
|
reads them.
|
|
@@ -1036,7 +1044,8 @@ parsing them, stores them stamped current, and refuses a bundle built on newer
|
|
|
1036
1044
|
grammars than the host (*the host must be updated first*). Reads upgrade too:
|
|
1037
1045
|
a row another process wrote since boot is read current, and one it cannot read
|
|
1038
1046
|
is left out with a logged sentence. Migration 1 of each sequence is the DDL
|
|
1039
|
-
boots used to run, so a database from before the ledger adopts on its next
|
|
1047
|
+
boots used to run, so a database from before the ledger adopts on its next
|
|
1048
|
+
`nisc migrate`.
|
|
1040
1049
|
|
|
1041
1050
|
`shellFrameDelta` and `socketCompression` are the two wire-size knobs. They are
|
|
1042
1051
|
environment settings, not manifest ones — an operational decision about a
|
|
@@ -1076,7 +1085,8 @@ does nothing. Returns a Hono app extended with the `MossServer` members below.
|
|
|
1076
1085
|
`createServer` wires, and answers no question of its own (`src/server/`). In
|
|
1077
1086
|
order: the manifest is read and frozen; who a token is is resolved
|
|
1078
1087
|
(`runtime.session`; unset, the boot is refused here, before a table exists);
|
|
1079
|
-
the tables are migrated
|
|
1088
|
+
the tables are checked (migrated under `migrations: 'apply'`) and the data
|
|
1089
|
+
module stands; the running manifest is
|
|
1080
1090
|
created, which is the boot check, and the data module is told to ask it for an
|
|
1081
1091
|
entry (it compiles the ones it holds, and one vex cannot run refuses the boot);
|
|
1082
1092
|
identity; the server's own routes (the
|
|
@@ -1785,8 +1795,9 @@ app share a name. What a feature routes, keeps and serves is documented under
|
|
|
1785
1795
|
its entry point.
|
|
1786
1796
|
|
|
1787
1797
|
A feature names the tables that are its own and the strata sequences that make
|
|
1788
|
-
them. The sequences are
|
|
1789
|
-
starts
|
|
1798
|
+
them. The sequences are checked in the one ledgered run, before the feature
|
|
1799
|
+
starts (migrated there under `migrations: 'apply'`), and `migrateTables`
|
|
1800
|
+
applies them. A feature reads and writes those
|
|
1790
1801
|
tables through vex, as an app does, with entries of its own: they are seeded into a
|
|
1791
1802
|
cache of their own, held by an engine no route is handed, so `/api/vex`
|
|
1792
1803
|
answers `cache_miss` for one of them whatever the charter grants whoever asks,
|
|
@@ -2157,8 +2168,8 @@ server.nudge('usr_ada', 'notes-changed');
|
|
|
2157
2168
|
has `upgrade` (below) and `seal`. `seal` is set by the socket, on a
|
|
2158
2169
|
connection whose browser holds a seal: a transport leaves it out.
|
|
2159
2170
|
- `ServerMessage` (`@niscorp/moss/protocol`) — what the server sends: `hello | catalog | frame | render |
|
|
2160
|
-
render-delta | session | error`.
|
|
2161
|
-
- What a terminal sends is `event | publish | resync | reset | back | popTo`,
|
|
2171
|
+
render-delta | session | pong | error`.
|
|
2172
|
+
- What a terminal sends is `event | publish | resync | reset | back | popTo | ping`,
|
|
2162
2173
|
each with exactly the fields the protocol names (`src/protocol/messages.ts`;
|
|
2163
2174
|
the type of these is not exported, a terminal written by hand sends the
|
|
2164
2175
|
object).
|
|
@@ -2183,6 +2194,10 @@ server.nudge('usr_ada', 'notes-changed');
|
|
|
2183
2194
|
with whole frames, the state both ends can always agree on. Distinct from
|
|
2184
2195
|
`reset`: the shell is fine, only this connection's copy drifted, so nothing
|
|
2185
2196
|
is torn down and no other terminal notices.
|
|
2197
|
+
- `ping` is answered `pong`, with a shell or without one, and reaches no shell:
|
|
2198
|
+
it is how a terminal finds out whether a socket that has gone quiet is still
|
|
2199
|
+
there. It came without a protocol of its own: a server from before it answers
|
|
2200
|
+
`invalid_message`, which a terminal takes as an answer all the same.
|
|
2186
2201
|
- `reset` names no canvas, deliberately: it is the recovery for a session whose
|
|
2187
2202
|
canvases are the broken thing, so it must not travel through one. It is
|
|
2188
2203
|
protocol-level, not app-level — no action declares it and no charter grants
|
|
@@ -2221,7 +2236,9 @@ server.nudge('usr_ada', 'notes-changed');
|
|
|
2221
2236
|
for as long as it is refused.
|
|
2222
2237
|
- `4426`: the two ends speak protocols the other cannot (below).
|
|
2223
2238
|
- `error` codes: `invalid_token`, `session_failed`, `at_capacity`,
|
|
2224
|
-
`client_too_old`, `server_too_old`, `no_shell` (the app serves no shell
|
|
2239
|
+
`client_too_old`, `server_too_old`, `no_shell` (the app serves no shell: it
|
|
2240
|
+
sends an empty `frame` once it listens, as a server with a shell sends its
|
|
2241
|
+
first, and answers every message with this),
|
|
2225
2242
|
`invalid_message`
|
|
2226
2243
|
(what was sent is not JSON, not one of the messages above, or one of them
|
|
2227
2244
|
with a field it does not have: nothing of it is acted on), `message_failed`
|
|
@@ -2879,7 +2896,12 @@ goes around moss: see [`FunctionSession`](#functionsession).
|
|
|
2879
2896
|
identical either way. See [Wire size](#wire-size). `env` defaults to
|
|
2880
2897
|
`browserEnv()`, and `url` (the socket's address) to `env.defaultUrl()`.
|
|
2881
2898
|
- `WireEnv` — the host seam: `{ tokens: { load, save, clear, held?, key? },
|
|
2882
|
-
socket({ url, offered }), defaultUrl() }`.
|
|
2899
|
+
socket({ url, offered }), defaultUrl(), onResume?, visible? }`. `onResume(resumed)`
|
|
2900
|
+
calls `resumed` when the page is shown again or the network comes back and
|
|
2901
|
+
returns the unsubscribe; `browserEnv` listens for `visibilitychange`, a
|
|
2902
|
+
`pageshow` from the back-forward cache and `online`. `visible()` says
|
|
2903
|
+
whether the page is on screen (`browserEnv`: not `document.hidden`); absent,
|
|
2904
|
+
it always is. `nodeEnv` has neither. The socket API is WHATWG-standard
|
|
2883
2905
|
in every host (browser, Node ≥22, Bun); an env only constructs it —
|
|
2884
2906
|
`new WebSocket(url, offered)`. What is offered is who the terminal is, so an
|
|
2885
2907
|
env that drops it connects as nobody. `held()` is for a host whose browser
|
|
@@ -2913,15 +2935,22 @@ goes around moss: see [`FunctionSession`](#functionsession).
|
|
|
2913
2935
|
- **A page with nothing left to happen opens no socket.** When `initial.live`
|
|
2914
2936
|
is `false`, the wire does not connect and `status()` is `'static'`. `reset()`,
|
|
2915
2937
|
or a token arriving, connects after all.
|
|
2916
|
-
- `Wire` — `{ subscribe, snapshot, status, dispatch(canvas,
|
|
2917
|
-
reset, back, popTo(canvas, instance), dispose }`.
|
|
2918
|
-
`WireSnapshot`, `{ frame, trees }`, where `trees` is a map
|
|
2919
|
-
to its tree. `status()` is a `WireStatus`,
|
|
2938
|
+
- `Wire` — `{ subscribe, snapshot, status, droppedEvents?, dispatch(canvas,
|
|
2939
|
+
event), publish, reset, back, popTo(canvas, instance), dispose }`.
|
|
2940
|
+
`snapshot()` is a `WireSnapshot`, `{ frame, trees }`, where `trees` is a map
|
|
2941
|
+
from a canvas's id to its tree. `status()` is a `WireStatus`,
|
|
2920
2942
|
`'connecting' | 'open' | 'closed' | 'incompatible' | 'static'`, and changes notify subscribers like
|
|
2921
2943
|
snapshot changes do (a renderer must be able to tell a dead socket from an
|
|
2922
|
-
empty app).
|
|
2923
|
-
|
|
2924
|
-
|
|
2944
|
+
empty app). It is `'open'` from the connection's first frame, not from the
|
|
2945
|
+
socket opening: the server sends that frame once it listens, and a message
|
|
2946
|
+
before it would be lost. `droppedEvents()` is how many events the wire kept
|
|
2947
|
+
while it could not send them and then dropped (below); it only grows, and
|
|
2948
|
+
subscribers are told when it does. `createWire` always gives it; it is
|
|
2949
|
+
optional on the type so that a wire an app makes itself, a stand-in in a
|
|
2950
|
+
check, need not count. Hand it to a renderer.
|
|
2951
|
+
|
|
2952
|
+
Reconnect is exponential backoff with jitter, capped at 30s (or at once when
|
|
2953
|
+
the page comes back, below), reset when a
|
|
2925
2954
|
connection is served its first frame and on any principal change (a session
|
|
2926
2955
|
grant or a close-code recovery starts the backoff clean). Not when the socket
|
|
2927
2956
|
opens: a server opens a connection before it refuses it (`4503`, `4500`), so
|
|
@@ -2950,13 +2979,54 @@ already, may have carried another principal, or may be a connect still in
|
|
|
2950
2979
|
flight when `reset()` was called; whichever, nothing it says afterwards is
|
|
2951
2980
|
heard, and its closing schedules nothing.
|
|
2952
2981
|
|
|
2953
|
-
**
|
|
2954
|
-
|
|
2955
|
-
`
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
`
|
|
2982
|
+
**When the page comes back, the wire checks its socket.** A phone that puts a
|
|
2983
|
+
page away may kill its socket without the page hearing of it until later. On
|
|
2984
|
+
`onResume`, a closed connection is made again at once instead of after the
|
|
2985
|
+
backoff, and one that still reads open is sent `{ type: 'resync' }`. Until
|
|
2986
|
+
anything is heard on it, events are kept (below) and `publish`, `back` and
|
|
2987
|
+
`popTo` are dropped; one that answers nothing within 2 seconds is replaced, and
|
|
2988
|
+
one that closes meanwhile is made again at once. `status()` stays `'open'`
|
|
2989
|
+
through it: on a live socket it is over in a round trip, and saying otherwise
|
|
2990
|
+
would flicker every target on every return to the page. `reset()` is still sent
|
|
2991
|
+
on that socket. A connection still being made is left to finish.
|
|
2992
|
+
|
|
2993
|
+
**A socket that has gone quiet is pinged.** A socket can also die while its
|
|
2994
|
+
page is on screen — a network that switches, a router that drops a connection
|
|
2995
|
+
that says nothing. When nothing has been heard on an open connection for 25
|
|
2996
|
+
seconds and `visible()` is not `false`, the wire sends `{ type: 'ping' }`.
|
|
2997
|
+
Anything heard is the answer; one that has heard nothing 10 seconds later is
|
|
2998
|
+
replaced, and one that closes meanwhile is made again at once. Unlike a page
|
|
2999
|
+
coming back, nothing is kept while a ping is answered: the screen of a quiet
|
|
3000
|
+
socket is current, so presses, `back` and `publish` are sent as ever, and one
|
|
3001
|
+
sent onto a socket that turns out dead is lost. Nobody waits on the answer, so
|
|
3002
|
+
it is given long enough to spare a socket that works on a slow link. A server
|
|
3003
|
+
that keeps talking is never pinged; a hidden page is not pinged, and is checked
|
|
3004
|
+
when it comes back. 25 seconds is below the 30 to 60 seconds after which
|
|
3005
|
+
proxies and NATs commonly drop a quiet connection, so the ping also keeps it
|
|
3006
|
+
from being dropped.
|
|
3007
|
+
|
|
3008
|
+
**A screen sent again draws nothing.** A reconnect, and a page coming back,
|
|
3009
|
+
is sent every screen whole. A frame or a canvas whose text is the same as the
|
|
3010
|
+
one on screen changes nothing and tells no subscriber; a sign-in or sign-out,
|
|
3011
|
+
which blanks the screen, draws the next one whatever it is.
|
|
3012
|
+
|
|
3013
|
+
**Nothing is sent on a socket that is not open. An event is kept, and sent
|
|
3014
|
+
only onto the screen it was pressed on.** A server-drawn page is on screen
|
|
3015
|
+
before its socket is, and a page that comes back is on screen before its
|
|
3016
|
+
connection is, so there is a moment in which something can be pressed with
|
|
3017
|
+
nothing to send it over. `dispatch` then keeps the event with the tree of the
|
|
3018
|
+
canvas it names, as the terminal showed it. Once the connection is open and
|
|
3019
|
+
every canvas the kept events name has come back on it, they are sent, in the
|
|
3020
|
+
order they were pressed, if each of those canvases came back exactly as it
|
|
3021
|
+
was; otherwise all of them are dropped. They are also dropped when that has
|
|
3022
|
+
not happened 5 seconds after the first was pressed, and when a sign-in or
|
|
3023
|
+
sign-out changes who the terminal is. Dropped together, because an intention
|
|
3024
|
+
replayed against a screen that has moved since is worse than one lost, and so
|
|
3025
|
+
is half of a sequence. `droppedEvents()` counts them, for an app that tells
|
|
3026
|
+
the person. An event pressed while nothing can carry it joins the kept ones;
|
|
3027
|
+
one pressed once the connection is open drops them and is sent, because it was
|
|
3028
|
+
pressed on the screen the person sees now. `publish`, `back` and `popTo` name
|
|
3029
|
+
no canvas to check against, and are dropped unless the connection is open.
|
|
2960
3030
|
|
|
2961
3031
|
`back()` sends `{ type: 'back' }` and nothing else — no location is held here,
|
|
2962
3032
|
so what comes back is whatever canvases moved, over the same stream every other
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spanClock } from './chunk-QAHDSRPK.js';
|
|
2
|
-
import { CLOSE_SIGNED_OUT, encodeDelta, frameHash } from './chunk-
|
|
2
|
+
import { CLOSE_SIGNED_OUT, encodeDelta, frameHash } from './chunk-TKXYPO2Y.js';
|
|
3
3
|
import { verifyCharter, resolvePrincipal, normalizeRole } from '@niscorp/charter';
|
|
4
4
|
import { LayoutNodeSchema, ActionFragmentSchema, ActionDefinitionSchema, collectChannels, auditAction, canvasTreeOf, NovaEventSchema, createComponentRegistry, createLayoutStore, createShell } from '@niscorp/nova';
|
|
5
5
|
import { chainCycles, walkNodes, isRecord } from '@niscorp/nova/reflect';
|
|
@@ -919,5 +919,5 @@ var buildShell = async (host, asked) => {
|
|
|
919
919
|
};
|
|
920
920
|
|
|
921
921
|
export { FRAME_LAYOUT_REF, GENERATED_ID_PREFIX, SHELL_GONE, actionLayoutRef, actionOfLayoutRef, attach, buildShell, candidateOf, canvasLayoutRef, canvasesOf, charterOverFunctions, defineApp, draftedIn, endShell, endlessChains, entriesOf, entryMisfits, freezeDeep, functionsIn, functionsWarning, holdGranted, layoutMisfits, layoutNameRefusal, layoutsOf, receiveManifest, refusalOf, sessionOn, treeOf, variantLayouts, verifiedAtBoot, verifyApp, verifyManifest, wholeShellOf, withFragments, withLayoutInPlace, withVariants };
|
|
922
|
-
//# sourceMappingURL=chunk-
|
|
923
|
-
//# sourceMappingURL=chunk-
|
|
922
|
+
//# sourceMappingURL=chunk-5ZB7FZ2J.js.map
|
|
923
|
+
//# sourceMappingURL=chunk-5ZB7FZ2J.js.map
|