@earendil-works/chord 1.2.0 → 1.3.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 (86) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +14 -13
  3. package/dist/cell.d.ts +30 -9
  4. package/dist/cell.d.ts.map +1 -1
  5. package/dist/cell.js +52 -12
  6. package/dist/cell.js.map +1 -1
  7. package/dist/cluster.d.ts +4 -3
  8. package/dist/cluster.d.ts.map +1 -1
  9. package/dist/cluster.js +58 -42
  10. package/dist/cluster.js.map +1 -1
  11. package/dist/connection.d.ts +171 -58
  12. package/dist/connection.d.ts.map +1 -1
  13. package/dist/connection.js +676 -217
  14. package/dist/connection.js.map +1 -1
  15. package/dist/contract.d.ts +120 -45
  16. package/dist/contract.d.ts.map +1 -1
  17. package/dist/contract.js +104 -15
  18. package/dist/contract.js.map +1 -1
  19. package/dist/declare.d.ts +11 -48
  20. package/dist/declare.d.ts.map +1 -1
  21. package/dist/declare.js +1 -21
  22. package/dist/declare.js.map +1 -1
  23. package/dist/delta/index.d.ts +2 -1
  24. package/dist/delta/index.d.ts.map +1 -1
  25. package/dist/delta/index.js +4 -0
  26. package/dist/delta/index.js.map +1 -1
  27. package/dist/errors.d.ts +4 -3
  28. package/dist/errors.d.ts.map +1 -1
  29. package/dist/errors.js +15 -0
  30. package/dist/errors.js.map +1 -1
  31. package/dist/host.d.ts +214 -120
  32. package/dist/host.d.ts.map +1 -1
  33. package/dist/host.js +446 -241
  34. package/dist/host.js.map +1 -1
  35. package/dist/index.d.ts +8 -8
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +4 -4
  38. package/dist/index.js.map +1 -1
  39. package/dist/link.d.ts +47 -12
  40. package/dist/link.d.ts.map +1 -1
  41. package/dist/link.js +200 -14
  42. package/dist/link.js.map +1 -1
  43. package/dist/loader.d.ts.map +1 -1
  44. package/dist/loader.js +7 -2
  45. package/dist/loader.js.map +1 -1
  46. package/dist/manager.d.ts.map +1 -1
  47. package/dist/manager.js +35 -9
  48. package/dist/manager.js.map +1 -1
  49. package/dist/object.d.ts +438 -0
  50. package/dist/object.d.ts.map +1 -0
  51. package/dist/{record.js → object.js} +614 -335
  52. package/dist/object.js.map +1 -0
  53. package/dist/output.d.ts +85 -0
  54. package/dist/output.d.ts.map +1 -0
  55. package/dist/output.js +350 -0
  56. package/dist/output.js.map +1 -0
  57. package/dist/registry.d.ts +3 -3
  58. package/dist/registry.d.ts.map +1 -1
  59. package/dist/registry.js +1 -1
  60. package/dist/registry.js.map +1 -1
  61. package/dist/reload.d.ts +35 -27
  62. package/dist/reload.d.ts.map +1 -1
  63. package/dist/reload.js +256 -192
  64. package/dist/reload.js.map +1 -1
  65. package/dist/remote.d.ts +130 -35
  66. package/dist/remote.d.ts.map +1 -1
  67. package/dist/remote.js +493 -189
  68. package/dist/remote.js.map +1 -1
  69. package/dist/types.d.ts +39 -28
  70. package/dist/types.d.ts.map +1 -1
  71. package/dist/types.js.map +1 -1
  72. package/dist/websocket.d.ts +4 -5
  73. package/dist/websocket.d.ts.map +1 -1
  74. package/dist/websocket.js +3 -2
  75. package/dist/websocket.js.map +1 -1
  76. package/dist/wire.d.ts +210 -129
  77. package/dist/wire.d.ts.map +1 -1
  78. package/dist/wire.js +108 -55
  79. package/dist/wire.js.map +1 -1
  80. package/docs/guide.md +267 -203
  81. package/docs/spec.md +141 -114
  82. package/docs/tutorial.md +257 -235
  83. package/package.json +6 -1
  84. package/dist/record.d.ts +0 -320
  85. package/dist/record.d.ts.map +0 -1
  86. package/dist/record.js.map +0 -1
package/dist/host.d.ts CHANGED
@@ -1,160 +1,231 @@
1
- import { type AcceptOptions, Connection, type LinkOptions, type RelayHold } from "./connection.ts";
2
- import { type AnyContract, type Handle, type InputOf, type LocalContract, type LocalDef, type RemoteContract, type RemoteDef } from "./contract.ts";
1
+ import { type AcceptOptions, Connection, type LinkOptions, type RelayRef } from "./connection.ts";
2
+ import { type AnyContract, type InputOf, type LocalContract, type LocalDef, type Ref, type RemoteContract, type RemoteDef } from "./contract.ts";
3
3
  import type { Link } from "./link.ts";
4
- import { type Decls, type Factory, type Hold, type HoldOwner, type HostCore, RecordImpl, type ServeOptions, type Service } from "./record.ts";
4
+ import { type Decls, type Factory, type HostCore, ObjectImpl, type RefCore, type RefOwner, type ServeOptionsFor, type Service } from "./object.ts";
5
5
  import type { Registry, RegistryTable, RegistryView } from "./registry.ts";
6
6
  import { type ReloadOptions, type ReloadReport } from "./reload.ts";
7
- import { RemoteHandle } from "./remote.ts";
8
- import type { Ctx, GetOptions, Principal } from "./types.ts";
7
+ import { RemoteBinding } from "./remote.ts";
8
+ import type { Ctx, GetOptions } from "./types.ts";
9
9
  import type { Frame } from "./wire.ts";
10
- /** The principal of in-host code. */
11
- export declare const hostPrincipal: Principal;
12
10
  /**
13
11
  * Registers a factory for a type. Overloaded on the contract's definition (not the contract type) so TypeScript
14
- * keeps literal `kind`s in factory returns.
12
+ * keeps literal `variant`s in factory returns. `P` is the app's principal type (see `createHost`).
15
13
  */
16
- export interface Serve {
17
- <D extends RemoteDef>(type: RemoteContract<D>, factory: Factory<RemoteContract<D>>, options?: ServeOptions<RemoteContract<D>>): void;
18
- <D extends LocalDef>(type: LocalContract<D>, factory: Factory<LocalContract<D>>, options?: ServeOptions<LocalContract<D>>): void;
14
+ export interface Serve<P = unknown> {
15
+ <D extends RemoteDef>(type: RemoteContract<D>, factory: Factory<RemoteContract<D>, P>, options?: ServeOptionsFor<RemoteContract<D>>): void;
16
+ <D extends LocalDef>(type: LocalContract<D>, factory: Factory<LocalContract<D>, P>, options?: ServeOptionsFor<LocalContract<D>>): void;
19
17
  }
20
18
  /**
21
19
  * What a facet's `setup` gets. `serve` registers types; `root` and `registry` give the facet's code that is not a
22
20
  * Chord method, listener or task (Durable tools and hooks, callbacks of native libraries) access to its own host,
23
21
  * so plugins never need a process-global host. Both may be kept and used after `setup` returns.
24
22
  */
25
- export interface FacetApi {
26
- readonly serve: Serve;
23
+ export interface FacetApi<P = unknown> {
24
+ readonly serve: Serve<P>;
27
25
  /** The host's name (`server`, `session:S1`, ...). */
28
26
  readonly name: string;
29
- /** Starts a root on the facet's host (in its current epoch at call time). */
30
- root<T>(fn: (ctx: Ctx) => T | Promise<T>, options?: RootOptions): Promise<T>;
31
- /** The facet's host's registry view (`get(key, ctx)` reads the table of `ctx.epoch`). */
27
+ /** Starts a root on the facet's host (in its current code version at call time). */
28
+ root<T>(fn: (ctx: Ctx<P>) => T | Promise<T>, options?: RootOptions<P>): Promise<T>;
29
+ /** The facet's host's registry view (`get(key, ctx)` reads the table of `ctx.codeVersion`). */
32
30
  registry<V>(registry: Registry<V>): RegistryView<V>;
31
+ /**
32
+ * Aborted when this run of the facet is no longer installed: a reload that replaced or removed it committed, the reload
33
+ * that loaded it aborted, or the host closed. While a reload prepares, the installed and the candidate run are both
34
+ * live.
35
+ */
36
+ readonly signal: AbortSignal;
33
37
  }
34
38
  /** What a facet module exports (default export): the code that serves its types on one host kind. */
35
- export interface FacetDefinition {
39
+ export interface FacetDefinition<P = unknown> {
36
40
  /** Contract tokens this facet consumes; checked against providers at reload. */
37
41
  readonly uses?: readonly AnyContract[];
38
- setup(api: FacetApi): void;
42
+ setup(api: FacetApi<P>): void;
39
43
  }
40
44
  /** A named facet. Modules are named by their URL; reloading a facet replaces everything it served. */
41
- export interface Facet extends FacetDefinition {
45
+ export interface Facet<P = unknown> extends FacetDefinition<P> {
42
46
  readonly name: string;
43
47
  }
44
- export declare const defineFacet: (setup: (api: FacetApi) => void, options?: {
48
+ /** `defineFacet<P>(…)`: an app passes its principal type, so factories and contexts see `P`. */
49
+ export declare const defineFacet: <P = unknown>(setup: (api: FacetApi<P>) => void, options?: {
45
50
  readonly uses?: readonly AnyContract[];
46
- }) => FacetDefinition;
51
+ }) => FacetDefinition<P>;
47
52
  /** Imports facet modules (fresh copies on every call) and names them by module URL. */
48
53
  export type FacetLoader = (modules: readonly (string | URL)[]) => Promise<Facet[]>;
49
54
  /** A facet object, or a module (path or URL) whose default export is a FacetDefinition. */
50
- export type PluginRef = Facet | string | URL;
51
- export interface HostOptions {
55
+ export type PluginRef<P = unknown> = Facet<P> | string | URL;
56
+ /**
57
+ * `P` is the app's principal type: who a caller is, JSON-serializable. Chord never makes one up: the app supplies the
58
+ * host's own (`self`), the one its parent's own requests act as (`connect`), the ones links act as (`accept`) and the
59
+ * ones routed hosts act as (`Route.principal`).
60
+ */
61
+ export interface HostOptions<P = unknown> {
52
62
  readonly name?: string;
53
- /** Maps a principal to its record key (should include connection provenance and grant revision). */
54
- readonly principalKey?: (principal: Principal) => string;
63
+ /**
64
+ * The principal of the host's own code: roots it starts, code inside its objects, and its `lifetime: "host"` objects.
65
+ * Compared by `principalKey`, so an equal principal from elsewhere reaches the same objects. Not used to infer `P`:
66
+ * pass the app's type as `createHost<P>(…)`.
67
+ */
68
+ readonly self: NoInfer<P>;
69
+ /** Maps a principal to its object key (should include connection provenance and grant revision). */
70
+ readonly principalKey?: (principal: P) => string;
55
71
  /** Validates every cell write and exposed state value against its schemas. */
56
72
  readonly dev?: boolean;
57
73
  /** Errors from background work (disposal, listeners, tasks). Defaults to console.error. */
58
74
  readonly onError?: (error: unknown) => void;
75
+ /**
76
+ * Milliseconds a reload waits for an object's aborted tasks to finish before it starts their replacements anyway
77
+ * (reported). Default 5000.
78
+ */
79
+ readonly taskStopDeadline?: number;
80
+ /**
81
+ * Milliseconds an activation (or a reload's prepare) waits for its references to be ready and hydrated, and an
82
+ * awaited `get` for its reference, before failing with `unavailable/ready_timeout`. Default 60000.
83
+ */
84
+ readonly readyTimeout?: number;
85
+ /**
86
+ * Consumer-side linger of remote references: when the last reference to a remote object is released, its binding
87
+ * stays held, and hydrated, for `types[typeName]` milliseconds, so a reference taken again meanwhile costs nothing
88
+ * on the link. At most `cap` bindings (default 4) linger; beyond, the least recently released go first. Types not
89
+ * listed do not linger. (The provider's own `serve(…, { linger })` keeps its object after the last reference.)
90
+ */
91
+ readonly linger?: {
92
+ readonly types?: Readonly<Record<string, number>>;
93
+ readonly cap?: number;
94
+ };
59
95
  /** Needed for `load`/`reload` with modules; `nodeLoader` from loader.ts in Node. */
60
96
  readonly loader?: FacetLoader;
61
- /** `client` (browser): never a reload participant, never carries roots or epochs. Default `host`. */
97
+ /** `client` (browser): never a reload participant, never carries roots or code versions. Default `host`. */
62
98
  readonly kind?: "host" | "client";
63
99
  /** The link to this host's parent (server). Can also be set later with `connect`. */
64
- readonly upstream?: Link;
65
- readonly upstreamOptions?: LinkOptions;
100
+ readonly upstream?: {
101
+ readonly link: Link;
102
+ } & ConnectOptions<P>;
103
+ }
104
+ /** `connect` options: the link's, and the principal its parent's own requests act as. */
105
+ export interface ConnectOptions<P = unknown> extends LinkOptions {
106
+ /** What a request from the parent acts as when the parent does not forward its caller's principal (its own code). */
107
+ readonly principal: P;
66
108
  }
67
109
  /** Where requests for hosts named `prefix…` go (on the server). */
68
- export interface Route {
110
+ export interface Route<P = unknown> {
69
111
  /** Checked before resolving (or spawning) and again after: grants may change meanwhile. */
70
- authorize(principal: Principal, hostName: string): boolean | Promise<boolean>;
112
+ authorize(principal: P, hostName: string): boolean | Promise<boolean>;
71
113
  /** A link to the host, spawned if needed. */
72
114
  resolve(hostName: string): Promise<Link>;
73
- /** Principal the resolved host acts as when it calls back (default `{ host: hostName }`). */
74
- readonly principal?: (hostName: string) => Principal;
115
+ /** The principal the resolved host acts as when it calls back. */
116
+ readonly principal: (hostName: string) => P;
75
117
  }
118
+ /** Fields a principal must have, equal (`deepEqual`), for an `invalidatePrincipal` pattern. */
119
+ export type PrincipalPattern<P> = P extends object ? {
120
+ readonly [K in keyof P]?: P[K];
121
+ } : Readonly<Record<string, unknown>>;
76
122
  /** `invalidatePrincipal` matches: a predicate (this host only), or a pattern (fields that must be equal; propagates). */
77
- export type PrincipalMatch = ((principal: Principal) => boolean) | Readonly<Record<string, unknown>>;
78
- export interface RootOptions {
79
- readonly principal?: Principal;
123
+ export type PrincipalMatch<P = unknown> = ((principal: P) => boolean) | PrincipalPattern<P>;
124
+ export interface RootOptions<P = unknown> {
125
+ readonly principal?: P;
80
126
  readonly signal?: AbortSignal;
81
- /** Start the root in a retained epoch (links carry epochs). Defaults to the current epoch. */
82
- readonly epoch?: number;
127
+ /** Start the root in a retained code version (links carry code versions). Defaults to the current code version. */
128
+ readonly codeVersion?: number;
83
129
  }
84
130
  export interface LoadOptions {
85
- /** Await eager activation (default true). False starts it but leaves readiness to `host.ready()`. */
86
- readonly awaitEager?: boolean;
131
+ /**
132
+ * Await the activation of the `lifetime: "host"` objects the facets serve (default true). False starts them but
133
+ * leaves readiness to `host.ready()` (a child host whose objects need its parent, which admits it only later).
134
+ */
135
+ readonly awaitHostObjects?: boolean;
87
136
  }
88
- export interface Host {
137
+ export interface Host<P = unknown> {
89
138
  readonly name: string;
90
- readonly epoch: number;
91
- readonly previousEpoch: number | undefined;
92
- readonly serve: Serve;
93
- /** Installs synchronously, then awaits this facet's eager objects unless `awaitEager` is false. */
94
- install(facet: Facet, options?: LoadOptions): Promise<void>;
95
- /** Installs all facets before awaiting their eager objects; lazy objects stay lazy. */
96
- load(plugins: readonly PluginRef[], options?: LoadOptions): Promise<void>;
97
- /** Awaits the eager holds present at call time, including those started by `serve` or deferred loads. */
139
+ readonly codeVersion: number;
140
+ readonly previousCodeVersion: number | undefined;
141
+ readonly serve: Serve<P>;
142
+ /** Installs synchronously, then awaits this facet's host objects unless `awaitHostObjects` is false. */
143
+ install(facet: Facet<P>, options?: LoadOptions): Promise<void>;
144
+ /** Installs all facets before awaiting their host objects; referenced objects are created when first referenced. */
145
+ load(plugins: readonly PluginRef<P>[], options?: LoadOptions): Promise<void>;
146
+ /** Awaits the host objects present at call time, including those started by `serve` or deferred loads. */
98
147
  ready(): Promise<void>;
99
- get<C extends AnyContract>(type: C, input: InputOf<C>, options?: GetOptions): Handle<C>;
100
- root<T>(fn: (ctx: Ctx) => T | Promise<T>, options?: RootOptions): Promise<T>;
148
+ /**
149
+ * A reference held until `release()`. Resolves once it is ready: live, with every state member of its variant
150
+ * (unless `state: false`). Rejects with the activation error, `aborted` (`signal`), or `unavailable/ready_timeout`
151
+ * after `readyTimeout`; the reference is released then.
152
+ */
153
+ get<C extends AnyContract>(type: C, input: InputOf<C>, options?: GetOptions<P> & {
154
+ readonly signal?: AbortSignal;
155
+ }): Promise<Ref<C>>;
156
+ /**
157
+ * The same reference, synchronously, possibly still `loading`: for UI runtimes that render its status (hooks, a
158
+ * TUI watch). Its state members throw `not_ready` until it is live.
159
+ */
160
+ hold<C extends AnyContract>(type: C, input: InputOf<C>, options?: GetOptions<P>): Ref<C>;
161
+ root<T>(fn: (ctx: Ctx<P>) => T | Promise<T>, options?: RootOptions<P>): Promise<T>;
101
162
  registry<V>(registry: Registry<V>): RegistryView<V>;
102
163
  /**
103
- * Force-disposes every record whose principal matches (never the host principal), re-stamps or closes matching
104
- * links, and propagates pattern matches to child hosts.
164
+ * Force-disposes every object whose principal matches (never the host's own principal), re-stamps or closes
165
+ * matching links, and propagates pattern matches to child hosts.
105
166
  */
106
- invalidatePrincipal(match: PrincipalMatch): Promise<void>;
167
+ invalidatePrincipal(match: PrincipalMatch<P>): Promise<void>;
107
168
  /** Accepts a child link (a worker or a browser); requests on it act as `options.principal`. */
108
- accept(link: Link, options: AcceptOptions): void;
109
- /** Sets (or replaces, after a reconnect) the link to this host's parent; remote handles re-hold over it. */
110
- connect(link: Link, options?: LinkOptions): void;
111
- route(prefix: string, route: Route): void;
169
+ accept(link: Link, options: AcceptOptions<P>): void;
170
+ /**
171
+ * Sets (or replaces, after a reconnect) the link to this host's parent; remote references re-hold over it. The
172
+ * parent's own requests act as `options.principal`; requests it relays act as the principal it forwards.
173
+ */
174
+ connect(link: Link, options: ConnectOptions<P>): void;
175
+ route(prefix: string, route: Route<P>): void;
112
176
  /** Reloads the given facets (modules are re-imported); facets not listed keep running unchanged. */
113
- reload(plugins: readonly PluginRef[], options?: ReloadOptions): Promise<ReloadReport>;
177
+ reload(plugins: readonly PluginRef<P>[], options?: ReloadOptions): Promise<ReloadReport>;
114
178
  close(): Promise<void>;
115
179
  }
116
- export interface EpochState {
180
+ export interface CodeVersionState {
117
181
  readonly id: number;
118
182
  readonly services: Map<string, Service>;
119
183
  tables: ReadonlyMap<string, RegistryTable<unknown>>;
120
184
  /** Running roots with the number of their calls running here. */
121
185
  readonly roots: Map<string, number>;
186
+ /** Aborts every root of this code version (forced retirement). */
187
+ readonly abort: AbortController;
122
188
  }
123
- export declare function createHost(options?: HostOptions): Host;
189
+ /** A host whose principals are `P` (the app's type; `unknown` if not given). */
190
+ export declare function createHost<P = unknown>(options: HostOptions<P>): Host<P>;
124
191
  export declare class HostImpl implements Host, HostCore {
125
192
  #private;
126
193
  readonly name: string;
127
194
  readonly dev: boolean;
128
- readonly principal: Principal;
195
+ readonly principal: unknown;
129
196
  inFactory: number;
130
197
  failed: unknown;
131
- readonly records: Map<string, RecordImpl>;
132
- readonly epochs: Map<number, EpochState>;
133
- readonly facets: Map<string, Facet>;
134
- readonly eager: Map<string, Hold>;
198
+ readonly objects: Map<string, ObjectImpl>;
199
+ readonly codeVersions: Map<number, CodeVersionState>;
200
+ readonly facets: Map<string, Facet<unknown>>;
201
+ /** The host's own references to its `lifetime: "host"` objects, by type name. */
202
+ readonly hostObjects: Map<string, RefCore>;
135
203
  readonly kind: "host" | "client";
136
204
  readonly connections: Set<Connection>;
137
205
  upstream: Connection | undefined;
138
- /** Remote handles this host holds (re-held after an upstream reconnect). */
139
- readonly remotes: Set<RemoteHandle>;
206
+ /** Shared bindings of this host's remote references, by key (re-held after an upstream reconnect). */
207
+ readonly bindings: Map<string, RemoteBinding>;
140
208
  /** Child facet modules by host-name prefix, from every committed cluster reload (for reconciling children). */
141
209
  remoteModules: Record<string, string[]>;
142
210
  /** Removal tombstones also reconcile children that connected during a transaction. */
143
211
  remoteRemoved: Record<string, string[]>;
144
- current: EpochState;
145
- previous: EpochState | undefined;
146
- /** The epoch a running reload will commit; new types activated during prepare install their behavior for it. */
147
- pending: EpochState | undefined;
212
+ current: CodeVersionState;
213
+ previous: CodeVersionState | undefined;
214
+ /** The code version a running reload will commit; new types activated during prepare install their implementation for it. */
215
+ pending: CodeVersionState | undefined;
148
216
  /** Activations of these types wait (reload gate). */
149
- /** Types behind a reload gate: new records of these types are rejected `upgrade_conflict` until commit/abort. */
217
+ /** Types behind a reload gate: new objects of these types are rejected `upgrade_conflict` until commit/abort. */
150
218
  gating: ReadonlySet<string> | undefined;
151
219
  reloading: boolean;
152
- retired: () => void;
220
+ readonly taskStopDeadline: number;
221
+ readonly readyTimeout: number;
153
222
  constructor(options: HostOptions);
154
- get epoch(): number;
155
- get previousEpoch(): number | undefined;
156
- /** Allocates the next epoch id, or adopts one issued by the coordinating server. */
157
- nextEpochId(given?: number): number;
223
+ /** Whether `principal` is the host's own: the same key as `self`. */
224
+ isSelf(principal: unknown): boolean;
225
+ get codeVersion(): number;
226
+ get previousCodeVersion(): number | undefined;
227
+ /** Allocates the next code version id, or adopts one issued by the coordinating server. */
228
+ nextCodeVersionId(given?: number): number;
158
229
  report(error: unknown): void;
159
230
  readonly serve: Serve;
160
231
  install(facet: Facet, options?: LoadOptions): Promise<void>;
@@ -162,28 +233,31 @@ export declare class HostImpl implements Host, HostCore {
162
233
  ready(): Promise<void>;
163
234
  /** Turns plugin references into facets, importing modules through the loader. */
164
235
  resolve(plugins: readonly PluginRef[]): Promise<Facet[]>;
165
- facetApi(serve: Serve): FacetApi;
236
+ facetApi(serve: Serve, signal: AbortSignal): FacetApi;
237
+ /** The installed run of facet `name` is now `run` (or none): the run it replaces is aborted. */
238
+ facetRunChanged(name: string, run: AbortController | undefined): void;
166
239
  serveInto(services: Map<string, Service>, service: Service): void;
167
- startEager(service: Service): Hold;
168
- currentEpoch(): number;
169
- hasEpoch(epoch: number): boolean;
170
- retainedEpochs(): Iterable<readonly [number, ReadonlyMap<string, Service>]>;
171
- pendingEpoch(): number | undefined;
172
- /** The current code for a type; a type a running reload adds is served from the pending epoch. */
240
+ startHostObject(service: Service): RefCore;
241
+ currentCodeVersion(): number;
242
+ hasCodeVersion(codeVersion: number): boolean;
243
+ retainedCodeVersions(): Iterable<readonly [number, ReadonlyMap<string, Service>]>;
244
+ pendingCodeVersion(): number | undefined;
245
+ /** The current code for a type; a type a running reload adds is served from the pending code version. */
173
246
  service(typeName: string): Service | undefined;
174
- addressOf(type: AnyContract, input: unknown, principal: Principal, at?: string, candidate?: boolean): string;
175
- acquire(type: AnyContract, input: unknown, options: GetOptions | undefined, owner: HoldOwner, from?: RecordImpl, candidate?: boolean): Hold;
176
- forget(record: RecordImpl): void;
177
- touch(rootId: string, record: RecordImpl): void;
247
+ addressOf(type: AnyContract, input: unknown, principal: unknown, candidate?: boolean): string;
248
+ acquire(type: AnyContract, input: unknown, options: GetOptions | undefined, owner: RefOwner, from?: ObjectImpl, candidate?: boolean): RefCore;
249
+ forget(object: ObjectImpl): void;
250
+ disposed(object: ObjectImpl): void;
251
+ touch(rootId: string, object: ObjectImpl): void;
178
252
  root<T>(fn: (ctx: Ctx) => T | Promise<T>, options?: RootOptions): Promise<T>;
179
253
  /**
180
- * Runs `fn` inside root `rootId` of `epoch`. A root counts as running here (for retirement) while any of its calls
181
- * runs here. A root that started here ends when its last call here settles, even if it went out and came back
182
- * over a link meanwhile. A foreign root (started elsewhere, arriving `from` a link) keeps its leases on records
254
+ * Runs `fn` inside root `rootId` of `codeVersion`. A root counts as running here (for retirement) while any of its
255
+ * calls runs here. A root that started here ends when its last call here settles, even if it went out and came back
256
+ * over a link meanwhile. A foreign root (started elsewhere, arriving `from` a link) keeps its leases on objects
183
257
  * until every link it came over announced its end (`root_end`) or closed, so its re-entry stays grandfathered.
184
258
  */
185
- joinRoot<T>(rootId: string, epochId: number, fn: (ctx: Ctx) => T | Promise<T>, options?: {
186
- readonly principal?: Principal;
259
+ joinRoot<T>(rootId: string, codeVersionId: number, fn: (ctx: Ctx) => T | Promise<T>, options?: {
260
+ readonly principal?: unknown;
187
261
  readonly signal?: AbortSignal;
188
262
  readonly from?: Connection;
189
263
  }): Promise<T>;
@@ -197,57 +271,77 @@ export declare class HostImpl implements Host, HostCore {
197
271
  */
198
272
  foreignRootEnded(rootId: string, from: Connection): void;
199
273
  /**
200
- * Retires the previous epoch once no local roots of it remain. A child also waits for its parent to retire it:
201
- * roots span hosts, and an old root on the server may still call in.
274
+ * Retires the previous code version once no local roots of it remain. A child also waits for its parent to retire
275
+ * it: roots span hosts, and an old root on the server may still call in.
202
276
  */
203
277
  maybeRetire(): void;
204
- allowRetire(epoch: number): void;
205
- /** Drops the previous epoch: its behaviors and the declarations only it used. */
278
+ /** The previous code version has no roots left here and, on a child host, the parent has retired it. */
279
+ retirable(): boolean;
280
+ allowRetire(codeVersion: number): void;
281
+ /** Calls `watcher` whenever a root ends, the parent allows a retirement, or a code version retires. */
282
+ watchRetirement(watcher: () => void): () => void;
283
+ /**
284
+ * Tells a child that is now in step which code versions this host retired before: every id below the oldest one it
285
+ * retains (ids only grow). Without it, a child reconciled after those retirements would never hear a `retire` frame for
286
+ * its own previous code version and would wait for the retire deadline at every reload.
287
+ */
288
+ announceRetired(connection: Connection): void;
289
+ /** Drops the previous code version: its implementations and the declarations only it used. */
206
290
  retire(): void;
207
291
  /**
208
- * Drops a record's behavior for `epoch` and what only that behavior declared, in disposal order: resources close
209
- * (reverse open order) before its holds are released.
292
+ * Drops an object's implementation for `codeVersion` and what only that implementation declared, in disposal order:
293
+ * resources close (reverse open order) before its references are released.
210
294
  */
211
- retireBehavior(record: RecordImpl, epoch: number): void;
295
+ retireImplementation(object: ObjectImpl, codeVersion: number): void;
212
296
  registry<V>(registry: Registry<V>): RegistryView<V>;
213
- /** Builds registry tables from (record, declarations) pairs. Throws registry_conflict. */
214
- buildTables(entries: Iterable<readonly [RecordImpl, Decls]>): Map<string, RegistryTable<unknown>>;
215
- /** Live records with their current declarations; records waiting for a reload's commit only with `candidates`. */
216
- liveDecls(candidates?: boolean): [RecordImpl, Decls][];
217
- checkRegistrations(record: RecordImpl, decls: Decls): void;
218
- registriesChanged(including?: RecordImpl): void;
297
+ /** Builds registry tables from (object, declarations) pairs. Throws registry_conflict. */
298
+ buildTables(entries: Iterable<readonly [ObjectImpl, Decls]>): Map<string, RegistryTable<unknown>>;
299
+ /** Live objects with their current declarations; objects waiting for a reload's commit only with `candidates`. */
300
+ liveDecls(candidates?: boolean): [ObjectImpl, Decls][];
301
+ checkRegistrations(object: ObjectImpl, decls: Decls): void;
302
+ registriesChanged(including?: ObjectImpl): void;
219
303
  /** A commit failed midway: from now on this host admits no work (calls fail `unavailable/host_failed`). */
220
304
  fail(error: unknown): void;
221
- /** Installs tables for `epoch`; subscribers hear about changed tables of the current epoch (all tables when `all`). */
222
- installTables(epoch: EpochState, tables: Map<string, RegistryTable<unknown>>, all?: boolean): void;
223
- get<C extends AnyContract>(type: C, input: InputOf<C>, options?: GetOptions): Handle<C>;
305
+ /** Installs tables for `codeVersion`; subscribers hear about changed tables of the current code version (all tables when `all`). */
306
+ installTables(codeVersion: CodeVersionState, tables: Map<string, RegistryTable<unknown>>, all?: boolean): void;
307
+ get<C extends AnyContract>(type: C, input: InputOf<C>, options?: GetOptions & {
308
+ readonly signal?: AbortSignal;
309
+ }): Promise<Ref<C>>;
310
+ hold<C extends AnyContract>(type: C, input: InputOf<C>, options?: GetOptions): Ref<C>;
224
311
  invalidatePrincipal(match: PrincipalMatch): Promise<void>;
225
312
  accept(link: Link, options: AcceptOptions): void;
226
- connect(link: Link, options?: LinkOptions): void;
313
+ connect(link: Link, options: ConnectOptions): void;
227
314
  route(prefix: string, route: Route): void;
228
315
  /**
229
- * A child host announced its epoch. In step: usable. Behind: fenced (nothing is routed to it) and reconciled by a
230
- * reload of its modules to this host's epoch, never by renumbering what it runs. Ahead: impossible, refused.
316
+ * A child host announced its code version. In step: usable. Behind: fenced (nothing is routed to it) and reconciled
317
+ * by a reload of its modules to this host's code version, never by renumbering what it runs. Ahead: impossible,
318
+ * refused.
231
319
  */
232
- peerHello(connection: Connection, epoch: number): void;
320
+ peerHello(connection: Connection, codeVersion: number): void;
321
+ /** The host's reload slot was freed: children that said hello meanwhile are synced or reconciled now. */
322
+ reloadEnded(): void;
323
+ /** Resolves once no reload runs on this host. */
324
+ whenReloadEnded(): Promise<void>;
233
325
  connectionClosed(connection: Connection): void;
234
- forgetRemote(handle: RemoteHandle): void;
326
+ /** The last reference to `binding` was released: it lingers if its type does (`HostOptions.linger`), else closes. */
327
+ bindingIdle(binding: RemoteBinding): void;
328
+ forgetBinding(binding: RemoteBinding): void;
235
329
  /**
236
- * Relays a hold from `relay.origin` to the host it names. Relaying needs a route: it is where authorization
330
+ * Relays a reference from `relay.origin` to the host it names. Relaying needs a route: it is where authorization
237
331
  * lives. The origin's authorization generation is re-checked after every await and right before forwarding, so a
238
332
  * revocation during resolution wins.
239
333
  */
240
- relay(relay: RelayHold): Promise<void>;
334
+ relay(relay: RelayRef): Promise<void>;
241
335
  reload(plugins: readonly PluginRef[], options?: ReloadOptions): Promise<ReloadReport>;
242
336
  onReloadFrame(connection: Connection, frame: Extract<Frame, {
243
337
  t: "prepare" | "commit" | "abort";
244
338
  }>): void;
245
339
  rememberRemoteModules(remote: Readonly<Record<string, readonly string[]>> | undefined, remove: Readonly<Record<string, readonly string[]>> | undefined): void;
246
- /** The epoch id the next reload would commit. */
247
- peekNextEpoch(): number;
340
+ /** The code version id the next reload would commit. */
341
+ peekNextCodeVersion(): number;
248
342
  /**
249
- * Disposes every record, holders before what they hold (a resource's `close` may still use the objects its record
250
- * holds, local or remote), then closes the links.
343
+ * Disposes every object, holders before what they reference (a resource's `close` may still use the objects its object
344
+ * references, local or remote), then closes the links.
251
345
  */
252
346
  close(): Promise<void>;
253
347
  }
@@ -1 +1 @@
1
- {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAE,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,i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