githolon 0.53.0 → 0.54.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.
Files changed (2) hide show
  1. package/dist/cli.mjs +37 -2
  2. package/package.json +3 -3
package/dist/cli.mjs CHANGED
@@ -1326,6 +1326,20 @@ function runCheck(args) {
1326
1326
  const r = spawnSync(process.execPath, [launcher, ...args], { stdio: "inherit", cwd: process.cwd() });
1327
1327
  return r.status ?? 1;
1328
1328
  }
1329
+ function resolveCompatLauncher(cwd) {
1330
+ const launcher = resolveCompileLauncher(cwd);
1331
+ return launcher === void 0 ? void 0 : join4(dirname2(launcher), "compat_package.mjs");
1332
+ }
1333
+ function runCompat(args) {
1334
+ const launcher = resolveCompatLauncher(process.cwd());
1335
+ if (launcher === void 0) {
1336
+ process.stderr.write(`error: ${NO_DSL_REMEDY}
1337
+ `);
1338
+ return 1;
1339
+ }
1340
+ const r = spawnSync(process.execPath, [launcher, ...args], { stdio: "inherit", cwd: process.cwd() });
1341
+ return r.status ?? 1;
1342
+ }
1329
1343
  function resolveLspLauncher(cwd) {
1330
1344
  const launcher = resolveCompileLauncher(cwd);
1331
1345
  return launcher === void 0 ? void 0 : join4(dirname2(launcher), "lsp_server.mjs");
@@ -1943,7 +1957,7 @@ var init_engine = __esm({
1943
1957
  cryptoUnwrapKey = (eng, { secret, hpkeEpk, ct }) => JSON.parse(call(eng.ex, "query", { queryBytes: b64Json({ op: "cryptoUnwrapKey", secret, hpkeEpk, ct }) }, eng.STDERR)).scopeKey;
1944
1958
  count = (eng, ws, countId, groupKey, principal = "") => JSON.parse(call(eng.ex, "query", { repoArg: repoArgOf(ws), workspace: ws, queryBytes: b64Json({ op: "count", countId, groupKey }), principal, branch: BRANCH }, eng.STDERR));
1945
1959
  sum = (eng, ws, sumId, groupKey, principal = "") => JSON.parse(call(eng.ex, "query", { repoArg: repoArgOf(ws), workspace: ws, queryBytes: b64Json({ op: "sum", sumId, groupKey }), principal, branch: BRANCH }, eng.STDERR));
1946
- spatialWithin = (eng, ws, spatialId, bbox, principal = "") => JSON.parse(call(eng.ex, "query", { repoArg: repoArgOf(ws), workspace: ws, queryBytes: b64Json({ op: "spatial", spatialId, minLng: bbox.minLng, minLat: bbox.minLat, maxLng: bbox.maxLng, maxLat: bbox.maxLat }), principal, branch: BRANCH }, eng.STDERR));
1960
+ spatialWithin = (eng, ws, spatialId, bbox, principal = "") => JSON.parse(call(eng.ex, "query", { repoArg: repoArgOf(ws), workspace: ws, queryBytes: b64Json({ op: "spatial", spatialId, minX: bbox.minX ?? bbox.minLng, minY: bbox.minY ?? bbox.minLat, maxX: bbox.maxX ?? bbox.maxLng, maxY: bbox.maxY ?? bbox.maxLat }), principal, branch: BRANCH }, eng.STDERR));
1947
1961
  }
1948
1962
  });
1949
1963
 
@@ -2168,7 +2182,7 @@ async function runOfflineLegs(eng, ws, lawHash, legs, frameworkHash, deployUsda)
2168
2182
  lines.push(`\u2713 declared count ${leg.count.id}(${JSON.stringify(leg.count.group)}) = 1 locally`);
2169
2183
  }
2170
2184
  if (leg.spatial !== void 0) {
2171
- const world = { minLng: -180, minLat: -90, maxLng: 180, maxLat: 90 };
2185
+ const world = { minX: -180, minY: -90, maxX: 180, maxY: 90 };
2172
2186
  const sr = spatialWithin(eng, ws, leg.spatial.id, world);
2173
2187
  const ids = (sr.rows ?? []).map((r) => r.id);
2174
2188
  if (sr.ok === false || createdId === void 0 || !ids.includes(createdId)) {
@@ -4722,6 +4736,21 @@ var HELP = {
4722
4736
  ],
4723
4737
  examples: ["githolon status", "githolon status my-guestbook", "githolon status --target prod"]
4724
4738
  },
4739
+ compat: {
4740
+ usage: "githolon compat <ws-url | deploy.json | interface.json | dir> [--config <cfg>] [--workspace <ws>] [--json]",
4741
+ what: "THE CI GATE (the compat superpower): compare the CURRENT build's structural interface\n(build/<name>.interface.json \u2014 run `githolon compile` first) against a TARGET's installed law,\nPER MEMBER via #72 subtyping. Exits NON-ZERO on any incompatible member, so a client/law\nmismatch is caught before it ships. Target: a deploy.json (its staged .interface is the offer),\nan .interface.json / build dir, or a LIVE workspace URL (connect()s + reads the on-ledger offer).",
4742
+ flags: [
4743
+ ["<target>", "a workspace URL (https://host/v2/workspaces/<ws>), a deploy.json/interface.json, or a dir"],
4744
+ ["--config <cfg>", "the package config naming the current build (default: nomos.package.mjs)"],
4745
+ ["--workspace <ws>", "the workspace name when the live URL is a bare host"],
4746
+ ["--json", "emit { package, target, verdict, members[] } as one JSON line (the CI surface)"]
4747
+ ],
4748
+ examples: [
4749
+ "githolon compat build/guestbook.deploy.json",
4750
+ "githolon compat https://nomos.captainapp.co.uk/v2/workspaces/my-guestbook",
4751
+ "githolon compat ../deployed-law --json"
4752
+ ]
4753
+ },
4725
4754
  generate: {
4726
4755
  usage: "githolon generate <domain|aggregate|intent> <name> [--out <dir>] [--force] [--dry-run]",
4727
4756
  what: "Rails-style scaffolds on @githolon/dsl: a full domain (aggregate + create/mutate directives),\na lone aggregate, or a lone directive. Names arrive in any casing.",
@@ -5333,6 +5362,9 @@ Authoring:
5333
5362
  ./nomos.package.mjs \u2014 the unified report; exits
5334
5363
  non-zero on any REFUSE (compile runs it implicitly).
5335
5364
  --json emits the findings (with file:line) as an array
5365
+ githolon compat <ws-url|deploy.json|dir> [--json] THE CI GATE: compare the current build's interface
5366
+ against a target's installed law, PER MEMBER (#72
5367
+ subtyping); exits non-zero on any incompatible member
5336
5368
  githolon lsp the author-time gate as a stdio Language Server:
5337
5369
  red squiggles while you write law (VS Code/Neovim/\u2026)
5338
5370
  githolon mcp the author-time gate as a stdio MCP server for AI
@@ -5686,6 +5718,9 @@ async function main(argv) {
5686
5718
  if (argv[0] === "check") {
5687
5719
  return runCheck(argv.slice(1));
5688
5720
  }
5721
+ if (argv[0] === "compat") {
5722
+ return runCompat(argv.slice(1));
5723
+ }
5689
5724
  if (argv[0] === "lsp") {
5690
5725
  return runLsp(argv.slice(1));
5691
5726
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "githolon",
3
- "version": "0.53.0",
3
+ "version": "0.54.0",
4
4
  "type": "module",
5
5
  "description": "githolon — the Nomos developer CLI: Rails-style generators for @githolon/dsl domains + the package compiler. Kernel-independent.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@bjorn3/browser_wasi_shim": "0.4.2",
32
- "@githolon/client": "^0.53.0",
33
- "@githolon/dsl": "^0.53.0",
32
+ "@githolon/client": "^0.54.0",
33
+ "@githolon/dsl": "^0.54.0",
34
34
  "isomorphic-git": "^1.38.4"
35
35
  },
36
36
  "devDependencies": {