@northtalk/ts 0.5.1 → 0.7.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-xvJoGg0C.d.ts → binary-value-M8v567iA.d.ts} +1 -1
- package/{checker-CUhn2XaM.js → checker-Coml0Tf9.js} +581 -71
- package/{core-BuTAYRm-.d.ts → core-D4qYURer.d.ts} +1 -1
- package/{debug-DRhMZAxw.d.ts → debug-C_Ob5rkl.d.ts} +137 -12
- package/debug.d.ts +1 -1
- package/debug.js +1 -1
- package/{driver-CHDcuqUy.d.ts → driver-CLi_OmyQ.d.ts} +1 -1
- package/driver.d.ts +1 -1
- package/driver.js +1 -1
- package/encoding-BL2ECJmg.js +338 -0
- package/{engine-Cc3yofGM.d.ts → engine-BBNHy4-F.d.ts} +2 -2
- package/{engine-CXf5FCwi.js → engine-DhBk0lTt.js} +6 -6
- package/{errors-D11zizZg.js → errors-P3ga1I-9.js} +124 -21
- package/{group-BflSou2n.js → group-BqccKTWz.js} +406 -75
- package/{http-fetch-DFwVIOQg.js → http-fetch-DA-NbFIM.js} +2 -2
- package/http.d.ts +1 -1
- package/http.js +5 -5
- package/index-CBuczWK0.d.ts +9 -0
- package/index.d.ts +6 -12
- package/index.js +15 -14
- package/{inline-grants-XbX9HL_w.js → inline-grants-BT2nnfLA.js} +4 -5
- package/{lean-BebPaTMK.js → lean-BJmLobmd.js} +13 -8
- package/{lean-CjWVuOrC.d.ts → lean-CFLJ9VrX.d.ts} +155 -6
- package/lean.d.ts +5 -6
- package/lean.js +15 -14
- package/{manifest-CCfpn0kC.js → manifest-37x-HSxH.js} +4 -3
- 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-DE6kRk0r.js} +1 -1
- package/{objects-DC6HjzBY.d.ts → objects-DVlpWsi0.d.ts} +11 -3
- package/{operations-DnCcztkZ.js → operations-CGjDlkGU.js} +73 -15
- package/package.json +5 -1
- package/peer-capability-elnbQy-J.js +149 -0
- package/peer.d.ts +173 -0
- package/peer.js +542 -0
- package/{readers-MmyZ_d0w.d.ts → readers-ChQ0e92c.d.ts} +1 -1
- package/{readers-CsvlahLi.js → readers-yMS1eAOp.js} +1 -1
- package/{request-pump-binary-oqjWFqZA.js → request-pump-binary-BS1J8DF2.js} +4 -4
- package/{router-BZ-aYeXA.js → router-Bm7A2kjt.js} +4 -4
- package/{router-D56rSkU8.d.ts → router-D0rf5SkW.d.ts} +2 -2
- package/session.d.ts +2 -2
- package/session.js +65 -17
- package/setup.d.ts +3 -2
- package/setup.js +13 -16
- package/sqlite.d.ts +2 -2
- package/sqlite.js +5 -5
- package/{store-DHlo6fP5.js → store-D80OlpyG.js} +2 -2
- package/store-capability-DBLlWaNO.js +187 -0
- package/store.d.ts +2 -2
- package/store.js +2 -2
- package/{user-capability-BcRQyyEw.js → user-capability-D6hGa3eF.js} +3 -4
- package/wasm.d.ts +16 -7
- package/wasm.js +52 -23
- package/encoding-RUuES_e4.js +0 -99
- package/manifest-DVrx-pT2.d.ts +0 -122
- 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, Qt as Core, Rn as compileLibrary, vt as defineObjectKind, z as newGroup } from "./debug-C_Ob5rkl.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[];
|
|
@@ -1160,6 +1187,8 @@ type RunRecord = {
|
|
|
1160
1187
|
kind: 'unhandled';
|
|
1161
1188
|
message: string;
|
|
1162
1189
|
target: Value | null;
|
|
1190
|
+
/** A Command Call's climb, whose target is the Script's owner. */
|
|
1191
|
+
up?: true;
|
|
1163
1192
|
} | {
|
|
1164
1193
|
error?: Value;
|
|
1165
1194
|
kind: 'prop';
|
|
@@ -1200,7 +1229,8 @@ type Suspension = ({
|
|
|
1200
1229
|
abort: AbortController;
|
|
1201
1230
|
call: CallContext;
|
|
1202
1231
|
k: 'ask';
|
|
1203
|
-
|
|
1232
|
+
/** Its own deadline, or null for the musical clock's, which has none. */
|
|
1233
|
+
ms: number | null;
|
|
1204
1234
|
} | {
|
|
1205
1235
|
args: Value[];
|
|
1206
1236
|
id: string;
|
|
@@ -1530,6 +1560,15 @@ declare class Run {
|
|
|
1530
1560
|
private clause;
|
|
1531
1561
|
/** Its entry dispatch reached the Fallback Handler's clauses (ADR 0064). */
|
|
1532
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;
|
|
1533
1572
|
private during;
|
|
1534
1573
|
/** Its Fuel when its cancellation cleanup began, if it has been cancelled. */
|
|
1535
1574
|
private cleanupFrom;
|
|
@@ -1644,6 +1683,7 @@ declare class Run {
|
|
|
1644
1683
|
get ended(): Outcome | null;
|
|
1645
1684
|
private push;
|
|
1646
1685
|
private dispatch;
|
|
1686
|
+
private mismatchOf;
|
|
1647
1687
|
/** Whether a dispatch has a clause left to try after the current one. */
|
|
1648
1688
|
private static more;
|
|
1649
1689
|
private get frame();
|
|
@@ -1680,6 +1720,15 @@ declare class Run {
|
|
|
1680
1720
|
* The Group calls this only when no tooling observes the steps.
|
|
1681
1721
|
*/
|
|
1682
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;
|
|
1683
1732
|
/**
|
|
1684
1733
|
* Run instructions, fast and general, while they spend less than `room`
|
|
1685
1734
|
* Fuel and the Group has nothing to do between them: none writes a record
|
|
@@ -1874,6 +1923,12 @@ declare class Run {
|
|
|
1874
1923
|
private fillDefaults;
|
|
1875
1924
|
private functionValue;
|
|
1876
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;
|
|
1877
1932
|
/**
|
|
1878
1933
|
* A Capability call (chapter 9): the arguments checked against their
|
|
1879
1934
|
* Shapes, uncharged; the declared cost; the Host function, which may
|
|
@@ -1939,7 +1994,9 @@ type LibraryOptions = {
|
|
|
1939
1994
|
/**
|
|
1940
1995
|
* Compile a Library, once per process for each code identity. `imports` holds
|
|
1941
1996
|
* every Library its `use` lines name, other than the stdlib's, which are
|
|
1942
|
-
* 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.
|
|
1943
2000
|
*/
|
|
1944
2001
|
declare const compileLibrary: (src: LibrarySource, imports?: readonly Library[], declarations?: GrantDecls, options?: LibraryOptions) => Library;
|
|
1945
2002
|
/** Recompile the complete dependent Library graph without changing its registrations. */
|
|
@@ -1955,10 +2012,25 @@ type TimerImpl = {
|
|
|
1955
2012
|
cancel(call: Call<unknown>, name: string): void;
|
|
1956
2013
|
schedule(call: Call<unknown>, name: string, at: Value, message: string, args: Value): void;
|
|
1957
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
|
+
};
|
|
1958
2023
|
/** The Pump's Clock reading; there is no Host clock implementation. */
|
|
1959
2024
|
declare const clockCapability: (costs: Costs) => CapabilityDef<void>;
|
|
1960
2025
|
/** The Host owns durable timers, scoped by Script and name. */
|
|
1961
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>;
|
|
1962
2034
|
/** The Host shows Values in text form and answers read with a line of text. */
|
|
1963
2035
|
declare const consoleCapability: (impl: ConsoleImpl, costs: Costs) => CapabilityDef<unknown>;
|
|
1964
2036
|
type CalendarImpl = {
|
|
@@ -2102,6 +2174,31 @@ type HttpImpl = HttpServerImpl | HttpClientImpl | (HttpServerImpl & HttpClientIm
|
|
|
2102
2174
|
*/
|
|
2103
2175
|
declare const httpCapability: (impl: HttpImpl, costs: Costs) => CapabilityDef<unknown>;
|
|
2104
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.
|
|
2186
|
+
*/
|
|
2187
|
+
type PeerImpl = {
|
|
2188
|
+
call(call: Call<unknown>, peer: HostObject, message: string, args: Value[]): void;
|
|
2189
|
+
caller(call: Call<unknown>): Value;
|
|
2190
|
+
/** No name makes a new unnamed exposure. */
|
|
2191
|
+
expose(call: Call<unknown>, name?: string): void;
|
|
2192
|
+
post(call: Call<unknown>, peer: HostObject, message: string, args: Value[]): void;
|
|
2193
|
+
reach(call: Call<unknown>, address: string): void;
|
|
2194
|
+
unexpose(call: Call<unknown>, exposure: string | HostObject): void;
|
|
2195
|
+
};
|
|
2196
|
+
/**
|
|
2197
|
+
* Optional for Hosts. The binding is the Host's own description of the
|
|
2198
|
+
* names the Grant may `reach` and `expose`; the Core never reads it.
|
|
2199
|
+
*/
|
|
2200
|
+
declare const peerCapability: (impl: PeerImpl, costs: Costs) => CapabilityDef<unknown>;
|
|
2201
|
+
//#endregion
|
|
2105
2202
|
//#region src/versions.d.ts
|
|
2106
2203
|
type Versions = {
|
|
2107
2204
|
core: string;
|
|
@@ -2128,7 +2225,13 @@ type Core = {
|
|
|
2128
2225
|
defineObjectKind<N>(k: ObjectKindDef<N>): ObjectKind<N>;
|
|
2129
2226
|
httpCapability: typeof httpCapability;
|
|
2130
2227
|
localeCapability: typeof localeCapability;
|
|
2228
|
+
/** A musical clock for the Group option `musicalClock` (ADR 0166). */
|
|
2229
|
+
musicalClockCapability: typeof musicalClockCapability;
|
|
2131
2230
|
newGroup(o: GroupOptions): Group;
|
|
2231
|
+
/** Optional for Hosts (ADR 0153). */
|
|
2232
|
+
peerCapability: typeof peerCapability;
|
|
2233
|
+
/** The Core-fixed Object Kind of a Peer, which the Host makes Peers with. */
|
|
2234
|
+
readonly peerKind: ObjectKind<unknown>;
|
|
2132
2235
|
restore(save: Uint8Array, o: RestoreOptions): {
|
|
2133
2236
|
group: Group;
|
|
2134
2237
|
result: RestoreResult;
|
|
@@ -2162,10 +2265,14 @@ type Group = {
|
|
|
2162
2265
|
inspect(): Inspection;
|
|
2163
2266
|
load(o: LoadOptions): Script;
|
|
2164
2267
|
readonly name: string;
|
|
2165
|
-
object<N>(kind: ObjectKind<N>, id: string, native: N
|
|
2268
|
+
object<N>(kind: ObjectKind<N>, id: string, native: N, o?: {
|
|
2269
|
+
parent?: HostObject;
|
|
2270
|
+
}): HostObject<N>;
|
|
2166
2271
|
objectById(kind: string, id: string): HostObject | undefined;
|
|
2167
2272
|
pump(now: bigint, o?: PumpOptions): PumpResult;
|
|
2168
|
-
replaceLibrary(l: Library, carry: CarryOver
|
|
2273
|
+
replaceLibrary(l: Library, carry: CarryOver, o?: {
|
|
2274
|
+
keepMailbox?: boolean;
|
|
2275
|
+
}): Report[];
|
|
2169
2276
|
request(to: HostObject, m: Message, o?: CancellationOptions): Requested;
|
|
2170
2277
|
requestPump(to: HostObject, m: Message, now: bigint, o?: PumpOptions & CancellationOptions): PumpedRequest;
|
|
2171
2278
|
save(): Uint8Array;
|
|
@@ -2496,6 +2603,12 @@ type CapabilityDefiner<B> = <const O extends Record<string, OpDecl>>(name: strin
|
|
|
2496
2603
|
*/
|
|
2497
2604
|
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>;
|
|
2498
2605
|
declare function defineCapability<B>(): CapabilityDefiner<B>;
|
|
2606
|
+
/**
|
|
2607
|
+
* The Operation declarations a Library's Capability calls are checked
|
|
2608
|
+
* against, for `compileLibrary`'s `declarations`. Takes CapabilityDefs, keyed
|
|
2609
|
+
* by their names, or a map from the name each is granted under.
|
|
2610
|
+
*/
|
|
2611
|
+
declare const operationDeclarations: (capabilities: ReadonlyMap<string, CapabilityDef<unknown>> | Iterable<CapabilityDef<unknown>>) => GrantDecls;
|
|
2499
2612
|
//#endregion
|
|
2500
2613
|
//#region src/effects.d.ts
|
|
2501
2614
|
type OperationMode = 'immediate' | 'suspending' | 'fire-and-forget';
|
|
@@ -2777,6 +2890,12 @@ type AccountingReport = RunStarted | RunDiscarded | RunAccounting | CausalWork;
|
|
|
2777
2890
|
//#endregion
|
|
2778
2891
|
//#region src/group.d.ts
|
|
2779
2892
|
type GroupOptions = {
|
|
2893
|
+
/**
|
|
2894
|
+
* The Host's musical clock, from `musicalClockCapability`, which a `wait`
|
|
2895
|
+
* in a Musical Unit calls; without one it raises `no musical time`
|
|
2896
|
+
* (chapter 9, The musical clock).
|
|
2897
|
+
*/
|
|
2898
|
+
musicalClock?: CapabilityDef<unknown>;
|
|
2780
2899
|
name: string;
|
|
2781
2900
|
/**
|
|
2782
2901
|
* Called once per queued Host Input. Don't pump inside it.
|
|
@@ -3016,7 +3135,8 @@ type Report = AccountingReport | ChargeResult | {
|
|
|
3016
3135
|
run?: string;
|
|
3017
3136
|
script: string;
|
|
3018
3137
|
} | {
|
|
3019
|
-
|
|
3138
|
+
/** The Host Delivery's id; absent for a message a Script sent. */
|
|
3139
|
+
delivery?: string;
|
|
3020
3140
|
kind: 'unhandled';
|
|
3021
3141
|
message: Message;
|
|
3022
3142
|
/** The object it was delivered to; absent when addressed to a Script. */
|
|
@@ -3164,6 +3284,8 @@ declare class TsGroup implements Group {
|
|
|
3164
3284
|
private saves;
|
|
3165
3285
|
private lastClock;
|
|
3166
3286
|
private randomState;
|
|
3287
|
+
/** The musical clock's Grant, which every Script holds (chapter 9). */
|
|
3288
|
+
private musicalClock;
|
|
3167
3289
|
private pumping;
|
|
3168
3290
|
private combining;
|
|
3169
3291
|
private combinedAdmission;
|
|
@@ -3234,8 +3356,6 @@ declare class TsGroup implements Group {
|
|
|
3234
3356
|
scriptUnitDocs(name: string): [string, Map<string, string>][];
|
|
3235
3357
|
/** The code units restored Runs may name. */
|
|
3236
3358
|
private knownCode;
|
|
3237
|
-
/** A Library's code a Script imports, by its unit name. */
|
|
3238
|
-
private libraryCode;
|
|
3239
3359
|
private discardedDecisions;
|
|
3240
3360
|
private unsettled;
|
|
3241
3361
|
private restored;
|
|
@@ -3321,7 +3441,9 @@ declare class TsGroup implements Group {
|
|
|
3321
3441
|
*/
|
|
3322
3442
|
addLibrary(l: Library): void;
|
|
3323
3443
|
/** Worker. Prepare every dependent before changing the Group. */
|
|
3324
|
-
replaceLibrary(l: Library, carry: CarryOver
|
|
3444
|
+
replaceLibrary(l: Library, carry: CarryOver, o?: {
|
|
3445
|
+
keepMailbox?: boolean;
|
|
3446
|
+
}): Report[];
|
|
3325
3447
|
private hostFor;
|
|
3326
3448
|
private enqueue;
|
|
3327
3449
|
private fireTimer;
|
|
@@ -3365,7 +3487,9 @@ declare class TsGroup implements Group {
|
|
|
3365
3487
|
limits?: LimitOverride;
|
|
3366
3488
|
}): Requested;
|
|
3367
3489
|
/** Makes a handle for a Host-owned thing, the first time it crosses in. */
|
|
3368
|
-
object<N>(kind: ObjectKind<N>, id: string, native: N
|
|
3490
|
+
object<N>(kind: ObjectKind<N>, id: string, native: N, o?: {
|
|
3491
|
+
parent?: HostObject;
|
|
3492
|
+
}): HostObject<N>;
|
|
3369
3493
|
/** The handle with this Object Kind name and id, disposed or not, such as one Restore made. */
|
|
3370
3494
|
objectById(kind: string, id: string): HostObject | undefined;
|
|
3371
3495
|
/** Whether an object value is one of this Group's handles. */
|
|
@@ -3377,6 +3501,7 @@ declare class TsGroup implements Group {
|
|
|
3377
3501
|
/** Queued. Disposes an object: it stays a value, and sends to it raise `object gone`. */
|
|
3378
3502
|
dispose(o: HostObject): void;
|
|
3379
3503
|
private route;
|
|
3504
|
+
private unhandledSend;
|
|
3380
3505
|
private unhandled;
|
|
3381
3506
|
private answer;
|
|
3382
3507
|
private deliveryLine;
|
|
@@ -3538,4 +3663,4 @@ declare class DebugController {
|
|
|
3538
3663
|
enter(pause: DebugPause): void;
|
|
3539
3664
|
}
|
|
3540
3665
|
//#endregion
|
|
3541
|
-
export { instant as $,
|
|
3666
|
+
export { instant as $, waitUs as $n, Group as $t, ScriptSources as A, consoleCapability as An, Mode as Ar, FireOp as At, restore as B, LimitName as Bn, ReleaseHook as Bt, Report as C, CalendarImpl as Cn, SemanticName as Cr, ChargeRequest as Ct, RunEvent as D, TimerImpl as Dn, SemanticTree as Dr, EffectResult as Dt, RestoreResult as E, MusicalClockImpl as En, SemanticToken as Er, Cost as Et, TsGroupOptions as F, LibrarySource as Fn, SyntaxNode as Fr, Metering as Ft, RunStarted as G, Script$1 as Gn, SegmentGrant as Gt, RunAccounting as H, Outcome as Hn, ScopeDecl as Ht, TsRestoreOptions as I, OperationRef as In, SyntaxRule as Ir, Operation as It, Value as J, defaultLimits as Jn, SuspendingOp as Jt, Decimal as K, UnitLoadError as Kn, SegmentLifecycle as Kt, TsScript as L, codeIdentity as Ln, Trivia as Lr, Operations as Lt, SessionPort as M, timerCapability as Mn, Token as Mr, GrantContext as Mt, Settlement as N, Library as Nn, SyntaxElement as Nr, ImmediateOp as Nt, SaveOptions as O, calendarCapability as On, SourceSpan as Or, ErrorDecl as Ot, TsGroup as P, LibraryOptions as Pn, SyntaxErrorCode as Pr, LimitReached as Pt, dec as Q, canConvert as Qn, Core as Qt, Verdict as R, compileLibrary as Rn, syntaxSelector as Rr, PlainArg as Rt, PumpedRequest as S, localeCapability as Sn, SemanticElement as Sr, CapabilityDefiner as St, RestoreOptions as T, Costs as Tn, SemanticScope as Tr, CoordinatedLifecycle as Tt, RunAncestry as U, Run as Un, SegmentContext as Ut, CausalWork as V, Limits as Vn, ReleaseReason as Vt, RunDiscarded as W, RunRecord as Wn, SegmentCoordinator as Wt, bytes as X, loadScript as Xn, operationDeclarations as Xt, bool as Y, deliver as Yn, defineCapability as Yt, civilDate as Z, NotImplementedError as Zn, shape as Zt, LoadOptions as _, SqlValue as _n, BindingKind as _r, PropDef as _t, DebugPause as a, peerKind as an, ScriptError as ar, quantity as at, PumpOptions as b, sqliteCapability as bn, LibraryExport as br, Call as bt, RepeatedEffect as c, HttpServerImpl as cn, BodyKind as cr, sourceForm as ct, Counters as d, userCapability as dn, EventEntry as dr, nowMicros as dt, Script as en, HostError as er, isReadable as et, Decided as f, StoreImpl as fn, Instruction as fr, parseInstant as ft, Inspection as g, SqlRows as gn, Binding as gr, ObjectKindDef as gt, GroupOptions as h, SqlParams as hn, disassemble as hr, ObjectKind as ht, DebugInstruction as i, peerCapability as in, MailboxFull as ir, num as it, SessionControls as j, musicalClockCapability as jn, TokType as jr, Grant as jt, ScriptCodeRequest as k, clockCapability as kn, Lexer as kr, FieldShape as kt, CancellationOptions as l, httpCapability as ln, CodeUnit as lr, text as lt, EffectFailure as m, storeCapability as mn, UnwindEntry as mr, ObjectElements as mt, DebugEvaluation as n, coreVersions as nn, LoadDiagnostic as nr, map as nt, DebugSnapshot as o, HttpClientImpl as on, SendFailedReason as or, range as ot, Deciding as p, add as pn, Operand as pr, HostObject as pt, Kind as q, callFunction as qn, Shape as qt, DebugFrame as r, PeerImpl as rn, LoadError as rr, nothing as rt, DebugSource as s, HttpImpl as sn, Body as sr, record as st, DebugController as t, Versions as tn, HostErrorCode as tr, list as tt, CarryOver as u, UserImpl as un, EventBranch as ur, formatInstant as ut, Message as v, SqliteBinding as vn, ExportKind as vr, defineObjectKind as vt, Requested as w, ConsoleImpl as wn, SemanticNode as wr, ChargeResult as wt, PumpResult as x, LocaleImpl as xn, NameRole as xr, CapabilityDef as xt, PendingCall as y, SqliteImpl as yn, FunctionContract as yr, GrantDecls as yt, newGroup as z, replacementLibraries as zn, syntaxText 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-C_Ob5rkl.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 { O as isReadable,
|
|
2
|
+
export { O as isReadable, $ as sourceForm } from "./errors-P3ga1I-9.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.disposable" />
|
|
2
|
-
import {
|
|
2
|
+
import { $t as Group, b as PumpOptions, h as GroupOptions, x as PumpResult } from "./debug-C_Ob5rkl.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-CLi_OmyQ.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 { Kt as nowMicros } from "./errors-P3ga1I-9.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. */
|