principles-disciple 1.54.0 → 1.55.0

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.
@@ -2,7 +2,7 @@
2
2
  "id": "principles-disciple",
3
3
  "name": "Principles Disciple",
4
4
  "description": "Evolutionary programming agent framework with strategic guardrails and reflection loops.",
5
- "version": "1.54.0",
5
+ "version": "1.55.0",
6
6
  "skills": [
7
7
  "./skills"
8
8
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "principles-disciple",
3
- "version": "1.54.0",
3
+ "version": "1.55.0",
4
4
  "description": "Native OpenClaw plugin for Principles Disciple",
5
5
  "type": "module",
6
6
  "main": "./dist/bundle.js",
@@ -15,7 +15,7 @@
15
15
  * SAFETY:
16
16
  * - Never load entire file (tail-only, max 512KB)
17
17
  * - Skip lines > 100KB (real files have 11MB single lines)
18
- * - Cap total output at 1500 chars
18
+ * - Cap total output at 2000 chars
19
19
  * - All errors caught silently — return empty string on failure
20
20
  */
21
21
 
@@ -35,9 +35,9 @@ const TAIL_READ_SIZE = 512_000; // 512KB
35
35
  /** Max turns to extract */
36
36
  const MAX_TURNS = 8;
37
37
  /** Max chars per turn entry */
38
- const MAX_TURN_CHARS = 250;
38
+ const MAX_TURN_CHARS = 400;
39
39
  /** Max total output */
40
- const MAX_OUTPUT_CHARS = 1500;
40
+ const MAX_OUTPUT_CHARS = 2000;
41
41
 
42
42
  /** Valid characters for session IDs and agent IDs — prevents path traversal */
43
43
  const SAFE_ID_REGEX = /^[a-zA-Z0-9_-]+$/;
@@ -155,19 +155,24 @@ function extractTurn(msg: ParsedMessage): string | null {
155
155
  }
156
156
 
157
157
  if (msg.role === 'assistant') {
158
- // Priority 1: final text reply
158
+ const parts: string[] = [];
159
+
160
+ // Priority 1: final text reply (if present)
159
161
  if (msg.textParts.length > 0) {
160
162
  const text = msg.textParts.join(' ').trim();
161
- if (text) return `[Assistant]: ${text.substring(0, MAX_TURN_CHARS)}`;
163
+ if (text) parts.push(`[Assistant]: ${text.substring(0, MAX_TURN_CHARS)}`);
162
164
  }
163
- // Priority 2: tool call summary (what operations were performed)
165
+
166
+ // Priority 2: tool call summary (always include if present, for context)
164
167
  if (msg.toolCalls.length > 0) {
165
168
  const tools = msg.toolCalls.map(tc => tc.name).filter(Boolean);
166
169
  const uniqueTools = [...new Set(tools)];
167
170
  if (uniqueTools.length > 0) {
168
- return `[Assistant → ${uniqueTools.join(', ')}]`;
171
+ parts.push(`[Assistant → ${uniqueTools.join(', ')}]`);
169
172
  }
170
173
  }
174
+
175
+ return parts.length > 0 ? parts.join(' ') : null;
171
176
  }
172
177
 
173
178
  if (msg.role === 'toolResult') {
@@ -179,8 +179,16 @@ export async function auditEventLogs(
179
179
  recentEntries: recent,
180
180
  });
181
181
 
182
- // Determine primary path (workspace-main or most recent)
183
- if (filePath.includes('workspace-main') || filePath.includes('workspace-main')) {
182
+ // Determine primary path - prefer configured workspace over workspace-main
183
+ // The configured workspace path is {openclawDir}/workspace (without -main suffix)
184
+ const workspaceDir = path.join(openclawDir, 'workspace') + path.sep;
185
+ const workspaceMainDir = path.join(openclawDir, 'workspace-main') + path.sep;
186
+
187
+ if (filePath.startsWith(workspaceDir)) {
188
+ // Configured workspace (e.g., ~/.openclaw/workspace/) takes priority
189
+ primaryPath = filePath;
190
+ } else if (!primaryPath && filePath.startsWith(workspaceMainDir)) {
191
+ // Fallback to workspace-main only if no configured workspace found yet
184
192
  primaryPath = filePath;
185
193
  }
186
194
  } catch {