sneakoscope 6.1.2 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +11 -4
  2. package/crates/sks-core/Cargo.lock +1 -1
  3. package/crates/sks-core/Cargo.toml +1 -1
  4. package/dist/cli/install-helpers.js +8 -3
  5. package/dist/config/skills-manifest.json +58 -58
  6. package/dist/core/agents/agent-effort-policy.js +28 -17
  7. package/dist/core/agents/agent-schema.js +1 -1
  8. package/dist/core/codex/codex-config-guard.js +178 -7
  9. package/dist/core/codex/codex-config-readability.js +21 -8
  10. package/dist/core/codex/codex-config-toml.js +14 -11
  11. package/dist/core/codex-app/mcp-manager.js +679 -0
  12. package/dist/core/codex-app/sks-menubar.js +405 -6
  13. package/dist/core/codex-control/codex-lb-launch-recovery.js +15 -0
  14. package/dist/core/codex-native/core-skill-manifest.js +1 -1
  15. package/dist/core/commands/mad-sks-command.js +44 -3
  16. package/dist/core/commands/menubar-command.js +94 -0
  17. package/dist/core/commands/naruto-command.js +3 -1
  18. package/dist/core/commands/wiki-command.js +11 -5
  19. package/dist/core/fsx.js +1 -0
  20. package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +14 -8
  21. package/dist/core/hooks-runtime/naruto-decision-gate.js +184 -0
  22. package/dist/core/hooks-runtime/stop-repeat-guard.js +89 -0
  23. package/dist/core/hooks-runtime.js +36 -105
  24. package/dist/core/init/skills.js +4 -4
  25. package/dist/core/init.js +1 -1
  26. package/dist/core/managed-assets/managed-assets-manifest.js +178 -29
  27. package/dist/core/preflight/parallel-preflight-engine.js +16 -3
  28. package/dist/core/proof/route-adapter.js +1 -1
  29. package/dist/core/proof/selftest-proof-fixtures.js +3 -5
  30. package/dist/core/provider/model-router.js +15 -6
  31. package/dist/core/release/package-size-budget.js +4 -6
  32. package/dist/core/research/research-plan-markdown.js +123 -0
  33. package/dist/core/research/research-super-search.js +8 -4
  34. package/dist/core/research.js +4 -119
  35. package/dist/core/retention.js +70 -2
  36. package/dist/core/routes/dollar-manifest-lite.js +1 -1
  37. package/dist/core/routes.js +75 -22
  38. package/dist/core/subagents/agent-catalog.js +87 -15
  39. package/dist/core/subagents/model-policy.js +189 -48
  40. package/dist/core/subagents/naruto-help-contract.js +11 -4
  41. package/dist/core/subagents/official-subagent-preparation.js +55 -9
  42. package/dist/core/subagents/official-subagent-prompt.js +45 -23
  43. package/dist/core/subagents/thread-budget.js +1 -1
  44. package/dist/core/subagents/triwiki-attention.js +117 -14
  45. package/dist/core/triwiki/code-pack-head-freshness.js +291 -0
  46. package/dist/core/version.js +1 -1
  47. package/dist/core/zellij/zellij-launcher.js +12 -2
  48. package/dist/core/zellij/zellij-pane-proof.js +9 -1
  49. package/dist/core/zellij/zellij-update.js +14 -1
  50. package/dist/scripts/canonical-test-runner.js +7 -1
  51. package/dist/scripts/codex-lb-fast-mode-truth-check.js +11 -1
  52. package/dist/scripts/codex-lb-fast-ui-preservation-check.js +9 -2
  53. package/dist/scripts/codex-lb-gpt56-fast-profile-check.js +13 -2
  54. package/dist/scripts/codex-native-agent-role-content-check.js +13 -1
  55. package/dist/scripts/codex-sdk-backend-router-check.js +2 -0
  56. package/dist/scripts/lib/codex-sdk-gate-lib.js +4 -0
  57. package/dist/scripts/official-subagent-workflow-check.js +1 -1
  58. package/dist/scripts/packlist-performance-check.js +1 -18
  59. package/dist/scripts/python-codex-sdk-all-pipelines-check.js +8 -0
  60. package/dist/scripts/sks-menubar-install-check.js +6 -1
  61. package/dist/scripts/super-search-provider-interface-check.js +31 -18
  62. package/package.json +3 -1
  63. package/dist/scripts/codex-0139-feature-probes-check.js +0 -30
  64. package/dist/scripts/codex-0139-marketplace-source-check.js +0 -13
@@ -5,6 +5,7 @@ import path from 'node:path';
5
5
  import { codexFastModeDesktopStatus, codexLbConfigPath, configureCodexLb, ensureGlobalCodexFastModeDuringInstall, releaseCodexLbAuthHold, repairCodexLbAuth } from '../cli/install-helpers.js';
6
6
  import { repairCodexConfigStructure, splitCodexProjectConfigPolicy } from '../core/codex/codex-project-config-policy.js';
7
7
  import { parseCodexConfigToml, validateCodexConfigRoundTrip } from '../core/codex/codex-config-toml.js';
8
+ import { CODEX_LB_TOOL_OUTPUT_RECOVERY_MIN_VERSION } from '../core/codex-lb/codex-lb-tool-output-recovery.js';
8
9
  import { normalizeCodexLbToolCatalog } from '../core/codex-lb/codex-lb-tool-catalog.js';
9
10
  const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-codex-lb-gpt56-fast-'));
10
11
  const home = path.join(tmp, 'home');
@@ -29,13 +30,14 @@ const setup = await configureCodexLb({
29
30
  forceFastMode: true,
30
31
  forceCodexLbApiKeyAuth: true,
31
32
  authMode: 'codex-lb',
32
- shellProfile: 'skip'
33
+ shellProfile: 'skip',
34
+ toolOutputRecoveryFetch
33
35
  });
34
36
  const fastOn = await ensureGlobalCodexFastModeDuringInstall({ home, configPath, forceFastMode: true });
35
37
  const first = assertFastProfile(await fs.readFile(configPath, 'utf8'), 'setup_fast_on');
36
38
  const release = await releaseCodexLbAuthHold({ home, configPath, authPath, backupPath: oauthBackupPath });
37
39
  const afterOauth = assertFastProfile(await fs.readFile(configPath, 'utf8'), 'use_oauth_roundtrip');
38
- const repair = await repairCodexLbAuth({ home, configPath, envPath, forceCodexLbApiKeyAuth: true, forceFastMode: true, authMode: 'codex-lb' });
40
+ const repair = await repairCodexLbAuth({ home, configPath, envPath, forceCodexLbApiKeyAuth: true, forceFastMode: true, authMode: 'codex-lb', toolOutputRecoveryFetch });
39
41
  await fs.writeFile(projectConfig, [
40
42
  '# SKS managed fixture',
41
43
  'default_profile = "sks-fast-high"',
@@ -154,4 +156,13 @@ function codex0144Model(slug) {
154
156
  minimal_client_version: '0.144.1'
155
157
  };
156
158
  }
159
+ async function toolOutputRecoveryFetch() {
160
+ return new Response('{}', {
161
+ status: 200,
162
+ headers: {
163
+ 'content-type': 'application/json',
164
+ 'x-app-version': CODEX_LB_TOOL_OUTPUT_RECOVERY_MIN_VERSION
165
+ }
166
+ });
167
+ }
157
168
  //# sourceMappingURL=codex-lb-gpt56-fast-profile-check.js.map
@@ -10,16 +10,28 @@ const codexHome = path.join(root, 'codex-home');
10
10
  const report = await syncCodexAgentRoles({ root, codexHome, apply: true, agentTypeSupported: true });
11
11
  const expert = await fs.promises.readFile(path.join(root, '.codex', 'agents', 'expert.toml'), 'utf8');
12
12
  const worker = await fs.promises.readFile(path.join(root, '.codex', 'agents', 'worker.toml'), 'utf8');
13
+ const implementation = await fs.promises.readFile(path.join(root, '.codex', 'agents', 'implementation-specialist.toml'), 'utf8');
14
+ const browser = await fs.promises.readFile(path.join(root, '.codex', 'agents', 'browser-use-operator.toml'), 'utf8');
13
15
  assertGate(expert.includes('model = "gpt-5.6-sol"') && expert.includes('model_reasoning_effort = "max"'), 'expert role must use Sol Max');
14
16
  assertGate(worker.includes('model = "gpt-5.6-luna"') && worker.includes('model_reasoning_effort = "max"'), 'worker role must use Luna Max');
17
+ assertGate(implementation.includes('model = "gpt-5.6-sol"') && implementation.includes('model_reasoning_effort = "high"'), 'implementation role must use Sol High');
18
+ assertGate(browser.includes('model = "gpt-5.6-terra"') && browser.includes('model_reasoning_effort = "medium"'), 'browser role must use Terra Medium');
15
19
  assertGate(expert.includes('Do not spawn another subagent.') && worker.includes('Do not redesign the task, expand scope, or spawn another subagent.'), 'official roles must prohibit nested delegation');
16
20
  for (const role of MANAGED_OFFICIAL_SUBAGENT_ROLES) {
17
21
  const text = await fs.promises.readFile(path.join(root, '.codex', 'agents', role.filename), 'utf8');
18
22
  const doc = parse(text);
19
- assertGate(doc.name === role.codex_name && doc.model === role.model && doc.model_reasoning_effort === 'max', `official role policy mismatch:${role.codex_name}`);
23
+ assertGate(doc.name === role.codex_name && doc.model === role.model && doc.model_reasoning_effort === role.model_reasoning_effort, `official role policy mismatch:${role.codex_name}`);
20
24
  assertGate(Object.hasOwn(doc, 'sandbox_mode') === (role.sandbox === 'read-only'), `official role sandbox inheritance mismatch:${role.codex_name}`);
21
25
  assertGate(doc.sandbox_mode === role.sandbox, `official role sandbox value mismatch:${role.codex_name}`);
22
26
  }
27
+ const distribution = Object.fromEntries(['luna_max_mechanical', 'sol_high_implementation', 'sol_max_judgment', 'terra_medium_context_tools']
28
+ .map((policy) => [policy, MANAGED_OFFICIAL_SUBAGENT_ROLES.filter((role) => role.model_policy === policy).length]));
29
+ assertGate(JSON.stringify(distribution) === JSON.stringify({
30
+ luna_max_mechanical: 1,
31
+ sol_high_implementation: 3,
32
+ sol_max_judgment: 15,
33
+ terra_medium_context_tools: 6
34
+ }), 'official role policy distribution mismatch');
23
35
  assertGate(!fs.existsSync(path.join(codexHome, 'agents')), 'agent role sync must not create global directive roles');
24
36
  assertGate(report.strategy === 'agent_type' && report.probe_artifact_path && report.clobbered_user_roles === false && report.official_roles.length === MANAGED_OFFICIAL_SUBAGENT_ROLES.length, 'agent role report strategy/probe/catalog/no-clobber fields missing');
25
37
  emitGate('codex-native:agent-role-content');
@@ -9,6 +9,7 @@ const root = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-codex-sdk-router-'));
9
9
  const old = snapshotEnv();
10
10
  process.env.NODE_ENV = 'test';
11
11
  process.env.SKS_CODEX_SDK_FAKE = '1';
12
+ process.env.SKS_CODEX_LB_AUTOBYPASS = '1';
12
13
  process.env.SKS_DISABLE_ROUTE_RECURSION = '1';
13
14
  process.env.SKS_AGENT_WORKER = '1';
14
15
  process.env.SKS_FAST_MODE = '1';
@@ -48,6 +49,7 @@ function snapshotEnv() {
48
49
  return {
49
50
  NODE_ENV: process.env.NODE_ENV,
50
51
  SKS_CODEX_SDK_FAKE: process.env.SKS_CODEX_SDK_FAKE,
52
+ SKS_CODEX_LB_AUTOBYPASS: process.env.SKS_CODEX_LB_AUTOBYPASS,
51
53
  SKS_DISABLE_ROUTE_RECURSION: process.env.SKS_DISABLE_ROUTE_RECURSION,
52
54
  SKS_AGENT_WORKER: process.env.SKS_AGENT_WORKER,
53
55
  SKS_FAST_MODE: process.env.SKS_FAST_MODE,
@@ -17,6 +17,9 @@ export async function runFakeCodexSdkTaskFixture(label = 'fixture', extra = {})
17
17
  const old = snapshotEnv();
18
18
  process.env.NODE_ENV = 'test';
19
19
  process.env.SKS_CODEX_SDK_FAKE = '1';
20
+ // Hermetic fixture runs must not inherit an operator's live codex-lb
21
+ // selection. The fake adapter exercises control-plane contracts only.
22
+ process.env.SKS_CODEX_LB_AUTOBYPASS = '1';
20
23
  try {
21
24
  const result = await mod.runCodexTask({
22
25
  route: extra.route || '$Agent',
@@ -78,6 +81,7 @@ function snapshotEnv() {
78
81
  return {
79
82
  NODE_ENV: process.env.NODE_ENV,
80
83
  SKS_CODEX_SDK_FAKE: process.env.SKS_CODEX_SDK_FAKE,
84
+ SKS_CODEX_LB_AUTOBYPASS: process.env.SKS_CODEX_LB_AUTOBYPASS,
81
85
  SKS_CODEX_SDK_FIXTURE: process.env.SKS_CODEX_SDK_FIXTURE
82
86
  };
83
87
  }
@@ -12,7 +12,7 @@ const counts = [4, 8, 12, 20, 100].map((requested) => resolveSubagentThreadBudge
12
12
  configuredMaxThreads: requested === 20 ? 12 : undefined
13
13
  }));
14
14
  const implicitCount = resolveSubagentThreadBudget();
15
- assertGate(implicitCount.requestedSubagents === 1, 'implicit Naruto must default to one safe child', implicitCount);
15
+ assertGate(implicitCount.requestedSubagents === 2, 'implicit Naruto must default to two independent children', implicitCount);
16
16
  assertGate(counts[0]?.requestedSubagents === 4, 'requested 4 must remain 4', counts);
17
17
  assertGate(counts[1]?.requestedSubagents === 8, 'requested 8 must remain 8', counts);
18
18
  assertGate(counts[2]?.requestedSubagents === 12, 'requested 12 must remain 12', counts);
@@ -9,24 +9,7 @@ import { writeNpmPackProof } from '../core/release/npm-pack-proof.js';
9
9
  import { assertGate, emitGate, root } from './sks-1-18-gate-lib.js';
10
10
  const MAX_FILES = Number(process.env.SKS_MAX_PACK_FILES || 2100);
11
11
  const MAX_UNPACKED = Number(process.env.SKS_MAX_UNPACKED_BYTES || DEFAULT_MAX_UNPACKED_BYTES);
12
- // Raised from 2300 KiB after the 5.4.0 dollar-command hardening pass added
13
- // src/core/feature-fixture-executor.ts and expanded several command modules
14
- // (route-success-helpers.ts, seo-command.ts, ppt-command.ts, qa-loop-command.ts,
15
- // research-command.ts, image-ux-review-command.ts, mad-sks-command.ts,
16
- // sks-menubar.ts) with genuine new production logic, pushing the packed size
17
- // to ~2306 KiB. 5.7.0 adds doctor/update migration repair coverage and publish
18
- // contract checks, pushing the packed tarball to ~2345 KiB. 5.9.0 adds quantum
19
- // release evidence scripts (installed package smoke, perf budgets, scorecard,
20
- // Super-Search contracts, and parallel smoke), pushing the packed tarball to
21
- // ~2354 KiB. Keep a narrow cap rather than giving the package a broad size
22
- // budget. 5.11.0 adds package-referenced integrity gates for SEO marketing,
23
- // Naruto write E2E, high-risk contracts, scorecards, and retention long-run
24
- // checks; keep those scripts publishable because package contract validation
25
- // rejects scripts that point at files absent from the tarball. 5.12.0 adds ops
26
- // maturity diagnostics, migration/recovery smokes, and their package-referenced
27
- // gates, pushing the packed tarball to ~2400 KiB. 6.0.3 adds the menu restart
28
- // lifecycle and Naruto GPT-5.6 routing enforcement, bringing the measured
29
- // packed size to ~2411 KiB; keep the next 1 KiB boundary as the narrow cap.
12
+ // Shared measured budgets stay centralized and intentionally narrow.
30
13
  const MAX_PACKED = Number(process.env.SKS_MAX_PACK_BYTES || DEFAULT_MAX_PACK_BYTES);
31
14
  const SURFACE_MAX_PACKED = Number(process.env.SKS_PACKAGE_SURFACE_MAX_PACK_BYTES || 25_000_000);
32
15
  const SURFACE_MAX_FILES = Number(process.env.SKS_PACKAGE_SURFACE_MAX_FILES || 2500);
@@ -13,7 +13,11 @@ const mod = await importDist('core/codex-control/codex-control-plane.js');
13
13
  const schema = await importDist('core/codex-control/schemas/agent-worker-result.schema.js');
14
14
  const tmp = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-python-codex-sdk-pipeline-'));
15
15
  const oldFake = process.env.SKS_PYTHON_CODEX_SDK_FAKE;
16
+ const oldCodexLbAutobypass = process.env.SKS_CODEX_LB_AUTOBYPASS;
16
17
  process.env.SKS_PYTHON_CODEX_SDK_FAKE = '1';
18
+ // Keep the hermetic fake backend independent from an operator's live
19
+ // codex-lb configuration. This fixture validates the Python SDK pipeline only.
20
+ process.env.SKS_CODEX_LB_AUTOBYPASS = '1';
17
21
  try {
18
22
  const result = await mod.runCodexTask({
19
23
  route: '$Agent',
@@ -43,5 +47,9 @@ finally {
43
47
  delete process.env.SKS_PYTHON_CODEX_SDK_FAKE;
44
48
  else
45
49
  process.env.SKS_PYTHON_CODEX_SDK_FAKE = oldFake;
50
+ if (oldCodexLbAutobypass === undefined)
51
+ delete process.env.SKS_CODEX_LB_AUTOBYPASS;
52
+ else
53
+ process.env.SKS_CODEX_LB_AUTOBYPASS = oldCodexLbAutobypass;
46
54
  }
47
55
  //# sourceMappingURL=python-codex-sdk-all-pipelines-check.js.map
@@ -109,7 +109,11 @@ const hasBackgroundReadonlyActions = generatedSource.includes('runSksBackground(
109
109
  && !generatedSource.includes('runInTerminal');
110
110
  const hasNativeModalSource = generatedSource.includes('func promptText(title: String, message: String')
111
111
  && generatedSource.includes('NSSecureTextField')
112
- && generatedSource.includes('stdinText: key + "\\n"');
112
+ && generatedSource.includes('stdinText: key + "\\n"')
113
+ && generatedSource.includes('final class McpManagerController')
114
+ && generatedSource.includes('add(menu, "Manage MCP Servers…", #selector(manageMcpServers))')
115
+ && generatedSource.includes('["menubar", "mcp", "list", "--json"]')
116
+ && generatedSource.includes('["menubar", "mcp", "add", "--stdin-json", "--json"]');
113
117
  const hasActionLogSource = generatedSource.includes('lastActionLogPath')
114
118
  && generatedSource.includes('.posixPermissions: 0o600')
115
119
  && generatedSource.includes('redactSecrets');
@@ -177,6 +181,7 @@ const expectedMenuItems = [
177
181
  'Update SKS Now',
178
182
  'Codex CLI Version',
179
183
  'Update Codex CLI Now',
184
+ 'Manage MCP Servers',
180
185
  'Run sks doctor --fix',
181
186
  'View Last Log'
182
187
  ];
@@ -6,22 +6,35 @@ import path from 'node:path';
6
6
  import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
7
7
  const mod = await importDist('core/super-search/index.js');
8
8
  const missionDir = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-super-search-'));
9
- const result = await mod.runSuperSearch({
10
- missionDir,
11
- query: 'npm package docs',
12
- mode: 'balanced',
13
- context7: async () => [{ title: 'npm docs', url: 'https://docs.npmjs.com', snippet: 'official docs' }],
14
- codexWebSearch: async () => [{ title: 'npm registry', url: 'https://www.npmjs.com/package/npm', snippet: 'registry' }],
15
- env: { SKS_CODEX_WEB_SEARCH_AVAILABLE: '1' }
16
- });
17
- assertGate(result.proof.provider_independent === true, 'Super-Search proof must be provider-independent', result.proof);
18
- assertGate(result.proof.xai_runtime_dependency === false, 'Super-Search must not require xAI runtime', result.proof);
19
- assertGate(result.sources.some((source) => source.acquisition_verdict === 'verified_content'), 'Super-Search must normalize verified source evidence', result.sources);
20
- assertGate(result.convergence.schema === 'sks.super-search-convergence.v1', 'Super-Search convergence artifact must be typed', result.convergence);
21
- emitGate('super-search:provider-interface', {
22
- mode: result.mode,
23
- sources: result.sources.length,
24
- verified: result.proof.verified_source_count,
25
- xai_runtime_dependency: result.proof.xai_runtime_dependency
26
- });
9
+ const originalFetch = globalThis.fetch;
10
+ globalThis.fetch = async (url) => new Response(`Verified provider-interface fixture content for ${url}. This body is long enough to prove hydrated source handling without relying on external network availability or a discovery snippet.`, { status: 200, headers: { 'content-type': 'text/plain' } });
11
+ try {
12
+ const result = await mod.runSuperSearch({
13
+ missionDir,
14
+ query: 'Node.js package and npm registry docs',
15
+ mode: 'balanced',
16
+ context7: async () => [{
17
+ title: 'Node.js package documentation',
18
+ url: 'https://nodejs.org/api/packages.html',
19
+ snippet: 'official package docs',
20
+ content: 'Verified Context7 documentation content for Node.js package behavior. This materialized source is intentionally meaningful and independent from the npm registry source used by the web adapter.'
21
+ }],
22
+ codexWebSearch: async () => [{ title: 'npm registry', url: 'https://www.npmjs.com/package/npm', snippet: 'registry result' }],
23
+ env: { SKS_CODEX_WEB_SEARCH_AVAILABLE: '1' }
24
+ });
25
+ assertGate(result.proof.provider_independent === true, 'Super-Search proof must be provider-independent', result.proof);
26
+ assertGate(result.proof.xai_runtime_dependency === false, 'Super-Search must not require xAI runtime', result.proof);
27
+ assertGate(result.sources.some((source) => source.acquisition_verdict === 'verified_content'), 'Super-Search must normalize verified source evidence', result.sources);
28
+ assertGate(result.convergence.schema === 'sks.super-search-convergence.v1', 'Super-Search convergence artifact must be typed', result.convergence);
29
+ emitGate('super-search:provider-interface', {
30
+ mode: result.mode,
31
+ sources: result.sources.length,
32
+ verified: result.proof.verified_source_count,
33
+ xai_runtime_dependency: result.proof.xai_runtime_dependency
34
+ });
35
+ }
36
+ finally {
37
+ globalThis.fetch = originalFetch;
38
+ await fs.rm(missionDir, { recursive: true, force: true });
39
+ }
27
40
  //# sourceMappingURL=super-search-provider-interface-check.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sneakoscope",
3
3
  "displayName": "ㅅㅋㅅ",
4
- "version": "6.1.2",
4
+ "version": "6.2.0",
5
5
  "description": "Proof-first Codex trust layer for bounded agent workflows, search visibility evidence, and release integrity gates.",
6
6
  "type": "module",
7
7
  "homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",
@@ -36,6 +36,8 @@
36
36
  "!dist/scripts/*blackbox*.js",
37
37
  "!dist/scripts/release-readiness-report.js",
38
38
  "!dist/scripts/readme-architecture-imagegen-official-check.js",
39
+ "!dist/scripts/codex-0139-feature-probes-check.js",
40
+ "!dist/scripts/codex-0139-marketplace-source-check.js",
39
41
  "!dist/scripts/gpt-image-2-real-file-smoke.js",
40
42
  "!dist/scripts/official-docs-compat-report.js",
41
43
  "!dist/scripts/codex-0-134-official-compat-report.js",
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
4
- const mod = await importDist('core/codex-control/codex-0139-capability.js');
5
- process.env.SKS_CODEX_0139_FAKE = '1';
6
- process.env.SKS_CODEX_VERSION_FAKE = 'codex-cli 0.139.0';
7
- process.env.SKS_CODEX_0139_PROBE = '1';
8
- clearFailureEnv();
9
- const cap = await mod.detectCodex0139Capability({ codexBin: 'codex' });
10
- assertGate(cap.ok === true && cap.probe_mode === 'feature-probe', 'Codex 0.139 feature probe mode must pass fixture', cap);
11
- for (const [name, status] of Object.entries(cap.feature_probe_results || {})) {
12
- assertGate(status === 'passed', `feature probe must pass: ${name}`, cap.feature_probe_results);
13
- }
14
- process.env.SKS_CODEX_0139_FAKE_RICH_SCHEMA_FAIL = '1';
15
- const failed = await mod.detectCodex0139Capability({ codexBin: 'codex' });
16
- assertGate(failed.ok === false && failed.blockers.includes('codex_rich_tool_schema_probe_failed'), 'rich schema probe failure must block capability', failed);
17
- clearFailureEnv();
18
- emitGate('codex:0139-feature-probes', { probe_mode: cap.probe_mode, probe_count: Object.keys(cap.feature_probe_results || {}).length });
19
- function clearFailureEnv() {
20
- for (const key of [
21
- 'SKS_CODEX_0139_FAKE_MARKETPLACE_FAIL',
22
- 'SKS_CODEX_0139_FAKE_PROFILE_ALIAS_FAIL',
23
- 'SKS_CODEX_0139_FAKE_INTERRUPT_FAIL',
24
- 'SKS_CODEX_0139_FAKE_RICH_SCHEMA_FAIL',
25
- 'SKS_CODEX_0139_FAKE_DOCTOR_ENV_FAIL',
26
- 'SKS_CODEX_0139_FAKE_WEB_SEARCH_FAIL'
27
- ])
28
- delete process.env[key];
29
- }
30
- //# sourceMappingURL=codex-0139-feature-probes-check.js.map
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env node
2
- // @ts-nocheck
3
- import { assertGate, emitGate, importDist } from './sks-1-18-gate-lib.js';
4
- const mod = await importDist('core/codex-control/codex-0139-capability.js');
5
- assertGate(mod.marketplaceSourcesPresent(JSON.stringify([{ name: 'default', source: 'remote' }])) === true, 'array marketplace shape with source must pass');
6
- assertGate(mod.marketplaceSourcesPresent(JSON.stringify({ marketplaces: [{ name: 'default', source: 'remote' }] })) === true, 'marketplaces wrapper with source must pass');
7
- assertGate(mod.marketplaceSourcesPresent(JSON.stringify({ items: [{ name: 'default', source: 'remote' }] })) === true, 'items wrapper with source must pass');
8
- assertGate(mod.marketplaceSourcesPresent(JSON.stringify({ marketplaces: [{ name: 'default', root: '/tmp/codex-marketplace' }] })) === true, 'marketplaces wrapper with root locator must pass');
9
- assertGate(mod.marketplaceSourcesPresent(JSON.stringify([])) === true, 'empty marketplace list must not fail');
10
- assertGate(mod.marketplaceSourcesPresent('not-json') === false, 'non-json marketplace output must fail');
11
- assertGate(mod.marketplaceSourcesPresent(JSON.stringify([{ name: 'missing-source' }])) === false, 'non-empty rows must expose source locator');
12
- emitGate('codex:0139-marketplace-source');
13
- //# sourceMappingURL=codex-0139-marketplace-source-check.js.map