ab is the deploy/orchestration root. It is not a monorepo.
Each subsystem lives in its own git repository and is checked out into the deploy root at a known path.
The intended user flow is:
- clone
ab - run
scripts/stack.sh up --mode prodfor production-style startup- default install also includes one internal docker demo agent plus seeded backend row
- use
scripts/stack.sh up --mode prod --skip-test-datafor a clean stack
- optionally clone child repos into the expected folders inside
abfor development, test/demo, and local release work - use
scripts/stack.sh up --mode devwhen bind-mount development is needed
- repo:
ab - responsibility:
- deployment orchestration
- compose files
.envhandling- bootstrap and helper scripts
- deployment docs
- clone/update/launch contract for child repos
ab-back- backend server
- DB logic and migrations
- API contracts
ab-front- new canvas/Miro-like frontend
ab-pty- PTY daemon
- Claude hooks
- Codex PTY status heuristics
- published daemon binaries
ab/
.env
.env.example
docker-compose.yml
docker-compose.demo.yml
docker-compose.dev.yml
docker-compose.dev-demo.yml
docker-compose.test.yml
docs/
TOPOLOGY.md
DEPLOY.md
scripts/
bootstrap.sh
build-daemon-artifact.sh
daemon-deploy.ssh
stack.sh
test-up.sh
test-down.sh
ab-back/
ab-front/
ab-pty/
The folder names above are the contract. Compose and helper scripts should assume these exact paths.
The deploy root also owns one absolute workspace mount path, exposed as AB_WORKSPACE_PATH, and any workspace-backed PTY flow depends on that path being visible inside both back and pty.
Each child folder is expected to be its own git repository:
ab/.gitab/ab-back/.gitab/ab-front/.gitab/ab-pty/.git
ab compose/bootstrap should treat those child repos as part of the development and test working layout.
The default production-style startup must not depend on those child repos being present.
The default development startup should include the same internal demo-agent layer unless explicitly disabled with --skip-test-data.
PTY is a first-class subsystem with two supported deployment modes.
- PTY runs on the host as a service, typically
ab-pty.service - backend runs in docker
- frontend runs in docker or a dev container
- backend connects to PTY through
host.docker.internal:8421 - this is the default mode for production-like servers
- PTY runs inside a local runtime container built from the deploy root
- backend and frontend continue to run under docker
- this mode is valid when the machine is already operated mainly through docker
- PTY runtime container still needs the required mounts, permissions, and persisted runtime/auth state
- both modes are supported as normal deployment choices
- operators choose one PTY mode per host
- mixed host-plus-container PTY on the same host should be avoided except during an explicit migration window
- backend integration should stay as uniform as possible across both modes:
- same PTY API
- same env contract
- same persistence expectations
- an optional
nginxedge can sit in front offrontandback - browser traffic then goes through the edge over HTTPS
- browser mTLS is an optional second layer on top of that edge
- the default plain browser entrypoint remains supported unless operators explicitly move traffic to the TLS edge
- an optional TLS edge can also sit in front of a remote host daemon
- backend then talks to the remote PTY endpoint over
https://... - client certificates are the recommended hardening layer when a PTY daemon is exposed beyond a private network
- this keeps the PTY HTTP/WebSocket API shape unchanged while hardening the transport
The deploy root owns two extra runtime layers on top of the base production compose:
docker-compose.demo.yml- default install-time demo agent layer
docker-compose.dev-demo.yml- default developer-mode demo agent layer
docker-compose.test.yml- isolated disposable test stack
scripts/test-up.shscripts/test-down.sh
The test stack is meant for local validation and demos:
- isolated state under
state/test - test
ab-front - test
ab-back - two seeded remote docker PTY agents
This test environment should be treated as a separate runtime from the default stack.
- external naming should converge on
ab - remaining internal runtime naming should be reduced incrementally rather than through a single destructive rename