dotmem 0.1.8 → 0.2.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 +75 -75
- package/DOTMEM-SHORT-API.md +318 -0
- package/DOTMEM-SHORT-COMPONENTS.md +129 -0
- package/README.md +456 -339
- package/agent.cjs +1 -226
- package/agent.js +1 -223
- package/bin/cli.cjs +1 -34
- package/bin/cli.js +1 -27
- package/bin/mcp.cjs +1 -21
- package/bin/mcp.js +1 -15
- package/build-config.json +10 -10
- package/built-in-context.json +6 -6
- package/cli.cjs +182 -18866
- package/cli.js +181 -18796
- package/context/templates/AI.md +104 -104
- package/env.cjs +1 -6
- package/env.js +1 -4
- package/global.cjs +49 -11252
- package/global.d.ts +0 -1
- package/global.js +49 -11218
- package/index.cjs +95 -15141
- package/index.d.ts +2 -0
- package/index.js +95 -15036
- package/llms.txt +10 -4
- package/mcp.cjs +123 -13594
- package/mcp.js +123 -13564
- package/package.json +3 -2
- package/types/exports.d.ts +64 -69
- package/types/global-types.d.ts +3652 -0
- package/types/llm-cache.d.ts +6 -6
- package/types/logic.d.ts +60 -79
- package/types/memory.d.ts +347 -391
- package/types/policy.d.ts +290 -290
- package/types/profile.d.ts +34 -34
- package/types/agent.d.ts +0 -87
package/types/agent.d.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DOTMEM AGENT DECLARATIONS
|
|
3
|
-
*
|
|
4
|
-
* Mirrors the agent-facing memory API exported from `dotmem/agent`.
|
|
5
|
-
* Every agent gets an isolated namespace: keys are stored as
|
|
6
|
-
* `agent:<agentId>:<key>` and entries are tagged with the agent id, so two
|
|
7
|
-
* agents never share private memory by accident.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import type {
|
|
11
|
-
ContextEntry,
|
|
12
|
-
MemoryEntry,
|
|
13
|
-
MemoryScope,
|
|
14
|
-
MemoryStats,
|
|
15
|
-
MemoryType,
|
|
16
|
-
RecallOptions
|
|
17
|
-
} from './memory'
|
|
18
|
-
|
|
19
|
-
export interface AgentContextOptions {
|
|
20
|
-
tags?: string | string[]
|
|
21
|
-
types?: MemoryType | MemoryType[]
|
|
22
|
-
minConfidence?: number
|
|
23
|
-
maxEntries?: number
|
|
24
|
-
scopes?: MemoryScope[]
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface AgentRememberOptions {
|
|
28
|
-
type?: MemoryType
|
|
29
|
-
confidence?: number
|
|
30
|
-
scope?: MemoryScope
|
|
31
|
-
ttl?: number | null
|
|
32
|
-
tags?: string[]
|
|
33
|
-
source?: string
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface AgentReplayOptions {
|
|
37
|
-
from: number | string
|
|
38
|
-
to: number | string
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface AgentBranchState {
|
|
42
|
-
state: Record<string, unknown>
|
|
43
|
-
temporal: {
|
|
44
|
-
history: (path?: string) => MemoryEntry[]
|
|
45
|
-
at: (path: string, timestamp: string | number) => unknown
|
|
46
|
-
diff: (path: string, from: string | number, to: string | number) => MemoryEntry[]
|
|
47
|
-
replay: (opts?: { from?: string | number; to?: string | number }) => Record<string, unknown>
|
|
48
|
-
explain: (path: string) => unknown
|
|
49
|
-
branch: () => AgentBranchState
|
|
50
|
-
discard: () => void
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface AgentMemory {
|
|
55
|
-
/** Identifier of the agent owning this isolated namespace. */
|
|
56
|
-
readonly agentId: string
|
|
57
|
-
/** Store a memory entry, namespaced and tagged for this agent. */
|
|
58
|
-
remember: (key: string, value: unknown, options?: AgentRememberOptions) => Promise<void>
|
|
59
|
-
/** Read a memory entry by key. Expired, obsolete, and superseded entries are null. */
|
|
60
|
-
recall: (key: string, options?: RecallOptions) => Promise<MemoryEntry | null>
|
|
61
|
-
/** Ranked memories for this agent only. Additional tags use AND semantics. */
|
|
62
|
-
context: (options?: AgentContextOptions) => Promise<ContextEntry[]>
|
|
63
|
-
/** Mutation history, optionally for one path. */
|
|
64
|
-
history: (path?: string) => Promise<MemoryEntry[]>
|
|
65
|
-
/** Replay the state evolution over a temporal range. */
|
|
66
|
-
replay: (opts: AgentReplayOptions) => Promise<Record<string, unknown>>
|
|
67
|
-
/** Open an isolated temporal branch for experimentation. */
|
|
68
|
-
branch: () => Promise<AgentBranchState>
|
|
69
|
-
/** Memory usage statistics. */
|
|
70
|
-
stats: () => Promise<MemoryStats>
|
|
71
|
-
/** Update an existing memory entry. */
|
|
72
|
-
update: (key: string, value: unknown, options?: AgentRememberOptions) => Promise<void>
|
|
73
|
-
/** Delete a memory entry. */
|
|
74
|
-
forget: (key: string) => Promise<void>
|
|
75
|
-
/** Enable temporal and history tracking. */
|
|
76
|
-
enable: (bool?: boolean) => Promise<void>
|
|
77
|
-
/** Disable temporal tracking. */
|
|
78
|
-
disable: () => Promise<void>
|
|
79
|
-
/** Clear the temporal log and every memory of this agent. */
|
|
80
|
-
clear: () => Promise<void>
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/** Create an agent-specific memory instance with an isolated namespace. */
|
|
84
|
-
export declare function createAgentMemory(agentId: string): AgentMemory
|
|
85
|
-
|
|
86
|
-
/** Create an agent memory instance with the default agent id. */
|
|
87
|
-
export declare function createDefaultAgentMemory(): AgentMemory
|