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:
committed by
pullfrog[bot]
parent
9948c08e7d
commit
57537d1a95
@@ -144838,16 +144838,6 @@ var agent = (input) => {
|
||||
log.info(`\xBB push: ${ctx.payload.push}`);
|
||||
log.info(`\xBB bash: ${ctx.payload.bash}`);
|
||||
log.debug(`\xBB payload: ${JSON.stringify(ctx.payload, null, 2)}`);
|
||||
const logParts = [
|
||||
ctx.instructions.eventInstructions ? `EVENT-LEVEL INSTRUCTIONS:
|
||||
${ctx.instructions.eventInstructions}` : null,
|
||||
ctx.instructions.user ? `USER REQUEST:
|
||||
${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]
|
||||
@@ -144885,7 +144875,7 @@ function writeMcpConfig(ctx) {
|
||||
}
|
||||
};
|
||||
writeFileSync7(configPath, JSON.stringify(mcpConfig, null, 2), "utf-8");
|
||||
log.info(`\xBB MCP config written to ${configPath}`);
|
||||
log.debug(`\xBB MCP config written to ${configPath}`);
|
||||
return configPath;
|
||||
}
|
||||
async function installClaude() {
|
||||
@@ -144906,7 +144896,7 @@ var claude = agent({
|
||||
log.info(`\xBB model: ${model}${effortLevel ? ` (effort: ${effortLevel})` : ""}`);
|
||||
const disallowedTools = buildDisallowedTools(ctx);
|
||||
if (disallowedTools.length > 0) {
|
||||
log.info(`\xBB disallowed tools: ${disallowedTools.join(", ")}`);
|
||||
log.debug(`\xBB disallowed built-ins: ${JSON.stringify(disallowedTools)}`);
|
||||
}
|
||||
const mcpConfigPath = writeMcpConfig(ctx);
|
||||
const args2 = [
|
||||
@@ -145019,7 +145009,7 @@ var messageHandlers = {
|
||||
const toolUseId = content.tool_use_id;
|
||||
const isBashTool = toolUseId && bashToolIds.has(toolUseId);
|
||||
const outputContent = typeof content.content === "string" ? content.content : Array.isArray(content.content) ? content.content.map(
|
||||
(c) => typeof c === "string" ? c : "text" in c ? c.text : JSON.stringify(c)
|
||||
(entry) => typeof entry === "string" ? entry : typeof entry === "object" && entry !== null && "text" in entry ? String(entry.text) : JSON.stringify(entry)
|
||||
).join("\n") : String(content.content);
|
||||
if (isBashTool) {
|
||||
log.startGroup(`bash output`);
|
||||
@@ -145617,6 +145607,7 @@ function configureCursorTools(ctx) {
|
||||
}
|
||||
writeFileSync9(cliConfigPath, JSON.stringify(config3, null, 2), "utf-8");
|
||||
log.info(`\xBB CLI config written to ${cliConfigPath}`);
|
||||
log.debug(`\xBB disallowed built-ins: ${JSON.stringify(deny)}`);
|
||||
log.debug(`\xBB CLI config contents: ${JSON.stringify(config3, null, 2)}`);
|
||||
}
|
||||
|
||||
@@ -145879,7 +145870,7 @@ function configureGeminiSettings(ctx) {
|
||||
writeFileSync10(settingsPath, JSON.stringify(newSettings, null, 2), "utf-8");
|
||||
log.info(`\xBB Gemini settings written to ${settingsPath}`);
|
||||
if (exclude.length > 0) {
|
||||
log.info(`\xBB excluded tools: ${exclude.join(", ")}`);
|
||||
log.debug(`\xBB disallowed built-ins: ${JSON.stringify(exclude)}`);
|
||||
}
|
||||
return model;
|
||||
}
|
||||
@@ -146111,9 +146102,7 @@ function configureOpenCode(ctx) {
|
||||
throw error49;
|
||||
}
|
||||
log.info(`\xBB OpenCode config written to ${configPath}`);
|
||||
log.debug(
|
||||
`\xBB OpenCode permissions: edit=${permission.edit}, bash=${permission.bash}, webfetch=${permission.webfetch}`
|
||||
);
|
||||
log.debug(`\xBB disallowed built-ins: ${JSON.stringify(permission)}`);
|
||||
log.debug(`OpenCode config contents:
|
||||
${configJson}`);
|
||||
}
|
||||
@@ -147063,6 +147052,16 @@ async function main() {
|
||||
repo: runContext.repo,
|
||||
modes: modes2
|
||||
});
|
||||
const logParts = [
|
||||
instructions.eventInstructions ? `EVENT-LEVEL INSTRUCTIONS:
|
||||
${instructions.eventInstructions}` : null,
|
||||
instructions.user ? `USER REQUEST:
|
||||
${instructions.user}` : null,
|
||||
instructions.event
|
||||
].filter(Boolean);
|
||||
log.box(logParts.join("\n\n---\n\n"), {
|
||||
title: "Instructions"
|
||||
});
|
||||
activityTimeout = createProcessOutputActivityTimeout({
|
||||
timeoutMs: DEFAULT_ACTIVITY_TIMEOUT_MS,
|
||||
checkIntervalMs: DEFAULT_ACTIVITY_CHECK_INTERVAL_MS
|
||||
|
||||
Reference in New Issue
Block a user