Skip to content

Commit 19df286

Browse files
authored
Merge pull request #1 from raihankhan-rk/codex/opencode-v2-runtime
fix: support Graphify commands in OpenCode v2
2 parents 1e46069 + 647a9d3 commit 19df286

9 files changed

Lines changed: 4190 additions & 267 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 1.1.1
4+
5+
- Register `/graphify` independently of asynchronous v2 MCP reconciliation.
6+
- Execute the command through the supported v2 session prompt API, preserving arguments, attachments, and delivery.
7+
- Reject command execution for disabled or unrelated Graphify connections.
8+
- Check the v2 entrypoint against `@opencode/plugin` 2.0.26 types and test deferred MCP registration.
9+
310
## 1.1.0
411

512
- Add an OpenCode v2 `setup(ctx)` entrypoint while keeping OpenCode v1 support through `server()`.

‎README.md‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ bundled API keys, or install scripts.
1313

1414
Supports OpenCode v1 and v2 from the same package. OpenCode v1 support requires
1515
**OpenCode 1.18.29** or newer; tested with **OpenCode 1.18.35**. OpenCode v2
16-
support targets the V2 plugin API and configuration shape.
16+
support is tested with **@opencode/cli 2.0.26**. Version **1.1.1** contains the
17+
v2 command compatibility fix; publish that release before using the npm examples below.
1718
You also need a Graphify account with an accessible indexed repository and a
1819
working model provider in OpenCode. Graphify sign-in is separate from model-provider sign-in.
1920

@@ -23,7 +24,7 @@ For OpenCode v1, add this entry to your existing `opencode.json` (project) or
2324
```json
2425
{
2526
"$schema": "https://opencode.ai/config.json",
26-
"plugin": ["graphify-opencode@1.1.0"]
27+
"plugin": ["graphify-opencode@1.1.1"]
2728
}
2829
```
2930

@@ -32,7 +33,7 @@ For OpenCode v2, use `plugins`:
3233
```json
3334
{
3435
"$schema": "https://opencode.ai/config.json",
35-
"plugins": ["graphify-opencode@1.1.0"]
36+
"plugins": ["graphify-opencode@1.1.1"]
3637
}
3738
```
3839

@@ -68,6 +69,8 @@ preserves an existing `/graphify` command and your tool and permission settings.
6869
Plugin-specific guidance is active only for an enabled remote `graphify` entry
6970
whose URL is exactly `https://api.graphify.com/mcp`. In OpenCode v2, that server
7071
is managed through `mcp.servers.graphify` and uses `disabled: true` to opt out.
72+
The v2 `/graphify` command remains listed when disabled, but refuses to submit a
73+
request until the Graphify connection is enabled. Restart after changing settings.
7174

7275
To disable Graphify in OpenCode v1, add this to your configuration and restart
7376
OpenCode:
@@ -180,9 +183,12 @@ npm pack --dry-run
180183

181184
The package exports one default object: OpenCode v2 calls `setup(ctx)`, while
182185
OpenCode v1 calls `server()`. Unit tests exercise v1 and v2 registration,
183-
configuration preservation, disabled connections, and isolated guidance.
186+
configuration preservation, deferred MCP registration, disabled connections, literal
187+
command arguments, attachments, delivery, and isolated guidance. The v2 native smoke
188+
test covers command registration, prompt admission, and the context hook; authenticated
189+
Graphify tool execution requires an account and is a separate check.
184190

185191
[Website](https://graphify.com) · [Documentation](https://docs.graphify.com) ·
186192
[Support](mailto:founders@graphify.com) ·
187193
[OpenCode plugins](https://opencode.ai/docs/plugins/) ·
188-
[OpenCode v2 plugins](https://dev.opencode.ai/v2/docs/build/plugins/)
194+
[OpenCode v2 plugins](https://opencode.ai/v2/docs/build/plugins/)

‎examples/opencode-v2.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"$schema": "https://opencode.ai/config.json",
3-
"plugins": ["graphify-opencode@1.1.0"]
3+
"plugins": ["graphify-opencode@1.1.1"]
44
}

‎examples/opencode.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"$schema": "https://opencode.ai/config.json",
3-
"plugin": ["graphify-opencode@1.1.0"]
3+
"plugin": ["graphify-opencode@1.1.1"]
44
}

0 commit comments

Comments
 (0)