sneakoscope 1.11.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 +3 -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 +56 -1
- package/dist/cli/feature-commands.js +58 -4
- package/dist/commands/dfix.d.ts +148 -8
- package/dist/commands/image-ux-review.d.ts +1 -0
- package/dist/commands/ppt.d.ts +3 -0
- package/dist/core/bench.js +22 -11
- 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 +148 -8
- package/dist/core/commands/dfix-command.js +4 -1
- package/dist/core/commands/image-ux-review-command.d.ts +1 -0
- package/dist/core/commands/image-ux-review-command.js +26 -6
- package/dist/core/commands/ppt-command.d.ts +3 -0
- 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 +170 -8
- package/dist/core/dfix.js +181 -44
- package/dist/core/feature-fixtures.js +1 -1
- package/dist/core/feature-registry.js +12 -2
- package/dist/core/features/feature-completion.d.ts +2 -0
- package/dist/core/features/feature-completion.js +2 -0
- 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/image-ux-review/real-callout-extractor.d.ts +2 -0
- package/dist/core/image-ux-review/real-callout-extractor.js +4 -0
- package/dist/core/image-ux-review.d.ts +26 -0
- package/dist/core/image-ux-review.js +47 -1
- package/dist/core/init.js +14 -28
- package/dist/core/performance-budgets.json +4 -4
- package/dist/core/ppt-imagegen-review.d.ts +3 -0
- package/dist/core/ppt-review/index.d.ts +3 -0
- package/dist/core/ppt-review/index.js +15 -3
- package/dist/core/ppt-review/slide-exporter.js +109 -3
- package/dist/core/ppt-review/slide-imagegen-review.d.ts +2 -0
- package/dist/core/ppt-review/slide-imagegen-review.js +33 -3
- package/dist/core/ppt-review/slide-issue-extraction.d.ts +14 -0
- package/dist/core/ppt-review/slide-issue-extraction.js +56 -1
- 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 +22 -4
- package/schemas/codex/dfix-patch-plan.schema.json +8 -7
- package/schemas/codex/dfix-patch-result.schema.json +20 -0
- package/schemas/codex/dfix-verification-suggestion.schema.json +16 -0
- package/schemas/codex/image-ux-callout-extraction-report.schema.json +23 -0
- package/schemas/codex/ppt-slide-extraction-report.schema.json +36 -0
- package/schemas/codex/ppt-slide-issue-ledger.schema.json +19 -5
package/README.md
CHANGED
|
@@ -10,12 +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
|
+
sks ux-review run --image <path> --generate-callouts --json
|
|
17
18
|
sks ppt fixture --mock --json
|
|
18
19
|
sks dfix fixture --json
|
|
20
|
+
sks hooks trust-doctor --json
|
|
19
21
|
```
|
|
20
22
|
|
|
21
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",
|
|
@@ -332,6 +364,8 @@
|
|
|
332
364
|
"core/feature-fixtures.js",
|
|
333
365
|
"core/feature-registry.d.ts",
|
|
334
366
|
"core/feature-registry.js",
|
|
367
|
+
"core/features/feature-completion.d.ts",
|
|
368
|
+
"core/features/feature-completion.js",
|
|
335
369
|
"core/features/feature-fixtures.d.ts",
|
|
336
370
|
"core/features/feature-fixtures.js",
|
|
337
371
|
"core/features/feature-registry.d.ts",
|
|
@@ -699,6 +733,27 @@
|
|
|
699
733
|
"core/wiki-image/visual-anchor.js",
|
|
700
734
|
"core/work-order-ledger.d.ts",
|
|
701
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",
|
|
702
757
|
"vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.input.schema.json",
|
|
703
758
|
"vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.output.schema.json",
|
|
704
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,8 +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
|
+
};
|
|
51
|
+
verification_suggestion: {
|
|
52
|
+
schema: string;
|
|
53
|
+
created_at: string;
|
|
54
|
+
package_type: string;
|
|
55
|
+
package_scripts_detected: string[];
|
|
56
|
+
suggested_commands: string[];
|
|
57
|
+
fastest_sufficient_command: string;
|
|
58
|
+
best_command: string | undefined;
|
|
59
|
+
confidence: number;
|
|
60
|
+
expected_duration_budget_ms: number;
|
|
61
|
+
auto_run_requires_opt_in: boolean;
|
|
62
|
+
recovery_action: string;
|
|
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
|
+
};
|
|
12
77
|
schema: string;
|
|
13
78
|
ok: boolean;
|
|
14
79
|
mission_id: any;
|
|
@@ -24,11 +89,52 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
24
89
|
schema: string;
|
|
25
90
|
created_at: string;
|
|
26
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;
|
|
27
105
|
mode: string;
|
|
28
106
|
target_file: any;
|
|
29
107
|
find_text_present: boolean;
|
|
30
108
|
replace_text_present: boolean;
|
|
109
|
+
patch_mode: string;
|
|
110
|
+
codex_patch_handoff: {
|
|
111
|
+
mode: string;
|
|
112
|
+
prompt: string;
|
|
113
|
+
output_schema: {
|
|
114
|
+
required: string[];
|
|
115
|
+
forbidden_operations: string[];
|
|
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
|
+
};
|
|
135
|
+
} | null;
|
|
31
136
|
root_cause: any;
|
|
137
|
+
verification_commands: any;
|
|
32
138
|
safety: {
|
|
33
139
|
direct_fix_only: boolean;
|
|
34
140
|
destructive_operations_allowed: boolean;
|
|
@@ -47,16 +153,19 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
47
153
|
schema: string;
|
|
48
154
|
created_at: string;
|
|
49
155
|
explicit_apply_opt_in: boolean;
|
|
156
|
+
apply_opt_in: boolean;
|
|
157
|
+
patch_mode: any;
|
|
50
158
|
patch_result_present: boolean;
|
|
51
|
-
patch_applied:
|
|
52
|
-
changed_files:
|
|
53
|
-
|
|
159
|
+
patch_applied: any;
|
|
160
|
+
changed_files: any;
|
|
161
|
+
git_diff_before: any;
|
|
162
|
+
git_diff_after: any;
|
|
163
|
+
diff_captured: boolean;
|
|
164
|
+
no_op_reason: any;
|
|
54
165
|
noop_patch_wrongness: boolean;
|
|
55
|
-
rollback_plan:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}[];
|
|
59
|
-
blockers: string[];
|
|
166
|
+
rollback_plan: any;
|
|
167
|
+
runner_artifact: string;
|
|
168
|
+
blockers: any;
|
|
60
169
|
passed: boolean;
|
|
61
170
|
};
|
|
62
171
|
} | {
|
|
@@ -75,6 +184,11 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
75
184
|
root_cause_present: boolean;
|
|
76
185
|
patch_plan_present: boolean;
|
|
77
186
|
patch_result_present: boolean;
|
|
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;
|
|
78
192
|
verification_present: boolean;
|
|
79
193
|
rollback_plan_present: boolean;
|
|
80
194
|
noop_patch_wrongness: boolean;
|
|
@@ -95,6 +209,11 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
95
209
|
root_cause_present: boolean;
|
|
96
210
|
patch_plan_present: boolean;
|
|
97
211
|
patch_result_present: boolean;
|
|
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;
|
|
98
217
|
verification_present: boolean;
|
|
99
218
|
rollback_plan_present: boolean;
|
|
100
219
|
noop_patch_wrongness: boolean;
|
|
@@ -106,7 +225,28 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
106
225
|
root_cause: any;
|
|
107
226
|
patch_plan: any;
|
|
108
227
|
patch_result: any;
|
|
228
|
+
verification_suggestion: any;
|
|
109
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
|
+
};
|
|
110
250
|
};
|
|
111
251
|
proof: any;
|
|
112
252
|
} | {
|
package/dist/commands/ppt.d.ts
CHANGED
|
@@ -99,7 +99,10 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
99
99
|
next_action: string | null;
|
|
100
100
|
};
|
|
101
101
|
slide_callout_ledger: any;
|
|
102
|
+
slide_imagegen_request: any;
|
|
103
|
+
slide_imagegen_response: any;
|
|
102
104
|
slide_issue_ledger: any;
|
|
105
|
+
slide_extraction_report: any;
|
|
103
106
|
deck_issue_ledger: any;
|
|
104
107
|
fix_task_plan: {
|
|
105
108
|
schema: string;
|
package/dist/core/bench.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
|
+
import os from 'node:os';
|
|
2
3
|
import path from 'node:path';
|
|
3
4
|
import { performance } from 'node:perf_hooks';
|
|
4
5
|
import { ensureDir, nowIso, packageRoot, projectRoot, runProcess, writeJsonAtomic, writeTextAtomic } from './fsx.js';
|
|
@@ -19,7 +20,7 @@ export const CORE_BENCH_BUDGET_TIERS = Object.freeze({
|
|
|
19
20
|
'sks --version': 80,
|
|
20
21
|
'sks help': 140,
|
|
21
22
|
'sks root --json': 140,
|
|
22
|
-
'sks commands --json':
|
|
23
|
+
'sks commands --json': 320,
|
|
23
24
|
'sks proof validate --json': 350,
|
|
24
25
|
'sks trust validate bench-fixture --json': 450,
|
|
25
26
|
'sks wiki image-validate --json': 450,
|
|
@@ -85,11 +86,16 @@ const STATIC_CORE_COMMANDS = Object.freeze([
|
|
|
85
86
|
['sks features check --json', ['features', 'check', '--json']],
|
|
86
87
|
['sks scouts engines --json', ['scouts', 'engines', '--json']]
|
|
87
88
|
]);
|
|
88
|
-
function coreCommands(
|
|
89
|
-
const missionId = typeof
|
|
89
|
+
function coreCommands(benchTrustMission) {
|
|
90
|
+
const missionId = typeof benchTrustMission?.missionId === 'string' && benchTrustMission.missionId
|
|
91
|
+
? benchTrustMission.missionId
|
|
92
|
+
: 'bench-fixture-missing';
|
|
93
|
+
const trustRoot = typeof benchTrustMission?.root === 'string' && benchTrustMission.root
|
|
94
|
+
? benchTrustMission.root
|
|
95
|
+
: undefined;
|
|
90
96
|
return [
|
|
91
97
|
...STATIC_CORE_COMMANDS.slice(0, 5),
|
|
92
|
-
[TRUST_VALIDATE_BENCH_COMMAND, ['trust', 'validate', missionId, '--json']],
|
|
98
|
+
[TRUST_VALIDATE_BENCH_COMMAND, ['trust', 'validate', missionId, '--json', '--no-wrongness'], trustRoot],
|
|
93
99
|
...STATIC_CORE_COMMANDS.slice(5)
|
|
94
100
|
];
|
|
95
101
|
}
|
|
@@ -97,19 +103,19 @@ export async function runCoreBench(root = process.cwd(), { iterations = 3, tier
|
|
|
97
103
|
const script = path.join(packageRoot(), 'dist', 'bin', 'sks.js');
|
|
98
104
|
const budgets = (CORE_BENCH_BUDGET_TIERS[tier] || CORE_BENCH_BUDGET_TIERS['source-local']);
|
|
99
105
|
const measuredIterations = Math.max(1, Number(iterations) || 1);
|
|
100
|
-
const
|
|
106
|
+
const benchTrustMission = await ensureBenchTrustMission(root, script);
|
|
101
107
|
const rows = [];
|
|
102
|
-
for (const [label, args] of coreCommands(
|
|
108
|
+
for (const [label, args, commandRoot] of coreCommands(benchTrustMission)) {
|
|
103
109
|
const values = [];
|
|
104
110
|
const failures = [];
|
|
105
111
|
for (let i = 0; i < CORE_BENCH_WARMUP_ITERATIONS; i += 1) {
|
|
106
|
-
const result = await runBenchProcess(root, script, args);
|
|
112
|
+
const result = await runBenchProcess(commandRoot || root, script, args);
|
|
107
113
|
if (result.code !== 0)
|
|
108
114
|
failures.push({ phase: 'warmup', code: result.code, stderr_tail: result.stderr.slice(-400), stdout_tail: result.stdout.slice(-400) });
|
|
109
115
|
}
|
|
110
116
|
for (let i = 0; i < measuredIterations; i += 1) {
|
|
111
117
|
const t0 = performance.now();
|
|
112
|
-
const result = await runBenchProcess(root, script, args);
|
|
118
|
+
const result = await runBenchProcess(commandRoot || root, script, args);
|
|
113
119
|
values.push(performance.now() - t0);
|
|
114
120
|
if (result.code !== 0)
|
|
115
121
|
failures.push({ phase: 'measure', code: result.code, stderr_tail: result.stderr.slice(-400), stdout_tail: result.stdout.slice(-400) });
|
|
@@ -147,14 +153,19 @@ async function runBenchProcess(root, script, args) {
|
|
|
147
153
|
});
|
|
148
154
|
}
|
|
149
155
|
async function ensureBenchTrustMission(root, script) {
|
|
150
|
-
const
|
|
156
|
+
const benchRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-core-bench-trust-')).catch(() => root);
|
|
157
|
+
const beforeMissionIds = await listMissionIds(benchRoot);
|
|
151
158
|
const result = await runProcess(process.execPath, [script, 'run', 'fixture', '--mock', '--json'], {
|
|
152
|
-
cwd:
|
|
159
|
+
cwd: benchRoot,
|
|
153
160
|
timeoutMs: 60_000,
|
|
154
161
|
maxOutputBytes: 4 * 1024 * 1024,
|
|
155
162
|
env: { SKS_SKIP_NPM_FRESHNESS_CHECK: '1', SKS_DISABLE_UPDATE_CHECK: '1', CI: 'true' }
|
|
156
163
|
});
|
|
157
|
-
return
|
|
164
|
+
return {
|
|
165
|
+
missionId: parseMissionId(result.stdout) || await findBenchTrustMission(benchRoot, beforeMissionIds),
|
|
166
|
+
root: benchRoot,
|
|
167
|
+
setup_code: result.code
|
|
168
|
+
};
|
|
158
169
|
}
|
|
159
170
|
function parseMissionId(text) {
|
|
160
171
|
const parsed = parseJsonOutput(text);
|
|
@@ -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;
|