granttap-mcp 0.8.194 → 0.8.196
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/README.md +131 -37
- package/apps/bridge/src/pairing/presence.ts +33 -13
- package/apps/bridge/src/provider-model-catalog/README.md +4 -2
- package/apps/bridge/src/provider-model-catalog/index.ts +11 -0
- package/apps/bridge/src/reply/README.md +12 -0
- package/apps/bridge/src/reply/index.ts +2 -2
- package/apps/bridge/src/reply/process/codex-headless.ts +3 -2
- package/apps/bridge/src/reply/process/provider-effort.ts +16 -0
- package/cursor-plugin/.cursor-plugin/plugin.json +1 -1
- package/cursor-plugin/README.md +13 -5
- package/cursor-plugin/mcp.json +1 -1
- package/cursor-plugin/stdio-bootstrap.cjs +1 -1
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -6,11 +6,120 @@
|
|
|
6
6
|
|
|
7
7
|
> **See what your coding agents are doing. Step in when they need you.**
|
|
8
8
|
|
|
9
|
-
GrantTap
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
integrations support it.
|
|
9
|
+
GrantTap puts the coding agents running on your computer in your pocket. Approve
|
|
10
|
+
a tool call, answer a question, read the latest reply and send the next message
|
|
11
|
+
from iPhone, iPad or Apple Watch, while the agents and your provider sign-ins
|
|
12
|
+
stay on the computer. Claude Code and Codex have the full control path;
|
|
13
|
+
Cursor (Beta) and Grok Build join where their local integrations support it.
|
|
14
|
+
|
|
15
|
+
`granttap-mcp` is the part that runs on the computer: the `granttap` CLI, the MCP
|
|
16
|
+
server and connection card, provider hooks and a background helper. Pair it with
|
|
17
|
+
the GrantTap app, a free download on the App Store for iPhone and iPad.
|
|
18
|
+
|
|
19
|
+
<a href="https://apps.apple.com/app/id6809739366"><img src="https://toolbox.marketingtools.apple.com/api/v2/badges/download-on-the-app-store/black/en-us" alt="Download GrantTap on the App Store" height="40"></a>
|
|
20
|
+
|
|
21
|
+
**iPhone and iPad:** on the App Store, version 1.0.2. Plans are bought in the
|
|
22
|
+
app through Apple. **Apple Watch:** a companion to the iPhone app. **Mac:**
|
|
23
|
+
TestFlight now; on the Mac App Store after Apple approves it.
|
|
24
|
+
|
|
25
|
+
[Website](https://granttap.com) ·
|
|
26
|
+
[App Store](https://apps.apple.com/app/id6809739366) ·
|
|
27
|
+
[npm](https://www.npmjs.com/package/granttap-mcp) ·
|
|
28
|
+
[Security model](SECURITY.md) ·
|
|
29
|
+
[Relay source](https://github.com/sergii-ziborov/granttap-relay)
|
|
30
|
+
|
|
31
|
+
## Quick start
|
|
32
|
+
|
|
33
|
+
On the computer where your agents run, with Node.js 22.13.0 or newer:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install -g granttap-mcp
|
|
37
|
+
granttap setup
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
1. `granttap setup` finds Claude Code, Codex, Cursor and Grok Build on this
|
|
41
|
+
computer, installs or repairs their GrantTap hooks, starts the background
|
|
42
|
+
helper and, in an interactive terminal, shows a one-time pairing QR.
|
|
43
|
+
2. Install [GrantTap from the App Store](https://apps.apple.com/app/id6809739366)
|
|
44
|
+
and scan that QR in **Devices → Add a device → Scan QR**. QR pairing needs no
|
|
45
|
+
account. With a GrantTap account, sign in with your passkey instead and use
|
|
46
|
+
**Connect with passkey** on the connection card to link this computer.
|
|
47
|
+
3. Add the plugin for your coding app (see [Install](#install)) to get the
|
|
48
|
+
connection card and the tools in chat, and run `granttap status` at any time
|
|
49
|
+
for a read-only readiness check.
|
|
50
|
+
|
|
51
|
+
`npx granttap-mcp` only starts the stdio MCP server that the plugins launch. Run
|
|
52
|
+
`granttap setup` from the global install: the background helper and the local MCP
|
|
53
|
+
service need a durable path, not npm's temporary `npx` cache.
|
|
54
|
+
|
|
55
|
+
## How the pieces fit
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
Your computer GrantTap Relay Your devices
|
|
59
|
+
Claude Code · Codex · Cursor · <=> ciphertext only: <=> GrantTap for iPhone and iPad
|
|
60
|
+
Grok Build + granttap-mcp routes, queues, wakes Apple Watch through iPhone
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- **GrantTap app** — where you see the work and decide: Now, Tasks, chats,
|
|
64
|
+
approvals, questions, Mesh and usage. iPhone and iPad on the App Store, Apple
|
|
65
|
+
Watch through iPhone, Mac in TestFlight.
|
|
66
|
+
- **GrantTap MCP** (this package) — runs beside your agents. It reads their
|
|
67
|
+
native sessions, enforces approvals in their hooks, delivers your messages and
|
|
68
|
+
answers, and serves the MCP tools and connection card.
|
|
69
|
+
- **[GrantTap Relay](https://github.com/sergii-ziborov/granttap-relay)** —
|
|
70
|
+
carries end-to-end encrypted traffic between the two and keeps it while a
|
|
71
|
+
device is asleep or offline. It sees routing metadata and ciphertext, never the
|
|
72
|
+
content. Its source is public.
|
|
73
|
+
|
|
74
|
+
## What's new
|
|
75
|
+
|
|
76
|
+
Available now, with GrantTap MCP 0.8.196 on npm and GrantTap 1.0.2 on the App Store:
|
|
77
|
+
|
|
78
|
+
- **Phones on the connection card.** In Claude (including the Claude desktop app),
|
|
79
|
+
Codex, Cursor and Grok Build, the GrantTap card lists every phone paired with
|
|
80
|
+
this computer and when it last reached it, and removes unused ones after a yes
|
|
81
|
+
on a phone.
|
|
82
|
+
- **Runs linked to the chat that started them.** A `codex exec`, `claude -p` or
|
|
83
|
+
`grok -p` run that a chat starts, directly or from a script such as an image
|
|
84
|
+
job, names that chat, and its end is spelled out: `Codex stopped: …` with
|
|
85
|
+
Codex's reason, such as a usage limit, or `Picture saved: …`.
|
|
86
|
+
- **Passkey link.** `connect_with_passkey` links this computer to your GrantTap
|
|
87
|
+
account through granttap.com; existing QR pairings stay as they are.
|
|
88
|
+
- **Automatic runtime updates.** The helper checks for a new version every hour
|
|
89
|
+
and switches when running work allows, usually taking a chat's running turn
|
|
90
|
+
along and never dropping a waiting message. Switch it off on the connection
|
|
91
|
+
card.
|
|
92
|
+
- **End-to-end encrypted relay.** Messages, approvals and catalogs travel as
|
|
93
|
+
ciphertext; a relay wake carries no task content.
|
|
94
|
+
- **In the app (1.0.2):** rename, star and flag chats; edit a Mesh's
|
|
95
|
+
repositories from the phone; choose a New Task's Mesh from a searchable list;
|
|
96
|
+
see a chat's reasoning effort on the model button.
|
|
97
|
+
|
|
98
|
+
Coming in the next iPhone and iPad update (1.0.3), after Apple approves it. This
|
|
99
|
+
package already supports the computer side:
|
|
100
|
+
|
|
101
|
+
- runs a chat started hang beneath it in Now, Tasks and History, with how each ended;
|
|
102
|
+
- review a chat's uncommitted changes and commit chosen files from the phone;
|
|
103
|
+
- **Devices** lists every phone a computer accepts and everything signed in to
|
|
104
|
+
your account, with Remove and Sign out;
|
|
105
|
+
- passkey sign-in on the app's first screen, and sign-in on granttap.com by
|
|
106
|
+
scanning the QR on its account page.
|
|
107
|
+
|
|
108
|
+
## Start here
|
|
109
|
+
|
|
110
|
+
- [What the runtime does](#what-the-runtime-does)
|
|
111
|
+
- [Connect your computer and devices](#account-mesh-and-devices)
|
|
112
|
+
- [Choose a connection mode and plan](#plans-and-what-you-pay-for)
|
|
113
|
+
- [Provider support](#supported-providers)
|
|
114
|
+
- [Install provider integrations](#install)
|
|
115
|
+
- [Messages, queues and decisions](#messages-queues-and-decisions)
|
|
116
|
+
- [Project Mesh and task transfer](#project-mesh-and-task-handoff)
|
|
117
|
+
- [Approvals and questions](#decisions-and-claude-questions)
|
|
118
|
+
- [Security and relay boundary](#relay-boundary)
|
|
119
|
+
- [Troubleshooting and help](#troubleshooting-and-help)
|
|
120
|
+
- [License](#license)
|
|
121
|
+
|
|
122
|
+
## What the runtime does
|
|
14
123
|
|
|
15
124
|
This repository supplies the local runtime: CLI, MCP server, provider hooks,
|
|
16
125
|
adapters, and wire contracts. It powers Project Mesh, Governance, and observed
|
|
@@ -43,28 +152,9 @@ Managed service use requires authorized GrantTap account access; official TestFl
|
|
|
43
152
|
access remains free. Earlier releases through 0.8.75 retain their Apache-2.0
|
|
44
153
|
permissions. The Apple apps, Engine, relay, and website have their own terms.
|
|
45
154
|
|
|
46
|
-
[Website](https://granttap.com) ·
|
|
47
|
-
[App Store](https://apps.apple.com/app/id6809739366) ·
|
|
48
|
-
[npm](https://www.npmjs.com/package/granttap-mcp) ·
|
|
49
|
-
[Security model](SECURITY.md) ·
|
|
50
|
-
[Relay source](https://github.com/sergii-ziborov/granttap-relay)
|
|
51
|
-
|
|
52
|
-
## Start here
|
|
53
|
-
|
|
54
|
-
- [Connect your computer and devices](#account-mesh-and-devices)
|
|
55
|
-
- [Choose a connection mode and plan](#plans-and-what-you-pay-for)
|
|
56
|
-
- [Provider support](#supported-providers)
|
|
57
|
-
- [Install provider integrations](#install)
|
|
58
|
-
- [Messages, queues and decisions](#messages-queues-and-decisions)
|
|
59
|
-
- [Project Mesh and task transfer](#project-mesh-and-task-handoff)
|
|
60
|
-
- [Approvals and questions](#decisions-and-claude-questions)
|
|
61
|
-
- [Security and relay boundary](#relay-boundary)
|
|
62
|
-
- [Troubleshooting and help](#troubleshooting-and-help)
|
|
63
|
-
- [License](#license)
|
|
64
|
-
|
|
65
155
|
## Plans and what you pay for
|
|
66
156
|
|
|
67
|
-
|
|
157
|
+
US prices, sold through Apple in GrantTap for iPhone and iPad:
|
|
68
158
|
|
|
69
159
|
| Plan | Monthly price | Managed publishing computers |
|
|
70
160
|
| --- | ---: | ---: |
|
|
@@ -83,16 +173,17 @@ monthly at the price shown by Apple. To avoid renewal, cancel at least 24 hours
|
|
|
83
173
|
before the trial ends in Apple's subscription settings.
|
|
84
174
|
A local cache is not deleted when managed access ends.
|
|
85
175
|
|
|
86
|
-
**GrantTap for iPhone and iPad is on the
|
|
87
|
-
[App Store](https://apps.apple.com/app/id6809739366)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
purchase or subscription; a trial and TestFlight access are
|
|
91
|
-
access. The App Store purchase sheet determines availability,
|
|
92
|
-
eligibility and terms.
|
|
176
|
+
**GrantTap for iPhone and iPad is a free download on the
|
|
177
|
+
[App Store](https://apps.apple.com/app/id6809739366)**; subscriptions are bought
|
|
178
|
+
in the app through Apple. GrantTap for Mac is in TestFlight now and comes to the
|
|
179
|
+
Mac App Store after Apple approves it. Official TestFlight builds include all
|
|
180
|
+
features without a purchase or subscription; a trial and TestFlight access are
|
|
181
|
+
different forms of access. The App Store purchase sheet determines availability,
|
|
182
|
+
localized prices, eligibility and terms.
|
|
93
183
|
Models, AI tokens and coding-provider plans are purchased separately.
|
|
94
184
|
|
|
95
|
-
**Mac Local is a separate $39.99 one-time purchase**
|
|
185
|
+
**Mac Local is a separate $39.99 one-time purchase** in the Mac app, offered once
|
|
186
|
+
the Mac app is on the App Store, for local control and an
|
|
96
187
|
own relay. Hosted managed delivery is not included in that purchase. An active
|
|
97
188
|
Personal subscription already covers a managed Mac client; both purchases are
|
|
98
189
|
not required for the same managed mode. npm distributes the computer runtime;
|
|
@@ -959,8 +1050,9 @@ metadata and ciphertext, not provider credentials or task plaintext. Pairing
|
|
|
959
1050
|
handoff uses a relay-visible random mailbox ID plus an independent transfer key
|
|
960
1051
|
that stays in the QR.
|
|
961
1052
|
|
|
962
|
-
APNs
|
|
963
|
-
|
|
1053
|
+
An APNs wake is content-neutral. It contains no prompt, task title, command,
|
|
1054
|
+
path, request ID, or ciphertext. A task Live Activity update carries its
|
|
1055
|
+
preview to APNs only as ciphertext, which the phone decrypts. See [SECURITY.md](SECURITY.md) for the
|
|
964
1056
|
complete boundary and reporting instructions.
|
|
965
1057
|
|
|
966
1058
|
## Troubleshooting and help
|
|
@@ -982,8 +1074,10 @@ complete boundary and reporting instructions.
|
|
|
982
1074
|
- **Health has no current architecture:** check the reported checkout and Engine
|
|
983
1075
|
on the publishing computer, then request a rebuild. An old or partial report
|
|
984
1076
|
remains inspectable and must not be treated as verified current architecture.
|
|
985
|
-
- **No purchase shown:**
|
|
986
|
-
|
|
1077
|
+
- **No purchase shown:** plans are sold in the iPhone and iPad app; Mac Local
|
|
1078
|
+
appears in the Mac app once it is on the App Store. A storefront where
|
|
1079
|
+
GrantTap is not offered shows no purchase, and TestFlight does not require
|
|
1080
|
+
one. Use Restore Purchases for an existing
|
|
987
1081
|
Apple purchase and the same GrantTap passkey for account access.
|
|
988
1082
|
|
|
989
1083
|
Update the helper with `npm install -g granttap-mcp@latest`, then reopen the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { readFileSync, unlinkSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
3
|
import { configDir } from "../config/runtime/paths";
|
|
4
4
|
import { writePrivateFile } from "../config/access/write-private";
|
|
5
5
|
|
|
@@ -80,17 +80,37 @@ export function hasControllerPresence(): boolean {
|
|
|
80
80
|
return Object.keys(readPresence().controllers ?? {}).length > 0;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
83
|
+
const SEEN_WRITE_INTERVAL_MS = 5_000;
|
|
84
|
+
const lastSeenWrites = new Map<string, number>();
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Remember the last encrypted phone payload. The monitor and every MCP server in an open chat write this
|
|
88
|
+
* file; a shared temporary name let one process rename another's file away, and the ENOENT that followed
|
|
89
|
+
* dropped the phone's request (chat events, subscriptions, pictures, settings, device management). The
|
|
90
|
+
* write now uses its own temporary file, happens at most every few seconds per phone, and never throws:
|
|
91
|
+
* presence is advisory and must not cost the phone its answer.
|
|
92
|
+
*/
|
|
93
|
+
export function recordPhoneSeen(at = Date.now(), peerPublicKey?: string): boolean {
|
|
94
|
+
const key = peerPublicKey ?? "";
|
|
95
|
+
const last = lastSeenWrites.get(key);
|
|
96
|
+
if (last !== undefined && at >= last && at - last < SEEN_WRITE_INTERVAL_MS) return true;
|
|
97
|
+
try {
|
|
98
|
+
const previous = readPresence();
|
|
99
|
+
writePrivateFile(presencePath(), JSON.stringify({ ...previous, phoneLastSeenAt: at,
|
|
100
|
+
controllers: peerPublicKey
|
|
101
|
+
? { ...previous.controllers, [peerPublicKey]: at }
|
|
102
|
+
: previous.controllers,
|
|
103
|
+
}));
|
|
104
|
+
lastSeenWrites.set(key, at);
|
|
105
|
+
return true;
|
|
106
|
+
} catch {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Tests start each case from a clean throttle. */
|
|
112
|
+
export function resetPhoneSeenThrottle(): void {
|
|
113
|
+
lastSeenWrites.clear();
|
|
94
114
|
}
|
|
95
115
|
|
|
96
116
|
export function clearPhoneSeen(): void {
|
|
@@ -5,8 +5,10 @@ installed Codex account's visible model-picker metadata from `models_cache.json`
|
|
|
5
5
|
It reads fresh data each catalog cycle so new models do not require a GrantTap
|
|
6
6
|
release. `CODEX_HOME` and GrantTap's existing Codex directory overrides are honored.
|
|
7
7
|
|
|
8
|
-
Hidden/internal models are excluded. Labels, descriptions, ordering
|
|
9
|
-
|
|
8
|
+
Hidden/internal models are excluded. Labels, descriptions, ordering, each model's
|
|
9
|
+
accepted reasoning levels (`supported_reasoning_levels`, as `supportedEfforts`: the
|
|
10
|
+
luna models list no `ultra`) and the provider's fetch timestamp are preserved, as the
|
|
11
|
+
live app-server catalog already did; without them the phone offered every Codex level. Prompt instructions, account identity
|
|
10
12
|
and the rest of the native payload never cross the wire. Reads are bounded to
|
|
11
13
|
2 MB and 64 model rows. Cache data older than 24 hours, malformed data, and
|
|
12
14
|
future timestamps beyond the clock allowance remain unavailable/stale. GrantTap
|
|
@@ -10,6 +10,16 @@ import { cachedNativeAccountUsage, cachedProviderAccount } from "../provider-acc
|
|
|
10
10
|
const MAX_BYTES = 2_000_000;
|
|
11
11
|
const MAX_AGE = 24 * 60 * 60_000;
|
|
12
12
|
const MODEL_ID = /^[a-zA-Z0-9][a-zA-Z0-9._:/-]{0,159}$/;
|
|
13
|
+
const EFFORTS = ["low", "medium", "high", "xhigh", "max", "ultra"] as const;
|
|
14
|
+
type Effort = typeof EFFORTS[number];
|
|
15
|
+
|
|
16
|
+
/** The levels a cached model accepts (its luna models have no ultra); unknown when it lists none. */
|
|
17
|
+
function cachedEfforts(value: unknown): { supportedEfforts?: Effort[] } {
|
|
18
|
+
if (!Array.isArray(value)) return {};
|
|
19
|
+
const levels = value.map(level => (level as { effort?: unknown } | null)?.effort)
|
|
20
|
+
.filter((effort): effort is Effort => EFFORTS.includes(effort as Effort));
|
|
21
|
+
return { supportedEfforts: [...new Set(levels)] };
|
|
22
|
+
}
|
|
13
23
|
|
|
14
24
|
function shortText(value: unknown): string | undefined {
|
|
15
25
|
if (typeof value !== "string") return undefined;
|
|
@@ -25,6 +35,7 @@ function row(value: unknown, endpointId: string, observedAt: number): Advertised
|
|
|
25
35
|
label: shortText(native.display_name), description: shortText(native.description),
|
|
26
36
|
...(Number.isInteger(native.priority) && Number(native.priority) >= 0 && Number(native.priority) <= 10_000
|
|
27
37
|
? { priority: Number(native.priority) } : {}),
|
|
38
|
+
...cachedEfforts(native.supported_reasoning_levels),
|
|
28
39
|
};
|
|
29
40
|
}
|
|
30
41
|
|
|
@@ -48,6 +48,18 @@ effort that message carries, else the capsule's `targetModel`. Grok Build is
|
|
|
48
48
|
resolved with `providers/grok-bin.ts`. Tests:
|
|
49
49
|
[`tests/model-effort-args.test.ts`](tests/model-effort-args.test.ts).
|
|
50
50
|
|
|
51
|
+
A resumed headless Claude or Codex turn that names no effort keeps the chat's own: the
|
|
52
|
+
one its latest request used, as its catalog row reports it (`resumedEffort`). Without
|
|
53
|
+
the flag the CLI starts at its own default instead. On the owner's Mac, Claude Code ran
|
|
54
|
+
phone follow-ups at medium in chats begun from the phone at xhigh, though its settings
|
|
55
|
+
said xhigh, and a Codex resume takes config.toml's level. Codex levels differ by model,
|
|
56
|
+
so a turn that switches the Codex model keeps nothing it did not choose; Claude Code
|
|
57
|
+
retries a level a model refuses without it. A chat that reported no effort, or a level
|
|
58
|
+
the provider does not have, resumes as before. The model is not carried this way: a
|
|
59
|
+
Claude chat reports the resolved model id, which cannot say whether a 1M-context
|
|
60
|
+
variant was chosen. Tests: [`tests/turn/phone-task-controls.test.ts`](../../../../tests/turn/phone-task-controls.test.ts)
|
|
61
|
+
drives phone-shaped messages through the monitor to the exact Claude and Codex command lines.
|
|
62
|
+
|
|
51
63
|
Explicit Cursor task turns pass `--trust` for the selected workspace so an
|
|
52
64
|
updated CLI cannot wait for an invisible desktop trust prompt. Resumes without
|
|
53
65
|
a reported workspace are refused. Tool approvals and global action bans remain
|
|
@@ -10,7 +10,7 @@ import type { CodingAgent } from "../../../../packages/protocol/schema";
|
|
|
10
10
|
import { resolveClaudeBinary } from "../providers/claude-bin";
|
|
11
11
|
import { parseClaudeResult } from "./payload/claude-result";
|
|
12
12
|
import { runCodex, runCodexNew } from "./process/codex-headless";
|
|
13
|
-
import { providerEffortArgs } from "./process/provider-effort";
|
|
13
|
+
import { providerEffortArgs, resumedEffort } from "./process/provider-effort";
|
|
14
14
|
import { configDir, isSessionPaused, loadRuntimeConfig, PAUSED_SESSION_REASON } from "../config";
|
|
15
15
|
import { withAttachments } from "./payload/attachments";
|
|
16
16
|
import { abortProcesses, runProcess } from "./process";
|
|
@@ -205,7 +205,7 @@ function runClaude(
|
|
|
205
205
|
const modeArgs = options.permissionMode
|
|
206
206
|
? ["--permission-mode", options.permissionMode]
|
|
207
207
|
: [];
|
|
208
|
-
const effortArgs = providerEffortArgs("claude", options
|
|
208
|
+
const effortArgs = providerEffortArgs("claude", resumedEffort("claude", session, options));
|
|
209
209
|
const args = [
|
|
210
210
|
"-p", "--resume", session.sessionId, ...mcpArgs, ...modelArgs,
|
|
211
211
|
...modeArgs, ...effortArgs,
|
|
@@ -2,7 +2,7 @@ import type { SessionInfo } from "../../../../../packages/protocol/schema";
|
|
|
2
2
|
import { loadRuntimeConfig } from "../../config";
|
|
3
3
|
import { resolveCodexBinary } from "../../providers/codex-bin";
|
|
4
4
|
import { runProcess } from ".";
|
|
5
|
-
import { providerEffortArgs } from "./provider-effort";
|
|
5
|
+
import { providerEffortArgs, resumedEffort } from "./provider-effort";
|
|
6
6
|
import type { DeliveryOptions, ReplyResult } from "../payload/types";
|
|
7
7
|
import { continueCodexQuestion, deliverToCodexDesktop, nativeQuestionAttachmentEnvelope } from '../../codex-desktop';
|
|
8
8
|
|
|
@@ -79,7 +79,8 @@ async function resumeCodex(session: SessionInfo, text: string, timeoutMs: number
|
|
|
79
79
|
const modelArgs = options.model ? ["-m", options.model] : [];
|
|
80
80
|
const imageArgs = images.flatMap((path) => ["-i", path]);
|
|
81
81
|
const args = [
|
|
82
|
-
"exec", "resume", ...accessArgs, ...mcpArgs, ...modelArgs,
|
|
82
|
+
"exec", "resume", ...accessArgs, ...mcpArgs, ...modelArgs,
|
|
83
|
+
...providerEffortArgs("codex", resumedEffort("codex", session, options)), ...imageArgs,
|
|
83
84
|
session.sessionId, "--json", "--skip-git-repo-check", "-",
|
|
84
85
|
];
|
|
85
86
|
const result = await runProcess(
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { SessionInfo } from "../../../../../packages/protocol/schema";
|
|
2
|
+
|
|
1
3
|
/** Provider-native controls, never interpolated into a prompt or shell. */
|
|
2
4
|
export function providerEffortArgs(provider: string, effort?: string): string[] {
|
|
3
5
|
if (!effort) return [];
|
|
@@ -9,3 +11,17 @@ export function providerEffortArgs(provider: string, effort?: string): string[]
|
|
|
9
11
|
return provider === "codex" ? ["-c", `model_reasoning_effort="${effort}"`]
|
|
10
12
|
: [provider === "grok" ? "--reasoning-effort" : "--effort", effort];
|
|
11
13
|
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The effort a resumed headless turn runs with. Without the flag the CLI starts at its own default
|
|
17
|
+
* (Claude Code's is medium, Codex's is config.toml's), not at the chat's: a phone follow-up to a
|
|
18
|
+
* chat begun at xhigh ran at medium. A turn that names no effort keeps the one the chat's latest
|
|
19
|
+
* request used, as its catalog row reports it. Codex levels differ by model, so a turn that
|
|
20
|
+
* switches the Codex model keeps nothing; Claude Code retries a level a model refuses without it.
|
|
21
|
+
*/
|
|
22
|
+
export function resumedEffort(provider: string, session: Pick<SessionInfo, "model" | "effort">,
|
|
23
|
+
turn: { model?: string; effort?: string }): string | undefined {
|
|
24
|
+
if (turn.effort) return turn.effort;
|
|
25
|
+
if (provider === "codex" && turn.model && turn.model !== session.model) return undefined;
|
|
26
|
+
return providerEffortArgs(provider, session.effort).length ? session.effort : undefined;
|
|
27
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "granttap",
|
|
3
3
|
"displayName": "GrantTap",
|
|
4
4
|
"version": "0.1.19",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Approve, answer and steer Cursor agents from iPhone, iPad and Apple Watch with the GrantTap app, a free download on the App Store. The connection card pairs this computer with a one-time QR; run granttap phone add in a terminal when Cursor cannot show it.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "GrantTap",
|
|
8
8
|
"email": "support@granttap.com",
|
package/cursor-plugin/README.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# GrantTap Cursor plugin
|
|
2
2
|
|
|
3
|
+
Approve, answer and steer your Cursor agents from iPhone, iPad and Apple Watch.
|
|
4
|
+
GrantTap for iPhone and iPad is a free download on the
|
|
5
|
+
[App Store](https://apps.apple.com/app/id6809739366); Apple Watch is a companion
|
|
6
|
+
to the iPhone app. Cursor support is Beta: GrantTap shows Cursor chats and the
|
|
7
|
+
local controls Cursor's integration supports.
|
|
8
|
+
|
|
9
|
+
<a href="https://apps.apple.com/app/id6809739366"><img src="https://toolbox.marketingtools.apple.com/api/v2/badges/download-on-the-app-store/black/en-us" alt="Download GrantTap on the App Store" height="40"></a>
|
|
10
|
+
|
|
3
11
|
GrantTap connects Cursor to the GrantTap phone app. The Marketplace plugin
|
|
4
12
|
ships stdio MCP. Pair and change settings in the plugin connection card and
|
|
5
13
|
the GrantTap app. Do not add GrantTap in Cursor Customize → MCPs. GrantTap
|
|
@@ -10,7 +18,7 @@ keeps each phone response tied to the exact originating chat and prompt.
|
|
|
10
18
|
Install the supported CLI on this computer, then run:
|
|
11
19
|
|
|
12
20
|
```bash
|
|
13
|
-
npm install -g granttap-mcp@0.8.
|
|
21
|
+
npm install -g granttap-mcp@0.8.196
|
|
14
22
|
granttap setup
|
|
15
23
|
granttap status
|
|
16
24
|
```
|
|
@@ -33,8 +41,8 @@ user Customize → MCPs row or an old plugin `mcp.json`. The current plugin is
|
|
|
33
41
|
stdio (`node -e`) so Cloud never fetches loopback.
|
|
34
42
|
|
|
35
43
|
On Windows, `granttap setup` registers the local helper and phone monitor as
|
|
36
|
-
least-privileged jobs under your signed-in account. Install Node.js
|
|
37
|
-
current `granttap-mcp` package on that same Windows computer. The jobs restart
|
|
44
|
+
least-privileged jobs under your signed-in account. Install Node.js 22.13.0 or
|
|
45
|
+
newer and the current `granttap-mcp` package on that same Windows computer. The jobs restart
|
|
38
46
|
after a crash and keep running when Cursor closes.
|
|
39
47
|
|
|
40
48
|
The plugin `mcp.json` starts GrantTap with `node -e` so Cursor's cwd=`$HOME`
|
|
@@ -89,5 +97,5 @@ Troubleshooting details live in
|
|
|
89
97
|
|
|
90
98
|
## License
|
|
91
99
|
|
|
92
|
-
The plugin is distributed under the [GrantTap Commercial Source License](LICENSE). The GrantTap iPhone
|
|
93
|
-
and Apple Watch app and hosted service have separate terms.
|
|
100
|
+
The plugin is distributed under the [GrantTap Commercial Source License](LICENSE). The GrantTap iPhone,
|
|
101
|
+
iPad and Apple Watch app and hosted service have separate terms.
|
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.196\";\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.196";
|
|
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "granttap-mcp",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.8.196",
|
|
4
|
+
"description": "Approve, answer and steer Claude Code, Codex, Cursor and Grok Build from iPhone, iPad and Apple Watch: the local runtime, CLI and MCP server for GrantTap, a free App Store download.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"granttap": "bin/granttap-mcp.mjs",
|
|
@@ -71,11 +71,14 @@
|
|
|
71
71
|
"keywords": [
|
|
72
72
|
"mcp",
|
|
73
73
|
"model-context-protocol",
|
|
74
|
+
"mcp-server",
|
|
75
|
+
"coding-agents",
|
|
74
76
|
"claude-code",
|
|
75
77
|
"codex",
|
|
76
78
|
"cursor",
|
|
77
79
|
"grok-build",
|
|
78
80
|
"iphone",
|
|
81
|
+
"ipad",
|
|
79
82
|
"apple-watch",
|
|
80
83
|
"e2ee",
|
|
81
84
|
"approvals"
|