@bldrs-ai/conway 1.417.1262 → 1.419.1268

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 (34) hide show
  1. package/compiled/examples/browser-bundled.cjs +34 -1
  2. package/compiled/examples/cli-bundled.cjs +34 -1
  3. package/compiled/examples/cli-step-bundled.cjs +34 -1
  4. package/compiled/examples/validator-bundled.cjs +34 -1
  5. package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.d.ts +7 -6
  6. package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.d.ts.map +1 -1
  7. package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.js +11 -8
  8. package/compiled/src/demand/index.d.ts +23 -0
  9. package/compiled/src/demand/index.d.ts.map +1 -0
  10. package/compiled/src/demand/index.js +22 -0
  11. package/compiled/src/index.d.ts +1 -0
  12. package/compiled/src/index.d.ts.map +1 -1
  13. package/compiled/src/index.js +6 -0
  14. package/compiled/src/mem/index.d.ts +17 -0
  15. package/compiled/src/mem/index.d.ts.map +1 -0
  16. package/compiled/src/mem/index.js +16 -0
  17. package/compiled/src/namespace_surface.test.d.ts +2 -0
  18. package/compiled/src/namespace_surface.test.d.ts.map +1 -0
  19. package/compiled/src/namespace_surface.test.js +35 -0
  20. package/compiled/src/step/parsing/step_parser.d.ts +19 -0
  21. package/compiled/src/step/parsing/step_parser.d.ts.map +1 -1
  22. package/compiled/src/step/parsing/step_parser.js +33 -0
  23. package/compiled/src/step/parsing/streaming_index_builder.d.ts +36 -0
  24. package/compiled/src/step/parsing/streaming_index_builder.d.ts.map +1 -1
  25. package/compiled/src/step/parsing/streaming_index_builder.js +109 -0
  26. package/compiled/src/step/parsing/streaming_index_builder_async.test.d.ts +2 -0
  27. package/compiled/src/step/parsing/streaming_index_builder_async.test.d.ts.map +1 -0
  28. package/compiled/src/step/parsing/streaming_index_builder_async.test.js +97 -0
  29. package/compiled/src/stream/index.d.ts +26 -0
  30. package/compiled/src/stream/index.d.ts.map +1 -0
  31. package/compiled/src/stream/index.js +24 -0
  32. package/compiled/src/version/version.js +1 -1
  33. package/compiled/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +16 -1
@@ -30,7 +30,7 @@ var import_node_process = require("node:process");
30
30
  var readline = __toESM(require("node:readline"), 1);
31
31
 
32
32
  // compiled/src/version/version.js
33
- var versionString = "Conway v1.417.1262";
33
+ var versionString = "Conway v1.419.1268";
34
34
 
35
35
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
36
36
  var wasmType = "";
@@ -2597,6 +2597,39 @@ var StepParser = class extends StepHeaderParser {
2597
2597
  onProgress?.(next.value);
2598
2598
  }
2599
2599
  }
2600
+ /**
2601
+ * Cooperative variant of parseDataBlockStreamed: identical parse and
2602
+ * window-slide behaviour (same generator body, same boundary callback),
2603
+ * but periodically awaits a macrotask so the event loop can run —
2604
+ * browsers repaint progress UI during a large streamed parse instead of
2605
+ * flagging the tab as stalled. Issue #301 §2 for the streamed path.
2606
+ *
2607
+ * @param input The input parsing buffer, positioned at the data section.
2608
+ * @param onRecordBoundary Called at each top-level record boundary with the
2609
+ * buffer; the callback may rebase the buffer's window in place.
2610
+ * @param onRecordIndexed Called as each top-level record is indexed — see
2611
+ * parseDataBlockStreamed.
2612
+ * @param onProgress Optional byte-cursor progress callback.
2613
+ * @param sink Optional index sink (columnar builds).
2614
+ * @param yieldIntervalMs Minimum ms between event-loop yields.
2615
+ * @return {Promise<BlockParseResult>} The parsing result, including the
2616
+ * index and result enum.
2617
+ */
2618
+ async parseDataBlockStreamedAsync(input2, onRecordBoundary, onRecordIndexed, onProgress, sink, yieldIntervalMs = DEFAULT_PARSE_YIELD_INTERVAL_MS) {
2619
+ const parser211 = this.parseDataBlockIncremental(input2, onRecordBoundary, onRecordIndexed, sink);
2620
+ let lastYield = Date.now();
2621
+ while (true) {
2622
+ const next = parser211.next();
2623
+ if (next.done === true) {
2624
+ return next.value;
2625
+ }
2626
+ onProgress?.(next.value);
2627
+ if (Date.now() - lastYield >= yieldIntervalMs) {
2628
+ await yieldToEventLoop();
2629
+ lastYield = Date.now();
2630
+ }
2631
+ }
2632
+ }
2600
2633
  /**
2601
2634
  * Cooperative variant of parseDataBlock: identical parse (same generator
2602
2635
  * body), but periodically awaits a macrotask so the event loop can run —
@@ -14965,7 +14965,7 @@ ${t5.join("\n")}` : "";
14965
14965
  var import_process = require("process");
14966
14966
 
14967
14967
  // compiled/src/version/version.js
14968
- var versionString = "Conway v1.417.1262";
14968
+ var versionString = "Conway v1.419.1268";
14969
14969
 
14970
14970
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
14971
14971
  function pThreadsAllowed() {
@@ -18411,6 +18411,39 @@ var StepParser = class extends StepHeaderParser {
18411
18411
  onProgress?.(next.value);
18412
18412
  }
18413
18413
  }
18414
+ /**
18415
+ * Cooperative variant of parseDataBlockStreamed: identical parse and
18416
+ * window-slide behaviour (same generator body, same boundary callback),
18417
+ * but periodically awaits a macrotask so the event loop can run —
18418
+ * browsers repaint progress UI during a large streamed parse instead of
18419
+ * flagging the tab as stalled. Issue #301 §2 for the streamed path.
18420
+ *
18421
+ * @param input The input parsing buffer, positioned at the data section.
18422
+ * @param onRecordBoundary Called at each top-level record boundary with the
18423
+ * buffer; the callback may rebase the buffer's window in place.
18424
+ * @param onRecordIndexed Called as each top-level record is indexed — see
18425
+ * parseDataBlockStreamed.
18426
+ * @param onProgress Optional byte-cursor progress callback.
18427
+ * @param sink Optional index sink (columnar builds).
18428
+ * @param yieldIntervalMs Minimum ms between event-loop yields.
18429
+ * @return {Promise<BlockParseResult>} The parsing result, including the
18430
+ * index and result enum.
18431
+ */
18432
+ async parseDataBlockStreamedAsync(input, onRecordBoundary, onRecordIndexed, onProgress, sink, yieldIntervalMs = DEFAULT_PARSE_YIELD_INTERVAL_MS) {
18433
+ const parser210 = this.parseDataBlockIncremental(input, onRecordBoundary, onRecordIndexed, sink);
18434
+ let lastYield = Date.now();
18435
+ while (true) {
18436
+ const next = parser210.next();
18437
+ if (next.done === true) {
18438
+ return next.value;
18439
+ }
18440
+ onProgress?.(next.value);
18441
+ if (Date.now() - lastYield >= yieldIntervalMs) {
18442
+ await yieldToEventLoop();
18443
+ lastYield = Date.now();
18444
+ }
18445
+ }
18446
+ }
18414
18447
  /**
18415
18448
  * Cooperative variant of parseDataBlock: identical parse (same generator
18416
18449
  * body), but periodically awaits a macrotask so the event loop can run —
@@ -15943,7 +15943,7 @@ var ParsingBuffer = class {
15943
15943
  };
15944
15944
 
15945
15945
  // compiled/src/version/version.js
15946
- var versionString = "Conway v1.417.1262";
15946
+ var versionString = "Conway v1.419.1268";
15947
15947
 
15948
15948
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
15949
15949
  function pThreadsAllowed() {
@@ -18319,6 +18319,39 @@ var StepParser = class extends StepHeaderParser {
18319
18319
  onProgress?.(next.value);
18320
18320
  }
18321
18321
  }
18322
+ /**
18323
+ * Cooperative variant of parseDataBlockStreamed: identical parse and
18324
+ * window-slide behaviour (same generator body, same boundary callback),
18325
+ * but periodically awaits a macrotask so the event loop can run —
18326
+ * browsers repaint progress UI during a large streamed parse instead of
18327
+ * flagging the tab as stalled. Issue #301 §2 for the streamed path.
18328
+ *
18329
+ * @param input The input parsing buffer, positioned at the data section.
18330
+ * @param onRecordBoundary Called at each top-level record boundary with the
18331
+ * buffer; the callback may rebase the buffer's window in place.
18332
+ * @param onRecordIndexed Called as each top-level record is indexed — see
18333
+ * parseDataBlockStreamed.
18334
+ * @param onProgress Optional byte-cursor progress callback.
18335
+ * @param sink Optional index sink (columnar builds).
18336
+ * @param yieldIntervalMs Minimum ms between event-loop yields.
18337
+ * @return {Promise<BlockParseResult>} The parsing result, including the
18338
+ * index and result enum.
18339
+ */
18340
+ async parseDataBlockStreamedAsync(input, onRecordBoundary, onRecordIndexed, onProgress, sink, yieldIntervalMs = DEFAULT_PARSE_YIELD_INTERVAL_MS) {
18341
+ const parser28 = this.parseDataBlockIncremental(input, onRecordBoundary, onRecordIndexed, sink);
18342
+ let lastYield = Date.now();
18343
+ while (true) {
18344
+ const next = parser28.next();
18345
+ if (next.done === true) {
18346
+ return next.value;
18347
+ }
18348
+ onProgress?.(next.value);
18349
+ if (Date.now() - lastYield >= yieldIntervalMs) {
18350
+ await yieldToEventLoop();
18351
+ lastYield = Date.now();
18352
+ }
18353
+ }
18354
+ }
18322
18355
  /**
18323
18356
  * Cooperative variant of parseDataBlock: identical parse (same generator
18324
18357
  * body), but periodically awaits a macrotask so the event loop can run —
@@ -944,7 +944,7 @@ var EntityTypesIfcCount = 909;
944
944
  var entity_types_ifc_gen_default = EntityTypesIfc;
945
945
 
946
946
  // compiled/src/version/version.js
947
- var versionString = "Conway v1.417.1262";
947
+ var versionString = "Conway v1.419.1268";
948
948
 
949
949
  // compiled/dependencies/conway-geom/interface/conway_geometry.js
950
950
  var wasmType = "";
@@ -3511,6 +3511,39 @@ var StepParser = class extends StepHeaderParser {
3511
3511
  onProgress?.(next.value);
3512
3512
  }
3513
3513
  }
3514
+ /**
3515
+ * Cooperative variant of parseDataBlockStreamed: identical parse and
3516
+ * window-slide behaviour (same generator body, same boundary callback),
3517
+ * but periodically awaits a macrotask so the event loop can run —
3518
+ * browsers repaint progress UI during a large streamed parse instead of
3519
+ * flagging the tab as stalled. Issue #301 §2 for the streamed path.
3520
+ *
3521
+ * @param input The input parsing buffer, positioned at the data section.
3522
+ * @param onRecordBoundary Called at each top-level record boundary with the
3523
+ * buffer; the callback may rebase the buffer's window in place.
3524
+ * @param onRecordIndexed Called as each top-level record is indexed — see
3525
+ * parseDataBlockStreamed.
3526
+ * @param onProgress Optional byte-cursor progress callback.
3527
+ * @param sink Optional index sink (columnar builds).
3528
+ * @param yieldIntervalMs Minimum ms between event-loop yields.
3529
+ * @return {Promise<BlockParseResult>} The parsing result, including the
3530
+ * index and result enum.
3531
+ */
3532
+ async parseDataBlockStreamedAsync(input, onRecordBoundary, onRecordIndexed, onProgress, sink, yieldIntervalMs = DEFAULT_PARSE_YIELD_INTERVAL_MS) {
3533
+ const parser211 = this.parseDataBlockIncremental(input, onRecordBoundary, onRecordIndexed, sink);
3534
+ let lastYield = Date.now();
3535
+ while (true) {
3536
+ const next = parser211.next();
3537
+ if (next.done === true) {
3538
+ return next.value;
3539
+ }
3540
+ onProgress?.(next.value);
3541
+ if (Date.now() - lastYield >= yieldIntervalMs) {
3542
+ await yieldToEventLoop();
3543
+ lastYield = Date.now();
3544
+ }
3545
+ }
3546
+ }
3514
3547
  /**
3515
3548
  * Cooperative variant of parseDataBlock: identical parse (same generator
3516
3549
  * body), but periodically awaits a macrotask so the event loop can run —
@@ -138,12 +138,13 @@ export declare class IfcApiProxyIfc implements IfcApiModelPassthrough {
138
138
  * classic open, and `spillSourceToExternalStore` works afterwards as
139
139
  * usual.
140
140
  *
141
- * The columnar build is a single synchronous pass (no mid-parse
142
- * yields yet), so the 'dataParse' progress phase reports its
143
- * boundaries without intermediate ticks; extraction remains
144
- * cooperative. Throws when the streamed parse is anything but
145
- * COMPLETE the caller (OpenModelStreamed) falls back to the
146
- * classic path, which tolerates recoverable parses.
141
+ * The columnar build is cooperative (periodic event-loop yields, like
142
+ * the classic parseDataBlockAsync) with absolute byte-cursor progress
143
+ * ticks, and extraction is cooperative too — the streamed open keeps
144
+ * the repaint/no-stall property of OpenModelAsync (#301 §2). Throws
145
+ * when the streamed parse is anything but COMPLETE — the caller
146
+ * (OpenModelStreamed) falls back to the classic path, which tolerates
147
+ * recoverable parses.
147
148
  *
148
149
  * @param modelID The model ID being opened.
149
150
  * @param data The IFC data buffer.
@@ -1 +1 @@
1
- {"version":3,"file":"ifc_api_proxy_ifc.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api_proxy_ifc.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACf,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA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CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW;IAIrD;;;;;;OAMG;IACH,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAC/E,YAAY,GAAG,WAAW;IAK5B;;;;OAIG;IACH,UAAU;IAIV;;;;OAIG;IACH,eAAe,CAAE,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI;IA2NvD;;;;;OAKG;IACH,wBAAwB,CACpB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EACpB,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI;IA+O1C;;;;OAIG;IACH,eAAe,IAAI,MAAM,CAAC,QAAQ,CAAC;IA0RnC;;;;;OAKG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ;IAqDxC;;;;;OAKG;IACH,4BAA4B,IAAI,IAAI;CAwBrC"}
@@ -9,7 +9,7 @@ import { extractModelInfo } from "../../loaders/loading_utilities.js";
9
9
  import IfcStepParser from "../../ifc/ifc_step_parser.js";
10
10
  import ParsingBuffer from "../../parsing/parsing_buffer.js";
11
11
  import { BufferByteSource } from "../../step/parsing/byte_source.js";
12
- import { buildColumnarIndexStreaming, } from "../../step/parsing/streaming_index_builder.js";
12
+ import { buildColumnarIndexStreamingAsync, } from "../../step/parsing/streaming_index_builder.js";
13
13
  import { ExtractResult } from "../../index.js";
14
14
  import { IfcGeometryExtraction } from "../../ifc/ifc_geometry_extraction.js";
15
15
  import { ParseResult } from "../../index.js";
@@ -379,12 +379,13 @@ export class IfcApiProxyIfc {
379
379
  * classic open, and `spillSourceToExternalStore` works afterwards as
380
380
  * usual.
381
381
  *
382
- * The columnar build is a single synchronous pass (no mid-parse
383
- * yields yet), so the 'dataParse' progress phase reports its
384
- * boundaries without intermediate ticks; extraction remains
385
- * cooperative. Throws when the streamed parse is anything but
386
- * COMPLETE the caller (OpenModelStreamed) falls back to the
387
- * classic path, which tolerates recoverable parses.
382
+ * The columnar build is cooperative (periodic event-loop yields, like
383
+ * the classic parseDataBlockAsync) with absolute byte-cursor progress
384
+ * ticks, and extraction is cooperative too — the streamed open keeps
385
+ * the repaint/no-stall property of OpenModelAsync (#301 §2). Throws
386
+ * when the streamed parse is anything but COMPLETE — the caller
387
+ * (OpenModelStreamed) falls back to the classic path, which tolerates
388
+ * recoverable parses.
388
389
  *
389
390
  * @param modelID The model ID being opened.
390
391
  * @param data The IFC data buffer.
@@ -409,8 +410,10 @@ export class IfcApiProxyIfc {
409
410
  Logger.info(formatModelLine(modelInfo));
410
411
  settings?.ON_MODEL_INFO?.(modelInfo);
411
412
  tracker?.beginPhase("dataParse", "bytes", data.length);
413
+ const parseTick = tracker !== void 0 ?
414
+ (cursorBytes) => tracker.update(cursorBytes) : void 0;
412
415
  const parseStartTime = Date.now();
413
- const { columns, result } = buildColumnarIndexStreaming(new BufferByteSource(data), parser, STREAMED_PARSE_POOL_BYTES);
416
+ const { columns, result } = await buildColumnarIndexStreamingAsync(new BufferByteSource(data), parser, STREAMED_PARSE_POOL_BYTES, void 0, parseTick);
414
417
  const parseEndTime = Date.now();
415
418
  tracker?.endPhase(data.length);
416
419
  if (result !== ParseResult.COMPLETE) {
@@ -0,0 +1,23 @@
1
+ /**
2
+ * `@bldrs-ai/conway/demand` — demand-driven geometry residency (epic #390;
3
+ * design/new/streaming-federated-loader.md, "two regimes").
4
+ *
5
+ * The synchronous half: a priority {@link DemandGeometryQueue} admits
6
+ * instances under a byte budget against {@link GeometryTiles} — in
7
+ * production the wasm-backed {@link GeometryTilePool} composition created
8
+ * by {@link createWasmTileBackend}, extracting through
9
+ * {@link IfcTileAssetExtractor} into the conway-geom TilePool. The
10
+ * asynchronous half: {@link DemandResidencyPump} pages source-byte ranges
11
+ * in (via the stream plane's windowed provider) before forwarding demand,
12
+ * so a pump cycle never hits a non-resident range mid-extract.
13
+ *
14
+ * Conway-native namespace; see `@bldrs-ai/conway/stream` for the parse
15
+ * plane and `@bldrs-ai/conway/mem` for the general pool primitives this
16
+ * builds on.
17
+ */
18
+ export { DemandGeometryQueue, GeometryTiles, DemandQueueStats, } from "../core/demand_geometry_queue.js";
19
+ export { DemandResidencyPump, ResidencyPrefetcher, PumpResult, } from "../core/demand_residency_pump.js";
20
+ export { GeometryTilePool, InstanceAssetSource, GeometryAsset, } from "../core/geometry_tile_pool.js";
21
+ export { GeometryTilePoolBindings, TileAssetExtractor, WasmTileBackend, createWasmTileBackend, readGeometryTilePayload, GeometryTilePayload, } from "../core/geometry_tile_bindings.js";
22
+ export { IfcTileAssetExtractor, TileCommitBindings } from "../ifc/ifc_tile_extractor.js";
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/demand/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,gBAAgB,GACjB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,GACX,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,GACd,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * `@bldrs-ai/conway/demand` — demand-driven geometry residency (epic #390;
3
+ * design/new/streaming-federated-loader.md, "two regimes").
4
+ *
5
+ * The synchronous half: a priority {@link DemandGeometryQueue} admits
6
+ * instances under a byte budget against {@link GeometryTiles} — in
7
+ * production the wasm-backed {@link GeometryTilePool} composition created
8
+ * by {@link createWasmTileBackend}, extracting through
9
+ * {@link IfcTileAssetExtractor} into the conway-geom TilePool. The
10
+ * asynchronous half: {@link DemandResidencyPump} pages source-byte ranges
11
+ * in (via the stream plane's windowed provider) before forwarding demand,
12
+ * so a pump cycle never hits a non-resident range mid-extract.
13
+ *
14
+ * Conway-native namespace; see `@bldrs-ai/conway/stream` for the parse
15
+ * plane and `@bldrs-ai/conway/mem` for the general pool primitives this
16
+ * builds on.
17
+ */
18
+ export { DemandGeometryQueue, } from "../core/demand_geometry_queue.js";
19
+ export { DemandResidencyPump, } from "../core/demand_residency_pump.js";
20
+ export { GeometryTilePool, } from "../core/geometry_tile_pool.js";
21
+ export { createWasmTileBackend, readGeometryTilePayload, } from "../core/geometry_tile_bindings.js";
22
+ export { IfcTileAssetExtractor } from "../ifc/ifc_tile_extractor.js";
@@ -12,6 +12,7 @@ export { ProgressEvent, ProgressCallback, ProgressPhase, ProgressUnit, ProgressT
12
12
  export { ModelLoadOptions } from "./loaders/conway_model_loader.js";
13
13
  export { LoadLogAccumulator, ModelInfo, ProgressEventLike, formatBar, formatMb, formatModelLine, formatSeconds, stageLabel, } from "./core/progress_log.js";
14
14
  export { openStreamedIfcModel, StreamedIfcOpen, StreamedIfcOpenOptions } from "./ifc/ifc_stream_open.js";
15
+ export { buildColumnarIndexStreaming, buildColumnarIndexStreamingAsync, } from "./step/parsing/streaming_index_builder.js";
15
16
  export { ByteSource, BufferByteSource } from "./step/parsing/byte_source.js";
16
17
  export { StepExternalByteStore, InMemoryStepByteStore, StepBufferProvider, WindowedStepBufferProvider, } from "./step/step_buffer_provider.js";
17
18
  export { StepIndexColumns } from "./step/parsing/columnar_index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACr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AmB,GACpB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACpF,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA"}
@@ -13,7 +13,13 @@ export { LoadLogAccumulator, formatBar, formatMb, formatModelLine, formatSeconds
13
13
  // --- Streaming / demand-geometry surface (epic #390; design doc
14
14
  // design/new/streaming-federated-loader.md). The release-facing API for
15
15
  // fixed-memory opens and demand-driven residency.
16
+ //
17
+ // Canonical homes are the plane subpath modules — `@bldrs-ai/conway/stream`,
18
+ // `/demand`, and `/mem` — which is where new conway-native APIs land (the
19
+ // web-ifc compat shim stays an adapter and is headed for retirement). The
20
+ // flat re-exports below are kept for root-import compatibility.
16
21
  export { openStreamedIfcModel } from "./ifc/ifc_stream_open.js";
22
+ export { buildColumnarIndexStreaming, buildColumnarIndexStreamingAsync, } from "./step/parsing/streaming_index_builder.js";
17
23
  export { BufferByteSource } from "./step/parsing/byte_source.js";
18
24
  export { InMemoryStepByteStore, WindowedStepBufferProvider, } from "./step/step_buffer_provider.js";
19
25
  export { serializeIndexSidecarFromColumns, deserializeIndexSidecarToColumns, sidecarMatchesSource, hashSource, } from "./step/parsing/index_sidecar.js";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * `@bldrs-ai/conway/mem` — the general memory system (src/core/mem;
3
+ * design/new/streaming-federated-loader.md, resident-memory design).
4
+ *
5
+ * Domain-neutral primitives for explicitly budgeted residency:
6
+ * {@link ChunkedPool} (accounting-only fixed-chunk freelist),
7
+ * {@link SharedAssetPool} (refcounted instance⇄asset sharing), and
8
+ * {@link SharedByteBudget} (a byte budget shareable across consumers).
9
+ * The geometry narrowing over these lives in `@bldrs-ai/conway/demand`
10
+ * ({@link import('../core/geometry_tile_pool').GeometryTilePool}); other
11
+ * asset domains (textures, property blocks) are expected to narrow the
12
+ * same way.
13
+ */
14
+ export { ChunkedPool, ChunkSpan } from "../core/mem/chunked_pool.js";
15
+ export { SharedAssetPool } from "../core/mem/shared_asset_pool.js";
16
+ export { SharedByteBudget } from "../core/shared_byte_budget.js";
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mem/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * `@bldrs-ai/conway/mem` — the general memory system (src/core/mem;
3
+ * design/new/streaming-federated-loader.md, resident-memory design).
4
+ *
5
+ * Domain-neutral primitives for explicitly budgeted residency:
6
+ * {@link ChunkedPool} (accounting-only fixed-chunk freelist),
7
+ * {@link SharedAssetPool} (refcounted instance⇄asset sharing), and
8
+ * {@link SharedByteBudget} (a byte budget shareable across consumers).
9
+ * The geometry narrowing over these lives in `@bldrs-ai/conway/demand`
10
+ * ({@link import('../core/geometry_tile_pool').GeometryTilePool}); other
11
+ * asset domains (textures, property blocks) are expected to narrow the
12
+ * same way.
13
+ */
14
+ export { ChunkedPool } from "../core/mem/chunked_pool.js";
15
+ export { SharedAssetPool } from "../core/mem/shared_asset_pool.js";
16
+ export { SharedByteBudget } from "../core/shared_byte_budget.js";
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=namespace_surface.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"namespace_surface.test.d.ts","sourceRoot":"","sources":["../../src/namespace_surface.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
1
+ // Pins the conway-native plane namespaces (`@bldrs-ai/conway/stream`,
2
+ // `/demand`, `/mem`): each module must expose its plane's key runtime
3
+ // symbols. Guards the packaging contract — a refactor that moves or
4
+ // renames an export breaks embedders through these subpaths first.
5
+ import { describe, expect, test } from "@jest/globals";
6
+ import * as demand from "./demand/index.js";
7
+ import * as mem from "./mem/index.js";
8
+ import * as stream from "./stream/index.js";
9
+ describe("plane namespace surface", () => {
10
+ test("stream exposes the fixed-memory open plane", () => {
11
+ expect(typeof stream.openStreamedIfcModel).toBe("function");
12
+ expect(typeof stream.BufferByteSource).toBe("function");
13
+ expect(typeof stream.InMemoryStepByteStore).toBe("function");
14
+ expect(typeof stream.WindowedStepBufferProvider).toBe("function");
15
+ expect(typeof stream.serializeIndexSidecarFromColumns).toBe("function");
16
+ expect(typeof stream.deserializeIndexSidecarToColumns).toBe("function");
17
+ expect(typeof stream.sidecarMatchesSource).toBe("function");
18
+ expect(typeof stream.hashSource).toBe("function");
19
+ expect(typeof stream.StreamingRecordDispatcher).toBe("function");
20
+ expect(typeof stream.IncrementalTypeIndex).toBe("function");
21
+ });
22
+ test("demand exposes the residency/extraction plane", () => {
23
+ expect(typeof demand.DemandGeometryQueue).toBe("function");
24
+ expect(typeof demand.DemandResidencyPump).toBe("function");
25
+ expect(typeof demand.GeometryTilePool).toBe("function");
26
+ expect(typeof demand.createWasmTileBackend).toBe("function");
27
+ expect(typeof demand.readGeometryTilePayload).toBe("function");
28
+ expect(typeof demand.IfcTileAssetExtractor).toBe("function");
29
+ });
30
+ test("mem exposes the general pool primitives", () => {
31
+ expect(typeof mem.ChunkedPool).toBe("function");
32
+ expect(typeof mem.SharedAssetPool).toBe("function");
33
+ expect(typeof mem.SharedByteBudget).toBe("function");
34
+ });
35
+ });
@@ -156,6 +156,25 @@ export default class StepParser<TypeIDType> extends StepHeaderParser {
156
156
  * @return {BlockParseResult} The parsing result, including the index and result enum.
157
157
  */
158
158
  parseDataBlockStreamed(input: ParsingBuffer, onRecordBoundary: (input: ParsingBuffer) => void, onRecordIndexed?: (localID: number, expressID: number, typeID: TypeIDType | undefined) => void, onProgress?: ParseProgressCallback, sink?: StepIndexSink<TypeIDType>): BlockParseResult<TypeIDType>;
159
+ /**
160
+ * Cooperative variant of parseDataBlockStreamed: identical parse and
161
+ * window-slide behaviour (same generator body, same boundary callback),
162
+ * but periodically awaits a macrotask so the event loop can run —
163
+ * browsers repaint progress UI during a large streamed parse instead of
164
+ * flagging the tab as stalled. Issue #301 §2 for the streamed path.
165
+ *
166
+ * @param input The input parsing buffer, positioned at the data section.
167
+ * @param onRecordBoundary Called at each top-level record boundary with the
168
+ * buffer; the callback may rebase the buffer's window in place.
169
+ * @param onRecordIndexed Called as each top-level record is indexed — see
170
+ * parseDataBlockStreamed.
171
+ * @param onProgress Optional byte-cursor progress callback.
172
+ * @param sink Optional index sink (columnar builds).
173
+ * @param yieldIntervalMs Minimum ms between event-loop yields.
174
+ * @return {Promise<BlockParseResult>} The parsing result, including the
175
+ * index and result enum.
176
+ */
177
+ parseDataBlockStreamedAsync(input: ParsingBuffer, onRecordBoundary: (input: ParsingBuffer) => void, onRecordIndexed?: (localID: number, expressID: number, typeID: TypeIDType | undefined) => void, onProgress?: ParseProgressCallback, sink?: StepIndexSink<TypeIDType>, yieldIntervalMs?: number): Promise<BlockParseResult<TypeIDType>>;
159
178
  /**
160
179
  * Cooperative variant of parseDataBlock: identical parse (same generator
161
180
  * body), but periodically awaits a macrotask so the event loop can run —
@@ -1 +1 @@
1
- {"version":3,"file":"step_parser.d.ts","sourceRoot":"","sources":["../../../../src/step/parsing/step_parser.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,2BAA2B,CAAA;AAEjD,OAAO,aAAa,MAAM,8BAA8B,CAAA;AAcxD,OAAO,iBAAiB,EAAE,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEpE,MAAM,WAAW,kBAAkB,CAAC,UAAU;IAE5C,OAAO,EAAE,MAA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,EAAE,aAAa,EACpB,UAAU,CAAC,EAAE,qBAAqB,EAClC,eAAe,GAAE,MAAwC,GACzD,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAuBzC;;;;;;;;;OASG;IACH,OAAO,CAAE,yBAAyB;IA8blC;;;;;;;OAOG;IACI,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC;CAiarF"}
@@ -338,6 +338,39 @@ export default class StepParser extends StepHeaderParser {
338
338
  onProgress?.(next.value);
339
339
  }
340
340
  }
341
+ /**
342
+ * Cooperative variant of parseDataBlockStreamed: identical parse and
343
+ * window-slide behaviour (same generator body, same boundary callback),
344
+ * but periodically awaits a macrotask so the event loop can run —
345
+ * browsers repaint progress UI during a large streamed parse instead of
346
+ * flagging the tab as stalled. Issue #301 §2 for the streamed path.
347
+ *
348
+ * @param input The input parsing buffer, positioned at the data section.
349
+ * @param onRecordBoundary Called at each top-level record boundary with the
350
+ * buffer; the callback may rebase the buffer's window in place.
351
+ * @param onRecordIndexed Called as each top-level record is indexed — see
352
+ * parseDataBlockStreamed.
353
+ * @param onProgress Optional byte-cursor progress callback.
354
+ * @param sink Optional index sink (columnar builds).
355
+ * @param yieldIntervalMs Minimum ms between event-loop yields.
356
+ * @return {Promise<BlockParseResult>} The parsing result, including the
357
+ * index and result enum.
358
+ */
359
+ async parseDataBlockStreamedAsync(input, onRecordBoundary, onRecordIndexed, onProgress, sink, yieldIntervalMs = DEFAULT_PARSE_YIELD_INTERVAL_MS) {
360
+ const parser = this.parseDataBlockIncremental(input, onRecordBoundary, onRecordIndexed, sink);
361
+ let lastYield = Date.now();
362
+ while (true) {
363
+ const next = parser.next();
364
+ if (next.done === true) {
365
+ return next.value;
366
+ }
367
+ onProgress?.(next.value);
368
+ if (Date.now() - lastYield >= yieldIntervalMs) {
369
+ await yieldToEventLoop();
370
+ lastYield = Date.now();
371
+ }
372
+ }
373
+ }
341
374
  /**
342
375
  * Cooperative variant of parseDataBlock: identical parse (same generator
343
376
  * body), but periodically awaits a macrotask so the event loop can run —
@@ -68,6 +68,26 @@ export interface StreamingIndexResult<TypeIDType> {
68
68
  * @return {StreamingIndexResult} The index, header, result and diagnostics.
69
69
  */
70
70
  export declare function buildIndexStreaming<TypeIDType>(source: ByteSource, parser: StepParser<TypeIDType>, pool: number, onRecordIndexed?: (localID: number, expressID: number, typeID: TypeIDType | undefined) => void, sink?: StepIndexSink<TypeIDType>): StreamingIndexResult<TypeIDType>;
71
+ /**
72
+ * Cooperative twin of {@link buildIndexStreaming}: identical parse, window
73
+ * and grow-and-restart behaviour (mirrored the same way the parser mirrors
74
+ * parseDataBlock/parseDataBlockAsync), but the parse periodically yields to
75
+ * the event loop so browsers repaint progress UI mid-parse instead of
76
+ * flagging the tab as stalled (issue #301 §2 for the streamed path).
77
+ *
78
+ * @param source The byte source.
79
+ * @param parser The STEP parser (typed to the schema).
80
+ * @param pool Target window size in bytes.
81
+ * @param onRecordIndexed Optional per-record event (see buildIndexStreaming).
82
+ * @param sink Optional index sink (columnar builds).
83
+ * @param onProgress Optional progress callback with the ABSOLUTE source byte
84
+ * cursor (unlike the parser's window-relative cursor), so callers can report
85
+ * `cursor / source.byteLength` directly.
86
+ * @param yieldIntervalMs Minimum ms between event-loop yields.
87
+ * @return {Promise<StreamingIndexResult>} The index, header, result and
88
+ * diagnostics.
89
+ */
90
+ export declare function buildIndexStreamingAsync<TypeIDType>(source: ByteSource, parser: StepParser<TypeIDType>, pool: number, onRecordIndexed?: (localID: number, expressID: number, typeID: TypeIDType | undefined) => void, sink?: StepIndexSink<TypeIDType>, onProgress?: (absoluteByteCursor: number) => void, yieldIntervalMs?: number): Promise<StreamingIndexResult<TypeIDType>>;
71
91
  /**
72
92
  * The output of a columnar streaming index build: the index in its SoA
73
93
  * column form (no object phase — see columnar_index.ts), plus the header and
@@ -94,4 +114,20 @@ export interface StreamingColumnarIndexResult<TypeIDType> {
94
114
  * @return {StreamingColumnarIndexResult} Columns, header, result, stats.
95
115
  */
96
116
  export declare function buildColumnarIndexStreaming<TypeIDType extends number>(source: ByteSource, parser: StepParser<TypeIDType>, pool: number, onRecordIndexed?: (localID: number, expressID: number, typeID: TypeIDType | undefined) => void): StreamingColumnarIndexResult<TypeIDType>;
117
+ /**
118
+ * Cooperative twin of {@link buildColumnarIndexStreaming}: identical
119
+ * columnar build, but the parse periodically yields to the event loop (see
120
+ * {@link buildIndexStreamingAsync}) and reports absolute byte-cursor
121
+ * progress — the browser-facing variant for large models.
122
+ *
123
+ * @param source The byte source.
124
+ * @param parser The STEP parser (typed to the schema).
125
+ * @param pool Target window size in bytes.
126
+ * @param onRecordIndexed Optional per-record event (see buildIndexStreaming).
127
+ * @param onProgress Optional absolute byte-cursor progress callback.
128
+ * @param yieldIntervalMs Minimum ms between event-loop yields.
129
+ * @return {Promise<StreamingColumnarIndexResult>} Columns, header, result,
130
+ * stats.
131
+ */
132
+ export declare function buildColumnarIndexStreamingAsync<TypeIDType extends number>(source: ByteSource, parser: StepParser<TypeIDType>, pool: number, onRecordIndexed?: (localID: number, expressID: number, typeID: TypeIDType | undefined) => void, onProgress?: (absoluteByteCursor: number) => void, yieldIntervalMs?: number): Promise<StreamingColumnarIndexResult<TypeIDType>>;
97
133
  //# sourceMappingURL=streaming_index_builder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"streaming_index_builder.d.ts","sourceRoot":"","sources":["../../../../src/step/parsing/streaming_index_builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAqB,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACtE,OAAO,UAAU,EAAE,EACjB,WAAW,EACX,UAAU,EACV,cAAc,EACd,aAAa,EACd,MAAM,eAAe,CAAA;AAGtB;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAElC,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAA;IAEZ;0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AAE,UAAU,GAAG,SAAS,KAAM,IAAI,GAChF,4BAA4B,CAAC,UAAU,CAAC,CAQ3C"}
1
+ {"version":3,"file":"streaming_index_builder.d.ts","sourceRoot":"","sources":["../../../../src/step/parsing/streaming_index_builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAqB,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACtE,OAAO,UAAU,EAAE,EACjB,WAAW,EACX,UAAU,EACV,cAAc,EACd,aAAa,EACd,MAAM,eAAe,CAAA;AAGtB;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAElC,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAA;IAEZ;0CACsC;IACtC,WAAW,EAAE,MAAM,CAAA;IAEnB,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAA;IAEd,0DAA0D;IAC1D,YAAY,EAAE,MAAM,CAAA;IAEpB,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAA;CAClB;AAGD;;;GAGG;AACH,MAAM,WAAW,oBAAoB,CAAC,UAAU;IAC9C,MAAM,EAAE,UAAU,CAAA;IAClB,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,EAAE,CAAA;IACtC,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,mBAAmB,CAAA;CAC3B;AAGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAC1C,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC,EAC9B,IAAI,EAAE,MAAM,EACZ,eAAe,CAAC,EACd,CAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,SAAS,KAAM,IAAI,EAChF,IAAI,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,GAChC,oBAAoB,CAAC,UAAU,CAAC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