htm 0.0.11 → 0.0.14

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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/.dictate.toml +46 -0
  3. data/.envrc +2 -0
  4. data/CHANGELOG.md +52 -2
  5. data/README.md +79 -0
  6. data/Rakefile +14 -2
  7. data/bin/htm_mcp.rb +94 -0
  8. data/config/database.yml +20 -13
  9. data/db/migrate/00010_add_soft_delete_to_associations.rb +29 -0
  10. data/db/migrate/00011_add_performance_indexes.rb +21 -0
  11. data/db/migrate/00012_add_tags_trigram_index.rb +18 -0
  12. data/db/migrate/00013_enable_lz4_compression.rb +43 -0
  13. data/db/schema.sql +49 -92
  14. data/docs/api/index.md +1 -1
  15. data/docs/api/yard/HTM.md +2 -4
  16. data/docs/architecture/index.md +1 -1
  17. data/docs/development/index.md +1 -1
  18. data/docs/getting-started/index.md +1 -1
  19. data/docs/guides/index.md +1 -1
  20. data/docs/images/telemetry-architecture.svg +153 -0
  21. data/docs/telemetry.md +391 -0
  22. data/examples/README.md +46 -1
  23. data/examples/cli_app/README.md +1 -1
  24. data/examples/cli_app/htm_cli.rb +1 -1
  25. data/examples/sinatra_app/app.rb +1 -1
  26. data/examples/telemetry/README.md +147 -0
  27. data/examples/telemetry/SETUP_README.md +169 -0
  28. data/examples/telemetry/demo.rb +498 -0
  29. data/examples/telemetry/grafana/dashboards/htm-metrics.json +457 -0
  30. data/lib/htm/configuration.rb +261 -70
  31. data/lib/htm/database.rb +46 -22
  32. data/lib/htm/embedding_service.rb +24 -14
  33. data/lib/htm/errors.rb +15 -1
  34. data/lib/htm/jobs/generate_embedding_job.rb +19 -0
  35. data/lib/htm/jobs/generate_propositions_job.rb +103 -0
  36. data/lib/htm/jobs/generate_tags_job.rb +24 -0
  37. data/lib/htm/loaders/markdown_chunker.rb +79 -0
  38. data/lib/htm/loaders/markdown_loader.rb +41 -15
  39. data/lib/htm/long_term_memory/fulltext_search.rb +138 -0
  40. data/lib/htm/long_term_memory/hybrid_search.rb +324 -0
  41. data/lib/htm/long_term_memory/node_operations.rb +209 -0
  42. data/lib/htm/long_term_memory/relevance_scorer.rb +355 -0
  43. data/lib/htm/long_term_memory/robot_operations.rb +34 -0
  44. data/lib/htm/long_term_memory/tag_operations.rb +428 -0
  45. data/lib/htm/long_term_memory/vector_search.rb +109 -0
  46. data/lib/htm/long_term_memory.rb +51 -1153
  47. data/lib/htm/models/node.rb +35 -2
  48. data/lib/htm/models/node_tag.rb +31 -0
  49. data/lib/htm/models/robot_node.rb +31 -0
  50. data/lib/htm/models/tag.rb +44 -0
  51. data/lib/htm/proposition_service.rb +169 -0
  52. data/lib/htm/query_cache.rb +214 -0
  53. data/lib/htm/sql_builder.rb +178 -0
  54. data/lib/htm/tag_service.rb +16 -6
  55. data/lib/htm/tasks.rb +8 -2
  56. data/lib/htm/telemetry.rb +224 -0
  57. data/lib/htm/version.rb +1 -1
  58. data/lib/htm.rb +64 -3
  59. data/lib/tasks/doc.rake +1 -1
  60. data/lib/tasks/htm.rake +259 -13
  61. data/mkdocs.yml +96 -96
  62. metadata +42 -16
  63. data/.aigcm_msg +0 -1
  64. data/.claude/settings.local.json +0 -95
  65. data/CLAUDE.md +0 -603
  66. data/examples/cli_app/temp.log +0 -93
  67. data/lib/htm/loaders/paragraph_chunker.rb +0 -112
  68. data/notes/ARCHITECTURE_REVIEW.md +0 -1167
  69. data/notes/IMPLEMENTATION_SUMMARY.md +0 -606
  70. data/notes/MULTI_FRAMEWORK_IMPLEMENTATION.md +0 -451
  71. data/notes/next_steps.md +0 -100
  72. data/notes/plan.md +0 -627
  73. data/notes/tag_ontology_enhancement_ideas.md +0 -222
  74. data/notes/timescaledb_removal_summary.md +0 -200
@@ -1,95 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "WebFetch(domain:raw.githubusercontent.com)",
5
- "Bash(mkdir:*)",
6
- "Bash(mkdocs build:*)",
7
- "Bash(ffmpeg:*)",
8
- "Bash(gh issue create:*)",
9
- "Bash(gh issue list:*)",
10
- "Bash(rake test:*)",
11
- "Bash(ruby -Ilib -e:*)",
12
- "Bash(gh issue view:*)",
13
- "Bash(gh issue close:*)",
14
- "Bash(bundle install:*)",
15
- "Bash(echo:*)",
16
- "Bash(ruby test_connection.rb:*)",
17
- "Bash(psql:*)",
18
- "Bash(ruby -r ./lib/htm -e:*)",
19
- "Bash(curl:*)",
20
- "Bash(ollama list:*)",
21
- "Bash(ruby:*)",
22
- "Bash(rake:*)",
23
- "Bash(export HTM_DBURL=$TIGER_DBURL)",
24
- "Bash(python3:*)",
25
- "Bash(chmod:*)",
26
- "Bash(git clone:*)",
27
- "Bash(cat:*)",
28
- "Bash(source:*)",
29
- "Bash(bundle exec rake:*)",
30
- "Bash(./examples/example_app/app.rb)",
31
- "Bash(gem list:*)",
32
- "Read(//Users/dewayne/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/pgvector-0.3.2/lib/pgvector/**)",
33
- "Bash(bundle check:*)",
34
- "Bash(find:*)",
35
- "Bash(test/caching_test.rb)",
36
- "Bash(xargs:*)",
37
- "Bash(git log:*)",
38
- "Bash(done)",
39
- "Bash(brew services:*)",
40
- "Bash(lsof:*)",
41
- "Bash(env)",
42
- "Bash(createdb:*)",
43
- "Bash(export HTM_DBURL:*)",
44
- "Bash(dropdb:*)",
45
- "Bash(bundle exec ruby:*)",
46
- "WebFetch(domain:rubyllm.com)",
47
- "Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" bundle exec rake:*)",
48
- "mcp__playwright-mcp__playwright_navigate",
49
- "mcp__playwright-mcp__playwright_screenshot",
50
- "mcp__playwright-mcp__playwright_fill",
51
- "mcp__playwright-mcp__playwright_click",
52
- "mcp__playwright-mcp__playwright_select",
53
- "mcp__playwright-mcp__playwright_get",
54
- "mcp__playwright-mcp__playwright_post",
55
- "mcp__playwright-mcp__playwright_close",
56
- "Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" bundle exec ruby:*)",
57
- "Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" bundle exec rake test:*)",
58
- "Bash(git mv:*)",
59
- "Bash(kill:*)",
60
- "WebFetch(domain:github.com)",
61
- "WebFetch(domain:api.github.com)",
62
- "Bash(git add:*)",
63
- "Bash(git commit:*)",
64
- "Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" ruby:*)",
65
- "Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" ruby test/loaders/markdown_loader_test.rb:*)",
66
- "Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" bundle exec rake htm:db:stats:*)",
67
- "Skill(architecture-review)",
68
- "Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" psql:*)",
69
- "Bash(git reset:*)",
70
- "Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250101000002_create_robots.rb )",
71
- "Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250101000003_create_nodes.rb )",
72
- "Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250101000005_create_tags.rb )",
73
- "Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250101000007_add_node_vector_indexes.rb )",
74
- "Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250125000001_add_content_hash_to_nodes.rb )",
75
- "Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250125000002_create_robot_nodes.rb )",
76
- "Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250125000003_remove_source_and_robot_id_from_nodes.rb )",
77
- "Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250126000001_create_working_memories.rb )",
78
- "Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250126000002_remove_unused_columns.rb )",
79
- "Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20251128000001_add_deleted_at_to_nodes.rb )",
80
- "Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20251128000002_create_file_sources.rb )",
81
- "Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20251128000003_add_source_to_nodes.rb )",
82
- "Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20251129000002_remove_unused_embedding_columns.rb)",
83
- "WebSearch",
84
- "WebFetch(domain:www.barndominiumlife.com)",
85
- "Bash(git rm:*)",
86
- "Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" psql -c \"DROP TABLE IF EXISTS working_memories CASCADE;\" htm_development)",
87
- "Bash(git checkout:*)",
88
- "WebFetch(domain:rubygems.org)",
89
- "WebFetch(domain:www.rubyllm-mcp.com)",
90
- "Bash(gem contents:*)"
91
- ],
92
- "deny": [],
93
- "ask": []
94
- }
95
- }