@dzhechkov/harness-core 0.4.5 → 0.5.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/.dz-manifest.json +489 -105
- package/README.md +116 -5
- package/dist/agents-policy.d.ts +67 -0
- package/dist/agents-policy.d.ts.map +1 -0
- package/dist/agents-policy.js +258 -0
- package/dist/agents-policy.js.map +1 -0
- package/dist/codex-hooks-assets.d.ts +47 -0
- package/dist/codex-hooks-assets.d.ts.map +1 -0
- package/dist/codex-hooks-assets.js +324 -0
- package/dist/codex-hooks-assets.js.map +1 -0
- package/dist/codex-hooks-verify.d.ts +95 -0
- package/dist/codex-hooks-verify.d.ts.map +1 -0
- package/dist/codex-hooks-verify.js +169 -0
- package/dist/codex-hooks-verify.js.map +1 -0
- package/dist/codex-hooks.d.ts +341 -0
- package/dist/codex-hooks.d.ts.map +1 -0
- package/dist/codex-hooks.js +541 -0
- package/dist/codex-hooks.js.map +1 -0
- package/dist/discrimination-gate.d.ts +88 -15
- package/dist/discrimination-gate.d.ts.map +1 -1
- package/dist/discrimination-gate.js +343 -51
- package/dist/discrimination-gate.js.map +1 -1
- package/dist/feature-adr-checkpoints.d.ts +22 -0
- package/dist/feature-adr-checkpoints.d.ts.map +1 -1
- package/dist/feature-adr-checkpoints.js +42 -0
- package/dist/feature-adr-checkpoints.js.map +1 -1
- package/dist/feature-adr-routing.d.ts +218 -5
- package/dist/feature-adr-routing.d.ts.map +1 -1
- package/dist/feature-adr-routing.js +583 -54
- package/dist/feature-adr-routing.js.map +1 -1
- package/dist/guard.d.ts +13 -0
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +25 -1
- package/dist/guard.js.map +1 -1
- package/dist/index.d.ts +23 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -4
- package/dist/index.js.map +1 -1
- package/dist/loop-blobs.generated.d.ts +1 -1
- package/dist/loop-blobs.generated.d.ts.map +1 -1
- package/dist/loop-blobs.generated.js +12 -3
- package/dist/loop-blobs.generated.js.map +1 -1
- package/dist/loop-plan.d.ts +70 -0
- package/dist/loop-plan.d.ts.map +1 -1
- package/dist/loop-plan.js +103 -0
- package/dist/loop-plan.js.map +1 -1
- package/dist/loop-render.d.ts.map +1 -1
- package/dist/loop-render.js +37 -129
- package/dist/loop-render.js.map +1 -1
- package/dist/loop-run-semantics.d.ts +130 -0
- package/dist/loop-run-semantics.d.ts.map +1 -0
- package/dist/loop-run-semantics.js +257 -0
- package/dist/loop-run-semantics.js.map +1 -0
- package/dist/loop-trace.d.ts +31 -2
- package/dist/loop-trace.d.ts.map +1 -1
- package/dist/loop-trace.js +89 -12
- package/dist/loop-trace.js.map +1 -1
- package/dist/managed-hooks.d.ts +86 -0
- package/dist/managed-hooks.d.ts.map +1 -0
- package/dist/managed-hooks.js +101 -0
- package/dist/managed-hooks.js.map +1 -0
- package/dist/mutation-gate.d.ts +14 -0
- package/dist/mutation-gate.d.ts.map +1 -1
- package/dist/mutation-gate.js +25 -2
- package/dist/mutation-gate.js.map +1 -1
- package/dist/named-lock.d.ts +57 -0
- package/dist/named-lock.d.ts.map +1 -0
- package/dist/named-lock.js +247 -0
- package/dist/named-lock.js.map +1 -0
- package/dist/operations.d.ts +229 -0
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +880 -26
- package/dist/operations.js.map +1 -1
- package/dist/parity.d.ts +106 -1
- package/dist/parity.d.ts.map +1 -1
- package/dist/parity.js +209 -5
- package/dist/parity.js.map +1 -1
- package/dist/qe-bridge.d.ts +291 -0
- package/dist/qe-bridge.d.ts.map +1 -0
- package/dist/qe-bridge.js +538 -0
- package/dist/qe-bridge.js.map +1 -0
- package/dist/recall-usage.d.ts +53 -0
- package/dist/recall-usage.d.ts.map +1 -1
- package/dist/recall-usage.js +125 -2
- package/dist/recall-usage.js.map +1 -1
- package/dist/score.d.ts.map +1 -1
- package/dist/score.js +43 -9
- package/dist/score.js.map +1 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +14 -26
- package/dist/setup.js.map +1 -1
- package/dist/shell-veto-policy.d.ts +53 -0
- package/dist/shell-veto-policy.d.ts.map +1 -0
- package/dist/shell-veto-policy.js +103 -0
- package/dist/shell-veto-policy.js.map +1 -0
- package/dist/skills.d.ts +86 -1
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js +116 -1
- package/dist/skills.js.map +1 -1
- package/dist/targets.d.ts +75 -0
- package/dist/targets.d.ts.map +1 -1
- package/dist/targets.js +160 -0
- package/dist/targets.js.map +1 -1
- package/dist/workflow-run-dispatch.d.ts +230 -0
- package/dist/workflow-run-dispatch.d.ts.map +1 -0
- package/dist/workflow-run-dispatch.js +363 -0
- package/dist/workflow-run-dispatch.js.map +1 -0
- package/dist/workflow-run.d.ts +498 -0
- package/dist/workflow-run.d.ts.map +1 -0
- package/dist/workflow-run.js +1359 -0
- package/dist/workflow-run.js.map +1 -0
- package/package.json +6 -5
- package/sbom.json +1099 -139
- package/src/agents-policy.ts +338 -0
- package/src/codex-hooks-assets.ts +328 -0
- package/src/codex-hooks-verify.ts +237 -0
- package/src/codex-hooks.ts +723 -0
- package/src/discrimination-gate.ts +456 -58
- package/src/feature-adr-checkpoints.ts +38 -0
- package/src/feature-adr-routing.ts +697 -75
- package/src/guard.ts +36 -1
- package/src/index.ts +162 -2
- package/src/loop-blobs.generated.ts +12 -3
- package/src/loop-plan.ts +185 -0
- package/src/loop-render.ts +37 -127
- package/src/loop-run-semantics.ts +278 -0
- package/src/loop-trace.ts +84 -10
- package/src/managed-hooks.ts +150 -0
- package/src/mutation-gate.ts +24 -2
- package/src/named-lock.ts +277 -0
- package/src/operations.ts +1121 -29
- package/src/parity.ts +295 -6
- package/src/qe-bridge.ts +737 -0
- package/src/recall-usage.ts +184 -1
- package/src/score.ts +50 -9
- package/src/setup.ts +26 -27
- package/src/shell-veto-policy.ts +119 -0
- package/src/skills.ts +174 -1
- package/src/targets.ts +189 -0
- package/src/workflow-run-dispatch.ts +459 -0
- package/src/workflow-run.ts +1743 -0
package/dist/operations.d.ts
CHANGED
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
*/
|
|
8
|
+
import { type CodexHooksPaths, type HooksListHookMetadata } from './codex-hooks.js';
|
|
9
|
+
import { type CodexHookTrustStatus, type VetoProbeEvidence, type VetoProbeResult } from './codex-hooks-verify.js';
|
|
10
|
+
import type { SkillApplyFailure, SkillLoadFailure } from './skills.js';
|
|
8
11
|
import type { TargetName } from './targets.js';
|
|
12
|
+
import { type AgentsMdBudget, type PolicyDriftFinding, type PolicySource } from './agents-policy.js';
|
|
9
13
|
/** Options for {@link runInit}. */
|
|
10
14
|
export interface InitOptions {
|
|
11
15
|
readonly target: TargetName;
|
|
@@ -39,6 +43,27 @@ export interface InitReport {
|
|
|
39
43
|
* installing fewer skills than the selection asked for.
|
|
40
44
|
*/
|
|
41
45
|
readonly missing: string[];
|
|
46
|
+
/**
|
|
47
|
+
* Skill directories that could not be LOADED (unparseable `SKILL.md`, unreadable
|
|
48
|
+
* file, schema rejection). Additive and always present — empty when nothing failed.
|
|
49
|
+
*
|
|
50
|
+
* Before feature dz-cli-defects a single unloadable skill threw out of the whole
|
|
51
|
+
* loop, so `dz init`/`dz install` reported nothing at all. Skipping without a record
|
|
52
|
+
* would only trade a loud failure for a silent one; this field is the record.
|
|
53
|
+
*/
|
|
54
|
+
readonly failures: readonly SkillLoadFailure[];
|
|
55
|
+
/**
|
|
56
|
+
* Skills that LOADED cleanly but could not be compiled or written (fix round 1,
|
|
57
|
+
* QE F4). Kept separate from {@link InitReport.failures} because the two name
|
|
58
|
+
* different subjects: a load failure accuses the source `SKILL.md`, an apply
|
|
59
|
+
* failure accuses the target tree. Merging them made `EEXIST: mkdir …` print under
|
|
60
|
+
* the header "unparseable SKILL.md" against a perfectly valid file.
|
|
61
|
+
*
|
|
62
|
+
* Additive and always present — empty when nothing failed. Only `runInit` can
|
|
63
|
+
* populate it; the single-file targets render in memory and write once, outside
|
|
64
|
+
* any per-skill loop.
|
|
65
|
+
*/
|
|
66
|
+
readonly applyFailures: readonly SkillApplyFailure[];
|
|
42
67
|
}
|
|
43
68
|
/** Options for {@link runInitAgentsMd} / {@link runInitGeminiMd}. */
|
|
44
69
|
export interface AgentsMdInitOptions {
|
|
@@ -54,6 +79,33 @@ export interface AgentsMdInitOptions {
|
|
|
54
79
|
/** When set, install only these skill ids (a preset selection). */
|
|
55
80
|
readonly select?: readonly string[] | undefined;
|
|
56
81
|
}
|
|
82
|
+
/** The parts of a single-file managed-Markdown target that vary by filename. */
|
|
83
|
+
interface SingleFileMdConfig {
|
|
84
|
+
/** CLI `--target` name reported on the {@link InitReport}. */
|
|
85
|
+
readonly target: TargetName;
|
|
86
|
+
/** The root file path (`AGENTS.md` / `GEMINI.md`). */
|
|
87
|
+
readonly filePath: string;
|
|
88
|
+
/** The merge helper that owns the dz fence for this file. */
|
|
89
|
+
readonly merge: (existing: string | null, sections: readonly string[]) => string;
|
|
90
|
+
/** The one-shot lossy warning surfaced once per install. */
|
|
91
|
+
readonly lossyWarning: string;
|
|
92
|
+
}
|
|
93
|
+
export interface ManagedMarkdownWriteReport {
|
|
94
|
+
readonly filePath: string;
|
|
95
|
+
readonly changed: boolean;
|
|
96
|
+
readonly bytes: number;
|
|
97
|
+
/** The complete candidate bytes, returned so callers can run pure post-merge checks. */
|
|
98
|
+
readonly content: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The one read/merge/write path for every root managed-Markdown projection.
|
|
102
|
+
* `write:false` is check-only and never creates a directory or target file.
|
|
103
|
+
* A max-byte refusal happens before mkdir/write, leaving the target byte-identical.
|
|
104
|
+
*/
|
|
105
|
+
export declare function writeManagedMarkdown(projectRoot: string, sections: readonly string[], config: Pick<SingleFileMdConfig, 'filePath' | 'merge'>, options?: {
|
|
106
|
+
readonly write?: boolean;
|
|
107
|
+
readonly maxBytes?: number;
|
|
108
|
+
}): ManagedMarkdownWriteReport;
|
|
57
109
|
/**
|
|
58
110
|
* Aggregate every selected skill into ONE root `AGENTS.md`, merging into any
|
|
59
111
|
* user-authored file (dz owns only its fenced block). Thin wrapper over
|
|
@@ -67,6 +119,34 @@ export declare function runInitAgentsMd(options: AgentsMdInitOptions): InitRepor
|
|
|
67
119
|
* as agents-md, different filename + merge helper. See it for the full contract.
|
|
68
120
|
*/
|
|
69
121
|
export declare function runInitGeminiMd(options: AgentsMdInitOptions): InitReport;
|
|
122
|
+
export interface AgentsPolicySyncOptions {
|
|
123
|
+
readonly projectRoot: string;
|
|
124
|
+
/** Verify only. No directory or file is created, even when AGENTS.md is absent. */
|
|
125
|
+
readonly check?: boolean;
|
|
126
|
+
/** Test/extension seam; production uses the fixed ordered registry. */
|
|
127
|
+
readonly sources?: readonly PolicySource[];
|
|
128
|
+
}
|
|
129
|
+
export interface AgentsPolicySyncReport {
|
|
130
|
+
readonly filePath: 'AGENTS.md';
|
|
131
|
+
/** In check mode: the target would change. In write mode: the target did change. */
|
|
132
|
+
readonly changed: boolean;
|
|
133
|
+
readonly written: boolean;
|
|
134
|
+
readonly inSync: boolean;
|
|
135
|
+
readonly blocks: readonly {
|
|
136
|
+
readonly id: string;
|
|
137
|
+
readonly sha: string;
|
|
138
|
+
}[];
|
|
139
|
+
readonly missing: readonly string[];
|
|
140
|
+
readonly drift: readonly PolicyDriftFinding[];
|
|
141
|
+
readonly budget: AgentsMdBudget;
|
|
142
|
+
readonly warnings: readonly string[];
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Refresh or verify the policy fence in root AGENTS.md. Source reads are an
|
|
146
|
+
* explicit I/O shell around the pure agents-policy module; missing/unreadable
|
|
147
|
+
* input returns inconclusive evidence and never writes a partial projection.
|
|
148
|
+
*/
|
|
149
|
+
export declare function runSyncAgentsPolicy(options: AgentsPolicySyncOptions): AgentsPolicySyncReport;
|
|
70
150
|
/** Compile every skill in `skillsDir` for `target` and apply it under `projectRoot`. */
|
|
71
151
|
export declare function runInit(options: InitOptions): Promise<InitReport>;
|
|
72
152
|
/** Options for {@link runVerify}. */
|
|
@@ -121,6 +201,11 @@ export interface SyncReport {
|
|
|
121
201
|
missing: number;
|
|
122
202
|
drift: number;
|
|
123
203
|
};
|
|
204
|
+
/**
|
|
205
|
+
* Canonical skill directories that could not be LOADED. Additive, always present.
|
|
206
|
+
* See {@link InitReport.failures} — same contract, same reason.
|
|
207
|
+
*/
|
|
208
|
+
readonly failures: readonly SkillLoadFailure[];
|
|
124
209
|
}
|
|
125
210
|
/** Compare each canonical skill (compiled for Claude Code) to the legacy tree. */
|
|
126
211
|
export declare function runSync(options: SyncOptions): Promise<SyncReport>;
|
|
@@ -158,4 +243,148 @@ export interface DoctorReport {
|
|
|
158
243
|
export declare function runDoctor(options: {
|
|
159
244
|
projectRoot: string;
|
|
160
245
|
}): Promise<DoctorReport>;
|
|
246
|
+
export interface CodexHooksSyncOptions {
|
|
247
|
+
/** Defaults to `$CODEX_HOME`, then `~/.codex`. Every automated probe passes a temp dir (AM-11). */
|
|
248
|
+
readonly codexHome?: string;
|
|
249
|
+
/** Verify only. NOTHING is created — not even the helper directory. */
|
|
250
|
+
readonly check?: boolean;
|
|
251
|
+
/** Remove manifest-attributed entries and stop. */
|
|
252
|
+
readonly remove?: boolean;
|
|
253
|
+
/** Absolute interpreter for the emitted command. Defaults to `process.execPath` (AM-32). */
|
|
254
|
+
readonly nodePath?: string;
|
|
255
|
+
/**
|
|
256
|
+
* Test seam: `false` skips EVERY live runtime call — the `$SHELL -lc` liveness self-probe AND the
|
|
257
|
+
* `hooks/list` trust query. Both spawn processes (the RPC drives a real `codex app-server`), which
|
|
258
|
+
* is seconds per install; a test that installs six times to check backup pruning is measuring
|
|
259
|
+
* pruning, not the runtime. With it off, `trust` is reported `'unknown'` rather than assumed.
|
|
260
|
+
*/
|
|
261
|
+
readonly liveness?: boolean;
|
|
262
|
+
/** Test seam. Production probes the real binary. */
|
|
263
|
+
readonly codexVersion?: string | null;
|
|
264
|
+
readonly now?: string;
|
|
265
|
+
/**
|
|
266
|
+
* Run the LIVE veto probe (ADR-002). Default `true` whenever live calls are enabled — a report
|
|
267
|
+
* that says `ready` without one is the CRITICAL finding this option exists to close.
|
|
268
|
+
* `false` (the CLI's `--no-verify`) never yields a success word and never exits 0.
|
|
269
|
+
*/
|
|
270
|
+
readonly verify?: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* MUTUAL EXCLUSION SEAM (feature qe-bridge-claude, round-2 CRITICAL C2). The caller wraps ONLY the
|
|
273
|
+
* registry read-plan-write transaction — the part where two dz processes can lose each other's
|
|
274
|
+
* entries. It must NOT span the live probes: those spawn a real `codex app-server` turn and can
|
|
275
|
+
* block for minutes, far past any advisory lock's stale threshold, at which point a waiter is
|
|
276
|
+
* entitled to break the lock and the holder becomes a liar. Default: run unwrapped.
|
|
277
|
+
*/
|
|
278
|
+
readonly criticalSection?: <T>(fn: () => T) => T;
|
|
279
|
+
/** The project whose consent the probe runs under (`--project`). See {@link runCodexVetoProbe}. */
|
|
280
|
+
readonly project?: string;
|
|
281
|
+
/** Pinned probe model id; defaults to `DZ_CODEX_PROBE_MODEL`, then codex's own configured model. */
|
|
282
|
+
readonly probeModel?: string;
|
|
283
|
+
/** Test seam: replace the live probe. Production runs {@link runCodexVetoProbe}. */
|
|
284
|
+
readonly probe?: (options: CodexVetoProbeOptions) => CodexVetoProbeRun;
|
|
285
|
+
}
|
|
286
|
+
export interface CodexHooksSyncReport {
|
|
287
|
+
readonly codexHome: string;
|
|
288
|
+
readonly registryPath: string;
|
|
289
|
+
/** Both managed entries are present in the file (recomputed from the FILE, not the manifest). */
|
|
290
|
+
readonly installed: boolean;
|
|
291
|
+
/** The emitted command actually RUNS through `$SHELL -lc`. A hook that cannot execute is not armed. */
|
|
292
|
+
readonly executable: boolean;
|
|
293
|
+
readonly written: boolean;
|
|
294
|
+
readonly removed: number;
|
|
295
|
+
readonly foreignPreserved: number;
|
|
296
|
+
readonly unattributable: number;
|
|
297
|
+
readonly drift: readonly string[];
|
|
298
|
+
readonly trust: 'trusted' | 'trust-pending' | 'unknown';
|
|
299
|
+
readonly codexVersion: string | null;
|
|
300
|
+
/** The live veto probe's verdict. `null` ⇒ no probe ran (`--no-verify`, or the test seam). */
|
|
301
|
+
readonly verify: VetoProbeResult | null;
|
|
302
|
+
/** A live, non-bypassed probe ran AND witnessed our block. The only route to a success word. */
|
|
303
|
+
readonly verified: boolean;
|
|
304
|
+
/**
|
|
305
|
+
* armed ∧ trusted, PROVEN — installed + executable + trusted + a witnessed live block. This is
|
|
306
|
+
* the single predicate the CLI's `ready` line is allowed to read (AM-17 / G-G).
|
|
307
|
+
*/
|
|
308
|
+
readonly ready: boolean;
|
|
309
|
+
/** 0 = armed+trusted · 1 = not armed / drift / refusal · 3 = inconclusive. */
|
|
310
|
+
readonly exitCode: 0 | 1 | 3;
|
|
311
|
+
readonly warnings: readonly string[];
|
|
312
|
+
readonly errors: readonly string[];
|
|
313
|
+
/** Written paths, for the declared-write-set test. */
|
|
314
|
+
readonly writes: readonly string[];
|
|
315
|
+
}
|
|
316
|
+
/** The one place that decides WHERE `hooks.json` lives. Exported (feature qe-bridge-claude) so the
|
|
317
|
+
* CLI can take the `codex-hooks` advisory lock BESIDE that registry — a lock in this repo's `.dz/`
|
|
318
|
+
* would not serialize a writer operating from another checkout. */
|
|
319
|
+
export declare function resolveCodexHome(explicit: string | undefined): string;
|
|
320
|
+
/**
|
|
321
|
+
* Run the emitted command THE WAY THE RUNTIME WILL — through `$SHELL -lc` (AM-32 / G-L).
|
|
322
|
+
*
|
|
323
|
+
* MEASURED: the codex hook runner spawns via `$SHELL -lc`, and under nvm/asdf/volta a
|
|
324
|
+
* non-interactive login shell frequently lacks `node`. The helper then exits **127**, which the
|
|
325
|
+
* runtime reads as **ALLOW** — a blocking guard that is silently dead in the fail-open direction,
|
|
326
|
+
* with the helper's own self-failure note unable to fire because the process never started.
|
|
327
|
+
* Grading on file presence would call that "installed".
|
|
328
|
+
*/
|
|
329
|
+
export declare function probeHookLiveness(command: string, payload: string): {
|
|
330
|
+
readonly status: number | null;
|
|
331
|
+
readonly stderr: string;
|
|
332
|
+
};
|
|
333
|
+
export declare function runSyncCodexHooks(options?: CodexHooksSyncOptions): CodexHooksSyncReport;
|
|
334
|
+
export interface CodexVetoProbeOptions {
|
|
335
|
+
readonly paths: CodexHooksPaths;
|
|
336
|
+
/** Where the probe runs. Absent ⇒ a hermetic temp workspace that opts INTO block mode. */
|
|
337
|
+
readonly project?: string | undefined;
|
|
338
|
+
/** Pinned model id (`DZ_CODEX_PROBE_MODEL`). Absent ⇒ codex's own configured default. */
|
|
339
|
+
readonly model?: string | undefined;
|
|
340
|
+
readonly timeoutMs?: number | undefined;
|
|
341
|
+
readonly trustStatus?: CodexHookTrustStatus | undefined;
|
|
342
|
+
readonly recordedCodexVersion?: string | undefined;
|
|
343
|
+
readonly probedCodexVersion?: string | undefined;
|
|
344
|
+
}
|
|
345
|
+
export interface CodexVetoProbeRun {
|
|
346
|
+
readonly evidence: VetoProbeEvidence;
|
|
347
|
+
readonly result: VetoProbeResult;
|
|
348
|
+
/** The directory the probe ran in, kept for the transcript record. */
|
|
349
|
+
readonly workspace: string;
|
|
350
|
+
readonly command: string;
|
|
351
|
+
readonly notes: readonly string[];
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Drive ONE live, NON-bypassed veto probe through `codex exec` and classify what it produced.
|
|
355
|
+
*
|
|
356
|
+
* This is the half the shipped CLI was missing: `--verify` and `--project` were accepted and
|
|
357
|
+
* dropped, `classifyVetoProbe` was never called from any production path, and `ready` printed off
|
|
358
|
+
* file presence plus a trust row (independent review, finding 1 — CRITICAL). A registry entry is
|
|
359
|
+
* not a guard; only a witnessed block is.
|
|
360
|
+
*
|
|
361
|
+
* Fail-closed by construction:
|
|
362
|
+
* - `--dangerously-bypass-hook-trust` is NEVER passed (`bypassedTrust: false` is a fact here, not a
|
|
363
|
+
* parameter): a bypassed run proves the helper body works and nothing about the installed state.
|
|
364
|
+
* - stdin is `/dev/null` (node opens `/dev/null` for an `'ignore'` stdio slot) — the 2026-07-10
|
|
365
|
+
* codex-exec stdin lesson.
|
|
366
|
+
* - Every way the run can fail to produce evidence — no binary, a dead invocation, a timeout, an
|
|
367
|
+
* unstattable sentinel — reaches `inconclusive`, never `armed`.
|
|
368
|
+
*/
|
|
369
|
+
export declare function runCodexVetoProbe(options: CodexVetoProbeOptions): CodexVetoProbeRun;
|
|
370
|
+
/**
|
|
371
|
+
* Is the sentinel there? `true` / `false` / **`null` when we could not tell**.
|
|
372
|
+
*
|
|
373
|
+
* `existsSync` answers `false` for BOTH "it is not there" and "I could not look" — it swallows
|
|
374
|
+
* EACCES, ENOTDIR, ELOOP and every I/O error into the same word that means "the command was
|
|
375
|
+
* blocked" (fix round 2, R2-4). Only ENOENT is an established ABSENCE; every other errno is a
|
|
376
|
+
* failed observation and must reach `inconclusive`.
|
|
377
|
+
*/
|
|
378
|
+
export declare function statSentinelPresence(path: string): {
|
|
379
|
+
readonly present: boolean | null;
|
|
380
|
+
readonly error?: string;
|
|
381
|
+
};
|
|
382
|
+
/**
|
|
383
|
+
* Drive `codex app-server` over stdio for one `hooks/list` call.
|
|
384
|
+
*
|
|
385
|
+
* MEASURED headless (M0 spike, probe 1): `initialize` → `initialized` → `hooks/list` answers with
|
|
386
|
+
* `key`, `currentHash`, `trustStatus` and `sourcePath` for every discovered entry, no TUI involved.
|
|
387
|
+
*/
|
|
388
|
+
export declare function listCodexHooks(codexHome: string, cwd?: string): readonly HooksListHookMetadata[] | null;
|
|
389
|
+
export {};
|
|
161
390
|
//# sourceMappingURL=operations.d.ts.map
|
package/dist/operations.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"A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