@githolon/dsl 0.100.5 → 0.101.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.
- package/dart/CHANGELOG.md +12 -0
- package/dart/lib/src/dev_cloud.dart +46 -15
- package/dart/lib/src/test_harness.dart +220 -71
- package/dart/lib/src/webview_bridge.dart +640 -126
- package/dart/pubspec.lock +1 -1
- package/dart/pubspec.yaml +2 -2
- package/dart/test/acquire_session_credentials_test.dart +1 -1
- package/dart/test/adv_realm_interference_test.dart +1 -1
- package/dart/test/bundle_version_pairing_test.dart +11 -22
- package/dart/test/cluster_attested_test.dart +1 -1
- package/dart/test/cluster_births_test.dart +1 -1
- package/dart/test/cluster_device_keyed_acceptance_test.dart +1 -1
- package/dart/test/cluster_local_autosync_test.dart +1 -1
- package/dart/test/cluster_scale_test.dart +1 -1
- package/dart/test/co2_product_gauntlet_test.dart +228 -0
- package/dart/test/dlq_session_surface_test.dart +1 -1
- package/dart/test/errors_test.dart +63 -12
- package/dart/test/first_app_gauntlet_test.dart +132 -87
- package/dart/test/local_sync_inert_test.dart +10 -5
- package/dart/test/parent_signer_recovery_test.dart +1 -1
- package/dart/test/sealing_client_test.dart +1 -1
- package/dart/test/session_bound_test.dart +1 -1
- package/dart/test/test_harness_test.dart +2 -2
- package/dart/test/vo_read_typing_test.dart +1 -1
- package/dart/test/watch_after_offer_stall_test.dart +1 -1
- package/dart/test/webview_bridge_test.dart +274 -0
- package/dart_types/CHANGELOG.md +6 -0
- package/dart_types/lib/src/errors.dart +136 -30
- package/dart_types/lib/src/surfaced.dart +48 -2
- package/dart_types/lib/src/wire.dart +3 -1
- package/dart_types/pubspec.yaml +1 -1
- package/dart_types/test/surfaced_test.dart +19 -0
- package/package.json +1 -1
- package/src/activity.ts +43 -4
- package/src/aggregate.ts +132 -22
- package/src/attested_core.ts +1 -1
- package/src/authoring.ts +119 -6
- package/src/birth_meter.ts +4 -4
- package/src/birth_meter_ensure.ts +165 -29
- package/src/births.ts +53 -22
- package/src/build_package.ts +96 -20
- package/src/business_birth.ts +79 -16
- package/src/codegen_dart.ts +267 -37
- package/src/codegen_dart_client.ts +930 -87
- package/src/codegen_openapi.ts +28 -5
- package/src/codegen_proof.ts +107 -11
- package/src/codegen_ts.ts +961 -135
- package/src/compile_package_main.ts +172 -53
- package/src/conflicts.ts +252 -0
- package/src/describe_model.ts +448 -0
- package/src/directive.ts +5 -38
- package/src/drivers.ts +12 -4
- package/src/engine_entry.ts +4 -0
- package/src/evolve_preview.ts +72 -11
- package/src/fields.ts +201 -55
- package/src/framework/application_home.ts +103 -0
- package/src/framework/application_home_domain.ts +2 -0
- package/src/framework/attested_receipts.ts +2 -2
- package/src/framework/auth_provider_law.ts +51 -24
- package/src/framework/business_corrections.ts +170 -0
- package/src/framework/disclosure.ts +1 -1
- package/src/framework/domain_lifecycle.ts +250 -16
- package/src/framework/encryption_identity.ts +1 -1
- package/src/framework/encryption_scope.ts +21 -13
- package/src/framework/era_certification.ts +1 -1
- package/src/framework/framework_aggregates.ts +2 -0
- package/src/framework/genesis.ts +1 -1
- package/src/framework/home.ts +22 -9
- package/src/framework/identity.ts +5 -5
- package/src/framework/impure_capability.ts +2 -2
- package/src/framework/owned_custody.ts +561 -0
- package/src/framework/platform_admin.ts +1 -1
- package/src/framework/relations.ts +9 -1
- package/src/framework/repair.ts +1 -1
- package/src/framework/signing_identity.ts +2 -2
- package/src/framework/source_roster.ts +1 -1
- package/src/framework/workspaces.ts +17 -10
- package/src/generated_client_names.ts +39 -0
- package/src/index.ts +20 -15
- package/src/kernel_capabilities.ts +25 -1
- package/src/law_check.ts +4 -1
- package/src/manifest.ts +356 -63
- package/src/read_projection_manifest.ts +8 -0
- package/src/read_projection_namespace.ts +4 -0
- package/src/relation.ts +1 -1
- package/src/shape_compat.ts +61 -5
- package/src/stable_ids.ts +38 -6
- package/src/stable_ids_types.ts +30 -0
- package/src/surfaced_lint.ts +0 -0
- package/src/usd.ts +62 -11
- package/src/usd_layers.ts +54 -3
- package/src/value_object.ts +23 -19
- package/src/wire.ts +1 -0
- package/src/wire_encode.ts +48 -4
- package/src/workspace_routing.ts +57 -0
- package/src/workspace_sharding.ts +9 -9
- package/src/certified_read.ts +0 -313
package/dart/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 0.63.0
|
|
2
|
+
|
|
3
|
+
- Generated clients now expose business-first conflict policy, schema-aware merge continuation and recursive
|
|
4
|
+
organisation descriptions. The client privately owns lifecycle discovery, parent/child traversal, signer
|
|
5
|
+
custody and replay; applications follow typed business references rather than framework routes.
|
|
6
|
+
|
|
7
|
+
## 0.62.2
|
|
8
|
+
|
|
9
|
+
- Make `NomosTestHarness` own a complete, verifiable local trust lineage. Tests still bind a business actor
|
|
10
|
+
and call the generated birth method; the harness privately mints its test root, seats the signer and
|
|
11
|
+
delegation, lands the warrant in order, and refuses any child whose full chain does not replay to that root.
|
|
12
|
+
|
|
1
13
|
## 0.62.1
|
|
2
14
|
|
|
3
15
|
- Align the public Dart documentation with the one Flutter application entry point: identity comes from the
|
|
@@ -49,10 +49,12 @@ class NomosTestCloud {
|
|
|
49
49
|
final Uri _upstream; // the real dev-cloud origin the proxy forwards to
|
|
50
50
|
final HttpClient _client;
|
|
51
51
|
final void Function(String line)? _onDiagnostic;
|
|
52
|
+
final String? testKRootPublic;
|
|
52
53
|
bool _online = true;
|
|
53
54
|
bool _stopped = false;
|
|
54
55
|
|
|
55
|
-
NomosTestCloud._(this._server, this._proxy, this._upstream, this._client,
|
|
56
|
+
NomosTestCloud._(this._server, this._proxy, this._upstream, this._client,
|
|
57
|
+
this._onDiagnostic, this.testKRootPublic);
|
|
56
58
|
|
|
57
59
|
/// The base URL a cloud-BOUND session connects to (`connect(cloud: cloud.origin)`). Points at the PARTITION
|
|
58
60
|
/// PROXY, so [setOnline] deterministically severs/heals the whole plane's link to custody.
|
|
@@ -63,7 +65,8 @@ class NomosTestCloud {
|
|
|
63
65
|
/// cloud and peers converge. Deterministic: no timing races, the test decides exactly when the link exists.
|
|
64
66
|
void setOnline(bool online) {
|
|
65
67
|
_online = online;
|
|
66
|
-
_log(
|
|
68
|
+
_log(
|
|
69
|
+
'partition: ${online ? "ONLINE (link up)" : "OFFLINE (link severed)"}');
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
bool get online => _online;
|
|
@@ -72,8 +75,10 @@ class NomosTestCloud {
|
|
|
72
75
|
/// live cloud state DIRECTLY (bypassing the partition proxy) — a test assertion about custody must see the
|
|
73
76
|
/// truth even while the app's link is partitioned OFFLINE.
|
|
74
77
|
Future<RemoteWorkspaceState> remoteHead(String workspace) async {
|
|
75
|
-
final body =
|
|
76
|
-
|
|
78
|
+
final body =
|
|
79
|
+
await _getJson(_upstream.replace(path: '/v2/workspaces/$workspace'));
|
|
80
|
+
final ledger =
|
|
81
|
+
(body['ledgerState'] as Map?)?.cast<String, Object?>() ?? const {};
|
|
77
82
|
return RemoteWorkspaceState(
|
|
78
83
|
workspace: workspace,
|
|
79
84
|
initialized: body['initialized'] == true,
|
|
@@ -109,7 +114,8 @@ class NomosTestCloud {
|
|
|
109
114
|
final chosenPort = port == 0 ? await _freePort() : port;
|
|
110
115
|
final args = <String>[
|
|
111
116
|
serverEntry,
|
|
112
|
-
'--port',
|
|
117
|
+
'--port',
|
|
118
|
+
'$chosenPort',
|
|
113
119
|
if (ephemeral) '--ephemeral',
|
|
114
120
|
if (dataDir != null) ...['--data', dataDir],
|
|
115
121
|
if (platform != null) ...['--platform', platform],
|
|
@@ -118,8 +124,14 @@ class NomosTestCloud {
|
|
|
118
124
|
void log(String m) => onDiagnostic?.call('[nomos-test-cloud] $m');
|
|
119
125
|
log('spawning: $node ${args.join(' ')}');
|
|
120
126
|
final proc = await Process.start(node, args, mode: ProcessStartMode.normal);
|
|
121
|
-
proc.stdout
|
|
122
|
-
|
|
127
|
+
proc.stdout
|
|
128
|
+
.transform(utf8.decoder)
|
|
129
|
+
.transform(const LineSplitter())
|
|
130
|
+
.listen((l) => log('server: $l'));
|
|
131
|
+
proc.stderr
|
|
132
|
+
.transform(utf8.decoder)
|
|
133
|
+
.transform(const LineSplitter())
|
|
134
|
+
.listen((l) => log('server!: $l'));
|
|
123
135
|
|
|
124
136
|
final upstream = Uri.parse('http://127.0.0.1:$chosenPort');
|
|
125
137
|
final client = HttpClient();
|
|
@@ -128,6 +140,7 @@ class NomosTestCloud {
|
|
|
128
140
|
// half-born platform's typed refusals.
|
|
129
141
|
final deadline = DateTime.now().add(readyTimeout);
|
|
130
142
|
var ready = false;
|
|
143
|
+
String? testKRootPublic;
|
|
131
144
|
while (DateTime.now().isBefore(deadline)) {
|
|
132
145
|
try {
|
|
133
146
|
final req = await client.getUrl(upstream.replace(path: '/health'));
|
|
@@ -136,7 +149,11 @@ class NomosTestCloud {
|
|
|
136
149
|
if (resp.statusCode == 200) {
|
|
137
150
|
final health = jsonDecode(body) as Map<String, dynamic>;
|
|
138
151
|
final platformReady = health['platformReady'];
|
|
139
|
-
if (platform == null || platformReady == true) {
|
|
152
|
+
if (platform == null || platformReady == true) {
|
|
153
|
+
testKRootPublic = health['testKRootPublic']?.toString();
|
|
154
|
+
ready = true;
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
140
157
|
}
|
|
141
158
|
} catch (_) {/* not up yet */}
|
|
142
159
|
await Future<void>.delayed(const Duration(milliseconds: 200));
|
|
@@ -150,7 +167,8 @@ class NomosTestCloud {
|
|
|
150
167
|
|
|
151
168
|
// The partition proxy — forwards to the dev cloud when ONLINE, fails fast when OFFLINE.
|
|
152
169
|
final proxy = await HttpServer.bind(InternetAddress.loopbackIPv4, 0);
|
|
153
|
-
final cloud = NomosTestCloud._(
|
|
170
|
+
final cloud = NomosTestCloud._(
|
|
171
|
+
proc, proxy, upstream, client, onDiagnostic, testKRootPublic);
|
|
154
172
|
proxy.listen(cloud._handleProxy);
|
|
155
173
|
log('partition proxy at ${cloud.origin} → $upstream');
|
|
156
174
|
return cloud;
|
|
@@ -168,16 +186,26 @@ class NomosTestCloud {
|
|
|
168
186
|
return;
|
|
169
187
|
}
|
|
170
188
|
try {
|
|
171
|
-
final target = _upstream.replace(
|
|
189
|
+
final target = _upstream.replace(
|
|
190
|
+
path: req.uri.path,
|
|
191
|
+
query: req.uri.query.isEmpty ? null : req.uri.query);
|
|
172
192
|
final fwd = await _client.openUrl(req.method, target);
|
|
173
|
-
req.headers.forEach((name, values) {
|
|
193
|
+
req.headers.forEach((name, values) {
|
|
194
|
+
if (name.toLowerCase() != 'host')
|
|
195
|
+
for (final v in values) fwd.headers.add(name, v);
|
|
196
|
+
});
|
|
174
197
|
await fwd.addStream(req); // forward the request body
|
|
175
198
|
final resp = await fwd.close();
|
|
176
199
|
req.response.statusCode = resp.statusCode;
|
|
177
|
-
resp.headers.forEach((name, values) {
|
|
200
|
+
resp.headers.forEach((name, values) {
|
|
201
|
+
for (final v in values) req.response.headers.add(name, v);
|
|
202
|
+
});
|
|
178
203
|
await resp.pipe(req.response);
|
|
179
204
|
} catch (e) {
|
|
180
|
-
try {
|
|
205
|
+
try {
|
|
206
|
+
req.response.statusCode = 502;
|
|
207
|
+
await req.response.close();
|
|
208
|
+
} catch (_) {}
|
|
181
209
|
}
|
|
182
210
|
}
|
|
183
211
|
|
|
@@ -186,7 +214,8 @@ class NomosTestCloud {
|
|
|
186
214
|
final resp = await req.close();
|
|
187
215
|
final text = await resp.transform(utf8.decoder).join();
|
|
188
216
|
if (resp.statusCode != 200) {
|
|
189
|
-
throw NomosTestCloudException(
|
|
217
|
+
throw NomosTestCloudException(
|
|
218
|
+
'GET $url → ${resp.statusCode}: ${text.substring(0, text.length.clamp(0, 200))}');
|
|
190
219
|
}
|
|
191
220
|
return (jsonDecode(text) as Map).cast<String, Object?>();
|
|
192
221
|
}
|
|
@@ -198,7 +227,9 @@ class NomosTestCloud {
|
|
|
198
227
|
if (_stopped) return;
|
|
199
228
|
_stopped = true;
|
|
200
229
|
_log('stopping');
|
|
201
|
-
try {
|
|
230
|
+
try {
|
|
231
|
+
await _proxy.close(force: true);
|
|
232
|
+
} catch (_) {}
|
|
202
233
|
_server.kill(ProcessSignal.sigterm);
|
|
203
234
|
// Give it a moment, then SIGKILL if still alive.
|
|
204
235
|
try {
|