@githolon/dsl 0.26.0 → 0.27.0
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 +4 -0
- package/dart/lib/src/webview_bridge.dart +32 -0
- package/dart/pubspec.yaml +1 -1
- package/package.json +1 -1
package/dart/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 0.23.0
|
|
2
|
+
|
|
3
|
+
- `NomosBridge.shareWith` — one-call cross-custody share (sign quote + deliver recordShare to the subjects home). Closes the shared-with-me loop.
|
|
4
|
+
|
|
1
5
|
## 0.22.0
|
|
2
6
|
|
|
3
7
|
- `NomosBridge.offerIntent` (canonical write verb; `offerDirective` kept as alias) + one-call `NomosBridge.createWorkspace` (sign + relay a control-plane offer).
|
|
@@ -458,6 +458,38 @@ class NomosBridge {
|
|
|
458
458
|
return (r['verdict'] as Map?)?.cast<String, Object?>() ?? r;
|
|
459
459
|
}
|
|
460
460
|
|
|
461
|
+
/// SHARE a workspace/record with a user — the one-call cross-custody grant that lands in their home's
|
|
462
|
+
/// "shared-with-me" list. This holon signs a quote `<asserterWorkspace>:<object>#<relation>@<subject>` with
|
|
463
|
+
/// [authorSecret] (the asserting owner's device key — the signature IS the grant) and delivers a
|
|
464
|
+
/// `recordShare` to the subject's home; the home's gate verifies it (no key needed there). Live authority
|
|
465
|
+
/// stays the forward Check on the asserter when the user opens it. Returns the worker verdict; an unborn
|
|
466
|
+
/// home (the user never logged in) comes back `{ok:false, needsHomeBirth:true}`.
|
|
467
|
+
/// `await bridge.shareWith(subject:'user:bob', relation:'editor', authorSecret: key, asserterPrincipal:'user:ada', homeLawHash: h)`.
|
|
468
|
+
Future<Map<String, Object?>> shareWith({
|
|
469
|
+
required String subject,
|
|
470
|
+
required String relation,
|
|
471
|
+
required String authorSecret,
|
|
472
|
+
required String asserterPrincipal,
|
|
473
|
+
required String homeLawHash,
|
|
474
|
+
String object = 'workspace:self',
|
|
475
|
+
String? asserterWorkspace,
|
|
476
|
+
String? attestedAt,
|
|
477
|
+
String? authToken,
|
|
478
|
+
}) async {
|
|
479
|
+
final r = _asMap(await _call('shareWith', {
|
|
480
|
+
'subject': subject,
|
|
481
|
+
'relation': relation,
|
|
482
|
+
'authorSecret': authorSecret,
|
|
483
|
+
'asserterPrincipal': asserterPrincipal,
|
|
484
|
+
'homeLawHash': homeLawHash,
|
|
485
|
+
'object': object,
|
|
486
|
+
if (asserterWorkspace != null) 'asserterWorkspace': asserterWorkspace,
|
|
487
|
+
if (attestedAt != null) 'attestedAt': attestedAt,
|
|
488
|
+
if (authToken != null) 'authToken': authToken,
|
|
489
|
+
}));
|
|
490
|
+
return (r['verdict'] as Map?)?.cast<String, Object?>() ?? r;
|
|
491
|
+
}
|
|
492
|
+
|
|
461
493
|
Future<Map<String, Object?>> undoMostRecent({
|
|
462
494
|
String scope = 'all',
|
|
463
495
|
List<String>? actions,
|
package/dart/pubspec.yaml
CHANGED
|
@@ -11,7 +11,7 @@ description: >-
|
|
|
11
11
|
Nomos 2 Dart frontend types — the hand-written kernel wire types plus the
|
|
12
12
|
code-generated per-domain aggregate + directive-payload types. (De)serializes
|
|
13
13
|
the EXACT serde JSON the Rust kernel + projection produce/consume.
|
|
14
|
-
version: 0.
|
|
14
|
+
version: 0.23.0
|
|
15
15
|
|
|
16
16
|
environment:
|
|
17
17
|
sdk: ^3.5.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@githolon/dsl",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Nomos 2 domain-authoring DSL: aggregates + directives in TS, executed and encoded to the Rust kernel's wire shapes.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|