cc-hooks-ts 2.1.79 → 2.1.81

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 CHANGED
@@ -19,7 +19,7 @@ declare const HookInputSchemas: {
19
19
  readonly transcript_path: v.StringSchema<undefined>;
20
20
  readonly hook_event_name: v.LiteralSchema<"PreToolUse", undefined>;
21
21
  } & {
22
- tool_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, AutoComplete<string>>]>;
22
+ tool_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.GuardAction<string, (s: string) => s is AutoComplete<string>, undefined>]>;
23
23
  tool_input: v.UnknownSchema;
24
24
  tool_use_id: v.StringSchema<undefined>;
25
25
  }, undefined>;
@@ -32,7 +32,7 @@ declare const HookInputSchemas: {
32
32
  readonly transcript_path: v.StringSchema<undefined>;
33
33
  readonly hook_event_name: v.LiteralSchema<"PostToolUse", undefined>;
34
34
  } & {
35
- tool_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, AutoComplete<string>>]>;
35
+ tool_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.GuardAction<string, (s: string) => s is AutoComplete<string>, undefined>]>;
36
36
  tool_input: v.UnknownSchema;
37
37
  tool_response: v.UnknownSchema;
38
38
  tool_use_id: v.StringSchema<undefined>;
@@ -46,7 +46,7 @@ declare const HookInputSchemas: {
46
46
  readonly transcript_path: v.StringSchema<undefined>;
47
47
  readonly hook_event_name: v.LiteralSchema<"PostToolUseFailure", undefined>;
48
48
  } & {
49
- tool_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, AutoComplete<string>>]>;
49
+ tool_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.GuardAction<string, (s: string) => s is AutoComplete<string>, undefined>]>;
50
50
  error: v.StringSchema<undefined>;
51
51
  is_interrupt: v.ExactOptionalSchema<v.BooleanSchema<undefined>, undefined>;
52
52
  tool_input: v.UnknownSchema;
@@ -689,6 +689,7 @@ interface SessionStartHookOutput extends CommonHookOutputs {
689
689
  * Adds the string to the context.
690
690
  */
691
691
  additionalContext?: string;
692
+ initialUserMessage?: string;
692
693
  };
693
694
  }
694
695
  interface SetupHookOutput extends CommonHookOutputs {
package/dist/index.mjs CHANGED
@@ -179,18 +179,18 @@ function buildSubagentInputSchema(hook_event_name, entries) {
179
179
  */
180
180
  const HookInputSchemas = {
181
181
  PreToolUse: buildHookInputSchema("PreToolUse", {
182
- tool_name: v.pipe(v.string(), v.transform((s) => s)),
182
+ tool_name: v.pipe(v.string(), v.guard((s) => true)),
183
183
  tool_input: v.unknown(),
184
184
  tool_use_id: v.string()
185
185
  }),
186
186
  PostToolUse: buildHookInputSchema("PostToolUse", {
187
- tool_name: v.pipe(v.string(), v.transform((s) => s)),
187
+ tool_name: v.pipe(v.string(), v.guard((s) => true)),
188
188
  tool_input: v.unknown(),
189
189
  tool_response: v.unknown(),
190
190
  tool_use_id: v.string()
191
191
  }),
192
192
  PostToolUseFailure: buildHookInputSchema("PostToolUseFailure", {
193
- tool_name: v.pipe(v.string(), v.transform((s) => s)),
193
+ tool_name: v.pipe(v.string(), v.guard((s) => true)),
194
194
  error: v.string(),
195
195
  is_interrupt: v.exactOptional(v.boolean()),
196
196
  tool_input: v.unknown(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-hooks-ts",
3
- "version": "2.1.79",
3
+ "version": "2.1.81",
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.0"
63
63
  },
64
64
  "dependencies": {
65
- "@anthropic-ai/claude-agent-sdk": "0.2.79",
65
+ "@anthropic-ai/claude-agent-sdk": "0.2.81",
66
66
  "get-stdin": "10.0.0",
67
67
  "valibot": "^1.1.0"
68
68
  },