guardian-framework 0.1.111 → 0.1.112

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.111", 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.112", 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
  ".": {
@@ -3211,7 +3211,7 @@ var init_package = __esm(() => {
3211
3211
  }
3212
3212
  };
3213
3213
  bin = {
3214
- "guardian-framework": "./dist/cli.js"
3214
+ "guardian-framework": "dist/cli.js"
3215
3215
  };
3216
3216
  files = ["dist/", "templates/"];
3217
3217
  engines = {
@@ -3237,7 +3237,7 @@ var init_package = __esm(() => {
3237
3237
  };
3238
3238
  repository = {
3239
3239
  type: "git",
3240
- url: "https://github.com/arman-jalili/guardian-framework"
3240
+ url: "git+https://github.com/arman-jalili/guardian-framework.git"
3241
3241
  };
3242
3242
  bugs = {
3243
3243
  url: "https://github.com/arman-jalili/guardian-framework/issues"
@@ -11851,7 +11851,21 @@ function parseExplorationResponse(rawResponse, sessionId) {
11851
11851
  if (jsonMatch) {
11852
11852
  cleaned = jsonMatch[1].trim();
11853
11853
  }
11854
- const parsed = JSON.parse(cleaned);
11854
+ let parsed;
11855
+ try {
11856
+ parsed = JSON.parse(cleaned);
11857
+ } catch (err) {
11858
+ if (isTruncatedJson(cleaned)) {
11859
+ return {
11860
+ ok: false,
11861
+ error: "Exploration response was truncated before completion (incomplete JSON). " + "Retry with a higher model output limit, ask the model to continue from " + "exactly where it stopped (parseContinuedExplorationResponse), or split the " + "exploration into phases (strategic model first, then per-core-context enrichment)."
11862
+ };
11863
+ }
11864
+ return {
11865
+ ok: false,
11866
+ error: `Invalid exploration response: ${err instanceof Error ? err.message : String(err)}`
11867
+ };
11868
+ }
11855
11869
  const result = {
11856
11870
  sessionId: sessionId ?? parsed.sessionId ?? crypto.randomUUID(),
11857
11871
  businessContext: coerceString(parsed.businessContext, ""),
@@ -11929,6 +11943,33 @@ function parseExplorationResponse(rawResponse, sessionId) {
11929
11943
  };
11930
11944
  }
11931
11945
  }
11946
+ function isTruncatedJson(text2) {
11947
+ const stack = [];
11948
+ let inString = false;
11949
+ let escaped = false;
11950
+ for (let i2 = 0;i2 < text2.length; i2++) {
11951
+ const ch = text2[i2];
11952
+ if (inString) {
11953
+ if (escaped)
11954
+ escaped = false;
11955
+ else if (ch === "\\")
11956
+ escaped = true;
11957
+ else if (ch === '"')
11958
+ inString = false;
11959
+ continue;
11960
+ }
11961
+ if (ch === '"')
11962
+ inString = true;
11963
+ else if (ch === "{" || ch === "[")
11964
+ stack.push(ch);
11965
+ else if (ch === "}" || ch === "]") {
11966
+ const open = stack.pop();
11967
+ if (ch === "}" && open !== "{" || ch === "]" && open !== "[")
11968
+ return false;
11969
+ }
11970
+ }
11971
+ return inString || stack.length > 0;
11972
+ }
11932
11973
  function coerceString(val, fallback) {
11933
11974
  if (typeof val === "string")
11934
11975
  return val;
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.111", 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.112", 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
  ".": {
@@ -1996,7 +1996,7 @@ var init_package = __esm(() => {
1996
1996
  }
1997
1997
  };
1998
1998
  bin = {
1999
- "guardian-framework": "./dist/cli.js"
1999
+ "guardian-framework": "dist/cli.js"
2000
2000
  };
2001
2001
  files = ["dist/", "templates/"];
2002
2002
  engines = {
@@ -2022,7 +2022,7 @@ var init_package = __esm(() => {
2022
2022
  };
2023
2023
  repository = {
2024
2024
  type: "git",
2025
- url: "https://github.com/arman-jalili/guardian-framework"
2025
+ url: "git+https://github.com/arman-jalili/guardian-framework.git"
2026
2026
  };
2027
2027
  bugs = {
2028
2028
  url: "https://github.com/arman-jalili/guardian-framework/issues"
@@ -12175,7 +12175,21 @@ function parseExplorationResponse(rawResponse, sessionId) {
12175
12175
  if (jsonMatch) {
12176
12176
  cleaned = jsonMatch[1].trim();
12177
12177
  }
12178
- const parsed = JSON.parse(cleaned);
12178
+ let parsed;
12179
+ try {
12180
+ parsed = JSON.parse(cleaned);
12181
+ } catch (err) {
12182
+ if (isTruncatedJson(cleaned)) {
12183
+ return {
12184
+ ok: false,
12185
+ error: "Exploration response was truncated before completion (incomplete JSON). " + "Retry with a higher model output limit, ask the model to continue from " + "exactly where it stopped (parseContinuedExplorationResponse), or split the " + "exploration into phases (strategic model first, then per-core-context enrichment)."
12186
+ };
12187
+ }
12188
+ return {
12189
+ ok: false,
12190
+ error: `Invalid exploration response: ${err instanceof Error ? err.message : String(err)}`
12191
+ };
12192
+ }
12179
12193
  const result = {
12180
12194
  sessionId: sessionId ?? parsed.sessionId ?? crypto4.randomUUID(),
12181
12195
  businessContext: coerceString(parsed.businessContext, ""),
@@ -12253,6 +12267,33 @@ function parseExplorationResponse(rawResponse, sessionId) {
12253
12267
  };
12254
12268
  }
12255
12269
  }
12270
+ function isTruncatedJson(text2) {
12271
+ const stack = [];
12272
+ let inString = false;
12273
+ let escaped = false;
12274
+ for (let i2 = 0;i2 < text2.length; i2++) {
12275
+ const ch = text2[i2];
12276
+ if (inString) {
12277
+ if (escaped)
12278
+ escaped = false;
12279
+ else if (ch === "\\")
12280
+ escaped = true;
12281
+ else if (ch === '"')
12282
+ inString = false;
12283
+ continue;
12284
+ }
12285
+ if (ch === '"')
12286
+ inString = true;
12287
+ else if (ch === "{" || ch === "[")
12288
+ stack.push(ch);
12289
+ else if (ch === "}" || ch === "]") {
12290
+ const open = stack.pop();
12291
+ if (ch === "}" && open !== "{" || ch === "]" && open !== "[")
12292
+ return false;
12293
+ }
12294
+ }
12295
+ return inString || stack.length > 0;
12296
+ }
12256
12297
  function coerceString(val, fallback) {
12257
12298
  if (typeof val === "string")
12258
12299
  return val;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardian-framework",
3
- "version": "0.1.111",
3
+ "version": "0.1.112",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "types": "dist/exports.d.ts",
14
14
  "bin": {
15
- "guardian-framework": "./dist/cli.js"
15
+ "guardian-framework": "dist/cli.js"
16
16
  },
17
17
  "files": ["dist/", "templates/"],
18
18
  "engines": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "repository": {
40
40
  "type": "git",
41
- "url": "https://github.com/arman-jalili/guardian-framework"
41
+ "url": "git+https://github.com/arman-jalili/guardian-framework.git"
42
42
  },
43
43
  "homepage": "https://github.com/arman-jalili/guardian-framework#readme",
44
44
  "bugs": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-09-04T15:30:01Z",
2
+ "timestamp": "2026-09-04T16:02:56Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {