@graview/ship 0.1.14 → 0.1.16

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
@@ -139,7 +139,7 @@ socket as on the routes, and so does its id (FR-55): no record id the seat may n
139
139
  anything it is sent — a welcome, ops, an ack, a conflict, a route's answer. A seen record's
140
140
  field that names a hidden one is cleared, or, when the record cannot do without that field,
141
141
  the record is withheld from the seat whole; a withheld op keeps no hidden id in any
142
- primitive. `seatLens(store, principal)` is that judgement, the one every surface reads.
142
+ primitive. `seatLens(store, principal)` is that judgment, the one every surface reads.
143
143
 
144
144
  A host that hibernates — a Durable Object wakes on a message with no closure left — holds
145
145
  each socket's state itself. `liveProtocol({ store })` (from `@graview/ship/runtime`) is the
@@ -336,7 +336,7 @@ any batch not shaped as a `Store` mints it, `batch:<tag>:<n>` or `undo:<tag>:<n>
336
336
  shape. A host's own store mints there too with `new Store({ batchIds: serverBatchIds() })`,
337
337
  so nothing a host lands itself — a migration, a seed, an agent's RPC — is in a batch a client
338
338
  could have named first; `createStoreHandler` does this for the store it opens.
339
- `authoredBy(author, seat)` is the judgement of "the same seat". A batch's tag belongs to the
339
+ `authoredBy(author, seat)` is the judgment of "the same seat". A batch's tag belongs to the
340
340
  first seat that landed under it, so nobody names another client's next batch
341
341
  (`batch:<her tag>:<n+1>`) before she does: a batch under somebody else's tag is refused
342
342
  `invalid`, and so is one under the store's own minting tag (`store.batchTag`), so even a held
@@ -353,9 +353,10 @@ host's.
353
353
  |---|---|
354
354
  | `forbidden` | the seat may not: the policy, an agent's declared acts, a module turned off (for the host's own seat); `wouldNeed` names the roles that could, when the policy knows them |
355
355
  | `missing` | what the call names is not there for this seat: a record that does not exist or one it may not see — answered alike, so a refusal never tells a guessed id from a real one (FR-55) — or a batch to take back |
356
- | `invalid` | the call as asked does not fit: its arguments, the kind, a rule, a call before `hello` |
356
+ | `invalid` | the call as sent does not fit: its arguments, one the act does not take, a call that changes nothing, the kind, an invariant, a call before `hello` |
357
357
  | `limit` | the host's hard cap: the call can never succeed as asked, however long the caller waits |
358
358
  | `unavailable` | the host takes no changes for a while and cannot say how long — a room read-only while it is checked, a write to storage that failed; the one refusal that is not final |
359
+ | `refused` | the act's own rule said no to a call that was well formed: a document act's condition, a TypeScript mutation's `ActRefusal` (FR-119) |
359
360
 
360
361
  `openRemote`'s `remote.onRefusal((sentence, refusal) => …)` is handed the reason beside the
361
362
  sentence, and `remote.send` throws a `RemoteRefusedError` carrying it. What a person reads is
@@ -31,7 +31,7 @@ export interface BrowserAdapterOptions {
31
31
  * writes — the snapshot, the append-only log, the stored schema version —
32
32
  * as three `localStorage` entries per scope. Not the epochs (FR-27): each
33
33
  * keeps a whole copy of the graph as its base, and a second copy in a few
34
- * megabytes ran a two-thousand-talk programme out of room; a page's store
34
+ * megabytes ran a two-thousand-talk program out of room; a page's store
35
35
  * is verified by the host it is served from, not in the page. It slots into `openStore` unchanged, migrations included, so a
36
36
  * sample app that remembers is the
37
37
  * same lifecycle as a deployment that does, minus the server.
@@ -64,7 +64,7 @@ export declare function browserStartsFresh(location?: {
64
64
  readonly webdriver?: boolean;
65
65
  }): boolean;
66
66
  /**
67
- * Drops `?fresh=1` from the address once it has been honoured, so the seed
67
+ * Drops `?fresh=1` from the address once it has been honored, so the seed
68
68
  * is the FIRST load rather than every load: a reload after starting fresh
69
69
  * must keep what was done since, or "start fresh" is really "stop
70
70
  * remembering".
@@ -3,7 +3,7 @@
3
3
  * writes — the snapshot, the append-only log, the stored schema version —
4
4
  * as three `localStorage` entries per scope. Not the epochs (FR-27): each
5
5
  * keeps a whole copy of the graph as its base, and a second copy in a few
6
- * megabytes ran a two-thousand-talk programme out of room; a page's store
6
+ * megabytes ran a two-thousand-talk program out of room; a page's store
7
7
  * is verified by the host it is served from, not in the page. It slots into `openStore` unchanged, migrations included, so a
8
8
  * sample app that remembers is the
9
9
  * same lifecycle as a deployment that does, minus the server.
@@ -92,7 +92,7 @@ export function browserStartsFresh(location = globalThis
92
92
  return navigator?.webdriver === true;
93
93
  }
94
94
  /**
95
- * Drops `?fresh=1` from the address once it has been honoured, so the seed
95
+ * Drops `?fresh=1` from the address once it has been honored, so the seed
96
96
  * is the FIRST load rather than every load: a reload after starting fresh
97
97
  * must keep what was done since, or "start fresh" is really "stop
98
98
  * remembering".
package/dist/export.d.ts CHANGED
@@ -3,7 +3,7 @@ import type { GraphSnapshot } from "./snapshot.js";
3
3
  /**
4
4
  * THE ANTI-LOCK-IN CLAIM, as a data shape. Everything a deployment is —
5
5
  * the graph, its whole attributed history, and the version it stands at —
6
- * leaves in one JSON-serialisable bundle, and re-imports into any other
6
+ * leaves in one JSON-serializable bundle, and re-imports into any other
7
7
  * deployment of the same declaration: hosted to self-hosted and back.
8
8
  * A tenant who cannot leave was never a customer, only a hostage.
9
9
  */
package/dist/handler.js CHANGED
@@ -362,7 +362,7 @@ function storeHandler(options, adapterName = "held by the host") {
362
362
  asking = await seat();
363
363
  }
364
364
  catch {
365
- // A poller the host does not recognise is still told whether the store is well.
365
+ // A poller the host does not recognize is still told whether the store is well.
366
366
  }
367
367
  }
368
368
  return send(200, {
@@ -64,7 +64,7 @@ export interface LiveSocketState {
64
64
  };
65
65
  }
66
66
  /**
67
- * A SOCKET AS A HOST'S JUDGEMENT IS HANDED IT (`build`, `viaOf`): its
67
+ * A SOCKET AS A HOST'S JUDGMENT IS HANDED IT (`build`, `viaOf`): its
68
68
  * seat resolved to the principal, its channel, and the host's build it
69
69
  * was opened under.
70
70
  */
@@ -1,4 +1,4 @@
1
- import { invert, normalise, writesOf, } from "@graview/core";
1
+ import { invert, normalize, writesOf, } from "@graview/core";
2
2
  import { applyToSnapshot } from "./snapshot.js";
3
3
  /** The single-step chain from a stored version to the declaration's. */
4
4
  export function pendingMigrations(app, storedVersion) {
@@ -34,11 +34,11 @@ export function migrateSnapshot(app, stored, storedVersion, options = {}) {
34
34
  const batch = `migration:${storedVersion}->${app.version ?? storedVersion}`;
35
35
  for (const step of pendingMigrations(app, storedVersion)) {
36
36
  /*
37
- * Normalised, like every other op: a step that clears a field says so
37
+ * Normalized, like every other op: a step that clears a field says so
38
38
  * with a value rather than with an absence, so the inverse it carries is
39
39
  * still there after the log has been through JSON.
40
40
  */
41
- const primitives = step.apply(snapshot).map(normalise);
41
+ const primitives = step.apply(snapshot).map(normalize);
42
42
  snapshot = applyToSnapshot(snapshot, primitives);
43
43
  ops.push({
44
44
  id: nextOpId(`${step.from}-${step.to}`),
@@ -165,7 +165,7 @@ export async function openStore(options) {
165
165
  }
166
166
  adapter.saveMeta?.(scope, { version: target, ...formatStamp() });
167
167
  /*
168
- * Writes are SERIALISED: a second diff's ops never land before the
168
+ * Writes are SERIALIZED: a second diff's ops never land before the
169
169
  * first's snapshot, and a failure is reported rather than swallowed —
170
170
  * an app that thinks it persisted and did not is the worst quiet state.
171
171
  */
package/dist/photos.d.ts CHANGED
@@ -12,7 +12,7 @@ import type { GraphReader } from "@graview/core";
12
12
  * gutter.
13
13
  *
14
14
  * That is a trap this package sets and therefore a trap this package should
15
- * spring. Three defences, in order:
15
+ * spring. Three defenses, in order:
16
16
  *
17
17
  * 1. **Downscale before anything is stored** (`downscale`, in
18
18
  * `@graview/primitives` where a canvas is at hand). Nothing a model is
package/dist/photos.js CHANGED
@@ -11,7 +11,7 @@
11
11
  * gutter.
12
12
  *
13
13
  * That is a trap this package sets and therefore a trap this package should
14
- * spring. Three defences, in order:
14
+ * spring. Three defenses, in order:
15
15
  *
16
16
  * 1. **Downscale before anything is stored** (`downscale`, in
17
17
  * `@graview/primitives` where a canvas is at hand). Nothing a model is
package/dist/remote.js CHANGED
@@ -1052,7 +1052,7 @@ async function opening(options, offered, lostSaid, wiring) {
1052
1052
  *
1053
1053
  * And a refusal takes the optimism back. The alternative — leaving the
1054
1054
  * hopeful change on screen and logging the refusal to a console — is the
1055
- * one behaviour that would make this whole design a lie: the interface
1055
+ * one behavior that would make this whole design a lie: the interface
1056
1056
  * would be showing a graph the server does not have.
1057
1057
  */
1058
1058
  const appliedAll = store.applyAll.bind(store);
@@ -1137,7 +1137,7 @@ async function opening(options, offered, lostSaid, wiring) {
1137
1137
  * `applyAll` is a whole gesture — a seat's plan lands as one batch — and
1138
1138
  * `undo` is a take-back. The first version patched `apply` alone, so a
1139
1139
  * robot's plans and undos stayed in the browser that made them while its
1140
- * single presses travelled: two windows on one roster disagreed about
1140
+ * single presses traveled: two windows on one roster disagreed about
1141
1141
  * exactly the changes an agent had made.
1142
1142
  */
1143
1143
  store.applyAll = ((calls, applyOptions) => {
package/dist/sync-seed.js CHANGED
@@ -1,4 +1,4 @@
1
- import { invert, normalise, writesOf, } from "@graview/core";
1
+ import { invert, normalize, writesOf, } from "@graview/core";
2
2
  import { primitivesForSteps, sayStep } from "./steps.js";
3
3
  const same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
4
4
  /**
@@ -59,7 +59,7 @@ export const SEED_SYNC_AUTHOR = { kind: "system", id: "ship:sync-seed" };
59
59
  * nothing against this graph, which is the honest answer to a second run.
60
60
  */
61
61
  export function contentOperation(steps, live, options = {}) {
62
- const primitives = primitivesForSteps(steps, live).map(normalise);
62
+ const primitives = primitivesForSteps(steps, live).map(normalize);
63
63
  if (primitives.length === 0)
64
64
  return null;
65
65
  const now = options.now ?? (() => new Date().toISOString());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graview/ship",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  }
28
28
  },
29
29
  "dependencies": {
30
- "@graview/core": "0.1.14"
30
+ "@graview/core": "0.1.16"
31
31
  },
32
32
  "devDependencies": {
33
33
  "zod": "^4.6.5"