@gabrihhh/jarvis 2.1.0 → 2.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gabrihhh/jarvis",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Claude Code terminal dashboard + semantic memory graph via Neo4j",
5
5
  "bin": {
6
6
  "jarvis": "bin/jarvis.js",
@@ -1,8 +1,29 @@
1
- import { existsSync, writeFileSync, readFileSync, readdirSync, statSync } from 'fs';
1
+ import { existsSync, writeFileSync, readFileSync, readdirSync, statSync, openSync, writeSync, closeSync } from 'fs';
2
2
  import { join } from 'path';
3
3
  import { tmpdir, homedir } from 'os';
4
4
  import { runQuery, closeDriver } from './neo4j-client.js';
5
5
 
6
+ const GREEN = '\x1b[38;2;74;222;128m\x1b[1m';
7
+ const RESET = '\x1b[0m';
8
+
9
+ async function flashLoaded(projectName, branch) {
10
+ try {
11
+ const inner = ` ⬡ ${projectName} [${branch}] loaded `;
12
+ const top = `╭${'─'.repeat(inner.length)}╮`;
13
+ const bottom = `╰${'─'.repeat(inner.length)}╯`;
14
+
15
+ const tty = openSync('/dev/tty', 'w');
16
+ writeSync(tty, `${GREEN}${top}${RESET}\n${GREEN}│${inner}│${RESET}\n${GREEN}${bottom}${RESET}\n`);
17
+ closeSync(tty);
18
+
19
+ await new Promise(r => setTimeout(r, 1500));
20
+
21
+ const tty2 = openSync('/dev/tty', 'w');
22
+ writeSync(tty2, `\x1b[3A\x1b[2K\x1b[1B\x1b[2K\x1b[1B\x1b[2K\x1b[3A`);
23
+ closeSync(tty2);
24
+ } catch { /* ambiente sem TTY — silencioso */ }
25
+ }
26
+
6
27
  const CONFIG_PATH = join(homedir(), '.claude-memory.json');
7
28
 
8
29
  function loadConfig() {
@@ -57,6 +78,8 @@ export async function queryByPath(cwd) {
57
78
  const concepts = [...new Set(r.get('concepts'))].filter(Boolean);
58
79
  const patterns = [...new Set(r.get('patterns'))].filter(Boolean);
59
80
 
81
+ if (mode === 'session') await flashLoaded(p.name, p.branch);
82
+
60
83
  return [
61
84
  `## Contexto do Repositório (jarvis-memory)`,
62
85
  `**Projeto:** ${p.name} [${p.branch}]${p.description ? ' — ' + p.description : ''}`,