@sideboard-ai/core 0.1.19 → 0.1.22

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.
@@ -11,7 +11,7 @@ import {
11
11
  listBrightsyChatTargets,
12
12
  opencodeAdapter,
13
13
  permissionMode
14
- } from "./chunk-JQJZTL2Q.js";
14
+ } from "./chunk-V54GKKCI.js";
15
15
  import "./chunk-ILQK4P5R.js";
16
16
  import {
17
17
  cursorSdkMessageToEvents,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveGithubRepoSlug
3
- } from "./chunk-LXHSRNJJ.js";
3
+ } from "./chunk-UFWEANLU.js";
4
4
  import {
5
5
  globalAgentCwd,
6
6
  sideboardReposDir
@@ -31,7 +31,7 @@ function coordinatorGreenfieldPlaybook(reposDir) {
31
31
  "- Examples:",
32
32
  ` - Clone: \`git clone <url> ${reposDir}/<name>\``,
33
33
  ` - New GitHub repo: \`gh repo create <owner>/<name> --private --clone -- ${reposDir}/<name>\` (or mkdir + git init + gh repo create + remote add + push)`,
34
- "- Then: add_workspace with that absolute path \u2192 create_thread (repoPath + parentThreadId) \u2192 send_to_thread (build) \u2192 wait_for_turn \u2192 send_to_thread (`gh pr create --draft -R <origin-owner/name>`) or create_draft_pr.",
34
+ "- Then: add_workspace with that absolute path \u2192 create_thread (repoPath + parentThreadId) \u2192 send_to_thread (build) \u2192 wait_for_turn \u2192 send_to_thread (`gh pr create --draft -R <origin-owner/name>`).",
35
35
  "- Always target the child worktree's **origin** (`github:` slug from list_workspaces / `git remote get-url origin` in that worktree). Never open PRs against `upstream`.",
36
36
  "- Do coding work in the child worktree thread, not by editing files in this home cwd."
37
37
  ].join("\n");
@@ -56,10 +56,8 @@ var COORDINATOR_TOOL_PLAYBOOK = [
56
56
  "- list_run_scripts / run_dev_script / stop_dev_script \u2014 start/stop named run scripts",
57
57
  "Inspect / PRs:",
58
58
  "- get_diff \u2014 compact diff summary",
59
- "- preview_land \u2014 preview push+PR (does not push)",
60
- "- Prefer asking the worktree agent via send_to_thread to open a draft PR with `gh pr create --draft -R <origin-owner/name>` (use the workspace `github:` slug / that worktree's origin \u2014 never upstream) so it owns title/body from the diff.",
61
- "- create_draft_pr \u2014 fallback: commit (if dirty), push to origin, open/update a DRAFT PR from the orchestrator (always against origin)",
62
- "Human-only (do not attempt): ready-for-review confirm_land, purge_thread.",
59
+ "- Ask the worktree agent via send_to_thread to open a draft PR with `gh pr create --draft -R <origin-owner/name>` (workspace `github:` slug / that worktree's origin \u2014 never upstream). Do not open PRs from the orchestrator yourself.",
60
+ "Human-only (do not attempt): merge, ready-for-review land, purge_thread.",
63
61
  "Thread links in replies: when mentioning a chat/thread for the user, include a markdown link `[Title](sideboard://thread/<id>)` using the full id (or the link field from create_thread / list_threads). Sideboard renders these as clickable opens.",
64
62
  "Bash / Read / etc: allowed for (1) inspecting target worktrees / registered repo paths from MCP, and (2) greenfield setup under ~/sideboard/repos (git clone, gh repo create, git init+remote). Never git init/clone *inside* this synthetic home cwd \u2014 emptiness here is expected, not a bug."
65
63
  ].join("\n");
@@ -98,8 +96,8 @@ function ensureGlobalCoordinatorCwd() {
98
96
  "",
99
97
  "When creating threads, pass `repoPath` from `list_workspaces` (or the path you just registered) and `parentThreadId` for children.",
100
98
  "Typical flow (existing): list_workspaces \u2192 list_branches|list_prs|list_issues \u2192 create_thread \u2192 send_to_thread \u2192 wait_for_turn.",
101
- "Typical flow (new app): Bash create/clone under repos dir \u2192 add_workspace \u2192 create_thread \u2192 send_to_thread (implement) \u2192 wait_for_turn \u2192 draft PR.",
102
- "Prefer asking worktree agents to open draft PRs; use create_draft_pr as fallback."
99
+ "Typical flow (new app): Bash create/clone under repos dir \u2192 add_workspace \u2192 create_thread \u2192 send_to_thread (implement) \u2192 wait_for_turn \u2192 draft PR via worktree agent.",
100
+ "Always ask worktree agents to open draft PRs (`send_to_thread` + `gh pr create --draft -R <origin>`); never open PRs from the orchestrator."
103
101
  ].join("\n");
104
102
  writeFileSync(join(dir, "CLAUDE.md"), `${body}
105
103
  `, "utf8");
@@ -124,8 +122,8 @@ function coordinatorSystemPrompt(opts) {
124
122
  COORDINATOR_TOOL_PLAYBOOK,
125
123
  coordinatorGreenfieldPlaybook(reposDir),
126
124
  "When creating threads, pass the correct repoPath for the target workspace and parentThreadId for children.",
127
- "Typical flow (existing): list_workspaces \u2192 list_branches|list_prs|list_issues \u2192 create_thread \u2192 send_to_thread (implement) \u2192 wait_for_turn \u2192 send_to_thread (ask for `gh pr create --draft -R <origin-owner/name>` using the workspace github slug) \u2192 wait_for_turn. Use create_draft_pr only if the child cannot open the PR. Never target upstream.",
128
- "Typical flow (new app): Bash under repos dir (clone or gh repo create) \u2192 add_workspace \u2192 create_thread \u2192 send_to_thread \u2192 wait_for_turn \u2192 draft PR.",
125
+ "Typical flow (existing): list_workspaces \u2192 list_branches|list_prs|list_issues \u2192 create_thread \u2192 send_to_thread (implement) \u2192 wait_for_turn \u2192 send_to_thread (ask for `gh pr create --draft -R <origin-owner/name>` using the workspace github slug) \u2192 wait_for_turn. Never target upstream. Never open PRs from the orchestrator.",
126
+ "Typical flow (new app): Bash under repos dir (clone or gh repo create) \u2192 add_workspace \u2192 create_thread \u2192 send_to_thread \u2192 wait_for_turn \u2192 draft PR via worktree agent.",
129
127
  `Goal: ${opts.goal}`,
130
128
  `Parent thread id (pass as parentThreadId when creating children): ${opts.parentId}`,
131
129
  "Registered workspaces:",
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  isGlobalRepoPath
3
- } from "./chunk-5263JXQY.js";
3
+ } from "./chunk-Y2EWQ4TL.js";
4
4
  import {
5
5
  ensureGhPreferOrigin,
6
6
  resolveRepoRoot
7
- } from "./chunk-LXHSRNJJ.js";
7
+ } from "./chunk-UFWEANLU.js";
8
8
  import {
9
9
  appDataDir
10
10
  } from "./chunk-M37RITA6.js";
@@ -13,8 +13,357 @@ import {
13
13
  import { existsSync, readdirSync } from "fs";
14
14
  import { join } from "path";
15
15
 
16
+ // src/git/team-meta.ts
17
+ var SOCCER_TEAM_META = {
18
+ "aalborg": { location: "Aalborg, Denmark", league: "Danish Superliga" },
19
+ "aalesund": { location: "\xC5lesund, Norway", league: "Norwegian First Division" },
20
+ "aarhus": { location: "Aarhus, Denmark", league: "Danish Superliga" },
21
+ "aberdeen": { location: "Aberdeen, Scotland", league: "Scottish Premiership" },
22
+ "ac-milan": { location: "Milan, Italy", league: "Serie A" },
23
+ "ado-den-haag": { location: "The Hague, Netherlands", league: "Eerste Divisie" },
24
+ "aik": { location: "Stockholm, Sweden", league: "Allsvenskan" },
25
+ "ajaccio": { location: "Ajaccio, France", league: "Ligue 2" },
26
+ "ajax": { location: "Amsterdam, Netherlands", league: "Eredivisie" },
27
+ "al-ahly": { location: "Cairo, Egypt", league: "Egyptian Premier League" },
28
+ "al-hilal": { location: "Riyadh, Saudi Arabia", league: "Saudi Pro League" },
29
+ "alajuelense": { location: "Alajuela, Costa Rica", league: "Liga FPD" },
30
+ "almere-city": { location: "Almere, Netherlands", league: "Eredivisie" },
31
+ "amiens": { location: "Amiens, France", league: "Ligue 2" },
32
+ "angers": { location: "Angers, France", league: "Ligue 1" },
33
+ "anyang": { location: "Anyang, South Korea", league: "K League 1" },
34
+ "argentinos-juniors": { location: "Buenos Aires, Argentina", league: "Argentine Primera Divisi\xF3n" },
35
+ "arsenal": { location: "London, England", league: "Premier League" },
36
+ "aston-villa": { location: "Birmingham, England", league: "Premier League" },
37
+ "athletico-paranaense": { location: "Curitiba, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
38
+ "atlanta-united": { location: "Atlanta, USA", league: "MLS" },
39
+ "atlas": { location: "Guadalajara, Mexico", league: "Liga MX" },
40
+ "atletico-madrid": { location: "Madrid, Spain", league: "La Liga" },
41
+ "atletico-mineiro": { location: "Belo Horizonte, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
42
+ "atletico-san-luis": { location: "San Luis Potos\xED, Mexico", league: "Liga MX" },
43
+ "augsburg": { location: "Augsburg, Germany", league: "Bundesliga" },
44
+ "austin-fc": { location: "Austin, USA", league: "MLS" },
45
+ "auxerre": { location: "Auxerre, France", league: "Ligue 1" },
46
+ "avispa-fukuoka": { location: "Fukuoka, Japan", league: "J1 League" },
47
+ "az": { location: "Alkmaar, Netherlands", league: "Eredivisie" },
48
+ "bahia": { location: "Salvador, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
49
+ "banfield": { location: "Banfield, Argentina", league: "Argentine Primera Divisi\xF3n" },
50
+ "barcelona": { location: "Barcelona, Spain", league: "La Liga" },
51
+ "bayer-leverkusen": { location: "Leverkusen, Germany", league: "Bundesliga" },
52
+ "bayern-munich": { location: "Munich, Germany", league: "Bundesliga" },
53
+ "belgrano": { location: "C\xF3rdoba, Argentina", league: "Argentine Primera Divisi\xF3n" },
54
+ "benfica": { location: "Lisbon, Portugal", league: "Primeira Liga" },
55
+ "birmingham-legion": { location: "Birmingham, USA", league: "USL Championship" },
56
+ "boca-juniors": { location: "Buenos Aires, Argentina", league: "Argentine Primera Divisi\xF3n" },
57
+ "bodo-glimt": { location: "Bod\xF8, Norway", league: "Eliteserien" },
58
+ "bordeaux": { location: "Bordeaux, France", league: "Championnat National" },
59
+ "borussia-dortmund": { location: "Dortmund, Germany", league: "Bundesliga" },
60
+ "botafogo": { location: "Rio de Janeiro, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
61
+ "bragantino": { location: "Bragan\xE7a Paulista, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
62
+ "brann": { location: "Bergen, Norway", league: "Eliteserien" },
63
+ "brest": { location: "Brest, France", league: "Ligue 1" },
64
+ "brommapojkarna": { location: "Stockholm, Sweden", league: "Allsvenskan" },
65
+ "brondby": { location: "Br\xF8ndby, Denmark", league: "Danish Superliga" },
66
+ "brooklyn-fc": { location: "Brooklyn, USA", league: "USL Championship" },
67
+ "bucheon": { location: "Bucheon, South Korea", league: "K League 2" },
68
+ "caen": { location: "Caen, France", league: "Ligue 2" },
69
+ "cambuur": { location: "Leeuwarden, Netherlands", league: "Eerste Divisie" },
70
+ "carmelita": { location: "Alajuela, Costa Rica", league: "Liga de Ascenso" },
71
+ "cartagines": { location: "Cartago, Costa Rica", league: "Liga FPD" },
72
+ "ceara": { location: "Fortaleza, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
73
+ "celtic": { location: "Glasgow, Scotland", league: "Scottish Premiership" },
74
+ "central-cordoba": { location: "Santiago del Estero, Argentina", league: "Argentine Primera Divisi\xF3n" },
75
+ "cerezo-osaka": { location: "Osaka, Japan", league: "J1 League" },
76
+ "cf-montreal": { location: "Montreal, Canada", league: "MLS" },
77
+ "charleston-battery": { location: "Charleston, USA", league: "USL Championship" },
78
+ "charlotte-fc": { location: "Charlotte, USA", league: "MLS" },
79
+ "chelsea": { location: "London, England", league: "Premier League" },
80
+ "chicago-fire": { location: "Chicago, USA", league: "MLS" },
81
+ "chivas": { location: "Guadalajara, Mexico", league: "Liga MX" },
82
+ "clermont": { location: "Clermont-Ferrand, France", league: "Ligue 2" },
83
+ "club-america": { location: "Mexico City, Mexico", league: "Liga MX" },
84
+ "cologne": { location: "Cologne, Germany", league: "Bundesliga" },
85
+ "colorado-rapids": { location: "Commerce City, USA", league: "MLS" },
86
+ "columbus-crew": { location: "Columbus, USA", league: "MLS" },
87
+ "corinthians": { location: "S\xE3o Paulo, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
88
+ "cruz-azul": { location: "Mexico City, Mexico", league: "Liga MX" },
89
+ "cruzeiro": { location: "Belo Horizonte, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
90
+ "daejeon": { location: "Daejeon, South Korea", league: "K League 1" },
91
+ "dc-united": { location: "Washington, D.C., USA", league: "MLS" },
92
+ "defensa-y-justicia": { location: "Florencio Varela, Argentina", league: "Argentine Primera Divisi\xF3n" },
93
+ "degerfors": { location: "Degerfors, Sweden", league: "Allsvenskan" },
94
+ "detroit-city": { location: "Detroit, USA", league: "USL Championship" },
95
+ "dijon": { location: "Dijon, France", league: "Championnat National" },
96
+ "djurgarden": { location: "Stockholm, Sweden", league: "Allsvenskan" },
97
+ "dundee": { location: "Dundee, Scotland", league: "Scottish Premiership" },
98
+ "dundee-united": { location: "Dundee, Scotland", league: "Scottish Premiership" },
99
+ "dynamo-kyiv": { location: "Kyiv, Ukraine", league: "Ukrainian Premier League" },
100
+ "eintracht-frankfurt": { location: "Frankfurt, Germany", league: "Bundesliga" },
101
+ "el-paso-locomotive": { location: "El Paso, USA", league: "USL Championship" },
102
+ "elfsborg": { location: "Bor\xE5s, Sweden", league: "Allsvenskan" },
103
+ "emmen": { location: "Emmen, Netherlands", league: "Eerste Divisie" },
104
+ "esbjerg": { location: "Esbjerg, Denmark", league: "Danish 1st Division" },
105
+ "estudiantes": { location: "La Plata, Argentina", league: "Argentine Primera Divisi\xF3n" },
106
+ "everton": { location: "Liverpool, England", league: "Premier League" },
107
+ "excelsior": { location: "Rotterdam, Netherlands", league: "Eerste Divisie" },
108
+ "fagiano-okayama": { location: "Okayama, Japan", league: "J1 League" },
109
+ "falkirk": { location: "Falkirk, Scotland", league: "Scottish Championship" },
110
+ "fc-cincinnati": { location: "Cincinnati, USA", league: "MLS" },
111
+ "fc-copenhagen": { location: "Copenhagen, Denmark", league: "Danish Superliga" },
112
+ "fc-dallas": { location: "Frisco, USA", league: "MLS" },
113
+ "fc-seoul": { location: "Seoul, South Korea", league: "K League 1" },
114
+ "fc-tokyo": { location: "Tokyo, Japan", league: "J1 League" },
115
+ "fc-tulsa": { location: "Tulsa, USA", league: "USL Championship" },
116
+ "feyenoord": { location: "Rotterdam, Netherlands", league: "Eredivisie" },
117
+ "flamengo": { location: "Rio de Janeiro, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
118
+ "fluminense": { location: "Rio de Janeiro, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
119
+ "fortaleza": { location: "Fortaleza, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
120
+ "fortuna-sittard": { location: "Sittard, Netherlands", league: "Eredivisie" },
121
+ "fredrikstad": { location: "Fredrikstad, Norway", league: "Eliteserien" },
122
+ "freiburg": { location: "Freiburg, Germany", league: "Bundesliga" },
123
+ "gais": { location: "Gothenburg, Sweden", league: "Allsvenskan" },
124
+ "galatasaray": { location: "Istanbul, Turkey", league: "S\xFCper Lig" },
125
+ "gamba-osaka": { location: "Osaka, Japan", league: "J1 League" },
126
+ "gangwon": { location: "Gangneung, South Korea", league: "K League 1" },
127
+ "gimcheon-sangmu": { location: "Gimcheon, South Korea", league: "K League 1" },
128
+ "gimnasia": { location: "La Plata, Argentina", league: "Argentine Primera Divisi\xF3n" },
129
+ "gladbach": { location: "M\xF6nchengladbach, Germany", league: "Bundesliga" },
130
+ "go-ahead-eagles": { location: "Deventer, Netherlands", league: "Eredivisie" },
131
+ "godoy-cruz": { location: "Mendoza, Argentina", league: "Argentine Primera Divisi\xF3n" },
132
+ "gremio": { location: "Porto Alegre, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
133
+ "groningen": { location: "Groningen, Netherlands", league: "Eredivisie" },
134
+ "guadalupe": { location: "Goicoechea, Costa Rica", league: "Liga de Ascenso" },
135
+ "guanacasteca": { location: "Nicoya, Costa Rica", league: "Liga FPD" },
136
+ "guingamp": { location: "Guingamp, France", league: "Ligue 2" },
137
+ "gwangju": { location: "Gwangju, South Korea", league: "K League 1" },
138
+ "hacken": { location: "Gothenburg, Sweden", league: "Allsvenskan" },
139
+ "halmstad": { location: "Halmstad, Sweden", league: "Allsvenskan" },
140
+ "hamburg": { location: "Hamburg, Germany", league: "2. Bundesliga" },
141
+ "hammarby": { location: "Stockholm, Sweden", league: "Allsvenskan" },
142
+ "hartford-athletic": { location: "Hartford, USA", league: "USL Championship" },
143
+ "haugesund": { location: "Haugesund, Norway", league: "Eliteserien" },
144
+ "hearts": { location: "Edinburgh, Scotland", league: "Scottish Premiership" },
145
+ "heerenveen": { location: "Heerenveen, Netherlands", league: "Eredivisie" },
146
+ "heidenheim": { location: "Heidenheim, Germany", league: "Bundesliga" },
147
+ "helsingborg": { location: "Helsingborg, Sweden", league: "Superettan" },
148
+ "heracles": { location: "Almelo, Netherlands", league: "Eredivisie" },
149
+ "herediano": { location: "Heredia, Costa Rica", league: "Liga FPD" },
150
+ "hibernian": { location: "Edinburgh, Scotland", league: "Scottish Premiership" },
151
+ "hoffenheim": { location: "Sinsheim, Germany", league: "Bundesliga" },
152
+ "horsens": { location: "Horsens, Denmark", league: "Danish 1st Division" },
153
+ "houston-dynamo": { location: "Houston, USA", league: "MLS" },
154
+ "huracan": { location: "Buenos Aires, Argentina", league: "Argentine Primera Divisi\xF3n" },
155
+ "ifk-goteborg": { location: "Gothenburg, Sweden", league: "Allsvenskan" },
156
+ "norrkoping": { location: "Norrk\xF6ping, Sweden", league: "Allsvenskan" },
157
+ "incheon-united": { location: "Incheon, South Korea", league: "K League 1" },
158
+ "independiente": { location: "Avellaneda, Argentina", league: "Argentine Primera Divisi\xF3n" },
159
+ "indy-eleven": { location: "Indianapolis, USA", league: "USL Championship" },
160
+ "instituto": { location: "C\xF3rdoba, Argentina", league: "Argentine Primera Divisi\xF3n" },
161
+ "inter-miami": { location: "Fort Lauderdale, USA", league: "MLS" },
162
+ "inter-milan": { location: "Milan, Italy", league: "Serie A" },
163
+ "internacional": { location: "Porto Alegre, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
164
+ "jef-united": { location: "Chiba, Japan", league: "J2 League" },
165
+ "jeju-sk": { location: "Jeju, South Korea", league: "K League 1" },
166
+ "jeonbuk": { location: "Jeonju, South Korea", league: "K League 1" },
167
+ "juarez": { location: "Ciudad Ju\xE1rez, Mexico", league: "Liga MX" },
168
+ "juventude": { location: "Caxias do Sul, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
169
+ "juventus": { location: "Turin, Italy", league: "Serie A" },
170
+ "kalmar": { location: "Kalmar, Sweden", league: "Superettan" },
171
+ "kashima-antlers": { location: "Kashima, Japan", league: "J1 League" },
172
+ "kashiwa-reysol": { location: "Kashiwa, Japan", league: "J1 League" },
173
+ "kawasaki-frontale": { location: "Kawasaki, Japan", league: "J1 League" },
174
+ "kfum-oslo": { location: "Oslo, Norway", league: "Eliteserien" },
175
+ "kilmarnock": { location: "Kilmarnock, Scotland", league: "Scottish Premiership" },
176
+ "kristiansund": { location: "Kristiansund, Norway", league: "Eliteserien" },
177
+ "kyoto-sanga": { location: "Kyoto, Japan", league: "J1 League" },
178
+ "la-galaxy": { location: "Carson, USA", league: "MLS" },
179
+ "lafc": { location: "Los Angeles, USA", league: "MLS" },
180
+ "lanus": { location: "Lan\xFAs, Argentina", league: "Argentine Primera Divisi\xF3n" },
181
+ "las-vegas-lights": { location: "Las Vegas, USA", league: "USL Championship" },
182
+ "lazio": { location: "Rome, Italy", league: "Serie A" },
183
+ "le-havre": { location: "Le Havre, France", league: "Ligue 1" },
184
+ "le-mans": { location: "Le Mans, France", league: "Ligue 2" },
185
+ "leeds-united": { location: "Leeds, England", league: "Premier League" },
186
+ "leicester-city": { location: "Leicester, England", league: "Championship" },
187
+ "lens": { location: "Lens, France", league: "Ligue 1" },
188
+ "leon": { location: "Le\xF3n, Mexico", league: "Liga MX" },
189
+ "lexington-sc": { location: "Lexington, USA", league: "USL Championship" },
190
+ "liberia": { location: "Liberia, Costa Rica", league: "Liga FPD" },
191
+ "lille": { location: "Lille, France", league: "Ligue 1" },
192
+ "lillestrom": { location: "Lillestr\xF8m, Norway", league: "Eliteserien" },
193
+ "limon": { location: "Lim\xF3n, Costa Rica", league: "Liga de Ascenso" },
194
+ "liverpool": { location: "Liverpool, England", league: "Premier League" },
195
+ "livingston": { location: "Livingston, Scotland", league: "Scottish Championship" },
196
+ "lorient": { location: "Lorient, France", league: "Ligue 1" },
197
+ "loudoun-united": { location: "Leesburg, USA", league: "USL Championship" },
198
+ "louisville-city": { location: "Louisville, USA", league: "USL Championship" },
199
+ "lyngby": { location: "Kongens Lyngby, Denmark", league: "Danish Superliga" },
200
+ "lyon": { location: "Lyon, France", league: "Ligue 1" },
201
+ "machida-zelvia": { location: "Machida, Japan", league: "J1 League" },
202
+ "mainz": { location: "Mainz, Germany", league: "Bundesliga" },
203
+ "malmo": { location: "Malm\xF6, Sweden", league: "Allsvenskan" },
204
+ "manchester-city": { location: "Manchester, England", league: "Premier League" },
205
+ "manchester-united": { location: "Manchester, England", league: "Premier League" },
206
+ "marseille": { location: "Marseille, France", league: "Ligue 1" },
207
+ "mazatlan": { location: "Mazatl\xE1n, Mexico", league: "Liga MX" },
208
+ "metz": { location: "Metz, France", league: "Ligue 1" },
209
+ "miami-fc": { location: "Miami, USA", league: "USL Championship" },
210
+ "midtjylland": { location: "Herning, Denmark", league: "Danish Superliga" },
211
+ "minnesota-united": { location: "Saint Paul, USA", league: "MLS" },
212
+ "mirassol": { location: "Mirassol, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
213
+ "mito-hollyhock": { location: "Mito, Japan", league: "J2 League" },
214
+ "mjallby": { location: "H\xE4llevik, Sweden", league: "Allsvenskan" },
215
+ "molde": { location: "Molde, Norway", league: "Eliteserien" },
216
+ "monaco": { location: "Monaco", league: "Ligue 1" },
217
+ "monterey-bay": { location: "Monterey, USA", league: "USL Championship" },
218
+ "monterrey": { location: "Monterrey, Mexico", league: "Liga MX" },
219
+ "montpellier": { location: "Montpellier, France", league: "Ligue 2" },
220
+ "motherwell": { location: "Motherwell, Scotland", league: "Scottish Premiership" },
221
+ "grecia": { location: "Grecia, Costa Rica", league: "Liga de Ascenso" },
222
+ "nac-breda": { location: "Breda, Netherlands", league: "Eredivisie" },
223
+ "nagoya-grampus": { location: "Nagoya, Japan", league: "J1 League" },
224
+ "nancy": { location: "Nancy, France", league: "Ligue 2" },
225
+ "nantes": { location: "Nantes, France", league: "Ligue 1" },
226
+ "napoli": { location: "Naples, Italy", league: "Serie A" },
227
+ "nashville-sc": { location: "Nashville, USA", league: "MLS" },
228
+ "nec": { location: "Nijmegen, Netherlands", league: "Eredivisie" },
229
+ "necaxa": { location: "Aguascalientes, Mexico", league: "Liga MX" },
230
+ "new-england": { location: "Foxborough, USA", league: "MLS" },
231
+ "new-mexico-united": { location: "Albuquerque, USA", league: "USL Championship" },
232
+ "newcastle": { location: "Newcastle, England", league: "Premier League" },
233
+ "newells": { location: "Rosario, Argentina", league: "Argentine Primera Divisi\xF3n" },
234
+ "nice": { location: "Nice, France", league: "Ligue 1" },
235
+ "nimes": { location: "N\xEEmes, France", league: "Championnat National" },
236
+ "nordsjaelland": { location: "Farum, Denmark", league: "Danish Superliga" },
237
+ "ny-red-bulls": { location: "Harrison, USA", league: "MLS" },
238
+ "nycfc": { location: "New York City, USA", league: "MLS" },
239
+ "oakland-roots": { location: "Oakland, USA", league: "USL Championship" },
240
+ "ob-odense": { location: "Odense, Denmark", league: "Danish Superliga" },
241
+ "odd": { location: "Skien, Norway", league: "Norwegian First Division" },
242
+ "olympiacos": { location: "Piraeus, Greece", league: "Super League Greece" },
243
+ "orange-county-sc": { location: "Irvine, USA", league: "USL Championship" },
244
+ "orebro": { location: "\xD6rebro, Sweden", league: "Superettan" },
245
+ "orlando-city": { location: "Orlando, USA", league: "MLS" },
246
+ "pachuca": { location: "Pachuca, Mexico", league: "Liga MX" },
247
+ "palmeiras": { location: "S\xE3o Paulo, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
248
+ "paris-fc": { location: "Paris, France", league: "Ligue 1" },
249
+ "psg": { location: "Paris, France", league: "Ligue 1" },
250
+ "pec-zwolle": { location: "Zwolle, Netherlands", league: "Eredivisie" },
251
+ "perez-zeledon": { location: "San Isidro, Costa Rica", league: "Liga FPD" },
252
+ "philadelphia-union": { location: "Chester, USA", league: "MLS" },
253
+ "phoenix-rising": { location: "Phoenix, USA", league: "USL Championship" },
254
+ "pittsburgh-riverhounds": { location: "Pittsburgh, USA", league: "USL Championship" },
255
+ "platense": { location: "Florida, Argentina", league: "Argentine Primera Divisi\xF3n" },
256
+ "pohang-steelers": { location: "Pohang, South Korea", league: "K League 1" },
257
+ "portland-timbers": { location: "Portland, USA", league: "MLS" },
258
+ "porto": { location: "Porto, Portugal", league: "Primeira Liga" },
259
+ "psv": { location: "Eindhoven, Netherlands", league: "Eredivisie" },
260
+ "puebla": { location: "Puebla, Mexico", league: "Liga MX" },
261
+ "pumas": { location: "Mexico City, Mexico", league: "Liga MX" },
262
+ "puntarenas": { location: "Puntarenas, Costa Rica", league: "Liga FPD" },
263
+ "queretaro": { location: "Quer\xE9taro, Mexico", league: "Liga MX" },
264
+ "racing": { location: "Avellaneda, Argentina", league: "Argentine Primera Divisi\xF3n" },
265
+ "randers": { location: "Randers, Denmark", league: "Danish Superliga" },
266
+ "rangers": { location: "Glasgow, Scotland", league: "Scottish Premiership" },
267
+ "rb-leipzig": { location: "Leipzig, Germany", league: "Bundesliga" },
268
+ "real-madrid": { location: "Madrid, Spain", league: "La Liga" },
269
+ "real-salt-lake": { location: "Sandy, USA", league: "MLS" },
270
+ "red-star": { location: "Saint-Ouen, France", league: "Ligue 2" },
271
+ "reims": { location: "Reims, France", league: "Ligue 2" },
272
+ "rennes": { location: "Rennes, France", league: "Ligue 1" },
273
+ "rhode-island-fc": { location: "Pawtucket, USA", league: "USL Championship" },
274
+ "river-plate": { location: "Buenos Aires, Argentina", league: "Argentine Primera Divisi\xF3n" },
275
+ "rkc": { location: "Waalwijk, Netherlands", league: "Eredivisie" },
276
+ "roma": { location: "Rome, Italy", league: "Serie A" },
277
+ "rosario-central": { location: "Rosario, Argentina", league: "Argentine Primera Divisi\xF3n" },
278
+ "rosenborg": { location: "Trondheim, Norway", league: "Eliteserien" },
279
+ "sacramento-republic": { location: "Sacramento, USA", league: "USL Championship" },
280
+ "saint-etienne": { location: "Saint-\xC9tienne, France", league: "Ligue 2" },
281
+ "san-antonio-fc": { location: "San Antonio, USA", league: "USL Championship" },
282
+ "san-carlos": { location: "Quesada, Costa Rica", league: "Liga FPD" },
283
+ "san-diego-fc": { location: "San Diego, USA", league: "MLS" },
284
+ "san-jose-earthquakes": { location: "San Jose, USA", league: "MLS" },
285
+ "san-lorenzo": { location: "Buenos Aires, Argentina", league: "Argentine Primera Divisi\xF3n" },
286
+ "sanfrecce-hiroshima": { location: "Hiroshima, Japan", league: "J1 League" },
287
+ "santos": { location: "Santos, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
288
+ "santos-guapiles": { location: "Gu\xE1piles, Costa Rica", league: "Liga FPD" },
289
+ "santos-laguna": { location: "Torre\xF3n, Mexico", league: "Liga MX" },
290
+ "sao-paulo": { location: "S\xE3o Paulo, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
291
+ "saprissa": { location: "San Jos\xE9, Costa Rica", league: "Liga FPD" },
292
+ "sarpsborg": { location: "Sarpsborg, Norway", league: "Eliteserien" },
293
+ "schalke": { location: "Gelsenkirchen, Germany", league: "2. Bundesliga" },
294
+ "seattle-sounders": { location: "Seattle, USA", league: "MLS" },
295
+ "sevilla": { location: "Seville, Spain", league: "La Liga" },
296
+ "shakhtar": { location: "Donetsk, Ukraine", league: "Ukrainian Premier League" },
297
+ "shimizu-s-pulse": { location: "Shizuoka, Japan", league: "J1 League" },
298
+ "silkeborg": { location: "Silkeborg, Denmark", league: "Danish Superliga" },
299
+ "sirius": { location: "Uppsala, Sweden", league: "Allsvenskan" },
300
+ "sochaux": { location: "Montb\xE9liard, France", league: "Championnat National" },
301
+ "sonderjyske": { location: "Haderslev, Denmark", league: "Danish Superliga" },
302
+ "sparta-rotterdam": { location: "Rotterdam, Netherlands", league: "Eredivisie" },
303
+ "sport-recife": { location: "Recife, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
304
+ "sporting": { location: "Lisbon, Portugal", league: "Primeira Liga" },
305
+ "sporting-jax": { location: "Jacksonville, USA", league: "MLS Next Pro" },
306
+ "sporting-kc": { location: "Kansas City, USA", league: "MLS" },
307
+ "sporting-san-jose": { location: "San Jos\xE9, Costa Rica", league: "Liga FPD" },
308
+ "st-mirren": { location: "Paisley, Scotland", league: "Scottish Premiership" },
309
+ "st-louis-city": { location: "St. Louis, USA", league: "MLS" },
310
+ "st-pauli": { location: "Hamburg, Germany", league: "Bundesliga" },
311
+ "stabaek": { location: "B\xE6rum, Norway", league: "Norwegian First Division" },
312
+ "strasbourg": { location: "Strasbourg, France", league: "Ligue 1" },
313
+ "stromsgodset": { location: "Drammen, Norway", league: "Eliteserien" },
314
+ "stuttgart": { location: "Stuttgart, Germany", league: "Bundesliga" },
315
+ "switchbacks": { location: "Colorado Springs, USA", league: "USL Championship" },
316
+ "talleres": { location: "C\xF3rdoba, Argentina", league: "Argentine Primera Divisi\xF3n" },
317
+ "tampa-bay-rowdies": { location: "St. Petersburg, USA", league: "USL Championship" },
318
+ "tigre": { location: "Victoria, Argentina", league: "Argentine Primera Divisi\xF3n" },
319
+ "tigres": { location: "San Nicol\xE1s de los Garza, Mexico", league: "Liga MX" },
320
+ "tijuana": { location: "Tijuana, Mexico", league: "Liga MX" },
321
+ "tokyo-verdy": { location: "Tokyo, Japan", league: "J1 League" },
322
+ "toluca": { location: "Toluca, Mexico", league: "Liga MX" },
323
+ "toronto-fc": { location: "Toronto, Canada", league: "MLS" },
324
+ "tottenham": { location: "London, England", league: "Premier League" },
325
+ "toulouse": { location: "Toulouse, France", league: "Ligue 1" },
326
+ "tromso": { location: "Troms\xF8, Norway", league: "Eliteserien" },
327
+ "troyes": { location: "Troyes, France", league: "Ligue 2" },
328
+ "twente": { location: "Enschede, Netherlands", league: "Eredivisie" },
329
+ "ulsan-hd": { location: "Ulsan, South Korea", league: "K League 1" },
330
+ "union": { location: "Santa Fe, Argentina", league: "Argentine Primera Divisi\xF3n" },
331
+ "union-berlin": { location: "Berlin, Germany", league: "Bundesliga" },
332
+ "urawa-reds": { location: "Saitama, Japan", league: "J1 League" },
333
+ "utrecht": { location: "Utrecht, Netherlands", league: "Eredivisie" },
334
+ "v-varen-nagasaki": { location: "Nagasaki, Japan", league: "J2 League" },
335
+ "valencia": { location: "Valencia, Spain", league: "La Liga" },
336
+ "valerenga": { location: "Oslo, Norway", league: "Eliteserien" },
337
+ "vancouver-whitecaps": { location: "Vancouver, Canada", league: "MLS" },
338
+ "varnamo": { location: "V\xE4rnamo, Sweden", league: "Allsvenskan" },
339
+ "vasco": { location: "Rio de Janeiro, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
340
+ "vejle": { location: "Vejle, Denmark", league: "Danish Superliga" },
341
+ "velez": { location: "Buenos Aires, Argentina", league: "Argentine Primera Divisi\xF3n" },
342
+ "viborg": { location: "Viborg, Denmark", league: "Danish Superliga" },
343
+ "viking": { location: "Stavanger, Norway", league: "Eliteserien" },
344
+ "vissel-kobe": { location: "Kobe, Japan", league: "J1 League" },
345
+ "vitesse": { location: "Arnhem, Netherlands", league: "Eerste Divisie" },
346
+ "vitoria": { location: "Salvador, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
347
+ "volendam": { location: "Volendam, Netherlands", league: "Eredivisie" },
348
+ "werder-bremen": { location: "Bremen, Germany", league: "Bundesliga" },
349
+ "west-ham": { location: "London, England", league: "Premier League" },
350
+ "willem-ii": { location: "Tilburg, Netherlands", league: "Eerste Divisie" },
351
+ "wolfsburg": { location: "Wolfsburg, Germany", league: "Bundesliga" },
352
+ "yokohama-marinos": { location: "Yokohama, Japan", league: "J1 League" }
353
+ };
354
+
16
355
  // src/git/teams.ts
17
- var FAMOUS_SOCCER_TEAMS = [
356
+ function withMeta(seed) {
357
+ const baseSlug = seed.slug.replace(/-\d+$/, "");
358
+ const meta = SOCCER_TEAM_META[baseSlug];
359
+ return {
360
+ name: seed.name,
361
+ slug: seed.slug,
362
+ location: meta?.location ?? "Unknown",
363
+ league: meta?.league ?? "Unknown league"
364
+ };
365
+ }
366
+ var FAMOUS_SOCCER_TEAM_SEEDS = [
18
367
  { name: "Aalborg", slug: "aalborg" },
19
368
  { name: "Aalesund", slug: "aalesund" },
20
369
  { name: "Aarhus", slug: "aarhus" },
@@ -351,12 +700,28 @@ var FAMOUS_SOCCER_TEAMS = [
351
700
  { name: "Wolfsburg", slug: "wolfsburg" },
352
701
  { name: "Yokohama Marinos", slug: "yokohama-marinos" }
353
702
  ];
703
+ var FAMOUS_SOCCER_TEAMS = FAMOUS_SOCCER_TEAM_SEEDS.map(withMeta);
704
+ function lookupSoccerTeam(titleOrSlug) {
705
+ const trimmed = titleOrSlug.trim();
706
+ if (!trimmed) return null;
707
+ const fromName = teamSlugFromName(trimmed);
708
+ const slug = fromName ?? normalizeTakenSlug(trimmed);
709
+ const baseSlug = slug.replace(/-\d+$/, "");
710
+ const seed = FAMOUS_SOCCER_TEAM_SEEDS.find((t) => t.slug === baseSlug);
711
+ if (!seed) return null;
712
+ const suffixMatch = slug.match(/-(\d+)$/) || trimmed.match(/\s+(\d+)$/);
713
+ const suffix = suffixMatch?.[1];
714
+ return withMeta({
715
+ name: suffix ? `${seed.name} ${suffix}` : seed.name,
716
+ slug: suffix ? `${seed.slug}-${suffix}` : seed.slug
717
+ });
718
+ }
354
719
  function teamNameFromSlug(slug) {
355
720
  const normalized = slug.toLowerCase().replace(/^thread\//, "");
356
721
  const suffixMatch = normalized.match(/^(.+)-(\d+)$/);
357
722
  const base = suffixMatch?.[1] ?? normalized;
358
723
  const suffix = suffixMatch?.[2];
359
- const team = FAMOUS_SOCCER_TEAMS.find((t) => t.slug === base);
724
+ const team = FAMOUS_SOCCER_TEAM_SEEDS.find((t) => t.slug === base);
360
725
  if (team) return suffix ? `${team.name} ${suffix}` : team.name;
361
726
  return normalized.split("-").filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
362
727
  }
@@ -366,7 +731,7 @@ function teamSlugFromName(name) {
366
731
  const suffixMatch = trimmed.match(/^(.+?)\s+(\d+)$/);
367
732
  const baseName = suffixMatch?.[1] ?? trimmed;
368
733
  const suffix = suffixMatch?.[2];
369
- const team = FAMOUS_SOCCER_TEAMS.find(
734
+ const team = FAMOUS_SOCCER_TEAM_SEEDS.find(
370
735
  (t) => t.name.toLowerCase() === baseName.toLowerCase()
371
736
  );
372
737
  if (!team) return null;
@@ -394,16 +759,16 @@ function allocateTeamName(taken, random = Math.random) {
394
759
  const takenSet = new Set(
395
760
  [...taken].map((s) => normalizeTakenSlug(s)).filter(Boolean)
396
761
  );
397
- const available = FAMOUS_SOCCER_TEAMS.filter((t) => !takenSet.has(t.slug));
762
+ const available = FAMOUS_SOCCER_TEAM_SEEDS.filter((t) => !takenSet.has(t.slug));
398
763
  if (available.length > 0) {
399
764
  const idx = Math.floor(random() * available.length);
400
- return available[idx];
765
+ return withMeta(available[idx]);
401
766
  }
402
767
  for (let n = 2; n < 1e3; n++) {
403
- for (const t of FAMOUS_SOCCER_TEAMS) {
768
+ for (const t of FAMOUS_SOCCER_TEAM_SEEDS) {
404
769
  const slug = `${t.slug}-${n}`;
405
770
  if (!takenSet.has(slug)) {
406
- return { name: `${t.name} ${n}`, slug };
771
+ return withMeta({ name: `${t.name} ${n}`, slug });
407
772
  }
408
773
  }
409
774
  }
@@ -1409,6 +1774,7 @@ function allocateTeamSlug(repoPath) {
1409
1774
 
1410
1775
  export {
1411
1776
  FAMOUS_SOCCER_TEAMS,
1777
+ lookupSoccerTeam,
1412
1778
  teamSlugFromName,
1413
1779
  takenSlugsFromThread,
1414
1780
  allocateTeamName,