@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,139 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/retrieval-trace-filters@1.0",
|
|
4
|
+
"title": "GNO Retrieval Trace Filters",
|
|
5
|
+
"definitions": {
|
|
6
|
+
"queryMode": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": ["mode", "text"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"mode": { "enum": ["term", "intent", "hyde"] },
|
|
12
|
+
"text": { "type": "string", "maxLength": 8192 }
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"filters": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"properties": {
|
|
19
|
+
"limit": { "type": "integer", "minimum": 1 },
|
|
20
|
+
"minScore": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
21
|
+
"collection": { "type": "string", "maxLength": 256 },
|
|
22
|
+
"collections": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"maxItems": 1000,
|
|
25
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 256 }
|
|
26
|
+
},
|
|
27
|
+
"lang": { "type": "string", "maxLength": 64 },
|
|
28
|
+
"full": { "type": "boolean" },
|
|
29
|
+
"lineNumbers": { "type": "boolean" },
|
|
30
|
+
"tagsAll": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"maxItems": 1000,
|
|
33
|
+
"items": { "type": "string", "maxLength": 512 }
|
|
34
|
+
},
|
|
35
|
+
"tagsAny": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"maxItems": 1000,
|
|
38
|
+
"items": { "type": "string", "maxLength": 512 }
|
|
39
|
+
},
|
|
40
|
+
"since": { "type": "string", "maxLength": 128 },
|
|
41
|
+
"until": { "type": "string", "maxLength": 128 },
|
|
42
|
+
"categories": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"maxItems": 1000,
|
|
45
|
+
"items": { "type": "string", "maxLength": 512 }
|
|
46
|
+
},
|
|
47
|
+
"author": { "type": "string", "maxLength": 1024 },
|
|
48
|
+
"intent": { "type": "string", "maxLength": 8192 },
|
|
49
|
+
"exclude": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"maxItems": 1000,
|
|
52
|
+
"items": { "type": "string", "maxLength": 1024 }
|
|
53
|
+
},
|
|
54
|
+
"noExpand": { "type": "boolean" },
|
|
55
|
+
"noRerank": { "type": "boolean" },
|
|
56
|
+
"candidateLimit": { "type": "integer", "minimum": 1 },
|
|
57
|
+
"explain": { "type": "boolean" },
|
|
58
|
+
"graph": { "type": "boolean" },
|
|
59
|
+
"noGraph": { "type": "boolean" },
|
|
60
|
+
"queryLanguageHint": { "type": "string", "maxLength": 64 },
|
|
61
|
+
"queryModes": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"maxItems": 100,
|
|
64
|
+
"items": { "$ref": "#/definitions/queryMode" }
|
|
65
|
+
},
|
|
66
|
+
"uriPrefix": { "type": "string", "maxLength": 4096 }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"metadataShape": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": ["type"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"type": {
|
|
75
|
+
"enum": ["null", "array", "object", "string", "number", "boolean"]
|
|
76
|
+
},
|
|
77
|
+
"count": { "type": "integer", "minimum": 0 },
|
|
78
|
+
"itemTypes": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"uniqueItems": true,
|
|
81
|
+
"items": {
|
|
82
|
+
"enum": ["null", "array", "object", "string", "number", "boolean"]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"fields": { "$ref": "#/definitions/metadataFilterFields" }
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"metadataFilterFields": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"properties": {
|
|
92
|
+
"limit": { "$ref": "#/definitions/metadataShape" },
|
|
93
|
+
"minScore": { "$ref": "#/definitions/metadataShape" },
|
|
94
|
+
"collection": { "$ref": "#/definitions/metadataShape" },
|
|
95
|
+
"collections": { "$ref": "#/definitions/metadataShape" },
|
|
96
|
+
"lang": { "$ref": "#/definitions/metadataShape" },
|
|
97
|
+
"full": { "$ref": "#/definitions/metadataShape" },
|
|
98
|
+
"lineNumbers": { "$ref": "#/definitions/metadataShape" },
|
|
99
|
+
"tagsAll": { "$ref": "#/definitions/metadataShape" },
|
|
100
|
+
"tagsAny": { "$ref": "#/definitions/metadataShape" },
|
|
101
|
+
"since": { "$ref": "#/definitions/metadataShape" },
|
|
102
|
+
"until": { "$ref": "#/definitions/metadataShape" },
|
|
103
|
+
"categories": { "$ref": "#/definitions/metadataShape" },
|
|
104
|
+
"author": { "$ref": "#/definitions/metadataShape" },
|
|
105
|
+
"intent": { "$ref": "#/definitions/metadataShape" },
|
|
106
|
+
"exclude": { "$ref": "#/definitions/metadataShape" },
|
|
107
|
+
"noExpand": { "$ref": "#/definitions/metadataShape" },
|
|
108
|
+
"noRerank": { "$ref": "#/definitions/metadataShape" },
|
|
109
|
+
"candidateLimit": { "$ref": "#/definitions/metadataShape" },
|
|
110
|
+
"explain": { "$ref": "#/definitions/metadataShape" },
|
|
111
|
+
"graph": { "$ref": "#/definitions/metadataShape" },
|
|
112
|
+
"noGraph": { "$ref": "#/definitions/metadataShape" },
|
|
113
|
+
"queryLanguageHint": { "$ref": "#/definitions/metadataShape" },
|
|
114
|
+
"queryModes": { "$ref": "#/definitions/metadataShape" },
|
|
115
|
+
"uriPrefix": { "$ref": "#/definitions/metadataShape" }
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"metadataFilters": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": false,
|
|
121
|
+
"required": ["shape"],
|
|
122
|
+
"properties": {
|
|
123
|
+
"shape": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": ["type", "fields"],
|
|
127
|
+
"properties": {
|
|
128
|
+
"type": { "const": "object" },
|
|
129
|
+
"fields": { "$ref": "#/definitions/metadataFilterFields" }
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"oneOf": [
|
|
136
|
+
{ "$ref": "#/definitions/filters" },
|
|
137
|
+
{ "$ref": "#/definitions/metadataFilters" }
|
|
138
|
+
]
|
|
139
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/retrieval-trace-judgment@1.0",
|
|
4
|
+
"title": "GNO Retrieval Trace Judgment",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "result", "judgment"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"result": { "enum": ["inserted", "duplicate"] },
|
|
11
|
+
"judgment": {
|
|
12
|
+
"$ref": "gno://schemas/retrieval-trace-common@1.0#/definitions/judgment"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/retrieval-trace-list@1.0",
|
|
4
|
+
"title": "GNO Retrieval Trace List",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "traces", "nextCursor"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"traces": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"$ref": "gno://schemas/retrieval-trace-common@1.0#/definitions/summary"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"nextCursor": { "type": ["string", "null"] }
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/retrieval-trace-payloads@1.0",
|
|
4
|
+
"title": "GNO Retrieval Trace Payloads",
|
|
5
|
+
"definitions": {
|
|
6
|
+
"sha256": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
9
|
+
},
|
|
10
|
+
"identity": {
|
|
11
|
+
"anyOf": [
|
|
12
|
+
{
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": { "docid": {} },
|
|
15
|
+
"required": ["docid"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": { "sourceHash": {} },
|
|
20
|
+
"required": ["sourceHash"]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": { "mirrorHash": {} },
|
|
25
|
+
"required": ["mirrorHash"]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "object",
|
|
29
|
+
"properties": { "uri": {} },
|
|
30
|
+
"required": ["uri"]
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"evidenceRef": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"allOf": [{ "$ref": "#/definitions/identity" }],
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"startLine": ["endLine"],
|
|
40
|
+
"endLine": ["startLine"]
|
|
41
|
+
},
|
|
42
|
+
"properties": {
|
|
43
|
+
"docid": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
44
|
+
"sourceHash": { "$ref": "#/definitions/sha256" },
|
|
45
|
+
"mirrorHash": { "$ref": "#/definitions/sha256" },
|
|
46
|
+
"uri": { "type": "string", "pattern": "^gno://", "maxLength": 4096 },
|
|
47
|
+
"seq": { "type": "integer", "minimum": 0 },
|
|
48
|
+
"startLine": { "type": "integer", "minimum": 1 },
|
|
49
|
+
"endLine": { "type": "integer", "minimum": 1 },
|
|
50
|
+
"score": { "type": "number" },
|
|
51
|
+
"rank": { "type": "integer", "minimum": 1 },
|
|
52
|
+
"plannerRank": { "type": "integer", "minimum": 1 },
|
|
53
|
+
"passageHash": { "$ref": "#/definitions/sha256" },
|
|
54
|
+
"sources": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"maxItems": 16,
|
|
57
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
58
|
+
},
|
|
59
|
+
"graphExpanded": { "type": "boolean" }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"evidencePayload": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"required": ["evidence"],
|
|
66
|
+
"properties": {
|
|
67
|
+
"evidence": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"maxItems": 10000,
|
|
70
|
+
"items": { "$ref": "#/definitions/evidenceRef" }
|
|
71
|
+
},
|
|
72
|
+
"latencyMs": { "type": "number", "minimum": 0 }
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"retrievalPayload": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"additionalProperties": false,
|
|
78
|
+
"required": ["ranked"],
|
|
79
|
+
"properties": {
|
|
80
|
+
"ranked": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"maxItems": 10000,
|
|
83
|
+
"items": { "$ref": "#/definitions/evidenceRef" }
|
|
84
|
+
},
|
|
85
|
+
"latencyMs": { "type": "number", "minimum": 0 },
|
|
86
|
+
"capabilities": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"maxItems": 100,
|
|
89
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
90
|
+
},
|
|
91
|
+
"fallbackCodes": {
|
|
92
|
+
"type": "array",
|
|
93
|
+
"maxItems": 100,
|
|
94
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"contextPayload": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"additionalProperties": false,
|
|
101
|
+
"required": ["evidence", "capsuleId"],
|
|
102
|
+
"properties": {
|
|
103
|
+
"evidence": {
|
|
104
|
+
"type": "array",
|
|
105
|
+
"maxItems": 10000,
|
|
106
|
+
"items": { "$ref": "#/definitions/evidenceRef" }
|
|
107
|
+
},
|
|
108
|
+
"capsuleId": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
109
|
+
"latencyMs": { "type": "number", "minimum": 0 }
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"queryPayload": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"additionalProperties": false,
|
|
115
|
+
"properties": {
|
|
116
|
+
"filterFingerprint": { "$ref": "#/definitions/sha256" }
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"capabilityPayload": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"required": ["capability", "status"],
|
|
123
|
+
"properties": {
|
|
124
|
+
"capability": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
125
|
+
"status": {
|
|
126
|
+
"enum": ["attempted", "used", "unavailable", "failed"]
|
|
127
|
+
},
|
|
128
|
+
"reasonCode": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"completePayload": {
|
|
132
|
+
"type": "object",
|
|
133
|
+
"additionalProperties": false,
|
|
134
|
+
"required": ["outcome"],
|
|
135
|
+
"properties": {
|
|
136
|
+
"outcome": { "enum": ["completed", "partial", "failed", "cancelled"] },
|
|
137
|
+
"latencyMs": { "type": "number", "minimum": 0 }
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"judgmentTarget": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"allOf": [{ "$ref": "#/definitions/identity" }],
|
|
144
|
+
"dependencies": {
|
|
145
|
+
"startLine": ["endLine"],
|
|
146
|
+
"endLine": ["startLine"]
|
|
147
|
+
},
|
|
148
|
+
"properties": {
|
|
149
|
+
"docid": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
150
|
+
"sourceHash": { "$ref": "#/definitions/sha256" },
|
|
151
|
+
"mirrorHash": { "$ref": "#/definitions/sha256" },
|
|
152
|
+
"uri": { "type": "string", "pattern": "^gno://", "maxLength": 4096 },
|
|
153
|
+
"seq": { "type": "integer", "minimum": 0 },
|
|
154
|
+
"startLine": { "type": "integer", "minimum": 1 },
|
|
155
|
+
"endLine": { "type": "integer", "minimum": 1 },
|
|
156
|
+
"plannerRank": { "type": "integer", "minimum": 1 },
|
|
157
|
+
"passageHash": { "$ref": "#/definitions/sha256" },
|
|
158
|
+
"sources": {
|
|
159
|
+
"type": "array",
|
|
160
|
+
"maxItems": 16,
|
|
161
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
162
|
+
},
|
|
163
|
+
"graphExpanded": { "type": "boolean" }
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"documentTarget": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"additionalProperties": false,
|
|
169
|
+
"allOf": [{ "$ref": "#/definitions/identity" }],
|
|
170
|
+
"properties": {
|
|
171
|
+
"docid": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
172
|
+
"sourceHash": { "$ref": "#/definitions/sha256" },
|
|
173
|
+
"mirrorHash": { "$ref": "#/definitions/sha256" },
|
|
174
|
+
"uri": { "type": "string", "pattern": "^gno://", "maxLength": 4096 }
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/retrieval-trace-purge@1.0",
|
|
4
|
+
"title": "GNO Retrieval Trace Purge",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"traces",
|
|
10
|
+
"runs",
|
|
11
|
+
"events",
|
|
12
|
+
"judgments",
|
|
13
|
+
"exports",
|
|
14
|
+
"exportLinks",
|
|
15
|
+
"physicalCleanup",
|
|
16
|
+
"checkpointedFrames",
|
|
17
|
+
"remainingWalFrames"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"schemaVersion": { "const": "1.0" },
|
|
21
|
+
"traces": { "type": "integer", "minimum": 0 },
|
|
22
|
+
"runs": { "type": "integer", "minimum": 0 },
|
|
23
|
+
"events": { "type": "integer", "minimum": 0 },
|
|
24
|
+
"judgments": { "type": "integer", "minimum": 0 },
|
|
25
|
+
"exports": { "type": "integer", "minimum": 0 },
|
|
26
|
+
"exportLinks": { "type": "integer", "minimum": 0 },
|
|
27
|
+
"physicalCleanup": { "enum": ["completed", "wal_busy", "failed"] },
|
|
28
|
+
"checkpointedFrames": { "type": "integer", "minimum": 0 },
|
|
29
|
+
"remainingWalFrames": { "type": "integer", "minimum": 0 }
|
|
30
|
+
}
|
|
31
|
+
}
|