@oathe/oathe 0.3.2 → 0.4.1

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.
Files changed (56) hide show
  1. package/README.md +42 -12
  2. package/assets/oathe-hero.png +0 -0
  3. package/bin/node-floor.mjs +16 -0
  4. package/bin/oathe.mjs +78 -134
  5. package/docs/PRIVACY.md +7 -6
  6. package/notch/Oathe Notch.app/Contents/Info.plist +1 -1
  7. package/notch/Oathe Notch.app/Contents/MacOS/OatheNotch +0 -0
  8. package/notch/README.md +33 -18
  9. package/package.json +9 -5
  10. package/plugin/.claude-plugin/plugin.json +2 -2
  11. package/plugin/.cursor-plugin/plugin.json +2 -2
  12. package/plugin/commands/verify.md +6 -5
  13. package/plugin/hooks/heartbeat.mjs +14 -5
  14. package/plugin/hooks/hooks.json +1 -1
  15. package/plugin/hooks/lib.mjs +7 -5
  16. package/plugin/hooks/render-board.mjs +3 -3
  17. package/plugin/skills/oathe-work/SKILL.md +4 -1
  18. package/src/activation.mjs +3 -0
  19. package/src/atif.mjs +182 -348
  20. package/src/board-render.mjs +46 -42
  21. package/src/breach-digest.mjs +183 -0
  22. package/src/config.mjs +15 -3
  23. package/src/context.mjs +1 -1
  24. package/src/doctor.mjs +30 -8
  25. package/src/evidence.mjs +153 -0
  26. package/src/harnesses/catalog.mjs +12 -1
  27. package/src/harnesses/claude-roster.mjs +49 -0
  28. package/src/harnesses/claude-transcript.mjs +174 -0
  29. package/src/harnesses/claude.mjs +35 -2
  30. package/src/harnesses/codex-rollout.mjs +610 -0
  31. package/src/harnesses/codex-roster.mjs +88 -0
  32. package/src/harnesses/codex.mjs +72 -2
  33. package/src/harnesses/cursor.mjs +10 -8
  34. package/src/harnesses/fidelity.mjs +123 -0
  35. package/src/init.mjs +5 -1
  36. package/src/launch-env.mjs +5 -5
  37. package/src/launch.mjs +5 -6
  38. package/src/manifest.mjs +35 -0
  39. package/src/mcp/connection.mjs +9 -7
  40. package/src/mcp/oathe-tools.mjs +135 -75
  41. package/src/node-floor.mjs +44 -0
  42. package/src/notch-frame.mjs +152 -0
  43. package/src/oathe-annotator.mjs +113 -0
  44. package/src/pager.mjs +75 -37
  45. package/src/runtime/provider.mjs +2 -2
  46. package/src/session-host.mjs +1 -1
  47. package/src/sessions.mjs +8 -1
  48. package/src/speaker.mjs +54 -26
  49. package/src/statements.mjs +120 -2
  50. package/src/substrate.mjs +3 -3
  51. package/src/successor.mjs +2 -3
  52. package/src/trace-census.mjs +96 -0
  53. package/src/traces.mjs +98 -6
  54. package/src/uninstall.mjs +4 -1
  55. package/src/verifier.mjs +37 -19
  56. package/assets/oathe-hero.svg +0 -92
package/README.md CHANGED
@@ -2,14 +2,36 @@
2
2
 
3
3
  **Auto save across your harnesses.**
4
4
 
5
- ![Claude Code hits its usage limit mid-fix; Codex opens in the same repo and Oathe resumes the task — progress, statements, and verification target intact.](assets/oathe-hero.svg)
5
+ Make sure your agent actually **DID** what it **SAID.**
6
+ ![Claude Code hits its usage limit mid-fix; Codex opens in the same repo and continues the task — progress, statements, and verification target intact.](assets/oathe-hero.png)
6
7
 
7
- You're mid-refactor in Claude Code when it hits a usage limit. You open Codex and it picks up the same task checkpointed, what's done, what's left, and a test that decides whether it's actually finished. Nothing pasted, nothing retyped, and the new agent doesn't have to take the old agent's word for anything because models are very good at being wrong AND confident.
8
+ You're mid-refactor in Claude Code when it hits a usage limit. You open Codex, say `continue`, and it picks up the same task — what's done, what's left, and a test that decides whether it's actually finished. Nothing pasted, nothing retyped, and the new agent doesn't have to take the old agent's word for anything because models are very good at being wrong AND confident.
8
9
 
9
10
  That's the product. Below is exactly how much of it works today, because a reliability project that overstates its own status would be a joke.
10
11
 
11
12
  [![CI](https://github.com/oathe-ai/oathe/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/oathe-ai/oathe/actions/workflows/ci.yml) [![License](https://img.shields.io/badge/license-Apache--2.0-green.svg)](LICENSE) [![Discord](https://img.shields.io/badge/discord-join-5865F2?logo=discord&logoColor=white)](https://discord.gg/sjrdWEj4W8)
12
13
 
14
+ ## Quickstart
15
+
16
+ ```bash
17
+ npm install -g @oathe/oathe@latest
18
+ oathe init # once per machine, from anywhere: local substrate up (createdb + schema),
19
+ # every detected harness pre-selected — space toggles, Enter installs
20
+
21
+ cd your-project
22
+ claude # a normal session — the board is in it; nothing auto-resumes
23
+ ```
24
+
25
+ Ctrl-C anytime. Open `codex` in the same folder — same board, same claims, other harness.
26
+ When a session dies, the notch's continue reopens the task where it lived in your default
27
+ agent; `oathe claude` is the command it runs, and yours if you want a session tracked as one
28
+ attempt (`--hermetic` for a curated environment). On macOS, init also seats the notch: a quiet glass on the camera housing that
29
+ pulses verdicts and answers a click with the board (`oathe notch --welcome` replays its
30
+ tour).
31
+
32
+ What Oathe reads, stores, and sends: [docs/PRIVACY.md](docs/PRIVACY.md). The full
33
+ technical reference: [docs/PACKAGE.md](docs/PACKAGE.md).
34
+
13
35
  ## What gets saved
14
36
 
15
37
  most harnesses save transcripts today.
@@ -20,24 +42,22 @@ oathe goes up a layer of abstraction:
20
42
  | Saved | Why it matters |
21
43
  | --- | --- |
22
44
  | The task and who owns it | The next agent continues *assigned work*, not the last sentence someone typed |
23
- | Progress and evidence | Finished parts don't get rediscovered by archaeology |
24
- | Side-effect receipts | A payment, deploy, or message that already happened doesn't happen again on retry |
45
+ | Progress and evidence | no grep, proper evidence and agent trajectory analysis to **make sure agents are DOING what they SAY they're doing** |
25
46
  | The definition of done | assigned before agent work starts, so it can't quietly drift |
26
- | A workspace checkpoint | Branch, commit, and work-in-progress bytes survive your session |
27
47
 
28
48
  Model context is a cache. Attention is everything.
29
49
 
30
- If a session dies, oathe compiles a context bundle for the next attempt from saved state. It never pretends to recover an agent's hidden reasoning.
50
+ If a session dies, the task, its statements, and its evidence are still on the board for the next attempt. It never pretends to recover an agent's hidden reasoning.
31
51
 
32
52
  ## How a handoff works
33
53
 
34
54
  ```text
35
55
  task claimed
36
56
  → attempt 1 (Claude Code) works in a scoped workspace
37
- → checkpoint · checkpoint · checkpoint
57
+ → statement · statement · statement
38
58
  → attempt 1 dies (crash, kill, rate limit, closed laptop)
39
59
  → task survives, still owned
40
- → attempt 2 (Codex) gets a compiled bundle + a checkpoint
60
+ → attempt 2 (Codex) picks the task up from the board: objective, statements, evidence
41
61
  → attempt 2 inspects the diff and reruns the test before trusting anything
42
62
  → work completes; the agent files a completion statement + evidence report.
43
63
  → a checker that didn't write the code verifies the agent did exactly what it states
@@ -61,18 +81,28 @@ Two rules carry most of the weight:
61
81
 
62
82
  Honest labels, kept current in [ROADMAP.md](ROADMAP.md):
63
83
 
64
- - **Working:** durable tasks and attempts, death-and-recovery with a freshly compiled briefing, non-author verification, effect receipts (partial).
65
- - **Designed:** workspace checkpoints, the Claude→Codex end-to-end path, teammate handoff, the reliability benchmark, per-harness drift monitors (docs, install, and live lanes — proven on a developer machine against Claude Code, Codex, and Cursor; the scheduled workflows go live with this repository).
84
+ - **Working:** durable tasks and attempts, death-and-recovery (the task survives the session; the next session opens on it), non-author verification, cross-harness handoff (`continue`: same board, same claims, either harness).
85
+ - **Designed:** workspace checkpoints, effect receipts, teammate handoff, the reliability benchmark, per-harness drift monitors (docs, install, and live lanes — proven on a developer machine against Claude Code, Codex, and Cursor; the scheduled workflows run in this repository).
66
86
  - **Planned:** automatic pickup of interrupted work, cloud continuation, third-party conformance.
67
87
 
68
88
  Known limitations are disclosed in the roadmap, including the ones that are semi-embarrassing.
69
89
 
70
- <!-- QUICKSTART: fill from the actual pushed code — real install, real commands, real test run. Do not publish invented commands. -->
71
-
72
90
  ## Under the hood
73
91
 
74
92
  A small runtime plus a Postgres schema that carries the invariants. The database is deliberately load-bearing: the rules that keep work safe (one current attempt per task, receipts before effects, verification before settlement) are enforced where no caller can route around them. Harness adapters are thin; the substrate is strict.
75
93
 
94
+ ## CLI and MCP
95
+
96
+ Claim work in-session through the `oathe_*` tools (or from the terminal):
97
+
98
+ ```bash
99
+ oathe claim fix-login "users can sign in again"
100
+ oathe note fix-login "found the stale token check"
101
+ oathe done fix-login "guard rewritten, test added" src/auth.test.js
102
+ oathe verify fix-login # a NON-author engine judges it from your recorded session traces
103
+ oathe ls # the board; `oathe uninstall` removes exactly what init recorded
104
+ ```
105
+
76
106
  ## Contributing
77
107
 
78
108
  Start with [CONTRIBUTING.md](CONTRIBUTING.md). Substantial changes begin with a design issue. The most valuable first contribution is a reproducible failure-and-recovery scenario — if we claim a failure mode is handled, the repository should prove it.
Binary file
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ // oathe — the floor at the INSTALL door (R-NODE-FLOOR). npm treats `engines` as a warning, so
3
+ // `preinstall` executes the same gate the bin executes: a below-floor runtime never receives
4
+ // an installed package whose first command would refuse it. One declaration (package.json
5
+ // engines.node), read through assertNodeFloor; at or above the floor this says nothing and
6
+ // exits 0. Installs with --ignore-scripts skip it and meet the bin's own door instead.
7
+
8
+ import { assertNodeFloor } from '../src/node-floor.mjs';
9
+ import { buildPaths } from '../src/paths.mjs';
10
+
11
+ try {
12
+ assertNodeFloor({ packageRoot: buildPaths(process.env).packageRoot });
13
+ } catch (e) {
14
+ process.stderr.write(`[${e?.code ?? 'OATHE_NODE_FLOOR'}] ${e?.message ?? e}\n`);
15
+ process.exit(1);
16
+ }
package/bin/oathe.mjs CHANGED
@@ -6,7 +6,7 @@
6
6
  import { parseArgs } from 'node:util';
7
7
 
8
8
  import { isTraceSubjectSql } from '../src/statements.mjs';
9
- import { byName, launchable, projectorFor, verifierCapable } from '../src/harnesses/catalog.mjs';
9
+ import { byName, launchable, verifierCapable } from '../src/harnesses/catalog.mjs';
10
10
 
11
11
  const VERBS = ['init', ...launchable(), 'claim', 'ls', 'note', 'amend', 'done', 'verify', 'trace', 'notch', 'yield', 'config', 'doctor', 'uninstall', 'status', 'version', 'hook', 'mcp'];
12
12
 
@@ -14,7 +14,7 @@ const USAGE = `usage: oathe <verb> [args]
14
14
 
15
15
  verbs:
16
16
  init [--harness a,b] [--yes] bring up the local cell substrate + wire the harnesses you pick
17
- ${launchable().map((name) => ` ${name.padEnd(6)} [--hermetic] [args…] launch interactive ${byName(name).displayName} inside the cage, board attached`).join('\n')}
17
+ ${launchable().map((name) => ` ${name.padEnd(6)} [--hermetic] [args…] ${byName(name).displayName} here as one tracked attempt (what the notch's continue runs; plain ${byName(name).launch.bin} works too)`).join('\n')}
18
18
  claim <task-id> [objective] claim a task (minting it when new — objective required then)
19
19
  ls [--all] this workspace's board (--all: every workspace)
20
20
  note <task-id> <text> [ref] record a progress statement against your active claim
@@ -133,9 +133,10 @@ const handlers = {
133
133
  }
134
134
  // The moment after init (live polish #7): what to do next, coloured only on a TTY.
135
135
  const tty = process.stdout.isTTY === true;
136
- const [B, D, R] = tty ? ['\x1b[1m', '\x1b[2m', '\x1b[0m'] : ['', '', ''];
137
- const [first, ...rest] = launchable();
138
- process.stdout.write(`\n Next: ${B}oathe ${first}${R} ${D}(or ${rest.join(', ')})${R} in any project — the board rides every session.\n`);
136
+ const [B, R] = tty ? ['\x1b[1m', '\x1b[0m'] : ['', ''];
137
+ // The harness itself is the way in — the plugin rides every session (the launcher is the notch's).
138
+ const bins = launchable().map((name) => byName(name).launch.bin);
139
+ process.stdout.write(`\n Next: ${B}${bins.slice(0, -1).join(', ')} or ${bins.at(-1)}${R} in any project — the board rides every session.\n`);
139
140
  summary('init', 'ok');
140
141
  },
141
142
 
@@ -162,7 +163,7 @@ const handlers = {
162
163
  const { ctx, tools } = await toolsForCwd();
163
164
  try {
164
165
  const out = await tools.oathe_claim({ task_id: taskId, objective });
165
- process.stdout.write(`claimed: ${out.task_id} (lease ${out.lease}) — ${out.note}\n`);
166
+ process.stdout.write(`claimed: ${out.task_id} (lease ${out.lease}) — ${out.note}${out.lineage ? ` — spawned under ${out.lineage.parent}` : ''}\n`);
166
167
  summary('claim', 'ok');
167
168
  } finally {
168
169
  await ctx.substrate.close();
@@ -183,6 +184,21 @@ const handlers = {
183
184
  const holder = r.state === 'active' ? `${r.principal_id}, lease until ${r.lease_until}` : (r.state ?? 'open');
184
185
  process.stdout.write(` [${(r.state ?? 'open').padEnd(8)}] ${r.task_id} — ${r.objective} (${holder})\n`);
185
186
  }
187
+ // UX rule 18: the terminal is the uncapped pull — every breached promise on the machine,
188
+ // one line per task or sibling group (a group's children under it), no flag: the models
189
+ // that script the CLI look here when a `+N more` points them at it.
190
+ const [{ Pager }, { WorkspaceRegistry }, { rowLine }, { MACHINE_SCOPE_LABEL }] = await Promise.all([
191
+ import('../src/pager.mjs'), import('../src/registry.mjs'), import('../src/breach-digest.mjs'), import('../src/board-render.mjs'),
192
+ ]);
193
+ const registry = new WorkspaceRegistry({ registryPath: ctx.paths.registryPath });
194
+ const digest = await new Pager({ client: ctx.substrate, identity: ctx.identity, config: ctx.config, registry }).digest();
195
+ if (digest.total > 0) {
196
+ process.stdout.write(`breached (${MACHINE_SCOPE_LABEL}):\n`);
197
+ for (const g of digest.groups) {
198
+ process.stdout.write(` [${g.kind_word}] ${g.task_id} — ${g.objective} (${rowLine(g)} · ${g.home})\n`);
199
+ if (g.group) for (const line of g.detail.split('\n')) process.stdout.write(` ${line}\n`);
200
+ }
201
+ }
186
202
  summary('ls', 'ok');
187
203
  } finally {
188
204
  await ctx.substrate.close();
@@ -288,13 +304,13 @@ const handlers = {
288
304
 
289
305
  async trace(argv) {
290
306
  const { values, positionals } = parseFlags('trace', {
291
- args: argv, options: { out: { type: 'string' } }, allowPositionals: true,
307
+ args: argv, options: { out: { type: 'string' }, pure: { type: 'boolean', default: false } }, allowPositionals: true,
292
308
  });
293
309
  const [taskId] = positionals;
294
- if (!taskId) throw new Error('usage: oathe trace <task-id> [--out <dir>]');
295
- const [{ buildContext }, { workspaceRef }, fs, path] = await Promise.all([
296
- import('../src/context.mjs'), import('../src/workspace.mjs'),
297
- import('node:fs'), import('node:path'),
310
+ if (!taskId) throw new Error('usage: oathe trace <task-id> [--out <dir>] [--pure]');
311
+ const [{ buildContext }, { workspaceRef }, { projectAnnotated }, { projectorFor }, fs, path] = await Promise.all([
312
+ import('../src/context.mjs'), import('../src/workspace.mjs'), import('../src/oathe-annotator.mjs'),
313
+ import('../src/harnesses/catalog.mjs'), import('node:fs'), import('node:path'),
298
314
  ]);
299
315
  const ctx = buildContext({});
300
316
  try {
@@ -315,17 +331,23 @@ const handlers = {
315
331
  const files = traceRows.flatMap((r) => r.evidence_refs);
316
332
  if (files.length === 0) throw new Error(`'${taskId}' has no linked traces — nothing to export`);
317
333
  const trajectories = [];
334
+ // The export is the annotated read with the OBLIGATION stamped on the root — what this
335
+ // trajectory is evidence for, in the annotator's own slot. --pure exports the
336
+ // converter's output alone (no oathe key anywhere): what a Harbor converter could also
337
+ // emit, for a cross-implementation check against their validator and converters.
318
338
  for (const file of files) {
319
- const trajectory = (await projectorFor(file)).project(file);
320
- Object.assign(trajectory.extra.oathe, {
321
- org_id: ctx.identity.orgId,
322
- task_id: taskId,
323
- work_claim_id: claim.work_claim_id,
324
- contract_ref: claim.contract_ref,
325
- workspace: workspaceRef(process.cwd()),
326
- ...(verdicts[0] ? { verdict: verdicts[0] } : {}),
327
- });
328
- trajectories.push(trajectory);
339
+ trajectories.push(values.pure
340
+ ? (await projectorFor(file)).project(file)
341
+ : await projectAnnotated(file, {
342
+ obligation: {
343
+ org_id: ctx.identity.orgId,
344
+ task_id: taskId,
345
+ work_claim_id: claim.work_claim_id,
346
+ contract_ref: claim.contract_ref,
347
+ workspace: workspaceRef(process.cwd()),
348
+ ...(verdicts[0] ? { verdict: verdicts[0] } : {}),
349
+ },
350
+ }));
329
351
  }
330
352
  if (values.out) {
331
353
  fs.mkdirSync(values.out, { recursive: true });
@@ -360,8 +382,8 @@ const handlers = {
360
382
  err.code = 'OATHE_NOTCH_WELCOME_SERVE';
361
383
  throw err;
362
384
  }
363
- const [{ buildContext }, { renderBoard }, { Pager }, { WorkspaceRegistry }, { WIRE_CHANNEL, noticeFor, emit }, { plantWelcome, consumeWelcome }] = await Promise.all([
364
- import('../src/context.mjs'), import('../src/board-render.mjs'),
385
+ const [{ buildContext }, { createOatheTools }, { Pager }, { WorkspaceRegistry }, { WIRE_CHANNEL, noticeFor, emit }, { plantWelcome, consumeWelcome }] = await Promise.all([
386
+ import('../src/context.mjs'), import('../src/mcp/oathe-tools.mjs'),
365
387
  import('../src/pager.mjs'), import('../src/registry.mjs'), import('../src/wire.mjs'),
366
388
  import('../src/welcome.mjs'),
367
389
  ]);
@@ -381,115 +403,32 @@ const handlers = {
381
403
  return;
382
404
  }
383
405
  const registry = new WorkspaceRegistry({ registryPath: ctx.paths.registryPath });
384
- // MOTION (founder ruling, 2026-08-30): a row on the glass means a LIVE session — a claim
385
- // whose last word is younger than notchMotionMinutes, or one the wire just heard (serve
386
- // mode overlays `heard`, ephemeral by design). Idle-held work is `oathe ls`'s business.
387
- const { ownerOfTracePath, surfaceForSession, launchable: launchableNames } = await import('../src/harnesses/catalog.mjs');
388
- const { SessionRegistry, pidAlive } = await import('../src/sessions.mjs');
406
+ const [{ NotchFrame }, { SessionRegistry }, { homeOf }] = await Promise.all([
407
+ import('../src/notch-frame.mjs'), import('../src/sessions.mjs'), import('../src/paths.mjs'),
408
+ ]);
389
409
  const sessionsReg = new SessionRegistry({ sessionsPath: ctx.paths.sessionsPath });
390
- // A broken sessions file costs the frame its session refs, never the frame.
391
- const loadSessions = () => {
392
- try { return sessionsReg.load().sessions; } catch (e) {
393
- process.stderr.write(`oathe notch: sessions ${String(e?.message || e).slice(0, 120)}\n`);
394
- return {};
395
- }
396
- };
397
- const launchables = launchableNames();
398
- const defaultAgent = ctx.config.get('defaultAgent');
399
- const TERMINAL_FALLBACK = '/System/Applications/Utilities/Terminal.app'; // the system terminal — an OS fact
400
- const shellQuote = (s) => `'${String(s).replaceAll("'", "'\\''")}'`;
401
- const heard = new Map(); // task → {at, via}: what the wire heard, ephemeral by design
402
- const motionWindowMs = ctx.config.get('notchMotionMinutes') * 60_000;
403
- const moving = (r) => (heard.get(r.task_id)?.at ?? 0) > Date.now() - motionWindowMs
404
- || (r.last_word_at && Date.parse(r.last_word_at) > Date.now() - motionWindowMs);
405
- // Continue is a RESUMPTION, never a shrug (founder ruling 2026-08-30): activate the
406
- // living app; else spawn the agent at the task's home in a terminal; else open the
407
- // desktop app; else the clipboard is the act. The package decides — the glass executes.
408
- const resumeFor = (base, ref) => {
409
- if (ref?.alive && ref.app_pid !== null && ref.app_pid !== undefined) {
410
- // The bundle rides along: macOS may deny a background app's activate (cooperative
411
- // activation) — opening the bundle is the permission-free fallback that still switches.
412
- return { kind: 'activate', app_pid: ref.app_pid, bundle: ref.bundle ?? null };
413
- }
414
- const surface = ref?.surface ?? base.surface;
415
- const agent = launchables.includes(surface) ? surface
416
- : (launchables.includes(defaultAgent) ? defaultAgent : null);
417
- if (agent && typeof base.home_path === 'string' && base.home_path.startsWith('/')) {
418
- return {
419
- kind: 'spawn-terminal',
420
- command: `oathe ${agent} ${shellQuote(`continue ${base.task_id}`)}`,
421
- cwd: base.home_path,
422
- terminal_bundle: ref?.bundle ?? TERMINAL_FALLBACK,
423
- };
424
- }
425
- if (ref?.bundle) return { kind: 'open-app', bundle: ref.bundle };
426
- return { kind: 'copy-only' };
427
- };
428
- const glassRow = (r, sess) => {
429
- const row = (r.trace_session_id && sess[r.trace_session_id]) || null;
430
- const h = heard.get(r.task_id);
431
- // The durable registry row outranks the wire's ephemeral word; either way the ref
432
- // carries surface + the focusable app, so a HOMELESS task heard from a living app
433
- // (ChatGPT's embedded codex — no hooks, no registry row) still resolves to a switch.
434
- const ref = row !== null ? {
435
- surface: surfaceForSession({ ancestry: row.ancestry, app: row.app, transcriptPath: row.transcript_path }),
436
- app_pid: row.app?.pid ?? null,
437
- bundle: row.app?.bundle ?? null,
438
- alive: pidAlive(row.pid),
439
- } : (h?.app ? {
440
- surface: h.via ?? null,
441
- app_pid: h.app.pid ?? null,
442
- bundle: h.app.bundle ?? null,
443
- alive: h.app.pid !== null && h.app.pid !== undefined && pidAlive(h.app.pid),
444
- } : null);
445
- const base = {
446
- task_id: r.task_id, holder: r.principal_id, state: r.state,
447
- last_word_at: r.last_word_at, last_progress: r.last_progress,
448
- home_path: registry.rootOf(r.home) ?? r.home ?? 'homeless',
449
- // The surface speaking on the claim: the wire's live word wins; the durable fallback
450
- // is the latest trace-link statement's transcript, mapped by its owning store.
451
- surface: heard.get(r.task_id)?.via ?? (r.trace_path ? ownerOfTracePath(r.trace_path) : null),
452
- };
453
- return { ...base, session: ref, resume: resumeFor(base, ref) };
454
- };
455
- // A breach row carries the ONE act that can change its truth (ruling 2026-08-31):
456
- // never-judged (overdue) → dispatch the judgment, DETACHED (closing the window can't
457
- // orphan it); engine-failed (stalled) → retry, same dispatcher; judged-rejected
458
- // (reopened) and gone-quiet → CONTINUE into the work (the reclaim bundle carries the
459
- // verdict — re-judging a judged assertion is the one act that can never help).
460
- // Home is the ONE resolver's answer; a homeless judgment runs from the operator's home.
461
- const { homeOf } = await import('../src/paths.mjs');
462
- const glassBreach = (b) => {
463
- const home = typeof b.home === 'string' && b.home.startsWith('/') ? b.home : null;
464
- let act = { kind: 'copy-only' };
465
- if (b.kind === 'overdue' || b.kind === 'stalled') {
466
- act = { kind: 'spawn-terminal', command: `oathe verify --detach ${shellQuote(b.task_id)}`, cwd: home ?? homeOf(), terminal_bundle: TERMINAL_FALLBACK };
467
- } else if (home !== null && launchables.includes(defaultAgent)) {
468
- act = { kind: 'spawn-terminal', command: `oathe ${defaultAgent} ${shellQuote(`continue ${b.task_id}`)}`, cwd: home, terminal_bundle: TERMINAL_FALLBACK };
469
- }
470
- return { ...b, act };
471
- };
410
+ // The frame (src/notch-frame.mjs) decides what the glass shows and every word of it;
411
+ // this verb fetches and serves. A broken sessions file costs the frame its session
412
+ // refs, never the frame.
413
+ const notchFrame = new NotchFrame({
414
+ registry,
415
+ sessions: () => {
416
+ try { return sessionsReg.load().sessions; } catch (e) {
417
+ process.stderr.write(`oathe notch: sessions ${String(e?.message || e).slice(0, 120)}\n`);
418
+ return {};
419
+ }
420
+ },
421
+ defaultAgent: ctx.config.get('defaultAgent'),
422
+ motionWindowMs: ctx.config.get('notchMotionMinutes') * 60_000,
423
+ operatorHome: homeOf(),
424
+ });
425
+ const pager = new Pager({ client: ctx.substrate, identity: ctx.identity, config: ctx.config, registry });
426
+ // The machine board, classified once by the tools (attention:false — the digest is the
427
+ // frame's own read, and no response channel is served here).
428
+ const tools = createOatheTools({ client: ctx.substrate, identity: ctx.identity, workspace: null, config: ctx.config, attention: false });
472
429
  const frame = async () => {
473
- const breaches = (await new Pager({ client: ctx.substrate, identity: ctx.identity, config: ctx.config, registry }).breaches())
474
- .map(glassBreach);
475
- const { message, sections } = await renderBoard({
476
- client: ctx.substrate, identity: ctx.identity, workspace: null, config: ctx.config, all: true, breaches,
477
- });
478
- const sess = loadSessions();
479
- return {
480
- push: message,
481
- breaches,
482
- // motion = anyone's active claim with a recent word (or heard live on the wire);
483
- // idle = YOUR held claims gone quiet — the sheet shows them after motion, aged.
484
- motion: [...sections.mine, ...sections.held].filter(moving).map((r) => glassRow(r, sess)),
485
- idle: sections.mine.filter((r) => !moving(r)).map((r) => glassRow(r, sess)),
486
- sections,
487
- workspace: null,
488
- // The machine's chosen agent rides every frame — the glass reads no config (the
489
- // welcome ruling generalized: Node owns the words and the facts; the glass plays
490
- // them). null when onboarding never chose one; the empty-board invite goes generic.
491
- default_agent: launchables.includes(defaultAgent) ? defaultAgent : null,
492
- };
430
+ const [digest, { sections }] = await Promise.all([pager.digest(), tools.oathe_board({ all: true })]);
431
+ return notchFrame.build({ digest, sections });
493
432
  };
494
433
  if (!values.serve) {
495
434
  try {
@@ -530,8 +469,7 @@ const handlers = {
530
469
  // A TRANSIENT substrate failure (a Postgres restart, a locked table) must never kill
531
470
  // the feed — the error is a typed stderr note and the next event/heartbeat retries.
532
471
  // A DEAD CONNECTION is fatal-but-clean: exit nonzero; the app's backoff restart is
533
- // the recovery. (An unguarded rejection here used to kill the process with no
534
- // trailer at all — the review's SERVE-CRASH finding.)
472
+ // the recovery.
535
473
  const guarded = (label, fn) => async (...args) => {
536
474
  try {
537
475
  await fn(...args);
@@ -542,7 +480,7 @@ const handlers = {
542
480
  listener.on('notification', guarded('wire frame', async (msg) => {
543
481
  let ev = null;
544
482
  try { ev = JSON.parse(msg.payload); } catch { /* a foreign payload nudges, it does not speak */ }
545
- if (ev?.task_id) heard.set(ev.task_id, { at: Date.now(), via: ev.via ?? null, app: ev.app ?? null }); // the wire IS liveness
483
+ if (ev?.task_id) notchFrame.hear(ev.task_id, { at: Date.now(), via: ev.via ?? null, app: ev.app ?? null }); // the wire IS liveness
546
484
  const f = await serveFrame();
547
485
  // The event's own notice rides the frame it caused — the glass PULSES its tone and
548
486
  // keeps the words for the sheet (never expanding the bar; founder ruling 2026-08-31).
@@ -565,7 +503,8 @@ const handlers = {
565
503
 
566
504
  async yield(argv) {
567
505
  const [taskId, note] = argv;
568
- if (!taskId || !note) throw new Error('usage: oathe yield <task-id> <note>');
506
+ // A missing note is the tool's typed refusal (OATHE_YIELD_NOTE_REQUIRED), one implementation.
507
+ if (!taskId) throw new Error('usage: oathe yield <task-id> <note>');
569
508
  const { ctx, tools } = await toolsForCwd();
570
509
  try {
571
510
  const out = await tools.oathe_yield({ task_id: taskId, note });
@@ -723,6 +662,11 @@ if (!verb || !VERBS.includes(verb)) {
723
662
  process.exit(2);
724
663
  }
725
664
  try {
665
+ // The engines floor, executed at the door (R-NODE-FLOOR): npm only warns on engines, so the
666
+ // bin itself refuses a runtime that cannot read the codex thread index (node:sqlite).
667
+ const [{ assertNodeFloor }, { buildPaths }] = await Promise.all([
668
+ import('../src/node-floor.mjs'), import('../src/paths.mjs')]);
669
+ assertNodeFloor({ packageRoot: buildPaths(process.env).packageRoot });
726
670
  // Launch verbs come from the catalog (every adapter with a `launch` capability), not a handler each.
727
671
  const handler = launchable().includes(verb) ? (argv) => launchHarness(verb, argv) : handlers[verb];
728
672
  await handler(rest);
package/docs/PRIVACY.md CHANGED
@@ -10,8 +10,7 @@ Oathe does not crawl arbitrary files. It reads exactly these declared surfaces:
10
10
  - **Session transcripts** for sessions in workspaces it manages: the turn-end hook projects
11
11
  the current session's own transcript to learn which tasks the session acted on
12
12
  (`plugin/hooks/heartbeat.mjs`), and `oathe verify` / `oathe trace` read the transcript
13
- files linked to a claim. Codex thread indexes are read through `node:sqlite` where the
14
- Node version provides it.
13
+ files linked to a claim. Codex thread indexes are read through `node:sqlite`.
15
14
  - **Harness configuration it manages**: `~/.claude/settings.json` (two owned keys),
16
15
  `~/.codex/config.toml` (via the codex CLI), and `~/.cursor/mcp.json` + `~/.cursor/hooks.json`
17
16
  (owned entries), plus the project's `CLAUDE.md`/`AGENTS.md` fenced sections.
@@ -25,7 +24,9 @@ SessionStart hook (or your first `oathe_claim` there) records the folder in the
25
24
  registry and pins the board's fenced section into that folder's `CLAUDE.md`/`AGENTS.md`,
26
25
  disclosing the write in the session banner. `oathe config autoActivate false --global`
27
26
  turns the file writes off (registration stays); `oathe uninstall` removes every recorded
28
- write. Everything stays on your machine.
27
+ write. On macOS, `oathe init` also materializes the notch app under `~/.oathe/notch/` and
28
+ writes its LaunchAgent (`~/Library/LaunchAgents/ai.oathe.notch.*.plist`); the glass reads
29
+ your local substrate and nothing else. Everything stays on your machine.
29
30
 
30
31
  ## Stores (locally, in YOUR Postgres)
31
32
 
@@ -38,9 +39,9 @@ Exactly one path sends anything anywhere: **`oathe verify`**. It projects the li
38
39
  transcripts into structured trajectories, slices them to the claim's recorded focus
39
40
  intervals where intervals exist (whole-session evidence otherwise), renders a
40
41
  character-budgeted evidence view (SAID/CLAIM/DID/GOT lines — not raw transcript bytes),
41
- and passes that rendering to the verification engine you configured (`claude` or `codex`)
42
- as a command-line prompt. That content therefore reaches the engine's model provider
43
- (Anthropic or OpenAI) under YOUR account and their terms. If you never run `verify`,
42
+ and passes that rendering to the verification engine you configured (`claude`, `codex`, or
43
+ `cursor`) as a command-line prompt. That content therefore reaches the engine's model
44
+ provider (Anthropic, OpenAI, or Cursor) under YOUR account and their terms. If you never run `verify`,
44
45
  nothing leaves your machine. Oathe has no telemetry, no server, and phones home to no one.
45
46
 
46
47
  Two disclosed sharp edges:
@@ -6,7 +6,7 @@
6
6
  <key>CFBundleName</key><string>Oathe Notch</string>
7
7
  <key>CFBundleExecutable</key><string>OatheNotch</string>
8
8
  <key>CFBundlePackageType</key><string>APPL</string>
9
- <key>CFBundleShortVersionString</key><string>0.1.0</string>
9
+ <key>CFBundleShortVersionString</key><string>0.4.1</string>
10
10
  <key>LSMinimumSystemVersion</key><string>14.0</string>
11
11
  <key>LSUIElement</key><true/>
12
12
  </dict>
package/notch/README.md CHANGED
@@ -3,23 +3,29 @@
3
3
  The quiet glass. A macOS island that shows your durable work — and otherwise you
4
4
  shouldn't know it's there.
5
5
 
6
- Three states, nothing else:
6
+ Two geometries, nothing else:
7
7
 
8
8
  - **rest** — literally nothing: dissolved into the MacBook's camera housing, or a
9
- small sliver on external displays. Hover peeks a lock and how many tasks you hold.
10
- - **event** — one pushed line, only when something happened (`🔒 1 unclaimed task
11
- expiring`). Amber persists until seen; receipts show once and fade.
12
- - **open** — click: work in motion. One row per live claim — task, the surface
13
- speaking on it, the age of its last word. A row expands to its last progress and
14
- home, with one act: `continue ↗` (copies `continue <task>`, opens the folder).
15
- The sheet is Liquid Glass on macOS 26, the island's own black before that.
9
+ small sliver on external displays. The lock wears the standing tone (amber while a
10
+ promise is breached or the feed is broken, muted when all is well); an event pulses
11
+ its tone once. Hover peeks the lock and how many tasks you hold.
12
+ - **open** — click: the sheet. Breached promises lead, sharpest first, then work in
13
+ motion — one row per task or sibling group: a name, a state word, an age, and the one
14
+ act that can change its truth (`continue ↗` / `verify ↗` / `retry ↗`). At most eight
15
+ rows; everything past them is one `+N more` line. A row expands to the task card —
16
+ what is owed, where it stands, the last word (whole), where it lives, the act. The
17
+ sheet is Liquid Glass on macOS 26, the island's own black before that.
16
18
 
17
19
  Drag it anywhere; it snaps to the nearest edge of any display and remembers its seat
18
20
  (side docks lie vertical). Right-click: Reset Position, Start at Login, Quit.
19
21
 
20
22
  ## Architecture
21
23
 
22
- The package computes, the notch renders. This app contains **zero business logic**.
24
+ The package computes, the notch renders. This app contains **zero business logic** and
25
+ composes **no sentence**: every word on the glass — kind words, act words, the children
26
+ line, the `+N more` count — rides in the frame from Node (`src/notch-frame.mjs`), and a
27
+ Node test (`tests/notch-frame.test.mjs`) holds the frame to this app's own decoder
28
+ (`Feed.swift`), field by field.
23
29
 
24
30
  ```
25
31
  speech acts (claim · statement · done · yield · pickup · verify)
@@ -29,22 +35,35 @@ speech acts (claim · statement · done · yield · pickup · verify)
29
35
  ▲ LISTEN
30
36
  │
31
37
  `oathe notch --serve` ← the feed: recomputes a frame per event + heartbeat
32
- │ ndjson frames on stdout {push, breaches, motion, idle, sections, receipt?}
38
+ │ ndjson frames on stdout
33
39
  ▼
34
- OatheNotch.app ← this repo: supervises the feed child, renders frames
40
+ OatheNotch.app ← this directory: supervises the feed child, renders frames
35
41
  ```
36
42
 
43
+ A frame carries:
44
+
45
+ | Key | What it is |
46
+ |---|---|
47
+ | `breaches` | the breach digest's rows — sharpest first, at most the sheet's row cap, each with `kind_word`, `objective`, `home`, `detail`, `at`, and its `act` (`kind`, `word`, and what to run) |
48
+ | `more` | how many breaches the budget left out |
49
+ | `motion` | anyone's active claim with a recent word, or one heard live on the wire — each with `objective`, `holder`, `surface`, `session`, `children_line`, and its `resume` |
50
+ | `idle` | your held claims gone quiet, after motion |
51
+ | `sections` | the one board classification (`mine` · `open` · `asserted` · `held`) |
52
+ | `default_agent` | the machine's chosen agent, or null — the glass reads no config |
53
+ | `notice` | optional: the words of the event that caused this frame, with a tone |
54
+ | `welcome` | optional: the one-time welcome's lines, on the first frame after the database is created |
55
+
37
56
  One file per concern:
38
57
 
39
58
  | File | Owns |
40
59
  |---|---|
41
60
  | `OatheNotchApp.swift` | bootstrap; launchd owns the process, the app owns its feed child |
42
61
  | `Feed.swift` | frame decoding + feed supervision (restart with backoff; failures are typed amber lines, never silence) |
43
- | `NotchModel.swift` | the state machine (motion-free) |
44
- | `NotchView.swift` | the glass (geometry hugs content) |
62
+ | `NotchModel.swift` | the state machine (motion-free): the frame, the budgeted entries, the acts |
63
+ | `NotchView.swift` | the glass (geometry hugs content): the bar, the sheet, the task card |
45
64
  | `NotchPanel.swift` | the window: seat, pointer arming, drag + snap — the only frame owner |
46
65
  | `DockAnchor.swift` | where the island lives; persists; `clear()` goes home |
47
- | `Theme.swift` | every token, named once — read its taxonomy header before adding a constant |
66
+ | `Theme.swift` | every token, named once — read its taxonomy header before adding a constant (`rowCap` equals the digest's cap, pinned by the Node test) |
48
67
 
49
68
  ## The two scars (read before touching motion)
50
69
 
@@ -82,7 +101,3 @@ wires nothing and says nothing: there is nothing for the user to do.
82
101
  ## License
83
102
 
84
103
  Apache-2.0, as the rest of the oathe repository.
85
-
86
- ## License
87
-
88
- TBD — follows the oathe project's licensing decision.
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "@oathe/oathe",
3
- "version": "0.3.2",
4
- "description": "Auto save and verified completion for AI coding agents \u2014 a durable local task board that outlives any one session. D0 preview.",
3
+ "version": "0.4.1",
4
+ "description": "Auto save and verified completion for AI coding agents — a durable local task board that outlives any one session. D0 preview.",
5
5
  "type": "module",
6
6
  "engines": {
7
- "node": ">=22.5.0"
7
+ "node": ">=22.13.0"
8
8
  },
9
9
  "bin": {
10
10
  "oathe": "bin/oathe.mjs"
11
11
  },
12
12
  "scripts": {
13
+ "preinstall": "node bin/node-floor.mjs",
13
14
  "test": "npm run test:unit && npm run test:heavy",
14
- "test:unit": "node --test tests/activation.test.mjs tests/atif.test.mjs tests/blocks.test.mjs tests/board-render.test.mjs tests/config.test.mjs tests/cursor-harness.test.mjs tests/discharge.test.mjs tests/fslock.test.mjs tests/harness-contract.test.mjs tests/harness-docs.test.mjs tests/harness-docs-drift.test.mjs tests/harness.test.mjs tests/home.test.mjs tests/horizon-census.test.mjs tests/manifest.test.mjs tests/mcp-connection.test.mjs tests/notch.test.mjs tests/packaging.test.mjs tests/paths.test.mjs tests/registry.test.mjs tests/runtime-provider.test.mjs tests/sessions.test.mjs tests/setup.test.mjs tests/speaker.test.mjs tests/successor.test.mjs tests/traces.test.mjs tests/ux-contract.test.mjs tests/verify-dispatch.test.mjs tests/welcome.test.mjs tests/workspace-resolver.test.mjs tests/workspace.test.mjs",
15
- "test:heavy": "node --test --test-concurrency=2 tests/amend.test.mjs tests/cli.test.mjs tests/harness-install-contract.test.mjs tests/harness-live-contract.test.mjs tests/init.test.mjs tests/integration.test.mjs tests/launch.test.mjs tests/oathe-tools.test.mjs tests/pager.test.mjs tests/plugin.test.mjs tests/session-host.test.mjs tests/simple-cage.test.mjs tests/sql-acceptance-lane.test.mjs tests/substrate.test.mjs tests/vendor-scripts.test.mjs tests/verifier.test.mjs",
15
+ "test:unit": "node --test tests/activation.test.mjs tests/atif.test.mjs tests/blocks.test.mjs tests/board-render.test.mjs tests/breach-digest.test.mjs tests/config.test.mjs tests/cursor-harness.test.mjs tests/discharge.test.mjs tests/evidence-budget.test.mjs tests/fslock.test.mjs tests/harness-contract.test.mjs tests/harness-docs.test.mjs tests/harness-docs-drift.test.mjs tests/harbor-conformance.test.mjs tests/harness.test.mjs tests/notch-frame.test.mjs tests/home.test.mjs tests/horizon-census.test.mjs tests/manifest.test.mjs tests/mcp-connection.test.mjs tests/node-floor.test.mjs tests/notch.test.mjs tests/packaging.test.mjs tests/paths.test.mjs tests/registry.test.mjs tests/runtime-provider.test.mjs tests/sessions.test.mjs tests/setup.test.mjs tests/speaker.test.mjs tests/successor.test.mjs tests/trace-census.test.mjs tests/trace-fixture-tools.test.mjs tests/trace-fixtures.test.mjs tests/traces.test.mjs tests/ux-contract.test.mjs tests/verify-dispatch.test.mjs tests/welcome.test.mjs tests/workspace-resolver.test.mjs tests/workspace.test.mjs",
16
+ "test:heavy": "node --test --test-concurrency=2 tests/amend.test.mjs tests/cli.test.mjs tests/harness-install-contract.test.mjs tests/harness-live-contract.test.mjs tests/init.test.mjs tests/integration.test.mjs tests/launch.test.mjs tests/lineage.test.mjs tests/oathe-tools.test.mjs tests/pager.test.mjs tests/plugin.test.mjs tests/session-host.test.mjs tests/simple-cage.test.mjs tests/sql-acceptance-lane.test.mjs tests/substrate.test.mjs tests/vendor-scripts.test.mjs tests/verifier.test.mjs",
16
17
  "lint": "npx -y eslint@10.9.1 .",
17
18
  "pack:dry-run": "npm pack --dry-run --ignore-scripts",
18
19
  "prepack": "node scripts/pack-notch.mjs",
@@ -22,6 +23,9 @@
22
23
  "install-contract": "node scripts/harness-install-contract.mjs",
23
24
  "harness-docs-drift": "node scripts/harness-docs-drift.mjs",
24
25
  "harness-docs-lock": "node scripts/harness-docs-drift.mjs --lock",
26
+ "harbor-conformance": "node scripts/harbor-conformance.mjs",
27
+ "harbor-conformance-lock": "node scripts/harbor-conformance.mjs --lock",
28
+ "trace-census": "node scripts/trace-census.mjs",
25
29
  "marker-scan": "node scripts/marker-scan.mjs",
26
30
  "ci:policy": "node scripts/ci/check-workflows.mjs"
27
31
  },
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "oathe",
3
3
  "displayName": "Oathe",
4
- "version": "0.3.2",
5
- "description": "Claims are speech acts: your session opens on this folder's board, records progress as statements, and yields what it cannot finish. Horizons move only by deliberate acts \u2014 never by session liveness.",
4
+ "version": "0.4.1",
5
+ "description": "Claims are speech acts: your session opens on this folder's board, records progress as statements, and yields what it cannot finish. Horizons move only by deliberate acts — never by session liveness.",
6
6
  "author": {
7
7
  "name": "Oathe"
8
8
  },