@holoscript/core 6.0.3 → 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 (244) hide show
  1. package/README.md +40 -40
  2. package/dist/codebase/index.d.ts +25 -0
  3. package/dist/compiler/index.d.ts +82 -0
  4. package/dist/constants.d.ts +4 -0
  5. package/dist/coordinators/index.d.ts +189 -0
  6. package/dist/entries/interop.d.ts +9 -0
  7. package/dist/entries/scripting.d.ts +7 -0
  8. package/dist/index.d.ts +520 -19
  9. package/dist/paper-0c-spike/index.d.ts +29 -0
  10. package/dist/reconstruction/index.d.ts +78 -0
  11. package/dist/self-improvement/index.d.ts +0 -48
  12. package/dist/storage/index.d.ts +24 -0
  13. package/dist/tools/index.d.ts +33 -0
  14. package/dist/traitDocs/traitDocs.d.ts +69 -0
  15. package/dist/traits/index.d.ts +61 -0
  16. package/package.json +102 -19
  17. package/dist/GLTFPipeline-3KLWWUQO.cjs +0 -34
  18. package/dist/GLTFPipeline-LYII2ZVQ.js +0 -13
  19. package/dist/HoloScriptPlusParser-BZR5DELQ.js +0 -692
  20. package/dist/HoloScriptPlusParser-SBMYDNXO.cjs +0 -697
  21. package/dist/USDZExporter-MHEHXZB4.cjs +0 -709
  22. package/dist/USDZExporter-YA55ZS35.js +0 -707
  23. package/dist/chunk-26TLYBFD.js +0 -309
  24. package/dist/chunk-27LWW5FU.cjs +0 -410
  25. package/dist/chunk-2UX5LRAP.cjs +0 -833
  26. package/dist/chunk-32TWR3HE.js +0 -70
  27. package/dist/chunk-3FXV5S25.cjs +0 -633
  28. package/dist/chunk-3FYZOR7S.cjs +0 -69
  29. package/dist/chunk-3KEU5QYY.cjs +0 -175
  30. package/dist/chunk-4FCZDTD5.js +0 -610
  31. package/dist/chunk-4KJ2R7VP.cjs +0 -507
  32. package/dist/chunk-4SMUJFHL.js +0 -1213
  33. package/dist/chunk-54FHG2MX.js +0 -655
  34. package/dist/chunk-56IF4NTA.js +0 -56
  35. package/dist/chunk-5GLCTO44.js +0 -161
  36. package/dist/chunk-5TOFIR6L.js +0 -407
  37. package/dist/chunk-65RFOWZI.js +0 -765
  38. package/dist/chunk-6OQBLABR.js +0 -5240
  39. package/dist/chunk-6WNCRE6F.js +0 -126
  40. package/dist/chunk-74YCHHTE.js +0 -1872
  41. package/dist/chunk-7H5UNJZD.cjs +0 -1973
  42. package/dist/chunk-7KPI4EKH.cjs +0 -701
  43. package/dist/chunk-7LCYLPW2.cjs +0 -663
  44. package/dist/chunk-7N3JIJMT.js +0 -1395
  45. package/dist/chunk-7X2IEJIE.cjs +0 -2526
  46. package/dist/chunk-A6GO3DPZ.cjs +0 -1002
  47. package/dist/chunk-AC4BSHFV.js +0 -765
  48. package/dist/chunk-AIUXRS74.cjs +0 -3681
  49. package/dist/chunk-ARNKA274.cjs +0 -130
  50. package/dist/chunk-AW7WAELW.js +0 -975
  51. package/dist/chunk-BKIGPPVM.js +0 -629
  52. package/dist/chunk-BO2OKHIY.js +0 -6055
  53. package/dist/chunk-BU5ZAFMC.js +0 -115
  54. package/dist/chunk-BY3B7ZYV.cjs +0 -457
  55. package/dist/chunk-C2QHVHZF.js +0 -4066
  56. package/dist/chunk-C7BNX4XJ.js +0 -1043
  57. package/dist/chunk-CLYEIWA5.cjs +0 -408
  58. package/dist/chunk-CMYAWUX3.js +0 -4455
  59. package/dist/chunk-CN4NOESF.cjs +0 -416
  60. package/dist/chunk-CNVM7J3M.js +0 -883
  61. package/dist/chunk-CO2VM2DK.js +0 -1965
  62. package/dist/chunk-CQDOF3G7.cjs +0 -1404
  63. package/dist/chunk-DH5G2JUA.cjs +0 -614
  64. package/dist/chunk-DIEDKX5B.cjs +0 -660
  65. package/dist/chunk-DN7UFU63.cjs +0 -172
  66. package/dist/chunk-DXVCEFZB.js +0 -2027
  67. package/dist/chunk-EGIZHYJP.cjs +0 -85
  68. package/dist/chunk-EJA7G2C4.cjs +0 -428
  69. package/dist/chunk-ELLQPFAF.js +0 -830
  70. package/dist/chunk-EMO7HAKJ.cjs +0 -1875
  71. package/dist/chunk-ENV7K6XA.js +0 -282
  72. package/dist/chunk-EPWRXL6S.js +0 -2522
  73. package/dist/chunk-EUFLX2PI.js +0 -56956
  74. package/dist/chunk-F5LVGHNT.js +0 -449
  75. package/dist/chunk-FEFHPUEM.cjs +0 -6122
  76. package/dist/chunk-FF3Q7ADR.js +0 -380
  77. package/dist/chunk-GC3YU46J.js +0 -762
  78. package/dist/chunk-H6WMMLQK.cjs +0 -4492
  79. package/dist/chunk-H7XMORZI.js +0 -2731
  80. package/dist/chunk-HAN4V3PF.cjs +0 -2037
  81. package/dist/chunk-HBZYCASG.js +0 -4208
  82. package/dist/chunk-HF4OFY25.cjs +0 -4097
  83. package/dist/chunk-HHS6FMOU.cjs +0 -3813
  84. package/dist/chunk-HJJLD366.js +0 -1169
  85. package/dist/chunk-HKCVM6OK.cjs +0 -2237
  86. package/dist/chunk-HUFNKFA6.js +0 -698
  87. package/dist/chunk-I3XGTIHM.cjs +0 -1505
  88. package/dist/chunk-I6XZ5DZF.cjs +0 -488
  89. package/dist/chunk-IHOUYQIA.js +0 -406
  90. package/dist/chunk-ILRBGFVD.cjs +0 -72
  91. package/dist/chunk-KDB6BUMB.js +0 -3666
  92. package/dist/chunk-KUJRR4FJ.js +0 -657
  93. package/dist/chunk-KYM4XRFG.js +0 -421
  94. package/dist/chunk-L3Z2HIWJ.cjs +0 -793
  95. package/dist/chunk-LBPEZQAF.js +0 -2232
  96. package/dist/chunk-LER4WXW5.cjs +0 -286
  97. package/dist/chunk-LK5IAVH6.cjs +0 -1173
  98. package/dist/chunk-M6FU6S22.js +0 -2911
  99. package/dist/chunk-MWEFR6YQ.js +0 -1857
  100. package/dist/chunk-N5FTS757.cjs +0 -415
  101. package/dist/chunk-NCUHGRTZ.js +0 -752
  102. package/dist/chunk-NKRKT6V2.js +0 -69
  103. package/dist/chunk-NLPSZT4C.js +0 -630
  104. package/dist/chunk-NRUB55IT.cjs +0 -771
  105. package/dist/chunk-NTMZSDXM.cjs +0 -633
  106. package/dist/chunk-ODGMVILH.js +0 -9662
  107. package/dist/chunk-PBA6NXCT.cjs +0 -1216
  108. package/dist/chunk-PHENW4MQ.js +0 -65
  109. package/dist/chunk-PJMOXFPR.cjs +0 -1861
  110. package/dist/chunk-PLMYCCA4.js +0 -504
  111. package/dist/chunk-PPULB4GG.cjs +0 -9728
  112. package/dist/chunk-PQLGZKMC.cjs +0 -755
  113. package/dist/chunk-Q56TT7IL.js +0 -483
  114. package/dist/chunk-QHVVVN47.cjs +0 -2033
  115. package/dist/chunk-QWKUKVRE.js +0 -2026
  116. package/dist/chunk-RE3OKSYF.cjs +0 -424
  117. package/dist/chunk-RT7LJRSF.cjs +0 -57378
  118. package/dist/chunk-SPDELRRV.cjs +0 -319
  119. package/dist/chunk-SUCBB66F.js +0 -229
  120. package/dist/chunk-TSWTWZ42.cjs +0 -4214
  121. package/dist/chunk-UITWA6DV.cjs +0 -2829
  122. package/dist/chunk-UQW6SLM5.js +0 -172
  123. package/dist/chunk-V2ILLPHK.cjs +0 -237
  124. package/dist/chunk-V42NTCFH.js +0 -3645
  125. package/dist/chunk-VJ3L7CHT.cjs +0 -169
  126. package/dist/chunk-VJVCD5T5.cjs +0 -769
  127. package/dist/chunk-VK5AXKO3.js +0 -746
  128. package/dist/chunk-VSXOIUCF.cjs +0 -473
  129. package/dist/chunk-VZNKJZTT.cjs +0 -749
  130. package/dist/chunk-W76ETJTI.js +0 -678
  131. package/dist/chunk-WFJIDI2N.cjs +0 -424
  132. package/dist/chunk-WN3YF33G.cjs +0 -118
  133. package/dist/chunk-WUXIRGZP.cjs +0 -2915
  134. package/dist/chunk-WYH4GVZ5.js +0 -1488
  135. package/dist/chunk-X4YVN7H3.cjs +0 -888
  136. package/dist/chunk-X67XRI2T.js +0 -410
  137. package/dist/chunk-XDXZM3ZP.cjs +0 -1046
  138. package/dist/chunk-XH7SE4HH.cjs +0 -72
  139. package/dist/chunk-XNMEH2BI.js +0 -126
  140. package/dist/chunk-XSF76QRU.js +0 -468
  141. package/dist/chunk-XSUZMPVQ.cjs +0 -682
  142. package/dist/chunk-XUILI4KB.cjs +0 -430
  143. package/dist/chunk-Y5MUAYTO.js +0 -167
  144. package/dist/chunk-Y7VK5TH3.cjs +0 -129
  145. package/dist/chunk-YCMQQQ5U.cjs +0 -5244
  146. package/dist/chunk-YYXH45E2.js +0 -426
  147. package/dist/chunk-ZGTGVSTZ.js +0 -422
  148. package/dist/chunk-ZL6VJ6SN.js +0 -421
  149. package/dist/cli/holoscript-runner.cjs +0 -2258
  150. package/dist/cli/holoscript-runner.js +0 -2233
  151. package/dist/codebase/index.cjs +0 -336
  152. package/dist/codebase/index.js +0 -331
  153. package/dist/compiler/agent-inference.cjs +0 -29
  154. package/dist/compiler/agent-inference.js +0 -6
  155. package/dist/compiler/android-xr.cjs +0 -20
  156. package/dist/compiler/android-xr.js +0 -10
  157. package/dist/compiler/android.cjs +0 -21
  158. package/dist/compiler/android.js +0 -11
  159. package/dist/compiler/ar.cjs +0 -21
  160. package/dist/compiler/ar.js +0 -9
  161. package/dist/compiler/babylon.cjs +0 -18
  162. package/dist/compiler/babylon.js +0 -12
  163. package/dist/compiler/coco.cjs +0 -27
  164. package/dist/compiler/coco.js +0 -4
  165. package/dist/compiler/domain-block-utils.cjs +0 -595
  166. package/dist/compiler/domain-block-utils.js +0 -9
  167. package/dist/compiler/dtdl.cjs +0 -25
  168. package/dist/compiler/dtdl.js +0 -9
  169. package/dist/compiler/gltf-pipeline.cjs +0 -39
  170. package/dist/compiler/gltf-pipeline.js +0 -4
  171. package/dist/compiler/godot.cjs +0 -16
  172. package/dist/compiler/godot.js +0 -10
  173. package/dist/compiler/incremental.cjs +0 -30
  174. package/dist/compiler/incremental.js +0 -5
  175. package/dist/compiler/index.cjs +0 -1522
  176. package/dist/compiler/index.js +0 -1321
  177. package/dist/compiler/ios.cjs +0 -21
  178. package/dist/compiler/ios.js +0 -11
  179. package/dist/compiler/multi-layer.cjs +0 -27
  180. package/dist/compiler/multi-layer.js +0 -12
  181. package/dist/compiler/nodetoy.cjs +0 -23
  182. package/dist/compiler/nodetoy.js +0 -4
  183. package/dist/compiler/openxr.cjs +0 -16
  184. package/dist/compiler/openxr.js +0 -10
  185. package/dist/compiler/playcanvas.cjs +0 -17
  186. package/dist/compiler/playcanvas.js +0 -11
  187. package/dist/compiler/r3f.cjs +0 -35
  188. package/dist/compiler/r3f.js +0 -13
  189. package/dist/compiler/remotion.cjs +0 -23
  190. package/dist/compiler/remotion.js +0 -4
  191. package/dist/compiler/reproducibility.cjs +0 -39
  192. package/dist/compiler/reproducibility.js +0 -4
  193. package/dist/compiler/sdf.cjs +0 -22
  194. package/dist/compiler/sdf.js +0 -10
  195. package/dist/compiler/semantic-scene.cjs +0 -31
  196. package/dist/compiler/semantic-scene.js +0 -4
  197. package/dist/compiler/state.cjs +0 -18
  198. package/dist/compiler/state.js +0 -8
  199. package/dist/compiler/trait-composition.cjs +0 -27
  200. package/dist/compiler/trait-composition.js +0 -6
  201. package/dist/compiler/unity.cjs +0 -16
  202. package/dist/compiler/unity.js +0 -10
  203. package/dist/compiler/unreal.cjs +0 -20
  204. package/dist/compiler/unreal.js +0 -10
  205. package/dist/compiler/urdf.cjs +0 -46
  206. package/dist/compiler/urdf.js +0 -10
  207. package/dist/compiler/usd-physics.cjs +0 -24
  208. package/dist/compiler/usd-physics.js +0 -7
  209. package/dist/compiler/visionos.cjs +0 -16
  210. package/dist/compiler/visionos.js +0 -10
  211. package/dist/compiler/vrchat.cjs +0 -20
  212. package/dist/compiler/vrchat.js +0 -10
  213. package/dist/compiler/vrr.cjs +0 -22
  214. package/dist/compiler/vrr.js +0 -10
  215. package/dist/compiler/wasm.cjs +0 -34
  216. package/dist/compiler/wasm.js +0 -10
  217. package/dist/compiler/webgpu.cjs +0 -16
  218. package/dist/compiler/webgpu.js +0 -10
  219. package/dist/debugger.cjs +0 -21
  220. package/dist/debugger.js +0 -8
  221. package/dist/entries/interop.cjs +0 -62
  222. package/dist/entries/interop.js +0 -5
  223. package/dist/entries/scripting.cjs +0 -67
  224. package/dist/entries/scripting.js +0 -10
  225. package/dist/index.cjs +0 -61703
  226. package/dist/index.js +0 -58652
  227. package/dist/math/vec3.cjs +0 -57
  228. package/dist/math/vec3.js +0 -4
  229. package/dist/parser.cjs +0 -26
  230. package/dist/parser.js +0 -9
  231. package/dist/playwright-7DTEQCBD.cjs +0 -98673
  232. package/dist/playwright-BIZXMLD2.js +0 -98660
  233. package/dist/post-quantum-JTTAAGO3.cjs +0 -6
  234. package/dist/post-quantum-RVPVDEPI.js +0 -4
  235. package/dist/runtime.cjs +0 -16
  236. package/dist/runtime.js +0 -7
  237. package/dist/storage/index.cjs +0 -37
  238. package/dist/storage/index.js +0 -4
  239. package/dist/traits/index.cjs +0 -14331
  240. package/dist/traits/index.js +0 -12126
  241. package/dist/type-checker.cjs +0 -18
  242. package/dist/type-checker.js +0 -5
  243. package/dist/wot/index.cjs +0 -29
  244. package/dist/wot/index.js +0 -4
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 {
@@ -945,6 +992,24 @@ export interface HSPlusNode extends ASTNode {
945
992
  [key: string]: any;
946
993
  }
947
994
 
995
+ export interface TraitBehavior {
996
+ readonly traitId: string;
997
+ readonly name: string;
998
+ enabled: boolean;
999
+ initialize?(): void | Promise<void>;
1000
+ update?(deltaTime: number): void;
1001
+ dispose?(): void | Promise<void>;
1002
+ }
1003
+
1004
+ export class ProceduralSkill {
1005
+ id: string;
1006
+ name: string;
1007
+ category: string;
1008
+ description: string;
1009
+ constructor(config: { id: string; name: string; category: string; description: string });
1010
+ execute(input: unknown): unknown;
1011
+ }
1012
+
948
1013
  export type VRTraitName = string;
949
1014
 
950
1015
  export class VRTraitRegistry {
@@ -1597,6 +1662,7 @@ export type HoloScriptLogger = Logger;
1597
1662
  export function setHoloScriptLogger(logger: Logger): void;
1598
1663
  export function resetLogger(): void;
1599
1664
  export function enableConsoleLogging(): void;
1665
+ export const logger: HoloScriptLogger;
1600
1666
  export function isHoloScriptSupported(): boolean;
1601
1667
 
1602
1668
  // ============================================================================
@@ -2908,3 +2974,438 @@ export type HoloDomainType = string;
2908
2974
  export class TraitConstraint { [key: string]: any; }
2909
2975
  export interface ISignalingBridge { [key: string]: any; }
2910
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>;