@syntesseraai/opencode-feature-factory 0.2.45 → 0.3.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.
Files changed (63) hide show
  1. package/README.md +27 -0
  2. package/agents/building.md +13 -15
  3. package/agents/ff-acceptance.md +12 -17
  4. package/agents/ff-research.md +12 -17
  5. package/agents/ff-review.md +12 -17
  6. package/agents/ff-security.md +12 -17
  7. package/agents/ff-validate.md +12 -17
  8. package/agents/ff-well-architected.md +12 -17
  9. package/agents/planning.md +12 -25
  10. package/agents/reviewing.md +12 -25
  11. package/bin/ff-deploy.js +5 -0
  12. package/bin/ff-local-recall-mcp.js +9 -0
  13. package/dist/index.js +22 -7
  14. package/dist/local-recall/daemon-controller.d.ts +51 -0
  15. package/dist/local-recall/daemon-controller.js +166 -0
  16. package/dist/local-recall/daemon.d.ts +35 -0
  17. package/dist/local-recall/daemon.js +188 -0
  18. package/dist/local-recall/index-state.d.ts +14 -0
  19. package/dist/local-recall/index-state.js +76 -0
  20. package/dist/local-recall/index.d.ts +20 -0
  21. package/dist/local-recall/index.js +27 -0
  22. package/dist/local-recall/mcp-server.d.ts +34 -0
  23. package/dist/local-recall/mcp-server.js +190 -0
  24. package/dist/local-recall/mcp-stdio-server.d.ts +4 -0
  25. package/dist/local-recall/mcp-stdio-server.js +225 -0
  26. package/dist/local-recall/mcp-tools.d.ts +103 -0
  27. package/dist/local-recall/mcp-tools.js +187 -0
  28. package/dist/local-recall/memory-service.d.ts +31 -0
  29. package/dist/local-recall/memory-service.js +156 -0
  30. package/dist/local-recall/model-router.d.ts +23 -0
  31. package/dist/local-recall/model-router.js +41 -0
  32. package/dist/local-recall/processed-log.d.ts +41 -0
  33. package/dist/local-recall/processed-log.js +82 -0
  34. package/dist/local-recall/session-extractor.d.ts +19 -0
  35. package/dist/local-recall/session-extractor.js +172 -0
  36. package/dist/local-recall/storage-reader.d.ts +40 -0
  37. package/dist/local-recall/storage-reader.js +147 -0
  38. package/dist/local-recall/thinking-extractor.d.ts +16 -0
  39. package/dist/local-recall/thinking-extractor.js +132 -0
  40. package/dist/local-recall/types.d.ts +129 -0
  41. package/dist/local-recall/types.js +7 -0
  42. package/dist/local-recall/vector/embedding-provider.d.ts +37 -0
  43. package/dist/local-recall/vector/embedding-provider.js +184 -0
  44. package/dist/local-recall/vector/orama-index.d.ts +37 -0
  45. package/dist/local-recall/vector/orama-index.js +379 -0
  46. package/dist/local-recall/vector/types.d.ts +33 -0
  47. package/dist/local-recall/vector/types.js +1 -0
  48. package/dist/mcp-config.d.ts +63 -0
  49. package/dist/mcp-config.js +121 -0
  50. package/package.json +5 -2
  51. package/skills/ff-learning/SKILL.md +166 -689
  52. package/dist/learning/memory-get.d.ts +0 -24
  53. package/dist/learning/memory-get.js +0 -155
  54. package/dist/learning/memory-search.d.ts +0 -20
  55. package/dist/learning/memory-search.js +0 -193
  56. package/dist/learning/memory-store.d.ts +0 -20
  57. package/dist/learning/memory-store.js +0 -85
  58. package/dist/plugins/ff-learning-get-plugin.d.ts +0 -2
  59. package/dist/plugins/ff-learning-get-plugin.js +0 -55
  60. package/dist/plugins/ff-learning-search-plugin.d.ts +0 -2
  61. package/dist/plugins/ff-learning-search-plugin.js +0 -65
  62. package/dist/plugins/ff-learning-store-plugin.d.ts +0 -2
  63. package/dist/plugins/ff-learning-store-plugin.js +0 -70
package/README.md CHANGED
@@ -29,6 +29,33 @@ This will:
29
29
  - Copy skills to `~/.config/opencode/skills/`
30
30
  - Configure MCP servers in `~/.config/opencode/opencode.json`
31
31
 
32
+ ## Local Recall MCP Daemon
33
+
34
+ The plugin now includes a local MCP daemon binary: `ff-local-recall-mcp`.
35
+
36
+ - `ff-deploy` adds a local MCP server entry named `ff-local-recall`
37
+ - The server exposes memory tools:
38
+ - `local_recall.search`
39
+ - `local_recall.get`
40
+ - `local_recall.store`
41
+ - `local_recall.index.start`
42
+ - `local_recall.index.status`
43
+ - `local_recall.index.stop`
44
+ - `local_recall.index.rebuild`
45
+
46
+ ### Environment Variables
47
+
48
+ - `FF_LOCAL_RECALL_DIRECTORY` - Directory that contains `.feature-factory/` (default: current working directory)
49
+ - `FF_LOCAL_RECALL_DAEMON_AUTOSTART` - Start index daemon automatically (`true` by default)
50
+ - `FF_LOCAL_RECALL_INDEX_INTERVAL_MS` - Background daemon interval in milliseconds (default: `15000`)
51
+ - `FF_LOCAL_RECALL_EXTRACTION_ENABLED` - Run extraction during daemon cycles (`true` by default)
52
+ - `FF_LOCAL_RECALL_EMBEDDING_PROVIDER` - Embedding provider (`ollama` default, `openai` optional)
53
+ - `FF_LOCAL_RECALL_OLLAMA_URL` - Ollama base URL (default: `http://127.0.0.1:11434`)
54
+ - `FF_LOCAL_RECALL_OLLAMA_MODEL` - Ollama embedding model (default: `nomic-embed-text`)
55
+ - `FF_LOCAL_RECALL_OPENAI_URL` - OpenAI embeddings endpoint base (default: `https://api.openai.com/v1`)
56
+ - `FF_LOCAL_RECALL_OPENAI_MODEL` - OpenAI embedding model (default: `text-embedding-3-small`)
57
+ - `OPENAI_API_KEY` - Required when `FF_LOCAL_RECALL_EMBEDDING_PROVIDER=openai`
58
+
32
59
  ## Agents Provided
33
60
 
34
61
  ### Primary Agents
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  description: Implements features and makes code changes based on implementation plans. Use this agent to execute plans, write code, and build features. Prefer delegation for validation, testing, and documentation.
3
3
  mode: primary
4
- temperature: 0.2
5
4
  color: '#10b981'
6
5
  tools:
7
6
  read: true
@@ -463,22 +462,21 @@ Before completing your building task:
463
462
  - Error resolutions and debugging insights
464
463
  - Integration challenges and solutions
465
464
 
466
- 2. **Store important learnings** using ff-learning skill:
467
- - Create semantic memories for technical patterns and best practices
468
- - Create episodic memories for significant implementation experiences
469
- - Create procedural memories for reusable workflows discovered
465
+ 2. **Store important learnings** using the `ff-learning-store` MCP tool:
466
+ - Use category `pattern` for technical patterns and best practices
467
+ - Use category `context` for significant implementation experiences
468
+ - Use category `procedure` for reusable workflows discovered
470
469
  - Tag with relevant technology names and categories
471
470
 
472
471
  3. **Example learning capture:**
473
472
 
474
- ```markdown
475
- After implementing feature:
476
-
477
- 1. Generate UUID: `uuidgen`
478
- 2. Determine memory type based on content:
479
- - Technical pattern → semantic
480
- - Implementation experience → episodic
481
- - Reusable workflow procedural
482
- 3. Create memory file in appropriate directory
483
- 4. Include frontmatter with relevant tags and importance
473
+ ```
474
+ ff-learning-store(
475
+ title: "Implementation Pattern: [Pattern Name]",
476
+ description: "Best practice for [scenario] in [technology]",
477
+ category: "pattern",
478
+ tags: ["implementation", "pattern", "{technology}"],
479
+ importance: 0.8,
480
+ content: "Detailed explanation of the pattern..."
481
+ )
484
482
  ```
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  description: Validates implementation against acceptance criteria. Use this to verify that code meets all stated requirements and acceptance criteria with strict binary pass/fail validation. This agent cannot invoke sub-agents - it performs validation directly.
3
3
  mode: subagent
4
- model: anthropic/claude-sonnet-4-20250514
5
- temperature: 0.1
6
4
  tools:
7
5
  read: true
8
6
  write: false
@@ -290,21 +288,18 @@ Before completing your validation task:
290
288
  - Ambiguity resolutions and scope clarifications
291
289
  - Common gaps between requirements and implementation
292
290
 
293
- 2. **Store important learnings** using ff-learning skill:
294
- - Create semantic memories for requirement patterns
295
- - Create episodic memories for significant validation findings
291
+ 2. **Store important learnings** using `ff-learning-store` MCP tool:
292
+ - Use category `pattern` for requirement patterns and validation techniques
293
+ - Use category `decision` for significant scope clarifications and findings
296
294
  - Tag with requirement types, categories, and validation insights
297
295
 
298
- 3. **Example memory format:**
299
- ```yaml
300
- ---
301
- id: 'uuid-from-uuidgen'
302
- title: 'Validation Pattern: [Pattern Name]'
303
- description: 'Common pattern of [issue] in [type] requirements'
304
- date: '2026-02-02T12:00:00Z'
305
- memory_type: 'semantic'
306
- agent_id: 'ff-acceptance'
307
- importance: 0.7
308
- tags: ['validation', 'requirements', 'pattern', '{category}']
309
- ---
296
+ 3. **Example MCP tool call:**
297
+ ```
298
+ ff-learning-store(
299
+ title: "Validation Pattern: [Pattern Name]",
300
+ description: "Common pattern of [issue] in [type] requirements",
301
+ category: "pattern",
302
+ tags: ["validation", "requirements", "pattern", "{category}"],
303
+ importance: 0.7
304
+ )
310
305
  ```
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  description: Research specialist that investigates external topics using MCP tools. Use this agent to research libraries, APIs, best practices, and implementation patterns. This agent cannot invoke sub-agents - it performs research directly.
3
3
  mode: subagent
4
- temperature: 0.2
5
4
  tools:
6
5
  read: true
7
6
  write: false
@@ -434,23 +433,19 @@ Before completing your research task:
434
433
  - Best practices discovered
435
434
  - Source quality assessments
436
435
 
437
- 2. **Store important learnings** using ff-learning skill:
438
- - Create semantic memories for key findings and knowledge
439
- - Create episodic memories for significant research discoveries
436
+ 2. **Store important learnings** using `ff-learning-store` MCP tool:
437
+ - Use category `pattern` for key findings and reusable knowledge
438
+ - Use category `context` for significant research discoveries and context
440
439
  - Tag with research topics, technologies, and categories
441
440
  - Set high importance (0.8-1.0) for critical findings
442
441
 
443
- 3. **Example memory format:**
444
- ```yaml
445
- ---
446
- id: 'uuid-from-uuidgen'
447
- title: 'Research Finding: [Topic]'
448
- description: 'Key finding about [topic] from [source]'
449
- date: '2026-02-02T12:00:00Z'
450
- memory_type: 'semantic'
451
- agent_id: 'ff-research'
452
- importance: 0.9
453
- tags: ['research', '{topic}', '{technology}', 'best-practices']
454
- source: 'research'
455
- ---
442
+ 3. **Example MCP tool call:**
443
+ ```
444
+ ff-learning-store(
445
+ title: "Research Finding: [Topic]",
446
+ description: "Key finding about [topic] from [source]",
447
+ category: "pattern",
448
+ tags: ["research", "{topic}", "{technology}", "best-practices"],
449
+ importance: 0.9
450
+ )
456
451
  ```
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  description: Reviews code changes for correctness, quality, and test coverage. Use this for detailed code review focusing on correctness, quality, testing, and documentation. This agent cannot invoke sub-agents - it performs review directly.
3
3
  mode: subagent
4
- model: anthropic/claude-sonnet-4-20250514
5
- temperature: 0.1
6
4
  tools:
7
5
  read: true
8
6
  write: false
@@ -293,21 +291,18 @@ Before completing your code review:
293
291
  - Best practices identified
294
292
  - Review technique improvements
295
293
 
296
- 2. **Store important learnings** using ff-learning skill:
297
- - Create semantic memories for code patterns and anti-patterns
298
- - Create episodic memories for significant review findings
294
+ 2. **Store important learnings** using `ff-learning-store` MCP tool:
295
+ - Use category `pattern` for code patterns and anti-patterns
296
+ - Use category `decision` for significant review findings and trade-offs
299
297
  - Tag with code quality categories, technologies, and patterns
300
298
 
301
- 3. **Example memory format:**
302
- ```yaml
303
- ---
304
- id: 'uuid-from-uuidgen'
305
- title: 'Code Pattern: [Pattern Name]'
306
- description: 'Effective pattern for [scenario] in [technology]'
307
- date: '2026-02-02T12:00:00Z'
308
- memory_type: 'semantic'
309
- agent_id: 'ff-review'
310
- importance: 0.7
311
- tags: ['code-quality', 'pattern', '{technology}', '{category}']
312
- ---
299
+ 3. **Example MCP tool call:**
300
+ ```
301
+ ff-learning-store(
302
+ title: "Code Pattern: [Pattern Name]",
303
+ description: "Effective pattern for [scenario] in [technology]",
304
+ category: "pattern",
305
+ tags: ["code-quality", "pattern", "{technology}", "{category}"],
306
+ importance: 0.7
307
+ )
313
308
  ```
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  description: Performs deep security audits on code changes. Use this to identify security vulnerabilities, check authentication/authorization, and ensure security best practices. This agent cannot invoke sub-agents - it performs audit directly.
3
3
  mode: subagent
4
- model: anthropic/claude-sonnet-4-20250514
5
- temperature: 0.1
6
4
  tools:
7
5
  read: true
8
6
  write: false
@@ -327,21 +325,18 @@ Before completing your security audit:
327
325
  - Threat model insights
328
326
  - Common security mistakes observed
329
327
 
330
- 2. **Store important learnings** using ff-learning skill:
331
- - Create semantic memories for vulnerability patterns and fixes
332
- - Create episodic memories for significant security findings
328
+ 2. **Store important learnings** using `ff-learning-store` MCP tool:
329
+ - Use category `pattern` for vulnerability patterns and fixes
330
+ - Use category `debugging` for significant security findings and investigations
333
331
  - Tag with security categories, vulnerability types, and technologies
334
332
 
335
- 3. **Example memory format:**
336
- ```yaml
337
- ---
338
- id: 'uuid-from-uuidgen'
339
- title: 'Security Pattern: [Vulnerability Type]'
340
- description: 'Common [vulnerability] pattern in [context] and how to fix it'
341
- date: '2026-02-02T12:00:00Z'
342
- memory_type: 'semantic'
343
- agent_id: 'ff-security'
344
- importance: 0.9
345
- tags: ['security', 'vulnerability', '{type}', '{technology}']
346
- ---
333
+ 3. **Example MCP tool call:**
334
+ ```
335
+ ff-learning-store(
336
+ title: "Security Pattern: [Vulnerability Type]",
337
+ description: "Common [vulnerability] pattern in [context] and how to fix it",
338
+ category: "pattern",
339
+ tags: ["security", "vulnerability", "{type}", "{technology}"],
340
+ importance: 0.9
341
+ )
347
342
  ```
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  description: Performs comprehensive validation covering acceptance criteria, security, code quality, and architecture. Use this for complete validation across all dimensions. This agent cannot invoke sub-agents - it performs all validation directly.
3
3
  mode: subagent
4
- model: anthropic/claude-sonnet-4-20250514
5
- temperature: 0.1
6
4
  tools:
7
5
  read: true
8
6
  write: false
@@ -321,21 +319,18 @@ Before completing your validation:
321
319
  - Validation efficiency improvements
322
320
  - Cross-dimensional finding patterns
323
321
 
324
- 2. **Store important learnings** using ff-learning skill:
325
- - Create semantic memories for validation patterns
326
- - Create episodic memories for significant validation results
322
+ 2. **Store important learnings** using `ff-learning-store` MCP tool:
323
+ - Use category `pattern` for validation patterns and effective techniques
324
+ - Use category `decision` for significant validation findings
327
325
  - Tag with validation types and categories
328
326
 
329
- 3. **Example memory format:**
330
- ```yaml
331
- ---
332
- id: 'uuid-from-uuidgen'
333
- title: 'Validation Pattern: [Pattern Name]'
334
- description: 'Common pattern of [findings] when validating [type] changes'
335
- date: '2026-02-02T12:00:00Z'
336
- memory_type: 'semantic'
337
- agent_id: 'ff-validate'
338
- importance: 0.7
339
- tags: ['validation', 'pattern', '{category}']
340
- ---
327
+ 3. **Example MCP tool call:**
328
+ ```
329
+ ff-learning-store(
330
+ title: "Validation Pattern: [Pattern Name]",
331
+ description: "Common pattern of [findings] when validating [type] changes",
332
+ category: "pattern",
333
+ tags: ["validation", "pattern", "{category}"],
334
+ importance: 0.7
335
+ )
341
336
  ```
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  description: Reviews code against AWS Well-Architected Framework pillars. Use this for architecture reviews covering Operational Excellence, Security, Reliability, Performance, Cost, and Sustainability. This agent cannot invoke sub-agents - it performs review directly.
3
3
  mode: subagent
4
- model: anthropic/claude-sonnet-4-20250514
5
- temperature: 0.1
6
4
  tools:
7
5
  read: true
8
6
  write: false
@@ -289,21 +287,18 @@ Before completing your architecture review:
289
287
  - Scalability and efficiency considerations
290
288
  - Cross-pillar interactions and trade-offs
291
289
 
292
- 2. **Store important learnings** using ff-learning skill:
293
- - Create semantic memories for architectural patterns
294
- - Create episodic memories for significant architectural findings
290
+ 2. **Store important learnings** using `ff-learning-store` MCP tool:
291
+ - Use category `pattern` for architectural patterns and best practices
292
+ - Use category `decision` for significant architectural trade-offs
295
293
  - Tag with pillar names, architecture categories, and patterns
296
294
 
297
- 3. **Example memory format:**
298
- ```yaml
299
- ---
300
- id: 'uuid-from-uuidgen'
301
- title: 'Architecture Pattern: [Pattern Name]'
302
- description: 'Pattern for achieving [pillar] excellence in [context]'
303
- date: '2026-02-02T12:00:00Z'
304
- memory_type: 'semantic'
305
- agent_id: 'ff-well-architected'
306
- importance: 0.8
307
- tags: ['architecture', '{pillar}', 'pattern', '{category}']
308
- ---
295
+ 3. **Example MCP tool call:**
296
+ ```
297
+ ff-learning-store(
298
+ title: "Architecture Pattern: [Pattern Name]",
299
+ description: "Pattern for achieving [pillar] excellence in [context]",
300
+ category: "pattern",
301
+ tags: ["architecture", "{pillar}", "pattern", "{category}"],
302
+ importance: 0.8
303
+ )
309
304
  ```
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  description: Creates comprehensive implementation plans before making any code changes. Use this agent to analyze requirements, break down tasks, and create detailed implementation plans. Can delegate to read-only sub-agents for parallel research and validation.
3
3
  mode: primary
4
- temperature: 0.1
5
4
  color: '#3b82f6'
6
5
  tools:
7
6
  read: true
@@ -369,32 +368,20 @@ Before completing your planning task:
369
368
  - Pattern discoveries from codebase exploration
370
369
  - Estimation accuracy and lessons learned
371
370
 
372
- 2. **Store important learnings** using ff-learning skill:
373
- - Create semantic memories for architectural patterns discovered
374
- - Create episodic memories for significant planning decisions
371
+ 2. **Store important learnings** using the `ff-learning-store` MCP tool:
372
+ - Use category `pattern` for architectural patterns discovered
373
+ - Use category `decision` for significant planning decisions
375
374
  - Tag with relevant keywords (architecture, patterns, risks, decisions)
376
375
 
377
376
  3. **Example learning capture:**
378
377
 
379
- ```markdown
380
- After completing planning:
381
-
382
- 1. Generate UUID: `uuidgen` `550e8400-e29b-41d4-a716-446655440000`
383
- 2. Create memory file in `.feature-factory/memories/semantic/architecture/`:
384
-
385
- ---
386
-
387
- id: '550e8400-e29b-41d4-a716-446655440000'
388
- title: 'Architecture Decision: [Decision Name]'
389
- description: 'Rationale for choosing [approach] over [alternatives]'
390
- date: '2026-02-02T14:30:00Z'
391
- memory_type: 'semantic'
392
- agent_id: 'planning'
393
- importance: 0.8
394
- tags: ['architecture', 'decision', '{technology}']
395
- source: 'planning'
396
-
397
- ---
398
-
399
- Detailed explanation of the decision...
378
+ ```
379
+ ff-learning-store(
380
+ title: "Architecture Decision: [Decision Name]",
381
+ description: "Rationale for choosing [approach] over [alternatives]",
382
+ category: "decision",
383
+ tags: ["architecture", "decision", "{technology}"],
384
+ importance: 0.8,
385
+ content: "Detailed explanation of the decision..."
386
+ )
400
387
  ```
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  description: Comprehensive validation agent that reviews implementation quality and feeds results back to the building agent. Use this to validate code changes across all dimensions. Can delegate to read-only sub-agents for parallel validation.
3
3
  mode: primary
4
- temperature: 0.1
5
4
  color: '#f59e0b'
6
5
  tools:
7
6
  read: true
@@ -493,32 +492,20 @@ Before completing your review task:
493
492
  - Review effectiveness and process improvements
494
493
  - Tool and technique discoveries
495
494
 
496
- 2. **Store important learnings** using ff-learning skill:
497
- - Create semantic memories for common issue patterns and solutions
498
- - Create episodic memories for significant review findings
495
+ 2. **Store important learnings** using the `ff-learning-store` MCP tool:
496
+ - Use category `pattern` for common issue patterns and solutions
497
+ - Use category `decision` for significant review findings
499
498
  - Tag with review type, categories, and technologies reviewed
500
499
 
501
500
  3. **Example learning capture:**
502
501
 
503
- ```markdown
504
- After completing review:
505
-
506
- 1. Generate UUID: `uuidgen` `550e8400-e29b-41d4-a716-446655440000`
507
- 2. Create memory file in `.feature-factory/memories/semantic/review-patterns/`:
508
-
509
- ---
510
-
511
- id: '550e8400-e29b-41d4-a716-446655440000'
512
- title: 'Review Pattern: [Common Issue Type]'
513
- description: 'Common pattern of [issue] found in [context]'
514
- date: '2026-02-02T14:30:00Z'
515
- memory_type: 'semantic'
516
- agent_id: 'reviewing'
517
- importance: 0.7
518
- tags: ['review', 'pattern', '{issue-type}', '{technology}']
519
- source: 'review'
520
-
521
- ---
522
-
523
- Detailed explanation of the pattern and solution...
502
+ ```
503
+ ff-learning-store(
504
+ title: "Review Pattern: [Common Issue Type]",
505
+ description: "Common pattern of [issue] found in [context]",
506
+ category: "pattern",
507
+ tags: ["review", "pattern", "{issue-type}", "{technology}"],
508
+ importance: 0.7,
509
+ content: "Detailed explanation of the pattern and solution..."
510
+ )
524
511
  ```
package/bin/ff-deploy.js CHANGED
@@ -29,6 +29,11 @@ const isInteractive = process.stdin.isTTY && process.stdout.isTTY;
29
29
 
30
30
  // Default MCP configuration
31
31
  const DEFAULT_MCP_SERVERS = {
32
+ 'ff-local-recall': {
33
+ type: 'local',
34
+ command: 'ff-local-recall-mcp',
35
+ enabled: true,
36
+ },
32
37
  'jina-ai': {
33
38
  type: 'remote',
34
39
  url: 'https://mcp.jina.ai/v1',
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { runLocalRecallMCPServer } from '../dist/local-recall/mcp-stdio-server.js';
4
+
5
+ runLocalRecallMCPServer().catch((error) => {
6
+ const message = error instanceof Error ? error.message : String(error);
7
+ console.error(`Failed to start ff-local-recall MCP server: ${message}`);
8
+ process.exit(1);
9
+ });
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { StopQualityGateHooksPlugin } from './stop-quality-gate.js';
2
+ import { updateMCPConfig } from './mcp-config.js';
3
+ import { $ } from 'bun';
2
4
  // Import tool creator functions
3
5
  import { createFFAgentsCurrentTool } from './plugins/ff-agents-current-plugin.js';
4
6
  import { createFFAgentsShowTool } from './plugins/ff-agents-show-plugin.js';
5
7
  import { createFFAgentsClearTool } from './plugins/ff-agents-clear-plugin.js';
6
- import { createFFLearningStoreTool } from './plugins/ff-learning-store-plugin.js';
7
- import { createFFLearningSearchTool } from './plugins/ff-learning-search-plugin.js';
8
- import { createFFLearningGetTool } from './plugins/ff-learning-get-plugin.js';
8
+ import { createLearningStoreTool, createLearningSearchTool, createLearningGetTool, createLearningIndexStartTool, createLearningIndexStatusTool, createLearningIndexStopTool, createLearningIndexRebuildTool, initLocalRecall, } from './local-recall/index.js';
9
9
  import { createFFPlanCreateTool } from './plugins/ff-plan-create-plugin.js';
10
10
  import { createFFPlanUpdateTool } from './plugins/ff-plan-update-plugin.js';
11
11
  import { createFFAgentContextCreateTool } from './plugins/ff-agent-context-create-plugin.js';
@@ -36,6 +36,17 @@ export const FeatureFactoryPlugin = async (input) => {
36
36
  if (!directory || directory === '' || directory === '/') {
37
37
  return {};
38
38
  }
39
+ // Initialize local-recall memory system
40
+ initLocalRecall(directory);
41
+ // Update MCP server configuration in project opencode.json files
42
+ // This ensures Feature Factory MCP servers are available in the project
43
+ try {
44
+ await updateMCPConfig($, directory);
45
+ }
46
+ catch (error) {
47
+ // Silently fail - don't block plugin initialization if MCP config update fails
48
+ // This is a convenience feature, not critical for plugin functionality
49
+ }
39
50
  // Load hooks from the quality gate plugin
40
51
  const qualityGateHooks = await StopQualityGateHooksPlugin(input).catch(() => ({}));
41
52
  // Create all tools
@@ -44,10 +55,14 @@ export const FeatureFactoryPlugin = async (input) => {
44
55
  'ff-agents-current': createFFAgentsCurrentTool(),
45
56
  'ff-agents-show': createFFAgentsShowTool(),
46
57
  'ff-agents-clear': createFFAgentsClearTool(),
47
- // Learning/memory tools
48
- 'ff-learning-store': createFFLearningStoreTool(),
49
- 'ff-learning-search': createFFLearningSearchTool(),
50
- 'ff-learning-get': createFFLearningGetTool(),
58
+ // Learning/memory tools (local-recall)
59
+ 'ff-learning-store': createLearningStoreTool(),
60
+ 'ff-learning-search': createLearningSearchTool(),
61
+ 'ff-learning-get': createLearningGetTool(),
62
+ 'ff-learning-index-start': createLearningIndexStartTool(),
63
+ 'ff-learning-index-status': createLearningIndexStatusTool(),
64
+ 'ff-learning-index-stop': createLearningIndexStopTool(),
65
+ 'ff-learning-index-rebuild': createLearningIndexRebuildTool(),
51
66
  // Plan tools
52
67
  'ff-plan-create': createFFPlanCreateTool(),
53
68
  'ff-plan-update': createFFPlanUpdateTool(),
@@ -0,0 +1,51 @@
1
+ import { type ExtractionStats } from './daemon.js';
2
+ import { OramaMemoryIndex } from './vector/orama-index.js';
3
+ export interface DaemonRunReport {
4
+ fullRebuild: boolean;
5
+ extraction: ExtractionStats | null;
6
+ upserted: number;
7
+ removed: number;
8
+ documents: number;
9
+ durationMs: number;
10
+ completedAt: string;
11
+ }
12
+ export interface DaemonStatus {
13
+ running: boolean;
14
+ processing: boolean;
15
+ intervalMs: number;
16
+ pending: boolean;
17
+ pendingReason: string | null;
18
+ lastRun: DaemonRunReport | null;
19
+ lastError: string | null;
20
+ }
21
+ interface ControllerOptions {
22
+ directory: string;
23
+ index: OramaMemoryIndex;
24
+ intervalMs?: number;
25
+ extractionEnabled?: boolean;
26
+ }
27
+ export declare class LocalRecallDaemonController {
28
+ private readonly directory;
29
+ private readonly index;
30
+ private readonly extractionEnabled;
31
+ private intervalMs;
32
+ private timer;
33
+ private running;
34
+ private processing;
35
+ private pending;
36
+ private pendingFullRebuild;
37
+ private pendingReason;
38
+ private lastRun;
39
+ private lastError;
40
+ constructor(options: ControllerOptions);
41
+ start(intervalMs?: number): DaemonStatus;
42
+ stop(): DaemonStatus;
43
+ requestRun(reason?: string, fullRebuild?: boolean): void;
44
+ runNow(reason?: string, fullRebuild?: boolean): Promise<DaemonStatus>;
45
+ rebuild(): Promise<DaemonStatus>;
46
+ getStatus(): DaemonStatus;
47
+ private runLoop;
48
+ private runCycle;
49
+ private waitForIdle;
50
+ }
51
+ export {};