acstack 0.54.3 → 0.54.4
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "acstack",
|
|
3
3
|
"description": "Agentic coding stack where planning grows only as far as needed: a map of decisions, tasks, checks, and handoffs behind a pluggable tracker.",
|
|
4
|
-
"version": "0.54.
|
|
4
|
+
"version": "0.54.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "ac8318740"
|
|
7
7
|
},
|
package/cli/package.json
CHANGED
package/hooks/lib/read-guard.mjs
CHANGED
|
@@ -124,6 +124,9 @@ export function decide({ toolName, toolInput, cwd, main, ledger, settings }) {
|
|
|
124
124
|
if (!main || !ledger) return { block: false };
|
|
125
125
|
const file = wholeReadTarget(toolName, toolInput, cwd);
|
|
126
126
|
if (!file) return { block: false };
|
|
127
|
+
// Native image reads are attachments; shell readers still dump bytes.
|
|
128
|
+
// shortcut: use image extensions, add content detection if extensionless images need exemption.
|
|
129
|
+
if (String(toolName).toLowerCase() === 'read' && /\.(png|jpe?g|gif|webp|bmp)$/i.test(file)) return { block: false };
|
|
127
130
|
// Resolved only for a whole-file read, since it costs a CLI call.
|
|
128
131
|
settings ??= readGuardSettings(cwd);
|
|
129
132
|
if (!settings.enabled) return { block: false };
|
|
@@ -142,7 +145,7 @@ export function blockMessage(bytes) {
|
|
|
142
145
|
const kb = Math.round(bytes / 1024);
|
|
143
146
|
const tokens = Math.round(bytes / 4 / 1000) * 1000;
|
|
144
147
|
return [
|
|
145
|
-
`This file is ${kb} KB (
|
|
148
|
+
`This file is ${kb} KB (rough text estimate: ${tokens.toLocaleString('en-US')} tokens), and reading all of it is usually unnecessary. Instead:`,
|
|
146
149
|
'',
|
|
147
150
|
'- Search for what you need, then read only that range',
|
|
148
151
|
"- Or hand the question to an investigator, as ACStack's Delegate investigation section describes",
|
package/package.json
CHANGED