memoryking 0.1.0__py3-none-any.whl
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.
- memoryking/__init__.py +3 -0
- memoryking/__main__.py +1328 -0
- memoryking/adapters/__init__.py +1 -0
- memoryking/adapters/adapter_state.py +242 -0
- memoryking/adapters/anchor_schema.sql +7 -0
- memoryking/adapters/atlas.py +441 -0
- memoryking/adapters/browser_commands.py +125 -0
- memoryking/adapters/dashboard.py +510 -0
- memoryking/adapters/dense_search.py +86 -0
- memoryking/adapters/egress_policy.py +244 -0
- memoryking/adapters/egress_schema.sql +13 -0
- memoryking/adapters/embedding.schema.json +302 -0
- memoryking/adapters/embedding_store.py +469 -0
- memoryking/adapters/execution.py +369 -0
- memoryking/adapters/experience.py +423 -0
- memoryking/adapters/experience.schema.json +1508 -0
- memoryking/adapters/experience_records.py +239 -0
- memoryking/adapters/experience_schema.sql +23 -0
- memoryking/adapters/handoff.py +494 -0
- memoryking/adapters/handoff.schema.json +299 -0
- memoryking/adapters/handoff_schema.sql +17 -0
- memoryking/adapters/index_schema.sql +11 -0
- memoryking/adapters/inference.py +454 -0
- memoryking/adapters/inference.schema.json +541 -0
- memoryking/adapters/inspection.py +1128 -0
- memoryking/adapters/inspection.schema.json +568 -0
- memoryking/adapters/knowledge.schema.json +633 -0
- memoryking/adapters/knowledge_schema.sql +37 -0
- memoryking/adapters/knowledge_store.py +800 -0
- memoryking/adapters/legacy_snapshot.py +358 -0
- memoryking/adapters/legacy_tables.py +49 -0
- memoryking/adapters/local_contract.py +45 -0
- memoryking/adapters/local_embeddings.py +189 -0
- memoryking/adapters/local_files.py +242 -0
- memoryking/adapters/local_ipc.py +258 -0
- memoryking/adapters/local_schema.sql +44 -0
- memoryking/adapters/local_store.py +632 -0
- memoryking/adapters/local_wire.schema.json +7672 -0
- memoryking/adapters/models/minilm-l6-v2-onnx.json +57 -0
- memoryking/adapters/models/ms-marco-minilm-l6-v2-onnx.json +57 -0
- memoryking/adapters/optional_schema.sql +43 -0
- memoryking/adapters/plan_dashboard.py +51 -0
- memoryking/adapters/plans.py +253 -0
- memoryking/adapters/postgres_admin.py +300 -0
- memoryking/adapters/postgres_anchor_schema.sql +9 -0
- memoryking/adapters/postgres_counter.sql +14 -0
- memoryking/adapters/postgres_egress_schema.sql +15 -0
- memoryking/adapters/postgres_experience_schema.sql +39 -0
- memoryking/adapters/postgres_index_schema.sql +7 -0
- memoryking/adapters/postgres_optional_schema.sql +71 -0
- memoryking/adapters/postgres_pool.py +77 -0
- memoryking/adapters/postgres_recovery.py +525 -0
- memoryking/adapters/postgres_schema.sql +365 -0
- memoryking/adapters/postgres_sql.py +102 -0
- memoryking/adapters/postgres_store.py +428 -0
- memoryking/adapters/postgres_summary_schema.sql +12 -0
- memoryking/adapters/postgres_trust_schema.sql +20 -0
- memoryking/adapters/processing.schema.json +471 -0
- memoryking/adapters/processing_store.py +346 -0
- memoryking/adapters/projects.py +83 -0
- memoryking/adapters/proposals.py +238 -0
- memoryking/adapters/ranking.py +315 -0
- memoryking/adapters/repository.schema.json +664 -0
- memoryking/adapters/repository_git.py +264 -0
- memoryking/adapters/repository_schema.sql +25 -0
- memoryking/adapters/repository_store.py +960 -0
- memoryking/adapters/retrieval.py +1285 -0
- memoryking/adapters/retrieval.schema.json +553 -0
- memoryking/adapters/retrieval_schema.sql +10 -0
- memoryking/adapters/shared_control.py +40 -0
- memoryking/adapters/shared_dashboard.py +636 -0
- memoryking/adapters/shared_gateway.py +63 -0
- memoryking/adapters/shared_http.py +216 -0
- memoryking/adapters/shared_mcp.py +159 -0
- memoryking/adapters/shared_service.py +124 -0
- memoryking/adapters/stdio.py +193 -0
- memoryking/adapters/stdio.tools.json +6776 -0
- memoryking/adapters/summary_schema.sql +10 -0
- memoryking/adapters/team.py +253 -0
- memoryking/adapters/timeline.py +80 -0
- memoryking/adapters/token_count.py +55 -0
- memoryking/adapters/tokenizers/LICENSE +21 -0
- memoryking/adapters/tokenizers/cl100k_base.tiktoken +100256 -0
- memoryking/adapters/trust.py +123 -0
- memoryking/adapters/trust_schema.sql +13 -0
- memoryking/adapters/web/app.css +1251 -0
- memoryking/adapters/web/app.js +907 -0
- memoryking/adapters/web/brand.js +44 -0
- memoryking/adapters/web/crown-mono.svg +1 -0
- memoryking/adapters/web/crown.svg +8 -0
- memoryking/adapters/web/elephant.png +0 -0
- memoryking/adapters/web/favicon.svg +8 -0
- memoryking/adapters/web/graph-layout.js +52 -0
- memoryking/adapters/web/graph-worker.js +10 -0
- memoryking/adapters/web/graph.js +570 -0
- memoryking/adapters/web/index.html +208 -0
- memoryking/adapters/web/observatory.js +1208 -0
- memoryking/adapters/web/team.js +151 -0
- memoryking/adapters/web/wordmark.svg +1 -0
- memoryking/adapters/working.py +971 -0
- memoryking/adapters/working.schema.json +1717 -0
- memoryking/adapters/working_schema.sql +24 -0
- memoryking/application/__init__.py +1 -0
- memoryking/application/conformance.py +50 -0
- memoryking/application/legacy_import.py +337 -0
- memoryking/application/local_port.py +9 -0
- memoryking/application/storage.py +117 -0
- memoryking/application/store_core.py +1292 -0
- memoryking/backups.py +131 -0
- memoryking/contracts/__init__.py +6 -0
- memoryking/contracts/__main__.py +20 -0
- memoryking/contracts/canonical.py +88 -0
- memoryking/contracts/embedding.schema.json +302 -0
- memoryking/contracts/embedding_generated.py +65 -0
- memoryking/contracts/experience.schema.json +1508 -0
- memoryking/contracts/experience_generated.py +239 -0
- memoryking/contracts/generated.py +122 -0
- memoryking/contracts/handoff.schema.json +299 -0
- memoryking/contracts/handoff_generated.py +69 -0
- memoryking/contracts/inference.schema.json +541 -0
- memoryking/contracts/inference_generated.py +106 -0
- memoryking/contracts/processing.schema.json +471 -0
- memoryking/contracts/processing_generated.py +82 -0
- memoryking/contracts/py.typed +0 -0
- memoryking/contracts/repository.schema.json +664 -0
- memoryking/contracts/repository_generated.py +144 -0
- memoryking/contracts/retrieval.schema.json +553 -0
- memoryking/contracts/retrieval_generated.py +110 -0
- memoryking/contracts/schema.json +696 -0
- memoryking/contracts/validation.py +92 -0
- memoryking/contracts/working.schema.json +1717 -0
- memoryking/contracts/working_generated.py +291 -0
- memoryking/domain/__init__.py +1 -0
- memoryking/domain/anchors.py +97 -0
- memoryking/domain/briefing.py +108 -0
- memoryking/domain/briefing_text.py +222 -0
- memoryking/domain/checkpoint.py +118 -0
- memoryking/domain/compression.py +64 -0
- memoryking/domain/delta.py +129 -0
- memoryking/domain/embeddings.py +90 -0
- memoryking/domain/hints.py +465 -0
- memoryking/domain/http_status.py +45 -0
- memoryking/domain/learning.py +62 -0
- memoryking/domain/local.py +65 -0
- memoryking/domain/plans.py +140 -0
- memoryking/domain/repository.py +118 -0
- memoryking/domain/selectors.py +356 -0
- memoryking/domain/summary.py +88 -0
- memoryking/domain/usage.py +163 -0
- memoryking/embedding_loop.py +98 -0
- memoryking/embedding_worker.py +131 -0
- memoryking/harness.py +882 -0
- memoryking/harness_context.py +376 -0
- memoryking/hooks.py +171 -0
- memoryking/host_hooks.py +454 -0
- memoryking/lean.py +352 -0
- memoryking/memory_tool.py +776 -0
- memoryking/migration.py +194 -0
- memoryking/model_install.py +78 -0
- memoryking/observability.py +101 -0
- memoryking/observability_metrics.py +100 -0
- memoryking/profiles.py +150 -0
- memoryking/providers.py +330 -0
- memoryking/py.typed +0 -0
- memoryking/pytest_plugin.py +69 -0
- memoryking/reference_agent.py +152 -0
- memoryking/repository_worker.py +57 -0
- memoryking/resume_adapter.py +154 -0
- memoryking/sdk.py +302 -0
- memoryking/shared.py +301 -0
- memoryking/shared_sdk.py +101 -0
- memoryking/vault.py +176 -0
- memoryking-0.1.0.dist-info/METADATA +157 -0
- memoryking-0.1.0.dist-info/RECORD +179 -0
- memoryking-0.1.0.dist-info/WHEEL +5 -0
- memoryking-0.1.0.dist-info/entry_points.txt +7 -0
- memoryking-0.1.0.dist-info/licenses/LICENSE +202 -0
- memoryking-0.1.0.dist-info/licenses/NOTICE +12 -0
- memoryking-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://memoryking.invalid/contracts/handoff-v1",
|
|
4
|
+
"title": "MemoryKing recipient-bound full handoffs v1",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"version": {
|
|
10
|
+
"const": 1
|
|
11
|
+
},
|
|
12
|
+
"incarnation": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
|
|
15
|
+
},
|
|
16
|
+
"action": {
|
|
17
|
+
"const": "prepare"
|
|
18
|
+
},
|
|
19
|
+
"key": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
22
|
+
},
|
|
23
|
+
"args": {
|
|
24
|
+
"$ref": "#/$defs/Prepare"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"required": [
|
|
28
|
+
"version",
|
|
29
|
+
"incarnation",
|
|
30
|
+
"action",
|
|
31
|
+
"key",
|
|
32
|
+
"args"
|
|
33
|
+
],
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"version": {
|
|
40
|
+
"const": 1
|
|
41
|
+
},
|
|
42
|
+
"incarnation": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
|
|
45
|
+
},
|
|
46
|
+
"action": {
|
|
47
|
+
"const": "materialize"
|
|
48
|
+
},
|
|
49
|
+
"key": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
52
|
+
},
|
|
53
|
+
"args": {
|
|
54
|
+
"$ref": "#/$defs/View"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": [
|
|
58
|
+
"version",
|
|
59
|
+
"incarnation",
|
|
60
|
+
"action",
|
|
61
|
+
"key",
|
|
62
|
+
"args"
|
|
63
|
+
],
|
|
64
|
+
"additionalProperties": false
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "object",
|
|
68
|
+
"properties": {
|
|
69
|
+
"version": {
|
|
70
|
+
"const": 1
|
|
71
|
+
},
|
|
72
|
+
"incarnation": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
|
|
75
|
+
},
|
|
76
|
+
"action": {
|
|
77
|
+
"const": "preview"
|
|
78
|
+
},
|
|
79
|
+
"key": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
82
|
+
},
|
|
83
|
+
"args": {
|
|
84
|
+
"$ref": "#/$defs/View"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": [
|
|
88
|
+
"version",
|
|
89
|
+
"incarnation",
|
|
90
|
+
"action",
|
|
91
|
+
"key",
|
|
92
|
+
"args"
|
|
93
|
+
],
|
|
94
|
+
"additionalProperties": false
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "object",
|
|
98
|
+
"properties": {
|
|
99
|
+
"version": {
|
|
100
|
+
"const": 1
|
|
101
|
+
},
|
|
102
|
+
"incarnation": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
|
|
105
|
+
},
|
|
106
|
+
"action": {
|
|
107
|
+
"const": "ack"
|
|
108
|
+
},
|
|
109
|
+
"key": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
112
|
+
},
|
|
113
|
+
"args": {
|
|
114
|
+
"$ref": "#/$defs/Acknowledge"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"required": [
|
|
118
|
+
"version",
|
|
119
|
+
"incarnation",
|
|
120
|
+
"action",
|
|
121
|
+
"key",
|
|
122
|
+
"args"
|
|
123
|
+
],
|
|
124
|
+
"additionalProperties": false
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "object",
|
|
128
|
+
"properties": {
|
|
129
|
+
"version": {
|
|
130
|
+
"const": 1
|
|
131
|
+
},
|
|
132
|
+
"incarnation": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
|
|
135
|
+
},
|
|
136
|
+
"action": {
|
|
137
|
+
"const": "cancel"
|
|
138
|
+
},
|
|
139
|
+
"key": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
142
|
+
},
|
|
143
|
+
"args": {
|
|
144
|
+
"$ref": "#/$defs/Cancel"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"required": [
|
|
148
|
+
"version",
|
|
149
|
+
"incarnation",
|
|
150
|
+
"action",
|
|
151
|
+
"key",
|
|
152
|
+
"args"
|
|
153
|
+
],
|
|
154
|
+
"additionalProperties": false
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"$defs": {
|
|
158
|
+
"Prepare": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"properties": {
|
|
161
|
+
"project": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
164
|
+
},
|
|
165
|
+
"task": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
168
|
+
},
|
|
169
|
+
"run": {
|
|
170
|
+
"anyOf": [
|
|
171
|
+
{
|
|
172
|
+
"type": "string",
|
|
173
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"type": "null"
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"checkpoint": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
183
|
+
},
|
|
184
|
+
"recipient": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
187
|
+
},
|
|
188
|
+
"role": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
191
|
+
},
|
|
192
|
+
"stage": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
195
|
+
},
|
|
196
|
+
"bindings": {
|
|
197
|
+
"type": "array",
|
|
198
|
+
"minItems": 1,
|
|
199
|
+
"maxItems": 256,
|
|
200
|
+
"items": {
|
|
201
|
+
"type": "object"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"ttl_ms": {
|
|
205
|
+
"type": "integer",
|
|
206
|
+
"minimum": 1000,
|
|
207
|
+
"maximum": 86400000
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"required": [
|
|
211
|
+
"project",
|
|
212
|
+
"task",
|
|
213
|
+
"run",
|
|
214
|
+
"checkpoint",
|
|
215
|
+
"recipient",
|
|
216
|
+
"role",
|
|
217
|
+
"stage",
|
|
218
|
+
"bindings",
|
|
219
|
+
"ttl_ms"
|
|
220
|
+
],
|
|
221
|
+
"additionalProperties": false
|
|
222
|
+
},
|
|
223
|
+
"View": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"properties": {
|
|
226
|
+
"project": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
229
|
+
},
|
|
230
|
+
"handle": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
233
|
+
},
|
|
234
|
+
"max_output_tokens": {
|
|
235
|
+
"type": "integer",
|
|
236
|
+
"minimum": 1,
|
|
237
|
+
"maximum": 65536
|
|
238
|
+
},
|
|
239
|
+
"tokenizer": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"required": [
|
|
245
|
+
"project",
|
|
246
|
+
"handle",
|
|
247
|
+
"max_output_tokens",
|
|
248
|
+
"tokenizer"
|
|
249
|
+
],
|
|
250
|
+
"additionalProperties": false
|
|
251
|
+
},
|
|
252
|
+
"Acknowledge": {
|
|
253
|
+
"type": "object",
|
|
254
|
+
"properties": {
|
|
255
|
+
"project": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
258
|
+
},
|
|
259
|
+
"handle": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
262
|
+
},
|
|
263
|
+
"materialization": {
|
|
264
|
+
"type": "string",
|
|
265
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
266
|
+
},
|
|
267
|
+
"rendered_hash": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"pattern": "^[a-f0-9]{64}(?![\\s\\S])"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"required": [
|
|
273
|
+
"project",
|
|
274
|
+
"handle",
|
|
275
|
+
"materialization",
|
|
276
|
+
"rendered_hash"
|
|
277
|
+
],
|
|
278
|
+
"additionalProperties": false
|
|
279
|
+
},
|
|
280
|
+
"Cancel": {
|
|
281
|
+
"type": "object",
|
|
282
|
+
"properties": {
|
|
283
|
+
"project": {
|
|
284
|
+
"type": "string",
|
|
285
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
286
|
+
},
|
|
287
|
+
"handle": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"required": [
|
|
293
|
+
"project",
|
|
294
|
+
"handle"
|
|
295
|
+
],
|
|
296
|
+
"additionalProperties": false
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
BEGIN IMMEDIATE;
|
|
2
|
+
CREATE TABLE IF NOT EXISTS handoffs (
|
|
3
|
+
tenant TEXT NOT NULL REFERENCES tenants, id TEXT NOT NULL, project TEXT NOT NULL,
|
|
4
|
+
task TEXT NOT NULL, stream TEXT NOT NULL, checkpoint TEXT NOT NULL,
|
|
5
|
+
sender TEXT NOT NULL, recipient TEXT NOT NULL, role TEXT NOT NULL, stage TEXT NOT NULL,
|
|
6
|
+
bindings TEXT NOT NULL, incarnation TEXT NOT NULL, created INTEGER NOT NULL,
|
|
7
|
+
expires INTEGER NOT NULL, state TEXT NOT NULL, stream_revision INTEGER NOT NULL,
|
|
8
|
+
ack_view TEXT,
|
|
9
|
+
PRIMARY KEY(tenant,id));
|
|
10
|
+
CREATE INDEX IF NOT EXISTS handoff_scope ON handoffs(tenant,project,task,stream,sender,recipient);
|
|
11
|
+
CREATE TABLE IF NOT EXISTS handoff_views (
|
|
12
|
+
tenant TEXT NOT NULL REFERENCES tenants, id TEXT NOT NULL, handoff TEXT NOT NULL,
|
|
13
|
+
actor TEXT NOT NULL, mode TEXT NOT NULL, stamp TEXT NOT NULL, body_hash TEXT NOT NULL,
|
|
14
|
+
status TEXT NOT NULL, created INTEGER NOT NULL,
|
|
15
|
+
PRIMARY KEY(tenant,id), FOREIGN KEY(tenant,handoff) REFERENCES handoffs(tenant,id));
|
|
16
|
+
PRAGMA user_version=5;
|
|
17
|
+
COMMIT;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
BEGIN IMMEDIATE;
|
|
2
|
+
-- Hot-path indexes for tables that only grow: queue scans, per-project candidate windows
|
|
3
|
+
-- and lookups by observation during purge, drain and projection maintenance.
|
|
4
|
+
CREATE INDEX IF NOT EXISTS jobs_queue ON jobs(tenant,state,available,position);
|
|
5
|
+
CREATE INDEX IF NOT EXISTS jobs_observation ON jobs(tenant,observation);
|
|
6
|
+
CREATE INDEX IF NOT EXISTS observations_scope ON observations(tenant,project,position);
|
|
7
|
+
CREATE INDEX IF NOT EXISTS retries_observation ON retries(tenant,observation);
|
|
8
|
+
CREATE INDEX IF NOT EXISTS embedding_items_observation ON embedding_items(tenant,observation);
|
|
9
|
+
CREATE INDEX IF NOT EXISTS receipts_evaluated ON receipts(tenant,evaluated);
|
|
10
|
+
PRAGMA user_version=9;
|
|
11
|
+
COMMIT;
|