@radnine/claude-session-daemon 0.7.3 → 0.7.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/package.json
CHANGED
package/src/claude-process.js
CHANGED
|
@@ -31,6 +31,7 @@ class ClaudeProcess extends EventEmitter {
|
|
|
31
31
|
* @param {Function} [options._spawnFn] - For testing: replacement for child_process.spawn
|
|
32
32
|
* @param {object} [options.sessionEnv] - Extra env vars to inject into the spawned process
|
|
33
33
|
* @param {string} [options.systemPrompt] - Appended to Claude's default system prompt at spawn time via --append-system-prompt
|
|
34
|
+
* @param {string} [options.model] - Claude model id passed to the CLI via --model (e.g. claude-opus-4-8)
|
|
34
35
|
*/
|
|
35
36
|
constructor(sessionId, options = {}) {
|
|
36
37
|
super();
|
|
@@ -46,6 +47,7 @@ class ClaudeProcess extends EventEmitter {
|
|
|
46
47
|
this._spawnFn = options._spawnFn || defaultSpawn;
|
|
47
48
|
this._sessionEnv = options.sessionEnv || {};
|
|
48
49
|
this._systemPrompt = options.systemPrompt || null;
|
|
50
|
+
this._model = options.model || null;
|
|
49
51
|
|
|
50
52
|
this._state = 'idle';
|
|
51
53
|
this._child = null;
|
|
@@ -89,6 +91,10 @@ class ClaudeProcess extends EventEmitter {
|
|
|
89
91
|
|
|
90
92
|
args.push('--replay-user-messages');
|
|
91
93
|
|
|
94
|
+
if (this._model) {
|
|
95
|
+
args.push('--model', this._model);
|
|
96
|
+
}
|
|
97
|
+
|
|
92
98
|
if (this._systemPrompt) {
|
|
93
99
|
args.push('--append-system-prompt', this._systemPrompt);
|
|
94
100
|
}
|
|
@@ -652,6 +652,7 @@ class ActionCableClient extends BaseConnection {
|
|
|
652
652
|
const claudeSessionId = message.claude_session_id || undefined;
|
|
653
653
|
const resetGit = !!message.reset_git_state;
|
|
654
654
|
const systemPromptPath = message.system_prompt_path || undefined;
|
|
655
|
+
const model = message.model || undefined;
|
|
655
656
|
let systemPrompt = message.system_prompt || undefined;
|
|
656
657
|
|
|
657
658
|
if (systemPromptPath) {
|
|
@@ -682,6 +683,7 @@ class ActionCableClient extends BaseConnection {
|
|
|
682
683
|
claudeSessionId,
|
|
683
684
|
resetGit,
|
|
684
685
|
systemPrompt,
|
|
686
|
+
model,
|
|
685
687
|
});
|
|
686
688
|
|
|
687
689
|
this.sendDaemonMessage({
|
package/src/daemon.js
CHANGED
|
@@ -180,6 +180,7 @@ class Daemon extends EventEmitter {
|
|
|
180
180
|
permissionPort: this._permissionPort || null,
|
|
181
181
|
sessionEnv: options.sessionEnv || {},
|
|
182
182
|
systemPrompt: options.systemPrompt,
|
|
183
|
+
model: options.model,
|
|
183
184
|
logger: this._logger.child(`Session:${sessionId}`),
|
|
184
185
|
});
|
|
185
186
|
|
package/src/persona-scanner.js
CHANGED
|
@@ -49,7 +49,13 @@ async function scanPersonas(workingDir, opts = {}) {
|
|
|
49
49
|
|
|
50
50
|
const personas = [];
|
|
51
51
|
for (const entry of entries) {
|
|
52
|
-
|
|
52
|
+
// Accept symlinks too — vault setups (e.g. Command Center) often
|
|
53
|
+
// symlink .claude/personas/<slug>.md to a canonical Agents/*.md
|
|
54
|
+
// note so the persona and the vault note share one source.
|
|
55
|
+
// fs.readFile follows symlinks transparently; if the link is broken
|
|
56
|
+
// or points at a non-file, _parsePersonaFile logs and skips.
|
|
57
|
+
if (!entry.name.endsWith('.md')) continue;
|
|
58
|
+
if (!entry.isFile() && !entry.isSymbolicLink()) continue;
|
|
53
59
|
const filePath = path.join(personaDir, entry.name);
|
|
54
60
|
const persona = await _parsePersonaFile(filePath, entry.name, workingDir, logger);
|
|
55
61
|
if (persona) personas.push(persona);
|