clementine-agent 1.0.37 → 1.0.39

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.
@@ -1159,6 +1159,17 @@ function writeCronFileAt(cronFile, parsed, jobs) {
1159
1159
  }
1160
1160
  // ── Express app ──────────────────────────────────────────────────────
1161
1161
  export async function cmdDashboard(opts) {
1162
+ // Ensure BASE_DIR exists before any dashboard-local files (PID file, auth
1163
+ // token) are written. Other CLI commands route through ensureDataHome() in
1164
+ // index.ts, but the dashboard command doesn't — on a truly fresh install
1165
+ // where someone runs `clementine dashboard` before `clementine launch` or
1166
+ // `config setup`, the parent-process writeFileSync(DASHBOARD_PID_FILE)
1167
+ // would ENOENT and the dashboard would die before the browser could see
1168
+ // it. Idempotent, so safe for every invocation.
1169
+ try {
1170
+ mkdirSync(BASE_DIR, { recursive: true });
1171
+ }
1172
+ catch { /* ignore */ }
1162
1173
  // Child process skips the kill step — parent already handled it
1163
1174
  if (!process.env.__CLEM_DASHBOARD_CHILD) {
1164
1175
  const killed = killExistingDashboards();
@@ -9328,7 +9339,7 @@ if('serviceWorker' in navigator){navigator.serviceWorker.getRegistrations().then
9328
9339
  const wmHtml = a.workingMemorySnippet
9329
9340
  ? '<div style="margin-top:8px;padding:8px;background:var(--bg-input);border-radius:6px;font-size:11px;color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap">' + a.workingMemorySnippet + '</div>'
9330
9341
  : '';
9331
- return '<div style="background:var(--bg-card);border:1px solid var(--border);border-radius:12px;padding:16px;cursor:pointer" onclick="showPage(\'team\');setTimeout(()=>selectAgent(\''+a.slug+'\'),100)">' +
9342
+ return '<div style="background:var(--bg-card);border:1px solid var(--border);border-radius:12px;padding:16px;cursor:pointer" onclick="showPage(\\'team\\');setTimeout(()=>selectAgent(\\''+a.slug+'\\'),100)">' +
9332
9343
  '<div style="display:flex;align-items:center;gap:10px;margin-bottom:10px">' +
9333
9344
  '<div style="width:40px;height:40px;border-radius:50%;background:var(--clementine);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:18px">' + avatarLetter + '</div>' +
9334
9345
  '<div><div style="font-weight:600">' + (a.name || a.slug) + '</div>' +
@@ -16480,11 +16491,11 @@ async function applyBrokenJobFix(jobName) {
16480
16491
  return;
16481
16492
  }
16482
16493
  var diffPreview = (dryRes.diff || '(no diff)').slice(0, 1200);
16483
- var msg = 'Apply this fix to ' + jobName + '?\n\n'
16484
- + 'File: ' + (dryRes.file || 'unknown') + '\n'
16485
- + 'Operations: ' + (dryRes.appliedOps || []).length + '\n\n'
16494
+ var msg = 'Apply this fix to ' + jobName + '?\\n\\n'
16495
+ + 'File: ' + (dryRes.file || 'unknown') + '\\n'
16496
+ + 'Operations: ' + (dryRes.appliedOps || []).length + '\\n\\n'
16486
16497
  + diffPreview
16487
- + '\n\nA .bak will be written. The daemon auto-reloads; the next run will be fix-verified.';
16498
+ + '\\n\\nA .bak will be written. The daemon auto-reloads; the next run will be fix-verified.';
16488
16499
  if (!confirm(msg)) return;
16489
16500
 
16490
16501
  var res = await apiJson('POST', '/api/cron/broken-jobs/' + encodeURIComponent(jobName) + '/apply-fix', {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clementine-agent",
3
- "version": "1.0.37",
3
+ "version": "1.0.39",
4
4
  "description": "Clementine — Personal AI Assistant (TypeScript)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",