@oathe/oathe 0.3.2 → 0.4.3
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/README.md +42 -12
- package/assets/oathe-hero.png +0 -0
- package/bin/node-floor.mjs +16 -0
- package/bin/oathe.mjs +96 -136
- package/docs/PRIVACY.md +7 -6
- package/notch/Oathe Notch.app/Contents/Info.plist +1 -1
- package/notch/Oathe Notch.app/Contents/MacOS/OatheNotch +0 -0
- package/notch/README.md +33 -18
- package/package.json +9 -5
- package/plugin/.claude-plugin/plugin.json +2 -2
- package/plugin/.cursor-plugin/plugin.json +2 -2
- package/plugin/commands/verify.md +6 -5
- package/plugin/hooks/heartbeat.mjs +14 -5
- package/plugin/hooks/hooks.json +1 -1
- package/plugin/hooks/lib.mjs +7 -5
- package/plugin/hooks/render-board.mjs +3 -3
- package/plugin/skills/oathe-work/SKILL.md +4 -1
- package/src/activation.mjs +3 -0
- package/src/atif.mjs +182 -348
- package/src/board-render.mjs +46 -42
- package/src/breach-digest.mjs +183 -0
- package/src/config.mjs +15 -3
- package/src/context.mjs +1 -1
- package/src/doctor.mjs +30 -8
- package/src/evidence.mjs +153 -0
- package/src/harnesses/catalog.mjs +12 -1
- package/src/harnesses/claude-roster.mjs +49 -0
- package/src/harnesses/claude-transcript.mjs +174 -0
- package/src/harnesses/claude.mjs +35 -2
- package/src/harnesses/codex-rollout.mjs +610 -0
- package/src/harnesses/codex-roster.mjs +88 -0
- package/src/harnesses/codex.mjs +72 -2
- package/src/harnesses/cursor.mjs +10 -8
- package/src/harnesses/fidelity.mjs +123 -0
- package/src/init.mjs +5 -1
- package/src/launch-env.mjs +5 -5
- package/src/launch.mjs +5 -6
- package/src/manifest.mjs +35 -0
- package/src/mcp/connection.mjs +9 -7
- package/src/mcp/oathe-tools.mjs +135 -75
- package/src/node-floor.mjs +44 -0
- package/src/notch-frame.mjs +152 -0
- package/src/oathe-annotator.mjs +113 -0
- package/src/pager.mjs +75 -37
- package/src/runtime/provider.mjs +2 -2
- package/src/session-host.mjs +1 -1
- package/src/sessions.mjs +8 -1
- package/src/speaker.mjs +54 -26
- package/src/statements.mjs +120 -2
- package/src/substrate.mjs +3 -3
- package/src/successor.mjs +2 -3
- package/src/trace-census.mjs +96 -0
- package/src/traces.mjs +98 -6
- package/src/uninstall.mjs +4 -1
- package/src/update.mjs +86 -0
- package/src/verifier.mjs +37 -19
- 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
|
-
|
|
5
|
+
Make sure your agent actually **DID** what it **SAID.**
|
|
6
|
+

|
|
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
|
|
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
|
[](https://github.com/oathe-ai/oathe/actions/workflows/ci.yml) [](LICENSE) [](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 |
|
|
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,
|
|
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
|
-
→
|
|
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)
|
|
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
|
|
65
|
-
- **Designed:** workspace checkpoints,
|
|
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,15 +6,15 @@
|
|
|
6
6
|
import { parseArgs } from 'node:util';
|
|
7
7
|
|
|
8
8
|
import { isTraceSubjectSql } from '../src/statements.mjs';
|
|
9
|
-
import { byName, launchable,
|
|
9
|
+
import { byName, launchable, verifierCapable } from '../src/harnesses/catalog.mjs';
|
|
10
10
|
|
|
11
|
-
const VERBS = ['init', ...launchable(), 'claim', 'ls', 'note', 'amend', 'done', 'verify', 'trace', 'notch', 'yield', 'config', 'doctor', 'uninstall', 'status', 'version', 'hook', 'mcp'];
|
|
11
|
+
const VERBS = ['init', ...launchable(), 'claim', 'ls', 'note', 'amend', 'done', 'verify', 'trace', 'notch', 'yield', 'config', 'doctor', 'uninstall', 'status', 'version', 'update', 'hook', 'mcp'];
|
|
12
12
|
|
|
13
13
|
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…]
|
|
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
|
|
@@ -26,7 +26,8 @@ ${launchable().map((name) => ` ${name.padEnd(6)} [--hermetic] [args…] launch
|
|
|
26
26
|
yield <task-id> <note> yield: the task goes back on the board, unowned
|
|
27
27
|
doctor [--surface] verify every managed surface (--surface: the resolution report only)
|
|
28
28
|
status the substrate half of doctor
|
|
29
|
-
version the package version
|
|
29
|
+
version the package version on PATH
|
|
30
|
+
update [--yes] [--harness a,b] the upgrade as one verb: npm i -g @oathe/oathe@latest through this node's npm, then init through the new bin
|
|
30
31
|
config <key> [value] [--global] read or write a config key (workspace scope by default)
|
|
31
32
|
uninstall [--purge-db] remove exactly what init recorded (the database stays put)
|
|
32
33
|
hook <name> · mcp internal: the plugin's hook/server entry points (bin-addressed)
|
|
@@ -133,9 +134,10 @@ const handlers = {
|
|
|
133
134
|
}
|
|
134
135
|
// The moment after init (live polish #7): what to do next, coloured only on a TTY.
|
|
135
136
|
const tty = process.stdout.isTTY === true;
|
|
136
|
-
const [B,
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
const [B, R] = tty ? ['\x1b[1m', '\x1b[0m'] : ['', ''];
|
|
138
|
+
// The harness itself is the way in — the plugin rides every session (the launcher is the notch's).
|
|
139
|
+
const bins = launchable().map((name) => byName(name).launch.bin);
|
|
140
|
+
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
141
|
summary('init', 'ok');
|
|
140
142
|
},
|
|
141
143
|
|
|
@@ -162,7 +164,7 @@ const handlers = {
|
|
|
162
164
|
const { ctx, tools } = await toolsForCwd();
|
|
163
165
|
try {
|
|
164
166
|
const out = await tools.oathe_claim({ task_id: taskId, objective });
|
|
165
|
-
process.stdout.write(`claimed: ${out.task_id} (lease ${out.lease}) — ${out.note}\n`);
|
|
167
|
+
process.stdout.write(`claimed: ${out.task_id} (lease ${out.lease}) — ${out.note}${out.lineage ? ` — spawned under ${out.lineage.parent}` : ''}\n`);
|
|
166
168
|
summary('claim', 'ok');
|
|
167
169
|
} finally {
|
|
168
170
|
await ctx.substrate.close();
|
|
@@ -183,6 +185,21 @@ const handlers = {
|
|
|
183
185
|
const holder = r.state === 'active' ? `${r.principal_id}, lease until ${r.lease_until}` : (r.state ?? 'open');
|
|
184
186
|
process.stdout.write(` [${(r.state ?? 'open').padEnd(8)}] ${r.task_id} — ${r.objective} (${holder})\n`);
|
|
185
187
|
}
|
|
188
|
+
// UX rule 18: the terminal is the uncapped pull — every breached promise on the machine,
|
|
189
|
+
// one line per task or sibling group (a group's children under it), no flag: the models
|
|
190
|
+
// that script the CLI look here when a `+N more` points them at it.
|
|
191
|
+
const [{ Pager }, { WorkspaceRegistry }, { rowLine }, { MACHINE_SCOPE_LABEL }] = await Promise.all([
|
|
192
|
+
import('../src/pager.mjs'), import('../src/registry.mjs'), import('../src/breach-digest.mjs'), import('../src/board-render.mjs'),
|
|
193
|
+
]);
|
|
194
|
+
const registry = new WorkspaceRegistry({ registryPath: ctx.paths.registryPath });
|
|
195
|
+
const digest = await new Pager({ client: ctx.substrate, identity: ctx.identity, config: ctx.config, registry }).digest();
|
|
196
|
+
if (digest.total > 0) {
|
|
197
|
+
process.stdout.write(`breached (${MACHINE_SCOPE_LABEL}):\n`);
|
|
198
|
+
for (const g of digest.groups) {
|
|
199
|
+
process.stdout.write(` [${g.kind_word}] ${g.task_id} — ${g.objective} (${rowLine(g)} · ${g.home})\n`);
|
|
200
|
+
if (g.group) for (const line of g.detail.split('\n')) process.stdout.write(` ${line}\n`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
186
203
|
summary('ls', 'ok');
|
|
187
204
|
} finally {
|
|
188
205
|
await ctx.substrate.close();
|
|
@@ -288,13 +305,13 @@ const handlers = {
|
|
|
288
305
|
|
|
289
306
|
async trace(argv) {
|
|
290
307
|
const { values, positionals } = parseFlags('trace', {
|
|
291
|
-
args: argv, options: { out: { type: 'string' } }, allowPositionals: true,
|
|
308
|
+
args: argv, options: { out: { type: 'string' }, pure: { type: 'boolean', default: false } }, allowPositionals: true,
|
|
292
309
|
});
|
|
293
310
|
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'),
|
|
311
|
+
if (!taskId) throw new Error('usage: oathe trace <task-id> [--out <dir>] [--pure]');
|
|
312
|
+
const [{ buildContext }, { workspaceRef }, { projectAnnotated }, { projectorFor }, fs, path] = await Promise.all([
|
|
313
|
+
import('../src/context.mjs'), import('../src/workspace.mjs'), import('../src/oathe-annotator.mjs'),
|
|
314
|
+
import('../src/harnesses/catalog.mjs'), import('node:fs'), import('node:path'),
|
|
298
315
|
]);
|
|
299
316
|
const ctx = buildContext({});
|
|
300
317
|
try {
|
|
@@ -315,17 +332,23 @@ const handlers = {
|
|
|
315
332
|
const files = traceRows.flatMap((r) => r.evidence_refs);
|
|
316
333
|
if (files.length === 0) throw new Error(`'${taskId}' has no linked traces — nothing to export`);
|
|
317
334
|
const trajectories = [];
|
|
335
|
+
// The export is the annotated read with the OBLIGATION stamped on the root — what this
|
|
336
|
+
// trajectory is evidence for, in the annotator's own slot. --pure exports the
|
|
337
|
+
// converter's output alone (no oathe key anywhere): what a Harbor converter could also
|
|
338
|
+
// emit, for a cross-implementation check against their validator and converters.
|
|
318
339
|
for (const file of files) {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
340
|
+
trajectories.push(values.pure
|
|
341
|
+
? (await projectorFor(file)).project(file)
|
|
342
|
+
: await projectAnnotated(file, {
|
|
343
|
+
obligation: {
|
|
344
|
+
org_id: ctx.identity.orgId,
|
|
345
|
+
task_id: taskId,
|
|
346
|
+
work_claim_id: claim.work_claim_id,
|
|
347
|
+
contract_ref: claim.contract_ref,
|
|
348
|
+
workspace: workspaceRef(process.cwd()),
|
|
349
|
+
...(verdicts[0] ? { verdict: verdicts[0] } : {}),
|
|
350
|
+
},
|
|
351
|
+
}));
|
|
329
352
|
}
|
|
330
353
|
if (values.out) {
|
|
331
354
|
fs.mkdirSync(values.out, { recursive: true });
|
|
@@ -360,8 +383,8 @@ const handlers = {
|
|
|
360
383
|
err.code = 'OATHE_NOTCH_WELCOME_SERVE';
|
|
361
384
|
throw err;
|
|
362
385
|
}
|
|
363
|
-
const [{ buildContext }, {
|
|
364
|
-
import('../src/context.mjs'), import('../src/
|
|
386
|
+
const [{ buildContext }, { createOatheTools }, { Pager }, { WorkspaceRegistry }, { WIRE_CHANNEL, noticeFor, emit }, { plantWelcome, consumeWelcome }] = await Promise.all([
|
|
387
|
+
import('../src/context.mjs'), import('../src/mcp/oathe-tools.mjs'),
|
|
365
388
|
import('../src/pager.mjs'), import('../src/registry.mjs'), import('../src/wire.mjs'),
|
|
366
389
|
import('../src/welcome.mjs'),
|
|
367
390
|
]);
|
|
@@ -381,115 +404,32 @@ const handlers = {
|
|
|
381
404
|
return;
|
|
382
405
|
}
|
|
383
406
|
const registry = new WorkspaceRegistry({ registryPath: ctx.paths.registryPath });
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
const { ownerOfTracePath, surfaceForSession, launchable: launchableNames } = await import('../src/harnesses/catalog.mjs');
|
|
388
|
-
const { SessionRegistry, pidAlive } = await import('../src/sessions.mjs');
|
|
407
|
+
const [{ NotchFrame }, { SessionRegistry }, { homeOf }] = await Promise.all([
|
|
408
|
+
import('../src/notch-frame.mjs'), import('../src/sessions.mjs'), import('../src/paths.mjs'),
|
|
409
|
+
]);
|
|
389
410
|
const sessionsReg = new SessionRegistry({ sessionsPath: ctx.paths.sessionsPath });
|
|
390
|
-
//
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
//
|
|
407
|
-
//
|
|
408
|
-
const
|
|
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
|
-
};
|
|
411
|
+
// The frame (src/notch-frame.mjs) decides what the glass shows and every word of it;
|
|
412
|
+
// this verb fetches and serves. A broken sessions file costs the frame its session
|
|
413
|
+
// refs, never the frame.
|
|
414
|
+
const notchFrame = new NotchFrame({
|
|
415
|
+
registry,
|
|
416
|
+
sessions: () => {
|
|
417
|
+
try { return sessionsReg.load().sessions; } catch (e) {
|
|
418
|
+
process.stderr.write(`oathe notch: sessions ${String(e?.message || e).slice(0, 120)}\n`);
|
|
419
|
+
return {};
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
defaultAgent: ctx.config.get('defaultAgent'),
|
|
423
|
+
motionWindowMs: ctx.config.get('notchMotionMinutes') * 60_000,
|
|
424
|
+
operatorHome: homeOf(),
|
|
425
|
+
});
|
|
426
|
+
const pager = new Pager({ client: ctx.substrate, identity: ctx.identity, config: ctx.config, registry });
|
|
427
|
+
// The machine board, classified once by the tools (attention:false — the digest is the
|
|
428
|
+
// frame's own read, and no response channel is served here).
|
|
429
|
+
const tools = createOatheTools({ client: ctx.substrate, identity: ctx.identity, workspace: null, config: ctx.config, attention: false });
|
|
472
430
|
const frame = async () => {
|
|
473
|
-
const
|
|
474
|
-
|
|
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
|
-
};
|
|
431
|
+
const [digest, { sections }] = await Promise.all([pager.digest(), tools.oathe_board({ all: true })]);
|
|
432
|
+
return notchFrame.build({ digest, sections });
|
|
493
433
|
};
|
|
494
434
|
if (!values.serve) {
|
|
495
435
|
try {
|
|
@@ -530,8 +470,7 @@ const handlers = {
|
|
|
530
470
|
// A TRANSIENT substrate failure (a Postgres restart, a locked table) must never kill
|
|
531
471
|
// the feed — the error is a typed stderr note and the next event/heartbeat retries.
|
|
532
472
|
// A DEAD CONNECTION is fatal-but-clean: exit nonzero; the app's backoff restart is
|
|
533
|
-
// the recovery.
|
|
534
|
-
// trailer at all — the review's SERVE-CRASH finding.)
|
|
473
|
+
// the recovery.
|
|
535
474
|
const guarded = (label, fn) => async (...args) => {
|
|
536
475
|
try {
|
|
537
476
|
await fn(...args);
|
|
@@ -542,7 +481,7 @@ const handlers = {
|
|
|
542
481
|
listener.on('notification', guarded('wire frame', async (msg) => {
|
|
543
482
|
let ev = null;
|
|
544
483
|
try { ev = JSON.parse(msg.payload); } catch { /* a foreign payload nudges, it does not speak */ }
|
|
545
|
-
if (ev?.task_id)
|
|
484
|
+
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
485
|
const f = await serveFrame();
|
|
547
486
|
// The event's own notice rides the frame it caused — the glass PULSES its tone and
|
|
548
487
|
// keeps the words for the sheet (never expanding the bar; founder ruling 2026-08-31).
|
|
@@ -565,7 +504,8 @@ const handlers = {
|
|
|
565
504
|
|
|
566
505
|
async yield(argv) {
|
|
567
506
|
const [taskId, note] = argv;
|
|
568
|
-
|
|
507
|
+
// A missing note is the tool's typed refusal (OATHE_YIELD_NOTE_REQUIRED), one implementation.
|
|
508
|
+
if (!taskId) throw new Error('usage: oathe yield <task-id> <note>');
|
|
569
509
|
const { ctx, tools } = await toolsForCwd();
|
|
570
510
|
try {
|
|
571
511
|
const out = await tools.oathe_yield({ task_id: taskId, note });
|
|
@@ -601,6 +541,21 @@ const handlers = {
|
|
|
601
541
|
summary('version', 'ok');
|
|
602
542
|
},
|
|
603
543
|
|
|
544
|
+
async update(argv) {
|
|
545
|
+
const { values } = parseFlags('update', {
|
|
546
|
+
args: argv, options: { yes: { type: 'boolean', default: false }, harness: { type: 'string' } }, allowPositionals: false,
|
|
547
|
+
});
|
|
548
|
+
const [{ runUpdate }, { buildPaths }] = await Promise.all([import('../src/update.mjs'), import('../src/paths.mjs')]);
|
|
549
|
+
const initArgs = [...(values.yes ? ['--yes'] : []), ...(values.harness ? ['--harness', values.harness] : [])];
|
|
550
|
+
const out = runUpdate({ packageRoot: buildPaths(process.env).packageRoot, args: initArgs });
|
|
551
|
+
if (out.initStatus !== 0) {
|
|
552
|
+
const e = new Error(`update installed ${out.after} but the new bin's init exited ${out.initStatus} — read its output above and run \`oathe init\` again`);
|
|
553
|
+
e.code = 'OATHE_UPDATE_INIT_FAILED';
|
|
554
|
+
throw e;
|
|
555
|
+
}
|
|
556
|
+
summary('update', 'ok');
|
|
557
|
+
},
|
|
558
|
+
|
|
604
559
|
async doctor(argv) {
|
|
605
560
|
const { values } = parseFlags('doctor', {
|
|
606
561
|
args: argv, options: { surface: { type: 'boolean', default: false } }, allowPositionals: false,
|
|
@@ -723,6 +678,11 @@ if (!verb || !VERBS.includes(verb)) {
|
|
|
723
678
|
process.exit(2);
|
|
724
679
|
}
|
|
725
680
|
try {
|
|
681
|
+
// The engines floor, executed at the door (R-NODE-FLOOR): npm only warns on engines, so the
|
|
682
|
+
// bin itself refuses a runtime that cannot read the codex thread index (node:sqlite).
|
|
683
|
+
const [{ assertNodeFloor }, { buildPaths }] = await Promise.all([
|
|
684
|
+
import('../src/node-floor.mjs'), import('../src/paths.mjs')]);
|
|
685
|
+
assertNodeFloor({ packageRoot: buildPaths(process.env).packageRoot });
|
|
726
686
|
// Launch verbs come from the catalog (every adapter with a `launch` capability), not a handler each.
|
|
727
687
|
const handler = launchable().includes(verb) ? (argv) => launchHarness(verb, argv) : handlers[verb];
|
|
728
688
|
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
|
|
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.
|
|
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
|
|
42
|
-
as a command-line prompt. That content therefore reaches the engine's model
|
|
43
|
-
(Anthropic or
|
|
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.
|
|
9
|
+
<key>CFBundleShortVersionString</key><string>0.4.3</string>
|
|
10
10
|
<key>LSMinimumSystemVersion</key><string>14.0</string>
|
|
11
11
|
<key>LSUIElement</key><true/>
|
|
12
12
|
</dict>
|
|
Binary file
|
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
|
-
|
|
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.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- **open** — click:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
|
38
|
+
│ ndjson frames on stdout
|
|
33
39
|
▼
|
|
34
|
-
OatheNotch.app ← this
|
|
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.
|