sneakoscope 2.0.1 → 2.0.2
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 +26 -5
- 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 +15 -8
- package/dist/cli/command-registry.js +2 -0
- package/dist/commands/doctor.js +29 -3
- package/dist/core/agents/agent-command-surface.js +13 -3
- package/dist/core/agents/agent-orchestrator.js +22 -0
- package/dist/core/agents/agent-output-validator.js +2 -1
- package/dist/core/agents/agent-patch-schema.js +2 -1
- package/dist/core/agents/agent-roster.js +1 -1
- package/dist/core/agents/agent-runner-ollama.js +411 -0
- package/dist/core/agents/agent-schema.js +1 -1
- package/dist/core/agents/intelligent-work-graph.js +45 -3
- package/dist/core/agents/native-cli-session-swarm.js +8 -1
- package/dist/core/agents/native-cli-worker.js +1 -1
- package/dist/core/agents/native-worker-backend-router.js +44 -2
- package/dist/core/agents/ollama-worker-config.js +118 -0
- package/dist/core/auto-review.js +39 -6
- package/dist/core/codex-app/codex-app-fast-ui-repair.js +42 -3
- package/dist/core/commands/basic-cli.js +36 -1
- package/dist/core/commands/local-model-command.js +105 -0
- package/dist/core/commands/mad-sks-command.js +58 -9
- package/dist/core/commands/run-command.js +29 -1
- package/dist/core/commands/team-command.js +31 -2
- package/dist/core/doctor/doctor-readiness-matrix.js +4 -0
- package/dist/core/feature-fixtures.js +1 -0
- package/dist/core/fsx.js +1 -1
- package/dist/core/hooks-runtime.js +1 -1
- package/dist/core/init.js +2 -0
- package/dist/core/provider/provider-context.js +72 -9
- package/dist/core/retention.js +11 -0
- package/dist/core/routes.js +21 -1
- package/dist/core/team-live.js +7 -1
- package/dist/core/update-check.js +156 -1
- package/dist/core/verification/verification-worker-pool.js +12 -0
- package/dist/core/version.js +1 -1
- package/dist/core/zellij/zellij-worker-pane-manager.js +19 -2
- package/dist/scripts/agent-ast-aware-work-graph-check.js +1 -1
- package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +12 -2
- package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +92 -0
- package/dist/scripts/mad-sks-zellij-default-pane-worker-check.js +37 -0
- package/dist/scripts/mad-sks-zellij-launch-check.js +2 -1
- package/dist/scripts/provider-context-config-toml-check.js +63 -0
- package/dist/scripts/release-gate-existence-audit.js +4 -0
- package/dist/scripts/runtime-no-mjs-scripts-check.js +3 -2
- package/dist/scripts/zellij-worker-pane-manager-check.js +3 -0
- package/dist/scripts/zellij-worker-pane-manager-single-owner-check.js +39 -0
- package/package.json +7 -3
|
@@ -14,13 +14,23 @@ const repaired = await repairCodexAppFastUi(root, { codexHome, apply: true });
|
|
|
14
14
|
const projectAfter = await fs.readFile(path.join(root, '.codex', 'config.toml'), 'utf8');
|
|
15
15
|
const homeAfter = await fs.readFile(path.join(codexHome, 'config.toml'), 'utf8');
|
|
16
16
|
const backups = repaired.actions.filter((action) => action.changed).map((action) => action.backup_path).filter(Boolean);
|
|
17
|
+
const unsafeRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-doctor-fast-ui-unsafe-'));
|
|
18
|
+
const unsafeCodexHome = path.join(unsafeRoot, 'home', '.codex');
|
|
19
|
+
await fs.mkdir(path.join(unsafeRoot, '.codex'), { recursive: true });
|
|
20
|
+
await fs.mkdir(unsafeCodexHome, { recursive: true });
|
|
21
|
+
await fs.writeFile(path.join(unsafeCodexHome, 'config.toml'), 'service_tier = "standard"\n');
|
|
22
|
+
const unsafePlan = await repairCodexAppFastUi(unsafeRoot, { codexHome: unsafeCodexHome, apply: false });
|
|
17
23
|
const ok = plan.fast_selector === 'manual_action_required'
|
|
24
|
+
&& plan.safe_auto_apply === true
|
|
18
25
|
&& repaired.fast_selector === 'repaired'
|
|
26
|
+
&& repaired.safe_auto_apply === true
|
|
19
27
|
&& backups.length >= 2
|
|
20
28
|
&& !/model_provider\s*=/.test(projectAfter)
|
|
21
29
|
&& !/service_tier\s*=/.test(homeAfter)
|
|
22
|
-
&& /fast_mode = false/.test(homeAfter)
|
|
23
|
-
|
|
30
|
+
&& /fast_mode = false/.test(homeAfter)
|
|
31
|
+
&& unsafePlan.requires_confirmation === true
|
|
32
|
+
&& unsafePlan.safe_auto_apply === false;
|
|
33
|
+
emit({ schema: 'sks.doctor-fixes-codex-app-fast-ui-check.v1', ok, plan, repaired, unsafe_plan: unsafePlan, project_after: projectAfter, home_after: homeAfter, blockers: ok ? [] : ['doctor_fixes_codex_app_fast_ui_check_failed'] });
|
|
24
34
|
function emit(report) {
|
|
25
35
|
console.log(JSON.stringify(report, null, 2));
|
|
26
36
|
if (!report.ok)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import fs from 'node:fs/promises';
|
|
4
|
+
import os from 'node:os';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { madHighCommand } from '../core/commands/mad-sks-command.js';
|
|
7
|
+
import { sha256 } from '../core/fsx.js';
|
|
8
|
+
const original = {
|
|
9
|
+
cwd: process.cwd(),
|
|
10
|
+
home: process.env.HOME,
|
|
11
|
+
codexHome: process.env.CODEX_HOME,
|
|
12
|
+
noAttach: process.env.SKS_NO_ZELLIJ_ATTACH,
|
|
13
|
+
requireZellij: process.env.SKS_REQUIRE_ZELLIJ,
|
|
14
|
+
madSwarm: process.env.SKS_MAD_NATIVE_SWARM,
|
|
15
|
+
skipNpm: process.env.SKS_SKIP_NPM_FRESHNESS_CHECK
|
|
16
|
+
};
|
|
17
|
+
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-mad-ui-no-mutation-'));
|
|
18
|
+
const home = path.join(tmp, 'home');
|
|
19
|
+
const codexHome = path.join(home, '.codex');
|
|
20
|
+
const configPath = path.join(codexHome, 'config.toml');
|
|
21
|
+
try {
|
|
22
|
+
await fs.mkdir(codexHome, { recursive: true });
|
|
23
|
+
await fs.mkdir(path.join(tmp, '.sneakoscope'), { recursive: true });
|
|
24
|
+
await fs.writeFile(configPath, [
|
|
25
|
+
'service_tier = "fast"',
|
|
26
|
+
'[features]',
|
|
27
|
+
'fast_mode = true',
|
|
28
|
+
'[plugins."chrome@openai-bundled"]',
|
|
29
|
+
'enabled = false',
|
|
30
|
+
''
|
|
31
|
+
].join('\n'));
|
|
32
|
+
const before = await fs.readFile(configPath, 'utf8');
|
|
33
|
+
process.chdir(tmp);
|
|
34
|
+
process.env.HOME = home;
|
|
35
|
+
process.env.CODEX_HOME = codexHome;
|
|
36
|
+
process.env.SKS_NO_ZELLIJ_ATTACH = '1';
|
|
37
|
+
process.env.SKS_REQUIRE_ZELLIJ = '0';
|
|
38
|
+
process.env.SKS_MAD_NATIVE_SWARM = '0';
|
|
39
|
+
process.env.SKS_SKIP_NPM_FRESHNESS_CHECK = '1';
|
|
40
|
+
process.exitCode = 0;
|
|
41
|
+
await madHighCommand(['--no-attach', '--no-swarm'], {
|
|
42
|
+
maybePromptSksUpdateForLaunch: async () => ({ status: 'skipped' }),
|
|
43
|
+
maybePromptCodexUpdateForLaunch: async () => ({ status: 'skipped' }),
|
|
44
|
+
ensureMadLaunchDependencies: async () => ({ ready: true, actions: [] }),
|
|
45
|
+
maybePromptCodexLbSetupForLaunch: async () => ({ status: 'skipped' })
|
|
46
|
+
});
|
|
47
|
+
const after = await fs.readFile(configPath, 'utf8');
|
|
48
|
+
const entries = await fs.readdir(codexHome);
|
|
49
|
+
assert.equal(after, before);
|
|
50
|
+
assert.equal(entries.some((entry) => entry === 'sks-mad-high.config.toml'), false);
|
|
51
|
+
assert.equal(/\[profiles\.sks-mad-high\]/.test(after), false);
|
|
52
|
+
assert.equal(/enabled\s*=\s*false/.test(after), true);
|
|
53
|
+
process.exitCode = 0;
|
|
54
|
+
emit({
|
|
55
|
+
schema: 'sks.mad-sks-app-ui-no-mutation-check.v1',
|
|
56
|
+
ok: true,
|
|
57
|
+
before_hash: sha256(before),
|
|
58
|
+
after_hash: sha256(after),
|
|
59
|
+
profile_files_written: entries.filter((entry) => /sks-mad-high/.test(entry)),
|
|
60
|
+
plugin_disabled_preserved: true,
|
|
61
|
+
blockers: []
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
emit({
|
|
66
|
+
schema: 'sks.mad-sks-app-ui-no-mutation-check.v1',
|
|
67
|
+
ok: false,
|
|
68
|
+
error: err?.message || String(err),
|
|
69
|
+
blockers: ['mad_sks_app_ui_no_mutation_failed']
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
process.chdir(original.cwd);
|
|
74
|
+
restoreEnv('HOME', original.home);
|
|
75
|
+
restoreEnv('CODEX_HOME', original.codexHome);
|
|
76
|
+
restoreEnv('SKS_NO_ZELLIJ_ATTACH', original.noAttach);
|
|
77
|
+
restoreEnv('SKS_REQUIRE_ZELLIJ', original.requireZellij);
|
|
78
|
+
restoreEnv('SKS_MAD_NATIVE_SWARM', original.madSwarm);
|
|
79
|
+
restoreEnv('SKS_SKIP_NPM_FRESHNESS_CHECK', original.skipNpm);
|
|
80
|
+
}
|
|
81
|
+
function restoreEnv(key, value) {
|
|
82
|
+
if (value == null)
|
|
83
|
+
delete process.env[key];
|
|
84
|
+
else
|
|
85
|
+
process.env[key] = value;
|
|
86
|
+
}
|
|
87
|
+
function emit(report) {
|
|
88
|
+
console.log(JSON.stringify(report, null, 2));
|
|
89
|
+
if (!report.ok)
|
|
90
|
+
process.exitCode = 1;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=mad-sks-app-ui-no-mutation-check.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { packageRoot } from '../core/fsx.js';
|
|
5
|
+
const root = packageRoot();
|
|
6
|
+
const mad = await fs.readFile(path.join(root, 'src', 'core', 'commands', 'mad-sks-command.ts'), 'utf8');
|
|
7
|
+
const parser = await fs.readFile(path.join(root, 'src', 'core', 'agents', 'agent-command-surface.ts'), 'utf8');
|
|
8
|
+
const swarm = await fs.readFile(path.join(root, 'src', 'core', 'agents', 'native-cli-session-swarm.ts'), 'utf8');
|
|
9
|
+
const manager = await fs.readFile(path.join(root, 'src', 'core', 'zellij', 'zellij-worker-pane-manager.ts'), 'utf8');
|
|
10
|
+
const commandBody = mad.slice(mad.indexOf('export async function madHighCommand'), mad.indexOf('export async function startMadNativeSwarm'));
|
|
11
|
+
const launchIndex = commandBody.indexOf('launchMadZellijUi(');
|
|
12
|
+
const swarmIndex = commandBody.indexOf('startMadNativeSwarm(');
|
|
13
|
+
const checks = {
|
|
14
|
+
no_runtime_enable_profile: !commandBody.includes('enableMadHighProfile('),
|
|
15
|
+
read_only_launch_profile: mad.includes('buildMadHighLaunchProfileNoWrite()'),
|
|
16
|
+
preflight_fix_default_false: mad.includes('fix: allowMadRepair'),
|
|
17
|
+
zellij_session_before_swarm: launchIndex >= 0 && swarmIndex >= 0 && launchIndex < swarmIndex,
|
|
18
|
+
main_only_session: mad.includes('slotCount: 0'),
|
|
19
|
+
zellij_default_backend: /return 'zellij'/.test(mad) && mad.includes("list.includes('--json')") && mad.includes("list.includes('--no-attach')"),
|
|
20
|
+
worker_command_real_zellij: mad.includes("command.push('--real')") && mad.includes("command.push('--zellij-session-name'") && mad.includes("command.push('--zellij-pane-worker')"),
|
|
21
|
+
parser_accepts_worker_flags: parser.includes('--zellij-session-name') && parser.includes('--zellij-pane-worker') && parser.includes('--no-zellij-pane-worker'),
|
|
22
|
+
native_worker_pane_path: swarm.includes("this.input.backend === 'zellij'") && swarm.includes('ctx.opts.zellijPaneWorker !== false') && swarm.includes('openWorkerPane({'),
|
|
23
|
+
right_pane_requested: manager.includes("'--direction', 'right'")
|
|
24
|
+
};
|
|
25
|
+
const ok = Object.values(checks).every(Boolean);
|
|
26
|
+
emit({
|
|
27
|
+
schema: 'sks.mad-sks-zellij-default-pane-worker-check.v1',
|
|
28
|
+
ok,
|
|
29
|
+
checks,
|
|
30
|
+
blockers: ok ? [] : Object.entries(checks).filter(([, passed]) => !passed).map(([name]) => name)
|
|
31
|
+
});
|
|
32
|
+
function emit(report) {
|
|
33
|
+
console.log(JSON.stringify(report, null, 2));
|
|
34
|
+
if (!report.ok)
|
|
35
|
+
process.exitCode = 1;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=mad-sks-zellij-default-pane-worker-check.js.map
|
|
@@ -40,7 +40,8 @@ const nativeSwarmOk = madCommand.includes('startMadNativeSwarm(')
|
|
|
40
40
|
&& madCommand.includes("route: '$MAD-SKS'")
|
|
41
41
|
&& madCommand.includes("route_command: 'sks --mad native swarm'")
|
|
42
42
|
&& madCommand.includes("same_mission_ledger: true")
|
|
43
|
-
&& madCommand.includes('slotCount:
|
|
43
|
+
&& madCommand.includes('slotCount: 0')
|
|
44
|
+
&& madCommand.includes('zellijSessionName: launch.session_name')
|
|
44
45
|
&& madCommand.includes('mad_sks.native_swarm_started');
|
|
45
46
|
const codexPaneChecks = {
|
|
46
47
|
main_pane_kind: report.main_pane_kind === 'codex_interactive',
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { resolveProviderContext } from '../core/provider/provider-context.js';
|
|
6
|
+
const root = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-provider-context-'));
|
|
7
|
+
const codexHome = path.join(root, '.codex');
|
|
8
|
+
await fs.mkdir(codexHome, { recursive: true });
|
|
9
|
+
const codexLbConfig = [
|
|
10
|
+
'model_provider = "codex-lb"',
|
|
11
|
+
'',
|
|
12
|
+
'[model_providers.codex-lb]',
|
|
13
|
+
'name = "OpenAI"',
|
|
14
|
+
'base_url = "https://lb.example.test"',
|
|
15
|
+
'wire_api = "responses"',
|
|
16
|
+
'env_key = "CODEX_LB_API_KEY"',
|
|
17
|
+
'requires_openai_auth = false',
|
|
18
|
+
''
|
|
19
|
+
].join('\n');
|
|
20
|
+
await fs.writeFile(path.join(codexHome, 'config.toml'), codexLbConfig);
|
|
21
|
+
const configOnlyLb = await resolveProviderContext({
|
|
22
|
+
root,
|
|
23
|
+
codexHome,
|
|
24
|
+
env: { HOME: root, CODEX_LB_API_KEY: 'lb-fixture' },
|
|
25
|
+
route: '$Naruto',
|
|
26
|
+
serviceTier: 'fast'
|
|
27
|
+
});
|
|
28
|
+
await fs.writeFile(path.join(codexHome, 'config.toml'), codexLbConfig.replace('model_provider = "codex-lb"', 'model_provider = "openai"'));
|
|
29
|
+
const openaiSelected = await resolveProviderContext({
|
|
30
|
+
root,
|
|
31
|
+
codexHome,
|
|
32
|
+
env: { HOME: root, OPENAI_API_KEY: 'sk-fixture', CODEX_LB_API_KEY: 'lb-fixture' },
|
|
33
|
+
route: '$Doctor',
|
|
34
|
+
serviceTier: 'fast'
|
|
35
|
+
});
|
|
36
|
+
await fs.writeFile(path.join(codexHome, 'config.toml'), 'model_provider = "codex-lb"\n');
|
|
37
|
+
const malformed = await resolveProviderContext({
|
|
38
|
+
root,
|
|
39
|
+
codexHome,
|
|
40
|
+
env: { HOME: root },
|
|
41
|
+
route: '$Agent',
|
|
42
|
+
serviceTier: 'standard'
|
|
43
|
+
});
|
|
44
|
+
const checks = {
|
|
45
|
+
config_only_codex_lb: configOnlyLb.provider === 'codex-lb' && configOnlyLb.confidence === 'high' && configOnlyLb.source === 'config',
|
|
46
|
+
config_env_key_recorded: configOnlyLb.signals.codex_lb_env_key === 'CODEX_LB_API_KEY',
|
|
47
|
+
openai_selected_with_lb_available: openaiSelected.provider === 'openai' && openaiSelected.signals.codex_lb_available === true,
|
|
48
|
+
malformed_unknown: malformed.provider === 'unknown' && malformed.warnings.includes('codex_lb_provider_config_missing_or_invalid')
|
|
49
|
+
};
|
|
50
|
+
const ok = Object.values(checks).every(Boolean);
|
|
51
|
+
emit({
|
|
52
|
+
schema: 'sks.provider-context-config-toml-check.v1',
|
|
53
|
+
ok,
|
|
54
|
+
checks,
|
|
55
|
+
cases: { configOnlyLb, openaiSelected, malformed },
|
|
56
|
+
blockers: ok ? [] : Object.entries(checks).filter(([, passed]) => !passed).map(([name]) => name)
|
|
57
|
+
});
|
|
58
|
+
function emit(report) {
|
|
59
|
+
console.log(JSON.stringify(report, null, 2));
|
|
60
|
+
if (!report.ok)
|
|
61
|
+
process.exitCode = 1;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=provider-context-config-toml-check.js.map
|
|
@@ -20,8 +20,10 @@ const required = [
|
|
|
20
20
|
'zellij:doctor-readiness',
|
|
21
21
|
'zellij:spawn-on-demand-layout',
|
|
22
22
|
'zellij:worker-pane-manager',
|
|
23
|
+
'zellij:worker-pane-manager-single-owner',
|
|
23
24
|
'safety:mutation-callsite-coverage',
|
|
24
25
|
'mad-sks:zellij-launch',
|
|
26
|
+
'mad-sks:zellij-default-pane-worker',
|
|
25
27
|
'agent:zellij-runtime',
|
|
26
28
|
'agent:worker-pane-communication-contract',
|
|
27
29
|
'codex:0.136-compat',
|
|
@@ -39,7 +41,9 @@ const required = [
|
|
|
39
41
|
'codex-app:fast-ui-preservation',
|
|
40
42
|
'codex-app:ui-clobber-guard',
|
|
41
43
|
'doctor:fixes-codex-app-fast-ui',
|
|
44
|
+
'mad-sks:app-ui-no-mutation',
|
|
42
45
|
'provider:badge-context',
|
|
46
|
+
'provider:context-config-toml',
|
|
43
47
|
'codex-app:provider-badge',
|
|
44
48
|
'runtime:no-mjs-scripts',
|
|
45
49
|
'runtime:ts-python-boundary',
|
|
@@ -4,10 +4,11 @@ import path from 'node:path';
|
|
|
4
4
|
import { packageRoot } from '../core/fsx.js';
|
|
5
5
|
const root = packageRoot();
|
|
6
6
|
const scriptsDir = path.join(root, 'scripts');
|
|
7
|
-
const
|
|
7
|
+
const binDir = path.join(root, 'bin');
|
|
8
|
+
const mjs = [...await collectMjs(scriptsDir), ...await collectMjs(binDir)].sort();
|
|
8
9
|
const packageJson = JSON.parse(await fs.readFile(path.join(root, 'package.json'), 'utf8'));
|
|
9
10
|
const scriptRefs = Object.entries(packageJson.scripts || {})
|
|
10
|
-
.filter(([, command]) => typeof command === 'string' && /(^|[\s;&|])\.\/scripts\/[^ ]+\.mjs\b/.test(command))
|
|
11
|
+
.filter(([, command]) => typeof command === 'string' && /(^|[\s;&|])\.\/(?:scripts|bin)\/[^ ]+\.mjs\b/.test(command))
|
|
11
12
|
.map(([name, command]) => ({ name, command }));
|
|
12
13
|
const ok = mjs.length === 0 && scriptRefs.length === 0;
|
|
13
14
|
emit({
|
|
@@ -58,6 +58,7 @@ const spawnOrder = evaluateZellijWorkerPaneSpawnOrder([
|
|
|
58
58
|
const syntheticRejected = !isRealZellijWorkerPaneIdSource('synthetic_layout_pending_proof')
|
|
59
59
|
&& !isRealZellijWorkerPaneIdSource('zellij_worker_pane_stdout_missing');
|
|
60
60
|
const sourceOk = source.includes("action', 'new-pane'")
|
|
61
|
+
&& source.includes("'--direction', 'right'")
|
|
61
62
|
&& source.includes("'--name', paneName")
|
|
62
63
|
&& source.includes("'--', 'sh', '-lc'")
|
|
63
64
|
&& source.includes('zellij_worker_new_pane_stdout')
|
|
@@ -68,6 +69,8 @@ const ok = artifact.ok
|
|
|
68
69
|
&& artifact.pane_kind === 'worker_codex_sdk'
|
|
69
70
|
&& artifact.provider === 'codex-lb'
|
|
70
71
|
&& artifact.service_tier === 'fast'
|
|
72
|
+
&& artifact.direction_requested === 'right'
|
|
73
|
+
&& artifact.direction_applied === 'not_applied'
|
|
71
74
|
&& artifact.sdk_thread_id === 'sdk-thread-7'
|
|
72
75
|
&& artifact.stream_event_count === 4
|
|
73
76
|
&& artifact.scaling_primitive === 'native_cli_process_in_zellij_worker_pane'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { packageRoot } from '../core/fsx.js';
|
|
5
|
+
const root = packageRoot();
|
|
6
|
+
const managerPath = path.join(root, 'src', 'core', 'zellij', 'zellij-worker-pane-manager.ts');
|
|
7
|
+
const nativePath = path.join(root, 'src', 'core', 'agents', 'native-cli-session-swarm.ts');
|
|
8
|
+
const manager = await fs.readFile(managerPath, 'utf8');
|
|
9
|
+
const native = await fs.readFile(nativePath, 'utf8');
|
|
10
|
+
const managerOwnsNewPane = /runZellij\(\[[\s\S]{0,500}'new-pane'/.test(manager);
|
|
11
|
+
const nativeDirectNewPane = /runZellij\(\[[\s\S]{0,500}'new-pane'/.test(native);
|
|
12
|
+
const nativeUsesManager = native.includes('openWorkerPane({') && native.includes('closeWorkerPane({');
|
|
13
|
+
const directionRight = manager.includes("'--direction', 'right'");
|
|
14
|
+
const fallbackRecorded = manager.includes("direction_applied: input.directionApplied") && manager.includes("directionApplied = 'unknown'");
|
|
15
|
+
const ok = managerOwnsNewPane && !nativeDirectNewPane && nativeUsesManager && directionRight && fallbackRecorded;
|
|
16
|
+
emit({
|
|
17
|
+
schema: 'sks.zellij-worker-pane-manager-single-owner-check.v1',
|
|
18
|
+
ok,
|
|
19
|
+
checks: {
|
|
20
|
+
manager_owns_new_pane: managerOwnsNewPane,
|
|
21
|
+
native_direct_new_pane_absent: !nativeDirectNewPane,
|
|
22
|
+
native_uses_manager: nativeUsesManager,
|
|
23
|
+
direction_right_requested: directionRight,
|
|
24
|
+
fallback_recorded: fallbackRecorded
|
|
25
|
+
},
|
|
26
|
+
blockers: ok ? [] : [
|
|
27
|
+
...(!managerOwnsNewPane ? ['worker_pane_manager_new_pane_missing'] : []),
|
|
28
|
+
...(nativeDirectNewPane ? ['native_cli_session_swarm_direct_new_pane'] : []),
|
|
29
|
+
...(!nativeUsesManager ? ['native_cli_session_swarm_not_using_worker_pane_manager'] : []),
|
|
30
|
+
...(!directionRight ? ['zellij_worker_right_direction_missing'] : []),
|
|
31
|
+
...(!fallbackRecorded ? ['zellij_worker_direction_fallback_not_recorded'] : [])
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
function emit(report) {
|
|
35
|
+
console.log(JSON.stringify(report, null, 2));
|
|
36
|
+
if (!report.ok)
|
|
37
|
+
process.exitCode = 1;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=zellij-worker-pane-manager-single-owner-check.js.map
|
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.2",
|
|
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",
|
|
@@ -68,7 +68,9 @@
|
|
|
68
68
|
"codex-app:fast-ui-preservation": "node ./dist/scripts/codex-app-fast-ui-preservation-check.js",
|
|
69
69
|
"codex-app:ui-clobber-guard": "node ./dist/scripts/codex-app-ui-clobber-guard-check.js",
|
|
70
70
|
"doctor:fixes-codex-app-fast-ui": "node ./dist/scripts/doctor-fixes-codex-app-fast-ui-check.js",
|
|
71
|
+
"mad-sks:app-ui-no-mutation": "node ./dist/scripts/mad-sks-app-ui-no-mutation-check.js",
|
|
71
72
|
"provider:badge-context": "node ./dist/scripts/provider-badge-context-check.js",
|
|
73
|
+
"provider:context-config-toml": "node ./dist/scripts/provider-context-config-toml-check.js",
|
|
72
74
|
"codex-app:provider-badge": "node ./dist/scripts/codex-app-provider-badge-check.js",
|
|
73
75
|
"zellij:launch-command-truth": "node ./dist/scripts/zellij-launch-command-truth-check.js",
|
|
74
76
|
"zellij:real-session-heartbeat": "node ./dist/scripts/zellij-real-session-heartbeat-check.js",
|
|
@@ -124,6 +126,7 @@
|
|
|
124
126
|
"zellij:lane-renderer": "node ./dist/scripts/zellij-lane-renderer-check.js",
|
|
125
127
|
"zellij:doctor-readiness": "node ./dist/scripts/zellij-doctor-readiness-check.js",
|
|
126
128
|
"mad-sks:zellij-launch": "node ./dist/scripts/mad-sks-zellij-launch-check.js",
|
|
129
|
+
"mad-sks:zellij-default-pane-worker": "node ./dist/scripts/mad-sks-zellij-default-pane-worker-check.js",
|
|
127
130
|
"agent:zellij-runtime": "node ./dist/scripts/agent-zellij-runtime-check.js",
|
|
128
131
|
"fast:codex-service-tier-proof": "node ./dist/scripts/fast-codex-service-tier-proof-check.js",
|
|
129
132
|
"codex:project-config-policy-splitter": "node ./dist/scripts/codex-project-config-policy-splitter-check.js",
|
|
@@ -163,7 +166,7 @@
|
|
|
163
166
|
"test:unit": "node --test \"test/unit/**/*.test.mjs\"",
|
|
164
167
|
"test:integration:mock": "node --test \"test/integration/**/*.test.mjs\"",
|
|
165
168
|
"test:e2e:mock": "node --test \"test/e2e/**/*.test.mjs\"",
|
|
166
|
-
"test:blackbox": "node --test --test-
|
|
169
|
+
"test:blackbox": "node --test --test-reporter spec --test-concurrency=1 \"test/blackbox/**/*.test.mjs\"",
|
|
167
170
|
"blackbox:pack-install": "node ./dist/scripts/blackbox-pack-install.js",
|
|
168
171
|
"blackbox:npx": "node ./dist/scripts/blackbox-npx-one-shot.js",
|
|
169
172
|
"blackbox:global-shim": "node ./dist/scripts/blackbox-global-shim.js",
|
|
@@ -283,7 +286,7 @@
|
|
|
283
286
|
"ultra-router:classification": "node ./dist/scripts/ultra-router-classification-check.js",
|
|
284
287
|
"ultra-router:auto-router": "node ./dist/scripts/ultra-router-auto-router-check.js",
|
|
285
288
|
"coverage": "node --experimental-test-coverage --test \"test/**/*.test.mjs\"",
|
|
286
|
-
"release:check": "npm run release:check:parallel && npm run codex-app:fast-ui-preservation && npm run codex-app:ui-clobber-guard && npm run doctor:fixes-codex-app-fast-ui && npm run provider:badge-context && npm run codex-app:provider-badge && npm run zellij:spawn-on-demand-layout && npm run zellij:worker-pane-manager && npm run agent:worker-pane-communication-contract && npm run runtime:no-mjs-scripts && npm run runtime:ts-python-boundary && npm run codex-sdk:capability && npm run codex-sdk:no-legacy-fallback && npm run codex-sdk:backend-router && npm run codex-sdk:structured-output && npm run codex-sdk:event-stream-ledger && npm run codex-sdk:thread-registry && npm run codex-sdk:sandbox-policy && npm run codex-sdk:zellij-pane-binding && npm run codex-sdk:all-pipelines && npm run codex-sdk:dfix-pipeline && npm run codex-sdk:qa-pipeline && npm run codex-sdk:research-pipeline && npm run codex-sdk:team-naruto-agent-pipeline && npm run codex-sdk:release-review-pipeline && npm run codex-sdk:ux-ppt-review-pipeline && npm run codex-sdk:core-skill-pipeline && npm run codex-control:capability && npm run codex-control:no-legacy-fallback && npm run codex-control:structured-output && npm run codex-control:event-stream-ledger && npm run codex-control:thread-registry && npm run codex-control:side-effect-scope && npm run codex-control:all-pipelines && npm run codex-control:empty-result-retry && npm run codex-control:stream-idle-watchdog && npm run codex-control:tool-call-sequence-repair && npm run codex-control:keepalive-no-cot-leak && npm run ultra-router:classification && npm run ultra-router:auto-router && npm run release:version-truth && npm run codex:0.136-compat && npm run codex:0.135-compat && npm run doctor:codex-doctor-parity && npm run codex:permission-profiles && npm run codex:legacy-profile-consumers-removed && npm run terminal:keyboard-enhancement-safety && npm run terminal:tui-output-stability && npm run codex:resume-cwd-truth && npm run mcp:tool-naming-parity && npm run responses:retry-policy-centralized && npm run runtime:no-tmux && npm run zellij:layout-valid && npm run agent:zellij-dynamic-backfill-panes && npm run agent:worker-pane-communication-contract && npm run agent:slot-pane-binding-proof && npm run zellij:worker-pane-manager && npm run zellij:spawn-on-demand-layout && npm run zellij:lane-renderer && npm run mad-sks:zellij-launch && npm run agent:zellij-runtime && npm run codex:config-eperm-fixture && npm run doctor:fix-proves-codex-read && npm run mad:preflight-blocks-unreadable-config && npm run fast:codex-service-tier-proof && npm run codex:project-config-policy-splitter && npm run test:no-orphan-dist-imports && npm run agent:patch-envelope-extraction && npm run agent:patch-queue-runtime && npm run agent:strategy-to-lease-wiring && npm run agent:patch-swarm-runtime && npm run agent:patch-transaction-journal && npm run agent:patch-conflict-rebase && npm run agent:strategy-to-patch-strict && npm run agent:patch-swarm-runtime-truth && npm run agent:rollback-command && npm run agent:patch-verification-dag && npm run agent:patch-rollback-dag && npm run agent:patch-proof-runtime && npm run agent:patch-swarm-route-blackbox && npm run team:patch-swarm-route-blackbox && npm run dfix:patch-swarm-route-blackbox && npm run appshots:thread-attachment-discovery && npm run mcp:readonly-runtime-scheduler && npm run codex:0.134-runner-truth && npm run agent:native-cli-session-swarm && npm run agent:native-cli-session-swarm-10 && npm run agent:native-cli-session-swarm-20 && npm run agent:no-subagent-scaling && npm run agent:native-cli-session-proof && npm run agent:worker-backend-router && npm run agent:codex-child-overlap && npm run agent:model-authored-patch-envelope && npm run agent:fast-mode-default && npm run agent:fast-mode-worker-propagation && npm run codex:fast-mode-profile-propagation && npm run mad-sks:fast-mode-propagation && npm run zellij:launch-command-truth && npm run zellij:real-session-heartbeat && npm run zellij:ui-design && npm run zellij:doctor-readiness && npm run legacy:upgrade-zero-break && npm run publish:packlist-performance && npm run postinstall:safe-side-effects && npm run runtime:ts-rust-boundary && npm run core-skill:card-schema && npm run core-skill:rollout-scoring && npm run core-skill:patch && npm run core-skill:heldout-validation && npm run core-skill:deployment-snapshot && npm run core-skill:no-inference-optimizer && npm run core-skill:route-runtime-integration && npm run core-skill:promotion-side-effect-ledger && npm run core-skill:legacy-promotion-api-audit && npm run safety:side-effect-zero && npm run safety:mutation-callsite-coverage && npm run safety:mutation-callsite-coverage:repo-wide && npm run side-effect:runtime-report && npm run release:gate-planner && npm run release:dynamic-performance && npm run release:provenance && npm run release:gate-budget && npm run agent:wiki-context-proof && npm run shared-memory:check && npm run wrongness:check && npm run wrongness:fixtures && npm run trust:check && npm run git-collaboration:e2e && node ./dist/scripts/release-check-stamp.js write && npm run release:readiness --silent && node ./dist/scripts/release-check-stamp.js write",
|
|
289
|
+
"release:check": "npm run release:check:parallel && npm run mad-sks:app-ui-no-mutation && npm run codex-app:fast-ui-preservation && npm run codex-app:ui-clobber-guard && npm run doctor:fixes-codex-app-fast-ui && npm run provider:badge-context && npm run provider:context-config-toml && npm run codex-app:provider-badge && npm run zellij:spawn-on-demand-layout && npm run zellij:worker-pane-manager && npm run zellij:worker-pane-manager-single-owner && npm run agent:worker-pane-communication-contract && npm run runtime:no-mjs-scripts && npm run runtime:ts-python-boundary && npm run codex-sdk:capability && npm run codex-sdk:no-legacy-fallback && npm run codex-sdk:backend-router && npm run codex-sdk:structured-output && npm run codex-sdk:event-stream-ledger && npm run codex-sdk:thread-registry && npm run codex-sdk:sandbox-policy && npm run codex-sdk:zellij-pane-binding && npm run codex-sdk:all-pipelines && npm run codex-sdk:dfix-pipeline && npm run codex-sdk:qa-pipeline && npm run codex-sdk:research-pipeline && npm run codex-sdk:team-naruto-agent-pipeline && npm run codex-sdk:release-review-pipeline && npm run codex-sdk:ux-ppt-review-pipeline && npm run codex-sdk:core-skill-pipeline && npm run codex-control:capability && npm run codex-control:no-legacy-fallback && npm run codex-control:structured-output && npm run codex-control:event-stream-ledger && npm run codex-control:thread-registry && npm run codex-control:side-effect-scope && npm run codex-control:all-pipelines && npm run codex-control:empty-result-retry && npm run codex-control:stream-idle-watchdog && npm run codex-control:tool-call-sequence-repair && npm run codex-control:keepalive-no-cot-leak && npm run ultra-router:classification && npm run ultra-router:auto-router && npm run release:version-truth && npm run codex:0.136-compat && npm run codex:0.135-compat && npm run doctor:codex-doctor-parity && npm run codex:permission-profiles && npm run codex:legacy-profile-consumers-removed && npm run terminal:keyboard-enhancement-safety && npm run terminal:tui-output-stability && npm run codex:resume-cwd-truth && npm run mcp:tool-naming-parity && npm run responses:retry-policy-centralized && npm run runtime:no-tmux && npm run zellij:layout-valid && npm run agent:zellij-dynamic-backfill-panes && npm run agent:worker-pane-communication-contract && npm run agent:slot-pane-binding-proof && npm run zellij:worker-pane-manager && npm run zellij:spawn-on-demand-layout && npm run zellij:lane-renderer && npm run mad-sks:zellij-launch && npm run mad-sks:zellij-default-pane-worker && npm run agent:zellij-runtime && npm run codex:config-eperm-fixture && npm run doctor:fix-proves-codex-read && npm run mad:preflight-blocks-unreadable-config && npm run fast:codex-service-tier-proof && npm run codex:project-config-policy-splitter && npm run test:no-orphan-dist-imports && npm run agent:patch-envelope-extraction && npm run agent:patch-queue-runtime && npm run agent:strategy-to-lease-wiring && npm run agent:patch-swarm-runtime && npm run agent:patch-transaction-journal && npm run agent:patch-conflict-rebase && npm run agent:strategy-to-patch-strict && npm run agent:patch-swarm-runtime-truth && npm run agent:rollback-command && npm run agent:patch-verification-dag && npm run agent:patch-rollback-dag && npm run agent:patch-proof-runtime && npm run agent:patch-swarm-route-blackbox && npm run team:patch-swarm-route-blackbox && npm run dfix:patch-swarm-route-blackbox && npm run appshots:thread-attachment-discovery && npm run mcp:readonly-runtime-scheduler && npm run codex:0.134-runner-truth && npm run agent:native-cli-session-swarm && npm run agent:native-cli-session-swarm-10 && npm run agent:native-cli-session-swarm-20 && npm run agent:no-subagent-scaling && npm run agent:native-cli-session-proof && npm run agent:worker-backend-router && npm run agent:codex-child-overlap && npm run agent:model-authored-patch-envelope && npm run agent:fast-mode-default && npm run agent:fast-mode-worker-propagation && npm run codex:fast-mode-profile-propagation && npm run mad-sks:fast-mode-propagation && npm run zellij:launch-command-truth && npm run zellij:real-session-heartbeat && npm run zellij:ui-design && npm run zellij:doctor-readiness && npm run legacy:upgrade-zero-break && npm run publish:packlist-performance && npm run postinstall:safe-side-effects && npm run runtime:ts-rust-boundary && npm run core-skill:card-schema && npm run core-skill:rollout-scoring && npm run core-skill:patch && npm run core-skill:heldout-validation && npm run core-skill:deployment-snapshot && npm run core-skill:no-inference-optimizer && npm run core-skill:route-runtime-integration && npm run core-skill:promotion-side-effect-ledger && npm run core-skill:legacy-promotion-api-audit && npm run safety:side-effect-zero && npm run safety:mutation-callsite-coverage && npm run safety:mutation-callsite-coverage:repo-wide && npm run side-effect:runtime-report && npm run release:gate-planner && npm run release:dynamic-performance && npm run release:provenance && npm run release:gate-budget && npm run agent:wiki-context-proof && npm run shared-memory:check && npm run wrongness:check && npm run wrongness:fixtures && npm run trust:check && npm run git-collaboration:e2e && node ./dist/scripts/release-check-stamp.js write && npm run release:readiness --silent && node ./dist/scripts/release-check-stamp.js write",
|
|
287
290
|
"release:real-check": "node ./dist/scripts/release-real-check.js && npm run codex-control:real-smoke -- --require-real && npm run codex-sdk:real-smoke -- --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",
|
|
288
291
|
"release:publish": "npm run publish:npm",
|
|
289
292
|
"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/release-check-stamp.js verify && npm run release:provenance -- --publish && npm run release:dist-freshness && npm --cache /tmp/sks-npm-cache publish --dry-run --registry https://registry.npmjs.org/ --access public",
|
|
@@ -442,6 +445,7 @@
|
|
|
442
445
|
"mad-sks:fast-mode-propagation": "node ./dist/scripts/mad-sks-fast-mode-propagation-check.js",
|
|
443
446
|
"zellij:spawn-on-demand-layout": "node ./dist/scripts/zellij-spawn-on-demand-layout-check.js",
|
|
444
447
|
"zellij:worker-pane-manager": "node ./dist/scripts/zellij-worker-pane-manager-check.js",
|
|
448
|
+
"zellij:worker-pane-manager-single-owner": "node ./dist/scripts/zellij-worker-pane-manager-single-owner-check.js",
|
|
445
449
|
"zellij:worker-pane-spawn-order": "node ./dist/scripts/zellij-worker-pane-spawn-order-check.js",
|
|
446
450
|
"agent:slot-pane-binding-proof": "node ./dist/scripts/agent-slot-pane-binding-proof-check.js",
|
|
447
451
|
"agent:worker-pane-communication-contract": "node ./dist/scripts/worker-pane-communication-contract-check.js",
|