@gmickel/gno 1.18.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 +5 -3
- package/assets/skill/SKILL.md +27 -0
- package/package.json +2 -1
- 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/get.ts +64 -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/trace.ts +200 -0
- package/src/cli/commands/vsearch.ts +75 -53
- package/src/cli/program.ts +255 -0
- package/src/config/index.ts +9 -0
- package/src/config/retrieval-traces.ts +56 -0
- package/src/config/types.ts +4 -0
- package/src/core/context-compiler.ts +11 -4
- 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/mcp/tools/context.ts +59 -8
- package/src/mcp/tools/get.ts +35 -1
- package/src/mcp/tools/index.ts +74 -0
- package/src/mcp/tools/query.ts +95 -64
- package/src/mcp/tools/search.ts +36 -13
- package/src/mcp/tools/trace.ts +143 -0
- package/src/mcp/tools/vsearch.ts +71 -38
- 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/context-capsule.ts +67 -8
- package/src/serve/public/app.tsx +12 -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 +10 -0
- package/src/serve/public/pages/TraceHistory.tsx +478 -0
- package/src/serve/public/pages/trace-history-detail.tsx +224 -0
- package/src/serve/retrieval-trace.ts +28 -0
- package/src/serve/routes/api.ts +366 -72
- package/src/serve/routes/traces.ts +156 -0
- package/src/serve/server.ts +87 -2
- 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 +153 -1
- 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,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/capture-receipt@1.0",
|
|
4
|
+
"title": "GNO Capture Receipt",
|
|
5
|
+
"description": "Shared receipt returned by capture surfaces after a write/open decision.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"uri",
|
|
9
|
+
"collection",
|
|
10
|
+
"relPath",
|
|
11
|
+
"created",
|
|
12
|
+
"openedExisting",
|
|
13
|
+
"createdWithSuffix",
|
|
14
|
+
"contentHash",
|
|
15
|
+
"source",
|
|
16
|
+
"tags",
|
|
17
|
+
"sync",
|
|
18
|
+
"embed",
|
|
19
|
+
"collisionPolicyResult"
|
|
20
|
+
],
|
|
21
|
+
"properties": {
|
|
22
|
+
"uri": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "GNO URI for the captured note.",
|
|
25
|
+
"pattern": "^gno://[^/]+/.+"
|
|
26
|
+
},
|
|
27
|
+
"docid": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "Document id when sync has resolved it."
|
|
30
|
+
},
|
|
31
|
+
"collection": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "Target collection name."
|
|
34
|
+
},
|
|
35
|
+
"relPath": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Relative path within the collection."
|
|
38
|
+
},
|
|
39
|
+
"absPath": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Absolute path when the local surface exposes it."
|
|
42
|
+
},
|
|
43
|
+
"created": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"description": "True when a new file was written."
|
|
46
|
+
},
|
|
47
|
+
"openedExisting": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"description": "True when collision policy selected an existing file."
|
|
50
|
+
},
|
|
51
|
+
"createdWithSuffix": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"description": "True when a suffixed path was created after collision."
|
|
54
|
+
},
|
|
55
|
+
"overwritten": {
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"description": "Legacy compatibility flag for overwrite-capable surfaces."
|
|
58
|
+
},
|
|
59
|
+
"contentHash": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "SHA-256 hash of normalized capture body content.",
|
|
62
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
63
|
+
},
|
|
64
|
+
"source": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"required": ["kind", "capturedAt"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"kind": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": [
|
|
71
|
+
"direct",
|
|
72
|
+
"web",
|
|
73
|
+
"email",
|
|
74
|
+
"meeting",
|
|
75
|
+
"chat",
|
|
76
|
+
"file",
|
|
77
|
+
"api",
|
|
78
|
+
"unknown"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"title": { "type": "string" },
|
|
82
|
+
"url": { "type": "string", "format": "uri" },
|
|
83
|
+
"uri": { "type": "string" },
|
|
84
|
+
"docid": { "type": "string" },
|
|
85
|
+
"mime": { "type": "string" },
|
|
86
|
+
"ext": { "type": "string" },
|
|
87
|
+
"author": { "type": "string" },
|
|
88
|
+
"observedAt": { "type": "string", "format": "date-time" },
|
|
89
|
+
"capturedAt": { "type": "string", "format": "date-time" },
|
|
90
|
+
"externalId": { "type": "string" }
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"tags": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": { "type": "string" }
|
|
96
|
+
},
|
|
97
|
+
"sync": {
|
|
98
|
+
"$ref": "#/definitions/indexStatus"
|
|
99
|
+
},
|
|
100
|
+
"embed": {
|
|
101
|
+
"$ref": "#/definitions/indexStatus"
|
|
102
|
+
},
|
|
103
|
+
"collisionPolicyResult": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"enum": [
|
|
106
|
+
"created",
|
|
107
|
+
"opened_existing",
|
|
108
|
+
"created_with_suffix",
|
|
109
|
+
"overwritten",
|
|
110
|
+
"conflict"
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"definitions": {
|
|
115
|
+
"indexStatus": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"required": ["status"],
|
|
118
|
+
"properties": {
|
|
119
|
+
"status": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"enum": [
|
|
122
|
+
"not_requested",
|
|
123
|
+
"pending",
|
|
124
|
+
"running",
|
|
125
|
+
"completed",
|
|
126
|
+
"skipped",
|
|
127
|
+
"failed",
|
|
128
|
+
"unknown"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"jobId": {
|
|
132
|
+
"type": ["string", "null"]
|
|
133
|
+
},
|
|
134
|
+
"reason": {
|
|
135
|
+
"type": "string"
|
|
136
|
+
},
|
|
137
|
+
"error": {
|
|
138
|
+
"type": "string"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/collection-list@1.0",
|
|
4
|
+
"title": "GNO Collection List",
|
|
5
|
+
"description": "List of configured collections",
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"required": ["name", "path", "pattern", "include", "exclude"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"name": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Collection identifier (lowercase, alphanumeric with hyphens/underscores)",
|
|
14
|
+
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
|
|
15
|
+
},
|
|
16
|
+
"path": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Absolute path to collection root directory"
|
|
19
|
+
},
|
|
20
|
+
"pattern": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Glob pattern for file matching",
|
|
23
|
+
"default": "**/*"
|
|
24
|
+
},
|
|
25
|
+
"include": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"description": "Extension allowlist (empty = all)",
|
|
28
|
+
"items": { "type": "string" }
|
|
29
|
+
},
|
|
30
|
+
"exclude": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"description": "Path patterns to skip",
|
|
33
|
+
"items": { "type": "string" }
|
|
34
|
+
},
|
|
35
|
+
"updateCmd": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Optional shell command to run before indexing"
|
|
38
|
+
},
|
|
39
|
+
"languageHint": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "BCP-47 language hint for the collection"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|