@opentabs-dev/opentabs-plugin-gitlab 0.0.75 → 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
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# GitLab
|
|
2
|
+
|
|
3
|
+
OpenTabs plugin for GitLab — gives AI agents access to GitLab through your authenticated browser session.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
opentabs plugin install gitlab
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or install globally via npm:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g @opentabs-dev/opentabs-plugin-gitlab
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Setup
|
|
18
|
+
|
|
19
|
+
1. Open [gitlab.com](https://gitlab.com) in Chrome and log in
|
|
20
|
+
2. Open the OpenTabs side panel — the GitLab plugin should appear as **ready**
|
|
21
|
+
|
|
22
|
+
## Tools (22)
|
|
23
|
+
|
|
24
|
+
### Projects (2)
|
|
25
|
+
|
|
26
|
+
| Tool | Description | Type |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| `list_projects` | List accessible projects | Read |
|
|
29
|
+
| `get_project` | Get project details | Read |
|
|
30
|
+
|
|
31
|
+
### Search (1)
|
|
32
|
+
|
|
33
|
+
| Tool | Description | Type |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| `search_projects` | Search for projects | Read |
|
|
36
|
+
|
|
37
|
+
### Issues (4)
|
|
38
|
+
|
|
39
|
+
| Tool | Description | Type |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| `list_issues` | List issues for a project | Read |
|
|
42
|
+
| `get_issue` | Get issue details | Read |
|
|
43
|
+
| `create_issue` | Create a new issue | Write |
|
|
44
|
+
| `update_issue` | Update an issue | Write |
|
|
45
|
+
|
|
46
|
+
### Merge Requests (6)
|
|
47
|
+
|
|
48
|
+
| Tool | Description | Type |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| `list_merge_requests` | List merge requests for a project | Read |
|
|
51
|
+
| `get_merge_request` | Get merge request details | Read |
|
|
52
|
+
| `create_merge_request` | Create a new merge request | Write |
|
|
53
|
+
| `update_merge_request` | Update a merge request | Write |
|
|
54
|
+
| `merge_merge_request` | Merge a merge request | Write |
|
|
55
|
+
| `get_merge_request_diff` | Get the diff of a merge request | Read |
|
|
56
|
+
|
|
57
|
+
### Notes (2)
|
|
58
|
+
|
|
59
|
+
| Tool | Description | Type |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| `list_notes` | List notes on an issue or merge request | Read |
|
|
62
|
+
| `create_note` | Add a comment to an issue or MR | Write |
|
|
63
|
+
|
|
64
|
+
### Branches (1)
|
|
65
|
+
|
|
66
|
+
| Tool | Description | Type |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| `list_branches` | List branches for a project | Read |
|
|
69
|
+
|
|
70
|
+
### Content (2)
|
|
71
|
+
|
|
72
|
+
| Tool | Description | Type |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| `get_file_content` | Read a file from a repository | Read |
|
|
75
|
+
| `list_commits` | List commits for a project | Read |
|
|
76
|
+
|
|
77
|
+
### CI/CD (3)
|
|
78
|
+
|
|
79
|
+
| Tool | Description | Type |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| `list_pipelines` | List CI/CD pipelines | Read |
|
|
82
|
+
| `list_pipeline_jobs` | List jobs for a pipeline | Read |
|
|
83
|
+
| `get_job_log` | Get the log output of a job | Read |
|
|
84
|
+
|
|
85
|
+
### Users (1)
|
|
86
|
+
|
|
87
|
+
| Tool | Description | Type |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| `get_user_profile` | Get a user profile | Read |
|
|
90
|
+
|
|
91
|
+
## How It Works
|
|
92
|
+
|
|
93
|
+
This plugin runs inside your GitLab 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.
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
MIT
|
package/dist/adapter.iife.js
CHANGED
|
@@ -292,6 +292,8 @@
|
|
|
292
292
|
* (e.g., 'https://github.com'), not a match pattern.
|
|
293
293
|
*/
|
|
294
294
|
homepage;
|
|
295
|
+
/** Typed configuration schema — declares settings that users provide via config.json or the side panel. */
|
|
296
|
+
configSchema;
|
|
295
297
|
};
|
|
296
298
|
|
|
297
299
|
// src/gitlab-api.ts
|
|
@@ -15147,21 +15149,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15147
15149
|
};
|
|
15148
15150
|
var src_default = new GitLabPlugin();
|
|
15149
15151
|
|
|
15150
|
-
// dist/
|
|
15152
|
+
// dist/_adapter_entry_a68c70ee-1ff1-4b89-9d91-867b208ffbcb.ts
|
|
15151
15153
|
if (!globalThis.__openTabs) {
|
|
15152
15154
|
globalThis.__openTabs = {};
|
|
15153
15155
|
} else {
|
|
15154
15156
|
const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
|
|
15155
15157
|
if (desc && !desc.writable) {
|
|
15156
|
-
const
|
|
15158
|
+
const ot3 = globalThis.__openTabs;
|
|
15157
15159
|
const newAdaptersObj = {};
|
|
15158
|
-
if (
|
|
15159
|
-
for (const key of Object.keys(
|
|
15160
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
15160
|
+
if (ot3.adapters) {
|
|
15161
|
+
for (const key of Object.keys(ot3.adapters)) {
|
|
15162
|
+
const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
|
|
15161
15163
|
if (d) Object.defineProperty(newAdaptersObj, key, d);
|
|
15162
15164
|
}
|
|
15163
15165
|
}
|
|
15164
|
-
globalThis.__openTabs = Object.assign({},
|
|
15166
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
|
|
15165
15167
|
}
|
|
15166
15168
|
}
|
|
15167
15169
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -15199,6 +15201,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15199
15201
|
}
|
|
15200
15202
|
};
|
|
15201
15203
|
var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
|
|
15204
|
+
var ot2 = globalThis.__openTabs;
|
|
15205
|
+
ot2._notifyReadinessChanged = () => {
|
|
15206
|
+
try {
|
|
15207
|
+
const nonce = globalThis.__openTabs?._readinessNonce;
|
|
15208
|
+
if (nonce) {
|
|
15209
|
+
window.postMessage({ type: "opentabs:readiness-changed", plugin: "gitlab", nonce }, "*");
|
|
15210
|
+
}
|
|
15211
|
+
} catch {
|
|
15212
|
+
}
|
|
15213
|
+
};
|
|
15202
15214
|
var existing = adapters["gitlab"];
|
|
15203
15215
|
if (existing) {
|
|
15204
15216
|
if (typeof existing.teardown === "function") {
|
|
@@ -15210,7 +15222,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15210
15222
|
}
|
|
15211
15223
|
}
|
|
15212
15224
|
if (!Reflect.deleteProperty(adapters, "gitlab")) {
|
|
15213
|
-
const
|
|
15225
|
+
const ot3 = globalThis.__openTabs;
|
|
15214
15226
|
const newAdapters = {};
|
|
15215
15227
|
for (const key of Object.keys(adapters)) {
|
|
15216
15228
|
if (key !== "gitlab") {
|
|
@@ -15218,7 +15230,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15218
15230
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
15219
15231
|
}
|
|
15220
15232
|
}
|
|
15221
|
-
globalThis.__openTabs = Object.assign({},
|
|
15233
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
|
|
15222
15234
|
}
|
|
15223
15235
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
15224
15236
|
for (const tool of src_default.tools) {
|
|
@@ -15279,12 +15291,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15279
15291
|
}
|
|
15280
15292
|
}
|
|
15281
15293
|
};
|
|
15282
|
-
const
|
|
15283
|
-
if (!
|
|
15294
|
+
const ot3 = globalThis.__openTabs;
|
|
15295
|
+
if (!ot3._navigationInterceptor) {
|
|
15284
15296
|
const origPushState = history.pushState.bind(history);
|
|
15285
15297
|
const origReplaceState = history.replaceState.bind(history);
|
|
15286
15298
|
const callbacks = /* @__PURE__ */ new Map();
|
|
15287
|
-
|
|
15299
|
+
ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
15288
15300
|
history.pushState = function(...args) {
|
|
15289
15301
|
origPushState(...args);
|
|
15290
15302
|
for (const cb of callbacks.values()) {
|
|
@@ -15298,7 +15310,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15298
15310
|
}
|
|
15299
15311
|
};
|
|
15300
15312
|
}
|
|
15301
|
-
const interceptor =
|
|
15313
|
+
const interceptor = ot3._navigationInterceptor;
|
|
15302
15314
|
interceptor.callbacks.set("gitlab", checkUrl);
|
|
15303
15315
|
window.addEventListener("popstate", checkUrl);
|
|
15304
15316
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -15353,5 +15365,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15353
15365
|
};
|
|
15354
15366
|
delete src_default.onDeactivate;
|
|
15355
15367
|
}
|
|
15356
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["gitlab"]){var a=o.adapters["gitlab"];a.__adapterHash="
|
|
15368
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["gitlab"]){var a=o.adapters["gitlab"];a.__adapterHash="baa38a9d5d4fefcf20756a016a7a0eab9a1e2bb12214c23a09ec334c6e8b4efb";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"gitlab",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15357
15369
|
//# sourceMappingURL=adapter.iife.js.map
|