@holoscript/core 6.0.4 → 7.0.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.
Files changed (236) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -1
  3. package/dist/compiler/index.d.ts +82 -0
  4. package/dist/constants.d.ts +3 -2
  5. package/dist/coordinators/index.d.ts +189 -0
  6. package/dist/index.d.ts +501 -19
  7. package/dist/paper-0c-spike/index.d.ts +29 -0
  8. package/dist/reconstruction/index.d.ts +78 -0
  9. package/dist/tools/index.d.ts +22 -1
  10. package/dist/traitDocs/traitDocs.d.ts +69 -0
  11. package/dist/traits/index.d.ts +61 -0
  12. package/package.json +105 -57
  13. package/dist/GLTFPipeline-DEN36VNK.js +0 -12
  14. package/dist/GLTFPipeline-YPCAK236.cjs +0 -33
  15. package/dist/HoloScriptPlusParser-BN6KVRCM.js +0 -692
  16. package/dist/HoloScriptPlusParser-NC5FE6AL.cjs +0 -697
  17. package/dist/USDZExporter-NTMBNTDB.js +0 -707
  18. package/dist/USDZExporter-UWGWNMMD.cjs +0 -709
  19. package/dist/chunk-27LWW5FU.cjs +0 -410
  20. package/dist/chunk-2CWOLHTE.js +0 -69
  21. package/dist/chunk-33LSUQDD.cjs +0 -835
  22. package/dist/chunk-3FJCK5XA.js +0 -2232
  23. package/dist/chunk-3FXV5S25.cjs +0 -633
  24. package/dist/chunk-3FYZOR7S.cjs +0 -69
  25. package/dist/chunk-3SAK5KFL.cjs +0 -83
  26. package/dist/chunk-4XSNJCLC.cjs +0 -1859
  27. package/dist/chunk-54FHG2MX.js +0 -655
  28. package/dist/chunk-56IF4NTA.js +0 -56
  29. package/dist/chunk-5BGSECRJ.cjs +0 -2237
  30. package/dist/chunk-5GLCTO44.js +0 -161
  31. package/dist/chunk-5O6TQC6M.cjs +0 -1871
  32. package/dist/chunk-5OEOHAAW.cjs +0 -682
  33. package/dist/chunk-5TOFIR6L.js +0 -407
  34. package/dist/chunk-5WUNN6ZN.cjs +0 -428
  35. package/dist/chunk-6TZPZCOJ.cjs +0 -1404
  36. package/dist/chunk-6UEHYZ7V.cjs +0 -773
  37. package/dist/chunk-6XSERL6L.js +0 -5678
  38. package/dist/chunk-72EQECGT.cjs +0 -908
  39. package/dist/chunk-7AGYRWKW.cjs +0 -507
  40. package/dist/chunk-7LCYLPW2.cjs +0 -663
  41. package/dist/chunk-A7PIMZGU.js +0 -263
  42. package/dist/chunk-ATSKSYVE.cjs +0 -51683
  43. package/dist/chunk-B5TCIAPQ.cjs +0 -117
  44. package/dist/chunk-BF2235SI.cjs +0 -5714
  45. package/dist/chunk-BKIGPPVM.js +0 -629
  46. package/dist/chunk-BND3ST2K.cjs +0 -662
  47. package/dist/chunk-BU7VWW2K.js +0 -2522
  48. package/dist/chunk-BWFJEM5A.js +0 -5419
  49. package/dist/chunk-CAUCGUEA.cjs +0 -130
  50. package/dist/chunk-CBJSLA2E.cjs +0 -5423
  51. package/dist/chunk-CDPGV4DN.js +0 -114
  52. package/dist/chunk-CLYEIWA5.cjs +0 -408
  53. package/dist/chunk-CS2EMTGF.js +0 -1966
  54. package/dist/chunk-DMG7C4H2.js +0 -975
  55. package/dist/chunk-DXJQDCFL.js +0 -468
  56. package/dist/chunk-E3FWRT3Z.js +0 -608
  57. package/dist/chunk-E3UALNFA.js +0 -421
  58. package/dist/chunk-EONILVMF.js +0 -762
  59. package/dist/chunk-EQV4R3EV.cjs +0 -769
  60. package/dist/chunk-F3HH56EB.cjs +0 -5538
  61. package/dist/chunk-F4IULT7N.js +0 -1488
  62. package/dist/chunk-FF3Q7ADR.js +0 -380
  63. package/dist/chunk-FFKU7BTK.cjs +0 -1046
  64. package/dist/chunk-FHQVYCH2.js +0 -70
  65. package/dist/chunk-FSF7EQVA.cjs +0 -1974
  66. package/dist/chunk-G4VZTCIB.js +0 -659
  67. package/dist/chunk-G7CT3EMP.cjs +0 -1002
  68. package/dist/chunk-GGHSW2NN.js +0 -51334
  69. package/dist/chunk-GVUR45UF.cjs +0 -777
  70. package/dist/chunk-H5Z7NASB.js +0 -9662
  71. package/dist/chunk-HE7ULERA.cjs +0 -697
  72. package/dist/chunk-HJJLD366.js +0 -1169
  73. package/dist/chunk-HPS76H7Q.js +0 -309
  74. package/dist/chunk-HQUEA5R6.cjs +0 -424
  75. package/dist/chunk-HYNTS5CP.js +0 -422
  76. package/dist/chunk-I6XZ5DZF.cjs +0 -488
  77. package/dist/chunk-IBDG74G2.cjs +0 -1219
  78. package/dist/chunk-IFNQFCTM.js +0 -3098
  79. package/dist/chunk-IHOUYQIA.js +0 -406
  80. package/dist/chunk-ILRBGFVD.cjs +0 -72
  81. package/dist/chunk-IWI6J7FX.js +0 -421
  82. package/dist/chunk-K3JDKWGI.cjs +0 -270
  83. package/dist/chunk-K6EKD26I.js +0 -630
  84. package/dist/chunk-KCQ5NDYC.cjs +0 -3172
  85. package/dist/chunk-KED34ILP.js +0 -832
  86. package/dist/chunk-KSGXLT74.cjs +0 -457
  87. package/dist/chunk-L4G4RLXX.js +0 -767
  88. package/dist/chunk-LDP5OK6G.js +0 -1216
  89. package/dist/chunk-LGGRPKTV.cjs +0 -735
  90. package/dist/chunk-LK5IAVH6.cjs +0 -1173
  91. package/dist/chunk-LSW7P7ML.js +0 -3675
  92. package/dist/chunk-LXJ4667L.cjs +0 -3874
  93. package/dist/chunk-LZ266PCM.cjs +0 -4499
  94. package/dist/chunk-MD6KDHVE.cjs +0 -237
  95. package/dist/chunk-MEASWI2Y.js +0 -126
  96. package/dist/chunk-MPXBVFHQ.js +0 -768
  97. package/dist/chunk-N5FTS757.cjs +0 -415
  98. package/dist/chunk-NCUKG4SK.cjs +0 -3075
  99. package/dist/chunk-NDQNIJEH.js +0 -1715
  100. package/dist/chunk-NOZZ46QU.js +0 -168
  101. package/dist/chunk-OFKWH2IP.js +0 -449
  102. package/dist/chunk-PHENW4MQ.js +0 -65
  103. package/dist/chunk-PMGODDJA.cjs +0 -319
  104. package/dist/chunk-Q4QX3AET.cjs +0 -1505
  105. package/dist/chunk-Q56TT7IL.js +0 -483
  106. package/dist/chunk-Q5JT3YML.cjs +0 -129
  107. package/dist/chunk-Q5SJOGHQ.cjs +0 -4256
  108. package/dist/chunk-QGKNANZ3.js +0 -3071
  109. package/dist/chunk-QLEAOI3Q.cjs +0 -424
  110. package/dist/chunk-R7MA7QWV.js +0 -732
  111. package/dist/chunk-RVYPEYPX.js +0 -678
  112. package/dist/chunk-S2N5TNMA.js +0 -1855
  113. package/dist/chunk-S565K7NK.js +0 -752
  114. package/dist/chunk-SDAMZIRE.js +0 -765
  115. package/dist/chunk-T36DDXSF.js +0 -4250
  116. package/dist/chunk-T4NKMBDL.js +0 -5474
  117. package/dist/chunk-T7LEXZUZ.cjs +0 -2526
  118. package/dist/chunk-TEWCN33Y.js +0 -694
  119. package/dist/chunk-TQSZUOW5.cjs +0 -793
  120. package/dist/chunk-TSH3MSQU.cjs +0 -129
  121. package/dist/chunk-UERJ3YJV.js +0 -504
  122. package/dist/chunk-UPJBDCVF.js +0 -1395
  123. package/dist/chunk-V3NN3HPP.js +0 -4462
  124. package/dist/chunk-VJ3L7CHT.cjs +0 -169
  125. package/dist/chunk-WB4Z63GG.js +0 -229
  126. package/dist/chunk-WDW67DZB.cjs +0 -9728
  127. package/dist/chunk-WGMEAYBG.js +0 -126
  128. package/dist/chunk-X4ZF6CNE.cjs +0 -473
  129. package/dist/chunk-X6SEAXAX.cjs +0 -3681
  130. package/dist/chunk-XCWFGZAA.js +0 -1043
  131. package/dist/chunk-XD6IYDUX.js +0 -903
  132. package/dist/chunk-XG23EUQX.cjs +0 -1717
  133. package/dist/chunk-XRKWN5PL.cjs +0 -173
  134. package/dist/chunk-XUILI4KB.cjs +0 -430
  135. package/dist/chunk-XUTX5CBW.js +0 -126
  136. package/dist/chunk-XWPNTWDN.cjs +0 -755
  137. package/dist/chunk-XXINBTZK.cjs +0 -633
  138. package/dist/chunk-YCXFCXDS.js +0 -1868
  139. package/dist/chunk-YQK5JNFK.js +0 -3725
  140. package/dist/chunk-YYXH45E2.js +0 -426
  141. package/dist/chunk-Z34RLXRA.cjs +0 -612
  142. package/dist/chunk-ZP4D3CSX.cjs +0 -72
  143. package/dist/cli/holoscript-runner.cjs +0 -2259
  144. package/dist/cli/holoscript-runner.js +0 -2234
  145. package/dist/codebase/index.cjs +0 -336
  146. package/dist/codebase/index.js +0 -331
  147. package/dist/compiler/agent-inference.cjs +0 -28
  148. package/dist/compiler/agent-inference.js +0 -5
  149. package/dist/compiler/android-xr.cjs +0 -19
  150. package/dist/compiler/android-xr.js +0 -9
  151. package/dist/compiler/android.cjs +0 -20
  152. package/dist/compiler/android.js +0 -10
  153. package/dist/compiler/ar.cjs +0 -20
  154. package/dist/compiler/ar.js +0 -8
  155. package/dist/compiler/babylon.cjs +0 -17
  156. package/dist/compiler/babylon.js +0 -11
  157. package/dist/compiler/coco.cjs +0 -27
  158. package/dist/compiler/coco.js +0 -4
  159. package/dist/compiler/domain-block-utils.cjs +0 -602
  160. package/dist/compiler/domain-block-utils.js +0 -8
  161. package/dist/compiler/dtdl.cjs +0 -24
  162. package/dist/compiler/dtdl.js +0 -8
  163. package/dist/compiler/gltf-pipeline.cjs +0 -39
  164. package/dist/compiler/gltf-pipeline.js +0 -4
  165. package/dist/compiler/godot.cjs +0 -15
  166. package/dist/compiler/godot.js +0 -9
  167. package/dist/compiler/incremental.cjs +0 -29
  168. package/dist/compiler/incremental.js +0 -4
  169. package/dist/compiler/index.cjs +0 -2578
  170. package/dist/compiler/index.js +0 -2383
  171. package/dist/compiler/ios.cjs +0 -20
  172. package/dist/compiler/ios.js +0 -10
  173. package/dist/compiler/multi-layer.cjs +0 -20
  174. package/dist/compiler/multi-layer.js +0 -11
  175. package/dist/compiler/nodetoy.cjs +0 -23
  176. package/dist/compiler/nodetoy.js +0 -4
  177. package/dist/compiler/openxr.cjs +0 -15
  178. package/dist/compiler/openxr.js +0 -9
  179. package/dist/compiler/playcanvas.cjs +0 -16
  180. package/dist/compiler/playcanvas.js +0 -10
  181. package/dist/compiler/r3f.cjs +0 -34
  182. package/dist/compiler/r3f.js +0 -12
  183. package/dist/compiler/remotion.cjs +0 -23
  184. package/dist/compiler/remotion.js +0 -4
  185. package/dist/compiler/reproducibility.cjs +0 -39
  186. package/dist/compiler/reproducibility.js +0 -4
  187. package/dist/compiler/sdf.cjs +0 -21
  188. package/dist/compiler/sdf.js +0 -9
  189. package/dist/compiler/semantic-scene.cjs +0 -31
  190. package/dist/compiler/semantic-scene.js +0 -4
  191. package/dist/compiler/state.cjs +0 -17
  192. package/dist/compiler/state.js +0 -7
  193. package/dist/compiler/trait-composition.cjs +0 -26
  194. package/dist/compiler/trait-composition.js +0 -5
  195. package/dist/compiler/unity.cjs +0 -15
  196. package/dist/compiler/unity.js +0 -9
  197. package/dist/compiler/unreal.cjs +0 -19
  198. package/dist/compiler/unreal.js +0 -9
  199. package/dist/compiler/urdf.cjs +0 -45
  200. package/dist/compiler/urdf.js +0 -9
  201. package/dist/compiler/usd-physics.cjs +0 -23
  202. package/dist/compiler/usd-physics.js +0 -6
  203. package/dist/compiler/visionos.cjs +0 -15
  204. package/dist/compiler/visionos.js +0 -9
  205. package/dist/compiler/vrchat.cjs +0 -19
  206. package/dist/compiler/vrchat.js +0 -9
  207. package/dist/compiler/vrr.cjs +0 -21
  208. package/dist/compiler/vrr.js +0 -9
  209. package/dist/compiler/wasm.cjs +0 -33
  210. package/dist/compiler/wasm.js +0 -9
  211. package/dist/compiler/webgpu.cjs +0 -15
  212. package/dist/compiler/webgpu.js +0 -9
  213. package/dist/debugger.cjs +0 -21
  214. package/dist/debugger.js +0 -8
  215. package/dist/entries/interop.cjs +0 -62
  216. package/dist/entries/interop.js +0 -5
  217. package/dist/entries/scripting.cjs +0 -68
  218. package/dist/entries/scripting.js +0 -11
  219. package/dist/index.cjs +0 -40921
  220. package/dist/index.js +0 -37763
  221. package/dist/math/vec3.cjs +0 -57
  222. package/dist/math/vec3.js +0 -4
  223. package/dist/ml-dsa-PHCWUBPX.cjs +0 -1178
  224. package/dist/ml-dsa-WYLJHJO6.js +0 -1178
  225. package/dist/parser.cjs +0 -27
  226. package/dist/parser.js +0 -10
  227. package/dist/playwright-5OSAPTNH.js +0 -98660
  228. package/dist/playwright-RL6GY4F7.cjs +0 -98673
  229. package/dist/runtime.cjs +0 -16
  230. package/dist/runtime.js +0 -7
  231. package/dist/storage/index.cjs +0 -37
  232. package/dist/storage/index.js +0 -4
  233. package/dist/traits/index.cjs +0 -14649
  234. package/dist/traits/index.js +0 -12243
  235. package/dist/type-checker.cjs +0 -18
  236. package/dist/type-checker.js +0 -5
package/dist/index.d.ts CHANGED
@@ -44,6 +44,27 @@ export class HoloScriptPlusParser {
44
44
  parseStatement(source: string): any;
45
45
  }
46
46
 
47
+ export class HSPlusRuntime {
48
+ constructor(options?: any);
49
+ mount(container: any): void;
50
+ unmount(): void;
51
+ update(delta: number): void;
52
+ setState(updates: Record<string, any>): void;
53
+ getState(): Record<string, any>;
54
+ on(event: string, handler: (payload: any) => void): () => void;
55
+ emit(event: string, payload?: any): void;
56
+ }
57
+
58
+ export class World {
59
+ constructor();
60
+ createEntity(): string;
61
+ removeEntity(id: string): void;
62
+ }
63
+
64
+ export class ComponentRegistry {
65
+ static register(name: string, component: any): void;
66
+ }
67
+
47
68
  export class HoloCompositionParser {
48
69
  parse(source: string): any;
49
70
  }
@@ -59,6 +80,8 @@ export function parse(source: string, options?: any): ParseResult;
59
80
  export function parseHolo(source: string, options?: any): any;
60
81
  export function parseHoloStrict(source: string): any;
61
82
  export function parseHoloScriptPlus(source: string, options?: any): ParseResult;
83
+ export const holoFactory: any;
84
+ export function generateHoloSource(ast: any): string;
62
85
 
63
86
  // ============================================================================
64
87
  // COMPOSITION TYPES (from .holo files)
@@ -114,6 +137,7 @@ export interface HoloObjectTrait extends ASTNode {
114
137
  type: 'Trait';
115
138
  name: string;
116
139
  config?: any;
140
+ args?: any[];
117
141
  }
118
142
 
119
143
  export interface HoloSpatialGroup extends ASTNode {
@@ -140,6 +164,10 @@ export interface HoloAction extends ASTNode {
140
164
  [key: string]: any;
141
165
  }
142
166
 
167
+ export interface HoloStatement extends ASTNode {
168
+ [key: string]: any;
169
+ }
170
+
143
171
  export interface HoloParseResult {
144
172
  success: boolean;
145
173
  ast?: HoloComposition;
@@ -414,12 +442,14 @@ export class AdvancedCompression {
414
442
  }
415
443
 
416
444
  export interface INeuralSplatPacket {
417
- id: string;
418
- frameId?: number;
419
- count: number;
420
- data: Uint8Array;
421
- metadata?: Record<string, any>;
422
- cameraState?: any;
445
+ frameId: number;
446
+ cameraState: {
447
+ viewProjectionMatrix: number[];
448
+ cameraPosition: number[];
449
+ };
450
+ splatCount: number;
451
+ compressedSplatsBuffer: ArrayBuffer;
452
+ sortedIndicesBuffer: ArrayBuffer;
423
453
  }
424
454
 
425
455
  // ============================================================================
@@ -534,8 +564,10 @@ export function compileForIsaacSim(composition: HoloComposition, options?: Parti
534
564
  // ============================================================================
535
565
 
536
566
  export class ExpressionEvaluator {
567
+ constructor(context?: Record<string, unknown>, builtins?: Record<string, unknown>);
537
568
  evaluate(expression: string, context?: any): any;
538
569
  extractVariables(expression: string): string[];
570
+ updateContext(updates: Record<string, unknown>): void;
539
571
  }
540
572
 
541
573
  export class EventBus {
@@ -648,9 +680,11 @@ export interface HoloTemplate {
648
680
  [key: string]: any;
649
681
  }
650
682
  export interface HSPlusForDirective {
651
- iterable: string;
683
+ type: 'for';
652
684
  variable: string;
653
- body?: any[];
685
+ range?: [number, number];
686
+ iterable?: string;
687
+ body: unknown[];
654
688
  }
655
689
  export interface RaycastHit {
656
690
  point: Vector3;
@@ -801,6 +835,11 @@ export interface SafetyReport {
801
835
  }
802
836
 
803
837
  export type SafetyVerdict = 'safe' | 'warnings' | 'unsafe' | 'unchecked';
838
+ export type VREffect = string;
839
+ export type EffectCategory = string;
840
+ export type EffectViolationSeverity = 'error' | 'warning' | 'info';
841
+ export interface EffectViolation { effect: VREffect; severity: EffectViolationSeverity; [key: string]: any; }
842
+ export interface EffectDeclaration { effects: VREffect[]; [key: string]: any; }
804
843
 
805
844
  // ============================================================================
806
845
  // PLATFORM TYPES
@@ -869,18 +908,26 @@ export class SemanticSearchService<T = any> {
869
908
  // VR TRAIT SYSTEM TYPES
870
909
  // ============================================================================
871
910
 
872
- export interface Vector3 {
873
- x: number;
874
- y: number;
875
- z: number;
876
- }
911
+ // Vector3 is a tuple in source (packages/core/src/types/HoloScriptPlus.ts:10).
912
+ // Emitting as {x,y,z} interface here in 2026-04-22..04-25 produced hundreds
913
+ // of engine-package TS errors like "Type 'number[]' is missing properties
914
+ // x,y,z from Vector3" because consumer code correctly uses tuple-form
915
+ // (engine/src/animation/IKSolver.ts:139, etc). Restoring tuple form here
916
+ // lets pre-flight pass; for {x,y,z} object shape use three.Vector3 directly.
917
+ export type Vector3 = [number, number, number];
877
918
 
878
919
  export interface VRHand {
920
+ id: string;
879
921
  position: Vector3;
880
- rotation: Vector3;
881
- joints: Map<string, { position: Vector3; rotation: Vector3 }>;
882
- pinchStrength: number;
883
- gripStrength: number;
922
+ rotation: Quaternion;
923
+ velocity: Vector3;
924
+ joints?: Map<string, { position: Vector3; rotation: Vector3 }>;
925
+ pinch?: number;
926
+ pinchStrength?: number;
927
+ grip: number;
928
+ gripStrength?: number;
929
+ trigger: number;
930
+ pointing?: boolean;
884
931
  }
885
932
 
886
933
  export interface VRContext {
@@ -895,8 +942,8 @@ export interface PhysicsContext {
895
942
  applyAngularVelocity(node: HSPlusNode, angularVelocity: Vector3): void;
896
943
  setKinematic(node: HSPlusNode, kinematic: boolean): void;
897
944
  raycast(origin: Vector3, direction: Vector3, maxDistance: number): RaycastHit | null;
898
- getBodyPosition(nodeId: string): { x: number; y: number; z: number } | null;
899
- getBodyVelocity(nodeId: string): { x: number; y: number; z: number } | null;
945
+ getBodyPosition(nodeId: string): Vector3 | null;
946
+ getBodyVelocity(nodeId: string): Vector3 | null;
900
947
  }
901
948
 
902
949
  export interface AudioContext {
@@ -2927,3 +2974,438 @@ export type HoloDomainType = string;
2927
2974
  export class TraitConstraint { [key: string]: any; }
2928
2975
  export interface ISignalingBridge { [key: string]: any; }
2929
2976
  export interface NeuralSignalPayload { [key: string]: any; }
2977
+
2978
+ // ============================================================================
2979
+ // Visual logic graph (Studio bridge + PlayMode preview path)
2980
+ // ============================================================================
2981
+ export type PortType = 'number' | 'string' | 'boolean' | 'vec3' | 'any' | 'event';
2982
+ export interface PortDefinition {
2983
+ name: string;
2984
+ type: PortType;
2985
+ defaultValue?: unknown;
2986
+ }
2987
+ export interface LogicNode {
2988
+ id: string;
2989
+ type: string;
2990
+ inputs: PortDefinition[];
2991
+ outputs: PortDefinition[];
2992
+ position: { x: number; y: number };
2993
+ data: Record<string, unknown>;
2994
+ }
2995
+ export interface LogicConnection {
2996
+ id: string;
2997
+ fromNode: string;
2998
+ fromPort: string;
2999
+ toNode: string;
3000
+ toPort: string;
3001
+ }
3002
+ export interface EvaluationContext {
3003
+ state: Record<string, unknown>;
3004
+ deltaTime: number;
3005
+ events: Map<string, unknown[]>;
3006
+ emittedEvents: Map<string, unknown[]>;
3007
+ }
3008
+ export declare class NodeGraph {
3009
+ readonly id: string;
3010
+ constructor(id?: string);
3011
+ addNode(
3012
+ type: string,
3013
+ position?: { x: number; y: number },
3014
+ data?: Record<string, unknown>
3015
+ ): LogicNode;
3016
+ connect(
3017
+ fromNode: string,
3018
+ fromPort: string,
3019
+ toNode: string,
3020
+ toPort: string
3021
+ ): LogicConnection | null;
3022
+ getNode(nodeId: string): LogicNode | undefined;
3023
+ getNodes(): LogicNode[];
3024
+ getConnections(): LogicConnection[];
3025
+ topologicalSort(): string[];
3026
+ evaluate(context: EvaluationContext): Map<string, Record<string, unknown>>;
3027
+ }
3028
+ export interface NodeGraphExecutionResult {
3029
+ nodeOrder: string[];
3030
+ outputs: Map<string, Record<string, unknown>>;
3031
+ state: Record<string, unknown>;
3032
+ emittedEvents: Map<string, unknown[]>;
3033
+ }
3034
+ export interface NodeGraphPanelConfig {
3035
+ position: [number, number, number];
3036
+ nodeWidth: number;
3037
+ nodeHeight: number;
3038
+ gridSpacing: number;
3039
+ }
3040
+ export interface UIEntity {
3041
+ id: string;
3042
+ type: 'panel' | 'label' | 'port' | 'connection_line';
3043
+ position: [number, number, number];
3044
+ size?: { width: number; height: number };
3045
+ text?: string;
3046
+ color?: string;
3047
+ data?: Record<string, unknown>;
3048
+ }
3049
+ export declare class NodeGraphPanel {
3050
+ constructor(graph: NodeGraph, config?: Partial<NodeGraphPanelConfig>);
3051
+ generateUI(): UIEntity[];
3052
+ selectNode(nodeId: string | null): void;
3053
+ getSelectedNode(): string | null;
3054
+ executeGraph(contextOverrides?: Partial<EvaluationContext>): NodeGraphExecutionResult;
3055
+ }
3056
+ export declare function emitPreviewHoloScriptFromNodeGraphExecution(
3057
+ execution: NodeGraphExecutionResult,
3058
+ graph: NodeGraph
3059
+ ): string;
3060
+
3061
+ // ============================================================================
3062
+ // Agent Extension Types — mirrored from src/extensions/AgentExtensionTypes.ts.
3063
+ // Added 2026-04-25 to unblock packages/framework imports of these types.
3064
+ // Update both this block AND src/extensions/AgentExtensionTypes.ts if shape
3065
+ // changes; CLAUDE.md flags dist/index.d.ts as hand-crafted (not tsc).
3066
+ // ============================================================================
3067
+
3068
+ export interface IHiveContribution {
3069
+ id: string;
3070
+ agentId: string;
3071
+ timestamp: number;
3072
+ type: 'idea' | 'critique' | 'consensus' | 'solution';
3073
+ content: string;
3074
+ confidence: number;
3075
+ }
3076
+
3077
+ export interface IHiveSession {
3078
+ id: string;
3079
+ topic: string;
3080
+ goal: string;
3081
+ initiator: string;
3082
+ status: 'active' | 'resolved' | 'closed';
3083
+ participants: string[];
3084
+ contributions: IHiveContribution[];
3085
+ resolution?: unknown;
3086
+ }
3087
+
3088
+ export interface ICollectiveIntelligenceService {
3089
+ createSession(topic: string, goal: string, initiator: string): IHiveSession | Promise<string>;
3090
+ join(sessionId: string, agentId: string): void | Promise<void>;
3091
+ leave(sessionId: string, agentId: string): void | Promise<void>;
3092
+ contribute(
3093
+ sessionId: string,
3094
+ contribution: Omit<IHiveContribution, 'id' | 'timestamp'>
3095
+ ): IHiveContribution | Promise<void>;
3096
+ vote(
3097
+ sessionId: string,
3098
+ contributionId: string,
3099
+ voterId: string,
3100
+ vote: 'support' | 'oppose'
3101
+ ): void | Promise<void>;
3102
+ synthesize(sessionId: string): unknown;
3103
+ resolve(sessionId: string, resolution: string | unknown): void | Promise<void>;
3104
+ }
3105
+
3106
+ export interface ISwarmConfig {
3107
+ algorithm: 'pso' | 'aco' | 'bees' | 'hybrid';
3108
+ populationSize: number;
3109
+ maxIterations: number;
3110
+ convergenceThreshold: number;
3111
+ adaptiveSizing?: boolean;
3112
+ }
3113
+
3114
+ export interface ISwarmResult {
3115
+ bestSolution: number[];
3116
+ bestFitness: number;
3117
+ converged: boolean;
3118
+ iterations: number;
3119
+ improvementPercent: number;
3120
+ }
3121
+
3122
+ export interface ISwarmCoordinator {
3123
+ optimize(
3124
+ agents: { id: string; capacity: number; load: number }[],
3125
+ tasks: { id: string; complexity: number; priority: number }[],
3126
+ config?: Partial<ISwarmConfig>
3127
+ ): Promise<ISwarmResult>;
3128
+ getRecommendedPopulation(problemSize: number): number;
3129
+ }
3130
+
3131
+ export interface ILeaderElection {
3132
+ startElection(): Promise<string>;
3133
+ getLeader(): string | null;
3134
+ getRole(): 'leader' | 'follower' | 'candidate';
3135
+ onLeaderChange(callback: (leaderId: string | null) => void): () => void;
3136
+ }
3137
+
3138
+ // ============================================================================
3139
+ // SUPPLEMENTAL EXPORTS — fills the gap between the runtime barrel
3140
+ // (`packages/core/src/barrel/index.ts` + `barrel/culture-agents.ts` +
3141
+ // `migration/SchemaDiff.ts` + `types/HoloScriptPlus.ts` + `traits/LipSyncTrait.ts`)
3142
+ // and the hand-crafted public d.ts. Engine + studio consumers import these from
3143
+ // `@holoscript/core`; without these declarations the imports fail strict tsc
3144
+ // (TS2614 / TS2724) even though the runtime symbols ARE present (re-exported
3145
+ // via barrels). See W.099 deploy-blocker sweep.
3146
+ // ============================================================================
3147
+
3148
+ // ── HSPlus runtime / parser surface ─────────────────────────────────────────
3149
+
3150
+ /** Runtime-injected helper functions exposed to user scripts. */
3151
+ export interface HSPlusBuiltins {
3152
+ log: (...args: unknown[]) => void;
3153
+ warn: (...args: unknown[]) => void;
3154
+ error: (...args: unknown[]) => void;
3155
+ setTimeout: (fn: () => void, ms: number) => number;
3156
+ clearTimeout: (id: number) => void;
3157
+ setInterval?: (fn: () => void, ms: number) => number;
3158
+ clearInterval?: (id: number) => void;
3159
+ fetch?: (url: string, options?: unknown) => Promise<unknown>;
3160
+ emit?: (event: string, data?: unknown) => void;
3161
+ on?: (event: string, handler: (data: unknown) => void) => void;
3162
+ off?: (event: string, handler?: (data: unknown) => void) => void;
3163
+ showSettings?: () => void;
3164
+ openChat?: (config?: unknown) => void;
3165
+ assistant_generate?: (prompt: string, context?: string) => void;
3166
+ [key: string]: unknown;
3167
+ }
3168
+
3169
+ /** Parser directive variants — discriminated by `type`. Mirrors
3170
+ * `packages/core/src/types/AdvancedTypeSystem.ts:396`. Engine + studio
3171
+ * consumers narrow via `directive.type === 'lifecycle'` etc. */
3172
+
3173
+ export interface HSPlusBaseDirective {
3174
+ type: 'directive' | 'fragment';
3175
+ name: string;
3176
+ args: string[];
3177
+ }
3178
+
3179
+ export interface HSPlusTraitDirective {
3180
+ type: 'trait';
3181
+ name: string;
3182
+ args?: unknown[];
3183
+ config?: Record<string, unknown>;
3184
+ }
3185
+
3186
+ export interface HSPlusLifecycleDirective {
3187
+ type: 'lifecycle';
3188
+ name?: string;
3189
+ hook: string;
3190
+ params?: string[];
3191
+ body: string;
3192
+ }
3193
+
3194
+ export interface HSPlusStateDirective {
3195
+ type: 'state';
3196
+ name?: string;
3197
+ body?: Record<string, unknown>;
3198
+ initial?: unknown;
3199
+ }
3200
+
3201
+ export interface HSPlusForEachDirective {
3202
+ type: 'forEach';
3203
+ variable: string;
3204
+ collection: string;
3205
+ body: unknown[];
3206
+ }
3207
+
3208
+ export interface HSPlusWhileDirective {
3209
+ type: 'while';
3210
+ condition: string;
3211
+ body: unknown[];
3212
+ }
3213
+
3214
+ export interface HSPlusIfDirective {
3215
+ type: 'if';
3216
+ condition: string;
3217
+ body: unknown[];
3218
+ else?: unknown[];
3219
+ }
3220
+
3221
+ export interface HSPlusImportDirective {
3222
+ type: 'import';
3223
+ path: string;
3224
+ alias: string;
3225
+ namedImports?: string[];
3226
+ isWildcard?: boolean;
3227
+ }
3228
+
3229
+ export interface HSPlusVersionDirective {
3230
+ type: 'version';
3231
+ version: number;
3232
+ }
3233
+
3234
+ export interface HSPlusMigrateDirective {
3235
+ type: 'migrate';
3236
+ fromVersion: number;
3237
+ body: string;
3238
+ }
3239
+
3240
+ export interface HSPlusBindingsDirective {
3241
+ type: 'bindings';
3242
+ bindings: unknown[];
3243
+ }
3244
+
3245
+ export interface HSPlusExportDirective {
3246
+ type: 'export';
3247
+ exportKind: string;
3248
+ exportName: string;
3249
+ }
3250
+
3251
+ export interface HSPlusConfigDirective {
3252
+ type:
3253
+ | 'world_metadata'
3254
+ | 'world_config'
3255
+ | 'skybox'
3256
+ | 'ambient_light'
3257
+ | 'fog'
3258
+ | 'artwork_metadata'
3259
+ | 'npc_behavior';
3260
+ [key: string]: unknown;
3261
+ }
3262
+
3263
+ export interface HSPlusNamedConfigDirective {
3264
+ type: 'manifest' | 'semantic' | 'directional_light';
3265
+ name: string;
3266
+ [key: string]: unknown;
3267
+ }
3268
+
3269
+ /** Discriminated union of every parser directive. `HSPlusForDirective` is
3270
+ * declared earlier in this d.ts; the rest live above. */
3271
+ export type HSPlusDirective =
3272
+ | HSPlusBaseDirective
3273
+ | HSPlusTraitDirective
3274
+ | HSPlusLifecycleDirective
3275
+ | HSPlusStateDirective
3276
+ | HSPlusForDirective
3277
+ | HSPlusForEachDirective
3278
+ | HSPlusWhileDirective
3279
+ | HSPlusIfDirective
3280
+ | HSPlusImportDirective
3281
+ | HSPlusVersionDirective
3282
+ | HSPlusMigrateDirective
3283
+ | HSPlusBindingsDirective
3284
+ | HSPlusExportDirective
3285
+ | HSPlusConfigDirective
3286
+ | HSPlusNamedConfigDirective;
3287
+
3288
+ // ── State migration (packages/core/src/migration/SchemaDiff.ts) ─────────────
3289
+
3290
+ export type FieldChangeKind =
3291
+ | 'added'
3292
+ | 'removed'
3293
+ | 'type-changed'
3294
+ | 'default-changed'
3295
+ | 'reactive-changed'
3296
+ | 'unchanged';
3297
+
3298
+ export interface FieldChange {
3299
+ kind: FieldChangeKind;
3300
+ key: string;
3301
+ oldValue?: HoloValue;
3302
+ newValue?: HoloValue;
3303
+ oldType?: string;
3304
+ newType?: string;
3305
+ requiresMigration: boolean;
3306
+ }
3307
+
3308
+ export interface SchemaDiffResult {
3309
+ hasChanges: boolean;
3310
+ changes: FieldChange[];
3311
+ added: FieldChange[];
3312
+ removed: FieldChange[];
3313
+ typeChanged: FieldChange[];
3314
+ defaultChanged: FieldChange[];
3315
+ reactiveChanged: FieldChange[];
3316
+ requiresMigration: boolean;
3317
+ summary: string;
3318
+ }
3319
+
3320
+ export interface MigrationStep {
3321
+ fromVersion: number;
3322
+ /** Statement list (parsed nodes) OR raw code string. */
3323
+ body: unknown[] | string;
3324
+ }
3325
+
3326
+ export interface MigrationChain {
3327
+ fromVersion: number;
3328
+ toVersion: number;
3329
+ steps: MigrationStep[];
3330
+ }
3331
+
3332
+ export function diffState(
3333
+ oldState: HoloState | undefined,
3334
+ newState: HoloState | undefined
3335
+ ): SchemaDiffResult;
3336
+ export function buildMigrationChain(
3337
+ template: HoloTemplate,
3338
+ oldVersion: number,
3339
+ newVersion: number
3340
+ ): MigrationChain | null;
3341
+ export function snapshotState(state: Map<string, HoloValue>): Map<string, HoloValue>;
3342
+ export function applyAutoMigration(
3343
+ instanceState: Map<string, HoloValue>,
3344
+ diff: SchemaDiffResult,
3345
+ oldDefaults: Map<string, HoloValue>
3346
+ ): void;
3347
+
3348
+ // ── State machine AST node (packages/core/src/types.ts:735) ─────────────────
3349
+
3350
+ export interface StateMachineNode extends ASTNode {
3351
+ type: 'state-machine';
3352
+ name: string;
3353
+ initialState: string;
3354
+ states: any[];
3355
+ transitions: any[];
3356
+ }
3357
+
3358
+ // ── Lip-sync (packages/core/src/traits/LipSyncTrait.ts) ─────────────────────
3359
+
3360
+ export interface PhonemeTimestamp {
3361
+ phoneme: string;
3362
+ time: number;
3363
+ duration: number;
3364
+ weight?: number;
3365
+ }
3366
+
3367
+ // ── Culture / norms / WebRTC: NOT re-exported here.
3368
+ // These types live in `@holoscript/framework/agents` and `@holoscript/mesh`.
3369
+ // Engine consumers should import them DIRECTLY from those packages — both
3370
+ // are explicit dependencies of `@holoscript/engine`. Earlier attempts to
3371
+ // surface them through core's hand-crafted d.ts caused cascading TS2571
3372
+ // "Object is of type 'unknown'" errors because the minimal shapes here
3373
+ // couldn't keep up with the full method surface of `CulturalMemory` /
3374
+ // `NormEngine` classes. See engine/src/runtime/CultureRuntime.ts +
3375
+ // voice/VoiceManager.ts for the corrected import paths. ─────────────────
3376
+
3377
+ // ── Quaternion (packages/core/src/types/HoloScriptPlus.ts:26) ───────────────
3378
+
3379
+ export type Quaternion = [number, number, number, number];
3380
+
3381
+ // ── WebRTC transport (re-exported from @holoscript/mesh via
3382
+ // packages/core/src/barrel/registry-deploy-events.ts). Engine's
3383
+ // audio/VoiceManager.ts pulls a small subset; we mirror just that
3384
+ // surface here so the public d.ts isn't the wrong-shape lie that
3385
+ // blocked deploy pre-flight (W.099). Full surface lives in mesh. ─────────
3386
+
3387
+ export interface WebRTCTransportConfig {
3388
+ signalingUrl?: string;
3389
+ iceServers?: unknown[];
3390
+ [key: string]: unknown;
3391
+ }
3392
+
3393
+ export class WebRTCTransport {
3394
+ constructor(config?: WebRTCTransportConfig);
3395
+ connect(): Promise<void>;
3396
+ disconnect(): void;
3397
+ setMicrophoneEnabled(enabled: boolean): void;
3398
+ on(event: string, handler: (...args: unknown[]) => void): void;
3399
+ off(event: string, handler?: (...args: unknown[]) => void): void;
3400
+ }
3401
+
3402
+ // ── Host capabilities (packages/core/src/traits/TraitTypes.ts:134) ──────────
3403
+
3404
+ export interface HostCapabilities {
3405
+ fileSystem?: unknown;
3406
+ process?: unknown;
3407
+ network?: unknown;
3408
+ media?: unknown;
3409
+ depthInference?: unknown;
3410
+ gpuCompute?: unknown;
3411
+ }
@@ -0,0 +1,29 @@
1
+ /** @holoscript/core/paper-0c-spike — CAEL paper-0c primitives (subgrid attestation) */
2
+ export type HashMode = 'fnv1a' | 'sha256';
3
+ export declare const DEFAULT_HASH_MODE: HashMode;
4
+ export type SubgridParamValue = number | boolean | string;
5
+ export type SubgridParams = Record<string, SubgridParamValue>;
6
+ export interface SubgridAttestation {
7
+ readonly hash: string;
8
+ readonly hashMode: HashMode;
9
+ readonly canonicalForm: string;
10
+ }
11
+ export type VerifyResult =
12
+ | { readonly valid: true }
13
+ | {
14
+ readonly valid: false;
15
+ readonly reason: 'hashMode-mismatch' | 'hash-mismatch' | 'canonical-form-mismatch';
16
+ readonly expected: string;
17
+ readonly actual: string;
18
+ };
19
+ export declare class MissingSubgridParamsError extends Error { constructor(); }
20
+ export declare class InvalidSubgridParamValueError extends Error { constructor(key: string, value: unknown); }
21
+ export declare function canonicalizeSubgridParams(params: SubgridParams): string;
22
+ export declare function hashSubgridParams(params: SubgridParams, mode: 'fnv1a'): string;
23
+ export declare function hashSubgridParams(params: SubgridParams, mode: 'sha256'): Promise<string>;
24
+ export declare function hashSubgridParams(params: SubgridParams, mode?: HashMode): string | Promise<string>;
25
+ export declare function attestSubgridParams(params: SubgridParams, mode: 'fnv1a'): SubgridAttestation;
26
+ export declare function attestSubgridParams(params: SubgridParams, mode: 'sha256'): Promise<SubgridAttestation>;
27
+ export declare function attestSubgridParams(params: SubgridParams, mode?: HashMode): SubgridAttestation | Promise<SubgridAttestation>;
28
+ export declare function verifySubgridAttestation(attestation: SubgridAttestation, params: SubgridParams): VerifyResult;
29
+ export declare function verifySubgridAttestationAsync(attestation: SubgridAttestation, params: SubgridParams): Promise<VerifyResult>;
@@ -0,0 +1,78 @@
1
+ /** @holoscript/core/reconstruction — HoloMap + SimulationContract binding */
2
+ export declare const HOLOMAP_SIMULATION_CONTRACT_KIND: 'holomap.reconstruction.v1';
3
+ export interface ReconstructionFrame {
4
+ index: number;
5
+ timestampMs: number;
6
+ rgb: Uint8Array;
7
+ width: number;
8
+ height: number;
9
+ stride: 3 | 4;
10
+ }
11
+ export interface CameraPose {
12
+ position: [number, number, number];
13
+ rotation: [number, number, number, number];
14
+ confidence: number;
15
+ }
16
+ export interface PointCloudChunk {
17
+ positions: Float32Array;
18
+ colors: Uint8Array;
19
+ normals?: Float32Array;
20
+ confidence: Float32Array;
21
+ }
22
+ export interface ReconstructionStep {
23
+ frame: ReconstructionFrame;
24
+ pose: CameraPose;
25
+ points: PointCloudChunk;
26
+ trajectory: Record<string, unknown>;
27
+ anchor: Record<string, unknown>;
28
+ }
29
+ export interface HoloMapConfig {
30
+ inputResolution: { width: number; height: number };
31
+ targetFPS: number;
32
+ maxSequenceLength: number;
33
+ seed: number;
34
+ modelHash: string;
35
+ videoHash?: string;
36
+ cpuOffload: boolean;
37
+ weightStrategy?: 'distill' | 'fine-tune' | 'from-scratch';
38
+ allowCpuFallback?: boolean;
39
+ }
40
+ export declare const HOLOMAP_DEFAULTS: HoloMapConfig;
41
+ export interface ReconstructionManifest {
42
+ version: '1.0.0';
43
+ worldId: string;
44
+ displayName: string;
45
+ pointCount: number;
46
+ frameCount: number;
47
+ bounds: { min: [number, number, number]; max: [number, number, number] };
48
+ replayHash: string;
49
+ simulationContract: {
50
+ kind: 'holomap.reconstruction.v1';
51
+ replayFingerprint: string;
52
+ holoScriptBuild: string;
53
+ };
54
+ provenance: {
55
+ anchorHash?: string;
56
+ opentimestampsProof?: string;
57
+ baseCalldataTx?: string;
58
+ capturedAtIso: string;
59
+ };
60
+ assets: { points: string; trajectory: string; anchors: string; splats?: string };
61
+ weightStrategy: 'distill' | 'fine-tune' | 'from-scratch';
62
+ }
63
+ export interface HoloMapRuntime {
64
+ init(config: HoloMapConfig): Promise<void>;
65
+ step(frame: ReconstructionFrame): Promise<ReconstructionStep>;
66
+ finalize(): Promise<ReconstructionManifest>;
67
+ replayHash(): string;
68
+ dispose(): Promise<void>;
69
+ }
70
+ export declare function createHoloMapRuntime(config?: Partial<HoloMapConfig>): HoloMapRuntime;
71
+ export declare function computeHoloMapReplayFingerprint(parts: {
72
+ modelHash: string;
73
+ seed: number;
74
+ weightStrategy: string;
75
+ videoHash?: string;
76
+ }): string;
77
+ export declare function fnv1a32Hex(input: string): string;
78
+ export declare function assertHoloMapManifestContract(m: ReconstructionManifest): void;