Documentation
¶
Index ¶
- Constants
- Variables
- func AccountDir(root, accountId string) string
- func AddrPath(dataDir string) string
- func ApplyAccessDefaults(cfg *Config)
- func ApplyGlobalP2PDefaults(cfg *Config)
- func ApplyPushDefaults(cfg *Config)
- func ConfigSearchPaths(dataDir string) []string
- func EnsureDataDir(raw string) (string, error)
- func ExpandTilde(p string) string
- func HasRootWallet(root string) bool
- func ListAccounts(root string) ([]string, error)
- func LoadNodeconf(cfg Network) ([]byte, error)
- func LockPath(dataDir string) string
- func ModelsDir(root string) string
- func NodeconfNetworkId(raw []byte) (string, error)
- func NodeconfPlaceholder() []byte
- func PIDPath(dataDir string) string
- func ParseMode(s string) (string, error)
- func ResolvePasskey(cfg Config, fromStdin bool) (string, error)
- func UsesEmbeddedNodeconf(n Network) bool
- func WalletPath(cfg Config, dataDir string) string
- type Access
- type Auth
- type Config
- type Files
- type Flags
- type GlobalP2P
- type Index
- type IndexLocal
- type IndexOllama
- type IndexOpenAI
- type IndexSearch
- type IndexVector
- type Listen
- type Local
- type Network
- type P2P
- type Push
- type Storage
- type Sync
- type WebUI
Constants ¶
const ( // ModeStandalone: the user owns the server. Keys live in wallet.key, // the account resolves from disk, logout and HTTP shutdown are // refused. ModeStandalone = "standalone" // ModeManaged: a spawning host owns the server. The account key is // supplied per boot over POST /v1/auth and never written to disk; // logout, account switch and HTTP shutdown are allowed behind the // control token only the host holds. ModeManaged = "managed" )
Server ownership modes (docs/02-server.md § Modes). Mode is fixed at launch and unreachable over HTTP — that is what makes the standalone refusals enforceable rather than advisory.
const ( ProdPushPeerId = "12D3KooWMATrdteJNq2YvYhtq3RDeWxq6RVXDAr36MsGd5RJzXDn" ProdPushAddr = "yamux://anytype-push-server.anytype.io:443" )
The production push node — the anytype-push-server deployment `any` shares with heart (docs/20-push.md). A direct out-of-band peer, so it is config, not nodeconf: these constants are the packaged default the way nodeconf-prod.yml is, keeping the two in step.
yamux-only, hence the explicit scheme: the node speaks no QUIC, and a bare host:port would be dialed on both.
const ProdRedeemUrl = "https://prod-any-invite.anytype.io"
ProdRedeemUrl is the production any-invite deployment, packaged the way the push node is: an out-of-band service the nodeconf does not name, so the binary carries it as config.
Variables ¶
var ( ProdRelayUrls = []string{ "https://relay-fr-1.anytype.io", "https://relay-de-1.anytype.io", } // ProdPkarrRelayUrls are Anytype's pkarr relays (iroh-dns-server, // pkarr HTTP API only). They are equal peers with no replication // between them: a device PUTs its record to every one and reads the // newest packet any of them holds, so one host down or wiped costs // nothing while the other answers. ProdPkarrRelayUrls = []string{ "https://pkarr-fr-1.anytype.io", "https://pkarr-de-1.anytype.io", } )
The production global-p2p infrastructure: the iroh relays that forward encrypted QUIC between two devices that cannot reach each other directly, and the pkarr relays that hold each account's device-discovery record.
Packaged as config the way the push node and the invite service are: neither is named by the nodeconf, so the binary carries the default and keeps it in step with nodeconf-prod.yml.
A relay never sees content — it forwards an end-to-end-encrypted stream and helps the two sides hole-punch a direct path — and the pkarr record is signed and encrypted under keys derived from the account identity, so a relay holds opaque bytes it cannot read, write, or attribute to an account.
Functions ¶
func AccountDir ¶
AccountDir returns the per-account data dir <root>/<accountId>.
func AddrPath ¶
AddrPath returns <dataDir>/server.addr — the bound listen address of the process holding the lock, written once the listener is up. Advisory like server.pid: it lets the CLI find a server started on an ephemeral port, it never proves one is running.
func ApplyAccessDefaults ¶
func ApplyAccessDefaults(cfg *Config)
ApplyAccessDefaults fills in the production invite service when the config names none AND the network is the embedded production default.
Same pairing as ApplyPushDefaults: the invite service grants limits on the production pp-node, so a server on staging or local infra must not send its users there. A named nodeconf gets an invite service only by naming one, and tests — which always name a nodeconf — stay off production.
func ApplyGlobalP2PDefaults ¶ added in v0.2.3
func ApplyGlobalP2PDefaults(cfg *Config)
ApplyGlobalP2PDefaults fills in the production relays when the network is the embedded production default.
Same pairing as ApplyPushDefaults: a device on staging, local infra or a self-hosted network reaches Anytype's relays only by naming them, and tests — which always name a nodeconf — never do. Without the pairing every test run would hold a relay session.
The two lists fill independently, so every combination on the production network is coherent: naming your own relays keeps the packaged pkarr relays, naming your own pkarr relays keeps the packaged relays. Filling only together would make "pkarr relays, nothing else" resolve the layer OFF — the SDK cannot run account discovery without the transport — which is the opposite of what writing that line asks for, and it would fail silently.
`p2p.global.enabled: false` still wins afterwards, through the tristate, as does an explicit `p2p.enabled: false` — but only against these packaged values, not against relays an operator wrote (see GlobalP2P.isEnabled).
func ApplyPushDefaults ¶
func ApplyPushDefaults(cfg *Config)
ApplyPushDefaults fills in the production push node when the config names none AND the network is the embedded production default.
The pairing is the point: the push node is not part of the nodeconf, so nothing else stops a server on staging or local infra from pushing through the production node. Tying the default to the network keeps "unconfigured binary" (production, push on) and "explicitly pointed somewhere else" (host supplies its own push node, or gets none) apart, and keeps every test — which always names a nodeconf — off the production push server.
Only a config that names NEITHER field is filled: a half-configured push node stays the caller's to finish. `push.enabled: false` still wins afterwards, through the tristate.
func ConfigSearchPaths ¶
ConfigSearchPaths lists the files to probe when --config is not specified, in priority order.
func EnsureDataDir ¶
EnsureDataDir creates the data directory (mode 0700) if it does not exist and returns its absolute, tilde-expanded path.
func ExpandTilde ¶
ExpandTilde resolves a leading "~" to the user's home directory, up to a path separator: "~/" everywhere, "~\" on Windows too. Returns the input unchanged when no home can be resolved or no tilde is present.
func HasRootWallet ¶
HasRootWallet reports whether the root carries a legacy flat-layout wallet.key — the default account, whose data stays at the root.
func ListAccounts ¶
ListAccounts returns the account ids that have a per-account dir (<root>/<id>/wallet.key) under the root, lexically sorted. The legacy root wallet is not included — probe it with HasRootWallet.
func LoadNodeconf ¶
LoadNodeconf returns the YAML bytes any-sync needs to bootstrap. Precedence: inline network.nodeconf → network.nodeconfPath → the embedded production default. Errors only when an explicitly configured path is unreadable.
func LockPath ¶
LockPath returns <dataDir>/server.lock — the file the single-instance OS lock is taken on. Its contents are never read: on Windows the lock covers byte 0 and byte-range locks are mandatory, so no other process could read it anyway.
func ModelsDir ¶
ModelsDir returns the shared embedder model cache <root>/models — one download per root, shared by every account under it.
func NodeconfNetworkId ¶
NodeconfNetworkId returns the networkId a nodeconf names: the any-sync network a server booted with it joins. A conf that doesn't parse or names no network is an error.
func NodeconfPlaceholder ¶
func NodeconfPlaceholder() []byte
NodeconfPlaceholder returns the sanitized fixture bytes. Callers that must boot the SDK without joining a network (tests, offline smoke runs) pass it as Network.Nodeconf instead of falling through to the production default.
func PIDPath ¶
PIDPath returns <dataDir>/server.pid — the plain-text pid of the process holding the lock, written after acquiring it. Advisory: it names the holder in error messages, it never decides who holds the lock. See LockPath.
func ResolvePasskey ¶
ResolvePasskey sources the wallet passkey from the environment variable named by cfg.Auth.PasskeyEnv, or from stdin when fromStdin is true. Returns an empty string when neither source is configured — the caller treats that as a request for a plain wallet.
func UsesEmbeddedNodeconf ¶
UsesEmbeddedNodeconf reports whether this network config resolves to the packaged production nodeconf — i.e. nothing was configured, so LoadNodeconf returns the embedded default.
func WalletPath ¶
WalletPath returns the effective wallet file path for the config: cfg.Auth.WalletPath when set, otherwise <dataDir>/wallet.key.
Types ¶
type Access ¶
type Access struct {
RedeemUrl string `yaml:"redeemUrl"`
}
Access is the alpha invite-code service (any-invite). RedeemUrl is the base URL its POST /redeem lives under. Empty on the embedded production network means ProdRedeemUrl; empty on any other network disables POST /v1/account/access-code (409 access.disabled).
type Config ¶
type Config struct {
// DataDir is the ROOT directory (default ~/.any). Each account
// lives in <dataDir>/<accountId>/ (wallet.key, sdk/, index/,
// server.pid); a wallet.key directly at the root is the legacy
// flat layout and acts as the default account, keeping its data at
// the root. config.yaml and the shared models/ cache stay at the
// root.
DataDir string `yaml:"dataDir"`
// Mode declares who owns this server: "standalone" (default — the
// user; keys on disk, account resolved from disk) or "managed" (a
// spawning host; account key supplied per boot, never on disk).
// See mode.go.
Mode string `yaml:"mode"`
// Account selects which account to boot when the root holds more
// than one. Empty = the default (root wallet.key, or the sole
// per-account dir). Standalone only.
Account string `yaml:"account"`
Listen Listen `yaml:"listen"`
Auth Auth `yaml:"auth"`
Network Network `yaml:"network"`
Storage Storage `yaml:"storage"`
Sync Sync `yaml:"sync"`
P2P P2P `yaml:"p2p"`
Index Index `yaml:"index"`
Files Files `yaml:"files"`
Push Push `yaml:"push"`
Local Local `yaml:"local"`
Access Access `yaml:"access"`
WebUI WebUI `yaml:"webUI"`
Log logger.Config `yaml:"log"`
}
func Defaults ¶
func Defaults() Config
Defaults returns a Config populated with v1 defaults. Paths here are unexpanded — Load resolves them against the process environment.
func Load ¶
Load resolves the effective config by layering defaults → config file → environment variables → flags. A missing config file is not an error.
func LoadClient ¶
LoadClient is Load for the client side of the CLI (`any stop`, address discovery): the same layering, without the server-only mode validation — a managed host's environment (ANY_MODE=managed) must not stop `--account` from naming the server to reach.
func (Config) LocalDiscoveryEnabled ¶ added in v0.2.3
LocalDiscoveryEnabled resolves p2p.localDiscovery. An explicit value wins. Absent, a managed server on macOS starts with discovery off: the Local Network prompt fires on the first multicast send, and the host shell owns that permission flow, so it turns discovery on through PUT /v1/local-discovery once the user has answered. Every other setup starts on; an embedded host with the same prompt (iOS) passes the value in embedded.Options, since its account may boot before the listener is up.
type Files ¶
type Files struct {
// PublicReadBaseUrl overrides the network-advertised public read
// base for durable file downloads ({base}/blob/{spaceId}/{rootCid}).
// Normally left empty — the SDK resolves it once from the network's
// fileV2 nodes and caches it. Set it for private deployments that
// front the object store themselves.
PublicReadBaseUrl string `yaml:"publicReadBaseUrl"`
// GCInterval enables the SDK's periodic file-cache safety sweep at
// the given cadence (duration string, e.g. "1h"). Empty/zero — the
// default — means NO automatic sweep: reclamation is caller-driven
// via POST /v1/files/cache/{free,sweep} and per-file offload.
GCInterval string `yaml:"gcInterval"`
}
Files tunes the SDK's file byte layer (files v2, docs/17-files.md). Zero values fall back to SDK defaults; an absent `files` block changes nothing.
type Flags ¶
type Flags struct {
ConfigPath string
DataDir string
Mode string
Account string
Addr string
WalletPath string
LogLevel string
}
Flags holds the subset of command-line flags that can override config file and environment values. An empty string means "not set".
type GlobalP2P ¶ added in v0.2.3
type GlobalP2P struct {
// Enabled is an opt-out on the production network, where the
// defaults supply relays, and an opt-in anywhere else: absent
// resolves to on only once relayUrls are known. False always wins.
Enabled *bool `yaml:"enabled"`
// RelayUrls are the home-relay candidates. The device probes them
// and keeps a session to the nearest; a relay forwards encrypted
// QUIC and helps the two sides find a direct path.
RelayUrls []string `yaml:"relayUrls"`
// PkarrRelayUrls hold the account's device-discovery record — how
// this account's own devices find each other, and how a device
// holding only the mnemonic finds them. Empty leaves the account
// layer off; devices then know each other only through the records
// of the spaces they share.
PkarrRelayUrls []string `yaml:"pkarrRelayUrls"`
// InsecureRelay admits http:// relay URLs — plaintext to the relay,
// for a self-hosted or local relay without a certificate. The
// end-to-end encryption between the two devices is unaffected;
// what leaks is which endpoints are talking. Development only.
InsecureRelay bool `yaml:"insecureRelay"`
// InsecurePkarr admits http:// pkarr relay URLs. Development only.
InsecurePkarr bool `yaml:"insecurePkarr"`
// Port fixes the UDP port of the iroh endpoint. 0 = ephemeral.
Port int `yaml:"port"`
// MaxConnections caps the global connections this device keeps
// open, chosen to cover the loaded spaces. 0 = the SDK default (4).
MaxConnections int `yaml:"maxConnections"`
// MaxInbound is the headroom above MaxConnections for connections
// other devices opened. 0 = the SDK default (8).
MaxInbound int `yaml:"maxInbound"`
// contains filtered or unexported fields
}
GlobalP2P controls the internet-wide device-to-device layer: iroh (QUIC over a relay, with hole punching to a direct path), peers discovered through each space's records and through the account's own pkarr record. Independent of the LAN layer above — either can be off while the other runs.
On the embedded production network the relays and the pkarr relays default in (p2p_global_prod.go); every other network gets the layer only by naming its own.
type Index ¶
type Index struct {
// Enabled gates the whole indexer. Default true.
Enabled bool `yaml:"enabled"`
// Embedder selects the embedding provider: "auto" (DEFAULT — the
// online openai primary when index.openai.apiKey is set, with the
// local model as fallback, both the SAME model; local only when no
// key is configured), "local" (in-process llama.cpp only), "ollama",
// "openai" (any OpenAI-compatible /embeddings API), or "none"
// (FTS-only). Empty resolves to the default.
Embedder string `yaml:"embedder"`
// EmbedBatch / EmbedConcurrency tune the embed loop. EmbedBatch is
// docs per EmbedDocs call (0 = default 64). EmbedConcurrency is how
// many batches embed in parallel (0 = default: 1 for local, a few for
// online openai/auto — parallel requests are the online throughput
// win; the local child serves one frame at a time so concurrency is
// safe but pointless). See docs/13-index.md.
EmbedBatch int `yaml:"embedBatch"`
EmbedConcurrency int `yaml:"embedConcurrency"`
Ollama IndexOllama `yaml:"ollama"`
OpenAI IndexOpenAI `yaml:"openai"`
Local IndexLocal `yaml:"local"`
Vector IndexVector `yaml:"vector"`
Search IndexSearch `yaml:"search"`
}
Index configures the local search indexer (FTS + vector, see docs/13-index.md). FTS needs no external dependency; the vector side activates only when an embedder is configured.
type IndexLocal ¶
type IndexLocal struct {
// ModelPath points at an existing GGUF file; when set, no download
// is attempted (air-gapped operation).
ModelPath string `yaml:"modelPath"`
// ModelUrl overrides the download source for the default model path.
ModelUrl string `yaml:"modelUrl"`
// ModelSha256 is the expected checksum of the downloaded model.
// Empty with a custom ModelUrl skips verification (logged once).
ModelSha256 string `yaml:"modelSha256"`
// LibDir holds the llama.cpp shared libraries; default is the
// `llamacpp` directory next to the executable.
LibDir string `yaml:"libDir"`
// ContextSize bounds embedding input in tokens — longer texts are
// truncated (docs/13-index.md § Known limits). Default 2048.
ContextSize int `yaml:"contextSize"`
// QueryPrefix is prepended to query (not document) texts. Empty
// means: the default model's retrieval instruction for the default
// model, nothing for a custom ModelPath/ModelUrl.
QueryPrefix string `yaml:"queryPrefix"`
// Dim truncates output vectors (Matryoshka) and renormalizes;
// 0 keeps the model's full dimension (1024 for the default model).
Dim int `yaml:"dim"`
// Threads sets the llama.cpp compute thread count (NThreads /
// NThreadsBatch) — the CPU budget the embedder child decodes with.
// 0 = default to runtime.NumCPU()-1 (leave one core free). Going
// beyond the physical core count can regress on hyperthreaded CPUs;
// lowering it is how you keep background indexing off the user's
// cores. Changeable at runtime (Indexer.SetEmbedThreads) — it takes
// effect on the child's next spawn.
Threads int `yaml:"threads"`
// Niceness lowers the embedder child's scheduling priority so a
// re-index yields to interactive work: 0..19 on Unix (nice), a
// below-normal/idle priority class on Windows. Absent = 10; 0 keeps
// the server's own priority. Raising priority is not supported.
Niceness *int `yaml:"niceness"`
// RequestTimeout bounds one frame to the child process — one decode
// group of up to BatchDocs texts (Go duration string). Default 3m.
// It exists to unwedge a hung GPU: a lost device stops answering
// rather than failing, so without a bound the embed loop blocks
// forever. Generous by design — it polices a wedge, not slow
// hardware.
RequestTimeout string `yaml:"requestTimeout"`
// GpuLayers overrides llama.cpp's n_gpu_layers. Absent keeps the
// llama.cpp default: offload every layer when a usable GPU backend
// is present, CPU otherwise. 0 forces CPU-only inference even with
// GPU libs installed — the opt-out for machines where the embedder
// shouldn't take VRAM (docs/13-index.md § GPU offload).
GpuLayers *int `yaml:"gpuLayers"`
// BatchDocs caps how many documents pack into one llama_decode as
// parallel sequences. The unified KV cache partitions ContextSize
// across them, so N caps each text at ContextSize/N tokens — a wider
// batch trades input length for a per-decode saving that measures as
// nothing on a realistic record mix (docs/13-index.md). 0 = default
// 1 (one doc per decode, the whole ContextSize available to it).
BatchDocs int `yaml:"batchDocs"`
}
IndexLocal configures the built-in llama.cpp embedder. All fields are optional — `embedder: local` alone is the supported zero-config path: Qwen3-Embedding-0.6B Q8_0 is downloaded into <data-dir>/index/models on first run, llama.cpp shared libs are expected next to the binary (`make llamacpp`).
type IndexOllama ¶
type IndexOllama struct {
Url string `yaml:"url"` // default http://localhost:11434
Model string `yaml:"model"` // default embeddinggemma
}
type IndexOpenAI ¶
type IndexSearch ¶
type IndexSearch struct {
// FtsWeight / VectorWeight scale each leg's reciprocal-rank-fusion
// contribution in hybrid mode. Default 1 each (plain RRF). Lowering
// VectorWeight trusts the lexical leg more — useful while the dense
// leg is noisy (short chunks, weak embedder).
FtsWeight float64 `yaml:"ftsWeight"`
VectorWeight float64 `yaml:"vectorWeight"`
// AdaptiveWeights down-weights the FTS leg per query by its score
// concentration — so a weak lexical leg (e.g. paraphrastic queries
// where BM25 is flat) can't drag hybrid below the dense leg. Off by
// default. docs/search/README.md § per-corpus leg weighting.
AdaptiveWeights bool `yaml:"adaptiveWeights"`
// DefaultOperator controls how bare FTS terms combine: "or" (default,
// any term) or "and" (all terms — higher precision, lower recall).
DefaultOperator string `yaml:"defaultOperator"`
// MinVectorSim drops vector hits below this cosine similarity before
// fusion. Default 0 keeps the legacy floor (similarity must be > 0).
// NOTE: measured against the default local model (Qwen3-Embedding-0.6B)
// a static floor is a poor noise filter — gibberish queries score
// ~0.6 cosine, on par with on-topic, so any cutoff that drops noise
// also drops real hits (internal/indexer/live_probe_test.go). Leave
// at 0 for that model; raise only for a better-calibrated embedder.
MinVectorSim float64 `yaml:"minVectorSim"`
// StopWords toggles query-side stop-word stripping for the FTS leg
// only (the vector leg always sees the full query). nil/absent = on
// (a precision win on a bag-of-words OR engine); set false to keep
// the raw query.
StopWords *bool `yaml:"stopWords"`
// Bm25B / Bm25K1 tune the FTS index's BM25 (any-store FulltextParams).
// 0 = the engine default (b=0.75, k1=1.2). Lower b reduces the bias
// toward short docs (e.g. 0.4 for mixed-length notes). Set at index
// creation — changing them needs a rebuild.
Bm25B float64 `yaml:"bm25B"`
Bm25K1 float64 `yaml:"bm25K1"`
// TitleWeight is the BM25F boost for the per-doc `title` field over
// `body` (editor heading / program method signature / memory context).
// 0 = no boost AND no title field in the index: the field set is
// decided when the index is created, so going 0 → non-zero needs a
// rebuild (remove <data-dir>/index). Changing between non-zero values
// is read at query time and takes effect immediately.
TitleWeight float64 `yaml:"titleWeight"`
// QueryEmbedTimeout bounds the query embedding of one /search (Go
// duration string). Past it hybrid answers lexical-only
// (vectorStatus=unavailable) and mode=vector fails as
// index.embedder_unavailable, so a cold model load, a wedged child or
// a slow remote API degrades a search instead of holding it. Default
// 5s; raise it for a remote embedder that is legitimately slower.
QueryEmbedTimeout string `yaml:"queryEmbedTimeout"`
}
IndexSearch tunes hybrid search ranking (chunker-hybrid-search-report § 5). All zero values pick safe defaults that reproduce pre-tuning behavior, so an absent `index.search` block changes nothing.
type IndexVector ¶
type IndexVector struct {
// Dim is the embedding dimension; 0 = learn it from the first
// successful embed batch.
Dim int `yaml:"dim"`
// Mode selects the ANN index strategy: "" / "ivfsq" (default —
// cheap near-flat ingest + physical deletes, ~3–4 recall@10 below
// exact), "btree" / "hnsw" (recall ≈ exact but serial super-linear
// ingest + tombstone-rebuild deletes), "hybrid" (HNSW + RAM cache),
// or "bruteforce" (exact, O(N) per query). docs/search/README.md
// § index mode.
Mode string `yaml:"mode"`
}
type Local ¶
type Local struct {
// Enabled gates the /v1/local routes. Default true. When false the
// routes answer 409 local.disabled and no collection is created;
// the file is the SDK's and stays open, so existing local
// collections sit untouched on disk.
Enabled bool `yaml:"enabled"`
}
Local configures the local store — device-local, non-CRDT any-store collections in the SDK's sdk.db under the "l_" tag, served at /v1/local
type P2P ¶
type P2P struct {
// Enabled is the LAN layer's opt-out: absent/null = on. An explicit
// false also suppresses Global's PACKAGED default (see
// GlobalP2P.isEnabled), so turning peer-to-peer off with one line
// stays one line; relays named by hand are kept.
Enabled *bool `yaml:"enabled"`
// Port fixes the QUIC listen port. 0 (default) = reuse the port
// persisted from the previous run, or pick an ephemeral one.
Port int `yaml:"port"`
// ServiceName overrides the mDNS service type (default "_any._tcp").
// Set it to isolate a deployment onto its own discovery namespace.
ServiceName string `yaml:"serviceName"`
// LocalDiscovery switches mDNS announce and browse alone; the QUIC
// listener stays up. Absent/null resolves per platform and mode
// (LocalDiscoveryEnabled): off for a managed server on macOS, on
// everywhere else. Flipped at runtime through PUT /v1/local-discovery.
LocalDiscovery *bool `yaml:"localDiscovery"`
// Global is the internet-wide layer, independent of the LAN one.
Global GlobalP2P `yaml:"global"`
}
P2P controls the two direct layers — local-network discovery and sync (mDNS + QUIC between devices on the same LAN), and the internet-wide one under Global. Both enabled by default; spaces shared with a discovered peer sync directly, including while sync nodes are unreachable. Surfaced in `any sync-status` (p2p / localPeers / globalPeers) and `any debug p2p`.
func (P2P) GlobalEnabled ¶ added in v0.2.3
GlobalEnabled resolves whether the internet-wide layer runs, given this P2P block as a whole. See GlobalP2P.isEnabled.
type Push ¶
type Push struct {
// Enabled is a tristate: nil (the default) means enabled only when
// PeerId is set — configuring a push node is the opt-in. Explicit
// false disables push even with a PeerId present; explicit true
// without peer info still cannot run (Active() stays false).
Enabled *bool `yaml:"enabled"`
// PeerId is the push node's peer id (its device key identity).
PeerId string `yaml:"peerId"`
// Addrs are the node's dial addresses (same forms the nodeconf
// uses, e.g. "quic://host:port" or "host:port").
Addrs []string `yaml:"addrs"`
}
Push configures the push-notification node (SYN-47). The node is a direct out-of-band peer — {peerId, addrs} from config, not from the nodeconf — that fans mobile push notifications out to the account's registered device tokens by topic. Threaded into the SDK's config.Push at OpenSDK; when inactive the SDK's PushAPI returns ErrPushNotConfigured and the /v1/push endpoints return 409 push.disabled.
type WebUI ¶
type WebUI struct {
Enabled bool `yaml:"enabled"`
}
WebUI gates the embedded /ui debug harness (internal/server/web.go). Enabled by default so standalone `any run` is unchanged; app-embedded boots force it off (embedded.Start), so an in-process boot is headless — no /ui routes, no "web ui" advertising log line. The yaml key path `webUI.enabled` is a cross-repo contract: the any-swift subprocess host writes exactly this key into its config.yaml (IOS-116).