@cccarv82/freya 2.1.2 → 2.1.4

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/cli/web-ui.css CHANGED
@@ -2,8 +2,8 @@
2
2
  Keep this file plain CSS to avoid escaping issues in inline template literals. */
3
3
 
4
4
  :root {
5
- --radius: 16px;
6
- --radius2: 12px;
5
+ --radius: 0px;
6
+ --radius2: 0px;
7
7
  --shadow: 0 20px 60px rgba(16, 24, 40, .12);
8
8
  --shadow2: 0 10px 22px rgba(16, 24, 40, .10);
9
9
  --ring: 0 0 0 4px rgba(37, 99, 235, .18);
@@ -529,3 +529,6 @@ textarea:focus { box-shadow: var(--ring); border-color: rgba(45,212,191,.35); }
529
529
  .composerToggles { margin-top: 10px; display: grid; gap: 6px; }
530
530
  .toggleRow { display:flex; align-items:center; gap:10px; user-select:none; font-size: 12px; color: var(--muted); }
531
531
  .statusFooter { margin-top: 10px; display:flex; justify-content:flex-end; }
532
+
533
+
534
+ * { border-radius: 0 !important; }
package/cli/web-ui.js CHANGED
@@ -680,7 +680,7 @@
680
680
  function wireRailNav() {
681
681
  const dash = $('railDashboard');
682
682
  const rep = $('railReports');
683
- const health = $('railHealth');
683
+ const health = $('railCompanion');
684
684
  if (dash) {
685
685
  dash.onclick = () => {
686
686
  const isReports = document.body && document.body.dataset && document.body.dataset.page === 'reports';
@@ -700,8 +700,8 @@
700
700
  }
701
701
  if (health) {
702
702
  health.onclick = () => {
703
- const isHealth = document.body && document.body.dataset && document.body.dataset.page === 'health';
704
- if (!isHealth) window.location.href = '/health';
703
+ const isHealth = document.body && document.body.dataset && document.body.dataset.page === companion;
704
+ if (!isHealth) window.location.href = '/companion';
705
705
  };
706
706
  }
707
707
  }
@@ -868,7 +868,8 @@
868
868
  const r = await api('/api/pick-dir', {});
869
869
  if (r && r.dir) {
870
870
  $('dir').value = r.dir;
871
- $('sidePath').textContent = r.dir;
871
+ const sp = $('sidePath');
872
+ if (sp) sp.textContent = r.dir;
872
873
  }
873
874
  saveLocal();
874
875
  setPill('ok', 'ready');
@@ -902,7 +903,8 @@
902
903
  async function doUpdate() {
903
904
  try {
904
905
  saveLocal();
905
- $('sidePath').textContent = dirOrDefault();
906
+ const sp = $('sidePath');
907
+ if (sp) sp.textContent = dirOrDefault();
906
908
  setPill('run', 'update…');
907
909
  setOut('');
908
910
  const r = await api('/api/update', { dir: dirOrDefault() });
@@ -946,7 +948,7 @@
946
948
  async function refreshHealthChecklist() {
947
949
  try {
948
950
  setPill('run', 'checklist…');
949
- const r = await api('/api/health/checklist', { dir: dirOrDefault() });
951
+ const r = await api('/api/companion/checklist', { dir: dirOrDefault() });
950
952
  if (r && r.needsInit) {
951
953
  setOut(r.error || 'Workspace not initialized');
952
954
  setPill('plan', 'needs init');
@@ -965,10 +967,11 @@
965
967
  async function doHealth() {
966
968
  try {
967
969
  saveLocal();
968
- $('sidePath').textContent = dirOrDefault();
970
+ const sp = $('sidePath');
971
+ if (sp) sp.textContent = dirOrDefault();
969
972
  setPill('run', 'health…');
970
973
  setOut('');
971
- const r = await api('/api/health', { dir: dirOrDefault() });
974
+ const r = await api('/api/companion', { dir: dirOrDefault() });
972
975
  if (r && r.needsInit) {
973
976
  setOut(r.error || 'Workspace not initialized');
974
977
  setLast(null);
@@ -978,7 +981,7 @@
978
981
  setOut(r.output);
979
982
  setLast(null);
980
983
  setPill('ok', 'health ok');
981
- if (isHealthPage) {
984
+ if (isCompanionPage) {
982
985
  refreshHealthChecklist();
983
986
  }
984
987
  } catch (e) {
@@ -990,7 +993,8 @@
990
993
  async function doMigrate() {
991
994
  try {
992
995
  saveLocal();
993
- $('sidePath').textContent = dirOrDefault();
996
+ const sp = $('sidePath');
997
+ if (sp) sp.textContent = dirOrDefault();
994
998
  setPill('run', 'migrate…');
995
999
  setOut('');
996
1000
  const r = await api('/api/migrate', { dir: dirOrDefault() });
@@ -1006,7 +1010,8 @@
1006
1010
  async function runReport(name) {
1007
1011
  try {
1008
1012
  saveLocal();
1009
- $('sidePath').textContent = dirOrDefault();
1013
+ const sp = $('sidePath');
1014
+ if (sp) sp.textContent = dirOrDefault();
1010
1015
  setPill('run', name + '…');
1011
1016
  setOut('');
1012
1017
  const r = await api('/api/report', { dir: dirOrDefault(), script: name });
@@ -1014,7 +1019,7 @@
1014
1019
  setLast(r.reportPath || null);
1015
1020
  if (r.reportText) state.lastText = r.reportText;
1016
1021
  await refreshReports({ selectLatest: true });
1017
- if (isHealthPage) {
1022
+ if (isCompanionPage) {
1018
1023
  refreshHealthChecklist();
1019
1024
  }
1020
1025
  setPill('ok', name + ' ok');
@@ -1309,7 +1314,7 @@
1309
1314
  } catch {}
1310
1315
 
1311
1316
  const isReportsPage = document.body && document.body.dataset && document.body.dataset.page === 'reports';
1312
- const isHealthPage = document.body && document.body.dataset && document.body.dataset.page === 'health';
1317
+ const isCompanionPage = document.body && document.body.dataset && document.body.dataset.page === companion;
1313
1318
 
1314
1319
  // Load persisted settings from the workspace + bootstrap (auto-init + auto-health)
1315
1320
  (async () => {
@@ -1337,7 +1342,7 @@
1337
1342
  return;
1338
1343
  }
1339
1344
 
1340
- if (isHealthPage) {
1345
+ if (isCompanionPage) {
1341
1346
  await refreshHealthChecklist();
1342
1347
  return;
1343
1348
  }
package/cli/web.js CHANGED
@@ -877,9 +877,9 @@ function reportsHtml(defaultDir) {
877
877
  return buildReportsHtml(safeDefault, APP_VERSION);
878
878
  }
879
879
 
880
- function healthHtml(defaultDir) {
880
+ function companionHtml(defaultDir) {
881
881
  const safeDefault = String(defaultDir || './freya').replace(/\\/g, '\\\\').replace(/"/g, '\\"');
882
- return buildHealthHtml(safeDefault, APP_VERSION);
882
+ return buildCompanionHtml(safeDefault, APP_VERSION);
883
883
  }
884
884
 
885
885
  function buildHtml(safeDefault, appVersion) {
@@ -904,7 +904,7 @@ function buildHtml(safeDefault, appVersion) {
904
904
  <div class="railNav">
905
905
  <button class="railBtn active" id="railDashboard" type="button" title="Dashboard">D</button>
906
906
  <button class="railBtn" id="railReports" type="button" title="Relatórios">R</button>
907
- <button class="railBtn" id="railHealth" type="button" title="Saude">H</button>
907
+ <button class="railBtn" id="railCompanion" type="button" title="Companion">C</button>
908
908
  </div>
909
909
  <div class="railBottom">
910
910
  <div class="railStatus" id="railStatus" title="status"></div>
@@ -1154,7 +1154,7 @@ function buildReportsHtml(safeDefault, appVersion) {
1154
1154
  <div class="railNav">
1155
1155
  <button class="railBtn" id="railDashboard" type="button" title="Dashboard">D</button>
1156
1156
  <button class="railBtn active" id="railReports" type="button" title="Relatórios">R</button>
1157
- <button class="railBtn" id="railHealth" type="button" title="Saude">H</button>
1157
+ <button class="railBtn" id="railCompanion" type="button" title="Companion">C</button>
1158
1158
  </div>
1159
1159
  <div class="railBottom">
1160
1160
  <div class="railStatus" id="railStatus" title="status"></div>
@@ -1209,17 +1209,17 @@ function buildReportsHtml(safeDefault, appVersion) {
1209
1209
  </html>`
1210
1210
  }
1211
1211
 
1212
- function buildHealthHtml(safeDefault, appVersion) {
1212
+ function buildCompanionHtml(safeDefault, appVersion) {
1213
1213
  const safeVersion = escapeHtml(appVersion || 'unknown');
1214
1214
  return `<!doctype html>
1215
1215
  <html>
1216
1216
  <head>
1217
1217
  <meta charset="utf-8" />
1218
1218
  <meta name="viewport" content="width=device-width, initial-scale=1" />
1219
- <title>FREYA Health</title>
1219
+ <title>Scrum Master Companion</title>
1220
1220
  <link rel="stylesheet" href="/app.css" />
1221
1221
  </head>
1222
- <body data-page="health">
1222
+ <body data-page="companion">
1223
1223
  <div class="app">
1224
1224
  <div class="frame">
1225
1225
  <div class="shell">
@@ -1231,7 +1231,7 @@ function buildHealthHtml(safeDefault, appVersion) {
1231
1231
  <div class="railNav">
1232
1232
  <button class="railBtn" id="railDashboard" type="button" title="Dashboard">D</button>
1233
1233
  <button class="railBtn" id="railReports" type="button" title="Relatórios">R</button>
1234
- <button class="railBtn active" id="railHealth" type="button" title="Saude">H</button>
1234
+ <button class="railBtn active" id="railCompanion" type="button" title="Companion">C</button>
1235
1235
  </div>
1236
1236
  <div class="railBottom">
1237
1237
  <div class="railStatus" id="railStatus" title="status"></div>
@@ -1244,7 +1244,7 @@ function buildHealthHtml(safeDefault, appVersion) {
1244
1244
  <span class="spark"></span>
1245
1245
  <div class="brandStack">
1246
1246
  <div class="brand">FREYA</div>
1247
- <div class="brandSub">Checklist de Saude</div>
1247
+ <div class="brandSub">Scrum Master Companion</div>
1248
1248
  </div>
1249
1249
  </div>
1250
1250
  <div class="topActions">
@@ -1258,13 +1258,11 @@ function buildHealthHtml(safeDefault, appVersion) {
1258
1258
 
1259
1259
  <section class="reportsHeader">
1260
1260
  <div>
1261
- <div class="reportsTitle">Checklist de Saude</div>
1262
- <div class="reportsSubtitle">Verificacoes rapidas antes de reunioes e rituais.</div>
1261
+ <div class="reportsTitle">Scrum Master Companion</div>
1262
+ <div class="reportsSubtitle">Painel rapido para gerar relatorios e checar pendencias.</div>
1263
1263
  </div>
1264
1264
  <div class="reportsActions">
1265
- <button class="btn small" type="button" onclick="refreshHealthChecklist()">Atualizar</button>
1266
- <button class="btn small" type="button" onclick="doHealth()">Rodar health</button>
1267
- </div>
1265
+ <button class="btn small" type="button" onclick="refreshHealthChecklist()">Atualizar</button> </div>
1268
1266
  </section>
1269
1267
 
1270
1268
  <section class="reportsTools" style="grid-template-columns: repeat(auto-fit,minmax(180px,1fr));">
@@ -1610,9 +1608,9 @@ async function cmdWeb({ port, dir, open, dev }) {
1610
1608
  return;
1611
1609
  }
1612
1610
 
1613
- if (req.method === 'GET' && req.url === '/health') {
1611
+ if (req.method === 'GET' && req.url === '/companion') {
1614
1612
  try { res.__freyaDebug.workspaceDir = normalizeWorkspaceDir(dir || './freya'); } catch {}
1615
- const body = healthHtml(dir || './freya');
1613
+ const body = companionHtml(dir || './freya');
1616
1614
  res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store' });
1617
1615
  res.end(body);
1618
1616
  return;
@@ -2411,7 +2409,7 @@ async function cmdWeb({ port, dir, open, dev }) {
2411
2409
  return safeJson(res, 200, { ok: true, task: updated });
2412
2410
  }
2413
2411
 
2414
- if (req.url === '/api/health/checklist') {
2412
+ if (req.url === '/api/companion/checklist') {
2415
2413
  if (!looksLikeFreyaWorkspace(workspaceDir)) {
2416
2414
  return safeJson(res, 200, { ok: false, needsInit: true, error: 'Workspace not initialized', items: [] });
2417
2415
  }
@@ -2429,8 +2427,7 @@ async function cmdWeb({ port, dir, open, dev }) {
2429
2427
  const reportsToday = reports.filter((r) => r && String(r.name || '').includes(today)).length;
2430
2428
 
2431
2429
  const items = [
2432
- { label: 'Workspace inicializada', status: 'ok', detail: 'ok' },
2433
- { label: 'Blockers abertos', status: openBlockers > 0 ? 'warn' : 'ok', detail: `${openBlockers} aberto(s)` },
2430
+ { label: 'Blockers abertos', status: openBlockers > 0 ? 'warn' : 'ok', detail: `${openBlockers} aberto(s)` },
2434
2431
  { label: 'Tarefas DO_NOW pendentes', status: pendingTasks > 0 ? 'warn' : 'ok', detail: `${pendingTasks} pendente(s)` },
2435
2432
  { label: 'Relatorios de hoje', status: reportsToday > 0 ? 'ok' : 'warn', detail: `${reportsToday} gerado(s)` }
2436
2433
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cccarv82/freya",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "Personal AI Assistant with local-first persistence",
5
5
  "scripts": {
6
6
  "health": "node scripts/validate-data.js",