@opentabs-dev/opentabs-plugin-github 0.0.76 → 0.0.77
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 +75 -129
- package/dist/adapter.iife.js +1149 -663
- package/dist/adapter.iife.js.map +4 -4
- package/dist/github-api.d.ts +16 -10
- package/dist/github-api.d.ts.map +1 -1
- package/dist/github-api.js +314 -112
- package/dist/github-api.js.map +1 -1
- package/dist/tools/add-reaction.d.ts +5 -9
- package/dist/tools/add-reaction.d.ts.map +1 -1
- package/dist/tools/add-reaction.js +29 -31
- package/dist/tools/add-reaction.js.map +1 -1
- package/dist/tools/compare-commits.d.ts +2 -8
- package/dist/tools/compare-commits.d.ts.map +1 -1
- package/dist/tools/compare-commits.js +32 -34
- package/dist/tools/compare-commits.js.map +1 -1
- package/dist/tools/create-comment.d.ts +1 -8
- package/dist/tools/create-comment.d.ts.map +1 -1
- package/dist/tools/create-comment.js +21 -5
- package/dist/tools/create-comment.js.map +1 -1
- package/dist/tools/create-issue.d.ts +0 -2
- package/dist/tools/create-issue.d.ts.map +1 -1
- package/dist/tools/create-issue.js +32 -15
- package/dist/tools/create-issue.js.map +1 -1
- package/dist/tools/create-label.d.ts.map +1 -1
- package/dist/tools/create-label.js +20 -12
- package/dist/tools/create-label.js.map +1 -1
- package/dist/tools/create-or-update-file.d.ts +1 -4
- package/dist/tools/create-or-update-file.d.ts.map +1 -1
- package/dist/tools/create-or-update-file.js +23 -23
- package/dist/tools/create-or-update-file.js.map +1 -1
- package/dist/tools/create-pull-request.d.ts.map +1 -1
- package/dist/tools/create-pull-request.js +37 -16
- package/dist/tools/create-pull-request.js.map +1 -1
- package/dist/tools/create-release.d.ts.map +1 -1
- package/dist/tools/create-release.js +29 -19
- package/dist/tools/create-release.js.map +1 -1
- package/dist/tools/create-repo.d.ts.map +1 -1
- package/dist/tools/create-repo.js +33 -18
- package/dist/tools/create-repo.js.map +1 -1
- package/dist/tools/delete-file.d.ts +1 -6
- package/dist/tools/delete-file.d.ts.map +1 -1
- package/dist/tools/delete-file.js +8 -25
- package/dist/tools/delete-file.js.map +1 -1
- package/dist/tools/get-file-content.d.ts.map +1 -1
- package/dist/tools/get-file-content.js +5 -9
- package/dist/tools/get-file-content.js.map +1 -1
- package/dist/tools/get-issue.d.ts.map +1 -1
- package/dist/tools/get-issue.js +25 -4
- package/dist/tools/get-issue.js.map +1 -1
- package/dist/tools/get-pull-request-diff.d.ts.map +1 -1
- package/dist/tools/get-pull-request-diff.js +19 -5
- package/dist/tools/get-pull-request-diff.js.map +1 -1
- package/dist/tools/get-pull-request.d.ts.map +1 -1
- package/dist/tools/get-pull-request.js +32 -3
- package/dist/tools/get-pull-request.js.map +1 -1
- package/dist/tools/get-repo.d.ts.map +1 -1
- package/dist/tools/get-repo.js +21 -4
- package/dist/tools/get-repo.js.map +1 -1
- package/dist/tools/get-user-profile.d.ts.map +1 -1
- package/dist/tools/get-user-profile.js +15 -2
- package/dist/tools/get-user-profile.js.map +1 -1
- package/dist/tools/get-workflow-run.d.ts.map +1 -1
- package/dist/tools/get-workflow-run.js +28 -5
- package/dist/tools/get-workflow-run.js.map +1 -1
- package/dist/tools/list-branches.d.ts +0 -2
- package/dist/tools/list-branches.d.ts.map +1 -1
- package/dist/tools/list-branches.js +3 -9
- package/dist/tools/list-branches.js.map +1 -1
- package/dist/tools/list-comments.d.ts +0 -2
- package/dist/tools/list-comments.d.ts.map +1 -1
- package/dist/tools/list-comments.js +33 -10
- package/dist/tools/list-comments.js.map +1 -1
- package/dist/tools/list-commits.d.ts +0 -2
- package/dist/tools/list-commits.d.ts.map +1 -1
- package/dist/tools/list-commits.js +8 -13
- package/dist/tools/list-commits.js.map +1 -1
- package/dist/tools/list-issues.d.ts +2 -2
- package/dist/tools/list-issues.d.ts.map +1 -1
- package/dist/tools/list-issues.js +43 -16
- package/dist/tools/list-issues.js.map +1 -1
- package/dist/tools/list-labels.d.ts +0 -2
- package/dist/tools/list-labels.d.ts.map +1 -1
- package/dist/tools/list-labels.js +18 -10
- package/dist/tools/list-labels.js.map +1 -1
- package/dist/tools/list-notifications.d.ts +1 -6
- package/dist/tools/list-notifications.d.ts.map +1 -1
- package/dist/tools/list-notifications.js +30 -23
- package/dist/tools/list-notifications.js.map +1 -1
- package/dist/tools/list-org-members.d.ts +0 -3
- package/dist/tools/list-org-members.d.ts.map +1 -1
- package/dist/tools/list-org-members.js +24 -18
- package/dist/tools/list-org-members.js.map +1 -1
- package/dist/tools/list-pull-request-files.d.ts +0 -3
- package/dist/tools/list-pull-request-files.d.ts.map +1 -1
- package/dist/tools/list-pull-request-files.js +6 -28
- package/dist/tools/list-pull-request-files.js.map +1 -1
- package/dist/tools/list-pull-requests.d.ts +2 -4
- package/dist/tools/list-pull-requests.d.ts.map +1 -1
- package/dist/tools/list-pull-requests.js +34 -18
- package/dist/tools/list-pull-requests.js.map +1 -1
- package/dist/tools/list-releases.d.ts +0 -2
- package/dist/tools/list-releases.d.ts.map +1 -1
- package/dist/tools/list-releases.js +37 -10
- package/dist/tools/list-releases.js.map +1 -1
- package/dist/tools/list-repos.d.ts +0 -7
- package/dist/tools/list-repos.d.ts.map +1 -1
- package/dist/tools/list-repos.js +18 -23
- package/dist/tools/list-repos.js.map +1 -1
- package/dist/tools/list-workflow-runs.d.ts +0 -21
- package/dist/tools/list-workflow-runs.d.ts.map +1 -1
- package/dist/tools/list-workflow-runs.js +32 -43
- package/dist/tools/list-workflow-runs.js.map +1 -1
- package/dist/tools/merge-pull-request.d.ts +1 -3
- package/dist/tools/merge-pull-request.d.ts.map +1 -1
- package/dist/tools/merge-pull-request.js +11 -15
- package/dist/tools/merge-pull-request.js.map +1 -1
- package/dist/tools/request-pull-request-review.d.ts +1 -21
- package/dist/tools/request-pull-request-review.d.ts.map +1 -1
- package/dist/tools/request-pull-request-review.js +17 -10
- package/dist/tools/request-pull-request-review.js.map +1 -1
- package/dist/tools/schemas.d.ts +130 -38
- package/dist/tools/schemas.d.ts.map +1 -1
- package/dist/tools/schemas.js +140 -52
- package/dist/tools/schemas.js.map +1 -1
- package/dist/tools/search-issues.d.ts +0 -13
- package/dist/tools/search-issues.d.ts.map +1 -1
- package/dist/tools/search-issues.js +23 -17
- package/dist/tools/search-issues.js.map +1 -1
- package/dist/tools/search-repos.d.ts +0 -10
- package/dist/tools/search-repos.d.ts.map +1 -1
- package/dist/tools/search-repos.js +7 -12
- package/dist/tools/search-repos.js.map +1 -1
- package/dist/tools/update-issue.d.ts +2 -18
- package/dist/tools/update-issue.d.ts.map +1 -1
- package/dist/tools/update-issue.js +19 -16
- package/dist/tools/update-issue.js.map +1 -1
- package/dist/tools/update-pull-request.d.ts +2 -24
- package/dist/tools/update-pull-request.d.ts.map +1 -1
- package/dist/tools/update-pull-request.js +28 -20
- package/dist/tools/update-pull-request.js.map +1 -1
- package/dist/tools.json +70 -747
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -1,159 +1,105 @@
|
|
|
1
|
-
#
|
|
1
|
+
# GitHub
|
|
2
2
|
|
|
3
|
-
OpenTabs plugin for GitHub
|
|
3
|
+
OpenTabs plugin for GitHub — gives AI agents access to GitHub through your authenticated browser session.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
|
+
```bash
|
|
8
|
+
opentabs plugin install github
|
|
7
9
|
```
|
|
8
|
-
github/
|
|
9
|
-
├── package.json # Plugin metadata (name, opentabs field, dependencies)
|
|
10
|
-
├── icon.svg # Optional custom icon (square SVG, max 8KB)
|
|
11
|
-
├── icon-inactive.svg # Optional manual inactive icon override
|
|
12
|
-
├── src/
|
|
13
|
-
│ ├── index.ts # Plugin class (extends OpenTabsPlugin)
|
|
14
|
-
│ └── tools/ # One file per tool (using defineTool)
|
|
15
|
-
│ └── example.ts
|
|
16
|
-
└── dist/ # Build output (generated)
|
|
17
|
-
├── adapter.iife.js # Bundled adapter injected into matching tabs
|
|
18
|
-
└── tools.json # Tool schemas for MCP registration
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Configuration
|
|
22
|
-
|
|
23
|
-
Plugin metadata is defined in `package.json` under the `opentabs` field:
|
|
24
|
-
|
|
25
|
-
```json
|
|
26
|
-
{
|
|
27
|
-
"name": "opentabs-plugin-github",
|
|
28
|
-
"main": "dist/adapter.iife.js",
|
|
29
|
-
"opentabs": {
|
|
30
|
-
"displayName": "GitHub",
|
|
31
|
-
"description": "OpenTabs plugin for GitHub",
|
|
32
|
-
"urlPatterns": ["*://github.com/*"]
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
- **`main`** — entry point for the bundled adapter IIFE
|
|
38
|
-
- **`opentabs.displayName`** — human-readable name shown in the side panel
|
|
39
|
-
- **`opentabs.description`** — short description of what the plugin does
|
|
40
|
-
- **`opentabs.urlPatterns`** — Chrome match patterns for tabs where the adapter is injected
|
|
41
|
-
|
|
42
|
-
## Custom Icons
|
|
43
10
|
|
|
44
|
-
|
|
11
|
+
Or install globally via npm:
|
|
45
12
|
|
|
46
|
-
```
|
|
47
|
-
github
|
|
48
|
-
├── package.json
|
|
49
|
-
├── icon.svg ← custom icon (optional)
|
|
50
|
-
├── icon-inactive.svg ← manual inactive override (optional, requires icon.svg)
|
|
51
|
-
├── src/
|
|
52
|
-
│ └── ...
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g @opentabs-dev/opentabs-plugin-github
|
|
53
15
|
```
|
|
54
16
|
|
|
55
|
-
|
|
17
|
+
## Setup
|
|
56
18
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- If no `icon.svg` is provided, the letter avatar is used automatically
|
|
19
|
+
1. Open [github.com](https://github.com) in Chrome and log in
|
|
20
|
+
2. Open the OpenTabs side panel — the GitHub plugin should appear as **ready**
|
|
60
21
|
|
|
61
|
-
|
|
22
|
+
## Tools (35)
|
|
62
23
|
|
|
63
|
-
|
|
64
|
-
- Maximum 8 KB file size
|
|
65
|
-
- No embedded `<image>`, `<script>`, or event handler attributes (`onclick`, etc.)
|
|
66
|
-
- Manual `icon-inactive.svg` must use only achromatic (grayscale) colors
|
|
24
|
+
### Repositories (11)
|
|
67
25
|
|
|
68
|
-
|
|
26
|
+
| Tool | Description | Type |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| `list_repos` | List repositories for a user or organization | Read |
|
|
29
|
+
| `get_repo` | Get details of a specific repository | Read |
|
|
30
|
+
| `create_repo` | Create a new repository | Write |
|
|
31
|
+
| `list_commits` | List commits for a repository | Read |
|
|
32
|
+
| `compare_commits` | Compare two commits or branches | Write |
|
|
33
|
+
| `list_releases` | List releases for a repository | Read |
|
|
34
|
+
| `create_release` | Create a release in a repository | Write |
|
|
35
|
+
| `list_branches` | List branches for a repository | Read |
|
|
36
|
+
| `get_file_content` | Read a file from a repository | Read |
|
|
37
|
+
| `create_or_update_file` | Create or update a file in a repository | Write |
|
|
38
|
+
| `delete_file` | Delete a file from a repository | Write |
|
|
69
39
|
|
|
70
|
-
|
|
71
|
-
npm install
|
|
72
|
-
npm run build # tsc && opentabs-plugin build
|
|
73
|
-
npm run dev # watch mode (tsc --watch + opentabs-plugin build --watch)
|
|
74
|
-
npm run type-check # tsc --noEmit
|
|
75
|
-
npm run lint # biome
|
|
76
|
-
```
|
|
40
|
+
### Issues (7)
|
|
77
41
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
name: 'my_tool',
|
|
88
|
-
displayName: 'My Tool',
|
|
89
|
-
description: 'What this tool does',
|
|
90
|
-
icon: 'wrench',
|
|
91
|
-
input: z.object({ /* ... */ }),
|
|
92
|
-
output: z.object({ /* ... */ }),
|
|
93
|
-
handle: async (params) => {
|
|
94
|
-
// Tool implementation runs in the browser tab context
|
|
95
|
-
return { /* ... */ };
|
|
96
|
-
},
|
|
97
|
-
});
|
|
98
|
-
```
|
|
42
|
+
| Tool | Description | Type |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| `list_issues` | List issues for a repository | Read |
|
|
45
|
+
| `get_issue` | Get details of a specific issue | Read |
|
|
46
|
+
| `create_issue` | Create a new issue in a repository | Write |
|
|
47
|
+
| `update_issue` | Update an existing issue | Write |
|
|
48
|
+
| `search_issues` | Search issues and pull requests | Read |
|
|
49
|
+
| `list_labels` | List labels for a repository | Read |
|
|
50
|
+
| `create_label` | Create a label in a repository | Write |
|
|
99
51
|
|
|
100
|
-
|
|
52
|
+
### Pull Requests (8)
|
|
101
53
|
|
|
102
|
-
|
|
54
|
+
| Tool | Description | Type |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| `list_pull_requests` | List pull requests for a repository | Read |
|
|
57
|
+
| `get_pull_request` | Get details of a specific pull request | Read |
|
|
58
|
+
| `create_pull_request` | Create a new pull request | Write |
|
|
59
|
+
| `update_pull_request` | Update a pull request | Write |
|
|
60
|
+
| `merge_pull_request` | Merge a pull request | Write |
|
|
61
|
+
| `get_pull_request_diff` | Get the raw diff of a pull request | Read |
|
|
62
|
+
| `list_pull_request_files` | List files changed in a pull request | Read |
|
|
63
|
+
| `request_pull_request_review` | Request reviewers for a pull request | Write |
|
|
103
64
|
|
|
104
|
-
|
|
65
|
+
### Comments (2)
|
|
105
66
|
|
|
106
|
-
|
|
107
|
-
|
|
67
|
+
| Tool | Description | Type |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| `list_comments` | List comments on an issue or pull request | Read |
|
|
70
|
+
| `create_comment` | Add a comment to an issue or pull request | Write |
|
|
108
71
|
|
|
109
|
-
|
|
110
|
-
const token = getLocalStorage('token');
|
|
72
|
+
### Users (3)
|
|
111
73
|
|
|
112
|
-
|
|
113
|
-
|
|
74
|
+
| Tool | Description | Type |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| `get_user_profile` | Get a user's profile information | Read |
|
|
77
|
+
| `list_org_members` | List members of an organization | Read |
|
|
78
|
+
| `list_notifications` | List notifications for the authenticated user | Read |
|
|
114
79
|
|
|
115
|
-
|
|
116
|
-
const appState = getPageGlobal('__APP_STATE__');
|
|
117
|
-
```
|
|
80
|
+
### Actions (2)
|
|
118
81
|
|
|
119
|
-
|
|
82
|
+
| Tool | Description | Type |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| `list_workflow_runs` | List GitHub Actions workflow runs | Read |
|
|
85
|
+
| `get_workflow_run` | Get a workflow run by ID | Read |
|
|
120
86
|
|
|
121
|
-
|
|
87
|
+
### Search (1)
|
|
122
88
|
|
|
123
|
-
|
|
89
|
+
| Tool | Description | Type |
|
|
90
|
+
|---|---|---|
|
|
91
|
+
| `search_repos` | Search repositories on GitHub | Read |
|
|
124
92
|
|
|
125
|
-
|
|
93
|
+
### Reactions (1)
|
|
126
94
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
95
|
+
| Tool | Description | Type |
|
|
96
|
+
|---|---|---|
|
|
97
|
+
| `add_reaction` | Add a reaction to an issue or comment | Write |
|
|
130
98
|
|
|
131
|
-
|
|
132
|
-
id: z.string().describe('Channel ID'),
|
|
133
|
-
name: z.string().describe('Channel name'),
|
|
134
|
-
});
|
|
99
|
+
## How It Works
|
|
135
100
|
|
|
136
|
-
|
|
137
|
-
```
|
|
101
|
+
This plugin runs inside your GitHub tab through the [OpenTabs](https://opentabs.dev) Chrome extension. It uses your existing browser session — no API tokens or OAuth apps required. All operations happen as you, with your permissions.
|
|
138
102
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
```ts
|
|
142
|
-
// src/tools/list-channels.ts
|
|
143
|
-
import { channelSchema } from '../schemas/channel.js';
|
|
144
|
-
|
|
145
|
-
export const listChannels = defineTool({
|
|
146
|
-
name: 'list_channels',
|
|
147
|
-
displayName: 'List Channels',
|
|
148
|
-
description: 'List all available channels',
|
|
149
|
-
icon: 'list',
|
|
150
|
-
input: z.object({}),
|
|
151
|
-
output: z.object({ channels: z.array(channelSchema) }),
|
|
152
|
-
handle: async () => {
|
|
153
|
-
// ...
|
|
154
|
-
return { channels: [] };
|
|
155
|
-
},
|
|
156
|
-
});
|
|
157
|
-
```
|
|
103
|
+
## License
|
|
158
104
|
|
|
159
|
-
|
|
105
|
+
MIT
|