@monoes/monomindcli 1.15.6 → 1.15.7
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/.claude/agents/github/repo-architect.md +1 -1
- package/.claude/agents/specialists/integration-architect.md +6 -6
- package/.claude/commands/hive-mind/hive-mind-init.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-memory.md +1 -1
- package/.claude/commands/mastermind/brain.md +11 -11
- package/.claude/commands/mastermind/master.md +4 -4
- package/.claude/commands/mastermind/memory.md +6 -6
- package/.claude/commands/memory/README.md +4 -4
- package/.claude/commands/truth/start.md +3 -3
- package/.claude/helpers/extras-registry.json +2 -2
- package/.claude/helpers/skill-registry.json +26 -26
- package/.claude/helpers/statusline.cjs +8 -8
- package/.claude/skills/agentic-jujutsu/SKILL.md +3 -3
- package/.claude/skills/mastermind/_protocol.md +8 -8
- package/README.md +6 -6
- package/dist/src/__tests__/browse-analyzer.test.js +18 -1
- package/dist/src/__tests__/browse-analyzer.test.js.map +1 -1
- package/dist/src/commands/agent.js +2 -2
- package/dist/src/commands/agent.js.map +1 -1
- package/dist/src/commands/autopilot.js +1 -1
- package/dist/src/commands/autopilot.js.map +1 -1
- package/dist/src/commands/completions.d.ts.map +1 -1
- package/dist/src/commands/completions.js +2 -21
- package/dist/src/commands/completions.js.map +1 -1
- package/dist/src/commands/config.js +1 -1
- package/dist/src/commands/hive-mind.js +1 -1
- package/dist/src/commands/hooks-coverage-commands.js +31 -31
- package/dist/src/commands/hooks-coverage-commands.js.map +1 -1
- package/dist/src/commands/hooks-routing-commands.js +1 -1
- package/dist/src/commands/hooks-routing-commands.js.map +1 -1
- package/dist/src/commands/hooks.js +1 -1
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/index.d.ts +0 -1
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +0 -4
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.js +8 -8
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/memory.d.ts +1 -1
- package/dist/src/commands/memory.js +25 -25
- package/dist/src/commands/memory.js.map +1 -1
- package/dist/src/commands/migrate.js +2 -2
- package/dist/src/commands/neural.js +1 -1
- package/dist/src/commands/neural.js.map +1 -1
- package/dist/src/commands/swarm.js +1 -1
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/config-adapter.d.ts.map +1 -1
- package/dist/src/config-adapter.js +8 -8
- package/dist/src/config-adapter.js.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/init/claudemd-generator.js +2 -2
- package/dist/src/init/executor.js +16 -16
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/shared-instructions-generator.d.ts +1 -1
- package/dist/src/init/shared-instructions-generator.js +1 -1
- package/dist/src/init/statusline-generator.d.ts +1 -1
- package/dist/src/init/statusline-generator.js +8 -8
- package/dist/src/init/types.d.ts +3 -3
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +3 -3
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/mcp-client.d.ts.map +1 -1
- package/dist/src/mcp-client.js +1 -8
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-tools/autopilot-tools.js +3 -3
- package/dist/src/mcp-tools/autopilot-tools.js.map +1 -1
- package/dist/src/mcp-tools/daa-tools.js +13 -13
- package/dist/src/mcp-tools/daa-tools.js.map +1 -1
- package/dist/src/mcp-tools/guidance-tools.js +4 -4
- package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +4 -4
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-intelligence.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-intelligence.js +1 -0
- package/dist/src/mcp-tools/hooks-intelligence.js.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.js +23 -23
- package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
- package/dist/src/mcp-tools/index.d.ts +0 -1
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +0 -2
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.d.ts +22 -6
- package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +553 -505
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/progress-tools.js +1 -1
- package/dist/src/mcp-tools/progress-tools.js.map +1 -1
- package/dist/src/mcp-tools/system-tools.js +5 -5
- package/dist/src/mcp-tools/system-tools.js.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.d.ts +1 -1
- package/dist/src/mcp-tools/transfer-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.js +1 -156
- package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
- package/dist/src/memory/embedding-operations.js +3 -3
- package/dist/src/memory/embedding-operations.js.map +1 -1
- package/dist/src/memory/hnsw-operations.js +5 -5
- package/dist/src/memory/hnsw-operations.js.map +1 -1
- package/dist/src/memory/intelligence.js +2 -2
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.d.ts +86 -234
- package/dist/src/memory/memory-bridge.d.ts.map +1 -1
- package/dist/src/memory/memory-bridge.js +455 -1702
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-crud.js +3 -3
- package/dist/src/memory/memory-crud.js.map +1 -1
- package/dist/src/memory/memory-initializer.d.ts +1 -1
- package/dist/src/memory/memory-initializer.js +5 -5
- package/dist/src/memory/memory-initializer.js.map +1 -1
- package/dist/src/memory/memory-read.js +4 -4
- package/dist/src/memory/memory-read.js.map +1 -1
- package/dist/src/suggest.js +0 -1
- package/dist/src/suggest.js.map +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/src/ui/dashboard.html +41 -5
- package/dist/src/ui/orgs.html +91 -5
- package/dist/src/ui/server.mjs +44 -0
- package/dist/src/update/validator.d.ts.map +1 -1
- package/dist/src/update/validator.js +1 -3
- package/dist/src/update/validator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/src/commands/plugins.d.ts +0 -11
- package/dist/src/commands/plugins.d.ts.map +0 -1
- package/dist/src/commands/plugins.js +0 -799
- package/dist/src/commands/plugins.js.map +0 -1
- package/dist/src/plugins/manager.d.ts +0 -133
- package/dist/src/plugins/manager.d.ts.map +0 -1
- package/dist/src/plugins/manager.js +0 -498
- package/dist/src/plugins/manager.js.map +0 -1
- package/dist/src/plugins/store/discovery.d.ts +0 -88
- package/dist/src/plugins/store/discovery.d.ts.map +0 -1
- package/dist/src/plugins/store/discovery.js +0 -650
- package/dist/src/plugins/store/discovery.js.map +0 -1
- package/dist/src/plugins/store/index.d.ts +0 -76
- package/dist/src/plugins/store/index.d.ts.map +0 -1
- package/dist/src/plugins/store/index.js +0 -141
- package/dist/src/plugins/store/index.js.map +0 -1
- package/dist/src/plugins/store/search.d.ts +0 -46
- package/dist/src/plugins/store/search.d.ts.map +0 -1
- package/dist/src/plugins/store/search.js +0 -231
- package/dist/src/plugins/store/search.js.map +0 -1
- package/dist/src/plugins/store/types.d.ts +0 -274
- package/dist/src/plugins/store/types.d.ts.map +0 -1
- package/dist/src/plugins/store/types.js +0 -7
- package/dist/src/plugins/store/types.js.map +0 -1
- package/dist/src/plugins/tests/demo-plugin-store.d.ts +0 -7
- package/dist/src/plugins/tests/demo-plugin-store.d.ts.map +0 -1
- package/dist/src/plugins/tests/demo-plugin-store.js +0 -126
- package/dist/src/plugins/tests/demo-plugin-store.js.map +0 -1
- package/dist/src/plugins/tests/standalone-test.d.ts +0 -12
- package/dist/src/plugins/tests/standalone-test.d.ts.map +0 -1
- package/dist/src/plugins/tests/standalone-test.js +0 -188
- package/dist/src/plugins/tests/standalone-test.js.map +0 -1
- package/dist/src/plugins/tests/test-plugin-store.d.ts +0 -7
- package/dist/src/plugins/tests/test-plugin-store.d.ts.map +0 -1
- package/dist/src/plugins/tests/test-plugin-store.js +0 -206
- package/dist/src/plugins/tests/test-plugin-store.js.map +0 -1
- package/dist/src/services/registry-api.d.ts +0 -58
- package/dist/src/services/registry-api.d.ts.map +0 -1
- package/dist/src/services/registry-api.js +0 -199
- package/dist/src/services/registry-api.js.map +0 -1
- package/scripts/publish-registry.ts +0 -339
|
@@ -301,7 +301,7 @@ const integrationPattern = {
|
|
|
301
301
|
"@monomind/memory": {
|
|
302
302
|
role: "persistence_layer",
|
|
303
303
|
dependencies: [],
|
|
304
|
-
provides: ["
|
|
304
|
+
provides: ["LanceDB", "HNSW_search", "sessions"],
|
|
305
305
|
},
|
|
306
306
|
},
|
|
307
307
|
communication: "MCP_protocol",
|
|
@@ -18,7 +18,7 @@ Keep the 5 Monomind packages working as a coherent system. When a package change
|
|
|
18
18
|
|---------|------|-------------------|
|
|
19
19
|
| `@monomind/cli` | Orchestration layer | MCP server, CLI commands, init generator |
|
|
20
20
|
| `@monomind/hooks` | Intelligence engine | Hook events, background workers, pattern learning |
|
|
21
|
-
| `@monomind/memory` | Persistence layer |
|
|
21
|
+
| `@monomind/memory` | Persistence layer | LanceDB, HNSW search, session state |
|
|
22
22
|
| `@monomind/security` | Input validation | CVE remediation, safe executor, path validator |
|
|
23
23
|
| `@monoes/monograph` | Knowledge graph | Dependency analysis, community detection, impact |
|
|
24
24
|
|
|
@@ -46,9 +46,9 @@ All MCP tools exposed via `@monomind/cli/src/mcp-tools/` must:
|
|
|
46
46
|
|
|
47
47
|
```typescript
|
|
48
48
|
// Standard pattern for cross-package memory access
|
|
49
|
-
import {
|
|
49
|
+
import { LanceDB } from '@monomind/memory';
|
|
50
50
|
|
|
51
|
-
const db =
|
|
51
|
+
const db = LanceDB.getInstance();
|
|
52
52
|
await db.store({ key, value, namespace: 'package-name' });
|
|
53
53
|
const result = await db.search({ query, namespace: 'package-name' });
|
|
54
54
|
```
|
|
@@ -61,7 +61,7 @@ When a new feature spans multiple packages:
|
|
|
61
61
|
- [ ] Hook events documented in `@monomind/hooks/src/types.ts`
|
|
62
62
|
- [ ] MCP tool registered in `@monomind/cli/src/mcp-tools/index.ts`
|
|
63
63
|
- [ ] Security validation added at system boundary
|
|
64
|
-
- [ ] Memory schema migration written if
|
|
64
|
+
- [ ] Memory schema migration written if LanceDB schema changes
|
|
65
65
|
- [ ] `sync-claude-assets.sh` run after any `.claude/` changes
|
|
66
66
|
- [ ] Cross-package integration test added
|
|
67
67
|
|
|
@@ -78,7 +78,7 @@ packages/@monomind/hooks/src/
|
|
|
78
78
|
workers/ — Background worker definitions
|
|
79
79
|
|
|
80
80
|
packages/@monomind/memory/src/
|
|
81
|
-
|
|
81
|
+
lancedb/ — LanceDB core
|
|
82
82
|
hnsw/ — Vector search
|
|
83
83
|
|
|
84
84
|
packages/@monomind/security/src/
|
|
@@ -88,7 +88,7 @@ packages/@monomind/security/src/
|
|
|
88
88
|
|
|
89
89
|
## Coordination with Other Specialists
|
|
90
90
|
|
|
91
|
-
- **Memory Specialist** —
|
|
91
|
+
- **Memory Specialist** — LanceDB schema changes, HNSW configuration
|
|
92
92
|
- **Performance Engineer** — Benchmarking cross-package call overhead
|
|
93
93
|
- **Security Architect** — Validating integration boundary security
|
|
94
94
|
- **Queen Coordinator** — Orchestrating multi-package feature rollouts
|
|
@@ -19,7 +19,7 @@ npx monomind hive-mind init [options]
|
|
|
19
19
|
| `--consensus` | `-c` | string | `byzantine` | Consensus strategy: `byzantine`, `raft`, `gossip`, `crdt`, `quorum` |
|
|
20
20
|
| `--max-agents` | `-m` | number | `15` | Maximum number of agents |
|
|
21
21
|
| `--persist` | `-p` | boolean | `true` | Enable persistent state across sessions |
|
|
22
|
-
| `--memory-backend` | — | string | `hybrid` | Memory backend: `
|
|
22
|
+
| `--memory-backend` | — | string | `hybrid` | Memory backend: `lancedb`, `sqlite`, `hybrid` |
|
|
23
23
|
|
|
24
24
|
## Examples
|
|
25
25
|
|
|
@@ -48,7 +48,7 @@ npx monomind hive-mind memory -a list --format json
|
|
|
48
48
|
|
|
49
49
|
## Relationship to `monomind memory`
|
|
50
50
|
|
|
51
|
-
`hive-mind memory` operates on the **hive's shared memory namespace** — values here are visible to all agents coordinating in the current hive. This is distinct from `npx monomind memory` which operates on the global
|
|
51
|
+
`hive-mind memory` operates on the **hive's shared memory namespace** — values here are visible to all agents coordinating in the current hive. This is distinct from `npx monomind memory` which operates on the global LanceDB.
|
|
52
52
|
|
|
53
53
|
Use hive memory for transient inter-agent coordination data (task results, intermediate state). Use global memory for patterns and knowledge that should persist across sessions.
|
|
54
54
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mastermind-brain
|
|
3
|
-
description: Mastermind brain management — inspect, compact, refresh, and control the three-tier business memory (
|
|
3
|
+
description: Mastermind brain management — inspect, compact, refresh, and control the three-tier business memory (LanceDB + Monograph)
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
**First — extract repeat flags:** Follow the REPEAT PREAMBLE from `_repeat.md`. Extracts `--repeat`, `--tillend`, `--maxruns`, `--wait`, `--rep`, `--loop` from `$ARGUMENTS` before all other parsing.
|
|
@@ -14,9 +14,9 @@ Parse `$ARGUMENTS` to determine the sub-command and flags.
|
|
|
14
14
|
Show the current state of all brain tiers across all domains.
|
|
15
15
|
|
|
16
16
|
For each domain that has data, call:
|
|
17
|
-
- `
|
|
18
|
-
- `
|
|
19
|
-
- `
|
|
17
|
+
- `mcp__monomind__lancedb_health` on namespace `mastermind:<domain>:raw` → Tier 1 entry count, last write date, archived count
|
|
18
|
+
- `mcp__monomind__lancedb_health` on namespace `mastermind:<domain>:weekly` → Tier 2 summary count, last compaction date
|
|
19
|
+
- `mcp__monomind__lancedb_health` on namespace `mastermind:principles` → Tier 3 principle count
|
|
20
20
|
|
|
21
21
|
Display as a table:
|
|
22
22
|
|
|
@@ -42,9 +42,9 @@ Avg memory score: 0.64 | Entries below archive threshold: 3
|
|
|
42
42
|
Force immediate weekly distillation across all domains (or `--domain <name>` for one domain).
|
|
43
43
|
|
|
44
44
|
For each domain (or the specified domain):
|
|
45
|
-
1. Retrieve all Tier 1 raw entries since last compaction via `
|
|
45
|
+
1. Retrieve all Tier 1 raw entries since last compaction via `mcp__monomind__lancedb_hierarchical-recall` (namespace `mastermind:<domain>:raw`)
|
|
46
46
|
2. Produce per-domain weekly summary: synthesize decisions, patterns, and lessons into ≤300 words
|
|
47
|
-
3. Store to Tier 2 via `
|
|
47
|
+
3. Store to Tier 2 via `mcp__monomind__lancedb_hierarchical-store` (namespace `mastermind:<domain>:weekly`)
|
|
48
48
|
4. Archive Tier 1 entries with score < 0.1 (update metadata: `{ archived: true }`)
|
|
49
49
|
5. Report: "Compacted <domain>: <N> entries → <M> summary, <K> archived"
|
|
50
50
|
|
|
@@ -56,7 +56,7 @@ Re-cluster the knowledge graph for a specific domain and rebuild Tier 3 principl
|
|
|
56
56
|
|
|
57
57
|
1. Call `mcp__monomind__monograph_community` for nodes matching `mastermind:<domain>`
|
|
58
58
|
2. For any cluster of 3+ similar nodes: merge into a single principle (LLM synthesis)
|
|
59
|
-
3. Store merged principle: `
|
|
59
|
+
3. Store merged principle: `mcp__monomind__lancedb_hierarchical-store` namespace `mastermind:principles`
|
|
60
60
|
4. For conflicting nodes: add `EXCEPTION` edge via `mcp__monomind__monograph_add_fact`
|
|
61
61
|
5. Report: "Refreshed <domain>: <N> clusters found, <M> principles updated, <K> exceptions noted"
|
|
62
62
|
|
|
@@ -66,9 +66,9 @@ Re-cluster the knowledge graph for a specific domain and rebuild Tier 3 principl
|
|
|
66
66
|
|
|
67
67
|
Show raw contents of a specific brain tier.
|
|
68
68
|
|
|
69
|
-
- Tier 1: Call `
|
|
70
|
-
- Tier 2: Call `
|
|
71
|
-
- Tier 3: Call `
|
|
69
|
+
- Tier 1: Call `mcp__monomind__lancedb_hierarchical-recall` on `mastermind:<domain>:raw`, display each entry with its score and date.
|
|
70
|
+
- Tier 2: Call `mcp__monomind__lancedb_hierarchical-recall` on `mastermind:<domain>:weekly`, display summaries with dates.
|
|
71
|
+
- Tier 3: Call `mcp__monomind__lancedb_hierarchical-recall` on `mastermind:principles`, display all principles.
|
|
72
72
|
|
|
73
73
|
Default limit: 10. Use `--limit N` to override.
|
|
74
74
|
|
|
@@ -78,7 +78,7 @@ Default limit: 10. Use `--limit N` to override.
|
|
|
78
78
|
|
|
79
79
|
Find and archive all brain entries semantically matching the query.
|
|
80
80
|
|
|
81
|
-
1. Call `
|
|
81
|
+
1. Call `mcp__monomind__lancedb_pattern-search` with query text across all mastermind namespaces
|
|
82
82
|
2. Display matching entries with their scores and domains
|
|
83
83
|
3. Ask: "Archive these N entries? (yes/no)"
|
|
84
84
|
4. If yes: update each entry's metadata to `{ archived: true }`
|
|
@@ -179,7 +179,7 @@ These sequences are non-negotiable in all modes:
|
|
|
179
179
|
- **When fixing bugs**: `mastermind:debug` first (root cause) → write failing test via `mastermind:tdd` → fix → `mastermind:verify`
|
|
180
180
|
- **After building**: `mastermind:review` — at minimum one pass before reporting complete
|
|
181
181
|
- **Consuming a review**: `mastermind:receive-review` — verify before implementing, clarify unclear items first
|
|
182
|
-
- **After any run**: Brain Write Procedure — score decisions, append to
|
|
182
|
+
- **After any run**: Brain Write Procedure — score decisions, append to LanceDB
|
|
183
183
|
- **Before releasing**: `mastermind:review --tillend --auto` → `mastermind:verify` → `mastermind:finish`
|
|
184
184
|
- **Isolated work**: `mastermind:worktree` before making changes to avoid contaminating main
|
|
185
185
|
- **Before claiming complete**: Run `mastermind:verify` — never claim completion based on agent reports, linter passes, or partial checks
|
|
@@ -289,8 +289,8 @@ project_name="${project_name:-$(basename "$PWD")}"
|
|
|
289
289
|
|
|
290
290
|
Follow the Brain Load Procedure from `_protocol.md`:
|
|
291
291
|
|
|
292
|
-
1. Call `
|
|
293
|
-
2. For each domain that appears relevant to the prompt, call `
|
|
292
|
+
1. Call `mcp__monomind__lancedb_hierarchical-recall` namespace `mastermind:principles` (limit 20)
|
|
293
|
+
2. For each domain that appears relevant to the prompt, call `mcp__monomind__lancedb_context-synthesize` namespace `mastermind:<domain>:weekly`
|
|
294
294
|
3. Call `mcp__monomind__monograph_query` with 3-5 keywords from the prompt
|
|
295
295
|
|
|
296
296
|
Assemble the BRAIN CONTEXT block from results.
|
|
@@ -861,7 +861,7 @@ Monotask boards:
|
|
|
861
861
|
|
|
862
862
|
Follow the Brain Write Procedure from `_protocol.md` for each domain that ran:
|
|
863
863
|
1. Score all decisions from this run
|
|
864
|
-
2. Append to Tier 1 raw log (
|
|
864
|
+
2. Append to Tier 1 raw log (LanceDB)
|
|
865
865
|
3. Check and trigger weekly compaction if threshold met
|
|
866
866
|
4. Check and trigger graph consolidation if cluster detected
|
|
867
867
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mastermind-memory
|
|
3
|
-
description:
|
|
3
|
+
description: LanceDB memory system — store, search, retrieve, list, delete, and manage cross-session persistent memory with vector embeddings
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Monomind Memory System
|
|
7
7
|
|
|
8
|
-
Persistent memory backed by
|
|
8
|
+
Persistent memory backed by LanceDB with pure-JS HNSW vector indexing for semantic search (O(log n) approximate nearest neighbor). Supports cross-session and cross-agent collaboration.
|
|
9
9
|
|
|
10
10
|
## Subcommands
|
|
11
11
|
|
|
12
12
|
| Subcommand | Alias | Description |
|
|
13
13
|
|---|---|---|
|
|
14
|
-
| `init` | — | Initialize memory database (sql.js +
|
|
14
|
+
| `init` | — | Initialize memory database (sql.js + LanceDB) |
|
|
15
15
|
| `store` | — | Store a key/value entry |
|
|
16
16
|
| `edit` | — | Edit an existing entry |
|
|
17
17
|
| `retrieve` | `get` | Retrieve entry by key |
|
|
@@ -30,11 +30,11 @@ Persistent memory backed by AgentDB with pure-JS HNSW vector indexing for semant
|
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
npx monomind memory init
|
|
33
|
-
npx monomind memory init --backend
|
|
33
|
+
npx monomind memory init --backend lancedb --verbose --verify
|
|
34
34
|
npx monomind memory init --force # Overwrite existing
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
**Flags:** `--backend hybrid|sqlite|
|
|
37
|
+
**Flags:** `--backend hybrid|sqlite|lancedb` (default: `hybrid`), `--path`, `--force`, `--verbose`, `--verify` (default: true), `--load-embeddings`
|
|
38
38
|
|
|
39
39
|
## store — Store Data
|
|
40
40
|
|
|
@@ -135,7 +135,7 @@ Shows backend, total entries, storage size, oldest/newest entry.
|
|
|
135
135
|
## configure — Backend Settings
|
|
136
136
|
|
|
137
137
|
```bash
|
|
138
|
-
npx monomind memory configure --backend
|
|
138
|
+
npx monomind memory configure --backend lancedb
|
|
139
139
|
npx monomind memory configure --backend hybrid --cache-size 512 --hnsw-m 16 --hnsw-ef 200
|
|
140
140
|
```
|
|
141
141
|
|
|
@@ -4,13 +4,13 @@ name: memory:README
|
|
|
4
4
|
|
|
5
5
|
# Memory Commands
|
|
6
6
|
|
|
7
|
-
Commands for the
|
|
7
|
+
Commands for the LanceDB memory system — vector search, namespaced storage, HNSW indexing, and cross-session persistence.
|
|
8
8
|
|
|
9
9
|
## Available Subcommands
|
|
10
10
|
|
|
11
11
|
| Subcommand | Description |
|
|
12
12
|
|---|---|
|
|
13
|
-
| `memory init` | Initialize memory backend (
|
|
13
|
+
| `memory init` | Initialize memory backend (lancedb, sqlite, hybrid) |
|
|
14
14
|
| `memory store` | Store a memory entry with optional vector embedding |
|
|
15
15
|
| `memory retrieve` | Retrieve a memory entry by key |
|
|
16
16
|
| `memory search` | Search memory (semantic / keyword / hybrid) |
|
|
@@ -68,9 +68,9 @@ npx monomind memory import --input backup.json --merge
|
|
|
68
68
|
|
|
69
69
|
| Backend | Description | Recommended |
|
|
70
70
|
|---|---|---|
|
|
71
|
-
| `
|
|
71
|
+
| `lancedb` | Full LanceDB with HNSW vector search | Production |
|
|
72
72
|
| `sqlite` | SQLite-only, no vector search | Lightweight |
|
|
73
|
-
| `hybrid` | SQLite +
|
|
73
|
+
| `hybrid` | SQLite + LanceDB HNSW | Default (recommended) |
|
|
74
74
|
|
|
75
75
|
## See Also
|
|
76
76
|
|
|
@@ -74,8 +74,8 @@ mcp__monomind__hooks_intelligence_stats({})
|
|
|
74
74
|
mcp__monomind__task_summary({})
|
|
75
75
|
mcp__monomind__progress_summary({})
|
|
76
76
|
|
|
77
|
-
//
|
|
78
|
-
|
|
77
|
+
// LanceDB health (memory integrity)
|
|
78
|
+
mcp__monomind__lancedb_health({})
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
### Performance
|
|
@@ -105,7 +105,7 @@ When invoked, run these checks in parallel:
|
|
|
105
105
|
mcp__monomind__system_health({})
|
|
106
106
|
mcp__monomind__agent_health({})
|
|
107
107
|
mcp__monomind__neural_status({ verbose: true })
|
|
108
|
-
|
|
108
|
+
mcp__monomind__lancedb_health({})
|
|
109
109
|
mcp__monomind__performance_report({ format: "detailed" })
|
|
110
110
|
```
|
|
111
111
|
|
|
@@ -3715,7 +3715,7 @@
|
|
|
3715
3715
|
{
|
|
3716
3716
|
"slug": "v1-memory-specialist",
|
|
3717
3717
|
"name": "v1-memory-specialist",
|
|
3718
|
-
"description": "v1 Memory Specialist for unifying 6+ memory systems into
|
|
3718
|
+
"description": "v1 Memory Specialist for unifying 6+ memory systems into LanceDB with HNSW indexing. Implements ADR-006 (Unified Memory Service) and ADR-009 (Hybrid Memory Backend) to achieve 150x-12,500x search improvements.",
|
|
3719
3719
|
"category": "specialists",
|
|
3720
3720
|
"filePath": "../agents/specialists/memory-specialist.md",
|
|
3721
3721
|
"keywords": [
|
|
@@ -3724,7 +3724,7 @@
|
|
|
3724
3724
|
"unifying",
|
|
3725
3725
|
"systems",
|
|
3726
3726
|
"into",
|
|
3727
|
-
"
|
|
3727
|
+
"lancedb",
|
|
3728
3728
|
"hnsw",
|
|
3729
3729
|
"indexing",
|
|
3730
3730
|
"implements",
|
|
@@ -509,8 +509,8 @@
|
|
|
509
509
|
"primaryAgent": "devops"
|
|
510
510
|
},
|
|
511
511
|
{
|
|
512
|
-
"skill": "
|
|
513
|
-
"invoke": "Skill(\"
|
|
512
|
+
"skill": "lancedb-vector-search",
|
|
513
|
+
"invoke": "Skill(\"lancedb-vector-search\")",
|
|
514
514
|
"description": "Vector search operations — semantic search, HNSW, embeddings, nearest neighbor",
|
|
515
515
|
"keywords": [
|
|
516
516
|
"vector search",
|
|
@@ -518,7 +518,7 @@
|
|
|
518
518
|
"hnsw",
|
|
519
519
|
"embedding",
|
|
520
520
|
"similarity",
|
|
521
|
-
"
|
|
521
|
+
"lancedb",
|
|
522
522
|
"nearest"
|
|
523
523
|
],
|
|
524
524
|
"category": "memory",
|
|
@@ -555,38 +555,38 @@
|
|
|
555
555
|
"primaryAgent": "frontend-dev"
|
|
556
556
|
},
|
|
557
557
|
{
|
|
558
|
-
"skill": "
|
|
559
|
-
"invoke": "Skill(\"
|
|
560
|
-
"description": "Advanced
|
|
558
|
+
"skill": "lancedb-advanced",
|
|
559
|
+
"invoke": "Skill(\"lancedb-advanced\")",
|
|
560
|
+
"description": "Advanced LanceDB — QUIC sync, multi-database, custom metrics, distributed systems",
|
|
561
561
|
"keywords": [
|
|
562
|
-
"
|
|
562
|
+
"lancedb",
|
|
563
563
|
"quic",
|
|
564
564
|
"synchronization",
|
|
565
565
|
"distributed",
|
|
566
566
|
"vector-search",
|
|
567
567
|
"multi-database"
|
|
568
568
|
],
|
|
569
|
-
"category": "
|
|
569
|
+
"category": "lancedb",
|
|
570
570
|
"primaryAgent": "coder"
|
|
571
571
|
},
|
|
572
572
|
{
|
|
573
|
-
"skill": "
|
|
574
|
-
"invoke": "Skill(\"
|
|
575
|
-
"description": "
|
|
573
|
+
"skill": "lancedb-learning",
|
|
574
|
+
"invoke": "Skill(\"lancedb-learning\")",
|
|
575
|
+
"description": "LanceDB RL — 9 algorithms: DQN, PPO, Decision Transformer, Q-Learning, SARSA",
|
|
576
576
|
"keywords": [
|
|
577
577
|
"reinforcement-learning",
|
|
578
578
|
"training",
|
|
579
579
|
"rl",
|
|
580
|
-
"
|
|
580
|
+
"lancedb",
|
|
581
581
|
"decision-transformer",
|
|
582
582
|
"q-learning"
|
|
583
583
|
],
|
|
584
|
-
"category": "
|
|
584
|
+
"category": "lancedb",
|
|
585
585
|
"primaryAgent": "ml-developer"
|
|
586
586
|
},
|
|
587
587
|
{
|
|
588
|
-
"skill": "
|
|
589
|
-
"invoke": "Skill(\"
|
|
588
|
+
"skill": "lancedb-memory-patterns",
|
|
589
|
+
"invoke": "Skill(\"lancedb-memory-patterns\")",
|
|
590
590
|
"description": "Persistent memory patterns for stateful agents and context management",
|
|
591
591
|
"keywords": [
|
|
592
592
|
"memory",
|
|
@@ -596,13 +596,13 @@
|
|
|
596
596
|
"sessions",
|
|
597
597
|
"stateful"
|
|
598
598
|
],
|
|
599
|
-
"category": "
|
|
599
|
+
"category": "lancedb",
|
|
600
600
|
"primaryAgent": "coder"
|
|
601
601
|
},
|
|
602
602
|
{
|
|
603
|
-
"skill": "
|
|
604
|
-
"invoke": "Skill(\"
|
|
605
|
-
"description": "
|
|
603
|
+
"skill": "lancedb-optimization",
|
|
604
|
+
"invoke": "Skill(\"lancedb-optimization\")",
|
|
605
|
+
"description": "LanceDB optimization — quantization (4-32x), HNSW (150x faster), caching, batch ops",
|
|
606
606
|
"keywords": [
|
|
607
607
|
"optimization",
|
|
608
608
|
"hnsw",
|
|
@@ -611,7 +611,7 @@
|
|
|
611
611
|
"performance",
|
|
612
612
|
"batch"
|
|
613
613
|
],
|
|
614
|
-
"category": "
|
|
614
|
+
"category": "lancedb",
|
|
615
615
|
"primaryAgent": "coder"
|
|
616
616
|
},
|
|
617
617
|
{
|
|
@@ -731,9 +731,9 @@
|
|
|
731
731
|
"primaryAgent": "coder"
|
|
732
732
|
},
|
|
733
733
|
{
|
|
734
|
-
"skill": "reasoningbank-
|
|
735
|
-
"invoke": "Skill(\"reasoningbank-
|
|
736
|
-
"description": "ReasoningBank adaptive learning with
|
|
734
|
+
"skill": "reasoningbank-lancedb",
|
|
735
|
+
"invoke": "Skill(\"reasoningbank-lancedb\")",
|
|
736
|
+
"description": "ReasoningBank adaptive learning with LanceDB vector search and trajectory tracking",
|
|
737
737
|
"keywords": [
|
|
738
738
|
"reasoningbank",
|
|
739
739
|
"adaptive-learning",
|
|
@@ -741,7 +741,7 @@
|
|
|
741
741
|
"vector-search",
|
|
742
742
|
"verdict"
|
|
743
743
|
],
|
|
744
|
-
"category": "
|
|
744
|
+
"category": "lancedb",
|
|
745
745
|
"primaryAgent": "ml-developer"
|
|
746
746
|
},
|
|
747
747
|
{
|
|
@@ -902,12 +902,12 @@
|
|
|
902
902
|
{
|
|
903
903
|
"skill": "memory-unification",
|
|
904
904
|
"invoke": "Skill(\"memory-unification\")",
|
|
905
|
-
"description": "Unify 6+ memory systems into
|
|
905
|
+
"description": "Unify 6+ memory systems into LanceDB with HNSW indexing (150x-12,500x faster)",
|
|
906
906
|
"keywords": [
|
|
907
907
|
"memory",
|
|
908
908
|
"unification",
|
|
909
909
|
"hnsw",
|
|
910
|
-
"
|
|
910
|
+
"lancedb",
|
|
911
911
|
"hierarchical"
|
|
912
912
|
],
|
|
913
913
|
"category": "memory",
|
|
@@ -283,7 +283,7 @@ function getLearningStats() {
|
|
|
283
283
|
path.join(CWD, '.monomind', 'memory.db'),
|
|
284
284
|
path.join(CWD, '.claude', 'memory.db'),
|
|
285
285
|
path.join(CWD, 'data', 'memory.db'),
|
|
286
|
-
path.join(CWD, '.
|
|
286
|
+
path.join(CWD, '.lancedb', 'memory.db'),
|
|
287
287
|
];
|
|
288
288
|
|
|
289
289
|
for (const dbPath of memoryPaths) {
|
|
@@ -431,7 +431,7 @@ function getSwarmStatus() {
|
|
|
431
431
|
function getSystemMetrics() {
|
|
432
432
|
const memoryMB = Math.floor(process.memoryUsage().heapUsed / 1024 / 1024);
|
|
433
433
|
const learning = getLearningStats();
|
|
434
|
-
const
|
|
434
|
+
const lancedb = getLanceDBStats();
|
|
435
435
|
|
|
436
436
|
// Intelligence from learning.json
|
|
437
437
|
const learningData = readJSON(path.join(CWD, '.monomind', 'metrics', 'learning.json'));
|
|
@@ -443,7 +443,7 @@ function getSystemMetrics() {
|
|
|
443
443
|
} else {
|
|
444
444
|
// Use actual vector/entry counts — 2000 entries = 100%
|
|
445
445
|
const fromPatterns = learning.patterns > 0 ? Math.min(100, Math.floor(learning.patterns / 20)) : 0;
|
|
446
|
-
const fromVectors =
|
|
446
|
+
const fromVectors = lancedb.vectorCount > 0 ? Math.min(100, Math.floor(lancedb.vectorCount / 20)) : 0;
|
|
447
447
|
intelligencePct = Math.max(fromPatterns, fromVectors);
|
|
448
448
|
}
|
|
449
449
|
|
|
@@ -559,8 +559,8 @@ function getActiveAgent() {
|
|
|
559
559
|
} catch { return null; }
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
-
//
|
|
563
|
-
function
|
|
562
|
+
// LanceDB stats — count real entries, not file-size heuristics
|
|
563
|
+
function getLanceDBStats() {
|
|
564
564
|
let vectorCount = 0;
|
|
565
565
|
let dbSizeKB = 0;
|
|
566
566
|
let namespaces = 0;
|
|
@@ -1142,7 +1142,7 @@ function generateDashboard() {
|
|
|
1142
1142
|
const system = getSystemMetrics();
|
|
1143
1143
|
const adrs = getADRStatus();
|
|
1144
1144
|
const hooks = getHooksStatus();
|
|
1145
|
-
const
|
|
1145
|
+
const lancedb = getLanceDBStats();
|
|
1146
1146
|
const tests = getTestStats();
|
|
1147
1147
|
const session = getSessionStats();
|
|
1148
1148
|
const integration = getIntegrationStatus();
|
|
@@ -1288,7 +1288,7 @@ function generateJSON() {
|
|
|
1288
1288
|
system: getSystemMetrics(),
|
|
1289
1289
|
adrs: getADRStatus(),
|
|
1290
1290
|
hooks: getHooksStatus(),
|
|
1291
|
-
|
|
1291
|
+
lancedb: getLanceDBStats(),
|
|
1292
1292
|
tests: getTestStats(),
|
|
1293
1293
|
git: { modified: git.modified, untracked: git.untracked, staged: git.staged, ahead: git.ahead, behind: git.behind },
|
|
1294
1294
|
tokenCost: getTokenCostSummary(),
|
|
@@ -1313,7 +1313,7 @@ if (require.main !== module) {
|
|
|
1313
1313
|
module.exports = {
|
|
1314
1314
|
readJSON, safeStat, modelLabel,
|
|
1315
1315
|
getSecurityStatus, getSwarmStatus, getADRStatus,
|
|
1316
|
-
getHooksStatus, getActiveAgent,
|
|
1316
|
+
getHooksStatus, getActiveAgent, getLanceDBStats,
|
|
1317
1317
|
getLearningStats, getTestStats, getIntegrationStatus,
|
|
1318
1318
|
generateJSON,
|
|
1319
1319
|
};
|
|
@@ -165,7 +165,7 @@ const key = crypto.randomBytes(32).toString('base64');
|
|
|
165
165
|
jj.enableEncryption(key);
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
### 6. Operation Tracking with
|
|
168
|
+
### 6. Operation Tracking with LanceDB
|
|
169
169
|
|
|
170
170
|
Automatic tracking of all operations:
|
|
171
171
|
|
|
@@ -396,7 +396,7 @@ for (let i = 1; i <= 10; i++) {
|
|
|
396
396
|
| `queryTrajectories(task, limit)` | Find similar trajectories | JSON: Trajectory[] |
|
|
397
397
|
| `resetLearning()` | Clear learned data | void |
|
|
398
398
|
|
|
399
|
-
###
|
|
399
|
+
### LanceDB Methods
|
|
400
400
|
|
|
401
401
|
| Method | Description | Returns |
|
|
402
402
|
|--------|-------------|---------|
|
|
@@ -628,7 +628,7 @@ async function agentSwarm(taskList) {
|
|
|
628
628
|
- **GitHub**: https://github.com/monoes/monomind
|
|
629
629
|
- **Full README**: See package README.md
|
|
630
630
|
- **Validation Guide**: docs/VALIDATION_FIXES_v2.3.1.md
|
|
631
|
-
- **
|
|
631
|
+
- **LanceDB Guide**: docs/LANCEDB_GUIDE.md
|
|
632
632
|
|
|
633
633
|
## Version History
|
|
634
634
|
|
|
@@ -29,12 +29,12 @@ This makes delegation recursive: every spawned agent can itself spawn sub-agents
|
|
|
29
29
|
Execute at the START of every mastermind run (master or standalone domain command). Load in this order:
|
|
30
30
|
|
|
31
31
|
**Step A — Tier 3 core principles (all domains):**
|
|
32
|
-
Try `
|
|
33
|
-
If it returns `"
|
|
32
|
+
Try `mcp__monomind__lancedb_hierarchical-recall` with query `"mastermind principles"`, topK 20.
|
|
33
|
+
If it returns `"LanceDB bridge not available"` or any error, fall back to:
|
|
34
34
|
`mcp__monomind__memory_search` with query `"mastermind principles"`, namespace `"mastermind:principles"`, limit 20.
|
|
35
35
|
|
|
36
36
|
**Step B — Tier 2 weekly summary for this domain:**
|
|
37
|
-
Try `
|
|
37
|
+
Try `mcp__monomind__lancedb_context-synthesize` with query `[current prompt keywords]`, maxEntries 10.
|
|
38
38
|
If it fails, fall back to:
|
|
39
39
|
`mcp__monomind__memory_search` with query `[current prompt keywords]`, namespace `"mastermind:<domain>:weekly"`, limit 10.
|
|
40
40
|
|
|
@@ -69,31 +69,31 @@ score = confidence × (1 / (days_since_run + 1)) × log(uses + 1)
|
|
|
69
69
|
- `uses`: 1 (first write)
|
|
70
70
|
|
|
71
71
|
**Step 2 — Append to Tier 1 raw log:**
|
|
72
|
-
Try `
|
|
72
|
+
Try `mcp__monomind__lancedb_hierarchical-store` with:
|
|
73
73
|
- namespace: `mastermind:<domain>:raw`
|
|
74
74
|
- content: [full unified output schema YAML from this run, as a string]
|
|
75
75
|
- metadata: `{ score, project, run_id, date: ISO8601, domain }`
|
|
76
76
|
|
|
77
|
-
If
|
|
77
|
+
If LanceDB is unavailable, fall back to `mcp__monomind__memory_store`:
|
|
78
78
|
- key: `mastermind:<domain>:run:<run_id>`
|
|
79
79
|
- value: [JSON-encoded unified output schema]
|
|
80
80
|
- namespace: `mastermind:<domain>:raw`
|
|
81
81
|
- tags: `["mastermind", "<domain>", "run"]`
|
|
82
82
|
|
|
83
83
|
**Step 3 — Check weekly compaction trigger:**
|
|
84
|
-
Try `
|
|
84
|
+
Try `mcp__monomind__lancedb_health` on namespace `mastermind:<domain>:raw`.
|
|
85
85
|
If unavailable, call `mcp__monomind__memory_stats` and check entry count manually.
|
|
86
86
|
If `entry_count >= 20` OR `days_since_last_compaction >= 7`:
|
|
87
87
|
1. Retrieve all Tier 1 entries since last compaction
|
|
88
88
|
2. Produce a per-domain weekly summary (use LLM synthesis: "Summarize the key decisions, patterns, and lessons from these run logs in under 300 words")
|
|
89
|
-
3. Store summary: `
|
|
89
|
+
3. Store summary: `mcp__monomind__lancedb_hierarchical-store` namespace `mastermind:<domain>:weekly`
|
|
90
90
|
4. Archive (do not delete) Tier 1 entries with score < 0.1 by updating their metadata: `{ archived: true }`
|
|
91
91
|
|
|
92
92
|
**Step 4 — Check graph consolidation trigger:**
|
|
93
93
|
Call `mcp__monomind__monograph_community` for nodes matching `mastermind:<domain>`.
|
|
94
94
|
If 3+ similar memory nodes are detected in a cluster:
|
|
95
95
|
1. Merge into a single principle via LLM: "Distill these memories into one clear principle in 1-2 sentences"
|
|
96
|
-
2. Store principle: `
|
|
96
|
+
2. Store principle: `mcp__monomind__lancedb_hierarchical-store` namespace `mastermind:principles`
|
|
97
97
|
3. Add `EXCEPTION` edge in Monograph for any conflicting memory: `mcp__monomind__monograph_add_fact`
|
|
98
98
|
|
|
99
99
|
---
|
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ flowchart TD
|
|
|
66
66
|
R["Reviewer"]
|
|
67
67
|
M["Growth Marketer"]
|
|
68
68
|
BOARD[("Shared\nTask Board")]
|
|
69
|
-
MEM[("
|
|
69
|
+
MEM[("LanceDB\nMemory")]
|
|
70
70
|
|
|
71
71
|
U --> CO --> RO --> BOSS
|
|
72
72
|
BOSS -->|spawns| W
|
|
@@ -126,7 +126,7 @@ Type "go" to save, or describe changes.
|
|
|
126
126
|
| **Boss agent** | Coordinator type, no supervisor — owns the goal |
|
|
127
127
|
| **Role agents** | Spawned on demand, specialized by task type |
|
|
128
128
|
| **Task board** | Todo → Doing → Done, shared across all agents |
|
|
129
|
-
| **Memory** | All output stored in org-scoped
|
|
129
|
+
| **Memory** | All output stored in org-scoped LanceDB namespace |
|
|
130
130
|
| **Checkpoint** | State saved every 30 min — survives crashes and restarts |
|
|
131
131
|
| **Governance** | `auto` (free), `board` (approve sensitive), `strict` (approve all external actions) |
|
|
132
132
|
|
|
@@ -221,13 +221,13 @@ Open Claude Code. You now have 80+ slash commands available:
|
|
|
221
221
|
|
|
222
222
|
## 🧠 Memory That Persists
|
|
223
223
|
|
|
224
|
-
Every session, every agent, every org writes to **
|
|
224
|
+
Every session, every agent, every org writes to **LanceDB** — a hybrid SQLite + HNSW vector store that survives across sessions. The next time you run anything, Monomind already knows what was built, what failed, and which patterns work.
|
|
225
225
|
|
|
226
226
|
```mermaid
|
|
227
227
|
graph TD
|
|
228
228
|
L0["L0 - In-flight\nCurrent session drawers\nephemeral"]
|
|
229
229
|
L1["L1 - Working\nCross-session memory\nBM25 K1=1.5, B=0.75"]
|
|
230
|
-
L2["L2 - Long-term\
|
|
230
|
+
L2["L2 - Long-term\nLanceDB + HNSW index\nSemantic search"]
|
|
231
231
|
L3["L3 - Shared\nCross-agent namespace\nFederated swarm reads"]
|
|
232
232
|
|
|
233
233
|
L0 -->|promoted| L1 --> L2 --> L3
|
|
@@ -275,7 +275,7 @@ flowchart LR
|
|
|
275
275
|
H --> I["route\nlearn\nbuild-agents"]
|
|
276
276
|
H --> T["teammate-idle\ntask-completed"]
|
|
277
277
|
|
|
278
|
-
I --> DB[("
|
|
278
|
+
I --> DB[("LanceDB\npatterns.json")]
|
|
279
279
|
DB -->|next session| CE
|
|
280
280
|
```
|
|
281
281
|
|
|
@@ -358,7 +358,7 @@ graph TD
|
|
|
358
358
|
CC <-->|"23 tools: monograph, memory, swarm"| MCP
|
|
359
359
|
MCP <--> D
|
|
360
360
|
|
|
361
|
-
D --> ADB[("
|
|
361
|
+
D --> ADB[("LanceDB\nSQLite + HNSW")]
|
|
362
362
|
D --> MG[("Monograph\ncode graph")]
|
|
363
363
|
D --> HK["Hooks\n22 event types"]
|
|
364
364
|
D --> SW["Swarm\n6 topologies\n5 consensus algos"]
|
|
@@ -38,7 +38,24 @@ function mockPage(url = 'https://linkedin.com/feed', title = 'LinkedIn') {
|
|
|
38
38
|
describe('analyzePageForAction', () => {
|
|
39
39
|
let analyzePageForAction;
|
|
40
40
|
beforeEach(async () => {
|
|
41
|
-
mockCreate.
|
|
41
|
+
mockCreate.mockResolvedValue({
|
|
42
|
+
content: [{
|
|
43
|
+
type: 'text',
|
|
44
|
+
text: JSON.stringify({
|
|
45
|
+
id: 'linkedin:comment_post',
|
|
46
|
+
platform: 'linkedin',
|
|
47
|
+
name: 'Comment on Post',
|
|
48
|
+
params: ['post_url', 'text'],
|
|
49
|
+
steps: [
|
|
50
|
+
{ type: 'navigate', url: '{{params.post_url}}' },
|
|
51
|
+
{ type: 'find', selectors: ['.comment-box'], as: 'box' },
|
|
52
|
+
{ type: 'click', target: '{{box}}' },
|
|
53
|
+
{ type: 'type', target: '{{box}}', text: '{{params.text}}', humanDelay: true },
|
|
54
|
+
{ type: 'wait', condition: 'network_idle', timeout: 3000 },
|
|
55
|
+
],
|
|
56
|
+
}),
|
|
57
|
+
}],
|
|
58
|
+
});
|
|
42
59
|
const mod = await import('@monoes/monobrowse');
|
|
43
60
|
analyzePageForAction = mod.analyzePageForAction;
|
|
44
61
|
});
|