trustdex 0.10.0 → 0.11.0

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.
@@ -18,6 +18,9 @@ TrustDex는 초기 단계입니다. 이 로드맵은 방향을 공유하며 릴
18
18
  연결, 버전 지정 스키마, 드리프트 검토 및 비활성 픽스처를 추가합니다.
19
19
  - TrustDex 0.10.0은 명시적인 값 없는 런타임 인벤토리 계약, 실제 경계 대조,
20
20
  노출 드리프트 검토, 버전 지정 스키마 및 픽스처를 추가합니다.
21
+ - TrustDex 0.11.0은 정확한 런타임 인벤토리의 Ed25519 생성자 인증, 제한된 만료/캡처
22
+ 나이, 스키마 v2 인증 상태와 재사용·다른 키·미래 시각·변조·미인증 증거를
23
+ 안전하게 실패시키는 테스트를 추가합니다.
21
24
 
22
25
  ## 현재: 경계 강화
23
26
 
@@ -31,7 +34,8 @@ TrustDex는 초기 단계입니다. 이 로드맵은 방향을 공유하며 릴
31
34
  ## 다음: 실제 런타임 증거 강화
32
35
 
33
36
  - 런타임이 권한 있는 안정적 인터페이스를 제공할 때만 구체적인 옵트인 어댑터 게시
34
- - 장기 공유 비밀 없이 인벤토리 생성자와 전송 인증
37
+ - 배포용 공개 키 허용 목록, 교체 및 폐기 연결 지점 추가
38
+ - 메시지 수준 생성자 서명 주변의 전송 보호 문서화
35
39
  - 값 없는 보고서를 유지하면서 MCP 표시 범위 밖으로 실제 증거 확장
36
40
  - 지원하는 어댑터/런타임 버전의 테스트 기반 호환성 매트릭스 게시
37
41
 
package/docs/ROADMAP.md CHANGED
@@ -18,6 +18,9 @@ TrustDex is early-stage. This roadmap communicates direction and is not a releas
18
18
  results and automatic tool grants, versioned schemas, drift review, and inert fixtures.
19
19
  - TrustDex 0.10.0 adds an explicit value-free runtime inventory contract, effective
20
20
  boundary reconciliation, exposure-drift review, versioned schemas, and fixtures.
21
+ - TrustDex 0.11.0 adds Ed25519 producer authentication for exact runtime inventories,
22
+ bounded expiry/capture age, schema-v2 authentication state, and fail-closed tests for
23
+ replay, wrong-key, future-time, mutation, and unauthenticated evidence.
21
24
 
22
25
  ## Now: harden the boundary
23
26
 
@@ -31,7 +34,8 @@ TrustDex is early-stage. This roadmap communicates direction and is not a releas
31
34
  ## Next: strengthen effective-runtime evidence
32
35
 
33
36
  - ship concrete opt-in adapters only where a runtime exposes an authorized stable interface
34
- - authenticate inventory producers and transports without introducing long-lived shared secrets
37
+ - add deployment-facing public-key allowlists, rotation, and revocation hooks
38
+ - document transport hardening around the message-level producer signature
35
39
  - extend effective evidence beyond MCP visibility while retaining value-free reports
36
40
  - publish a tested compatibility matrix for supported adapter/runtime versions
37
41
 
@@ -0,0 +1,89 @@
1
+ # 인증된 런타임 증거
2
+
3
+ <p align="right">
4
+ <a href="./RUNTIME_EVIDENCE.md">English</a> | <strong>한국어</strong>
5
+ </p>
6
+
7
+ TrustDex는 권한이 있는 Claude 또는 Codex 통합이 생성한 값 없는 런타임 인벤토리를
8
+ 인증할 수 있습니다. 인증은 고정된 어떤 Ed25519 키가 정확한 인벤토리에 서명했는지와
9
+ 수명이 짧은 증명이 신선한지를 확인합니다. 어댑터가 침해되지 않았거나 인벤토리가
10
+ 완전하거나 런타임이 검토된 정책을 강제했다는 사실까지 증명하지는 않습니다.
11
+
12
+ ## 종단 간 워크플로
13
+
14
+ 전용 생성자 키 쌍을 한 번 만드세요. 비공개 키는 어댑터에 보관하고, 공개 키는
15
+ 신뢰할 수 있는 채널을 통해 각 검증자에게 배포합니다.
16
+
17
+ ```bash
18
+ node ./bin/trustdex.mjs keygen \
19
+ --private .trustdex/runtime-producer-private.pem \
20
+ --public .trustdex/runtime-producer-public.pem
21
+ ```
22
+
23
+ 권한 있는 어댑터는 런타임, 캡처 시각/방식, 서버 이름 및 서버별 도구 개수만 담은
24
+ `agent-runtime-tool-inventory` JSON을 작성합니다. 그 파일에 즉시 서명하세요. 기본
25
+ 수명은 5분이고 최대 수명은 24시간입니다.
26
+
27
+ ```bash
28
+ node ./bin/trustdex.mjs sign-runtime-inventory \
29
+ ./runtime-tool-inventory.json \
30
+ --private .trustdex/runtime-producer-private.pem \
31
+ --out .trustdex/runtime-attestation.json \
32
+ --ttl-seconds 300
33
+ ```
34
+
35
+ 대조 전에 생성자 신원, 서명, 만료 및 캡처 신선도를 검증합니다.
36
+
37
+ ```bash
38
+ node ./bin/trustdex.mjs verify-runtime-inventory \
39
+ ./runtime-tool-inventory.json \
40
+ --attestation .trustdex/runtime-attestation.json \
41
+ --public .trustdex/runtime-producer-public.pem \
42
+ --max-age-seconds 120 \
43
+ --json
44
+
45
+ node ./bin/trustdex.mjs snapshot-runtime-tools \
46
+ .trustdex/claude-bindings.json \
47
+ ./runtime-tool-inventory.json \
48
+ --attestation .trustdex/runtime-attestation.json \
49
+ --public .trustdex/runtime-producer-public.pem \
50
+ --max-age-seconds 120 \
51
+ --require-authenticated \
52
+ --out .trustdex/runtime-tools.json
53
+ ```
54
+
55
+ 잘못되거나 만료되거나 오래되거나 미래 시각이거나 다른 키를 사용하거나 인벤토리와
56
+ 불일치하는 증명은 종료 코드 `2`를 반환합니다. 인증하지 않은 스키마 v2 실제 증거는
57
+ 항상 최소 `needs-review`가 되며, 관찰된 차단/미설정 서버는 계속 `block`이 됩니다.
58
+
59
+ ## 서명 범위
60
+
61
+ Ed25519 서명은 스키마/알고리즘 식별자, 정규 인벤토리 다이제스트, 런타임, 캡처
62
+ 시각과 방식, 생성자 공개 키 ID, 생성 시각 및 만료 시각을 포함합니다. 키 ID는 공개
63
+ SPKI 바이트의 SHA-256 다이제스트입니다. 별도 인벤토리 스키마가 원시 도구 목록과
64
+ 임의 필드를 거부하므로 증명과 실제 보고서에는 도구 이름, 엔드포인트, 자격 증명 또는
65
+ 비공개 키 자료가 포함되지 않습니다.
66
+
67
+ 선택적인 `--max-age-seconds`는 증명 만료와 별개입니다. 만료는 서명 사용 가능 시간을,
68
+ 최대 나이는 원본 캡처의 허용 나이를 제한합니다. TrustDex는 제한된 시계 오차만
69
+ 허용하기 위해 5분보다 먼 미래의 캡처와 증명도 거부합니다.
70
+
71
+ ## 운영 및 키 교체
72
+
73
+ - 생성자 전용 키를 사용하고 비공개 파일을 최소 권한으로 보호하며 커밋하지 마세요.
74
+ 일반 검토 기록 키도 암호학적으로 작동하지만 운영 역할은 분리해야 합니다.
75
+ - 예상 공개 키는 인벤토리/증명 채널 밖에서 고정하세요. 공격자가 증거와 공개 키를
76
+ 모두 바꿀 수 있다면 서명은 신원 주장이 아닙니다.
77
+ - 감사 보존이 필요하면 인벤토리, 증명, 고정 키 ID, 결합 스냅샷 및 실제 보고서를
78
+ 함께 보관하세요. 실제 보고서는 자체 일관성을 확인하지만 독립적으로 서명되지는 않습니다.
79
+ - 키 교체 시 새 공개 키를 먼저 배포하고, 제한된 중첩 기간 동안 오케스트레이션에서
80
+ 이전 또는 새 고정 키를 허용한 뒤 생성자를 전환하고 이전 키를 폐기하세요. TrustDex는
81
+ 호출당 전달된 키 하나를 검증하며 키 허용 목록과 폐기는 배포 환경의 책임입니다.
82
+ - `producer-key-changed`와 `inventory-authentication-changed` 차이를 검토 이벤트로
83
+ 취급하세요. 비공개 키 탈취가 의심되면 검증자에서 키를 제거하고 새 키로 증거를 다시 발급하세요.
84
+
85
+ 계약은
86
+ [`runtime-tool-inventory-v1.schema.json`](../schemas/runtime-tool-inventory-v1.schema.json),
87
+ [`runtime-tool-inventory-attestation-v1.schema.json`](../schemas/runtime-tool-inventory-attestation-v1.schema.json),
88
+ [`effective-runtime-tools-v2.schema.json`](../schemas/effective-runtime-tools-v2.schema.json),
89
+ [`effective-runtime-tools-diff-v2.schema.json`](../schemas/effective-runtime-tools-diff-v2.schema.json)에 정의되어 있습니다.
@@ -0,0 +1,96 @@
1
+ # Authenticated runtime evidence
2
+
3
+ <p align="right">
4
+ <strong>English</strong> | <a href="./RUNTIME_EVIDENCE.ko.md">한국어</a>
5
+ </p>
6
+
7
+ TrustDex can authenticate a value-free runtime inventory produced by an authorized
8
+ Claude or Codex integration. Authentication proves which pinned Ed25519 key signed the
9
+ exact inventory and whether the short-lived attestation is fresh. It does not prove
10
+ that the adapter is uncompromised, that the inventory is complete, or that the runtime
11
+ enforced the reviewed policy.
12
+
13
+ ## End-to-end workflow
14
+
15
+ Generate a dedicated producer key pair once. Keep the private key with the adapter and
16
+ distribute the public key through a trusted channel to each verifier:
17
+
18
+ ```bash
19
+ node ./bin/trustdex.mjs keygen \
20
+ --private .trustdex/runtime-producer-private.pem \
21
+ --public .trustdex/runtime-producer-public.pem
22
+ ```
23
+
24
+ The authorized adapter writes `agent-runtime-tool-inventory` JSON containing only the
25
+ runtime, capture time/method, server names, and per-server tool counts. Sign that exact
26
+ file immediately; the default lifetime is five minutes and the maximum is 24 hours:
27
+
28
+ ```bash
29
+ node ./bin/trustdex.mjs sign-runtime-inventory \
30
+ ./runtime-tool-inventory.json \
31
+ --private .trustdex/runtime-producer-private.pem \
32
+ --out .trustdex/runtime-attestation.json \
33
+ --ttl-seconds 300
34
+ ```
35
+
36
+ Verify producer identity, signature, expiry, and capture freshness before reconciliation:
37
+
38
+ ```bash
39
+ node ./bin/trustdex.mjs verify-runtime-inventory \
40
+ ./runtime-tool-inventory.json \
41
+ --attestation .trustdex/runtime-attestation.json \
42
+ --public .trustdex/runtime-producer-public.pem \
43
+ --max-age-seconds 120 \
44
+ --json
45
+
46
+ node ./bin/trustdex.mjs snapshot-runtime-tools \
47
+ .trustdex/claude-bindings.json \
48
+ ./runtime-tool-inventory.json \
49
+ --attestation .trustdex/runtime-attestation.json \
50
+ --public .trustdex/runtime-producer-public.pem \
51
+ --max-age-seconds 120 \
52
+ --require-authenticated \
53
+ --out .trustdex/runtime-tools.json
54
+ ```
55
+
56
+ An invalid, expired, stale, future-dated, wrong-key, or inventory-mismatched attestation
57
+ exits `2`. Without authentication, schema-v2 effective evidence is always at least
58
+ `needs-review`; observed blocked or unconfigured servers still produce `block`.
59
+
60
+ ## What is signed
61
+
62
+ The Ed25519 signature covers the schema and algorithm identifiers, canonical inventory
63
+ digest, runtime, capture time and method, producer public-key ID, creation time, and
64
+ expiry. The key ID is the SHA-256 digest of the public SPKI bytes. The separate inventory
65
+ schema rejects raw tool lists and arbitrary fields, so neither the attestation nor the
66
+ effective report contains tool names, endpoints, credentials, or private-key material.
67
+
68
+ The optional `--max-age-seconds` limit is independent of attestation expiry: expiry caps
69
+ how long the signature is usable, while maximum age caps how old the underlying capture
70
+ may be. TrustDex also rejects captures and attestations more than five minutes in the
71
+ future to tolerate only bounded clock skew.
72
+
73
+ ## Operations and key rotation
74
+
75
+ - Use a producer-specific key, protect the private file with least privilege, and never
76
+ commit it. A generic review-record key may work cryptographically but should remain a
77
+ separate operational role.
78
+ - Pin the expected public key outside the inventory/attestation channel. A signature is
79
+ not an identity claim if an attacker can replace both the evidence and its public key.
80
+ - Archive the inventory, attestation, pinned key ID, binding snapshot, and effective
81
+ report together when audit retention is required. The effective report is
82
+ self-consistent but is not independently signed.
83
+ - For rotation, distribute the new public key first, update orchestration to accept the
84
+ old or new pinned key during a bounded overlap, then switch the producer and retire the
85
+ old key. TrustDex verifies one supplied key per invocation; key allowlists and revocation
86
+ remain deployment responsibilities.
87
+ - Treat `producer-key-changed` and `inventory-authentication-changed` diffs as review
88
+ events. If a private key is suspected to be stolen, remove that key from verifiers and
89
+ reissue evidence with a new key.
90
+
91
+ The contracts are defined by
92
+ [`runtime-tool-inventory-v1.schema.json`](../schemas/runtime-tool-inventory-v1.schema.json),
93
+ [`runtime-tool-inventory-attestation-v1.schema.json`](../schemas/runtime-tool-inventory-attestation-v1.schema.json),
94
+ [`effective-runtime-tools-v2.schema.json`](../schemas/effective-runtime-tools-v2.schema.json),
95
+ and [`effective-runtime-tools-diff-v2.schema.json`](../schemas/effective-runtime-tools-diff-v2.schema.json).
96
+
@@ -28,6 +28,7 @@ TrustDex는 하나의 좁은 질문을 다룹니다.
28
28
  - 실제 도구 경계를 가리는 와일드카드, 일치하지 않거나 모호한 권한
29
29
  - 차단·검토 필요·미설정 MCP 서버를 노출한다고 명시적으로 보고한 런타임 인벤토리
30
30
  - 서버 표시 범위 또는 도구 개수로 확대되는 실제 런타임 인벤토리
31
+ - 서명된 런타임 인벤토리의 변조, 만료/캡처 나이 이후 재사용, 미래 시각 지정 또는 다른 키 대체
31
32
 
32
33
  ## 신뢰 경계
33
34
 
@@ -56,13 +57,17 @@ TrustDex는 익숙한 프로젝트 이름, 스타 수, 패키지 이름 또는
56
57
  - 서명되지 않은 권한 상태 스냅샷 작성자의 인증
57
58
  - 결합 스냅샷이 실행 중인 에이전트가 실제로 불러온 파일을 반영함을 증명하는 것
58
59
  - 개별 MCP 도구 호출을 런타임에서 가로채거나 강제하는 것
59
- - 인벤토리 생성자 인증, 인벤토리 완전성 증명 또는 침해된 어댑터의 거짓 보고 방지
60
+ - 인벤토리 완전성 증명 또는 침해된 어댑터나 탈취된 생성자 키의 거짓 증거 서명 방지
60
61
  - 실제 Claude/Codex 세션을 자동으로 찾거나 비공개 상태를 읽는 것
61
62
 
62
63
  ## 중요한 실패 모드
63
64
 
64
65
  유효한 서명은 신뢰 기록이 해당 비공개 키로 서명되었고 연결된 스냅샷 다이제스트가 변경되지 않았음을 증명합니다. 원래 검토가 정확했다는 것은 증명하지 않습니다.
65
66
 
67
+ 마찬가지로 유효한 런타임 인벤토리 증명은 고정된 생성자 키가 검사된 시간 제한 안에서
68
+ 정확한 값 없는 인벤토리에 서명했음을 증명합니다. 생성자가 로드된 모든 도구를
69
+ 관찰했거나 런타임을 진실하게 보고했다는 사실은 증명하지 않습니다.
70
+
66
71
  ## 설계 원칙
67
72
 
68
73
  TrustDex는 누락된 증거를 신뢰로 변환해서는 안 됩니다. 알 수 없는 출처는 추측할 이유가 아니라 정책 입력입니다.
@@ -28,6 +28,7 @@ TrustDex addresses one narrow question:
28
28
  - wildcard, unmatched, or ambiguous grants that hide the effective tool boundary
29
29
  - explicitly reported runtime inventories that expose blocked, review-required, or unconfigured MCP servers
30
30
  - effective runtime inventories expanding by server visibility or tool count
31
+ - mutation, replay past expiry/capture-age limits, future dating, or wrong-key substitution of signed runtime inventories
31
32
 
32
33
  ## Trust boundaries
33
34
 
@@ -56,13 +57,17 @@ TrustDex does **not** treat a familiar project name, star count, package name, o
56
57
  - authenticating the author of an unsigned permission posture snapshot
57
58
  - proving that a binding snapshot reflects the files actually loaded by a running agent
58
59
  - intercepting or enforcing individual MCP tool calls at runtime
59
- - authenticating an inventory producer, proving inventory completeness, or preventing a compromised adapter from lying
60
+ - proving inventory completeness or preventing a compromised adapter or stolen producer key from signing false evidence
60
61
  - discovering live Claude/Codex sessions or reading their private state automatically
61
62
 
62
63
  ## Important failure mode
63
64
 
64
65
  A valid signature proves that a trust record was signed by the corresponding private key and that its bound snapshot digest has not changed. It does not prove that the original review was correct.
65
66
 
67
+ Likewise, a valid runtime-inventory attestation proves that the pinned producer key
68
+ signed the exact value-free inventory within the checked time limits. It does not prove
69
+ that the producer observed every loaded tool or reported the runtime truthfully.
70
+
66
71
  ## Design principle
67
72
 
68
73
  TrustDex should never convert missing evidence into trust. Unknown provenance is a policy input, not a reason to guess.
@@ -13,7 +13,7 @@
13
13
  "blockedCount": 1
14
14
  },
15
15
  "runtimeBefore": {
16
- "status": "restricted",
16
+ "status": "needs-review",
17
17
  "observedServerCount": 1,
18
18
  "matchedCount": 1,
19
19
  "notObservedCount": 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trustdex",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "A local-first trust, provenance, and review gate for AI agent tools, MCP servers, skills, and plugins.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,8 +8,8 @@
8
8
  },
9
9
  "scripts": {
10
10
  "test": "node --test",
11
- "test:research": "node --test test/research-fixtures.test.mjs test/claude-settings.test.mjs test/codex-settings.test.mjs test/posture.test.mjs test/settings-stack.test.mjs test/bindings.test.mjs test/runtime-evidence.test.mjs",
12
- "check": "node --check bin/trustdex.mjs && node --check src/bindings.mjs && node --check src/runtime-evidence.mjs && node --check src/canonical.mjs && node --check src/claude-config.mjs && node --check src/claude-settings.mjs && node --check src/codex-config.mjs && node --check src/codex-settings.mjs && node --check src/extensions.mjs && node --check src/gate.mjs && node --check src/inspect.mjs && node --check src/policy.mjs && node --check src/policy-packs.mjs && node --check src/posture.mjs && node --check src/provenance.mjs && node --check src/provenance-online.mjs && node --check src/review.mjs && node --check src/snapshot.mjs && node --check src/trust-record.mjs",
11
+ "test:research": "node --test test/research-fixtures.test.mjs test/claude-settings.test.mjs test/codex-settings.test.mjs test/posture.test.mjs test/settings-stack.test.mjs test/bindings.test.mjs test/runtime-evidence.test.mjs test/runtime-attestation.test.mjs",
12
+ "check": "node --check bin/trustdex.mjs && node --check src/bindings.mjs && node --check src/runtime-evidence.mjs && node --check src/runtime-attestation.mjs && node --check src/canonical.mjs && node --check src/claude-config.mjs && node --check src/claude-settings.mjs && node --check src/codex-config.mjs && node --check src/codex-settings.mjs && node --check src/extensions.mjs && node --check src/gate.mjs && node --check src/inspect.mjs && node --check src/policy.mjs && node --check src/policy-packs.mjs && node --check src/posture.mjs && node --check src/provenance.mjs && node --check src/provenance-online.mjs && node --check src/review.mjs && node --check src/snapshot.mjs && node --check src/trust-record.mjs",
13
13
  "prepublishOnly": "npm test && npm run check"
14
14
  },
15
15
  "engines": {
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/grigent/trustdex/blob/main/schemas/effective-runtime-tools-diff-v2.schema.json",
4
+ "title": "TrustDex authenticated effective runtime tool boundary diff v2",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "runtime", "status", "baselineDigest", "currentDigest", "summary", "changes"],
8
+ "properties": {
9
+ "schemaVersion": { "const": 2 },
10
+ "runtime": { "enum": ["claude", "codex"] },
11
+ "status": { "enum": ["unchanged", "restricted", "needs-review"] },
12
+ "baselineDigest": { "$ref": "#/$defs/digest" },
13
+ "currentDigest": { "$ref": "#/$defs/digest" },
14
+ "summary": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["expansions", "restrictions", "reviews"],
18
+ "properties": {
19
+ "expansions": { "$ref": "#/$defs/count" },
20
+ "restrictions": { "$ref": "#/$defs/count" },
21
+ "reviews": { "$ref": "#/$defs/count" }
22
+ }
23
+ },
24
+ "changes": {
25
+ "type": "array",
26
+ "items": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["impact", "type", "name", "field", "before", "after"],
30
+ "properties": {
31
+ "impact": { "enum": ["expansion", "restriction", "review"] },
32
+ "type": {
33
+ "enum": [
34
+ "bindings-changed", "capture-method-changed", "inventory-authentication-changed",
35
+ "producer-key-changed", "server-added", "server-removed", "observation-changed",
36
+ "tool-count-changed", "binding-state-changed", "server-status-changed"
37
+ ]
38
+ },
39
+ "name": { "oneOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] },
40
+ "field": { "type": "string", "minLength": 1 },
41
+ "before": {},
42
+ "after": {}
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "$defs": {
48
+ "digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
49
+ "count": { "type": "integer", "minimum": 0 }
50
+ }
51
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/grigent/trustdex/blob/main/schemas/effective-runtime-tools-v2.schema.json",
4
+ "title": "TrustDex authenticated effective runtime tool boundary v2",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion", "kind", "createdAt", "runtime", "capturedAt", "captureMethod",
9
+ "bindingDigest", "inventoryDigest", "inventoryAuthentication", "producerKeyId",
10
+ "attestationDigest", "status", "summary", "servers", "digest"
11
+ ],
12
+ "allOf": [
13
+ {
14
+ "if": {
15
+ "properties": { "inventoryAuthentication": { "const": "verified" } },
16
+ "required": ["inventoryAuthentication"]
17
+ },
18
+ "then": {
19
+ "properties": {
20
+ "producerKeyId": { "$ref": "#/$defs/digest" },
21
+ "attestationDigest": { "$ref": "#/$defs/digest" }
22
+ }
23
+ },
24
+ "else": {
25
+ "properties": {
26
+ "producerKeyId": { "type": "null" },
27
+ "attestationDigest": { "type": "null" }
28
+ }
29
+ }
30
+ },
31
+ {
32
+ "if": {
33
+ "properties": { "inventoryAuthentication": { "const": "unverified" } },
34
+ "required": ["inventoryAuthentication"]
35
+ },
36
+ "then": {
37
+ "properties": { "status": { "enum": ["needs-review", "block"] } }
38
+ }
39
+ }
40
+ ],
41
+ "properties": {
42
+ "schemaVersion": { "const": 2 },
43
+ "kind": { "const": "agent-effective-tool-boundary" },
44
+ "createdAt": { "type": "string", "format": "date-time" },
45
+ "runtime": { "enum": ["claude", "codex"] },
46
+ "capturedAt": { "type": "string", "format": "date-time" },
47
+ "captureMethod": { "enum": ["runtime-export", "runtime-adapter"] },
48
+ "bindingDigest": { "$ref": "#/$defs/digest" },
49
+ "inventoryDigest": { "$ref": "#/$defs/digest" },
50
+ "inventoryAuthentication": { "enum": ["unverified", "verified"] },
51
+ "producerKeyId": { "oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }] },
52
+ "attestationDigest": { "oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }] },
53
+ "status": { "enum": ["matched", "restricted", "needs-review", "block"] },
54
+ "summary": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": [
58
+ "configuredServerCount", "observedServerCount", "observedToolCount", "matchedCount",
59
+ "reviewCount", "blockedCount", "unexpectedCount", "notObservedCount"
60
+ ],
61
+ "properties": {
62
+ "configuredServerCount": { "$ref": "#/$defs/count" },
63
+ "observedServerCount": { "$ref": "#/$defs/count" },
64
+ "observedToolCount": { "$ref": "#/$defs/count" },
65
+ "matchedCount": { "$ref": "#/$defs/count" },
66
+ "reviewCount": { "$ref": "#/$defs/count" },
67
+ "blockedCount": { "$ref": "#/$defs/count" },
68
+ "unexpectedCount": { "$ref": "#/$defs/count" },
69
+ "notObservedCount": { "$ref": "#/$defs/count" }
70
+ }
71
+ },
72
+ "servers": { "type": "array", "items": { "$ref": "#/$defs/server" } },
73
+ "digest": { "$ref": "#/$defs/digest" }
74
+ },
75
+ "$defs": {
76
+ "digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
77
+ "count": { "type": "integer", "minimum": 0 },
78
+ "server": {
79
+ "type": "object",
80
+ "additionalProperties": false,
81
+ "required": [
82
+ "name", "configured", "observed", "toolCount", "sourceDecision", "provenanceStatus",
83
+ "automaticGrant", "bindingStatus", "status"
84
+ ],
85
+ "properties": {
86
+ "name": { "type": "string", "minLength": 1 },
87
+ "configured": { "type": "boolean" },
88
+ "observed": { "type": "boolean" },
89
+ "toolCount": { "oneOf": [{ "$ref": "#/$defs/count" }, { "type": "null" }] },
90
+ "sourceDecision": { "oneOf": [{ "enum": ["allow", "ask", "block"] }, { "type": "null" }] },
91
+ "provenanceStatus": { "oneOf": [{ "enum": ["unknown", "verified", "mismatch"] }, { "type": "null" }] },
92
+ "automaticGrant": { "oneOf": [{ "enum": ["none", "scoped", "all"] }, { "type": "null" }] },
93
+ "bindingStatus": { "oneOf": [{ "enum": ["not-granted", "bound", "needs-review", "blocked"] }, { "type": "null" }] },
94
+ "status": { "enum": ["matched", "not-observed", "needs-review", "blocked", "unexpected"] }
95
+ }
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/grigent/trustdex/blob/main/schemas/runtime-tool-inventory-attestation-v1.schema.json",
4
+ "title": "TrustDex signed runtime tool inventory attestation v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion", "kind", "algorithm", "inventoryDigest", "runtime", "capturedAt",
9
+ "captureMethod", "producerKeyId", "createdAt", "expiresAt", "signature"
10
+ ],
11
+ "properties": {
12
+ "schemaVersion": { "const": 1 },
13
+ "kind": { "const": "agent-runtime-tool-inventory-attestation" },
14
+ "algorithm": { "const": "ed25519" },
15
+ "inventoryDigest": { "$ref": "#/$defs/digest" },
16
+ "runtime": { "enum": ["claude", "codex"] },
17
+ "capturedAt": { "type": "string", "format": "date-time" },
18
+ "captureMethod": { "enum": ["runtime-export", "runtime-adapter"] },
19
+ "producerKeyId": { "$ref": "#/$defs/digest" },
20
+ "createdAt": { "type": "string", "format": "date-time" },
21
+ "expiresAt": { "type": "string", "format": "date-time" },
22
+ "signature": { "type": "string", "pattern": "^[A-Za-z0-9+/]{86}==$" }
23
+ },
24
+ "$defs": {
25
+ "digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
26
+ }
27
+ }