@gmickel/gno 1.17.0 → 1.19.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 +18 -4
- package/assets/skill/SKILL.md +44 -1
- package/assets/skill/mcp-reference.md +21 -0
- package/package.json +3 -2
- package/spec/AGENTS.md +83 -0
- package/spec/CLAUDE.md +83 -0
- package/spec/bench-fixture.schema.json +137 -0
- package/spec/cli.md +2894 -0
- package/spec/db/schema.sql +442 -0
- package/spec/evals-agentic.md +510 -0
- package/spec/evals.md +1106 -0
- package/spec/mcp.md +2229 -0
- package/spec/output-schemas/activation-verification.schema.json +515 -0
- package/spec/output-schemas/ask.schema.json +366 -0
- package/spec/output-schemas/backlinks.schema.json +131 -0
- package/spec/output-schemas/bench-result.schema.json +120 -0
- package/spec/output-schemas/capture-receipt.schema.json +143 -0
- package/spec/output-schemas/collection-list.schema.json +45 -0
- package/spec/output-schemas/context-capsule-v1.schema.json +691 -0
- package/spec/output-schemas/context-capsule-verification.schema.json +1338 -0
- package/spec/output-schemas/context-list.schema.json +21 -0
- package/spec/output-schemas/doctor.schema.json +313 -0
- package/spec/output-schemas/error.schema.json +30 -0
- package/spec/output-schemas/expansion.schema.json +37 -0
- package/spec/output-schemas/get.schema.json +140 -0
- package/spec/output-schemas/graph-query.schema.json +99 -0
- package/spec/output-schemas/graph.schema.json +371 -0
- package/spec/output-schemas/links-list.schema.json +186 -0
- package/spec/output-schemas/mcp-add-collection-result.schema.json +23 -0
- package/spec/output-schemas/mcp-capture-result.schema.json +152 -0
- package/spec/output-schemas/mcp-http-error.schema.json +30 -0
- package/spec/output-schemas/mcp-job-list.schema.json +58 -0
- package/spec/output-schemas/mcp-job-status.schema.json +224 -0
- package/spec/output-schemas/mcp-remove-result.schema.json +39 -0
- package/spec/output-schemas/mcp-sync-result.schema.json +41 -0
- package/spec/output-schemas/mcp-tag-result.schema.json +33 -0
- package/spec/output-schemas/models-list.schema.json +93 -0
- package/spec/output-schemas/multi-get.schema.json +103 -0
- package/spec/output-schemas/process-status.schema.json +119 -0
- package/spec/output-schemas/query-diagnose.schema.json +123 -0
- package/spec/output-schemas/resident-status.schema.json +154 -0
- package/spec/output-schemas/retrieval-trace-common.schema.json +492 -0
- package/spec/output-schemas/retrieval-trace-delete.schema.json +16 -0
- package/spec/output-schemas/retrieval-trace-export.schema.json +61 -0
- package/spec/output-schemas/retrieval-trace-filters.schema.json +139 -0
- package/spec/output-schemas/retrieval-trace-judgment.schema.json +15 -0
- package/spec/output-schemas/retrieval-trace-list.schema.json +18 -0
- package/spec/output-schemas/retrieval-trace-payloads.schema.json +178 -0
- package/spec/output-schemas/retrieval-trace-purge.schema.json +31 -0
- package/spec/output-schemas/retrieval-trace-qrels.schema.json +303 -0
- package/spec/output-schemas/retrieval-trace-replay.schema.json +286 -0
- package/spec/output-schemas/retrieval-trace-show.schema.json +69 -0
- package/spec/output-schemas/retrieval-trace-summary.schema.json +65 -0
- package/spec/output-schemas/search-result.schema.json +154 -0
- package/spec/output-schemas/search-results.schema.json +338 -0
- package/spec/output-schemas/similar.schema.json +84 -0
- package/spec/output-schemas/status.schema.json +676 -0
- package/spec/output-schemas/tags-list.schema.json +48 -0
- package/src/app/context-runtime-types.ts +3 -0
- package/src/app/context-runtime.ts +15 -1
- package/src/cli/commands/ask.ts +106 -36
- package/src/cli/commands/context-build.ts +56 -9
- package/src/cli/commands/daemon.ts +69 -2
- package/src/cli/commands/get.ts +64 -3
- package/src/cli/commands/models/pull.ts +13 -3
- package/src/cli/commands/query.ts +62 -23
- package/src/cli/commands/replay.ts +140 -0
- package/src/cli/commands/search.ts +48 -3
- package/src/cli/commands/shared.ts +3 -1
- package/src/cli/commands/status.ts +2 -0
- package/src/cli/commands/trace.ts +200 -0
- package/src/cli/commands/vsearch.ts +75 -53
- package/src/cli/detach.ts +37 -20
- package/src/cli/program.ts +329 -27
- package/src/config/index.ts +12 -0
- package/src/config/retrieval-traces.ts +56 -0
- package/src/config/types.ts +41 -0
- package/src/core/context-compiler.ts +11 -4
- package/src/core/job-manager.ts +19 -0
- package/src/core/mutation-generations.ts +33 -0
- package/src/core/retrieval-qrels.ts +405 -0
- package/src/core/retrieval-replay-candidate.ts +368 -0
- package/src/core/retrieval-replay-types.ts +109 -0
- package/src/core/retrieval-replay-validation.ts +89 -0
- package/src/core/retrieval-replay.ts +441 -0
- package/src/core/retrieval-trace-evidence-origin.ts +175 -0
- package/src/core/retrieval-trace-export.ts +113 -0
- package/src/core/retrieval-trace-filter-normalization.ts +27 -0
- package/src/core/retrieval-trace-filters.ts +19 -0
- package/src/core/retrieval-trace-management-helpers.ts +247 -0
- package/src/core/retrieval-trace-management-types.ts +132 -0
- package/src/core/retrieval-trace-management.ts +422 -0
- package/src/core/retrieval-trace-request.ts +141 -0
- package/src/core/retrieval-trace-session.ts +494 -0
- package/src/core/retrieval-trace.ts +472 -0
- package/src/llm/cache.ts +13 -3
- package/src/llm/nodeLlamaCpp/adapter.ts +10 -1
- package/src/llm/nodeLlamaCpp/lifecycle.ts +71 -0
- package/src/mcp/context.ts +161 -0
- package/src/mcp/http-security.ts +477 -0
- package/src/mcp/http-session.ts +272 -0
- package/src/mcp/http-transport.ts +370 -0
- package/src/mcp/resources/index.ts +141 -134
- package/src/mcp/server.ts +19 -79
- package/src/mcp/tools/add-collection.ts +3 -1
- package/src/mcp/tools/capture.ts +3 -0
- package/src/mcp/tools/clear-collection-embeddings.ts +2 -0
- package/src/mcp/tools/context.ts +68 -16
- package/src/mcp/tools/embed.ts +62 -52
- package/src/mcp/tools/get.ts +35 -1
- package/src/mcp/tools/index-cmd.ts +88 -74
- package/src/mcp/tools/index.ts +96 -2
- package/src/mcp/tools/query.ts +95 -64
- package/src/mcp/tools/remove-collection.ts +2 -0
- package/src/mcp/tools/search.ts +36 -13
- package/src/mcp/tools/status.ts +11 -0
- package/src/mcp/tools/sync.ts +16 -14
- package/src/mcp/tools/trace.ts +143 -0
- package/src/mcp/tools/vsearch.ts +71 -38
- package/src/mcp/tools/workspace-write.ts +7 -3
- package/src/pipeline/answer.ts +167 -26
- package/src/pipeline/graph-retrieval.ts +15 -1
- package/src/pipeline/hybrid.ts +151 -43
- package/src/pipeline/search.ts +36 -3
- package/src/pipeline/trace-metadata.ts +47 -0
- package/src/pipeline/types.ts +43 -0
- package/src/pipeline/vsearch.ts +101 -38
- package/src/sdk/client.ts +380 -71
- package/src/sdk/documents.ts +48 -1
- package/src/sdk/index.ts +17 -0
- package/src/sdk/types.ts +28 -0
- package/src/serve/background-runtime.ts +12 -212
- package/src/serve/context-capsule.ts +67 -8
- package/src/serve/embed-scheduler.ts +74 -43
- package/src/serve/index.ts +9 -0
- package/src/serve/jobs.ts +78 -80
- package/src/serve/public/app.tsx +12 -1
- package/src/serve/public/components/HealthCenter.tsx +74 -1
- package/src/serve/public/globals.built.css +1 -1
- package/src/serve/public/lib/workspace-tabs.ts +2 -0
- package/src/serve/public/pages/Dashboard.tsx +11 -0
- package/src/serve/public/pages/TraceHistory.tsx +478 -0
- package/src/serve/public/pages/trace-history-detail.tsx +224 -0
- package/src/serve/resident-admission.ts +159 -0
- package/src/serve/resident-background-work.ts +39 -0
- package/src/serve/resident-request.ts +55 -0
- package/src/serve/resident-runtime.ts +490 -0
- package/src/serve/resident-status.ts +96 -0
- package/src/serve/retrieval-trace.ts +28 -0
- package/src/serve/routes/api.ts +629 -239
- package/src/serve/routes/mcp.ts +69 -0
- package/src/serve/routes/traces.ts +156 -0
- package/src/serve/server.ts +276 -37
- package/src/serve/status-model.ts +51 -0
- package/src/serve/status.ts +5 -0
- package/src/store/index.ts +31 -0
- package/src/store/migrations/014-retrieval-traces.ts +303 -0
- package/src/store/migrations/index.ts +2 -0
- package/src/store/retrieval-trace-codec.ts +384 -0
- package/src/store/sqlite/adapter.ts +179 -10
- package/src/store/sqlite/retrieval-trace-management-store.ts +341 -0
- package/src/store/sqlite/retrieval-trace-retention.ts +349 -0
- package/src/store/sqlite/retrieval-trace-rows.ts +267 -0
- package/src/store/sqlite/retrieval-trace-store.ts +515 -0
- package/src/store/types.ts +297 -0
- package/src/store/vector/sqlite-vec.ts +76 -1
- package/src/store/vector/types.ts +1 -1
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/retrieval-trace-common@1.0",
|
|
4
|
+
"title": "GNO Retrieval Trace Common Types",
|
|
5
|
+
"definitions": {
|
|
6
|
+
"sha256": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
9
|
+
},
|
|
10
|
+
"textShape": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": ["characters", "terms"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"characters": { "type": "integer", "minimum": 0 },
|
|
16
|
+
"terms": { "type": "integer", "minimum": 0 }
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"fingerprints": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"required": ["pipeline", "model", "config", "index"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"pipeline": { "$ref": "#/definitions/sha256" },
|
|
25
|
+
"model": { "$ref": "#/definitions/sha256" },
|
|
26
|
+
"config": { "$ref": "#/definitions/sha256" },
|
|
27
|
+
"index": { "$ref": "#/definitions/sha256" }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"summary": { "$ref": "gno://schemas/retrieval-trace-summary@1.0" },
|
|
31
|
+
"trace": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"required": [
|
|
35
|
+
"traceId",
|
|
36
|
+
"schemaVersion",
|
|
37
|
+
"redactionMode",
|
|
38
|
+
"replayCapable",
|
|
39
|
+
"status",
|
|
40
|
+
"queryText",
|
|
41
|
+
"queryDigest",
|
|
42
|
+
"queryShape",
|
|
43
|
+
"goalText",
|
|
44
|
+
"goalDigest",
|
|
45
|
+
"goalShape",
|
|
46
|
+
"filters",
|
|
47
|
+
"fingerprints",
|
|
48
|
+
"createdAtMs",
|
|
49
|
+
"updatedAtMs",
|
|
50
|
+
"expiresAtMs",
|
|
51
|
+
"byteSize",
|
|
52
|
+
"creationDigest"
|
|
53
|
+
],
|
|
54
|
+
"properties": {
|
|
55
|
+
"traceId": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
56
|
+
"schemaVersion": { "const": "1.0" },
|
|
57
|
+
"redactionMode": { "enum": ["metadata", "replay"] },
|
|
58
|
+
"replayCapable": { "type": "boolean" },
|
|
59
|
+
"status": {
|
|
60
|
+
"enum": ["open", "completed", "partial", "failed", "cancelled"]
|
|
61
|
+
},
|
|
62
|
+
"queryText": { "type": ["string", "null"] },
|
|
63
|
+
"queryDigest": {
|
|
64
|
+
"anyOf": [{ "$ref": "#/definitions/sha256" }, { "type": "null" }]
|
|
65
|
+
},
|
|
66
|
+
"queryShape": { "$ref": "#/definitions/textShape" },
|
|
67
|
+
"goalText": { "type": ["string", "null"] },
|
|
68
|
+
"goalDigest": {
|
|
69
|
+
"anyOf": [{ "$ref": "#/definitions/sha256" }, { "type": "null" }]
|
|
70
|
+
},
|
|
71
|
+
"goalShape": { "$ref": "#/definitions/textShape" },
|
|
72
|
+
"filters": {
|
|
73
|
+
"oneOf": [
|
|
74
|
+
{
|
|
75
|
+
"$ref": "gno://schemas/retrieval-trace-filters@1.0#/definitions/filters"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"$ref": "gno://schemas/retrieval-trace-filters@1.0#/definitions/metadataFilters"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"fingerprints": { "$ref": "#/definitions/fingerprints" },
|
|
83
|
+
"createdAtMs": { "type": "integer", "minimum": 0 },
|
|
84
|
+
"updatedAtMs": { "type": "integer", "minimum": 0 },
|
|
85
|
+
"expiresAtMs": { "type": "integer", "minimum": 0 },
|
|
86
|
+
"byteSize": { "type": "integer", "minimum": 0 },
|
|
87
|
+
"creationDigest": { "$ref": "#/definitions/sha256" }
|
|
88
|
+
},
|
|
89
|
+
"allOf": [
|
|
90
|
+
{
|
|
91
|
+
"if": {
|
|
92
|
+
"properties": { "redactionMode": { "const": "metadata" } },
|
|
93
|
+
"required": ["redactionMode"]
|
|
94
|
+
},
|
|
95
|
+
"then": {
|
|
96
|
+
"properties": {
|
|
97
|
+
"filters": {
|
|
98
|
+
"$ref": "gno://schemas/retrieval-trace-filters@1.0#/definitions/metadataFilters"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"if": {
|
|
105
|
+
"properties": { "redactionMode": { "const": "replay" } },
|
|
106
|
+
"required": ["redactionMode"]
|
|
107
|
+
},
|
|
108
|
+
"then": {
|
|
109
|
+
"properties": {
|
|
110
|
+
"filters": {
|
|
111
|
+
"$ref": "gno://schemas/retrieval-trace-filters@1.0#/definitions/filters"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
"run": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": false,
|
|
121
|
+
"required": [
|
|
122
|
+
"runId",
|
|
123
|
+
"traceId",
|
|
124
|
+
"idempotencyKey",
|
|
125
|
+
"kind",
|
|
126
|
+
"payload",
|
|
127
|
+
"createdAtMs",
|
|
128
|
+
"payloadBytes",
|
|
129
|
+
"canonicalDigest"
|
|
130
|
+
],
|
|
131
|
+
"properties": {
|
|
132
|
+
"runId": { "type": "string" },
|
|
133
|
+
"traceId": { "type": "string" },
|
|
134
|
+
"idempotencyKey": { "type": "string" },
|
|
135
|
+
"kind": { "enum": ["retrieval", "context", "get"] },
|
|
136
|
+
"payload": {
|
|
137
|
+
"oneOf": [
|
|
138
|
+
{
|
|
139
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/retrievalPayload"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/contextPayload"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/evidencePayload"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
"createdAtMs": { "type": "integer", "minimum": 0 },
|
|
150
|
+
"payloadBytes": { "type": "integer", "minimum": 0 },
|
|
151
|
+
"canonicalDigest": { "$ref": "#/definitions/sha256" }
|
|
152
|
+
},
|
|
153
|
+
"allOf": [
|
|
154
|
+
{
|
|
155
|
+
"if": {
|
|
156
|
+
"properties": { "kind": { "const": "retrieval" } },
|
|
157
|
+
"required": ["kind"]
|
|
158
|
+
},
|
|
159
|
+
"then": {
|
|
160
|
+
"properties": {
|
|
161
|
+
"payload": {
|
|
162
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/retrievalPayload"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"if": {
|
|
169
|
+
"properties": { "kind": { "const": "context" } },
|
|
170
|
+
"required": ["kind"]
|
|
171
|
+
},
|
|
172
|
+
"then": {
|
|
173
|
+
"properties": {
|
|
174
|
+
"payload": {
|
|
175
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/contextPayload"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"if": {
|
|
182
|
+
"properties": { "kind": { "const": "get" } },
|
|
183
|
+
"required": ["kind"]
|
|
184
|
+
},
|
|
185
|
+
"then": {
|
|
186
|
+
"properties": {
|
|
187
|
+
"payload": {
|
|
188
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/evidencePayload"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
"event": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"additionalProperties": false,
|
|
198
|
+
"required": [
|
|
199
|
+
"eventId",
|
|
200
|
+
"traceId",
|
|
201
|
+
"runId",
|
|
202
|
+
"idempotencyKey",
|
|
203
|
+
"kind",
|
|
204
|
+
"payload",
|
|
205
|
+
"createdAtMs",
|
|
206
|
+
"payloadBytes",
|
|
207
|
+
"canonicalDigest"
|
|
208
|
+
],
|
|
209
|
+
"properties": {
|
|
210
|
+
"eventId": { "type": "string" },
|
|
211
|
+
"traceId": { "type": "string" },
|
|
212
|
+
"runId": { "type": ["string", "null"] },
|
|
213
|
+
"idempotencyKey": { "type": "string" },
|
|
214
|
+
"kind": {
|
|
215
|
+
"enum": [
|
|
216
|
+
"query",
|
|
217
|
+
"retrieval",
|
|
218
|
+
"context",
|
|
219
|
+
"get",
|
|
220
|
+
"open",
|
|
221
|
+
"cite",
|
|
222
|
+
"pin",
|
|
223
|
+
"capability",
|
|
224
|
+
"complete"
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
"payload": {
|
|
228
|
+
"oneOf": [
|
|
229
|
+
{
|
|
230
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/queryPayload"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/retrievalPayload"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/contextPayload"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/evidencePayload"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/capabilityPayload"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/completePayload"
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
"createdAtMs": { "type": "integer", "minimum": 0 },
|
|
250
|
+
"payloadBytes": { "type": "integer", "minimum": 0 },
|
|
251
|
+
"canonicalDigest": { "$ref": "#/definitions/sha256" }
|
|
252
|
+
},
|
|
253
|
+
"allOf": [
|
|
254
|
+
{
|
|
255
|
+
"if": {
|
|
256
|
+
"properties": { "kind": { "const": "query" } },
|
|
257
|
+
"required": ["kind"]
|
|
258
|
+
},
|
|
259
|
+
"then": {
|
|
260
|
+
"properties": {
|
|
261
|
+
"payload": {
|
|
262
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/queryPayload"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"if": {
|
|
269
|
+
"properties": { "kind": { "const": "retrieval" } },
|
|
270
|
+
"required": ["kind"]
|
|
271
|
+
},
|
|
272
|
+
"then": {
|
|
273
|
+
"properties": {
|
|
274
|
+
"payload": {
|
|
275
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/retrievalPayload"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"if": {
|
|
282
|
+
"properties": { "kind": { "const": "context" } },
|
|
283
|
+
"required": ["kind"]
|
|
284
|
+
},
|
|
285
|
+
"then": {
|
|
286
|
+
"properties": {
|
|
287
|
+
"payload": {
|
|
288
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/contextPayload"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"if": {
|
|
295
|
+
"properties": {
|
|
296
|
+
"kind": { "enum": ["get", "open", "cite", "pin"] }
|
|
297
|
+
},
|
|
298
|
+
"required": ["kind"]
|
|
299
|
+
},
|
|
300
|
+
"then": {
|
|
301
|
+
"properties": {
|
|
302
|
+
"payload": {
|
|
303
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/evidencePayload"
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"if": {
|
|
310
|
+
"properties": { "kind": { "const": "capability" } },
|
|
311
|
+
"required": ["kind"]
|
|
312
|
+
},
|
|
313
|
+
"then": {
|
|
314
|
+
"properties": {
|
|
315
|
+
"payload": {
|
|
316
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/capabilityPayload"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"if": {
|
|
323
|
+
"properties": { "kind": { "const": "complete" } },
|
|
324
|
+
"required": ["kind"]
|
|
325
|
+
},
|
|
326
|
+
"then": {
|
|
327
|
+
"properties": {
|
|
328
|
+
"payload": {
|
|
329
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/completePayload"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
]
|
|
335
|
+
},
|
|
336
|
+
"judgment": {
|
|
337
|
+
"type": "object",
|
|
338
|
+
"additionalProperties": false,
|
|
339
|
+
"required": [
|
|
340
|
+
"judgmentId",
|
|
341
|
+
"traceId",
|
|
342
|
+
"runId",
|
|
343
|
+
"idempotencyKey",
|
|
344
|
+
"label",
|
|
345
|
+
"targetKind",
|
|
346
|
+
"targetRef",
|
|
347
|
+
"target",
|
|
348
|
+
"createdAtMs",
|
|
349
|
+
"targetBytes",
|
|
350
|
+
"canonicalDigest"
|
|
351
|
+
],
|
|
352
|
+
"properties": {
|
|
353
|
+
"judgmentId": { "type": "string" },
|
|
354
|
+
"traceId": { "type": "string" },
|
|
355
|
+
"runId": { "type": ["string", "null"] },
|
|
356
|
+
"idempotencyKey": { "type": "string" },
|
|
357
|
+
"label": { "enum": ["relevant", "irrelevant", "missing_expected"] },
|
|
358
|
+
"targetKind": { "enum": ["document", "chunk", "span", "query"] },
|
|
359
|
+
"targetRef": { "type": "string" },
|
|
360
|
+
"target": {
|
|
361
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/judgmentTarget"
|
|
362
|
+
},
|
|
363
|
+
"createdAtMs": { "type": "integer", "minimum": 0 },
|
|
364
|
+
"targetBytes": { "type": "integer", "minimum": 0 },
|
|
365
|
+
"canonicalDigest": { "$ref": "#/definitions/sha256" }
|
|
366
|
+
},
|
|
367
|
+
"allOf": [
|
|
368
|
+
{
|
|
369
|
+
"if": {
|
|
370
|
+
"properties": { "targetKind": { "const": "document" } },
|
|
371
|
+
"required": ["targetKind"]
|
|
372
|
+
},
|
|
373
|
+
"then": {
|
|
374
|
+
"properties": {
|
|
375
|
+
"target": {
|
|
376
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/documentTarget"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"if": {
|
|
383
|
+
"properties": { "targetKind": { "const": "chunk" } },
|
|
384
|
+
"required": ["targetKind"]
|
|
385
|
+
},
|
|
386
|
+
"then": {
|
|
387
|
+
"properties": {
|
|
388
|
+
"target": {
|
|
389
|
+
"allOf": [
|
|
390
|
+
{
|
|
391
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/judgmentTarget"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"type": "object",
|
|
395
|
+
"properties": { "seq": {} },
|
|
396
|
+
"required": ["seq"]
|
|
397
|
+
}
|
|
398
|
+
]
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"if": {
|
|
405
|
+
"properties": { "targetKind": { "const": "span" } },
|
|
406
|
+
"required": ["targetKind"]
|
|
407
|
+
},
|
|
408
|
+
"then": {
|
|
409
|
+
"properties": {
|
|
410
|
+
"target": {
|
|
411
|
+
"allOf": [
|
|
412
|
+
{
|
|
413
|
+
"$ref": "gno://schemas/retrieval-trace-payloads@1.0#/definitions/judgmentTarget"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"type": "object",
|
|
417
|
+
"properties": {
|
|
418
|
+
"startLine": {},
|
|
419
|
+
"endLine": {}
|
|
420
|
+
},
|
|
421
|
+
"required": ["startLine", "endLine"]
|
|
422
|
+
}
|
|
423
|
+
]
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
]
|
|
429
|
+
},
|
|
430
|
+
"exportRow": {
|
|
431
|
+
"type": "object",
|
|
432
|
+
"additionalProperties": false,
|
|
433
|
+
"required": [
|
|
434
|
+
"exportId",
|
|
435
|
+
"traceId",
|
|
436
|
+
"format",
|
|
437
|
+
"artifactHash",
|
|
438
|
+
"createdAtMs"
|
|
439
|
+
],
|
|
440
|
+
"properties": {
|
|
441
|
+
"exportId": { "type": "string" },
|
|
442
|
+
"traceId": { "type": "string" },
|
|
443
|
+
"format": { "enum": ["agentic-receipt", "qrels"] },
|
|
444
|
+
"artifactHash": { "$ref": "#/definitions/sha256" },
|
|
445
|
+
"createdAtMs": { "type": "integer", "minimum": 0 }
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
"manifest": {
|
|
449
|
+
"type": "object",
|
|
450
|
+
"additionalProperties": false,
|
|
451
|
+
"required": [
|
|
452
|
+
"exportId",
|
|
453
|
+
"traceIds",
|
|
454
|
+
"format",
|
|
455
|
+
"artifactHash",
|
|
456
|
+
"createdAtMs"
|
|
457
|
+
],
|
|
458
|
+
"properties": {
|
|
459
|
+
"exportId": { "type": "string" },
|
|
460
|
+
"traceIds": {
|
|
461
|
+
"type": "array",
|
|
462
|
+
"minItems": 1,
|
|
463
|
+
"uniqueItems": true,
|
|
464
|
+
"items": { "type": "string" }
|
|
465
|
+
},
|
|
466
|
+
"format": { "enum": ["agentic-receipt", "qrels"] },
|
|
467
|
+
"artifactHash": { "$ref": "#/definitions/sha256" },
|
|
468
|
+
"createdAtMs": { "type": "integer", "minimum": 0 }
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"counts": {
|
|
472
|
+
"type": "object",
|
|
473
|
+
"additionalProperties": false,
|
|
474
|
+
"required": [
|
|
475
|
+
"traces",
|
|
476
|
+
"runs",
|
|
477
|
+
"events",
|
|
478
|
+
"judgments",
|
|
479
|
+
"exports",
|
|
480
|
+
"exportLinks"
|
|
481
|
+
],
|
|
482
|
+
"properties": {
|
|
483
|
+
"traces": { "type": "integer", "minimum": 0 },
|
|
484
|
+
"runs": { "type": "integer", "minimum": 0 },
|
|
485
|
+
"events": { "type": "integer", "minimum": 0 },
|
|
486
|
+
"judgments": { "type": "integer", "minimum": 0 },
|
|
487
|
+
"exports": { "type": "integer", "minimum": 0 },
|
|
488
|
+
"exportLinks": { "type": "integer", "minimum": 0 }
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/retrieval-trace-delete@1.0",
|
|
4
|
+
"title": "GNO Retrieval Trace Delete",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "traceId", "deleted", "counts"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"traceId": { "type": "string" },
|
|
11
|
+
"deleted": { "type": "boolean" },
|
|
12
|
+
"counts": {
|
|
13
|
+
"$ref": "gno://schemas/retrieval-trace-common@1.0#/definitions/counts"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/retrieval-trace-export@1.0",
|
|
4
|
+
"title": "GNO Retrieval Trace Export",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "result", "manifest", "artifact"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"result": { "enum": ["inserted", "duplicate"] },
|
|
11
|
+
"manifest": {
|
|
12
|
+
"$ref": "gno://schemas/retrieval-trace-common@1.0#/definitions/manifest"
|
|
13
|
+
},
|
|
14
|
+
"artifact": {
|
|
15
|
+
"oneOf": [
|
|
16
|
+
{
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["schemaVersion", "format", "traces"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"schemaVersion": { "const": "1.0" },
|
|
22
|
+
"format": { "const": "agentic-receipt" },
|
|
23
|
+
"traces": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"minItems": 1,
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"required": ["trace", "runs", "events", "judgments"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"trace": {
|
|
32
|
+
"$ref": "gno://schemas/retrieval-trace-common@1.0#/definitions/trace"
|
|
33
|
+
},
|
|
34
|
+
"runs": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": {
|
|
37
|
+
"$ref": "gno://schemas/retrieval-trace-common@1.0#/definitions/run"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"events": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": {
|
|
43
|
+
"$ref": "gno://schemas/retrieval-trace-common@1.0#/definitions/event"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"judgments": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": {
|
|
49
|
+
"$ref": "gno://schemas/retrieval-trace-common@1.0#/definitions/judgment"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{ "$ref": "gno://schemas/retrieval-trace-qrels@1.0" }
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|