Repository navigation
Architecture Data State and Trust
Prev: Execution Flow | Up: Architecture | Next: Home
This page explains the persistent data ReqPack keeps, how trust is enforced, and where state lives.
config.luaremote.lua
Human-managed baseline behavior.
- registry DB under
registry.databasePath - optional
registry.lua - Git-backed registry cache under XDG data
repos
This state defines known plugins, aliases, hashes, trust metadata, and source mapping.
registry.pluginDirectory/<plugin>/...
This is where refreshed plugin bundles end up before loading, typically with metadata.json, reqpack.lua, run.lua, and scripts/.
- transaction DB under
execution.transactionDatabasePath
Used for mutating-run recovery and commit tracking.
- history JSONL and installed-state data under
history.historyPath
Used for snapshots and ownership tracking.
rqp.statePath/<name>/<identity>/...
Used only by the built-in native package manager.
- OSV DB under
security.osvDatabasePath - cache and index under
security.cachePathandsecurity.indexPath
Used for vulnerability sync and lookups.
Registry records can carry metadata about what a plugin is allowed or expected to do.
Important fields:
rolecapabilitiesecosystemScopeswriteScopesnetworkScopesprivilegeLevelscriptSha256bootstrapSha256
When security.requireThinLayer = true, ReqPack checks more aggressively that:
- the registry record passes thin-layer trust rules,
- the runtime plugin metadata matches the trust record,
- script and bootstrap hashes match expectations.
This is how ReqPack prevents registry metadata and runtime behavior from drifting apart silently.
Runtime exec policy note:
- plugin load-time trust checks use
security.requireThinLayer - command-time exec/write denial only happens when both
security.requireThinLayer = trueandexecution.checkVirtualFileSystemWrite = true
ReqPack resolves plugin names through:
- registry aliases,
- planner
systemAliases, - normalized lowercase names.
That means naming compatibility can be handled without duplicating plugin implementations.
Each installed native package stores:
- original package metadata,
- original
reqpack.lua, - source information in
source.json, - tracked artifact manifest in
manifest.json, - copied scripts in
scripts/.
This is what makes remove safe and deterministic for rqp packages.
ReqPack audit is driven by:
- planned package graph,
- ecosystem mapping,
- resolved package versions,
- local vulnerability database state,
- security policy thresholds.
Weak spots to be aware of:
- missing ecosystem mapping lowers fidelity,
- unresolved versions lower fidelity,
- stale or unavailable OSV feed can block strict policies.
Per-ecosystem repository definitions are loaded from config.repositories and passed to plugins via context.repositories.
This lets plugins like Maven or internal wrappers consume:
- custom repo URLs,
- auth config,
- validation policy,
- include/exclude scope,
- ecosystem-specific extra fields.
snapshot exports from ReqPack's installed-state history, not from arbitrary machine state.
If snapshot output is empty or incomplete, check:
history.enabledhistory.trackInstalled- whether the packages were originally installed through ReqPack-managed flows
ReqPack keeps at most one active mutating run in transaction DB.
Run states currently used:
openrecoveredfailedcommitted
Item statuses currently used:
plannedrunningsuccessfailedcommitted
Recovery flow:
- executor checks for active run before starting new one
- items already marked
success,failed, orcommittedare skipped - remaining items are reconciled against current desired state through plugin
getMissingPackages()where supported - items already at desired state are promoted to
success - remaining items are replayed
Commit flow:
- if every item reaches success, run becomes
committed - committed item statuses are rewritten to
committed - if configured, committed run is then deleted from DB
- any incomplete or failed item leaves run in
failedstate
- Keep registry hashes populated.
- Keep plugin trust metadata aligned with actual behavior.
- Keep
history.trackInstalled = trueif you rely on snapshot and restore. - Use a separate OSV database path during test runs.
- Treat overlay registries as controlled overrides, not as a long-term substitute for upstream registry hygiene.
- User Guide
- Getting Started
- Command Reference
- Configuration
- Configuration Reference
- Security, Audit, and SBOM
- Output and Report Formats
- Remote Mode
- Remote Protocol Reference
- Using Native
rqpPackages - Troubleshooting