OpenCode-style TUI, model probing, sandboxed auto approval
- TUI: centered home screen with logo, boxed input with mode line, sidebar (>=120 cols), Ctrl+P palette, Tab Build/Plan, Shift+Tab approval cycle, mouse (cards, cursor, pickers, wheel), /sidebar /mouse /approval - /models probing: key check on entry (401 re-asks), API models in /model - Shell sandbox in C: Linux Landlock (writes limited to workspace/tmp, ABI>=4 blocks TCP), macOS sandbox_init, rules fallback elsewhere - Approval modes ask/auto/yolo (default auto); read-only command whitelist; ask to rerun outside the sandbox when a command looks blocked - Upgradable bootstrap scripts (git pull --ff-only, rebuild, reinstall) and cst-agent-update; cst-agent --version - tests: test_sandbox, test_models
This commit is contained in:
@@ -57,6 +57,16 @@ int os_run_capture(const char *cwd, const char *const argv[], size_t max_out,
|
||||
int os_run_shell_c(const char *cwd, const char *cmd, size_t max_out,
|
||||
os_run_result_t *r);
|
||||
|
||||
/* Same, with child_hook(ud) run in the child just before exec (Unix only;
|
||||
* ignored on Windows). A non-zero return aborts the child with exit 126. */
|
||||
typedef int (*os_child_hook_fn)(void *ud);
|
||||
int os_run_capture_ex(const char *cwd, const char *const argv[],
|
||||
size_t max_out, os_run_result_t *r,
|
||||
os_child_hook_fn child_hook, void *ud);
|
||||
int os_run_shell_ex(const char *cwd, const char *cmd, size_t max_out,
|
||||
os_run_result_t *r, os_child_hook_fn child_hook,
|
||||
void *ud);
|
||||
|
||||
/* Child processes get stdin=/dev/null, their own process group, and are
|
||||
* killed after the timeout (CST_SHELL_TIMEOUT seconds, default 120) or when
|
||||
* *flag becomes non-zero. Exit code 124 = timeout, 130 = cancelled. */
|
||||
|
||||
Reference in New Issue
Block a user