@raindrop-ai/cursor 0.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/hooks/hook.cjs ADDED
@@ -0,0 +1,13 @@
1
+ // Entry point for the bundled Cursor plugin hooks. Cursor runs the command in
2
+ // hooks.json through the platform shell, so the file check and the exit code
3
+ // live here in JavaScript instead of in shell syntax.
4
+ const { spawnSync } = require("node:child_process");
5
+ const { existsSync } = require("node:fs");
6
+ const { join } = require("node:path");
7
+
8
+ try {
9
+ const cli = join(__dirname, "..", "dist", "cli.js");
10
+ if (existsSync(cli)) spawnSync(process.execPath, [cli, "hook"], { stdio: "inherit" });
11
+ } catch {
12
+ // Telemetry never fails a hook.
13
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "version": 1,
3
+ "hooks": {
4
+ "sessionStart": [{ "command": "node --input-type=commonjs -e \"try{require(process.env.CURSOR_PLUGIN_ROOT+'/hooks/hook.cjs')}catch{}\"", "timeout": 10 }],
5
+ "beforeSubmitPrompt": [{ "command": "node --input-type=commonjs -e \"try{require(process.env.CURSOR_PLUGIN_ROOT+'/hooks/hook.cjs')}catch{}\"", "timeout": 10 }],
6
+ "postToolUse": [{ "command": "node --input-type=commonjs -e \"try{require(process.env.CURSOR_PLUGIN_ROOT+'/hooks/hook.cjs')}catch{}\"", "timeout": 10 }],
7
+ "postToolUseFailure": [{ "command": "node --input-type=commonjs -e \"try{require(process.env.CURSOR_PLUGIN_ROOT+'/hooks/hook.cjs')}catch{}\"", "timeout": 10 }],
8
+ "afterAgentResponse": [{ "command": "node --input-type=commonjs -e \"try{require(process.env.CURSOR_PLUGIN_ROOT+'/hooks/hook.cjs')}catch{}\"", "timeout": 10 }],
9
+ "afterAgentThought": [{ "command": "node --input-type=commonjs -e \"try{require(process.env.CURSOR_PLUGIN_ROOT+'/hooks/hook.cjs')}catch{}\"", "timeout": 10 }],
10
+ "stop": [{ "command": "node --input-type=commonjs -e \"try{require(process.env.CURSOR_PLUGIN_ROOT+'/hooks/hook.cjs')}catch{}\"", "timeout": 10 }],
11
+ "preCompact": [{ "command": "node --input-type=commonjs -e \"try{require(process.env.CURSOR_PLUGIN_ROOT+'/hooks/hook.cjs')}catch{}\"", "timeout": 10 }],
12
+ "sessionEnd": [{ "command": "node --input-type=commonjs -e \"try{require(process.env.CURSOR_PLUGIN_ROOT+'/hooks/hook.cjs')}catch{}\"", "timeout": 10 }]
13
+ }
14
+ }
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@raindrop-ai/cursor",
3
+ "version": "0.0.1",
4
+ "description": "Raindrop observability for Cursor agents via hooks",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "dist/index.cjs",
8
+ "module": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "bin": {
11
+ "raindrop-cursor": "dist/cli.js"
12
+ },
13
+ "exports": {
14
+ ".": {
15
+ "import": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "require": {
20
+ "types": "./dist/index.d.cts",
21
+ "default": "./dist/index.cjs"
22
+ }
23
+ }
24
+ },
25
+ "sideEffects": false,
26
+ "files": [
27
+ "dist/**",
28
+ "README.md",
29
+ ".cursor-plugin/**",
30
+ "hooks/**",
31
+ ".mcp.json"
32
+ ],
33
+ "engines": {
34
+ "node": ">=20"
35
+ },
36
+ "dependencies": {
37
+ "zod": "4.3.6"
38
+ },
39
+ "devDependencies": {
40
+ "@types/node": "20.19.39",
41
+ "msw": "2.13.0",
42
+ "tsup": "8.5.1",
43
+ "typescript": "5.9.3",
44
+ "vitest": "2.1.9",
45
+ "@raindrop-ai/core": "0.3.0"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public"
49
+ },
50
+ "scripts": {
51
+ "build": "tsup",
52
+ "postbuild": "chmod +x ./dist/cli.js && node ./scripts/sync-plugin-version.mjs",
53
+ "dev": "tsup --watch",
54
+ "clean": "rm -rf dist",
55
+ "test": "vitest run",
56
+ "lint": "eslint src tests --ext .ts && tsc --noEmit",
57
+ "typecheck": "tsc --noEmit"
58
+ }
59
+ }