guardian-framework 0.1.131 → 0.1.132

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/dist/cli.js CHANGED
@@ -3202,7 +3202,7 @@ __export(exports_package, {
3202
3202
  bin: () => bin,
3203
3203
  author: () => author
3204
3204
  });
3205
- var name = "guardian-framework", version = "0.1.131", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
3205
+ var name = "guardian-framework", version = "0.1.132", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
3206
3206
  var init_package = __esm(() => {
3207
3207
  exports = {
3208
3208
  ".": {
package/dist/exports.js CHANGED
@@ -1987,7 +1987,7 @@ __export(exports_package, {
1987
1987
  bin: () => bin,
1988
1988
  author: () => author
1989
1989
  });
1990
- var name = "guardian-framework", version = "0.1.131", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
1990
+ var name = "guardian-framework", version = "0.1.132", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
1991
1991
  var init_package = __esm(() => {
1992
1992
  exports = {
1993
1993
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardian-framework",
3
- "version": "0.1.131",
3
+ "version": "0.1.132",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -1490,14 +1490,32 @@ export default function (pi: ExtensionAPI) {
1490
1490
  // session's bounded contexts may be touched, and existing module docs
1491
1491
  // are preserved unless --force. Prevents clobbering other streams.
1492
1492
  const allModules = fs.readdirSync(modulesDir).filter(f => f.endsWith(".md") && f !== "module-template.md");
1493
- const kebab = (n: string) => n.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
1493
+ // Match a bounded-context name to its module doc by NORMALIZED name
1494
+ // (ignoring case and all separators) — camelCase contexts ("IntentCapture")
1495
+ // scaffold to hyphenated files ("intent-capture.md"); naive kebab of a
1496
+ // camelCase name yields "intentcapture.md" and matches nothing.
1497
+ const norm = (n: string) => n.toLowerCase().replace(/[^a-z0-9]/g, "");
1498
+ const moduleFileFor = (name: string): string => {
1499
+ const wanted = norm(name);
1500
+ const hit = allModules.find((f) => norm(f.replace(/\.md$/, "")) === wanted);
1501
+ if (hit) return hit;
1502
+ const kebabbed = name.trim().replace(/([a-z0-9])([A-Z])/g, "$1-$2")
1503
+ .replace(/[\s_]+/g, "-").toLowerCase().replace(/[^a-z0-9-]+/g, "").replace(/-+/g, "-").replace(/(^-|-$)/g, "");
1504
+ return kebabbed ? kebabbed + ".md" : "";
1505
+ };
1494
1506
  let sessionModules: string[] = [];
1507
+ const seenFiles = new Set<string>();
1508
+ const addModule = (n: string) => {
1509
+ if (!n) return;
1510
+ const f = moduleFileFor(n);
1511
+ if (f && !seenFiles.has(f)) { seenFiles.add(f); sessionModules.push(f); }
1512
+ };
1495
1513
  const sRawPath = path.join(explorationDir, sessionId + ".raw.json");
1496
1514
  if (fs.existsSync(sRawPath)) {
1497
1515
  try {
1498
1516
  const rawS = JSON.parse(fs.readFileSync(sRawPath, "utf-8")) as Record<string, unknown>;
1499
1517
  const bcs = Array.isArray(rawS.boundedContexts) ? (rawS.boundedContexts as Record<string, unknown>[]) : [];
1500
- sessionModules = bcs.map((bc) => kebab(String(bc.name ?? "")) + ".md").filter((n) => allModules.includes(n));
1518
+ for (const bc of bcs) addModule(String(bc.name ?? ""));
1501
1519
  } catch { /* ignore */ }
1502
1520
  }
1503
1521
  if (sessionModules.length === 0) {
@@ -1505,11 +1523,10 @@ export default function (pi: ExtensionAPI) {
1505
1523
  const md = fs.existsSync(sessionPath) ? fs.readFileSync(sessionPath, "utf-8") : "";
1506
1524
  const m = md.match(/## Bounded Contexts[\s\S]*?\n((?:\|.*\n)+?)(?=\n##|$)/);
1507
1525
  if (m) {
1508
- sessionModules = m[1].split("\n")
1509
- .map((l) => l.split("|").map((c) => c.trim()).filter(Boolean)[0])
1510
- .filter(Boolean)
1511
- .map((n) => kebab(n) + ".md")
1512
- .filter((n) => allModules.includes(n));
1526
+ for (const line of m[1].split("\n")) {
1527
+ const cell = line.split("|").map((c) => c.trim()).filter(Boolean)[0];
1528
+ if (cell) addModule(cell);
1529
+ }
1513
1530
  }
1514
1531
  }
1515
1532
  const preserved: string[] = [];
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-09-06T15:38:53Z",
2
+ "timestamp": "2026-09-06T15:49:30Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {