sneakoscope 5.1.2 → 5.5.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 +5 -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/commands/doctor.js +32 -3
- package/dist/config/skills-manifest.json +58 -58
- package/dist/core/agents/agent-lifecycle.js +5 -3
- package/dist/core/agents/agent-orchestrator.js +14 -2
- package/dist/core/agents/agent-proof-evidence.js +16 -0
- package/dist/core/agents/native-cli-worker.js +0 -1
- package/dist/core/bench.js +24 -2
- package/dist/core/codex-app/sks-menubar.js +526 -133
- package/dist/core/commands/agent-command.js +35 -1
- package/dist/core/commands/basic-cli.js +61 -4
- package/dist/core/commands/command-utils.js +14 -4
- package/dist/core/commands/goal-command.js +3 -0
- package/dist/core/commands/image-ux-review-command.js +4 -1
- package/dist/core/commands/mad-sks-command.js +10 -1
- package/dist/core/commands/menubar-command.js +2 -1
- package/dist/core/commands/naruto-command.js +12 -7
- package/dist/core/commands/ppt-command.js +40 -1
- package/dist/core/commands/qa-loop-command.js +4 -1
- package/dist/core/commands/release-command.js +3 -3
- package/dist/core/commands/research-command.js +4 -0
- package/dist/core/commands/route-success-helpers.js +2 -0
- package/dist/core/commands/run-command.js +22 -5
- package/dist/core/commands/seo-command.js +31 -4
- package/dist/core/db-safety.js +8 -1
- package/dist/core/doctor/doctor-dirty-planner.js +51 -7
- package/dist/core/feature-fixture-executor.js +262 -0
- package/dist/core/feature-fixtures.js +95 -52
- package/dist/core/fsx.js +1 -1
- package/dist/core/loops/loop-decomposer.js +4 -3
- package/dist/core/loops/loop-planner.js +7 -3
- package/dist/core/loops/loop-worker-runtime.js +6 -0
- package/dist/core/naruto/naruto-real-worker-child.js +1 -1
- package/dist/core/pipeline-internals/runtime-gates.js +39 -3
- package/dist/core/proof/selftest-proof-fixtures.js +8 -0
- package/dist/core/providers/glm/naruto/glm-naruto-requirement-coverage.js +18 -1
- package/dist/core/providers/glm/naruto/glm-naruto-requirement-ledger.js +28 -12
- package/dist/core/questions.js +12 -10
- package/dist/core/release/release-gate-node.js +2 -0
- package/dist/core/routes.js +11 -0
- package/dist/core/stop-gate/stop-gate-check.js +4 -0
- package/dist/core/stop-gate/stop-gate-writer.js +4 -0
- package/dist/core/trust-kernel/trust-report.js +10 -1
- package/dist/core/update/update-migration-state.js +23 -3
- package/dist/core/version.js +1 -1
- package/dist/core/work-order-ledger.js +60 -0
- package/dist/core/zellij/zellij-slot-telemetry.js +1 -1
- package/dist/scripts/doctor-context7-mcp-repair-blackbox.js +16 -0
- package/dist/scripts/doctor-fix-production-blackbox.js +26 -0
- package/dist/scripts/doctor-startup-config-repair-blackbox.js +13 -0
- package/dist/scripts/doctor-supabase-mcp-repair-blackbox.js +14 -0
- package/dist/scripts/gate-policy-audit-check.js +2 -2
- package/dist/scripts/naruto-real-active-pool-runtime-check.js +26 -1
- package/dist/scripts/packlist-performance-check.js +7 -1
- package/dist/scripts/project-skill-dedupe-blackbox.js +36 -0
- package/dist/scripts/release-dag-full-coverage-check.js +1 -1
- package/dist/scripts/release-gate-existence-audit.js +1 -1
- package/dist/scripts/release-gate-planner.js +1 -1
- package/dist/scripts/release-gate-script-parity-check.js +44 -16
- package/dist/scripts/release-metadata-1-19-check.js +2 -2
- package/dist/scripts/sks-menubar-install-check.js +57 -20
- package/dist/scripts/supabase-secret-preservation-blackbox.js +29 -0
- package/dist/scripts/update-preserves-supabase-keys-blackbox.js +27 -0
- package/dist/scripts/zellij-slot-telemetry-runtime-check.js +1 -0
- package/package.json +12 -65
- package/schemas/release/release-gate-node.schema.json +1 -0
- package/bench/tasks/t01-off-by-one/repo/package.json +0 -9
- package/bench/tasks/t01-off-by-one/repo/src/pagination.js +0 -5
- package/bench/tasks/t01-off-by-one/repo/test.js +0 -5
- package/bench/tasks/t01-off-by-one/task.json +0 -13
- package/bench/tasks/t02-signature-cochange/repo/package.json +0 -9
- package/bench/tasks/t02-signature-cochange/repo/src/admin.js +0 -5
- package/bench/tasks/t02-signature-cochange/repo/src/audit.js +0 -5
- package/bench/tasks/t02-signature-cochange/repo/src/labels.js +0 -3
- package/bench/tasks/t02-signature-cochange/repo/src/profile.js +0 -5
- package/bench/tasks/t02-signature-cochange/repo/test.js +0 -9
- package/bench/tasks/t02-signature-cochange/task.json +0 -12
- package/bench/tasks/t03-type-puzzle/repo/package.json +0 -9
- package/bench/tasks/t03-type-puzzle/repo/src/config.js +0 -4
- package/bench/tasks/t03-type-puzzle/repo/test.js +0 -6
- package/bench/tasks/t03-type-puzzle/task.json +0 -13
- package/bench/tasks/t04-refactor-preserve/repo/package.json +0 -9
- package/bench/tasks/t04-refactor-preserve/repo/src/cart.js +0 -8
- package/bench/tasks/t04-refactor-preserve/repo/test.js +0 -4
- package/bench/tasks/t04-refactor-preserve/task.json +0 -12
- package/bench/tasks/t05-performance/repo/package.json +0 -9
- package/bench/tasks/t05-performance/repo/src/pairs.js +0 -9
- package/bench/tasks/t05-performance/repo/test.js +0 -11
- package/bench/tasks/t05-performance/task.json +0 -12
- package/bench/tasks/t06-mistake-rule/repo/package.json +0 -9
- package/bench/tasks/t06-mistake-rule/repo/src/loader.js +0 -6
- package/bench/tasks/t06-mistake-rule/repo/test.js +0 -7
- package/bench/tasks/t06-mistake-rule/task.json +0 -12
|
@@ -842,7 +842,8 @@ function applyNarutoWorkGraphToPartition(partition, graph, roster, targetActiveS
|
|
|
842
842
|
const writePaths = normalizePathList(item.write_paths);
|
|
843
843
|
const readonlyPaths = normalizePathList(item.readonly_paths);
|
|
844
844
|
const targetPaths = normalizePathList(item.target_paths);
|
|
845
|
-
const
|
|
845
|
+
const parentObjectiveNormalized = normalizeWorkerPromptText(parentPrompt);
|
|
846
|
+
const parentObjective = parentObjectiveNormalized.text;
|
|
846
847
|
return Array.from({ length: candidateCount }, (_unused, candidateOffset) => {
|
|
847
848
|
const candidateIndex = candidateOffset + 1;
|
|
848
849
|
const candidateSliceId = candidateCount > 1 ? `${sliceId}-cand${candidateIndex}` : sliceId;
|
|
@@ -889,6 +890,9 @@ function applyNarutoWorkGraphToPartition(partition, graph, roster, targetActiveS
|
|
|
889
890
|
goal_mode_ref: goalModeRef,
|
|
890
891
|
strategy_refs: strategyRefs,
|
|
891
892
|
parent_prompt: parentObjective,
|
|
893
|
+
worker_prompt_truncated: parentObjectiveNormalized.truncated
|
|
894
|
+
? { worker: owner, dropped_chars: parentObjectiveNormalized.dropped_chars }
|
|
895
|
+
: null,
|
|
892
896
|
max_attempts: 1,
|
|
893
897
|
description: [
|
|
894
898
|
parentObjective ? `Parent Naruto objective:\n${parentObjective}` : null,
|
|
@@ -2045,8 +2049,16 @@ function buildDirectSdkWorkerPrompt(slice) {
|
|
|
2045
2049
|
'Required JSON fields: status, summary, findings, changed_files, patch_envelopes, verification, rollback_notes, blockers.'
|
|
2046
2050
|
].join('\n');
|
|
2047
2051
|
}
|
|
2052
|
+
const WORKER_PROMPT_TEXT_MAX_CHARS = 32000;
|
|
2048
2053
|
function normalizeWorkerPromptText(value) {
|
|
2049
|
-
|
|
2054
|
+
const normalized = String(value || '').replace(/[^\S\n]+/g, ' ').replace(/\n{3,}/g, '\n\n').trim();
|
|
2055
|
+
const truncated = normalized.length > WORKER_PROMPT_TEXT_MAX_CHARS;
|
|
2056
|
+
const text = truncated ? normalized.slice(0, WORKER_PROMPT_TEXT_MAX_CHARS) : normalized;
|
|
2057
|
+
return {
|
|
2058
|
+
text,
|
|
2059
|
+
truncated,
|
|
2060
|
+
dropped_chars: truncated ? normalized.length - WORKER_PROMPT_TEXT_MAX_CHARS : 0
|
|
2061
|
+
};
|
|
2050
2062
|
}
|
|
2051
2063
|
function buildDirectNoPatchReason(slice, opts) {
|
|
2052
2064
|
const writePathCount = sdkWritePaths(slice, opts).length;
|
|
@@ -134,6 +134,19 @@ export async function writeAgentProofEvidence(root, input) {
|
|
|
134
134
|
|| (scheduler.pending_queue_drained === true
|
|
135
135
|
&& Number(scheduler.active_slot_count || 0) === 0
|
|
136
136
|
&& Number(scheduler.max_observed_active_slots || 0) >= Number(scheduler.target_active_slots || 0));
|
|
137
|
+
const workQueueItems = Array.isArray(workQueue?.items) ? workQueue.items : [];
|
|
138
|
+
const workItemsNotAllCompletedIds = workQueueItems
|
|
139
|
+
.filter((item) => item.status !== 'completed')
|
|
140
|
+
.map((item) => String(item.id));
|
|
141
|
+
const workItemsFailedOrBlockedCount = Number(scheduler?.failed_count || 0) + Number(scheduler?.blocked_count || 0);
|
|
142
|
+
const workItemStatusById = new Map(workQueueItems.map((item) => [String(item.id), String(item.status)]));
|
|
143
|
+
const orphanedPendingWorkItemIds = workQueueItems
|
|
144
|
+
.filter((item) => item.status === 'pending')
|
|
145
|
+
.filter((item) => (Array.isArray(item.dependencies) ? item.dependencies : []).some((dep) => {
|
|
146
|
+
const depStatus = workItemStatusById.get(String(dep));
|
|
147
|
+
return depStatus === 'failed' || depStatus === 'blocked' || !depStatus;
|
|
148
|
+
}))
|
|
149
|
+
.map((item) => String(item.id));
|
|
137
150
|
const blockers = [
|
|
138
151
|
...(lifecycle.ok ? [] : ['agent_lifecycle_not_all_closed']),
|
|
139
152
|
...(lifecycle.ok ? [] : lifecycle.open_sessions.map((id) => 'session_open:' + id)),
|
|
@@ -154,6 +167,9 @@ export async function writeAgentProofEvidence(root, input) {
|
|
|
154
167
|
...(taskGraph && !taskGraphMatchesCliOptions ? ['task_graph_cli_options_mismatch'] : []),
|
|
155
168
|
...(workQueue && taskGraph && !workQueueMatchesTaskGraph ? ['work_queue_task_graph_mismatch'] : []),
|
|
156
169
|
...(scheduler && workQueue && !schedulerMatchesWorkQueue ? ['scheduler_work_queue_mismatch'] : []),
|
|
170
|
+
...(workQueue && schedulerTotalWorkItems && Number(scheduler?.completed_count || 0) !== schedulerTotalWorkItems ? ['work_items_not_all_completed:' + workItemsNotAllCompletedIds.join(',')] : []),
|
|
171
|
+
...(workItemsFailedOrBlockedCount > 0 ? ['work_items_failed:' + workItemsFailedOrBlockedCount] : []),
|
|
172
|
+
...(orphanedPendingWorkItemIds.length ? ['work_items_orphaned_pending:' + orphanedPendingWorkItemIds.join(',')] : []),
|
|
157
173
|
...(taskGraph && !taskGraphSourceRefsOk ? ['task_graph_source_refs_missing'] : []),
|
|
158
174
|
...(taskGraph && !taskGraphGoalRefsOk ? ['task_graph_goal_refs_missing'] : []),
|
|
159
175
|
...(taskGraph && !taskGraphStrategyRefsOk ? ['task_graph_strategy_refs_missing'] : []),
|
|
@@ -327,7 +327,6 @@ function startWorkerProgressTelemetry(input) {
|
|
|
327
327
|
status: 'running',
|
|
328
328
|
backend: input.backend,
|
|
329
329
|
serviceTier: input.serviceTier,
|
|
330
|
-
progress: { done: tick, total: 0, label: 'heartbeat' },
|
|
331
330
|
artifacts: [input.heartbeatRel],
|
|
332
331
|
logTail: `backend running ${tick}`
|
|
333
332
|
}).catch(() => undefined);
|
package/dist/core/bench.js
CHANGED
|
@@ -121,17 +121,28 @@ export async function runCoreBench(root = process.cwd(), { iterations = 3, tier
|
|
|
121
121
|
for (const [label, args, commandRoot] of coreCommands(benchTrustMission)) {
|
|
122
122
|
const values = [];
|
|
123
123
|
const failures = [];
|
|
124
|
+
// TRUST_VALIDATE_BENCH_COMMAND measures latency of `sks trust validate` against a
|
|
125
|
+
// mock fixture mission. A --mock `$Naruto` run can never satisfy the real agent
|
|
126
|
+
// gate, so `sks trust validate` legitimately exits 1 (report.ok === false,
|
|
127
|
+
// status: 'blocked') every time regardless of environment. This row exists to
|
|
128
|
+
// measure command latency, not to assert the mock mission's trust status, so a
|
|
129
|
+
// well-formed trust-validation report (valid JSON with the expected schema) is
|
|
130
|
+
// accepted even on a nonzero exit; only a crash/unparseable-output counts as a
|
|
131
|
+
// bench failure for this specific command.
|
|
132
|
+
const acceptNonZeroExit = label === TRUST_VALIDATE_BENCH_COMMAND;
|
|
124
133
|
for (let i = 0; i < CORE_BENCH_WARMUP_ITERATIONS; i += 1) {
|
|
125
134
|
const result = await runBenchProcess(commandRoot || root, script, args);
|
|
126
|
-
if (result.code !== 0)
|
|
135
|
+
if (result.code !== 0 && !(acceptNonZeroExit && isWellFormedTrustValidation(result.stdout))) {
|
|
127
136
|
failures.push({ phase: 'warmup', code: result.code, stderr_tail: result.stderr.slice(-400), stdout_tail: result.stdout.slice(-400) });
|
|
137
|
+
}
|
|
128
138
|
}
|
|
129
139
|
for (let i = 0; i < measuredIterations; i += 1) {
|
|
130
140
|
const t0 = performance.now();
|
|
131
141
|
const result = await runBenchProcess(commandRoot || root, script, args);
|
|
132
142
|
values.push(performance.now() - t0);
|
|
133
|
-
if (result.code !== 0)
|
|
143
|
+
if (result.code !== 0 && !(acceptNonZeroExit && isWellFormedTrustValidation(result.stdout))) {
|
|
134
144
|
failures.push({ phase: 'measure', code: result.code, stderr_tail: result.stderr.slice(-400), stdout_tail: result.stdout.slice(-400) });
|
|
145
|
+
}
|
|
135
146
|
}
|
|
136
147
|
const p95 = Math.round(percentile(values, 95));
|
|
137
148
|
rows.push({
|
|
@@ -165,8 +176,19 @@ async function runBenchProcess(root, script, args) {
|
|
|
165
176
|
env: { SKS_SKIP_NPM_FRESHNESS_CHECK: '1', SKS_DISABLE_UPDATE_CHECK: '1', CI: 'true' }
|
|
166
177
|
});
|
|
167
178
|
}
|
|
179
|
+
function isWellFormedTrustValidation(stdout) {
|
|
180
|
+
const parsed = parseJsonOutput(stdout);
|
|
181
|
+
return Boolean(parsed && parsed.schema === 'sks.trust-validation.v1' && typeof parsed.status === 'string');
|
|
182
|
+
}
|
|
168
183
|
async function ensureBenchTrustMission(root, script) {
|
|
169
184
|
const benchRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-core-bench-trust-')).catch(() => root);
|
|
185
|
+
// `sks run` blocks the agent gate (and skips writing completion-proof.json) when
|
|
186
|
+
// its cwd is not a git repo (git_collaboration.status -> not_git_repo). The bench
|
|
187
|
+
// trust-mission scratch dir must be a git repo so completion-proof.json/
|
|
188
|
+
// trust-report.json/run-classification.json actually get written and
|
|
189
|
+
// hasBenchTrustArtifacts() can find a usable mission instead of falling back to
|
|
190
|
+
// a nonexistent 'bench-fixture-missing' id (which always fails trust validate).
|
|
191
|
+
await runProcess('git', ['init', '-q', '.'], { cwd: benchRoot, timeoutMs: 10_000 }).catch(() => null);
|
|
170
192
|
const beforeMissionIds = await listMissionIds(benchRoot);
|
|
171
193
|
const result = await runProcess(process.execPath, [script, 'run', 'fixture', '--mock', '--json'], {
|
|
172
194
|
cwd: benchRoot,
|