@hasna/mementos 0.3.6 → 0.3.7
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/package.json +1 -1
- package/dashboard/dist/assets/index-DqyMbv89.js +0 -270
- package/dashboard/dist/assets/index-UBCddFo_.css +0 -1
- package/dashboard/dist/index.html +0 -13
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -4482
- package/dist/db/agents.d.ts +0 -12
- package/dist/db/agents.d.ts.map +0 -1
- package/dist/db/database.d.ts +0 -10
- package/dist/db/database.d.ts.map +0 -1
- package/dist/db/memories.d.ts +0 -13
- package/dist/db/memories.d.ts.map +0 -1
- package/dist/db/projects.d.ts +0 -6
- package/dist/db/projects.d.ts.map +0 -1
- package/dist/index.d.ts +0 -14
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -1331
- package/dist/lib/config.d.ts +0 -5
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/injector.d.ts +0 -31
- package/dist/lib/injector.d.ts.map +0 -1
- package/dist/lib/poll.d.ts +0 -17
- package/dist/lib/poll.d.ts.map +0 -1
- package/dist/lib/project-detect.d.ts +0 -18
- package/dist/lib/project-detect.d.ts.map +0 -1
- package/dist/lib/redact.d.ts +0 -10
- package/dist/lib/redact.d.ts.map +0 -1
- package/dist/lib/retention.d.ts +0 -14
- package/dist/lib/retention.d.ts.map +0 -1
- package/dist/lib/search.d.ts +0 -11
- package/dist/lib/search.d.ts.map +0 -1
- package/dist/lib/sync.d.ts +0 -10
- package/dist/lib/sync.d.ts.map +0 -1
- package/dist/mcp/index.d.ts +0 -3
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/index.js +0 -5551
- package/dist/server/index.d.ts +0 -7
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/index.js +0 -1272
- package/dist/types/index.d.ts +0 -160
- package/dist/types/index.d.ts.map +0 -1
package/dist/lib/config.d.ts
DELETED
package/dist/lib/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAA+B,MAAM,UAAU,CAAC;AAM5E,eAAO,MAAM,cAAc,EAAE,cAuB5B,CAAC;AA4DF,wBAAgB,UAAU,IAAI,cAAc,CAwC3C;AAgDD,wBAAgB,SAAS,IAAI,MAAM,CA+BlC"}
|
package/dist/lib/injector.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Database } from "bun:sqlite";
|
|
2
|
-
import type { MemoryCategory, MementosConfig } from "../types/index.js";
|
|
3
|
-
export interface InjectionOptions {
|
|
4
|
-
agent_id?: string;
|
|
5
|
-
project_id?: string;
|
|
6
|
-
session_id?: string;
|
|
7
|
-
max_tokens?: number;
|
|
8
|
-
categories?: MemoryCategory[];
|
|
9
|
-
min_importance?: number;
|
|
10
|
-
db?: Database;
|
|
11
|
-
}
|
|
12
|
-
export declare class MemoryInjector {
|
|
13
|
-
private config;
|
|
14
|
-
private injectedIds;
|
|
15
|
-
constructor(config?: MementosConfig);
|
|
16
|
-
/**
|
|
17
|
-
* Get formatted injection context suitable for system prompt insertion.
|
|
18
|
-
* Produces structured output with Key Memories and Recent Context sections.
|
|
19
|
-
* Token-budget aware.
|
|
20
|
-
*/
|
|
21
|
-
getInjectionContext(options?: InjectionOptions): string;
|
|
22
|
-
/**
|
|
23
|
-
* Reset the deduplication window (call between refresh intervals)
|
|
24
|
-
*/
|
|
25
|
-
resetDedup(): void;
|
|
26
|
-
/**
|
|
27
|
-
* Get count of memories injected so far in this session
|
|
28
|
-
*/
|
|
29
|
-
getInjectedCount(): number;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=injector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injector.d.ts","sourceRoot":"","sources":["../../src/lib/injector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAU,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAQhF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,EAAE,CAAC,EAAE,QAAQ,CAAC;CACf;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,WAAW,CAA0B;gBAEjC,MAAM,CAAC,EAAE,cAAc;IAInC;;;;OAIG;IACH,mBAAmB,CAAC,OAAO,GAAE,gBAAqB,GAAG,MAAM;IA0K3D;;OAEG;IACH,UAAU,IAAI,IAAI;IAIlB;;OAEG;IACH,gBAAgB,IAAI,MAAM;CAG3B"}
|
package/dist/lib/poll.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Database } from "bun:sqlite";
|
|
2
|
-
import type { Memory, MemoryScope, MemoryCategory } from "../types/index.js";
|
|
3
|
-
export interface PollOptions {
|
|
4
|
-
interval_ms?: number;
|
|
5
|
-
scope?: MemoryScope;
|
|
6
|
-
category?: MemoryCategory;
|
|
7
|
-
agent_id?: string;
|
|
8
|
-
project_id?: string;
|
|
9
|
-
on_memories: (memories: Memory[]) => void;
|
|
10
|
-
on_error?: (error: Error) => void;
|
|
11
|
-
db?: Database;
|
|
12
|
-
}
|
|
13
|
-
export interface PollHandle {
|
|
14
|
-
stop: () => void;
|
|
15
|
-
}
|
|
16
|
-
export declare function startPolling(opts: PollOptions): PollHandle;
|
|
17
|
-
//# sourceMappingURL=poll.d.ts.map
|
package/dist/lib/poll.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["../../src/lib/poll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAQ7E,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,EAAE,CAAC,EAAE,QAAQ,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAMD,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,CA0F1D"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Database } from "bun:sqlite";
|
|
2
|
-
import type { Project } from "../types/index.js";
|
|
3
|
-
/**
|
|
4
|
-
* Auto-detect the current project from cwd's git root.
|
|
5
|
-
* - Finds the git root directory
|
|
6
|
-
* - Extracts the repo name from the directory basename
|
|
7
|
-
* - Checks if a project is already registered by path
|
|
8
|
-
* - If not, registers it automatically
|
|
9
|
-
* - Returns the Project object, or null if not in a git repo
|
|
10
|
-
*
|
|
11
|
-
* Results are cached for the lifetime of the process.
|
|
12
|
-
*/
|
|
13
|
-
export declare function detectProject(db?: Database): Project | null;
|
|
14
|
-
/**
|
|
15
|
-
* Reset the cached project (useful for tests).
|
|
16
|
-
*/
|
|
17
|
-
export declare function resetProjectCache(): void;
|
|
18
|
-
//# sourceMappingURL=project-detect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-detect.d.ts","sourceRoot":"","sources":["../../src/lib/project-detect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAkBjD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,CA0B3D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
|
package/dist/lib/redact.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Detect and redact secrets from text.
|
|
3
|
-
* Returns the text with secrets replaced by [REDACTED].
|
|
4
|
-
*/
|
|
5
|
-
export declare function redactSecrets(text: string): string;
|
|
6
|
-
/**
|
|
7
|
-
* Check if text contains any detectable secrets.
|
|
8
|
-
*/
|
|
9
|
-
export declare function containsSecrets(text: string): boolean;
|
|
10
|
-
//# sourceMappingURL=redact.d.ts.map
|
package/dist/lib/redact.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../src/lib/redact.ts"],"names":[],"mappings":"AAsCA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQlD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMrD"}
|
package/dist/lib/retention.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Database } from "bun:sqlite";
|
|
2
|
-
import type { MementosConfig } from "../types/index.js";
|
|
3
|
-
export declare function enforceQuotas(config: MementosConfig, db?: Database): number;
|
|
4
|
-
export declare function archiveStale(staleDays: number, db?: Database): number;
|
|
5
|
-
export declare function archiveUnused(days: number, db?: Database): number;
|
|
6
|
-
export declare function deprioritizeStale(days: number, db?: Database): number;
|
|
7
|
-
export declare function runCleanup(config: MementosConfig, db?: Database): {
|
|
8
|
-
expired: number;
|
|
9
|
-
evicted: number;
|
|
10
|
-
archived: number;
|
|
11
|
-
unused_archived: number;
|
|
12
|
-
deprioritized: number;
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=retention.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retention.d.ts","sourceRoot":"","sources":["../../src/lib/retention.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,mBAAmB,CAAC;AAQrE,wBAAgB,aAAa,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAuC3E;AAMD,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAsBrE;AAMD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAmBjE;AAMD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAwBrE;AAMD,wBAAgB,UAAU,CACxB,MAAM,EAAE,cAAc,EACtB,EAAE,CAAC,EAAE,QAAQ,GACZ;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAgBxG"}
|
package/dist/lib/search.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Database } from "bun:sqlite";
|
|
2
|
-
import type { MemoryFilter, MemorySearchResult } from "../types/index.js";
|
|
3
|
-
/**
|
|
4
|
-
* Search memories by query string with relevance scoring.
|
|
5
|
-
*
|
|
6
|
-
* Searches across key, value, summary, and tags. Results are scored,
|
|
7
|
-
* weighted by importance, filtered, and sorted by score DESC then
|
|
8
|
-
* importance DESC.
|
|
9
|
-
*/
|
|
10
|
-
export declare function searchMemories(query: string, filter?: MemoryFilter, db?: Database): MemorySearchResult[];
|
|
11
|
-
//# sourceMappingURL=search.d.ts.map
|
package/dist/lib/search.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/lib/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAyB,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAU,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAuFlF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,YAAY,EACrB,EAAE,CAAC,EAAE,QAAQ,GACZ,kBAAkB,EAAE,CAqItB"}
|
package/dist/lib/sync.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Database } from "bun:sqlite";
|
|
2
|
-
import type { ConflictResolution, SyncDirection, SyncResult } from "../types/index.js";
|
|
3
|
-
export declare function syncMemories(agentName: string, direction?: SyncDirection, options?: {
|
|
4
|
-
agent_id?: string;
|
|
5
|
-
project_id?: string;
|
|
6
|
-
conflict_resolution?: ConflictResolution;
|
|
7
|
-
db?: Database;
|
|
8
|
-
}): SyncResult;
|
|
9
|
-
export declare const defaultSyncAgents: string[];
|
|
10
|
-
//# sourceMappingURL=sync.d.ts.map
|
package/dist/lib/sync.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/lib/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,OAAO,KAAK,EACV,kBAAkB,EAElB,aAAa,EACb,UAAU,EACX,MAAM,mBAAmB,CAAC;AA6K3B,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,GAAE,aAAsB,EACjC,OAAO,GAAE;IACP,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,kBAAkB,CAAC;IACzC,EAAE,CAAC,EAAE,QAAQ,CAAC;CACV,GACL,UAAU,CAgCZ;AAED,eAAO,MAAM,iBAAiB,UAAgC,CAAC"}
|
package/dist/mcp/index.d.ts
DELETED
package/dist/mcp/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":""}
|