agent99 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/A2A_SPEC-dev.md +1829 -0
  3. data/CHANGELOG.md +31 -0
  4. data/COMMITS.md +196 -0
  5. data/DOCS.md +96 -0
  6. data/README.md +200 -78
  7. data/Rakefile +62 -0
  8. data/docs/AI/htm.md +215 -0
  9. data/docs/AI/htm.rb +141 -0
  10. data/docs/AI/htm_demo.db +0 -0
  11. data/docs/AI/notes_on_htm_implementation.md +1319 -0
  12. data/docs/AI/some_code.rb +692 -0
  13. data/docs/advanced-topics/a2a-protocol.md +13 -0
  14. data/docs/{control_actions.md → advanced-topics/control-actions.md} +2 -0
  15. data/docs/advanced-topics/model-context-protocol.md +4 -0
  16. data/docs/advanced-topics/multi-agent-processing.md +674 -0
  17. data/docs/agent-development/request-response-handling.md +512 -0
  18. data/docs/api-reference/agent99-base.md +463 -0
  19. data/docs/api-reference/message-clients.md +495 -0
  20. data/docs/api-reference/registry-client.md +470 -0
  21. data/docs/api-reference/schemas.md +518 -0
  22. data/docs/assets/css/custom.css +27 -0
  23. data/docs/assets/images/agent-lifecycle.svg +73 -0
  24. data/docs/assets/images/agent-registry-process.svg +86 -0
  25. data/docs/assets/images/agent-registry-processes.svg +114 -0
  26. data/docs/assets/images/agent-types-overview.svg +51 -0
  27. data/docs/assets/images/agent99-architecture.svg +85 -0
  28. data/docs/assets/images/agent99_logo.png +0 -0
  29. data/docs/assets/images/control-actions-state.svg +83 -0
  30. data/docs/assets/images/knowledge-graph.svg +77 -0
  31. data/docs/assets/images/message-processing-flow.svg +148 -0
  32. data/docs/assets/images/multi-agent-system.svg +66 -0
  33. data/docs/assets/images/proxy-pattern-sequence.svg +48 -0
  34. data/docs/assets/images/request-flow.svg +97 -0
  35. data/docs/assets/images/request-processing-lifecycle.svg +50 -0
  36. data/docs/assets/images/request-response-sequence.svg +39 -0
  37. data/docs/{agent_lifecycle.md → core-concepts/agent-lifecycle.md} +2 -0
  38. data/docs/core-concepts/agent-types.md +255 -0
  39. data/docs/{architecture.md → core-concepts/architecture.md} +5 -5
  40. data/docs/{what_is_an_agent.md → core-concepts/what-is-an-agent.md} +1 -1
  41. data/docs/diagrams/message-flow-sequence.svg +198 -0
  42. data/docs/diagrams/p2p-network-topology.svg +181 -0
  43. data/docs/diagrams/smart-transport-routing.svg +165 -0
  44. data/docs/diagrams/three-layer-architecture.svg +77 -0
  45. data/docs/diagrams/transport-extension-api.svg +309 -0
  46. data/docs/diagrams/transport-extension-architecture.svg +234 -0
  47. data/docs/diagrams/transport-selection-flowchart.svg +264 -0
  48. data/docs/examples/advanced-examples.md +951 -0
  49. data/docs/examples/basic-examples.md +268 -0
  50. data/docs/{agent_registry_processes.md → framework-components/agent-registry.md} +1 -1
  51. data/docs/{message_processing.md → framework-components/message-processing.md} +3 -1
  52. data/docs/getting-started/basic-example.md +306 -0
  53. data/docs/getting-started/installation.md +160 -0
  54. data/docs/getting-started/overview.md +64 -0
  55. data/docs/getting-started/quick-start.md +179 -0
  56. data/docs/index.md +97 -0
  57. data/examples/DEMO.md +148 -0
  58. data/examples/README.md +50 -0
  59. data/examples/bad_agent.rb +32 -0
  60. data/examples/registry.rb +0 -8
  61. data/examples/run_demo.rb +433 -0
  62. data/lib/agent99/amqp_message_client.rb +2 -2
  63. data/lib/agent99/base.rb +1 -1
  64. data/lib/agent99/message_processing.rb +6 -12
  65. data/lib/agent99/registry_client.rb +4 -1
  66. data/lib/agent99/version.rb +1 -1
  67. data/lib/agent99.rb +1 -1
  68. data/mkdocs.yml +195 -0
  69. data/p2p_plan.md +533 -0
  70. data/p2p_roadmap.md +299 -0
  71. data/registry_plan.md +1818 -0
  72. metadata +89 -32
  73. data/docs/README.md +0 -57
  74. data/docs/diagrams/agent_registry_processes.dot +0 -42
  75. data/docs/diagrams/agent_registry_processes.png +0 -0
  76. data/docs/diagrams/high_level_architecture.dot +0 -26
  77. data/docs/diagrams/high_level_architecture.png +0 -0
  78. data/docs/diagrams/request_flow.dot +0 -42
  79. data/docs/diagrams/request_flow.png +0 -0
  80. /data/docs/{advanced_features.md → advanced-topics/advanced-features.md} +0 -0
  81. /data/docs/{extending_the_framework.md → advanced-topics/extending-the-framework.md} +0 -0
  82. /data/docs/{custom_agent_implementation.md → agent-development/custom-agent-implementation.md} +0 -0
  83. /data/docs/{error_handling_and_logging.md → agent-development/error-handling-and-logging.md} +0 -0
  84. /data/docs/{schema_definition.md → agent-development/schema-definition.md} +0 -0
  85. /data/docs/{api_reference.md → api-reference/overview.md} +0 -0
  86. /data/docs/{agent_discovery.md → framework-components/agent-discovery.md} +0 -0
  87. /data/docs/{messaging_system.md → framework-components/messaging-system.md} +0 -0
  88. /data/docs/{breaking_change_v0.0.4.md → operations/breaking-changes.md} +0 -0
  89. /data/docs/{configuration.md → operations/configuration.md} +0 -0
  90. /data/docs/{preformance_considerations.md → operations/performance-considerations.md} +0 -0
  91. /data/docs/{security.md → operations/security.md} +0 -0
  92. /data/docs/{troubleshooting.md → operations/troubleshooting.md} +0 -0
@@ -0,0 +1,165 @@
1
+ <svg width="900" height="600" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- Background transparent -->
3
+
4
+ <!-- Title -->
5
+ <text x="450" y="30" text-anchor="middle" fill="#f7fafc"
6
+ font-family="Arial, sans-serif" font-size="20" font-weight="bold">
7
+ Smart Transport Routing Strategy
8
+ </text>
9
+
10
+ <!-- Central SmartMessage Router -->
11
+ <rect x="375" y="250" width="150" height="100"
12
+ fill="#2d3748" stroke="#4299e1" stroke-width="3" rx="10"/>
13
+ <text x="450" y="280" text-anchor="middle" fill="#bee3f8"
14
+ font-family="Arial, sans-serif" font-size="14" font-weight="bold">
15
+ SmartMessage
16
+ </text>
17
+ <text x="450" y="300" text-anchor="middle" fill="#90cdf4"
18
+ font-family="Arial, sans-serif" font-size="12">
19
+ Transport Router
20
+ </text>
21
+ <text x="450" y="320" text-anchor="middle" fill="#90cdf4"
22
+ font-family="Arial, sans-serif" font-size="12">
23
+ &amp; Message
24
+ </text>
25
+ <text x="450" y="335" text-anchor="middle" fill="#90cdf4"
26
+ font-family="Arial, sans-serif" font-size="12">
27
+ Abstraction
28
+ </text>
29
+
30
+ <!-- Agent99 Source -->
31
+ <rect x="50" y="50" width="120" height="60"
32
+ fill="#1a365d" stroke="#2c5282" stroke-width="2" rx="8"/>
33
+ <text x="110" y="85" text-anchor="middle" fill="#bee3f8"
34
+ font-family="Arial, sans-serif" font-size="12" font-weight="bold">
35
+ Agent99
36
+ </text>
37
+ <text x="110" y="100" text-anchor="middle" fill="#90cdf4"
38
+ font-family="Arial, sans-serif" font-size="10">
39
+ Source Agent
40
+ </text>
41
+
42
+ <!-- Decision Logic -->
43
+ <polygon points="200,280 280,250 360,280 280,310"
44
+ fill="#553c9a" stroke="#7c3aed" stroke-width="2"/>
45
+ <text x="280" y="275" text-anchor="middle" fill="#e9d5ff"
46
+ font-family="Arial, sans-serif" font-size="11" font-weight="bold">
47
+ Route
48
+ </text>
49
+ <text x="280" y="290" text-anchor="middle" fill="#e9d5ff"
50
+ font-family="Arial, sans-serif" font-size="11" font-weight="bold">
51
+ Decision
52
+ </text>
53
+
54
+ <!-- Transport Options -->
55
+
56
+ <!-- Lanet P2P (Same LAN) -->
57
+ <rect x="600" y="100" width="200" height="80"
58
+ fill="#065f46" stroke="#10b981" stroke-width="2" rx="8"/>
59
+ <text x="700" y="125" text-anchor="middle" fill="#d1fae5"
60
+ font-family="Arial, sans-serif" font-size="14" font-weight="bold">
61
+ Lanet Transport
62
+ </text>
63
+ <text x="700" y="145" text-anchor="middle" fill="#a7f3d0"
64
+ font-family="Arial, sans-serif" font-size="12">
65
+ Direct P2P LAN
66
+ </text>
67
+ <text x="700" y="160" text-anchor="middle" fill="#a7f3d0"
68
+ font-family="Arial, sans-serif" font-size="10">
69
+ Encrypted, Low Latency
70
+ </text>
71
+ <text x="700" y="175" text-anchor="middle" fill="#6ee7b7"
72
+ font-family="Arial, sans-serif" font-size="10" font-weight="bold">
73
+ Same Network Segment
74
+ </text>
75
+
76
+ <!-- NATS (WAN/Internet) -->
77
+ <rect x="600" y="260" width="200" height="80"
78
+ fill="#92400e" stroke="#f59e0b" stroke-width="2" rx="8"/>
79
+ <text x="700" y="285" text-anchor="middle" fill="#fef3c7"
80
+ font-family="Arial, sans-serif" font-size="14" font-weight="bold">
81
+ NATS Transport
82
+ </text>
83
+ <text x="700" y="305" text-anchor="middle" fill="#fde68a"
84
+ font-family="Arial, sans-serif" font-size="12">
85
+ Internet/WAN
86
+ </text>
87
+ <text x="700" y="320" text-anchor="middle" fill="#fde68a"
88
+ font-family="Arial, sans-serif" font-size="10">
89
+ High Performance Broker
90
+ </text>
91
+ <text x="700" y="335" text-anchor="middle" fill="#fcd34d"
92
+ font-family="Arial, sans-serif" font-size="10" font-weight="bold">
93
+ Cross-Network
94
+ </text>
95
+
96
+ <!-- AMQP (Enterprise) -->
97
+ <rect x="600" y="420" width="200" height="80"
98
+ fill="#7c2d12" stroke="#dc2626" stroke-width="2" rx="8"/>
99
+ <text x="700" y="445" text-anchor="middle" fill="#fef2f2"
100
+ font-family="Arial, sans-serif" font-size="14" font-weight="bold">
101
+ AMQP Transport
102
+ </text>
103
+ <text x="700" y="465" text-anchor="middle" fill="#fecaca"
104
+ font-family="Arial, sans-serif" font-size="12">
105
+ Enterprise Grade
106
+ </text>
107
+ <text x="700" y="480" text-anchor="middle" fill="#fecaca"
108
+ font-family="Arial, sans-serif" font-size="10">
109
+ Guaranteed Delivery
110
+ </text>
111
+ <text x="700" y="495" text-anchor="middle" fill="#f87171"
112
+ font-family="Arial, sans-serif" font-size="10" font-weight="bold">
113
+ Critical Messages
114
+ </text>
115
+
116
+ <!-- Decision Labels -->
117
+ <text x="480" y="130" text-anchor="middle" fill="#a7f3d0"
118
+ font-family="Arial, sans-serif" font-size="10" font-weight="bold">
119
+ same_lan?()
120
+ </text>
121
+ <text x="480" y="280" text-anchor="middle" fill="#fcd34d"
122
+ font-family="Arial, sans-serif" font-size="10" font-weight="bold">
123
+ cross_network?()
124
+ </text>
125
+ <text x="480" y="430" text-anchor="middle" fill="#f87171"
126
+ font-family="Arial, sans-serif" font-size="10" font-weight="bold">
127
+ reliable_required?()
128
+ </text>
129
+
130
+ <!-- Arrows -->
131
+ <defs>
132
+ <marker id="arrowhead" markerWidth="10" markerHeight="7"
133
+ refX="9" refY="3.5" orient="auto">
134
+ <polygon points="0 0, 10 3.5, 0 7" fill="#cbd5e0"/>
135
+ </marker>
136
+ <marker id="greenarrow" markerWidth="10" markerHeight="7"
137
+ refX="9" refY="3.5" orient="auto">
138
+ <polygon points="0 0, 10 3.5, 0 7" fill="#10b981"/>
139
+ </marker>
140
+ <marker id="yellowarrow" markerWidth="10" markerHeight="7"
141
+ refX="9" refY="3.5" orient="auto">
142
+ <polygon points="0 0, 10 3.5, 0 7" fill="#f59e0b"/>
143
+ </marker>
144
+ <marker id="redarrow" markerWidth="10" markerHeight="7"
145
+ refX="9" refY="3.5" orient="auto">
146
+ <polygon points="0 0, 10 3.5, 0 7" fill="#dc2626"/>
147
+ </marker>
148
+ </defs>
149
+
150
+ <!-- Flow from Agent99 to Decision -->
151
+ <line x1="170" y1="80" x2="240" y2="260"
152
+ stroke="#cbd5e0" stroke-width="2" marker-end="url(#arrowhead)"/>
153
+
154
+ <!-- Flow from Decision to SmartMessage -->
155
+ <line x1="330" y1="280" x2="375" y2="300"
156
+ stroke="#4299e1" stroke-width="2" marker-end="url(#arrowhead)"/>
157
+
158
+ <!-- Flow to transports -->
159
+ <line x1="525" y1="280" x2="580" y2="140"
160
+ stroke="#10b981" stroke-width="3" marker-end="url(#greenarrow)"/>
161
+ <line x1="525" y1="300" x2="580" y2="300"
162
+ stroke="#f59e0b" stroke-width="3" marker-end="url(#yellowarrow)"/>
163
+ <line x1="525" y1="320" x2="580" y2="460"
164
+ stroke="#dc2626" stroke-width="3" marker-end="url(#redarrow)"/>
165
+ </svg>
@@ -0,0 +1,77 @@
1
+ <svg width="800" height="400" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- Background transparent -->
3
+
4
+ <!-- Agent99 Layer -->
5
+ <rect x="50" y="50" width="700" height="80"
6
+ fill="#2d3748" stroke="#4a5568" stroke-width="2" rx="8"/>
7
+ <text x="400" y="85" text-anchor="middle" fill="#e2e8f0"
8
+ font-family="Arial, sans-serif" font-size="18" font-weight="bold">
9
+ Agent99 (Business Logic Layer)
10
+ </text>
11
+ <text x="400" y="105" text-anchor="middle" fill="#cbd5e0"
12
+ font-family="Arial, sans-serif" font-size="14">
13
+ Agent capabilities, discovery, lifecycle, request/response handling
14
+ </text>
15
+
16
+ <!-- SmartMessage Layer -->
17
+ <rect x="50" y="150" width="700" height="80"
18
+ fill="#1a365d" stroke="#2c5282" stroke-width="2" rx="8"/>
19
+ <text x="400" y="185" text-anchor="middle" fill="#bee3f8"
20
+ font-family="Arial, sans-serif" font-size="18" font-weight="bold">
21
+ SmartMessage (Message Abstraction Layer)
22
+ </text>
23
+ <text x="400" y="205" text-anchor="middle" fill="#90cdf4"
24
+ font-family="Arial, sans-serif" font-size="14">
25
+ Unified pub/sub API, entity addressing, serialization, transport selection
26
+ </text>
27
+
28
+ <!-- Transport Layer -->
29
+ <rect x="50" y="250" width="700" height="100"
30
+ fill="#1a202c" stroke="#2d3748" stroke-width="2" rx="8"/>
31
+ <text x="400" y="285" text-anchor="middle" fill="#f7fafc"
32
+ font-family="Arial, sans-serif" font-size="18" font-weight="bold">
33
+ Transport Layer (Multiple Options)
34
+ </text>
35
+
36
+ <!-- Transport Options -->
37
+ <rect x="80" y="300" width="180" height="35"
38
+ fill="#2f855a" stroke="#48bb78" stroke-width="1" rx="4"/>
39
+ <text x="170" y="322" text-anchor="middle" fill="#f0fff4"
40
+ font-family="Arial, sans-serif" font-size="12" font-weight="bold">
41
+ Lanet (P2P LAN)
42
+ </text>
43
+
44
+ <rect x="310" y="300" width="180" height="35"
45
+ fill="#d69e2e" stroke="#ed8936" stroke-width="1" rx="4"/>
46
+ <text x="400" y="322" text-anchor="middle" fill="#fffbeb"
47
+ font-family="Arial, sans-serif" font-size="12" font-weight="bold">
48
+ NATS (WAN/Internet)
49
+ </text>
50
+
51
+ <rect x="540" y="300" width="180" height="35"
52
+ fill="#7c2d12" stroke="#c05621" stroke-width="1" rx="4"/>
53
+ <text x="630" y="322" text-anchor="middle" fill="#fef7f0"
54
+ font-family="Arial, sans-serif" font-size="12" font-weight="bold">
55
+ AMQP (Enterprise)
56
+ </text>
57
+
58
+ <!-- Arrows showing data flow -->
59
+ <defs>
60
+ <marker id="arrowhead" markerWidth="10" markerHeight="7"
61
+ refX="9" refY="3.5" orient="auto">
62
+ <polygon points="0 0, 10 3.5, 0 7" fill="#cbd5e0"/>
63
+ </marker>
64
+ </defs>
65
+
66
+ <!-- Bidirectional arrows -->
67
+ <line x1="400" y1="130" x2="400" y2="145"
68
+ stroke="#cbd5e0" stroke-width="2" marker-end="url(#arrowhead)"/>
69
+ <line x1="400" y1="230" x2="400" y2="245"
70
+ stroke="#cbd5e0" stroke-width="2" marker-end="url(#arrowhead)"/>
71
+
72
+ <!-- Return arrows -->
73
+ <line x1="410" y1="145" x2="410" y2="130"
74
+ stroke="#a0aec0" stroke-width="1" marker-end="url(#arrowhead)"/>
75
+ <line x1="410" y1="245" x2="410" y2="230"
76
+ stroke="#a0aec0" stroke-width="1" marker-end="url(#arrowhead)"/>
77
+ </svg>
@@ -0,0 +1,309 @@
1
+ <svg width="1000" height="900" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- Background transparent -->
3
+
4
+ <!-- Title -->
5
+ <text x="500" y="30" text-anchor="middle" fill="#f7fafc"
6
+ font-family="Arial, sans-serif" font-size="20" font-weight="bold">
7
+ SmartMessage Transport Extension API Design
8
+ </text>
9
+
10
+ <!-- Core SmartMessage Interface -->
11
+ <rect x="50" y="70" width="900" height="120"
12
+ fill="#553c9a" stroke="#7c3aed" stroke-width="2" rx="8"/>
13
+ <text x="500" y="100" text-anchor="middle" fill="#e9d5ff"
14
+ font-family="Arial, sans-serif" font-size="16" font-weight="bold">
15
+ SmartMessage::Transport::Base (Core Interface)
16
+ </text>
17
+
18
+ <!-- Core methods -->
19
+ <text x="80" y="125" fill="#c4b5fd"
20
+ font-family="monospace" font-size="11" font-weight="bold">
21
+ def publish(message, options = {})
22
+ </text>
23
+ <text x="350" y="125" fill="#c4b5fd"
24
+ font-family="monospace" font-size="11" font-weight="bold">
25
+ def subscribe(queue, &amp;block)
26
+ </text>
27
+ <text x="620" y="125" fill="#c4b5fd"
28
+ font-family="monospace" font-size="11" font-weight="bold">
29
+ def connect
30
+ </text>
31
+ <text x="750" y="125" fill="#c4b5fd"
32
+ font-family="monospace" font-size="11" font-weight="bold">
33
+ def disconnect
34
+ </text>
35
+
36
+ <text x="80" y="145" fill="#c4b5fd"
37
+ font-family="monospace" font-size="11" font-weight="bold">
38
+ def setup(config)
39
+ </text>
40
+ <text x="250" y="145" fill="#c4b5fd"
41
+ font-family="monospace" font-size="11" font-weight="bold">
42
+ def healthy?
43
+ </text>
44
+ <text x="380" y="145" fill="#c4b5fd"
45
+ font-family="monospace" font-size="11" font-weight="bold">
46
+ def stats
47
+ </text>
48
+ <text x="500" y="145" fill="#c4b5fd"
49
+ font-family="monospace" font-size="11" font-weight="bold">
50
+ def cleanup
51
+ </text>
52
+
53
+ <text x="80" y="165" fill="#a78bfa"
54
+ font-family="Arial, sans-serif" font-size="10">
55
+ Required methods all transport extensions must implement
56
+ </text>
57
+
58
+ <!-- Extension Implementations -->
59
+
60
+ <!-- AMQP Extension -->
61
+ <rect x="50" y="220" width="430" height="160"
62
+ fill="#7c2d12" stroke="#dc2626" stroke-width="2" rx="8" opacity="0.9"/>
63
+ <text x="265" y="245" text-anchor="middle" fill="#fef2f2"
64
+ font-family="Arial, sans-serif" font-size="14" font-weight="bold">
65
+ smart_message-transport-amqp
66
+ </text>
67
+
68
+ <text x="70" y="270" fill="#fecaca"
69
+ font-family="monospace" font-size="10">
70
+ class SmartMessage::Transport::AMQP &lt; Base
71
+ </text>
72
+ <text x="70" y="290" fill="#fecaca"
73
+ font-family="monospace" font-size="9">
74
+ def publish(message, options = {})
75
+ </text>
76
+ <text x="90" y="305" fill="#fca5a5"
77
+ font-family="monospace" font-size="9">
78
+ @bunny_exchange.publish(message.to_json,
79
+ </text>
80
+ <text x="90" y="320" fill="#fca5a5"
81
+ font-family="monospace" font-size="9">
82
+ routing_key: message.to)
83
+ </text>
84
+ <text x="70" y="340" fill="#fecaca"
85
+ font-family="monospace" font-size="9">
86
+ def subscribe(queue, &amp;block)
87
+ </text>
88
+ <text x="90" y="355" fill="#fca5a5"
89
+ font-family="monospace" font-size="9">
90
+ @bunny_queue.subscribe do |delivery, props, body|
91
+ </text>
92
+ <text x="90" y="370" fill="#fca5a5"
93
+ font-family="monospace" font-size="9">
94
+ yield SmartMessage.parse(body)
95
+ </text>
96
+
97
+ <!-- Lanet Extension -->
98
+ <rect x="520" y="220" width="430" height="160"
99
+ fill="#065f46" stroke="#10b981" stroke-width="2" rx="8" opacity="0.9"/>
100
+ <text x="735" y="245" text-anchor="middle" fill="#d1fae5"
101
+ font-family="Arial, sans-serif" font-size="14" font-weight="bold">
102
+ smart_message-transport-lanet
103
+ </text>
104
+
105
+ <text x="540" y="270" fill="#a7f3d0"
106
+ font-family="monospace" font-size="10">
107
+ class SmartMessage::Transport::Lanet &lt; Base
108
+ </text>
109
+ <text x="540" y="290" fill="#a7f3d0"
110
+ font-family="monospace" font-size="9">
111
+ def publish(message, options = {})
112
+ </text>
113
+ <text x="560" y="305" fill="#6ee7b7"
114
+ font-family="monospace" font-size="9">
115
+ target_ip = resolve_agent_ip(message.to)
116
+ </text>
117
+ <text x="560" y="320" fill="#6ee7b7"
118
+ font-family="monospace" font-size="9">
119
+ @lanet.send_to(target_ip, message.to_json)
120
+ </text>
121
+ <text x="540" y="340" fill="#a7f3d0"
122
+ font-family="monospace" font-size="9">
123
+ def subscribe(queue, &amp;block)
124
+ </text>
125
+ <text x="560" y="355" fill="#6ee7b7"
126
+ font-family="monospace" font-size="9">
127
+ @lanet.listen do |msg|
128
+ </text>
129
+ <text x="560" y="370" fill="#6ee7b7"
130
+ font-family="monospace" font-size="9">
131
+ yield SmartMessage.parse(msg)
132
+ </text>
133
+
134
+ <!-- NATS Extension -->
135
+ <rect x="50" y="410" width="430" height="160"
136
+ fill="#1e40af" stroke="#3b82f6" stroke-width="2" rx="8" opacity="0.9"/>
137
+ <text x="265" y="435" text-anchor="middle" fill="#dbeafe"
138
+ font-family="Arial, sans-serif" font-size="14" font-weight="bold">
139
+ smart_message-transport-nats
140
+ </text>
141
+
142
+ <text x="70" y="460" fill="#bfdbfe"
143
+ font-family="monospace" font-size="10">
144
+ class SmartMessage::Transport::NATS &lt; Base
145
+ </text>
146
+ <text x="70" y="480" fill="#bfdbfe"
147
+ font-family="monospace" font-size="9">
148
+ def publish(message, options = {})
149
+ </text>
150
+ <text x="90" y="495" fill="#93c5fd"
151
+ font-family="monospace" font-size="9">
152
+ subject = build_subject(message)
153
+ </text>
154
+ <text x="90" y="510" fill="#93c5fd"
155
+ font-family="monospace" font-size="9">
156
+ @nats.publish(subject, message.to_json)
157
+ </text>
158
+ <text x="70" y="530" fill="#bfdbfe"
159
+ font-family="monospace" font-size="9">
160
+ def subscribe(queue, &amp;block)
161
+ </text>
162
+ <text x="90" y="545" fill="#93c5fd"
163
+ font-family="monospace" font-size="9">
164
+ @nats.subscribe(queue) do |msg|
165
+ </text>
166
+ <text x="90" y="560" fill="#93c5fd"
167
+ font-family="monospace" font-size="9">
168
+ yield SmartMessage.parse(msg.data)
169
+ </text>
170
+
171
+ <!-- Plugin Registration -->
172
+ <rect x="520" y="410" width="430" height="160"
173
+ fill="#1f2937" stroke="#374151" stroke-width="2" rx="8" opacity="0.9"/>
174
+ <text x="735" y="435" text-anchor="middle" fill="#f9fafb"
175
+ font-family="Arial, sans-serif" font-size="14" font-weight="bold">
176
+ Plugin Registration System
177
+ </text>
178
+
179
+ <text x="540" y="460" fill="#e5e7eb"
180
+ font-family="monospace" font-size="10">
181
+ SmartMessage::Transport.register(:amqp) do
182
+ </text>
183
+ <text x="560" y="475" fill="#d1d5db"
184
+ font-family="monospace" font-size="9">
185
+ SmartMessage::Transport::AMQP
186
+ </text>
187
+ <text x="540" y="490" fill="#e5e7eb"
188
+ font-family="monospace" font-size="10">
189
+ end
190
+ </text>
191
+
192
+ <text x="540" y="510" fill="#e5e7eb"
193
+ font-family="monospace" font-size="10">
194
+ SmartMessage::Transport.register(:lanet) do
195
+ </text>
196
+ <text x="560" y="525" fill="#d1d5db"
197
+ font-family="monospace" font-size="9">
198
+ SmartMessage::Transport::Lanet
199
+ </text>
200
+ <text x="540" y="540" fill="#e5e7eb"
201
+ font-family="monospace" font-size="10">
202
+ end
203
+ </text>
204
+
205
+ <text x="540" y="555" fill="#9ca3af"
206
+ font-family="Arial, sans-serif" font-size="9">
207
+ Auto-discovered when gem is loaded
208
+ </text>
209
+
210
+ <!-- Usage Examples -->
211
+ <rect x="50" y="600" width="900" height="120"
212
+ fill="#0f172a" stroke="#334155" stroke-width="2" rx="8" opacity="0.9"/>
213
+ <text x="500" y="625" text-anchor="middle" fill="#f1f5f9"
214
+ font-family="Arial, sans-serif" font-size="16" font-weight="bold">
215
+ Usage Examples
216
+ </text>
217
+
218
+ <text x="70" y="650" fill="#60a5fa"
219
+ font-family="monospace" font-size="11" font-weight="bold">
220
+ # Agent99 with enhanced BunnyFarm
221
+ </text>
222
+ <text x="70" y="665" fill="#93c5fd"
223
+ font-family="monospace" font-size="10">
224
+ class CapabilityRequest &lt; SmartMessage::Base
225
+ </text>
226
+ <text x="90" y="680" fill="#bfdbfe"
227
+ font-family="monospace" font-size="10">
228
+ config do
229
+ </text>
230
+ <text x="110" y="695" fill="#dbeafe"
231
+ font-family="monospace" font-size="10">
232
+ transport :amqp # or :lanet, :nats, :redis, :memory
233
+ </text>
234
+ <text x="90" y="710" fill="#bfdbfe"
235
+ font-family="monospace" font-size="10">
236
+ end
237
+ </text>
238
+
239
+ <text x="500" y="650" fill="#fbbf24"
240
+ font-family="monospace" font-size="11" font-weight="bold">
241
+ # Dynamic transport selection
242
+ </text>
243
+ <text x="500" y="665" fill="#fcd34d"
244
+ font-family="monospace" font-size="10">
245
+ message.config do
246
+ </text>
247
+ <text x="520" y="680" fill="#fde68a"
248
+ font-family="monospace" font-size="10">
249
+ transport select_transport(target_agent)
250
+ </text>
251
+ <text x="500" y="695" fill="#fcd34d"
252
+ font-family="monospace" font-size="10">
253
+ end
254
+ </text>
255
+ <text x="500" y="710" fill="#fcd34d"
256
+ font-family="monospace" font-size="10">
257
+ message.publish
258
+ </text>
259
+
260
+ <!-- Configuration -->
261
+ <rect x="50" y="750" width="900" height="120"
262
+ fill="#1a202c" stroke="#2d3748" stroke-width="1" rx="5" opacity="0.9"/>
263
+ <text x="500" y="775" text-anchor="middle" fill="#f7fafc"
264
+ font-family="Arial, sans-serif" font-size="16" font-weight="bold">
265
+ Configuration &amp; Installation
266
+ </text>
267
+
268
+ <text x="70" y="800" fill="#68d391"
269
+ font-family="monospace" font-size="11" font-weight="bold">
270
+ # Gemfile
271
+ </text>
272
+ <text x="70" y="815" fill="#9ae6b4"
273
+ font-family="monospace" font-size="10">
274
+ gem 'smart_message' # Core + Memory/Redis
275
+ </text>
276
+ <text x="70" y="830" fill="#9ae6b4"
277
+ font-family="monospace" font-size="10">
278
+ gem 'smart_message-transport-amqp' # Enterprise messaging
279
+ </text>
280
+ <text x="70" y="845" fill="#9ae6b4"
281
+ font-family="monospace" font-size="10">
282
+ gem 'smart_message-transport-lanet' # P2P LAN optimization
283
+ </text>
284
+ <text x="70" y="860" fill="#9ae6b4"
285
+ font-family="monospace" font-size="10">
286
+ gem 'smart_message-transport-nats' # High-performance distributed
287
+ </text>
288
+
289
+ <text x="500" y="800" fill="#fbb6ce"
290
+ font-family="monospace" font-size="11" font-weight="bold">
291
+ # Auto-registration on require
292
+ </text>
293
+ <text x="500" y="815" fill="#f687b3"
294
+ font-family="monospace" font-size="10">
295
+ require 'smart_message-transport-amqp'
296
+ </text>
297
+ <text x="500" y="830" fill="#f687b3"
298
+ font-family="monospace" font-size="10">
299
+ # Transport now available as :amqp
300
+ </text>
301
+ <text x="500" y="845" fill="#f687b3"
302
+ font-family="monospace" font-size="10">
303
+ SmartMessage::Transport.available_transports
304
+ </text>
305
+ <text x="500" y="860" fill="#f687b3"
306
+ font-family="monospace" font-size="10">
307
+ # => [:memory, :redis, :amqp]
308
+ </text>
309
+ </svg>