@hasna/hooks 0.1.0 → 0.2.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/LICENSE +191 -0
- package/README.md +41 -6
- package/bin/index.js +138 -102
- package/dist/index.js +91 -42
- package/hooks/hook-agentmessages/CLAUDE.md +1 -1
- package/hooks/hook-agentmessages/LICENSE +191 -21
- package/hooks/hook-agentmessages/README.md +3 -3
- package/hooks/hook-agentmessages/package.json +5 -5
- package/hooks/hook-autoformat/README.md +1 -1
- package/hooks/hook-autoformat/package.json +1 -1
- package/hooks/hook-autoformat/tsconfig.json +25 -0
- package/hooks/hook-autostage/README.md +1 -1
- package/hooks/hook-autostage/package.json +1 -1
- package/hooks/hook-branchprotect/README.md +2 -2
- package/hooks/hook-branchprotect/package.json +4 -4
- package/hooks/hook-branchprotect/src/cli.ts +1 -1
- package/hooks/hook-branchprotect/tsconfig.json +25 -0
- package/hooks/hook-checkbugs/LICENSE +191 -21
- package/hooks/hook-checkbugs/README.md +5 -5
- package/hooks/hook-checkbugs/package.json +4 -4
- package/hooks/hook-checkbugs/src/cli.ts +2 -2
- package/hooks/hook-checkbugs/tsconfig.json +15 -0
- package/hooks/hook-checkdocs/README.md +5 -5
- package/hooks/hook-checkdocs/package.json +4 -4
- package/hooks/hook-checkdocs/src/cli.ts +2 -2
- package/hooks/hook-checkdocs/tsconfig.json +15 -0
- package/hooks/hook-checkfiles/LICENSE +191 -21
- package/hooks/hook-checkfiles/README.md +5 -5
- package/hooks/hook-checkfiles/package.json +4 -4
- package/hooks/hook-checkfiles/src/cli.ts +2 -2
- package/hooks/hook-checkfiles/tsconfig.json +15 -0
- package/hooks/hook-checklint/LICENSE +191 -21
- package/hooks/hook-checklint/README.md +5 -5
- package/hooks/hook-checklint/package.json +4 -4
- package/hooks/hook-checklint/src/cli.ts +2 -2
- package/hooks/hook-checklint/tsconfig.json +15 -0
- package/hooks/hook-checkpoint/README.md +2 -2
- package/hooks/hook-checkpoint/package.json +4 -4
- package/hooks/hook-checkpoint/src/cli.ts +1 -1
- package/hooks/hook-checkpoint/tsconfig.json +25 -0
- package/hooks/hook-checksecurity/LICENSE +191 -21
- package/hooks/hook-checksecurity/README.md +8 -8
- package/hooks/hook-checksecurity/package.json +4 -4
- package/hooks/hook-checksecurity/src/cli.ts +2 -2
- package/hooks/hook-checksecurity/tsconfig.json +15 -0
- package/hooks/hook-checktasks/README.md +5 -5
- package/hooks/hook-checktasks/package.json +4 -4
- package/hooks/hook-checktasks/src/cli.ts +2 -2
- package/hooks/hook-checktasks/tsconfig.json +20 -0
- package/hooks/hook-checktests/LICENSE +191 -21
- package/hooks/hook-checktests/README.md +5 -5
- package/hooks/hook-checktests/package.json +4 -4
- package/hooks/hook-checktests/src/cli.ts +2 -2
- package/hooks/hook-checktests/tsconfig.json +15 -0
- package/hooks/hook-commandlog/README.md +1 -1
- package/hooks/hook-commandlog/package.json +1 -1
- package/hooks/hook-contextrefresh/README.md +2 -2
- package/hooks/hook-contextrefresh/package.json +4 -4
- package/hooks/hook-contextrefresh/src/cli.ts +1 -1
- package/hooks/hook-contextrefresh/tsconfig.json +25 -0
- package/hooks/hook-costwatch/README.md +1 -1
- package/hooks/hook-costwatch/package.json +1 -1
- package/hooks/hook-desktopnotify/README.md +1 -1
- package/hooks/hook-desktopnotify/package.json +1 -1
- package/hooks/hook-desktopnotify/tsconfig.json +25 -0
- package/hooks/hook-envsetup/README.md +1 -1
- package/hooks/hook-envsetup/package.json +1 -1
- package/hooks/hook-envsetup/tsconfig.json +25 -0
- package/hooks/hook-errornotify/README.md +1 -1
- package/hooks/hook-errornotify/package.json +1 -1
- package/hooks/hook-gitguard/README.md +2 -2
- package/hooks/hook-gitguard/package.json +4 -4
- package/hooks/hook-gitguard/src/cli.ts +1 -1
- package/hooks/hook-gitguard/tsconfig.json +25 -0
- package/hooks/hook-packageage/README.md +2 -2
- package/hooks/hook-packageage/package.json +4 -4
- package/hooks/hook-packageage/src/cli.ts +1 -1
- package/hooks/hook-packageage/tsconfig.json +25 -0
- package/hooks/hook-permissionguard/README.md +1 -1
- package/hooks/hook-permissionguard/package.json +1 -1
- package/hooks/hook-permissionguard/tsconfig.json +25 -0
- package/hooks/hook-phonenotify/README.md +2 -2
- package/hooks/hook-phonenotify/package.json +4 -4
- package/hooks/hook-phonenotify/src/cli.ts +1 -1
- package/hooks/hook-phonenotify/tsconfig.json +25 -0
- package/hooks/hook-precompact/README.md +2 -2
- package/hooks/hook-precompact/package.json +4 -4
- package/hooks/hook-precompact/src/cli.ts +1 -1
- package/hooks/hook-precompact/tsconfig.json +25 -0
- package/hooks/hook-promptguard/README.md +1 -1
- package/hooks/hook-promptguard/package.json +1 -1
- package/hooks/hook-protectfiles/README.md +1 -1
- package/hooks/hook-protectfiles/package.json +1 -1
- package/hooks/hook-protectfiles/tsconfig.json +25 -0
- package/hooks/hook-sessionlog/README.md +1 -1
- package/hooks/hook-sessionlog/package.json +1 -1
- package/hooks/hook-slacknotify/README.md +1 -1
- package/hooks/hook-slacknotify/package.json +1 -1
- package/hooks/hook-soundnotify/README.md +1 -1
- package/hooks/hook-soundnotify/package.json +1 -1
- package/hooks/hook-taskgate/README.md +1 -1
- package/hooks/hook-taskgate/package.json +1 -1
- package/hooks/hook-tddguard/README.md +1 -1
- package/hooks/hook-tddguard/package.json +1 -1
- package/package.json +18 -4
- package/.claude/settings.json +0 -24
- package/.npmrc.example +0 -2
- package/AGENTS.md +0 -54
- package/CLAUDE.md +0 -70
- package/CONTRIBUTING.md +0 -45
- package/hooks/hook-agentmessages/bin/cli.ts +0 -125
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @hasna/hook-checktests
|
|
2
2
|
|
|
3
3
|
Claude Code hook that checks for missing tests via a headless Claude agent. Runs async (non-blocking) on PostToolUse after file edits.
|
|
4
4
|
|
|
@@ -16,7 +16,7 @@ Claude Code hook that checks for missing tests via a headless Claude agent. Runs
|
|
|
16
16
|
### Global CLI
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
bun add -g @
|
|
19
|
+
bun add -g @hasna/hook-checktests
|
|
20
20
|
hook-checktests install --global
|
|
21
21
|
```
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ hook-checktests install --global
|
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
cd /path/to/your/project
|
|
27
|
-
bunx @
|
|
27
|
+
bunx @hasna/hook-checktests install
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## Requirements
|
|
@@ -62,7 +62,7 @@ Configuration is stored in `.claude/settings.json`:
|
|
|
62
62
|
"matcher": { "tool_name": "^(Edit|Write|NotebookEdit)$" },
|
|
63
63
|
"hooks": [{
|
|
64
64
|
"type": "command",
|
|
65
|
-
"command": "bunx @
|
|
65
|
+
"command": "bunx @hasna/hook-checktests@latest run",
|
|
66
66
|
"timeout": 120,
|
|
67
67
|
"async": true
|
|
68
68
|
}]
|
|
@@ -134,4 +134,4 @@ State is persisted in `~/.claude/hook-state/checktests-{session_id}.json`:
|
|
|
134
134
|
|
|
135
135
|
## License
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
Apache-2.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@
|
|
2
|
+
"name": "@hasna/hook-checktests",
|
|
3
3
|
"version": "0.1.6",
|
|
4
4
|
"description": "Claude Code hook that checks for missing tests and creates tasks",
|
|
5
5
|
"type": "module",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"cli"
|
|
37
37
|
],
|
|
38
38
|
"author": "Hasna",
|
|
39
|
-
"license": "
|
|
39
|
+
"license": "Apache-2.0",
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
|
42
|
-
"url": "https://github.com/
|
|
42
|
+
"url": "https://github.com/hasna/hooks.git"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
|
-
"access": "
|
|
45
|
+
"access": "public",
|
|
46
46
|
"registry": "https://registry.npmjs.org/"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @
|
|
4
|
+
* @hasna/hook-checktests CLI
|
|
5
5
|
*
|
|
6
6
|
* Usage:
|
|
7
7
|
* hook-checktests install Auto-detect location, configure options
|
|
@@ -18,7 +18,7 @@ import { join, dirname, resolve } from "path";
|
|
|
18
18
|
import { homedir } from "os";
|
|
19
19
|
import * as readline from "readline";
|
|
20
20
|
|
|
21
|
-
const PACKAGE_NAME = "@
|
|
21
|
+
const PACKAGE_NAME = "@hasna/hook-checktests";
|
|
22
22
|
const CONFIG_KEY = "checkTestsConfig";
|
|
23
23
|
|
|
24
24
|
// Colors
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"outDir": "./dist",
|
|
10
|
+
"declaration": true,
|
|
11
|
+
"declarationMap": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["src/**/*"],
|
|
14
|
+
"exclude": ["node_modules", "dist"]
|
|
15
|
+
}
|
|
@@ -9,7 +9,7 @@ In long Claude Code sessions, important instructions can drift out of the active
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
bun install -g @
|
|
12
|
+
bun install -g @hasna/hook-contextrefresh
|
|
13
13
|
hook-contextrefresh install 10 # inject every 10 prompts
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -39,4 +39,4 @@ In `~/.claude/settings.json`:
|
|
|
39
39
|
|
|
40
40
|
## License
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Apache-2.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@
|
|
2
|
+
"name": "@hasna/hook-contextrefresh",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"description": "Claude Code hook that re-injects important context every N prompts to prevent context decay",
|
|
5
5
|
"type": "module",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"keywords": ["claude-code", "claude", "hook", "context", "refresh", "memory", "cli"],
|
|
26
26
|
"author": "Hasna",
|
|
27
|
-
"license": "
|
|
27
|
+
"license": "Apache-2.0",
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
|
-
"url": "https://github.com/
|
|
30
|
+
"url": "https://github.com/hasna/hooks.git"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
|
-
"access": "
|
|
33
|
+
"access": "public",
|
|
34
34
|
"registry": "https://registry.npmjs.org/"
|
|
35
35
|
},
|
|
36
36
|
"engines": { "node": ">=18", "bun": ">=1.0" },
|
|
@@ -56,7 +56,7 @@ function install(interval?: string): void {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
settings.hooks.UserPromptSubmit.push({
|
|
59
|
-
hooks: [{ type: "command", command: `bunx @
|
|
59
|
+
hooks: [{ type: "command", command: `bunx @hasna/${HOOK_NAME}` }],
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
if (!settings.contextRefreshConfig) {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"lib": ["ESNext"],
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"allowImportingTsExtensions": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"declarationMap": true,
|
|
19
|
+
"outDir": "./dist",
|
|
20
|
+
"rootDir": "./src",
|
|
21
|
+
"types": ["bun-types"]
|
|
22
|
+
},
|
|
23
|
+
"include": ["src/**/*"],
|
|
24
|
+
"exclude": ["node_modules", "dist"]
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"lib": ["ESNext"],
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"allowImportingTsExtensions": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"declarationMap": true,
|
|
19
|
+
"outDir": "./dist",
|
|
20
|
+
"rootDir": "./src",
|
|
21
|
+
"types": ["bun-types"]
|
|
22
|
+
},
|
|
23
|
+
"include": ["src/**/*"],
|
|
24
|
+
"exclude": ["node_modules", "dist"]
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"lib": ["ESNext"],
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"allowImportingTsExtensions": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"declarationMap": true,
|
|
19
|
+
"outDir": "./dist",
|
|
20
|
+
"rootDir": "./src",
|
|
21
|
+
"types": ["bun-types"]
|
|
22
|
+
},
|
|
23
|
+
"include": ["src/**/*"],
|
|
24
|
+
"exclude": ["node_modules", "dist"]
|
|
25
|
+
}
|
|
@@ -9,7 +9,7 @@ Prevents Claude from running irreversible git commands like `git reset --hard`,
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
bun install -g @
|
|
12
|
+
bun install -g @hasna/hook-gitguard
|
|
13
13
|
hook-gitguard install
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -27,4 +27,4 @@ hook-gitguard install
|
|
|
27
27
|
|
|
28
28
|
## License
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Apache-2.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@
|
|
2
|
+
"name": "@hasna/hook-gitguard",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"description": "Claude Code hook that blocks destructive git operations",
|
|
5
5
|
"type": "module",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"cli"
|
|
37
37
|
],
|
|
38
38
|
"author": "Hasna",
|
|
39
|
-
"license": "
|
|
39
|
+
"license": "Apache-2.0",
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
|
42
|
-
"url": "https://github.com/
|
|
42
|
+
"url": "https://github.com/hasna/hooks.git"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
|
-
"access": "
|
|
45
|
+
"access": "public",
|
|
46
46
|
"registry": "https://registry.npmjs.org/"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
@@ -52,7 +52,7 @@ function install(): void {
|
|
|
52
52
|
|
|
53
53
|
settings.hooks.PreToolUse.push({
|
|
54
54
|
matcher: "Bash",
|
|
55
|
-
hooks: [{ type: "command", command: `bunx @
|
|
55
|
+
hooks: [{ type: "command", command: `bunx @hasna/${HOOK_NAME}` }],
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
writeSettings(settings);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"lib": ["ESNext"],
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"allowImportingTsExtensions": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"declarationMap": true,
|
|
19
|
+
"outDir": "./dist",
|
|
20
|
+
"rootDir": "./src",
|
|
21
|
+
"types": ["bun-types"]
|
|
22
|
+
},
|
|
23
|
+
"include": ["src/**/*"],
|
|
24
|
+
"exclude": ["node_modules", "dist"]
|
|
25
|
+
}
|
|
@@ -9,7 +9,7 @@ Before `npm install`, `bun add`, `yarn add`, or `pnpm add`, this hook checks eac
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
bun install -g @
|
|
12
|
+
bun install -g @hasna/hook-packageage
|
|
13
13
|
hook-packageage install
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -30,4 +30,4 @@ hook-packageage check <pkg> # Manually check a package
|
|
|
30
30
|
|
|
31
31
|
## License
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Apache-2.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@
|
|
2
|
+
"name": "@hasna/hook-packageage",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"description": "Claude Code hook that checks package age before install to warn on outdated or abandoned packages",
|
|
5
5
|
"type": "module",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"keywords": ["claude-code", "claude", "hook", "package", "age", "outdated", "abandoned", "npm", "cli"],
|
|
26
26
|
"author": "Hasna",
|
|
27
|
-
"license": "
|
|
27
|
+
"license": "Apache-2.0",
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
|
-
"url": "https://github.com/
|
|
30
|
+
"url": "https://github.com/hasna/hooks.git"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
|
-
"access": "
|
|
33
|
+
"access": "public",
|
|
34
34
|
"registry": "https://registry.npmjs.org/"
|
|
35
35
|
},
|
|
36
36
|
"engines": { "node": ">=18", "bun": ">=1.0" },
|
|
@@ -52,7 +52,7 @@ function install(): void {
|
|
|
52
52
|
|
|
53
53
|
settings.hooks.PreToolUse.push({
|
|
54
54
|
matcher: "Bash",
|
|
55
|
-
hooks: [{ type: "command", command: `bunx @
|
|
55
|
+
hooks: [{ type: "command", command: `bunx @hasna/${HOOK_NAME}` }],
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
writeSettings(settings);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"lib": ["ESNext"],
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"allowImportingTsExtensions": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"declarationMap": true,
|
|
19
|
+
"outDir": "./dist",
|
|
20
|
+
"rootDir": "./src",
|
|
21
|
+
"types": ["bun-types"]
|
|
22
|
+
},
|
|
23
|
+
"include": ["src/**/*"],
|
|
24
|
+
"exclude": ["node_modules", "dist"]
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"lib": ["ESNext"],
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"allowImportingTsExtensions": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"declarationMap": true,
|
|
19
|
+
"outDir": "./dist",
|
|
20
|
+
"rootDir": "./src",
|
|
21
|
+
"types": ["bun-types"]
|
|
22
|
+
},
|
|
23
|
+
"include": ["src/**/*"],
|
|
24
|
+
"exclude": ["node_modules", "dist"]
|
|
25
|
+
}
|
|
@@ -9,7 +9,7 @@ Get notified on your phone when Claude finishes a task or needs your attention.
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
bun install -g @
|
|
12
|
+
bun install -g @hasna/hook-phonenotify
|
|
13
13
|
hook-phonenotify install my-secret-topic
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -41,4 +41,4 @@ In `~/.claude/settings.json`:
|
|
|
41
41
|
|
|
42
42
|
## License
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Apache-2.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@
|
|
2
|
+
"name": "@hasna/hook-phonenotify",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"description": "Claude Code hook that sends push notifications to phone via ntfy.sh",
|
|
5
5
|
"type": "module",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"keywords": ["claude-code", "claude", "hook", "notifications", "phone", "ntfy", "push", "cli"],
|
|
26
26
|
"author": "Hasna",
|
|
27
|
-
"license": "
|
|
27
|
+
"license": "Apache-2.0",
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
|
-
"url": "https://github.com/
|
|
30
|
+
"url": "https://github.com/hasna/hooks.git"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
|
-
"access": "
|
|
33
|
+
"access": "public",
|
|
34
34
|
"registry": "https://registry.npmjs.org/"
|
|
35
35
|
},
|
|
36
36
|
"engines": { "node": ">=18", "bun": ">=1.0" },
|
|
@@ -46,7 +46,7 @@ function install(topic?: string): void {
|
|
|
46
46
|
if (!settings.hooks.Stop) settings.hooks.Stop = [];
|
|
47
47
|
if (!settings.hooks.Notification) settings.hooks.Notification = [];
|
|
48
48
|
|
|
49
|
-
const hookCommand = `bunx @
|
|
49
|
+
const hookCommand = `bunx @hasna/${HOOK_NAME}`;
|
|
50
50
|
|
|
51
51
|
const existing = settings.hooks.Stop.find((h) =>
|
|
52
52
|
h.hooks.some((hook) => hook.command.includes(HOOK_NAME))
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"lib": ["ESNext"],
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"allowImportingTsExtensions": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"declarationMap": true,
|
|
19
|
+
"outDir": "./dist",
|
|
20
|
+
"rootDir": "./src",
|
|
21
|
+
"types": ["bun-types"]
|
|
22
|
+
},
|
|
23
|
+
"include": ["src/**/*"],
|
|
24
|
+
"exclude": ["node_modules", "dist"]
|
|
25
|
+
}
|
|
@@ -9,7 +9,7 @@ When Claude Code compacts the context (to free up token space), important state
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
bun install -g @
|
|
12
|
+
bun install -g @hasna/hook-precompact
|
|
13
13
|
hook-precompact install
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -33,4 +33,4 @@ Each handoff file (`.claude-handoffs/`) contains:
|
|
|
33
33
|
|
|
34
34
|
## License
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Apache-2.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@
|
|
2
|
+
"name": "@hasna/hook-precompact",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"description": "Claude Code hook that saves session state before context compaction",
|
|
5
5
|
"type": "module",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"keywords": ["claude-code", "claude", "hook", "precompact", "context", "session", "state", "cli"],
|
|
26
26
|
"author": "Hasna",
|
|
27
|
-
"license": "
|
|
27
|
+
"license": "Apache-2.0",
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
|
-
"url": "https://github.com/
|
|
30
|
+
"url": "https://github.com/hasna/hooks.git"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
|
-
"access": "
|
|
33
|
+
"access": "public",
|
|
34
34
|
"registry": "https://registry.npmjs.org/"
|
|
35
35
|
},
|
|
36
36
|
"engines": { "node": ">=18", "bun": ">=1.0" },
|