@gmickel/gno 2.3.2 → 2.4.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.
- package/README.md +24 -4
- package/assets/skill/SKILL.md +30 -0
- package/assets/skill/cli-reference.md +12 -0
- package/assets/skill/examples.md +15 -0
- package/assets/skill/mcp-reference.md +16 -0
- package/assets/spa-production.json.gz +0 -0
- package/browser-extension/artifacts/{gno-browser-clipper-v2.3.2.zip → gno-browser-clipper-v2.4.0.zip} +0 -0
- package/browser-extension/artifacts/gno-browser-clipper-v2.4.0.zip.sha256 +1 -0
- package/browser-extension/dist/manifest.json +1 -1
- package/package.json +1 -1
- package/spec/cli.md +30 -0
- package/spec/db/schema.sql +2 -0
- package/spec/evals.md +48 -0
- package/spec/mcp.md +12 -0
- package/spec/output-schemas/ask.schema.json +12 -0
- package/spec/output-schemas/context-capsule-v1.schema.json +205 -32
- package/spec/output-schemas/context-capsule-verification.schema.json +32 -9
- package/spec/output-schemas/evidence-fixtures.schema.json +176 -0
- package/spec/output-schemas/evidence-report.schema.json +322 -0
- package/spec/output-schemas/evidence-run.schema.json +277 -0
- package/spec/output-schemas/metadata-predicate.schema.json +460 -0
- package/spec/output-schemas/retrieval-trace-filters.schema.json +13 -4
- package/spec/output-schemas/search-results.schema.json +12 -0
- package/spec/output-schemas/status.schema.json +37 -6
- package/src/app/context-runtime-contract.ts +33 -2
- package/src/app/context-runtime-input.ts +17 -0
- package/src/app/context-runtime-types.ts +2 -0
- package/src/app/context-runtime.ts +27 -3
- package/src/app/context-surface.ts +2 -0
- package/src/app/verified-ask.ts +1 -0
- package/src/cli/commands/ask.ts +1 -0
- package/src/cli/commands/context-build.ts +1 -0
- package/src/cli/commands/search.ts +1 -0
- package/src/cli/commands/status.ts +10 -0
- package/src/cli/options.ts +19 -0
- package/src/cli/program.ts +12 -0
- package/src/converters/types.ts +2 -0
- package/src/core/context-capsule-retrieval-schema.ts +8 -0
- package/src/core/context-capsule-schema.ts +47 -3
- package/src/core/context-capsule-validation.ts +14 -2
- package/src/core/context-capsule-verification.ts +1 -0
- package/src/core/context-capsule.ts +16 -2
- package/src/core/context-compiler.ts +3 -0
- package/src/core/record-metadata.ts +1 -1
- package/src/core/retrieval-replay-candidate.ts +5 -0
- package/src/core/retrieval-trace-filter-normalization.ts +4 -0
- package/src/core/retrieval-trace-request.ts +1 -0
- package/src/core/retrieval-trace-session.ts +5 -1
- package/src/core/retrieval-trace.ts +2 -0
- package/src/core/typed-metadata.ts +224 -0
- package/src/ingestion/record-adapter-canonical.ts +13 -2
- package/src/ingestion/record-container.ts +9 -0
- package/src/ingestion/sync.ts +11 -1
- package/src/ingestion/typed-metadata.ts +55 -0
- package/src/mcp/tools/ask.ts +10 -2
- package/src/mcp/tools/context.ts +1 -0
- package/src/mcp/tools/index.ts +12 -1
- package/src/mcp/tools/query.ts +13 -0
- package/src/mcp/tools/search.ts +9 -0
- package/src/mcp/tools/status.ts +4 -0
- package/src/mcp/tools/vsearch.ts +9 -0
- package/src/pipeline/diagnose.ts +6 -0
- package/src/pipeline/filters.ts +65 -0
- package/src/pipeline/graph-retrieval.ts +9 -1
- package/src/pipeline/hybrid.ts +22 -2
- package/src/pipeline/search.ts +11 -0
- package/src/pipeline/types.ts +7 -1
- package/src/pipeline/vsearch.ts +21 -1
- package/src/sdk/client.ts +29 -1
- package/src/sdk/index.ts +4 -0
- package/src/sdk/types.ts +7 -0
- package/src/serve/context-capsule.ts +1 -0
- package/src/serve/public/app.tsx +1 -1
- package/src/serve/public/components/MetadataFilter.tsx +186 -0
- package/src/serve/public/globals.built.css +1 -1
- package/src/serve/public/lib/metadata-filter.ts +28 -0
- package/src/serve/public/lib/retrieval-filters.ts +3 -0
- package/src/serve/public/pages/Ask.tsx +48 -3
- package/src/serve/public/pages/DocView.tsx +33 -0
- package/src/serve/public/pages/Search.tsx +44 -1
- package/src/serve/routes/api.ts +50 -0
- package/src/store/migrations/030-typed-metadata.ts +13 -0
- package/src/store/migrations/index.ts +2 -0
- package/src/store/sqlite/adapter.ts +55 -4
- package/src/store/sqlite/eligibility.ts +12 -0
- package/src/store/sqlite/metadata-predicate.ts +71 -0
- package/src/store/types.ts +11 -0
- package/browser-extension/artifacts/gno-browser-clipper-v2.3.2.zip.sha256 +0 -1
|
@@ -27,7 +27,11 @@
|
|
|
27
27
|
"allOf": [
|
|
28
28
|
{
|
|
29
29
|
"if": {
|
|
30
|
-
"properties": {
|
|
30
|
+
"properties": {
|
|
31
|
+
"schemaVersion": {
|
|
32
|
+
"enum": ["1.1", "1.2"]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
31
35
|
"required": ["schemaVersion"]
|
|
32
36
|
},
|
|
33
37
|
"then": {
|
|
@@ -38,7 +42,9 @@
|
|
|
38
42
|
"type": "array",
|
|
39
43
|
"items": {
|
|
40
44
|
"allOf": [
|
|
41
|
-
{
|
|
45
|
+
{
|
|
46
|
+
"$ref": "#/definitions/evidence"
|
|
47
|
+
},
|
|
42
48
|
{
|
|
43
49
|
"type": "object",
|
|
44
50
|
"required": ["egressLineage"],
|
|
@@ -66,7 +72,9 @@
|
|
|
66
72
|
"type": "array",
|
|
67
73
|
"items": {
|
|
68
74
|
"allOf": [
|
|
69
|
-
{
|
|
75
|
+
{
|
|
76
|
+
"$ref": "#/definitions/evidence"
|
|
77
|
+
},
|
|
70
78
|
{
|
|
71
79
|
"not": {
|
|
72
80
|
"type": "object",
|
|
@@ -140,10 +148,93 @@
|
|
|
140
148
|
}
|
|
141
149
|
}
|
|
142
150
|
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"if": {
|
|
154
|
+
"properties": {
|
|
155
|
+
"schemaVersion": {
|
|
156
|
+
"const": "1.2"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"required": ["schemaVersion"]
|
|
160
|
+
},
|
|
161
|
+
"then": {
|
|
162
|
+
"properties": {
|
|
163
|
+
"scope": {
|
|
164
|
+
"type": "object",
|
|
165
|
+
"required": ["filter"],
|
|
166
|
+
"properties": {
|
|
167
|
+
"filter": {}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"retrieval": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"properties": {
|
|
173
|
+
"request": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"required": ["filter"],
|
|
176
|
+
"properties": {
|
|
177
|
+
"filter": {}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"else": {
|
|
185
|
+
"properties": {
|
|
186
|
+
"warnings": {
|
|
187
|
+
"type": "array",
|
|
188
|
+
"items": {
|
|
189
|
+
"type": "object",
|
|
190
|
+
"properties": {
|
|
191
|
+
"code": {
|
|
192
|
+
"enum": [
|
|
193
|
+
"incomplete_coverage",
|
|
194
|
+
"omissions_truncated",
|
|
195
|
+
"token_estimate_used"
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"scope": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"not": {
|
|
204
|
+
"required": ["filter"],
|
|
205
|
+
"properties": {
|
|
206
|
+
"filter": {}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"properties": {
|
|
210
|
+
"filter": {}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"retrieval": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"properties": {
|
|
216
|
+
"request": {
|
|
217
|
+
"type": "object",
|
|
218
|
+
"not": {
|
|
219
|
+
"required": ["filter"],
|
|
220
|
+
"properties": {
|
|
221
|
+
"filter": {}
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"properties": {
|
|
225
|
+
"filter": {}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
143
232
|
}
|
|
144
233
|
],
|
|
145
234
|
"properties": {
|
|
146
|
-
"schemaVersion": {
|
|
235
|
+
"schemaVersion": {
|
|
236
|
+
"enum": ["1.0", "1.1", "1.2"]
|
|
237
|
+
},
|
|
147
238
|
"coordinateSpace": { "const": "canonical_mirror" },
|
|
148
239
|
"capsuleId": { "$ref": "#/definitions/sha256" },
|
|
149
240
|
"egressLineage": { "$ref": "#/definitions/egressLineage" },
|
|
@@ -171,15 +262,22 @@
|
|
|
171
262
|
},
|
|
172
263
|
"uriPrefix": {
|
|
173
264
|
"oneOf": [
|
|
174
|
-
{
|
|
175
|
-
|
|
265
|
+
{
|
|
266
|
+
"$ref": "#/definitions/gnoPrefixUri"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"type": "null"
|
|
270
|
+
}
|
|
176
271
|
]
|
|
177
272
|
},
|
|
178
273
|
"tagsAll": { "$ref": "#/definitions/filterValues" },
|
|
179
274
|
"tagsAny": { "$ref": "#/definitions/filterValues" },
|
|
180
275
|
"categories": { "$ref": "#/definitions/filterValues" },
|
|
181
276
|
"since": { "$ref": "#/definitions/nullableDate" },
|
|
182
|
-
"until": { "$ref": "#/definitions/nullableDate" }
|
|
277
|
+
"until": { "$ref": "#/definitions/nullableDate" },
|
|
278
|
+
"filter": {
|
|
279
|
+
"$ref": "gno://schemas/metadata-predicate@1.0"
|
|
280
|
+
}
|
|
183
281
|
}
|
|
184
282
|
},
|
|
185
283
|
"budget": {
|
|
@@ -223,7 +321,9 @@
|
|
|
223
321
|
"indexSnapshot"
|
|
224
322
|
],
|
|
225
323
|
"properties": {
|
|
226
|
-
"depthPolicy": {
|
|
324
|
+
"depthPolicy": {
|
|
325
|
+
"enum": ["fast", "balanced", "thorough"]
|
|
326
|
+
},
|
|
227
327
|
"facets": { "$ref": "#/definitions/facets" },
|
|
228
328
|
"queryVariants": {
|
|
229
329
|
"type": "array",
|
|
@@ -246,20 +346,38 @@
|
|
|
246
346
|
"properties": {
|
|
247
347
|
"author": {
|
|
248
348
|
"oneOf": [
|
|
249
|
-
{
|
|
250
|
-
|
|
349
|
+
{
|
|
350
|
+
"type": "string",
|
|
351
|
+
"minLength": 1,
|
|
352
|
+
"maxLength": 256
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"type": "null"
|
|
356
|
+
}
|
|
251
357
|
]
|
|
252
358
|
},
|
|
253
359
|
"lang": {
|
|
254
360
|
"oneOf": [
|
|
255
|
-
{
|
|
256
|
-
|
|
361
|
+
{
|
|
362
|
+
"type": "string",
|
|
363
|
+
"minLength": 1,
|
|
364
|
+
"maxLength": 64
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"type": "null"
|
|
368
|
+
}
|
|
257
369
|
]
|
|
258
370
|
},
|
|
259
371
|
"intent": {
|
|
260
372
|
"oneOf": [
|
|
261
|
-
{
|
|
262
|
-
|
|
373
|
+
{
|
|
374
|
+
"type": "string",
|
|
375
|
+
"minLength": 1,
|
|
376
|
+
"maxLength": 16384
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"type": "null"
|
|
380
|
+
}
|
|
263
381
|
]
|
|
264
382
|
},
|
|
265
383
|
"exclude": {
|
|
@@ -269,8 +387,14 @@
|
|
|
269
387
|
},
|
|
270
388
|
"minScore": {
|
|
271
389
|
"oneOf": [
|
|
272
|
-
{
|
|
273
|
-
|
|
390
|
+
{
|
|
391
|
+
"type": "number",
|
|
392
|
+
"minimum": 0,
|
|
393
|
+
"maximum": 1
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"type": "null"
|
|
397
|
+
}
|
|
274
398
|
]
|
|
275
399
|
},
|
|
276
400
|
"queryModes": {
|
|
@@ -281,7 +405,10 @@
|
|
|
281
405
|
"limit": { "type": "integer", "minimum": 1 },
|
|
282
406
|
"candidateLimit": { "type": "integer", "minimum": 1 },
|
|
283
407
|
"graphRequested": { "type": "boolean" },
|
|
284
|
-
"rerankRequested": { "type": "boolean" }
|
|
408
|
+
"rerankRequested": { "type": "boolean" },
|
|
409
|
+
"filter": {
|
|
410
|
+
"$ref": "gno://schemas/metadata-predicate@1.0"
|
|
411
|
+
}
|
|
285
412
|
}
|
|
286
413
|
},
|
|
287
414
|
"capabilityStates": {
|
|
@@ -382,7 +509,8 @@
|
|
|
382
509
|
"enum": [
|
|
383
510
|
"incomplete_coverage",
|
|
384
511
|
"omissions_truncated",
|
|
385
|
-
"token_estimate_used"
|
|
512
|
+
"token_estimate_used",
|
|
513
|
+
"metadata_coverage_incomplete"
|
|
386
514
|
]
|
|
387
515
|
}
|
|
388
516
|
}
|
|
@@ -414,7 +542,9 @@
|
|
|
414
542
|
"minimum": 0,
|
|
415
543
|
"maximum": 9007199254740991
|
|
416
544
|
},
|
|
417
|
-
"disposition": {
|
|
545
|
+
"disposition": {
|
|
546
|
+
"enum": ["inline", "attachment"]
|
|
547
|
+
},
|
|
418
548
|
"sha256": { "$ref": "#/definitions/sha256" }
|
|
419
549
|
}
|
|
420
550
|
},
|
|
@@ -484,10 +614,25 @@
|
|
|
484
614
|
},
|
|
485
615
|
"sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
486
616
|
"nullableSha256": {
|
|
487
|
-
"oneOf": [
|
|
617
|
+
"oneOf": [
|
|
618
|
+
{
|
|
619
|
+
"$ref": "#/definitions/sha256"
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"type": "null"
|
|
623
|
+
}
|
|
624
|
+
]
|
|
488
625
|
},
|
|
489
626
|
"nullableDate": {
|
|
490
|
-
"oneOf": [
|
|
627
|
+
"oneOf": [
|
|
628
|
+
{
|
|
629
|
+
"type": "string",
|
|
630
|
+
"format": "date-time"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"type": "null"
|
|
634
|
+
}
|
|
635
|
+
]
|
|
491
636
|
},
|
|
492
637
|
"gnoUri": {
|
|
493
638
|
"type": "string",
|
|
@@ -511,7 +656,9 @@
|
|
|
511
656
|
"additionalProperties": false,
|
|
512
657
|
"required": ["effectivePolicy", "digest", "sources"],
|
|
513
658
|
"properties": {
|
|
514
|
-
"effectivePolicy": {
|
|
659
|
+
"effectivePolicy": {
|
|
660
|
+
"enum": ["local_only", "lan", "remote"]
|
|
661
|
+
},
|
|
515
662
|
"digest": { "$ref": "#/definitions/sha256" },
|
|
516
663
|
"sources": {
|
|
517
664
|
"type": "array",
|
|
@@ -523,7 +670,9 @@
|
|
|
523
670
|
"required": ["collection", "policy", "source"],
|
|
524
671
|
"properties": {
|
|
525
672
|
"collection": { "$ref": "#/definitions/collection" },
|
|
526
|
-
"policy": {
|
|
673
|
+
"policy": {
|
|
674
|
+
"enum": ["local_only", "lan", "remote"]
|
|
675
|
+
},
|
|
527
676
|
"source": {
|
|
528
677
|
"enum": ["explicit", "config_default", "legacy_default"]
|
|
529
678
|
}
|
|
@@ -547,7 +696,9 @@
|
|
|
547
696
|
"additionalProperties": false,
|
|
548
697
|
"required": ["mode", "text"],
|
|
549
698
|
"properties": {
|
|
550
|
-
"mode": {
|
|
699
|
+
"mode": {
|
|
700
|
+
"enum": ["term", "intent", "hyde"]
|
|
701
|
+
},
|
|
551
702
|
"text": { "type": "string", "minLength": 1, "maxLength": 4096 }
|
|
552
703
|
}
|
|
553
704
|
},
|
|
@@ -649,7 +800,9 @@
|
|
|
649
800
|
"required": ["contextId", "scopeType", "scopeKey", "text"],
|
|
650
801
|
"properties": {
|
|
651
802
|
"contextId": { "$ref": "#/definitions/sha256" },
|
|
652
|
-
"scopeType": {
|
|
803
|
+
"scopeType": {
|
|
804
|
+
"enum": ["global", "collection", "prefix"]
|
|
805
|
+
},
|
|
653
806
|
"scopeKey": { "type": "string", "minLength": 1, "maxLength": 2048 },
|
|
654
807
|
"text": { "type": "string", "minLength": 1, "maxLength": 16384 }
|
|
655
808
|
},
|
|
@@ -710,8 +863,14 @@
|
|
|
710
863
|
"uri": { "$ref": "#/definitions/gnoUri" },
|
|
711
864
|
"docid": { "$ref": "#/definitions/docid" },
|
|
712
865
|
"collection": { "$ref": "#/definitions/collection" },
|
|
713
|
-
"title": {
|
|
714
|
-
|
|
866
|
+
"title": {
|
|
867
|
+
"type": ["string", "null"],
|
|
868
|
+
"maxLength": 2048
|
|
869
|
+
},
|
|
870
|
+
"heading": {
|
|
871
|
+
"type": ["string", "null"],
|
|
872
|
+
"maxLength": 2048
|
|
873
|
+
},
|
|
715
874
|
"startLine": { "type": "integer", "minimum": 1 },
|
|
716
875
|
"endLine": { "type": "integer", "minimum": 1 },
|
|
717
876
|
"text": { "type": "string", "minLength": 1 },
|
|
@@ -721,9 +880,17 @@
|
|
|
721
880
|
"modifiedAt": { "$ref": "#/definitions/nullableDate" },
|
|
722
881
|
"documentDate": {
|
|
723
882
|
"oneOf": [
|
|
724
|
-
{
|
|
725
|
-
|
|
726
|
-
|
|
883
|
+
{
|
|
884
|
+
"type": "string",
|
|
885
|
+
"format": "date"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"type": "string",
|
|
889
|
+
"format": "date-time"
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"type": "null"
|
|
893
|
+
}
|
|
727
894
|
]
|
|
728
895
|
},
|
|
729
896
|
"observedAt": { "$ref": "#/definitions/nullableDate" },
|
|
@@ -832,8 +999,14 @@
|
|
|
832
999
|
"candidateId": { "$ref": "#/definitions/sha256" },
|
|
833
1000
|
"uri": { "$ref": "#/definitions/gnoUri" },
|
|
834
1001
|
"docid": { "$ref": "#/definitions/docid" },
|
|
835
|
-
"startLine": {
|
|
836
|
-
|
|
1002
|
+
"startLine": {
|
|
1003
|
+
"type": ["integer", "null"],
|
|
1004
|
+
"minimum": 1
|
|
1005
|
+
},
|
|
1006
|
+
"endLine": {
|
|
1007
|
+
"type": ["integer", "null"],
|
|
1008
|
+
"minimum": 1
|
|
1009
|
+
},
|
|
837
1010
|
"passageHash": { "$ref": "#/definitions/nullableSha256" },
|
|
838
1011
|
"sourceHash": { "$ref": "#/definitions/sha256" },
|
|
839
1012
|
"mirrorHash": { "$ref": "#/definitions/sha256" },
|
|
@@ -21,20 +21,28 @@
|
|
|
21
21
|
"evidence"
|
|
22
22
|
],
|
|
23
23
|
"properties": {
|
|
24
|
-
"schemaVersion": {
|
|
24
|
+
"schemaVersion": {
|
|
25
|
+
"enum": ["1.0", "1.1", "1.2"]
|
|
26
|
+
},
|
|
25
27
|
"coordinateSpace": { "const": "canonical_mirror" },
|
|
26
28
|
"capsuleId": { "$ref": "#/definitions/sha256" },
|
|
27
29
|
"operationStatus": { "const": "completed" },
|
|
28
|
-
"contentStatus": {
|
|
30
|
+
"contentStatus": {
|
|
31
|
+
"enum": ["unchanged", "stale", "missing"]
|
|
32
|
+
},
|
|
29
33
|
"contentCode": {
|
|
30
34
|
"enum": ["verified_unchanged", "content_stale", "content_missing"]
|
|
31
35
|
},
|
|
32
|
-
"rankingStatus": {
|
|
36
|
+
"rankingStatus": {
|
|
37
|
+
"enum": ["unchanged", "reranked", "unavailable"]
|
|
38
|
+
},
|
|
33
39
|
"rankingCode": {
|
|
34
40
|
"enum": ["ranking_unchanged", "ranking_changed", "ranking_unavailable"]
|
|
35
41
|
},
|
|
36
42
|
"currentFingerprints": { "$ref": "#/definitions/currentFingerprints" },
|
|
37
|
-
"fingerprintStatus": {
|
|
43
|
+
"fingerprintStatus": {
|
|
44
|
+
"enum": ["unchanged", "drifted"]
|
|
45
|
+
},
|
|
38
46
|
"fingerprintReasons": {
|
|
39
47
|
"oneOf": [
|
|
40
48
|
{
|
|
@@ -1111,7 +1119,9 @@
|
|
|
1111
1119
|
{
|
|
1112
1120
|
"if": { "properties": { "rankingStatus": { "const": "unavailable" } } },
|
|
1113
1121
|
"then": {
|
|
1114
|
-
"properties": {
|
|
1122
|
+
"properties": {
|
|
1123
|
+
"rankingCode": { "const": "ranking_unavailable" }
|
|
1124
|
+
}
|
|
1115
1125
|
}
|
|
1116
1126
|
},
|
|
1117
1127
|
{
|
|
@@ -1134,7 +1144,14 @@
|
|
|
1134
1144
|
"definitions": {
|
|
1135
1145
|
"sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
1136
1146
|
"nullableSha256": {
|
|
1137
|
-
"oneOf": [
|
|
1147
|
+
"oneOf": [
|
|
1148
|
+
{
|
|
1149
|
+
"$ref": "#/definitions/sha256"
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
"type": "null"
|
|
1153
|
+
}
|
|
1154
|
+
]
|
|
1138
1155
|
},
|
|
1139
1156
|
"currentFingerprints": {
|
|
1140
1157
|
"type": "object",
|
|
@@ -1199,7 +1216,9 @@
|
|
|
1199
1216
|
"properties": {
|
|
1200
1217
|
"evidenceId": { "$ref": "#/definitions/sha256" },
|
|
1201
1218
|
"uri": { "$ref": "#/definitions/gnoUri" },
|
|
1202
|
-
"contentStatus": {
|
|
1219
|
+
"contentStatus": {
|
|
1220
|
+
"enum": ["unchanged", "stale", "missing"]
|
|
1221
|
+
},
|
|
1203
1222
|
"contentCode": {
|
|
1204
1223
|
"enum": [
|
|
1205
1224
|
"verified_unchanged",
|
|
@@ -1213,7 +1232,9 @@
|
|
|
1213
1232
|
"mirror_missing"
|
|
1214
1233
|
]
|
|
1215
1234
|
},
|
|
1216
|
-
"rankingStatus": {
|
|
1235
|
+
"rankingStatus": {
|
|
1236
|
+
"enum": ["unchanged", "reranked", "unavailable"]
|
|
1237
|
+
},
|
|
1217
1238
|
"rankingCode": {
|
|
1218
1239
|
"enum": [
|
|
1219
1240
|
"ranking_unchanged",
|
|
@@ -1268,7 +1289,9 @@
|
|
|
1268
1289
|
"if": { "properties": { "contentStatus": { "const": "missing" } } },
|
|
1269
1290
|
"then": {
|
|
1270
1291
|
"properties": {
|
|
1271
|
-
"contentCode": {
|
|
1292
|
+
"contentCode": {
|
|
1293
|
+
"enum": ["source_missing", "mirror_missing"]
|
|
1294
|
+
},
|
|
1272
1295
|
"rankingStatus": { "const": "unavailable" },
|
|
1273
1296
|
"rankingCode": { "const": "ranking_unavailable" },
|
|
1274
1297
|
"currentRetrievalRank": { "type": "null" }
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"schemaVersion": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "gno-evidence-fixtures-v1"
|
|
8
|
+
},
|
|
9
|
+
"documents": {
|
|
10
|
+
"minItems": 1,
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"$ref": "#/definitions/__schema0"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"spans": {
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"$ref": "#/definitions/__schema3"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"cases": {
|
|
24
|
+
"minItems": 1,
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": {
|
|
27
|
+
"$ref": "#/definitions/__schema4"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"required": ["schemaVersion", "documents", "spans", "cases"],
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"definitions": {
|
|
34
|
+
"__schema0": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"uri": {
|
|
38
|
+
"$ref": "#/definitions/__schema1"
|
|
39
|
+
},
|
|
40
|
+
"title": {
|
|
41
|
+
"$ref": "#/definitions/__schema1"
|
|
42
|
+
},
|
|
43
|
+
"content": {
|
|
44
|
+
"$ref": "#/definitions/__schema1"
|
|
45
|
+
},
|
|
46
|
+
"sourceHash": {
|
|
47
|
+
"$ref": "#/definitions/__schema2"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": ["uri", "title", "content", "sourceHash"],
|
|
51
|
+
"additionalProperties": false
|
|
52
|
+
},
|
|
53
|
+
"__schema1": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"minLength": 1
|
|
56
|
+
},
|
|
57
|
+
"__schema2": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
60
|
+
},
|
|
61
|
+
"__schema3": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {
|
|
64
|
+
"id": {
|
|
65
|
+
"$ref": "#/definitions/__schema1"
|
|
66
|
+
},
|
|
67
|
+
"uri": {
|
|
68
|
+
"$ref": "#/definitions/__schema1"
|
|
69
|
+
},
|
|
70
|
+
"sourceHash": {
|
|
71
|
+
"$ref": "#/definitions/__schema2"
|
|
72
|
+
},
|
|
73
|
+
"startLine": {
|
|
74
|
+
"type": "integer",
|
|
75
|
+
"exclusiveMinimum": 0,
|
|
76
|
+
"maximum": 9007199254740991
|
|
77
|
+
},
|
|
78
|
+
"endLine": {
|
|
79
|
+
"type": "integer",
|
|
80
|
+
"exclusiveMinimum": 0,
|
|
81
|
+
"maximum": 9007199254740991
|
|
82
|
+
},
|
|
83
|
+
"spanHash": {
|
|
84
|
+
"$ref": "#/definitions/__schema2"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": [
|
|
88
|
+
"id",
|
|
89
|
+
"uri",
|
|
90
|
+
"sourceHash",
|
|
91
|
+
"startLine",
|
|
92
|
+
"endLine",
|
|
93
|
+
"spanHash"
|
|
94
|
+
],
|
|
95
|
+
"additionalProperties": false
|
|
96
|
+
},
|
|
97
|
+
"__schema4": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"caseId": {
|
|
101
|
+
"$ref": "#/definitions/__schema1"
|
|
102
|
+
},
|
|
103
|
+
"family": {
|
|
104
|
+
"$ref": "#/definitions/__schema1"
|
|
105
|
+
},
|
|
106
|
+
"query": {
|
|
107
|
+
"$ref": "#/definitions/__schema1"
|
|
108
|
+
},
|
|
109
|
+
"intent": {
|
|
110
|
+
"anyOf": [
|
|
111
|
+
{
|
|
112
|
+
"$ref": "#/definitions/__schema1"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "null"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"collection": {
|
|
120
|
+
"$ref": "#/definitions/__schema1"
|
|
121
|
+
},
|
|
122
|
+
"tokenBudget": {
|
|
123
|
+
"type": "integer",
|
|
124
|
+
"exclusiveMinimum": 0,
|
|
125
|
+
"maximum": 9007199254740991
|
|
126
|
+
},
|
|
127
|
+
"byteBudget": {
|
|
128
|
+
"type": "integer",
|
|
129
|
+
"exclusiveMinimum": 0,
|
|
130
|
+
"maximum": 9007199254740991
|
|
131
|
+
},
|
|
132
|
+
"requiredSets": {
|
|
133
|
+
"type": "array",
|
|
134
|
+
"items": {
|
|
135
|
+
"minItems": 1,
|
|
136
|
+
"type": "array",
|
|
137
|
+
"items": {
|
|
138
|
+
"$ref": "#/definitions/__schema1"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"expectAbstention": {
|
|
143
|
+
"type": "boolean"
|
|
144
|
+
},
|
|
145
|
+
"expectedValues": {
|
|
146
|
+
"type": "array",
|
|
147
|
+
"items": {
|
|
148
|
+
"$ref": "#/definitions/__schema1"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"mustCover": {
|
|
152
|
+
"type": "boolean"
|
|
153
|
+
},
|
|
154
|
+
"split": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"enum": ["development", "held-out"]
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"required": [
|
|
160
|
+
"caseId",
|
|
161
|
+
"family",
|
|
162
|
+
"query",
|
|
163
|
+
"intent",
|
|
164
|
+
"collection",
|
|
165
|
+
"tokenBudget",
|
|
166
|
+
"byteBudget",
|
|
167
|
+
"requiredSets",
|
|
168
|
+
"expectAbstention",
|
|
169
|
+
"expectedValues",
|
|
170
|
+
"mustCover",
|
|
171
|
+
"split"
|
|
172
|
+
],
|
|
173
|
+
"additionalProperties": false
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|