@ccmsg/protocol 1.22.0 → 1.22.1

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,11 +2,11 @@
2
2
 
3
3
  > 🇯🇵 [README-ja.md](./README-ja.md)
4
4
 
5
- The **contract of record** shared by the ccmsg daemon and its web UI. It holds the shape of
6
- every op, event, error code and identifier as a schema, and both sides validate against it.
5
+ The **contract of record** shared by the ccmsg daemon and its web UI. It holds the shape of every op, event, error code and identifier as a schema, and both sides validate against it.
7
6
 
8
- The contract is decided here and the daemon and web UI follow it. Neither side learns the
9
- other's internals by any route that does not pass through it.
7
+ The contract is decided here and the daemon and web UI follow it. Neither side learns the other's internals by any route that does not pass through it.
8
+
9
+ It covers 48 ops over four planes (common, messaging, control, mesh), 13 topics that are each a snapshot plus a stream of changes, one closed union of 21 error codes, and the op attribute table that authorization, capability gating and forwarding all read.
10
10
 
11
11
  ## Install
12
12
 
@@ -24,9 +24,11 @@ OP_ATTRIBUTES["message.send"].roles; // authorization reads the table, not a bra
24
24
  opErrors("session.rename"); // the codes this op may answer with
25
25
  ```
26
26
 
27
+ `@ccmsg/protocol/fixtures` is a second entry point holding a representative JSON of the real wire for every request, reply and topic frame. An implementation's tests read them from here rather than keeping a copy that goes stale.
28
+
27
29
  ## Documentation
28
30
 
29
- - [DESIGN.md](./docs/DESIGN.md) — layers, planes, the op attribute table, and the conventions
31
+ - [DESIGN.md](./docs/DESIGN.md) — the layers, the four planes, the op attribute table, how topics are folded, the item types a transcript is read into, instances and mesh, authenticating a person, and the naming conventions
30
32
 
31
33
  ## License
32
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccmsg/protocol",
3
- "version": "1.22.0",
3
+ "version": "1.22.1",
4
4
  "description": "Wire contract (schema + types + op attribute table) shared by the ccmsg daemon and web UI",
5
5
  "license": "MIT",
6
6
  "author": "kawaz",
@@ -7,7 +7,8 @@ import { SessionMetaFields } from "../session-meta.ts";
7
7
  *
8
8
  * It is not signed and proves nothing on its own: it names the peer and says
9
9
  * where its one-off key can be fetched. The proof that binds this connection to
10
- * `iss` follows on a separate exchange (mesh-peer-auth §5). */
10
+ * `iss` follows on a separate exchange (the daemon's mesh peer authentication
11
+ * decision). */
11
12
  export const MeshHello = Type.Object(
12
13
  {
13
14
  /** Generation of the mesh handshake format, apart from the protocol
package/src/errors.ts CHANGED
@@ -27,7 +27,7 @@ export const ERROR_CODES = [
27
27
  * in their `errors`, since only an op that queues for a reader has a queue to
28
28
  * fill. */
29
29
  "rate_limited",
30
- // --- rule-derived (op attribute table §0) ---
30
+ // --- rule-derived (op attribute table) ---
31
31
  /** The connection's role is outside the op's `roles`. Argument problems stay
32
32
  * on `invalid_args` / `bad_request`. */
33
33
  "forbidden",
@@ -55,7 +55,7 @@ export type InstanceId = Static<typeof InstanceId>;
55
55
  * identifies where an instance lives changing with it, and what lets the HTTP
56
56
  * routes be spelled without stripping a suffix off first.
57
57
  *
58
- * Compared as a whole string, path included (mesh-peer-auth §4.2 — one origin
58
+ * Compared as a whole string, path included (one origin
59
59
  * may host several instances, so an origin-level comparison would confuse
60
60
  * them). The trailing slash is required so that comparison is exact: `/ccmsg`
61
61
  * and `/ccmsg/` would otherwise be two spellings of one instance.