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
+51
View File
@@ -0,0 +1,51 @@
#ifndef CST_PLUGINS_H
#define CST_PLUGINS_H
/*
* Plugins: <config>/plugins/<dir>/plugin.json (always loaded) and
* <ws>/.agent/plugins/<dir>/plugin.json (only for trusted workspaces).
*
* {"name": "jira", "description": "...",
* "tools": [{"name": "jira_search", "description": "...",
* "parameters": {JSON Schema},
* "command": ["python3", "search.py"], (or a shell string)
* "perm": "read|write|shell|net", "timeout": 60}],
* "skills": "skills",
* "mcpServers": {"name": {"command": "...", "args": [], "env": {}}}}
*
* A tool call runs the command in the workspace with the arguments as JSON
* on stdin (CST_PLUGIN_DIR / CST_WORKSPACE in the environment); stdout +
* stderr is the result and the exit status its exit code. Relative argv
* entries that exist in the plugin directory are made absolute.
*/
#include "os_compat.h"
#ifdef __cplusplus
extern "C" {
#endif
#define CST_PLUGINS_MAX 32
typedef struct {
char name[64];
char dir[OS_PATH_MAX];
char source[16]; /* "user" | "workspace" */
char desc[200];
int ntools;
int nmcp;
int nskills_root; /* 1 when it adds a skills directory */
char error[200]; /* load problem, "" when fine */
} cst_plugin_info_t;
/* Load plugins; workspace ones only when ws_trusted. Returns the number of
* plugins loaded; *untrusted (optional) counts skipped workspace plugins. */
int cst_plugins_load(const char *workspace, int ws_trusted, int *untrusted);
void cst_plugins_unload(void);
int cst_plugins_info(cst_plugin_info_t *out, int max);
#ifdef __cplusplus
}
#endif
#endif