@cmds-cc/hooks 1.0.0 → 1.0.5
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 +4 -4
- package/lib/merge.js +1 -1
- package/package.json +4 -4
- package/examples/spok-api.json +0 -30
package/README.md
CHANGED
|
@@ -18,16 +18,16 @@ npx @cmds-cc/hooks add sieteunoseis/spok-api
|
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
# Essential safety guardrails
|
|
21
|
-
npx @cmds-cc/hooks add sieteunoseis/hooks
|
|
21
|
+
npx @cmds-cc/hooks add sieteunoseis/hooks/safety-essentials
|
|
22
22
|
|
|
23
23
|
# Cloud protection (AWS, GCP, Azure)
|
|
24
|
-
npx @cmds-cc/hooks add sieteunoseis/hooks
|
|
24
|
+
npx @cmds-cc/hooks add sieteunoseis/hooks/cloud-safety
|
|
25
25
|
|
|
26
26
|
# Kubernetes safety
|
|
27
|
-
npx @cmds-cc/hooks add sieteunoseis/hooks
|
|
27
|
+
npx @cmds-cc/hooks add sieteunoseis/hooks/kubernetes-safety
|
|
28
28
|
|
|
29
29
|
# Cisco UC CLI protection
|
|
30
|
-
npx @cmds-cc/hooks add sieteunoseis/hooks
|
|
30
|
+
npx @cmds-cc/hooks add sieteunoseis/hooks/cisco-cli-safety
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
Browse all collections at [cmds.cc/hooks](https://cmds.cc/hooks).
|
package/lib/merge.js
CHANGED
|
@@ -56,7 +56,7 @@ export async function mergeHooks(selected, manifest, repo, options) {
|
|
|
56
56
|
const noTelemetry =
|
|
57
57
|
options?.noTelemetry || process.env.CC_HOOKS_NO_TELEMETRY === "1";
|
|
58
58
|
if (repo && added > 0 && !noTelemetry) {
|
|
59
|
-
fetch("https://
|
|
59
|
+
fetch("https://cmds.cc/api/register", {
|
|
60
60
|
method: "POST",
|
|
61
61
|
headers: { "Content-Type": "application/json" },
|
|
62
62
|
body: JSON.stringify({ repo }),
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmds-cc/hooks",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Install Claude Code hooks from any GitHub repo",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jeremy Worden",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/cmds-cc/hooks"
|
|
9
|
+
"url": "git+https://github.com/cmds-cc/hooks.git"
|
|
10
10
|
},
|
|
11
11
|
"homepage": "https://cmds.cc/hooks",
|
|
12
12
|
"bin": {
|
|
13
|
+
"hooks": "./bin/cc-hooks.js",
|
|
13
14
|
"cmds-hooks": "./bin/cc-hooks.js"
|
|
14
15
|
},
|
|
15
16
|
"type": "module",
|
|
@@ -27,8 +28,7 @@
|
|
|
27
28
|
],
|
|
28
29
|
"files": [
|
|
29
30
|
"bin",
|
|
30
|
-
"lib"
|
|
31
|
-
"examples"
|
|
31
|
+
"lib"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"commander": "^14.0.0",
|
package/examples/spok-api.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "spok-api",
|
|
3
|
-
"description": "Hooks for Spok SmartSuite CLI",
|
|
4
|
-
"author": "sieteunoseis",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"hooks": [
|
|
7
|
-
{
|
|
8
|
-
"name": "Block write operations",
|
|
9
|
-
"description": "Blocks send-page, change-status, add, update, delete, assign, set, datafeed",
|
|
10
|
-
"default": true,
|
|
11
|
-
"event": "PreToolUse",
|
|
12
|
-
"matcher": "Bash",
|
|
13
|
-
"hook": {
|
|
14
|
-
"type": "command",
|
|
15
|
-
"command": "jq -r '.tool_input.command' | { read -r cmd; if echo \"$cmd\" | grep -qE '^(npx )?spok-api (send-page|change-status|add |update |delete |assign |set |datafeed )'; then echo '{\"decision\":\"block\",\"reason\":\"BLOCKED: spok-api write operation. Get explicit user approval.\"}'; fi; }"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "Enforce --read-only flag",
|
|
20
|
-
"description": "Requires --read-only on every spok-api command",
|
|
21
|
-
"default": false,
|
|
22
|
-
"event": "PreToolUse",
|
|
23
|
-
"matcher": "Bash",
|
|
24
|
-
"hook": {
|
|
25
|
-
"type": "command",
|
|
26
|
-
"command": "jq -r '.tool_input.command' | { read -r cmd; if echo \"$cmd\" | grep -qE '^(npx )?spok-api ' && ! echo \"$cmd\" | grep -q '\\-\\-read-only'; then echo '{\"decision\":\"block\",\"reason\":\"BLOCKED: spok-api must be run with --read-only. Retry with the flag.\"}'; fi; }"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
]
|
|
30
|
-
}
|