@nahisaho/yata-local 1.6.6
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/auto-updater.d.ts +101 -0
- package/dist/auto-updater.d.ts.map +1 -0
- package/dist/auto-updater.js +402 -0
- package/dist/auto-updater.js.map +1 -0
- package/dist/database.d.ts +229 -0
- package/dist/database.d.ts.map +1 -0
- package/dist/database.js +959 -0
- package/dist/database.js.map +1 -0
- package/dist/index.d.ts +298 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +436 -0
- package/dist/index.js.map +1 -0
- package/dist/io.d.ts +77 -0
- package/dist/io.d.ts.map +1 -0
- package/dist/io.js +403 -0
- package/dist/io.js.map +1 -0
- package/dist/kgpr/diff-engine.d.ts +110 -0
- package/dist/kgpr/diff-engine.d.ts.map +1 -0
- package/dist/kgpr/diff-engine.js +335 -0
- package/dist/kgpr/diff-engine.js.map +1 -0
- package/dist/kgpr/index.d.ts +16 -0
- package/dist/kgpr/index.d.ts.map +1 -0
- package/dist/kgpr/index.js +14 -0
- package/dist/kgpr/index.js.map +1 -0
- package/dist/kgpr/kgpr-manager.d.ts +122 -0
- package/dist/kgpr/kgpr-manager.d.ts.map +1 -0
- package/dist/kgpr/kgpr-manager.js +344 -0
- package/dist/kgpr/kgpr-manager.js.map +1 -0
- package/dist/kgpr/privacy-filter.d.ts +109 -0
- package/dist/kgpr/privacy-filter.d.ts.map +1 -0
- package/dist/kgpr/privacy-filter.js +295 -0
- package/dist/kgpr/privacy-filter.js.map +1 -0
- package/dist/kgpr/types.d.ts +234 -0
- package/dist/kgpr/types.d.ts.map +1 -0
- package/dist/kgpr/types.js +54 -0
- package/dist/kgpr/types.js.map +1 -0
- package/dist/query-engine.d.ts +78 -0
- package/dist/query-engine.d.ts.map +1 -0
- package/dist/query-engine.js +368 -0
- package/dist/query-engine.js.map +1 -0
- package/dist/reasoning.d.ts +112 -0
- package/dist/reasoning.d.ts.map +1 -0
- package/dist/reasoning.js +455 -0
- package/dist/reasoning.js.map +1 -0
- package/dist/types.d.ts +580 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +37 -0
- package/dist/types.js.map +1 -0
- package/dist/wake-sleep/cycle-manager.d.ts +76 -0
- package/dist/wake-sleep/cycle-manager.d.ts.map +1 -0
- package/dist/wake-sleep/cycle-manager.js +291 -0
- package/dist/wake-sleep/cycle-manager.js.map +1 -0
- package/dist/wake-sleep/index.d.ts +15 -0
- package/dist/wake-sleep/index.d.ts.map +1 -0
- package/dist/wake-sleep/index.js +19 -0
- package/dist/wake-sleep/index.js.map +1 -0
- package/dist/wake-sleep/pattern-compressor.d.ts +86 -0
- package/dist/wake-sleep/pattern-compressor.d.ts.map +1 -0
- package/dist/wake-sleep/pattern-compressor.js +333 -0
- package/dist/wake-sleep/pattern-compressor.js.map +1 -0
- package/dist/wake-sleep/sleep-phase.d.ts +79 -0
- package/dist/wake-sleep/sleep-phase.d.ts.map +1 -0
- package/dist/wake-sleep/sleep-phase.js +329 -0
- package/dist/wake-sleep/sleep-phase.js.map +1 -0
- package/dist/wake-sleep/types.d.ts +244 -0
- package/dist/wake-sleep/types.d.ts.map +1 -0
- package/dist/wake-sleep/types.js +35 -0
- package/dist/wake-sleep/types.js.map +1 -0
- package/dist/wake-sleep/wake-phase.d.ts +83 -0
- package/dist/wake-sleep/wake-phase.d.ts.map +1 -0
- package/dist/wake-sleep/wake-phase.js +457 -0
- package/dist/wake-sleep/wake-phase.js.map +1 -0
- package/dist/yata-bridge.d.ts +78 -0
- package/dist/yata-bridge.d.ts.map +1 -0
- package/dist/yata-bridge.js +193 -0
- package/dist/yata-bridge.js.map +1 -0
- package/package.json +60 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,580 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YATA Local - Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
* @module @nahisaho/yata-local
|
|
6
|
+
*
|
|
7
|
+
* @see REQ-YATA-LOCAL-001
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Entity in the knowledge graph
|
|
11
|
+
* @see REQ-YL-STORE-003
|
|
12
|
+
*/
|
|
13
|
+
export interface Entity {
|
|
14
|
+
/** Unique identifier */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Entity type (class, function, variable, etc.) */
|
|
17
|
+
type: EntityType;
|
|
18
|
+
/** Entity name */
|
|
19
|
+
name: string;
|
|
20
|
+
/** Namespace or module path */
|
|
21
|
+
namespace: string;
|
|
22
|
+
/** Source file path */
|
|
23
|
+
filePath?: string;
|
|
24
|
+
/** Line number in source */
|
|
25
|
+
line?: number;
|
|
26
|
+
/** Entity description */
|
|
27
|
+
description?: string;
|
|
28
|
+
/** Additional metadata */
|
|
29
|
+
metadata: Record<string, unknown>;
|
|
30
|
+
/** Creation timestamp */
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
/** Last update timestamp */
|
|
33
|
+
updatedAt: Date;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Entity types
|
|
37
|
+
*/
|
|
38
|
+
export type EntityType = 'class' | 'interface' | 'function' | 'method' | 'variable' | 'constant' | 'type' | 'enum' | 'module' | 'package' | 'file' | 'parameter' | 'property' | 'import' | 'export' | 'unknown';
|
|
39
|
+
/**
|
|
40
|
+
* Relationship between entities
|
|
41
|
+
* @see REQ-YL-STORE-004
|
|
42
|
+
*/
|
|
43
|
+
export interface Relationship {
|
|
44
|
+
/** Unique identifier */
|
|
45
|
+
id: string;
|
|
46
|
+
/** Source entity ID */
|
|
47
|
+
sourceId: string;
|
|
48
|
+
/** Target entity ID */
|
|
49
|
+
targetId: string;
|
|
50
|
+
/** Relationship type */
|
|
51
|
+
type: RelationType;
|
|
52
|
+
/** Relationship weight/strength */
|
|
53
|
+
weight: number;
|
|
54
|
+
/** Additional metadata */
|
|
55
|
+
metadata: Record<string, unknown>;
|
|
56
|
+
/** Creation timestamp */
|
|
57
|
+
createdAt: Date;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Relationship types
|
|
61
|
+
*/
|
|
62
|
+
export type RelationType = 'calls' | 'imports' | 'exports' | 'extends' | 'inherits' | 'implements' | 'contains' | 'uses' | 'defines' | 'references' | 'depends-on' | 'transitively-depends-on' | 'type-compatible' | 'has-method' | 'overrides' | 'returns' | 'parameter_of' | 'member_of' | 'related-to' | 'defined-in-same-file' | 'unknown';
|
|
63
|
+
/**
|
|
64
|
+
* Database configuration
|
|
65
|
+
*/
|
|
66
|
+
export interface DatabaseConfig {
|
|
67
|
+
/** Database file path */
|
|
68
|
+
path: string;
|
|
69
|
+
/** Enable WAL mode for better performance */
|
|
70
|
+
walMode: boolean;
|
|
71
|
+
/** Enable memory mapping */
|
|
72
|
+
mmapSize: number;
|
|
73
|
+
/** Cache size in KB */
|
|
74
|
+
cacheSize: number;
|
|
75
|
+
/** Enable foreign keys */
|
|
76
|
+
foreignKeys: boolean;
|
|
77
|
+
/** Enable encryption (requires SQLCipher) */
|
|
78
|
+
encryption?: {
|
|
79
|
+
enabled: boolean;
|
|
80
|
+
key: string;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Default database configuration
|
|
85
|
+
*/
|
|
86
|
+
export declare const DEFAULT_DB_CONFIG: DatabaseConfig;
|
|
87
|
+
/**
|
|
88
|
+
* Query options
|
|
89
|
+
* @see REQ-YL-QUERY-001
|
|
90
|
+
*/
|
|
91
|
+
export interface QueryOptions {
|
|
92
|
+
/** Maximum results to return */
|
|
93
|
+
limit: number;
|
|
94
|
+
/** Offset for pagination */
|
|
95
|
+
offset: number;
|
|
96
|
+
/** Sort field */
|
|
97
|
+
sortBy?: keyof Entity;
|
|
98
|
+
/** Sort direction */
|
|
99
|
+
sortOrder: 'asc' | 'desc';
|
|
100
|
+
/** Include relationships */
|
|
101
|
+
includeRelationships: boolean;
|
|
102
|
+
/** Relationship depth */
|
|
103
|
+
relationshipDepth: number;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Default query options
|
|
107
|
+
*/
|
|
108
|
+
export declare const DEFAULT_QUERY_OPTIONS: QueryOptions;
|
|
109
|
+
/**
|
|
110
|
+
* Graph query specification
|
|
111
|
+
*/
|
|
112
|
+
export interface GraphQuery {
|
|
113
|
+
/** Entity filters */
|
|
114
|
+
entityFilters?: {
|
|
115
|
+
types?: EntityType | EntityType[];
|
|
116
|
+
name?: string;
|
|
117
|
+
namespace?: string;
|
|
118
|
+
namePattern?: string;
|
|
119
|
+
};
|
|
120
|
+
/** Relationship filters */
|
|
121
|
+
relationshipFilters?: {
|
|
122
|
+
types?: RelationType[];
|
|
123
|
+
direction?: 'in' | 'out' | 'both';
|
|
124
|
+
};
|
|
125
|
+
/** Full-text search query */
|
|
126
|
+
textSearch?: string;
|
|
127
|
+
/** Include relationships in result */
|
|
128
|
+
includeRelationships?: boolean;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Query result
|
|
132
|
+
*/
|
|
133
|
+
export interface QueryResult {
|
|
134
|
+
/** Matched entities */
|
|
135
|
+
entities: Entity[];
|
|
136
|
+
/** Related relationships */
|
|
137
|
+
relationships: Relationship[];
|
|
138
|
+
/** Total count (before pagination) */
|
|
139
|
+
totalCount: number;
|
|
140
|
+
/** Whether more results exist */
|
|
141
|
+
hasMore: boolean;
|
|
142
|
+
/** Query execution time in ms */
|
|
143
|
+
executionTime: number;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Path between entities
|
|
147
|
+
* @see REQ-YL-QUERY-002
|
|
148
|
+
*/
|
|
149
|
+
export interface Path {
|
|
150
|
+
/** Entities in the path */
|
|
151
|
+
entities: Entity[];
|
|
152
|
+
/** Relationships in the path */
|
|
153
|
+
relationships: Relationship[];
|
|
154
|
+
/** Path length (number of hops) */
|
|
155
|
+
length: number;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Path finding options
|
|
159
|
+
*/
|
|
160
|
+
export interface PathOptions {
|
|
161
|
+
/** Maximum path length */
|
|
162
|
+
maxLength: number;
|
|
163
|
+
/** Maximum paths to return */
|
|
164
|
+
maxPaths: number;
|
|
165
|
+
/** Allowed relationship types */
|
|
166
|
+
allowedRelations?: RelationType[];
|
|
167
|
+
/** Use weighted shortest path */
|
|
168
|
+
weighted: boolean;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Default path options
|
|
172
|
+
*/
|
|
173
|
+
export declare const DEFAULT_PATH_OPTIONS: PathOptions;
|
|
174
|
+
/**
|
|
175
|
+
* Subgraph extraction result
|
|
176
|
+
* @see REQ-YL-QUERY-003
|
|
177
|
+
*/
|
|
178
|
+
export interface Subgraph {
|
|
179
|
+
/** Root entity ID */
|
|
180
|
+
rootId: string;
|
|
181
|
+
/** Entities in subgraph */
|
|
182
|
+
entities: Entity[];
|
|
183
|
+
/** Relationships in subgraph */
|
|
184
|
+
relationships: Relationship[];
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Graph pattern for matching
|
|
188
|
+
* @see REQ-YL-QUERY-004
|
|
189
|
+
*/
|
|
190
|
+
export interface GraphPattern {
|
|
191
|
+
/** Pattern nodes */
|
|
192
|
+
nodes: PatternNode[];
|
|
193
|
+
/** Pattern edges */
|
|
194
|
+
edges: PatternEdge[];
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Pattern node specification
|
|
198
|
+
*/
|
|
199
|
+
export interface PatternNode {
|
|
200
|
+
/** Variable name for binding */
|
|
201
|
+
variable: string;
|
|
202
|
+
/** Required entity type */
|
|
203
|
+
type?: EntityType;
|
|
204
|
+
/** Name pattern (regex) */
|
|
205
|
+
namePattern?: string;
|
|
206
|
+
/** Additional constraints */
|
|
207
|
+
constraints?: Record<string, unknown>;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Pattern edge specification
|
|
211
|
+
*/
|
|
212
|
+
export interface PatternEdge {
|
|
213
|
+
/** Source node variable */
|
|
214
|
+
sourceVar: string;
|
|
215
|
+
/** Target node variable */
|
|
216
|
+
targetVar: string;
|
|
217
|
+
/** Required relationship type */
|
|
218
|
+
type?: RelationType;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Pattern match result
|
|
222
|
+
*/
|
|
223
|
+
export interface PatternMatch {
|
|
224
|
+
/** Variable bindings (variable name -> entity ID) */
|
|
225
|
+
bindings: Record<string, string>;
|
|
226
|
+
/** Match confidence */
|
|
227
|
+
confidence: number;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Inference rule
|
|
231
|
+
* @see REQ-YL-REASON-001
|
|
232
|
+
*/
|
|
233
|
+
export interface InferenceRule {
|
|
234
|
+
/** Rule identifier */
|
|
235
|
+
id: string;
|
|
236
|
+
/** Rule name */
|
|
237
|
+
name: string;
|
|
238
|
+
/** Rule description */
|
|
239
|
+
description: string;
|
|
240
|
+
/** Pattern to match */
|
|
241
|
+
pattern: GraphPattern;
|
|
242
|
+
/** Inference to apply when pattern matches */
|
|
243
|
+
inference: {
|
|
244
|
+
sourceVar: string;
|
|
245
|
+
targetVar: string;
|
|
246
|
+
type: RelationType;
|
|
247
|
+
};
|
|
248
|
+
/** Rule confidence */
|
|
249
|
+
confidence: number;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Constraint definition
|
|
253
|
+
* @see REQ-YL-REASON-003
|
|
254
|
+
*/
|
|
255
|
+
export interface Constraint {
|
|
256
|
+
/** Constraint identifier */
|
|
257
|
+
id: string;
|
|
258
|
+
/** Constraint name */
|
|
259
|
+
name: string;
|
|
260
|
+
/** Constraint description */
|
|
261
|
+
description: string;
|
|
262
|
+
/** Constraint type */
|
|
263
|
+
type: 'graph' | 'referential' | 'cardinality' | 'property';
|
|
264
|
+
/** Check function */
|
|
265
|
+
check: (db: YataDatabase) => Promise<ConstraintViolation[]>;
|
|
266
|
+
}
|
|
267
|
+
export type YataDatabase = import('./database.js').YataDatabase;
|
|
268
|
+
/**
|
|
269
|
+
* Constraint violation
|
|
270
|
+
*/
|
|
271
|
+
export interface ConstraintViolation {
|
|
272
|
+
/** Affected entity ID */
|
|
273
|
+
entityId?: string;
|
|
274
|
+
/** Affected relationship ID */
|
|
275
|
+
relationshipId?: string;
|
|
276
|
+
/** Violated constraint ID */
|
|
277
|
+
constraintId: string;
|
|
278
|
+
/** Violation message */
|
|
279
|
+
message: string;
|
|
280
|
+
/** Severity */
|
|
281
|
+
severity: 'error' | 'warning' | 'info';
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Validation result
|
|
285
|
+
*/
|
|
286
|
+
export interface ValidationResult {
|
|
287
|
+
/** Whether graph is valid (no errors) */
|
|
288
|
+
valid: boolean;
|
|
289
|
+
/** Violations found */
|
|
290
|
+
violations: ConstraintViolation[];
|
|
291
|
+
/** Summary counts */
|
|
292
|
+
summary: {
|
|
293
|
+
total: number;
|
|
294
|
+
errors: number;
|
|
295
|
+
warnings: number;
|
|
296
|
+
info: number;
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Delta for synchronization
|
|
301
|
+
* @see REQ-YL-IO-004
|
|
302
|
+
*/
|
|
303
|
+
export interface Delta {
|
|
304
|
+
/** Entities changes */
|
|
305
|
+
entities: {
|
|
306
|
+
added: Entity[];
|
|
307
|
+
updated: Entity[];
|
|
308
|
+
deleted: string[];
|
|
309
|
+
};
|
|
310
|
+
/** Relationships changes */
|
|
311
|
+
relationships: {
|
|
312
|
+
added: Relationship[];
|
|
313
|
+
deleted: string[];
|
|
314
|
+
};
|
|
315
|
+
/** Delta timestamp */
|
|
316
|
+
timestamp: Date;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Merge result
|
|
320
|
+
*/
|
|
321
|
+
export interface MergeResult {
|
|
322
|
+
/** Whether the operation succeeded */
|
|
323
|
+
success: boolean;
|
|
324
|
+
/** Number of entities added */
|
|
325
|
+
entitiesAdded: number;
|
|
326
|
+
/** Number of entities updated */
|
|
327
|
+
entitiesUpdated: number;
|
|
328
|
+
/** Number of entities skipped */
|
|
329
|
+
entitiesSkipped: number;
|
|
330
|
+
/** Number of relationships added */
|
|
331
|
+
relationshipsAdded: number;
|
|
332
|
+
/** Number of relationships skipped */
|
|
333
|
+
relationshipsSkipped: number;
|
|
334
|
+
/** Conflicts encountered */
|
|
335
|
+
conflicts: MergeConflict[];
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Merge conflict
|
|
339
|
+
*/
|
|
340
|
+
export interface MergeConflict {
|
|
341
|
+
/** Conflict type */
|
|
342
|
+
type: 'entity' | 'relationship';
|
|
343
|
+
/** Conflicting item ID */
|
|
344
|
+
id: string;
|
|
345
|
+
/** Reason for conflict */
|
|
346
|
+
reason: string;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Graph statistics
|
|
350
|
+
*/
|
|
351
|
+
export interface GraphStats {
|
|
352
|
+
/** Total entity count */
|
|
353
|
+
entityCount: number;
|
|
354
|
+
/** Entities by type */
|
|
355
|
+
entitiesByType: Record<EntityType, number>;
|
|
356
|
+
/** Total relationship count */
|
|
357
|
+
relationshipCount: number;
|
|
358
|
+
/** Relationships by type */
|
|
359
|
+
relationshipsByType: Record<RelationType, number>;
|
|
360
|
+
/** Database file size in bytes */
|
|
361
|
+
databaseSize: number;
|
|
362
|
+
/** Last modified timestamp */
|
|
363
|
+
lastModified: Date;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Pattern category
|
|
367
|
+
*/
|
|
368
|
+
export type PatternCategory = 'code' | 'design' | 'requirement' | 'test' | 'architecture';
|
|
369
|
+
/**
|
|
370
|
+
* Learned pattern stored in knowledge graph
|
|
371
|
+
* @see REQ-WSL-003
|
|
372
|
+
*/
|
|
373
|
+
export interface LearnedPattern {
|
|
374
|
+
/** Unique identifier */
|
|
375
|
+
id: string;
|
|
376
|
+
/** Pattern name */
|
|
377
|
+
name: string;
|
|
378
|
+
/** Pattern category */
|
|
379
|
+
category: PatternCategory;
|
|
380
|
+
/** Pattern content (code snippet, template, etc.) */
|
|
381
|
+
content: string;
|
|
382
|
+
/** Abstract Syntax Tree representation */
|
|
383
|
+
ast?: unknown;
|
|
384
|
+
/** Confidence score (0.0 - 1.0) */
|
|
385
|
+
confidence: number;
|
|
386
|
+
/** Number of times pattern was observed */
|
|
387
|
+
occurrences: number;
|
|
388
|
+
/** Last time pattern was used */
|
|
389
|
+
lastUsedAt?: Date;
|
|
390
|
+
/** Number of times pattern was applied */
|
|
391
|
+
usageCount: number;
|
|
392
|
+
/** Source of pattern (file path, module, etc.) */
|
|
393
|
+
source?: string;
|
|
394
|
+
/** Additional metadata */
|
|
395
|
+
metadata: Record<string, unknown>;
|
|
396
|
+
/** Creation timestamp */
|
|
397
|
+
createdAt: Date;
|
|
398
|
+
/** Last update timestamp */
|
|
399
|
+
updatedAt: Date;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Pattern input for creation
|
|
403
|
+
*/
|
|
404
|
+
export interface PatternInput {
|
|
405
|
+
name: string;
|
|
406
|
+
category?: PatternCategory;
|
|
407
|
+
content: string;
|
|
408
|
+
ast?: unknown;
|
|
409
|
+
confidence?: number;
|
|
410
|
+
occurrences?: number;
|
|
411
|
+
source?: string;
|
|
412
|
+
metadata?: Record<string, unknown>;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Pattern query options
|
|
416
|
+
*/
|
|
417
|
+
export interface PatternQueryOptions {
|
|
418
|
+
category?: PatternCategory;
|
|
419
|
+
minConfidence?: number;
|
|
420
|
+
limit?: number;
|
|
421
|
+
offset?: number;
|
|
422
|
+
sortBy?: 'confidence' | 'occurrences' | 'lastUsedAt' | 'createdAt';
|
|
423
|
+
sortOrder?: 'asc' | 'desc';
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Learning cycle record
|
|
427
|
+
* @see REQ-WSL-005
|
|
428
|
+
*/
|
|
429
|
+
export interface LearningCycle {
|
|
430
|
+
/** Unique identifier */
|
|
431
|
+
id: string;
|
|
432
|
+
/** Number of patterns extracted in wake phase */
|
|
433
|
+
wakeExtracted: number;
|
|
434
|
+
/** Number of files observed in wake phase */
|
|
435
|
+
wakeObservedFiles: number;
|
|
436
|
+
/** Number of patterns clustered in sleep phase */
|
|
437
|
+
sleepClustered: number;
|
|
438
|
+
/** Number of patterns decayed/removed in sleep phase */
|
|
439
|
+
sleepDecayed: number;
|
|
440
|
+
/** Duration in milliseconds */
|
|
441
|
+
durationMs: number;
|
|
442
|
+
/** Additional metadata */
|
|
443
|
+
metadata: Record<string, unknown>;
|
|
444
|
+
/** Completion timestamp */
|
|
445
|
+
completedAt: Date;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Learning cycle input for logging
|
|
449
|
+
*/
|
|
450
|
+
export interface LearningCycleInput {
|
|
451
|
+
wakeExtracted: number;
|
|
452
|
+
wakeObservedFiles: number;
|
|
453
|
+
sleepClustered: number;
|
|
454
|
+
sleepDecayed: number;
|
|
455
|
+
durationMs: number;
|
|
456
|
+
metadata?: Record<string, unknown>;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Learning statistics
|
|
460
|
+
*/
|
|
461
|
+
export interface LearningStats {
|
|
462
|
+
/** Total patterns count */
|
|
463
|
+
totalPatterns: number;
|
|
464
|
+
/** Patterns by category */
|
|
465
|
+
patternsByCategory: Record<PatternCategory, number>;
|
|
466
|
+
/** Average confidence */
|
|
467
|
+
averageConfidence: number;
|
|
468
|
+
/** Total learning cycles */
|
|
469
|
+
totalCycles: number;
|
|
470
|
+
/** Last cycle timestamp */
|
|
471
|
+
lastCycleAt?: Date;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* KGPR status
|
|
475
|
+
*/
|
|
476
|
+
export type KGPRStatusLocal = 'draft' | 'open' | 'reviewing' | 'approved' | 'changes_requested' | 'merged' | 'closed';
|
|
477
|
+
/**
|
|
478
|
+
* Privacy level for KGPR
|
|
479
|
+
*/
|
|
480
|
+
export type PrivacyLevel = 'strict' | 'moderate' | 'none';
|
|
481
|
+
/**
|
|
482
|
+
* Local KGPR record (stored in YATA Local)
|
|
483
|
+
* @see REQ-KGPR-001
|
|
484
|
+
*/
|
|
485
|
+
export interface LocalKGPR {
|
|
486
|
+
/** Unique identifier */
|
|
487
|
+
id: string;
|
|
488
|
+
/** KGPR title */
|
|
489
|
+
title: string;
|
|
490
|
+
/** Description */
|
|
491
|
+
description?: string;
|
|
492
|
+
/** Current status */
|
|
493
|
+
status: KGPRStatusLocal;
|
|
494
|
+
/** Author identifier */
|
|
495
|
+
author: string;
|
|
496
|
+
/** Source namespace */
|
|
497
|
+
namespace: string;
|
|
498
|
+
/** Diff data as JSON */
|
|
499
|
+
diffJson: string;
|
|
500
|
+
/** Privacy level */
|
|
501
|
+
privacyLevel: PrivacyLevel;
|
|
502
|
+
/** Entity types JSON */
|
|
503
|
+
entityTypesJson?: string;
|
|
504
|
+
/** Creation timestamp */
|
|
505
|
+
createdAt: Date;
|
|
506
|
+
/** Updated timestamp */
|
|
507
|
+
updatedAt: Date;
|
|
508
|
+
/** Submission timestamp */
|
|
509
|
+
submittedAt?: Date;
|
|
510
|
+
/** Review timestamp */
|
|
511
|
+
reviewedAt?: Date;
|
|
512
|
+
/** Merge timestamp */
|
|
513
|
+
mergedAt?: Date;
|
|
514
|
+
/** Close timestamp */
|
|
515
|
+
closedAt?: Date;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Input for creating/inserting a local KGPR
|
|
519
|
+
*/
|
|
520
|
+
export interface LocalKGPRInput {
|
|
521
|
+
/** Unique identifier */
|
|
522
|
+
id: string;
|
|
523
|
+
/** KGPR title */
|
|
524
|
+
title: string;
|
|
525
|
+
/** Description */
|
|
526
|
+
description?: string;
|
|
527
|
+
/** Current status */
|
|
528
|
+
status: KGPRStatusLocal;
|
|
529
|
+
/** Author identifier */
|
|
530
|
+
author: string;
|
|
531
|
+
/** Source namespace */
|
|
532
|
+
namespace?: string;
|
|
533
|
+
/** Diff data as JSON */
|
|
534
|
+
diffJson: string;
|
|
535
|
+
/** Privacy level */
|
|
536
|
+
privacyLevel: PrivacyLevel;
|
|
537
|
+
/** Entity types as JSON */
|
|
538
|
+
entityTypesJson?: string;
|
|
539
|
+
/** Creation timestamp */
|
|
540
|
+
createdAt: string;
|
|
541
|
+
/** Updated timestamp */
|
|
542
|
+
updatedAt?: string;
|
|
543
|
+
/** Submission timestamp */
|
|
544
|
+
submittedAt?: string;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* KGPR review record
|
|
548
|
+
*/
|
|
549
|
+
export interface LocalKGPRReview {
|
|
550
|
+
/** Unique identifier */
|
|
551
|
+
id: string;
|
|
552
|
+
/** Associated KGPR ID */
|
|
553
|
+
kgprId: string;
|
|
554
|
+
/** Reviewer identifier */
|
|
555
|
+
reviewer: string;
|
|
556
|
+
/** Review action */
|
|
557
|
+
action: 'approve' | 'changes_requested' | 'commented';
|
|
558
|
+
/** Review comment */
|
|
559
|
+
comment?: string;
|
|
560
|
+
/** Creation timestamp */
|
|
561
|
+
createdAt: Date;
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* Input for creating/inserting a KGPR review
|
|
565
|
+
*/
|
|
566
|
+
export interface LocalKGPRReviewInput {
|
|
567
|
+
/** Unique identifier */
|
|
568
|
+
id: string;
|
|
569
|
+
/** Associated KGPR ID */
|
|
570
|
+
kgprId: string;
|
|
571
|
+
/** Reviewer identifier */
|
|
572
|
+
reviewer: string;
|
|
573
|
+
/** Review action (matches LocalKGPRReviewEntry.status) */
|
|
574
|
+
action: 'approved' | 'changes_requested' | 'commented';
|
|
575
|
+
/** Review comment */
|
|
576
|
+
comment?: string | null;
|
|
577
|
+
/** Creation timestamp */
|
|
578
|
+
createdAt: string;
|
|
579
|
+
}
|
|
580
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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,YAAY,CAAC;IAC3B,2BAA2B;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2BAA2B;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB;IACpB,MAAM,EAAE,SAAS,GAAG,mBAAmB,GAAG,WAAW,CAAC;IACtD,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,MAAM,EAAE,UAAU,GAAG,mBAAmB,GAAG,WAAW,CAAC;IACvD,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YATA Local - Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
* @module @nahisaho/yata-local
|
|
6
|
+
*
|
|
7
|
+
* @see REQ-YATA-LOCAL-001
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Default database configuration
|
|
11
|
+
*/
|
|
12
|
+
export const DEFAULT_DB_CONFIG = {
|
|
13
|
+
path: '.yata/knowledge.db',
|
|
14
|
+
walMode: true,
|
|
15
|
+
mmapSize: 256 * 1024 * 1024, // 256MB
|
|
16
|
+
cacheSize: 64 * 1024, // 64MB
|
|
17
|
+
foreignKeys: true,
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Default query options
|
|
21
|
+
*/
|
|
22
|
+
export const DEFAULT_QUERY_OPTIONS = {
|
|
23
|
+
limit: 100,
|
|
24
|
+
offset: 0,
|
|
25
|
+
sortOrder: 'asc',
|
|
26
|
+
includeRelationships: false,
|
|
27
|
+
relationshipDepth: 1,
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Default path options
|
|
31
|
+
*/
|
|
32
|
+
export const DEFAULT_PATH_OPTIONS = {
|
|
33
|
+
maxLength: 10,
|
|
34
|
+
maxPaths: 5,
|
|
35
|
+
weighted: false,
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAsHH;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAmB;IAC/C,IAAI,EAAE,oBAAoB;IAC1B,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI,EAAE,QAAQ;IACrC,SAAS,EAAE,EAAE,GAAG,IAAI,EAAE,OAAO;IAC7B,WAAW,EAAE,IAAI;CAClB,CAAC;AAqBF;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAiB;IACjD,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,CAAC;IACT,SAAS,EAAE,KAAK;IAChB,oBAAoB,EAAE,KAAK;IAC3B,iBAAiB,EAAE,CAAC;CACrB,CAAC;AAmEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,CAAC;IACX,QAAQ,EAAE,KAAK;CAChB,CAAC"}
|