@pcircle/memesh 3.1.0 → 3.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.
- package/dist/core/consolidator.d.ts +3 -0
- package/dist/core/consolidator.d.ts.map +1 -0
- package/dist/core/consolidator.js +147 -0
- package/dist/core/consolidator.js.map +1 -0
- package/dist/core/failure-analyzer.d.ts.map +1 -1
- package/dist/core/failure-analyzer.js.map +1 -1
- package/dist/core/operations.d.ts +3 -4
- package/dist/core/operations.d.ts.map +1 -1
- package/dist/core/operations.js +2 -216
- package/dist/core/operations.js.map +1 -1
- package/dist/core/query-expander.d.ts.map +1 -1
- package/dist/core/query-expander.js.map +1 -1
- package/dist/core/serializer.d.ts +4 -0
- package/dist/core/serializer.d.ts.map +1 -0
- package/dist/core/serializer.js +75 -0
- package/dist/core/serializer.js.map +1 -0
- package/dist/core/types.d.ts +63 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js.map +1 -1
- package/dist/knowledge-graph.d.ts +1 -0
- package/dist/knowledge-graph.d.ts.map +1 -1
- package/dist/knowledge-graph.js +83 -17
- package/dist/knowledge-graph.js.map +1 -1
- package/dist/transports/http/server.d.ts.map +1 -1
- package/dist/transports/http/server.js +6 -58
- package/dist/transports/http/server.js.map +1 -1
- package/dist/transports/mcp/handlers.d.ts.map +1 -1
- package/dist/transports/mcp/handlers.js +1 -57
- package/dist/transports/mcp/handlers.js.map +1 -1
- package/dist/transports/schemas.d.ts +94 -0
- package/dist/transports/schemas.d.ts.map +1 -0
- package/dist/transports/schemas.js +60 -0
- package/dist/transports/schemas.js.map +1 -0
- package/package.json +1 -1
- package/plugin.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const RememberSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
type: z.ZodString;
|
|
5
|
+
observations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7
|
+
relations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8
|
+
to: z.ZodString;
|
|
9
|
+
type: z.ZodString;
|
|
10
|
+
}, z.core.$strip>>>;
|
|
11
|
+
namespace: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
personal: "personal";
|
|
13
|
+
team: "team";
|
|
14
|
+
global: "global";
|
|
15
|
+
}>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const RecallSchema: z.ZodObject<{
|
|
18
|
+
query: z.ZodOptional<z.ZodString>;
|
|
19
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
20
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
include_archived: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
namespace: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
personal: "personal";
|
|
24
|
+
team: "team";
|
|
25
|
+
global: "global";
|
|
26
|
+
}>>;
|
|
27
|
+
cross_project: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export declare const ForgetSchema: z.ZodObject<{
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
observation: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export declare const ConsolidateSchema: z.ZodObject<{
|
|
34
|
+
name: z.ZodOptional<z.ZodString>;
|
|
35
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
36
|
+
min_observations: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export declare const ExportSchema: z.ZodObject<{
|
|
39
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
40
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
41
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export declare const ExportResultSchema: z.ZodObject<{
|
|
44
|
+
version: z.ZodString;
|
|
45
|
+
exported_at: z.ZodString;
|
|
46
|
+
entity_count: z.ZodNumber;
|
|
47
|
+
entities: z.ZodArray<z.ZodObject<{
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
type: z.ZodString;
|
|
50
|
+
namespace: z.ZodString;
|
|
51
|
+
observations: z.ZodArray<z.ZodString>;
|
|
52
|
+
tags: z.ZodArray<z.ZodString>;
|
|
53
|
+
relations: z.ZodArray<z.ZodObject<{
|
|
54
|
+
to: z.ZodString;
|
|
55
|
+
type: z.ZodString;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
export declare const ImportSchema: z.ZodObject<{
|
|
60
|
+
data: z.ZodObject<{
|
|
61
|
+
version: z.ZodString;
|
|
62
|
+
exported_at: z.ZodString;
|
|
63
|
+
entity_count: z.ZodNumber;
|
|
64
|
+
entities: z.ZodArray<z.ZodObject<{
|
|
65
|
+
name: z.ZodString;
|
|
66
|
+
type: z.ZodString;
|
|
67
|
+
namespace: z.ZodString;
|
|
68
|
+
observations: z.ZodArray<z.ZodString>;
|
|
69
|
+
tags: z.ZodArray<z.ZodString>;
|
|
70
|
+
relations: z.ZodArray<z.ZodObject<{
|
|
71
|
+
to: z.ZodString;
|
|
72
|
+
type: z.ZodString;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
77
|
+
merge_strategy: z.ZodEnum<{
|
|
78
|
+
skip: "skip";
|
|
79
|
+
overwrite: "overwrite";
|
|
80
|
+
append: "append";
|
|
81
|
+
}>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
export declare const LearnSchema: z.ZodObject<{
|
|
84
|
+
error: z.ZodString;
|
|
85
|
+
fix: z.ZodString;
|
|
86
|
+
root_cause: z.ZodOptional<z.ZodString>;
|
|
87
|
+
prevention: z.ZodOptional<z.ZodString>;
|
|
88
|
+
severity: z.ZodOptional<z.ZodEnum<{
|
|
89
|
+
critical: "critical";
|
|
90
|
+
major: "major";
|
|
91
|
+
minor: "minor";
|
|
92
|
+
}>>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/transports/schemas.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;iBAUzB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;iBAOvB,CAAC;AAEH,eAAO,MAAM,YAAY;;;iBAGvB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAC;AAEH,eAAO,MAAM,YAAY;;;;iBAIvB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;iBAY7B,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;iBAIvB,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;iBAMtB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const RememberSchema = z.object({
|
|
3
|
+
name: z.string().min(1).max(255),
|
|
4
|
+
type: z.string().min(1).max(100),
|
|
5
|
+
observations: z.array(z.string().max(10000)).max(100).optional(),
|
|
6
|
+
tags: z.array(z.string().max(255)).max(50).optional(),
|
|
7
|
+
relations: z
|
|
8
|
+
.array(z.object({ to: z.string().min(1).max(255), type: z.string().min(1).max(100) }))
|
|
9
|
+
.max(50)
|
|
10
|
+
.optional(),
|
|
11
|
+
namespace: z.enum(['personal', 'team', 'global']).optional(),
|
|
12
|
+
});
|
|
13
|
+
export const RecallSchema = z.object({
|
|
14
|
+
query: z.string().max(1000).optional(),
|
|
15
|
+
tag: z.string().max(255).optional(),
|
|
16
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
17
|
+
include_archived: z.boolean().optional(),
|
|
18
|
+
namespace: z.enum(['personal', 'team', 'global']).optional(),
|
|
19
|
+
cross_project: z.boolean().optional(),
|
|
20
|
+
});
|
|
21
|
+
export const ForgetSchema = z.object({
|
|
22
|
+
name: z.string().min(1).max(255),
|
|
23
|
+
observation: z.string().max(10000).optional(),
|
|
24
|
+
});
|
|
25
|
+
export const ConsolidateSchema = z.object({
|
|
26
|
+
name: z.string().max(255).optional(),
|
|
27
|
+
tag: z.string().max(255).optional(),
|
|
28
|
+
min_observations: z.number().int().min(1).optional(),
|
|
29
|
+
});
|
|
30
|
+
export const ExportSchema = z.object({
|
|
31
|
+
tag: z.string().max(255).optional(),
|
|
32
|
+
namespace: z.string().max(50).optional(),
|
|
33
|
+
limit: z.number().int().min(1).max(10000).optional(),
|
|
34
|
+
});
|
|
35
|
+
export const ExportResultSchema = z.object({
|
|
36
|
+
version: z.string(),
|
|
37
|
+
exported_at: z.string(),
|
|
38
|
+
entity_count: z.number(),
|
|
39
|
+
entities: z.array(z.object({
|
|
40
|
+
name: z.string().min(1).max(255),
|
|
41
|
+
type: z.string().min(1).max(100),
|
|
42
|
+
namespace: z.string(),
|
|
43
|
+
observations: z.array(z.string().max(10000)),
|
|
44
|
+
tags: z.array(z.string().max(255)),
|
|
45
|
+
relations: z.array(z.object({ to: z.string().min(1).max(255), type: z.string().min(1).max(100) })),
|
|
46
|
+
})),
|
|
47
|
+
});
|
|
48
|
+
export const ImportSchema = z.object({
|
|
49
|
+
data: ExportResultSchema,
|
|
50
|
+
namespace: z.string().max(50).optional(),
|
|
51
|
+
merge_strategy: z.enum(['skip', 'overwrite', 'append']),
|
|
52
|
+
});
|
|
53
|
+
export const LearnSchema = z.object({
|
|
54
|
+
error: z.string().min(1).max(5000),
|
|
55
|
+
fix: z.string().min(1).max(5000),
|
|
56
|
+
root_cause: z.string().max(5000).optional(),
|
|
57
|
+
prevention: z.string().max(5000).optional(),
|
|
58
|
+
severity: z.enum(['critical', 'major', 'minor']).optional(),
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/transports/schemas.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAChE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrD,SAAS,EAAE,CAAC;SACT,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;SACrF,GAAG,CAAC,EAAE,CAAC;SACP,QAAQ,EAAE;IACb,SA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