@quo-systems/quo 0.1.0 → 0.2.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.
- package/README.md +9 -6
- package/SPEC.md +235 -137
- package/dist/being/being.d.ts +22 -0
- package/dist/being/being.js +78 -0
- package/dist/being/digest.d.ts +3 -0
- package/dist/being/digest.js +19 -0
- package/dist/being/index.d.ts +5 -0
- package/dist/being/index.js +6 -0
- package/dist/being/silence.d.ts +10 -0
- package/dist/being/silence.js +29 -0
- package/dist/being/types.d.ts +84 -0
- package/dist/being/types.js +16 -0
- package/dist/conformance/assert.d.ts +11 -0
- package/dist/conformance/assert.js +72 -0
- package/dist/conformance/beings.d.ts +114 -0
- package/dist/conformance/beings.js +126 -0
- package/dist/conformance/estate.d.ts +5 -0
- package/dist/conformance/estate.js +316 -0
- package/dist/conformance/index.d.ts +65 -0
- package/dist/conformance/index.js +448 -0
- package/dist/conformance/reach.d.ts +10 -0
- package/dist/conformance/reach.js +72 -0
- package/dist/conformance/store.d.ts +5 -0
- package/dist/conformance/store.js +97 -0
- package/dist/harbor/core.d.ts +46 -0
- package/dist/harbor/core.js +218 -0
- package/dist/harbor/dial.d.ts +8 -0
- package/dist/harbor/dial.js +45 -0
- package/dist/harbor/index.d.ts +6 -0
- package/dist/harbor/index.js +10 -0
- package/dist/harbor/memory.d.ts +24 -0
- package/dist/harbor/memory.js +68 -0
- package/dist/harbor/reach.d.ts +36 -0
- package/dist/harbor/reach.js +166 -0
- package/dist/harbor/store.d.ts +33 -0
- package/dist/harbor/store.js +41 -0
- package/dist/ward/allowance.d.ts +10 -0
- package/dist/ward/allowance.js +60 -0
- package/dist/ward/arithmetic.d.ts +26 -0
- package/dist/ward/arithmetic.js +159 -0
- package/dist/ward/cells.d.ts +3 -0
- package/dist/ward/cells.js +79 -0
- package/dist/ward/door.d.ts +16 -0
- package/dist/ward/door.js +127 -0
- package/dist/ward/ground.d.ts +15 -0
- package/dist/ward/ground.js +1 -0
- package/dist/ward/heirs.d.ts +14 -0
- package/dist/ward/heirs.js +102 -0
- package/dist/ward/index.d.ts +8 -0
- package/dist/ward/index.js +10 -0
- package/dist/ward/owner.d.ts +32 -0
- package/dist/ward/owner.js +116 -0
- package/dist/ward/partition.d.ts +57 -0
- package/dist/ward/partition.js +64 -0
- package/dist/ward/seal.d.ts +50 -0
- package/dist/ward/seal.js +109 -0
- package/dist/ward/stance.d.ts +19 -0
- package/dist/ward/stance.js +259 -0
- package/dist/ward/ward.d.ts +2 -0
- package/dist/ward/ward.js +197 -0
- package/package.json +21 -29
- package/src/being/index.ts +1 -1
- package/src/being/silence.ts +26 -8
- package/src/being/types.ts +13 -3
- package/src/conformance/beings.ts +5 -5
- package/src/conformance/estate.ts +11 -6
- package/src/conformance/index.ts +14 -12
- package/src/harbor/core.ts +56 -6
- package/src/harbor/dial.ts +1 -1
- package/src/harbor/memory.ts +6 -1
- package/src/ward/door.ts +54 -32
- package/src/ward/ground.ts +6 -2
- package/src/ward/heirs.ts +20 -5
- package/src/ward/owner.ts +4 -3
- package/src/ward/partition.ts +10 -0
- package/src/ward/seal.ts +8 -5
- package/src/ward/stance.ts +20 -14
- package/src/ward/ward.ts +9 -9
- package/vectors/framing.json +7 -1
package/SPEC.md
CHANGED
|
@@ -94,9 +94,13 @@ gap in Quo or a leak into the ward. The shape is `Ground` in
|
|
|
94
94
|
|
|
95
95
|
Returned:
|
|
96
96
|
|
|
97
|
-
- **The door.** One call: sealed bytes in, sealed bytes out
|
|
97
|
+
- **The door.** One call: sealed bytes in, sealed bytes out, and one bit
|
|
98
|
+
beside them, `heard`: whether a key this door holds spoke. Always bytes:
|
|
98
99
|
when the ask did not open, the reply is silence sealed to whatever ephemeral
|
|
99
|
-
pk the bytes carried, and noise when they carried none.
|
|
100
|
+
pk the bytes carried, and noise when they carried none. The bit is all a
|
|
101
|
+
harbor learns from an arrival, never a reason: a pk that only ever brings
|
|
102
|
+
strangers' bytes is the harbor's to rate or refuse, and what a bound key
|
|
103
|
+
hears is sealed to its own lid.
|
|
100
104
|
- **The ask.** One call: method and args in, object or silence out.
|
|
101
105
|
In-process and unsealed. This is the one unsealed ask in Quo, and the only
|
|
102
106
|
way a ward is piloted. Judgment, catching, and the return table are not
|
|
@@ -132,10 +136,10 @@ stance
|
|
|
132
136
|
occupants.invite(id) -> invitation | null awaitable: a key is minted
|
|
133
137
|
occupants.remove(id) -> nothing
|
|
134
138
|
|
|
135
|
-
standings.knock(invitation, method?, args?, wanted?) -> object | silence |
|
|
139
|
+
standings.knock(invitation, method?, args?, wanted?) -> object | silence | word
|
|
136
140
|
standings.take(id, invitation) -> id | null awaitable: it waits for the relation
|
|
137
141
|
standings[id] -> standing | undefined
|
|
138
|
-
standings[id].ask(method?, args?, wanted?) -> object | silence |
|
|
142
|
+
standings[id].ask(method?, args?, wanted?) -> object | silence | word
|
|
139
143
|
standings.remove(id) -> nothing
|
|
140
144
|
|
|
141
145
|
wanted = { time? } what this one ask may spend, in milliseconds. optional,
|
|
@@ -150,16 +154,16 @@ Return table.
|
|
|
150
154
|
| | null | the id already names a record, occupant or standing, or is a reserved word |
|
|
151
155
|
| remove(id) | nothing | always. removing what is not there is nothing |
|
|
152
156
|
| knock(inv, m, a, w) | object | the far being answered |
|
|
153
|
-
| | silence | no ward claims the invitation, or
|
|
154
|
-
| |
|
|
155
|
-
| | unreached
|
|
157
|
+
| | silence | no ward claims the invitation, or another consumed it, or the far being chose silence |
|
|
158
|
+
| | word | why not, when the far door or her own ward can say: removed, absent, unannounced, repeated, |
|
|
159
|
+
| | | threw, unreached, late, invitation. see "Silence, the words, error" |
|
|
156
160
|
| take(id, inv) | id | she knocked with this invitation and was answered, and the id is fresh |
|
|
157
161
|
| | null | no answered knock on this invitation, or the id already names a record, or is a reserved word |
|
|
158
162
|
| standings[id] | standing | the record exists |
|
|
159
163
|
| | undefined | it does not. not an error |
|
|
160
164
|
| ask(m, a, w) | object | she answered |
|
|
161
|
-
| | silence | she
|
|
162
|
-
| |
|
|
165
|
+
| | silence | she chose to say nothing, or bytes came back that are not Quo's |
|
|
166
|
+
| | word | why not: removed, absent, repeated, threw, unreached, late, dropped |
|
|
163
167
|
|
|
164
168
|
Ask, knock, invite and take are awaitable. Async where the language has it,
|
|
165
169
|
blocking where it does not. Every ask she makes is a new call.
|
|
@@ -175,16 +179,19 @@ The asker has three shapes and no fourth, and nothing else ever reaches her.
|
|
|
175
179
|
`OWNER` and `PUBLIC` are reserved words: invite and take refuse them, so no
|
|
176
180
|
occupant can ever wear either name.
|
|
177
181
|
|
|
178
|
-
## Silence,
|
|
182
|
+
## Silence, the words, error
|
|
179
183
|
|
|
180
|
-
Three
|
|
181
|
-
that can go wrong ends in one of them, and a being who knows the three
|
|
182
|
-
needs a fourth.
|
|
184
|
+
Three kinds of answer to "no object came back", and only three. Everything in
|
|
185
|
+
Quo that can go wrong ends in one of them, and a being who knows the three
|
|
186
|
+
never needs a fourth.
|
|
183
187
|
|
|
184
188
|
```
|
|
185
189
|
error an object. hers. { error: ... }, or any shape her output schema declares.
|
|
186
|
-
silence the ward's
|
|
187
|
-
|
|
190
|
+
silence the ward's silence. bytes came back, or would have, and said nothing.
|
|
191
|
+
it is what a stranger hears, and what she hears when
|
|
192
|
+
the far being chose to say nothing.
|
|
193
|
+
a word the ward's word. one of nine, said only to someone the ward can name,
|
|
194
|
+
and never to a stranger: why no object came.
|
|
188
195
|
```
|
|
189
196
|
|
|
190
197
|
- An **error** is an ordinary answer. Quo never reads it, never makes it,
|
|
@@ -192,42 +199,75 @@ unreached the ward's word. not heard. nothing came back. nothing is known to
|
|
|
192
199
|
`{ error: 'unknown ask' }` for an ask she did not declare or hid; the
|
|
193
200
|
owner's asks answer error objects for what they refuse; both are hers to
|
|
194
201
|
read like any object.
|
|
195
|
-
- **Silence**
|
|
196
|
-
and
|
|
202
|
+
- **Silence** names no reason, by law. It is what the door says to bytes it
|
|
203
|
+
cannot admit, so that a stranger learns nothing, and what a being says
|
|
204
|
+
when she chooses to say nothing. It is not blindly retryable: the far
|
|
205
|
+
being may have done the work and the answer was lost.
|
|
206
|
+
- **A word** names the reason. It is said to a key the door has bound, sealed
|
|
207
|
+
to that key's lid, or by her own ward to her, in process. Nobody else ever
|
|
208
|
+
hears one. A word is not an object: it carries nothing but its name, a
|
|
209
|
+
being cannot make one, and one that comes out of a being is read as her
|
|
210
|
+
having thrown.
|
|
211
|
+
|
|
212
|
+
The nine words, and who says them:
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
the door, to a key it has bound, on the wire as { quo: word }
|
|
216
|
+
removed the relation this key spoke for was removed by the being who invited it
|
|
217
|
+
absent the being who invited it did not come back this run; her cells wait
|
|
218
|
+
unannounced the knock announced no key of her own, so it bound nothing
|
|
219
|
+
repeated the number was already honoured, or is at or below the span
|
|
220
|
+
threw she threw, or answered a shape that is not hers to make
|
|
221
|
+
|
|
222
|
+
her own ward, to her, and never on the wire
|
|
223
|
+
unreached no far door was reached. nothing is known to have been delivered.
|
|
224
|
+
late the wait ran out. the far door may have heard and be working still.
|
|
225
|
+
invitation the invitation is not one. nothing was sent.
|
|
226
|
+
dropped she dropped the standing, and asked on what she held. nothing was sent.
|
|
227
|
+
```
|
|
228
|
+
|
|
197
229
|
- **Unreached** is safe to retry: nothing is known to have been delivered.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
230
|
+
In one case the far ward heard and died before it could answer, and the
|
|
231
|
+
wire says nothing about it; asking again asks under the next number and
|
|
232
|
+
is heard, so the retry is safe all the same. See Closed.
|
|
233
|
+
- **Late** is not unreached, and the difference is the whole reason there are
|
|
234
|
+
two words: a bound that expired promises nothing about delivery.
|
|
235
|
+
- **Removed**, **absent**, **unannounced** and **repeated** are refusals: the
|
|
236
|
+
ask reached no being and nothing was written. They are said only because
|
|
237
|
+
the key that asked has already proven who it is, so a reason to it is an
|
|
238
|
+
oracle to nobody. **Threw** is a choice: she was reached, and the number is
|
|
239
|
+
spent.
|
|
240
|
+
|
|
241
|
+
Who says what. A being says objects and silence, never a word: the shape is
|
|
242
|
+
the ward's, and a ward that sees one come out of a being answers `threw`. A
|
|
243
|
+
ward says all three to its own being, and on the wire objects, silence and
|
|
244
|
+
the five door words, each sealed to the lid of the key that asked; the four
|
|
245
|
+
ward words never cross, they are her own ward's and are said in process. A
|
|
246
|
+
harbor says nothing at all; it returns bytes or nothing, and does not know
|
|
247
|
+
any of these words. What it learns from an arrival is one bit, `heard`,
|
|
248
|
+
beside the bytes the door hands it: whether a key the door holds spoke. The
|
|
249
|
+
owner hears objects: a silence a being met is `{ error: 'silence' }` and a
|
|
250
|
+
word is `{ error: word }`, because the owner is piloting and an object is
|
|
211
251
|
what a shell can print. The ask pointer answers the value silence only when
|
|
212
252
|
the ward itself threw.
|
|
213
253
|
|
|
214
|
-
### What her ward
|
|
254
|
+
### What her ward says to her
|
|
215
255
|
|
|
216
|
-
Before or after the wire, her own ward answers
|
|
217
|
-
|
|
256
|
+
Before or after the wire, her own ward answers on its own in five cases,
|
|
257
|
+
and each says what it is.
|
|
218
258
|
|
|
219
259
|
```
|
|
220
260
|
S1 the invitation is not one a shape that is not a ward pk, a heir with no secret, a secret with no heir.
|
|
221
|
-
nothing is sent.
|
|
261
|
+
nothing is sent. the word is `invitation`.
|
|
222
262
|
S2 the standing is gone she held a standing, dropped it, and asked on what she held.
|
|
223
|
-
nothing is sent. an ask issued while it stood is answered.
|
|
263
|
+
nothing is sent. an ask issued while it stood is answered. the word is `dropped`.
|
|
224
264
|
S3 the wait ran out the ask's time was spent and no reply was read.
|
|
225
265
|
what comes back late is not read. the number is spent.
|
|
226
|
-
an ask still waiting at its lane when the wait ran out is never sent.
|
|
266
|
+
an ask still waiting at its lane when the wait ran out is never sent. the word is `late`.
|
|
227
267
|
S4 the reply is not one bytes came back that do not open, or are not signed by the ward they
|
|
228
|
-
were sent to, or are
|
|
229
|
-
|
|
230
|
-
S5 the far door
|
|
268
|
+
were sent to, or are none of the three reply shapes. the number is spent.
|
|
269
|
+
not Quo's bytes: silence.
|
|
270
|
+
S5 the far door answered silence, or a word, exactly as the door said it.
|
|
231
271
|
```
|
|
232
272
|
|
|
233
273
|
And unreached in two: `U1` the args are not a value, or could not be
|
|
@@ -236,69 +276,83 @@ sealed, so nothing left;
|
|
|
236
276
|
taken all the same, and the gap it leaves in the count is harmless: the door
|
|
237
277
|
honours any number above its mark.
|
|
238
278
|
|
|
239
|
-
### What the door
|
|
279
|
+
### What the door says
|
|
240
280
|
|
|
241
|
-
The door
|
|
242
|
-
the
|
|
243
|
-
|
|
244
|
-
|
|
281
|
+
The door judges thirteen cases, in this order, and the first case met is
|
|
282
|
+
the answer. The first seven are strangers: bytes the door cannot admit, met
|
|
283
|
+
with one silence whatever the case, and nothing written. The next three are
|
|
284
|
+
refusals to a key the door has bound: still nothing written, but a word,
|
|
285
|
+
because the asker has proven who it is. The last three are choices: the ask
|
|
286
|
+
reached her, so the number is spent and the keys are rotated, and what she
|
|
287
|
+
wrote in her cells is hers.
|
|
245
288
|
|
|
246
289
|
```
|
|
247
|
-
|
|
290
|
+
strangers: silence, nothing written, heard false
|
|
248
291
|
D1 the box does not open wrong padlock, garbage, too short. the reply is sealed to the lid if
|
|
249
292
|
the bytes carried one, and is noise otherwise. a lid that will not
|
|
250
293
|
take a seal, a small-order point, is no lid: noise.
|
|
251
294
|
D2 the payload is malformed by or next not 64 hex, method not a string, args not an object, seq
|
|
252
|
-
below one, time not a whole number above zero
|
|
295
|
+
below one, time not a whole number above zero, hops not a whole
|
|
296
|
+
number or at zero.
|
|
253
297
|
D3 for nobody, and nobody is home no public being on this ward.
|
|
254
298
|
D4 for nobody, signature fails the payload names a key it was not signed with.
|
|
255
|
-
D5 the heir is not held never minted here,
|
|
299
|
+
D5 the heir is not held never minted here, and not one she removed either.
|
|
256
300
|
D6 the key is not admitted not the key held for the heir, and not the key it announced. a
|
|
257
|
-
forged key, an unannounced key, a heir already spent.
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
301
|
+
forged key, an unannounced key, a heir already spent. a heir she
|
|
302
|
+
removed, under a key that was not the one she removed.
|
|
303
|
+
D7 signature fails under an admitted key, or under the key held for a heir she removed.
|
|
304
|
+
refusals to a bound key: a word, nothing written, heard true
|
|
305
|
+
D8 she is not there `removed`: the occupant record is gone, and this is the key it was
|
|
306
|
+
bound to when it went. `absent`: the being did not come back this run.
|
|
307
|
+
D9 a knock announces nothing `unannounced`: the heir is fresh and next is null. it binds nothing.
|
|
308
|
+
D10 the number is refused `repeated`: already honoured, or at or below the span.
|
|
309
|
+
choices: the number spent, the keys rotated, heard true
|
|
310
|
+
D11 she threw `threw`
|
|
264
311
|
D12 she answered silence on a named ask, or on the empty ask. nothing at all is silence too.
|
|
265
|
-
D13 she answered
|
|
312
|
+
D13 she answered a word `threw`: a word is not hers to make.
|
|
266
313
|
```
|
|
267
314
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
315
|
+
The signature is verified before anything is written and before any word is
|
|
316
|
+
said, so a stranger cannot burn a number she could not sign for and cannot
|
|
317
|
+
hear a word she could not sign for. The public being is asked by strangers
|
|
318
|
+
only, and a stranger hears silence for whatever she then does: her choices
|
|
319
|
+
are hers, and her insides are not a stranger's to read.
|
|
320
|
+
|
|
321
|
+
A removed relation leaves the door one thing: the keys it held for that
|
|
322
|
+
heir when the id went, kept apart from the heirs under `gone` in the
|
|
323
|
+
partition, bounded, oldest out. That is what lets the door say `removed` to
|
|
324
|
+
the one party who can sign as those keys, and silence to everyone else.
|
|
325
|
+
Nothing else survives a removal.
|
|
272
326
|
|
|
273
327
|
### The law of one silence
|
|
274
328
|
|
|
275
|
-
1. Every case
|
|
276
|
-
ask came with, signed by the ward key. Same bytes, same length.
|
|
277
|
-
stranger cannot tell
|
|
278
|
-
|
|
329
|
+
1. Every stranger's case is one reply: `{ silence: true }`, sealed to the
|
|
330
|
+
lid the ask came with, signed by the ward key. Same bytes, same length.
|
|
331
|
+
A stranger cannot tell one refusal from another, nor any of them from a
|
|
332
|
+
being who chose to say nothing.
|
|
279
333
|
The door equalizes the bytes and not the time it took to write them. The
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
refused at the door. A stranger holds no standing and reaches no choice,
|
|
284
|
-
which is why the refusals are the ones made alike. Equalizing the time
|
|
285
|
-
would mean waiting out the allowance ceiling on every silence, and the
|
|
286
|
-
door will not buy that.
|
|
334
|
+
seven cases are cheap and alike. A word, to a key the door has bound, is
|
|
335
|
+
another length, and may be: whoever hears it has already proven who they
|
|
336
|
+
are.
|
|
287
337
|
2. A refusal writes nothing. No number, no key, no heir, no cell, no bind.
|
|
288
338
|
The same bytes presented again meet the same refusal, and a stranger who
|
|
289
|
-
knocks a thousand times leaves no mark.
|
|
339
|
+
knocks a thousand times leaves no mark. This holds for the three
|
|
340
|
+
refusals a bound key hears just the same: a word costs nothing.
|
|
290
341
|
3. A choice writes what a heard ask writes. The number is spent and the keys
|
|
291
342
|
rotate, so the relation goes on: the next ask on it is answered, and a
|
|
292
|
-
silence never kills a standing.
|
|
293
|
-
4. Silence
|
|
294
|
-
leaves `seen` untouched; a silent empty ask leaves `blueprint` and
|
|
295
|
-
`digest` untouched
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
343
|
+
silence or a `threw` never kills a standing.
|
|
344
|
+
4. Silence and a word leave the caller's record as it was. A silent named
|
|
345
|
+
answer leaves `seen` untouched; a silent empty ask leaves `blueprint` and
|
|
346
|
+
`digest` untouched; a word moves neither, and her keys do not rotate on
|
|
347
|
+
one.
|
|
348
|
+
5. Her ward never confuses her. Silence, a word and unreached are told apart
|
|
349
|
+
always, and by nothing else: silence is bytes the far ward wrote and
|
|
350
|
+
chose to say nothing with; a word is a reason, from the far door or her
|
|
351
|
+
own ward; unreached is the wire's nothing. A ward never answers nothing,
|
|
352
|
+
so that nothing always means unreached.
|
|
353
|
+
6. Nobody enforces what a being does with silence or a word. Each is one
|
|
354
|
+
value she compares against, and the base class hands them to her
|
|
355
|
+
unchanged.
|
|
302
356
|
|
|
303
357
|
`test/silence.test.ts` asserts every numbered line above, by its number.
|
|
304
358
|
|
|
@@ -324,15 +378,17 @@ nothing was written down that a harbor would later have to lie about. This
|
|
|
324
378
|
holds all the way down: a container read through her cells is part of her
|
|
325
379
|
cells. The guard is `src/ward/cells.ts`.
|
|
326
380
|
|
|
327
|
-
### Silence and
|
|
381
|
+
### Silence and the words
|
|
328
382
|
|
|
329
|
-
Two of the three
|
|
330
|
-
|
|
331
|
-
distinguished value. Null is an answer.
|
|
332
|
-
value, her ward's own
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
`src/being/silence.ts
|
|
383
|
+
Two of the three kinds of "no object came back". The chapter "Silence, the
|
|
384
|
+
words, error" is the whole of them; here only the values. Silence is one
|
|
385
|
+
distinguished value. Null is an answer. A word is a second kind of
|
|
386
|
+
distinguished value, her ward's own, nine of them, `unreached` among them.
|
|
387
|
+
None is an object, and none carries anything but its name. In this kit
|
|
388
|
+
silence is the symbol `quo.silence` and a word is a frozen object under the
|
|
389
|
+
symbol key `quo.word` holding its name, both from `src/being/silence.ts`;
|
|
390
|
+
`isWord` and `wordOf` read them, and `isUnreached` is the one word a being
|
|
391
|
+
asks about most.
|
|
336
392
|
|
|
337
393
|
### Blueprint, schema, digest
|
|
338
394
|
|
|
@@ -670,13 +726,15 @@ Every arrival is judged by the door, and named by it or falls silent.
|
|
|
670
726
|
2. For nobody: find the public being, verify the signature under the key the
|
|
671
727
|
payload names, and dispatch as `{}`. Nothing is written.
|
|
672
728
|
3. For a heir: admit the signer if it is the key held for that heir or the
|
|
673
|
-
key that key announced
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
729
|
+
key that key announced, or the key held when she removed the id. Verify
|
|
730
|
+
the signature. Only then say anything or write anything: a removed
|
|
731
|
+
relation is `removed`, a being not back this run is `absent`, a knock
|
|
732
|
+
with no key is `unannounced`, a number already honoured is `repeated`,
|
|
733
|
+
and none of those writes. Else spend the number and settle the keys, so
|
|
734
|
+
a stranger cannot burn a number she could not sign for, and the same
|
|
735
|
+
bytes twice rotate nothing. Dispatch as `{ id }`.
|
|
736
|
+
4. Catch every throw and answer `threw` to a bound key, silence at the
|
|
737
|
+
public being. Treat a word coming out of a being as a throw.
|
|
680
738
|
5. On every answered named ask, run her describe for that asker in process,
|
|
681
739
|
hash it, and put the digest next to the object in the reply. One trip. A
|
|
682
740
|
describe that throws or falls silent costs the digest and nothing else.
|
|
@@ -684,7 +742,7 @@ Every arrival is judged by the door, and named by it or falls silent.
|
|
|
684
742
|
6. Answer by the same call the ask came in on.
|
|
685
743
|
|
|
686
744
|
A stranger is bytes the ward cannot admit, and every way of being one is
|
|
687
|
-
listed, with a number, under "Silence,
|
|
745
|
+
listed, with a number, under "Silence, the words, error". The public being
|
|
688
746
|
is the one door a stranger may walk through, and only because she chose it.
|
|
689
747
|
|
|
690
748
|
### Inner and outer
|
|
@@ -729,7 +787,8 @@ ask on the wire box = ephemeral X25519 pk (32) || AES-GCM( payload || si
|
|
|
729
787
|
refused at zero, and nothing sets it.
|
|
730
788
|
reply on the wire box = ephemeral X25519 pk (32) || AES-GCM( reply || signature (64) )
|
|
731
789
|
sealed to the ask's ephemeral pk, signed by the ward key
|
|
732
|
-
reply = JSON { object, seen } | { silence: true }
|
|
790
|
+
reply = JSON { object, seen } | { silence: true } | { quo: word }
|
|
791
|
+
word: removed | absent | unannounced | repeated | threw. only to a key the door bound.
|
|
733
792
|
```
|
|
734
793
|
|
|
735
794
|
Nothing rides outside the box, and `to` is the reason to say so. A heir is
|
|
@@ -819,6 +878,8 @@ partition
|
|
|
819
878
|
answered <ward>:<heir> | public:<ward> -> true knocked and answered
|
|
820
879
|
minted the last eight pks her side minted
|
|
821
880
|
heirs heir pk -> { being, id, current, announced, fresh, mark, spent } the door's view of every occupant
|
|
881
|
+
gone heir pk -> { current, announced } the keys held when an id was removed, bounded, so their
|
|
882
|
+
holder hears `removed` and nobody else hears a thing
|
|
822
883
|
public the one public being's key, or null
|
|
823
884
|
```
|
|
824
885
|
|
|
@@ -852,8 +913,9 @@ before the restart can be taken after it; a door that restarts still refuses
|
|
|
852
913
|
what it already honoured.
|
|
853
914
|
|
|
854
915
|
A constructor that throws on a restart takes only herself down: she is
|
|
855
|
-
absent this run, no door, so
|
|
856
|
-
|
|
916
|
+
absent this run, no door, so `absent` at her door to the keys she bound and
|
|
917
|
+
silence to strangers, and her cells sit untouched waiting for the run that
|
|
918
|
+
can read them. The ward is up and so is everyone
|
|
857
919
|
else. A class the harbor no longer knows is the same absence, and so is a
|
|
858
920
|
class the harbor holds at a body the cells were not written for: which body
|
|
859
921
|
a ward reboots on is the harbor's decision, and a ward cannot tell an old
|
|
@@ -972,7 +1034,8 @@ Not stressed with:
|
|
|
972
1034
|
from nothing else. There is no estate. The far being is sovereign: she may
|
|
973
1035
|
fall silent on the ask after the knock, and nobody is told.
|
|
974
1036
|
- Blacklists, rate limits, and what to do with a pk that keeps knocking with
|
|
975
|
-
garbage.
|
|
1037
|
+
garbage. The door says `heard` or not beside every reply; the rest is the
|
|
1038
|
+
harbor's.
|
|
976
1039
|
|
|
977
1040
|
## The harbor
|
|
978
1041
|
|
|
@@ -1004,7 +1067,9 @@ The harbor:
|
|
|
1004
1067
|
never answers nothing on its own patience; it waits, and the ward's bound
|
|
1005
1068
|
ends the ask.
|
|
1006
1069
|
- Receives bytes from the wire for a ward pk it holds, hands them to that
|
|
1007
|
-
one door, and returns what the door returned.
|
|
1070
|
+
one door, and returns what the door returned. Beside the bytes the door
|
|
1071
|
+
says whether a key it holds spoke; the harbor may count that per pk and
|
|
1072
|
+
act on it, and learns nothing more.
|
|
1008
1073
|
- Vouches: the seed stays secret, the partition is reached by this ward
|
|
1009
1074
|
alone, the ask reaches its root owner alone, the device is the harbor's
|
|
1010
1075
|
to defend. How is the device's business. Custody is this vouch: two
|
|
@@ -1057,7 +1122,8 @@ byte, a four-byte id, the 64-byte pk and the bytes; a reply is the kind, the
|
|
|
1057
1122
|
id and the bytes; and nothing delivered is the kind and the id alone. Both
|
|
1058
1123
|
kinds are written on the standard surface every terrain carries, fetch and
|
|
1059
1124
|
WebSocket, and this tree holds either end of a line and never a listener:
|
|
1060
|
-
who accepts a socket is the terrain's business. A reach reads nothing
|
|
1125
|
+
who accepts a socket is the terrain's business. A reach reads nothing; a
|
|
1126
|
+
harbor opens no box but its own probe's.
|
|
1061
1127
|
Nothing comes back only where the reach knows nothing was delivered: no such
|
|
1062
1128
|
pk at the far end, a connection that would not open, a line already gone. A
|
|
1063
1129
|
reach that sent the bytes and lost the line after answers nothing at all,
|
|
@@ -1099,8 +1165,24 @@ ward the store keeps, keeps the map of ward pk to door for its own wards
|
|
|
1099
1165
|
and the **directory**, pk to reach, for foreign ones, carries bytes to a
|
|
1100
1166
|
pk and delivers bytes from the wire to one door. The directory is filled
|
|
1101
1167
|
three ways, in this order: its own doors; a socket a dialer holds to it,
|
|
1102
|
-
bound
|
|
1103
|
-
hint, a pk at a URL, kept in the store.
|
|
1168
|
+
bound once the door behind the dialer's claim has proved it, and unbound
|
|
1169
|
+
when the line closes; and a hint, a pk at a URL, kept in the store.
|
|
1170
|
+
|
|
1171
|
+
An announce is a claim, and a claim binds nothing until proven: anyone who
|
|
1172
|
+
can reach a listener could otherwise name a pk that is not theirs and take
|
|
1173
|
+
its reachability, the one thing a rendezvous exists to give. The proof is
|
|
1174
|
+
the door as it already is. The harbor mints a lid and sends it down the
|
|
1175
|
+
line with noise after it, an ask for the claimed pk; that is a box that
|
|
1176
|
+
does not open, D1, and the door answers it with silence sealed to the lid
|
|
1177
|
+
and signed by the ward key. Only the holder of that seed writes that reply,
|
|
1178
|
+
the lid is fresh so nothing replays, and a box that does not open writes
|
|
1179
|
+
nothing at the ward. Each claimed pk is proven on its own, both ways: the
|
|
1180
|
+
listener proves the dialer's claims and the dialer the listener's. What a
|
|
1181
|
+
relay that genuinely reaches a ward elsewhere can still do is forward the
|
|
1182
|
+
probe and pass, and then it is a rendezvous for that ward like any other,
|
|
1183
|
+
able to drop and nothing more. This is the one box a harbor ever opens,
|
|
1184
|
+
the one it sealed itself, and it reads nothing from it but whose key
|
|
1185
|
+
signed. One rule makes a **rendezvous** of
|
|
1104
1186
|
any listener: bytes that arrive from the wire go to an own door or to a
|
|
1105
1187
|
socket this harbor holds for that pk, and never onward by request. So a
|
|
1106
1188
|
harbor that cannot be dialed is reached through the one it dialed, by
|
|
@@ -1130,7 +1212,7 @@ class. Her ward does all of that, and she trusts it blindly: what the ward
|
|
|
1130
1212
|
names is true.
|
|
1131
1213
|
|
|
1132
1214
|
She asks her standings by method and args and gets back an object, silence,
|
|
1133
|
-
or
|
|
1215
|
+
or a word. She invites whom she wants, in her own time, and removes them
|
|
1134
1216
|
when she decides. She knocks with invitations she was given and takes the
|
|
1135
1217
|
ones she wants. She answers every ask her ward brings her with an object or
|
|
1136
1218
|
silence; an error is an ordinary object, and she never throws outward. She
|
|
@@ -1143,9 +1225,10 @@ only the ward instantiates.
|
|
|
1143
1225
|
|
|
1144
1226
|
### Her obligations
|
|
1145
1227
|
|
|
1146
|
-
1. Args are one object. A throw is
|
|
1147
|
-
|
|
1148
|
-
|
|
1228
|
+
1. Args are one object. A throw is the word `threw` outside, to whoever the
|
|
1229
|
+
door has bound, and silence to a stranger: the ward is in the middle of
|
|
1230
|
+
every call and catches, always, in every language. An error is an object
|
|
1231
|
+
her output schema declares.
|
|
1149
1232
|
2. No lifecycle. Construction with the stance is birth. A restart is silent.
|
|
1150
1233
|
3. The empty ask is hers. Who gets what blueprint is her decision. She obeys
|
|
1151
1234
|
the shape, never a content. The empty ask must be safe to repeat: her
|
|
@@ -1296,17 +1379,30 @@ class Watcher {
|
|
|
1296
1379
|
## The tree
|
|
1297
1380
|
|
|
1298
1381
|
The repository is one TypeScript implementation of this document, run
|
|
1299
|
-
directly on Node's type stripping, no
|
|
1382
|
+
directly on Node's type stripping, no dependencies. Node 22.18
|
|
1300
1383
|
or later. The package is `@quo-systems/quo`, published from 0.1.0, the
|
|
1301
1384
|
first version under this name, and it starts over: nothing before it under
|
|
1302
1385
|
any other name is this protocol. Before 1.0.0 every version may change the
|
|
1303
|
-
words, and nothing is kept for a holder of an earlier one.
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1386
|
+
words, and nothing is kept for a holder of an earlier one.
|
|
1387
|
+
|
|
1388
|
+
The tree runs as TypeScript and the package ships as JavaScript. Node
|
|
1389
|
+
strips types nowhere under `node_modules`, so a consumer cannot load the
|
|
1390
|
+
source, and 0.1.0, which shipped it, imported nowhere; 0.1.1 is the first
|
|
1391
|
+
version a stranger can import. `npm run build` emits `dist/` from `src`
|
|
1392
|
+
alone, one JavaScript file and one declaration file per source file with
|
|
1393
|
+
every relative import rewritten, and the exports map points there, types
|
|
1394
|
+
beside default. The
|
|
1395
|
+
build runs before every gate and every publish and is never tracked;
|
|
1396
|
+
nothing under `test/` or `dock/` imports it except through the package
|
|
1397
|
+
name, which is how a consumer does. `test/package.test.ts` is the one
|
|
1398
|
+
suite that meets the package as a stranger: it packs the tarball,
|
|
1399
|
+
installs it into an empty folder, and imports every entry point under
|
|
1400
|
+
plain Node. `npm pack --dry-run` shows what ships: `dist/`, the four
|
|
1401
|
+
source folders, the vectors, this document, the README and the licence,
|
|
1402
|
+
and nothing else. This document ships, decided here: it is the truth the
|
|
1403
|
+
source and the vectors are read against, and a kit in another language is
|
|
1404
|
+
written against it and nothing else. Publishing runs both gates first,
|
|
1405
|
+
`npm run check` and `npm run check:terrain`, and refuses on a failure.
|
|
1310
1406
|
|
|
1311
1407
|
```
|
|
1312
1408
|
src/being/ the Being side. types, the base class, silence, the digest.
|
|
@@ -1317,7 +1413,7 @@ test/ the suites.
|
|
|
1317
1413
|
vectors/ fixed inputs and outputs: the arithmetic, Quo's own framing, the frames on the wire.
|
|
1318
1414
|
```
|
|
1319
1415
|
|
|
1320
|
-
`
|
|
1416
|
+
`dock/` sits beside `src` and is not Quo: the beings, screens, model sides
|
|
1321
1417
|
and real harbors built on it, each folder with its own document. This
|
|
1322
1418
|
document does not read them, and they may not add a word to it. Its one
|
|
1323
1419
|
claim on them is that every harbor there passes `src/conformance/` untouched.
|
|
@@ -1384,10 +1480,11 @@ passes the same suite. Those tests are the checklist, not the mock.
|
|
|
1384
1480
|
replay, a restart, and every byte on the wire inspected for anything inner.
|
|
1385
1481
|
- `test/public.test.ts`: the public being, what the door does and does not
|
|
1386
1482
|
do for her.
|
|
1387
|
-
- `test/silence.test.ts`: the chapter "Silence,
|
|
1388
|
-
numbers: the five
|
|
1389
|
-
cases of the door with a partition snapshot under each,
|
|
1390
|
-
|
|
1483
|
+
- `test/silence.test.ts`: the chapter "Silence, the words, error" by its
|
|
1484
|
+
numbers: the five cases and two unreacheds of her ward, the thirteen
|
|
1485
|
+
cases of the door with a partition snapshot under each, seven strangers
|
|
1486
|
+
met with one silence and six bound keys hearing their word, hops refused
|
|
1487
|
+
at zero, and the six lines of the law of one silence.
|
|
1391
1488
|
- `test/blueprint.test.ts`: blueprints and instantiation through a real
|
|
1392
1489
|
ward. What a boot leaves behind, what a restart brings back when the code
|
|
1393
1490
|
moved under the cells, the gate and the door, the reserved ids.
|
|
@@ -1435,8 +1532,9 @@ passes the same suite. Those tests are the checklist, not the mock.
|
|
|
1435
1532
|
the frames are asserted with no network under them; the conformance
|
|
1436
1533
|
suite against two harbor cores over memory stores reaching each other
|
|
1437
1534
|
in-process, drop and adopt as the migration; a restart from the store
|
|
1438
|
-
with the hints; the dialer over a stubbed line, announce,
|
|
1439
|
-
|
|
1535
|
+
with the hints; the dialer over a stubbed line, announce, a claim proven
|
|
1536
|
+
at a real door before it binds and a claim nobody there holds left
|
|
1537
|
+
unbound, fallback, unbind and the wait before it dials again; and the frames against
|
|
1440
1538
|
`vectors/wire.json`, the ask, the reply, nothing delivered and the
|
|
1441
1539
|
announce, so a kit reproduces the bytes on a socket; and the request
|
|
1442
1540
|
reach against the request record in the same file, over a fetch that
|
|
@@ -1457,6 +1555,12 @@ passes the same suite. Those tests are the checklist, not the mock.
|
|
|
1457
1555
|
one by one; that the arithmetic spends every one of them; and the two ways
|
|
1458
1556
|
a terrain can be short -- no `crypto.subtle` at all, and a subtle without
|
|
1459
1557
|
the curves -- each failing at the first call, in one sentence.
|
|
1558
|
+
- `test/package.test.ts`: the package as a stranger meets it. The tarball
|
|
1559
|
+
is packed, installed into an empty folder with nothing but Node, and
|
|
1560
|
+
every entry point the exports map names is imported. Every other suite
|
|
1561
|
+
reaches the source through a path or a workspace link, which resolves
|
|
1562
|
+
outside `node_modules`, where Node strips types; this is the one that
|
|
1563
|
+
cannot.
|
|
1460
1564
|
- `test/bundle.test.ts`: the three words bundled as a consumer must bundle
|
|
1461
1565
|
them, the artefact read for anything a terrain cannot provide, and then the
|
|
1462
1566
|
whole conformance suite run out of the bundle.
|
|
@@ -1492,17 +1596,7 @@ passes the same suite. Those tests are the checklist, not the mock.
|
|
|
1492
1596
|
The only place this document may name a gap between itself and the tree.
|
|
1493
1597
|
Each line is a debt to close, not a note to keep.
|
|
1494
1598
|
|
|
1495
|
-
|
|
1496
|
-
announces a ward pk is bound to it, and nothing asks whether it holds that
|
|
1497
|
-
ward. So anyone who can reach a rendezvous can announce a pk that is not
|
|
1498
|
-
theirs, and asks for that pk are carried to them instead of to the harbor
|
|
1499
|
-
that holds it. They learn nothing by it: what arrives is sealed to a ward
|
|
1500
|
-
key they do not have, and they cannot answer, because a reply is signed by
|
|
1501
|
-
that ward. What they take is reachability, which is the one thing a
|
|
1502
|
-
rendezvous exists to give. Measured on the lab, 2026-09-04. The shape of
|
|
1503
|
-
the answer is a proof at the announce, the ward signing something the
|
|
1504
|
-
listener chose, so that binding a pk needs the key behind it; that is a
|
|
1505
|
-
decision this document has not taken.
|
|
1599
|
+
None today.
|
|
1506
1600
|
|
|
1507
1601
|
## Open
|
|
1508
1602
|
|
|
@@ -1581,8 +1675,12 @@ Decided here, so that the answer is not rediscovered:
|
|
|
1581
1675
|
- **blueprint**: her interface as she chooses to show it to one asker.
|
|
1582
1676
|
- **digest**: SHA-256 over the JCS of a blueprint. Per relation.
|
|
1583
1677
|
- **seen**: the digest her ward last saw arrive with an answer.
|
|
1584
|
-
- **silence**: the far side said nothing
|
|
1585
|
-
|
|
1678
|
+
- **silence**: the far side said nothing, or the door would not admit the
|
|
1679
|
+
bytes. Names no reason. Not retryable blindly.
|
|
1680
|
+
- **word**: the ward's reason, said only to a key the door has bound or by
|
|
1681
|
+
her own ward to her. Nine: removed, absent, unannounced, repeated, threw,
|
|
1682
|
+
unreached, late, invitation, dropped.
|
|
1683
|
+
- **unreached**: the word for no far door reached. Retryable.
|
|
1586
1684
|
- **notes**: hers, inside every occupant record. Quo never reads it.
|
|
1587
1685
|
- **partition**: the ward's files. Everything durable, every secret.
|
|
1588
1686
|
- **ward record**: what a harbor keeps to boot one ward again: seed,
|