@askdkc/kiokuko 0.1.23 → 0.1.25
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/dist/agent-file/render.d.ts +1 -1
- package/dist/agent-file/render.d.ts.map +1 -1
- package/dist/agent-file/render.js +7 -6
- package/dist/agent-file/render.js.map +1 -1
- package/dist/akinator/agent-task.d.ts +7 -0
- package/dist/akinator/agent-task.d.ts.map +1 -1
- package/dist/akinator/agent-task.js +31 -16
- package/dist/akinator/agent-task.js.map +1 -1
- package/dist/akinator/capabilities.d.ts +3 -0
- package/dist/akinator/capabilities.d.ts.map +1 -1
- package/dist/akinator/capabilities.js +11 -0
- package/dist/akinator/capabilities.js.map +1 -1
- package/dist/akinator/service.js +2 -2
- package/dist/akinator/service.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +11 -4
- package/dist/cli.js.map +1 -1
- package/dist/commands/setup.d.ts +3 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +71 -2
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/use.d.ts +2 -1
- package/dist/commands/use.d.ts.map +1 -1
- package/dist/commands/use.js +20 -5
- package/dist/commands/use.js.map +1 -1
- package/dist/context/feedback.d.ts +2 -3
- package/dist/context/feedback.d.ts.map +1 -1
- package/dist/context/feedback.js +2 -3
- package/dist/context/feedback.js.map +1 -1
- package/dist/context/selection-state.d.ts +3 -2
- package/dist/context/selection-state.d.ts.map +1 -1
- package/dist/context/selection-state.js +8 -2
- package/dist/context/selection-state.js.map +1 -1
- package/dist/ledger/checkpoint-contract.d.ts +139 -2
- package/dist/ledger/checkpoint-contract.d.ts.map +1 -1
- package/dist/ledger/checkpoint-contract.js +85 -1
- package/dist/ledger/checkpoint-contract.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +11 -51
- package/dist/mcp/server.js.map +1 -1
- package/dist/memory/checkpoint-contract.d.ts +490 -0
- package/dist/memory/checkpoint-contract.d.ts.map +1 -0
- package/dist/memory/checkpoint-contract.js +105 -0
- package/dist/memory/checkpoint-contract.js.map +1 -0
- package/dist/memory/curator-trust.d.ts +15 -0
- package/dist/memory/curator-trust.d.ts.map +1 -0
- package/dist/memory/curator-trust.js +58 -0
- package/dist/memory/curator-trust.js.map +1 -0
- package/dist/memory/curator.d.ts +2 -2
- package/dist/memory/curator.d.ts.map +1 -1
- package/dist/memory/curator.js +47 -15
- package/dist/memory/curator.js.map +1 -1
- package/dist/memory/scoped-memory.d.ts +9 -3
- package/dist/memory/scoped-memory.d.ts.map +1 -1
- package/dist/memory/scoped-memory.js +198 -109
- package/dist/memory/scoped-memory.js.map +1 -1
- package/dist/repository/detect-root.d.ts +1 -0
- package/dist/repository/detect-root.d.ts.map +1 -1
- package/dist/repository/detect-root.js +1 -1
- package/dist/repository/detect-root.js.map +1 -1
- package/dist/server/routes/agent-capability-gate.d.ts.map +1 -1
- package/dist/server/routes/agent-capability-gate.js +10 -8
- package/dist/server/routes/agent-capability-gate.js.map +1 -1
- package/dist/server/routes/task5.js +1 -1
- package/dist/server/routes/task5.js.map +1 -1
- package/dist/setup/project-agent-refresh.d.ts +41 -0
- package/dist/setup/project-agent-refresh.d.ts.map +1 -0
- package/dist/setup/project-agent-refresh.js +157 -0
- package/dist/setup/project-agent-refresh.js.map +1 -0
- package/dist/setup/render.d.ts.map +1 -1
- package/dist/setup/render.js +13 -12
- package/dist/setup/render.js.map +1 -1
- package/package.json +1 -1
- package/templates/AGENTS.md +6 -5
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare const checkpointMemorySchema: z.ZodObject<{
|
|
3
|
+
kind: z.ZodEnum<{
|
|
4
|
+
fact: "fact";
|
|
5
|
+
decision: "decision";
|
|
6
|
+
lesson: "lesson";
|
|
7
|
+
preference: "preference";
|
|
8
|
+
reference: "reference";
|
|
9
|
+
}>;
|
|
10
|
+
title: z.ZodString;
|
|
11
|
+
body: z.ZodString;
|
|
12
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
13
|
+
scope: z.ZodDefault<z.ZodEnum<{
|
|
14
|
+
global: "global";
|
|
15
|
+
project: "project";
|
|
16
|
+
}>>;
|
|
17
|
+
retrievalScope: z.ZodOptional<z.ZodEnum<{
|
|
18
|
+
"project-only": "project-only";
|
|
19
|
+
ecosystem: "ecosystem";
|
|
20
|
+
global: "global";
|
|
21
|
+
}>>;
|
|
22
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
+
confidence: z.ZodDefault<z.ZodNumber>;
|
|
24
|
+
memoryClass: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
preference: "preference";
|
|
26
|
+
reference: "reference";
|
|
27
|
+
"implementation-pattern": "implementation-pattern";
|
|
28
|
+
troubleshooting: "troubleshooting";
|
|
29
|
+
"tool-usage": "tool-usage";
|
|
30
|
+
"extension-usage": "extension-usage";
|
|
31
|
+
configuration: "configuration";
|
|
32
|
+
workflow: "workflow";
|
|
33
|
+
gotcha: "gotcha";
|
|
34
|
+
}>>;
|
|
35
|
+
applicability: z.ZodOptional<z.ZodObject<{
|
|
36
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
|
+
frameworks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
version: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, z.core.$strict>>>;
|
|
41
|
+
databases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
|
+
runtimes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
44
|
+
platforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
45
|
+
}, z.core.$strict>>;
|
|
46
|
+
signals: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
49
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
|
+
packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
}, z.core.$strict>>;
|
|
53
|
+
portableReason: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
export declare const runBoundCheckpointSchema: z.ZodObject<{
|
|
56
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
57
|
+
runId: z.ZodString;
|
|
58
|
+
deliveryId: z.ZodOptional<z.ZodString>;
|
|
59
|
+
outcome: z.ZodEnum<{
|
|
60
|
+
completed: "completed";
|
|
61
|
+
failed: "failed";
|
|
62
|
+
cancelled: "cancelled";
|
|
63
|
+
interrupted: "interrupted";
|
|
64
|
+
}>;
|
|
65
|
+
memories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
66
|
+
kind: z.ZodEnum<{
|
|
67
|
+
fact: "fact";
|
|
68
|
+
decision: "decision";
|
|
69
|
+
lesson: "lesson";
|
|
70
|
+
preference: "preference";
|
|
71
|
+
reference: "reference";
|
|
72
|
+
}>;
|
|
73
|
+
title: z.ZodString;
|
|
74
|
+
body: z.ZodString;
|
|
75
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
76
|
+
scope: z.ZodDefault<z.ZodEnum<{
|
|
77
|
+
global: "global";
|
|
78
|
+
project: "project";
|
|
79
|
+
}>>;
|
|
80
|
+
retrievalScope: z.ZodOptional<z.ZodEnum<{
|
|
81
|
+
"project-only": "project-only";
|
|
82
|
+
ecosystem: "ecosystem";
|
|
83
|
+
global: "global";
|
|
84
|
+
}>>;
|
|
85
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
86
|
+
confidence: z.ZodDefault<z.ZodNumber>;
|
|
87
|
+
memoryClass: z.ZodOptional<z.ZodEnum<{
|
|
88
|
+
preference: "preference";
|
|
89
|
+
reference: "reference";
|
|
90
|
+
"implementation-pattern": "implementation-pattern";
|
|
91
|
+
troubleshooting: "troubleshooting";
|
|
92
|
+
"tool-usage": "tool-usage";
|
|
93
|
+
"extension-usage": "extension-usage";
|
|
94
|
+
configuration: "configuration";
|
|
95
|
+
workflow: "workflow";
|
|
96
|
+
gotcha: "gotcha";
|
|
97
|
+
}>>;
|
|
98
|
+
applicability: z.ZodOptional<z.ZodObject<{
|
|
99
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
100
|
+
frameworks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
version: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, z.core.$strict>>>;
|
|
104
|
+
databases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
105
|
+
runtimes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
106
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
107
|
+
platforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
108
|
+
}, z.core.$strict>>;
|
|
109
|
+
signals: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
111
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
112
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
113
|
+
packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
114
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
115
|
+
}, z.core.$strict>>;
|
|
116
|
+
portableReason: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, z.core.$strict>>>;
|
|
118
|
+
feedback: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
119
|
+
entryId: z.ZodString;
|
|
120
|
+
entryRevision: z.ZodNumber;
|
|
121
|
+
verdict: z.ZodEnum<{
|
|
122
|
+
stale: "stale";
|
|
123
|
+
helpful: "helpful";
|
|
124
|
+
irrelevant: "irrelevant";
|
|
125
|
+
conflicting: "conflicting";
|
|
126
|
+
}>;
|
|
127
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
128
|
+
}, z.core.$strict>>>;
|
|
129
|
+
evidence: z.ZodOptional<z.ZodObject<{
|
|
130
|
+
changedPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
131
|
+
errorSignatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
132
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
133
|
+
executable: z.ZodString;
|
|
134
|
+
classification: z.ZodOptional<z.ZodString>;
|
|
135
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
outcome: z.ZodEnum<{
|
|
137
|
+
unknown: "unknown";
|
|
138
|
+
failed: "failed";
|
|
139
|
+
passed: "passed";
|
|
140
|
+
}>;
|
|
141
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
142
|
+
}, z.core.$strict>>>;
|
|
143
|
+
tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
144
|
+
runner: z.ZodString;
|
|
145
|
+
target: z.ZodOptional<z.ZodString>;
|
|
146
|
+
outcome: z.ZodEnum<{
|
|
147
|
+
unknown: "unknown";
|
|
148
|
+
failed: "failed";
|
|
149
|
+
passed: "passed";
|
|
150
|
+
}>;
|
|
151
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
152
|
+
}, z.core.$strict>>>;
|
|
153
|
+
verification: z.ZodOptional<z.ZodObject<{
|
|
154
|
+
outcome: z.ZodEnum<{
|
|
155
|
+
unknown: "unknown";
|
|
156
|
+
failed: "failed";
|
|
157
|
+
fresh: "fresh";
|
|
158
|
+
stale: "stale";
|
|
159
|
+
}>;
|
|
160
|
+
}, z.core.$strict>>;
|
|
161
|
+
}, z.core.$strict>>;
|
|
162
|
+
}, z.core.$strict>;
|
|
163
|
+
export declare const standaloneMemoryCheckpointSchema: z.ZodObject<{
|
|
164
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
165
|
+
memories: z.ZodArray<z.ZodObject<{
|
|
166
|
+
kind: z.ZodEnum<{
|
|
167
|
+
fact: "fact";
|
|
168
|
+
decision: "decision";
|
|
169
|
+
lesson: "lesson";
|
|
170
|
+
preference: "preference";
|
|
171
|
+
reference: "reference";
|
|
172
|
+
}>;
|
|
173
|
+
title: z.ZodString;
|
|
174
|
+
body: z.ZodString;
|
|
175
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
176
|
+
scope: z.ZodDefault<z.ZodEnum<{
|
|
177
|
+
global: "global";
|
|
178
|
+
project: "project";
|
|
179
|
+
}>>;
|
|
180
|
+
retrievalScope: z.ZodOptional<z.ZodEnum<{
|
|
181
|
+
"project-only": "project-only";
|
|
182
|
+
ecosystem: "ecosystem";
|
|
183
|
+
global: "global";
|
|
184
|
+
}>>;
|
|
185
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
186
|
+
confidence: z.ZodDefault<z.ZodNumber>;
|
|
187
|
+
memoryClass: z.ZodOptional<z.ZodEnum<{
|
|
188
|
+
preference: "preference";
|
|
189
|
+
reference: "reference";
|
|
190
|
+
"implementation-pattern": "implementation-pattern";
|
|
191
|
+
troubleshooting: "troubleshooting";
|
|
192
|
+
"tool-usage": "tool-usage";
|
|
193
|
+
"extension-usage": "extension-usage";
|
|
194
|
+
configuration: "configuration";
|
|
195
|
+
workflow: "workflow";
|
|
196
|
+
gotcha: "gotcha";
|
|
197
|
+
}>>;
|
|
198
|
+
applicability: z.ZodOptional<z.ZodObject<{
|
|
199
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
200
|
+
frameworks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
201
|
+
name: z.ZodString;
|
|
202
|
+
version: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, z.core.$strict>>>;
|
|
204
|
+
databases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
205
|
+
runtimes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
206
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
207
|
+
platforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
208
|
+
}, z.core.$strict>>;
|
|
209
|
+
signals: z.ZodOptional<z.ZodObject<{
|
|
210
|
+
symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
211
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
212
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
213
|
+
packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
214
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
215
|
+
}, z.core.$strict>>;
|
|
216
|
+
portableReason: z.ZodOptional<z.ZodString>;
|
|
217
|
+
}, z.core.$strict>>;
|
|
218
|
+
}, z.core.$strict>;
|
|
219
|
+
export declare const memoryCheckpointVariantsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
220
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
221
|
+
runId: z.ZodString;
|
|
222
|
+
deliveryId: z.ZodOptional<z.ZodString>;
|
|
223
|
+
outcome: z.ZodEnum<{
|
|
224
|
+
completed: "completed";
|
|
225
|
+
failed: "failed";
|
|
226
|
+
cancelled: "cancelled";
|
|
227
|
+
interrupted: "interrupted";
|
|
228
|
+
}>;
|
|
229
|
+
memories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
230
|
+
kind: z.ZodEnum<{
|
|
231
|
+
fact: "fact";
|
|
232
|
+
decision: "decision";
|
|
233
|
+
lesson: "lesson";
|
|
234
|
+
preference: "preference";
|
|
235
|
+
reference: "reference";
|
|
236
|
+
}>;
|
|
237
|
+
title: z.ZodString;
|
|
238
|
+
body: z.ZodString;
|
|
239
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
240
|
+
scope: z.ZodDefault<z.ZodEnum<{
|
|
241
|
+
global: "global";
|
|
242
|
+
project: "project";
|
|
243
|
+
}>>;
|
|
244
|
+
retrievalScope: z.ZodOptional<z.ZodEnum<{
|
|
245
|
+
"project-only": "project-only";
|
|
246
|
+
ecosystem: "ecosystem";
|
|
247
|
+
global: "global";
|
|
248
|
+
}>>;
|
|
249
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
250
|
+
confidence: z.ZodDefault<z.ZodNumber>;
|
|
251
|
+
memoryClass: z.ZodOptional<z.ZodEnum<{
|
|
252
|
+
preference: "preference";
|
|
253
|
+
reference: "reference";
|
|
254
|
+
"implementation-pattern": "implementation-pattern";
|
|
255
|
+
troubleshooting: "troubleshooting";
|
|
256
|
+
"tool-usage": "tool-usage";
|
|
257
|
+
"extension-usage": "extension-usage";
|
|
258
|
+
configuration: "configuration";
|
|
259
|
+
workflow: "workflow";
|
|
260
|
+
gotcha: "gotcha";
|
|
261
|
+
}>>;
|
|
262
|
+
applicability: z.ZodOptional<z.ZodObject<{
|
|
263
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
264
|
+
frameworks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
265
|
+
name: z.ZodString;
|
|
266
|
+
version: z.ZodOptional<z.ZodString>;
|
|
267
|
+
}, z.core.$strict>>>;
|
|
268
|
+
databases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
269
|
+
runtimes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
270
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
271
|
+
platforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
272
|
+
}, z.core.$strict>>;
|
|
273
|
+
signals: z.ZodOptional<z.ZodObject<{
|
|
274
|
+
symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
275
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
276
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
277
|
+
packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
278
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
279
|
+
}, z.core.$strict>>;
|
|
280
|
+
portableReason: z.ZodOptional<z.ZodString>;
|
|
281
|
+
}, z.core.$strict>>>;
|
|
282
|
+
feedback: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
283
|
+
entryId: z.ZodString;
|
|
284
|
+
entryRevision: z.ZodNumber;
|
|
285
|
+
verdict: z.ZodEnum<{
|
|
286
|
+
stale: "stale";
|
|
287
|
+
helpful: "helpful";
|
|
288
|
+
irrelevant: "irrelevant";
|
|
289
|
+
conflicting: "conflicting";
|
|
290
|
+
}>;
|
|
291
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
292
|
+
}, z.core.$strict>>>;
|
|
293
|
+
evidence: z.ZodOptional<z.ZodObject<{
|
|
294
|
+
changedPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
295
|
+
errorSignatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
296
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
297
|
+
executable: z.ZodString;
|
|
298
|
+
classification: z.ZodOptional<z.ZodString>;
|
|
299
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
300
|
+
outcome: z.ZodEnum<{
|
|
301
|
+
unknown: "unknown";
|
|
302
|
+
failed: "failed";
|
|
303
|
+
passed: "passed";
|
|
304
|
+
}>;
|
|
305
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
306
|
+
}, z.core.$strict>>>;
|
|
307
|
+
tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
308
|
+
runner: z.ZodString;
|
|
309
|
+
target: z.ZodOptional<z.ZodString>;
|
|
310
|
+
outcome: z.ZodEnum<{
|
|
311
|
+
unknown: "unknown";
|
|
312
|
+
failed: "failed";
|
|
313
|
+
passed: "passed";
|
|
314
|
+
}>;
|
|
315
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
316
|
+
}, z.core.$strict>>>;
|
|
317
|
+
verification: z.ZodOptional<z.ZodObject<{
|
|
318
|
+
outcome: z.ZodEnum<{
|
|
319
|
+
unknown: "unknown";
|
|
320
|
+
failed: "failed";
|
|
321
|
+
fresh: "fresh";
|
|
322
|
+
stale: "stale";
|
|
323
|
+
}>;
|
|
324
|
+
}, z.core.$strict>>;
|
|
325
|
+
}, z.core.$strict>>;
|
|
326
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
327
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
328
|
+
memories: z.ZodArray<z.ZodObject<{
|
|
329
|
+
kind: z.ZodEnum<{
|
|
330
|
+
fact: "fact";
|
|
331
|
+
decision: "decision";
|
|
332
|
+
lesson: "lesson";
|
|
333
|
+
preference: "preference";
|
|
334
|
+
reference: "reference";
|
|
335
|
+
}>;
|
|
336
|
+
title: z.ZodString;
|
|
337
|
+
body: z.ZodString;
|
|
338
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
339
|
+
scope: z.ZodDefault<z.ZodEnum<{
|
|
340
|
+
global: "global";
|
|
341
|
+
project: "project";
|
|
342
|
+
}>>;
|
|
343
|
+
retrievalScope: z.ZodOptional<z.ZodEnum<{
|
|
344
|
+
"project-only": "project-only";
|
|
345
|
+
ecosystem: "ecosystem";
|
|
346
|
+
global: "global";
|
|
347
|
+
}>>;
|
|
348
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
349
|
+
confidence: z.ZodDefault<z.ZodNumber>;
|
|
350
|
+
memoryClass: z.ZodOptional<z.ZodEnum<{
|
|
351
|
+
preference: "preference";
|
|
352
|
+
reference: "reference";
|
|
353
|
+
"implementation-pattern": "implementation-pattern";
|
|
354
|
+
troubleshooting: "troubleshooting";
|
|
355
|
+
"tool-usage": "tool-usage";
|
|
356
|
+
"extension-usage": "extension-usage";
|
|
357
|
+
configuration: "configuration";
|
|
358
|
+
workflow: "workflow";
|
|
359
|
+
gotcha: "gotcha";
|
|
360
|
+
}>>;
|
|
361
|
+
applicability: z.ZodOptional<z.ZodObject<{
|
|
362
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
363
|
+
frameworks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
364
|
+
name: z.ZodString;
|
|
365
|
+
version: z.ZodOptional<z.ZodString>;
|
|
366
|
+
}, z.core.$strict>>>;
|
|
367
|
+
databases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
368
|
+
runtimes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
369
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
370
|
+
platforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
371
|
+
}, z.core.$strict>>;
|
|
372
|
+
signals: z.ZodOptional<z.ZodObject<{
|
|
373
|
+
symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
374
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
375
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
376
|
+
packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
377
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
378
|
+
}, z.core.$strict>>;
|
|
379
|
+
portableReason: z.ZodOptional<z.ZodString>;
|
|
380
|
+
}, z.core.$strict>>;
|
|
381
|
+
}, z.core.$strict>]>;
|
|
382
|
+
export declare const memoryCheckpointInputSchema: z.ZodObject<{
|
|
383
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
384
|
+
memories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
385
|
+
kind: z.ZodEnum<{
|
|
386
|
+
fact: "fact";
|
|
387
|
+
decision: "decision";
|
|
388
|
+
lesson: "lesson";
|
|
389
|
+
preference: "preference";
|
|
390
|
+
reference: "reference";
|
|
391
|
+
}>;
|
|
392
|
+
title: z.ZodString;
|
|
393
|
+
body: z.ZodString;
|
|
394
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
395
|
+
scope: z.ZodDefault<z.ZodEnum<{
|
|
396
|
+
global: "global";
|
|
397
|
+
project: "project";
|
|
398
|
+
}>>;
|
|
399
|
+
retrievalScope: z.ZodOptional<z.ZodEnum<{
|
|
400
|
+
"project-only": "project-only";
|
|
401
|
+
ecosystem: "ecosystem";
|
|
402
|
+
global: "global";
|
|
403
|
+
}>>;
|
|
404
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
405
|
+
confidence: z.ZodDefault<z.ZodNumber>;
|
|
406
|
+
memoryClass: z.ZodOptional<z.ZodEnum<{
|
|
407
|
+
preference: "preference";
|
|
408
|
+
reference: "reference";
|
|
409
|
+
"implementation-pattern": "implementation-pattern";
|
|
410
|
+
troubleshooting: "troubleshooting";
|
|
411
|
+
"tool-usage": "tool-usage";
|
|
412
|
+
"extension-usage": "extension-usage";
|
|
413
|
+
configuration: "configuration";
|
|
414
|
+
workflow: "workflow";
|
|
415
|
+
gotcha: "gotcha";
|
|
416
|
+
}>>;
|
|
417
|
+
applicability: z.ZodOptional<z.ZodObject<{
|
|
418
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
419
|
+
frameworks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
420
|
+
name: z.ZodString;
|
|
421
|
+
version: z.ZodOptional<z.ZodString>;
|
|
422
|
+
}, z.core.$strict>>>;
|
|
423
|
+
databases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
424
|
+
runtimes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
425
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
426
|
+
platforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
427
|
+
}, z.core.$strict>>;
|
|
428
|
+
signals: z.ZodOptional<z.ZodObject<{
|
|
429
|
+
symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
430
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
431
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
432
|
+
packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
433
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
434
|
+
}, z.core.$strict>>;
|
|
435
|
+
portableReason: z.ZodOptional<z.ZodString>;
|
|
436
|
+
}, z.core.$strict>>>;
|
|
437
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
438
|
+
deliveryId: z.ZodOptional<z.ZodString>;
|
|
439
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
440
|
+
completed: "completed";
|
|
441
|
+
failed: "failed";
|
|
442
|
+
cancelled: "cancelled";
|
|
443
|
+
interrupted: "interrupted";
|
|
444
|
+
}>>;
|
|
445
|
+
feedback: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
446
|
+
entryId: z.ZodString;
|
|
447
|
+
entryRevision: z.ZodNumber;
|
|
448
|
+
verdict: z.ZodEnum<{
|
|
449
|
+
stale: "stale";
|
|
450
|
+
helpful: "helpful";
|
|
451
|
+
irrelevant: "irrelevant";
|
|
452
|
+
conflicting: "conflicting";
|
|
453
|
+
}>;
|
|
454
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
455
|
+
}, z.core.$strict>>>;
|
|
456
|
+
evidence: z.ZodOptional<z.ZodObject<{
|
|
457
|
+
changedPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
458
|
+
errorSignatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
459
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
460
|
+
executable: z.ZodString;
|
|
461
|
+
classification: z.ZodOptional<z.ZodString>;
|
|
462
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
463
|
+
outcome: z.ZodEnum<{
|
|
464
|
+
unknown: "unknown";
|
|
465
|
+
failed: "failed";
|
|
466
|
+
passed: "passed";
|
|
467
|
+
}>;
|
|
468
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
469
|
+
}, z.core.$strict>>>;
|
|
470
|
+
tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
471
|
+
runner: z.ZodString;
|
|
472
|
+
target: z.ZodOptional<z.ZodString>;
|
|
473
|
+
outcome: z.ZodEnum<{
|
|
474
|
+
unknown: "unknown";
|
|
475
|
+
failed: "failed";
|
|
476
|
+
passed: "passed";
|
|
477
|
+
}>;
|
|
478
|
+
digest: z.ZodOptional<z.ZodString>;
|
|
479
|
+
}, z.core.$strict>>>;
|
|
480
|
+
verification: z.ZodOptional<z.ZodObject<{
|
|
481
|
+
outcome: z.ZodEnum<{
|
|
482
|
+
unknown: "unknown";
|
|
483
|
+
failed: "failed";
|
|
484
|
+
fresh: "fresh";
|
|
485
|
+
stale: "stale";
|
|
486
|
+
}>;
|
|
487
|
+
}, z.core.$strict>>;
|
|
488
|
+
}, z.core.$strict>>;
|
|
489
|
+
}, z.core.$strict>;
|
|
490
|
+
//# sourceMappingURL=checkpoint-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkpoint-contract.d.ts","sourceRoot":"","sources":["../../src/memory/checkpoint-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAoC5B,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAaxB,CAAC;AAmCZ,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQgD,CAAC;AAEtF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAGlC,CAAC;AAEZ,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAGzC,CAAC;AAsBH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQ0C,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { ENTRY_KINDS } from '../serialization/validate.js';
|
|
3
|
+
import { CHECKPOINT_OUTCOMES, CHECKPOINT_RUN_ID_DESCRIPTION, MAX_CHECKPOINT_FEEDBACK_ITEMS, MAX_CHECKPOINT_MEMORY_ITEMS, checkpointEvidenceSchema, checkpointFeedbackSchema, hasCheckpointEvidenceContent, } from '../ledger/checkpoint-contract.js';
|
|
4
|
+
const memoryKind = z.enum(ENTRY_KINDS);
|
|
5
|
+
const memoryClass = z.enum([
|
|
6
|
+
'implementation-pattern', 'troubleshooting', 'tool-usage', 'extension-usage',
|
|
7
|
+
'configuration', 'workflow', 'gotcha', 'reference', 'preference',
|
|
8
|
+
]);
|
|
9
|
+
const applicability = z.object({
|
|
10
|
+
languages: z.array(z.string().trim().min(1).max(500)).max(100).optional(),
|
|
11
|
+
frameworks: z.array(z.object({
|
|
12
|
+
name: z.string().trim().min(1).max(500),
|
|
13
|
+
version: z.string().trim().min(1).max(100).optional(),
|
|
14
|
+
}).strict()).max(50).optional(),
|
|
15
|
+
databases: z.array(z.string().trim().min(1).max(500)).max(100).optional(),
|
|
16
|
+
runtimes: z.array(z.string().trim().min(1).max(500)).max(100).optional(),
|
|
17
|
+
tools: z.array(z.string().trim().min(1).max(500)).max(100).optional(),
|
|
18
|
+
platforms: z.array(z.string().trim().min(1).max(500)).max(100).optional(),
|
|
19
|
+
}).strict();
|
|
20
|
+
const signals = z.object({
|
|
21
|
+
symbols: z.array(z.string().trim().min(1).max(500)).max(100).optional(),
|
|
22
|
+
paths: z.array(z.string().trim().min(1).max(500)).max(100).optional(),
|
|
23
|
+
errors: z.array(z.string().trim().min(1).max(500)).max(100).optional(),
|
|
24
|
+
packages: z.array(z.string().trim().min(1).max(500)).max(100).optional(),
|
|
25
|
+
commands: z.array(z.string().trim().min(1).max(500)).max(100).optional(),
|
|
26
|
+
}).strict();
|
|
27
|
+
export const checkpointMemorySchema = z.object({
|
|
28
|
+
kind: memoryKind,
|
|
29
|
+
title: z.string().trim().min(1).max(300),
|
|
30
|
+
body: z.string().max(20_000),
|
|
31
|
+
summary: z.string().max(2000).optional(),
|
|
32
|
+
scope: z.enum(['project', 'global']).default('project'),
|
|
33
|
+
retrievalScope: z.enum(['project-only', 'ecosystem', 'global']).optional(),
|
|
34
|
+
tags: z.array(z.string().trim().min(1).max(200)).max(20).optional(),
|
|
35
|
+
confidence: z.number().min(0).max(1).default(0.7),
|
|
36
|
+
memoryClass: memoryClass.optional(),
|
|
37
|
+
applicability: applicability.optional(),
|
|
38
|
+
signals: signals.optional(),
|
|
39
|
+
portableReason: z.string().trim().min(1).max(2000).optional(),
|
|
40
|
+
}).strict();
|
|
41
|
+
const checkpointRunId = z.string().min(1).max(256).refine((value) => value.trim() === value && !/\p{Cc}/u.test(value), { message: 'runId must be a canonical bounded identity' }).describe(CHECKPOINT_RUN_ID_DESCRIPTION);
|
|
42
|
+
const checkpointDeliveryId = z.string().min(1).max(256).refine((value) => value.trim() === value && !/\p{Cc}/u.test(value), { message: 'deliveryId must be a canonical bounded identity' });
|
|
43
|
+
function hasCheckpointContent(value) {
|
|
44
|
+
return (value.memories?.length ?? 0) > 0
|
|
45
|
+
|| (value.feedback?.length ?? 0) > 0
|
|
46
|
+
|| hasCheckpointEvidenceContent(value.evidence);
|
|
47
|
+
}
|
|
48
|
+
function addIssue(context, path, message) {
|
|
49
|
+
context.addIssue({ code: 'custom', path, message });
|
|
50
|
+
}
|
|
51
|
+
function refineRunBoundCheckpoint(value, context) {
|
|
52
|
+
if (value.outcome === undefined)
|
|
53
|
+
addIssue(context, ['outcome'], 'outcome is required when runId is supplied');
|
|
54
|
+
if (!hasCheckpointContent(value))
|
|
55
|
+
addIssue(context, [], 'A run-bound checkpoint requires memory, feedback, or non-empty evidence');
|
|
56
|
+
if ((value.feedback?.length ?? 0) > 0 && value.deliveryId === undefined) {
|
|
57
|
+
addIssue(context, ['deliveryId'], 'deliveryId is required when feedback is supplied');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export const runBoundCheckpointSchema = z.object({
|
|
61
|
+
cwd: z.string().min(1).optional(),
|
|
62
|
+
runId: checkpointRunId,
|
|
63
|
+
deliveryId: checkpointDeliveryId.optional(),
|
|
64
|
+
outcome: z.enum(CHECKPOINT_OUTCOMES),
|
|
65
|
+
memories: z.array(checkpointMemorySchema).max(MAX_CHECKPOINT_MEMORY_ITEMS).optional(),
|
|
66
|
+
feedback: z.array(checkpointFeedbackSchema).max(MAX_CHECKPOINT_FEEDBACK_ITEMS).optional(),
|
|
67
|
+
evidence: checkpointEvidenceSchema.optional(),
|
|
68
|
+
}).strict().superRefine((value, context) => refineRunBoundCheckpoint(value, context));
|
|
69
|
+
export const standaloneMemoryCheckpointSchema = z.object({
|
|
70
|
+
cwd: z.string().min(1).optional(),
|
|
71
|
+
memories: z.array(checkpointMemorySchema).min(1).max(MAX_CHECKPOINT_MEMORY_ITEMS),
|
|
72
|
+
}).strict();
|
|
73
|
+
export const memoryCheckpointVariantsSchema = z.union([
|
|
74
|
+
runBoundCheckpointSchema,
|
|
75
|
+
standaloneMemoryCheckpointSchema,
|
|
76
|
+
]);
|
|
77
|
+
function refineCheckpointInput(value, context) {
|
|
78
|
+
if (value.runId !== undefined) {
|
|
79
|
+
refineRunBoundCheckpoint(value, context);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if ((value.memories?.length ?? 0) === 0)
|
|
83
|
+
addIssue(context, ['memories'], 'Without runId, at least one memory is required');
|
|
84
|
+
if (value.outcome !== undefined)
|
|
85
|
+
addIssue(context, ['outcome'], 'outcome is only valid for a run-bound checkpoint');
|
|
86
|
+
if (value.deliveryId !== undefined)
|
|
87
|
+
addIssue(context, ['deliveryId'], 'deliveryId requires runId');
|
|
88
|
+
if (value.feedback !== undefined)
|
|
89
|
+
addIssue(context, ['feedback'], 'feedback requires runId');
|
|
90
|
+
if (value.evidence !== undefined)
|
|
91
|
+
addIssue(context, ['evidence'], 'evidence requires runId');
|
|
92
|
+
}
|
|
93
|
+
// The MCP SDK only serializes object schemas in tools/list; a union would be
|
|
94
|
+
// advertised as an empty schema. This closed object retains the same runtime
|
|
95
|
+
// cross-field contract while keeping the public property schema visible.
|
|
96
|
+
export const memoryCheckpointInputSchema = z.object({
|
|
97
|
+
cwd: z.string().min(1).optional(),
|
|
98
|
+
memories: z.array(checkpointMemorySchema).max(MAX_CHECKPOINT_MEMORY_ITEMS).optional(),
|
|
99
|
+
runId: checkpointRunId.optional(),
|
|
100
|
+
deliveryId: checkpointDeliveryId.optional(),
|
|
101
|
+
outcome: z.enum(CHECKPOINT_OUTCOMES).optional(),
|
|
102
|
+
feedback: z.array(checkpointFeedbackSchema).max(MAX_CHECKPOINT_FEEDBACK_ITEMS).optional(),
|
|
103
|
+
evidence: checkpointEvidenceSchema.optional(),
|
|
104
|
+
}).strict().superRefine((value, context) => refineCheckpointInput(value, context));
|
|
105
|
+
//# sourceMappingURL=checkpoint-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkpoint-contract.js","sourceRoot":"","sources":["../../src/memory/checkpoint-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,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CAAC,CAAC;IACnG,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS;QAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,yBAAyB,CAAC,CAAC;IAC7F,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS;QAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,yBAAyB,CAAC,CAAC;AAC/F,CAAC;AAED,6EAA6E;AAC7E,6EAA6E;AAC7E,yEAAyE;AACzE,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACjC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC,QAAQ,EAAE;IACrF,KAAK,EAAE,eAAe,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,QAAQ,EAAE;IAC/C,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC,QAAQ,EAAE;IACzF,QAAQ,EAAE,wBAAwB,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { EntryRecord } from './entries.js';
|
|
2
|
+
export declare const CURATOR_DRAFT_VERSION: "deterministic-v1";
|
|
3
|
+
export declare const CURATOR_MEMORY_ACTOR: "kiokuko-curator";
|
|
4
|
+
type CuratorTrustInput = Pick<EntryRecord, 'workspace' | 'status' | 'scope' | 'provenance' | 'trustLevel' | 'revision' | 'verifiedAt' | 'createdBy' | 'createdAt' | 'updatedAt' | 'tags'>;
|
|
5
|
+
/** Identify a current Curator projection whose provenance and lifecycle are system-verified. */
|
|
6
|
+
export declare function isTrustedCuratorGlobalMemory(entry: CuratorTrustInput): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Preserve intake compatibility for deterministic Curator rows written before
|
|
9
|
+
* Curator projections became system-verified. A replay through Curator upgrades
|
|
10
|
+
* this exact legacy lifecycle without changing its content revision.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isLegacyCuratorGlobalMemory(entry: CuratorTrustInput): boolean;
|
|
13
|
+
export declare function isCuratorManagedGlobalMemory(entry: CuratorTrustInput): boolean;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=curator-trust.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"curator-trust.d.ts","sourceRoot":"","sources":["../../src/memory/curator-trust.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,eAAO,MAAM,qBAAqB,EAAG,kBAA2B,CAAC;AACjE,eAAO,MAAM,oBAAoB,EAAG,iBAA0B,CAAC;AAa/D,KAAK,iBAAiB,GAAG,IAAI,CAAC,WAAW,EACvC,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,YAAY,GAAG,UAAU,GACzE,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,MAAM,CAClE,CAAC;AAuBF,gGAAgG;AAChG,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAK9E;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAK7E;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAE9E"}
|