fathom-mcp 0.4.3 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fathom-mcp",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "MCP server for Fathom — vault operations, search, rooms, and cross-workspace communication",
5
5
  "type": "module",
6
6
  "bin": {
@@ -7,7 +7,7 @@
7
7
  set -euo pipefail
8
8
 
9
9
  HOOK_DIR="$(cd "$(dirname "$0")" && pwd)"
10
- TOAST="$HOOK_DIR/fathom-toast.sh"
10
+ TOAST="$HOOK_DIR/hook-toast.sh"
11
11
 
12
12
  # Walk up to find .fathom.json
13
13
  find_config() {
@@ -11,7 +11,7 @@
11
11
  set -o pipefail
12
12
 
13
13
  HOOK_DIR="$(cd "$(dirname "$0")" && pwd)"
14
- TOAST="$HOOK_DIR/fathom-toast.sh"
14
+ TOAST="$HOOK_DIR/hook-toast.sh"
15
15
  VSEARCH_CACHE="/tmp/fathom-vsearch-cache.json"
16
16
  VSEARCH_LOCK="/tmp/fathom-vsearch.lock"
17
17
  STALE_LOCK_SECONDS=180 # 3 minutes — lock older than this is considered stale
@@ -1,24 +1,26 @@
1
1
  #!/bin/bash
2
- # fathom-toast.sh — tmux popup notifications for Fathom/Memento hooks.
2
+ # hook-toast.sh — tmux popup notifications for agent hooks.
3
3
  #
4
4
  # Usage:
5
- # fathom-toast.sh <system> <message> # one-shot toast (auto-closes after 2s)
6
- # fathom-toast.sh <system> --status <id> # start a multi-stage toast (poll mode)
7
- # fathom-toast.sh --update <id> <message> # update a running toast
8
- # fathom-toast.sh --close <id> # close a running toast (after delay)
5
+ # hook-toast.sh <system> <message> # one-shot toast (auto-closes after 2s)
6
+ # hook-toast.sh <system> --status <id> # start a multi-stage toast (poll mode)
7
+ # hook-toast.sh --update <id> <message> # update a running toast
8
+ # hook-toast.sh --close <id> # close a running toast (after delay)
9
9
  #
10
- # Systems: fathom, memento
10
+ # Built-in systems: fathom, memento
11
11
  # fathom → 📝 purple (colour141)
12
12
  # memento → 🧠 teal (colour37)
13
13
  #
14
+ # Any other system name works too — gets a default icon and grey border.
15
+ #
14
16
  # Multi-stage example (PreCompact):
15
- # fathom-toast.sh memento --status precompact
16
- # fathom-toast.sh --update precompact "⏳ Getting context..."
17
- # fathom-toast.sh --update precompact "⏳ Extracting memories..."
18
- # fathom-toast.sh --update precompact "✓ Stored 7 memories"
19
- # fathom-toast.sh --close precompact
17
+ # hook-toast.sh memento --status precompact
18
+ # hook-toast.sh --update precompact "⏳ Getting context..."
19
+ # hook-toast.sh --update precompact "⏳ Extracting memories..."
20
+ # hook-toast.sh --update precompact "✓ Stored 7 memories"
21
+ # hook-toast.sh --close precompact
20
22
 
21
- TOAST_DIR="/tmp/fathom-toast"
23
+ TOAST_DIR="/tmp/hook-toast"
22
24
  mkdir -p "$TOAST_DIR"
23
25
 
24
26
  # Bail silently if not in tmux
@@ -27,8 +29,7 @@ if ! tmux info &>/dev/null; then
27
29
  fi
28
30
 
29
31
  get_style() {
30
- local system="$1"
31
- case "$system" in
32
+ case "$1" in
32
33
  memento) echo "colour37" ;;
33
34
  fathom) echo "colour141" ;;
34
35
  *) echo "colour245" ;;
@@ -36,8 +37,7 @@ get_style() {
36
37
  }
37
38
 
38
39
  get_icon() {
39
- local system="$1"
40
- case "$system" in
40
+ case "$1" in
41
41
  memento) echo "🧠" ;;
42
42
  fathom) echo "📝" ;;
43
43
  *) echo "📌" ;;
@@ -45,11 +45,10 @@ get_icon() {
45
45
  }
46
46
 
47
47
  get_title() {
48
- local system="$1"
49
- case "$system" in
48
+ case "$1" in
50
49
  memento) echo "Memento" ;;
51
50
  fathom) echo "Fathom" ;;
52
- *) echo "$system" ;;
51
+ *) echo "$1" ;;
53
52
  esac
54
53
  }
55
54
 
@@ -99,17 +98,15 @@ toast_start() {
99
98
  toast_update() {
100
99
  local id="$1"
101
100
  local message="$2"
102
- local status_file="$TOAST_DIR/$id"
103
- echo "$message" > "$status_file"
101
+ echo "$message" > "$TOAST_DIR/$id"
104
102
  }
105
103
 
106
104
  # Close a running toast (remove status file — popup exits on next poll)
107
105
  toast_close() {
108
106
  local id="$1"
109
- local status_file="$TOAST_DIR/$id"
110
107
  # Give the popup time to display the final message
111
108
  sleep 2
112
- rm -f "$status_file"
109
+ rm -f "$TOAST_DIR/$id"
113
110
  }
114
111
 
115
112
  # --- Argument parsing ---
@@ -120,7 +117,18 @@ case "${1:-}" in
120
117
  --close)
121
118
  toast_close "$2"
122
119
  ;;
123
- fathom|memento)
120
+ --*)
121
+ echo "Unknown option: $1" >&2
122
+ exit 1
123
+ ;;
124
+ "")
125
+ echo "Usage: hook-toast.sh <system> <message>" >&2
126
+ echo " hook-toast.sh <system> --status <id>" >&2
127
+ echo " hook-toast.sh --update <id> <message>" >&2
128
+ echo " hook-toast.sh --close <id>" >&2
129
+ exit 1
130
+ ;;
131
+ *)
124
132
  SYSTEM="$1"
125
133
  shift
126
134
  if [ "${1:-}" = "--status" ]; then
@@ -129,11 +137,4 @@ case "${1:-}" in
129
137
  toast_oneshot "$SYSTEM" "$*"
130
138
  fi
131
139
  ;;
132
- *)
133
- echo "Usage: fathom-toast.sh <fathom|memento> <message>" >&2
134
- echo " fathom-toast.sh <fathom|memento> --status <id>" >&2
135
- echo " fathom-toast.sh --update <id> <message>" >&2
136
- echo " fathom-toast.sh --close <id>" >&2
137
- exit 1
138
- ;;
139
140
  esac