sneakoscope 1.11.0 → 1.12.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 +3 -1
- package/dist/commands/dfix.d.ts +36 -0
- 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/commands/dfix-command.d.ts +36 -0
- package/dist/core/commands/dfix-command.js +1 -0
- 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.d.ts +47 -0
- package/dist/core/dfix.js +93 -5
- 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/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/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/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/package.json +14 -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,10 +10,11 @@ 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.12.0** focuses on real execution closure: UX-Review, PPT Imagegen Review, DFix, and all-feature completion now require command-path wiring, extraction reports, proof/trust/wrongness evidence, mock/real separation, and release gates that block static-only or fake evidence paths.
|
|
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
|
|
19
20
|
```
|
|
@@ -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.12.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.12.0",
|
|
4
4
|
"typescript": true,
|
|
5
5
|
"mjs_runtime_files": 0,
|
|
6
6
|
"files": [
|
|
@@ -332,6 +332,8 @@
|
|
|
332
332
|
"core/feature-fixtures.js",
|
|
333
333
|
"core/feature-registry.d.ts",
|
|
334
334
|
"core/feature-registry.js",
|
|
335
|
+
"core/features/feature-completion.d.ts",
|
|
336
|
+
"core/features/feature-completion.js",
|
|
335
337
|
"core/features/feature-fixtures.d.ts",
|
|
336
338
|
"core/features/feature-fixtures.js",
|
|
337
339
|
"core/features/feature-registry.d.ts",
|
package/dist/commands/dfix.d.ts
CHANGED
|
@@ -9,6 +9,16 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
9
9
|
confidence: number;
|
|
10
10
|
blockers: never[];
|
|
11
11
|
};
|
|
12
|
+
verification_suggestion: {
|
|
13
|
+
schema: string;
|
|
14
|
+
created_at: string;
|
|
15
|
+
package_type: string;
|
|
16
|
+
package_scripts_detected: string[];
|
|
17
|
+
suggested_commands: string[];
|
|
18
|
+
best_command: string | undefined;
|
|
19
|
+
auto_run_requires_opt_in: boolean;
|
|
20
|
+
recovery_action: string;
|
|
21
|
+
};
|
|
12
22
|
schema: string;
|
|
13
23
|
ok: boolean;
|
|
14
24
|
mission_id: any;
|
|
@@ -28,7 +38,17 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
28
38
|
target_file: any;
|
|
29
39
|
find_text_present: boolean;
|
|
30
40
|
replace_text_present: boolean;
|
|
41
|
+
patch_mode: string;
|
|
42
|
+
codex_patch_handoff: {
|
|
43
|
+
mode: string;
|
|
44
|
+
prompt: string;
|
|
45
|
+
output_schema: {
|
|
46
|
+
required: string[];
|
|
47
|
+
forbidden_operations: string[];
|
|
48
|
+
};
|
|
49
|
+
} | null;
|
|
31
50
|
root_cause: any;
|
|
51
|
+
verification_commands: any;
|
|
32
52
|
safety: {
|
|
33
53
|
direct_fix_only: boolean;
|
|
34
54
|
destructive_operations_allowed: boolean;
|
|
@@ -47,9 +67,22 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
47
67
|
schema: string;
|
|
48
68
|
created_at: string;
|
|
49
69
|
explicit_apply_opt_in: boolean;
|
|
70
|
+
apply_opt_in: boolean;
|
|
71
|
+
patch_mode: any;
|
|
50
72
|
patch_result_present: boolean;
|
|
51
73
|
patch_applied: boolean;
|
|
52
74
|
changed_files: string[];
|
|
75
|
+
git_diff_before: {
|
|
76
|
+
captured: boolean;
|
|
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
|
+
};
|
|
85
|
+
diff_captured: boolean;
|
|
53
86
|
no_op_reason: string | null;
|
|
54
87
|
noop_patch_wrongness: boolean;
|
|
55
88
|
rollback_plan: {
|
|
@@ -75,6 +108,7 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
75
108
|
root_cause_present: boolean;
|
|
76
109
|
patch_plan_present: boolean;
|
|
77
110
|
patch_result_present: boolean;
|
|
111
|
+
verification_suggestion_present: boolean;
|
|
78
112
|
verification_present: boolean;
|
|
79
113
|
rollback_plan_present: boolean;
|
|
80
114
|
noop_patch_wrongness: boolean;
|
|
@@ -95,6 +129,7 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
95
129
|
root_cause_present: boolean;
|
|
96
130
|
patch_plan_present: boolean;
|
|
97
131
|
patch_result_present: boolean;
|
|
132
|
+
verification_suggestion_present: boolean;
|
|
98
133
|
verification_present: boolean;
|
|
99
134
|
rollback_plan_present: boolean;
|
|
100
135
|
noop_patch_wrongness: boolean;
|
|
@@ -106,6 +141,7 @@ export declare function run(command: any, args?: any): Promise<void | {
|
|
|
106
141
|
root_cause: any;
|
|
107
142
|
patch_plan: any;
|
|
108
143
|
patch_result: any;
|
|
144
|
+
verification_suggestion: any;
|
|
109
145
|
verification: any;
|
|
110
146
|
};
|
|
111
147
|
proof: any;
|
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);
|
|
@@ -9,6 +9,16 @@ export declare function dfixCommand(commandOrArgs?: any[] | string, maybeArgs?:
|
|
|
9
9
|
confidence: number;
|
|
10
10
|
blockers: never[];
|
|
11
11
|
};
|
|
12
|
+
verification_suggestion: {
|
|
13
|
+
schema: string;
|
|
14
|
+
created_at: string;
|
|
15
|
+
package_type: string;
|
|
16
|
+
package_scripts_detected: string[];
|
|
17
|
+
suggested_commands: string[];
|
|
18
|
+
best_command: string | undefined;
|
|
19
|
+
auto_run_requires_opt_in: boolean;
|
|
20
|
+
recovery_action: string;
|
|
21
|
+
};
|
|
12
22
|
schema: string;
|
|
13
23
|
ok: boolean;
|
|
14
24
|
mission_id: any;
|
|
@@ -28,7 +38,17 @@ export declare function dfixCommand(commandOrArgs?: any[] | string, maybeArgs?:
|
|
|
28
38
|
target_file: any;
|
|
29
39
|
find_text_present: boolean;
|
|
30
40
|
replace_text_present: boolean;
|
|
41
|
+
patch_mode: string;
|
|
42
|
+
codex_patch_handoff: {
|
|
43
|
+
mode: string;
|
|
44
|
+
prompt: string;
|
|
45
|
+
output_schema: {
|
|
46
|
+
required: string[];
|
|
47
|
+
forbidden_operations: string[];
|
|
48
|
+
};
|
|
49
|
+
} | null;
|
|
31
50
|
root_cause: any;
|
|
51
|
+
verification_commands: any;
|
|
32
52
|
safety: {
|
|
33
53
|
direct_fix_only: boolean;
|
|
34
54
|
destructive_operations_allowed: boolean;
|
|
@@ -47,9 +67,22 @@ export declare function dfixCommand(commandOrArgs?: any[] | string, maybeArgs?:
|
|
|
47
67
|
schema: string;
|
|
48
68
|
created_at: string;
|
|
49
69
|
explicit_apply_opt_in: boolean;
|
|
70
|
+
apply_opt_in: boolean;
|
|
71
|
+
patch_mode: any;
|
|
50
72
|
patch_result_present: boolean;
|
|
51
73
|
patch_applied: boolean;
|
|
52
74
|
changed_files: string[];
|
|
75
|
+
git_diff_before: {
|
|
76
|
+
captured: boolean;
|
|
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
|
+
};
|
|
85
|
+
diff_captured: boolean;
|
|
53
86
|
no_op_reason: string | null;
|
|
54
87
|
noop_patch_wrongness: boolean;
|
|
55
88
|
rollback_plan: {
|
|
@@ -75,6 +108,7 @@ export declare function dfixCommand(commandOrArgs?: any[] | string, maybeArgs?:
|
|
|
75
108
|
root_cause_present: boolean;
|
|
76
109
|
patch_plan_present: boolean;
|
|
77
110
|
patch_result_present: boolean;
|
|
111
|
+
verification_suggestion_present: boolean;
|
|
78
112
|
verification_present: boolean;
|
|
79
113
|
rollback_plan_present: boolean;
|
|
80
114
|
noop_patch_wrongness: boolean;
|
|
@@ -95,6 +129,7 @@ export declare function dfixCommand(commandOrArgs?: any[] | string, maybeArgs?:
|
|
|
95
129
|
root_cause_present: boolean;
|
|
96
130
|
patch_plan_present: boolean;
|
|
97
131
|
patch_result_present: boolean;
|
|
132
|
+
verification_suggestion_present: boolean;
|
|
98
133
|
verification_present: boolean;
|
|
99
134
|
rollback_plan_present: boolean;
|
|
100
135
|
noop_patch_wrongness: boolean;
|
|
@@ -106,6 +141,7 @@ export declare function dfixCommand(commandOrArgs?: any[] | string, maybeArgs?:
|
|
|
106
141
|
root_cause: any;
|
|
107
142
|
patch_plan: any;
|
|
108
143
|
patch_result: any;
|
|
144
|
+
verification_suggestion: any;
|
|
109
145
|
verification: any;
|
|
110
146
|
};
|
|
111
147
|
proof: any;
|
|
@@ -147,6 +147,7 @@ function options(args) {
|
|
|
147
147
|
prompt: args.filter((arg) => !String(arg).startsWith('--')).join(' '),
|
|
148
148
|
command: readOption(args, '--command', null),
|
|
149
149
|
runCommand: flag(args, '--run'),
|
|
150
|
+
verifyAuto: flag(args, '--verify-auto'),
|
|
150
151
|
file: readOption(args, '--file', null),
|
|
151
152
|
error: readOption(args, '--error', null),
|
|
152
153
|
rootCause: readOption(args, '--root-cause', null),
|
|
@@ -4,7 +4,7 @@ import { ensureDir, nowIso, projectRoot, readJson, writeJsonAtomic } from '../fs
|
|
|
4
4
|
import { createMission, findLatestMission, loadMission } from '../mission.js';
|
|
5
5
|
import { flag, readOption } from './command-utils.js';
|
|
6
6
|
import { printJson } from '../../cli/output.js';
|
|
7
|
-
import { IMAGE_UX_REVIEW_FIX_LOOP_ARTIFACT, IMAGE_UX_REVIEW_FIX_TASK_PLAN_ARTIFACT, IMAGE_UX_REVIEW_GENERATED_REVIEW_LEDGER_ARTIFACT, IMAGE_UX_REVIEW_GPT_IMAGE_2_RESPONSE_ARTIFACT, IMAGE_UX_REVIEW_GATE_ARTIFACT, IMAGE_UX_REVIEW_GPT_IMAGE_2_REQUEST_ARTIFACT, IMAGE_UX_REVIEW_IMAGEGEN_REQUEST_ARTIFACT, IMAGE_UX_REVIEW_ITERATION_REPORT_ARTIFACT, IMAGE_UX_REVIEW_ISSUE_LEDGER_ARTIFACT, IMAGE_UX_REVIEW_POLICY_ARTIFACT, IMAGE_UX_REVIEW_RECAPTURE_ARTIFACT, IMAGE_UX_REVIEW_SCREEN_INVENTORY_ARTIFACT, imageUxReviewProofEvidence, writeImageUxReviewRouteArtifacts } from '../image-ux-review.js';
|
|
7
|
+
import { IMAGE_UX_REVIEW_FIX_LOOP_ARTIFACT, IMAGE_UX_REVIEW_FIX_TASK_PLAN_ARTIFACT, IMAGE_UX_REVIEW_CALLOUT_EXTRACTION_REPORT_ARTIFACT, IMAGE_UX_REVIEW_GENERATED_REVIEW_LEDGER_ARTIFACT, IMAGE_UX_REVIEW_GPT_IMAGE_2_RESPONSE_ARTIFACT, IMAGE_UX_REVIEW_GATE_ARTIFACT, IMAGE_UX_REVIEW_GPT_IMAGE_2_REQUEST_ARTIFACT, IMAGE_UX_REVIEW_IMAGEGEN_REQUEST_ARTIFACT, IMAGE_UX_REVIEW_ITERATION_REPORT_ARTIFACT, IMAGE_UX_REVIEW_ISSUE_LEDGER_ARTIFACT, IMAGE_UX_REVIEW_POLICY_ARTIFACT, IMAGE_UX_REVIEW_RECAPTURE_ARTIFACT, IMAGE_UX_REVIEW_SCREEN_INVENTORY_ARTIFACT, imageUxReviewProofEvidence, buildImageUxCalloutExtractionReport, writeImageUxReviewRouteArtifacts } from '../image-ux-review.js';
|
|
8
8
|
import { maybeFinalizeRoute } from '../proof/auto-finalize.js';
|
|
9
9
|
import { generatedImageMetadata, generateGptImage2CalloutReview } from '../image-ux-review/imagegen-adapter.js';
|
|
10
10
|
import { extractRealCallouts } from '../image-ux-review/real-callout-extractor.js';
|
|
@@ -19,6 +19,7 @@ const IMAGE_UX_REVIEW_ARTIFACT_PATHS = {
|
|
|
19
19
|
imagegen_response: IMAGE_UX_REVIEW_GPT_IMAGE_2_RESPONSE_ARTIFACT,
|
|
20
20
|
generated_review_ledger: IMAGE_UX_REVIEW_GENERATED_REVIEW_LEDGER_ARTIFACT,
|
|
21
21
|
issue_ledger: IMAGE_UX_REVIEW_ISSUE_LEDGER_ARTIFACT,
|
|
22
|
+
callout_extraction_report: IMAGE_UX_REVIEW_CALLOUT_EXTRACTION_REPORT_ARTIFACT,
|
|
22
23
|
fix_task_plan: IMAGE_UX_REVIEW_FIX_TASK_PLAN_ARTIFACT,
|
|
23
24
|
fix_loop: IMAGE_UX_REVIEW_FIX_LOOP_ARTIFACT,
|
|
24
25
|
recapture_plan: IMAGE_UX_REVIEW_RECAPTURE_ARTIFACT,
|
|
@@ -63,6 +64,7 @@ async function runImageUxReview(root, command, args = []) {
|
|
|
63
64
|
: null;
|
|
64
65
|
const imagePath = readOption(args, '--image', null) || readOption(args, '--screenshot', null);
|
|
65
66
|
const generatedImage = readOption(args, '--generated-image', null);
|
|
67
|
+
const shouldGenerateCallouts = flag(args, '--generate-callouts') || flag(args, '--fix');
|
|
66
68
|
if (missionId)
|
|
67
69
|
return rebuildExistingMission(root, command, [missionId, ...args], { fixRequested: flag(args, '--fix') });
|
|
68
70
|
if (!imagePath && !readOption(args, '--from-computer-use', null)) {
|
|
@@ -88,7 +90,7 @@ async function runImageUxReview(root, command, args = []) {
|
|
|
88
90
|
await writeJsonAtomic(path.join(dir, 'decision-contract.json'), contract);
|
|
89
91
|
if (generatedImage)
|
|
90
92
|
await attachGeneratedReviewImage(root, dir, contract, generatedImage, { realGenerated: !flag(args, '--mock'), mock: flag(args, '--mock') });
|
|
91
|
-
if (!generatedImage &&
|
|
93
|
+
if (!generatedImage && shouldGenerateCallouts) {
|
|
92
94
|
const outputDir = path.join(dir, 'generated-callouts');
|
|
93
95
|
const result = await generateGptImage2CalloutReview({
|
|
94
96
|
mission_id: id,
|
|
@@ -99,8 +101,23 @@ async function runImageUxReview(root, command, args = []) {
|
|
|
99
101
|
requested_fidelity: 'original',
|
|
100
102
|
privacy: 'local-only'
|
|
101
103
|
});
|
|
102
|
-
if (result.generated_image_path)
|
|
104
|
+
if (result.generated_image_path) {
|
|
103
105
|
await attachGeneratedReviewImage(root, dir, contract, result.generated_image_path, { realGenerated: true, mock: false, providerSurface: result.provider });
|
|
106
|
+
if (flag(args, '--fix')) {
|
|
107
|
+
const extraction = await extractRealCallouts({
|
|
108
|
+
root,
|
|
109
|
+
generatedImagePath: result.generated_image_path,
|
|
110
|
+
sourceScreenshot: { id: 'screen-1' },
|
|
111
|
+
sessionId: readOption(args, '--session', null) || readOption(args, '--session-id', null)
|
|
112
|
+
});
|
|
113
|
+
await writeJsonAtomic(path.join(dir, IMAGE_UX_REVIEW_ISSUE_LEDGER_ARTIFACT), extraction.issue_ledger);
|
|
114
|
+
await writeJsonAtomic(path.join(dir, IMAGE_UX_REVIEW_CALLOUT_EXTRACTION_REPORT_ARTIFACT), await buildImageUxCalloutExtractionReport(root, extraction, {
|
|
115
|
+
generatedImagePath: result.generated_image_path,
|
|
116
|
+
sourceImagePath: sourceRel || imagePath,
|
|
117
|
+
provider: extraction.provider
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
104
121
|
}
|
|
105
122
|
const artifacts = await writeImageUxReviewRouteArtifacts(dir, contract, { root, wrongnessChecked: true });
|
|
106
123
|
const proof = await finalizeImageUx(root, id, command, artifacts, { mock: flag(args, '--mock'), cmd: `sks ${command} run` });
|
|
@@ -151,9 +168,12 @@ async function extractIssuesImageUxReview(root, command, args = []) {
|
|
|
151
168
|
sourceScreenshot: { id: 'screen-1' },
|
|
152
169
|
sessionId: readOption(args, '--session', null) || readOption(args, '--session-id', null)
|
|
153
170
|
});
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
171
|
+
await writeJsonAtomic(path.join(dir, IMAGE_UX_REVIEW_ISSUE_LEDGER_ARTIFACT), extraction.issue_ledger);
|
|
172
|
+
await writeJsonAtomic(path.join(dir, IMAGE_UX_REVIEW_CALLOUT_EXTRACTION_REPORT_ARTIFACT), await buildImageUxCalloutExtractionReport(root, extraction, {
|
|
173
|
+
generatedImagePath: generatedImage,
|
|
174
|
+
sourceImagePath: sourceRel || sourceImage,
|
|
175
|
+
provider: extraction.provider
|
|
176
|
+
}));
|
|
157
177
|
}
|
|
158
178
|
const artifacts = await writeImageUxReviewRouteArtifacts(dir, contract, { root, wrongnessChecked: true });
|
|
159
179
|
const proof = await finalizeImageUx(root, id, command, artifacts, { mock: flag(args, '--mock'), cmd: `sks ${command} extract-issues` });
|
|
@@ -99,7 +99,10 @@ export declare function pptCommand(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/dfix.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export declare const DFIX_DIAGNOSIS_ARTIFACT = "dfix-diagnosis.json";
|
|
|
2
2
|
export declare const DFIX_ROOT_CAUSE_ARTIFACT = "dfix-root-cause.json";
|
|
3
3
|
export declare const DFIX_PATCH_PLAN_ARTIFACT = "dfix-patch-plan.json";
|
|
4
4
|
export declare const DFIX_PATCH_RESULT_ARTIFACT = "dfix-patch-result.json";
|
|
5
|
+
export declare const DFIX_VERIFICATION_SUGGESTION_ARTIFACT = "dfix-verification-suggestion.json";
|
|
5
6
|
export declare const DFIX_VERIFICATION_ARTIFACT = "dfix-verification.json";
|
|
6
7
|
export declare const DFIX_GATE_ARTIFACT = "dfix-gate.json";
|
|
7
8
|
export declare const DFIX_ARTIFACT_PATHS: Record<string, string>;
|
|
@@ -22,6 +23,16 @@ export declare function writeDfixDiagnosis(root: string, dir: string, opts?: any
|
|
|
22
23
|
confidence: number;
|
|
23
24
|
blockers: never[];
|
|
24
25
|
};
|
|
26
|
+
verification_suggestion: {
|
|
27
|
+
schema: string;
|
|
28
|
+
created_at: string;
|
|
29
|
+
package_type: string;
|
|
30
|
+
package_scripts_detected: string[];
|
|
31
|
+
suggested_commands: string[];
|
|
32
|
+
best_command: string | undefined;
|
|
33
|
+
auto_run_requires_opt_in: boolean;
|
|
34
|
+
recovery_action: string;
|
|
35
|
+
};
|
|
25
36
|
}>;
|
|
26
37
|
export declare function writeDfixPatchPlan(dir: string, opts?: any): Promise<{
|
|
27
38
|
schema: string;
|
|
@@ -31,7 +42,17 @@ export declare function writeDfixPatchPlan(dir: string, opts?: any): Promise<{
|
|
|
31
42
|
target_file: any;
|
|
32
43
|
find_text_present: boolean;
|
|
33
44
|
replace_text_present: boolean;
|
|
45
|
+
patch_mode: string;
|
|
46
|
+
codex_patch_handoff: {
|
|
47
|
+
mode: string;
|
|
48
|
+
prompt: string;
|
|
49
|
+
output_schema: {
|
|
50
|
+
required: string[];
|
|
51
|
+
forbidden_operations: string[];
|
|
52
|
+
};
|
|
53
|
+
} | null;
|
|
34
54
|
root_cause: any;
|
|
55
|
+
verification_commands: any;
|
|
35
56
|
safety: {
|
|
36
57
|
direct_fix_only: boolean;
|
|
37
58
|
destructive_operations_allowed: boolean;
|
|
@@ -46,9 +67,22 @@ export declare function writeDfixPatchResult(root: string, dir: string, opts?: a
|
|
|
46
67
|
schema: string;
|
|
47
68
|
created_at: string;
|
|
48
69
|
explicit_apply_opt_in: boolean;
|
|
70
|
+
apply_opt_in: boolean;
|
|
71
|
+
patch_mode: any;
|
|
49
72
|
patch_result_present: boolean;
|
|
50
73
|
patch_applied: boolean;
|
|
51
74
|
changed_files: string[];
|
|
75
|
+
git_diff_before: {
|
|
76
|
+
captured: boolean;
|
|
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
|
+
};
|
|
85
|
+
diff_captured: boolean;
|
|
52
86
|
no_op_reason: string | null;
|
|
53
87
|
noop_patch_wrongness: boolean;
|
|
54
88
|
rollback_plan: {
|
|
@@ -67,6 +101,7 @@ export declare function writeDfixGate(dir: string, opts?: any): Promise<{
|
|
|
67
101
|
root_cause_present: boolean;
|
|
68
102
|
patch_plan_present: boolean;
|
|
69
103
|
patch_result_present: boolean;
|
|
104
|
+
verification_suggestion_present: boolean;
|
|
70
105
|
verification_present: boolean;
|
|
71
106
|
rollback_plan_present: boolean;
|
|
72
107
|
noop_patch_wrongness: boolean;
|
|
@@ -78,6 +113,7 @@ export declare function writeDfixGate(dir: string, opts?: any): Promise<{
|
|
|
78
113
|
root_cause: any;
|
|
79
114
|
patch_plan: any;
|
|
80
115
|
patch_result: any;
|
|
116
|
+
verification_suggestion: any;
|
|
81
117
|
verification: any;
|
|
82
118
|
}>;
|
|
83
119
|
export declare function dfixProofEvidence(gate?: any): {
|
|
@@ -88,9 +124,20 @@ export declare function dfixProofEvidence(gate?: any): {
|
|
|
88
124
|
patch_plan_present: boolean;
|
|
89
125
|
patch_result_present: boolean;
|
|
90
126
|
verification_present: boolean;
|
|
127
|
+
verification_suggestion_present: boolean;
|
|
91
128
|
verification_status: string;
|
|
92
129
|
noop_patch_wrongness: boolean;
|
|
93
130
|
blockers: any;
|
|
94
131
|
};
|
|
132
|
+
export declare function writeDfixVerificationSuggestion(root: string, dir: string, opts?: any): Promise<{
|
|
133
|
+
schema: string;
|
|
134
|
+
created_at: string;
|
|
135
|
+
package_type: string;
|
|
136
|
+
package_scripts_detected: string[];
|
|
137
|
+
suggested_commands: string[];
|
|
138
|
+
best_command: string | undefined;
|
|
139
|
+
auto_run_requires_opt_in: boolean;
|
|
140
|
+
recovery_action: string;
|
|
141
|
+
}>;
|
|
95
142
|
export declare function finalizeDfix(root: string, missionId: string, artifacts: any, opts?: any): Promise<any>;
|
|
96
143
|
//# sourceMappingURL=dfix.d.ts.map
|