dotmem 0.2.0 → 0.2.2
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/agent.cjs +3176 -1
- package/agent.js +3176 -1
- package/built-in-context.json +2 -2
- package/cli.cjs +204 -127
- package/cli.js +204 -127
- package/global.cjs +22 -19
- package/global.js +22 -19
- package/index.cjs +46 -43
- package/index.js +46 -43
- package/mcp.cjs +62 -59
- package/mcp.js +62 -59
- package/package.json +2 -2
- package/types/global-types.d.ts +20 -0
- package/DOTMEM-SHORT-API.md +0 -318
- package/DOTMEM-SHORT-COMPONENTS.md +0 -129
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dotmem",
|
|
3
3
|
"codeName": "dotmem",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"description": "The AI memory layer for agents and apps: acquired experience, discovery, context projection, continuity, and logic engine. Built on Memorio's state+store foundation.",
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"continuity",
|
|
51
51
|
"knowledge",
|
|
52
52
|
"mcp",
|
|
53
|
-
"joytrend",
|
|
54
53
|
"joy",
|
|
55
54
|
"jo"
|
|
56
55
|
],
|
|
@@ -77,6 +76,7 @@
|
|
|
77
76
|
"dependencies": {
|
|
78
77
|
"@modelcontextprotocol/server": "2.4.0",
|
|
79
78
|
"memorio": "5.5.4",
|
|
79
|
+
"reactflow": "11.11.4",
|
|
80
80
|
"zod": "4.6.7"
|
|
81
81
|
},
|
|
82
82
|
"overrides": {
|
package/types/global-types.d.ts
CHANGED
|
@@ -2599,6 +2599,16 @@ interface AcquiredClaim {
|
|
|
2599
2599
|
acquiredAt?: string
|
|
2600
2600
|
/** Epoch ms when this entry expires and should become inactive. Absence means no expiry. */
|
|
2601
2601
|
expiresAt?: number
|
|
2602
|
+
/** Subjective importance / emotional weight (0..1). Higher = more salient. */
|
|
2603
|
+
salience?: number
|
|
2604
|
+
/** Emotional valence associated with the claim. */
|
|
2605
|
+
affect?: 'positive' | 'negative' | 'neutral'
|
|
2606
|
+
/** Decay rate per day (0..1). Higher = faster forgetting. Absence = no decay. */
|
|
2607
|
+
decayRate?: number
|
|
2608
|
+
/** Last access timestamp (ISO) for reconsolidation/decay tracking. */
|
|
2609
|
+
lastAccessedAt?: string
|
|
2610
|
+
/** Number of times this claim has been recalled (procedural consolidation signal). */
|
|
2611
|
+
accessCount?: number
|
|
2602
2612
|
/** Bootstrap ordering metadata (P1-P5), not authority. Absence means unclassified. */
|
|
2603
2613
|
bootstrapPriority?: 'P1' | 'P2' | 'P3' | 'P4' | 'P5' | 'unclassified'
|
|
2604
2614
|
revision?: RevisionRelationship
|
|
@@ -2630,6 +2640,16 @@ interface AcquireOptions {
|
|
|
2630
2640
|
acquiredAt?: string
|
|
2631
2641
|
/** Epoch ms when this entry expires and should become inactive. Absence means no expiry. */
|
|
2632
2642
|
expiresAt?: number
|
|
2643
|
+
/** Subjective importance / emotional weight (0..1). Higher = more salient. */
|
|
2644
|
+
salience?: number
|
|
2645
|
+
/** Emotional valence associated with the claim. */
|
|
2646
|
+
affect?: 'positive' | 'negative' | 'neutral'
|
|
2647
|
+
/** Decay rate per day (0..1). Higher = faster forgetting. Absence = no decay. */
|
|
2648
|
+
decayRate?: number
|
|
2649
|
+
/** Last access timestamp (ISO) for reconsolidation/decay tracking. */
|
|
2650
|
+
lastAccessedAt?: string
|
|
2651
|
+
/** Number of times this claim has been recalled (procedural consolidation signal). */
|
|
2652
|
+
accessCount?: number
|
|
2633
2653
|
/** Bootstrap ordering metadata (P1-P5), not authority. Absence means unclassified. */
|
|
2634
2654
|
bootstrapPriority?: 'P1' | 'P2' | 'P3' | 'P4' | 'P5' | 'unclassified'
|
|
2635
2655
|
refines?: string | string[]
|
package/DOTMEM-SHORT-API.md
DELETED
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
# Dotmem Short API
|
|
2
|
-
|
|
3
|
-
Normative specification for the `short()` intent-based interface that exposes Dotmem's existing public capabilities through simple JSON input.
|
|
4
|
-
|
|
5
|
-
## Public API Contract
|
|
6
|
-
|
|
7
|
-
### Entry Points
|
|
8
|
-
|
|
9
|
-
**Standalone function:**
|
|
10
|
-
```ts
|
|
11
|
-
await short({ important: "Do not modify production" })
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
**Instance method:**
|
|
15
|
-
```ts
|
|
16
|
-
await dotmem.short({ important: "Do not modify production" })
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Both entry points accept exactly one argument: a JSON object where each key is an intent name and each value is the intent payload. Both share the same resolver, validation, dispatch, execution, and result implementation.
|
|
20
|
-
|
|
21
|
-
### Prohibited Syntax
|
|
22
|
-
|
|
23
|
-
```ts
|
|
24
|
-
short("important", "Do not modify production") // ERROR: positional arguments prohibited
|
|
25
|
-
dotmem.short("important", "Do not modify production") // ERROR: positional arguments prohibited
|
|
26
|
-
short.important("Do not modify production") // ERROR: per-intent methods prohibited
|
|
27
|
-
short.note("...") // ERROR: per-intent methods prohibited
|
|
28
|
-
dotmem.short.note("...") // ERROR: per-intent methods prohibited
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Intent Catalogue
|
|
32
|
-
|
|
33
|
-
| Category | Intent | Description | Payload Form |
|
|
34
|
-
|----------|--------|-------------|--------------|
|
|
35
|
-
| Knowledge | `note` | Store/retrieve markdown notes | string or structured object |
|
|
36
|
-
| Knowledge | `remember` | Store key/value memory | structured object |
|
|
37
|
-
| Knowledge | `recall` | Retrieve memory by query | structured object |
|
|
38
|
-
| Knowledge | `forget` | Delete key/value memory | structured object |
|
|
39
|
-
| Knowledge | `update` | Update key/value memory | structured object |
|
|
40
|
-
| Knowledge | `patch` | Patch memory entry fields | structured object |
|
|
41
|
-
| Knowledge | `acquire` | Durable knowledge acquisition | structured object |
|
|
42
|
-
| Knowledge | `verify` | Claim freshness verification | empty object |
|
|
43
|
-
| Priority | `important` | Record behavioral guidance | string or object |
|
|
44
|
-
| Priority | `avoid` | Record behavioral guidance to avoid | string or object |
|
|
45
|
-
| Priority | `prefer` | Record behavioral preference | string or object |
|
|
46
|
-
| Priority | `warning` | Record behavioral warning | string or object |
|
|
47
|
-
| Context | `context` | Provide acquired context for a situation | structured object |
|
|
48
|
-
| Context | `bootstrap` | Initialize session context | structured object |
|
|
49
|
-
| Rules | `rules` | Query iron rules reference | structured object |
|
|
50
|
-
| Governance | `policy` | Evaluate existing policies | structured object |
|
|
51
|
-
| Projects | `project` | Project discovery and management | structured object |
|
|
52
|
-
| Projects | `discover` | Experience discovery | structured object |
|
|
53
|
-
| Inspection | `inspect` | Package/store inspection | structured object |
|
|
54
|
-
| Inspection | `dump` | Memory stats listing | empty object |
|
|
55
|
-
| Inspection | `audit` | Audit trail query | empty object |
|
|
56
|
-
| Maintenance | `health` | System health check | empty object |
|
|
57
|
-
| Maintenance | `doctor` | System diagnostics | empty object |
|
|
58
|
-
| Maintenance | `repair` | Policy repair (blocked, requires confirmation) | structured object |
|
|
59
|
-
| Maintenance | `cleanup` | Clear non-durable memory | empty object |
|
|
60
|
-
| Relationships | `relate` | Claim relationships (refines/supersedes/retracts) | structured object |
|
|
61
|
-
| Relationships | `link` | Link claims via supersedes | structured object |
|
|
62
|
-
| Relationships | `unlink` | Unlink claims via retracts | structured object |
|
|
63
|
-
| Relationships | `merge` | Merge/override notes | structured object |
|
|
64
|
-
| Configuration | `configure` | Runtime configuration | structured object |
|
|
65
|
-
| Configuration | `capabilities` | Query runtime capabilities | empty object |
|
|
66
|
-
| Development | `seed` | Joy memory seed (DOTMEM_DEV_SEED=1 required) | structured object |
|
|
67
|
-
| Conversation | `capture` | Conversational capture | structured object |
|
|
68
|
-
|
|
69
|
-
## Payload Schemas
|
|
70
|
-
|
|
71
|
-
### `note`
|
|
72
|
-
```ts
|
|
73
|
-
// Plain text (auto-generates id)
|
|
74
|
-
short({ note: "The production server uses Debian 13" })
|
|
75
|
-
|
|
76
|
-
// Structured
|
|
77
|
-
short({
|
|
78
|
-
note: {
|
|
79
|
-
id: "note-1",
|
|
80
|
-
title: "Production server",
|
|
81
|
-
content: "Debian 13",
|
|
82
|
-
origin: "deployment",
|
|
83
|
-
scope: "user",
|
|
84
|
-
tag: "infra"
|
|
85
|
-
}
|
|
86
|
-
})
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### `remember`
|
|
90
|
-
```ts
|
|
91
|
-
short({ remember: { key: "dbVersion", value: "13", scope: "project" } })
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### `recall`
|
|
95
|
-
```ts
|
|
96
|
-
short({ recall: "dbVersion" })
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### `forget`
|
|
100
|
-
```ts
|
|
101
|
-
short({ forget: "oldKey" })
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### `update`
|
|
105
|
-
```ts
|
|
106
|
-
short({ update: { key: "dbVersion", value: "14" } })
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### `patch`
|
|
110
|
-
```ts
|
|
111
|
-
short({ patch: { key: "config", patches: [{ op: "set", path: "timeout", value: 30 }] } })
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### `acquire`
|
|
115
|
-
```ts
|
|
116
|
-
short({ acquire: { knowledge: { rule: "use strict" }, applicability: { situation: "new-project" } } })
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### `verify`
|
|
120
|
-
```ts
|
|
121
|
-
short({ verify: {} })
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### `important` / `avoid` / `prefer` / `warning`
|
|
125
|
-
```ts
|
|
126
|
-
short({ important: "Do not modify production" })
|
|
127
|
-
short({ avoid: { guidance: "Deploy without a backup" } })
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### `context`
|
|
131
|
-
```ts
|
|
132
|
-
short({ context: { situation: "CI pipeline configuration", maxCandidates: 5 } })
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### `bootstrap`
|
|
136
|
-
```ts
|
|
137
|
-
short({ bootstrap: { situation: "New project setup" } })
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### `rules`
|
|
141
|
-
```ts
|
|
142
|
-
short({ rules: { expand: true } })
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### `policy`
|
|
146
|
-
```ts
|
|
147
|
-
short({ policy: { event: "artifact.write", claims: [], policies: [] } })
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
### `project`
|
|
151
|
-
```ts
|
|
152
|
-
short({ project: { situation: "New React project", maxCandidates: 5 } })
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### `discover`
|
|
156
|
-
```ts
|
|
157
|
-
short({ discover: { situation: "CI pipeline configuration", depth: "deep" } })
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### `inspect`
|
|
161
|
-
```ts
|
|
162
|
-
short({ inspect: { file: "/path/to/file.mem", action: "claims" } })
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### `dump`
|
|
166
|
-
```ts
|
|
167
|
-
short({ dump: {} })
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
### `audit`
|
|
171
|
-
```ts
|
|
172
|
-
short({ audit: {} })
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### `health`
|
|
176
|
-
```ts
|
|
177
|
-
short({ health: {} })
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### `doctor`
|
|
181
|
-
```ts
|
|
182
|
-
short({ doctor: {} })
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### `repair`
|
|
186
|
-
```ts
|
|
187
|
-
short({ repair: { type: "policy" } })
|
|
188
|
-
// Returns blocked: requires governance authority and explicit confirmation
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### `cleanup`
|
|
192
|
-
```ts
|
|
193
|
-
short({ cleanup: {} })
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
### `relate` / `link` / `unlink`
|
|
197
|
-
```ts
|
|
198
|
-
short({ relate: { kind: "supersedes", claimIds: ["claim-1", "claim-2"] } })
|
|
199
|
-
short({ link: { kind: "supersedes", claimIds: ["claim-1"] } })
|
|
200
|
-
short({ unlink: { kind: "retracts", claimIds: ["claim-1"] } })
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
### `merge`
|
|
204
|
-
```ts
|
|
205
|
-
short({ merge: { id: "note-1", previousId: "note-0", title: "Updated", content: "...", origin: "short-api" } })
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
### `configure`
|
|
209
|
-
```ts
|
|
210
|
-
short({ configure: { sync: { provider: "s3" } } })
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### `capabilities`
|
|
214
|
-
```ts
|
|
215
|
-
short({ capabilities: {} })
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### `seed` (dev-only)
|
|
219
|
-
```ts
|
|
220
|
-
// Requires DOTMEM_DEV_SEED=1
|
|
221
|
-
short({ seed: { id: "seed-1", title: "Dev seed", content: "...", origin: "dev" } })
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### `capture`
|
|
225
|
-
```ts
|
|
226
|
-
short({ capture: { messages: [{ role: "user", content: "Hello" }], options: { conversationId: "conv-1" } } })
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
## Result Contract
|
|
230
|
-
|
|
231
|
-
All calls return a `ShortAggregateResult` envelope:
|
|
232
|
-
|
|
233
|
-
```ts
|
|
234
|
-
interface ShortAggregateResult {
|
|
235
|
-
success: boolean // true only if every intent completed
|
|
236
|
-
partial: boolean // true if at least one intent failed
|
|
237
|
-
results: {
|
|
238
|
-
[intent: string]: {
|
|
239
|
-
success: boolean
|
|
240
|
-
status: 'completed' | 'failed' | 'blocked' | 'pending' | 'skipped'
|
|
241
|
-
value?: unknown
|
|
242
|
-
error?: {
|
|
243
|
-
code: string
|
|
244
|
-
message: string
|
|
245
|
-
remediation?: string
|
|
246
|
-
intent: string
|
|
247
|
-
stateChanged?: boolean
|
|
248
|
-
confirmation?: { required: boolean; reason: string; action?: string }
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
errors: Array<{ code: string; message: string; intent: string; stateChanged?: boolean }>
|
|
253
|
-
}
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
### Single-intent result
|
|
257
|
-
```ts
|
|
258
|
-
const result = await short({ note: "Test note" })
|
|
259
|
-
// result.success === true
|
|
260
|
-
// result.results.note.success === true
|
|
261
|
-
// result.results.note.value === "note-123"
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
### Multi-intent result
|
|
265
|
-
```ts
|
|
266
|
-
const result = await short({
|
|
267
|
-
important: "Do not modify production",
|
|
268
|
-
note: "Server uses Debian 13",
|
|
269
|
-
recall: "dbVersion"
|
|
270
|
-
})
|
|
271
|
-
// result.success === true if all succeeded
|
|
272
|
-
// result.results.<intent> contains per-intent results
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
### Partial success
|
|
276
|
-
If any intent fails, `success` is `false`, `partial` is `true`, and the `errors` array contains failed intent details. Earlier committed effects are reported accurately - no rollback is attempted.
|
|
277
|
-
|
|
278
|
-
## Error Codes
|
|
279
|
-
|
|
280
|
-
| Code | Meaning | Remediation |
|
|
281
|
-
|------|---------|-------------|
|
|
282
|
-
| `DOTMEM_INVALID_INPUT` | Input is not a JSON object | Pass a plain JSON object |
|
|
283
|
-
| `DOTMEM_UNKNOWN_INTENT` | Intent key is not recognized | Use a supported intent from catalogue |
|
|
284
|
-
| `DOTMEM_INVALID_PAYLOAD` | Payload is malformed | Check intent-specific schema |
|
|
285
|
-
| `DOTMEM_INTENT_ERROR` | Operation failed | Check error message for details |
|
|
286
|
-
| `DOTMEM_CONFIRMATION_REQUIRED` | Operation needs explicit confirmation | Authorize via governance/confirmed flow |
|
|
287
|
-
| `DOTMEM_DEV_SEED_REQUIRED` | Seed requires dev flag | Set DOTMEM_DEV_SEED=1 environment variable |
|
|
288
|
-
|
|
289
|
-
## Execution Semantics
|
|
290
|
-
|
|
291
|
-
- **Order**: Intents execute in declaration order (object key insertion order)
|
|
292
|
-
- **Execution**: Sequential by default; no parallel writes
|
|
293
|
-
- **Atomicity**: Not atomic across intents. Each intent executes independently through its existing API boundary
|
|
294
|
-
- **Rollback**: No automatic rollback. Earlier committed effects remain if a later intent fails
|
|
295
|
-
- **Idempotency**: Per-intent; `remember`/`acquire` with same key/id supersede existing values
|
|
296
|
-
- **Retry**: Non-idempotent mutations are not automatically retried
|
|
297
|
-
|
|
298
|
-
## Security, Trust, Authorization
|
|
299
|
-
|
|
300
|
-
- All mutating operations cross the existing canonical acquisition boundary
|
|
301
|
-
- Policy enforcement operates through the existing tier system (`context`/`precondition`/`hard-precondition`)
|
|
302
|
-
- Conversational overrides are rejected (same as existing `assertNoConversationalOverride`)
|
|
303
|
-
- Authorities cannot be self-granted (same as existing governance guards)
|
|
304
|
-
- Caller-controlled fields cannot self-assign authority, verification metadata, trusted provenance or policy overrides
|
|
305
|
-
- All audit events are logged via the existing security audit system
|
|
306
|
-
- Size limits prevent unbounded growth via `checkAcquireLimits`
|
|
307
|
-
|
|
308
|
-
## Limitations
|
|
309
|
-
|
|
310
|
-
- Multi-intent calls are not atomic across existing API boundaries
|
|
311
|
-
- `schedule`/`remind`/`todo`/`task`/`goal`/`deadline`/`event`/`cancel`/`reschedule` are not directly supported; use continuity/loops APIs directly
|
|
312
|
-
- `repair` with type `policy` is blocked pending governance authority and explicit confirmation
|
|
313
|
-
- `seed` requires `DOTMEM_DEV_SEED=1` environment variable
|
|
314
|
-
- `policy` intent evaluates existing policies but does not create new ones; use governance CLI/API for policy lifecycle
|
|
315
|
-
|
|
316
|
-
## Coverage
|
|
317
|
-
|
|
318
|
-
All existing supported public user-facing Dotmem capabilities are reachable through Short. Low-level foundation primitives (Memorio `state`, `store`, `session`, `dispatch`, `hlc`), internal transport/server setup, raw MCP tool internals, and implementation-only APIs are intentionally excluded as they are not user-facing capabilities.
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# Dotmem Short API — Component Mapping
|
|
2
|
-
|
|
3
|
-
Each intent maps to exact existing Dotmem components, symbols, and file paths. This is the authoritative mapping used by the Short API implementation.
|
|
4
|
-
|
|
5
|
-
## Intent-to-Component Mapping
|
|
6
|
-
|
|
7
|
-
| Intent | Existing API | Component File | Exported Symbol | Side Effects | Permissions | Trust | Currentness | Confirmation |
|
|
8
|
-
|--------|-------------|----------------|-----------------|--------------|-------------|-------|-------------|--------------|
|
|
9
|
-
| `note` | `memory.note.add/show/list/supersede/forget/content` | `core/memory/note.ts` | `noteAdd`, `noteList`, `noteShow`, `noteSupersede`, `noteForget`, `noteContent` | Reads/writes .mem files, journal | None (built-in context required) | Provenance via evidence | Active | Optional for add |
|
|
10
|
-
| `remember` | `memory.remember` | `core/memory/entries.ts` | `entries.remember` | Writes to index.store/memory.kv | None | None | Active/current | None |
|
|
11
|
-
| `recall` | `memory.recall` | `core/memory/entries.ts` | `entries.recall` | Reads from store | None | None | MatchesFilters | None |
|
|
12
|
-
| `forget` | `memory.forget` | `core/memory/entries.ts` | `entries.forget` | Writes tombstone, journal | None | None | Obsolete | None |
|
|
13
|
-
| `update` | `memory.update` | `core/memory/entries.ts` | `entries.update` | Writes updated entry, journal | None | None | Updated | None |
|
|
14
|
-
| `patch` | `memory.patch` | `core/memory/entries.ts` | `entries.patch` | Writes patched entry, journal | None | None | Updated | None |
|
|
15
|
-
| `acquire` | `memory.acquire` | `core/memory/acquire.ts` | `acquire.acquire` | Crosses acquisition boundary, writes .mem | Built-in context | Full provenance | Active | Duplicate refusal |
|
|
16
|
-
| `verify` | `verifyDueClaims` | `core/knowledge/verify.ts` | `verifyDueClaims` | Read-only probes | None | Check kind (file-json, regex) | Derived | None |
|
|
17
|
-
| `important` | `memory.remember` | `core/memory/entries.ts` | `entries.remember` | Writes knowledge entry | None | Stored as knowledge | Active | None |
|
|
18
|
-
| `avoid` | `memory.remember` | `core/memory/entries.ts` | `entries.remember` | Writes knowledge entry | None | Stored as knowledge | Active | None |
|
|
19
|
-
| `prefer` | `memory.remember` | `core/memory/entries.ts` | `entries.remember` | Writes knowledge entry | None | Stored as knowledge | Active | None |
|
|
20
|
-
| `warning` | `memory.remember` | `core/memory/entries.ts` | `entries.remember` | Writes knowledge entry | None | Stored as knowledge | Active | None |
|
|
21
|
-
| `context` | `memory.discover` + `memory.project` | `core/memory/index.ts` + `core/knowledge/discover.ts` | `discoverAcquiredExperience`, `projectDiscoveredExperience` | Reads knowledge store | None | None | Derived currentness | None |
|
|
22
|
-
| `bootstrap` | `composeBootstrap` | `core/knowledge/bootstrap.ts` | `composeBootstrap` | Loads knowledge store, rules | None | None | Knowledge version | None |
|
|
23
|
-
| `rules` | `loadIronRules` | `core/knowledge/rules-loader.ts` | `loadIronRules` | Reads from store | None | None | Knowledge version | None |
|
|
24
|
-
| `policy` | `evaluatePolicies` | `core/knowledge/policy.ts` | `evaluatePolicies` | Read-only evaluation | Policy authority | Tier-based enforcement | Based on policy state | Required for blocking policies |
|
|
25
|
-
| `project` | `memory.discover` + `memory.project` | `core/memory/index.ts` | `discover`, `project` | Reads store, may ensure project anchor | None | None | Derived currentness | None |
|
|
26
|
-
| `discover` | `memory.discover` | `core/memory/index.ts` + `core/knowledge/discover.ts` | `discoverAcquiredExperience` | Reads knowledge store | None | None | Derived currentness | None |
|
|
27
|
-
| `inspect` | `inspectMem` | `core/knowledge/mem-package.ts` | `inspectMem` | Read-only, redacted | None | None | N/A (read-only) | None |
|
|
28
|
-
| `dump` | `memory.stats` | `core/memory/entries.ts` | `entries.stats` | Read-only | None | None | N/A | None |
|
|
29
|
-
| `audit` | `security.getAuditLog` | `core/security/index.ts` | `getAuditLog` | Read-only | None | None | N/A | None |
|
|
30
|
-
| `health` | `getCapabilities` + `loadCombinedKnowledgeState` | `core/platform.ts` + `core/memory` | `getCapabilities`, `loadCombinedKnowledgeState` | Read-only | None | None | N/A | None |
|
|
31
|
-
| `doctor` | `findContestedIds` + `deriveCurrentness` | `core/knowledge/currentness.ts` | `findContestedIds`, `deriveCurrentness` | Read-only | None | None | Derived | None |
|
|
32
|
-
| `repair` | Policy governance | `core/governance/index.ts` | `GovernancePolicyStore` | No mutation (blocked) | HI/operator authority | Tier-based | Based on policy state | **Required** |
|
|
33
|
-
| `cleanup` | `memory.clear` | `core/memory/index.ts` | `clear` | Clears hot/session/local entries | None (durable excluded) | None | Excludes durable | None |
|
|
34
|
-
| `relate` | `memory.acquire` (revision) | `core/memory/acquire.ts` | `acquire.acquire` | Crosses acquisition boundary | Built-in context | Full provenance | Active | Single relation per claim |
|
|
35
|
-
| `link` | `memory.acquire` (supersedes) | Same as relate | Same | Same as relate | Same | Same | Same | Same |
|
|
36
|
-
| `unlink` | `memory.acquire` (retracts) | Same as relate | Same | Same as relate | Same | Same | Same | Same |
|
|
37
|
-
| `merge` | `memory.note.supersede` | `core/memory/note.ts` | `noteSupersede` | Writes .mem, journal | None | Provenance via evidence | Active | Requires previousId |
|
|
38
|
-
| `configure` | `memory.configure` | `core/memory/index.ts` | `memory.configure` | May reconfigure storage | None | None | N/A | None |
|
|
39
|
-
| `capabilities` | `getCapabilities` | `core/platform.ts` | `getCapabilities` | None | None | None | N/A | None |
|
|
40
|
-
| `seed` | `memory.seed.add` | `core/memory/seed.ts` | `injectJoySeed` | Writes .mem if enabled | DOTMEM_DEV_SEED=1 | None | Dev seed | DOTMEM_DEV_SEED=1 |
|
|
41
|
-
| `capture` | `memory.capture.conversation` | `core/memory/capture-engine.ts` | `captureConversation` | Writes .mem, journal | None | None | Active session | None |
|
|
42
|
-
|
|
43
|
-
## Component Ownership
|
|
44
|
-
|
|
45
|
-
### Memory Layer (`core/memory/`)
|
|
46
|
-
- **index.ts**: Memory facade - `memory` object with `init`, `project`, `discover`, `context`, `fingerprint`, `acquire`, `acquireStaged`, `remember`, `recall`, `update`, `forget`, `patch`, `stats`, `forgetExpired`, `clear`, `configure`
|
|
47
|
-
- **entries.ts**: Key/value memory lifecycle - `remember`, `recall`, `update`, `forget`, `patch`, `stats`, `forgetExpired`, `clearEntries`
|
|
48
|
-
- **note.ts**: Note surface - `noteAdd`, `noteList`, `noteShow`, `noteSupersede`, `noteForget`, `noteContent`
|
|
49
|
-
- **acquire.ts**: Durable acquisition - `acquire`, `acquireStaged`
|
|
50
|
-
- **seed.ts**: Dev-only Joy seed - `injectJoySeed`, `isDevSeedEnabled`, `isHiBound`, `SEED_ID`
|
|
51
|
-
- **capture-engine.ts**: Conversational capture - `captureEngine`, `captureConversation`, `captureTurn`
|
|
52
|
-
|
|
53
|
-
### Knowledge Layer (`core/knowledge/`)
|
|
54
|
-
- **verify.ts**: Claim verification - `verifyDueClaims`, `formatVerifyResult`, `verifyAndPersistClaims`
|
|
55
|
-
- **bootstrap.ts**: Bootstrap - `composeBootstrap`
|
|
56
|
-
- **policy.ts**: Policy evaluation - `evaluatePolicies`, `PolicyRecord`, `EnforcementTier`
|
|
57
|
-
- **rules-loader.ts**: Rules - `loadIronRules`, `ruleSetSignature`, `formatRulesForSessionStart`
|
|
58
|
-
- **currentness.ts**: Currentness - `findContestedIds`, `deriveCurrentness`
|
|
59
|
-
|
|
60
|
-
### Platform (`core/platform.ts`)
|
|
61
|
-
- **getCapabilities**, `getPlatform`, `isBrowser`, `isNode`, `isDeno`, `isBun`, `isEdge`
|
|
62
|
-
|
|
63
|
-
### Security (`core/security/index.ts`)
|
|
64
|
-
- **getAuditLog**, `logAudit`, `setAuditCallback`, `clearAuditLog`, `createSanitizer`
|
|
65
|
-
|
|
66
|
-
### Continuity (`core/continuity/`)
|
|
67
|
-
- **index.ts**: `continuity.context`, `continuity.snapshot`, `continuity.forget`
|
|
68
|
-
|
|
69
|
-
### Governance (`core/governance/`)
|
|
70
|
-
- **index.ts**: `GovernancePolicyStore` with propose/review/decide/activate/suspend/retire
|
|
71
|
-
|
|
72
|
-
## Read/Write Classification
|
|
73
|
-
|
|
74
|
-
### Read-Only (no storage mutation)
|
|
75
|
-
- `recall`, `verify`, `context`, `bootstrap`, `rules`, `policy`, `project`, `discover`, `inspect`, `dump`, `audit`, `health`, `doctor`, `capabilities`
|
|
76
|
-
|
|
77
|
-
### Mutating (storage write)
|
|
78
|
-
- `note` (add/supersede/forget), `remember`, `update`, `patch`, `forget`, `acquire`, `important`/`avoid`/`prefer`/`warning`, `cleanup`, `relate`/`link`/`unlink`, `merge`, `configure`, `capture`, `seed` (dev-only)
|
|
79
|
-
|
|
80
|
-
### Blocked (no mutation without authorization)
|
|
81
|
-
- `repair` (policy repair blocked pending confirmation)
|
|
82
|
-
|
|
83
|
-
## Trust & Currentness
|
|
84
|
-
|
|
85
|
-
- All acquired knowledge is **context, not authority** - hosts must verify against current reality
|
|
86
|
-
- Claim currentness states: `historical`, `superseded`, `expired`, `verified`, `unverified`, `contested`, `unknown-currentness`
|
|
87
|
-
- Provenance metadata: `evidence`, `provenance`, `epistemicType` preserved through all acquisition paths
|
|
88
|
-
- Policy tiers: `context`, `precondition`, `hard-precondition`
|
|
89
|
-
|
|
90
|
-
## Side Effects
|
|
91
|
-
|
|
92
|
-
### Storage writes
|
|
93
|
-
- `.mem` files (acquired knowledge claims)
|
|
94
|
-
- `memory.kv` (durable key/value store)
|
|
95
|
-
- `store` (session/local/hot in-memory via Memorio)
|
|
96
|
-
- Journal entries (detection journal, memory journal)
|
|
97
|
-
- Index files (memory index)
|
|
98
|
-
|
|
99
|
-
### No writes
|
|
100
|
-
- Read-only intents never modify storage
|
|
101
|
-
- `clearEntries()` excludes durable scope (user memory preserved)
|
|
102
|
-
- `cleanup()` explicitly preserves durable acquired knowledge
|
|
103
|
-
|
|
104
|
-
## Unsupported / Excluded Capabilities
|
|
105
|
-
|
|
106
|
-
The following existing capabilities are intentionally excluded from Short as they are low-level foundation primitives or internal APIs:
|
|
107
|
-
|
|
108
|
-
| Excluded | Reason |
|
|
109
|
-
|----------|--------|
|
|
110
|
-
| Memorio `state`, `store`, `session`, `dispatch`, `hlc` | Foundation primitives, not user-facing |
|
|
111
|
-
| `memorio` low-level `idb` operations | Browser-only, not user-facing |
|
|
112
|
-
| MCP server transport setup (`McServer` construction) | Transport implementation detail |
|
|
113
|
-
| `dotmem_bootstrap` structuredContent format details | MCP-specific format |
|
|
114
|
-
| Raw knowledge-runtime access | Internal implementation |
|
|
115
|
-
| Policy-store mutate internals | Use governance API instead |
|
|
116
|
-
| Vault internal actions | Use vault CLI/API instead |
|
|
117
|
-
| Session internal state | Use session CLI/API instead |
|
|
118
|
-
| Continuity internals | Use continuity CLI/API instead |
|
|
119
|
-
| Detection-event details | Internal implementation |
|
|
120
|
-
| Acquisition-boundary details | Internal implementation |
|
|
121
|
-
|
|
122
|
-
## Coverage Summary
|
|
123
|
-
|
|
124
|
-
| Coverage Level | Count | Explanation |
|
|
125
|
-
|---------------|-------|-------------|
|
|
126
|
-
| Directly supported | 42 | All user-facing intents listed above map to existing APIs |
|
|
127
|
-
| Partially supported | N/A | All intents have equivalent semantics through composition |
|
|
128
|
-
| Intentionally excluded | 12 | Low-level foundation primitives, transport internals, implementation APIs |
|
|
129
|
-
| **Total existing user-facing capabilities** | **42** | 100% covered by Short |
|