docs: verify Grok Build hook contract
This commit is contained in:
1 parent
90505ca66e
commit
70d8d6e2c4
4 files changed
+17
No files matched your search
@@ -24,6 +24,7 @@ This repository publishes the open-source server, console, integration catalog,
|
||||
- Keep stable, legacy, and early-access contracts explicit, including their activation commands.
|
||||
- Select Kimi Code and legacy `kimi-cli` contracts from runtime evidence. An empty `KIMI_CODE_HOME` uses `~/.kimi-code`; create no cross-runtime migration marker.
|
||||
- Preserve Kimi TOML comments and unrelated formatting through range-based edits, then parse the complete rendered document before writing it.
|
||||
- Write Grok Build integrations to a native user hook file under non-empty `GROK_HOME` or `~/.grok`; keep Claude Code and Cursor compatibility sources read-only.
|
||||
|
||||
## Mirror Workflow
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
The provider-level contract represents the default stable runtime. `contract_variants` records opt-in or transitional runtimes with their activation command and release channel. Kiro CLI uses this field for its v2 embedded hooks and v3 standalone hooks.
|
||||
|
||||
Grok Build adapters write native user hook files under `$GROK_HOME/hooks` or `~/.grok/hooks`. Project `.grok/hooks` files require `/hooks-trust` or `--trust`; Claude Code and Cursor hook files are read-only compatibility sources for Elydora.
|
||||
|
||||
`delivery_state` is computed from the `node`, `python`, and `go` adapter flags:
|
||||
|
||||
| State | Meaning |
|
||||
|
||||
@@ -240,6 +240,7 @@
|
||||
"integration_mode": "command_hooks",
|
||||
"config_format": "json",
|
||||
"config_paths": [
|
||||
"$GROK_HOME/hooks/*.json",
|
||||
"~/.grok/hooks/*.json",
|
||||
".grok/hooks/*.json"
|
||||
],
|
||||
|
||||
@@ -219,6 +219,19 @@ test('high-drift providers retain their verified hook contracts', async () => {
|
||||
input: 'toolInput',
|
||||
session: 'sessionId',
|
||||
});
|
||||
assert.deepEqual(providers.get('grok').config_paths, [
|
||||
'$GROK_HOME/hooks/*.json',
|
||||
'~/.grok/hooks/*.json',
|
||||
'.grok/hooks/*.json',
|
||||
]);
|
||||
assert.deepEqual(providers.get('grok').events, {
|
||||
before_tool: 'PreToolUse',
|
||||
after_tool: 'PostToolUse',
|
||||
});
|
||||
assert.deepEqual(providers.get('grok').blocking, {
|
||||
mechanism: 'exit_code_2',
|
||||
failure_mode: 'fail_open',
|
||||
});
|
||||
assert.deepEqual(providers.get('kirocli').config_paths, [
|
||||
'~/.kiro/agents/*.json',
|
||||
'.kiro/agents/*.json',
|
||||
|
||||
Reference in new issue
Block a user