dotmem 0.3.0 → 0.3.1
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/AGENTS.md +42 -12
- package/CHANGELOG.md +20 -0
- package/MEMORY.md +26 -8
- package/README.md +231 -294
- package/SECURITY.md +1 -1
- package/WHATSNEW.md +30 -0
- package/agent.cjs +101 -101
- package/agent.js +101 -101
- package/built-in-context.json +2 -2
- package/cli.cjs +219 -201
- package/cli.js +219 -201
- package/global.cjs +101 -101
- package/global.js +101 -101
- package/index.cjs +118 -118
- package/index.js +118 -118
- package/llms.txt +8 -4
- package/mcp.cjs +109 -108
- package/mcp.js +109 -108
- package/package.json +6 -7
- package/types/global-types.d.ts +65 -14
- package/types/memory.d.ts +39 -8
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dotmem",
|
|
3
3
|
"codeName": "dotmem",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"description": "
|
|
7
|
+
"description": "Persistent project knowledge for AI coding assistants and agents.",
|
|
8
8
|
"main": "./index.cjs",
|
|
9
9
|
"module": "./index.js",
|
|
10
10
|
"types": "./index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"contributors": [
|
|
30
30
|
{
|
|
31
31
|
"name": "Dario Passariello",
|
|
32
|
-
"email": "
|
|
32
|
+
"email": "dariopassariello@gmail.com"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"name": "Valeria Cala Scaglitta",
|
|
@@ -49,12 +49,10 @@
|
|
|
49
49
|
"memory",
|
|
50
50
|
"continuity",
|
|
51
51
|
"knowledge",
|
|
52
|
-
"mcp"
|
|
53
|
-
"joy",
|
|
54
|
-
"jo"
|
|
52
|
+
"mcp"
|
|
55
53
|
],
|
|
56
54
|
"engines": {
|
|
57
|
-
"node": ">=
|
|
55
|
+
"node": ">=22.5.0",
|
|
58
56
|
"bun": ">=1.0.0"
|
|
59
57
|
},
|
|
60
58
|
"files": [
|
|
@@ -75,6 +73,7 @@
|
|
|
75
73
|
},
|
|
76
74
|
"dependencies": {
|
|
77
75
|
"@modelcontextprotocol/server": "2.4.0",
|
|
76
|
+
"@noble/post-quantum": "0.7.1",
|
|
78
77
|
"memorio": "5.5.6",
|
|
79
78
|
"zod": "4.6.7"
|
|
80
79
|
},
|
package/types/global-types.d.ts
CHANGED
|
@@ -130,7 +130,8 @@ interface AcquirePayload {
|
|
|
130
130
|
kind?: 'experience' | 'agent' | 'logic' | 'note'
|
|
131
131
|
sourceProject?: string
|
|
132
132
|
acquiredAt?: string
|
|
133
|
-
expiresAt?: number
|
|
133
|
+
expiresAt?: number
|
|
134
|
+
until?: string
|
|
134
135
|
bootstrapPriority?: 'P1' | 'P2' | 'P3' | 'P4' | 'P5' | 'unclassified'
|
|
135
136
|
}
|
|
136
137
|
|
|
@@ -277,6 +278,7 @@ interface ContextRunOptions {
|
|
|
277
278
|
format?: 'brief'
|
|
278
279
|
diagnostics?: boolean
|
|
279
280
|
debug?: boolean
|
|
281
|
+
telemetryWeights?: boolean
|
|
280
282
|
/** Return the omission manifest instead of the rendered projection. */
|
|
281
283
|
manifest?: boolean
|
|
282
284
|
/** Expand one claim by id to its canonical record. */
|
|
@@ -1139,6 +1141,7 @@ interface RankedCandidate extends DiscoveryCandidate {
|
|
|
1139
1141
|
matchedTermCount: number
|
|
1140
1142
|
fieldWeight: number
|
|
1141
1143
|
acquiredTime: number
|
|
1144
|
+
telemetryBoost?: number
|
|
1142
1145
|
}
|
|
1143
1146
|
|
|
1144
1147
|
interface BehavioralInvariant {
|
|
@@ -1612,11 +1615,14 @@ interface OpenLoop {
|
|
|
1612
1615
|
closedAt?: string
|
|
1613
1616
|
closedBy?: string
|
|
1614
1617
|
closeNote?: string
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1618
|
+
authorAgent?: string
|
|
1619
|
+
targetRole?: string
|
|
1620
|
+
status?: 'open' | 'resolved' | 'withdrawn'
|
|
1621
|
+
resolvedBy?: string
|
|
1622
|
+
resolution?: string
|
|
1623
|
+
projectId?: string
|
|
1624
|
+
relatedClaimId?: string
|
|
1625
|
+
relatedFile?: string
|
|
1620
1626
|
}
|
|
1621
1627
|
|
|
1622
1628
|
interface LoopAddInput {
|
|
@@ -1624,12 +1630,17 @@ interface LoopAddInput {
|
|
|
1624
1630
|
text: string
|
|
1625
1631
|
waitor: string
|
|
1626
1632
|
openedAt?: string
|
|
1633
|
+
authorAgent?: string
|
|
1634
|
+
targetRole?: string
|
|
1635
|
+
status?: 'open' | 'resolved' | 'withdrawn'
|
|
1636
|
+
projectId?: string
|
|
1637
|
+
relatedClaimId?: string
|
|
1638
|
+
relatedFile?: string
|
|
1627
1639
|
}
|
|
1628
1640
|
|
|
1629
|
-
interface
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
closedAt?: string
|
|
1641
|
+
interface LoopStoreDocument {
|
|
1642
|
+
version: number
|
|
1643
|
+
loops: Record<string, OpenLoop>
|
|
1633
1644
|
}
|
|
1634
1645
|
|
|
1635
1646
|
interface MemInterpretationMap {
|
|
@@ -2512,6 +2523,13 @@ interface AcquiredClaim {
|
|
|
2512
2523
|
*/
|
|
2513
2524
|
sourceProject?: string
|
|
2514
2525
|
kind?: MemoryKind
|
|
2526
|
+
/**
|
|
2527
|
+
* Visibility for selective encryption / sync (ITEM 14).
|
|
2528
|
+
* `public` = plaintext in shared stores/Git; `private` = encrypted at rest.
|
|
2529
|
+
* Absence defaults to `public`.
|
|
2530
|
+
*/
|
|
2531
|
+
visibility?: 'public' | 'private'
|
|
2532
|
+
encryptedPayload?: string
|
|
2515
2533
|
/**
|
|
2516
2534
|
* A self-checking rule that can verify whether the claim still holds.
|
|
2517
2535
|
* The check runs read-only on the output and reports violations.
|
|
@@ -2546,7 +2564,25 @@ interface AcquireOptions {
|
|
|
2546
2564
|
retracts?: string | string[]
|
|
2547
2565
|
reason?: string
|
|
2548
2566
|
scope?: 'user' | 'project'
|
|
2549
|
-
kind?: MemoryKind
|
|
2567
|
+
kind?: MemoryKind
|
|
2568
|
+
lifetime?: 'durable' | 'operational'
|
|
2569
|
+
memoryClass?: 'episodic' | 'semantic' | 'procedure'
|
|
2570
|
+
probe?: any
|
|
2571
|
+
derivedFrom?: string[]
|
|
2572
|
+
derived_from?: string[]
|
|
2573
|
+
subject?: string
|
|
2574
|
+
predicate?: string
|
|
2575
|
+
autoSupersede?: boolean
|
|
2576
|
+
source?: string
|
|
2577
|
+
lifetime?: 'durable' | 'operational'
|
|
2578
|
+
subject?: string
|
|
2579
|
+
predicate?: string
|
|
2580
|
+
taint?: 'user_direct' | 'local_code' | 'external_untrusted'
|
|
2581
|
+
risk?: 'user_direct' | 'local_code' | 'external_untrusted'
|
|
2582
|
+
visibility?: 'public' | 'private'
|
|
2583
|
+
sourceProject?: string
|
|
2584
|
+
risk?: 'user_direct' | 'local_code' | 'external_untrusted'
|
|
2585
|
+
visibility?: 'public' | 'private'
|
|
2550
2586
|
sourceProject?: string
|
|
2551
2587
|
check?: ClaimSelfCheck
|
|
2552
2588
|
applyPrivacyGate?: boolean
|
|
@@ -2592,6 +2628,7 @@ interface DiscoveryOptions {
|
|
|
2592
2628
|
facts?: SituationFacts
|
|
2593
2629
|
diagnostics?: boolean
|
|
2594
2630
|
debug?: boolean
|
|
2631
|
+
telemetryWeights?: boolean
|
|
2595
2632
|
/**
|
|
2596
2633
|
* Project identity the retrieval runs for. Enables the scope-eligibility
|
|
2597
2634
|
* gate: a project-scoped claim is eligible only for its owning project.
|
|
@@ -2685,6 +2722,8 @@ interface ClaimExplanation {
|
|
|
2685
2722
|
/** Earliest decisive gate that excluded the claim; absent otherwise. */
|
|
2686
2723
|
decisiveGate?: ExplanationGate
|
|
2687
2724
|
reasons: ExplanationReason[]
|
|
2725
|
+
/** Query terms that matched this claim's fields (if any). */
|
|
2726
|
+
matchedTerms?: string[]
|
|
2688
2727
|
}
|
|
2689
2728
|
|
|
2690
2729
|
interface DiscoveryExplanationReport {
|
|
@@ -2707,6 +2746,10 @@ interface ProjectionOptions {
|
|
|
2707
2746
|
* `standard` with the candidate cap lifted by the caller.
|
|
2708
2747
|
*/
|
|
2709
2748
|
format?: 'compact' | 'standard' | 'full'
|
|
2749
|
+
role?: string
|
|
2750
|
+
topicLimit?: number
|
|
2751
|
+
trustFloor?: string
|
|
2752
|
+
taintCeiling?: string
|
|
2710
2753
|
}
|
|
2711
2754
|
|
|
2712
2755
|
interface ProjectedExperience {
|
|
@@ -2764,7 +2807,7 @@ type EpistemicType = 'observed' | 'inferred' | 'human-stated' | 'verified'
|
|
|
2764
2807
|
|
|
2765
2808
|
type TrustBasis = 'declared' | 'evidenced' | 'mechanically-checked' | 'externally-attested'
|
|
2766
2809
|
|
|
2767
|
-
type MemoryKind = 'experience' | 'agent' | 'relationship' | 'logic' | 'note' | 'rule'
|
|
2810
|
+
type MemoryKind = 'experience' | 'agent' | 'relationship' | 'logic' | 'note' | 'rule' | 'procedure'
|
|
2768
2811
|
|
|
2769
2812
|
type DiscoveryDepth = 'current' | 'deep'
|
|
2770
2813
|
|
|
@@ -2780,9 +2823,9 @@ type SituationFacts = SituationApplicability
|
|
|
2780
2823
|
|
|
2781
2824
|
type CurrentnessState = 'historical' | 'superseded' | 'expired' | 'verified' | 'unverified' | 'contested' | 'unknown-currentness'
|
|
2782
2825
|
|
|
2783
|
-
type OmissionReason = 'retracted' | 'superseded' | 'expired' | 'scope' | 'applicability-mismatch' | 'no-term-match' | 'limit' | 'budget'
|
|
2826
|
+
type OmissionReason = 'retracted' | 'superseded' | 'expired' | 'stale' | 'scope' | 'applicability-mismatch' | 'no-term-match' | 'limit' | 'budget'
|
|
2784
2827
|
|
|
2785
|
-
type OmissionGate = 'revision-resolution' | 'scope' | 'freshness' | 'applicability' | 'ranking' | 'projection'
|
|
2828
|
+
type OmissionGate = 'revision-resolution' | 'scope' | 'freshness' | 'probe' | 'applicability' | 'ranking' | 'projection'
|
|
2786
2829
|
|
|
2787
2830
|
type ClaimDisposition = 'selected' | 'excluded' | 'unresolved'
|
|
2788
2831
|
|
|
@@ -3476,3 +3519,11 @@ interface A2AJsonRpcResponse {
|
|
|
3476
3519
|
error?: A2AError
|
|
3477
3520
|
}
|
|
3478
3521
|
|
|
3522
|
+
|
|
3523
|
+
interface LoopCloseInput {
|
|
3524
|
+
by: string
|
|
3525
|
+
note?: string
|
|
3526
|
+
closedAt?: string
|
|
3527
|
+
resolution?: string
|
|
3528
|
+
status?: "resolved" | "withdrawn"
|
|
3529
|
+
}
|
package/types/memory.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare global {
|
|
|
6
6
|
type MemoryScope = 'hot' | 'session' | 'local' | 'durable'
|
|
7
7
|
type MemoryType = 'fact' | 'preference' | 'decision' | 'task' | 'context'
|
|
8
8
|
type MemoryStatus = 'active' | 'obsolete' | 'superseded'
|
|
9
|
-
type MemoryKind = 'experience' | 'agent' | 'relationship' | 'logic' | 'note' | 'rule'
|
|
9
|
+
type MemoryKind = 'experience' | 'agent' | 'relationship' | 'logic' | 'note' | 'rule' | 'procedure'
|
|
10
10
|
type JsonPrimitive = string | number | boolean | null
|
|
11
11
|
type JsonValue = JsonPrimitive | JsonValue[] | { [key: string]: JsonValue }
|
|
12
12
|
interface EvidenceReference {
|
|
@@ -33,14 +33,32 @@ interface AcquiredClaim {
|
|
|
33
33
|
evidence: EvidenceReference[]
|
|
34
34
|
epistemicType?: EpistemicType
|
|
35
35
|
provenance?: ClaimProvenance
|
|
36
|
-
acquiredAt?: string
|
|
36
|
+
acquiredAt?: string
|
|
37
|
+
until?: string
|
|
37
38
|
/** Epoch ms when this entry expires and should become inactive. Absence means no expiry. */
|
|
38
|
-
expiresAt?: number
|
|
39
|
+
expiresAt?: number
|
|
39
40
|
/** Bootstrap ordering metadata (P1-P5), not authority. Absence means unclassified. */
|
|
40
41
|
bootstrapPriority?: 'P1' | 'P2' | 'P3' | 'P4' | 'P5' | 'unclassified'
|
|
41
42
|
revision?: RevisionRelationship
|
|
42
43
|
scope?: 'user' | 'project'
|
|
43
|
-
kind?: MemoryKind
|
|
44
|
+
kind?: MemoryKind
|
|
45
|
+
lifetime?: 'durable' | 'operational'
|
|
46
|
+
memoryClass?: 'episodic' | 'semantic' | 'procedure'
|
|
47
|
+
probe?: any
|
|
48
|
+
derivedFrom?: string[]
|
|
49
|
+
derived_from?: string[]
|
|
50
|
+
subject?: string
|
|
51
|
+
predicate?: string
|
|
52
|
+
taint?: 'user_direct' | 'local_code' | 'external_untrusted'
|
|
53
|
+
risk?: 'user_direct' | 'local_code' | 'external_untrusted'
|
|
54
|
+
status?: 'active' | 'quarantined' | 'archived' | 'superseded'
|
|
55
|
+
screeningFlags?: string[]
|
|
56
|
+
visibility?: 'public' | 'private'
|
|
57
|
+
encryptedPayload?: string
|
|
58
|
+
risk?: 'user_direct' | 'local_code' | 'external_untrusted'
|
|
59
|
+
status?: 'active' | 'quarantined' | 'archived' | 'superseded'
|
|
60
|
+
screeningFlags?: string[]
|
|
61
|
+
visibility?: 'public' | 'private'
|
|
44
62
|
}
|
|
45
63
|
interface AcquiredContext {
|
|
46
64
|
knowledgeVersion: number
|
|
@@ -98,8 +116,8 @@ interface DiscoveryCandidate {
|
|
|
98
116
|
/** Derived currentness, so the projection renders what discovery resolved. */
|
|
99
117
|
currentness?: CurrentnessState
|
|
100
118
|
}
|
|
101
|
-
type OmissionReason = 'retracted' | 'superseded' | 'expired' | 'scope' | 'applicability-mismatch' | 'no-term-match' | 'limit' | 'budget'
|
|
102
|
-
type OmissionGate = 'revision-resolution' | 'scope' | 'freshness' | 'applicability' | 'ranking' | 'projection'
|
|
119
|
+
type OmissionReason = 'retracted' | 'superseded' | 'expired' | 'stale' | 'scope' | 'applicability-mismatch' | 'no-term-match' | 'limit' | 'budget'
|
|
120
|
+
type OmissionGate = 'revision-resolution' | 'scope' | 'freshness' | 'probe' | 'applicability' | 'ranking' | 'projection'
|
|
103
121
|
interface OmissionRecord {
|
|
104
122
|
id: string
|
|
105
123
|
reason: OmissionReason
|
|
@@ -278,14 +296,27 @@ interface AcquireOptions {
|
|
|
278
296
|
provenance?: ClaimProvenance
|
|
279
297
|
/** ISO-8601 acquisition time. Defaults to the time acquire() is called. */
|
|
280
298
|
acquiredAt?: string
|
|
299
|
+
until?: string
|
|
281
300
|
refines?: string | string[]
|
|
282
301
|
supersedes?: string | string[]
|
|
283
302
|
retracts?: string | string[]
|
|
284
303
|
reason?: string
|
|
285
304
|
scope?: 'user' | 'project'
|
|
286
|
-
kind?: MemoryKind
|
|
305
|
+
kind?: MemoryKind
|
|
306
|
+
lifetime?: 'durable' | 'operational'
|
|
307
|
+
probe?: any
|
|
308
|
+
derivedFrom?: string[]
|
|
309
|
+
derived_from?: string[]
|
|
310
|
+
subject?: string
|
|
311
|
+
predicate?: string
|
|
312
|
+
autoSupersede?: boolean
|
|
313
|
+
source?: string
|
|
314
|
+
taint?: 'user_direct' | 'local_code' | 'external_untrusted'
|
|
315
|
+
risk?: 'user_direct' | 'local_code' | 'external_untrusted'
|
|
316
|
+
visibility?: 'public' | 'private'
|
|
317
|
+
encryptedPayload?: string
|
|
287
318
|
sourceProject?: string
|
|
288
|
-
/** Bootstrap ordering metadata (P1-P5), not authority. Absence means unclassified. */
|
|
319
|
+
/** Bootstrap ordering metadata (P1-P5), not authority. Absence means unclassified. */
|
|
289
320
|
bootstrapPriority?: 'P1' | 'P2' | 'P3' | 'P4' | 'P5' | 'unclassified'
|
|
290
321
|
}
|
|
291
322
|
interface RecallOptions {
|