@oathe/oathe 0.2.3 → 0.3.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/NOTICE +3 -4
- package/README.md +15 -45
- package/assets/oathe-hero.svg +92 -0
- package/bin/oathe.mjs +397 -59
- package/docs/PRIVACY.md +13 -5
- package/notch/Oathe Notch.app/Contents/Info.plist +13 -0
- package/notch/Oathe Notch.app/Contents/MacOS/OatheNotch +0 -0
- package/notch/Oathe Notch.app/Contents/_CodeSignature/CodeResources +115 -0
- package/notch/README.md +88 -0
- package/package.json +13 -4
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +36 -0
- package/plugin/.mcp.json +1 -4
- package/plugin/commands/verify.md +18 -0
- package/plugin/hooks/frame-note.mjs +5 -3
- package/plugin/hooks/heartbeat.mjs +21 -25
- package/plugin/hooks/lib.mjs +96 -33
- package/plugin/hooks/render-board.mjs +47 -7
- package/src/activation.mjs +126 -0
- package/src/atif.mjs +4 -13
- package/src/blocks.mjs +113 -8
- package/src/board-render.mjs +55 -29
- package/src/config.mjs +100 -15
- package/src/context.mjs +4 -8
- package/src/doctor.mjs +96 -15
- package/src/fence.mjs +85 -0
- package/src/fslock.mjs +51 -0
- package/src/harnesses/catalog.mjs +180 -0
- package/src/harnesses/claude.mjs +196 -0
- package/src/harnesses/codex.mjs +188 -0
- package/src/harnesses/cursor.mjs +234 -0
- package/src/harnesses/dialects.mjs +52 -0
- package/src/harnesses/harness.mjs +203 -0
- package/src/harnesses/surfaces.mjs +71 -0
- package/src/home.mjs +107 -0
- package/src/init.mjs +101 -21
- package/src/launch-env.mjs +1 -51
- package/src/launch.mjs +36 -105
- package/src/manifest.mjs +7 -3
- package/src/mcp/connection.mjs +218 -0
- package/src/mcp/oathe-tools.mjs +380 -141
- package/src/notch.mjs +154 -0
- package/src/pager.mjs +178 -0
- package/src/paths.mjs +13 -1
- package/src/plans.mjs +10 -2
- package/src/registry.mjs +110 -0
- package/src/runtime/discharge.mjs +1 -1
- package/src/runtime/provider.mjs +10 -7
- package/src/runtime/simple-cage.mjs +18 -9
- package/src/runtime/sql-acceptance-lane.mjs +1 -1
- package/src/session-host.mjs +8 -6
- package/src/sessions.mjs +168 -0
- package/src/setup.mjs +494 -0
- package/src/speaker.mjs +65 -0
- package/src/statements.mjs +113 -0
- package/src/substrate.mjs +44 -0
- package/src/successor.mjs +1 -1
- package/src/traces.mjs +8 -8
- package/src/uninstall.mjs +10 -2
- package/src/verifier.mjs +135 -47
- package/src/verify-dispatch.mjs +169 -0
- package/src/welcome.mjs +32 -0
- package/src/wire.mjs +64 -0
- package/src/workspace-resolver.mjs +178 -0
- package/src/workspace.mjs +16 -5
- package/vendor/ddl/001_core.sql +1 -1
- package/vendor/ddl/004_delegation.sql +1 -1
- package/vendor/ddl/006_dependency.sql +1 -1
- package/vendor/ddl/008_effect_receipt.sql +1 -1
- package/vendor/ddl/009_verified_edge.sql +1 -1
- package/vendor/ddl/011_confirm.sql +2 -2
- package/vendor/ddl/manifest.json +8 -8
- package/assets/handoff-splash.png +0 -0
- package/src/harness.mjs +0 -271
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// oathe — the Claude Code adapter: owned JSON paths in ~/.claude/settings.json declare the
|
|
2
|
+
// install, the claude CLI materializes it, and the CLI's own plugin registry is the proof.
|
|
3
|
+
// Every Claude-specific fact — context file, project-dir env var, hook dialect, verifier
|
|
4
|
+
// command line, trace store — is a named member HERE.
|
|
5
|
+
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
|
|
9
|
+
import { Harness, HarnessOnboardError } from './harness.mjs';
|
|
10
|
+
import { cwdDialect } from './dialects.mjs';
|
|
11
|
+
import { JsonEntries } from '../blocks.mjs';
|
|
12
|
+
import { sha256Hex } from '../manifest.mjs';
|
|
13
|
+
|
|
14
|
+
export class ClaudeHarness extends Harness {
|
|
15
|
+
static harnessName = 'claude';
|
|
16
|
+
static displayName = 'Claude Code';
|
|
17
|
+
static covers = 'CLI'; // the desktop app exists but the row stays CLI (ruling 2026-08-29 — no confusion)
|
|
18
|
+
static bin = 'claude';
|
|
19
|
+
static clientNames = Object.freeze(['claude-code', 'claude']);
|
|
20
|
+
static contextFiles = Object.freeze(['CLAUDE.md']);
|
|
21
|
+
// Claude Code sets this directly in every spawned stdio server's and hook's environment —
|
|
22
|
+
// the documented way a server learns the project root on this harness.
|
|
23
|
+
static projectDirEnvVar = 'CLAUDE_PROJECT_DIR';
|
|
24
|
+
static wiring = Object.freeze({ needsCli: true });
|
|
25
|
+
static hooks = Object.freeze({ dialect: cwdDialect });
|
|
26
|
+
// Claude Code shows the systemMessage banner inside its own TUI — no scrollback splash needed.
|
|
27
|
+
static launch = Object.freeze({ splash: false, bin: 'claude' });
|
|
28
|
+
// One name everywhere claude runs (founder ruling 2026-08-30: no desktop/CLI split).
|
|
29
|
+
static surfaces = Object.freeze({
|
|
30
|
+
ownsExec: (exec) => path.basename(exec) === 'claude',
|
|
31
|
+
name: () => 'claude',
|
|
32
|
+
});
|
|
33
|
+
static install = Object.freeze({ npm: '@anthropic-ai/claude-code', bin: 'claude', versionArgs: ['--version'] });
|
|
34
|
+
// Non-interactive auth: ANTHROPIC_API_KEY (claude-code/headless.md, pinned 2026-08-29).
|
|
35
|
+
static headless = Object.freeze({
|
|
36
|
+
auth: ['ANTHROPIC_API_KEY'],
|
|
37
|
+
command: (prompt, model = null) => ['claude', ['-p', prompt, '--output-format', 'json', ...(model ? ['--model', model] : [])]],
|
|
38
|
+
extract: (stdout) => ClaudeHarness.extractJsonResult(stdout),
|
|
39
|
+
});
|
|
40
|
+
static traces = Object.freeze({
|
|
41
|
+
store: async ({ home }) => new (await import('../traces.mjs')).ClaudeTraceStore({ home, harness: this.harnessName }),
|
|
42
|
+
newest: (store) => store.newestTranscript(),
|
|
43
|
+
projector: async ({ store }) => new (await import('../atif.mjs')).ClaudeAtifProjector({ store }),
|
|
44
|
+
ownsPath: (file) => String(file).includes(`${path.sep}.claude${path.sep}`),
|
|
45
|
+
});
|
|
46
|
+
static docs = Object.freeze([
|
|
47
|
+
'claude-code/mcp', 'claude-code/plugins', 'claude-code/plugins-reference', 'claude-code/hooks',
|
|
48
|
+
'claude-code/settings', 'claude-code/desktop', 'claude-code/memory', 'claude-code/managed-mcp',
|
|
49
|
+
'claude-code/cli-reference', 'claude-code/headless',
|
|
50
|
+
]);
|
|
51
|
+
|
|
52
|
+
constructor(o) {
|
|
53
|
+
super({ ...o, name: 'claude' });
|
|
54
|
+
this.entries = new JsonEntries();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
get settingsPath() {
|
|
58
|
+
return path.join(this.configHome, 'settings.json');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** The exact keys oathe owns in settings.json — the whole Claude install. */
|
|
62
|
+
#ownedEntries() {
|
|
63
|
+
return [
|
|
64
|
+
{
|
|
65
|
+
// "directory" is what the INSTALLED CLI's settings schema accepts (verified empirically
|
|
66
|
+
// on 2.1.241: the pre-existing custom-plugins entry validates, a "local" entry is
|
|
67
|
+
// rejected with "Invalid input" and the whole file is skipped). The docs say "local";
|
|
68
|
+
// the binary outranks the docs.
|
|
69
|
+
path: ['extraKnownMarketplaces', 'oathe'],
|
|
70
|
+
value: { source: { source: 'directory', path: this.paths.packageRoot } },
|
|
71
|
+
},
|
|
72
|
+
{ path: ['enabledPlugins', 'oathe@oathe'], value: true },
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
get registryDir() {
|
|
77
|
+
return path.join(this.configHome, 'plugins');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
get installedFile() {
|
|
81
|
+
return path.join(this.registryDir, 'installed_plugins.json');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
#readRegistry(file) {
|
|
85
|
+
try { return JSON.parse(fs.readFileSync(file, 'utf8')); } catch { return null; }
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
#installedVersion() {
|
|
89
|
+
return this.#readRegistry(this.installedFile)?.plugins?.['oathe@oathe']?.[0]?.version ?? null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** The path the CLI's registry records for the oathe marketplace, or null when unknown. */
|
|
93
|
+
#marketplacePath() {
|
|
94
|
+
return this.#readRegistry(path.join(this.registryDir, 'known_marketplaces.json'))?.oathe?.source?.path ?? null;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
installedPluginVersion() {
|
|
98
|
+
return this.#installedVersion();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
#cli(args) {
|
|
102
|
+
const result = this.exec.run('claude', args);
|
|
103
|
+
if (result.status !== 0) {
|
|
104
|
+
throw new HarnessOnboardError('CLAUDE_CLI_FAILED',
|
|
105
|
+
`claude ${args.join(' ')} exited ${result.status}: ${result.stderr.trim()}`, { args });
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** What init writes — from the owned entries and the registry the CLI materializes into. */
|
|
111
|
+
describe() {
|
|
112
|
+
return [
|
|
113
|
+
`${this.settingsPath}: owns ${this.#ownedEntries().map((e) => e.path.join('.')).join(' and ')}`,
|
|
114
|
+
`\`claude plugin install oathe@oathe\` — the Oathe plugin (board at session start, auto-save hooks, the oathe_* MCP tools), recorded in ${this.installedFile}`,
|
|
115
|
+
];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
onboard({ manifest, version }) {
|
|
119
|
+
const entries = this.#ownedEntries();
|
|
120
|
+
const before = fs.existsSync(this.settingsPath) ? fs.readFileSync(this.settingsPath, 'utf8') : '';
|
|
121
|
+
manifest.backupOnce(this.settingsPath);
|
|
122
|
+
const { content, changed } = this.entries.apply(before, entries);
|
|
123
|
+
if (changed) {
|
|
124
|
+
fs.mkdirSync(path.dirname(this.settingsPath), { recursive: true });
|
|
125
|
+
fs.writeFileSync(this.settingsPath, content);
|
|
126
|
+
}
|
|
127
|
+
manifest.upsert({
|
|
128
|
+
harness: this.name,
|
|
129
|
+
file: this.settingsPath,
|
|
130
|
+
kind: 'json-path',
|
|
131
|
+
detail: { paths: entries.map((e) => e.path) },
|
|
132
|
+
blockVersion: version,
|
|
133
|
+
sha256: sha256Hex(JSON.stringify(entries)),
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// MATERIALIZE via the CLI. The settings entries above are the declarative pin, but the CLI's
|
|
137
|
+
// own registry (installed_plugins.json) is what sessions load from — and the install is a
|
|
138
|
+
// CACHED COPY keyed by version, so a version change must evict the stale copy.
|
|
139
|
+
const installed = this.#installedVersion();
|
|
140
|
+
// UPGRADE PATH: the package root MOVES between installs (an nvm node switch, npm link). A
|
|
141
|
+
// marketplace known at another path materializes stale code — even at the same version —
|
|
142
|
+
// so a moved source is a materialization exactly like a version change: re-register the
|
|
143
|
+
// marketplace from this root, then reinstall the plugin from it.
|
|
144
|
+
const known = this.#marketplacePath();
|
|
145
|
+
const moved = known !== null && known !== this.paths.packageRoot;
|
|
146
|
+
let materialized = false;
|
|
147
|
+
if (installed !== version || moved) {
|
|
148
|
+
if (moved) this.#cli(['plugin', 'marketplace', 'remove', 'oathe']);
|
|
149
|
+
if (known === null || moved) this.#cli(['plugin', 'marketplace', 'add', this.paths.packageRoot]);
|
|
150
|
+
// Removing a marketplace takes the plugins installed from it along (observed on the real
|
|
151
|
+
// CLI, 2026-08-29) — decide the uninstall on what is installed NOW, not what was.
|
|
152
|
+
if (this.#installedVersion() !== null) this.#cli(['plugin', 'uninstall', 'oathe@oathe']);
|
|
153
|
+
this.#cli(['plugin', 'install', 'oathe@oathe']);
|
|
154
|
+
if (this.#installedVersion() !== version) {
|
|
155
|
+
throw new HarnessOnboardError('CLAUDE_VERIFICATION_FAILED',
|
|
156
|
+
'verification failed: `claude plugin install oathe@oathe` reported success but '
|
|
157
|
+
+ `${this.installedFile} does not record version ${version} — refusing to record an `
|
|
158
|
+
+ 'install that cannot be proven');
|
|
159
|
+
}
|
|
160
|
+
materialized = true;
|
|
161
|
+
}
|
|
162
|
+
manifest.upsert({
|
|
163
|
+
harness: this.name,
|
|
164
|
+
file: this.installedFile,
|
|
165
|
+
kind: 'cli-managed',
|
|
166
|
+
detail: {
|
|
167
|
+
id: 'plugin-install',
|
|
168
|
+
proof: 'oathe@oathe',
|
|
169
|
+
undo: [['plugin', 'uninstall', 'oathe@oathe'], ['plugin', 'marketplace', 'remove', 'oathe']],
|
|
170
|
+
},
|
|
171
|
+
blockVersion: version,
|
|
172
|
+
sha256: sha256Hex('oathe@oathe'),
|
|
173
|
+
});
|
|
174
|
+
return [
|
|
175
|
+
{ action: 'settings-owned-paths', file: this.settingsPath, changed },
|
|
176
|
+
{ action: materialized ? 'plugin-installed' : 'plugin-already-current', file: this.installedFile },
|
|
177
|
+
];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
offboard({ manifest }) {
|
|
181
|
+
const rows = manifest.removeWhere((r) => r.harness === this.name);
|
|
182
|
+
const actions = [];
|
|
183
|
+
for (const row of rows.filter((r) => r.kind === 'cli-managed')) {
|
|
184
|
+
for (const undo of row.detail?.undo ?? []) {
|
|
185
|
+
const result = this.exec.run('claude', undo);
|
|
186
|
+
actions.push({ action: `claude-undo-${undo.join('-')}`, status: result.status });
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (!fs.existsSync(this.settingsPath)) return [...actions, { action: 'settings-absent' }];
|
|
190
|
+
const before = fs.readFileSync(this.settingsPath, 'utf8');
|
|
191
|
+
const ownedPaths = rows.flatMap((r) => r.detail?.paths ?? []);
|
|
192
|
+
const { content, changed } = this.entries.remove(before, ownedPaths);
|
|
193
|
+
if (changed) fs.writeFileSync(this.settingsPath, content);
|
|
194
|
+
return [...actions, { action: 'settings-owned-paths-removed', file: this.settingsPath, changed }];
|
|
195
|
+
}
|
|
196
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
// oathe — the OpenAI Codex adapter (one host serves the CLI, the IDE extension, and the
|
|
2
|
+
// ChatGPT desktop app): three sanctioned CLIs register the install, and the config.toml
|
|
3
|
+
// stanza each one writes is the proof (its stanzas are Codex-managed bookkeeping — writing
|
|
4
|
+
// them by hand is how two managers end up owning one file). Every Codex-specific fact is a
|
|
5
|
+
// named member HERE. Codex allowlist-filters the env it hands MCP servers and documents no
|
|
6
|
+
// project-dir variable — the resolution ladder's cwd/refusal steps carry this harness.
|
|
7
|
+
|
|
8
|
+
import fs from 'node:fs';
|
|
9
|
+
import path from 'node:path';
|
|
10
|
+
|
|
11
|
+
import { Harness, HarnessOnboardError } from './harness.mjs';
|
|
12
|
+
import { cwdDialect } from './dialects.mjs';
|
|
13
|
+
import { sha256Hex } from '../manifest.mjs';
|
|
14
|
+
|
|
15
|
+
// The id Codex knows the plugin by (plugin@marketplace) — the registrations install it and
|
|
16
|
+
// Codex keys its own hook-trust bookkeeping under it.
|
|
17
|
+
const PLUGIN_ID = 'oathe@oathe';
|
|
18
|
+
|
|
19
|
+
/** realpath when the path exists (macOS aliases /var → /private/var), else the normalized path. */
|
|
20
|
+
function realpathOr(p) {
|
|
21
|
+
try { return fs.realpathSync(p); } catch { return path.resolve(p); }
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class CodexHarness extends Harness {
|
|
25
|
+
static harnessName = 'codex';
|
|
26
|
+
static displayName = 'Codex';
|
|
27
|
+
static covers = 'CLI/Desktop App'; // ChatGPT desktop rides the same ~/.codex wiring
|
|
28
|
+
static bin = 'codex';
|
|
29
|
+
static clientNames = Object.freeze(['codex']);
|
|
30
|
+
static contextFiles = Object.freeze(['AGENTS.md']);
|
|
31
|
+
static projectDirEnvVar = null;
|
|
32
|
+
static wiring = Object.freeze({ needsCli: true });
|
|
33
|
+
static hooks = Object.freeze({ dialect: cwdDialect });
|
|
34
|
+
// Codex buries hook output in its ctrl+T transcript overlay, unrendered — the launcher's
|
|
35
|
+
// ANSI splash into terminal scrollback is this harness's quirk.
|
|
36
|
+
static launch = Object.freeze({ splash: true, bin: 'codex' });
|
|
37
|
+
// The ChatGPT desktop app embeds codex (…/ChatGPT.app/Contents/Resources/codex, live
|
|
38
|
+
// trace 2026-08-30) — the SURFACE is chatgpt there, codex in a terminal.
|
|
39
|
+
static surfaces = Object.freeze({
|
|
40
|
+
ownsExec: (exec) => path.basename(exec) === 'codex',
|
|
41
|
+
name: ({ appBundle }) => (appBundle !== null && path.basename(appBundle) === 'ChatGPT.app' ? 'chatgpt' : 'codex'),
|
|
42
|
+
});
|
|
43
|
+
// Codex reads its global instructions before any work, in EVERY session — the one channel
|
|
44
|
+
// that reaches a ChatGPT-desktop session, whose staging cwd carries no folder fence. Its
|
|
45
|
+
// rule (docs, agents-md): AGENTS.override.md if it exists, otherwise AGENTS.md.
|
|
46
|
+
static globalContextFiles = Object.freeze(['AGENTS.override.md', 'AGENTS.md']);
|
|
47
|
+
// The ChatGPT desktop app runs every conversation from a directory it stages under the
|
|
48
|
+
// config home — not a project folder. Sessions there serve the FULL board and are never
|
|
49
|
+
// activated (R-BOARD-SCOPE); this member is the only place the staging path is spelled.
|
|
50
|
+
static syntheticWorkspaceParent = '.chatgpt-projects';
|
|
51
|
+
|
|
52
|
+
static isSyntheticWorkspaceDir({ dir, home }) {
|
|
53
|
+
const parent = realpathOr(path.join(this.configHomeFor(home), this.syntheticWorkspaceParent));
|
|
54
|
+
return realpathOr(dir).startsWith(`${parent}${path.sep}`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
static install = Object.freeze({ npm: '@openai/codex', bin: 'codex', versionArgs: ['--version'] });
|
|
58
|
+
// Non-interactive auth: CODEX_API_KEY "provides an API key to a non-interactive Codex
|
|
59
|
+
// process" (codex/environment-variables.md:49, pinned 2026-08-29).
|
|
60
|
+
static headless = Object.freeze({
|
|
61
|
+
auth: ['CODEX_API_KEY'],
|
|
62
|
+
command: (prompt, model = null) => ['codex', ['exec', '--skip-git-repo-check', ...(model ? ['-m', model] : []), prompt]],
|
|
63
|
+
extract: (stdout) => stdout,
|
|
64
|
+
});
|
|
65
|
+
static traces = Object.freeze({
|
|
66
|
+
store: async ({ home }) => new (await import('../traces.mjs')).CodexTraceStore({ home, harness: this.harnessName }),
|
|
67
|
+
newest: (store) => store.newestRollout(),
|
|
68
|
+
projector: async ({ store }) => new (await import('../atif.mjs')).CodexAtifProjector({ store }),
|
|
69
|
+
ownsPath: (file) => String(file).includes(`${path.sep}.codex${path.sep}`),
|
|
70
|
+
});
|
|
71
|
+
static docs = Object.freeze([
|
|
72
|
+
'codex/mcp', 'codex/config-reference', 'codex/environment-variables', 'codex/agents-md', 'codex/hooks',
|
|
73
|
+
'codex/projects', 'codex/plugins', 'codex/submit-claude-plugin',
|
|
74
|
+
]);
|
|
75
|
+
|
|
76
|
+
constructor(o) {
|
|
77
|
+
super({ ...o, name: 'codex' });
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
get configPath() {
|
|
81
|
+
return path.join(this.configHome, 'config.toml');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The sanctioned registrations, each with the CLI that makes it, the config.toml stanza that
|
|
86
|
+
* proves it landed, and the CLI that undoes it.
|
|
87
|
+
*/
|
|
88
|
+
#registrations() {
|
|
89
|
+
return [
|
|
90
|
+
{
|
|
91
|
+
id: 'marketplace',
|
|
92
|
+
add: ['plugin', 'marketplace', 'add', this.paths.packageRoot],
|
|
93
|
+
proof: '[marketplaces.oathe]',
|
|
94
|
+
undo: ['plugin', 'marketplace', 'remove', 'oathe'],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: 'plugin',
|
|
98
|
+
add: ['plugin', 'add', PLUGIN_ID],
|
|
99
|
+
proof: `[plugins."${PLUGIN_ID}"]`,
|
|
100
|
+
undo: ['plugin', 'remove', PLUGIN_ID],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: 'mcp-server',
|
|
104
|
+
add: ['mcp', 'add', 'oathe', '--', 'oathe', 'mcp'],
|
|
105
|
+
proof: '[mcp_servers.oathe]',
|
|
106
|
+
undo: ['mcp', 'remove', 'oathe'],
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** What init writes — from the registrations the CLI makes and the global fence target. */
|
|
112
|
+
describe() {
|
|
113
|
+
const globals = this.constructor.globalContextFiles.map((f) => path.join(this.configHome, f)).join(' (or ');
|
|
114
|
+
return [
|
|
115
|
+
`${this.configPath}: ${this.#registrations().map((r) => r.proof).join(', ')} via the codex CLI (marketplace, plugin, MCP server)`,
|
|
116
|
+
`${globals}${this.constructor.globalContextFiles.length > 1 ? ')' : ''}: the standing Oathe rule for every Codex session — ChatGPT desktop reads it too`,
|
|
117
|
+
];
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
onboard({ manifest, version }) {
|
|
121
|
+
manifest.backupOnce(this.configPath);
|
|
122
|
+
for (const reg of this.#registrations()) {
|
|
123
|
+
let result = this.exec.run('codex', reg.add);
|
|
124
|
+
// UPGRADE PATH: the package root MOVED (an nvm node switch, npm link) — the CLI refuses a
|
|
125
|
+
// marketplace "already added from a different source". Re-register from this root: the
|
|
126
|
+
// undo the manifest already records, then the add again, proof-checked below.
|
|
127
|
+
if (result.status !== 0 && /already added from a different source/.test(result.stderr)) {
|
|
128
|
+
this.exec.run('codex', reg.undo);
|
|
129
|
+
result = this.exec.run('codex', reg.add);
|
|
130
|
+
}
|
|
131
|
+
if (result.status !== 0) {
|
|
132
|
+
throw new HarnessOnboardError('CODEX_CLI_FAILED',
|
|
133
|
+
`codex ${reg.add.join(' ')} exited ${result.status}: ${result.stderr.trim()}`, { reg: reg.id });
|
|
134
|
+
}
|
|
135
|
+
const config = fs.existsSync(this.configPath) ? fs.readFileSync(this.configPath, 'utf8') : '';
|
|
136
|
+
if (!config.includes(reg.proof)) {
|
|
137
|
+
throw new HarnessOnboardError('CODEX_VERIFICATION_FAILED',
|
|
138
|
+
`verification failed: codex ${reg.add.join(' ')} reported success but ${this.configPath} `
|
|
139
|
+
+ `carries no ${reg.proof} stanza — refusing to record an install that cannot be proven`,
|
|
140
|
+
{ reg: reg.id });
|
|
141
|
+
}
|
|
142
|
+
manifest.upsert({
|
|
143
|
+
harness: this.name,
|
|
144
|
+
file: this.configPath,
|
|
145
|
+
kind: 'cli-managed',
|
|
146
|
+
detail: { id: reg.id, proof: reg.proof, undo: reg.undo },
|
|
147
|
+
blockVersion: version,
|
|
148
|
+
sha256: sha256Hex(reg.proof),
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
return this.#registrations().map((r) => ({ action: `codex-${r.id}` }));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
offboard({ manifest }) {
|
|
155
|
+
const rows = manifest.removeWhere((r) => r.harness === this.name);
|
|
156
|
+
const actions = [];
|
|
157
|
+
// Undo in reverse install order, so the plugin is gone before its marketplace is.
|
|
158
|
+
for (const row of rows.reverse()) {
|
|
159
|
+
const undo = row.detail?.undo;
|
|
160
|
+
if (!undo) continue;
|
|
161
|
+
const result = this.exec.run('codex', undo);
|
|
162
|
+
actions.push({ action: `codex-undo-${row.detail.id}`, status: result.status });
|
|
163
|
+
}
|
|
164
|
+
// Codex keys hook-trust records under our plugin id; the undo CLIs orphan them, and an
|
|
165
|
+
// orphan carrying 'oathe' is still an oathe entry on this surface (ruling 2026-08-29:
|
|
166
|
+
// delete exactly the keys prefixed by our id, touch nothing else).
|
|
167
|
+
if (this.#clearHooksState() > 0) actions.push({ action: 'codex-hooks-state-cleared', status: 0 });
|
|
168
|
+
return actions;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** Remove the `[hooks.state."<PLUGIN_ID>:…"]` tables from config.toml; every other line stays. */
|
|
172
|
+
#clearHooksState() {
|
|
173
|
+
if (!fs.existsSync(this.configPath)) return 0;
|
|
174
|
+
const prefix = `[hooks.state."${PLUGIN_ID}:`;
|
|
175
|
+
const kept = [];
|
|
176
|
+
let removed = 0;
|
|
177
|
+
let skipping = false;
|
|
178
|
+
for (const line of fs.readFileSync(this.configPath, 'utf8').split('\n')) {
|
|
179
|
+
if (line.trimStart().startsWith('[')) {
|
|
180
|
+
skipping = line.trimStart().startsWith(prefix);
|
|
181
|
+
if (skipping) removed += 1;
|
|
182
|
+
}
|
|
183
|
+
if (!skipping) kept.push(line);
|
|
184
|
+
}
|
|
185
|
+
if (removed > 0) fs.writeFileSync(this.configPath, kept.join('\n'));
|
|
186
|
+
return removed;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
// oathe — the Cursor adapter (IDE and CLI share ~/.cursor). Wiring is installer-written owned
|
|
2
|
+
// entries: an object path in ~/.cursor/mcp.json and owned ARRAY elements among the user's own
|
|
3
|
+
// hooks in ~/.cursor/hooks.json — both documented user-editable and hot-reloaded, verified
|
|
4
|
+
// after every write, backed up once, manifest-recorded, byte-reversible.
|
|
5
|
+
// Schema source: .harness-docs/cursor/{mcp,hooks}.md (pinned 2026-08-28).
|
|
6
|
+
//
|
|
7
|
+
// Cursor quirks the facts encode: hook payloads carry `workspace_roots[]` (not `cwd`) and the
|
|
8
|
+
// sessionStart reply is snake_case fire-and-forget; hook scripts see CURSOR_PROJECT_DIR (with
|
|
9
|
+
// a CLAUDE_PROJECT_DIR compatibility alias) but MCP servers get NO documented project-dir env
|
|
10
|
+
// var — the resolution ladder's roots/cwd steps carry them; a machine can hold ~/.cursor with
|
|
11
|
+
// no CLI on PATH (the IDE alone), so detection keys on the config home; user hooks run from
|
|
12
|
+
// ~/.cursor and GUI apps read no shell rc, so every command is an ABSOLUTE path.
|
|
13
|
+
|
|
14
|
+
import fs from 'node:fs';
|
|
15
|
+
import path from 'node:path';
|
|
16
|
+
|
|
17
|
+
import { Harness, HarnessOnboardError } from './harness.mjs';
|
|
18
|
+
import { workspaceRootsDialect } from './dialects.mjs';
|
|
19
|
+
import { JsonArrayEntries, JsonEntries } from '../blocks.mjs';
|
|
20
|
+
import { sha256Hex } from '../manifest.mjs';
|
|
21
|
+
|
|
22
|
+
const HOOK_EVENTS = Object.freeze([
|
|
23
|
+
{ event: 'sessionStart', script: 'render-board' },
|
|
24
|
+
{ event: 'stop', script: 'heartbeat' },
|
|
25
|
+
{ event: 'preCompact', script: 'frame-note' },
|
|
26
|
+
]);
|
|
27
|
+
|
|
28
|
+
export class CursorHarness extends Harness {
|
|
29
|
+
static harnessName = 'cursor';
|
|
30
|
+
static displayName = 'Cursor';
|
|
31
|
+
static covers = 'CLI/Desktop App';
|
|
32
|
+
static bin = 'cursor-agent';
|
|
33
|
+
// The installer ships both names (verified 2026-08-29); either on PATH is the CLI.
|
|
34
|
+
static cliBins = Object.freeze(['cursor-agent', 'cursor']);
|
|
35
|
+
static clientNames = Object.freeze(['cursor']);
|
|
36
|
+
static contextFiles = Object.freeze(['AGENTS.md']);
|
|
37
|
+
static projectDirEnvVar = 'CURSOR_PROJECT_DIR';
|
|
38
|
+
// Wiring is our own JSON writes into ~/.cursor — no CLI needed; the IDE alone reads them.
|
|
39
|
+
static wiring = Object.freeze({ needsCli: false });
|
|
40
|
+
static hooks = Object.freeze({ dialect: workspaceRootsDialect });
|
|
41
|
+
// The missing primitive, restored (founder ruling 2026-08-30: all harnesses on the same
|
|
42
|
+
// primitives, each with its own adapter): cursor launches its interactive CLI agent.
|
|
43
|
+
static launch = Object.freeze({ splash: true, bin: 'cursor-agent' });
|
|
44
|
+
// The IDE's spawned children live inside Cursor.app (helper bundles); the CLI is cliBins.
|
|
45
|
+
static surfaces = Object.freeze({
|
|
46
|
+
ownsExec: (exec) => exec.includes(`${path.sep}Cursor.app${path.sep}`)
|
|
47
|
+
|| CursorHarness.cliBins.includes(path.basename(exec)),
|
|
48
|
+
name: () => 'cursor',
|
|
49
|
+
});
|
|
50
|
+
// cursor/cli-installation.md:10 (pinned 2026-08-29).
|
|
51
|
+
static install = Object.freeze({ installer: 'curl https://cursor.com/install -fsS | bash', bin: 'cursor-agent', versionArgs: ['--version'] });
|
|
52
|
+
// Headless: `agent -p --output-format json` → {type:"result", result} (cursor/cli-output-format.md);
|
|
53
|
+
// CI auth CURSOR_API_KEY (cursor/cli-authentication.md:24-37, cli-github-actions.md:17). A fresh
|
|
54
|
+
// project dir is untrusted — the CLI refuses to run there without --trust (observed live 2026-08-29).
|
|
55
|
+
static headless = Object.freeze({
|
|
56
|
+
auth: ['CURSOR_API_KEY'],
|
|
57
|
+
command: (prompt, model = null) => ['cursor-agent', ['-p', prompt, '--trust', '--output-format', 'json', ...(model ? ['--model', model] : [])]],
|
|
58
|
+
extract: (stdout) => CursorHarness.extractJsonResult(stdout),
|
|
59
|
+
});
|
|
60
|
+
static traces = null; // Cursor keeps no session store we read; its hook payload carries transcript_path: null
|
|
61
|
+
static docs = Object.freeze([
|
|
62
|
+
'cursor/mcp', 'cursor/mcp-install-links', 'cursor/hooks', 'cursor/plugins', 'cursor/plugins-reference',
|
|
63
|
+
'cursor/third-party-hooks', 'cursor/rules', 'cursor/cli-mcp', 'cursor/cli-configuration', 'cursor/cli-overview',
|
|
64
|
+
'cursor/cli-installation', 'cursor/cli-using', 'cursor/cli-headless', 'cursor/cli-authentication',
|
|
65
|
+
'cursor/cli-parameters', 'cursor/cli-output-format', 'cursor/cli-slash-commands', 'cursor/cli-permissions',
|
|
66
|
+
'cursor/cli-github-actions', 'cursor/cli-shell-mode',
|
|
67
|
+
]);
|
|
68
|
+
|
|
69
|
+
/** The IDE alone leaves no bin on PATH — the config home is the install evidence. */
|
|
70
|
+
static installedFrom(presence) {
|
|
71
|
+
return presence.configHome !== null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
constructor(o) {
|
|
75
|
+
super({ ...o, name: 'cursor' });
|
|
76
|
+
this.entries = new JsonEntries();
|
|
77
|
+
this.arrays = new JsonArrayEntries();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
get mcpConfigPath() {
|
|
83
|
+
return path.join(this.configHome, 'mcp.json');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
get hooksConfigPath() {
|
|
87
|
+
return path.join(this.configHome, 'hooks.json');
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The absolute oathe address: the bin resolved on PATH, else <node> <packageRoot>/bin/oathe.mjs
|
|
92
|
+
* (npm shims ride `#!/usr/bin/env node`, and a GUI-launched Cursor may not carry node's dir
|
|
93
|
+
* on PATH — the fallback names the runtime explicitly).
|
|
94
|
+
* @returns {{command: string, args: string[], hookPrefix: string}}
|
|
95
|
+
*/
|
|
96
|
+
#oatheAddress() {
|
|
97
|
+
for (const dir of this.envPath.split(':').filter(Boolean)) {
|
|
98
|
+
const candidate = path.join(dir, 'oathe');
|
|
99
|
+
try {
|
|
100
|
+
fs.accessSync(candidate, fs.constants.X_OK);
|
|
101
|
+
return { command: candidate, args: [], hookPrefix: candidate };
|
|
102
|
+
} catch { /* keep looking */ }
|
|
103
|
+
}
|
|
104
|
+
const binPath = path.join(this.paths.packageRoot, 'bin/oathe.mjs');
|
|
105
|
+
return { command: process.execPath, args: [binPath], hookPrefix: `${process.execPath} ${binPath}` };
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
#hookEntries(hookPrefix) {
|
|
109
|
+
return HOOK_EVENTS.map(({ event, script }) => {
|
|
110
|
+
const command = `${hookPrefix} hook ${script}`;
|
|
111
|
+
return {
|
|
112
|
+
path: ['hooks', event],
|
|
113
|
+
element: { command },
|
|
114
|
+
owns: (el) => el?.command === command,
|
|
115
|
+
match: command,
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
#readJson(file) {
|
|
121
|
+
try { return JSON.parse(fs.readFileSync(file, 'utf8')); } catch { return null; }
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
#applyOwned({ file, before, apply, verify, refuseDetail }) {
|
|
125
|
+
const { content, changed } = apply(before);
|
|
126
|
+
if (changed) {
|
|
127
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
128
|
+
fs.writeFileSync(file, content);
|
|
129
|
+
}
|
|
130
|
+
const now = this.#readJson(file);
|
|
131
|
+
if (now === null || !verify(now)) {
|
|
132
|
+
throw new HarnessOnboardError('CURSOR_VERIFICATION_FAILED',
|
|
133
|
+
`verification failed: ${file} does not carry ${refuseDetail} after the write — refusing `
|
|
134
|
+
+ 'to record an install that cannot be proven');
|
|
135
|
+
}
|
|
136
|
+
return changed;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** What init writes — from the same address and entries onboard() writes. */
|
|
140
|
+
describe() {
|
|
141
|
+
const address = this.#oatheAddress();
|
|
142
|
+
return [
|
|
143
|
+
`${this.mcpConfigPath}: mcpServers.oathe → ${[address.command, ...address.args, 'mcp'].join(' ')}`,
|
|
144
|
+
`${this.hooksConfigPath}: ${HOOK_EVENTS.map((h) => h.event).join(', ')} → ${address.hookPrefix} hook <script>`,
|
|
145
|
+
];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
onboard({ manifest, version }) {
|
|
149
|
+
const address = this.#oatheAddress();
|
|
150
|
+
const mcpValue = { command: address.command, args: [...address.args, 'mcp'] };
|
|
151
|
+
const hookEntries = this.#hookEntries(address.hookPrefix);
|
|
152
|
+
const hooksAbsentBefore = !fs.existsSync(this.hooksConfigPath);
|
|
153
|
+
// Version ownership is decided ONCE (the file we created carries our version key) and then
|
|
154
|
+
// carried forward — a re-run must upsert the SAME row identity, never mint a sibling.
|
|
155
|
+
const ownsVersion = hooksAbsentBefore
|
|
156
|
+
|| (manifest.rows.find((r) => r.harness === this.name && r.file === this.hooksConfigPath
|
|
157
|
+
&& r.kind === 'json-array')?.detail?.owns_version ?? false);
|
|
158
|
+
|
|
159
|
+
manifest.backupOnce(this.mcpConfigPath);
|
|
160
|
+
const mcpBefore = fs.existsSync(this.mcpConfigPath) ? fs.readFileSync(this.mcpConfigPath, 'utf8') : '';
|
|
161
|
+
const mcpChanged = this.#applyOwned({
|
|
162
|
+
file: this.mcpConfigPath,
|
|
163
|
+
before: mcpBefore,
|
|
164
|
+
apply: (text) => this.entries.apply(text, [{ path: ['mcpServers', 'oathe'], value: mcpValue }]),
|
|
165
|
+
verify: (doc) => doc?.mcpServers?.oathe?.command === mcpValue.command,
|
|
166
|
+
refuseDetail: 'the mcpServers.oathe entry',
|
|
167
|
+
});
|
|
168
|
+
manifest.upsert({
|
|
169
|
+
harness: this.name,
|
|
170
|
+
file: this.mcpConfigPath,
|
|
171
|
+
kind: 'json-path',
|
|
172
|
+
detail: { paths: [['mcpServers', 'oathe']] },
|
|
173
|
+
blockVersion: version,
|
|
174
|
+
sha256: sha256Hex(JSON.stringify([{ path: ['mcpServers', 'oathe'], value: mcpValue }])),
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
manifest.backupOnce(this.hooksConfigPath);
|
|
178
|
+
const hooksBefore = hooksAbsentBefore ? '' : fs.readFileSync(this.hooksConfigPath, 'utf8');
|
|
179
|
+
const hooksChanged = this.#applyOwned({
|
|
180
|
+
file: this.hooksConfigPath,
|
|
181
|
+
before: hooksBefore,
|
|
182
|
+
apply: (text) => {
|
|
183
|
+
let out = this.arrays.apply(text, hookEntries);
|
|
184
|
+
// A file we created carries the schema version; a user's own file keeps their value.
|
|
185
|
+
if (hooksAbsentBefore) out = this.entries.apply(out.content, [{ path: ['version'], value: 1 }]);
|
|
186
|
+
return out;
|
|
187
|
+
},
|
|
188
|
+
verify: (doc) => hookEntries.every((e) => (doc?.hooks?.[e.path[1]] ?? []).some((el) => el?.command === e.match)),
|
|
189
|
+
refuseDetail: 'the three owned oathe hook entries',
|
|
190
|
+
});
|
|
191
|
+
manifest.upsert({
|
|
192
|
+
harness: this.name,
|
|
193
|
+
file: this.hooksConfigPath,
|
|
194
|
+
kind: 'json-array',
|
|
195
|
+
detail: {
|
|
196
|
+
entries: hookEntries.map((e) => ({ path: e.path, match: e.match })),
|
|
197
|
+
owns_version: ownsVersion,
|
|
198
|
+
},
|
|
199
|
+
blockVersion: version,
|
|
200
|
+
sha256: sha256Hex(JSON.stringify(hookEntries.map((e) => e.match))),
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
return [
|
|
204
|
+
{ action: 'cursor-mcp-entry', file: this.mcpConfigPath, changed: mcpChanged },
|
|
205
|
+
{ action: 'cursor-hooks-entries', file: this.hooksConfigPath, changed: hooksChanged },
|
|
206
|
+
];
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
offboard({ manifest }) {
|
|
210
|
+
const rows = manifest.removeWhere((r) => r.harness === this.name);
|
|
211
|
+
const actions = [];
|
|
212
|
+
for (const row of rows) {
|
|
213
|
+
if (!fs.existsSync(row.file)) {
|
|
214
|
+
actions.push({ action: 'cursor-target-absent', file: row.file });
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
const before = fs.readFileSync(row.file, 'utf8');
|
|
218
|
+
let result;
|
|
219
|
+
if (row.kind === 'json-path') {
|
|
220
|
+
result = this.entries.remove(before, row.detail?.paths ?? []);
|
|
221
|
+
} else {
|
|
222
|
+
const entries = (row.detail?.entries ?? []).map((e) => ({
|
|
223
|
+
path: e.path,
|
|
224
|
+
owns: (el) => el?.command === e.match,
|
|
225
|
+
}));
|
|
226
|
+
result = this.arrays.remove(before, entries);
|
|
227
|
+
if (row.detail?.owns_version) result = this.entries.remove(result.content, [['version']]);
|
|
228
|
+
}
|
|
229
|
+
if (result.changed) fs.writeFileSync(row.file, result.content);
|
|
230
|
+
actions.push({ action: `cursor-removed-${row.kind}`, file: row.file, changed: result.changed });
|
|
231
|
+
}
|
|
232
|
+
return actions;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// oathe — hook payload dialects. Two wire shapes exist across the supported harnesses: the
|
|
2
|
+
// cwd shape (Claude Code and Codex: `cwd` + camelCase SessionStart output envelope) and the
|
|
3
|
+
// workspace-roots shape (Cursor: `workspace_roots[]` + snake_case fire-and-forget output).
|
|
4
|
+
// Each dialect owns its sniff, its normalization, and its output format — pinned by the
|
|
5
|
+
// fixtures in tests/fixtures/hooks/ against the .harness-docs snapshot.
|
|
6
|
+
|
|
7
|
+
/** @typedef {{cwd: string|null, sessionId: string|null, transcriptPath: string|null}} HookSession */
|
|
8
|
+
|
|
9
|
+
export const cwdDialect = Object.freeze({
|
|
10
|
+
name: 'cwd',
|
|
11
|
+
matches(input) {
|
|
12
|
+
return typeof input?.cwd === 'string';
|
|
13
|
+
},
|
|
14
|
+
/** @returns {HookSession} */
|
|
15
|
+
normalizePayload(input) {
|
|
16
|
+
return {
|
|
17
|
+
cwd: input.cwd ?? null,
|
|
18
|
+
sessionId: input.session_id ?? null,
|
|
19
|
+
transcriptPath: input.transcript_path ?? null,
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
formatSessionStart({ context, message }) {
|
|
23
|
+
// R-QUIET: a null message is SILENCE — the key is omitted, or the harness renders "null".
|
|
24
|
+
return `${JSON.stringify({
|
|
25
|
+
hookSpecificOutput: { hookEventName: 'SessionStart', additionalContext: context },
|
|
26
|
+
...(message ? { systemMessage: message } : {}),
|
|
27
|
+
})}\n`;
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const workspaceRootsDialect = Object.freeze({
|
|
32
|
+
name: 'workspace-roots',
|
|
33
|
+
matches(input) {
|
|
34
|
+
return Array.isArray(input?.workspace_roots);
|
|
35
|
+
},
|
|
36
|
+
/** @returns {HookSession} first root scopes the board — multiroot workspaces carry several */
|
|
37
|
+
normalizePayload(input) {
|
|
38
|
+
return {
|
|
39
|
+
cwd: input.workspace_roots[0] ?? null,
|
|
40
|
+
sessionId: input.session_id ?? input.conversation_id ?? null,
|
|
41
|
+
transcriptPath: input.transcript_path ?? null,
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
// Fire-and-forget: no user-visible message channel exists in this dialect, so `message`
|
|
45
|
+
// rides nowhere — context is the whole payload.
|
|
46
|
+
formatSessionStart({ context }) {
|
|
47
|
+
return `${JSON.stringify({ additional_context: context })}\n`;
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
/** Sniff order: the more specific roots shape first — a cwd field is the common fallback. */
|
|
52
|
+
export const DIALECTS = Object.freeze([workspaceRootsDialect, cwdDialect]);
|