@githolon/dsl 0.119.13 → 0.119.28

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.
@@ -144,6 +144,40 @@ final class NmsTestPeer {
144
144
  return response;
145
145
  }
146
146
 
147
+ // Preparation is a read-only prerequisite. A business offer is submitted once.
148
+ Future<void> _awaitCurrentLaw(String workspace) async {
149
+ final deadline = DateTime.now().add(const Duration(minutes: 2));
150
+ while (true) {
151
+ final response = await host.kernelCalls.callKernel(
152
+ session: workspace,
153
+ request: protocol.CallRequest(
154
+ protocolVersion: 1,
155
+ requestId: '$workspace:current-law:${++_requestSequence}',
156
+ query: protocol.QueryRequest(
157
+ target: protocol.WorkspaceTarget(
158
+ repo: '/work/ws/$workspace',
159
+ workspace: workspace,
160
+ branch: 'main',
161
+ ),
162
+ authority: protocol.QueryAuthority(),
163
+ named: protocol.NamedQuery(
164
+ operation: protocol.QueryOperation.QUERY_OPERATION_CURRENT_LAW,
165
+ ),
166
+ ),
167
+ ),
168
+ credentialUse: protocol.CredentialUse.CREDENTIAL_USE_NONE,
169
+ );
170
+ if (!response.hasFailure()) return;
171
+ if (response.failure.code != 'NMS-LAW-PRODUCTS-PENDING' ||
172
+ DateTime.now().isAfter(deadline)) {
173
+ throw StateError(
174
+ '${response.failure.code}: ${response.failure.message}',
175
+ );
176
+ }
177
+ await Future<void>.delayed(const Duration(milliseconds: 100));
178
+ }
179
+ }
180
+
147
181
  Future<protocol.LawPackageInspection> _inspectLaw(
148
182
  Uint8List bytes,
149
183
  String label,
@@ -223,6 +257,7 @@ final class NmsTestPeer {
223
257
  }
224
258
  final bytes = await file.readAsBytes();
225
259
  final inspection = await _inspectLaw(bytes, file.uri.pathSegments.last);
260
+ await _awaitCurrentLaw(workspace);
226
261
  final offered = await _kernel(
227
262
  workspace,
228
263
  protocol.CallRequest(
@@ -250,6 +285,7 @@ final class NmsTestPeer {
250
285
  domainKeys.addAll(inspection.domainKeys);
251
286
  }
252
287
 
288
+ await _awaitCurrentLaw(workspace);
253
289
  final founding =
254
290
  deviceKey ?? await reception.session(workspace).authorKeygen();
255
291
  await reception.session(workspace).refreshCredentials(
package/dart/pubspec.lock CHANGED
@@ -222,7 +222,7 @@ packages:
222
222
  path: "../dart_types"
223
223
  relative: true
224
224
  source: path
225
- version: "0.15.3"
225
+ version: "0.16.0"
226
226
  package_config:
227
227
  dependency: "direct main"
228
228
  description:
package/dart/pubspec.yaml CHANGED
@@ -7,7 +7,7 @@ repository: https://github.com/Captain-App/nomos2
7
7
  description: >-
8
8
  Nomos 2 Dart client — generated domain values, intent payloads and application
9
9
  lifecycle types over the typed Nomos kernel protocol and USDA custody model.
10
- version: 0.70.13
10
+ version: 0.70.27
11
11
 
12
12
  environment:
13
13
  sdk: ^3.5.0
@@ -18,7 +18,7 @@ dependencies:
18
18
  # The pure-data core (wire types, offer codec, NomosReads, schema validation, error
19
19
  # info). nomos_client depends on and re-exports it, so existing imports are unchanged.
20
20
  # For local monorepo dev, pubspec_overrides.yaml points this at ../dart_types.
21
- nomos_types: ^0.15.3
21
+ nomos_types: ^0.16.0
22
22
  fixnum: ^1.1.1
23
23
  json_schema: ^5.2.2
24
24
  crypto: ^3.0.0
@@ -1,3 +1,7 @@
1
+ ## 0.16.0
2
+
3
+ - Publish the generated per-domain lifecycle, law-product preparation and effective-law compatibility protocol types (CAP-985, CAP-986, CAP-987).
4
+
1
5
  ## 0.15.3
2
6
 
3
7
  - Add a typed physical network-restored observation to wake transport retries without changing sync evidence.