guardian-framework 0.1.110 → 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.
|
|
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,12 +3211,9 @@ var init_package = __esm(() => {
|
|
|
3211
3211
|
}
|
|
3212
3212
|
};
|
|
3213
3213
|
bin = {
|
|
3214
|
-
"guardian-framework": "
|
|
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,19 +3231,13 @@ 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",
|
|
3249
|
-
url: "https://github.com/arman-jalili/guardian-framework"
|
|
3240
|
+
url: "git+https://github.com/arman-jalili/guardian-framework.git"
|
|
3250
3241
|
};
|
|
3251
3242
|
bugs = {
|
|
3252
3243
|
url: "https://github.com/arman-jalili/guardian-framework/issues"
|
|
@@ -11860,7 +11851,21 @@ function parseExplorationResponse(rawResponse, sessionId) {
|
|
|
11860
11851
|
if (jsonMatch) {
|
|
11861
11852
|
cleaned = jsonMatch[1].trim();
|
|
11862
11853
|
}
|
|
11863
|
-
|
|
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
|
+
}
|
|
11864
11869
|
const result = {
|
|
11865
11870
|
sessionId: sessionId ?? parsed.sessionId ?? crypto.randomUUID(),
|
|
11866
11871
|
businessContext: coerceString(parsed.businessContext, ""),
|
|
@@ -11938,6 +11943,33 @@ function parseExplorationResponse(rawResponse, sessionId) {
|
|
|
11938
11943
|
};
|
|
11939
11944
|
}
|
|
11940
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
|
+
}
|
|
11941
11973
|
function coerceString(val, fallback) {
|
|
11942
11974
|
if (typeof val === "string")
|
|
11943
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.
|
|
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,12 +1996,9 @@ var init_package = __esm(() => {
|
|
|
1996
1996
|
}
|
|
1997
1997
|
};
|
|
1998
1998
|
bin = {
|
|
1999
|
-
"guardian-framework": "
|
|
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,19 +2016,13 @@ 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",
|
|
2034
|
-
url: "https://github.com/arman-jalili/guardian-framework"
|
|
2025
|
+
url: "git+https://github.com/arman-jalili/guardian-framework.git"
|
|
2035
2026
|
};
|
|
2036
2027
|
bugs = {
|
|
2037
2028
|
url: "https://github.com/arman-jalili/guardian-framework/issues"
|
|
@@ -12184,7 +12175,21 @@ function parseExplorationResponse(rawResponse, sessionId) {
|
|
|
12184
12175
|
if (jsonMatch) {
|
|
12185
12176
|
cleaned = jsonMatch[1].trim();
|
|
12186
12177
|
}
|
|
12187
|
-
|
|
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
|
+
}
|
|
12188
12193
|
const result = {
|
|
12189
12194
|
sessionId: sessionId ?? parsed.sessionId ?? crypto4.randomUUID(),
|
|
12190
12195
|
businessContext: coerceString(parsed.businessContext, ""),
|
|
@@ -12262,6 +12267,33 @@ function parseExplorationResponse(rawResponse, sessionId) {
|
|
|
12262
12267
|
};
|
|
12263
12268
|
}
|
|
12264
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
|
+
}
|
|
12265
12297
|
function coerceString(val, fallback) {
|
|
12266
12298
|
if (typeof val === "string")
|
|
12267
12299
|
return val;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "guardian-framework",
|
|
3
|
-
"version": "0.1.
|
|
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,12 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
"types": "dist/exports.d.ts",
|
|
14
14
|
"bin": {
|
|
15
|
-
"guardian-framework": "
|
|
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,19 +32,13 @@
|
|
|
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",
|
|
50
|
-
"url": "https://github.com/arman-jalili/guardian-framework"
|
|
41
|
+
"url": "git+https://github.com/arman-jalili/guardian-framework.git"
|
|
51
42
|
},
|
|
52
43
|
"homepage": "https://github.com/arman-jalili/guardian-framework#readme",
|
|
53
44
|
"bugs": {
|
|
File without changes
|