Skip to content

Reference

// Quick Operator Referencelookup

Compact lookup for config keys, CLI flags, common commands, and protocol envelopes — the page to keep open while you run, observe, and document a local session.

ItemRoleNotes
flowlayer-serverOrchestration engineSource of truth for planning, lifecycle, state, and logs.
flowlayer-client-tuiOfficial clientConnects to Session API to observe and control runtime.
flowlayer.jsoncRuntime inputStrict JSONC; unknown fields are rejected.
Session tokenAPI auth credentialRequired for /health and /ws access.
  1. flowlayer.jsonc
  2. flowlayer.json
  3. flowlayer.config.jsonc
  4. flowlayer.config.json
  • Config path: -c or --config override discovery.
  • Session bind: -s overrides session.bind.
  • Session token: -token overrides session.token.
KeyTypePurpose
session.bindstringAddress used by server Session API listener.
session.addrstringAddress used by client config mode.
session.tokenstringBearer token for authenticated API access.
servicesobject mapService definitions keyed by service name.
services.<name>.cmdstring or string[]Process command (array form recommended for exact argv).
services.<name>.dependsOnstring[]Dependency edges used by DAG planning.
services.<name>.readyobjectReadiness gate for downstream unlock.
services.<name>.kinddaemon or oneshotLifecycle behavior profile.
logView.*objectDefault limits for log retrieval responses.
FieldTypeWhat it controlsNotes
cmdstring or string[]Process executionString form is split on whitespace; array form is safest for exact argv.
portintegerDefault service portUsed by TCP readiness when ready.port is omitted.
envobjectService-local environmentMerged with parent environment for both cmd and stopCmd.
readyobjectReadiness gateBlocks downstream dependsOn edges until success.
dependsOnstring[]Dependency edgesProduces deterministic startup waves from the DAG.
kindstringLifecycle shapedaemon for long-running, oneshot for setup jobs.
stopCmdstring or string[]Custom teardownReplaces default signal-based stop behavior.
{
"services": {
"frontend": {
"cmd": "pnpm --dir ./frontend dev"
},
"backend": {
"cmd": ["sh", "-c", "cd backend && pnpm start"]
}
}
}

Use string form for simple commands. Use array form when arguments contain spaces or when you need an explicit shell invocation.

{
"services": {
"postgres": {
"cmd": ["docker", "compose", "up", "postgres"],
"stopCmd": ["docker", "compose", "down", "postgres"],
"ready": { "type": "tcp", "port": 5432 }
},
"migrate": {
"cmd": ["pnpm", "--dir", "./services/users", "run", "db:migrate"],
"kind": "oneshot",
"dependsOn": ["postgres"]
}
}
}
KeyStatus in v2MeaningNotes
tcpSupportedWait for a TCP handshakeUses ready.port or falls back to service port.
httpSupportedPoll a URL until it returns successUse for app-level health endpoints.
intervalFixedProbe cadenceCurrent docs expose a fixed 200ms polling interval.
timeoutNot exposedNo per-probe timeout field documentedTreat slow start as repeated polling until success or process exit.
maxAttemptsNot exposedNo retry cap field documentedCurrent behavior retries until success or process death.
{
"services": {
"api": {
"cmd": ["node", "dist/server.js"],
"port": 3001,
"ready": {
"type": "http",
"url": "http://127.0.0.1:3001/health"
}
},
"redis": {
"cmd": ["docker", "compose", "up", "redis"],
"port": 6379,
"ready": { "type": "tcp", "port": 6379 }
}
}
}
ConcernDefault behaviorCLI overrideEffective rule
Config pathAuto-discovery in current directory-c or --configExplicit flag wins over discovery.
Bind addrsession.bind from config-sCLI bind wins over config bind.
Token precedencesession.token from config or generated token-token-token wins, then config, then auto-generated token.
Terminal window
flowlayer-server -c ./services/flowlayer.jsonc -s 127.0.0.1:7010 -token dev-token
flowlayer-client-tui -config ./services/flowlayer.jsonc
KeyScopeUsed for
logView.maxEntriesGlobal overrideExplicit override when clients request logs without a limit and no more specific override applies.
logView.all.maxEntriesAll-services viewOverride for aggregated log queries.
services.<name>.logView.maxEntriesPer serviceOverride for one service’s default retrieval cap.
logs.bufferSizeRuntime ring configDefault limit when no explicit limit and no applicable logView override are present (default 5000).
effective_limitServer response valueThe actual limit clients should respect in their local buffer.
{
"logView": {
"maxEntries": 500,
"all": { "maxEntries": 800 }
},
"services": {
"billing": {
"cmd": ["pnpm", "--dir", "./services/billing", "run", "start:dev"],
"logView": { "maxEntries": 200 }
}
}
}

The server stays in charge of retention decisions. Clients consume effective_limit instead of inventing their own log policy. Limit precedence is: explicit request.limit > logView override (services.<name> / all / global) > logs.bufferSize default.

EndpointMethodAuthReturns
/healthGETBearer token{"ok": true} when server is live
/wsGET (upgrade)Bearer tokenWebSocket session for protocol V1
{
"type": "<message_type>",
"id": "<correlation_id>",
"name": "<command_or_event_name>",
"payload": {}
}
TypeDirectionMeaning
commandclient -> serverRequest runtime action or data
ackserver -> clientImmediate acceptance/rejection
resultserver -> clientFinal command outcome
eventserver -> clientAsync runtime updates
errorserver -> clientProtocol-level error
  • get_snapshot: full current service state.
  • get_logs: log entries (service-scoped or all-services).
  • start_service: start a named service.
  • stop_service: stop a named service.
  • restart_service: restart a named service.
Terminal window
flowlayer-server -s 127.0.0.1:7010 -c ./services/flowlayer.jsonc
flowlayer-client-tui -addr 127.0.0.1:7010 -token "$FLOWLAYER_SESSION_TOKEN"
flowlayer-client-tui -config ./services/flowlayer.jsonc
  • Token mismatch: verify server boot token vs client flag/config.
  • Wrong address: verify bind/addr consistency and listening port.
  • Stale assumptions: re-read snapshot before issuing control actions.

Useful next reads: How FlowLayer Works, Server, and Troubleshooting.