feat(tools): add Google Docs, Drive, and Tasks read-only tools
Add three new Google service integrations following the established Gmail/GCal pattern: - Google Docs (docs.list, docs.search, docs.read): list, search, and read document content as plain text via Docs + Drive APIs - Google Drive (drive.list, drive.search, drive.read): list, search, and read files with export support for Workspace files (Docs→text, Sheets→CSV, Slides→text) - Google Tasks (tasks.lists, tasks.list): list task lists and tasks with status, due dates, and notes Each service has its own config section, OAuth auth command, tool policy group, and test suite (53 new tests). The setup wizard now offers to configure all Google services together and run OAuth auth flows automatically after saving config. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+22
-1
@@ -82,7 +82,7 @@ export function registerTuiCommand(program: Command): void {
|
||||
setLogLevel(tuiLogLevel);
|
||||
const { MinimalTui, startFullscreenTui } = await import('../frontends/tui/index.js');
|
||||
const { NativeAgent } = await import('../backends/index.js');
|
||||
const { ToolRegistry, ToolExecutor, allBuiltinTools, createWebSearchTools, createProcessTools, ProcessManager, createGmailTools, createGcalTools } = await import('../tools/index.js');
|
||||
const { ToolRegistry, ToolExecutor, allBuiltinTools, createWebSearchTools, createProcessTools, ProcessManager, createGmailTools, createGcalTools, createGdocsTools, createGdriveTools, createGtasksTools } = await import('../tools/index.js');
|
||||
const { HookEngine } = await import('../hooks/index.js');
|
||||
const { createModelRouter } = await import('../daemon/index.js');
|
||||
|
||||
@@ -153,6 +153,27 @@ export function registerTuiCommand(program: Command): void {
|
||||
}
|
||||
}
|
||||
|
||||
// Register Google Docs tools if configured
|
||||
if (config.automation.gdocs?.enabled) {
|
||||
for (const tool of createGdocsTools(config.automation.gdocs)) {
|
||||
toolRegistry.register(tool);
|
||||
}
|
||||
}
|
||||
|
||||
// Register Google Drive tools if configured
|
||||
if (config.automation.gdrive?.enabled) {
|
||||
for (const tool of createGdriveTools(config.automation.gdrive)) {
|
||||
toolRegistry.register(tool);
|
||||
}
|
||||
}
|
||||
|
||||
// Register Google Tasks tools if configured
|
||||
if (config.automation.gtasks?.enabled) {
|
||||
for (const tool of createGtasksTools(config.automation.gtasks)) {
|
||||
toolRegistry.register(tool);
|
||||
}
|
||||
}
|
||||
|
||||
const toolExecutor = new ToolExecutor(toolRegistry, hookEngine);
|
||||
|
||||
const session = sessionManager.getSession('tui', 'local');
|
||||
|
||||
Reference in New Issue
Block a user