@githolon/dsl 0.107.0 → 0.107.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dart/pubspec.yaml CHANGED
@@ -7,7 +7,7 @@ repository: https://github.com/Captain-App/nomos2
7
7
  description: >-
8
8
  Nomos 2 Dart client — generated domain values, intent payloads and application
9
9
  lifecycle types over the typed Nomos kernel protocol and USDA custody model.
10
- version: 0.64.40
10
+ version: 0.64.46
11
11
 
12
12
  environment:
13
13
  sdk: ^3.5.0
@@ -331,6 +331,24 @@ class FakeRunner implements BridgeTransport {
331
331
  /// Simulate one background-sync event from the runner.
332
332
  void pushSync(Map<String, Object?> event) =>
333
333
  _incoming.add({'v': kWebviewBridgeVersion, 'event': 'sync', ...event});
334
+
335
+ void pushKernelProgress({required int completed, required int total}) =>
336
+ _incoming.add({
337
+ 'v': kWebviewBridgeVersion,
338
+ 'event': 'kernelProgress',
339
+ 'schemaVersion': 1,
340
+ 'sequence': completed,
341
+ 'operation': 'restoreMain',
342
+ 'phase': 'verifyIntents',
343
+ 'completed': completed,
344
+ 'total': total,
345
+ 'unit': 'intent',
346
+ 'terminal': completed == total,
347
+ 'kernelAllocatorLiveBytes': 384 * 1024 * 1024,
348
+ 'kernelAllocatorPeakBytes': 512 * 1024 * 1024,
349
+ 'processResidentBytes': 3 * 1024 * 1024 * 1024,
350
+ 'processPeakResidentBytes': 4 * 1024 * 1024 * 1024,
351
+ });
334
352
  }
335
353
 
336
354
  class ErrorRunner implements BridgeTransport {
@@ -775,8 +793,7 @@ void main() {
775
793
  await bridge.lawStatus('abc'), {'installed': true, 'drifted': false});
776
794
  });
777
795
 
778
- test(
779
- 'version status returns the required sum type without resolving history',
796
+ test('version status returns the required sum type without resolving history',
780
797
  () async {
781
798
  await bridge.ready;
782
799
  final reference = NmsInternalVersionedNomosRefs.create<Object, Object>(
@@ -1463,4 +1480,24 @@ void main() {
1463
1480
  expect(e.info.operation, 'sync');
1464
1481
  expect(e.info.trace.traceId, isNotEmpty);
1465
1482
  });
1483
+
1484
+ test('typed kernel progress preserves the measured verification fraction',
1485
+ () async {
1486
+ await bridge.ready;
1487
+ final next = bridge.kernelProgress.first;
1488
+ runner.pushKernelProgress(completed: 2081, total: 4162);
1489
+ final progress = await next;
1490
+ expect(progress.operation, KernelProgressOperation.restoreMain);
1491
+ expect(progress.phase, KernelProgressPhase.verifyIntents);
1492
+ expect(progress.unit, KernelProgressUnit.intent);
1493
+ expect(progress.completed, 2081);
1494
+ expect(progress.total, 4162);
1495
+ expect(progress.fraction, 0.5);
1496
+ expect(progress.terminal, isFalse);
1497
+ expect(progress.kernelAllocatorLiveBytes, 384 * 1024 * 1024);
1498
+ expect(progress.kernelAllocatorPeakBytes, 512 * 1024 * 1024);
1499
+ expect(progress.processResidentBytes, 3 * 1024 * 1024 * 1024);
1500
+ expect(progress.processPeakResidentBytes, 4 * 1024 * 1024 * 1024);
1501
+ expect(progress.unaccountedResidentBytes, (3 * 1024 - 384) * 1024 * 1024);
1502
+ });
1466
1503
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@githolon/dsl",
3
- "version": "0.107.0",
3
+ "version": "0.107.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "Nomos 2 domain-authoring DSL: aggregates + directives in TS, executed and encoded to the Rust kernel's wire shapes.",