this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(infra): prevent duplicate agents in migrate-data.sh

- Add append_copy_suffix: false to prevent _copy suffix on import
- Delete both original and _copy variants before importing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

alice c2321005 6eb259ea

+4 -5
+4 -5
infra/migrate-data.sh
··· 152 152 apiKey: process.env.LETTA_SERVER_PASSWORD || undefined, 153 153 }); 154 154 155 - // Check if agent already exists 155 + // Delete any existing agents with this name (including _copy variants) 156 156 for await (const agent of client.agents.list()) { 157 - if (agent.name === AGENT_NAME) { 158 - console.log(`Agent '${AGENT_NAME}' already exists (${agent.id}), deleting...`); 157 + if (agent.name === AGENT_NAME || agent.name === `${AGENT_NAME}_copy`) { 158 + console.log(`Deleting existing agent '${agent.name}' (${agent.id})...`); 159 159 await client.agents.delete(agent.id); 160 - break; 161 160 } 162 161 } 163 162 ··· 167 166 // Create a Blob for the file upload 168 167 const file = new Blob([fileData], { type: 'application/json' }); 169 168 170 - const imported = await client.agents.importFile({ file }); 169 + const imported = await client.agents.importFile({ file, append_copy_suffix: false }); 171 170 console.log(`Imported agent IDs: ${imported.agent_ids.join(', ')}`); 172 171 } 173 172