sneakoscope 6.0.3 → 6.1.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 -3
- package/config/codex-releases/{rust-v0.142.0.json → rust-v0.144.1.json} +6 -6
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/bin/fast-inline.js +0 -5
- package/dist/bin/sks-dispatch.js +0 -2
- package/dist/cli/install-helpers.js +240 -460
- package/dist/cli/router.js +53 -4
- package/dist/commands/codex-lb.js +140 -36
- package/dist/commands/codex.js +6 -5
- package/dist/commands/doctor.js +60 -26
- package/dist/commands/versioning.js +7 -0
- package/dist/config/skills-manifest.json +57 -57
- package/dist/core/agents/agent-central-ledger.js +9 -0
- package/dist/core/agents/agent-cleanup-executor.js +334 -41
- package/dist/core/agents/agent-cleanup.js +20 -1
- package/dist/core/agents/agent-command-surface.js +2 -1
- package/dist/core/agents/agent-janitor.js +9 -10
- package/dist/core/agents/agent-namespace-safety.js +56 -0
- package/dist/core/agents/agent-orchestrator.js +25 -3
- package/dist/core/agents/agent-output-validator.js +1 -1
- package/dist/core/agents/agent-role-config.js +3 -6
- package/dist/core/agents/agent-runner-codex-exec.js +2 -0
- package/dist/core/agents/agent-runner-process.js +1 -0
- package/dist/core/agents/fast-mode-policy.js +3 -5
- package/dist/core/agents/native-worker-backend-router.js +2 -1
- package/dist/core/agents/work-partition/repo-inventory.js +68 -7
- package/dist/core/code-structure.js +5 -4
- package/dist/core/codex/codex-config-guard.js +31 -9
- package/dist/core/codex-app/codex-app-fast-ui-repair.js +51 -20
- package/dist/core/codex-app/codex-app-ui-state-snapshot.js +11 -3
- package/dist/core/codex-app/sks-menubar.js +8 -3
- package/dist/core/codex-app.js +35 -14
- package/dist/core/codex-compat/codex-hook-warning-detector.js +10 -1
- package/dist/core/codex-compat/codex-release-manifest.js +6 -6
- package/dist/core/codex-control/codex-0139-doctor-real-probe.js +7 -1
- package/dist/core/codex-control/codex-0139-image-path-real-probe.js +14 -8
- package/dist/core/codex-control/codex-0139-probe-runner.js +103 -28
- package/dist/core/codex-control/codex-0139-real-probe-summary.js +7 -3
- package/dist/core/codex-control/codex-0139-real-probes.js +21 -6
- package/dist/core/codex-control/codex-0139-sandbox-real-probe.js +39 -13
- package/dist/core/codex-control/codex-0139-web-search-probe.js +11 -8
- package/dist/core/codex-control/{codex-0142-capability.js → codex-0144-capability.js} +22 -22
- package/dist/core/codex-control/codex-0144-collab-agent-real-probe.js +63 -0
- package/dist/core/codex-control/codex-multi-agent-event-normalizer.js +5 -1
- package/dist/core/codex-control/codex-reliability-shield.js +4 -1
- package/dist/core/codex-control/codex-sdk-adapter.js +53 -6
- package/dist/core/codex-control/codex-sdk-config-policy.js +2 -1
- package/dist/core/codex-control/codex-sdk-sandbox-policy.js +6 -3
- package/dist/core/codex-lb/codex-lb-env.js +29 -0
- package/dist/core/codex-lb/codex-lb-tool-catalog.js +478 -0
- package/dist/core/codex-native/codex-native-feature-broker.js +22 -22
- package/dist/core/codex-native/codex-native-feature-matrix.js +2 -2
- package/dist/core/codex-native/native-capability-postcheck.js +16 -8
- package/dist/core/codex-native/native-capability-repair-matrix.js +76 -27
- package/dist/core/codex-plugins/codex-plugin-json.js +67 -21
- package/dist/core/codex-plugins/codex-plugin-repair.js +118 -0
- package/dist/core/codex-runtime/codex-desktop-config-policy.js +306 -0
- package/dist/core/commands/agent-command.js +19 -0
- package/dist/core/commands/basic-cli.js +30 -24
- package/dist/core/commands/gc-command.js +27 -4
- package/dist/core/commands/image-ux-review-command.js +55 -24
- package/dist/core/commands/mad-sks-command.js +152 -132
- package/dist/core/commands/naruto-command.js +5 -2
- package/dist/core/commands/pipeline-command.js +1 -0
- package/dist/core/commands/wiki-command.js +179 -83
- package/dist/core/computer-use-live-evidence.js +166 -3
- package/dist/core/computer-use-status.js +5 -2
- package/dist/core/daemon/sksd-hook-daemon-entrypoint.js +2 -2
- package/dist/core/daemon/sksd-hook-daemon.js +171 -28
- package/dist/core/daemon/sksd-hook-dispatch.js +2 -2
- package/dist/core/dfix/verification-selector.js +6 -4
- package/dist/core/doctor/browser-use-repair.js +54 -13
- package/dist/core/doctor/codex-0139-doctor.js +3 -2
- package/dist/core/doctor/computer-use-repair.js +28 -39
- package/dist/core/doctor/doctor-codex-startup-repair.js +19 -9
- package/dist/core/doctor/doctor-context7-repair.js +1 -1
- package/dist/core/doctor/doctor-dirty-planner.js +1 -1
- package/dist/core/doctor/doctor-native-capability-repair.js +74 -3
- package/dist/core/doctor/imagegen-repair.js +47 -12
- package/dist/core/doctor/legacy-global-hook-cleanup.js +179 -0
- package/dist/core/feature-registry.js +25 -31
- package/dist/core/fsx.js +54 -6
- package/dist/core/harness-conflicts.js +1 -1
- package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +5 -4
- package/dist/core/hooks-runtime/hook-invocation-dedupe.js +147 -0
- package/dist/core/hooks-runtime/hook-io.js +6 -0
- package/dist/core/hooks-runtime.js +17 -2
- package/dist/core/image/image-artifact-path-contract.js +8 -6
- package/dist/core/image/image-artifact-registry.js +5 -1
- package/dist/core/image-ux-review/imagegen-adapter.js +5 -2
- package/dist/core/imagegen/imagegen-capability.js +10 -13
- package/dist/core/imagegen/require-imagegen.js +37 -11
- package/dist/core/managed-assets/managed-assets-manifest.js +1 -5
- package/dist/core/naruto/naruto-work-graph.js +70 -4
- package/dist/core/ops/reporting.js +3 -0
- package/dist/core/pipeline-internals/runtime-core.js +12 -7
- package/dist/core/pipeline-internals/runtime-gates.js +17 -1
- package/dist/core/ppt/style-tokens.js +1 -1
- package/dist/core/ppt-review/index.js +1 -1
- package/dist/core/ppt-review/slide-exporter.js +23 -17
- package/dist/core/ppt-review/slide-imagegen-review.js +1 -1
- package/dist/core/ppt-review/slide-issue-extraction.js +4 -2
- package/dist/core/product-design-plugin.js +2 -2
- package/dist/core/proof/route-finalizer.js +1 -1
- package/dist/core/proof-field.js +3 -3
- package/dist/core/provider/model-router.js +5 -1
- package/dist/core/release/gate-manifest.js +18 -12
- package/dist/core/release/gate-pack-manifest.js +1 -1
- package/dist/core/release/release-gate-affected-selector.js +1 -1
- package/dist/core/release/release-gate-dag.js +43 -3
- package/dist/core/release/release-gate-hermetic-env.js +28 -17
- package/dist/core/release/release-real-contract.js +416 -0
- package/dist/core/retention/retention-budget.js +25 -6
- package/dist/core/retention.js +980 -101
- package/dist/core/routes/evidence.js +4 -4
- package/dist/core/routes/ppt-policy.js +1 -1
- package/dist/core/routes.js +4 -3
- package/dist/core/secret-redaction.js +4 -0
- package/dist/core/triwiki/code-pack.js +8 -2
- package/dist/core/triwiki/triwiki-cache-key.js +108 -29
- package/dist/core/triwiki-attention.js +13 -6
- package/dist/core/triwiki-provenance.js +274 -0
- package/dist/core/triwiki-runtime.js +21 -7
- package/dist/core/triwiki-wrongness/wrongness-ledger.js +178 -59
- package/dist/core/triwiki-wrongness/wrongness-retrieval.js +11 -2
- package/dist/core/triwiki-wrongness/wrongness-trust-policy.js +2 -0
- package/dist/core/update-check.js +23 -15
- package/dist/core/version.js +1 -1
- package/dist/core/wiki-coordinate.js +128 -12
- package/dist/core/work-order-ledger.js +168 -9
- package/dist/core/zellij/zellij-command.js +12 -1
- package/dist/core/zellij/zellij-dashboard-pane.js +3 -3
- package/dist/core/zellij/zellij-launcher.js +15 -14
- package/dist/core/zellij/zellij-pane-proof.js +32 -6
- package/dist/core/zellij/zellij-worker-pane-manager.js +5 -3
- package/dist/scripts/agent-fast-mode-default-check.js +48 -29
- package/dist/scripts/agent-role-config-repair-check.js +25 -4
- package/dist/scripts/agent-wiki-context-proof-check.js +16 -2
- package/dist/scripts/all-feature-deep-completion-check.js +14 -4
- package/dist/scripts/build-dist.js +17 -5
- package/dist/scripts/canonical-test-runner.js +188 -0
- package/dist/scripts/check-command-module-budget.js +38 -16
- package/dist/scripts/check-legacy-free.js +1 -1
- package/dist/scripts/codex-0139-interrupt-agent-check.js +5 -1
- package/dist/scripts/{codex-0142-app-server-v2-check.js → codex-0144-app-server-v2-check.js} +11 -10
- package/dist/scripts/{codex-0142-binary-identity-check.js → codex-0144-binary-identity-check.js} +4 -4
- package/dist/scripts/codex-0144-capability-check.js +21 -0
- package/dist/scripts/{codex-0139-real-probes-check.js → codex-0144-core-real-probes-check.js} +19 -5
- package/dist/scripts/{codex-0142-doctor-wiring-check.js → codex-0144-doctor-wiring-check.js} +6 -6
- package/dist/scripts/{codex-0142-manifest-check.js → codex-0144-manifest-check.js} +11 -3
- package/dist/scripts/{codex-0142-policy-check.js → codex-0144-policy-check.js} +2 -2
- package/dist/scripts/{codex-0142-thread-store-check.js → codex-0144-thread-store-check.js} +3 -3
- package/dist/scripts/codex-app-provider-model-ui-check.js +53 -19
- package/dist/scripts/codex-app-ui-preservation-check.js +35 -4
- package/dist/scripts/codex-control-side-effect-scope-check.js +2 -2
- package/dist/scripts/codex-effort-auto-discovery-check.js +1 -1
- package/dist/scripts/codex-lb-fast-mode-truth-check.js +1 -0
- package/dist/scripts/{codex-lb-gpt55-fast-profile-check.js → codex-lb-gpt56-fast-profile-check.js} +56 -5
- package/dist/scripts/codex-model-metadata-check.js +1 -1
- package/dist/scripts/codex-sdk-sandbox-policy-check.js +5 -1
- package/dist/scripts/codex-sdk-version-compat-check.js +2 -1
- package/dist/scripts/dfix-fixture-check.js +1 -1
- package/dist/scripts/docs-truthfulness-check.js +1 -1
- package/dist/scripts/doctor-codex-startup-repair-check.js +35 -10
- package/dist/scripts/doctor-context7-repair-check.js +2 -1
- package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +34 -7
- package/dist/scripts/doctor-imagegen-repair-check.js +14 -4
- package/dist/scripts/doctor-startup-config-repair-blackbox.js +1 -1
- package/dist/scripts/doctor-startup-config-repair-check.js +1 -1
- package/dist/scripts/install-update-preserves-config-check.js +1 -1
- package/dist/scripts/legacy-gate-inventory-check.js +7 -5
- package/dist/scripts/legacy-strong-inventory-check.js +7 -5
- package/dist/scripts/legacy-upgrade-matrix-check.js +4 -4
- package/dist/scripts/lib/native-cli-session-swarm-check-lib.js +173 -13
- package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +166 -6
- package/dist/scripts/mutation-callsite-coverage-check.js +0 -11
- package/dist/scripts/package-published-contract-check.js +9 -0
- package/dist/scripts/postinstall-safe-side-effects-check.js +8 -3
- package/dist/scripts/ppt-no-mock-as-real-check.js +3 -1
- package/dist/scripts/product-design-plugin-routing-check.js +1 -1
- package/dist/scripts/release-check-stamp.js +182 -2
- package/dist/scripts/release-dynamic-presets-check.js +8 -0
- package/dist/scripts/release-gate-dag-runner-check.js +3 -2
- package/dist/scripts/release-gate-dag-runner.js +24 -11
- package/dist/scripts/release-gate-script-parity-check.js +1 -1
- package/dist/scripts/release-real-check.js +368 -157
- package/dist/scripts/release-runtime-truth-matrix-check.js +22 -0
- package/dist/scripts/route-proof-artifact-structure-check.js +1 -0
- package/dist/scripts/search-visibility-gate-lib.js +1 -1
- package/dist/scripts/seo-geo-route-identity-check.js +30 -4
- package/dist/scripts/sizecheck.js +2 -2
- package/dist/scripts/sks-1-11-gate-lib.js +53 -6
- package/dist/scripts/sks-uninstall-regression-check.js +1 -1
- package/dist/scripts/sksd-daemon-check.js +16 -6
- package/dist/scripts/write-build-manifest.js +2 -1
- package/dist/scripts/zellij-layout-valid-check.js +31 -6
- package/dist/scripts/zellij-pane-proof-check.js +33 -2
- package/dist/scripts/zellij-real-session-cleanup-check.js +122 -2
- package/dist/scripts/zellij-real-session-launch-check.js +76 -5
- package/dist/scripts/zellij-slot-pane-renderer-check.js +4 -4
- package/package.json +25 -15
- package/schemas/codex/{app-server-0.142 → app-server-0.144}/codex_app_server_protocol.v2.schemas.json +1146 -781
- package/schemas/codex/codex-0139-real-probe-result.schema.json +39 -5
- package/schemas/codex/ppt-slide-issue-ledger.schema.json +2 -1
- package/dist/core/codex-control/codex-0139-multi-agent-real-probe.js +0 -107
- package/dist/scripts/agent-native-release-gate.js +0 -274
- package/dist/scripts/codex-0142-capability-check.js +0 -21
- package/dist/scripts/command-performance-scorecard-check.js +0 -204
- package/dist/scripts/config-managed-merge-callsite-coverage-check.js +0 -212
- package/dist/scripts/dollar-performance-scorecard-check.js +0 -257
- package/dist/scripts/gate-timing-check.js +0 -16
- package/dist/scripts/ops-maturity-scorecard-check.js +0 -12
- package/dist/scripts/performance-baseline-check.js +0 -12
- package/dist/scripts/performance-improvement-report-check.js +0 -58
- package/dist/scripts/release-parallel-check.js +0 -389
- package/dist/scripts/release-runner-efficiency-check.js +0 -15
- package/dist/scripts/retention-long-run-smoke-check.js +0 -299
- package/docs/assets/sneakoscope-architecture-pipeline.jpg +0 -0
package/dist/cli/router.js
CHANGED
|
@@ -80,6 +80,16 @@ async function dispatchInner(argv) {
|
|
|
80
80
|
if (!helpRequest) {
|
|
81
81
|
const commandGate = await ensureActiveRouteCommandGate(command, rest);
|
|
82
82
|
if (!commandGate.ok) {
|
|
83
|
+
if ('command_result' in commandGate && commandGate.command_result) {
|
|
84
|
+
process.exitCode = 1;
|
|
85
|
+
if (argv.includes('--json'))
|
|
86
|
+
console.log(JSON.stringify(commandGate.command_result, null, 2));
|
|
87
|
+
else
|
|
88
|
+
printHandledCommandBlock(commandGate.command_result);
|
|
89
|
+
return commandGate.command_result;
|
|
90
|
+
}
|
|
91
|
+
if (argv.includes('--json'))
|
|
92
|
+
console.log(JSON.stringify(commandGate, null, 2));
|
|
83
93
|
console.error(commandGate.message);
|
|
84
94
|
process.exitCode = 1;
|
|
85
95
|
return commandGate;
|
|
@@ -92,7 +102,7 @@ async function dispatchInner(argv) {
|
|
|
92
102
|
const migrationGate = await ensureCurrentMigrationBeforeCommand({
|
|
93
103
|
command,
|
|
94
104
|
args: rest,
|
|
95
|
-
skipMigrationGate: entry.skipMigrationGate === true || entry.readonly === true
|
|
105
|
+
skipMigrationGate: entry.skipMigrationGate === true || entry.readonly === true || safeActiveRouteVisualQuery(command, rest)
|
|
96
106
|
});
|
|
97
107
|
if (!migrationGate.ok) {
|
|
98
108
|
console.error('SKS project migration blocked.');
|
|
@@ -106,6 +116,8 @@ async function dispatchInner(argv) {
|
|
|
106
116
|
console.error(`Optional warning: ${warning}`);
|
|
107
117
|
console.error(`Receipt: ${migrationGate.receipt_path}`);
|
|
108
118
|
console.error('Remedies: run `sks doctor --fix --yes`, then retry; diagnostics that must bypass this gate are marked skipMigrationGate in the command registry.');
|
|
119
|
+
if (argv.includes('--json'))
|
|
120
|
+
console.log(JSON.stringify(migrationGate, null, 2));
|
|
109
121
|
process.exitCode = 1;
|
|
110
122
|
return migrationGate;
|
|
111
123
|
}
|
|
@@ -136,9 +148,10 @@ async function ensureActiveRouteCommandGate(command, args) {
|
|
|
136
148
|
return { ok: true, status: 'allowed' };
|
|
137
149
|
if (safeReadOnlySubcommand(args))
|
|
138
150
|
return { ok: true, status: 'allowed_status_subcommand' };
|
|
139
|
-
if (
|
|
140
|
-
return { ok: true, status: '
|
|
141
|
-
|
|
151
|
+
if (safeActiveRouteVisualQuery(command, args))
|
|
152
|
+
return { ok: true, status: 'allowed_visual_query' };
|
|
153
|
+
if (safeActiveRouteRecoverySubcommand(command, args))
|
|
154
|
+
return { ok: true, status: 'allowed_active_route_recovery' };
|
|
142
155
|
const [{ projectRoot, readJson }, { stateFile }] = await Promise.all([
|
|
143
156
|
import('../core/fsx.js'),
|
|
144
157
|
import('../core/mission.js')
|
|
@@ -147,6 +160,14 @@ async function ensureActiveRouteCommandGate(command, args) {
|
|
|
147
160
|
const state = await readJson(stateFile(root), {}).catch(() => ({}));
|
|
148
161
|
if (!activeRouteStateBlocksCommand(state))
|
|
149
162
|
return { ok: true, status: 'allowed' };
|
|
163
|
+
const visualPreflight = await blockedVisualSourcePreflight(command, args);
|
|
164
|
+
if (visualPreflight) {
|
|
165
|
+
return {
|
|
166
|
+
ok: false,
|
|
167
|
+
status: 'handled_non_mutating_visual_preflight',
|
|
168
|
+
command_result: visualPreflight
|
|
169
|
+
};
|
|
170
|
+
}
|
|
150
171
|
return {
|
|
151
172
|
schema: 'sks.command-gate-active-route.v1',
|
|
152
173
|
ok: false,
|
|
@@ -158,12 +179,40 @@ async function ensureActiveRouteCommandGate(command, args) {
|
|
|
158
179
|
message: `SKS command gate blocked '${command}' because active route mission ${state.mission_id} is not closed. Run: sks route close --mission ${state.mission_id}`
|
|
159
180
|
};
|
|
160
181
|
}
|
|
182
|
+
function safeActiveRouteVisualQuery(command, args) {
|
|
183
|
+
if (command !== 'computer-use')
|
|
184
|
+
return false;
|
|
185
|
+
const sub = String(args.find((arg) => !String(arg).startsWith('-')) || '').toLowerCase();
|
|
186
|
+
if (sub !== 'require')
|
|
187
|
+
return false;
|
|
188
|
+
return !args.some((arg) => ['--fix', '--yes', '-y', '--write', '--apply', '--execute', '--force', '--real'].includes(String(arg)));
|
|
189
|
+
}
|
|
190
|
+
async function blockedVisualSourcePreflight(command, args) {
|
|
191
|
+
if (command !== 'image-ux-review' || String(args[0] || '').toLowerCase() !== 'run')
|
|
192
|
+
return null;
|
|
193
|
+
if (!args.includes('--from-chrome-extension') && !args.includes('--from-computer-use'))
|
|
194
|
+
return null;
|
|
195
|
+
const { imageUxReviewSourcePreflight } = await import('../core/commands/image-ux-review-command.js');
|
|
196
|
+
const preflight = await imageUxReviewSourcePreflight([...args.slice(1)]);
|
|
197
|
+
return preflight.result;
|
|
198
|
+
}
|
|
199
|
+
function printHandledCommandBlock(result) {
|
|
200
|
+
console.error(`SKS command blocked: ${result?.blocker || result?.status || 'preflight_failed'}`);
|
|
201
|
+
for (const line of Array.isArray(result?.guidance) ? result.guidance : [])
|
|
202
|
+
console.error(`- ${line}`);
|
|
203
|
+
}
|
|
161
204
|
function safeReadOnlySubcommand(args) {
|
|
162
205
|
const sub = String(args.find((arg) => !String(arg).startsWith('-')) || '').toLowerCase();
|
|
163
206
|
if (!['status', 'show', 'list', 'observe', 'watch', 'doctor', 'help'].includes(sub))
|
|
164
207
|
return false;
|
|
165
208
|
return !args.some((arg) => ['--fix', '--yes', '-y', '--write', '--apply', '--execute', '--force', '--real'].includes(String(arg)));
|
|
166
209
|
}
|
|
210
|
+
function safeActiveRouteRecoverySubcommand(command, args) {
|
|
211
|
+
if (command !== 'agent')
|
|
212
|
+
return false;
|
|
213
|
+
const sub = String(args.find((arg) => !String(arg).startsWith('-')) || '').toLowerCase();
|
|
214
|
+
return ['close', 'cleanup', 'rollback-patches'].includes(sub);
|
|
215
|
+
}
|
|
167
216
|
function activeRouteStateBlocksCommand(state = {}) {
|
|
168
217
|
if (!state?.mission_id || state.route_closed === true)
|
|
169
218
|
return false;
|
|
@@ -8,6 +8,7 @@ import { codexLbMetrics, readCodexLbCircuit, recordCodexLbHealthEvent, resetCode
|
|
|
8
8
|
import { checkCodexLbResponseChain, codexLbStatus, configureCodexLb, formatCodexLbStatusText, releaseCodexLbAuthHold, repairCodexLbAuth, unselectCodexLbProvider } from '../cli/install-helpers.js';
|
|
9
9
|
import { buildCodexLbSetupPlan, codexLbPersistenceSummary, renderCodexLbSetupPlan } from '../core/codex-lb/codex-lb-setup.js';
|
|
10
10
|
import { restartCodexApp } from '../core/codex-app/codex-app-restart.js';
|
|
11
|
+
import { repairCodexAppFastUi } from '../core/codex-app/codex-app-fast-ui-repair.js';
|
|
11
12
|
export async function run(command, args = []) {
|
|
12
13
|
const root = await projectRoot();
|
|
13
14
|
const action = args[0] || 'status';
|
|
@@ -53,35 +54,43 @@ export async function run(command, args = []) {
|
|
|
53
54
|
if (action === 'fast-check' || action === 'fast' || action === 'verify-fast') {
|
|
54
55
|
const status = await codexLbStatus();
|
|
55
56
|
const blocker = !status.env_key_configured ? 'missing_env_key' : !status.base_url ? 'missing_base_url' : !status.provider_contract_ok ? 'provider_contract_drift' : 'not_configured';
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
const modelSelection = await resolveCodexLbFastCheckModel(status);
|
|
58
|
+
const chain = status.env_key_configured && status.base_url && modelSelection.model
|
|
59
|
+
? await checkCodexLbResponseChain(status, { force: true, cache: false, root, fastMode: true, model: modelSelection.model })
|
|
60
|
+
: { ok: false, status: modelSelection.model ? blocker : 'model_unselected', codex_lb: status };
|
|
59
61
|
const evidence = await fastEvidenceFromChain(chain, readOption(args, '--request-log', readOption(args, '--request-log-json', null)));
|
|
60
62
|
const providerReady = status.provider_contract_ok === true;
|
|
63
|
+
const chainVerified = isCodexLbFastChainVerified(chain);
|
|
61
64
|
const result = {
|
|
62
65
|
schema: 'sks.codex-lb-fast-check.v1',
|
|
63
|
-
ok: Boolean(providerReady &&
|
|
66
|
+
ok: Boolean(providerReady && chainVerified && evidence.fast_requested && evidence.fast_actual),
|
|
64
67
|
status: !providerReady
|
|
65
68
|
? 'provider_contract_drift'
|
|
66
|
-
: chain.
|
|
67
|
-
?
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
? '
|
|
71
|
-
:
|
|
72
|
-
|
|
69
|
+
: chain.skipped === true
|
|
70
|
+
? 'fast_check_chain_skipped'
|
|
71
|
+
: chainVerified
|
|
72
|
+
? evidence.fast_actual
|
|
73
|
+
? 'fast_verified'
|
|
74
|
+
: evidence.fast_requested
|
|
75
|
+
? 'fast_requested_but_actual_unverified'
|
|
76
|
+
: 'fast_not_requested'
|
|
77
|
+
: chain.status,
|
|
73
78
|
codex_lb: status,
|
|
79
|
+
model_selection: modelSelection,
|
|
74
80
|
chain,
|
|
75
81
|
evidence,
|
|
76
82
|
degraded_models: Array.isArray(chain.degraded_models) ? chain.degraded_models : [],
|
|
77
83
|
quota_low: Boolean(chain.quota_low),
|
|
78
84
|
blockers: [
|
|
79
85
|
...(providerReady ? [] : ['codex_lb_provider_contract_drift']),
|
|
80
|
-
...
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
...modelSelection.blockers,
|
|
87
|
+
...(chain.skipped === true
|
|
88
|
+
? ['codex_lb_fast_check_chain_skipped']
|
|
89
|
+
: chainVerified
|
|
90
|
+
? evidence.fast_actual
|
|
91
|
+
? []
|
|
92
|
+
: [evidence.fast_requested ? 'codex_lb_actual_fast_service_tier_unverified' : 'codex_lb_fast_service_tier_not_requested']
|
|
93
|
+
: [chain.status || blocker])
|
|
85
94
|
]
|
|
86
95
|
};
|
|
87
96
|
if (flag(args, '--json'))
|
|
@@ -95,11 +104,13 @@ export async function run(command, args = []) {
|
|
|
95
104
|
}
|
|
96
105
|
if (action === 'repair' || action === 'resync' || action === 'login') {
|
|
97
106
|
const result = await repairCodexLbAuth();
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (!result.ok)
|
|
107
|
+
const fastUi = await repairCodexAppFastUiAfterMutation(root, Boolean(result.ok));
|
|
108
|
+
const shaped = { ...result, ok: Boolean(result.ok && fastUi.ok), codex_app_fast_ui: fastUi };
|
|
109
|
+
if (!shaped.ok)
|
|
102
110
|
process.exitCode = 1;
|
|
111
|
+
if (flag(args, '--json'))
|
|
112
|
+
return printJson(shaped);
|
|
113
|
+
console.log(`codex-lb repair: ${shaped.ok ? 'ok' : result.ok ? 'fast_ui_repair_failed' : result.status}`);
|
|
103
114
|
return;
|
|
104
115
|
}
|
|
105
116
|
if (action === 'release') {
|
|
@@ -146,9 +157,10 @@ export async function run(command, args = []) {
|
|
|
146
157
|
return;
|
|
147
158
|
}
|
|
148
159
|
const result = await configureCodexLb({ host, apiKey: newKey, authMode: flag(args, '--preserve-auth') ? 'preserve' : 'codex-lb', forceCodexLbApiKeyAuth: !flag(args, '--preserve-auth') });
|
|
149
|
-
const
|
|
150
|
-
const
|
|
151
|
-
const
|
|
160
|
+
const fastUi = await repairCodexAppFastUiAfterMutation(root, Boolean(result.ok));
|
|
161
|
+
const restart = await maybeRestartCodexAppForAuthSwitch(args, Boolean(result.ok && fastUi.ok));
|
|
162
|
+
const ok = Boolean(result.ok && fastUi.ok && restart?.ok !== false);
|
|
163
|
+
const output = { ...result, ok, action: 'set-key', codex_app_fast_ui: fastUi, restart_app: restart };
|
|
152
164
|
if (!ok)
|
|
153
165
|
process.exitCode = 1;
|
|
154
166
|
if (flag(args, '--json'))
|
|
@@ -163,9 +175,10 @@ export async function run(command, args = []) {
|
|
|
163
175
|
if (action === 'use-codex-lb' || action === 'use-lb') {
|
|
164
176
|
// Switch auth mode -> codex-lb (API key). Re-selects the provider and re-syncs auth.
|
|
165
177
|
const result = await repairCodexLbAuth({ forceCodexLbApiKeyAuth: true, authMode: 'codex-lb', forceFastMode: !flag(args, '--no-fast') });
|
|
166
|
-
const
|
|
167
|
-
const
|
|
168
|
-
const
|
|
178
|
+
const fastUi = await repairCodexAppFastUiAfterMutation(root, Boolean(result.ok));
|
|
179
|
+
const restart = await maybeRestartCodexAppForAuthSwitch(args, Boolean(result.ok && fastUi.ok));
|
|
180
|
+
const ok = Boolean(result.ok && fastUi.ok && restart?.ok !== false);
|
|
181
|
+
const shaped = { ...result, ok, mode: 'codex-lb', codex_app_fast_ui: fastUi, restart_app: restart };
|
|
169
182
|
if (!ok)
|
|
170
183
|
process.exitCode = 1;
|
|
171
184
|
if (flag(args, '--json'))
|
|
@@ -181,9 +194,10 @@ export async function run(command, args = []) {
|
|
|
181
194
|
// Switch auth mode -> ChatGPT OAuth. Restores the saved OAuth login if present.
|
|
182
195
|
const result = await releaseCodexLbAuthHold({ force: flag(args, '--force') });
|
|
183
196
|
const authOk = !['no_backup', 'auth_in_use', 'failed'].includes(result.status);
|
|
184
|
-
const
|
|
185
|
-
const
|
|
186
|
-
const
|
|
197
|
+
const fastUi = await repairCodexAppFastUiAfterMutation(root, authOk);
|
|
198
|
+
const restart = await maybeRestartCodexAppForAuthSwitch(args, Boolean(authOk && fastUi.ok));
|
|
199
|
+
const ok = Boolean(authOk && fastUi.ok && restart?.ok !== false);
|
|
200
|
+
const shaped = { ...result, ok, mode: 'oauth', codex_app_fast_ui: fastUi, restart_app: restart };
|
|
187
201
|
if (!ok)
|
|
188
202
|
process.exitCode = 1;
|
|
189
203
|
if (flag(args, '--json'))
|
|
@@ -313,14 +327,15 @@ export async function run(command, args = []) {
|
|
|
313
327
|
apiKeySource: options.apiKeySource,
|
|
314
328
|
allowInsecureHttp: options.allowInsecureLocalhost
|
|
315
329
|
});
|
|
316
|
-
const
|
|
317
|
-
const
|
|
330
|
+
const fastUi = await repairCodexAppFastUiAfterMutation(root, Boolean(result.ok));
|
|
331
|
+
const restart = await maybeRestartCodexAppForAuthSwitch(args, Boolean(result.ok && fastUi.ok) && !flag(args, '--preserve-auth'));
|
|
332
|
+
const shaped = { schema: 'sks.codex-lb-setup.v1', ...result, api_key: { present: Boolean(options.apiKey), redacted: true }, env_file_chmod: '0600', codex_app_fast_ui: fastUi };
|
|
318
333
|
shaped.restart_app = restart;
|
|
319
334
|
if (options.health)
|
|
320
335
|
shaped.applied_actions = [...(shaped.applied_actions || []), { type: 'run_health_check', target: 'codex-lb response chain', ok: true }];
|
|
321
336
|
if (options.health)
|
|
322
337
|
shaped.chain_health = result.ok ? await checkCodexLbResponseChain(result, { force: true, root }) : null;
|
|
323
|
-
shaped.ok = Boolean(result.ok && restart?.ok !== false);
|
|
338
|
+
shaped.ok = Boolean(result.ok && fastUi.ok && restart?.ok !== false);
|
|
324
339
|
if (!shaped.ok)
|
|
325
340
|
process.exitCode = 1;
|
|
326
341
|
if (flag(args, '--json'))
|
|
@@ -375,7 +390,85 @@ async function maybeRestartCodexAppForAuthSwitch(args = [], enabled) {
|
|
|
375
390
|
const shouldRestart = requested || (!flag(args, '--json') && !flag(args, '--no-restart-app') && !flag(args, '--no-restart'));
|
|
376
391
|
return restartCodexApp({ enabled: shouldRestart });
|
|
377
392
|
}
|
|
378
|
-
async function
|
|
393
|
+
async function repairCodexAppFastUiAfterMutation(root, enabled) {
|
|
394
|
+
if (!enabled) {
|
|
395
|
+
return {
|
|
396
|
+
schema: 'sks.codex-app-fast-ui-repair.v1',
|
|
397
|
+
ok: true,
|
|
398
|
+
status: 'skipped',
|
|
399
|
+
skipped: true,
|
|
400
|
+
reason: 'previous_step_failed',
|
|
401
|
+
actions: [],
|
|
402
|
+
blockers: []
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
try {
|
|
406
|
+
return await repairCodexAppFastUi(root, { apply: true });
|
|
407
|
+
}
|
|
408
|
+
catch (err) {
|
|
409
|
+
return {
|
|
410
|
+
schema: 'sks.codex-app-fast-ui-repair.v1',
|
|
411
|
+
ok: false,
|
|
412
|
+
status: 'failed',
|
|
413
|
+
actions: [],
|
|
414
|
+
blockers: ['codex_app_fast_ui_repair_failed'],
|
|
415
|
+
error: String(err?.message || err)
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
export function isCodexLbFastChainVerified(chain = {}) {
|
|
420
|
+
return chain.ok === true && chain.skipped !== true;
|
|
421
|
+
}
|
|
422
|
+
export async function resolveCodexLbFastCheckModel(status = {}, env = process.env) {
|
|
423
|
+
const explicit = String(env.SKS_CODEX_MODEL || env.CODEX_MODEL || '').trim();
|
|
424
|
+
if (explicit)
|
|
425
|
+
return { model: explicit, source: env.SKS_CODEX_MODEL ? 'SKS_CODEX_MODEL' : 'CODEX_MODEL', blockers: [] };
|
|
426
|
+
const configPath = String(status.config_path || '').trim();
|
|
427
|
+
const config = configPath ? await readText(configPath, '').catch(() => '') : '';
|
|
428
|
+
const configured = topLevelTomlString(config, 'model');
|
|
429
|
+
if (configured)
|
|
430
|
+
return { model: configured, source: 'global_config', blockers: [] };
|
|
431
|
+
const configuredCatalogPath = topLevelTomlString(config, 'model_catalog_json');
|
|
432
|
+
if (!configuredCatalogPath)
|
|
433
|
+
return { model: null, source: null, blockers: ['codex_lb_fast_check_model_unselected'] };
|
|
434
|
+
const home = String(env.HOME || '').trim();
|
|
435
|
+
const expandedCatalogPath = configuredCatalogPath.startsWith('~/') && home
|
|
436
|
+
? path.join(home, configuredCatalogPath.slice(2))
|
|
437
|
+
: configuredCatalogPath;
|
|
438
|
+
const catalogPath = path.isAbsolute(expandedCatalogPath)
|
|
439
|
+
? expandedCatalogPath
|
|
440
|
+
: path.resolve(path.dirname(configPath), expandedCatalogPath);
|
|
441
|
+
try {
|
|
442
|
+
const payload = JSON.parse(await readText(catalogPath, ''));
|
|
443
|
+
const model = selectPriorityCapableCatalogModel(payload);
|
|
444
|
+
return model
|
|
445
|
+
? { model, source: 'model_catalog_json', blockers: [] }
|
|
446
|
+
: { model: null, source: 'model_catalog_json', blockers: ['codex_lb_fast_check_priority_model_unavailable'] };
|
|
447
|
+
}
|
|
448
|
+
catch {
|
|
449
|
+
return { model: null, source: 'model_catalog_json', blockers: ['codex_lb_fast_check_catalog_invalid'] };
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
function topLevelTomlString(text, key) {
|
|
453
|
+
const topLevel = String(text || '').split(/\n\s*\[/)[0] || '';
|
|
454
|
+
const escaped = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
455
|
+
return (topLevel.match(new RegExp(`(?:^|\\n)\\s*${escaped}\\s*=\\s*"([^"]+)"`))?.[1] || '').trim();
|
|
456
|
+
}
|
|
457
|
+
function selectPriorityCapableCatalogModel(payload = {}) {
|
|
458
|
+
const models = Array.isArray(payload?.models) ? payload.models : Array.isArray(payload?.data) ? payload.data : [];
|
|
459
|
+
return models
|
|
460
|
+
.filter((row) => {
|
|
461
|
+
if (!row || typeof row !== 'object' || row.supported_in_api !== true || typeof row.slug !== 'string' || !row.slug.trim())
|
|
462
|
+
return false;
|
|
463
|
+
const serviceTiers = Array.isArray(row.service_tiers) ? row.service_tiers : [];
|
|
464
|
+
const speedTiers = Array.isArray(row.additional_speed_tiers) ? row.additional_speed_tiers : [];
|
|
465
|
+
return serviceTiers.some((tier) => normalizeTier(typeof tier === 'string' ? tier : tier?.id) === 'priority')
|
|
466
|
+
|| speedTiers.some((tier) => normalizeTier(tier) === 'priority');
|
|
467
|
+
})
|
|
468
|
+
.sort((left, right) => Number(left.priority ?? Number.MAX_SAFE_INTEGER) - Number(right.priority ?? Number.MAX_SAFE_INTEGER)
|
|
469
|
+
|| String(left.slug).localeCompare(String(right.slug)))[0]?.slug || null;
|
|
470
|
+
}
|
|
471
|
+
export async function fastEvidenceFromChain(chain = {}, requestLogPath = null) {
|
|
379
472
|
const chainEvidence = chain.service_tier_evidence || {};
|
|
380
473
|
const logRows = requestLogPath ? await readRequestLogRows(String(requestLogPath)) : [];
|
|
381
474
|
const logEvidence = serviceTierEvidenceFromRows(logRows);
|
|
@@ -423,14 +516,14 @@ async function readRequestLogRows(file) {
|
|
|
423
516
|
}
|
|
424
517
|
return rows;
|
|
425
518
|
}
|
|
426
|
-
function serviceTierEvidenceFromRows(rows = []) {
|
|
519
|
+
export function serviceTierEvidenceFromRows(rows = []) {
|
|
427
520
|
let requested = null;
|
|
428
521
|
let actual = null;
|
|
429
522
|
let effective = null;
|
|
430
523
|
for (const row of rows) {
|
|
431
524
|
requested ||= normalizeTier(row?.requestedServiceTier || row?.requested_service_tier || row?.request?.service_tier || row?.body?.service_tier);
|
|
432
|
-
actual ||= normalizeTier(row?.actualServiceTier || row?.actual_service_tier || row?.response?.actualServiceTier);
|
|
433
|
-
effective ||=
|
|
525
|
+
actual ||= normalizeTier(row?.actualServiceTier || row?.actual_service_tier || row?.response?.actualServiceTier || row?.response?.actual_service_tier);
|
|
526
|
+
effective ||= responseServiceTier(row);
|
|
434
527
|
}
|
|
435
528
|
return {
|
|
436
529
|
requested_service_tier: requested,
|
|
@@ -439,6 +532,17 @@ function serviceTierEvidenceFromRows(rows = []) {
|
|
|
439
532
|
fast_actual: actual === 'priority' || effective === 'priority'
|
|
440
533
|
};
|
|
441
534
|
}
|
|
535
|
+
function responseServiceTier(row) {
|
|
536
|
+
const nested = normalizeTier(row?.response?.serviceTier || row?.response?.service_tier || row?.event?.response?.serviceTier || row?.event?.response?.service_tier);
|
|
537
|
+
if (nested)
|
|
538
|
+
return nested;
|
|
539
|
+
const responseKind = String(row?.direction || row?.phase || row?.kind || row?.type || '').trim().toLowerCase();
|
|
540
|
+
const responseBody = row?.object === 'response' || /^resp[_-]/i.test(String(row?.id || '')) || Array.isArray(row?.output);
|
|
541
|
+
if (responseBody || responseKind === 'response' || responseKind === 'inbound' || responseKind.startsWith('response.')) {
|
|
542
|
+
return normalizeTier(row?.serviceTier || row?.service_tier);
|
|
543
|
+
}
|
|
544
|
+
return null;
|
|
545
|
+
}
|
|
442
546
|
function normalizeTier(value) {
|
|
443
547
|
const text = String(value || '').trim().toLowerCase();
|
|
444
548
|
if (text === 'fast')
|
package/dist/commands/codex.js
CHANGED
|
@@ -4,7 +4,8 @@ import { codexCompatibilityReport, codexDoctorReport } from '../core/codex-compa
|
|
|
4
4
|
import { codexVersionReport } from '../core/codex-compat/codex-version.js';
|
|
5
5
|
import { codexSchemaSnapshotReport } from '../core/codex-compat/codex-schema-snapshot.js';
|
|
6
6
|
import { detectCodex0141Capability } from '../core/codex-control/codex-0141-capability.js';
|
|
7
|
-
import {
|
|
7
|
+
import { detectCodex0144Capability } from '../core/codex-control/codex-0144-capability.js';
|
|
8
|
+
import { CURRENT_CODEX_RELEASE_MANIFEST } from '../core/codex-compat/codex-release-manifest.js';
|
|
8
9
|
export async function run(_command, args = []) {
|
|
9
10
|
const action = args[0] || 'compatibility';
|
|
10
11
|
if (action === 'compatibility' || action === 'compat') {
|
|
@@ -39,11 +40,11 @@ export async function run(_command, args = []) {
|
|
|
39
40
|
process.exitCode = 1;
|
|
40
41
|
return;
|
|
41
42
|
}
|
|
42
|
-
if (action === '0.
|
|
43
|
-
const result = await
|
|
43
|
+
if (action === '0.144' || action === '0144' || action === CURRENT_CODEX_RELEASE_MANIFEST.targetTag) {
|
|
44
|
+
const result = await detectCodex0144Capability({ requireReal: flag(args, '--require-real') });
|
|
44
45
|
if (flag(args, '--json'))
|
|
45
46
|
return printJson(result);
|
|
46
|
-
console.log(`Codex
|
|
47
|
+
console.log(`Codex ${CURRENT_CODEX_RELEASE_MANIFEST.requiredCliVersion} compatibility: ${result.ok ? 'ok' : 'blocked'} (${result.probe_mode})`);
|
|
47
48
|
for (const blocker of result.blockers || [])
|
|
48
49
|
console.log(`- blocker: ${blocker}`);
|
|
49
50
|
for (const warning of result.warnings || [])
|
|
@@ -70,7 +71,7 @@ export async function run(_command, args = []) {
|
|
|
70
71
|
process.exitCode = 1;
|
|
71
72
|
return;
|
|
72
73
|
}
|
|
73
|
-
console.error('Usage: sks codex compatibility|version|doctor|schema|0.
|
|
74
|
+
console.error('Usage: sks codex compatibility|version|doctor|schema|0.144|0.141 [--json]');
|
|
74
75
|
process.exitCode = 1;
|
|
75
76
|
}
|
|
76
77
|
//# sourceMappingURL=codex.js.map
|
package/dist/commands/doctor.js
CHANGED
|
@@ -25,6 +25,7 @@ import { isUpdateMigrationReceiptCurrent, projectUpdateMigrationReceiptPath, wri
|
|
|
25
25
|
import { inspectSksMenuBarStatus, installSksMenuBar } from '../core/codex-app/sks-menubar.js';
|
|
26
26
|
import { sweepSksTempDirs } from '../core/retention.js';
|
|
27
27
|
import { detectImagegenCapability } from '../core/imagegen/imagegen-capability.js';
|
|
28
|
+
import { CURRENT_CODEX_RELEASE_MANIFEST } from '../core/codex-compat/codex-release-manifest.js';
|
|
28
29
|
export async function run(_command, args = []) {
|
|
29
30
|
const root = await projectRoot();
|
|
30
31
|
const doctorFix = flag(args, '--fix');
|
|
@@ -773,30 +774,48 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
773
774
|
: null;
|
|
774
775
|
const shouldProbeNativeCapabilityRepairs = doctorFix || deepDiagnostics || nativeCapabilityDiagnosticsRequested;
|
|
775
776
|
const imagegen = await detectImagegenCapability({ codexBin: codexBin || undefined }).catch((err) => ({ ok: false, error: err.message, auth_readiness: null, core_ready: false, blockers: ['imagegen_detection_exception'] }));
|
|
776
|
-
const imagegenRepair =
|
|
777
|
-
? {
|
|
777
|
+
const imagegenRepair = shouldProbeNativeCapabilityRepairs
|
|
778
|
+
? await (await import('../core/doctor/imagegen-repair.js')).repairCodexImagegen({ root, apply: doctorFix, codexBin: codexBin || null }).catch((err) => ({
|
|
778
779
|
schema: 'sks.doctor-imagegen-repair.v1',
|
|
779
|
-
ok:
|
|
780
|
-
attempted:
|
|
780
|
+
ok: false,
|
|
781
|
+
attempted: true,
|
|
781
782
|
apply: doctorFix,
|
|
782
|
-
recovered:
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
blockers: [],
|
|
787
|
-
manual_actions: []
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
? await (await import('../core/doctor/imagegen-repair.js')).repairCodexImagegen({ root, apply: doctorFix, codexBin: codexBin || null }).catch((err) => ({
|
|
783
|
+
recovered: false,
|
|
784
|
+
capability_ready: false,
|
|
785
|
+
route_ready: false,
|
|
786
|
+
real_generation_verified: false,
|
|
787
|
+
blockers: [err?.message || String(err)],
|
|
788
|
+
manual_actions: ['Run `sks doctor --fix --json` after enabling Codex App image_generation.']
|
|
789
|
+
}))
|
|
790
|
+
: imagegen.core_ready === true
|
|
791
|
+
? {
|
|
792
792
|
schema: 'sks.doctor-imagegen-repair.v1',
|
|
793
793
|
ok: false,
|
|
794
|
-
attempted:
|
|
794
|
+
attempted: false,
|
|
795
795
|
apply: doctorFix,
|
|
796
796
|
recovered: false,
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
797
|
+
capability_ready: true,
|
|
798
|
+
configuration_ready: true,
|
|
799
|
+
route_ready: false,
|
|
800
|
+
real_generation_verified: false,
|
|
801
|
+
current_task_tool_manifest_verified: false,
|
|
802
|
+
requires_new_task: true,
|
|
803
|
+
before: imagegen,
|
|
804
|
+
after: imagegen,
|
|
805
|
+
steps: [],
|
|
806
|
+
blockers: ['codex_imagegen_current_task_tool_manifest_unverified', 'codex_imagegen_real_output_unverified'],
|
|
807
|
+
manual_actions: [
|
|
808
|
+
'Start a fresh Codex/Work task so $imagegen is present in its tool manifest.',
|
|
809
|
+
'Invoke $imagegen with gpt-image-2 and bind the selected raster output path to route evidence.'
|
|
810
|
+
],
|
|
811
|
+
communication_test: {
|
|
812
|
+
level: 'flag_level',
|
|
813
|
+
ok: false,
|
|
814
|
+
checked: 'codex features list (feature-flag/plugin metadata only)',
|
|
815
|
+
real_generation_round_trip_performed: false,
|
|
816
|
+
blocker: 'codex_imagegen_real_output_unverified'
|
|
817
|
+
}
|
|
818
|
+
}
|
|
800
819
|
: deferredNativeRepair('sks.doctor-imagegen-repair.v1', doctorFix, [
|
|
801
820
|
'Run `sks doctor --fix --repair-native-capabilities --json` after enabling Codex App image_generation.'
|
|
802
821
|
]);
|
|
@@ -843,12 +862,23 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
843
862
|
: null;
|
|
844
863
|
const nativeCapabilityReadinessStatus = (repair) => repair?.skipped === true
|
|
845
864
|
? (repair.status || 'deferred')
|
|
846
|
-
:
|
|
865
|
+
: repair?.route_ready === true
|
|
866
|
+
? 'ok'
|
|
867
|
+
: repair?.capability_ready === true
|
|
868
|
+
? 'available-unverified'
|
|
869
|
+
: (repair?.recovered === true || repair?.ok === true ? 'ok' : repair?.attempted ? 'blocked' : 'not-needed');
|
|
847
870
|
const nativeCapabilityReadiness = {
|
|
848
871
|
schema: 'sks.native-capability-readiness.v1',
|
|
849
872
|
generated_at: nowIso(),
|
|
850
873
|
apply: doctorFix,
|
|
851
|
-
imagegen: {
|
|
874
|
+
imagegen: {
|
|
875
|
+
status: nativeCapabilityReadinessStatus(imagegenRepair),
|
|
876
|
+
capability_ready: imagegenRepair?.capability_ready === true,
|
|
877
|
+
route_ready: imagegenRepair?.route_ready === true,
|
|
878
|
+
generated_output_verified: imagegenRepair?.real_generation_verified === true,
|
|
879
|
+
communication_test: imagegenRepair?.communication_test || null,
|
|
880
|
+
blockers: imagegenRepair?.blockers || []
|
|
881
|
+
},
|
|
852
882
|
computer_use: { status: nativeCapabilityReadinessStatus(computerUseRepair), blockers: computerUseRepair?.blockers || [], next_actions: computerUseRepair?.next_actions || [] },
|
|
853
883
|
browser_use: { status: nativeCapabilityReadinessStatus(browserUseRepair), blockers: browserUseRepair?.blockers || [], next_actions: browserUseRepair?.next_actions || [] }
|
|
854
884
|
};
|
|
@@ -1080,7 +1110,11 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
1080
1110
|
error: sksTempSweep.error || null
|
|
1081
1111
|
},
|
|
1082
1112
|
imagegen: {
|
|
1083
|
-
ok:
|
|
1113
|
+
ok: imagegenRepair?.route_ready === true,
|
|
1114
|
+
capability_ready: imagegen.codex_app?.available === true,
|
|
1115
|
+
route_ready: imagegenRepair?.route_ready === true,
|
|
1116
|
+
generated_output_verified: imagegenRepair?.real_generation_verified === true,
|
|
1117
|
+
auth_ready: imagegen.auth_readiness?.headless_auto_available === true,
|
|
1084
1118
|
auth_readiness: imagegen.auth_readiness || null,
|
|
1085
1119
|
codex_app_builtin_available: imagegen.codex_app?.available === true
|
|
1086
1120
|
},
|
|
@@ -1252,7 +1286,7 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
1252
1286
|
console.log(` - ${action}`);
|
|
1253
1287
|
}
|
|
1254
1288
|
}
|
|
1255
|
-
console.log(`Image Gen repair: ${
|
|
1289
|
+
console.log(`Image Gen repair: ${nativeCapabilityReadiness.imagegen.status}`);
|
|
1256
1290
|
for (const action of imagegenRepair.manual_actions || [])
|
|
1257
1291
|
console.log(` - ${action}`);
|
|
1258
1292
|
console.log(`Computer Use repair: ${computerUseRepair.recovered ? 'ok' : computerUseRepair.attempted ? 'blocked' : 'not-needed'}`);
|
|
@@ -1272,7 +1306,7 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
1272
1306
|
}
|
|
1273
1307
|
const codex0138 = codex0138Capability.report || {};
|
|
1274
1308
|
console.log('Codex current compatibility:');
|
|
1275
|
-
console.log(` target:
|
|
1309
|
+
console.log(` target: ${CURRENT_CODEX_RELEASE_MANIFEST.targetTag}`);
|
|
1276
1310
|
console.log(` runtime: ${codex.version || 'unknown'}`);
|
|
1277
1311
|
console.log(` multi-agent mode: ${codexNativeFeatureMatrix.features?.multi_agent_mode?.ok ? 'verified' : 'unverified'}`);
|
|
1278
1312
|
console.log(` rollout budget: ${codexNativeFeatureMatrix.features?.rollout_budget?.ok ? 'verified' : 'unverified'}`);
|
|
@@ -1378,9 +1412,9 @@ function buildRuntimeReadiness(zellijReadiness, matrix) {
|
|
|
1378
1412
|
...(zellijStatus === 'headless_available' ? ['MAD can run with --headless; live panes require repair'] : []),
|
|
1379
1413
|
...(hookPolicy !== 'approved-only' ? ['hook-derived evidence will not count'] : []),
|
|
1380
1414
|
...(agentStrategy !== 'agent_type' ? ['message-role fallback active'] : []),
|
|
1381
|
-
...(multiAgentMode === 'proactive' ? [
|
|
1382
|
-
...(rolloutBudget === 'codex-
|
|
1383
|
-
...(researchSource === 'indexed-web-search' ? [
|
|
1415
|
+
...(multiAgentMode === 'proactive' ? [`Codex ${CURRENT_CODEX_RELEASE_MANIFEST.requiredCliVersion} multi-agent proactive mode available for Naruto-style routes`] : []),
|
|
1416
|
+
...(rolloutBudget === 'codex-0144-shared' ? [`Codex ${CURRENT_CODEX_RELEASE_MANIFEST.requiredCliVersion} rollout budget can be recorded in route proof`] : []),
|
|
1417
|
+
...(researchSource === 'indexed-web-search' ? [`Codex ${CURRENT_CODEX_RELEASE_MANIFEST.requiredCliVersion} indexed web search selected for source-intelligence routes`] : [])
|
|
1384
1418
|
],
|
|
1385
1419
|
repair_actions: [...new Set(repairActions)]
|
|
1386
1420
|
};
|
|
@@ -3,6 +3,13 @@ import { bumpProjectVersion, disableVersionGitHook, versioningStatus } from '../
|
|
|
3
3
|
import { flag } from '../cli/args.js';
|
|
4
4
|
import { printJson } from '../cli/output.js';
|
|
5
5
|
export async function run(_command, args = []) {
|
|
6
|
+
if (flag(args, '--help') || flag(args, '-h')) {
|
|
7
|
+
const usage = 'Usage: sks versioning status|bump [major|minor|patch]|disable [--json]';
|
|
8
|
+
if (flag(args, '--json'))
|
|
9
|
+
return printJson({ ok: true, command: 'versioning', usage, mutated: false });
|
|
10
|
+
console.log(usage);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
6
13
|
const root = await projectRoot();
|
|
7
14
|
const action = args[0] || 'status';
|
|
8
15
|
const bump = ['major', 'minor', 'patch'].includes(String(args[1] || '')) ? String(args[1]) : null;
|