@githolon/dsl 0.115.0 → 0.116.4
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/assets/operation-contract.wasm +0 -0
- package/dart/CHANGELOG.md +19 -0
- package/dart/lib/src/nms_generated_runtime.dart +1 -0
- package/dart/lib/src/result_usda.dart +64 -27
- package/dart/lib/src/runner/node-entry.mjs +701 -207
- package/dart/lib/src/sync_status_projection.dart +11 -0
- package/dart/pubspec.lock +1 -1
- package/dart/pubspec.yaml +2 -2
- package/dart/test/kernel_refused_follow_test.dart +36 -0
- package/dart/test/result_usda_test.dart +67 -0
- package/dart_types/CHANGELOG.md +6 -0
- package/dart_types/lib/src/proto/nomos/runtime/v2/observability_desk.pbenum.dart +11 -1
- package/dart_types/lib/src/vo_canonical.dart +185 -0
- package/dart_types/pubspec.lock +1 -1
- package/dart_types/pubspec.yaml +3 -1
- package/dart_types/test/vo_canonical_test.dart +91 -0
- package/package.json +2 -2
- package/src/aggregate.ts +3 -1
- package/src/baseline_usda.ts +2 -3
- package/src/build_package.ts +47 -7
- package/src/codegen_call_usda.ts +6 -3
- package/src/codegen_dart.ts +19 -57
- package/src/codegen_result_usda.ts +8 -4
- package/src/compile_package_main.ts +11 -4
- package/src/engine_entry.ts +12 -4
- package/src/identity_usda.ts +3 -52
- package/src/index.ts +10 -0
- package/src/intent.ts +28 -3
- package/src/law_check.ts +34 -0
- package/src/law_graph_usda.ts +2 -3
- package/src/law_layer_prims.ts +3 -28
- package/src/law_units.ts +7 -6
- package/src/law_version.ts +2 -1
- package/src/point_guard.ts +5 -1
- package/src/release_inspection.ts +6 -4
- package/src/release_publication.ts +6 -5
- package/src/usda_text.ts +78 -3
- package/src/value_identity.ts +355 -0
- package/src/value_object.ts +29 -1
|
Binary file
|
package/dart/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## 0.70.2
|
|
2
|
+
|
|
3
|
+
- Carries the restaged peer runner for the native host 0.68.1 selection (CAP-874); its runtime identity moves with the runtime's patch release.
|
|
4
|
+
|
|
5
|
+
## 0.70.1
|
|
6
|
+
|
|
7
|
+
- Carries the 2026.10.2 runtime in the bundled Node peer (CAP-870, CAP-799, CAP-689): a copy whose saved bookmark is stale first asks its workspace's stream to level from its own head, so sync never re-lists history the custodian already holds; a complete custodian answers `off_main` at once for a head it does not hold, so a device with local work offers within seconds instead of a minute; kernel selection streams the download and times fetch, verify and store separately.
|
|
8
|
+
|
|
9
|
+
## 0.70.0
|
|
10
|
+
|
|
11
|
+
- `WorkspaceFollowPhase.kernelRefused`: the kernel refused the follow's last round at the same local head and remote frontier, so its sync is blocked. No timer re-runs it. It runs again on new local work, an upstream head change, a socket reopen, or a changed kernel or runtime. `retryAt` is set only once such an event has made the follow due, and `detail` carries the kernel's refusal. If you switch exhaustively over `WorkspaceFollowPhase`, add this case.
|
|
12
|
+
|
|
13
|
+
- The bundled Node peer (`--discovery-provider`) keeps its last verified kernel selection under `<custody>/runtime/boot`. A restart while the channel is unreachable boots from it, with the attestation chain checked again (CAP-839).
|
|
14
|
+
|
|
15
|
+
- Read results decode USDA strings with OpenUSD's escape rules (CAP-862): `\a \b \f \n \r \t \v`, `\xHH`, octal `\NNN`, and any other escaped character as itself. The legacy `\uXXXX` that older kernels wrote still decodes. A raw U+2028 or U+2029 inside a string value no longer fails the parse.
|
|
16
|
+
- Generated Dart call encoders write controls as `\xHH` (U+0000–U+001F except the named escapes, and U+007F) and write C1 characters raw. They throw `ArgumentError` on a lone surrogate. Before, a lone surrogate was silently replaced in the UTF-8 bytes.
|
|
17
|
+
|
|
18
|
+
- The generated runtime surface exports `NmsInternalValueIdentity`, which generated value-object `==` and `hashCode` now use (CAP-853).
|
|
19
|
+
|
|
1
20
|
## 0.69.0
|
|
2
21
|
|
|
3
22
|
- The test cloud's partition proxy (`NomosTestCloud`) carries live sockets: each workspace's catch-up
|
|
@@ -331,9 +331,13 @@ final class NmsUsdaResult {
|
|
|
331
331
|
abstract final class NmsUsdaLayer {
|
|
332
332
|
static NmsUsdaPrim parse(Uint8List bytes) => _parseLayer(bytes);
|
|
333
333
|
|
|
334
|
+
/// The canonical USDA string literal (CAP-862), byte-identical with the kernel's
|
|
335
|
+
/// `usda_string.rs` and the generated call encoders: `\"` `\\` `\n` `\r` `\t` `\b` `\f`; any
|
|
336
|
+
/// other U+0000–U+001F and U+007F as `\xHH`; C1 and everything else raw. A lone surrogate is
|
|
337
|
+
/// refused rather than silently replaced in the UTF-8 bytes.
|
|
334
338
|
static String quote(String value) {
|
|
335
339
|
final out = StringBuffer('"');
|
|
336
|
-
for (final code in value.
|
|
340
|
+
for (final code in value.runes) {
|
|
337
341
|
switch (code) {
|
|
338
342
|
case 0x22:
|
|
339
343
|
out.write(r'\"');
|
|
@@ -350,9 +354,12 @@ abstract final class NmsUsdaLayer {
|
|
|
350
354
|
case 0x0c:
|
|
351
355
|
out.write(r'\f');
|
|
352
356
|
default:
|
|
353
|
-
if (code < 0x20) {
|
|
354
|
-
out.write(r'\
|
|
355
|
-
out.write(code.toRadixString(16).padLeft(
|
|
357
|
+
if (code < 0x20 || code == 0x7f) {
|
|
358
|
+
out.write(r'\x');
|
|
359
|
+
out.write(code.toRadixString(16).padLeft(2, '0'));
|
|
360
|
+
} else if (code >= 0xd800 && code <= 0xdfff) {
|
|
361
|
+
throw ArgumentError.value(
|
|
362
|
+
value, 'value', 'Nomos USDA strings cannot carry a lone surrogate');
|
|
356
363
|
} else {
|
|
357
364
|
out.writeCharCode(code);
|
|
358
365
|
}
|
|
@@ -361,6 +368,7 @@ abstract final class NmsUsdaLayer {
|
|
|
361
368
|
out.write('"');
|
|
362
369
|
return out.toString();
|
|
363
370
|
}
|
|
371
|
+
|
|
364
372
|
}
|
|
365
373
|
|
|
366
374
|
NmsUsdaPrim _parseLayer(Uint8List bytes) {
|
|
@@ -406,6 +414,8 @@ NmsUsdaPrim _parseLayer(Uint8List bytes) {
|
|
|
406
414
|
}
|
|
407
415
|
final property = RegExp(
|
|
408
416
|
r'^custom(?:\s+uniform)?\s+(?:rel|[A-Za-z0-9_\[\]]+)\s+([A-Za-z0-9_:]+)\s*=\s*(.+)$',
|
|
417
|
+
// A raw U+2028/U+2029 inside a string literal is value, not a line break.
|
|
418
|
+
dotAll: true,
|
|
409
419
|
).firstMatch(line);
|
|
410
420
|
if (property != null) {
|
|
411
421
|
if (stack.isEmpty)
|
|
@@ -439,48 +449,75 @@ Object _atom(String source) {
|
|
|
439
449
|
throw FormatException('Unsupported USDA value $value');
|
|
440
450
|
}
|
|
441
451
|
|
|
452
|
+
/// Decodes one quoted USDA string with OpenUSD's escape rules (`TfEscapeString`): `\a \b \f \n \r
|
|
453
|
+
/// \t \v`, `\x` with up to two hex digits, `\NNN` with up to three octal digits, and any other
|
|
454
|
+
/// escaped character as itself. A LEGACY `\uXXXX` (written by pre-CAP-862 kernels; OpenUSD has no
|
|
455
|
+
/// `\u`) reads as the scalar it names, as the kernel normalises it.
|
|
442
456
|
String _unquote(String source) {
|
|
443
457
|
if (source.length < 2 || !source.startsWith('"') || !source.endsWith('"')) {
|
|
444
458
|
throw const FormatException('Invalid USDA string');
|
|
445
459
|
}
|
|
460
|
+
final body = source.substring(1, source.length - 1);
|
|
446
461
|
final out = StringBuffer();
|
|
447
|
-
|
|
448
|
-
|
|
462
|
+
int digitsAt(int start, int max, int radix) {
|
|
463
|
+
var count = 0;
|
|
464
|
+
while (count < max &&
|
|
465
|
+
start + count < body.length &&
|
|
466
|
+
int.tryParse(body[start + count], radix: radix) != null) {
|
|
467
|
+
count++;
|
|
468
|
+
}
|
|
469
|
+
return count;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
for (var index = 0; index < body.length; index++) {
|
|
473
|
+
final character = body[index];
|
|
449
474
|
if (character != r'\') {
|
|
450
475
|
out.write(character);
|
|
451
476
|
continue;
|
|
452
477
|
}
|
|
453
|
-
if (++index >=
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
final escaped = source[index];
|
|
478
|
+
if (++index >= body.length) break;
|
|
479
|
+
final escaped = body[index];
|
|
457
480
|
switch (escaped) {
|
|
481
|
+
case 'a':
|
|
482
|
+
out.writeCharCode(0x07);
|
|
483
|
+
case 'b':
|
|
484
|
+
out.write('\b');
|
|
485
|
+
case 'f':
|
|
486
|
+
out.write('\f');
|
|
458
487
|
case 'n':
|
|
459
488
|
out.write('\n');
|
|
460
489
|
case 'r':
|
|
461
490
|
out.write('\r');
|
|
462
491
|
case 't':
|
|
463
492
|
out.write('\t');
|
|
464
|
-
case '
|
|
465
|
-
out.
|
|
466
|
-
case '
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
493
|
+
case 'v':
|
|
494
|
+
out.writeCharCode(0x0b);
|
|
495
|
+
case 'x':
|
|
496
|
+
final count = digitsAt(index + 1, 2, 16);
|
|
497
|
+
out.writeCharCode(count == 0
|
|
498
|
+
? 0
|
|
499
|
+
: int.parse(body.substring(index + 1, index + 1 + count), radix: 16));
|
|
500
|
+
index += count;
|
|
472
501
|
case 'u':
|
|
473
|
-
|
|
474
|
-
|
|
502
|
+
final count = digitsAt(index + 1, 4, 16);
|
|
503
|
+
final code = count == 4
|
|
504
|
+
? int.parse(body.substring(index + 1, index + 5), radix: 16)
|
|
505
|
+
: null;
|
|
506
|
+
if (code != null && (code < 0xd800 || code > 0xdfff)) {
|
|
507
|
+
out.writeCharCode(code);
|
|
508
|
+
index += 4;
|
|
509
|
+
} else {
|
|
510
|
+
out.write('u');
|
|
475
511
|
}
|
|
476
|
-
final digits = source.substring(index + 1, index + 5);
|
|
477
|
-
final code = int.tryParse(digits, radix: 16);
|
|
478
|
-
if (code == null)
|
|
479
|
-
throw const FormatException('Invalid USDA unicode escape');
|
|
480
|
-
out.writeCharCode(code);
|
|
481
|
-
index += 4;
|
|
482
512
|
default:
|
|
483
|
-
|
|
513
|
+
if (escaped.codeUnitAt(0) >= 0x30 && escaped.codeUnitAt(0) <= 0x37) {
|
|
514
|
+
final count = digitsAt(index, 3, 8);
|
|
515
|
+
out.writeCharCode(
|
|
516
|
+
int.parse(body.substring(index, index + count), radix: 8));
|
|
517
|
+
index += count - 1;
|
|
518
|
+
} else {
|
|
519
|
+
out.write(escaped);
|
|
520
|
+
}
|
|
484
521
|
}
|
|
485
522
|
}
|
|
486
523
|
return out.toString();
|