@fortemi/core 2026.9.5 → 2026.9.7

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.
Files changed (23) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +1705 -1508
  3. package/dist/index.js +2633 -675
  4. package/dist/index.js.map +1 -1
  5. package/package.json +5 -1
  6. package/schemas/lifecycle-purge/contract.receipt.json +15 -0
  7. package/schemas/lifecycle-purge/v1.conformance.json +73 -0
  8. package/schemas/metadata-search/candidate/1.0.0/README.md +36 -0
  9. package/schemas/metadata-search/candidate/1.0.0/contract.receipt.json +38 -0
  10. package/schemas/metadata-search/candidate/1.0.0/evidence-locator.schema.json +50 -0
  11. package/schemas/metadata-search/candidate/1.0.0/evidence-resolution-vectors.json +355 -0
  12. package/schemas/metadata-search/candidate/1.0.0/evidence-resolution.schema.json +25 -0
  13. package/schemas/metadata-search/candidate/1.0.0/evidence-set-vectors.json +6095 -0
  14. package/schemas/metadata-search/candidate/1.0.0/evidence-set.schema.json +21 -0
  15. package/schemas/metadata-search/candidate/1.0.0/evidence-vectors.json +1603 -0
  16. package/schemas/metadata-search/candidate/1.0.0/predicate-vectors.json +919 -0
  17. package/schemas/metadata-search/candidate/1.0.0/predicates.schema.json +287 -0
  18. package/schemas/metadata-search/candidate/1.0.0/resolution.receipt.json +44 -0
  19. package/schemas/metadata-search/candidate/1.0.0/rest.receipt.json +51 -0
  20. package/schemas/metadata-search/candidate/1.0.0/search-rest-vectors.json +28 -0
  21. package/schemas/metadata-search/candidate/1.0.0/search-rest.schema.json +318 -0
  22. package/schemas/metadata-search/candidate/1.0.0/source.receipt.json +46 -0
  23. package/schemas/metadata-search/candidate/1.0.0/sql-scope-vectors.json +894 -0
@@ -0,0 +1,287 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://fortemi.dev/schemas/metadata-search/candidate/1.0.0/predicates.schema.json",
4
+ "title": "Candidate typed metadata predicates",
5
+ "type": "array",
6
+ "maxItems": 8,
7
+ "items": {
8
+ "$ref": "#/$defs/predicate"
9
+ },
10
+ "$defs": {
11
+ "scalar": {
12
+ "oneOf": [
13
+ {
14
+ "type": "string",
15
+ "maxLength": 256,
16
+ "pattern": "^[^\\u0000]*$"
17
+ },
18
+ {
19
+ "type": "number",
20
+ "minimum": -9007199254740991,
21
+ "maximum": 9007199254740991
22
+ },
23
+ {
24
+ "type": "boolean"
25
+ },
26
+ {
27
+ "type": "null"
28
+ }
29
+ ]
30
+ },
31
+ "bound": {
32
+ "oneOf": [
33
+ {
34
+ "type": "string",
35
+ "maxLength": 256,
36
+ "pattern": "^[^\\u0000]*$"
37
+ },
38
+ {
39
+ "type": "number",
40
+ "minimum": -9007199254740991,
41
+ "maximum": 9007199254740991
42
+ }
43
+ ]
44
+ },
45
+ "predicate": {
46
+ "oneOf": [
47
+ {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": [
51
+ "path",
52
+ "op",
53
+ "value"
54
+ ],
55
+ "properties": {
56
+ "path": {
57
+ "enum": [
58
+ "provider",
59
+ "model",
60
+ "role",
61
+ "event_kind",
62
+ "sensitivity",
63
+ "import_run_id"
64
+ ]
65
+ },
66
+ "op": {
67
+ "const": "eq"
68
+ },
69
+ "value": {
70
+ "$ref": "#/$defs/scalar"
71
+ }
72
+ },
73
+ "allOf": [
74
+ {
75
+ "if": {
76
+ "properties": {
77
+ "path": {
78
+ "const": "import_run_id"
79
+ }
80
+ }
81
+ },
82
+ "then": {
83
+ "properties": {
84
+ "value": {
85
+ "type": "string",
86
+ "maxLength": 200,
87
+ "pattern": "^[^\\u0000]*$",
88
+ "minLength": 1
89
+ }
90
+ }
91
+ }
92
+ }
93
+ ]
94
+ },
95
+ {
96
+ "type": "object",
97
+ "additionalProperties": false,
98
+ "required": [
99
+ "path",
100
+ "op",
101
+ "value"
102
+ ],
103
+ "properties": {
104
+ "path": {
105
+ "enum": [
106
+ "provider",
107
+ "model",
108
+ "role",
109
+ "event_kind",
110
+ "sensitivity",
111
+ "import_run_id"
112
+ ]
113
+ },
114
+ "op": {
115
+ "const": "in"
116
+ },
117
+ "value": {
118
+ "type": "array",
119
+ "maxItems": 32,
120
+ "items": {
121
+ "$ref": "#/$defs/scalar"
122
+ }
123
+ }
124
+ },
125
+ "allOf": [
126
+ {
127
+ "if": {
128
+ "properties": {
129
+ "path": {
130
+ "const": "import_run_id"
131
+ }
132
+ }
133
+ },
134
+ "then": {
135
+ "properties": {
136
+ "value": {
137
+ "type": "array",
138
+ "items": {
139
+ "type": "string",
140
+ "maxLength": 200,
141
+ "pattern": "^[^\\u0000]*$",
142
+ "minLength": 1
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+ ]
149
+ },
150
+ {
151
+ "type": "object",
152
+ "additionalProperties": false,
153
+ "required": [
154
+ "path",
155
+ "op"
156
+ ],
157
+ "properties": {
158
+ "path": {
159
+ "enum": [
160
+ "provider",
161
+ "model",
162
+ "role",
163
+ "event_kind",
164
+ "sensitivity",
165
+ "import_run_id"
166
+ ]
167
+ },
168
+ "op": {
169
+ "const": "range"
170
+ },
171
+ "gte": {
172
+ "$ref": "#/$defs/bound"
173
+ },
174
+ "lte": {
175
+ "$ref": "#/$defs/bound"
176
+ }
177
+ },
178
+ "anyOf": [
179
+ {
180
+ "properties": {
181
+ "gte": {
182
+ "$ref": "#/$defs/bound"
183
+ }
184
+ },
185
+ "required": [
186
+ "gte"
187
+ ]
188
+ },
189
+ {
190
+ "properties": {
191
+ "lte": {
192
+ "$ref": "#/$defs/bound"
193
+ }
194
+ },
195
+ "required": [
196
+ "lte"
197
+ ]
198
+ }
199
+ ],
200
+ "oneOf": [
201
+ {
202
+ "properties": {
203
+ "gte": {
204
+ "type": "string",
205
+ "maxLength": 256,
206
+ "pattern": "^[^\\u0000]*$"
207
+ },
208
+ "lte": {
209
+ "type": "string",
210
+ "maxLength": 256,
211
+ "pattern": "^[^\\u0000]*$"
212
+ }
213
+ }
214
+ },
215
+ {
216
+ "properties": {
217
+ "gte": {
218
+ "type": "number",
219
+ "minimum": -9007199254740991,
220
+ "maximum": 9007199254740991
221
+ },
222
+ "lte": {
223
+ "type": "number",
224
+ "minimum": -9007199254740991,
225
+ "maximum": 9007199254740991
226
+ }
227
+ }
228
+ }
229
+ ],
230
+ "allOf": [
231
+ {
232
+ "if": {
233
+ "properties": {
234
+ "path": {
235
+ "const": "import_run_id"
236
+ }
237
+ }
238
+ },
239
+ "then": {
240
+ "properties": {
241
+ "gte": {
242
+ "type": "string",
243
+ "maxLength": 200,
244
+ "pattern": "^[^\\u0000]*$",
245
+ "minLength": 1
246
+ },
247
+ "lte": {
248
+ "type": "string",
249
+ "maxLength": 200,
250
+ "pattern": "^[^\\u0000]*$",
251
+ "minLength": 1
252
+ }
253
+ }
254
+ }
255
+ }
256
+ ]
257
+ },
258
+ {
259
+ "type": "object",
260
+ "additionalProperties": false,
261
+ "required": [
262
+ "path",
263
+ "op"
264
+ ],
265
+ "properties": {
266
+ "path": {
267
+ "enum": [
268
+ "provider",
269
+ "model",
270
+ "role",
271
+ "event_kind",
272
+ "sensitivity",
273
+ "import_run_id"
274
+ ]
275
+ },
276
+ "op": {
277
+ "const": "exists"
278
+ },
279
+ "value": {
280
+ "type": "boolean"
281
+ }
282
+ }
283
+ }
284
+ ]
285
+ }
286
+ }
287
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "status": "candidate-unpublished",
4
+ "authority": {
5
+ "repository": "Fortemi/fortemi",
6
+ "issue": 1091,
7
+ "baseCommit": "a701847db779a0a3adfa36a09dfa1055a10a0a0a",
8
+ "sourceState": "uncommitted candidate; base is not contract revision",
9
+ "path": "contracts/metadata-search/candidate/1.0.0/",
10
+ "files": {
11
+ "evidence-resolution.schema.json": "92c0cd616d26fad83e56e602d8393a8b6135175c849284d97721da146d923723",
12
+ "evidence-resolution-vectors.json": "3d217a489a29be0eb152a8efb4f569e7942d4ae2af921218e295c0dba8a38aea",
13
+ "predicates.schema.json": "e325707ce20abb88ef3a8f4bbb0d02ab09501b1ffe9b48b0c92a96e97dda00c3",
14
+ "evidence-locator.schema.json": "cd8427c507bca1a08bdb68da0a5d2759d1d7805401db3c00372ab249652efb7a"
15
+ },
16
+ "openapi": {
17
+ "path": "contracts/openapi/openapi.yaml",
18
+ "sha256": "240d4b16916d7218119937255c0646da8db3ea50bb4313137be9f2f9c42f1b01"
19
+ }
20
+ },
21
+ "consumer": {
22
+ "repository": "Fortemi/fortemi-react",
23
+ "issue": 405,
24
+ "backend": "remote",
25
+ "test": "src/__tests__/remote-evidence-resolution.test.ts",
26
+ "operation": "resolveEvidence(locator, { metadataPredicates?, includeArchived?, signal? })",
27
+ "endpoint": "POST /api/v1/search/evidence/resolve",
28
+ "requestByteLimit": 65536,
29
+ "unitByteLimit": 16777216,
30
+ "deadlineMilliseconds": 30000,
31
+ "scope": "Existing transport headers carry authorized tenant/archive context; caller-supplied tenant/archive/visibility fields reject before I/O.",
32
+ "response": "Strict schema, well-formed UTF-8 and exact span byte length. Producer checks current full-text digest and policy; partial text cannot independently prove that digest.",
33
+ "transport": "No-store request/response, redirect error, bounded streamed JSON, abort and deadline, no detail rebinding or retained server error body."
34
+ },
35
+ "claims": {
36
+ "promotedContract": false,
37
+ "fullIssueAcceptance": false,
38
+ "suiteParity": false,
39
+ "evidenceLocators": false,
40
+ "liveProducerAcceptance": false,
41
+ "publishedRuntimeAcceptance": false
42
+ },
43
+ "priorReceipt": "contract.receipt.json and rest.receipt.json remain unchanged historical evidence."
44
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "status": "candidate-unpublished",
4
+ "authority": {
5
+ "repository": "Fortemi/fortemi",
6
+ "issue": 1091,
7
+ "baseCommit": "a701847db779a0a3adfa36a09dfa1055a10a0a0a",
8
+ "sourceState": "uncommitted candidate; base is not contract revision",
9
+ "path": "contracts/metadata-search/candidate/1.0.0/",
10
+ "files": {
11
+ "search-rest.schema.json": "df4bdf5c61187a66cc90b760ce9ebc71d062688d67858ed519fbd27141db9470",
12
+ "search-rest-vectors.json": "eac3b3739aedf037671be4cbd4a89f336d405de8cf06ea7ddebae9d1e4e288f2",
13
+ "predicates.schema.json": "e325707ce20abb88ef3a8f4bbb0d02ab09501b1ffe9b48b0c92a96e97dda00c3",
14
+ "evidence-locator.schema.json": "cd8427c507bca1a08bdb68da0a5d2759d1d7805401db3c00372ab249652efb7a",
15
+ "evidence-set.schema.json": "da7e5d41bd563cb2cfe424cf7dfa92007a865ee0e1a9a4832ef669039d80717e"
16
+ },
17
+ "openapi": {
18
+ "path": "contracts/openapi/openapi.yaml",
19
+ "sha256": "31a156b1acf34c1f48c5283bd6c53f971e8f30c8b01e167d71e95ffec056e9a2"
20
+ }
21
+ },
22
+ "consumer": {
23
+ "repository": "Fortemi/fortemi-react",
24
+ "issue": 405,
25
+ "backend": "remote",
26
+ "test": "src/__tests__/remote-rest-contract.test.ts",
27
+ "response": "schema validation before projection; semantic note/total/evidence checks retained",
28
+ "requestSubset": [
29
+ "q",
30
+ "mode",
31
+ "limit",
32
+ "tags"
33
+ ],
34
+ "requestLimits": {
35
+ "minimum": 1,
36
+ "maximum": 100,
37
+ "default": 20
38
+ },
39
+ "defaultMode": "fts",
40
+ "unsupportedOptions": "rejected before I/O; candidate schema is not additional feature authorization"
41
+ },
42
+ "claims": {
43
+ "promotedContract": false,
44
+ "fullIssueAcceptance": false,
45
+ "suiteParity": false,
46
+ "evidenceLocators": false,
47
+ "liveProducerAcceptance": false,
48
+ "publishedRuntimeAcceptance": false
49
+ },
50
+ "priorReceipt": "contract.receipt.json is retained unchanged for historical predicate/evidence adoption"
51
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "schemaVersion": "fortemi.search-rest-vectors.candidate.v1",
3
+ "boundary": "Synthetic schema and actual Rust wire checks, not fresh live HTTP, authorization or released-consumer qualification. Cross-field and evidence-binding semantic negatives also run in search_contract::tests.",
4
+ "requests": [
5
+ {"id":"empty-text-defaults","valid":true,"value":{"q":""}},
6
+ {"id":"legacy-unknown-mode","valid":true,"value":{"q":"x","mode":"legacy-unknown","limit":0,"since":"ignored-invalid"}},
7
+ {"id":"upper-limit-and-clamped-diversity","valid":true,"value":{"q":"x","limit":1000,"diversity":2}},
8
+ {"id":"decoded-json-content","valid":true,"value":{"q":"x","metadata_predicates":[],"strict_filter":{"min_tag_count":null,"unknown_ignored":true}}},
9
+ {"id":"missing-query","valid":false,"value":{"limit":1}},
10
+ {"id":"negative-limit","valid":false,"value":{"q":"x","limit":-1}},
11
+ {"id":"over-limit","valid":false,"value":{"q":"x","limit":1001}},
12
+ {"id":"non-integer-limit","valid":false,"value":{"q":"x","limit":1.5}},
13
+ {"id":"invalid-date","valid":false,"value":{"q":"x","created_after":"invalid"}},
14
+ {"id":"outside-f32","valid":false,"value":{"q":"x","diversity":1e100}},
15
+ {"id":"bad-strict-boolean","valid":false,"value":{"q":"x","strict_filter":{"include_untagged":0}}},
16
+ {"id":"unknown-metadata-field","valid":false,"value":{"q":"x","metadata_predicates":[{"field":"unknown","op":"eq","value":"x"}]}}
17
+ ],
18
+ "responses": [
19
+ {"id":"legacy-empty","valid":true,"value":{"results":[],"query":"","total":0,"degraded":false}},
20
+ {"id":"legacy-hit","valid":true,"value":{"results":[{"note_id":"00000000-0000-0000-0000-000000000001","score":0.5,"snippet":null}],"query":"x","total":1,"degraded":false}},
21
+ {"id":"explicit-degradation","valid":true,"value":{"results":[],"query":"x","total":0,"degraded":true,"degradation":{"code":"embedding_unavailable","effective_mode":"fts"}}},
22
+ {"id":"missing-query","valid":false,"value":{"results":[],"total":0,"degraded":false}},
23
+ {"id":"missing-degradation","valid":false,"value":{"results":[],"query":"x","total":0,"degraded":true}},
24
+ {"id":"null-is-not-absent","valid":false,"value":{"results":[],"query":"x","total":0,"degraded":false,"degradation":null}},
25
+ {"id":"wrong-effective-mode","valid":false,"value":{"results":[],"query":"x","total":0,"degraded":true,"degradation":{"code":"embedding_unavailable","effective_mode":"semantic"}}},
26
+ {"id":"null-evidence","valid":false,"value":{"results":[{"note_id":"00000000-0000-0000-0000-000000000001","score":0.5,"snippet":"display","evidence":null}],"query":"x","total":1,"degraded":false}}
27
+ ]
28
+ }