claude-code-autoconfig 1.0.135 → 1.0.137

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.
@@ -1,14 +1,15 @@
1
1
  <!-- @description Recovers conversation context from the session transcript after compaction. -->
2
- <!-- @version 2 -->
2
+ <!-- @version 3 -->
3
3
  Recover recent conversation context from the raw session transcript on disk.
4
4
 
5
5
  Usage:
6
6
  - `/recover-context -60` — last 60 minutes of conversation
7
+ - `/recover-context 60` — same thing (dash is optional)
7
8
  - `/recover-context -30` — last 30 minutes
8
9
  - `/recover-context -120` — last 2 hours
9
10
  - `/recover-context -60 --show` — same as above, but also opens the filtered transcript in default editor
10
11
 
11
- The negative number means "go back N minutes from now." The minutes argument is **required**.
12
+ The number means "go back N minutes from now." The leading dash is optional. The minutes argument is **required**.
12
13
 
13
14
  ## Step 1: Parse the arguments
14
15
 
@@ -1315,7 +1315,7 @@
1315
1315
  },
1316
1316
  'recover-context': {
1317
1317
  title: 'recover-context.md',
1318
- desc: 'Recovers conversation context from the session transcript after compaction.',
1318
+ desc: 'Recovers conversation context from the session transcript after compaction.\n\nUsage: /recover-context -60 (last 60 min), -30 (last 30 min), -120 (last 2 hrs).\nAdd --show to open the transcript in your editor.\nThe number works with or without the leading dash.',
1319
1319
  trigger: '/recover-context'
1320
1320
  },
1321
1321
  'show-docs': {
@@ -2047,82 +2047,82 @@ Claude reads this file but must never write to it. When Claude discovers project
2047
2047
  },
2048
2048
  'settings': {
2049
2049
  filename: 'settings.json',
2050
- content: `{
2051
- "env": {
2052
- "CLAUDE_CODE_DISABLE_AUTO_MEMORY": "0"
2053
- },
2054
- "hooks": {
2055
- "SessionStart": [
2056
- {
2057
- "matcher": "",
2058
- "hooks": [
2059
- {
2060
- "type": "command",
2061
- "command": "node .claude/hooks/migrate-feedback.js"
2062
- }
2063
- ]
2064
- }
2065
- ],
2066
- "PostToolUse": [
2067
- {
2068
- "matcher": "Edit|Write",
2069
- "hooks": [
2070
- {
2071
- "type": "command",
2072
- "command": "node .claude/hooks/feedback-rule-check.js"
2073
- }
2074
- ]
2075
- }
2076
- ]
2077
- },
2078
- "permissions": {
2079
- "allow": [
2080
- "Read(./**)",
2081
- "Edit(./**)",
2082
- "Write(./**)",
2083
- "Glob",
2084
- "Grep",
2085
- "WebSearch",
2086
- "WebFetch",
2087
- "Bash(npm run dev)",
2088
- "Bash(npm run build)",
2089
- "Bash(npm run lint)",
2090
- "Bash(npm run lint:fix)",
2091
- "Bash(npm run typecheck)",
2092
- "Bash(npm run test)",
2093
- "Bash(npm run test:*)",
2094
- "Bash(npm run validate)",
2095
- "Bash(git status)",
2096
- "Bash(git diff:*)",
2097
- "Bash(git add:*)",
2098
- "Bash(git commit:*)",
2099
- "Bash(git push:*)",
2100
- "Bash(git pull)",
2101
- "Bash(git checkout:*)",
2102
- "Bash(git branch:*)",
2103
- "Bash(ls:*)",
2104
- "Bash(dir:*)",
2105
- "Bash(mkdir:*)",
2106
- "Bash(mkdir -p:*)",
2107
- "Bash(start:*)",
2108
- "Bash(start .claude:*)",
2109
- "Bash(open:*)",
2110
- "Bash(open .claude:*)",
2111
- "Bash(xdg-open:*)",
2112
- "Bash(xdg-open .claude:*)"
2113
- ],
2114
- "deny": [
2115
- "Read(./.env)",
2116
- "Read(./.env.*)",
2117
- "Read(./secrets/**)",
2118
- "Read(./**/credentials.*)",
2119
- "Read(./**/*.pem)",
2120
- "Read(./**/*.key)",
2121
- "Bash(rm -rf:*)",
2122
- "Bash(curl:*)",
2123
- "Bash(wget:*)"
2124
- ]
2125
- }
2050
+ content: `{
2051
+ "env": {
2052
+ "CLAUDE_CODE_DISABLE_AUTO_MEMORY": "0"
2053
+ },
2054
+ "hooks": {
2055
+ "SessionStart": [
2056
+ {
2057
+ "matcher": "",
2058
+ "hooks": [
2059
+ {
2060
+ "type": "command",
2061
+ "command": "node .claude/hooks/migrate-feedback.js"
2062
+ }
2063
+ ]
2064
+ }
2065
+ ],
2066
+ "PostToolUse": [
2067
+ {
2068
+ "matcher": "Edit|Write",
2069
+ "hooks": [
2070
+ {
2071
+ "type": "command",
2072
+ "command": "node .claude/hooks/feedback-rule-check.js"
2073
+ }
2074
+ ]
2075
+ }
2076
+ ]
2077
+ },
2078
+ "permissions": {
2079
+ "allow": [
2080
+ "Read(./**)",
2081
+ "Edit(./**)",
2082
+ "Write(./**)",
2083
+ "Glob",
2084
+ "Grep",
2085
+ "WebSearch",
2086
+ "WebFetch",
2087
+ "Bash(npm run dev)",
2088
+ "Bash(npm run build)",
2089
+ "Bash(npm run lint)",
2090
+ "Bash(npm run lint:fix)",
2091
+ "Bash(npm run typecheck)",
2092
+ "Bash(npm run test)",
2093
+ "Bash(npm run test:*)",
2094
+ "Bash(npm run validate)",
2095
+ "Bash(git status)",
2096
+ "Bash(git diff:*)",
2097
+ "Bash(git add:*)",
2098
+ "Bash(git commit:*)",
2099
+ "Bash(git push:*)",
2100
+ "Bash(git pull)",
2101
+ "Bash(git checkout:*)",
2102
+ "Bash(git branch:*)",
2103
+ "Bash(ls:*)",
2104
+ "Bash(dir:*)",
2105
+ "Bash(mkdir:*)",
2106
+ "Bash(mkdir -p:*)",
2107
+ "Bash(start:*)",
2108
+ "Bash(start .claude:*)",
2109
+ "Bash(open:*)",
2110
+ "Bash(open .claude:*)",
2111
+ "Bash(xdg-open:*)",
2112
+ "Bash(xdg-open .claude:*)"
2113
+ ],
2114
+ "deny": [
2115
+ "Read(./.env)",
2116
+ "Read(./.env.*)",
2117
+ "Read(./secrets/**)",
2118
+ "Read(./**/credentials.*)",
2119
+ "Read(./**/*.pem)",
2120
+ "Read(./**/*.key)",
2121
+ "Bash(rm -rf:*)",
2122
+ "Bash(curl:*)",
2123
+ "Bash(wget:*)"
2124
+ ]
2125
+ }
2126
2126
  }`
2127
2127
  },
2128
2128
  'mcp': {
@@ -1,77 +1,81 @@
1
- {
2
- "env": {
3
- "CLAUDE_CODE_DISABLE_AUTO_MEMORY": "0"
4
- },
5
- "hooks": {
6
- "SessionStart": [
7
- {
8
- "matcher": "",
9
- "hooks": [
10
- {
11
- "type": "command",
12
- "command": "node .claude/hooks/migrate-feedback.js"
13
- }
14
- ]
15
- }
16
- ],
17
- "PostToolUse": [
18
- {
19
- "matcher": "Edit|Write",
20
- "hooks": [
21
- {
22
- "type": "command",
23
- "command": "node .claude/hooks/feedback-rule-check.js"
24
- }
25
- ]
26
- }
27
- ]
28
- },
29
- "permissions": {
30
- "allow": [
31
- "Read(./**)",
32
- "Edit(./**)",
33
- "Write(./**)",
34
- "Glob",
35
- "Grep",
36
- "WebSearch",
37
- "WebFetch",
38
- "Bash(npm run dev)",
39
- "Bash(npm run build)",
40
- "Bash(npm run lint)",
41
- "Bash(npm run lint:fix)",
42
- "Bash(npm run typecheck)",
43
- "Bash(npm run test)",
44
- "Bash(npm run test:*)",
45
- "Bash(npm run validate)",
46
- "Bash(git status)",
47
- "Bash(git diff:*)",
48
- "Bash(git add:*)",
49
- "Bash(git commit:*)",
50
- "Bash(git push:*)",
51
- "Bash(git pull)",
52
- "Bash(git checkout:*)",
53
- "Bash(git branch:*)",
54
- "Bash(ls:*)",
55
- "Bash(dir:*)",
56
- "Bash(mkdir:*)",
57
- "Bash(mkdir -p:*)",
58
- "Bash(start:*)",
59
- "Bash(start .claude:*)",
60
- "Bash(open:*)",
61
- "Bash(open .claude:*)",
62
- "Bash(xdg-open:*)",
63
- "Bash(xdg-open .claude:*)"
64
- ],
65
- "deny": [
66
- "Read(./.env)",
67
- "Read(./.env.*)",
68
- "Read(./secrets/**)",
69
- "Read(./**/credentials.*)",
70
- "Read(./**/*.pem)",
71
- "Read(./**/*.key)",
72
- "Bash(rm -rf:*)",
73
- "Bash(curl:*)",
74
- "Bash(wget:*)"
75
- ]
76
- }
77
- }
1
+ {
2
+ "env": {
3
+ "CLAUDE_CODE_DISABLE_AUTO_MEMORY": "0"
4
+ },
5
+ "hooks": {
6
+ "SessionStart": [
7
+ {
8
+ "matcher": "",
9
+ "hooks": [
10
+ {
11
+ "type": "command",
12
+ "command": "node .claude/hooks/migrate-feedback.js"
13
+ }
14
+ ]
15
+ }
16
+ ],
17
+ "PostToolUse": [
18
+ {
19
+ "matcher": "Edit|Write",
20
+ "hooks": [
21
+ {
22
+ "type": "command",
23
+ "command": "node .claude/hooks/feedback-rule-check.js"
24
+ }
25
+ ]
26
+ }
27
+ ]
28
+ },
29
+ "permissions": {
30
+ "allow": [
31
+ "Read(./**)",
32
+ "Edit(./**)",
33
+ "Write(./**)",
34
+ "Glob",
35
+ "Grep",
36
+ "WebSearch",
37
+ "WebFetch",
38
+ "Bash(npm test)",
39
+ "Bash(npm test *)",
40
+ "Bash(npm run dev)",
41
+ "Bash(npm run build)",
42
+ "Bash(npm run lint)",
43
+ "Bash(npm run lint:fix)",
44
+ "Bash(npm run typecheck)",
45
+ "Bash(npm run test)",
46
+ "Bash(npm run test:*)",
47
+ "Bash(npm run validate)",
48
+ "Bash(git status)",
49
+ "Bash(git status *)",
50
+ "Bash(git diff *)",
51
+ "Bash(git add *)",
52
+ "Bash(git commit *)",
53
+ "Bash(git push *)",
54
+ "Bash(git pull)",
55
+ "Bash(git pull *)",
56
+ "Bash(git checkout *)",
57
+ "Bash(git branch *)",
58
+ "Bash(ls *)",
59
+ "Bash(dir *)",
60
+ "Bash(mkdir *)",
61
+ "Bash(mkdir -p *)",
62
+ "Bash(start *)",
63
+ "Bash(start .claude *)",
64
+ "Bash(open *)",
65
+ "Bash(open .claude *)",
66
+ "Bash(xdg-open *)",
67
+ "Bash(xdg-open .claude *)"
68
+ ],
69
+ "deny": [
70
+ "Read(./.env)",
71
+ "Read(./.env.*)",
72
+ "Read(./secrets/**)",
73
+ "Read(./**/credentials.*)",
74
+ "Read(./**/*.pem)",
75
+ "Read(./**/*.key)",
76
+ "Bash(rm -rf *)",
77
+ "Bash(curl *)",
78
+ "Bash(wget *)"
79
+ ]
80
+ }
81
+ }
package/bin/cli.js CHANGED
@@ -451,17 +451,19 @@ if (fs.existsSync(updatesSrc)) {
451
451
  copyDirIfMissing(updatesSrc, path.join(claudeDest, 'updates'));
452
452
  }
453
453
 
454
- // Copy settings.json — fresh install gets full copy, upgrades get hooks merged
454
+ // Copy settings.json — fresh install gets full copy, upgrades get hooks + permissions merged
455
455
  const settingsSrc = path.join(packageDir, '.claude', 'settings.json');
456
456
  const settingsDest = path.join(claudeDest, 'settings.json');
457
457
  if (fs.existsSync(settingsSrc)) {
458
458
  if (forceMode || !fs.existsSync(settingsDest)) {
459
459
  fs.copyFileSync(settingsSrc, settingsDest);
460
460
  } else {
461
- // Merge hooks from package into existing settings
461
+ // Merge hooks and permissions from package into existing settings
462
462
  try {
463
463
  const pkgSettings = JSON.parse(fs.readFileSync(settingsSrc, 'utf8'));
464
464
  const userSettings = JSON.parse(fs.readFileSync(settingsDest, 'utf8'));
465
+
466
+ // Merge hooks
465
467
  if (pkgSettings.hooks) {
466
468
  if (!userSettings.hooks) userSettings.hooks = {};
467
469
  for (const [event, matchers] of Object.entries(pkgSettings.hooks)) {
@@ -488,8 +490,31 @@ if (fs.existsSync(settingsSrc)) {
488
490
  }
489
491
  }
490
492
  }
491
- fs.writeFileSync(settingsDest, JSON.stringify(userSettings, null, 2));
492
493
  }
494
+
495
+ // Merge permissions — add missing allow/deny entries, migrate deprecated :* syntax
496
+ if (pkgSettings.permissions) {
497
+ if (!userSettings.permissions) userSettings.permissions = {};
498
+ for (const key of ['allow', 'deny']) {
499
+ if (!pkgSettings.permissions[key]) continue;
500
+ if (!userSettings.permissions[key]) {
501
+ userSettings.permissions[key] = pkgSettings.permissions[key];
502
+ } else {
503
+ // Migrate deprecated :* syntax to space-* in existing entries
504
+ userSettings.permissions[key] = userSettings.permissions[key].map(rule =>
505
+ rule.replace(/^(Bash\([^)]*):(\*\))$/, '$1 $2')
506
+ );
507
+ // Add any package rules not already present
508
+ for (const rule of pkgSettings.permissions[key]) {
509
+ if (!userSettings.permissions[key].includes(rule)) {
510
+ userSettings.permissions[key].push(rule);
511
+ }
512
+ }
513
+ }
514
+ }
515
+ }
516
+
517
+ fs.writeFileSync(settingsDest, JSON.stringify(userSettings, null, 2));
493
518
  } catch (err) {
494
519
  // If merge fails, don't break the install
495
520
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-autoconfig",
3
- "version": "1.0.135",
3
+ "version": "1.0.137",
4
4
  "description": "Intelligent, self-configuring setup for Claude Code. One command analyzes your project, configures Claude, and shows you what it did.",
5
5
  "author": "ADAC 1001 <info@adac1001.com>",
6
6
  "license": "MIT",