kappa bump <file> <version> — updates .kap file to new version.
Downloads tarball, computes sha256, rewrites file with new
version and hash. Preserves source URL with ${version} template.
kappa bump-all <dir> — scans directory of .kap files. For each,
auto-detects newer patch versions by incrementing the version
number and trying up to 15 candidates. Downloads and hashes the
first one that exists.
Resolver now pulls in transitive dependencies automatically.
Declaring 'packages { root {} }' where root→mid→leaf resolves
all three packages in correct topological order. Previously
every package had to be listed explicitly in the config.
build_registry pre-populates from $KAPPA_ROOT/cache/packages/
so transitive deps can be found without remote fetching.
Compares installed packages against cached indexes to find newer
versions. kappa upgrade shows available upgrades and updates the
system config with new version constraints. --dry-run shows what
would change without applying.
Searches all cached indexes in $KAPPA_ROOT/cache/indexes/
for packages matching the query as a substring. Displays
name, version, and repo source (e.g. 'make 4.4.1 @ kappa-os/stable').
Offline — no network requests.
kappa add nginx --features "ssl=on,gzip=off" --config "port=8080"
adds/updates feature flags and config values in the system config.
Comma-separated key=value pairs. Idempotent — only prints 'updated'
when something actually changed.
Conflicts were detected in the resolver but silently ignored in both
the resolve and rebuild subcommands. Both now print conflict errors
and abort before any builds start.
- kappa add <pkg> [version] — adds/updates package in system config
packages{} block; creates config if it doesn't exist
- kappa remove <pkg> — removes package from config; idempotent
(no error if package isn't present)
- Supports --root flag for custom KAPPA_ROOT
- User workflow: kappa add make && kappa rebuild
No manual config editing needed.
- fetch_recipe_from_repos() iterates repos by priority, channels, with
mirror fallback — caches indexes at /cache/indexes/
- Conditional HTTP downloads (curl -z) to only re-fetch stale indexes
- build_registry and fetch-package prefer repos { } over remotes = [...]
when both are present
- Fallback chain: local .kap → repos (index-aware) → remotes (legacy)
- Add repos { } block to system config with named repos, channels,
mirrors, and priority
- Add index "name" { } file format for package indexes
- Add kappa index <dir> subcommand that scans .kap files and
generates index.kap
- parse_index() and build_index() in DSL module
- format_index() roundtrip support in tools module
- validate and format subcommands handle all three formats
(package, config, index) with automatic detection
- Backward compatible: remotes = [...] still works unchanged
- Replace build stub with full phase execution (prepare/build/check/install)
via /bin/sh with variable interpolation, config file generation, and
env handling (hard-set, soft/?=, append/+=)
- Add += append operator for environment variables across DSL, parser,
system config parser, build backend, and formatter
- Add STYLEGUIDE.md documenting all codebase conventions
- Replace EnvEntry bool soft with EnvMode enum (Set/Soft/Append)
- Add Plus token type to lexer for += parsing
The rebuild subcommand now executes the full pipeline:
- build_registry() -> resolve() -> sched::run()
- install::install() for each built package
- service::install_service() for enabled services
- boot::install_bootloader_config() for bootloader config
- system::write_hostname() / write_timezone() for system activation
Added --dry-run flag for report-only behavior (backward compat with
test suite). Added -w flag for worker parallelism and --dry-run to help.
Fixed .gitignore: 'kappa' -> '/kappa' (was matching include/kappa/,
preventing header files from being tracked since initial commit).
This commit also adds all previously-gitignored header files.
- Removed unused <format> include from rebuild.cpp
- Service change detection simplified: any enabled service flags change
(services aren't stored as DB entries, so element-wise compare impossible)
- Version comparison: checks if version/features/config are non-empty
in PackageRef (conservative — rebuilds if any constraint is specified)
- Empty config with unchanged packages correctly reports 'nothing to rebuild'
- build.cpp: save/restore CWD on both success and failure paths
- install.cpp: check error_code after each filesystem op, abort on failure
- install.cpp: check write_installed() return value
- fetch.cpp: EINTR retry loop on both waitpid calls (exec_cmd + exec_capture)
B1: Replaced all std::system()/popen() with fork+execve — zero shell injection
B2+B3: Added sha256/sha512/md5 fields to PackageDef, parser support, actual hash comparison in verify_hash()
B4: tar --no-same-owner --no-same-permissions, zip uses unzip instead of tar
B5: Patch sha256 verified before application via -i flag (no shell redirect)
B6: kappa fetch --help now prints usage and exits 0
Also: removed dead ternary code, added <cstdlib>/<sys/wait.h>/<unistd.h>
Review fixes (8 blocking issues):
- Extract ParseError to shared error.hpp (ODR fix)
- Remove dead package.cpp/package.hpp + tomlplusplus dep
- Safe parse_int() helper replacing crash-prone std::stoi
- consume_string() now accepts bare numbers and idents
- line_at() fixed for post-EOF line numbers
- Subcommand validation before file read in CLI
- KwService/KwAssert/KwImport added to consume_ident()
- root partition promoted to first-class BootBlock field
New features:
- Imports: imports = [...] with recursive merge resolution
- Assertions: assert { "msg" : field op value } in both parsers
- Merge engine: resolve_package() with features/config merge + force support
- Per-package overrides: /kappa/system/builds/<name>.kap
- .gitignore: added vcpkg_installed/ and kappa binary