@gmickel/gno 1.18.0 → 1.20.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 (153) hide show
  1. package/README.md +14 -7
  2. package/assets/skill/SKILL.md +54 -12
  3. package/assets/skill/mcp-reference.md +7 -2
  4. package/assets/skill/recipes/citation-and-provenance.md +32 -9
  5. package/package.json +2 -1
  6. package/spec/AGENTS.md +83 -0
  7. package/spec/CLAUDE.md +83 -0
  8. package/spec/bench-fixture.schema.json +137 -0
  9. package/spec/cli.md +2919 -0
  10. package/spec/db/schema.sql +442 -0
  11. package/spec/evals-agentic.md +592 -0
  12. package/spec/evals.md +1106 -0
  13. package/spec/mcp.md +2279 -0
  14. package/spec/output-schemas/activation-verification.schema.json +515 -0
  15. package/spec/output-schemas/ask.schema.json +564 -0
  16. package/spec/output-schemas/backlinks.schema.json +131 -0
  17. package/spec/output-schemas/bench-result.schema.json +120 -0
  18. package/spec/output-schemas/capture-receipt.schema.json +143 -0
  19. package/spec/output-schemas/claim-verification.schema.json +291 -0
  20. package/spec/output-schemas/collection-list.schema.json +45 -0
  21. package/spec/output-schemas/context-capsule-v1.schema.json +726 -0
  22. package/spec/output-schemas/context-capsule-verification.schema.json +1338 -0
  23. package/spec/output-schemas/context-list.schema.json +21 -0
  24. package/spec/output-schemas/doctor.schema.json +313 -0
  25. package/spec/output-schemas/error.schema.json +30 -0
  26. package/spec/output-schemas/expansion.schema.json +37 -0
  27. package/spec/output-schemas/get.schema.json +140 -0
  28. package/spec/output-schemas/graph-query.schema.json +99 -0
  29. package/spec/output-schemas/graph.schema.json +371 -0
  30. package/spec/output-schemas/links-list.schema.json +186 -0
  31. package/spec/output-schemas/mcp-add-collection-result.schema.json +23 -0
  32. package/spec/output-schemas/mcp-capture-result.schema.json +152 -0
  33. package/spec/output-schemas/mcp-http-error.schema.json +30 -0
  34. package/spec/output-schemas/mcp-job-list.schema.json +58 -0
  35. package/spec/output-schemas/mcp-job-status.schema.json +224 -0
  36. package/spec/output-schemas/mcp-remove-result.schema.json +39 -0
  37. package/spec/output-schemas/mcp-sync-result.schema.json +41 -0
  38. package/spec/output-schemas/mcp-tag-result.schema.json +33 -0
  39. package/spec/output-schemas/models-list.schema.json +93 -0
  40. package/spec/output-schemas/multi-get.schema.json +103 -0
  41. package/spec/output-schemas/process-status.schema.json +119 -0
  42. package/spec/output-schemas/query-diagnose.schema.json +123 -0
  43. package/spec/output-schemas/resident-status.schema.json +154 -0
  44. package/spec/output-schemas/retrieval-trace-common.schema.json +492 -0
  45. package/spec/output-schemas/retrieval-trace-delete.schema.json +16 -0
  46. package/spec/output-schemas/retrieval-trace-export.schema.json +61 -0
  47. package/spec/output-schemas/retrieval-trace-filters.schema.json +139 -0
  48. package/spec/output-schemas/retrieval-trace-judgment.schema.json +15 -0
  49. package/spec/output-schemas/retrieval-trace-list.schema.json +18 -0
  50. package/spec/output-schemas/retrieval-trace-payloads.schema.json +178 -0
  51. package/spec/output-schemas/retrieval-trace-purge.schema.json +31 -0
  52. package/spec/output-schemas/retrieval-trace-qrels.schema.json +303 -0
  53. package/spec/output-schemas/retrieval-trace-replay.schema.json +286 -0
  54. package/spec/output-schemas/retrieval-trace-show.schema.json +69 -0
  55. package/spec/output-schemas/retrieval-trace-summary.schema.json +65 -0
  56. package/spec/output-schemas/search-result.schema.json +154 -0
  57. package/spec/output-schemas/search-results.schema.json +338 -0
  58. package/spec/output-schemas/similar.schema.json +84 -0
  59. package/spec/output-schemas/status.schema.json +676 -0
  60. package/spec/output-schemas/tags-list.schema.json +48 -0
  61. package/src/app/context-runtime-contract.ts +10 -5
  62. package/src/app/context-runtime-input.ts +29 -1
  63. package/src/app/context-runtime-types.ts +7 -0
  64. package/src/app/context-runtime.ts +20 -2
  65. package/src/app/context-surface.ts +4 -0
  66. package/src/app/verified-ask.ts +291 -0
  67. package/src/cli/commands/ask-format.ts +255 -0
  68. package/src/cli/commands/ask.ts +144 -183
  69. package/src/cli/commands/context-build.ts +56 -9
  70. package/src/cli/commands/get.ts +64 -3
  71. package/src/cli/commands/query.ts +62 -23
  72. package/src/cli/commands/replay.ts +140 -0
  73. package/src/cli/commands/search.ts +48 -3
  74. package/src/cli/commands/shared.ts +3 -1
  75. package/src/cli/commands/trace.ts +200 -0
  76. package/src/cli/commands/vsearch.ts +75 -53
  77. package/src/cli/program.ts +287 -1
  78. package/src/config/index.ts +9 -0
  79. package/src/config/retrieval-traces.ts +56 -0
  80. package/src/config/types.ts +4 -0
  81. package/src/core/context-budget.ts +6 -0
  82. package/src/core/context-capsule-retrieval-schema.ts +4 -0
  83. package/src/core/context-capsule-schema.ts +17 -0
  84. package/src/core/context-capsule-validation.ts +3 -2
  85. package/src/core/context-capsule.ts +18 -0
  86. package/src/core/context-compiler.ts +44 -25
  87. package/src/core/context-evidence.ts +6 -0
  88. package/src/core/retrieval-qrels.ts +405 -0
  89. package/src/core/retrieval-replay-candidate.ts +368 -0
  90. package/src/core/retrieval-replay-types.ts +109 -0
  91. package/src/core/retrieval-replay-validation.ts +89 -0
  92. package/src/core/retrieval-replay.ts +441 -0
  93. package/src/core/retrieval-trace-evidence-origin.ts +178 -0
  94. package/src/core/retrieval-trace-export.ts +113 -0
  95. package/src/core/retrieval-trace-filter-normalization.ts +27 -0
  96. package/src/core/retrieval-trace-filters.ts +19 -0
  97. package/src/core/retrieval-trace-management-helpers.ts +247 -0
  98. package/src/core/retrieval-trace-management-types.ts +132 -0
  99. package/src/core/retrieval-trace-management.ts +422 -0
  100. package/src/core/retrieval-trace-request.ts +141 -0
  101. package/src/core/retrieval-trace-session.ts +507 -0
  102. package/src/core/retrieval-trace.ts +472 -0
  103. package/src/llm/errors.ts +10 -1
  104. package/src/llm/httpGeneration.ts +11 -1
  105. package/src/llm/nodeLlamaCpp/generation.ts +54 -10
  106. package/src/llm/types.ts +6 -0
  107. package/src/mcp/tools/ask.ts +228 -0
  108. package/src/mcp/tools/context.ts +87 -15
  109. package/src/mcp/tools/get.ts +35 -1
  110. package/src/mcp/tools/index.ts +83 -0
  111. package/src/mcp/tools/query.ts +95 -64
  112. package/src/mcp/tools/search.ts +36 -13
  113. package/src/mcp/tools/trace.ts +143 -0
  114. package/src/mcp/tools/vsearch.ts +71 -38
  115. package/src/pipeline/answer.ts +167 -26
  116. package/src/pipeline/claim-verification-schema.ts +235 -0
  117. package/src/pipeline/claim-verification.ts +487 -0
  118. package/src/pipeline/claim-verifier.ts +474 -0
  119. package/src/pipeline/graph-retrieval.ts +15 -1
  120. package/src/pipeline/hybrid.ts +151 -43
  121. package/src/pipeline/search.ts +36 -3
  122. package/src/pipeline/trace-metadata.ts +47 -0
  123. package/src/pipeline/types.ts +68 -0
  124. package/src/pipeline/vsearch.ts +101 -38
  125. package/src/sdk/client.ts +415 -73
  126. package/src/sdk/documents.ts +48 -1
  127. package/src/sdk/index.ts +17 -0
  128. package/src/sdk/types.ts +28 -0
  129. package/src/serve/context-capsule.ts +67 -8
  130. package/src/serve/public/app.tsx +12 -1
  131. package/src/serve/public/components/AskVerificationPanel.tsx +189 -0
  132. package/src/serve/public/globals.built.css +1 -1
  133. package/src/serve/public/lib/workspace-tabs.ts +2 -0
  134. package/src/serve/public/pages/Ask.tsx +42 -4
  135. package/src/serve/public/pages/Dashboard.tsx +10 -0
  136. package/src/serve/public/pages/TraceHistory.tsx +478 -0
  137. package/src/serve/public/pages/trace-history-detail.tsx +224 -0
  138. package/src/serve/retrieval-trace.ts +28 -0
  139. package/src/serve/routes/api.ts +508 -68
  140. package/src/serve/routes/traces.ts +156 -0
  141. package/src/serve/server.ts +87 -2
  142. package/src/store/index.ts +31 -0
  143. package/src/store/migrations/014-retrieval-traces.ts +303 -0
  144. package/src/store/migrations/index.ts +2 -0
  145. package/src/store/retrieval-trace-codec.ts +384 -0
  146. package/src/store/sqlite/adapter.ts +153 -1
  147. package/src/store/sqlite/retrieval-trace-management-store.ts +341 -0
  148. package/src/store/sqlite/retrieval-trace-retention.ts +349 -0
  149. package/src/store/sqlite/retrieval-trace-rows.ts +267 -0
  150. package/src/store/sqlite/retrieval-trace-store.ts +515 -0
  151. package/src/store/types.ts +297 -0
  152. package/src/store/vector/sqlite-vec.ts +76 -1
  153. package/src/store/vector/types.ts +1 -1
@@ -0,0 +1,120 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "GNO Bench Result",
4
+ "type": "object",
5
+ "required": ["fixture", "generatedAt", "modes", "meta"],
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "fixture": {
9
+ "type": "object",
10
+ "required": ["path", "version", "queryCount", "topK"],
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "path": { "type": "string", "minLength": 1 },
14
+ "name": { "type": "string" },
15
+ "version": { "const": 1 },
16
+ "queryCount": { "type": "integer", "minimum": 1 },
17
+ "topK": { "type": "integer", "minimum": 1 }
18
+ }
19
+ },
20
+ "generatedAt": { "type": "string", "format": "date-time" },
21
+ "modes": {
22
+ "type": "array",
23
+ "minItems": 1,
24
+ "items": {
25
+ "type": "object",
26
+ "required": [
27
+ "name",
28
+ "type",
29
+ "status",
30
+ "queryCount",
31
+ "failures",
32
+ "metrics",
33
+ "latency",
34
+ "cases"
35
+ ],
36
+ "additionalProperties": false,
37
+ "properties": {
38
+ "name": { "type": "string", "minLength": 1 },
39
+ "type": { "type": "string", "enum": ["bm25", "vector", "hybrid"] },
40
+ "status": { "type": "string", "enum": ["ok", "failed"] },
41
+ "queryCount": { "type": "integer", "minimum": 1 },
42
+ "failures": { "type": "integer", "minimum": 0 },
43
+ "metrics": { "$ref": "#/definitions/metrics" },
44
+ "latency": { "$ref": "#/definitions/latency" },
45
+ "cases": {
46
+ "type": "array",
47
+ "minItems": 1,
48
+ "items": {
49
+ "type": "object",
50
+ "required": [
51
+ "id",
52
+ "query",
53
+ "topK",
54
+ "expected",
55
+ "hits",
56
+ "topDocs",
57
+ "metrics",
58
+ "latencyMs"
59
+ ],
60
+ "additionalProperties": false,
61
+ "properties": {
62
+ "id": { "type": "string", "minLength": 1 },
63
+ "query": { "type": "string", "minLength": 1 },
64
+ "topK": { "type": "integer", "minimum": 1 },
65
+ "expected": {
66
+ "type": "array",
67
+ "items": { "type": "string", "minLength": 1 }
68
+ },
69
+ "hits": {
70
+ "type": "array",
71
+ "items": { "type": "string", "minLength": 1 }
72
+ },
73
+ "topDocs": {
74
+ "type": "array",
75
+ "items": { "type": "string", "minLength": 1 }
76
+ },
77
+ "metrics": { "$ref": "#/definitions/metrics" },
78
+ "latencyMs": { "type": "number", "minimum": 0 },
79
+ "error": { "type": "string" }
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ },
86
+ "meta": {
87
+ "type": "object",
88
+ "required": ["indexName"],
89
+ "additionalProperties": false,
90
+ "properties": {
91
+ "indexName": { "type": "string", "minLength": 1 },
92
+ "collection": { "type": "string", "minLength": 1 }
93
+ }
94
+ }
95
+ },
96
+ "definitions": {
97
+ "metrics": {
98
+ "type": "object",
99
+ "required": ["precisionAtK", "recallAtK", "f1AtK", "mrr", "ndcgAtK"],
100
+ "additionalProperties": false,
101
+ "properties": {
102
+ "precisionAtK": { "type": "number", "minimum": 0, "maximum": 1 },
103
+ "recallAtK": { "type": "number", "minimum": 0, "maximum": 1 },
104
+ "f1AtK": { "type": "number", "minimum": 0, "maximum": 1 },
105
+ "mrr": { "type": "number", "minimum": 0, "maximum": 1 },
106
+ "ndcgAtK": { "type": "number", "minimum": 0, "maximum": 1 }
107
+ }
108
+ },
109
+ "latency": {
110
+ "type": "object",
111
+ "required": ["p50Ms", "p95Ms", "meanMs"],
112
+ "additionalProperties": false,
113
+ "properties": {
114
+ "p50Ms": { "type": "number", "minimum": 0 },
115
+ "p95Ms": { "type": "number", "minimum": 0 },
116
+ "meanMs": { "type": "number", "minimum": 0 }
117
+ }
118
+ }
119
+ }
120
+ }
@@ -0,0 +1,143 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/capture-receipt@1.0",
4
+ "title": "GNO Capture Receipt",
5
+ "description": "Shared receipt returned by capture surfaces after a write/open decision.",
6
+ "type": "object",
7
+ "required": [
8
+ "uri",
9
+ "collection",
10
+ "relPath",
11
+ "created",
12
+ "openedExisting",
13
+ "createdWithSuffix",
14
+ "contentHash",
15
+ "source",
16
+ "tags",
17
+ "sync",
18
+ "embed",
19
+ "collisionPolicyResult"
20
+ ],
21
+ "properties": {
22
+ "uri": {
23
+ "type": "string",
24
+ "description": "GNO URI for the captured note.",
25
+ "pattern": "^gno://[^/]+/.+"
26
+ },
27
+ "docid": {
28
+ "type": "string",
29
+ "description": "Document id when sync has resolved it."
30
+ },
31
+ "collection": {
32
+ "type": "string",
33
+ "description": "Target collection name."
34
+ },
35
+ "relPath": {
36
+ "type": "string",
37
+ "description": "Relative path within the collection."
38
+ },
39
+ "absPath": {
40
+ "type": "string",
41
+ "description": "Absolute path when the local surface exposes it."
42
+ },
43
+ "created": {
44
+ "type": "boolean",
45
+ "description": "True when a new file was written."
46
+ },
47
+ "openedExisting": {
48
+ "type": "boolean",
49
+ "description": "True when collision policy selected an existing file."
50
+ },
51
+ "createdWithSuffix": {
52
+ "type": "boolean",
53
+ "description": "True when a suffixed path was created after collision."
54
+ },
55
+ "overwritten": {
56
+ "type": "boolean",
57
+ "description": "Legacy compatibility flag for overwrite-capable surfaces."
58
+ },
59
+ "contentHash": {
60
+ "type": "string",
61
+ "description": "SHA-256 hash of normalized capture body content.",
62
+ "pattern": "^[a-f0-9]{64}$"
63
+ },
64
+ "source": {
65
+ "type": "object",
66
+ "required": ["kind", "capturedAt"],
67
+ "properties": {
68
+ "kind": {
69
+ "type": "string",
70
+ "enum": [
71
+ "direct",
72
+ "web",
73
+ "email",
74
+ "meeting",
75
+ "chat",
76
+ "file",
77
+ "api",
78
+ "unknown"
79
+ ]
80
+ },
81
+ "title": { "type": "string" },
82
+ "url": { "type": "string", "format": "uri" },
83
+ "uri": { "type": "string" },
84
+ "docid": { "type": "string" },
85
+ "mime": { "type": "string" },
86
+ "ext": { "type": "string" },
87
+ "author": { "type": "string" },
88
+ "observedAt": { "type": "string", "format": "date-time" },
89
+ "capturedAt": { "type": "string", "format": "date-time" },
90
+ "externalId": { "type": "string" }
91
+ }
92
+ },
93
+ "tags": {
94
+ "type": "array",
95
+ "items": { "type": "string" }
96
+ },
97
+ "sync": {
98
+ "$ref": "#/definitions/indexStatus"
99
+ },
100
+ "embed": {
101
+ "$ref": "#/definitions/indexStatus"
102
+ },
103
+ "collisionPolicyResult": {
104
+ "type": "string",
105
+ "enum": [
106
+ "created",
107
+ "opened_existing",
108
+ "created_with_suffix",
109
+ "overwritten",
110
+ "conflict"
111
+ ]
112
+ }
113
+ },
114
+ "definitions": {
115
+ "indexStatus": {
116
+ "type": "object",
117
+ "required": ["status"],
118
+ "properties": {
119
+ "status": {
120
+ "type": "string",
121
+ "enum": [
122
+ "not_requested",
123
+ "pending",
124
+ "running",
125
+ "completed",
126
+ "skipped",
127
+ "failed",
128
+ "unknown"
129
+ ]
130
+ },
131
+ "jobId": {
132
+ "type": ["string", "null"]
133
+ },
134
+ "reason": {
135
+ "type": "string"
136
+ },
137
+ "error": {
138
+ "type": "string"
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
@@ -0,0 +1,291 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/claim-verification@1.0",
4
+ "title": "GNO Claim Verification Result",
5
+ "description": "Deterministic claim spans, Capsule-bound evidence, semantic verdicts, coverage, and abstention.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "coordinateSpace",
11
+ "capsuleId",
12
+ "answerHash",
13
+ "coverageThreshold",
14
+ "claims",
15
+ "rejectedCitations",
16
+ "coverage",
17
+ "answerStatus",
18
+ "abstained",
19
+ "abstentionReason",
20
+ "abstentionText"
21
+ ],
22
+ "properties": {
23
+ "schemaVersion": { "const": "1.0" },
24
+ "coordinateSpace": { "const": "utf16_code_units" },
25
+ "capsuleId": { "$ref": "#/definitions/sha256" },
26
+ "answerHash": { "$ref": "#/definitions/sha256" },
27
+ "coverageThreshold": { "const": 1 },
28
+ "claims": {
29
+ "type": "array",
30
+ "maxItems": 256,
31
+ "items": { "$ref": "#/definitions/claim" }
32
+ },
33
+ "rejectedCitations": {
34
+ "type": "array",
35
+ "maxItems": 256,
36
+ "items": { "$ref": "#/definitions/rejectedCitation" }
37
+ },
38
+ "coverage": { "$ref": "#/definitions/coverage" },
39
+ "answerStatus": { "enum": ["verified", "abstained"] },
40
+ "abstained": { "type": "boolean" },
41
+ "abstentionReason": {
42
+ "enum": [
43
+ "contradiction_detected",
44
+ "coverage_below_threshold",
45
+ "no_substantive_claims",
46
+ "citation_hygiene_failed",
47
+ null
48
+ ]
49
+ },
50
+ "abstentionText": { "type": ["string", "null"] }
51
+ },
52
+ "allOf": [
53
+ {
54
+ "if": { "properties": { "abstained": { "const": false } } },
55
+ "then": {
56
+ "properties": {
57
+ "answerStatus": { "const": "verified" },
58
+ "abstentionReason": { "type": "null" },
59
+ "abstentionText": { "type": "null" },
60
+ "rejectedCitations": { "type": "array", "maxItems": 0 },
61
+ "claims": {
62
+ "type": "array",
63
+ "not": {
64
+ "contains": {
65
+ "type": "object",
66
+ "required": ["rejectedCitations"],
67
+ "properties": {
68
+ "rejectedCitations": {
69
+ "type": "array",
70
+ "minItems": 1
71
+ }
72
+ }
73
+ }
74
+ }
75
+ },
76
+ "coverage": {
77
+ "type": "object",
78
+ "properties": {
79
+ "totalClaims": { "type": "integer", "minimum": 1 },
80
+ "supportedRatio": { "const": 1 },
81
+ "contradictedClaims": { "const": 0 },
82
+ "insufficientClaims": { "const": 0 },
83
+ "uncertainClaims": { "const": 0 }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ },
89
+ {
90
+ "if": { "properties": { "abstained": { "const": true } } },
91
+ "then": {
92
+ "properties": {
93
+ "answerStatus": { "const": "abstained" },
94
+ "abstentionReason": { "type": "string" },
95
+ "abstentionText": { "type": "string", "minLength": 1 }
96
+ }
97
+ }
98
+ }
99
+ ],
100
+ "definitions": {
101
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
102
+ "evidenceReference": {
103
+ "type": "object",
104
+ "additionalProperties": false,
105
+ "required": [
106
+ "evidenceId",
107
+ "uri",
108
+ "startLine",
109
+ "endLine",
110
+ "text",
111
+ "sourceHash",
112
+ "mirrorHash",
113
+ "passageHash"
114
+ ],
115
+ "properties": {
116
+ "evidenceId": { "$ref": "#/definitions/sha256" },
117
+ "uri": {
118
+ "type": "string",
119
+ "maxLength": 2048,
120
+ "pattern": "^gno://"
121
+ },
122
+ "startLine": { "type": "integer", "minimum": 1 },
123
+ "endLine": { "type": "integer", "minimum": 1 },
124
+ "text": { "type": "string", "minLength": 1 },
125
+ "sourceHash": { "$ref": "#/definitions/sha256" },
126
+ "mirrorHash": { "$ref": "#/definitions/sha256" },
127
+ "passageHash": { "$ref": "#/definitions/sha256" }
128
+ }
129
+ },
130
+ "rejectedCitation": {
131
+ "type": "object",
132
+ "additionalProperties": false,
133
+ "required": ["marker", "start", "end", "evidenceId", "reason"],
134
+ "properties": {
135
+ "marker": { "type": "string", "minLength": 1 },
136
+ "start": { "type": "integer", "minimum": 0 },
137
+ "end": { "type": "integer", "minimum": 1 },
138
+ "evidenceId": {
139
+ "oneOf": [{ "$ref": "#/definitions/sha256" }, { "type": "null" }]
140
+ },
141
+ "reason": {
142
+ "enum": [
143
+ "malformed_citation",
144
+ "out_of_capsule",
145
+ "freshness_unavailable",
146
+ "freshness_receipt_invalid",
147
+ "freshness_receipt_mismatch",
148
+ "evidence_stale",
149
+ "evidence_missing",
150
+ "orphan_citation"
151
+ ]
152
+ }
153
+ }
154
+ },
155
+ "claim": {
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "required": [
159
+ "claimId",
160
+ "text",
161
+ "start",
162
+ "end",
163
+ "status",
164
+ "confidence",
165
+ "rationaleCode",
166
+ "verifierFingerprint",
167
+ "evidence",
168
+ "rejectedCitations"
169
+ ],
170
+ "properties": {
171
+ "claimId": { "$ref": "#/definitions/sha256" },
172
+ "text": { "type": "string", "minLength": 1 },
173
+ "start": { "type": "integer", "minimum": 0 },
174
+ "end": { "type": "integer", "minimum": 1 },
175
+ "status": {
176
+ "enum": ["supported", "contradicted", "insufficient", "uncertain"]
177
+ },
178
+ "confidence": {
179
+ "oneOf": [
180
+ { "type": "number", "minimum": 0, "maximum": 1 },
181
+ { "type": "null" }
182
+ ]
183
+ },
184
+ "rationaleCode": {
185
+ "enum": [
186
+ "semantic_entailment",
187
+ "semantic_contradiction",
188
+ "no_valid_evidence",
189
+ "semantic_judgment_unavailable"
190
+ ]
191
+ },
192
+ "verifierFingerprint": {
193
+ "oneOf": [{ "$ref": "#/definitions/sha256" }, { "type": "null" }]
194
+ },
195
+ "evidence": {
196
+ "type": "array",
197
+ "maxItems": 256,
198
+ "items": { "$ref": "#/definitions/evidenceReference" }
199
+ },
200
+ "rejectedCitations": {
201
+ "type": "array",
202
+ "maxItems": 256,
203
+ "items": { "$ref": "#/definitions/rejectedCitation" }
204
+ }
205
+ },
206
+ "allOf": [
207
+ {
208
+ "if": {
209
+ "properties": {
210
+ "status": { "enum": ["supported", "contradicted"] }
211
+ }
212
+ },
213
+ "then": {
214
+ "properties": {
215
+ "confidence": { "type": "number" },
216
+ "verifierFingerprint": { "$ref": "#/definitions/sha256" },
217
+ "evidence": { "type": "array", "minItems": 1 }
218
+ }
219
+ }
220
+ },
221
+ {
222
+ "if": { "properties": { "status": { "const": "supported" } } },
223
+ "then": {
224
+ "properties": {
225
+ "rationaleCode": { "const": "semantic_entailment" }
226
+ }
227
+ }
228
+ },
229
+ {
230
+ "if": { "properties": { "status": { "const": "contradicted" } } },
231
+ "then": {
232
+ "properties": {
233
+ "rationaleCode": { "const": "semantic_contradiction" }
234
+ }
235
+ }
236
+ },
237
+ {
238
+ "if": {
239
+ "properties": {
240
+ "status": { "enum": ["insufficient", "uncertain"] }
241
+ }
242
+ },
243
+ "then": {
244
+ "properties": {
245
+ "confidence": { "type": "null" },
246
+ "verifierFingerprint": { "type": "null" }
247
+ }
248
+ }
249
+ },
250
+ {
251
+ "if": { "properties": { "status": { "const": "insufficient" } } },
252
+ "then": {
253
+ "properties": {
254
+ "rationaleCode": { "const": "no_valid_evidence" },
255
+ "evidence": { "type": "array", "maxItems": 0 }
256
+ }
257
+ }
258
+ },
259
+ {
260
+ "if": { "properties": { "status": { "const": "uncertain" } } },
261
+ "then": {
262
+ "properties": {
263
+ "rationaleCode": { "const": "semantic_judgment_unavailable" },
264
+ "evidence": { "type": "array", "minItems": 1 }
265
+ }
266
+ }
267
+ }
268
+ ]
269
+ },
270
+ "coverage": {
271
+ "type": "object",
272
+ "additionalProperties": false,
273
+ "required": [
274
+ "totalClaims",
275
+ "supportedClaims",
276
+ "contradictedClaims",
277
+ "insufficientClaims",
278
+ "uncertainClaims",
279
+ "supportedRatio"
280
+ ],
281
+ "properties": {
282
+ "totalClaims": { "type": "integer", "minimum": 0 },
283
+ "supportedClaims": { "type": "integer", "minimum": 0 },
284
+ "contradictedClaims": { "type": "integer", "minimum": 0 },
285
+ "insufficientClaims": { "type": "integer", "minimum": 0 },
286
+ "uncertainClaims": { "type": "integer", "minimum": 0 },
287
+ "supportedRatio": { "type": "number", "minimum": 0, "maximum": 1 }
288
+ }
289
+ }
290
+ }
291
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/collection-list@1.0",
4
+ "title": "GNO Collection List",
5
+ "description": "List of configured collections",
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "required": ["name", "path", "pattern", "include", "exclude"],
10
+ "properties": {
11
+ "name": {
12
+ "type": "string",
13
+ "description": "Collection identifier (lowercase, alphanumeric with hyphens/underscores)",
14
+ "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
15
+ },
16
+ "path": {
17
+ "type": "string",
18
+ "description": "Absolute path to collection root directory"
19
+ },
20
+ "pattern": {
21
+ "type": "string",
22
+ "description": "Glob pattern for file matching",
23
+ "default": "**/*"
24
+ },
25
+ "include": {
26
+ "type": "array",
27
+ "description": "Extension allowlist (empty = all)",
28
+ "items": { "type": "string" }
29
+ },
30
+ "exclude": {
31
+ "type": "array",
32
+ "description": "Path patterns to skip",
33
+ "items": { "type": "string" }
34
+ },
35
+ "updateCmd": {
36
+ "type": "string",
37
+ "description": "Optional shell command to run before indexing"
38
+ },
39
+ "languageHint": {
40
+ "type": "string",
41
+ "description": "BCP-47 language hint for the collection"
42
+ }
43
+ }
44
+ }
45
+ }