@cleocode/caamp 1.8.1 → 1.9.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.
- package/dist/chunk-ER3FIOTM.js +244 -0
- package/dist/chunk-ER3FIOTM.js.map +1 -0
- package/dist/{chunk-CPHF5IM4.js → chunk-MFWBR2NY.js} +20 -290
- package/dist/chunk-MFWBR2NY.js.map +1 -0
- package/dist/{chunk-LDTYDQGR.js → chunk-OLJZ23W3.js} +7 -5
- package/dist/{chunk-LDTYDQGR.js.map → chunk-OLJZ23W3.js.map} +1 -1
- package/dist/chunk-TRIXT4T7.js +276 -0
- package/dist/chunk-TRIXT4T7.js.map +1 -0
- package/dist/cli.js +199 -87
- package/dist/cli.js.map +1 -1
- package/dist/hooks-LV6VU7QJ.js +56 -0
- package/dist/index.d.ts +207 -2
- package/dist/index.js +71 -19
- package/dist/index.js.map +1 -1
- package/dist/{injector-TIUEM4X2.js → injector-P2OL6RK3.js} +3 -2
- package/dist/injector-P2OL6RK3.js.map +1 -0
- package/package.json +1 -1
- package/providers/hook-mappings.json +302 -0
- package/providers/registry.json +599 -156
- package/dist/chunk-CPHF5IM4.js.map +0 -1
- /package/dist/{injector-TIUEM4X2.js.map → hooks-LV6VU7QJ.js.map} +0 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./hook-mappings.schema.json",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"lastUpdated": "2026-03-24",
|
|
5
|
+
"description": "CAAMP canonical hook event mappings to provider-native event names",
|
|
6
|
+
"canonicalEvents": {
|
|
7
|
+
"SessionStart": {
|
|
8
|
+
"category": "session",
|
|
9
|
+
"description": "Session begins, resumes, or is cleared",
|
|
10
|
+
"canBlock": false
|
|
11
|
+
},
|
|
12
|
+
"SessionEnd": {
|
|
13
|
+
"category": "session",
|
|
14
|
+
"description": "Session terminates or exits",
|
|
15
|
+
"canBlock": false
|
|
16
|
+
},
|
|
17
|
+
"PromptSubmit": {
|
|
18
|
+
"category": "prompt",
|
|
19
|
+
"description": "User submits a prompt, before agent processes it",
|
|
20
|
+
"canBlock": true
|
|
21
|
+
},
|
|
22
|
+
"ResponseComplete": {
|
|
23
|
+
"category": "prompt",
|
|
24
|
+
"description": "Agent finishes responding to a turn",
|
|
25
|
+
"canBlock": false
|
|
26
|
+
},
|
|
27
|
+
"PreToolUse": {
|
|
28
|
+
"category": "tool",
|
|
29
|
+
"description": "Before a tool call executes (can block/modify)",
|
|
30
|
+
"canBlock": true
|
|
31
|
+
},
|
|
32
|
+
"PostToolUse": {
|
|
33
|
+
"category": "tool",
|
|
34
|
+
"description": "After a tool call succeeds",
|
|
35
|
+
"canBlock": false
|
|
36
|
+
},
|
|
37
|
+
"PostToolUseFailure": {
|
|
38
|
+
"category": "tool",
|
|
39
|
+
"description": "After a tool call fails or times out",
|
|
40
|
+
"canBlock": false
|
|
41
|
+
},
|
|
42
|
+
"PermissionRequest": {
|
|
43
|
+
"category": "tool",
|
|
44
|
+
"description": "Permission dialog appears for a tool action",
|
|
45
|
+
"canBlock": true
|
|
46
|
+
},
|
|
47
|
+
"SubagentStart": {
|
|
48
|
+
"category": "agent",
|
|
49
|
+
"description": "A subagent is spawned",
|
|
50
|
+
"canBlock": true
|
|
51
|
+
},
|
|
52
|
+
"SubagentStop": {
|
|
53
|
+
"category": "agent",
|
|
54
|
+
"description": "A subagent finishes execution",
|
|
55
|
+
"canBlock": false
|
|
56
|
+
},
|
|
57
|
+
"PreModel": {
|
|
58
|
+
"category": "agent",
|
|
59
|
+
"description": "Before sending a request to the LLM",
|
|
60
|
+
"canBlock": true
|
|
61
|
+
},
|
|
62
|
+
"PostModel": {
|
|
63
|
+
"category": "agent",
|
|
64
|
+
"description": "After receiving an LLM response",
|
|
65
|
+
"canBlock": false
|
|
66
|
+
},
|
|
67
|
+
"PreCompact": {
|
|
68
|
+
"category": "context",
|
|
69
|
+
"description": "Before context window compaction",
|
|
70
|
+
"canBlock": false
|
|
71
|
+
},
|
|
72
|
+
"PostCompact": {
|
|
73
|
+
"category": "context",
|
|
74
|
+
"description": "After context window compaction completes",
|
|
75
|
+
"canBlock": false
|
|
76
|
+
},
|
|
77
|
+
"Notification": {
|
|
78
|
+
"category": "context",
|
|
79
|
+
"description": "System notification or alert is emitted",
|
|
80
|
+
"canBlock": false
|
|
81
|
+
},
|
|
82
|
+
"ConfigChange": {
|
|
83
|
+
"category": "context",
|
|
84
|
+
"description": "Configuration file changes during a session",
|
|
85
|
+
"canBlock": false
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"providerMappings": {
|
|
89
|
+
"claude-code": {
|
|
90
|
+
"hookSystem": "config",
|
|
91
|
+
"hookConfigPath": "$HOME/.claude/settings.json",
|
|
92
|
+
"hookFormat": "json",
|
|
93
|
+
"handlerTypes": ["command", "http", "prompt", "agent"],
|
|
94
|
+
"experimental": false,
|
|
95
|
+
"mappings": {
|
|
96
|
+
"SessionStart": { "nativeName": "SessionStart", "supported": true },
|
|
97
|
+
"SessionEnd": { "nativeName": "SessionEnd", "supported": true },
|
|
98
|
+
"PromptSubmit": { "nativeName": "UserPromptSubmit", "supported": true },
|
|
99
|
+
"ResponseComplete": { "nativeName": "Stop", "supported": true },
|
|
100
|
+
"PreToolUse": { "nativeName": "PreToolUse", "supported": true },
|
|
101
|
+
"PostToolUse": { "nativeName": "PostToolUse", "supported": true },
|
|
102
|
+
"PostToolUseFailure": { "nativeName": "PostToolUseFailure", "supported": true },
|
|
103
|
+
"PermissionRequest": { "nativeName": "PermissionRequest", "supported": true },
|
|
104
|
+
"SubagentStart": { "nativeName": "SubagentStart", "supported": true },
|
|
105
|
+
"SubagentStop": { "nativeName": "SubagentStop", "supported": true },
|
|
106
|
+
"PreModel": { "nativeName": null, "supported": false },
|
|
107
|
+
"PostModel": { "nativeName": null, "supported": false },
|
|
108
|
+
"PreCompact": { "nativeName": "PreCompact", "supported": true },
|
|
109
|
+
"PostCompact": { "nativeName": "PostCompact", "supported": true },
|
|
110
|
+
"Notification": { "nativeName": "Notification", "supported": true },
|
|
111
|
+
"ConfigChange": { "nativeName": "ConfigChange", "supported": true }
|
|
112
|
+
},
|
|
113
|
+
"providerOnlyEvents": [
|
|
114
|
+
"StopFailure",
|
|
115
|
+
"TeammateIdle",
|
|
116
|
+
"TaskCompleted",
|
|
117
|
+
"InstructionsLoaded",
|
|
118
|
+
"WorktreeCreate",
|
|
119
|
+
"WorktreeRemove",
|
|
120
|
+
"Elicitation",
|
|
121
|
+
"ElicitationResult"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"cursor": {
|
|
125
|
+
"hookSystem": "config",
|
|
126
|
+
"hookConfigPath": ".cursor/hooks.json",
|
|
127
|
+
"hookFormat": "json",
|
|
128
|
+
"handlerTypes": ["command", "prompt"],
|
|
129
|
+
"experimental": true,
|
|
130
|
+
"mappings": {
|
|
131
|
+
"SessionStart": { "nativeName": "sessionStart", "supported": true },
|
|
132
|
+
"SessionEnd": { "nativeName": "sessionEnd", "supported": true },
|
|
133
|
+
"PromptSubmit": { "nativeName": "beforeSubmitPrompt", "supported": true },
|
|
134
|
+
"ResponseComplete": { "nativeName": "stop", "supported": true },
|
|
135
|
+
"PreToolUse": { "nativeName": "preToolUse", "supported": true },
|
|
136
|
+
"PostToolUse": { "nativeName": "postToolUse", "supported": true },
|
|
137
|
+
"PostToolUseFailure": { "nativeName": "postToolUseFailure", "supported": true },
|
|
138
|
+
"PermissionRequest": { "nativeName": null, "supported": false },
|
|
139
|
+
"SubagentStart": { "nativeName": "subagentStart", "supported": true },
|
|
140
|
+
"SubagentStop": { "nativeName": "subagentStop", "supported": true },
|
|
141
|
+
"PreModel": { "nativeName": null, "supported": false },
|
|
142
|
+
"PostModel": { "nativeName": null, "supported": false },
|
|
143
|
+
"PreCompact": { "nativeName": "preCompact", "supported": true },
|
|
144
|
+
"PostCompact": { "nativeName": null, "supported": false },
|
|
145
|
+
"Notification": { "nativeName": null, "supported": false },
|
|
146
|
+
"ConfigChange": { "nativeName": null, "supported": false }
|
|
147
|
+
},
|
|
148
|
+
"providerOnlyEvents": [
|
|
149
|
+
"beforeShellExecution",
|
|
150
|
+
"afterShellExecution",
|
|
151
|
+
"beforeMCPExecution",
|
|
152
|
+
"afterMCPExecution",
|
|
153
|
+
"beforeReadFile",
|
|
154
|
+
"afterFileEdit",
|
|
155
|
+
"afterAgentResponse",
|
|
156
|
+
"afterAgentThought",
|
|
157
|
+
"beforeTabFileRead",
|
|
158
|
+
"afterTabFileEdit"
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
"gemini-cli": {
|
|
162
|
+
"hookSystem": "config",
|
|
163
|
+
"hookConfigPath": "$HOME/.gemini/settings.json",
|
|
164
|
+
"hookFormat": "json",
|
|
165
|
+
"handlerTypes": ["command"],
|
|
166
|
+
"experimental": false,
|
|
167
|
+
"mappings": {
|
|
168
|
+
"SessionStart": { "nativeName": "SessionStart", "supported": true },
|
|
169
|
+
"SessionEnd": { "nativeName": "SessionEnd", "supported": true },
|
|
170
|
+
"PromptSubmit": { "nativeName": "BeforeAgent", "supported": true },
|
|
171
|
+
"ResponseComplete": { "nativeName": "AfterAgent", "supported": true },
|
|
172
|
+
"PreToolUse": { "nativeName": "BeforeTool", "supported": true },
|
|
173
|
+
"PostToolUse": { "nativeName": "AfterTool", "supported": true },
|
|
174
|
+
"PostToolUseFailure": { "nativeName": null, "supported": false },
|
|
175
|
+
"PermissionRequest": { "nativeName": null, "supported": false },
|
|
176
|
+
"SubagentStart": { "nativeName": null, "supported": false },
|
|
177
|
+
"SubagentStop": { "nativeName": null, "supported": false },
|
|
178
|
+
"PreModel": { "nativeName": "BeforeModel", "supported": true },
|
|
179
|
+
"PostModel": { "nativeName": "AfterModel", "supported": true },
|
|
180
|
+
"PreCompact": { "nativeName": "PreCompress", "supported": true },
|
|
181
|
+
"PostCompact": { "nativeName": null, "supported": false },
|
|
182
|
+
"Notification": { "nativeName": "Notification", "supported": true },
|
|
183
|
+
"ConfigChange": { "nativeName": null, "supported": false }
|
|
184
|
+
},
|
|
185
|
+
"providerOnlyEvents": [
|
|
186
|
+
"BeforeToolSelection"
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"codex": {
|
|
190
|
+
"hookSystem": "config",
|
|
191
|
+
"hookConfigPath": ".codex/hooks.json",
|
|
192
|
+
"hookFormat": "json",
|
|
193
|
+
"handlerTypes": ["command"],
|
|
194
|
+
"experimental": true,
|
|
195
|
+
"mappings": {
|
|
196
|
+
"SessionStart": { "nativeName": "SessionStart", "supported": true },
|
|
197
|
+
"SessionEnd": { "nativeName": null, "supported": false },
|
|
198
|
+
"PromptSubmit": { "nativeName": "UserPromptSubmit", "supported": true },
|
|
199
|
+
"ResponseComplete": { "nativeName": "Stop", "supported": true },
|
|
200
|
+
"PreToolUse": { "nativeName": null, "supported": false },
|
|
201
|
+
"PostToolUse": { "nativeName": null, "supported": false },
|
|
202
|
+
"PostToolUseFailure": { "nativeName": null, "supported": false },
|
|
203
|
+
"PermissionRequest": { "nativeName": null, "supported": false },
|
|
204
|
+
"SubagentStart": { "nativeName": null, "supported": false },
|
|
205
|
+
"SubagentStop": { "nativeName": null, "supported": false },
|
|
206
|
+
"PreModel": { "nativeName": null, "supported": false },
|
|
207
|
+
"PostModel": { "nativeName": null, "supported": false },
|
|
208
|
+
"PreCompact": { "nativeName": null, "supported": false },
|
|
209
|
+
"PostCompact": { "nativeName": null, "supported": false },
|
|
210
|
+
"Notification": { "nativeName": null, "supported": false },
|
|
211
|
+
"ConfigChange": { "nativeName": null, "supported": false }
|
|
212
|
+
},
|
|
213
|
+
"providerOnlyEvents": []
|
|
214
|
+
},
|
|
215
|
+
"opencode": {
|
|
216
|
+
"hookSystem": "plugin",
|
|
217
|
+
"hookConfigPath": ".opencode/plugins/",
|
|
218
|
+
"hookFormat": "javascript",
|
|
219
|
+
"handlerTypes": ["plugin"],
|
|
220
|
+
"experimental": false,
|
|
221
|
+
"mappings": {
|
|
222
|
+
"SessionStart": { "nativeName": "event:session.created", "supported": true, "notes": "Via bus event subscriber" },
|
|
223
|
+
"SessionEnd": { "nativeName": "event:session.deleted", "supported": true, "notes": "Via bus event subscriber" },
|
|
224
|
+
"PromptSubmit": { "nativeName": "chat.message", "supported": true },
|
|
225
|
+
"ResponseComplete": { "nativeName": "event:session.idle", "supported": true, "notes": "Via bus event subscriber" },
|
|
226
|
+
"PreToolUse": { "nativeName": "tool.execute.before", "supported": true },
|
|
227
|
+
"PostToolUse": { "nativeName": "tool.execute.after", "supported": true },
|
|
228
|
+
"PostToolUseFailure": { "nativeName": null, "supported": false },
|
|
229
|
+
"PermissionRequest": { "nativeName": "permission.ask", "supported": true },
|
|
230
|
+
"SubagentStart": { "nativeName": null, "supported": false },
|
|
231
|
+
"SubagentStop": { "nativeName": null, "supported": false },
|
|
232
|
+
"PreModel": { "nativeName": "chat.params", "supported": true, "notes": "Modify LLM params before request" },
|
|
233
|
+
"PostModel": { "nativeName": null, "supported": false },
|
|
234
|
+
"PreCompact": { "nativeName": "experimental.session.compacting", "supported": true },
|
|
235
|
+
"PostCompact": { "nativeName": "event:session.compacted", "supported": true, "notes": "Via bus event subscriber" },
|
|
236
|
+
"Notification": { "nativeName": null, "supported": false },
|
|
237
|
+
"ConfigChange": { "nativeName": null, "supported": false }
|
|
238
|
+
},
|
|
239
|
+
"providerOnlyEvents": [
|
|
240
|
+
"chat.headers",
|
|
241
|
+
"shell.env",
|
|
242
|
+
"tool.definition",
|
|
243
|
+
"command.execute.before",
|
|
244
|
+
"experimental.chat.messages.transform",
|
|
245
|
+
"experimental.chat.system.transform",
|
|
246
|
+
"experimental.text.complete"
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
"kimi": {
|
|
250
|
+
"hookSystem": "none",
|
|
251
|
+
"hookConfigPath": null,
|
|
252
|
+
"hookFormat": null,
|
|
253
|
+
"handlerTypes": [],
|
|
254
|
+
"experimental": false,
|
|
255
|
+
"mappings": {
|
|
256
|
+
"SessionStart": { "nativeName": null, "supported": false },
|
|
257
|
+
"SessionEnd": { "nativeName": null, "supported": false },
|
|
258
|
+
"PromptSubmit": { "nativeName": null, "supported": false },
|
|
259
|
+
"ResponseComplete": { "nativeName": null, "supported": false },
|
|
260
|
+
"PreToolUse": { "nativeName": null, "supported": false },
|
|
261
|
+
"PostToolUse": { "nativeName": null, "supported": false },
|
|
262
|
+
"PostToolUseFailure": { "nativeName": null, "supported": false },
|
|
263
|
+
"PermissionRequest": { "nativeName": null, "supported": false },
|
|
264
|
+
"SubagentStart": { "nativeName": null, "supported": false },
|
|
265
|
+
"SubagentStop": { "nativeName": null, "supported": false },
|
|
266
|
+
"PreModel": { "nativeName": null, "supported": false },
|
|
267
|
+
"PostModel": { "nativeName": null, "supported": false },
|
|
268
|
+
"PreCompact": { "nativeName": null, "supported": false },
|
|
269
|
+
"PostCompact": { "nativeName": null, "supported": false },
|
|
270
|
+
"Notification": { "nativeName": null, "supported": false },
|
|
271
|
+
"ConfigChange": { "nativeName": null, "supported": false }
|
|
272
|
+
},
|
|
273
|
+
"providerOnlyEvents": []
|
|
274
|
+
},
|
|
275
|
+
"antigravity": {
|
|
276
|
+
"hookSystem": "none",
|
|
277
|
+
"hookConfigPath": null,
|
|
278
|
+
"hookFormat": null,
|
|
279
|
+
"handlerTypes": [],
|
|
280
|
+
"experimental": false,
|
|
281
|
+
"mappings": {
|
|
282
|
+
"SessionStart": { "nativeName": null, "supported": false },
|
|
283
|
+
"SessionEnd": { "nativeName": null, "supported": false },
|
|
284
|
+
"PromptSubmit": { "nativeName": null, "supported": false },
|
|
285
|
+
"ResponseComplete": { "nativeName": null, "supported": false },
|
|
286
|
+
"PreToolUse": { "nativeName": null, "supported": false },
|
|
287
|
+
"PostToolUse": { "nativeName": null, "supported": false },
|
|
288
|
+
"PostToolUseFailure": { "nativeName": null, "supported": false },
|
|
289
|
+
"PermissionRequest": { "nativeName": null, "supported": false },
|
|
290
|
+
"SubagentStart": { "nativeName": null, "supported": false },
|
|
291
|
+
"SubagentStop": { "nativeName": null, "supported": false },
|
|
292
|
+
"PreModel": { "nativeName": null, "supported": false },
|
|
293
|
+
"PostModel": { "nativeName": null, "supported": false },
|
|
294
|
+
"PreCompact": { "nativeName": null, "supported": false },
|
|
295
|
+
"PostCompact": { "nativeName": null, "supported": false },
|
|
296
|
+
"Notification": { "nativeName": null, "supported": false },
|
|
297
|
+
"ConfigChange": { "nativeName": null, "supported": false }
|
|
298
|
+
},
|
|
299
|
+
"providerOnlyEvents": []
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|