services/ — implementations
Vendor-named adapters. Only main.ts names them; everything else sees an interface.
SQLite family
SqliteStorage (+ migrations 0001–0008)
Owns the database file, its schema migrations, and the transaction context every other store accepts.
SqliteEventLog · SqliteLease · SqliteExecution
Append-only events, lease hierarchy state, execution records — all inside the caller's transaction.
SqlitePlanStore · SqliteBlobStore
Plan documents and large payloads under canonical serialization.
Git family
BinaryGit
Speaks to the git binary through runner · journal · probe · worktree · ref-update · seed · sweep, guarded against outside writers.
Adapters
GraphologyGraph · YamlDocumentReader
Graph algorithms and YAML parsing behind their interfaces.
NodeWriteRevision · DependencyReadiness
Revision checks and dependency readiness evaluation.
UlidIdGenerator · SystemClock
Identity and time, injected so domain stays pure and tests stay deterministic.
AesGcmCrypto · NodeCryptoSecret
Encryption of credential material at rest.
PiAiModelCatalog · ConvictConfig
Model provider catalog and configuration loading.
SqliteHomeLock + StatfsProbe
Exclusive access to a home directory.
Inbound edges
| From | Meaning |
|---|---|
| interfaces | implemented by |
| main.ts | constructs + injects each one once |
Outbound edges
| From | To | Meaning |
|---|---|---|
| SQLite family | home/kanthord.db | all persistent state |
| BinaryGit | git binary | spawns git processes |
| BinaryGit | home/ | worktrees · journal · run/ |
| adapters | config file · master key | reads secret material |
| adapters | model-provider APIs | pi-ai network calls |
Rules
- An implementation imports only its own capability's interface and implementations. Another capability's implementation is out of bounds.
- Vendors live here and nowhere above Layer 7.