mindgraph 0.2.0 → 0.2.2
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/index.d.mts +36 -2
- package/dist/index.d.ts +36 -2
- package/dist/index.js +18 -0
- package/dist/index.mjs +18 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -30,6 +30,18 @@ interface SearchResult {
|
|
|
30
30
|
node_type: string;
|
|
31
31
|
score: number;
|
|
32
32
|
}
|
|
33
|
+
interface SearchChunk {
|
|
34
|
+
chunk_uid: string;
|
|
35
|
+
content: string;
|
|
36
|
+
document_uid: string | null;
|
|
37
|
+
document_title: string | null;
|
|
38
|
+
chunk_index: number | null;
|
|
39
|
+
}
|
|
40
|
+
interface EnrichedSearchResponse {
|
|
41
|
+
results: SearchResult[];
|
|
42
|
+
edges: GraphEdge[];
|
|
43
|
+
chunks: SearchChunk[];
|
|
44
|
+
}
|
|
33
45
|
interface PathStep {
|
|
34
46
|
uid: string;
|
|
35
47
|
label: string;
|
|
@@ -619,6 +631,25 @@ declare class MindGraph {
|
|
|
619
631
|
agent_id?: string;
|
|
620
632
|
}): Promise<GraphNode>;
|
|
621
633
|
deleteNode(uid: string): Promise<void>;
|
|
634
|
+
batchDeleteNodes(params: {
|
|
635
|
+
uids?: string[];
|
|
636
|
+
agentId?: string;
|
|
637
|
+
filter?: {
|
|
638
|
+
nodeType?: string;
|
|
639
|
+
nodeTypes?: string[];
|
|
640
|
+
layer?: string;
|
|
641
|
+
labelContains?: string;
|
|
642
|
+
propEquals?: [string, string];
|
|
643
|
+
};
|
|
644
|
+
reason?: string;
|
|
645
|
+
by?: string;
|
|
646
|
+
hardPurge?: boolean;
|
|
647
|
+
}): Promise<{
|
|
648
|
+
nodes_tombstoned: number;
|
|
649
|
+
edges_tombstoned: number;
|
|
650
|
+
nodes_purged: number;
|
|
651
|
+
edges_purged: number;
|
|
652
|
+
}>;
|
|
622
653
|
getNodeHistory(uid: string): Promise<unknown[]>;
|
|
623
654
|
getNodeAtVersion(uid: string, version: number): Promise<GraphNode>;
|
|
624
655
|
addLink(body: {
|
|
@@ -667,7 +698,10 @@ declare class MindGraph {
|
|
|
667
698
|
node_type?: string;
|
|
668
699
|
layer?: string;
|
|
669
700
|
limit?: number;
|
|
670
|
-
|
|
701
|
+
min_score?: number;
|
|
702
|
+
include_edges?: boolean;
|
|
703
|
+
include_chunks?: boolean;
|
|
704
|
+
}): Promise<SearchResult[] | EnrichedSearchResponse>;
|
|
671
705
|
/** Hybrid BM25 + vector search with reciprocal rank fusion. */
|
|
672
706
|
hybridSearch(query: string, opts?: {
|
|
673
707
|
k?: number;
|
|
@@ -764,4 +798,4 @@ declare class MindGraph {
|
|
|
764
798
|
clearGraph(): Promise<ClearResponse>;
|
|
765
799
|
}
|
|
766
800
|
|
|
767
|
-
export { type ArgumentRequest, type BatchRequest, type CaptureRequest, type ClearResponse, type CommitmentRequest, type DecayRequest, type DeliberationRequest, type DistillRequest, type EntityRequest, type EventProps, type EvolveRequest, type ExecutionRequest, type GovernanceRequest, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type MemoryConfigRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type OrganizationProps, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type PurgeRequest, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchResult, type SessionRequest, type StructureRequest, type TraverseRequest };
|
|
801
|
+
export { type ArgumentRequest, type BatchRequest, type CaptureRequest, type ClearResponse, type CommitmentRequest, type DecayRequest, type DeliberationRequest, type DistillRequest, type EnrichedSearchResponse, type EntityRequest, type EventProps, type EvolveRequest, type ExecutionRequest, type GovernanceRequest, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type MemoryConfigRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type OrganizationProps, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type PurgeRequest, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchChunk, type SearchResult, type SessionRequest, type StructureRequest, type TraverseRequest };
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,18 @@ interface SearchResult {
|
|
|
30
30
|
node_type: string;
|
|
31
31
|
score: number;
|
|
32
32
|
}
|
|
33
|
+
interface SearchChunk {
|
|
34
|
+
chunk_uid: string;
|
|
35
|
+
content: string;
|
|
36
|
+
document_uid: string | null;
|
|
37
|
+
document_title: string | null;
|
|
38
|
+
chunk_index: number | null;
|
|
39
|
+
}
|
|
40
|
+
interface EnrichedSearchResponse {
|
|
41
|
+
results: SearchResult[];
|
|
42
|
+
edges: GraphEdge[];
|
|
43
|
+
chunks: SearchChunk[];
|
|
44
|
+
}
|
|
33
45
|
interface PathStep {
|
|
34
46
|
uid: string;
|
|
35
47
|
label: string;
|
|
@@ -619,6 +631,25 @@ declare class MindGraph {
|
|
|
619
631
|
agent_id?: string;
|
|
620
632
|
}): Promise<GraphNode>;
|
|
621
633
|
deleteNode(uid: string): Promise<void>;
|
|
634
|
+
batchDeleteNodes(params: {
|
|
635
|
+
uids?: string[];
|
|
636
|
+
agentId?: string;
|
|
637
|
+
filter?: {
|
|
638
|
+
nodeType?: string;
|
|
639
|
+
nodeTypes?: string[];
|
|
640
|
+
layer?: string;
|
|
641
|
+
labelContains?: string;
|
|
642
|
+
propEquals?: [string, string];
|
|
643
|
+
};
|
|
644
|
+
reason?: string;
|
|
645
|
+
by?: string;
|
|
646
|
+
hardPurge?: boolean;
|
|
647
|
+
}): Promise<{
|
|
648
|
+
nodes_tombstoned: number;
|
|
649
|
+
edges_tombstoned: number;
|
|
650
|
+
nodes_purged: number;
|
|
651
|
+
edges_purged: number;
|
|
652
|
+
}>;
|
|
622
653
|
getNodeHistory(uid: string): Promise<unknown[]>;
|
|
623
654
|
getNodeAtVersion(uid: string, version: number): Promise<GraphNode>;
|
|
624
655
|
addLink(body: {
|
|
@@ -667,7 +698,10 @@ declare class MindGraph {
|
|
|
667
698
|
node_type?: string;
|
|
668
699
|
layer?: string;
|
|
669
700
|
limit?: number;
|
|
670
|
-
|
|
701
|
+
min_score?: number;
|
|
702
|
+
include_edges?: boolean;
|
|
703
|
+
include_chunks?: boolean;
|
|
704
|
+
}): Promise<SearchResult[] | EnrichedSearchResponse>;
|
|
671
705
|
/** Hybrid BM25 + vector search with reciprocal rank fusion. */
|
|
672
706
|
hybridSearch(query: string, opts?: {
|
|
673
707
|
k?: number;
|
|
@@ -764,4 +798,4 @@ declare class MindGraph {
|
|
|
764
798
|
clearGraph(): Promise<ClearResponse>;
|
|
765
799
|
}
|
|
766
800
|
|
|
767
|
-
export { type ArgumentRequest, type BatchRequest, type CaptureRequest, type ClearResponse, type CommitmentRequest, type DecayRequest, type DeliberationRequest, type DistillRequest, type EntityRequest, type EventProps, type EvolveRequest, type ExecutionRequest, type GovernanceRequest, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type MemoryConfigRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type OrganizationProps, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type PurgeRequest, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchResult, type SessionRequest, type StructureRequest, type TraverseRequest };
|
|
801
|
+
export { type ArgumentRequest, type BatchRequest, type CaptureRequest, type ClearResponse, type CommitmentRequest, type DecayRequest, type DeliberationRequest, type DistillRequest, type EnrichedSearchResponse, type EntityRequest, type EventProps, type EvolveRequest, type ExecutionRequest, type GovernanceRequest, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type MemoryConfigRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type OrganizationProps, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type PurgeRequest, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchChunk, type SearchResult, type SessionRequest, type StructureRequest, type TraverseRequest };
|
package/dist/index.js
CHANGED
|
@@ -318,6 +318,24 @@ var MindGraph = class {
|
|
|
318
318
|
async deleteNode(uid) {
|
|
319
319
|
await this.del(`/node/${uid}`);
|
|
320
320
|
}
|
|
321
|
+
async batchDeleteNodes(params) {
|
|
322
|
+
const body = {};
|
|
323
|
+
if (params.uids) body.uids = params.uids;
|
|
324
|
+
if (params.agentId) body.agent_id = params.agentId;
|
|
325
|
+
if (params.filter) {
|
|
326
|
+
body.filter = {
|
|
327
|
+
node_type: params.filter.nodeType,
|
|
328
|
+
node_types: params.filter.nodeTypes,
|
|
329
|
+
layer: params.filter.layer,
|
|
330
|
+
label_contains: params.filter.labelContains,
|
|
331
|
+
prop_equals: params.filter.propEquals
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
if (params.reason) body.reason = params.reason;
|
|
335
|
+
if (params.by) body.by = params.by;
|
|
336
|
+
if (params.hardPurge) body.hard_purge = params.hardPurge;
|
|
337
|
+
return this.post("/nodes/delete", body);
|
|
338
|
+
}
|
|
321
339
|
async getNodeHistory(uid) {
|
|
322
340
|
return this.get(`/node/${uid}/history`);
|
|
323
341
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -291,6 +291,24 @@ var MindGraph = class {
|
|
|
291
291
|
async deleteNode(uid) {
|
|
292
292
|
await this.del(`/node/${uid}`);
|
|
293
293
|
}
|
|
294
|
+
async batchDeleteNodes(params) {
|
|
295
|
+
const body = {};
|
|
296
|
+
if (params.uids) body.uids = params.uids;
|
|
297
|
+
if (params.agentId) body.agent_id = params.agentId;
|
|
298
|
+
if (params.filter) {
|
|
299
|
+
body.filter = {
|
|
300
|
+
node_type: params.filter.nodeType,
|
|
301
|
+
node_types: params.filter.nodeTypes,
|
|
302
|
+
layer: params.filter.layer,
|
|
303
|
+
label_contains: params.filter.labelContains,
|
|
304
|
+
prop_equals: params.filter.propEquals
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
if (params.reason) body.reason = params.reason;
|
|
308
|
+
if (params.by) body.by = params.by;
|
|
309
|
+
if (params.hardPurge) body.hard_purge = params.hardPurge;
|
|
310
|
+
return this.post("/nodes/delete", body);
|
|
311
|
+
}
|
|
294
312
|
async getNodeHistory(uid) {
|
|
295
313
|
return this.get(`/node/${uid}/history`);
|
|
296
314
|
}
|