laminark 0.1.0 → 2.21.7
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/.claude-plugin/marketplace.json +15 -0
- package/README.md +71 -36
- package/package.json +7 -9
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/dist/hooks/handler.d.ts +1 -3
- package/plugin/dist/hooks/handler.d.ts.map +1 -1
- package/plugin/dist/hooks/handler.js +22 -310
- package/plugin/dist/hooks/handler.js.map +1 -1
- package/plugin/dist/index.d.ts +1 -3
- package/plugin/dist/index.d.ts.map +1 -1
- package/plugin/dist/index.js +392 -1895
- package/plugin/dist/index.js.map +1 -1
- package/plugin/dist/{observations-CorAAc1A.d.mts → observations-Ch0nc47i.d.mts} +1 -23
- package/plugin/dist/observations-Ch0nc47i.d.mts.map +1 -0
- package/plugin/dist/{tool-registry-e710BvXq.mjs → tool-registry-CZ3mJ4iR.mjs} +13 -932
- package/plugin/dist/tool-registry-CZ3mJ4iR.mjs.map +1 -0
- package/plugin/hooks/hooks.json +6 -6
- package/plugin/scripts/README.md +1 -19
- package/plugin/scripts/bump-version.sh +3 -1
- package/plugin/scripts/ensure-deps.sh +2 -5
- package/plugin/scripts/install.sh +39 -115
- package/plugin/scripts/local-install.sh +58 -93
- package/plugin/scripts/setup-tmpdir.sh +65 -0
- package/plugin/scripts/uninstall.sh +38 -76
- package/plugin/scripts/update.sh +69 -20
- package/plugin/scripts/verify-install.sh +25 -69
- package/plugin/ui/activity.js +0 -12
- package/plugin/ui/app.js +54 -24
- package/plugin/ui/graph.js +186 -413
- package/plugin/ui/help.js +172 -876
- package/plugin/ui/index.html +242 -506
- package/plugin/ui/settings.js +17 -781
- package/plugin/ui/styles.css +44 -990
- package/plugin/ui/timeline.js +2 -2
- package/plugin/CLAUDE.md +0 -10
- package/plugin/commands/recall.md +0 -55
- package/plugin/commands/remember.md +0 -34
- package/plugin/commands/resume.md +0 -45
- package/plugin/commands/stash.md +0 -34
- package/plugin/commands/status.md +0 -33
- package/plugin/dist/observations-CorAAc1A.d.mts.map +0 -1
- package/plugin/dist/tool-registry-e710BvXq.mjs.map +0 -1
- package/plugin/laminark.db +0 -0
- package/plugin/package.json +0 -17
- package/plugin/scripts/dev-sync.sh +0 -58
- package/plugin/ui/help/activity-feed.png +0 -0
- package/plugin/ui/help/analysis-panel.png +0 -0
- package/plugin/ui/help/graph-toolbar.png +0 -0
- package/plugin/ui/help/graph-view.png +0 -0
- package/plugin/ui/help/settings.png +0 -0
- package/plugin/ui/help/timeline.png +0 -0
- package/plugin/ui/tools.js +0 -826
|
@@ -1,34 +1,18 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
#
|
|
2
|
+
# Bootstrap installer for Laminark plugin.
|
|
3
|
+
# Works around EXDEV (cross-device rename) errors on btrfs subvolumes,
|
|
4
|
+
# separate /tmp partitions, and other cross-device setups.
|
|
4
5
|
#
|
|
5
|
-
# Usage: curl -fsSL
|
|
6
|
-
# or: ./
|
|
6
|
+
# Usage: curl -fsSL <raw-url> | bash
|
|
7
|
+
# or: ./scripts/install.sh
|
|
7
8
|
|
|
8
9
|
set -e
|
|
9
10
|
|
|
10
|
-
echo "Laminark Installer"
|
|
11
|
-
echo "
|
|
11
|
+
echo "Laminark Marketplace Installer"
|
|
12
|
+
echo "==============================="
|
|
12
13
|
echo ""
|
|
13
14
|
|
|
14
|
-
# Check
|
|
15
|
-
if ! command -v node &> /dev/null; then
|
|
16
|
-
echo "Error: node not found"
|
|
17
|
-
echo "Please install Node.js >= 22: https://nodejs.org"
|
|
18
|
-
exit 1
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
NODE_MAJOR=$(node -e "console.log(process.versions.node.split('.')[0])")
|
|
22
|
-
if [ "$NODE_MAJOR" -lt 22 ]; then
|
|
23
|
-
echo "Error: Node.js >= 22 required (found v$(node -v))"
|
|
24
|
-
exit 1
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
if ! command -v npm &> /dev/null; then
|
|
28
|
-
echo "Error: npm not found"
|
|
29
|
-
exit 1
|
|
30
|
-
fi
|
|
31
|
-
|
|
15
|
+
# Check if claude CLI is available
|
|
32
16
|
if ! command -v claude &> /dev/null; then
|
|
33
17
|
echo "Error: claude CLI not found"
|
|
34
18
|
echo "Please install Claude Code first: https://claude.com/claude-code"
|
|
@@ -36,104 +20,44 @@ if ! command -v claude &> /dev/null; then
|
|
|
36
20
|
fi
|
|
37
21
|
|
|
38
22
|
# Check if already installed
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
if claude plugin list 2>/dev/null | grep -q "laminark"; then
|
|
24
|
+
CURRENT_VERSION=$(claude plugin list 2>/dev/null | grep "laminark" | awk '{print $2}' || echo "unknown")
|
|
41
25
|
echo "Currently installed: v$CURRENT_VERSION"
|
|
42
|
-
echo "
|
|
26
|
+
echo ""
|
|
27
|
+
read -p "Update/reinstall? (Y/n): " -n 1 -r
|
|
28
|
+
echo ""
|
|
29
|
+
if [[ $REPLY =~ ^[Nn]$ ]]; then
|
|
30
|
+
echo "Installation cancelled."
|
|
31
|
+
exit 0
|
|
32
|
+
fi
|
|
33
|
+
echo "Removing existing installation..."
|
|
34
|
+
claude plugin remove laminark 2>/dev/null || true
|
|
43
35
|
fi
|
|
44
36
|
|
|
45
|
-
#
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
npm install -g laminark
|
|
49
|
-
echo "✓ npm package installed"
|
|
50
|
-
|
|
51
|
-
# Step 2: Register MCP server
|
|
52
|
-
echo ""
|
|
53
|
-
echo "Registering MCP server with Claude Code..."
|
|
54
|
-
claude mcp add-json laminark '{"command":"laminark-server"}' -s user
|
|
55
|
-
echo "✓ MCP server registered"
|
|
56
|
-
|
|
57
|
-
# Step 3: Configure hooks in ~/.claude/settings.json
|
|
58
|
-
echo ""
|
|
59
|
-
echo "Configuring hooks..."
|
|
60
|
-
SETTINGS_FILE="${CLAUDE_HOME:-$HOME/.claude}/settings.json"
|
|
61
|
-
|
|
62
|
-
node -e '
|
|
63
|
-
const fs = require("fs");
|
|
64
|
-
const path = require("path");
|
|
65
|
-
const settingsPath = process.argv[1];
|
|
66
|
-
|
|
67
|
-
// Ensure directory exists
|
|
68
|
-
fs.mkdirSync(path.dirname(settingsPath), { recursive: true });
|
|
69
|
-
|
|
70
|
-
let settings = {};
|
|
71
|
-
if (fs.existsSync(settingsPath)) {
|
|
72
|
-
settings = JSON.parse(fs.readFileSync(settingsPath, "utf8"));
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (!settings.hooks) settings.hooks = {};
|
|
76
|
-
|
|
77
|
-
const hookEvents = {
|
|
78
|
-
SessionStart: { type: "command", command: "laminark-hook", statusMessage: "Loading Laminark memory context...", timeout: 10 },
|
|
79
|
-
PreToolUse: { type: "command", command: "laminark-hook", timeout: 2 },
|
|
80
|
-
PostToolUse: { type: "command", command: "laminark-hook", async: true, timeout: 30 },
|
|
81
|
-
PostToolUseFailure: { type: "command", command: "laminark-hook", async: true, timeout: 30 },
|
|
82
|
-
Stop: { type: "command", command: "laminark-hook", async: true, timeout: 15 },
|
|
83
|
-
SessionEnd: { type: "command", command: "laminark-hook", async: true, timeout: 15 }
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
for (const [event, hookConfig] of Object.entries(hookEvents)) {
|
|
87
|
-
if (!settings.hooks[event]) settings.hooks[event] = [];
|
|
88
|
-
|
|
89
|
-
// Remove any existing laminark hooks, then re-add (ensures up-to-date config)
|
|
90
|
-
settings.hooks[event] = settings.hooks[event].filter(entry =>
|
|
91
|
-
!(entry.hooks && entry.hooks.some(h => h.command && h.command.includes("laminark")))
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
settings.hooks[event].push({
|
|
95
|
-
hooks: [hookConfig]
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n");
|
|
100
|
-
' "$SETTINGS_FILE"
|
|
37
|
+
# Set up TMPDIR to avoid EXDEV errors
|
|
38
|
+
CLAUDE_DIR="${CLAUDE_HOME:-$HOME/.claude}"
|
|
39
|
+
SAFE_TMP="$CLAUDE_DIR/tmp"
|
|
101
40
|
|
|
102
|
-
echo "✓ Hooks configured"
|
|
103
|
-
|
|
104
|
-
# Done
|
|
105
|
-
NEW_VERSION=$(npm list -g laminark --depth=0 2>/dev/null | grep laminark@ | sed 's/.*@//' || echo "unknown")
|
|
106
|
-
echo ""
|
|
107
|
-
echo "✓ Laminark v$NEW_VERSION installed successfully!"
|
|
108
|
-
echo ""
|
|
109
|
-
echo "Next steps:"
|
|
110
|
-
echo " 1. Start a new Claude Code session"
|
|
111
|
-
echo " 2. Verify with: /mcp (should show laminark tools)"
|
|
112
|
-
|
|
113
|
-
# Step 4: Recommend GSD (Get Shit Done) workflow plugin
|
|
114
41
|
echo ""
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
echo " well with Laminark — it handles project planning, phased execution,"
|
|
124
|
-
echo " and atomic commits while Laminark provides persistent memory."
|
|
125
|
-
echo " (GSD does not endorse or recommend Laminark — this is our suggestion.)"
|
|
42
|
+
echo "Installing Laminark from marketplace..."
|
|
43
|
+
mkdir -p "$SAFE_TMP"
|
|
44
|
+
TMPDIR="$SAFE_TMP" claude plugin install laminark
|
|
45
|
+
STATUS=$?
|
|
46
|
+
rm -rf "$SAFE_TMP"
|
|
47
|
+
|
|
48
|
+
if [ $STATUS -eq 0 ]; then
|
|
49
|
+
NEW_VERSION=$(claude plugin list 2>/dev/null | grep "laminark" | awk '{print $2}' || echo "unknown")
|
|
126
50
|
echo ""
|
|
127
|
-
echo "
|
|
128
|
-
echo " More info: https://github.com/gsd-framework/gsd"
|
|
51
|
+
echo "✓ Laminark installed successfully! (v$NEW_VERSION)"
|
|
129
52
|
echo ""
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
53
|
+
echo "Next steps:"
|
|
54
|
+
echo " 1. Enable the plugin: claude plugin enable laminark"
|
|
55
|
+
echo " 2. Start a new Claude Code session"
|
|
56
|
+
echo " 3. Verify with: /mcp (should show laminark tools)"
|
|
57
|
+
else
|
|
58
|
+
echo ""
|
|
59
|
+
echo "✗ Installation failed with exit code $STATUS"
|
|
60
|
+
exit $STATUS
|
|
137
61
|
fi
|
|
138
62
|
|
|
139
63
|
exit 0
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
# Local
|
|
3
|
-
#
|
|
2
|
+
# Local installation wrapper for Laminark plugin.
|
|
3
|
+
# Works around EXDEV (cross-device rename) errors on btrfs subvolumes,
|
|
4
|
+
# separate /tmp partitions, and other cross-device setups.
|
|
4
5
|
#
|
|
5
|
-
# Usage: ./
|
|
6
|
+
# Usage: ./scripts/local-install.sh [path-to-laminark]
|
|
6
7
|
# Default path: current directory (.)
|
|
7
8
|
|
|
8
9
|
set -e
|
|
@@ -21,8 +22,8 @@ echo ""
|
|
|
21
22
|
echo "Installing from: $PLUGIN_PATH"
|
|
22
23
|
|
|
23
24
|
# Validate prerequisites
|
|
24
|
-
if [ ! -d "$PLUGIN_PATH/
|
|
25
|
-
echo "Error:
|
|
25
|
+
if [ ! -d "$PLUGIN_PATH/dist" ]; then
|
|
26
|
+
echo "Error: dist/ directory not found in $PLUGIN_PATH"
|
|
26
27
|
echo "Please run 'npm install && npm run build' first"
|
|
27
28
|
exit 1
|
|
28
29
|
fi
|
|
@@ -36,103 +37,67 @@ fi
|
|
|
36
37
|
# Get version from package.json
|
|
37
38
|
if [ -f "$PLUGIN_PATH/package.json" ]; then
|
|
38
39
|
NEW_VERSION=$(grep '"version"' "$PLUGIN_PATH/package.json" | head -1 | sed -E 's/.*"version": "([^"]+)".*/\1/')
|
|
39
|
-
echo "Version: v$NEW_VERSION"
|
|
40
|
+
echo "Version to install: v$NEW_VERSION"
|
|
41
|
+
else
|
|
42
|
+
NEW_VERSION="unknown"
|
|
40
43
|
fi
|
|
41
44
|
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
echo "✓ npm link complete"
|
|
45
|
+
# Check if already installed
|
|
46
|
+
if claude plugin list 2>/dev/null | grep -q "laminark"; then
|
|
47
|
+
CURRENT_VERSION=$(claude plugin list 2>/dev/null | grep "laminark" | awk '{print $2}' || echo "unknown")
|
|
48
|
+
echo "Currently installed: v$CURRENT_VERSION"
|
|
49
|
+
echo ""
|
|
48
50
|
|
|
49
|
-
|
|
50
|
-
echo ""
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
if [ "$CURRENT_VERSION" = "$NEW_VERSION" ]; then
|
|
52
|
+
echo "Same version is already installed."
|
|
53
|
+
read -p "Reinstall anyway? (y/N): " -n 1 -r
|
|
54
|
+
echo ""
|
|
55
|
+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
56
|
+
echo "Installation cancelled."
|
|
57
|
+
exit 0
|
|
58
|
+
fi
|
|
59
|
+
else
|
|
60
|
+
echo "An existing version is installed."
|
|
61
|
+
read -p "Update from v$CURRENT_VERSION to v$NEW_VERSION? (Y/n): " -n 1 -r
|
|
62
|
+
echo ""
|
|
63
|
+
if [[ $REPLY =~ ^[Nn]$ ]]; then
|
|
64
|
+
echo "Installation cancelled."
|
|
65
|
+
exit 0
|
|
66
|
+
fi
|
|
67
|
+
fi
|
|
54
68
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const fs = require("fs");
|
|
63
|
-
const settingsPath = process.argv[1];
|
|
64
|
-
const handlerPath = process.argv[2];
|
|
65
|
-
const hookCmd = `node "${handlerPath}"`;
|
|
66
|
-
|
|
67
|
-
let settings = {};
|
|
68
|
-
if (fs.existsSync(settingsPath)) {
|
|
69
|
-
settings = JSON.parse(fs.readFileSync(settingsPath, "utf8"));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (!settings.hooks) settings.hooks = {};
|
|
73
|
-
|
|
74
|
-
const hookEvents = {
|
|
75
|
-
SessionStart: { type: "command", command: hookCmd, statusMessage: "Loading Laminark memory context...", timeout: 10 },
|
|
76
|
-
PreToolUse: { type: "command", command: hookCmd, timeout: 2 },
|
|
77
|
-
PostToolUse: { type: "command", command: hookCmd, async: true, timeout: 30 },
|
|
78
|
-
PostToolUseFailure: { type: "command", command: hookCmd, async: true, timeout: 30 },
|
|
79
|
-
Stop: { type: "command", command: hookCmd, async: true, timeout: 15 },
|
|
80
|
-
SessionEnd: { type: "command", command: hookCmd, async: true, timeout: 15 }
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
for (const [event, hookConfig] of Object.entries(hookEvents)) {
|
|
84
|
-
if (!settings.hooks[event]) settings.hooks[event] = [];
|
|
85
|
-
|
|
86
|
-
// Remove any existing laminark hooks for this event
|
|
87
|
-
settings.hooks[event] = settings.hooks[event].filter(entry =>
|
|
88
|
-
!(entry.hooks && entry.hooks.some(h => h.command && h.command.includes("laminark")))
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
// Add the dev hook
|
|
92
|
-
settings.hooks[event].push({
|
|
93
|
-
hooks: [hookConfig]
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n");
|
|
98
|
-
' "$SETTINGS_FILE" "$HANDLER_PATH"
|
|
99
|
-
|
|
100
|
-
echo "✓ Hooks configured (dev: $HANDLER_PATH)"
|
|
101
|
-
|
|
102
|
-
# Done
|
|
103
|
-
echo ""
|
|
104
|
-
echo "✓ Laminark v$NEW_VERSION installed locally!"
|
|
105
|
-
echo ""
|
|
106
|
-
echo "Next steps:"
|
|
107
|
-
echo " 1. Start a new Claude Code session"
|
|
108
|
-
echo " 2. Verify with: /mcp (should show laminark tools)"
|
|
109
|
-
echo ""
|
|
110
|
-
echo "To switch to production install: npm install -g laminark && ./plugin/scripts/install.sh"
|
|
69
|
+
echo "Removing existing installation..."
|
|
70
|
+
TMPDIR="$SAFE_TMP" claude plugin remove laminark 2>/dev/null || true
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# Set up safe temp directory on same filesystem as ~/.claude/
|
|
74
|
+
CLAUDE_DIR="${CLAUDE_HOME:-$HOME/.claude}"
|
|
75
|
+
SAFE_TMP="$CLAUDE_DIR/tmp"
|
|
111
76
|
|
|
112
|
-
# Step 4: Recommend GSD (Get Shit Done) workflow plugin
|
|
113
77
|
echo ""
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
78
|
+
echo "Creating temporary directory: $SAFE_TMP"
|
|
79
|
+
mkdir -p "$SAFE_TMP"
|
|
80
|
+
|
|
81
|
+
# Run claude plugin add with TMPDIR override
|
|
82
|
+
echo "Running: claude plugin add $PLUGIN_PATH"
|
|
83
|
+
TMPDIR="$SAFE_TMP" claude plugin add "$PLUGIN_PATH"
|
|
84
|
+
STATUS=$?
|
|
118
85
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
echo " and atomic commits while Laminark provides persistent memory."
|
|
124
|
-
echo " (GSD does not endorse or recommend Laminark — this is our suggestion.)"
|
|
86
|
+
# Clean up
|
|
87
|
+
rm -rf "$SAFE_TMP"
|
|
88
|
+
|
|
89
|
+
if [ $STATUS -eq 0 ]; then
|
|
125
90
|
echo ""
|
|
126
|
-
echo "
|
|
127
|
-
echo " More info: https://github.com/gsd-framework/gsd"
|
|
91
|
+
echo "✓ Laminark plugin installed successfully!"
|
|
128
92
|
echo ""
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
93
|
+
echo "Next steps:"
|
|
94
|
+
echo " 1. Enable the plugin: claude plugin enable laminark"
|
|
95
|
+
echo " 2. Start a new Claude Code session"
|
|
96
|
+
echo " 3. Verify with: /mcp (should show laminark tools)"
|
|
97
|
+
else
|
|
98
|
+
echo ""
|
|
99
|
+
echo "✗ Installation failed with exit code $STATUS"
|
|
100
|
+
exit $STATUS
|
|
136
101
|
fi
|
|
137
102
|
|
|
138
103
|
exit 0
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Set up TMPDIR globally to avoid EXDEV errors in Claude Code
|
|
3
|
+
# This allows the Claude UI plugin installation to work correctly
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
echo "Claude Code TMPDIR Setup"
|
|
8
|
+
echo "========================"
|
|
9
|
+
echo ""
|
|
10
|
+
echo "This script will configure your shell to use ~/.claude/tmp as TMPDIR,"
|
|
11
|
+
echo "which prevents EXDEV errors when installing plugins via Claude's UI."
|
|
12
|
+
echo ""
|
|
13
|
+
|
|
14
|
+
# Create the temp directory
|
|
15
|
+
CLAUDE_DIR="${CLAUDE_HOME:-$HOME/.claude}"
|
|
16
|
+
TMPDIR_PATH="$CLAUDE_DIR/tmp"
|
|
17
|
+
|
|
18
|
+
mkdir -p "$TMPDIR_PATH"
|
|
19
|
+
echo "✓ Created directory: $TMPDIR_PATH"
|
|
20
|
+
|
|
21
|
+
# Detect shell
|
|
22
|
+
SHELL_NAME=$(basename "$SHELL")
|
|
23
|
+
if [ "$SHELL_NAME" = "zsh" ]; then
|
|
24
|
+
PROFILE="$HOME/.zshrc"
|
|
25
|
+
elif [ "$SHELL_NAME" = "bash" ]; then
|
|
26
|
+
PROFILE="$HOME/.bashrc"
|
|
27
|
+
else
|
|
28
|
+
echo "Warning: Unsupported shell: $SHELL_NAME"
|
|
29
|
+
echo "Please manually add this to your shell profile:"
|
|
30
|
+
echo ""
|
|
31
|
+
echo " export TMPDIR=\$HOME/.claude/tmp"
|
|
32
|
+
echo " mkdir -p \$TMPDIR"
|
|
33
|
+
echo ""
|
|
34
|
+
exit 1
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
# Check if already configured
|
|
38
|
+
if grep -q "export TMPDIR.*\.claude/tmp" "$PROFILE" 2>/dev/null; then
|
|
39
|
+
echo ""
|
|
40
|
+
echo "✓ TMPDIR already configured in $PROFILE"
|
|
41
|
+
else
|
|
42
|
+
echo ""
|
|
43
|
+
echo "Adding TMPDIR configuration to $PROFILE..."
|
|
44
|
+
cat >> "$PROFILE" << 'EOF'
|
|
45
|
+
|
|
46
|
+
# Claude Code TMPDIR workaround for EXDEV errors
|
|
47
|
+
export TMPDIR=$HOME/.claude/tmp
|
|
48
|
+
mkdir -p $TMPDIR
|
|
49
|
+
EOF
|
|
50
|
+
echo "✓ Added TMPDIR configuration to $PROFILE"
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
echo ""
|
|
54
|
+
echo "✓ Setup complete!"
|
|
55
|
+
echo ""
|
|
56
|
+
echo "Next steps:"
|
|
57
|
+
echo " 1. Restart your terminal (or run: source $PROFILE)"
|
|
58
|
+
echo " 2. Restart Claude Code"
|
|
59
|
+
echo " 3. Try installing Laminark via Claude's UI:"
|
|
60
|
+
echo " /plugin → marketplace → NoobyNull/Laminark → install"
|
|
61
|
+
echo ""
|
|
62
|
+
echo "To verify TMPDIR is set, run: echo \$TMPDIR"
|
|
63
|
+
echo "Expected output: $TMPDIR_PATH"
|
|
64
|
+
|
|
65
|
+
exit 0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
# Uninstall Laminark
|
|
2
|
+
# Uninstall Laminark plugin with optional data cleanup
|
|
3
3
|
|
|
4
4
|
set -e
|
|
5
5
|
|
|
@@ -9,24 +9,20 @@ echo ""
|
|
|
9
9
|
|
|
10
10
|
# Check if claude CLI is available
|
|
11
11
|
if ! command -v claude &> /dev/null; then
|
|
12
|
-
echo "
|
|
13
|
-
|
|
12
|
+
echo "Error: claude CLI not found"
|
|
13
|
+
echo "Please install Claude Code first: https://claude.com/claude-code"
|
|
14
|
+
exit 1
|
|
14
15
|
fi
|
|
15
16
|
|
|
16
|
-
# Check
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
fi
|
|
21
|
-
|
|
22
|
-
# Check MCP registration
|
|
23
|
-
if [ "$SKIP_CLAUDE" != "true" ]; then
|
|
24
|
-
if claude mcp list 2>/dev/null | grep -q "laminark"; then
|
|
25
|
-
echo "MCP server: registered"
|
|
26
|
-
MCP_REGISTERED=true
|
|
27
|
-
fi
|
|
17
|
+
# Check if plugin is installed
|
|
18
|
+
if ! claude plugin list 2>/dev/null | grep -q "laminark"; then
|
|
19
|
+
echo "Laminark plugin is not installed."
|
|
20
|
+
exit 0
|
|
28
21
|
fi
|
|
29
22
|
|
|
23
|
+
# Get current version
|
|
24
|
+
CURRENT_VERSION=$(claude plugin list 2>/dev/null | grep "laminark" | awk '{print $2}' || echo "unknown")
|
|
25
|
+
echo "Currently installed: laminark v$CURRENT_VERSION"
|
|
30
26
|
echo ""
|
|
31
27
|
|
|
32
28
|
# Ask for confirmation
|
|
@@ -37,76 +33,42 @@ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
|
37
33
|
exit 0
|
|
38
34
|
fi
|
|
39
35
|
|
|
40
|
-
#
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
claude mcp remove laminark -s user 2>/dev/null || true
|
|
45
|
-
echo "✓ MCP server removed"
|
|
46
|
-
fi
|
|
36
|
+
# Remove the plugin
|
|
37
|
+
echo "Removing plugin..."
|
|
38
|
+
claude plugin remove laminark
|
|
39
|
+
echo "✓ Plugin removed"
|
|
47
40
|
|
|
48
|
-
#
|
|
49
|
-
echo ""
|
|
50
|
-
echo "Removing hooks from settings..."
|
|
51
|
-
SETTINGS_FILE="${CLAUDE_HOME:-$HOME/.claude}/settings.json"
|
|
52
|
-
|
|
53
|
-
if [ -f "$SETTINGS_FILE" ]; then
|
|
54
|
-
node -e '
|
|
55
|
-
const fs = require("fs");
|
|
56
|
-
const settingsPath = process.argv[1];
|
|
57
|
-
|
|
58
|
-
const settings = JSON.parse(fs.readFileSync(settingsPath, "utf8"));
|
|
59
|
-
|
|
60
|
-
if (settings.hooks) {
|
|
61
|
-
for (const [event, entries] of Object.entries(settings.hooks)) {
|
|
62
|
-
settings.hooks[event] = entries.filter(entry =>
|
|
63
|
-
!(entry.hooks && entry.hooks.some(h => h.command && h.command.includes("laminark")))
|
|
64
|
-
);
|
|
65
|
-
// Remove empty arrays
|
|
66
|
-
if (settings.hooks[event].length === 0) {
|
|
67
|
-
delete settings.hooks[event];
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
// Remove empty hooks object
|
|
71
|
-
if (Object.keys(settings.hooks).length === 0) {
|
|
72
|
-
delete settings.hooks;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Remove laminark from enabledPlugins if present
|
|
77
|
-
if (settings.enabledPlugins) {
|
|
78
|
-
for (const key of Object.keys(settings.enabledPlugins)) {
|
|
79
|
-
if (key.includes("laminark")) {
|
|
80
|
-
delete settings.enabledPlugins[key];
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n");
|
|
86
|
-
' "$SETTINGS_FILE"
|
|
87
|
-
echo "✓ Hooks removed"
|
|
88
|
-
fi
|
|
89
|
-
|
|
90
|
-
# Step 3: Uninstall npm package
|
|
91
|
-
if [ -n "$NPM_VERSION" ]; then
|
|
92
|
-
echo ""
|
|
93
|
-
echo "Uninstalling npm package..."
|
|
94
|
-
npm uninstall -g laminark
|
|
95
|
-
echo "✓ npm package removed"
|
|
96
|
-
fi
|
|
97
|
-
|
|
98
|
-
# Step 4: Optional data cleanup
|
|
41
|
+
# Ask about data cleanup
|
|
99
42
|
echo ""
|
|
100
43
|
echo "Data cleanup options:"
|
|
101
44
|
echo " 1. Keep all data (can reinstall later without losing memories)"
|
|
102
|
-
echo " 2. Remove
|
|
45
|
+
echo " 2. Remove plugin cache only (keeps user data at ~/.laminark/)"
|
|
46
|
+
echo " 3. Remove everything (plugin cache + all memories and data)"
|
|
103
47
|
echo ""
|
|
104
|
-
read -p "Choose option (1-
|
|
48
|
+
read -p "Choose option (1-3, default=1): " -n 1 -r CLEANUP_OPTION
|
|
105
49
|
echo ""
|
|
106
50
|
|
|
107
51
|
case $CLEANUP_OPTION in
|
|
108
52
|
2)
|
|
53
|
+
echo "Removing plugin cache..."
|
|
54
|
+
CACHE_DIR="${CLAUDE_HOME:-$HOME/.claude}/plugins/cache/laminark"
|
|
55
|
+
if [ -d "$CACHE_DIR" ]; then
|
|
56
|
+
rm -rf "$CACHE_DIR"
|
|
57
|
+
echo "✓ Plugin cache removed: $CACHE_DIR"
|
|
58
|
+
else
|
|
59
|
+
echo " No cache directory found"
|
|
60
|
+
fi
|
|
61
|
+
;;
|
|
62
|
+
3)
|
|
63
|
+
echo "Removing all data..."
|
|
64
|
+
CACHE_DIR="${CLAUDE_HOME:-$HOME/.claude}/plugins/cache/laminark"
|
|
109
65
|
DATA_DIR="$HOME/.laminark"
|
|
66
|
+
|
|
67
|
+
if [ -d "$CACHE_DIR" ]; then
|
|
68
|
+
rm -rf "$CACHE_DIR"
|
|
69
|
+
echo "✓ Plugin cache removed: $CACHE_DIR"
|
|
70
|
+
fi
|
|
71
|
+
|
|
110
72
|
if [ -d "$DATA_DIR" ]; then
|
|
111
73
|
echo ""
|
|
112
74
|
echo "WARNING: This will delete all your memories and observations!"
|
|
@@ -128,6 +90,6 @@ esac
|
|
|
128
90
|
echo ""
|
|
129
91
|
echo "✓ Uninstall complete!"
|
|
130
92
|
echo ""
|
|
131
|
-
echo "To reinstall:
|
|
93
|
+
echo "To reinstall: ./scripts/local-install.sh or ./scripts/install.sh"
|
|
132
94
|
|
|
133
95
|
exit 0
|