@northtalk/ts 0.6.0 → 0.8.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/{binary-value-C4ZiXVjv.d.ts → binary-value-B93hEK7l.d.ts} +1 -1
- package/{checker-CUhn2XaM.js → checker-Q4w7rLXk.js} +600 -85
- package/{core-egHbNmve.d.ts → core-BBPI6EhG.d.ts} +1 -1
- package/{debug--Of4MSLw.d.ts → debug-s6QIovKS.d.ts} +142 -10
- package/debug.d.ts +1 -1
- package/debug.js +1 -1
- package/{driver-BIm1mL77.d.ts → driver-D5yrK3Nu.d.ts} +1 -1
- package/driver.d.ts +1 -1
- package/driver.js +1 -1
- package/encoding-B7MCQ4ii.js +338 -0
- package/{engine-DbDcopGM.d.ts → engine-Dy-BCoiw.d.ts} +2 -2
- package/{engine-CXf5FCwi.js → engine-OL1BveVZ.js} +6 -6
- package/{errors-D11zizZg.js → errors-VuwK669R.js} +157 -23
- package/{group-BpzTo0k4.js → group-Ccuqwq12.js} +477 -110
- package/{http-fetch-DFwVIOQg.js → http-fetch--O27xjSW.js} +2 -2
- package/http.d.ts +1 -1
- package/http.js +4 -4
- package/index.d.ts +6 -6
- package/index.js +15 -14
- package/{inline-grants-XbX9HL_w.js → inline-grants-DmOdgSoK.js} +4 -5
- package/{lean-aCvN6y52.js → lean-BjhQvHyr.js} +13 -8
- package/{lean-DiS9rUcn.d.ts → lean-D6DQfbqH.d.ts} +42 -7
- package/lean.d.ts +6 -6
- package/lean.js +15 -14
- package/{manifest-CCfpn0kC.js → manifest-BeViDIoy.js} +4 -3
- package/{manifest-mpivREn-.d.ts → manifest-l07K7nW-.d.ts} +4 -2
- package/message-layer.d.ts +2 -2
- package/message-layer.js +2 -2
- package/notify.d.ts +1 -1
- package/notify.js +1 -1
- package/{objects-DmUc0lha.js → objects-TarIKBL8.js} +1 -1
- package/{objects-DYq_YvaQ.d.ts → objects-q0lnCK-4.d.ts} +8 -3
- package/{operations-DnCcztkZ.js → operations-BAELnqwf.js} +133 -58
- package/package.json +5 -1
- package/peer-capability-B8eKbljR.js +151 -0
- package/peer.d.ts +180 -0
- package/peer.js +559 -0
- package/{readers-8WCimMop.d.ts → readers-AeB1bJ--.d.ts} +1 -1
- package/{readers-CsvlahLi.js → readers-BG8g59qS.js} +1 -1
- package/{request-pump-binary-oqjWFqZA.js → request-pump-binary-87klb6sX.js} +9 -4
- package/{router-BZ-aYeXA.js → router-DXmPA-qi.js} +4 -4
- package/{router-BQsO8aPV.d.ts → router-DXoJ_2Z4.d.ts} +2 -2
- package/session.d.ts +2 -2
- package/session.js +64 -16
- package/setup.d.ts +3 -2
- package/setup.js +14 -16
- package/sqlite.d.ts +2 -2
- package/sqlite.js +5 -5
- package/{store-DHlo6fP5.js → store-DzpyWjt2.js} +2 -2
- package/store-capability-CxQJ_Huz.js +187 -0
- package/store.d.ts +2 -2
- package/store.js +2 -2
- package/{user-capability-BcRQyyEw.js → user-capability-ClYd8Vln.js} +3 -4
- package/wasm.d.ts +13 -6
- package/wasm.js +47 -19
- package/encoding-RUuES_e4.js +0 -99
- package/store-capability-BrUUAwVS.js +0 -389
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { B as restore,
|
|
2
|
+
import { B as restore, Bn as compileLibrary, en as Core, vt as defineObjectKind, z as newGroup } from "./debug-s6QIovKS.js";
|
|
3
3
|
//#region src/save-format.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A save's State Fingerprint (ADR 0142), read from its header and frames
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
2
|
//#region src/syntax.d.ts
|
|
3
|
-
type SyntaxErrorCode = 'unterminated interpolation' | 'empty interpolation' | 'invalid text escape' | 'invalid text indentation' | 'invalid text delimiter' | 'bad character' | 'unterminated text' | 'bad unit' | 'unit without number' | 'unexpected token' | 'not a container';
|
|
3
|
+
type SyntaxErrorCode = 'unterminated interpolation' | 'empty interpolation' | 'invalid text escape' | 'invalid text indentation' | 'invalid text delimiter' | 'bad character' | 'unterminated text' | 'bad unit' | 'unit without number' | 'unexpected token' | 'reserved word' | 'repeat with' | 'not a container';
|
|
4
4
|
/** All offsets index the original TS string; line and col count Unicode scalars. */
|
|
5
5
|
type Trivia = {
|
|
6
6
|
col: number;
|
|
@@ -10,7 +10,7 @@ type Trivia = {
|
|
|
10
10
|
pos: number;
|
|
11
11
|
raw: string;
|
|
12
12
|
};
|
|
13
|
-
type SyntaxRule = 'Source' | 'Entry' | 'Error' | 'Declaration' | 'Use' | 'Handler' | 'Parameter' | 'Function' | 'Block' | 'Body' | 'Statement' | 'SimpleStatement' | 'ExpressionList' | 'Container' | 'AndWait' | 'ResultTarget' | 'Send' | 'AskTell' | 'TellBlock' | 'TimeoutBlock' | 'OperationLine' | 'Wait' | 'Event' | 'If' | 'Repeat' | 'Collecting' | 'Match' | 'Try' | 'OfferClause' | 'OfferParameter' | 'RecoveryMarker' | 'ChooseOffer' | 'Replace' | 'IgnoringCase' | 'Expression' | 'Lambda' | 'Whose' | 'EveryHead' | 'WhoseKey' | 'Default' | 'Or' | 'And' | 'Not' | 'Comparison' | 'Concat' | 'Range' | 'Additive' | 'Multiplicative' | 'Power' | 'Unary' | 'Conversion' | 'Kind' | 'ChunkLevel' | 'Postfix' | 'Key' | 'Call' | 'Primary' | 'Interpolated' | 'Chunk' | 'The' | 'List' | 'MapKey' | 'Map' | 'Pattern' | 'PatternPrimary' | 'TextPattern' | 'Alternation' | 'Element' | 'Atom' | 'BinaryPattern' | 'Field' | 'AsText' | 'FieldType' | 'BinaryBuild' | 'Name' | 'MessageName' | 'Label';
|
|
13
|
+
type SyntaxRule = 'Source' | 'Entry' | 'Error' | 'Declaration' | 'Use' | 'ShapeExpr' | 'ShapeTerm' | 'ShapeMap' | 'ShapeField' | 'Handler' | 'Parameter' | 'Function' | 'Block' | 'Body' | 'Statement' | 'SimpleStatement' | 'ExpressionList' | 'Container' | 'AndWait' | 'ResultTarget' | 'Send' | 'AskTell' | 'TellBlock' | 'TimeoutBlock' | 'OperationLine' | 'Wait' | 'Event' | 'If' | 'Repeat' | 'Collecting' | 'Match' | 'Try' | 'OfferClause' | 'OfferParameter' | 'RecoveryMarker' | 'ChooseOffer' | 'Replace' | 'IgnoringCase' | 'Expression' | 'Lambda' | 'Whose' | 'EveryHead' | 'WhoseKey' | 'Default' | 'Or' | 'And' | 'Not' | 'Comparison' | 'Concat' | 'Range' | 'Additive' | 'Multiplicative' | 'Power' | 'Unary' | 'Conversion' | 'Kind' | 'ChunkLevel' | 'Postfix' | 'Key' | 'Call' | 'Primary' | 'Interpolated' | 'Chunk' | 'The' | 'List' | 'MapKey' | 'Map' | 'Pattern' | 'PatternPrimary' | 'TextPattern' | 'Alternation' | 'Element' | 'Atom' | 'BinaryPattern' | 'Field' | 'AsText' | 'FieldType' | 'BinaryBuild' | 'Name' | 'MessageName' | 'Label';
|
|
14
14
|
type SyntaxElement = SyntaxNode | Token;
|
|
15
15
|
/** Children are ordered and own each source character exactly once. Spans include trivia. */
|
|
16
16
|
type SyntaxNode = {
|
|
@@ -95,6 +95,8 @@ type LibraryExport = ExportKind | {
|
|
|
95
95
|
contract?: FunctionContract;
|
|
96
96
|
kind: ExportKind;
|
|
97
97
|
maySuspend?: boolean;
|
|
98
|
+
/** A Constant declared with `shape` (ADR 0168). */
|
|
99
|
+
shape?: boolean;
|
|
98
100
|
};
|
|
99
101
|
type Binding = {
|
|
100
102
|
contract?: FunctionContract;
|
|
@@ -107,6 +109,8 @@ type Binding = {
|
|
|
107
109
|
kind: BindingKind;
|
|
108
110
|
name: string;
|
|
109
111
|
scope: number;
|
|
112
|
+
/** A Constant declared with `shape`, which `is a` may name (ADR 0168). */
|
|
113
|
+
shape?: boolean;
|
|
110
114
|
span: SourceSpan | null;
|
|
111
115
|
};
|
|
112
116
|
type SemanticScope = {
|
|
@@ -718,6 +722,20 @@ type Body = {
|
|
|
718
722
|
params: string[];
|
|
719
723
|
policy?: 'queued' | 'dropping' | 'replacing';
|
|
720
724
|
start: number;
|
|
725
|
+
/**
|
|
726
|
+
* For a Handler Clause, where its dispatch tests start, so a failure can be
|
|
727
|
+
* explained in the Trace (ADR 0172): each Clause Shape's first instruction,
|
|
728
|
+
* its argument and Shape, then the Guard's. Tooling-only, never saved.
|
|
729
|
+
*/
|
|
730
|
+
tests?: {
|
|
731
|
+
guardAt: number;
|
|
732
|
+
shapes: {
|
|
733
|
+
arg: number;
|
|
734
|
+
at: number;
|
|
735
|
+
definition?: number;
|
|
736
|
+
kind?: string;
|
|
737
|
+
}[];
|
|
738
|
+
};
|
|
721
739
|
};
|
|
722
740
|
type UnwindEntry = {
|
|
723
741
|
depth: number;
|
|
@@ -960,6 +978,15 @@ type Deadline = {
|
|
|
960
978
|
at: bigint;
|
|
961
979
|
k: 'deadline';
|
|
962
980
|
};
|
|
981
|
+
/** Why dispatch skipped a named clause (ADR 0172). */
|
|
982
|
+
type ClauseMismatch = {
|
|
983
|
+
argument?: number;
|
|
984
|
+
clause: number;
|
|
985
|
+
reason: 'arity' | 'pattern' | 'shape' | 'guard';
|
|
986
|
+
/** For `shape`, the Shape data the argument failed, if it is known. */
|
|
987
|
+
shape?: Value;
|
|
988
|
+
value?: Value;
|
|
989
|
+
};
|
|
963
990
|
type Dispatch = {
|
|
964
991
|
args: Value[];
|
|
965
992
|
clauses: Body[];
|
|
@@ -1202,7 +1229,8 @@ type Suspension = ({
|
|
|
1202
1229
|
abort: AbortController;
|
|
1203
1230
|
call: CallContext;
|
|
1204
1231
|
k: 'ask';
|
|
1205
|
-
|
|
1232
|
+
/** Its own deadline, or null for the musical clock's, which has none. */
|
|
1233
|
+
ms: number | null;
|
|
1206
1234
|
} | {
|
|
1207
1235
|
args: Value[];
|
|
1208
1236
|
id: string;
|
|
@@ -1532,6 +1560,15 @@ declare class Run {
|
|
|
1532
1560
|
private clause;
|
|
1533
1561
|
/** Its entry dispatch reached the Fallback Handler's clauses (ADR 0064). */
|
|
1534
1562
|
private viaFallback;
|
|
1563
|
+
/**
|
|
1564
|
+
* Why dispatch skipped each named clause of the entry Delivery, for the
|
|
1565
|
+
* Trace's `mismatches` (ADR 0172). Tooling-only, never saved or charged.
|
|
1566
|
+
*/
|
|
1567
|
+
mismatches: ClauseMismatch[];
|
|
1568
|
+
private stepFrame;
|
|
1569
|
+
private stepPc;
|
|
1570
|
+
private priorFrame;
|
|
1571
|
+
private priorPc;
|
|
1535
1572
|
private during;
|
|
1536
1573
|
/** Its Fuel when its cancellation cleanup began, if it has been cancelled. */
|
|
1537
1574
|
private cleanupFrom;
|
|
@@ -1646,6 +1683,7 @@ declare class Run {
|
|
|
1646
1683
|
get ended(): Outcome | null;
|
|
1647
1684
|
private push;
|
|
1648
1685
|
private dispatch;
|
|
1686
|
+
private mismatchOf;
|
|
1649
1687
|
/** Whether a dispatch has a clause left to try after the current one. */
|
|
1650
1688
|
private static more;
|
|
1651
1689
|
private get frame();
|
|
@@ -1682,6 +1720,15 @@ declare class Run {
|
|
|
1682
1720
|
* The Group calls this only when no tooling observes the steps.
|
|
1683
1721
|
*/
|
|
1684
1722
|
fastSteps(room: number): void;
|
|
1723
|
+
/**
|
|
1724
|
+
* `fastSteps`' charge for writing a key its Map already has, with the new
|
|
1725
|
+
* Map version left as the measured result; or nothing, for `step`. The
|
|
1726
|
+
* entry count doesn't change, so the result's charge is the Map's.
|
|
1727
|
+
*/
|
|
1728
|
+
private fastSetKeyCharge;
|
|
1729
|
+
/** `fastSteps`' charge for calling the unit's own Handler, whose first clause takes the arguments. */
|
|
1730
|
+
private fastCallHandlerCharge;
|
|
1731
|
+
private fastCallHandler;
|
|
1685
1732
|
/**
|
|
1686
1733
|
* Run instructions, fast and general, while they spend less than `room`
|
|
1687
1734
|
* Fuel and the Group has nothing to do between them: none writes a record
|
|
@@ -1876,6 +1923,12 @@ declare class Run {
|
|
|
1876
1923
|
private fillDefaults;
|
|
1877
1924
|
private functionValue;
|
|
1878
1925
|
private popArgs;
|
|
1926
|
+
/**
|
|
1927
|
+
* `wait q` in a Musical Unit (chapter 5): `wait 0 bars` goes straight on;
|
|
1928
|
+
* any other count calls the Group's musical clock with `q`, as an
|
|
1929
|
+
* `ask … and wait` would, or raises `no musical time` without one.
|
|
1930
|
+
*/
|
|
1931
|
+
private musicalWait;
|
|
1879
1932
|
/**
|
|
1880
1933
|
* A Capability call (chapter 9): the arguments checked against their
|
|
1881
1934
|
* Shapes, uncharged; the declared cost; the Host function, which may
|
|
@@ -1941,7 +1994,9 @@ type LibraryOptions = {
|
|
|
1941
1994
|
/**
|
|
1942
1995
|
* Compile a Library, once per process for each code identity. `imports` holds
|
|
1943
1996
|
* every Library its `use` lines name, other than the stdlib's, which are
|
|
1944
|
-
* always there.
|
|
1997
|
+
* always there. `declarations` holds the Operations of every Capability its
|
|
1998
|
+
* code calls, built with `operationDeclarations`; without them each `ask` or
|
|
1999
|
+
* `tell` fails with `unknown operation`. Throws LoadError.
|
|
1945
2000
|
*/
|
|
1946
2001
|
declare const compileLibrary: (src: LibrarySource, imports?: readonly Library[], declarations?: GrantDecls, options?: LibraryOptions) => Library;
|
|
1947
2002
|
/** Recompile the complete dependent Library graph without changing its registrations. */
|
|
@@ -1957,10 +2012,25 @@ type TimerImpl = {
|
|
|
1957
2012
|
cancel(call: Call<unknown>, name: string): void;
|
|
1958
2013
|
schedule(call: Call<unknown>, name: string, at: Value, message: string, args: Value): void;
|
|
1959
2014
|
};
|
|
2015
|
+
/**
|
|
2016
|
+
* A musical clock (ADR 0166): `wait` receives the Quantity a Script waits
|
|
2017
|
+
* for, a whole number of bars or beats, 1 or more. The Host answers the call
|
|
2018
|
+
* with Nothing when that many lines have passed on its Transport, or fails it.
|
|
2019
|
+
*/
|
|
2020
|
+
type MusicalClockImpl = {
|
|
2021
|
+
wait(call: Call<unknown>, count: Value): void;
|
|
2022
|
+
};
|
|
1960
2023
|
/** The Pump's Clock reading; there is no Host clock implementation. */
|
|
1961
2024
|
declare const clockCapability: (costs: Costs) => CapabilityDef<void>;
|
|
1962
2025
|
/** The Host owns durable timers, scoped by Script and name. */
|
|
1963
2026
|
declare const timerCapability: (impl: TimerImpl, costs: Costs) => CapabilityDef<unknown>;
|
|
2027
|
+
/**
|
|
2028
|
+
* The musical clock a Group's `musicalClock` option takes (chapter 9): one
|
|
2029
|
+
* suspending `wait`, with no `maxPending`, that Scripts call through a plain
|
|
2030
|
+
* `wait` in a Musical Unit. Only the Core makes it, since `wait` can't name
|
|
2031
|
+
* a Host's Operation.
|
|
2032
|
+
*/
|
|
2033
|
+
declare const musicalClockCapability: (impl: MusicalClockImpl, costs: Costs, release?: ReleaseHook<unknown>) => CapabilityDef<unknown>;
|
|
1964
2034
|
/** The Host shows Values in text form and answers read with a line of text. */
|
|
1965
2035
|
declare const consoleCapability: (impl: ConsoleImpl, costs: Costs) => CapabilityDef<unknown>;
|
|
1966
2036
|
type CalendarImpl = {
|
|
@@ -2104,6 +2174,34 @@ type HttpImpl = HttpServerImpl | HttpClientImpl | (HttpServerImpl & HttpClientIm
|
|
|
2104
2174
|
*/
|
|
2105
2175
|
declare const httpCapability: (impl: HttpImpl, costs: Costs) => CapabilityDef<unknown>;
|
|
2106
2176
|
//#endregion
|
|
2177
|
+
//#region src/peer-capability.d.ts
|
|
2178
|
+
declare const peerKind: ObjectKind<unknown>;
|
|
2179
|
+
/**
|
|
2180
|
+
* The Host's side of `peer` (chapter 9, The `peer` factory). `expose`,
|
|
2181
|
+
* `reach` and `call` start suspending calls, answered through the Call;
|
|
2182
|
+
* `expose` hears `null` for an unnamed exposure. `unexpose` hears a name or
|
|
2183
|
+
* a Peer. `post` and `call` hear the Peer, the Selector and the arguments,
|
|
2184
|
+
* which may hold Peers. `caller` gives the Caller Identity recorded for
|
|
2185
|
+
* `call.delivery`, or Nothing. The optional `release` is the Grant release
|
|
2186
|
+
* hook, for withdrawing the exposures a Grant made when it stops being
|
|
2187
|
+
* effective.
|
|
2188
|
+
*/
|
|
2189
|
+
type PeerImpl = {
|
|
2190
|
+
call(call: Call<unknown>, peer: HostObject, message: string, args: Value[]): void;
|
|
2191
|
+
caller(call: Call<unknown>): Value;
|
|
2192
|
+
/** No name makes a new unnamed exposure. */
|
|
2193
|
+
expose(call: Call<unknown>, name?: string): void;
|
|
2194
|
+
post(call: Call<unknown>, peer: HostObject, message: string, args: Value[]): void;
|
|
2195
|
+
reach(call: Call<unknown>, address: string): void;
|
|
2196
|
+
release?(context: GrantContext<unknown>): void;
|
|
2197
|
+
unexpose(call: Call<unknown>, exposure: string | HostObject): void;
|
|
2198
|
+
};
|
|
2199
|
+
/**
|
|
2200
|
+
* Optional for Hosts. The binding is the Host's own description of the
|
|
2201
|
+
* names the Grant may `reach` and `expose`; the Core never reads it.
|
|
2202
|
+
*/
|
|
2203
|
+
declare const peerCapability: (impl: PeerImpl, costs: Costs) => CapabilityDef<unknown>;
|
|
2204
|
+
//#endregion
|
|
2107
2205
|
//#region src/versions.d.ts
|
|
2108
2206
|
type Versions = {
|
|
2109
2207
|
core: string;
|
|
@@ -2130,7 +2228,13 @@ type Core = {
|
|
|
2130
2228
|
defineObjectKind<N>(k: ObjectKindDef<N>): ObjectKind<N>;
|
|
2131
2229
|
httpCapability: typeof httpCapability;
|
|
2132
2230
|
localeCapability: typeof localeCapability;
|
|
2231
|
+
/** A musical clock for the Group option `musicalClock` (ADR 0166). */
|
|
2232
|
+
musicalClockCapability: typeof musicalClockCapability;
|
|
2133
2233
|
newGroup(o: GroupOptions): Group;
|
|
2234
|
+
/** Optional for Hosts (ADR 0153). */
|
|
2235
|
+
peerCapability: typeof peerCapability;
|
|
2236
|
+
/** The Core-fixed Object Kind of a Peer, which the Host makes Peers with. */
|
|
2237
|
+
readonly peerKind: ObjectKind<unknown>;
|
|
2134
2238
|
restore(save: Uint8Array, o: RestoreOptions): {
|
|
2135
2239
|
group: Group;
|
|
2136
2240
|
result: RestoreResult;
|
|
@@ -2169,7 +2273,9 @@ type Group = {
|
|
|
2169
2273
|
}): HostObject<N>;
|
|
2170
2274
|
objectById(kind: string, id: string): HostObject | undefined;
|
|
2171
2275
|
pump(now: bigint, o?: PumpOptions): PumpResult;
|
|
2172
|
-
replaceLibrary(l: Library, carry: CarryOver
|
|
2276
|
+
replaceLibrary(l: Library, carry: CarryOver, o?: {
|
|
2277
|
+
keepMailbox?: boolean;
|
|
2278
|
+
}): Report[];
|
|
2173
2279
|
request(to: HostObject, m: Message, o?: CancellationOptions): Requested;
|
|
2174
2280
|
requestPump(to: HostObject, m: Message, now: bigint, o?: PumpOptions & CancellationOptions): PumpedRequest;
|
|
2175
2281
|
save(): Uint8Array;
|
|
@@ -2500,6 +2606,16 @@ type CapabilityDefiner<B> = <const O extends Record<string, OpDecl>>(name: strin
|
|
|
2500
2606
|
*/
|
|
2501
2607
|
declare function defineCapability<const O extends Record<string, OpDecl>>(name: string, ops: Operations<void, O>, lifecycle?: SegmentLifecycle<void> | CoordinatedLifecycle<void>, release?: ReleaseHook<void>): CapabilityDef<void>;
|
|
2502
2608
|
declare function defineCapability<B>(): CapabilityDefiner<B>;
|
|
2609
|
+
/**
|
|
2610
|
+
* The Operation declarations a Library's Capability calls are checked
|
|
2611
|
+
* against, for `compileLibrary`'s `declarations`. Takes CapabilityDefs, keyed
|
|
2612
|
+
* by their names, or a map from the name each is granted under.
|
|
2613
|
+
*/
|
|
2614
|
+
declare const operationDeclarations: (capabilities: ReadonlyMap<string, CapabilityDef<unknown>> | Iterable<CapabilityDef<unknown>>) => GrantDecls;
|
|
2615
|
+
/** True exactly when `v` fits `s`, with a Capability argument's acceptance (ADR 0176). */
|
|
2616
|
+
declare const conforms: (v: Value, s: Shape) => boolean;
|
|
2617
|
+
/** The `explain` Built-in's report for `v` against `s` (ADR 0176). */
|
|
2618
|
+
declare const explain: (v: Value, s: Shape) => Value;
|
|
2503
2619
|
//#endregion
|
|
2504
2620
|
//#region src/effects.d.ts
|
|
2505
2621
|
type OperationMode = 'immediate' | 'suspending' | 'fire-and-forget';
|
|
@@ -2781,6 +2897,12 @@ type AccountingReport = RunStarted | RunDiscarded | RunAccounting | CausalWork;
|
|
|
2781
2897
|
//#endregion
|
|
2782
2898
|
//#region src/group.d.ts
|
|
2783
2899
|
type GroupOptions = {
|
|
2900
|
+
/**
|
|
2901
|
+
* The Host's musical clock, from `musicalClockCapability`, which a `wait`
|
|
2902
|
+
* in a Musical Unit calls; without one it raises `no musical time`
|
|
2903
|
+
* (chapter 9, The musical clock).
|
|
2904
|
+
*/
|
|
2905
|
+
musicalClock?: CapabilityDef<unknown>;
|
|
2784
2906
|
name: string;
|
|
2785
2907
|
/**
|
|
2786
2908
|
* Called once per queued Host Input. Don't pump inside it.
|
|
@@ -2849,6 +2971,8 @@ type TsRestoreOptions = RestoreOptions & {
|
|
|
2849
2971
|
session?: SessionPort;
|
|
2850
2972
|
};
|
|
2851
2973
|
type LoadOptions = {
|
|
2974
|
+
/** Refuse any possible Suspension Point as `can't suspend here`; kept by Reload, Extend, Library replacement and restore (ADR 0178). */
|
|
2975
|
+
forbidSuspension?: boolean;
|
|
2852
2976
|
/** Its Grants, by the name the Script uses for each. */
|
|
2853
2977
|
grants?: Readonly<Record<string, Grant<any>>>;
|
|
2854
2978
|
/** Keep only Operations used by this source and its Libraries. */
|
|
@@ -3080,6 +3204,7 @@ type MessageView = {
|
|
|
3080
3204
|
type Inspection = {
|
|
3081
3205
|
scripts: {
|
|
3082
3206
|
disabledGrants?: string[];
|
|
3207
|
+
forbidSuspension?: true;
|
|
3083
3208
|
mailbox: MessageView[];
|
|
3084
3209
|
name: string;
|
|
3085
3210
|
runs: RunView[];
|
|
@@ -3149,6 +3274,8 @@ declare class TsGroup implements Group {
|
|
|
3149
3274
|
private accounting;
|
|
3150
3275
|
private discardReason;
|
|
3151
3276
|
private inputs;
|
|
3277
|
+
private urgentInputs;
|
|
3278
|
+
private chargeInputs;
|
|
3152
3279
|
private deliveries;
|
|
3153
3280
|
private broadcasts;
|
|
3154
3281
|
/**
|
|
@@ -3169,6 +3296,8 @@ declare class TsGroup implements Group {
|
|
|
3169
3296
|
private saves;
|
|
3170
3297
|
private lastClock;
|
|
3171
3298
|
private randomState;
|
|
3299
|
+
/** The musical clock's Grant, which every Script holds (chapter 9). */
|
|
3300
|
+
private musicalClock;
|
|
3172
3301
|
private pumping;
|
|
3173
3302
|
private combining;
|
|
3174
3303
|
private combinedAdmission;
|
|
@@ -3206,7 +3335,7 @@ declare class TsGroup implements Group {
|
|
|
3206
3335
|
private evaluationHost;
|
|
3207
3336
|
private advanceDebugPump;
|
|
3208
3337
|
private attachSession;
|
|
3209
|
-
/** Worker. A Fingerprint covers code, declarations and
|
|
3338
|
+
/** Worker. A Fingerprint covers code, declarations, limits and `forbidSuspension`, never state. */
|
|
3210
3339
|
fingerprint(): Uint8Array;
|
|
3211
3340
|
save(o?: SaveOptions): Uint8Array;
|
|
3212
3341
|
/** Worker. Refused as a save would be, but writes no Trace record. */
|
|
@@ -3239,8 +3368,6 @@ declare class TsGroup implements Group {
|
|
|
3239
3368
|
scriptUnitDocs(name: string): [string, Map<string, string>][];
|
|
3240
3369
|
/** The code units restored Runs may name. */
|
|
3241
3370
|
private knownCode;
|
|
3242
|
-
/** A Library's code a Script imports, by its unit name. */
|
|
3243
|
-
private libraryCode;
|
|
3244
3371
|
private discardedDecisions;
|
|
3245
3372
|
private unsettled;
|
|
3246
3373
|
private restored;
|
|
@@ -3273,6 +3400,7 @@ declare class TsGroup implements Group {
|
|
|
3273
3400
|
private queueRevoke;
|
|
3274
3401
|
private applyInput;
|
|
3275
3402
|
private runsOf;
|
|
3403
|
+
private findRun;
|
|
3276
3404
|
private forgetWait;
|
|
3277
3405
|
private cancelRunning;
|
|
3278
3406
|
/**
|
|
@@ -3297,6 +3425,8 @@ declare class TsGroup implements Group {
|
|
|
3297
3425
|
private dropStoppedMailbox;
|
|
3298
3426
|
private acceptDelivery;
|
|
3299
3427
|
private recordRefusal;
|
|
3428
|
+
private pushInput;
|
|
3429
|
+
private setInputs;
|
|
3300
3430
|
private landUrgentInputs;
|
|
3301
3431
|
constructor(options: TsGroupOptions);
|
|
3302
3432
|
script(name: string): TsScript | undefined;
|
|
@@ -3326,7 +3456,9 @@ declare class TsGroup implements Group {
|
|
|
3326
3456
|
*/
|
|
3327
3457
|
addLibrary(l: Library): void;
|
|
3328
3458
|
/** Worker. Prepare every dependent before changing the Group. */
|
|
3329
|
-
replaceLibrary(l: Library, carry: CarryOver
|
|
3459
|
+
replaceLibrary(l: Library, carry: CarryOver, o?: {
|
|
3460
|
+
keepMailbox?: boolean;
|
|
3461
|
+
}): Report[];
|
|
3330
3462
|
private hostFor;
|
|
3331
3463
|
private enqueue;
|
|
3332
3464
|
private fireTimer;
|
|
@@ -3546,4 +3678,4 @@ declare class DebugController {
|
|
|
3546
3678
|
enter(pause: DebugPause): void;
|
|
3547
3679
|
}
|
|
3548
3680
|
//#endregion
|
|
3549
|
-
export { instant as $,
|
|
3681
|
+
export { instant as $, NotImplementedError as $n, shape as $t, ScriptSources as A, calendarCapability as An, SourceSpan as Ar, FireOp as At, restore as B, compileLibrary as Bn, syntaxSelector as Br, ReleaseHook as Bt, Report as C, LocaleImpl as Cn, NameRole as Cr, ChargeRequest as Ct, RunEvent as D, Costs as Dn, SemanticScope as Dr, EffectResult as Dt, RestoreResult as E, ConsoleImpl as En, SemanticNode as Er, Cost as Et, TsGroupOptions as F, Library as Fn, SyntaxElement as Fr, Metering as Ft, RunStarted as G, Run as Gn, SegmentGrant as Gt, RunAccounting as H, LimitName as Hn, ScopeDecl as Ht, TsRestoreOptions as I, LibraryOptions as In, SyntaxErrorCode as Ir, Operation as It, Value as J, UnitLoadError as Jn, SuspendingOp as Jt, Decimal as K, RunRecord as Kn, SegmentLifecycle as Kt, TsScript as L, LibrarySource as Ln, SyntaxNode as Lr, Operations as Lt, SessionPort as M, consoleCapability as Mn, Mode as Mr, GrantContext as Mt, Settlement as N, musicalClockCapability as Nn, TokType as Nr, ImmediateOp as Nt, SaveOptions as O, MusicalClockImpl as On, SemanticToken as Or, ErrorDecl as Ot, TsGroup as P, timerCapability as Pn, Token as Pr, LimitReached as Pt, dec as Q, loadScript as Qn, operationDeclarations as Qt, Verdict as R, OperationRef as Rn, SyntaxRule as Rr, PlainArg as Rt, PumpedRequest as S, sqliteCapability as Sn, LibraryExport as Sr, CapabilityDefiner as St, RestoreOptions as T, CalendarImpl as Tn, SemanticName as Tr, CoordinatedLifecycle as Tt, RunAncestry as U, Limits as Un, SegmentContext as Ut, CausalWork as V, replacementLibraries as Vn, syntaxText as Vr, ReleaseReason as Vt, RunDiscarded as W, Outcome as Wn, SegmentCoordinator as Wt, bytes as X, defaultLimits as Xn, defineCapability as Xt, bool as Y, callFunction as Yn, conforms as Yt, civilDate as Z, deliver as Zn, explain as Zt, LoadOptions as _, SqlParams as _n, disassemble as _r, PropDef as _t, DebugPause as a, PeerImpl as an, LoadError as ar, quantity as at, PumpOptions as b, SqliteBinding as bn, ExportKind as br, Call as bt, RepeatedEffect as c, HttpClientImpl as cn, SendFailedReason as cr, sourceForm as ct, Counters as d, httpCapability as dn, CodeUnit as dr, nowMicros as dt, Core as en, canConvert as er, isReadable as et, Decided as f, UserImpl as fn, EventBranch as fr, parseInstant as ft, Inspection as g, storeCapability as gn, UnwindEntry as gr, ObjectKindDef as gt, GroupOptions as h, add as hn, Operand as hr, ObjectKind as ht, DebugInstruction as i, coreVersions as in, LoadDiagnostic as ir, num as it, SessionControls as j, clockCapability as jn, Lexer as jr, Grant as jt, ScriptCodeRequest as k, TimerImpl as kn, SemanticTree as kr, FieldShape as kt, CancellationOptions as l, HttpImpl as ln, Body as lr, text as lt, EffectFailure as m, StoreImpl as mn, Instruction as mr, ObjectElements as mt, DebugEvaluation as n, Script as nn, HostError as nr, map as nt, DebugSnapshot as o, peerCapability as on, MailboxFull as or, range as ot, Deciding as p, userCapability as pn, EventEntry as pr, HostObject as pt, Kind as q, Script$1 as qn, Shape as qt, DebugFrame as r, Versions as rn, HostErrorCode as rr, nothing as rt, DebugSource as s, peerKind as sn, ScriptError as sr, record as st, DebugController as t, Group as tn, waitUs as tr, list as tt, CarryOver as u, HttpServerImpl as un, BodyKind as ur, formatInstant as ut, Message as v, SqlRows as vn, Binding as vr, defineObjectKind as vt, Requested as w, localeCapability as wn, SemanticElement as wr, ChargeResult as wt, PumpResult as x, SqliteImpl as xn, FunctionContract as xr, CapabilityDef as xt, PendingCall as y, SqlValue as yn, BindingKind as yr, GrantDecls as yt, newGroup as z, codeIdentity as zn, Trivia as zr, PlainResult as zt };
|
package/debug.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { a as DebugPause, c as RepeatedEffect, ct as sourceForm, et as isReadable, i as DebugInstruction, n as DebugEvaluation, o as DebugSnapshot, r as DebugFrame, s as DebugSource, t as DebugController } from "./debug
|
|
2
|
+
import { a as DebugPause, c as RepeatedEffect, ct as sourceForm, et as isReadable, i as DebugInstruction, n as DebugEvaluation, o as DebugSnapshot, r as DebugFrame, s as DebugSource, t as DebugController } from "./debug-s6QIovKS.js";
|
|
3
3
|
export { type DebugController, type DebugEvaluation, type DebugFrame, type DebugInstruction, type DebugPause, type DebugSnapshot, type DebugSource, type RepeatedEffect, isReadable, sourceForm };
|
package/debug.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
export {
|
|
2
|
+
export { A as isReadable, rt as sourceForm } from "./errors-VuwK669R.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import {
|
|
2
|
+
import { b as PumpOptions, h as GroupOptions, tn as Group, x as PumpResult } from "./debug-s6QIovKS.js";
|
|
3
3
|
//#region src/operation-promises.d.ts
|
|
4
4
|
/** A suspending call whose Host `run` Promise has not settled. */
|
|
5
5
|
type PendingOperation = {
|
package/driver.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import { a as autoDrive, i as asyncDispose, n as Drive, o as newDrivenGroup, r as DrivenGroupOptions, s as PendingOperation, t as AutoDriveOptions } from "./driver-
|
|
2
|
+
import { a as autoDrive, i as asyncDispose, n as Drive, o as newDrivenGroup, r as DrivenGroupOptions, s as PendingOperation, t as AutoDriveOptions } from "./driver-D5yrK3Nu.js";
|
|
3
3
|
export { AutoDriveOptions, Drive, DrivenGroupOptions, type PendingOperation, asyncDispose, autoDrive, newDrivenGroup };
|
package/driver.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { Xt as nowMicros } from "./errors-VuwK669R.js";
|
|
3
3
|
import { r as waitForOperations, t as pendingOperations } from "./operation-promises-ClA1BTaS.js";
|
|
4
4
|
//#region src/driver.ts
|
|
5
5
|
/** Creates a Group on `core` ready to drive queued Inputs from the Host's event loop. */
|