@love-moon/conductor-sdk 0.7.0 → 0.7.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @love-moon/conductor-sdk
2
2
 
3
+ ## 0.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 80c5255: Canonicalize every GitHub SSH host alias (`github.com`, `github-*`,
8
+ `github.com-*`) to `github.com` when normalizing git remote URLs. GitHub
9
+ identifies a repository solely by its `owner/repo` path, so the same repo cloned
10
+ through different SSH aliases (e.g. `github-dang217` vs `github-duinodu`) now
11
+ merges across daemons by owner/repo instead of being blocked by a hardcoded
12
+ per-alias allowlist. Non-GitHub hosts (gitlab.com, self-hosted, GitHub
13
+ Enterprise) are left untouched so unrelated repos never merge.
14
+
15
+ ## 0.7.1
16
+
17
+ ### Patch Changes
18
+
19
+ - 3f35925: Canonicalize the `github-duinodu` SSH host alias when normalizing Git remotes.
20
+
3
21
  ## 0.7.0
4
22
 
5
23
  ### Minor Changes
@@ -178,7 +178,7 @@ export function normalizeGitRemoteUrl(raw) {
178
178
  // `pathname` preserves the leading slash so `${host}${pathname}` reads
179
179
  // naturally; we drop trailing `/` and trailing `.git` afterwards.
180
180
  const path = parsed.pathname.replace(/\/+$/, '');
181
- const combined = `${parsed.host}${path}`.replace(/\.git$/i, '');
181
+ const combined = `${canonicalGitRemoteHost(parsed.host)}${path}`.replace(/\.git$/i, '');
182
182
  return combined.toLowerCase() || null;
183
183
  }
184
184
  // scp form: `[user@]host:path`. The host segment must not contain `/`
@@ -187,7 +187,7 @@ export function normalizeGitRemoteUrl(raw) {
187
187
  // remote URL anyway).
188
188
  const scpMatch = trimmed.match(/^(?:[^@/:]+@)?([^/:]+):(?!\/)(.*)$/);
189
189
  if (scpMatch) {
190
- const host = scpMatch[1];
190
+ const host = canonicalGitRemoteHost(scpMatch[1]);
191
191
  const path = scpMatch[2].replace(/\/+$/, '').replace(/\.git$/i, '');
192
192
  return `${host}/${path}`.toLowerCase() || null;
193
193
  }
@@ -196,6 +196,20 @@ export function normalizeGitRemoteUrl(raw) {
196
196
  // real upstream URL.
197
197
  return null;
198
198
  }
199
+ function canonicalGitRemoteHost(host) {
200
+ const normalized = host.trim().toLowerCase();
201
+ // Any GitHub SSH config alias points at github.com. Users create these in
202
+ // `~/.ssh/config` to juggle multiple accounts/keys (e.g. `github-duinodu`,
203
+ // `github-dang217`, `github.com-work`). GitHub identifies a repository solely
204
+ // by its `owner/repo` path, so we collapse every alias to `github.com` and
205
+ // let the path decide equality — instead of maintaining a per-alias allowlist.
206
+ if (normalized === 'github.com' ||
207
+ normalized.startsWith('github-') ||
208
+ normalized.startsWith('github.com-')) {
209
+ return 'github.com';
210
+ }
211
+ return normalized;
212
+ }
199
213
  function* walkFiles(root) {
200
214
  const entries = fs.readdirSync(root, { withFileTypes: true });
201
215
  for (const entry of entries) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@love-moon/conductor-sdk",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lovemoon-ai/conductor.git"
@@ -33,5 +33,5 @@
33
33
  "typescript": "^5.6.3",
34
34
  "vitest": "^2.1.4"
35
35
  },
36
- "gitCommitId": "ed4e3ab"
36
+ "gitCommitId": "04c865c"
37
37
  }