@opentabs-dev/opentabs-plugin-google-cloud 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 +81 -125
- package/dist/adapter.iife.js +25 -13
- package/dist/adapter.iife.js.map +3 -3
- package/dist/tools.json +1 -1
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -1,159 +1,115 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Google Cloud
|
|
2
2
|
|
|
3
|
-
OpenTabs plugin for Google Cloud Console
|
|
3
|
+
OpenTabs plugin for Google Cloud Console — gives AI agents access to Google Cloud through your authenticated browser session.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
google-cloud
|
|
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
|
|
7
|
+
```bash
|
|
8
|
+
opentabs plugin install google-cloud
|
|
19
9
|
```
|
|
20
10
|
|
|
21
|
-
|
|
11
|
+
Or install globally via npm:
|
|
22
12
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
```json
|
|
26
|
-
{
|
|
27
|
-
"name": "opentabs-plugin-google-cloud",
|
|
28
|
-
"main": "dist/adapter.iife.js",
|
|
29
|
-
"opentabs": {
|
|
30
|
-
"displayName": "Google Cloud",
|
|
31
|
-
"description": "OpenTabs plugin for Google Cloud Console",
|
|
32
|
-
"urlPatterns": ["*://*.console.cloud.google.com/*"]
|
|
33
|
-
}
|
|
34
|
-
}
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g @opentabs-dev/opentabs-plugin-google-cloud
|
|
35
15
|
```
|
|
36
16
|
|
|
37
|
-
|
|
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
|
|
17
|
+
## Setup
|
|
41
18
|
|
|
42
|
-
|
|
19
|
+
1. Open [console.cloud.google.com](https://console.cloud.google.com) in Chrome and log in
|
|
20
|
+
2. Open the OpenTabs side panel — the Google Cloud plugin should appear as **ready**
|
|
43
21
|
|
|
44
|
-
|
|
22
|
+
## Tools (30)
|
|
45
23
|
|
|
46
|
-
|
|
47
|
-
google-cloud/
|
|
48
|
-
├── package.json
|
|
49
|
-
├── icon.svg ← custom icon (optional)
|
|
50
|
-
├── icon-inactive.svg ← manual inactive override (optional, requires icon.svg)
|
|
51
|
-
├── src/
|
|
52
|
-
│ └── ...
|
|
53
|
-
```
|
|
24
|
+
### Projects (3)
|
|
54
25
|
|
|
55
|
-
|
|
26
|
+
| Tool | Description | Type |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| `get_current_project` | Get the active project from the console URL | Read |
|
|
29
|
+
| `list_projects` | List accessible GCP projects | Read |
|
|
30
|
+
| `get_project` | Get details about a GCP project | Read |
|
|
56
31
|
|
|
57
|
-
|
|
58
|
-
- To override the auto-generated inactive icon, provide `icon-inactive.svg` (must use only grayscale colors)
|
|
59
|
-
- If no `icon.svg` is provided, the letter avatar is used automatically
|
|
32
|
+
### Compute (7)
|
|
60
33
|
|
|
61
|
-
|
|
34
|
+
| Tool | Description | Type |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `list_instances` | List Compute Engine VM instances | Read |
|
|
37
|
+
| `get_instance` | Get a Compute Engine VM instance | Read |
|
|
38
|
+
| `start_instance` | Start a stopped VM instance | Write |
|
|
39
|
+
| `stop_instance` | Stop a running VM instance | Write |
|
|
40
|
+
| `list_disks` | List persistent disks | Read |
|
|
41
|
+
| `list_networks` | List VPC networks | Read |
|
|
42
|
+
| `list_firewalls` | List firewall rules | Read |
|
|
62
43
|
|
|
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
|
|
44
|
+
### Storage (3)
|
|
67
45
|
|
|
68
|
-
|
|
46
|
+
| Tool | Description | Type |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `list_buckets` | List Cloud Storage buckets | Read |
|
|
49
|
+
| `get_bucket` | Get a Cloud Storage bucket | Read |
|
|
50
|
+
| `list_objects` | List objects in a storage bucket | Read |
|
|
69
51
|
|
|
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
|
-
```
|
|
52
|
+
### IAM (3)
|
|
77
53
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
import { z } from 'zod';
|
|
84
|
-
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
85
|
-
|
|
86
|
-
export const myTool = defineTool({
|
|
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
|
-
```
|
|
54
|
+
| Tool | Description | Type |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| `list_service_accounts` | List IAM service accounts | Read |
|
|
57
|
+
| `list_iam_roles` | List custom IAM roles | Read |
|
|
58
|
+
| `get_iam_policy` | Get the project IAM policy | Read |
|
|
99
59
|
|
|
100
|
-
|
|
60
|
+
### Services (3)
|
|
101
61
|
|
|
102
|
-
|
|
62
|
+
| Tool | Description | Type |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| `list_enabled_services` | List enabled API services | Read |
|
|
65
|
+
| `enable_service` | Enable a GCP API service | Write |
|
|
66
|
+
| `disable_service` | Disable a GCP API service | Write |
|
|
103
67
|
|
|
104
|
-
|
|
68
|
+
### Cloud Functions (2)
|
|
105
69
|
|
|
106
|
-
|
|
107
|
-
|
|
70
|
+
| Tool | Description | Type |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| `list_functions` | List Cloud Functions | Read |
|
|
73
|
+
| `get_function` | Get a Cloud Function | Read |
|
|
108
74
|
|
|
109
|
-
|
|
110
|
-
const token = getLocalStorage('token');
|
|
75
|
+
### Cloud Run (2)
|
|
111
76
|
|
|
112
|
-
|
|
113
|
-
|
|
77
|
+
| Tool | Description | Type |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| `list_cloud_run_services` | List Cloud Run services | Read |
|
|
80
|
+
| `get_cloud_run_service` | Get a Cloud Run service | Read |
|
|
114
81
|
|
|
115
|
-
|
|
116
|
-
const appState = getPageGlobal('__APP_STATE__');
|
|
117
|
-
```
|
|
82
|
+
### Logging (1)
|
|
118
83
|
|
|
119
|
-
|
|
84
|
+
| Tool | Description | Type |
|
|
85
|
+
|---|---|---|
|
|
86
|
+
| `list_log_entries` | List Cloud Logging entries | Read |
|
|
120
87
|
|
|
121
|
-
|
|
88
|
+
### Billing (2)
|
|
122
89
|
|
|
123
|
-
|
|
90
|
+
| Tool | Description | Type |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| `list_billing_accounts` | List billing accounts | Read |
|
|
93
|
+
| `get_billing_info` | Get project billing info | Read |
|
|
124
94
|
|
|
125
|
-
|
|
95
|
+
### Kubernetes (2)
|
|
126
96
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
97
|
+
| Tool | Description | Type |
|
|
98
|
+
|---|---|---|
|
|
99
|
+
| `list_clusters` | List GKE clusters | Read |
|
|
100
|
+
| `get_cluster` | Get a GKE cluster | Read |
|
|
130
101
|
|
|
131
|
-
|
|
132
|
-
id: z.string().describe('Channel ID'),
|
|
133
|
-
name: z.string().describe('Channel name'),
|
|
134
|
-
});
|
|
102
|
+
### Cloud SQL (2)
|
|
135
103
|
|
|
136
|
-
|
|
137
|
-
|
|
104
|
+
| Tool | Description | Type |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| `list_sql_instances` | List Cloud SQL instances | Read |
|
|
107
|
+
| `get_sql_instance` | Get a Cloud SQL instance | Read |
|
|
138
108
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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
|
-
```
|
|
109
|
+
## How It Works
|
|
110
|
+
|
|
111
|
+
This plugin runs inside your Google Cloud 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.
|
|
112
|
+
|
|
113
|
+
## License
|
|
158
114
|
|
|
159
|
-
|
|
115
|
+
MIT
|
package/dist/adapter.iife.js
CHANGED
|
@@ -317,6 +317,8 @@
|
|
|
317
317
|
* (e.g., 'https://github.com'), not a match pattern.
|
|
318
318
|
*/
|
|
319
319
|
homepage;
|
|
320
|
+
/** Typed configuration schema — declares settings that users provide via config.json or the side panel. */
|
|
321
|
+
configSchema;
|
|
320
322
|
};
|
|
321
323
|
|
|
322
324
|
// src/gcloud-api.ts
|
|
@@ -15336,21 +15338,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15336
15338
|
};
|
|
15337
15339
|
var src_default = new GoogleCloudPlugin();
|
|
15338
15340
|
|
|
15339
|
-
// dist/
|
|
15341
|
+
// dist/_adapter_entry_3d02844b-3ae4-4cc9-9d5b-b6c12b02cb22.ts
|
|
15340
15342
|
if (!globalThis.__openTabs) {
|
|
15341
15343
|
globalThis.__openTabs = {};
|
|
15342
15344
|
} else {
|
|
15343
15345
|
const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
|
|
15344
15346
|
if (desc && !desc.writable) {
|
|
15345
|
-
const
|
|
15347
|
+
const ot3 = globalThis.__openTabs;
|
|
15346
15348
|
const newAdaptersObj = {};
|
|
15347
|
-
if (
|
|
15348
|
-
for (const key of Object.keys(
|
|
15349
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
15349
|
+
if (ot3.adapters) {
|
|
15350
|
+
for (const key of Object.keys(ot3.adapters)) {
|
|
15351
|
+
const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
|
|
15350
15352
|
if (d) Object.defineProperty(newAdaptersObj, key, d);
|
|
15351
15353
|
}
|
|
15352
15354
|
}
|
|
15353
|
-
globalThis.__openTabs = Object.assign({},
|
|
15355
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
|
|
15354
15356
|
}
|
|
15355
15357
|
}
|
|
15356
15358
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -15388,6 +15390,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15388
15390
|
}
|
|
15389
15391
|
};
|
|
15390
15392
|
var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
|
|
15393
|
+
var ot2 = globalThis.__openTabs;
|
|
15394
|
+
ot2._notifyReadinessChanged = () => {
|
|
15395
|
+
try {
|
|
15396
|
+
const nonce = globalThis.__openTabs?._readinessNonce;
|
|
15397
|
+
if (nonce) {
|
|
15398
|
+
window.postMessage({ type: "opentabs:readiness-changed", plugin: "google-cloud", nonce }, "*");
|
|
15399
|
+
}
|
|
15400
|
+
} catch {
|
|
15401
|
+
}
|
|
15402
|
+
};
|
|
15391
15403
|
var existing = adapters["google-cloud"];
|
|
15392
15404
|
if (existing) {
|
|
15393
15405
|
if (typeof existing.teardown === "function") {
|
|
@@ -15399,7 +15411,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15399
15411
|
}
|
|
15400
15412
|
}
|
|
15401
15413
|
if (!Reflect.deleteProperty(adapters, "google-cloud")) {
|
|
15402
|
-
const
|
|
15414
|
+
const ot3 = globalThis.__openTabs;
|
|
15403
15415
|
const newAdapters = {};
|
|
15404
15416
|
for (const key of Object.keys(adapters)) {
|
|
15405
15417
|
if (key !== "google-cloud") {
|
|
@@ -15407,7 +15419,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15407
15419
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
15408
15420
|
}
|
|
15409
15421
|
}
|
|
15410
|
-
globalThis.__openTabs = Object.assign({},
|
|
15422
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
|
|
15411
15423
|
}
|
|
15412
15424
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
15413
15425
|
for (const tool of src_default.tools) {
|
|
@@ -15468,12 +15480,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15468
15480
|
}
|
|
15469
15481
|
}
|
|
15470
15482
|
};
|
|
15471
|
-
const
|
|
15472
|
-
if (!
|
|
15483
|
+
const ot3 = globalThis.__openTabs;
|
|
15484
|
+
if (!ot3._navigationInterceptor) {
|
|
15473
15485
|
const origPushState = history.pushState.bind(history);
|
|
15474
15486
|
const origReplaceState = history.replaceState.bind(history);
|
|
15475
15487
|
const callbacks = /* @__PURE__ */ new Map();
|
|
15476
|
-
|
|
15488
|
+
ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
15477
15489
|
history.pushState = function(...args) {
|
|
15478
15490
|
origPushState(...args);
|
|
15479
15491
|
for (const cb of callbacks.values()) {
|
|
@@ -15487,7 +15499,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15487
15499
|
}
|
|
15488
15500
|
};
|
|
15489
15501
|
}
|
|
15490
|
-
const interceptor =
|
|
15502
|
+
const interceptor = ot3._navigationInterceptor;
|
|
15491
15503
|
interceptor.callbacks.set("google-cloud", checkUrl);
|
|
15492
15504
|
window.addEventListener("popstate", checkUrl);
|
|
15493
15505
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -15542,5 +15554,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15542
15554
|
};
|
|
15543
15555
|
delete src_default.onDeactivate;
|
|
15544
15556
|
}
|
|
15545
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["google-cloud"]){var a=o.adapters["google-cloud"];a.__adapterHash="
|
|
15557
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["google-cloud"]){var a=o.adapters["google-cloud"];a.__adapterHash="ed9aed6bd3a15870378a7f6245753ac7be22b2efcfe61551449cbc5f860caf29";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,"google-cloud",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15546
15558
|
//# sourceMappingURL=adapter.iife.js.map
|