@nahisaho/musubix-codegraph 3.7.3 → 3.8.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/dist/storage/index.d.ts +1 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/knowledge-adapter.d.ts +69 -0
- package/dist/storage/knowledge-adapter.d.ts.map +1 -0
- package/dist/storage/knowledge-adapter.js +312 -0
- package/dist/storage/knowledge-adapter.js.map +1 -0
- package/package.json +19 -10
- package/LICENSE +0 -21
package/dist/storage/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/storage/index.js
CHANGED
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export { MemoryStorage } from './memory-storage.js';
|
|
8
8
|
export { SQLiteStorage } from './sqlite-storage.js';
|
|
9
|
-
|
|
9
|
+
export { KnowledgeAdapter } from './knowledge-adapter.js';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAgC,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @nahisaho/musubix-codegraph - Knowledge Store Adapter
|
|
3
|
+
*
|
|
4
|
+
* Adapts @musubix/knowledge's KnowledgeStore to the codegraph StorageAdapter interface.
|
|
5
|
+
* Maps codegraph entities/relations to knowledge graph entities/relations.
|
|
6
|
+
*
|
|
7
|
+
* @see REQ-CG-API-005
|
|
8
|
+
* @see DES-CG-006
|
|
9
|
+
*/
|
|
10
|
+
import type { StorageAdapter, StorageStats, Entity, Relation, GraphQuery } from '../types.js';
|
|
11
|
+
import type { KnowledgeStore } from '@musubix/knowledge';
|
|
12
|
+
/**
|
|
13
|
+
* Options for KnowledgeAdapter
|
|
14
|
+
*/
|
|
15
|
+
export interface KnowledgeAdapterOptions {
|
|
16
|
+
/** Whether to auto-save after each mutation (default: false) */
|
|
17
|
+
autoSave?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Knowledge Store adapter for codegraph
|
|
21
|
+
*
|
|
22
|
+
* Bridges @musubix/knowledge's KnowledgeStore to the codegraph StorageAdapter
|
|
23
|
+
* interface, allowing codegraph data to be persisted in the knowledge graph.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* import { createKnowledgeStore } from '@musubix/knowledge';
|
|
28
|
+
* import { KnowledgeAdapter } from '@nahisaho/musubix-codegraph/storage';
|
|
29
|
+
*
|
|
30
|
+
* const store = createKnowledgeStore('.knowledge');
|
|
31
|
+
* const adapter = new KnowledgeAdapter(store);
|
|
32
|
+
* await adapter.initialize();
|
|
33
|
+
*
|
|
34
|
+
* await adapter.saveEntity(entity);
|
|
35
|
+
* const retrieved = await adapter.getEntity(entity.id);
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare class KnowledgeAdapter implements StorageAdapter {
|
|
39
|
+
private store;
|
|
40
|
+
private options;
|
|
41
|
+
private initialized;
|
|
42
|
+
private filePathSet;
|
|
43
|
+
constructor(store: KnowledgeStore, options?: KnowledgeAdapterOptions);
|
|
44
|
+
initialize(): Promise<void>;
|
|
45
|
+
close(): Promise<void>;
|
|
46
|
+
saveEntity(entity: Entity): Promise<void>;
|
|
47
|
+
getEntity(id: string): Promise<Entity | null>;
|
|
48
|
+
queryEntities(query: GraphQuery): Promise<Entity[]>;
|
|
49
|
+
deleteEntity(id: string): Promise<void>;
|
|
50
|
+
saveRelation(relation: Relation): Promise<void>;
|
|
51
|
+
getRelations(entityId: string, direction?: 'in' | 'out' | 'both'): Promise<Relation[]>;
|
|
52
|
+
deleteRelation(id: string): Promise<void>;
|
|
53
|
+
bulkSave(entities: Entity[], relations: Relation[]): Promise<void>;
|
|
54
|
+
clear(): Promise<void>;
|
|
55
|
+
getStats(): Promise<StorageStats>;
|
|
56
|
+
/**
|
|
57
|
+
* Rebuild the file path index from stored entities
|
|
58
|
+
*/
|
|
59
|
+
private rebuildFilePathIndex;
|
|
60
|
+
/**
|
|
61
|
+
* Save all pending changes to disk
|
|
62
|
+
*/
|
|
63
|
+
save(): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Check if the adapter is initialized
|
|
66
|
+
*/
|
|
67
|
+
isInitialized(): boolean;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=knowledge-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge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Q,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IASlE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBtB,QAAQ,IAAI,OAAO,CAAC,YAAY,CAAC;IAsBvC;;OAEG;YACW,oBAAoB;IAWlC;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACH,aAAa,IAAI,OAAO;CAGzB"}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @nahisaho/musubix-codegraph - Knowledge Store Adapter
|
|
3
|
+
*
|
|
4
|
+
* Adapts @musubix/knowledge's KnowledgeStore to the codegraph StorageAdapter interface.
|
|
5
|
+
* Maps codegraph entities/relations to knowledge graph entities/relations.
|
|
6
|
+
*
|
|
7
|
+
* @see REQ-CG-API-005
|
|
8
|
+
* @see DES-CG-006
|
|
9
|
+
*/
|
|
10
|
+
/** Relation types shared between codegraph and knowledge */
|
|
11
|
+
const SHARED_RELATION_TYPES = new Set([
|
|
12
|
+
'implements',
|
|
13
|
+
'depends_on',
|
|
14
|
+
]);
|
|
15
|
+
/**
|
|
16
|
+
* Map a codegraph RelationType to a knowledge RelationType.
|
|
17
|
+
* Shared types map directly; others map to 'related_to'.
|
|
18
|
+
*/
|
|
19
|
+
function toKnowledgeRelationType(type) {
|
|
20
|
+
if (SHARED_RELATION_TYPES.has(type)) {
|
|
21
|
+
return type;
|
|
22
|
+
}
|
|
23
|
+
return 'related_to';
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Convert a codegraph Entity to a knowledge Entity
|
|
27
|
+
*/
|
|
28
|
+
function toKnowledgeEntity(entity) {
|
|
29
|
+
const now = new Date().toISOString();
|
|
30
|
+
const tags = [];
|
|
31
|
+
if (entity.language)
|
|
32
|
+
tags.push(`lang:${entity.language}`);
|
|
33
|
+
if (entity.type)
|
|
34
|
+
tags.push(`kind:${entity.type}`);
|
|
35
|
+
if (entity.communityId)
|
|
36
|
+
tags.push(`community:${entity.communityId}`);
|
|
37
|
+
return {
|
|
38
|
+
id: `code-node:${entity.id}`,
|
|
39
|
+
type: 'code',
|
|
40
|
+
name: entity.name,
|
|
41
|
+
description: entity.docstring,
|
|
42
|
+
properties: {
|
|
43
|
+
entityType: entity.type,
|
|
44
|
+
qualifiedName: entity.qualifiedName,
|
|
45
|
+
namespace: entity.namespace,
|
|
46
|
+
filePath: entity.filePath,
|
|
47
|
+
startLine: entity.startLine,
|
|
48
|
+
endLine: entity.endLine,
|
|
49
|
+
signature: entity.signature,
|
|
50
|
+
sourceCode: entity.sourceCode,
|
|
51
|
+
communityId: entity.communityId,
|
|
52
|
+
language: entity.language,
|
|
53
|
+
metadata: entity.metadata,
|
|
54
|
+
},
|
|
55
|
+
tags,
|
|
56
|
+
createdAt: entity.createdAt?.toISOString() ?? now,
|
|
57
|
+
updatedAt: entity.updatedAt?.toISOString() ?? now,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Convert a knowledge Entity back to a codegraph Entity
|
|
62
|
+
*/
|
|
63
|
+
function fromKnowledgeEntity(kEntity) {
|
|
64
|
+
const props = kEntity.properties;
|
|
65
|
+
return {
|
|
66
|
+
id: String(kEntity.id).replace(/^code-node:/, ''),
|
|
67
|
+
type: props.entityType ?? 'unknown',
|
|
68
|
+
name: kEntity.name,
|
|
69
|
+
qualifiedName: props.qualifiedName,
|
|
70
|
+
namespace: props.namespace,
|
|
71
|
+
filePath: props.filePath,
|
|
72
|
+
startLine: props.startLine,
|
|
73
|
+
endLine: props.endLine,
|
|
74
|
+
signature: props.signature,
|
|
75
|
+
docstring: kEntity.description,
|
|
76
|
+
sourceCode: props.sourceCode,
|
|
77
|
+
communityId: props.communityId,
|
|
78
|
+
language: props.language,
|
|
79
|
+
metadata: props.metadata ?? {},
|
|
80
|
+
createdAt: kEntity.createdAt ? new Date(kEntity.createdAt) : undefined,
|
|
81
|
+
updatedAt: kEntity.updatedAt ? new Date(kEntity.updatedAt) : undefined,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Convert a codegraph Relation to a knowledge Relation
|
|
86
|
+
*/
|
|
87
|
+
function toKnowledgeRelation(relation) {
|
|
88
|
+
return {
|
|
89
|
+
id: `code-rel:${relation.id}`,
|
|
90
|
+
source: `code-node:${relation.sourceId}`,
|
|
91
|
+
target: `code-node:${relation.targetId}`,
|
|
92
|
+
type: toKnowledgeRelationType(relation.type),
|
|
93
|
+
properties: {
|
|
94
|
+
relationType: relation.type,
|
|
95
|
+
weight: relation.weight,
|
|
96
|
+
metadata: relation.metadata,
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Convert a knowledge Relation back to a codegraph Relation
|
|
102
|
+
*/
|
|
103
|
+
function fromKnowledgeRelation(kRelation) {
|
|
104
|
+
const props = kRelation.properties ?? {};
|
|
105
|
+
return {
|
|
106
|
+
id: String(kRelation.id).replace(/^code-rel:/, ''),
|
|
107
|
+
sourceId: String(kRelation.source).replace(/^code-node:/, ''),
|
|
108
|
+
targetId: String(kRelation.target).replace(/^code-node:/, ''),
|
|
109
|
+
type: props.relationType ?? 'references',
|
|
110
|
+
weight: props.weight ?? 1,
|
|
111
|
+
metadata: props.metadata ?? {},
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Knowledge Store adapter for codegraph
|
|
116
|
+
*
|
|
117
|
+
* Bridges @musubix/knowledge's KnowledgeStore to the codegraph StorageAdapter
|
|
118
|
+
* interface, allowing codegraph data to be persisted in the knowledge graph.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* import { createKnowledgeStore } from '@musubix/knowledge';
|
|
123
|
+
* import { KnowledgeAdapter } from '@nahisaho/musubix-codegraph/storage';
|
|
124
|
+
*
|
|
125
|
+
* const store = createKnowledgeStore('.knowledge');
|
|
126
|
+
* const adapter = new KnowledgeAdapter(store);
|
|
127
|
+
* await adapter.initialize();
|
|
128
|
+
*
|
|
129
|
+
* await adapter.saveEntity(entity);
|
|
130
|
+
* const retrieved = await adapter.getEntity(entity.id);
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
export class KnowledgeAdapter {
|
|
134
|
+
store;
|
|
135
|
+
options;
|
|
136
|
+
initialized = false;
|
|
137
|
+
filePathSet = new Set();
|
|
138
|
+
constructor(store, options = {}) {
|
|
139
|
+
this.store = store;
|
|
140
|
+
this.options = {
|
|
141
|
+
autoSave: options.autoSave ?? false,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
// =========================================================================
|
|
145
|
+
// Lifecycle
|
|
146
|
+
// =========================================================================
|
|
147
|
+
async initialize() {
|
|
148
|
+
if (this.initialized)
|
|
149
|
+
return;
|
|
150
|
+
await this.store.load();
|
|
151
|
+
// Rebuild the file path set from existing entities
|
|
152
|
+
await this.rebuildFilePathIndex();
|
|
153
|
+
this.initialized = true;
|
|
154
|
+
}
|
|
155
|
+
async close() {
|
|
156
|
+
if (this.options.autoSave) {
|
|
157
|
+
await this.store.save();
|
|
158
|
+
}
|
|
159
|
+
this.filePathSet.clear();
|
|
160
|
+
this.initialized = false;
|
|
161
|
+
}
|
|
162
|
+
// =========================================================================
|
|
163
|
+
// Entity Operations
|
|
164
|
+
// =========================================================================
|
|
165
|
+
async saveEntity(entity) {
|
|
166
|
+
const kEntity = toKnowledgeEntity(entity);
|
|
167
|
+
await this.store.putEntity(kEntity);
|
|
168
|
+
if (entity.filePath) {
|
|
169
|
+
this.filePathSet.add(entity.filePath);
|
|
170
|
+
}
|
|
171
|
+
if (this.options.autoSave) {
|
|
172
|
+
await this.store.save();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
async getEntity(id) {
|
|
176
|
+
const kEntity = await this.store.getEntity(`code-node:${id}`);
|
|
177
|
+
if (!kEntity)
|
|
178
|
+
return null;
|
|
179
|
+
return fromKnowledgeEntity(kEntity);
|
|
180
|
+
}
|
|
181
|
+
async queryEntities(query) {
|
|
182
|
+
// Use the knowledge store's query to get code entities
|
|
183
|
+
const allCodeEntities = await this.store.query({
|
|
184
|
+
type: 'code',
|
|
185
|
+
});
|
|
186
|
+
let results = allCodeEntities.map(fromKnowledgeEntity);
|
|
187
|
+
// Filter by entity types
|
|
188
|
+
if (query.entityTypes && query.entityTypes.length > 0) {
|
|
189
|
+
results = results.filter((e) => query.entityTypes.includes(e.type));
|
|
190
|
+
}
|
|
191
|
+
// Filter by file path
|
|
192
|
+
if (query.filePath) {
|
|
193
|
+
const normalizedPath = query.filePath.toLowerCase();
|
|
194
|
+
results = results.filter((e) => e.filePath?.toLowerCase() === normalizedPath);
|
|
195
|
+
}
|
|
196
|
+
// Text search
|
|
197
|
+
if (query.textSearch) {
|
|
198
|
+
const searchLower = query.textSearch.toLowerCase();
|
|
199
|
+
results = results.filter((e) => e.name.toLowerCase().includes(searchLower) ||
|
|
200
|
+
e.id.toLowerCase().includes(searchLower) ||
|
|
201
|
+
e.docstring?.toLowerCase().includes(searchLower));
|
|
202
|
+
}
|
|
203
|
+
// Apply limit
|
|
204
|
+
if (query.limit && query.limit > 0) {
|
|
205
|
+
results = results.slice(0, query.limit);
|
|
206
|
+
}
|
|
207
|
+
return results;
|
|
208
|
+
}
|
|
209
|
+
async deleteEntity(id) {
|
|
210
|
+
// Remove entity from knowledge store (which also removes related relations)
|
|
211
|
+
await this.store.deleteEntity(`code-node:${id}`);
|
|
212
|
+
if (this.options.autoSave) {
|
|
213
|
+
await this.store.save();
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
// =========================================================================
|
|
217
|
+
// Relation Operations
|
|
218
|
+
// =========================================================================
|
|
219
|
+
async saveRelation(relation) {
|
|
220
|
+
const kRelation = toKnowledgeRelation(relation);
|
|
221
|
+
try {
|
|
222
|
+
await this.store.addRelation(kRelation);
|
|
223
|
+
if (this.options.autoSave) {
|
|
224
|
+
await this.store.save();
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
catch {
|
|
228
|
+
// If source/target entity not found in knowledge store, silently skip
|
|
229
|
+
// This can happen when relations reference entities not yet saved
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
async getRelations(entityId, direction = 'both') {
|
|
233
|
+
const kRelations = await this.store.getRelations(`code-node:${entityId}`, direction);
|
|
234
|
+
// Only return relations that belong to codegraph (prefixed with code-rel:)
|
|
235
|
+
return kRelations
|
|
236
|
+
.filter((r) => String(r.id).startsWith('code-rel:'))
|
|
237
|
+
.map(fromKnowledgeRelation);
|
|
238
|
+
}
|
|
239
|
+
async deleteRelation(id) {
|
|
240
|
+
await this.store.removeRelation(`code-rel:${id}`);
|
|
241
|
+
if (this.options.autoSave) {
|
|
242
|
+
await this.store.save();
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
// =========================================================================
|
|
246
|
+
// Bulk Operations
|
|
247
|
+
// =========================================================================
|
|
248
|
+
async bulkSave(entities, relations) {
|
|
249
|
+
for (const entity of entities) {
|
|
250
|
+
await this.saveEntity(entity);
|
|
251
|
+
}
|
|
252
|
+
for (const relation of relations) {
|
|
253
|
+
await this.saveRelation(relation);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
async clear() {
|
|
257
|
+
// Query all code entities and delete them
|
|
258
|
+
const codeEntities = await this.store.query({ type: 'code' });
|
|
259
|
+
for (const entity of codeEntities) {
|
|
260
|
+
await this.store.deleteEntity(entity.id);
|
|
261
|
+
}
|
|
262
|
+
this.filePathSet.clear();
|
|
263
|
+
if (this.options.autoSave) {
|
|
264
|
+
await this.store.save();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
// =========================================================================
|
|
268
|
+
// Statistics
|
|
269
|
+
// =========================================================================
|
|
270
|
+
async getStats() {
|
|
271
|
+
const codeEntities = await this.store.query({ type: 'code' });
|
|
272
|
+
let relationCount = 0;
|
|
273
|
+
for (const entity of codeEntities) {
|
|
274
|
+
const rels = await this.store.getRelations(entity.id, 'out');
|
|
275
|
+
relationCount += rels.filter((r) => String(r.id).startsWith('code-rel:')).length;
|
|
276
|
+
}
|
|
277
|
+
return {
|
|
278
|
+
entityCount: codeEntities.length,
|
|
279
|
+
relationCount,
|
|
280
|
+
fileCount: this.filePathSet.size,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
// =========================================================================
|
|
284
|
+
// Internal Helpers
|
|
285
|
+
// =========================================================================
|
|
286
|
+
/**
|
|
287
|
+
* Rebuild the file path index from stored entities
|
|
288
|
+
*/
|
|
289
|
+
async rebuildFilePathIndex() {
|
|
290
|
+
this.filePathSet.clear();
|
|
291
|
+
const codeEntities = await this.store.query({ type: 'code' });
|
|
292
|
+
for (const entity of codeEntities) {
|
|
293
|
+
const filePath = entity.properties.filePath;
|
|
294
|
+
if (typeof filePath === 'string') {
|
|
295
|
+
this.filePathSet.add(filePath);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Save all pending changes to disk
|
|
301
|
+
*/
|
|
302
|
+
async save() {
|
|
303
|
+
await this.store.save();
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Check if the adapter is initialized
|
|
307
|
+
*/
|
|
308
|
+
isInitialized() {
|
|
309
|
+
return this.initialized;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
//# sourceMappingURL=knowledge-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge-adapter.js","sourceRoot":"","sources":["../../src/storage/knowledge-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA0BH,4DAA4D;AAC5D,MAAM,qBAAqB,GAAgB,IAAI,GAAG,CAAC;IACjD,YAAY;IACZ,YAAY;CACb,CAAC,CAAC;AAEH;;;GAGG;AACH,SAAS,uBAAuB,CAAC,IAAkB;IACjD,IAAI,qBAA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
2
2
|
"name": "@nahisaho/musubix-codegraph",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"description": "MUSUBIX CodeGraph - Multi-language Code Graph Analysis Engine supporting 16 programming languages with PR generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,6 +39,14 @@
|
|
|
39
39
|
"dist",
|
|
40
40
|
"README.md"
|
|
41
41
|
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsc -p tsconfig.json",
|
|
44
|
+
"test": "vitest run",
|
|
45
|
+
"test:watch": "vitest",
|
|
46
|
+
"test:coverage": "vitest run --coverage",
|
|
47
|
+
"lint": "eslint src --ext .ts",
|
|
48
|
+
"clean": "rm -rf dist"
|
|
49
|
+
},
|
|
42
50
|
"keywords": [
|
|
43
51
|
"codegraph",
|
|
44
52
|
"ast",
|
|
@@ -85,17 +93,18 @@
|
|
|
85
93
|
"tree-sitter-scala": "^0.21.0",
|
|
86
94
|
"tree-sitter-lua": "^2.1.3"
|
|
87
95
|
},
|
|
96
|
+
"peerDependencies": {
|
|
97
|
+
"@musubix/knowledge": "^3.0.0"
|
|
98
|
+
},
|
|
99
|
+
"peerDependenciesMeta": {
|
|
100
|
+
"@musubix/knowledge": {
|
|
101
|
+
"optional": true
|
|
102
|
+
}
|
|
103
|
+
},
|
|
88
104
|
"devDependencies": {
|
|
105
|
+
"@musubix/knowledge": "^3.7.3",
|
|
89
106
|
"@types/node": "^20.0.0",
|
|
90
107
|
"typescript": "^5.3.0",
|
|
91
108
|
"vitest": "^4.0.16"
|
|
92
|
-
},
|
|
93
|
-
"scripts": {
|
|
94
|
-
"build": "tsc -p tsconfig.json",
|
|
95
|
-
"test": "vitest run",
|
|
96
|
-
"test:watch": "vitest",
|
|
97
|
-
"test:coverage": "vitest run --coverage",
|
|
98
|
-
"lint": "eslint src --ext .ts",
|
|
99
|
-
"clean": "rm -rf dist"
|
|
100
109
|
}
|
|
101
|
-
}
|
|
110
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 nahisaho
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|