@lute-lang/runtime 0.39.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -0
- package/dist/Bundle.d.ts +221 -8
- package/dist/BundleSource.d.ts +2 -2
- package/dist/Errors.d.ts +44 -3
- package/dist/InputLog.d.ts +123 -4
- package/dist/LuteRuntime.d.ts +1 -1
- package/dist/Program.d.ts +31 -2
- package/dist/Replay.d.ts +1 -1
- package/dist/Session.d.ts +18 -8
- package/dist/browser.js +12 -12
- package/dist/bun.js +8 -8
- package/dist/generated/Contract.d.ts +409 -15
- package/dist/generated/Ir.d.ts +2882 -0
- package/dist/index-tecmws3f.js +2168 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +32 -19
- package/dist/wasm/lute_runtime_wasm.d.ts +43 -0
- package/dist/wasm/lute_runtime_wasm.js +127 -0
- package/dist/wasm/lute_runtime_wasm_bg.wasm +0 -0
- package/dist/wasm/lute_runtime_wasm_bg.wasm.d.ts +8 -0
- package/package.json +2 -2
- package/dist/index-eqt12qy0.js +0 -857
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# @lute-lang/runtime
|
|
2
|
+
|
|
3
|
+
The Lute runtime for TypeScript hosts, in [Effect](https://effect.website) 4:
|
|
4
|
+
load a bundle compiled by `lute compile --all`, drive the resumable step
|
|
5
|
+
function, query the state (`view`, `evaluate`, `def`, `gate`, `candidates`, …),
|
|
6
|
+
and replay input logs, on Bun and in browsers.
|
|
7
|
+
|
|
8
|
+
```console
|
|
9
|
+
bun add @lute-lang/runtime effect@4.0.2 @effect/platform-bun@4.0.2
|
|
10
|
+
# or, for a browser application:
|
|
11
|
+
bun add @lute-lang/runtime effect@4.0.2 @effect/platform-browser@4.0.2
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The host guide — sessions, the `Program` API, errors, state interchangeability,
|
|
15
|
+
replay, and local dogfooding with packed tarballs — is
|
|
16
|
+
[`docs/runtime/typescript-runtime.md`](https://github.com/journeyWorker/lute/blob/main/docs/runtime/typescript-runtime.md).
|
|
17
|
+
|
|
18
|
+
## Building from the repository
|
|
19
|
+
|
|
20
|
+
The package wraps the wasm binding of `crates/lute-runtime-wasm`. In
|
|
21
|
+
`packages/runtime`:
|
|
22
|
+
|
|
23
|
+
```console
|
|
24
|
+
bun install
|
|
25
|
+
bun run wasm:build # debug binding -> src/wasm/
|
|
26
|
+
bun run build # dist/: ESM entry points, declarations, the binding
|
|
27
|
+
bun run typecheck
|
|
28
|
+
bun run test # builds the binding first (incremental)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`bun run wasm:build:release` builds the release binding and optimizes it with
|
|
32
|
+
`wasm-opt -O`; a published package ships that one.
|
|
33
|
+
|
|
34
|
+
### Tools
|
|
35
|
+
|
|
36
|
+
`wasm:build` needs Rust with the `wasm32-unknown-unknown` target and
|
|
37
|
+
**`wasm-bindgen` 0.2.126** — exactly the binding crate's `wasm-bindgen`
|
|
38
|
+
version. The script resolves it in this order:
|
|
39
|
+
|
|
40
|
+
1. `$WASM_BINDGEN`, a path to the binary;
|
|
41
|
+
2. `wasm-bindgen` on `PATH`;
|
|
42
|
+
3. the wasm-pack cache entry of the pinned version,
|
|
43
|
+
`<cache>/.wasm-pack/wasm-bindgen-cargo-install-0.2.126/wasm-bindgen`
|
|
44
|
+
(`wasm-bindgen.exe` on Windows), where `<cache>` is `~/Library/Caches` on
|
|
45
|
+
macOS, `$XDG_CACHE_HOME` or `~/.cache` on Linux, and `%LOCALAPPDATA%` on
|
|
46
|
+
Windows — wasm-pack leaves it there after any build of a crate pinned to
|
|
47
|
+
that version.
|
|
48
|
+
|
|
49
|
+
When none resolves, or the binary cannot be run or reports another version,
|
|
50
|
+
the script prints
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
wasm-build: need wasm-bindgen 0.2.126 (set WASM_BINDGEN, put it on PATH, or cargo install --locked wasm-bindgen-cli --version 0.2.126)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
and exits 1. Install it with
|
|
57
|
+
`cargo install --locked wasm-bindgen-cli --version 0.2.126`.
|
|
58
|
+
|
|
59
|
+
`wasm:build:release` also needs binaryen's `wasm-opt`, from `$WASM_OPT` or
|
|
60
|
+
`PATH`.
|
|
61
|
+
|
|
62
|
+
The contract schemas under `src/generated/` are generated from the Rust types:
|
|
63
|
+
`bun run contract:gen` regenerates them and `bun run contract:check` fails on
|
|
64
|
+
drift. Never edit them by hand.
|
package/dist/Bundle.d.ts
CHANGED
|
@@ -1,17 +1,230 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A compiled bundle: `project.index.json` and every artifact it lists, keyed
|
|
3
3
|
* by the index's `artifact` paths — the output of `lute compile --all`
|
|
4
|
-
* (spec 0.38.0 §4.1). The
|
|
4
|
+
* (spec 0.38.0 §4.1). The index is typed by the generated `Ir.projectIndex`
|
|
5
|
+
* (spec 0.41.0 §4.4); the runtime validates the whole bundle on load.
|
|
5
6
|
*/
|
|
6
7
|
import { Schema } from "effect";
|
|
8
|
+
import * as Ir from "./generated/Ir.js";
|
|
7
9
|
export declare const Bundle: Schema.Struct<{
|
|
8
|
-
readonly index: Schema.
|
|
10
|
+
readonly index: Schema.Struct<{
|
|
11
|
+
readonly beats: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
12
|
+
readonly advances: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["slot", "day"]>, Schema.Int]>>;
|
|
13
|
+
readonly document: Schema.String;
|
|
14
|
+
readonly forKind: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
15
|
+
readonly kind: Schema.String;
|
|
16
|
+
readonly members: Schema.$Array<Schema.String>;
|
|
17
|
+
}>>>;
|
|
18
|
+
readonly id: Schema.String;
|
|
19
|
+
readonly kind: Schema.Literals<readonly ["scene", "entry", "bundle"]>;
|
|
20
|
+
readonly on: Schema.String;
|
|
21
|
+
readonly once: Schema.optionalKey<Schema.String>;
|
|
22
|
+
readonly priority: Schema.Int;
|
|
23
|
+
readonly share: Schema.optionalKey<Schema.String>;
|
|
24
|
+
readonly spentBy: Schema.optionalKey<Schema.String>;
|
|
25
|
+
readonly target: Schema.optionalKey<Schema.String>;
|
|
26
|
+
readonly targetKind: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
27
|
+
readonly kind: Schema.String;
|
|
28
|
+
readonly prefix: Schema.String;
|
|
29
|
+
readonly members: Schema.$Array<Schema.String>;
|
|
30
|
+
}>>>;
|
|
31
|
+
readonly title: Schema.optionalKey<Schema.String>;
|
|
32
|
+
readonly when: Schema.optionalKey<Schema.String>;
|
|
33
|
+
}>>>>;
|
|
34
|
+
readonly bridgeResults: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<Ir.fieldType, Ir.fieldType, never, never>>>>>;
|
|
35
|
+
readonly capabilitySnapshot: Schema.String;
|
|
36
|
+
readonly cast: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
37
|
+
readonly clock: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
38
|
+
readonly day: Schema.String;
|
|
39
|
+
readonly slot: Schema.optionalKey<Schema.String>;
|
|
40
|
+
readonly slots: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
41
|
+
readonly raise: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
42
|
+
readonly slot: Schema.optionalKey<Schema.String>;
|
|
43
|
+
readonly dayStart: Schema.optionalKey<Schema.String>;
|
|
44
|
+
readonly dayEnd: Schema.optionalKey<Schema.String>;
|
|
45
|
+
}>]>>;
|
|
46
|
+
readonly raiseAtStart: Schema.optionalKey<Schema.Literal<true>>;
|
|
47
|
+
readonly week: Schema.optionalKey<Schema.Struct<{
|
|
48
|
+
readonly length: Schema.Int;
|
|
49
|
+
readonly first: Schema.Int;
|
|
50
|
+
readonly labels: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
51
|
+
}>>;
|
|
52
|
+
readonly last: Schema.optionalKey<Schema.Struct<{
|
|
53
|
+
readonly day: Schema.Int;
|
|
54
|
+
readonly slot: Schema.optionalKey<Schema.String>;
|
|
55
|
+
}>>;
|
|
56
|
+
readonly days: Schema.optionalKey<Schema.Int>;
|
|
57
|
+
}>>>;
|
|
58
|
+
readonly defs: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Struct<{
|
|
59
|
+
readonly authored: Schema.optionalKey<Schema.String>;
|
|
60
|
+
readonly cel: Schema.String;
|
|
61
|
+
readonly expr: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
62
|
+
readonly host: Schema.optionalKey<Schema.Boolean>;
|
|
63
|
+
readonly params: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
64
|
+
readonly name: Schema.String;
|
|
65
|
+
readonly type: Schema.suspend<Schema.Codec<Ir.fieldType, Ir.fieldType, never, never>>;
|
|
66
|
+
}>>>;
|
|
67
|
+
}>>>>;
|
|
68
|
+
readonly documents: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
69
|
+
readonly artifact: Schema.String;
|
|
70
|
+
readonly key: Schema.String;
|
|
71
|
+
readonly kind: Schema.Literals<readonly ["scene", "quest", "lore"]>;
|
|
72
|
+
readonly path: Schema.String;
|
|
73
|
+
}>>>;
|
|
74
|
+
readonly entities: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
75
|
+
readonly name: Schema.String;
|
|
76
|
+
readonly members: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
77
|
+
readonly open: Schema.Boolean;
|
|
78
|
+
readonly labels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
79
|
+
readonly labelForms: Schema.optionalKey<Schema.suspend<Schema.$Record<Schema.String, Schema.Struct<{
|
|
80
|
+
readonly start: Schema.optionalKey<Schema.String>;
|
|
81
|
+
readonly indefinite: Schema.optionalKey<Schema.String>;
|
|
82
|
+
}>>>>;
|
|
83
|
+
}>>>;
|
|
84
|
+
readonly entries: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
85
|
+
readonly category: Schema.optionalKey<Schema.String>;
|
|
86
|
+
readonly document: Schema.String;
|
|
87
|
+
readonly id: Schema.String;
|
|
88
|
+
readonly order: Schema.optionalKey<Schema.Int>;
|
|
89
|
+
readonly series: Schema.optionalKey<Schema.String>;
|
|
90
|
+
readonly target: Schema.optionalKey<Schema.String>;
|
|
91
|
+
}>>>>;
|
|
92
|
+
readonly enums: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
93
|
+
readonly name: Schema.String;
|
|
94
|
+
readonly members: Schema.$Array<Schema.String>;
|
|
95
|
+
readonly labels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
96
|
+
}>>>;
|
|
97
|
+
readonly gates: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
98
|
+
readonly occasion: Schema.String;
|
|
99
|
+
readonly raisedWhen: Schema.suspend<Schema.Struct<{
|
|
100
|
+
readonly cel: Schema.String;
|
|
101
|
+
readonly expr: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
102
|
+
readonly authored: Schema.optionalKey<Schema.String>;
|
|
103
|
+
}>>;
|
|
104
|
+
}>>>;
|
|
105
|
+
readonly identityRenames: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
106
|
+
readonly from: Schema.String;
|
|
107
|
+
readonly to: Schema.String;
|
|
108
|
+
}>>>;
|
|
109
|
+
readonly irVersion: Schema.String;
|
|
110
|
+
readonly occasions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Struct<{
|
|
111
|
+
readonly judge: Schema.optionalKey<Schema.Literals<readonly ["after", "before"]>>;
|
|
112
|
+
readonly outsideRun: Schema.optionalKey<Schema.Boolean>;
|
|
113
|
+
readonly payload: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<Ir.fieldType, Ir.fieldType, never, never>>>>;
|
|
114
|
+
readonly select: Schema.Literals<readonly ["first", "all", "sequence"]>;
|
|
115
|
+
readonly target: Schema.Union<readonly [Schema.Boolean, Schema.Struct<{
|
|
116
|
+
readonly entity: Schema.String;
|
|
117
|
+
readonly members: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
118
|
+
readonly prefix: Schema.String;
|
|
119
|
+
}>]>;
|
|
120
|
+
}>>>>;
|
|
121
|
+
readonly outsideRun: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
122
|
+
readonly prereqEdges: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
123
|
+
readonly node: Schema.String;
|
|
124
|
+
readonly after: Schema.optionalKey<Schema.String>;
|
|
125
|
+
readonly follows: Schema.optionalKey<Schema.String>;
|
|
126
|
+
readonly formula: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
127
|
+
}>>>;
|
|
128
|
+
readonly relations: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
129
|
+
readonly name: Schema.String;
|
|
130
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
131
|
+
readonly tier: Schema.optionalKey<Schema.String>;
|
|
132
|
+
readonly derive: Schema.Boolean;
|
|
133
|
+
readonly reserved: Schema.Boolean;
|
|
134
|
+
readonly key: Schema.optionalKey<Schema.$Array<Schema.Int>>;
|
|
135
|
+
readonly excludes: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
136
|
+
}>>>;
|
|
137
|
+
readonly requiredSemantics: Schema.$Array<Schema.String>;
|
|
138
|
+
readonly rules: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
139
|
+
readonly head: Schema.suspend<Schema.Struct<{
|
|
140
|
+
readonly relation: Schema.String;
|
|
141
|
+
readonly terms: Schema.$Array<Schema.suspend<Schema.toTaggedUnion<"kind", readonly [Schema.Struct<{
|
|
142
|
+
readonly kind: Schema.Literal<"var">;
|
|
143
|
+
readonly name: Schema.String;
|
|
144
|
+
}>, Schema.Struct<{
|
|
145
|
+
readonly kind: Schema.Literal<"const">;
|
|
146
|
+
readonly value: Schema.String;
|
|
147
|
+
}>]>>>;
|
|
148
|
+
}>>;
|
|
149
|
+
readonly body: Schema.$Array<Schema.suspend<Schema.toTaggedUnion<"kind", readonly [Schema.Struct<{
|
|
150
|
+
readonly kind: Schema.Literal<"atom">;
|
|
151
|
+
readonly atom: Schema.suspend<Schema.Struct<{
|
|
152
|
+
readonly relation: Schema.String;
|
|
153
|
+
readonly terms: Schema.$Array<Schema.suspend<Schema.toTaggedUnion<"kind", readonly [Schema.Struct<{
|
|
154
|
+
readonly kind: Schema.Literal<"var">;
|
|
155
|
+
readonly name: Schema.String;
|
|
156
|
+
}>, Schema.Struct<{
|
|
157
|
+
readonly kind: Schema.Literal<"const">;
|
|
158
|
+
readonly value: Schema.String;
|
|
159
|
+
}>]>>>;
|
|
160
|
+
}>>;
|
|
161
|
+
readonly negated: Schema.Boolean;
|
|
162
|
+
}>, Schema.Struct<{
|
|
163
|
+
readonly kind: Schema.Literal<"guard">;
|
|
164
|
+
readonly cel: Schema.suspend<Schema.Struct<{
|
|
165
|
+
readonly cel: Schema.String;
|
|
166
|
+
readonly expr: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
167
|
+
readonly authored: Schema.optionalKey<Schema.String>;
|
|
168
|
+
}>>;
|
|
169
|
+
}>, Schema.Struct<{
|
|
170
|
+
readonly kind: Schema.Literal<"cmp">;
|
|
171
|
+
readonly lhs: Schema.suspend<Schema.toTaggedUnion<"kind", readonly [Schema.Struct<{
|
|
172
|
+
readonly kind: Schema.Literal<"var">;
|
|
173
|
+
readonly name: Schema.String;
|
|
174
|
+
}>, Schema.Struct<{
|
|
175
|
+
readonly kind: Schema.Literal<"const">;
|
|
176
|
+
readonly value: Schema.String;
|
|
177
|
+
}>]>>;
|
|
178
|
+
readonly rhs: Schema.suspend<Schema.toTaggedUnion<"kind", readonly [Schema.Struct<{
|
|
179
|
+
readonly kind: Schema.Literal<"var">;
|
|
180
|
+
readonly name: Schema.String;
|
|
181
|
+
}>, Schema.Struct<{
|
|
182
|
+
readonly kind: Schema.Literal<"const">;
|
|
183
|
+
readonly value: Schema.String;
|
|
184
|
+
}>]>>;
|
|
185
|
+
readonly negated: Schema.Boolean;
|
|
186
|
+
}>, Schema.Struct<{
|
|
187
|
+
readonly kind: Schema.Literal<"count">;
|
|
188
|
+
readonly atom: Schema.suspend<Schema.Struct<{
|
|
189
|
+
readonly relation: Schema.String;
|
|
190
|
+
readonly terms: Schema.$Array<Schema.suspend<Schema.toTaggedUnion<"kind", readonly [Schema.Struct<{
|
|
191
|
+
readonly kind: Schema.Literal<"var">;
|
|
192
|
+
readonly name: Schema.String;
|
|
193
|
+
}>, Schema.Struct<{
|
|
194
|
+
readonly kind: Schema.Literal<"const">;
|
|
195
|
+
readonly value: Schema.String;
|
|
196
|
+
}>]>>>;
|
|
197
|
+
}>>;
|
|
198
|
+
readonly distinct: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
199
|
+
readonly op: Schema.Literals<readonly ["==", "!=", "<", "<=", ">", ">="]>;
|
|
200
|
+
readonly n: Schema.Int;
|
|
201
|
+
}>]>>>;
|
|
202
|
+
readonly raw: Schema.String;
|
|
203
|
+
}>>>;
|
|
204
|
+
readonly seasons: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
205
|
+
readonly live: Schema.suspend<Schema.Struct<{
|
|
206
|
+
readonly cel: Schema.String;
|
|
207
|
+
readonly expr: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
208
|
+
readonly authored: Schema.optionalKey<Schema.String>;
|
|
209
|
+
}>>;
|
|
210
|
+
readonly name: Schema.String;
|
|
211
|
+
}>>>;
|
|
212
|
+
readonly seedFacts: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
213
|
+
readonly relation: Schema.String;
|
|
214
|
+
readonly args: Schema.$Array<Schema.String>;
|
|
215
|
+
}>>>;
|
|
216
|
+
readonly stateDomains: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Struct<{
|
|
217
|
+
readonly kind: Schema.String;
|
|
218
|
+
readonly members: Schema.$Array<Schema.String>;
|
|
219
|
+
}>>>>;
|
|
220
|
+
readonly terminal: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
221
|
+
readonly cel: Schema.String;
|
|
222
|
+
readonly expr: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
223
|
+
readonly authored: Schema.optionalKey<Schema.String>;
|
|
224
|
+
}>>>;
|
|
225
|
+
readonly terminalPersists: Schema.optionalKey<Schema.Boolean>;
|
|
226
|
+
readonly worldEvents: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
227
|
+
}>;
|
|
9
228
|
readonly artifacts: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
10
229
|
}>;
|
|
11
230
|
export type Bundle = typeof Bundle.Type;
|
|
12
|
-
/** The part of `project.index.json` a loader reads: where each artifact is. */
|
|
13
|
-
export declare const IndexDocuments: Schema.Struct<{
|
|
14
|
-
readonly documents: Schema.$Array<Schema.Struct<{
|
|
15
|
-
readonly artifact: Schema.String;
|
|
16
|
-
}>>;
|
|
17
|
-
}>;
|
package/dist/BundleSource.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Where a session's bundle comes from (spec 0.
|
|
2
|
+
* Where a session's bundle comes from (spec 0.40.0 §5.1): a `lute compile
|
|
3
3
|
* --all` output directory, the same layout served over HTTP, or a value the
|
|
4
4
|
* host already holds.
|
|
5
5
|
*/
|
|
6
6
|
import { Context, Effect, FileSystem, Layer, Path } from "effect";
|
|
7
7
|
import * as HttpClient from "effect/http/HttpClient";
|
|
8
|
-
import { Bundle } from "./Bundle.js";
|
|
8
|
+
import type { Bundle } from "./Bundle.js";
|
|
9
9
|
import type { BundleError } from "./Errors.js";
|
|
10
10
|
declare const BundleSource_base: Context.ServiceClass<BundleSource, "@lute-lang/runtime/BundleSource", {
|
|
11
11
|
readonly load: Effect.Effect<Bundle, BundleError>;
|
package/dist/Errors.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The typed failures of the runtime (spec 0.
|
|
2
|
+
* The typed failures of the runtime (spec 0.40.0 §5.3, 0.41.0 §6.3).
|
|
3
3
|
*
|
|
4
4
|
* A rejected input is an expected failure: each runtime code is its own
|
|
5
5
|
* tagged error, carrying the runtime's `code` and `message`. A code this
|
|
@@ -14,6 +14,13 @@ declare const RuntimeBusy_base: Schema.Class<RuntimeBusy, Schema.TaggedStruct<"R
|
|
|
14
14
|
/** `E-RUNTIME-BUSY`: the current await does not accept this input. */
|
|
15
15
|
export declare class RuntimeBusy extends RuntimeBusy_base {
|
|
16
16
|
}
|
|
17
|
+
declare const TimeoutUnavailable_base: Schema.Class<TimeoutUnavailable, Schema.TaggedStruct<"TimeoutUnavailable", {
|
|
18
|
+
readonly code: Schema.Literal<"E-RUNTIME-TIMEOUT">;
|
|
19
|
+
readonly message: Schema.String;
|
|
20
|
+
}>, import("effect/Cause").YieldableError>;
|
|
21
|
+
/** `E-RUNTIME-TIMEOUT`: the pending await is not a timed choice. */
|
|
22
|
+
export declare class TimeoutUnavailable extends TimeoutUnavailable_base {
|
|
23
|
+
}
|
|
17
24
|
declare const RequestMismatch_base: Schema.Class<RequestMismatch, Schema.TaggedStruct<"RequestMismatch", {
|
|
18
25
|
readonly code: Schema.Literal<"E-RUNTIME-REQUEST">;
|
|
19
26
|
readonly message: Schema.String;
|
|
@@ -39,7 +46,7 @@ declare const InvalidInput_base: Schema.Class<InvalidInput, Schema.TaggedStruct<
|
|
|
39
46
|
readonly code: Schema.Literal<"E-RUNTIME-INPUT">;
|
|
40
47
|
readonly message: Schema.String;
|
|
41
48
|
}>, import("effect/Cause").YieldableError>;
|
|
42
|
-
/** `E-RUNTIME-INPUT`: a seed or
|
|
49
|
+
/** `E-RUNTIME-INPUT`: a seed, input or query names something the project lacks. */
|
|
43
50
|
export declare class InvalidInput extends InvalidInput_base {
|
|
44
51
|
}
|
|
45
52
|
declare const RuntimeHalted_base: Schema.Class<RuntimeHalted, Schema.TaggedStruct<"RuntimeHalted", {
|
|
@@ -70,13 +77,47 @@ declare const SnapshotVersionMismatch_base: Schema.Class<SnapshotVersionMismatch
|
|
|
70
77
|
/** `E-RUNTIME-SNAPSHOT-VERSION`: the snapshot is of another Event minor. */
|
|
71
78
|
export declare class SnapshotVersionMismatch extends SnapshotVersionMismatch_base {
|
|
72
79
|
}
|
|
80
|
+
declare const OccasionGateClosed_base: Schema.Class<OccasionGateClosed, Schema.TaggedStruct<"OccasionGateClosed", {
|
|
81
|
+
readonly code: Schema.Literal<"E-OCCASION-GATE">;
|
|
82
|
+
readonly message: Schema.String;
|
|
83
|
+
}>, import("effect/Cause").YieldableError>;
|
|
84
|
+
/**
|
|
85
|
+
* `E-OCCASION-GATE`: the engine would not make this raise — the occasion's
|
|
86
|
+
* `raisedWhen` is false, or the game is over and the occasion is not
|
|
87
|
+
* `outsideRun` (spec 0.41.0 §5.2). The state is unchanged, the input's own
|
|
88
|
+
* writes included; `Program.gate` answers the same rule beforehand.
|
|
89
|
+
*/
|
|
90
|
+
export declare class OccasionGateClosed extends OccasionGateClosed_base {
|
|
91
|
+
}
|
|
73
92
|
/** Every rejection the runtime returns. */
|
|
74
|
-
export type RuntimeRejection = RuntimeBusy | RequestMismatch | OptionUnavailable | BridgeShapeMismatch | InvalidInput | RuntimeHalted | IrVersionMismatch | SnapshotProjectMismatch | SnapshotVersionMismatch;
|
|
93
|
+
export type RuntimeRejection = RuntimeBusy | RequestMismatch | OptionUnavailable | BridgeShapeMismatch | InvalidInput | TimeoutUnavailable | RuntimeHalted | IrVersionMismatch | SnapshotProjectMismatch | SnapshotVersionMismatch | OccasionGateClosed;
|
|
75
94
|
/**
|
|
76
95
|
* Fail with the typed error of a runtime rejection; a code this package does
|
|
77
96
|
* not know dies.
|
|
78
97
|
*/
|
|
79
98
|
export declare const fromRejected: (rejected: Rejected) => Effect.Effect<never, RuntimeRejection>;
|
|
99
|
+
declare const EvaluationError_base: Schema.Class<EvaluationError, Schema.TaggedStruct<"EvaluationError", {
|
|
100
|
+
readonly code: Schema.Literal<"E-RUNTIME-EVAL">;
|
|
101
|
+
readonly message: Schema.String;
|
|
102
|
+
}>, import("effect/Cause").YieldableError>;
|
|
103
|
+
/** `E-RUNTIME-EVAL`: a queried condition evaluates to an error (spec 0.41.0 §5.1). */
|
|
104
|
+
export declare class EvaluationError extends EvaluationError_base {
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Every rejection a condition query (`Program.evaluate`, `Program.def`)
|
|
108
|
+
* returns: a malformed expression, an unknown def name or a misfit argument,
|
|
109
|
+
* or an evaluation error.
|
|
110
|
+
*/
|
|
111
|
+
export type QueryRejection = InvalidInput | EvaluationError;
|
|
112
|
+
/**
|
|
113
|
+
* Fail with the typed error of a query rejection; any other code dies.
|
|
114
|
+
*/
|
|
115
|
+
export declare const fromQueryRejected: (rejected: Rejected) => Effect.Effect<never, QueryRejection>;
|
|
116
|
+
/**
|
|
117
|
+
* Fail with the typed error of a `Program.gate` rejection (an occasion the
|
|
118
|
+
* bundle does not declare); any other code dies.
|
|
119
|
+
*/
|
|
120
|
+
export declare const fromGateRejected: (rejected: Rejected) => Effect.Effect<never, InvalidInput>;
|
|
80
121
|
declare const BundleNotFound_base: Schema.Class<BundleNotFound, Schema.TaggedStruct<"BundleNotFound", {
|
|
81
122
|
readonly path: Schema.String;
|
|
82
123
|
readonly message: Schema.String;
|
package/dist/InputLog.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { Context, Effect, Layer, Schema } from "effect";
|
|
7
7
|
import * as KeyValueStore from "effect/persistence/KeyValueStore";
|
|
8
8
|
import { InputLogError } from "./Errors.js";
|
|
9
|
+
import * as Contract from "./generated/Contract.js";
|
|
9
10
|
export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
10
11
|
readonly seed: Schema.Struct<{
|
|
11
12
|
readonly derive: Schema.optionalKey<Schema.Boolean>;
|
|
@@ -28,6 +29,7 @@ export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
|
28
29
|
readonly await: Schema.suspend<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
29
30
|
readonly menu: Schema.suspend<Schema.Struct<{
|
|
30
31
|
readonly construct: Schema.String;
|
|
32
|
+
readonly default: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
31
33
|
readonly document: Schema.String;
|
|
32
34
|
readonly id: Schema.String;
|
|
33
35
|
readonly options: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
@@ -39,15 +41,16 @@ export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
|
39
41
|
readonly position: Schema.String;
|
|
40
42
|
readonly presentation: Schema.Int;
|
|
41
43
|
readonly prompt: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
42
|
-
readonly timeout: Schema.optionalKey<Schema.NullOr<Schema.
|
|
44
|
+
readonly timeout: Schema.optionalKey<Schema.NullOr<Schema.Int>>;
|
|
43
45
|
}>>;
|
|
44
46
|
readonly request: Schema.Int;
|
|
45
47
|
readonly type: Schema.Literal<"awaitChoice">;
|
|
46
48
|
}>, Schema.Struct<{
|
|
49
|
+
readonly attrs: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
47
50
|
readonly document: Schema.String;
|
|
48
|
-
readonly fields: Schema.$Record<Schema.String, Schema.String>;
|
|
49
51
|
readonly position: Schema.String;
|
|
50
52
|
readonly request: Schema.Int;
|
|
53
|
+
readonly results: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<Contract.fieldType, Contract.fieldType, never, never>>>;
|
|
51
54
|
readonly tag: Schema.String;
|
|
52
55
|
readonly type: Schema.Literal<"awaitBridge">;
|
|
53
56
|
}>, Schema.Struct<{
|
|
@@ -71,6 +74,16 @@ export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
|
71
74
|
readonly bridge: Schema.Struct<{
|
|
72
75
|
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
73
76
|
readonly tag: Schema.String;
|
|
77
|
+
readonly writes: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
78
|
+
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
79
|
+
readonly facts: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
80
|
+
readonly retract: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
81
|
+
readonly state: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
82
|
+
readonly add: Schema.optionalKey<Schema.NullOr<Schema.Number>>;
|
|
83
|
+
readonly path: Schema.String;
|
|
84
|
+
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
85
|
+
}>>>>;
|
|
86
|
+
}>>>;
|
|
74
87
|
}>;
|
|
75
88
|
}>]>>>;
|
|
76
89
|
readonly before: Schema.suspend<Schema.Struct<{
|
|
@@ -103,6 +116,32 @@ export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
|
103
116
|
}>>>;
|
|
104
117
|
readonly spentRun: Schema.UniqueArray<Schema.String>;
|
|
105
118
|
readonly spentUser: Schema.UniqueArray<Schema.String>;
|
|
119
|
+
readonly stage: Schema.suspend<Schema.Struct<{
|
|
120
|
+
readonly actors: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
121
|
+
readonly anchor: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
122
|
+
readonly character: Schema.String;
|
|
123
|
+
readonly costume: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
124
|
+
readonly emotion: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
125
|
+
}>>>;
|
|
126
|
+
readonly bg: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
127
|
+
readonly assetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
128
|
+
readonly location: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
129
|
+
readonly time: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
130
|
+
}>>>>;
|
|
131
|
+
readonly cg: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
132
|
+
readonly assetId: Schema.String;
|
|
133
|
+
readonly layout: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
134
|
+
}>>>>;
|
|
135
|
+
readonly music: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
136
|
+
readonly assetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
137
|
+
readonly mood: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
138
|
+
readonly playback: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
139
|
+
readonly volume: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
140
|
+
}>>>>;
|
|
141
|
+
readonly video: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
142
|
+
readonly assetId: Schema.String;
|
|
143
|
+
}>>>>;
|
|
144
|
+
}>>;
|
|
106
145
|
readonly state: Schema.$Record<Schema.String, Schema.suspend<Schema.toTaggedUnion<"kind", readonly [Schema.Struct<{
|
|
107
146
|
readonly kind: Schema.Literal<"bool">;
|
|
108
147
|
readonly value: Schema.Boolean;
|
|
@@ -142,6 +181,9 @@ export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
|
142
181
|
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
143
182
|
}>>>>;
|
|
144
183
|
}>>>;
|
|
184
|
+
}>, Schema.Struct<{
|
|
185
|
+
readonly request: Schema.Int;
|
|
186
|
+
readonly type: Schema.Literal<"timeout">;
|
|
145
187
|
}>, Schema.Struct<{
|
|
146
188
|
readonly option: Schema.String;
|
|
147
189
|
readonly request: Schema.Int;
|
|
@@ -150,6 +192,16 @@ export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
|
150
192
|
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
151
193
|
readonly request: Schema.Int;
|
|
152
194
|
readonly type: Schema.Literal<"bridgeResult">;
|
|
195
|
+
readonly writes: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
196
|
+
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
197
|
+
readonly facts: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
198
|
+
readonly retract: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
199
|
+
readonly state: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
200
|
+
readonly add: Schema.optionalKey<Schema.NullOr<Schema.Number>>;
|
|
201
|
+
readonly path: Schema.String;
|
|
202
|
+
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
203
|
+
}>>>>;
|
|
204
|
+
}>>>;
|
|
153
205
|
}>, Schema.Struct<{
|
|
154
206
|
readonly by: Schema.suspend<Schema.Union<readonly [Schema.String, Schema.Int, Schema.Struct<{
|
|
155
207
|
readonly to: Schema.String;
|
|
@@ -204,6 +256,7 @@ export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
|
204
256
|
readonly pending: Schema.suspend<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
205
257
|
readonly menu: Schema.suspend<Schema.Struct<{
|
|
206
258
|
readonly construct: Schema.String;
|
|
259
|
+
readonly default: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
207
260
|
readonly document: Schema.String;
|
|
208
261
|
readonly id: Schema.String;
|
|
209
262
|
readonly options: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
@@ -215,15 +268,16 @@ export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
|
215
268
|
readonly position: Schema.String;
|
|
216
269
|
readonly presentation: Schema.Int;
|
|
217
270
|
readonly prompt: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
218
|
-
readonly timeout: Schema.optionalKey<Schema.NullOr<Schema.
|
|
271
|
+
readonly timeout: Schema.optionalKey<Schema.NullOr<Schema.Int>>;
|
|
219
272
|
}>>;
|
|
220
273
|
readonly request: Schema.Int;
|
|
221
274
|
readonly type: Schema.Literal<"awaitChoice">;
|
|
222
275
|
}>, Schema.Struct<{
|
|
276
|
+
readonly attrs: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
223
277
|
readonly document: Schema.String;
|
|
224
|
-
readonly fields: Schema.$Record<Schema.String, Schema.String>;
|
|
225
278
|
readonly position: Schema.String;
|
|
226
279
|
readonly request: Schema.Int;
|
|
280
|
+
readonly results: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<Contract.fieldType, Contract.fieldType, never, never>>>;
|
|
227
281
|
readonly tag: Schema.String;
|
|
228
282
|
readonly type: Schema.Literal<"awaitBridge">;
|
|
229
283
|
}>, Schema.Struct<{
|
|
@@ -237,6 +291,32 @@ export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
|
237
291
|
readonly site: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
238
292
|
readonly type: Schema.Literal<"halted">;
|
|
239
293
|
}>]>>;
|
|
294
|
+
readonly stage: Schema.suspend<Schema.Struct<{
|
|
295
|
+
readonly actors: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
296
|
+
readonly anchor: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
297
|
+
readonly character: Schema.String;
|
|
298
|
+
readonly costume: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
299
|
+
readonly emotion: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
300
|
+
}>>>;
|
|
301
|
+
readonly bg: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
302
|
+
readonly assetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
303
|
+
readonly location: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
304
|
+
readonly time: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
305
|
+
}>>>>;
|
|
306
|
+
readonly cg: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
307
|
+
readonly assetId: Schema.String;
|
|
308
|
+
readonly layout: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
309
|
+
}>>>>;
|
|
310
|
+
readonly music: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
311
|
+
readonly assetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
312
|
+
readonly mood: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
313
|
+
readonly playback: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
314
|
+
readonly volume: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
315
|
+
}>>>>;
|
|
316
|
+
readonly video: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
317
|
+
readonly assetId: Schema.String;
|
|
318
|
+
}>>>>;
|
|
319
|
+
}>>;
|
|
240
320
|
}>>>>;
|
|
241
321
|
readonly project: Schema.String;
|
|
242
322
|
readonly request: Schema.Int;
|
|
@@ -271,6 +351,32 @@ export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
|
271
351
|
}>>>;
|
|
272
352
|
readonly spentRun: Schema.UniqueArray<Schema.String>;
|
|
273
353
|
readonly spentUser: Schema.UniqueArray<Schema.String>;
|
|
354
|
+
readonly stage: Schema.suspend<Schema.Struct<{
|
|
355
|
+
readonly actors: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
356
|
+
readonly anchor: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
357
|
+
readonly character: Schema.String;
|
|
358
|
+
readonly costume: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
359
|
+
readonly emotion: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
360
|
+
}>>>;
|
|
361
|
+
readonly bg: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
362
|
+
readonly assetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
363
|
+
readonly location: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
364
|
+
readonly time: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
365
|
+
}>>>>;
|
|
366
|
+
readonly cg: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
367
|
+
readonly assetId: Schema.String;
|
|
368
|
+
readonly layout: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
369
|
+
}>>>>;
|
|
370
|
+
readonly music: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
371
|
+
readonly assetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
372
|
+
readonly mood: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
373
|
+
readonly playback: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
374
|
+
readonly volume: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
375
|
+
}>>>>;
|
|
376
|
+
readonly video: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
377
|
+
readonly assetId: Schema.String;
|
|
378
|
+
}>>>>;
|
|
379
|
+
}>>;
|
|
274
380
|
readonly state: Schema.$Record<Schema.String, Schema.suspend<Schema.toTaggedUnion<"kind", readonly [Schema.Struct<{
|
|
275
381
|
readonly kind: Schema.Literal<"bool">;
|
|
276
382
|
readonly value: Schema.Boolean;
|
|
@@ -311,6 +417,9 @@ export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
|
311
417
|
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
312
418
|
}>>>>;
|
|
313
419
|
}>>>;
|
|
420
|
+
}>, Schema.Struct<{
|
|
421
|
+
readonly request: Schema.Int;
|
|
422
|
+
readonly type: Schema.Literal<"timeout">;
|
|
314
423
|
}>, Schema.Struct<{
|
|
315
424
|
readonly option: Schema.String;
|
|
316
425
|
readonly request: Schema.Int;
|
|
@@ -319,6 +428,16 @@ export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
|
319
428
|
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
320
429
|
readonly request: Schema.Int;
|
|
321
430
|
readonly type: Schema.Literal<"bridgeResult">;
|
|
431
|
+
readonly writes: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
432
|
+
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
433
|
+
readonly facts: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
434
|
+
readonly retract: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
435
|
+
readonly state: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
436
|
+
readonly add: Schema.optionalKey<Schema.NullOr<Schema.Number>>;
|
|
437
|
+
readonly path: Schema.String;
|
|
438
|
+
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
439
|
+
}>>>>;
|
|
440
|
+
}>>>;
|
|
322
441
|
}>, Schema.Struct<{
|
|
323
442
|
readonly by: Schema.suspend<Schema.Union<readonly [Schema.String, Schema.Int, Schema.Struct<{
|
|
324
443
|
readonly to: Schema.String;
|
package/dist/LuteRuntime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Loads bundles into {@link Program}s (spec 0.
|
|
2
|
+
* Loads bundles into {@link Program}s (spec 0.40.0 §5.1). A program lives in
|
|
3
3
|
* the scope that loaded it and is freed when the scope closes.
|
|
4
4
|
*/
|
|
5
5
|
import { Context, Effect, Layer, Scope } from "effect";
|