@gmickel/gno 1.27.1 → 1.28.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 +2 -2
- package/assets/skill/SKILL.md +26 -1
- package/browser-extension/artifacts/{gno-browser-clipper-v1.27.1.zip → gno-browser-clipper-v1.28.0.zip} +0 -0
- package/browser-extension/artifacts/gno-browser-clipper-v1.28.0.zip.sha256 +1 -0
- package/browser-extension/dist/manifest.json +1 -1
- package/package.json +2 -2
- package/spec/cli.md +41 -4
- package/spec/db/schema.sql +12 -0
- package/spec/mcp.md +5 -0
- package/spec/output-schemas/ask.schema.json +125 -0
- package/spec/output-schemas/context-capsule-v1.schema.json +94 -1
- package/spec/output-schemas/get.schema.json +94 -0
- package/spec/output-schemas/mcp-job-status.schema.json +28 -0
- package/spec/output-schemas/multi-get.schema.json +128 -0
- package/spec/output-schemas/record-import.schema.json +193 -0
- package/spec/output-schemas/search-result.schema.json +94 -0
- package/spec/output-schemas/search-results.schema.json +125 -0
- package/spec/project-profile.schema.json +66 -0
- package/src/app/context-format.ts +1 -1
- package/src/cli/commands/get.ts +12 -2
- package/src/cli/commands/index-cmd.ts +13 -0
- package/src/cli/commands/multi-get.ts +9 -2
- package/src/cli/commands/shared.ts +28 -0
- package/src/cli/commands/update.ts +5 -0
- package/src/cli/program.ts +4 -0
- package/src/config/project-profile.ts +2 -0
- package/src/config/types.ts +16 -0
- package/src/converters/adapters/browser-export/adapter.ts +199 -0
- package/src/converters/adapters/browser-export/formats.ts +358 -0
- package/src/converters/adapters/email/adapter.ts +429 -0
- package/src/converters/adapters/email/html.ts +162 -0
- package/src/converters/adapters/email/mime.ts +454 -0
- package/src/converters/adapters/email/parameters.ts +77 -0
- package/src/converters/adapters/ical/adapter.ts +475 -0
- package/src/converters/adapters/ical/recurrence.ts +186 -0
- package/src/converters/adapters/jsonl/adapter.ts +238 -0
- package/src/converters/adapters/jsonl/config.ts +105 -0
- package/src/converters/adapters/shared/html-text.ts +165 -0
- package/src/converters/adapters/shared/record-utils.ts +79 -0
- package/src/converters/adapters/shared/utf8-lines.ts +141 -0
- package/src/converters/adapters/transcript/adapter.ts +295 -0
- package/src/converters/adapters/transcript/json.ts +184 -0
- package/src/converters/adapters/transcript/model.ts +171 -0
- package/src/converters/adapters/transcript/text.ts +58 -0
- package/src/converters/adapters/transcript/timed.ts +152 -0
- package/src/converters/index.ts +11 -1
- package/src/converters/mime.ts +8 -0
- package/src/converters/pipeline.ts +15 -1
- package/src/converters/registry.ts +37 -1
- package/src/converters/types.ts +136 -0
- package/src/core/context-capsule-schema.ts +87 -0
- package/src/core/context-capsule.ts +20 -0
- package/src/core/context-evidence.ts +7 -1
- package/src/core/document-capabilities.ts +12 -0
- package/src/core/project-profile-apply-state.ts +5 -0
- package/src/core/project-profile.ts +4 -0
- package/src/core/record-metadata.ts +49 -0
- package/src/ingestion/record-adapter-canonical.ts +433 -0
- package/src/ingestion/record-adapter.ts +437 -0
- package/src/ingestion/record-container.ts +688 -0
- package/src/ingestion/record-path.ts +20 -0
- package/src/ingestion/record-sync.ts +70 -0
- package/src/ingestion/sync.ts +228 -36
- package/src/ingestion/types.ts +69 -1
- package/src/ingestion/walker.ts +31 -11
- package/src/mcp/tools/get.ts +10 -2
- package/src/mcp/tools/multi-get.ts +9 -2
- package/src/mcp/tools/workspace-write.ts +2 -0
- package/src/pipeline/filters.ts +1 -1
- package/src/pipeline/graph-retrieval.ts +7 -4
- package/src/pipeline/hybrid.ts +7 -4
- package/src/pipeline/result-context.ts +12 -4
- package/src/pipeline/search.ts +11 -4
- package/src/pipeline/types.ts +3 -0
- package/src/pipeline/vsearch.ts +26 -8
- package/src/sdk/documents.ts +13 -5
- package/src/serve/browse-tree.ts +4 -2
- package/src/serve/routes/api.ts +63 -65
- package/src/store/migrations/022-record-export-lineage.ts +42 -0
- package/src/store/migrations/index.ts +2 -0
- package/src/store/sqlite/adapter.ts +114 -7
- package/src/store/types.ts +40 -0
- package/browser-extension/artifacts/gno-browser-clipper-v1.27.1.zip.sha256 +0 -1
|
@@ -45,6 +45,134 @@
|
|
|
45
45
|
"mime": { "type": "string" },
|
|
46
46
|
"ext": { "type": "string", "pattern": "^\\.[a-zA-Z0-9]+$" }
|
|
47
47
|
}
|
|
48
|
+
},
|
|
49
|
+
"record": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"description": "Bounded logical-record provenance for a file/export source",
|
|
53
|
+
"required": ["recordKey", "sourceLocator", "anchors", "adapter"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"recordKey": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
56
|
+
"sourceLocator": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1,
|
|
59
|
+
"maxLength": 512
|
|
60
|
+
},
|
|
61
|
+
"anchors": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"maxItems": 256,
|
|
64
|
+
"items": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"required": ["kind", "value"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"kind": {
|
|
70
|
+
"enum": [
|
|
71
|
+
"line",
|
|
72
|
+
"cue",
|
|
73
|
+
"timestamp",
|
|
74
|
+
"message",
|
|
75
|
+
"event",
|
|
76
|
+
"record"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"value": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1,
|
|
82
|
+
"maxLength": 512
|
|
83
|
+
},
|
|
84
|
+
"endValue": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"minLength": 1,
|
|
87
|
+
"maxLength": 512
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"adapter": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"required": ["id", "version", "fingerprint"],
|
|
96
|
+
"properties": {
|
|
97
|
+
"id": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
98
|
+
"version": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"minLength": 1,
|
|
101
|
+
"maxLength": 64
|
|
102
|
+
},
|
|
103
|
+
"fingerprint": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"author": { "type": "string", "maxLength": 2048 },
|
|
110
|
+
"participants": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"maxItems": 256,
|
|
113
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 2048 }
|
|
114
|
+
},
|
|
115
|
+
"categories": {
|
|
116
|
+
"type": "array",
|
|
117
|
+
"maxItems": 256,
|
|
118
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 512 }
|
|
119
|
+
},
|
|
120
|
+
"dateFields": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"maxProperties": 256,
|
|
123
|
+
"propertyNames": { "type": "string", "maxLength": 128 },
|
|
124
|
+
"additionalProperties": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"minLength": 1,
|
|
127
|
+
"maxLength": 256
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"messageId": { "type": "string", "maxLength": 2048 },
|
|
131
|
+
"inReplyTo": { "type": "string", "maxLength": 2048 },
|
|
132
|
+
"references": {
|
|
133
|
+
"type": "array",
|
|
134
|
+
"maxItems": 256,
|
|
135
|
+
"items": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"minLength": 1,
|
|
138
|
+
"maxLength": 2048
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"threadId": { "type": "string", "maxLength": 2048 },
|
|
142
|
+
"eventId": { "type": "string", "maxLength": 2048 },
|
|
143
|
+
"sessionId": { "type": "string", "maxLength": 2048 },
|
|
144
|
+
"attachments": {
|
|
145
|
+
"type": "array",
|
|
146
|
+
"maxItems": 256,
|
|
147
|
+
"items": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"additionalProperties": false,
|
|
150
|
+
"required": ["name"],
|
|
151
|
+
"properties": {
|
|
152
|
+
"name": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"minLength": 1,
|
|
155
|
+
"maxLength": 512
|
|
156
|
+
},
|
|
157
|
+
"mime": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"minLength": 1,
|
|
160
|
+
"maxLength": 256
|
|
161
|
+
},
|
|
162
|
+
"bytes": {
|
|
163
|
+
"type": "integer",
|
|
164
|
+
"minimum": 0,
|
|
165
|
+
"maximum": 9007199254740991
|
|
166
|
+
},
|
|
167
|
+
"disposition": { "enum": ["inline", "attachment"] },
|
|
168
|
+
"sha256": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
48
176
|
}
|
|
49
177
|
}
|
|
50
178
|
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/record-import@1.0",
|
|
4
|
+
"title": "GNO Record Import Receipt",
|
|
5
|
+
"description": "Bounded reconciliation receipt for one multi-record export container.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"adapterId",
|
|
10
|
+
"adapterVersion",
|
|
11
|
+
"adapterFingerprint",
|
|
12
|
+
"snapshotState",
|
|
13
|
+
"authoritative",
|
|
14
|
+
"stoppedByCap",
|
|
15
|
+
"sourceBytesRead",
|
|
16
|
+
"records",
|
|
17
|
+
"items",
|
|
18
|
+
"itemsTruncated",
|
|
19
|
+
"warnings",
|
|
20
|
+
"failures"
|
|
21
|
+
],
|
|
22
|
+
"properties": {
|
|
23
|
+
"adapterId": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
24
|
+
"adapterVersion": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
25
|
+
"adapterFingerprint": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
28
|
+
},
|
|
29
|
+
"snapshotState": { "enum": ["complete", "partial"] },
|
|
30
|
+
"authoritative": { "type": "boolean" },
|
|
31
|
+
"stoppedByCap": { "type": "boolean" },
|
|
32
|
+
"sourceBytesRead": {
|
|
33
|
+
"type": "integer",
|
|
34
|
+
"minimum": 0
|
|
35
|
+
},
|
|
36
|
+
"records": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": [
|
|
40
|
+
"accepted",
|
|
41
|
+
"added",
|
|
42
|
+
"updated",
|
|
43
|
+
"reactivated",
|
|
44
|
+
"unchanged",
|
|
45
|
+
"deactivated",
|
|
46
|
+
"preserved",
|
|
47
|
+
"failed"
|
|
48
|
+
],
|
|
49
|
+
"properties": {
|
|
50
|
+
"accepted": { "type": "integer", "minimum": 0 },
|
|
51
|
+
"added": { "type": "integer", "minimum": 0 },
|
|
52
|
+
"updated": { "type": "integer", "minimum": 0 },
|
|
53
|
+
"reactivated": { "type": "integer", "minimum": 0 },
|
|
54
|
+
"unchanged": { "type": "integer", "minimum": 0 },
|
|
55
|
+
"deactivated": { "type": "integer", "minimum": 0 },
|
|
56
|
+
"preserved": { "type": "integer", "minimum": 0 },
|
|
57
|
+
"failed": { "type": "integer", "minimum": 0 }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"maxItems": 1000,
|
|
63
|
+
"items": { "$ref": "#/$defs/item" }
|
|
64
|
+
},
|
|
65
|
+
"itemsTruncated": {
|
|
66
|
+
"type": "integer",
|
|
67
|
+
"minimum": 0
|
|
68
|
+
},
|
|
69
|
+
"warnings": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"maxItems": 1,
|
|
72
|
+
"items": { "$ref": "#/$defs/warning" }
|
|
73
|
+
},
|
|
74
|
+
"failures": {
|
|
75
|
+
"type": "array",
|
|
76
|
+
"maxItems": 1000,
|
|
77
|
+
"items": { "$ref": "#/$defs/failure" }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"$defs": {
|
|
81
|
+
"attachment": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": ["name"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
87
|
+
"mime": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
88
|
+
"bytes": { "type": "integer", "minimum": 0 },
|
|
89
|
+
"disposition": { "enum": ["inline", "attachment"] },
|
|
90
|
+
"sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"item": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"required": [
|
|
97
|
+
"outcome",
|
|
98
|
+
"recordKey",
|
|
99
|
+
"sourceLocator",
|
|
100
|
+
"sourceHash",
|
|
101
|
+
"adapterFingerprint",
|
|
102
|
+
"attachments"
|
|
103
|
+
],
|
|
104
|
+
"properties": {
|
|
105
|
+
"outcome": {
|
|
106
|
+
"enum": [
|
|
107
|
+
"added",
|
|
108
|
+
"updated",
|
|
109
|
+
"reactivated",
|
|
110
|
+
"unchanged",
|
|
111
|
+
"deactivated",
|
|
112
|
+
"preserved"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"recordKey": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
118
|
+
},
|
|
119
|
+
"sourceLocator": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"minLength": 1,
|
|
122
|
+
"maxLength": 512
|
|
123
|
+
},
|
|
124
|
+
"sourceHash": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
127
|
+
},
|
|
128
|
+
"mirrorHash": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
131
|
+
},
|
|
132
|
+
"adapterFingerprint": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
135
|
+
},
|
|
136
|
+
"attachments": {
|
|
137
|
+
"type": "array",
|
|
138
|
+
"maxItems": 256,
|
|
139
|
+
"items": { "$ref": "#/$defs/attachment" }
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"warning": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"required": ["code", "message", "retryable"],
|
|
147
|
+
"properties": {
|
|
148
|
+
"code": { "const": "PARTIAL_SNAPSHOT" },
|
|
149
|
+
"message": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"minLength": 1,
|
|
152
|
+
"maxLength": 240
|
|
153
|
+
},
|
|
154
|
+
"retryable": { "type": "boolean" }
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"failure": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"required": ["code", "message", "retryable"],
|
|
161
|
+
"properties": {
|
|
162
|
+
"code": {
|
|
163
|
+
"enum": [
|
|
164
|
+
"MALFORMED_RECORD",
|
|
165
|
+
"MISSING_ID",
|
|
166
|
+
"DUPLICATE_ID",
|
|
167
|
+
"RECORD_TOO_LARGE",
|
|
168
|
+
"SOURCE_TOO_LARGE",
|
|
169
|
+
"TIMEOUT",
|
|
170
|
+
"RECORD_LIMIT",
|
|
171
|
+
"FAILURE_LIMIT",
|
|
172
|
+
"INVALID_LOCATOR",
|
|
173
|
+
"INVALID_SOURCE_HASH",
|
|
174
|
+
"ADAPTER_FAILURE",
|
|
175
|
+
"INVALID_SNAPSHOT"
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"message": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"minLength": 1,
|
|
181
|
+
"maxLength": 240
|
|
182
|
+
},
|
|
183
|
+
"retryable": { "type": "boolean" },
|
|
184
|
+
"stableId": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
185
|
+
"sourceLocator": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"minLength": 1,
|
|
188
|
+
"maxLength": 512
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
@@ -149,6 +149,100 @@
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
+
},
|
|
153
|
+
"record": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"additionalProperties": false,
|
|
156
|
+
"description": "Bounded logical-record provenance for a file/export source",
|
|
157
|
+
"required": ["recordKey", "sourceLocator", "anchors", "adapter"],
|
|
158
|
+
"properties": {
|
|
159
|
+
"recordKey": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
160
|
+
"sourceLocator": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
161
|
+
"anchors": {
|
|
162
|
+
"type": "array",
|
|
163
|
+
"maxItems": 256,
|
|
164
|
+
"items": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": false,
|
|
167
|
+
"required": ["kind", "value"],
|
|
168
|
+
"properties": {
|
|
169
|
+
"kind": {
|
|
170
|
+
"enum": [
|
|
171
|
+
"line",
|
|
172
|
+
"cue",
|
|
173
|
+
"timestamp",
|
|
174
|
+
"message",
|
|
175
|
+
"event",
|
|
176
|
+
"record"
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"value": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
180
|
+
"endValue": { "type": "string", "minLength": 1, "maxLength": 512 }
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"adapter": {
|
|
185
|
+
"type": "object",
|
|
186
|
+
"additionalProperties": false,
|
|
187
|
+
"required": ["id", "version", "fingerprint"],
|
|
188
|
+
"properties": {
|
|
189
|
+
"id": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
190
|
+
"version": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
191
|
+
"fingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"author": { "type": "string", "maxLength": 2048 },
|
|
195
|
+
"participants": {
|
|
196
|
+
"type": "array",
|
|
197
|
+
"maxItems": 256,
|
|
198
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 2048 }
|
|
199
|
+
},
|
|
200
|
+
"categories": {
|
|
201
|
+
"type": "array",
|
|
202
|
+
"maxItems": 256,
|
|
203
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 512 }
|
|
204
|
+
},
|
|
205
|
+
"dateFields": {
|
|
206
|
+
"type": "object",
|
|
207
|
+
"maxProperties": 256,
|
|
208
|
+
"propertyNames": { "type": "string", "maxLength": 128 },
|
|
209
|
+
"additionalProperties": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"minLength": 1,
|
|
212
|
+
"maxLength": 256
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"messageId": { "type": "string", "maxLength": 2048 },
|
|
216
|
+
"inReplyTo": { "type": "string", "maxLength": 2048 },
|
|
217
|
+
"references": {
|
|
218
|
+
"type": "array",
|
|
219
|
+
"maxItems": 256,
|
|
220
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 2048 }
|
|
221
|
+
},
|
|
222
|
+
"threadId": { "type": "string", "maxLength": 2048 },
|
|
223
|
+
"eventId": { "type": "string", "maxLength": 2048 },
|
|
224
|
+
"sessionId": { "type": "string", "maxLength": 2048 },
|
|
225
|
+
"attachments": {
|
|
226
|
+
"type": "array",
|
|
227
|
+
"maxItems": 256,
|
|
228
|
+
"items": {
|
|
229
|
+
"type": "object",
|
|
230
|
+
"additionalProperties": false,
|
|
231
|
+
"required": ["name"],
|
|
232
|
+
"properties": {
|
|
233
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
234
|
+
"mime": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
235
|
+
"bytes": {
|
|
236
|
+
"type": "integer",
|
|
237
|
+
"minimum": 0,
|
|
238
|
+
"maximum": 9007199254740991
|
|
239
|
+
},
|
|
240
|
+
"disposition": { "enum": ["inline", "attachment"] },
|
|
241
|
+
"sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
152
246
|
}
|
|
153
247
|
}
|
|
154
248
|
}
|
|
@@ -58,6 +58,131 @@
|
|
|
58
58
|
"type": "string",
|
|
59
59
|
"description": "Matching text snippet from document mirror"
|
|
60
60
|
},
|
|
61
|
+
"record": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"description": "Bounded logical-record provenance for a file/export source",
|
|
65
|
+
"required": ["recordKey", "sourceLocator", "anchors", "adapter"],
|
|
66
|
+
"properties": {
|
|
67
|
+
"recordKey": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
68
|
+
"sourceLocator": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"minLength": 1,
|
|
71
|
+
"maxLength": 512
|
|
72
|
+
},
|
|
73
|
+
"anchors": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"maxItems": 256,
|
|
76
|
+
"items": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"additionalProperties": false,
|
|
79
|
+
"required": ["kind", "value"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"kind": {
|
|
82
|
+
"enum": [
|
|
83
|
+
"line",
|
|
84
|
+
"cue",
|
|
85
|
+
"timestamp",
|
|
86
|
+
"message",
|
|
87
|
+
"event",
|
|
88
|
+
"record"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"value": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1,
|
|
94
|
+
"maxLength": 512
|
|
95
|
+
},
|
|
96
|
+
"endValue": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1,
|
|
99
|
+
"maxLength": 512
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"adapter": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": ["id", "version", "fingerprint"],
|
|
108
|
+
"properties": {
|
|
109
|
+
"id": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
110
|
+
"version": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"minLength": 1,
|
|
113
|
+
"maxLength": 64
|
|
114
|
+
},
|
|
115
|
+
"fingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"author": { "type": "string", "maxLength": 2048 },
|
|
119
|
+
"participants": {
|
|
120
|
+
"type": "array",
|
|
121
|
+
"maxItems": 256,
|
|
122
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 2048 }
|
|
123
|
+
},
|
|
124
|
+
"categories": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"maxItems": 256,
|
|
127
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 512 }
|
|
128
|
+
},
|
|
129
|
+
"dateFields": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"maxProperties": 256,
|
|
132
|
+
"propertyNames": { "type": "string", "maxLength": 128 },
|
|
133
|
+
"additionalProperties": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"minLength": 1,
|
|
136
|
+
"maxLength": 256
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"messageId": { "type": "string", "maxLength": 2048 },
|
|
140
|
+
"inReplyTo": { "type": "string", "maxLength": 2048 },
|
|
141
|
+
"references": {
|
|
142
|
+
"type": "array",
|
|
143
|
+
"maxItems": 256,
|
|
144
|
+
"items": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"minLength": 1,
|
|
147
|
+
"maxLength": 2048
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"threadId": { "type": "string", "maxLength": 2048 },
|
|
151
|
+
"eventId": { "type": "string", "maxLength": 2048 },
|
|
152
|
+
"sessionId": { "type": "string", "maxLength": 2048 },
|
|
153
|
+
"attachments": {
|
|
154
|
+
"type": "array",
|
|
155
|
+
"maxItems": 256,
|
|
156
|
+
"items": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"additionalProperties": false,
|
|
159
|
+
"required": ["name"],
|
|
160
|
+
"properties": {
|
|
161
|
+
"name": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"minLength": 1,
|
|
164
|
+
"maxLength": 512
|
|
165
|
+
},
|
|
166
|
+
"mime": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"minLength": 1,
|
|
169
|
+
"maxLength": 256
|
|
170
|
+
},
|
|
171
|
+
"bytes": {
|
|
172
|
+
"type": "integer",
|
|
173
|
+
"minimum": 0,
|
|
174
|
+
"maximum": 9007199254740991
|
|
175
|
+
},
|
|
176
|
+
"disposition": { "enum": ["inline", "attachment"] },
|
|
177
|
+
"sha256": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
61
186
|
"snippetRange": {
|
|
62
187
|
"type": "object",
|
|
63
188
|
"description": "Line range of snippet in mirror content",
|
|
@@ -186,6 +186,72 @@
|
|
|
186
186
|
"modelPreset": {
|
|
187
187
|
"type": "string",
|
|
188
188
|
"pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
|
|
189
|
+
},
|
|
190
|
+
"recordAdapters": {
|
|
191
|
+
"$ref": "#/definitions/recordAdapters"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"jsonPointer": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"maxLength": 512,
|
|
198
|
+
"pattern": "^(?!.*(?:^|/)(?:__proto__|constructor|prototype)(?:/|$))(?:/(?:[^~/]|~[01])*){0,32}$"
|
|
199
|
+
},
|
|
200
|
+
"fieldSelector": {
|
|
201
|
+
"oneOf": [
|
|
202
|
+
{ "$ref": "#/definitions/jsonPointer" },
|
|
203
|
+
{
|
|
204
|
+
"type": "array",
|
|
205
|
+
"minItems": 1,
|
|
206
|
+
"maxItems": 8,
|
|
207
|
+
"items": { "$ref": "#/definitions/jsonPointer" }
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
"jsonlFieldMapping": {
|
|
212
|
+
"type": "object",
|
|
213
|
+
"additionalProperties": false,
|
|
214
|
+
"properties": {
|
|
215
|
+
"id": { "$ref": "#/definitions/fieldSelector" },
|
|
216
|
+
"body": { "$ref": "#/definitions/fieldSelector" },
|
|
217
|
+
"title": { "$ref": "#/definitions/fieldSelector" },
|
|
218
|
+
"author": { "$ref": "#/definitions/fieldSelector" },
|
|
219
|
+
"participants": { "$ref": "#/definitions/fieldSelector" },
|
|
220
|
+
"categories": { "$ref": "#/definitions/fieldSelector" },
|
|
221
|
+
"sessionId": { "$ref": "#/definitions/fieldSelector" },
|
|
222
|
+
"threadId": { "$ref": "#/definitions/fieldSelector" },
|
|
223
|
+
"dateFields": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"maxProperties": 16,
|
|
226
|
+
"propertyNames": {
|
|
227
|
+
"pattern": "^[a-z][a-z0-9_-]{0,63}$"
|
|
228
|
+
},
|
|
229
|
+
"additionalProperties": {
|
|
230
|
+
"$ref": "#/definitions/fieldSelector"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"recordAdapters": {
|
|
236
|
+
"type": "object",
|
|
237
|
+
"additionalProperties": false,
|
|
238
|
+
"properties": {
|
|
239
|
+
"jsonl": {
|
|
240
|
+
"type": "object",
|
|
241
|
+
"additionalProperties": false,
|
|
242
|
+
"properties": {
|
|
243
|
+
"fieldMapping": {
|
|
244
|
+
"$ref": "#/definitions/jsonlFieldMapping"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"transcript": {
|
|
249
|
+
"type": "object",
|
|
250
|
+
"additionalProperties": false,
|
|
251
|
+
"required": ["format"],
|
|
252
|
+
"properties": {
|
|
253
|
+
"format": { "enum": ["json", "srt", "text", "vtt"] }
|
|
254
|
+
}
|
|
189
255
|
}
|
|
190
256
|
}
|
|
191
257
|
},
|
|
@@ -80,7 +80,7 @@ const evidenceBlock = (
|
|
|
80
80
|
item: ContextCapsuleV1["evidence"][number]
|
|
81
81
|
): string[] => {
|
|
82
82
|
const metadata = [
|
|
83
|
-
`{"title":${json(item.title)},"heading":${json(item.heading)}}`,
|
|
83
|
+
`{"title":${json(item.title)},"heading":${json(item.heading)},"record":${json(item.record ?? null)}}`,
|
|
84
84
|
"configuredContexts:",
|
|
85
85
|
...configuredContextLines(capsule, item.contextIds).map((line) =>
|
|
86
86
|
line.startsWith(" ") ? line.slice(4) : line
|