claude-teammate 0.1.164 → 0.1.166

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-teammate",
3
- "version": "0.1.164",
3
+ "version": "0.1.166",
4
4
  "description": "CLI bootstrapper for Claude Teammate.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -79,11 +79,12 @@ Return one selected repo_url from the list above, or an empty repo_url if the us
79
79
  export function buildNoCodeTaskSystemPrompt() {
80
80
  return [
81
81
  "You are completing a Jira task that does not require code changes.",
82
- "Read the task description and memory snapshot carefully.",
82
+ "Read the task description, memory snapshot, and recent Jira comments carefully — the latest human comment is the authoritative request.",
83
83
  "You may inspect the provided repository using read-only tools if that helps complete the task.",
84
- "Do not modify existing repository files, do not run mutating commands, and do not make code changes.",
84
+ "Do not make source code changes to the repository.",
85
85
  "If the task requires generating a deliverable (e.g. test cases, test design, analysis report), write it as a new file on disk with an appropriate extension (e.g. .json, .md, .csv) and list its absolute path in output_files. Do not write output files for tasks that do not produce a document deliverable.",
86
86
  "If prior artifacts are provided and the latest human request is asking to revise, fix, reformat, or extend the current result, prefer editing the existing artifact files in place instead of regenerating a brand-new deliverable.",
87
+ "If the latest human comment contains [attachment: <filename>] and requests replacing an existing file's content: (1) use jira_download_attachments to download the attachment, (2) identify the downloaded file path from the tool result, (3) use Bash to overwrite the existing file in-place: cp /downloaded/path /existing/path — keep the same filename and path, never rename.",
87
88
  "Read the epic memory snapshot before starting so you can apply known repo-specific knowledge.",
88
89
  "When writing repo-specific epic memory, include a short repo label in the text itself using the shortest unambiguous name or abbreviation you can derive from the repo URL or local path, for example `landing:` or `claude-teammate:`.",
89
90
  "Do not add a repo label for epic-wide product, business, or workflow knowledge that is not tied to one codebase.",
@@ -99,6 +100,12 @@ export function buildNoCodeTaskSystemPrompt() {
99
100
  export function buildNoCodeTaskUserPrompt(input) {
100
101
  const reopenContext = formatReopenContext(input.reopenContext);
101
102
  const priorArtifacts = formatPriorArtifacts(input.priorArtifacts);
103
+ const recentComments = Array.isArray(input.issue.comments) && input.issue.comments.length > 0
104
+ ? input.issue.comments
105
+ .slice(-10)
106
+ .map((c) => `- [${c.id}] ${c.author?.displayName || c.author?.emailAddress || "Unknown"}: ${c.bodyText}`)
107
+ .join("\n")
108
+ : "(none)";
102
109
 
103
110
  return `Complete this Jira task.
104
111
 
@@ -117,6 +124,9 @@ ${input.repoPaths.join("\n")}
117
124
 
118
125
  ${priorArtifacts}
119
126
 
127
+ Recent Jira comments:
128
+ ${recentComments}
129
+
120
130
  ${reopenContext}
121
131
 
122
132
  Complete the task and return result=completed with a summary, or result=failed with an explanation.`;
@@ -352,8 +352,8 @@ async function handleIssueLogStream(req, res, runtimePaths, issueKey) {
352
352
 
353
353
  req.on("close", cleanup);
354
354
 
355
- // Pre-burst: last 2000 lines if file exists
356
- const initial = await readLastLines(issueLogFile, 2000);
355
+ // Pre-burst: last 100 lines if file exists (full log available via download endpoint)
356
+ const initial = await readLastLines(issueLogFile, 100);
357
357
  for (const line of initial) {
358
358
  if (closed) return;
359
359
  sseData(res, line);
package/src/jira.js CHANGED
@@ -254,6 +254,16 @@ export function adfToText(node) {
254
254
  case "inlineCard":
255
255
  case "embedCard":
256
256
  return node.attrs?.url ?? "";
257
+ case "mediaSingle":
258
+ return childrenText ? `${childrenText}\n` : "";
259
+ case "media": {
260
+ const fileName =
261
+ node.attrs?.__fileName ||
262
+ node.attrs?.fileName ||
263
+ node.attrs?.alt ||
264
+ null;
265
+ return fileName ? `[attachment: ${fileName}]` : "[attachment]";
266
+ }
257
267
  case "bulletList":
258
268
  return Array.isArray(node.content)
259
269
  ? node.content.map((item) => `- ${adfToText(item).trim()}`).join("\n")
package/src/repo.js CHANGED
@@ -195,7 +195,10 @@ export async function prepareRepoForDefaultBranch(repoPath) {
195
195
  const defaultBranch = await resolveRemoteDefaultBranch(repoPath);
196
196
  await execGit(repoPath, ["fetch", "origin", defaultBranch, "--prune"]);
197
197
  await execGit(repoPath, ["reset", "--hard"]);
198
- await execGit(repoPath, ["clean", "-fd"]);
198
+ // Exclude directories whose names look like Jira issue keys (e.g. CARD4-713/, AIT-66/).
199
+ // Multiple no-code tasks may share the same repo checkout and one task's output
200
+ // directory may be another task's input — wiping them here breaks cross-task reads.
201
+ await execGit(repoPath, ["clean", "-fd", "-e", "[A-Z]*-[0-9]*"]);
199
202
  await execGit(repoPath, ["checkout", "-B", defaultBranch, `origin/${defaultBranch}`]);
200
203
  return defaultBranch;
201
204
  }