@paigy/mcp 0.14.2 → 0.15.0
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.
|
@@ -2531,6 +2531,9 @@ var InboxItemSchema = z.object({
|
|
|
2531
2531
|
options: z.array(OptionSchema).optional(),
|
|
2532
2532
|
/** The ask's declared coverage points (#396), when the agent sent them. */
|
|
2533
2533
|
points: z.array(z.string()).optional(),
|
|
2534
|
+
/** Natural spoken questions for the points (#417 follow-up), phrased at ring time
|
|
2535
|
+
* and index-aligned — the call bot prefers these over the raw shorthand. */
|
|
2536
|
+
pointsSpeak: z.array(z.string()).optional(),
|
|
2534
2537
|
/** On a replied detail (#397): the next steps the user attached to the answer
|
|
2535
2538
|
* ("call back after lunch") — shown so they can see the commitment was captured. */
|
|
2536
2539
|
intents: z.array(IntentSchema).optional(),
|
|
@@ -2825,7 +2828,7 @@ async function reach(url, init) {
|
|
|
2825
2828
|
import { execFile } from "child_process";
|
|
2826
2829
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
2827
2830
|
import { homedir, platform } from "os";
|
|
2828
|
-
import { join } from "path";
|
|
2831
|
+
import { join, dirname } from "path";
|
|
2829
2832
|
|
|
2830
2833
|
// ../../packages/crypto/dist/index.js
|
|
2831
2834
|
var import_tweetnacl = __toESM(require_nacl_fast(), 1);
|
|
@@ -3316,6 +3319,74 @@ function openSealedAnswer(sealed, keypair) {
|
|
|
3316
3319
|
}
|
|
3317
3320
|
return answer;
|
|
3318
3321
|
}
|
|
3322
|
+
function withPaigyMcpJson(existing, agent) {
|
|
3323
|
+
let config = {};
|
|
3324
|
+
if (existing) {
|
|
3325
|
+
try {
|
|
3326
|
+
config = JSON.parse(existing);
|
|
3327
|
+
} catch {
|
|
3328
|
+
return null;
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
config.mcpServers = {
|
|
3332
|
+
...config.mcpServers ?? {},
|
|
3333
|
+
paigy: { command: "npx", args: ["-y", "@paigy/mcp@latest"], env: { PAIGY_AGENT: agent } }
|
|
3334
|
+
};
|
|
3335
|
+
return JSON.stringify(config, null, 2);
|
|
3336
|
+
}
|
|
3337
|
+
function withPaigyMcpToml(existing, agent) {
|
|
3338
|
+
if (existing.includes("[mcp_servers.paigy]")) return null;
|
|
3339
|
+
const entry = [
|
|
3340
|
+
"",
|
|
3341
|
+
"[mcp_servers.paigy]",
|
|
3342
|
+
'command = "npx"',
|
|
3343
|
+
'args = ["-y", "@paigy/mcp@latest"]',
|
|
3344
|
+
`env = { PAIGY_AGENT = "${agent}" }`,
|
|
3345
|
+
""
|
|
3346
|
+
].join("\n");
|
|
3347
|
+
return existing + entry;
|
|
3348
|
+
}
|
|
3349
|
+
function autoConfigureClients(skip = AGENT_NAME) {
|
|
3350
|
+
const home = homedir();
|
|
3351
|
+
const registered = [];
|
|
3352
|
+
if (skip !== "antigravity") {
|
|
3353
|
+
const antigravityConfigs = [
|
|
3354
|
+
join(home, ".gemini", "config", "mcp_config.json"),
|
|
3355
|
+
join(home, ".gemini", "antigravity-cli", "mcp_config.json")
|
|
3356
|
+
];
|
|
3357
|
+
for (const path of antigravityConfigs) {
|
|
3358
|
+
try {
|
|
3359
|
+
if (!existsSync(dirname(path))) continue;
|
|
3360
|
+
const existing = existsSync(path) ? readFileSync(path, "utf8") : null;
|
|
3361
|
+
const updated = withPaigyMcpJson(existing, "antigravity");
|
|
3362
|
+
if (updated === null) continue;
|
|
3363
|
+
writeFileSync(path, updated);
|
|
3364
|
+
registered.push(`Google Antigravity (${path})`);
|
|
3365
|
+
} catch {
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
}
|
|
3369
|
+
if (skip !== "codex") {
|
|
3370
|
+
const codexConfig = join(home, ".codex", "config.toml");
|
|
3371
|
+
try {
|
|
3372
|
+
if (existsSync(dirname(codexConfig))) {
|
|
3373
|
+
const existing = existsSync(codexConfig) ? readFileSync(codexConfig, "utf8") : "";
|
|
3374
|
+
const updated = withPaigyMcpToml(existing, "codex");
|
|
3375
|
+
if (updated !== null) {
|
|
3376
|
+
writeFileSync(codexConfig, updated);
|
|
3377
|
+
registered.push(`OpenAI Codex (${codexConfig})`);
|
|
3378
|
+
}
|
|
3379
|
+
}
|
|
3380
|
+
} catch {
|
|
3381
|
+
}
|
|
3382
|
+
}
|
|
3383
|
+
return registered;
|
|
3384
|
+
}
|
|
3385
|
+
function claudeInstallHint(skip = AGENT_NAME) {
|
|
3386
|
+
if (skip.startsWith("claude")) return null;
|
|
3387
|
+
if (!existsSync(join(homedir(), ".claude"))) return null;
|
|
3388
|
+
return "Claude Code detected \u2014 to add Paigy there, run /plugin marketplace add paigy-ai/claude then /plugin install paigy (pairing carries over; no need to pair again).";
|
|
3389
|
+
}
|
|
3319
3390
|
|
|
3320
3391
|
export {
|
|
3321
3392
|
NotifyRequestSchema,
|
|
@@ -3349,5 +3420,7 @@ export {
|
|
|
3349
3420
|
fetchRoster,
|
|
3350
3421
|
verifiedRecipients,
|
|
3351
3422
|
sealFields,
|
|
3352
|
-
openSealedAnswer
|
|
3423
|
+
openSealedAnswer,
|
|
3424
|
+
autoConfigureClients,
|
|
3425
|
+
claudeInstallHint
|
|
3353
3426
|
};
|
package/dist/index.js
CHANGED
|
@@ -6,11 +6,13 @@ import {
|
|
|
6
6
|
scheduleCallback,
|
|
7
7
|
setTaskState,
|
|
8
8
|
submitNotification
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7S6W7NEZ.js";
|
|
10
10
|
import {
|
|
11
11
|
NotifyRequestSchema,
|
|
12
12
|
ScheduleCallbackSchema,
|
|
13
13
|
SetTaskStateSchema,
|
|
14
|
+
autoConfigureClients,
|
|
15
|
+
claudeInstallHint,
|
|
14
16
|
clearSurface,
|
|
15
17
|
deleteKeyFile,
|
|
16
18
|
deleteToken,
|
|
@@ -26,7 +28,7 @@ import {
|
|
|
26
28
|
sleep,
|
|
27
29
|
startE2ee,
|
|
28
30
|
writeSurface
|
|
29
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-W2ZS7IBA.js";
|
|
30
32
|
|
|
31
33
|
// src/index.ts
|
|
32
34
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
@@ -151,6 +153,16 @@ function pairedResult(token, sas, note, e2ee) {
|
|
|
151
153
|
base.verify_message = `This pairing is end-to-end encrypted. Ask the user to verify this code matches the one on their phone: ${sas}` + (e2ee ? "" : " (identity key not yet confirmed on the phone).");
|
|
152
154
|
}
|
|
153
155
|
if (note) base.note = note;
|
|
156
|
+
try {
|
|
157
|
+
const registered = autoConfigureClients();
|
|
158
|
+
if (registered.length) {
|
|
159
|
+
base.auto_registered = registered;
|
|
160
|
+
base.auto_register_message = `Also registered the Paigy MCP server in: ${registered.join("; ")}. Tell the user \u2014 those tools pick it up on their next restart/reload.`;
|
|
161
|
+
}
|
|
162
|
+
const hint = claudeInstallHint();
|
|
163
|
+
if (hint) base.claude_hint = hint;
|
|
164
|
+
} catch {
|
|
165
|
+
}
|
|
154
166
|
return { content: [{ type: "text", text: JSON.stringify(base) }] };
|
|
155
167
|
}
|
|
156
168
|
function awaitingConfirmResult(sas, device_code) {
|
package/dist/listen.js
CHANGED
|
@@ -3,11 +3,11 @@ import { createRequire as __createRequire } from 'node:module'; const require =
|
|
|
3
3
|
import {
|
|
4
4
|
checkReplies,
|
|
5
5
|
registerDelivery
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7S6W7NEZ.js";
|
|
7
7
|
import {
|
|
8
8
|
WAKE_EVENT,
|
|
9
9
|
wakeChannel
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-W2ZS7IBA.js";
|
|
11
11
|
|
|
12
12
|
// src/listen.ts
|
|
13
13
|
import { createClient } from "@supabase/supabase-js";
|
package/dist/onboard.js
CHANGED
|
@@ -3,12 +3,14 @@ import { createRequire as __createRequire } from 'node:module'; const require =
|
|
|
3
3
|
import {
|
|
4
4
|
AGENT_NAME,
|
|
5
5
|
TOKEN_PATH,
|
|
6
|
+
autoConfigureClients,
|
|
7
|
+
claudeInstallHint,
|
|
6
8
|
openBrowser,
|
|
7
9
|
pollToken,
|
|
8
10
|
requestCode,
|
|
9
11
|
saveToken,
|
|
10
12
|
sleep
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-W2ZS7IBA.js";
|
|
12
14
|
|
|
13
15
|
// src/onboard.ts
|
|
14
16
|
async function main() {
|
|
@@ -39,6 +41,15 @@ Paired! Token saved to ${TOKEN_PATH} (mode 0600).`);
|
|
|
39
41
|
console.log(` Nickname : ${token.nickname}`);
|
|
40
42
|
console.log(` Agent : ${token.agent}`);
|
|
41
43
|
console.log(` Device : ${token.device ?? "(none)"}
|
|
44
|
+
`);
|
|
45
|
+
const registered = autoConfigureClients();
|
|
46
|
+
if (registered.length) {
|
|
47
|
+
console.log("Also registered the Paigy MCP server in:");
|
|
48
|
+
for (const r of registered) console.log(` - ${r}`);
|
|
49
|
+
console.log("(Restart those tools to pick it up.)\n");
|
|
50
|
+
}
|
|
51
|
+
const hint = claudeInstallHint();
|
|
52
|
+
if (hint) console.log(`${hint}
|
|
42
53
|
`);
|
|
43
54
|
return;
|
|
44
55
|
}
|
package/dist/statusline.js
CHANGED