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_envresolution stack (env_layer,env_resolver,resolve) and theopCLI 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_supportfor 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
| Module | Owns | Tests |
|---|---|---|
| crate root, re-exports | — |
· | env resolution | |
(internal) | env layer | — |
· | resolution entry | |
· | op CLI bridge | |
| op runner | — |
| op struct types | — |
· | op token setup | |
| secret picker model (pure half in jackin-console-oppicker) | — |
(internal) · | host-side Claude env wiring | |
| output helpers | — |
| parse helpers | — |
| test 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