htm 0.0.11 → 0.0.15
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/.dictate.toml +46 -0
- data/.envrc +2 -0
- data/CHANGELOG.md +85 -2
- data/README.md +348 -79
- data/Rakefile +14 -2
- data/bin/htm_mcp.rb +94 -0
- data/config/database.yml +20 -13
- data/db/migrate/00003_create_file_sources.rb +5 -0
- data/db/migrate/00004_create_nodes.rb +17 -0
- data/db/migrate/00005_create_tags.rb +7 -0
- data/db/migrate/00006_create_node_tags.rb +2 -0
- data/db/migrate/00007_create_robot_nodes.rb +7 -0
- data/db/schema.sql +69 -100
- data/docs/api/index.md +1 -1
- data/docs/api/yard/HTM/Configuration.md +54 -0
- data/docs/api/yard/HTM/Database.md +13 -10
- data/docs/api/yard/HTM/EmbeddingService.md +5 -1
- data/docs/api/yard/HTM/LongTermMemory.md +18 -277
- data/docs/api/yard/HTM/PropositionError.md +18 -0
- data/docs/api/yard/HTM/PropositionService.md +66 -0
- data/docs/api/yard/HTM/QueryCache.md +88 -0
- data/docs/api/yard/HTM/RobotGroup.md +481 -0
- data/docs/api/yard/HTM/SqlBuilder.md +108 -0
- data/docs/api/yard/HTM/TagService.md +4 -0
- data/docs/api/yard/HTM/Telemetry/NullInstrument.md +13 -0
- data/docs/api/yard/HTM/Telemetry/NullMeter.md +15 -0
- data/docs/api/yard/HTM/Telemetry.md +109 -0
- data/docs/api/yard/HTM/WorkingMemoryChannel.md +176 -0
- data/docs/api/yard/HTM.md +8 -22
- data/docs/api/yard/index.csv +102 -25
- data/docs/api/yard-reference.md +8 -0
- data/docs/architecture/index.md +1 -1
- data/docs/assets/images/multi-provider-failover.svg +51 -0
- data/docs/assets/images/robot-group-architecture.svg +65 -0
- data/docs/database/README.md +3 -3
- data/docs/database/public.file_sources.svg +29 -21
- data/docs/database/public.node_tags.md +2 -0
- data/docs/database/public.node_tags.svg +53 -41
- data/docs/database/public.nodes.md +2 -0
- data/docs/database/public.nodes.svg +52 -40
- data/docs/database/public.robot_nodes.md +2 -0
- data/docs/database/public.robot_nodes.svg +30 -22
- data/docs/database/public.robots.svg +16 -12
- data/docs/database/public.tags.md +3 -0
- data/docs/database/public.tags.svg +41 -33
- data/docs/database/schema.json +66 -0
- data/docs/database/schema.svg +60 -48
- data/docs/development/index.md +14 -1
- data/docs/development/rake-tasks.md +1068 -0
- data/docs/getting-started/index.md +1 -1
- data/docs/getting-started/quick-start.md +144 -155
- data/docs/guides/adding-memories.md +2 -3
- data/docs/guides/context-assembly.md +185 -184
- data/docs/guides/getting-started.md +154 -148
- data/docs/guides/index.md +8 -1
- data/docs/guides/long-term-memory.md +60 -92
- data/docs/guides/mcp-server.md +617 -0
- data/docs/guides/multi-robot.md +249 -345
- data/docs/guides/recalling-memories.md +153 -163
- data/docs/guides/robot-groups.md +604 -0
- data/docs/guides/search-strategies.md +61 -58
- data/docs/guides/working-memory.md +103 -136
- data/docs/images/telemetry-architecture.svg +153 -0
- data/docs/index.md +30 -26
- data/docs/telemetry.md +391 -0
- data/examples/README.md +46 -1
- data/examples/cli_app/README.md +1 -1
- data/examples/cli_app/htm_cli.rb +1 -1
- data/examples/robot_groups/robot_worker.rb +1 -2
- data/examples/robot_groups/same_process.rb +1 -4
- data/examples/sinatra_app/app.rb +1 -1
- data/examples/telemetry/README.md +147 -0
- data/examples/telemetry/SETUP_README.md +169 -0
- data/examples/telemetry/demo.rb +498 -0
- data/examples/telemetry/grafana/dashboards/htm-metrics.json +457 -0
- data/lib/htm/configuration.rb +261 -70
- data/lib/htm/database.rb +46 -22
- data/lib/htm/embedding_service.rb +24 -14
- data/lib/htm/errors.rb +15 -1
- data/lib/htm/jobs/generate_embedding_job.rb +19 -0
- data/lib/htm/jobs/generate_propositions_job.rb +103 -0
- data/lib/htm/jobs/generate_tags_job.rb +24 -0
- data/lib/htm/loaders/markdown_chunker.rb +79 -0
- data/lib/htm/loaders/markdown_loader.rb +41 -15
- data/lib/htm/long_term_memory/fulltext_search.rb +138 -0
- data/lib/htm/long_term_memory/hybrid_search.rb +324 -0
- data/lib/htm/long_term_memory/node_operations.rb +209 -0
- data/lib/htm/long_term_memory/relevance_scorer.rb +355 -0
- data/lib/htm/long_term_memory/robot_operations.rb +34 -0
- data/lib/htm/long_term_memory/tag_operations.rb +428 -0
- data/lib/htm/long_term_memory/vector_search.rb +109 -0
- data/lib/htm/long_term_memory.rb +51 -1153
- data/lib/htm/models/node.rb +35 -2
- data/lib/htm/models/node_tag.rb +31 -0
- data/lib/htm/models/robot_node.rb +31 -0
- data/lib/htm/models/tag.rb +44 -0
- data/lib/htm/proposition_service.rb +169 -0
- data/lib/htm/query_cache.rb +214 -0
- data/lib/htm/robot_group.rb +721 -0
- data/lib/htm/sql_builder.rb +178 -0
- data/lib/htm/tag_service.rb +16 -6
- data/lib/htm/tasks.rb +8 -2
- data/lib/htm/telemetry.rb +224 -0
- data/lib/htm/version.rb +1 -1
- data/lib/htm/working_memory_channel.rb +250 -0
- data/lib/htm.rb +66 -3
- data/lib/tasks/doc.rake +1 -1
- data/lib/tasks/htm.rake +259 -13
- data/mkdocs.yml +98 -96
- metadata +55 -20
- data/.aigcm_msg +0 -1
- data/.claude/settings.local.json +0 -95
- data/CLAUDE.md +0 -603
- data/db/migrate/00009_add_working_memory_to_robot_nodes.rb +0 -12
- data/examples/cli_app/temp.log +0 -93
- data/examples/robot_groups/lib/robot_group.rb +0 -419
- data/examples/robot_groups/lib/working_memory_channel.rb +0 -140
- data/lib/htm/loaders/paragraph_chunker.rb +0 -112
- data/notes/ARCHITECTURE_REVIEW.md +0 -1167
- data/notes/IMPLEMENTATION_SUMMARY.md +0 -606
- data/notes/MULTI_FRAMEWORK_IMPLEMENTATION.md +0 -451
- data/notes/next_steps.md +0 -100
- data/notes/plan.md +0 -627
- data/notes/tag_ontology_enhancement_ideas.md +0 -222
- data/notes/timescaledb_removal_summary.md +0 -200
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<svg viewBox="0 0 900 550" xmlns="http://www.w3.org/2000/svg" style="background: transparent;">
|
|
2
|
+
<!-- Title -->
|
|
3
|
+
<text x="450" y="30" text-anchor="middle" fill="#E0E0E0" font-size="18" font-weight="bold">Robot Group: Shared Working Memory + Real-Time Sync</text>
|
|
4
|
+
|
|
5
|
+
<!-- Active Robot 1 -->
|
|
6
|
+
<rect x="50" y="80" width="220" height="120" fill="rgba(76, 175, 80, 0.2)" stroke="#4CAF50" stroke-width="2" rx="5"/>
|
|
7
|
+
<text x="160" y="105" text-anchor="middle" fill="#4CAF50" font-size="12" font-weight="bold">ACTIVE</text>
|
|
8
|
+
<text x="160" y="130" text-anchor="middle" fill="#E0E0E0" font-size="14" font-weight="bold">Primary Agent</text>
|
|
9
|
+
<text x="160" y="155" text-anchor="middle" fill="#B0B0B0" font-size="11">Working Memory: 5 nodes</text>
|
|
10
|
+
<text x="160" y="175" text-anchor="middle" fill="#B0B0B0" font-size="11">Provider: OpenAI</text>
|
|
11
|
+
|
|
12
|
+
<!-- Active Robot 2 -->
|
|
13
|
+
<rect x="340" y="80" width="220" height="120" fill="rgba(76, 175, 80, 0.2)" stroke="#4CAF50" stroke-width="2" rx="5"/>
|
|
14
|
+
<text x="450" y="105" text-anchor="middle" fill="#4CAF50" font-size="12" font-weight="bold">ACTIVE</text>
|
|
15
|
+
<text x="450" y="130" text-anchor="middle" fill="#E0E0E0" font-size="14" font-weight="bold">Secondary Agent</text>
|
|
16
|
+
<text x="450" y="155" text-anchor="middle" fill="#B0B0B0" font-size="11">Working Memory: 5 nodes</text>
|
|
17
|
+
<text x="450" y="175" text-anchor="middle" fill="#B0B0B0" font-size="11">Provider: Anthropic</text>
|
|
18
|
+
|
|
19
|
+
<!-- Passive Robot -->
|
|
20
|
+
<rect x="630" y="80" width="220" height="120" fill="rgba(255, 152, 0, 0.2)" stroke="#FF9800" stroke-width="2" rx="5"/>
|
|
21
|
+
<text x="740" y="105" text-anchor="middle" fill="#FF9800" font-size="12" font-weight="bold">PASSIVE (Standby)</text>
|
|
22
|
+
<text x="740" y="130" text-anchor="middle" fill="#E0E0E0" font-size="14" font-weight="bold">Backup Agent</text>
|
|
23
|
+
<text x="740" y="155" text-anchor="middle" fill="#B0B0B0" font-size="11">Working Memory: 5 nodes</text>
|
|
24
|
+
<text x="740" y="175" text-anchor="middle" fill="#B0B0B0" font-size="11">Provider: Gemini</text>
|
|
25
|
+
|
|
26
|
+
<!-- Sync Layer -->
|
|
27
|
+
<rect x="100" y="250" width="700" height="80" fill="rgba(33, 150, 243, 0.15)" stroke="#2196F3" stroke-width="2" rx="5"/>
|
|
28
|
+
<text x="450" y="280" text-anchor="middle" fill="#E0E0E0" font-size="14" font-weight="bold">Real-Time Sync Layer</text>
|
|
29
|
+
<text x="450" y="305" text-anchor="middle" fill="#2196F3" font-size="12">PostgreSQL LISTEN/NOTIFY (HTM::WorkingMemoryChannel)</text>
|
|
30
|
+
|
|
31
|
+
<!-- Connections to sync layer -->
|
|
32
|
+
<line x1="160" y1="200" x2="160" y2="250" stroke="#4CAF50" stroke-width="2" marker-end="url(#arrow-green)"/>
|
|
33
|
+
<line x1="450" y1="200" x2="450" y2="250" stroke="#4CAF50" stroke-width="2" marker-end="url(#arrow-green)"/>
|
|
34
|
+
<line x1="740" y1="200" x2="740" y2="250" stroke="#FF9800" stroke-width="2" marker-end="url(#arrow-orange)"/>
|
|
35
|
+
|
|
36
|
+
<!-- Shared Long-Term Memory -->
|
|
37
|
+
<ellipse cx="450" cy="430" rx="200" ry="80" fill="rgba(156, 39, 176, 0.2)" stroke="#9C27B0" stroke-width="3"/>
|
|
38
|
+
<text x="450" y="415" text-anchor="middle" fill="#E0E0E0" font-size="14" font-weight="bold">Shared Long-Term Memory</text>
|
|
39
|
+
<text x="450" y="440" text-anchor="middle" fill="#B0B0B0" font-size="12">PostgreSQL (Hive Mind)</text>
|
|
40
|
+
<text x="450" y="460" text-anchor="middle" fill="#9C27B0" font-size="11">All Robots Access Here</text>
|
|
41
|
+
|
|
42
|
+
<!-- Connection from sync to LTM -->
|
|
43
|
+
<line x1="450" y1="330" x2="450" y2="350" stroke="#9C27B0" stroke-width="2" marker-end="url(#arrow-purple)"/>
|
|
44
|
+
|
|
45
|
+
<!-- Arrows -->
|
|
46
|
+
<defs>
|
|
47
|
+
<marker id="arrow-green" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
|
|
48
|
+
<polygon points="0 0, 10 3, 0 6" fill="#4CAF50"/>
|
|
49
|
+
</marker>
|
|
50
|
+
<marker id="arrow-orange" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
|
|
51
|
+
<polygon points="0 0, 10 3, 0 6" fill="#FF9800"/>
|
|
52
|
+
</marker>
|
|
53
|
+
<marker id="arrow-purple" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto">
|
|
54
|
+
<polygon points="0 0, 10 3, 0 6" fill="#9C27B0"/>
|
|
55
|
+
</marker>
|
|
56
|
+
</defs>
|
|
57
|
+
|
|
58
|
+
<!-- Legend -->
|
|
59
|
+
<rect x="50" y="520" width="15" height="15" fill="rgba(76, 175, 80, 0.3)" stroke="#4CAF50"/>
|
|
60
|
+
<text x="75" y="532" fill="#B0B0B0" font-size="11">Active (handles requests)</text>
|
|
61
|
+
<rect x="250" y="520" width="15" height="15" fill="rgba(255, 152, 0, 0.3)" stroke="#FF9800"/>
|
|
62
|
+
<text x="275" y="532" fill="#B0B0B0" font-size="11">Passive (warm standby)</text>
|
|
63
|
+
<rect x="450" y="520" width="15" height="15" fill="rgba(33, 150, 243, 0.3)" stroke="#2196F3"/>
|
|
64
|
+
<text x="475" y="532" fill="#B0B0B0" font-size="11">Real-time sync</text>
|
|
65
|
+
</svg>
|
data/docs/database/README.md
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
| Name | Columns | Comment | Type |
|
|
6
6
|
| ---- | ------- | ------- | ---- |
|
|
7
7
|
| [public.file_sources](public.file_sources.md) | 9 | Source file metadata for loaded documents | BASE TABLE |
|
|
8
|
-
| [public.node_tags](public.node_tags.md) |
|
|
8
|
+
| [public.node_tags](public.node_tags.md) | 5 | Join table connecting nodes to tags (many-to-many) | BASE TABLE |
|
|
9
9
|
| [public.nodes](public.nodes.md) | 14 | Core memory storage for conversation messages and context | BASE TABLE |
|
|
10
|
-
| [public.robot_nodes](public.robot_nodes.md) |
|
|
10
|
+
| [public.robot_nodes](public.robot_nodes.md) | 10 | Join table connecting robots to nodes (many-to-many) | BASE TABLE |
|
|
11
11
|
| [public.robots](public.robots.md) | 4 | Registry of all LLM robots using the HTM system | BASE TABLE |
|
|
12
12
|
| [public.schema_migrations](public.schema_migrations.md) | 1 | | BASE TABLE |
|
|
13
|
-
| [public.tags](public.tags.md) |
|
|
13
|
+
| [public.tags](public.tags.md) | 4 | Unique tag names for categorization | BASE TABLE |
|
|
14
14
|
|
|
15
15
|
## Stored procedures and functions
|
|
16
16
|
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
|
5
5
|
-->
|
|
6
6
|
<!-- Title: public.file_sources Pages: 1 -->
|
|
7
|
-
<svg width="1329pt" height="
|
|
8
|
-
viewBox="0.00 0.00 1328.70
|
|
9
|
-
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4
|
|
7
|
+
<svg width="1329pt" height="1500pt"
|
|
8
|
+
viewBox="0.00 0.00 1328.70 1499.60" 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 1495.6)">
|
|
10
10
|
<title>public.file_sources</title>
|
|
11
|
-
<polygon fill="white" stroke="none" points="-4,4 -4,-
|
|
11
|
+
<polygon fill="white" stroke="none" points="-4,4 -4,-1495.6 1324.7,-1495.6 1324.7,4 -4,4"/>
|
|
12
12
|
<!-- public.file_sources -->
|
|
13
13
|
<g id="node1" class="node">
|
|
14
14
|
<title>public.file_sources</title>
|
|
@@ -128,16 +128,20 @@
|
|
|
128
128
|
<!-- public.node_tags -->
|
|
129
129
|
<g id="node3" class="node">
|
|
130
130
|
<title>public.node_tags</title>
|
|
131
|
-
<polygon fill="#efefef" stroke="none" points="43.2,-
|
|
132
|
-
<polygon fill="none" stroke="black" points="43.2,-
|
|
133
|
-
<text text-anchor="start" x="154.32" y="-
|
|
134
|
-
<text text-anchor="start" x="276.8" y="-
|
|
135
|
-
<text text-anchor="start" x="307.92" y="-
|
|
136
|
-
<text text-anchor="start" x="116.72" y="-
|
|
131
|
+
<polygon fill="#efefef" stroke="none" points="43.2,-1325.4 43.2,-1371.4 512.41,-1371.4 512.41,-1325.4 43.2,-1325.4"/>
|
|
132
|
+
<polygon fill="none" stroke="black" points="43.2,-1325.4 43.2,-1371.4 512.41,-1371.4 512.41,-1325.4 43.2,-1325.4"/>
|
|
133
|
+
<text text-anchor="start" x="154.32" y="-1349.2" font-family="Arial Bold" font-size="18.00">public.node_tags</text>
|
|
134
|
+
<text text-anchor="start" x="276.8" y="-1349.2" font-family="Arial" font-size="14.00"> </text>
|
|
135
|
+
<text text-anchor="start" x="307.92" y="-1349.2" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
136
|
+
<text text-anchor="start" x="116.72" y="-1334.8" 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,-1294.6 43.2,-1325.4 512.41,-1325.4 512.41,-1294.6 43.2,-1294.6"/>
|
|
138
|
+
<text text-anchor="start" x="50.2" y="-1306.8" font-family="Arial" font-size="14.00">created_at </text>
|
|
139
|
+
<text text-anchor="start" x="120.25" y="-1306.8" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
140
|
+
<text text-anchor="start" x="285.97" y="-1306.8" font-family="Arial" font-size="14.00"> When this association was created</text>
|
|
137
141
|
<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">
|
|
139
|
-
<text text-anchor="start" x="
|
|
140
|
-
<text text-anchor="start" x="285.
|
|
142
|
+
<text text-anchor="start" x="50.2" y="-1276" font-family="Arial" font-size="14.00">deleted_at </text>
|
|
143
|
+
<text text-anchor="start" x="119.48" y="-1276" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
144
|
+
<text text-anchor="start" x="285.21" y="-1276" font-family="Arial" font-size="14.00"> Soft delete timestamp</text>
|
|
141
145
|
<polygon fill="none" stroke="black" points="43.2,-1233 43.2,-1263.8 512.41,-1263.8 512.41,-1233 43.2,-1233"/>
|
|
142
146
|
<text text-anchor="start" x="50.2" y="-1245.2" font-family="Arial" font-size="14.00">id </text>
|
|
143
147
|
<text text-anchor="start" x="64.99" y="-1245.2" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
@@ -160,15 +164,19 @@
|
|
|
160
164
|
<!-- public.robot_nodes -->
|
|
161
165
|
<g id="node4" class="node">
|
|
162
166
|
<title>public.robot_nodes</title>
|
|
163
|
-
<polygon fill="#efefef" stroke="none" points="617.06,-
|
|
164
|
-
<polygon fill="none" stroke="black" points="617.06,-
|
|
165
|
-
<text text-anchor="start" x="800.32" y="-
|
|
166
|
-
<text text-anchor="start" x="938.8" y="-
|
|
167
|
-
<text text-anchor="start" x="969.92" y="-
|
|
168
|
-
<text text-anchor="start" x="764.5" y="-
|
|
167
|
+
<polygon fill="#efefef" stroke="none" points="617.06,-1402.4 617.06,-1448.4 1246.55,-1448.4 1246.55,-1402.4 617.06,-1402.4"/>
|
|
168
|
+
<polygon fill="none" stroke="black" points="617.06,-1402.4 617.06,-1448.4 1246.55,-1448.4 1246.55,-1402.4 617.06,-1402.4"/>
|
|
169
|
+
<text text-anchor="start" x="800.32" y="-1426.2" font-family="Arial Bold" font-size="18.00">public.robot_nodes</text>
|
|
170
|
+
<text text-anchor="start" x="938.8" y="-1426.2" font-family="Arial" font-size="14.00"> </text>
|
|
171
|
+
<text text-anchor="start" x="969.92" y="-1426.2" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
172
|
+
<text text-anchor="start" x="764.5" y="-1411.8" font-family="Arial" font-size="14.00" fill="#333333">Join table connecting robots to nodes (many-to-many)</text>
|
|
173
|
+
<polygon fill="none" stroke="black" points="617.06,-1371.6 617.06,-1402.4 1246.55,-1402.4 1246.55,-1371.6 617.06,-1371.6"/>
|
|
174
|
+
<text text-anchor="start" x="624.06" y="-1383.8" font-family="Arial" font-size="14.00">created_at </text>
|
|
175
|
+
<text text-anchor="start" x="694.11" y="-1383.8" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
169
176
|
<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">
|
|
171
|
-
<text text-anchor="start" x="
|
|
177
|
+
<text text-anchor="start" x="624.06" y="-1353" font-family="Arial" font-size="14.00">deleted_at </text>
|
|
178
|
+
<text text-anchor="start" x="693.34" y="-1353" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
179
|
+
<text text-anchor="start" x="859.07" y="-1353" font-family="Arial" font-size="14.00"> Soft delete timestamp</text>
|
|
172
180
|
<polygon fill="none" stroke="black" points="617.06,-1310 617.06,-1340.8 1246.55,-1340.8 1246.55,-1310 617.06,-1310"/>
|
|
173
181
|
<text text-anchor="start" x="624.06" y="-1322.2" font-family="Arial" font-size="14.00">first_remembered_at </text>
|
|
174
182
|
<text text-anchor="start" x="757.12" y="-1322.2" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
@@ -9,6 +9,7 @@ Join table connecting nodes to tags (many-to-many)
|
|
|
9
9
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
|
10
10
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
|
11
11
|
| created_at | timestamp with time zone | CURRENT_TIMESTAMP | true | | | When this association was created |
|
|
12
|
+
| deleted_at | timestamp with time zone | | true | | | Soft delete timestamp |
|
|
12
13
|
| id | bigint | nextval('node_tags_id_seq'::regclass) | false | | | |
|
|
13
14
|
| node_id | bigint | | false | | [public.nodes](public.nodes.md) | ID of the node being tagged |
|
|
14
15
|
| tag_id | bigint | | false | | [public.tags](public.tags.md) | ID of the tag being applied |
|
|
@@ -25,6 +26,7 @@ Join table connecting nodes to tags (many-to-many)
|
|
|
25
26
|
|
|
26
27
|
| Name | Definition |
|
|
27
28
|
| ---- | ---------- |
|
|
29
|
+
| idx_node_tags_deleted_at | CREATE INDEX idx_node_tags_deleted_at ON public.node_tags USING btree (deleted_at) |
|
|
28
30
|
| idx_node_tags_node_id | CREATE INDEX idx_node_tags_node_id ON public.node_tags USING btree (node_id) |
|
|
29
31
|
| idx_node_tags_tag_id | CREATE INDEX idx_node_tags_tag_id ON public.node_tags USING btree (tag_id) |
|
|
30
32
|
| idx_node_tags_unique | CREATE UNIQUE INDEX idx_node_tags_unique ON public.node_tags USING btree (node_id, tag_id) |
|
|
@@ -4,24 +4,28 @@
|
|
|
4
4
|
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
|
5
5
|
-->
|
|
6
6
|
<!-- Title: public.node_tags Pages: 1 -->
|
|
7
|
-
<svg width="1460pt" height="
|
|
8
|
-
viewBox="0.00 0.00 1459.73
|
|
9
|
-
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4
|
|
7
|
+
<svg width="1460pt" height="1494pt"
|
|
8
|
+
viewBox="0.00 0.00 1459.73 1493.60" 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 1489.6)">
|
|
10
10
|
<title>public.node_tags</title>
|
|
11
|
-
<polygon fill="white" stroke="none" points="-4,4 -4,-
|
|
11
|
+
<polygon fill="white" stroke="none" points="-4,4 -4,-1489.6 1455.73,-1489.6 1455.73,4 -4,4"/>
|
|
12
12
|
<!-- public.node_tags -->
|
|
13
13
|
<g id="node1" class="node">
|
|
14
14
|
<title>public.node_tags</title>
|
|
15
|
-
<polygon fill="#efefef" stroke="none" points="832.61,-
|
|
16
|
-
<polygon fill="none" stroke="black" points="832.61,-
|
|
17
|
-
<text text-anchor="start" x="943.74" y="-
|
|
18
|
-
<text text-anchor="start" x="1066.21" y="-
|
|
19
|
-
<text text-anchor="start" x="1097.33" y="-
|
|
20
|
-
<text text-anchor="start" x="906.13" y="-
|
|
15
|
+
<polygon fill="#efefef" stroke="none" points="832.61,-1319.4 832.61,-1365.4 1301.83,-1365.4 1301.83,-1319.4 832.61,-1319.4"/>
|
|
16
|
+
<polygon fill="none" stroke="black" points="832.61,-1319.4 832.61,-1365.4 1301.83,-1365.4 1301.83,-1319.4 832.61,-1319.4"/>
|
|
17
|
+
<text text-anchor="start" x="943.74" y="-1343.2" font-family="Arial Bold" font-size="18.00">public.node_tags</text>
|
|
18
|
+
<text text-anchor="start" x="1066.21" y="-1343.2" font-family="Arial" font-size="14.00"> </text>
|
|
19
|
+
<text text-anchor="start" x="1097.33" y="-1343.2" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
20
|
+
<text text-anchor="start" x="906.13" y="-1328.8" 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,-1288.6 832.61,-1319.4 1301.83,-1319.4 1301.83,-1288.6 832.61,-1288.6"/>
|
|
22
|
+
<text text-anchor="start" x="839.61" y="-1300.8" font-family="Arial" font-size="14.00">created_at </text>
|
|
23
|
+
<text text-anchor="start" x="909.66" y="-1300.8" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
24
|
+
<text text-anchor="start" x="1075.38" y="-1300.8" font-family="Arial" font-size="14.00"> When this association was created</text>
|
|
21
25
|
<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">
|
|
23
|
-
<text text-anchor="start" x="
|
|
24
|
-
<text text-anchor="start" x="
|
|
26
|
+
<text text-anchor="start" x="839.61" y="-1270" font-family="Arial" font-size="14.00">deleted_at </text>
|
|
27
|
+
<text text-anchor="start" x="908.9" y="-1270" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
28
|
+
<text text-anchor="start" x="1074.62" y="-1270" font-family="Arial" font-size="14.00"> Soft delete timestamp</text>
|
|
25
29
|
<polygon fill="none" stroke="black" points="832.61,-1227 832.61,-1257.8 1301.83,-1257.8 1301.83,-1227 832.61,-1227"/>
|
|
26
30
|
<text text-anchor="start" x="839.61" y="-1239.2" font-family="Arial" font-size="14.00">id </text>
|
|
27
31
|
<text text-anchor="start" x="854.4" y="-1239.2" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
@@ -33,7 +37,7 @@
|
|
|
33
37
|
<text text-anchor="start" x="839.61" y="-1177.6" font-family="Arial" font-size="14.00">tag_id </text>
|
|
34
38
|
<text text-anchor="start" x="881.65" y="-1177.6" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
35
39
|
<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,-
|
|
40
|
+
<polygon fill="none" stroke="black" stroke-width="3" points="831.11,-1163.9 831.11,-1366.9 1303.33,-1366.9 1303.33,-1163.9 831.11,-1163.9"/>
|
|
37
41
|
</g>
|
|
38
42
|
<!-- public.nodes -->
|
|
39
43
|
<g id="node2" class="node">
|
|
@@ -110,29 +114,33 @@
|
|
|
110
114
|
<!-- public.tags -->
|
|
111
115
|
<g id="node5" class="node">
|
|
112
116
|
<title>public.tags</title>
|
|
113
|
-
<polygon fill="#efefef" stroke="none" points="803.91,-
|
|
114
|
-
<polygon fill="none" stroke="black" points="803.91,-
|
|
115
|
-
<text text-anchor="start" x="1004.73" y="-
|
|
116
|
-
<text text-anchor="start" x="1083.22" y="-
|
|
117
|
-
<text text-anchor="start" x="1114.33" y="-
|
|
118
|
-
<text text-anchor="start" x="993.76" y="-
|
|
119
|
-
<polygon fill="none" stroke="black" points="803.91,-
|
|
120
|
-
<text text-anchor="start" x="810.91" y="-
|
|
121
|
-
<text text-anchor="start" x="880.95" y="-
|
|
122
|
-
<text text-anchor="start" x="1046.68" y="-
|
|
123
|
-
<polygon fill="none" stroke="black" points="803.91,-
|
|
124
|
-
<text text-anchor="start" x="810.91" y="-
|
|
125
|
-
<text text-anchor="start" x="
|
|
126
|
-
<
|
|
127
|
-
<
|
|
128
|
-
<text text-anchor="start" x="
|
|
129
|
-
<text text-anchor="start" x="
|
|
117
|
+
<polygon fill="#efefef" stroke="none" points="803.91,-766 803.91,-812 1408.53,-812 1408.53,-766 803.91,-766"/>
|
|
118
|
+
<polygon fill="none" stroke="black" points="803.91,-766 803.91,-812 1408.53,-812 1408.53,-766 803.91,-766"/>
|
|
119
|
+
<text text-anchor="start" x="1004.73" y="-789.8" font-family="Arial Bold" font-size="18.00">public.tags</text>
|
|
120
|
+
<text text-anchor="start" x="1083.22" y="-789.8" font-family="Arial" font-size="14.00"> </text>
|
|
121
|
+
<text text-anchor="start" x="1114.33" y="-789.8" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
122
|
+
<text text-anchor="start" x="993.76" y="-775.4" font-family="Arial" font-size="14.00" fill="#333333">Unique tag names for categorization</text>
|
|
123
|
+
<polygon fill="none" stroke="black" points="803.91,-735.2 803.91,-766 1408.53,-766 1408.53,-735.2 803.91,-735.2"/>
|
|
124
|
+
<text text-anchor="start" x="810.91" y="-747.4" font-family="Arial" font-size="14.00">created_at </text>
|
|
125
|
+
<text text-anchor="start" x="880.95" y="-747.4" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
126
|
+
<text text-anchor="start" x="1046.68" y="-747.4" font-family="Arial" font-size="14.00"> When this tag was created</text>
|
|
127
|
+
<polygon fill="none" stroke="black" points="803.91,-704.4 803.91,-735.2 1408.53,-735.2 1408.53,-704.4 803.91,-704.4"/>
|
|
128
|
+
<text text-anchor="start" x="810.91" y="-716.6" font-family="Arial" font-size="14.00">deleted_at </text>
|
|
129
|
+
<text text-anchor="start" x="880.19" y="-716.6" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
130
|
+
<text text-anchor="start" x="1045.91" y="-716.6" font-family="Arial" font-size="14.00"> Soft delete timestamp</text>
|
|
131
|
+
<polygon fill="none" stroke="black" points="803.91,-673.6 803.91,-704.4 1408.53,-704.4 1408.53,-673.6 803.91,-673.6"/>
|
|
132
|
+
<text text-anchor="start" x="810.91" y="-685.8" font-family="Arial" font-size="14.00">id </text>
|
|
133
|
+
<text text-anchor="start" x="825.69" y="-685.8" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
134
|
+
<polygon fill="none" stroke="black" points="803.91,-642.8 803.91,-673.6 1408.53,-673.6 1408.53,-642.8 803.91,-642.8"/>
|
|
135
|
+
<text text-anchor="start" x="810.91" y="-655" font-family="Arial" font-size="14.00">name </text>
|
|
136
|
+
<text text-anchor="start" x="849.82" y="-655" font-family="Arial" font-size="14.00" fill="#666666">[text]</text>
|
|
137
|
+
<text text-anchor="start" x="880.16" y="-655" font-family="Arial" font-size="14.00"> Hierarchical tag in format: root:level1:level2 (e.g., database:postgresql:timescaledb)</text>
|
|
130
138
|
</g>
|
|
131
139
|
<!-- public.node_tags->public.tags -->
|
|
132
140
|
<g id="edge4" class="edge">
|
|
133
141
|
<title>public.node_tags:tag_id->public.tags:id</title>
|
|
134
|
-
<path fill="none" stroke="black" d="
|
|
135
|
-
<polygon fill="black" stroke="black" points="
|
|
142
|
+
<path fill="none" stroke="black" d="M1066.99,-1154.07C1059.44,-985.4 865.54,-1021.1 803.91,-855.2 778.18,-785.96 729.04,-689 802.91,-689"/>
|
|
143
|
+
<polygon fill="black" stroke="black" points="1066.99,-1154.07 1062.71,-1164.16 1067.11,-1159.4 1067.2,-1163.73 1067.2,-1163.73 1067.2,-1163.73 1067.11,-1159.4 1071.71,-1163.97 1066.99,-1154.07"/>
|
|
136
144
|
<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
145
|
</g>
|
|
138
146
|
<!-- public.file_sources -->
|
|
@@ -188,15 +196,19 @@
|
|
|
188
196
|
<!-- public.robot_nodes -->
|
|
189
197
|
<g id="node3" class="node">
|
|
190
198
|
<title>public.robot_nodes</title>
|
|
191
|
-
<polygon fill="#efefef" stroke="none" points="56.48,-
|
|
192
|
-
<polygon fill="none" stroke="black" points="56.48,-
|
|
193
|
-
<text text-anchor="start" x="239.73" y="-
|
|
194
|
-
<text text-anchor="start" x="378.21" y="-
|
|
195
|
-
<text text-anchor="start" x="409.33" y="-
|
|
196
|
-
<text text-anchor="start" x="203.91" y="-
|
|
199
|
+
<polygon fill="#efefef" stroke="none" points="56.48,-1396.4 56.48,-1442.4 685.96,-1442.4 685.96,-1396.4 56.48,-1396.4"/>
|
|
200
|
+
<polygon fill="none" stroke="black" points="56.48,-1396.4 56.48,-1442.4 685.96,-1442.4 685.96,-1396.4 56.48,-1396.4"/>
|
|
201
|
+
<text text-anchor="start" x="239.73" y="-1420.2" font-family="Arial Bold" font-size="18.00">public.robot_nodes</text>
|
|
202
|
+
<text text-anchor="start" x="378.21" y="-1420.2" font-family="Arial" font-size="14.00"> </text>
|
|
203
|
+
<text text-anchor="start" x="409.33" y="-1420.2" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
204
|
+
<text text-anchor="start" x="203.91" y="-1405.8" font-family="Arial" font-size="14.00" fill="#333333">Join table connecting robots to nodes (many-to-many)</text>
|
|
205
|
+
<polygon fill="none" stroke="black" points="56.48,-1365.6 56.48,-1396.4 685.96,-1396.4 685.96,-1365.6 56.48,-1365.6"/>
|
|
206
|
+
<text text-anchor="start" x="63.48" y="-1377.8" font-family="Arial" font-size="14.00">created_at </text>
|
|
207
|
+
<text text-anchor="start" x="133.52" y="-1377.8" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
197
208
|
<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">
|
|
199
|
-
<text text-anchor="start" x="
|
|
209
|
+
<text text-anchor="start" x="63.48" y="-1347" font-family="Arial" font-size="14.00">deleted_at </text>
|
|
210
|
+
<text text-anchor="start" x="132.76" y="-1347" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
211
|
+
<text text-anchor="start" x="298.48" y="-1347" font-family="Arial" font-size="14.00"> Soft delete timestamp</text>
|
|
200
212
|
<polygon fill="none" stroke="black" points="56.48,-1304 56.48,-1334.8 685.96,-1334.8 685.96,-1304 56.48,-1304"/>
|
|
201
213
|
<text text-anchor="start" x="63.48" y="-1316.2" font-family="Arial" font-size="14.00">first_remembered_at </text>
|
|
202
214
|
<text text-anchor="start" x="196.53" y="-1316.2" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
@@ -36,6 +36,8 @@ Core memory storage for conversation messages and context
|
|
|
36
36
|
| Name | Definition |
|
|
37
37
|
| ---- | ---------- |
|
|
38
38
|
| idx_nodes_access_count | CREATE INDEX idx_nodes_access_count ON public.nodes USING btree (access_count) |
|
|
39
|
+
| idx_nodes_active | CREATE INDEX idx_nodes_active ON public.nodes USING btree (id) WHERE (deleted_at IS NULL) |
|
|
40
|
+
| idx_nodes_active_with_embedding | CREATE INDEX idx_nodes_active_with_embedding ON public.nodes USING btree (id) WHERE ((deleted_at IS NULL) AND (embedding IS NOT NULL)) |
|
|
39
41
|
| idx_nodes_content_gin | CREATE INDEX idx_nodes_content_gin ON public.nodes USING gin (to_tsvector('english'::regconfig, content)) |
|
|
40
42
|
| idx_nodes_content_hash_unique | CREATE UNIQUE INDEX idx_nodes_content_hash_unique ON public.nodes USING btree (content_hash) |
|
|
41
43
|
| idx_nodes_content_trgm | CREATE INDEX idx_nodes_content_trgm ON public.nodes USING gin (content gin_trgm_ops) |
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
|
5
5
|
-->
|
|
6
6
|
<!-- Title: public.nodes Pages: 1 -->
|
|
7
|
-
<svg width="2106pt" height="
|
|
8
|
-
viewBox="0.00 0.00 2105.90
|
|
9
|
-
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4
|
|
7
|
+
<svg width="2106pt" height="1500pt"
|
|
8
|
+
viewBox="0.00 0.00 2105.90 1499.60" 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 1495.6)">
|
|
10
10
|
<title>public.nodes</title>
|
|
11
|
-
<polygon fill="white" stroke="none" points="-4,4 -4,-
|
|
11
|
+
<polygon fill="white" stroke="none" points="-4,4 -4,-1495.6 2101.9,-1495.6 2101.9,4 -4,4"/>
|
|
12
12
|
<!-- public.nodes -->
|
|
13
13
|
<g id="node1" class="node">
|
|
14
14
|
<title>public.nodes</title>
|
|
@@ -128,16 +128,20 @@
|
|
|
128
128
|
<!-- public.node_tags -->
|
|
129
129
|
<g id="node2" class="node">
|
|
130
130
|
<title>public.node_tags</title>
|
|
131
|
-
<polygon fill="#efefef" stroke="none" points="496.91,-
|
|
132
|
-
<polygon fill="none" stroke="black" points="496.91,-
|
|
133
|
-
<text text-anchor="start" x="608.03" y="-
|
|
134
|
-
<text text-anchor="start" x="730.51" y="-
|
|
135
|
-
<text text-anchor="start" x="761.62" y="-
|
|
136
|
-
<text text-anchor="start" x="570.43" y="-
|
|
131
|
+
<polygon fill="#efefef" stroke="none" points="496.91,-1325.4 496.91,-1371.4 966.12,-1371.4 966.12,-1325.4 496.91,-1325.4"/>
|
|
132
|
+
<polygon fill="none" stroke="black" points="496.91,-1325.4 496.91,-1371.4 966.12,-1371.4 966.12,-1325.4 496.91,-1325.4"/>
|
|
133
|
+
<text text-anchor="start" x="608.03" y="-1349.2" font-family="Arial Bold" font-size="18.00">public.node_tags</text>
|
|
134
|
+
<text text-anchor="start" x="730.51" y="-1349.2" font-family="Arial" font-size="14.00"> </text>
|
|
135
|
+
<text text-anchor="start" x="761.62" y="-1349.2" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
136
|
+
<text text-anchor="start" x="570.43" y="-1334.8" 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="496.91,-1294.6 496.91,-1325.4 966.12,-1325.4 966.12,-1294.6 496.91,-1294.6"/>
|
|
138
|
+
<text text-anchor="start" x="503.91" y="-1306.8" font-family="Arial" font-size="14.00">created_at </text>
|
|
139
|
+
<text text-anchor="start" x="573.95" y="-1306.8" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
140
|
+
<text text-anchor="start" x="739.68" y="-1306.8" font-family="Arial" font-size="14.00"> When this association was created</text>
|
|
137
141
|
<polygon fill="none" stroke="black" points="496.91,-1263.8 496.91,-1294.6 966.12,-1294.6 966.12,-1263.8 496.91,-1263.8"/>
|
|
138
|
-
<text text-anchor="start" x="503.91" y="-1276" font-family="Arial" font-size="14.00">
|
|
139
|
-
<text text-anchor="start" x="573.
|
|
140
|
-
<text text-anchor="start" x="
|
|
142
|
+
<text text-anchor="start" x="503.91" y="-1276" font-family="Arial" font-size="14.00">deleted_at </text>
|
|
143
|
+
<text text-anchor="start" x="573.19" y="-1276" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
144
|
+
<text text-anchor="start" x="738.91" y="-1276" font-family="Arial" font-size="14.00"> Soft delete timestamp</text>
|
|
141
145
|
<polygon fill="none" stroke="black" points="496.91,-1233 496.91,-1263.8 966.12,-1263.8 966.12,-1233 496.91,-1233"/>
|
|
142
146
|
<text text-anchor="start" x="503.91" y="-1245.2" font-family="Arial" font-size="14.00">id </text>
|
|
143
147
|
<text text-anchor="start" x="518.69" y="-1245.2" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
@@ -160,43 +164,51 @@
|
|
|
160
164
|
<!-- public.tags -->
|
|
161
165
|
<g id="node3" class="node">
|
|
162
166
|
<title>public.tags</title>
|
|
163
|
-
<polygon fill="#efefef" stroke="none" points="43.2,-
|
|
164
|
-
<polygon fill="none" stroke="black" points="43.2,-
|
|
165
|
-
<text text-anchor="start" x="244.02" y="-
|
|
166
|
-
<text text-anchor="start" x="322.51" y="-
|
|
167
|
-
<text text-anchor="start" x="353.63" y="-
|
|
168
|
-
<text text-anchor="start" x="233.06" y="-
|
|
169
|
-
<polygon fill="none" stroke="black" points="43.2,-
|
|
170
|
-
<text text-anchor="start" x="50.2" y="-
|
|
171
|
-
<text text-anchor="start" x="120.25" y="-
|
|
172
|
-
<text text-anchor="start" x="285.97" y="-
|
|
173
|
-
<polygon fill="none" stroke="black" points="43.2,-
|
|
174
|
-
<text text-anchor="start" x="50.2" y="-
|
|
175
|
-
<text text-anchor="start" x="
|
|
176
|
-
<
|
|
177
|
-
<
|
|
178
|
-
<text text-anchor="start" x="
|
|
179
|
-
<text text-anchor="start" x="
|
|
167
|
+
<polygon fill="#efefef" stroke="none" points="43.2,-769 43.2,-815 647.83,-815 647.83,-769 43.2,-769"/>
|
|
168
|
+
<polygon fill="none" stroke="black" points="43.2,-769 43.2,-815 647.83,-815 647.83,-769 43.2,-769"/>
|
|
169
|
+
<text text-anchor="start" x="244.02" y="-792.8" font-family="Arial Bold" font-size="18.00">public.tags</text>
|
|
170
|
+
<text text-anchor="start" x="322.51" y="-792.8" font-family="Arial" font-size="14.00"> </text>
|
|
171
|
+
<text text-anchor="start" x="353.63" y="-792.8" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
172
|
+
<text text-anchor="start" x="233.06" y="-778.4" font-family="Arial" font-size="14.00" fill="#333333">Unique tag names for categorization</text>
|
|
173
|
+
<polygon fill="none" stroke="black" points="43.2,-738.2 43.2,-769 647.83,-769 647.83,-738.2 43.2,-738.2"/>
|
|
174
|
+
<text text-anchor="start" x="50.2" y="-750.4" font-family="Arial" font-size="14.00">created_at </text>
|
|
175
|
+
<text text-anchor="start" x="120.25" y="-750.4" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
176
|
+
<text text-anchor="start" x="285.97" y="-750.4" font-family="Arial" font-size="14.00"> When this tag was created</text>
|
|
177
|
+
<polygon fill="none" stroke="black" points="43.2,-707.4 43.2,-738.2 647.83,-738.2 647.83,-707.4 43.2,-707.4"/>
|
|
178
|
+
<text text-anchor="start" x="50.2" y="-719.6" font-family="Arial" font-size="14.00">deleted_at </text>
|
|
179
|
+
<text text-anchor="start" x="119.48" y="-719.6" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
180
|
+
<text text-anchor="start" x="285.21" y="-719.6" font-family="Arial" font-size="14.00"> Soft delete timestamp</text>
|
|
181
|
+
<polygon fill="none" stroke="black" points="43.2,-676.6 43.2,-707.4 647.83,-707.4 647.83,-676.6 43.2,-676.6"/>
|
|
182
|
+
<text text-anchor="start" x="50.2" y="-688.8" font-family="Arial" font-size="14.00">id </text>
|
|
183
|
+
<text text-anchor="start" x="64.99" y="-688.8" font-family="Arial" font-size="14.00" fill="#666666">[bigint]</text>
|
|
184
|
+
<polygon fill="none" stroke="black" points="43.2,-645.8 43.2,-676.6 647.83,-676.6 647.83,-645.8 43.2,-645.8"/>
|
|
185
|
+
<text text-anchor="start" x="50.2" y="-658" font-family="Arial" font-size="14.00">name </text>
|
|
186
|
+
<text text-anchor="start" x="89.11" y="-658" font-family="Arial" font-size="14.00" fill="#666666">[text]</text>
|
|
187
|
+
<text text-anchor="start" x="119.45" y="-658" font-family="Arial" font-size="14.00"> Hierarchical tag in format: root:level1:level2 (e.g., database:postgresql:timescaledb)</text>
|
|
180
188
|
</g>
|
|
181
189
|
<!-- public.node_tags->public.tags -->
|
|
182
190
|
<g id="edge2" class="edge">
|
|
183
191
|
<title>public.node_tags:tag_id->public.tags:id</title>
|
|
184
|
-
<path fill="none" stroke="black" d="
|
|
185
|
-
<polygon fill="black" stroke="black" points="
|
|
192
|
+
<path fill="none" stroke="black" d="M486,-1183.8C476.71,-1175.05 491.34,-1148.83 496.91,-1128.2 532.7,-995.47 612.77,-991.13 647.83,-858.2 666.66,-786.77 722.69,-692 648.83,-692"/>
|
|
193
|
+
<polygon fill="black" stroke="black" points="486.02,-1183.81 494.28,-1191.01 491.12,-1185.35 495.27,-1186.61 495.27,-1186.61 495.27,-1186.61 491.12,-1185.35 496.89,-1182.4 486.02,-1183.81"/>
|
|
186
194
|
<text text-anchor="start" x="166.05" y="-1196.8" font-family="Arial" font-size="10.00">FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE</text>
|
|
187
195
|
</g>
|
|
188
196
|
<!-- public.robot_nodes -->
|
|
189
197
|
<g id="node4" class="node">
|
|
190
198
|
<title>public.robot_nodes</title>
|
|
191
|
-
<polygon fill="#efefef" stroke="none" points="1112.77,-
|
|
192
|
-
<polygon fill="none" stroke="black" points="1112.77,-
|
|
193
|
-
<text text-anchor="start" x="1296.03" y="-
|
|
194
|
-
<text text-anchor="start" x="1434.51" y="-
|
|
195
|
-
<text text-anchor="start" x="1465.63" y="-
|
|
196
|
-
<text text-anchor="start" x="1260.2" y="-
|
|
199
|
+
<polygon fill="#efefef" stroke="none" points="1112.77,-1402.4 1112.77,-1448.4 1742.26,-1448.4 1742.26,-1402.4 1112.77,-1402.4"/>
|
|
200
|
+
<polygon fill="none" stroke="black" points="1112.77,-1402.4 1112.77,-1448.4 1742.26,-1448.4 1742.26,-1402.4 1112.77,-1402.4"/>
|
|
201
|
+
<text text-anchor="start" x="1296.03" y="-1426.2" font-family="Arial Bold" font-size="18.00">public.robot_nodes</text>
|
|
202
|
+
<text text-anchor="start" x="1434.51" y="-1426.2" font-family="Arial" font-size="14.00"> </text>
|
|
203
|
+
<text text-anchor="start" x="1465.63" y="-1426.2" font-family="Arial" font-size="14.00" fill="#666666">[BASE TABLE]</text>
|
|
204
|
+
<text text-anchor="start" x="1260.2" y="-1411.8" font-family="Arial" font-size="14.00" fill="#333333">Join table connecting robots to nodes (many-to-many)</text>
|
|
205
|
+
<polygon fill="none" stroke="black" points="1112.77,-1371.6 1112.77,-1402.4 1742.26,-1402.4 1742.26,-1371.6 1112.77,-1371.6"/>
|
|
206
|
+
<text text-anchor="start" x="1119.77" y="-1383.8" font-family="Arial" font-size="14.00">created_at </text>
|
|
207
|
+
<text text-anchor="start" x="1189.82" y="-1383.8" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
197
208
|
<polygon fill="none" stroke="black" points="1112.77,-1340.8 1112.77,-1371.6 1742.26,-1371.6 1742.26,-1340.8 1112.77,-1340.8"/>
|
|
198
|
-
<text text-anchor="start" x="1119.77" y="-1353" font-family="Arial" font-size="14.00">
|
|
199
|
-
<text text-anchor="start" x="1189.
|
|
209
|
+
<text text-anchor="start" x="1119.77" y="-1353" font-family="Arial" font-size="14.00">deleted_at </text>
|
|
210
|
+
<text text-anchor="start" x="1189.05" y="-1353" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
211
|
+
<text text-anchor="start" x="1354.77" y="-1353" font-family="Arial" font-size="14.00"> Soft delete timestamp</text>
|
|
200
212
|
<polygon fill="none" stroke="black" points="1112.77,-1310 1112.77,-1340.8 1742.26,-1340.8 1742.26,-1310 1112.77,-1310"/>
|
|
201
213
|
<text text-anchor="start" x="1119.77" y="-1322.2" font-family="Arial" font-size="14.00">first_remembered_at </text>
|
|
202
214
|
<text text-anchor="start" x="1252.82" y="-1322.2" font-family="Arial" font-size="14.00" fill="#666666">[timestamp with time zone]</text>
|
|
@@ -9,6 +9,7 @@ Join table connecting robots to nodes (many-to-many)
|
|
|
9
9
|
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
|
10
10
|
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
|
11
11
|
| created_at | timestamp with time zone | CURRENT_TIMESTAMP | true | | | |
|
|
12
|
+
| deleted_at | timestamp with time zone | | true | | | Soft delete timestamp |
|
|
12
13
|
| first_remembered_at | timestamp with time zone | CURRENT_TIMESTAMP | true | | | When this robot first remembered this content |
|
|
13
14
|
| id | bigint | nextval('robot_nodes_id_seq'::regclass) | false | | | |
|
|
14
15
|
| last_remembered_at | timestamp with time zone | CURRENT_TIMESTAMP | true | | | When this robot last tried to remember this content |
|
|
@@ -30,6 +31,7 @@ Join table connecting robots to nodes (many-to-many)
|
|
|
30
31
|
|
|
31
32
|
| Name | Definition |
|
|
32
33
|
| ---- | ---------- |
|
|
34
|
+
| idx_robot_nodes_deleted_at | CREATE INDEX idx_robot_nodes_deleted_at ON public.robot_nodes USING btree (deleted_at) |
|
|
33
35
|
| idx_robot_nodes_last_remembered_at | CREATE INDEX idx_robot_nodes_last_remembered_at ON public.robot_nodes USING btree (last_remembered_at) |
|
|
34
36
|
| idx_robot_nodes_node_id | CREATE INDEX idx_robot_nodes_node_id ON public.robot_nodes USING btree (node_id) |
|
|
35
37
|
| idx_robot_nodes_robot_id | CREATE INDEX idx_robot_nodes_robot_id ON public.robot_nodes USING btree (robot_id) |
|