-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
158 lines (123 loc) · 5.7 KB
/
env.example
File metadata and controls
158 lines (123 loc) · 5.7 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
# 🌾 SweetGrass Environment Configuration
#
# Infant Discovery Architecture: Primal starts with zero knowledge,
# discovers everything from environment and network.
#
# Copy to `.env` and customize for your deployment.
# =============================================================================
# SELF-KNOWLEDGE: What this primal knows about itself
# =============================================================================
# Primal name (human-readable identifier)
# Default: "sweetgrass"
PRIMAL_NAME=sweetgrass
# Unique instance ID (auto-generated if not set)
# Format: alphanumeric string (e.g., "sg-prod-01", "sweetgrass-dev-local")
# Default: random UUID
# PRIMAL_INSTANCE_ID=sg-prod-01
# Capabilities this primal offers (comma-separated)
# Available: signing, session_events, anchoring, discovery, compute
# Default: none (read-only primal)
# PRIMAL_CAPABILITIES=signing,session_events,anchoring
# =============================================================================
# NETWORK ENDPOINTS: How this primal is reached
# =============================================================================
# tarpc RPC bind address (host:port format)
# Default: 0.0.0.0:0 (auto-allocate)
# SWEETGRASS_TARPC_ADDRESS=0.0.0.0:0
# HTTP REST + JSON-RPC bind address (host:port format)
# Default: 0.0.0.0:0 (auto-allocate)
# SWEETGRASS_HTTP_ADDRESS=0.0.0.0:0
# HTTP port shorthand (sets HTTP bind to 0.0.0.0:<PORT>)
# SWEETGRASS_HTTP_PORT=8080
# TCP JSON-RPC port (opt-in, newline-delimited)
# Bare port binds 127.0.0.1; use 0.0.0.0:PORT for all-interfaces
# SWEETGRASS_PORT=9850
# =============================================================================
# STORAGE BACKEND: Where braids are persisted
# =============================================================================
# Storage backend type
# Options: memory | redb | postgres | nestgate
# Default: memory (ephemeral, for testing only)
# Recommended: redb (embedded Pure Rust, ACID transactions)
STORAGE_BACKEND=memory
# redb database path (Pure Rust embedded, recommended)
# Used when: STORAGE_BACKEND=redb
# STORAGE_PATH=./data/sweetgrass.redb
# PostgreSQL connection string
# Used when: STORAGE_BACKEND=postgres
# DATABASE_URL=postgresql://sweetgrass:password@localhost:5432/sweetgrass
# =============================================================================
# IPC SOCKETS: Ecosystem capability discovery
# =============================================================================
# BearDog Tower crypto socket (direct path)
# Used for crypto.sign delegation (braid signing, BTSP)
# BEARDOG_SOCKET=/run/biomeos/security.sock
# Generic security provider socket (fallback for BEARDOG_SOCKET)
# SECURITY_PROVIDER_SOCKET=/run/biomeos/security.sock
# Songbird discovery service socket
# Used for capability-based resolution (e.g. "crypto" → BearDog)
# DISCOVERY_SOCKET=/run/biomeos/discovery.sock
# NestGate content-addressed storage socket
# NESTGATE_SOCKET=/run/biomeos/nestgate.sock
# biomeOS socket directory (convention base)
# Individual sockets resolve to {dir}/{domain}.sock
# BIOMEOS_SOCKET_DIR=/run/biomeos
# =============================================================================
# DISCOVERY: How this primal finds others (Universal Adapter)
# =============================================================================
# Universal adapter for primal discovery
# Compatible with: Songbird, Consul, K8s Service Discovery, custom mesh
# Format: host:port
# DISCOVERY_ADDRESS=localhost:9090
# UNIVERSAL_ADAPTER_ADDRESS=localhost:9090
# =============================================================================
# BTSP: BearDog Secure Tunnel Protocol
# =============================================================================
# Family ID — gates BTSP detect_protocol multiplexer
# Set to enable BTSP handshake auto-detection on UDS + TCP
# FAMILY_ID=my-family-id
# Family seed — IKM for HKDF-SHA256 handshake key derivation
# Hex-encoded 32-byte seed. Forwarded to BearDog btsp.session.create
# FAMILY_SEED=0123456789abcdef...
# =============================================================================
# TUNING
# =============================================================================
# tarpc server concurrency limit (max in-flight requests)
# Default: library default
# TARPC_MAX_CONCURRENT_REQUESTS=100
# Address this primal advertises to the discovery service
# Defaults to system hostname
# PRIMAL_ADVERTISE_ADDRESS=sweetgrass.internal:8091
# =============================================================================
# LOGGING
# =============================================================================
# Rust log level: trace | debug | info | warn | error
# Default: info
RUST_LOG=info
# =============================================================================
# EXAMPLE CONFIGURATIONS
# =============================================================================
# --- Local Development ---
# PRIMAL_NAME=sweetgrass-dev
# STORAGE_BACKEND=memory
# SWEETGRASS_TARPC_ADDRESS=127.0.0.1:8091
# SWEETGRASS_HTTP_ADDRESS=127.0.0.1:8080
# RUST_LOG=debug
# --- Production (PostgreSQL + Universal Adapter + BearDog) ---
# PRIMAL_NAME=sweetgrass-prod
# PRIMAL_INSTANCE_ID=sg-prod-01
# STORAGE_BACKEND=postgres
# DATABASE_URL=postgresql://sweetgrass:pass@postgres.internal:5432/sweetgrass
# DISCOVERY_ADDRESS=universal-adapter.internal:9090
# BEARDOG_SOCKET=/run/biomeos/security.sock
# SWEETGRASS_TARPC_ADDRESS=0.0.0.0:0
# SWEETGRASS_HTTP_ADDRESS=0.0.0.0:0
# RUST_LOG=info
# --- Edge (redb + Local Discovery) ---
# PRIMAL_NAME=sweetgrass-edge
# STORAGE_BACKEND=redb
# STORAGE_PATH=/var/lib/sweetgrass/sweetgrass.redb
# BIOMEOS_SOCKET_DIR=/run/biomeos
# SWEETGRASS_TARPC_ADDRESS=127.0.0.1:8091
# RUST_LOG=warn
# 🌾 SweetGrass: Every piece of data has a story.