coder-agent 2.8.0 → 2.8.1

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.js CHANGED
@@ -831,9 +831,10 @@ ${JSON.stringify(allMessages.slice(1).map(m => ({ role: m.role, content: m.conte
831
831
 
832
832
  Instructions:
833
833
  1. Review the conversation history and extract any important new project setup details, style preferences, build/test commands, package quirks, or persistent instructions that should be remembered for future sessions.
834
- 2. Integrate these new learnings into the existing memory structure. Keep existing useful learnings/preferences, but clean up duplicates or obsolete info.
835
- 3. Keep the content concise, clean, and formatted in Markdown.
836
- 4. If there are no new learnings, setup details, or instructions in the conversation, output EXACTLY the existing memory content. Do not add conversational text, just output the updated/existing markdown content.`;
834
+ 2. Maintain and update the "## File-to-Data Map" section. If any files were read, modified, created, or discussed, verify if they are listed in the map. If not, add them with their relative path and a brief 1-sentence description of the data, logic, or functions they contain. If they are already listed but their content/purpose changed, update their description.
835
+ 3. Integrate these new learnings and file catalog updates into the existing memory structure. Keep existing useful learnings/preferences, but clean up duplicates or obsolete info.
836
+ 4. Keep the content concise, clean, and formatted in Markdown.
837
+ 5. If there are no new learnings, setup details, file updates, or instructions in the conversation, output EXACTLY the existing memory content. Do not add conversational text, just output the updated/existing markdown content.`;
837
838
  const responseObj = await callGeminiAPIWithRotation(this.apiKey, {
838
839
  model: this.model,
839
840
  messages: [{ role: "user", content: prompt }],
package/dist/memory.js CHANGED
@@ -315,7 +315,7 @@ export async function loadAgentMemoryPrompt(agentType, scope) {
315
315
  }
316
316
  catch {
317
317
  // Create default template
318
- const defaultTemplate = `# Persistent Agent Memory\n\nUse this section to write general rules, project setup details, style preferences, or learnings. Update this file using your write_file/patch_file tools to persist memories.\n\n## Learnings & Guidelines\n- (No memories stored yet. Add your learnings here.)\n`;
318
+ const defaultTemplate = `# Persistent Agent Memory\n\nUse this section to write general rules, project setup details, style preferences, or learnings. Update this file using your write_file/patch_file tools to persist memories.\n\n## Learnings & Guidelines\n- (No memories stored yet. Add your learnings here.)\n\n## File-to-Data Map\n- (List of files and what data/logic they contain. This helps the agent know what file has what data.)\n`;
319
319
  try {
320
320
  await fs.writeFile(memoryFile, defaultTemplate, "utf-8");
321
321
  memoryContent = defaultTemplate;
@@ -333,13 +333,13 @@ export async function loadAgentMemoryPrompt(agentType, scope) {
333
333
  let scopeNote = "";
334
334
  switch (scope) {
335
335
  case "user":
336
- scopeNote = "- Since this memory has 'user' scope, keep learnings general since they apply across all of the user's projects.";
336
+ scopeNote = "- Since this memory has 'user' scope, keep learnings and cataloging general since they apply across all of the user's projects.";
337
337
  break;
338
338
  case "project":
339
- scopeNote = "- Since this memory has 'project' scope and is shared with the team via version control, tailor memories specifically to this project.";
339
+ scopeNote = "- Since this memory has 'project' scope and is shared with the team via version control, tailor memories and file cataloging specifically to this project.";
340
340
  break;
341
341
  case "local":
342
- scopeNote = "- Since this memory has 'local' scope (not checked into version control), tailor memories specifically to this machine and project.";
342
+ scopeNote = "- Since this memory has 'local' scope (not checked into version control), tailor memories and file cataloging specifically to this machine and project.";
343
343
  break;
344
344
  }
345
345
  return `
@@ -349,8 +349,9 @@ This memory is loaded at the start of every session and injected into your syste
349
349
 
350
350
  ### Guidelines for Memory Usage:
351
351
  1. Read the memory contents below to see existing learnings, project instructions, or user preferences.
352
- 2. If you learn something new that would be useful for future sessions (e.g., build commands, package quirks, style guidelines, API details, tool workarounds), update this file directly using your \`write_file\` or \`patch_file\` tools targeting the file path: \`${memoryFile}\`.
353
- 3. Keep the content concise, clean, and organized.
352
+ 2. Refer to the '## File-to-Data Map' section to quickly find which files contain what data, features, logic, or configurations.
353
+ 3. If you learn something new that would be useful for future sessions (e.g., build commands, package quirks, style guidelines, API details, tool workarounds), or if you create/modify files, update this file directly using your \`write_file\` or \`patch_file\` tools targeting the file path: \`${memoryFile}\`.
354
+ 4. Keep the content concise, clean, and organized.
354
355
  ${scopeNote}
355
356
 
356
357
  ### Current Memory Contents:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coder-agent",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "description": "CLI coding agent powered by Google Gemini",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",