sneakoscope 9.0.2 → 9.0.3

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 9.0.2** — 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 9.0.3** — 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
 
@@ -259,7 +259,7 @@ dependencies = [
259
259
 
260
260
  [[package]]
261
261
  name = "sks-core"
262
- version = "9.0.2"
262
+ version = "9.0.3"
263
263
  dependencies = [
264
264
  "globset",
265
265
  "grep-matcher",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "9.0.2"
3
+ version = "9.0.3"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema": "sks.skills-manifest.v1",
3
- "package_version": "9.0.2",
3
+ "package_version": "9.0.3",
4
4
  "skills": [
5
5
  {
6
6
  "canonical_name": "sks",
@@ -144,8 +144,13 @@ function writeHttpBridgeError(res, error, req) {
144
144
  });
145
145
  res.end(JSON.stringify({ error: { type: 'sks_bridge_error', code, message: code } }));
146
146
  }
147
+ function safeUpstreamErrorId(value) {
148
+ const text = String(value ?? '').trim();
149
+ return /^[A-Za-z0-9_.:-]{1,64}$/.test(text) ? text : null;
150
+ }
147
151
  async function readRedactedUpstreamError(response) {
148
152
  let total = 0;
153
+ const chunks = [];
149
154
  for await (const raw of response) {
150
155
  const chunk = Buffer.isBuffer(raw) ? raw : Buffer.from(raw);
151
156
  total += chunk.length;
@@ -153,14 +158,30 @@ async function readRedactedUpstreamError(response) {
153
158
  response.destroy();
154
159
  break;
155
160
  }
161
+ chunks.push(chunk);
156
162
  }
157
- return Buffer.from(JSON.stringify({
158
- error: {
159
- type: 'upstream_error',
160
- code: 'bridge_upstream_request_failed',
161
- message: 'Upstream request failed'
162
- }
163
- }));
163
+ let upstreamCode = null;
164
+ let upstreamType = null;
165
+ try {
166
+ const parsed = JSON.parse(Buffer.concat(chunks).toString('utf8'));
167
+ upstreamCode = safeUpstreamErrorId(parsed?.error?.code) ?? safeUpstreamErrorId(parsed?.detail);
168
+ upstreamType = safeUpstreamErrorId(parsed?.error?.type);
169
+ }
170
+ catch {
171
+ }
172
+ return {
173
+ upstreamCode,
174
+ upstreamType,
175
+ body: Buffer.from(JSON.stringify({
176
+ error: {
177
+ type: 'upstream_error',
178
+ code: 'bridge_upstream_request_failed',
179
+ message: 'Upstream request failed',
180
+ ...(upstreamType ? { upstream_type: upstreamType } : {}),
181
+ ...(upstreamCode ? { upstream_code: upstreamCode } : {})
182
+ }
183
+ }))
184
+ };
164
185
  }
165
186
  const upstreamAgents = new Map();
166
187
  function upstreamAgent(secure, key, idleTimeoutMs) {
@@ -252,16 +273,16 @@ export async function forwardHttp(req, res, config, prepared, authenticatedLocal
252
273
  upstream.once('response', (response) => {
253
274
  const statusCode = response.statusCode || 502;
254
275
  if (statusCode >= 400) {
255
- logHttpRejection({
256
- code: `bridge_upstream_status_${statusCode}`,
257
- transport: 'http',
258
- ...(req.method === undefined ? {} : { method: req.method }),
259
- ...(req.url === undefined ? {} : { url: req.url }),
260
- status: statusCode,
261
- provider_id: provider.provider_id,
262
- public_model: request.route.public_model,
263
- });
264
- void readRedactedUpstreamError(response).then((body) => {
276
+ void readRedactedUpstreamError(response).then(({ body, upstreamCode }) => {
277
+ logHttpRejection({
278
+ code: upstreamCode ? `bridge_upstream_status_${statusCode}:${upstreamCode}` : `bridge_upstream_status_${statusCode}`,
279
+ transport: 'http',
280
+ ...(req.method === undefined ? {} : { method: req.method }),
281
+ ...(req.url === undefined ? {} : { url: req.url }),
282
+ status: statusCode,
283
+ provider_id: provider.provider_id,
284
+ public_model: request.route.public_model,
285
+ });
265
286
  responseStarted = true;
266
287
  const responseHeaders = rewriteResponseHeaders(response.headers, provider.base_url, authenticatedLocalBaseUrl);
267
288
  responseHeaders['content-length'] = String(body.length);
@@ -1 +1 @@
1
- export const PACKAGE_VERSION = '9.0.2';
1
+ export const PACKAGE_VERSION = '9.0.3';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sneakoscope",
3
3
  "displayName": "ㅅㅋㅅ",
4
- "version": "9.0.2",
4
+ "version": "9.0.3",
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",