Service Layer

September 8, 2026 · View on GitHub

中文 | English

Service Layer

This layer owns reusable concrete implementations that touch local systems or runtime infrastructure: filesystem, git, file watch, terminal, MCP, remote connectivity, process lifecycle, session persistence primitives, MiniApp concrete runtime IO, and similar OS/network capabilities.

Modules

CrateResponsibilityLocal doc
services-coreReusable local service primitives, process-wide TLS provider selection, managed process-tree lifecycle, filesystem helpers, session storage layout/indexing/deletion, metadata store CRUD/index rebuild, metadata construction/counter/index/field mutation/lineage rules, and JSON file IO without product assembly decisionsAGENTS.md
services-integrationsConcrete MCP, git, remote, file-watch, MiniApp runtime, review-platform provider service, product-domain port implementations, and platform-neutral Remote Connect primitivesAGENTS.md
legacy-migration-adaptersOffline legacy-data converters against shared configuration/storage owners, without CoreAGENTS.md
legacy-migrationOffline retired-product discovery, locking, consistent SQLite snapshots, staging, journal recovery, and owner-adapter orchestrationAGENTS.md
miniapp-market-serviceConcrete SQLite, artifact storage, GitHub OAuth, package validation, and HTTP behavior for the MiniApp marketREADME.md
skin-market-serviceConcrete SQLite, artifact storage, Appearance package validation, review, and HTTP behavior for the Skin marketREADME.md
relay-serviceReusable Remote Connect relay state, storage, and HTTP/WebSocket routes shared by standalone and embedded hostsAGENTS.md
page-function-runtimeEmbedded JS Page Function runtime (rquickjs) for OpenBitFun PagesAGENTS.md
terminalPTY, shell integration, and terminal session infrastructureAGENTS.md

Placement Rules

  • Put concrete OS, process-wide TLS provider, process, filesystem, git, terminal, MCP, remote SSH, file-watch, MiniApp runtime IO, and network service implementations here.
  • Implement contracts, execution, or contracts/product-domains ports here when the implementation needs concrete dependencies.
  • Keep protocol/transport projection in adapters, and keep product capability selection in assembly.

Dependency Boundaries

  • Services may depend on contracts and narrowly on provider-neutral execution crates when implementing runtime ports.
  • Services must not depend on assembly/core, interface crates, product UI code, or app command handlers.
  • Service-to-service dependencies must stay narrow; reusable contracts should move to contracts or execution instead of creating broad coupling.