granttap-mcp 0.8.158 → 0.8.160

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.
@@ -2767,3 +2767,68 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2767
2767
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2768
2768
  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2769
2769
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2770
+
2771
+
2772
+ marked 18.1.3 — MIT
2773
+ Source: https://www.npmjs.com/package/marked/v/18.1.3
2774
+
2775
+ # License information
2776
+
2777
+ ## Contribution License Agreement
2778
+
2779
+ If you contribute code to this project, you are implicitly allowing your code
2780
+ to be distributed under the MIT license. You are also implicitly verifying that
2781
+ all code is your original work. `</legalese>`
2782
+
2783
+ ## Marked
2784
+
2785
+ Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/)
2786
+ Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/)
2787
+
2788
+ Permission is hereby granted, free of charge, to any person obtaining a copy
2789
+ of this software and associated documentation files (the "Software"), to deal
2790
+ in the Software without restriction, including without limitation the rights
2791
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2792
+ copies of the Software, and to permit persons to whom the Software is
2793
+ furnished to do so, subject to the following conditions:
2794
+
2795
+ The above copyright notice and this permission notice shall be included in
2796
+ all copies or substantial portions of the Software.
2797
+
2798
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2799
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2800
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2801
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2802
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2803
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2804
+ THE SOFTWARE.
2805
+
2806
+ ## Markdown
2807
+
2808
+ Copyright © 2004, John Gruber
2809
+ http://daringfireball.net/
2810
+ All rights reserved.
2811
+
2812
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
2813
+
2814
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2815
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
2816
+ * Neither the name “Markdown” nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
2817
+
2818
+ This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
2819
+
2820
+
2821
+ entities 9.0.0 — BSD-2-Clause
2822
+ Source: https://www.npmjs.com/package/entities/v/9.0.0
2823
+
2824
+ Copyright (c) Felix Böhm
2825
+ All rights reserved.
2826
+
2827
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
2828
+
2829
+ Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2830
+
2831
+ Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
2832
+
2833
+ THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
2834
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -21,6 +21,8 @@ boundaries and upstream grants remain separate from GrantTap's first-party comme
21
21
  | `ws` | MIT |
22
22
  | `zod` | MIT |
23
23
  | `smol-toml` | BSD-3-Clause |
24
+ | `marked` | MIT, with the original Markdown notice retained |
25
+ | `entities` | BSD-2-Clause |
24
26
 
25
27
  The unpublished Rust workspace also depends on separately licensed components,
26
28
  including `mcport` (MIT), `blazingly-json` (MIT), `serde` (MIT OR Apache-2.0), and
@@ -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
- if (dependencies.endpoint && !bindings.length && !failures.length && !own && current.bindings?.length) return false;
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 needsGit = own ? [unavailable(own.repositoryId, "GIT_CHECKOUT_REQUIRED")] : [];
89
- const reports = observed.length + unfinished.length + needsGit.length > 0 ? [...observed, ...unfinished, ...needsGit]
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
- * A snapshot is sealed twice, with the task key and then for transport, and each base64 layer adds a
6
- * third; this plaintext budget keeps the sealed frame under the relay's 1.8 MB stored-message limit.
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 = 900_000;
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
- function cut(graph: ProjectRepositoryGraph, maxBytes: number): ProjectRepositoryGraph {
13
- return fitRepositoryGraph(graph, maxBytes)
14
- ?? { ...graph, codeMap: undefined, nodes: [], relations: [], truncated: true };
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
- * Each repository graph is bounded on its own, so a Project bound to many checkouts outgrew the relay
19
- * as a whole. Graphs are shrunk first, then repository details and graphs are left out; the Project,
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
- let fitted = snapshot;
26
- for (const perGraph of graphs.length ? [96, 48, 24, 12] : []) {
27
- fitted = { ...fitted, repositoryGraphs: graphs.map(graph => ({ ...cut(graph, perGraph * 1_024), truncated: true })) };
28
- if (size(fitted) <= maxBytes) return fitted;
29
- }
30
- if (fitted.repositoryDetails) {
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
  }
@@ -0,0 +1,14 @@
1
+ # Plain catalog previews
2
+
3
+ `plainPreview` turns a complete visible assistant message into a bounded catalog
4
+ summary. Markdown is tokenized before the display limit is applied, so a long
5
+ link destination or emphasis span cannot leave a broken delimiter in a task
6
+ card. Blocks retain word boundaries; code punctuation stays literal. No HTML is
7
+ rendered, links followed, or original transcript text rewritten.
8
+
9
+ The Codex and Claude scanners use this entry point for summaries. Shared title
10
+ projection also parses before its existing display limit. Full transcript
11
+ messages retain their original Markdown. Tests cover scanner output and the
12
+ plain-text projection independently.
13
+
14
+ Licensed under the GrantTap Commercial Source License. See LICENSE and NOTICE.
@@ -0,0 +1,41 @@
1
+ import { Lexer, type Token, type Tokens } from 'marked';
2
+ import { decodeHTML } from 'entities';
3
+ import { stripTranscriptMarkup } from '../support/activity-helpers';
4
+
5
+ function inline(tokens: readonly Token[]): string {
6
+ return tokens.map(readToken).join('');
7
+ }
8
+
9
+ function children(token: Token): string {
10
+ if ('tokens' in token && Array.isArray(token.tokens)) return inline(token.tokens);
11
+ return 'text' in token ? String(token.text) : '';
12
+ }
13
+
14
+ function tableText(token: Tokens.Table): string {
15
+ return [token.header, ...token.rows].map(row =>
16
+ row.map(cell => inline(cell.tokens)).join(' | ')).join('\n') + '\n';
17
+ }
18
+
19
+ /** Read text from parsed tokens, never rendered HTML or executable content. */
20
+ function readToken(token: Token): string {
21
+ switch (token.type) {
22
+ case 'space': case 'br': case 'hr': return '\n';
23
+ case 'def': return '';
24
+ case 'table': return tableText(token as Tokens.Table);
25
+ case 'list': return '\n' + (token as Tokens.List).items.map(item => inline(item.tokens)).join('\n') + '\n';
26
+ case 'paragraph': case 'heading': case 'blockquote': return children(token) + '\n';
27
+ case 'code': return String(token.text) + '\n';
28
+ case 'codespan': case 'escape': return String(token.text);
29
+ case 'html': return decodeHTML(String(token.text).replace(/<[^>]*>/g, ''));
30
+ case 'text': case 'image':
31
+ return 'tokens' in token && Array.isArray(token.tokens) ? inline(token.tokens) : decodeHTML(String(token.text));
32
+ default: return children(token);
33
+ }
34
+ }
35
+
36
+ /** Catalog summaries are display text. Parse complete Markdown before shortening it. */
37
+ export function plainPreview(value: unknown, limit = 160): string | undefined {
38
+ const source = stripTranscriptMarkup(value);
39
+ const visible = inline(Lexer.lex(source, { gfm: true })).replace(/\s+/g, ' ').trim();
40
+ return visible ? Array.from(visible).slice(0, limit).join('') : undefined;
41
+ }
@@ -3,6 +3,7 @@ import { mergeRecordedClaudeUsage, recordedClaudeUsageIsCurrent } from './record
3
3
  import { basename } from "node:path";
4
4
  import type { ChildThreadInfo, SessionInfo } from "../../../../../../packages/protocol/schema";
5
5
  import { aggregateChildThreads, childTitle } from "../../support/child-threads";
6
+ import { plainPreview } from '../../plain-preview';
6
7
  import { rememberCapabilityObservation } from "../../telemetry";
7
8
  import { observeClaudeTurn } from "./turn-state";
8
9
  import { claudeContextReport } from "../../context-usage";
@@ -104,11 +105,11 @@ function applyClaudeLine(d: any, state: ClaudeParseState): void {
104
105
  if (d.message?.role === "assistant") {
105
106
  const content = d.message.content;
106
107
  if (typeof content === "string" && content.trim()) {
107
- state.summary = childTitle(content)?.slice(0, 180);
108
+ state.summary = plainPreview(content);
108
109
  } else if (Array.isArray(content)) {
109
110
  for (const block of content) {
110
111
  if (block?.type === "text" && typeof block.text === "string" && block.text.trim()) {
111
- state.summary = childTitle(block.text)?.slice(0, 180);
112
+ state.summary = plainPreview(block.text);
112
113
  }
113
114
  }
114
115
  }
@@ -19,6 +19,7 @@ import { codexHeadRequest, isProvisionalPageTitle } from "../../support/codex-he
19
19
  import { heartbeatDisplayText } from '../../host-heartbeat';
20
20
  import { codexContextReport } from "../../context-usage";
21
21
  import { codexRequestTitle } from '../../native-task-titles';
22
+ import { plainPreview } from '../../plain-preview';
22
23
 
23
24
  type CodexParseState = {
24
25
  sessionId: string;
@@ -113,7 +114,7 @@ function applyCodexLine(d: any, state: CodexParseState): void {
113
114
  if (d.type === "event_msg" && d.payload?.type === "agent_message") {
114
115
  const raw = d.payload.message ?? d.payload.text;
115
116
  const visible = heartbeatDisplayText(raw, 'message') ?? raw;
116
- if (visible) state.summary = childTitle(visible)?.slice(0, 180);
117
+ if (visible) state.summary = plainPreview(visible);
117
118
  }
118
119
  if (
119
120
  d.type === "response_item" &&
@@ -124,7 +125,7 @@ function applyCodexLine(d: any, state: CodexParseState): void {
124
125
  for (const block of d.payload.content) {
125
126
  if (["output_text", "text"].includes(block?.type) && typeof block.text === "string") {
126
127
  const visible = heartbeatDisplayText(block.text, 'message') ?? block.text;
127
- if (visible) state.summary = childTitle(visible)?.slice(0, 180);
128
+ if (visible) state.summary = plainPreview(visible);
128
129
  }
129
130
  }
130
131
  }
@@ -3,15 +3,14 @@ import type {
3
3
  ChildThreadInfo,
4
4
  SessionInfo,
5
5
  } from "../../../../../packages/protocol/schema";
6
- import { stripTranscriptMarkup } from "./activity-helpers";
6
+ import { plainPreview } from '../plain-preview';
7
7
 
8
8
  /** Protocol and UI share this hard ceiling; provider logs can contain thousands. */
9
9
  export const MAX_CHILD_THREADS = 32;
10
10
  export const MAX_CHILD_THREAD_TITLE = 160;
11
11
 
12
12
  export function childTitle(value: unknown): string | undefined {
13
- const text = stripTranscriptMarkup(value).replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim();
14
- return text ? text.slice(0, MAX_CHILD_THREAD_TITLE) : undefined;
13
+ return plainPreview(value, MAX_CHILD_THREAD_TITLE);
15
14
  }
16
15
 
17
16
  /** Keep the most recently active children while returning them chronologically. */
@@ -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.158
13
+ npm install -g granttap-mcp@0.8.160
14
14
  granttap setup
15
15
  granttap status
16
16
  ```
@@ -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.158\";\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"
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.160\";\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.158";
10
+ const PACKAGE = "granttap-mcp@0.8.160";
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "granttap-mcp",
3
- "version": "0.8.158",
3
+ "version": "0.8.160",
4
4
  "description": "Commercial computer runtime connecting local coding agents to GrantTap on Mac, iPhone, iPad and Apple Watch.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -37,7 +37,9 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@modelcontextprotocol/sdk": "^1.32.1",
40
+ "entities": "9.0.0",
40
41
  "express": "^5.2.1",
42
+ "marked": "18.1.3",
41
43
  "qrcode": "^1.5.4",
42
44
  "smol-toml": "1.9.1",
43
45
  "tsx": "^4.23.4",