@agenr/openclaw-plugin 0.10.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.
@@ -0,0 +1,159 @@
1
+ {
2
+ "id": "agenr",
3
+ "name": "agenr Memory",
4
+ "description": "Local memory layer - injects agenr context at session start",
5
+ "skills": [
6
+ "skills"
7
+ ],
8
+ "configSchema": {
9
+ "type": "object",
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "budget": {
13
+ "type": "number",
14
+ "description": "Token budget for session-start recall. Default: 2000."
15
+ },
16
+ "sessionStartBudgetChars": {
17
+ "type": "number",
18
+ "description": "Hard cap for total injected session-start context characters. Default: 12000.",
19
+ "minimum": 1
20
+ },
21
+ "project": {
22
+ "type": "string",
23
+ "description": "Project scope for recall and store. Omit for global (default)."
24
+ },
25
+ "enabled": {
26
+ "type": "boolean",
27
+ "description": "Set false to disable memory injection without uninstalling."
28
+ },
29
+ "debug": {
30
+ "type": "boolean",
31
+ "description": "Enable debug logging to stderr (default: false)."
32
+ },
33
+ "signalMinImportance": {
34
+ "type": "number",
35
+ "description": "Minimum importance for mid-session signals (1-10, default: 8). Raise to reduce noise."
36
+ },
37
+ "signalMaxPerSignal": {
38
+ "type": "number",
39
+ "description": "Max entries per signal notification (default: 3)."
40
+ },
41
+ "signalCooldownMs": {
42
+ "type": "number",
43
+ "description": "Minimum ms between signal batches per session (default: 30000). Set 0 to disable cooldown."
44
+ },
45
+ "signalMaxPerSession": {
46
+ "type": "number",
47
+ "description": "Max total signal batches delivered per session lifetime (default: 10). Set 0 to disable."
48
+ },
49
+ "signalMaxAgeSec": {
50
+ "type": "number",
51
+ "description": "Only surface entries created within last N seconds (default: 300). Set 0 to disable age filter."
52
+ },
53
+ "signalsEnabled": {
54
+ "type": "boolean",
55
+ "description": "Set false to disable mid-session signals without uninstalling."
56
+ },
57
+ "midSessionRecall": {
58
+ "type": "object",
59
+ "description": "Mid-session recall tuning and controls.",
60
+ "additionalProperties": false,
61
+ "properties": {
62
+ "enabled": {
63
+ "type": "boolean",
64
+ "description": "Set false to disable heuristic-gated mid-session recall (default: true)."
65
+ },
66
+ "normalLimit": {
67
+ "type": "number",
68
+ "description": "Max recall results for normal messages (default: 5)."
69
+ },
70
+ "complexLimit": {
71
+ "type": "number",
72
+ "description": "Max recall results for complex messages (default: 8)."
73
+ },
74
+ "querySimilarityThreshold": {
75
+ "type": "number",
76
+ "description": "Skip repeat recall when query Jaccard similarity exceeds this value (default: 0.85)."
77
+ },
78
+ "limit": {
79
+ "type": "number",
80
+ "description": "Max recall results per mid-session query (default: 8). Overrides normalLimit/complexLimit."
81
+ },
82
+ "injectMax": {
83
+ "type": "number",
84
+ "description": "Max entries to directly inject in hybrid mode (default: 2). Remaining matches generate a nudge."
85
+ },
86
+ "mode": {
87
+ "type": "string",
88
+ "enum": ["hybrid", "inject", "nudge"],
89
+ "description": "Mid-session recall mode: hybrid (inject top + nudge rest, default), inject (inject all, legacy), nudge (nudge only, no injection)."
90
+ }
91
+ }
92
+ },
93
+ "openclawMemoryDoctrine": {
94
+ "type": "object",
95
+ "description": "Stable agenr-first doctrine injected with prependSystemContext.",
96
+ "additionalProperties": false,
97
+ "properties": {
98
+ "enabled": {
99
+ "type": "boolean",
100
+ "description": "Set false to disable stable doctrine injection while preserving dynamic prependContext memory injection."
101
+ }
102
+ }
103
+ },
104
+ "dbPath": {
105
+ "type": "string",
106
+ "description": "Path to agenr DB. Defaults to AGENR_DB_PATH env or ~/.agenr/knowledge.db."
107
+ },
108
+ "sessionsDir": {
109
+ "type": "string",
110
+ "description": "Path to OpenClaw sessions directory. Defaults to ~/.openclaw/agents/{agentId}/sessions."
111
+ },
112
+ "handoff": {
113
+ "type": "object",
114
+ "description": "Handoff summarizer options.",
115
+ "additionalProperties": false,
116
+ "properties": {
117
+ "includeBackground": {
118
+ "type": "boolean",
119
+ "description": "Include prior session as background context in handoff summary (default: false)."
120
+ },
121
+ "logEnabled": {
122
+ "type": "boolean",
123
+ "description": "Enable writing handoff LLM request/response logs to logDir (default: false)."
124
+ },
125
+ "logDir": {
126
+ "type": "string",
127
+ "description": "Directory to write handoff LLM request/response logs for debugging. Requires logEnabled: true."
128
+ }
129
+ }
130
+ },
131
+ "storeNudge": {
132
+ "type": "object",
133
+ "description": "Store nudge configuration.",
134
+ "properties": {
135
+ "enabled": {
136
+ "type": "boolean",
137
+ "description": "Set false to disable store nudging (default: true)."
138
+ },
139
+ "threshold": {
140
+ "type": "number",
141
+ "description": "Turns without agenr_store before nudging (default: 8)."
142
+ },
143
+ "maxPerSession": {
144
+ "type": "number",
145
+ "description": "Max nudges per session (default: 5)."
146
+ }
147
+ },
148
+ "additionalProperties": false
149
+ },
150
+ "coreProjects": {
151
+ "type": "array",
152
+ "items": {
153
+ "type": "string"
154
+ },
155
+ "description": "Project names whose core entries are always injected at session start. Empty list or omit to skip core injection."
156
+ }
157
+ }
158
+ }
159
+ }
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@agenr/openclaw-plugin",
3
+ "version": "0.10.1",
4
+ "description": "agenr memory plugin for OpenClaw — lightweight plugin-only package without the CLI",
5
+ "license": "AGPL-3.0",
6
+ "author": "agenr-ai",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/agenr-ai/agenr.git"
10
+ },
11
+ "type": "module",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.js",
15
+ "types": "./dist/index.d.ts"
16
+ }
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "skills",
21
+ "openclaw.plugin.json",
22
+ "CHANGELOG.md",
23
+ "LICENSE",
24
+ "README.md"
25
+ ],
26
+ "dependencies": {
27
+ "@libsql/client": "^0.17.0",
28
+ "@mariozechner/pi-ai": "^0.55.3",
29
+ "@sinclair/typebox": "^0.34.48"
30
+ },
31
+ "keywords": [
32
+ "agenr",
33
+ "openclaw",
34
+ "memory",
35
+ "plugin"
36
+ ]
37
+ }
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: agenr
3
+ description: Use when storing new knowledge (decisions, preferences, lessons, todos) or recalling context mid-session. The agenr plugin auto-injects memory at session start - this skill covers proactive store and on-demand recall.
4
+ ---
5
+
6
+ ## agenr_store
7
+
8
+ Use proactively. Call immediately after any decision, user preference, lesson learned, important event, or fact worth remembering. Do not ask first.
9
+
10
+ Required: `type`, `content`, `importance`.
11
+ Optional: `subject` (short label), `tags` (array), `scope` (`private`|`personal`|`public`), `project`, `platform`, `source`.
12
+
13
+ Types: `fact | decision | preference | todo | lesson | event | relationship`
14
+ Do not store secrets/credentials, temporary state, or verbatim conversation.
15
+
16
+ ### Importance calibration
17
+
18
+ - **10**: Once-per-project permanent constraints. At most 1-2 per project lifetime.
19
+ - **9**: Critical breaking changes or immediate cross-session decisions. At most 1 per significant session, often 0.
20
+ - **8**: Things an active parallel session would act on right now. Fires a cross-session signal. Use conservatively.
21
+ - **7**: Default. Project facts, decisions, preferences, milestones. No signal fired.
22
+ - **6**: Routine dev observations (verified X, tests passing). Cap here unless the result is surprising.
23
+ - **5**: Borderline. Only store if clearly durable beyond today.
24
+
25
+ Entries at 7 are saved silently. Use 8+ only if other active sessions need to know NOW.
26
+
27
+ ### Confidence-aware extraction (OpenClaw transcripts)
28
+
29
+ OpenClaw transcripts include `[user]` / `[assistant]` role labels. The extractor uses this signal:
30
+ - Hedged or unverified assistant factual claims are tagged `unverified` and hard-capped at importance 5.
31
+ - Tool-verified assistant claims follow normal importance rules.
32
+ - User messages are never capped.
33
+
34
+ This means: if you say something unverified, it will be stored at max importance 5. To store a fact at higher importance, verify it with a tool call first.
35
+
36
+ ## agenr_recall
37
+
38
+ Use mid-session when you need context you don't already have. Session-start recall is handled automatically - do not call at turn 1 unless you need extra context beyond the injected summary.
39
+
40
+ Parameters:
41
+ - `query` (required): semantic search string
42
+ - `limit`: max results (default 10)
43
+ - `context`: `"default"` (semantic+vector) or `"session-start"` (fast bootstrap)
44
+ - `since`: lower date bound - only entries newer than this (ISO or relative, e.g. `"7d"`, `"2026-01-01"`)
45
+ - `until`: upper date bound - only entries older than this ceiling (e.g. `"7d"` = entries created before 7 days ago). Use with `since` for a date window.
46
+ - `types`: comma-separated entry types (`fact,decision,preference,todo,lesson,event`)
47
+ - `platform`: filter by platform (`openclaw`, `claude-code`, `codex`)
48
+ - `project`: filter by project scope (pass `*` for all projects)
49
+
50
+ ## agenr_retire
51
+
52
+ Soft-deletes an entry. Use when something is outdated, wrong, or superseded. Pass `entry_id` (from recall results) and optionally `reason` and `persist: true` to write to the retirements ledger.
53
+
54
+ ## agenr_extract
55
+
56
+ Extracts structured knowledge entries from raw text without storing them. Useful for previewing what would be stored from a block of text before committing.