@githolon/dsl 0.103.13 → 0.103.14
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/lib/src/runner/node-entry.mjs +10 -3
- package/dart/lib/src/session_bound.dart +7 -4
- package/dart/lib/src/webview_bridge.dart +2 -0
- package/dart_types/CHANGELOG.md +1 -1
- package/dart_types/pubspec.yaml +1 -1
- package/package.json +1 -1
- package/runtime/generated-application-host.js +9 -2
- package/src/codegen_dart.ts +4 -4
- package/src/codegen_dart_client.ts +4 -4
- package/src/compile_package_main.ts +1 -1
- package/src/stable_ids_for_module.ts +8 -4
|
@@ -514,7 +514,7 @@ function createWebviewRunner({ post: post2, openRealm: openRealm2 }) {
|
|
|
514
514
|
// FRAMEWORK-PRIVATE: generated clients say model.adopt(); the runner/client owns proof + receipt assembly.
|
|
515
515
|
async adoptGeneratedModel(a) {
|
|
516
516
|
const rec = pickSession(a);
|
|
517
|
-
const r = await (await liveHolon(rec)).__nomosAdoptModel(a.domain, a.candidateHash, { because: a.because });
|
|
517
|
+
const r = await (await liveHolon(rec)).__nomosAdoptModel(a.domain, a.candidateHash, { because: a.because, dispositions: a.dispositions });
|
|
518
518
|
if (r && r.ok && rec.autoStop && rec.autoStop.trigger) rec.autoStop.trigger("write");
|
|
519
519
|
return { verdict: r };
|
|
520
520
|
},
|
|
@@ -10087,7 +10087,13 @@ ${String(commit).toLowerCase()}`;
|
|
|
10087
10087
|
const atHash = await resolveBranchHead();
|
|
10088
10088
|
if (!atHash) throw new Error("workspace has no history to prove");
|
|
10089
10089
|
return JSON.parse(call("query", {
|
|
10090
|
-
queryBytes: qBytes({
|
|
10090
|
+
queryBytes: qBytes({
|
|
10091
|
+
op: "historyPreflight",
|
|
10092
|
+
domain,
|
|
10093
|
+
candidateHash,
|
|
10094
|
+
atHash,
|
|
10095
|
+
...opts.dispositions ? { dispositions: opts.dispositions } : {}
|
|
10096
|
+
})
|
|
10091
10097
|
}));
|
|
10092
10098
|
});
|
|
10093
10099
|
} catch (error) {
|
|
@@ -10099,7 +10105,8 @@ ${String(commit).toLowerCase()}`;
|
|
|
10099
10105
|
}
|
|
10100
10106
|
const prepared = prepareManagedPromotion(report, candidateHash, domain, {
|
|
10101
10107
|
...currentHash && currentHash !== candidateHash ? { replaces: currentHash } : {},
|
|
10102
|
-
...opts.because !== void 0 ? { acceptanceReason: opts.because } : {}
|
|
10108
|
+
...opts.because !== void 0 ? { acceptanceReason: opts.because } : {},
|
|
10109
|
+
...opts.dispositions ? { dispositions: opts.dispositions } : {}
|
|
10103
10110
|
});
|
|
10104
10111
|
if (!prepared.ok) return prepared;
|
|
10105
10112
|
try {
|
|
@@ -191,7 +191,7 @@ class DomainClientModelAdoptionRequired implements Exception {
|
|
|
191
191
|
final String summary;
|
|
192
192
|
final DomainModelReview review;
|
|
193
193
|
final Future<void> Function()? _stage;
|
|
194
|
-
final Future<void> Function(String reason)? _accept;
|
|
194
|
+
final Future<void> Function(String reason, {Map<String, Object?>? dispositions})? _accept;
|
|
195
195
|
|
|
196
196
|
const DomainClientModelAdoptionRequired({
|
|
197
197
|
required this.expectedDomainKey,
|
|
@@ -200,7 +200,7 @@ class DomainClientModelAdoptionRequired implements Exception {
|
|
|
200
200
|
required this.summary,
|
|
201
201
|
required this.review,
|
|
202
202
|
Future<void> Function()? stage,
|
|
203
|
-
Future<void> Function(String reason)? accept,
|
|
203
|
+
Future<void> Function(String reason, {Map<String, Object?>? dispositions})? accept,
|
|
204
204
|
}) : _stage = stage,
|
|
205
205
|
_accept = accept;
|
|
206
206
|
|
|
@@ -216,7 +216,10 @@ class DomainClientModelAdoptionRequired implements Exception {
|
|
|
216
216
|
|
|
217
217
|
bool get canAccept => _accept != null;
|
|
218
218
|
|
|
219
|
-
|
|
219
|
+
/// [dispositions] carries only sids the kernel's OWN exact-history proof
|
|
220
|
+
/// named as truly removed (`{"retired": [sid, ...]}`) — never authored from
|
|
221
|
+
/// memory; a wrong disposition is a silent data-model error, not a waiver.
|
|
222
|
+
Future<void> accept(String reason, {Map<String, Object?>? dispositions}) {
|
|
220
223
|
final value = reason.trim();
|
|
221
224
|
if (value.isEmpty) {
|
|
222
225
|
throw ArgumentError.value(
|
|
@@ -229,7 +232,7 @@ class DomainClientModelAdoptionRequired implements Exception {
|
|
|
229
232
|
if (accept == null) {
|
|
230
233
|
throw StateError('This generated model change cannot be accepted.');
|
|
231
234
|
}
|
|
232
|
-
return accept(value);
|
|
235
|
+
return accept(value, dispositions: dispositions);
|
|
233
236
|
}
|
|
234
237
|
|
|
235
238
|
@override
|
|
@@ -2654,11 +2654,13 @@ class NomosBridge {
|
|
|
2654
2654
|
required String domain,
|
|
2655
2655
|
required String candidateHash,
|
|
2656
2656
|
String? because,
|
|
2657
|
+
Map<String, Object?>? dispositions,
|
|
2657
2658
|
}) async {
|
|
2658
2659
|
final r = _asMap(await _call('adoptGeneratedModel', {
|
|
2659
2660
|
'domain': domain,
|
|
2660
2661
|
'candidateHash': candidateHash,
|
|
2661
2662
|
if (because != null) 'because': because,
|
|
2663
|
+
if (dispositions != null) 'dispositions': dispositions,
|
|
2662
2664
|
}));
|
|
2663
2665
|
return ((r['verdict'] as Map?) ?? const <String, Object?>{})
|
|
2664
2666
|
.cast<String, Object?>();
|
package/dart_types/CHANGELOG.md
CHANGED
package/dart_types/pubspec.yaml
CHANGED
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
Pure kernel wire/data types for Nomos Dart frontends — no transport, no bridge,
|
|
10
10
|
no runtime. Typed protobuf and USDA boundary values plus the offer codec,
|
|
11
11
|
reactive read engine, schema validation, and data-only error/trace types.
|
|
12
|
-
version: 0.8.
|
|
12
|
+
version: 0.8.5
|
|
13
13
|
|
|
14
14
|
environment:
|
|
15
15
|
sdk: ^3.5.0
|
package/package.json
CHANGED
|
@@ -9138,7 +9138,13 @@ ${String(commit).toLowerCase()}`;
|
|
|
9138
9138
|
const atHash = await resolveBranchHead();
|
|
9139
9139
|
if (!atHash) throw new Error("workspace has no history to prove");
|
|
9140
9140
|
return JSON.parse(call("query", {
|
|
9141
|
-
queryBytes: qBytes({
|
|
9141
|
+
queryBytes: qBytes({
|
|
9142
|
+
op: "historyPreflight",
|
|
9143
|
+
domain,
|
|
9144
|
+
candidateHash,
|
|
9145
|
+
atHash,
|
|
9146
|
+
...opts.dispositions ? { dispositions: opts.dispositions } : {}
|
|
9147
|
+
})
|
|
9142
9148
|
}));
|
|
9143
9149
|
});
|
|
9144
9150
|
} catch (error) {
|
|
@@ -9150,7 +9156,8 @@ ${String(commit).toLowerCase()}`;
|
|
|
9150
9156
|
}
|
|
9151
9157
|
const prepared = prepareManagedPromotion(report, candidateHash, domain, {
|
|
9152
9158
|
...currentHash && currentHash !== candidateHash ? { replaces: currentHash } : {},
|
|
9153
|
-
...opts.because !== void 0 ? { acceptanceReason: opts.because } : {}
|
|
9159
|
+
...opts.because !== void 0 ? { acceptanceReason: opts.because } : {},
|
|
9160
|
+
...opts.dispositions ? { dispositions: opts.dispositions } : {}
|
|
9154
9161
|
});
|
|
9155
9162
|
if (!prepared.ok) return prepared;
|
|
9156
9163
|
try {
|
package/src/codegen_dart.ts
CHANGED
|
@@ -2742,14 +2742,14 @@ export function generateDartActivityRegistry(entries: readonly PackageActivityEn
|
|
|
2742
2742
|
` final String summary;`,
|
|
2743
2743
|
` final NomosModelReview review;`,
|
|
2744
2744
|
` final Future<NomosModelAdoption> Function()? _stage;`,
|
|
2745
|
-
` final Future<NomosModelAdoption> Function(String)? _accept;`,
|
|
2745
|
+
` final Future<NomosModelAdoption> Function(String, {Map<String, Object?>? dispositions})? _accept;`,
|
|
2746
2746
|
` const NomosModelAdoption.adopted({required this.summary, required this.review})`,
|
|
2747
2747
|
` : status = NomosModelAdoptionStatus.adopted, _stage = null, _accept = null;`,
|
|
2748
2748
|
` const NomosModelAdoption.blocked({required this.summary, required this.review})`,
|
|
2749
2749
|
` : status = NomosModelAdoptionStatus.blocked, _stage = null, _accept = null;`,
|
|
2750
2750
|
` NomosModelAdoption.needsStaging({required this.summary, required this.review, required Future<NomosModelAdoption> Function() stage})`,
|
|
2751
2751
|
` : status = NomosModelAdoptionStatus.needsStaging, _stage = stage, _accept = null;`,
|
|
2752
|
-
` NomosModelAdoption.needsDecision({required this.summary, required this.review, required Future<NomosModelAdoption> Function(String) accept})`,
|
|
2752
|
+
` NomosModelAdoption.needsDecision({required this.summary, required this.review, required Future<NomosModelAdoption> Function(String, {Map<String, Object?>? dispositions}) accept})`,
|
|
2753
2753
|
` : status = NomosModelAdoptionStatus.needsDecision, _stage = null, _accept = accept;`,
|
|
2754
2754
|
` Future<NomosModelAdoption> stage() {`,
|
|
2755
2755
|
` final stageCandidate = _stage;`,
|
|
@@ -2758,14 +2758,14 @@ export function generateDartActivityRegistry(entries: readonly PackageActivityEn
|
|
|
2758
2758
|
` }`,
|
|
2759
2759
|
` return stageCandidate();`,
|
|
2760
2760
|
` }`,
|
|
2761
|
-
` Future<NomosModelAdoption> accept(String because) {`,
|
|
2761
|
+
` Future<NomosModelAdoption> accept(String because, {Map<String, Object?>? dispositions}) {`,
|
|
2762
2762
|
` final reason = because.trim();`,
|
|
2763
2763
|
` final acceptDecision = _accept;`,
|
|
2764
2764
|
` if (status != NomosModelAdoptionStatus.needsDecision || acceptDecision == null) {`,
|
|
2765
2765
|
` throw StateError('This model change is not waiting for a business decision.');`,
|
|
2766
2766
|
` }`,
|
|
2767
2767
|
` if (reason.isEmpty) throw ArgumentError('accept(reason) needs the business reason for changing prior outcomes');`,
|
|
2768
|
-
` return acceptDecision(reason);`,
|
|
2768
|
+
` return acceptDecision(reason, dispositions: dispositions);`,
|
|
2769
2769
|
` }`,
|
|
2770
2770
|
`}`,
|
|
2771
2771
|
``,
|
|
@@ -1670,11 +1670,11 @@ export function generateDartBridgeClient(
|
|
|
1670
1670
|
` sameOutcome: projection?['equal'] as bool?, differences: differences);`,
|
|
1671
1671
|
` }`,
|
|
1672
1672
|
``,
|
|
1673
|
-
` Future<NomosModelAdoption> _adoptGeneratedModel([String? because]) async {`,
|
|
1673
|
+
` Future<NomosModelAdoption> _adoptGeneratedModel([String? because, Map<String, Object?>? dispositions]) async {`,
|
|
1674
1674
|
` final raw = await bridge.nomosFrameworkAdoptGeneratedModel(`,
|
|
1675
1675
|
` domain: ${dartStr(
|
|
1676
1676
|
domain
|
|
1677
|
-
)}, candidateHash: domainHash, because: because);`,
|
|
1677
|
+
)}, candidateHash: domainHash, because: because, dispositions: dispositions);`,
|
|
1678
1678
|
` final reportRaw = raw['report'];`,
|
|
1679
1679
|
` final report = reportRaw is Map ? reportRaw.cast<String, Object?>() : null;`,
|
|
1680
1680
|
` final review = _nomosModelReview(report);`,
|
|
@@ -2424,8 +2424,8 @@ export function generateDartBridgeClient(
|
|
|
2424
2424
|
` : null,`,
|
|
2425
2425
|
]),
|
|
2426
2426
|
` accept: adoption.status == NomosModelAdoptionStatus.needsDecision`,
|
|
2427
|
-
` ? (reason) async {`,
|
|
2428
|
-
` final accepted = await adoption.accept(reason);`,
|
|
2427
|
+
` ? (reason, {dispositions}) async {`,
|
|
2428
|
+
` final accepted = await adoption.accept(reason, dispositions: dispositions);`,
|
|
2429
2429
|
` if (accepted.status != NomosModelAdoptionStatus.adopted) {`,
|
|
2430
2430
|
` throw StateError(accepted.summary);`,
|
|
2431
2431
|
` }`,
|
|
@@ -1653,7 +1653,7 @@ const NOMOS_TYPES_DEP = "^0.8.4";
|
|
|
1653
1653
|
// DomainNotInstalledForSession, engine.follow, pendingConflicts lanes) — the generated client
|
|
1654
1654
|
// REQUIRES this surface. 0.48.1 fixes NomosSession.watchPendingConflicts delegation.
|
|
1655
1655
|
const NOMOS_CLIENT_DEP = "^0.64.14";
|
|
1656
|
-
const NOMOS_FLUTTER_DEP = "^0.63.
|
|
1656
|
+
const NOMOS_FLUTTER_DEP = "^0.63.18";
|
|
1657
1657
|
// DRIFT TRIPWIRE: pubspec_pins.test.ts asserts these equal the CURRENT versions in dsl/dart/pubspec.yaml
|
|
1658
1658
|
// and dsl/dart_types/pubspec.yaml — a Dart release without this bump fails the suite, so tenants never
|
|
1659
1659
|
// land back in dependency_overrides (the exact co2 report this closes, third occurrence).
|
|
@@ -344,11 +344,15 @@ function normalizeFieldContract(value: unknown, parentKey = ""): unknown {
|
|
|
344
344
|
return items;
|
|
345
345
|
}
|
|
346
346
|
if (value !== null && typeof value === "object") {
|
|
347
|
+
const record = value as Record<string, unknown>;
|
|
348
|
+
// `enumType(...)`'s exported-binding name (`bindEnumTypeExport`) rides the JSON Schema node
|
|
349
|
+
// as a cosmetic `name` purely for codegen/LSP labeling — it carries no business value and
|
|
350
|
+
// must never manufacture a false retype when a shared enum export is bound/renamed/moved.
|
|
351
|
+
const entries = record.type === "enum"
|
|
352
|
+
? Object.entries(record).filter(([key]) => key !== "name")
|
|
353
|
+
: Object.entries(record);
|
|
347
354
|
return Object.fromEntries(
|
|
348
|
-
|
|
349
|
-
key,
|
|
350
|
-
normalizeFieldContract(child, key),
|
|
351
|
-
]),
|
|
355
|
+
entries.map(([key, child]) => [key, normalizeFieldContract(child, key)]),
|
|
352
356
|
);
|
|
353
357
|
}
|
|
354
358
|
return value;
|