@nekzus/liop 2.4.0 → 2.4.1
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/bin/agent.js +1 -1
- package/dist/bridge.js +1 -1
- package/dist/{chunk-UBOQZVV5.js → chunk-DPW7RMAS.js} +18 -8
- package/dist/chunk-DPW7RMAS.js.map +1 -0
- package/dist/{chunk-4LQPDN3W.js → chunk-OLG56LGQ.js} +2 -2
- package/dist/{chunk-4LQPDN3W.js.map → chunk-OLG56LGQ.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/server.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-UBOQZVV5.js.map +0 -1
package/dist/bin/agent.js
CHANGED
package/dist/bridge.js
CHANGED
|
@@ -3363,7 +3363,7 @@ Data structure: ${schemaDigest}. Full schema: resource ${uri}. Guidelines: resou
|
|
|
3363
3363
|
resetFieldBudget(clientId, toolName) {
|
|
3364
3364
|
if (clientId === "__proto__" || clientId === "constructor" || clientId === "prototype" || toolName && (toolName === "__proto__" || toolName === "constructor" || toolName === "prototype")) {
|
|
3365
3365
|
log.warn(
|
|
3366
|
-
`[LiopServer]
|
|
3366
|
+
`[LiopServer] Rejected resetFieldBudget for unsafe clientId/toolName: ${clientId}`
|
|
3367
3367
|
);
|
|
3368
3368
|
return;
|
|
3369
3369
|
}
|
|
@@ -3380,10 +3380,10 @@ Data structure: ${schemaDigest}. Full schema: resource ${uri}. Guidelines: resou
|
|
|
3380
3380
|
try {
|
|
3381
3381
|
this.executeWithBudgetLock(storePath, (budget) => {
|
|
3382
3382
|
if (toolName) {
|
|
3383
|
-
if (budget[clientId]) {
|
|
3383
|
+
if (Object.hasOwn(budget, clientId) && budget[clientId]) {
|
|
3384
3384
|
delete budget[clientId][toolName];
|
|
3385
3385
|
}
|
|
3386
|
-
} else {
|
|
3386
|
+
} else if (Object.hasOwn(budget, clientId)) {
|
|
3387
3387
|
delete budget[clientId];
|
|
3388
3388
|
}
|
|
3389
3389
|
return { result: void 0, updatedBudget: budget };
|
|
@@ -3401,12 +3401,22 @@ Data structure: ${schemaDigest}. Full schema: resource ${uri}. Guidelines: resou
|
|
|
3401
3401
|
getPersistentBudget(storePath) {
|
|
3402
3402
|
try {
|
|
3403
3403
|
if (!fs2.existsSync(storePath)) {
|
|
3404
|
-
return
|
|
3404
|
+
return /* @__PURE__ */ Object.create(null);
|
|
3405
3405
|
}
|
|
3406
3406
|
const content = fs2.readFileSync(storePath, "utf-8");
|
|
3407
|
-
|
|
3407
|
+
const parsed = JSON.parse(content || "{}");
|
|
3408
|
+
if (parsed && typeof parsed === "object") {
|
|
3409
|
+
const clean = /* @__PURE__ */ Object.create(null);
|
|
3410
|
+
for (const [k, v] of Object.entries(parsed)) {
|
|
3411
|
+
if (k !== "__proto__" && k !== "constructor" && k !== "prototype") {
|
|
3412
|
+
clean[k] = v;
|
|
3413
|
+
}
|
|
3414
|
+
}
|
|
3415
|
+
return clean;
|
|
3416
|
+
}
|
|
3417
|
+
return /* @__PURE__ */ Object.create(null);
|
|
3408
3418
|
} catch {
|
|
3409
|
-
return
|
|
3419
|
+
return /* @__PURE__ */ Object.create(null);
|
|
3410
3420
|
}
|
|
3411
3421
|
}
|
|
3412
3422
|
savePersistentBudget(storePath, budget) {
|
|
@@ -3504,5 +3514,5 @@ Data structure: ${schemaDigest}. Full schema: resource ${uri}. Guidelines: resou
|
|
|
3504
3514
|
};
|
|
3505
3515
|
|
|
3506
3516
|
export { AUTH_DEFAULTS, AuditLogger, GENESIS_HASH, JwtValidator, LiopRpcServer, LiopServer, NerScanner, PII_PATTERNS, PII_PRESETS, PiiScanner, computeEntryHash, createOAuthServer, globalAuditLogger };
|
|
3507
|
-
//# sourceMappingURL=chunk-
|
|
3508
|
-
//# sourceMappingURL=chunk-
|
|
3517
|
+
//# sourceMappingURL=chunk-DPW7RMAS.js.map
|
|
3518
|
+
//# sourceMappingURL=chunk-DPW7RMAS.js.map
|