How fisherk2/tepochcalli-opencode works
Tepochcalli is the Rust vault installer and maintenance CLI; the README also describes the RAG system installed into the vault, not implemented by this crate. The main workflow selects a vault, checks prerequisites, obtains and verifies a payload, runs installation phases, configures the embedder and OpenCode MCP entry, and supports resume, rollback, and update. The graph keeps those phases distinct. Several links are supported only by the source index or README; unsampled subsystem internals and the payload’s RAG runtime are not inferred.
Main entry points: commands.rs Command dispatch · embedder_menu.rs Embedder selection · swap.rs Atomic model swap · install_phases.rs Phase runner
Components 28
CLI entry
- Program entry
crates/tepochcalli/src/main.rs - Command dispatch
crates/tepochcalli/src/cli/commands.rs - CLI flags
crates/tepochcalli/src/cli/flags.rs - Help and usage
crates/tepochcalli/src/cli/usage.rs - CLI reports
crates/tepochcalli/src/cli/report.rs
Install workflow
- Install command
crates/tepochcalli/src/cli/install.rs - Phase runner
crates/tepochcalli/src/cli/install_phases.rs - Payload and bootstrap
crates/tepochcalli/src/application/installer.rs - Maintenance flows
crates/tepochcalli/src/application/maintenance.rs - Resume handling
crates/tepochcalli/src/application/resume.rs - Rollback handling
crates/tepochcalli/src/application/rollback.rs - Update flow
crates/tepochcalli/src/application/update.rs
Embedder setup
- Embedder install phase
crates/tepochcalli/src/application/phase7.rs - MCP configuration
crates/tepochcalli/src/application/phase8.rs - Embedder selection
crates/tepochcalli/src/application/embedder_menu.rs - Model test gate
crates/tepochcalli/src/application/embedder_gate.rs - Model estimation
crates/tepochcalli/src/application/embedder_estimate.rs - Atomic model swap
crates/tepochcalli/src/application/swap.rs
Domain contracts
- Failure reporting
crates/tepochcalli/src/application/failure.rs - Artifact parsing
crates/tepochcalli/src/application/text.rs - Installer domain
crates/tepochcalli/src/domain/mod.rs
I/O boundaries
- Runtime ports
crates/tepochcalli/src/ports/mod.rs - Payload adapter
crates/tepochcalli/src/adapters/payload.rs - Archive adapter
crates/tepochcalli/src/adapters/archive.rs - Network fetch
crates/tepochcalli/src/adapters/fetch.rs - Terminal UI
crates/tepochcalli/src/adapters/ui.rs - HTTP adapter
crates/tepochcalli/src/adapters/http.rs
Other components
- Vault operator
Connections 32
- Vault operator → Program entry: runs CLI
README.md - Program entry → Command dispatch: dispatches to
crates/tepochcalli/src/main.rs - Command dispatch → CLI flags: parses options
crates/tepochcalli/src/cli/commands.rs - Command dispatch → Install command: routes install
crates/tepochcalli/src/cli/commands.rs - Command dispatch → CLI reports: uses reports
crates/tepochcalli/src/cli/commands.rs - Command dispatch → Help and usage: prints usage
crates/tepochcalli/src/cli/commands.rs - Install command → Phase runner: runs phases
crates/tepochcalli/src/cli/install.rs - Phase runner → Payload and bootstrap: executes phases
- Payload and bootstrap → Payload adapter: merges payload
crates/tepochcalli/src/application/installer.rs - Payload adapter → Archive adapter: extracts archive
crates/tepochcalli/src/adapters/payload.rs - Payload adapter → Network fetch: downloads asset
crates/tepochcalli/src/adapters/payload.rs - Install command → Terminal UI: selects UI
crates/tepochcalli/src/cli/install.rs - Payload and bootstrap → Runtime ports: uses ports
crates/tepochcalli/src/application/installer.rs - Phase runner → Resume handling: checks resume
- Phase runner → Rollback handling: rolls back
- Command dispatch → Maintenance flows: routes maintenance
- Maintenance flows → Update flow: supports update
crates/tepochcalli/src/application/maintenance.rs - Embedder install phase → Embedder selection: configures embedder
crates/tepochcalli/src/application/phase7.rs - Embedder selection → Model estimation: estimates model
crates/tepochcalli/src/application/embedder_menu.rs - Embedder selection → Model test gate: tests model
crates/tepochcalli/src/application/embedder_menu.rs - Embedder selection → Runtime ports: uses ports
crates/tepochcalli/src/application/embedder_menu.rs - MCP configuration → Runtime ports: uses command port
crates/tepochcalli/src/application/phase8.rs - Atomic model swap → Embedder selection: reuses selection
crates/tepochcalli/src/application/swap.rs - Atomic model swap → Model test gate: runs test gate
crates/tepochcalli/src/application/swap.rs - Atomic model swap → Model estimation: estimates swap
crates/tepochcalli/src/application/swap.rs - Atomic model swap → Rollback handling: supports rollback
crates/tepochcalli/src/application/swap.rs - Failure reporting → Installer domain: formats domain errors
- Artifact parsing → Failure reporting: supports reporting
crates/tepochcalli/src/application/text.rs - Payload and bootstrap → Installer domain: uses domain
crates/tepochcalli/src/application/installer.rs - HTTP adapter → Network fetch: backs downloads
crates/tepochcalli/src/adapters/http.rs - Vault operator → Update flow: requests update
README.md - Vault operator → Rollback handling: cancels install
README.md