@facthouse/mcp 0.26.0 → 0.28.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/LICENSE +21 -21
- package/README.md +622 -611
- package/dist/cli/index.d.ts +4 -9
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +50 -48
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init-backfill.d.ts +23 -4
- package/dist/cli/init-backfill.d.ts.map +1 -1
- package/dist/cli/init-backfill.js +33 -12
- package/dist/cli/init-backfill.js.map +1 -1
- package/dist/cli/init-knobs.d.ts +20 -11
- package/dist/cli/init-knobs.d.ts.map +1 -1
- package/dist/cli/init-knobs.js +62 -32
- package/dist/cli/init-knobs.js.map +1 -1
- package/dist/cli/init-wizard.d.ts +2 -0
- package/dist/cli/init-wizard.d.ts.map +1 -1
- package/dist/cli/init-wizard.js +7 -5
- package/dist/cli/init-wizard.js.map +1 -1
- package/dist/cli/init.d.ts +4 -1
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +8 -6
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/inspect-html.js +460 -460
- package/dist/cli/inspect-intelligence.js +70 -70
- package/dist/cli/inspect-payload.js +39 -39
- package/dist/cli/inspect-theme.js +18 -18
- package/dist/cli/query.js +4 -4
- package/dist/cli/settings.d.ts.map +1 -1
- package/dist/cli/settings.js +3 -3
- package/dist/cli/settings.js.map +1 -1
- package/dist/cli/spend-dashboard.js +4 -4
- package/dist/cli/stats-html.js +674 -674
- package/dist/cli/web.d.ts.map +1 -1
- package/dist/cli/web.js +91 -96
- package/dist/cli/web.js.map +1 -1
- package/dist/db/consolidation-lock.js +2 -2
- package/dist/db/consolidations.js +15 -15
- package/dist/db/embeddings.js +10 -10
- package/dist/db/entities.js +26 -26
- package/dist/db/extract-watermarks.js +79 -79
- package/dist/db/facts.js +39 -39
- package/dist/db/inferences.js +8 -8
- package/dist/db/intelligence-runs.js +5 -5
- package/dist/db/postgres-schema.js +323 -323
- package/dist/db/prune.js +17 -17
- package/dist/db/schema.js +530 -530
- package/dist/db/session-facts.js +26 -26
- package/dist/db/sessions.js +10 -10
- package/dist/db/sources.js +1 -1
- package/dist/db/stats.js +10 -10
- package/dist/db/watermarks.js +7 -7
- package/dist/identity.d.ts +7 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +13 -0
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +1 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/intelligence/consolidate.d.ts +7 -1
- package/dist/intelligence/consolidate.d.ts.map +1 -1
- package/dist/intelligence/consolidate.js +54 -40
- package/dist/intelligence/consolidate.js.map +1 -1
- package/dist/intelligence/extract-prompt.js +26 -26
- package/dist/intelligence/token-budget.d.ts +2 -0
- package/dist/intelligence/token-budget.d.ts.map +1 -1
- package/dist/intelligence/token-budget.js +1 -1
- package/dist/intelligence/token-budget.js.map +1 -1
- package/dist/search/episodes.js +14 -14
- package/dist/search/key-facts.js +3 -3
- package/dist/suppress-sqlite-warning.d.ts +2 -0
- package/dist/suppress-sqlite-warning.d.ts.map +1 -0
- package/dist/suppress-sqlite-warning.js +17 -0
- package/dist/suppress-sqlite-warning.js.map +1 -0
- package/dist/tools/fact-manager.d.ts.map +1 -1
- package/dist/tools/fact-manager.js +9 -11
- package/dist/tools/fact-manager.js.map +1 -1
- package/dist/tools/read-tools.js +4 -4
- package/dist/tools/resources.js +3 -3
- package/dist/tools/resources.js.map +1 -1
- package/dist/types/config.d.ts +5 -3
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +7 -1
- package/dist/types/config.js.map +1 -1
- package/package.json +62 -62
- package/dist/cli/log-event.d.ts +0 -55
- package/dist/cli/log-event.d.ts.map +0 -1
- package/dist/cli/log-event.js +0 -149
- package/dist/cli/log-event.js.map +0 -1
- package/dist/db/scheduler-signal.d.ts +0 -20
- package/dist/db/scheduler-signal.d.ts.map +0 -1
- package/dist/db/scheduler-signal.js +0 -32
- package/dist/db/scheduler-signal.js.map +0 -1
- package/dist/schemas/starter-vocabulary.d.ts +0 -34
- package/dist/schemas/starter-vocabulary.d.ts.map +0 -1
- package/dist/schemas/starter-vocabulary.js +0 -91
- package/dist/schemas/starter-vocabulary.js.map +0 -1
- package/dist/search/profile.d.ts +0 -31
- package/dist/search/profile.d.ts.map +0 -1
- package/dist/search/profile.js +0 -43
- package/dist/search/profile.js.map +0 -1
- package/dist/sources/jsonl-ingest.d.ts +0 -58
- package/dist/sources/jsonl-ingest.d.ts.map +0 -1
- package/dist/sources/jsonl-ingest.js +0 -195
- package/dist/sources/jsonl-ingest.js.map +0 -1
- package/dist/sources/pull.d.ts +0 -85
- package/dist/sources/pull.d.ts.map +0 -1
- package/dist/sources/pull.js +0 -145
- package/dist/sources/pull.js.map +0 -1
- package/dist/types.d.ts +0 -115
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -6
- package/dist/types.js.map +0 -1
- package/dist/warnings.d.ts.map +0 -1
- package/dist/warnings.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/tools/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAA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134
134
|
*/
|
|
135
135
|
working_memory_size: number;
|
|
136
136
|
}
|
|
137
|
-
/** Default `--model` for the CLI intelligence provider. One definition. */
|
|
137
|
+
/** Default `--model` for the CLI intelligence provider (extract). One definition. */
|
|
138
138
|
export declare const CLI_DEFAULT_MODEL = "haiku";
|
|
139
|
+
/** Default CLI model for the integrate step. One definition. Extract stays `CLI_DEFAULT_MODEL`. */
|
|
140
|
+
export declare const CLI_DEFAULT_INTEGRATE_MODEL = "sonnet";
|
|
139
141
|
/** Default per-stage subprocess timeout (ms). One definition. */
|
|
140
142
|
export declare const CLI_DEFAULT_TIMEOUT_MS = 45000;
|
|
141
143
|
/** Options for the 'cli' provider (subprocess `claude -p`). All optional —
|
|
@@ -146,8 +148,8 @@ export interface CliProviderConfig {
|
|
|
146
148
|
/** Model alias passed via --model. Default: CLI_DEFAULT_MODEL. */
|
|
147
149
|
model?: string;
|
|
148
150
|
/**
|
|
149
|
-
* CLI model for
|
|
150
|
-
* Extract
|
|
151
|
+
* CLI model for the integrate step. Omit to use `CLI_DEFAULT_INTEGRATE_MODEL`.
|
|
152
|
+
* Extract still uses `model` / `CLI_DEFAULT_MODEL`.
|
|
151
153
|
*/
|
|
152
154
|
integrate_model?: string;
|
|
153
155
|
/** Per-stage subprocess timeout in ms. Default: CLI_DEFAULT_TIMEOUT_MS. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,sFAAsF;AACtF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;OAUG;IACH,QAA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YAAY,EAAE,SAAS,GAAG,UAAU,CAoDrE,CAAC"}
|
package/dist/types/config.js
CHANGED
|
@@ -24,8 +24,10 @@ export function isStageOnFail(value) {
|
|
|
24
24
|
return (typeof value === "string" &&
|
|
25
25
|
STAGE_ON_FAIL_VALUES.includes(value));
|
|
26
26
|
}
|
|
27
|
-
/** Default `--model` for the CLI intelligence provider. One definition. */
|
|
27
|
+
/** Default `--model` for the CLI intelligence provider (extract). One definition. */
|
|
28
28
|
export const CLI_DEFAULT_MODEL = "haiku";
|
|
29
|
+
/** Default CLI model for the integrate step. One definition. Extract stays `CLI_DEFAULT_MODEL`. */
|
|
30
|
+
export const CLI_DEFAULT_INTEGRATE_MODEL = "sonnet";
|
|
29
31
|
/** Default per-stage subprocess timeout (ms). One definition. */
|
|
30
32
|
export const CLI_DEFAULT_TIMEOUT_MS = 45_000;
|
|
31
33
|
/**
|
|
@@ -88,6 +90,10 @@ export const DEFAULT_CONFIG = {
|
|
|
88
90
|
// (e.g. =heuristic) or intelligence.provider in config.json.
|
|
89
91
|
provider: "cli",
|
|
90
92
|
api_key: null,
|
|
93
|
+
cli: {
|
|
94
|
+
model: CLI_DEFAULT_MODEL,
|
|
95
|
+
integrate_model: CLI_DEFAULT_INTEGRATE_MODEL,
|
|
96
|
+
},
|
|
91
97
|
},
|
|
92
98
|
consolidation: {
|
|
93
99
|
triggers: ["session_start", "threshold", "compaction", "shutdown", "manual"],
|
package/dist/types/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,+EAA+E;AAC/E,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC,gEAAgE;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAoDtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,EAAE,IAAI,EAAE,QAAQ,E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E,WAAW,EAAE,aAAa,EAAE,UAAU,CAAC;QAChE,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC;QAC9C,UAAU,EAAE,EAAE;QACd,kBAAkB,EAAE,EAAE;QACtB,kBAAkB,EAAE,IAAI;QACxB,mBAAmB,EAAE,EAAE;KACxB;IACD,YAAY,EAAE;QACZ,yEAAyE;QACzE,0EAA0E;QAC1E,uEAAuE;QACvE,yEAAyE;QACzE,wEAAwE;QACxE,4EAA4E;QAC5E,qEAAqE;QACrE,6DAA6D;QAC7D,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,IAAI;QACb,GAAG,EAAE;YACH,KAAK,EAAE,iBAAiB;YACxB,eAAe,EAAE,2BAA2B;SAC7C;KACF;IACD,aAAa,EAAE;QACb,QAAQ,EAAE,CAAC,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC;QAC5E,SAAS,EAAE,EAAE;QACb,gBAAgB,EAAE,CAAC;KACpB;IACD,SAAS,EAAE;QACT,sBAAsB,EAAE,IAAI;KAC7B;IACD,UAAU,EAAE;QACV,OAAO,EAAE,KAAK;KACf;IACD,OAAO,EAAE,EAAE;CACZ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@facthouse/mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"mcpName": "io.github.gordonkjlee/facthouse",
|
|
5
|
-
"description": "A local memory engine any AI tool can use.",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"author": "Gordon Lee",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "https://github.com/gordonkjlee/facthouse"
|
|
12
|
-
},
|
|
13
|
-
"homepage": "https://facthouse.dev",
|
|
14
|
-
"keywords": [
|
|
15
|
-
"facthouse",
|
|
16
|
-
"mcp",
|
|
17
|
-
"mcp-server",
|
|
18
|
-
"model-context-protocol",
|
|
19
|
-
"ai-memory",
|
|
20
|
-
"local-memory",
|
|
21
|
-
"sqlite",
|
|
22
|
-
"knowledge-engine",
|
|
23
|
-
"entity-graph"
|
|
24
|
-
],
|
|
25
|
-
"bin": {
|
|
26
|
-
"mcp": "dist/index.js",
|
|
27
|
-
"facthouse": "dist/cli/index.js",
|
|
28
|
-
"mcp-server-facthouse": "dist/index.js"
|
|
29
|
-
},
|
|
30
|
-
"files": [
|
|
31
|
-
"dist"
|
|
32
|
-
],
|
|
33
|
-
"engines": {
|
|
34
|
-
"node": "^22.5.0 || >=24.0.0"
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"build": "tsc",
|
|
38
|
-
"watch": "tsc --watch",
|
|
39
|
-
"test": "vitest run",
|
|
40
|
-
"test:semantic": "node scripts/require-eval.mjs semantic",
|
|
41
|
-
"test:first-fact": "node scripts/require-eval.mjs first-fact",
|
|
42
|
-
"test:coding-store": "node scripts/require-eval.mjs coding-store",
|
|
43
|
-
"test:http-intelligence": "node scripts/require-eval.mjs http-intelligence",
|
|
44
|
-
"test:watch": "vitest",
|
|
45
|
-
"lint": "eslint src/",
|
|
46
|
-
"prepare": "npm run build"
|
|
47
|
-
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
50
|
-
"pg": "^8.23.0"
|
|
51
|
-
},
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@electric-sql/pglite": "^0.5.8",
|
|
54
|
-
"@eslint/js": "^10.0.1",
|
|
55
|
-
"@types/node": "^26.4.0",
|
|
56
|
-
"@types/pg": "^8.23.1",
|
|
57
|
-
"eslint": "^10.9.1",
|
|
58
|
-
"typescript": "^6.0.2",
|
|
59
|
-
"typescript-eslint": "^8.68.0",
|
|
60
|
-
"vitest": "^4.1.2"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@facthouse/mcp",
|
|
3
|
+
"version": "0.28.0",
|
|
4
|
+
"mcpName": "io.github.gordonkjlee/facthouse",
|
|
5
|
+
"description": "A local memory engine any AI tool can use.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"author": "Gordon Lee",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/gordonkjlee/facthouse"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://facthouse.dev",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"facthouse",
|
|
16
|
+
"mcp",
|
|
17
|
+
"mcp-server",
|
|
18
|
+
"model-context-protocol",
|
|
19
|
+
"ai-memory",
|
|
20
|
+
"local-memory",
|
|
21
|
+
"sqlite",
|
|
22
|
+
"knowledge-engine",
|
|
23
|
+
"entity-graph"
|
|
24
|
+
],
|
|
25
|
+
"bin": {
|
|
26
|
+
"mcp": "dist/index.js",
|
|
27
|
+
"facthouse": "dist/cli/index.js",
|
|
28
|
+
"mcp-server-facthouse": "dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist"
|
|
32
|
+
],
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": "^22.5.0 || >=24.0.0"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsc",
|
|
38
|
+
"watch": "tsc --watch",
|
|
39
|
+
"test": "vitest run",
|
|
40
|
+
"test:semantic": "node scripts/require-eval.mjs semantic",
|
|
41
|
+
"test:first-fact": "node scripts/require-eval.mjs first-fact",
|
|
42
|
+
"test:coding-store": "node scripts/require-eval.mjs coding-store",
|
|
43
|
+
"test:http-intelligence": "node scripts/require-eval.mjs http-intelligence",
|
|
44
|
+
"test:watch": "vitest",
|
|
45
|
+
"lint": "eslint src/",
|
|
46
|
+
"prepare": "npm run build"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
50
|
+
"pg": "^8.23.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@electric-sql/pglite": "^0.5.8",
|
|
54
|
+
"@eslint/js": "^10.0.1",
|
|
55
|
+
"@types/node": "^26.4.0",
|
|
56
|
+
"@types/pg": "^8.23.1",
|
|
57
|
+
"eslint": "^10.9.1",
|
|
58
|
+
"typescript": "^6.0.2",
|
|
59
|
+
"typescript-eslint": "^8.68.0",
|
|
60
|
+
"vitest": "^4.1.2"
|
|
61
|
+
}
|
|
62
|
+
}
|
package/dist/cli/log-event.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* log-event CLI command — inserts a SessionEvent directly into the database.
|
|
3
|
-
* Used by AI client hooks to pipe conversation messages to FactMem.
|
|
4
|
-
*/
|
|
5
|
-
import type { SessionEvent } from "../types/data.js";
|
|
6
|
-
export interface LogEventArgs {
|
|
7
|
-
role: SessionEvent["role"];
|
|
8
|
-
eventType: SessionEvent["event_type"];
|
|
9
|
-
content: string;
|
|
10
|
-
contentType?: SessionEvent["content_type"];
|
|
11
|
-
sessionId?: string;
|
|
12
|
-
dataDir: string;
|
|
13
|
-
speaker?: string | null;
|
|
14
|
-
/** Tests pass a clean object so a developer's store env cannot leak. */
|
|
15
|
-
env?: NodeJS.ProcessEnv;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Insert an event via the CLI.
|
|
19
|
-
* Opens the database, inserts the event, and closes. Stateless.
|
|
20
|
-
*
|
|
21
|
-
* When a sessionId is provided (e.g. from a hook payload), it is stored as
|
|
22
|
-
* client_session_id. When it is not, the event is attached to the most recent
|
|
23
|
-
* session, creating one if the store has none.
|
|
24
|
-
*
|
|
25
|
-
* That fallback is load-bearing, not tidiness, and it is **only** for this
|
|
26
|
-
* command. The copy step writes `client_session_id` from the JSONL and
|
|
27
|
-
* never calls `getLatestSession()` — two files in one copy stay two
|
|
28
|
-
* conversations. Consolidation groups extraction by that id; an event with
|
|
29
|
-
* both session columns null is examined and declined, not attached to
|
|
30
|
-
* whatever was last active. Events used to be stored that way whenever no
|
|
31
|
-
* session id was supplied, which meant the documented manual form
|
|
32
|
-
* (`log-event --content "..."`) wrote rows that extraction skipped for ever,
|
|
33
|
-
* with nothing reported at either end.
|
|
34
|
-
*
|
|
35
|
-
* After insertion, best-effort tells the running MCP server events arrived
|
|
36
|
-
* (threshold moment). If the server is not reachable (not running, another
|
|
37
|
-
* user session), the notification is dropped — session_start on the
|
|
38
|
-
* next server launch will pick up the event.
|
|
39
|
-
*
|
|
40
|
-
* Creates the data directory if it doesn't exist, mirroring what the server
|
|
41
|
-
* does on boot. Hooks are the primary caller and can fire before the server
|
|
42
|
-
* has ever run for a given data dir, in which case opening the database fails
|
|
43
|
-
* and the event is lost — with the error going to a hook's stderr, where
|
|
44
|
-
* nobody sees it.
|
|
45
|
-
*/
|
|
46
|
-
export declare function logEvent(args: LogEventArgs): Promise<SessionEvent>;
|
|
47
|
-
/**
|
|
48
|
-
* Extract content from an AI client hook JSON payload on stdin.
|
|
49
|
-
* Returns the extracted text, or the raw input if not a known hook format.
|
|
50
|
-
*/
|
|
51
|
-
export declare function extractContentFromHookPayload(raw: string): {
|
|
52
|
-
content: string;
|
|
53
|
-
sessionId?: string;
|
|
54
|
-
};
|
|
55
|
-
//# sourceMappingURL=log-event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-event.d.ts","sourceRoot":"","sources":["../../src/cli/log-event.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC3B,SAAS,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,wEAAwE;IACxE,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAgDxE;AAuCD;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,MAAM,GAAG;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CA0BA"}
|
package/dist/cli/log-event.js
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* log-event CLI command — inserts a SessionEvent directly into the database.
|
|
3
|
-
* Used by AI client hooks to pipe conversation messages to FactMem.
|
|
4
|
-
*/
|
|
5
|
-
import { mkdirSync } from "node:fs";
|
|
6
|
-
import { closeDatabase } from "../db/connection.js";
|
|
7
|
-
import { applySchema } from "../db/schema.js";
|
|
8
|
-
import { openStore } from "../db/store.js";
|
|
9
|
-
import { loadShippedStoreConfig } from "../config.js";
|
|
10
|
-
import { insertEvent, getLatestSession, createSession, ensureSession, } from "../db/sessions.js";
|
|
11
|
-
import { envValue } from "../identity.js";
|
|
12
|
-
import { notifyServer } from "../ipc/scheduler-ipc.js";
|
|
13
|
-
/**
|
|
14
|
-
* Insert an event via the CLI.
|
|
15
|
-
* Opens the database, inserts the event, and closes. Stateless.
|
|
16
|
-
*
|
|
17
|
-
* When a sessionId is provided (e.g. from a hook payload), it is stored as
|
|
18
|
-
* client_session_id. When it is not, the event is attached to the most recent
|
|
19
|
-
* session, creating one if the store has none.
|
|
20
|
-
*
|
|
21
|
-
* That fallback is load-bearing, not tidiness, and it is **only** for this
|
|
22
|
-
* command. The copy step writes `client_session_id` from the JSONL and
|
|
23
|
-
* never calls `getLatestSession()` — two files in one copy stay two
|
|
24
|
-
* conversations. Consolidation groups extraction by that id; an event with
|
|
25
|
-
* both session columns null is examined and declined, not attached to
|
|
26
|
-
* whatever was last active. Events used to be stored that way whenever no
|
|
27
|
-
* session id was supplied, which meant the documented manual form
|
|
28
|
-
* (`log-event --content "..."`) wrote rows that extraction skipped for ever,
|
|
29
|
-
* with nothing reported at either end.
|
|
30
|
-
*
|
|
31
|
-
* After insertion, best-effort tells the running MCP server events arrived
|
|
32
|
-
* (threshold moment). If the server is not reachable (not running, another
|
|
33
|
-
* user session), the notification is dropped — session_start on the
|
|
34
|
-
* next server launch will pick up the event.
|
|
35
|
-
*
|
|
36
|
-
* Creates the data directory if it doesn't exist, mirroring what the server
|
|
37
|
-
* does on boot. Hooks are the primary caller and can fire before the server
|
|
38
|
-
* has ever run for a given data dir, in which case opening the database fails
|
|
39
|
-
* and the event is lost — with the error going to a hook's stderr, where
|
|
40
|
-
* nobody sees it.
|
|
41
|
-
*/
|
|
42
|
-
export async function logEvent(args) {
|
|
43
|
-
const env = args.env ?? process.env;
|
|
44
|
-
const config = loadShippedStoreConfig(args.dataDir, env);
|
|
45
|
-
mkdirSync(args.dataDir, { recursive: true });
|
|
46
|
-
const db = await openStore(args.dataDir, config, env);
|
|
47
|
-
let event;
|
|
48
|
-
try {
|
|
49
|
-
await applySchema(db);
|
|
50
|
-
// A hook-supplied id is the client's own, opaque to us — it goes in
|
|
51
|
-
// client_session_id. Our fallback resolves a row in `sessions`, so it goes
|
|
52
|
-
// in mcp_session_id, which also keeps last_activity_at current and makes
|
|
53
|
-
// "most recent" mean something on the next call.
|
|
54
|
-
const project = envValue("PROJECT")?.trim() || null;
|
|
55
|
-
const mcpSessionId = args.sessionId
|
|
56
|
-
? null
|
|
57
|
-
: await resolveOwnSession(db, project);
|
|
58
|
-
if (args.sessionId) {
|
|
59
|
-
await ensureSession(db, {
|
|
60
|
-
id: args.sessionId,
|
|
61
|
-
source_tool: "cli",
|
|
62
|
-
project,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
event = await insertEvent(db, {
|
|
66
|
-
mcp_session_id: mcpSessionId,
|
|
67
|
-
client_session_id: args.sessionId ?? null,
|
|
68
|
-
event_type: args.eventType,
|
|
69
|
-
role: args.role,
|
|
70
|
-
content: args.content,
|
|
71
|
-
content_type: args.contentType ?? "text",
|
|
72
|
-
// The hook fires at the turn. Claude Code's payload has no timestamp
|
|
73
|
-
// field; this instant is when it was said. Copy must not do the same —
|
|
74
|
-
// copying can be hours later, and a missing JSONL timestamp stays
|
|
75
|
-
// null rather than copying created_at.
|
|
76
|
-
occurred_at: new Date().toISOString(),
|
|
77
|
-
speaker: args.speaker ?? null,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
finally {
|
|
81
|
-
await closeDatabase(db);
|
|
82
|
-
}
|
|
83
|
-
// Tell the running MCP server events arrived. It extracts when the
|
|
84
|
-
// threshold is due. 500ms timeout internally; never throws.
|
|
85
|
-
await notifyServer(args.dataDir, "threshold");
|
|
86
|
-
return event;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* The session an event belongs to when the caller named none: the most recent
|
|
90
|
-
* one, or a fresh one on a store that has never had a session.
|
|
91
|
-
*
|
|
92
|
-
* `source_tool: "cli"` records how the session came about, so a store seeded
|
|
93
|
-
* from the command line is distinguishable from one an MCP client produced.
|
|
94
|
-
* `project` is FACTMEM_PROJECT when set — the same env the MCP session
|
|
95
|
-
* uses — provenance, not a tenant.
|
|
96
|
-
*/
|
|
97
|
-
async function resolveOwnSession(db, project) {
|
|
98
|
-
const latest = await getLatestSession(db);
|
|
99
|
-
if (latest) {
|
|
100
|
-
if (latest.project == null && project != null) {
|
|
101
|
-
await ensureSession(db, {
|
|
102
|
-
id: latest.id,
|
|
103
|
-
source_tool: latest.source_tool,
|
|
104
|
-
project,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
return latest.id;
|
|
108
|
-
}
|
|
109
|
-
return (await createSession(db, { source_tool: "cli", project })).id;
|
|
110
|
-
}
|
|
111
|
-
// ---------------------------------------------------------------------------
|
|
112
|
-
// Stdin helpers for AI client hooks
|
|
113
|
-
// ---------------------------------------------------------------------------
|
|
114
|
-
/** Known hook payload field names for content extraction. */
|
|
115
|
-
const HOOK_CONTENT_FIELDS = {
|
|
116
|
-
UserPromptSubmit: "prompt",
|
|
117
|
-
Stop: "last_assistant_message",
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* Extract content from an AI client hook JSON payload on stdin.
|
|
121
|
-
* Returns the extracted text, or the raw input if not a known hook format.
|
|
122
|
-
*/
|
|
123
|
-
export function extractContentFromHookPayload(raw) {
|
|
124
|
-
try {
|
|
125
|
-
const payload = JSON.parse(raw);
|
|
126
|
-
const hookEvent = payload.hook_event_name;
|
|
127
|
-
// Try known hook fields first.
|
|
128
|
-
if (hookEvent && hookEvent in HOOK_CONTENT_FIELDS) {
|
|
129
|
-
const field = HOOK_CONTENT_FIELDS[hookEvent];
|
|
130
|
-
const content = payload[field];
|
|
131
|
-
if (typeof content === "string") {
|
|
132
|
-
return {
|
|
133
|
-
content,
|
|
134
|
-
sessionId: typeof payload.session_id === "string" ? payload.session_id : undefined,
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
// For PostToolUse or unknown hooks, stringify the whole payload.
|
|
139
|
-
return {
|
|
140
|
-
content: raw,
|
|
141
|
-
sessionId: typeof payload.session_id === "string" ? payload.session_id : undefined,
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
catch {
|
|
145
|
-
// Not JSON — use raw text.
|
|
146
|
-
return { content: raw };
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
//# sourceMappingURL=log-event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-event.js","sourceRoot":"","sources":["../../src/cli/log-event.ts"],"names":[],"mappings":"AAAA;;;GAGG;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C;AACH,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cross-process scheduler signalling.
|
|
3
|
-
*
|
|
4
|
-
* SQLite's WAL writes go through mmap and page cache, so filesystem
|
|
5
|
-
* notifications for memory.db-wal are unreliable (notably on Windows) —
|
|
6
|
-
* fs.watch often misses INSERT commits. To give the MCP server an event-
|
|
7
|
-
* driven wake-up, the hook CLI writes a small sentinel file after each
|
|
8
|
-
* successful insertEvent. A regular-file write produces a reliable
|
|
9
|
-
* fs.watch 'change' event on every platform.
|
|
10
|
-
*
|
|
11
|
-
* The sentinel's contents are irrelevant — we only care about the
|
|
12
|
-
* modification event. We write the current timestamp for debugging.
|
|
13
|
-
*/
|
|
14
|
-
/** Filename of the scheduler signal within the data dir. */
|
|
15
|
-
export declare const SCHEDULER_SIGNAL_FILENAME = ".scheduler-signal";
|
|
16
|
-
/** Absolute path of the signal file for a given data dir. */
|
|
17
|
-
export declare function schedulerSignalPath(dataDir: string): string;
|
|
18
|
-
/** Touch the sentinel file. Never throws — signalling is best-effort. */
|
|
19
|
-
export declare function writeSchedulerSignal(dataDir: string): void;
|
|
20
|
-
//# sourceMappingURL=scheduler-signal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler-signal.d.ts","sourceRoot":"","sources":["../../src/db/scheduler-signal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,4DAA4D;AAC5D,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;AAE7D,6DAA6D;AAC7D,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,yEAAyE;AACzE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAO1D"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cross-process scheduler signalling.
|
|
3
|
-
*
|
|
4
|
-
* SQLite's WAL writes go through mmap and page cache, so filesystem
|
|
5
|
-
* notifications for memory.db-wal are unreliable (notably on Windows) —
|
|
6
|
-
* fs.watch often misses INSERT commits. To give the MCP server an event-
|
|
7
|
-
* driven wake-up, the hook CLI writes a small sentinel file after each
|
|
8
|
-
* successful insertEvent. A regular-file write produces a reliable
|
|
9
|
-
* fs.watch 'change' event on every platform.
|
|
10
|
-
*
|
|
11
|
-
* The sentinel's contents are irrelevant — we only care about the
|
|
12
|
-
* modification event. We write the current timestamp for debugging.
|
|
13
|
-
*/
|
|
14
|
-
import { writeFileSync } from "node:fs";
|
|
15
|
-
import path from "node:path";
|
|
16
|
-
/** Filename of the scheduler signal within the data dir. */
|
|
17
|
-
export const SCHEDULER_SIGNAL_FILENAME = ".scheduler-signal";
|
|
18
|
-
/** Absolute path of the signal file for a given data dir. */
|
|
19
|
-
export function schedulerSignalPath(dataDir) {
|
|
20
|
-
return path.join(dataDir, SCHEDULER_SIGNAL_FILENAME);
|
|
21
|
-
}
|
|
22
|
-
/** Touch the sentinel file. Never throws — signalling is best-effort. */
|
|
23
|
-
export function writeSchedulerSignal(dataDir) {
|
|
24
|
-
try {
|
|
25
|
-
writeFileSync(schedulerSignalPath(dataDir), String(Date.now()));
|
|
26
|
-
}
|
|
27
|
-
catch {
|
|
28
|
-
// Signal failure is non-fatal: the DB write already succeeded, and the
|
|
29
|
-
// scheduler's next shutdown / PreCompact flush will still catch up.
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=scheduler-signal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler-signal.js","sourceRoot":"","sources":["../../src/db/scheduler-signal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,4DAA4D;AAC5D,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;AAE7D,6DAA6D;AAC7D,MAAM,UAAU,mBAAmB,CAAC,OAAe;IACjD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,yBAAyB,CAAC,CAAC;AACvD,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,IAAI,CAAC;QACH,aAAa,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAAC,MAAM,CAAC;QACP,uEAAuE;QACvE,oEAAoE;IACtE,CAAC;AACH,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A starting vocabulary, written into the user's `config.json` at init.
|
|
3
|
-
*
|
|
4
|
-
* **This is not a core, and the engine does not know these names.** It is data:
|
|
5
|
-
* seeded once into a file the user owns, then read back like any other config.
|
|
6
|
-
* Delete it, rename it, replace it wholesale — nothing in `src/` refers to
|
|
7
|
-
* `medical` or `preferences`, and nothing breaks if they are gone. The only
|
|
8
|
-
* domain the engine knows is `general`, the fallback.
|
|
9
|
-
*
|
|
10
|
-
* It is personal-flavoured because personal is the use case OpenMemory is
|
|
11
|
-
* best at, and an empty vocabulary gives a classifier nothing to be consistent
|
|
12
|
-
* with on day one. It is *not* a claim about what domains are. A corporate store
|
|
13
|
-
* replaces this with clients, incidents, contracts, suppliers; a research store
|
|
14
|
-
* with papers, experiments, datasets. Both are equally correct, and the engine
|
|
15
|
-
* cannot tell the difference — which is the point.
|
|
16
|
-
*
|
|
17
|
-
* Each domain carries its own:
|
|
18
|
-
* - `description` — shown to a classifier so it routes on meaning, not a guess
|
|
19
|
-
* at what a bare name implies.
|
|
20
|
-
* - `patterns` — for the fallback classifier, when no LLM is available. These
|
|
21
|
-
* are the most obviously non-universal part: "allergic" and "partner" are
|
|
22
|
-
* noise in a corporate store, and "SLA" and "incident" would be noise here.
|
|
23
|
-
* - `importance` — because a missed allergy is the costliest error in a
|
|
24
|
-
* personal store, and a missed SLA breach in a corporate one.
|
|
25
|
-
*
|
|
26
|
-
* Patterns match how facts are actually written. `capture_fact` is called by an
|
|
27
|
-
* assistant recording a fact *about* its user, so content arrives in the third
|
|
28
|
-
* person ("The user prefers dark roast"), not the first ("I prefer dark roast").
|
|
29
|
-
* Verbs therefore need their -s form: `prefers?`, not `prefer` — `\bprefer\b`
|
|
30
|
-
* does not match "prefers".
|
|
31
|
-
*/
|
|
32
|
-
import type { DomainDef } from "../types/config.js";
|
|
33
|
-
export declare const STARTER_VOCABULARY: DomainDef[];
|
|
34
|
-
//# sourceMappingURL=starter-vocabulary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"starter-vocabulary.d.ts","sourceRoot":"","sources":["../../src/schemas/starter-vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,eAAO,MAAM,kBAAkB,EAAE,SAAS,EA0DzC,CAAC"}
|