sneakoscope 8.6.5 → 8.6.6
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 +1 -1
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/commands/doctor.js +19 -6
- package/dist/config/skills-manifest.json +1 -1
- package/dist/core/codex-lb/desktop-bridge/server.js +10 -3
- package/dist/core/codex-lb/desktop-bridge/websocket-forward.js +1 -1
- package/dist/core/codex-lb/desktop-bridge-migration.js +9 -1
- package/dist/core/version.js +1 -1
- package/package.json +1 -1
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.6.
|
|
25
|
+
This README documents package **SKS 8.6.6** — 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](https://github.com/mandarange/Sneakoscope-Codex/blob/main/docs/architecture/context-graph.md) and [docs/PRODUCT-CONTRACT.md](https://github.com/mandarange/Sneakoscope-Codex/blob/main/docs/PRODUCT-CONTRACT.md). See [CHANGELOG.md](https://github.com/mandarange/Sneakoscope-Codex/blob/main/CHANGELOG.md).
|
|
28
28
|
|
package/dist/commands/doctor.js
CHANGED
|
@@ -59,6 +59,7 @@ export async function restartStaleDesktopBridgeRuntime(input) {
|
|
|
59
59
|
? { restarted: true, warnings: [`desktop_bridge_runtime_restarted:${running}:${PACKAGE_VERSION}`], blockers: [] }
|
|
60
60
|
: { restarted: false, warnings: [], blockers: [`desktop_bridge_runtime_version_stale:${running}:${PACKAGE_VERSION}`] };
|
|
61
61
|
}
|
|
62
|
+
export const CATALOG_REPAIR_MAX_ATTEMPTS = 2;
|
|
62
63
|
export function deferCommandAliasCleanupToMigrationReceipt(result) {
|
|
63
64
|
const observedBlockers = Array.isArray(result?.blockers)
|
|
64
65
|
? result.blockers.map(String).filter(Boolean)
|
|
@@ -1049,15 +1050,27 @@ async function runDoctor(args = [], root, doctorFix, deps = {}) {
|
|
|
1049
1050
|
blockers: restarted.blockers
|
|
1050
1051
|
};
|
|
1051
1052
|
}
|
|
1052
|
-
const
|
|
1053
|
-
|
|
1053
|
+
const attempts = [];
|
|
1054
|
+
let syncedAndVerified = false;
|
|
1055
|
+
for (let attempt = 1; attempt <= CATALOG_REPAIR_MAX_ATTEMPTS; attempt += 1) {
|
|
1056
|
+
const sync = await executeDesktopBridgeCommandV3({ operation: 'catalog.sync' }, { home: root, env: process.env });
|
|
1057
|
+
const commandOk = sync?.ok === true && sync?.execution?.ok === true;
|
|
1058
|
+
const after = await desktopBridgeStatusV3({ home: root, env: process.env });
|
|
1059
|
+
const stillStale = (after?.readiness?.blockers || [])
|
|
1060
|
+
.map(String).filter((blocker) => blocker.endsWith('_catalog_stale'));
|
|
1061
|
+
if (commandOk && stillStale.length === 0) {
|
|
1062
|
+
syncedAndVerified = true;
|
|
1063
|
+
break;
|
|
1064
|
+
}
|
|
1065
|
+
attempts.push(`catalog_sync_attempt_${attempt}:${commandOk ? `still_stale:${stillStale.join(',')}` : (sync?.execution?.blockers || ['failed']).map(String).join(',')}`);
|
|
1066
|
+
}
|
|
1054
1067
|
return {
|
|
1055
1068
|
...base,
|
|
1056
|
-
ok:
|
|
1057
|
-
repaired:
|
|
1058
|
-
warnings: restarted.warnings,
|
|
1069
|
+
ok: syncedAndVerified && restarted.blockers.length === 0,
|
|
1070
|
+
repaired: syncedAndVerified || restarted.restarted,
|
|
1071
|
+
warnings: [...restarted.warnings, ...(syncedAndVerified ? attempts : [])],
|
|
1059
1072
|
blockers: [
|
|
1060
|
-
...(
|
|
1073
|
+
...(syncedAndVerified ? [] : ['desktop_bridge_catalog_still_stale_after_repair', ...attempts]),
|
|
1061
1074
|
...restarted.blockers
|
|
1062
1075
|
]
|
|
1063
1076
|
};
|
|
@@ -188,7 +188,14 @@ async function listenExact(server, host, port) {
|
|
|
188
188
|
server.listen({ host, port, exclusive: true });
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
export const DESKTOP_BRIDGE_DRAIN_GRACE_MS = 10_000;
|
|
192
|
+
async function closeServer(server, sockets, activeRequests) {
|
|
193
|
+
if (activeRequests) {
|
|
194
|
+
const deadline = Date.now() + DESKTOP_BRIDGE_DRAIN_GRACE_MS;
|
|
195
|
+
while (activeRequests() > 0 && Date.now() < deadline) {
|
|
196
|
+
await new Promise((resolve) => setTimeout(resolve, 25));
|
|
197
|
+
}
|
|
198
|
+
}
|
|
192
199
|
for (const socket of sockets)
|
|
193
200
|
socket.destroy();
|
|
194
201
|
if (!server.listening)
|
|
@@ -301,7 +308,7 @@ export async function startPreparedDesktopBridge(input, options = {}) {
|
|
|
301
308
|
await writeDesktopBridgeState(statePath, state);
|
|
302
309
|
}
|
|
303
310
|
catch (error) {
|
|
304
|
-
await closeServer(server, sockets);
|
|
311
|
+
await closeServer(server, sockets, () => activeRequests);
|
|
305
312
|
throw error;
|
|
306
313
|
}
|
|
307
314
|
const freshnessMs = input.stateFreshnessMs ?? 5 * 60_000;
|
|
@@ -321,7 +328,7 @@ export async function startPreparedDesktopBridge(input, options = {}) {
|
|
|
321
328
|
stopped = true;
|
|
322
329
|
if (heartbeat)
|
|
323
330
|
clearInterval(heartbeat);
|
|
324
|
-
await closeServer(server, sockets);
|
|
331
|
+
await closeServer(server, sockets, () => activeRequests);
|
|
325
332
|
if (statePath)
|
|
326
333
|
await removeDesktopBridgeStateIfOwned(statePath, state);
|
|
327
334
|
},
|
|
@@ -131,7 +131,7 @@ export async function forwardWebSocket(req, client, head, config, authenticatedL
|
|
|
131
131
|
}
|
|
132
132
|
catch (error) {
|
|
133
133
|
writeUpgradeFailure(client, error, req);
|
|
134
|
-
|
|
134
|
+
return;
|
|
135
135
|
}
|
|
136
136
|
const { provider, credential } = prepared;
|
|
137
137
|
const target = resolveDesktopBridgeTarget(req.url, provider.remote);
|
|
@@ -222,7 +222,7 @@ async function migrateDesktopBridgeConfigUnlocked(input) {
|
|
|
222
222
|
receipt_path: null,
|
|
223
223
|
auth_semantic_identity_preserved: provisional.auth_semantic_identity_preserved,
|
|
224
224
|
blockers: [
|
|
225
|
-
|
|
225
|
+
migrationFailureBlocker(error),
|
|
226
226
|
...(rollback && !rollback.ok ? ['desktop_bridge_unification_rollback_failed'] : [])
|
|
227
227
|
],
|
|
228
228
|
...(rollback ? { rollback } : {}),
|
|
@@ -230,6 +230,14 @@ async function migrateDesktopBridgeConfigUnlocked(input) {
|
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
+
export function migrationFailureBlocker(error) {
|
|
234
|
+
const base = 'desktop_bridge_unification_migration_failed';
|
|
235
|
+
const code = error?.code;
|
|
236
|
+
if (typeof code === 'string' && /^[A-Za-z0-9_]{1,64}$/.test(code))
|
|
237
|
+
return `${base}:${code}`;
|
|
238
|
+
const message = errorMessage(error).trim();
|
|
239
|
+
return /^[a-z0-9_]{1,64}$/.test(message) ? `${base}:${message}` : base;
|
|
240
|
+
}
|
|
233
241
|
function validateConfigTarget(home, configPath) {
|
|
234
242
|
const canonicalPath = path.join(path.resolve(home), '.codex', 'config.toml');
|
|
235
243
|
if (!path.isAbsolute(configPath) || path.resolve(configPath) !== canonicalPath) {
|
package/dist/core/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = '8.6.
|
|
1
|
+
export const PACKAGE_VERSION = '8.6.6';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sneakoscope",
|
|
3
3
|
"displayName": "ㅅㅋㅅ",
|
|
4
|
-
"version": "8.6.
|
|
4
|
+
"version": "8.6.6",
|
|
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",
|