cc-hooks-ts 2.0.65 → 2.0.70
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/README.md +24 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -0
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -18,6 +18,7 @@ See [examples](./examples) for more usage examples.
|
|
|
18
18
|
- [Advanced JSON Output](#advanced-json-output)
|
|
19
19
|
- [Documentation](#documentation)
|
|
20
20
|
- [Development](#development)
|
|
21
|
+
- [How to follow the upstream changes](#how-to-follow-the-upstream-changes)
|
|
21
22
|
- [License](#license)
|
|
22
23
|
- [Contributing](#contributing)
|
|
23
24
|
|
|
@@ -232,6 +233,29 @@ pnpm format
|
|
|
232
233
|
pnpm typecheck
|
|
233
234
|
```
|
|
234
235
|
|
|
236
|
+
### How to follow the upstream changes
|
|
237
|
+
|
|
238
|
+
1. Install the latest version of `@anthropic-ai/claude-agent-sdk` and run `pnpm run check`.
|
|
239
|
+
- If the command passes without errors, there are no type changes.
|
|
240
|
+
|
|
241
|
+
2. Get diff of the types. This example gets the diff between Claude Code 2.0.69 and 2.0.70:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
npm diff --diff=@anthropic-ai/claude-agent-sdk@0.1.69 --diff=@anthropic-ai/claude-agent-sdk@0.1.70 '**/*.d.ts'
|
|
245
|
+
|
|
246
|
+
# You can use dandavison/delta for better diff visualization
|
|
247
|
+
npm diff --diff=@anthropic-ai/claude-agent-sdk@0.1.69 --diff=@anthropic-ai/claude-agent-sdk@0.1.70 '**/*.d.ts' | delta --side-by-side
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
3. Reflect the changes.
|
|
251
|
+
- Edit `src/hooks/` for changed hook input / output types.
|
|
252
|
+
- No need for adding tests in most cases since we are testing the whole type definitions in these files:
|
|
253
|
+
- `src/hooks/input/schemas.test-d.ts`
|
|
254
|
+
- `src/hooks/output/index.test-d.ts`
|
|
255
|
+
- `src/hooks/event.test-d.ts`
|
|
256
|
+
- `src/hooks/permission.test-d.ts`
|
|
257
|
+
- Edit `src/index.ts` for changed tool input / output types.
|
|
258
|
+
|
|
235
259
|
## License
|
|
236
260
|
|
|
237
261
|
MIT
|
package/dist/index.d.mts
CHANGED
|
@@ -157,7 +157,7 @@ declare const HookInputSchemas: {
|
|
|
157
157
|
readonly type: v.LiteralSchema<"removeRules", undefined>;
|
|
158
158
|
}, undefined>, v.ObjectSchema<{
|
|
159
159
|
readonly destination: v.UnionSchema<[v.LiteralSchema<"userSettings", undefined>, v.LiteralSchema<"projectSettings", undefined>, v.LiteralSchema<"localSettings", undefined>, v.LiteralSchema<"session", undefined>, v.LiteralSchema<"cliArg", undefined>], undefined>;
|
|
160
|
-
readonly mode: v.UnionSchema<[v.LiteralSchema<"acceptEdits", undefined>, v.LiteralSchema<"bypassPermissions", undefined>, v.LiteralSchema<"default", undefined>, v.LiteralSchema<"dontAsk", undefined>, v.LiteralSchema<"plan", undefined>], undefined>;
|
|
160
|
+
readonly mode: v.UnionSchema<[v.LiteralSchema<"acceptEdits", undefined>, v.LiteralSchema<"bypassPermissions", undefined>, v.LiteralSchema<"default", undefined>, v.LiteralSchema<"dontAsk", undefined>, v.LiteralSchema<"delegate", undefined>, v.LiteralSchema<"plan", undefined>], undefined>;
|
|
161
161
|
readonly type: v.LiteralSchema<"setMode", undefined>;
|
|
162
162
|
}, undefined>, v.ObjectSchema<{
|
|
163
163
|
readonly destination: v.UnionSchema<[v.LiteralSchema<"userSettings", undefined>, v.LiteralSchema<"projectSettings", undefined>, v.LiteralSchema<"localSettings", undefined>, v.LiteralSchema<"session", undefined>, v.LiteralSchema<"cliArg", undefined>], undefined>;
|
|
@@ -290,7 +290,7 @@ declare const permissionUpdateSchema: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
|
290
290
|
readonly type: v.LiteralSchema<"removeRules", undefined>;
|
|
291
291
|
}, undefined>, v.ObjectSchema<{
|
|
292
292
|
readonly destination: v.UnionSchema<[v.LiteralSchema<"userSettings", undefined>, v.LiteralSchema<"projectSettings", undefined>, v.LiteralSchema<"localSettings", undefined>, v.LiteralSchema<"session", undefined>, v.LiteralSchema<"cliArg", undefined>], undefined>;
|
|
293
|
-
readonly mode: v.UnionSchema<[v.LiteralSchema<"acceptEdits", undefined>, v.LiteralSchema<"bypassPermissions", undefined>, v.LiteralSchema<"default", undefined>, v.LiteralSchema<"dontAsk", undefined>, v.LiteralSchema<"plan", undefined>], undefined>;
|
|
293
|
+
readonly mode: v.UnionSchema<[v.LiteralSchema<"acceptEdits", undefined>, v.LiteralSchema<"bypassPermissions", undefined>, v.LiteralSchema<"default", undefined>, v.LiteralSchema<"dontAsk", undefined>, v.LiteralSchema<"delegate", undefined>, v.LiteralSchema<"plan", undefined>], undefined>;
|
|
294
294
|
readonly type: v.LiteralSchema<"setMode", undefined>;
|
|
295
295
|
}, undefined>, v.ObjectSchema<{
|
|
296
296
|
readonly destination: v.UnionSchema<[v.LiteralSchema<"userSettings", undefined>, v.LiteralSchema<"projectSettings", undefined>, v.LiteralSchema<"localSettings", undefined>, v.LiteralSchema<"session", undefined>, v.LiteralSchema<"cliArg", undefined>], undefined>;
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc-hooks-ts",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.70",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Write claude code hooks with type safety",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -43,26 +43,26 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@arethetypeswrong/core": "0.18.2",
|
|
46
|
-
"@types/node": "
|
|
46
|
+
"@types/node": "25.0.1",
|
|
47
47
|
"@typescript/native-preview": "^7.0.0-dev.20251108.1",
|
|
48
48
|
"@virtual-live-lab/eslint-config": "2.3.1",
|
|
49
49
|
"@virtual-live-lab/tsconfig": "2.1.21",
|
|
50
|
-
"eslint": "9.39.
|
|
50
|
+
"eslint": "9.39.2",
|
|
51
51
|
"eslint-plugin-import-access": "3.1.0",
|
|
52
|
-
"oxfmt": "0.
|
|
52
|
+
"oxfmt": "0.17.0",
|
|
53
53
|
"pkg-pr-new": "0.0.62",
|
|
54
|
-
"publint": "0.3.
|
|
55
|
-
"release-it": "19.0
|
|
54
|
+
"publint": "0.3.16",
|
|
55
|
+
"release-it": "19.1.0",
|
|
56
56
|
"release-it-pnpm": "4.6.6",
|
|
57
|
-
"tsdown": "0.17.
|
|
57
|
+
"tsdown": "0.17.2",
|
|
58
58
|
"type-fest": "5.3.1",
|
|
59
59
|
"typescript": "5.9.3",
|
|
60
|
-
"typescript-eslint": "8.
|
|
60
|
+
"typescript-eslint": "8.49.0",
|
|
61
61
|
"unplugin-unused": "0.5.6",
|
|
62
62
|
"vitest": "4.0.15"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@anthropic-ai/claude-agent-sdk": "0.1.
|
|
65
|
+
"@anthropic-ai/claude-agent-sdk": "0.1.70",
|
|
66
66
|
"valibot": "^1.1.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|