pi-fabric 0.80.0 → 0.82.0
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/chunks/{chunk-U3DHW7UQ.js → chunk-HASOI3ST.js} +31 -2
- package/dist/chunks/{chunk-U3DHW7UQ.js.map → chunk-HASOI3ST.js.map} +3 -3
- package/dist/chunks/{chunk-75CLSHZE.js → chunk-JMHSXVO2.js} +2 -2
- package/dist/chunks/{chunk-IITDYSG5.js → chunk-JNACUKKJ.js} +40 -9
- package/dist/chunks/chunk-JNACUKKJ.js.map +7 -0
- package/dist/chunks/{chunk-BUXNRNJC.js → chunk-MQKL5CPF.js} +20 -2
- package/dist/chunks/chunk-MQKL5CPF.js.map +7 -0
- package/dist/chunks/{chunk-6XUQ7MKH.js → chunk-QJF6UH3U.js} +2 -2
- package/dist/chunks/{chunk-W7PLBXJH.js → chunk-ZWU3CSM2.js} +460 -57
- package/dist/chunks/chunk-ZWU3CSM2.js.map +7 -0
- package/dist/chunks/{fabric-runtime-state-EMLV5K2G.js → fabric-runtime-state-JSNEF5GW.js} +6 -6
- package/dist/commands/fabric.d.ts.map +1 -1
- package/dist/core/action-registry.d.ts.map +1 -1
- package/dist/core/action-registry.js +2 -2
- package/dist/entropy/compiled-surface.d.ts +2 -2
- package/dist/entropy/compiled-surface.d.ts.map +1 -1
- package/dist/entropy/compiler.d.ts +5 -1
- package/dist/entropy/compiler.d.ts.map +1 -1
- package/dist/entropy/corpus.d.ts +8 -1
- package/dist/entropy/corpus.d.ts.map +1 -1
- package/dist/entropy/index.d.ts +2 -0
- package/dist/entropy/index.d.ts.map +1 -1
- package/dist/entropy/index.js +33 -3
- package/dist/entropy/passes.d.ts.map +1 -1
- package/dist/entropy/pool-store.d.ts +13 -0
- package/dist/entropy/pool-store.d.ts.map +1 -0
- package/dist/entropy/pool.d.ts +40 -0
- package/dist/entropy/pool.d.ts.map +1 -0
- package/dist/entropy/sessions.d.ts +7 -1
- package/dist/entropy/sessions.d.ts.map +1 -1
- package/dist/entropy/trial.d.ts +2 -1
- package/dist/entropy/trial.d.ts.map +1 -1
- package/dist/entropy/types.d.ts +14 -0
- package/dist/entropy/types.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +73 -7
- package/dist/index.js.map +2 -2
- package/dist/providers/memory-provider.d.ts.map +1 -1
- package/dist/providers/memory-provider.js +1 -1
- package/docs/entropy.md +73 -23
- package/package.json +1 -1
- package/dist/chunks/chunk-BUXNRNJC.js.map +0 -7
- package/dist/chunks/chunk-IITDYSG5.js.map +0 -7
- package/dist/chunks/chunk-W7PLBXJH.js.map +0 -7
- /package/dist/chunks/{chunk-75CLSHZE.js.map → chunk-JMHSXVO2.js.map} +0 -0
- /package/dist/chunks/{chunk-6XUQ7MKH.js.map → chunk-QJF6UH3U.js.map} +0 -0
- /package/dist/chunks/{fabric-runtime-state-EMLV5K2G.js.map → fabric-runtime-state-JSNEF5GW.js.map} +0 -0
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
effectiveSchemaFor,
|
|
10
10
|
isQuarantinedRef,
|
|
11
11
|
quarantinedRefNames
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JNACUKKJ.js";
|
|
13
13
|
import {
|
|
14
14
|
FABRIC_NESTED_TOOL_CALL_ID_PREFIX
|
|
15
15
|
} from "./chunk-HDKEA77S.js";
|
|
@@ -1085,6 +1085,35 @@ var ActionRegistry = class {
|
|
|
1085
1085
|
);
|
|
1086
1086
|
traceOperation?.prepared(catalog.args);
|
|
1087
1087
|
if (catalog.invalid) {
|
|
1088
|
+
const declaredSchema = action.inputSchema;
|
|
1089
|
+
const declaredProperties = typeof declaredSchema === "object" && declaredSchema !== null && !Array.isArray(declaredSchema) && typeof declaredSchema.properties === "object" && declaredSchema.properties !== null ? declaredSchema.properties : void 0;
|
|
1090
|
+
const attemptArgs = {};
|
|
1091
|
+
for (const [key, value2] of Object.entries(catalog.args)) {
|
|
1092
|
+
const property = declaredProperties ? declaredProperties[key] : void 0;
|
|
1093
|
+
const declaredEnum = typeof property === "object" && property !== null ? property.enum : void 0;
|
|
1094
|
+
if (!Array.isArray(declaredEnum)) continue;
|
|
1095
|
+
if (typeof value2 !== "string" && typeof value2 !== "number" && typeof value2 !== "boolean") {
|
|
1096
|
+
continue;
|
|
1097
|
+
}
|
|
1098
|
+
if (String(value2).length > MAX_AUDIT_VALUE_CHARS) continue;
|
|
1099
|
+
if (!declaredEnum.includes(value2)) continue;
|
|
1100
|
+
attemptArgs[key] = value2;
|
|
1101
|
+
}
|
|
1102
|
+
if (Object.keys(attemptArgs).length > 0) {
|
|
1103
|
+
const attempt = {
|
|
1104
|
+
ref,
|
|
1105
|
+
nestedToolCallId: `${NESTED_TOOL_CALL_ID_PREFIX}${randomUUID2()}`,
|
|
1106
|
+
startedAt: Date.now(),
|
|
1107
|
+
tool: action.name,
|
|
1108
|
+
provider: action.provider,
|
|
1109
|
+
args: attemptArgs,
|
|
1110
|
+
success: false,
|
|
1111
|
+
error: `Invalid arguments for ${ref}: ${catalog.invalid}`,
|
|
1112
|
+
endedAt: Date.now(),
|
|
1113
|
+
...resolved.repairedFrom !== void 0 ? { repairedFrom: resolved.repairedFrom } : {}
|
|
1114
|
+
};
|
|
1115
|
+
context.audits.push(attempt);
|
|
1116
|
+
}
|
|
1088
1117
|
throw new FabricTraceSafeError(`Invalid arguments for ${ref}: ${catalog.invalid}`);
|
|
1089
1118
|
}
|
|
1090
1119
|
failureStage = "approve";
|
|
@@ -1561,4 +1590,4 @@ export {
|
|
|
1561
1590
|
NESTED_TOOL_CALL_ID_PREFIX,
|
|
1562
1591
|
ActionRegistry
|
|
1563
1592
|
};
|
|
1564
|
-
//# sourceMappingURL=chunk-
|
|
1593
|
+
//# sourceMappingURL=chunk-HASOI3ST.js.map
|