htm 0.0.1 → 0.0.10
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.
- checksums.yaml +4 -4
- data/.aigcm_msg +1 -0
- data/.architecture/reviews/comprehensive-codebase-review.md +577 -0
- data/.claude/settings.local.json +92 -0
- data/.envrc +1 -0
- data/.irbrc +283 -80
- data/.tbls.yml +31 -0
- data/CHANGELOG.md +314 -16
- data/CLAUDE.md +603 -0
- data/README.md +76 -5
- data/Rakefile +5 -0
- data/SETUP.md +132 -101
- data/db/migrate/{20250101000001_enable_extensions.rb → 00001_enable_extensions.rb} +0 -1
- data/db/migrate/00002_create_robots.rb +11 -0
- data/db/migrate/00003_create_file_sources.rb +20 -0
- data/db/migrate/00004_create_nodes.rb +65 -0
- data/db/migrate/00005_create_tags.rb +13 -0
- data/db/migrate/00006_create_node_tags.rb +18 -0
- data/db/migrate/00007_create_robot_nodes.rb +26 -0
- data/db/migrate/00009_add_working_memory_to_robot_nodes.rb +12 -0
- data/db/schema.sql +390 -36
- data/docs/api/database.md +19 -232
- data/docs/api/embedding-service.md +1 -7
- data/docs/api/htm.md +305 -364
- data/docs/api/index.md +1 -7
- data/docs/api/long-term-memory.md +342 -590
- data/docs/api/yard/HTM/ActiveRecordConfig.md +23 -0
- data/docs/api/yard/HTM/AuthorizationError.md +11 -0
- data/docs/api/yard/HTM/CircuitBreaker.md +92 -0
- data/docs/api/yard/HTM/CircuitBreakerOpenError.md +34 -0
- data/docs/api/yard/HTM/Configuration.md +175 -0
- data/docs/api/yard/HTM/Database.md +99 -0
- data/docs/api/yard/HTM/DatabaseError.md +14 -0
- data/docs/api/yard/HTM/EmbeddingError.md +18 -0
- data/docs/api/yard/HTM/EmbeddingService.md +58 -0
- data/docs/api/yard/HTM/Error.md +11 -0
- data/docs/api/yard/HTM/JobAdapter.md +39 -0
- data/docs/api/yard/HTM/LongTermMemory.md +342 -0
- data/docs/api/yard/HTM/NotFoundError.md +17 -0
- data/docs/api/yard/HTM/Observability.md +107 -0
- data/docs/api/yard/HTM/QueryTimeoutError.md +19 -0
- data/docs/api/yard/HTM/Railtie.md +27 -0
- data/docs/api/yard/HTM/ResourceExhaustedError.md +13 -0
- data/docs/api/yard/HTM/TagError.md +18 -0
- data/docs/api/yard/HTM/TagService.md +67 -0
- data/docs/api/yard/HTM/Timeframe/Result.md +24 -0
- data/docs/api/yard/HTM/Timeframe.md +40 -0
- data/docs/api/yard/HTM/TimeframeExtractor/Result.md +24 -0
- data/docs/api/yard/HTM/TimeframeExtractor.md +45 -0
- data/docs/api/yard/HTM/ValidationError.md +20 -0
- data/docs/api/yard/HTM/WorkingMemory.md +131 -0
- data/docs/api/yard/HTM.md +80 -0
- data/docs/api/yard/index.csv +179 -0
- data/docs/api/yard-reference.md +51 -0
- data/docs/architecture/adrs/001-postgresql-timescaledb.md +1 -1
- data/docs/architecture/adrs/003-ollama-embeddings.md +1 -1
- data/docs/architecture/adrs/010-redis-working-memory-rejected.md +2 -27
- data/docs/architecture/adrs/index.md +2 -13
- data/docs/architecture/hive-mind.md +165 -166
- data/docs/architecture/index.md +2 -2
- data/docs/architecture/overview.md +5 -171
- data/docs/architecture/two-tier-memory.md +1 -35
- data/docs/assets/images/adr-010-current-architecture.svg +37 -0
- data/docs/assets/images/adr-010-proposed-architecture.svg +48 -0
- data/docs/assets/images/adr-dependency-tree.svg +93 -0
- data/docs/assets/images/class-hierarchy.svg +55 -0
- data/docs/assets/images/exception-hierarchy.svg +45 -0
- data/docs/assets/images/htm-architecture-overview.svg +83 -0
- data/docs/assets/images/htm-complete-memory-flow.svg +160 -0
- data/docs/assets/images/htm-context-assembly-flow.svg +148 -0
- data/docs/assets/images/htm-eviction-process.svg +141 -0
- data/docs/assets/images/htm-memory-addition-flow.svg +138 -0
- data/docs/assets/images/htm-memory-recall-flow.svg +152 -0
- data/docs/assets/images/htm-node-states.svg +123 -0
- data/docs/assets/images/project-structure.svg +78 -0
- data/docs/assets/images/test-directory-structure.svg +38 -0
- data/{dbdoc → docs/database}/README.md +127 -125
- data/docs/database/public.file_sources.md +42 -0
- data/docs/database/public.file_sources.svg +211 -0
- data/{dbdoc → docs/database}/public.node_tags.md +7 -8
- data/docs/database/public.node_tags.svg +239 -0
- data/{dbdoc → docs/database}/public.nodes.md +22 -17
- data/docs/database/public.nodes.svg +271 -0
- data/docs/database/public.robot_nodes.md +46 -0
- data/docs/database/public.robot_nodes.svg +243 -0
- data/{dbdoc → docs/database}/public.robots.md +2 -3
- data/docs/database/public.robots.svg +161 -0
- data/docs/database/public.tags.svg +139 -0
- data/{dbdoc → docs/database}/schema.json +941 -630
- data/docs/database/schema.svg +282 -0
- data/docs/development/index.md +1 -29
- data/docs/development/schema.md +134 -309
- data/docs/development/testing.md +1 -9
- data/docs/getting-started/index.md +47 -0
- data/docs/{installation.md → getting-started/installation.md} +2 -2
- data/docs/{quick-start.md → getting-started/quick-start.md} +5 -5
- data/docs/guides/adding-memories.md +295 -643
- data/docs/guides/recalling-memories.md +36 -1
- data/docs/guides/search-strategies.md +85 -51
- data/docs/images/htm-er-diagram.svg +156 -0
- data/docs/index.md +16 -31
- data/docs/multi_framework_support.md +4 -4
- data/examples/README.md +280 -0
- data/examples/basic_usage.rb +18 -16
- data/examples/cli_app/htm_cli.rb +146 -8
- data/examples/cli_app/temp.log +93 -0
- data/examples/custom_llm_configuration.rb +1 -2
- data/examples/example_app/app.rb +11 -14
- data/examples/file_loader_usage.rb +177 -0
- data/examples/robot_groups/lib/robot_group.rb +419 -0
- data/examples/robot_groups/lib/working_memory_channel.rb +140 -0
- data/examples/robot_groups/multi_process.rb +286 -0
- data/examples/robot_groups/robot_worker.rb +136 -0
- data/examples/robot_groups/same_process.rb +229 -0
- data/examples/sinatra_app/Gemfile +1 -0
- data/examples/sinatra_app/Gemfile.lock +166 -0
- data/examples/sinatra_app/app.rb +219 -24
- data/examples/timeframe_demo.rb +276 -0
- data/lib/htm/active_record_config.rb +10 -3
- data/lib/htm/circuit_breaker.rb +202 -0
- data/lib/htm/configuration.rb +313 -80
- data/lib/htm/database.rb +67 -36
- data/lib/htm/embedding_service.rb +39 -2
- data/lib/htm/errors.rb +131 -11
- data/lib/htm/{sinatra.rb → integrations/sinatra.rb} +87 -12
- data/lib/htm/job_adapter.rb +10 -3
- data/lib/htm/jobs/generate_embedding_job.rb +5 -4
- data/lib/htm/jobs/generate_tags_job.rb +4 -0
- data/lib/htm/loaders/markdown_loader.rb +263 -0
- data/lib/htm/loaders/paragraph_chunker.rb +112 -0
- data/lib/htm/long_term_memory.rb +601 -321
- data/lib/htm/models/file_source.rb +99 -0
- data/lib/htm/models/node.rb +116 -12
- data/lib/htm/models/robot.rb +53 -4
- data/lib/htm/models/robot_node.rb +51 -0
- data/lib/htm/models/tag.rb +302 -0
- data/lib/htm/observability.rb +395 -0
- data/lib/htm/tag_service.rb +60 -3
- data/lib/htm/tasks.rb +29 -0
- data/lib/htm/timeframe.rb +194 -0
- data/lib/htm/timeframe_extractor.rb +307 -0
- data/lib/htm/version.rb +1 -1
- data/lib/htm/working_memory.rb +165 -70
- data/lib/htm.rb +352 -133
- data/lib/tasks/doc.rake +300 -0
- data/lib/tasks/files.rake +299 -0
- data/lib/tasks/htm.rake +188 -2
- data/lib/tasks/jobs.rake +10 -12
- data/lib/tasks/tags.rake +194 -0
- data/mkdocs.yml +91 -9
- data/notes/ARCHITECTURE_REVIEW.md +1167 -0
- data/notes/IMPLEMENTATION_SUMMARY.md +606 -0
- data/notes/MULTI_FRAMEWORK_IMPLEMENTATION.md +451 -0
- data/notes/next_steps.md +100 -0
- data/notes/plan.md +627 -0
- data/notes/tag_ontology_enhancement_ideas.md +222 -0
- data/notes/timescaledb_removal_summary.md +200 -0
- metadata +177 -37
- data/db/migrate/20250101000002_create_robots.rb +0 -14
- data/db/migrate/20250101000003_create_nodes.rb +0 -42
- data/db/migrate/20250101000005_create_tags.rb +0 -38
- data/db/migrate/20250101000007_add_node_vector_indexes.rb +0 -30
- data/dbdoc/public.node_tags.svg +0 -112
- data/dbdoc/public.nodes.svg +0 -118
- data/dbdoc/public.robots.svg +0 -90
- data/dbdoc/public.tags.svg +0 -60
- data/dbdoc/schema.svg +0 -154
- data/{dbdoc → docs/database}/public.node_stats.md +0 -0
- data/{dbdoc → docs/database}/public.node_stats.svg +0 -0
- data/{dbdoc → docs/database}/public.nodes_tags.md +0 -0
- data/{dbdoc → docs/database}/public.nodes_tags.svg +0 -0
- data/{dbdoc → docs/database}/public.ontology_structure.md +0 -0
- data/{dbdoc → docs/database}/public.ontology_structure.svg +0 -0
- data/{dbdoc → docs/database}/public.operations_log.md +0 -0
- data/{dbdoc → docs/database}/public.operations_log.svg +0 -0
- data/{dbdoc → docs/database}/public.relationships.md +0 -0
- data/{dbdoc → docs/database}/public.relationships.svg +0 -0
- data/{dbdoc → docs/database}/public.robot_activity.md +0 -0
- data/{dbdoc → docs/database}/public.robot_activity.svg +0 -0
- data/{dbdoc → docs/database}/public.schema_migrations.md +0 -0
- data/{dbdoc → docs/database}/public.schema_migrations.svg +0 -0
- data/{dbdoc → docs/database}/public.tags.md +3 -3
- /data/{dbdoc → docs/database}/public.topic_relationships.md +0 -0
- /data/{dbdoc → docs/database}/public.topic_relationships.svg +0 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
|
3
|
+
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
|
5
|
+
-->
|
|
6
|
+
<!-- Title: public.tags Pages: 1 -->
|
|
7
|
+
<svg width="1466pt" height="863pt"
|
|
8
|
+
viewBox="0.00 0.00 1465.73 863.20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
9
|
+
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 859.2)">
|
|
10
|
+
<title>public.tags</title>
|
|
11
|
+
<polygon fill="white" stroke="none" points="-4,4 -4,-859.2 1461.73,-859.2 1461.73,4 -4,4"/>
|
|
12
|
+
<!-- public.tags -->
|
|
13
|
+
<g id="node1" class="node">
|
|
14
|
+
<title>public.tags</title>
|
|
15
|
+
<polygon fill="#efefef" stroke="none" points="46.2,-305 46.2,-351 650.83,-351 650.83,-305 46.2,-305"/>
|
|
16
|
+
<polygon fill="none" stroke="black" points="46.2,-305 46.2,-351 650.83,-351 650.83,-305 46.2,-305"/>
|
|
17
|
+
<text text-anchor="start" x="247.02" y="-328.8" font-family="Arial Bold" font-size="18.00">public.tags</text>
|
|
18
|
+
<text text-anchor="start" x="325.51" y="-328.8" font-family="Arial" font-size="14.00"> </text>
|
|
19
|
+
<text text-anchor="start" x="356.63" y="-328.8" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
20
|
+
<text text-anchor="start" x="236.06" y="-314.4" font-family="Arial" font-size="14.00" fill="#333333">Unique tag names for categorization</text>
|
|
21
|
+
<polygon fill="none" stroke="black" points="46.2,-274.2 46.2,-305 650.83,-305 650.83,-274.2 46.2,-274.2"/>
|
|
22
|
+
<text text-anchor="start" x="53.2" y="-286.4" font-family="Arial" font-size="14.00">created_at </text>
|
|
23
|
+
<text text-anchor="start" x="123.25" y="-286.4" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
24
|
+
<text text-anchor="start" x="288.97" y="-286.4" font-family="Arial" font-size="14.00"> When this tag was created</text>
|
|
25
|
+
<polygon fill="none" stroke="black" points="46.2,-243.4 46.2,-274.2 650.83,-274.2 650.83,-243.4 46.2,-243.4"/>
|
|
26
|
+
<text text-anchor="start" x="53.2" y="-255.6" font-family="Arial" font-size="14.00">id </text>
|
|
27
|
+
<text text-anchor="start" x="67.99" y="-255.6" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
28
|
+
<polygon fill="none" stroke="black" points="46.2,-212.6 46.2,-243.4 650.83,-243.4 650.83,-212.6 46.2,-212.6"/>
|
|
29
|
+
<text text-anchor="start" x="53.2" y="-224.8" font-family="Arial" font-size="14.00">name </text>
|
|
30
|
+
<text text-anchor="start" x="92.11" y="-224.8" font-family="Arial" font-size="14.00" fill="#666666">[text]</text>
|
|
31
|
+
<text text-anchor="start" x="122.45" y="-224.8" font-family="Arial" font-size="14.00"> Hierarchical tag in format: root:level1:level2 (e.g., database:postgresql:timescaledb)</text>
|
|
32
|
+
<polygon fill="none" stroke="black" stroke-width="3" points="44.7,-211.1 44.7,-352.5 652.33,-352.5 652.33,-211.1 44.7,-211.1"/>
|
|
33
|
+
</g>
|
|
34
|
+
<!-- public.node_tags -->
|
|
35
|
+
<g id="node2" class="node">
|
|
36
|
+
<title>public.node_tags</title>
|
|
37
|
+
<polygon fill="#efefef" stroke="none" points="482.91,-766 482.91,-812 952.12,-812 952.12,-766 482.91,-766"/>
|
|
38
|
+
<polygon fill="none" stroke="black" points="482.91,-766 482.91,-812 952.12,-812 952.12,-766 482.91,-766"/>
|
|
39
|
+
<text text-anchor="start" x="594.03" y="-789.8" font-family="Arial Bold" font-size="18.00">public.node_tags</text>
|
|
40
|
+
<text text-anchor="start" x="716.51" y="-789.8" font-family="Arial" font-size="14.00"> </text>
|
|
41
|
+
<text text-anchor="start" x="747.62" y="-789.8" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
42
|
+
<text text-anchor="start" x="556.43" y="-775.4" font-family="Arial" font-size="14.00" fill="#333333">Join table connecting nodes to tags (many-to-many)</text>
|
|
43
|
+
<polygon fill="none" stroke="black" points="482.91,-735.2 482.91,-766 952.12,-766 952.12,-735.2 482.91,-735.2"/>
|
|
44
|
+
<text text-anchor="start" x="489.91" y="-747.4" font-family="Arial" font-size="14.00">created_at </text>
|
|
45
|
+
<text text-anchor="start" x="559.95" y="-747.4" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
46
|
+
<text text-anchor="start" x="725.68" y="-747.4" font-family="Arial" font-size="14.00"> When this association was created</text>
|
|
47
|
+
<polygon fill="none" stroke="black" points="482.91,-704.4 482.91,-735.2 952.12,-735.2 952.12,-704.4 482.91,-704.4"/>
|
|
48
|
+
<text text-anchor="start" x="489.91" y="-716.6" font-family="Arial" font-size="14.00">id </text>
|
|
49
|
+
<text text-anchor="start" x="504.69" y="-716.6" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
50
|
+
<polygon fill="none" stroke="black" points="482.91,-673.6 482.91,-704.4 952.12,-704.4 952.12,-673.6 482.91,-673.6"/>
|
|
51
|
+
<text text-anchor="start" x="489.91" y="-685.8" font-family="Arial" font-size="14.00">node_id </text>
|
|
52
|
+
<text text-anchor="start" x="543.62" y="-685.8" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
53
|
+
<text text-anchor="start" x="584.87" y="-685.8" font-family="Arial" font-size="14.00"> ID of the node being tagged</text>
|
|
54
|
+
<polygon fill="none" stroke="black" points="482.91,-642.8 482.91,-673.6 952.12,-673.6 952.12,-642.8 482.91,-642.8"/>
|
|
55
|
+
<text text-anchor="start" x="489.91" y="-655" font-family="Arial" font-size="14.00">tag_id </text>
|
|
56
|
+
<text text-anchor="start" x="531.94" y="-655" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
57
|
+
<text text-anchor="start" x="573.19" y="-655" font-family="Arial" font-size="14.00"> ID of the tag being applied</text>
|
|
58
|
+
</g>
|
|
59
|
+
<!-- public.node_tags->public.tags -->
|
|
60
|
+
<g id="edge1" class="edge">
|
|
61
|
+
<title>public.node_tags:tag_id->public.tags:id</title>
|
|
62
|
+
<path fill="none" stroke="black" d="M472.11,-655.39C461.78,-646.74 475.41,-619.83 482.91,-599.6 523.51,-490 610.76,-507 650.83,-397.2 671.91,-339.41 713.34,-258.8 651.83,-258.8"/>
|
|
63
|
+
<polygon fill="black" stroke="black" points="471.97,-655.35 480.35,-662.43 477.1,-656.82 481.26,-658.02 481.26,-658.02 481.26,-658.02 477.1,-656.82 482.82,-653.78 471.97,-655.35"/>
|
|
64
|
+
<text text-anchor="start" x="152.05" y="-668.2" font-family="Arial" font-size="10.00">FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE</text>
|
|
65
|
+
</g>
|
|
66
|
+
<!-- public.nodes -->
|
|
67
|
+
<g id="node3" class="node">
|
|
68
|
+
<title>public.nodes</title>
|
|
69
|
+
<polygon fill="#efefef" stroke="none" points="758.49,-474.4 758.49,-520.4 1414.53,-520.4 1414.53,-474.4 758.49,-474.4"/>
|
|
70
|
+
<polygon fill="none" stroke="black" points="758.49,-474.4 758.49,-520.4 1414.53,-520.4 1414.53,-474.4 758.49,-474.4"/>
|
|
71
|
+
<text text-anchor="start" x="978.53" y="-498.2" font-family="Arial Bold" font-size="18.00">public.nodes</text>
|
|
72
|
+
<text text-anchor="start" x="1070.01" y="-498.2" font-family="Arial" font-size="14.00"> </text>
|
|
73
|
+
<text text-anchor="start" x="1101.13" y="-498.2" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
74
|
+
<text text-anchor="start" x="895.09" y="-483.8" font-family="Arial" font-size="14.00" fill="#333333">Core memory storage for conversation messages and context</text>
|
|
75
|
+
<polygon fill="none" stroke="black" points="758.49,-443.6 758.49,-474.4 1414.53,-474.4 1414.53,-443.6 758.49,-443.6"/>
|
|
76
|
+
<text text-anchor="start" x="765.49" y="-455.8" font-family="Arial" font-size="14.00">access_count </text>
|
|
77
|
+
<text text-anchor="start" x="854.99" y="-455.8" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
78
|
+
<text text-anchor="start" x="905.58" y="-455.8" font-family="Arial" font-size="14.00"> Number of times this node has been accessed/retrieved</text>
|
|
79
|
+
<polygon fill="none" stroke="black" points="758.49,-412.8 758.49,-443.6 1414.53,-443.6 1414.53,-412.8 758.49,-412.8"/>
|
|
80
|
+
<text text-anchor="start" x="765.49" y="-425" font-family="Arial" font-size="14.00">chunk_position </text>
|
|
81
|
+
<text text-anchor="start" x="862.78" y="-425" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
82
|
+
<text text-anchor="start" x="913.37" y="-425" font-family="Arial" font-size="14.00"> Position within source file (0-indexed)</text>
|
|
83
|
+
<polygon fill="none" stroke="black" points="758.49,-382 758.49,-412.8 1414.53,-412.8 1414.53,-382 758.49,-382"/>
|
|
84
|
+
<text text-anchor="start" x="765.49" y="-394.2" font-family="Arial" font-size="14.00">content </text>
|
|
85
|
+
<text text-anchor="start" x="815.31" y="-394.2" font-family="Arial" font-size="14.00" fill="#666666">[text]</text>
|
|
86
|
+
<text text-anchor="start" x="845.65" y="-394.2" font-family="Arial" font-size="14.00"> The conversation message/utterance content</text>
|
|
87
|
+
<polygon fill="none" stroke="black" points="758.49,-351.2 758.49,-382 1414.53,-382 1414.53,-351.2 758.49,-351.2"/>
|
|
88
|
+
<text text-anchor="start" x="765.49" y="-363.4" font-family="Arial" font-size="14.00">content_hash </text>
|
|
89
|
+
<text text-anchor="start" x="853.45" y="-363.4" font-family="Arial" font-size="14.00" fill="#666666">[varchar(64)]</text>
|
|
90
|
+
<text text-anchor="start" x="932.81" y="-363.4" font-family="Arial" font-size="14.00"> SHA-256 hash of content for deduplication</text>
|
|
91
|
+
<polygon fill="none" stroke="black" points="758.49,-320.4 758.49,-351.2 1414.53,-351.2 1414.53,-320.4 758.49,-320.4"/>
|
|
92
|
+
<text text-anchor="start" x="765.49" y="-332.6" font-family="Arial" font-size="14.00">created_at </text>
|
|
93
|
+
<text text-anchor="start" x="835.54" y="-332.6" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
94
|
+
<text text-anchor="start" x="1001.26" y="-332.6" font-family="Arial" font-size="14.00"> When this memory was created</text>
|
|
95
|
+
<polygon fill="none" stroke="black" points="758.49,-289.6 758.49,-320.4 1414.53,-320.4 1414.53,-289.6 758.49,-289.6"/>
|
|
96
|
+
<text text-anchor="start" x="765.49" y="-301.8" font-family="Arial" font-size="14.00">deleted_at </text>
|
|
97
|
+
<text text-anchor="start" x="834.78" y="-301.8" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
98
|
+
<text text-anchor="start" x="1000.5" y="-301.8" font-family="Arial" font-size="14.00"> Soft delete timestamp - node is considered deleted when set</text>
|
|
99
|
+
<polygon fill="none" stroke="black" points="758.49,-258.8 758.49,-289.6 1414.53,-289.6 1414.53,-258.8 758.49,-258.8"/>
|
|
100
|
+
<text text-anchor="start" x="765.49" y="-271" font-family="Arial" font-size="14.00">embedding </text>
|
|
101
|
+
<text text-anchor="start" x="838.66" y="-271" font-family="Arial" font-size="14.00" fill="#666666">[vector(2000)]</text>
|
|
102
|
+
<text text-anchor="start" x="925.03" y="-271" font-family="Arial" font-size="14.00"> Vector embedding (max 2000 dimensions) for semantic search</text>
|
|
103
|
+
<polygon fill="none" stroke="black" points="758.49,-228 758.49,-258.8 1414.53,-258.8 1414.53,-228 758.49,-228"/>
|
|
104
|
+
<text text-anchor="start" x="765.49" y="-240.2" font-family="Arial" font-size="14.00">embedding_dimension </text>
|
|
105
|
+
<text text-anchor="start" x="910.26" y="-240.2" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
106
|
+
<text text-anchor="start" x="960.84" y="-240.2" font-family="Arial" font-size="14.00"> Actual number of dimensions used in the embedding vector (max 2000)</text>
|
|
107
|
+
<polygon fill="none" stroke="black" points="758.49,-197.2 758.49,-228 1414.53,-228 1414.53,-197.2 758.49,-197.2"/>
|
|
108
|
+
<text text-anchor="start" x="765.49" y="-209.4" font-family="Arial" font-size="14.00">id </text>
|
|
109
|
+
<text text-anchor="start" x="780.28" y="-209.4" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
110
|
+
<polygon fill="none" stroke="black" points="758.49,-166.4 758.49,-197.2 1414.53,-197.2 1414.53,-166.4 758.49,-166.4"/>
|
|
111
|
+
<text text-anchor="start" x="765.49" y="-178.6" font-family="Arial" font-size="14.00">last_accessed </text>
|
|
112
|
+
<text text-anchor="start" x="858.1" y="-178.6" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
113
|
+
<text text-anchor="start" x="1023.82" y="-178.6" font-family="Arial" font-size="14.00"> When this memory was last accessed</text>
|
|
114
|
+
<polygon fill="none" stroke="black" points="758.49,-135.6 758.49,-166.4 1414.53,-166.4 1414.53,-135.6 758.49,-135.6"/>
|
|
115
|
+
<text text-anchor="start" x="765.49" y="-147.8" font-family="Arial" font-size="14.00">metadata </text>
|
|
116
|
+
<text text-anchor="start" x="827.76" y="-147.8" font-family="Arial" font-size="14.00" fill="#666666">[jsonb]</text>
|
|
117
|
+
<text text-anchor="start" x="869" y="-147.8" font-family="Arial" font-size="14.00"> Flexible metadata storage (memory_type, importance, source, etc.)</text>
|
|
118
|
+
<polygon fill="none" stroke="black" points="758.49,-104.8 758.49,-135.6 1414.53,-135.6 1414.53,-104.8 758.49,-104.8"/>
|
|
119
|
+
<text text-anchor="start" x="765.49" y="-117" font-family="Arial" font-size="14.00">source_id </text>
|
|
120
|
+
<text text-anchor="start" x="830.09" y="-117" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
121
|
+
<text text-anchor="start" x="871.33" y="-117" font-family="Arial" font-size="14.00"> Reference to source file (for file-loaded nodes)</text>
|
|
122
|
+
<polygon fill="none" stroke="black" points="758.49,-74 758.49,-104.8 1414.53,-104.8 1414.53,-74 758.49,-74"/>
|
|
123
|
+
<text text-anchor="start" x="765.49" y="-86.2" font-family="Arial" font-size="14.00">token_count </text>
|
|
124
|
+
<text text-anchor="start" x="845.67" y="-86.2" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
125
|
+
<text text-anchor="start" x="896.25" y="-86.2" font-family="Arial" font-size="14.00"> Number of tokens in the content (for context budget management)</text>
|
|
126
|
+
<polygon fill="none" stroke="black" points="758.49,-43.2 758.49,-74 1414.53,-74 1414.53,-43.2 758.49,-43.2"/>
|
|
127
|
+
<text text-anchor="start" x="765.49" y="-55.4" font-family="Arial" font-size="14.00">updated_at </text>
|
|
128
|
+
<text text-anchor="start" x="839.45" y="-55.4" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
129
|
+
<text text-anchor="start" x="1005.18" y="-55.4" font-family="Arial" font-size="14.00"> When this memory was last modified</text>
|
|
130
|
+
</g>
|
|
131
|
+
<!-- public.node_tags->public.nodes -->
|
|
132
|
+
<g id="edge2" class="edge">
|
|
133
|
+
<title>public.node_tags:node_id->public.nodes:id</title>
|
|
134
|
+
<path fill="none" stroke="black" d="M963.23,-687.39C989.79,-677.75 975.19,-627.05 952.12,-599.6 895.79,-532.6 814.54,-630.83 758.49,-563.6 708.55,-503.69 679.49,-212.6 757.49,-212.6"/>
|
|
135
|
+
<polygon fill="black" stroke="black" points="963.33,-687.38 952.74,-684.5 958.06,-688.22 953.78,-688.9 953.78,-688.9 953.78,-688.9 958.06,-688.22 954.15,-693.39 963.33,-687.38"/>
|
|
136
|
+
<text text-anchor="start" x="960.12" y="-699" font-family="Arial" font-size="10.00">FOREIGN KEY (node_id) REFERENCES nodes(id) ON DELETE CASCADE</text>
|
|
137
|
+
</g>
|
|
138
|
+
</g>
|
|
139
|
+
</svg>
|