fix(node): align Kimi hooks with official contracts
This commit is contained in:
1 parent
4998d79c0b
commit
2eddd5cf88
17 files changed
+1831
-860
No files matched your search
@@ -234,23 +234,45 @@
|
||||
"$KIMI_CODE_HOME/config.toml",
|
||||
"~/.kimi-code/config.toml"
|
||||
],
|
||||
"events": { "before_tool": "PreToolUse", "after_tool": "PostToolUse" },
|
||||
"event_fields": { "name": "tool_name", "input": "tool_input", "session": "session_id" },
|
||||
"events": {
|
||||
"before_tool": "PreToolUse",
|
||||
"after_tool": "PostToolUse",
|
||||
"after_tool_failure": "PostToolUseFailure"
|
||||
},
|
||||
"event_fields": {
|
||||
"name": "tool_name",
|
||||
"input": "tool_input",
|
||||
"session": "session_id",
|
||||
"call_id": "tool_call_id",
|
||||
"output": "tool_output",
|
||||
"error": "error"
|
||||
},
|
||||
"blocking": { "mechanism": "exit_code_2", "failure_mode": "fail_open" },
|
||||
"adapters": { "node": true, "python": true, "go": true },
|
||||
"delivery_state": "available",
|
||||
"source_url": "https://moonshotai.github.io/kimi-code/en/customization/hooks",
|
||||
"source_url": "https://www.kimi.com/code/docs/en/kimi-code-cli/customization/hooks.html",
|
||||
"contract_variants": [
|
||||
{
|
||||
"id": "pythoncli",
|
||||
"release_channel": "legacy",
|
||||
"activation": "kimi-cli",
|
||||
"activation": "An existing ~/.kimi home activates the legacy kimi-cli contract",
|
||||
"config_format": "toml",
|
||||
"config_paths": [
|
||||
"~/.kimi/config.toml"
|
||||
],
|
||||
"events": { "before_tool": "PreToolUse", "after_tool": "PostToolUse" },
|
||||
"event_fields": { "name": "tool_name", "input": "tool_input", "session": "session_id" },
|
||||
"events": {
|
||||
"before_tool": "PreToolUse",
|
||||
"after_tool": "PostToolUse",
|
||||
"after_tool_failure": "PostToolUseFailure"
|
||||
},
|
||||
"event_fields": {
|
||||
"name": "tool_name",
|
||||
"input": "tool_input",
|
||||
"session": "session_id",
|
||||
"call_id": "tool_call_id",
|
||||
"output": "tool_output",
|
||||
"error": "error"
|
||||
},
|
||||
"blocking": { "mechanism": "exit_code_2", "failure_mode": "fail_open" },
|
||||
"source_url": "https://moonshotai.github.io/kimi-cli/en/customization/hooks.html"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user