Status: Superseded by supervisor-managed ABCL Date: 2026-10-29 Related: ABDL bot Veratown adapter proposal, Bot runtime architecture, Helper Bots, Railway helper deployment guide
The original separate-runtime proposal is retained as decision history. The implemented deployment uses the supervisor for ABCL coordination and a separate ABCL-capable helper for observation and assigned work; see the current ABCL feature guide.
Port the approved abdl-bot behavior into a Veratown-native feature and run it
as a separate Veratown service with a dedicated BC account. The new runtime
role uses Veratown’s existing BcClient, BC protocol types, action journal,
location model, and lifecycle; it does not embed bc-bot, create a proxy
facade, or add a second socket to the supervisor process.
The existing supervisor remains deployed and unchanged at runtime. ABCL is disabled by default, starts only in its dedicated runtime role, and may act only for eligible, consenting participants while the target’s current server-observed position is inside the configured region.
This is a behavior port, not a byte-for-byte import. The upstream project can
remain untouched, but reproducing or adapting its code still requires
appropriate permission. The inspected upstream tree at commit
7cd49dd1bae8d5537e9bdd3a5ff6cf869ec1045c
did not contain a LICENSE file. Confirm a compatible license or written
permission before copying/adapting source. Without permission, implement from
independently authored behavior requirements.
src/index.ts, API_Connector, or bc-bot package.Add a statically composed ABCL runtime mode to the existing Veratown application:
Veratown Supervisor service ABCL service
dedicated BC account dedicated BC account
one BcClient + local send queue one BcClient + local send queue
existing supervisor plug-ins ABCL-only plug-in set
existing runtime database target same fixed target mapping
\ /
+---- shared BC room --------+
|
target characters/map positions
|
room-scoped ABCL configuration
The ABCL service is a separate process and Railway service, built from the
Veratown repository. It uses one Veratown BcClient, one ActionCoordinator,
and the normal database isolation rules. It does not import or instantiate the
supervisor runtime. Each process owns its own socket and rate limiter; no
process owns a second connection.
Introduce an explicit validated runtime role, preferably a discriminated
configuration value such as RUNTIME_ROLE=supervisor|helper|abcl, instead of
inferring the role from multiple unrelated booleans. The existing supervisor
remains the default. The ABCL role statically composes the required shared
infrastructure and only the ABCL plug-in; it does not start commands, games,
helper task management, or supervisor feature handlers unless separately
approved. Update config.ts, PrototypeConfig, .env.example, setup docs,
startup diagnostics, heartbeat/runtime identity, and tests together.
The ABCL runtime receives its own dedicated BC credentials and a stable
ABCL_AGENT_ID. It must use the same RUNTIME_TARGET, fixed database mapping,
BC_ROOM, and room/location configuration as the supervisor. Store no
credentials in MongoDB. ABCL-specific state, if needed, belongs in a dedicated,
validated collection in the already selected runtime database; it must not use
the legacy source database.
Create src/features/abcl/ as a Veratown feature with:
AbclFeaturePlugin and a narrowly scoped service.Do not expose a generic sendPacket or mutable BC character object to feature
logic. Reuse existing Veratown communication and appearance services where
their semantics fit. Add an adapter-level dedicated action only for a
protocol operation that is supported by the pinned BC types and cannot be
expressed by an existing typed action. Do not nest BcApiPlane.dispatch() in
an already-journaled action.
The behavior port is explicitly reviewed for scope. Upstream room-wide triggers, automatic target selection, appearance mutations, and mod-specific Hidden messages are not enabled merely because they exist upstream. Each is implemented only after its protocol contract, consent policy, target rules, and observability are defined.
The ABCL configuration identifies one enabled region by stable location key. Before every action—including work initiated by chat, Hidden messages, timers, or retries—the service must validate:
Location entry/exit events help start or cancel work, but do not alone authorize an action: the participant may have left before a timer fires. On exit, disconnect, stale observations, configuration changes, or plug-in stop, cancel pending work and do not dispatch. Unknown consent, stale position, malformed state, and unavailable BC evidence all fail closed.
The separate service isolates socket queues and process failures, but it does not isolate the shared BC room or serialize mutations against the supervisor. The current action coordinator’s in-process sequencing is not a cross-process lock. Before enabling ABCL mutations to another character, the design must provide one of these reviewed protections:
Do not treat the journal as a lock. If cross-process conflict protection is not implemented, keep potentially conflicting appearance mutations disabled.
The port should record the source and behavior lineage without creating a runtime dependency:
src/features/abcl/UPSTREAM.md with repository URL, exact upstream
commit, reviewed date, permission/license reference, and a mapping from
upstream behavior modules to Veratown modules/tests.main implicitly.If periodic updates become frequent, a read-only comparison script may report the upstream commit range and changed paths. It must not import code or create a change automatically. Every behavior update remains a normal reviewed implementation with adapter, tests, and docs updated together.
Configuration is room-scoped and disabled by default. It should include:
enabled and an explicit schema version.The RUNTIME_ROLE=abcl service uses the same fixed production or test database
selection as other Veratown runtimes. Deploy and qualify against
veratown_prototype_test first with dedicated non-production BC accounts.
Production uses a separate ABCL BC account and service; never use the
supervisor’s credentials. The ordinary supervisor remains on its current role
and deployment.
The operator must see separate heartbeat/runtime identity for the ABCL instance, including its role, room, runtime target, enabled state, and freshness. Secrets and sensitive mod/chat content must not appear in logs, heartbeats, or action metadata. An ABCL deployment must have an explicit disable/rollback procedure that stops its feature before closing its BC client.
RUNTIME_TARGET=test
and a dedicated test account.Production activation is a separate operator decision after the test report, policy, data retention, and rollback procedures have been reviewed. The feature remains disabled by default in production configuration.
BcClient/send queue within that process.| Risk | Mitigation |
|---|---|
| Independent service mutates state concurrently with supervisor | Require shared target mutation serialization or keep conflicting actions disabled |
| Region event becomes stale before delayed work executes | Revalidate current BC-observed position immediately before dispatch |
| ABCL behavior acts on non-consenting room members | Explicit opt-in and fail-closed eligibility on every action path |
| New role increases operator configuration mistakes | Validated enum, mutually exclusive composition, fixed DB mapping, startup diagnostics, and role-specific docs |
| Upstream behavior drifts from the port | Pin commits, maintain a behavior mapping, and review updates manually |
| Source adaptation is not licensed | Confirm permission before copying/adapting; otherwise implement independently |
| ABCL work destabilizes the existing supervisor | Separate process, account, send queue, deployment, disabled-by-default config, and staged rollout |
BcClient.BcClient.bc-bot dependency, raw socket access, arbitrary packet proxy, or
unjournaled state mutation is introduced.