opencodev2-agentswitch 0.0.1 → 0.0.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/README.md +2 -65
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,66 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# opencode agent switch tool
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
Install directly from Git:
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
opencode plugin add 'git+https://github.com/anomalyco/opencode.git#path:packages/plugins/figma'
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
The URL selects the Figma directory and uses the repository's default branch, so no explicit branch name is needed. Installation is Git-only.
|
|
14
|
-
|
|
15
|
-
The plugin exports `index.ts` directly. There is no build step or installation hook.
|
|
16
|
-
|
|
17
|
-
For local development, add the directory to `plugins` in the project's `opencode.jsonc`:
|
|
18
|
-
|
|
19
|
-
```jsonc
|
|
20
|
-
{
|
|
21
|
-
"$schema": "https://opencode.ai/config.json",
|
|
22
|
-
"plugins": ["./packages/plugins/figma"],
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
The plugin is not activated merely by being present in the repository. Installing it adds it to the user's configuration.
|
|
27
|
-
|
|
28
|
-
## Sign in and test
|
|
29
|
-
|
|
30
|
-
1. Open `/mcps`, select `figma`, and sign in.
|
|
31
|
-
2. Confirm that the server is connected.
|
|
32
|
-
3. Ask the agent to call Figma's `whoami` tool.
|
|
33
|
-
|
|
34
|
-
The connection uses Figma's public endpoint with dynamic client registration (DCR). OAuth discovery supplies the scope, and OpenCode chooses an available loopback callback port; no client credentials or explicit OAuth settings are needed.
|
|
35
|
-
|
|
36
|
-
Existing `mcp.servers.figma` configuration takes precedence, including disabled servers and custom endpoints.
|
|
37
|
-
|
|
38
|
-
## Official skills
|
|
39
|
-
|
|
40
|
-
`skills/` contains the complete skill bundle copied unchanged from the pinned revision of [Figma's official plugin](https://github.com/figma/mcp-server-guide/tree/main/skills). [skills-source.json](skills-source.json) records the exact upstream revision and the discovered skill IDs; it is not an allowlist.
|
|
41
|
-
|
|
42
|
-
The bundle covers design-to-code, canvas editing, screen and library generation, Code Connect, file creation, diagrams, FigJam, Slides, motion, SwiftUI, shaders, and generative plugins. Supporting references and scripts are included. No replacement instructions are authored by OpenCode. Existing skills with the same IDs are preserved.
|
|
43
|
-
|
|
44
|
-
The vendored Figma materials remain Figma's materials, not OpenCode-authored MIT code. See [skills/NOTICE.md](skills/NOTICE.md) for attribution and the Figma Developer Terms.
|
|
45
|
-
|
|
46
|
-
## Manually sync skills
|
|
47
|
-
|
|
48
|
-
From `packages/plugins/figma`, explicitly run:
|
|
49
|
-
|
|
50
|
-
```sh
|
|
51
|
-
bun run sync:skills
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
This fetches upstream `main`, discovers every skill directory containing `SKILL.md`, copies all of them with their supporting files, removes previously bundled skills that no longer exist upstream, and records the resolved commit and skill IDs. No skill names are filtered or hardcoded in the sync script. To use a particular branch, tag, or commit, pass it as an argument. To reproduce the current bundle, pass the revision in `skills-source.json`.
|
|
55
|
-
|
|
56
|
-
Review and commit `skills/` and `skills-source.json` together. Sync replaces local edits within bundled skill directories, so keep the upstream files unchanged and review updates before releasing them.
|
|
57
|
-
|
|
58
|
-
Sync never runs automatically during installation, plugin startup, typechecking, or CI. The plugin loads only the checked-in files. Supporting Figma scripts are guidance assets; the plugin does not execute them.
|
|
59
|
-
|
|
60
|
-
## Remove
|
|
61
|
-
|
|
62
|
-
```sh
|
|
63
|
-
opencode plugin remove 'git+https://github.com/anomalyco/opencode.git#path:packages/plugins/figma'
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
If you installed with a different Git specification, pass that same specification to remove it. An independently configured `mcp.servers.figma` entry remains unaffected.
|
|
3
|
+
allows agents to switch the current session to a different agent automatically.
|