@githolon/dsl 0.108.4 → 0.108.7

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 (44) hide show
  1. package/dart/CHANGELOG.md +5 -0
  2. package/dart/lib/src/application_framework_calls.dart +21 -0
  3. package/dart/lib/src/dev_cloud.dart +67 -0
  4. package/dart/lib/src/nms_test_environment.dart +1 -1
  5. package/dart/lib/src/runner/node-entry.mjs +354 -104
  6. package/dart/lib/src/runner/offline-install.mjs +64 -8
  7. package/dart/lib/src/session_bound.dart +58 -30
  8. package/dart/lib/src/test_harness.dart +60 -98
  9. package/dart/lib/src/webview_bridge.dart +212 -32
  10. package/dart/pubspec.lock +1 -1
  11. package/dart/pubspec.yaml +2 -2
  12. package/dart/test/node_runner_transport_test.dart +5 -5
  13. package/dart/test/webview_bridge_test.dart +6 -0
  14. package/dart_types/CHANGELOG.md +4 -0
  15. package/dart_types/lib/src/proto/nomos/runtime/v2/runtime.pb.dart +428 -2
  16. package/dart_types/pubspec.yaml +1 -1
  17. package/package.json +1 -1
  18. package/runtime/generated-application-host.js +293 -79
  19. package/src/application_topology.ts +120 -28
  20. package/src/births.ts +27 -0
  21. package/src/codegen_call_usda.ts +9 -4
  22. package/src/codegen_dart_application.ts +146 -37
  23. package/src/codegen_dart_client.ts +225 -160
  24. package/src/codegen_dart_framework_calls.ts +89 -4
  25. package/src/codegen_ts.ts +135 -60
  26. package/src/compile_package_main.ts +3598 -1484
  27. package/src/directive.ts +320 -118
  28. package/src/fields.ts +2 -3
  29. package/src/framework/application_home.ts +3 -0
  30. package/src/framework/auth_provider_law.ts +20 -28
  31. package/src/framework/genesis.ts +32 -1
  32. package/src/framework/home.ts +45 -8
  33. package/src/framework/signing_identity.ts +78 -0
  34. package/src/framework/workspaces.ts +9 -1
  35. package/src/framework_call_dart_enums.ts +33 -0
  36. package/src/framework_call_definitions.ts +11 -2
  37. package/src/index.ts +12 -0
  38. package/src/intent.ts +525 -194
  39. package/src/law_graph.ts +32 -4
  40. package/src/law_graph_usda.ts +3 -0
  41. package/src/package_config.ts +16 -1
  42. package/src/read.ts +33 -11
  43. package/src/wire.ts +1 -0
  44. package/src/wire_encode.ts +3 -3
package/dart/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.65.3
2
+
3
+ - Generate parent-law authentication cascades that wait for both provider and signer custody, without a child self-enrolment shortcut.
4
+ - Preserve nominal USDA calls and typed Runtime v2 results across local and remote workspace boundaries.
5
+
1
6
  ## 0.65.2
2
7
 
3
8
  - Preserve complete typed birth lineage and recover existing workspaces through the authenticated
@@ -9,6 +9,19 @@ import 'package:nomos_types/nomos_kernel_protocol.dart' show BirthCertificate;
9
9
  import 'generated_call.dart';
10
10
  import 'result_usda.dart' show NmsUsdaLayer, NmsUsdaPrim;
11
11
 
12
+ /// Generated enum for field values: guardian-quorum, platform-identity-provider.
13
+ enum NmsFrameworkSeedReceivingGroupPolicyRecovery {
14
+ guardian_quorum('guardian-quorum'),
15
+ platform_identity_provider('platform-identity-provider');
16
+
17
+ final String wire;
18
+ const NmsFrameworkSeedReceivingGroupPolicyRecovery(this.wire);
19
+
20
+ static NmsFrameworkSeedReceivingGroupPolicyRecovery fromWire(String wire) =>
21
+ NmsFrameworkSeedReceivingGroupPolicyRecovery.values.firstWhere((e) => e.wire == wire,
22
+ orElse: () => throw FormatException('unknown NmsFrameworkSeedReceivingGroupPolicyRecovery: $wire'));
23
+ }
24
+
12
25
  /// Compiler-generated framework value 'OwnedCustody'.
13
26
  /// Its canonical semantic representation is USDA; this class is the typed Dart view.
14
27
  final class OwnedCustody {
@@ -267,12 +280,14 @@ abstract interface class NmsApplicationFrameworkCalls {
267
280
  required String principal,
268
281
  required String workspaceId,
269
282
  required String bornAt,
283
+ List<({String keyHash, int validFromEpoch})>? admissionCheckpointSigners,
270
284
  });
271
285
 
272
286
  NmsGeneratedCall seedReceivingGroupPolicy({
273
287
  required String domain,
274
288
  required String workspace,
275
289
  required String setAt,
290
+ NmsFrameworkSeedReceivingGroupPolicyRecovery? recovery,
276
291
  });
277
292
 
278
293
  NmsGeneratedCall seedReceivingGroup({
@@ -283,6 +298,12 @@ abstract interface class NmsApplicationFrameworkCalls {
283
298
  required String bornAt,
284
299
  });
285
300
 
301
+ /// Compiler-selected application law for recovering a replacement device into its existing receiving group.
302
+ /// The generated implementation binds this semantic capability to one exact nominal application intent.
303
+ NmsGeneratedCall recoverExistingReceivingGroupDevice({
304
+ required String user,
305
+ });
306
+
286
307
  NmsGeneratedCall redeemInvitation({
287
308
  required String domain,
288
309
  required String workspace,
@@ -41,6 +41,20 @@ class RemoteWorkspaceState {
41
41
  'RemoteWorkspaceState($workspace, ${initialized ? "born" : "unborn"}, head=${head.isEmpty ? "∅" : head.substring(0, head.length.clamp(0, 10))}, $commits commit(s))';
42
42
  }
43
43
 
44
+ /// One device-bound proof minted by the local standards-edge identity provider.
45
+ /// Domain and custody APIs never receive the provider's JSON representation.
46
+ class DevIdentityToken {
47
+ final String token;
48
+ final String issuer;
49
+ final String audience;
50
+
51
+ const DevIdentityToken({
52
+ required this.token,
53
+ required this.issuer,
54
+ required this.audience,
55
+ });
56
+ }
57
+
44
58
  class NomosTestCloudException implements Exception {
45
59
  final String message;
46
60
  NomosTestCloudException(this.message);
@@ -100,6 +114,59 @@ class NomosTestCloud {
100
114
  );
101
115
  }
102
116
 
117
+ /// Rotate the external test IdP and its platform AuthProvider in one lawful
118
+ /// operator ceremony. The server changes its minting key only after the
119
+ /// platform admits the signed generated `setAuthProvider` call.
120
+ Future<void> rotateIdentityProvider() async {
121
+ final request = await _client.postUrl(
122
+ _upstream.replace(path: '/dev/rotate-idp'),
123
+ );
124
+ request.contentLength = 0;
125
+ final response = await request.close();
126
+ final body = await response.transform(utf8.decoder).join();
127
+ if (response.statusCode != HttpStatus.noContent) {
128
+ throw NomosTestCloudException(
129
+ 'test IdP rotation failed (${response.statusCode}): '
130
+ '${body.substring(0, body.length.clamp(0, 300))}',
131
+ );
132
+ }
133
+ }
134
+
135
+ /// Mint a fresh, device-bound JWT at the external identity-provider edge.
136
+ Future<DevIdentityToken> mintIdentityToken({
137
+ required String subject,
138
+ required String nonce,
139
+ }) async {
140
+ final request = await _client.postUrl(
141
+ _upstream.replace(path: '/dev/mint-token'),
142
+ );
143
+ request.headers.contentType = ContentType.json;
144
+ request.write(jsonEncode({'sub': subject, 'nonce': nonce}));
145
+ final response = await request.close();
146
+ final text = await response.transform(utf8.decoder).join();
147
+ if (response.statusCode != HttpStatus.ok) {
148
+ throw NomosTestCloudException(
149
+ 'test IdP token mint failed (${response.statusCode}): '
150
+ '${text.substring(0, text.length.clamp(0, 300))}',
151
+ );
152
+ }
153
+ final decoded = jsonDecode(text);
154
+ if (decoded case {
155
+ 'token': final String token,
156
+ 'issuer': final String issuer,
157
+ 'audience': final String audience,
158
+ } when token.isNotEmpty && issuer.isNotEmpty && audience.isNotEmpty) {
159
+ return DevIdentityToken(
160
+ token: token,
161
+ issuer: issuer,
162
+ audience: audience,
163
+ );
164
+ }
165
+ throw NomosTestCloudException(
166
+ 'test IdP returned an invalid identity proof',
167
+ );
168
+ }
169
+
103
170
  /// Start the test cloud: spawn `node <serverEntry> --port <n> [--ephemeral] [--data <dir>]`, wait until its
104
171
  /// `/health` answers, then bring up the partition proxy in front of it. [serverEntry] is the dev-server
105
172
  /// entry (`cloud/dev-server/server.ts` in-repo, or `dist/dev-server.mjs` from a published `githolon`) — the
@@ -4,5 +4,5 @@ library;
4
4
 
5
5
  import 'package:meta/meta.dart' show internal;
6
6
 
7
- export 'dev_cloud.dart' show NomosTestCloud;
7
+ export 'dev_cloud.dart' show DevIdentityToken, NomosTestCloud;
8
8
  export 'test_harness.dart' show NomosTestHarness;