@githolon/dsl 0.102.4 → 0.103.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/compile_package.mjs +43 -2
- package/compile_proof.d.mts +47 -0
- package/compile_proof.mjs +343 -0
- package/dart/CHANGELOG.md +7 -0
- package/dart/lib/src/dev_cloud.dart +8 -8
- package/dart/lib/src/nms_generated_runtime.dart +2 -0
- package/dart/lib/src/runner/node-entry.mjs +5504 -1236
- package/dart/lib/src/runner/offline-install.mjs +4578 -528
- package/dart/lib/src/test_harness.dart +206 -152
- package/dart/lib/src/webview_bridge.dart +196 -89
- package/dart/pubspec.lock +1 -1
- package/dart/pubspec.yaml +2 -2
- package/dart/test/acquire_session_credentials_test.dart +4 -3
- package/dart/test/adv_realm_interference_test.dart +7 -6
- package/dart/test/cloud_bound_topology_test.dart +3 -3
- package/dart/test/cluster_births_test.dart +4 -3
- package/dart/test/cluster_device_keyed_acceptance_test.dart +10 -16
- package/dart/test/cluster_local_autosync_test.dart +3 -2
- package/dart/test/cluster_scale_test.dart +3 -2
- package/dart/test/dlq_session_surface_test.dart +7 -6
- package/dart/test/first_app_gauntlet_test.dart +14 -21
- package/dart/test/fixtures/wedge/fake-install.mjs +1 -1
- package/dart/test/four_layer_nested_topology_test.dart +4 -4
- package/dart/test/harness_phase_timeout_test.dart +2 -2
- package/dart/test/local_sync_inert_test.dart +1 -1
- package/dart/test/parent_signer_recovery_test.dart +2 -2
- package/dart/test/sealing_client_test.dart +4 -3
- package/dart/test/session_bound_test.dart +8 -7
- package/dart/test/test_harness_test.dart +13 -12
- package/dart/test/vo_read_typing_test.dart +4 -3
- package/dart/test/watch_after_offer_stall_test.dart +4 -3
- package/dart/test/webview_bridge_test.dart +102 -5
- package/dart_types/CHANGELOG.md +5 -0
- package/dart_types/lib/nomos_types.dart +9 -0
- package/dart_types/lib/src/nomos_ref.dart +20 -0
- package/dart_types/lib/src/optional_ref.dart +85 -0
- package/dart_types/lib/src/sha256_digest.dart +41 -0
- package/dart_types/lib/src/versioned_nomos_ref.dart +81 -0
- package/dart_types/pubspec.yaml +1 -1
- package/dart_types/test/optional_ref_test.dart +44 -0
- package/dart_types/test/sha256_digest_test.dart +18 -0
- package/package.json +9 -5
- package/runtime/generated-application-host.js +5365 -1105
- package/src/aggregate.ts +18 -0
- package/src/application_composition.ts +6 -32
- package/src/attested_core.ts +6 -3
- package/src/birth_meter.ts +1 -0
- package/src/birth_meter_ensure.ts +28 -2
- package/src/births.ts +1 -1
- package/src/build_package.ts +162 -538
- package/src/business_birth.ts +19 -3
- package/src/canonical_json.ts +21 -0
- package/src/check_package_main.ts +76 -35
- package/src/clear_directive.ts +19 -8
- package/src/codegen_dart.ts +305 -22
- package/src/codegen_dart_application.ts +844 -292
- package/src/codegen_dart_client.ts +1084 -407
- package/src/codegen_dart_scenario.ts +12 -12
- package/src/codegen_proof.ts +169 -39
- package/src/codegen_provider_dart.ts +17 -1
- package/src/codegen_ts.ts +298 -106
- package/src/compat_manifest.ts +2 -2
- package/src/compat_package_main.ts +8 -12
- package/src/compile_package_main.ts +1866 -597
- package/src/compose.ts +1 -1
- package/src/directive.ts +208 -15
- package/src/engine_entry.ts +165 -111
- package/src/evolve_preview.ts +43 -81
- package/src/extremum.ts +1 -1
- package/src/fields.ts +183 -4
- package/src/flow_gate.ts +75 -2
- package/src/framework/application_home.ts +2 -0
- package/src/framework/auth_provider_law.ts +2 -2
- package/src/framework/birth_meter.ts +7 -19
- package/src/framework/bootstrap.ts +0 -2
- package/src/framework/business_corrections.ts +9 -5
- package/src/framework/domain_lifecycle.ts +15 -29
- package/src/framework/encryption_scope.ts +2 -1
- package/src/framework/framework_aggregates.ts +2 -0
- package/src/framework/genesis.ts +16 -14
- package/src/framework/home.ts +20 -14
- package/src/framework/owned_custody.ts +9 -3
- package/src/framework/platform_admin.ts +3 -3
- package/src/framework/relations.ts +21 -13
- package/src/framework/signing_identity.ts +45 -40
- package/src/framework/workspace_invariant.ts +245 -0
- package/src/framework/workspaces.ts +23 -29
- package/src/index.ts +36 -16
- package/src/intent.ts +178 -6
- package/src/law_check.ts +32 -11
- package/src/law_graph.ts +2902 -0
- package/src/law_graph_usda.ts +1799 -0
- package/src/law_identity.ts +435 -0
- package/src/law_value_type.ts +230 -0
- package/src/lsp_server.ts +61 -31
- package/src/ops.ts +7 -0
- package/src/package_config.ts +141 -0
- package/src/package_dependencies.ts +108 -0
- package/src/package_dependency_usage.ts +150 -0
- package/src/package_source_imports.ts +71 -0
- package/src/plan_source_slice.ts +335 -0
- package/src/point_guard.ts +192 -0
- package/src/precondition.ts +44 -9
- package/src/read_projection_namespace.ts +1 -1
- package/src/runtime_zod.ts +44 -0
- package/src/secondary_ensure.ts +67 -14
- package/src/shape_compat.ts +1 -1
- package/src/stable_id_identity_bridge.ts +149 -0
- package/src/stable_id_lockfile.ts +278 -0
- package/src/stable_ids.ts +7 -2
- package/src/stable_ids_for_module.ts +348 -0
- package/src/stable_ids_types.ts +1 -1
- package/src/sum.ts +1 -1
- package/src/usd_state.ts +1 -1
- package/src/usda_relationship_integrity.ts +66 -0
- package/src/usda_text.ts +18 -0
- package/src/usdz.ts +78 -0
- package/src/value_object.ts +95 -0
- package/src/wire.ts +19 -0
- package/src/wire_encode.ts +22 -0
- package/src/workspace_sharding.ts +52 -36
- package/src/workspace_sharing.ts +28 -4
- package/src/zod_introspection.ts +1 -1
- package/dart/test/cluster_attested_test.dart +0 -201
- package/src/compile_engine.ts +0 -595
- package/src/manifest.ts +0 -1476
- package/src/read_projection_composition.ts +0 -117
- package/src/read_projection_manifest.ts +0 -115
- package/src/relation_composition.ts +0 -286
- package/src/usd.ts +0 -1967
- package/src/usd_layers.ts +0 -1776
package/src/compat_manifest.ts
CHANGED
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
export interface NomosCompat {
|
|
10
10
|
/** The package name (`cfg.name`). */
|
|
11
11
|
readonly packageName: string;
|
|
12
|
-
/** The deploy domainHash —
|
|
12
|
+
/** The deploy domainHash — the composed typed USDA closure identity. */
|
|
13
13
|
readonly lawHash: string;
|
|
14
14
|
/** sha256 over the CANONICAL serialization of the package structural interface. */
|
|
15
15
|
readonly interfaceHash: string;
|
|
16
|
-
/** Per domain key → its
|
|
16
|
+
/** Per domain key → its canonical typed USDA layer identity. */
|
|
17
17
|
readonly domains: Record<string, { readonly identityHash?: string }>;
|
|
18
18
|
/** The generator provenance — the `@githolon/dsl` version + this manifest's schema. */
|
|
19
19
|
readonly generator: { readonly dsl: string; readonly schema: number };
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
* REQUIREMENT) against a TARGET's installed law (the workspace OFFER), PER MEMBER, via the #72
|
|
10
10
|
* subtype relation (`memberVerdicts`). Exits NON-ZERO on any incompatible member — so a client/law
|
|
11
11
|
* mismatch is caught in CI, before it ships. The target is:
|
|
12
|
-
* •
|
|
13
|
-
* • an `.interface.json` (or a build/package DIR containing one) — the offer directly;
|
|
12
|
+
* • an `.interface.json` (or a build/package DIR containing one) — the diagnostic offer directly;
|
|
14
13
|
* • a LIVE workspace URL (`https://host/v2/workspaces/<ws>` or `https://host --workspace <ws>`) —
|
|
15
14
|
* connect()s and reads the on-ledger offer (`holon.interfaceOffer()`).
|
|
16
15
|
*
|
|
@@ -42,7 +41,7 @@ function mergeInterfaces(byDomain: InterfaceMap | undefined): DomainInterface {
|
|
|
42
41
|
return out;
|
|
43
42
|
}
|
|
44
43
|
|
|
45
|
-
/** The package name from `nomos.
|
|
44
|
+
/** The package name from `nomos.project.ts` (only field we need — to locate `build/<name>.interface.json`). */
|
|
46
45
|
async function loadPackageName(configArg: string): Promise<{ name: string; dir: string }> {
|
|
47
46
|
const configPath = path.resolve(process.cwd(), configArg);
|
|
48
47
|
if (!existsSync(configPath)) fail(`config not found: ${configPath} (pass the package config, or run from the package dir)`);
|
|
@@ -67,7 +66,7 @@ function loadCurrentInterface(pkgDir: string, name: string): InterfaceMap {
|
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
|
|
70
|
-
/** Read a TARGET offer from
|
|
69
|
+
/** Read a TARGET diagnostic offer from an interface.json / directory. */
|
|
71
70
|
function loadFileOffer(arg: string): { offer: InterfaceMap; source: string } {
|
|
72
71
|
const abs = path.resolve(process.cwd(), arg);
|
|
73
72
|
if (!existsSync(abs)) fail(`target not found: ${abs}`);
|
|
@@ -75,12 +74,11 @@ function loadFileOffer(arg: string): { offer: InterfaceMap; source: string } {
|
|
|
75
74
|
if (statSync(abs).isDirectory()) {
|
|
76
75
|
const scan = (d: string): string | undefined => {
|
|
77
76
|
if (!existsSync(d)) return undefined;
|
|
78
|
-
const hit =
|
|
79
|
-
readdirSync(d).find((f) => f.endsWith(".deploy.json")) ?? readdirSync(d).find((f) => f.endsWith(".interface.json"));
|
|
77
|
+
const hit = readdirSync(d).find((f) => f.endsWith(".interface.json"));
|
|
80
78
|
return hit !== undefined ? path.join(d, hit) : undefined;
|
|
81
79
|
};
|
|
82
80
|
const found = scan(abs) ?? scan(path.join(abs, "build"));
|
|
83
|
-
if (found === undefined) fail(`no *.
|
|
81
|
+
if (found === undefined) fail(`no *.interface.json under ${abs}`);
|
|
84
82
|
file = found;
|
|
85
83
|
}
|
|
86
84
|
let parsed: unknown;
|
|
@@ -89,9 +87,7 @@ function loadFileOffer(arg: string): { offer: InterfaceMap; source: string } {
|
|
|
89
87
|
} catch (e) {
|
|
90
88
|
fail(`could not parse ${file}: ${(e as Error).message}`);
|
|
91
89
|
}
|
|
92
|
-
const
|
|
93
|
-
// A deploy.json carries `{ …, interface }`; a bare interface.json IS the {[domain]: interface} map.
|
|
94
|
-
const offer = (p.interface !== undefined ? p.interface : p) as InterfaceMap;
|
|
90
|
+
const offer = parsed as InterfaceMap;
|
|
95
91
|
if (offer === null || typeof offer !== "object") fail(`target ${file} carries no structural interface`);
|
|
96
92
|
return { offer, source: file };
|
|
97
93
|
}
|
|
@@ -153,13 +149,13 @@ async function main(): Promise<void> {
|
|
|
153
149
|
return inline?.slice(name.length + 1);
|
|
154
150
|
};
|
|
155
151
|
const asJson = argv.includes("--json");
|
|
156
|
-
const configArg = flagVal("--config") ?? "nomos.
|
|
152
|
+
const configArg = flagVal("--config") ?? "nomos.project.ts";
|
|
157
153
|
const workspaceFlag = flagVal("--workspace");
|
|
158
154
|
const domainFlag = flagVal("--domain");
|
|
159
155
|
// The positional target = the first non-flag arg that isn't a flag VALUE.
|
|
160
156
|
const flagsWithVals = new Set(["--config", "--workspace", "--domain"]);
|
|
161
157
|
const target = argv.find((a, i) => !a.startsWith("--") && !(i > 0 && flagsWithVals.has(argv[i - 1]!)));
|
|
162
|
-
if (!target) fail(`usage: githolon compat <workspace-url |
|
|
158
|
+
if (!target) fail(`usage: githolon compat <workspace-url | interface.json | dir> [--config <cfg>] [--workspace <ws>] [--domain <name,...>] [--json]`);
|
|
163
159
|
|
|
164
160
|
const { name, dir } = await loadPackageName(configArg);
|
|
165
161
|
const allCurrent = loadCurrentInterface(dir, name);
|