-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprimal-capabilities.toml
More file actions
344 lines (293 loc) · 8.79 KB
/
primal-capabilities.toml
File metadata and controls
344 lines (293 loc) · 8.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
# Primal Capability Registry
# Each primal advertises its capabilities for runtime discovery
#
# Philosophy: "Each primal knows only itself. Everything else is discovered."
#
# Usage:
# let services = discovery.find_by_capability("cryptographic-operations").await?;
# // No hardcoded "beardog" - discovered by capability!
[registry]
version = "1.0.0"
discovery_protocol = "capability-based"
fallback_strategy = "best-available"
# =============================================================================
# TOADSTOOL - Universal Compute Platform
# =============================================================================
[primals.toadstool]
name = "toadstool"
description = "Universal compute platform with multi-runtime execution"
primary_role = "compute"
capabilities = [
# biomeOS Node Atomic capabilities (node_atomic_compute.toml)
"compute",
"workload",
"orchestration",
"ai_local",
# Implementation-level capabilities
"gpu-compute",
"wasm-execution",
"container-execution",
"universal-compute",
"multi-runtime-execution",
"workload-scheduling",
"resource-management",
"native-execution",
"edge-compute",
# Platform features
"sandboxing",
"isolation",
"monitoring",
"metrics-collection",
"health-checks",
"audit-logging",
]
# Transport: Unix socket (XDG-compliant biomeOS standard)
# Socket path: $XDG_RUNTIME_DIR/biomeos/compute.sock (JSON-RPC) + compute-tarpc.sock (tarpc)
# Env override: TOADSTOOL_SOCKET
protocols = ["unix-socket", "json-rpc-2.0", "tarpc"]
# Note: WebSocket removed (was C-FFI tungstenite/ring). Use compute.status polling.
# =============================================================================
# BEARDOG - Cryptographic Operations & Key Management
# =============================================================================
[primals.beardog]
name = "beardog"
description = "Cryptographic security and key management platform"
primary_role = "security"
capabilities = [
# Cryptographic operations
"cryptographic-operations",
"key-management",
"signing",
"verification",
"encryption",
"decryption",
# Key operations
"key-generation",
"key-rotation",
"key-storage",
"key-recovery",
# Security features
"identity-management",
"authentication",
"authorization",
"certificate-management",
"secure-vault",
# Advanced crypto
"homomorphic-encryption",
"zero-knowledge-proofs",
"threshold-signatures",
]
protocols = ["http", "grpc"]
default_port = 8081
health_endpoint = "/health"
# =============================================================================
# SONGBIRD - Service Discovery & Orchestration
# =============================================================================
[primals.songbird]
name = "songbird"
description = "Service discovery, load balancing, and request routing"
primary_role = "coordination"
capabilities = [
# Discovery
"service-discovery",
"capability-discovery",
"health-monitoring",
"service-registry",
# Routing
"load-balancing",
"request-routing",
"traffic-management",
"failover",
# Orchestration
"job-routing",
"task-distribution",
"resource-allocation",
"capacity-planning",
# Mesh features
"service-mesh",
"circuit-breaking",
"rate-limiting",
"retry-logic",
]
protocols = ["http", "grpc", "mdns"]
default_port = 8082
health_endpoint = "/health"
discovery_endpoint = "/discover"
# =============================================================================
# NESTGATE - Distributed Storage & Data Management
# =============================================================================
[primals.nestgate]
name = "nestgate"
description = "Distributed storage and data management platform"
primary_role = "storage"
capabilities = [
# Storage
"storage",
"distributed-storage",
"object-storage",
"file-storage",
"block-storage",
# Data management
"data-management",
"caching",
"replication",
"sharding",
"consistency",
# Advanced features
"versioning",
"snapshots",
"backup",
"recovery",
"compression",
"deduplication",
# Access
"data-access",
"query-engine",
"indexing",
"search",
]
protocols = ["http", "grpc", "s3-compatible"]
default_port = 8083
health_endpoint = "/health"
# =============================================================================
# SQUIRREL - AI Agents & MCP Platform
# =============================================================================
[primals.squirrel]
name = "squirrel"
description = "AI agent platform with Model Context Protocol support"
primary_role = "intelligence"
capabilities = [
# AI/ML
"ai-agents",
"machine-learning",
"inference",
"model-serving",
# MCP Protocol
"mcp-protocol",
"plugin-execution",
"tool-calling",
"context-management",
# Agent features
"conversation",
"reasoning",
"planning",
"task-execution",
# Platform
"plugin-registry",
"plugin-discovery",
"plugin-isolation",
"plugin-management",
]
protocols = ["http", "grpc", "mcp"]
default_port = 8084
health_endpoint = "/health"
# =============================================================================
# BIOMEOS - Multi-Service Orchestration
# =============================================================================
[primals.biomeos]
name = "biomeos"
description = "Multi-service orchestration and biome management"
primary_role = "orchestration"
capabilities = [
# Orchestration
"multi-service-orchestration",
"biome-management",
"service-composition",
"workflow-execution",
# Team management
"team-coordination",
"resource-sharing",
"access-control",
"quota-management",
# Integration
"service-integration",
"data-flow",
"event-bus",
"message-queue",
]
protocols = ["http", "grpc"]
default_port = 8085
health_endpoint = "/health"
# =============================================================================
# DISCOVERY CONFIGURATION
# =============================================================================
[discovery]
# Methods to use for discovery (in priority order)
methods = [
"environment", # Environment variables
"mdns", # Multicast DNS
"service-mesh", # Kubernetes, Consul, etc.
"config-file", # This file
"fallback", # Last resort defaults
]
# Cache settings
cache_enabled = true
cache_ttl_seconds = 300 # 5 minutes
# Retry settings
retry_attempts = 3
retry_delay_ms = 1000
timeout_seconds = 30
# Health check settings
health_check_enabled = true
health_check_interval_seconds = 30
health_check_timeout_seconds = 5
[discovery.preferences]
# Prefer local services when available
prefer_local = true
# Prefer healthy services
require_healthy = true
# Load balancing strategy
load_balance = "round-robin" # or "random", "least-connections"
# Fallback behavior
fallback_to_any = true # Use any available service if preferred not found
# =============================================================================
# MIGRATION MAPPING (for backward compatibility during transition)
# =============================================================================
[migration]
# Maps old hardcoded references to capabilities
# Used during migration period - will be removed
[migration.beardog]
capability = "cryptographic-operations"
fallback_url = "http://localhost:8081" # Last resort only
[migration.songbird]
capability = "service-discovery"
fallback_url = "http://localhost:8082"
[migration.nestgate]
capability = "storage"
fallback_url = "http://localhost:8083"
[migration.squirrel]
capability = "ai-agents"
fallback_url = "http://localhost:8084"
[migration.biomeos]
capability = "multi-service-orchestration"
fallback_url = "http://localhost:8085"
# =============================================================================
# EXAMPLE USAGE
# =============================================================================
#
# Instead of:
# let beardog = connect("http://localhost:8081").await?;
#
# Use:
# let crypto = discovery.find_by_capability("cryptographic-operations").await?;
# let conn = try_connect(&crypto[0]).await?;
#
# Or with fallback:
# let services = discovery.find_by_capabilities(vec![
# "cryptographic-operations",
# "key-management",
# ]).await?;
#
# for service in services {
# match try_connect(&service).await {
# Ok(conn) => return Ok(conn),
# Err(e) => warn!("Service {} failed: {}", service.endpoint, e),
# }
# }
#
# Benefits:
# - No hardcoded service names in code
# - Automatic failover to alternatives
# - Load balancing across instances
# - Health-aware routing
# - Like living organisms: discover by need, not by name!