@unson/brainbase-mcp 0.2.4 → 0.3.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/README.md +17 -12
- package/dist/canonical-edge-builder.d.ts +11 -0
- package/dist/canonical-edge-builder.js +35 -0
- package/dist/canonical-graph.d.ts +9 -0
- package/dist/canonical-graph.js +174 -0
- package/dist/cli.js +134 -32
- package/dist/connected-onboarding.js +45 -11
- package/dist/entity-resolution.d.ts +111 -0
- package/dist/entity-resolution.js +381 -0
- package/dist/graph-diagnosis.d.ts +24 -0
- package/dist/graph-diagnosis.js +129 -0
- package/dist/guided-onboarding.js +4 -4
- package/dist/import-extract.d.ts +8 -3
- package/dist/import-extract.js +142 -17
- package/dist/onboarding.js +5 -5
- package/dist/ontology-migration.d.ts +30 -0
- package/dist/ontology-migration.js +339 -0
- package/dist/ontology-ssot.js +2 -2
- package/dist/ontology.d.ts +101 -3
- package/dist/ontology.js +64 -8
- package/dist/operationalization.js +6 -6
- package/dist/projects.d.ts +3 -1
- package/dist/projects.js +40 -0
- package/dist/relation-registry.d.ts +11 -0
- package/dist/relation-registry.js +66 -0
- package/dist/server.d.ts +86 -2
- package/dist/server.js +158 -9
- package/dist/skills.js +3 -3
- package/dist/ssot.d.ts +16 -0
- package/dist/ssot.js +68 -18
- package/dist/templates.d.ts +110 -2
- package/dist/templates.js +74 -5
- package/dist/tools.d.ts +6 -2
- package/dist/tools.js +184 -147
- package/dist/types.d.ts +52 -1
- package/package.json +4 -3
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type EntityKind = 'person' | 'org' | 'project' | 'relationship' | 'decision';
|
|
2
|
+
export type CanonicalEntityKind = 'person' | 'org' | 'project' | 'decision';
|
|
3
|
+
export type CoreRelation = 'member_of' | 'participates_in' | 'accountable_for' | 'owned_by' | 'governs' | 'supersedes';
|
|
2
4
|
export interface GraphEntity {
|
|
3
5
|
id: string;
|
|
4
6
|
type: Exclude<EntityKind, 'decision'>;
|
|
@@ -7,7 +9,7 @@ export interface GraphEntity {
|
|
|
7
9
|
tags?: string[];
|
|
8
10
|
metadata?: Record<string, unknown>;
|
|
9
11
|
}
|
|
10
|
-
export interface
|
|
12
|
+
export interface GraphFileV1 {
|
|
11
13
|
version: 1;
|
|
12
14
|
owner?: {
|
|
13
15
|
name?: string;
|
|
@@ -15,6 +17,49 @@ export interface GraphFile {
|
|
|
15
17
|
};
|
|
16
18
|
entities: GraphEntity[];
|
|
17
19
|
}
|
|
20
|
+
export interface CanonicalEntity {
|
|
21
|
+
id: string;
|
|
22
|
+
type: CanonicalEntityKind;
|
|
23
|
+
name: string;
|
|
24
|
+
aliases?: string[];
|
|
25
|
+
summary?: string;
|
|
26
|
+
tags?: string[];
|
|
27
|
+
validFrom?: string;
|
|
28
|
+
validTo?: string;
|
|
29
|
+
metadata?: Record<string, unknown>;
|
|
30
|
+
}
|
|
31
|
+
export interface CanonicalEdge {
|
|
32
|
+
id: string;
|
|
33
|
+
fromId: string;
|
|
34
|
+
relation: CoreRelation;
|
|
35
|
+
toId: string;
|
|
36
|
+
role?: string;
|
|
37
|
+
context?: string;
|
|
38
|
+
validFrom?: string;
|
|
39
|
+
validTo?: string;
|
|
40
|
+
provenance?: {
|
|
41
|
+
sourceKind: 'user_approved' | 'migration' | 'import' | 'onboarding';
|
|
42
|
+
sourceId?: string;
|
|
43
|
+
evidenceHash?: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export interface GraphFileV2 {
|
|
47
|
+
version: 2;
|
|
48
|
+
ontology: {
|
|
49
|
+
id: 'brainbase-personal-os';
|
|
50
|
+
version: string;
|
|
51
|
+
releaseDigest: string;
|
|
52
|
+
};
|
|
53
|
+
owner?: {
|
|
54
|
+
id?: string;
|
|
55
|
+
name?: string;
|
|
56
|
+
summary?: string;
|
|
57
|
+
};
|
|
58
|
+
entities: CanonicalEntity[];
|
|
59
|
+
edges: CanonicalEdge[];
|
|
60
|
+
}
|
|
61
|
+
export type GraphFile = GraphFileV1 | GraphFileV2;
|
|
62
|
+
export type CanonicalGraphFile = GraphFile;
|
|
18
63
|
export interface PersonalKgEntry {
|
|
19
64
|
id: string;
|
|
20
65
|
type: 'self' | 'work' | 'relationship' | 'value' | 'judgment' | 'experience' | 'sns_context';
|
|
@@ -60,4 +105,10 @@ export interface SearchResult {
|
|
|
60
105
|
title: string;
|
|
61
106
|
text: string;
|
|
62
107
|
score: number;
|
|
108
|
+
canonicalEntityId?: string;
|
|
109
|
+
recordClass: 'canonical' | 'projection' | 'unresolved';
|
|
110
|
+
projectionOf?: string;
|
|
111
|
+
projectionSources?: Array<'relationships' | 'decisions'>;
|
|
112
|
+
relationPath?: string[];
|
|
113
|
+
authority: 'local_graph' | 'personal_kg' | 'legacy_relationships' | 'legacy_decisions';
|
|
63
114
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unson/brainbase-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Local-first Brainbase MCP server and personal onboarding kit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "tsc -p tsconfig.json",
|
|
28
28
|
"test": "vitest run",
|
|
29
|
-
"test:integration": "vitest run tests/mcp-contract.test.ts tests/ontology-cli.test.ts tests/npm-release-validation.integration.test.ts",
|
|
29
|
+
"test:integration": "vitest run tests/mcp-contract.test.ts tests/ontology-cli.test.ts tests/npm-release-validation.integration.test.ts tests/npm-consumer-smoke.integration.test.ts",
|
|
30
|
+
"test:consumer-smoke": "vitest run tests/npm-consumer-smoke.integration.test.ts",
|
|
30
31
|
"test:integration:release-evidence": "vitest run tests/npm-release-validation.integration.test.ts tests/npm-prepublication-evidence.integration.test.ts",
|
|
31
32
|
"test:e2e": "vitest run tests/e2e/brainbase-mcp-only-acceptance.spec.ts tests/e2e/story-brainbase-portable-ontology-kernel-acceptance.spec.ts",
|
|
32
33
|
"docs:dev": "vitepress dev docs",
|
|
@@ -61,5 +62,5 @@
|
|
|
61
62
|
"engines": {
|
|
62
63
|
"node": ">=20"
|
|
63
64
|
},
|
|
64
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "d67585f65897ba5b686f189953a24cc428036963"
|
|
65
66
|
}
|