aifastdb 1.9.7 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/aifastdb.win32-x64-msvc.node +0 -0
  2. package/dist/architecture-store.d.ts +203 -0
  3. package/dist/architecture-store.d.ts.map +1 -0
  4. package/dist/architecture-store.js +516 -0
  5. package/dist/architecture-store.js.map +1 -0
  6. package/dist/cli.js +0 -0
  7. package/dist/document-store.d.ts +130 -0
  8. package/dist/document-store.d.ts.map +1 -0
  9. package/dist/document-store.js +102 -0
  10. package/dist/document-store.js.map +1 -0
  11. package/dist/federation/FederatedDb.d.ts +206 -0
  12. package/dist/federation/FederatedDb.d.ts.map +1 -0
  13. package/dist/federation/FederatedDb.js +302 -0
  14. package/dist/federation/FederatedDb.js.map +1 -0
  15. package/dist/federation/index.d.ts +56 -0
  16. package/dist/federation/index.d.ts.map +1 -0
  17. package/dist/federation/index.js +68 -0
  18. package/dist/federation/index.js.map +1 -0
  19. package/dist/federation/types.d.ts +247 -0
  20. package/dist/federation/types.d.ts.map +1 -0
  21. package/dist/federation/types.js +29 -0
  22. package/dist/federation/types.js.map +1 -0
  23. package/dist/index.d.ts +3 -0
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +24 -2
  26. package/dist/index.js.map +1 -1
  27. package/dist/mcp-server/index.d.ts +18 -0
  28. package/dist/mcp-server/index.d.ts.map +1 -0
  29. package/dist/mcp-server/index.js +514 -0
  30. package/dist/mcp-server/index.js.map +1 -0
  31. package/dist/native.d.ts +13 -0
  32. package/dist/native.d.ts.map +1 -1
  33. package/dist/native.js +4 -1
  34. package/dist/native.js.map +1 -1
  35. package/dist/social-graph-v2.d.ts +63 -0
  36. package/dist/social-graph-v2.d.ts.map +1 -1
  37. package/dist/social-graph-v2.js +69 -0
  38. package/dist/social-graph-v2.js.map +1 -1
  39. package/dist/social-graph.js +2 -2
  40. package/dist/social-graph.js.map +1 -1
  41. package/dist/social-types.d.ts +3 -4
  42. package/dist/social-types.d.ts.map +1 -1
  43. package/dist/types.d.ts +2 -2
  44. package/dist/types.js +2 -2
  45. package/dist/types.js.map +1 -1
  46. package/package.json +14 -11
Binary file
@@ -0,0 +1,203 @@
1
+ /**
2
+ * Architecture Documentation Store
3
+ *
4
+ * Uses EnhancedDocumentStore for both document content storage
5
+ * and module relationship management.
6
+ *
7
+ * Features:
8
+ * - Store architecture documents (overview, module, api, data_model, deployment)
9
+ * - Track module dependencies and relationships via document metadata
10
+ * - Support versioning
11
+ * - Search across documentation
12
+ * - Export to Mermaid diagrams
13
+ */
14
+ import { type ArchitectureDocument } from './document-store';
15
+ /**
16
+ * Architecture document types
17
+ */
18
+ export type ArchDocType = 'overview' | 'module' | 'api' | 'data_model' | 'deployment';
19
+ /**
20
+ * Module relationship types
21
+ */
22
+ export type ModuleRelationType = 'depends_on' | 'imports' | 'extends' | 'implements' | 'contains' | 'uses' | 'related_to';
23
+ /**
24
+ * Module information
25
+ */
26
+ export interface ModuleInfo {
27
+ /** Module name (unique identifier) */
28
+ name: string;
29
+ /** Module path (e.g., "packages/core/src/storage") */
30
+ path?: string;
31
+ /** Module description */
32
+ description?: string;
33
+ /** Module type (e.g., "library", "service", "component") */
34
+ moduleType?: string;
35
+ /** Technologies used */
36
+ technologies?: string[];
37
+ /** Dependencies (module names this module depends on) */
38
+ dependencies?: string[];
39
+ /** Additional properties */
40
+ properties?: Record<string, unknown>;
41
+ }
42
+ /**
43
+ * Module relationship
44
+ */
45
+ export interface ModuleRelation {
46
+ /** Source module name */
47
+ from: string;
48
+ /** Target module name */
49
+ to: string;
50
+ /** Relationship type */
51
+ relationType: ModuleRelationType;
52
+ /** Relationship description */
53
+ description?: string;
54
+ }
55
+ /**
56
+ * Stored module entity
57
+ */
58
+ export interface ModuleEntity {
59
+ /** Unique ID */
60
+ id: string;
61
+ /** Module name */
62
+ name: string;
63
+ /** Module path */
64
+ path?: string;
65
+ /** Module description */
66
+ description?: string;
67
+ /** Module type */
68
+ moduleType?: string;
69
+ /** Technologies used */
70
+ technologies?: string[];
71
+ /** Dependencies (module names) */
72
+ dependencies?: string[];
73
+ /** Dependents (module names that depend on this) */
74
+ dependents?: string[];
75
+ /** Outgoing relations */
76
+ relations?: ModuleRelation[];
77
+ /** Project name */
78
+ projectName: string;
79
+ /** Created timestamp */
80
+ createdAt: number;
81
+ /** Updated timestamp */
82
+ updatedAt: number;
83
+ /** Additional properties */
84
+ properties?: Record<string, unknown>;
85
+ }
86
+ /**
87
+ * Architecture store configuration
88
+ */
89
+ export interface ArchitectureStoreConfig {
90
+ /** Path for document storage */
91
+ documentPath: string;
92
+ /** Path for module storage */
93
+ modulePath: string;
94
+ }
95
+ /**
96
+ * Architecture Documentation Store
97
+ *
98
+ * Manages system architecture documentation and module relationships.
99
+ * Uses EnhancedDocumentStore for persistence.
100
+ */
101
+ export declare class ArchitectureStore {
102
+ private docStore;
103
+ private moduleStore;
104
+ private projectName;
105
+ /**
106
+ * Create an architecture store for a project
107
+ *
108
+ * @param projectName - Project name
109
+ * @param config - Storage configuration
110
+ */
111
+ constructor(projectName: string, config: ArchitectureStoreConfig);
112
+ /**
113
+ * Save an architecture document
114
+ */
115
+ saveDocument(docType: ArchDocType, content: string, options?: {
116
+ version?: string;
117
+ author?: string;
118
+ tags?: string[];
119
+ }): string;
120
+ /**
121
+ * Get an architecture document
122
+ */
123
+ getDocument(docType: ArchDocType): ArchitectureDocument | null;
124
+ /**
125
+ * Get all architecture documents for the project
126
+ */
127
+ getAllDocuments(): ArchitectureDocument[];
128
+ /**
129
+ * Search architecture documents
130
+ */
131
+ searchDocuments(query: string, limit?: number): ArchitectureDocument[];
132
+ /**
133
+ * Add a module to the architecture
134
+ */
135
+ addModule(info: ModuleInfo): ModuleEntity;
136
+ /**
137
+ * Get a module by name
138
+ */
139
+ getModule(name: string): ModuleEntity | null;
140
+ /**
141
+ * List all modules
142
+ */
143
+ listModules(): ModuleEntity[];
144
+ /**
145
+ * Update a module
146
+ */
147
+ updateModule(name: string, updates: Partial<ModuleInfo>): ModuleEntity | null;
148
+ /**
149
+ * Delete a module
150
+ */
151
+ deleteModule(name: string): boolean;
152
+ /**
153
+ * Add a dependent to a module (internal helper)
154
+ */
155
+ private addDependentToModule;
156
+ /**
157
+ * Remove a dependent from a module (internal helper)
158
+ */
159
+ private removeDependentFromModule;
160
+ /**
161
+ * Internal update that doesn't trigger dependency updates
162
+ */
163
+ private updateModuleInternal;
164
+ /**
165
+ * Add a relationship between modules
166
+ */
167
+ addModuleRelation(relation: ModuleRelation): boolean;
168
+ /**
169
+ * Get module dependencies (modules that this module depends on)
170
+ */
171
+ getModuleDependencies(moduleName: string): ModuleEntity[];
172
+ /**
173
+ * Get module dependents (modules that depend on this module)
174
+ */
175
+ getModuleDependents(moduleName: string): ModuleEntity[];
176
+ /**
177
+ * Get the dependency graph as adjacency list
178
+ */
179
+ getDependencyGraph(): Record<string, string[]>;
180
+ /**
181
+ * Sync changes to disk
182
+ */
183
+ sync(): void;
184
+ /**
185
+ * Get project statistics
186
+ */
187
+ getStats(): {
188
+ projectName: string;
189
+ documentCount: number;
190
+ moduleCount: number;
191
+ relationCount: number;
192
+ documentTypes: ArchDocType[];
193
+ };
194
+ /**
195
+ * Export architecture to Mermaid diagram format
196
+ */
197
+ exportToMermaid(): string;
198
+ }
199
+ /**
200
+ * Create an architecture store for a project
201
+ */
202
+ export declare function createArchitectureStore(projectName: string, basePath?: string): ArchitectureStore;
203
+ //# sourceMappingURL=architecture-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"architecture-store.d.ts","sourceRoot":"","sources":["../ts/architecture-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAEL,KAAK,oBAAoB,EAG1B,MAAM,kBAAkB,CAAC;AAO1B;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,YAAY,GAAG,YAAY,CAAC;AAEtF;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