@githolon/dsl 0.105.23 → 0.105.24
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 +9 -0
- package/dart/lib/src/runner/node-entry.mjs +4461 -267
- package/dart/lib/src/runner/offline-install.mjs +4337 -115
- package/dart/lib/src/test_harness.dart +316 -235
- package/dart/lib/src/webview_bridge.dart +1478 -1087
- package/dart/pubspec.lock +1 -1
- package/dart/pubspec.yaml +2 -2
- package/dart_types/CHANGELOG.md +5 -0
- package/dart_types/lib/src/errors.dart +78 -58
- package/dart_types/pubspec.yaml +1 -1
- package/package.json +1 -1
- package/runtime/generated-application-host.js +4235 -102
- package/src/codegen_dart_client.ts +7 -10
- package/src/codegen_ts.ts +3 -6
- package/src/compat_manifest.ts +6 -7
- package/src/compile_package_main.ts +9 -11
- package/src/index.ts +9 -11
- package/src/kernel_capabilities.ts +79 -237
package/dart/pubspec.lock
CHANGED
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.64.
|
|
10
|
+
version: 0.64.39
|
|
11
11
|
|
|
12
12
|
environment:
|
|
13
13
|
sdk: ^3.5.0
|
|
@@ -16,7 +16,7 @@ dependencies:
|
|
|
16
16
|
# The pure-data core (wire types, offer codec, NomosReads, schema validation, error
|
|
17
17
|
# info). nomos_client depends on and re-exports it, so existing imports are unchanged.
|
|
18
18
|
# For local monorepo dev, pubspec_overrides.yaml points this at ../dart_types.
|
|
19
|
-
nomos_types: ^0.8.
|
|
19
|
+
nomos_types: ^0.8.8
|
|
20
20
|
json_schema: ^5.2.2
|
|
21
21
|
crypto: ^3.0.0
|
|
22
22
|
package_config: ^2.1.0
|
package/dart_types/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## 0.8.8
|
|
2
|
+
|
|
3
|
+
- Name incompatible runtime selections as OSGi contract failures rather than referring to the retired
|
|
4
|
+
custom kernel-capability vocabulary.
|
|
5
|
+
|
|
1
6
|
## 0.8.7
|
|
2
7
|
|
|
3
8
|
- Decode only the kernel's stamped structural map-entry envelope as an envelope. Ordinary domain
|
|
@@ -162,7 +162,8 @@ class OwnedRecoveryPending extends NomosBridgeError {
|
|
|
162
162
|
stage: attr('stage') ?? 'request',
|
|
163
163
|
recoveryPrincipal:
|
|
164
164
|
attr('recoveryPrincipal') ?? attr('recovery_principal'),
|
|
165
|
-
recommendedAction:
|
|
165
|
+
recommendedAction:
|
|
166
|
+
attr('recommendedAction') ??
|
|
166
167
|
attr('recommended_action') ??
|
|
167
168
|
NomosRecommendedAction.waitForRecoveryPrincipal,
|
|
168
169
|
info: info,
|
|
@@ -170,7 +171,8 @@ class OwnedRecoveryPending extends NomosBridgeError {
|
|
|
170
171
|
}
|
|
171
172
|
|
|
172
173
|
@override
|
|
173
|
-
String toString() =>
|
|
174
|
+
String toString() =>
|
|
175
|
+
'OwnedRecoveryPending(stage: $stage'
|
|
174
176
|
'${recoveryPrincipal != null ? ', recoveryPrincipal: $recoveryPrincipal' : ''}, '
|
|
175
177
|
'recommendedAction: $recommendedAction): $message';
|
|
176
178
|
}
|
|
@@ -224,7 +226,8 @@ class LawMismatchError extends NomosBridgeError {
|
|
|
224
226
|
}
|
|
225
227
|
|
|
226
228
|
bool? compat() {
|
|
227
|
-
final v =
|
|
229
|
+
final v =
|
|
230
|
+
info.attributes['nomos.law.structurallyCompatible'] ??
|
|
228
231
|
info.attributes['structurallyCompatible'] ??
|
|
229
232
|
info.attributes['structurally_compatible'];
|
|
230
233
|
if (v is bool) return v;
|
|
@@ -245,10 +248,12 @@ class LawMismatchError extends NomosBridgeError {
|
|
|
245
248
|
attr('workspaceRuns') ?? attr('workspace_runs') ?? attr('installed'),
|
|
246
249
|
operation: info.operation ?? attr('operation'),
|
|
247
250
|
structurallyCompatible: compat(),
|
|
248
|
-
incompatibleMember:
|
|
251
|
+
incompatibleMember:
|
|
252
|
+
attr('incompatibleMember') ??
|
|
249
253
|
attr('incompatible_member') ??
|
|
250
254
|
attr('member'),
|
|
251
|
-
recommendedAction:
|
|
255
|
+
recommendedAction:
|
|
256
|
+
attr('recommendedAction') ??
|
|
252
257
|
attr('recommended_action') ??
|
|
253
258
|
NomosRecommendedAction.recompileClient,
|
|
254
259
|
info: info,
|
|
@@ -263,8 +268,8 @@ class LawMismatchError extends NomosBridgeError {
|
|
|
263
268
|
final verdict = structurallyCompatible == true
|
|
264
269
|
? 'structurally compatible — proceeding'
|
|
265
270
|
: (incompatibleMember != null
|
|
266
|
-
|
|
267
|
-
|
|
271
|
+
? 'structurally incompatible on $incompatibleMember'
|
|
272
|
+
: 'structurally incompatible');
|
|
268
273
|
return 'client generated for law $x, workspace runs law $y; $verdict — ${NomosRecommendedAction.sentence(recommendedAction)}';
|
|
269
274
|
}
|
|
270
275
|
|
|
@@ -362,7 +367,8 @@ class AuthzRefusedError extends NomosBridgeError {
|
|
|
362
367
|
relation: fields.relation,
|
|
363
368
|
directiveId: fields.directiveId,
|
|
364
369
|
cause: cause,
|
|
365
|
-
recommendedAction:
|
|
370
|
+
recommendedAction:
|
|
371
|
+
attr('recommendedAction') ??
|
|
366
372
|
attr('recommended_action') ??
|
|
367
373
|
NomosRecommendedAction.none,
|
|
368
374
|
info: info,
|
|
@@ -392,19 +398,18 @@ class ParentSignerEnrollmentMissing extends AuthzRefusedError {
|
|
|
392
398
|
String? directiveId,
|
|
393
399
|
NomosErrorInfo? info,
|
|
394
400
|
}) : super(
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
);
|
|
401
|
+
code: 'nomos.authz.signer_enrollment_missing',
|
|
402
|
+
message: message,
|
|
403
|
+
workspace: workspace,
|
|
404
|
+
actor: actor,
|
|
405
|
+
keyHash: keyHash,
|
|
406
|
+
object: object,
|
|
407
|
+
relation: 'signer',
|
|
408
|
+
directiveId: directiveId,
|
|
409
|
+
cause: 'missing-signer-enrollment',
|
|
410
|
+
recommendedAction: NomosRecommendedAction.ensureParentSignerEnrollment,
|
|
411
|
+
info: info,
|
|
412
|
+
);
|
|
408
413
|
}
|
|
409
414
|
|
|
410
415
|
/// AUTH — the auth-provider token was missing/malformed/expired/rejected, or its issuer does not match the
|
|
@@ -448,7 +453,8 @@ class AuthError extends NomosBridgeError {
|
|
|
448
453
|
workspace: info.workspace,
|
|
449
454
|
issuer: attr('issuer'),
|
|
450
455
|
operation: info.operation ?? attr('operation'),
|
|
451
|
-
recommendedAction:
|
|
456
|
+
recommendedAction:
|
|
457
|
+
attr('recommendedAction') ??
|
|
452
458
|
attr('recommended_action') ??
|
|
453
459
|
NomosRecommendedAction.reauth,
|
|
454
460
|
info: info,
|
|
@@ -498,7 +504,8 @@ class LoadError extends NomosBridgeError {
|
|
|
498
504
|
message: info.message,
|
|
499
505
|
artifact: attr('artifact'),
|
|
500
506
|
sourceUrl: attr('sourceUrl') ?? attr('source_url') ?? attr('url'),
|
|
501
|
-
recommendedAction:
|
|
507
|
+
recommendedAction:
|
|
508
|
+
attr('recommendedAction') ??
|
|
502
509
|
attr('recommended_action') ??
|
|
503
510
|
NomosRecommendedAction.retry,
|
|
504
511
|
info: info,
|
|
@@ -558,9 +565,10 @@ class SourceSessionNotMounted extends NomosBridgeError {
|
|
|
558
565
|
from: attr('from'),
|
|
559
566
|
sourceWorkspace:
|
|
560
567
|
attr('source_workspace') ?? attr('sourceWorkspace') ?? info.workspace,
|
|
561
|
-
queryId:
|
|
562
|
-
|
|
563
|
-
recommendedAction:
|
|
568
|
+
queryId: (info.attributes['nomos.query_id'] ?? attr('queryId'))
|
|
569
|
+
?.toString(),
|
|
570
|
+
recommendedAction:
|
|
571
|
+
attr('recommendedAction') ??
|
|
564
572
|
attr('recommended_action') ??
|
|
565
573
|
NomosRecommendedAction.mountSourceSession,
|
|
566
574
|
info: info,
|
|
@@ -568,23 +576,18 @@ class SourceSessionNotMounted extends NomosBridgeError {
|
|
|
568
576
|
}
|
|
569
577
|
|
|
570
578
|
@override
|
|
571
|
-
String toString() =>
|
|
579
|
+
String toString() =>
|
|
580
|
+
'SourceSessionNotMounted(source: $sourceWorkspace'
|
|
572
581
|
'${queryId != null ? ', query: $queryId' : ''}, recommendedAction: $recommendedAction): $message';
|
|
573
582
|
}
|
|
574
583
|
|
|
575
|
-
///
|
|
576
|
-
/// does NOT support a capability this law requires (e.g. a compound-key query `.key(a, b)` needs
|
|
577
|
-
/// `compoundKeys`, and the cloud's kernel is a STALE build that predates the compound-key read router). The
|
|
578
|
-
/// generated client asserts this at bind (from its baked `requiresKernel`) against the cloud's advertised
|
|
579
|
-
/// `/v1/runtime/capabilities`, so a stale/mismatched kernel is caught UP FRONT with a named reason — instead
|
|
580
|
-
/// of the opaque "the read router supports exactly one" refusal deep in a law fold. Remedy: point at a cloud
|
|
581
|
-
/// whose kernel is coherent with this release, or upgrade the cloud's kernel.
|
|
584
|
+
/// The provider-selected OSGi resource does not satisfy the generated law's Contract Namespace requirements.
|
|
582
585
|
class KernelCoherenceError extends NomosBridgeError {
|
|
583
|
-
/// The stable machine code — always `kernel-
|
|
586
|
+
/// The stable machine code — always `kernel-contract-incompatible`.
|
|
584
587
|
final String code;
|
|
585
588
|
|
|
586
589
|
KernelCoherenceError({
|
|
587
|
-
this.code = 'kernel-
|
|
590
|
+
this.code = 'kernel-contract-incompatible',
|
|
588
591
|
required String message,
|
|
589
592
|
NomosErrorInfo? info,
|
|
590
593
|
}) : super(message, info: info);
|
|
@@ -676,7 +679,8 @@ class CustodyError extends NomosBridgeError {
|
|
|
676
679
|
orElse: () => CustodySource.unknown,
|
|
677
680
|
),
|
|
678
681
|
recoverable: attr('recoverable') != 'false',
|
|
679
|
-
recommendedAction:
|
|
682
|
+
recommendedAction:
|
|
683
|
+
attr('recommended_action') ??
|
|
680
684
|
attr('recommendedAction') ??
|
|
681
685
|
'refetchFullHistoryAndRetry',
|
|
682
686
|
info: info,
|
|
@@ -701,8 +705,10 @@ class AuthTokenInvalid extends NomosBridgeError {
|
|
|
701
705
|
final String code = 'nomos.auth.token_invalid';
|
|
702
706
|
final String recommendedAction = NomosRecommendedAction.reauth;
|
|
703
707
|
AuthTokenInvalid([String? message])
|
|
704
|
-
|
|
705
|
-
|
|
708
|
+
: super(
|
|
709
|
+
message ??
|
|
710
|
+
'the auth-provider token was missing or rejected (the cloud refused 401) — a birth needs a verified principal',
|
|
711
|
+
);
|
|
706
712
|
}
|
|
707
713
|
|
|
708
714
|
/// The workspace name the cloud reported for the born home does NOT equal `homeNameOf(subject)`. The home's
|
|
@@ -717,10 +723,14 @@ class HomeNameMismatch extends NomosBridgeError {
|
|
|
717
723
|
|
|
718
724
|
/// What the cloud reported (its status `lineage.id` / the name it served).
|
|
719
725
|
final String reported;
|
|
720
|
-
HomeNameMismatch(
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
726
|
+
HomeNameMismatch({
|
|
727
|
+
required this.expected,
|
|
728
|
+
required this.reported,
|
|
729
|
+
String? message,
|
|
730
|
+
}) : super(
|
|
731
|
+
message ??
|
|
732
|
+
'the cloud reported home "$reported" but this subject hashes to "$expected" — refusing to mount a home whose name does not bind its owner',
|
|
733
|
+
);
|
|
724
734
|
}
|
|
725
735
|
|
|
726
736
|
/// The workspace exists and is born, but the HOME LAW is not installed/active on it — so it is a plain
|
|
@@ -734,8 +744,10 @@ class HomeLawMissing extends NomosBridgeError {
|
|
|
734
744
|
/// The workspace that is missing the home law.
|
|
735
745
|
final String workspace;
|
|
736
746
|
HomeLawMissing({required this.workspace, String? message})
|
|
737
|
-
|
|
738
|
-
|
|
747
|
+
: super(
|
|
748
|
+
message ??
|
|
749
|
+
'workspace "$workspace" is born but the home law is not installed/active on it — refusing to mount a plain workspace as a home',
|
|
750
|
+
);
|
|
739
751
|
}
|
|
740
752
|
|
|
741
753
|
/// The offer to the home's birth lane was REFUSED by the parent's gate (the law denied the birth — e.g. the
|
|
@@ -751,8 +763,10 @@ class BirthRejected extends NomosBridgeError {
|
|
|
751
763
|
/// The HTTP status the cloud answered, when known.
|
|
752
764
|
final int? statusCode;
|
|
753
765
|
BirthRejected({String? message, this.directiveId, this.statusCode})
|
|
754
|
-
|
|
755
|
-
|
|
766
|
+
: super(
|
|
767
|
+
message ??
|
|
768
|
+
'the home birth offer was refused by the law${directiveId != null ? ' (directive "$directiveId")' : ''}${statusCode != null ? ' [$statusCode]' : ''}',
|
|
769
|
+
);
|
|
756
770
|
}
|
|
757
771
|
|
|
758
772
|
/// A pack the cloud returned (or the local holon produced) was malformed — it could not be parsed/applied as
|
|
@@ -763,8 +777,10 @@ class PackMalformed extends NomosBridgeError {
|
|
|
763
777
|
final String recommendedAction =
|
|
764
778
|
NomosRecommendedAction.refetchFullHistoryAndRetry;
|
|
765
779
|
PackMalformed([String? message])
|
|
766
|
-
|
|
767
|
-
|
|
780
|
+
: super(
|
|
781
|
+
message ??
|
|
782
|
+
'a returned pack was malformed and could not be applied (custody integrity fault)',
|
|
783
|
+
);
|
|
768
784
|
}
|
|
769
785
|
|
|
770
786
|
/// The home law's content hash could not be resolved — the cloud reported no current law for the home's
|
|
@@ -777,8 +793,10 @@ class LawHashUnavailable extends NomosBridgeError {
|
|
|
777
793
|
/// The workspace whose current law hash could not be resolved.
|
|
778
794
|
final String workspace;
|
|
779
795
|
LawHashUnavailable({required this.workspace, String? message})
|
|
780
|
-
|
|
781
|
-
|
|
796
|
+
: super(
|
|
797
|
+
message ??
|
|
798
|
+
'could not resolve the current law hash for "$workspace" — the cloud reported no installed law for the home',
|
|
799
|
+
);
|
|
782
800
|
}
|
|
783
801
|
|
|
784
802
|
/// AUTHORITY IS UNFORGEABLE-BY-CONSTRUCTION: a GATED directive (one carrying a `.requires(relation)` write
|
|
@@ -795,11 +813,13 @@ class MissingOfferAuthority extends NomosBridgeError {
|
|
|
795
813
|
|
|
796
814
|
/// The relation the law requires the author to hold (e.g. `admin`).
|
|
797
815
|
final String requires;
|
|
798
|
-
MissingOfferAuthority(
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
816
|
+
MissingOfferAuthority({
|
|
817
|
+
required this.domain,
|
|
818
|
+
required this.directiveId,
|
|
819
|
+
required this.requires,
|
|
820
|
+
String? message,
|
|
821
|
+
}) : super(
|
|
822
|
+
message ??
|
|
823
|
+
'$domain/$directiveId requires the "$requires" relation — construct the client with an actor (the verified principal) to author it; a gated offer cannot be made without an authority',
|
|
824
|
+
);
|
|
805
825
|
}
|
package/dart_types/pubspec.yaml
CHANGED
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
Pure kernel wire/data types for Nomos Dart frontends — no transport, no bridge,
|
|
10
10
|
no runtime. Typed protobuf and USDA boundary values plus the offer codec,
|
|
11
11
|
reactive read engine, schema validation, and data-only error/trace types.
|
|
12
|
-
version: 0.8.
|
|
12
|
+
version: 0.8.8
|
|
13
13
|
|
|
14
14
|
environment:
|
|
15
15
|
sdk: ^3.5.0
|
package/package.json
CHANGED