@lute-lang/runtime 0.0.0-stage → 0.40.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/dist/Bundle.d.ts +17 -0
- package/dist/BundleSource.d.ts +21 -0
- package/dist/Errors.d.ts +122 -0
- package/dist/InputLog.d.ts +474 -0
- package/dist/LuteRuntime.d.ts +20 -0
- package/dist/LuteWasm.d.ts +26 -0
- package/dist/Program.d.ts +48 -0
- package/dist/Replay.d.ts +17 -0
- package/dist/Session.d.ts +56 -0
- package/dist/browser.d.ts +25 -0
- package/dist/browser.js +28 -0
- package/dist/bun.d.ts +21 -0
- package/dist/bun.js +28 -0
- package/dist/generated/Contract.d.ts +1791 -0
- package/dist/generated/Ir.d.ts +2535 -0
- package/dist/index-wshk3yvw.js +918 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +1031 -0
- package/dist/wasm/lute_runtime_wasm.d.ts +167 -0
- package/dist/wasm/lute_runtime_wasm.js +624 -0
- package/dist/wasm/lute_runtime_wasm_bg.wasm +0 -0
- package/dist/wasm/lute_runtime_wasm_bg.wasm.d.ts +35 -0
- package/package.json +63 -4
- package/README.md +0 -3
package/dist/Bundle.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A compiled bundle: `project.index.json` and every artifact it lists, keyed
|
|
3
|
+
* by the index's `artifact` paths — the output of `lute compile --all`
|
|
4
|
+
* (spec 0.38.0 §4.1). The runtime validates it on load.
|
|
5
|
+
*/
|
|
6
|
+
import { Schema } from "effect";
|
|
7
|
+
export declare const Bundle: Schema.Struct<{
|
|
8
|
+
readonly index: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
9
|
+
readonly artifacts: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
10
|
+
}>;
|
|
11
|
+
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
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a session's bundle comes from (spec 0.40.0 §5.1): a `lute compile
|
|
3
|
+
* --all` output directory, the same layout served over HTTP, or a value the
|
|
4
|
+
* host already holds.
|
|
5
|
+
*/
|
|
6
|
+
import { Context, Effect, FileSystem, Layer, Path } from "effect";
|
|
7
|
+
import * as HttpClient from "effect/http/HttpClient";
|
|
8
|
+
import { Bundle } from "./Bundle.js";
|
|
9
|
+
import type { BundleError } from "./Errors.js";
|
|
10
|
+
declare const BundleSource_base: Context.ServiceClass<BundleSource, "@lute-lang/runtime/BundleSource", {
|
|
11
|
+
readonly load: Effect.Effect<Bundle, BundleError>;
|
|
12
|
+
}>;
|
|
13
|
+
export declare class BundleSource extends BundleSource_base {
|
|
14
|
+
}
|
|
15
|
+
/** A bundle the host already holds. */
|
|
16
|
+
export declare const value: (bundle: Bundle) => Layer.Layer<BundleSource>;
|
|
17
|
+
/** A `lute compile --all` output directory. */
|
|
18
|
+
export declare const directory: (root: string) => Layer.Layer<BundleSource, never, FileSystem.FileSystem | Path.Path>;
|
|
19
|
+
/** A `lute compile --all` output served under `base` (a URL ending in `/`). */
|
|
20
|
+
export declare const url: (base: string) => Layer.Layer<BundleSource, never, HttpClient.HttpClient>;
|
|
21
|
+
export {};
|
package/dist/Errors.d.ts
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The typed failures of the runtime (spec 0.40.0 §5.3).
|
|
3
|
+
*
|
|
4
|
+
* A rejected input is an expected failure: each runtime code is its own
|
|
5
|
+
* tagged error, carrying the runtime's `code` and `message`. A code this
|
|
6
|
+
* package does not know is contract drift — a defect, never a typed error.
|
|
7
|
+
*/
|
|
8
|
+
import { Effect, Schema } from "effect";
|
|
9
|
+
import type { Rejected } from "./generated/Contract.js";
|
|
10
|
+
declare const RuntimeBusy_base: Schema.Class<RuntimeBusy, Schema.TaggedStruct<"RuntimeBusy", {
|
|
11
|
+
readonly code: Schema.Literal<"E-RUNTIME-BUSY">;
|
|
12
|
+
readonly message: Schema.String;
|
|
13
|
+
}>, import("effect/Cause").YieldableError>;
|
|
14
|
+
/** `E-RUNTIME-BUSY`: the current await does not accept this input. */
|
|
15
|
+
export declare class RuntimeBusy extends RuntimeBusy_base {
|
|
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
|
+
}
|
|
24
|
+
declare const RequestMismatch_base: Schema.Class<RequestMismatch, Schema.TaggedStruct<"RequestMismatch", {
|
|
25
|
+
readonly code: Schema.Literal<"E-RUNTIME-REQUEST">;
|
|
26
|
+
readonly message: Schema.String;
|
|
27
|
+
}>, import("effect/Cause").YieldableError>;
|
|
28
|
+
/** `E-RUNTIME-REQUEST`: an answer names another request than the pending await. */
|
|
29
|
+
export declare class RequestMismatch extends RequestMismatch_base {
|
|
30
|
+
}
|
|
31
|
+
declare const OptionUnavailable_base: Schema.Class<OptionUnavailable, Schema.TaggedStruct<"OptionUnavailable", {
|
|
32
|
+
readonly code: Schema.Literal<"E-RUNTIME-OPTION">;
|
|
33
|
+
readonly message: Schema.String;
|
|
34
|
+
}>, import("effect/Cause").YieldableError>;
|
|
35
|
+
/** `E-RUNTIME-OPTION`: the chosen option is absent from the menu or not open. */
|
|
36
|
+
export declare class OptionUnavailable extends OptionUnavailable_base {
|
|
37
|
+
}
|
|
38
|
+
declare const BridgeShapeMismatch_base: Schema.Class<BridgeShapeMismatch, Schema.TaggedStruct<"BridgeShapeMismatch", {
|
|
39
|
+
readonly code: Schema.Literal<"E-RUNTIME-BRIDGE-SHAPE">;
|
|
40
|
+
readonly message: Schema.String;
|
|
41
|
+
}>, import("effect/Cause").YieldableError>;
|
|
42
|
+
/** `E-RUNTIME-BRIDGE-SHAPE`: a bridge result misses or mistypes a read field. */
|
|
43
|
+
export declare class BridgeShapeMismatch extends BridgeShapeMismatch_base {
|
|
44
|
+
}
|
|
45
|
+
declare const InvalidInput_base: Schema.Class<InvalidInput, Schema.TaggedStruct<"InvalidInput", {
|
|
46
|
+
readonly code: Schema.Literal<"E-RUNTIME-INPUT">;
|
|
47
|
+
readonly message: Schema.String;
|
|
48
|
+
}>, import("effect/Cause").YieldableError>;
|
|
49
|
+
/** `E-RUNTIME-INPUT`: a seed or input names something the project lacks. */
|
|
50
|
+
export declare class InvalidInput extends InvalidInput_base {
|
|
51
|
+
}
|
|
52
|
+
declare const RuntimeHalted_base: Schema.Class<RuntimeHalted, Schema.TaggedStruct<"RuntimeHalted", {
|
|
53
|
+
readonly code: Schema.Literal<"E-RUNTIME-HALTED">;
|
|
54
|
+
readonly message: Schema.String;
|
|
55
|
+
}>, import("effect/Cause").YieldableError>;
|
|
56
|
+
/** `E-RUNTIME-HALTED`: the state halted; restore an earlier snapshot. */
|
|
57
|
+
export declare class RuntimeHalted extends RuntimeHalted_base {
|
|
58
|
+
}
|
|
59
|
+
declare const IrVersionMismatch_base: Schema.Class<IrVersionMismatch, Schema.TaggedStruct<"IrVersionMismatch", {
|
|
60
|
+
readonly code: Schema.Literal<"E-RUNTIME-IR-VERSION">;
|
|
61
|
+
readonly message: Schema.String;
|
|
62
|
+
}>, import("effect/Cause").YieldableError>;
|
|
63
|
+
/** `E-RUNTIME-IR-VERSION`: the bundle is not one this runtime executes. */
|
|
64
|
+
export declare class IrVersionMismatch extends IrVersionMismatch_base {
|
|
65
|
+
}
|
|
66
|
+
declare const SnapshotProjectMismatch_base: Schema.Class<SnapshotProjectMismatch, Schema.TaggedStruct<"SnapshotProjectMismatch", {
|
|
67
|
+
readonly code: Schema.Literal<"E-RUNTIME-SNAPSHOT-PROJECT">;
|
|
68
|
+
readonly message: Schema.String;
|
|
69
|
+
}>, import("effect/Cause").YieldableError>;
|
|
70
|
+
/** `E-RUNTIME-SNAPSHOT-PROJECT`: the snapshot belongs to another bundle. */
|
|
71
|
+
export declare class SnapshotProjectMismatch extends SnapshotProjectMismatch_base {
|
|
72
|
+
}
|
|
73
|
+
declare const SnapshotVersionMismatch_base: Schema.Class<SnapshotVersionMismatch, Schema.TaggedStruct<"SnapshotVersionMismatch", {
|
|
74
|
+
readonly code: Schema.Literal<"E-RUNTIME-SNAPSHOT-VERSION">;
|
|
75
|
+
readonly message: Schema.String;
|
|
76
|
+
}>, import("effect/Cause").YieldableError>;
|
|
77
|
+
/** `E-RUNTIME-SNAPSHOT-VERSION`: the snapshot is of another Event minor. */
|
|
78
|
+
export declare class SnapshotVersionMismatch extends SnapshotVersionMismatch_base {
|
|
79
|
+
}
|
|
80
|
+
/** Every rejection the runtime returns. */
|
|
81
|
+
export type RuntimeRejection = RuntimeBusy | RequestMismatch | OptionUnavailable | BridgeShapeMismatch | InvalidInput | TimeoutUnavailable | RuntimeHalted | IrVersionMismatch | SnapshotProjectMismatch | SnapshotVersionMismatch;
|
|
82
|
+
/**
|
|
83
|
+
* Fail with the typed error of a runtime rejection; a code this package does
|
|
84
|
+
* not know dies.
|
|
85
|
+
*/
|
|
86
|
+
export declare const fromRejected: (rejected: Rejected) => Effect.Effect<never, RuntimeRejection>;
|
|
87
|
+
declare const BundleNotFound_base: Schema.Class<BundleNotFound, Schema.TaggedStruct<"BundleNotFound", {
|
|
88
|
+
readonly path: Schema.String;
|
|
89
|
+
readonly message: Schema.String;
|
|
90
|
+
}>, import("effect/Cause").YieldableError>;
|
|
91
|
+
/** The bundle's `project.index.json` or an artifact it lists does not exist. */
|
|
92
|
+
export declare class BundleNotFound extends BundleNotFound_base {
|
|
93
|
+
}
|
|
94
|
+
declare const BundleUnreadable_base: Schema.Class<BundleUnreadable, Schema.TaggedStruct<"BundleUnreadable", {
|
|
95
|
+
readonly path: Schema.String;
|
|
96
|
+
readonly message: Schema.String;
|
|
97
|
+
}>, import("effect/Cause").YieldableError>;
|
|
98
|
+
/** The bundle exists but could not be read. */
|
|
99
|
+
export declare class BundleUnreadable extends BundleUnreadable_base {
|
|
100
|
+
}
|
|
101
|
+
declare const BundleMalformed_base: Schema.Class<BundleMalformed, Schema.TaggedStruct<"BundleMalformed", {
|
|
102
|
+
readonly path: Schema.String;
|
|
103
|
+
readonly message: Schema.String;
|
|
104
|
+
}>, import("effect/Cause").YieldableError>;
|
|
105
|
+
/** A bundle file is not the JSON a bundle holds. */
|
|
106
|
+
export declare class BundleMalformed extends BundleMalformed_base {
|
|
107
|
+
}
|
|
108
|
+
/** Why a bundle could not be loaded. */
|
|
109
|
+
export type BundleError = BundleNotFound | BundleUnreadable | BundleMalformed;
|
|
110
|
+
declare const WasmLoadError_base: Schema.Class<WasmLoadError, Schema.TaggedStruct<"WasmLoadError", {
|
|
111
|
+
readonly message: Schema.String;
|
|
112
|
+
}>, import("effect/Cause").YieldableError>;
|
|
113
|
+
/** The wasm binding could not be fetched or instantiated. */
|
|
114
|
+
export declare class WasmLoadError extends WasmLoadError_base {
|
|
115
|
+
}
|
|
116
|
+
declare const InputLogError_base: Schema.Class<InputLogError, Schema.TaggedStruct<"InputLogError", {
|
|
117
|
+
readonly message: Schema.String;
|
|
118
|
+
}>, import("effect/Cause").YieldableError>;
|
|
119
|
+
/** The input log could not be read or written. */
|
|
120
|
+
export declare class InputLogError extends InputLogError_base {
|
|
121
|
+
}
|
|
122
|
+
export {};
|
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The recorded input log of a session (spec 0.38.0 §9: `(seed or snapshot,
|
|
3
|
+
* inputs)`). Replaying it against the same bundle reproduces every output;
|
|
4
|
+
* its entries have the `inputs.jsonl` line shape.
|
|
5
|
+
*/
|
|
6
|
+
import { Context, Effect, Layer, Schema } from "effect";
|
|
7
|
+
import * as KeyValueStore from "effect/persistence/KeyValueStore";
|
|
8
|
+
import { InputLogError } from "./Errors.js";
|
|
9
|
+
export declare const LogEntry: Schema.Union<readonly [Schema.Struct<{
|
|
10
|
+
readonly seed: Schema.Struct<{
|
|
11
|
+
readonly derive: Schema.optionalKey<Schema.Boolean>;
|
|
12
|
+
readonly facts: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
13
|
+
readonly save: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
14
|
+
readonly entriesRead: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>;
|
|
15
|
+
readonly presented: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>;
|
|
16
|
+
readonly questInstances: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Int>>;
|
|
17
|
+
readonly quests: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
18
|
+
readonly visited: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
19
|
+
}>>>;
|
|
20
|
+
readonly state: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
21
|
+
readonly add: Schema.optionalKey<Schema.NullOr<Schema.Number>>;
|
|
22
|
+
readonly path: Schema.String;
|
|
23
|
+
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
24
|
+
}>>>>;
|
|
25
|
+
}>;
|
|
26
|
+
}>, Schema.Struct<{
|
|
27
|
+
readonly snapshot: Schema.Struct<{
|
|
28
|
+
readonly await: Schema.suspend<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
29
|
+
readonly menu: Schema.suspend<Schema.Struct<{
|
|
30
|
+
readonly construct: Schema.String;
|
|
31
|
+
readonly default: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
32
|
+
readonly document: Schema.String;
|
|
33
|
+
readonly id: Schema.String;
|
|
34
|
+
readonly options: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
35
|
+
readonly exit: Schema.Boolean;
|
|
36
|
+
readonly id: Schema.String;
|
|
37
|
+
readonly once: Schema.Boolean;
|
|
38
|
+
readonly verdict: Schema.String;
|
|
39
|
+
}>>>;
|
|
40
|
+
readonly position: Schema.String;
|
|
41
|
+
readonly presentation: Schema.Int;
|
|
42
|
+
readonly prompt: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
43
|
+
readonly timeout: Schema.optionalKey<Schema.NullOr<Schema.Int>>;
|
|
44
|
+
}>>;
|
|
45
|
+
readonly request: Schema.Int;
|
|
46
|
+
readonly type: Schema.Literal<"awaitChoice">;
|
|
47
|
+
}>, Schema.Struct<{
|
|
48
|
+
readonly document: Schema.String;
|
|
49
|
+
readonly fields: Schema.$Record<Schema.String, Schema.String>;
|
|
50
|
+
readonly position: Schema.String;
|
|
51
|
+
readonly request: Schema.Int;
|
|
52
|
+
readonly tag: Schema.String;
|
|
53
|
+
readonly type: Schema.Literal<"awaitBridge">;
|
|
54
|
+
}>, Schema.Struct<{
|
|
55
|
+
readonly type: Schema.Literal<"idle">;
|
|
56
|
+
}>, Schema.Struct<{
|
|
57
|
+
readonly reason: Schema.String;
|
|
58
|
+
readonly type: Schema.Literal<"ended">;
|
|
59
|
+
}>, Schema.Struct<{
|
|
60
|
+
readonly kind: Schema.String;
|
|
61
|
+
readonly message: Schema.String;
|
|
62
|
+
readonly site: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
63
|
+
readonly type: Schema.Literal<"halted">;
|
|
64
|
+
}>]>>;
|
|
65
|
+
readonly continuation: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
66
|
+
readonly answers: Schema.$Array<Schema.suspend<Schema.Union<readonly [Schema.Struct<{
|
|
67
|
+
readonly choice: Schema.Struct<{
|
|
68
|
+
readonly id: Schema.String;
|
|
69
|
+
readonly option: Schema.String;
|
|
70
|
+
}>;
|
|
71
|
+
}>, Schema.Struct<{
|
|
72
|
+
readonly bridge: Schema.Struct<{
|
|
73
|
+
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
74
|
+
readonly tag: Schema.String;
|
|
75
|
+
}>;
|
|
76
|
+
}>]>>>;
|
|
77
|
+
readonly before: Schema.suspend<Schema.Struct<{
|
|
78
|
+
readonly accepts: Schema.$Array<Schema.String>;
|
|
79
|
+
readonly advanceCascadeDepth: Schema.Int;
|
|
80
|
+
readonly cadence: Schema.suspend<Schema.Struct<{
|
|
81
|
+
readonly latched: Schema.$Record<Schema.String, Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
82
|
+
readonly day: Schema.Int;
|
|
83
|
+
readonly slot: Schema.Int;
|
|
84
|
+
}>>>>;
|
|
85
|
+
readonly live: Schema.$Record<Schema.String, Schema.Boolean>;
|
|
86
|
+
readonly rearm: Schema.$Record<Schema.String, Schema.Boolean>;
|
|
87
|
+
readonly spentSeason: Schema.UniqueArray<Schema.String>;
|
|
88
|
+
readonly windows: Schema.UniqueArray<Schema.String>;
|
|
89
|
+
}>>;
|
|
90
|
+
readonly clockAdvancedByBeat: Schema.Boolean;
|
|
91
|
+
readonly deferBy: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
92
|
+
readonly deferHandlers: Schema.Boolean;
|
|
93
|
+
readonly deferredHandlers: Schema.$Array<Schema.Tuple<readonly [Schema.String, Schema.String]>>;
|
|
94
|
+
readonly derive: Schema.optionalKey<Schema.NullOr<Schema.Boolean>>;
|
|
95
|
+
readonly facts: Schema.UniqueArray<Schema.Tuple<readonly [Schema.String, Schema.$Array<Schema.String>]>>;
|
|
96
|
+
readonly failedObjectives: Schema.UniqueArray<Schema.String>;
|
|
97
|
+
readonly nextRunAccepts: Schema.$Array<Schema.String>;
|
|
98
|
+
readonly questInstances: Schema.$Record<Schema.String, Schema.Int>;
|
|
99
|
+
readonly quests: Schema.$Record<Schema.String, Schema.String>;
|
|
100
|
+
readonly shareSpentBy: Schema.$Record<Schema.String, Schema.String>;
|
|
101
|
+
readonly spentAt: Schema.$Record<Schema.String, Schema.suspend<Schema.Struct<{
|
|
102
|
+
readonly day: Schema.Int;
|
|
103
|
+
readonly slot: Schema.Int;
|
|
104
|
+
}>>>;
|
|
105
|
+
readonly spentRun: Schema.UniqueArray<Schema.String>;
|
|
106
|
+
readonly spentUser: Schema.UniqueArray<Schema.String>;
|
|
107
|
+
readonly stage: Schema.suspend<Schema.Struct<{
|
|
108
|
+
readonly actors: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
109
|
+
readonly anchor: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
110
|
+
readonly character: Schema.String;
|
|
111
|
+
readonly costume: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
112
|
+
readonly emotion: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
113
|
+
}>>>;
|
|
114
|
+
readonly bg: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
115
|
+
readonly assetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
116
|
+
readonly location: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
117
|
+
readonly time: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
118
|
+
}>>>>;
|
|
119
|
+
readonly cg: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
120
|
+
readonly assetId: Schema.String;
|
|
121
|
+
readonly layout: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
122
|
+
}>>>>;
|
|
123
|
+
readonly music: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
124
|
+
readonly assetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
125
|
+
readonly mood: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
126
|
+
readonly playback: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
127
|
+
readonly volume: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
128
|
+
}>>>>;
|
|
129
|
+
readonly video: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
130
|
+
readonly assetId: Schema.String;
|
|
131
|
+
}>>>>;
|
|
132
|
+
}>>;
|
|
133
|
+
readonly state: Schema.$Record<Schema.String, Schema.suspend<Schema.toTaggedUnion<"kind", readonly [Schema.Struct<{
|
|
134
|
+
readonly kind: Schema.Literal<"bool">;
|
|
135
|
+
readonly value: Schema.Boolean;
|
|
136
|
+
}>, Schema.Struct<{
|
|
137
|
+
readonly kind: Schema.Literal<"int">;
|
|
138
|
+
readonly value: Schema.Int;
|
|
139
|
+
}>, Schema.Struct<{
|
|
140
|
+
readonly kind: Schema.Literal<"double">;
|
|
141
|
+
readonly value: Schema.Number;
|
|
142
|
+
}>, Schema.Struct<{
|
|
143
|
+
readonly kind: Schema.Literal<"str">;
|
|
144
|
+
readonly value: Schema.String;
|
|
145
|
+
}>, Schema.Struct<{
|
|
146
|
+
readonly kind: Schema.Literal<"unknown">;
|
|
147
|
+
}>, Schema.Struct<{
|
|
148
|
+
readonly kind: Schema.Literal<"error">;
|
|
149
|
+
readonly value: Schema.String;
|
|
150
|
+
}>]>>>;
|
|
151
|
+
readonly visited: Schema.UniqueArray<Schema.String>;
|
|
152
|
+
}>>;
|
|
153
|
+
readonly delivered: Schema.Int;
|
|
154
|
+
readonly input: Schema.suspend<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
155
|
+
readonly occasion: Schema.String;
|
|
156
|
+
readonly payload: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
157
|
+
readonly pick: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
158
|
+
readonly beat: Schema.String;
|
|
159
|
+
}>]>>>>;
|
|
160
|
+
readonly target: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
161
|
+
readonly type: Schema.Literal<"raiseOccasion">;
|
|
162
|
+
readonly writes: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
163
|
+
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
164
|
+
readonly facts: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
165
|
+
readonly retract: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
166
|
+
readonly state: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
167
|
+
readonly add: Schema.optionalKey<Schema.NullOr<Schema.Number>>;
|
|
168
|
+
readonly path: Schema.String;
|
|
169
|
+
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
170
|
+
}>>>>;
|
|
171
|
+
}>>>;
|
|
172
|
+
}>, Schema.Struct<{
|
|
173
|
+
readonly request: Schema.Int;
|
|
174
|
+
readonly type: Schema.Literal<"timeout">;
|
|
175
|
+
}>, Schema.Struct<{
|
|
176
|
+
readonly option: Schema.String;
|
|
177
|
+
readonly request: Schema.Int;
|
|
178
|
+
readonly type: Schema.Literal<"choose">;
|
|
179
|
+
}>, Schema.Struct<{
|
|
180
|
+
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
181
|
+
readonly request: Schema.Int;
|
|
182
|
+
readonly type: Schema.Literal<"bridgeResult">;
|
|
183
|
+
}>, Schema.Struct<{
|
|
184
|
+
readonly by: Schema.suspend<Schema.Union<readonly [Schema.String, Schema.Int, Schema.Struct<{
|
|
185
|
+
readonly to: Schema.String;
|
|
186
|
+
}>, Schema.Struct<{
|
|
187
|
+
readonly to: Schema.suspend<Schema.Struct<{
|
|
188
|
+
readonly slot: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
189
|
+
readonly weekday: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
190
|
+
}>>;
|
|
191
|
+
}>]>>;
|
|
192
|
+
readonly pick: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
193
|
+
readonly beat: Schema.String;
|
|
194
|
+
}>]>>>>;
|
|
195
|
+
readonly type: Schema.Literal<"advanceClock">;
|
|
196
|
+
readonly writes: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
197
|
+
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
198
|
+
readonly facts: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
199
|
+
readonly retract: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
200
|
+
readonly state: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
201
|
+
readonly add: Schema.optionalKey<Schema.NullOr<Schema.Number>>;
|
|
202
|
+
readonly path: Schema.String;
|
|
203
|
+
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
204
|
+
}>>>>;
|
|
205
|
+
}>>>;
|
|
206
|
+
}>, Schema.Struct<{
|
|
207
|
+
readonly type: Schema.Literal<"hostWrite">;
|
|
208
|
+
readonly writes: Schema.suspend<Schema.Struct<{
|
|
209
|
+
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
210
|
+
readonly facts: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
211
|
+
readonly retract: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
212
|
+
readonly state: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
213
|
+
readonly add: Schema.optionalKey<Schema.NullOr<Schema.Number>>;
|
|
214
|
+
readonly path: Schema.String;
|
|
215
|
+
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
216
|
+
}>>>>;
|
|
217
|
+
}>>;
|
|
218
|
+
}>, Schema.Struct<{
|
|
219
|
+
readonly name: Schema.String;
|
|
220
|
+
readonly type: Schema.Literal<"worldEvent">;
|
|
221
|
+
}>, Schema.Struct<{
|
|
222
|
+
readonly type: Schema.Literal<"newRun">;
|
|
223
|
+
readonly writes: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
224
|
+
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
225
|
+
readonly facts: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
226
|
+
readonly retract: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
227
|
+
readonly state: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
228
|
+
readonly add: Schema.optionalKey<Schema.NullOr<Schema.Number>>;
|
|
229
|
+
readonly path: Schema.String;
|
|
230
|
+
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
231
|
+
}>>>>;
|
|
232
|
+
}>>>;
|
|
233
|
+
}>]>>;
|
|
234
|
+
readonly pending: Schema.suspend<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
235
|
+
readonly menu: Schema.suspend<Schema.Struct<{
|
|
236
|
+
readonly construct: Schema.String;
|
|
237
|
+
readonly default: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
238
|
+
readonly document: Schema.String;
|
|
239
|
+
readonly id: Schema.String;
|
|
240
|
+
readonly options: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
241
|
+
readonly exit: Schema.Boolean;
|
|
242
|
+
readonly id: Schema.String;
|
|
243
|
+
readonly once: Schema.Boolean;
|
|
244
|
+
readonly verdict: Schema.String;
|
|
245
|
+
}>>>;
|
|
246
|
+
readonly position: Schema.String;
|
|
247
|
+
readonly presentation: Schema.Int;
|
|
248
|
+
readonly prompt: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
249
|
+
readonly timeout: Schema.optionalKey<Schema.NullOr<Schema.Int>>;
|
|
250
|
+
}>>;
|
|
251
|
+
readonly request: Schema.Int;
|
|
252
|
+
readonly type: Schema.Literal<"awaitChoice">;
|
|
253
|
+
}>, Schema.Struct<{
|
|
254
|
+
readonly document: Schema.String;
|
|
255
|
+
readonly fields: Schema.$Record<Schema.String, Schema.String>;
|
|
256
|
+
readonly position: Schema.String;
|
|
257
|
+
readonly request: Schema.Int;
|
|
258
|
+
readonly tag: Schema.String;
|
|
259
|
+
readonly type: Schema.Literal<"awaitBridge">;
|
|
260
|
+
}>, Schema.Struct<{
|
|
261
|
+
readonly type: Schema.Literal<"idle">;
|
|
262
|
+
}>, Schema.Struct<{
|
|
263
|
+
readonly reason: Schema.String;
|
|
264
|
+
readonly type: Schema.Literal<"ended">;
|
|
265
|
+
}>, Schema.Struct<{
|
|
266
|
+
readonly kind: Schema.String;
|
|
267
|
+
readonly message: Schema.String;
|
|
268
|
+
readonly site: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
269
|
+
readonly type: Schema.Literal<"halted">;
|
|
270
|
+
}>]>>;
|
|
271
|
+
readonly stage: Schema.suspend<Schema.Struct<{
|
|
272
|
+
readonly actors: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
273
|
+
readonly anchor: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
274
|
+
readonly character: Schema.String;
|
|
275
|
+
readonly costume: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
276
|
+
readonly emotion: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
277
|
+
}>>>;
|
|
278
|
+
readonly bg: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
279
|
+
readonly assetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
280
|
+
readonly location: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
281
|
+
readonly time: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
282
|
+
}>>>>;
|
|
283
|
+
readonly cg: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
284
|
+
readonly assetId: Schema.String;
|
|
285
|
+
readonly layout: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
286
|
+
}>>>>;
|
|
287
|
+
readonly music: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
288
|
+
readonly assetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
289
|
+
readonly mood: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
290
|
+
readonly playback: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
291
|
+
readonly volume: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
292
|
+
}>>>>;
|
|
293
|
+
readonly video: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
294
|
+
readonly assetId: Schema.String;
|
|
295
|
+
}>>>>;
|
|
296
|
+
}>>;
|
|
297
|
+
}>>>>;
|
|
298
|
+
readonly project: Schema.String;
|
|
299
|
+
readonly request: Schema.Int;
|
|
300
|
+
readonly snapshotVersion: Schema.String;
|
|
301
|
+
readonly world: Schema.suspend<Schema.Struct<{
|
|
302
|
+
readonly accepts: Schema.$Array<Schema.String>;
|
|
303
|
+
readonly advanceCascadeDepth: Schema.Int;
|
|
304
|
+
readonly cadence: Schema.suspend<Schema.Struct<{
|
|
305
|
+
readonly latched: Schema.$Record<Schema.String, Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
306
|
+
readonly day: Schema.Int;
|
|
307
|
+
readonly slot: Schema.Int;
|
|
308
|
+
}>>>>;
|
|
309
|
+
readonly live: Schema.$Record<Schema.String, Schema.Boolean>;
|
|
310
|
+
readonly rearm: Schema.$Record<Schema.String, Schema.Boolean>;
|
|
311
|
+
readonly spentSeason: Schema.UniqueArray<Schema.String>;
|
|
312
|
+
readonly windows: Schema.UniqueArray<Schema.String>;
|
|
313
|
+
}>>;
|
|
314
|
+
readonly clockAdvancedByBeat: Schema.Boolean;
|
|
315
|
+
readonly deferBy: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
316
|
+
readonly deferHandlers: Schema.Boolean;
|
|
317
|
+
readonly deferredHandlers: Schema.$Array<Schema.Tuple<readonly [Schema.String, Schema.String]>>;
|
|
318
|
+
readonly derive: Schema.optionalKey<Schema.NullOr<Schema.Boolean>>;
|
|
319
|
+
readonly facts: Schema.UniqueArray<Schema.Tuple<readonly [Schema.String, Schema.$Array<Schema.String>]>>;
|
|
320
|
+
readonly failedObjectives: Schema.UniqueArray<Schema.String>;
|
|
321
|
+
readonly nextRunAccepts: Schema.$Array<Schema.String>;
|
|
322
|
+
readonly questInstances: Schema.$Record<Schema.String, Schema.Int>;
|
|
323
|
+
readonly quests: Schema.$Record<Schema.String, Schema.String>;
|
|
324
|
+
readonly shareSpentBy: Schema.$Record<Schema.String, Schema.String>;
|
|
325
|
+
readonly spentAt: Schema.$Record<Schema.String, Schema.suspend<Schema.Struct<{
|
|
326
|
+
readonly day: Schema.Int;
|
|
327
|
+
readonly slot: Schema.Int;
|
|
328
|
+
}>>>;
|
|
329
|
+
readonly spentRun: Schema.UniqueArray<Schema.String>;
|
|
330
|
+
readonly spentUser: Schema.UniqueArray<Schema.String>;
|
|
331
|
+
readonly stage: Schema.suspend<Schema.Struct<{
|
|
332
|
+
readonly actors: Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
333
|
+
readonly anchor: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
334
|
+
readonly character: Schema.String;
|
|
335
|
+
readonly costume: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
336
|
+
readonly emotion: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
337
|
+
}>>>;
|
|
338
|
+
readonly bg: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
339
|
+
readonly assetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
340
|
+
readonly location: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
341
|
+
readonly time: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
342
|
+
}>>>>;
|
|
343
|
+
readonly cg: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
344
|
+
readonly assetId: Schema.String;
|
|
345
|
+
readonly layout: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
346
|
+
}>>>>;
|
|
347
|
+
readonly music: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
348
|
+
readonly assetId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
349
|
+
readonly mood: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
350
|
+
readonly playback: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
351
|
+
readonly volume: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
352
|
+
}>>>>;
|
|
353
|
+
readonly video: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Struct<{
|
|
354
|
+
readonly assetId: Schema.String;
|
|
355
|
+
}>>>>;
|
|
356
|
+
}>>;
|
|
357
|
+
readonly state: Schema.$Record<Schema.String, Schema.suspend<Schema.toTaggedUnion<"kind", readonly [Schema.Struct<{
|
|
358
|
+
readonly kind: Schema.Literal<"bool">;
|
|
359
|
+
readonly value: Schema.Boolean;
|
|
360
|
+
}>, Schema.Struct<{
|
|
361
|
+
readonly kind: Schema.Literal<"int">;
|
|
362
|
+
readonly value: Schema.Int;
|
|
363
|
+
}>, Schema.Struct<{
|
|
364
|
+
readonly kind: Schema.Literal<"double">;
|
|
365
|
+
readonly value: Schema.Number;
|
|
366
|
+
}>, Schema.Struct<{
|
|
367
|
+
readonly kind: Schema.Literal<"str">;
|
|
368
|
+
readonly value: Schema.String;
|
|
369
|
+
}>, Schema.Struct<{
|
|
370
|
+
readonly kind: Schema.Literal<"unknown">;
|
|
371
|
+
}>, Schema.Struct<{
|
|
372
|
+
readonly kind: Schema.Literal<"error">;
|
|
373
|
+
readonly value: Schema.String;
|
|
374
|
+
}>]>>>;
|
|
375
|
+
readonly visited: Schema.UniqueArray<Schema.String>;
|
|
376
|
+
}>>;
|
|
377
|
+
}>;
|
|
378
|
+
}>, Schema.Struct<{
|
|
379
|
+
readonly input: Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
380
|
+
readonly occasion: Schema.String;
|
|
381
|
+
readonly payload: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
382
|
+
readonly pick: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
383
|
+
readonly beat: Schema.String;
|
|
384
|
+
}>]>>>>;
|
|
385
|
+
readonly target: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
386
|
+
readonly type: Schema.Literal<"raiseOccasion">;
|
|
387
|
+
readonly writes: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
388
|
+
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
389
|
+
readonly facts: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
390
|
+
readonly retract: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
391
|
+
readonly state: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
392
|
+
readonly add: Schema.optionalKey<Schema.NullOr<Schema.Number>>;
|
|
393
|
+
readonly path: Schema.String;
|
|
394
|
+
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
395
|
+
}>>>>;
|
|
396
|
+
}>>>;
|
|
397
|
+
}>, Schema.Struct<{
|
|
398
|
+
readonly request: Schema.Int;
|
|
399
|
+
readonly type: Schema.Literal<"timeout">;
|
|
400
|
+
}>, Schema.Struct<{
|
|
401
|
+
readonly option: Schema.String;
|
|
402
|
+
readonly request: Schema.Int;
|
|
403
|
+
readonly type: Schema.Literal<"choose">;
|
|
404
|
+
}>, Schema.Struct<{
|
|
405
|
+
readonly fields: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
406
|
+
readonly request: Schema.Int;
|
|
407
|
+
readonly type: Schema.Literal<"bridgeResult">;
|
|
408
|
+
}>, Schema.Struct<{
|
|
409
|
+
readonly by: Schema.suspend<Schema.Union<readonly [Schema.String, Schema.Int, Schema.Struct<{
|
|
410
|
+
readonly to: Schema.String;
|
|
411
|
+
}>, Schema.Struct<{
|
|
412
|
+
readonly to: Schema.suspend<Schema.Struct<{
|
|
413
|
+
readonly slot: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
414
|
+
readonly weekday: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
415
|
+
}>>;
|
|
416
|
+
}>]>>;
|
|
417
|
+
readonly pick: Schema.optionalKey<Schema.NullOr<Schema.suspend<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
418
|
+
readonly beat: Schema.String;
|
|
419
|
+
}>]>>>>;
|
|
420
|
+
readonly type: Schema.Literal<"advanceClock">;
|
|
421
|
+
readonly writes: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
422
|
+
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
423
|
+
readonly facts: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
424
|
+
readonly retract: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
425
|
+
readonly state: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
426
|
+
readonly add: Schema.optionalKey<Schema.NullOr<Schema.Number>>;
|
|
427
|
+
readonly path: Schema.String;
|
|
428
|
+
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
429
|
+
}>>>>;
|
|
430
|
+
}>>>;
|
|
431
|
+
}>, Schema.Struct<{
|
|
432
|
+
readonly type: Schema.Literal<"hostWrite">;
|
|
433
|
+
readonly writes: Schema.suspend<Schema.Struct<{
|
|
434
|
+
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
435
|
+
readonly facts: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
436
|
+
readonly retract: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
437
|
+
readonly state: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
438
|
+
readonly add: Schema.optionalKey<Schema.NullOr<Schema.Number>>;
|
|
439
|
+
readonly path: Schema.String;
|
|
440
|
+
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
441
|
+
}>>>>;
|
|
442
|
+
}>>;
|
|
443
|
+
}>, Schema.Struct<{
|
|
444
|
+
readonly name: Schema.String;
|
|
445
|
+
readonly type: Schema.Literal<"worldEvent">;
|
|
446
|
+
}>, Schema.Struct<{
|
|
447
|
+
readonly type: Schema.Literal<"newRun">;
|
|
448
|
+
readonly writes: Schema.optionalKey<Schema.suspend<Schema.Struct<{
|
|
449
|
+
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
450
|
+
readonly facts: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
451
|
+
readonly retract: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
452
|
+
readonly state: Schema.optionalKey<Schema.$Array<Schema.suspend<Schema.Struct<{
|
|
453
|
+
readonly add: Schema.optionalKey<Schema.NullOr<Schema.Number>>;
|
|
454
|
+
readonly path: Schema.String;
|
|
455
|
+
readonly value: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
456
|
+
}>>>>;
|
|
457
|
+
}>>>;
|
|
458
|
+
}>]>;
|
|
459
|
+
}>]>;
|
|
460
|
+
export type LogEntry = typeof LogEntry.Type;
|
|
461
|
+
declare const InputLog_base: Context.ServiceClass<InputLog, "@lute-lang/runtime/InputLog", {
|
|
462
|
+
/** Start a new log with its `seed` or `snapshot` entry. */
|
|
463
|
+
readonly reset: (start: LogEntry) => Effect.Effect<void, InputLogError>;
|
|
464
|
+
/** Record an accepted input. */
|
|
465
|
+
readonly append: (entry: LogEntry) => Effect.Effect<void, InputLogError>;
|
|
466
|
+
readonly entries: Effect.Effect<ReadonlyArray<LogEntry>, InputLogError>;
|
|
467
|
+
}>;
|
|
468
|
+
export declare class InputLog extends InputLog_base {
|
|
469
|
+
}
|
|
470
|
+
/** A log held in memory for the session's lifetime. */
|
|
471
|
+
export declare const memory: Layer.Layer<InputLog>;
|
|
472
|
+
/** A log persisted under `key` in a `KeyValueStore` (e.g. `localStorage`). */
|
|
473
|
+
export declare const keyValueStore: (key: string) => Layer.Layer<InputLog, never, KeyValueStore.KeyValueStore>;
|
|
474
|
+
export {};
|