@githolon/dsl 0.97.0 → 0.97.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.61.1
2
+
3
+ - Runner entry resolution prefers the BUILT `@githolon/client/runner/node-entry.mjs` (published consumers:
4
+ node refuses type-stripping under node_modules, so the raw .ts entry only booted in-repo — DEFECT P3-002).
5
+
1
6
  ## 0.61.0
2
7
 
3
8
  - **ERA-0 cloud-bound harness** — `NomosTestHarness.cloudBound` now runs the full WARRANTED onboarding
@@ -1263,18 +1263,24 @@ class NomosTestHarness {
1263
1263
  }
1264
1264
 
1265
1265
  static Future<String> _resolveEntry(String node, String from) async {
1266
- final r = await Process.run(
1267
- node,
1268
- ['-p', "require.resolve('@githolon/client/runner/node-entry.ts')"],
1269
- workingDirectory: from,
1270
- );
1271
- final out = (r.stdout as String).trim();
1272
- if (r.exitCode != 0 || out.isEmpty) {
1273
- throw NomosTestHarnessException(
1274
- 'cannot resolve @githolon/client/runner/node-entry.ts from $from — '
1275
- 'is @githolon/client installed (npm install)? Pass nodeEntry: to override. stderr: ${r.stderr}');
1266
+ // PREFER the BUILT .mjs (the published-consumer entry): node refuses type-stripping under node_modules
1267
+ // (ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING — co2 DEFECT P3-002), so the raw .ts entry only boots
1268
+ // in-repo. The .mjs ships from @githolon/client ≥0.97.2; the .ts fallback keeps in-repo dev working.
1269
+ for (final entry in const [
1270
+ '@githolon/client/runner/node-entry.mjs',
1271
+ '@githolon/client/runner/node-entry.ts',
1272
+ ]) {
1273
+ final r = await Process.run(
1274
+ node,
1275
+ ['-p', "require.resolve('$entry')"],
1276
+ workingDirectory: from,
1277
+ );
1278
+ final out = (r.stdout as String).trim();
1279
+ if (r.exitCode == 0 && out.isNotEmpty) return out;
1276
1280
  }
1277
- return out;
1281
+ throw NomosTestHarnessException(
1282
+ 'cannot resolve @githolon/client/runner/node-entry.{mjs,ts} from $from — '
1283
+ 'is @githolon/client installed (npm install)? Pass nodeEntry: to override.');
1278
1284
  }
1279
1285
  }
1280
1286
 
package/dart/pubspec.yaml CHANGED
@@ -11,7 +11,7 @@ description: >-
11
11
  Nomos 2 Dart frontend types — the hand-written kernel wire types plus the
12
12
  code-generated per-domain aggregate + directive-payload types. (De)serializes
13
13
  the EXACT serde JSON the Rust kernel + projection produce/consume.
14
- version: 0.61.0
14
+ version: 0.61.1
15
15
 
16
16
  environment:
17
17
  sdk: ^3.5.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@githolon/dsl",
3
- "version": "0.97.0",
3
+ "version": "0.97.2",
4
4
  "type": "module",
5
5
  "description": "Nomos 2 domain-authoring DSL: aggregates + directives in TS, executed and encoded to the Rust kernel's wire shapes.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -54,6 +54,7 @@
54
54
  import { executeDirectiveToIntent } from "./wire_encode.js";
55
55
  import { expandCapabilityExports } from "./capability_exports.js";
56
56
  import { RelationTuple, __setDispatchContext } from "./framework/relations.js";
57
+ import { BIRTH_METER_AGGREGATES } from "./birth_meter.js";
57
58
  import { namespacedAggregateIds, qualifyReadProjectionType, READ_PROJECTION_DELIMITER } from "./read_projection_namespace.js";
58
59
  import { isRelationTypeDecl } from "./relation_schema.js";
59
60
  import { synthesizePreconditionInvariants } from "./precondition.js";
@@ -301,6 +302,17 @@ function buildDomainSlice(mod: DomainModuleExports): DomainSlice {
301
302
  if (!aggs.has(RelationTuple.id) && [...dirs.values()].some((d) => d.aggregateId === RelationTuple.id)) {
302
303
  aggs.set(RelationTuple.id, RelationTuple);
303
304
  }
305
+ // BIRTH-METER AUTO-ENSURE (RelationTuple's sibling — co2 tenant DEFECT P2-001): a law re-exporting a
306
+ // meter directive (`grantBirthAllowance`/`setBirthPolicy`, `.ensures(BirthGrant/BirthPolicy)`) without
307
+ // ALSO exporting the framework aggregate handle would fall into the silent drop below — while the
308
+ // COMPILE side (build_package's declaresBirth auto-inject) counts it in the manifest: a manifest-vs-
309
+ // engine skew that dispatches as "no directive registered". The engine mirrors the compile injection,
310
+ // so the two can never disagree on the meter surface.
311
+ for (const fw of BIRTH_METER_AGGREGATES) {
312
+ if (!aggs.has(fw.id) && [...dirs.values()].some((d) => d.aggregateId === fw.id)) {
313
+ aggs.set(fw.id, fw);
314
+ }
315
+ }
304
316
  for (const [dirId, directive] of dirs) {
305
317
  const agg = aggs.get(directive.aggregateId);
306
318
  if (agg === undefined) {