pub struct PlanCtx {
pub cwd: PathBuf,
pub passthrough: Vec<String>,
pub tags: Enrichment,
pub ledger_home: Option<PathBuf>,
pub spawn_start_ts: SystemTime,
}Expand description
Driver-side context handed to every adapter call. Mirrors the TS
HarnessRunContext shape one-to-one (cwd, passthrough, tags,
spawnStartTs) plus the Rust port’s typed ledger-home override.
tags is a BTreeMap<String, String> (re-exported from the SDK as
Enrichment) so insertion order doesn’t matter for the on-disk
stamp record — the pending-stamp serializer canonicalizes ordering.
Fields§
§cwd: PathBufWorking directory for the spawned harness so it picks up project-local config.
passthrough: Vec<String>Argv tail the launcher wants to pass through. Adapters splice
this into their generated argv via SpawnPlan::args.
User-supplied enrichment that will be merged onto the resulting
stamp. Keys are free-form (task, pr, …).
ledger_home: Option<PathBuf>Optional ledger home selected by --ledger-path. Pending-stamp
adapters use this for both manifest writes and ingest passes so
read/write sidecars stay scoped to the same home without relying
solely on process env mutation.
spawn_start_ts: SystemTimeWall-clock timestamp captured by the driver immediately before
before_spawn. Used by the pending-stamp manifest so the
post-exit resolver can match against session-file mtimes.