2.6 KiB
Service Readiness
phase-memory remains local-first, but it now exposes service-readiness
contracts that can be used by an embedded runtime, a lightweight service, or
external adapters.
Service Contracts
phase_memory.service.service_contracts() returns the first service contract
catalog:
profile.plangraph.importgraph.lifecycle.planlifecycle.applygraph.activation.planpackage.compileaudit.queryhealth.check
These contracts describe request fields and response classes. They are not a web framework binding.
Runtime Config
RuntimeConfig captures:
- local store path
- adapter registry
- policy mode
- audit sink mode
- package compiler mode
- semantic index mode
- dry-run default
- trust-zone labels
The default config is local and dependency-light.
RuntimeConfig.from_profile(...) can derive this config from a
Markitect-compatible memory profile. It reads explicit adapter declarations
when present and also understands the first local store aliases used by the
fixtures:
local-graph-store-> file-backed graph storelocal-event-log-> JSONL event logmarkitect-context-package-> local no-op package compiler boundary
resolve_runtime_adapters(config) materializes the local adapter bundle. It
supports:
- in-memory or file-backed graph stores
- in-memory or JSONL event logs
- recording or JSONL audit sinks
- no-op package compiler
- disabled or in-memory semantic index
- in-memory runtime registry
External adapter modes are valid configuration values, but they must be
supplied explicitly by the caller. The local resolver reports
missing_external_adapter instead of silently replacing them.
Health
health_report emits:
- adapter classes
- config
- node counts
- stale memory counts
- pending review counts
- config diagnostics
The schema is phase_memory.health.report.v1.
Adapter Conformance
The service module includes reusable conformance helpers for:
- graph stores
- event logs
- context package compilers
- semantic indexes
- policy gateways
- audit sinks
- runtime registries
External adapters should pass these helpers before being wired into a runtime.
Kontextual Delegation
The first delegation envelope keeps ownership explicit:
phase-memoryowns phase policy, lifecycle planning, and activation planning.kontextual-engineowns durable records, permission-aware retrieval, and long-lived storage.- Boundaries exchange JSON envelopes to avoid circular imports.
Deployment Modes
Supported modes:
- pure library
- CLI over local files
- embedded runtime
- optional service runner
- adapter layer over external stores