@githolon/dsl 0.107.1 → 0.107.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@githolon/dsl",
3
- "version": "0.107.1",
3
+ "version": "0.107.3",
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.",
@@ -1665,7 +1665,7 @@ const NOMOS_TYPES_DEP = "^0.8.8";
1665
1665
  // DomainNotInstalledForSession, engine.follow, pendingConflicts lanes) — the generated client
1666
1666
  // REQUIRES this surface. 0.48.1 fixes NomosSession.watchPendingConflicts delegation.
1667
1667
  const NOMOS_CLIENT_DEP = "^0.64.46";
1668
- const NOMOS_FLUTTER_DEP = "^0.63.75";
1668
+ const NOMOS_FLUTTER_DEP = "^0.63.76";
1669
1669
  // DRIFT TRIPWIRE: pubspec_pins.test.ts asserts these equal the CURRENT versions in dsl/dart/pubspec.yaml
1670
1670
  // and dsl/dart_types/pubspec.yaml — a Dart release without this bump fails the suite, so tenants never
1671
1671
  // land back in dependency_overrides (the exact co2 report this closes, third occurrence).
@@ -28,6 +28,7 @@ import {
28
28
  type Sha256Digest,
29
29
  } from "../fields.js";
30
30
  import { directive } from "../directive.js";
31
+ import { formerAggregate, retirement } from "../evolution.js";
31
32
  import { set, withMarker, addToSet, type PlannedOp } from "../ops.js";
32
33
  import { key, relationRef, relationType, self, user } from "../relation_schema.js";
33
34
 
@@ -157,6 +158,34 @@ export const ReleaseReceipt = aggregate(RELEASE_RECEIPT_AGGREGATE, {
157
158
  acceptedAt: t.int().merge(Lww),
158
159
  }).public();
159
160
 
161
+ const counterfactualReleaseReceipt = formerAggregate(RELEASE_RECEIPT_AGGREGATE, [
162
+ "baselineRoot",
163
+ "candidateIntents",
164
+ "candidateRoot",
165
+ "complete",
166
+ "divergenceCount",
167
+ "historyHash",
168
+ "projectionEqual",
169
+ "rawPromotable",
170
+ "replayedIntents",
171
+ "reportHash",
172
+ "reportJson",
173
+ ] as const);
174
+
175
+ /** CAP-648 makes promotion a current-frontier transition. These old whole-history
176
+ * report fields are genuine framework retirements, carried by the candidate law. */
177
+ export const baselineRootRetired = retirement(counterfactualReleaseReceipt.fields.baselineRoot);
178
+ export const candidateIntentsRetired = retirement(counterfactualReleaseReceipt.fields.candidateIntents);
179
+ export const candidateRootRetired = retirement(counterfactualReleaseReceipt.fields.candidateRoot);
180
+ export const completeRetired = retirement(counterfactualReleaseReceipt.fields.complete);
181
+ export const divergenceCountRetired = retirement(counterfactualReleaseReceipt.fields.divergenceCount);
182
+ export const historyHashRetired = retirement(counterfactualReleaseReceipt.fields.historyHash);
183
+ export const projectionEqualRetired = retirement(counterfactualReleaseReceipt.fields.projectionEqual);
184
+ export const rawPromotableRetired = retirement(counterfactualReleaseReceipt.fields.rawPromotable);
185
+ export const replayedIntentsRetired = retirement(counterfactualReleaseReceipt.fields.replayedIntents);
186
+ export const reportHashRetired = retirement(counterfactualReleaseReceipt.fields.reportHash);
187
+ export const reportJsonRetired = retirement(counterfactualReleaseReceipt.fields.reportJson);
188
+
160
189
  export function domainInstallationAggregateId(domainHash: Sha256Digest): string {
161
190
  return `domain-installation:${domainHash}`;
162
191
  }
package/src/law_graph.ts CHANGED
@@ -9,6 +9,7 @@ import { finishExtremum } from "./extremum.js";
9
9
  import { finishSum } from "./sum.js";
10
10
  import {
11
11
  createLawIdentityReconciler,
12
+ LAW_FRAMEWORK_PARENT,
12
13
  lawEntityKey,
13
14
  mintOwnedLawSid,
14
15
  mintStructuralLawSid,
@@ -2304,9 +2305,14 @@ export function discoverLawGraph(
2304
2305
  return matches[0]!;
2305
2306
  };
2306
2307
  const retirements = (module.retirements ?? []).map((declaration): LawRetirement => {
2308
+ const retirementParent = (module.aggregates ?? []).some(
2309
+ (aggregate) => aggregate.id === declaration.aggregate && aggregate.framework === true,
2310
+ )
2311
+ ? LAW_FRAMEWORK_PARENT
2312
+ : domainKey;
2307
2313
  const [aggregateKey, aggregate] = identityEntity(
2308
2314
  "aggregate",
2309
- domainKey,
2315
+ retirementParent,
2310
2316
  declaration.aggregate,
2311
2317
  declaration.kind === "aggregate" ? "retired" : undefined,
2312
2318
  );