@opacedev/astro-ai-content-checker 0.3.1

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 (185) hide show
  1. package/CHANGELOG.md +138 -0
  2. package/LICENSE +9 -0
  3. package/README.md +236 -0
  4. package/SBOM.cdx.json +172 -0
  5. package/SECURITY.md +9 -0
  6. package/THIRD_PARTY_NOTICES.md +36 -0
  7. package/dist/build-report-html.d.ts +3 -0
  8. package/dist/highlight.js +155 -0
  9. package/dist/index.d.ts +6 -0
  10. package/dist/index.js +43 -0
  11. package/dist/options.d.ts +21 -0
  12. package/dist/options.js +6 -0
  13. package/dist/receipt.d.ts +15 -0
  14. package/dist/receipt.js +100 -0
  15. package/dist/report.d.ts +55 -0
  16. package/dist/report.js +12 -0
  17. package/dist/sections.js +181 -0
  18. package/dist/share.d.ts +47 -0
  19. package/dist/share.js +72 -0
  20. package/dist/shared-EX54KI6H.js +1503 -0
  21. package/dist/shared-MMXWTX2U.js +43 -0
  22. package/dist/toolbar.js +13478 -0
  23. package/node_modules/@opacedev/ai-content-checker-browser/LICENSE +21 -0
  24. package/node_modules/@opacedev/ai-content-checker-browser/README.md +145 -0
  25. package/node_modules/@opacedev/ai-content-checker-browser/dist/dom/visible-text.d.ts +14 -0
  26. package/node_modules/@opacedev/ai-content-checker-browser/dist/dom/visible-text.js +47 -0
  27. package/node_modules/@opacedev/ai-content-checker-browser/dist/index.d.ts +3 -0
  28. package/node_modules/@opacedev/ai-content-checker-browser/dist/index.js +99 -0
  29. package/node_modules/@opacedev/ai-content-checker-browser/dist/worker/client.d.ts +12 -0
  30. package/node_modules/@opacedev/ai-content-checker-browser/dist/worker/client.js +17 -0
  31. package/node_modules/@opacedev/ai-content-checker-browser/dist/worker/entry.d.ts +1 -0
  32. package/node_modules/@opacedev/ai-content-checker-browser/dist/worker/entry.js +3984 -0
  33. package/node_modules/@opacedev/ai-content-checker-browser/dist/worker/protocol.d.ts +30 -0
  34. package/node_modules/@opacedev/ai-content-checker-browser/dist/worker/protocol.js +1 -0
  35. package/node_modules/@opacedev/ai-content-checker-browser/package.json +60 -0
  36. package/node_modules/@opacedev/ai-content-checker-contracts/LICENSE +21 -0
  37. package/node_modules/@opacedev/ai-content-checker-contracts/README.md +93 -0
  38. package/node_modules/@opacedev/ai-content-checker-contracts/dist/index.d.ts +58 -0
  39. package/node_modules/@opacedev/ai-content-checker-contracts/dist/index.js +17 -0
  40. package/node_modules/@opacedev/ai-content-checker-contracts/package.json +57 -0
  41. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/analysis-request.schema.d.ts +44 -0
  42. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/analysis-result.schema.d.ts +122 -0
  43. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/candidate.schema.d.ts +81 -0
  44. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/capabilities.schema.d.ts +24 -0
  45. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/checker-result.schema.d.ts +342 -0
  46. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/common.schema.d.ts +10 -0
  47. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/envelope.schema.d.ts +14 -0
  48. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/gate-result.schema.d.ts +19 -0
  49. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/integrity-receipt.schema.d.ts +122 -0
  50. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/job.schema.d.ts +188 -0
  51. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/method-result.schema.d.ts +39 -0
  52. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/pattern-finding.schema.d.ts +26 -0
  53. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/protected-span.schema.d.ts +35 -0
  54. package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/rewrite-request.schema.d.ts +65 -0
  55. package/node_modules/@opacedev/ai-content-checker-contracts/src/index.ts +63 -0
  56. package/node_modules/@opacedev/ai-content-checker-contracts/src/semantic-validation.mjs +32 -0
  57. package/node_modules/@opacedev/ai-content-checker-core/LICENSE +21 -0
  58. package/node_modules/@opacedev/ai-content-checker-core/README.md +186 -0
  59. package/node_modules/@opacedev/ai-content-checker-core/dist/bundle.js +4744 -0
  60. package/node_modules/@opacedev/ai-content-checker-core/dist/capabilities.d.ts +16 -0
  61. package/node_modules/@opacedev/ai-content-checker-core/dist/capabilities.js +7 -0
  62. package/node_modules/@opacedev/ai-content-checker-core/dist/diff/diff.d.ts +17 -0
  63. package/node_modules/@opacedev/ai-content-checker-core/dist/diff/diff.js +76 -0
  64. package/node_modules/@opacedev/ai-content-checker-core/dist/fixes/preview.d.ts +27 -0
  65. package/node_modules/@opacedev/ai-content-checker-core/dist/fixes/preview.js +47 -0
  66. package/node_modules/@opacedev/ai-content-checker-core/dist/gates/policy.d.ts +14 -0
  67. package/node_modules/@opacedev/ai-content-checker-core/dist/gates/policy.js +16 -0
  68. package/node_modules/@opacedev/ai-content-checker-core/dist/index.d.ts +15 -0
  69. package/node_modules/@opacedev/ai-content-checker-core/dist/index.js +15 -0
  70. package/node_modules/@opacedev/ai-content-checker-core/dist/inspect.d.ts +8 -0
  71. package/node_modules/@opacedev/ai-content-checker-core/dist/inspect.js +84 -0
  72. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-gb-v1.d.ts +12 -0
  73. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-gb-v1.js +68 -0
  74. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v2-data.d.ts +73 -0
  75. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v2-data.js +499 -0
  76. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v2.d.ts +76 -0
  77. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v2.js +1067 -0
  78. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v3-data.d.ts +165 -0
  79. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v3-data.js +614 -0
  80. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v3.d.ts +19 -0
  81. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v3.js +542 -0
  82. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v4-corpus.d.ts +40 -0
  83. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v4-corpus.js +40 -0
  84. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v4-data.d.ts +138 -0
  85. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v4-data.js +200 -0
  86. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v4.d.ts +71 -0
  87. package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v4.js +388 -0
  88. package/node_modules/@opacedev/ai-content-checker-core/dist/protected/extract.d.ts +17 -0
  89. package/node_modules/@opacedev/ai-content-checker-core/dist/protected/extract.js +75 -0
  90. package/node_modules/@opacedev/ai-content-checker-core/dist/protected/validate.d.ts +3 -0
  91. package/node_modules/@opacedev/ai-content-checker-core/dist/protected/validate.js +17 -0
  92. package/node_modules/@opacedev/ai-content-checker-core/dist/provenance/c2pa-text.d.ts +55 -0
  93. package/node_modules/@opacedev/ai-content-checker-core/dist/provenance/c2pa-text.js +86 -0
  94. package/node_modules/@opacedev/ai-content-checker-core/dist/receipts/build.d.ts +48 -0
  95. package/node_modules/@opacedev/ai-content-checker-core/dist/receipts/build.js +61 -0
  96. package/node_modules/@opacedev/ai-content-checker-core/dist/report/checker-result.d.ts +241 -0
  97. package/node_modules/@opacedev/ai-content-checker-core/dist/report/checker-result.js +419 -0
  98. package/node_modules/@opacedev/ai-content-checker-core/dist/source/offsets.d.ts +34 -0
  99. package/node_modules/@opacedev/ai-content-checker-core/dist/source/offsets.js +51 -0
  100. package/node_modules/@opacedev/ai-content-checker-core/dist/source/utf8.d.ts +3 -0
  101. package/node_modules/@opacedev/ai-content-checker-core/dist/source/utf8.js +58 -0
  102. package/node_modules/@opacedev/ai-content-checker-core/dist/source/visible-text.d.ts +12 -0
  103. package/node_modules/@opacedev/ai-content-checker-core/dist/source/visible-text.js +30 -0
  104. package/node_modules/@opacedev/ai-content-checker-core/dist/unicode/data.d.ts +22 -0
  105. package/node_modules/@opacedev/ai-content-checker-core/dist/unicode/data.js +137 -0
  106. package/node_modules/@opacedev/ai-content-checker-core/dist/unicode/inspect.d.ts +16 -0
  107. package/node_modules/@opacedev/ai-content-checker-core/dist/unicode/inspect.js +84 -0
  108. package/node_modules/@opacedev/ai-content-checker-core/dist/verdict/combine.d.ts +162 -0
  109. package/node_modules/@opacedev/ai-content-checker-core/dist/verdict/combine.js +501 -0
  110. package/node_modules/@opacedev/ai-content-checker-core/package.json +62 -0
  111. package/node_modules/canonicalize/LICENSE +201 -0
  112. package/node_modules/canonicalize/README.md +65 -0
  113. package/node_modules/canonicalize/bin/canonicalize.js +17 -0
  114. package/node_modules/canonicalize/lib/canonicalize.d.ts +2 -0
  115. package/node_modules/canonicalize/lib/canonicalize.js +74 -0
  116. package/node_modules/canonicalize/package.json +64 -0
  117. package/node_modules/entities/LICENSE +11 -0
  118. package/node_modules/entities/lib/decode.d.ts +211 -0
  119. package/node_modules/entities/lib/decode.d.ts.map +1 -0
  120. package/node_modules/entities/lib/decode.js +536 -0
  121. package/node_modules/entities/lib/decode.js.map +1 -0
  122. package/node_modules/entities/lib/decode_codepoint.d.ts +19 -0
  123. package/node_modules/entities/lib/decode_codepoint.d.ts.map +1 -0
  124. package/node_modules/entities/lib/decode_codepoint.js +76 -0
  125. package/node_modules/entities/lib/decode_codepoint.js.map +1 -0
  126. package/node_modules/entities/lib/encode.d.ts +22 -0
  127. package/node_modules/entities/lib/encode.d.ts.map +1 -0
  128. package/node_modules/entities/lib/encode.js +77 -0
  129. package/node_modules/entities/lib/encode.js.map +1 -0
  130. package/node_modules/entities/lib/escape.d.ts +43 -0
  131. package/node_modules/entities/lib/escape.d.ts.map +1 -0
  132. package/node_modules/entities/lib/escape.js +122 -0
  133. package/node_modules/entities/lib/escape.js.map +1 -0
  134. package/node_modules/entities/lib/esm/decode.d.ts +211 -0
  135. package/node_modules/entities/lib/esm/decode.d.ts.map +1 -0
  136. package/node_modules/entities/lib/esm/decode.js +496 -0
  137. package/node_modules/entities/lib/esm/decode.js.map +1 -0
  138. package/node_modules/entities/lib/esm/decode_codepoint.d.ts +19 -0
  139. package/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +1 -0
  140. package/node_modules/entities/lib/esm/decode_codepoint.js +71 -0
  141. package/node_modules/entities/lib/esm/decode_codepoint.js.map +1 -0
  142. package/node_modules/entities/lib/esm/encode.d.ts +22 -0
  143. package/node_modules/entities/lib/esm/encode.d.ts.map +1 -0
  144. package/node_modules/entities/lib/esm/encode.js +69 -0
  145. package/node_modules/entities/lib/esm/encode.js.map +1 -0
  146. package/node_modules/entities/lib/esm/escape.d.ts +43 -0
  147. package/node_modules/entities/lib/esm/escape.d.ts.map +1 -0
  148. package/node_modules/entities/lib/esm/escape.js +116 -0
  149. package/node_modules/entities/lib/esm/escape.js.map +1 -0
  150. package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +3 -0
  151. package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +1 -0
  152. package/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
  153. package/node_modules/entities/lib/esm/generated/decode-data-html.js.map +1 -0
  154. package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +3 -0
  155. package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +1 -0
  156. package/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
  157. package/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +1 -0
  158. package/node_modules/entities/lib/esm/generated/encode-html.d.ts +8 -0
  159. package/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +1 -0
  160. package/node_modules/entities/lib/esm/generated/encode-html.js +10 -0
  161. package/node_modules/entities/lib/esm/generated/encode-html.js.map +1 -0
  162. package/node_modules/entities/lib/esm/index.d.ts +96 -0
  163. package/node_modules/entities/lib/esm/index.d.ts.map +1 -0
  164. package/node_modules/entities/lib/esm/index.js +99 -0
  165. package/node_modules/entities/lib/esm/index.js.map +1 -0
  166. package/node_modules/entities/lib/esm/package.json +1 -0
  167. package/node_modules/entities/lib/generated/decode-data-html.d.ts +3 -0
  168. package/node_modules/entities/lib/generated/decode-data-html.d.ts.map +1 -0
  169. package/node_modules/entities/lib/generated/decode-data-html.js +9 -0
  170. package/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
  171. package/node_modules/entities/lib/generated/decode-data-xml.d.ts +3 -0
  172. package/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +1 -0
  173. package/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
  174. package/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
  175. package/node_modules/entities/lib/generated/encode-html.d.ts +8 -0
  176. package/node_modules/entities/lib/generated/encode-html.d.ts.map +1 -0
  177. package/node_modules/entities/lib/generated/encode-html.js +12 -0
  178. package/node_modules/entities/lib/generated/encode-html.js.map +1 -0
  179. package/node_modules/entities/lib/index.d.ts +96 -0
  180. package/node_modules/entities/lib/index.d.ts.map +1 -0
  181. package/node_modules/entities/lib/index.js +126 -0
  182. package/node_modules/entities/lib/index.js.map +1 -0
  183. package/node_modules/entities/package.json +90 -0
  184. package/node_modules/entities/readme.md +122 -0
  185. package/package.json +91 -0
@@ -0,0 +1,30 @@
1
+ import type { AnalysisRequest, AnalysisResult } from "@opacedev/ai-content-checker-contracts";
2
+ export declare const WORKER_PROTOCOL_VERSION: "1.0";
3
+ export type InspectionPhase = "validating" | "mapping_text" | "unicode_checks" | "protected_spans" | "writing_patterns" | "complete";
4
+ export type WorkerRequest = {
5
+ protocol_version: "1.0";
6
+ type: "inspect";
7
+ id: string;
8
+ request: AnalysisRequest;
9
+ } | {
10
+ protocol_version: "1.0";
11
+ type: "cancel";
12
+ id: string;
13
+ };
14
+ export type WorkerResponse = {
15
+ protocol_version: "1.0";
16
+ type: "progress";
17
+ id: string;
18
+ phase: InspectionPhase;
19
+ } | {
20
+ protocol_version: "1.0";
21
+ type: "result";
22
+ id: string;
23
+ result: AnalysisResult;
24
+ } | {
25
+ protocol_version: "1.0";
26
+ type: "error";
27
+ id: string;
28
+ code: string;
29
+ message: string;
30
+ };
@@ -0,0 +1 @@
1
+ export const WORKER_PROTOCOL_VERSION = "1.0";
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@opacedev/ai-content-checker-browser",
3
+ "version": "0.3.1",
4
+ "description": "Browser visible-text projection and Worker adapter for the Opace AI Content Checker & Detector.",
5
+ "keywords": [
6
+ "ai-checker",
7
+ "ai-detector",
8
+ "ai-content-checker",
9
+ "web-worker",
10
+ "dom",
11
+ "privacy"
12
+ ],
13
+ "license": "MIT",
14
+ "type": "module",
15
+ "sideEffects": false,
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js"
20
+ }
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "README.md",
25
+ "LICENSE"
26
+ ],
27
+ "scripts": {
28
+ "build": "tsc -p tsconfig.json && esbuild src/index.ts --bundle --format=esm --platform=browser --target=es2022 --outfile=dist/index.js && esbuild src/worker/entry.ts --bundle --format=esm --platform=browser --target=es2022 --outfile=dist/worker/entry.js",
29
+ "typecheck": "tsc -p tsconfig.json --noEmit",
30
+ "test": "npm run build"
31
+ },
32
+ "dependencies": {
33
+ "@opacedev/ai-content-checker-contracts": "0.3.1",
34
+ "@opacedev/ai-content-checker-core": "0.3.1"
35
+ },
36
+ "devDependencies": {
37
+ "esbuild": "0.28.2",
38
+ "typescript": "5.9.2"
39
+ },
40
+ "author": {
41
+ "name": "Opace Digital Agency",
42
+ "url": "https://opace.agency/"
43
+ },
44
+ "homepage": "https://opace.agency/tools/ai/content-verification-integrity/",
45
+ "bugs": {
46
+ "url": "https://github.com/OpaceDigitalAgency/opace-ai-content-checker-detector/issues"
47
+ },
48
+ "publishConfig": {
49
+ "access": "public",
50
+ "provenance": true
51
+ },
52
+ "engines": {
53
+ "node": ">=20"
54
+ },
55
+ "repository": {
56
+ "type": "git",
57
+ "url": "git+https://github.com/OpaceDigitalAgency/opace-ai-content-checker-detector.git",
58
+ "directory": "packages/browser"
59
+ }
60
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Opace Ltd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,93 @@
1
+ # @opacedev/ai-content-checker-contracts
2
+
3
+ ![Free Opace AI Content Checker, Detector and Watermark Tools](https://raw.githubusercontent.com/OpaceDigitalAgency/opace-ai-content-checker-detector/main/docs/assets/opace-ai-content-checker-detector-hero-v3.png)
4
+
5
+ Package containing the frozen Opace AI Content Checker & Detector v1 TypeScript contract declarations and cross-surface constants.
6
+
7
+ Use it to keep JavaScript, TypeScript, WordPress and local-service integrations aligned on the same schemas, statuses and privacy routes. It defines evidence structures; it does not prove authorship or run a detector.
8
+
9
+ `checker-result.schema.json` is the additive full-result interchange contract. It carries the three independent result axes, Cycle-5 route/model identity, zero-based scored sections, provenance/C2PA/watermark states, content-free share/receipt metadata, complete-report metadata and abuse-control state. The JSON Schema checks structure; producers and renderers must also run the semantic guard exported by `@opacedev/ai-content-checker-core` before serialising or presenting a result.
10
+
11
+ > Release state: a 0.1.0 npm candidate is prepared locally but is not published. The install command below applies only after owner-approved publication.
12
+
13
+ - Schema version: `1.0`
14
+ - Contract version: `1.0.0`
15
+ - Source of truth: the repository JSON Schemas under `schemas/v1/`
16
+ - Runtime behaviour: no transport, telemetry or content processing
17
+ - Licence: MIT for the Opace-authored package
18
+
19
+ Generated declarations must remain schema-checked. Unsupported, unavailable, not configured, not run, inconclusive and error states must never be converted to pass.
20
+
21
+ Repository-wide dependency, contract and provenance evidence is recorded in `THIRD_PARTY_NOTICES.md`, `MODEL_AND_DATA_PROVENANCE.md` and `docs/legal/DEPENDENCY-LEDGER.md` at the project root.
22
+
23
+ ## Install
24
+
25
+ ```sh
26
+ npm install @opacedev/ai-content-checker-contracts
27
+ ```
28
+
29
+ ## Use and compatibility
30
+
31
+ ```js
32
+ import {
33
+ CONTRACT_VERSION,
34
+ SCHEMA_VERSION,
35
+ METHOD_STATUSES,
36
+ PRIVACY_ROUTES,
37
+ } from '@opacedev/ai-content-checker-contracts';
38
+ ```
39
+
40
+ Readers accept additive fields from the same contract major and fail closed on an unknown status or wrong major. Every consuming surface must preserve the canonical statuses and the `browser`, `wordpress_local`, `local_service`, `hub_provider` and `commercial_byok` privacy routes. Do not infer availability from a missing method.
41
+
42
+ Requires an ESM-compatible JavaScript runtime. TypeScript declarations ship with the package. Contract `1.0.0` is paired with schema `1.0`; consumers must check both values at their boundary.
43
+
44
+ Run `npm run sync:contracts` at the repository root after changing a schema. It regenerates the TypeScript declarations and synchronises the client and Python schema copies. Then run `npm test` in this package and the repository G1 and G2 gates. Contract or schema changes require compatibility review; editing generated declarations alone is not supported.
45
+
46
+ ## Privacy, security and licence
47
+
48
+ This package performs no I/O and contains no content processor, network client or install hook. It is safe to import in browser and server builds, but it does not validate untrusted runtime payloads by itself; use the schema/semantic validators at the relevant boundary.
49
+
50
+ See the repository [security policy](https://github.com/OpaceDigitalAgency/opace-ai-content-checker-detector/blob/main/SECURITY.md) before reporting a vulnerability. Opace-authored code is available under the [MIT Licence](https://github.com/OpaceDigitalAgency/opace-ai-content-checker-detector/blob/main/LICENSE).
51
+
52
+ For non-sensitive help, use [Opace AI Content Checker & Detector support](https://opace.agency/get-in-touch/). Changes should follow the repository [contribution guide](../../CONTRIBUTING.md) and [changelog](../../CHANGELOG.md).
53
+
54
+ ## Troubleshooting and links
55
+
56
+ - **Unknown status:** reject the payload and confirm both sides use contract `1.0.0`.
57
+ - **Types changed but runtime did not:** regenerate from `schemas/v1/`; do not edit generated declarations alone.
58
+ - **Need runtime validation:** apply the canonical JSON Schemas at the trust boundary. This constants package is not a validator.
59
+
60
+ [Opace AI Content Checker & Detector](https://opace.agency/tools/ai/content-verification-integrity/) · [Developer and CLI guide](https://opace.agency/tools/ai/content-verification-integrity/cli-local-service/) · [AI and automation services](https://opace.agency/services/artificial-intelligence/) · [Opace](https://opace.agency/) · [Opace Digital Agency on GitHub](https://github.com/OpaceDigitalAgency) · [Related browser package](../browser/README.md)
61
+
62
+ ## Attribution
63
+
64
+ The engine this package serves was built on credited open-source work: chiefly
65
+ [avoid-ai-writing](https://github.com/conorbronsdon/avoid-ai-writing) (MIT, Conor Bronsdon and
66
+ contributors) for the writing-signal rules and stylometrics,
67
+ [watermarks-remover](https://github.com/guillaumemeyer/watermarks-remover) (MIT, Guillaume Meyer)
68
+ for the carrier and confusable table data, and
69
+ [Unicode Consortium character data](https://www.unicode.org/Public/UCD/latest/), with phrase and
70
+ structural rule data adapted from [antislop-sampler](https://github.com/sam-paech/antislop-sampler),
71
+ [slop-forensics](https://github.com/sam-paech/slop-forensics),
72
+ [SLOP_Detector](https://github.com/SicariusSicariiStuff/SLOP_Detector),
73
+ [slop-gate](https://github.com/hwajongpark/slop-gate),
74
+ [anti-ai-writing](https://github.com/avectats7/anti-ai-writing),
75
+ [anti-slop](https://github.com/kjmagnan1s/anti-slop),
76
+ [claude-slop-detector](https://github.com/aplaceforallmystuff/claude-slop-detector) and
77
+ [Wikipedia's *Signs of AI writing*](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing)
78
+ (CC BY-SA 4.0). Several well-known detector repositories were cloned and read during research and
79
+ are credited as read, not used; nothing here derives from `fast-detect-gpt`, `Binoculars`,
80
+ `RADAR`, `DIPPER`, `ai-detector-bench`, `BIRA`, `SIRA` or `MarkLLM`. Full records:
81
+ [THIRD_PARTY_NOTICES.md](https://github.com/OpaceDigitalAgency/opace-ai-content-checker-detector/blob/main/THIRD_PARTY_NOTICES.md).
82
+
83
+ ## Evidence
84
+
85
+ Every accuracy figure this project publishes is measured, carries its denominator and names its
86
+ source report. The six result charts, the per-register detection and false-positive tables and the
87
+ complete weakness list are on the [repository front page](https://github.com/OpaceDigitalAgency/opace-ai-content-checker-detector#what-it-measures-and-where-it-fails).
88
+
89
+ - [Capability register](https://github.com/OpaceDigitalAgency/opace-ai-content-checker-detector/blob/main/docs/CAPABILITIES.md) — the exhaustive technical inventory
90
+ - [Evidence index](https://github.com/OpaceDigitalAgency/opace-ai-content-checker-detector/blob/main/docs/EVIDENCE-INDEX.md) — every test result and research artefact, with paths
91
+ - [Test evidence](https://github.com/OpaceDigitalAgency/opace-ai-content-checker-detector/blob/main/docs/TEST-EVIDENCE.md) — verbatim suite totals and the current-model appendix
92
+ - [Route parity](https://github.com/OpaceDigitalAgency/opace-ai-content-checker-detector/blob/main/docs/measurements/ROUTE-PARITY.md) — browser int8 against server fp32, all disagreements written out
93
+ - [Honest limitations](https://github.com/OpaceDigitalAgency/opace-ai-content-checker-detector#honest-limitations) — where the tool is weakest, ranked, with denominators
@@ -0,0 +1,58 @@
1
+ export declare const SCHEMA_VERSION: "1.0";
2
+ export declare const CONTRACT_VERSION: "1.0.0";
3
+ export declare const WORDPRESS_REST_NAMESPACE: "oaci/v1";
4
+ export declare const WORDPRESS_ADMIN_PAGE: "admin.php?page=oaci-lab";
5
+ export declare const LOCAL_ENGINE_ORIGIN: "http://127.0.0.1:8741";
6
+ export declare const PUBLIC_API_IDENTITY: "Opace\\ContentIntegrity\\Integration\\PublicApi::instance()";
7
+ export declare const READY_HOOK: "oaci_ready";
8
+ export declare const PHP_PUBLIC_API_METHODS: readonly ["version", "is_compatible", "capabilities", "register_source_adapter", "create_session", "get_session", "approve", "get_approved_output", "mark_applied", "get_receipt", "asset_handles"];
9
+ export declare const JS_MOUNT_CONTRACT: {
10
+ readonly global: "OpaceContentIntegrity";
11
+ readonly apiVersion: "1.0";
12
+ readonly requiredOptions: readonly ["surface", "sourceRef", "sourceHash", "getContent", "onApproved", "onClose"];
13
+ readonly returns: readonly ["destroy", "refresh", "getState"];
14
+ readonly events: readonly ["oaci:statechange", "oaci:approved", "oaci:error"];
15
+ };
16
+ export declare const METHOD_STATUSES: readonly ["pass", "attention", "fail", "inconclusive", "unsupported", "not_configured", "not_run", "error"];
17
+ export type MethodStatus = (typeof METHOD_STATUSES)[number];
18
+ export declare const PRIVACY_ROUTES: readonly ["browser", "wordpress_local", "local_service", "hub_provider", "commercial_byok"];
19
+ export type PrivacyRoute = (typeof PRIVACY_ROUTES)[number];
20
+ export type { HttpsSchemasOpaceAgencyContentIntegrityV1EnvelopeSchemaJson as ContractEnvelope } from "./generated/envelope.schema.js";
21
+ export type { HttpsSchemasOpaceAgencyContentIntegrityV1MethodResultSchemaJson as MethodResult } from "./generated/method-result.schema.js";
22
+ export type { HttpsSchemasOpaceAgencyContentIntegrityV1AnalysisRequestSchemaJson as AnalysisRequest } from "./generated/analysis-request.schema.js";
23
+ export type { HttpsSchemasOpaceAgencyContentIntegrityV1AnalysisResultSchemaJson as AnalysisResult } from "./generated/analysis-result.schema.js";
24
+ export type { HttpsSchemasOpaceAgencyContentIntegrityV1ProtectedSpanSchemaJson as ProtectedSpan } from "./generated/protected-span.schema.js";
25
+ export type { HttpsSchemasOpaceAgencyContentIntegrityV1PatternFindingSchemaJson as PatternFinding } from "./generated/pattern-finding.schema.js";
26
+ export type { HttpsSchemasOpaceAgencyContentIntegrityV1GateResultSchemaJson as GateResult } from "./generated/gate-result.schema.js";
27
+ export type { HttpsSchemasOpaceAgencyContentIntegrityV1CandidateSchemaJson as Candidate } from "./generated/candidate.schema.js";
28
+ export type { HttpsSchemasOpaceAgencyContentIntegrityV1RewriteRequestSchemaJson as RewriteRequest } from "./generated/rewrite-request.schema.js";
29
+ export type { HttpsSchemasOpaceAgencyContentIntegrityV1JobSchemaJson as Job } from "./generated/job.schema.js";
30
+ export type { HttpsSchemasOpaceAgencyContentIntegrityV1CapabilitiesSchemaJson as Capabilities } from "./generated/capabilities.schema.js";
31
+ export type { HttpsSchemasOpaceAgencyContentIntegrityV1IntegrityReceiptSchemaJson as IntegrityReceipt } from "./generated/integrity-receipt.schema.js";
32
+ export type { OpaceAIContentIntegrityCheckerResult as CheckerResult } from "./generated/checker-result.schema.js";
33
+ export interface AnthropicUnsupportedMethodResultV1 {
34
+ id: "watermark.anthropic";
35
+ category: "watermark";
36
+ provider_or_method: string;
37
+ version: "unavailable-2026-08-26";
38
+ status: "unsupported";
39
+ availability: "not_available";
40
+ native_outcome?: "not_available";
41
+ score: null;
42
+ threshold: null;
43
+ segments: Record<string, unknown>[];
44
+ evidence: Record<string, unknown>[];
45
+ limitations: [string, ...string[]];
46
+ started_at: string;
47
+ completed_at: string;
48
+ privacy_route: PrivacyRoute;
49
+ [key: string]: unknown;
50
+ }
51
+ export interface JsMountOptionsV1 {
52
+ surface: string;
53
+ sourceRef: string;
54
+ sourceHash: string;
55
+ getContent(): string | Promise<string>;
56
+ onApproved(payload: unknown): void;
57
+ onClose(): void;
58
+ }
@@ -0,0 +1,17 @@
1
+ export const SCHEMA_VERSION = "1.0";
2
+ export const CONTRACT_VERSION = "1.0.0";
3
+ export const WORDPRESS_REST_NAMESPACE = "oaci/v1";
4
+ export const WORDPRESS_ADMIN_PAGE = "admin.php?page=oaci-lab";
5
+ export const LOCAL_ENGINE_ORIGIN = "http://127.0.0.1:8741";
6
+ export const PUBLIC_API_IDENTITY = "Opace\\ContentIntegrity\\Integration\\PublicApi::instance()";
7
+ export const READY_HOOK = "oaci_ready";
8
+ export const PHP_PUBLIC_API_METHODS = ["version", "is_compatible", "capabilities", "register_source_adapter", "create_session", "get_session", "approve", "get_approved_output", "mark_applied", "get_receipt", "asset_handles"];
9
+ export const JS_MOUNT_CONTRACT = {
10
+ global: "OpaceContentIntegrity",
11
+ apiVersion: "1.0",
12
+ requiredOptions: ["surface", "sourceRef", "sourceHash", "getContent", "onApproved", "onClose"],
13
+ returns: ["destroy", "refresh", "getState"],
14
+ events: ["oaci:statechange", "oaci:approved", "oaci:error"]
15
+ };
16
+ export const METHOD_STATUSES = ["pass", "attention", "fail", "inconclusive", "unsupported", "not_configured", "not_run", "error"];
17
+ export const PRIVACY_ROUTES = ["browser", "wordpress_local", "local_service", "hub_provider", "commercial_byok"];
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@opacedev/ai-content-checker-contracts",
3
+ "version": "0.3.1",
4
+ "description": "Frozen JSON Schema types, status constants and privacy-route enums for the Opace AI Content Checker & Detector.",
5
+ "keywords": [
6
+ "ai-checker",
7
+ "ai-detector",
8
+ "ai-content-checker",
9
+ "json-schema",
10
+ "contracts",
11
+ "typescript",
12
+ "content-integrity"
13
+ ],
14
+ "license": "MIT",
15
+ "type": "module",
16
+ "sideEffects": false,
17
+ "files": [
18
+ "dist",
19
+ "src",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "exports": {
24
+ ".": {
25
+ "types": "./src/index.ts",
26
+ "import": "./dist/index.js"
27
+ },
28
+ "./semantic-validation": "./src/semantic-validation.mjs"
29
+ },
30
+ "scripts": {
31
+ "build": "tsc -p tsconfig.json",
32
+ "test": "npm run build && node --input-type=module -e \"const contract=await import('./dist/index.js');if(contract.CONTRACT_VERSION!=='1.0.0'||contract.SCHEMA_VERSION!=='1.0')throw Error('contract export mismatch')\""
33
+ },
34
+ "devDependencies": {
35
+ "typescript": "5.9.2"
36
+ },
37
+ "author": {
38
+ "name": "Opace Digital Agency",
39
+ "url": "https://opace.agency/"
40
+ },
41
+ "homepage": "https://opace.agency/tools/ai/content-verification-integrity/",
42
+ "bugs": {
43
+ "url": "https://github.com/OpaceDigitalAgency/opace-ai-content-checker-detector/issues"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public",
47
+ "provenance": true
48
+ },
49
+ "engines": {
50
+ "node": ">=20"
51
+ },
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "git+https://github.com/OpaceDigitalAgency/opace-ai-content-checker-detector.git",
55
+ "directory": "packages/contracts"
56
+ }
57
+ }
@@ -0,0 +1,44 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export interface HttpsSchemasOpaceAgencyContentIntegrityV1AnalysisRequestSchemaJson {
9
+ schema_version: "1.0";
10
+ contract_version: string;
11
+ request_id: string;
12
+ created_at: string;
13
+ source: Source;
14
+ checks: string[];
15
+ privacy: {
16
+ /**
17
+ * @minItems 1
18
+ */
19
+ allowed_routes: [
20
+ "browser" | "wordpress_local" | "local_service" | "hub_provider" | "commercial_byok",
21
+ ...("browser" | "wordpress_local" | "local_service" | "hub_provider" | "commercial_byok")[]
22
+ ];
23
+ save_receipt: boolean;
24
+ retain_content: boolean;
25
+ [k: string]: unknown;
26
+ };
27
+ context?: {
28
+ caller?: string;
29
+ caller_object_id?: string;
30
+ correlation_id?: string;
31
+ [k: string]: unknown;
32
+ };
33
+ [k: string]: unknown;
34
+ }
35
+ export interface Source {
36
+ content: string;
37
+ content_type: "plain_text" | "html" | "markdown";
38
+ language: string;
39
+ title?: string;
40
+ source_uri?: string;
41
+ content_hash?: string;
42
+ normalised_hash?: string;
43
+ [k: string]: unknown;
44
+ }
@@ -0,0 +1,122 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export type HttpsSchemasOpaceAgencyContentIntegrityV1MethodResultSchemaJson = {
9
+ [k: string]: unknown;
10
+ } & {
11
+ id: string;
12
+ category: "detector" | "watermark" | "provenance" | "unicode" | "pattern" | "fidelity";
13
+ provider_or_method: string;
14
+ version: string;
15
+ status: "pass" | "attention" | "fail" | "inconclusive" | "unsupported" | "not_configured" | "not_run" | "error";
16
+ availability?: "available" | "restricted" | "not_available";
17
+ native_outcome?: string;
18
+ score: number | null;
19
+ score_scale?: {
20
+ [k: string]: unknown;
21
+ } | null;
22
+ threshold: {
23
+ [k: string]: unknown;
24
+ } | null;
25
+ segments: {
26
+ [k: string]: unknown;
27
+ }[];
28
+ evidence: {
29
+ [k: string]: unknown;
30
+ }[];
31
+ /**
32
+ * @minItems 1
33
+ */
34
+ limitations: [string, ...string[]];
35
+ started_at: string;
36
+ completed_at: string;
37
+ privacy_route: "browser" | "wordpress_local" | "local_service" | "hub_provider" | "commercial_byok";
38
+ [k: string]: unknown;
39
+ };
40
+
41
+ export interface HttpsSchemasOpaceAgencyContentIntegrityV1AnalysisResultSchemaJson {
42
+ schema_version: "1.0";
43
+ contract_version: string;
44
+ request_id: string;
45
+ analysis_id: string;
46
+ source: {
47
+ content_hash: string;
48
+ normalised_hash?: string;
49
+ content_type: "plain_text" | "html" | "markdown";
50
+ language: string;
51
+ word_count: number;
52
+ [k: string]: unknown;
53
+ };
54
+ protected_spans: HttpsSchemasOpaceAgencyContentIntegrityV1ProtectedSpanSchemaJson[];
55
+ pattern_findings: HttpsSchemasOpaceAgencyContentIntegrityV1PatternFindingSchemaJson[];
56
+ methods: HttpsSchemasOpaceAgencyContentIntegrityV1MethodResultSchemaJson[];
57
+ summary: {
58
+ pass: number;
59
+ attention: number;
60
+ fail: number;
61
+ inconclusive: number;
62
+ unsupported: number;
63
+ not_configured: number;
64
+ not_run: number;
65
+ error: number;
66
+ [k: string]: unknown;
67
+ };
68
+ /**
69
+ * @minItems 1
70
+ */
71
+ limitations: [string, ...string[]];
72
+ started_at: string;
73
+ completed_at: string;
74
+ [k: string]: unknown;
75
+ }
76
+ export interface HttpsSchemasOpaceAgencyContentIntegrityV1ProtectedSpanSchemaJson {
77
+ id: string;
78
+ kind:
79
+ | "name"
80
+ | "organisation"
81
+ | "number"
82
+ | "date"
83
+ | "time"
84
+ | "currency"
85
+ | "unit"
86
+ | "url"
87
+ | "email"
88
+ | "quote"
89
+ | "citation"
90
+ | "code"
91
+ | "user_selected";
92
+ text: string;
93
+ start_utf16: number;
94
+ end_utf16: number;
95
+ start_codepoint: number;
96
+ end_codepoint: number;
97
+ normalised_value?: unknown;
98
+ policy: "exact" | "equivalent_format" | "must_remain_supported" | "user_review";
99
+ source: "deterministic" | "ner" | "citation_parser" | "user";
100
+ confidence?: number | null;
101
+ content_hash: string;
102
+ [k: string]: unknown;
103
+ }
104
+ export interface HttpsSchemasOpaceAgencyContentIntegrityV1PatternFindingSchemaJson {
105
+ rule_id: string;
106
+ rule_version: string;
107
+ severity: "note" | "low" | "medium" | "high";
108
+ message: string;
109
+ suggestion?: string;
110
+ span: {
111
+ start_utf16: number;
112
+ end_utf16: number;
113
+ start_codepoint: number;
114
+ end_codepoint: number;
115
+ [k: string]: unknown;
116
+ };
117
+ matched_text_hash: string;
118
+ evidence: {
119
+ [k: string]: unknown;
120
+ };
121
+ [k: string]: unknown;
122
+ }
@@ -0,0 +1,81 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export type HttpsSchemasOpaceAgencyContentIntegrityV1MethodResultSchemaJson = {
9
+ [k: string]: unknown;
10
+ } & {
11
+ id: string;
12
+ category: "detector" | "watermark" | "provenance" | "unicode" | "pattern" | "fidelity";
13
+ provider_or_method: string;
14
+ version: string;
15
+ status: "pass" | "attention" | "fail" | "inconclusive" | "unsupported" | "not_configured" | "not_run" | "error";
16
+ availability?: "available" | "restricted" | "not_available";
17
+ native_outcome?: string;
18
+ score: number | null;
19
+ score_scale?: {
20
+ [k: string]: unknown;
21
+ } | null;
22
+ threshold: {
23
+ [k: string]: unknown;
24
+ } | null;
25
+ segments: {
26
+ [k: string]: unknown;
27
+ }[];
28
+ evidence: {
29
+ [k: string]: unknown;
30
+ }[];
31
+ /**
32
+ * @minItems 1
33
+ */
34
+ limitations: [string, ...string[]];
35
+ started_at: string;
36
+ completed_at: string;
37
+ privacy_route: "browser" | "wordpress_local" | "local_service" | "hub_provider" | "commercial_byok";
38
+ [k: string]: unknown;
39
+ };
40
+
41
+ export interface HttpsSchemasOpaceAgencyContentIntegrityV1CandidateSchemaJson {
42
+ id: string;
43
+ job_id: string;
44
+ ordinal: number;
45
+ content: string;
46
+ content_hash: string;
47
+ generator: {
48
+ route: "browser" | "wordpress_local" | "local_service" | "hub_provider" | "commercial_byok";
49
+ provider: string;
50
+ model: string;
51
+ prompt_template: string;
52
+ parameters: {
53
+ [k: string]: unknown;
54
+ };
55
+ [k: string]: unknown;
56
+ };
57
+ gates: HttpsSchemasOpaceAgencyContentIntegrityV1GateResultSchemaJson[];
58
+ methods: HttpsSchemasOpaceAgencyContentIntegrityV1MethodResultSchemaJson[];
59
+ diff: {
60
+ version: string;
61
+ change_count: number;
62
+ segments: unknown[];
63
+ [k: string]: unknown;
64
+ };
65
+ eligible: boolean;
66
+ rejection_reasons: string[];
67
+ created_at: string;
68
+ [k: string]: unknown;
69
+ }
70
+ export interface HttpsSchemasOpaceAgencyContentIntegrityV1GateResultSchemaJson {
71
+ id: string;
72
+ version: string;
73
+ status: "pass" | "attention" | "fail" | "inconclusive" | "unsupported" | "not_configured" | "not_run" | "error";
74
+ hard: boolean;
75
+ summary: string;
76
+ failures: {
77
+ [k: string]: unknown;
78
+ }[];
79
+ limitations: string[];
80
+ [k: string]: unknown;
81
+ }
@@ -0,0 +1,24 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ export interface HttpsSchemasOpaceAgencyContentIntegrityV1CapabilitiesSchemaJson {
9
+ schema_version: "1.0";
10
+ product: string;
11
+ version: string;
12
+ contract_version: string;
13
+ schema_versions: string[];
14
+ limits: {
15
+ max_request_bytes: number;
16
+ max_candidates: number;
17
+ max_concurrent_jobs: number;
18
+ [k: string]: unknown;
19
+ };
20
+ methods: {
21
+ [k: string]: unknown;
22
+ }[];
23
+ [k: string]: unknown;
24
+ }