coder-config 0.42.33 → 0.42.35
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/lib/constants.js
CHANGED
package/lib/sessions.js
CHANGED
|
@@ -133,10 +133,24 @@ function installHooks() {
|
|
|
133
133
|
settings.hooks.SessionStart.push({ type: 'command', command: sessionStartHook });
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
// Add permission to write session context file
|
|
137
|
+
if (!settings.permissions) {
|
|
138
|
+
settings.permissions = {};
|
|
139
|
+
}
|
|
140
|
+
if (!settings.permissions.allow) {
|
|
141
|
+
settings.permissions.allow = [];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const contextPermission = 'Write(**/.claude/session-context.md)';
|
|
145
|
+
if (!settings.permissions.allow.includes(contextPermission)) {
|
|
146
|
+
settings.permissions.allow.push(contextPermission);
|
|
147
|
+
}
|
|
148
|
+
|
|
136
149
|
try {
|
|
137
150
|
fs.writeFileSync(settingsFile, JSON.stringify(settings, null, 2));
|
|
138
|
-
console.log('Session hook installed.\n');
|
|
151
|
+
console.log('Session hook and permissions installed.\n');
|
|
139
152
|
console.log('SessionStart hook restores context from .claude/session-context.md');
|
|
153
|
+
console.log('Write permission added for session context file.');
|
|
140
154
|
console.log('Use /flush in Claude Code to save context.');
|
|
141
155
|
} catch (e) {
|
|
142
156
|
console.error('Error writing settings.json:', e.message);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coder-config",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.35",
|
|
4
4
|
"description": "Configuration manager for AI coding tools - Claude Code, Gemini CLI, Codex CLI, Antigravity. Manage MCPs, rules, permissions, memory, and workstreams.",
|
|
5
5
|
"author": "regression.io",
|
|
6
6
|
"main": "config-loader.js",
|
|
@@ -1,26 +1,37 @@
|
|
|
1
1
|
# Flush Context to Resumable Doc
|
|
2
2
|
|
|
3
|
-
Save all current session context to a resumable document
|
|
3
|
+
Save all current session context to a resumable document.
|
|
4
4
|
|
|
5
5
|
## Instructions
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- **Task Summary**: What the user asked for and the overall goal
|
|
9
|
-
- **Current State**: Where we are in the task (completed, in-progress, blocked)
|
|
10
|
-
- **Key Decisions Made**: Important choices and their rationale
|
|
11
|
-
- **Files Modified**: List of files created or changed
|
|
12
|
-
- **Pending Work**: What still needs to be done
|
|
13
|
-
- **Important Context**: Any critical information needed to continue
|
|
7
|
+
### Step 1: Find or Create .claude Directory
|
|
14
8
|
|
|
15
|
-
|
|
16
|
-
- If `.claude/` directory doesn't exist, create it
|
|
17
|
-
- This keeps the context local to this specific project
|
|
9
|
+
Check for `.claude/` directory:
|
|
18
10
|
|
|
19
|
-
|
|
11
|
+
1. **If `.claude/` exists in current directory**: Use it directly
|
|
12
|
+
2. **If no `.claude/` in current directory**: Search parent directories for the first `.claude/` folder
|
|
13
|
+
- If found in a parent: Ask the user which to use:
|
|
14
|
+
- "Use parent project at `<parent-path>`" (saves to parent's `.claude/session-context.md`)
|
|
15
|
+
- "Create `.claude/` here" (creates `.claude/` in current directory)
|
|
16
|
+
- If no `.claude/` found anywhere: Ask the user:
|
|
17
|
+
- "Create `.claude/` in current directory?"
|
|
18
|
+
- If yes, create it. If no, abort.
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
### Step 2: Create Session Summary
|
|
21
|
+
|
|
22
|
+
Create a comprehensive summary including:
|
|
23
|
+
- **Task Summary**: What the user asked for and the overall goal
|
|
24
|
+
- **Current State**: Where we are in the task (completed, in-progress, blocked)
|
|
25
|
+
- **Key Decisions Made**: Important choices and their rationale
|
|
26
|
+
- **Files Modified**: List of files created or changed
|
|
27
|
+
- **Pending Work**: What still needs to be done
|
|
28
|
+
- **Important Context**: Any critical information needed to continue
|
|
29
|
+
|
|
30
|
+
### Step 3: Write and Confirm
|
|
22
31
|
|
|
23
|
-
Write the
|
|
32
|
+
Write the summary to `<chosen-directory>/.claude/session-context.md` and confirm to the user.
|
|
33
|
+
|
|
34
|
+
## Output Format
|
|
24
35
|
|
|
25
36
|
```markdown
|
|
26
37
|
# Session Context - [Date]
|