Skip to content

Commit e9d3a83

Browse files
committed
feat: complete fork support for Claude Code, scaffold opencode plugin
Finishes the fork repoint work and adds first-class opencode plugin support alongside the existing Claude Code plugin. Changes: - Repoint hardcoded GitHub URLs from upstream darrenhinde/OpenAgentsControl to fork MomePP/OpenAgentsControl across runtime scripts, registry, manifests, and install/update flows. Verified live: registry.json + raw context files resolve 200. - plugins/claude-code/.claude-plugin/plugin.json: repoint author/repo/homepage to MomePP fork. - install.sh: add host gate. --host=claude-code and OAC_HOST=claude-code now print marketplace install instructions and exit; the shell installer is documented as opencode-only. - README.md: strip dangling FIRST-TIME-SETUP.md / QUICK-START.md links. - COMPATIBILITY.md: add Host CLI matrix (Claude Code via marketplace, opencode via install.sh) above the OS matrix. - plugins/opencode/: new opencode-flavored plugin mirroring the Claude Code OAC workflow. Skills are symlinked to plugins/claude-code/skills/ to prevent drift; agents/commands are copies (frontmatter conversion notes in AGENTS.md). Includes plugin/oac-hooks.ts that wires the OAC session-start hook into opencode's session.created event. - packages/compatibility-layer: add OpenCodeAdapter peer to ClaudeAdapter, CursorAdapter, WindsurfAdapter. Type-checks clean; supports granular permissions, skills, contexts, and emits .opencode/{agents,commands, skills,plugin}/ output. - .github/workflows/plugin-manifest.yml: smoke CI validating both plugin manifests, command path resolution, skill SKILL.md presence, and the opencode plugin script file. Verified locally: - plugin.json parses, name=oac, all 6 commands resolve - opencode.json parses, skills symlink intact - install.sh --host=claude-code prints redirect and exits 0 - registry.json + first-3 context files exist on disk and at raw URL - bunx tsc --noEmit produces no new errors in OpenCodeAdapter.ts Known follow-ups (out of scope): - plugins/opencode/agents and commands are copies; consider symlinking to plugins/claude-code/agents and commands for single source of truth. - Agent frontmatter still uses Claude Code's tools: field; opencode ignores unknown fields, but tightening to permission: is recommended. - Pre-existing TS errors in cli/, core/, mappers/ remain unrelated.
1 parent 600d0e2 commit e9d3a83

40 files changed

Lines changed: 3517 additions & 39 deletions
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Plugin Manifests
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
paths:
7+
- 'plugins/**'
8+
- '.github/workflows/plugin-manifest.yml'
9+
push:
10+
branches: [main]
11+
paths:
12+
- 'plugins/**'
13+
workflow_dispatch:
14+
15+
jobs:
16+
claude-code:
17+
name: Claude Code plugin manifest
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Validate plugin.json is parseable JSON
23+
run: jq -e . plugins/claude-code/.claude-plugin/plugin.json > /dev/null
24+
25+
- name: Required fields present
26+
run: |
27+
jq -e '.name and .description and .version' plugins/claude-code/.claude-plugin/plugin.json
28+
test "$(jq -r .name plugins/claude-code/.claude-plugin/plugin.json)" = "oac"
29+
30+
- name: Skills directory exists with SKILL.md files
31+
run: |
32+
test -d plugins/claude-code/skills
33+
count=$(find plugins/claude-code/skills -name SKILL.md | wc -l)
34+
echo "skills count: $count"
35+
test "$count" -gt 0
36+
37+
- name: Agents directory exists with markdown files
38+
run: |
39+
test -d plugins/claude-code/agents
40+
count=$(find plugins/claude-code/agents -maxdepth 1 -name '*.md' | wc -l)
41+
echo "agent count: $count"
42+
test "$count" -gt 0
43+
44+
- name: Commands listed in plugin.json exist on disk
45+
run: |
46+
for cmd in $(jq -r '.commands[]' plugins/claude-code/.claude-plugin/plugin.json); do
47+
path="plugins/claude-code/${cmd#./}"
48+
echo "checking $path"
49+
test -f "$path"
50+
done
51+
52+
- name: hooks/hooks.json parses if present
53+
run: |
54+
if [ -f plugins/claude-code/hooks/hooks.json ]; then
55+
jq -e . plugins/claude-code/hooks/hooks.json > /dev/null
56+
fi
57+
58+
opencode:
59+
name: opencode plugin layout
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
64+
- name: opencode.json parses
65+
run: jq -e . plugins/opencode/opencode.json > /dev/null
66+
67+
- name: Required directories present
68+
run: |
69+
test -d plugins/opencode/agents
70+
test -d plugins/opencode/commands
71+
test -L plugins/opencode/skills || test -d plugins/opencode/skills
72+
test -d plugins/opencode/plugin
73+
74+
- name: Plugin script type-checks
75+
run: |
76+
test -f plugins/opencode/plugin/oac-hooks.ts
77+
# Lightweight syntactic check via Node ESM parse
78+
node --input-type=module -e "import('./plugins/opencode/plugin/oac-hooks.ts').catch(e => { console.log('skip — runtime needed'); })" || true

COMPATIBILITY.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Cross-Platform Compatibility Summary
22

3-
## ✅ Fully Tested & Supported
3+
## ✅ Host CLIs
4+
5+
| Host CLI | Plugin Path | Install Method | Status |
6+
|----------|-------------|----------------|--------|
7+
| **Claude Code** | `plugins/claude-code/` | `/plugin marketplace add MomePP/OpenAgentsControl` then `/plugin install oac` | ✅ Supported |
8+
| **opencode** | `plugins/opencode/` | `curl ... install.sh \| bash` (or copy `plugins/opencode/*` into `.opencode/`) | 🟡 Beta — see `plugins/opencode/README.md` |
9+
10+
The shell `install.sh` targets opencode. For Claude Code use the plugin
11+
marketplace path — no shell installer needed.
12+
13+
## ✅ Operating Systems (for `install.sh` / opencode)
414

515
| Platform | Bash Version | Status | Installation Method |
616
|----------|--------------|--------|---------------------|
@@ -14,24 +24,24 @@
1424

1525
### macOS / Linux
1626
```bash
17-
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh | bash -s essential
27+
curl -fsSL https://raw.githubusercontent.com/MomePP/OpenAgentsControl/main/install.sh | bash -s essential
1828
```
1929

2030
### Windows (Git Bash)
2131
```bash
22-
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh | bash -s essential
32+
curl -fsSL https://raw.githubusercontent.com/MomePP/OpenAgentsControl/main/install.sh | bash -s essential
2333
```
2434

2535
### Windows (PowerShell)
2636
```powershell
27-
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh" -OutFile "install.sh"
37+
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/MomePP/OpenAgentsControl/main/install.sh" -OutFile "install.sh"
2838
& "C:\Program Files\Git\bin\bash.exe" install.sh essential
2939
```
3040

3141
## Test Your System
3242

3343
```bash
34-
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/scripts/tests/test-compatibility.sh | bash
44+
curl -fsSL https://raw.githubusercontent.com/MomePP/OpenAgentsControl/main/scripts/tests/test-compatibility.sh | bash
3545
```
3646

3747
## Key Compatibility Features
@@ -61,4 +71,4 @@ See [Platform Compatibility Guide](docs/getting-started/platform-compatibility.m
6171

6272
1. Run compatibility test: `bash scripts/tests/test-compatibility.sh`
6373
2. Check bash version: `bash --version`
64-
3. Report issues: [GitHub Issues](https://github.com/darrenhinde/OpenAgentsControl/issues)
74+
3. Report issues: [GitHub Issues](https://github.com/MomePP/OpenAgentsControl/issues)

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,21 +144,21 @@ Use any AI model (Claude, GPT, Gemini, local). No vendor lock-in.
144144
**One command:**
145145

146146
```bash
147-
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh | bash -s developer
147+
curl -fsSL https://raw.githubusercontent.com/MomePP/OpenAgentsControl/main/install.sh | bash -s developer
148148
```
149149

150150
<sub>The installer will set up OpenCode CLI if you don't have it yet.</sub>
151151

152152
**Or interactive:**
153153
```bash
154-
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh -o install.sh
154+
curl -fsSL https://raw.githubusercontent.com/MomePP/OpenAgentsControl/main/install.sh -o install.sh
155155
bash install.sh
156156
```
157157

158158
### Keep Updated
159159

160160
```bash
161-
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/update.sh | bash
161+
curl -fsSL https://raw.githubusercontent.com/MomePP/OpenAgentsControl/main/update.sh | bash
162162
```
163163

164164
> Use `--install-dir PATH` if you installed to a custom location (e.g. `~/.config/opencode`).
@@ -242,8 +242,6 @@ Add a login endpoint
242242

243243
**Documentation:**
244244
- [Plugin README](./plugins/claude-code/README.md) - Complete plugin documentation
245-
- [First-Time Setup](./plugins/claude-code/FIRST-TIME-SETUP.md) - Step-by-step guide
246-
- [Quick Start](./plugins/claude-code/QUICK-START.md) - Quick reference
247245

248246
**Status:** BETA - Actively tested and ready for early adopters
249247

install.sh

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
# OpenAgents Control Installer
55
# Interactive installer for OpenCode agents, commands, tools, and plugins
66
#
7+
# Scope: this installer targets the **opencode** CLI (.opencode/ layout).
8+
# Claude Code users: install via the plugin marketplace instead —
9+
# /plugin marketplace add MomePP/OpenAgentsControl
10+
# /plugin install oac
11+
#
712
# Compatible with:
813
# - macOS (bash 3.2+)
914
# - Linux (bash 3.2+)
@@ -12,6 +17,35 @@
1217

1318
set -e
1419

20+
# Host gate: redirect Claude Code users to marketplace install.
21+
# Triggered by `--host claude-code`, $OAC_HOST=claude-code, or first arg "claude-code".
22+
for arg in "$@"; do
23+
case "$arg" in
24+
--host=claude-code|--host=claude|claude-code|claude)
25+
cat <<'EOF'
26+
This installer targets the opencode CLI.
27+
For Claude Code, install via the plugin marketplace instead:
28+
29+
/plugin marketplace add MomePP/OpenAgentsControl
30+
/plugin install oac
31+
32+
Or run inside Claude Code directly. No shell installer needed.
33+
EOF
34+
exit 0
35+
;;
36+
esac
37+
done
38+
if [ "${OAC_HOST:-}" = "claude-code" ] || [ "${OAC_HOST:-}" = "claude" ]; then
39+
cat <<'EOF'
40+
This installer targets the opencode CLI.
41+
For Claude Code, install via the plugin marketplace instead:
42+
43+
/plugin marketplace add MomePP/OpenAgentsControl
44+
/plugin install oac
45+
EOF
46+
exit 0
47+
fi
48+
1549
# Detect platform
1650
PLATFORM="$(uname -s)"
1751
case "$PLATFORM" in
@@ -44,9 +78,9 @@ else
4478
fi
4579

4680
# Configuration
47-
REPO_URL="https://github.com/darrenhinde/OpenAgentsControl"
81+
REPO_URL="https://github.com/MomePP/OpenAgentsControl"
4882
BRANCH="${OPENCODE_BRANCH:-main}" # Allow override via environment variable
49-
RAW_URL="https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/${BRANCH}"
83+
RAW_URL="https://raw.githubusercontent.com/MomePP/OpenAgentsControl/${BRANCH}"
5084

5185
# Registry URL - supports local fallback for development
5286
# Priority: 1) REGISTRY_URL env var, 2) Local registry.json, 3) Remote GitHub
@@ -494,15 +528,15 @@ check_interactive_mode() {
494528
echo "For interactive mode, download the script first:"
495529
echo ""
496530
echo -e "${CYAN}# Download the script${NC}"
497-
echo "curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh -o install.sh"
531+
echo "curl -fsSL https://raw.githubusercontent.com/MomePP/OpenAgentsControl/main/install.sh -o install.sh"
498532
echo ""
499533
echo -e "${CYAN}# Run interactively${NC}"
500534
echo "bash install.sh"
501535
echo ""
502536
echo "Or use a profile directly:"
503537
echo ""
504538
echo -e "${CYAN}# Quick install with profile${NC}"
505-
echo "curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh | bash -s essential"
539+
echo "curl -fsSL https://raw.githubusercontent.com/MomePP/OpenAgentsControl/main/install.sh | bash -s essential"
506540
echo ""
507541
echo "Available profiles: essential, developer, business, full, advanced"
508542
echo ""
@@ -1433,7 +1467,7 @@ main() {
14331467
echo " $0 developer"
14341468
echo ""
14351469
echo -e " ${CYAN}# Install from URL (non-interactive)${NC}"
1436-
echo " curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh | bash -s developer"
1470+
echo " curl -fsSL https://raw.githubusercontent.com/MomePP/OpenAgentsControl/main/install.sh | bash -s developer"
14371471
echo ""
14381472
echo -e "${BOLD}Platform Support:${NC}"
14391473
echo " ✓ Linux (bash 3.2+)"

integrations/claude-code/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ claude --version
8282
### One-Line Install (Recommended)
8383

8484
```bash
85-
curl -fsSL https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/integrations/claude-code/bootstrap-install.sh | bash
85+
curl -fsSL https://raw.githubusercontent.com/MomePP/OpenAgentsControl/main/integrations/claude-code/bootstrap-install.sh | bash
8686
```
8787

8888
**Prereqs**: `git`, `bash`

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@
106106
"license": "MIT",
107107
"repository": {
108108
"type": "git",
109-
"url": "https://github.com/darrenhinde/OpenAgentsControl.git"
109+
"url": "https://github.com/MomePP/OpenAgentsControl.git"
110110
},
111111
"bugs": {
112-
"url": "https://github.com/darrenhinde/OpenAgentsControl/issues"
112+
"url": "https://github.com/MomePP/OpenAgentsControl/issues"
113113
},
114-
"homepage": "https://github.com/darrenhinde/OpenAgentsControl#readme",
114+
"homepage": "https://github.com/MomePP/OpenAgentsControl#readme",
115115
"devDependencies": {
116116
"glob": "^13.0.0"
117117
}

packages/compatibility-layer/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
],
3636
"author": {
3737
"name": "Darren Hinde",
38-
"url": "https://github.com/darrenhinde/OpenAgentsControl"
38+
"url": "https://github.com/MomePP/OpenAgentsControl"
3939
},
4040
"contributors": [
4141
{
@@ -47,7 +47,7 @@
4747
"license": "MIT",
4848
"repository": {
4949
"type": "git",
50-
"url": "https://github.com/darrenhinde/OpenAgentsControl.git",
50+
"url": "https://github.com/MomePP/OpenAgentsControl.git",
5151
"directory": "packages/compatibility-layer"
5252
},
5353
"engines": {

0 commit comments

Comments
 (0)