cc-safety-net 1.0.4 → 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 CHANGED
@@ -226,6 +226,8 @@ Install CC Safety Net into your Kimi Code config:
226
226
  npx -y cc-safety-net hook install --kimi-code
227
227
  ```
228
228
 
229
+ Optional: run `npx skill add kenryu42/cc-safety-net` to add the `/cc-safety-net` skill for configuring custom rules.
230
+
229
231
  ---
230
232
 
231
233
 
@@ -6429,7 +6429,7 @@ var CLAUDE_CODE_TOOL_NAME = "Bash";
6429
6429
  var GEMINI_CLI_HOOK_EVENT = "BeforeTool";
6430
6430
  var GEMINI_CLI_TOOL_NAME = "run_shell_command";
6431
6431
  var KIMI_CODE_HOOK_EVENT = "PreToolUse";
6432
- var KIMI_CODE_TOOL_NAME = "Shell";
6432
+ var KIMI_CODE_TOOL_NAME = "Bash";
6433
6433
 
6434
6434
  // src/bin/hook/claude-code.ts
6435
6435
  async function runClaudeCodeHook() {
@@ -7531,7 +7531,7 @@ function detectGeminiCLI(extensionsListOutput) {
7531
7531
  };
7532
7532
  }
7533
7533
  function _getKimiConfigPath(homeDir) {
7534
- return join10(process.env.KIMI_SHARE_DIR || join10(homeDir, ".kimi"), "config.toml");
7534
+ return join10(process.env.KIMI_CODE_HOME || join10(homeDir, ".kimi-code"), "config.toml");
7535
7535
  }
7536
7536
  function detectKimiCode(homeDir) {
7537
7537
  const configPath = _getKimiConfigPath(homeDir);
@@ -7927,7 +7927,7 @@ import { existsSync as existsSync14 } from "node:fs";
7927
7927
  import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
7928
7928
  import { tmpdir as tmpdir4 } from "node:os";
7929
7929
  import { delimiter, extname, join as join11 } from "node:path";
7930
- var CURRENT_VERSION = "1.0.4";
7930
+ var CURRENT_VERSION = "1.0.5";
7931
7931
  var VERSION_FETCH_TIMEOUT_MS = 2000;
7932
7932
  var PI_PROBE_TIMEOUT_MS = 5000;
7933
7933
  var PI_SENTINEL_COMMAND = "cc-safety-net";
@@ -9436,7 +9436,7 @@ function formatTraceJson(result) {
9436
9436
  return JSON.stringify(result, null, 2);
9437
9437
  }
9438
9438
  // src/bin/help.ts
9439
- var version = "1.0.4";
9439
+ var version = "1.0.5";
9440
9440
  var INDENT = " ";
9441
9441
  var PROGRAM_NAME = "cc-safety-net";
9442
9442
  function formatOptionFlags(option) {
@@ -9635,11 +9635,11 @@ function removeArrayRangeItem(content, item) {
9635
9635
  var KIMI_HOOK_COMMAND = "npx -y cc-safety-net hook --kimi-code";
9636
9636
  var KIMI_HOOK_BLOCK = `[[hooks]]
9637
9637
  event = "PreToolUse"
9638
- matcher = "Shell"
9638
+ matcher = "Bash"
9639
9639
  command = "${KIMI_HOOK_COMMAND}"`;
9640
- var KIMI_INLINE_HOOK = `{ event = "PreToolUse", matcher = "Shell", command = "${KIMI_HOOK_COMMAND}" }`;
9640
+ var KIMI_INLINE_HOOK = `{ event = "PreToolUse", matcher = "Bash", command = "${KIMI_HOOK_COMMAND}" }`;
9641
9641
  function getKimiConfigPath(homeDir) {
9642
- return join12(process.env.KIMI_SHARE_DIR ?? join12(homeDir, ".kimi"), "config.toml");
9642
+ return join12(process.env.KIMI_CODE_HOME ?? join12(homeDir, ".kimi-code"), "config.toml");
9643
9643
  }
9644
9644
  function removeTopLevelEmptyHooksArray(content) {
9645
9645
  const result = content.split(`
@@ -3,4 +3,4 @@ export declare const CLAUDE_CODE_TOOL_NAME = "Bash";
3
3
  export declare const GEMINI_CLI_HOOK_EVENT = "BeforeTool";
4
4
  export declare const GEMINI_CLI_TOOL_NAME = "run_shell_command";
5
5
  export declare const KIMI_CODE_HOOK_EVENT = "PreToolUse";
6
- export declare const KIMI_CODE_TOOL_NAME = "Shell";
6
+ export declare const KIMI_CODE_TOOL_NAME = "Bash";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-safety-net",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "A coding agent CLI hook - block destructive git and filesystem commands before execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",