@oathe/oathe 0.2.2 → 0.2.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 CHANGED
@@ -4,16 +4,31 @@
4
4
 
5
5
  [![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)
6
6
 
7
- ![oathe claude: the session opens on the board, the agent claims the task and works — until the model's usage limit cuts it off.](assets/claude-splash.png)
7
+ ![Side by side: oathe claude claims the task and works until the model's usage limit cuts it off; oathe codex greets the same board — the task still claimed, completion not asserted — and picks up in the same workspace.](assets/handoff-splash.png)
8
8
 
9
- ![oathe codex: the next session greets the same board — the task still claimed, completion not asserted, last progress on the row — and Codex picks up in the same workspace.](assets/resume-splash.png)
10
-
11
- You're mid-refactor in Claude Code when it hits a usage limit. What if you could open Codex and it picks up the same task checkpointed, what's done, what's left, and a test that decides whether it's finished. No copy and paste, no re-explaining, and the new agent doesn't have to take the old agent's word for anything because models are getting too good at being wrong AND confident.
9
+ You're mid-refactor in Claude Code when it hits a usage limit. What if you could open Codex and it picks up the same task checkpointed, what's done, what's left, and a test that decides whether it's finished. No copy and paste, no re-explaining, and the new agent doesn't have to take the old agent's word for anything because **models are getting too good at being wrong AND confident.**
12
10
 
13
11
  That's oathe.
14
12
 
15
13
  Below is exactly how much of it works today, because a reliability project that overstates its own status would be a joke.
16
14
 
15
+ ## Quickstart
16
+
17
+ You need Node ≥ 22 and a running Postgres. Every command below is real and exercised by the
18
+ test suite and a clean-container proof.
19
+
20
+ ```bash
21
+ npm install -g @oathe/oathe@latest
22
+
23
+ cd your-project
24
+ oathe init # local substrate up (createdb + schema), both installed harnesses onboarded
25
+ oathe claude # a normal interactive session — the board shows, nothing auto-resumes
26
+ ```
27
+
28
+ Ctrl-C anytime. Open `oathe codex` in the same folder — same board, same claims, other harness.
29
+
30
+ What Oathe reads, stores, and sends: [docs/PRIVACY.md](docs/PRIVACY.md). The full
31
+ technical reference: [docs/PACKAGE.md](docs/PACKAGE.md).
17
32
 
18
33
  ## What gets saved
19
34
 
@@ -25,7 +40,7 @@ oathe goes up a layer of abstraction:
25
40
  | Saved | Why it matters |
26
41
  | --- | --- |
27
42
  | The task and who owns it | The next agent continues *assigned work*, not the last sentence someone typed |
28
- | Progress and evidence | no grep, proper evidence and agent trajectory analysis |
43
+ | Progress and evidence | no grep, proper evidence and agent trajectory analysis to **make sure agents are DOING what they SAY they're doing**|
29
44
  | Side-effect receipts | critical actions get deduplicated etc. (A deploy, payment etc.) that already happened doesn't happen again on retry |
30
45
  | Definition of done | established before agent work starts, so it can't quietly drift |
31
46
  | workspace checkpoint | Branch, commit, and work-in-progress bytes survive your session |
@@ -72,18 +87,11 @@ Honest labels, kept current in [ROADMAP.md](ROADMAP.md):
72
87
 
73
88
  Known limitations are disclosed in the roadmap, including the ones that are semi-embarrassing.
74
89
 
75
- ## Quickstart
76
-
77
- You need Node ≥ 22 and a running Postgres. Every command below is real and exercised by the
78
- test suite and a clean-container proof.
90
+ ## Under the hood
79
91
 
80
- ```bash
81
- npm install -g @oathe/oathe
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; our substrate is strict.
82
93
 
83
- cd your-project
84
- oathe init # local substrate up (createdb + schema), both installed harnesses onboarded
85
- oathe claude # a normal interactive session — the board shows, nothing auto-resumes
86
- ```
94
+ ## CLI and MCP
87
95
 
88
96
  Claim work in-session through the `oathe_*` tools (or from the terminal):
89
97
 
@@ -95,15 +103,6 @@ oathe verify fix-login # a NON-author engine judges it from your recorded sess
95
103
  oathe ls # the board; `oathe uninstall` removes exactly what init recorded
96
104
  ```
97
105
 
98
- Ctrl-C anytime. Open `oathe codex` in the same folder — same board, same claims, other harness.
99
-
100
- What Oathe reads, stores, and sends: [docs/PRIVACY.md](docs/PRIVACY.md). The full
101
- technical reference: [docs/PACKAGE.md](docs/PACKAGE.md).
102
-
103
- ## Under the hood
104
-
105
- 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; our substrate is strict.
106
-
107
106
  ## Contributing
108
107
 
109
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oathe/oathe",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Auto save and verified completion for AI coding agents \u2014 a durable local task board that outlives any one session. D0 preview.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oathe",
3
3
  "displayName": "Oathe",
4
- "version": "0.2.2",
4
+ "version": "0.2.3",
5
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.",
6
6
  "author": {
7
7
  "name": "Oathe"
package/src/launch.mjs CHANGED
@@ -174,7 +174,7 @@ export async function runHarness({
174
174
  client: substrate,
175
175
  identity,
176
176
  workspace,
177
- liveness: () => cage.enumerate().length > 0,
177
+ liveness: () => (cage.alive ? cage.alive() : cage.enumerate().length > 0),
178
178
  observeIntervalMs,
179
179
  });
180
180
  host.start();
@@ -379,7 +379,8 @@ export function createOatheTools({ client, identity, workspace, executionActor,
379
379
  if (!successor) {
380
380
  throw new OatheToolError('OATHE_PICKUP_UNAVAILABLE',
381
381
  'pickup is not wired into this tools server — the successor sequence is unavailable in '
382
- + 'this session (a preview limitation of sessions without the runtime seam); pickup '
382
+ + 'this session (a preview limitation of sessions without the runtime seam).'
383
+ + ' Continue the task directly instead: its objective and recorded progress are on the board (oathe_board), so inspect the workspace, keep working, record progress with oathe_statement, and assert completion with oathe_done — the claim is already yours. Pickup '
383
384
  + 'cannot pretend', { task_id });
384
385
  }
385
386
  return successor({ task_id, work_claim_id: latest.work_claim_id });
@@ -132,7 +132,8 @@ export class StandaloneRuntimeProvider {
132
132
  throw new RuntimeError('OATHE_PICKUP_UNAVAILABLE',
133
133
  'the successor sequence needs the oathe runtime, which does not resolve on this '
134
134
  + 'machine (runtime provider: standalone) — pickup cannot pretend; this is a preview '
135
- + 'limitation', { provider: 'standalone' });
135
+ + 'limitation.'
136
+ + ' Continue the task directly instead: its objective and recorded progress are on the board (oathe_board), so inspect the workspace, keep working, record progress with oathe_statement, and assert completion with oathe_done — the claim is already yours.', { provider: 'standalone' });
136
137
  },
137
138
  close: async () => {},
138
139
  };
@@ -24,7 +24,17 @@ export function spawnCaged({ unit, env, cmd, args, cwd, stdio, graceMs = DEFAULT
24
24
  });
25
25
  const pgid = child.pid;
26
26
 
27
- /** Kernel read of the group — live pids (stopped counts as live), [] once the scope is empty. */
27
+ /** Liveness of the group as a kernel signal probe — kill(-pgid, 0) costs nanoseconds and
28
+ * spawns nothing. True while ANY member (stopped and zombie included) exists. This is the
29
+ * hot-path check: a full `ps -A` here made every poll a whole-system process-table scan,
30
+ * and concurrent cages contending on that scan wedged macOS's proc subsystem (measured:
31
+ * `ps` latency >45s while the test suite ran — the suite was DDoSing itself). */
32
+ const alive = () => {
33
+ try { process.kill(-pgid, 0); return true; } catch { return false; }
34
+ };
35
+
36
+ /** Kernel read of the group — live pids, [] once the scope is empty. Full-table scan:
37
+ * COLD PATH ONLY (the final proof and its failure detail), never inside a poll loop. */
28
38
  const enumerate = () => {
29
39
  const ps = spawnSync('ps', ['-A', '-o', 'pid=,pgid='], { encoding: 'utf8' });
30
40
  if (ps.status !== 0) {
@@ -41,15 +51,16 @@ export function spawnCaged({ unit, env, cmd, args, cwd, stdio, graceMs = DEFAULT
41
51
  };
42
52
 
43
53
  const drainUntil = async (deadline) => {
44
- while (Date.now() < deadline && enumerate().length > 0) await sleep(POLL_MS);
54
+ while (Date.now() < deadline && alive()) await sleep(POLL_MS);
45
55
  };
46
56
 
47
- /** SIGTERM → grace → SIGKILL, then RE-ENUMERATE: the emptiness is proof, not assumption. */
57
+ /** SIGTERM → grace → SIGKILL, then RE-ENUMERATE: the emptiness is proof, not assumption.
58
+ * Polling rides the signal probe; the one authoritative ps scan is the closing proof. */
48
59
  const teardownProvenEmpty = async () => {
49
- if (enumerate().length > 0) {
60
+ if (alive()) {
50
61
  signalGroup('SIGTERM');
51
62
  await drainUntil(Date.now() + graceMs);
52
- if (enumerate().length > 0) {
63
+ if (alive()) {
53
64
  signalGroup('SIGKILL');
54
65
  await drainUntil(Date.now() + graceMs);
55
66
  }
@@ -63,5 +74,5 @@ export function spawnCaged({ unit, env, cmd, args, cwd, stdio, graceMs = DEFAULT
63
74
  };
64
75
  };
65
76
 
66
- return { child, enumerate, teardownProvenEmpty };
77
+ return { child, alive, enumerate, teardownProvenEmpty };
67
78
  }
package/src/successor.mjs CHANGED
@@ -24,7 +24,8 @@ export async function buildSuccessor({ substrate, identity, paths }) {
24
24
  } catch (e) {
25
25
  throw new RuntimeError('OATHE_PICKUP_UNAVAILABLE',
26
26
  'the successor sequence needs the oathe runtime, which does not resolve on this machine '
27
- + '— pickup cannot pretend; this is a preview limitation until oathe-runtime lands',
27
+ + '— pickup cannot pretend; this is a preview limitation until oathe-runtime lands.'
28
+ + ' Continue the task directly instead: its objective and recorded progress are on the board (oathe_board), so inspect the workspace, keep working, record progress with oathe_statement, and assert completion with oathe_done — the claim is already yours.',
28
29
  { cause: String(e?.message || e) });
29
30
  }
30
31
  return seam.buildSuccessor({ substrate, identity, paths });
Binary file
Binary file