sneakoscope 8.1.1 → 8.1.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 CHANGED
@@ -22,7 +22,7 @@ Proof-first orchestration for Codex CLI, ChatGPT Desktop, AI coding agents, mult
22
22
  Sneakoscope Codex (`sks`) is an open-source trust layer for Codex CLI and ChatGPT Desktop. It coordinates bounded AI coding agents, records machine-verifiable evidence, preserves project memory, and blocks release claims that are not supported by current tests or artifacts. Search visibility outcomes are measured separately; SKS does not promise rankings or traffic.
23
23
  <!-- END SKS SEARCH VISIBILITY MARKETING -->
24
24
 
25
- This README documents package **SKS 8.1.1** — its own identity, read from `package.json` and subject to release-gate verification, not advice about what to install.
25
+ This README documents package **SKS 8.1.2** — its own identity, read from `package.json` and subject to release-gate verification, not advice about what to install.
26
26
 
27
27
  Use the official latest stable SKS and Codex CLI releases. The Codex compatibility SSOT is always the **current latest stable** host; capability probes measure what that host can actually do. Product docs do not crown a fixed `0.x.y` string as SSOT (release pins and schema directories are measured artifacts for the current package, not a permanent product version claim). Menu Bar / Center induce updates to the latest stable build. Run `sks update-check` for what is installed and read the capability report for what is supported. Install SSOT is npm `sneakoscope@latest`; PATH `sks` and Menu Bar stamped generation must match that version or gates fail. It resolves managed SKS skills from the authoritative global install, preserves a runnable Naruto child slot when `max_threads=2`, and keeps Menu Bar repair transactional so stamped generations remain verifiable. Naruto uses stable opt-in multi-agent V2 when the host exposes it (Codex official multi-agent wrap-only; SKS does not reimplement a parallel runtime). Local code search is mode-separated (`sks search files|text|structure|symbol|context`); `context` is answered by the compiled TriWiki Context Graph (`context-graph.json` is exhaustive authority; `context-pack.json` and managed `AGENTS.md` are bounded projections) — see [docs/architecture/context-graph.md](docs/architecture/context-graph.md) and [docs/PRODUCT-CONTRACT.md](docs/PRODUCT-CONTRACT.md). See [CHANGELOG.md](CHANGELOG.md).
28
28
 
@@ -259,7 +259,7 @@ dependencies = [
259
259
 
260
260
  [[package]]
261
261
  name = "sks-core"
262
- version = "8.1.1"
262
+ version = "8.1.2"
263
263
  dependencies = [
264
264
  "globset",
265
265
  "grep-matcher",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "8.1.1"
3
+ version = "8.1.2"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
@@ -17,6 +17,25 @@ export const CODEX_LB_MODEL_CATALOG_MARKER = '# sks-codex-lb-managed-model-catal
17
17
  export const CODEX_LB_PROVIDER_SELECTION_MARKER = '# sks-codex-lb-managed-provider-selection';
18
18
  export const CODEX_LB_OAUTH_SELECTION_MARKER = '# sks-codex-lb-managed-oauth-selection';
19
19
  export const LEGACY_CODEX_LB_OPENAI_ROUTING_MARKER = '# sks-codex-lb-managed-openai-base-url';
20
+ const SKS_SWITCHABLE_THIRD_PARTY_PROVIDER_IDS = ['openrouter', 'sks-router'];
21
+ const SKS_THIRD_PARTY_CATALOG_BASENAMES = ['sks-openrouter-catalog.json', 'opencodex-catalog.json'];
22
+ export function releaseSksManagedThirdPartySelection(text) {
23
+ let next = String(text || '');
24
+ const selected = topLevelTomlString(next, 'model_provider');
25
+ if (!selected || !SKS_SWITCHABLE_THIRD_PARTY_PROVIDER_IDS.includes(selected)) {
26
+ return next;
27
+ }
28
+ if (!new RegExp(`(^|\\n)\\[model_providers\\.${escapeRegExp(selected)}\\]`).test(next))
29
+ return next;
30
+ next = removeTopLevelTomlKeyIfValue(next, 'model_provider', selected);
31
+ const catalog = topLevelTomlString(next, 'model_catalog_json');
32
+ if (catalog
33
+ && !topLevelHasLine(next, CODEX_LB_MODEL_CATALOG_MARKER)
34
+ && SKS_THIRD_PARTY_CATALOG_BASENAMES.some((name) => catalog.endsWith(`/${name}`) || catalog === name)) {
35
+ next = removeTopLevelTomlKey(next, 'model_catalog_json');
36
+ }
37
+ return next;
38
+ }
20
39
  export function removeCodexLbOrphanManagedMarkers(text) {
21
40
  const source = String(text || '');
22
41
  const selectedProvider = topLevelTomlString(source, 'model_provider');
@@ -42,7 +61,7 @@ export function removeCodexLbOrphanManagedMarkers(text) {
42
61
  };
43
62
  }
44
63
  export function upsertCodexLbNativeDesktopConfig(text, input) {
45
- let next = removeCodexLbOrphanManagedMarkers(String(text || '')).text;
64
+ let next = releaseSksManagedThirdPartySelection(removeCodexLbOrphanManagedMarkers(String(text || '')).text);
46
65
  const selectedProvider = topLevelTomlString(next, 'model_provider');
47
66
  if (selectedProvider && selectedProvider !== 'openai' && selectedProvider !== 'codex-lb') {
48
67
  throw new Error('codex_lb_user_owned_model_provider_conflict');
@@ -89,7 +108,9 @@ export function upsertCodexLbCliProviderConfig(text, input) {
89
108
  if (topLevelHasLine(cleaned, LEGACY_CODEX_LB_OPENAI_ROUTING_MARKER)) {
90
109
  throw new Error('codex_lb_legacy_desktop_config_requires_migration');
91
110
  }
92
- const cliBase = removeCodexLbManagedDesktopConfig(cleaned);
111
+ const cliBase = input.selectGlobally === true
112
+ ? releaseSksManagedThirdPartySelection(removeCodexLbManagedDesktopConfig(cleaned))
113
+ : removeCodexLbManagedDesktopConfig(cleaned);
93
114
  const claimedSelection = input.selectGlobally === true
94
115
  && topLevelTomlString(cliBase, 'model_provider') === 'codex-lb'
95
116
  && !topLevelHasLine(cliBase, CODEX_LB_PROVIDER_SELECTION_MARKER)
@@ -28,7 +28,7 @@ import { canAskYesNo, compareVersions, hasCodexUnstableFeatureWarningSuppression
28
28
  import { printCodexLbSetupWarnings } from './codex-lb-setup-warning-output.js';
29
29
  import { checkCodexLbResponseChain } from './install-helpers-codex-lb-chain.js';
30
30
  import { CODEX_LB_CANONICAL_FAST_SERVICE_TIER, CODEX_LB_PROVIDER_ENV_KEY, askPostinstallQuestion, codexAuthChatgptBackupPath, codexAuthPath, codexLbConfigPath, codexLbEnvPath, hasTopLevelCodexLbSelected, normalizeCodexLbBaseUrl, parseCodexLbEnvKey, redactSecretText } from './install-helpers-codex-lb-shared.js';
31
- import { CODEX_LB_DESKTOP_BRIDGE_MARKER, CODEX_LB_DESKTOP_COMPAT_MARKER, CODEX_LB_PROVIDER_SELECTION_MARKER, appliedCodexLbPersistenceModes, captureCodexLbSetupWriteState, codexLbSharedOpenAiRoutingState, detectCodexLbSetupDrift, ensureGlobalCodexAppGlmProfile, ensureStoredOpenRouterProviderDuringInstall, hardenCodexLbSetupRecoveryPath, removeCodexLbSetupRecoveryPath, removeCodexLbOrphanManagedMarkers, removeCodexLbSharedOpenAiRouting, removeCodexLbManagedDesktopConfig, restoreCodexLbSetupWriteState, sha256Text, shellSingleQuote, upsertCodexAppGlmConfig, upsertCodexLbConfig, upsertCodexLbCliProviderConfig, upsertCodexLbCompatDesktopConfig, upsertCodexLbNativeDesktopConfig, upsertCodexLbSharedOpenAiRouting, writeCodexLbSetupFileIfUnchanged } from './install-helpers-codex-lb-config.js';
31
+ import { CODEX_LB_DESKTOP_BRIDGE_MARKER, CODEX_LB_DESKTOP_COMPAT_MARKER, CODEX_LB_PROVIDER_SELECTION_MARKER, appliedCodexLbPersistenceModes, captureCodexLbSetupWriteState, codexLbSharedOpenAiRoutingState, detectCodexLbSetupDrift, ensureGlobalCodexAppGlmProfile, ensureStoredOpenRouterProviderDuringInstall, hardenCodexLbSetupRecoveryPath, removeCodexLbSetupRecoveryPath, removeCodexLbOrphanManagedMarkers, removeCodexLbSharedOpenAiRouting, releaseSksManagedThirdPartySelection, removeCodexLbManagedDesktopConfig, restoreCodexLbSetupWriteState, sha256Text, shellSingleQuote, upsertCodexAppGlmConfig, upsertCodexLbConfig, upsertCodexLbCliProviderConfig, upsertCodexLbCompatDesktopConfig, upsertCodexLbNativeDesktopConfig, upsertCodexLbSharedOpenAiRouting, writeCodexLbSetupFileIfUnchanged } from './install-helpers-codex-lb-config.js';
32
32
  import { detectLegacyCodexLbDesktopState } from '../core/codex-lb/legacy-migration.js';
33
33
  import { ensureCodexImagegenDuringInstall, ensureGlobalCodexSkillsDuringInstall, ensureGlobalContext7DuringInstall, ensureGlobalGetdesignSkillDuringInstall, ensureSksCommandDuringInstall } from './install-helpers-install-support.js';
34
34
  import { escapeRegExp } from '../core/text/regex.js';
@@ -416,7 +416,7 @@ export async function configureCodexLbDesktopRouting(opts) {
416
416
  })
417
417
  : mode === 'desktop-dual-auth-compat'
418
418
  ? upsertCodexLbCompatDesktopConfig(current, { remoteBaseUrl: String(opts.remoteBaseUrl) })
419
- : removeCodexLbManagedDesktopConfig(current);
419
+ : releaseSksManagedThirdPartySelection(removeCodexLbManagedDesktopConfig(current));
420
420
  }
421
421
  catch (error) {
422
422
  return {
@@ -494,10 +494,38 @@ export async function configureCodexLbCliProvider(opts) {
494
494
  const authPath = opts.authPath || codexAuthPath(home);
495
495
  const authBefore = await captureCodexAuthSnapshot({ home, authPath });
496
496
  const current = await readText(configPath, '');
497
- const next = upsertCodexLbCliProviderConfig(current, {
498
- remoteBaseUrl: opts.remoteBaseUrl,
499
- ...(opts.selectGlobally === undefined ? {} : { selectGlobally: opts.selectGlobally })
500
- });
497
+ let next;
498
+ try {
499
+ next = upsertCodexLbCliProviderConfig(current, {
500
+ remoteBaseUrl: opts.remoteBaseUrl,
501
+ ...(opts.selectGlobally === undefined ? {} : { selectGlobally: opts.selectGlobally })
502
+ });
503
+ }
504
+ catch (error) {
505
+ const message = error instanceof Error ? error.message : String(error);
506
+ return {
507
+ schema: 'sks.codex-lb-cli-provider.v1',
508
+ ok: false,
509
+ status: message,
510
+ mode: 'cli-provider',
511
+ identity_plane: 'unchanged',
512
+ routing_plane: 'cli_provider',
513
+ oauth_preserved: true,
514
+ auth_mutated: false,
515
+ config_path: configPath,
516
+ auth_path: authPath,
517
+ auth_before: authBefore,
518
+ auth_after: authBefore,
519
+ blockers: [message],
520
+ guidance: message === 'codex_lb_user_owned_model_provider_conflict'
521
+ ? [
522
+ 'config.toml has a model_provider line SKS does not manage.',
523
+ 'Remove or change that line yourself, then retry Use Codex LB.'
524
+ ]
525
+ : [],
526
+ backup_path: null
527
+ };
528
+ }
501
529
  const write = await safeWriteCodexConfigToml(configPath, current, next, 'codex-lb-cli-provider', { verifyUnchangedBeforeWrite: true });
502
530
  const authAfter = await captureCodexAuthSnapshot({ home, authPath });
503
531
  try {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema": "sks.skills-manifest.v1",
3
- "package_version": "8.1.1",
3
+ "package_version": "8.1.2",
4
4
  "skills": [
5
5
  {
6
6
  "canonical_name": "sks",
@@ -1 +1 @@
1
- export const PACKAGE_VERSION = '8.1.1';
1
+ export const PACKAGE_VERSION = '8.1.2';
@@ -145,7 +145,7 @@ final class ProvidersViewController: NSViewController, ControlCenterPage, NSText
145
145
  makeOpenRouterCard(),
146
146
  NativeView.card(
147
147
  title: "Advanced",
148
- subtitle: "Desktop Bridge keeps ChatGPT sign-in while routing traffic. Capability matrix and apply receipts appear after you run Verify or a provider mutation.",
148
+ subtitle: "You rarely need this section. Desktop Bridge is only for keeping ChatGPT sign-in while routing through codex-lb (or a custom-header-only gateway) if Use Codex LB above works, skip it.",
149
149
  views: [
150
150
  oauthCredentialStatus,
151
151
  NativeView.row([openCodexSignIn]),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sneakoscope",
3
3
  "displayName": "ㅅㅋㅅ",
4
- "version": "8.1.1",
4
+ "version": "8.1.2",
5
5
  "description": "Sneakoscope Codex (`sks`) is an open-source trust layer for Codex CLI and ChatGPT Desktop. It coordinates bounded AI coding agents, records machine-verifiable evidence, preserves project memory, and blocks release claims that are not supported by current tests or artifacts. Search visibility outcomes are measured separately; SKS does not promise rankings or traffic.",
6
6
  "type": "module",
7
7
  "homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",