@opentabs-dev/opentabs-plugin-minimax-agent 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 +68 -131
- package/dist/adapter.iife.js +32 -20
- package/dist/adapter.iife.js.map +3 -3
- package/dist/tools.json +4 -4
- package/package.json +11 -5
package/README.md
CHANGED
|
@@ -1,159 +1,96 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MiniMax Agent
|
|
2
2
|
|
|
3
|
-
OpenTabs plugin for MiniMax Agent
|
|
3
|
+
OpenTabs plugin for MiniMax Agent — AI assistant platform for chat, experts, and agent automation — gives AI agents access to MiniMax Agent through your authenticated browser session.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
|
+
```bash
|
|
8
|
+
opentabs plugin install minimax-agent
|
|
7
9
|
```
|
|
8
|
-
minimax-agent/
|
|
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-minimax-agent",
|
|
28
|
-
"main": "dist/adapter.iife.js",
|
|
29
|
-
"opentabs": {
|
|
30
|
-
"displayName": "MiniMax Agent",
|
|
31
|
-
"description": "OpenTabs plugin for MiniMax Agent",
|
|
32
|
-
"urlPatterns": ["*://*.agent.minimax.io/*"]
|
|
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
10
|
|
|
42
|
-
|
|
11
|
+
Or install globally via npm:
|
|
43
12
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
minimax-agent/
|
|
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-minimax-agent
|
|
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 [agent.minimax.io](https://agent.minimax.io) in Chrome and log in
|
|
20
|
+
2. Open the OpenTabs side panel — the MiniMax Agent plugin should appear as **ready**
|
|
60
21
|
|
|
61
|
-
|
|
22
|
+
## Tools (31)
|
|
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
|
+
### Account (3)
|
|
67
25
|
|
|
68
|
-
|
|
26
|
+
| Tool | Description | Type |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| `get_current_user` | Get the authenticated user profile | Read |
|
|
29
|
+
| `get_membership_info` | Get membership plan and credit details | Read |
|
|
30
|
+
| `get_credit_details` | List credit transaction history | Read |
|
|
69
31
|
|
|
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
|
-
```
|
|
32
|
+
### Chats (7)
|
|
77
33
|
|
|
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
|
-
```
|
|
34
|
+
| Tool | Description | Type |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `list_chats` | List chat conversations | Read |
|
|
37
|
+
| `get_chat_detail` | Get chat details and messages | Read |
|
|
38
|
+
| `new_session` | Create a new chat session | Write |
|
|
39
|
+
| `send_message` | Send a message to a chat | Write |
|
|
40
|
+
| `rename_chat` | Rename a chat | Write |
|
|
41
|
+
| `delete_chat` | Delete a chat | Write |
|
|
42
|
+
| `search_chats` | Search chats by keyword | Read |
|
|
99
43
|
|
|
100
|
-
|
|
44
|
+
### Experts (7)
|
|
101
45
|
|
|
102
|
-
|
|
46
|
+
| Tool | Description | Type |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `list_experts` | List your AI experts | Read |
|
|
49
|
+
| `get_expert` | Get expert details | Read |
|
|
50
|
+
| `delete_expert` | Delete an expert | Write |
|
|
51
|
+
| `pin_expert` | Pin or unpin an expert | Write |
|
|
52
|
+
| `vote_expert` | Vote on an expert | Write |
|
|
53
|
+
| `list_expert_tags` | List expert tags | Read |
|
|
54
|
+
| `list_homepage_experts` | List homepage experts | Read |
|
|
103
55
|
|
|
104
|
-
|
|
56
|
+
### Gallery (3)
|
|
105
57
|
|
|
106
|
-
|
|
107
|
-
|
|
58
|
+
| Tool | Description | Type |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| `list_gallery_categories` | List gallery categories | Read |
|
|
61
|
+
| `list_gallery_feed` | Browse gallery feed | Read |
|
|
62
|
+
| `get_gallery_detail` | Get gallery item details | Read |
|
|
108
63
|
|
|
109
|
-
|
|
110
|
-
const token = getLocalStorage('token');
|
|
64
|
+
### Schedules (6)
|
|
111
65
|
|
|
112
|
-
|
|
113
|
-
|
|
66
|
+
| Tool | Description | Type |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| `list_cron_jobs` | List scheduled jobs | Read |
|
|
69
|
+
| `get_cron_job` | Get scheduled job details | Read |
|
|
70
|
+
| `create_cron_job` | Create a scheduled job | Write |
|
|
71
|
+
| `update_cron_job` | Update a scheduled job | Write |
|
|
72
|
+
| `execute_cron_job` | Run a scheduled job now | Write |
|
|
73
|
+
| `list_cron_executions` | List cron job executions | Read |
|
|
114
74
|
|
|
115
|
-
|
|
116
|
-
const appState = getPageGlobal('__APP_STATE__');
|
|
117
|
-
```
|
|
75
|
+
### MCP Servers (3)
|
|
118
76
|
|
|
119
|
-
|
|
77
|
+
| Tool | Description | Type |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| `list_mcp_servers` | List added MCP servers | Read |
|
|
80
|
+
| `add_mcp_server` | Add an MCP server | Write |
|
|
81
|
+
| `remove_mcp_server` | Remove an MCP server | Write |
|
|
120
82
|
|
|
121
|
-
|
|
83
|
+
### Workspace (2)
|
|
122
84
|
|
|
123
|
-
|
|
85
|
+
| Tool | Description | Type |
|
|
86
|
+
|---|---|---|
|
|
87
|
+
| `get_workspace` | Get workspace details | Read |
|
|
88
|
+
| `list_workspace_members` | List workspace members | Read |
|
|
124
89
|
|
|
125
|
-
|
|
90
|
+
## How It Works
|
|
126
91
|
|
|
127
|
-
|
|
128
|
-
// src/schemas/channel.ts
|
|
129
|
-
import { z } from 'zod';
|
|
92
|
+
This plugin runs inside your MiniMax Agent 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.
|
|
130
93
|
|
|
131
|
-
|
|
132
|
-
id: z.string().describe('Channel ID'),
|
|
133
|
-
name: z.string().describe('Channel name'),
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
export type Channel = z.infer<typeof channelSchema>;
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
Then import and reuse in your tools:
|
|
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
|
-
```
|
|
94
|
+
## License
|
|
158
95
|
|
|
159
|
-
|
|
96
|
+
MIT
|
package/dist/adapter.iife.js
CHANGED
|
@@ -231,18 +231,18 @@
|
|
|
231
231
|
|
|
232
232
|
// node_modules/@opentabs-dev/plugin-sdk/dist/storage.js
|
|
233
233
|
var getLocalStorage = (key) => {
|
|
234
|
-
try {
|
|
235
|
-
return localStorage.getItem(key);
|
|
236
|
-
} catch {
|
|
237
|
-
}
|
|
238
234
|
let storage;
|
|
239
235
|
try {
|
|
240
|
-
storage = localStorage;
|
|
236
|
+
storage = window.localStorage;
|
|
241
237
|
} catch {
|
|
242
238
|
return null;
|
|
243
239
|
}
|
|
244
|
-
if (storage
|
|
245
|
-
|
|
240
|
+
if (storage) {
|
|
241
|
+
try {
|
|
242
|
+
return storage.getItem(key);
|
|
243
|
+
} catch {
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
246
|
}
|
|
247
247
|
try {
|
|
248
248
|
const iframe = document.createElement("iframe");
|
|
@@ -305,6 +305,8 @@
|
|
|
305
305
|
* (e.g., 'https://github.com'), not a match pattern.
|
|
306
306
|
*/
|
|
307
307
|
homepage;
|
|
308
|
+
/** Typed configuration schema — declares settings that users provide via config.json or the side panel. */
|
|
309
|
+
configSchema;
|
|
308
310
|
};
|
|
309
311
|
|
|
310
312
|
// src/minimax-api.ts
|
|
@@ -15208,21 +15210,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15208
15210
|
};
|
|
15209
15211
|
var src_default = new MinimaxAgentPlugin();
|
|
15210
15212
|
|
|
15211
|
-
// dist/
|
|
15213
|
+
// dist/_adapter_entry_890dad26-67fd-4945-bd49-90c0ca5b1c39.ts
|
|
15212
15214
|
if (!globalThis.__openTabs) {
|
|
15213
15215
|
globalThis.__openTabs = {};
|
|
15214
15216
|
} else {
|
|
15215
15217
|
const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
|
|
15216
15218
|
if (desc && !desc.writable) {
|
|
15217
|
-
const
|
|
15219
|
+
const ot3 = globalThis.__openTabs;
|
|
15218
15220
|
const newAdaptersObj = {};
|
|
15219
|
-
if (
|
|
15220
|
-
for (const key of Object.keys(
|
|
15221
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
15221
|
+
if (ot3.adapters) {
|
|
15222
|
+
for (const key of Object.keys(ot3.adapters)) {
|
|
15223
|
+
const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
|
|
15222
15224
|
if (d) Object.defineProperty(newAdaptersObj, key, d);
|
|
15223
15225
|
}
|
|
15224
15226
|
}
|
|
15225
|
-
globalThis.__openTabs = Object.assign({},
|
|
15227
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
|
|
15226
15228
|
}
|
|
15227
15229
|
}
|
|
15228
15230
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -15260,6 +15262,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15260
15262
|
}
|
|
15261
15263
|
};
|
|
15262
15264
|
var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
|
|
15265
|
+
var ot2 = globalThis.__openTabs;
|
|
15266
|
+
ot2._notifyReadinessChanged = () => {
|
|
15267
|
+
try {
|
|
15268
|
+
const nonce = globalThis.__openTabs?._readinessNonce;
|
|
15269
|
+
if (nonce) {
|
|
15270
|
+
window.postMessage({ type: "opentabs:readiness-changed", plugin: "minimax-agent", nonce }, "*");
|
|
15271
|
+
}
|
|
15272
|
+
} catch {
|
|
15273
|
+
}
|
|
15274
|
+
};
|
|
15263
15275
|
var existing = adapters["minimax-agent"];
|
|
15264
15276
|
if (existing) {
|
|
15265
15277
|
if (typeof existing.teardown === "function") {
|
|
@@ -15271,7 +15283,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15271
15283
|
}
|
|
15272
15284
|
}
|
|
15273
15285
|
if (!Reflect.deleteProperty(adapters, "minimax-agent")) {
|
|
15274
|
-
const
|
|
15286
|
+
const ot3 = globalThis.__openTabs;
|
|
15275
15287
|
const newAdapters = {};
|
|
15276
15288
|
for (const key of Object.keys(adapters)) {
|
|
15277
15289
|
if (key !== "minimax-agent") {
|
|
@@ -15279,7 +15291,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15279
15291
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
15280
15292
|
}
|
|
15281
15293
|
}
|
|
15282
|
-
globalThis.__openTabs = Object.assign({},
|
|
15294
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
|
|
15283
15295
|
}
|
|
15284
15296
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
15285
15297
|
for (const tool of src_default.tools) {
|
|
@@ -15340,12 +15352,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15340
15352
|
}
|
|
15341
15353
|
}
|
|
15342
15354
|
};
|
|
15343
|
-
const
|
|
15344
|
-
if (!
|
|
15355
|
+
const ot3 = globalThis.__openTabs;
|
|
15356
|
+
if (!ot3._navigationInterceptor) {
|
|
15345
15357
|
const origPushState = history.pushState.bind(history);
|
|
15346
15358
|
const origReplaceState = history.replaceState.bind(history);
|
|
15347
15359
|
const callbacks = /* @__PURE__ */ new Map();
|
|
15348
|
-
|
|
15360
|
+
ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
15349
15361
|
history.pushState = function(...args) {
|
|
15350
15362
|
origPushState(...args);
|
|
15351
15363
|
for (const cb of callbacks.values()) {
|
|
@@ -15359,7 +15371,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15359
15371
|
}
|
|
15360
15372
|
};
|
|
15361
15373
|
}
|
|
15362
|
-
const interceptor =
|
|
15374
|
+
const interceptor = ot3._navigationInterceptor;
|
|
15363
15375
|
interceptor.callbacks.set("minimax-agent", checkUrl);
|
|
15364
15376
|
window.addEventListener("popstate", checkUrl);
|
|
15365
15377
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -15414,5 +15426,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15414
15426
|
};
|
|
15415
15427
|
delete src_default.onDeactivate;
|
|
15416
15428
|
}
|
|
15417
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["minimax-agent"]){var a=o.adapters["minimax-agent"];a.__adapterHash="
|
|
15429
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["minimax-agent"]){var a=o.adapters["minimax-agent"];a.__adapterHash="c2df0cce113d660119108201c9faf57a2e34f658fb1361dfdc8c543061f39bfb";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,"minimax-agent",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15418
15430
|
//# sourceMappingURL=adapter.iife.js.map
|