Release 0.2.0
Added
Core Features (ported from apcore-cli-python 0.2.0)
- ConfigResolver — 4-tier configuration precedence (CLI flag > env var > YAML file > defaults)
- Core Dispatcher —
validate_module_id,collect_input(STDIN + CLI merge, 10MiB limit),LazyModuleGroup(lazy command cache),build_module_command(schema-to-clap),dispatch_module(full execution pipeline with SIGINT handling) - Schema Parser —
schema_to_clap_argsconverting JSON Schema to clapArginstances, boolean flag pairs (--flag/--no-flag), enum choices withPossibleValuesParser,reconvert_enum_valuesfor type coercion,extract_helpwith 200-char truncation - Ref Resolver —
resolve_refswith$refinlining,allOfmerge,anyOf/oneOfintersection, depth limit (32), circular detection - Output Formatter — TTY-adaptive rendering (
comfy-tablefor terminals, JSON for pipes),format_module_list,format_module_detail,format_exec_result,resolve_format,truncate - Discovery —
listcommand with AND tag filtering,describecommand with exit-44 on not found,RegistryProvidertrait,ApCoreRegistryProvideradapter - Approval Gate — TTY-aware HITL prompts,
--yesandAPCORE_CLI_AUTO_APPROVE=1bypass, 60stokio::select!timeout,NonInteractiveerror for non-TTY, all variants exit 46 - Shell Integration —
completioncommand (bash/zsh/fish/elvish/powershell viaclap_complete),mancommand (roff format with EXIT CODES and ENVIRONMENT sections) - Security —
AuthProvider(env/config/keyring with Bearer header),ConfigEncryptor(AES-256-GCM + PBKDF2, keyring fallback),AuditLogger(JSONL append, salted SHA-256 input hash),Sandbox(tokio subprocess, env whitelist, 300s timeout)
Dispatch & Execution
execsubcommand — first-class clap subcommand for module execution- External subcommand routing —
apcore-cli math.add --a 5routes throughdispatch_module - Schema-derived flags — external subcommands look up module descriptor to build
--a,--betc. frominput_schema FsDiscoverer— recursively scans extensions directory formodule.jsondescriptors- Script-based execution — modules with
run.shnext tomodule.jsonexecute as subprocesses (JSON stdin/stdout protocol) - Path-traversal validation — executable paths canonicalized and verified to stay within extensions root
Examples
- 8 example modules:
math.add,math.multiply,text.upper,text.reverse,text.wordcount,sysutil.info,sysutil.env,sysutil.disk - Each module has
module.json(descriptor) +run.sh(execution script) examples/run_examples.sh— runs all 15 demo scenariosexamples/README.md— module authoring guide
Developer Experience
Makefilewithsetup,build,check(fmt + clippy + tests),cleantargets.bin/local binary directory to avoid PATH conflict with Pythonapcore-cli- Pre-commit hook (fmt, clippy, check-chars)
- 458 tests across 17 test files, 0 failures
cargo clippy --all-targets --all-features -- -D warningsclean
Infrastructure
- 10 exit codes matching the apcore protocol (0, 1, 2, 44, 45, 46, 47, 48, 77, 130)
add_dispatch_flags()shared helper for exec and external subcommand flagstest-supportcargo feature for gating test utilities (MockRegistry,mock_module)- Unified
RegistryProvidertrait (consolidated from separateModuleRegistry+RegistryProvider)
Dependencies
apcore0.13.0clap4 (derive + env + string)tokio1 (rt-multi-thread, macros, time, process, io-util, io-std, signal)serde+serde_json+serde_yaml0.9comfy-table6aes-gcm0.10 +sha20.10 +pbkdf20.12keyring2clap_complete4thiserror1 +anyhow1tracing0.1 +tracing-subscriber0.3reqwest0.12async-trait0.1base640.22,gethostname0.4,chrono0.4,dirs5,tempfile3