@mrc2204/agent-smart-memo 5.0.2 → 5.1.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/README.md +209 -375
- package/bin/asm.mjs +365 -0
- package/bin/opencode-mcp-server.mjs +320 -0
- package/dist/core/contracts/adapter-contracts.d.ts +1 -1
- package/dist/core/contracts/adapter-contracts.d.ts.map +1 -1
- package/dist/core/contracts/change-overlay-contracts.d.ts +69 -0
- package/dist/core/contracts/change-overlay-contracts.d.ts.map +1 -0
- package/dist/core/contracts/change-overlay-contracts.js +2 -0
- package/dist/core/contracts/change-overlay-contracts.js.map +1 -0
- package/dist/core/contracts/feature-pack-contracts.d.ts +37 -0
- package/dist/core/contracts/feature-pack-contracts.d.ts.map +1 -0
- package/dist/core/contracts/feature-pack-contracts.js +8 -0
- package/dist/core/contracts/feature-pack-contracts.js.map +1 -0
- package/dist/core/contracts/project-query-contracts.d.ts +84 -0
- package/dist/core/contracts/project-query-contracts.d.ts.map +1 -0
- package/dist/core/contracts/project-query-contracts.js +2 -0
- package/dist/core/contracts/project-query-contracts.js.map +1 -0
- package/dist/core/graph/code-graph-model.d.ts +9 -0
- package/dist/core/graph/code-graph-model.d.ts.map +1 -0
- package/dist/core/graph/code-graph-model.js +70 -0
- package/dist/core/graph/code-graph-model.js.map +1 -0
- package/dist/core/graph/code-graph-populator.d.ts +20 -0
- package/dist/core/graph/code-graph-populator.d.ts.map +1 -0
- package/dist/core/graph/code-graph-populator.js +760 -0
- package/dist/core/graph/code-graph-populator.js.map +1 -0
- package/dist/core/graph/contracts.d.ts +29 -0
- package/dist/core/graph/contracts.d.ts.map +1 -0
- package/dist/core/graph/contracts.js +47 -0
- package/dist/core/graph/contracts.js.map +1 -0
- package/dist/core/ingest/contracts.d.ts +44 -0
- package/dist/core/ingest/contracts.d.ts.map +1 -0
- package/dist/core/ingest/contracts.js +2 -0
- package/dist/core/ingest/contracts.js.map +1 -0
- package/dist/core/ingest/ids.d.ts +5 -0
- package/dist/core/ingest/ids.d.ts.map +1 -0
- package/dist/core/ingest/ids.js +17 -0
- package/dist/core/ingest/ids.js.map +1 -0
- package/dist/core/ingest/ingest-pipeline.d.ts +4 -0
- package/dist/core/ingest/ingest-pipeline.d.ts.map +1 -0
- package/dist/core/ingest/ingest-pipeline.js +105 -0
- package/dist/core/ingest/ingest-pipeline.js.map +1 -0
- package/dist/core/ingest/semantic-block-extractor.d.ts +9 -0
- package/dist/core/ingest/semantic-block-extractor.d.ts.map +1 -0
- package/dist/core/ingest/semantic-block-extractor.js +171 -0
- package/dist/core/ingest/semantic-block-extractor.js.map +1 -0
- package/dist/core/usecases/default-memory-usecase-port.d.ts +38 -0
- package/dist/core/usecases/default-memory-usecase-port.d.ts.map +1 -1
- package/dist/core/usecases/default-memory-usecase-port.js +1686 -12
- package/dist/core/usecases/default-memory-usecase-port.js.map +1 -1
- package/dist/db/graph-db.d.ts +24 -0
- package/dist/db/graph-db.d.ts.map +1 -1
- package/dist/db/graph-db.js +81 -2
- package/dist/db/graph-db.js.map +1 -1
- package/dist/db/slot-db.d.ts +235 -2
- package/dist/db/slot-db.d.ts.map +1 -1
- package/dist/db/slot-db.js +840 -18
- package/dist/db/slot-db.js.map +1 -1
- package/dist/index.d.ts +7 -247
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -119
- package/dist/index.js.map +1 -1
- package/dist/shared/asm-config.d.ts +82 -0
- package/dist/shared/asm-config.d.ts.map +1 -0
- package/dist/shared/asm-config.js +254 -0
- package/dist/shared/asm-config.js.map +1 -0
- package/dist/shared/slotdb-path.d.ts +4 -3
- package/dist/shared/slotdb-path.d.ts.map +1 -1
- package/dist/shared/slotdb-path.js +15 -6
- package/dist/shared/slotdb-path.js.map +1 -1
- package/dist/tools/graph-tools.d.ts.map +1 -1
- package/dist/tools/graph-tools.js +131 -0
- package/dist/tools/graph-tools.js.map +1 -1
- package/dist/tools/project-tools.d.ts.map +1 -1
- package/dist/tools/project-tools.js +543 -0
- package/dist/tools/project-tools.js.map +1 -1
- package/openclaw.plugin.json +5 -164
- package/package.json +61 -26
- package/scripts/init-openclaw.mjs +727 -0
package/README.md
CHANGED
|
@@ -1,373 +1,270 @@
|
|
|
1
1
|
# Agent Smart Memo
|
|
2
2
|
|
|
3
|
-
> **ASM v5.1 super memory platform for
|
|
3
|
+
> **ASM v5.1** is a super memory platform for coding agents: **conversation memory + project memory + retrieval/control plane**, delivered through a single package and a CLI-first install flow.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`@mrc2204/agent-smart-memo` provides a project-aware memory layer that can be installed into multiple runtimes while keeping one shared memory/config model.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
Today ASM provides:
|
|
8
|
+
- conversation/runtime continuity
|
|
9
|
+
- structured slot memory
|
|
10
|
+
- semantic retrieval
|
|
11
|
+
- graph memory
|
|
12
|
+
- project registry + onboarding
|
|
13
|
+
- repo-aware indexing / reindexing
|
|
14
|
+
- lineage-aware engineering context retrieval
|
|
15
|
+
- CLI-based platform install flows for OpenClaw, Paperclip, and OpenCode
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
- a **project-aware engineering memory system**
|
|
19
|
-
- an **operator-friendly onboarding/runtime package**
|
|
17
|
+
This means ASM is best understood as:
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
> **a shared memory platform for coding agents, with OpenClaw as the primary runtime and Paperclip/OpenCode as supported adapters**
|
|
22
20
|
|
|
23
21
|
---
|
|
24
22
|
|
|
25
|
-
## 1)
|
|
23
|
+
## 1) Core mental model
|
|
26
24
|
|
|
27
|
-
ASM
|
|
25
|
+
ASM has 3 practical layers.
|
|
28
26
|
|
|
29
27
|
### A. Conversation memory
|
|
30
|
-
Used for
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
28
|
+
Used for runtime continuity:
|
|
29
|
+
- `memory_search`
|
|
30
|
+
- `memory_store`
|
|
31
|
+
- `memory_slot_*`
|
|
32
|
+
- `memory_graph_*`
|
|
33
|
+
- auto-capture / auto-recall
|
|
36
34
|
|
|
37
35
|
### B. Project memory
|
|
38
|
-
Used for engineering
|
|
39
|
-
- project registry
|
|
36
|
+
Used for engineering context:
|
|
37
|
+
- project registry
|
|
40
38
|
- repo root / repo remote identity
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
That is why ASM now acts as:
|
|
39
|
+
- project aliasing
|
|
40
|
+
- Jira linkage
|
|
41
|
+
- onboarding + index triggers
|
|
42
|
+
- lifecycle-aware retrieval boundaries
|
|
47
43
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## 2) What ASM v5.1 provides today
|
|
53
|
-
|
|
54
|
-
ASM-69 and follow-up waves expanded the system from memory-only into project-aware memory orchestration.
|
|
55
|
-
|
|
56
|
-
### Project-aware memory model
|
|
57
|
-
Agents can now reason about:
|
|
58
|
-
- `project_id`
|
|
59
|
-
- project alias
|
|
60
|
-
- `repo_root`
|
|
61
|
-
- `repo_remote`
|
|
62
|
-
- Jira space / epic mapping
|
|
63
|
-
- registration / validation state
|
|
64
|
-
|
|
65
|
-
### Ingest + semantic block extraction
|
|
66
|
-
Codebases can be transformed into retrievable structures using:
|
|
67
|
-
- file planning
|
|
68
|
-
- semantic block extraction
|
|
69
|
-
- deterministic file/chunk/symbol IDs
|
|
70
|
-
- diff-aware indexing primitives
|
|
71
|
-
|
|
72
|
-
### Incremental reindex
|
|
73
|
-
Instead of rebuilding everything blindly, ASM now supports:
|
|
74
|
-
- changed / unchanged / deleted diffing
|
|
75
|
-
- watch-state snapshotting
|
|
76
|
-
- checksum-driven reindex control
|
|
77
|
-
- background-friendly trigger flow
|
|
78
|
-
|
|
79
|
-
### Hybrid retrieval + task lineage
|
|
80
|
-
ASM is not just vector search anymore.
|
|
81
|
-
It can combine:
|
|
44
|
+
### C. Retrieval/control plane
|
|
45
|
+
Used to assemble better context for coding agents:
|
|
82
46
|
- semantic recall
|
|
83
|
-
- lexical/project
|
|
84
|
-
- file/symbol/task
|
|
85
|
-
-
|
|
47
|
+
- lexical/project filtering
|
|
48
|
+
- file/symbol/task lineage
|
|
49
|
+
- deterministic project-aware retrieval
|
|
50
|
+
- platform install / bootstrap flows
|
|
86
51
|
|
|
87
|
-
|
|
88
|
-
Operators can onboard a project with repo + alias + Jira mapping + optional index trigger using project-aware command flows.
|
|
52
|
+
If you only remember one sentence, remember this:
|
|
89
53
|
|
|
90
|
-
|
|
91
|
-
OpenClaw setup is now easier through the global CLI:
|
|
92
|
-
- `asm setup-openclaw`
|
|
93
|
-
- `asm setup openclaw`
|
|
94
|
-
- legacy-compatible `npm run init-openclaw`
|
|
54
|
+
> **ASM is a super memory platform for coding agents: conversation memory + project memory + runtime delivery in one package.**
|
|
95
55
|
|
|
96
56
|
---
|
|
97
57
|
|
|
98
|
-
##
|
|
58
|
+
## 2) Runtime targets
|
|
99
59
|
|
|
100
|
-
|
|
60
|
+
### OpenClaw
|
|
61
|
+
Primary target today.
|
|
101
62
|
|
|
102
|
-
### OpenClaw runtime/plugin layer
|
|
103
63
|
Includes:
|
|
104
|
-
- plugin entry
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
- setup/bootstrap CLI flow
|
|
64
|
+
- OpenClaw plugin entry
|
|
65
|
+
- tools / hooks / runtime wiring
|
|
66
|
+
- CLI bootstrap flow
|
|
67
|
+
- shared ASM config integration
|
|
109
68
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- graph/registry logic
|
|
115
|
-
- shared contracts and runtime abstractions
|
|
116
|
-
|
|
117
|
-
### Project-aware engineering memory layer
|
|
118
|
-
Includes:
|
|
119
|
-
- project registry
|
|
120
|
-
- onboarding use-cases
|
|
121
|
-
- tracker mapping
|
|
122
|
-
- indexing/reindexing primitives
|
|
123
|
-
- lineage-aware retrieval
|
|
124
|
-
|
|
125
|
-
So the best mental model is:
|
|
126
|
-
|
|
127
|
-
> **an OpenClaw-delivered super memory platform with both conversation memory and project memory**
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## 4) Runtime targets
|
|
132
|
-
|
|
133
|
-
### OpenClaw target
|
|
134
|
-
Use this when you want ASM as the main OpenClaw memory/runtime plugin.
|
|
135
|
-
|
|
136
|
-
Contains:
|
|
137
|
-
- core memory platform
|
|
138
|
-
- OpenClaw adapter
|
|
139
|
-
- plugin entry / hooks / tool registration
|
|
140
|
-
- operator onboarding command surfaces
|
|
141
|
-
|
|
142
|
-
Artifact intent:
|
|
143
|
-
- **OpenClaw plugin artifact**
|
|
144
|
-
|
|
145
|
-
### Paperclip target
|
|
146
|
-
Use this when you want Paperclip to consume the same shared memory core/runtime behavior.
|
|
147
|
-
|
|
148
|
-
Contains:
|
|
149
|
-
- core memory platform
|
|
150
|
-
- Paperclip adapter/runtime wrapper
|
|
151
|
-
- compatibility mapping
|
|
152
|
-
|
|
153
|
-
Artifact intent:
|
|
154
|
-
- **Paperclip runtime package**
|
|
155
|
-
|
|
156
|
-
### Core target
|
|
157
|
-
Use this when you want the shared contracts/use-cases without OpenClaw/Paperclip-specific delivery.
|
|
158
|
-
|
|
159
|
-
Contains:
|
|
160
|
-
- shared contracts
|
|
161
|
-
- shared use-cases
|
|
162
|
-
- shared memory/platform rules
|
|
69
|
+
Install:
|
|
70
|
+
```bash
|
|
71
|
+
asm install openclaw
|
|
72
|
+
```
|
|
163
73
|
|
|
164
|
-
|
|
165
|
-
|
|
74
|
+
### Paperclip
|
|
75
|
+
Uses the same shared memory core through a Paperclip adapter.
|
|
166
76
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
77
|
+
Install:
|
|
78
|
+
```bash
|
|
79
|
+
asm install paperclip
|
|
80
|
+
```
|
|
170
81
|
|
|
171
|
-
###
|
|
172
|
-
|
|
173
|
-
- `memory_store`
|
|
174
|
-
- `memory_slot_get`
|
|
175
|
-
- `memory_slot_set`
|
|
176
|
-
- `memory_slot_delete`
|
|
177
|
-
- `memory_slot_list`
|
|
178
|
-
- `memory_graph_*`
|
|
179
|
-
- auto-capture / auto-recall
|
|
82
|
+
### OpenCode
|
|
83
|
+
Uses the same package and shared config, with MCP/local runtime wiring.
|
|
180
84
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
- `project.link_tracker`
|
|
186
|
-
- `project.trigger_index`
|
|
187
|
-
- `project.reindex_diff`
|
|
188
|
-
- `project.index_watch_get`
|
|
189
|
-
- `project.legacy_backfill`
|
|
190
|
-
- Telegram/operator onboarding surfaces
|
|
191
|
-
|
|
192
|
-
### Retrieval/engineering context capabilities
|
|
193
|
-
- semantic retrieval
|
|
194
|
-
- lexical/project filtering
|
|
195
|
-
- project-aware context assembly
|
|
196
|
-
- file / symbol / task lineage
|
|
197
|
-
- repo-aware indexing and reindexing
|
|
85
|
+
Install:
|
|
86
|
+
```bash
|
|
87
|
+
asm install opencode
|
|
88
|
+
```
|
|
198
89
|
|
|
199
90
|
---
|
|
200
91
|
|
|
201
|
-
##
|
|
202
|
-
|
|
203
|
-
The preferred setup path is the global CLI.
|
|
92
|
+
## 3) Install ASM
|
|
204
93
|
|
|
205
|
-
###
|
|
94
|
+
### Global install
|
|
206
95
|
```bash
|
|
207
96
|
npm install -g @mrc2204/agent-smart-memo
|
|
208
97
|
```
|
|
209
98
|
|
|
210
|
-
###
|
|
99
|
+
### Initialize shared ASM config
|
|
211
100
|
```bash
|
|
212
|
-
asm setup
|
|
101
|
+
asm init-setup --yes
|
|
213
102
|
```
|
|
214
103
|
|
|
215
|
-
|
|
216
|
-
```
|
|
217
|
-
asm
|
|
104
|
+
This creates or updates:
|
|
105
|
+
```text
|
|
106
|
+
~/.config/asm/config.json
|
|
218
107
|
```
|
|
219
108
|
|
|
220
|
-
|
|
109
|
+
### Install into a platform
|
|
221
110
|
```bash
|
|
222
|
-
|
|
111
|
+
asm install openclaw
|
|
112
|
+
asm install paperclip
|
|
113
|
+
asm install opencode
|
|
223
114
|
```
|
|
224
115
|
|
|
225
|
-
|
|
226
|
-
1. checks that `openclaw` CLI exists
|
|
227
|
-
2. installs `@mrc2204/agent-smart-memo` if missing
|
|
228
|
-
3. runs OpenClaw bootstrap/init flow
|
|
229
|
-
4. patches config with preview + backup behavior
|
|
230
|
-
5. prints next-step verification guidance
|
|
116
|
+
Legacy compatibility still exists for older OpenClaw flows, but the preferred path is now:
|
|
231
117
|
|
|
232
|
-
|
|
118
|
+
```text
|
|
119
|
+
asm init-setup -> asm install <platform>
|
|
120
|
+
```
|
|
233
121
|
|
|
234
122
|
---
|
|
235
123
|
|
|
236
|
-
##
|
|
124
|
+
## 4) Shared config source-of-truth
|
|
125
|
+
|
|
126
|
+
ASM now uses a shared config model.
|
|
127
|
+
|
|
128
|
+
### Canonical shared config
|
|
129
|
+
```text
|
|
130
|
+
~/.config/asm/config.json
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### What lives there
|
|
134
|
+
Core fields such as:
|
|
135
|
+
- `projectWorkspaceRoot`
|
|
136
|
+
- `storage.slotDbDir`
|
|
137
|
+
- `qdrantHost`
|
|
138
|
+
- `qdrantPort`
|
|
139
|
+
- `qdrantCollection`
|
|
140
|
+
- `qdrantVectorSize`
|
|
141
|
+
- `llmBaseUrl`
|
|
142
|
+
- `llmApiKey`
|
|
143
|
+
- `llmModel`
|
|
144
|
+
- `embedBaseUrl`
|
|
145
|
+
- `embedBackend`
|
|
146
|
+
- `embedModel`
|
|
147
|
+
- `embedDimensions`
|
|
148
|
+
- `autoCaptureEnabled`
|
|
149
|
+
- `autoCaptureMinConfidence`
|
|
150
|
+
- `contextWindowMaxTokens`
|
|
151
|
+
- `summarizeEveryActions`
|
|
152
|
+
|
|
153
|
+
### Platform-local config
|
|
154
|
+
Platform config should stay minimal.
|
|
155
|
+
|
|
156
|
+
For OpenClaw, `~/.openclaw/openclaw.json` should mainly keep:
|
|
157
|
+
- `enabled`
|
|
158
|
+
- `asmConfigPath`
|
|
159
|
+
- adapter-local overrides only when truly needed
|
|
160
|
+
|
|
161
|
+
Example OpenClaw plugin entry:
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"enabled": true,
|
|
166
|
+
"config": {
|
|
167
|
+
"asmConfigPath": "/Users/your-user/.config/asm/config.json",
|
|
168
|
+
"slotDbDir": "/Users/your-user/.openclaw/agent-memo",
|
|
169
|
+
"projectWorkspaceRoot": "/Users/your-user/Work/projects"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
This keeps `openclaw.json` from becoming a second core source-of-truth.
|
|
175
|
+
|
|
176
|
+
---
|
|
237
177
|
|
|
238
|
-
|
|
178
|
+
## 5) OpenClaw quick start
|
|
239
179
|
|
|
240
|
-
### Install
|
|
180
|
+
### Install from npm
|
|
241
181
|
```bash
|
|
242
|
-
|
|
182
|
+
npm install -g @mrc2204/agent-smart-memo
|
|
183
|
+
asm init-setup --yes
|
|
184
|
+
asm install openclaw --yes
|
|
243
185
|
```
|
|
244
186
|
|
|
245
|
-
###
|
|
187
|
+
### Install locally from source
|
|
246
188
|
```bash
|
|
247
189
|
npm install
|
|
248
190
|
npm run build
|
|
249
|
-
|
|
191
|
+
node bin/asm.mjs init-setup --yes
|
|
192
|
+
node bin/asm.mjs install openclaw --yes
|
|
250
193
|
```
|
|
251
194
|
|
|
252
|
-
###
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
| Qdrant | Semantic/vector memory | `docker run -d -p 6333:6333 qdrant/qdrant` |
|
|
258
|
-
| Embedding backend | Embeddings for semantic recall | Ollama / OpenAI-compatible / docker adapter |
|
|
259
|
-
| LLM endpoint | Fact extraction / auto-capture | OpenAI-compatible API |
|
|
260
|
-
|
|
261
|
-
### Example OpenClaw config
|
|
262
|
-
Add to `~/.openclaw/openclaw.json`:
|
|
263
|
-
|
|
264
|
-
```json5
|
|
265
|
-
{
|
|
266
|
-
plugins: {
|
|
267
|
-
allow: ["agent-smart-memo"],
|
|
268
|
-
slots: {
|
|
269
|
-
memory: "agent-smart-memo"
|
|
270
|
-
},
|
|
271
|
-
entries: {
|
|
272
|
-
"agent-smart-memo": {
|
|
273
|
-
enabled: true,
|
|
274
|
-
config: {
|
|
275
|
-
qdrantHost: "localhost",
|
|
276
|
-
qdrantPort: 6333,
|
|
277
|
-
qdrantCollection: "openclaw_memory",
|
|
278
|
-
|
|
279
|
-
llmBaseUrl: "https://api.openai.com/v1",
|
|
280
|
-
llmApiKey: "sk-...",
|
|
281
|
-
llmModel: "gpt-4o-mini",
|
|
282
|
-
|
|
283
|
-
embedBaseUrl: "http://localhost:11434",
|
|
284
|
-
embedBackend: "ollama",
|
|
285
|
-
embedModel: "qwen3-embedding:0.6b",
|
|
286
|
-
embedDimensions: 1024,
|
|
287
|
-
|
|
288
|
-
slotDbDir: "/Users/your-user/.openclaw/agent-memo"
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
195
|
+
### Verification
|
|
196
|
+
```bash
|
|
197
|
+
npm run test:asm-cli
|
|
198
|
+
npx tsx tests/test-init-openclaw.ts
|
|
199
|
+
npm run build:openclaw
|
|
294
200
|
```
|
|
295
201
|
|
|
296
202
|
---
|
|
297
203
|
|
|
298
|
-
##
|
|
204
|
+
## 6) Project-aware onboarding flow
|
|
299
205
|
|
|
300
|
-
|
|
206
|
+
ASM supports operator-friendly project onboarding.
|
|
301
207
|
|
|
208
|
+
### Telegram/OpenClaw command
|
|
302
209
|
```text
|
|
303
210
|
/project <repo_url>
|
|
304
211
|
```
|
|
305
212
|
|
|
306
|
-
### Current behavior
|
|
307
|
-
-
|
|
308
|
-
-
|
|
309
|
-
-
|
|
310
|
-
-
|
|
311
|
-
-
|
|
312
|
-
- `accepted`
|
|
313
|
-
- `enqueued`
|
|
314
|
-
- `detached`
|
|
315
|
-
- `job_id`
|
|
316
|
-
|
|
317
|
-
### Typical onboarding path
|
|
318
|
-
1. operator starts with `/project <repo_url>`
|
|
319
|
-
2. bot prepares preview
|
|
320
|
-
3. preview shows alias/Jira/index choices and repo resolution hints
|
|
321
|
-
4. operator confirms
|
|
322
|
-
5. flow bridges into:
|
|
323
|
-
- `project_register_command`
|
|
324
|
-
- `project_link_tracker`
|
|
325
|
-
- `project_trigger_index`
|
|
326
|
-
|
|
327
|
-
See also:
|
|
328
|
-
- `docs/architecture/ASM-74-master-project-registration-ux-command-contract-jira-mapping-v5.1.md`
|
|
329
|
-
- `tests/test-project-registry.ts`
|
|
213
|
+
### Current behavior
|
|
214
|
+
- resolves repo path/identity when possible
|
|
215
|
+
- supports local path import without forced clone
|
|
216
|
+
- can reuse an already-registered remote/project identity
|
|
217
|
+
- can attach Jira mapping
|
|
218
|
+
- can trigger background index flow
|
|
330
219
|
|
|
331
|
-
|
|
220
|
+
Typical path:
|
|
221
|
+
1. operator runs `/project <repo_url>`
|
|
222
|
+
2. preview shows resolved repo + onboarding choices
|
|
223
|
+
3. operator confirms
|
|
224
|
+
4. ASM bridges into register / tracker-link / index flow
|
|
332
225
|
|
|
333
|
-
|
|
226
|
+
Relevant areas in the repo include:
|
|
227
|
+
- project registry
|
|
228
|
+
- onboarding command flows
|
|
229
|
+
- background indexing hooks
|
|
230
|
+
- lineage-aware retrieval tests
|
|
334
231
|
|
|
335
|
-
|
|
232
|
+
---
|
|
336
233
|
|
|
337
|
-
|
|
338
|
-
```bash
|
|
339
|
-
npm install
|
|
340
|
-
npm run build:paperclip
|
|
341
|
-
npm run package:paperclip
|
|
342
|
-
npm run pack:paperclip
|
|
343
|
-
```
|
|
234
|
+
## 7) Capability overview
|
|
344
235
|
|
|
345
|
-
###
|
|
346
|
-
|
|
347
|
-
-
|
|
348
|
-
-
|
|
349
|
-
-
|
|
236
|
+
### Memory capabilities
|
|
237
|
+
- `memory_search`
|
|
238
|
+
- `memory_store`
|
|
239
|
+
- `memory_slot_get`
|
|
240
|
+
- `memory_slot_set`
|
|
241
|
+
- `memory_slot_delete`
|
|
242
|
+
- `memory_slot_list`
|
|
243
|
+
- `memory_graph_*`
|
|
350
244
|
|
|
351
|
-
###
|
|
352
|
-
|
|
353
|
-
-
|
|
354
|
-
-
|
|
355
|
-
-
|
|
356
|
-
-
|
|
245
|
+
### Project capabilities
|
|
246
|
+
- project register / list / inspect flows
|
|
247
|
+
- project tracker linking
|
|
248
|
+
- project indexing / reindexing
|
|
249
|
+
- lifecycle-aware retrieval gating
|
|
250
|
+
- hybrid lineage context retrieval
|
|
357
251
|
|
|
358
|
-
|
|
252
|
+
### Platform/operations capabilities
|
|
253
|
+
- shared config bootstrap
|
|
254
|
+
- OpenClaw install flow
|
|
255
|
+
- Paperclip install flow
|
|
256
|
+
- OpenCode install flow
|
|
257
|
+
- build/package/publish targets
|
|
359
258
|
|
|
360
259
|
---
|
|
361
260
|
|
|
362
|
-
##
|
|
261
|
+
## 8) Build targets
|
|
363
262
|
|
|
364
263
|
### Default build
|
|
365
264
|
```bash
|
|
366
265
|
npm run build
|
|
367
266
|
```
|
|
368
267
|
|
|
369
|
-
Default build remains **OpenClaw-compatible** for backward compatibility.
|
|
370
|
-
|
|
371
268
|
### Explicit targets
|
|
372
269
|
```bash
|
|
373
270
|
npm run build:openclaw
|
|
@@ -390,141 +287,78 @@ npm run pack:paperclip
|
|
|
390
287
|
npm run pack:core
|
|
391
288
|
```
|
|
392
289
|
|
|
393
|
-
### Publish targets
|
|
394
|
-
```bash
|
|
395
|
-
npm run publish:openclaw
|
|
396
|
-
npm run publish:paperclip
|
|
397
|
-
npm run publish:core
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
> Publish requires valid npm authentication. If `NPM_TOKEN` is missing, publish should be treated as not ready / dry-run only.
|
|
401
|
-
|
|
402
290
|
---
|
|
403
291
|
|
|
404
|
-
##
|
|
405
|
-
|
|
406
|
-
GitHub Actions workflow: `.github/workflows/publish.yml`
|
|
407
|
-
|
|
408
|
-
Current flow:
|
|
409
|
-
- matrix build for `openclaw`, `paperclip`, `core`
|
|
410
|
-
- build → package → pack `.tgz` → upload artifact
|
|
411
|
-
- target-aware tests
|
|
412
|
-
- `workflow_dispatch` for manual publish
|
|
413
|
-
- `dry_run` supported
|
|
414
|
-
- real publish gated by `NPM_TOKEN`
|
|
292
|
+
## 9) Verification
|
|
415
293
|
|
|
416
|
-
###
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
- dry-run readiness
|
|
421
|
-
|
|
422
|
-
It is **not** the same as:
|
|
423
|
-
- production deploy
|
|
424
|
-
- final release approval
|
|
425
|
-
- final npm publish approval
|
|
426
|
-
|
|
427
|
-
Recommended flow:
|
|
428
|
-
|
|
429
|
-
```text
|
|
430
|
-
work/... push -> CI checks -> PR review -> approve -> merge default branch -> publish/release/deploy
|
|
294
|
+
### CLI / installer verification
|
|
295
|
+
```bash
|
|
296
|
+
npm run test:asm-cli
|
|
297
|
+
npx tsx tests/test-init-openclaw.ts
|
|
431
298
|
```
|
|
432
299
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
## 12) Configuration notes
|
|
436
|
-
|
|
437
|
-
### Embedding backend mapping
|
|
438
|
-
When `embedBackend` is set:
|
|
439
|
-
- `ollama` → `/api/embeddings`
|
|
440
|
-
- `docker` → `/engines/llama.cpp/v1/embeddings`
|
|
441
|
-
- `openai` → `/v1/embeddings`
|
|
442
|
-
|
|
443
|
-
If omitted, legacy auto behavior is preserved.
|
|
444
|
-
|
|
445
|
-
### SlotDB path resolution
|
|
446
|
-
Resolution order:
|
|
447
|
-
1. `OPENCLAW_SLOTDB_DIR`
|
|
448
|
-
2. plugin config `slotDbDir`
|
|
449
|
-
3. `${OPENCLAW_STATE_DIR}/agent-memo`
|
|
450
|
-
|
|
451
|
-
---
|
|
452
|
-
|
|
453
|
-
## 13) Verification levels
|
|
454
|
-
|
|
455
|
-
### Build level
|
|
456
|
-
Confirms code compiles:
|
|
457
|
-
|
|
300
|
+
### OpenClaw verification
|
|
458
301
|
```bash
|
|
459
|
-
npm run
|
|
460
|
-
npm run build:
|
|
302
|
+
npm run test:openclaw
|
|
303
|
+
npm run build:openclaw
|
|
461
304
|
```
|
|
462
305
|
|
|
463
|
-
###
|
|
306
|
+
### Paperclip verification
|
|
464
307
|
```bash
|
|
465
|
-
npm test
|
|
466
|
-
npm run test:openclaw
|
|
467
308
|
npm run test:paperclip
|
|
309
|
+
npm run build:paperclip
|
|
468
310
|
```
|
|
469
311
|
|
|
470
312
|
### Project-aware targeted verification
|
|
471
313
|
```bash
|
|
472
314
|
npx tsx tests/test-project-registry.ts
|
|
473
|
-
npx tsx tests/test-project-reindex-diff.ts
|
|
474
315
|
npx tsx tests/test-project-hybrid-lineage.ts
|
|
475
|
-
npx tsx tests/test-project-legacy-backfill.ts
|
|
476
316
|
```
|
|
477
317
|
|
|
478
|
-
### Production-like runtime verification
|
|
479
|
-
Examples already added in this repo include:
|
|
480
|
-
- Paperclip runtime E2E
|
|
481
|
-
- OpenClaw anti-regression integration
|
|
482
|
-
- production-like smoke parity harness
|
|
483
|
-
|
|
484
318
|
---
|
|
485
319
|
|
|
486
|
-
##
|
|
320
|
+
## 10) Repository layout
|
|
487
321
|
|
|
488
322
|
```text
|
|
489
323
|
src/
|
|
324
|
+
adapters/
|
|
325
|
+
openclaw/
|
|
326
|
+
paperclip/
|
|
490
327
|
core/
|
|
491
328
|
contracts/
|
|
492
329
|
usecases/
|
|
493
330
|
ingest/
|
|
494
|
-
|
|
495
|
-
openclaw/
|
|
496
|
-
paperclip/
|
|
497
|
-
tools/
|
|
331
|
+
db/
|
|
498
332
|
hooks/
|
|
499
|
-
entries/
|
|
500
333
|
services/
|
|
501
|
-
db/
|
|
502
334
|
shared/
|
|
335
|
+
tools/
|
|
503
336
|
|
|
337
|
+
bin/
|
|
504
338
|
scripts/
|
|
339
|
+
docs/
|
|
505
340
|
artifacts/
|
|
506
|
-
|
|
341
|
+
tests/
|
|
507
342
|
```
|
|
508
343
|
|
|
509
344
|
---
|
|
510
345
|
|
|
511
|
-
##
|
|
346
|
+
## 11) Current positioning
|
|
512
347
|
|
|
513
|
-
|
|
348
|
+
A good public-facing description for this repo is:
|
|
514
349
|
|
|
515
|
-
> **
|
|
350
|
+
> **Agent Smart Memo is a project-aware super memory platform for coding agents, shipped as one package with CLI-first installation for OpenClaw, Paperclip, and OpenCode.**
|
|
516
351
|
|
|
517
352
|
It helps agents:
|
|
518
|
-
- remember
|
|
519
|
-
- store
|
|
520
|
-
-
|
|
353
|
+
- remember conversation/runtime state
|
|
354
|
+
- store and retrieve structured + semantic knowledge
|
|
355
|
+
- onboard and map projects
|
|
521
356
|
- index and reindex repos
|
|
522
|
-
-
|
|
523
|
-
-
|
|
524
|
-
- bootstrap OpenClaw faster through the CLI
|
|
357
|
+
- assemble better engineering context
|
|
358
|
+
- reuse one shared config and one shared memory core across runtimes
|
|
525
359
|
|
|
526
360
|
---
|
|
527
361
|
|
|
528
|
-
##
|
|
362
|
+
## 12) License
|
|
529
363
|
|
|
530
364
|
MIT © [mrc2204](https://github.com/cong91)
|