shadok-ai 0.2.37 → 0.2.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/index.html +28 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadok-ai",
3
- "version": "0.2.37",
3
+ "version": "0.2.39",
4
4
  "main": "dist/session.js",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test test/*.ts .claude/skills/shadok-ai-agents/test/*.test.mjs",
package/public/index.html CHANGED
@@ -1184,7 +1184,7 @@
1184
1184
  <body>
1185
1185
 
1186
1186
  <header>
1187
- <span class="brand">shadok-ai <span class="ver" id="verView" title="running version"></span></span>
1187
+ <span class="brand">shadok-ai <span class="ver" id="verView" title="Running version"></span></span>
1188
1188
  <span class="spacer"></span>
1189
1189
  <div class="gauge quota" id="quota5h" data-window="5h" title="5h rolling limit">
1190
1190
  <svg class="dial" viewBox="0 0 56 44" role="img" aria-label="5h rolling limit">
@@ -1208,7 +1208,7 @@
1208
1208
  <button id="profilesBtn" class="icon" title="Agent profiles (role + guardrails + secrets)">👤</button>
1209
1209
  <button id="cronBtn" class="icon" title="Scheduled prompts for this agent (monitoring / reporting)">⏰</button>
1210
1210
  <button id="telegramBtn" class="icon" title="Configure the Telegram bot (token, on/off, allowed chats)"><svg viewBox="0 0 24 24" width="15" height="15" style="vertical-align:-2px" aria-hidden="true"><path fill="#26A5E4" d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg></button>
1211
- <button id="muteNotif" class="icon" title="Notifications sound">🔔</button>
1211
+ <button id="muteNotif" class="icon" title="Mute the notification sound">🔔</button>
1212
1212
  <div class="more-wrap">
1213
1213
  <button id="moreBtn" class="icon" title="More">⋯</button>
1214
1214
  <div id="moreMenu" hidden>
@@ -1260,7 +1260,7 @@
1260
1260
  <form id="cronAdd" class="cron-form">
1261
1261
  <div class="field">
1262
1262
  <span class="label">Prompt to run</span>
1263
- <textarea id="cronPrompt" rows="2" placeholder="e.g. « Rédige une alerte à partir de l'anomalie détectée »"></textarea>
1263
+ <textarea id="cronPrompt" rows="2" placeholder="e.g. Write a clear alert from the anomaly the guard reported"></textarea>
1264
1264
  </div>
1265
1265
  <div class="field">
1266
1266
  <span class="label">Check command <span class="check-hint">— optional; prints nothing = nothing to report, and the agent stays asleep (0 tokens)</span></span>
@@ -1295,7 +1295,7 @@
1295
1295
  <button id="setupClose" title="Close">✕</button>
1296
1296
  </div>
1297
1297
  <div class="modal-body">
1298
- <p class="sec-note">A real Claude Code session, driven inside a pseudo-terminal. Open as many as you want Claudes working in parallel.</p>
1298
+ <p class="sec-note">A real Claude Code session not a wrapper around an API. Open as many as you like and let them work side by side.</p>
1299
1299
  <div class="field" id="profileField">
1300
1300
  <div class="field-head">
1301
1301
  <span class="label">Which agent?</span>
@@ -1314,7 +1314,7 @@
1314
1314
  </label>
1315
1315
  <label class="check" id="mirrorField">
1316
1316
  <input type="checkbox" id="mirrorInput">
1317
- <span>Mirror to Telegram <span class="check-hint">— gives this agent its own topic in the board group, so you can follow it and reply from your phone. Off by default; switchable later from the channel menu.</span></span>
1317
+ <span>Mirror to Telegram <span class="check-hint">— gives this agent its own topic in the board group, so you can follow it and reply from your phone. Off by default; switchable later from the agent menu.</span></span>
1318
1318
  </label>
1319
1319
  <details class="fold" id="advancedField">
1320
1320
  <summary>Advanced — working directory, resume an existing session</summary>
@@ -1458,7 +1458,7 @@
1458
1458
  <div id="chanBar" hidden>
1459
1459
  <span class="label" id="chanBarName"></span>
1460
1460
  <!-- Mobile: sidebar cachée → ce sélecteur change de canal / en crée un. -->
1461
- <select id="chanSelect" title="Canal"></select>
1461
+ <select id="chanSelect" title="Agent"></select>
1462
1462
  <div class="gauge">
1463
1463
  <span class="label">Status</span>
1464
1464
  <span class="value"><span id="led" class="led"></span><span id="state">—</span></span>
@@ -1478,7 +1478,7 @@
1478
1478
  <span class="chan-actions">
1479
1479
  <button id="chanCron" class="icon" title="Scheduled prompts for this agent (monitoring / reporting)">⏰</button>
1480
1480
  <button id="chanStop" class="icon stop" title="End session">⏹️</button>
1481
- <button id="chanTerm" class="icon" title="Terminal (toggle, par canal)">⌨️</button>
1481
+ <button id="chanTerm" class="icon" title="Terminal the raw TUI for this agent">⌨️</button>
1482
1482
  </span>
1483
1483
  </div>
1484
1484
 
@@ -1487,7 +1487,7 @@
1487
1487
  validation — ouvrir puis renoncer ne laisse plus d'onglet mort-né. -->
1488
1488
  <div id="emptyState">
1489
1489
  <span class="es-title">No agent open</span>
1490
- <p class="es-hint">Each agent is its own Claude Code session, working on its own directory. Start one and it takes the controls.</p>
1490
+ <p class="es-hint">Every agent is a real Claude Code session with its own directory and its own branch. Start one and it takes the controls.</p>
1491
1491
  <button class="primary" id="emptyNewBtn">+ new agent</button>
1492
1492
  </div>
1493
1493
 
@@ -2675,7 +2675,10 @@
2675
2675
  const muteBtn = $("muteNotif");
2676
2676
  function renderMute() {
2677
2677
  muteBtn.textContent = muted ? "🔕" : "🔔";
2678
- muteBtn.title = muted ? "Notifications sound off" : "Notifications sound on";
2678
+ // A toggle's tooltip says what the click will do, not what the state is:
2679
+ // "Notifications sound on" reads as a status line and leaves you guessing
2680
+ // whether clicking turns it on or off.
2681
+ muteBtn.title = muted ? "Turn the notification sound on" : "Mute the notification sound";
2679
2682
  }
2680
2683
  muteBtn.addEventListener("click", () => {
2681
2684
  muted = !muted;
@@ -2809,17 +2812,27 @@
2809
2812
  if (tab === active && el._stickBottom !== false) el.scrollTop = el.scrollHeight;
2810
2813
  }
2811
2814
 
2812
- /* Heure d'un message : « 21:57 », avec la date complète en title= — un
2813
- historique repris peut dater d'avant-hier, et hh:mm seul induirait en
2814
- erreur. `at` vient du .jsonl (même heure en direct et au rechargement) ;
2815
- absent sur les vieux transcripts on n'affiche rien plutôt qu'une heure
2816
- inventée. */
2815
+ /* Date/heure d'un message. Aujourd'hui → heure seule (« 21:57 »). Un autre
2816
+ jour date + heure (« 3 août, 21:57 »), avec l'année si elle diffère —
2817
+ sinon un historique repris de plusieurs jours affichait juste « 21:57 », ce
2818
+ qui induit en erreur. Date complète en title=. `at` vient du .jsonl (même
2819
+ valeur en direct et au rechargement) ; absent sur les vieux transcripts →
2820
+ on n'affiche rien plutôt qu'une heure inventée. */
2817
2821
  function fmtTime(at) {
2818
2822
  if (!Number.isFinite(at)) return null;
2819
2823
  const d = new Date(at);
2824
+ const now = new Date();
2825
+ const time = d.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
2820
2826
  const el = document.createElement("span");
2821
2827
  el.className = "time";
2822
- el.textContent = d.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
2828
+ if (d.toDateString() === now.toDateString()) {
2829
+ el.textContent = time;
2830
+ } else {
2831
+ const date = d.toLocaleDateString([], d.getFullYear() === now.getFullYear()
2832
+ ? { day: "numeric", month: "short" }
2833
+ : { day: "numeric", month: "short", year: "numeric" });
2834
+ el.textContent = date + ", " + time;
2835
+ }
2823
2836
  el.title = d.toLocaleString();
2824
2837
  return el;
2825
2838
  }