@cello-protocol/gateway 0.0.6 → 0.0.8

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.
@@ -0,0 +1,34 @@
1
+ /**
2
+ * M10B / DOD-END-SCAN-1 (`M10B-D17`) — the deterministic Layer-1 detectors, as a NARROW subpath.
3
+ *
4
+ * Spec §7 constraint 2 wants the intake scanner to be "a versioned shared component", and these are
5
+ * it: pure, deterministic, RE2-backed rule corpora with no I/O and no model. The portal's intake
6
+ * consumes THIS entry point and never the package barrel.
7
+ *
8
+ * WHY A SEPARATE ENTRY POINT AT ALL. `src/index.ts` re-exports `GatewayConfigStore` and
9
+ * `GatewayRecordStore`, and both statically `import { DatabaseSync } from "node:sqlite"` — VERBOTEN
10
+ * in this project — alongside the gateway HTTP server and the sidecar spawner. A barrel import from
11
+ * the portal would evaluate all of that inside a Next.js Fargate app. The package `exports` map
12
+ * previously offered only `"."`, so there was no deep-import escape; this is that escape, made
13
+ * deliberate and narrow.
14
+ *
15
+ * WHAT IS DELIBERATELY ABSENT, and it is the more important half:
16
+ *
17
+ * - `injection-scanner.ts` — the DeBERTa Layer-2 ONNX classifier. Excluded by `M10B-D16` on three
18
+ * independent grounds: spec §7 says "No LLM"; it **degrades OPEN** by design ("when it is absent,
19
+ * Layer-2 is OFF"), and intake must fail CLOSED — a scanner that can be silently off cannot back
20
+ * a signed `scanner_version` assertion, because the record would then claim a scan that did not
21
+ * happen; and its verdicts are score-thresholded over per-operator downloaded weights, which
22
+ * "byte-identical across nodes" does not survive.
23
+ * - `model-installer.ts`, the server, the stores, the sidecar — none of it is a rule corpus.
24
+ *
25
+ * WHAT THIS DOES NOT EXPORT EITHER: a verdict. The gateway's own disposition is deliberately the
26
+ * OPPOSITE of intake's — "it is not, by itself, an auto-block. CELLO is not a moderation tool; this
27
+ * surfaces evidence, it does not police content" — while intake is reject-always, fail-closed (§7
28
+ * constraint 3). Reusing `InboundScreener`'s disposition would produce a scanner that passes its
29
+ * tests and never refuses anything (`M10B-D16`). The corpus is shared; the policy is the portal's.
30
+ */
31
+ export { compileInjectionPatterns, injectionPatternsReady, scanInjectionPatterns } from "./injection-patterns.js";
32
+ export { compileSecretRules, secretRulesReady, redactSecrets } from "./secrets.js";
33
+ export type { SecretFinding, SecretScanResult } from "./secrets.js";
34
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/detect/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAClH,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACnF,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * M10B / DOD-END-SCAN-1 (`M10B-D17`) — the deterministic Layer-1 detectors, as a NARROW subpath.
3
+ *
4
+ * Spec §7 constraint 2 wants the intake scanner to be "a versioned shared component", and these are
5
+ * it: pure, deterministic, RE2-backed rule corpora with no I/O and no model. The portal's intake
6
+ * consumes THIS entry point and never the package barrel.
7
+ *
8
+ * WHY A SEPARATE ENTRY POINT AT ALL. `src/index.ts` re-exports `GatewayConfigStore` and
9
+ * `GatewayRecordStore`, and both statically `import { DatabaseSync } from "node:sqlite"` — VERBOTEN
10
+ * in this project — alongside the gateway HTTP server and the sidecar spawner. A barrel import from
11
+ * the portal would evaluate all of that inside a Next.js Fargate app. The package `exports` map
12
+ * previously offered only `"."`, so there was no deep-import escape; this is that escape, made
13
+ * deliberate and narrow.
14
+ *
15
+ * WHAT IS DELIBERATELY ABSENT, and it is the more important half:
16
+ *
17
+ * - `injection-scanner.ts` — the DeBERTa Layer-2 ONNX classifier. Excluded by `M10B-D16` on three
18
+ * independent grounds: spec §7 says "No LLM"; it **degrades OPEN** by design ("when it is absent,
19
+ * Layer-2 is OFF"), and intake must fail CLOSED — a scanner that can be silently off cannot back
20
+ * a signed `scanner_version` assertion, because the record would then claim a scan that did not
21
+ * happen; and its verdicts are score-thresholded over per-operator downloaded weights, which
22
+ * "byte-identical across nodes" does not survive.
23
+ * - `model-installer.ts`, the server, the stores, the sidecar — none of it is a rule corpus.
24
+ *
25
+ * WHAT THIS DOES NOT EXPORT EITHER: a verdict. The gateway's own disposition is deliberately the
26
+ * OPPOSITE of intake's — "it is not, by itself, an auto-block. CELLO is not a moderation tool; this
27
+ * surfaces evidence, it does not police content" — while intake is reject-always, fail-closed (§7
28
+ * constraint 3). Reusing `InboundScreener`'s disposition would produce a scanner that passes its
29
+ * tests and never refuses anything (`M10B-D16`). The corpus is shared; the policy is the portal's.
30
+ */
31
+ export { compileInjectionPatterns, injectionPatternsReady, scanInjectionPatterns } from "./injection-patterns.js";
32
+ export { compileSecretRules, secretRulesReady, redactSecrets } from "./secrets.js";
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/detect/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAClH,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cello-protocol/gateway",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -16,6 +16,10 @@
16
16
  "import": "./dist/index.js",
17
17
  "types": "./dist/index.d.ts"
18
18
  },
19
+ "./detect": {
20
+ "import": "./dist/detect/index.js",
21
+ "types": "./dist/detect/index.d.ts"
22
+ },
19
23
  "./package.json": "./package.json"
20
24
  },
21
25
  "bin": {