Behind jackin❯ — crates

jackin-env

Operator-environment resolution and 1Password (op) CLI integration. Turns declared operator env into resolved values, runs the op CLI for secret lookups, and feeds the resolved env layer into runtime launch.

What this crate owns

  • The operator_env resolution stack (env_layer, env_resolver, resolve) and the op CLI bridge (op_cli, op_runner, op_struct, token_setup).
  • The interactive 1Password secret picker (picker) and host-side Claude env wiring (host_claude).
  • Output/parse helpers and test_support for deterministic env fixtures.

Architecture tier and allowed dependencies

L1 application. Allowed workspace dependencies: jackin-core, jackin-config, jackin-protocol, jackin-diagnostics. Stays below presentation so jackin-launch-tui/jackin-console can consume it.

Structure

ModuleOwnsTests
lib.rscrate root, re-exports
env_resolver.rs · env_resolver/env resolutiontests.rs
env_layer.rs (internal)env layer
resolve.rs · resolve/resolution entrytests.rs
op_cli.rs · op_cli/op CLI bridgetests.rs
op_runner.rsop runner
op_struct.rsop struct types
token_setup.rs · token_setup/op token setuptests.rs
picker.rssecret picker model (pure half in jackin-console-oppicker)
host_claude.rs (internal) · host_claude/host-side Claude env wiringtests.rs
output.rsoutput helpers
parse_helpers.rsparse helpers
test_support.rstest fixtures

Public API

All public items are root re-exports; module paths are not API. Implementation modules are crate-private (mod not pub mod). Consumers import jackin_env::\{…} only.

Root surface groups: env resolution (ResolvedEnv, EnvPrompter, resolve_env*, ResolveEnvError), operator-env resolve (resolve_operator_env*, OperatorEnvError, collect_on_demand_bindings, …), op CLI/runner/struct/picker types, token-setup orchestrator subset, parse_host_ref.

Feature test-support keeps jackin_env::test_support as a public module path.

Typed errors (thiserror): OperatorEnvError, ResolveEnvError.

How to verify

cargo nextest run -p jackin-env
cargo clippy -p jackin-env --all-targets -- -D warnings

On this page