@series-inc/rundot-syncplay 5.23.0-beta.7
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 +610 -0
- package/dist/animation.d.ts +119 -0
- package/dist/animation.js +488 -0
- package/dist/asset-cooking.d.ts +82 -0
- package/dist/asset-cooking.js +364 -0
- package/dist/authority-room.d.ts +217 -0
- package/dist/authority-room.js +701 -0
- package/dist/bot-documents.d.ts +115 -0
- package/dist/bot-documents.js +549 -0
- package/dist/bot-primitives.d.ts +152 -0
- package/dist/bot-primitives.js +472 -0
- package/dist/browser.d.ts +57 -0
- package/dist/browser.js +53 -0
- package/dist/canonical.d.ts +12 -0
- package/dist/canonical.js +288 -0
- package/dist/certification.d.ts +455 -0
- package/dist/certification.js +1855 -0
- package/dist/chaos-certification.d.ts +56 -0
- package/dist/chaos-certification.js +1397 -0
- package/dist/cjs/animation.js +495 -0
- package/dist/cjs/asset-cooking.js +372 -0
- package/dist/cjs/authority-room.js +704 -0
- package/dist/cjs/bot-documents.js +556 -0
- package/dist/cjs/bot-primitives.js +482 -0
- package/dist/cjs/browser.js +96 -0
- package/dist/cjs/canonical.js +299 -0
- package/dist/cjs/certification.js +1860 -0
- package/dist/cjs/chaos-certification.js +1402 -0
- package/dist/cjs/collections.js +36 -0
- package/dist/cjs/collision.js +96 -0
- package/dist/cjs/commands.js +987 -0
- package/dist/cjs/config-bundle.js +491 -0
- package/dist/cjs/creator.js +30 -0
- package/dist/cjs/deterministic-primitives.js +134 -0
- package/dist/cjs/deterministic-session.js +1410 -0
- package/dist/cjs/ecs-lite.js +155 -0
- package/dist/cjs/effects-adapter.js +97 -0
- package/dist/cjs/engine-complete.js +2297 -0
- package/dist/cjs/engine-core-proof.js +70 -0
- package/dist/cjs/engine-parity-matrix.js +874 -0
- package/dist/cjs/engine-parity.js +3183 -0
- package/dist/cjs/engine-runtime.js +3141 -0
- package/dist/cjs/errors.js +22 -0
- package/dist/cjs/events.js +247 -0
- package/dist/cjs/examples/counter-duel.js +157 -0
- package/dist/cjs/examples/fixed-arena.js +368 -0
- package/dist/cjs/index.js +229 -0
- package/dist/cjs/input-authority.js +150 -0
- package/dist/cjs/input-button.js +256 -0
- package/dist/cjs/input-timeline.js +418 -0
- package/dist/cjs/instant-replay.js +66 -0
- package/dist/cjs/lag-compensation3d.js +837 -0
- package/dist/cjs/local-authority-server-runner.js +1121 -0
- package/dist/cjs/local-authority-wire.js +1497 -0
- package/dist/cjs/local-authority.js +817 -0
- package/dist/cjs/local-ws-adapter.js +150 -0
- package/dist/cjs/match-log.js +61 -0
- package/dist/cjs/math.js +157 -0
- package/dist/cjs/mock-network-adapter.js +26 -0
- package/dist/cjs/movement.js +703 -0
- package/dist/cjs/movement3d.js +1246 -0
- package/dist/cjs/multiclient-authority.js +308 -0
- package/dist/cjs/multiplayer-service.js +434 -0
- package/dist/cjs/navigation.js +347 -0
- package/dist/cjs/navmesh.js +1437 -0
- package/dist/cjs/networked-client.js +691 -0
- package/dist/cjs/networked-input-authority.js +443 -0
- package/dist/cjs/node.js +47 -0
- package/dist/cjs/number-lab.js +78 -0
- package/dist/cjs/offline-session.js +370 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/pause-resume.js +43 -0
- package/dist/cjs/physics-cert.js +426 -0
- package/dist/cjs/physics2d.js +751 -0
- package/dist/cjs/physics3d.js +1996 -0
- package/dist/cjs/prediction-culling.js +203 -0
- package/dist/cjs/protocol-lab.js +1299 -0
- package/dist/cjs/r3f-render-adapter.js +209 -0
- package/dist/cjs/random.js +59 -0
- package/dist/cjs/replay-bundle.js +1598 -0
- package/dist/cjs/replay-inspect.js +236 -0
- package/dist/cjs/replay-scoring.js +68 -0
- package/dist/cjs/replay.js +356 -0
- package/dist/cjs/reports.js +181 -0
- package/dist/cjs/rollback-history.js +251 -0
- package/dist/cjs/runtime-guards.js +111 -0
- package/dist/cjs/sample-lab.js +145 -0
- package/dist/cjs/sample-scenes.js +752 -0
- package/dist/cjs/schema-artifacts.js +359 -0
- package/dist/cjs/schema-codegen.js +544 -0
- package/dist/cjs/schema-dsl-binary.js +655 -0
- package/dist/cjs/schema.js +319 -0
- package/dist/cjs/sdk-offline.js +99 -0
- package/dist/cjs/session-promotion.js +74 -0
- package/dist/cjs/session-snapshot.js +265 -0
- package/dist/cjs/session-wire.js +216 -0
- package/dist/cjs/signals.js +103 -0
- package/dist/cjs/sparse-set.js +169 -0
- package/dist/cjs/synctest.js +136 -0
- package/dist/cjs/system-lifecycle.js +286 -0
- package/dist/cjs/timers.js +61 -0
- package/dist/cjs/tools/static-checker.js +1468 -0
- package/dist/cjs/types.js +2 -0
- package/dist/cjs/venus-mp-budget.js +125 -0
- package/dist/cjs/ws-frame.js +255 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +11379 -0
- package/dist/collections.d.ts +9 -0
- package/dist/collections.js +30 -0
- package/dist/collision.d.ts +25 -0
- package/dist/collision.js +85 -0
- package/dist/commands.d.ts +137 -0
- package/dist/commands.js +977 -0
- package/dist/config-bundle.d.ts +89 -0
- package/dist/config-bundle.js +483 -0
- package/dist/creator.d.ts +20 -0
- package/dist/creator.js +11 -0
- package/dist/deterministic-primitives.d.ts +59 -0
- package/dist/deterministic-primitives.js +126 -0
- package/dist/deterministic-session.d.ts +197 -0
- package/dist/deterministic-session.js +1401 -0
- package/dist/ecs-lite.d.ts +26 -0
- package/dist/ecs-lite.js +152 -0
- package/dist/effects-adapter.d.ts +21 -0
- package/dist/effects-adapter.js +94 -0
- package/dist/engine-complete.d.ts +45 -0
- package/dist/engine-complete.js +2292 -0
- package/dist/engine-core-proof.d.ts +26 -0
- package/dist/engine-core-proof.js +66 -0
- package/dist/engine-parity-matrix.d.ts +300 -0
- package/dist/engine-parity-matrix.js +869 -0
- package/dist/engine-parity.d.ts +74 -0
- package/dist/engine-parity.js +3178 -0
- package/dist/engine-runtime.d.ts +351 -0
- package/dist/engine-runtime.js +3123 -0
- package/dist/errors.d.ts +11 -0
- package/dist/errors.js +17 -0
- package/dist/events.d.ts +45 -0
- package/dist/events.js +242 -0
- package/dist/examples/counter-duel.d.ts +43 -0
- package/dist/examples/counter-duel.js +150 -0
- package/dist/examples/fixed-arena.d.ts +110 -0
- package/dist/examples/fixed-arena.js +356 -0
- package/dist/index.d.ts +101 -0
- package/dist/index.js +66 -0
- package/dist/input-authority.d.ts +82 -0
- package/dist/input-authority.js +147 -0
- package/dist/input-button.d.ts +36 -0
- package/dist/input-button.js +249 -0
- package/dist/input-timeline.d.ts +65 -0
- package/dist/input-timeline.js +412 -0
- package/dist/instant-replay.d.ts +59 -0
- package/dist/instant-replay.js +62 -0
- package/dist/lag-compensation3d.d.ts +146 -0
- package/dist/lag-compensation3d.js +827 -0
- package/dist/local-authority-server-runner.d.ts +79 -0
- package/dist/local-authority-server-runner.js +1118 -0
- package/dist/local-authority-wire.d.ts +142 -0
- package/dist/local-authority-wire.js +1477 -0
- package/dist/local-authority.d.ts +160 -0
- package/dist/local-authority.js +810 -0
- package/dist/local-ws-adapter.d.ts +14 -0
- package/dist/local-ws-adapter.js +146 -0
- package/dist/match-log.d.ts +74 -0
- package/dist/match-log.js +57 -0
- package/dist/math.d.ts +41 -0
- package/dist/math.js +154 -0
- package/dist/mock-network-adapter.d.ts +13 -0
- package/dist/mock-network-adapter.js +23 -0
- package/dist/movement.d.ts +155 -0
- package/dist/movement.js +694 -0
- package/dist/movement3d.d.ts +195 -0
- package/dist/movement3d.js +1238 -0
- package/dist/multiclient-authority.d.ts +30 -0
- package/dist/multiclient-authority.js +305 -0
- package/dist/multiplayer-service.d.ts +153 -0
- package/dist/multiplayer-service.js +429 -0
- package/dist/navigation.d.ts +91 -0
- package/dist/navigation.js +338 -0
- package/dist/navmesh.d.ts +236 -0
- package/dist/navmesh.js +1423 -0
- package/dist/networked-client.d.ts +124 -0
- package/dist/networked-client.js +688 -0
- package/dist/networked-input-authority.d.ts +51 -0
- package/dist/networked-input-authority.js +439 -0
- package/dist/node.d.ts +22 -0
- package/dist/node.js +19 -0
- package/dist/number-lab.d.ts +15 -0
- package/dist/number-lab.js +75 -0
- package/dist/offline-session.d.ts +2 -0
- package/dist/offline-session.js +367 -0
- package/dist/pause-resume.d.ts +48 -0
- package/dist/pause-resume.js +40 -0
- package/dist/physics-cert.d.ts +40 -0
- package/dist/physics-cert.js +389 -0
- package/dist/physics2d.d.ts +142 -0
- package/dist/physics2d.js +741 -0
- package/dist/physics3d.d.ts +285 -0
- package/dist/physics3d.js +1979 -0
- package/dist/prediction-culling.d.ts +34 -0
- package/dist/prediction-culling.js +200 -0
- package/dist/protocol-lab.d.ts +115 -0
- package/dist/protocol-lab.js +1295 -0
- package/dist/r3f-render-adapter.d.ts +61 -0
- package/dist/r3f-render-adapter.js +203 -0
- package/dist/random.d.ts +13 -0
- package/dist/random.js +55 -0
- package/dist/replay-bundle.d.ts +150 -0
- package/dist/replay-bundle.js +1586 -0
- package/dist/replay-inspect.d.ts +60 -0
- package/dist/replay-inspect.js +228 -0
- package/dist/replay-scoring.d.ts +28 -0
- package/dist/replay-scoring.js +65 -0
- package/dist/replay.d.ts +17 -0
- package/dist/replay.js +351 -0
- package/dist/reports.d.ts +176 -0
- package/dist/reports.js +174 -0
- package/dist/rollback-history.d.ts +46 -0
- package/dist/rollback-history.js +247 -0
- package/dist/runtime-guards.d.ts +1 -0
- package/dist/runtime-guards.js +108 -0
- package/dist/sample-lab.d.ts +32 -0
- package/dist/sample-lab.js +134 -0
- package/dist/sample-scenes.d.ts +86 -0
- package/dist/sample-scenes.js +745 -0
- package/dist/schema-artifacts.d.ts +49 -0
- package/dist/schema-artifacts.js +356 -0
- package/dist/schema-codegen.d.ts +21 -0
- package/dist/schema-codegen.js +538 -0
- package/dist/schema-dsl-binary.d.ts +75 -0
- package/dist/schema-dsl-binary.js +648 -0
- package/dist/schema.d.ts +87 -0
- package/dist/schema.js +315 -0
- package/dist/sdk-offline.d.ts +34 -0
- package/dist/sdk-offline.js +96 -0
- package/dist/session-promotion.d.ts +26 -0
- package/dist/session-promotion.js +70 -0
- package/dist/session-snapshot.d.ts +95 -0
- package/dist/session-snapshot.js +255 -0
- package/dist/session-wire.d.ts +89 -0
- package/dist/session-wire.js +211 -0
- package/dist/signals.d.ts +31 -0
- package/dist/signals.js +99 -0
- package/dist/sparse-set.d.ts +34 -0
- package/dist/sparse-set.js +165 -0
- package/dist/synctest.d.ts +31 -0
- package/dist/synctest.js +133 -0
- package/dist/system-lifecycle.d.ts +72 -0
- package/dist/system-lifecycle.js +281 -0
- package/dist/timers.d.ts +17 -0
- package/dist/timers.js +53 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.js +4 -0
- package/dist/tools/static-checker.d.ts +31 -0
- package/dist/tools/static-checker.js +1462 -0
- package/dist/tools/vite-plugin.d.ts +69 -0
- package/dist/tools/vite-plugin.js +203 -0
- package/dist/types.d.ts +148 -0
- package/dist/types.js +1 -0
- package/dist/venus-mp-budget.d.ts +29 -0
- package/dist/venus-mp-budget.js +122 -0
- package/dist/ws-frame.d.ts +49 -0
- package/dist/ws-frame.js +247 -0
- package/package.json +169 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import { type CanonicalValue } from './canonical.js';
|
|
2
|
+
import type { DeterministicCommandChannelDescriptor, DeterministicCommandTimeline, DeterministicCommandTimelineSnapshot, DeterministicPlayerCommand, DeterministicRejectedCommand } from './commands.js';
|
|
3
|
+
import { DeterministicRandom } from './random.js';
|
|
4
|
+
import { type DeterministicDslSchema } from './schema-dsl-binary.js';
|
|
5
|
+
export type DeterministicComponentScalarFieldKind = 'int' | 'fixed' | 'bool' | 'string' | 'asset-ref' | 'entity-ref';
|
|
6
|
+
export type DeterministicComponentFixedArrayFieldKind = `${DeterministicComponentScalarFieldKind}[${number}]`;
|
|
7
|
+
export type DeterministicComponentFrameHeapFieldKind = 'frame-list' | 'frame-dictionary' | 'frame-hash-set';
|
|
8
|
+
export type DeterministicComponentFieldKind = DeterministicComponentScalarFieldKind | `${DeterministicComponentScalarFieldKind}[]` | DeterministicComponentFixedArrayFieldKind | DeterministicComponentFrameHeapFieldKind;
|
|
9
|
+
export interface DeterministicComponentFieldDescriptor {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly kind: DeterministicComponentFieldKind;
|
|
12
|
+
readonly defaultValue?: CanonicalValue;
|
|
13
|
+
readonly assetType?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DeterministicComponentDescriptor {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly fields: readonly DeterministicComponentFieldDescriptor[];
|
|
18
|
+
readonly singleton?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface DeterministicFrameRuntimeDescriptor {
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly tickRate: number;
|
|
23
|
+
readonly components: readonly DeterministicComponentDescriptor[];
|
|
24
|
+
readonly systems: readonly DeterministicSystemDescriptor[];
|
|
25
|
+
readonly commandChannels?: readonly DeterministicCommandChannelDescriptor[];
|
|
26
|
+
readonly eventChannels?: readonly DeterministicRuntimePayloadDescriptor[];
|
|
27
|
+
readonly signalChannels?: readonly DeterministicRuntimePayloadDescriptor[];
|
|
28
|
+
}
|
|
29
|
+
export interface DeterministicSystemDescriptor {
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly group: 'input' | 'simulation' | 'physics' | 'post-physics' | 'presentation';
|
|
32
|
+
readonly order: number;
|
|
33
|
+
readonly before?: readonly string[];
|
|
34
|
+
readonly after?: readonly string[];
|
|
35
|
+
}
|
|
36
|
+
export interface DeterministicRuntimePayloadDescriptor {
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly fields: readonly DeterministicComponentFieldDescriptor[];
|
|
39
|
+
}
|
|
40
|
+
export interface DeterministicEntityRef {
|
|
41
|
+
readonly id: number;
|
|
42
|
+
readonly generation: number;
|
|
43
|
+
}
|
|
44
|
+
export type DeterministicComponentData = Readonly<Record<string, CanonicalValue>>;
|
|
45
|
+
export interface DeterministicQueryRow {
|
|
46
|
+
readonly entity: DeterministicEntityRef;
|
|
47
|
+
readonly components: Readonly<Record<string, DeterministicComponentData>>;
|
|
48
|
+
}
|
|
49
|
+
export interface DeterministicFrameQueryFilter {
|
|
50
|
+
readonly all?: readonly string[];
|
|
51
|
+
readonly any?: readonly string[];
|
|
52
|
+
readonly without?: readonly string[];
|
|
53
|
+
}
|
|
54
|
+
export type DeterministicFrameHeapCollectionKind = 'list' | 'dictionary' | 'hash-set';
|
|
55
|
+
export interface DeterministicFrameHeapHandle {
|
|
56
|
+
readonly id: number;
|
|
57
|
+
readonly generation: number;
|
|
58
|
+
readonly kind: DeterministicFrameHeapCollectionKind;
|
|
59
|
+
}
|
|
60
|
+
export interface DeterministicFrameHeapSnapshot {
|
|
61
|
+
readonly nextHandleId: number;
|
|
62
|
+
readonly freeHandleIds: readonly number[];
|
|
63
|
+
readonly generations: Readonly<Record<string, number>>;
|
|
64
|
+
readonly collections: Readonly<Record<string, DeterministicFrameHeapCollectionSnapshot>>;
|
|
65
|
+
}
|
|
66
|
+
export type DeterministicFrameHeapCollectionSnapshot = {
|
|
67
|
+
readonly kind: 'list';
|
|
68
|
+
readonly generation: number;
|
|
69
|
+
readonly values: readonly CanonicalValue[];
|
|
70
|
+
} | {
|
|
71
|
+
readonly kind: 'dictionary';
|
|
72
|
+
readonly generation: number;
|
|
73
|
+
readonly entries: readonly {
|
|
74
|
+
readonly key: string;
|
|
75
|
+
readonly value: CanonicalValue;
|
|
76
|
+
}[];
|
|
77
|
+
} | {
|
|
78
|
+
readonly kind: 'hash-set';
|
|
79
|
+
readonly generation: number;
|
|
80
|
+
readonly values: readonly CanonicalValue[];
|
|
81
|
+
};
|
|
82
|
+
export interface DeterministicFrameSnapshot {
|
|
83
|
+
readonly frame: number;
|
|
84
|
+
readonly nextEntityId: number;
|
|
85
|
+
readonly freeEntityIds: readonly number[];
|
|
86
|
+
readonly generations: Readonly<Record<string, number>>;
|
|
87
|
+
readonly components: Readonly<Record<string, Readonly<Record<string, DeterministicComponentData>>>>;
|
|
88
|
+
readonly singletonComponents: Readonly<Record<string, DeterministicComponentData>>;
|
|
89
|
+
readonly frameHeap: DeterministicFrameHeapSnapshot;
|
|
90
|
+
readonly debugEvents: readonly {
|
|
91
|
+
readonly frame: number;
|
|
92
|
+
readonly type: string;
|
|
93
|
+
readonly payload: CanonicalValue;
|
|
94
|
+
}[];
|
|
95
|
+
readonly runtimeEvents: readonly DeterministicRuntimeMessage[];
|
|
96
|
+
readonly runtimeSignals: readonly DeterministicRuntimeMessage[];
|
|
97
|
+
readonly dispatchedSignals: readonly DeterministicRuntimeMessage[];
|
|
98
|
+
readonly nextRuntimeMessageSequence: number;
|
|
99
|
+
readonly commandTimeline?: DeterministicCommandTimelineSnapshot;
|
|
100
|
+
readonly randomState: number;
|
|
101
|
+
readonly bytes: string;
|
|
102
|
+
readonly checksum: string;
|
|
103
|
+
}
|
|
104
|
+
export interface DeterministicFrameRuntimeOptions {
|
|
105
|
+
readonly commandTimeline?: DeterministicCommandTimeline;
|
|
106
|
+
readonly assetRefs?: readonly string[];
|
|
107
|
+
readonly typedAssetRefs?: Readonly<Record<string, readonly string[]>>;
|
|
108
|
+
readonly statelessSystemSourceGuards?: boolean;
|
|
109
|
+
}
|
|
110
|
+
export type DeterministicStatelessSystemDiagnosticReason = 'missing-system' | 'mutable-own-fields' | 'external-mutation';
|
|
111
|
+
export interface DeterministicStatelessSystemDiagnostic {
|
|
112
|
+
readonly systemId: string;
|
|
113
|
+
readonly reason: DeterministicStatelessSystemDiagnosticReason;
|
|
114
|
+
readonly externalMutation?: string;
|
|
115
|
+
readonly ownFields?: readonly string[];
|
|
116
|
+
}
|
|
117
|
+
export interface DeterministicStatelessSystemValidationResult {
|
|
118
|
+
readonly pass: boolean;
|
|
119
|
+
readonly diagnostics: readonly DeterministicStatelessSystemDiagnostic[];
|
|
120
|
+
}
|
|
121
|
+
export interface DeterministicSystemContext {
|
|
122
|
+
readonly frame: number;
|
|
123
|
+
readonly deltaTicks: 1;
|
|
124
|
+
readonly random: DeterministicRandom;
|
|
125
|
+
createEntity(): DeterministicEntityRef;
|
|
126
|
+
destroyEntity(entity: DeterministicEntityRef): void;
|
|
127
|
+
hasComponent(entity: DeterministicEntityRef, componentId: string): boolean;
|
|
128
|
+
getComponent(entity: DeterministicEntityRef, componentId: string): DeterministicComponentData | undefined;
|
|
129
|
+
setComponent(entity: DeterministicEntityRef, componentId: string, data: DeterministicComponentData): void;
|
|
130
|
+
removeComponent(entity: DeterministicEntityRef, componentId: string): void;
|
|
131
|
+
getSingleton(componentId: string): DeterministicComponentData | undefined;
|
|
132
|
+
setSingleton(componentId: string, data: DeterministicComponentData): void;
|
|
133
|
+
query(componentIds: readonly string[]): readonly DeterministicQueryRow[];
|
|
134
|
+
queryFilter(filter: DeterministicFrameQueryFilter): readonly DeterministicQueryRow[];
|
|
135
|
+
componentCount(componentId: string): number;
|
|
136
|
+
allocateFrameList(values?: readonly CanonicalValue[]): DeterministicFrameHeapHandle;
|
|
137
|
+
resolveFrameList(handle: DeterministicFrameHeapHandle): readonly CanonicalValue[];
|
|
138
|
+
setFrameList(handle: DeterministicFrameHeapHandle, values: readonly CanonicalValue[]): void;
|
|
139
|
+
allocateFrameDictionary(entries?: Readonly<Record<string, CanonicalValue>>): DeterministicFrameHeapHandle;
|
|
140
|
+
resolveFrameDictionary(handle: DeterministicFrameHeapHandle): Readonly<Record<string, CanonicalValue>>;
|
|
141
|
+
setFrameDictionaryValue(handle: DeterministicFrameHeapHandle, key: string, value: CanonicalValue): void;
|
|
142
|
+
deleteFrameDictionaryValue(handle: DeterministicFrameHeapHandle, key: string): void;
|
|
143
|
+
allocateFrameHashSet(values?: readonly CanonicalValue[]): DeterministicFrameHeapHandle;
|
|
144
|
+
resolveFrameHashSet(handle: DeterministicFrameHeapHandle): readonly CanonicalValue[];
|
|
145
|
+
addFrameHashSetValue(handle: DeterministicFrameHeapHandle, value: CanonicalValue): void;
|
|
146
|
+
deleteFrameHashSetValue(handle: DeterministicFrameHeapHandle, value: CanonicalValue): void;
|
|
147
|
+
freeFrameHeapCollection(handle: DeterministicFrameHeapHandle): void;
|
|
148
|
+
recordPlayerCommand(command: DeterministicPlayerCommand): DeterministicRejectedCommand | undefined;
|
|
149
|
+
recordPlayerCommandFromSlot(senderSlot: number, command: DeterministicPlayerCommand): DeterministicRejectedCommand | undefined;
|
|
150
|
+
pollPlayerCommands(frame?: number, slot?: number, channelId?: string): readonly DeterministicPlayerCommand[];
|
|
151
|
+
emitEvent(type: string, payload: DeterministicComponentData): void;
|
|
152
|
+
pollEvents(frame?: number, type?: string): readonly DeterministicRuntimeMessage[];
|
|
153
|
+
emitSignal(type: string, payload: DeterministicComponentData): void;
|
|
154
|
+
pollSignals(frame?: number, type?: string): readonly DeterministicRuntimeMessage[];
|
|
155
|
+
dispatchSignals<TState>(state: Readonly<TState>, handlers: readonly DeterministicRuntimeSignalHandler<TState>[], frame?: number, type?: string): TState;
|
|
156
|
+
emitDebug(type: string, payload: CanonicalValue): void;
|
|
157
|
+
}
|
|
158
|
+
export type DeterministicSystem = (ctx: DeterministicSystemContext) => void;
|
|
159
|
+
export interface DeterministicFrameRuntime {
|
|
160
|
+
readonly descriptor: DeterministicFrameRuntimeDescriptor;
|
|
161
|
+
readonly frame: number;
|
|
162
|
+
readonly debugEvents: readonly {
|
|
163
|
+
readonly frame: number;
|
|
164
|
+
readonly type: string;
|
|
165
|
+
readonly payload: CanonicalValue;
|
|
166
|
+
}[];
|
|
167
|
+
createEntity(): DeterministicEntityRef;
|
|
168
|
+
destroyEntity(entity: DeterministicEntityRef): void;
|
|
169
|
+
setComponent(entity: DeterministicEntityRef, componentId: string, data: DeterministicComponentData): void;
|
|
170
|
+
removeComponent(entity: DeterministicEntityRef, componentId: string): void;
|
|
171
|
+
setSingleton(componentId: string, data: DeterministicComponentData): void;
|
|
172
|
+
query(componentIds: readonly string[]): readonly DeterministicQueryRow[];
|
|
173
|
+
queryFilter(filter: DeterministicFrameQueryFilter): readonly DeterministicQueryRow[];
|
|
174
|
+
componentCount(componentId: string): number;
|
|
175
|
+
step(systems: Readonly<Record<string, DeterministicSystem>>): void;
|
|
176
|
+
snapshot(): DeterministicFrameSnapshot;
|
|
177
|
+
restore(snapshot: DeterministicFrameSnapshot): void;
|
|
178
|
+
}
|
|
179
|
+
export interface DeterministicComponentAccessor {
|
|
180
|
+
readonly id: string;
|
|
181
|
+
has(ctx: Pick<DeterministicSystemContext, 'hasComponent'>, entity: DeterministicEntityRef): boolean;
|
|
182
|
+
get(ctx: Pick<DeterministicSystemContext, 'getComponent'>, entity: DeterministicEntityRef): DeterministicComponentData | undefined;
|
|
183
|
+
getOrDefault(ctx: Pick<DeterministicSystemContext, 'getComponent'>, entity: DeterministicEntityRef): DeterministicComponentData;
|
|
184
|
+
set(ctx: Pick<DeterministicSystemContext, 'setComponent'>, entity: DeterministicEntityRef, data: DeterministicComponentData): void;
|
|
185
|
+
patch(ctx: Pick<DeterministicSystemContext, 'getComponent' | 'setComponent'>, entity: DeterministicEntityRef, data: DeterministicComponentData): void;
|
|
186
|
+
setField(ctx: Pick<DeterministicSystemContext, 'getComponent' | 'setComponent'>, entity: DeterministicEntityRef, fieldName: string, value: CanonicalValue): void;
|
|
187
|
+
remove(ctx: Pick<DeterministicSystemContext, 'removeComponent'>, entity: DeterministicEntityRef): void;
|
|
188
|
+
query(ctx: Pick<DeterministicSystemContext, 'query'>, extraComponentIds?: readonly string[]): readonly DeterministicQueryRow[];
|
|
189
|
+
queryFilter(ctx: Pick<DeterministicSystemContext, 'queryFilter'>, filter?: DeterministicFrameQueryFilter): readonly DeterministicQueryRow[];
|
|
190
|
+
count(ctx: Pick<DeterministicSystemContext, 'componentCount'>): number;
|
|
191
|
+
}
|
|
192
|
+
export interface DeterministicSingletonAccessor {
|
|
193
|
+
readonly id: string;
|
|
194
|
+
get(ctx: Pick<DeterministicSystemContext, 'getSingleton'>): DeterministicComponentData | undefined;
|
|
195
|
+
getOrDefault(ctx: Pick<DeterministicSystemContext, 'getSingleton'>): DeterministicComponentData;
|
|
196
|
+
set(ctx: Pick<DeterministicSystemContext, 'setSingleton'>, data: DeterministicComponentData): void;
|
|
197
|
+
patch(ctx: Pick<DeterministicSystemContext, 'getSingleton' | 'setSingleton'>, data: DeterministicComponentData): void;
|
|
198
|
+
setField(ctx: Pick<DeterministicSystemContext, 'getSingleton' | 'setSingleton'>, fieldName: string, value: CanonicalValue): void;
|
|
199
|
+
}
|
|
200
|
+
export interface DeterministicCommandAccessor {
|
|
201
|
+
readonly id: string;
|
|
202
|
+
record(ctx: Pick<DeterministicSystemContext, 'recordPlayerCommand'>, command: DeterministicPlayerCommand): DeterministicRejectedCommand | undefined;
|
|
203
|
+
recordFromSlot(ctx: Pick<DeterministicSystemContext, 'recordPlayerCommandFromSlot'>, senderSlot: number, command: DeterministicPlayerCommand): DeterministicRejectedCommand | undefined;
|
|
204
|
+
poll(ctx: Pick<DeterministicSystemContext, 'pollPlayerCommands' | 'frame'>, frame?: number, slot?: number): readonly DeterministicPlayerCommand[];
|
|
205
|
+
}
|
|
206
|
+
export interface DeterministicRuntimeMessage {
|
|
207
|
+
readonly frame: number;
|
|
208
|
+
readonly type: string;
|
|
209
|
+
readonly sequence: number;
|
|
210
|
+
readonly payload: DeterministicComponentData;
|
|
211
|
+
}
|
|
212
|
+
export interface DeterministicRuntimeSignalHandler<TState> {
|
|
213
|
+
readonly id: string;
|
|
214
|
+
readonly type: string;
|
|
215
|
+
readonly order: number;
|
|
216
|
+
handle(state: Readonly<TState>, signal: DeterministicRuntimeMessage): TState;
|
|
217
|
+
}
|
|
218
|
+
export interface DeterministicEventAccessor {
|
|
219
|
+
readonly id: string;
|
|
220
|
+
emit(ctx: Pick<DeterministicSystemContext, 'emitEvent'>, payload: DeterministicComponentData): void;
|
|
221
|
+
poll(ctx: Pick<DeterministicSystemContext, 'pollEvents' | 'frame'>, frame?: number): readonly DeterministicRuntimeMessage[];
|
|
222
|
+
}
|
|
223
|
+
export interface DeterministicSignalAccessor {
|
|
224
|
+
readonly id: string;
|
|
225
|
+
emit(ctx: Pick<DeterministicSystemContext, 'emitSignal'>, payload: DeterministicComponentData): void;
|
|
226
|
+
poll(ctx: Pick<DeterministicSystemContext, 'pollSignals' | 'frame'>, frame?: number): readonly DeterministicRuntimeMessage[];
|
|
227
|
+
dispatch<TState>(ctx: Pick<DeterministicSystemContext, 'dispatchSignals' | 'frame'>, state: Readonly<TState>, handlers: readonly DeterministicRuntimeSignalHandler<TState>[], frame?: number): TState;
|
|
228
|
+
}
|
|
229
|
+
export interface DeterministicFrameRuntimeAccessors {
|
|
230
|
+
readonly descriptorHash: string;
|
|
231
|
+
readonly components: Readonly<Record<string, DeterministicComponentAccessor>>;
|
|
232
|
+
readonly singletons: Readonly<Record<string, DeterministicSingletonAccessor>>;
|
|
233
|
+
readonly commands: Readonly<Record<string, DeterministicCommandAccessor>>;
|
|
234
|
+
readonly events: Readonly<Record<string, DeterministicEventAccessor>>;
|
|
235
|
+
readonly signals: Readonly<Record<string, DeterministicSignalAccessor>>;
|
|
236
|
+
readonly source: string;
|
|
237
|
+
readonly sourceHash: string;
|
|
238
|
+
}
|
|
239
|
+
export interface DeterministicDslRuntimeCompileOptions {
|
|
240
|
+
readonly id?: string;
|
|
241
|
+
readonly tickRate?: number;
|
|
242
|
+
readonly systems?: readonly DeterministicSystemDescriptor[];
|
|
243
|
+
}
|
|
244
|
+
export interface DeterministicDslRuntimeFixtureResult {
|
|
245
|
+
readonly schemaHash: string;
|
|
246
|
+
readonly descriptorHash: string;
|
|
247
|
+
readonly permutedDescriptorHash: string;
|
|
248
|
+
readonly generatedSourceHash: string;
|
|
249
|
+
readonly generatedSourceBytes: number;
|
|
250
|
+
readonly mapRuntimeChecksum: string;
|
|
251
|
+
readonly sparseRuntimeChecksum: string;
|
|
252
|
+
readonly restoredChecksum: string;
|
|
253
|
+
readonly componentCount: number;
|
|
254
|
+
readonly singletonCount: number;
|
|
255
|
+
readonly commandChannelCount: number;
|
|
256
|
+
readonly eventChannelCount: number;
|
|
257
|
+
readonly signalChannelCount: number;
|
|
258
|
+
readonly arrayFieldCount: number;
|
|
259
|
+
readonly fixedArrayFieldCount: number;
|
|
260
|
+
readonly assetRefFieldCount: number;
|
|
261
|
+
readonly entityRefFieldCount: number;
|
|
262
|
+
readonly dynamicCollectionHandleFieldCount: number;
|
|
263
|
+
readonly generatedAccessorsExecuted: number;
|
|
264
|
+
readonly generatedFrameApiHelpersExecuted: number;
|
|
265
|
+
readonly generatedEventSignalAccessorsExecuted: number;
|
|
266
|
+
readonly generatedTypedInterfacesCovered: boolean;
|
|
267
|
+
readonly runtimeAssetRefsValidated: boolean;
|
|
268
|
+
readonly descriptorPermutationStable: boolean;
|
|
269
|
+
readonly sparseRuntimeEquivalent: boolean;
|
|
270
|
+
readonly rollbackEquivalent: boolean;
|
|
271
|
+
readonly checksum: string;
|
|
272
|
+
}
|
|
273
|
+
export interface DeterministicFrameRuntimeFrameApiFixtureResult {
|
|
274
|
+
readonly checksum: string;
|
|
275
|
+
readonly restoredChecksum: string;
|
|
276
|
+
readonly filterAnyWithoutStable: boolean;
|
|
277
|
+
readonly componentCountStable: boolean;
|
|
278
|
+
readonly frameHeapRollbackEquivalent: boolean;
|
|
279
|
+
readonly frameHeapHandlesAllocated: number;
|
|
280
|
+
readonly frameHeapFreedRejected: boolean;
|
|
281
|
+
readonly frameHeapReusedGenerationSafe: boolean;
|
|
282
|
+
readonly frameHeapSnapshotBytes: number;
|
|
283
|
+
}
|
|
284
|
+
export interface DeterministicSystemSchedulerFixtureResult {
|
|
285
|
+
readonly checksum: string;
|
|
286
|
+
readonly restoredChecksum: string;
|
|
287
|
+
readonly sparseChecksum: string;
|
|
288
|
+
readonly rollbackEquivalent: boolean;
|
|
289
|
+
readonly sparseEquivalent: boolean;
|
|
290
|
+
readonly order: string;
|
|
291
|
+
readonly beforeEdges: number;
|
|
292
|
+
readonly afterEdges: number;
|
|
293
|
+
readonly cycleRejected: boolean;
|
|
294
|
+
readonly unknownDependencyRejected: boolean;
|
|
295
|
+
readonly crossGroupDependencyRejected: boolean;
|
|
296
|
+
}
|
|
297
|
+
export declare function createDeterministicFrameRuntime(descriptor: DeterministicFrameRuntimeDescriptor, seed?: number, options?: DeterministicFrameRuntimeOptions): DeterministicFrameRuntime;
|
|
298
|
+
export declare function createDeterministicSparseSetFrameRuntime(descriptor: DeterministicFrameRuntimeDescriptor, seed?: number, capacity?: number, options?: DeterministicFrameRuntimeOptions): DeterministicFrameRuntime;
|
|
299
|
+
export declare function createDeterministicFrameRuntimeAccessors(descriptor: DeterministicFrameRuntimeDescriptor): DeterministicFrameRuntimeAccessors;
|
|
300
|
+
export declare function generateDeterministicFrameRuntimeSource(descriptor: DeterministicFrameRuntimeDescriptor): string;
|
|
301
|
+
export declare function compileDeterministicDslRuntimeDescriptor(schema: DeterministicDslSchema, options?: DeterministicDslRuntimeCompileOptions): DeterministicFrameRuntimeDescriptor;
|
|
302
|
+
export declare function runDeterministicDslRuntimeFixture(iterations?: number, seed?: number): DeterministicDslRuntimeFixtureResult;
|
|
303
|
+
export declare function createDeterministicSlotMap<T extends CanonicalValue>(): {
|
|
304
|
+
readonly size: number;
|
|
305
|
+
insert(value: T): number;
|
|
306
|
+
get(slot: number): T | undefined;
|
|
307
|
+
remove(slot: number): void;
|
|
308
|
+
entries(): readonly {
|
|
309
|
+
readonly slot: number;
|
|
310
|
+
readonly value: T;
|
|
311
|
+
}[];
|
|
312
|
+
checksum(): string;
|
|
313
|
+
};
|
|
314
|
+
export declare function createDeterministicBitset(size: number): {
|
|
315
|
+
set(index: number, value: boolean): void;
|
|
316
|
+
has(index: number): boolean;
|
|
317
|
+
indices(): readonly number[];
|
|
318
|
+
checksum(): string;
|
|
319
|
+
};
|
|
320
|
+
export declare function runDeterministicFrameRuntimeMutationCorpus(iterations: number, seed: number): {
|
|
321
|
+
readonly checksum: string;
|
|
322
|
+
readonly restoredChecksum: string;
|
|
323
|
+
readonly queryOrderStable: boolean;
|
|
324
|
+
readonly entityCreates: number;
|
|
325
|
+
readonly entityDestroys: number;
|
|
326
|
+
readonly componentWrites: number;
|
|
327
|
+
readonly snapshotBytes: number;
|
|
328
|
+
readonly p95FrameTimeMs: number;
|
|
329
|
+
readonly p99FrameTimeMs: number;
|
|
330
|
+
};
|
|
331
|
+
export declare function runDeterministicFrameRuntimeFrameApiFixture(iterations?: number, seed?: number): DeterministicFrameRuntimeFrameApiFixtureResult;
|
|
332
|
+
export declare function isDeterministicFrameHeapStaleHandleError(error: unknown): boolean;
|
|
333
|
+
export declare function assertDeterministicFrameHeapStaleHandleError(error: unknown): void;
|
|
334
|
+
export declare function runDeterministicSystemSchedulerFixture(seed?: number): DeterministicSystemSchedulerFixtureResult;
|
|
335
|
+
export declare function runDeterministicGeneratedRuntimeFixture(iterations: number, seed: number): {
|
|
336
|
+
readonly descriptorHash: string;
|
|
337
|
+
readonly generatedSourceHash: string;
|
|
338
|
+
readonly generatedSourceBytes: number;
|
|
339
|
+
readonly mapRuntimeChecksum: string;
|
|
340
|
+
readonly sparseRuntimeChecksum: string;
|
|
341
|
+
readonly sparseSnapshotBytes: number;
|
|
342
|
+
readonly generatedAccessorsExecuted: number;
|
|
343
|
+
readonly sparseSetBackedRuntimeEquivalent: boolean;
|
|
344
|
+
readonly accessorQueryOrderStable: boolean;
|
|
345
|
+
readonly rollbackEquivalent: boolean;
|
|
346
|
+
readonly entityRefGenerationSafe: boolean;
|
|
347
|
+
readonly runtimeHostApiGuarded: boolean;
|
|
348
|
+
readonly checksum: string;
|
|
349
|
+
};
|
|
350
|
+
export declare function validateDeterministicFrameSystemsStateless(descriptor: DeterministicFrameRuntimeDescriptor, systems: Readonly<Record<string, DeterministicSystem>>): DeterministicStatelessSystemValidationResult;
|
|
351
|
+
export declare function assertDeterministicFrameSystemsStateless(descriptor: DeterministicFrameRuntimeDescriptor, systems: Readonly<Record<string, DeterministicSystem>>): void;
|