guardian-framework 0.1.137 → 0.1.138
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
|
@@ -3206,7 +3206,7 @@ __export(exports_package, {
|
|
|
3206
3206
|
bin: () => bin,
|
|
3207
3207
|
author: () => author
|
|
3208
3208
|
});
|
|
3209
|
-
var name = "guardian-framework", version = "0.1.
|
|
3209
|
+
var name = "guardian-framework", version = "0.1.138", 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;
|
|
3210
3210
|
var init_package = __esm(() => {
|
|
3211
3211
|
exports = {
|
|
3212
3212
|
".": {
|
package/dist/exports.js
CHANGED
|
@@ -1991,7 +1991,7 @@ __export(exports_package, {
|
|
|
1991
1991
|
bin: () => bin,
|
|
1992
1992
|
author: () => author
|
|
1993
1993
|
});
|
|
1994
|
-
var name = "guardian-framework", version = "0.1.
|
|
1994
|
+
var name = "guardian-framework", version = "0.1.138", 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;
|
|
1995
1995
|
var init_package = __esm(() => {
|
|
1996
1996
|
exports = {
|
|
1997
1997
|
".": {
|
package/package.json
CHANGED
|
@@ -262,8 +262,18 @@ function nextPhaseDecision(raw: Record<string, unknown>): { kind: PhaseKind; con
|
|
|
262
262
|
const bcs = Array.isArray(raw.boundedContexts) ? (raw.boundedContexts as Record<string, unknown>[]) : [];
|
|
263
263
|
if (bcs.length === 0) return { kind: "strategic" };
|
|
264
264
|
const prog = (raw.protocolProgress as Record<string, unknown>) ?? {};
|
|
265
|
-
|
|
266
|
-
|
|
265
|
+
// Completion is flag-based when the model sets the flags, and INFERRED from
|
|
266
|
+
// content otherwise — the restored full protocol (self-sequencing, 0.1.137)
|
|
267
|
+
// does not emit requirementsComplete/usecasesComplete. Without this the
|
|
268
|
+
// driver would keep nudging phases the model already finished.
|
|
269
|
+
const frN = Array.isArray(raw.functionalRequirements) ? raw.functionalRequirements.length : 0;
|
|
270
|
+
const nfrN = Array.isArray(raw.nonFunctionalRequirements) ? raw.nonFunctionalRequirements.length : 0;
|
|
271
|
+
const appN = Array.isArray(raw.applicationServices) ? raw.applicationServices.length : 0;
|
|
272
|
+
const entN = Array.isArray(raw.entities) ? raw.entities.length : 0;
|
|
273
|
+
const requirementsDone = prog.requirementsComplete === true || (frN > 0 && nfrN > 0);
|
|
274
|
+
const usecasesDone = prog.usecasesComplete === true || appN > 0;
|
|
275
|
+
if (!requirementsDone) return { kind: "requirements" };
|
|
276
|
+
if (!usecasesDone) return { kind: "usecases" };
|
|
267
277
|
// Per-context tactical passes for every non-supporting/generic context that is
|
|
268
278
|
// not yet enriched (all strategic-listed entities present or any entity saved).
|
|
269
279
|
const supporting = new Set(bcs
|
|
@@ -282,8 +292,13 @@ function nextPhaseDecision(raw: Record<string, unknown>): { kind: PhaseKind; con
|
|
|
282
292
|
const bc = bcs.find((x) => String(x.name ?? "") === name);
|
|
283
293
|
const need = (Array.isArray(bc?.entities) ? (bc!.entities as unknown[]) : []).map(String).filter(Boolean);
|
|
284
294
|
const have = byContext.get(name);
|
|
285
|
-
|
|
286
|
-
|
|
295
|
+
const haveN = have?.size ?? 0;
|
|
296
|
+
// Count-based (strategic names are refined/renamed during the per-context
|
|
297
|
+
// pass, e.g. strategic "Evidence" -> saved "EvidenceItem"), so name-strict
|
|
298
|
+
// matching would loop. Multi-batch: a context with 12 strategic entities
|
|
299
|
+
// and 6 saved is NOT enriched yet — the driver nudges to continue it.
|
|
300
|
+
if (need.length > 0) return haveN >= need.length;
|
|
301
|
+
return haveN > 0 || (Array.isArray(bc?.invariants) && (bc!.invariants as unknown[]).length > 0);
|
|
287
302
|
};
|
|
288
303
|
for (const bc of bcs) {
|
|
289
304
|
const name = String(bc.name ?? "");
|