claude-teammate 0.1.263 → 0.1.265

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.263",
3
+ "version": "0.1.265",
4
4
  "description": "CLI bootstrapper for Claude Teammate.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/claude.js CHANGED
@@ -821,37 +821,26 @@ export async function runClaudeRepoExtraction(input) {
821
821
  );
822
822
  }
823
823
 
824
- const BRANCH_SLUG_SCHEMA = {
825
- type: "object",
826
- properties: {
827
- slug: { type: "string" }
828
- },
829
- required: ["slug"],
830
- additionalProperties: false
831
- };
832
-
833
- export async function runClaudeBranchSlug(title) {
824
+ export async function runClaudeBranchSlug(title, cwd) {
825
+ const prompt =
826
+ `Generate a short English branch name slug (3-5 lowercase words joined by hyphens) that summarizes this issue title. ` +
827
+ `Output ONLY the slug, nothing else. No punctuation. No explanation. ` +
828
+ `Examples: add-user-auth, fix-login-redirect, manage-maker-requests. ` +
829
+ `Issue title: ${title}`;
834
830
  try {
835
- const result = await invokeClaudeTask(
836
- BRANCH_SLUG_SCHEMA,
837
- "Generate a short English branch name slug: 3-5 lowercase words joined by hyphens that summarize the issue title. Output only the slug field. Example outputs: 'add-user-auth', 'fix-login-redirect', 'manage-maker-account-requests'.",
838
- `Issue title: ${title}`,
839
- {
840
- model: "haiku",
841
- permissionMode: "bypassPermissions",
842
- effort: "low",
843
- runOpts: {
844
- timeout: 15_000,
845
- phase: "branch-slug"
846
- }
847
- }
831
+ const { stdout } = await runClaudeCommand(
832
+ "claude",
833
+ ["--print", "--model", "haiku", "--permission-mode", "bypassPermissions", "--output-format", "text", prompt],
834
+ { cwd, timeout: 30_000 }
848
835
  );
849
- return String(result?.slug || "")
836
+ return String(stdout || "")
837
+ .trim()
850
838
  .toLowerCase()
851
839
  .replace(/[^a-z0-9-]/gu, "")
852
840
  .replace(/^-+|-+$/gu, "")
853
841
  .slice(0, 40);
854
- } catch {
842
+ } catch (error) {
843
+ console.error("[branch-slug] Claude CLI failed:", error?.message || error);
855
844
  return "";
856
845
  }
857
846
  }
@@ -207,7 +207,7 @@ export async function processGitHubIssue({
207
207
  const approvalComment = isApprovalComment(latestComment.body);
208
208
 
209
209
  if (approvalComment) {
210
- const englishSlug = githubIssueMemory.branch_name ? "" : await runClaudeBranchSlug(detail.title);
210
+ const englishSlug = githubIssueMemory.branch_name ? "" : await runClaudeBranchSlug(detail.title, projectRoot);
211
211
  const nextBranchName =
212
212
  githubIssueMemory.branch_name || buildImplementationBranchName(detail.title, detail.number, englishSlug);
213
213
  const existingPr = await github.findPullRequestByHead(githubIssueMemory.repo_url, nextBranchName);