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 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 flagged a regression from ${L.by}` : `๐Ÿด Sawbuck flagged a regression`;
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.7",
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('๐Ÿด โ‰ˆ couldn\'t measure: the check ran but your metric is inert (it did not actually run in isolation). Point it at your real test command: `sawbuck init`, or set setup/linkDirs in promptwheel.config.json.');
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
- // profile readout: watching (something to check, incl. zero-config via a test command) vs memory-only
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 seg = caught > 0 ? `๐Ÿด sawbuck ยท ${caught} caught` : armed ? `๐Ÿด sawbuck ยท watching` : `๐Ÿด sawbuck ยท memory`;
212
- process.stdout.write(last ? `${seg} ยท ${last}` : seg);
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;