@agenticprimitives/content-primitives 1.0.0-alpha.6 → 1.0.0-alpha.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.
Files changed (2) hide show
  1. package/README.md +27 -13
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,13 +1,12 @@
1
1
  # @agenticprimitives/content-primitives
2
2
 
3
- Verifiable Content Substrate — name, resolve, commit, entitlement-gate, and cite
4
- content that lives off-platform and is controlled by third-party rights holders.
3
+ The verifiable content substrate — name, resolve, commit, entitlement-gate, and cite content that lives off-platform and is controlled by third-party rights holders.
5
4
 
6
- It is **content-agnostic** ([ADR-0033](../../docs/architecture/decisions/0033-content-agnostic-verifiable-content-firewall.md)):
7
- a referenced unit of content (e.g. a Bible verse) is **not** a Smart Agent, and
8
- this package never embeds a translation, a faith term, or any rendering text.
9
- Bible verses are its first usage domain ([spec 267](../../specs/267-scripture-demo-vertical.md)),
10
- not its vocabulary.
5
+ Agents increasingly act on content they do not own: quoting a licensed text, citing a canonical passage, gating access to a rights-held corpus. The naive approaches all fail — copy the text and you violate the license; trust the platform and the citation is unverifiable; mint every passage an identity and the identity layer drowns. This package takes the third path: content is **never an agent and never stored**. A unit of content gets a deterministic, scheme-anchored address; an issuer (who IS a Smart Agent) signs a commitment to it; readers verify the signature, evaluate the entitlement, and cite the result — all without the text ever entering the substrate ([ADR-0033](../../docs/architecture/decisions/0033-content-agnostic-verifiable-content-firewall.md)).
6
+
7
+ The package is strictly content-agnostic: no rendering text in any descriptor or commitment we store (R3), no licensed material in the repo (R1), and the reference grammar is app-injected, never hardcoded (R4). Trust derives from the issuer's signature and access policy, never a platform claim (R5).
8
+
9
+ Part of [agenticprimitives](../../README.md) — the trust substrate for the agent economy: one canonical Smart Agent identity with custody, delegation, naming, credentials, and audit evidence designed as one system.
11
10
 
12
11
  ## Model (FRBR)
13
12
 
@@ -18,6 +17,8 @@ not its vocabulary.
18
17
  | Item | `ContentDescriptor` | commitment + `retrievalPointer` + issuer signature — **never text** |
19
18
  | — | `Entitlement` / `CitationAssertion` | W3C VC 2.0 subjects |
20
19
 
20
+ The FRBR Work/Item split is why this is a new substrate and not another naming-record type: a content locus is an address computed from a reference scheme, while only issuers, corpora owners, and parties are Smart Agents (ADR-0010 still governs *them*).
21
+
21
22
  ## Quick start
22
23
 
23
24
  ```ts
@@ -28,15 +29,15 @@ import {
28
29
  } from '@agenticprimitives/content-primitives';
29
30
 
30
31
  // 1. App supplies the reference grammar (kept out of the package — R4).
31
- const bibleVerse = { id: 'bible-verse', normalize: (p: string) => /* OSIS */ p };
32
- const locus = buildCanonicalLocus(bibleVerse, 'John 3:16'); // -> { locusId, path: 'John.3.16' }
32
+ const clauseScheme = { id: 'standard-clause', normalize: (p: string) => /* canonical form */ p };
33
+ const locus = buildCanonicalLocus(clauseScheme, 'Part 4, Section 2'); // -> { locusId, path: 'Part4.Section2' }
33
34
 
34
35
  // 2. Issuer commits to off-platform text + signs a descriptor (no text on-chain — R3).
35
36
  const commitment = contentCommitment(renderingText); // keccak256, off-platform
36
37
  const descriptor = await buildContentDescriptor(
37
- { locusId: locus.locusId, corpusRef: ref, contentType: 'bible-verse',
38
+ { locusId: locus.locusId, corpusRef: ref, contentType: 'standard-clause',
38
39
  commitment, proofPolicy: 'signature', accessPolicy: 'public',
39
- retrievalPointer: 'content://bible-verse/bsb/John.3.16', issuer },
40
+ retrievalPointer: 'content://standard-clause/v3/Part4.Section2', issuer },
40
41
  issuerSign, // signs descriptorHash via the issuer SA (ERC-1271)
41
42
  );
42
43
 
@@ -45,5 +46,18 @@ const ok = await verifyContentDescriptor(descriptor, { verifySignature });
45
46
  const gate = evaluateEntitlement(descriptor.accessPolicy, descriptor.corpusRef);
46
47
  ```
47
48
 
48
- Full SDK + phased roadmap: [spec 266](../../specs/266-verifiable-content-substrate.md).
49
- ZK proofs and paid access are reserved (Phase 4/5) and throw until implemented.
49
+ Entitlement evaluation is fail-closed; Merkle helpers ship under the `/merkle` subpath; ERC-1271 signature verification is dependency-injected so the package stays at the base of the graph.
50
+
51
+ ## Status
52
+
53
+ Phases 1–3 (naming, commitment, descriptor verification, entitlement gating, citation) are implemented and tested. **ZK proofs and paid access are reserved (Phase 4/5) and throw until implemented** — the full SDK surface and phased roadmap live in [spec 266](../../specs/266-verifiable-content-substrate.md) (see [`spec.md`](./spec.md)).
54
+
55
+ Testnet/pilot-ready. Production launch is gated on the public checklist in the root README — including third-party contract audit and governance key rotation. Track every security finding live in [`docs/audits/findings.yaml`](../../docs/audits/findings.yaml).
56
+
57
+ ## Build
58
+
59
+ ```bash
60
+ pnpm --filter @agenticprimitives/content-primitives typecheck
61
+ pnpm --filter @agenticprimitives/content-primitives test
62
+ pnpm --filter @agenticprimitives/content-primitives build
63
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticprimitives/content-primitives",
3
- "version": "1.0.0-alpha.6",
3
+ "version": "1.0.0-alpha.8",
4
4
  "description": "Verifiable Content Substrate SDK: name, resolve, commit, entitlement-gate, and cite off-platform content controlled by third-party rights holders. Owns CanonicalLocus / CorpusManifest / ContentDescriptor / CitationAssertion / Entitlement (FRBR-aligned), deterministic locusId, Merkle corpus commitments, and issuer-signature verification. Content-agnostic — no vertical/faith vocabulary, no content text (ADR-0033).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "peerDependencies": {
39
39
  "viem": "^2.52.2",
40
- "@agenticprimitives/types": "1.0.0-alpha.6",
41
- "@agenticprimitives/verifiable-credentials": "0.0.0-alpha.2"
40
+ "@agenticprimitives/types": "1.0.0-alpha.8",
41
+ "@agenticprimitives/verifiable-credentials": "0.0.0-alpha.4"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^22.7.0",
@@ -56,8 +56,8 @@
56
56
  "build": "tsc -p tsconfig.build.json",
57
57
  "typecheck": "tsc -p tsconfig.json --noEmit",
58
58
  "test": "vitest run",
59
- "test:unit": "vitest run test/reference.test.ts test/merkle.test.ts test/descriptor.test.ts test/entitlement.test.ts",
60
- "test:integration": "vitest run test/integration.test.ts",
59
+ "test:unit": "vitest run test/reference.test.ts test/merkle.test.ts test/descriptor.test.ts test/entitlement.test.ts test/resolution.test.ts --passWithNoTests",
60
+ "test:integration": "vitest run test/integration --passWithNoTests",
61
61
  "test:watch": "vitest",
62
62
  "clean": "rm -rf dist"
63
63
  }