@fabersep/memory 0.2.0 → 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/CHANGELOG.md +46 -0
- package/README.md +63 -324
- package/dist/src/bm25.d.ts +2 -0
- package/dist/src/bm25.js +6 -0
- package/dist/src/cli.js +245 -25
- package/dist/src/config.js +1 -0
- package/dist/src/doctor.js +99 -3
- package/dist/src/hygiene.js +10 -1
- package/dist/src/importer.js +7 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/init.d.ts +1 -0
- package/dist/src/init.js +4 -3
- package/dist/src/mcp.d.ts +3 -2
- package/dist/src/mcp.js +30 -4
- package/dist/src/personal-remote.d.ts +48 -0
- package/dist/src/personal-remote.js +282 -0
- package/dist/src/proposals.d.ts +2 -0
- package/dist/src/proposals.js +11 -0
- package/dist/src/stats.d.ts +2 -1
- package/dist/src/stats.js +2 -16
- package/dist/src/sync.js +3 -0
- package/dist/src/types.d.ts +9 -1
- package/dist/src/types.js +3 -1
- package/dist/src/version.d.ts +2 -0
- package/dist/src/version.js +22 -0
- package/package.json +3 -2
package/dist/src/types.d.ts
CHANGED
|
@@ -3,13 +3,15 @@ export type EntryType = 'rule' | 'decision' | 'lesson' | 'preference' | 'referen
|
|
|
3
3
|
export type EntryStatus = 'active' | 'deprecated' | 'superseded';
|
|
4
4
|
export type L0Mode = 'none' | 'line' | 'body';
|
|
5
5
|
export type TeamSubmitMode = 'auto' | 'pr';
|
|
6
|
+
export type PushMode = 'ask' | 'auto' | 'never';
|
|
6
7
|
export type ProposalAction = 'create' | 'update' | 'supersede';
|
|
7
8
|
export type ProposalStatus = 'pending' | 'awaiting_commit' | 'push_failed';
|
|
8
9
|
export type ProjectRootSource = 'mcp-roots' | 'cwd' | 'none';
|
|
9
|
-
export declare const COMPILER_VERSION
|
|
10
|
+
export declare const COMPILER_VERSION: string;
|
|
10
11
|
export declare const DEFAULT_TOKEN_BUDGET = 1500;
|
|
11
12
|
export declare const DEFAULT_STALE_DAYS = 14;
|
|
12
13
|
export declare const DEFAULT_SIMILARITY_THRESHOLD = 0.45;
|
|
14
|
+
export declare const DEFAULT_SIMILARITY_HINT_FLOOR = 0.25;
|
|
13
15
|
export declare const VALID_TYPES: readonly EntryType[];
|
|
14
16
|
export declare const VALID_STATUSES: readonly EntryStatus[];
|
|
15
17
|
export declare const VALID_L0_MODES: readonly L0Mode[];
|
|
@@ -20,6 +22,10 @@ export interface RootConfig {
|
|
|
20
22
|
remote?: string;
|
|
21
23
|
defaultBranch?: string;
|
|
22
24
|
submitMode?: TeamSubmitMode;
|
|
25
|
+
/** Personal root only: what happens after an approve commits (feature 03 `FR-02`). */
|
|
26
|
+
pushMode?: PushMode;
|
|
27
|
+
/** Personal root only: a host that only reads (feature 03 `FR-05`). */
|
|
28
|
+
readOnly?: boolean;
|
|
23
29
|
}
|
|
24
30
|
export interface UserConfig {
|
|
25
31
|
version: 1;
|
|
@@ -27,6 +33,8 @@ export interface UserConfig {
|
|
|
27
33
|
tokenBudget: number;
|
|
28
34
|
staleDays: number;
|
|
29
35
|
similarityThreshold: number;
|
|
36
|
+
/** Lower bound for the related-entry notice on a staged create (01 FR-04 amendment). */
|
|
37
|
+
similarityHintFloor?: number;
|
|
30
38
|
roots: {
|
|
31
39
|
personal?: RootConfig;
|
|
32
40
|
team?: RootConfig;
|
package/dist/src/types.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { getPackageVersion } from './version.js';
|
|
2
|
+
export const COMPILER_VERSION = getPackageVersion();
|
|
2
3
|
export const DEFAULT_TOKEN_BUDGET = 1500;
|
|
3
4
|
export const DEFAULT_STALE_DAYS = 14;
|
|
4
5
|
export const DEFAULT_SIMILARITY_THRESHOLD = 0.45;
|
|
6
|
+
export const DEFAULT_SIMILARITY_HINT_FLOOR = 0.25;
|
|
5
7
|
export const VALID_TYPES = [
|
|
6
8
|
'rule',
|
|
7
9
|
'decision',
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
let cached;
|
|
5
|
+
/** The installed package version, read from package.json (dist/src/ -> ../../package.json). */
|
|
6
|
+
export function getPackageVersion() {
|
|
7
|
+
if (cached)
|
|
8
|
+
return cached;
|
|
9
|
+
try {
|
|
10
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
const raw = JSON.parse(fs.readFileSync(path.resolve(here, '../../package.json'), 'utf8'));
|
|
12
|
+
if (typeof raw.version === 'string' && raw.version.trim()) {
|
|
13
|
+
cached = raw.version.trim();
|
|
14
|
+
return cached;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
// Fallback below
|
|
19
|
+
}
|
|
20
|
+
cached = '0.0.0';
|
|
21
|
+
return cached;
|
|
22
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabersep/memory",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Prefix-cache-first, Git-backed Markdown memory MCP server, pre-memory staging, and import CLI for AI coding agents.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"files": [
|
|
32
32
|
"dist/src",
|
|
33
33
|
"LICENSE",
|
|
34
|
-
"README.md"
|
|
34
|
+
"README.md",
|
|
35
|
+
"CHANGELOG.md"
|
|
35
36
|
],
|
|
36
37
|
"engines": {
|
|
37
38
|
"node": ">=20"
|