cc-hooks-ts 2.1.49 → 2.1.50

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
@@ -218,6 +218,24 @@ declare const HookInputSchemas: {
218
218
  file_path: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
219
219
  source: v.PicklistSchema<["local_settings", "policy_settings", "project_settings", "skills", "user_settings"], undefined>;
220
220
  }, undefined>;
221
+ readonly WorktreeCreate: v.ObjectSchema<{
222
+ readonly cwd: v.StringSchema<undefined>;
223
+ readonly permission_mode: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
224
+ readonly session_id: v.StringSchema<undefined>;
225
+ readonly transcript_path: v.StringSchema<undefined>;
226
+ readonly hook_event_name: v.LiteralSchema<"WorktreeCreate", undefined>;
227
+ } & {
228
+ name: v.StringSchema<undefined>;
229
+ }, undefined>;
230
+ readonly WorktreeRemove: v.ObjectSchema<{
231
+ readonly cwd: v.StringSchema<undefined>;
232
+ readonly permission_mode: v.ExactOptionalSchema<v.StringSchema<undefined>, undefined>;
233
+ readonly session_id: v.StringSchema<undefined>;
234
+ readonly transcript_path: v.StringSchema<undefined>;
235
+ readonly hook_event_name: v.LiteralSchema<"WorktreeRemove", undefined>;
236
+ } & {
237
+ worktree_path: v.StringSchema<undefined>;
238
+ }, undefined>;
221
239
  };
222
240
  //#endregion
223
241
  //#region src/hooks/event.d.ts
@@ -226,7 +244,7 @@ declare const HookInputSchemas: {
226
244
  *
227
245
  * @package
228
246
  */
229
- type SupportedHookEvent = "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "Notification" | "UserPromptSubmit" | "SessionStart" | "SessionEnd" | "Stop" | "SubagentStart" | "SubagentStop" | "PreCompact" | "PermissionRequest" | "Setup" | "TeammateIdle" | "TaskCompleted" | "ConfigChange";
247
+ type SupportedHookEvent = "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "Notification" | "UserPromptSubmit" | "SessionStart" | "SessionEnd" | "Stop" | "SubagentStart" | "SubagentStop" | "PreCompact" | "PermissionRequest" | "Setup" | "TeammateIdle" | "TaskCompleted" | "ConfigChange" | "WorktreeCreate" | "WorktreeRemove";
230
248
  //#endregion
231
249
  //#region src/hooks/input/types.d.ts
232
250
  /**
@@ -371,6 +389,8 @@ type HookOutput = {
371
389
  SessionEnd: CommonHookOutputs;
372
390
  TaskCompleted: CommonHookOutputs;
373
391
  TeammateIdle: CommonHookOutputs;
392
+ WorktreeCreate: CommonHookOutputs;
393
+ WorktreeRemove: CommonHookOutputs;
374
394
  };
375
395
  /**
376
396
  * @package
package/dist/index.mjs CHANGED
@@ -190,7 +190,9 @@ const HookInputSchemas = {
190
190
  "skills",
191
191
  "user_settings"
192
192
  ])
193
- })
193
+ }),
194
+ WorktreeCreate: buildHookInputSchema("WorktreeCreate", { name: v.string() }),
195
+ WorktreeRemove: buildHookInputSchema("WorktreeRemove", { worktree_path: v.string() })
194
196
  };
195
197
  function isNonEmptyString(value) {
196
198
  return typeof value === "string" && value.length > 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-hooks-ts",
3
- "version": "2.1.49",
3
+ "version": "2.1.50",
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.0.18"
63
63
  },
64
64
  "dependencies": {
65
- "@anthropic-ai/claude-agent-sdk": "0.2.49",
65
+ "@anthropic-ai/claude-agent-sdk": "0.2.50",
66
66
  "valibot": "^1.1.0"
67
67
  },
68
68
  "scripts": {