@githolon/testing 0.5.0 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@githolon/testing",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "description": "@githolon/testing — law TDD for Nomos domains: boot the REAL engine plane in-process (the exact machinery every cloud DO, heavy container and web client runs), dispatch directives, assert rows, assert TYPED REFUSALS, fork for what-ifs — fully offline inside vitest.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -1149,6 +1149,15 @@ export function unmount(eng, ws) {
1149
1149
 
1150
1150
  function writeWork(eng, name, bytes) { eng.preopen.dir.contents.set(name, new File(bytes)); }
1151
1151
 
1152
+ /** THE CURRENT LAW PER DOMAIN KEY — the holon's OWN resolution (`refresh_key_map`,
1153
+ * the map the verify walk and every dispatch use: latest Active install per key
1154
+ * by install stamp). Returns `{ "<domainKey>": "<currentHash>", … }`. status uses
1155
+ * THIS instead of re-deriving recency host-side from deploy order. */
1156
+ export function currentLaw(eng, ws) {
1157
+ const out = JSON.parse(call(eng.ex, "current_law", { repoArg: repoArgOf(ws), branch: BRANCH }, eng.STDERR));
1158
+ return out.keyMap || {};
1159
+ }
1160
+
1152
1161
  /** THE EVOLVE DRY-RUN (managed_rollout.md slice 1 — "would this upgrade admit?"):
1153
1162
  * the evolve gate's pure judgment over the mounted workspace's folded state and a
1154
1163
  * CANDIDATE package, without installing. Returns {admits} or {admits:false,