htm 0.0.15 → 0.0.18

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 (135) hide show
  1. checksums.yaml +4 -4
  2. data/.architecture/decisions/adrs/001-use-postgresql-timescaledb-storage.md +1 -1
  3. data/.architecture/decisions/adrs/011-database-side-embedding-generation-with-pgai.md +4 -4
  4. data/.architecture/decisions/adrs/012-llm-driven-ontology-topic-extraction.md +1 -1
  5. data/.envrc +12 -24
  6. data/.irbrc +7 -7
  7. data/.tbls.yml +2 -2
  8. data/CHANGELOG.md +138 -0
  9. data/README.md +97 -1592
  10. data/Rakefile +8 -3
  11. data/SETUP.md +12 -12
  12. data/bin/htm_mcp +27 -0
  13. data/db/seed_data/README.md +2 -2
  14. data/db/seeds.rb +2 -2
  15. data/docs/api/database.md +37 -37
  16. data/docs/api/htm.md +1 -1
  17. data/docs/api/yard/HTM/ActiveRecordConfig.md +2 -2
  18. data/docs/api/yard/HTM/Configuration.md +26 -15
  19. data/docs/api/yard/HTM/Database.md +7 -8
  20. data/docs/api/yard/HTM/JobAdapter.md +1 -1
  21. data/docs/api/yard/HTM/Railtie.md +2 -2
  22. data/docs/architecture/adrs/001-postgresql-timescaledb.md +1 -1
  23. data/docs/architecture/adrs/011-pgai-integration.md +4 -4
  24. data/docs/database_rake_tasks.md +5 -5
  25. data/docs/development/rake-tasks.md +11 -11
  26. data/docs/development/setup.md +21 -21
  27. data/docs/development/testing.md +1 -1
  28. data/docs/getting-started/installation.md +51 -31
  29. data/docs/getting-started/quick-start.md +12 -12
  30. data/docs/guides/getting-started.md +2 -2
  31. data/docs/guides/long-term-memory.md +1 -1
  32. data/docs/guides/mcp-server.md +464 -29
  33. data/docs/guides/robot-groups.md +8 -8
  34. data/docs/index.md +4 -4
  35. data/docs/multi_framework_support.md +10 -10
  36. data/docs/setup_local_database.md +19 -19
  37. data/docs/using_rake_tasks_in_your_app.md +14 -14
  38. data/examples/README.md +50 -6
  39. data/examples/basic_usage.rb +31 -21
  40. data/examples/cli_app/README.md +8 -8
  41. data/examples/cli_app/htm_cli.rb +5 -5
  42. data/examples/config_file_example/README.md +256 -0
  43. data/examples/config_file_example/config/htm.local.yml +34 -0
  44. data/examples/config_file_example/custom_config.yml +22 -0
  45. data/examples/config_file_example/show_config.rb +125 -0
  46. data/examples/custom_llm_configuration.rb +7 -7
  47. data/examples/example_app/Rakefile +2 -2
  48. data/examples/example_app/app.rb +8 -8
  49. data/examples/file_loader_usage.rb +9 -9
  50. data/examples/mcp_client.rb +7 -7
  51. data/examples/rails_app/.gitignore +2 -0
  52. data/examples/rails_app/Gemfile +22 -0
  53. data/examples/rails_app/Gemfile.lock +430 -0
  54. data/examples/rails_app/Procfile.dev +1 -0
  55. data/examples/rails_app/README.md +98 -0
  56. data/examples/rails_app/Rakefile +5 -0
  57. data/examples/rails_app/app/assets/stylesheets/application.css +83 -0
  58. data/examples/rails_app/app/assets/stylesheets/inter-font.css +6 -0
  59. data/examples/rails_app/app/controllers/application_controller.rb +19 -0
  60. data/examples/rails_app/app/controllers/dashboard_controller.rb +27 -0
  61. data/examples/rails_app/app/controllers/files_controller.rb +205 -0
  62. data/examples/rails_app/app/controllers/memories_controller.rb +102 -0
  63. data/examples/rails_app/app/controllers/robots_controller.rb +44 -0
  64. data/examples/rails_app/app/controllers/search_controller.rb +46 -0
  65. data/examples/rails_app/app/controllers/tags_controller.rb +30 -0
  66. data/examples/rails_app/app/javascript/application.js +4 -0
  67. data/examples/rails_app/app/javascript/controllers/application.js +9 -0
  68. data/examples/rails_app/app/javascript/controllers/index.js +6 -0
  69. data/examples/rails_app/app/views/dashboard/index.html.erb +123 -0
  70. data/examples/rails_app/app/views/files/index.html.erb +108 -0
  71. data/examples/rails_app/app/views/files/new.html.erb +321 -0
  72. data/examples/rails_app/app/views/files/show.html.erb +130 -0
  73. data/examples/rails_app/app/views/layouts/application.html.erb +124 -0
  74. data/examples/rails_app/app/views/memories/_memory_card.html.erb +51 -0
  75. data/examples/rails_app/app/views/memories/deleted.html.erb +62 -0
  76. data/examples/rails_app/app/views/memories/edit.html.erb +35 -0
  77. data/examples/rails_app/app/views/memories/index.html.erb +81 -0
  78. data/examples/rails_app/app/views/memories/new.html.erb +71 -0
  79. data/examples/rails_app/app/views/memories/show.html.erb +126 -0
  80. data/examples/rails_app/app/views/robots/index.html.erb +106 -0
  81. data/examples/rails_app/app/views/robots/new.html.erb +36 -0
  82. data/examples/rails_app/app/views/robots/show.html.erb +79 -0
  83. data/examples/rails_app/app/views/search/index.html.erb +184 -0
  84. data/examples/rails_app/app/views/shared/_navbar.html.erb +52 -0
  85. data/examples/rails_app/app/views/shared/_stat_card.html.erb +52 -0
  86. data/examples/rails_app/app/views/tags/index.html.erb +131 -0
  87. data/examples/rails_app/app/views/tags/show.html.erb +67 -0
  88. data/examples/rails_app/bin/dev +8 -0
  89. data/examples/rails_app/bin/rails +4 -0
  90. data/examples/rails_app/bin/rake +4 -0
  91. data/examples/rails_app/config/application.rb +33 -0
  92. data/examples/rails_app/config/boot.rb +5 -0
  93. data/examples/rails_app/config/database.yml +15 -0
  94. data/examples/rails_app/config/environment.rb +5 -0
  95. data/examples/rails_app/config/importmap.rb +7 -0
  96. data/examples/rails_app/config/routes.rb +38 -0
  97. data/examples/rails_app/config/tailwind.config.js +35 -0
  98. data/examples/rails_app/config.ru +5 -0
  99. data/examples/rails_app/log/.keep +0 -0
  100. data/examples/rails_app/tmp/local_secret.txt +1 -0
  101. data/examples/robot_groups/multi_process.rb +5 -5
  102. data/examples/robot_groups/robot_worker.rb +5 -5
  103. data/examples/robot_groups/same_process.rb +9 -9
  104. data/examples/sinatra_app/app.rb +1 -1
  105. data/examples/timeframe_demo.rb +1 -1
  106. data/lib/htm/active_record_config.rb +12 -28
  107. data/lib/htm/circuit_breaker.rb +0 -2
  108. data/lib/htm/config/defaults.yml +246 -0
  109. data/lib/htm/config.rb +888 -0
  110. data/lib/htm/database.rb +26 -33
  111. data/lib/htm/embedding_service.rb +0 -4
  112. data/lib/htm/integrations/sinatra.rb +3 -7
  113. data/lib/htm/job_adapter.rb +1 -15
  114. data/lib/htm/jobs/generate_embedding_job.rb +1 -7
  115. data/lib/htm/jobs/generate_propositions_job.rb +2 -12
  116. data/lib/htm/jobs/generate_tags_job.rb +1 -8
  117. data/lib/htm/loaders/defaults_loader.rb +143 -0
  118. data/lib/htm/loaders/xdg_config_loader.rb +116 -0
  119. data/lib/htm/mcp/cli.rb +475 -0
  120. data/lib/htm/mcp/group_tools.rb +476 -0
  121. data/lib/htm/mcp/resources.rb +89 -0
  122. data/lib/htm/mcp/server.rb +98 -0
  123. data/lib/htm/mcp/tools.rb +488 -0
  124. data/lib/htm/models/file_source.rb +5 -3
  125. data/lib/htm/proposition_service.rb +2 -12
  126. data/lib/htm/railtie.rb +3 -8
  127. data/lib/htm/tag_service.rb +1 -8
  128. data/lib/htm/tasks.rb +7 -4
  129. data/lib/htm/version.rb +1 -1
  130. data/lib/htm.rb +124 -5
  131. data/lib/tasks/htm.rake +6 -9
  132. metadata +81 -6
  133. data/bin/htm_mcp.rb +0 -621
  134. data/config/database.yml +0 -74
  135. data/lib/htm/configuration.rb +0 -766
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ae4db5f168c495f5afef19f740f16ee9b39136cd54403f54090921cb6952275
4
- data.tar.gz: 454816f53e620a72efeae7bd8b6c0a30c459403b4f1b6a3d0ca7adf30f3cda7c
3
+ metadata.gz: 7379c23800bf3f00cc328be9725b14bcea06a9d2158eaf3b3bca80b11a6efb74
4
+ data.tar.gz: ec96095a72ab89fed1dd7df0ceaeb3888938f5ddbdea6fd3f3c06aa15b80bf67
5
5
  SHA512:
6
- metadata.gz: 52adbf798f4004961936f9112878d245c6872bf812611efa47bc9b7808ba39510d79d0902f109db8169e1cd0d5420338094edd7719f995f67c1b3def07a2a4d2
7
- data.tar.gz: 7ac9e6a8913b9b836ddfdfdb909857ac62bdd2c5d6c6c904c2a257224fc80499a118afd3d63a3a14d0daed838e11c02b2f2149eddb8c0385ebb2d5be9ab258f8
6
+ metadata.gz: 428b9c8f1db0f3a7a4be6e0b8bc4cc27f0bf058e7847c409cfca423c1bf9722a8efad92dbdd276d69844ab771670ea7cdc62e292018bec4705ed3f9f66255c16
7
+ data.tar.gz: af62a40339de40eac22f90b919a626b0f2d61a14440cdd5ca9e0aaf87ca088cc086cd35bc1eb4394d87a0646512c0a30d2fb47fdee7ec9ea2c4f11e469f2a44b
@@ -115,7 +115,7 @@ We will use **PostgreSQL with TimescaleDB** as the primary storage backend for H
115
115
  ### Connection Configuration
116
116
  ```ruby
117
117
  # Via environment variable (preferred)
118
- ENV['HTM_DBURL'] = "postgresql://user:pass@host:port/dbname?sslmode=require"
118
+ ENV['HTM_DATABASE__URL'] = "postgresql://user:pass@host:port/dbname?sslmode=require"
119
119
 
120
120
  # Parsed into connection hash
121
121
  {
@@ -284,7 +284,7 @@ LIMIT $3;
284
284
  ruby enable_extensions.rb
285
285
 
286
286
  # 2. Run database schema with triggers
287
- psql $HTM_DBURL < sql/schema.sql
287
+ psql $HTM_DATABASE__URL < sql/schema.sql
288
288
 
289
289
  # 3. Use HTM normally - embeddings automatic!
290
290
  ruby -r ./lib/htm -e "HTM.new(robot_name: 'Bot').add_node('test', 'value')"
@@ -294,16 +294,16 @@ ruby -r ./lib/htm -e "HTM.new(robot_name: 'Bot').add_node('test', 'value')"
294
294
 
295
295
  ```bash
296
296
  # 1. Backup database
297
- pg_dump $HTM_DBURL > htm_backup.sql
297
+ pg_dump $HTM_DATABASE__URL > htm_backup.sql
298
298
 
299
299
  # 2. Enable pgai extension
300
300
  ruby enable_extensions.rb
301
301
 
302
302
  # 3. Apply new schema (adds triggers)
303
- psql $HTM_DBURL < sql/schema.sql
303
+ psql $HTM_DATABASE__URL < sql/schema.sql
304
304
 
305
305
  # 4. (Optional) Regenerate embeddings with new model
306
- psql $HTM_DBURL -c "UPDATE nodes SET value = value;"
306
+ psql $HTM_DATABASE__URL -c "UPDATE nodes SET value = value;"
307
307
  # This triggers embedding regeneration for all nodes
308
308
  ```
309
309
 
@@ -333,7 +333,7 @@ htm.add_node('memory_001', 'PostgreSQL with TimescaleDB handles time-series data
333
333
  HTM::Database.migrate
334
334
 
335
335
  # 2. (Optional) Re-extract topics for existing nodes
336
- psql $HTM_DBURL -c "UPDATE nodes SET value = value;"
336
+ psql $HTM_DATABASE__URL -c "UPDATE nodes SET value = value;"
337
337
  # Triggers topic extraction for all existing nodes
338
338
  ```
339
339
 
data/.envrc CHANGED
@@ -2,34 +2,22 @@
2
2
 
3
3
  export RR=`pwd`
4
4
 
5
+ export HTM_ENV=development
5
6
  export HTM_EXTRACT_PROPOSITIONS=true
6
7
 
7
8
  # Database connection - Localhost PostgreSQL
8
- export HTM_DBHOST=localhost
9
- export HTM_DBPORT=5432
10
- export HTM_DBNAME=htm_development
11
- export HTM_DBUSER=${USER}
12
- export HTM_DBPASS=
13
- export HTM_DBURL="postgresql://${HTM_DBUSER}@${HTM_DBHOST}:${HTM_DBPORT}/${HTM_DBNAME}?sslmode=disable"
14
- # export HTM_DBURL="postgresql://dewayne@localhost:5432/htm_development"
15
-
16
- # Uncomment if using TimescaleDB Cloud instead:
17
- # export HTM_SERVICE_NAME=$TIGER_SERVICE_NAME
18
- # export HTM_DBURL=$TIGER_DBURL
19
- # export HTM_DBNAME=$TIGER_DBNAME
20
- # export HTM_DBUSER=$TIGER_DBUSER
21
- # export HTM_DBPASS=$TIGER_DBPASS
22
- # export HTM_DBHOST=$TIGER_DBHOST
23
- # export HTM_DBPORT=$TIGER_DBPORT
9
+ export HTM_DATABASE__HOST=localhost
10
+ export HTM_DATABASE__PORT=5432
11
+ export HTM_DATABASE__NAME=htm_development
12
+ export HTM_DATABASE__USER=${USER}
13
+ export HTM_DATABASE__PASSWORD=
14
+ export HTM_DATABASE__URL="postgresql://${HTM_DATABASE__USER}@${HTM_DATABASE__HOST}:${HTM_DATABASE__PORT}/${HTM_DATABASE__NAME}?sslmode=disable"
24
15
 
25
16
  # Client-side embedding generation
26
- # HTM generates embeddings before inserting into database
27
- export HTM_EMBEDDINGS_PROVIDER=ollama
28
- export HTM_EMBEDDINGS_MODEL=embeddinggemma
29
- export HTM_EMBEDDINGS_BASE_URL=http://localhost:11434
30
- export HTM_EMBEDDINGS_DIMENSION=768
17
+ export HTM_EMBEDDING__PROVIDER=ollama
18
+ export HTM_EMBEDDING__MODEL=embeddinggemma
19
+ export HTM_EMBEDDING__DIMENSIONS=768
31
20
 
32
21
  # Topic extraction (client-side)
33
- export HTM_TOPIC_PROVIDER=ollama
34
- export HTM_TOPIC_MODEL=phi4
35
- export HTM_TOPIC_BASE_URL=http://localhost:11434
22
+ export HTM_TAG__PROVIDER=ollama
23
+ export HTM_TAG__MODEL=phi4
data/.irbrc CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # HTM Interactive Development Console
4
- # Usage: HTM_DBURL="postgresql://user@localhost:5432/htm_development" irb
4
+ # Usage: HTM_DATABASE__URL="postgresql://user@localhost:5432/htm_development" irb
5
5
 
6
6
  require_relative 'lib/htm'
7
7
  require 'debug_me'
@@ -21,12 +21,12 @@ end
21
21
 
22
22
  # Configure HTM with sensible defaults for interactive use
23
23
  HTM.configure do |config|
24
- config.job_backend = :inline
25
- config.embedding_provider = :ollama
26
- config.embedding_model = 'nomic-embed-text:latest'
27
- config.embedding_dimensions = 768
28
- config.tag_provider = :ollama
29
- config.tag_model = 'gemma3:latest'
24
+ config.job.backend = :inline
25
+ config.embedding.provider = :ollama
26
+ config.embedding.model = 'nomic-embed-text:latest'
27
+ config.embedding.dimensions = 768
28
+ config.tag.provider = :ollama
29
+ config.tag.model = 'gemma3:latest'
30
30
  config.reset_to_defaults
31
31
  end
32
32
  puts "✓ HTM configured (inline jobs, Ollama provider)"
data/.tbls.yml CHANGED
@@ -1,9 +1,9 @@
1
1
  # tbls configuration for HTM database documentation
2
2
  # https://github.com/k1LoW/tbls
3
3
 
4
- # Database connection - uses HTM_DBURL environment variable
4
+ # Database connection - uses HTM_DATABASE__URL environment variable
5
5
  # tbls expands environment variables with $VAR or ${VAR} syntax
6
- dsn: $HTM_DBURL
6
+ dsn: $HTM_DATABASE__URL
7
7
 
8
8
  # Output documentation to docs/database directory
9
9
  docPath: docs/database
data/CHANGELOG.md CHANGED
@@ -6,6 +6,144 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ## [Unreleased]
9
+ ## [0.0.18] - 2025-12-20
10
+ ### Added
11
+ - **Anyway::Config-based configuration system** - Replaced custom Configuration class with robust multi-source config management
12
+ - **Multi-layer configuration loading** with priority (lowest to highest):
13
+ 1. Bundled defaults (`lib/htm/config/defaults.yml`)
14
+ 2. XDG user config (`~/.config/htm/htm.yml`)
15
+ 3. Project config (`./config/htm.yml`)
16
+ 4. Local overrides (`./config/htm.local.yml`) - gitignored for secrets
17
+ 5. Environment variables (`HTM_*`)
18
+ 6. Programmatic (`HTM.configure` block)
19
+ - **Nested configuration access**: `HTM.config.database.host`, `HTM.config.embedding.model`, etc.
20
+ - **Environment-specific overrides**: Different defaults for development, test, and production environments
21
+ - **Configuration source tracing**: Debug where each configuration value originated
22
+ - **YAML-based prompt templates** - Tag and proposition extraction prompts now configurable via YAML
23
+ - Prompts use `%{placeholder}` syntax for runtime interpolation
24
+ - System and user prompts for tag extraction: `tag.system_prompt`, `tag.user_prompt_template`
25
+ - System and user prompts for proposition extraction: `proposition.system_prompt`, `proposition.user_prompt_template`
26
+ - Taxonomy context templates: `tag.taxonomy_context_existing`, `tag.taxonomy_context_empty`
27
+ - **New loaders for configuration sources**:
28
+ - `HTM::Loaders::DefaultsLoader` - Loads bundled gem defaults from YAML
29
+ - `HTM::Loaders::XDGConfigLoader` - Loads XDG-compliant user configuration
30
+ - **Configuration management example** - New `examples/config_file_example/` directory
31
+ - `show_config.rb` - Demonstrates configuration source tracing
32
+ - Sample configuration files showing override mechanisms
33
+ - Comprehensive README with configuration patterns
34
+
35
+ ### Changed
36
+ - **BREAKING: Database environment variables renamed** - Migrate from `HTM_DBURL`/`HTM_DB*` to namespaced format
37
+ - `HTM_DBURL` → `HTM_DATABASE__URL`
38
+ - `HTM_DATABASE` → `HTM_DATABASE__NAME`
39
+ - `HTM_DB_USER` → `HTM_DATABASE__USER`
40
+ - `HTM_DB_PASSWORD` → `HTM_DATABASE__PASSWORD`
41
+ - `HTM_DB_HOST` → `HTM_DATABASE__HOST`
42
+ - `HTM_DB_PORT` → `HTM_DATABASE__PORT`
43
+ - Uses double underscore (`__`) for nested config (Anyway::Config convention)
44
+ - **Configuration access patterns updated** - Direct attributes → nested configuration
45
+ - `config.embedding_provider` → `config.embedding.provider`
46
+ - `config.embedding_model` → `config.embedding.model`
47
+ - `config.tag_provider` → `config.tag.provider`
48
+ - `config.tag_model` → `config.tag.model`
49
+ - `config.chunk_size` → `config.chunking.size`
50
+ - `config.chunk_overlap` → `config.chunking.overlap`
51
+ - **Removed `config/database.yml`** - Replaced by flexible YAML configuration files
52
+ - **Prompt generation refactored** - Hardcoded prompt strings moved to `defaults.yml` templates
53
+ - **MCP CLI enhanced** - Improved command handling and configuration output display
54
+
55
+ ### Removed
56
+ - **`HTM::Configuration` class** - Replaced by `HTM::Config` using Anyway::Config
57
+ - **Legacy database environment variable support** - Must use new `HTM_DATABASE__*` format
58
+
59
+ ### Dependencies
60
+ - Added `anyway_config` gem for configuration management
61
+
62
+ ### Migration Guide
63
+ Update your environment variables:
64
+ ```bash
65
+ # Old format
66
+ export HTM_DBURL="postgresql://user@localhost:5432/htm_development"
67
+
68
+ # New format
69
+ export HTM_DATABASE__URL="postgresql://user@localhost:5432/htm_development"
70
+ ```
71
+
72
+ Update configuration access:
73
+ ```ruby
74
+ # Old pattern
75
+ HTM.configuration.embedding_model
76
+
77
+ # New pattern
78
+ HTM.config.embedding.model
79
+ ```
80
+
81
+ ## [0.0.17] - 2025-12-18
82
+
83
+ ### Added
84
+ - **HTM_ENV environment variable** - Non-Rails users can now use `HTM_ENV` instead of `RAILS_ENV`
85
+ - Priority: `HTM_ENV` > `RAILS_ENV` > `RACK_ENV` > `'development'`
86
+ - `HTM.env` returns the current environment name
87
+ - `HTM.test?`, `HTM.development?`, `HTM.production?` helper methods
88
+ - Example: `HTM_ENV=test htm_mcp setup`
89
+ - **MCP CLI subcommands** - `bin/htm_mcp` now supports multiple commands for database management
90
+ - `htm_mcp setup` / `htm_mcp init` - Initialize database schema
91
+ - `htm_mcp verify` - Verify database connection, extensions, and migration status
92
+ - `htm_mcp stats` - Show memory statistics including database size and file sources
93
+ - `htm_mcp version` - Show HTM version
94
+ - `htm_mcp help` - Comprehensive help with all environment variables
95
+ - `htm_mcp` / `htm_mcp server` / `htm_mcp stdio` - Start MCP server (default behavior)
96
+ - **Migration status display** - `htm_mcp verify` now shows applied/pending migrations with +/- indicators
97
+ - **Database size in stats** - `htm_mcp stats` displays database size via `pg_size_pretty`
98
+ - **Error suggestions** - CLI provides helpful suggestions for common database errors (connection refused, missing database, auth failures, missing extensions)
99
+ - **Rails demo application** - Full-featured web UI for exploring HTM capabilities
100
+ - Located in `examples/rails_app/` - minimal Rails 7.2 application
101
+ - **Dashboard** - Overview of memories, robots, tags, and files with quick stats
102
+ - **Memories** - Browse, create, edit, delete, and restore memories with tag filtering
103
+ - **Search** - Semantic search with vector/fulltext/hybrid strategies and strategy comparison mode
104
+ - **Tags** - Hierarchical tag browser with memory counts
105
+ - **Robots** - View robots, switch active robot, see memory associations
106
+ - **Files** - Load markdown files via path or native file picker, directory uploads, sync tracking
107
+ - Dark theme UI using Tailwind CSS
108
+ - Upload progress overlay with stage indicators
109
+ - Error handling with graceful degradation for search failures
110
+ - **FileSource#needs_sync? default argument** - Now works without argument by reading file mtime from filesystem
111
+ - **RobotGroup MCP tools** - 12 new tools for high-availability robot coordination
112
+ - `CreateGroupTool` - Create a new robot group with shared working memory
113
+ - `ListGroupsTool` - List all active robot groups in the session
114
+ - `GetGroupStatusTool` - Get detailed status of a robot group
115
+ - `JoinGroupTool` - Add a robot to an existing group
116
+ - `LeaveGroupTool` - Remove a robot from a group
117
+ - `GroupRememberTool` - Store memory shared across group members
118
+ - `GroupRecallTool` - Recall memories from a group's shared context
119
+ - `GetGroupWorkingMemoryTool` - Get a group's working memory contents
120
+ - `PromoteRobotTool` - Promote a passive robot to active role
121
+ - `FailoverTool` - Trigger failover to next available robot
122
+ - `SyncGroupTool` - Synchronize group state across members
123
+ - `ShutdownGroupTool` - Gracefully shutdown a robot group
124
+ - **RobotGroups MCP resource** - `htm://groups` returns active robot groups and their status
125
+ - **MCPGroupSession module** - Session state management for robot groups in MCP server
126
+ - **MCP server test suite** - 59 tests with 174 assertions covering all tools and resources
127
+
128
+ ### Changed
129
+ - **Renamed `bin/htm_mcp.rb` to `bin/htm_mcp`** - Cleaner executable name without extension
130
+ - **MCP server refactored into modules** - Code moved from monolithic file to `lib/htm/mcp/`:
131
+ - `lib/htm/mcp/cli.rb` - CLI command handling
132
+ - `lib/htm/mcp/server.rb` - Server setup and lifecycle
133
+ - `lib/htm/mcp/tools.rb` - Individual MCP tools (11 tools)
134
+ - `lib/htm/mcp/group_tools.rb` - Robot group tools (12 tools)
135
+ - `lib/htm/mcp/resources.rb` - MCP resources (4 resources)
136
+ - **README.md MCP section** - Reorganized tools by category (Session & Memory, Robot Group)
137
+ - **docs/guides/mcp-server.md** - Comprehensive RobotGroup tools documentation with examples, updated for CLI commands
138
+
139
+ ### Fixed
140
+ - **MCP server direct execution** - Added `require 'bundler/setup'` to `bin/htm_mcp` for execution without `bundle exec`
141
+ - Fixes timeout issues when MCP clients invoke the server directly
142
+ - Server now loads gems correctly from Gemfile when run as `./bin/htm_mcp`
143
+ - **ontology_test.rb** - Added `configure_htm_with_mocks` to prevent real LLM calls during tests
144
+ - `test_node_creation_without_tags` and `test_empty_tag_array_no_topics` now pass
145
+ - **job_adapter_test.rb** - Fixed environment detection test to properly handle `HTM_ENV` priority
146
+ - Test now saves and restores all relevant environment variables (`HTM_ENV`, `RAILS_ENV`, `RACK_ENV`)
9
147
 
10
148
  ## [0.0.15] - 2025-12-06
11
149