@githolon/dsl 0.58.0 → 0.58.1
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 +5 -6
- package/dart/pubspec.yaml +1 -1
- package/package.json +1 -1
- package/src/codegen_proof.ts +15 -0
- package/src/law_check.ts +6 -0
package/dart/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 0.37.1
|
|
2
|
+
|
|
3
|
+
- Doc fix: `NomosBridge.attestedRead` docs now match the runtime — the call answers `{ entry: {queryId, result, attestation: …} }`; pass `result['entry']` as one `offerDirective` `attestations` element.
|
|
4
|
+
|
|
1
5
|
## 0.32.0
|
|
2
6
|
|
|
3
7
|
- SPATIAL READS: `NomosBbox` + `NomosBridge.spatialWithin(spatialId, bbox)` + `watchSpatial(...)` — the R*Tree probe surfaces on the bridge; generated clients (tooling ≥0.46) emit typed `sitesByBounds({required NomosBbox bbox})` + watch accessors.
|
|
@@ -1191,14 +1191,13 @@ class NomosBridge {
|
|
|
1191
1191
|
/// ATTESTED READ — serve + SIGN a declared query over a COLOCATED source session's certified fold (the
|
|
1192
1192
|
/// dynamic-source trust lane; architecture/dynamic_source_attested_reads.md). In a [NomosTestHarness.cluster]
|
|
1193
1193
|
/// (one engine plane, many sessions) this fulfils the read IN-PROCESS from the [from] session and returns
|
|
1194
|
-
///
|
|
1195
|
-
/// [offerDirective] `attestations` element, or read
|
|
1196
|
-
/// reader's allow-list. [args] are the
|
|
1197
|
-
/// this view's bound session).
|
|
1194
|
+
/// `{ entry: {queryId, result, attestation:{source_genesis, public_key, …}} }` — pass `result['entry']`
|
|
1195
|
+
/// (the whole entry map) as one [offerDirective] `attestations` element, or read
|
|
1196
|
+
/// `entry['attestation']['source_genesis']` to enrol the source in a reader's allow-list. [args] are the
|
|
1197
|
+
/// query params. [session] is the caller/reader session (defaults to this view's bound session).
|
|
1198
1198
|
/// [attestorSecret] is the source's base64 read-attestor secret (from [authorKeygen]); when omitted the
|
|
1199
1199
|
/// source session's connect-time `authorSecret` signs. [nowMs] stamps the freshness clock (defaults to the
|
|
1200
|
-
/// source's own clock).
|
|
1201
|
-
/// …}}` — pass the whole `entry` as one [offerDirective] `attestations` element.
|
|
1200
|
+
/// source's own clock).
|
|
1202
1201
|
Future<Map<String, Object?>> attestedRead({
|
|
1203
1202
|
required String from,
|
|
1204
1203
|
required String queryId,
|
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.37.
|
|
14
|
+
version: 0.37.1
|
|
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.58.
|
|
3
|
+
"version": "0.58.1",
|
|
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",
|
package/src/codegen_proof.ts
CHANGED
|
@@ -1499,6 +1499,21 @@ export function withBirthProbeGlobals<T>(run: () => T): T {
|
|
|
1499
1499
|
for (let i = 0; i < s.length; i++) { h ^= s.charCodeAt(i); h = Math.imul(h, 16777619) >>> 0; }
|
|
1500
1500
|
return h.toString(16).padStart(8, "0").repeat(8);
|
|
1501
1501
|
},
|
|
1502
|
+
// A read STUB so a plan with a declared read()/read(…, {from}) PROBES cleanly instead of throwing
|
|
1503
|
+
// "nomos.read is not provided" (which twin A would mis-report as a payload-dependent throw with an
|
|
1504
|
+
// "add .reads(…)" hint — misleading for a correctly declared .readsFrom edge). Local reads answer no
|
|
1505
|
+
// rows; foreign reads answer the {rows, attestation} wrapper the read() lane demands. The UNDECLARED
|
|
1506
|
+
// read()/edge cases stay caught by their real gates (the compile lump-marker grep + attestedReadFindings).
|
|
1507
|
+
read: (_q: string, _a: Record<string, string>, o?: { from?: string }) =>
|
|
1508
|
+
o?.from !== undefined && o.from !== ""
|
|
1509
|
+
? {
|
|
1510
|
+
rows: [],
|
|
1511
|
+
attestation: {
|
|
1512
|
+
source_genesis: "probe", source_head: "probe", source_epoch: 0,
|
|
1513
|
+
attested_at_ms: 0, public_key: "", signature: "", result_hash: "",
|
|
1514
|
+
},
|
|
1515
|
+
}
|
|
1516
|
+
: [],
|
|
1502
1517
|
};
|
|
1503
1518
|
// RELATION-NAMESPACING: a probed seed plan may build a relation OBJECT TOKEN (`selfWorkspace()`),
|
|
1504
1519
|
// which qualifies its type by the dispatching domain. The proof generator's STATIC probe reads the
|
package/src/law_check.ts
CHANGED
|
@@ -379,6 +379,12 @@ function unreadPayloadFindings(domain: string, dir: Directive<unknown>, probe: P
|
|
|
379
379
|
const objectFromField = (dir as { requiresRelationGate?: { objectFrom?: { idField?: string } } })
|
|
380
380
|
.requiresRelationGate?.objectFrom?.idField;
|
|
381
381
|
if (typeof objectFromField === "string") gateConsumed.add(objectFromField);
|
|
382
|
+
// A dynamic .readsFrom(fromPayload("<wsField>"), …) edge routes the foreign read by a payload field the
|
|
383
|
+
// ROUTING lane consumes (the plan may pass it straight to read(…, {from}) without a tracked property
|
|
384
|
+
// read on the sampled path) — a declared trust-edge field is never a dead field.
|
|
385
|
+
for (const e of (dir as { declaredForeignReads?: ForeignReadEdge[] }).declaredForeignReads ?? []) {
|
|
386
|
+
if ("fromPayload" in e && typeof e.fromPayload === "string") gateConsumed.add(e.fromPayload);
|
|
387
|
+
}
|
|
382
388
|
const out: Finding[] = [];
|
|
383
389
|
for (const f of requiredPayloadFields(dir.payloadSchema as z.ZodTypeAny)) {
|
|
384
390
|
if (probe.readFields.has(f)) continue;
|