mattermost-claude-code 0.10.9 â 0.10.10
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/CHANGELOG.md +9 -0
- package/dist/claude/session.js +43 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.10.10] - 2025-12-28
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Fixed `!permissions interactive` command** - Now actually enables interactive permissions
|
|
14
|
+
- Previously, the command set a flag but didn't restart Claude CLI, so permissions didn't change
|
|
15
|
+
- Now properly restarts Claude CLI with the MCP permission server enabled
|
|
16
|
+
- Permission prompts (đ Allow | â
Allow all | đ Deny) now appear as expected
|
|
17
|
+
- Conversation context is preserved via `--resume` flag
|
|
18
|
+
|
|
10
19
|
## [0.10.9] - 2025-12-28
|
|
11
20
|
|
|
12
21
|
### Changed
|
package/dist/claude/session.js
CHANGED
|
@@ -1294,11 +1294,51 @@ export class SessionManager {
|
|
|
1294
1294
|
await this.mattermost.createPost(`âšī¸ Interactive permissions already enabled for this session`, threadId);
|
|
1295
1295
|
return;
|
|
1296
1296
|
}
|
|
1297
|
+
// Set the flag
|
|
1297
1298
|
session.forceInteractivePermissions = true;
|
|
1298
|
-
|
|
1299
|
-
console.log(` đ
|
|
1299
|
+
const shortId = threadId.substring(0, 8);
|
|
1300
|
+
console.log(` đ Session (${shortId}âĻ) enabling interactive permissions`);
|
|
1301
|
+
// Stop the current Claude CLI and restart with new permission setting
|
|
1302
|
+
this.stopTyping(session);
|
|
1303
|
+
session.isRestarting = true; // Suppress exit message during restart
|
|
1304
|
+
session.claude.kill();
|
|
1305
|
+
// Flush any pending content
|
|
1306
|
+
await this.flush(session);
|
|
1307
|
+
session.currentPostId = null;
|
|
1308
|
+
session.pendingContent = '';
|
|
1309
|
+
// Create new CLI options with interactive permissions (skipPermissions: false)
|
|
1310
|
+
const cliOptions = {
|
|
1311
|
+
workingDir: session.workingDir,
|
|
1312
|
+
threadId: threadId,
|
|
1313
|
+
skipPermissions: false, // Force interactive permissions
|
|
1314
|
+
sessionId: session.claudeSessionId,
|
|
1315
|
+
resume: true, // Resume to keep conversation context
|
|
1316
|
+
chrome: this.chromeEnabled,
|
|
1317
|
+
};
|
|
1318
|
+
session.claude = new ClaudeCli(cliOptions);
|
|
1319
|
+
// Rebind event handlers
|
|
1320
|
+
session.claude.on('event', (e) => this.handleEvent(threadId, e));
|
|
1321
|
+
session.claude.on('exit', (code) => this.handleExit(threadId, code));
|
|
1322
|
+
// Start the new Claude CLI
|
|
1323
|
+
try {
|
|
1324
|
+
session.claude.start();
|
|
1325
|
+
// Note: isRestarting is reset in handleExit when the old process exit event fires
|
|
1326
|
+
}
|
|
1327
|
+
catch (err) {
|
|
1328
|
+
session.isRestarting = false; // Reset flag on failure since exit won't fire
|
|
1329
|
+
console.error(' â Failed to restart Claude:', err);
|
|
1330
|
+
await this.mattermost.createPost(`â Failed to enable interactive permissions: ${err}`, threadId);
|
|
1331
|
+
return;
|
|
1332
|
+
}
|
|
1333
|
+
// Update session header with new permission status
|
|
1300
1334
|
await this.updateSessionHeader(session);
|
|
1301
|
-
|
|
1335
|
+
// Post confirmation
|
|
1336
|
+
await this.mattermost.createPost(`đ **Interactive permissions enabled** for this session by @${username}\n*Claude Code restarted with permission prompts*`, threadId);
|
|
1337
|
+
console.log(` đ Interactive permissions enabled for session by @${username}`);
|
|
1338
|
+
// Update activity and persist
|
|
1339
|
+
session.lastActivityAt = new Date();
|
|
1340
|
+
session.timeoutWarningPosted = false;
|
|
1341
|
+
this.persistSession(session);
|
|
1302
1342
|
}
|
|
1303
1343
|
/** Check if a session should use interactive permissions */
|
|
1304
1344
|
isSessionInteractive(threadId) {
|