Releases: aiperceivable/apcore-cli-rust
Releases · aiperceivable/apcore-cli-rust
Release 0.4.0
Added
- Verbose help mode — Built-in apcore options (
--input,--yes,--large-input,--format,--sandbox) are now hidden from--helpoutput by default. Pass--help --verboseto display the full option list including built-in options. - Universal man page generation —
build_program_man_page()generates a complete roff man page covering all registered commands.--help --manoutputs the man page, enabling downstream projects to get man pages for free. - Documentation URL support —
set_docs_url()sets a base URL for online docs. Per-command help showsDocs: {url}/commands/{name}, man page SEE ALSO includesFull documentation at {url}. No default — disabled when not set.
Changed
build_module_command_with_limit()andadd_dispatch_flags()respect the global verbose help flag to control built-in option visibility.--sandboxis now always hidden from help (not yet implemented). Only four built-in options (--input,--yes,--large-input,--format) toggle with--verbose.- Improved built-in option descriptions for clarity.
Release 0.3.0
Added
- Grouped CLI commands (FE-09) —
GroupedModuleGrouporganizes modules into nested subcommand groups by namespace prefix, enablingapcore-cli <group> <command>invocation. - Display overlay helpers —
get_display()andget_cli_display_fields()resolve alias, description, and tags frommetadata["display"]. - Init command (FE-10) —
apcore-cli init module <id>scaffolds new modules with--style(decorator/convention/binding),--dir, and--descriptionoptions. - Grouped shell completions — Bash, Zsh, and Fish completions now support two-level group/command completion via
_APCORE_GRP. - Optional apcore-toolkit integration —
DisplayResolverandRegistryWriterviatoolkitfeature flag with graceful fallback. - Path traversal validation —
--dirrejects paths containing..components.
Changed
BUILTIN_COMMANDSupdated to includeinit(6 items, sorted).APCORE_AUTH_API_KEYadded to man page ENVIRONMENT section.- Dependency bump:
apcore >= 0.14.
Release 0.2.2
Changed
- Rebrand: aiperceivable → aiperceivable
Release 0.2.1
Changed
- Help text truncation limit increased from 200 to 1000 characters (
HELP_TEXT_MAX_LENconstant) cli.help_text_max_lengthconfig key added toConfigResolver::DEFAULTS(default: 1000)logging.leveldefault changed from"INFO"to"WARNING"inConfigResolver::DEFAULTS— aligns with Python/TypeScript SDKs and updated spec
Added
extract_help_with_limit— configurable-limit variant ofextract_help(schema_parser.rs)schema_to_clap_args_with_limit— configurable-limit variant ofschema_to_clap_args(schema_parser.rs)build_module_command_with_limit— acceptshelp_text_max_lengthparameter (cli.rs)HELP_TEXT_MAX_LENconstant exported from crate root (lib.rs)- Test:
test_extract_help_truncates_at_1000 - Test:
test_extract_help_no_truncation_within_limit - Test:
test_extract_help_custom_max_length - Test:
test_help_truncated_at_1000_chars(integration) - Test:
test_help_within_limit_not_truncated(integration) - 459 tests (up from 458)
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