sneakoscope 0.9.13 → 0.9.15
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 +32 -39
- package/crates/sks-core/Cargo.lock +99 -1
- package/crates/sks-core/Cargo.toml +2 -1
- package/crates/sks-core/src/main.rs +77 -43
- package/package.json +8 -5
- package/src/cli/command-registry.mjs +73 -114
- package/src/cli/feature-commands.mjs +44 -5
- package/src/cli/install-helpers.mjs +2 -2
- package/src/cli/router.mjs +2 -3
- package/src/commands/aliases.mjs +2 -0
- package/src/commands/auto-review.mjs +5 -0
- package/src/commands/autoresearch.mjs +5 -0
- package/src/commands/bootstrap.mjs +2 -0
- package/src/commands/code-structure.mjs +5 -0
- package/src/commands/codex-lb.mjs +61 -3
- package/src/commands/commands.mjs +5 -0
- package/src/commands/commit-and-push.mjs +5 -0
- package/src/commands/commit.mjs +5 -0
- package/src/commands/computer-use.mjs +31 -0
- package/src/commands/conflicts.mjs +13 -0
- package/src/commands/context7.mjs +5 -0
- package/src/commands/db.mjs +1 -1
- package/src/commands/deps.mjs +5 -0
- package/src/commands/dfix.mjs +2 -0
- package/src/commands/doctor.mjs +2 -2
- package/src/commands/dollar-commands.mjs +2 -0
- package/src/commands/eval.mjs +5 -0
- package/src/commands/fix-path.mjs +2 -0
- package/src/commands/gc.mjs +2 -0
- package/src/commands/goal.mjs +5 -0
- package/src/commands/guard.mjs +10 -0
- package/src/commands/gx.mjs +5 -0
- package/src/commands/harness.mjs +5 -0
- package/src/commands/help.mjs +3 -74
- package/src/commands/hook.mjs +8 -0
- package/src/commands/hproof.mjs +5 -0
- package/src/commands/image-ux-review.mjs +38 -0
- package/src/commands/init.mjs +2 -0
- package/src/commands/mad-sks.mjs +14 -0
- package/src/commands/memory.mjs +5 -0
- package/src/commands/openclaw.mjs +2 -0
- package/src/commands/perf.mjs +2 -2
- package/src/commands/pipeline.mjs +25 -0
- package/src/commands/postinstall.mjs +2 -0
- package/src/commands/ppt.mjs +44 -0
- package/src/commands/profile.mjs +5 -0
- package/src/commands/proof-field.mjs +5 -0
- package/src/commands/proof.mjs +22 -1
- package/src/commands/qa-loop.mjs +5 -0
- package/src/commands/quickstart.mjs +2 -0
- package/src/commands/reasoning.mjs +2 -0
- package/src/commands/recallpulse.mjs +5 -0
- package/src/commands/research.mjs +5 -0
- package/src/commands/selftest.mjs +2 -0
- package/src/commands/setup.mjs +2 -0
- package/src/commands/skill-dream.mjs +5 -0
- package/src/commands/stats.mjs +2 -0
- package/src/commands/team.mjs +2 -0
- package/src/commands/tmux.mjs +5 -0
- package/src/commands/update-check.mjs +2 -0
- package/src/commands/usage.mjs +2 -0
- package/src/commands/validate-artifacts.mjs +2 -0
- package/src/commands/versioning.mjs +16 -0
- package/src/commands/wiki.mjs +2 -2
- package/src/core/codex-lb-circuit.mjs +18 -0
- package/src/core/commands/basic-cli.mjs +315 -0
- package/src/{cli/maintenance-commands.mjs → core/commands/route-cli.mjs} +37 -37
- package/src/core/feature-fixture-runner.mjs +109 -0
- package/src/core/feature-fixtures.mjs +1 -1
- package/src/core/feature-registry.mjs +19 -7
- package/src/core/fsx.mjs +1 -1
- package/src/core/git-simple.mjs +118 -0
- package/src/core/pipeline.mjs +1 -1
- package/src/core/proof/route-finalizer-fixtures.mjs +21 -0
- package/src/core/proof/route-finalizer-policy.mjs +13 -0
- package/src/core/proof/route-finalizer.mjs +82 -0
- package/src/core/proof-field.mjs +2 -2
- package/src/core/routes.mjs +31 -1
- package/src/core/rust-accelerator.mjs +8 -3
- package/src/core/version.mjs +1 -1
- package/src/core/wiki-image/before-after-relation.mjs +1 -0
- package/src/core/wiki-image/computer-use-evidence.mjs +1 -0
- package/src/core/wiki-image/generated-review-parser.mjs +1 -0
- package/src/core/wiki-image/image-ux-evidence.mjs +1 -0
- package/src/core/wiki-image/image-voxel-ledger.mjs +10 -3
- package/src/core/wiki-image/ppt-image-evidence.mjs +1 -0
- package/src/core/wiki-image/route-image-evidence.mjs +107 -0
- package/src/cli/legacy-main.mjs +0 -4147
package/src/commands/help.mjs
CHANGED
|
@@ -1,77 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { flag } from '../cli/args.mjs';
|
|
3
|
-
import { printJson, sksTextLogo } from '../cli/output.mjs';
|
|
4
|
-
|
|
5
|
-
const FALLBACK_CATALOG = [
|
|
6
|
-
{ name: 'help', usage: 'sks help [stable|beta|labs|all]', description: 'Show concise SKS help.' },
|
|
7
|
-
{ name: 'version', usage: 'sks version | sks --version', description: 'Print the installed version.' },
|
|
8
|
-
{ name: 'commands', usage: 'sks commands [--json]', description: 'List the command registry.' },
|
|
9
|
-
{ name: 'root', usage: 'sks root [--json]', description: 'Show the active SKS root.' },
|
|
10
|
-
{ name: 'doctor', usage: 'sks doctor [--json]', description: 'Check local SKS readiness.' },
|
|
11
|
-
{ name: 'features', usage: 'sks features check --json', description: 'Validate feature coverage and fixtures.' },
|
|
12
|
-
{ name: 'all-features', usage: 'sks all-features selftest --mock --json', description: 'Run mock feature fixture checks.' },
|
|
13
|
-
{ name: 'proof', usage: 'sks proof show|validate|latest|export [--json|--md]', description: 'Inspect completion proof.' },
|
|
14
|
-
{ name: 'wiki', usage: 'sks wiki image-ingest|image-validate|image-summary ...', description: 'Manage TriWiki and image voxel ledgers.' },
|
|
15
|
-
{ name: 'hooks', usage: 'sks hooks explain|status|trust-report|replay ...', description: 'Inspect Codex hook policy and trust evidence.' },
|
|
16
|
-
{ name: 'codex-lb', usage: 'sks codex-lb status|metrics|doctor|circuit ...', description: 'Inspect codex-lb readiness and circuit state.' },
|
|
17
|
-
{ name: 'perf', usage: 'sks perf cold-start --json', description: 'Measure CLI cold-start budgets.' },
|
|
18
|
-
{ name: 'team', usage: 'sks team "task"', description: 'Create and observe Team missions.' },
|
|
19
|
-
{ name: 'qa-loop', usage: 'sks qa-loop prepare|run|status ...', description: 'Run QA loop missions.' },
|
|
20
|
-
{ name: 'research', usage: 'sks research prepare|run|status ...', description: 'Run research missions.' },
|
|
21
|
-
{ name: 'ppt', usage: 'sks ppt build|status ...', description: 'Build or inspect PPT route artifacts.' },
|
|
22
|
-
{ name: 'image-ux-review', usage: 'sks image-ux-review status ...', description: 'Inspect image UX review artifacts.' },
|
|
23
|
-
{ name: 'db', usage: 'sks db policy|scan|check ...', description: 'Inspect database safety policy.' },
|
|
24
|
-
{ name: 'gx', usage: 'sks gx init|render|validate|drift|snapshot ...', description: 'Create and verify visual context cartridges.' },
|
|
25
|
-
{ name: 'goal', usage: 'sks goal create|status|pause|resume|clear ...', description: 'Manage the Goal bridge.' }
|
|
26
|
-
];
|
|
1
|
+
import { commandsCommand, helpCommand } from '../core/commands/basic-cli.mjs';
|
|
27
2
|
|
|
28
3
|
export async function run(command, args = []) {
|
|
29
|
-
if (command === 'commands') return
|
|
30
|
-
|
|
31
|
-
if (topic === 'all') return printHelp('all');
|
|
32
|
-
if (['stable', 'beta', 'labs'].includes(topic)) return printHelp(topic);
|
|
33
|
-
if (topic) return printTopic(topic);
|
|
34
|
-
return printHelp('default');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function commands(args = []) {
|
|
38
|
-
const commands = commandRows('all');
|
|
39
|
-
if (flag(args, '--json')) {
|
|
40
|
-
return printJson({
|
|
41
|
-
schema: 'sks.command-registry.v1',
|
|
42
|
-
aliases: ['sks', 'sneakoscope'],
|
|
43
|
-
commands
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
console.log(`${sksTextLogo()}\n\nCommands\n`);
|
|
47
|
-
const width = Math.max(...commands.map((entry) => entry.usage.length));
|
|
48
|
-
for (const entry of commands) console.log(`${entry.usage.padEnd(width)} ${entry.description}`);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function printHelp(filter) {
|
|
52
|
-
const rows = commandRows(filter === 'default' ? 'stable-beta' : filter);
|
|
53
|
-
console.log(`${sksTextLogo()}\n\nUsage\n`);
|
|
54
|
-
console.log(' sks help [stable|beta|labs|all]');
|
|
55
|
-
console.log(' sks commands [--json]');
|
|
56
|
-
console.log(' sks root [--json]');
|
|
57
|
-
console.log(' sks proof show --json');
|
|
58
|
-
console.log('');
|
|
59
|
-
for (const row of rows) console.log(` ${row.usage.padEnd(54)} ${row.description}`);
|
|
60
|
-
console.log('\nCore promises: image-based Voxel TriWiki, Codex App/codex-lb readiness, and completion proof for serious routes.');
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function printTopic(topic) {
|
|
64
|
-
const row = commandRows('all').find((entry) => entry.name === topic);
|
|
65
|
-
if (!row) return printHelp('default');
|
|
66
|
-
console.log(`${sksTextLogo()}\n\n${row.name}\n`);
|
|
67
|
-
console.log(`Usage: ${row.usage}`);
|
|
68
|
-
console.log(row.description);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function commandRows(filter) {
|
|
72
|
-
const maturityByName = new Map(Object.entries(COMMANDS).map(([name, meta]) => [name, meta.maturity || 'labs']));
|
|
73
|
-
const rows = FALLBACK_CATALOG.map((entry) => ({ ...entry, maturity: maturityByName.get(entry.name) || 'labs' }));
|
|
74
|
-
if (filter === 'all') return rows;
|
|
75
|
-
if (filter === 'stable-beta') return rows.filter((row) => row.maturity === 'stable' || row.maturity === 'beta');
|
|
76
|
-
return rows.filter((row) => row.maturity === filter);
|
|
4
|
+
if (command === 'commands') return commandsCommand(args);
|
|
5
|
+
return helpCommand(args);
|
|
77
6
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { hookMain } from '../core/hooks-runtime.mjs';
|
|
2
|
+
import { printJson } from '../cli/output.mjs';
|
|
3
|
+
|
|
4
|
+
export async function run(_command, args = []) {
|
|
5
|
+
const [name = 'user-prompt-submit'] = args;
|
|
6
|
+
const result = await hookMain(name);
|
|
7
|
+
return printJson(result);
|
|
8
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { projectRoot, readJson } from '../core/fsx.mjs';
|
|
3
|
+
import { findLatestMission, loadMission } from '../core/mission.mjs';
|
|
4
|
+
import { flag } from '../cli/args.mjs';
|
|
5
|
+
import { printJson } from '../cli/output.mjs';
|
|
6
|
+
import { writeImageUxReviewRouteArtifacts } from '../core/image-ux-review.mjs';
|
|
7
|
+
import { finalizeRouteWithProof } from '../core/proof/route-finalizer.mjs';
|
|
8
|
+
|
|
9
|
+
export async function run(command, args = []) {
|
|
10
|
+
const root = await projectRoot();
|
|
11
|
+
const action = args[0] || 'status';
|
|
12
|
+
const missionArg = args[1] && !String(args[1]).startsWith('--') ? args[1] : 'latest';
|
|
13
|
+
const missionId = missionArg === 'latest' ? await findLatestMission(root) : missionArg;
|
|
14
|
+
if (!missionId) {
|
|
15
|
+
const result = { schema: 'sks.image-ux-review-status.v1', ok: false, status: 'missing_mission' };
|
|
16
|
+
if (flag(args, '--json')) return printJson(result);
|
|
17
|
+
console.error('No mission found.');
|
|
18
|
+
process.exitCode = 1;
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const { dir, mission } = await loadMission(root, missionId);
|
|
22
|
+
const contract = await readJson(path.join(dir, 'decision-contract.json'), { prompt: mission.prompt, answers: {}, sealed_hash: null });
|
|
23
|
+
if (action === 'build' || action === 'run' || (action === 'status' && flag(args, '--mock'))) {
|
|
24
|
+
const artifacts = await writeImageUxReviewRouteArtifacts(dir, contract);
|
|
25
|
+
const route = command === 'ux-review' ? '$UX-Review' : command === 'visual-review' ? '$Visual-Review' : command === 'ui-ux-review' ? '$UI-UX-Review' : '$Image-UX-Review';
|
|
26
|
+
const proof = await finalizeRouteWithProof(root, { missionId, route, mock: flag(args, '--mock'), artifacts: Object.keys(artifacts), claims: [{ id: 'image-ux-review-fixture', status: 'verified_partial' }] });
|
|
27
|
+
const result = { schema: 'sks.image-ux-review-build.v1', ok: proof.ok, mission_id: missionId, artifacts, proof: proof.validation };
|
|
28
|
+
if (flag(args, '--json')) return printJson(result);
|
|
29
|
+
console.log(`Image UX review: ${proof.ok ? 'ok' : 'blocked'} ${missionId}`);
|
|
30
|
+
if (!proof.ok) process.exitCode = 1;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const gate = await readJson(path.join(dir, 'image-ux-review-gate.json'), null);
|
|
34
|
+
const result = { schema: 'sks.image-ux-review-status.v1', ok: true, mission_id: missionId, gate };
|
|
35
|
+
if (flag(args, '--json')) return printJson(result);
|
|
36
|
+
console.log(`Image UX Review mission: ${missionId}`);
|
|
37
|
+
console.log(`Gate: ${gate?.passed ? 'passed' : gate ? 'present' : 'missing'}`);
|
|
38
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { madHighCommand } from '../core/commands/route-cli.mjs';
|
|
2
|
+
import { maybePromptCodexUpdateForLaunch, maybePromptCodexLbSetupForLaunch } from '../cli/install-helpers.mjs';
|
|
3
|
+
import { PACKAGE_VERSION } from '../core/fsx.mjs';
|
|
4
|
+
|
|
5
|
+
export async function run(_command, args = []) {
|
|
6
|
+
return madHighCommand(['--mad-sks', ...args], {
|
|
7
|
+
maybePromptSksUpdateForLaunch: async () => ({ status: 'skipped' }),
|
|
8
|
+
maybePromptCodexUpdateForLaunch,
|
|
9
|
+
ensureMadLaunchDependencies: async () => ({ ready: true, actions: [], status: {} }),
|
|
10
|
+
printDepsInstallAction: (action) => console.log(JSON.stringify(action)),
|
|
11
|
+
maybePromptCodexLbSetupForLaunch,
|
|
12
|
+
packageVersion: PACKAGE_VERSION
|
|
13
|
+
});
|
|
14
|
+
}
|
package/src/commands/perf.mjs
CHANGED
|
@@ -25,8 +25,8 @@ export async function run(_command, args = []) {
|
|
|
25
25
|
if (!result.ok) process.exitCode = 1;
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
return
|
|
28
|
+
const { perfCommand } = await import('../core/commands/route-cli.mjs');
|
|
29
|
+
return perfCommand(action, args.slice(1));
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export function runColdStart({ root = process.cwd(), iterations = DEFAULT_COLD_START_ITERATIONS } = {}) {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { projectRoot, readJson } from '../core/fsx.mjs';
|
|
2
|
+
import { stateFile } from '../core/mission.mjs';
|
|
3
|
+
import { flag } from '../cli/args.mjs';
|
|
4
|
+
import { printJson } from '../cli/output.mjs';
|
|
5
|
+
import { projectGateStatus } from '../core/pipeline.mjs';
|
|
6
|
+
|
|
7
|
+
export async function run(_command, args = []) {
|
|
8
|
+
const root = await projectRoot();
|
|
9
|
+
const action = args[0] || 'status';
|
|
10
|
+
const state = await readJson(stateFile(root), {});
|
|
11
|
+
if (action === 'status') {
|
|
12
|
+
const result = { schema: 'sks.pipeline-status.v1', ok: true, state };
|
|
13
|
+
if (flag(args, '--json')) return printJson(result);
|
|
14
|
+
console.log(`Pipeline: ${state.mission_id || 'none'} ${state.route_command || state.mode || ''}`.trim());
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (action === 'plan') {
|
|
18
|
+
const result = await projectGateStatus(root, state);
|
|
19
|
+
if (flag(args, '--json')) return printJson(result);
|
|
20
|
+
console.log(`Pipeline gate: ${result.ok ? 'pass' : 'blocked'}`);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
console.error('Usage: sks pipeline status|plan [--json]');
|
|
24
|
+
process.exitCode = 1;
|
|
25
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { projectRoot, readJson, writeJsonAtomic } from '../core/fsx.mjs';
|
|
3
|
+
import { findLatestMission, loadMission } from '../core/mission.mjs';
|
|
4
|
+
import { flag } from '../cli/args.mjs';
|
|
5
|
+
import { printJson } from '../cli/output.mjs';
|
|
6
|
+
import { writePptBuildArtifacts, writePptRouteArtifacts } from '../core/ppt.mjs';
|
|
7
|
+
import { finalizeRouteWithProof } from '../core/proof/route-finalizer.mjs';
|
|
8
|
+
|
|
9
|
+
export async function run(_command, args = []) {
|
|
10
|
+
const root = await projectRoot();
|
|
11
|
+
const action = args[0] || 'status';
|
|
12
|
+
const missionArg = args[1] && !String(args[1]).startsWith('--') ? args[1] : 'latest';
|
|
13
|
+
const missionId = missionArg === 'latest' ? await findLatestMission(root) : missionArg;
|
|
14
|
+
if (!missionId) {
|
|
15
|
+
const result = { schema: 'sks.ppt-status.v1', ok: false, status: 'missing_mission' };
|
|
16
|
+
if (flag(args, '--json')) return printJson(result);
|
|
17
|
+
console.error('No mission found.');
|
|
18
|
+
process.exitCode = 1;
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const { dir, mission } = await loadMission(root, missionId);
|
|
22
|
+
const contract = await readJson(path.join(dir, 'decision-contract.json'), { prompt: mission.prompt, answers: {}, sealed_hash: null });
|
|
23
|
+
if (action === 'build') {
|
|
24
|
+
await writePptRouteArtifacts(dir, contract);
|
|
25
|
+
const build = await writePptBuildArtifacts(dir, contract);
|
|
26
|
+
const proof = await finalizeRouteWithProof(root, { missionId, route: '$PPT', mock: flag(args, '--mock'), artifacts: build.files || [], claims: [{ id: 'ppt-build-fixture', status: 'verified_partial' }] });
|
|
27
|
+
const result = { schema: 'sks.ppt-build.v1', ok: proof.ok, mission_id: missionId, build, proof: proof.validation };
|
|
28
|
+
if (flag(args, '--json')) return printJson(result);
|
|
29
|
+
console.log(`PPT build: ${proof.ok ? 'ok' : 'blocked'} ${missionId}`);
|
|
30
|
+
if (!proof.ok) process.exitCode = 1;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (action === 'status') {
|
|
34
|
+
const gate = await readJson(path.join(dir, 'ppt-gate.json'), null);
|
|
35
|
+
const result = { schema: 'sks.ppt-status.v1', ok: true, mission_id: missionId, gate };
|
|
36
|
+
if (flag(args, '--json')) return printJson(result);
|
|
37
|
+
console.log(`PPT mission: ${missionId}`);
|
|
38
|
+
console.log(`Gate: ${gate?.passed ? 'passed' : gate ? 'present' : 'missing'}`);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
await writeJsonAtomic(path.join(dir, 'ppt-command-error.json'), { action, args });
|
|
42
|
+
console.error('Usage: sks ppt build|status <mission-id|latest> [--json] [--mock]');
|
|
43
|
+
process.exitCode = 1;
|
|
44
|
+
}
|
package/src/commands/proof.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { collectProofEvidence } from '../core/proof/evidence-collector.mjs';
|
|
|
5
5
|
import { findLatestMission } from '../core/mission.mjs';
|
|
6
6
|
import { readLatestProof, readLatestProofMarkdown, readRouteProof } from '../core/proof/proof-reader.mjs';
|
|
7
7
|
import { writeRouteCompletionProof } from '../core/proof/route-adapter.mjs';
|
|
8
|
+
import { finalizeRouteWithProof } from '../core/proof/route-finalizer.mjs';
|
|
8
9
|
import { renderProofMarkdown, writeCompletionProof } from '../core/proof/proof-writer.mjs';
|
|
9
10
|
import { validateCompletionProof } from '../core/proof/validation.mjs';
|
|
10
11
|
|
|
@@ -41,6 +42,26 @@ export async function run(_command, args = []) {
|
|
|
41
42
|
if (!result.ok) process.exitCode = 1;
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
45
|
+
if (action === 'finalize') {
|
|
46
|
+
const missionArg = rest.find((arg) => !String(arg).startsWith('--')) || 'latest';
|
|
47
|
+
const missionId = missionArg === 'latest' ? await findLatestMission(root) : missionArg;
|
|
48
|
+
const routeIndex = args.indexOf('--route');
|
|
49
|
+
const route = routeIndex >= 0 && args[routeIndex + 1] ? args[routeIndex + 1] : '$SKS';
|
|
50
|
+
const result = await finalizeRouteWithProof(root, {
|
|
51
|
+
missionId,
|
|
52
|
+
route,
|
|
53
|
+
strict: flag(args, '--strict'),
|
|
54
|
+
mock: flag(args, '--mock'),
|
|
55
|
+
requireRelation: flag(args, '--require-relation'),
|
|
56
|
+
statusHint: flag(args, '--strict') ? 'verified_partial' : 'verified_partial',
|
|
57
|
+
claims: [{ id: 'proof-finalize', status: 'supported', evidence: `.sneakoscope/missions/${missionId}/completion-proof.json` }],
|
|
58
|
+
unverified: flag(args, '--mock') ? ['Finalizer ran in mock fixture mode.'] : []
|
|
59
|
+
});
|
|
60
|
+
if (flag(args, '--json')) return printJson({ schema: 'sks.completion-proof-finalize.v1', ok: result.ok, mission_id: missionId, validation: result.validation, files: result.files, proof: result.proof });
|
|
61
|
+
console.log(`Completion proof finalized: ${result.files.latest_json}`);
|
|
62
|
+
if (!result.ok) process.exitCode = 1;
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
44
65
|
if (action === 'export' && (flag(rest, '--md') || flag(args, '--md'))) {
|
|
45
66
|
process.stdout.write(await readLatestProofMarkdown(root));
|
|
46
67
|
return;
|
|
@@ -86,7 +107,7 @@ export async function run(_command, args = []) {
|
|
|
86
107
|
console.log(`Completion proof written: ${result.files.latest_json}`);
|
|
87
108
|
return;
|
|
88
109
|
}
|
|
89
|
-
console.error('Usage: sks proof show|latest|validate|route <mission-id|latest>|export --md|repair latest|smoke [--json]');
|
|
110
|
+
console.error('Usage: sks proof show|latest|validate|route <mission-id|latest>|finalize <mission-id|latest> [--route route] [--strict] [--mock] [--json]|export --md|repair latest|smoke [--json]');
|
|
90
111
|
process.exitCode = 1;
|
|
91
112
|
}
|
|
92
113
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { projectRoot } from '../core/fsx.mjs';
|
|
2
|
+
import { bumpProjectVersion, disableVersionGitHook, versioningStatus } from '../core/version-manager.mjs';
|
|
3
|
+
import { flag } from '../cli/args.mjs';
|
|
4
|
+
import { printJson } from '../cli/output.mjs';
|
|
5
|
+
export async function run(_command, args = []) {
|
|
6
|
+
const root = await projectRoot();
|
|
7
|
+
const action = args[0] || 'status';
|
|
8
|
+
const result = action === 'bump'
|
|
9
|
+
? await bumpProjectVersion(root, { force: true })
|
|
10
|
+
: ['disable', 'off', 'remove-hook', 'unhook'].includes(action)
|
|
11
|
+
? await disableVersionGitHook(root)
|
|
12
|
+
: await versioningStatus(root);
|
|
13
|
+
if (flag(args, '--json')) return printJson(result);
|
|
14
|
+
console.log(JSON.stringify(result, null, 2));
|
|
15
|
+
if (result.ok === false) process.exitCode = 1;
|
|
16
|
+
}
|
package/src/commands/wiki.mjs
CHANGED
|
@@ -85,8 +85,8 @@ export async function run(_command, args = []) {
|
|
|
85
85
|
if (!result.ok) process.exitCode = 1;
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
|
-
const
|
|
89
|
-
return
|
|
88
|
+
const { wikiCommand } = await import('../core/commands/route-cli.mjs');
|
|
89
|
+
return wikiCommand(action, args.slice(1));
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
function parseBbox(raw) {
|
|
@@ -99,6 +99,24 @@ export function codexLbMetrics(circuit = emptyCircuit()) {
|
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
export async function codexLbProofEvidence(root = packageRoot()) {
|
|
103
|
+
const circuit = await readCodexLbCircuit(root);
|
|
104
|
+
const metrics = codexLbMetrics(circuit);
|
|
105
|
+
return {
|
|
106
|
+
schema: 'sks.codex-lb-proof-evidence.v1',
|
|
107
|
+
ok: metrics.ok,
|
|
108
|
+
status: circuit.state === 'open' ? 'blocked' : 'verified_partial',
|
|
109
|
+
circuit_state: circuit.state,
|
|
110
|
+
report_path: codexLbReportPath(root),
|
|
111
|
+
last_ok_at: circuit.last_ok_at,
|
|
112
|
+
last_failure_at: circuit.last_failure_at,
|
|
113
|
+
last_warning_at: circuit.last_warning_at,
|
|
114
|
+
recent_failures: circuit.recent_failures?.length || 0,
|
|
115
|
+
recent_warnings: circuit.recent_warnings?.length || 0,
|
|
116
|
+
policy: metrics.policy
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
102
120
|
function emptyCircuit() {
|
|
103
121
|
return {
|
|
104
122
|
schema: CODEX_LB_CIRCUIT_SCHEMA,
|