sneakoscope 2.0.9 → 2.0.11
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 +8 -4
- 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/.sks-build-stamp.json +4 -4
- package/dist/bin/sks.js +1 -1
- package/dist/build-manifest.json +37 -8
- package/dist/cli/command-registry.js +2 -0
- package/dist/cli/install-helpers.js +8 -20
- package/dist/commands/doctor.js +23 -10
- package/dist/commands/zellij-slot-column-anchor.js +23 -0
- package/dist/commands/zellij-slot-pane.js +26 -0
- package/dist/core/agents/agent-orchestrator.js +255 -16
- package/dist/core/agents/agent-patch-schema.js +8 -1
- package/dist/core/agents/agent-role-config.js +92 -0
- package/dist/core/agents/native-cli-session-swarm.js +186 -71
- package/dist/core/commands/naruto-command.js +165 -11
- package/dist/core/doctor/doctor-readiness-matrix.js +6 -0
- package/dist/core/fsx.js +1 -1
- package/dist/core/git/git-worktree-checkpoint.js +52 -0
- package/dist/core/git/git-worktree-cross-rebase.js +54 -0
- package/dist/core/git/git-worktree-merge-queue.js +69 -0
- package/dist/core/git/git-worktree-patch-envelope.js +8 -1
- package/dist/core/hooks-runtime.js +4 -0
- package/dist/core/init.js +3 -2
- package/dist/core/naruto/naruto-active-pool.js +35 -2
- package/dist/core/naruto/naruto-allocation-policy.js +99 -0
- package/dist/core/naruto/naruto-concurrency-governor.js +1 -1
- package/dist/core/naruto/naruto-real-worker-child.js +134 -0
- package/dist/core/naruto/naruto-real-worker-runtime.js +121 -0
- package/dist/core/naruto/naruto-rebalance-policy.js +36 -0
- package/dist/core/naruto/naruto-task-hints.js +71 -0
- package/dist/core/pipeline/finalize-pipeline-result.js +3 -1
- package/dist/core/pipeline/gpt-final-required.js +22 -2
- package/dist/core/version.js +1 -1
- package/dist/core/zellij/zellij-right-column-manager.js +111 -9
- package/dist/core/zellij/zellij-slot-column-anchor.js +59 -0
- package/dist/core/zellij/zellij-slot-pane-renderer.js +82 -0
- package/dist/core/zellij/zellij-ui-mode.js +16 -0
- package/dist/core/zellij/zellij-worker-pane-manager.js +104 -13
- package/dist/scripts/agent-role-config-repair-check.js +33 -0
- package/dist/scripts/git-worktree-checkpoint-check.js +20 -0
- package/dist/scripts/git-worktree-cross-rebase-check.js +27 -0
- package/dist/scripts/git-worktree-integration-primary-check.js +4 -2
- package/dist/scripts/git-worktree-integration-primary-runtime-check.js +20 -0
- package/dist/scripts/mutation-callsite-coverage-check.js +2 -1
- package/dist/scripts/naruto-actual-worker-control-plane-check.js +29 -0
- package/dist/scripts/naruto-allocation-policy-check.js +33 -0
- package/dist/scripts/naruto-extreme-parallelism-check.js +1 -1
- package/dist/scripts/naruto-extreme-parallelism-real-check.js +43 -0
- package/dist/scripts/naruto-orchestrator-runtime-source-check.js +11 -0
- package/dist/scripts/naruto-real-active-pool-check.js +3 -2
- package/dist/scripts/naruto-real-active-pool-runtime-check.js +55 -0
- package/dist/scripts/naruto-rebalance-policy-check.js +28 -0
- package/dist/scripts/naruto-shadow-clone-swarm-check.js +7 -3
- package/dist/scripts/naruto-zellij-dynamic-right-column-check.js +29 -2
- package/dist/scripts/readme-architecture-imagegen-official-check.js +4 -3
- package/dist/scripts/release-check-dynamic-execute.js +27 -1
- package/dist/scripts/release-check-dynamic.js +38 -11
- package/dist/scripts/release-check-stamp.js +7 -2
- package/dist/scripts/release-dag-full-coverage-check.js +15 -1
- package/dist/scripts/release-dynamic-performance-check.js +31 -1
- package/dist/scripts/release-gate-existence-audit.js +29 -33
- package/dist/scripts/release-readiness-report.js +14 -3
- package/dist/scripts/zellij-first-slot-down-stack-check.js +20 -0
- package/dist/scripts/zellij-first-slot-down-stack-real-check.js +16 -0
- package/dist/scripts/zellij-right-column-geometry-proof.js +155 -22
- package/dist/scripts/zellij-right-column-headless-overflow-check.js +22 -0
- package/dist/scripts/zellij-right-column-manager-check.js +9 -4
- package/dist/scripts/zellij-slot-column-anchor-check.js +24 -0
- package/dist/scripts/zellij-slot-only-ui-check.js +24 -0
- package/dist/scripts/zellij-slot-pane-renderer-check.js +38 -0
- package/dist/scripts/zellij-worker-pane-manager-single-owner-check.js +11 -4
- package/package.json +22 -5
|
@@ -1,29 +1,162 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// @ts-nocheck
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
3
5
|
import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
{ pane_id: 'w1', role: 'worker', geometry: { x: 121, y: 11, width: 80, height: 15 }, name: 'slot-001/gen-1' },
|
|
8
|
-
{ pane_id: 'w2', role: 'worker', geometry: { x: 121, y: 27, width: 80, height: 15 }, name: 'slot-002/gen-1' }
|
|
9
|
-
];
|
|
10
|
-
const main = panes[0];
|
|
11
|
-
const workers = panes.filter((pane) => pane.role === 'worker');
|
|
12
|
-
const sameRightX = workers.every((pane) => Math.abs(pane.geometry.x - workers[0].geometry.x) <= 2);
|
|
13
|
-
const rightOfMain = workers.every((pane) => pane.geometry.x >= main.geometry.x + main.geometry.width - 2);
|
|
14
|
-
const increasingY = workers.every((pane, index) => index === 0 || pane.geometry.y > workers[index - 1].geometry.y);
|
|
15
|
-
const capOk = workers.length <= 8;
|
|
6
|
+
import { writeTextAtomic } from '../core/fsx.js';
|
|
7
|
+
import { checkZellijCapability } from '../core/zellij/zellij-capability.js';
|
|
8
|
+
import { runZellij } from '../core/zellij/zellij-command.js';
|
|
16
9
|
const requireReal = process.argv.includes('--require-real') || process.env.SKS_REQUIRE_ZELLIJ === '1';
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
ok: sameRightX && rightOfMain && increasingY && capOk,
|
|
20
|
-
synthetic: !requireReal,
|
|
21
|
-
same_right_x: sameRightX,
|
|
22
|
-
right_of_main: rightOfMain,
|
|
23
|
-
increasing_y: increasingY,
|
|
24
|
-
visible_cap_ok: capOk,
|
|
25
|
-
panes
|
|
26
|
-
};
|
|
10
|
+
const visiblePaneCap = Number(process.env.SKS_ZELLIJ_GEOMETRY_VISIBLE_CAP || 8);
|
|
11
|
+
const report = requireReal ? await realGeometryProof() : syntheticGeometryProof();
|
|
27
12
|
assertGate(report.ok, 'right-column geometry proof failed', report);
|
|
28
13
|
emitGate('zellij:right-column-geometry-proof', report);
|
|
14
|
+
function syntheticGeometryProof() {
|
|
15
|
+
const panes = [
|
|
16
|
+
{ pane_id: 'main', role: 'main', geometry: { x: 0, y: 0, width: 120, height: 60 }, name: 'orchestrator' },
|
|
17
|
+
{ pane_id: 'w1', role: 'worker', geometry: { x: 121, y: 0, width: 80, height: 15 }, name: 'slot-001' },
|
|
18
|
+
{ pane_id: 'w2', role: 'worker', geometry: { x: 121, y: 16, width: 80, height: 15 }, name: 'slot-002' }
|
|
19
|
+
];
|
|
20
|
+
return buildReport({ synthetic: true, panes, commands: [], listPanes: null, dumpScreen: null, blockers: [] });
|
|
21
|
+
}
|
|
22
|
+
async function realGeometryProof() {
|
|
23
|
+
const root = process.cwd();
|
|
24
|
+
const capability = await checkZellijCapability({ root, require: true, writeReport: false });
|
|
25
|
+
const sessionName = `sks-geom-${process.pid}-${Date.now()}`;
|
|
26
|
+
const tmpDir = await fsTempDir();
|
|
27
|
+
const layoutPath = path.join(tmpDir, 'layout.kdl');
|
|
28
|
+
const commands = [];
|
|
29
|
+
let listPanes = null;
|
|
30
|
+
let dumpScreen = null;
|
|
31
|
+
const blockers = [...(capability.blockers || [])];
|
|
32
|
+
try {
|
|
33
|
+
await writeTextAtomic(layoutPath, buildRealGeometryLayout(root));
|
|
34
|
+
await runZellij(['kill-session', sessionName], { cwd: root, timeoutMs: 2500, optional: true });
|
|
35
|
+
const launch = await runZellij(['attach', '--create-background', sessionName, 'options', '--default-layout', layoutPath], { cwd: root, timeoutMs: 5000, optional: false });
|
|
36
|
+
commands.push(launch);
|
|
37
|
+
if (!launch.ok)
|
|
38
|
+
blockers.push(...launch.blockers.map((blocker) => `zellij_geometry_launch_${blocker}`));
|
|
39
|
+
await sleep(1000);
|
|
40
|
+
listPanes = await runZellij(['--session', sessionName, 'action', 'list-panes', '--json', '--all'], { cwd: root, timeoutMs: 5000, optional: false });
|
|
41
|
+
commands.push(listPanes);
|
|
42
|
+
if (!listPanes.ok)
|
|
43
|
+
blockers.push(...listPanes.blockers.map((blocker) => `zellij_geometry_list_panes_${blocker}`));
|
|
44
|
+
dumpScreen = await runZellij(['--session', sessionName, 'action', 'dump-screen'], { cwd: root, timeoutMs: 5000, optional: false });
|
|
45
|
+
commands.push(dumpScreen);
|
|
46
|
+
if (!dumpScreen.ok)
|
|
47
|
+
blockers.push(...dumpScreen.blockers.map((blocker) => `zellij_geometry_dump_screen_${blocker}`));
|
|
48
|
+
const panes = parseRealPanes(listPanes.stdout_tail);
|
|
49
|
+
return buildReport({ synthetic: false, panes, commands, listPanes, dumpScreen, blockers });
|
|
50
|
+
}
|
|
51
|
+
finally {
|
|
52
|
+
commands.push(await runZellij(['kill-session', sessionName], { cwd: root, timeoutMs: 5000, optional: true }).catch((err) => ({
|
|
53
|
+
ok: false,
|
|
54
|
+
command: 'zellij',
|
|
55
|
+
args: ['kill-session', sessionName],
|
|
56
|
+
blockers: [`zellij_geometry_cleanup_exception:${err?.message || String(err)}`],
|
|
57
|
+
warnings: []
|
|
58
|
+
})));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function buildReport(input) {
|
|
62
|
+
const main = input.panes.find((pane) => pane.role === 'main') || null;
|
|
63
|
+
const workers = input.panes.filter((pane) => pane.role === 'worker');
|
|
64
|
+
const sameRightX = workers.length > 0 && workers.every((pane) => Math.abs(Number(pane.geometry.x) - Number(workers[0].geometry.x)) <= 2);
|
|
65
|
+
const rightOfMain = Boolean(main) && workers.length > 0 && workers.every((pane) => Number(pane.geometry.x) >= Number(main.geometry.x) + Number(main.geometry.width) - 2);
|
|
66
|
+
const increasingY = workers.every((pane, index) => index === 0 || Number(pane.geometry.y) > Number(workers[index - 1].geometry.y));
|
|
67
|
+
const capOk = workers.length <= visiblePaneCap;
|
|
68
|
+
const realEvidenceOk = input.synthetic || (input.listPanes?.ok === true && input.dumpScreen?.ok === true && workers.length >= 2);
|
|
69
|
+
const blockers = [
|
|
70
|
+
...input.blockers,
|
|
71
|
+
...(main ? [] : ['zellij_geometry_main_missing']),
|
|
72
|
+
...(workers.length >= 2 ? [] : ['zellij_geometry_workers_missing']),
|
|
73
|
+
...(sameRightX ? [] : ['zellij_geometry_worker_x_mismatch']),
|
|
74
|
+
...(rightOfMain ? [] : ['zellij_geometry_workers_not_right_of_main']),
|
|
75
|
+
...(increasingY ? [] : ['zellij_geometry_workers_not_stacked_down']),
|
|
76
|
+
...(capOk ? [] : ['zellij_geometry_visible_cap_exceeded']),
|
|
77
|
+
...(realEvidenceOk ? [] : ['zellij_geometry_real_evidence_missing'])
|
|
78
|
+
];
|
|
79
|
+
return {
|
|
80
|
+
schema: 'sks.zellij-right-column-geometry-proof.v1',
|
|
81
|
+
ok: blockers.length === 0,
|
|
82
|
+
gate: 'zellij:right-column-geometry-proof',
|
|
83
|
+
synthetic: input.synthetic,
|
|
84
|
+
same_right_x: sameRightX,
|
|
85
|
+
right_of_main: rightOfMain,
|
|
86
|
+
increasing_y: increasingY,
|
|
87
|
+
visible_cap_ok: capOk,
|
|
88
|
+
real_list_panes_json_observed: input.synthetic ? false : input.listPanes?.ok === true,
|
|
89
|
+
real_dump_screen_observed: input.synthetic ? false : input.dumpScreen?.ok === true,
|
|
90
|
+
panes: input.panes,
|
|
91
|
+
command_count: input.commands.length,
|
|
92
|
+
command_blockers: input.commands.flatMap((row) => row?.blockers || []),
|
|
93
|
+
blockers
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function parseRealPanes(text) {
|
|
97
|
+
let rows = [];
|
|
98
|
+
try {
|
|
99
|
+
const parsed = JSON.parse(String(text || '[]'));
|
|
100
|
+
rows = Array.isArray(parsed) ? parsed : Array.isArray(parsed?.panes) ? parsed.panes : [];
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
rows = [];
|
|
104
|
+
}
|
|
105
|
+
return rows
|
|
106
|
+
.filter((row) => row && row.is_plugin !== true && row.exited !== true)
|
|
107
|
+
.map((row) => {
|
|
108
|
+
const title = String(row.title || row.name || row.pane_name || '');
|
|
109
|
+
return {
|
|
110
|
+
pane_id: String(row.pane_id ?? row.paneId ?? row.id ?? title),
|
|
111
|
+
role: /^slot-\d+/i.test(title) ? 'worker' : title === 'orchestrator' ? 'main' : 'unknown',
|
|
112
|
+
geometry: {
|
|
113
|
+
x: Number(row.pane_x ?? row.x ?? 0),
|
|
114
|
+
y: Number(row.pane_y ?? row.y ?? 0),
|
|
115
|
+
width: Number(row.pane_columns ?? row.width ?? 0),
|
|
116
|
+
height: Number(row.pane_rows ?? row.height ?? 0)
|
|
117
|
+
},
|
|
118
|
+
name: title,
|
|
119
|
+
pane_command: row.pane_command || row.terminal_command || null
|
|
120
|
+
};
|
|
121
|
+
})
|
|
122
|
+
.filter((row) => row.role === 'main' || row.role === 'worker')
|
|
123
|
+
.sort((a, b) => a.role === b.role ? a.geometry.y - b.geometry.y : a.role === 'main' ? -1 : 1);
|
|
124
|
+
}
|
|
125
|
+
function buildRealGeometryLayout(cwd) {
|
|
126
|
+
const hold = 'sleep 30';
|
|
127
|
+
return [
|
|
128
|
+
'layout {',
|
|
129
|
+
' default_tab_template {',
|
|
130
|
+
' pane size=1 borderless=true {',
|
|
131
|
+
' plugin location="zellij:tab-bar"',
|
|
132
|
+
' }',
|
|
133
|
+
' children',
|
|
134
|
+
' pane size=2 borderless=true {',
|
|
135
|
+
' plugin location="zellij:status-bar"',
|
|
136
|
+
' }',
|
|
137
|
+
' }',
|
|
138
|
+
` tab name="SKS geometry proof" cwd=${JSON.stringify(cwd)} split_direction="vertical" {`,
|
|
139
|
+
' pane name="orchestrator" command="sh" {',
|
|
140
|
+
` args "-lc" ${JSON.stringify(hold)}`,
|
|
141
|
+
' }',
|
|
142
|
+
' pane name="slot-column" split_direction="horizontal" {',
|
|
143
|
+
' pane name="slot-001" command="sh" {',
|
|
144
|
+
` args "-lc" ${JSON.stringify(hold)}`,
|
|
145
|
+
' }',
|
|
146
|
+
' pane name="slot-002" command="sh" {',
|
|
147
|
+
` args "-lc" ${JSON.stringify(hold)}`,
|
|
148
|
+
' }',
|
|
149
|
+
' }',
|
|
150
|
+
' }',
|
|
151
|
+
'}',
|
|
152
|
+
''
|
|
153
|
+
].join('\n');
|
|
154
|
+
}
|
|
155
|
+
async function fsTempDir() {
|
|
156
|
+
const fs = await import('node:fs/promises');
|
|
157
|
+
return fs.mkdtemp(path.join(os.tmpdir(), 'sks-zellij-geometry-'));
|
|
158
|
+
}
|
|
159
|
+
function sleep(ms) {
|
|
160
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
161
|
+
}
|
|
29
162
|
//# sourceMappingURL=zellij-right-column-geometry-proof.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { assertGate, emitGate, root } from './sks-1-18-gate-lib.js';
|
|
6
|
+
const worker = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-worker-pane-manager.ts'), 'utf8');
|
|
7
|
+
const manager = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-right-column-manager.ts'), 'utf8');
|
|
8
|
+
const swarm = fs.readFileSync(path.join(root, 'src/core/agents/native-cli-session-swarm.ts'), 'utf8');
|
|
9
|
+
const headlessReturnIndex = worker.indexOf("rightColumn?.placement === 'headless'");
|
|
10
|
+
const newPaneIndex = worker.indexOf("action', 'new-pane'");
|
|
11
|
+
const report = {
|
|
12
|
+
schema: 'sks.zellij-right-column-headless-overflow-check.v1',
|
|
13
|
+
headless_source: worker.includes("'zellij_worker_headless_overflow'"),
|
|
14
|
+
headless_scaling_primitive: worker.includes('native_cli_process_headless_with_slot_dashboard'),
|
|
15
|
+
returns_before_new_pane: headlessReturnIndex >= 0 && newPaneIndex >= 0 && headlessReturnIndex < newPaneIndex,
|
|
16
|
+
manager_records_overflow: manager.includes('worker_headless_overflow') && manager.includes('visible_pane_cap'),
|
|
17
|
+
swarm_records_overflow: swarm.includes('recordHeadlessWorkerInRightColumn')
|
|
18
|
+
};
|
|
19
|
+
const ok = report.headless_source && report.headless_scaling_primitive && report.returns_before_new_pane && report.manager_records_overflow && report.swarm_records_overflow;
|
|
20
|
+
assertGate(ok, 'headless overflow must not call zellij action new-pane', report);
|
|
21
|
+
emitGate('zellij:right-column-headless-overflow', report);
|
|
22
|
+
//# sourceMappingURL=zellij-right-column-headless-overflow-check.js.map
|
|
@@ -11,12 +11,17 @@ const report = {
|
|
|
11
11
|
ok: true,
|
|
12
12
|
exports: ['ensureRightColumn', 'prepareWorkerInRightColumn', 'recordWorkerPaneInRightColumn', 'recordHeadlessWorkerInRightColumn', 'closeWorkerInRightColumn'].every((name) => source.includes(`function ${name}`)),
|
|
13
13
|
dashboard_after_worker_reservation: source.includes('right_column_creating') && source.includes('scheduler_slot_reserved'),
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
dashboard_opt_in: source.includes('zellijUiModeCreatesDashboard') && source.includes('dashboard_created: false'),
|
|
15
|
+
slot_column_anchor_right: worker.includes('buildZellijSlotColumnAnchorCommand') && worker.includes("'--direction', 'right', '--name', 'SLOTS'"),
|
|
16
|
+
worker_direction_stack: worker.includes("'--direction', directionRequested")
|
|
17
|
+
&& worker.includes("const directionRequested: 'right' | 'down' = rightColumn ? 'down' : 'right'")
|
|
18
|
+
&& worker.includes("'--near-current-pane'")
|
|
19
|
+
&& worker.includes('worker_direction_requested')
|
|
20
|
+
&& worker.includes('slot_column_anchor_pane_id'),
|
|
16
21
|
headless_overflow: source.includes('worker_headless_overflow') && source.includes('visible_pane_cap'),
|
|
17
22
|
schema_exists: schemaExists
|
|
18
23
|
};
|
|
19
|
-
report.ok = report.exports && report.dashboard_after_worker_reservation && report.
|
|
20
|
-
assertGate(report.ok, 'right-column manager must own dashboard,
|
|
24
|
+
report.ok = report.exports && report.dashboard_after_worker_reservation && report.dashboard_opt_in && report.slot_column_anchor_right && report.worker_direction_stack && report.headless_overflow && report.schema_exists;
|
|
25
|
+
assertGate(report.ok, 'right-column manager must own opt-in dashboard, stacked workers, headless overflow, and state schema', report);
|
|
21
26
|
emitGate('zellij:right-column-manager', report);
|
|
22
27
|
//# sourceMappingURL=zellij-right-column-manager-check.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
|
|
3
|
+
import { buildZellijSlotColumnAnchorCommand, renderZellijSlotColumnAnchor } from '../core/zellij/zellij-slot-column-anchor.js';
|
|
4
|
+
const rendered = renderZellijSlotColumnAnchor({
|
|
5
|
+
activeWorkers: 3,
|
|
6
|
+
visiblePaneCap: 8,
|
|
7
|
+
headlessWorkers: 12,
|
|
8
|
+
queueDepth: 44,
|
|
9
|
+
mode: 'compact-slots'
|
|
10
|
+
});
|
|
11
|
+
const command = buildZellijSlotColumnAnchorCommand({
|
|
12
|
+
nodePath: '/usr/bin/node',
|
|
13
|
+
cliPath: '/repo/dist/bin/sks.js',
|
|
14
|
+
missionId: 'M-check',
|
|
15
|
+
mode: 'compact-slots',
|
|
16
|
+
artifactRoot: '/repo/.sneakoscope/missions/M-check/agents',
|
|
17
|
+
watch: true
|
|
18
|
+
});
|
|
19
|
+
const ok = rendered === 'SLOTS active 3/8 · headless 12 · q 44'
|
|
20
|
+
&& command.includes('zellij-slot-column-anchor')
|
|
21
|
+
&& command.includes('--watch');
|
|
22
|
+
assertGate(ok, 'Zellij slot-column anchor must render one compact SLOTS line and build the CLI command', { rendered, command });
|
|
23
|
+
emitGate('zellij:slot-column-anchor', { rendered, command });
|
|
24
|
+
//# sourceMappingURL=zellij-slot-column-anchor-check.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { assertGate, emitGate, root } from './sks-1-18-gate-lib.js';
|
|
6
|
+
const uiMode = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-ui-mode.ts'), 'utf8');
|
|
7
|
+
const manager = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-right-column-manager.ts'), 'utf8');
|
|
8
|
+
const worker = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-worker-pane-manager.ts'), 'utf8');
|
|
9
|
+
const swarm = fs.readFileSync(path.join(root, 'src/core/agents/native-cli-session-swarm.ts'), 'utf8');
|
|
10
|
+
const report = {
|
|
11
|
+
schema: 'sks.zellij-slot-only-ui-check.v1',
|
|
12
|
+
default_compact_slots: uiMode.includes("return 'compact-slots'"),
|
|
13
|
+
state_records_ui_mode: manager.includes('ui_mode: uiMode'),
|
|
14
|
+
compact_skips_dashboard: manager.includes('if (!createDashboard)') && manager.includes('dashboard_created: false'),
|
|
15
|
+
first_slot_creates_slot_anchor_right: worker.includes('buildZellijSlotColumnAnchorCommand') && worker.includes("'--direction', 'right', '--name', 'SLOTS'"),
|
|
16
|
+
workers_stack_down_from_anchor: worker.includes("const directionRequested: 'right' | 'down' = rightColumn ? 'down' : 'right'")
|
|
17
|
+
&& worker.includes("directionRequested === 'down' ? ['--near-current-pane'] : []")
|
|
18
|
+
&& worker.includes('slot_column_anchor_pane_id'),
|
|
19
|
+
compact_uses_renderer: swarm.includes('buildZellijSlotPaneCommand') && swarm.includes("slot_visualization = uiMode === 'full-debug' ? 'worker-command-pane' : 'zellij-slot-pane-renderer'")
|
|
20
|
+
};
|
|
21
|
+
const ok = Object.values(report).every((value) => value === true || typeof value === 'string');
|
|
22
|
+
assertGate(ok, 'Zellij default UI must be compact slot-only with opt-in dashboard', report);
|
|
23
|
+
emitGate('zellij:slot-only-ui', report);
|
|
24
|
+
//# sourceMappingURL=zellij-slot-only-ui-check.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
|
|
4
|
+
const renderer = await importDist('core/zellij/zellij-slot-pane-renderer.js');
|
|
5
|
+
const text = renderer.renderZellijSlotPane({
|
|
6
|
+
slotId: 'slot-003',
|
|
7
|
+
generationIndex: 2,
|
|
8
|
+
role: 'implementer',
|
|
9
|
+
backend: 'local-llm',
|
|
10
|
+
status: 'coding',
|
|
11
|
+
currentFile: 'src/core/foo.ts',
|
|
12
|
+
patchStatus: 'candidate',
|
|
13
|
+
verifyStatus: 'queued',
|
|
14
|
+
heartbeatAgeMs: 2000,
|
|
15
|
+
worktreeId: 'WT-0007',
|
|
16
|
+
mode: 'compact-slots'
|
|
17
|
+
});
|
|
18
|
+
const lines = text.split(/\n/);
|
|
19
|
+
const command = renderer.buildZellijSlotPaneCommand({
|
|
20
|
+
cliPath: '/repo/dist/bin/sks.js',
|
|
21
|
+
missionId: 'M-test',
|
|
22
|
+
slotId: 'slot-003',
|
|
23
|
+
generationIndex: 2,
|
|
24
|
+
artifactDir: '/tmp/worker',
|
|
25
|
+
watch: true
|
|
26
|
+
});
|
|
27
|
+
const report = {
|
|
28
|
+
schema: 'sks.zellij-slot-pane-renderer-check.v1',
|
|
29
|
+
line_count: lines.length,
|
|
30
|
+
max_compact_lines: 5,
|
|
31
|
+
contains_slot: /slot-003 gen-2/.test(text),
|
|
32
|
+
contains_status: /status: coding/.test(text),
|
|
33
|
+
command_uses_slot_pane: command.includes('zellij-slot-pane') && command.includes('--watch'),
|
|
34
|
+
snapshot: text
|
|
35
|
+
};
|
|
36
|
+
assertGate(lines.length <= 5 && report.contains_slot && report.contains_status && report.command_uses_slot_pane, 'compact slot pane renderer must stay within five lines', report);
|
|
37
|
+
emitGate('zellij:compact-slot-renderer', report);
|
|
38
|
+
//# sourceMappingURL=zellij-slot-pane-renderer-check.js.map
|
|
@@ -12,8 +12,13 @@ const managerOwnsNewPane = /runZellij\(\[[\s\S]{0,800}'new-pane'/.test(manager)
|
|
|
12
12
|
const nativeDirectNewPane = /runZellij\(\[[\s\S]{0,500}'new-pane'/.test(native);
|
|
13
13
|
const nativeUsesManager = native.includes('openWorkerPane({') && native.includes('closeWorkerPane({');
|
|
14
14
|
const dynamicDirection = manager.includes("'--direction', directionRequested") && manager.includes("'--near-current-pane'");
|
|
15
|
-
const fallbackRecorded = manager.includes(
|
|
16
|
-
|
|
15
|
+
const fallbackRecorded = manager.includes('worker_direction_applied')
|
|
16
|
+
&& manager.includes("directionApplied = rightColumn ? 'down' : 'unknown'")
|
|
17
|
+
&& manager.includes("directionApplied === 'down' ? 'down' : directionApplied === 'unknown' ? 'unknown' : 'not_applied'");
|
|
18
|
+
const slotAnchorOwned = manager.includes('buildZellijSlotColumnAnchorCommand')
|
|
19
|
+
&& manager.includes("recordSlotColumnAnchorInRightColumn")
|
|
20
|
+
&& manager.includes("'--direction', 'right', '--name', 'SLOTS'");
|
|
21
|
+
const ok = managerOwnsNewPane && !nativeDirectNewPane && nativeUsesManager && dynamicDirection && fallbackRecorded && slotAnchorOwned;
|
|
17
22
|
emit({
|
|
18
23
|
schema: 'sks.zellij-worker-pane-manager-single-owner-check.v1',
|
|
19
24
|
ok,
|
|
@@ -22,14 +27,16 @@ emit({
|
|
|
22
27
|
native_direct_new_pane_absent: !nativeDirectNewPane,
|
|
23
28
|
native_uses_manager: nativeUsesManager,
|
|
24
29
|
dynamic_direction_requested: dynamicDirection,
|
|
25
|
-
fallback_recorded: fallbackRecorded
|
|
30
|
+
fallback_recorded: fallbackRecorded,
|
|
31
|
+
slot_anchor_owned: slotAnchorOwned
|
|
26
32
|
},
|
|
27
33
|
blockers: ok ? [] : [
|
|
28
34
|
...(!managerOwnsNewPane ? ['worker_pane_manager_new_pane_missing'] : []),
|
|
29
35
|
...(nativeDirectNewPane ? ['native_cli_session_swarm_direct_new_pane'] : []),
|
|
30
36
|
...(!nativeUsesManager ? ['native_cli_session_swarm_not_using_worker_pane_manager'] : []),
|
|
31
37
|
...(!dynamicDirection ? ['zellij_worker_dynamic_direction_missing'] : []),
|
|
32
|
-
...(!fallbackRecorded ? ['zellij_worker_direction_fallback_not_recorded'] : [])
|
|
38
|
+
...(!fallbackRecorded ? ['zellij_worker_direction_fallback_not_recorded'] : []),
|
|
39
|
+
...(!slotAnchorOwned ? ['zellij_worker_slot_column_anchor_not_owned'] : [])
|
|
33
40
|
]
|
|
34
41
|
});
|
|
35
42
|
function emit(report) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sneakoscope",
|
|
3
3
|
"displayName": "ㅅㅋㅅ",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.11",
|
|
5
5
|
"description": "Sneakoscope Codex: fast proof-first Codex trust layer with image-based Voxel TriWiki.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",
|
|
@@ -149,12 +149,12 @@
|
|
|
149
149
|
"all-features:execute-fixtures": "node ./dist/bin/sks.js all-features selftest --mock --execute-fixtures --strict-artifacts --json",
|
|
150
150
|
"feature-fixtures:strict": "node ./dist/bin/sks.js all-features selftest --mock --execute-fixtures --strict-artifacts --hermetic --json",
|
|
151
151
|
"trust:check": "node ./dist/bin/sks.js trust validate latest --json || node ./dist/scripts/trust-fixture-check.js",
|
|
152
|
-
"wrongness:fixtures": "node --test
|
|
152
|
+
"wrongness:fixtures": "node --test test/wrongness/*.test.mjs",
|
|
153
153
|
"wrongness:check": "node ./dist/bin/sks.js wrongness validate project --json && node ./dist/scripts/wrongness-fixture-check.js",
|
|
154
154
|
"git-hygiene:check": "node ./dist/bin/sks.js git doctor --json",
|
|
155
155
|
"git-precommit:fixture": "node ./dist/scripts/git-precommit-fixture-check.js",
|
|
156
156
|
"shared-memory:check": "node ./dist/bin/sks.js wiki validate-shared --json || node ./dist/scripts/shared-memory-fixture-check.js",
|
|
157
|
-
"git-collaboration:e2e": "node --test
|
|
157
|
+
"git-collaboration:e2e": "node --test test/e2e/git-*.test.mjs test/e2e/shared-triwiki-merge.test.mjs test/e2e/wrongness-shared-sync.test.mjs",
|
|
158
158
|
"evidence:check": "node ./dist/scripts/evidence-fixture-check.js",
|
|
159
159
|
"safety:check": "node ./dist/scripts/safety-check.js",
|
|
160
160
|
"chaos:check": "node --test \"test/chaos/**/*.test.mjs\"",
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
"ultra-router:auto-router": "node ./dist/scripts/ultra-router-auto-router-check.js",
|
|
314
314
|
"coverage": "node --experimental-test-coverage --test \"test/**/*.test.mjs\"",
|
|
315
315
|
"release:check": "npm run build --silent && node ./dist/scripts/release-gate-dag-runner.js --preset release && node ./dist/scripts/release-check-stamp.js write",
|
|
316
|
-
"release:real-check": "node ./dist/scripts/release-real-check.js && SKS_REQUIRE_ZELLIJ=1 npm run zellij:right-column-geometry
|
|
316
|
+
"release:real-check": "node ./dist/scripts/release-real-check.js && SKS_REQUIRE_ZELLIJ=1 npm run zellij:first-slot-down-stack:real -- --require-real && SKS_REQUIRE_ZELLIJ=1 npm run zellij:right-column-real-geometry -- --require-real && SKS_REQUIRE_ZELLIJ=1 npm run naruto:zellij-dynamic-right-column -- --require-real && SKS_REQUIRE_GIT_WORKTREE=1 npm run naruto:worktree-coding:blackbox -- --require-real && npm run codex-control:real-smoke -- --require-real && npm run codex-sdk:real-smoke -- --require-real && SKS_REQUIRE_LOCAL_LLM=1 npm run local-llm:smoke && SKS_REQUIRE_LOCAL_LLM=1 npm run local-llm:throughput && SKS_REQUIRE_LOCAL_LLM=1 npm run local-llm:cache-performance && SKS_REQUIRE_PYTHON_CODEX_SDK=1 npm run python-sdk:real-smoke && SKS_REQUIRE_CODEX_0137=1 npm run codex:0.137-compat:require-real && npm run zellij:real-session-launch -- --require-real --main-only --mission M-release-real-zellij-extra --session sks-rrz-extra && npm run zellij:pane-proof -- --require-real --mission M-release-real-zellij-extra --session sks-rrz-extra --expected-lanes 0 && npm run zellij:screen-proof -- --require-real --main-only --mission M-release-real-zellij-extra && npm run zellij:real-session-cleanup -- --mission M-release-real-zellij-extra --session sks-rrz-extra && npm run agent:real-codex-in-zellij-worker-pane -- --require-real && SKS_REQUIRE_LOCAL_LLM=1 SKS_REQUIRE_GPT_FINAL=1 npm run naruto:real-local-gpt-final-smoke && SKS_REQUIRE_LOCAL_LLM=1 SKS_REQUIRE_GPT_FINAL=1 npm run local-collab:gpt-final-performance && SKS_REQUIRE_ZELLIJ=1 npm run zellij:worker-pane-real-ui:blackbox -- --require-real",
|
|
317
317
|
"release:publish": "npm run publish:npm",
|
|
318
318
|
"publish:dry": "npm run release:metadata && npm run release:version-truth && npm run publish:packlist-performance && npm run prepublish:release-check-or-fast && node ./dist/scripts/check-publish-tag.js && node ./dist/scripts/release-check-stamp.js verify && npm run release:provenance -- --publish && npm run release:dist-freshness && node ./dist/scripts/release-registry-check.js --require-unpublished && npm --cache /tmp/sks-npm-cache publish --dry-run --ignore-scripts --registry https://registry.npmjs.org/ --access public",
|
|
319
319
|
"publish:npm": "npm --cache /tmp/sks-npm-cache publish --registry https://registry.npmjs.org/ --access public",
|
|
@@ -453,11 +453,13 @@
|
|
|
453
453
|
"agent:strategy-to-patch-strict": "node ./dist/scripts/agent-strategy-to-patch-strict-check.js",
|
|
454
454
|
"agent:rollback-command": "node ./dist/scripts/agent-rollback-command-check.js",
|
|
455
455
|
"agent:native-cli-session-swarm": "node ./dist/scripts/agent-native-cli-session-swarm-check.js",
|
|
456
|
-
"release:worktree-gates": "npm run git:worktree-capability && npm run git:worktree-manager && npm run git:worktree-diff-export && npm run git:worktree-merge-queue && npm run git:worktree-cleanup && npm run git:worktree-cache-performance && npm run git:worktree-pool-performance && npm run naruto:worktree-coding && npm run naruto:worktree-zellij-ui && npm run naruto:worktree-gpt-final",
|
|
456
|
+
"release:worktree-gates": "npm run git:worktree-capability && npm run git:worktree-manager && npm run git:worktree-diff-export && npm run git:worktree-merge-queue && npm run git:worktree-checkpoint && npm run git:worktree-cross-rebase && npm run git:worktree-cleanup && npm run git:worktree-cache-performance && npm run git:worktree-pool-performance && npm run naruto:worktree-coding && npm run naruto:worktree-zellij-ui && npm run naruto:worktree-gpt-final",
|
|
457
457
|
"git:worktree-capability": "node ./dist/scripts/git-worktree-capability-check.js",
|
|
458
458
|
"git:worktree-manager": "node ./dist/scripts/git-worktree-manager-check.js",
|
|
459
459
|
"git:worktree-diff-export": "node ./dist/scripts/git-worktree-diff-export-check.js",
|
|
460
460
|
"git:worktree-merge-queue": "node ./dist/scripts/git-worktree-merge-queue-check.js",
|
|
461
|
+
"git:worktree-checkpoint": "node ./dist/scripts/git-worktree-checkpoint-check.js",
|
|
462
|
+
"git:worktree-cross-rebase": "node ./dist/scripts/git-worktree-cross-rebase-check.js",
|
|
461
463
|
"git:worktree-cleanup": "node ./dist/scripts/git-worktree-cleanup-check.js",
|
|
462
464
|
"git:worktree-cache-performance": "node ./dist/scripts/git-worktree-cache-performance-check.js",
|
|
463
465
|
"git:worktree-pool-performance": "node ./dist/scripts/git-worktree-pool-performance-check.js",
|
|
@@ -474,6 +476,10 @@
|
|
|
474
476
|
"naruto:worktree-coding": "node ./dist/scripts/naruto-worktree-coding-check.js",
|
|
475
477
|
"naruto:worktree-zellij-ui": "node ./dist/scripts/naruto-worktree-zellij-ui-check.js",
|
|
476
478
|
"naruto:worktree-gpt-final": "node ./dist/scripts/naruto-worktree-gpt-final-check.js",
|
|
479
|
+
"naruto:allocation-policy": "node ./dist/scripts/naruto-allocation-policy-check.js",
|
|
480
|
+
"naruto:rebalance-policy": "node ./dist/scripts/naruto-rebalance-policy-check.js",
|
|
481
|
+
"naruto:actual-worker-control-plane": "node ./dist/scripts/naruto-actual-worker-control-plane-check.js",
|
|
482
|
+
"naruto:orchestrator-runtime-source": "node ./dist/scripts/naruto-orchestrator-runtime-source-check.js",
|
|
477
483
|
"naruto:real-local-gpt-final-smoke": "node ./dist/scripts/naruto-real-local-gpt-final-smoke.js",
|
|
478
484
|
"prompt:placeholder-guard": "node ./dist/scripts/prompt-placeholder-guard-check.js",
|
|
479
485
|
"agent:native-cli-session-swarm-10": "node ./dist/scripts/agent-native-cli-session-swarm-10-check.js",
|
|
@@ -493,6 +499,9 @@
|
|
|
493
499
|
"mad-sks:fast-mode-propagation": "node ./dist/scripts/mad-sks-fast-mode-propagation-check.js",
|
|
494
500
|
"zellij:spawn-on-demand-layout": "node ./dist/scripts/zellij-spawn-on-demand-layout-check.js",
|
|
495
501
|
"zellij:worker-pane-manager": "node ./dist/scripts/zellij-worker-pane-manager-check.js",
|
|
502
|
+
"zellij:slot-column-anchor": "node ./dist/scripts/zellij-slot-column-anchor-check.js",
|
|
503
|
+
"zellij:first-slot-down-stack": "node ./dist/scripts/zellij-first-slot-down-stack-check.js",
|
|
504
|
+
"zellij:first-slot-down-stack:real": "node ./dist/scripts/zellij-first-slot-down-stack-real-check.js",
|
|
496
505
|
"zellij:worker-pane-manager-single-owner": "node ./dist/scripts/zellij-worker-pane-manager-single-owner-check.js",
|
|
497
506
|
"zellij:worker-pane-spawn-order": "node ./dist/scripts/zellij-worker-pane-spawn-order-check.js",
|
|
498
507
|
"agent:slot-pane-binding-proof": "node ./dist/scripts/agent-slot-pane-binding-proof-check.js",
|
|
@@ -521,12 +530,20 @@
|
|
|
521
530
|
"zellij:dashboard-pane": "node ./dist/scripts/zellij-dashboard-pane-check.js",
|
|
522
531
|
"zellij:initial-main-only-blackbox": "node ./dist/scripts/zellij-initial-main-only-blackbox.js",
|
|
523
532
|
"zellij:right-column-manager": "node ./dist/scripts/zellij-right-column-manager-check.js",
|
|
533
|
+
"zellij:slot-only-ui": "node ./dist/scripts/zellij-slot-only-ui-check.js",
|
|
534
|
+
"zellij:compact-slot-renderer": "node ./dist/scripts/zellij-slot-pane-renderer-check.js",
|
|
535
|
+
"zellij:right-column-headless-overflow": "node ./dist/scripts/zellij-right-column-headless-overflow-check.js",
|
|
524
536
|
"zellij:right-column-geometry-proof": "node ./dist/scripts/zellij-right-column-geometry-proof.js",
|
|
537
|
+
"zellij:right-column-real-geometry": "node ./dist/scripts/zellij-right-column-geometry-proof.js",
|
|
525
538
|
"zellij:dynamic-pane-lifecycle": "node ./dist/scripts/zellij-dynamic-pane-lifecycle-check.js",
|
|
526
539
|
"zellij:developer-controls": "node ./dist/scripts/zellij-developer-controls-check.js",
|
|
527
540
|
"naruto:real-active-pool": "node ./dist/scripts/naruto-real-active-pool-check.js",
|
|
541
|
+
"naruto:real-active-pool-runtime": "node ./dist/scripts/naruto-real-active-pool-runtime-check.js",
|
|
528
542
|
"naruto:extreme-parallelism": "node ./dist/scripts/naruto-extreme-parallelism-check.js",
|
|
543
|
+
"naruto:extreme-parallelism-real": "node ./dist/scripts/naruto-extreme-parallelism-real-check.js",
|
|
529
544
|
"naruto:zellij-dynamic-right-column": "node ./dist/scripts/naruto-zellij-dynamic-right-column-check.js",
|
|
545
|
+
"git:worktree-integration-primary-runtime": "node ./dist/scripts/git-worktree-integration-primary-runtime-check.js",
|
|
546
|
+
"agent:role-config-repair": "node ./dist/scripts/agent-role-config-repair-check.js",
|
|
530
547
|
"release:dag-full-coverage": "node ./dist/scripts/release-dag-full-coverage-check.js",
|
|
531
548
|
"release:cache-glob-hashing": "node ./dist/scripts/release-cache-glob-hashing-check.js"
|
|
532
549
|
},
|