hookmux 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +402 -2
  3. package/dist/chunks/add-ZWGK62EX.mjs +1 -0
  4. package/dist/chunks/chunk-2ZCM3JZR.mjs +3 -0
  5. package/dist/chunks/chunk-5GQP3BA6.mjs +1 -0
  6. package/dist/chunks/chunk-65XA3RK3.mjs +4 -0
  7. package/dist/chunks/chunk-6GL55FEQ.mjs +20 -0
  8. package/dist/chunks/chunk-7Z3AMI24.mjs +1 -0
  9. package/dist/chunks/chunk-AHPMRYYF.mjs +1 -0
  10. package/dist/chunks/chunk-BF25CRHJ.mjs +1 -0
  11. package/dist/chunks/chunk-CA2GWCFP.mjs +3 -0
  12. package/dist/chunks/chunk-CSXS5D2F.mjs +1 -0
  13. package/dist/chunks/chunk-CZY5UAXM.mjs +1 -0
  14. package/dist/chunks/chunk-DJHE642J.mjs +7 -0
  15. package/dist/chunks/chunk-DZU2NMID.mjs +1 -0
  16. package/dist/chunks/chunk-F3USS665.mjs +1 -0
  17. package/dist/chunks/chunk-FF55QGCZ.mjs +1 -0
  18. package/dist/chunks/chunk-G6SJQTFF.mjs +1 -0
  19. package/dist/chunks/chunk-IAGBX723.mjs +2 -0
  20. package/dist/chunks/chunk-IJHUIMJA.mjs +5 -0
  21. package/dist/chunks/chunk-K73ZPBFM.mjs +45 -0
  22. package/dist/chunks/chunk-L3BSVLQG.mjs +1 -0
  23. package/dist/chunks/chunk-OMKE4U3M.mjs +1 -0
  24. package/dist/chunks/chunk-OXHAGFXG.mjs +12 -0
  25. package/dist/chunks/chunk-OYGOSD6V.mjs +1 -0
  26. package/dist/chunks/chunk-QTY23VNU.mjs +1 -0
  27. package/dist/chunks/chunk-RG3EOP4J.mjs +1 -0
  28. package/dist/chunks/chunk-SXIEWTYT.mjs +1 -0
  29. package/dist/chunks/chunk-UERSXYXZ.mjs +3 -0
  30. package/dist/chunks/chunk-WZSNBZ6D.mjs +2 -0
  31. package/dist/chunks/chunk-XPLEWNGF.mjs +1 -0
  32. package/dist/chunks/chunk-ZDCAHPWY.mjs +2 -0
  33. package/dist/chunks/chunk-ZNEBE4WO.mjs +1 -0
  34. package/dist/chunks/disable-KRHQYUQU.mjs +3 -0
  35. package/dist/chunks/doctor-KERAJBFA.mjs +7 -0
  36. package/dist/chunks/enable-SWA7C4K2.mjs +4 -0
  37. package/dist/chunks/explain-WNQLELTA.mjs +9 -0
  38. package/dist/chunks/hook-main-PW67WMNF.mjs +1 -0
  39. package/dist/chunks/init-46THKH7Z.mjs +12 -0
  40. package/dist/chunks/install-J4QGOOCD.mjs +15 -0
  41. package/dist/chunks/list-NAFC2CUM.mjs +5 -0
  42. package/dist/chunks/log-ELHUFP5Y.mjs +11 -0
  43. package/dist/chunks/new-UASRUAP2.mjs +186 -0
  44. package/dist/chunks/promote-4RJUMW7Y.mjs +24 -0
  45. package/dist/chunks/registry-P6V5HZQN.mjs +1 -0
  46. package/dist/chunks/remove-XCOCPNJJ.mjs +3 -0
  47. package/dist/chunks/schema-FFOAJAET.mjs +4 -0
  48. package/dist/chunks/sync-UCVS5O2X.mjs +4 -0
  49. package/dist/chunks/test-BCLMCB5A.mjs +8 -0
  50. package/dist/chunks/uninstall-ZMGYPYVA.mjs +7 -0
  51. package/dist/chunks/validate-ICFP6TSC.mjs +1 -0
  52. package/dist/cli.mjs +4 -0
  53. package/dist/hook.mjs +1 -0
  54. package/launcher/hookmux-hook.sh +83 -0
  55. package/launcher/opencode-plugin.js +236 -0
  56. package/package.json +57 -4
  57. package/plugins/hookmux-authoring/plugin.toml +65 -0
  58. package/plugins/hookmux-authoring/tests.toml +119 -0
  59. package/skills/hookmux/SKILL.md +102 -0
  60. package/skills/hookmux/references/check-kinds.md +124 -0
  61. package/skills/hookmux/references/effects.md +24 -0
  62. package/skills/hookmux/references/examples/moodboard/plugin.toml +72 -0
  63. package/skills/hookmux/references/examples/moodboard/tests.toml +20 -0
  64. package/skills/hookmux/references/hosts.md +173 -0
  65. package/skills/hookmux/references/plugin-format.md +400 -0
@@ -0,0 +1,124 @@
1
+ <!-- Generated by scripts/gen-skill-refs.ts from src/checks. Do not edit; run `pnpm gen:refs`. -->
2
+
3
+ # Check kinds
4
+
5
+ Each check in `[checks.<name>]` names one of these kinds. Cheaper tiers run first. By default a model-backed kind cannot justify a block on its own, and its evidence never reaches a template.
6
+
7
+ | Kind | Tier | Output | Model-backed |
8
+ | -------------- | -------------- | ------ | ------------ |
9
+ | `classify` | 2 (model call) | score | yes |
10
+ | `cwd_glob` | 0 (in-process) | bool | no |
11
+ | `host` | 0 (in-process) | bool | no |
12
+ | `keywords` | 0 (in-process) | bool | no |
13
+ | `origin` | 0 (in-process) | bool | no |
14
+ | `path_exists` | 0 (in-process) | bool | no |
15
+ | `regex` | 0 (in-process) | bool | no |
16
+ | `regex_groups` | 0 (in-process) | bool | no |
17
+ | `script` | 1 (subprocess) | bool | no |
18
+ | `tool` | 0 (in-process) | bool | no |
19
+
20
+ ## `classify`
21
+
22
+ Score from 0 to 1 that the field is the target label, decided by a configured model provider.
23
+
24
+ | Option | Meaning |
25
+ | -------------- | ------------------------------------------------------- |
26
+ | `provider` | name of a [providers.<name>] table in config.toml |
27
+ | `labels` | list of 2 to 20 labels |
28
+ | `target` | the label to score |
29
+ | `instructions` | what the labels mean, at most 2000 chars |
30
+ | `field` | event field to read, default "prompt" |
31
+ | `max_chars` | characters of the field sent to the model, default 2000 |
32
+
33
+ ## `cwd_glob`
34
+
35
+ True when the working folder matches one of the globs.
36
+
37
+ | Option | Meaning |
38
+ | ---------- | ------------------------------------------ |
39
+ | `patterns` | globs with *, ** and ?; ~/ expands to home |
40
+
41
+ ## `host`
42
+
43
+ True when the agent client matches: its id, a version range, the effects it supports on this event, or the features it has (features) or lacks (lacks). Unknown version or feature gives unknown.
44
+
45
+ | Option | Meaning |
46
+ | ---------- | -------------------------------------------------------------------------------------------- |
47
+ | `id` | list of host ids, e.g. ["codex"] |
48
+ | `version` | range such as ">=0.40" or ">=1.2 <2" |
49
+ | `supports` | list of effects that must be supported here |
50
+ | `features` | list of feature ids that must all be yes here, e.g. ["inject.markup"]; unknown gives unknown |
51
+ | `lacks` | list of feature ids that must all be no here, e.g. ["block.prevents"]; unknown gives unknown |
52
+
53
+ ## `keywords`
54
+
55
+ True when any (or all) of the words appear as whole words, case-insensitive by default.
56
+
57
+ | Option | Meaning |
58
+ | ---------------- | ------------------------------------- |
59
+ | `words` | list of literal words or phrases |
60
+ | `whole_word` | default true |
61
+ | `case_sensitive` | default false |
62
+ | `match` | "any" (default) or "all" |
63
+ | `field` | event field to read, default "prompt" |
64
+
65
+ ## `origin`
66
+
67
+ True when the prompt origin is one of the listed values.
68
+
69
+ | Option | Meaning |
70
+ | ------ | ----------------------------------- |
71
+ | `is` | list of "user", "system", "unknown" |
72
+
73
+ ## `path_exists`
74
+
75
+ True when any (or all) paths exist, relative to the working folder.
76
+
77
+ | Option | Meaning |
78
+ | ------- | ------------------------ |
79
+ | `paths` | list of paths |
80
+ | `match` | "any" (default) or "all" |
81
+
82
+ ## `regex`
83
+
84
+ True when any (or all) of the patterns match the field.
85
+
86
+ | Option | Meaning |
87
+ | ---------- | ------------------------------------------ |
88
+ | `patterns` | list of regex sources (max 300 chars each) |
89
+ | `flags` | subset of "imsu", default "iu" |
90
+ | `match` | "any" (default) or "all" |
91
+ | `field` | event field to read, default "prompt" |
92
+
93
+ ## `regex_groups`
94
+
95
+ Named groups of patterns; true when every group in at least one fire_when combination matches.
96
+
97
+ | Option | Meaning |
98
+ | ----------- | ------------------------------------- |
99
+ | `groups` | table of group name to pattern list |
100
+ | `fire_when` | list of group-name lists |
101
+ | `flags` | subset of "imsu", default "iu" |
102
+ | `field` | event field to read, default "prompt" |
103
+
104
+ ## `script`
105
+
106
+ Runs an executable from the plugin folder; it reads the event as JSON on stdin and prints its value.
107
+
108
+ | Option | Meaning |
109
+ | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
110
+ | `command` | path relative to the plugin folder, executable with a shebang; a private copy runs, so find sibling files through $HOOKMUX_PLUGIN_DIR, not $0 |
111
+ | `args` | list of string arguments |
112
+ | `timeout_ms` | default 1000, at most 10000 |
113
+ | `needs_raw` | default false; true also sends the host's original payload |
114
+ | `output` | "bool" (default) or "score" |
115
+ | `env` | extra environment variable names passed through when set (at most 32, no HOOKMUX_*); each is a capability that promote approves |
116
+ | `evidence_chars` | characters of evidence kept for templates; default 80, at most 4000. Limits above 80 need approval |
117
+
118
+ ## `tool`
119
+
120
+ True when the tool call names one of these tools (canonical or host name).
121
+
122
+ | Option | Meaning |
123
+ | ------- | ------------------------------ |
124
+ | `names` | list such as ["Bash", "Write"] |
@@ -0,0 +1,24 @@
1
+ <!-- Generated by scripts/gen-skill-refs.ts from its effect table and src/hosts. Do not edit; run `pnpm gen:refs`. -->
2
+
3
+ # Effects
4
+
5
+ A plugin lists its effects as `[[then]]` tables with an `effect` key.
6
+
7
+ | Effect | Fields | Behaviour |
8
+ | -------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
9
+ | `inject` | `text`, `fallback` | Adds the text to the agent's context. Dropped when the host cannot add context on this event or the context budget is used up. `fallback` lists effects to try instead where the host cannot add context. |
10
+ | `block` | `reason`, `suppress_original_prompt` (prompt.submit only, default false), `fallback` | Stops the prompt or tool call and shows the reason. The first block in output order wins. With `block_requires_rule` on (the default), a check that is not model-backed must be true. Where the host cannot block, a `fallback` list picks what to do instead (`inject`, `notify`, or `[]` to drop); without one it becomes a notice, or is dropped where the host cannot notify either. A block dropped for lacking a rule never falls back. |
11
+ | `notify` | `text`, `fallback` | Shows the text to the user, not the agent. Dropped when the host cannot notify on this event, unless `fallback` names an effect to use instead. |
12
+
13
+ ## Support per host and event
14
+
15
+ | Host | `prompt.submit` | `session.start` | `tool.before` | `tool.after` |
16
+ | -------------- | --------------------- | --------------- | --------------------- | --------------------- |
17
+ | Claude Code | inject, block, notify | inject, notify | inject, block, notify | inject, block, notify |
18
+ | CodeBuddy Code | inject, block, notify | inject, notify | inject, block, notify | inject, notify |
19
+ | Codex | inject, block, notify | inject, notify | inject, block, notify | inject, block, notify |
20
+ | Factory Droid | inject, block, notify | inject, notify | block, notify | inject, block, notify |
21
+ | Gemini CLI | inject, block, notify | inject, notify | block, notify | inject, block, notify |
22
+ | opencode | inject, notify | inject, notify | block, notify | inject, notify |
23
+ | Qoder CLI | inject, block, notify | inject, notify | inject, block, notify | inject, notify |
24
+ | Qwen Code | inject, block, notify | inject, notify | inject, block, notify | inject, block, notify |
@@ -0,0 +1,72 @@
1
+ # Suggests a moodboard skill for open-ended UI design requests, in English and
2
+ # Vietnamese. Rules only: two of three signal groups must match, and common
3
+ # "not design work" phrases (bugs, a supplied mockup) exempt the prompt.
4
+ schema = 1
5
+ id = "moodboard"
6
+ version = "1.0.0"
7
+ description = "Suggest the moodboard skill when a prompt asks for new or restyled UI."
8
+ events = ["prompt.submit"]
9
+ phase = "route"
10
+ priority = 50
11
+ dedupe = "session"
12
+ when = "design_words and not exempt"
13
+
14
+ [checks.design_words]
15
+ kind = "regex_groups"
16
+ fire_when = [["act", "surface"], ["feel", "surface"], ["act", "feel"]]
17
+
18
+ [checks.design_words.groups]
19
+ act = [
20
+ '\b(re-?)?design(ing|ed|s)?\b',
21
+ '\brevamp',
22
+ '\bre-?style',
23
+ '\bface-?lift',
24
+ '\bmake (it|this|that|the \w+|our \w+) (look|feel)',
25
+ '\b(polish|beautify|modernize|modernise|refresh|overhaul|rework)\b',
26
+ '\bnew look\b',
27
+ '\b(prettier|nicer|more (beautiful|premium|modern|polished))\b',
28
+ '\b(build|create|make|start) (a |an |the |our |my )?(new )?(landing|website|web ?site|home ?page|page|dashboard|screen|app|portfolio|ui)\b',
29
+ 'thiết kế',
30
+ 'làm (lại|mới)',
31
+ 'đẹp hơn',
32
+ '(chỉnh|nâng cấp|đổi) giao diện',
33
+ 'trông (đẹp|hiện đại|chuyên nghiệp|sang)',
34
+ '\b(tạo|làm|dựng|xây)( (một|cái|lại|mới))? (website|web|trang|landing|giao diện|ứng dụng|app|dashboard|portfolio)',
35
+ ]
36
+ surface = [
37
+ '\b(ui|ux|interface|page|landing|website|web ?site|site|dashboard|screen|app|home ?page|hero|onboarding|component|layout|portfolio|navbar|sidebar|modal|card)s?\b',
38
+ 'giao diện',
39
+ '\btrang\b',
40
+ 'màn hình',
41
+ 'ứng dụng',
42
+ '\bweb\b',
43
+ ]
44
+ feel = [
45
+ '\b(look|feel|vibe|style|aesthetic|visual|typography|palette|branding|mood|theme)s?\b',
46
+ '\b(modern|premium|minimal|clean|elegant|playful|bold|sleek|calm|luxur\w*|outdated|dated|boring|ugly|generic)\b',
47
+ 'phong cách',
48
+ 'cảm giác',
49
+ 'màu sắc',
50
+ 'hiện đại',
51
+ 'sang trọng',
52
+ 'đẹp',
53
+ 'xấu',
54
+ 'nhàm',
55
+ ]
56
+
57
+ [checks.exempt]
58
+ kind = "regex"
59
+ patterns = [
60
+ 'figma\.com/',
61
+ '\bmatch (this|the|my) (mockup|design|figma|screenshot)',
62
+ '\b(bug|crash|stack ?trace|traceback|typo|failing test|unit tests?)\b',
63
+ '\bfix(es|ed|ing)?\b',
64
+ 'sửa lỗi',
65
+ '\bmoodboard\b',
66
+ "\\b(broken|not working|doesn'?t work|regression)\\b",
67
+ 'bị lỗi',
68
+ ]
69
+
70
+ [[then]]
71
+ effect = "inject"
72
+ text = "This request may be open-ended design work. If the visual direction is not already fixed (no supplied mockup, Figma file or design doc to follow) and it is more than a small fix, load the `moodboard` skill and start at its first step. Ignore this when a moodboard is already under way or the fit is wrong."
@@ -0,0 +1,20 @@
1
+ # Cases for `hookmux test moodboard`.
2
+ [[case]]
3
+ prompt = "redesign the pricing page so it feels more premium"
4
+ expect = "fire"
5
+
6
+ [[case]]
7
+ prompt = "thiết kế lại giao diện trang chủ cho hiện đại hơn"
8
+ expect = "fire"
9
+
10
+ [[case]]
11
+ prompt = "fix the crash on the settings screen"
12
+ expect = "silent"
13
+
14
+ [[case]]
15
+ prompt = "match this mockup exactly: figma.com/file/abc"
16
+ expect = "silent"
17
+
18
+ [[case]]
19
+ prompt = "run the unit tests"
20
+ expect = "silent"
@@ -0,0 +1,173 @@
1
+ <!-- Generated by scripts/gen-skill-refs.ts from src/hosts. Do not edit; run `pnpm gen:refs`. -->
2
+
3
+ # Hosts
4
+
5
+ Plugins name canonical events. Each adapter maps them to its client's own hook names. Use a `host` check or a `[host.<id>]` table when a plugin must behave differently on one client.
6
+
7
+ ## Claude Code (`claude-code`)
8
+
9
+ Context limit: 10000 characters.
10
+
11
+ | Canonical event | Native event | Effects |
12
+ | --------------- | ------------------ | --------------------- |
13
+ | `prompt.submit` | `UserPromptSubmit` | inject, block, notify |
14
+ | `session.start` | `SessionStart` | inject, notify |
15
+ | `tool.before` | `PreToolUse` | inject, block, notify |
16
+ | `tool.after` | `PostToolUse` | inject, block, notify |
17
+
18
+ ## CodeBuddy Code (`codebuddy`)
19
+
20
+ Context limit: 10000 characters.
21
+
22
+ | Canonical event | Native event | Effects |
23
+ | --------------- | ------------------ | --------------------- |
24
+ | `prompt.submit` | `UserPromptSubmit` | inject, block, notify |
25
+ | `session.start` | `SessionStart` | inject, notify |
26
+ | `tool.before` | `PreToolUse` | inject, block, notify |
27
+ | `tool.after` | `PostToolUse` | inject, notify |
28
+
29
+ ## Codex (`codex`)
30
+
31
+ Context limit: 10000 characters.
32
+
33
+ | Canonical event | Native event | Effects |
34
+ | --------------- | ------------------ | --------------------- |
35
+ | `prompt.submit` | `UserPromptSubmit` | inject, block, notify |
36
+ | `session.start` | `SessionStart` | inject, notify |
37
+ | `tool.before` | `PreToolUse` | inject, block, notify |
38
+ | `tool.after` | `PostToolUse` | inject, block, notify |
39
+
40
+ ## Factory Droid (`droid`)
41
+
42
+ Context limit: 10000 characters.
43
+
44
+ | Canonical event | Native event | Effects |
45
+ | --------------- | ------------------ | --------------------- |
46
+ | `prompt.submit` | `UserPromptSubmit` | inject, block, notify |
47
+ | `session.start` | `SessionStart` | inject, notify |
48
+ | `tool.before` | `PreToolUse` | block, notify |
49
+ | `tool.after` | `PostToolUse` | inject, block, notify |
50
+
51
+ ## Gemini CLI (`gemini-cli`)
52
+
53
+ Context limit: 10000 characters.
54
+
55
+ | Canonical event | Native event | Effects |
56
+ | --------------- | -------------- | --------------------- |
57
+ | `prompt.submit` | `BeforeAgent` | inject, block, notify |
58
+ | `session.start` | `SessionStart` | inject, notify |
59
+ | `tool.before` | `BeforeTool` | block, notify |
60
+ | `tool.after` | `AfterTool` | inject, block, notify |
61
+
62
+ ## opencode (`opencode`)
63
+
64
+ Context limit: 10000 characters.
65
+
66
+ | Canonical event | Native event | Effects |
67
+ | --------------- | --------------------- | -------------- |
68
+ | `prompt.submit` | `chat.message` | inject, notify |
69
+ | `session.start` | `event` | inject, notify |
70
+ | `tool.before` | `tool.execute.before` | block, notify |
71
+ | `tool.after` | `tool.execute.after` | inject, notify |
72
+
73
+ ## Qoder CLI (`qoder`)
74
+
75
+ Context limit: 10000 characters.
76
+
77
+ | Canonical event | Native event | Effects |
78
+ | --------------- | ------------------ | --------------------- |
79
+ | `prompt.submit` | `UserPromptSubmit` | inject, block, notify |
80
+ | `session.start` | `SessionStart` | inject, notify |
81
+ | `tool.before` | `PreToolUse` | inject, block, notify |
82
+ | `tool.after` | `PostToolUse` | inject, notify |
83
+
84
+ ## Qwen Code (`qwen-code`)
85
+
86
+ Context limit: 10000 characters.
87
+
88
+ | Canonical event | Native event | Effects |
89
+ | --------------- | ------------------ | --------------------- |
90
+ | `prompt.submit` | `UserPromptSubmit` | inject, block, notify |
91
+ | `session.start` | `SessionStart` | inject, notify |
92
+ | `tool.before` | `PreToolUse` | inject, block, notify |
93
+ | `tool.after` | `PostToolUse` | inject, block, notify |
94
+
95
+ ## Feature matrix
96
+
97
+ Each table covers one event. "yes" and "no" come from the client's docs or source; "?" means they are silent, and a `host` check reads it as unknown. A feature about an effect is "no" wherever the client cannot perform that effect. A note under a table explains why a client is "no" there.
98
+
99
+ ### `prompt.submit`
100
+
101
+ | Host | `host.version` | `prompt.origin` | `inject.markup` | `inject.inline` | `block.prevents` | `block.reason-to-agent` | `block.suppress-prompt` |
102
+ | -------------- | -------------- | --------------- | --------------- | --------------- | ---------------- | ----------------------- | ----------------------- |
103
+ | Claude Code | no | yes | yes | yes | yes | no | yes |
104
+ | CodeBuddy Code | no | no | ? | ? | yes | no | no |
105
+ | Codex | no | yes | ? | no | yes | ? | no |
106
+ | Factory Droid | no | no | ? | ? | yes | ? | no |
107
+ | Gemini CLI | no | no | no | yes | yes | ? | yes |
108
+ | opencode | no | yes | ? | ? | no | no | no |
109
+ | Qoder CLI | no | no | ? | ? | yes | ? | no |
110
+ | Qwen Code | no | yes | no | ? | yes | ? | no |
111
+
112
+ - Claude Code, `block.reason-to-agent`: On a prompt the reason is shown to the user only.
113
+ - CodeBuddy Code, `block.reason-to-agent`: A blocked prompt's reason is shown to the user only.
114
+ - Codex, `inject.inline`: Context over about 2,500 tokens is saved to a file and the model sees a preview.
115
+ - Gemini CLI, `inject.markup`: < and > are escaped and the context is wrapped in hook_context tags.
116
+ - Qwen Code, `inject.markup`: < and > in added context are escaped.
117
+
118
+ ### `session.start`
119
+
120
+ | Host | `host.version` | `inject.markup` | `inject.inline` |
121
+ | -------------- | -------------- | --------------- | --------------- |
122
+ | Claude Code | no | yes | yes |
123
+ | CodeBuddy Code | no | ? | ? |
124
+ | Codex | no | ? | no |
125
+ | Factory Droid | no | ? | ? |
126
+ | Gemini CLI | no | no | yes |
127
+ | opencode | no | ? | ? |
128
+ | Qoder CLI | no | ? | ? |
129
+ | Qwen Code | no | no | ? |
130
+
131
+ - Codex, `inject.inline`: Context over about 2,500 tokens is saved to a file and the model sees a preview.
132
+ - Gemini CLI, `inject.markup`: < and > are escaped and the context is wrapped in hook_context tags.
133
+ - Qwen Code, `inject.markup`: < and > in added context are escaped.
134
+
135
+ ### `tool.before`
136
+
137
+ | Host | `host.version` | `tool.file-path` | `inject.markup` | `inject.inline` | `inject.before-call` | `block.prevents` | `block.reason-to-agent` |
138
+ | -------------- | -------------- | ---------------- | --------------- | --------------- | -------------------- | ---------------- | ----------------------- |
139
+ | Claude Code | no | yes | yes | yes | yes | yes | yes |
140
+ | CodeBuddy Code | no | yes | ? | ? | ? | yes | ? |
141
+ | Codex | no | no | ? | no | ? | yes | ? |
142
+ | Factory Droid | no | no | no | no | no | yes | ? |
143
+ | Gemini CLI | no | ? | no | no | no | yes | ? |
144
+ | opencode | no | no | no | no | no | yes | yes |
145
+ | Qoder CLI | no | yes | ? | ? | ? | yes | ? |
146
+ | Qwen Code | no | yes | no | ? | no | yes | ? |
147
+
148
+ - Codex, `tool.file-path`: apply_patch edits carry patch text in tool_input.command.
149
+ - Codex, `inject.inline`: Context over about 2,500 tokens is saved to a file and the model sees a preview.
150
+ - Factory Droid, `tool.file-path`: ApplyPatch input has no file_path.
151
+ - opencode, `tool.file-path`: apply_patch edits carry patch text, not a file path.
152
+ - Qwen Code, `inject.markup`: < and > in added context are escaped.
153
+ - Qwen Code, `inject.before-call`: Context added before a tool call is appended to that call's result.
154
+
155
+ ### `tool.after`
156
+
157
+ | Host | `host.version` | `tool.file-path` | `inject.markup` | `inject.inline` | `block.prevents` | `block.reason-to-agent` |
158
+ | -------------- | -------------- | ---------------- | --------------- | --------------- | ---------------- | ----------------------- |
159
+ | Claude Code | no | yes | yes | yes | no | yes |
160
+ | CodeBuddy Code | no | yes | ? | ? | no | no |
161
+ | Codex | no | no | ? | no | no | yes |
162
+ | Factory Droid | no | no | ? | ? | no | yes |
163
+ | Gemini CLI | no | ? | no | yes | no | ? |
164
+ | opencode | no | no | ? | ? | no | no |
165
+ | Qoder CLI | no | yes | ? | ? | no | no |
166
+ | Qwen Code | no | yes | no | ? | no | ? |
167
+
168
+ - Codex, `tool.file-path`: apply_patch edits carry patch text in tool_input.command.
169
+ - Codex, `inject.inline`: Context over about 2,500 tokens is saved to a file and the model sees a preview.
170
+ - Factory Droid, `tool.file-path`: ApplyPatch input has no file_path.
171
+ - Gemini CLI, `inject.markup`: < and > are escaped and the context is wrapped in hook_context tags.
172
+ - opencode, `tool.file-path`: apply_patch edits carry patch text, not a file path.
173
+ - Qwen Code, `inject.markup`: < and > in added context are escaped.