@craftsamo/agent-github 0.0.0-stage → 0.1.0

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.
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "craftsamo",
3
+ "interface": {
4
+ "displayName": "craftsamo"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "agent-github",
9
+ "source": {
10
+ "source": "local",
11
+ "path": "./"
12
+ },
13
+ "policy": {
14
+ "installation": "AVAILABLE",
15
+ "authentication": "ON_INSTALL"
16
+ },
17
+ "category": "Developer Tools"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "agent-github",
3
+ "version": "0.1.0",
4
+ "description": "GitHub tools for coding agents: issues, project boards, pull requests, repositories, releases and Actions.",
5
+ "author": {
6
+ "name": "craftsamo",
7
+ "url": "https://github.com/craftsamo"
8
+ },
9
+ "homepage": "https://github.com/craftsamo/agent-github#readme",
10
+ "repository": "https://github.com/craftsamo/agent-github",
11
+ "license": "MIT"
12
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3
+ "name": "craftsamo",
4
+ "description": "Plugins by craftsamo.",
5
+ "owner": {
6
+ "name": "craftsamo",
7
+ "url": "https://github.com/craftsamo"
8
+ },
9
+ "plugins": [
10
+ {
11
+ "name": "agent-github",
12
+ "source": "./",
13
+ "description": "GitHub tools for coding agents: issues, project boards, pull requests, repositories, releases and Actions.",
14
+ "category": "development"
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "agent-github",
3
+ "version": "0.1.0",
4
+ "description": "GitHub tools for coding agents: issues, project boards, pull requests, repositories, releases and Actions.",
5
+ "author": {
6
+ "name": "craftsamo",
7
+ "url": "https://github.com/craftsamo"
8
+ },
9
+ "homepage": "https://github.com/craftsamo/agent-github#readme",
10
+ "repository": "https://github.com/craftsamo/agent-github",
11
+ "license": "MIT",
12
+ "mcpServers": {
13
+ "github": {
14
+ "command": "node",
15
+ "args": ["${CLAUDE_PLUGIN_ROOT}/dist/mcp.js"]
16
+ }
17
+ }
18
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CraftSamo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,201 @@
1
- # Temporary Holding Version
1
+ # agent-github
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ GitHub tools for coding agents: issues, project boards, pull requests,
4
+ repositories, releases and Actions. One implementation, delivered to each
5
+ agent harness in the form that suits it best.
6
+
7
+ | Harness | Delivery | Pinned by |
8
+ | -------------- | ------------------------------------------------ | --------------------------------------------- |
9
+ | OpenCode V2 | native plugin (npm package, with skills) | the version in the package |
10
+ | OpenCode V1 | native plugin (npm package, no skills) | the version in the package |
11
+ | Claude Code | plugin: MCP server and skills | the release tag, as the ref |
12
+ | Codex | plugin: MCP server and skills | the release tag, as the ref |
13
+ | Grok Build | plugin: MCP server and skills | the release tag, as `@ref` |
14
+ | Antigravity | plugin: MCP server and skills (not yet verified) | the release tag's tree URL (not yet verified) |
15
+ | Hermes Agent | native plugin (Python, calls the command line) | the release commit, as the SHA |
16
+ | other MCP host | MCP server from npm | the version in the package |
17
+
18
+ The tools need [Node.js](https://nodejs.org/) 24 or later and the
19
+ [GitHub CLI](https://cli.github.com/), authenticated as you.
20
+ [`docs/conventions.md`](docs/conventions.md) describes how the tools are named
21
+ and how they behave.
22
+
23
+ ## Install
24
+
25
+ Install from a release, never from the default branch: a release is a tag whose
26
+ commit carries the built `dist/`, and the default branch does not. In the
27
+ commands below, `<version>` is a release's version (`1.2.3`) and `<sha>` is the
28
+ commit its tag names:
29
+
30
+ ```sh
31
+ gh api repos/craftsamo/agent-github/commits/v<version> --jq .sha
32
+ ```
33
+
34
+ ### OpenCode
35
+
36
+ OpenCode V2 takes the package and its options in `opencode.json`:
37
+
38
+ ```json
39
+ {
40
+ "plugins": [
41
+ {
42
+ "package": "@craftsamo/agent-github@<version>",
43
+ "options": { "toolsets": ["issues", "pull_requests", "projects"] }
44
+ }
45
+ ]
46
+ }
47
+ ```
48
+
49
+ OpenCode V1 takes the package as a string, or as a pair with its options:
50
+
51
+ ```json
52
+ {
53
+ "plugin": [["@craftsamo/agent-github@<version>", { "toolsets": ["issues", "pull_requests", "projects"] }]]
54
+ }
55
+ ```
56
+
57
+ V1 registers no skills. Unpack the package (`npm pack @craftsamo/agent-github@<version>`)
58
+ and copy its `skills/*` folders into `~/.config/opencode/skills/`.
59
+
60
+ ### Claude Code
61
+
62
+ ```sh
63
+ claude plugin marketplace add craftsamo/agent-github#v<version>
64
+ claude plugin install agent-github@craftsamo
65
+ ```
66
+
67
+ ### Codex
68
+
69
+ ```sh
70
+ codex plugin marketplace add craftsamo/agent-github --ref v<version>
71
+ codex plugin add agent-github@craftsamo
72
+ ```
73
+
74
+ ### Grok Build
75
+
76
+ ```sh
77
+ grok plugin install craftsamo/agent-github@v<version> --trust
78
+ ```
79
+
80
+ ### Antigravity
81
+
82
+ Install from the tree of the release tag, never from the default branch, which
83
+ has no built `dist/`. The pinning and the install command are not yet verified
84
+ on a real install.
85
+
86
+ ```sh
87
+ agy plugin install https://github.com/craftsamo/agent-github/tree/v<version>
88
+ ```
89
+
90
+ ### Hermes Agent
91
+
92
+ Hermes installs a commit, not a tag:
93
+
94
+ ```sh
95
+ hermes plugins install craftsamo/agent-github --ref <sha>
96
+ ```
97
+
98
+ ### Any other MCP host
99
+
100
+ Add the server to the host's MCP configuration. Flags go in `args`:
101
+
102
+ ```json
103
+ {
104
+ "mcpServers": {
105
+ "github": {
106
+ "command": "npx",
107
+ "args": ["-y", "@craftsamo/agent-github@<version>", "--toolsets", "issues,pull_requests,projects"]
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ ## Tools and skills
114
+
115
+ Each toolset comes with a skill that tells an agent how to use its tools.
116
+
117
+ ### Issues (`issues`)
118
+
119
+ | Tool | What it does | Class |
120
+ | ---------------------- | ----------------------------------------------------------------------------------------- | ---------- |
121
+ | `github_issue_read` | `view` one issue in full, or `list` a repository's issues or a parent's sub-issues | read |
122
+ | `github_issue_create` | create an issue with its kind, labels, assignees, milestone, parent and blocked-by issues | add |
123
+ | `github_issue_edit` | change the title, body (or append to it), kind, labels, assignees or milestone | overwrite |
124
+ | `github_issue_comment` | comment on an issue | add |
125
+ | `github_issue_close` | close with a reason (`completed`, `not_planned`, `duplicate`) | overwrite |
126
+ | `github_issue_reopen` | reopen a closed issue | overwrite |
127
+ | `github_issue_relate` | set the parent, sub-issues, blocked-by and blocking issues, sending only what differs | idempotent |
128
+ | `github_issue_develop` | create a branch on GitHub linked to the issue, or return the one already linked | idempotent |
129
+
130
+ The skill is [`github-issues`](skills/github-issues/SKILL.md). An issue's kind
131
+ is the organization's Issue Type of that name when it defines one, otherwise a
132
+ `type:<kind>` label.
133
+
134
+ ## Read tools without asking
135
+
136
+ Every read tool is named `github_<domain>_read`. Writes are confirmed by the
137
+ harness.
138
+
139
+ | Harness | Reads without asking |
140
+ | ----------- | -------------------------------------------------------------------------------------------------------------------------------- |
141
+ | OpenCode | always; the plugin asks only before a write |
142
+ | Claude Code | `permissions.allow` rule `mcp__plugin_agent-github_github__*_read`; a glob is allowed after the literal `mcp__<server>__` prefix |
143
+ | Codex | always; Codex runs tools that declare `readOnlyHint` unasked, as the read tools do |
144
+ | Grok Build | `grok --allow 'MCPTool(github__*_read)'` |
145
+ | Antigravity | an Allow rule `mcp(github/<tool>)` for each read tool; not yet verified |
146
+ | Hermes | always; the plugin asks only before a write |
147
+
148
+ ## Settings
149
+
150
+ Every entry point takes the same settings. A flag wins over its environment
151
+ variable, and an option or setting wins over the variable too.
152
+
153
+ | Setting | Flag | Variable | Meaning |
154
+ | --------------- | ----------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------- |
155
+ | `toolsets` | `--toolsets` | `AGENT_GITHUB_TOOLSETS` | `issues`, `pull_requests`, `projects`, `repos`, `releases`, `actions` or `all`; default `issues` and `pull_requests` |
156
+ | `read_only` | `--read-only` | `AGENT_GITHUB_READ_ONLY` | registers no tool that writes; wins over every other setting |
157
+ | `tools` | `--tools` | `AGENT_GITHUB_TOOLS` | single tools to add by ID, whatever their toolset |
158
+ | `exclude_tools` | `--exclude-tools` | `AGENT_GITHUB_EXCLUDE_TOOLS` | single tools to remove by ID; wins over `tools` and `toolsets` |
159
+ | `confirm` | `--confirm` | `AGENT_GITHUB_CONFIRM` | MCP server only: `harness` (default) or `elicitation`, as `docs/conventions.md` describes |
160
+
161
+ Lists are comma-separated in a flag or a variable. Where each harness reads them:
162
+
163
+ - **OpenCode** takes the plugin `options` shown above, with lists as arrays and
164
+ `read_only` as a boolean.
165
+ - **Hermes** takes `plugins.entries.agent-github.settings` in `config.yaml`:
166
+
167
+ ```yaml
168
+ plugins:
169
+ entries:
170
+ agent-github:
171
+ settings:
172
+ toolsets: [issues, pull_requests, projects]
173
+ read_only: false
174
+ exclude_tools: [github_pr_merge]
175
+ ```
176
+
177
+ - **The plugins for Claude Code, Codex, Grok Build and Antigravity** start the
178
+ server without flags, so set the variables in the environment the harness runs
179
+ in, or use the MCP configuration above, which takes flags.
180
+
181
+ ## Layout
182
+
183
+ - `src/core/` — the tools, free of any harness.
184
+ - `src/mcp/` — the MCP server, built to `dist/mcp.js` and run by `agent-github`.
185
+ - `src/opencode/` — the OpenCode plugin, built to `dist/opencode.js`.
186
+ - `src/cli/` — the command line the Hermes plugin calls, built to `dist/cli.js`
187
+ and run by `agent-github-cli`.
188
+ - `src/hermes/`, `plugin.yaml` and `__init__.py` — the Hermes plugin.
189
+ - `skills/` — one skill per toolset, `skills/<name>/SKILL.md`, which every
190
+ harness that takes skills loads from the package or plugin root.
191
+ - `plugin.json`, `mcp.json`, `.claude-plugin/`, `.agents/plugins/`,
192
+ `.antigravity-plugin/` and `mcp_config.json` — the plugin manifests of the
193
+ other harnesses. Claude Code's server is declared inside
194
+ `.claude-plugin/plugin.json`, since a `.mcp.json` in the repository root would
195
+ be read as this project's own MCP configuration.
196
+
197
+ How a release is made is in [`RELEASING.md`](RELEASING.md).
198
+
199
+ ## License
200
+
201
+ [MIT](LICENSE)
package/__init__.py ADDED
@@ -0,0 +1,36 @@
1
+ """Loads the plugin package from ``src/hermes/agent_github_hermes`` for Hermes, which imports this file.
2
+
3
+ The package is loaded as ``<this module's name>._impl``, so Hermes, which evicts
4
+ everything under a plugin's module name when it reloads it or loads it for another
5
+ profile, evicts the package too, and each install path gets a package of its own.
6
+ """
7
+
8
+ import importlib.util
9
+ import sys
10
+ from pathlib import Path
11
+
12
+ _NAME = f"{__name__}._impl"
13
+ _PACKAGE_DIR = Path(__file__).resolve().parent / "src" / "hermes" / "agent_github_hermes"
14
+
15
+
16
+ def _evict() -> None:
17
+ """Drop the package and its submodules from ``sys.modules``."""
18
+ for name in list(sys.modules):
19
+ if name == _NAME or name.startswith(f"{_NAME}."):
20
+ sys.modules.pop(name, None)
21
+
22
+
23
+ _spec = importlib.util.spec_from_file_location(
24
+ _NAME, _PACKAGE_DIR / "__init__.py", submodule_search_locations=[str(_PACKAGE_DIR)]
25
+ )
26
+ _module = importlib.util.module_from_spec(_spec)
27
+ _evict()
28
+ sys.modules[_NAME] = _module
29
+ try:
30
+ _spec.loader.exec_module(_module)
31
+ except BaseException:
32
+ _evict()
33
+ raise
34
+
35
+ register = _module.register
36
+ __all__ = ["register"]