@raindrop-ai/claude-code 0.0.10 → 0.0.12
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/plugin.json +1 -1
- package/.mcp.json +4 -2
- package/dist/cli.js +9 -26
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/hooks/hooks.json +13 -13
- package/package.json +1 -1
package/.mcp.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"raindrop-diagnostics": {
|
|
4
|
-
"command": "${CLAUDE_PLUGIN_ROOT}/
|
|
5
|
-
"args": [
|
|
4
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/dist/cli.js",
|
|
5
|
+
"args": [
|
|
6
|
+
"mcp-serve"
|
|
7
|
+
],
|
|
6
8
|
"transport": "stdio"
|
|
7
9
|
}
|
|
8
10
|
}
|
package/dist/cli.js
CHANGED
|
@@ -654,7 +654,7 @@ globalThis.RAINDROP_ASYNC_LOCAL_STORAGE = AsyncLocalStorage;
|
|
|
654
654
|
|
|
655
655
|
// src/package-info.ts
|
|
656
656
|
var PACKAGE_NAME = "@raindrop-ai/claude-code";
|
|
657
|
-
var PACKAGE_VERSION = "0.0.
|
|
657
|
+
var PACKAGE_VERSION = "0.0.12";
|
|
658
658
|
|
|
659
659
|
// src/shipper.ts
|
|
660
660
|
var EventShipper2 = class extends EventShipper {
|
|
@@ -1901,6 +1901,7 @@ function getHookEventsForVersion(version) {
|
|
|
1901
1901
|
}
|
|
1902
1902
|
return events;
|
|
1903
1903
|
}
|
|
1904
|
+
var HOOK_CMD_BASE = "command -v raindrop-claude-code > /dev/null 2>&1 && raindrop-claude-code hook || true";
|
|
1904
1905
|
function makeHookConfig(hookEvents, useAsync) {
|
|
1905
1906
|
const hooks = {};
|
|
1906
1907
|
for (const event of hookEvents) {
|
|
@@ -1909,7 +1910,7 @@ function makeHookConfig(hookEvents, useAsync) {
|
|
|
1909
1910
|
hooks: [
|
|
1910
1911
|
{
|
|
1911
1912
|
type: "command",
|
|
1912
|
-
command:
|
|
1913
|
+
command: HOOK_CMD_BASE,
|
|
1913
1914
|
async: useAsync,
|
|
1914
1915
|
timeout: 10
|
|
1915
1916
|
}
|
|
@@ -2002,6 +2003,7 @@ async function runSetup(args2) {
|
|
|
2002
2003
|
for (const group of typedExisting) {
|
|
2003
2004
|
for (const h of (_g = group.hooks) != null ? _g : []) {
|
|
2004
2005
|
if (typeof h["command"] === "string" && h["command"].includes("raindrop-claude-code")) {
|
|
2006
|
+
h["command"] = HOOK_CMD_BASE;
|
|
2005
2007
|
h["async"] = useAsync;
|
|
2006
2008
|
found = true;
|
|
2007
2009
|
}
|
|
@@ -2110,8 +2112,7 @@ function runUninstall(scope = "user") {
|
|
|
2110
2112
|
`);
|
|
2111
2113
|
}
|
|
2112
2114
|
var DEBUG_LOG_PATH = "/tmp/raindrop-hooks.log";
|
|
2113
|
-
var
|
|
2114
|
-
var TEE_SUFFIX = ` 2>&1 | tee -a ${DEBUG_LOG_PATH} || true`;
|
|
2115
|
+
var HOOK_CMD_DEBUG = `command -v raindrop-claude-code > /dev/null 2>&1 && RAINDROP_DEBUG=true raindrop-claude-code hook 2>&1 | tee -a ${DEBUG_LOG_PATH} || true`;
|
|
2115
2116
|
function toggleDebug(enable, scope = "user") {
|
|
2116
2117
|
var _a;
|
|
2117
2118
|
const settingsPath = getClaudeSettingsPath(scope, process.cwd());
|
|
@@ -2139,28 +2140,10 @@ function toggleDebug(enable, scope = "user") {
|
|
|
2139
2140
|
for (const h of (_a = group.hooks) != null ? _a : []) {
|
|
2140
2141
|
const cmd = h["command"];
|
|
2141
2142
|
if (typeof cmd !== "string" || !cmd.includes("raindrop-claude-code")) continue;
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
}
|
|
2147
|
-
if (!updated.includes("tee")) {
|
|
2148
|
-
updated = updated + TEE_SUFFIX;
|
|
2149
|
-
}
|
|
2150
|
-
if (updated !== cmd) {
|
|
2151
|
-
h["command"] = updated;
|
|
2152
|
-
modified++;
|
|
2153
|
-
}
|
|
2154
|
-
} else {
|
|
2155
|
-
let updated = cmd;
|
|
2156
|
-
if (updated.startsWith(DEBUG_PREFIX)) {
|
|
2157
|
-
updated = updated.slice(DEBUG_PREFIX.length);
|
|
2158
|
-
}
|
|
2159
|
-
updated = updated.replace(TEE_SUFFIX, "").replace(/ 2>&1 \| tee -a .*$/, "");
|
|
2160
|
-
if (updated !== cmd) {
|
|
2161
|
-
h["command"] = updated;
|
|
2162
|
-
modified++;
|
|
2163
|
-
}
|
|
2143
|
+
const target = enable ? HOOK_CMD_DEBUG : HOOK_CMD_BASE;
|
|
2144
|
+
if (cmd !== target) {
|
|
2145
|
+
h["command"] = target;
|
|
2146
|
+
modified++;
|
|
2164
2147
|
}
|
|
2165
2148
|
}
|
|
2166
2149
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -690,7 +690,7 @@ globalThis.RAINDROP_ASYNC_LOCAL_STORAGE = import_async_hooks.AsyncLocalStorage;
|
|
|
690
690
|
|
|
691
691
|
// src/package-info.ts
|
|
692
692
|
var PACKAGE_NAME = "@raindrop-ai/claude-code";
|
|
693
|
-
var PACKAGE_VERSION = "0.0.
|
|
693
|
+
var PACKAGE_VERSION = "0.0.12";
|
|
694
694
|
|
|
695
695
|
// src/shipper.ts
|
|
696
696
|
var EventShipper2 = class extends EventShipper {
|
package/dist/index.d.cts
CHANGED
|
@@ -310,7 +310,7 @@ declare function mapHookToRaindrop(payload: HookPayload, config: MapperConfig, e
|
|
|
310
310
|
declare function extractAppendSystemPrompt(args: string[]): string | undefined;
|
|
311
311
|
|
|
312
312
|
declare const PACKAGE_NAME = "@raindrop-ai/claude-code";
|
|
313
|
-
declare const PACKAGE_VERSION = "0.0.
|
|
313
|
+
declare const PACKAGE_VERSION = "0.0.12";
|
|
314
314
|
|
|
315
315
|
/** A tool call extracted from an assistant message content block. */
|
|
316
316
|
interface LLMToolCall {
|
package/dist/index.d.ts
CHANGED
|
@@ -310,7 +310,7 @@ declare function mapHookToRaindrop(payload: HookPayload, config: MapperConfig, e
|
|
|
310
310
|
declare function extractAppendSystemPrompt(args: string[]): string | undefined;
|
|
311
311
|
|
|
312
312
|
declare const PACKAGE_NAME = "@raindrop-ai/claude-code";
|
|
313
|
-
declare const PACKAGE_VERSION = "0.0.
|
|
313
|
+
declare const PACKAGE_VERSION = "0.0.12";
|
|
314
314
|
|
|
315
315
|
/** A tool call extracted from an assistant message content block. */
|
|
316
316
|
interface LLMToolCall {
|
package/dist/index.js
CHANGED
|
@@ -645,7 +645,7 @@ globalThis.RAINDROP_ASYNC_LOCAL_STORAGE = AsyncLocalStorage;
|
|
|
645
645
|
|
|
646
646
|
// src/package-info.ts
|
|
647
647
|
var PACKAGE_NAME = "@raindrop-ai/claude-code";
|
|
648
|
-
var PACKAGE_VERSION = "0.0.
|
|
648
|
+
var PACKAGE_VERSION = "0.0.12";
|
|
649
649
|
|
|
650
650
|
// src/shipper.ts
|
|
651
651
|
var EventShipper2 = class extends EventShipper {
|
package/hooks/hooks.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"hooks": [
|
|
6
6
|
{
|
|
7
7
|
"type": "command",
|
|
8
|
-
"command": "\"${CLAUDE_PLUGIN_ROOT}/
|
|
8
|
+
"command": "test -x \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" && \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" hook || true",
|
|
9
9
|
"timeout": 10
|
|
10
10
|
}
|
|
11
11
|
]
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"hooks": [
|
|
17
17
|
{
|
|
18
18
|
"type": "command",
|
|
19
|
-
"command": "\"${CLAUDE_PLUGIN_ROOT}/
|
|
19
|
+
"command": "test -x \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" && \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" hook || true",
|
|
20
20
|
"timeout": 10
|
|
21
21
|
}
|
|
22
22
|
]
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"hooks": [
|
|
28
28
|
{
|
|
29
29
|
"type": "command",
|
|
30
|
-
"command": "\"${CLAUDE_PLUGIN_ROOT}/
|
|
30
|
+
"command": "test -x \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" && \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" hook || true",
|
|
31
31
|
"timeout": 10
|
|
32
32
|
}
|
|
33
33
|
]
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"hooks": [
|
|
39
39
|
{
|
|
40
40
|
"type": "command",
|
|
41
|
-
"command": "\"${CLAUDE_PLUGIN_ROOT}/
|
|
41
|
+
"command": "test -x \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" && \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" hook || true",
|
|
42
42
|
"timeout": 10
|
|
43
43
|
}
|
|
44
44
|
]
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"hooks": [
|
|
50
50
|
{
|
|
51
51
|
"type": "command",
|
|
52
|
-
"command": "\"${CLAUDE_PLUGIN_ROOT}/
|
|
52
|
+
"command": "test -x \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" && \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" hook || true",
|
|
53
53
|
"timeout": 10
|
|
54
54
|
}
|
|
55
55
|
]
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"hooks": [
|
|
61
61
|
{
|
|
62
62
|
"type": "command",
|
|
63
|
-
"command": "\"${CLAUDE_PLUGIN_ROOT}/
|
|
63
|
+
"command": "test -x \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" && \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" hook || true",
|
|
64
64
|
"timeout": 10
|
|
65
65
|
}
|
|
66
66
|
]
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"hooks": [
|
|
72
72
|
{
|
|
73
73
|
"type": "command",
|
|
74
|
-
"command": "\"${CLAUDE_PLUGIN_ROOT}/
|
|
74
|
+
"command": "test -x \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" && \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" hook || true",
|
|
75
75
|
"timeout": 10
|
|
76
76
|
}
|
|
77
77
|
]
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"hooks": [
|
|
83
83
|
{
|
|
84
84
|
"type": "command",
|
|
85
|
-
"command": "\"${CLAUDE_PLUGIN_ROOT}/
|
|
85
|
+
"command": "test -x \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" && \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" hook || true",
|
|
86
86
|
"timeout": 10
|
|
87
87
|
}
|
|
88
88
|
]
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"hooks": [
|
|
94
94
|
{
|
|
95
95
|
"type": "command",
|
|
96
|
-
"command": "\"${CLAUDE_PLUGIN_ROOT}/
|
|
96
|
+
"command": "test -x \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" && \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" hook || true",
|
|
97
97
|
"timeout": 10
|
|
98
98
|
}
|
|
99
99
|
]
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"hooks": [
|
|
105
105
|
{
|
|
106
106
|
"type": "command",
|
|
107
|
-
"command": "\"${CLAUDE_PLUGIN_ROOT}/
|
|
107
|
+
"command": "test -x \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" && \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" hook || true",
|
|
108
108
|
"timeout": 10
|
|
109
109
|
}
|
|
110
110
|
]
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"hooks": [
|
|
116
116
|
{
|
|
117
117
|
"type": "command",
|
|
118
|
-
"command": "\"${CLAUDE_PLUGIN_ROOT}/
|
|
118
|
+
"command": "test -x \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" && \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" hook || true",
|
|
119
119
|
"timeout": 10
|
|
120
120
|
}
|
|
121
121
|
]
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"hooks": [
|
|
127
127
|
{
|
|
128
128
|
"type": "command",
|
|
129
|
-
"command": "\"${CLAUDE_PLUGIN_ROOT}/
|
|
129
|
+
"command": "test -x \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" && \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" hook || true",
|
|
130
130
|
"timeout": 10
|
|
131
131
|
}
|
|
132
132
|
]
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"hooks": [
|
|
138
138
|
{
|
|
139
139
|
"type": "command",
|
|
140
|
-
"command": "\"${CLAUDE_PLUGIN_ROOT}/
|
|
140
|
+
"command": "test -x \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" && \"${CLAUDE_PLUGIN_ROOT}/dist/cli.js\" hook || true",
|
|
141
141
|
"timeout": 10
|
|
142
142
|
}
|
|
143
143
|
]
|
package/package.json
CHANGED