sawbuck 0.1.7 โ 0.1.8
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/dispatch.mjs +1 -1
- package/package.json +1 -1
- package/sawbuck.mjs +6 -4
package/dispatch.mjs
CHANGED
|
@@ -22,7 +22,7 @@ const L = rec.latest;
|
|
|
22
22
|
// Attribute the latest catch to the agent that made it (the Claude hook passes 'claude').
|
|
23
23
|
let head;
|
|
24
24
|
if (L && L.kind === 'gamed') head = L.by ? `๐ด Sawbuck caught ${L.by} gaming a metric` : `๐ด Sawbuck caught a gamed change`;
|
|
25
|
-
else if (L && L.kind === 'regression') head = L.by ? `๐ด Sawbuck
|
|
25
|
+
else if (L && L.kind === 'regression') head = L.by ? `๐ด Sawbuck caught a regression from ${L.by}` : `๐ด Sawbuck caught a regression`;
|
|
26
26
|
else head = `๐ด Sawbuck`;
|
|
27
27
|
let line = head;
|
|
28
28
|
if (L) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sawbuck",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Sign your agent to a contract so it does what you want: a deterministic, zero-LLM check that re-proves every win from the agent's source edits alone, so a green that came from editing the test is caught and reverted. A saddle for your coding harness.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/sawbuck.mjs
CHANGED
|
@@ -124,7 +124,7 @@ switch (cmd) {
|
|
|
124
124
|
if (rep.verdict === 'pass') out(`๐ด โ verified: your ${where} change earned it. ${m ? '"' + m.name + '"' : 'The metric'} held, and the source carried the win (it survives a source-only re-run).`);
|
|
125
125
|
else if (rep.verdict === 'gamed') out('๐ด ๐ฉ gamed: a win here came from editing the test, config, or grader, not the source. It does NOT survive a source-only re-run, so it does not count.');
|
|
126
126
|
else if (rep.verdict === 'fail') out(`๐ด โ regression: a guarded metric got worse (${(rep.metrics || []).filter((x) => x.guard && !x.ok).map((x) => x.name).join(', ') || 'a guard'}).`);
|
|
127
|
-
else out('๐ด โ
|
|
127
|
+
else out('๐ด โ inconclusive: the check ran but could not measure your metric (it did not run in isolation). Point it at your real test command: `sawbuck init`, or set setup/linkDirs in promptwheel.config.json.');
|
|
128
128
|
process.exit(code);
|
|
129
129
|
}
|
|
130
130
|
case 'log': {
|
|
@@ -206,10 +206,12 @@ switch (cmd) {
|
|
|
206
206
|
// the last verdict from the activity feed (includes verified passes), so you see it working each turn
|
|
207
207
|
let last = '';
|
|
208
208
|
try { const L = readFileSync(join(repo, '.sawbuck', 'activity.jsonl'), 'utf8').trim().split('\n'); const e = JSON.parse(L[L.length - 1]); last = { verified: 'โ', gamed: '๐ฉ', regression: 'โ', inconclusive: 'โ' }[e.kind] || ''; } catch {}
|
|
209
|
-
//
|
|
209
|
+
// one state model, shared with the Reins band: watching (wired in) / ready (checkable, not wired yet) / memory (history only)
|
|
210
|
+
const active = existsSync(join(repo, '.sawbuck', 'state.json'));
|
|
210
211
|
const armed = existsSync(join(repo, 'promptwheel.config.json')) || existsSync(join(repo, 'package.json'));
|
|
211
|
-
const
|
|
212
|
-
|
|
212
|
+
const mem = existsSync(join(repo, 'LOGBOOK.md')) || existsSync(join(repo, 'events.jsonl'));
|
|
213
|
+
const seg = caught > 0 ? `๐ด sawbuck ยท ${caught} caught` : active ? `๐ด sawbuck ยท watching` : armed ? `๐ด sawbuck ยท ready` : mem ? `๐ด sawbuck ยท memory` : '';
|
|
214
|
+
if (seg) process.stdout.write(last ? `${seg} ยท ${last}` : seg);
|
|
213
215
|
}
|
|
214
216
|
} catch {}
|
|
215
217
|
break;
|