sneakoscope 2.0.1 → 2.0.4

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 (74) hide show
  1. package/README.md +26 -5
  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 +28 -8
  8. package/dist/cli/command-registry.js +2 -0
  9. package/dist/commands/doctor.js +29 -3
  10. package/dist/core/agents/agent-command-surface.js +13 -3
  11. package/dist/core/agents/agent-orchestrator.js +92 -4
  12. package/dist/core/agents/agent-output-validator.js +2 -1
  13. package/dist/core/agents/agent-patch-proof.js +5 -0
  14. package/dist/core/agents/agent-patch-schema.js +2 -1
  15. package/dist/core/agents/agent-proof-evidence.js +26 -0
  16. package/dist/core/agents/agent-roster.js +1 -1
  17. package/dist/core/agents/agent-runner-ollama.js +411 -0
  18. package/dist/core/agents/agent-schema.js +1 -1
  19. package/dist/core/agents/intelligent-work-graph.js +45 -3
  20. package/dist/core/agents/native-cli-session-swarm.js +8 -1
  21. package/dist/core/agents/native-cli-worker.js +1 -1
  22. package/dist/core/agents/native-worker-backend-router.js +44 -2
  23. package/dist/core/agents/ollama-worker-config.js +118 -0
  24. package/dist/core/auto-review.js +39 -6
  25. package/dist/core/codex-app/codex-app-fast-ui-repair.js +42 -3
  26. package/dist/core/codex-control/codex-fake-sdk-adapter.js +20 -0
  27. package/dist/core/codex-control/codex-output-schemas.js +5 -1
  28. package/dist/core/codex-control/gpt-final-arbiter.js +160 -0
  29. package/dist/core/codex-control/gpt-final-context-compressor.js +17 -0
  30. package/dist/core/codex-control/gpt-final-proof-pack.js +120 -0
  31. package/dist/core/codex-control/gpt-final-review-schema.js +71 -0
  32. package/dist/core/commands/basic-cli.js +36 -1
  33. package/dist/core/commands/local-model-command.js +120 -0
  34. package/dist/core/commands/mad-sks-command.js +58 -9
  35. package/dist/core/commands/naruto-command.js +77 -5
  36. package/dist/core/commands/run-command.js +33 -1
  37. package/dist/core/commands/team-command.js +31 -2
  38. package/dist/core/doctor/doctor-readiness-matrix.js +19 -0
  39. package/dist/core/feature-fixtures.js +5 -0
  40. package/dist/core/fsx.js +1 -1
  41. package/dist/core/git-simple.js +143 -4
  42. package/dist/core/hooks-runtime.js +1 -1
  43. package/dist/core/init.js +2 -0
  44. package/dist/core/local-llm/local-collaboration-policy.js +93 -0
  45. package/dist/core/local-llm/local-llm-config.js +15 -0
  46. package/dist/core/pipeline/final-gpt-patch-stage.js +31 -0
  47. package/dist/core/pipeline/final-gpt-review-stage.js +5 -0
  48. package/dist/core/provider/provider-context.js +72 -9
  49. package/dist/core/retention.js +11 -0
  50. package/dist/core/routes.js +21 -1
  51. package/dist/core/safety/mutation-guard.js +2 -0
  52. package/dist/core/team-live.js +7 -1
  53. package/dist/core/update-check.js +215 -25
  54. package/dist/core/verification/verification-worker-pool.js +12 -0
  55. package/dist/core/version.js +1 -1
  56. package/dist/core/zellij/zellij-worker-pane-manager.js +19 -2
  57. package/dist/scripts/agent-ast-aware-work-graph-check.js +1 -1
  58. package/dist/scripts/codex-sdk-team-naruto-agent-pipeline-check.js +2 -1
  59. package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +12 -2
  60. package/dist/scripts/gpt-final-arbiter-check.js +63 -0
  61. package/dist/scripts/gpt-final-arbiter-performance-check.js +36 -0
  62. package/dist/scripts/local-collab-gpt-final-availability-check.js +58 -0
  63. package/dist/scripts/local-collab-no-local-only-final-check.js +27 -0
  64. package/dist/scripts/local-collab-policy-check.js +17 -0
  65. package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +92 -0
  66. package/dist/scripts/mad-sks-zellij-default-pane-worker-check.js +37 -0
  67. package/dist/scripts/mad-sks-zellij-launch-check.js +2 -1
  68. package/dist/scripts/provider-context-config-toml-check.js +63 -0
  69. package/dist/scripts/release-gate-existence-audit.js +4 -0
  70. package/dist/scripts/runtime-no-mjs-scripts-check.js +3 -2
  71. package/dist/scripts/zellij-worker-pane-manager-check.js +3 -0
  72. package/dist/scripts/zellij-worker-pane-manager-single-owner-check.js +39 -0
  73. package/package.json +13 -4
  74. package/schemas/local-llm/local-collaboration-policy.schema.json +57 -0
@@ -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: madNativeSwarm.lane_count || 1')
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 mjs = await collectMjs(scriptsDir);
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.1",
4
+ "version": "2.0.4",
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-force-exit --test-concurrency=1 \"test/blackbox/**/*.test.mjs\"",
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",
@@ -280,11 +283,16 @@
280
283
  "codex-control:tool-call-sequence-repair": "node ./dist/scripts/codex-control-tool-call-sequence-repair-check.js",
281
284
  "codex-control:keepalive-no-cot-leak": "node ./dist/scripts/codex-control-keepalive-no-cot-leak-check.js",
282
285
  "codex-control:real-smoke": "node ./dist/scripts/codex-sdk-real-smoke-check.js",
286
+ "local-collab:policy": "node ./dist/scripts/local-collab-policy-check.js",
287
+ "local-collab:gpt-final-arbiter": "node ./dist/scripts/gpt-final-arbiter-check.js",
288
+ "local-collab:no-local-only-final": "node ./dist/scripts/local-collab-no-local-only-final-check.js",
289
+ "local-collab:gpt-final-availability": "node ./dist/scripts/local-collab-gpt-final-availability-check.js",
290
+ "local-collab:gpt-final-performance": "node ./dist/scripts/gpt-final-arbiter-performance-check.js",
283
291
  "ultra-router:classification": "node ./dist/scripts/ultra-router-classification-check.js",
284
292
  "ultra-router:auto-router": "node ./dist/scripts/ultra-router-auto-router-check.js",
285
293
  "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",
287
- "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",
294
+ "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 local-collab:policy && npm run local-collab:gpt-final-arbiter && npm run local-collab:no-local-only-final && npm run local-collab:gpt-final-availability && 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",
295
+ "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 && SKS_REQUIRE_LOCAL_LLM=1 SKS_REQUIRE_GPT_FINAL=1 npm run local-collab:gpt-final-performance",
288
296
  "release:publish": "npm run publish:npm",
289
297
  "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",
290
298
  "publish:npm": "npm --cache /tmp/sks-npm-cache publish --registry https://registry.npmjs.org/ --access public",
@@ -442,6 +450,7 @@
442
450
  "mad-sks:fast-mode-propagation": "node ./dist/scripts/mad-sks-fast-mode-propagation-check.js",
443
451
  "zellij:spawn-on-demand-layout": "node ./dist/scripts/zellij-spawn-on-demand-layout-check.js",
444
452
  "zellij:worker-pane-manager": "node ./dist/scripts/zellij-worker-pane-manager-check.js",
453
+ "zellij:worker-pane-manager-single-owner": "node ./dist/scripts/zellij-worker-pane-manager-single-owner-check.js",
445
454
  "zellij:worker-pane-spawn-order": "node ./dist/scripts/zellij-worker-pane-spawn-order-check.js",
446
455
  "agent:slot-pane-binding-proof": "node ./dist/scripts/agent-slot-pane-binding-proof-check.js",
447
456
  "agent:worker-pane-communication-contract": "node ./dist/scripts/worker-pane-communication-contract-check.js",
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sks.local-collaboration-policy.v1",
4
+ "type": "object",
5
+ "required": [
6
+ "schema",
7
+ "mode",
8
+ "gpt_final_required",
9
+ "gpt_final_backend_must_be_remote",
10
+ "local_only_draft",
11
+ "final_accepted_statuses",
12
+ "final_patch_source_when_enabled",
13
+ "blockers"
14
+ ],
15
+ "properties": {
16
+ "schema": {
17
+ "const": "sks.local-collaboration-policy.v1"
18
+ },
19
+ "mode": {
20
+ "enum": [
21
+ "disabled",
22
+ "local-draft-gpt-final",
23
+ "local-worker-gpt-orchestrator",
24
+ "local-parallel-gpt-final",
25
+ "local-only-draft"
26
+ ]
27
+ },
28
+ "gpt_final_required": {
29
+ "type": "boolean"
30
+ },
31
+ "gpt_final_backend_must_be_remote": {
32
+ "type": "boolean"
33
+ },
34
+ "local_only_draft": {
35
+ "type": "boolean"
36
+ },
37
+ "final_accepted_statuses": {
38
+ "type": "array",
39
+ "items": {
40
+ "enum": [
41
+ "approved",
42
+ "modified"
43
+ ]
44
+ }
45
+ },
46
+ "final_patch_source_when_enabled": {
47
+ "const": "gpt_final_arbiter"
48
+ },
49
+ "blockers": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "string"
53
+ }
54
+ }
55
+ },
56
+ "additionalProperties": true
57
+ }