@jhizzard/termdeck 0.3.4 → 0.3.6

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
@@ -137,7 +137,7 @@ Restart Claude Code. Six MCP tools appear: `memory_remember`, `memory_recall`, `
137
137
 
138
138
  ### Tier 3 — Add Rumen for async learning
139
139
 
140
- Rumen is a separate npm package — `@jhizzard/rumen@0.3.6` — that ships as a Supabase Edge Function designed to run on a 15-minute `pg_cron` schedule. It's the async reflection layer over Mnestra: it reads recent session memories, cross-references them with your entire historical corpus via hybrid search, synthesizes insights via Claude Haiku, and writes the results back into `rumen_insights` (a new table alongside Mnestra's `memory_items`). TermDeck's Flashback and Claude Code's `memory_recall` both automatically benefit because insights flow back into the same database.
140
+ Rumen is a separate npm package — `@jhizzard/rumen@0.4.0` — that ships as a Supabase Edge Function designed to run on a 15-minute `pg_cron` schedule. It's the async reflection layer over Mnestra: it reads recent session memories, cross-references them with your entire historical corpus via hybrid search, synthesizes insights via Claude Haiku, and writes the results back into `rumen_insights` (a new table alongside Mnestra's `memory_items`). TermDeck's Flashback and Claude Code's `memory_recall` both automatically benefit because insights flow back into the same database.
141
141
 
142
142
  **Rumen is live.** First full-kickstart run against a production Mnestra store on 2026-04-15 19:47 UTC: **111 sessions processed, 111 insights generated** in one pass. Insights surfaced patterns like "the error detection regex in Flashback misses `No such file or directory` — same class of blind spot as X" and "Practice sessions exist as a separate model but frontend components were built and never wired into the schedule view." The cognitive loop is closed.
143
143
 
@@ -159,9 +159,9 @@ Honest limits, stated upfront so the skeptic has nothing to chase:
159
159
 
160
160
  - **Not magic.** It fires on pattern-matched status transitions from the PTY output analyzer (non-zero exits, `Error:` / `Traceback` / `panic:` / `command not found` / similar). If the analyzer misses your error class, no Flashback. Pattern tuning is an ongoing process.
161
161
  - **Not a replacement for reading docs.** It's the shortest path to a memory you already wrote. If the memory isn't there, the feature does nothing.
162
- - **Not fully local by default.** Tier 2+ reaches out to Supabase for storage and OpenAI for embeddings. Tier 1 is fully local. A fully-local Tier 2 (local Postgres + local embeddings) is on the Sprint 3 roadmap.
162
+ - **Not fully local by default.** Tier 2+ reaches out to Supabase for storage and OpenAI for embeddings. Tier 1 is fully local. A fully-local Tier 2 (local Postgres + local embeddings) is on the roadmap.
163
163
  - **Not free forever.** Tier 2+ pays OpenAI fractions of a cent per memory for embeddings. Self-hosted embeddings via Ollama are on the roadmap.
164
- - **Not proven at scale.** v0.2.5, validated against 3,527 memories in one developer's production store. First full Rumen kickstart on 2026-04-15 processed 111 sessions into 111 insights in one pass. No multi-user data yet. Bug reports and issues welcome.
164
+ - **Not proven at scale.** v0.3.5, validated against 3,527 memories in one developer's production store. First full Rumen kickstart on 2026-04-15 processed 111 sessions into 111 insights in one pass. No multi-user data yet. Bug reports and issues welcome.
165
165
 
166
166
  ---
167
167
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jhizzard/termdeck",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
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"
@@ -156,9 +156,17 @@ function verifyWebSocketUpgrade(config, req) {
156
156
  return !!provided && provided === token;
157
157
  }
158
158
 
159
+ // Whether a usable auth token is configured (via config.auth.token or the
160
+ // TERMDECK_AUTH_TOKEN env var). Used by the bind guardrail in index.js to
161
+ // decide whether binding to a non-localhost interface is permitted.
162
+ function hasAuth(config) {
163
+ return !!getConfiguredToken(config);
164
+ }
165
+
159
166
  module.exports = {
160
167
  createAuthMiddleware,
161
168
  verifyWebSocketUpgrade,
162
169
  getConfiguredToken,
170
+ hasAuth,
163
171
  loginPage
164
172
  };
@@ -60,7 +60,7 @@ const { TranscriptWriter } = require('./transcripts');
60
60
  const { createHealthHandler } = require('./preflight');
61
61
  const { themes, statusColors } = require('./themes');
62
62
  const { loadConfig, addProject } = require('./config');
63
- const { createAuthMiddleware, verifyWebSocketUpgrade } = require('./auth');
63
+ const { createAuthMiddleware, verifyWebSocketUpgrade, hasAuth } = require('./auth');
64
64
 
65
65
  function createServer(config) {
66
66
  const app = express();
@@ -852,10 +852,23 @@ if (require.main === module) {
852
852
  config.sessionLogs = { ...(config.sessionLogs || {}), enabled: true };
853
853
  }
854
854
 
855
- const { server, transcriptWriter } = createServer(config);
856
855
  const port = config.port || 3000;
857
856
  const host = config.host || '127.0.0.1';
858
857
 
858
+ // Bind guardrail (Sprint 10 T1): refuse to start on a non-localhost
859
+ // interface unless an auth token is configured. Binding 0.0.0.0 without
860
+ // auth is equivalent to publishing a root shell on the LAN — fail closed.
861
+ if (host !== '127.0.0.1' && host !== 'localhost' && host !== '::1') {
862
+ if (!hasAuth(config)) {
863
+ console.error('[security] Refusing to bind to ' + host + ' without auth.token set.');
864
+ console.error('[security] Set auth.token in ~/.termdeck/config.yaml or TERMDECK_AUTH_TOKEN env var.');
865
+ console.error('[security] To bind locally only, remove the host setting or set host: 127.0.0.1');
866
+ process.exit(1);
867
+ }
868
+ }
869
+
870
+ const { server, transcriptWriter } = createServer(config);
871
+
859
872
  // Graceful shutdown — flush transcript buffer before exit
860
873
  let shutdownInProgress = false;
861
874
  async function handleShutdown(signal) {