@githolon/dsl 0.102.4 → 0.103.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 (131) hide show
  1. package/compile_package.mjs +43 -2
  2. package/compile_proof.d.mts +47 -0
  3. package/compile_proof.mjs +343 -0
  4. package/dart/CHANGELOG.md +7 -0
  5. package/dart/lib/src/dev_cloud.dart +8 -8
  6. package/dart/lib/src/nms_generated_runtime.dart +2 -0
  7. package/dart/lib/src/runner/node-entry.mjs +5504 -1236
  8. package/dart/lib/src/runner/offline-install.mjs +4578 -528
  9. package/dart/lib/src/test_harness.dart +206 -152
  10. package/dart/lib/src/webview_bridge.dart +196 -89
  11. package/dart/pubspec.lock +1 -1
  12. package/dart/pubspec.yaml +2 -2
  13. package/dart/test/acquire_session_credentials_test.dart +4 -3
  14. package/dart/test/adv_realm_interference_test.dart +7 -6
  15. package/dart/test/cloud_bound_topology_test.dart +3 -3
  16. package/dart/test/cluster_births_test.dart +4 -3
  17. package/dart/test/cluster_device_keyed_acceptance_test.dart +10 -16
  18. package/dart/test/cluster_local_autosync_test.dart +3 -2
  19. package/dart/test/cluster_scale_test.dart +3 -2
  20. package/dart/test/dlq_session_surface_test.dart +7 -6
  21. package/dart/test/first_app_gauntlet_test.dart +14 -21
  22. package/dart/test/fixtures/wedge/fake-install.mjs +1 -1
  23. package/dart/test/four_layer_nested_topology_test.dart +4 -4
  24. package/dart/test/harness_phase_timeout_test.dart +2 -2
  25. package/dart/test/local_sync_inert_test.dart +1 -1
  26. package/dart/test/parent_signer_recovery_test.dart +2 -2
  27. package/dart/test/sealing_client_test.dart +4 -3
  28. package/dart/test/session_bound_test.dart +8 -7
  29. package/dart/test/test_harness_test.dart +13 -12
  30. package/dart/test/vo_read_typing_test.dart +4 -3
  31. package/dart/test/watch_after_offer_stall_test.dart +4 -3
  32. package/dart/test/webview_bridge_test.dart +102 -5
  33. package/dart_types/CHANGELOG.md +5 -0
  34. package/dart_types/lib/nomos_types.dart +9 -0
  35. package/dart_types/lib/src/nomos_ref.dart +20 -0
  36. package/dart_types/lib/src/optional_ref.dart +85 -0
  37. package/dart_types/lib/src/sha256_digest.dart +41 -0
  38. package/dart_types/lib/src/versioned_nomos_ref.dart +81 -0
  39. package/dart_types/pubspec.yaml +1 -1
  40. package/dart_types/test/optional_ref_test.dart +44 -0
  41. package/dart_types/test/sha256_digest_test.dart +18 -0
  42. package/package.json +9 -5
  43. package/runtime/generated-application-host.js +5365 -1105
  44. package/src/aggregate.ts +18 -0
  45. package/src/application_composition.ts +6 -32
  46. package/src/attested_core.ts +6 -3
  47. package/src/birth_meter.ts +1 -0
  48. package/src/birth_meter_ensure.ts +28 -2
  49. package/src/births.ts +1 -1
  50. package/src/build_package.ts +162 -538
  51. package/src/business_birth.ts +19 -3
  52. package/src/canonical_json.ts +21 -0
  53. package/src/check_package_main.ts +76 -35
  54. package/src/clear_directive.ts +19 -8
  55. package/src/codegen_dart.ts +305 -22
  56. package/src/codegen_dart_application.ts +844 -292
  57. package/src/codegen_dart_client.ts +1084 -407
  58. package/src/codegen_dart_scenario.ts +12 -12
  59. package/src/codegen_proof.ts +169 -39
  60. package/src/codegen_provider_dart.ts +17 -1
  61. package/src/codegen_ts.ts +298 -106
  62. package/src/compat_manifest.ts +2 -2
  63. package/src/compat_package_main.ts +8 -12
  64. package/src/compile_package_main.ts +1866 -597
  65. package/src/compose.ts +1 -1
  66. package/src/directive.ts +208 -15
  67. package/src/engine_entry.ts +165 -111
  68. package/src/evolve_preview.ts +43 -81
  69. package/src/extremum.ts +1 -1
  70. package/src/fields.ts +183 -4
  71. package/src/flow_gate.ts +75 -2
  72. package/src/framework/application_home.ts +2 -0
  73. package/src/framework/auth_provider_law.ts +2 -2
  74. package/src/framework/birth_meter.ts +7 -19
  75. package/src/framework/bootstrap.ts +0 -2
  76. package/src/framework/business_corrections.ts +9 -5
  77. package/src/framework/domain_lifecycle.ts +15 -29
  78. package/src/framework/encryption_scope.ts +2 -1
  79. package/src/framework/framework_aggregates.ts +2 -0
  80. package/src/framework/genesis.ts +16 -14
  81. package/src/framework/home.ts +20 -14
  82. package/src/framework/owned_custody.ts +9 -3
  83. package/src/framework/platform_admin.ts +3 -3
  84. package/src/framework/relations.ts +21 -13
  85. package/src/framework/signing_identity.ts +45 -40
  86. package/src/framework/workspace_invariant.ts +245 -0
  87. package/src/framework/workspaces.ts +23 -29
  88. package/src/index.ts +36 -16
  89. package/src/intent.ts +178 -6
  90. package/src/law_check.ts +32 -11
  91. package/src/law_graph.ts +2902 -0
  92. package/src/law_graph_usda.ts +1799 -0
  93. package/src/law_identity.ts +435 -0
  94. package/src/law_value_type.ts +230 -0
  95. package/src/lsp_server.ts +61 -31
  96. package/src/ops.ts +7 -0
  97. package/src/package_config.ts +141 -0
  98. package/src/package_dependencies.ts +108 -0
  99. package/src/package_dependency_usage.ts +150 -0
  100. package/src/package_source_imports.ts +71 -0
  101. package/src/plan_source_slice.ts +335 -0
  102. package/src/point_guard.ts +192 -0
  103. package/src/precondition.ts +44 -9
  104. package/src/read_projection_namespace.ts +1 -1
  105. package/src/runtime_zod.ts +44 -0
  106. package/src/secondary_ensure.ts +67 -14
  107. package/src/shape_compat.ts +1 -1
  108. package/src/stable_id_identity_bridge.ts +149 -0
  109. package/src/stable_id_lockfile.ts +278 -0
  110. package/src/stable_ids.ts +7 -2
  111. package/src/stable_ids_for_module.ts +348 -0
  112. package/src/stable_ids_types.ts +1 -1
  113. package/src/sum.ts +1 -1
  114. package/src/usd_state.ts +1 -1
  115. package/src/usda_relationship_integrity.ts +66 -0
  116. package/src/usda_text.ts +18 -0
  117. package/src/usdz.ts +78 -0
  118. package/src/value_object.ts +95 -0
  119. package/src/wire.ts +19 -0
  120. package/src/wire_encode.ts +22 -0
  121. package/src/workspace_sharding.ts +52 -36
  122. package/src/workspace_sharing.ts +28 -4
  123. package/src/zod_introspection.ts +1 -1
  124. package/dart/test/cluster_attested_test.dart +0 -201
  125. package/src/compile_engine.ts +0 -595
  126. package/src/manifest.ts +0 -1476
  127. package/src/read_projection_composition.ts +0 -117
  128. package/src/read_projection_manifest.ts +0 -115
  129. package/src/relation_composition.ts +0 -286
  130. package/src/usd.ts +0 -1967
  131. package/src/usd_layers.ts +0 -1776
@@ -4,7 +4,7 @@
4
4
  // 1. cluster(..., deviceKeyed: {workspace}) completes (co2's exact shape: 4 sessions, one
5
5
  // deviceKeyed, colon-namespaced workspace names)
6
6
  // 2. devicePublicKey(workspace) is populated
7
- // 3. a colocated attested read succeeds (served + SIGNED with the device key the re-open installed)
7
+ // 3. the keyed workspace remains readable and writable after the re-open
8
8
  // 4. harness disposal completes without being killed
9
9
  // Phase diagnostics (their ask 5) are asserted too: 3b logs enter/exit for keygen + keyed reconnect.
10
10
  @TestOn('vm')
@@ -18,8 +18,8 @@ import 'package:test/test.dart';
18
18
 
19
19
  String get _root => '${Directory.current.path}/../..';
20
20
  String get _repoEntry => '$_root/cloud/web-client/runner/node-entry.ts';
21
- String get _catDeploy => '$_root/bench/scale/fixtures/catalogue-src/build/cat.deploy.json';
22
- String get _estateDeploy => '$_root/bench/scale/fixtures/catalogue-reader/build/estate.deploy.json';
21
+ String get _catDeploy => '$_root/bench/scale/fixtures/catalogue-src/build/cat.law.usdz';
22
+ String get _estateDeploy => '$_root/bench/scale/fixtures/catalogue-reader/build/estate.law.usdz';
23
23
  String get _runtimeDir =>
24
24
  Platform.environment['NOMOS_DART_RUNTIME'] ??
25
25
  Platform.environment['NOMOS_OFFLINE_RUNTIME'] ??
@@ -31,14 +31,15 @@ String? _missingPrereq() {
31
31
  if (!File(p).existsSync()) return 'missing fixture $p (compile bench/scale/fixtures first)';
32
32
  }
33
33
  if (!File('$_runtimeDir/holon-testmint.wasm').existsSync() ||
34
- !File('$_runtimeDir/packages.json').existsSync()) {
34
+ !File('$_runtimeDir/bootstrap.law.usdz').existsSync() ||
35
+ !File('$_runtimeDir/nomos.law.usdz').existsSync()) {
35
36
  return 'warm ~/.holon/runtime first (run any `githolon` command once)';
36
37
  }
37
38
  return null;
38
39
  }
39
40
 
40
41
  void main() {
41
- test('cluster(deviceKeyed) completes: keyed re-open, device key populated, colocated attested read, disposal',
42
+ test('cluster(deviceKeyed) completes: keyed re-open, device key populated, ordinary read/write, disposal',
42
43
  () async {
43
44
  final skip = _missingPrereq();
44
45
  if (skip != null) {
@@ -79,8 +80,7 @@ void main() {
79
80
  expect(log.any((l) => l.contains("3b: keyed reconnect of '$keyed'") && l.contains('done')),
80
81
  isTrue, reason: 'phase 3b reconnect must log its exit line');
81
82
 
82
- // 3. a COLOCATED ATTESTED READ succeeds, signed with the device key the re-open installed
83
- // (no attestorSecret injected — the source session signs with its connect authorSecret).
83
+ // 3. The keyed re-open did not strand the session: its ordinary offer and read both work.
84
84
  final cat = harness.session(keyed);
85
85
  final seeded = await cat.offerCreates(
86
86
  domain: 'cat',
@@ -94,15 +94,9 @@ void main() {
94
94
  actor: 'user:seller',
95
95
  );
96
96
  expect(seeded.head, isNotEmpty);
97
- final served = await harness.session('estate:a').attestedRead(
98
- from: keyed,
99
- queryId: 'listingById',
100
- args: {'listingId': 'L-1'},
101
- );
102
- final entry = (served['entry'] as Map).cast<String, Object?>();
103
- final attestation = (entry['attestation'] as Map).cast<String, Object?>();
104
- expect((attestation['public_key'] ?? '').toString(), public,
105
- reason: 'the colocated read is signed by the re-opened session device key');
97
+ final rows = await cat.query('listingById', {'listingId': 'L-1'});
98
+ expect(rows, hasLength(1));
99
+ expect(rows.single['id'], isNotEmpty);
106
100
  } finally {
107
101
  // 4. disposal completes (the harness deadline guarantees it can never wedge the test runner).
108
102
  await harness.dispose();
@@ -16,7 +16,7 @@ import 'package:test/test.dart';
16
16
 
17
17
  String get _root => '${Directory.current.path}/../..';
18
18
  String get _repoEntry => '$_root/cloud/web-client/runner/node-entry.ts';
19
- String get _guestbookDeploy => '$_root/examples/guestbook/build/guestbook.deploy.json';
19
+ String get _guestbookDeploy => '$_root/examples/guestbook/build/guestbook.law.usdz';
20
20
  String get _runtimeDir =>
21
21
  Platform.environment['NOMOS_DART_RUNTIME'] ??
22
22
  Platform.environment['NOMOS_OFFLINE_RUNTIME'] ??
@@ -28,7 +28,8 @@ String? _missingPrereq() {
28
28
  return 'compile the guestbook example: cd examples/guestbook && npx nomos-compile — missing $_guestbookDeploy';
29
29
  }
30
30
  if (!File('$_runtimeDir/holon-testmint.wasm').existsSync() ||
31
- !File('$_runtimeDir/packages.json').existsSync()) {
31
+ !File('$_runtimeDir/bootstrap.law.usdz').existsSync() ||
32
+ !File('$_runtimeDir/nomos.law.usdz').existsSync()) {
32
33
  return 'warm ~/.holon/runtime first (run any `githolon` command once)';
33
34
  }
34
35
  return null;
@@ -16,7 +16,7 @@ import 'package:test/test.dart';
16
16
 
17
17
  String get _root => '${Directory.current.path}/../..';
18
18
  String get _repoEntry => '$_root/cloud/web-client/runner/node-entry.ts';
19
- String get _guestbookDeploy => '$_root/examples/guestbook/build/guestbook.deploy.json';
19
+ String get _guestbookDeploy => '$_root/examples/guestbook/build/guestbook.law.usdz';
20
20
  String get _runtimeDir =>
21
21
  Platform.environment['NOMOS_DART_RUNTIME'] ??
22
22
  Platform.environment['NOMOS_OFFLINE_RUNTIME'] ??
@@ -32,7 +32,8 @@ String? _missingPrereq() {
32
32
  return 'compile the guestbook example: cd examples/guestbook && npx nomos-compile — missing $_guestbookDeploy';
33
33
  }
34
34
  if (!File('$_runtimeDir/holon-testmint.wasm').existsSync() ||
35
- !File('$_runtimeDir/packages.json').existsSync()) {
35
+ !File('$_runtimeDir/bootstrap.law.usdz').existsSync() ||
36
+ !File('$_runtimeDir/nomos.law.usdz').existsSync()) {
36
37
  return 'warm ~/.holon/runtime first (run any `githolon` command once)';
37
38
  }
38
39
  return null;
@@ -20,8 +20,8 @@ import 'package:test/test.dart';
20
20
 
21
21
  String get _root => '${Directory.current.path}/../..';
22
22
  String get _repoEntry => '$_root/cloud/web-client/runner/node-entry.ts';
23
- String get _geoDeploy => '$_root/bench/scale/fixtures/estate-geo/build/estate-geo.deploy.json';
24
- String get _docsDeploy => '$_root/bench/scale/fixtures/surfaced/build/surfaced.deploy.json';
23
+ String get _geoDeploy => '$_root/bench/scale/fixtures/estate-geo/build/estate-geo.law.usdz';
24
+ String get _docsDeploy => '$_root/bench/scale/fixtures/surfaced/build/surfaced.law.usdz';
25
25
  String get _runtimeDir =>
26
26
  Platform.environment['NOMOS_DART_RUNTIME'] ??
27
27
  Platform.environment['NOMOS_OFFLINE_RUNTIME'] ??
@@ -38,7 +38,8 @@ String? _missingPrereq() {
38
38
  }
39
39
  }
40
40
  if (!File('$_runtimeDir/holon-testmint.wasm').existsSync() ||
41
- !File('$_runtimeDir/packages.json').existsSync()) {
41
+ !File('$_runtimeDir/bootstrap.law.usdz').existsSync() ||
42
+ !File('$_runtimeDir/nomos.law.usdz').existsSync()) {
42
43
  return 'warm ~/.holon/runtime first (run any `githolon` command once)';
43
44
  }
44
45
  return null;
@@ -105,7 +106,7 @@ void main() {
105
106
  .where((w) {
106
107
  try {
107
108
  final doc =
108
- jsonDecode(utf8.decode(base64Decode(w['intentB64'].toString()))) as Map;
109
+ jsonDecode(utf8.decode(base64Decode(w['changeB64'].toString()))) as Map;
109
110
  return (doc['payload'] as Map?)?['domain'] == 'estate';
110
111
  } catch (_) {
111
112
  return false;
@@ -125,7 +126,7 @@ void main() {
125
126
  {
126
127
  'id': w['id'],
127
128
  'oid': w['id'], // provenance slot; the entry is deduped/looked up by id
128
- 'intentB64': w['intentB64'],
129
+ 'changeB64': w['changeB64'],
129
130
  'source': 'local',
130
131
  'error': "no active installed law declares domain 'estate'",
131
132
  }
@@ -138,7 +139,7 @@ void main() {
138
139
  reason: 'the DLQ decodes domain/directiveId provenance from the parked bytes');
139
140
  expect(entry['directiveId'], 'placeSite');
140
141
  expect(entry['source'], 'local');
141
- expect(entry.containsKey('intentB64'), isFalse,
142
+ expect(entry.containsKey('changeB64'), isFalse,
142
143
  reason: 'deadLetters() is metadata-only; the bytes stay in the durable queue');
143
144
  });
144
145
 
@@ -23,13 +23,13 @@ import 'package:test/test.dart';
23
23
 
24
24
  String get _root => '${Directory.current.path}/../..';
25
25
  String get _repoEntry => '$_root/cloud/web-client/runner/node-entry.ts';
26
- String get _homeDeploy => '$_root/examples/co2-birth/build/co2.deploy.json';
26
+ String get _homeDeploy => '$_root/examples/co2-birth/build/co2.law.usdz';
27
27
  String get _docsDeploy =>
28
- '$_root/bench/scale/fixtures/surfaced/build/surfaced.deploy.json';
28
+ '$_root/bench/scale/fixtures/surfaced/build/surfaced.law.usdz';
29
29
  String get _catDeploy =>
30
- '$_root/bench/scale/fixtures/catalogue-src/build/cat.deploy.json';
30
+ '$_root/bench/scale/fixtures/catalogue-src/build/cat.law.usdz';
31
31
  String get _readerDeploy =>
32
- '$_root/bench/scale/fixtures/catalogue-reader/build/estate.deploy.json';
32
+ '$_root/bench/scale/fixtures/catalogue-reader/build/estate.law.usdz';
33
33
  String get _runtimeDir =>
34
34
  Platform.environment['NOMOS_DART_RUNTIME'] ??
35
35
  Platform.environment['NOMOS_OFFLINE_RUNTIME'] ??
@@ -57,7 +57,8 @@ String? _missingPrereq() {
57
57
  }
58
58
  }
59
59
  if (!File('$_runtimeDir/holon-testmint.wasm').existsSync() ||
60
- !File('$_runtimeDir/packages.json').existsSync()) {
60
+ !File('$_runtimeDir/bootstrap.law.usdz').existsSync() ||
61
+ !File('$_runtimeDir/nomos.law.usdz').existsSync()) {
61
62
  return 'warm ~/.holon/runtime first (run any `githolon` command once, or fetch '
62
63
  '/v1/runtime/holon-testmint.wasm + /v1/runtime/packages from the cloud)';
63
64
  }
@@ -293,9 +294,9 @@ void main() {
293
294
  expect(conflicts, isEmpty);
294
295
  });
295
296
 
296
- // ── LEG 6: the keyed lane end-to-end — an attested read served + SIGNED with the device
297
- // key the 3b re-open installed. ──
298
- await _leg('leg 6: attested read from the deviceKeyed workspace',
297
+ // ── LEG 6: the keyed lane end-to-end — the re-opened workspace remains writable/readable.
298
+ // Cross-workspace premises are exercised through ordinary offers in the kernel acceptance suite.
299
+ await _leg('leg 6: ordinary read/write on the deviceKeyed workspace',
299
300
  () async {
300
301
  final public = harness.devicePublicKey(_keyed);
301
302
  expect(public, isNotNull);
@@ -314,20 +315,12 @@ void main() {
314
315
  actor: 'user:seller',
315
316
  );
316
317
  expect(seeded.head, isNotEmpty);
317
- final served = await harness.session('reader').attestedRead(
318
- from: _keyed,
319
- queryId: 'listingById',
320
- args: {'listingId': 'L-1'},
321
- );
322
- final entry = (served['entry'] as Map).cast<String, Object?>();
323
- final attestation =
324
- (entry['attestation'] as Map).cast<String, Object?>();
325
- expect((attestation['public_key'] ?? '').toString(), public,
326
- reason: 'the read is signed by the re-opened session device key');
318
+ final rows = await cat.query('listingById', {'listingId': 'L-1'});
319
+ expect(rows, hasLength(1));
327
320
  });
328
321
 
329
322
  // ── LEG 7: harness diagnostics — assertDomainInstalled, resetWorkspaceCustody, and a
330
- // mid-test seedWorkspaceFromDeployJson round-trip. ──
323
+ // mid-test seedWorkspaceFromLawUsdz round-trip. ──
331
324
  await _leg(
332
325
  'leg 7: harness diagnostics (assertDomainInstalled / reset / seed)',
333
326
  () async {
@@ -350,8 +343,8 @@ void main() {
350
343
  expect(postReset, isEmpty,
351
344
  reason: 'the reset workspace is back at its seed');
352
345
  // Seed a brand-new workspace mid-test from a deploy.json and use it immediately.
353
- final late = await harness.seedWorkspaceFromDeployJson(
354
- workspace: 'late-ws', deployJsonPaths: [_docsDeploy]);
346
+ final late = await harness.seedWorkspaceFromLawUsdz(
347
+ workspace: 'late-ws', lawUsdzPaths: [_docsDeploy]);
355
348
  expect(late.workspace, 'late-ws');
356
349
  await harness.assertDomainInstalled(
357
350
  workspace: 'late-ws', domain: 'docs');
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // A FAKE offline-install helper for the hermetic HARNESS PHASE-TIMEOUT tests: honours the real helper's
3
- // flag + one-line-JSON contract (--deploy/--workspace/--out) but installs nothing — it just writes a tiny
3
+ // flag + one-line-JSON contract (--law/--workspace/--out) but installs nothing — it just writes a tiny
4
4
  // dummy snapshot so the harness proceeds to the runner phases.
5
5
  import { writeFileSync } from "node:fs";
6
6
  const args = process.argv.slice(2);
@@ -32,7 +32,7 @@ String get _root => '${Directory.current.path}/../..';
32
32
  String get _repoEntry => '$_root/cloud/web-client/runner/node-entry.ts';
33
33
  String get _devServer => '$_root/cloud/dev-server/server.ts';
34
34
  String get _deploy =>
35
- '$_root/bench/scale/fixtures/four-layer-nested-topology/build/four-layer-nested-topology.deploy.json';
35
+ '$_root/bench/scale/fixtures/four-layer-nested-topology/build/four-layer-nested-topology.law.usdz';
36
36
  const _subject1 = 'user:four-layer-test-user1';
37
37
  const _subject2 = 'user:four-layer-test-user2';
38
38
 
@@ -56,14 +56,14 @@ void main() {
56
56
  final diag = Platform.environment['NOMOS_HARNESS_DIAG'] == '1'
57
57
  ? (String l) => stderr.writeln(l)
58
58
  : null;
59
- final cloud = await NomosTestCloud.start(serverEntry: _devServer, platform: 'four-layer-platform', deployJsonPath: _deploy, onDiagnostic: diag);
59
+ final cloud = await NomosTestCloud.start(serverEntry: _devServer, platform: 'four-layer-platform', lawUsdzPath: _deploy, onDiagnostic: diag);
60
60
  NomosTestHarness? harness1;
61
61
  NomosTestHarness? harness2;
62
62
  try {
63
63
  // LAYER 1+2: the remote ceremony + the local mount (user 1)
64
64
  harness1 = await NomosTestHarness.cloudBound(
65
65
  cloud: cloud,
66
- deployJsonPaths: [_deploy],
66
+ lawUsdzPaths: [_deploy],
67
67
  platformWorkspace: 'four-layer-platform',
68
68
  subject: _subject1,
69
69
  nodeEntry: _repoEntry,
@@ -167,7 +167,7 @@ void main() {
167
167
  // Create harness2 for user 2 (same platform, different home)
168
168
  harness2 = await NomosTestHarness.cloudBound(
169
169
  cloud: cloud,
170
- deployJsonPaths: [_deploy],
170
+ lawUsdzPaths: [_deploy],
171
171
  platformWorkspace: 'four-layer-platform',
172
172
  subject: _subject2,
173
173
  nodeEntry: _repoEntry,
@@ -23,7 +23,7 @@ void main() {
23
23
  try {
24
24
  await NomosTestHarness.cluster(
25
25
  workspaces: {
26
- 'catalogue': ['unused.deploy.json'], // the fake install helper ignores the paths
26
+ 'catalogue': ['unused.law.usdz'], // the fake install helper ignores the paths
27
27
  },
28
28
  deviceKeyed: {'catalogue'},
29
29
  nodeEntry: _wedgeEntry,
@@ -56,7 +56,7 @@ void main() {
56
56
  try {
57
57
  await NomosTestHarness.cluster(
58
58
  workspaces: {
59
- 'catalogue': ['unused.deploy.json'],
59
+ 'catalogue': ['unused.law.usdz'],
60
60
  },
61
61
  deviceKeyed: {'not-a-workspace'},
62
62
  nodeEntry: _wedgeEntry,
@@ -15,7 +15,7 @@ import '../../../bench/scale/fixtures/estate-birth/build/dart/src/generated/home
15
15
  String get _root => '${Directory.current.path}/../..';
16
16
  String get _repoEntry => '$_root/cloud/web-client/runner/node-entry.ts';
17
17
  String get _deployJson =>
18
- '$_root/bench/scale/fixtures/estate-birth/build/estate-birth.deploy.json';
18
+ '$_root/bench/scale/fixtures/estate-birth/build/estate-birth.law.usdz';
19
19
  String get _runtimeDir =>
20
20
  Platform.environment['NOMOS_DART_RUNTIME'] ??
21
21
  Platform.environment['NOMOS_OFFLINE_RUNTIME'] ??
@@ -24,7 +24,7 @@ import 'package:test/test.dart';
24
24
  String get _root => '${Directory.current.path}/../..';
25
25
  String get _repoEntry => '$_root/cloud/web-client/runner/node-entry.ts';
26
26
  String get _deploy =>
27
- '$_root/bench/scale/fixtures/estate-birth-signed/build/estate-birth-signed.deploy.json';
27
+ '$_root/bench/scale/fixtures/estate-birth-signed/build/estate-birth-signed.law.usdz';
28
28
  String get _runtimeDir =>
29
29
  Platform.environment['NOMOS_DART_RUNTIME'] ??
30
30
  Platform.environment['NOMOS_OFFLINE_RUNTIME'] ??
@@ -59,7 +59,7 @@ void main() {
59
59
  return;
60
60
  }
61
61
  final harness = await NomosTestHarness.ephemeral(
62
- deployJsonPaths: [_deploy],
62
+ lawUsdzPaths: [_deploy],
63
63
  nodeEntry: _repoEntry,
64
64
  runtimeDir: _runtimeDir,
65
65
  workspace: _ws,
@@ -18,7 +18,7 @@ import 'package:test/test.dart';
18
18
  String get _root => '${Directory.current.path}/../..';
19
19
  String get _repoEntry => '$_root/cloud/web-client/runner/node-entry.ts';
20
20
  String get _fixture => '$_root/cloud/web-client/test/fixtures/encrypted-notes';
21
- String get _deploy => '$_fixture/build/encrypted-notes.deploy.json';
21
+ String get _deploy => '$_fixture/build/encrypted-notes.law.usdz';
22
22
  String get _lockfile => '$_fixture/nomos.stable-ids.json';
23
23
  String get _runtimeDir =>
24
24
  Platform.environment['NOMOS_DART_RUNTIME'] ??
@@ -36,7 +36,8 @@ String? _missingPrereq() {
36
36
  return 'missing encrypted-notes fixture — compile it: (cd cloud/web-client/test/fixtures/encrypted-notes && node ../../../../../dsl/compile_package.mjs)';
37
37
  }
38
38
  if (!File('$_runtimeDir/holon-testmint.wasm').existsSync() ||
39
- !File('$_runtimeDir/packages.json').existsSync()) {
39
+ !File('$_runtimeDir/bootstrap.law.usdz').existsSync() ||
40
+ !File('$_runtimeDir/nomos.law.usdz').existsSync()) {
40
41
  return 'warm ~/.holon/runtime first (run any `githolon` command once)';
41
42
  }
42
43
  return null;
@@ -65,7 +66,7 @@ void main() {
65
66
  return;
66
67
  }
67
68
  final harness = await NomosTestHarness.ephemeral(
68
- deployJsonPaths: [_deploy],
69
+ lawUsdzPaths: [_deploy],
69
70
  workspace: 'sealed-notes',
70
71
  nodeEntry: _repoEntry,
71
72
  runtimeDir: _runtimeDir,
@@ -28,9 +28,9 @@ import '../../../bench/scale/fixtures/estate-birth/build/dart/src/generated/esta
28
28
  String get _root => '${Directory.current.path}/../..';
29
29
  String get _repoEntry => '$_root/cloud/web-client/runner/node-entry.ts';
30
30
  String get _deployJson =>
31
- '$_root/bench/scale/fixtures/estate-birth/build/estate-birth.deploy.json';
32
- String get _otherDeployJson =>
33
- '$_root/bench/scale/fixtures/surfaced/build/surfaced.deploy.json';
31
+ '$_root/bench/scale/fixtures/estate-birth/build/estate-birth.law.usdz';
32
+ String get _otherLawUsdz =>
33
+ '$_root/bench/scale/fixtures/surfaced/build/surfaced.law.usdz';
34
34
  String get _runtimeDir =>
35
35
  Platform.environment['NOMOS_DART_RUNTIME'] ??
36
36
  Platform.environment['NOMOS_OFFLINE_RUNTIME'] ??
@@ -42,12 +42,13 @@ const _owner = 'user:session-bound-owner';
42
42
  String? _missingPrereq() {
43
43
  if (!File(_repoEntry).existsSync())
44
44
  return 'in-repo runner not found at $_repoEntry';
45
- if (!File(_deployJson).existsSync() || !File(_otherDeployJson).existsSync()) {
45
+ if (!File(_deployJson).existsSync() || !File(_otherLawUsdz).existsSync()) {
46
46
  return 'compile the fixtures: (cd bench/scale/fixtures/estate-birth && node ../../../../dsl/compile_package.mjs); '
47
47
  '(cd bench/scale/fixtures/surfaced && node ../../../../dsl/compile_package.mjs)';
48
48
  }
49
49
  if (!File('$_runtimeDir/holon-testmint.wasm').existsSync() ||
50
- !File('$_runtimeDir/packages.json').existsSync()) {
50
+ !File('$_runtimeDir/bootstrap.law.usdz').existsSync() ||
51
+ !File('$_runtimeDir/nomos.law.usdz').existsSync()) {
51
52
  return 'warm ~/.holon/runtime first (run any `githolon` command once)';
52
53
  }
53
54
  return null;
@@ -59,7 +60,7 @@ String _ownerKeyHash(NomosTestHarness h) =>
59
60
  sha256.convert(base64Decode(h.devicePublicKey(h.workspace)!)).toString();
60
61
 
61
62
  Future<NomosTestHarness> _harness() => NomosTestHarness.ephemeral(
62
- deployJsonPaths: [_deployJson],
63
+ lawUsdzPaths: [_deployJson],
63
64
  nodeEntry: _repoEntry,
64
65
  runtimeDir: _runtimeDir,
65
66
  workspace: _workspace,
@@ -194,7 +195,7 @@ void main() {
194
195
  runtimeDir: _runtimeDir,
195
196
  workspaces: {
196
197
  _workspace: [_deployJson],
197
- 'docs-ws': [_otherDeployJson],
198
+ 'docs-ws': [_otherLawUsdz],
198
199
  },
199
200
  );
200
201
  try {
@@ -4,8 +4,8 @@
4
4
  // the app UI uses, under `dart test` / `flutter test`, with no network.
5
5
  //
6
6
  // Prerequisites (skipped-with-reason when absent, so CI stays green either way): `node` on PATH; the
7
- // in-repo runner; a warm `~/.holon/runtime` cache (holon-testmint.wasm + packages.json — one `githolon` run fills it);
8
- // and the compiled `examples/guestbook/build/guestbook.deploy.json` (`cd examples/guestbook && npx nomos-compile`).
7
+ // in-repo runner; a warm `~/.holon/runtime` cache (holon-testmint.wasm + bootstrap.law.usdz + nomos.law.usdz — one `githolon` run fills it);
8
+ // and the compiled `examples/guestbook/build/guestbook.law.usdz` (`cd examples/guestbook && npx nomos-compile`).
9
9
  @TestOn('vm')
10
10
  library;
11
11
 
@@ -16,8 +16,8 @@ import 'package:test/test.dart';
16
16
 
17
17
  String get _repoEntry =>
18
18
  '${Directory.current.path}/../../cloud/web-client/runner/node-entry.ts';
19
- String get _guestbookDeployJson =>
20
- '${Directory.current.path}/../../examples/guestbook/build/guestbook.deploy.json';
19
+ String get _guestbookLawUsdz =>
20
+ '${Directory.current.path}/../../examples/guestbook/build/guestbook.law.usdz';
21
21
  String get _runtimeDir =>
22
22
  Platform.environment['NOMOS_DART_RUNTIME'] ??
23
23
  Platform.environment['NOMOS_OFFLINE_RUNTIME'] ??
@@ -30,11 +30,12 @@ String get _cliDist => '${Directory.current.path}/../../cli/dist/cli.mjs';
30
30
  String? _missingPrereq() {
31
31
  if (!File(_repoEntry).existsSync())
32
32
  return 'in-repo runner not found at $_repoEntry';
33
- if (!File(_guestbookDeployJson).existsSync()) {
33
+ if (!File(_guestbookLawUsdz).existsSync()) {
34
34
  return 'compile the fixture first: cd examples/guestbook && npx nomos-compile';
35
35
  }
36
36
  if (!File('$_runtimeDir/holon-testmint.wasm').existsSync() ||
37
- !File('$_runtimeDir/packages.json').existsSync()) {
37
+ !File('$_runtimeDir/bootstrap.law.usdz').existsSync() ||
38
+ !File('$_runtimeDir/nomos.law.usdz').existsSync()) {
38
39
  return 'provide the coordinated candidate with NOMOS_DART_RUNTIME, or warm ~/.holon/runtime once';
39
40
  }
40
41
  return null;
@@ -78,7 +79,7 @@ void main() {
78
79
 
79
80
  test('ephemeral rejects an empty deploy list with a named remedy', () async {
80
81
  await expectLater(
81
- NomosTestHarness.ephemeral(deployJsonPaths: const []),
82
+ NomosTestHarness.ephemeral(lawUsdzPaths: const []),
82
83
  throwsA(isA<NomosTestHarnessException>()),
83
84
  );
84
85
  });
@@ -91,7 +92,7 @@ void main() {
91
92
  return;
92
93
  }
93
94
  final harness = await NomosTestHarness.ephemeral(
94
- deployJsonPaths: [_guestbookDeployJson],
95
+ lawUsdzPaths: [_guestbookLawUsdz],
95
96
  nodeEntry: _repoEntry,
96
97
  runtimeDir: _runtimeDir,
97
98
  registerTearDown:
@@ -132,7 +133,7 @@ void main() {
132
133
  return;
133
134
  }
134
135
  final harness = await NomosTestHarness.ephemeral(
135
- deployJsonPaths: [_guestbookDeployJson],
136
+ lawUsdzPaths: [_guestbookLawUsdz],
136
137
  nodeEntry: _repoEntry,
137
138
  runtimeDir: _runtimeDir,
138
139
  registerTearDown: addTearDown,
@@ -160,7 +161,7 @@ void main() {
160
161
  }
161
162
  final lines = <String>[];
162
163
  final harness = await NomosTestHarness.ephemeral(
163
- deployJsonPaths: [_guestbookDeployJson],
164
+ lawUsdzPaths: [_guestbookLawUsdz],
164
165
  nodeEntry: _repoEntry,
165
166
  runtimeDir: _runtimeDir,
166
167
  registerTearDown: addTearDown,
@@ -185,7 +186,7 @@ void main() {
185
186
  return;
186
187
  }
187
188
  final harness = await NomosTestHarness.ephemeral(
188
- deployJsonPaths: [_guestbookDeployJson],
189
+ lawUsdzPaths: [_guestbookLawUsdz],
189
190
  nodeEntry: _repoEntry,
190
191
  runtimeDir: _runtimeDir,
191
192
  autoTearDown: false, // drive dispose explicitly to assert its determinism
@@ -218,7 +219,7 @@ void main() {
218
219
  // FORCE the published subcommand lane via the installHelper seam: a githolon command line (here the
219
220
  // in-repo built bin) whose `harness-install` subcommand does the offline install a published tenant gets.
220
221
  final harness = await NomosTestHarness.ephemeral(
221
- deployJsonPaths: [_guestbookDeployJson],
222
+ lawUsdzPaths: [_guestbookLawUsdz],
222
223
  nodeEntry: _repoEntry,
223
224
  runtimeDir: _runtimeDir,
224
225
  installHelper:
@@ -21,7 +21,7 @@ import '../../../bench/scale/fixtures/vo-read-typing/build/dart/src/generated/es
21
21
  String get _root => '${Directory.current.path}/../..';
22
22
  String get _repoEntry => '$_root/cloud/web-client/runner/node-entry.ts';
23
23
  String get _deployJson =>
24
- '$_root/bench/scale/fixtures/vo-read-typing/build/vo-read-typing.deploy.json';
24
+ '$_root/bench/scale/fixtures/vo-read-typing/build/vo-read-typing.law.usdz';
25
25
  String get _runtimeDir =>
26
26
  Platform.environment['NOMOS_DART_RUNTIME'] ??
27
27
  Platform.environment['NOMOS_OFFLINE_RUNTIME'] ??
@@ -34,7 +34,8 @@ String? _missingPrereq() {
34
34
  return 'compile the fixture: cd bench/scale/fixtures/vo-read-typing && npx nomos-compile';
35
35
  }
36
36
  if (!File('$_runtimeDir/holon-testmint.wasm').existsSync() ||
37
- !File('$_runtimeDir/packages.json').existsSync()) {
37
+ !File('$_runtimeDir/bootstrap.law.usdz').existsSync() ||
38
+ !File('$_runtimeDir/nomos.law.usdz').existsSync()) {
38
39
  return 'warm ~/.holon/runtime first (run any `githolon` command once)';
39
40
  }
40
41
  return null;
@@ -50,7 +51,7 @@ void main() {
50
51
  return;
51
52
  }
52
53
  final harness = await NomosTestHarness.ephemeral(
53
- deployJsonPaths: [_deployJson],
54
+ lawUsdzPaths: [_deployJson],
54
55
  nodeEntry: _repoEntry,
55
56
  runtimeDir: _runtimeDir,
56
57
  registerTearDown: addTearDown,
@@ -13,7 +13,7 @@ import 'package:test/test.dart';
13
13
 
14
14
  String get _root => '${Directory.current.path}/../..';
15
15
  String get _repoEntry => '$_root/cloud/web-client/runner/node-entry.ts';
16
- String get _gbDeploy => '$_root/examples/guestbook/build/guestbook.deploy.json';
16
+ String get _gbDeploy => '$_root/examples/guestbook/build/guestbook.law.usdz';
17
17
  String get _runtimeDir =>
18
18
  Platform.environment['NOMOS_DART_RUNTIME'] ??
19
19
  Platform.environment['NOMOS_OFFLINE_RUNTIME'] ??
@@ -25,7 +25,8 @@ String? _missingPrereq() {
25
25
  return 'missing $_gbDeploy — compile it (cd examples/guestbook && npx nomos-compile)';
26
26
  }
27
27
  if (!File('$_runtimeDir/holon-testmint.wasm').existsSync() ||
28
- !File('$_runtimeDir/packages.json').existsSync()) {
28
+ !File('$_runtimeDir/bootstrap.law.usdz').existsSync() ||
29
+ !File('$_runtimeDir/nomos.law.usdz').existsSync()) {
29
30
  return 'warm ~/.holon/runtime first (run any `githolon` command once)';
30
31
  }
31
32
  return null;
@@ -41,7 +42,7 @@ void main() {
41
42
  return;
42
43
  }
43
44
  final harness = await NomosTestHarness.ephemeral(
44
- deployJsonPaths: [_gbDeploy],
45
+ lawUsdzPaths: [_gbDeploy],
45
46
  workspace: 'stall-ws',
46
47
  nodeEntry: _repoEntry,
47
48
  resolveFrom: '$_root/cloud/web-client',