@jhizzard/termdeck 0.3.2 → 0.3.3

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/README.md CHANGED
@@ -22,6 +22,16 @@ Enabling Flashback takes **one additional 15-minute setup step** — see Tier 2
22
22
 
23
23
  ---
24
24
 
25
+ ## Documentation hierarchy
26
+
27
+ - **This README** — quickstart, pitch, and links
28
+ - **[docs/GETTING-STARTED.md](docs/GETTING-STARTED.md)** — full 4-tier installation guide
29
+ - **[termdeck-docs.vercel.app](https://termdeck-docs.vercel.app)** — reference docs (Astro/Starlight)
30
+ - **docs/launch/** — launch collateral (Show HN, Twitter, etc.)
31
+ - **docs/sprint-N-*/** — historical sprint logs (append-only, not maintained post-sprint)
32
+
33
+ ---
34
+
25
35
  ## How Flashback works
26
36
 
27
37
  When a panel's status transitions to `errored`, the server's output analyzer fires an event. The mnestra bridge takes the session context (type, project, last command, error tail) and queries your Mnestra memory store for the top similar match. If it finds one above the relevance threshold, the result is pushed to the panel's WebSocket as a `proactive_memory` message. The client renders it as a toast anchored to the panel, showing the match's project tag, source type, similarity score, and content snippet. You click the toast to expand into the Memory tab of that panel's drawer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jhizzard/termdeck",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Browser-based terminal multiplexer with metadata overlays, panel flashback memory recall, and AI-aware session management",
5
5
  "bin": {
6
6
  "termdeck": "./packages/cli/src/index.js"
@@ -39,17 +39,27 @@
39
39
  display: flex;
40
40
  align-items: center;
41
41
  justify-content: space-between;
42
- padding: 0 16px;
42
+ gap: 10px;
43
+ padding: 0 12px;
43
44
  height: 42px;
44
45
  background: var(--tg-surface);
45
46
  border-bottom: 1px solid var(--tg-border);
46
47
  flex-shrink: 0;
48
+ overflow-x: auto;
49
+ overflow-y: hidden;
50
+ min-width: 0;
51
+ scrollbar-width: thin;
52
+ flex-wrap: nowrap;
47
53
  }
48
54
 
55
+ .topbar::-webkit-scrollbar { height: 4px; }
56
+ .topbar::-webkit-scrollbar-thumb { background: var(--tg-border); border-radius: 2px; }
57
+
49
58
  .topbar-left {
50
59
  display: flex;
51
60
  align-items: center;
52
61
  gap: 12px;
62
+ flex-shrink: 0;
53
63
  }
54
64
 
55
65
  .topbar-logo {
@@ -66,7 +76,7 @@
66
76
 
67
77
  .topbar-stats {
68
78
  display: flex;
69
- gap: 16px;
79
+ gap: 10px;
70
80
  font-size: 11px;
71
81
  color: var(--tg-text-dim);
72
82
  }
@@ -84,6 +94,7 @@
84
94
  background: var(--tg-bg);
85
95
  padding: 3px;
86
96
  border-radius: var(--tg-radius-sm);
97
+ flex-shrink: 0;
87
98
  }
88
99
 
89
100
  .layout-btn {
@@ -104,7 +115,8 @@
104
115
  .topbar-right {
105
116
  display: flex;
106
117
  align-items: center;
107
- gap: 8px;
118
+ gap: 4px;
119
+ flex-shrink: 0;
108
120
  }
109
121
 
110
122
  .topbar-right button {
@@ -112,7 +124,7 @@
112
124
  border: 1px solid var(--tg-border);
113
125
  color: var(--tg-text-dim);
114
126
  font-size: 11px;
115
- padding: 4px 12px;
127
+ padding: 4px 8px;
116
128
  border-radius: var(--tg-radius-sm);
117
129
  cursor: pointer;
118
130
  font-family: var(--tg-sans);
@@ -20,9 +20,17 @@ try { pg = require('pg'); } catch { pg = null; }
20
20
  // servers without DATABASE_URL never pay the connection cost.
21
21
  let _rumenPool = null;
22
22
  let _rumenPoolFailed = false;
23
+ let _rumenPoolFailedAt = 0;
24
+ const RUMEN_POOL_RETRY_MS = 30_000;
23
25
  const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
24
26
  function getRumenPool() {
25
- if (_rumenPool || _rumenPoolFailed) return _rumenPool;
27
+ if (_rumenPool) return _rumenPool;
28
+ if (_rumenPoolFailed) {
29
+ if (Date.now() - _rumenPoolFailedAt < RUMEN_POOL_RETRY_MS) return null;
30
+ console.warn('[rumen] retrying pool creation after 30s cooldown');
31
+ _rumenPoolFailed = false;
32
+ _rumenPoolFailedAt = 0;
33
+ }
26
34
  if (!pg || !process.env.DATABASE_URL) return null;
27
35
  try {
28
36
  _rumenPool = new pg.Pool({
@@ -38,6 +46,7 @@ function getRumenPool() {
38
46
  } catch (err) {
39
47
  console.warn('[rumen] failed to create pg pool:', err.message);
40
48
  _rumenPoolFailed = true;
49
+ _rumenPoolFailedAt = Date.now();
41
50
  return null;
42
51
  }
43
52
  }
@@ -23,12 +23,12 @@ const CACHE_TTL_MS = 60_000;
23
23
  async function checkMnestra(config) {
24
24
  const rag = config.rag || {};
25
25
  const url = rag.mnestraWebhookUrl
26
- ? rag.mnestraWebhookUrl.replace(/\/mnestra\/?$/, '/health')
27
- : 'http://localhost:37778/health';
26
+ ? rag.mnestraWebhookUrl.replace(/\/mnestra\/?$/, '/healthz')
27
+ : 'http://localhost:37778/healthz';
28
28
 
29
29
  const body = await httpGet(url, 3000);
30
30
  const data = tryParseJSON(body);
31
- const total = data && (data.total || data.memories || data.count);
31
+ const total = data && (data.store?.rows ?? data.total ?? data.memories ?? data.count ?? null);
32
32
  if (total != null) {
33
33
  return { name: 'mnestra_reachable', passed: true, detail: `${Number(total).toLocaleString()} memories` };
34
34
  }
@@ -45,9 +45,9 @@ async function checkMnestraMemories(config) {
45
45
  ? rag.mnestraWebhookUrl.replace(/\/mnestra\/?$/, '')
46
46
  : 'http://localhost:37778';
47
47
 
48
- const body = await httpGet(`${baseUrl}/health`, 3000);
48
+ const body = await httpGet(`${baseUrl}/healthz`, 3000);
49
49
  const data = tryParseJSON(body);
50
- const total = data && (data.total || data.memories || data.count);
50
+ const total = data && (data.store?.rows ?? data.total ?? data.memories ?? data.count ?? null);
51
51
  if (total != null && Number(total) > 0) {
52
52
  return { name: 'mnestra_has_memories', passed: true, detail: `${Number(total).toLocaleString()} memories loaded` };
53
53
  }