Skip to content

Commit 8f2bb56

Browse files
Add Copilot CLI in registry.json and make CLS in registry-for-jetbrains.json (#124)
Co-authored-by: Anna Zhdan <anna.zhdan@jetbrains.com>
1 parent 521277d commit 8f2bb56

File tree

3 files changed

+48
-13
lines changed

3 files changed

+48
-13
lines changed

.github/workflows/build_registry.py

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -556,35 +556,41 @@ def build_registry(dry_run: bool = False):
556556
if not agents:
557557
print("\nWarning: No agents found")
558558

559-
JETBRAINS_EXCLUDE_IDS = {"codex-acp", "claude-acp", "junie"}
560-
jetbrains_agent_count = len([a for a in agents if a["id"] not in JETBRAINS_EXCLUDE_IDS])
559+
# Agents excluded from registry.json (default registry)
560+
DEFAULT_EXCLUDE_IDS = {"github-copilot"}
561+
# Agents excluded from registry-for-jetbrains.json
562+
JETBRAINS_EXCLUDE_IDS = {"codex-acp", "claude-acp", "junie", "github-copilot-cli"}
563+
564+
default_agents = [a for a in agents if a["id"] not in DEFAULT_EXCLUDE_IDS]
565+
jetbrains_agents = [a for a in agents if a["id"] not in JETBRAINS_EXCLUDE_IDS]
561566

562567
if dry_run:
563568
print(f"\nDry run: validated {len(agents)} agents successfully")
564-
print(f" registry.json would contain {len(agents)} agents")
565-
excluded = ", ".join(JETBRAINS_EXCLUDE_IDS)
569+
print(
570+
f" registry.json would contain {len(default_agents)} agents"
571+
f" (excluded: {', '.join(sorted(DEFAULT_EXCLUDE_IDS))})"
572+
)
566573
print(
567574
f" registry-for-jetbrains.json would contain "
568-
f"{jetbrains_agent_count} agents (excluded: {excluded})"
575+
f"{len(jetbrains_agents)} agents (excluded: {', '.join(sorted(JETBRAINS_EXCLUDE_IDS))})"
569576
)
570577
return
571578

572-
registry = {"version": REGISTRY_VERSION, "agents": agents, "extensions": []}
573-
574579
# Create dist directory
575580
dist_dir = registry_dir / "dist"
576581
dist_dir.mkdir(exist_ok=True)
577582

578583
# Write registry.json
584+
registry = {"version": REGISTRY_VERSION, "agents": default_agents, "extensions": []}
579585
output_path = dist_dir / "registry.json"
580586
with open(output_path, "w") as f:
581587
json.dump(registry, f, indent=2)
582588
f.write("\n")
583589

584-
# Write registry-for-jetbrains.json (without codex and claude)
590+
# Write registry-for-jetbrains.json
585591
jetbrains_registry = {
586592
"version": REGISTRY_VERSION,
587-
"agents": [a for a in agents if a["id"] not in JETBRAINS_EXCLUDE_IDS],
593+
"agents": jetbrains_agents,
588594
}
589595
jetbrains_output_path = dist_dir / "registry-for-jetbrains.json"
590596
with open(jetbrains_output_path, "w") as f:
@@ -606,10 +612,15 @@ def build_registry(dry_run: bool = False):
606612
schema_dst = dist_dir / schema_file
607613
schema_dst.write_bytes(schema_src.read_bytes())
608614

609-
print(f"\nBuilt dist/ with {len(agents)} agents")
610-
print(f" registry.json: {len(agents)} agents")
611-
excluded = ", ".join(JETBRAINS_EXCLUDE_IDS)
612-
print(f" registry-for-jetbrains.json: {jetbrains_agent_count} agents (excluded: {excluded})")
615+
print(f"\nBuilt dist/ with {len(agents)} total agents")
616+
print(
617+
f" registry.json: {len(default_agents)} agents"
618+
f" (excluded: {', '.join(sorted(DEFAULT_EXCLUDE_IDS))})"
619+
)
620+
print(
621+
f" registry-for-jetbrains.json: {len(jetbrains_agents)} agents"
622+
f" (excluded: {', '.join(sorted(JETBRAINS_EXCLUDE_IDS))})"
623+
)
613624

614625

615626
if __name__ == "__main__":

github-copilot-cli/agent.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"id": "github-copilot-cli",
3+
"name": "GitHub Copilot",
4+
"version": "0.0.420",
5+
"description": "GitHub's AI pair programmer",
6+
"repository": "https://github.com/github/copilot-cli",
7+
"authors": [
8+
"Microsoft"
9+
],
10+
"license": "proprietary",
11+
"distribution": {
12+
"npx": {
13+
"package": "@github/copilot@0.0.420",
14+
"args": [
15+
"--acp"
16+
]
17+
}
18+
}
19+
}

github-copilot-cli/icon.svg

Lines changed: 5 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)