guardian-framework 0.1.130 → 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.
|
|
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
|
".": {
|
|
@@ -3213,10 +3213,7 @@ var init_package = __esm(() => {
|
|
|
3213
3213
|
bin = {
|
|
3214
3214
|
"guardian-framework": "dist/cli.js"
|
|
3215
3215
|
};
|
|
3216
|
-
files = [
|
|
3217
|
-
"dist/",
|
|
3218
|
-
"templates/"
|
|
3219
|
-
];
|
|
3216
|
+
files = ["dist/", "templates/"];
|
|
3220
3217
|
engines = {
|
|
3221
3218
|
bun: ">=1.0.0"
|
|
3222
3219
|
};
|
|
@@ -3234,15 +3231,9 @@ var init_package = __esm(() => {
|
|
|
3234
3231
|
access: "public"
|
|
3235
3232
|
};
|
|
3236
3233
|
pi = {
|
|
3237
|
-
extensions: [
|
|
3238
|
-
|
|
3239
|
-
]
|
|
3240
|
-
skills: [
|
|
3241
|
-
"./templates/pi/skills"
|
|
3242
|
-
],
|
|
3243
|
-
prompts: [
|
|
3244
|
-
"./templates/pi/prompts"
|
|
3245
|
-
]
|
|
3234
|
+
extensions: ["./templates/pi/extensions"],
|
|
3235
|
+
skills: ["./templates/pi/skills"],
|
|
3236
|
+
prompts: ["./templates/pi/prompts"]
|
|
3246
3237
|
};
|
|
3247
3238
|
repository = {
|
|
3248
3239
|
type: "git",
|
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.
|
|
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
|
".": {
|
|
@@ -1998,10 +1998,7 @@ var init_package = __esm(() => {
|
|
|
1998
1998
|
bin = {
|
|
1999
1999
|
"guardian-framework": "dist/cli.js"
|
|
2000
2000
|
};
|
|
2001
|
-
files = [
|
|
2002
|
-
"dist/",
|
|
2003
|
-
"templates/"
|
|
2004
|
-
];
|
|
2001
|
+
files = ["dist/", "templates/"];
|
|
2005
2002
|
engines = {
|
|
2006
2003
|
bun: ">=1.0.0"
|
|
2007
2004
|
};
|
|
@@ -2019,15 +2016,9 @@ var init_package = __esm(() => {
|
|
|
2019
2016
|
access: "public"
|
|
2020
2017
|
};
|
|
2021
2018
|
pi = {
|
|
2022
|
-
extensions: [
|
|
2023
|
-
|
|
2024
|
-
]
|
|
2025
|
-
skills: [
|
|
2026
|
-
"./templates/pi/skills"
|
|
2027
|
-
],
|
|
2028
|
-
prompts: [
|
|
2029
|
-
"./templates/pi/prompts"
|
|
2030
|
-
]
|
|
2019
|
+
extensions: ["./templates/pi/extensions"],
|
|
2020
|
+
skills: ["./templates/pi/skills"],
|
|
2021
|
+
prompts: ["./templates/pi/prompts"]
|
|
2031
2022
|
};
|
|
2032
2023
|
repository = {
|
|
2033
2024
|
type: "git",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "guardian-framework",
|
|
3
|
-
"version": "0.1.
|
|
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",
|
|
@@ -14,10 +14,7 @@
|
|
|
14
14
|
"bin": {
|
|
15
15
|
"guardian-framework": "dist/cli.js"
|
|
16
16
|
},
|
|
17
|
-
"files": [
|
|
18
|
-
"dist/",
|
|
19
|
-
"templates/"
|
|
20
|
-
],
|
|
17
|
+
"files": ["dist/", "templates/"],
|
|
21
18
|
"engines": {
|
|
22
19
|
"bun": ">=1.0.0"
|
|
23
20
|
},
|
|
@@ -35,15 +32,9 @@
|
|
|
35
32
|
"access": "public"
|
|
36
33
|
},
|
|
37
34
|
"pi": {
|
|
38
|
-
"extensions": [
|
|
39
|
-
|
|
40
|
-
]
|
|
41
|
-
"skills": [
|
|
42
|
-
"./templates/pi/skills"
|
|
43
|
-
],
|
|
44
|
-
"prompts": [
|
|
45
|
-
"./templates/pi/prompts"
|
|
46
|
-
]
|
|
35
|
+
"extensions": ["./templates/pi/extensions"],
|
|
36
|
+
"skills": ["./templates/pi/skills"],
|
|
37
|
+
"prompts": ["./templates/pi/prompts"]
|
|
47
38
|
},
|
|
48
39
|
"repository": {
|
|
49
40
|
"type": "git",
|
|
@@ -73,6 +73,15 @@ function readLanguage(cwd: string): string {
|
|
|
73
73
|
return "typescript";
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
// Prefer the PROJECT-LOCAL guardian-framework (node_modules/.bin) over any bare
|
|
77
|
+
// global install. A stale global on PATH (e.g. /opt/homebrew/bin) silently ran an
|
|
78
|
+
// old build without the implemented-module preservation guard and clobbered docs.
|
|
79
|
+
function guardianBin(ctx: ExtensionContext): string {
|
|
80
|
+
const local = path.join(ctx.cwd, "node_modules", ".bin", "guardian-framework");
|
|
81
|
+
if (fs.existsSync(local)) return JSON.stringify(local);
|
|
82
|
+
return "npx --no-install guardian-framework";
|
|
83
|
+
}
|
|
84
|
+
|
|
76
85
|
function shellExec(
|
|
77
86
|
ctx: ExtensionContext,
|
|
78
87
|
command: string,
|
|
@@ -1282,7 +1291,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1282
1291
|
let scaffoldError = "";
|
|
1283
1292
|
|
|
1284
1293
|
try {
|
|
1285
|
-
const cmd = "
|
|
1294
|
+
const cmd = guardianBin(ctx) + " domain scaffold " + sessionId + (forceScaffold ? " --force" : "") + " 2>&1";
|
|
1286
1295
|
const shellResult = await shellExec(ctx, cmd);
|
|
1287
1296
|
if (shellResult.exitCode === 0) {
|
|
1288
1297
|
const outputLines = shellResult.stdout.split("\n");
|
|
@@ -1481,14 +1490,32 @@ export default function (pi: ExtensionAPI) {
|
|
|
1481
1490
|
// session's bounded contexts may be touched, and existing module docs
|
|
1482
1491
|
// are preserved unless --force. Prevents clobbering other streams.
|
|
1483
1492
|
const allModules = fs.readdirSync(modulesDir).filter(f => f.endsWith(".md") && f !== "module-template.md");
|
|
1484
|
-
|
|
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
|
+
};
|
|
1485
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
|
+
};
|
|
1486
1513
|
const sRawPath = path.join(explorationDir, sessionId + ".raw.json");
|
|
1487
1514
|
if (fs.existsSync(sRawPath)) {
|
|
1488
1515
|
try {
|
|
1489
1516
|
const rawS = JSON.parse(fs.readFileSync(sRawPath, "utf-8")) as Record<string, unknown>;
|
|
1490
1517
|
const bcs = Array.isArray(rawS.boundedContexts) ? (rawS.boundedContexts as Record<string, unknown>[]) : [];
|
|
1491
|
-
|
|
1518
|
+
for (const bc of bcs) addModule(String(bc.name ?? ""));
|
|
1492
1519
|
} catch { /* ignore */ }
|
|
1493
1520
|
}
|
|
1494
1521
|
if (sessionModules.length === 0) {
|
|
@@ -1496,11 +1523,10 @@ export default function (pi: ExtensionAPI) {
|
|
|
1496
1523
|
const md = fs.existsSync(sessionPath) ? fs.readFileSync(sessionPath, "utf-8") : "";
|
|
1497
1524
|
const m = md.match(/## Bounded Contexts[\s\S]*?\n((?:\|.*\n)+?)(?=\n##|$)/);
|
|
1498
1525
|
if (m) {
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
.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
|
+
}
|
|
1504
1530
|
}
|
|
1505
1531
|
}
|
|
1506
1532
|
const preserved: string[] = [];
|