Extensions: skills, plugins, MCP, sub-agents; configurable keys
ci / linux (clang) (push) Canceled after 0s
ci / linux (gcc) (push) Canceled after 0s
ci / sanitizers (push) Canceled after 0s
ci / musl (push) Canceled after 0s
ci / macos (push) Canceled after 0s

- Skills (SKILL.md discovery, skill tool, /skills /skill)
- plugin.json exec tools with permission prompts, timeouts and workspace trust (/plugins)
- MCP stdio client: JSON-RPC initialize/tools/list/tools/call, mcp__server__tool, /mcp and sidebar status
- task tool with general/explore/plan and .agent/agents/*.md roles, parallel read-only runs, cancel propagation, /agents
- Keymap with Ctrl+X leader, keybinds.json overrides and /keys panel
- Collapsed thinking, throttled streaming Markdown, leaner tool output, parallel read-only tools
- Spawn: close-on-exec pipes and a process-wide fork lock
- Tests for keymap, skills, plugins, MCP, sub-agents, shell compaction; docs/plugins.md
This commit is contained in:
WHC
2026-10-05 14:55:31 +08:00
parent c81df42f0b
commit 7d3ec9fcb9
38 changed files with 8356 additions and 399 deletions
+31 -1
View File
@@ -71,7 +71,37 @@ int os_run_shell_ex(const char *cwd, const char *cmd, size_t max_out,
* killed after the timeout (CST_SHELL_TIMEOUT seconds, default 120) or when
* *flag becomes non-zero. Exit code 124 = timeout, 130 = cancelled. */
void os_set_cancel_flag(volatile int *flag);
void os_set_run_timeout(int seconds);
volatile int *os_get_cancel_flag(void);
void os_set_run_timeout(int seconds); /* this thread; 0 = default */
int os_get_run_timeout(void);
/* Long-lived child with pipes on stdin/stdout (MCP servers). stderr goes
* to stderr_path (NULL = discarded). env_add: "KEY=VALUE" entries added to
* the inherited environment (NULL-terminated, may be NULL). */
typedef struct {
#ifdef _WIN32
void *proc, *in_w, *out_r;
#else
int pid, in_fd, out_fd;
#endif
} os_proc_t;
int os_proc_spawn(const char *cwd, const char *const argv[],
const char *const env_add[], const char *stderr_path,
os_proc_t *p);
int os_proc_write(os_proc_t *p, const char *data, size_t n); /* 0 / -1 */
/* Bytes read, 0 at EOF, -1 on error, -2 when nothing came within
* timeout_ms. */
long os_proc_read(os_proc_t *p, char *buf, size_t n, int timeout_ms);
void os_proc_close_stdin(os_proc_t *p);
/* Close the pipes, end the process (group) and reap it. */
void os_proc_kill(os_proc_t *p);
/* This thread's cancel flag (os_set_cancel_flag) is raised. */
int os_cancel_requested(void);
/* Run fn(args[i]) for every i on its own thread and wait for all of them
* (falls back to running inline when a thread cannot start). */
typedef void (*os_task_fn)(void *arg);
void os_run_parallel(os_task_fn fn, void *const args[], int n);
/* Monotonic milliseconds (arbitrary epoch). */
double os_now_ms(void);