@githolon/dsl 0.101.6 → 0.102.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 +13 -0
- package/dart/lib/nomos_client.dart +3 -52
- package/dart/lib/src/dev_cloud.dart +5 -0
- package/dart/lib/src/home.dart +10 -15
- package/dart/lib/src/nms_conformance_runtime.dart +12 -0
- package/dart/lib/src/nms_generated_runtime.dart +29 -0
- package/dart/lib/src/nms_test_environment.dart +8 -0
- package/dart/lib/src/node_runner_transport.dart +56 -18
- package/dart/lib/src/provider.dart +5 -1
- package/dart/lib/src/record_origin.dart +55 -0
- package/dart/lib/src/runner/node-entry.mjs +9105 -0
- package/dart/lib/src/runner/offline-install.mjs +4729 -0
- package/dart/lib/src/session_bound.dart +23 -10
- package/dart/lib/src/source_trust.dart +51 -0
- package/dart/lib/src/test_harness.dart +490 -58
- package/dart/lib/src/webview_bridge.dart +167 -58
- package/dart/lib/src/workspace_name.dart +7 -1
- package/dart/pubspec.lock +3 -3
- package/dart/pubspec.yaml +4 -2
- package/dart/test/acquire_session_credentials_test.dart +34 -17
- package/dart/test/acquire_session_test.dart +109 -24
- package/dart/test/adv_realm_interference_test.dart +227 -99
- package/dart/test/bundle_version_pairing_test.dart +1 -1
- package/dart/test/cloud_bound_topology_test.dart +1 -1
- package/dart/test/cluster_attested_test.dart +52 -35
- package/dart/test/cluster_births_test.dart +5 -2
- package/dart/test/cluster_device_keyed_acceptance_test.dart +5 -2
- package/dart/test/cluster_local_autosync_test.dart +5 -2
- package/dart/test/cluster_scale_test.dart +5 -2
- package/dart/test/compat_test.dart +1 -1
- package/dart/test/dlq_session_surface_test.dart +2 -1
- package/dart/test/errors_test.dart +1 -1
- package/dart/test/first_app_gauntlet_test.dart +78 -51
- package/dart/test/four_layer_nested_topology_test.dart +1 -1
- package/dart/test/harness_phase_timeout_test.dart +1 -1
- package/dart/test/home_parity_test.dart +9 -5
- package/dart/test/local_sync_inert_test.dart +22 -14
- package/dart/test/node_runner_transport_test.dart +9 -5
- package/dart/test/null_slot_test.dart +1 -1
- package/dart/test/parent_signer_recovery_test.dart +5 -2
- package/dart/test/schema_validation_test.dart +1 -1
- package/dart/test/sealing_client_test.dart +2 -1
- package/dart/test/session_bound_test.dart +92 -119
- package/dart/test/stale_bundle_test.dart +1 -1
- package/dart/test/test_harness_test.dart +77 -22
- package/dart/test/vo_read_typing_test.dart +32 -14
- package/dart/test/watch_after_offer_stall_test.dart +2 -1
- package/dart/test/webview_bridge_test.dart +17 -4
- package/dart/test/wire_test.dart +1 -1
- package/dart_types/CHANGELOG.md +8 -0
- package/dart_types/lib/nomos_types.dart +7 -6
- package/dart_types/lib/src/activity.dart +23 -13
- package/dart_types/lib/src/foreign_ref.dart +61 -112
- package/dart_types/lib/src/invitation.dart +96 -0
- package/dart_types/lib/src/nomos_ref.dart +97 -59
- package/dart_types/pubspec.yaml +1 -1
- package/dart_types/test/surfaced_test.dart +125 -19
- package/package.json +7 -3
- package/runtime/generated-application-host.js +8851 -0
- package/src/activity.ts +2 -2
- package/src/aggregate.ts +24 -1
- package/src/application_composition.ts +282 -0
- package/src/application_topology.ts +151 -0
- package/src/attested_core.ts +2 -2
- package/src/authoring_context.ts +9 -0
- package/src/birth_meter_ensure.ts +1 -1
- package/src/births.ts +53 -5
- package/src/build_package.ts +79 -71
- package/src/business_birth.ts +93 -10
- package/src/clear_directive.ts +3 -1
- package/src/codegen_dart.ts +369 -420
- package/src/codegen_dart_application.ts +1508 -0
- package/src/codegen_dart_client.ts +156 -95
- package/src/codegen_dart_scenario.ts +299 -0
- package/src/codegen_openapi.ts +8 -3
- package/src/codegen_proof.ts +1113 -1137
- package/src/codegen_provider_dart.ts +12 -1
- package/src/codegen_ts.ts +1176 -496
- package/src/compat_package_main.ts +22 -10
- package/src/compile_package_main.ts +1536 -337
- package/src/contract.ts +10 -4
- package/src/dart_barrel_guard.ts +5 -1
- package/src/describe_model.ts +13 -5
- package/src/directive.ts +244 -5
- package/src/engine_entry.ts +56 -13
- package/src/engine_javascript.ts +31 -0
- package/src/evolve_preview.ts +3 -12
- package/src/framework/application_home.ts +24 -10
- package/src/framework/capability.ts +15 -1
- package/src/framework/domain_lifecycle.ts +8 -0
- package/src/framework/framework_aggregates.ts +2 -2
- package/src/framework/genesis.ts +11 -1
- package/src/framework/home.ts +178 -75
- package/src/framework/impure_capability.ts +24 -7
- package/src/framework/relations.ts +13 -5
- package/src/framework/workspaces.ts +13 -12
- package/src/generated_client_names.ts +42 -3
- package/src/idof_lint.ts +65 -13
- package/src/index.ts +46 -12
- package/src/intent.ts +587 -0
- package/src/law_check.ts +64 -16
- package/src/precondition.ts +16 -4
- package/src/read_projection_namespace.ts +2 -7
- package/src/recipient.ts +33 -0
- package/src/relation_schema.ts +93 -0
- package/src/secondary_ensure.ts +11 -2
- package/src/shape_compat.ts +11 -1
- package/src/usd.ts +30 -8
- package/src/usd_layers.ts +447 -246
- package/src/usd_state.ts +1 -1
- package/src/value_object.ts +49 -13
- package/src/wire_encode.ts +124 -26
- package/src/workspace_sharing.ts +269 -0
- package/src/zod_introspection.ts +84 -0
- package/dart/example/nomos_secure_key_store.dart +0 -82
- package/dart/example/nomos_webview_transport.dart +0 -63
- package/dart/lib/nomos_headless.dart +0 -50
- package/dart/lib/testing.dart +0 -14
- package/dart/test/co2_product_gauntlet_test.dart +0 -244
- package/src/framework/identity.ts +0 -537
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// wasm32-wasip1 artifact. If a file isn't this / hosting this / authoring for this / proving this — it's gone.
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* `githolon compat <target> [--config …] [--json]` — THE CI GATE (task #31, the compat superpower).
|
|
6
|
+
* `githolon compat <target> [--config …] [--domain …] [--json]` — THE CI GATE (task #31, the compat superpower).
|
|
7
7
|
*
|
|
8
8
|
* Compares the CURRENT build's structural interface (`build/<name>.interface.json`, the client's
|
|
9
9
|
* REQUIREMENT) against a TARGET's installed law (the workspace OFFER), PER MEMBER, via the #72
|
|
@@ -96,7 +96,7 @@ function loadFileOffer(arg: string): { offer: InterfaceMap; source: string } {
|
|
|
96
96
|
return { offer, source: file };
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
/** Read a LIVE workspace's on-ledger offer
|
|
99
|
+
/** Read a LIVE workspace's on-ledger offer through the compiler-private runtime bundled with the DSL. */
|
|
100
100
|
/**
|
|
101
101
|
* Parse a live compat target URL into its cloud BASE and workspace. The base is everything BEFORE
|
|
102
102
|
* `/v2/workspaces/` — NOT just the origin — so a gateway mounted under a PATH PREFIX
|
|
@@ -121,14 +121,18 @@ async function loadLiveOffer(url: string, workspaceFlag?: string): Promise<{ off
|
|
|
121
121
|
if (!/^https?:\/\//.test(url)) fail(`could not parse the live target URL: ${url}`);
|
|
122
122
|
const { cloud, workspace } = parseLiveTarget(url, workspaceFlag);
|
|
123
123
|
if (!workspace) fail(`live target needs a workspace — use https://host/v2/workspaces/<ws> or add --workspace <ws>`);
|
|
124
|
-
let
|
|
124
|
+
let read: (cloud: string, workspace: string) => Promise<Record<string, unknown> | null>;
|
|
125
125
|
try {
|
|
126
|
-
|
|
126
|
+
const dynamicImport = Function("specifier", "return import(specifier)") as (specifier: string) => Promise<unknown>;
|
|
127
|
+
const runtime = await dynamicImport(new URL("../runtime/generated-application-host.js", import.meta.url).href) as {
|
|
128
|
+
nomosInternalReadWorkspaceInterface?: typeof read;
|
|
129
|
+
};
|
|
130
|
+
if (typeof runtime.nomosInternalReadWorkspaceInterface !== "function") throw new Error("operator reader absent");
|
|
131
|
+
read = runtime.nomosInternalReadWorkspaceInterface;
|
|
127
132
|
} catch {
|
|
128
|
-
fail(`live target
|
|
133
|
+
fail(`live target inspection is missing from this @githolon/dsl installation; reinstall the current release`);
|
|
129
134
|
}
|
|
130
|
-
const
|
|
131
|
-
const offer = await holon.interfaceOffer();
|
|
135
|
+
const offer = await read(cloud, workspace) as InterfaceMap | null;
|
|
132
136
|
if (offer === null) fail(`workspace '${workspace}' exposes no on-ledger structural interface (pre-#72e law)`);
|
|
133
137
|
return { offer, source: `${cloud}/v2/workspaces/${workspace}` };
|
|
134
138
|
}
|
|
@@ -151,13 +155,21 @@ async function main(): Promise<void> {
|
|
|
151
155
|
const asJson = argv.includes("--json");
|
|
152
156
|
const configArg = flagVal("--config") ?? "nomos.package.mjs";
|
|
153
157
|
const workspaceFlag = flagVal("--workspace");
|
|
158
|
+
const domainFlag = flagVal("--domain");
|
|
154
159
|
// The positional target = the first non-flag arg that isn't a flag VALUE.
|
|
155
|
-
const flagsWithVals = new Set(["--config", "--workspace"]);
|
|
160
|
+
const flagsWithVals = new Set(["--config", "--workspace", "--domain"]);
|
|
156
161
|
const target = argv.find((a, i) => !a.startsWith("--") && !(i > 0 && flagsWithVals.has(argv[i - 1]!)));
|
|
157
|
-
if (!target) fail(`usage: githolon compat <workspace-url | deploy.json | interface.json | dir> [--config <cfg>] [--workspace <ws>] [--json]`);
|
|
162
|
+
if (!target) fail(`usage: githolon compat <workspace-url | deploy.json | interface.json | dir> [--config <cfg>] [--workspace <ws>] [--domain <name,...>] [--json]`);
|
|
158
163
|
|
|
159
164
|
const { name, dir } = await loadPackageName(configArg);
|
|
160
|
-
const
|
|
165
|
+
const allCurrent = loadCurrentInterface(dir, name);
|
|
166
|
+
const requestedDomains = domainFlag?.split(",").map((domain) => domain.trim()).filter(Boolean) ?? [];
|
|
167
|
+
for (const domain of requestedDomains) {
|
|
168
|
+
if (allCurrent[domain] === undefined) fail(`current package '${name}' has no domain '${domain}'`);
|
|
169
|
+
}
|
|
170
|
+
const current = requestedDomains.length === 0
|
|
171
|
+
? allCurrent
|
|
172
|
+
: Object.fromEntries(requestedDomains.map((domain) => [domain, allCurrent[domain]!]));
|
|
161
173
|
|
|
162
174
|
const { offer, source } = /^https?:\/\//.test(target)
|
|
163
175
|
? await loadLiveOffer(target, workspaceFlag)
|