@crewhaus/ir-passes 0.4.2 → 0.5.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/index.js +7 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -507,7 +507,13 @@ export function memoryIntegrityPass(ir) {
507
507
  // load-bearing cross-field check): the local one enabled, or thredz.
508
508
  if (learning !== undefined) {
509
509
  const wikiOn = memory?.wiki !== undefined && memory.wiki.enabled !== false;
510
- if (!wikiOn && ir.thredz === undefined) {
510
+ // 0.5.0 a crew in per-role fan-out mode has no TOP-LEVEL thredz block
511
+ // (every role carries its own key), but every role does have a hosted
512
+ // wiki. Without this branch such a crew fails the gate with `learning:` on.
513
+ const roleThredzOn = ir.target === "crew" &&
514
+ Array.isArray(ir.roles) &&
515
+ ir.roles.some((r) => r.thredz !== undefined);
516
+ if (!wikiOn && ir.thredz === undefined && !roleThredzOn) {
511
517
  throw new IrPassError("learning needs a wiki to learn into — carry memory.wiki (enabled) or a thredz block on this IR");
512
518
  }
513
519
  if (learning.domain === "") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewhaus/ir-passes",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "description": "Idempotent IR optimization passes (dead-tool-elimination, prompt-cache-prefix-sort, redundant-mcp-server-collapse, permission-rule-canonicalize)",
6
6
  "main": "dist/index.js",
@@ -15,8 +15,8 @@
15
15
  "test": "bun test src"
16
16
  },
17
17
  "dependencies": {
18
- "@crewhaus/errors": "0.4.2",
19
- "@crewhaus/ir": "0.4.2"
18
+ "@crewhaus/errors": "0.5.0",
19
+ "@crewhaus/ir": "0.5.0"
20
20
  },
21
21
  "license": "Apache-2.0",
22
22
  "author": {