cc-hooks-ts 2.1.133 → 2.1.145
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/index.d.mts +40 -1
- package/dist/index.mjs +22 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -143,7 +143,24 @@ declare const HookInputSchemas: {
|
|
|
143
143
|
readonly transcript_path: v.StringSchema<undefined>;
|
|
144
144
|
readonly hook_event_name: v.LiteralSchema<"Stop", undefined>;
|
|
145
145
|
} & {
|
|
146
|
+
background_tasks: v.ExactOptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
147
|
+
readonly agent_type: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
148
|
+
readonly command: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
149
|
+
readonly description: v.StringSchema<undefined>;
|
|
150
|
+
readonly id: v.StringSchema<undefined>;
|
|
151
|
+
readonly name: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
152
|
+
readonly server: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
153
|
+
readonly status: v.StringSchema<undefined>;
|
|
154
|
+
readonly tool: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
155
|
+
readonly type: v.StringSchema<undefined>;
|
|
156
|
+
}, undefined>, undefined>, undefined>;
|
|
146
157
|
last_assistant_message: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
158
|
+
session_crons: v.ExactOptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
159
|
+
readonly id: v.StringSchema<undefined>;
|
|
160
|
+
readonly prompt: v.StringSchema<undefined>;
|
|
161
|
+
readonly recurring: v.BooleanSchema<undefined>;
|
|
162
|
+
readonly schedule: v.StringSchema<undefined>;
|
|
163
|
+
}, undefined>, undefined>, undefined>;
|
|
147
164
|
stop_hook_active: v.BooleanSchema<undefined>;
|
|
148
165
|
}, undefined>;
|
|
149
166
|
readonly StopFailure: v.ObjectSchema<{
|
|
@@ -158,7 +175,7 @@ declare const HookInputSchemas: {
|
|
|
158
175
|
readonly transcript_path: v.StringSchema<undefined>;
|
|
159
176
|
readonly hook_event_name: v.LiteralSchema<"StopFailure", undefined>;
|
|
160
177
|
} & {
|
|
161
|
-
error: v.PicklistSchema<["authentication_failed", "oauth_org_not_allowed", "billing_error", "rate_limit", "invalid_request", "server_error", "unknown", "max_output_tokens"], undefined>;
|
|
178
|
+
error: v.PicklistSchema<["authentication_failed", "oauth_org_not_allowed", "billing_error", "rate_limit", "invalid_request", "model_not_found", "server_error", "unknown", "max_output_tokens"], undefined>;
|
|
162
179
|
error_details: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
163
180
|
last_assistant_message: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
164
181
|
}, undefined>;
|
|
@@ -190,7 +207,24 @@ declare const HookInputSchemas: {
|
|
|
190
207
|
readonly hook_event_name: v.LiteralSchema<"SubagentStop", undefined>;
|
|
191
208
|
} & {
|
|
192
209
|
agent_transcript_path: v.StringSchema<undefined>;
|
|
210
|
+
background_tasks: v.ExactOptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
211
|
+
readonly agent_type: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
212
|
+
readonly command: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
213
|
+
readonly description: v.StringSchema<undefined>;
|
|
214
|
+
readonly id: v.StringSchema<undefined>;
|
|
215
|
+
readonly name: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
216
|
+
readonly server: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
217
|
+
readonly status: v.StringSchema<undefined>;
|
|
218
|
+
readonly tool: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
219
|
+
readonly type: v.StringSchema<undefined>;
|
|
220
|
+
}, undefined>, undefined>, undefined>;
|
|
193
221
|
last_assistant_message: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
222
|
+
session_crons: v.ExactOptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
223
|
+
readonly id: v.StringSchema<undefined>;
|
|
224
|
+
readonly prompt: v.StringSchema<undefined>;
|
|
225
|
+
readonly recurring: v.BooleanSchema<undefined>;
|
|
226
|
+
readonly schedule: v.StringSchema<undefined>;
|
|
227
|
+
}, undefined>, undefined>, undefined>;
|
|
194
228
|
stop_hook_active: v.BooleanSchema<undefined>;
|
|
195
229
|
}, "agent_id" | "agent_type"> & {
|
|
196
230
|
readonly agent_id: v.StringSchema<undefined>;
|
|
@@ -769,6 +803,11 @@ type CommonHookOutputs = {
|
|
|
769
803
|
* @deprecated
|
|
770
804
|
*/
|
|
771
805
|
reason?: string;
|
|
806
|
+
/**
|
|
807
|
+
* A terminal escape sequence (e.g. OSC 9 / OSC 777 desktop-notification) for Claude Code to emit on your behalf.
|
|
808
|
+
* Only notification/title OSCs (0, 1, 2, 9, 99, 777) and BEL are permitted; anything else is dropped.
|
|
809
|
+
*/
|
|
810
|
+
terminalSequence?: string;
|
|
772
811
|
/**
|
|
773
812
|
* Use `hookSpecificOutput` in appropriate hook events instead.
|
|
774
813
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -176,6 +176,23 @@ function buildSubagentInputSchema(hook_event_name, entries) {
|
|
|
176
176
|
agent_type: v.string()
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
+
const backgroundTaskSummarySchema = v.object({
|
|
180
|
+
agent_type: v.exactOptional(v.string()),
|
|
181
|
+
command: v.exactOptional(v.string()),
|
|
182
|
+
description: v.string(),
|
|
183
|
+
id: v.string(),
|
|
184
|
+
name: v.exactOptional(v.string()),
|
|
185
|
+
server: v.exactOptional(v.string()),
|
|
186
|
+
status: v.string(),
|
|
187
|
+
tool: v.exactOptional(v.string()),
|
|
188
|
+
type: v.string()
|
|
189
|
+
});
|
|
190
|
+
const sessionCronSummarySchema = v.object({
|
|
191
|
+
id: v.string(),
|
|
192
|
+
prompt: v.string(),
|
|
193
|
+
recurring: v.boolean(),
|
|
194
|
+
schedule: v.string()
|
|
195
|
+
});
|
|
179
196
|
/**
|
|
180
197
|
* @package
|
|
181
198
|
*/
|
|
@@ -223,7 +240,9 @@ const HookInputSchemas = {
|
|
|
223
240
|
prompt: v.string()
|
|
224
241
|
}),
|
|
225
242
|
Stop: buildHookInputSchema("Stop", {
|
|
243
|
+
background_tasks: v.exactOptional(v.array(backgroundTaskSummarySchema)),
|
|
226
244
|
last_assistant_message: v.exactOptional(v.string()),
|
|
245
|
+
session_crons: v.exactOptional(v.array(sessionCronSummarySchema)),
|
|
227
246
|
stop_hook_active: v.boolean()
|
|
228
247
|
}),
|
|
229
248
|
StopFailure: buildHookInputSchema("StopFailure", {
|
|
@@ -233,6 +252,7 @@ const HookInputSchemas = {
|
|
|
233
252
|
"billing_error",
|
|
234
253
|
"rate_limit",
|
|
235
254
|
"invalid_request",
|
|
255
|
+
"model_not_found",
|
|
236
256
|
"server_error",
|
|
237
257
|
"unknown",
|
|
238
258
|
"max_output_tokens"
|
|
@@ -243,7 +263,9 @@ const HookInputSchemas = {
|
|
|
243
263
|
SubagentStart: buildSubagentInputSchema("SubagentStart", {}),
|
|
244
264
|
SubagentStop: buildSubagentInputSchema("SubagentStop", {
|
|
245
265
|
agent_transcript_path: v.string(),
|
|
266
|
+
background_tasks: v.exactOptional(v.array(backgroundTaskSummarySchema)),
|
|
246
267
|
last_assistant_message: v.exactOptional(v.string()),
|
|
268
|
+
session_crons: v.exactOptional(v.array(sessionCronSummarySchema)),
|
|
247
269
|
stop_hook_active: v.boolean()
|
|
248
270
|
}),
|
|
249
271
|
PreCompact: buildHookInputSchema("PreCompact", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc-hooks-ts",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.145",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Write claude code hooks with type safety",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"vitest": "4.1.2"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@anthropic-ai/claude-agent-sdk": "0.
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.145",
|
|
66
66
|
"get-stdin": "10.0.0",
|
|
67
67
|
"valibot": "^1.3.0"
|
|
68
68
|
},
|