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.
- package/CONTRIBUTING.md +13 -0
- package/LICENSE +55 -202
- package/NOTICE +3 -8
- package/README.md +14 -156
- package/RELEASING.md +15 -0
- package/SECURITY.md +9 -0
- package/bin/nervur.js +6 -0
- package/package.json +26 -81
- package/AUTHORING.md +0 -935
- package/COMMAND.md +0 -179
- package/FACES.md +0 -280
- package/FACULTIES.md +0 -578
- package/GROUNDS.md +0 -315
- package/KIT-SPEC.md +0 -304
- package/WORLD.md +0 -195
- package/dist/app/app-ground.d.ts +0 -18
- package/dist/app/app-ground.js +0 -23
- package/dist/app/index.d.ts +0 -2
- package/dist/app/index.js +0 -5
- package/dist/app/native.d.ts +0 -11
- package/dist/app/native.js +0 -13
- package/dist/being/being.d.ts +0 -306
- package/dist/being/being.js +0 -20
- package/dist/being/covers.d.ts +0 -9
- package/dist/being/covers.js +0 -21
- package/dist/being/index.d.ts +0 -4
- package/dist/being/index.js +0 -6
- package/dist/being/need.d.ts +0 -49
- package/dist/being/need.js +0 -33
- package/dist/being/schema.d.ts +0 -100
- package/dist/being/schema.js +0 -132
- package/dist/being/table.d.ts +0 -48
- package/dist/being/table.js +0 -344
- package/dist/bench/bench-ground.d.ts +0 -73
- package/dist/bench/bench-ground.js +0 -153
- package/dist/bench/bench.d.ts +0 -101
- package/dist/bench/bench.js +0 -368
- package/dist/bench/fake-clock.d.ts +0 -17
- package/dist/bench/fake-clock.js +0 -34
- package/dist/bench/fake-memory.d.ts +0 -16
- package/dist/bench/fake-memory.js +0 -46
- package/dist/bench/fake-network.d.ts +0 -66
- package/dist/bench/fake-network.js +0 -222
- package/dist/bench/fake-unlock.d.ts +0 -6
- package/dist/bench/fake-unlock.js +0 -10
- package/dist/bench/index.d.ts +0 -3
- package/dist/bench/index.js +0 -5
- package/dist/bench/seeded.d.ts +0 -11
- package/dist/bench/seeded.js +0 -37
- package/dist/bench/settle.d.ts +0 -2
- package/dist/bench/settle.js +0 -49
- package/dist/bench/stewards.d.ts +0 -169
- package/dist/bench/stewards.js +0 -128
- package/dist/bodies/class-list.d.ts +0 -14
- package/dist/bodies/class-list.js +0 -33
- package/dist/bodies/joined-carry.d.ts +0 -29
- package/dist/bodies/joined-carry.js +0 -48
- package/dist/bodies/kept.d.ts +0 -44
- package/dist/bodies/kept.js +0 -91
- package/dist/bodies/noble-crypto.d.ts +0 -22
- package/dist/bodies/noble-crypto.js +0 -88
- package/dist/bodies/seed-keys.d.ts +0 -10
- package/dist/bodies/seed-keys.js +0 -42
- package/dist/bodies/strict-tools.d.ts +0 -10
- package/dist/bodies/strict-tools.js +0 -306
- package/dist/bodies/vouch.d.ts +0 -20
- package/dist/bodies/vouch.js +0 -71
- package/dist/bodies/web-carry.d.ts +0 -72
- package/dist/bodies/web-carry.js +0 -245
- package/dist/bodies/web-clock.d.ts +0 -12
- package/dist/bodies/web-clock.js +0 -33
- package/dist/browser/browser-ground.d.ts +0 -76
- package/dist/browser/browser-ground.js +0 -294
- package/dist/browser/index.d.ts +0 -4
- package/dist/browser/index.js +0 -7
- package/dist/browser/indexeddb-memory.d.ts +0 -17
- package/dist/browser/indexeddb-memory.js +0 -97
- package/dist/browser/locked-unlock.d.ts +0 -24
- package/dist/browser/locked-unlock.js +0 -85
- package/dist/browser/origin-classes.d.ts +0 -7
- package/dist/browser/origin-classes.js +0 -31
- package/dist/edge/durable-clock.d.ts +0 -19
- package/dist/edge/durable-clock.js +0 -61
- package/dist/edge/durable-memory.d.ts +0 -5
- package/dist/edge/durable-memory.js +0 -11
- package/dist/edge/durable.d.ts +0 -18
- package/dist/edge/durable.js +0 -24
- package/dist/edge/edge-ground.d.ts +0 -49
- package/dist/edge/edge-ground.js +0 -223
- package/dist/edge/index.d.ts +0 -7
- package/dist/edge/index.js +0 -9
- package/dist/edge/native-crypto.d.ts +0 -8
- package/dist/edge/native-crypto.js +0 -102
- package/dist/edge/secret-unlock.d.ts +0 -7
- package/dist/edge/secret-unlock.js +0 -13
- package/dist/edge/socket-carry.d.ts +0 -39
- package/dist/edge/socket-carry.js +0 -111
- package/dist/foundation.d.ts +0 -162
- package/dist/foundation.js +0 -4
- package/dist/ground/dock.d.ts +0 -1460
- package/dist/ground/dock.js +0 -1159
- package/dist/ground/ground.d.ts +0 -239
- package/dist/ground/ground.js +0 -787
- package/dist/ground/views.d.ts +0 -76
- package/dist/ground/views.js +0 -208
- package/dist/house/crossing.d.ts +0 -50
- package/dist/house/crossing.js +0 -153
- package/dist/house/house.d.ts +0 -88
- package/dist/house/house.js +0 -2069
- package/dist/house/rows-shape.d.ts +0 -110
- package/dist/house/rows-shape.js +0 -12
- package/dist/house/rows.d.ts +0 -27
- package/dist/house/rows.js +0 -185
- package/dist/index.d.ts +0 -33
- package/dist/index.js +0 -29
- package/dist/node/bridge.d.ts +0 -20
- package/dist/node/bridge.js +0 -284
- package/dist/node/cli.d.ts +0 -2
- package/dist/node/cli.js +0 -225
- package/dist/node/file-memory.d.ts +0 -13
- package/dist/node/file-memory.js +0 -86
- package/dist/node/folder-classes.d.ts +0 -5
- package/dist/node/folder-classes.js +0 -40
- package/dist/node/gone.d.ts +0 -2
- package/dist/node/gone.js +0 -7
- package/dist/node/hand.d.ts +0 -39
- package/dist/node/hand.js +0 -107
- package/dist/node/http.d.ts +0 -11
- package/dist/node/http.js +0 -90
- package/dist/node/index.d.ts +0 -11
- package/dist/node/index.js +0 -13
- package/dist/node/ledger-memory.d.ts +0 -17
- package/dist/node/ledger-memory.js +0 -152
- package/dist/node/lock.d.ts +0 -10
- package/dist/node/lock.js +0 -78
- package/dist/node/node-ground.d.ts +0 -26
- package/dist/node/node-ground.js +0 -228
- package/dist/node/notify.d.ts +0 -1
- package/dist/node/notify.js +0 -18
- package/dist/node/shell.d.ts +0 -11
- package/dist/node/shell.js +0 -35
- package/dist/node/sync-folder.d.ts +0 -6
- package/dist/node/sync-folder.js +0 -18
- package/dist/node/tcp-carry.d.ts +0 -42
- package/dist/node/tcp-carry.js +0 -193
- package/dist/node/unlock.d.ts +0 -17
- package/dist/node/unlock.js +0 -86
- package/dist/node/websocket.d.ts +0 -12
- package/dist/node/websocket.js +0 -134
- package/dist/quo/frame.d.ts +0 -33
- package/dist/quo/frame.js +0 -92
- package/dist/quo/index.d.ts +0 -1
- package/dist/quo/index.js +0 -5
- package/dist/quo/room.d.ts +0 -154
- package/dist/quo/room.js +0 -362
- package/dist/serve/index.d.ts +0 -45
- package/dist/serve/index.js +0 -71
package/dist/ground/ground.d.ts
DELETED
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import type { Json } from '../being/being.ts';
|
|
2
|
-
import { type Schema } from '../being/schema.ts';
|
|
3
|
-
import type { Handler } from '../bodies/web-carry.ts';
|
|
4
|
-
import type { Carry, Memory } from '../foundation.ts';
|
|
5
|
-
import { type Answer, type OpenedContext } from '../house/house.ts';
|
|
6
|
-
/** A door, as a carry hooks it. */
|
|
7
|
-
export type Door = (box: Uint8Array) => Promise<Uint8Array | null>;
|
|
8
|
-
/** The ground's one key, kept outside it by its host. */
|
|
9
|
-
export interface Unlock {
|
|
10
|
-
/** Sixty-four lowercase hex digits: drawn and kept where none is kept yet. */
|
|
11
|
-
key(): Promise<string>;
|
|
12
|
-
}
|
|
13
|
-
/** A carry the ground hooks doors to, and unhooks them from. */
|
|
14
|
-
export interface Hooked extends Carry {
|
|
15
|
-
listen(options: {
|
|
16
|
-
ward: string;
|
|
17
|
-
door: Door;
|
|
18
|
-
}): void | Promise<void>;
|
|
19
|
-
unlisten(options: {
|
|
20
|
-
ward: string;
|
|
21
|
-
}): void;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* The contract a body fills: the primordial, the unlock, the memory,
|
|
25
|
-
* crypto, tools, the ground's work and the hand, then what every house
|
|
26
|
-
* receives.
|
|
27
|
-
*/
|
|
28
|
-
export type Serves = 'unlock' | 'memory' | 'crypto' | 'tools' | 'ground' | 'hand' | 'carry' | 'clock' | 'classes';
|
|
29
|
-
/** What a faculty's `up` and `install` receive: its name, its args, its secrets, its sealed memory, and the bodies it calls. */
|
|
30
|
-
export interface Up {
|
|
31
|
-
readonly name: string;
|
|
32
|
-
readonly args: Readonly<Record<string, Json>>;
|
|
33
|
-
readonly secrets: Readonly<Record<string, string>>;
|
|
34
|
-
readonly memory: Memory;
|
|
35
|
-
/** The object of each body its entry names in `faculties`. */
|
|
36
|
-
readonly faculties: Readonly<Record<string, object>>;
|
|
37
|
-
}
|
|
38
|
-
/** What one house receives of a foundation body: the house's name, and the args its entry holds. */
|
|
39
|
-
export interface ForHouse {
|
|
40
|
-
readonly house: string;
|
|
41
|
-
readonly args: Readonly<Record<string, Json>>;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* A faculty stood: the living instance houses and bodies use. Each part
|
|
45
|
-
* where it has one: an offer to beings, a handler for the listener, a
|
|
46
|
-
* registry for the rungs above it, the contract it serves, and what it
|
|
47
|
-
* lets go of when it goes down.
|
|
48
|
-
*/
|
|
49
|
-
export interface Body {
|
|
50
|
-
readonly blueprint?: unknown;
|
|
51
|
-
readonly object?: object;
|
|
52
|
-
/** How long the body remembers a call id, in milliseconds. */
|
|
53
|
-
readonly window?: number;
|
|
54
|
-
readonly handler?: Handler;
|
|
55
|
-
readonly registry?: Registry;
|
|
56
|
-
readonly serves?: Serves;
|
|
57
|
-
/** The schemes of the addresses a carry body speaks. */
|
|
58
|
-
readonly schemes?: readonly string[];
|
|
59
|
-
/** The port its listener holds once it is up, which its twin keeps as a cell. */
|
|
60
|
-
readonly port?: number;
|
|
61
|
-
/** What one house receives of a body serving `memory` or `classes`. */
|
|
62
|
-
house?(options: ForHouse): unknown;
|
|
63
|
-
/** Told when a house it is offered to opens, with the context that calls its tokens there. */
|
|
64
|
-
opened?(context: OpenedContext): void | Promise<void>;
|
|
65
|
-
down?(): void | Promise<void>;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* What a faculty takes: the args of its entry, held to a schema in the
|
|
69
|
-
* house's subset, and each secret its entry must name, by name with what
|
|
70
|
-
* it holds. An entry that fails it is refused at the hand and stays down
|
|
71
|
-
* at the boot.
|
|
72
|
-
*/
|
|
73
|
-
export interface Takes {
|
|
74
|
-
readonly args?: Schema;
|
|
75
|
-
readonly secrets?: Readonly<Record<string, string>>;
|
|
76
|
-
}
|
|
77
|
-
/** Code a registry holds by name: what it takes, `up` raising it into a body, and `install` doing the slow work once for each entry. */
|
|
78
|
-
export interface Faculty {
|
|
79
|
-
readonly takes?: Takes;
|
|
80
|
-
install?(made: Up): void | Promise<void>;
|
|
81
|
-
up(made: Up): Body | Promise<Body>;
|
|
82
|
-
}
|
|
83
|
-
/** Code that holds faculties by name. */
|
|
84
|
-
export interface Registry {
|
|
85
|
-
readonly faculties?: Readonly<Record<string, Faculty>>;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Registries joined as one rung, the first first. A name one holds is
|
|
89
|
-
* refused to the next, never replaced. No entry exports it; every shipped
|
|
90
|
-
* ground joins its first rung with it.
|
|
91
|
-
*/
|
|
92
|
-
export declare const joinedRegistry: (...registries: readonly Registry[]) => Registry;
|
|
93
|
-
/** One foundation body a house names: the faculty that serves it, and the args it hands this house. */
|
|
94
|
-
export interface BodyNamed {
|
|
95
|
-
readonly faculty: string;
|
|
96
|
-
readonly [argument: string]: Json | undefined;
|
|
97
|
-
}
|
|
98
|
-
/** One house's entry: its code, its memory where it takes one, its faculties, and its bound on every ask. */
|
|
99
|
-
export interface Entry {
|
|
100
|
-
readonly classes: BodyNamed;
|
|
101
|
-
readonly memory?: BodyNamed;
|
|
102
|
-
readonly faculties?: readonly string[];
|
|
103
|
-
readonly wait?: number;
|
|
104
|
-
}
|
|
105
|
-
/** One faculty's entry: where it stands, what it is handed, the bodies it calls, and its grant. */
|
|
106
|
-
export interface FacultyEntry {
|
|
107
|
-
readonly make?: string;
|
|
108
|
-
readonly from?: string;
|
|
109
|
-
readonly args?: Readonly<Record<string, Json>>;
|
|
110
|
-
readonly secrets?: readonly string[];
|
|
111
|
-
readonly faculties?: readonly string[];
|
|
112
|
-
readonly kinds?: readonly string[];
|
|
113
|
-
}
|
|
114
|
-
/** A house as the ground holds it: open with its ward, or closed and why. */
|
|
115
|
-
export interface Standing {
|
|
116
|
-
readonly name: string;
|
|
117
|
-
readonly entry: Entry;
|
|
118
|
-
readonly ward?: string;
|
|
119
|
-
readonly why?: string;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* What the ground's hand takes, as every terrain serves it: `describe`, or
|
|
123
|
-
* an ask as `root` of a being, in the house it names or in the dock where
|
|
124
|
-
* it names none. With no id, the house's steward is asked.
|
|
125
|
-
*/
|
|
126
|
-
export interface HandAsk {
|
|
127
|
-
readonly describe?: true;
|
|
128
|
-
readonly house?: string;
|
|
129
|
-
readonly id?: string;
|
|
130
|
-
readonly method?: string;
|
|
131
|
-
readonly args?: Json;
|
|
132
|
-
/** The answer the owner holds, which makes a `readOnly` ask a watch. */
|
|
133
|
-
readonly after?: Answer;
|
|
134
|
-
/** Her cells read, and nothing asked. */
|
|
135
|
-
readonly cells?: true;
|
|
136
|
-
/** The call's id: the same id asked again answers what the first answered, and runs nothing twice. */
|
|
137
|
-
readonly call?: string;
|
|
138
|
-
}
|
|
139
|
-
/** What the ground's hand shows its owner: the dock's asks, every body of the ladder, and every house. */
|
|
140
|
-
export interface Described {
|
|
141
|
-
readonly dock: Json;
|
|
142
|
-
readonly faculties: Readonly<Record<string, Json>>;
|
|
143
|
-
readonly houses: readonly Standing[];
|
|
144
|
-
}
|
|
145
|
-
/** The entries the host names, raised on the terrain's args around the dock: the memory, the unlock, crypto, tools and the clock before it, and the hand after it. */
|
|
146
|
-
export interface Primordial {
|
|
147
|
-
readonly unlock: FacultyEntry;
|
|
148
|
-
readonly memory: FacultyEntry;
|
|
149
|
-
readonly crypto: FacultyEntry;
|
|
150
|
-
readonly tools: FacultyEntry;
|
|
151
|
-
/** The ground's one clock, which the dock and every house receive. */
|
|
152
|
-
readonly clock: FacultyEntry;
|
|
153
|
-
/** Where the owner reaches the hand: a socket, a key, a channel. It names `ground` in its faculties. */
|
|
154
|
-
readonly hand?: FacultyEntry;
|
|
155
|
-
}
|
|
156
|
-
/** What `Ground.open` takes, all of it the host's. */
|
|
157
|
-
export interface GroundOptions {
|
|
158
|
-
/** The ladder's first rung: the terrain's faculties, and whatever the host installs beside them. */
|
|
159
|
-
readonly registry: Registry;
|
|
160
|
-
readonly primordial: Primordial;
|
|
161
|
-
/** The terrain's default entries; an entry the owner lands under the same name stands in its place. */
|
|
162
|
-
readonly entries?: Readonly<Record<string, FacultyEntry>>;
|
|
163
|
-
/** The terrain's bound on every ask of every house, in milliseconds; the one the owner sets through the dock stands in its place. */
|
|
164
|
-
readonly wait?: number;
|
|
165
|
-
/**
|
|
166
|
-
* A ground woken per event opens a house only when something reaches it:
|
|
167
|
-
* a box for its ward, or the hand. A house whose ward it never learned
|
|
168
|
-
* opens at the boot. `wake()` opens every one. The dock opens at every
|
|
169
|
-
* boot all the same.
|
|
170
|
-
*/
|
|
171
|
-
readonly lazy?: boolean;
|
|
172
|
-
}
|
|
173
|
-
export declare class Ground {
|
|
174
|
-
#private;
|
|
175
|
-
private constructor();
|
|
176
|
-
/**
|
|
177
|
-
* A ground opened on its host's registry and entries: the primordial
|
|
178
|
-
* bodies go up, the dock opens on them and stands the ladder and every
|
|
179
|
-
* house, and the hand goes up.
|
|
180
|
-
*/
|
|
181
|
-
static open(options: GroundOptions): Promise<Ground>;
|
|
182
|
-
/** Every house that stands closed until reached, opened now, as a wake by alarm needs: each arms its own times again. */
|
|
183
|
-
wake(): Promise<void>;
|
|
184
|
-
/** Every house of the dock, open with its ward, or closed and why. The dock is none of them. */
|
|
185
|
-
list(): readonly Standing[];
|
|
186
|
-
/** A house added through the dock and opened, as the hand adds one. */
|
|
187
|
-
add(name: string, entry: Entry): Promise<Standing>;
|
|
188
|
-
/** A new entry landed over a house's through the dock, and the house opened again on it. */
|
|
189
|
-
update(name: string, entry: Entry): Promise<Standing>;
|
|
190
|
-
/** A house closed and its entry dropped through the dock. Its seed and its places stay. */
|
|
191
|
-
remove(name: string): Promise<void>;
|
|
192
|
-
/** A body raised through the dock on its entry, answering why it is down where it is. */
|
|
193
|
-
stand(name: string, entry: FacultyEntry): Promise<{
|
|
194
|
-
readonly why?: string;
|
|
195
|
-
}>;
|
|
196
|
-
/** A new entry landed over a faculty's through the dock. */
|
|
197
|
-
restand(name: string, entry: FacultyEntry): Promise<{
|
|
198
|
-
readonly why?: string;
|
|
199
|
-
}>;
|
|
200
|
-
/** A body taken down and up again through the dock. */
|
|
201
|
-
restart(name: string): Promise<{
|
|
202
|
-
readonly why?: string;
|
|
203
|
-
}>;
|
|
204
|
-
/** A body taken down and its entry dropped through the dock, where no house and no body uses it. */
|
|
205
|
-
unstand(name: string): Promise<void>;
|
|
206
|
-
/** A being in a house asked as `root`, by her id, or the house's steward where none is named. */
|
|
207
|
-
ask({ house, ...request }: Omit<HandAsk, 'describe' | 'house'> & {
|
|
208
|
-
readonly house: string;
|
|
209
|
-
}): Promise<Answer | {
|
|
210
|
-
readonly describe: Json;
|
|
211
|
-
}>;
|
|
212
|
-
/**
|
|
213
|
-
* The ground's hand, one request at a time, as every terrain serves it:
|
|
214
|
-
* `describe`, or an ask as `root` of a being in the house it names, or of
|
|
215
|
-
* a being of the dock where it names none. It is the one road into the
|
|
216
|
-
* ground: every change is an ask of the dock. A secret's cells are read
|
|
217
|
-
* by no one through it.
|
|
218
|
-
*/
|
|
219
|
-
hand({ describe, house, ...request }: HandAsk): Promise<Answer | {
|
|
220
|
-
readonly describe: Json;
|
|
221
|
-
}>;
|
|
222
|
-
/**
|
|
223
|
-
* What the ground's hand shows its owner: the asks the dock's steward
|
|
224
|
-
* shows `root`, every body of the ladder with its methods, what it serves,
|
|
225
|
-
* or why it is down, each method's description, args, result and hints,
|
|
226
|
-
* and every house. A face reads it and needs no code of its own for any
|
|
227
|
-
* of them.
|
|
228
|
-
*/
|
|
229
|
-
describe(): Promise<Described>;
|
|
230
|
-
/**
|
|
231
|
-
* The one handler the ground's listener chains: the hand's where it
|
|
232
|
-
* serves one, then each standing body's in the ladder's order, read as
|
|
233
|
-
* each request arrives, so a body raised while the ground runs is served
|
|
234
|
-
* at once.
|
|
235
|
-
*/
|
|
236
|
-
readonly handler: Handler;
|
|
237
|
-
/** The hand down first, then every house closed through its views, the dock, every body in the reverse of the ladder, and the primordial last. */
|
|
238
|
-
close(): Promise<void>;
|
|
239
|
-
}
|