move instructions logging earlier and clarify built-in tool logs

Log the instructions box immediately after instruction resolution in main, and standardize agent permission summaries to debug-level "disallowed built-ins" output to reduce confusion with pullfrog MCP tools.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Colin McDonnell
2026-02-18 19:01:08 +00:00
committed by pullfrog[bot]
parent 9948c08e7d
commit 57537d1a95
7 changed files with 38 additions and 37 deletions
+8 -4
View File
@@ -63,7 +63,7 @@ function writeMcpConfig(ctx: AgentRunContext): string {
};
writeFileSync(configPath, JSON.stringify(mcpConfig, null, 2), "utf-8");
log.info(`» MCP config written to ${configPath}`);
log.debug(`» MCP config written to ${configPath}`);
return configPath;
}
@@ -91,7 +91,7 @@ export const claude = agent({
// build disallowedTools based on tool permissions
const disallowedTools = buildDisallowedTools(ctx);
if (disallowedTools.length > 0) {
log.info(`» disallowed tools: ${disallowedTools.join(", ")}`);
log.debug(`» disallowed built-ins: ${JSON.stringify(disallowedTools)}`);
}
// write MCP config file
@@ -253,8 +253,12 @@ const messageHandlers: SDKMessageHandlers = {
? content.content
: Array.isArray(content.content)
? content.content
.map((c) =>
typeof c === "string" ? c : "text" in c ? c.text : JSON.stringify(c)
.map((entry: unknown) =>
typeof entry === "string"
? entry
: typeof entry === "object" && entry !== null && "text" in entry
? String(entry.text)
: JSON.stringify(entry)
)
.join("\n")
: String(content.content);
+1
View File
@@ -440,5 +440,6 @@ function configureCursorTools(ctx: AgentRunContext): void {
writeFileSync(cliConfigPath, JSON.stringify(config, null, 2), "utf-8");
log.info(`» CLI config written to ${cliConfigPath}`);
log.debug(`» disallowed built-ins: ${JSON.stringify(deny)}`);
log.debug(`» CLI config contents: ${JSON.stringify(config, null, 2)}`);
}
+1 -1
View File
@@ -413,7 +413,7 @@ function configureGeminiSettings(ctx: AgentRunContext): string {
writeFileSync(settingsPath, JSON.stringify(newSettings, null, 2), "utf-8");
log.info(`» Gemini settings written to ${settingsPath}`);
if (exclude.length > 0) {
log.info(`» excluded tools: ${exclude.join(", ")}`);
log.debug(`» disallowed built-ins: ${JSON.stringify(exclude)}`);
}
return model;
+1 -3
View File
@@ -324,9 +324,7 @@ function configureOpenCode(ctx: AgentRunContext): void {
}
log.info(`» OpenCode config written to ${configPath}`);
log.debug(
`» OpenCode permissions: edit=${permission.edit}, bash=${permission.bash}, webfetch=${permission.webfetch}`
);
log.debug(`» disallowed built-ins: ${JSON.stringify(permission)}`);
log.debug(`OpenCode config contents:\n${configJson}`);
}
-12
View File
@@ -37,18 +37,6 @@ export const agent = <const input extends AgentInput>(input: input): defineAgent
log.info(`» bash: ${ctx.payload.bash}`);
log.debug(`» payload: ${JSON.stringify(ctx.payload, null, 2)}`);
// build log box content: eventInstructions (if any) + user request (if any) + event data
const logParts = [
ctx.instructions.eventInstructions
? `EVENT-LEVEL INSTRUCTIONS:\n${ctx.instructions.eventInstructions}`
: null,
ctx.instructions.user ? `USER REQUEST:\n${ctx.instructions.user}` : null,
ctx.instructions.event,
].filter(Boolean);
log.box(logParts.join("\n\n---\n\n"), {
title: "Instructions",
});
return input.run(ctx);
},
...agentsManifest[input.name],