sneakoscope 1.12.0 → 1.13.0
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 +2 -1
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/crates/sks-core/src/main.rs +1 -1
- package/dist/bin/sks.js +1 -1
- package/dist/build-manifest.json +54 -1
- package/dist/cli/feature-commands.js +58 -4
- package/dist/commands/dfix.d.ts +122 -18
- package/dist/core/codex-compat/codex-0-132.js +1 -1
- package/dist/core/codex-compat/codex-compat-report.d.ts +15 -3
- package/dist/core/codex-compat/codex-config-policy.d.ts +30 -0
- package/dist/core/codex-compat/codex-config-policy.js +185 -9
- package/dist/core/codex-compat/codex-hook-events.d.ts +7 -0
- package/dist/core/codex-compat/codex-hook-events.js +64 -0
- package/dist/core/codex-compat/codex-hook-output-builders.d.ts +10 -0
- package/dist/core/codex-compat/codex-hook-output-builders.js +18 -2
- package/dist/core/codex-compat/codex-hook-schema.js +3 -12
- package/dist/core/codex-compat/codex-hook-semantic-validator.d.ts +2 -0
- package/dist/core/codex-compat/codex-hook-semantic-validator.js +24 -7
- package/dist/core/codex-compat/codex-hook-warning-detector.d.ts +14 -2
- package/dist/core/codex-compat/codex-hook-warning-detector.js +12 -5
- package/dist/core/codex-compat/codex-schema-snapshot.d.ts +10 -5
- package/dist/core/codex-compat/codex-schema-snapshot.js +17 -41
- package/dist/core/codex-compat/codex-version-policy.d.ts +2 -2
- package/dist/core/codex-compat/codex-version-policy.js +2 -2
- package/dist/core/codex-hooks/codex-hook-config-writer.d.ts +13 -0
- package/dist/core/codex-hooks/codex-hook-config-writer.js +56 -0
- package/dist/core/codex-hooks/codex-hook-hash.d.ts +15 -0
- package/dist/core/codex-hooks/codex-hook-hash.js +42 -0
- package/dist/core/codex-hooks/codex-hook-state-writer.d.ts +22 -0
- package/dist/core/codex-hooks/codex-hook-state-writer.js +78 -0
- package/dist/core/codex-hooks/codex-hook-trust-doctor.d.ts +33 -0
- package/dist/core/codex-hooks/codex-hook-trust-doctor.js +29 -0
- package/dist/core/codex-hooks/codex-hook-trust-state.d.ts +27 -0
- package/dist/core/codex-hooks/codex-hook-trust-state.js +89 -0
- package/dist/core/commands/dfix-command.d.ts +122 -18
- package/dist/core/commands/dfix-command.js +3 -1
- package/dist/core/dfix/codex-handoff.d.ts +37 -0
- package/dist/core/dfix/codex-handoff.js +36 -0
- package/dist/core/dfix/dfix-cache.d.ts +20 -0
- package/dist/core/dfix/dfix-cache.js +63 -0
- package/dist/core/dfix/error-signature.d.ts +17 -0
- package/dist/core/dfix/error-signature.js +97 -0
- package/dist/core/dfix/patch-runner.d.ts +6 -0
- package/dist/core/dfix/patch-runner.js +101 -0
- package/dist/core/dfix/patch-templates.d.ts +34 -0
- package/dist/core/dfix/patch-templates.js +47 -0
- package/dist/core/dfix/path-decision.d.ts +25 -0
- package/dist/core/dfix/path-decision.js +47 -0
- package/dist/core/dfix/performance.d.ts +28 -0
- package/dist/core/dfix/performance.js +28 -0
- package/dist/core/dfix/root-cause-ranking.d.ts +55 -0
- package/dist/core/dfix/root-cause-ranking.js +57 -0
- package/dist/core/dfix/verification-runner.d.ts +2 -0
- package/dist/core/dfix/verification-runner.js +46 -0
- package/dist/core/dfix/verification-selector.d.ts +37 -0
- package/dist/core/dfix/verification-selector.js +72 -0
- package/dist/core/dfix.d.ts +133 -18
- package/dist/core/dfix.js +104 -55
- package/dist/core/feature-fixtures.js +1 -1
- package/dist/core/feature-registry.js +1 -1
- package/dist/core/fsx.d.ts +1 -1
- package/dist/core/fsx.js +1 -1
- package/dist/core/hooks-runtime.js +17 -1
- package/dist/core/init.js +14 -28
- package/dist/core/routes.js +1 -1
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/dist/vendor/openai-codex/latest/hooks/permission-request.command.input.schema.json +61 -0
- package/dist/vendor/openai-codex/latest/hooks/permission-request.command.output.schema.json +105 -0
- package/dist/vendor/openai-codex/latest/hooks/post-compact.command.input.schema.json +52 -0
- package/dist/vendor/openai-codex/latest/hooks/post-compact.command.output.schema.json +24 -0
- package/dist/vendor/openai-codex/latest/hooks/post-tool-use.command.input.schema.json +67 -0
- package/dist/vendor/openai-codex/latest/hooks/post-tool-use.command.output.schema.json +86 -0
- package/dist/vendor/openai-codex/latest/hooks/pre-compact.command.input.schema.json +52 -0
- package/dist/vendor/openai-codex/latest/hooks/pre-compact.command.output.schema.json +24 -0
- package/dist/vendor/openai-codex/latest/hooks/pre-tool-use.command.input.schema.json +65 -0
- package/dist/vendor/openai-codex/latest/hooks/pre-tool-use.command.output.schema.json +107 -0
- package/dist/vendor/openai-codex/latest/hooks/session-start.command.input.schema.json +60 -0
- package/dist/vendor/openai-codex/latest/hooks/session-start.command.output.schema.json +65 -0
- package/dist/vendor/openai-codex/latest/hooks/snapshot-metadata.json +27 -0
- package/dist/vendor/openai-codex/latest/hooks/stop.command.input.schema.json +63 -0
- package/dist/vendor/openai-codex/latest/hooks/stop.command.output.schema.json +45 -0
- package/dist/vendor/openai-codex/latest/hooks/subagent-start.command.input.schema.json +63 -0
- package/dist/vendor/openai-codex/latest/hooks/subagent-start.command.output.schema.json +65 -0
- package/dist/vendor/openai-codex/latest/hooks/subagent-stop.command.input.schema.json +75 -0
- package/dist/vendor/openai-codex/latest/hooks/subagent-stop.command.output.schema.json +45 -0
- package/dist/vendor/openai-codex/latest/hooks/user-prompt-submit.command.input.schema.json +59 -0
- package/dist/vendor/openai-codex/latest/hooks/user-prompt-submit.command.output.schema.json +83 -0
- package/package.json +11 -3
package/README.md
CHANGED
|
@@ -10,13 +10,14 @@ SKS does not try to clone every other harness. It focuses on one thing: making C
|
|
|
10
10
|
|
|
11
11
|
## Current Release
|
|
12
12
|
|
|
13
|
-
SKS **1.
|
|
13
|
+
SKS **1.13.0** focuses on the DFix Extreme Speed Kernel and Codex hook trust warning-zero: DFix now records error signatures, path decisions, patch runner results, verification selection, rollback plans, wrongness/cache hints, and speed budgets, while hooks validate the latest 10-event Codex schema including `SubagentStart` and `SubagentStop`.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
sks features complete --json
|
|
17
17
|
sks ux-review run --image <path> --generate-callouts --json
|
|
18
18
|
sks ppt fixture --mock --json
|
|
19
19
|
sks dfix fixture --json
|
|
20
|
+
sks hooks trust-doctor --json
|
|
20
21
|
```
|
|
21
22
|
|
|
22
23
|
Detailed release history lives in [CHANGELOG.md](CHANGELOG.md). Current release gate status lives in [docs/release-readiness.md](docs/release-readiness.md).
|
|
@@ -4,7 +4,7 @@ use std::io::{self, Read, Seek, SeekFrom};
|
|
|
4
4
|
fn main() {
|
|
5
5
|
let mut args = std::env::args().skip(1);
|
|
6
6
|
match args.next().as_deref() {
|
|
7
|
-
Some("--version") => println!("sks-rs 1.
|
|
7
|
+
Some("--version") => println!("sks-rs 1.13.0"),
|
|
8
8
|
Some("compact-info") => {
|
|
9
9
|
let mut input = String::new();
|
|
10
10
|
let _ = io::stdin().read_to_string(&mut input);
|
package/dist/bin/sks.js
CHANGED
package/dist/build-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "sks.dist-build.v2",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"typescript": true,
|
|
5
5
|
"mjs_runtime_files": 0,
|
|
6
6
|
"files": [
|
|
@@ -190,6 +190,8 @@
|
|
|
190
190
|
"core/codex-compat/codex-compat-report.js",
|
|
191
191
|
"core/codex-compat/codex-config-policy.d.ts",
|
|
192
192
|
"core/codex-compat/codex-config-policy.js",
|
|
193
|
+
"core/codex-compat/codex-hook-events.d.ts",
|
|
194
|
+
"core/codex-compat/codex-hook-events.js",
|
|
193
195
|
"core/codex-compat/codex-hook-issues.d.ts",
|
|
194
196
|
"core/codex-compat/codex-hook-issues.js",
|
|
195
197
|
"core/codex-compat/codex-hook-output-builders.d.ts",
|
|
@@ -210,6 +212,16 @@
|
|
|
210
212
|
"core/codex-compat/codex-version.js",
|
|
211
213
|
"core/codex-exec-output-schema.d.ts",
|
|
212
214
|
"core/codex-exec-output-schema.js",
|
|
215
|
+
"core/codex-hooks/codex-hook-config-writer.d.ts",
|
|
216
|
+
"core/codex-hooks/codex-hook-config-writer.js",
|
|
217
|
+
"core/codex-hooks/codex-hook-hash.d.ts",
|
|
218
|
+
"core/codex-hooks/codex-hook-hash.js",
|
|
219
|
+
"core/codex-hooks/codex-hook-state-writer.d.ts",
|
|
220
|
+
"core/codex-hooks/codex-hook-state-writer.js",
|
|
221
|
+
"core/codex-hooks/codex-hook-trust-doctor.d.ts",
|
|
222
|
+
"core/codex-hooks/codex-hook-trust-doctor.js",
|
|
223
|
+
"core/codex-hooks/codex-hook-trust-state.d.ts",
|
|
224
|
+
"core/codex-hooks/codex-hook-trust-state.js",
|
|
213
225
|
"core/codex-lb-circuit.d.ts",
|
|
214
226
|
"core/codex-lb-circuit.js",
|
|
215
227
|
"core/codex-lb/codex-lb-env.d.ts",
|
|
@@ -306,6 +318,26 @@
|
|
|
306
318
|
"core/decision-lattice.js",
|
|
307
319
|
"core/dfix.d.ts",
|
|
308
320
|
"core/dfix.js",
|
|
321
|
+
"core/dfix/codex-handoff.d.ts",
|
|
322
|
+
"core/dfix/codex-handoff.js",
|
|
323
|
+
"core/dfix/dfix-cache.d.ts",
|
|
324
|
+
"core/dfix/dfix-cache.js",
|
|
325
|
+
"core/dfix/error-signature.d.ts",
|
|
326
|
+
"core/dfix/error-signature.js",
|
|
327
|
+
"core/dfix/patch-runner.d.ts",
|
|
328
|
+
"core/dfix/patch-runner.js",
|
|
329
|
+
"core/dfix/patch-templates.d.ts",
|
|
330
|
+
"core/dfix/patch-templates.js",
|
|
331
|
+
"core/dfix/path-decision.d.ts",
|
|
332
|
+
"core/dfix/path-decision.js",
|
|
333
|
+
"core/dfix/performance.d.ts",
|
|
334
|
+
"core/dfix/performance.js",
|
|
335
|
+
"core/dfix/root-cause-ranking.d.ts",
|
|
336
|
+
"core/dfix/root-cause-ranking.js",
|
|
337
|
+
"core/dfix/verification-runner.d.ts",
|
|
338
|
+
"core/dfix/verification-runner.js",
|
|
339
|
+
"core/dfix/verification-selector.d.ts",
|
|
340
|
+
"core/dfix/verification-selector.js",
|
|
309
341
|
"core/dogfood-loop.d.ts",
|
|
310
342
|
"core/dogfood-loop.js",
|
|
311
343
|
"core/effort-orchestrator.d.ts",
|
|
@@ -701,6 +733,27 @@
|
|
|
701
733
|
"core/wiki-image/visual-anchor.js",
|
|
702
734
|
"core/work-order-ledger.d.ts",
|
|
703
735
|
"core/work-order-ledger.js",
|
|
736
|
+
"vendor/openai-codex/latest/hooks/permission-request.command.input.schema.json",
|
|
737
|
+
"vendor/openai-codex/latest/hooks/permission-request.command.output.schema.json",
|
|
738
|
+
"vendor/openai-codex/latest/hooks/post-compact.command.input.schema.json",
|
|
739
|
+
"vendor/openai-codex/latest/hooks/post-compact.command.output.schema.json",
|
|
740
|
+
"vendor/openai-codex/latest/hooks/post-tool-use.command.input.schema.json",
|
|
741
|
+
"vendor/openai-codex/latest/hooks/post-tool-use.command.output.schema.json",
|
|
742
|
+
"vendor/openai-codex/latest/hooks/pre-compact.command.input.schema.json",
|
|
743
|
+
"vendor/openai-codex/latest/hooks/pre-compact.command.output.schema.json",
|
|
744
|
+
"vendor/openai-codex/latest/hooks/pre-tool-use.command.input.schema.json",
|
|
745
|
+
"vendor/openai-codex/latest/hooks/pre-tool-use.command.output.schema.json",
|
|
746
|
+
"vendor/openai-codex/latest/hooks/session-start.command.input.schema.json",
|
|
747
|
+
"vendor/openai-codex/latest/hooks/session-start.command.output.schema.json",
|
|
748
|
+
"vendor/openai-codex/latest/hooks/snapshot-metadata.json",
|
|
749
|
+
"vendor/openai-codex/latest/hooks/stop.command.input.schema.json",
|
|
750
|
+
"vendor/openai-codex/latest/hooks/stop.command.output.schema.json",
|
|
751
|
+
"vendor/openai-codex/latest/hooks/subagent-start.command.input.schema.json",
|
|
752
|
+
"vendor/openai-codex/latest/hooks/subagent-start.command.output.schema.json",
|
|
753
|
+
"vendor/openai-codex/latest/hooks/subagent-stop.command.input.schema.json",
|
|
754
|
+
"vendor/openai-codex/latest/hooks/subagent-stop.command.output.schema.json",
|
|
755
|
+
"vendor/openai-codex/latest/hooks/user-prompt-submit.command.input.schema.json",
|
|
756
|
+
"vendor/openai-codex/latest/hooks/user-prompt-submit.command.output.schema.json",
|
|
704
757
|
"vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.input.schema.json",
|
|
705
758
|
"vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.output.schema.json",
|
|
706
759
|
"vendor/openai-codex/rust-v0.131.0/hooks/post-compact.command.input.schema.json",
|
|
@@ -10,6 +10,8 @@ import { recordHookPolicyMismatchWrongness } from '../core/triwiki-wrongness/wro
|
|
|
10
10
|
import { codexSchemaSnapshotReport } from '../core/codex-compat/codex-schema-snapshot.js';
|
|
11
11
|
import { validateCodexFixtureOutputs } from '../core/codex-compat/codex-hook-schema.js';
|
|
12
12
|
import { codexHookWarningCheck } from '../core/codex-compat/codex-hook-warning-detector.js';
|
|
13
|
+
import { codexHookTrustDoctor } from '../core/codex-hooks/codex-hook-trust-doctor.js';
|
|
14
|
+
import { writeTrustedHashStateForHooksFile } from '../core/codex-hooks/codex-hook-state-writer.js';
|
|
13
15
|
const flag = (args, name) => args.includes(name);
|
|
14
16
|
export async function featuresCommand(sub = 'list', args = []) {
|
|
15
17
|
const action = sub || 'list';
|
|
@@ -119,6 +121,40 @@ export async function hooksCommand(sub = 'explain', args = []) {
|
|
|
119
121
|
console.log(`- ${event.event}: ${event.command}`);
|
|
120
122
|
return;
|
|
121
123
|
}
|
|
124
|
+
if (action === 'doctor' || action === 'trust-doctor') {
|
|
125
|
+
const report = await codexHookTrustDoctor(root, { fix: flag(args, '--fix'), managed: flag(args, '--managed') });
|
|
126
|
+
if (flag(args, '--json'))
|
|
127
|
+
return console.log(JSON.stringify(report, null, 2));
|
|
128
|
+
console.log(`Hooks trust doctor: ${report.ok ? 'ok' : 'blocked'}`);
|
|
129
|
+
for (const warning of report.warnings)
|
|
130
|
+
console.log(`- ${warning}`);
|
|
131
|
+
if (!report.ok)
|
|
132
|
+
process.exitCode = 1;
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (action === 'trust-state') {
|
|
136
|
+
const report = await codexHookTrustDoctor(root, { managed: flag(args, '--managed') });
|
|
137
|
+
if (flag(args, '--json'))
|
|
138
|
+
return console.log(JSON.stringify({ schema: 'sks.codex-hook-trust-state-command.v1', ok: report.ok, entries: report.entries, trust: report.trust }, null, 2));
|
|
139
|
+
console.log(`Hook trust entries: ${report.entries.length}`);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (action === 'trust-fix') {
|
|
143
|
+
const report = await codexHookTrustDoctor(root, { fix: true, managed: flag(args, '--managed') });
|
|
144
|
+
if (flag(args, '--json'))
|
|
145
|
+
return console.log(JSON.stringify(report, null, 2));
|
|
146
|
+
console.log(`Hooks trust fix: ${report.ok ? 'ok' : 'blocked'}`);
|
|
147
|
+
if (!report.ok)
|
|
148
|
+
process.exitCode = 1;
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (action === 'install') {
|
|
152
|
+
const report = await writeTrustedHashStateForHooksFile(root);
|
|
153
|
+
if (flag(args, '--json'))
|
|
154
|
+
return console.log(JSON.stringify({ ...report, schema: 'sks.codex-hook-install-command.v1', ok: true, mode: flag(args, '--managed') ? 'managed' : flag(args, '--project') ? 'project' : 'trust-state-only', trusted: flag(args, '--trusted') }, null, 2));
|
|
155
|
+
console.log(`Hooks install trust state updated: ${report.updated}`);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
122
158
|
if (action === 'replay') {
|
|
123
159
|
const fixture = args.find((arg) => !String(arg).startsWith('--'));
|
|
124
160
|
const report = await hooksReplayReport(root, fixture);
|
|
@@ -168,7 +204,7 @@ export async function hooksCommand(sub = 'explain', args = []) {
|
|
|
168
204
|
return;
|
|
169
205
|
}
|
|
170
206
|
if (action !== 'explain') {
|
|
171
|
-
console.error('Usage: sks hooks explain|status|trust-report|replay <fixture.json>|codex-schema|codex-validate|warning-check|replay-codex-fixtures [--json]');
|
|
207
|
+
console.error('Usage: sks hooks explain|status|doctor|trust-report|trust-state|trust-doctor|trust-fix|install|replay <fixture.json>|codex-schema|codex-validate|warning-check|replay-codex-fixtures [--json]');
|
|
172
208
|
process.exitCode = 1;
|
|
173
209
|
return;
|
|
174
210
|
}
|
|
@@ -205,17 +241,25 @@ async function hooksStatusReport(root) {
|
|
|
205
241
|
}
|
|
206
242
|
async function hooksTrustReport(root) {
|
|
207
243
|
const status = await hooksStatusReport(root);
|
|
244
|
+
const trust = await codexHookTrustDoctor(root).catch(() => null);
|
|
208
245
|
return redactSecrets({
|
|
209
246
|
schema: 'sks.hooks-trust-report.v1',
|
|
210
247
|
hooks_files: status.hooks_files.map((file) => file.path),
|
|
211
248
|
events: [
|
|
249
|
+
{ event: 'SessionStart', command: 'sks hook session-start', writes: ['.sneakoscope/state'], network: false, secret_policy: 'redacted', risk: 'low' },
|
|
212
250
|
{ event: 'PreToolUse', command: 'sks hook pre-tool', writes: ['.sneakoscope/bus/tool-events.jsonl'], network: false, secret_policy: 'redacted', risk: 'medium' },
|
|
213
251
|
{ event: 'PermissionRequest', command: 'sks hook permission-request', writes: ['.sneakoscope/state'], network: false, secret_policy: 'redacted', risk: 'medium' },
|
|
252
|
+
{ event: 'PostToolUse', command: 'sks hook post-tool', writes: ['.sneakoscope/missions'], network: false, secret_policy: 'redacted', risk: 'medium' },
|
|
253
|
+
{ event: 'PreCompact', command: 'sks hook pre-compact', writes: ['.sneakoscope/state'], network: false, secret_policy: 'redacted', risk: 'low' },
|
|
254
|
+
{ event: 'PostCompact', command: 'sks hook post-compact', writes: ['.sneakoscope/state'], network: false, secret_policy: 'redacted', risk: 'low' },
|
|
214
255
|
{ event: 'UserPromptSubmit', command: 'sks hook user-prompt-submit', writes: ['.sneakoscope/missions'], network: false, secret_policy: 'redacted', risk: 'medium' },
|
|
256
|
+
{ event: 'SubagentStart', command: 'sks hook subagent-start', writes: ['.sneakoscope/missions'], network: false, secret_policy: 'redacted', risk: 'low' },
|
|
257
|
+
{ event: 'SubagentStop', command: 'sks hook subagent-stop', writes: ['.sneakoscope/missions'], network: false, secret_policy: 'redacted', risk: 'low' },
|
|
215
258
|
{ event: 'Stop', command: 'sks hook stop', writes: ['.sneakoscope/missions', '.sneakoscope/proof'], network: false, secret_policy: 'redacted', risk: 'high' }
|
|
216
259
|
],
|
|
217
|
-
|
|
218
|
-
|
|
260
|
+
trust,
|
|
261
|
+
ok: status.ok && (trust?.ok ?? true),
|
|
262
|
+
warnings: [...(status.ok ? [] : ['no hooks.json file found in project or user config']), ...(trust?.warnings || [])]
|
|
219
263
|
});
|
|
220
264
|
}
|
|
221
265
|
async function hooksReplayReport(root, fixturePath) {
|
|
@@ -315,6 +359,16 @@ function normalizeReplayHookName(event = '') {
|
|
|
315
359
|
return 'user-prompt-submit';
|
|
316
360
|
if (normalized.includes('posttool') || normalized.includes('post-tool'))
|
|
317
361
|
return 'post-tool';
|
|
362
|
+
if (normalized.includes('sessionstart') || normalized.includes('session-start'))
|
|
363
|
+
return 'session-start';
|
|
364
|
+
if (normalized.includes('subagentstart') || normalized.includes('subagent-start'))
|
|
365
|
+
return 'subagent-start';
|
|
366
|
+
if (normalized.includes('subagentstop') || normalized.includes('subagent-stop'))
|
|
367
|
+
return 'subagent-stop';
|
|
368
|
+
if (normalized.includes('precompact') || normalized.includes('pre-compact'))
|
|
369
|
+
return 'pre-compact';
|
|
370
|
+
if (normalized.includes('postcompact') || normalized.includes('post-compact'))
|
|
371
|
+
return 'post-compact';
|
|
318
372
|
if (normalized.includes('stop'))
|
|
319
373
|
return 'stop';
|
|
320
374
|
return normalized || 'pre-tool';
|
|
@@ -332,7 +386,7 @@ export function hooksExplainReport() {
|
|
|
332
386
|
feature_key: 'features.hooks',
|
|
333
387
|
deprecated_feature_alias: 'features.codex_hooks',
|
|
334
388
|
config_paths: ['~/.codex/hooks.json', '~/.codex/config.toml', '<repo>/.codex/hooks.json', '<repo>/.codex/config.toml'],
|
|
335
|
-
events: ['
|
|
389
|
+
events: ['PreToolUse', 'PermissionRequest', 'PostToolUse', 'PreCompact', 'PostCompact', 'SessionStart', 'UserPromptSubmit', 'SubagentStart', 'SubagentStop', 'Stop'],
|
|
336
390
|
handlers: {
|
|
337
391
|
supported: ['command'],
|
|
338
392
|
parsed_but_skipped: ['prompt', 'agent'],
|
package/dist/commands/dfix.d.ts
CHANGED
|
@@ -7,18 +7,73 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
7
7
|
root_cause: any;
|
|
8
8
|
evidence: string[];
|
|
9
9
|
confidence: number;
|
|
10
|
+
path_decision: {
|
|
11
|
+
schema: string;
|
|
12
|
+
created_at: string;
|
|
13
|
+
path: string;
|
|
14
|
+
path_label: string;
|
|
15
|
+
root_cause_confidence: number;
|
|
16
|
+
estimated_patch_risk: string;
|
|
17
|
+
expected_verification_cost: string;
|
|
18
|
+
max_allowed_duration_ms: number | undefined;
|
|
19
|
+
fallback_path: string;
|
|
20
|
+
blockers: string[];
|
|
21
|
+
};
|
|
10
22
|
blockers: never[];
|
|
11
23
|
};
|
|
24
|
+
root_cause_ranking: {
|
|
25
|
+
schema: string;
|
|
26
|
+
created_at: string;
|
|
27
|
+
candidates: {
|
|
28
|
+
id: string;
|
|
29
|
+
summary: string;
|
|
30
|
+
confidence: number;
|
|
31
|
+
evidence_ids: string[];
|
|
32
|
+
affected_files: any[];
|
|
33
|
+
patchability: string;
|
|
34
|
+
verification_cost: number;
|
|
35
|
+
ranking_score: number;
|
|
36
|
+
}[];
|
|
37
|
+
selected_root_cause: {
|
|
38
|
+
id: string;
|
|
39
|
+
summary: string;
|
|
40
|
+
confidence: number;
|
|
41
|
+
evidence_ids: string[];
|
|
42
|
+
affected_files: any[];
|
|
43
|
+
patchability: string;
|
|
44
|
+
verification_cost: number;
|
|
45
|
+
ranking_score: number;
|
|
46
|
+
};
|
|
47
|
+
confidence_threshold: number;
|
|
48
|
+
patch_apply_allowed: boolean;
|
|
49
|
+
blockers: string[];
|
|
50
|
+
};
|
|
12
51
|
verification_suggestion: {
|
|
13
52
|
schema: string;
|
|
14
53
|
created_at: string;
|
|
15
54
|
package_type: string;
|
|
16
55
|
package_scripts_detected: string[];
|
|
17
56
|
suggested_commands: string[];
|
|
57
|
+
fastest_sufficient_command: string;
|
|
18
58
|
best_command: string | undefined;
|
|
59
|
+
confidence: number;
|
|
60
|
+
expected_duration_budget_ms: number;
|
|
19
61
|
auto_run_requires_opt_in: boolean;
|
|
20
62
|
recovery_action: string;
|
|
21
63
|
};
|
|
64
|
+
error_signature: import("../core/dfix/error-signature.js").DfixErrorSignature;
|
|
65
|
+
path_decision: {
|
|
66
|
+
schema: string;
|
|
67
|
+
created_at: string;
|
|
68
|
+
path: string;
|
|
69
|
+
path_label: string;
|
|
70
|
+
root_cause_confidence: number;
|
|
71
|
+
estimated_patch_risk: string;
|
|
72
|
+
expected_verification_cost: string;
|
|
73
|
+
max_allowed_duration_ms: number | undefined;
|
|
74
|
+
fallback_path: string;
|
|
75
|
+
blockers: string[];
|
|
76
|
+
};
|
|
22
77
|
schema: string;
|
|
23
78
|
ok: boolean;
|
|
24
79
|
mission_id: any;
|
|
@@ -34,6 +89,19 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
34
89
|
schema: string;
|
|
35
90
|
created_at: string;
|
|
36
91
|
patch_plan_present: boolean;
|
|
92
|
+
path_decision: {
|
|
93
|
+
schema: string;
|
|
94
|
+
created_at: string;
|
|
95
|
+
path: string;
|
|
96
|
+
path_label: string;
|
|
97
|
+
root_cause_confidence: number;
|
|
98
|
+
estimated_patch_risk: string;
|
|
99
|
+
expected_verification_cost: string;
|
|
100
|
+
max_allowed_duration_ms: number | undefined;
|
|
101
|
+
fallback_path: string;
|
|
102
|
+
blockers: string[];
|
|
103
|
+
};
|
|
104
|
+
selected_template: import("../core/dfix/patch-templates.js").DfixPatchTemplate | null;
|
|
37
105
|
mode: string;
|
|
38
106
|
target_file: any;
|
|
39
107
|
find_text_present: boolean;
|
|
@@ -46,6 +114,24 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
46
114
|
required: string[];
|
|
47
115
|
forbidden_operations: string[];
|
|
48
116
|
};
|
|
117
|
+
handoff_artifact: {
|
|
118
|
+
schema: string;
|
|
119
|
+
created_at: string;
|
|
120
|
+
mode: string;
|
|
121
|
+
default_dry_run: boolean;
|
|
122
|
+
apply_requires: string[];
|
|
123
|
+
integration_optional: boolean;
|
|
124
|
+
blocked: boolean;
|
|
125
|
+
blockers: string[];
|
|
126
|
+
prompt: string;
|
|
127
|
+
output_schema: {
|
|
128
|
+
required: string[];
|
|
129
|
+
optional: string[];
|
|
130
|
+
forbidden_operations: string[];
|
|
131
|
+
};
|
|
132
|
+
normalized_result_schema: string;
|
|
133
|
+
proof_links: string[];
|
|
134
|
+
};
|
|
49
135
|
} | null;
|
|
50
136
|
root_cause: any;
|
|
51
137
|
verification_commands: any;
|
|
@@ -70,26 +156,16 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
70
156
|
apply_opt_in: boolean;
|
|
71
157
|
patch_mode: any;
|
|
72
158
|
patch_result_present: boolean;
|
|
73
|
-
patch_applied:
|
|
74
|
-
changed_files:
|
|
75
|
-
git_diff_before:
|
|
76
|
-
|
|
77
|
-
stdout_tail: string;
|
|
78
|
-
stderr_tail: string;
|
|
79
|
-
};
|
|
80
|
-
git_diff_after: {
|
|
81
|
-
captured: boolean;
|
|
82
|
-
stdout_tail: string;
|
|
83
|
-
stderr_tail: string;
|
|
84
|
-
};
|
|
159
|
+
patch_applied: any;
|
|
160
|
+
changed_files: any;
|
|
161
|
+
git_diff_before: any;
|
|
162
|
+
git_diff_after: any;
|
|
85
163
|
diff_captured: boolean;
|
|
86
|
-
no_op_reason:
|
|
164
|
+
no_op_reason: any;
|
|
87
165
|
noop_patch_wrongness: boolean;
|
|
88
|
-
rollback_plan:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}[];
|
|
92
|
-
blockers: string[];
|
|
166
|
+
rollback_plan: any;
|
|
167
|
+
runner_artifact: string;
|
|
168
|
+
blockers: any;
|
|
93
169
|
passed: boolean;
|
|
94
170
|
};
|
|
95
171
|
} | {
|
|
@@ -109,6 +185,10 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
109
185
|
patch_plan_present: boolean;
|
|
110
186
|
patch_result_present: boolean;
|
|
111
187
|
verification_suggestion_present: boolean;
|
|
188
|
+
path_decision_present: boolean;
|
|
189
|
+
patch_runner_present: boolean;
|
|
190
|
+
verification_selection_present: boolean;
|
|
191
|
+
performance_report_present: boolean;
|
|
112
192
|
verification_present: boolean;
|
|
113
193
|
rollback_plan_present: boolean;
|
|
114
194
|
noop_patch_wrongness: boolean;
|
|
@@ -130,6 +210,10 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
130
210
|
patch_plan_present: boolean;
|
|
131
211
|
patch_result_present: boolean;
|
|
132
212
|
verification_suggestion_present: boolean;
|
|
213
|
+
path_decision_present: boolean;
|
|
214
|
+
patch_runner_present: boolean;
|
|
215
|
+
verification_selection_present: boolean;
|
|
216
|
+
performance_report_present: boolean;
|
|
133
217
|
verification_present: boolean;
|
|
134
218
|
rollback_plan_present: boolean;
|
|
135
219
|
noop_patch_wrongness: boolean;
|
|
@@ -143,6 +227,26 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
143
227
|
patch_result: any;
|
|
144
228
|
verification_suggestion: any;
|
|
145
229
|
verification: any;
|
|
230
|
+
path_decision: any;
|
|
231
|
+
patch_runner: any;
|
|
232
|
+
verification_selection: any;
|
|
233
|
+
performance: {
|
|
234
|
+
schema: string;
|
|
235
|
+
created_at: string;
|
|
236
|
+
budgets_ms: {
|
|
237
|
+
readonly diagnose_cold_source_local: 500;
|
|
238
|
+
readonly path_decision: 100;
|
|
239
|
+
readonly deterministic_patch_plan: 300;
|
|
240
|
+
readonly dry_run_patch_handoff_without_codex: 500;
|
|
241
|
+
readonly exact_patch_apply_small_file: 1000;
|
|
242
|
+
readonly verification_selector: 300;
|
|
243
|
+
readonly no_codex_full_loop_fixture: 3000;
|
|
244
|
+
readonly codex_handoff_timeout: 60000;
|
|
245
|
+
};
|
|
246
|
+
timings_ms: Record<string, number>;
|
|
247
|
+
warnings: string[];
|
|
248
|
+
ok: boolean;
|
|
249
|
+
};
|
|
146
250
|
};
|
|
147
251
|
proof: any;
|
|
148
252
|
} | {
|
|
@@ -99,7 +99,7 @@ export function codex0132Matrix(input = {}) {
|
|
|
99
99
|
capabilities,
|
|
100
100
|
ux_review_output_schema_preferred: capabilities.find((capability) => capability.id === 'exec_resume_output_schema')?.preferred === true,
|
|
101
101
|
unknown_future_fields_policy: 'warning_only_baseline_validation',
|
|
102
|
-
hook_strict_subset_baseline: '
|
|
102
|
+
hook_strict_subset_baseline: 'latest'
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
//# sourceMappingURL=codex-0-132.js.map
|
|
@@ -18,7 +18,7 @@ export declare function codexCompatibilityReport(opts?: any): Promise<{
|
|
|
18
18
|
warnings_count: number;
|
|
19
19
|
issues_by_category: Record<"schema_violation" | "upstream_semantic_unsupported" | "sks_zero_warning_disallowed" | "legacy_shape" | "policy_disallowed", number>;
|
|
20
20
|
events: {
|
|
21
|
-
event: "
|
|
21
|
+
event: "PreToolUse" | "PermissionRequest" | "PostToolUse" | "PreCompact" | "PostCompact" | "SessionStart" | "UserPromptSubmit" | "SubagentStart" | "SubagentStop" | "Stop";
|
|
22
22
|
checked: number;
|
|
23
23
|
ok: boolean;
|
|
24
24
|
warnings: string[];
|
|
@@ -76,7 +76,7 @@ export declare function codexDoctorReport(opts?: any): Promise<{
|
|
|
76
76
|
warnings_count: number;
|
|
77
77
|
issues_by_category: Record<"schema_violation" | "upstream_semantic_unsupported" | "sks_zero_warning_disallowed" | "legacy_shape" | "policy_disallowed", number>;
|
|
78
78
|
events: {
|
|
79
|
-
event: "
|
|
79
|
+
event: "PreToolUse" | "PermissionRequest" | "PostToolUse" | "PreCompact" | "PostCompact" | "SessionStart" | "UserPromptSubmit" | "SubagentStart" | "SubagentStop" | "Stop";
|
|
80
80
|
checked: number;
|
|
81
81
|
ok: boolean;
|
|
82
82
|
warnings: string[];
|
|
@@ -120,7 +120,7 @@ export declare function codexDoctorReport(opts?: any): Promise<{
|
|
|
120
120
|
issues: import("./codex-hook-issues.js").CodexHookIssue[];
|
|
121
121
|
warnings: string[];
|
|
122
122
|
events: {
|
|
123
|
-
event: "
|
|
123
|
+
event: "PreToolUse" | "PermissionRequest" | "PostToolUse" | "PreCompact" | "PostCompact" | "SessionStart" | "UserPromptSubmit" | "SubagentStart" | "SubagentStop" | "Stop";
|
|
124
124
|
checked: number;
|
|
125
125
|
ok: boolean;
|
|
126
126
|
warnings: string[];
|
|
@@ -135,6 +135,18 @@ export declare function codexDoctorReport(opts?: any): Promise<{
|
|
|
135
135
|
ok: boolean;
|
|
136
136
|
issues: string[];
|
|
137
137
|
}[];
|
|
138
|
+
dual_representation: {
|
|
139
|
+
schema: string;
|
|
140
|
+
ok: boolean;
|
|
141
|
+
layers: {
|
|
142
|
+
hooks_json_exists: boolean;
|
|
143
|
+
config_toml_has_hooks: boolean;
|
|
144
|
+
name: string;
|
|
145
|
+
hooksJson: string;
|
|
146
|
+
configToml: string;
|
|
147
|
+
}[];
|
|
148
|
+
issues: string[];
|
|
149
|
+
};
|
|
138
150
|
issues: string[];
|
|
139
151
|
};
|
|
140
152
|
wrongness: import("../triwiki-wrongness/wrongness-schema.js").WrongnessRecord | null;
|
|
@@ -4,6 +4,24 @@ export declare function validateCodexHookConfigText(text: unknown, opts?: any):
|
|
|
4
4
|
source: any;
|
|
5
5
|
issues: string[];
|
|
6
6
|
};
|
|
7
|
+
export declare function validateCodexHooksJsonConfig(value: any, opts?: any): {
|
|
8
|
+
schema: string;
|
|
9
|
+
ok: boolean;
|
|
10
|
+
source: any;
|
|
11
|
+
issues: string[];
|
|
12
|
+
};
|
|
13
|
+
export declare function detectDualHookRepresentation(root: string): Promise<{
|
|
14
|
+
schema: string;
|
|
15
|
+
ok: boolean;
|
|
16
|
+
layers: {
|
|
17
|
+
hooks_json_exists: boolean;
|
|
18
|
+
config_toml_has_hooks: boolean;
|
|
19
|
+
name: string;
|
|
20
|
+
hooksJson: string;
|
|
21
|
+
configToml: string;
|
|
22
|
+
}[];
|
|
23
|
+
issues: string[];
|
|
24
|
+
}>;
|
|
7
25
|
export declare function validateCodexHookConfigFiles(root: string): Promise<{
|
|
8
26
|
schema: string;
|
|
9
27
|
ok: boolean;
|
|
@@ -13,6 +31,18 @@ export declare function validateCodexHookConfigFiles(root: string): Promise<{
|
|
|
13
31
|
ok: boolean;
|
|
14
32
|
issues: string[];
|
|
15
33
|
}[];
|
|
34
|
+
dual_representation: {
|
|
35
|
+
schema: string;
|
|
36
|
+
ok: boolean;
|
|
37
|
+
layers: {
|
|
38
|
+
hooks_json_exists: boolean;
|
|
39
|
+
config_toml_has_hooks: boolean;
|
|
40
|
+
name: string;
|
|
41
|
+
hooksJson: string;
|
|
42
|
+
configToml: string;
|
|
43
|
+
}[];
|
|
44
|
+
issues: string[];
|
|
45
|
+
};
|
|
16
46
|
issues: string[];
|
|
17
47
|
}>;
|
|
18
48
|
//# sourceMappingURL=codex-config-policy.d.ts.map
|