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,211 @@
|
|
|
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.file_sources Pages: 1 -->
|
|
7
|
+
<svg width="1329pt" height="1469pt"
|
|
8
|
+
viewBox="0.00 0.00 1328.70 1468.80" 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 1464.8)">
|
|
10
|
+
<title>public.file_sources</title>
|
|
11
|
+
<polygon fill="white" stroke="none" points="-4,4 -4,-1464.8 1324.7,-1464.8 1324.7,4 -4,4"/>
|
|
12
|
+
<!-- public.file_sources -->
|
|
13
|
+
<g id="node1" class="node">
|
|
14
|
+
<title>public.file_sources</title>
|
|
15
|
+
<polygon fill="#efefef" stroke="none" points="358.93,-323.4 358.93,-369.4 850.68,-369.4 850.68,-323.4 358.93,-323.4"/>
|
|
16
|
+
<polygon fill="none" stroke="black" points="358.93,-323.4 358.93,-369.4 850.68,-369.4 850.68,-323.4 358.93,-323.4"/>
|
|
17
|
+
<text text-anchor="start" x="474.33" y="-347.2" font-family="Arial Bold" font-size="18.00">public.file_sources</text>
|
|
18
|
+
<text text-anchor="start" x="610.79" y="-347.2" font-family="Arial" font-size="14.00"> </text>
|
|
19
|
+
<text text-anchor="start" x="641.91" y="-347.2" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
20
|
+
<text text-anchor="start" x="471.34" y="-332.8" font-family="Arial" font-size="14.00" fill="#333333">Source file metadata for loaded documents</text>
|
|
21
|
+
<polygon fill="none" stroke="black" points="358.93,-292.6 358.93,-323.4 850.68,-323.4 850.68,-292.6 358.93,-292.6"/>
|
|
22
|
+
<text text-anchor="start" x="365.93" y="-304.8" font-family="Arial" font-size="14.00">created_at </text>
|
|
23
|
+
<text text-anchor="start" x="435.98" y="-304.8" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
24
|
+
<polygon fill="none" stroke="black" points="358.93,-261.8 358.93,-292.6 850.68,-292.6 850.68,-261.8 358.93,-261.8"/>
|
|
25
|
+
<text text-anchor="start" x="365.93" y="-274" font-family="Arial" font-size="14.00">file_hash </text>
|
|
26
|
+
<text text-anchor="start" x="425.87" y="-274" font-family="Arial" font-size="14.00" fill="#666666">[varchar(64)]</text>
|
|
27
|
+
<text text-anchor="start" x="505.22" y="-274" font-family="Arial" font-size="14.00"> SHA-256 hash of file content</text>
|
|
28
|
+
<polygon fill="none" stroke="black" points="358.93,-231 358.93,-261.8 850.68,-261.8 850.68,-231 358.93,-231"/>
|
|
29
|
+
<text text-anchor="start" x="365.93" y="-243.2" font-family="Arial" font-size="14.00">file_path </text>
|
|
30
|
+
<text text-anchor="start" x="422.75" y="-243.2" font-family="Arial" font-size="14.00" fill="#666666">[text]</text>
|
|
31
|
+
<text text-anchor="start" x="453.1" y="-243.2" font-family="Arial" font-size="14.00"> Absolute path to source file</text>
|
|
32
|
+
<polygon fill="none" stroke="black" points="358.93,-200.2 358.93,-231 850.68,-231 850.68,-200.2 358.93,-200.2"/>
|
|
33
|
+
<text text-anchor="start" x="365.93" y="-212.4" font-family="Arial" font-size="14.00">file_size </text>
|
|
34
|
+
<text text-anchor="start" x="420.4" y="-212.4" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
35
|
+
<text text-anchor="start" x="470.99" y="-212.4" font-family="Arial" font-size="14.00"> File size in bytes</text>
|
|
36
|
+
<polygon fill="none" stroke="black" points="358.93,-169.4 358.93,-200.2 850.68,-200.2 850.68,-169.4 358.93,-169.4"/>
|
|
37
|
+
<text text-anchor="start" x="365.93" y="-181.6" font-family="Arial" font-size="14.00">frontmatter </text>
|
|
38
|
+
<text text-anchor="start" x="437.51" y="-181.6" font-family="Arial" font-size="14.00" fill="#666666">[jsonb]</text>
|
|
39
|
+
<text text-anchor="start" x="478.76" y="-181.6" font-family="Arial" font-size="14.00"> Parsed YAML frontmatter</text>
|
|
40
|
+
<polygon fill="none" stroke="black" points="358.93,-138.6 358.93,-169.4 850.68,-169.4 850.68,-138.6 358.93,-138.6"/>
|
|
41
|
+
<text text-anchor="start" x="365.93" y="-150.8" font-family="Arial" font-size="14.00">id </text>
|
|
42
|
+
<text text-anchor="start" x="380.72" y="-150.8" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
43
|
+
<polygon fill="none" stroke="black" points="358.93,-107.8 358.93,-138.6 850.68,-138.6 850.68,-107.8 358.93,-107.8"/>
|
|
44
|
+
<text text-anchor="start" x="365.93" y="-120" font-family="Arial" font-size="14.00">last_synced_at </text>
|
|
45
|
+
<text text-anchor="start" x="463.22" y="-120" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
46
|
+
<text text-anchor="start" x="628.94" y="-120" font-family="Arial" font-size="14.00"> When file was last synced to HTM</text>
|
|
47
|
+
<polygon fill="none" stroke="black" points="358.93,-77 358.93,-107.8 850.68,-107.8 850.68,-77 358.93,-77"/>
|
|
48
|
+
<text text-anchor="start" x="365.93" y="-89.2" font-family="Arial" font-size="14.00">mtime </text>
|
|
49
|
+
<text text-anchor="start" x="407.93" y="-89.2" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
50
|
+
<text text-anchor="start" x="573.66" y="-89.2" font-family="Arial" font-size="14.00"> File modification time</text>
|
|
51
|
+
<polygon fill="none" stroke="black" points="358.93,-46.2 358.93,-77 850.68,-77 850.68,-46.2 358.93,-46.2"/>
|
|
52
|
+
<text text-anchor="start" x="365.93" y="-58.4" font-family="Arial" font-size="14.00">updated_at </text>
|
|
53
|
+
<text text-anchor="start" x="439.89" y="-58.4" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
54
|
+
<polygon fill="none" stroke="black" stroke-width="3" points="357.43,-44.7 357.43,-370.9 852.18,-370.9 852.18,-44.7 357.43,-44.7"/>
|
|
55
|
+
</g>
|
|
56
|
+
<!-- public.nodes -->
|
|
57
|
+
<g id="node2" class="node">
|
|
58
|
+
<title>public.nodes</title>
|
|
59
|
+
<polygon fill="#efefef" stroke="none" points="276.79,-926 276.79,-972 932.83,-972 932.83,-926 276.79,-926"/>
|
|
60
|
+
<polygon fill="none" stroke="black" points="276.79,-926 276.79,-972 932.83,-972 932.83,-926 276.79,-926"/>
|
|
61
|
+
<text text-anchor="start" x="496.82" y="-949.8" font-family="Arial Bold" font-size="18.00">public.nodes</text>
|
|
62
|
+
<text text-anchor="start" x="588.3" y="-949.8" font-family="Arial" font-size="14.00"> </text>
|
|
63
|
+
<text text-anchor="start" x="619.42" y="-949.8" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
64
|
+
<text text-anchor="start" x="413.38" y="-935.4" font-family="Arial" font-size="14.00" fill="#333333">Core memory storage for conversation messages and context</text>
|
|
65
|
+
<polygon fill="none" stroke="black" points="276.79,-895.2 276.79,-926 932.83,-926 932.83,-895.2 276.79,-895.2"/>
|
|
66
|
+
<text text-anchor="start" x="283.79" y="-907.4" font-family="Arial" font-size="14.00">access_count </text>
|
|
67
|
+
<text text-anchor="start" x="373.28" y="-907.4" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
68
|
+
<text text-anchor="start" x="423.87" y="-907.4" font-family="Arial" font-size="14.00"> Number of times this node has been accessed/retrieved</text>
|
|
69
|
+
<polygon fill="none" stroke="black" points="276.79,-864.4 276.79,-895.2 932.83,-895.2 932.83,-864.4 276.79,-864.4"/>
|
|
70
|
+
<text text-anchor="start" x="283.79" y="-876.6" font-family="Arial" font-size="14.00">chunk_position </text>
|
|
71
|
+
<text text-anchor="start" x="381.08" y="-876.6" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
72
|
+
<text text-anchor="start" x="431.66" y="-876.6" font-family="Arial" font-size="14.00"> Position within source file (0-indexed)</text>
|
|
73
|
+
<polygon fill="none" stroke="black" points="276.79,-833.6 276.79,-864.4 932.83,-864.4 932.83,-833.6 276.79,-833.6"/>
|
|
74
|
+
<text text-anchor="start" x="283.79" y="-845.8" font-family="Arial" font-size="14.00">content </text>
|
|
75
|
+
<text text-anchor="start" x="333.6" y="-845.8" font-family="Arial" font-size="14.00" fill="#666666">[text]</text>
|
|
76
|
+
<text text-anchor="start" x="363.95" y="-845.8" font-family="Arial" font-size="14.00"> The conversation message/utterance content</text>
|
|
77
|
+
<polygon fill="none" stroke="black" points="276.79,-802.8 276.79,-833.6 932.83,-833.6 932.83,-802.8 276.79,-802.8"/>
|
|
78
|
+
<text text-anchor="start" x="283.79" y="-815" font-family="Arial" font-size="14.00">content_hash </text>
|
|
79
|
+
<text text-anchor="start" x="371.74" y="-815" font-family="Arial" font-size="14.00" fill="#666666">[varchar(64)]</text>
|
|
80
|
+
<text text-anchor="start" x="451.1" y="-815" font-family="Arial" font-size="14.00"> SHA-256 hash of content for deduplication</text>
|
|
81
|
+
<polygon fill="none" stroke="black" points="276.79,-772 276.79,-802.8 932.83,-802.8 932.83,-772 276.79,-772"/>
|
|
82
|
+
<text text-anchor="start" x="283.79" y="-784.2" font-family="Arial" font-size="14.00">created_at </text>
|
|
83
|
+
<text text-anchor="start" x="353.83" y="-784.2" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
84
|
+
<text text-anchor="start" x="519.56" y="-784.2" font-family="Arial" font-size="14.00"> When this memory was created</text>
|
|
85
|
+
<polygon fill="none" stroke="black" points="276.79,-741.2 276.79,-772 932.83,-772 932.83,-741.2 276.79,-741.2"/>
|
|
86
|
+
<text text-anchor="start" x="283.79" y="-753.4" font-family="Arial" font-size="14.00">deleted_at </text>
|
|
87
|
+
<text text-anchor="start" x="353.07" y="-753.4" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
88
|
+
<text text-anchor="start" x="518.79" y="-753.4" font-family="Arial" font-size="14.00"> Soft delete timestamp - node is considered deleted when set</text>
|
|
89
|
+
<polygon fill="none" stroke="black" points="276.79,-710.4 276.79,-741.2 932.83,-741.2 932.83,-710.4 276.79,-710.4"/>
|
|
90
|
+
<text text-anchor="start" x="283.79" y="-722.6" font-family="Arial" font-size="14.00">embedding </text>
|
|
91
|
+
<text text-anchor="start" x="356.95" y="-722.6" font-family="Arial" font-size="14.00" fill="#666666">[vector(2000)]</text>
|
|
92
|
+
<text text-anchor="start" x="443.32" y="-722.6" font-family="Arial" font-size="14.00"> Vector embedding (max 2000 dimensions) for semantic search</text>
|
|
93
|
+
<polygon fill="none" stroke="black" points="276.79,-679.6 276.79,-710.4 932.83,-710.4 932.83,-679.6 276.79,-679.6"/>
|
|
94
|
+
<text text-anchor="start" x="283.79" y="-691.8" font-family="Arial" font-size="14.00">embedding_dimension </text>
|
|
95
|
+
<text text-anchor="start" x="428.55" y="-691.8" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
96
|
+
<text text-anchor="start" x="479.14" y="-691.8" font-family="Arial" font-size="14.00"> Actual number of dimensions used in the embedding vector (max 2000)</text>
|
|
97
|
+
<polygon fill="none" stroke="black" points="276.79,-648.8 276.79,-679.6 932.83,-679.6 932.83,-648.8 276.79,-648.8"/>
|
|
98
|
+
<text text-anchor="start" x="283.79" y="-661" font-family="Arial" font-size="14.00">id </text>
|
|
99
|
+
<text text-anchor="start" x="298.57" y="-661" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
100
|
+
<polygon fill="none" stroke="black" points="276.79,-618 276.79,-648.8 932.83,-648.8 932.83,-618 276.79,-618"/>
|
|
101
|
+
<text text-anchor="start" x="283.79" y="-630.2" font-family="Arial" font-size="14.00">last_accessed </text>
|
|
102
|
+
<text text-anchor="start" x="376.39" y="-630.2" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
103
|
+
<text text-anchor="start" x="542.12" y="-630.2" font-family="Arial" font-size="14.00"> When this memory was last accessed</text>
|
|
104
|
+
<polygon fill="none" stroke="black" points="276.79,-587.2 276.79,-618 932.83,-618 932.83,-587.2 276.79,-587.2"/>
|
|
105
|
+
<text text-anchor="start" x="283.79" y="-599.4" font-family="Arial" font-size="14.00">metadata </text>
|
|
106
|
+
<text text-anchor="start" x="346.05" y="-599.4" font-family="Arial" font-size="14.00" fill="#666666">[jsonb]</text>
|
|
107
|
+
<text text-anchor="start" x="387.3" y="-599.4" font-family="Arial" font-size="14.00"> Flexible metadata storage (memory_type, importance, source, etc.)</text>
|
|
108
|
+
<polygon fill="none" stroke="black" points="276.79,-556.4 276.79,-587.2 932.83,-587.2 932.83,-556.4 276.79,-556.4"/>
|
|
109
|
+
<text text-anchor="start" x="283.79" y="-568.6" font-family="Arial" font-size="14.00">source_id </text>
|
|
110
|
+
<text text-anchor="start" x="348.38" y="-568.6" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
111
|
+
<text text-anchor="start" x="389.63" y="-568.6" font-family="Arial" font-size="14.00"> Reference to source file (for file-loaded nodes)</text>
|
|
112
|
+
<polygon fill="none" stroke="black" points="276.79,-525.6 276.79,-556.4 932.83,-556.4 932.83,-525.6 276.79,-525.6"/>
|
|
113
|
+
<text text-anchor="start" x="283.79" y="-537.8" font-family="Arial" font-size="14.00">token_count </text>
|
|
114
|
+
<text text-anchor="start" x="363.96" y="-537.8" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
115
|
+
<text text-anchor="start" x="414.54" y="-537.8" font-family="Arial" font-size="14.00"> Number of tokens in the content (for context budget management)</text>
|
|
116
|
+
<polygon fill="none" stroke="black" points="276.79,-494.8 276.79,-525.6 932.83,-525.6 932.83,-494.8 276.79,-494.8"/>
|
|
117
|
+
<text text-anchor="start" x="283.79" y="-507" font-family="Arial" font-size="14.00">updated_at </text>
|
|
118
|
+
<text text-anchor="start" x="357.74" y="-507" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
119
|
+
<text text-anchor="start" x="523.47" y="-507" font-family="Arial" font-size="14.00"> When this memory was last modified</text>
|
|
120
|
+
</g>
|
|
121
|
+
<!-- public.nodes->public.file_sources -->
|
|
122
|
+
<g id="edge1" class="edge">
|
|
123
|
+
<title>public.nodes:source_id->public.file_sources:id</title>
|
|
124
|
+
<path fill="none" stroke="black" d="M944.08,-571.37C1119.98,-556.44 1037.41,-154 851.68,-154"/>
|
|
125
|
+
<polygon fill="black" stroke="black" points="944.15,-571.37 933.97,-567.29 938.82,-571.59 934.49,-571.77 934.49,-571.77 934.49,-571.77 938.82,-571.59 934.35,-576.28 944.15,-571.37"/>
|
|
126
|
+
<text text-anchor="start" x="940.83" y="-581.8" font-family="Arial" font-size="10.00">FOREIGN KEY (source_id) REFERENCES file_sources(id) ON DELETE SET NULL</text>
|
|
127
|
+
</g>
|
|
128
|
+
<!-- public.node_tags -->
|
|
129
|
+
<g id="node3" class="node">
|
|
130
|
+
<title>public.node_tags</title>
|
|
131
|
+
<polygon fill="#efefef" stroke="none" points="43.2,-1294.6 43.2,-1340.6 512.41,-1340.6 512.41,-1294.6 43.2,-1294.6"/>
|
|
132
|
+
<polygon fill="none" stroke="black" points="43.2,-1294.6 43.2,-1340.6 512.41,-1340.6 512.41,-1294.6 43.2,-1294.6"/>
|
|
133
|
+
<text text-anchor="start" x="154.32" y="-1318.4" font-family="Arial Bold" font-size="18.00">public.node_tags</text>
|
|
134
|
+
<text text-anchor="start" x="276.8" y="-1318.4" font-family="Arial" font-size="14.00"> </text>
|
|
135
|
+
<text text-anchor="start" x="307.92" y="-1318.4" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
136
|
+
<text text-anchor="start" x="116.72" y="-1304" font-family="Arial" font-size="14.00" fill="#333333">Join table connecting nodes to tags (many-to-many)</text>
|
|
137
|
+
<polygon fill="none" stroke="black" points="43.2,-1263.8 43.2,-1294.6 512.41,-1294.6 512.41,-1263.8 43.2,-1263.8"/>
|
|
138
|
+
<text text-anchor="start" x="50.2" y="-1276" font-family="Arial" font-size="14.00">created_at </text>
|
|
139
|
+
<text text-anchor="start" x="120.25" y="-1276" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
140
|
+
<text text-anchor="start" x="285.97" y="-1276" font-family="Arial" font-size="14.00"> When this association was created</text>
|
|
141
|
+
<polygon fill="none" stroke="black" points="43.2,-1233 43.2,-1263.8 512.41,-1263.8 512.41,-1233 43.2,-1233"/>
|
|
142
|
+
<text text-anchor="start" x="50.2" y="-1245.2" font-family="Arial" font-size="14.00">id </text>
|
|
143
|
+
<text text-anchor="start" x="64.99" y="-1245.2" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
144
|
+
<polygon fill="none" stroke="black" points="43.2,-1202.2 43.2,-1233 512.41,-1233 512.41,-1202.2 43.2,-1202.2"/>
|
|
145
|
+
<text text-anchor="start" x="50.2" y="-1214.4" font-family="Arial" font-size="14.00">node_id </text>
|
|
146
|
+
<text text-anchor="start" x="103.92" y="-1214.4" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
147
|
+
<text text-anchor="start" x="145.16" y="-1214.4" font-family="Arial" font-size="14.00"> ID of the node being tagged</text>
|
|
148
|
+
<polygon fill="none" stroke="black" points="43.2,-1171.4 43.2,-1202.2 512.41,-1202.2 512.41,-1171.4 43.2,-1171.4"/>
|
|
149
|
+
<text text-anchor="start" x="50.2" y="-1183.6" font-family="Arial" font-size="14.00">tag_id </text>
|
|
150
|
+
<text text-anchor="start" x="92.23" y="-1183.6" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
151
|
+
<text text-anchor="start" x="133.48" y="-1183.6" font-family="Arial" font-size="14.00"> ID of the tag being applied</text>
|
|
152
|
+
</g>
|
|
153
|
+
<!-- public.node_tags->public.nodes -->
|
|
154
|
+
<g id="edge2" class="edge">
|
|
155
|
+
<title>public.node_tags:node_id->public.nodes:id</title>
|
|
156
|
+
<path fill="none" stroke="black" d="M523.42,-1216.07C549.34,-1206.9 531.68,-1158.44 512.41,-1128.2 449.99,-1030.26 338.8,-1113.4 276.79,-1015.2 193.49,-883.3 119.79,-664.2 275.79,-664.2"/>
|
|
157
|
+
<polygon fill="black" stroke="black" points="523.63,-1216.04 513.06,-1213.1 518.35,-1216.85 514.07,-1217.5 514.07,-1217.5 514.07,-1217.5 518.35,-1216.85 514.42,-1222 523.63,-1216.04"/>
|
|
158
|
+
<text text-anchor="start" x="520.41" y="-1227.6" font-family="Arial" font-size="10.00">FOREIGN KEY (node_id) REFERENCES nodes(id) ON DELETE CASCADE</text>
|
|
159
|
+
</g>
|
|
160
|
+
<!-- public.robot_nodes -->
|
|
161
|
+
<g id="node4" class="node">
|
|
162
|
+
<title>public.robot_nodes</title>
|
|
163
|
+
<polygon fill="#efefef" stroke="none" points="617.06,-1371.6 617.06,-1417.6 1246.55,-1417.6 1246.55,-1371.6 617.06,-1371.6"/>
|
|
164
|
+
<polygon fill="none" stroke="black" points="617.06,-1371.6 617.06,-1417.6 1246.55,-1417.6 1246.55,-1371.6 617.06,-1371.6"/>
|
|
165
|
+
<text text-anchor="start" x="800.32" y="-1395.4" font-family="Arial Bold" font-size="18.00">public.robot_nodes</text>
|
|
166
|
+
<text text-anchor="start" x="938.8" y="-1395.4" font-family="Arial" font-size="14.00"> </text>
|
|
167
|
+
<text text-anchor="start" x="969.92" y="-1395.4" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
168
|
+
<text text-anchor="start" x="764.5" y="-1381" font-family="Arial" font-size="14.00" fill="#333333">Join table connecting robots to nodes (many-to-many)</text>
|
|
169
|
+
<polygon fill="none" stroke="black" points="617.06,-1340.8 617.06,-1371.6 1246.55,-1371.6 1246.55,-1340.8 617.06,-1340.8"/>
|
|
170
|
+
<text text-anchor="start" x="624.06" y="-1353" font-family="Arial" font-size="14.00">created_at </text>
|
|
171
|
+
<text text-anchor="start" x="694.11" y="-1353" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
172
|
+
<polygon fill="none" stroke="black" points="617.06,-1310 617.06,-1340.8 1246.55,-1340.8 1246.55,-1310 617.06,-1310"/>
|
|
173
|
+
<text text-anchor="start" x="624.06" y="-1322.2" font-family="Arial" font-size="14.00">first_remembered_at </text>
|
|
174
|
+
<text text-anchor="start" x="757.12" y="-1322.2" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
175
|
+
<text text-anchor="start" x="922.84" y="-1322.2" font-family="Arial" font-size="14.00"> When this robot first remembered this content</text>
|
|
176
|
+
<polygon fill="none" stroke="black" points="617.06,-1279.2 617.06,-1310 1246.55,-1310 1246.55,-1279.2 617.06,-1279.2"/>
|
|
177
|
+
<text text-anchor="start" x="624.06" y="-1291.4" font-family="Arial" font-size="14.00">id </text>
|
|
178
|
+
<text text-anchor="start" x="638.85" y="-1291.4" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
179
|
+
<polygon fill="none" stroke="black" points="617.06,-1248.4 617.06,-1279.2 1246.55,-1279.2 1246.55,-1248.4 617.06,-1248.4"/>
|
|
180
|
+
<text text-anchor="start" x="624.06" y="-1260.6" font-family="Arial" font-size="14.00">last_remembered_at </text>
|
|
181
|
+
<text text-anchor="start" x="756.35" y="-1260.6" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
182
|
+
<text text-anchor="start" x="922.08" y="-1260.6" font-family="Arial" font-size="14.00"> When this robot last tried to remember this content</text>
|
|
183
|
+
<polygon fill="none" stroke="black" points="617.06,-1217.6 617.06,-1248.4 1246.55,-1248.4 1246.55,-1217.6 617.06,-1217.6"/>
|
|
184
|
+
<text text-anchor="start" x="624.06" y="-1229.8" font-family="Arial" font-size="14.00">node_id </text>
|
|
185
|
+
<text text-anchor="start" x="677.78" y="-1229.8" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
186
|
+
<text text-anchor="start" x="719.03" y="-1229.8" font-family="Arial" font-size="14.00"> ID of the node being remembered</text>
|
|
187
|
+
<polygon fill="none" stroke="black" points="617.06,-1186.8 617.06,-1217.6 1246.55,-1217.6 1246.55,-1186.8 617.06,-1186.8"/>
|
|
188
|
+
<text text-anchor="start" x="624.06" y="-1199" font-family="Arial" font-size="14.00">remember_count </text>
|
|
189
|
+
<text text-anchor="start" x="733.78" y="-1199" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
190
|
+
<text text-anchor="start" x="784.37" y="-1199" font-family="Arial" font-size="14.00"> Number of times this robot has tried to remember this content</text>
|
|
191
|
+
<polygon fill="none" stroke="black" points="617.06,-1156 617.06,-1186.8 1246.55,-1186.8 1246.55,-1156 617.06,-1156"/>
|
|
192
|
+
<text text-anchor="start" x="624.06" y="-1168.2" font-family="Arial" font-size="14.00">robot_id </text>
|
|
193
|
+
<text text-anchor="start" x="678.54" y="-1168.2" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
194
|
+
<text text-anchor="start" x="719.79" y="-1168.2" font-family="Arial" font-size="14.00"> ID of the robot that remembered this node</text>
|
|
195
|
+
<polygon fill="none" stroke="black" points="617.06,-1125.2 617.06,-1156 1246.55,-1156 1246.55,-1125.2 617.06,-1125.2"/>
|
|
196
|
+
<text text-anchor="start" x="624.06" y="-1137.4" font-family="Arial" font-size="14.00">updated_at </text>
|
|
197
|
+
<text text-anchor="start" x="698.02" y="-1137.4" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
198
|
+
<polygon fill="none" stroke="black" points="617.06,-1094.4 617.06,-1125.2 1246.55,-1125.2 1246.55,-1094.4 617.06,-1094.4"/>
|
|
199
|
+
<text text-anchor="start" x="624.06" y="-1106.6" font-family="Arial" font-size="14.00">working_memory </text>
|
|
200
|
+
<text text-anchor="start" x="734.54" y="-1106.6" font-family="Arial" font-size="14.00" fill="#666666">[boolean]</text>
|
|
201
|
+
<text text-anchor="start" x="792.14" y="-1106.6" font-family="Arial" font-size="14.00"> True if this node is currently in the robot working memory</text>
|
|
202
|
+
</g>
|
|
203
|
+
<!-- public.robot_nodes->public.nodes -->
|
|
204
|
+
<g id="edge3" class="edge">
|
|
205
|
+
<title>public.robot_nodes:node_id->public.nodes:id</title>
|
|
206
|
+
<path fill="none" stroke="black" d="M605.82,-1232.28C537.81,-1222.19 565.52,-1108.63 617.06,-1051.2 711.4,-946.08 838.62,-1120.45 932.83,-1015.2 1036.86,-898.96 1089.83,-664.2 933.83,-664.2"/>
|
|
207
|
+
<polygon fill="black" stroke="black" points="605.75,-1232.28 615.41,-1237.47 611.07,-1232.65 615.39,-1232.95 615.39,-1232.95 615.39,-1232.95 611.07,-1232.65 616.04,-1228.49 605.75,-1232.28"/>
|
|
208
|
+
<text text-anchor="start" x="623.06" y="-1243" font-family="Arial" font-size="10.00">FOREIGN KEY (node_id) REFERENCES nodes(id) ON DELETE CASCADE</text>
|
|
209
|
+
</g>
|
|
210
|
+
</g>
|
|
211
|
+
</svg>
|
|
@@ -8,28 +8,27 @@ Join table connecting nodes to tags (many-to-many)
|
|
|
8
8
|
|
|
9
9
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
|
10
10
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
|
11
|
+
| created_at | timestamp with time zone | CURRENT_TIMESTAMP | true | | | When this association was created |
|
|
11
12
|
| id | bigint | nextval('node_tags_id_seq'::regclass) | false | | | |
|
|
12
|
-
| node_id | bigint | | false | | [public.nodes](public.nodes.md) |
|
|
13
|
-
| tag_id | bigint | | false | | [public.tags](public.tags.md) |
|
|
14
|
-
| created_at | timestamp with time zone | CURRENT_TIMESTAMP | true | | | |
|
|
13
|
+
| node_id | bigint | | false | | [public.nodes](public.nodes.md) | ID of the node being tagged |
|
|
14
|
+
| tag_id | bigint | | false | | [public.tags](public.tags.md) | ID of the tag being applied |
|
|
15
15
|
|
|
16
16
|
## Constraints
|
|
17
17
|
|
|
18
18
|
| Name | Type | Definition |
|
|
19
19
|
| ---- | ---- | ---------- |
|
|
20
|
-
| node_tags_pkey | PRIMARY KEY | PRIMARY KEY (id) |
|
|
21
|
-
| idx_node_tags_unique | UNIQUE | UNIQUE (node_id, tag_id) |
|
|
22
|
-
| fk_rails_ebc9aafd9f | FOREIGN KEY | FOREIGN KEY (node_id) REFERENCES nodes(id) ON DELETE CASCADE |
|
|
23
20
|
| fk_rails_b51cdcc57f | FOREIGN KEY | FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE |
|
|
21
|
+
| fk_rails_ebc9aafd9f | FOREIGN KEY | FOREIGN KEY (node_id) REFERENCES nodes(id) ON DELETE CASCADE |
|
|
22
|
+
| node_tags_pkey | PRIMARY KEY | PRIMARY KEY (id) |
|
|
24
23
|
|
|
25
24
|
## Indexes
|
|
26
25
|
|
|
27
26
|
| Name | Definition |
|
|
28
27
|
| ---- | ---------- |
|
|
29
|
-
| node_tags_pkey | CREATE UNIQUE INDEX node_tags_pkey ON public.node_tags USING btree (id) |
|
|
30
|
-
| idx_node_tags_unique | CREATE UNIQUE INDEX idx_node_tags_unique ON public.node_tags USING btree (node_id, tag_id) |
|
|
31
28
|
| idx_node_tags_node_id | CREATE INDEX idx_node_tags_node_id ON public.node_tags USING btree (node_id) |
|
|
32
29
|
| idx_node_tags_tag_id | CREATE INDEX idx_node_tags_tag_id ON public.node_tags USING btree (tag_id) |
|
|
30
|
+
| idx_node_tags_unique | CREATE UNIQUE INDEX idx_node_tags_unique ON public.node_tags USING btree (node_id, tag_id) |
|
|
31
|
+
| node_tags_pkey | CREATE UNIQUE INDEX node_tags_pkey ON public.node_tags USING btree (id) |
|
|
33
32
|
|
|
34
33
|
## Relations
|
|
35
34
|
|
|
@@ -0,0 +1,239 @@
|
|
|
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.node_tags Pages: 1 -->
|
|
7
|
+
<svg width="1460pt" height="1463pt"
|
|
8
|
+
viewBox="0.00 0.00 1459.73 1462.80" 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 1458.8)">
|
|
10
|
+
<title>public.node_tags</title>
|
|
11
|
+
<polygon fill="white" stroke="none" points="-4,4 -4,-1458.8 1455.73,-1458.8 1455.73,4 -4,4"/>
|
|
12
|
+
<!-- public.node_tags -->
|
|
13
|
+
<g id="node1" class="node">
|
|
14
|
+
<title>public.node_tags</title>
|
|
15
|
+
<polygon fill="#efefef" stroke="none" points="832.61,-1288.6 832.61,-1334.6 1301.83,-1334.6 1301.83,-1288.6 832.61,-1288.6"/>
|
|
16
|
+
<polygon fill="none" stroke="black" points="832.61,-1288.6 832.61,-1334.6 1301.83,-1334.6 1301.83,-1288.6 832.61,-1288.6"/>
|
|
17
|
+
<text text-anchor="start" x="943.74" y="-1312.4" font-family="Arial Bold" font-size="18.00">public.node_tags</text>
|
|
18
|
+
<text text-anchor="start" x="1066.21" y="-1312.4" font-family="Arial" font-size="14.00"> </text>
|
|
19
|
+
<text text-anchor="start" x="1097.33" y="-1312.4" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
20
|
+
<text text-anchor="start" x="906.13" y="-1298" font-family="Arial" font-size="14.00" fill="#333333">Join table connecting nodes to tags (many-to-many)</text>
|
|
21
|
+
<polygon fill="none" stroke="black" points="832.61,-1257.8 832.61,-1288.6 1301.83,-1288.6 1301.83,-1257.8 832.61,-1257.8"/>
|
|
22
|
+
<text text-anchor="start" x="839.61" y="-1270" font-family="Arial" font-size="14.00">created_at </text>
|
|
23
|
+
<text text-anchor="start" x="909.66" y="-1270" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
24
|
+
<text text-anchor="start" x="1075.38" y="-1270" font-family="Arial" font-size="14.00"> When this association was created</text>
|
|
25
|
+
<polygon fill="none" stroke="black" points="832.61,-1227 832.61,-1257.8 1301.83,-1257.8 1301.83,-1227 832.61,-1227"/>
|
|
26
|
+
<text text-anchor="start" x="839.61" y="-1239.2" font-family="Arial" font-size="14.00">id </text>
|
|
27
|
+
<text text-anchor="start" x="854.4" y="-1239.2" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
28
|
+
<polygon fill="none" stroke="black" points="832.61,-1196.2 832.61,-1227 1301.83,-1227 1301.83,-1196.2 832.61,-1196.2"/>
|
|
29
|
+
<text text-anchor="start" x="839.61" y="-1208.4" font-family="Arial" font-size="14.00">node_id </text>
|
|
30
|
+
<text text-anchor="start" x="893.33" y="-1208.4" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
31
|
+
<text text-anchor="start" x="934.58" y="-1208.4" font-family="Arial" font-size="14.00"> ID of the node being tagged</text>
|
|
32
|
+
<polygon fill="none" stroke="black" points="832.61,-1165.4 832.61,-1196.2 1301.83,-1196.2 1301.83,-1165.4 832.61,-1165.4"/>
|
|
33
|
+
<text text-anchor="start" x="839.61" y="-1177.6" font-family="Arial" font-size="14.00">tag_id </text>
|
|
34
|
+
<text text-anchor="start" x="881.65" y="-1177.6" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
35
|
+
<text text-anchor="start" x="922.9" y="-1177.6" font-family="Arial" font-size="14.00"> ID of the tag being applied</text>
|
|
36
|
+
<polygon fill="none" stroke="black" stroke-width="3" points="831.11,-1163.9 831.11,-1336.1 1303.33,-1336.1 1303.33,-1163.9 831.11,-1163.9"/>
|
|
37
|
+
</g>
|
|
38
|
+
<!-- public.nodes -->
|
|
39
|
+
<g id="node2" class="node">
|
|
40
|
+
<title>public.nodes</title>
|
|
41
|
+
<polygon fill="#efefef" stroke="none" points="43.2,-920 43.2,-966 699.24,-966 699.24,-920 43.2,-920"/>
|
|
42
|
+
<polygon fill="none" stroke="black" points="43.2,-920 43.2,-966 699.24,-966 699.24,-920 43.2,-920"/>
|
|
43
|
+
<text text-anchor="start" x="263.23" y="-943.8" font-family="Arial Bold" font-size="18.00">public.nodes</text>
|
|
44
|
+
<text text-anchor="start" x="354.72" y="-943.8" font-family="Arial" font-size="14.00"> </text>
|
|
45
|
+
<text text-anchor="start" x="385.83" y="-943.8" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
46
|
+
<text text-anchor="start" x="179.8" y="-929.4" font-family="Arial" font-size="14.00" fill="#333333">Core memory storage for conversation messages and context</text>
|
|
47
|
+
<polygon fill="none" stroke="black" points="43.2,-889.2 43.2,-920 699.24,-920 699.24,-889.2 43.2,-889.2"/>
|
|
48
|
+
<text text-anchor="start" x="50.2" y="-901.4" font-family="Arial" font-size="14.00">access_count </text>
|
|
49
|
+
<text text-anchor="start" x="139.7" y="-901.4" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
50
|
+
<text text-anchor="start" x="190.28" y="-901.4" font-family="Arial" font-size="14.00"> Number of times this node has been accessed/retrieved</text>
|
|
51
|
+
<polygon fill="none" stroke="black" points="43.2,-858.4 43.2,-889.2 699.24,-889.2 699.24,-858.4 43.2,-858.4"/>
|
|
52
|
+
<text text-anchor="start" x="50.2" y="-870.6" font-family="Arial" font-size="14.00">chunk_position </text>
|
|
53
|
+
<text text-anchor="start" x="147.49" y="-870.6" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
54
|
+
<text text-anchor="start" x="198.07" y="-870.6" font-family="Arial" font-size="14.00"> Position within source file (0-indexed)</text>
|
|
55
|
+
<polygon fill="none" stroke="black" points="43.2,-827.6 43.2,-858.4 699.24,-858.4 699.24,-827.6 43.2,-827.6"/>
|
|
56
|
+
<text text-anchor="start" x="50.2" y="-839.8" font-family="Arial" font-size="14.00">content </text>
|
|
57
|
+
<text text-anchor="start" x="100.01" y="-839.8" font-family="Arial" font-size="14.00" fill="#666666">[text]</text>
|
|
58
|
+
<text text-anchor="start" x="130.36" y="-839.8" font-family="Arial" font-size="14.00"> The conversation message/utterance content</text>
|
|
59
|
+
<polygon fill="none" stroke="black" points="43.2,-796.8 43.2,-827.6 699.24,-827.6 699.24,-796.8 43.2,-796.8"/>
|
|
60
|
+
<text text-anchor="start" x="50.2" y="-809" font-family="Arial" font-size="14.00">content_hash </text>
|
|
61
|
+
<text text-anchor="start" x="138.16" y="-809" font-family="Arial" font-size="14.00" fill="#666666">[varchar(64)]</text>
|
|
62
|
+
<text text-anchor="start" x="217.52" y="-809" font-family="Arial" font-size="14.00"> SHA-256 hash of content for deduplication</text>
|
|
63
|
+
<polygon fill="none" stroke="black" points="43.2,-766 43.2,-796.8 699.24,-796.8 699.24,-766 43.2,-766"/>
|
|
64
|
+
<text text-anchor="start" x="50.2" y="-778.2" font-family="Arial" font-size="14.00">created_at </text>
|
|
65
|
+
<text text-anchor="start" x="120.25" y="-778.2" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
66
|
+
<text text-anchor="start" x="285.97" y="-778.2" font-family="Arial" font-size="14.00"> When this memory was created</text>
|
|
67
|
+
<polygon fill="none" stroke="black" points="43.2,-735.2 43.2,-766 699.24,-766 699.24,-735.2 43.2,-735.2"/>
|
|
68
|
+
<text text-anchor="start" x="50.2" y="-747.4" font-family="Arial" font-size="14.00">deleted_at </text>
|
|
69
|
+
<text text-anchor="start" x="119.48" y="-747.4" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
70
|
+
<text text-anchor="start" x="285.21" y="-747.4" font-family="Arial" font-size="14.00"> Soft delete timestamp - node is considered deleted when set</text>
|
|
71
|
+
<polygon fill="none" stroke="black" points="43.2,-704.4 43.2,-735.2 699.24,-735.2 699.24,-704.4 43.2,-704.4"/>
|
|
72
|
+
<text text-anchor="start" x="50.2" y="-716.6" font-family="Arial" font-size="14.00">embedding </text>
|
|
73
|
+
<text text-anchor="start" x="123.37" y="-716.6" font-family="Arial" font-size="14.00" fill="#666666">[vector(2000)]</text>
|
|
74
|
+
<text text-anchor="start" x="209.74" y="-716.6" font-family="Arial" font-size="14.00"> Vector embedding (max 2000 dimensions) for semantic search</text>
|
|
75
|
+
<polygon fill="none" stroke="black" points="43.2,-673.6 43.2,-704.4 699.24,-704.4 699.24,-673.6 43.2,-673.6"/>
|
|
76
|
+
<text text-anchor="start" x="50.2" y="-685.8" font-family="Arial" font-size="14.00">embedding_dimension </text>
|
|
77
|
+
<text text-anchor="start" x="194.96" y="-685.8" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
78
|
+
<text text-anchor="start" x="245.55" y="-685.8" font-family="Arial" font-size="14.00"> Actual number of dimensions used in the embedding vector (max 2000)</text>
|
|
79
|
+
<polygon fill="none" stroke="black" points="43.2,-642.8 43.2,-673.6 699.24,-673.6 699.24,-642.8 43.2,-642.8"/>
|
|
80
|
+
<text text-anchor="start" x="50.2" y="-655" font-family="Arial" font-size="14.00">id </text>
|
|
81
|
+
<text text-anchor="start" x="64.99" y="-655" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
82
|
+
<polygon fill="none" stroke="black" points="43.2,-612 43.2,-642.8 699.24,-642.8 699.24,-612 43.2,-612"/>
|
|
83
|
+
<text text-anchor="start" x="50.2" y="-624.2" font-family="Arial" font-size="14.00">last_accessed </text>
|
|
84
|
+
<text text-anchor="start" x="142.81" y="-624.2" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
85
|
+
<text text-anchor="start" x="308.53" y="-624.2" font-family="Arial" font-size="14.00"> When this memory was last accessed</text>
|
|
86
|
+
<polygon fill="none" stroke="black" points="43.2,-581.2 43.2,-612 699.24,-612 699.24,-581.2 43.2,-581.2"/>
|
|
87
|
+
<text text-anchor="start" x="50.2" y="-593.4" font-family="Arial" font-size="14.00">metadata </text>
|
|
88
|
+
<text text-anchor="start" x="112.46" y="-593.4" font-family="Arial" font-size="14.00" fill="#666666">[jsonb]</text>
|
|
89
|
+
<text text-anchor="start" x="153.71" y="-593.4" font-family="Arial" font-size="14.00"> Flexible metadata storage (memory_type, importance, source, etc.)</text>
|
|
90
|
+
<polygon fill="none" stroke="black" points="43.2,-550.4 43.2,-581.2 699.24,-581.2 699.24,-550.4 43.2,-550.4"/>
|
|
91
|
+
<text text-anchor="start" x="50.2" y="-562.6" font-family="Arial" font-size="14.00">source_id </text>
|
|
92
|
+
<text text-anchor="start" x="114.79" y="-562.6" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
93
|
+
<text text-anchor="start" x="156.04" y="-562.6" font-family="Arial" font-size="14.00"> Reference to source file (for file-loaded nodes)</text>
|
|
94
|
+
<polygon fill="none" stroke="black" points="43.2,-519.6 43.2,-550.4 699.24,-550.4 699.24,-519.6 43.2,-519.6"/>
|
|
95
|
+
<text text-anchor="start" x="50.2" y="-531.8" font-family="Arial" font-size="14.00">token_count </text>
|
|
96
|
+
<text text-anchor="start" x="130.37" y="-531.8" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
97
|
+
<text text-anchor="start" x="180.96" y="-531.8" font-family="Arial" font-size="14.00"> Number of tokens in the content (for context budget management)</text>
|
|
98
|
+
<polygon fill="none" stroke="black" points="43.2,-488.8 43.2,-519.6 699.24,-519.6 699.24,-488.8 43.2,-488.8"/>
|
|
99
|
+
<text text-anchor="start" x="50.2" y="-501" font-family="Arial" font-size="14.00">updated_at </text>
|
|
100
|
+
<text text-anchor="start" x="124.16" y="-501" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
101
|
+
<text text-anchor="start" x="289.88" y="-501" font-family="Arial" font-size="14.00"> When this memory was last modified</text>
|
|
102
|
+
</g>
|
|
103
|
+
<!-- public.node_tags->public.nodes -->
|
|
104
|
+
<g id="edge1" class="edge">
|
|
105
|
+
<title>public.node_tags:node_id->public.nodes:id</title>
|
|
106
|
+
<path fill="none" stroke="black" d="M821.4,-1211.16C737.8,-1203.54 775.28,-1099.24 751.22,-1009.2 730.87,-933.05 779.06,-658.2 700.24,-658.2"/>
|
|
107
|
+
<polygon fill="black" stroke="black" points="821.29,-1211.15 831.08,-1216.08 826.62,-1211.38 830.94,-1211.57 830.94,-1211.57 830.94,-1211.57 826.62,-1211.38 831.47,-1207.09 821.29,-1211.15"/>
|
|
108
|
+
<text text-anchor="start" x="573.45" y="-1195.6" font-family="Arial" font-size="10.00">FOREIGN KEY (node_id) REFERENCES nodes(id) ON DELETE CASCADE</text>
|
|
109
|
+
</g>
|
|
110
|
+
<!-- public.tags -->
|
|
111
|
+
<g id="node5" class="node">
|
|
112
|
+
<title>public.tags</title>
|
|
113
|
+
<polygon fill="#efefef" stroke="none" points="803.91,-750.6 803.91,-796.6 1408.53,-796.6 1408.53,-750.6 803.91,-750.6"/>
|
|
114
|
+
<polygon fill="none" stroke="black" points="803.91,-750.6 803.91,-796.6 1408.53,-796.6 1408.53,-750.6 803.91,-750.6"/>
|
|
115
|
+
<text text-anchor="start" x="1004.73" y="-774.4" font-family="Arial Bold" font-size="18.00">public.tags</text>
|
|
116
|
+
<text text-anchor="start" x="1083.22" y="-774.4" font-family="Arial" font-size="14.00"> </text>
|
|
117
|
+
<text text-anchor="start" x="1114.33" y="-774.4" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
118
|
+
<text text-anchor="start" x="993.76" y="-760" font-family="Arial" font-size="14.00" fill="#333333">Unique tag names for categorization</text>
|
|
119
|
+
<polygon fill="none" stroke="black" points="803.91,-719.8 803.91,-750.6 1408.53,-750.6 1408.53,-719.8 803.91,-719.8"/>
|
|
120
|
+
<text text-anchor="start" x="810.91" y="-732" font-family="Arial" font-size="14.00">created_at </text>
|
|
121
|
+
<text text-anchor="start" x="880.95" y="-732" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
122
|
+
<text text-anchor="start" x="1046.68" y="-732" font-family="Arial" font-size="14.00"> When this tag was created</text>
|
|
123
|
+
<polygon fill="none" stroke="black" points="803.91,-689 803.91,-719.8 1408.53,-719.8 1408.53,-689 803.91,-689"/>
|
|
124
|
+
<text text-anchor="start" x="810.91" y="-701.2" font-family="Arial" font-size="14.00">id </text>
|
|
125
|
+
<text text-anchor="start" x="825.69" y="-701.2" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
126
|
+
<polygon fill="none" stroke="black" points="803.91,-658.2 803.91,-689 1408.53,-689 1408.53,-658.2 803.91,-658.2"/>
|
|
127
|
+
<text text-anchor="start" x="810.91" y="-670.4" font-family="Arial" font-size="14.00">name </text>
|
|
128
|
+
<text text-anchor="start" x="849.82" y="-670.4" font-family="Arial" font-size="14.00" fill="#666666">[text]</text>
|
|
129
|
+
<text text-anchor="start" x="880.16" y="-670.4" font-family="Arial" font-size="14.00"> Hierarchical tag in format: root:level1:level2 (e.g., database:postgresql:timescaledb)</text>
|
|
130
|
+
</g>
|
|
131
|
+
<!-- public.node_tags->public.tags -->
|
|
132
|
+
<g id="edge4" class="edge">
|
|
133
|
+
<title>public.node_tags:tag_id->public.tags:id</title>
|
|
134
|
+
<path fill="none" stroke="black" d="M1067,-1154.03C1059.63,-979.93 865.44,-1011.32 803.91,-839.8 783.58,-783.16 742.73,-704.4 802.91,-704.4"/>
|
|
135
|
+
<polygon fill="black" stroke="black" points="1067,-1154.07 1062.71,-1164.16 1067.11,-1159.4 1067.21,-1163.73 1067.21,-1163.73 1067.21,-1163.73 1067.11,-1159.4 1071.71,-1163.97 1067,-1154.07"/>
|
|
136
|
+
<text text-anchor="start" x="1074.22" y="-1174.4" font-family="Arial" font-size="10.00">FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE</text>
|
|
137
|
+
</g>
|
|
138
|
+
<!-- public.file_sources -->
|
|
139
|
+
<g id="node4" class="node">
|
|
140
|
+
<title>public.file_sources</title>
|
|
141
|
+
<polygon fill="#efefef" stroke="none" points="125.35,-320.4 125.35,-366.4 617.09,-366.4 617.09,-320.4 125.35,-320.4"/>
|
|
142
|
+
<polygon fill="none" stroke="black" points="125.35,-320.4 125.35,-366.4 617.09,-366.4 617.09,-320.4 125.35,-320.4"/>
|
|
143
|
+
<text text-anchor="start" x="240.74" y="-344.2" font-family="Arial Bold" font-size="18.00">public.file_sources</text>
|
|
144
|
+
<text text-anchor="start" x="377.2" y="-344.2" font-family="Arial" font-size="14.00"> </text>
|
|
145
|
+
<text text-anchor="start" x="408.32" y="-344.2" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
146
|
+
<text text-anchor="start" x="237.75" y="-329.8" font-family="Arial" font-size="14.00" fill="#333333">Source file metadata for loaded documents</text>
|
|
147
|
+
<polygon fill="none" stroke="black" points="125.35,-289.6 125.35,-320.4 617.09,-320.4 617.09,-289.6 125.35,-289.6"/>
|
|
148
|
+
<text text-anchor="start" x="132.35" y="-301.8" font-family="Arial" font-size="14.00">created_at </text>
|
|
149
|
+
<text text-anchor="start" x="202.4" y="-301.8" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
150
|
+
<polygon fill="none" stroke="black" points="125.35,-258.8 125.35,-289.6 617.09,-289.6 617.09,-258.8 125.35,-258.8"/>
|
|
151
|
+
<text text-anchor="start" x="132.35" y="-271" font-family="Arial" font-size="14.00">file_hash </text>
|
|
152
|
+
<text text-anchor="start" x="192.28" y="-271" font-family="Arial" font-size="14.00" fill="#666666">[varchar(64)]</text>
|
|
153
|
+
<text text-anchor="start" x="271.64" y="-271" font-family="Arial" font-size="14.00"> SHA-256 hash of file content</text>
|
|
154
|
+
<polygon fill="none" stroke="black" points="125.35,-228 125.35,-258.8 617.09,-258.8 617.09,-228 125.35,-228"/>
|
|
155
|
+
<text text-anchor="start" x="132.35" y="-240.2" font-family="Arial" font-size="14.00">file_path </text>
|
|
156
|
+
<text text-anchor="start" x="189.17" y="-240.2" font-family="Arial" font-size="14.00" fill="#666666">[text]</text>
|
|
157
|
+
<text text-anchor="start" x="219.51" y="-240.2" font-family="Arial" font-size="14.00"> Absolute path to source file</text>
|
|
158
|
+
<polygon fill="none" stroke="black" points="125.35,-197.2 125.35,-228 617.09,-228 617.09,-197.2 125.35,-197.2"/>
|
|
159
|
+
<text text-anchor="start" x="132.35" y="-209.4" font-family="Arial" font-size="14.00">file_size </text>
|
|
160
|
+
<text text-anchor="start" x="186.82" y="-209.4" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
161
|
+
<text text-anchor="start" x="237.4" y="-209.4" font-family="Arial" font-size="14.00"> File size in bytes</text>
|
|
162
|
+
<polygon fill="none" stroke="black" points="125.35,-166.4 125.35,-197.2 617.09,-197.2 617.09,-166.4 125.35,-166.4"/>
|
|
163
|
+
<text text-anchor="start" x="132.35" y="-178.6" font-family="Arial" font-size="14.00">frontmatter </text>
|
|
164
|
+
<text text-anchor="start" x="203.93" y="-178.6" font-family="Arial" font-size="14.00" fill="#666666">[jsonb]</text>
|
|
165
|
+
<text text-anchor="start" x="245.17" y="-178.6" font-family="Arial" font-size="14.00"> Parsed YAML frontmatter</text>
|
|
166
|
+
<polygon fill="none" stroke="black" points="125.35,-135.6 125.35,-166.4 617.09,-166.4 617.09,-135.6 125.35,-135.6"/>
|
|
167
|
+
<text text-anchor="start" x="132.35" y="-147.8" font-family="Arial" font-size="14.00">id </text>
|
|
168
|
+
<text text-anchor="start" x="147.13" y="-147.8" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
169
|
+
<polygon fill="none" stroke="black" points="125.35,-104.8 125.35,-135.6 617.09,-135.6 617.09,-104.8 125.35,-104.8"/>
|
|
170
|
+
<text text-anchor="start" x="132.35" y="-117" font-family="Arial" font-size="14.00">last_synced_at </text>
|
|
171
|
+
<text text-anchor="start" x="229.63" y="-117" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
172
|
+
<text text-anchor="start" x="395.35" y="-117" font-family="Arial" font-size="14.00"> When file was last synced to HTM</text>
|
|
173
|
+
<polygon fill="none" stroke="black" points="125.35,-74 125.35,-104.8 617.09,-104.8 617.09,-74 125.35,-74"/>
|
|
174
|
+
<text text-anchor="start" x="132.35" y="-86.2" font-family="Arial" font-size="14.00">mtime </text>
|
|
175
|
+
<text text-anchor="start" x="174.35" y="-86.2" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
176
|
+
<text text-anchor="start" x="340.07" y="-86.2" font-family="Arial" font-size="14.00"> File modification time</text>
|
|
177
|
+
<polygon fill="none" stroke="black" points="125.35,-43.2 125.35,-74 617.09,-74 617.09,-43.2 125.35,-43.2"/>
|
|
178
|
+
<text text-anchor="start" x="132.35" y="-55.4" font-family="Arial" font-size="14.00">updated_at </text>
|
|
179
|
+
<text text-anchor="start" x="206.31" y="-55.4" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
180
|
+
</g>
|
|
181
|
+
<!-- public.nodes->public.file_sources -->
|
|
182
|
+
<g id="edge3" class="edge">
|
|
183
|
+
<title>public.nodes:source_id->public.file_sources:id</title>
|
|
184
|
+
<path fill="none" stroke="black" d="M710.45,-563.95C787.77,-534.03 708.39,-151 618.09,-151"/>
|
|
185
|
+
<polygon fill="black" stroke="black" points="710.41,-563.96 699.77,-561.31 705.16,-564.91 700.9,-565.68 700.9,-565.68 700.9,-565.68 705.16,-564.91 701.37,-570.17 710.41,-563.96"/>
|
|
186
|
+
<text text-anchor="start" x="707.24" y="-575.8" font-family="Arial" font-size="10.00">FOREIGN KEY (source_id) REFERENCES file_sources(id) ON DELETE SET NULL</text>
|
|
187
|
+
</g>
|
|
188
|
+
<!-- public.robot_nodes -->
|
|
189
|
+
<g id="node3" class="node">
|
|
190
|
+
<title>public.robot_nodes</title>
|
|
191
|
+
<polygon fill="#efefef" stroke="none" points="56.48,-1365.6 56.48,-1411.6 685.96,-1411.6 685.96,-1365.6 56.48,-1365.6"/>
|
|
192
|
+
<polygon fill="none" stroke="black" points="56.48,-1365.6 56.48,-1411.6 685.96,-1411.6 685.96,-1365.6 56.48,-1365.6"/>
|
|
193
|
+
<text text-anchor="start" x="239.73" y="-1389.4" font-family="Arial Bold" font-size="18.00">public.robot_nodes</text>
|
|
194
|
+
<text text-anchor="start" x="378.21" y="-1389.4" font-family="Arial" font-size="14.00"> </text>
|
|
195
|
+
<text text-anchor="start" x="409.33" y="-1389.4" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
196
|
+
<text text-anchor="start" x="203.91" y="-1375" font-family="Arial" font-size="14.00" fill="#333333">Join table connecting robots to nodes (many-to-many)</text>
|
|
197
|
+
<polygon fill="none" stroke="black" points="56.48,-1334.8 56.48,-1365.6 685.96,-1365.6 685.96,-1334.8 56.48,-1334.8"/>
|
|
198
|
+
<text text-anchor="start" x="63.48" y="-1347" font-family="Arial" font-size="14.00">created_at </text>
|
|
199
|
+
<text text-anchor="start" x="133.52" y="-1347" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
200
|
+
<polygon fill="none" stroke="black" points="56.48,-1304 56.48,-1334.8 685.96,-1334.8 685.96,-1304 56.48,-1304"/>
|
|
201
|
+
<text text-anchor="start" x="63.48" y="-1316.2" font-family="Arial" font-size="14.00">first_remembered_at </text>
|
|
202
|
+
<text text-anchor="start" x="196.53" y="-1316.2" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
203
|
+
<text text-anchor="start" x="362.25" y="-1316.2" font-family="Arial" font-size="14.00"> When this robot first remembered this content</text>
|
|
204
|
+
<polygon fill="none" stroke="black" points="56.48,-1273.2 56.48,-1304 685.96,-1304 685.96,-1273.2 56.48,-1273.2"/>
|
|
205
|
+
<text text-anchor="start" x="63.48" y="-1285.4" font-family="Arial" font-size="14.00">id </text>
|
|
206
|
+
<text text-anchor="start" x="78.26" y="-1285.4" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
207
|
+
<polygon fill="none" stroke="black" points="56.48,-1242.4 56.48,-1273.2 685.96,-1273.2 685.96,-1242.4 56.48,-1242.4"/>
|
|
208
|
+
<text text-anchor="start" x="63.48" y="-1254.6" font-family="Arial" font-size="14.00">last_remembered_at </text>
|
|
209
|
+
<text text-anchor="start" x="195.76" y="-1254.6" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
210
|
+
<text text-anchor="start" x="361.49" y="-1254.6" font-family="Arial" font-size="14.00"> When this robot last tried to remember this content</text>
|
|
211
|
+
<polygon fill="none" stroke="black" points="56.48,-1211.6 56.48,-1242.4 685.96,-1242.4 685.96,-1211.6 56.48,-1211.6"/>
|
|
212
|
+
<text text-anchor="start" x="63.48" y="-1223.8" font-family="Arial" font-size="14.00">node_id </text>
|
|
213
|
+
<text text-anchor="start" x="117.19" y="-1223.8" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
214
|
+
<text text-anchor="start" x="158.44" y="-1223.8" font-family="Arial" font-size="14.00"> ID of the node being remembered</text>
|
|
215
|
+
<polygon fill="none" stroke="black" points="56.48,-1180.8 56.48,-1211.6 685.96,-1211.6 685.96,-1180.8 56.48,-1180.8"/>
|
|
216
|
+
<text text-anchor="start" x="63.48" y="-1193" font-family="Arial" font-size="14.00">remember_count </text>
|
|
217
|
+
<text text-anchor="start" x="173.19" y="-1193" font-family="Arial" font-size="14.00" fill="#666666">[integer]</text>
|
|
218
|
+
<text text-anchor="start" x="223.78" y="-1193" font-family="Arial" font-size="14.00"> Number of times this robot has tried to remember this content</text>
|
|
219
|
+
<polygon fill="none" stroke="black" points="56.48,-1150 56.48,-1180.8 685.96,-1180.8 685.96,-1150 56.48,-1150"/>
|
|
220
|
+
<text text-anchor="start" x="63.48" y="-1162.2" font-family="Arial" font-size="14.00">robot_id </text>
|
|
221
|
+
<text text-anchor="start" x="117.96" y="-1162.2" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
222
|
+
<text text-anchor="start" x="159.21" y="-1162.2" font-family="Arial" font-size="14.00"> ID of the robot that remembered this node</text>
|
|
223
|
+
<polygon fill="none" stroke="black" points="56.48,-1119.2 56.48,-1150 685.96,-1150 685.96,-1119.2 56.48,-1119.2"/>
|
|
224
|
+
<text text-anchor="start" x="63.48" y="-1131.4" font-family="Arial" font-size="14.00">updated_at </text>
|
|
225
|
+
<text text-anchor="start" x="137.43" y="-1131.4" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
226
|
+
<polygon fill="none" stroke="black" points="56.48,-1088.4 56.48,-1119.2 685.96,-1119.2 685.96,-1088.4 56.48,-1088.4"/>
|
|
227
|
+
<text text-anchor="start" x="63.48" y="-1100.6" font-family="Arial" font-size="14.00">working_memory </text>
|
|
228
|
+
<text text-anchor="start" x="173.95" y="-1100.6" font-family="Arial" font-size="14.00" fill="#666666">[boolean]</text>
|
|
229
|
+
<text text-anchor="start" x="231.56" y="-1100.6" font-family="Arial" font-size="14.00"> True if this node is currently in the robot working memory</text>
|
|
230
|
+
</g>
|
|
231
|
+
<!-- public.robot_nodes->public.nodes -->
|
|
232
|
+
<g id="edge2" class="edge">
|
|
233
|
+
<title>public.robot_nodes:node_id->public.nodes:id</title>
|
|
234
|
+
<path fill="none" stroke="black" d="M696.2,-1222.75C751.33,-1170.7 760.25,-658.2 700.24,-658.2"/>
|
|
235
|
+
<polygon fill="black" stroke="black" points="696.35,-1222.68 685.39,-1222.77 691.51,-1224.91 687.57,-1226.72 687.57,-1226.72 687.57,-1226.72 691.51,-1224.91 689.15,-1230.95 696.35,-1222.68"/>
|
|
236
|
+
<text text-anchor="start" x="340.42" y="-1237" font-family="Arial" font-size="10.00">FOREIGN KEY (node_id) REFERENCES nodes(id) ON DELETE CASCADE</text>
|
|
237
|
+
</g>
|
|
238
|
+
</g>
|
|
239
|
+
</svg>
|