granttap-mcp 0.8.159 → 0.8.161
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/apps/bridge/src/device-management/login.ts +2 -0
- package/apps/bridge/src/device-management/provider-command.ts +6 -0
- package/apps/bridge/src/mesh/runtime/graph/README.md +14 -0
- package/apps/bridge/src/mesh/runtime/graph/analysis.ts +10 -3
- package/apps/bridge/src/mesh/runtime/snapshot/fit.ts +43 -20
- package/apps/bridge/src/reply/process/auth-failure.ts +44 -6
- package/apps/bridge/src/reply/process/index.ts +6 -7
- package/cursor-plugin/README.md +1 -1
- package/cursor-plugin/mcp.json +1 -1
- package/cursor-plugin/stdio-bootstrap.cjs +1 -1
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import type { CodingAgent, ProviderLoginProgress } from '../../../../packages/pr
|
|
|
4
4
|
import { signalOwnedProcess } from '../reply/process';
|
|
5
5
|
import { stripAnsi } from '../tools/version';
|
|
6
6
|
import { allowedLoginURL, installedProvider, loginArguments, providerCommand, providerEnvironment } from './provider-command';
|
|
7
|
+
import { providerSignIns } from '../reply/process/auth-failure';
|
|
7
8
|
|
|
8
9
|
type Flow = { scope: string; child: ChildProcess; progress: ProviderLoginProgress; output: string;
|
|
9
10
|
timer: NodeJS.Timeout; emit: (value: ProviderLoginProgress) => void };
|
|
@@ -98,6 +99,7 @@ export class ProviderLogins {
|
|
|
98
99
|
const flow = this.flows.get(id);
|
|
99
100
|
if (!flow || terminal.has(flow.progress.phase)) return;
|
|
100
101
|
clearTimeout(flow.timer);
|
|
102
|
+
if (phase === 'signed-in') providerSignIns.accepted(flow.progress.agent);
|
|
101
103
|
if (phase !== 'signed-in') {
|
|
102
104
|
signalOwnedProcess(flow.child, 'SIGTERM');
|
|
103
105
|
const kill = setTimeout(() => {
|
|
@@ -7,6 +7,7 @@ import { executableOnPath, resolveClaudeBinary } from '../providers/claude-bin';
|
|
|
7
7
|
import { resolveCodexBinary } from '../providers/codex-bin';
|
|
8
8
|
import { resolveGrokBinary } from '../providers/grok-bin';
|
|
9
9
|
import { resolveCursorAgentBin } from '../reply/process/cursor-agent-bin';
|
|
10
|
+
import { providerSignIns } from '../reply/process/auth-failure';
|
|
10
11
|
|
|
11
12
|
export function providerCommand(agent: CodingAgent): string {
|
|
12
13
|
switch (agent) {
|
|
@@ -52,6 +53,11 @@ type Authentication = 'signed-in' | 'signed-out' | 'unknown' | 'not-installed';
|
|
|
52
53
|
|
|
53
54
|
/** Presence is reported separately from a successful agent turn; credentials never leave their native store. */
|
|
54
55
|
export async function providerAuthentication(agent: CodingAgent, command = providerCommand(agent)): Promise<Authentication> {
|
|
56
|
+
const reported = await reportedAuthentication(agent, command);
|
|
57
|
+
return reported === 'signed-in' && providerSignIns.wasRefused(agent) ? 'signed-out' : reported;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function reportedAuthentication(agent: CodingAgent, command: string): Promise<Authentication> {
|
|
55
61
|
if (!installedProvider(command)) return 'not-installed';
|
|
56
62
|
if (agent === 'grok') {
|
|
57
63
|
try {
|
|
@@ -18,6 +18,12 @@ computer analyzes only its own endpoint bindings. Failed bindings remain visible
|
|
|
18
18
|
projection and phone refresh use this rule. The graph contains actual Engine
|
|
19
19
|
analysis; unavailable analysis is never synthesized as a successful graph.
|
|
20
20
|
|
|
21
|
+
A folder that no longer exists is not analyzed. When this computer's bindings
|
|
22
|
+
are only such folders, an explicit build still answers and names each one
|
|
23
|
+
`REPOSITORY_NOT_LOCAL`, which the phone already explains; the build used to get
|
|
24
|
+
no reply and failed after its 150-second wait. Beside a real checkout a removed
|
|
25
|
+
folder stays out of the report.
|
|
26
|
+
|
|
21
27
|
After repository analysis, explicit builds request bounded cross-repository
|
|
22
28
|
contract matches from the same admitted bindings. These are projected as shared
|
|
23
29
|
static contracts with an unverified runtime target. Background snapshots reuse
|
|
@@ -25,6 +31,14 @@ fresh in-memory results; they do not queue additional multi-repository scans.
|
|
|
25
31
|
A verified Backbone remains authoritative. Project identities and grants are
|
|
26
32
|
preserved.
|
|
27
33
|
|
|
34
|
+
Every phone-bound snapshot, the build's reply included, is fitted to the 256 KiB
|
|
35
|
+
plaintext envelope every iPhone build enforces (`../snapshot/fit.ts`); a larger
|
|
36
|
+
reply crossed the relay and was dropped on the phone, so the build spun and then
|
|
37
|
+
failed. Graphs take the room the rest leaves. Repository details and the oldest
|
|
38
|
+
events and executions, which the phone merges from earlier snapshots, make way
|
|
39
|
+
before the Graph falls below half of it. Every repository keeps its entry, so a
|
|
40
|
+
requested build is always answered.
|
|
41
|
+
|
|
28
42
|
Behavior tests: `tests/`, root `tests/graph/graph-binding-sync.test.ts`, and
|
|
29
43
|
`apps/mcp/src/desktop/projection/tests/graph-refresh.test.ts`. The optional
|
|
30
44
|
`engine-selection-live.test.ts` uses `GRANTTAP_ENGINE_TEST_BINARY` to verify the
|
|
@@ -64,7 +64,13 @@ export async function analyzeProjectGraphNow(
|
|
|
64
64
|
const own = (current.bindings ?? []).find(binding => binding.repositoryId === current.project.canonicalRepositoryId
|
|
65
65
|
&& (!endpoint || binding.endpointId === endpoint) && binding.available && binding.localPathHint
|
|
66
66
|
&& existsSync(binding.localPathHint) && !bindings.some(selected => selected.repositoryId === binding.repositoryId));
|
|
67
|
-
|
|
67
|
+
// A removed folder is named only when it is all this computer holds: the phone's build would otherwise
|
|
68
|
+
// wait for an answer that never came, while beside a real checkout it would only crowd Health.
|
|
69
|
+
const removed = bindings.length || failures.length || own ? [] : [...new Set((current.bindings ?? [])
|
|
70
|
+
.filter(binding => (!endpoint || binding.endpointId === endpoint) && binding.available
|
|
71
|
+
&& binding.localPathHint && !existsSync(binding.localPathHint)).map(binding => binding.repositoryId))];
|
|
72
|
+
if (dependencies.endpoint && !bindings.length && !failures.length && !own && !removed.length
|
|
73
|
+
&& current.bindings?.length) return false;
|
|
68
74
|
const [backbone, repositoryGraphs, details] = await Promise.all([
|
|
69
75
|
dependencies.backbone(projectId),
|
|
70
76
|
dependencies.graphs(projectId, bindings, { background: false }),
|
|
@@ -85,8 +91,9 @@ export async function analyzeProjectGraphNow(
|
|
|
85
91
|
const reported = new Set(observed.map(report => report.repositoryId));
|
|
86
92
|
const unfinished = [...new Set(bindings.map(binding => binding.repositoryId))]
|
|
87
93
|
.filter(id => !reported.has(id)).map(id => unavailable(id, "ANALYSIS_NOT_FINISHED"));
|
|
88
|
-
const
|
|
89
|
-
|
|
94
|
+
const folders = [...(own ? [unavailable(own.repositoryId, "GIT_CHECKOUT_REQUIRED")] : []),
|
|
95
|
+
...removed.map(id => unavailable(id, "REPOSITORY_NOT_LOCAL"))];
|
|
96
|
+
const reports = observed.length + unfinished.length + folders.length > 0 ? [...observed, ...unfinished, ...folders]
|
|
90
97
|
: [unavailable(current.project.canonicalRepositoryId, "REPOSITORY_NOT_BOUND")];
|
|
91
98
|
const receipts = requestIds?.size ? requestIds : new Set<string | undefined>([undefined]);
|
|
92
99
|
for (const id of receipts) {
|
|
@@ -2,34 +2,57 @@ import type { MeshSnapshot, ProjectRepositoryGraph } from "../../../../../../pac
|
|
|
2
2
|
import { fitRepositoryGraph } from "../../../engine/runtime/repository-graph/fit";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Every iPhone build drops a Mesh snapshot whose plaintext is larger than 256 KiB. Fitting only to the
|
|
6
|
+
* relay's 1.8 MB stored-frame limit let a requested Graph reach the phone and vanish there: the build
|
|
7
|
+
* spun until it failed, on exactly the Projects with the most work in them. The relay limit is far above this.
|
|
7
8
|
*/
|
|
8
|
-
export const MESH_SNAPSHOT_BUDGET_BYTES =
|
|
9
|
+
export const MESH_SNAPSHOT_BUDGET_BYTES = 256 * 1_024;
|
|
10
|
+
/** A busy Project's Graph keeps half the envelope before its older events and executions are left out. */
|
|
11
|
+
const GRAPH_FLOOR_BYTES = 128 * 1_024;
|
|
9
12
|
|
|
10
13
|
const size = (value: unknown) => Buffer.byteLength(JSON.stringify(value), "utf8");
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
/** The repository stays named, so the phone's requested build is answered rather than left waiting. */
|
|
16
|
+
function emptied(graph: ProjectRepositoryGraph): ProjectRepositoryGraph {
|
|
17
|
+
return { ...graph, codeMap: undefined, architectureHypotheses: undefined, nodes: [], relations: [], truncated: true };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Fair shares of the room, smallest reports first so an unused share passes to the larger ones. */
|
|
21
|
+
function fitGraphs(graphs: ProjectRepositoryGraph[], room: number): ProjectRepositoryGraph[] {
|
|
22
|
+
const fitted = [...graphs];
|
|
23
|
+
const order = graphs.map((graph, index) => ({ index, bytes: size(graph) })).sort((a, b) => a.bytes - b.bytes);
|
|
24
|
+
let remaining = room - graphs.length;
|
|
25
|
+
for (const [position, { index, bytes }] of order.entries()) {
|
|
26
|
+
const graph = graphs[index]!;
|
|
27
|
+
const share = Math.floor(remaining / (graphs.length - position));
|
|
28
|
+
const kept = bytes <= share ? graph : share >= 1_024 ? fitRepositoryGraph(graph, share) : undefined;
|
|
29
|
+
fitted[index] = kept === graph ? graph : kept ? { ...kept, truncated: true } : emptied(graph);
|
|
30
|
+
remaining -= size(fitted[index]);
|
|
31
|
+
}
|
|
32
|
+
return fitted;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** The phone merges these by id, so an earlier snapshot already gave it the oldest ones. */
|
|
36
|
+
function withoutOldest(snapshot: MeshSnapshot, key: "events" | "executions", maxBytes: number): MeshSnapshot {
|
|
37
|
+
let excess = size(snapshot) - maxBytes;
|
|
38
|
+
if (excess <= 0) return snapshot;
|
|
39
|
+
const items: unknown[] = snapshot[key];
|
|
40
|
+
let cut = 0;
|
|
41
|
+
while (cut < items.length && excess > 0) excess -= size(items[cut++]) + 1;
|
|
42
|
+
return { ...snapshot, [key]: items.slice(cut) };
|
|
15
43
|
}
|
|
16
44
|
|
|
17
45
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* its tasks and its people are never cut here.
|
|
46
|
+
* Graphs are shrunk into the room the rest leaves, but not below their floor while repository details,
|
|
47
|
+
* older events and older executions can make way. The Project, its Tasks and its people are never cut.
|
|
21
48
|
*/
|
|
22
49
|
export function fitMeshSnapshot(snapshot: MeshSnapshot, maxBytes = MESH_SNAPSHOT_BUDGET_BYTES): MeshSnapshot {
|
|
23
50
|
if (size(snapshot) <= maxBytes) return snapshot;
|
|
24
|
-
const graphs = snapshot.repositoryGraphs
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
fitted = { ...fitted, repositoryDetails: undefined };
|
|
32
|
-
if (size(fitted) <= maxBytes) return fitted;
|
|
33
|
-
}
|
|
34
|
-
return { ...fitted, repositoryGraphs: undefined, repositoryDetails: undefined };
|
|
51
|
+
const graphs = snapshot.repositoryGraphs;
|
|
52
|
+
const floor = Math.min(graphs ? size(graphs) : 0, GRAPH_FLOOR_BYTES);
|
|
53
|
+
let rest: MeshSnapshot = { ...snapshot, repositoryGraphs: graphs?.map(emptied) };
|
|
54
|
+
if (size(rest) + floor > maxBytes && rest.repositoryDetails) rest = { ...rest, repositoryDetails: undefined };
|
|
55
|
+
rest = withoutOldest(withoutOldest(rest, "events", maxBytes - floor), "executions", maxBytes - floor);
|
|
56
|
+
if (!graphs) return rest;
|
|
57
|
+
return { ...rest, repositoryGraphs: fitGraphs(graphs, maxBytes - size({ ...rest, repositoryGraphs: [] })) };
|
|
35
58
|
}
|
|
@@ -1,15 +1,51 @@
|
|
|
1
1
|
import { basename } from 'node:path';
|
|
2
|
+
import type { CodingAgent } from '../../../../../packages/protocol/schema';
|
|
2
3
|
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Provider phrases that mean its own login is missing or can no longer be used.
|
|
6
|
+
* Claude Code reports an expired login as `Failed to authenticate: … Run
|
|
7
|
+
* \`claude auth login\`` in its stream-json result while `claude auth status`
|
|
8
|
+
* still says logged in, so the run itself is the evidence.
|
|
9
|
+
*/
|
|
10
|
+
const SIGN_IN_REQUIRED = new RegExp([
|
|
11
|
+
String.raw`(?:^|\n)\s*(?:not (?:logged|signed) in\b|(?:error:\s*)?authentication required\b|(?:please\s+)?(?:sign|log) in (?:first|to (?:continue|use))\b|to sign in, open this url|failed to authenticate\b|oauth token has expired\b)`,
|
|
12
|
+
String.raw`\brun\s+[\x60'"]?claude\s+(?:auth\s+)?login\b`,
|
|
13
|
+
String.raw`\bplease run /login\b`,
|
|
14
|
+
String.raw`"type"\s*:\s*"authentication_error"`,
|
|
15
|
+
].join('|'), 'i');
|
|
16
|
+
|
|
17
|
+
export function providerAgent(command: string): CodingAgent | undefined {
|
|
7
18
|
const executable = basename(command).toLowerCase();
|
|
8
|
-
|
|
9
|
-
: executable.includes('codex') ? '
|
|
19
|
+
return executable.includes('grok') ? 'grok' : executable.includes('claude') ? 'claude'
|
|
20
|
+
: executable.includes('codex') ? 'codex' : executable.includes('cursor') ? 'cursor' : undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const PROVIDER_NAMES: Record<CodingAgent, string> = { claude: 'Claude Code', codex: 'Codex', grok: 'Grok', cursor: 'Cursor' };
|
|
24
|
+
|
|
25
|
+
/** A native sign-in prompt before admission is actionable, not a minute-long delivery timeout. */
|
|
26
|
+
export function providerSignInFailure(command: string, ...outputs: string[]): string | undefined {
|
|
27
|
+
const text = outputs.join('\n').replace(/\u001b\[[0-9;?]*[ -/]*[@-~]/g, '');
|
|
28
|
+
if (!SIGN_IN_REQUIRED.test(text)) return;
|
|
29
|
+
const agent = providerAgent(command);
|
|
30
|
+
const provider = agent ? PROVIDER_NAMES[agent] : 'the coding agent';
|
|
10
31
|
return `Sign-in required for ${provider}. Open Devices, choose this computer, then Sign in for ${provider}. This message has not been submitted to the agent.`;
|
|
11
32
|
}
|
|
12
33
|
|
|
34
|
+
export function isSignInFailure(error: string): boolean { return error.startsWith('Sign-in required for '); }
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* `claude auth status` keeps reporting a login whose token can no longer be
|
|
38
|
+
* renewed, so Devices said "Signed in" while every phone message was refused.
|
|
39
|
+
* A run refused for sign-in outranks that status until the provider signs in
|
|
40
|
+
* again or completes a run.
|
|
41
|
+
*/
|
|
42
|
+
const refusedSignIns = new Set<CodingAgent>();
|
|
43
|
+
export const providerSignIns = {
|
|
44
|
+
refused(agent: CodingAgent | undefined): void { if (agent) refusedSignIns.add(agent); },
|
|
45
|
+
accepted(agent: CodingAgent | undefined): void { if (agent) refusedSignIns.delete(agent); },
|
|
46
|
+
wasRefused(agent: CodingAgent): boolean { return refusedSignIns.has(agent); },
|
|
47
|
+
};
|
|
48
|
+
|
|
13
49
|
/** Match the provider's explicit diagnostic, not an arbitrary HTTP 402 from a tool. */
|
|
14
50
|
export function providerUsageFailure(stderr: string): string | undefined {
|
|
15
51
|
if (!/\bGrok Build usage balance exhausted\b/i.test(stderr)) return;
|
|
@@ -38,6 +74,8 @@ export function providerResultFailure(stdout: string): string | undefined {
|
|
|
38
74
|
}
|
|
39
75
|
|
|
40
76
|
export function providerExitFailure(command: string, stderr: string, stdout: string, code: number | null): string {
|
|
77
|
+
const signIn = providerSignInFailure(command, stderr, providerResultFailure(stdout) ?? '');
|
|
78
|
+
if (signIn) return signIn;
|
|
41
79
|
const reported = stderr.trim() ? undefined : providerResultFailure(stdout);
|
|
42
80
|
return providerUsageFailure(stderr)
|
|
43
81
|
?? (reported ? `${basename(command)} stopped with code ${code}: ${reported}`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawn, type ChildProcess } from "node:child_process";
|
|
2
2
|
import { delimiter, dirname } from 'node:path';
|
|
3
3
|
import { realpathSync } from 'node:fs';
|
|
4
|
-
import { providerSignInFailure, providerExitFailure } from './auth-failure';
|
|
4
|
+
import { isSignInFailure, providerAgent, providerSignIns, providerSignInFailure, providerExitFailure } from './auth-failure';
|
|
5
5
|
import { computerId } from "../../mesh/identity/computer";
|
|
6
6
|
import { inspectRepository } from "../../mesh/catalog";
|
|
7
7
|
import { localMeshStore } from "../../mesh/local-remote/local";
|
|
@@ -161,7 +161,7 @@ export function runProcess(
|
|
|
161
161
|
stderr += chunk;
|
|
162
162
|
if (done || (admission && admission.confirmed(stdout))) return;
|
|
163
163
|
const error = providerSignInFailure(command, stderr);
|
|
164
|
-
if (error) { signalOwnedProcess(child, 'SIGKILL'); finish({ ok: false, error }); }
|
|
164
|
+
if (error) { providerSignIns.refused(providerAgent(command)); signalOwnedProcess(child, 'SIGKILL'); finish({ ok: false, error }); }
|
|
165
165
|
});
|
|
166
166
|
child.on("error", (error) => {
|
|
167
167
|
finish({ ok: false, error: `${command}: ${error.message}` });
|
|
@@ -172,12 +172,11 @@ export function runProcess(
|
|
|
172
172
|
return;
|
|
173
173
|
}
|
|
174
174
|
if (code !== 0) {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
});
|
|
179
|
-
return;
|
|
175
|
+
const error = providerExitFailure(command, stderr, stdout, code);
|
|
176
|
+
if (isSignInFailure(error)) providerSignIns.refused(providerAgent(command));
|
|
177
|
+
return finish({ ok: false, error });
|
|
180
178
|
}
|
|
179
|
+
providerSignIns.accepted(providerAgent(command));
|
|
181
180
|
try {
|
|
182
181
|
finish(parse(stdout));
|
|
183
182
|
} catch (error) {
|
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.161
|
|
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.161\";\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.161";
|
|
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;
|