nervur 0.23.0 → 0.24.0

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.
Files changed (157) hide show
  1. package/CONTRIBUTING.md +13 -0
  2. package/LICENSE +55 -202
  3. package/NOTICE +3 -8
  4. package/README.md +14 -156
  5. package/RELEASING.md +15 -0
  6. package/SECURITY.md +9 -0
  7. package/bin/nervur.js +6 -0
  8. package/package.json +26 -81
  9. package/AUTHORING.md +0 -935
  10. package/COMMAND.md +0 -179
  11. package/FACES.md +0 -280
  12. package/FACULTIES.md +0 -578
  13. package/GROUNDS.md +0 -315
  14. package/KIT-SPEC.md +0 -304
  15. package/WORLD.md +0 -195
  16. package/dist/app/app-ground.d.ts +0 -18
  17. package/dist/app/app-ground.js +0 -23
  18. package/dist/app/index.d.ts +0 -2
  19. package/dist/app/index.js +0 -5
  20. package/dist/app/native.d.ts +0 -11
  21. package/dist/app/native.js +0 -13
  22. package/dist/being/being.d.ts +0 -306
  23. package/dist/being/being.js +0 -20
  24. package/dist/being/covers.d.ts +0 -9
  25. package/dist/being/covers.js +0 -21
  26. package/dist/being/index.d.ts +0 -4
  27. package/dist/being/index.js +0 -6
  28. package/dist/being/need.d.ts +0 -49
  29. package/dist/being/need.js +0 -33
  30. package/dist/being/schema.d.ts +0 -100
  31. package/dist/being/schema.js +0 -132
  32. package/dist/being/table.d.ts +0 -48
  33. package/dist/being/table.js +0 -344
  34. package/dist/bench/bench-ground.d.ts +0 -73
  35. package/dist/bench/bench-ground.js +0 -153
  36. package/dist/bench/bench.d.ts +0 -101
  37. package/dist/bench/bench.js +0 -368
  38. package/dist/bench/fake-clock.d.ts +0 -17
  39. package/dist/bench/fake-clock.js +0 -34
  40. package/dist/bench/fake-memory.d.ts +0 -16
  41. package/dist/bench/fake-memory.js +0 -46
  42. package/dist/bench/fake-network.d.ts +0 -66
  43. package/dist/bench/fake-network.js +0 -222
  44. package/dist/bench/fake-unlock.d.ts +0 -6
  45. package/dist/bench/fake-unlock.js +0 -10
  46. package/dist/bench/index.d.ts +0 -3
  47. package/dist/bench/index.js +0 -5
  48. package/dist/bench/seeded.d.ts +0 -11
  49. package/dist/bench/seeded.js +0 -37
  50. package/dist/bench/settle.d.ts +0 -2
  51. package/dist/bench/settle.js +0 -49
  52. package/dist/bench/stewards.d.ts +0 -169
  53. package/dist/bench/stewards.js +0 -128
  54. package/dist/bodies/class-list.d.ts +0 -14
  55. package/dist/bodies/class-list.js +0 -33
  56. package/dist/bodies/joined-carry.d.ts +0 -29
  57. package/dist/bodies/joined-carry.js +0 -48
  58. package/dist/bodies/kept.d.ts +0 -44
  59. package/dist/bodies/kept.js +0 -91
  60. package/dist/bodies/noble-crypto.d.ts +0 -22
  61. package/dist/bodies/noble-crypto.js +0 -88
  62. package/dist/bodies/seed-keys.d.ts +0 -10
  63. package/dist/bodies/seed-keys.js +0 -42
  64. package/dist/bodies/strict-tools.d.ts +0 -10
  65. package/dist/bodies/strict-tools.js +0 -306
  66. package/dist/bodies/vouch.d.ts +0 -20
  67. package/dist/bodies/vouch.js +0 -71
  68. package/dist/bodies/web-carry.d.ts +0 -72
  69. package/dist/bodies/web-carry.js +0 -245
  70. package/dist/bodies/web-clock.d.ts +0 -12
  71. package/dist/bodies/web-clock.js +0 -33
  72. package/dist/browser/browser-ground.d.ts +0 -76
  73. package/dist/browser/browser-ground.js +0 -294
  74. package/dist/browser/index.d.ts +0 -4
  75. package/dist/browser/index.js +0 -7
  76. package/dist/browser/indexeddb-memory.d.ts +0 -17
  77. package/dist/browser/indexeddb-memory.js +0 -97
  78. package/dist/browser/locked-unlock.d.ts +0 -24
  79. package/dist/browser/locked-unlock.js +0 -85
  80. package/dist/browser/origin-classes.d.ts +0 -7
  81. package/dist/browser/origin-classes.js +0 -31
  82. package/dist/edge/durable-clock.d.ts +0 -19
  83. package/dist/edge/durable-clock.js +0 -61
  84. package/dist/edge/durable-memory.d.ts +0 -5
  85. package/dist/edge/durable-memory.js +0 -11
  86. package/dist/edge/durable.d.ts +0 -18
  87. package/dist/edge/durable.js +0 -24
  88. package/dist/edge/edge-ground.d.ts +0 -49
  89. package/dist/edge/edge-ground.js +0 -223
  90. package/dist/edge/index.d.ts +0 -7
  91. package/dist/edge/index.js +0 -9
  92. package/dist/edge/native-crypto.d.ts +0 -8
  93. package/dist/edge/native-crypto.js +0 -102
  94. package/dist/edge/secret-unlock.d.ts +0 -7
  95. package/dist/edge/secret-unlock.js +0 -13
  96. package/dist/edge/socket-carry.d.ts +0 -39
  97. package/dist/edge/socket-carry.js +0 -111
  98. package/dist/foundation.d.ts +0 -162
  99. package/dist/foundation.js +0 -4
  100. package/dist/ground/dock.d.ts +0 -1460
  101. package/dist/ground/dock.js +0 -1159
  102. package/dist/ground/ground.d.ts +0 -239
  103. package/dist/ground/ground.js +0 -787
  104. package/dist/ground/views.d.ts +0 -76
  105. package/dist/ground/views.js +0 -208
  106. package/dist/house/crossing.d.ts +0 -50
  107. package/dist/house/crossing.js +0 -153
  108. package/dist/house/house.d.ts +0 -88
  109. package/dist/house/house.js +0 -2069
  110. package/dist/house/rows-shape.d.ts +0 -110
  111. package/dist/house/rows-shape.js +0 -12
  112. package/dist/house/rows.d.ts +0 -27
  113. package/dist/house/rows.js +0 -185
  114. package/dist/index.d.ts +0 -33
  115. package/dist/index.js +0 -29
  116. package/dist/node/bridge.d.ts +0 -20
  117. package/dist/node/bridge.js +0 -284
  118. package/dist/node/cli.d.ts +0 -2
  119. package/dist/node/cli.js +0 -225
  120. package/dist/node/file-memory.d.ts +0 -13
  121. package/dist/node/file-memory.js +0 -86
  122. package/dist/node/folder-classes.d.ts +0 -5
  123. package/dist/node/folder-classes.js +0 -40
  124. package/dist/node/gone.d.ts +0 -2
  125. package/dist/node/gone.js +0 -7
  126. package/dist/node/hand.d.ts +0 -39
  127. package/dist/node/hand.js +0 -107
  128. package/dist/node/http.d.ts +0 -11
  129. package/dist/node/http.js +0 -90
  130. package/dist/node/index.d.ts +0 -11
  131. package/dist/node/index.js +0 -13
  132. package/dist/node/ledger-memory.d.ts +0 -17
  133. package/dist/node/ledger-memory.js +0 -152
  134. package/dist/node/lock.d.ts +0 -10
  135. package/dist/node/lock.js +0 -78
  136. package/dist/node/node-ground.d.ts +0 -26
  137. package/dist/node/node-ground.js +0 -228
  138. package/dist/node/notify.d.ts +0 -1
  139. package/dist/node/notify.js +0 -18
  140. package/dist/node/shell.d.ts +0 -11
  141. package/dist/node/shell.js +0 -35
  142. package/dist/node/sync-folder.d.ts +0 -6
  143. package/dist/node/sync-folder.js +0 -18
  144. package/dist/node/tcp-carry.d.ts +0 -42
  145. package/dist/node/tcp-carry.js +0 -193
  146. package/dist/node/unlock.d.ts +0 -17
  147. package/dist/node/unlock.js +0 -86
  148. package/dist/node/websocket.d.ts +0 -12
  149. package/dist/node/websocket.js +0 -134
  150. package/dist/quo/frame.d.ts +0 -33
  151. package/dist/quo/frame.js +0 -92
  152. package/dist/quo/index.d.ts +0 -1
  153. package/dist/quo/index.js +0 -5
  154. package/dist/quo/room.d.ts +0 -154
  155. package/dist/quo/room.js +0 -362
  156. package/dist/serve/index.d.ts +0 -45
  157. package/dist/serve/index.js +0 -71
@@ -1,162 +0,0 @@
1
- /** The ward's public keys, as the house writes them into an invitation. */
2
- export interface WardKeys {
3
- /** The Ed25519 signing pk. */
4
- readonly signing: Uint8Array;
5
- /** The X25519 padlock. */
6
- readonly padlock: Uint8Array;
7
- /** The ML-KEM-768 lock's encapsulation key, 1184 bytes. */
8
- readonly lock: Uint8Array;
9
- }
10
- /** Operations over the ward's secret. The secret never leaves. */
11
- export interface Keys {
12
- ward(): Promise<WardKeys>;
13
- /** Ed25519 by the ward's signing key. */
14
- sign(message: Uint8Array): Promise<Uint8Array>;
15
- /** X25519 of the ward's scalar with `pk`; `null` where `pk` takes no seal. */
16
- agree(pk: Uint8Array): Promise<Uint8Array | null>;
17
- /** ML-KEM-768 decapsulation with the ward's lock. */
18
- decapsulate(ciphertext: Uint8Array): Promise<Uint8Array>;
19
- /** Thirty-two or more bytes the house derives for its own use, by a label that is not Quo's. */
20
- derive(label: string, length: number): Promise<Uint8Array>;
21
- }
22
- /** The algorithms Quo names, and randomness. */
23
- export interface Crypto {
24
- random(length: number): Uint8Array;
25
- sha256(data: Uint8Array): Promise<Uint8Array>;
26
- /** HKDF-SHA-256 with the zero-length salt, `info` as ASCII. */
27
- hkdf(ikm: Uint8Array, info: string, length: number): Promise<Uint8Array>;
28
- /** AES-256-GCM, the tag at the end. */
29
- seal(key: Uint8Array, nonce: Uint8Array, plaintext: Uint8Array, additional: Uint8Array): Promise<Uint8Array>;
30
- /** AES-256-GCM opened, or `null` where it does not open. */
31
- open(key: Uint8Array, nonce: Uint8Array, ciphertext: Uint8Array, additional: Uint8Array): Promise<Uint8Array | null>;
32
- signingPublic(secret: Uint8Array): Promise<Uint8Array>;
33
- sign(secret: Uint8Array, message: Uint8Array): Promise<Uint8Array>;
34
- /** Ed25519 checked as Quo checks it: cofactorless, strict, and no small-order key. */
35
- verify(pk: Uint8Array, message: Uint8Array, signature: Uint8Array): Promise<boolean>;
36
- agreePublic(secret: Uint8Array): Promise<Uint8Array>;
37
- /** X25519, or `null` where the agreement is all zero. */
38
- agree(secret: Uint8Array, pk: Uint8Array): Promise<Uint8Array | null>;
39
- /** An ML-KEM-768 pair from sixty-four bytes, as KeyGen_internal(d, z) takes them. */
40
- lockPair(seed: Uint8Array): Promise<{
41
- encapsulation: Uint8Array;
42
- decapsulation: Uint8Array;
43
- }>;
44
- /** ML-KEM-768 encapsulation, or `null` where the modulus check refuses the key. */
45
- encapsulate(encapsulation: Uint8Array): Promise<{
46
- ciphertext: Uint8Array;
47
- shared: Uint8Array;
48
- } | null>;
49
- decapsulate(decapsulation: Uint8Array, ciphertext: Uint8Array): Promise<Uint8Array>;
50
- }
51
- /** A JSON text read strictly. */
52
- export interface Parsed {
53
- readonly value: unknown;
54
- /** The text of each own key's value, where the value is an object. */
55
- readonly fields: Readonly<Record<string, string>> | null;
56
- /** Two own keys of one name. */
57
- readonly duplicate: boolean;
58
- /** Two keys of one name in some object inside. */
59
- readonly nestedDuplicate: boolean;
60
- }
61
- /** Text, bytes and JSON, each read strictly. */
62
- export interface Tools {
63
- utf8(text: string): Uint8Array;
64
- /** UTF-8 read fatally, or `null`; a byte order mark is kept and is no whitespace. */
65
- text(bytes: Uint8Array): string | null;
66
- hex(bytes: Uint8Array): string;
67
- /** Lowercase hex read, or `null`. */
68
- bytes(hex: string): Uint8Array | null;
69
- /** RFC 8259 read, or `null` where the text is no JSON. */
70
- parse(text: string): Parsed | null;
71
- /** One spelling of a JSON value: keys sorted, no whitespace. */
72
- canonical(value: unknown): string;
73
- /** A JSON value held to a schema of the closed subset: `null` where it holds, or why not. */
74
- check(schema: unknown, value: unknown): string | null;
75
- }
76
- /** A place read: its entries by name, and its version; `null` where the place is absent. */
77
- export interface PlaceRead {
78
- readonly entries: Readonly<Record<string, Uint8Array>>;
79
- readonly version: string | null;
80
- }
81
- /** Sealed entries by name, in places. */
82
- export interface Memory {
83
- read(options: {
84
- place: string;
85
- }): Promise<PlaceRead>;
86
- list(): Promise<readonly string[]>;
87
- /**
88
- * Lands every place it names together, or none. An entry of `null` is
89
- * removed. `expect` names the versions read, `null` for a place read absent.
90
- * It answers each written place's new version, `null` where the place is
91
- * gone, or `null` whole where the versions moved and nothing landed.
92
- */
93
- write(options: {
94
- writes: Readonly<Record<string, Readonly<Record<string, Uint8Array | null>>>>;
95
- expect: Readonly<Record<string, string | null>>;
96
- }): Promise<Readonly<Record<string, string | null>> | null>;
97
- }
98
- /** A class of `Being.of`, as `classes` answers one. */
99
- export type BeingClass = abstract new () => object;
100
- /** The code of each kind, from one source. */
101
- export interface Classes {
102
- resolve(options: {
103
- kind: string;
104
- }): Promise<BeingClass | undefined>;
105
- /** The steward's kind. */
106
- steward(): string;
107
- /** The public being's kind, where there is one. */
108
- public(): string | undefined;
109
- }
110
- /** Boxes to far wards, and the addresses the house writes into an invitation. */
111
- export interface Carry {
112
- /**
113
- * The box handed to the door of a ward this carry listens for, before any
114
- * address. Otherwise it is carried to the first of `at` that answers, in
115
- * order. A box that may have been heard is carried to no second address.
116
- * `wait` is how long this box may wait for its reply, in milliseconds,
117
- * in place of the carry's own; a watch held long is not cut short.
118
- */
119
- send(options: {
120
- ward: string;
121
- at: readonly string[];
122
- box: Uint8Array;
123
- wait?: number;
124
- }): Promise<Sent>;
125
- at(options: {
126
- toward?: string;
127
- }): readonly string[];
128
- /**
129
- * The domains that vouch for the ward, as quo/DOMAIN.md writes a vouch:
130
- * each domain its addresses in `at` name, asked in their order. A carry
131
- * that speaks no web names none, and answers nothing it did not read.
132
- */
133
- vouched(options: {
134
- ward: string;
135
- at: readonly string[];
136
- }): Promise<readonly string[]>;
137
- }
138
- /**
139
- * What a send came to: the reply and the address that gave it, or nothing.
140
- * A reply from a door the carry holds names no address. Nothing says
141
- * whether the box may have been heard. A box surely unheard may go to
142
- * another address; one that may have been heard may not.
143
- */
144
- export type Sent = {
145
- readonly reply: Uint8Array;
146
- readonly via?: string;
147
- } | {
148
- readonly reply: null;
149
- readonly heard: boolean;
150
- };
151
- /** The time, and one wait per id. */
152
- export interface Clock {
153
- now(): number;
154
- /** `true` once `ms` has passed; `false` where it was cancelled or replaced. */
155
- wait(options: {
156
- id: string;
157
- ms: number;
158
- }): Promise<boolean>;
159
- cancel(options: {
160
- id: string;
161
- }): void;
162
- }
@@ -1,4 +0,0 @@
1
- // SPDX-License-Identifier: Apache-2.0
2
- // The foundation: the references the house calls, each a contract every
3
- // ground fills. The house holds them and hands none to a being.
4
- export {};