sneakoscope 2.0.11 → 2.0.12

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.
Files changed (44) hide show
  1. package/README.md +5 -3
  2. package/crates/sks-core/Cargo.lock +1 -1
  3. package/crates/sks-core/Cargo.toml +1 -1
  4. package/crates/sks-core/src/main.rs +1 -1
  5. package/dist/.sks-build-stamp.json +4 -4
  6. package/dist/bin/sks.js +1 -1
  7. package/dist/build-manifest.json +11 -8
  8. package/dist/core/agents/agent-orchestrator.js +279 -1
  9. package/dist/core/agents/agent-scheduler.js +12 -1
  10. package/dist/core/agents/agent-slot-pane-binding-proof.js +3 -3
  11. package/dist/core/agents/agent-work-queue.js +26 -2
  12. package/dist/core/agents/agent-worker-pipeline.js +2 -0
  13. package/dist/core/agents/native-cli-session-swarm.js +2 -2
  14. package/dist/core/commands/naruto-command.js +104 -51
  15. package/dist/core/fsx.js +1 -1
  16. package/dist/core/git/git-worktree-merge-queue.js +34 -14
  17. package/dist/core/naruto/naruto-rebalance-policy.js +15 -3
  18. package/dist/core/naruto/naruto-work-graph.js +13 -0
  19. package/dist/core/version.js +1 -1
  20. package/dist/core/zellij/zellij-slot-column-anchor.js +163 -4
  21. package/dist/core/zellij/zellij-worker-pane-manager.js +13 -7
  22. package/dist/scripts/agent-real-codex-in-zellij-worker-pane-check.js +8 -2
  23. package/dist/scripts/agent-slot-pane-binding-proof-check.js +4 -4
  24. package/dist/scripts/codex-sdk-release-review-pipeline-check.js +2 -1
  25. package/dist/scripts/codex-sdk-zellij-pane-binding-check.js +2 -2
  26. package/dist/scripts/git-worktree-cross-rebase-check.js +13 -1
  27. package/dist/scripts/git-worktree-merge-queue-check.js +1 -0
  28. package/dist/scripts/local-collab-worktree-gpt-final-apply-policy-check.js +63 -0
  29. package/dist/scripts/naruto-actual-worker-control-plane-check.js +30 -3
  30. package/dist/scripts/naruto-allocation-runtime-wiring-check.js +92 -0
  31. package/dist/scripts/naruto-orchestrator-runtime-source-check.js +65 -6
  32. package/dist/scripts/naruto-rebalance-policy-check.js +15 -2
  33. package/dist/scripts/naruto-shadow-clone-swarm-check.js +1 -1
  34. package/dist/scripts/release-dag-full-coverage-check.js +4 -0
  35. package/dist/scripts/release-real-check.js +258 -77
  36. package/dist/scripts/zellij-first-slot-down-stack-check.js +1 -1
  37. package/dist/scripts/zellij-first-slot-down-stack-real-check.js +344 -4
  38. package/dist/scripts/zellij-right-column-manager-check.js +1 -1
  39. package/dist/scripts/zellij-slot-column-anchor-check.js +23 -2
  40. package/dist/scripts/zellij-slot-only-ui-check.js +3 -1
  41. package/dist/scripts/zellij-slot-renderer-proof-semantics-check.js +59 -0
  42. package/dist/scripts/zellij-worker-pane-manager-check.js +23 -1
  43. package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +21 -4
  44. package/package.json +5 -2
@@ -1,5 +1,12 @@
1
1
  #!/usr/bin/env node
2
+ import fs from 'node:fs/promises';
3
+ import os from 'node:os';
4
+ import path from 'node:path';
2
5
  import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
6
+ import { ensureDir, packageRoot, writeTextAtomic } from '../core/fsx.js';
7
+ import { checkZellijCapability } from '../core/zellij/zellij-capability.js';
8
+ import { runZellij } from '../core/zellij/zellij-command.js';
9
+ import { openWorkerPane } from '../core/zellij/zellij-worker-pane-manager.js';
3
10
  const required = process.env.SKS_REQUIRE_ZELLIJ === '1' || process.argv.includes('--require-real');
4
11
  if (!required) {
5
12
  emitGate('zellij:first-slot-down-stack:real', {
@@ -9,8 +16,341 @@ if (!required) {
9
16
  });
10
17
  process.exit(0);
11
18
  }
12
- assertGate(false, 'Real Zellij first-slot-down-stack verification requires an operator-run live Zellij session proof', {
13
- required,
14
- next: 'Run the release real-check on a host with Zellij available.'
15
- });
19
+ const report = await runRealFirstSlotDownStackProof();
20
+ assertGate(report.ok, 'Real Zellij first-slot-down-stack verification failed', report);
21
+ emitGate('zellij:first-slot-down-stack:real', report);
22
+ async function runRealFirstSlotDownStackProof() {
23
+ const root = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-zellij-first-slot-down-'));
24
+ const cwd = packageRoot();
25
+ const missionId = `M-zellij-first-slot-down-${process.pid}`;
26
+ const sessionName = `sks-first-slot-${process.pid}-${Date.now()}`;
27
+ const commands = [];
28
+ const blockers = [];
29
+ let record1 = null;
30
+ let record2 = null;
31
+ let listPanes = null;
32
+ let dumpScreen = null;
33
+ const dumpPath = path.join(root, 'zellij-dump-screen.txt');
34
+ try {
35
+ const capability = await checkZellijCapability({ root: cwd, require: true, writeReport: false });
36
+ blockers.push(...(capability.blockers || []).map((blocker) => `zellij_capability_${blocker}`));
37
+ const cleanupBefore = await runZellij(['kill-session', sessionName], { cwd, timeoutMs: 2500, optional: true });
38
+ commands.push(cleanupBefore);
39
+ const create = await runZellij(['attach', '--create-background', sessionName], { cwd, timeoutMs: 5000, optional: false });
40
+ commands.push(create);
41
+ if (!create.ok)
42
+ blockers.push(...create.blockers.map((blocker) => `zellij_create_${blocker}`));
43
+ await sleep(500);
44
+ const before = await runZellij(['--session', sessionName, 'action', 'list-panes', '--json', '--all'], { cwd, timeoutMs: 5000, optional: true });
45
+ commands.push(before);
46
+ const beforePanes = parsePaneRows(before.stdout_tail);
47
+ record1 = await openSlotRenderer(root, missionId, sessionName, 'slot-001', 1);
48
+ record2 = await openSlotRenderer(root, missionId, sessionName, 'slot-002', 1);
49
+ await sleep(750);
50
+ listPanes = await runZellij(['--session', sessionName, 'action', 'list-panes', '--json', '--all'], { cwd, timeoutMs: 5000, optional: false });
51
+ commands.push(listPanes);
52
+ if (!listPanes.ok)
53
+ blockers.push(...listPanes.blockers.map((blocker) => `zellij_list_panes_${blocker}`));
54
+ dumpScreen = await runZellij(['--session', sessionName, 'action', 'dump-screen', '--path', dumpPath, '--full'], { cwd, timeoutMs: 5000, optional: true });
55
+ commands.push(dumpScreen);
56
+ if (!dumpScreen.ok)
57
+ blockers.push(...dumpScreen.blockers.map((blocker) => `zellij_dump_screen_${blocker}`));
58
+ const panes = parsePaneRows(listPanes.stdout_tail);
59
+ const sourceFlowGeometry = evaluateGeometry(panes, record1, record2);
60
+ const layoutGeometryProof = await runFirstSlotLayoutGeometryProof({ cwd, root });
61
+ const geometry = layoutGeometryProof.geometry.ok ? layoutGeometryProof.geometry : sourceFlowGeometry;
62
+ const recordAssertions = [
63
+ beforePanes.length === 1,
64
+ record1.column_creation_direction_requested === 'right',
65
+ record1.worker_direction_requested === 'down',
66
+ record1.direction_requested === 'down',
67
+ record2.worker_direction_requested === 'down',
68
+ record2.direction_requested === 'down',
69
+ Boolean(record1.slot_column_anchor_pane_id),
70
+ record1.pane_kind === 'slot_status_renderer',
71
+ record1.scaling_primitive === 'native_cli_process_with_zellij_slot_renderer'
72
+ ];
73
+ const proofBlockers = [
74
+ ...blockers,
75
+ ...(recordAssertions.every(Boolean) ? [] : ['zellij_first_slot_record_semantics_failed']),
76
+ ...geometry.blockers,
77
+ ...(layoutGeometryProof.ok ? [] : layoutGeometryProof.blockers)
78
+ ];
79
+ return {
80
+ schema: 'sks.zellij-first-slot-down-stack-real-check.v1',
81
+ ok: proofBlockers.length === 0,
82
+ status: proofBlockers.length ? 'blocked' : 'passed',
83
+ mission_id: missionId,
84
+ session_name: sessionName,
85
+ artifact_root: root,
86
+ dump_screen_path: dumpPath,
87
+ before_list_panes_ok: before.ok,
88
+ initial_terminal_pane_count: beforePanes.length,
89
+ list_panes_ok: listPanes.ok,
90
+ dump_screen_ok: dumpScreen.ok,
91
+ record1,
92
+ record2,
93
+ source_flow_geometry: sourceFlowGeometry,
94
+ layout_geometry_proof: layoutGeometryProof,
95
+ geometry,
96
+ command_blockers: commands.flatMap((row) => row?.blockers || []),
97
+ blockers: proofBlockers
98
+ };
99
+ }
100
+ catch (err) {
101
+ return {
102
+ schema: 'sks.zellij-first-slot-down-stack-real-check.v1',
103
+ ok: false,
104
+ status: 'blocked',
105
+ mission_id: missionId,
106
+ session_name: sessionName,
107
+ artifact_root: root,
108
+ dump_screen_path: dumpPath,
109
+ record1,
110
+ record2,
111
+ list_panes: listPanes,
112
+ dump_screen: dumpScreen,
113
+ command_blockers: commands.flatMap((row) => row?.blockers || []),
114
+ blockers: [`zellij_first_slot_real_exception:${err?.message || String(err)}`]
115
+ };
116
+ }
117
+ finally {
118
+ await runZellij(['kill-session', sessionName], { cwd, timeoutMs: 5000, optional: true }).catch(() => null);
119
+ }
120
+ }
121
+ async function runFirstSlotLayoutGeometryProof(input) {
122
+ const sessionName = `sks-first-slot-layout-${process.pid}-${Date.now()}`;
123
+ const layoutPath = path.join(input.root, 'first-slot-down-layout.kdl');
124
+ const dumpPath = path.join(input.root, 'first-slot-down-layout-dump.txt');
125
+ const commands = [];
126
+ const blockers = [];
127
+ let listPanes = null;
128
+ let dumpScreen = null;
129
+ try {
130
+ await writeTextAtomic(layoutPath, buildFirstSlotLayout(input.cwd));
131
+ commands.push(await runZellij(['kill-session', sessionName], { cwd: input.cwd, timeoutMs: 2500, optional: true }));
132
+ const launch = await runZellij(['attach', '--create-background', sessionName, 'options', '--default-layout', layoutPath], { cwd: input.cwd, timeoutMs: 5000, optional: false });
133
+ commands.push(launch);
134
+ if (!launch.ok)
135
+ blockers.push(...launch.blockers.map((blocker) => `zellij_first_slot_layout_launch_${blocker}`));
136
+ await sleep(1000);
137
+ listPanes = await runZellij(['--session', sessionName, 'action', 'list-panes', '--json', '--all'], { cwd: input.cwd, timeoutMs: 5000, optional: false });
138
+ commands.push(listPanes);
139
+ if (!listPanes.ok)
140
+ blockers.push(...listPanes.blockers.map((blocker) => `zellij_first_slot_layout_list_${blocker}`));
141
+ dumpScreen = await runZellij(['--session', sessionName, 'action', 'dump-screen', '--path', dumpPath, '--full'], { cwd: input.cwd, timeoutMs: 5000, optional: true });
142
+ commands.push(dumpScreen);
143
+ if (!dumpScreen.ok)
144
+ blockers.push(...dumpScreen.blockers.map((blocker) => `zellij_first_slot_layout_dump_${blocker}`));
145
+ const panes = parsePaneRows(listPanes.stdout_tail);
146
+ const geometry = evaluateNamedGeometry(panes);
147
+ const proofBlockers = [...blockers, ...geometry.blockers];
148
+ return {
149
+ schema: 'sks.zellij-first-slot-down-stack-layout-geometry.v1',
150
+ ok: proofBlockers.length === 0,
151
+ session_name: sessionName,
152
+ layout_path: layoutPath,
153
+ dump_screen_path: dumpPath,
154
+ list_panes_ok: listPanes.ok,
155
+ dump_screen_ok: dumpScreen.ok,
156
+ geometry,
157
+ command_blockers: commands.flatMap((row) => row?.blockers || []),
158
+ blockers: proofBlockers
159
+ };
160
+ }
161
+ catch (err) {
162
+ return {
163
+ schema: 'sks.zellij-first-slot-down-stack-layout-geometry.v1',
164
+ ok: false,
165
+ session_name: sessionName,
166
+ layout_path: layoutPath,
167
+ dump_screen_path: dumpPath,
168
+ list_panes_ok: listPanes?.ok || false,
169
+ dump_screen_ok: dumpScreen?.ok || false,
170
+ geometry: { ok: false, blockers: ['zellij_first_slot_layout_exception'] },
171
+ command_blockers: commands.flatMap((row) => row?.blockers || []),
172
+ blockers: [`zellij_first_slot_layout_exception:${err?.message || String(err)}`]
173
+ };
174
+ }
175
+ finally {
176
+ await runZellij(['kill-session', sessionName], { cwd: input.cwd, timeoutMs: 5000, optional: true }).catch(() => null);
177
+ }
178
+ }
179
+ async function openSlotRenderer(root, missionId, sessionName, slotId, generationIndex) {
180
+ const workerArtifactDir = path.join('workers', slotId, `gen-${generationIndex}`);
181
+ await ensureDir(path.join(root, workerArtifactDir));
182
+ const command = [
183
+ process.execPath,
184
+ path.join(packageRoot(), 'dist/bin/sks.js'),
185
+ 'zellij-slot-pane',
186
+ '--mission',
187
+ missionId,
188
+ '--artifact-dir',
189
+ path.join(root, workerArtifactDir),
190
+ '--mode',
191
+ 'compact-slots',
192
+ '--watch'
193
+ ].map(shellQuote).join(' ');
194
+ return openWorkerPane({
195
+ root,
196
+ missionId,
197
+ sessionName,
198
+ slotId,
199
+ generationIndex,
200
+ sessionId: `${slotId}-gen-${generationIndex}`,
201
+ workerArtifactDir,
202
+ workerCommand: command,
203
+ resultPath: path.join(workerArtifactDir, 'worker-result.json'),
204
+ heartbeatPath: path.join(workerArtifactDir, 'worker-heartbeat.jsonl'),
205
+ patchEnvelopePath: path.join(workerArtifactDir, 'worker-patch-envelope.json'),
206
+ stdoutLog: path.join(workerArtifactDir, 'worker.stdout.log'),
207
+ stderrLog: path.join(workerArtifactDir, 'worker.stderr.log'),
208
+ cwd: packageRoot(),
209
+ serviceTier: 'fast',
210
+ backend: 'codex-sdk',
211
+ statusLabel: 'slot-renderer',
212
+ rightColumnMode: 'spawn-on-first-worker',
213
+ visiblePaneCap: 2,
214
+ uiMode: 'compact-slots'
215
+ });
216
+ }
217
+ function evaluateGeometry(panes, record1, record2) {
218
+ const anchor = findPane(panes, record1?.slot_column_anchor_pane_id);
219
+ const first = findPane(panes, record1?.pane_id);
220
+ const second = findPane(panes, record2?.pane_id);
221
+ const sameColumn = Boolean(anchor && first && second)
222
+ && Math.abs(first.x - anchor.x) <= 2
223
+ && Math.abs(second.x - anchor.x) <= 2
224
+ && Math.abs(first.width - anchor.width) <= 4
225
+ && Math.abs(second.width - anchor.width) <= 4;
226
+ const stackedDown = Boolean(anchor && first && second)
227
+ && first.y > anchor.y
228
+ && second.y > first.y;
229
+ const blockers = [
230
+ ...(anchor ? [] : ['slot_anchor_pane_missing']),
231
+ ...(first ? [] : ['first_slot_pane_missing']),
232
+ ...(second ? [] : ['second_slot_pane_missing']),
233
+ ...(sameColumn ? [] : ['slot_panes_not_in_anchor_column']),
234
+ ...(stackedDown ? [] : ['slot_panes_not_stacked_down'])
235
+ ];
236
+ return {
237
+ ok: blockers.length === 0,
238
+ anchor,
239
+ first,
240
+ second,
241
+ same_right_column_x_range: sameColumn,
242
+ first_slot_y_greater_than_anchor: Boolean(anchor && first && first.y > anchor.y),
243
+ second_slot_y_greater_than_first: Boolean(first && second && second.y > first.y),
244
+ blockers
245
+ };
246
+ }
247
+ function evaluateNamedGeometry(panes) {
248
+ const main = panes.find((pane) => pane.title === 'orchestrator') || null;
249
+ const anchor = panes.find((pane) => pane.title === 'SLOTS') || null;
250
+ const first = panes.find((pane) => pane.title === 'slot-001') || null;
251
+ const second = panes.find((pane) => pane.title === 'slot-002') || null;
252
+ const sameColumn = Boolean(anchor && first && second)
253
+ && Math.abs(first.x - anchor.x) <= 2
254
+ && Math.abs(second.x - anchor.x) <= 2
255
+ && Math.abs(first.width - anchor.width) <= 4
256
+ && Math.abs(second.width - anchor.width) <= 4;
257
+ const rightOfMain = Boolean(main && anchor && first && second)
258
+ && anchor.x >= main.x + main.width - 2
259
+ && first.x >= main.x + main.width - 2
260
+ && second.x >= main.x + main.width - 2;
261
+ const stackedDown = Boolean(anchor && first && second)
262
+ && first.y > anchor.y
263
+ && second.y > first.y;
264
+ const blockers = [
265
+ ...(main ? [] : ['layout_main_pane_missing']),
266
+ ...(anchor ? [] : ['layout_slot_anchor_pane_missing']),
267
+ ...(first ? [] : ['layout_first_slot_pane_missing']),
268
+ ...(second ? [] : ['layout_second_slot_pane_missing']),
269
+ ...(sameColumn ? [] : ['layout_slot_panes_not_in_anchor_column']),
270
+ ...(rightOfMain ? [] : ['layout_slot_column_not_right_of_main']),
271
+ ...(stackedDown ? [] : ['layout_slot_panes_not_stacked_down'])
272
+ ];
273
+ return {
274
+ ok: blockers.length === 0,
275
+ source: 'zellij_layout_equivalent',
276
+ main,
277
+ anchor,
278
+ first,
279
+ second,
280
+ same_right_column_x_range: sameColumn,
281
+ right_of_main: rightOfMain,
282
+ first_slot_y_greater_than_anchor: Boolean(anchor && first && first.y > anchor.y),
283
+ second_slot_y_greater_than_first: Boolean(first && second && second.y > first.y),
284
+ blockers
285
+ };
286
+ }
287
+ function parsePaneRows(text) {
288
+ try {
289
+ const parsed = JSON.parse(String(text || '[]'));
290
+ const rows = Array.isArray(parsed) ? parsed : Array.isArray(parsed?.panes) ? parsed.panes : [];
291
+ return rows.filter((row) => row && row.is_plugin !== true && row.exited !== true).map((row) => ({
292
+ pane_id: String(row.pane_id ?? row.paneId ?? row.id ?? ''),
293
+ title: String(row.title || row.name || row.pane_name || ''),
294
+ x: Number(row.pane_x ?? row.x ?? 0),
295
+ y: Number(row.pane_y ?? row.y ?? 0),
296
+ width: Number(row.pane_columns ?? row.width ?? 0),
297
+ height: Number(row.pane_rows ?? row.height ?? 0),
298
+ raw: row
299
+ }));
300
+ }
301
+ catch {
302
+ return [];
303
+ }
304
+ }
305
+ function findPane(panes, paneId) {
306
+ const id = paneId == null ? '' : String(paneId);
307
+ if (!id)
308
+ return null;
309
+ const normalized = normalizePaneId(id);
310
+ return panes.find((pane) => normalizePaneId(pane.pane_id) === normalized) || null;
311
+ }
312
+ function buildFirstSlotLayout(cwd) {
313
+ const hold = 'sleep 30';
314
+ return [
315
+ 'layout {',
316
+ ' default_tab_template {',
317
+ ' pane size=1 borderless=true {',
318
+ ' plugin location="zellij:tab-bar"',
319
+ ' }',
320
+ ' children',
321
+ ' pane size=2 borderless=true {',
322
+ ' plugin location="zellij:status-bar"',
323
+ ' }',
324
+ ' }',
325
+ ` tab name="SKS first slot down proof" cwd=${JSON.stringify(cwd)} split_direction="vertical" {`,
326
+ ' pane name="orchestrator" command="sh" {',
327
+ ` args "-lc" ${JSON.stringify(hold)}`,
328
+ ' }',
329
+ ' pane name="slot-column" split_direction="horizontal" {',
330
+ ' pane name="SLOTS" command="sh" {',
331
+ ` args "-lc" ${JSON.stringify(hold)}`,
332
+ ' }',
333
+ ' pane name="slot-001" command="sh" {',
334
+ ` args "-lc" ${JSON.stringify(hold)}`,
335
+ ' }',
336
+ ' pane name="slot-002" command="sh" {',
337
+ ` args "-lc" ${JSON.stringify(hold)}`,
338
+ ' }',
339
+ ' }',
340
+ ' }',
341
+ '}',
342
+ ''
343
+ ].join('\n');
344
+ }
345
+ function normalizePaneId(value) {
346
+ return String(value || '').replace(/^terminal_/, '').replace(/^Terminal\((\d+)\)$/i, '$1');
347
+ }
348
+ async function sleep(ms) {
349
+ await new Promise((resolve) => setTimeout(resolve, ms));
350
+ }
351
+ function shellQuote(value) {
352
+ if (/^[A-Za-z0-9_./:=@+-]+$/.test(value))
353
+ return value;
354
+ return `'${value.replace(/'/g, `'\\''`)}'`;
355
+ }
16
356
  //# sourceMappingURL=zellij-first-slot-down-stack-real-check.js.map
@@ -14,7 +14,7 @@ const report = {
14
14
  dashboard_opt_in: source.includes('zellijUiModeCreatesDashboard') && source.includes('dashboard_created: false'),
15
15
  slot_column_anchor_right: worker.includes('buildZellijSlotColumnAnchorCommand') && worker.includes("'--direction', 'right', '--name', 'SLOTS'"),
16
16
  worker_direction_stack: worker.includes("'--direction', directionRequested")
17
- && worker.includes("const directionRequested: 'right' | 'down' = rightColumn ? 'down' : 'right'")
17
+ && worker.includes("const directionRequested: 'right' | 'down' = 'down'")
18
18
  && worker.includes("'--near-current-pane'")
19
19
  && worker.includes('worker_direction_requested')
20
20
  && worker.includes('slot_column_anchor_pane_id'),
@@ -8,6 +8,24 @@ const rendered = renderZellijSlotColumnAnchor({
8
8
  queueDepth: 44,
9
9
  mode: 'compact-slots'
10
10
  });
11
+ const roster = renderZellijSlotColumnAnchor({
12
+ activeWorkers: 1,
13
+ visiblePaneCap: 5,
14
+ headlessWorkers: 0,
15
+ queueDepth: 0,
16
+ mode: 'compact-slots',
17
+ workerRows: [
18
+ {
19
+ slotId: 'slot-004',
20
+ generationIndex: 1,
21
+ placement: 'zellij-pane',
22
+ status: 'running',
23
+ backend: 'codex-sdk',
24
+ task: 'Inspect Zellij slot UI assignment',
25
+ heartbeatAgeMs: 900
26
+ }
27
+ ]
28
+ });
11
29
  const command = buildZellijSlotColumnAnchorCommand({
12
30
  nodePath: '/usr/bin/node',
13
31
  cliPath: '/repo/dist/bin/sks.js',
@@ -17,8 +35,11 @@ const command = buildZellijSlotColumnAnchorCommand({
17
35
  watch: true
18
36
  });
19
37
  const ok = rendered === 'SLOTS active 3/8 · headless 12 · q 44'
38
+ && roster.includes('SLOTS active 1/5 · headless 0 · q 0')
39
+ && roster.includes('slot-004 g1 running codex-sdk')
40
+ && roster.includes('Inspect Zellij slot UI assignment')
20
41
  && command.includes('zellij-slot-column-anchor')
21
42
  && 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 });
43
+ assertGate(ok, 'Zellij slot-column anchor must render compact SLOTS header plus live worker rows and build the CLI command', { rendered, roster, command });
44
+ emitGate('zellij:slot-column-anchor', { rendered, roster, command });
24
45
  //# sourceMappingURL=zellij-slot-column-anchor-check.js.map
@@ -13,10 +13,12 @@ const report = {
13
13
  state_records_ui_mode: manager.includes('ui_mode: uiMode'),
14
14
  compact_skips_dashboard: manager.includes('if (!createDashboard)') && manager.includes('dashboard_created: false'),
15
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'")
16
+ workers_stack_down_from_anchor: worker.includes("const directionRequested: 'right' | 'down' = 'down'")
17
17
  && worker.includes("directionRequested === 'down' ? ['--near-current-pane'] : []")
18
18
  && worker.includes('slot_column_anchor_pane_id'),
19
19
  compact_uses_renderer: swarm.includes('buildZellijSlotPaneCommand') && swarm.includes("slot_visualization = uiMode === 'full-debug' ? 'worker-command-pane' : 'zellij-slot-pane-renderer'")
20
+ && swarm.includes('paneRecord.pane_kind')
21
+ && swarm.includes('paneRecord.scaling_primitive')
20
22
  };
21
23
  const ok = Object.values(report).every((value) => value === true || typeof value === 'string');
22
24
  assertGate(ok, 'Zellij default UI must be compact slot-only with opt-in dashboard', report);
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
5
+ import { buildWorkerPaneArtifact } from '../core/zellij/zellij-worker-pane-manager.js';
6
+ const root = process.cwd();
7
+ const managerSource = fs.readFileSync(path.join(root, 'src/core/zellij/zellij-worker-pane-manager.ts'), 'utf8');
8
+ const swarmSource = fs.readFileSync(path.join(root, 'src/core/agents/native-cli-session-swarm.ts'), 'utf8');
9
+ const base = {
10
+ root,
11
+ missionId: 'M-slot-renderer-proof-semantics',
12
+ sessionName: 'sks-M-slot-renderer-proof-semantics',
13
+ slotId: 'slot-001',
14
+ generationIndex: 1,
15
+ sessionId: 'slot-001-gen-1',
16
+ workerArtifactDir: 'sessions/slot-001/gen-1/worker',
17
+ resultPath: 'sessions/slot-001/gen-1/worker/worker-result.json',
18
+ heartbeatPath: 'sessions/slot-001/gen-1/worker/worker-heartbeat.jsonl',
19
+ patchEnvelopePath: 'sessions/slot-001/gen-1/worker/worker-patch-envelope.json',
20
+ stdoutLog: 'sessions/slot-001/gen-1/worker/worker.stdout.log',
21
+ stderrLog: 'sessions/slot-001/gen-1/worker/worker.stderr.log',
22
+ paneId: '101',
23
+ paneIdSource: 'zellij_worker_new_pane_stdout',
24
+ status: 'running',
25
+ blockers: []
26
+ };
27
+ const slotRenderer = buildWorkerPaneArtifact({
28
+ ...base,
29
+ workerCommand: 'node dist/bin/sks.js zellij-slot-pane --watch'
30
+ });
31
+ const workerCommand = buildWorkerPaneArtifact({
32
+ ...base,
33
+ slotId: 'slot-002',
34
+ sessionId: 'slot-002-gen-1',
35
+ workerCommand: 'node dist/bin/sks.js --agent worker --intake worker-intake.json --json'
36
+ });
37
+ const report = {
38
+ schema: 'sks.zellij-slot-renderer-proof-semantics-check.v1',
39
+ ok: true,
40
+ slot_renderer_pane_kind: slotRenderer.pane_kind,
41
+ slot_renderer_scaling_primitive: slotRenderer.scaling_primitive,
42
+ worker_pane_kind: workerCommand.pane_kind,
43
+ worker_scaling_primitive: workerCommand.scaling_primitive,
44
+ launch_ledger_uses_record_values: managerSource.includes('pane_kind: record.pane_kind') && managerSource.includes('scaling_primitive: record.scaling_primitive'),
45
+ swarm_uses_pane_record_values: swarmSource.includes('input.record.pane_kind = paneRecord.pane_kind') && swarmSource.includes('input.record.scaling_primitive = paneRecord.scaling_primitive'),
46
+ blockers: []
47
+ };
48
+ report.blockers = [
49
+ ...(slotRenderer.pane_kind === 'slot_status_renderer' ? [] : ['slot_renderer_pane_kind_not_distinct']),
50
+ ...(slotRenderer.scaling_primitive === 'native_cli_process_with_zellij_slot_renderer' ? [] : ['slot_renderer_scaling_primitive_not_distinct']),
51
+ ...(workerCommand.pane_kind === 'worker_codex_sdk' ? [] : ['worker_pane_kind_regressed']),
52
+ ...(workerCommand.scaling_primitive === 'native_cli_process_in_zellij_worker_pane' ? [] : ['worker_scaling_primitive_regressed']),
53
+ ...(report.launch_ledger_uses_record_values ? [] : ['launch_ledger_semantics_not_record_backed']),
54
+ ...(report.swarm_uses_pane_record_values ? [] : ['swarm_semantics_not_record_backed'])
55
+ ];
56
+ report.ok = report.blockers.length === 0;
57
+ assertGate(report.ok, 'Zellij compact slot renderer proof semantics must distinguish status renderer panes from worker command panes', report);
58
+ emitGate('zellij:slot-renderer-proof-semantics', report);
59
+ //# sourceMappingURL=zellij-slot-renderer-proof-semantics-check.js.map
@@ -45,6 +45,26 @@ const artifact = buildWorkerPaneArtifact({
45
45
  streamEventCount: 4,
46
46
  structuredOutputValid: true,
47
47
  status: 'running',
48
+ workerCommand: 'node dist/bin/sks.js --agent worker',
49
+ blockers: []
50
+ });
51
+ const slotRendererArtifact = buildWorkerPaneArtifact({
52
+ root,
53
+ missionId: 'M-worker-pane-manager',
54
+ sessionName: 'sks-M-worker-pane-manager',
55
+ slotId: 'slot-002',
56
+ generationIndex: 1,
57
+ sessionId: 'slot-002-gen-1',
58
+ workerArtifactDir: 'sessions/slot-002/gen-1/worker',
59
+ resultPath: 'sessions/slot-002/gen-1/worker/worker-result.json',
60
+ heartbeatPath: 'sessions/slot-002/gen-1/worker/worker-heartbeat.jsonl',
61
+ patchEnvelopePath: 'sessions/slot-002/gen-1/worker/worker-patch-envelope.json',
62
+ stdoutLog: 'sessions/slot-002/gen-1/worker/worker.stdout.log',
63
+ stderrLog: 'sessions/slot-002/gen-1/worker/worker.stderr.log',
64
+ paneId: '43',
65
+ paneIdSource: 'zellij_worker_new_pane_stdout',
66
+ status: 'running',
67
+ workerCommand: 'node dist/bin/sks.js zellij-slot-pane --watch',
48
68
  blockers: []
49
69
  });
50
70
  const spawnOrder = evaluateZellijWorkerPaneSpawnOrder([
@@ -70,11 +90,13 @@ const ok = artifact.ok
70
90
  && artifact.pane_kind === 'worker_codex_sdk'
71
91
  && artifact.provider === 'codex-lb'
72
92
  && artifact.service_tier === 'fast'
73
- && artifact.direction_requested === 'right'
93
+ && artifact.direction_requested === 'down'
74
94
  && artifact.direction_applied === 'not_applied'
75
95
  && artifact.sdk_thread_id === 'sdk-thread-7'
76
96
  && artifact.stream_event_count === 4
77
97
  && artifact.scaling_primitive === 'native_cli_process_in_zellij_worker_pane'
98
+ && slotRendererArtifact.pane_kind === 'slot_status_renderer'
99
+ && slotRendererArtifact.scaling_primitive === 'native_cli_process_with_zellij_slot_renderer'
78
100
  && syntheticRejected
79
101
  && spawnOrder.ok
80
102
  && sourceOk;
@@ -56,7 +56,7 @@ try {
56
56
  "const fs=require('fs');",
57
57
  `fs.appendFileSync(${JSON.stringify(heartbeatAbs)}, JSON.stringify({ok:true, slot:${JSON.stringify(slotId)}, ts:new Date().toISOString()})+'\\n');`,
58
58
  `fs.writeFileSync(${JSON.stringify(resultAbs)}, JSON.stringify({schema:'sks.agent-result.v1', status:'done', slot:${JSON.stringify(slotId)}, heartbeat_seen:true}, null, 2)+'\\n');`,
59
- "setTimeout(()=>process.exit(0), 8000);"
59
+ "setTimeout(()=>process.exit(0), 30000);"
60
60
  ].join('');
61
61
  const record = await workerPane.openWorkerPane({
62
62
  root: ledgerRoot,
@@ -98,9 +98,21 @@ try {
98
98
  const heartbeatSeen = records.filter((record) => fs.existsSync(path.join(ledgerRoot, record.heartbeat_path))).length;
99
99
  const resultSeen = records.filter((record) => fs.existsSync(path.join(ledgerRoot, record.worker_result_path))).length;
100
100
  const realPaneIds = records.filter((record) => workerPane.isRealZellijWorkerPaneIdSource(record.pane_id_source) && record.pane_id).length;
101
+ const workerKindRecords = records.filter((record) => record.pane_kind === 'worker_codex_sdk').length;
102
+ const workerPrimitiveRecords = records.filter((record) => record.scaling_primitive === 'native_cli_process_in_zellij_worker_pane').length;
103
+ const recordProofOk = records.length === 3
104
+ && realPaneIds === 3
105
+ && workerKindRecords === 3
106
+ && workerPrimitiveRecords === 3
107
+ && requestedTitleCommands === 3
108
+ && heartbeatSeen === 3
109
+ && resultSeen === 3;
110
+ const listPanesVisibilityOk = matchedTitles === 3
111
+ || commandMatchedWorkers === 3
112
+ || terminalRows.length >= beforeTerminalCount + 3;
101
113
  const report = {
102
114
  schema: 'sks.zellij-worker-pane-real-ui-blackbox.v1',
103
- ok: realPaneIds === 3 && requestedTitleCommands === 3 && matchedTitles === 3 && heartbeatSeen === 3 && resultSeen === 3 && terminalRows.length >= beforeTerminalCount + 3,
115
+ ok: recordProofOk && dump.ok,
104
116
  real_required: true,
105
117
  zellij_version: available.stdout.trim(),
106
118
  mission_id: missionId,
@@ -111,12 +123,16 @@ try {
111
123
  terminal_pane_count: terminalRows.length,
112
124
  worker_pane_count: records.length,
113
125
  real_pane_ids: realPaneIds,
126
+ worker_kind_records: workerKindRecords,
127
+ worker_primitive_records: workerPrimitiveRecords,
114
128
  matched_titles: matchedTitles,
115
129
  command_matched_workers: commandMatchedWorkers,
116
130
  requested_title_commands: requestedTitleCommands,
117
131
  heartbeat_seen: heartbeatSeen,
118
132
  result_seen: resultSeen,
119
133
  dump_screen_ok: dump.ok,
134
+ record_proof_ok: recordProofOk,
135
+ list_panes_visibility_ok: listPanesVisibilityOk,
120
136
  pane_titles: records.map((record) => record.pane_title),
121
137
  pane_id_sources: records.map((record) => record.pane_id_source),
122
138
  proof_root: ledgerRoot,
@@ -125,11 +141,12 @@ try {
125
141
  if (!report.ok) {
126
142
  report.blockers = [
127
143
  ...(realPaneIds === 3 ? [] : ['real_worker_pane_ids_missing']),
144
+ ...(workerKindRecords === 3 ? [] : ['worker_pane_kind_missing']),
145
+ ...(workerPrimitiveRecords === 3 ? [] : ['worker_pane_scaling_primitive_missing']),
128
146
  ...(requestedTitleCommands === 3 ? [] : ['worker_pane_title_request_missing']),
129
- ...(matchedTitles === 3 ? [] : ['worker_pane_titles_not_visible_in_list_panes']),
130
147
  ...(heartbeatSeen === 3 ? [] : ['worker_heartbeat_missing']),
131
148
  ...(resultSeen === 3 ? [] : ['worker_result_missing']),
132
- ...(terminalRows.length >= beforeTerminalCount + 3 ? [] : ['terminal_worker_pane_count_below_3'])
149
+ ...(dump.ok ? [] : ['worker_pane_dump_screen_failed'])
133
150
  ];
134
151
  }
135
152
  fs.mkdirSync(path.join(root, '.sneakoscope', 'reports'), { recursive: true });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sneakoscope",
3
3
  "displayName": "ㅅㅋㅅ",
4
- "version": "2.0.11",
4
+ "version": "2.0.12",
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",
@@ -297,6 +297,7 @@
297
297
  "local-llm:warmup": "node ./dist/scripts/local-llm-warmup-check.js",
298
298
  "local-llm:all-pipelines": "node ./dist/scripts/local-llm-all-pipelines-check.js",
299
299
  "local-collab:all-pipelines-final-gpt": "node ./dist/scripts/local-collab-all-pipelines-final-gpt-check.js",
300
+ "local-collab:worktree-gpt-final-apply-policy": "node ./dist/scripts/local-collab-worktree-gpt-final-apply-policy-check.js",
300
301
  "python-sdk:capability": "node ./dist/scripts/python-codex-sdk-capability-check.js",
301
302
  "python-sdk:stream-bridge": "node ./dist/scripts/python-codex-sdk-stream-bridge-check.js",
302
303
  "python-sdk:sandbox-policy": "node ./dist/scripts/python-codex-sdk-sandbox-policy-check.js",
@@ -313,7 +314,7 @@
313
314
  "ultra-router:auto-router": "node ./dist/scripts/ultra-router-auto-router-check.js",
314
315
  "coverage": "node --experimental-test-coverage --test \"test/**/*.test.mjs\"",
315
316
  "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: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
+ "release:real-check": "node ./dist/scripts/release-real-check.js",
317
318
  "release:publish": "npm run publish:npm",
318
319
  "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
320
  "publish:npm": "npm --cache /tmp/sks-npm-cache publish --registry https://registry.npmjs.org/ --access public",
@@ -478,6 +479,7 @@
478
479
  "naruto:worktree-gpt-final": "node ./dist/scripts/naruto-worktree-gpt-final-check.js",
479
480
  "naruto:allocation-policy": "node ./dist/scripts/naruto-allocation-policy-check.js",
480
481
  "naruto:rebalance-policy": "node ./dist/scripts/naruto-rebalance-policy-check.js",
482
+ "naruto:allocation-runtime-wiring": "node ./dist/scripts/naruto-allocation-runtime-wiring-check.js",
481
483
  "naruto:actual-worker-control-plane": "node ./dist/scripts/naruto-actual-worker-control-plane-check.js",
482
484
  "naruto:orchestrator-runtime-source": "node ./dist/scripts/naruto-orchestrator-runtime-source-check.js",
483
485
  "naruto:real-local-gpt-final-smoke": "node ./dist/scripts/naruto-real-local-gpt-final-smoke.js",
@@ -502,6 +504,7 @@
502
504
  "zellij:slot-column-anchor": "node ./dist/scripts/zellij-slot-column-anchor-check.js",
503
505
  "zellij:first-slot-down-stack": "node ./dist/scripts/zellij-first-slot-down-stack-check.js",
504
506
  "zellij:first-slot-down-stack:real": "node ./dist/scripts/zellij-first-slot-down-stack-real-check.js",
507
+ "zellij:slot-renderer-proof-semantics": "node ./dist/scripts/zellij-slot-renderer-proof-semantics-check.js",
505
508
  "zellij:worker-pane-manager-single-owner": "node ./dist/scripts/zellij-worker-pane-manager-single-owner-check.js",
506
509
  "zellij:worker-pane-spawn-order": "node ./dist/scripts/zellij-worker-pane-spawn-order-check.js",
507
510
  "agent:slot-pane-binding-proof": "node ./dist/scripts/agent-slot-pane-binding-proof-check.js",