@oathe/oathe 0.3.1 → 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.
- package/README.md +43 -13
- package/assets/oathe-hero.png +0 -0
- package/bin/node-floor.mjs +16 -0
- package/bin/oathe.mjs +78 -130
- 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/notch.mjs +7 -1
- 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/verifier.mjs +37 -19
- package/assets/oathe-hero.svg +0 -92
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oathe",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"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
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"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.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Oathe"
|
|
7
7
|
},
|
|
@@ -11,8 +11,9 @@ machine can verify). Passing an engine is how you retry a STALLED verification o
|
|
|
11
11
|
different engine after an outage (e.g. a usage limit): the failed run already released its
|
|
12
12
|
claim and recorded the failure, so the retry claims cleanly.
|
|
13
13
|
|
|
14
|
-
Call `oathe_verify` with `{task_id, engine?}`.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
Call `oathe_verify` with `{task_id, engine?}`. The engine runs as a detached process and
|
|
15
|
+
the call waits for its verdict, then returns it: the verdict and its reason, whether the
|
|
16
|
+
task settled or came back reopened, and the engine log path. Report to the user exactly
|
|
17
|
+
what the response says — a rejection's reason is the verifier's own words, recorded on the
|
|
18
|
+
verify-task's completion statement; a run that died before a verdict says so and names the
|
|
19
|
+
retry. Nothing to poll: the answer is in the response.
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
// packet 2026-08-26); the horizon is set at claim time by the substrate's claim verb.
|
|
6
6
|
|
|
7
7
|
import { linkTrace } from '../../src/statements.mjs';
|
|
8
|
+
import { homeOf } from '../../src/paths.mjs';
|
|
8
9
|
import { failSoft, ensureSessionRegistered } from './lib.mjs';
|
|
9
|
-
import { claimIntervals } from '../../src/atif.mjs';
|
|
10
|
-
import {
|
|
10
|
+
import { claimIntervals, AtifError } from '../../src/atif.mjs';
|
|
11
|
+
import { TraceContractError } from '../../src/traces.mjs';
|
|
12
|
+
import { projectAnnotated } from '../../src/oathe-annotator.mjs';
|
|
11
13
|
|
|
12
14
|
await failSoft(async ({ substrate, identity, session, paths, workspace }) => {
|
|
13
15
|
// The session's liveness signal — independent of trace linkage (a planning-only session
|
|
@@ -20,10 +22,17 @@ await failSoft(async ({ substrate, identity, session, paths, workspace }) => {
|
|
|
20
22
|
// a planning-only session leaves no claim evidence.
|
|
21
23
|
let touched;
|
|
22
24
|
try {
|
|
23
|
-
const trajectory =
|
|
25
|
+
const trajectory = await projectAnnotated(session.transcriptPath, { home: homeOf(process.env) });
|
|
24
26
|
touched = new Set(claimIntervals(trajectory).map((i) => i.task_id));
|
|
25
|
-
} catch {
|
|
26
|
-
|
|
27
|
+
} catch (e) {
|
|
28
|
+
// An unreadable or unprojectable trace attributes nothing — said, typed, on stderr (the
|
|
29
|
+
// sanctioned fail-soft surface still reports visibly). Anything else is a bug and reaches
|
|
30
|
+
// failSoft loud, never swallowed into silence.
|
|
31
|
+
if (e instanceof AtifError || e instanceof TraceContractError) {
|
|
32
|
+
process.stderr.write(`oathe hook: heartbeat linked nothing [${e.code}] ${String(e.message).slice(0, 200)}\n`);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
throw e;
|
|
27
36
|
}
|
|
28
37
|
if (touched.size === 0) return;
|
|
29
38
|
// Linkage covers ASSERTED claims too: a claim taken and completed inside a single turn has
|
package/plugin/hooks/hooks.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "Oathe session lifecycle: the board at SessionStart, lease heartbeat at Stop, frame note before compaction. Same three events exist verbatim in Claude Code and Codex. Commands go through the oathe bin on PATH \u2014 the plugin is cached by copy in
|
|
2
|
+
"description": "Oathe session lifecycle: the board at SessionStart, lease heartbeat at Stop, frame note before compaction. Same three events exist verbatim in Claude Code and Codex. Commands go through the oathe bin on PATH \u2014 the plugin is cached by copy in Claude Code and Codex, so the tree carries no paths.",
|
|
3
3
|
"hooks": {
|
|
4
4
|
"SessionStart": [
|
|
5
5
|
{
|
package/plugin/hooks/lib.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import { Substrate } from '../../src/substrate.mjs';
|
|
|
15
15
|
import { buildPaths, homeOf } from '../../src/paths.mjs';
|
|
16
16
|
import { OatheConfig } from '../../src/config.mjs';
|
|
17
17
|
|
|
18
|
-
import { dialectFor, ownerOfTracePath } from '../../src/harnesses/catalog.mjs';
|
|
18
|
+
import { dialectFor, ownerOfTracePath, transcriptFor } from '../../src/harnesses/catalog.mjs';
|
|
19
19
|
import { cwdDialect } from '../../src/harnesses/dialects.mjs';
|
|
20
20
|
import { WorkspaceResolver } from '../../src/workspace-resolver.mjs';
|
|
21
21
|
|
|
@@ -52,11 +52,13 @@ export async function buildHookContext(input, env = process.env) {
|
|
|
52
52
|
: await new WorkspaceResolver({ env, home }).resolve();
|
|
53
53
|
const cwd = place.dir;
|
|
54
54
|
const config = new OatheConfig({ env, cwd });
|
|
55
|
-
// The session identity the harness hands every hook — the trace linkage rides on it.
|
|
55
|
+
// The session identity the harness hands every hook — the trace linkage rides on it. The
|
|
56
|
+
// transcript is the file the session's rows LIVE in, resolved through its store: a resumed
|
|
57
|
+
// or compacted session is told <new-id>.jsonl and keeps writing the original.
|
|
56
58
|
const session = normalized.sessionId
|
|
57
59
|
? {
|
|
58
60
|
sessionId: normalized.sessionId,
|
|
59
|
-
transcriptPath: normalized.transcriptPath,
|
|
61
|
+
transcriptPath: transcriptFor({ sessionId: normalized.sessionId, reportedPath: normalized.transcriptPath, home }),
|
|
60
62
|
harness: ownerOfTracePath(normalized.transcriptPath ?? ''),
|
|
61
63
|
}
|
|
62
64
|
: null;
|
|
@@ -67,7 +69,7 @@ export async function buildHookContext(input, env = process.env) {
|
|
|
67
69
|
synthetic: place.synthetic, // R-BOARD-SCOPE: a staging dir serves the full board
|
|
68
70
|
identity: {
|
|
69
71
|
orgId: config.get('org'),
|
|
70
|
-
principalId: config.get('principal')
|
|
72
|
+
principalId: config.get('principal'),
|
|
71
73
|
department: config.get('department'),
|
|
72
74
|
},
|
|
73
75
|
config,
|
|
@@ -98,7 +100,7 @@ export async function ensureSessionRegistered({ session, paths, workspace = unde
|
|
|
98
100
|
const { SessionRegistry, processAncestry, nearestAppBundle } = await import('../../src/sessions.mjs');
|
|
99
101
|
const { ownedAncestorIndex } = await import('../../src/harnesses/catalog.mjs');
|
|
100
102
|
// The row describes THE HARNESS PROCESS, not whatever interposer spawned the hook
|
|
101
|
-
// (
|
|
103
|
+
// (Cursor's agent CLI runs hooks through a short-lived /bin/zsh — registering the shell's pid
|
|
102
104
|
// would sweep the session the moment the shell exits). Walk up to the nearest
|
|
103
105
|
// adapter-owned ancestor; a chain with none (fixtures, bare runners) keeps the ppid.
|
|
104
106
|
const walk = processAncestry({ pid: process.ppid });
|
|
@@ -32,14 +32,14 @@ await failSoft(async ({ substrate, workspace, synthetic, identity, config, cwd,
|
|
|
32
32
|
// R-PAGER: the breach digest is computed apart from the board, and a failure there is
|
|
33
33
|
// reported on stderr while the board still renders — the digest is a courtesy, the board
|
|
34
34
|
// is the session's contract.
|
|
35
|
-
let
|
|
35
|
+
let digest = null;
|
|
36
36
|
try {
|
|
37
37
|
const { Pager } = await import('../../src/pager.mjs');
|
|
38
|
-
|
|
38
|
+
digest = await new Pager({ client: substrate, identity, config, registry }).digest();
|
|
39
39
|
} catch (e) {
|
|
40
40
|
process.stderr.write(`oathe hook: pager ${String(e?.message || e)}\n`);
|
|
41
41
|
}
|
|
42
|
-
const { context, message } = await renderBoard({ client: substrate, identity, workspace, config, synthetic,
|
|
42
|
+
const { context, message } = await renderBoard({ client: substrate, identity, workspace, config, synthetic, digest });
|
|
43
43
|
// R-QUIET: the board message is breaches-or-silence; a real write's disclosure still speaks
|
|
44
44
|
// (a receipt, printed once) even when the board itself has nothing to push.
|
|
45
45
|
const visible = [message, disclosed].filter(Boolean).join('\n') || null;
|
|
@@ -12,7 +12,10 @@ The substrate refuses dishonesty by construction — work with it, not around it
|
|
|
12
12
|
|
|
13
13
|
1. **Claim before you build.** Substantive work starts with `oathe_claim {task_id, objective}`.
|
|
14
14
|
A claim takes responsibility; it never mints the work as done. A task without a real plan
|
|
15
|
-
is honestly `plan_status: "unknown"` — never fabricate one.
|
|
15
|
+
is honestly `plan_status: "unknown"` — never fabricate one. Work you claim while this
|
|
16
|
+
session already holds a claim is recorded as spawned under it (the board and the breach
|
|
17
|
+
digest show siblings as one row under the parent); pass `parent: null` for standalone
|
|
18
|
+
work, or `parent: "<task>"` to name the claim it serves.
|
|
16
19
|
2. **Statements as you go.** Record findings and progress with
|
|
17
20
|
`oathe_statement {task_id, proposition, evidence_ref}`. A statement is a statement, not
|
|
18
21
|
truth — nothing settles by saying it.
|
package/src/activation.mjs
CHANGED
|
@@ -67,6 +67,9 @@ export async function activateWorkspace({
|
|
|
67
67
|
// The lock spans the whole read-modify-write over the shared manifest: concurrent hooks and
|
|
68
68
|
// servers activate at once, and save() alone cannot prevent a lost update.
|
|
69
69
|
await withFileLock(manifest.manifestPath, async () => {
|
|
70
|
+
// The file, not the snapshot (B4): this manifest object may have been loaded when the
|
|
71
|
+
// server's context was built, days before — read what is on disk now, then add to THAT.
|
|
72
|
+
manifest.refresh();
|
|
70
73
|
for (const file of targets) {
|
|
71
74
|
const target = path.join(cwd, file);
|
|
72
75
|
const { changed } = writeFence({ manifest, file: target, version, body: fenceBody(workspace), scope: 'project' });
|