cowork-os 0.3.21 → 0.3.23
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 +293 -6
- package/connectors/README.md +20 -0
- package/connectors/asana-mcp/README.md +24 -0
- package/connectors/asana-mcp/dist/index.js +427 -0
- package/connectors/asana-mcp/package.json +15 -0
- package/connectors/asana-mcp/src/index.ts +553 -0
- package/connectors/asana-mcp/tsconfig.json +13 -0
- package/connectors/hubspot-mcp/README.md +35 -0
- package/connectors/hubspot-mcp/dist/index.js +454 -0
- package/connectors/hubspot-mcp/package.json +15 -0
- package/connectors/hubspot-mcp/src/index.ts +562 -0
- package/connectors/hubspot-mcp/tsconfig.json +13 -0
- package/connectors/jira-mcp/README.md +49 -0
- package/connectors/jira-mcp/dist/index.js +588 -0
- package/connectors/jira-mcp/package.json +15 -0
- package/connectors/jira-mcp/src/index.ts +711 -0
- package/connectors/jira-mcp/tsconfig.json +13 -0
- package/connectors/linear-mcp/README.md +22 -0
- package/connectors/linear-mcp/dist/index.js +402 -0
- package/connectors/linear-mcp/package.json +15 -0
- package/connectors/linear-mcp/src/index.ts +522 -0
- package/connectors/linear-mcp/tsconfig.json +13 -0
- package/connectors/okta-mcp/README.md +24 -0
- package/connectors/okta-mcp/dist/index.js +411 -0
- package/connectors/okta-mcp/package.json +15 -0
- package/connectors/okta-mcp/src/index.ts +520 -0
- package/connectors/okta-mcp/tsconfig.json +13 -0
- package/connectors/salesforce-mcp/README.md +47 -0
- package/connectors/salesforce-mcp/dist/index.js +584 -0
- package/connectors/salesforce-mcp/package.json +15 -0
- package/connectors/salesforce-mcp/src/index.ts +722 -0
- package/connectors/salesforce-mcp/tsconfig.json +13 -0
- package/connectors/servicenow-mcp/README.md +26 -0
- package/connectors/servicenow-mcp/dist/index.js +400 -0
- package/connectors/servicenow-mcp/package.json +15 -0
- package/connectors/servicenow-mcp/src/index.ts +500 -0
- package/connectors/servicenow-mcp/tsconfig.json +13 -0
- package/connectors/templates/mcp-connector/README.md +31 -0
- package/connectors/templates/mcp-connector/package.json +15 -0
- package/connectors/templates/mcp-connector/src/index.ts +330 -0
- package/connectors/templates/mcp-connector/tsconfig.json +13 -0
- package/connectors/zendesk-mcp/README.md +40 -0
- package/connectors/zendesk-mcp/dist/index.js +431 -0
- package/connectors/zendesk-mcp/package.json +15 -0
- package/connectors/zendesk-mcp/src/index.ts +543 -0
- package/connectors/zendesk-mcp/tsconfig.json +13 -0
- package/dist/electron/electron/agent/daemon.js +25 -0
- package/dist/electron/electron/agent/executor.js +181 -26
- package/dist/electron/electron/agent/llm/anthropic-compatible-provider.js +177 -0
- package/dist/electron/electron/agent/llm/github-copilot-provider.js +97 -0
- package/dist/electron/electron/agent/llm/groq-provider.js +33 -0
- package/dist/electron/electron/agent/llm/index.js +11 -1
- package/dist/electron/electron/agent/llm/kimi-provider.js +33 -0
- package/dist/electron/electron/agent/llm/openai-compatible-provider.js +116 -0
- package/dist/electron/electron/agent/llm/openai-compatible.js +111 -0
- package/dist/electron/electron/agent/llm/openai-oauth.js +2 -1
- package/dist/electron/electron/agent/llm/openrouter-provider.js +1 -1
- package/dist/electron/electron/agent/llm/provider-factory.js +318 -4
- package/dist/electron/electron/agent/llm/types.js +66 -1
- package/dist/electron/electron/agent/llm/xai-provider.js +33 -0
- package/dist/electron/electron/agent/tools/box-tools.js +231 -0
- package/dist/electron/electron/agent/tools/builtin-settings.js +28 -0
- package/dist/electron/electron/agent/tools/dropbox-tools.js +237 -0
- package/dist/electron/electron/agent/tools/google-drive-tools.js +227 -0
- package/dist/electron/electron/agent/tools/notion-tools.js +312 -0
- package/dist/electron/electron/agent/tools/onedrive-tools.js +217 -0
- package/dist/electron/electron/agent/tools/registry.js +541 -0
- package/dist/electron/electron/agent/tools/sharepoint-tools.js +243 -0
- package/dist/electron/electron/agent/tools/shell-tools.js +12 -3
- package/dist/electron/electron/agent/tools/x-tools.js +1 -1
- package/dist/electron/electron/gateway/index.js +1 -0
- package/dist/electron/electron/gateway/router.js +123 -143
- package/dist/electron/electron/ipc/canvas-handlers.js +5 -0
- package/dist/electron/electron/ipc/handlers.js +627 -158
- package/dist/electron/electron/main.js +63 -0
- package/dist/electron/electron/mcp/oauth/connector-oauth.js +333 -0
- package/dist/electron/electron/mcp/registry/MCPRegistryManager.js +503 -154
- package/dist/electron/electron/memory/MemoryService.js +1 -1
- package/dist/electron/electron/preload.js +74 -1
- package/dist/electron/electron/settings/box-manager.js +54 -0
- package/dist/electron/electron/settings/dropbox-manager.js +54 -0
- package/dist/electron/electron/settings/google-drive-manager.js +54 -0
- package/dist/electron/electron/settings/notion-manager.js +56 -0
- package/dist/electron/electron/settings/onedrive-manager.js +54 -0
- package/dist/electron/electron/settings/sharepoint-manager.js +54 -0
- package/dist/electron/electron/utils/box-api.js +153 -0
- package/dist/electron/electron/utils/dropbox-api.js +144 -0
- package/dist/electron/electron/utils/env-migration.js +19 -0
- package/dist/electron/electron/utils/google-drive-api.js +152 -0
- package/dist/electron/electron/utils/notion-api.js +103 -0
- package/dist/electron/electron/utils/onedrive-api.js +113 -0
- package/dist/electron/electron/utils/sharepoint-api.js +109 -0
- package/dist/electron/electron/utils/validation.js +82 -3
- package/dist/electron/electron/utils/x-cli.js +1 -1
- package/dist/electron/shared/channelMessages.js +284 -3
- package/dist/electron/shared/llm-provider-catalog.js +198 -0
- package/dist/electron/shared/types.js +88 -1
- package/package.json +12 -2
- package/src/electron/agent/executor.ts +205 -28
- package/src/electron/agent/llm/anthropic-compatible-provider.ts +214 -0
- package/src/electron/agent/llm/github-copilot-provider.ts +117 -0
- package/src/electron/agent/llm/groq-provider.ts +39 -0
- package/src/electron/agent/llm/index.ts +5 -0
- package/src/electron/agent/llm/kimi-provider.ts +39 -0
- package/src/electron/agent/llm/openai-compatible-provider.ts +153 -0
- package/src/electron/agent/llm/openai-compatible.ts +133 -0
- package/src/electron/agent/llm/openai-oauth.ts +2 -1
- package/src/electron/agent/llm/openrouter-provider.ts +2 -1
- package/src/electron/agent/llm/provider-factory.ts +414 -6
- package/src/electron/agent/llm/types.ts +90 -1
- package/src/electron/agent/llm/xai-provider.ts +39 -0
- package/src/electron/agent/tools/box-tools.ts +239 -0
- package/src/electron/agent/tools/builtin-settings.ts +34 -0
- package/src/electron/agent/tools/dropbox-tools.ts +237 -0
- package/src/electron/agent/tools/google-drive-tools.ts +228 -0
- package/src/electron/agent/tools/notion-tools.ts +330 -0
- package/src/electron/agent/tools/onedrive-tools.ts +217 -0
- package/src/electron/agent/tools/registry.ts +565 -0
- package/src/electron/agent/tools/sharepoint-tools.ts +247 -0
- package/src/electron/agent/tools/shell-tools.ts +11 -3
- package/src/electron/agent/tools/x-tools.ts +1 -1
- package/src/electron/database/SecureSettingsRepository.ts +7 -1
- package/src/electron/gateway/index.ts +1 -0
- package/src/electron/gateway/router.ts +134 -149
- package/src/electron/ipc/canvas-handlers.ts +10 -0
- package/src/electron/ipc/handlers.ts +673 -153
- package/src/electron/main.ts +35 -0
- package/src/electron/mcp/oauth/connector-oauth.ts +448 -0
- package/src/electron/mcp/registry/MCPRegistryManager.ts +343 -12
- package/src/electron/memory/MemoryService.ts +5 -1
- package/src/electron/preload.ts +167 -4
- package/src/electron/settings/box-manager.ts +58 -0
- package/src/electron/settings/dropbox-manager.ts +58 -0
- package/src/electron/settings/google-drive-manager.ts +58 -0
- package/src/electron/settings/notion-manager.ts +60 -0
- package/src/electron/settings/onedrive-manager.ts +58 -0
- package/src/electron/settings/sharepoint-manager.ts +58 -0
- package/src/electron/utils/box-api.ts +184 -0
- package/src/electron/utils/dropbox-api.ts +171 -0
- package/src/electron/utils/env-migration.ts +22 -0
- package/src/electron/utils/google-drive-api.ts +183 -0
- package/src/electron/utils/notion-api.ts +126 -0
- package/src/electron/utils/onedrive-api.ts +137 -0
- package/src/electron/utils/sharepoint-api.ts +132 -0
- package/src/electron/utils/validation.ts +102 -1
- package/src/electron/utils/x-cli.ts +1 -1
- package/src/renderer/App.tsx +20 -2
- package/src/renderer/components/BoxSettings.tsx +203 -0
- package/src/renderer/components/BrowserView.tsx +101 -0
- package/src/renderer/components/BuiltinToolsSettings.tsx +105 -0
- package/src/renderer/components/CanvasPreview.tsx +68 -1
- package/src/renderer/components/ConnectorEnvModal.tsx +116 -0
- package/src/renderer/components/ConnectorSetupModal.tsx +566 -0
- package/src/renderer/components/ConnectorsSettings.tsx +397 -0
- package/src/renderer/components/DropboxSettings.tsx +202 -0
- package/src/renderer/components/GoogleDriveSettings.tsx +201 -0
- package/src/renderer/components/MCPSettings.tsx +56 -0
- package/src/renderer/components/MainContent.tsx +270 -34
- package/src/renderer/components/NotionSettings.tsx +231 -0
- package/src/renderer/components/Onboarding/Onboarding.tsx +13 -1
- package/src/renderer/components/OnboardingModal.tsx +70 -1
- package/src/renderer/components/OneDriveSettings.tsx +212 -0
- package/src/renderer/components/Settings.tsx +611 -8
- package/src/renderer/components/SharePointSettings.tsx +224 -0
- package/src/renderer/components/Sidebar.tsx +25 -9
- package/src/renderer/hooks/useOnboardingFlow.ts +21 -0
- package/src/renderer/styles/index.css +438 -25
- package/src/shared/channelMessages.ts +367 -4
- package/src/shared/llm-provider-catalog.ts +217 -0
- package/src/shared/types.ts +226 -1
|
@@ -18,6 +18,12 @@ import { CronTools } from './cron-tools';
|
|
|
18
18
|
import { CanvasTools } from './canvas-tools';
|
|
19
19
|
import { MentionTools } from './mention-tools';
|
|
20
20
|
import { XTools } from './x-tools';
|
|
21
|
+
import { NotionTools } from './notion-tools';
|
|
22
|
+
import { BoxTools } from './box-tools';
|
|
23
|
+
import { OneDriveTools } from './onedrive-tools';
|
|
24
|
+
import { GoogleDriveTools } from './google-drive-tools';
|
|
25
|
+
import { DropboxTools } from './dropbox-tools';
|
|
26
|
+
import { SharePointTools } from './sharepoint-tools';
|
|
21
27
|
import { LLMTool } from '../llm/types';
|
|
22
28
|
import { SearchProviderFactory } from '../search';
|
|
23
29
|
import { MCPClientManager } from '../../mcp/client/MCPClientManager';
|
|
@@ -48,6 +54,12 @@ export class ToolRegistry {
|
|
|
48
54
|
private canvasTools: CanvasTools;
|
|
49
55
|
private mentionTools: MentionTools;
|
|
50
56
|
private xTools: XTools;
|
|
57
|
+
private notionTools: NotionTools;
|
|
58
|
+
private boxTools: BoxTools;
|
|
59
|
+
private oneDriveTools: OneDriveTools;
|
|
60
|
+
private googleDriveTools: GoogleDriveTools;
|
|
61
|
+
private dropboxTools: DropboxTools;
|
|
62
|
+
private sharePointTools: SharePointTools;
|
|
51
63
|
private gatewayContext?: GatewayContextType;
|
|
52
64
|
private shadowedToolsLogged = false;
|
|
53
65
|
|
|
@@ -72,6 +84,12 @@ export class ToolRegistry {
|
|
|
72
84
|
this.canvasTools = new CanvasTools(workspace, daemon, taskId);
|
|
73
85
|
this.mentionTools = new MentionTools(workspace.id, taskId, daemon);
|
|
74
86
|
this.xTools = new XTools(workspace, daemon, taskId);
|
|
87
|
+
this.notionTools = new NotionTools(workspace, daemon, taskId);
|
|
88
|
+
this.boxTools = new BoxTools(workspace, daemon, taskId);
|
|
89
|
+
this.oneDriveTools = new OneDriveTools(workspace, daemon, taskId);
|
|
90
|
+
this.googleDriveTools = new GoogleDriveTools(workspace, daemon, taskId);
|
|
91
|
+
this.dropboxTools = new DropboxTools(workspace, daemon, taskId);
|
|
92
|
+
this.sharePointTools = new SharePointTools(workspace, daemon, taskId);
|
|
75
93
|
this.gatewayContext = gatewayContext;
|
|
76
94
|
}
|
|
77
95
|
|
|
@@ -102,6 +120,12 @@ export class ToolRegistry {
|
|
|
102
120
|
this.cronTools.setWorkspace(workspace);
|
|
103
121
|
this.canvasTools.setWorkspace(workspace);
|
|
104
122
|
this.xTools.setWorkspace(workspace);
|
|
123
|
+
this.notionTools.setWorkspace(workspace);
|
|
124
|
+
this.boxTools.setWorkspace(workspace);
|
|
125
|
+
this.oneDriveTools.setWorkspace(workspace);
|
|
126
|
+
this.googleDriveTools.setWorkspace(workspace);
|
|
127
|
+
this.dropboxTools.setWorkspace(workspace);
|
|
128
|
+
this.sharePointTools.setWorkspace(workspace);
|
|
105
129
|
}
|
|
106
130
|
|
|
107
131
|
/**
|
|
@@ -175,6 +199,36 @@ export class ToolRegistry {
|
|
|
175
199
|
allTools.push(...this.getXToolDefinitions());
|
|
176
200
|
}
|
|
177
201
|
|
|
202
|
+
// Only add Notion tool if integration is enabled
|
|
203
|
+
if (NotionTools.isEnabled()) {
|
|
204
|
+
allTools.push(...this.getNotionToolDefinitions());
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Only add Box tool if integration is enabled
|
|
208
|
+
if (BoxTools.isEnabled()) {
|
|
209
|
+
allTools.push(...this.getBoxToolDefinitions());
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Only add OneDrive tool if integration is enabled
|
|
213
|
+
if (OneDriveTools.isEnabled()) {
|
|
214
|
+
allTools.push(...this.getOneDriveToolDefinitions());
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Only add Google Drive tool if integration is enabled
|
|
218
|
+
if (GoogleDriveTools.isEnabled()) {
|
|
219
|
+
allTools.push(...this.getGoogleDriveToolDefinitions());
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Only add Dropbox tool if integration is enabled
|
|
223
|
+
if (DropboxTools.isEnabled()) {
|
|
224
|
+
allTools.push(...this.getDropboxToolDefinitions());
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Only add SharePoint tool if integration is enabled
|
|
228
|
+
if (SharePointTools.isEnabled()) {
|
|
229
|
+
allTools.push(...this.getSharePointToolDefinitions());
|
|
230
|
+
}
|
|
231
|
+
|
|
178
232
|
// Only add shell tool if workspace has shell permission
|
|
179
233
|
if (this.workspace.permissions.shell) {
|
|
180
234
|
allTools.push(...this.getShellToolDefinitions());
|
|
@@ -625,6 +679,24 @@ ${skillDescriptions}`;
|
|
|
625
679
|
// X/Twitter tools
|
|
626
680
|
if (name === 'x_action') return await this.xTools.executeAction(input);
|
|
627
681
|
|
|
682
|
+
// Notion tools
|
|
683
|
+
if (name === 'notion_action') return await this.notionTools.executeAction(input);
|
|
684
|
+
|
|
685
|
+
// Box tools
|
|
686
|
+
if (name === 'box_action') return await this.boxTools.executeAction(input);
|
|
687
|
+
|
|
688
|
+
// OneDrive tools
|
|
689
|
+
if (name === 'onedrive_action') return await this.oneDriveTools.executeAction(input);
|
|
690
|
+
|
|
691
|
+
// Google Drive tools
|
|
692
|
+
if (name === 'google_drive_action') return await this.googleDriveTools.executeAction(input);
|
|
693
|
+
|
|
694
|
+
// Dropbox tools
|
|
695
|
+
if (name === 'dropbox_action') return await this.dropboxTools.executeAction(input);
|
|
696
|
+
|
|
697
|
+
// SharePoint tools
|
|
698
|
+
if (name === 'sharepoint_action') return await this.sharePointTools.executeAction(input);
|
|
699
|
+
|
|
628
700
|
// Shell tools
|
|
629
701
|
if (name === 'run_command') return await this.shellTools.runCommand(input.command, input);
|
|
630
702
|
|
|
@@ -2035,6 +2107,499 @@ ${skillDescriptions}`;
|
|
|
2035
2107
|
];
|
|
2036
2108
|
}
|
|
2037
2109
|
|
|
2110
|
+
/**
|
|
2111
|
+
* Define Notion tools
|
|
2112
|
+
*/
|
|
2113
|
+
private getNotionToolDefinitions(): LLMTool[] {
|
|
2114
|
+
return [
|
|
2115
|
+
{
|
|
2116
|
+
name: 'notion_action',
|
|
2117
|
+
description:
|
|
2118
|
+
'Use the connected Notion account to search, read, and update pages/data sources. ' +
|
|
2119
|
+
'Write actions (create/update/append) require user approval.',
|
|
2120
|
+
input_schema: {
|
|
2121
|
+
type: 'object',
|
|
2122
|
+
properties: {
|
|
2123
|
+
action: {
|
|
2124
|
+
type: 'string',
|
|
2125
|
+
enum: [
|
|
2126
|
+
'search',
|
|
2127
|
+
'list_users',
|
|
2128
|
+
'get_user',
|
|
2129
|
+
'get_page',
|
|
2130
|
+
'get_page_property',
|
|
2131
|
+
'get_database',
|
|
2132
|
+
'get_block',
|
|
2133
|
+
'get_block_children',
|
|
2134
|
+
'update_block',
|
|
2135
|
+
'delete_block',
|
|
2136
|
+
'create_page',
|
|
2137
|
+
'update_page',
|
|
2138
|
+
'append_blocks',
|
|
2139
|
+
'query_data_source',
|
|
2140
|
+
'get_data_source',
|
|
2141
|
+
'create_data_source',
|
|
2142
|
+
'update_data_source',
|
|
2143
|
+
],
|
|
2144
|
+
description: 'Action to perform',
|
|
2145
|
+
},
|
|
2146
|
+
query: {
|
|
2147
|
+
type: 'string',
|
|
2148
|
+
description: 'Search query (for search)',
|
|
2149
|
+
},
|
|
2150
|
+
user_id: {
|
|
2151
|
+
type: 'string',
|
|
2152
|
+
description: 'User ID (for get_user)',
|
|
2153
|
+
},
|
|
2154
|
+
page_id: {
|
|
2155
|
+
type: 'string',
|
|
2156
|
+
description: 'Page ID (for get_page/update_page)',
|
|
2157
|
+
},
|
|
2158
|
+
property_id: {
|
|
2159
|
+
type: 'string',
|
|
2160
|
+
description: 'Property ID (for get_page_property)',
|
|
2161
|
+
},
|
|
2162
|
+
block_id: {
|
|
2163
|
+
type: 'string',
|
|
2164
|
+
description: 'Block ID (for get_block/get_block_children/append_blocks/update_block/delete_block)',
|
|
2165
|
+
},
|
|
2166
|
+
block_type: {
|
|
2167
|
+
type: 'string',
|
|
2168
|
+
description: 'Block type key for update_block (e.g., "paragraph")',
|
|
2169
|
+
},
|
|
2170
|
+
block: {
|
|
2171
|
+
type: 'object',
|
|
2172
|
+
description: 'Block payload for update_block (e.g., { rich_text: [...] })',
|
|
2173
|
+
},
|
|
2174
|
+
data_source_id: {
|
|
2175
|
+
type: 'string',
|
|
2176
|
+
description: 'Data source ID (for query_data_source/get_data_source)',
|
|
2177
|
+
},
|
|
2178
|
+
database_id: {
|
|
2179
|
+
type: 'string',
|
|
2180
|
+
description: 'Database ID (for create_page/get_database)',
|
|
2181
|
+
},
|
|
2182
|
+
parent_page_id: {
|
|
2183
|
+
type: 'string',
|
|
2184
|
+
description: 'Parent page ID (for create_page or create_data_source)',
|
|
2185
|
+
},
|
|
2186
|
+
properties: {
|
|
2187
|
+
type: 'object',
|
|
2188
|
+
description: 'Notion properties payload for create/update',
|
|
2189
|
+
},
|
|
2190
|
+
children: {
|
|
2191
|
+
type: 'array',
|
|
2192
|
+
description: 'Block children payload for append_blocks',
|
|
2193
|
+
items: { type: 'object' },
|
|
2194
|
+
},
|
|
2195
|
+
filter: {
|
|
2196
|
+
type: 'object',
|
|
2197
|
+
description: 'Filter object for search/query',
|
|
2198
|
+
},
|
|
2199
|
+
sort: {
|
|
2200
|
+
type: 'object',
|
|
2201
|
+
description: 'Sort object for search',
|
|
2202
|
+
},
|
|
2203
|
+
sorts: {
|
|
2204
|
+
type: 'array',
|
|
2205
|
+
description: 'Sorts array for search/query',
|
|
2206
|
+
items: { type: 'object' },
|
|
2207
|
+
},
|
|
2208
|
+
start_cursor: {
|
|
2209
|
+
type: 'string',
|
|
2210
|
+
description: 'Pagination cursor',
|
|
2211
|
+
},
|
|
2212
|
+
page_size: {
|
|
2213
|
+
type: 'number',
|
|
2214
|
+
description: 'Pagination page size',
|
|
2215
|
+
},
|
|
2216
|
+
archived: {
|
|
2217
|
+
type: 'boolean',
|
|
2218
|
+
description: 'Archive/unarchive page (for update_page)',
|
|
2219
|
+
},
|
|
2220
|
+
icon: {
|
|
2221
|
+
type: 'object',
|
|
2222
|
+
description: 'Icon payload (for create/update)',
|
|
2223
|
+
},
|
|
2224
|
+
cover: {
|
|
2225
|
+
type: 'object',
|
|
2226
|
+
description: 'Cover payload (for create/update)',
|
|
2227
|
+
},
|
|
2228
|
+
title: {
|
|
2229
|
+
type: 'string',
|
|
2230
|
+
description: 'Title for create_data_source/update_data_source',
|
|
2231
|
+
},
|
|
2232
|
+
is_inline: {
|
|
2233
|
+
type: 'boolean',
|
|
2234
|
+
description: 'Create inline data source (for create_data_source)',
|
|
2235
|
+
},
|
|
2236
|
+
payload: {
|
|
2237
|
+
type: 'object',
|
|
2238
|
+
description: 'Raw request body to send directly (advanced use)',
|
|
2239
|
+
},
|
|
2240
|
+
},
|
|
2241
|
+
required: ['action'],
|
|
2242
|
+
},
|
|
2243
|
+
},
|
|
2244
|
+
];
|
|
2245
|
+
}
|
|
2246
|
+
|
|
2247
|
+
/**
|
|
2248
|
+
* Define Box tools
|
|
2249
|
+
*/
|
|
2250
|
+
private getBoxToolDefinitions(): LLMTool[] {
|
|
2251
|
+
return [
|
|
2252
|
+
{
|
|
2253
|
+
name: 'box_action',
|
|
2254
|
+
description:
|
|
2255
|
+
'Use the connected Box account to search, read, and manage files/folders. ' +
|
|
2256
|
+
'Write actions (create/upload/delete) require user approval.',
|
|
2257
|
+
input_schema: {
|
|
2258
|
+
type: 'object',
|
|
2259
|
+
properties: {
|
|
2260
|
+
action: {
|
|
2261
|
+
type: 'string',
|
|
2262
|
+
enum: [
|
|
2263
|
+
'get_current_user',
|
|
2264
|
+
'search',
|
|
2265
|
+
'get_file',
|
|
2266
|
+
'get_folder',
|
|
2267
|
+
'list_folder_items',
|
|
2268
|
+
'create_folder',
|
|
2269
|
+
'delete_file',
|
|
2270
|
+
'delete_folder',
|
|
2271
|
+
'upload_file',
|
|
2272
|
+
],
|
|
2273
|
+
description: 'Action to perform',
|
|
2274
|
+
},
|
|
2275
|
+
query: {
|
|
2276
|
+
type: 'string',
|
|
2277
|
+
description: 'Search query (for search)',
|
|
2278
|
+
},
|
|
2279
|
+
limit: {
|
|
2280
|
+
type: 'number',
|
|
2281
|
+
description: 'Max results (for search/list_folder_items)',
|
|
2282
|
+
},
|
|
2283
|
+
offset: {
|
|
2284
|
+
type: 'number',
|
|
2285
|
+
description: 'Offset for pagination (for search/list_folder_items)',
|
|
2286
|
+
},
|
|
2287
|
+
fields: {
|
|
2288
|
+
type: 'string',
|
|
2289
|
+
description: 'Comma-separated fields to return',
|
|
2290
|
+
},
|
|
2291
|
+
type: {
|
|
2292
|
+
type: 'string',
|
|
2293
|
+
enum: ['file', 'folder', 'web_link'],
|
|
2294
|
+
description: 'Filter search results by type',
|
|
2295
|
+
},
|
|
2296
|
+
ancestor_folder_ids: {
|
|
2297
|
+
type: 'string',
|
|
2298
|
+
description: 'Comma-separated ancestor folder IDs for search',
|
|
2299
|
+
},
|
|
2300
|
+
file_extensions: {
|
|
2301
|
+
type: 'string',
|
|
2302
|
+
description: 'Comma-separated file extensions for search',
|
|
2303
|
+
},
|
|
2304
|
+
content_types: {
|
|
2305
|
+
type: 'string',
|
|
2306
|
+
description: 'Comma-separated content types for search',
|
|
2307
|
+
},
|
|
2308
|
+
scope: {
|
|
2309
|
+
type: 'string',
|
|
2310
|
+
description: 'Search scope (e.g., user_content)',
|
|
2311
|
+
},
|
|
2312
|
+
folder_id: {
|
|
2313
|
+
type: 'string',
|
|
2314
|
+
description: 'Folder ID (for get_folder/list_folder_items/delete_folder)',
|
|
2315
|
+
},
|
|
2316
|
+
file_id: {
|
|
2317
|
+
type: 'string',
|
|
2318
|
+
description: 'File ID (for get_file/delete_file)',
|
|
2319
|
+
},
|
|
2320
|
+
parent_id: {
|
|
2321
|
+
type: 'string',
|
|
2322
|
+
description: 'Parent folder ID (for create_folder/upload_file). Defaults to root.',
|
|
2323
|
+
},
|
|
2324
|
+
name: {
|
|
2325
|
+
type: 'string',
|
|
2326
|
+
description: 'Name for create_folder/upload_file',
|
|
2327
|
+
},
|
|
2328
|
+
file_path: {
|
|
2329
|
+
type: 'string',
|
|
2330
|
+
description: 'Workspace-relative path to upload (for upload_file)',
|
|
2331
|
+
},
|
|
2332
|
+
},
|
|
2333
|
+
required: ['action'],
|
|
2334
|
+
},
|
|
2335
|
+
},
|
|
2336
|
+
];
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
/**
|
|
2340
|
+
* Define OneDrive tools
|
|
2341
|
+
*/
|
|
2342
|
+
private getOneDriveToolDefinitions(): LLMTool[] {
|
|
2343
|
+
return [
|
|
2344
|
+
{
|
|
2345
|
+
name: 'onedrive_action',
|
|
2346
|
+
description:
|
|
2347
|
+
'Use the connected OneDrive account to search, read, and manage files/folders. ' +
|
|
2348
|
+
'Write actions (create/upload/delete) require user approval.',
|
|
2349
|
+
input_schema: {
|
|
2350
|
+
type: 'object',
|
|
2351
|
+
properties: {
|
|
2352
|
+
action: {
|
|
2353
|
+
type: 'string',
|
|
2354
|
+
enum: [
|
|
2355
|
+
'get_drive',
|
|
2356
|
+
'search',
|
|
2357
|
+
'list_children',
|
|
2358
|
+
'get_item',
|
|
2359
|
+
'create_folder',
|
|
2360
|
+
'upload_file',
|
|
2361
|
+
'delete_item',
|
|
2362
|
+
],
|
|
2363
|
+
description: 'Action to perform',
|
|
2364
|
+
},
|
|
2365
|
+
drive_id: {
|
|
2366
|
+
type: 'string',
|
|
2367
|
+
description: 'Drive ID override (optional)',
|
|
2368
|
+
},
|
|
2369
|
+
item_id: {
|
|
2370
|
+
type: 'string',
|
|
2371
|
+
description: 'Item ID (for get_item/list_children/delete_item)',
|
|
2372
|
+
},
|
|
2373
|
+
query: {
|
|
2374
|
+
type: 'string',
|
|
2375
|
+
description: 'Search query (for search)',
|
|
2376
|
+
},
|
|
2377
|
+
parent_id: {
|
|
2378
|
+
type: 'string',
|
|
2379
|
+
description: 'Parent folder ID (for create_folder/upload_file)',
|
|
2380
|
+
},
|
|
2381
|
+
name: {
|
|
2382
|
+
type: 'string',
|
|
2383
|
+
description: 'Name for create_folder or uploaded file',
|
|
2384
|
+
},
|
|
2385
|
+
conflict_behavior: {
|
|
2386
|
+
type: 'string',
|
|
2387
|
+
enum: ['rename', 'fail', 'replace'],
|
|
2388
|
+
description: 'Conflict behavior for create_folder',
|
|
2389
|
+
},
|
|
2390
|
+
file_path: {
|
|
2391
|
+
type: 'string',
|
|
2392
|
+
description: 'Workspace-relative path to upload (for upload_file)',
|
|
2393
|
+
},
|
|
2394
|
+
remote_path: {
|
|
2395
|
+
type: 'string',
|
|
2396
|
+
description: 'Remote path (for upload_file, relative to root)',
|
|
2397
|
+
},
|
|
2398
|
+
},
|
|
2399
|
+
required: ['action'],
|
|
2400
|
+
},
|
|
2401
|
+
},
|
|
2402
|
+
];
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
/**
|
|
2406
|
+
* Define Google Drive tools
|
|
2407
|
+
*/
|
|
2408
|
+
private getGoogleDriveToolDefinitions(): LLMTool[] {
|
|
2409
|
+
return [
|
|
2410
|
+
{
|
|
2411
|
+
name: 'google_drive_action',
|
|
2412
|
+
description:
|
|
2413
|
+
'Use the connected Google Drive account to search, read, and manage files/folders. ' +
|
|
2414
|
+
'Write actions (create/upload/delete) require user approval.',
|
|
2415
|
+
input_schema: {
|
|
2416
|
+
type: 'object',
|
|
2417
|
+
properties: {
|
|
2418
|
+
action: {
|
|
2419
|
+
type: 'string',
|
|
2420
|
+
enum: [
|
|
2421
|
+
'get_current_user',
|
|
2422
|
+
'list_files',
|
|
2423
|
+
'get_file',
|
|
2424
|
+
'create_folder',
|
|
2425
|
+
'upload_file',
|
|
2426
|
+
'delete_file',
|
|
2427
|
+
],
|
|
2428
|
+
description: 'Action to perform',
|
|
2429
|
+
},
|
|
2430
|
+
query: {
|
|
2431
|
+
type: 'string',
|
|
2432
|
+
description: 'Search query (Drive query syntax) for list_files',
|
|
2433
|
+
},
|
|
2434
|
+
page_size: {
|
|
2435
|
+
type: 'number',
|
|
2436
|
+
description: 'Max results (for list_files)',
|
|
2437
|
+
},
|
|
2438
|
+
page_token: {
|
|
2439
|
+
type: 'string',
|
|
2440
|
+
description: 'Pagination token (for list_files)',
|
|
2441
|
+
},
|
|
2442
|
+
fields: {
|
|
2443
|
+
type: 'string',
|
|
2444
|
+
description: 'Fields selector (for list_files/get_file)',
|
|
2445
|
+
},
|
|
2446
|
+
file_id: {
|
|
2447
|
+
type: 'string',
|
|
2448
|
+
description: 'File ID (for get_file/delete_file)',
|
|
2449
|
+
},
|
|
2450
|
+
parent_id: {
|
|
2451
|
+
type: 'string',
|
|
2452
|
+
description: 'Parent folder ID (for create_folder/upload_file)',
|
|
2453
|
+
},
|
|
2454
|
+
name: {
|
|
2455
|
+
type: 'string',
|
|
2456
|
+
description: 'Name for create_folder/upload_file',
|
|
2457
|
+
},
|
|
2458
|
+
file_path: {
|
|
2459
|
+
type: 'string',
|
|
2460
|
+
description: 'Workspace-relative path to upload (for upload_file)',
|
|
2461
|
+
},
|
|
2462
|
+
},
|
|
2463
|
+
required: ['action'],
|
|
2464
|
+
},
|
|
2465
|
+
},
|
|
2466
|
+
];
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
/**
|
|
2470
|
+
* Define Dropbox tools
|
|
2471
|
+
*/
|
|
2472
|
+
private getDropboxToolDefinitions(): LLMTool[] {
|
|
2473
|
+
return [
|
|
2474
|
+
{
|
|
2475
|
+
name: 'dropbox_action',
|
|
2476
|
+
description:
|
|
2477
|
+
'Use the connected Dropbox account to search, read, and manage files/folders. ' +
|
|
2478
|
+
'Write actions (create/upload/delete) require user approval.',
|
|
2479
|
+
input_schema: {
|
|
2480
|
+
type: 'object',
|
|
2481
|
+
properties: {
|
|
2482
|
+
action: {
|
|
2483
|
+
type: 'string',
|
|
2484
|
+
enum: [
|
|
2485
|
+
'get_current_user',
|
|
2486
|
+
'list_folder',
|
|
2487
|
+
'list_folder_continue',
|
|
2488
|
+
'search',
|
|
2489
|
+
'get_metadata',
|
|
2490
|
+
'create_folder',
|
|
2491
|
+
'delete_item',
|
|
2492
|
+
'upload_file',
|
|
2493
|
+
],
|
|
2494
|
+
description: 'Action to perform',
|
|
2495
|
+
},
|
|
2496
|
+
path: {
|
|
2497
|
+
type: 'string',
|
|
2498
|
+
description: 'Dropbox path (for list_folder/get_metadata/create_folder/delete_item/upload_file)',
|
|
2499
|
+
},
|
|
2500
|
+
query: {
|
|
2501
|
+
type: 'string',
|
|
2502
|
+
description: 'Search query (for search)',
|
|
2503
|
+
},
|
|
2504
|
+
limit: {
|
|
2505
|
+
type: 'number',
|
|
2506
|
+
description: 'Max results (for list/search)',
|
|
2507
|
+
},
|
|
2508
|
+
cursor: {
|
|
2509
|
+
type: 'string',
|
|
2510
|
+
description: 'Pagination cursor (for list_folder_continue)',
|
|
2511
|
+
},
|
|
2512
|
+
name: {
|
|
2513
|
+
type: 'string',
|
|
2514
|
+
description: 'Name for upload_file',
|
|
2515
|
+
},
|
|
2516
|
+
parent_path: {
|
|
2517
|
+
type: 'string',
|
|
2518
|
+
description: 'Parent folder path (for upload_file when path not provided)',
|
|
2519
|
+
},
|
|
2520
|
+
file_path: {
|
|
2521
|
+
type: 'string',
|
|
2522
|
+
description: 'Workspace-relative path to upload (for upload_file)',
|
|
2523
|
+
},
|
|
2524
|
+
},
|
|
2525
|
+
required: ['action'],
|
|
2526
|
+
},
|
|
2527
|
+
},
|
|
2528
|
+
];
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
/**
|
|
2532
|
+
* Define SharePoint tools
|
|
2533
|
+
*/
|
|
2534
|
+
private getSharePointToolDefinitions(): LLMTool[] {
|
|
2535
|
+
return [
|
|
2536
|
+
{
|
|
2537
|
+
name: 'sharepoint_action',
|
|
2538
|
+
description:
|
|
2539
|
+
'Use the connected SharePoint account to search sites and manage drive items. ' +
|
|
2540
|
+
'Write actions (create/upload/delete) require user approval.',
|
|
2541
|
+
input_schema: {
|
|
2542
|
+
type: 'object',
|
|
2543
|
+
properties: {
|
|
2544
|
+
action: {
|
|
2545
|
+
type: 'string',
|
|
2546
|
+
enum: [
|
|
2547
|
+
'get_current_user',
|
|
2548
|
+
'search_sites',
|
|
2549
|
+
'get_site',
|
|
2550
|
+
'list_site_drives',
|
|
2551
|
+
'list_drive_items',
|
|
2552
|
+
'get_item',
|
|
2553
|
+
'create_folder',
|
|
2554
|
+
'upload_file',
|
|
2555
|
+
'delete_item',
|
|
2556
|
+
],
|
|
2557
|
+
description: 'Action to perform',
|
|
2558
|
+
},
|
|
2559
|
+
site_id: {
|
|
2560
|
+
type: 'string',
|
|
2561
|
+
description: 'Site ID (for get_site/list_site_drives)',
|
|
2562
|
+
},
|
|
2563
|
+
drive_id: {
|
|
2564
|
+
type: 'string',
|
|
2565
|
+
description: 'Drive ID (for list/get/create/upload/delete)',
|
|
2566
|
+
},
|
|
2567
|
+
item_id: {
|
|
2568
|
+
type: 'string',
|
|
2569
|
+
description: 'Item ID (for list_drive_items/get_item/delete_item)',
|
|
2570
|
+
},
|
|
2571
|
+
query: {
|
|
2572
|
+
type: 'string',
|
|
2573
|
+
description: 'Search query (for search_sites)',
|
|
2574
|
+
},
|
|
2575
|
+
parent_id: {
|
|
2576
|
+
type: 'string',
|
|
2577
|
+
description: 'Parent folder ID (for create_folder/upload_file)',
|
|
2578
|
+
},
|
|
2579
|
+
name: {
|
|
2580
|
+
type: 'string',
|
|
2581
|
+
description: 'Name for create_folder/upload_file',
|
|
2582
|
+
},
|
|
2583
|
+
conflict_behavior: {
|
|
2584
|
+
type: 'string',
|
|
2585
|
+
enum: ['rename', 'fail', 'replace'],
|
|
2586
|
+
description: 'Conflict behavior for create_folder',
|
|
2587
|
+
},
|
|
2588
|
+
file_path: {
|
|
2589
|
+
type: 'string',
|
|
2590
|
+
description: 'Workspace-relative path to upload (for upload_file)',
|
|
2591
|
+
},
|
|
2592
|
+
remote_path: {
|
|
2593
|
+
type: 'string',
|
|
2594
|
+
description: 'Remote path (for upload_file, relative to root)',
|
|
2595
|
+
},
|
|
2596
|
+
},
|
|
2597
|
+
required: ['action'],
|
|
2598
|
+
},
|
|
2599
|
+
},
|
|
2600
|
+
];
|
|
2601
|
+
}
|
|
2602
|
+
|
|
2038
2603
|
/**
|
|
2039
2604
|
* Define shell tools
|
|
2040
2605
|
*/
|