@synapcores/openclaw-memory 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SynapCores
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,214 @@
1
+ # @synapcores/openclaw-memory
2
+
3
+ A long-term memory plugin for [OpenClaw](https://github.com/openclaw/openclaw) that uses **SynapCores AIDB** as the storage backend. Drop-in alternative to `@openclaw/memory-lancedb` with the same auto-recall / auto-capture lifecycle, plus three SynapCores-only extensions: SQL-filtered semantic recall, graph-relation walks, and AutoML relevance scoring.
4
+
5
+ > **0.1.0 shipping note:** tested against gateway `v1.6.5.2-ce` and `@synapcores/sdk@0.3.0`. The parity API (recall/capture/forget) plus two of the three SynapCores-only read extensions (`recallFiltered`, `predictRelevance`) are wired against the live SDK and exercised end-to-end. Two methods are **signature-only in 0.1.0** and throw a clear "ships in 0.2.0" error before calling the gateway:
6
+ >
7
+ > - **`trainRelevanceModel`** — gateway `v1.6.5.x` rejects inline training data with HTTP 400; 0.2.0 stages rows in a sibling collection before calling `/v1/automl/train`. `predictRelevance` runs in heuristic mode in the meantime (always works).
8
+ > - **`recallRelated`** — gateway `v1.6.5.x` derives `SIMILAR_TO` synthetically from a graph-node vector index that this release does not populate (the plugin writes only to the vector collection; promoting Memory nodes into the graph backend ships in 0.2.0). Use `predictRelevance(query, candidates)` over a broad `recallFiltered({where: "1=1", semantic: query, limit: 20})` for relevance-scoped recall in the meantime.
9
+ >
10
+ > `autoLinkSimilar` is also a no-op in 0.1.0 for the same synthetic-edge reason (the gateway doesn't permit explicit `MERGE`s on `SIMILAR_TO` and computes the edge from vectors at query time).
11
+
12
+ ## Why use this over `@openclaw/memory-lancedb`?
13
+
14
+ | Capability | memory-lancedb | memory-synapcores |
15
+ | --- | --- | --- |
16
+ | Vector recall + capture | yes | yes |
17
+ | Auto-recall / auto-capture hooks | yes | yes |
18
+ | GDPR-style forget by ID or query | yes | yes |
19
+ | SQL-scoped semantic recall (`recallFiltered`) | no | **yes** |
20
+ | Graph relation walks (`recallRelated`) | no | **yes** |
21
+ | AutoML relevance scoring (`predictRelevance`) | no | **yes** |
22
+ | Backend | local LanceDB files | SynapCores gateway (HTTP) |
23
+
24
+ If you only need a private, single-user, file-backed vector store, stay on `@openclaw/memory-lancedb`. If you want any of: cross-session/multi-device shared memory, SQL filtering across metadata, graph relations between memories, or per-user relevance models — install this package.
25
+
26
+ ## Install
27
+
28
+ ```bash
29
+ pnpm add @synapcores/openclaw-memory
30
+ # or
31
+ npm install @synapcores/openclaw-memory
32
+ ```
33
+
34
+ `openclaw` (the host) is declared as a peer dependency — install it in your OpenClaw workspace.
35
+
36
+ ## Prerequisites
37
+
38
+ You need a running SynapCores gateway. The Community Edition is free:
39
+
40
+ ```bash
41
+ # Linux/macOS one-liner installer (see https://synapcores.com/install)
42
+ curl -fsSL https://synapcores.com/install.sh | sh
43
+ # Then start it:
44
+ synapcores start
45
+ ```
46
+
47
+ Create an API key from the SynapCores admin UI (default `http://localhost:8095`) and copy it into your OpenClaw config below.
48
+
49
+ ## Configure
50
+
51
+ Add this entry to your `openclaw.config.json` (or whichever config path your OpenClaw install uses):
52
+
53
+ ```json
54
+ {
55
+ "plugins": {
56
+ "memory-synapcores": {
57
+ "embedding": {
58
+ "apiKey": "${OPENAI_API_KEY}",
59
+ "model": "text-embedding-3-small"
60
+ },
61
+ "synapcores": {
62
+ "host": "localhost",
63
+ "port": 8080,
64
+ "apiKey": "${SYNAPCORES_API_KEY}",
65
+ "useHttps": false
66
+ },
67
+ "collection": "openclaw_memories",
68
+ "graph": "openclaw_memory_graph",
69
+ "autoCapture": true,
70
+ "autoRecall": true,
71
+ "autoLinkSimilar": true
72
+ }
73
+ }
74
+ }
75
+ ```
76
+
77
+ Environment-variable interpolation (`${OPENAI_API_KEY}`, `${SYNAPCORES_API_KEY}`) is supported in any string field so you don't have to commit secrets.
78
+
79
+ ### Config fields
80
+
81
+ | Field | Required | Default | Notes |
82
+ | --- | --- | --- | --- |
83
+ | `embedding.apiKey` | yes | — | OpenAI API key for the embedding model. |
84
+ | `embedding.model` | no | `text-embedding-3-small` | Either `text-embedding-3-small` (1536 dims) or `text-embedding-3-large` (3072 dims). |
85
+ | `synapcores.apiKey` | yes | — | SynapCores API key (`ak_prod_…` or `aidb_…`). |
86
+ | `synapcores.host` | no | `localhost` | SynapCores gateway hostname. |
87
+ | `synapcores.port` | no | `8080` | SynapCores gateway port. |
88
+ | `synapcores.useHttps` | no | `false` | Use TLS to talk to the gateway. |
89
+ | `collection` | no | `openclaw_memories` | SynapCores collection name. |
90
+ | `graph` | no | `openclaw_memory_graph` | SynapCores graph name (used for `SIMILAR_TO` edges and `recallRelated` walks). |
91
+ | `autoCapture` | no | `true` | Auto-store memorable utterances after each agent turn. |
92
+ | `autoRecall` | no | `true` | Auto-inject relevant memories before each agent turn. |
93
+ | `autoLinkSimilar` | no | `true` | On capture, draw `SIMILAR_TO` edges to existing memories with cosine similarity > 0.7 so `recallRelated` returns useful neighborhoods out of the box (adds ~30-50ms per capture). |
94
+ | `workspace` | no | — | Optional workspace suffix on the AutoML relevance model name so multiple installations sharing one gateway can train independent models. |
95
+
96
+ ## What you get
97
+
98
+ Once registered, the plugin:
99
+
100
+ 1. Exposes three OpenClaw **tools** to your agents: `memory_recall`, `memory_store`, `memory_forget`.
101
+ 2. Adds a CLI sub-command `openclaw ltm {list,search,stats}`.
102
+ 3. Hooks `before_agent_start` to auto-recall relevant memories (if `autoRecall: true`).
103
+ 4. Hooks `agent_end` to auto-capture preferences / decisions / entities / facts (if `autoCapture: true`).
104
+ 5. Exposes four SynapCores-only methods at `plugin.extensions.*` (see "Extensions" below).
105
+
106
+ ## API reference
107
+
108
+ ### Tools (used by agents at runtime)
109
+
110
+ | Tool | What it does |
111
+ | --- | --- |
112
+ | `memory_recall` | Vector-search the memory store. Params: `{ query: string, limit?: number }` (default 5). |
113
+ | `memory_store` | Persist a new memory. Params: `{ text, importance?, category? }`. De-dupes against >0.95 cosine similarity. |
114
+ | `memory_forget` | Delete a memory by `memoryId` (UUID) or by `query` (auto-deletes if exactly one candidate at >0.9 similarity, otherwise returns candidates). |
115
+
116
+ ### Extensions (programmatic, SynapCores-only)
117
+
118
+ Reached via `plugin.extensions.*` after `plugin.register(api)` runs.
119
+
120
+ ```ts
121
+ interface MemorySynapCoresExtensions {
122
+ /** Vector recall scoped by a SQL WHERE clause. */
123
+ recallFiltered(opts: {
124
+ where: string; // e.g. "category = 'preference' AND importance >= 0.7"
125
+ semantic: string; // natural-language query
126
+ limit?: number; // default 5
127
+ }): Promise<MemorySearchResult[]>;
128
+
129
+ /** Walk SIMILAR_TO / MENTIONS / RELATES_TO edges from a memory. */
130
+ recallRelated(memoryId: string, opts?: {
131
+ hops?: number; // default 1
132
+ edgeKinds?: string[]; // default: any
133
+ }): Promise<RelatedMemoryResult[]>;
134
+
135
+ /** Score candidates with an AutoML model (with heuristic fallback). */
136
+ predictRelevance(query: string, candidates: MemoryEntry[]): Promise<RelevanceScoredMemory[]>;
137
+
138
+ /** Train (or retrain) the AutoML relevance model from feedback. */
139
+ trainRelevanceModel(feedback: Array<{
140
+ memoryId: string;
141
+ queryText: string;
142
+ score: number; // 0..1
143
+ }>): Promise<{ modelId: string; modelName: string }>;
144
+ }
145
+ ```
146
+
147
+ #### `recallFiltered` — SQL-scoped semantic recall
148
+
149
+ ```ts
150
+ const results = await plugin.extensions.recallFiltered({
151
+ where: "category = 'preference' AND importance >= 0.7",
152
+ semantic: "what UI style does the user prefer?",
153
+ limit: 5,
154
+ });
155
+ ```
156
+
157
+ The `where` clause is forwarded to the SynapCores gateway as the `filter` field on `/vector_search`. SQL validation happens on the gateway — a malformed clause will surface as an SDK error.
158
+
159
+ #### `recallRelated` — graph neighborhood walk
160
+
161
+ ```ts
162
+ const neighbors = await plugin.extensions.recallRelated(memoryId, {
163
+ hops: 2,
164
+ edgeKinds: ["SIMILAR_TO"], // omit for any edge type
165
+ });
166
+ ```
167
+
168
+ > **0.1.0 status:** this method validates its arguments and throws a clear "ships in 0.2.0" error before calling the gateway. Gateway `v1.6.5.x` derives `SIMILAR_TO` edges synthetically from a graph-node vector index that the plugin does not populate in this release; 0.2.0 will post each Memory node into the graph backend with its embedding at capture time so the gateway's `[:SIMILAR_TO > T]` MATCH expansion returns useful neighborhoods. Wire your callers now and they will start returning data the moment you upgrade to `@synapcores/openclaw-memory@0.2.0`.
169
+
170
+ #### `predictRelevance` — AutoML re-ranking with heuristic fallback
171
+
172
+ ```ts
173
+ const top = await plugin.extensions.recallFiltered({ where: "1=1", semantic: query, limit: 20 });
174
+ const ranked = await plugin.extensions.predictRelevance(query, top.map((r) => r.entry));
175
+ ranked.sort((a, b) => b.relevance - a.relevance);
176
+ ```
177
+
178
+ When a model named `openclaw_memory_relevance[_<workspace>]` exists, candidates are scored by it. Otherwise the plugin falls back to:
179
+
180
+ ```
181
+ relevance = 0.6 * cosine_similarity(query, memory)
182
+ + 0.25 * exp(-age_days / 14) # 14-day half-life
183
+ + 0.15 * memory.importance
184
+ ```
185
+
186
+ #### `trainRelevanceModel` — promote feedback to a model
187
+
188
+ ```ts
189
+ const feedback = [
190
+ { memoryId: "...", queryText: "what's my email?", score: 1.0 },
191
+ { memoryId: "...", queryText: "dark mode preference", score: 0.9 },
192
+ // ... at least 10 samples
193
+ ];
194
+ await plugin.extensions.trainRelevanceModel(feedback);
195
+ // `predictRelevance` will automatically pick up the new model on the next call.
196
+ ```
197
+
198
+ Requires at least 10 samples; throws otherwise. Train periodically (cron / on-demand) — the next `predictRelevance` call will detect the model and switch out of heuristic mode.
199
+
200
+ > **0.1.0 status:** `trainRelevanceModel` validates inputs but throws a clear "not implemented yet" error before calling the gateway, because gateway `v1.6.5.x` rejects inline training rows. Wire your feedback-collection now and the method will start training models the moment you upgrade to `@synapcores/openclaw-memory@0.2.0` (which stages rows in a sibling collection before calling `/v1/automl/train`).
201
+
202
+ ## Roadmap (0.2.0+)
203
+
204
+ - **Entity extraction on capture** — parse `@mention` tokens and known-contact names out of incoming text and create `Person` / `Project` graph nodes with `MENTIONS` edges back to the memory.
205
+ - **Tag inference** — auto-classify memories into a configurable tag vocabulary on capture (small classifier or LLM call) so `recallFiltered` queries can use tags out of the box.
206
+ - **`synapcores-import-lancedb` migration script** — read an existing `~/.openclaw/memory/lancedb` store, re-embed if needed, and bulk-load into a SynapCores collection. Ships as a `bin` entry on the package.
207
+
208
+ ## Upstream
209
+
210
+ OpenClaw PR adding this plugin to the upstream extension catalogue: _TBD — link will be added once the PR opens_.
211
+
212
+ ## License
213
+
214
+ MIT. See `LICENSE`.
@@ -0,0 +1,104 @@
1
+ export type MemoryConfig = {
2
+ embedding: {
3
+ provider: "openai";
4
+ model?: string;
5
+ apiKey: string;
6
+ };
7
+ synapcores: {
8
+ host: string;
9
+ port: number;
10
+ apiKey: string;
11
+ useHttps: boolean;
12
+ };
13
+ collection?: string;
14
+ graph?: string;
15
+ autoCapture?: boolean;
16
+ autoRecall?: boolean;
17
+ /**
18
+ * When true (default), the plugin auto-creates `SIMILAR_TO` graph edges at
19
+ * capture time between a newly-stored memory and its top-K most similar
20
+ * existing memories (cosine > 0.7). Adds ~30-50ms per capture but makes
21
+ * `recallRelated` return useful results out of the box. Set to false if
22
+ * you only need vector recall or you plan to wire your own edge-building
23
+ * pipeline.
24
+ */
25
+ autoLinkSimilar?: boolean;
26
+ /**
27
+ * Optional workspace identifier. Currently used only as a suffix on the
28
+ * AutoML relevance model name (`openclaw_memory_relevance_<workspace>`)
29
+ * so multiple OpenClaw installations sharing one SynapCores gateway can
30
+ * each train their own relevance model.
31
+ */
32
+ workspace?: string;
33
+ };
34
+ export declare const MEMORY_CATEGORIES: readonly ["preference", "fact", "decision", "entity", "other"];
35
+ export type MemoryCategory = (typeof MEMORY_CATEGORIES)[number];
36
+ export declare function vectorDimsForModel(model: string): number;
37
+ export declare const memoryConfigSchema: {
38
+ parse(value: unknown): MemoryConfig;
39
+ uiHints: {
40
+ "embedding.apiKey": {
41
+ label: string;
42
+ sensitive: boolean;
43
+ placeholder: string;
44
+ help: string;
45
+ };
46
+ "embedding.model": {
47
+ label: string;
48
+ placeholder: string;
49
+ help: string;
50
+ };
51
+ "synapcores.host": {
52
+ label: string;
53
+ placeholder: string;
54
+ help: string;
55
+ };
56
+ "synapcores.port": {
57
+ label: string;
58
+ placeholder: string;
59
+ help: string;
60
+ };
61
+ "synapcores.apiKey": {
62
+ label: string;
63
+ sensitive: boolean;
64
+ placeholder: string;
65
+ help: string;
66
+ };
67
+ "synapcores.useHttps": {
68
+ label: string;
69
+ advanced: boolean;
70
+ help: string;
71
+ };
72
+ collection: {
73
+ label: string;
74
+ placeholder: string;
75
+ advanced: boolean;
76
+ help: string;
77
+ };
78
+ graph: {
79
+ label: string;
80
+ placeholder: string;
81
+ advanced: boolean;
82
+ help: string;
83
+ };
84
+ autoCapture: {
85
+ label: string;
86
+ help: string;
87
+ };
88
+ autoRecall: {
89
+ label: string;
90
+ help: string;
91
+ };
92
+ autoLinkSimilar: {
93
+ label: string;
94
+ advanced: boolean;
95
+ help: string;
96
+ };
97
+ workspace: {
98
+ label: string;
99
+ advanced: boolean;
100
+ help: string;
101
+ };
102
+ };
103
+ };
104
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../config.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE;QACT,QAAQ,EAAE,QAAQ,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,iBAAiB,gEAAiE,CAAC;AAChG,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAqBhE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMxD;AA4BD,eAAO,MAAM,kBAAkB;iBAChB,OAAO,GAAG,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgIpC,CAAC"}
package/dist/config.js ADDED
@@ -0,0 +1,165 @@
1
+ export const MEMORY_CATEGORIES = ["preference", "fact", "decision", "entity", "other"];
2
+ const DEFAULT_MODEL = "text-embedding-3-small";
3
+ const DEFAULT_HOST = "localhost";
4
+ const DEFAULT_PORT = 8080;
5
+ const DEFAULT_COLLECTION = "openclaw_memories";
6
+ const DEFAULT_GRAPH = "openclaw_memory_graph";
7
+ const EMBEDDING_DIMENSIONS = {
8
+ "text-embedding-3-small": 1536,
9
+ "text-embedding-3-large": 3072,
10
+ };
11
+ function assertAllowedKeys(value, allowed, label) {
12
+ const unknown = Object.keys(value).filter((key) => !allowed.includes(key));
13
+ if (unknown.length === 0) {
14
+ return;
15
+ }
16
+ throw new Error(`${label} has unknown keys: ${unknown.join(", ")}`);
17
+ }
18
+ export function vectorDimsForModel(model) {
19
+ const dims = EMBEDDING_DIMENSIONS[model];
20
+ if (!dims) {
21
+ throw new Error(`Unsupported embedding model: ${model}`);
22
+ }
23
+ return dims;
24
+ }
25
+ function resolveEnvVars(value) {
26
+ return value.replace(/\$\{([^}]+)\}/g, (_, envVar) => {
27
+ const envValue = process.env[envVar];
28
+ if (!envValue) {
29
+ throw new Error(`Environment variable ${envVar} is not set`);
30
+ }
31
+ return envValue;
32
+ });
33
+ }
34
+ function resolveEmbeddingModel(embedding) {
35
+ const model = typeof embedding.model === "string" ? embedding.model : DEFAULT_MODEL;
36
+ vectorDimsForModel(model);
37
+ return model;
38
+ }
39
+ function parsePort(value) {
40
+ if (value === undefined) {
41
+ return DEFAULT_PORT;
42
+ }
43
+ if (typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= 65535) {
44
+ return value;
45
+ }
46
+ throw new Error("synapcores.port must be an integer between 1 and 65535");
47
+ }
48
+ export const memoryConfigSchema = {
49
+ parse(value) {
50
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
51
+ throw new Error("memory config required");
52
+ }
53
+ const cfg = value;
54
+ assertAllowedKeys(cfg, [
55
+ "embedding",
56
+ "synapcores",
57
+ "collection",
58
+ "graph",
59
+ "autoCapture",
60
+ "autoRecall",
61
+ "autoLinkSimilar",
62
+ "workspace",
63
+ ], "memory config");
64
+ const embedding = cfg.embedding;
65
+ if (!embedding || typeof embedding.apiKey !== "string") {
66
+ throw new Error("embedding.apiKey is required");
67
+ }
68
+ assertAllowedKeys(embedding, ["apiKey", "model"], "embedding config");
69
+ const model = resolveEmbeddingModel(embedding);
70
+ const synapcores = cfg.synapcores;
71
+ if (!synapcores || typeof synapcores.apiKey !== "string") {
72
+ throw new Error("synapcores.apiKey is required");
73
+ }
74
+ assertAllowedKeys(synapcores, ["host", "port", "apiKey", "useHttps"], "synapcores config");
75
+ const host = typeof synapcores.host === "string" && synapcores.host.length > 0
76
+ ? synapcores.host
77
+ : DEFAULT_HOST;
78
+ const port = parsePort(synapcores.port);
79
+ const useHttps = synapcores.useHttps === true;
80
+ return {
81
+ embedding: {
82
+ provider: "openai",
83
+ model,
84
+ apiKey: resolveEnvVars(embedding.apiKey),
85
+ },
86
+ synapcores: {
87
+ host,
88
+ port,
89
+ apiKey: resolveEnvVars(synapcores.apiKey),
90
+ useHttps,
91
+ },
92
+ collection: typeof cfg.collection === "string" ? cfg.collection : DEFAULT_COLLECTION,
93
+ graph: typeof cfg.graph === "string" ? cfg.graph : DEFAULT_GRAPH,
94
+ autoCapture: cfg.autoCapture !== false,
95
+ autoRecall: cfg.autoRecall !== false,
96
+ autoLinkSimilar: cfg.autoLinkSimilar !== false,
97
+ workspace: typeof cfg.workspace === "string" ? cfg.workspace : undefined,
98
+ };
99
+ },
100
+ uiHints: {
101
+ "embedding.apiKey": {
102
+ label: "OpenAI API Key",
103
+ sensitive: true,
104
+ placeholder: "sk-proj-...",
105
+ help: "API key for OpenAI embeddings (or use ${OPENAI_API_KEY})",
106
+ },
107
+ "embedding.model": {
108
+ label: "Embedding Model",
109
+ placeholder: DEFAULT_MODEL,
110
+ help: "OpenAI embedding model to use",
111
+ },
112
+ "synapcores.host": {
113
+ label: "SynapCores Host",
114
+ placeholder: DEFAULT_HOST,
115
+ help: "Hostname of the SynapCores gateway",
116
+ },
117
+ "synapcores.port": {
118
+ label: "SynapCores Port",
119
+ placeholder: String(DEFAULT_PORT),
120
+ help: "Port of the SynapCores gateway",
121
+ },
122
+ "synapcores.apiKey": {
123
+ label: "SynapCores API Key",
124
+ sensitive: true,
125
+ placeholder: "ak_prod_... or aidb_...",
126
+ help: "API key for the SynapCores gateway (or use ${SYNAPCORES_API_KEY})",
127
+ },
128
+ "synapcores.useHttps": {
129
+ label: "Use HTTPS",
130
+ advanced: true,
131
+ help: "Connect to the SynapCores gateway over TLS",
132
+ },
133
+ collection: {
134
+ label: "Memory Collection",
135
+ placeholder: DEFAULT_COLLECTION,
136
+ advanced: true,
137
+ help: "SynapCores collection name used to store memories",
138
+ },
139
+ graph: {
140
+ label: "Memory Graph",
141
+ placeholder: DEFAULT_GRAPH,
142
+ advanced: true,
143
+ help: "SynapCores graph name used for memory relations (SIMILAR_TO edges + recallRelated walks).",
144
+ },
145
+ autoCapture: {
146
+ label: "Auto-Capture",
147
+ help: "Automatically capture important information from conversations",
148
+ },
149
+ autoRecall: {
150
+ label: "Auto-Recall",
151
+ help: "Automatically inject relevant memories into context",
152
+ },
153
+ autoLinkSimilar: {
154
+ label: "Auto-Link Similar Memories",
155
+ advanced: true,
156
+ help: "On capture, draw SIMILAR_TO graph edges to existing memories with cosine similarity > 0.7 so `recallRelated` returns useful neighborhoods (adds ~30-50ms per capture).",
157
+ },
158
+ workspace: {
159
+ label: "Workspace ID",
160
+ advanced: true,
161
+ help: "Optional workspace name suffixed onto the AutoML relevance model so multiple installations sharing one gateway can train independent models.",
162
+ },
163
+ },
164
+ };
165
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../config.ts"],"names":[],"mappings":"AAkCA,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,Q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