@gmickel/gno 1.19.0 → 1.21.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 (85) hide show
  1. package/README.md +28 -8
  2. package/assets/skill/SKILL.md +73 -27
  3. package/assets/skill/mcp-reference.md +7 -2
  4. package/assets/skill/recipes/citation-and-provenance.md +32 -9
  5. package/package.json +1 -1
  6. package/spec/cli.md +142 -17
  7. package/spec/db/schema.sql +170 -0
  8. package/spec/evals-agentic.md +87 -5
  9. package/spec/mcp.md +75 -3
  10. package/spec/output-schemas/ask.schema.json +198 -0
  11. package/spec/output-schemas/capsule-reverified-event.schema.json +47 -0
  12. package/spec/output-schemas/changes.schema.json +280 -0
  13. package/spec/output-schemas/claim-verification.schema.json +291 -0
  14. package/spec/output-schemas/context-capsule-v1.schema.json +36 -1
  15. package/spec/output-schemas/document-diff.schema.json +185 -0
  16. package/spec/output-schemas/impact.schema.json +122 -0
  17. package/spec/output-schemas/saved-capsule-list.schema.json +16 -0
  18. package/spec/output-schemas/saved-capsule-registration.schema.json +172 -0
  19. package/spec/output-schemas/saved-capsule-reverification.schema.json +59 -0
  20. package/spec/output-schemas/saved-capsule-unwatch.schema.json +16 -0
  21. package/spec/output-schemas/saved-capsule-watch.schema.json +17 -0
  22. package/src/app/context-runtime-contract.ts +10 -5
  23. package/src/app/context-runtime-input.ts +29 -1
  24. package/src/app/context-runtime-types.ts +4 -0
  25. package/src/app/context-runtime.ts +5 -1
  26. package/src/app/context-surface.ts +4 -0
  27. package/src/app/verified-ask.ts +291 -0
  28. package/src/cli/commands/ask-format.ts +255 -0
  29. package/src/cli/commands/ask.ts +40 -149
  30. package/src/cli/commands/changes.ts +160 -0
  31. package/src/cli/commands/context-saved.ts +189 -0
  32. package/src/cli/options.ts +8 -0
  33. package/src/cli/program.ts +227 -1
  34. package/src/core/capsule-registry.ts +279 -0
  35. package/src/core/capsule-reverification-scheduler.ts +218 -0
  36. package/src/core/capsule-reverification.ts +289 -0
  37. package/src/core/change-diff.ts +182 -0
  38. package/src/core/change-journal.ts +228 -0
  39. package/src/core/context-budget.ts +6 -0
  40. package/src/core/context-capsule-retrieval-schema.ts +4 -0
  41. package/src/core/context-capsule-schema.ts +17 -0
  42. package/src/core/context-capsule-validation.ts +3 -2
  43. package/src/core/context-capsule.ts +18 -0
  44. package/src/core/context-compiler.ts +33 -21
  45. package/src/core/context-evidence.ts +6 -0
  46. package/src/core/knowledge-delta.ts +395 -0
  47. package/src/core/knowledge-impact.ts +202 -0
  48. package/src/core/retrieval-trace-evidence-origin.ts +3 -0
  49. package/src/core/retrieval-trace-session.ts +15 -2
  50. package/src/ingestion/sync.ts +214 -165
  51. package/src/llm/errors.ts +10 -1
  52. package/src/llm/httpGeneration.ts +11 -1
  53. package/src/llm/nodeLlamaCpp/generation.ts +54 -10
  54. package/src/llm/types.ts +6 -0
  55. package/src/mcp/tools/ask.ts +228 -0
  56. package/src/mcp/tools/changes.ts +80 -0
  57. package/src/mcp/tools/context.ts +28 -7
  58. package/src/mcp/tools/index.ts +38 -0
  59. package/src/pipeline/claim-verification-schema.ts +235 -0
  60. package/src/pipeline/claim-verification.ts +487 -0
  61. package/src/pipeline/claim-verifier.ts +474 -0
  62. package/src/pipeline/types.ts +25 -0
  63. package/src/sdk/client.ts +77 -2
  64. package/src/sdk/index.ts +7 -0
  65. package/src/sdk/types.ts +22 -0
  66. package/src/serve/doc-events.ts +12 -1
  67. package/src/serve/public/components/AskVerificationPanel.tsx +189 -0
  68. package/src/serve/public/globals.built.css +1 -1
  69. package/src/serve/public/pages/Ask.tsx +42 -4
  70. package/src/serve/resident-runtime.ts +22 -0
  71. package/src/serve/routes/api.ts +162 -3
  72. package/src/serve/routes/changes.ts +102 -0
  73. package/src/serve/server.ts +34 -0
  74. package/src/serve/watch-service.ts +9 -0
  75. package/src/store/index.ts +21 -0
  76. package/src/store/migrations/015-document-change-journal.ts +85 -0
  77. package/src/store/migrations/016-saved-capsules.ts +131 -0
  78. package/src/store/migrations/017-document-change-retention-counters.ts +33 -0
  79. package/src/store/migrations/018-saved-capsule-registration-epoch.ts +24 -0
  80. package/src/store/migrations/019-saved-capsule-registration-generation.ts +53 -0
  81. package/src/store/migrations/index.ts +10 -0
  82. package/src/store/sqlite/adapter.ts +291 -7
  83. package/src/store/sqlite/capsule-registry-store.ts +534 -0
  84. package/src/store/sqlite/change-journal-store.ts +473 -0
  85. package/src/store/types.ts +262 -0
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/capsule-reverified-event@1.0",
4
+ "title": "GNO Metadata-only Saved Capsule Reverification Event",
5
+ "description": "Closed local event emitted only after a saved Capsule verification result commits.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "type",
10
+ "registrationId",
11
+ "capsuleId",
12
+ "operationStatus",
13
+ "affectedQuestionState",
14
+ "changedAt"
15
+ ],
16
+ "properties": {
17
+ "type": { "const": "capsule-reverified" },
18
+ "registrationId": {
19
+ "type": "string",
20
+ "pattern": "^capsule-[a-f0-9]{40}$"
21
+ },
22
+ "capsuleId": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
23
+ "operationStatus": { "enum": ["completed", "failed"] },
24
+ "affectedQuestionState": {
25
+ "enum": ["unaffected", "affected", "unknown"]
26
+ },
27
+ "changedAt": { "type": "string", "format": "date-time" }
28
+ },
29
+ "allOf": [
30
+ {
31
+ "if": {
32
+ "properties": { "operationStatus": { "const": "completed" } },
33
+ "required": ["operationStatus"]
34
+ },
35
+ "then": {
36
+ "properties": {
37
+ "affectedQuestionState": { "enum": ["unaffected", "affected"] }
38
+ }
39
+ },
40
+ "else": {
41
+ "properties": {
42
+ "affectedQuestionState": { "const": "unknown" }
43
+ }
44
+ }
45
+ }
46
+ ]
47
+ }
@@ -0,0 +1,280 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/changes@1.0",
4
+ "title": "GNO Knowledge Changes",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "changes", "page", "warnings"],
7
+ "properties": {
8
+ "schemaVersion": { "type": "string", "const": "1.0" },
9
+ "changes": {
10
+ "type": "array",
11
+ "maxItems": 1000,
12
+ "items": { "$ref": "#/definitions/change" }
13
+ },
14
+ "page": {
15
+ "type": "object",
16
+ "required": [
17
+ "nextCursor",
18
+ "earliestCursor",
19
+ "latestCursor",
20
+ "cursorExpired",
21
+ "truncated",
22
+ "retentionTruncated"
23
+ ],
24
+ "properties": {
25
+ "nextCursor": { "type": ["string", "null"], "maxLength": 512 },
26
+ "earliestCursor": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "maxLength": 512
30
+ },
31
+ "latestCursor": { "type": "string", "minLength": 1, "maxLength": 512 },
32
+ "cursorExpired": { "type": "boolean" },
33
+ "truncated": { "type": "boolean" },
34
+ "retentionTruncated": { "type": "boolean" }
35
+ },
36
+ "additionalProperties": false
37
+ },
38
+ "warnings": { "type": "array", "items": { "type": "string" } }
39
+ },
40
+ "additionalProperties": false,
41
+ "allOf": [
42
+ {
43
+ "if": {
44
+ "properties": {
45
+ "page": {
46
+ "type": "object",
47
+ "properties": { "cursorExpired": { "const": true } },
48
+ "required": ["cursorExpired"]
49
+ }
50
+ },
51
+ "required": ["page"]
52
+ },
53
+ "then": {
54
+ "properties": {
55
+ "changes": { "type": "array", "maxItems": 0 },
56
+ "page": {
57
+ "type": "object",
58
+ "properties": {
59
+ "nextCursor": { "type": "null" },
60
+ "retentionTruncated": { "const": true }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ },
66
+ {
67
+ "if": {
68
+ "properties": {
69
+ "page": {
70
+ "type": "object",
71
+ "properties": { "truncated": { "const": true } },
72
+ "required": ["truncated"]
73
+ }
74
+ },
75
+ "required": ["page"]
76
+ },
77
+ "then": {
78
+ "properties": {
79
+ "page": {
80
+ "type": "object",
81
+ "properties": {
82
+ "nextCursor": { "type": "string", "minLength": 1 }
83
+ }
84
+ }
85
+ }
86
+ },
87
+ "else": {
88
+ "properties": {
89
+ "page": {
90
+ "type": "object",
91
+ "properties": { "nextCursor": { "type": "null" } }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ ],
97
+ "definitions": {
98
+ "snapshot": {
99
+ "type": "object",
100
+ "required": [
101
+ "relPath",
102
+ "docid",
103
+ "uri",
104
+ "sourceHash",
105
+ "mirrorHash",
106
+ "active"
107
+ ],
108
+ "properties": {
109
+ "relPath": { "type": "string" },
110
+ "docid": { "type": "string", "pattern": "^#[a-f0-9]{6,}$" },
111
+ "uri": { "type": "string", "pattern": "^gno://.+" },
112
+ "sourceHash": { "$ref": "#/definitions/sha256" },
113
+ "mirrorHash": {
114
+ "anyOf": [{ "$ref": "#/definitions/sha256" }, { "type": "null" }]
115
+ },
116
+ "active": { "type": "boolean" }
117
+ },
118
+ "additionalProperties": false
119
+ },
120
+ "setDelta": {
121
+ "type": "object",
122
+ "required": ["added", "removed"],
123
+ "properties": {
124
+ "added": {
125
+ "type": "array",
126
+ "maxItems": 16,
127
+ "uniqueItems": true,
128
+ "items": { "type": "string", "minLength": 1, "maxLength": 256 }
129
+ },
130
+ "removed": {
131
+ "type": "array",
132
+ "maxItems": 16,
133
+ "uniqueItems": true,
134
+ "items": { "type": "string", "minLength": 1, "maxLength": 256 }
135
+ }
136
+ },
137
+ "additionalProperties": false
138
+ },
139
+ "dateDelta": {
140
+ "type": "object",
141
+ "required": ["added", "removed", "changed"],
142
+ "properties": {
143
+ "added": {
144
+ "type": "array",
145
+ "maxItems": 16,
146
+ "uniqueItems": true,
147
+ "items": { "type": "string", "minLength": 1, "maxLength": 256 }
148
+ },
149
+ "removed": {
150
+ "type": "array",
151
+ "maxItems": 16,
152
+ "uniqueItems": true,
153
+ "items": { "type": "string", "minLength": 1, "maxLength": 256 }
154
+ },
155
+ "changed": {
156
+ "type": "array",
157
+ "maxItems": 16,
158
+ "uniqueItems": true,
159
+ "items": { "type": "string", "minLength": 1, "maxLength": 256 }
160
+ }
161
+ },
162
+ "additionalProperties": false
163
+ },
164
+ "structureDelta": {
165
+ "type": "object",
166
+ "required": ["headings", "links", "typedEdges", "dates", "truncated"],
167
+ "properties": {
168
+ "headings": { "$ref": "#/definitions/setDelta" },
169
+ "links": { "$ref": "#/definitions/setDelta" },
170
+ "typedEdges": { "$ref": "#/definitions/setDelta" },
171
+ "dates": { "$ref": "#/definitions/dateDelta" },
172
+ "truncated": { "type": "boolean" }
173
+ },
174
+ "additionalProperties": false
175
+ },
176
+ "sha256": {
177
+ "type": "string",
178
+ "pattern": "^[a-f0-9]{64}$"
179
+ },
180
+ "change": {
181
+ "type": "object",
182
+ "required": [
183
+ "id",
184
+ "kind",
185
+ "collection",
186
+ "observedAt",
187
+ "previous",
188
+ "current",
189
+ "structureDelta"
190
+ ],
191
+ "properties": {
192
+ "id": { "type": "string", "minLength": 1, "maxLength": 512 },
193
+ "kind": {
194
+ "type": "string",
195
+ "enum": ["create", "update", "rename", "inactivate", "reactivate"]
196
+ },
197
+ "collection": { "type": "string", "minLength": 1 },
198
+ "observedAt": { "type": "string", "format": "date-time" },
199
+ "previous": {
200
+ "anyOf": [{ "$ref": "#/definitions/snapshot" }, { "type": "null" }]
201
+ },
202
+ "current": {
203
+ "anyOf": [{ "$ref": "#/definitions/snapshot" }, { "type": "null" }]
204
+ },
205
+ "structureDelta": { "$ref": "#/definitions/structureDelta" }
206
+ },
207
+ "additionalProperties": false,
208
+ "allOf": [
209
+ {
210
+ "if": {
211
+ "properties": { "kind": { "const": "create" } },
212
+ "required": ["kind"]
213
+ },
214
+ "then": {
215
+ "properties": {
216
+ "previous": { "type": "null" },
217
+ "current": {
218
+ "type": "object",
219
+ "properties": { "active": { "const": true } },
220
+ "required": ["active"]
221
+ }
222
+ }
223
+ }
224
+ },
225
+ {
226
+ "if": {
227
+ "properties": { "kind": { "enum": ["update", "rename"] } },
228
+ "required": ["kind"]
229
+ },
230
+ "then": {
231
+ "properties": {
232
+ "previous": { "$ref": "#/definitions/snapshot" },
233
+ "current": { "$ref": "#/definitions/snapshot" }
234
+ }
235
+ }
236
+ },
237
+ {
238
+ "if": {
239
+ "properties": { "kind": { "const": "inactivate" } },
240
+ "required": ["kind"]
241
+ },
242
+ "then": {
243
+ "properties": {
244
+ "previous": {
245
+ "type": "object",
246
+ "properties": { "active": { "const": true } },
247
+ "required": ["active"]
248
+ },
249
+ "current": {
250
+ "type": "object",
251
+ "properties": { "active": { "const": false } },
252
+ "required": ["active"]
253
+ }
254
+ }
255
+ }
256
+ },
257
+ {
258
+ "if": {
259
+ "properties": { "kind": { "const": "reactivate" } },
260
+ "required": ["kind"]
261
+ },
262
+ "then": {
263
+ "properties": {
264
+ "previous": {
265
+ "type": "object",
266
+ "properties": { "active": { "const": false } },
267
+ "required": ["active"]
268
+ },
269
+ "current": {
270
+ "type": "object",
271
+ "properties": { "active": { "const": true } },
272
+ "required": ["active"]
273
+ }
274
+ }
275
+ }
276
+ }
277
+ ]
278
+ }
279
+ }
280
+ }
@@ -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
+ }
@@ -196,6 +196,23 @@
196
196
  { "type": "null" }
197
197
  ]
198
198
  },
199
+ "intent": {
200
+ "oneOf": [
201
+ { "type": "string", "minLength": 1, "maxLength": 16384 },
202
+ { "type": "null" }
203
+ ]
204
+ },
205
+ "exclude": {
206
+ "type": "array",
207
+ "maxItems": 128,
208
+ "items": { "type": "string", "minLength": 1, "maxLength": 256 }
209
+ },
210
+ "minScore": {
211
+ "oneOf": [
212
+ { "type": "number", "minimum": 0, "maximum": 1 },
213
+ { "type": "null" }
214
+ ]
215
+ },
199
216
  "queryModes": {
200
217
  "type": "array",
201
218
  "maxItems": 128,
@@ -203,7 +220,8 @@
203
220
  },
204
221
  "limit": { "type": "integer", "minimum": 1 },
205
222
  "candidateLimit": { "type": "integer", "minimum": 1 },
206
- "graphRequested": { "type": "boolean" }
223
+ "graphRequested": { "type": "boolean" },
224
+ "rerankRequested": { "type": "boolean" }
207
225
  }
208
226
  },
209
227
  "capabilityStates": {
@@ -538,6 +556,23 @@
538
556
  },
539
557
  "retrievalRank": { "type": "integer", "minimum": 1 },
540
558
  "selectionRank": { "type": "integer", "minimum": 1 },
559
+ "retrievalSources": {
560
+ "type": "array",
561
+ "minItems": 1,
562
+ "maxItems": 6,
563
+ "uniqueItems": true,
564
+ "items": {
565
+ "enum": [
566
+ "bm25",
567
+ "vector",
568
+ "bm25_variant",
569
+ "vector_variant",
570
+ "hyde",
571
+ "graph"
572
+ ]
573
+ }
574
+ },
575
+ "graphExpanded": { "type": "boolean" },
541
576
  "facets": { "$ref": "#/definitions/facets" },
542
577
  "trust": { "const": "untrusted" },
543
578
  "egress": {