Documentation
¶
Index ¶
- func EmitHookOutput(out map[string]any)
- func Main(args []string) int
- func RunDoctor(project string) int
- func RunHook(event string, stdin []byte) (out map[string]any)
- func RunInstall(opts InstallOptions) int
- func RunReport(stdin []byte) int
- func RunStatus(project string, jsonOut bool) int
- func RunUninstall(project string, userScope, purge bool) int
- func SetBuildVersion(v string)
- func Version() string
- type InstallOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmitHookOutput ¶
EmitHookOutput 写 stdout 单行 JSON 并返回退出码 0。
func RunHook ¶
RunHook 执行一个 hook 事件(子命令名见 eventSpecs);任何异常都静默放行,输出该事件的默认输出(多数是空对象)。
- post-tool-use / stop:同步,要把 Hub 的回复(提醒 / 拦一次)交还给 Cursor,同时顺带上报运行情况;
- 其余事件(会话开始 / 结束、提交提示词、思考、工具开始、回复、工具失败、压缩):不需要回包, 只做白名单上报并交给分离出去的子进程发送,父进程立刻返回(见 async.go)。
func RunInstall ¶
func RunInstall(opts InstallOptions) int
func RunUninstall ¶
Types ¶
type InstallOptions ¶
type InstallOptions struct {
Workflow string
McpURL string
McpServer string
TokenEnv string
Interval *float64
Project string
UserScope bool
DryRun bool
Preview bool // 预览:含 DryRun 的全部语义(不写任何文件),并打印 hooks.json / relaymesh.json 的逐行改动
NoStatus bool // 只登记收件箱需要的 postToolUse / stop,不登记状态事件(并摘掉先前登记过的状态事件)
Command string
}
InstallOptions 控制 install 子命令。
Click to show internal directories.
Click to hide internal directories.