acp-kernel 0.0.68 → 0.0.69-pr.279.142
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/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/report.d.ts +9 -0
- package/dist/report.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3502,7 +3502,7 @@ function buildStatusReport(state, messages, countTokens, options = {}) {
|
|
|
3502
3502
|
const limit = options.limit ?? 30;
|
|
3503
3503
|
const activeBlocks2 = state.blocks.filter((b) => b.active).sort((a, b) => numericPart2(a.blockId) - numericPart2(b.blockId));
|
|
3504
3504
|
if (scope === "compressed") {
|
|
3505
|
-
return renderCompressedDrilldown(activeBlocks2, state, sort, limit, countTokens);
|
|
3505
|
+
return renderCompressedDrilldown(activeBlocks2, state, sort, limit, countTokens, options.meta);
|
|
3506
3506
|
}
|
|
3507
3507
|
const { visible, summaryTokens } = collectVisible(messages, state, countTokens);
|
|
3508
3508
|
if (scope === "uncompressed") {
|
|
@@ -3511,10 +3511,20 @@ function buildStatusReport(state, messages, countTokens, options = {}) {
|
|
|
3511
3511
|
}
|
|
3512
3512
|
return renderUncompressedRanges(visible);
|
|
3513
3513
|
}
|
|
3514
|
-
return renderOverview(visible, summaryTokens, activeBlocks2, state, countTokens, limit);
|
|
3514
|
+
return renderOverview(visible, summaryTokens, activeBlocks2, state, countTokens, limit, options.meta);
|
|
3515
3515
|
}
|
|
3516
|
-
function
|
|
3516
|
+
function surfaceLine(meta) {
|
|
3517
|
+
if (!meta) return null;
|
|
3518
|
+
const parts = [];
|
|
3519
|
+
if (meta.pack) parts.push(`pack=${meta.pack}${meta.packVersion ? ` v${meta.packVersion}` : ""}`);
|
|
3520
|
+
if (meta.host) parts.push(`host=${meta.host}`);
|
|
3521
|
+
if (parts.length === 0) return null;
|
|
3522
|
+
return `ACTIVE SURFACE: ${parts.join(" | ")}`;
|
|
3523
|
+
}
|
|
3524
|
+
function renderOverview(visible, summaryTokens, blocks, state, countTokens, limit, meta) {
|
|
3517
3525
|
const lines = [];
|
|
3526
|
+
const surface = surfaceLine(meta);
|
|
3527
|
+
if (surface) lines.push(surface);
|
|
3518
3528
|
const toolTypeMap = /* @__PURE__ */ new Map();
|
|
3519
3529
|
for (const message of visible) {
|
|
3520
3530
|
toolTypeMap.set(message.tool, (toolTypeMap.get(message.tool) ?? 0) + message.tokens);
|
|
@@ -3631,7 +3641,7 @@ function renderMessageDrilldown(visible, toolFilter, sort, limit) {
|
|
|
3631
3641
|
}
|
|
3632
3642
|
return lines.join("\n");
|
|
3633
3643
|
}
|
|
3634
|
-
function renderCompressedDrilldown(blocks, state, sort, limit, countTokens) {
|
|
3644
|
+
function renderCompressedDrilldown(blocks, state, sort, limit, countTokens, meta) {
|
|
3635
3645
|
let sorted = [...blocks];
|
|
3636
3646
|
if (sort === "time") sorted.sort((a, b) => a.createdAt - b.createdAt);
|
|
3637
3647
|
else if (sort === "age") sorted.sort((a, b) => b.survivedCount - a.survivedCount);
|
|
@@ -3647,6 +3657,8 @@ function renderCompressedDrilldown(blocks, state, sort, limit, countTokens) {
|
|
|
3647
3657
|
const lines = [
|
|
3648
3658
|
`COMPRESSED \u2014 ${sorted.length} blocks | ${formatTokens2(totalEffective)} original \u2192 ${formatTokens2(totalSummary)} summary`
|
|
3649
3659
|
];
|
|
3660
|
+
const surface = surfaceLine(meta);
|
|
3661
|
+
if (surface) lines.push(surface);
|
|
3650
3662
|
const breakdown = tierBreakdown(sorted, countTokens);
|
|
3651
3663
|
if (breakdown) lines.push(`Tier usage: ${breakdown}`);
|
|
3652
3664
|
lines.push("");
|