granttap-mcp 0.8.158 → 0.8.159
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/THIRD_PARTY_LICENSES.txt +65 -0
- package/THIRD_PARTY_NOTICES.md +2 -0
- package/apps/bridge/src/sessions/plain-preview/README.md +14 -0
- package/apps/bridge/src/sessions/plain-preview/index.ts +41 -0
- package/apps/bridge/src/sessions/scan/claude/parse.ts +3 -2
- package/apps/bridge/src/sessions/scan/codex/parse.ts +3 -2
- package/apps/bridge/src/sessions/support/child-threads.ts +2 -3
- 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 +3 -1
package/THIRD_PARTY_LICENSES.txt
CHANGED
|
@@ -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.
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -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
|
|
@@ -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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 {
|
|
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
|
-
|
|
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. */
|
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.159
|
|
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.159\";\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.159";
|
|
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.
|
|
3
|
+
"version": "0.8.159",
|
|
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",
|