flashbacker
Version:
Claude Code state management with session continuity and AI personas
40 lines • 1.38 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.runSessionAnalysisAgent = runSessionAnalysisAgent;
const flashback_agent_1 = require("./base/flashback-agent");
const mcp_loader_1 = require("./mcp-loader");
const index_1 = require("./tools/logs/index");
const sessionAnalysisToolConfig = {
filesystem: true,
git: true,
shell: {
enabled: true,
allowedCommands: ['ls', 'cat', 'grep', 'wc', 'find', 'head', 'tail', 'pwd'],
blockedCommands: ['rm', 'sudo', 'chmod', 'chown', 'mv', 'cp', 'dd', 'mkfs'],
},
};
async function runSessionAnalysisAgent(projectDir) {
const agent = new flashback_agent_1.FlashbackAgent();
const { tools, cleanup } = await (0, mcp_loader_1.loadMCPTools)(projectDir, sessionAnalysisToolConfig);
try {
const result = await agent.executeWithTemplate({
projectDir,
agentName: 'session-analysis',
stepLimit: 5,
tokenBudget: 200000,
tools: {
...tools,
...index_1.conversationLogsTools,
},
templatePath: pathWithinAgents('session-analysis-agent.md'),
});
return result;
}
finally {
await cleanup();
}
}
function pathWithinAgents(name) {
return `agents/${name}`;
}
//# sourceMappingURL=session-analysis-agent.js.map
;