coder-config 0.42.33 → 0.42.34

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.
@@ -19,7 +19,7 @@
19
19
 
20
20
  <!-- PWA Manifest -->
21
21
  <link rel="manifest" href="/manifest.json">
22
- <script type="module" crossorigin src="/assets/index-DCsS8NHo.js"></script>
22
+ <script type="module" crossorigin src="/assets/index-Cc9KjNjc.js"></script>
23
23
  <link rel="stylesheet" crossorigin href="/assets/index-B0EJaqXM.css">
24
24
  </head>
25
25
  <body>
@@ -36,8 +36,9 @@ function getSessionStatus(projectDir) {
36
36
  }
37
37
  }
38
38
 
39
- // Check if hooks are installed
39
+ // Check if hooks and permissions are installed
40
40
  const settingsPath = path.join(os.homedir(), '.claude', 'settings.json');
41
+ status.permissionInstalled = false;
41
42
  if (fs.existsSync(settingsPath)) {
42
43
  try {
43
44
  const settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
@@ -46,6 +47,11 @@ function getSessionStatus(projectDir) {
46
47
  status.hooksInstalled = sessionStartHooks.some(h =>
47
48
  typeof h === 'object' && h.command && h.command.includes('session-start')
48
49
  );
50
+
51
+ // Check for write permission
52
+ const permissions = settings.permissions || {};
53
+ const allow = permissions.allow || [];
54
+ status.permissionInstalled = allow.includes('Write(**/.claude/session-context.md)');
49
55
  } catch (e) {
50
56
  // Ignore errors
51
57
  }
@@ -82,7 +88,7 @@ function clearContext(projectDir) {
82
88
  }
83
89
 
84
90
  /**
85
- * Install session hooks
91
+ * Install session hooks and permissions
86
92
  */
87
93
  function installHooks() {
88
94
  const claudeDir = path.join(os.homedir(), '.claude');
@@ -132,9 +138,22 @@ function installHooks() {
132
138
  settings.hooks.SessionStart.push({ type: 'command', command: sessionStartHook });
133
139
  }
134
140
 
141
+ // Add permission to write session context file
142
+ if (!settings.permissions) {
143
+ settings.permissions = {};
144
+ }
145
+ if (!settings.permissions.allow) {
146
+ settings.permissions.allow = [];
147
+ }
148
+
149
+ const contextPermission = 'Write(**/.claude/session-context.md)';
150
+ if (!settings.permissions.allow.includes(contextPermission)) {
151
+ settings.permissions.allow.push(contextPermission);
152
+ }
153
+
135
154
  try {
136
155
  fs.writeFileSync(settingsFile, JSON.stringify(settings, null, 2));
137
- return { success: true, message: 'Session hook installed' };
156
+ return { success: true, message: 'Session hook and permissions installed' };
138
157
  } catch (e) {
139
158
  return { success: false, error: 'Error writing settings.json: ' + e.message };
140
159
  }