@opentabs-dev/opentabs-plugin-minimax-agent 0.0.74
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 +159 -0
- package/dist/adapter.iife.js +15428 -0
- package/dist/adapter.iife.js.map +7 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +94 -0
- package/dist/index.js.map +1 -0
- package/dist/minimax-api.d.ts +15 -0
- package/dist/minimax-api.d.ts.map +1 -0
- package/dist/minimax-api.js +154 -0
- package/dist/minimax-api.js.map +1 -0
- package/dist/tools/add-mcp-server.d.ts +10 -0
- package/dist/tools/add-mcp-server.d.ts.map +1 -0
- package/dist/tools/add-mcp-server.js +30 -0
- package/dist/tools/add-mcp-server.js.map +1 -0
- package/dist/tools/create-cron-job.d.ts +16 -0
- package/dist/tools/create-cron-job.d.ts.map +1 -0
- package/dist/tools/create-cron-job.js +27 -0
- package/dist/tools/create-cron-job.js.map +1 -0
- package/dist/tools/delete-chat.d.ts +7 -0
- package/dist/tools/delete-chat.d.ts.map +1 -0
- package/dist/tools/delete-chat.js +24 -0
- package/dist/tools/delete-chat.js.map +1 -0
- package/dist/tools/delete-expert.d.ts +7 -0
- package/dist/tools/delete-expert.d.ts.map +1 -0
- package/dist/tools/delete-expert.js +22 -0
- package/dist/tools/delete-expert.js.map +1 -0
- package/dist/tools/execute-cron-job.d.ts +7 -0
- package/dist/tools/execute-cron-job.d.ts.map +1 -0
- package/dist/tools/execute-cron-job.js +24 -0
- package/dist/tools/execute-cron-job.js.map +1 -0
- package/dist/tools/get-chat-detail.d.ts +21 -0
- package/dist/tools/get-chat-detail.d.ts.map +1 -0
- package/dist/tools/get-chat-detail.js +29 -0
- package/dist/tools/get-chat-detail.js.map +1 -0
- package/dist/tools/get-credit-details.d.ts +14 -0
- package/dist/tools/get-credit-details.d.ts.map +1 -0
- package/dist/tools/get-credit-details.js +28 -0
- package/dist/tools/get-credit-details.js.map +1 -0
- package/dist/tools/get-cron-job.d.ts +14 -0
- package/dist/tools/get-cron-job.d.ts.map +1 -0
- package/dist/tools/get-cron-job.js +23 -0
- package/dist/tools/get-cron-job.js.map +1 -0
- package/dist/tools/get-current-user.d.ts +13 -0
- package/dist/tools/get-current-user.d.ts.map +1 -0
- package/dist/tools/get-current-user.js +19 -0
- package/dist/tools/get-current-user.js.map +1 -0
- package/dist/tools/get-expert.d.ts +20 -0
- package/dist/tools/get-expert.d.ts.map +1 -0
- package/dist/tools/get-expert.js +21 -0
- package/dist/tools/get-expert.js.map +1 -0
- package/dist/tools/get-gallery-detail.d.ts +15 -0
- package/dist/tools/get-gallery-detail.d.ts.map +1 -0
- package/dist/tools/get-gallery-detail.js +27 -0
- package/dist/tools/get-gallery-detail.js.map +1 -0
- package/dist/tools/get-membership-info.d.ts +14 -0
- package/dist/tools/get-membership-info.d.ts.map +1 -0
- package/dist/tools/get-membership-info.js +19 -0
- package/dist/tools/get-membership-info.js.map +1 -0
- package/dist/tools/get-workspace.d.ts +10 -0
- package/dist/tools/get-workspace.d.ts.map +1 -0
- package/dist/tools/get-workspace.js +34 -0
- package/dist/tools/get-workspace.js.map +1 -0
- package/dist/tools/list-chats.d.ts +18 -0
- package/dist/tools/list-chats.d.ts.map +1 -0
- package/dist/tools/list-chats.js +33 -0
- package/dist/tools/list-chats.js.map +1 -0
- package/dist/tools/list-cron-executions.d.ts +17 -0
- package/dist/tools/list-cron-executions.d.ts.map +1 -0
- package/dist/tools/list-cron-executions.js +33 -0
- package/dist/tools/list-cron-executions.js.map +1 -0
- package/dist/tools/list-cron-jobs.d.ts +18 -0
- package/dist/tools/list-cron-jobs.d.ts.map +1 -0
- package/dist/tools/list-cron-jobs.js +31 -0
- package/dist/tools/list-cron-jobs.js.map +1 -0
- package/dist/tools/list-expert-tags.d.ts +8 -0
- package/dist/tools/list-expert-tags.d.ts.map +1 -0
- package/dist/tools/list-expert-tags.js +23 -0
- package/dist/tools/list-expert-tags.js.map +1 -0
- package/dist/tools/list-experts.d.ts +25 -0
- package/dist/tools/list-experts.d.ts.map +1 -0
- package/dist/tools/list-experts.js +30 -0
- package/dist/tools/list-experts.js.map +1 -0
- package/dist/tools/list-gallery-categories.d.ts +8 -0
- package/dist/tools/list-gallery-categories.d.ts.map +1 -0
- package/dist/tools/list-gallery-categories.js +23 -0
- package/dist/tools/list-gallery-categories.js.map +1 -0
- package/dist/tools/list-gallery-feed.d.ts +21 -0
- package/dist/tools/list-gallery-feed.d.ts.map +1 -0
- package/dist/tools/list-gallery-feed.js +35 -0
- package/dist/tools/list-gallery-feed.js.map +1 -0
- package/dist/tools/list-homepage-experts.d.ts +25 -0
- package/dist/tools/list-homepage-experts.d.ts.map +1 -0
- package/dist/tools/list-homepage-experts.js +30 -0
- package/dist/tools/list-homepage-experts.js.map +1 -0
- package/dist/tools/list-mcp-servers.d.ts +11 -0
- package/dist/tools/list-mcp-servers.d.ts.map +1 -0
- package/dist/tools/list-mcp-servers.js +35 -0
- package/dist/tools/list-mcp-servers.js.map +1 -0
- package/dist/tools/list-workspace-members.d.ts +11 -0
- package/dist/tools/list-workspace-members.d.ts.map +1 -0
- package/dist/tools/list-workspace-members.js +23 -0
- package/dist/tools/list-workspace-members.js.map +1 -0
- package/dist/tools/new-session.d.ts +15 -0
- package/dist/tools/new-session.d.ts.map +1 -0
- package/dist/tools/new-session.js +27 -0
- package/dist/tools/new-session.js.map +1 -0
- package/dist/tools/pin-expert.d.ts +8 -0
- package/dist/tools/pin-expert.d.ts.map +1 -0
- package/dist/tools/pin-expert.js +23 -0
- package/dist/tools/pin-expert.js.map +1 -0
- package/dist/tools/remove-mcp-server.d.ts +7 -0
- package/dist/tools/remove-mcp-server.d.ts.map +1 -0
- package/dist/tools/remove-mcp-server.js +22 -0
- package/dist/tools/remove-mcp-server.js.map +1 -0
- package/dist/tools/rename-chat.d.ts +8 -0
- package/dist/tools/rename-chat.d.ts.map +1 -0
- package/dist/tools/rename-chat.js +26 -0
- package/dist/tools/rename-chat.js.map +1 -0
- package/dist/tools/schemas.d.ts +323 -0
- package/dist/tools/schemas.d.ts.map +1 -0
- package/dist/tools/schemas.js +213 -0
- package/dist/tools/schemas.js.map +1 -0
- package/dist/tools/search-chats.d.ts +16 -0
- package/dist/tools/search-chats.d.ts.map +1 -0
- package/dist/tools/search-chats.js +29 -0
- package/dist/tools/search-chats.js.map +1 -0
- package/dist/tools/send-message.d.ts +9 -0
- package/dist/tools/send-message.d.ts.map +1 -0
- package/dist/tools/send-message.js +28 -0
- package/dist/tools/send-message.js.map +1 -0
- package/dist/tools/update-cron-job.d.ts +18 -0
- package/dist/tools/update-cron-job.d.ts.map +1 -0
- package/dist/tools/update-cron-job.js +31 -0
- package/dist/tools/update-cron-job.js.map +1 -0
- package/dist/tools/vote-expert.d.ts +8 -0
- package/dist/tools/vote-expert.d.ts.map +1 -0
- package/dist/tools/vote-expert.js +23 -0
- package/dist/tools/vote-expert.js.map +1 -0
- package/dist/tools.json +2202 -0
- package/package.json +55 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { apiPost } from '../minimax-api.js';
|
|
4
|
+
import { creditRecordSchema, mapCreditRecord } from './schemas.js';
|
|
5
|
+
export const getCreditDetails = defineTool({
|
|
6
|
+
name: 'get_credit_details',
|
|
7
|
+
displayName: 'Get Credit Details',
|
|
8
|
+
description: 'List credit transaction records for the authenticated MiniMax Agent account. Shows credit earnings and spending history with pagination support.',
|
|
9
|
+
summary: 'List credit transaction history',
|
|
10
|
+
icon: 'list',
|
|
11
|
+
group: 'Account',
|
|
12
|
+
input: z.object({
|
|
13
|
+
page: z.number().int().min(1).optional().describe('Page number (default 1)'),
|
|
14
|
+
per_page: z.number().int().min(1).max(50).optional().describe('Records per page (default 20, max 50)'),
|
|
15
|
+
}),
|
|
16
|
+
output: z.object({
|
|
17
|
+
records: z.array(creditRecordSchema).describe('Credit transaction records'),
|
|
18
|
+
has_more: z.boolean().describe('Whether more records are available'),
|
|
19
|
+
}),
|
|
20
|
+
handle: async (params) => {
|
|
21
|
+
const data = await apiPost('/matrix/api/v1/commerce/list_credit_record', { page_num: params.page ?? 1, page_size: params.per_page ?? 20 });
|
|
22
|
+
return {
|
|
23
|
+
records: (data.records ?? []).map(mapCreditRecord),
|
|
24
|
+
has_more: data.has_more ?? false,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=get-credit-details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-credit-details.js","sourceRoot":"","sources":["../../src/tools/get-credit-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC;IACzC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EACT,kJAAkJ;IACpJ,OAAO,EAAE,iCAAiC;IAC1C,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;QAC5E,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;KACvG,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,4BAA4B,CAAC;QAC3E,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;KACrE,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,OAAO,CACxB,4CAA4C,EAC5C,EAAE,QAAQ,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,QAAQ,IAAI,EAAE,EAAE,CACjE,CAAC;QACF,OAAO;YACL,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC;YAClD,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,KAAK;SACjC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const getCronJob: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
prompt: z.ZodString;
|
|
8
|
+
cron_expression: z.ZodString;
|
|
9
|
+
status: z.ZodNumber;
|
|
10
|
+
chat_id: z.ZodNumber;
|
|
11
|
+
create_time: z.ZodNumber;
|
|
12
|
+
update_time: z.ZodNumber;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
//# sourceMappingURL=get-cron-job.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-cron-job.d.ts","sourceRoot":"","sources":["../../src/tools/get-cron-job.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,UAAU;;;;;;;;;;;kBAoBrB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { apiPost } from '../minimax-api.js';
|
|
4
|
+
import { cronJobSchema, mapCronJob } from './schemas.js';
|
|
5
|
+
export const getCronJob = defineTool({
|
|
6
|
+
name: 'get_cron_job',
|
|
7
|
+
displayName: 'Get Scheduled Job',
|
|
8
|
+
description: 'Get detailed information about a specific scheduled (cron) job by its ID.',
|
|
9
|
+
summary: 'Get scheduled job details',
|
|
10
|
+
icon: 'clock',
|
|
11
|
+
group: 'Schedules',
|
|
12
|
+
input: z.object({
|
|
13
|
+
id: z.string().describe('Cron job ID'),
|
|
14
|
+
}),
|
|
15
|
+
output: cronJobSchema,
|
|
16
|
+
handle: async (params) => {
|
|
17
|
+
const data = await apiPost('/matrix/api/v1/cron/get_job', {
|
|
18
|
+
job_id: Number(params.id),
|
|
19
|
+
});
|
|
20
|
+
return mapCronJob(data.cron_job);
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=get-cron-job.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-cron-job.js","sourceRoot":"","sources":["../../src/tools/get-cron-job.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGzD,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;IACnC,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,2EAA2E;IACxF,OAAO,EAAE,2BAA2B;IACpC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;KACvC,CAAC;IACF,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,OAAO,CAGvB,6BAA6B,EAAE;YAChC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;SAC1B,CAAC,CAAC;QACH,OAAO,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const getCurrentUser: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
3
|
+
user: z.ZodObject<{
|
|
4
|
+
user_id: z.ZodString;
|
|
5
|
+
real_user_id: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
email: z.ZodString;
|
|
8
|
+
avatar: z.ZodString;
|
|
9
|
+
description: z.ZodString;
|
|
10
|
+
is_login: z.ZodBoolean;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
//# sourceMappingURL=get-current-user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-current-user.d.ts","sourceRoot":"","sources":["../../src/tools/get-current-user.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,cAAc;;;;;;;;;;kBAczB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { apiGet } from '../minimax-api.js';
|
|
4
|
+
import { mapUser, userSchema } from './schemas.js';
|
|
5
|
+
export const getCurrentUser = defineTool({
|
|
6
|
+
name: 'get_current_user',
|
|
7
|
+
displayName: 'Get Current User',
|
|
8
|
+
description: 'Get the authenticated MiniMax Agent user profile including user ID, display name, email, avatar, and login status.',
|
|
9
|
+
summary: 'Get the authenticated user profile',
|
|
10
|
+
icon: 'user',
|
|
11
|
+
group: 'Account',
|
|
12
|
+
input: z.object({}),
|
|
13
|
+
output: z.object({ user: userSchema }),
|
|
14
|
+
handle: async () => {
|
|
15
|
+
const data = await apiGet('/v1/api/user/info');
|
|
16
|
+
return { user: mapUser(data.data?.userInfo ?? {}) };
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=get-current-user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-current-user.js","sourceRoot":"","sources":["../../src/tools/get-current-user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGnD,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EACT,oHAAoH;IACtH,OAAO,EAAE,oCAAoC;IAC7C,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IACtC,MAAM,EAAE,KAAK,IAAI,EAAE;QACjB,MAAM,IAAI,GAAG,MAAM,MAAM,CAAmC,mBAAmB,CAAC,CAAC;QACjF,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,IAAI,EAAE,CAAC,EAAE,CAAC;IACtD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const getExpert: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5
|
+
id: z.ZodNumber;
|
|
6
|
+
chat_id: z.ZodNumber;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
description: z.ZodString;
|
|
9
|
+
creator_name: z.ZodString;
|
|
10
|
+
icon_url: z.ZodString;
|
|
11
|
+
cover_url: z.ZodString;
|
|
12
|
+
view_count: z.ZodNumber;
|
|
13
|
+
up_vote_count: z.ZodNumber;
|
|
14
|
+
vote_status: z.ZodNumber;
|
|
15
|
+
is_pinned: z.ZodBoolean;
|
|
16
|
+
publish_status: z.ZodNumber;
|
|
17
|
+
create_time: z.ZodNumber;
|
|
18
|
+
update_time: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
//# sourceMappingURL=get-expert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-expert.d.ts","sourceRoot":"","sources":["../../src/tools/get-expert.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;kBAepB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { apiPost } from '../minimax-api.js';
|
|
4
|
+
import { expertSchema, mapExpert } from './schemas.js';
|
|
5
|
+
export const getExpert = defineTool({
|
|
6
|
+
name: 'get_expert',
|
|
7
|
+
displayName: 'Get Expert',
|
|
8
|
+
description: 'Get detailed information about a specific AI expert/agent by ID.',
|
|
9
|
+
summary: 'Get expert details',
|
|
10
|
+
icon: 'bot',
|
|
11
|
+
group: 'Experts',
|
|
12
|
+
input: z.object({
|
|
13
|
+
id: z.number().describe('Expert ID'),
|
|
14
|
+
}),
|
|
15
|
+
output: expertSchema,
|
|
16
|
+
handle: async (params) => {
|
|
17
|
+
const data = await apiPost('/matrix/api/v1/expert/get', { id: params.id });
|
|
18
|
+
return mapExpert(data.expert);
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=get-expert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-expert.js","sourceRoot":"","sources":["../../src/tools/get-expert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGvD,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;IAClC,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,kEAAkE;IAC/E,OAAO,EAAE,oBAAoB;IAC7B,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;KACrC,CAAC;IACF,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,OAAO,CAAwB,2BAA2B,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;QAClG,OAAO,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const getGalleryDetail: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5
|
+
id: z.ZodNumber;
|
|
6
|
+
chat_id: z.ZodNumber;
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
description: z.ZodString;
|
|
9
|
+
category: z.ZodString;
|
|
10
|
+
cover_url: z.ZodString;
|
|
11
|
+
creator_name: z.ZodString;
|
|
12
|
+
view_count: z.ZodNumber;
|
|
13
|
+
remix_count: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
//# sourceMappingURL=get-gallery-detail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-gallery-detail.d.ts","sourceRoot":"","sources":["../../src/tools/get-gallery-detail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;kBAwB3B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ToolError, defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { apiPost } from '../minimax-api.js';
|
|
4
|
+
import { galleryItemSchema, mapGalleryItem } from './schemas.js';
|
|
5
|
+
export const getGalleryDetail = defineTool({
|
|
6
|
+
name: 'get_gallery_detail',
|
|
7
|
+
displayName: 'Get Gallery Detail',
|
|
8
|
+
description: 'Get detailed information about a specific gallery item by its ID.',
|
|
9
|
+
summary: 'Get gallery item details',
|
|
10
|
+
icon: 'image',
|
|
11
|
+
group: 'Gallery',
|
|
12
|
+
input: z.object({
|
|
13
|
+
id: z.number().int().describe('Gallery item ID'),
|
|
14
|
+
}),
|
|
15
|
+
output: galleryItemSchema,
|
|
16
|
+
handle: async (params) => {
|
|
17
|
+
const data = await apiPost('/matrix/api/v1/gallery/list_detail', {
|
|
18
|
+
ids: [params.id],
|
|
19
|
+
});
|
|
20
|
+
const item = data.galleries?.[0];
|
|
21
|
+
if (!item) {
|
|
22
|
+
throw ToolError.notFound(`Gallery item ${params.id} not found`);
|
|
23
|
+
}
|
|
24
|
+
return mapGalleryItem(item);
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=get-gallery-detail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-gallery-detail.js","sourceRoot":"","sources":["../../src/tools/get-gallery-detail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGjE,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC;IACzC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,mEAAmE;IAChF,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;KACjD,CAAC;IACF,MAAM,EAAE,iBAAiB;IACzB,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,OAAO,CAGvB,oCAAoC,EAAE;YACvC,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;SACjB,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,SAAS,CAAC,QAAQ,CAAC,gBAAgB,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC;QAClE,CAAC;QACD,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const getMembershipInfo: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
3
|
+
membership: z.ZodObject<{
|
|
4
|
+
plan_type: z.ZodNumber;
|
|
5
|
+
plan_name: z.ZodString;
|
|
6
|
+
total_credits: z.ZodNumber;
|
|
7
|
+
pending_credits: z.ZodNumber;
|
|
8
|
+
will_renewal: z.ZodBoolean;
|
|
9
|
+
expires_at: z.ZodNumber;
|
|
10
|
+
is_pro_builder: z.ZodBoolean;
|
|
11
|
+
daily_gift_credits: z.ZodNumber;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
//# sourceMappingURL=get-membership-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-membership-info.d.ts","sourceRoot":"","sources":["../../src/tools/get-membership-info.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;kBAc5B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { apiPost } from '../minimax-api.js';
|
|
4
|
+
import { mapMembership, membershipSchema } from './schemas.js';
|
|
5
|
+
export const getMembershipInfo = defineTool({
|
|
6
|
+
name: 'get_membership_info',
|
|
7
|
+
displayName: 'Get Membership Info',
|
|
8
|
+
description: 'Get the current MiniMax Agent membership details including plan type, plan name, remaining credits, pending credits, renewal status, expiration date, and Pro Builder status.',
|
|
9
|
+
summary: 'Get membership plan and credit details',
|
|
10
|
+
icon: 'credit-card',
|
|
11
|
+
group: 'Account',
|
|
12
|
+
input: z.object({}),
|
|
13
|
+
output: z.object({ membership: membershipSchema }),
|
|
14
|
+
handle: async () => {
|
|
15
|
+
const data = await apiPost('/matrix/api/v1/commerce/get_membership_info');
|
|
16
|
+
return { membership: mapMembership(data) };
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=get-membership-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-membership-info.js","sourceRoot":"","sources":["../../src/tools/get-membership-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAsB,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;IAC1C,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EACT,+KAA+K;IACjL,OAAO,EAAE,wCAAwC;IACjD,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAClD,MAAM,EAAE,KAAK,IAAI,EAAE;QACjB,MAAM,IAAI,GAAG,MAAM,OAAO,CAAgB,6CAA6C,CAAC,CAAC;QACzF,OAAO,EAAE,UAAU,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;IAC7C,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const getWorkspace: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
3
|
+
workspace: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
member_count: z.ZodNumber;
|
|
7
|
+
create_time: z.ZodNumber;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
//# sourceMappingURL=get-workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-workspace.d.ts","sourceRoot":"","sources":["../../src/tools/get-workspace.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,YAAY;;;;;;;kBA0BvB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { apiPost } from '../minimax-api.js';
|
|
4
|
+
const workspaceSchema = z.object({
|
|
5
|
+
id: z.string().describe('Workspace ID'),
|
|
6
|
+
name: z.string().describe('Workspace name'),
|
|
7
|
+
member_count: z.number().int().describe('Number of workspace members'),
|
|
8
|
+
create_time: z.number().describe('Creation timestamp in ms'),
|
|
9
|
+
});
|
|
10
|
+
export const getWorkspace = defineTool({
|
|
11
|
+
name: 'get_workspace',
|
|
12
|
+
displayName: 'Get Workspace',
|
|
13
|
+
description: 'Get details about the current MiniMax Agent workspace including name, ID, and member count.',
|
|
14
|
+
summary: 'Get workspace details',
|
|
15
|
+
icon: 'building',
|
|
16
|
+
group: 'Workspace',
|
|
17
|
+
input: z.object({}),
|
|
18
|
+
output: z.object({
|
|
19
|
+
workspace: workspaceSchema.describe('Workspace details'),
|
|
20
|
+
}),
|
|
21
|
+
handle: async () => {
|
|
22
|
+
const data = await apiPost('/matrix/api/v1/workspace/detail', {});
|
|
23
|
+
const w = data.workspace ?? {};
|
|
24
|
+
return {
|
|
25
|
+
workspace: {
|
|
26
|
+
id: w.id ?? '',
|
|
27
|
+
name: w.name ?? '',
|
|
28
|
+
member_count: w.member_count ?? 0,
|
|
29
|
+
create_time: w.create_time ?? 0,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=get-workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-workspace.js","sourceRoot":"","sources":["../../src/tools/get-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC3C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACtE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;CAC7D,CAAC,CAAC;AASH,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;IACrC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,6FAA6F;IAC1G,OAAO,EAAE,uBAAuB;IAChC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,SAAS,EAAE,eAAe,CAAC,QAAQ,CAAC,mBAAmB,CAAC;KACzD,CAAC;IACF,MAAM,EAAE,KAAK,IAAI,EAAE;QACjB,MAAM,IAAI,GAAG,MAAM,OAAO,CAGvB,iCAAiC,EAAE,EAAE,CAAC,CAAC;QAC1C,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC;QAC/B,OAAO;YACL,SAAS,EAAE;gBACT,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE;gBACd,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE;gBAClB,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,CAAC;gBACjC,WAAW,EAAE,CAAC,CAAC,WAAW,IAAI,CAAC;aAChC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listChats: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
|
|
3
|
+
page_num: z.ZodOptional<z.ZodNumber>;
|
|
4
|
+
page_size: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
chat_type: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7
|
+
items: z.ZodArray<z.ZodObject<{
|
|
8
|
+
chat_id: z.ZodNumber;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
chat_type: z.ZodNumber;
|
|
11
|
+
create_time: z.ZodNumber;
|
|
12
|
+
update_time: z.ZodNumber;
|
|
13
|
+
expert_id: z.ZodNumber;
|
|
14
|
+
is_shared: z.ZodBoolean;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
has_more: z.ZodBoolean;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
//# sourceMappingURL=list-chats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-chats.d.ts","sourceRoot":"","sources":["../../src/tools/list-chats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;kBA8BpB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { apiPost } from '../minimax-api.js';
|
|
4
|
+
import { chatSchema, mapChat } from './schemas.js';
|
|
5
|
+
export const listChats = defineTool({
|
|
6
|
+
name: 'list_chats',
|
|
7
|
+
displayName: 'List Chats',
|
|
8
|
+
description: 'List chat conversations with pagination support. Returns chats sorted by most recent activity.',
|
|
9
|
+
summary: 'List chat conversations',
|
|
10
|
+
icon: 'list',
|
|
11
|
+
group: 'Chats',
|
|
12
|
+
input: z.object({
|
|
13
|
+
page_num: z.number().int().min(1).optional().describe('Page number (default 1)'),
|
|
14
|
+
page_size: z.number().int().min(1).max(50).optional().describe('Results per page (default 20)'),
|
|
15
|
+
chat_type: z.number().int().optional().describe('Chat type filter (2=agent tasks)'),
|
|
16
|
+
}),
|
|
17
|
+
output: z.object({
|
|
18
|
+
items: z.array(chatSchema).describe('List of chats'),
|
|
19
|
+
has_more: z.boolean().describe('Whether more results are available'),
|
|
20
|
+
}),
|
|
21
|
+
handle: async (params) => {
|
|
22
|
+
const data = await apiPost('/matrix/api/v1/chat/list_chat', {
|
|
23
|
+
page_num: params.page_num ?? 1,
|
|
24
|
+
page_size: params.page_size ?? 20,
|
|
25
|
+
...(params.chat_type != null && { chat_type: params.chat_type }),
|
|
26
|
+
});
|
|
27
|
+
return {
|
|
28
|
+
items: (data.chats ?? []).map(mapChat),
|
|
29
|
+
has_more: data.has_more ?? false,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=list-chats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-chats.js","sourceRoot":"","sources":["../../src/tools/list-chats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGnD,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;IAClC,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,gGAAgG;IAC7G,OAAO,EAAE,yBAAyB;IAClC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;QAChF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;QAC/F,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;KACpF,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC;QACpD,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;KACrE,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,OAAO,CAGvB,+BAA+B,EAAE;YAClC,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,CAAC;YAC9B,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,EAAE;YACjC,GAAG,CAAC,MAAM,CAAC,SAAS,IAAI,IAAI,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC;SACjE,CAAC,CAAC;QACH,OAAO;YACL,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC;YACtC,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,KAAK;SACjC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listCronExecutions: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
|
|
3
|
+
job_id: z.ZodString;
|
|
4
|
+
page_num: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
page_size: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7
|
+
executions: z.ZodArray<z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
job_id: z.ZodString;
|
|
10
|
+
status: z.ZodNumber;
|
|
11
|
+
chat_id: z.ZodNumber;
|
|
12
|
+
start_time: z.ZodNumber;
|
|
13
|
+
end_time: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
has_more: z.ZodBoolean;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
//# sourceMappingURL=list-cron-executions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-cron-executions.d.ts","sourceRoot":"","sources":["../../src/tools/list-cron-executions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;kBAgC7B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { apiPost } from '../minimax-api.js';
|
|
4
|
+
import { cronExecutionSchema, mapCronExecution } from './schemas.js';
|
|
5
|
+
export const listCronExecutions = defineTool({
|
|
6
|
+
name: 'list_cron_executions',
|
|
7
|
+
displayName: 'List Cron Executions',
|
|
8
|
+
description: 'List execution history for a scheduled (cron) job with pagination. Returns individual execution records with status and timing.',
|
|
9
|
+
summary: 'List cron job executions',
|
|
10
|
+
icon: 'history',
|
|
11
|
+
group: 'Schedules',
|
|
12
|
+
input: z.object({
|
|
13
|
+
job_id: z.string().describe('Cron job ID'),
|
|
14
|
+
page_num: z.number().int().optional().describe('Page number (1-based)'),
|
|
15
|
+
page_size: z.number().int().optional().describe('Number of executions per page'),
|
|
16
|
+
}),
|
|
17
|
+
output: z.object({
|
|
18
|
+
executions: z.array(cronExecutionSchema).describe('List of cron executions'),
|
|
19
|
+
has_more: z.boolean().describe('Whether more results are available'),
|
|
20
|
+
}),
|
|
21
|
+
handle: async (params) => {
|
|
22
|
+
const data = await apiPost('/matrix/api/v1/cron/list_execution', {
|
|
23
|
+
job_id: Number(params.job_id),
|
|
24
|
+
...(params.page_num != null && { page_num: params.page_num }),
|
|
25
|
+
...(params.page_size != null && { page_size: params.page_size }),
|
|
26
|
+
});
|
|
27
|
+
return {
|
|
28
|
+
executions: (data.executions ?? []).map(mapCronExecution),
|
|
29
|
+
has_more: data.has_more ?? false,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=list-cron-executions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-cron-executions.js","sourceRoot":"","sources":["../../src/tools/list-cron-executions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrE,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC3C,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EACT,iIAAiI;IACnI,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;QAC1C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QACvE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;KACjF,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;QAC5E,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;KACrE,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,OAAO,CAIvB,oCAAoC,EAAE;YACvC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;YAC7B,GAAG,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;YAC7D,GAAG,CAAC,MAAM,CAAC,SAAS,IAAI,IAAI,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC;SACjE,CAAC,CAAC;QACH,OAAO;YACL,UAAU,EAAE,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC;YACzD,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,KAAK;SACjC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listCronJobs: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
|
|
3
|
+
page_num: z.ZodOptional<z.ZodNumber>;
|
|
4
|
+
page_size: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
cron_jobs: z.ZodArray<z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
name: z.ZodString;
|
|
9
|
+
prompt: z.ZodString;
|
|
10
|
+
cron_expression: z.ZodString;
|
|
11
|
+
status: z.ZodNumber;
|
|
12
|
+
chat_id: z.ZodNumber;
|
|
13
|
+
create_time: z.ZodNumber;
|
|
14
|
+
update_time: z.ZodNumber;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
has_more: z.ZodBoolean;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
//# sourceMappingURL=list-cron-jobs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-cron-jobs.d.ts","sourceRoot":"","sources":["../../src/tools/list-cron-jobs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;kBA8BvB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { apiPost } from '../minimax-api.js';
|
|
4
|
+
import { cronJobSchema, mapCronJob } from './schemas.js';
|
|
5
|
+
export const listCronJobs = defineTool({
|
|
6
|
+
name: 'list_cron_jobs',
|
|
7
|
+
displayName: 'List Scheduled Jobs',
|
|
8
|
+
description: 'List scheduled (cron) jobs with pagination. Returns job definitions including their schedules and statuses.',
|
|
9
|
+
summary: 'List scheduled jobs',
|
|
10
|
+
icon: 'clock',
|
|
11
|
+
group: 'Schedules',
|
|
12
|
+
input: z.object({
|
|
13
|
+
page_num: z.number().int().min(1).optional().describe('Page number (default 1)'),
|
|
14
|
+
page_size: z.number().int().min(1).max(50).optional().describe('Results per page (default 20)'),
|
|
15
|
+
}),
|
|
16
|
+
output: z.object({
|
|
17
|
+
cron_jobs: z.array(cronJobSchema).describe('List of scheduled jobs'),
|
|
18
|
+
has_more: z.boolean().describe('Whether more results are available'),
|
|
19
|
+
}),
|
|
20
|
+
handle: async (params) => {
|
|
21
|
+
const data = await apiPost('/matrix/api/v1/cron/list_job', {
|
|
22
|
+
page_num: params.page_num ?? 1,
|
|
23
|
+
page_size: params.page_size ?? 20,
|
|
24
|
+
});
|
|
25
|
+
return {
|
|
26
|
+
cron_jobs: (data.cron_jobs ?? []).map(mapCronJob),
|
|
27
|
+
has_more: data.has_more ?? false,
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=list-cron-jobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-cron-jobs.js","sourceRoot":"","sources":["../../src/tools/list-cron-jobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGzD,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;IACrC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,qBAAqB;IAClC,WAAW,EACT,6GAA6G;IAC/G,OAAO,EAAE,qBAAqB;IAC9B,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;QAChF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;KAChG,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACpE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;KACrE,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,OAAO,CAIvB,8BAA8B,EAAE;YACjC,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,CAAC;YAC9B,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,EAAE;SAClC,CAAC,CAAC;QACH,OAAO;YACL,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC;YACjD,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,KAAK;SACjC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listExpertTags: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
3
|
+
tags: z.ZodArray<z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
}, z.core.$strip>>;
|
|
7
|
+
}, z.core.$strip>>;
|
|
8
|
+
//# sourceMappingURL=list-expert-tags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-expert-tags.d.ts","sourceRoot":"","sources":["../../src/tools/list-expert-tags.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,cAAc;;;;;kBAiBzB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { apiPost } from '../minimax-api.js';
|
|
4
|
+
import { expertTagSchema, mapExpertTag } from './schemas.js';
|
|
5
|
+
export const listExpertTags = defineTool({
|
|
6
|
+
name: 'list_expert_tags',
|
|
7
|
+
displayName: 'List Expert Tags',
|
|
8
|
+
description: 'List all available tags for categorizing AI experts/agents.',
|
|
9
|
+
summary: 'List expert tags',
|
|
10
|
+
icon: 'tags',
|
|
11
|
+
group: 'Experts',
|
|
12
|
+
input: z.object({}),
|
|
13
|
+
output: z.object({
|
|
14
|
+
tags: z.array(expertTagSchema).describe('List of expert tags'),
|
|
15
|
+
}),
|
|
16
|
+
handle: async () => {
|
|
17
|
+
const data = await apiPost('/matrix/api/v1/expert/list_tags', {});
|
|
18
|
+
return {
|
|
19
|
+
tags: (data.tags ?? []).map(mapExpertTag),
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=list-expert-tags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-expert-tags.js","sourceRoot":"","sources":["../../src/tools/list-expert-tags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG7D,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,6DAA6D;IAC1E,OAAO,EAAE,kBAAkB;IAC3B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,qBAAqB,CAAC;KAC/D,CAAC;IACF,MAAM,EAAE,KAAK,IAAI,EAAE;QACjB,MAAM,IAAI,GAAG,MAAM,OAAO,CAA4B,iCAAiC,EAAE,EAAE,CAAC,CAAC;QAC7F,OAAO;YACL,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC;SAC1C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listExperts: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
|
|
3
|
+
page_num: z.ZodOptional<z.ZodNumber>;
|
|
4
|
+
page_size: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
items: z.ZodArray<z.ZodObject<{
|
|
7
|
+
id: z.ZodNumber;
|
|
8
|
+
chat_id: z.ZodNumber;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
description: z.ZodString;
|
|
11
|
+
creator_name: z.ZodString;
|
|
12
|
+
icon_url: z.ZodString;
|
|
13
|
+
cover_url: z.ZodString;
|
|
14
|
+
view_count: z.ZodNumber;
|
|
15
|
+
up_vote_count: z.ZodNumber;
|
|
16
|
+
vote_status: z.ZodNumber;
|
|
17
|
+
is_pinned: z.ZodBoolean;
|
|
18
|
+
publish_status: z.ZodNumber;
|
|
19
|
+
create_time: z.ZodNumber;
|
|
20
|
+
update_time: z.ZodNumber;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
has_more: z.ZodBoolean;
|
|
23
|
+
next_token: z.ZodString;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
//# sourceMappingURL=list-experts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-experts.d.ts","sourceRoot":"","sources":["../../src/tools/list-experts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;kBA2BtB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { apiPost } from '../minimax-api.js';
|
|
4
|
+
import { expertSchema, mapExpert } from './schemas.js';
|
|
5
|
+
export const listExperts = defineTool({
|
|
6
|
+
name: 'list_experts',
|
|
7
|
+
displayName: 'List Experts',
|
|
8
|
+
description: 'List your AI experts/agents. Returns paginated results.',
|
|
9
|
+
summary: 'List your AI experts',
|
|
10
|
+
icon: 'bot',
|
|
11
|
+
group: 'Experts',
|
|
12
|
+
input: z.object({
|
|
13
|
+
page_num: z.number().int().min(1).optional().describe('Page number (default 1)'),
|
|
14
|
+
page_size: z.number().int().min(1).max(50).optional().describe('Results per page (default 20)'),
|
|
15
|
+
}),
|
|
16
|
+
output: z.object({
|
|
17
|
+
items: z.array(expertSchema).describe('List of experts'),
|
|
18
|
+
has_more: z.boolean().describe('Whether more results are available'),
|
|
19
|
+
next_token: z.string().describe('Cursor for next page, empty if no more'),
|
|
20
|
+
}),
|
|
21
|
+
handle: async (params) => {
|
|
22
|
+
const data = await apiPost('/matrix/api/v1/expert/list', { page_num: params.page_num ?? 1, page_size: params.page_size ?? 20 });
|
|
23
|
+
return {
|
|
24
|
+
items: (data.expert_items ?? []).map(mapExpert),
|
|
25
|
+
has_more: data.has_more ?? false,
|
|
26
|
+
next_token: data.next_token ?? '',
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=list-experts.js.map
|