claude-teammate 0.1.30 → 0.1.32

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.
Files changed (3) hide show
  1. package/README.md +6 -0
  2. package/package.json +1 -1
  3. package/src/repo.js +30 -1
package/README.md CHANGED
@@ -189,6 +189,12 @@ Contributions are welcome. Open an issue to discuss before submitting large chan
189
189
 
190
190
  <br/>
191
191
 
192
+ ## Disclaimer
193
+
194
+ This software is provided "as is", without warranty of any kind. The authors and contributors are not responsible for any damage, data loss, or unintended consequences arising from the use or misuse of this project. Use at your own risk.
195
+
196
+ <br/>
197
+
192
198
  ## License
193
199
 
194
200
  MIT &copy; 2026 Claude Teammate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-teammate",
3
- "version": "0.1.30",
3
+ "version": "0.1.32",
4
4
  "description": "CLI bootstrapper for Claude Teammate.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/repo.js CHANGED
@@ -55,7 +55,16 @@ export async function validateOrEnsureLocalRepo(repoUrl, reposDir, localPath = "
55
55
  }
56
56
 
57
57
  export async function ensureBranchFromMain(repoPath, branchName) {
58
- await execGit(repoPath, ["fetch", "origin", "main", "--prune"]);
58
+ try {
59
+ await execGit(repoPath, ["fetch", "origin", "main", "--prune"]);
60
+ } catch (error) {
61
+ if (!isMissingRemoteMainError(error)) {
62
+ throw error;
63
+ }
64
+
65
+ await initializeRemoteMainBranch(repoPath);
66
+ }
67
+
59
68
  await execGit(repoPath, ["checkout", "-B", branchName, "origin/main"]);
60
69
  await execGit(repoPath, [
61
70
  "-c",
@@ -202,6 +211,21 @@ async function branchHasChangesAgainstMain(repoPath) {
202
211
  return Number.isFinite(count) && count > 0;
203
212
  }
204
213
 
214
+ async function initializeRemoteMainBranch(repoPath) {
215
+ await execGit(repoPath, ["checkout", "--orphan", "main"]);
216
+ await execGit(repoPath, [
217
+ "-c",
218
+ "user.name=Claude Teammate",
219
+ "-c",
220
+ "user.email=claude-teammate@local",
221
+ "commit",
222
+ "--allow-empty",
223
+ "-m",
224
+ "Initialize main"
225
+ ]);
226
+ await execGit(repoPath, ["push", "-u", "origin", "main"]);
227
+ }
228
+
205
229
  function formatGitExecError(error) {
206
230
  const message = error instanceof Error ? error.message : String(error);
207
231
  const stderr =
@@ -217,6 +241,11 @@ function formatGitExecError(error) {
217
241
  return new Error(`${message}\n${detail}`);
218
242
  }
219
243
 
244
+ function isMissingRemoteMainError(error) {
245
+ const message = error instanceof Error ? error.message : String(error);
246
+ return /couldn't find remote ref main/u.test(message);
247
+ }
248
+
220
249
  function parseGitHubPath(rawPath) {
221
250
  const cleanPath = rawPath.replace(/\.git$/u, "").replace(/\/+$/u, "");
222
251
  const segments = cleanPath.split("/");