Witness 0.3.0 is out. Many image and video generators already embed C2PA Content Credentials, the signed metadata that the Code of Practice on marking points to. Until now Witness only knew that such a manifest was there. With 0.3.0 it reads what the manifest says. @sweberdev/witness and @sweberdev/witness-react 0.3.0 are on npm under the MIT licence.
What is in 0.3.0
readC2pareads the C2PA manifest store of PNG, JPEG, WebP, MP3, WAV and MP4 files. It returns the application that wrote it, the title, the recorded actions and the IPTC digital source type they declare.aiGeneratedtells you whether the active manifest declares a trained AI model as the source.aiInHistoryalso covers earlier manifests, for example the generated original of an image that was edited later.readImageMarking,readMediaMarking,readMarkingandwitness inspectcount a C2PA AI declaration as AI marking. A file from a generator with Content Credentials no longer shows up as unmarked just because it has no XMP.- Text watermarks can go on every paragraph:
watermarkText(text, mark, { paragraphs: true }), and the sameparagraphsoption in the Vercel AI SDK middleware, forgenerateTextandstreamText. A paragraph quoted from a longer answer then still carries the mark.
Witness reads the manifest; it does not validate it. The signature, the certificate chain and the hash binding are not checked, and the result says so with verified: false. Treat it as what the file claims, and use c2patool or a C2PA SDK when you need validation.
Install
npm install @sweberdev/witness@0.3.0
import { readC2pa, watermarkText } from "@sweberdev/witness"
readC2pa(bytes)?.aiGenerated // true for a generator that declares trainedAlgorithmicMedia
const marked = watermarkText(answer, { generator: "Claude" }, { paragraphs: true })
The images guide covers C2PA, and the text guide covers paragraph watermarks. In the live demo you can load a sample image with Content Credentials and see what Witness reads from it. The text watermark section now marks every paragraph.
Witness Pro 0.3.0
The Pro scanner treats images, audio and video whose C2PA manifest declares AI as AI content. Shown without a label next to them, they fail the build, and the finding says that the declaration comes from the manifest. The transparency report has a new "Key dates" section. It shows when Article 50 applies and when the grace period for machine-readable marking ends on 2 December 2026 for generative systems already on the market before 2 August 2026. For each date it lists the systems from the register it concerns and the days left. See the Witness page for the Pro edition.