docs: verify Auggie hook contract
This commit is contained in:
1 parent
eac8220dbe
commit
1f3a87db3f
3 files changed
+43
-76
No files matched your search
@@ -25,6 +25,7 @@ This repository publishes the open-source server, console, integration catalog,
|
|||||||
- 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.
|
- 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.
|
- 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.
|
- 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.
|
||||||
|
- Write Auggie hooks only to `~/.augment/settings.json`; keep system and workspace settings read-only. Generate `.cmd` wrappers on Windows and `.sh` wrappers on Unix because Auggie dispatches supported script paths, and express hook timeouts in milliseconds.
|
||||||
|
|
||||||
## Mirror Workflow
|
## Mirror Workflow
|
||||||
|
|
||||||
|
|||||||
+22
-76
@@ -10,7 +10,13 @@
|
|||||||
"surface": "cli",
|
"surface": "cli",
|
||||||
"integration_mode": "command_hooks",
|
"integration_mode": "command_hooks",
|
||||||
"config_format": "json",
|
"config_format": "json",
|
||||||
"config_paths": ["~/.augment/settings.json", ".augment/settings.json", ".augment/settings.local.json"],
|
"config_paths": [
|
||||||
|
"/etc/augment/settings.json",
|
||||||
|
"C:\\ProgramData\\Augment\\settings.json",
|
||||||
|
".augment/settings.local.json",
|
||||||
|
".augment/settings.json",
|
||||||
|
"~/.augment/settings.json"
|
||||||
|
],
|
||||||
"events": {
|
"events": {
|
||||||
"before_tool": "PreToolUse",
|
"before_tool": "PreToolUse",
|
||||||
"after_tool": "PostToolUse"
|
"after_tool": "PostToolUse"
|
||||||
@@ -24,11 +30,7 @@
|
|||||||
"mechanism": "exit_code_2",
|
"mechanism": "exit_code_2",
|
||||||
"failure_mode": "fail_open"
|
"failure_mode": "fail_open"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": false, "python": false, "go": false },
|
||||||
"node": false,
|
|
||||||
"python": false,
|
|
||||||
"go": false
|
|
||||||
},
|
|
||||||
"delivery_state": "planned",
|
"delivery_state": "planned",
|
||||||
"source_url": "https://docs.augmentcode.com/cli/hooks"
|
"source_url": "https://docs.augmentcode.com/cli/hooks"
|
||||||
},
|
},
|
||||||
@@ -53,11 +55,7 @@
|
|||||||
"mechanism": "exit_code_2",
|
"mechanism": "exit_code_2",
|
||||||
"failure_mode": "fail_open"
|
"failure_mode": "fail_open"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": true, "python": true, "go": true },
|
||||||
"node": true,
|
|
||||||
"python": true,
|
|
||||||
"go": true
|
|
||||||
},
|
|
||||||
"delivery_state": "available",
|
"delivery_state": "available",
|
||||||
"source_url": "https://code.claude.com/docs/en/hooks"
|
"source_url": "https://code.claude.com/docs/en/hooks"
|
||||||
},
|
},
|
||||||
@@ -77,11 +75,7 @@
|
|||||||
"mechanism": "hook_policy",
|
"mechanism": "hook_policy",
|
||||||
"failure_mode": "configurable"
|
"failure_mode": "configurable"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": false, "python": false, "go": false },
|
||||||
"node": false,
|
|
||||||
"python": false,
|
|
||||||
"go": false
|
|
||||||
},
|
|
||||||
"delivery_state": "planned",
|
"delivery_state": "planned",
|
||||||
"source_url": "https://docs.cline.bot/sdk/plugins"
|
"source_url": "https://docs.cline.bot/sdk/plugins"
|
||||||
},
|
},
|
||||||
@@ -106,11 +100,7 @@
|
|||||||
"mechanism": "exit_code_2",
|
"mechanism": "exit_code_2",
|
||||||
"failure_mode": "fail_open"
|
"failure_mode": "fail_open"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": true, "python": true, "go": true },
|
||||||
"node": true,
|
|
||||||
"python": true,
|
|
||||||
"go": true
|
|
||||||
},
|
|
||||||
"delivery_state": "available",
|
"delivery_state": "available",
|
||||||
"source_url": "https://learn.chatgpt.com/docs/hooks"
|
"source_url": "https://learn.chatgpt.com/docs/hooks"
|
||||||
},
|
},
|
||||||
@@ -133,11 +123,7 @@
|
|||||||
"mechanism": "exit_code_2",
|
"mechanism": "exit_code_2",
|
||||||
"failure_mode": "fail_open"
|
"failure_mode": "fail_open"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": true, "python": true, "go": true },
|
||||||
"node": true,
|
|
||||||
"python": true,
|
|
||||||
"go": true
|
|
||||||
},
|
|
||||||
"delivery_state": "available",
|
"delivery_state": "available",
|
||||||
"source_url": "https://docs.github.com/en/copilot/reference/hooks-reference"
|
"source_url": "https://docs.github.com/en/copilot/reference/hooks-reference"
|
||||||
},
|
},
|
||||||
@@ -160,11 +146,7 @@
|
|||||||
"mechanism": "exit_code_2",
|
"mechanism": "exit_code_2",
|
||||||
"failure_mode": "fail_open"
|
"failure_mode": "fail_open"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": true, "python": true, "go": true },
|
||||||
"node": true,
|
|
||||||
"python": true,
|
|
||||||
"go": true
|
|
||||||
},
|
|
||||||
"delivery_state": "available",
|
"delivery_state": "available",
|
||||||
"source_url": "https://cursor.com/docs/hooks"
|
"source_url": "https://cursor.com/docs/hooks"
|
||||||
},
|
},
|
||||||
@@ -192,11 +174,7 @@
|
|||||||
"mechanism": "exit_code_2",
|
"mechanism": "exit_code_2",
|
||||||
"failure_mode": "fail_open"
|
"failure_mode": "fail_open"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": false, "python": false, "go": false },
|
||||||
"node": false,
|
|
||||||
"python": false,
|
|
||||||
"go": false
|
|
||||||
},
|
|
||||||
"delivery_state": "planned",
|
"delivery_state": "planned",
|
||||||
"source_url": "https://docs.factory.ai/reference/hooks-reference"
|
"source_url": "https://docs.factory.ai/reference/hooks-reference"
|
||||||
},
|
},
|
||||||
@@ -224,11 +202,7 @@
|
|||||||
"mechanism": "exit_code_2",
|
"mechanism": "exit_code_2",
|
||||||
"failure_mode": "fail_open"
|
"failure_mode": "fail_open"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": true, "python": true, "go": true },
|
||||||
"node": true,
|
|
||||||
"python": true,
|
|
||||||
"go": true
|
|
||||||
},
|
|
||||||
"delivery_state": "available",
|
"delivery_state": "available",
|
||||||
"source_url": "https://geminicli.com/docs/hooks/reference/"
|
"source_url": "https://geminicli.com/docs/hooks/reference/"
|
||||||
},
|
},
|
||||||
@@ -257,11 +231,7 @@
|
|||||||
"mechanism": "exit_code_2",
|
"mechanism": "exit_code_2",
|
||||||
"failure_mode": "fail_open"
|
"failure_mode": "fail_open"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": true, "python": true, "go": true },
|
||||||
"node": true,
|
|
||||||
"python": true,
|
|
||||||
"go": true
|
|
||||||
},
|
|
||||||
"delivery_state": "available",
|
"delivery_state": "available",
|
||||||
"source_url": "https://docs.x.ai/build/features/hooks"
|
"source_url": "https://docs.x.ai/build/features/hooks"
|
||||||
},
|
},
|
||||||
@@ -289,11 +259,7 @@
|
|||||||
"mechanism": "exit_code_2",
|
"mechanism": "exit_code_2",
|
||||||
"failure_mode": "fail_open"
|
"failure_mode": "fail_open"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": true, "python": true, "go": true },
|
||||||
"node": true,
|
|
||||||
"python": true,
|
|
||||||
"go": true
|
|
||||||
},
|
|
||||||
"delivery_state": "available",
|
"delivery_state": "available",
|
||||||
"source_url": "https://moonshotai.github.io/kimi-code/en/customization/hooks",
|
"source_url": "https://moonshotai.github.io/kimi-code/en/customization/hooks",
|
||||||
"contract_variants": [
|
"contract_variants": [
|
||||||
@@ -346,11 +312,7 @@
|
|||||||
"mechanism": "exit_code_2",
|
"mechanism": "exit_code_2",
|
||||||
"failure_mode": "fail_open"
|
"failure_mode": "fail_open"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": true, "python": true, "go": true },
|
||||||
"node": true,
|
|
||||||
"python": true,
|
|
||||||
"go": true
|
|
||||||
},
|
|
||||||
"delivery_state": "available",
|
"delivery_state": "available",
|
||||||
"source_url": "https://kiro.dev/docs/cli/hooks/",
|
"source_url": "https://kiro.dev/docs/cli/hooks/",
|
||||||
"contract_variants": [
|
"contract_variants": [
|
||||||
@@ -398,11 +360,7 @@
|
|||||||
"mechanism": "exit_code_2",
|
"mechanism": "exit_code_2",
|
||||||
"failure_mode": "fail_open"
|
"failure_mode": "fail_open"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": true, "python": true, "go": true },
|
||||||
"node": true,
|
|
||||||
"python": true,
|
|
||||||
"go": true
|
|
||||||
},
|
|
||||||
"delivery_state": "available",
|
"delivery_state": "available",
|
||||||
"source_url": "https://kiro.dev/docs/hooks/"
|
"source_url": "https://kiro.dev/docs/hooks/"
|
||||||
},
|
},
|
||||||
@@ -426,11 +384,7 @@
|
|||||||
"mechanism": "exit_code_2",
|
"mechanism": "exit_code_2",
|
||||||
"failure_mode": "fail_open"
|
"failure_mode": "fail_open"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": true, "python": true, "go": true },
|
||||||
"node": true,
|
|
||||||
"python": true,
|
|
||||||
"go": true
|
|
||||||
},
|
|
||||||
"delivery_state": "available",
|
"delivery_state": "available",
|
||||||
"source_url": "https://docs.letta.com/letta-agent/hooks"
|
"source_url": "https://docs.letta.com/letta-agent/hooks"
|
||||||
},
|
},
|
||||||
@@ -458,11 +412,7 @@
|
|||||||
"mechanism": "exception",
|
"mechanism": "exception",
|
||||||
"failure_mode": "fail_closed"
|
"failure_mode": "fail_closed"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": true, "python": true, "go": true },
|
||||||
"node": true,
|
|
||||||
"python": true,
|
|
||||||
"go": true
|
|
||||||
},
|
|
||||||
"delivery_state": "available",
|
"delivery_state": "available",
|
||||||
"source_url": "https://opencode.ai/docs/plugins/"
|
"source_url": "https://opencode.ai/docs/plugins/"
|
||||||
},
|
},
|
||||||
@@ -490,11 +440,7 @@
|
|||||||
"mechanism": "exit_code_2",
|
"mechanism": "exit_code_2",
|
||||||
"failure_mode": "fail_open"
|
"failure_mode": "fail_open"
|
||||||
},
|
},
|
||||||
"adapters": {
|
"adapters": { "node": false, "python": false, "go": false },
|
||||||
"node": false,
|
|
||||||
"python": false,
|
|
||||||
"go": false
|
|
||||||
},
|
|
||||||
"delivery_state": "planned",
|
"delivery_state": "planned",
|
||||||
"source_url": "https://qwenlm.github.io/qwen-code-docs/en/users/features/hooks/"
|
"source_url": "https://qwenlm.github.io/qwen-code-docs/en/users/features/hooks/"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,6 +178,26 @@ test('high-drift providers retain their verified hook contracts', async () => {
|
|||||||
const catalog = await readJson('integrations/catalog.json');
|
const catalog = await readJson('integrations/catalog.json');
|
||||||
const providers = new Map(catalog.providers.map((provider) => [provider.id, provider]));
|
const providers = new Map(catalog.providers.map((provider) => [provider.id, provider]));
|
||||||
|
|
||||||
|
assert.deepEqual(providers.get('augment').config_paths, [
|
||||||
|
'/etc/augment/settings.json',
|
||||||
|
'C:\\ProgramData\\Augment\\settings.json',
|
||||||
|
'.augment/settings.local.json',
|
||||||
|
'.augment/settings.json',
|
||||||
|
'~/.augment/settings.json',
|
||||||
|
]);
|
||||||
|
assert.deepEqual(providers.get('augment').events, {
|
||||||
|
before_tool: 'PreToolUse',
|
||||||
|
after_tool: 'PostToolUse',
|
||||||
|
});
|
||||||
|
assert.deepEqual(providers.get('augment').event_fields, {
|
||||||
|
name: 'tool_name',
|
||||||
|
input: 'tool_input',
|
||||||
|
session: 'conversation_id',
|
||||||
|
});
|
||||||
|
assert.deepEqual(providers.get('augment').blocking, {
|
||||||
|
mechanism: 'exit_code_2',
|
||||||
|
failure_mode: 'fail_open',
|
||||||
|
});
|
||||||
assert.deepEqual(providers.get('codex').config_paths, [
|
assert.deepEqual(providers.get('codex').config_paths, [
|
||||||
'~/.codex/hooks.json',
|
'~/.codex/hooks.json',
|
||||||
'.codex/hooks.json',
|
'.codex/hooks.json',
|
||||||
|
|||||||
Reference in new issue
Block a user