@agenttool/telescope 0.1.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.
Files changed (78) hide show
  1. package/CLAUDE.md +71 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +4 -0
  4. package/README.md +230 -0
  5. package/dist/archive.d.ts +22 -0
  6. package/dist/archive.d.ts.map +1 -0
  7. package/dist/archive.js +477 -0
  8. package/dist/archive.js.map +1 -0
  9. package/dist/cli-core.d.ts +7 -0
  10. package/dist/cli-core.d.ts.map +1 -0
  11. package/dist/cli-core.js +154 -0
  12. package/dist/cli-core.js.map +1 -0
  13. package/dist/cli.d.ts +3 -0
  14. package/dist/cli.d.ts.map +1 -0
  15. package/dist/cli.js +4 -0
  16. package/dist/cli.js.map +1 -0
  17. package/dist/constants.d.ts +6 -0
  18. package/dist/constants.d.ts.map +1 -0
  19. package/dist/constants.js +15 -0
  20. package/dist/constants.js.map +1 -0
  21. package/dist/errors.d.ts +13 -0
  22. package/dist/errors.d.ts.map +1 -0
  23. package/dist/errors.js +25 -0
  24. package/dist/errors.js.map +1 -0
  25. package/dist/format.d.ts +4 -0
  26. package/dist/format.d.ts.map +1 -0
  27. package/dist/format.js +69 -0
  28. package/dist/format.js.map +1 -0
  29. package/dist/index.d.ts +14 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +11 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/parsers/agent-txt.d.ts +25 -0
  34. package/dist/parsers/agent-txt.d.ts.map +1 -0
  35. package/dist/parsers/agent-txt.js +86 -0
  36. package/dist/parsers/agent-txt.js.map +1 -0
  37. package/dist/parsers/cards.d.ts +18 -0
  38. package/dist/parsers/cards.d.ts.map +1 -0
  39. package/dist/parsers/cards.js +46 -0
  40. package/dist/parsers/cards.js.map +1 -0
  41. package/dist/parsers/common.d.ts +19 -0
  42. package/dist/parsers/common.d.ts.map +1 -0
  43. package/dist/parsers/common.js +69 -0
  44. package/dist/parsers/common.js.map +1 -0
  45. package/dist/parsers/love.d.ts +29 -0
  46. package/dist/parsers/love.d.ts.map +1 -0
  47. package/dist/parsers/love.js +247 -0
  48. package/dist/parsers/love.js.map +1 -0
  49. package/dist/parsers/pathways.d.ts +13 -0
  50. package/dist/parsers/pathways.d.ts.map +1 -0
  51. package/dist/parsers/pathways.js +47 -0
  52. package/dist/parsers/pathways.js.map +1 -0
  53. package/dist/plans.d.ts +14 -0
  54. package/dist/plans.d.ts.map +1 -0
  55. package/dist/plans.js +131 -0
  56. package/dist/plans.js.map +1 -0
  57. package/dist/scan.d.ts +3 -0
  58. package/dist/scan.d.ts.map +1 -0
  59. package/dist/scan.js +1093 -0
  60. package/dist/scan.js.map +1 -0
  61. package/dist/target.d.ts +6 -0
  62. package/dist/target.d.ts.map +1 -0
  63. package/dist/target.js +180 -0
  64. package/dist/target.js.map +1 -0
  65. package/dist/transport.d.ts +23 -0
  66. package/dist/transport.d.ts.map +1 -0
  67. package/dist/transport.js +291 -0
  68. package/dist/transport.js.map +1 -0
  69. package/dist/types.d.ts +131 -0
  70. package/dist/types.d.ts.map +1 -0
  71. package/dist/types.js +2 -0
  72. package/dist/types.js.map +1 -0
  73. package/dist/verify.d.ts +12 -0
  74. package/dist/verify.d.ts.map +1 -0
  75. package/dist/verify.js +38 -0
  76. package/dist/verify.js.map +1 -0
  77. package/package.json +65 -0
  78. package/schema/agenttool-telescope-report-v0.1.schema.json +404 -0
@@ -0,0 +1,131 @@
1
+ import type { REPORT_SCHEMA } from "./constants.js";
2
+ export interface TelescopeLimits {
3
+ timeout_ms: number;
4
+ max_response_bytes: number;
5
+ max_total_bytes: number;
6
+ max_redirects: number;
7
+ max_requests: number;
8
+ max_agent_txt_lines: number;
9
+ max_agent_txt_line_bytes: number;
10
+ max_json_depth: number;
11
+ max_json_nodes: number;
12
+ }
13
+ export type ObservationState = "present" | "not_found" | "restricted" | "invalid" | "unreachable" | "blocked" | "too_large" | "not_attempted";
14
+ export type ProbeId = "agent_txt" | "pathways" | "love_discovery" | "a2a_card" | "mcp_card" | "love_index" | "love_sdk_manifest";
15
+ export interface TelescopeSubject {
16
+ kind: "https_origin";
17
+ input: string;
18
+ origin: string;
19
+ hostname: string;
20
+ }
21
+ export interface NetworkBoundary {
22
+ mode: "public_https_read_only";
23
+ http_transport: "native_fetch" | "injected";
24
+ dns_resolver: "system_lookup" | "injected";
25
+ methods: readonly ["GET"];
26
+ credentials: "omitted";
27
+ redirects: "manual_revalidated";
28
+ dns_preflight: true;
29
+ connected_address_pinning: false;
30
+ ambient_proxy_isolation: false;
31
+ statement: string;
32
+ }
33
+ export interface SourceObservation {
34
+ id: ProbeId;
35
+ url: string;
36
+ url_redacted: boolean;
37
+ state: Exclude<ObservationState, "invalid" | "not_attempted">;
38
+ status_code: number | null;
39
+ final_url: string | null;
40
+ final_url_redacted: boolean;
41
+ redirect_chain: string[];
42
+ redirect_chain_redacted: boolean;
43
+ media_type: string | null;
44
+ bytes: number | null;
45
+ sha256: string | null;
46
+ error_code: string | null;
47
+ }
48
+ export type ClaimBasis = "publisher_assertion" | "transport_observation" | "local_derivation";
49
+ export type ClaimRole = "locator" | "release_selection" | "content_commitment" | "capability_advertisement" | "authority_boundary";
50
+ export interface TelescopeClaim {
51
+ key: string;
52
+ value: string | number | boolean | null | readonly string[];
53
+ basis: ClaimBasis;
54
+ role: ClaimRole;
55
+ taint: "remote_untrusted" | "local";
56
+ evidence_ids: ProbeId[];
57
+ }
58
+ export interface SurfaceObservation {
59
+ id: "agent_txt" | "pathways" | "love_packages" | "npm" | "mcp" | "a2a" | "webfinger" | "offer_bus";
60
+ state: ObservationState;
61
+ schema_conformance: "not_assessed" | "supported_shape_valid" | "invalid";
62
+ evidence_ids: ProbeId[];
63
+ claims: TelescopeClaim[];
64
+ boundary_codes: string[];
65
+ diagnostic_codes: string[];
66
+ }
67
+ export interface ExtensionObservation {
68
+ id: "dns_aid" | "pkarr" | string;
69
+ state: "not_configured" | "present" | "absent" | "invalid" | "error";
70
+ summary: string;
71
+ facts: Readonly<Record<string, string | number | boolean | null>>;
72
+ }
73
+ export interface ActionPlan {
74
+ id: "npm_install" | "love_download" | "love_verify" | "love_install";
75
+ kind: "npm_convenience" | "love_verified_install";
76
+ executable: string;
77
+ argv: string[];
78
+ display: string;
79
+ display_shell: "posix";
80
+ automatic: false;
81
+ requires_explicit_consent: true;
82
+ evidence_ids: ProbeId[];
83
+ boundary_codes: string[];
84
+ }
85
+ export interface TelescopeDiagnostic {
86
+ code: string;
87
+ level: "warning" | "error";
88
+ message: string;
89
+ evidence_id: ProbeId | null;
90
+ }
91
+ export interface TelescopeReport {
92
+ schema: typeof REPORT_SCHEMA;
93
+ tool: {
94
+ name: "@agenttool/telescope";
95
+ version: string;
96
+ };
97
+ subject: TelescopeSubject;
98
+ observed_at: string;
99
+ status: "discovered" | "partial" | "inconclusive";
100
+ network_boundary: NetworkBoundary;
101
+ effective_limits: TelescopeLimits;
102
+ sources: SourceObservation[];
103
+ surfaces: SurfaceObservation[];
104
+ actions: ActionPlan[];
105
+ extensions: ExtensionObservation[];
106
+ diagnostics: TelescopeDiagnostic[];
107
+ }
108
+ export interface AdapterContext {
109
+ subject: TelescopeSubject;
110
+ observed_at: string;
111
+ signal: AbortSignal;
112
+ }
113
+ export interface DiscoveryAdapter {
114
+ readonly id: string;
115
+ discover(context: AdapterContext): Promise<ExtensionObservation>;
116
+ }
117
+ export interface ResolveAddress {
118
+ address: string;
119
+ family: number;
120
+ }
121
+ export type ResolveHostname = (hostname: string) => Promise<readonly ResolveAddress[]>;
122
+ export type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
123
+ export interface TelescopeOptions {
124
+ fetch?: FetchLike;
125
+ resolve_hostname?: ResolveHostname;
126
+ clock?: () => Date;
127
+ limits?: Partial<TelescopeLimits>;
128
+ adapters?: readonly DiscoveryAdapter[];
129
+ signal?: AbortSignal;
130
+ }
131
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3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;CACtB"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export interface ArtifactExpectation {
2
+ size: number;
3
+ sha256: string;
4
+ }
5
+ export interface VerificationResult {
6
+ ok: boolean;
7
+ expected: ArtifactExpectation;
8
+ actual: ArtifactExpectation;
9
+ }
10
+ export declare function verifyArtifact(bytes: Uint8Array, expected: ArtifactExpectation): VerificationResult;
11
+ export declare function verifyArtifactFile(path: string, expected: ArtifactExpectation): Promise<VerificationResult>;
12
+ //# sourceMappingURL=verify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAYD,wBAAgB,cAAc,CAC5B,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,mBAAmB,GAC5B,kBAAkB,CAWpB;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,mBAAmB,GAC5B,OAAO,CAAC,kBAAkB,CAAC,CAe7B"}
package/dist/verify.js ADDED
@@ -0,0 +1,38 @@
1
+ import { createHash } from "node:crypto";
2
+ import { createReadStream } from "node:fs";
3
+ function assertExpectation(expected) {
4
+ if (!Number.isSafeInteger(expected.size) ||
5
+ expected.size < 0 ||
6
+ !/^[0-9a-f]{64}$/.test(expected.sha256)) {
7
+ throw new TypeError("Expected size and lowercase SHA-256 must be valid.");
8
+ }
9
+ }
10
+ export function verifyArtifact(bytes, expected) {
11
+ assertExpectation(expected);
12
+ const actual = {
13
+ size: bytes.byteLength,
14
+ sha256: createHash("sha256").update(bytes).digest("hex"),
15
+ };
16
+ return {
17
+ ok: actual.size === expected.size && actual.sha256 === expected.sha256,
18
+ expected,
19
+ actual,
20
+ };
21
+ }
22
+ export async function verifyArtifactFile(path, expected) {
23
+ assertExpectation(expected);
24
+ let size = 0;
25
+ const hash = createHash("sha256");
26
+ for await (const chunk of createReadStream(path)) {
27
+ const bytes = chunk;
28
+ size += bytes.byteLength;
29
+ hash.update(bytes);
30
+ }
31
+ const actual = { size, sha256: hash.digest("hex") };
32
+ return {
33
+ ok: actual.size === expected.size && actual.sha256 === expected.sha256,
34
+ expected,
35
+ actual,
36
+ };
37
+ }
38
+ //# sourceMappingURL=verify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.js","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAa3C,SAAS,iBAAiB,CAAC,QAA6B;IACtD,IACE,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC;QACpC,QAAQ,CAAC,IAAI,GAAG,CAAC;QACjB,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EACvC,CAAC;QACD,MAAM,IAAI,SAAS,CAAC,oDAAoD,CAAC,CAAC;IAC5E,CAAC;AACH,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,KAAiB,EACjB,QAA6B;IAE7B,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC5B,MAAM,MAAM,GAAG;QACb,IAAI,EAAE,KAAK,CAAC,UAAU;QACtB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;KACzD,CAAC;IACF,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM;QACtE,QAAQ;QACR,MAAM;KACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,IAAY,EACZ,QAA6B;IAE7B,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC5B,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;QACjD,MAAM,KAAK,GAAG,KAAe,CAAC;QAC9B,IAAI,IAAI,KAAK,CAAC,UAAU,CAAC;QACzB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IACpD,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM;QACtE,QAAQ;QACR,MAAM;KACP,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@agenttool/telescope",
3
+ "version": "0.1.0",
4
+ "description": "Read-only evidence mapper for agent discovery surfaces",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ },
14
+ "./report.schema.json": {
15
+ "default": "./schema/agenttool-telescope-report-v0.1.schema.json"
16
+ }
17
+ },
18
+ "bin": {
19
+ "agenttool-telescope": "dist/cli.js"
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "schema",
24
+ "README.md",
25
+ "CLAUDE.md",
26
+ "LICENSE",
27
+ "NOTICE"
28
+ ],
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "engines": {
33
+ "node": ">=20.19.0",
34
+ "bun": ">=1.3.5"
35
+ },
36
+ "scripts": {
37
+ "clean": "node --eval \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
38
+ "build": "bun run clean && tsc",
39
+ "typecheck": "tsc --noEmit",
40
+ "test": "bun test",
41
+ "ci": "bun run typecheck && bun test && bun run build",
42
+ "prepack": "bun run ci"
43
+ },
44
+ "devDependencies": {
45
+ "@types/bun": "^1.2.0",
46
+ "ajv": "^8.20.0",
47
+ "ajv-formats": "^3.0.1",
48
+ "typescript": "^5.7.0"
49
+ },
50
+ "keywords": [
51
+ "agents",
52
+ "discovery",
53
+ "mcp",
54
+ "a2a",
55
+ "love-protocol",
56
+ "agent.txt",
57
+ "evidence"
58
+ ],
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "https://github.com/cambridgetcg/agenttool.git",
62
+ "directory": "packages/telescope"
63
+ },
64
+ "homepage": "https://docs.agenttool.dev/packages"
65
+ }
@@ -0,0 +1,404 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:agenttool:telescope:report:v0.1",
4
+ "title": "AgentTool Telescope report v0.1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema",
9
+ "tool",
10
+ "subject",
11
+ "observed_at",
12
+ "status",
13
+ "network_boundary",
14
+ "effective_limits",
15
+ "sources",
16
+ "surfaces",
17
+ "actions",
18
+ "extensions",
19
+ "diagnostics"
20
+ ],
21
+ "properties": {
22
+ "schema": { "const": "agenttool-telescope/v0.1" },
23
+ "tool": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "required": ["name", "version"],
27
+ "properties": {
28
+ "name": { "const": "@agenttool/telescope" },
29
+ "version": { "type": "string", "minLength": 1, "maxLength": 128 }
30
+ }
31
+ },
32
+ "subject": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["kind", "input", "origin", "hostname"],
36
+ "properties": {
37
+ "kind": { "const": "https_origin" },
38
+ "input": { "type": "string", "minLength": 1, "maxLength": 2048 },
39
+ "origin": { "type": "string", "format": "uri", "pattern": "^https://" },
40
+ "hostname": { "type": "string", "minLength": 1, "maxLength": 253 }
41
+ }
42
+ },
43
+ "observed_at": { "type": "string", "format": "date-time" },
44
+ "status": { "enum": ["discovered", "partial", "inconclusive"] },
45
+ "network_boundary": {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": [
49
+ "mode",
50
+ "http_transport",
51
+ "dns_resolver",
52
+ "methods",
53
+ "credentials",
54
+ "redirects",
55
+ "dns_preflight",
56
+ "connected_address_pinning",
57
+ "ambient_proxy_isolation",
58
+ "statement"
59
+ ],
60
+ "properties": {
61
+ "mode": { "const": "public_https_read_only" },
62
+ "http_transport": { "enum": ["native_fetch", "injected"] },
63
+ "dns_resolver": { "enum": ["system_lookup", "injected"] },
64
+ "methods": {
65
+ "type": "array",
66
+ "prefixItems": [{ "const": "GET" }],
67
+ "minItems": 1,
68
+ "maxItems": 1
69
+ },
70
+ "credentials": { "const": "omitted" },
71
+ "redirects": { "const": "manual_revalidated" },
72
+ "dns_preflight": { "const": true },
73
+ "connected_address_pinning": { "const": false },
74
+ "ambient_proxy_isolation": { "const": false },
75
+ "statement": { "type": "string", "minLength": 1, "maxLength": 2048 }
76
+ }
77
+ },
78
+ "effective_limits": { "$ref": "#/$defs/limits" },
79
+ "sources": {
80
+ "type": "array",
81
+ "maxItems": 12,
82
+ "items": { "$ref": "#/$defs/source" }
83
+ },
84
+ "surfaces": {
85
+ "type": "array",
86
+ "maxItems": 16,
87
+ "items": { "$ref": "#/$defs/surface" }
88
+ },
89
+ "actions": {
90
+ "type": "array",
91
+ "maxItems": 16,
92
+ "items": { "$ref": "#/$defs/action" }
93
+ },
94
+ "extensions": {
95
+ "type": "array",
96
+ "maxItems": 32,
97
+ "items": { "$ref": "#/$defs/extension" }
98
+ },
99
+ "diagnostics": {
100
+ "type": "array",
101
+ "maxItems": 128,
102
+ "items": { "$ref": "#/$defs/diagnostic" }
103
+ }
104
+ },
105
+ "$defs": {
106
+ "probe_id": {
107
+ "enum": [
108
+ "agent_txt",
109
+ "pathways",
110
+ "love_discovery",
111
+ "a2a_card",
112
+ "mcp_card",
113
+ "love_index",
114
+ "love_sdk_manifest"
115
+ ]
116
+ },
117
+ "state": {
118
+ "enum": [
119
+ "present",
120
+ "not_found",
121
+ "restricted",
122
+ "invalid",
123
+ "unreachable",
124
+ "blocked",
125
+ "too_large",
126
+ "not_attempted"
127
+ ]
128
+ },
129
+ "limits": {
130
+ "type": "object",
131
+ "additionalProperties": false,
132
+ "required": [
133
+ "timeout_ms",
134
+ "max_response_bytes",
135
+ "max_total_bytes",
136
+ "max_redirects",
137
+ "max_requests",
138
+ "max_agent_txt_lines",
139
+ "max_agent_txt_line_bytes",
140
+ "max_json_depth",
141
+ "max_json_nodes"
142
+ ],
143
+ "properties": {
144
+ "timeout_ms": { "type": "integer", "minimum": 100 },
145
+ "max_response_bytes": { "type": "integer", "minimum": 1024 },
146
+ "max_total_bytes": { "type": "integer", "minimum": 1024 },
147
+ "max_redirects": { "type": "integer", "minimum": 0 },
148
+ "max_requests": { "type": "integer", "minimum": 4 },
149
+ "max_agent_txt_lines": { "type": "integer", "minimum": 16 },
150
+ "max_agent_txt_line_bytes": { "type": "integer", "minimum": 256 },
151
+ "max_json_depth": { "type": "integer", "minimum": 4 },
152
+ "max_json_nodes": { "type": "integer", "minimum": 100 }
153
+ }
154
+ },
155
+ "source": {
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "required": [
159
+ "id",
160
+ "url",
161
+ "url_redacted",
162
+ "state",
163
+ "status_code",
164
+ "final_url",
165
+ "final_url_redacted",
166
+ "redirect_chain",
167
+ "redirect_chain_redacted",
168
+ "media_type",
169
+ "bytes",
170
+ "sha256",
171
+ "error_code"
172
+ ],
173
+ "properties": {
174
+ "id": { "$ref": "#/$defs/probe_id" },
175
+ "url": { "type": "string", "minLength": 1, "maxLength": 2048 },
176
+ "url_redacted": { "type": "boolean" },
177
+ "state": {
178
+ "enum": [
179
+ "present",
180
+ "not_found",
181
+ "restricted",
182
+ "unreachable",
183
+ "blocked",
184
+ "too_large"
185
+ ]
186
+ },
187
+ "status_code": {
188
+ "oneOf": [
189
+ { "type": "integer", "minimum": 100, "maximum": 599 },
190
+ { "type": "null" }
191
+ ]
192
+ },
193
+ "final_url": {
194
+ "oneOf": [
195
+ { "type": "string", "format": "uri", "pattern": "^https://" },
196
+ { "type": "null" }
197
+ ]
198
+ },
199
+ "final_url_redacted": { "type": "boolean" },
200
+ "redirect_chain": {
201
+ "type": "array",
202
+ "maxItems": 8,
203
+ "items": { "type": "string", "format": "uri", "pattern": "^https://" }
204
+ },
205
+ "redirect_chain_redacted": { "type": "boolean" },
206
+ "media_type": {
207
+ "oneOf": [{ "type": "string", "maxLength": 256 }, { "type": "null" }]
208
+ },
209
+ "bytes": {
210
+ "oneOf": [{ "type": "integer", "minimum": 0 }, { "type": "null" }]
211
+ },
212
+ "sha256": {
213
+ "oneOf": [
214
+ { "type": "string", "pattern": "^[0-9a-f]{64}$" },
215
+ { "type": "null" }
216
+ ]
217
+ },
218
+ "error_code": {
219
+ "oneOf": [{ "type": "string", "maxLength": 128 }, { "type": "null" }]
220
+ }
221
+ }
222
+ },
223
+ "claim_value": {
224
+ "oneOf": [
225
+ { "type": "string", "maxLength": 4096 },
226
+ { "type": "number" },
227
+ { "type": "boolean" },
228
+ { "type": "null" },
229
+ {
230
+ "type": "array",
231
+ "maxItems": 128,
232
+ "items": { "type": "string", "maxLength": 2048 }
233
+ }
234
+ ]
235
+ },
236
+ "claim": {
237
+ "type": "object",
238
+ "additionalProperties": false,
239
+ "required": ["key", "value", "basis", "role", "taint", "evidence_ids"],
240
+ "properties": {
241
+ "key": { "type": "string", "minLength": 1, "maxLength": 128 },
242
+ "value": { "$ref": "#/$defs/claim_value" },
243
+ "basis": {
244
+ "enum": [
245
+ "publisher_assertion",
246
+ "transport_observation",
247
+ "local_derivation"
248
+ ]
249
+ },
250
+ "role": {
251
+ "enum": [
252
+ "locator",
253
+ "release_selection",
254
+ "content_commitment",
255
+ "capability_advertisement",
256
+ "authority_boundary"
257
+ ]
258
+ },
259
+ "taint": { "enum": ["remote_untrusted", "local"] },
260
+ "evidence_ids": {
261
+ "type": "array",
262
+ "maxItems": 8,
263
+ "items": { "$ref": "#/$defs/probe_id" }
264
+ }
265
+ }
266
+ },
267
+ "surface": {
268
+ "type": "object",
269
+ "additionalProperties": false,
270
+ "required": [
271
+ "id",
272
+ "state",
273
+ "schema_conformance",
274
+ "evidence_ids",
275
+ "claims",
276
+ "boundary_codes",
277
+ "diagnostic_codes"
278
+ ],
279
+ "properties": {
280
+ "id": {
281
+ "enum": [
282
+ "agent_txt",
283
+ "pathways",
284
+ "love_packages",
285
+ "npm",
286
+ "mcp",
287
+ "a2a",
288
+ "webfinger",
289
+ "offer_bus"
290
+ ]
291
+ },
292
+ "state": { "$ref": "#/$defs/state" },
293
+ "schema_conformance": {
294
+ "enum": ["not_assessed", "supported_shape_valid", "invalid"]
295
+ },
296
+ "evidence_ids": {
297
+ "type": "array",
298
+ "maxItems": 8,
299
+ "items": { "$ref": "#/$defs/probe_id" }
300
+ },
301
+ "claims": {
302
+ "type": "array",
303
+ "maxItems": 64,
304
+ "items": { "$ref": "#/$defs/claim" }
305
+ },
306
+ "boundary_codes": {
307
+ "type": "array",
308
+ "maxItems": 32,
309
+ "items": { "type": "string", "minLength": 1, "maxLength": 128 }
310
+ },
311
+ "diagnostic_codes": {
312
+ "type": "array",
313
+ "maxItems": 32,
314
+ "items": { "type": "string", "minLength": 1, "maxLength": 128 }
315
+ }
316
+ }
317
+ },
318
+ "action": {
319
+ "type": "object",
320
+ "additionalProperties": false,
321
+ "required": [
322
+ "id",
323
+ "kind",
324
+ "executable",
325
+ "argv",
326
+ "display",
327
+ "display_shell",
328
+ "automatic",
329
+ "requires_explicit_consent",
330
+ "evidence_ids",
331
+ "boundary_codes"
332
+ ],
333
+ "properties": {
334
+ "id": {
335
+ "enum": [
336
+ "npm_install",
337
+ "love_download",
338
+ "love_verify",
339
+ "love_install"
340
+ ]
341
+ },
342
+ "kind": { "enum": ["npm_convenience", "love_verified_install"] },
343
+ "executable": { "type": "string", "minLength": 1, "maxLength": 128 },
344
+ "argv": {
345
+ "type": "array",
346
+ "maxItems": 32,
347
+ "items": { "type": "string", "maxLength": 8192 }
348
+ },
349
+ "display": { "type": "string", "minLength": 1, "maxLength": 32768 },
350
+ "display_shell": { "const": "posix" },
351
+ "automatic": { "const": false },
352
+ "requires_explicit_consent": { "const": true },
353
+ "evidence_ids": {
354
+ "type": "array",
355
+ "maxItems": 8,
356
+ "items": { "$ref": "#/$defs/probe_id" }
357
+ },
358
+ "boundary_codes": {
359
+ "type": "array",
360
+ "maxItems": 32,
361
+ "items": { "type": "string", "minLength": 1, "maxLength": 128 }
362
+ }
363
+ }
364
+ },
365
+ "extension": {
366
+ "type": "object",
367
+ "additionalProperties": false,
368
+ "required": ["id", "state", "summary", "facts"],
369
+ "properties": {
370
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9_-]{0,63}$" },
371
+ "state": {
372
+ "enum": ["not_configured", "present", "absent", "invalid", "error"]
373
+ },
374
+ "summary": { "type": "string", "maxLength": 4096 },
375
+ "facts": {
376
+ "type": "object",
377
+ "maxProperties": 128,
378
+ "propertyNames": { "minLength": 1, "maxLength": 128 },
379
+ "additionalProperties": {
380
+ "oneOf": [
381
+ { "type": "string" },
382
+ { "type": "number" },
383
+ { "type": "boolean" },
384
+ { "type": "null" }
385
+ ]
386
+ }
387
+ }
388
+ }
389
+ },
390
+ "diagnostic": {
391
+ "type": "object",
392
+ "additionalProperties": false,
393
+ "required": ["code", "level", "message", "evidence_id"],
394
+ "properties": {
395
+ "code": { "type": "string", "minLength": 1, "maxLength": 128 },
396
+ "level": { "enum": ["warning", "error"] },
397
+ "message": { "type": "string", "minLength": 1, "maxLength": 4096 },
398
+ "evidence_id": {
399
+ "oneOf": [{ "$ref": "#/$defs/probe_id" }, { "type": "null" }]
400
+ }
401
+ }
402
+ }
403
+ }
404
+ }