@githolon/dsl 0.108.4 → 0.108.6
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 +5 -0
- package/dart/lib/src/application_framework_calls.dart +21 -0
- package/dart/lib/src/dev_cloud.dart +67 -0
- package/dart/lib/src/nms_test_environment.dart +1 -1
- package/dart/lib/src/runner/node-entry.mjs +354 -104
- package/dart/lib/src/runner/offline-install.mjs +64 -8
- package/dart/lib/src/session_bound.dart +58 -30
- package/dart/lib/src/test_harness.dart +60 -98
- package/dart/lib/src/webview_bridge.dart +212 -32
- package/dart/pubspec.lock +1 -1
- package/dart/pubspec.yaml +2 -2
- package/dart/test/node_runner_transport_test.dart +5 -5
- package/dart/test/webview_bridge_test.dart +6 -0
- package/dart_types/CHANGELOG.md +4 -0
- package/dart_types/lib/src/proto/nomos/runtime/v2/runtime.pb.dart +428 -2
- package/dart_types/pubspec.yaml +1 -1
- package/package.json +1 -1
- package/runtime/generated-application-host.js +293 -79
- package/src/application_topology.ts +120 -28
- package/src/births.ts +27 -0
- package/src/codegen_call_usda.ts +9 -4
- package/src/codegen_dart_application.ts +146 -37
- package/src/codegen_dart_client.ts +225 -160
- package/src/codegen_dart_framework_calls.ts +89 -4
- package/src/codegen_ts.ts +135 -60
- package/src/compile_package_main.ts +3544 -1460
- package/src/directive.ts +320 -118
- package/src/fields.ts +2 -3
- package/src/framework/application_home.ts +3 -0
- package/src/framework/auth_provider_law.ts +20 -28
- package/src/framework/genesis.ts +32 -1
- package/src/framework/home.ts +45 -8
- package/src/framework/signing_identity.ts +78 -0
- package/src/framework/workspaces.ts +9 -1
- package/src/framework_call_dart_enums.ts +33 -0
- package/src/framework_call_definitions.ts +11 -2
- package/src/index.ts +12 -0
- package/src/intent.ts +525 -194
- package/src/law_graph.ts +32 -4
- package/src/law_graph_usda.ts +3 -0
- package/src/package_config.ts +16 -1
- package/src/read.ts +33 -11
- package/src/wire.ts +1 -0
- 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
|