pi-fabric 0.85.0 → 0.86.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-W557PQAC.js → chunk-B7INQVFM.js} +2 -26
- package/dist/chunks/{chunk-W557PQAC.js.map → chunk-B7INQVFM.js.map} +2 -2
- package/dist/entropy/index.js +1 -1
- package/dist/entropy/presentation.d.ts +0 -2
- package/dist/entropy/presentation.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +2 -2
- package/docs/entropy.md +4 -5
- package/package.json +1 -1
|
@@ -1451,8 +1451,6 @@ var compileEntropySurfaceAsync = async (input) => {
|
|
|
1451
1451
|
|
|
1452
1452
|
// src/entropy/presentation.ts
|
|
1453
1453
|
var METRIC_PRECISION = 6;
|
|
1454
|
-
var MAX_APPLIED_DETAILS = 3;
|
|
1455
|
-
var MAX_VALUE_LENGTH = 32;
|
|
1456
1454
|
var ENTROPY_COMMAND_HINTS = [
|
|
1457
1455
|
{
|
|
1458
1456
|
label: "export",
|
|
@@ -1478,22 +1476,6 @@ var formatEntropyCommandHints = () => {
|
|
|
1478
1476
|
(hint, index) => `${heads[index].padEnd(commentColumn)}# ${hint.comment}`
|
|
1479
1477
|
);
|
|
1480
1478
|
};
|
|
1481
|
-
var formatDuration = (elapsedMs) => elapsedMs >= 1e3 ? `${(elapsedMs / 1e3).toFixed(1)}s` : `${Math.max(1, Math.round(elapsedMs))}ms`;
|
|
1482
|
-
var formatValue = (value) => {
|
|
1483
|
-
const rendered = typeof value === "string" ? value.replace(/\s+/gu, " ").trim() || '""' : String(value);
|
|
1484
|
-
return rendered.length <= MAX_VALUE_LENGTH ? rendered : `${rendered.slice(0, MAX_VALUE_LENGTH - 1)}\u2026`;
|
|
1485
|
-
};
|
|
1486
|
-
var formatValues = (values) => `{${values.map(formatValue).join(", ")}}`;
|
|
1487
|
-
var autoProposal = (proposal) => proposal.kind === "enum-tighten" || proposal.kind === "noise-quarantine";
|
|
1488
|
-
var formatApplied = (proposal) => {
|
|
1489
|
-
if (proposal.kind === "enum-tighten") {
|
|
1490
|
-
return `tightened ${proposal.ref}.${proposal.key} to ${formatValues(proposal.values)}`;
|
|
1491
|
-
}
|
|
1492
|
-
if (proposal.kind === "noise-quarantine") {
|
|
1493
|
-
return `hid ${proposal.ref} (${proposal.failed} failed, ${proposal.succeeded} succeeded)`;
|
|
1494
|
-
}
|
|
1495
|
-
return proposal.kind;
|
|
1496
|
-
};
|
|
1497
1479
|
var scoreChange = (before, after) => {
|
|
1498
1480
|
if (before === after) {
|
|
1499
1481
|
return `entropy score unchanged at ${formatEntropyMetric(before)} (lower is better)`;
|
|
@@ -1542,14 +1524,8 @@ var formatEntropyReviewNotice = (proposals) => {
|
|
|
1542
1524
|
return `entropy: ${proposals.length} suggestion${proposals.length === 1 ? "" : "s"} await review${summary ? ` \xB7 ${summary}` : ""} \xB7 inspect with /fabric entropy`;
|
|
1543
1525
|
};
|
|
1544
1526
|
var formatEntropyCompileNotice = (input) => {
|
|
1545
|
-
const applied = input.proposals.filter(autoProposal);
|
|
1546
|
-
const details = applied.slice(0, MAX_APPLIED_DETAILS).map(formatApplied);
|
|
1547
|
-
if (applied.length > MAX_APPLIED_DETAILS) {
|
|
1548
|
-
details.push(`+${applied.length - MAX_APPLIED_DETAILS} more`);
|
|
1549
|
-
}
|
|
1550
|
-
if (details.length === 0) details.push("surface updated");
|
|
1551
1527
|
const review = input.reviewCount ? ` \xB7 ${input.reviewCount} suggestion${input.reviewCount === 1 ? "" : "s"} await review (/fabric entropy)` : "";
|
|
1552
|
-
return `entropy: background optimization complete
|
|
1528
|
+
return `entropy: background optimization complete \xB7 ${scoreChange(input.beforeScore, input.afterScore)} \xB7 safety checks passed${review}`;
|
|
1553
1529
|
};
|
|
1554
1530
|
|
|
1555
1531
|
// src/entropy/corpus.ts
|
|
@@ -2199,4 +2175,4 @@ export {
|
|
|
2199
2175
|
formatEntropyCompileNotice,
|
|
2200
2176
|
runEntropyTrial
|
|
2201
2177
|
};
|
|
2202
|
-
//# sourceMappingURL=chunk-
|
|
2178
|
+
//# sourceMappingURL=chunk-B7INQVFM.js.map
|