granttap-mcp 0.8.185 → 0.8.186
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.
|
@@ -34,6 +34,8 @@ type ClaudeParseState = ClaudeTurnClock & {
|
|
|
34
34
|
customTitle?: string;
|
|
35
35
|
/** The name Claude generated for the chat; the latest one counts. */
|
|
36
36
|
aiTitle?: string;
|
|
37
|
+
/** The reasoning effort of the chat's latest request. */
|
|
38
|
+
effort?: SessionInfo["effort"];
|
|
37
39
|
summary?: string;
|
|
38
40
|
startedAt: number;
|
|
39
41
|
lastActivityAt: number;
|
|
@@ -47,6 +49,12 @@ type ClaudeParseState = ClaudeTurnClock & {
|
|
|
47
49
|
turnEnded: boolean;
|
|
48
50
|
};
|
|
49
51
|
|
|
52
|
+
const CLAUDE_EFFORTS = new Set(["low", "medium", "high", "xhigh", "max"]);
|
|
53
|
+
|
|
54
|
+
function claudeEffort(value: unknown): SessionInfo["effort"] | undefined {
|
|
55
|
+
return typeof value === "string" && CLAUDE_EFFORTS.has(value) ? value as SessionInfo["effort"] : undefined;
|
|
56
|
+
}
|
|
57
|
+
|
|
50
58
|
function claudeName(value: unknown): string | undefined {
|
|
51
59
|
if (typeof value !== "string") return undefined;
|
|
52
60
|
const name = value.replace(/\s+/g, " ").trim();
|
|
@@ -71,6 +79,9 @@ function applyClaudeLine(d: any, state: ClaudeParseState): void {
|
|
|
71
79
|
if (typeof d.gitBranch === "string" && d.gitBranch.trim()) state.branch = d.gitBranch;
|
|
72
80
|
}
|
|
73
81
|
if (d.type === "custom-title") state.customTitle = claudeName(d.customTitle) ?? state.customTitle;
|
|
82
|
+
// Claude records each request it sends with its settings; the latest one says what the chat runs with,
|
|
83
|
+
// whether it was started on the phone or on the computer.
|
|
84
|
+
if (d.type === "api-request" && d.isSidechain !== true) state.effort = claudeEffort(d.params?.output_config?.effort) ?? state.effort;
|
|
74
85
|
if (d.type === "ai-title") state.aiTitle = claudeName(d.aiTitle ?? d.content) ?? state.aiTitle;
|
|
75
86
|
if (!state.title && (d.type === "user" || d.message?.role === "user")) {
|
|
76
87
|
const raw =
|
|
@@ -259,6 +270,7 @@ export function* parseClaudeFileSteps(file: string): Generator<void, ClaudeParse
|
|
|
259
270
|
worktree: state.cwd ? claudeCheckout({ ...state, cwd: state.cwd }) : undefined,
|
|
260
271
|
branch: state.branch,
|
|
261
272
|
model: state.model,
|
|
273
|
+
...(state.effort ? { effort: state.effort } : {}),
|
|
262
274
|
summary: state.summary,
|
|
263
275
|
state: state.turnEnded ? "idle" : stateFor(state.lastActivityAt),
|
|
264
276
|
startedAt: state.startedAt || state.lastActivityAt,
|
package/cursor-plugin/README.md
CHANGED
|
@@ -10,7 +10,7 @@ keeps each phone response tied to the exact originating chat and prompt.
|
|
|
10
10
|
Install the supported CLI on this computer, then run:
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
npm install -g granttap-mcp@0.8.
|
|
13
|
+
npm install -g granttap-mcp@0.8.186
|
|
14
14
|
granttap setup
|
|
15
15
|
granttap status
|
|
16
16
|
```
|
package/cursor-plugin/mcp.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"command": "node",
|
|
5
5
|
"args": [
|
|
6
6
|
"-e",
|
|
7
|
-
"\"use strict\";\n\n// Cursor may start this MCP from any cwd. Execute JavaScript entry points with\n// Node itself: Windows batch shims require shell quoting that differs by host.\nconst { spawn } = require(\"node:child_process\");\nconst { existsSync } = require(\"node:fs\");\nconst { delimiter, dirname, join } = require(\"node:path\");\n\nconst PACKAGE = \"granttap-mcp@0.8.
|
|
7
|
+
"\"use strict\";\n\n// Cursor may start this MCP from any cwd. Execute JavaScript entry points with\n// Node itself: Windows batch shims require shell quoting that differs by host.\nconst { spawn } = require(\"node:child_process\");\nconst { existsSync } = require(\"node:fs\");\nconst { delimiter, dirname, join } = require(\"node:path\");\n\nconst PACKAGE = \"granttap-mcp@0.8.186\";\nconst dryRun = process.env.GRANTTAP_BOOTSTRAP_DRY_RUN === \"1\";\nconst platform = dryRun && process.env.GRANTTAP_BOOTSTRAP_PLATFORM\n ? process.env.GRANTTAP_BOOTSTRAP_PLATFORM : process.platform;\nconst nodeRoot = dryRun && process.env.GRANTTAP_BOOTSTRAP_NODE_ROOT\n ? process.env.GRANTTAP_BOOTSTRAP_NODE_ROOT : dirname(process.execPath);\nconst pathRoots = (process.env.PATH || \"\").split(delimiter).filter(Boolean);\nconst appData = process.env.APPDATA;\nconst roots = [nodeRoot, ...pathRoots, ...(appData ? [join(appData, \"npm\")] : [])];\nconst first = (paths) => paths.find((path) => existsSync(path));\n\nfunction launch() {\n if (platform !== \"win32\") {\n const installed = first(roots.map((root) => join(root, \"granttap-mcp\")));\n if (installed) return { command: installed, args: [] };\n const npx = first(roots.map((root) => join(root, \"npx\"))) || \"npx\";\n return { command: npx, args: [\"-y\", PACKAGE] };\n }\n const installed = first(roots.map((root) =>\n join(root, \"node_modules\", \"granttap-mcp\", \"bin\", \"granttap-mcp.mjs\")));\n if (installed) return { command: process.execPath, args: [installed] };\n const npx = first(roots.map((root) =>\n join(root, \"node_modules\", \"npm\", \"bin\", \"npx-cli.js\")));\n if (npx) return { command: process.execPath, args: [npx, \"-y\", PACKAGE] };\n throw new Error(\"Node.js/npm 22.13.0+ is required on this Windows device. Install npm and retry GrantTap.\");\n}\n\nlet target;\ntry { target = launch(); }\ncatch (error) {\n process.stderr.write(`[granttap] ${error.message}\\n`);\n process.exit(1);\n}\n\nif (dryRun) {\n process.stdout.write(JSON.stringify(target));\n process.exit(0);\n}\n\nconst child = spawn(target.command, target.args, { stdio: \"inherit\", windowsHide: true });\nchild.on(\"error\", (error) => {\n process.stderr.write(`[granttap] ${error.message}\\n`);\n process.exit(1);\n});\nchild.on(\"exit\", (code, signal) => {\n if (signal && platform !== \"win32\") {\n try { process.kill(process.pid, signal); } catch { process.exit(code ?? 1); }\n return;\n }\n process.exit(code ?? 1);\n});\n"
|
|
8
8
|
]
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -7,7 +7,7 @@ const { spawn } = require("node:child_process");
|
|
|
7
7
|
const { existsSync } = require("node:fs");
|
|
8
8
|
const { delimiter, dirname, join } = require("node:path");
|
|
9
9
|
|
|
10
|
-
const PACKAGE = "granttap-mcp@0.8.
|
|
10
|
+
const PACKAGE = "granttap-mcp@0.8.186";
|
|
11
11
|
const dryRun = process.env.GRANTTAP_BOOTSTRAP_DRY_RUN === "1";
|
|
12
12
|
const platform = dryRun && process.env.GRANTTAP_BOOTSTRAP_PLATFORM
|
|
13
13
|
? process.env.GRANTTAP_BOOTSTRAP_PLATFORM : process.platform;
|