@agent-native/core 0.49.6 → 0.49.9
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/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +6 -2
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/types.d.ts +6 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/cli/app-skill.d.ts.map +1 -1
- package/dist/cli/app-skill.js +21 -5
- package/dist/cli/app-skill.js.map +1 -1
- package/dist/cli/connect.d.ts.map +1 -1
- package/dist/cli/connect.js +46 -2
- package/dist/cli/connect.js.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.js +1 -1
- package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
- package/dist/cli/recap.d.ts +6 -11
- package/dist/cli/recap.d.ts.map +1 -1
- package/dist/cli/recap.js +14 -24
- package/dist/cli/recap.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +30 -11
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.js +20 -4
- package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
- package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/DiffBlock.js +33 -9
- package/dist/client/blocks/library/DiffBlock.js.map +1 -1
- package/dist/client/blocks/library/annotation-rail.d.ts +41 -3
- package/dist/client/blocks/library/annotation-rail.d.ts.map +1 -1
- package/dist/client/blocks/library/annotation-rail.js +157 -29
- package/dist/client/blocks/library/annotation-rail.js.map +1 -1
- package/dist/client/blocks/types.d.ts +19 -0
- package/dist/client/blocks/types.d.ts.map +1 -1
- package/dist/client/blocks/types.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +13 -12
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +6 -8
- package/dist/vite/client.js.map +1 -1
- package/docs/content/pr-visual-recap.md +11 -12
- package/package.json +1 -1
package/dist/cli/connect.js
CHANGED
|
@@ -352,6 +352,14 @@ export function supportsRemoteMcpOAuth(client) {
|
|
|
352
352
|
function clientLabelList(clients) {
|
|
353
353
|
return clients.map((client) => CLIENT_LABELS[client]).join(", ");
|
|
354
354
|
}
|
|
355
|
+
function sentenceClientLabelList(clients) {
|
|
356
|
+
const labels = clients.map((client) => CLIENT_LABELS[client]);
|
|
357
|
+
if (labels.length <= 1)
|
|
358
|
+
return labels[0] ?? "";
|
|
359
|
+
if (labels.length === 2)
|
|
360
|
+
return `${labels[0]} and ${labels[1]}`;
|
|
361
|
+
return `${labels.slice(0, -1).join(", ")}, and ${labels[labels.length - 1]}`;
|
|
362
|
+
}
|
|
355
363
|
function clientsNotIn(requestedClients, effectiveClients) {
|
|
356
364
|
const effective = new Set(effectiveClients);
|
|
357
365
|
return requestedClients.filter((client) => !effective.has(client));
|
|
@@ -359,6 +367,36 @@ function clientsNotIn(requestedClients, effectiveClients) {
|
|
|
359
367
|
function withFullCatalogHeader(headers) {
|
|
360
368
|
return { ...(headers ?? {}), [MCP_FULL_CATALOG_HEADER]: "1" };
|
|
361
369
|
}
|
|
370
|
+
function displayMcpServerName(serverName) {
|
|
371
|
+
if (!serverName)
|
|
372
|
+
return "Agent Native MCP";
|
|
373
|
+
if (serverName === "plan")
|
|
374
|
+
return "Plan MCP";
|
|
375
|
+
return `"${serverName}" MCP`;
|
|
376
|
+
}
|
|
377
|
+
async function showReconnectSuccessOutro({ serverName, clients, }) {
|
|
378
|
+
const lines = [`✅ Reconnected ${displayMcpServerName(serverName)}.`];
|
|
379
|
+
if (clients.includes("codex")) {
|
|
380
|
+
lines.push("Codex: start a new Codex session now; the MCP tools should be available there.");
|
|
381
|
+
}
|
|
382
|
+
const oauthClients = clients.filter((client) => supportsRemoteMcpOAuth(client));
|
|
383
|
+
if (oauthClients.length > 0) {
|
|
384
|
+
lines.push(`${sentenceClientLabelList(oauthClients)}: restart, run /mcp, then choose Authenticate/Reconnect.`);
|
|
385
|
+
}
|
|
386
|
+
if (!clients.includes("codex") && oauthClients.length === 0) {
|
|
387
|
+
lines.push(`Restart or reload ${sentenceClientLabelList(clients)} before using the MCP tools.`);
|
|
388
|
+
}
|
|
389
|
+
const message = lines.join("\n");
|
|
390
|
+
try {
|
|
391
|
+
const clack = await import("@clack/prompts");
|
|
392
|
+
clack.outro(message);
|
|
393
|
+
}
|
|
394
|
+
catch {
|
|
395
|
+
logOut("");
|
|
396
|
+
for (const line of lines)
|
|
397
|
+
logOut(` ${line}`);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
362
400
|
/** Derive an app slug from a deployed origin, e.g. mail.agent-native.com → mail. */
|
|
363
401
|
function appSlugFromUrl(url) {
|
|
364
402
|
try {
|
|
@@ -1372,7 +1410,13 @@ async function reconnectOne(parsed, clients, deps) {
|
|
|
1372
1410
|
logOut("");
|
|
1373
1411
|
logOut(` Reconnected existing client configs for ${clientLabelList(effectiveClients)}.`);
|
|
1374
1412
|
logOut(` Did not touch ${clientLabelList(skippedClients)} because no matching MCP entry was found.`);
|
|
1375
|
-
logOut(` To add another client, run: npx @agent-native/core@latest connect ${baseUrl} --client
|
|
1413
|
+
logOut(` To add another client, run: npx @agent-native/core@latest connect ${baseUrl} --client CLIENT --scope ${effectiveParsed.scope}`);
|
|
1414
|
+
}
|
|
1415
|
+
if (res.ok) {
|
|
1416
|
+
await showReconnectSuccessOutro({
|
|
1417
|
+
serverName: res.serverName ?? effectiveParsed.name,
|
|
1418
|
+
clients: effectiveClients,
|
|
1419
|
+
});
|
|
1376
1420
|
}
|
|
1377
1421
|
return res.ok;
|
|
1378
1422
|
}
|
|
@@ -1513,7 +1557,7 @@ async function connectOne(rawUrl, parsed, clients, deps) {
|
|
|
1513
1557
|
logOut(" Next: restart Claude Code, run /mcp, and choose Authenticate.");
|
|
1514
1558
|
}
|
|
1515
1559
|
logOut("");
|
|
1516
|
-
logOut(` Restart or reload ${
|
|
1560
|
+
logOut(` Restart or reload ${sentenceClientLabelList(clients)} to pick up the new MCP server.`);
|
|
1517
1561
|
if (clients.includes("codex")) {
|
|
1518
1562
|
logOut(" Codex sessions load MCP tools at startup; start a new Codex session if the tools are still missing.");
|
|
1519
1563
|
}
|