dsh-daoing-memory 0.1.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/LICENSE +21 -0
- package/README.md +91 -0
- package/README.zh-CN.md +91 -0
- package/cordis.patch.yml +22 -0
- package/lib/client.js +10339 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +3138 -0
- package/lib/invariant.js +33 -0
- package/lib/tools.js +1472 -0
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +4058 -0
- package/lib/typert.remote-client.d.ts +149 -0
- package/lib/typert.remote-client.d.ts.map +1 -0
- package/lib/typert.remote-client.js +3167 -0
- package/lib/types/client/ExperiencePage.d.ts +15 -0
- package/lib/types/client/ExperiencePage.d.ts.map +1 -0
- package/lib/types/client/ExperiencePage.js +117 -0
- package/lib/types/client/ExperiencePage.js.map +1 -0
- package/lib/types/client/FactDiaryPage.d.ts +17 -0
- package/lib/types/client/FactDiaryPage.d.ts.map +1 -0
- package/lib/types/client/FactDiaryPage.js +155 -0
- package/lib/types/client/FactDiaryPage.js.map +1 -0
- package/lib/types/client/HumanOpsPage.d.ts +16 -0
- package/lib/types/client/HumanOpsPage.d.ts.map +1 -0
- package/lib/types/client/HumanOpsPage.js +208 -0
- package/lib/types/client/HumanOpsPage.js.map +1 -0
- package/lib/types/client/LedgerPage.d.ts +13 -0
- package/lib/types/client/LedgerPage.d.ts.map +1 -0
- package/lib/types/client/LedgerPage.js +113 -0
- package/lib/types/client/LedgerPage.js.map +1 -0
- package/lib/types/client/MemoryNavSection.d.ts +20 -0
- package/lib/types/client/MemoryNavSection.d.ts.map +1 -0
- package/lib/types/client/MemoryNavSection.js +23 -0
- package/lib/types/client/MemoryNavSection.js.map +1 -0
- package/lib/types/client/Workbench.d.ts +23 -0
- package/lib/types/client/Workbench.d.ts.map +1 -0
- package/lib/types/client/Workbench.js +140 -0
- package/lib/types/client/Workbench.js.map +1 -0
- package/lib/types/client/actions.d.ts +165 -0
- package/lib/types/client/actions.d.ts.map +1 -0
- package/lib/types/client/actions.js +51 -0
- package/lib/types/client/actions.js.map +1 -0
- package/lib/types/client/index.d.ts +24 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/index.js +103 -0
- package/lib/types/client/index.js.map +1 -0
- package/lib/types/client/navStore.d.ts +45 -0
- package/lib/types/client/navStore.d.ts.map +1 -0
- package/lib/types/client/navStore.js +36 -0
- package/lib/types/client/navStore.js.map +1 -0
- package/lib/types/core.d.ts +195 -0
- package/lib/types/core.d.ts.map +1 -0
- package/lib/types/core.js +1304 -0
- package/lib/types/core.js.map +1 -0
- package/lib/types/index.d.ts +71 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +97 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/invariant.d.ts +21 -0
- package/lib/types/invariant.d.ts.map +1 -0
- package/lib/types/invariant.js +33 -0
- package/lib/types/invariant.js.map +1 -0
- package/lib/types/service.d.ts +130 -0
- package/lib/types/service.d.ts.map +1 -0
- package/lib/types/service.js +417 -0
- package/lib/types/service.js.map +1 -0
- package/lib/types/store.d.ts +244 -0
- package/lib/types/store.d.ts.map +1 -0
- package/lib/types/store.js +864 -0
- package/lib/types/store.js.map +1 -0
- package/lib/types/tools.d.ts +25 -0
- package/lib/types/tools.d.ts.map +1 -0
- package/lib/types/tools.js +1144 -0
- package/lib/types/tools.js.map +1 -0
- package/lib/types/types.d.ts +836 -0
- package/lib/types/types.d.ts.map +1 -0
- package/lib/types/types.js +8 -0
- package/lib/types/types.js.map +1 -0
- package/package.json +106 -0
- package/skill/memory-extraction.md +62 -0
|
@@ -0,0 +1,836 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory system wire vocabulary: experience lifecycle, recall adjudication,
|
|
3
|
+
* use reports with attribution, the diary/fact semantic layer, and the
|
|
4
|
+
* append-only ledger. Types only — no runtime code.
|
|
5
|
+
* @module dsh-daoing-memory/types
|
|
6
|
+
*/
|
|
7
|
+
/** Lifecycle status of one experience revision (005 §3 state machine + 006 §3 cold palace). */
|
|
8
|
+
export type ExperienceStatus = 'candidate' | 'live' | 'challenged' | 'superseded' | 'archived' | 'cold';
|
|
9
|
+
/** Positive = a path that works; negative = a confirmed dead end + reason. */
|
|
10
|
+
export type ExperienceKind = 'positive' | 'negative';
|
|
11
|
+
/** Where the experience came from: agent refinement or human injection. */
|
|
12
|
+
export type ExperienceSource = 'agent' | 'human';
|
|
13
|
+
/** One ordered step of an experience path. */
|
|
14
|
+
export interface ExperienceStep {
|
|
15
|
+
/** 1-based position in the path. */
|
|
16
|
+
order: number;
|
|
17
|
+
/** What to do at this step. */
|
|
18
|
+
action: string;
|
|
19
|
+
}
|
|
20
|
+
/** Episodic evidence pointer anchoring an experience to its source trace. */
|
|
21
|
+
export interface EvidenceRef {
|
|
22
|
+
/** Pointer to the original execution trace (id, path, or URI). */
|
|
23
|
+
traceRef?: string;
|
|
24
|
+
/** Pointer to the originating session. */
|
|
25
|
+
sessionRef?: string;
|
|
26
|
+
/** Free-text note describing the evidence. */
|
|
27
|
+
note?: string;
|
|
28
|
+
}
|
|
29
|
+
/** One experience revision as it crosses the wire. */
|
|
30
|
+
export interface ExperienceSnapshot {
|
|
31
|
+
/** Family id: stable across revisions of one experience line. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** Revision number within the family (1-based). */
|
|
34
|
+
revision: number;
|
|
35
|
+
/** Positive path or confirmed dead end. */
|
|
36
|
+
kind: ExperienceKind;
|
|
37
|
+
/** Who created it: agent refinement or human injection. */
|
|
38
|
+
source: ExperienceSource;
|
|
39
|
+
/** Task-family tag used by the per-family capacity budget. */
|
|
40
|
+
family: string;
|
|
41
|
+
/** One-sentence experience. */
|
|
42
|
+
gist: string;
|
|
43
|
+
/** Situations where this experience applies. */
|
|
44
|
+
situation: string[];
|
|
45
|
+
/** The actual path that worked (or the dead end that failed). */
|
|
46
|
+
path: ExperienceStep[];
|
|
47
|
+
/** Judgment background: why this path, what was weighed. */
|
|
48
|
+
reasoning: string;
|
|
49
|
+
/** Boundaries where this experience does NOT apply. */
|
|
50
|
+
limits: string[];
|
|
51
|
+
/** Lifecycle status of this revision. */
|
|
52
|
+
status: ExperienceStatus;
|
|
53
|
+
/** Beta posterior success count. */
|
|
54
|
+
alpha: number;
|
|
55
|
+
/** Beta posterior failure count. */
|
|
56
|
+
beta: number;
|
|
57
|
+
/** Total counted verification samples (alpha + beta). */
|
|
58
|
+
samples: number;
|
|
59
|
+
/** Beta posterior mean (alpha+1)/(alpha+beta+2). */
|
|
60
|
+
trust: number;
|
|
61
|
+
/** Recency-weighted trust (samples decay with age). */
|
|
62
|
+
weightedTrust: number;
|
|
63
|
+
/** Epoch ms of the last verification sample, absent when never verified. */
|
|
64
|
+
lastVerifiedAt?: number;
|
|
65
|
+
/** Human-pinned: never budget-archived, trust floored. */
|
|
66
|
+
pinned: boolean;
|
|
67
|
+
/** Economic value: tokens saved by following this experience. */
|
|
68
|
+
tokensSaved: number;
|
|
69
|
+
/** Economic value: tokens spent refining/verifying it. */
|
|
70
|
+
tokensSpent: number;
|
|
71
|
+
/** For revised drafts: the parent revision this one supersedes. */
|
|
72
|
+
parentRevision?: number;
|
|
73
|
+
/** Negative experiences carry the confirmed failure reason. */
|
|
74
|
+
failureReason?: string;
|
|
75
|
+
/** Episodic evidence pointer (mandatory for agent-refined candidates). */
|
|
76
|
+
evidence?: EvidenceRef;
|
|
77
|
+
/** Why this revision is quarantined (challenged only). */
|
|
78
|
+
challengeReason?: string;
|
|
79
|
+
/** Context/domain scope for anti-pollution recall (006 §2); '' = unscoped. */
|
|
80
|
+
context: string;
|
|
81
|
+
/** Counted successful verifications/uses — human decision aid (006 §3.3). */
|
|
82
|
+
verifiedCount: number;
|
|
83
|
+
/** Counted cold-palace rejections from failed trials (006 §3.3). */
|
|
84
|
+
rejectCount: number;
|
|
85
|
+
/** Cross-context transferable (global) flag; default local-only (006 §2.4). */
|
|
86
|
+
globalFlag: boolean;
|
|
87
|
+
/** Epoch ms. */
|
|
88
|
+
createdAt: number;
|
|
89
|
+
/** Epoch ms. */
|
|
90
|
+
updatedAt: number;
|
|
91
|
+
}
|
|
92
|
+
/** Complexity signals of the source trajectory (the complexity gate input). */
|
|
93
|
+
export interface ComplexitySignal {
|
|
94
|
+
/** Token cost of the trajectory. */
|
|
95
|
+
tokens?: number;
|
|
96
|
+
/** Step count of the trajectory. */
|
|
97
|
+
steps?: number;
|
|
98
|
+
/** Whether the trajectory contained failures. */
|
|
99
|
+
hadFailure?: boolean;
|
|
100
|
+
}
|
|
101
|
+
/** 生: refine one completed trajectory into an experience candidate. */
|
|
102
|
+
export interface RefineExperienceRequest {
|
|
103
|
+
/** Positive path or confirmed dead end. */
|
|
104
|
+
kind: ExperienceKind;
|
|
105
|
+
/** Task-family tag (capacity budget + consolidation key). */
|
|
106
|
+
family: string;
|
|
107
|
+
/** One-sentence experience. */
|
|
108
|
+
gist: string;
|
|
109
|
+
/** Situations where it applies. */
|
|
110
|
+
situation: string[];
|
|
111
|
+
/** The path itself. */
|
|
112
|
+
path: ExperienceStep[];
|
|
113
|
+
/** Judgment background. */
|
|
114
|
+
reasoning: string;
|
|
115
|
+
/** Non-applicable boundaries. */
|
|
116
|
+
limits: string[];
|
|
117
|
+
/** Required for negative experiences: the confirmed failure reason. */
|
|
118
|
+
failureReason?: string;
|
|
119
|
+
/** Episodic evidence pointer — assertions without one are rejected. */
|
|
120
|
+
evidence: EvidenceRef;
|
|
121
|
+
/** Complexity gate input. */
|
|
122
|
+
complexity: ComplexitySignal;
|
|
123
|
+
/** Human-marked trajectories bypass the complexity gate. */
|
|
124
|
+
humanMarked?: boolean;
|
|
125
|
+
/** Context/domain scope the experience belongs to (006 §2). */
|
|
126
|
+
context?: string;
|
|
127
|
+
}
|
|
128
|
+
/** Refine outcome: accepted candidate, or the gate that rejected it. */
|
|
129
|
+
export interface RefineExperienceResult {
|
|
130
|
+
/** Whether a new candidate was stored. */
|
|
131
|
+
accepted: boolean;
|
|
132
|
+
/** When rejected: which gate rejected it and why. */
|
|
133
|
+
reason?: string;
|
|
134
|
+
/** The stored candidate (accepted only). */
|
|
135
|
+
experience?: ExperienceSnapshot;
|
|
136
|
+
/** Information-gain gate: the existing experience this trajectory corroborates. */
|
|
137
|
+
corroboratedId?: string;
|
|
138
|
+
}
|
|
139
|
+
/** 用: recall experiences for a new situation. */
|
|
140
|
+
export interface RecallExperiencesRequest {
|
|
141
|
+
/** The new task situation, freely described. */
|
|
142
|
+
situation: string;
|
|
143
|
+
/** Max candidates before adjudication (default from config). */
|
|
144
|
+
topK?: number;
|
|
145
|
+
/** Injection budget override in estimated tokens. */
|
|
146
|
+
budgetTokens?: number;
|
|
147
|
+
/** Also search archived experiences (deep lookup). */
|
|
148
|
+
deep?: boolean;
|
|
149
|
+
/** Active context/domain for scope filtering (006 §2); omit = no scope filter. */
|
|
150
|
+
context?: string;
|
|
151
|
+
/** Include the candidate probe channel (default true, 006 §3.1). */
|
|
152
|
+
includeTrials?: boolean;
|
|
153
|
+
}
|
|
154
|
+
/** Adjudication verdict for one recalled experience. */
|
|
155
|
+
export type RecallVerdict = 'direct' | 'reference' | 'clue';
|
|
156
|
+
/** One recalled experience after adjudication. */
|
|
157
|
+
export interface RecalledExperience {
|
|
158
|
+
/** The experience revision. */
|
|
159
|
+
experience: ExperienceSnapshot;
|
|
160
|
+
/** Retrieval relevance score (0..1). */
|
|
161
|
+
score: number;
|
|
162
|
+
/** Adjudication verdict: direct adopt / adapt as reference / hint only. */
|
|
163
|
+
verdict: RecallVerdict;
|
|
164
|
+
/** Limits entries that may conflict with the queried situation. */
|
|
165
|
+
conflicts: string[];
|
|
166
|
+
}
|
|
167
|
+
/** One matched candidate offered for a one-shot trial (006 §3.1); untrusted by design. */
|
|
168
|
+
export interface CandidateTrial {
|
|
169
|
+
/** The candidate experience revision (status = candidate). */
|
|
170
|
+
experience: ExperienceSnapshot;
|
|
171
|
+
/** Retrieval relevance score (0..1). */
|
|
172
|
+
score: number;
|
|
173
|
+
}
|
|
174
|
+
/** Recall outcome, including the explicit negative channel. */
|
|
175
|
+
export interface RecallExperiencesResult {
|
|
176
|
+
/** Injected experiences, best expected value first, within budget. */
|
|
177
|
+
items: RecalledExperience[];
|
|
178
|
+
/** Negative channel: true when no relevant experience exists. */
|
|
179
|
+
none: boolean;
|
|
180
|
+
/** Why the channel is negative (none only). */
|
|
181
|
+
reason?: string;
|
|
182
|
+
/** Candidates trimmed by the injection budget. */
|
|
183
|
+
omitted: number;
|
|
184
|
+
/** Estimated token cost of the injected set. */
|
|
185
|
+
estimatedTokens: number;
|
|
186
|
+
/** Candidate probe channel: unverified matches offered for a trial (006 §3.1). */
|
|
187
|
+
candidateTrials: CandidateTrial[];
|
|
188
|
+
/** Consolidation cadence nudge: true when a merge pass is due (008 §1). */
|
|
189
|
+
consolidationDue: boolean;
|
|
190
|
+
}
|
|
191
|
+
/** Report outcome: did following the experience work? */
|
|
192
|
+
export type ReportOutcome = 'success' | 'fail';
|
|
193
|
+
/** Four-way failure attribution (005 §5.2). */
|
|
194
|
+
export type FailureAttribution = 'experience' | 'environment' | 'unrelated' | 'unknown';
|
|
195
|
+
/** 用·验: report one use outcome; use is verification (V0). */
|
|
196
|
+
export interface ReportUseRequest {
|
|
197
|
+
/** Experience family id. */
|
|
198
|
+
id: string;
|
|
199
|
+
/** Target revision: omit for the active one; pass a draft revision to verify it. */
|
|
200
|
+
revision?: number;
|
|
201
|
+
/** Success or failure of following the experience. */
|
|
202
|
+
outcome: ReportOutcome;
|
|
203
|
+
/** Claimed attribution for failures. */
|
|
204
|
+
attribution?: FailureAttribution;
|
|
205
|
+
/** Objective evidence preferred over the claim; failure attribution needs a note. */
|
|
206
|
+
evidence?: EvidenceRef;
|
|
207
|
+
/** Tokens this execution spent (economic accounting). */
|
|
208
|
+
tokensUsed?: number;
|
|
209
|
+
/** Tokens this execution saved versus re-exploring (economic accounting). */
|
|
210
|
+
tokensSaved?: number;
|
|
211
|
+
/** Idempotency key: a repeated report with the same key is not counted twice. */
|
|
212
|
+
dedupeKey?: string;
|
|
213
|
+
}
|
|
214
|
+
/** Report outcome: what the ledger counted and what moved. */
|
|
215
|
+
export interface ReportUseResult {
|
|
216
|
+
/** The updated revision snapshot. */
|
|
217
|
+
snapshot: ExperienceSnapshot;
|
|
218
|
+
/** What the Beta posterior counted. */
|
|
219
|
+
counted: 'alpha' | 'beta' | 'none';
|
|
220
|
+
/** Attribution actually applied (objective evidence may override the claim). */
|
|
221
|
+
attributionApplied: FailureAttribution;
|
|
222
|
+
/** Set when the evidence overrode the claimed attribution. */
|
|
223
|
+
overrideNote?: string;
|
|
224
|
+
/** True when this report quarantined the experience. */
|
|
225
|
+
challenged: boolean;
|
|
226
|
+
/** True when this report promoted a candidate to live (verification passed). */
|
|
227
|
+
promoted: boolean;
|
|
228
|
+
/** True when this report adopted a revised draft (revision gate passed). */
|
|
229
|
+
adopted: boolean;
|
|
230
|
+
/** True when a candidate trial failed and the revision went to the cold palace (006 §3.2). */
|
|
231
|
+
cooled?: boolean;
|
|
232
|
+
}
|
|
233
|
+
/** The kind of source an ingest batch comes from (drives the confidence prior). */
|
|
234
|
+
export type IngestSourceType = 'conversation' | 'document' | 'skill' | 'book' | 'note' | 'other';
|
|
235
|
+
/** One experience draft extracted from an ingested source. */
|
|
236
|
+
export interface IngestExperienceItem {
|
|
237
|
+
/** Positive path or confirmed dead end. */
|
|
238
|
+
kind: ExperienceKind;
|
|
239
|
+
/** Task-family tag. */
|
|
240
|
+
family: string;
|
|
241
|
+
/** One-sentence experience. */
|
|
242
|
+
gist: string;
|
|
243
|
+
/** Situations where it applies. */
|
|
244
|
+
situation: string[];
|
|
245
|
+
/** The path itself. */
|
|
246
|
+
path: ExperienceStep[];
|
|
247
|
+
/** Judgment background. */
|
|
248
|
+
reasoning: string;
|
|
249
|
+
/** Non-applicable boundaries. */
|
|
250
|
+
limits: string[];
|
|
251
|
+
/** Required for negative items: the confirmed failure reason. */
|
|
252
|
+
failureReason?: string;
|
|
253
|
+
}
|
|
254
|
+
/** 摄取归一: submit a batch of extracted candidates with provenance (006 §1). */
|
|
255
|
+
export interface IngestRequest {
|
|
256
|
+
/** What kind of source was read. */
|
|
257
|
+
sourceType: IngestSourceType;
|
|
258
|
+
/** Provenance pointer: which book / skill / session / document (audited). */
|
|
259
|
+
sourceRef: string;
|
|
260
|
+
/** Context/domain scope assigned to the produced candidates (006 §2). */
|
|
261
|
+
context?: string;
|
|
262
|
+
/** Extracted experience drafts (each becomes a candidate). */
|
|
263
|
+
experiences: IngestExperienceItem[];
|
|
264
|
+
/** Optional note about the ingest run (audited). */
|
|
265
|
+
note?: string;
|
|
266
|
+
}
|
|
267
|
+
/** Ingest outcome: which drafts were stored vs rejected by the gates. */
|
|
268
|
+
export interface IngestResult {
|
|
269
|
+
/** Stored candidates (earned: not recallable until verified). */
|
|
270
|
+
accepted: ExperienceSnapshot[];
|
|
271
|
+
/** Drafts rejected by the evidence/duplicate gates. */
|
|
272
|
+
rejected: {
|
|
273
|
+
gist: string;
|
|
274
|
+
reason: string;
|
|
275
|
+
}[];
|
|
276
|
+
/** The source-authority prior applied to every accepted candidate. */
|
|
277
|
+
sourcePrior: {
|
|
278
|
+
alpha: number;
|
|
279
|
+
beta: number;
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
/** 修: propose a revised draft for a challenged experience. */
|
|
283
|
+
export interface ReviseExperienceRequest {
|
|
284
|
+
/** Experience family id (must be challenged). */
|
|
285
|
+
id: string;
|
|
286
|
+
/** Diagnosis: root cause and what the revision changes. */
|
|
287
|
+
reason: string;
|
|
288
|
+
/** Replacement gist (kept when omitted). */
|
|
289
|
+
gist?: string;
|
|
290
|
+
/** Replacement situations (kept when omitted). */
|
|
291
|
+
situation?: string[];
|
|
292
|
+
/** Replacement path (kept when omitted). */
|
|
293
|
+
path?: ExperienceStep[];
|
|
294
|
+
/** Replacement reasoning (kept when omitted). */
|
|
295
|
+
reasoning?: string;
|
|
296
|
+
/** Replacement limits (kept when omitted). */
|
|
297
|
+
limits?: string[];
|
|
298
|
+
}
|
|
299
|
+
/** V1 controlled re-enactment: replay historical samples against a draft. */
|
|
300
|
+
export interface VerifyShadowRequest {
|
|
301
|
+
/** Experience family id. */
|
|
302
|
+
id: string;
|
|
303
|
+
/** The draft revision to verify. */
|
|
304
|
+
revision: number;
|
|
305
|
+
/** Historical situations with their known outcomes. */
|
|
306
|
+
samples: {
|
|
307
|
+
situation: string;
|
|
308
|
+
expected: ReportOutcome;
|
|
309
|
+
}[];
|
|
310
|
+
}
|
|
311
|
+
/** Shadow replay outcome. */
|
|
312
|
+
export interface VerifyShadowResult {
|
|
313
|
+
/** Whether the draft passed the replay gate. */
|
|
314
|
+
passed: boolean;
|
|
315
|
+
/** Fraction of samples the draft's adjudication matched. */
|
|
316
|
+
agreement: number;
|
|
317
|
+
/** Adopted to live (passed only). */
|
|
318
|
+
snapshot?: ExperienceSnapshot;
|
|
319
|
+
/** Why it failed (failed only). */
|
|
320
|
+
reason?: string;
|
|
321
|
+
}
|
|
322
|
+
/** Roll one experience family back to a superseded revision. */
|
|
323
|
+
export interface RollbackExperienceRequest {
|
|
324
|
+
/** Experience family id. */
|
|
325
|
+
id: string;
|
|
326
|
+
/** The superseded revision to restore to live. */
|
|
327
|
+
toRevision: number;
|
|
328
|
+
/** Audited reason (written to the ledger). */
|
|
329
|
+
reason: string;
|
|
330
|
+
}
|
|
331
|
+
/** Diary entry kind: what happened in the interaction. */
|
|
332
|
+
export type DiaryKind = 'said' | 'delegated' | 'promised' | 'happened' | 'preference' | 'other';
|
|
333
|
+
/** Fact category: the profile facet a fact belongs to (007 §1, expanded with
|
|
334
|
+
* thinking/value/goal/communication/background so vision & philosophies have a
|
|
335
|
+
* proper home; legacy values remain valid). */
|
|
336
|
+
/**
|
|
337
|
+
* Profile facet — the AI's perception of the USER (who they are / how to
|
|
338
|
+
* collaborate), NOT project content. Project goals/decisions/context belong in
|
|
339
|
+
* concerns (open-loop memo), never here. `background` absorbs environment,
|
|
340
|
+
* resources and accounts the user owns.
|
|
341
|
+
*/
|
|
342
|
+
export type FactCategory = 'identity' | 'preference' | 'communication' | 'habit' | 'thinking' | 'value' | 'delegation' | 'background' | 'other';
|
|
343
|
+
/** 记: append one diary entry (event layer, append-only, never auto-deleted). */
|
|
344
|
+
export interface DiaryAppendRequest {
|
|
345
|
+
/** What kind of interaction this records. */
|
|
346
|
+
kind: DiaryKind;
|
|
347
|
+
/** The diary content. */
|
|
348
|
+
content: string;
|
|
349
|
+
/** Pointer to the session this happened in. */
|
|
350
|
+
sessionRef?: string;
|
|
351
|
+
/** Free tags for retrieval. */
|
|
352
|
+
tags?: string[];
|
|
353
|
+
}
|
|
354
|
+
/** One diary entry as it crosses the wire. */
|
|
355
|
+
export interface DiaryEntry {
|
|
356
|
+
/** Entry id. */
|
|
357
|
+
id: string;
|
|
358
|
+
/** Epoch ms. */
|
|
359
|
+
ts: number;
|
|
360
|
+
/** Interaction kind. */
|
|
361
|
+
kind: DiaryKind;
|
|
362
|
+
/** The diary content. */
|
|
363
|
+
content: string;
|
|
364
|
+
/** Session pointer. */
|
|
365
|
+
sessionRef?: string;
|
|
366
|
+
/** Free tags. */
|
|
367
|
+
tags: string[];
|
|
368
|
+
/** Whether a completed extraction already consumed this entry. */
|
|
369
|
+
extracted: boolean;
|
|
370
|
+
}
|
|
371
|
+
/** Diary append outcome, including the extraction duty signal. */
|
|
372
|
+
export interface DiaryAppendResult {
|
|
373
|
+
/** The stored entry. */
|
|
374
|
+
entry: DiaryEntry;
|
|
375
|
+
/** True when the extraction cadence is due: the agent must propose facts. */
|
|
376
|
+
extractionDue: boolean;
|
|
377
|
+
/** Unextracted entries awaiting the next extraction (extractionDue only). */
|
|
378
|
+
pendingDiary?: DiaryEntry[];
|
|
379
|
+
}
|
|
380
|
+
/** One proposed fact produced by reading the diary window. */
|
|
381
|
+
export interface FactProposal {
|
|
382
|
+
/** Profile slot. */
|
|
383
|
+
category: FactCategory;
|
|
384
|
+
/** Stable slot key inside the category (e.g. "timezone"). */
|
|
385
|
+
factKey: string;
|
|
386
|
+
/** The fact value. */
|
|
387
|
+
value: string;
|
|
388
|
+
/** Diary entries this fact was extracted from (source pointers). */
|
|
389
|
+
sourceDiaryIds: string[];
|
|
390
|
+
/** Optional extraction note. */
|
|
391
|
+
note?: string;
|
|
392
|
+
}
|
|
393
|
+
/** 上升通道: submit extracted facts for the pending diary window. */
|
|
394
|
+
export interface ExtractFactsRequest {
|
|
395
|
+
/** Proposed stable facts. */
|
|
396
|
+
proposals: FactProposal[];
|
|
397
|
+
/** Proposed concern updates (007 §2.3): new / mention / status. */
|
|
398
|
+
concerns?: ConcernProposal[];
|
|
399
|
+
/** One-line summary of the extraction window. */
|
|
400
|
+
summary: string;
|
|
401
|
+
}
|
|
402
|
+
/** One fact version (bi-temporal: valid time x recorded time). */
|
|
403
|
+
export interface FactEntry {
|
|
404
|
+
/** Fact version id. */
|
|
405
|
+
id: string;
|
|
406
|
+
/** Profile slot. */
|
|
407
|
+
category: FactCategory;
|
|
408
|
+
/** Stable slot key inside the category. */
|
|
409
|
+
factKey: string;
|
|
410
|
+
/** The fact value. */
|
|
411
|
+
value: string;
|
|
412
|
+
/** How this version originated. */
|
|
413
|
+
origin: 'extraction' | 'human' | 'supersede';
|
|
414
|
+
/** Diary entries it was extracted from (empty for human-added). */
|
|
415
|
+
sourceDiaryIds: string[];
|
|
416
|
+
/** How many independent observations corroborate it. */
|
|
417
|
+
corroboration: number;
|
|
418
|
+
/** Valid-time start (epoch ms). */
|
|
419
|
+
validFrom: number;
|
|
420
|
+
/** Valid-time end; absent while current. */
|
|
421
|
+
validTo?: number;
|
|
422
|
+
/** Recorded time (epoch ms). */
|
|
423
|
+
recordedAt: number;
|
|
424
|
+
/** The version that superseded this one. */
|
|
425
|
+
supersededBy?: string;
|
|
426
|
+
/** Human-confirmed: never auto-superseded. */
|
|
427
|
+
locked: boolean;
|
|
428
|
+
/** Human-deleted (tombstone kept for audit). */
|
|
429
|
+
deleted: boolean;
|
|
430
|
+
/** Conflicts with a locked fact, awaiting human ruling. */
|
|
431
|
+
conflictPending: boolean;
|
|
432
|
+
}
|
|
433
|
+
/** Extraction outcome. */
|
|
434
|
+
export interface ExtractFactsResult {
|
|
435
|
+
/** Current versions created or corroborated. */
|
|
436
|
+
applied: FactEntry[];
|
|
437
|
+
/** Proposals parked as conflict-pending against a locked fact. */
|
|
438
|
+
conflicts: FactEntry[];
|
|
439
|
+
/** Proposals rejected (bad source pointers, duplicates). */
|
|
440
|
+
rejected: {
|
|
441
|
+
proposal: FactProposal;
|
|
442
|
+
reason: string;
|
|
443
|
+
}[];
|
|
444
|
+
/** Concern nodes created/extended by this extraction (007 §2). */
|
|
445
|
+
appliedConcerns: number;
|
|
446
|
+
}
|
|
447
|
+
/** Concern shape (open by design; the enum only guides the model). */
|
|
448
|
+
/**
|
|
449
|
+
* Concern = an OPEN LOOP / memo for the user: something they raised that is not
|
|
450
|
+
* yet closed — a to-do, an idea, an unanswered question, a pending decision, a
|
|
451
|
+
* commitment. NOT a topic/project label.
|
|
452
|
+
*/
|
|
453
|
+
export type ConcernKind = 'todo' | 'thinking' | 'idea' | 'question' | 'decision' | 'commitment' | 'other';
|
|
454
|
+
/** Concern lifecycle (top-level only). */
|
|
455
|
+
export type ConcernStatus = 'ongoing' | 'concluded' | 'recurring' | 'paused';
|
|
456
|
+
/** One concerns-table row: top-level (parentId absent) or a discussion mention. */
|
|
457
|
+
export interface ConcernEntry {
|
|
458
|
+
/** Row id. */
|
|
459
|
+
id: string;
|
|
460
|
+
/** Absent for a top-level concern; the concern id for a discussion mention. */
|
|
461
|
+
parentId?: string;
|
|
462
|
+
/** Top-level: the category/concern name; child: one-line discussion summary. */
|
|
463
|
+
title: string;
|
|
464
|
+
/**
|
|
465
|
+
* Top-level only: the BACKGROUND scene — enough context that reading this
|
|
466
|
+
* memo alone lets the user recall when/why it came up. Empty for mentions.
|
|
467
|
+
*/
|
|
468
|
+
background?: string;
|
|
469
|
+
/** Top-level shape (007 §2.1, not limiting). */
|
|
470
|
+
kind?: ConcernKind;
|
|
471
|
+
/** Top-level lifecycle. */
|
|
472
|
+
status?: ConcernStatus;
|
|
473
|
+
/** Child: discussion time; top-level: first-mention time. */
|
|
474
|
+
ts: number;
|
|
475
|
+
/** Diary entries this node was distilled from. */
|
|
476
|
+
sourceDiaryIds: string[];
|
|
477
|
+
/** Context scope (006 §2). */
|
|
478
|
+
context?: string;
|
|
479
|
+
/** Human-deleted tombstone. */
|
|
480
|
+
deleted: boolean;
|
|
481
|
+
}
|
|
482
|
+
/** A top-level concern plus its discussion loop (the UI hierarchy unit). */
|
|
483
|
+
export interface ConcernTree {
|
|
484
|
+
concern: ConcernEntry;
|
|
485
|
+
mentions: ConcernEntry[];
|
|
486
|
+
}
|
|
487
|
+
/** Extraction proposal touching the concerns layer (007 §2.3). */
|
|
488
|
+
export interface ConcernProposal {
|
|
489
|
+
/** new = new top-level concern; mention = discussion under an existing one; status = lifecycle change. */
|
|
490
|
+
action: 'new' | 'mention' | 'status';
|
|
491
|
+
/** new: concern title; mention: one-line discussion summary. */
|
|
492
|
+
title?: string;
|
|
493
|
+
/** new: the background scene (when/why it came up) so the memo is self-recallable. */
|
|
494
|
+
background?: string;
|
|
495
|
+
/** new: the concern shape. */
|
|
496
|
+
kind?: ConcernKind;
|
|
497
|
+
/** status: the new lifecycle. */
|
|
498
|
+
status?: ConcernStatus;
|
|
499
|
+
/** mention/status: the target top-level concern id. */
|
|
500
|
+
concernId?: string;
|
|
501
|
+
/** Diary entries this proposal was read from. */
|
|
502
|
+
sourceDiaryIds: string[];
|
|
503
|
+
context?: string;
|
|
504
|
+
}
|
|
505
|
+
/** Human lifecycle change of a top-level concern (audited). */
|
|
506
|
+
export interface HumanSetConcernStatusRequest {
|
|
507
|
+
id: string;
|
|
508
|
+
status: ConcernStatus;
|
|
509
|
+
reason: string;
|
|
510
|
+
}
|
|
511
|
+
/** Human delete of a concern subtree (audited, tombstone). */
|
|
512
|
+
export interface HumanDeleteConcernRequest {
|
|
513
|
+
id: string;
|
|
514
|
+
reason: string;
|
|
515
|
+
}
|
|
516
|
+
/** Human acknowledgement of a pending diary entry (reviewed; no fact extracted). */
|
|
517
|
+
export interface HumanAckDiaryRequest {
|
|
518
|
+
/** The diary entry id to mark processed. */
|
|
519
|
+
diaryId: string;
|
|
520
|
+
/** Mandatory audited reason. */
|
|
521
|
+
reason: string;
|
|
522
|
+
}
|
|
523
|
+
/** One append-only ledger block. */
|
|
524
|
+
export interface LedgerBlock {
|
|
525
|
+
/** Monotone sequence number. */
|
|
526
|
+
seq: number;
|
|
527
|
+
/** Epoch ms. */
|
|
528
|
+
ts: number;
|
|
529
|
+
/** Operation name (refine/use/challenge/propose/adopt/...). */
|
|
530
|
+
op: string;
|
|
531
|
+
/** The object type the operation touched. */
|
|
532
|
+
objectType: 'experience' | 'fact' | 'diary' | 'library' | 'concern';
|
|
533
|
+
/** The object id. */
|
|
534
|
+
objectId: string;
|
|
535
|
+
/** Who acted: `agent:<sessionId>`, `human`, or `system`. */
|
|
536
|
+
actor: string;
|
|
537
|
+
/** Human-supplied or diagnosis reason. */
|
|
538
|
+
reason?: string;
|
|
539
|
+
/** JSON-encoded operation payload. */
|
|
540
|
+
payload: string;
|
|
541
|
+
/** Previous block hash ('' for the genesis block). */
|
|
542
|
+
prevHash: string;
|
|
543
|
+
/** Hash of this block chained to prevHash. */
|
|
544
|
+
hash: string;
|
|
545
|
+
}
|
|
546
|
+
/** Ledger query filter (007 §2 view-side pagination; blocks themselves are never deleted). */
|
|
547
|
+
export interface LedgerQueryRequest {
|
|
548
|
+
/** Filter by object type. */
|
|
549
|
+
objectType?: 'experience' | 'fact' | 'diary' | 'library' | 'concern';
|
|
550
|
+
/** Filter by object id. */
|
|
551
|
+
objectId?: string;
|
|
552
|
+
/** Filter by operation name. */
|
|
553
|
+
op?: string;
|
|
554
|
+
/** Max blocks, newest first. */
|
|
555
|
+
limit?: number;
|
|
556
|
+
/** Skip this many newest blocks (server-side pagination). */
|
|
557
|
+
offset?: number;
|
|
558
|
+
/** Inclusive lower bound on block seq (#). */
|
|
559
|
+
seqFrom?: number;
|
|
560
|
+
/** Inclusive upper bound on block seq (#). */
|
|
561
|
+
seqTo?: number;
|
|
562
|
+
}
|
|
563
|
+
/** Human pin/unpin. */
|
|
564
|
+
export interface HumanPinRequest {
|
|
565
|
+
/** Experience family id. */
|
|
566
|
+
id: string;
|
|
567
|
+
/** Pin or unpin. */
|
|
568
|
+
pinned: boolean;
|
|
569
|
+
/** Required reason (audited). */
|
|
570
|
+
reason: string;
|
|
571
|
+
}
|
|
572
|
+
/** Human delete (tombstone; the ledger keeps the fingerprint). */
|
|
573
|
+
export interface HumanDeleteExperienceRequest {
|
|
574
|
+
/** Experience family id. */
|
|
575
|
+
id: string;
|
|
576
|
+
/** Required reason (audited). */
|
|
577
|
+
reason: string;
|
|
578
|
+
}
|
|
579
|
+
/** Human edit of one experience field set (creates no new revision). */
|
|
580
|
+
export interface HumanEditExperienceRequest {
|
|
581
|
+
/** Experience family id. */
|
|
582
|
+
id: string;
|
|
583
|
+
/** Required reason (audited). */
|
|
584
|
+
reason: string;
|
|
585
|
+
/** New gist. */
|
|
586
|
+
gist?: string;
|
|
587
|
+
/** New situations. */
|
|
588
|
+
situation?: string[];
|
|
589
|
+
/** New path. */
|
|
590
|
+
path?: ExperienceStep[];
|
|
591
|
+
/** New reasoning. */
|
|
592
|
+
reasoning?: string;
|
|
593
|
+
/** New limits. */
|
|
594
|
+
limits?: string[];
|
|
595
|
+
/** New family tag. */
|
|
596
|
+
family?: string;
|
|
597
|
+
/** New context/domain scope (006 §2). */
|
|
598
|
+
context?: string;
|
|
599
|
+
/** New cross-context transferable flag (006 §2.4). */
|
|
600
|
+
globalFlag?: boolean;
|
|
601
|
+
}
|
|
602
|
+
/** Human re-release of a cold-palace revision back to candidate (006 §3.2). */
|
|
603
|
+
export interface HumanReleaseColdRequest {
|
|
604
|
+
/** Experience family id (must be cold). */
|
|
605
|
+
id: string;
|
|
606
|
+
/** Required reason (audited). */
|
|
607
|
+
reason: string;
|
|
608
|
+
}
|
|
609
|
+
/** Human injection: the fixed format is the ordinary experience structure. */
|
|
610
|
+
export interface HumanAddExperienceRequest {
|
|
611
|
+
/** Positive path or confirmed dead end. */
|
|
612
|
+
kind: ExperienceKind;
|
|
613
|
+
/** Task-family tag. */
|
|
614
|
+
family: string;
|
|
615
|
+
/** One-sentence experience. */
|
|
616
|
+
gist: string;
|
|
617
|
+
/** Situations where it applies. */
|
|
618
|
+
situation: string[];
|
|
619
|
+
/** The path itself. */
|
|
620
|
+
path: ExperienceStep[];
|
|
621
|
+
/** Judgment background. */
|
|
622
|
+
reasoning: string;
|
|
623
|
+
/** Non-applicable boundaries. */
|
|
624
|
+
limits: string[];
|
|
625
|
+
/** Failure reason for negative injections. */
|
|
626
|
+
failureReason?: string;
|
|
627
|
+
/** Context/domain scope (006 §2). */
|
|
628
|
+
context?: string;
|
|
629
|
+
/** Required reason (audited). */
|
|
630
|
+
reason: string;
|
|
631
|
+
}
|
|
632
|
+
/** Human fact operations. */
|
|
633
|
+
export interface HumanAddFactRequest {
|
|
634
|
+
/** Profile slot. */
|
|
635
|
+
category: FactCategory;
|
|
636
|
+
/** Slot key. */
|
|
637
|
+
factKey: string;
|
|
638
|
+
/** Fact value. */
|
|
639
|
+
value: string;
|
|
640
|
+
/** Immediately lock it (human-confirmed). */
|
|
641
|
+
locked?: boolean;
|
|
642
|
+
/** Required reason (audited). */
|
|
643
|
+
reason: string;
|
|
644
|
+
}
|
|
645
|
+
/** Human fact edit: supersedes the current version with a locked one. */
|
|
646
|
+
export interface HumanEditFactRequest {
|
|
647
|
+
/** Current fact version id. */
|
|
648
|
+
factId: string;
|
|
649
|
+
/** New value. */
|
|
650
|
+
value: string;
|
|
651
|
+
/** Required reason (audited). */
|
|
652
|
+
reason: string;
|
|
653
|
+
}
|
|
654
|
+
/** Human fact delete: tombstone the current version. */
|
|
655
|
+
export interface HumanDeleteFactRequest {
|
|
656
|
+
/** Current fact version id. */
|
|
657
|
+
factId: string;
|
|
658
|
+
/** Required reason (audited). */
|
|
659
|
+
reason: string;
|
|
660
|
+
}
|
|
661
|
+
/** Human fact confirmation: lock or unlock a current version. */
|
|
662
|
+
export interface HumanConfirmFactRequest {
|
|
663
|
+
/** Current fact version id. */
|
|
664
|
+
factId: string;
|
|
665
|
+
/** Lock (confirm) or unlock. */
|
|
666
|
+
locked: boolean;
|
|
667
|
+
/** Required reason (audited). */
|
|
668
|
+
reason: string;
|
|
669
|
+
}
|
|
670
|
+
/** Aggregated library statistics for the workbench surface. */
|
|
671
|
+
export interface MemoryStats {
|
|
672
|
+
/** Experience library counters. */
|
|
673
|
+
experiences: {
|
|
674
|
+
total: number;
|
|
675
|
+
byStatus: Record<ExperienceStatus, number>;
|
|
676
|
+
byKind: Record<ExperienceKind, number>;
|
|
677
|
+
pinned: number;
|
|
678
|
+
avgTrust: number;
|
|
679
|
+
};
|
|
680
|
+
/** Semantic layer counters. */
|
|
681
|
+
facts: {
|
|
682
|
+
total: number;
|
|
683
|
+
current: number;
|
|
684
|
+
locked: number;
|
|
685
|
+
conflictPending: number;
|
|
686
|
+
};
|
|
687
|
+
/** Diary layer counters. */
|
|
688
|
+
diary: {
|
|
689
|
+
total: number;
|
|
690
|
+
unextracted: number;
|
|
691
|
+
extractions: number;
|
|
692
|
+
};
|
|
693
|
+
/** Total append-only ledger blocks. */
|
|
694
|
+
ledgerBlocks: number;
|
|
695
|
+
/** Recall telemetry. */
|
|
696
|
+
recall: {
|
|
697
|
+
events: number;
|
|
698
|
+
negative: number;
|
|
699
|
+
reportsAfterRecall: number;
|
|
700
|
+
};
|
|
701
|
+
/** Consolidation cadence state (008 §1). */
|
|
702
|
+
consolidation: {
|
|
703
|
+
/** Epoch ms of the last consolidation run (0 = never). */
|
|
704
|
+
lastTs: number;
|
|
705
|
+
/** Whether a consolidation run is due now. */
|
|
706
|
+
due: boolean;
|
|
707
|
+
/** New experiences since the last consolidation. */
|
|
708
|
+
newSince: number;
|
|
709
|
+
};
|
|
710
|
+
}
|
|
711
|
+
/** Workbench descriptor for the browser half (workspace matching + config view). */
|
|
712
|
+
export interface MemoryWorkbenchInfo {
|
|
713
|
+
/** Canonical path of the monitoring workspace directory. */
|
|
714
|
+
workspacePath: string;
|
|
715
|
+
/** Configured workspace title. */
|
|
716
|
+
workspaceTitle: string;
|
|
717
|
+
/** Canonical SQLite database path. */
|
|
718
|
+
databasePath: string;
|
|
719
|
+
/** Configured diary extraction cadence (entries). */
|
|
720
|
+
diaryExtractEvery: number;
|
|
721
|
+
/** Configured injection budget (estimated tokens). */
|
|
722
|
+
injectionBudgetTokens: number;
|
|
723
|
+
}
|
|
724
|
+
/** Experience list filter for the workbench. */
|
|
725
|
+
export interface ExperienceListFilter {
|
|
726
|
+
/** Filter by lifecycle status. */
|
|
727
|
+
status?: ExperienceStatus;
|
|
728
|
+
/** Filter by kind. */
|
|
729
|
+
kind?: ExperienceKind;
|
|
730
|
+
/** Filter by family tag. */
|
|
731
|
+
family?: string;
|
|
732
|
+
/** Filter by context/domain scope (006 §2). */
|
|
733
|
+
context?: string;
|
|
734
|
+
}
|
|
735
|
+
/** One extraction-run record. */
|
|
736
|
+
export interface ExtractionRecord {
|
|
737
|
+
/** Record id. */
|
|
738
|
+
id: string;
|
|
739
|
+
/** Epoch ms. */
|
|
740
|
+
ts: number;
|
|
741
|
+
/** What triggered the run. */
|
|
742
|
+
trigger: 'cadence' | 'manual';
|
|
743
|
+
/** One-line window summary. */
|
|
744
|
+
summary: string;
|
|
745
|
+
/** Fact versions produced. */
|
|
746
|
+
producedFactIds: string[];
|
|
747
|
+
/** Diary entries consumed. */
|
|
748
|
+
diaryCount: number;
|
|
749
|
+
}
|
|
750
|
+
/** One consolidation merge: fold several related experiences into one (008 §1). */
|
|
751
|
+
export interface ConsolidateMerge {
|
|
752
|
+
/** Family tag of the consolidated experience. */
|
|
753
|
+
family: string;
|
|
754
|
+
/** Kind of the consolidated experience. */
|
|
755
|
+
kind: ExperienceKind;
|
|
756
|
+
/** Consolidated gist (the single transferable lesson). */
|
|
757
|
+
gist: string;
|
|
758
|
+
/** Consolidated situation. */
|
|
759
|
+
situation: string[];
|
|
760
|
+
/** Consolidated success path. */
|
|
761
|
+
path: string[];
|
|
762
|
+
/** Consolidated reasoning (transferable, not a session chronicle). */
|
|
763
|
+
reasoning: string;
|
|
764
|
+
/** Consolidated applicability limits. */
|
|
765
|
+
limits: string[];
|
|
766
|
+
/** Family ids of the experiences being merged (≥2). */
|
|
767
|
+
sourceIds: string[];
|
|
768
|
+
/** Optional note on why these belong together. */
|
|
769
|
+
note?: string;
|
|
770
|
+
}
|
|
771
|
+
/** Request for one consolidation run. */
|
|
772
|
+
export interface ConsolidateRequest {
|
|
773
|
+
/** Merge proposals; each produces one consolidated experience. */
|
|
774
|
+
merges: ConsolidateMerge[];
|
|
775
|
+
/** Optional free-form summary of the run. */
|
|
776
|
+
note?: string;
|
|
777
|
+
}
|
|
778
|
+
/** Outcome of one consolidation run. */
|
|
779
|
+
export interface ConsolidateResult {
|
|
780
|
+
/** Consolidated experiences created. */
|
|
781
|
+
consolidated: number;
|
|
782
|
+
/** Source experiences archived (leave recall, recoverable). */
|
|
783
|
+
archived: number;
|
|
784
|
+
/** Merge proposals skipped with a reason. */
|
|
785
|
+
skipped: {
|
|
786
|
+
sourceIds: string[];
|
|
787
|
+
reason: string;
|
|
788
|
+
}[];
|
|
789
|
+
}
|
|
790
|
+
/** Ledger integrity check outcome. */
|
|
791
|
+
export interface LedgerIntegrityResult {
|
|
792
|
+
/** Whether the hash chain verifies end to end. */
|
|
793
|
+
ok: boolean;
|
|
794
|
+
/** Blocks checked. */
|
|
795
|
+
checked: number;
|
|
796
|
+
/** First broken seq, when broken. */
|
|
797
|
+
brokenAt?: number;
|
|
798
|
+
}
|
|
799
|
+
/** Full library export for experiments and migration. */
|
|
800
|
+
export interface MemoryExport {
|
|
801
|
+
/** Export epoch ms. */
|
|
802
|
+
exportedAt: number;
|
|
803
|
+
/** Schema marker. */
|
|
804
|
+
schemaVersion: number;
|
|
805
|
+
/** Every experience revision. */
|
|
806
|
+
experiences: ExperienceSnapshot[];
|
|
807
|
+
/** Every counted use report. */
|
|
808
|
+
reports: {
|
|
809
|
+
id: string;
|
|
810
|
+
experienceId: string;
|
|
811
|
+
revision: number;
|
|
812
|
+
outcome: ReportOutcome;
|
|
813
|
+
attribution: FailureAttribution;
|
|
814
|
+
counted: 'alpha' | 'beta' | 'none';
|
|
815
|
+
evidence?: EvidenceRef;
|
|
816
|
+
dedupeKey?: string;
|
|
817
|
+
ts: number;
|
|
818
|
+
}[];
|
|
819
|
+
/** Every diary entry. */
|
|
820
|
+
diary: DiaryEntry[];
|
|
821
|
+
/** Every fact version. */
|
|
822
|
+
facts: FactEntry[];
|
|
823
|
+
/** Every extraction run. */
|
|
824
|
+
extractions: ExtractionRecord[];
|
|
825
|
+
/** Every recall event. */
|
|
826
|
+
recalls: {
|
|
827
|
+
id: string;
|
|
828
|
+
ts: number;
|
|
829
|
+
situation: string;
|
|
830
|
+
injectedIds: string[];
|
|
831
|
+
none: boolean;
|
|
832
|
+
}[];
|
|
833
|
+
/** The complete ledger. */
|
|
834
|
+
ledger: LedgerBlock[];
|
|
835
|
+
}
|
|
836
|
+
//# sourceMappingURL=types.d.ts.map
|