@veedubin/boomerang-v3 0.4.2 → 0.5.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.
@@ -16,13 +16,12 @@ permission:
16
16
  question: allow
17
17
  doom_loop: allow
18
18
  tool:
19
- "memini-ai-dev_*": allow
20
- "searxng_*": allow
21
- "markitdown_*": allow
22
- "github-mcp_*": allow
23
- "playwright_*": allow
24
- "webfetch": allow
25
- "websearch": allow
19
+ "memini-ai-dev_query_memories": allow
20
+ "memini-ai-dev_add_memory": allow
21
+ "memini-ai-dev_search_project": allow
22
+ "memini-ai-dev_query_kg": allow
23
+ "memini-ai-dev_extract_entities": allow
24
+ "skill": allow
26
25
  edit: allow
27
26
  bash:
28
27
  "basename *": allow
@@ -16,13 +16,29 @@ permission:
16
16
  question: allow
17
17
  doom_loop: allow
18
18
  tool:
19
- "memini-ai-dev_*": allow
20
- "searxng_*": allow
21
- "markitdown_*": allow
22
- "github-mcp_*": allow
23
- "playwright_*": allow
24
- "webfetch": allow
25
- "websearch": allow
19
+ # Full memory suite
20
+ "memini-ai-dev_query_memories": allow
21
+ "memini-ai-dev_add_memory": allow
22
+ "memini-ai-dev_get_status": allow
23
+ "memini-ai-dev_adjust_trust": allow
24
+ "memini-ai-dev_get_trust_score": allow
25
+ # Full KG suite (research authority)
26
+ "memini-ai-dev_query_kg": allow
27
+ "memini-ai-dev_extract_entities": allow
28
+ "memini-ai-dev_get_entity_graph": allow
29
+ "memini-ai-dev_get_inference_chain": allow
30
+ "memini-ai-dev_search_entities": allow
31
+ "memini-ai-dev_create_relationship": allow
32
+ "memini-ai-dev_get_relationship_summary": allow
33
+ # Thought chains
34
+ "memini-ai-dev_add_thought": allow
35
+ "memini-ai-dev_start_thought_chain": allow
36
+ # Project search
37
+ "memini-ai-dev_search_project": allow
38
+ "memini-ai-dev_index_project": allow
39
+ "memini-ai-dev_get_file_contents": allow
40
+ # Markitdown for doc review
41
+ "markitdown_convert_to_markdown": allow
26
42
  edit: allow
27
43
  bash:
28
44
  "basename *": allow
@@ -16,13 +16,14 @@ permission:
16
16
  question: allow
17
17
  doom_loop: allow
18
18
  tool:
19
- "memini-ai-dev_*": allow
20
- "searxng_*": allow
21
- "markitdown_*": allow
22
- "github-mcp_*": allow
23
- "playwright_*": allow
24
- "webfetch": allow
25
- "websearch": allow
19
+ "memini-ai-dev_query_memories": allow
20
+ "memini-ai-dev_add_memory": allow
21
+ "memini-ai-dev_get_status": allow
22
+ "memini-ai-dev_adjust_trust": allow
23
+ "memini-ai-dev_get_trust_score": allow
24
+ "memini-ai-dev_add_thought": allow
25
+ "memini-ai-dev_start_thought_chain": allow
26
+ "memini-ai-dev_search_project": allow
26
27
  edit: allow
27
28
  bash:
28
29
  "basename *": allow
@@ -16,13 +16,9 @@ permission:
16
16
  question: allow
17
17
  doom_loop: allow
18
18
  tool:
19
- "memini-ai-dev_*": allow
20
- "searxng_*": allow
21
- "markitdown_*": allow
22
- "github-mcp_*": allow
23
- "playwright_*": allow
24
- "webfetch": allow
25
- "websearch": allow
19
+ "memini-ai-dev_search_project": allow
20
+ "memini-ai-dev_index_project": allow
21
+ "memini-ai-dev_get_file_contents": allow
26
22
  edit: deny
27
23
  bash:
28
24
  "ls *": allow
@@ -16,13 +16,16 @@ permission:
16
16
  question: allow
17
17
  doom_loop: allow
18
18
  tool:
19
- "memini-ai-dev_*": allow
20
- "searxng_*": allow
21
- "markitdown_*": allow
22
- "github-mcp_*": allow
23
- "playwright_*": allow
24
- "webfetch": allow
25
- "websearch": allow
19
+ "memini-ai-dev_query_memories": allow
20
+ "memini-ai-dev_add_memory": allow
21
+ # GH MCP for remote operations
22
+ "github-mcp_create_branch": allow
23
+ "github-mcp_create_or_update_file": allow
24
+ "github-mcp_push_files": allow
25
+ "github-mcp_get_file_contents": allow
26
+ "github-mcp_create_pull_request": allow
27
+ "github-mcp_create_issue": allow
28
+ "github-mcp_update_issue": allow
26
29
  edit: deny
27
30
  bash:
28
31
  "git *": allow
@@ -16,13 +16,12 @@ permission:
16
16
  question: allow
17
17
  doom_loop: allow
18
18
  tool:
19
- "memini-ai-dev_*": allow
20
- "searxng_*": allow
21
- "markitdown_*": allow
22
- "github-mcp_*": allow
23
- "playwright_*": allow
24
- "webfetch": allow
25
- "websearch": allow
19
+ "memini-ai-dev_query_memories": allow
20
+ "memini-ai-dev_add_memory": allow
21
+ "memini-ai-dev_get_tier0_summary": allow
22
+ "memini-ai-dev_get_tier1_summary": allow
23
+ "memini-ai-dev_adjust_trust": allow
24
+ "memini-ai-dev_get_trust_score": allow
26
25
  edit: allow
27
26
  bash:
28
27
  "basename *": allow
@@ -16,13 +16,11 @@ permission:
16
16
  question: allow
17
17
  doom_loop: allow
18
18
  tool:
19
- "memini-ai-dev_*": allow
20
- "searxng_*": allow
21
- "markitdown_*": allow
22
- "github-mcp_*": allow
23
- "playwright_*": allow
24
- "webfetch": allow
25
- "websearch": allow
19
+ "memini-ai-dev_query_memories": allow
20
+ "memini-ai-dev_get_tier0_summary": allow
21
+ "memini-ai-dev_get_tier1_summary": allow
22
+ "memini-ai-dev_list_peers": allow
23
+ "memini-ai-dev_get_user_profile": allow
26
24
  edit: allow
27
25
  bash:
28
26
  "basename *": allow
@@ -16,13 +16,8 @@ permission:
16
16
  question: allow
17
17
  doom_loop: allow
18
18
  tool:
19
- "memini-ai-dev_*": allow
20
- "searxng_*": allow
21
- "markitdown_*": allow
22
- "github-mcp_*": allow
23
- "playwright_*": allow
24
- "webfetch": allow
25
- "websearch": allow
19
+ "memini-ai-dev_query_memories": allow
20
+ "memini-ai-dev_add_memory": allow
26
21
  edit: allow
27
22
  bash:
28
23
  "basename *": allow
@@ -16,13 +16,10 @@ permission:
16
16
  question: allow
17
17
  doom_loop: allow
18
18
  tool:
19
- "memini-ai-dev_*": allow
20
- "searxng_*": allow
21
- "markitdown_*": allow
22
- "github-mcp_*": allow
23
- "playwright_*": allow
24
- "webfetch": allow
25
- "websearch": allow
19
+ "memini-ai-dev_query_memories": allow
20
+ "memini-ai-dev_add_memory": allow
21
+ "memini-ai-dev_adjust_trust": allow
22
+ "memini-ai-dev_get_trust_score": allow
26
23
  edit: allow
27
24
  bash:
28
25
  "basename *": allow
@@ -43,6 +40,35 @@ You are the **Boomerang Release** - release automation specialist.
43
40
  3. **Git tags** - Create and push tags
44
41
  4. **Publish** - npm publish, uv pip install
45
42
 
43
+ ## MANDATORY: Version Bump Checklist (NEVER SKIP)
44
+
45
+ For EVERY release, you MUST verify ALL of these files have been updated. Use `grep` to find remaining old versions:
46
+
47
+ **Boomerang-v3 Files:**
48
+ - [ ] `package.json` — `"version": "X.Y.Z"`
49
+ - [ ] `README.md` — Badge URL + release notes + `npx @veedubin/boomerang-v3` references
50
+ - [ ] `AGENTS.md` — Add release note entry in `## Review Notes`
51
+ - [ ] `TASKS.md` — Add entry in completed task table + update "Latest release" quick refs
52
+ - [ ] `CONTEXT.md` — Update version in status table and `Last Updated` header
53
+ - [ ] `scripts/install-boomerang.js` — Any version constants
54
+ - [ ] `.opencode/opencode.json` — Any plugin version references
55
+
56
+ **memini-ai-dev Files:**
57
+ - [ ] `pyproject.toml` — `[project] version = "X.Y.Z"`
58
+ - [ ] `README.md` — Version badge + release notes
59
+ - [ ] `AGENTS.md` (if exists) — Release note entry
60
+
61
+ **Root Monorepo Files (if changed):**
62
+ - [ ] `AGENTS.md` (root) — Match boomerang-v3/AGENTS.md
63
+ - [ ] `TASKS.md` (root) — Match boomerang-v3/TASKS.md
64
+ - [ ] `CONTEXT.md` (root) — Match boomerang-v3/CONTEXT.md
65
+
66
+ **Verification Command (ALWAYS RUN):**
67
+ ```bash
68
+ grep -rn "v0.OLD.X" . --include="*.json" --include="*.md" | grep -v node_modules | grep -v package-lock | grep -v "History"
69
+ ```
70
+ ↑ Replace `0.OLD.X` with the PREVIOUS version. If any non-historical reference remains, fix it before committing.
71
+
46
72
  ## Release Process
47
73
 
48
74
  ### Python (memini-ai-dev)
@@ -16,13 +16,11 @@ permission:
16
16
  question: allow
17
17
  doom_loop: allow
18
18
  tool:
19
- "memini-ai-dev_*": allow
20
- "searxng_*": allow
21
- "markitdown_*": allow
22
- "github-mcp_*": allow
23
- "playwright_*": allow
24
- "webfetch": allow
25
- "websearch": allow
19
+ "memini-ai-dev_query_memories": allow
20
+ "memini-ai-dev_add_memory": allow
21
+ "memini-ai-dev_adjust_trust": allow
22
+ "memini-ai-dev_get_trust_score": allow
23
+ "memini-ai-dev_search_project": allow
26
24
  edit: allow
27
25
  bash:
28
26
  "basename *": allow
@@ -16,13 +16,9 @@ permission:
16
16
  question: allow
17
17
  doom_loop: allow
18
18
  tool:
19
- "memini-ai-dev_*": allow
20
- "searxng_*": allow
21
- "markitdown_*": allow
22
- "github-mcp_*": allow
23
- "playwright_*": allow
24
- "webfetch": allow
25
- "websearch": allow
19
+ "memini-ai-dev_query_memories": allow
20
+ "memini-ai-dev_add_memory": allow
21
+ "memini-ai-dev_get_tier0_summary": allow
26
22
  edit: allow
27
23
  bash:
28
24
  "ls *": allow
@@ -16,13 +16,19 @@ permission:
16
16
  question: allow
17
17
  doom_loop: allow
18
18
  tool:
19
- "memini-ai-dev_*": allow
20
- "searxng_*": allow
21
- "markitdown_*": allow
22
- "github-mcp_*": allow
23
- "playwright_*": allow
24
- "webfetch": allow
25
- "websearch": allow
19
+ # Core memory operations
20
+ "memini-ai-dev_query_memories": allow
21
+ "memini-ai-dev_add_memory": allow
22
+ "memini-ai-dev_get_status": allow
23
+ "memini-ai-dev_adjust_trust": allow
24
+ "memini-ai-dev_get_trust_score": allow
25
+ "memini-ai-dev_list_peers": allow
26
+ # Thought chains for planning
27
+ "memini-ai-dev_add_thought": allow
28
+ "memini-ai-dev_start_thought_chain": allow
29
+ "memini-ai-dev_get_thought_chain": allow
30
+ "memini-ai-dev_pause_thought_chain": allow
31
+ "memini-ai-dev_resume_thought_chain": allow
26
32
  edit: allow
27
33
  bash:
28
34
  "*": ask
@@ -16,13 +16,10 @@ permission:
16
16
  question: allow
17
17
  doom_loop: allow
18
18
  tool:
19
- "memini-ai-dev_*": allow
20
- "searxng_*": allow
21
- "markitdown_*": allow
22
- "github-mcp_*": allow
23
- "playwright_*": allow
24
- "webfetch": allow
25
- "websearch": allow
19
+ "memini-ai-dev_query_memories": allow
20
+ "memini-ai-dev_add_memory": allow
21
+ "memini-ai-dev_query_kg": allow
22
+ "memini-ai-dev_extract_entities": allow
26
23
  edit: allow
27
24
  bash:
28
25
  "ls *": allow
package/AGENTS.md CHANGED
@@ -385,6 +385,9 @@ IDLE → MEMORY_QUERY → SEQUENTIAL_THINK → PLAN → DELEGATE → GIT_CHECK
385
385
 
386
386
  ## Review Notes
387
387
 
388
+ - **2026-05-21**: **boomerang-v3 v0.5.0 RELEASED** — Agent permission overhaul v0.5.0: replaced wildcard tool patterns with explicit allow-lists per agent role. Security improvements: boomerang-release local-only, boomerang-git gets remote GitHub MCP. ~57-73% token reduction per request.
389
+ - **2026-05-20**: **boomerang-v3 v0.4.3 RELEASED** — Fixed critical env var mismatch for thought chains: `MEMINI_THOUGHT_CHAINS_ENABLED` → `THOUGHT_CHAINS`. The memini-ai server uses `alias="THOUGHT_CHAINS"` (not `MEMINI_THOUGHT_CHAINS_ENABLED`). Requires OpenCode restart to load the corrected config.
390
+ - **2026-05-20**: **boomerang-v3 v0.4.2 RELEASED** — Removed deprecated `sequential-thinking` references from README, skills, and orchestrator SKILL.md. Added `MEMINI_THOUGHT_CHAINS_ENABLED: "true"` to root `opencode.json` (later corrected to `THOUGHT_CHAINS`).
388
391
  - **2026-05-19**: **boomerang-v3 v0.4.1 RELEASED** — Documentation refreshed, stale version references updated across monorepo. package.json bumped from v0.4.0 → v0.4.1.
389
392
  - **2026-05-19**: **boomerang-v3 v0.4.0 RELEASED** — Lint fixes (13 ESLint errors), context buffer added, telemetry client added. 127/127 tests passing, 0 lint errors. Git tag `v0.4.0` pushed. npm publish failed: invalid/missing `NPM_PUBLISH_TOKEN` in GitHub Actions secrets.
390
393
  - **2026-05-19**: **boomerang-v3 v0.3.2 UPDATED** — Agent bash permissions expanded: `basename`, `diff`, `cp`, `which` added. Orchestrator clarified: CAN edit docs, delegates code. Parallel execution guidance added. All 30 agent files synced between `.opencode/agents/` and `boomerang-v3/.opencode/agents/`.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
4
4
  [![OpenCode Plugin](https://img.shields.io/badge/OpenCode-Plugin-ff6b35?style=flat-square)](https://opencode.ai)
5
5
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue?style=flat-square)](https://www.typescriptlang.org/)
6
- [![v0.4.1](https://img.shields.io/badge/v0.4.1-memini--ai-2ecc71?style=flat-square)](https://github.com/Veedubin/Boomerang-v3/releases/tag/v0.4.1)
6
+ [![v0.5.0](https://img.shields.io/badge/v0.5.0-memini--ai-2ecc71?style=flat-square)](https://github.com/Veedubin/Boomerang-v3/releases/tag/v0.5.0)
7
7
 
8
8
  *Intelligent multi-agent coordination for OpenCode with memini-ai memory.*
9
9
 
@@ -31,7 +31,9 @@
31
31
  - **Tiered loading (L0/L1/L2)** — Efficient context abstraction
32
32
  - **Contradiction detection** — Find and resolve conflicting memories
33
33
  - **Knowledge graph integration** — Entity extraction and inference
34
- - **Python-based memini-ai** — Modern memory server with FastMCP
34
+ - **Thought Chains** — Structured reasoning traces for complex problem solving
35
+ - **Multi-Peer & Dialectic Memory** — Collaborative memory sharing and dialectic resolution
36
+ - **Python-based memini-ai** — Modern memory server with FastMCP ([PyPI](https://pypi.org/project/memini-ai-dev/))
35
37
 
36
38
  ---
37
39
 
@@ -47,7 +49,7 @@ memini-ai includes a live D3.js visualization for the knowledge graph:
47
49
 
48
50
  ```bash
49
51
  cd memini-ai-dev
50
- export MEMINI_DB_URL="postgresql://postgres:password@localhost:5432/postgres"
52
+ export MEMINI_DB_URL="postgresql://user:password@localhost:5432/postgres" # Set your actual DB URL
51
53
  uvx --from memini-ai-dev memini-ai --server --port 8000
52
54
  ```
53
55
 
@@ -63,7 +65,7 @@ npm install @veedubin/boomerang-v3
63
65
 
64
66
  ### Configuration
65
67
 
66
- Add to your `.opencode/opencode.json`:
68
+ Add to your `.opencode/opencode.json`. If using **Ollama Cloud**, ensure your provider is configured with `baseURL: "https://ollama.com/v1"`.
67
69
 
68
70
  ```json
69
71
  {
@@ -73,7 +75,7 @@ Add to your `.opencode/opencode.json`:
73
75
  "type": "local",
74
76
  "command": ["uvx", "--from", "memini-ai-dev", "memini-ai", "--stdio"],
75
77
  "environment": {
76
- "MEMINI_DB_URL": "postgresql://postgres:password@localhost:5434/postgres",
78
+ "MEMINI_DB_URL": "{env:MEMINI_DB_URL}",
77
79
  "MEMINI_EMBEDDING_DIM": "384",
78
80
  "MEMINI_TRUST_ENGINE": "true",
79
81
  "MEMINI_MEMORY_GRAPH": "true",
@@ -85,7 +87,7 @@ Add to your `.opencode/opencode.json`:
85
87
  "MEMINI_DECAY_ENABLED": "true",
86
88
  "MEMINI_MULTI_PEER_ENABLED": "true",
87
89
  "MEMINI_DIALECTIC_ENABLED": "true",
88
- "MEMINI_THOUGHT_CHAINS_ENABLED": "true"
90
+ "THOUGHT_CHAINS": "true"
89
91
  },
90
92
  "timeout": 60000,
91
93
  "enabled": true
@@ -98,7 +100,7 @@ Add to your `.opencode/opencode.json`:
98
100
 
99
101
  | Variable | Description | Default |
100
102
  |----------|-------------|---------|
101
- | `MEMINI_DB_URL` | PostgreSQL connection URL | `postgresql://postgres:password@localhost:5432/postgres` |
103
+ | `MEMINI_DB_URL` | PostgreSQL connection URL | Set via `.env` (see `.env.example`) |
102
104
  | `MEMINI_PROJECT_ID` | Project namespace | auto-generated |
103
105
  | `MEMINI_EMBEDDING_DIM` | 1024 or 384 | 1024 |
104
106
  | `MEMINI_DEVICE` | auto, gpu, cpu | auto |
@@ -115,7 +117,7 @@ Add to your `.opencode/opencode.json`:
115
117
  ```bash
116
118
  docker run -d --name postgres-test \
117
119
  -e POSTGRES_PASSWORD=password \
118
- -p 5432:5432 \
120
+ -p 5434:5432 \
119
121
  timescale/timescaledb:latest-pg15
120
122
  ```
121
123
 
@@ -123,7 +125,7 @@ docker run -d --name postgres-test \
123
125
 
124
126
  ```bash
125
127
  cd memini-ai-dev
126
- export MEMINI_DB_URL="postgresql://postgres:password@localhost:5432/postgres"
128
+ export MEMINI_DB_URL="postgresql://user:password@localhost:5434/postgres" # Set your actual DB URL
127
129
  uvx --from memini-ai-dev memini-ai --stdio
128
130
  ```
129
131
 
@@ -291,11 +293,10 @@ boomerang-v3/
291
293
 
292
294
  ## Release History
293
295
 
296
+ - **v0.5.0** — Agent permission overhaul: replaced wildcard tool patterns with explicit allow-lists per agent role. Security fix: boomerang-release no longer has GitHub MCP access (local-only). boomerang-git now has explicit GitHub MCP tools for remote operations. ~57-73% reduction in tool description tokens per request.
297
+ - **v0.4.3** — Fixed critical env var mismatch for thought chains: `MEMINI_THOUGHT_CHAINS_ENABLED` → `THOUGHT_CHAINS`
298
+ - **v0.4.2** — Removed deprecated `sequential-thinking` references, cleaned up orchestrator SKILL.md
294
299
  - **v0.4.1** — Documentation refresh, stale version references corrected across monorepo
295
- - **v3.0.0** — memini-ai integration: Trust engine, knowledge graph, tiered loading, PostgreSQL/pgvector
296
- - **v4.0.0** (boomerang-v2) — Orchestrator as pure decision layer, OpenCode handles execution
297
- - **v3.0.0** (boomerang-v2) — LanceDB → Qdrant migration
298
- - **v2.0.0** (boomerang-v2) — First stable with built-in memory
299
300
 
300
301
  ---
301
302
 
@@ -10,6 +10,97 @@
10
10
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
11
11
  import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
12
12
  // ============================================================================
13
+ // Security: Environment Variable Allowlist
14
+ // ============================================================================
15
+ // Only pass explicitly whitelisted environment variables to the child Python
16
+ // process. This prevents leaking secrets like GITHUB_PERSONAL_ACCESS_TOKEN,
17
+ // OLLAMA_API_KEY, or any other sensitive env vars from the OpenCode parent
18
+ // process. See SECURITY.md H4 for rationale.
19
+ //
20
+ // The memini-ai-dev Python server uses pydantic-settings with env_prefix="MEMINI_"
21
+ // and explicit aliases for some vars. Only vars that the child process actually
22
+ // needs are included here.
23
+ // ============================================================================
24
+ const ALLOWED_ENV_VARS = [
25
+ // Python runtime
26
+ 'PYTHONUNBUFFERED', // Always set to '1' for unbuffered output
27
+ 'PATH', // Required for Python to find executables
28
+ 'HOME', // Required for Python to find user home (pip cache, etc.)
29
+ 'LANG', // Locale setting for Python
30
+ 'LC_ALL', // Locale override for Python
31
+ 'PYTHONPATH', // Python module search path (if set)
32
+ 'VIRTUAL_ENV', // Virtual environment path (if running in venv)
33
+ // memini-ai-dev database connection
34
+ 'MEMINI_DB_URL', // PostgreSQL connection string (primary config)
35
+ 'DB_SSLMODE', // PostgreSQL SSL mode (alias, no MEMINI_ prefix)
36
+ 'DB_SSLROOTCERT', // Path to SSL root certificate (alias)
37
+ // memini-ai-dev feature gates (pydantic-settings aliases)
38
+ 'THOUGHT_CHAINS', // Enable persistent thought chains
39
+ 'TRUST_ENGINE', // Enable trust scoring
40
+ 'MEMORY_GRAPH', // Enable memory graph
41
+ 'AUTO_EXTRACT', // Enable auto-extraction
42
+ 'AUTO_EXTRACT_TURNS', // Turns between auto-extractions
43
+ 'TIERED_LOADING', // Enable tiered loading
44
+ 'TIER0_MAX_TOKENS', // Tier 0 max tokens
45
+ 'TIER1_MAX_TOKENS', // Tier 1 max tokens
46
+ 'KG_ENABLED', // Enable knowledge graph
47
+ 'MULTI_PEER_ENABLED', // Enable multi-peer
48
+ 'MULTI_PEER_GUEST_SHARING', // Allow guest sharing
49
+ 'DIALECTIC_ENABLED', // Enable dialectic reasoning
50
+ 'DECAY_ENABLED', // Enable memory decay
51
+ 'USER_MODELING', // Enable user modeling
52
+ // memini-ai-dev MEMINI_-prefixed config (pydantic env_prefix)
53
+ 'MEMINI_PRECISION', // Model precision (fp16, fp32)
54
+ 'MEMINI_DEVICE', // Device override (cpu, cuda, etc.)
55
+ 'MEMINI_USE_GPU', // Use GPU flag
56
+ 'MEMINI_EMBEDDING_DIM', // Embedding dimension (384 or 1024)
57
+ 'MEMINI_BATCH_SIZE', // Batch size for embedding
58
+ 'MEMINI_TABLE_NAME', // Database table name
59
+ 'MEMINI_PROJECT_ID', // Project ID
60
+ 'MEMINI_LOG_LEVEL', // Logging level
61
+ 'MEMINI_CHUNK_SIZE', // Indexer chunk size
62
+ 'MEMINI_CHUNK_OVERLAP', // Indexer chunk overlap
63
+ 'MEMINI_DB_POOL_SIZE', // DB pool size
64
+ 'MEMINI_DB_MIN_SIZE', // DB min pool size
65
+ 'MEMINI_DB_MAX_SIZE', // DB max pool size
66
+ 'MEMINI_TRUST_THRESHOLD_ARCHIVE', // Trust archive threshold
67
+ 'MEMINI_TRUST_THRESHOLD_PROMOTE', // Trust promote threshold
68
+ 'MEMINI_TRUST_DELTA_USE', // Trust delta on use
69
+ 'MEMINI_TRUST_DELTA_IGNORED', // Trust delta on ignore
70
+ 'MEMINI_TRUST_DELTA_CORRECT', // Trust delta on correction
71
+ 'MEMINI_TRUST_DELTA_CONFIRM', // Trust delta on confirmation
72
+ 'MEMINI_WORKERS', // Worker count
73
+ 'MEMINI_LLM_URL', // LLM URL (alias: LLM_URL)
74
+ // LLM configuration (aliases without MEMINI_ prefix)
75
+ 'LLM_URL', // LLM URL for dialectic reasoning
76
+ 'LLM_MODEL', // LLM model for dialectic reasoning
77
+ // HuggingFace / sentence-transformers cache
78
+ 'SENTENCE_TRANSFORMERS_CACHE', // Model cache directory
79
+ 'TRANSFORMERS_CACHE', // HuggingFace transformers cache
80
+ 'HF_HOME', // HuggingFace home directory
81
+ ];
82
+ /**
83
+ * Build a minimal environment object for the child Python process.
84
+ * Only includes whitelisted variables that exist in process.env.
85
+ * This prevents leaking secrets like GITHUB_PERSONAL_ACCESS_TOKEN or
86
+ * OLLAMA_API_KEY to child processes.
87
+ */
88
+ function buildChildEnv() {
89
+ const env = {
90
+ PYTHONUNBUFFERED: '1', // Always required for unbuffered Python output
91
+ };
92
+ for (const key of ALLOWED_ENV_VARS) {
93
+ // Skip PYTHONUNBUFFERED since we always set it above
94
+ if (key === 'PYTHONUNBUFFERED')
95
+ continue;
96
+ const value = process.env[key];
97
+ if (value !== undefined && value !== '') {
98
+ env[key] = value;
99
+ }
100
+ }
101
+ return env;
102
+ }
103
+ // ============================================================================
13
104
  // MeminiClient - Persistent MCP stdio Client
14
105
  // ============================================================================
15
106
  /**
@@ -76,10 +167,11 @@ export class MeminiClient {
76
167
  }
77
168
  try {
78
169
  // Create stdio transport - SDK handles process spawning
170
+ // Security: Only pass whitelisted env vars (see ALLOWED_ENV_VARS above)
79
171
  this._transport = new StdioClientTransport({
80
172
  command: 'python',
81
173
  args: ['-m', 'memini_ai.server'],
82
- env: { ...process.env, PYTHONUNBUFFERED: '1' },
174
+ env: buildChildEnv(),
83
175
  });
84
176
  // Create MCP client
85
177
  this._mcpClient = new Client({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veedubin/boomerang-v3",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "Multi-agent orchestration plugin for OpenCode with memini-ai memory",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -77,7 +77,7 @@ const MCP_TEMPLATES = {
77
77
  type: 'local',
78
78
  command: ['uvx', '--from', 'memini-ai-dev', 'memini-ai', '--stdio'],
79
79
  environment: {
80
- MEMINI_DB_URL: 'postgresql://postgres:password@localhost:5434/postgres',
80
+ MEMINI_DB_URL: process.env.MEMINI_DB_URL || 'postgresql://user:password@localhost:5434/postgres',
81
81
  MEMINI_EMBEDDING_DIM: '384',
82
82
  MEMINI_TRUST_ENGINE: 'true',
83
83
  MEMINI_MEMORY_GRAPH: 'true',
@@ -97,7 +97,7 @@ const MCP_TEMPLATES = {
97
97
  type: 'local',
98
98
  command: ['uv', 'run', '--project', './boomerang-queue', 'python', '-m', 'boomerang_queue', '--stdio'],
99
99
  environment: {
100
- MEMINI_DB_URL: 'postgresql://postgres:password@localhost:5434/postgres',
100
+ MEMINI_DB_URL: process.env.MEMINI_DB_URL || 'postgresql://user:password@localhost:5434/postgres',
101
101
  BOOMERANG_TENANT_ID: 'default',
102
102
  },
103
103
  timeout: 60000,