opencode-team-memory 1.0.0 → 1.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.1
4
+
5
+ - Add `scripts/preflight.sh` — automated installation check
6
+ - Add `/preflight` custom command for TUI
7
+
3
8
  ## 1.0.0
4
9
 
5
10
  - Initial release
package/README.md CHANGED
@@ -57,6 +57,13 @@ Or register as custom commands in `opencode.json`:
57
57
 
58
58
  Then type `/memory-off` or `/memory-on` in the TUI.
59
59
 
60
+ **Check installation:**
61
+ ```
62
+ /preflight
63
+ ```
64
+
65
+ Runs automated checks for RTK, Context-Mode, and team-memory status.
66
+
60
67
  ## Install
61
68
 
62
69
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-team-memory",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Persistent role-based memory for OpenCode/OmO Team Mode — survives across sessions and runs",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -8,6 +8,7 @@
8
8
  "index.ts",
9
9
  "types.ts",
10
10
  "memory.ts",
11
+ "scripts/",
11
12
  "README.md",
12
13
  "LICENSE",
13
14
  "CHANGELOG.md"
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env bash
2
+ # opencode-team-memory 事前動作確認スクリプト
3
+ # 実行: bash scripts/preflight.sh
4
+
5
+ set -e
6
+
7
+ RED='\033[0;31m'
8
+ GREEN='\033[0;32m'
9
+ YELLOW='\033[1;33m'
10
+ NC='\033[0m'
11
+
12
+ check() { printf " %-40s " "$1"; shift; if "$@" &>/dev/null; then printf "${GREEN}OK${NC}\n"; else printf "${RED}FAIL${NC}\n"; fi; }
13
+ warn() { printf " %-40s ${YELLOW}%s${NC}\n" "$1" "$2"; }
14
+
15
+ echo ""
16
+ echo "========================================"
17
+ echo " opencode-team-memory preflight check"
18
+ echo "========================================"
19
+ echo ""
20
+
21
+ # ── RTK ──
22
+ echo "[RTK]"
23
+ check "rtk binary" command -v rtk
24
+ check "rtk version" rtk --version
25
+ warn "rtk gain (data=0 is OK)" "$(rtk gain 2>&1 | head -1)"
26
+ echo ""
27
+
28
+ # ── Context-Mode ──
29
+ echo "[Context-Mode]"
30
+ check "npm global package" npm ls -g context-mode
31
+ check "CLI binary" command -v context-mode
32
+ echo ""
33
+
34
+ # ── opencode-team-memory ──
35
+ echo "[opencode-team-memory]"
36
+ check "npm global package" npm ls -g opencode-team-memory
37
+ warn "global plugin config" "$(grep -c 'opencode-team-memory' ~/.config/opencode/opencode.json 2>/dev/null && echo 'found' || echo 'NOT FOUND')"
38
+ echo ""
39
+
40
+ # ── メモリ保存先 ──
41
+ echo "[Memory]"
42
+ if grep -q "OPENCODE_TEAM_MEMORY_DIR" ~/.zshrc 2>/dev/null; then
43
+ warn "shared memory" "OPENCODE_TEAM_MEMORY_DIR is set → all projects share memory"
44
+ else
45
+ check "per-project memory" true
46
+ fi
47
+ echo ""
48
+
49
+ # ── opencode.json ──
50
+ echo "[Project Config]"
51
+ PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
52
+ PARENT_PROJECT="${PROJECT_ROOT}/../opencode.json"
53
+ if [ -f "$PROJECT_ROOT/opencode.json" ]; then
54
+ check "opencode.json exists" true
55
+ elif [ -f "$PARENT_PROJECT" ]; then
56
+ warn "opencode.json" "found in parent ($PARENT_PROJECT)"
57
+ else
58
+ warn "opencode.json" "not found"
59
+ fi
60
+ echo ""
61
+
62
+ # ── 総合判定 ──
63
+ echo "========================================"
64
+ echo " Next: opencode を起動し、以下を確認"
65
+ echo ""
66
+ echo " TUI内: ctx stats → Context-Mode 応答"
67
+ echo " TUI内: Agent に「role_memory_save」を聞く → ツール認識"
68
+ echo " 別窓: rtk gain → RTK 動作"
69
+ echo "========================================"