@radnine/claude-session-daemon 0.9.4 → 0.9.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radnine/claude-session-daemon",
3
- "version": "0.9.4",
3
+ "version": "0.9.5",
4
4
  "description": "Node.js daemon for managing Claude CLI sessions",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -20,7 +20,8 @@ const RANK_TITLES = { 1: 'Chief of Staff', 2: 'officer', 3: 'crew' };
20
20
  * For each .md file:
21
21
  * - slug is derived from the filename (minus the .md suffix)
22
22
  * - YAML frontmatter is parsed for optional `name`, `description`, `role`, `tokens`
23
- * (the heartbeat wire format calls this field `decision_tokens` — see below)
23
+ * (the heartbeat wire format calls this field `decision_tokens` — see below),
24
+ * `model` and `reasoning_effort`
24
25
  * - body is parsed but NOT included in the returned metadata (heartbeat carries
25
26
  * metadata only; body is re-read at activation time in Phase 3)
26
27
  * - path is returned relative to workingDir for stable cross-pilot keys
@@ -30,6 +31,10 @@ const RANK_TITLES = { 1: 'Chief of Staff', 2: 'officer', 3: 'crew' };
30
31
  * filter_parameters rule (which redacts anything matching /token/) doesn't
31
32
  * blank the array in dev logs. Same data, name chosen for log-friendliness.
32
33
  *
34
+ * `model` and `reasoning_effort` (#596) are what the persona launches with
35
+ * when nobody picks. They pass through as trimmed text; Rails owns the model
36
+ * list and drops a value it doesn't know.
37
+ *
33
38
  * Failure modes are non-fatal:
34
39
  * - missing personas directory => empty array
35
40
  * - unreadable file => skipped with logger.warn
@@ -39,7 +44,7 @@ const RANK_TITLES = { 1: 'Chief of Staff', 2: 'officer', 3: 'crew' };
39
44
  * @param {string} workingDir - The pilot's working directory.
40
45
  * @param {object} [opts]
41
46
  * @param {{warn: function}} [opts.logger] - Optional logger; warnings only.
42
- * @returns {Promise<Array<{slug: string, name: string|null, description: string|null, path: string, role: string|null, decision_tokens: Array|null}>>}
47
+ * @returns {Promise<Array<{slug: string, name: string|null, description: string|null, path: string, role: string|null, decision_tokens: Array|null, model: string|null, reasoning_effort: string|null}>>}
43
48
  */
44
49
  async function scanPersonas(workingDir, opts = {}) {
45
50
  if (!workingDir) return [];
@@ -100,6 +105,8 @@ async function _parsePersonaFile(filePath, fileName, workingDir, logger) {
100
105
  path: path.relative(workingDir, filePath),
101
106
  role: _stringOrNull(frontmatter.role),
102
107
  decision_tokens: Array.isArray(frontmatter.tokens) ? frontmatter.tokens.slice() : null,
108
+ model: _trimmedOrNull(frontmatter.model),
109
+ reasoning_effort: _trimmedOrNull(frontmatter.reasoning_effort),
103
110
  };
104
111
  }
105
112
 
@@ -107,6 +114,10 @@ function _stringOrNull(v) {
107
114
  return typeof v === 'string' && v.length > 0 ? v : null;
108
115
  }
109
116
 
117
+ function _trimmedOrNull(v) {
118
+ return typeof v === 'string' ? _stringOrNull(v.trim()) : null;
119
+ }
120
+
110
121
  /**
111
122
  * Read a persona file fresh from disk, validate it stays inside the
112
123
  * pilot's working tree, strip frontmatter, and return the body.