@useactor/core 0.1.0 → 0.2.3
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/dist/auth/google-auth.d.ts +75 -0
- package/dist/auth/google-auth.d.ts.map +1 -0
- package/dist/auth/google-auth.js +447 -0
- package/dist/auth/google-auth.js.map +1 -0
- package/dist/auth/oauth-callback-page.d.ts +4 -0
- package/dist/auth/oauth-callback-page.d.ts.map +1 -0
- package/dist/auth/oauth-callback-page.js +131 -0
- package/dist/auth/oauth-callback-page.js.map +1 -0
- package/dist/auth/openai-auth.d.ts +48 -0
- package/dist/auth/openai-auth.d.ts.map +1 -0
- package/dist/auth/openai-auth.js +350 -0
- package/dist/auth/openai-auth.js.map +1 -0
- package/dist/{artifacts.d.ts → events/artifacts.d.ts} +1 -1
- package/dist/events/artifacts.d.ts.map +1 -0
- package/dist/events/artifacts.js.map +1 -0
- package/dist/{events.d.ts → events/events.d.ts} +16 -2
- package/dist/events/events.d.ts.map +1 -0
- package/dist/{events.js → events/events.js} +3 -0
- package/dist/events/events.js.map +1 -0
- package/dist/{feedback.d.ts → events/feedback.d.ts} +1 -1
- package/dist/events/feedback.d.ts.map +1 -0
- package/dist/events/feedback.js.map +1 -0
- package/dist/{local-event-logger.d.ts → events/local-event-logger.d.ts} +1 -1
- package/dist/events/local-event-logger.d.ts.map +1 -0
- package/dist/{local-event-logger.js → events/local-event-logger.js} +11 -0
- package/dist/events/local-event-logger.js.map +1 -0
- package/dist/{local-event-schema.d.ts → events/local-event-schema.d.ts} +10 -3
- package/dist/events/local-event-schema.d.ts.map +1 -0
- package/dist/events/local-event-schema.js.map +1 -0
- package/dist/index.d.ts +59 -35
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +59 -35
- package/dist/index.js.map +1 -1
- package/dist/integrations/built-in-integrations.d.ts +2 -0
- package/dist/integrations/built-in-integrations.d.ts.map +1 -0
- package/dist/integrations/built-in-integrations.js +2 -0
- package/dist/integrations/built-in-integrations.js.map +1 -0
- package/dist/integrations/first-party-cli-integration.d.ts +2 -0
- package/dist/integrations/first-party-cli-integration.d.ts.map +1 -0
- package/dist/integrations/first-party-cli-integration.js +2 -0
- package/dist/integrations/first-party-cli-integration.js.map +1 -0
- package/dist/integrations/google-workspace-integration.d.ts +2 -0
- package/dist/integrations/google-workspace-integration.d.ts.map +1 -0
- package/dist/integrations/google-workspace-integration.js +2 -0
- package/dist/integrations/google-workspace-integration.js.map +1 -0
- package/dist/integrations/integrations.d.ts +2 -0
- package/dist/integrations/integrations.d.ts.map +1 -0
- package/dist/integrations/integrations.js +2 -0
- package/dist/integrations/integrations.js.map +1 -0
- package/dist/integrations/monoid-integration.d.ts +2 -0
- package/dist/integrations/monoid-integration.d.ts.map +1 -0
- package/dist/integrations/monoid-integration.js +2 -0
- package/dist/integrations/monoid-integration.js.map +1 -0
- package/dist/integrations/pilfer-integration.d.ts +2 -0
- package/dist/integrations/pilfer-integration.d.ts.map +1 -0
- package/dist/integrations/pilfer-integration.js +2 -0
- package/dist/integrations/pilfer-integration.js.map +1 -0
- package/dist/integrations/wyrdos-integration.d.ts +2 -0
- package/dist/integrations/wyrdos-integration.d.ts.map +1 -0
- package/dist/integrations/wyrdos-integration.js +2 -0
- package/dist/integrations/wyrdos-integration.js.map +1 -0
- package/dist/keybindings/shell-keybindings.d.ts +139 -0
- package/dist/keybindings/shell-keybindings.d.ts.map +1 -0
- package/dist/keybindings/shell-keybindings.js +453 -0
- package/dist/keybindings/shell-keybindings.js.map +1 -0
- package/dist/plugins/built-in-integrations.d.ts +3 -0
- package/dist/plugins/built-in-integrations.d.ts.map +1 -0
- package/dist/plugins/built-in-integrations.js +13 -0
- package/dist/plugins/built-in-integrations.js.map +1 -0
- package/dist/plugins/first-party-cli-integration.d.ts +62 -0
- package/dist/plugins/first-party-cli-integration.d.ts.map +1 -0
- package/dist/plugins/first-party-cli-integration.js +524 -0
- package/dist/plugins/first-party-cli-integration.js.map +1 -0
- package/dist/plugins/google-docs.d.ts +30 -0
- package/dist/plugins/google-docs.d.ts.map +1 -0
- package/dist/plugins/google-docs.js +487 -0
- package/dist/plugins/google-docs.js.map +1 -0
- package/dist/plugins/google-drive.d.ts +84 -0
- package/dist/plugins/google-drive.d.ts.map +1 -0
- package/dist/plugins/google-drive.js +307 -0
- package/dist/plugins/google-drive.js.map +1 -0
- package/dist/plugins/google-sheets.d.ts +122 -0
- package/dist/plugins/google-sheets.d.ts.map +1 -0
- package/dist/plugins/google-sheets.js +290 -0
- package/dist/plugins/google-sheets.js.map +1 -0
- package/dist/plugins/google-slides.d.ts +125 -0
- package/dist/plugins/google-slides.d.ts.map +1 -0
- package/dist/plugins/google-slides.js +285 -0
- package/dist/plugins/google-slides.js.map +1 -0
- package/dist/plugins/google-workspace-api.d.ts +16 -0
- package/dist/plugins/google-workspace-api.d.ts.map +1 -0
- package/dist/plugins/google-workspace-api.js +42 -0
- package/dist/plugins/google-workspace-api.js.map +1 -0
- package/dist/plugins/google-workspace-integration.d.ts +22 -0
- package/dist/plugins/google-workspace-integration.d.ts.map +1 -0
- package/dist/plugins/google-workspace-integration.js +1353 -0
- package/dist/plugins/google-workspace-integration.js.map +1 -0
- package/dist/plugins/google-workspace-oauth.d.ts +80 -0
- package/dist/plugins/google-workspace-oauth.d.ts.map +1 -0
- package/dist/plugins/google-workspace-oauth.js +187 -0
- package/dist/plugins/google-workspace-oauth.js.map +1 -0
- package/dist/plugins/monoid-integration.d.ts +11 -0
- package/dist/plugins/monoid-integration.d.ts.map +1 -0
- package/dist/plugins/monoid-integration.js +14 -0
- package/dist/plugins/monoid-integration.js.map +1 -0
- package/dist/plugins/pilfer-integration.d.ts +10 -0
- package/dist/plugins/pilfer-integration.d.ts.map +1 -0
- package/dist/plugins/pilfer-integration.js +13 -0
- package/dist/plugins/pilfer-integration.js.map +1 -0
- package/dist/plugins/plugins.d.ts +78 -0
- package/dist/plugins/plugins.d.ts.map +1 -0
- package/dist/plugins/plugins.js +81 -0
- package/dist/plugins/plugins.js.map +1 -0
- package/dist/plugins/wyrdos-integration.d.ts +11 -0
- package/dist/plugins/wyrdos-integration.d.ts.map +1 -0
- package/dist/plugins/wyrdos-integration.js +14 -0
- package/dist/plugins/wyrdos-integration.js.map +1 -0
- package/dist/{ai-sdk-provider.d.ts → providers/ai-sdk-provider.d.ts} +2 -2
- package/dist/providers/ai-sdk-provider.d.ts.map +1 -0
- package/dist/{ai-sdk-provider.js → providers/ai-sdk-provider.js} +132 -37
- package/dist/providers/ai-sdk-provider.js.map +1 -0
- package/dist/providers/api-key-providers.d.ts +25 -0
- package/dist/providers/api-key-providers.d.ts.map +1 -0
- package/dist/providers/api-key-providers.js +67 -0
- package/dist/providers/api-key-providers.js.map +1 -0
- package/dist/providers/definitions/anthropic-provider.d.ts +421 -0
- package/dist/providers/definitions/anthropic-provider.d.ts.map +1 -0
- package/dist/providers/definitions/anthropic-provider.js +204 -0
- package/dist/providers/definitions/anthropic-provider.js.map +1 -0
- package/dist/{codex-oauth-provider.d.ts → providers/definitions/codex-oauth-provider.d.ts} +2 -2
- package/dist/providers/definitions/codex-oauth-provider.d.ts.map +1 -0
- package/dist/{codex-oauth-provider.js → providers/definitions/codex-oauth-provider.js} +1 -1
- package/dist/providers/definitions/codex-oauth-provider.js.map +1 -0
- package/dist/providers/definitions/deepseek-provider.d.ts +25 -0
- package/dist/providers/definitions/deepseek-provider.d.ts.map +1 -0
- package/dist/providers/definitions/deepseek-provider.js +28 -0
- package/dist/providers/definitions/deepseek-provider.js.map +1 -0
- package/dist/providers/definitions/google-ai-oauth.d.ts +79 -0
- package/dist/providers/definitions/google-ai-oauth.d.ts.map +1 -0
- package/dist/providers/definitions/google-ai-oauth.js +177 -0
- package/dist/providers/definitions/google-ai-oauth.js.map +1 -0
- package/dist/providers/definitions/google-provider.d.ts +166 -0
- package/dist/providers/definitions/google-provider.d.ts.map +1 -0
- package/dist/providers/definitions/google-provider.js +93 -0
- package/dist/providers/definitions/google-provider.js.map +1 -0
- package/dist/providers/definitions/moonshot-provider.d.ts +28 -0
- package/dist/providers/definitions/moonshot-provider.d.ts.map +1 -0
- package/dist/providers/definitions/moonshot-provider.js +34 -0
- package/dist/providers/definitions/moonshot-provider.js.map +1 -0
- package/dist/{openai-oauth.d.ts → providers/definitions/openai-oauth.d.ts} +1 -1
- package/dist/providers/definitions/openai-oauth.d.ts.map +1 -0
- package/dist/providers/definitions/openai-oauth.js.map +1 -0
- package/dist/providers/definitions/openai-provider.d.ts +177 -0
- package/dist/providers/definitions/openai-provider.d.ts.map +1 -0
- package/dist/{model-catalog.js → providers/definitions/openai-provider.js} +33 -21
- package/dist/providers/definitions/openai-provider.js.map +1 -0
- package/dist/providers/definitions/perplexity-provider.d.ts +34 -0
- package/dist/providers/definitions/perplexity-provider.d.ts.map +1 -0
- package/dist/providers/definitions/perplexity-provider.js +46 -0
- package/dist/providers/definitions/perplexity-provider.js.map +1 -0
- package/dist/providers/definitions/xai-provider.d.ts +68 -0
- package/dist/providers/definitions/xai-provider.d.ts.map +1 -0
- package/dist/providers/definitions/xai-provider.js +102 -0
- package/dist/providers/definitions/xai-provider.js.map +1 -0
- package/dist/{mock-provider.d.ts → providers/mock-provider.d.ts} +1 -1
- package/dist/providers/mock-provider.d.ts.map +1 -0
- package/dist/providers/mock-provider.js.map +1 -0
- package/dist/{model-catalog.d.ts → providers/model-catalog.d.ts} +2 -2
- package/dist/providers/model-catalog.d.ts.map +1 -0
- package/dist/providers/model-catalog.js +31 -0
- package/dist/providers/model-catalog.js.map +1 -0
- package/dist/providers/provider-failures.d.ts +14 -0
- package/dist/providers/provider-failures.d.ts.map +1 -0
- package/dist/providers/provider-failures.js +146 -0
- package/dist/providers/provider-failures.js.map +1 -0
- package/dist/providers/provider-status.d.ts +24 -0
- package/dist/providers/provider-status.d.ts.map +1 -0
- package/dist/providers/provider-status.js +63 -0
- package/dist/providers/provider-status.js.map +1 -0
- package/dist/{providers.d.ts → providers/providers.d.ts} +1 -1
- package/dist/providers/providers.d.ts.map +1 -0
- package/dist/providers/providers.js.map +1 -0
- package/dist/{secrets.d.ts → providers/secrets.d.ts} +24 -0
- package/dist/providers/secrets.d.ts.map +1 -0
- package/dist/{secrets.js → providers/secrets.js} +82 -2
- package/dist/providers/secrets.js.map +1 -0
- package/dist/{app-runtime.d.ts → runtime/app-runtime.d.ts} +8 -7
- package/dist/runtime/app-runtime.d.ts.map +1 -0
- package/dist/{app-runtime.js → runtime/app-runtime.js} +58 -28
- package/dist/runtime/app-runtime.js.map +1 -0
- package/dist/runtime/in-memory-runtime.d.ts +15 -0
- package/dist/runtime/in-memory-runtime.d.ts.map +1 -0
- package/dist/{in-memory-runtime.js → runtime/in-memory-runtime.js} +135 -29
- package/dist/runtime/in-memory-runtime.js.map +1 -0
- package/dist/runtime/renderer-api.d.ts +123 -0
- package/dist/runtime/renderer-api.d.ts.map +1 -0
- package/dist/{renderer-api.js.map → runtime/renderer-api.js.map} +1 -1
- package/dist/{runtime-tool-execution.d.ts → runtime/runtime-tool-execution.d.ts} +8 -3
- package/dist/runtime/runtime-tool-execution.d.ts.map +1 -0
- package/dist/runtime/runtime-tool-execution.js +733 -0
- package/dist/runtime/runtime-tool-execution.js.map +1 -0
- package/dist/{runtime.d.ts → runtime/runtime.d.ts} +31 -4
- package/dist/runtime/runtime.d.ts.map +1 -0
- package/dist/{runtime.js → runtime/runtime.js} +24 -0
- package/dist/runtime/runtime.js.map +1 -0
- package/dist/{history.d.ts → sessions/history.d.ts} +3 -2
- package/dist/sessions/history.d.ts.map +1 -0
- package/dist/{history.js → sessions/history.js} +55 -1
- package/dist/sessions/history.js.map +1 -0
- package/dist/{session-actions.d.ts → sessions/session-actions.d.ts} +2 -2
- package/dist/sessions/session-actions.d.ts.map +1 -0
- package/dist/{session-actions.js → sessions/session-actions.js} +2 -2
- package/dist/sessions/session-actions.js.map +1 -0
- package/dist/{cli-defined-tools.d.ts → tools/cli-defined-tools.d.ts} +2 -2
- package/dist/tools/cli-defined-tools.d.ts.map +1 -0
- package/dist/tools/cli-defined-tools.js.map +1 -0
- package/dist/tools/document-tools.d.ts +92 -0
- package/dist/tools/document-tools.d.ts.map +1 -0
- package/dist/tools/document-tools.js +430 -0
- package/dist/tools/document-tools.js.map +1 -0
- package/dist/{local-tools.d.ts → tools/local-tools.d.ts} +25 -0
- package/dist/tools/local-tools.d.ts.map +1 -0
- package/dist/tools/local-tools.js +944 -0
- package/dist/tools/local-tools.js.map +1 -0
- package/dist/tools/mcp-server-config.d.ts.map +1 -0
- package/dist/tools/mcp-server-config.js.map +1 -0
- package/dist/tools/permission-grant-store.d.ts.map +1 -0
- package/dist/tools/permission-grant-store.js.map +1 -0
- package/dist/{permission-grants.d.ts → tools/permission-grants.d.ts} +1 -1
- package/dist/tools/permission-grants.d.ts.map +1 -0
- package/dist/{permission-grants.js → tools/permission-grants.js} +31 -1
- package/dist/tools/permission-grants.js.map +1 -0
- package/dist/tools/project-app-defaults-tool.d.ts +4 -0
- package/dist/tools/project-app-defaults-tool.d.ts.map +1 -0
- package/dist/tools/project-app-defaults-tool.js +135 -0
- package/dist/tools/project-app-defaults-tool.js.map +1 -0
- package/dist/{project-tool-registry.d.ts → tools/project-tool-registry.d.ts} +2 -2
- package/dist/tools/project-tool-registry.d.ts.map +1 -0
- package/dist/{project-tool-registry.js → tools/project-tool-registry.js} +47 -9
- package/dist/tools/project-tool-registry.js.map +1 -0
- package/dist/{question-requests.d.ts → tools/question-requests.d.ts} +2 -2
- package/dist/tools/question-requests.d.ts.map +1 -0
- package/dist/{question-requests.js → tools/question-requests.js} +3 -2
- package/dist/tools/question-requests.js.map +1 -0
- package/dist/tools/subagent-task-tool.d.ts +8 -0
- package/dist/tools/subagent-task-tool.d.ts.map +1 -0
- package/dist/tools/subagent-task-tool.js +38 -0
- package/dist/tools/subagent-task-tool.js.map +1 -0
- package/dist/{tool-requests.d.ts → tools/tool-requests.d.ts} +4 -3
- package/dist/tools/tool-requests.d.ts.map +1 -0
- package/dist/{tool-requests.js → tools/tool-requests.js} +15 -4
- package/dist/tools/tool-requests.js.map +1 -0
- package/dist/{tools.d.ts → tools/tools.d.ts} +7 -1
- package/dist/tools/tools.d.ts.map +1 -0
- package/dist/{tools.js → tools/tools.js} +21 -0
- package/dist/tools/tools.js.map +1 -0
- package/dist/tools/update-plan-tool.d.ts +14 -0
- package/dist/tools/update-plan-tool.d.ts.map +1 -0
- package/dist/tools/update-plan-tool.js +83 -0
- package/dist/tools/update-plan-tool.js.map +1 -0
- package/dist/{personas.d.ts → workspace/personas.d.ts} +42 -1
- package/dist/workspace/personas.d.ts.map +1 -0
- package/dist/workspace/personas.js +457 -0
- package/dist/workspace/personas.js.map +1 -0
- package/dist/{projects.d.ts → workspace/projects.d.ts} +35 -5
- package/dist/workspace/projects.d.ts.map +1 -0
- package/dist/{projects.js → workspace/projects.js} +111 -3
- package/dist/workspace/projects.js.map +1 -0
- package/dist/{prompt-context.d.ts → workspace/prompt-context.d.ts} +5 -2
- package/dist/workspace/prompt-context.d.ts.map +1 -0
- package/dist/workspace/prompt-context.js +406 -0
- package/dist/workspace/prompt-context.js.map +1 -0
- package/dist/workspace/proposed-plan.d.ts.map +1 -0
- package/dist/workspace/proposed-plan.js.map +1 -0
- package/dist/workspace/repository-instructions.d.ts +20 -0
- package/dist/workspace/repository-instructions.d.ts.map +1 -0
- package/dist/workspace/repository-instructions.js +111 -0
- package/dist/workspace/repository-instructions.js.map +1 -0
- package/dist/{skills.d.ts → workspace/skills.d.ts} +23 -2
- package/dist/workspace/skills.d.ts.map +1 -0
- package/dist/{skills.js → workspace/skills.js} +129 -5
- package/dist/workspace/skills.js.map +1 -0
- package/package.json +15 -2
- package/dist/ai-sdk-provider.d.ts.map +0 -1
- package/dist/ai-sdk-provider.js.map +0 -1
- package/dist/app-runtime.d.ts.map +0 -1
- package/dist/app-runtime.js.map +0 -1
- package/dist/artifacts.d.ts.map +0 -1
- package/dist/artifacts.js.map +0 -1
- package/dist/cli-defined-tools.d.ts.map +0 -1
- package/dist/cli-defined-tools.js.map +0 -1
- package/dist/codex-oauth-provider.d.ts.map +0 -1
- package/dist/codex-oauth-provider.js.map +0 -1
- package/dist/events.d.ts.map +0 -1
- package/dist/events.js.map +0 -1
- package/dist/feedback.d.ts.map +0 -1
- package/dist/feedback.js.map +0 -1
- package/dist/history.d.ts.map +0 -1
- package/dist/history.js.map +0 -1
- package/dist/in-memory-runtime.d.ts +0 -12
- package/dist/in-memory-runtime.d.ts.map +0 -1
- package/dist/in-memory-runtime.js.map +0 -1
- package/dist/integrations.d.ts +0 -37
- package/dist/integrations.d.ts.map +0 -1
- package/dist/integrations.js +0 -48
- package/dist/integrations.js.map +0 -1
- package/dist/local-event-logger.d.ts.map +0 -1
- package/dist/local-event-logger.js.map +0 -1
- package/dist/local-event-schema.d.ts.map +0 -1
- package/dist/local-event-schema.js.map +0 -1
- package/dist/local-tools.d.ts.map +0 -1
- package/dist/local-tools.js +0 -418
- package/dist/local-tools.js.map +0 -1
- package/dist/mcp-server-config.d.ts.map +0 -1
- package/dist/mcp-server-config.js.map +0 -1
- package/dist/mock-provider.d.ts.map +0 -1
- package/dist/mock-provider.js.map +0 -1
- package/dist/model-catalog.d.ts.map +0 -1
- package/dist/model-catalog.js.map +0 -1
- package/dist/monoid-integration.d.ts +0 -33
- package/dist/monoid-integration.d.ts.map +0 -1
- package/dist/monoid-integration.js +0 -184
- package/dist/monoid-integration.js.map +0 -1
- package/dist/openai-oauth.d.ts.map +0 -1
- package/dist/openai-oauth.js.map +0 -1
- package/dist/permission-grant-store.d.ts.map +0 -1
- package/dist/permission-grant-store.js.map +0 -1
- package/dist/permission-grants.d.ts.map +0 -1
- package/dist/permission-grants.js.map +0 -1
- package/dist/personas.d.ts.map +0 -1
- package/dist/personas.js +0 -137
- package/dist/personas.js.map +0 -1
- package/dist/project-tool-registry.d.ts.map +0 -1
- package/dist/project-tool-registry.js.map +0 -1
- package/dist/projects.d.ts.map +0 -1
- package/dist/projects.js.map +0 -1
- package/dist/prompt-context.d.ts.map +0 -1
- package/dist/prompt-context.js +0 -170
- package/dist/prompt-context.js.map +0 -1
- package/dist/proposed-plan.d.ts.map +0 -1
- package/dist/proposed-plan.js.map +0 -1
- package/dist/providers.d.ts.map +0 -1
- package/dist/providers.js.map +0 -1
- package/dist/question-requests.d.ts.map +0 -1
- package/dist/question-requests.js.map +0 -1
- package/dist/renderer-api.d.ts +0 -52
- package/dist/renderer-api.d.ts.map +0 -1
- package/dist/runtime-tool-execution.d.ts.map +0 -1
- package/dist/runtime-tool-execution.js +0 -245
- package/dist/runtime-tool-execution.js.map +0 -1
- package/dist/runtime.d.ts.map +0 -1
- package/dist/runtime.js.map +0 -1
- package/dist/secrets.d.ts.map +0 -1
- package/dist/secrets.js.map +0 -1
- package/dist/session-actions.d.ts.map +0 -1
- package/dist/session-actions.js.map +0 -1
- package/dist/skills.d.ts.map +0 -1
- package/dist/skills.js.map +0 -1
- package/dist/tool-requests.d.ts.map +0 -1
- package/dist/tool-requests.js.map +0 -1
- package/dist/tools.d.ts.map +0 -1
- package/dist/tools.js.map +0 -1
- package/dist/wyrdos-integration.d.ts +0 -32
- package/dist/wyrdos-integration.d.ts.map +0 -1
- package/dist/wyrdos-integration.js +0 -183
- package/dist/wyrdos-integration.js.map +0 -1
- /package/dist/{artifacts.js → events/artifacts.js} +0 -0
- /package/dist/{feedback.js → events/feedback.js} +0 -0
- /package/dist/{local-event-schema.js → events/local-event-schema.js} +0 -0
- /package/dist/{openai-oauth.js → providers/definitions/openai-oauth.js} +0 -0
- /package/dist/{mock-provider.js → providers/mock-provider.js} +0 -0
- /package/dist/{providers.js → providers/providers.js} +0 -0
- /package/dist/{renderer-api.js → runtime/renderer-api.js} +0 -0
- /package/dist/{cli-defined-tools.js → tools/cli-defined-tools.js} +0 -0
- /package/dist/{mcp-server-config.d.ts → tools/mcp-server-config.d.ts} +0 -0
- /package/dist/{mcp-server-config.js → tools/mcp-server-config.js} +0 -0
- /package/dist/{permission-grant-store.d.ts → tools/permission-grant-store.d.ts} +0 -0
- /package/dist/{permission-grant-store.js → tools/permission-grant-store.js} +0 -0
- /package/dist/{proposed-plan.d.ts → workspace/proposed-plan.d.ts} +0 -0
- /package/dist/{proposed-plan.js → workspace/proposed-plan.js} +0 -0
|
@@ -0,0 +1,1353 @@
|
|
|
1
|
+
import { getGoogleOAuthMetadata, loadGoogleOAuthCredential, } from "./google-workspace-oauth.js";
|
|
2
|
+
import { appendGoogleDocText, createGoogleDoc, replaceGoogleDocText, } from "./google-docs.js";
|
|
3
|
+
import { createGoogleDriveFolder, createGoogleDriveTextFile, exportGoogleDriveText, getGoogleDriveMetadata, googleWorkspaceOAuthSecretId, moveGoogleDriveFile, renameGoogleDriveFile, searchGoogleDrive, trashGoogleDriveFile, } from "./google-drive.js";
|
|
4
|
+
import { addGoogleSheet, appendGoogleSheetsRows, batchUpdateGoogleSheets, clearGoogleSheetsRange, createGoogleSpreadsheet, deleteGoogleSheet, formatGoogleSheetsRange, getGoogleSheetsMetadata, readGoogleSheetsRange, renameGoogleSheet, searchGoogleSheetsValues, updateGoogleSheetsRange, } from "./google-sheets.js";
|
|
5
|
+
import { batchUpdateGoogleSlides, createGoogleSlide, createGoogleSlidesImage, createGoogleSlidesPresentation, createGoogleSlidesShape, createGoogleSlidesTable, createGoogleSlidesTextBox, deleteGoogleSlidesObject, getGoogleSlidesMetadata, readGoogleSlidesText, replaceGoogleSlidesText, updateGoogleSlidesShapeStyle, updateGoogleSlidesTextStyle, } from "./google-slides.js";
|
|
6
|
+
import { createSystemKeychainSecretStore } from "../providers/secrets.js";
|
|
7
|
+
export const googleWorkspaceIntegrationId = "google_workspace";
|
|
8
|
+
export { googleWorkspaceOAuthSecretId };
|
|
9
|
+
export const googleWorkspaceIntegrationConfig = {
|
|
10
|
+
id: googleWorkspaceIntegrationId,
|
|
11
|
+
kind: "google_workspace",
|
|
12
|
+
name: "Google Workspace",
|
|
13
|
+
description: "OAuth API-backed app connector for Google Drive, Docs, and Sheets.",
|
|
14
|
+
defaultEnabled: false,
|
|
15
|
+
};
|
|
16
|
+
export const googleWorkspaceScopes = [
|
|
17
|
+
"https://www.googleapis.com/auth/drive",
|
|
18
|
+
"https://www.googleapis.com/auth/drive.metadata.readonly",
|
|
19
|
+
"https://www.googleapis.com/auth/drive.readonly",
|
|
20
|
+
"https://www.googleapis.com/auth/documents",
|
|
21
|
+
"https://www.googleapis.com/auth/presentations",
|
|
22
|
+
"https://www.googleapis.com/auth/spreadsheets",
|
|
23
|
+
];
|
|
24
|
+
export function createGoogleWorkspaceIntegration() {
|
|
25
|
+
const statusTool = {
|
|
26
|
+
id: "google_workspace_status",
|
|
27
|
+
name: "Google Workspace status",
|
|
28
|
+
description: "Return Google Workspace connector authentication status.",
|
|
29
|
+
inputSchema: {
|
|
30
|
+
type: "object",
|
|
31
|
+
additionalProperties: false,
|
|
32
|
+
properties: {},
|
|
33
|
+
},
|
|
34
|
+
permissionPolicy: "never",
|
|
35
|
+
async executor() {
|
|
36
|
+
return {
|
|
37
|
+
content: JSON.stringify({
|
|
38
|
+
ok: true,
|
|
39
|
+
integration: googleWorkspaceIntegrationId,
|
|
40
|
+
status: "oauth_api",
|
|
41
|
+
transport: "oauth_api",
|
|
42
|
+
capabilities: ["drive", "docs", "sheets", "slides"],
|
|
43
|
+
}),
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
const driveSearchTool = {
|
|
48
|
+
id: "google_drive_search",
|
|
49
|
+
name: "Google Drive search",
|
|
50
|
+
description: "Search authenticated Google Drive files by name or full text and return file metadata.",
|
|
51
|
+
inputSchema: {
|
|
52
|
+
type: "object",
|
|
53
|
+
additionalProperties: false,
|
|
54
|
+
properties: {
|
|
55
|
+
query: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "Search text to match against file names or full text.",
|
|
58
|
+
},
|
|
59
|
+
pageSize: {
|
|
60
|
+
type: "number",
|
|
61
|
+
description: "Maximum number of files to return, from 1 to 25.",
|
|
62
|
+
},
|
|
63
|
+
mimeType: {
|
|
64
|
+
type: "string",
|
|
65
|
+
description: "Optional exact Google Drive MIME type filter. Use folder for Drive folders.",
|
|
66
|
+
},
|
|
67
|
+
driveScope: {
|
|
68
|
+
type: "string",
|
|
69
|
+
enum: ["all_drives", "my_drive", "shared_with_me"],
|
|
70
|
+
description: "Drive search scope. Defaults to all_drives, including Shared Drives.",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
permissionPolicy: "never",
|
|
75
|
+
async executor(input) {
|
|
76
|
+
return {
|
|
77
|
+
content: JSON.stringify(await searchGoogleDrive(parseDriveSearchInput(input))),
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
const driveExportTextTool = {
|
|
82
|
+
id: "google_drive_export_text",
|
|
83
|
+
name: "Google Drive export text",
|
|
84
|
+
description: "Export a Google Docs, Google Sheets, or plain text Google Drive file as text by file id.",
|
|
85
|
+
inputSchema: {
|
|
86
|
+
type: "object",
|
|
87
|
+
additionalProperties: false,
|
|
88
|
+
required: ["fileId"],
|
|
89
|
+
properties: {
|
|
90
|
+
fileId: {
|
|
91
|
+
type: "string",
|
|
92
|
+
description: "Google Drive file id to export as text.",
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
permissionPolicy: "never",
|
|
97
|
+
async executor(input) {
|
|
98
|
+
return {
|
|
99
|
+
content: JSON.stringify(await exportGoogleDriveText(parseDriveExportTextInput(input))),
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
const driveMetadataTool = {
|
|
104
|
+
id: "google_drive_get_metadata",
|
|
105
|
+
name: "Google Drive metadata",
|
|
106
|
+
description: "Read generic Google Drive file metadata by file id for any supported file type.",
|
|
107
|
+
inputSchema: {
|
|
108
|
+
type: "object",
|
|
109
|
+
additionalProperties: false,
|
|
110
|
+
required: ["fileId"],
|
|
111
|
+
properties: {
|
|
112
|
+
fileId: {
|
|
113
|
+
type: "string",
|
|
114
|
+
description: "Google Drive file id to inspect.",
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
permissionPolicy: "never",
|
|
119
|
+
async executor(input) {
|
|
120
|
+
return {
|
|
121
|
+
content: JSON.stringify(await getGoogleDriveMetadata(parseDriveFileIdInput(input, "google_drive_get_metadata"))),
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
const sheetsMetadataTool = {
|
|
126
|
+
id: "google_sheets_get_metadata",
|
|
127
|
+
name: "Google Sheets metadata",
|
|
128
|
+
description: "Read spreadsheet title and sheet tab metadata from Google Sheets.",
|
|
129
|
+
inputSchema: {
|
|
130
|
+
type: "object",
|
|
131
|
+
additionalProperties: false,
|
|
132
|
+
required: ["spreadsheetId"],
|
|
133
|
+
properties: {
|
|
134
|
+
spreadsheetId: {
|
|
135
|
+
type: "string",
|
|
136
|
+
description: "Google Sheets spreadsheet id.",
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
permissionPolicy: "never",
|
|
141
|
+
async executor(input) {
|
|
142
|
+
return {
|
|
143
|
+
content: JSON.stringify(await getGoogleSheetsMetadata(parseSpreadsheetIdInput(input, "google_sheets_get_metadata"))),
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
const sheetsReadRangeTool = {
|
|
148
|
+
id: "google_sheets_read_range",
|
|
149
|
+
name: "Google Sheets read range",
|
|
150
|
+
description: "Read formatted values from a Google Sheets A1 notation range.",
|
|
151
|
+
inputSchema: {
|
|
152
|
+
type: "object",
|
|
153
|
+
additionalProperties: false,
|
|
154
|
+
required: ["spreadsheetId", "range"],
|
|
155
|
+
properties: {
|
|
156
|
+
spreadsheetId: {
|
|
157
|
+
type: "string",
|
|
158
|
+
description: "Google Sheets spreadsheet id.",
|
|
159
|
+
},
|
|
160
|
+
range: {
|
|
161
|
+
type: "string",
|
|
162
|
+
description: "A1 notation range, for example Sheet1!A1:D20.",
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
permissionPolicy: "never",
|
|
167
|
+
async executor(input) {
|
|
168
|
+
return {
|
|
169
|
+
content: JSON.stringify(await readGoogleSheetsRange(parseSheetsReadRangeInput(input))),
|
|
170
|
+
};
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
const sheetsSearchValuesTool = {
|
|
174
|
+
id: "google_sheets_search_values",
|
|
175
|
+
name: "Google Sheets search values",
|
|
176
|
+
description: "Search formatted values in one or more Google Sheets ranges.",
|
|
177
|
+
inputSchema: {
|
|
178
|
+
type: "object",
|
|
179
|
+
additionalProperties: false,
|
|
180
|
+
required: ["spreadsheetId", "query"],
|
|
181
|
+
properties: {
|
|
182
|
+
spreadsheetId: {
|
|
183
|
+
type: "string",
|
|
184
|
+
description: "Google Sheets spreadsheet id.",
|
|
185
|
+
},
|
|
186
|
+
query: {
|
|
187
|
+
type: "string",
|
|
188
|
+
description: "Text to search for in formatted cell values.",
|
|
189
|
+
},
|
|
190
|
+
ranges: {
|
|
191
|
+
type: "array",
|
|
192
|
+
items: { type: "string" },
|
|
193
|
+
description: "Optional A1 notation ranges. Defaults to A1:Z1000 for every sheet tab.",
|
|
194
|
+
},
|
|
195
|
+
maxMatches: {
|
|
196
|
+
type: "number",
|
|
197
|
+
description: "Maximum number of matches to return, from 1 to 100.",
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
permissionPolicy: "never",
|
|
202
|
+
async executor(input) {
|
|
203
|
+
return {
|
|
204
|
+
content: JSON.stringify(await searchGoogleSheetsValues(parseSheetsSearchValuesInput(input))),
|
|
205
|
+
};
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
const sheetsCreateTool = {
|
|
209
|
+
id: "google_sheets_create",
|
|
210
|
+
name: "Google Sheets create",
|
|
211
|
+
description: "Create a native Google Sheets spreadsheet.",
|
|
212
|
+
inputSchema: {
|
|
213
|
+
type: "object",
|
|
214
|
+
additionalProperties: false,
|
|
215
|
+
required: ["title"],
|
|
216
|
+
properties: {
|
|
217
|
+
title: {
|
|
218
|
+
type: "string",
|
|
219
|
+
description: "Spreadsheet title.",
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
permissionPolicy: "on-request",
|
|
224
|
+
async executor(input) {
|
|
225
|
+
return {
|
|
226
|
+
content: JSON.stringify(await createGoogleSpreadsheet(parseSheetsCreateInput(input))),
|
|
227
|
+
};
|
|
228
|
+
},
|
|
229
|
+
};
|
|
230
|
+
const sheetsUpdateRangeTool = {
|
|
231
|
+
id: "google_sheets_update_range",
|
|
232
|
+
name: "Google Sheets update range",
|
|
233
|
+
description: "Write rows of values to a Google Sheets A1 notation range.",
|
|
234
|
+
inputSchema: {
|
|
235
|
+
type: "object",
|
|
236
|
+
additionalProperties: false,
|
|
237
|
+
required: ["spreadsheetId", "range", "values"],
|
|
238
|
+
properties: {
|
|
239
|
+
spreadsheetId: { type: "string" },
|
|
240
|
+
range: {
|
|
241
|
+
type: "string",
|
|
242
|
+
description: "A1 notation range, for example Sheet1!A1:D20.",
|
|
243
|
+
},
|
|
244
|
+
values: {
|
|
245
|
+
type: "array",
|
|
246
|
+
items: { type: "array", items: {} },
|
|
247
|
+
description: "Rows of values to write.",
|
|
248
|
+
},
|
|
249
|
+
valueInputOption: {
|
|
250
|
+
type: "string",
|
|
251
|
+
enum: ["RAW", "USER_ENTERED"],
|
|
252
|
+
description: "Defaults to USER_ENTERED.",
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
permissionPolicy: "on-request",
|
|
257
|
+
async executor(input) {
|
|
258
|
+
return {
|
|
259
|
+
content: JSON.stringify(await updateGoogleSheetsRange(parseSheetsWriteRangeInput(input, "google_sheets_update_range"))),
|
|
260
|
+
};
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
const sheetsAppendRowsTool = {
|
|
264
|
+
id: "google_sheets_append_rows",
|
|
265
|
+
name: "Google Sheets append rows",
|
|
266
|
+
description: "Append rows to a Google Sheets A1 notation range.",
|
|
267
|
+
inputSchema: sheetsUpdateRangeTool.inputSchema,
|
|
268
|
+
permissionPolicy: "on-request",
|
|
269
|
+
async executor(input) {
|
|
270
|
+
return {
|
|
271
|
+
content: JSON.stringify(await appendGoogleSheetsRows(parseSheetsWriteRangeInput(input, "google_sheets_append_rows"))),
|
|
272
|
+
};
|
|
273
|
+
},
|
|
274
|
+
};
|
|
275
|
+
const sheetsClearRangeTool = {
|
|
276
|
+
id: "google_sheets_clear_range",
|
|
277
|
+
name: "Google Sheets clear range",
|
|
278
|
+
description: "Clear values from a Google Sheets A1 notation range.",
|
|
279
|
+
inputSchema: {
|
|
280
|
+
type: "object",
|
|
281
|
+
additionalProperties: false,
|
|
282
|
+
required: ["spreadsheetId", "range"],
|
|
283
|
+
properties: {
|
|
284
|
+
spreadsheetId: { type: "string" },
|
|
285
|
+
range: { type: "string" },
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
permissionPolicy: "on-request",
|
|
289
|
+
async executor(input) {
|
|
290
|
+
return {
|
|
291
|
+
content: JSON.stringify(await clearGoogleSheetsRange(parseSheetsClearRangeInput(input))),
|
|
292
|
+
};
|
|
293
|
+
},
|
|
294
|
+
};
|
|
295
|
+
const sheetsAddSheetTool = {
|
|
296
|
+
id: "google_sheets_add_sheet",
|
|
297
|
+
name: "Google Sheets add sheet",
|
|
298
|
+
description: "Add a new tab to a Google Sheets spreadsheet.",
|
|
299
|
+
inputSchema: {
|
|
300
|
+
type: "object",
|
|
301
|
+
additionalProperties: false,
|
|
302
|
+
required: ["spreadsheetId", "title"],
|
|
303
|
+
properties: {
|
|
304
|
+
spreadsheetId: { type: "string" },
|
|
305
|
+
title: { type: "string" },
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
permissionPolicy: "on-request",
|
|
309
|
+
async executor(input) {
|
|
310
|
+
return {
|
|
311
|
+
content: JSON.stringify(await addGoogleSheet(parseSheetsSheetInput(input, "google_sheets_add_sheet"))),
|
|
312
|
+
};
|
|
313
|
+
},
|
|
314
|
+
};
|
|
315
|
+
const sheetsRenameSheetTool = {
|
|
316
|
+
id: "google_sheets_rename_sheet",
|
|
317
|
+
name: "Google Sheets rename sheet",
|
|
318
|
+
description: "Rename a Google Sheets tab by numeric sheet id.",
|
|
319
|
+
inputSchema: {
|
|
320
|
+
type: "object",
|
|
321
|
+
additionalProperties: false,
|
|
322
|
+
required: ["spreadsheetId", "sheetId", "title"],
|
|
323
|
+
properties: {
|
|
324
|
+
spreadsheetId: { type: "string" },
|
|
325
|
+
sheetId: { type: "number" },
|
|
326
|
+
title: { type: "string" },
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
permissionPolicy: "on-request",
|
|
330
|
+
async executor(input) {
|
|
331
|
+
return {
|
|
332
|
+
content: JSON.stringify(await renameGoogleSheet(parseSheetsRenameSheetInput(input))),
|
|
333
|
+
};
|
|
334
|
+
},
|
|
335
|
+
};
|
|
336
|
+
const sheetsDeleteSheetTool = {
|
|
337
|
+
id: "google_sheets_delete_sheet",
|
|
338
|
+
name: "Google Sheets delete sheet",
|
|
339
|
+
description: "Delete a Google Sheets tab by numeric sheet id.",
|
|
340
|
+
inputSchema: {
|
|
341
|
+
type: "object",
|
|
342
|
+
additionalProperties: false,
|
|
343
|
+
required: ["spreadsheetId", "sheetId"],
|
|
344
|
+
properties: {
|
|
345
|
+
spreadsheetId: { type: "string" },
|
|
346
|
+
sheetId: { type: "number" },
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
permissionPolicy: "on-request",
|
|
350
|
+
async executor(input) {
|
|
351
|
+
return {
|
|
352
|
+
content: JSON.stringify(await deleteGoogleSheet(parseSheetsDeleteSheetInput(input))),
|
|
353
|
+
};
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
const sheetsFormatRangeTool = {
|
|
357
|
+
id: "google_sheets_format_range",
|
|
358
|
+
name: "Google Sheets format range",
|
|
359
|
+
description: "Apply Google Sheets userEnteredFormat fields to a grid range.",
|
|
360
|
+
inputSchema: {
|
|
361
|
+
type: "object",
|
|
362
|
+
additionalProperties: false,
|
|
363
|
+
required: ["spreadsheetId", "sheetId", "userEnteredFormat", "fields"],
|
|
364
|
+
properties: {
|
|
365
|
+
spreadsheetId: { type: "string" },
|
|
366
|
+
sheetId: { type: "number" },
|
|
367
|
+
startRowIndex: { type: "number" },
|
|
368
|
+
endRowIndex: { type: "number" },
|
|
369
|
+
startColumnIndex: { type: "number" },
|
|
370
|
+
endColumnIndex: { type: "number" },
|
|
371
|
+
userEnteredFormat: {
|
|
372
|
+
type: "object",
|
|
373
|
+
description: "Google Sheets CellFormat object, for example {textFormat:{bold:true}}.",
|
|
374
|
+
},
|
|
375
|
+
fields: {
|
|
376
|
+
type: "string",
|
|
377
|
+
description: "CellFormat fields to apply, for example textFormat,backgroundColor,horizontalAlignment.",
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
permissionPolicy: "on-request",
|
|
382
|
+
async executor(input) {
|
|
383
|
+
return {
|
|
384
|
+
content: JSON.stringify(await formatGoogleSheetsRange(parseSheetsFormatRangeInput(input))),
|
|
385
|
+
};
|
|
386
|
+
},
|
|
387
|
+
};
|
|
388
|
+
const sheetsBatchUpdateTool = {
|
|
389
|
+
id: "google_sheets_batch_update",
|
|
390
|
+
name: "Google Sheets batch update",
|
|
391
|
+
description: "Apply advanced Google Sheets batchUpdate requests to a spreadsheet.",
|
|
392
|
+
inputSchema: {
|
|
393
|
+
type: "object",
|
|
394
|
+
additionalProperties: false,
|
|
395
|
+
required: ["spreadsheetId", "requests"],
|
|
396
|
+
properties: {
|
|
397
|
+
spreadsheetId: { type: "string" },
|
|
398
|
+
requests: {
|
|
399
|
+
type: "array",
|
|
400
|
+
items: { type: "object" },
|
|
401
|
+
description: "Google Sheets API batchUpdate requests. Use high-level tools when possible.",
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
permissionPolicy: "on-request",
|
|
406
|
+
async executor(input) {
|
|
407
|
+
return {
|
|
408
|
+
content: JSON.stringify(await batchUpdateGoogleSheets(parseSheetsBatchUpdateInput(input))),
|
|
409
|
+
};
|
|
410
|
+
},
|
|
411
|
+
};
|
|
412
|
+
const slidesMetadataTool = {
|
|
413
|
+
id: "google_slides_get_metadata",
|
|
414
|
+
name: "Google Slides metadata",
|
|
415
|
+
description: "Read presentation title and slide object metadata from Google Slides.",
|
|
416
|
+
inputSchema: {
|
|
417
|
+
type: "object",
|
|
418
|
+
additionalProperties: false,
|
|
419
|
+
required: ["presentationId"],
|
|
420
|
+
properties: {
|
|
421
|
+
presentationId: { type: "string" },
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
permissionPolicy: "never",
|
|
425
|
+
async executor(input) {
|
|
426
|
+
return {
|
|
427
|
+
content: JSON.stringify(await getGoogleSlidesMetadata(parseSlidesPresentationInput(input, "google_slides_get_metadata"))),
|
|
428
|
+
};
|
|
429
|
+
},
|
|
430
|
+
};
|
|
431
|
+
const slidesReadTextTool = {
|
|
432
|
+
id: "google_slides_read_text",
|
|
433
|
+
name: "Google Slides read text",
|
|
434
|
+
description: "Read text content from Google Slides shapes, tables, and speaker notes.",
|
|
435
|
+
inputSchema: slidesMetadataTool.inputSchema,
|
|
436
|
+
permissionPolicy: "never",
|
|
437
|
+
async executor(input) {
|
|
438
|
+
return {
|
|
439
|
+
content: JSON.stringify(await readGoogleSlidesText(parseSlidesPresentationInput(input, "google_slides_read_text"))),
|
|
440
|
+
};
|
|
441
|
+
},
|
|
442
|
+
};
|
|
443
|
+
const slidesCreateTool = {
|
|
444
|
+
id: "google_slides_create",
|
|
445
|
+
name: "Google Slides create",
|
|
446
|
+
description: "Create a native Google Slides presentation.",
|
|
447
|
+
inputSchema: {
|
|
448
|
+
type: "object",
|
|
449
|
+
additionalProperties: false,
|
|
450
|
+
required: ["title"],
|
|
451
|
+
properties: {
|
|
452
|
+
title: { type: "string" },
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
permissionPolicy: "on-request",
|
|
456
|
+
async executor(input) {
|
|
457
|
+
return {
|
|
458
|
+
content: JSON.stringify(await createGoogleSlidesPresentation(parseSlidesCreateInput(input))),
|
|
459
|
+
};
|
|
460
|
+
},
|
|
461
|
+
};
|
|
462
|
+
const slidesCreateSlideTool = {
|
|
463
|
+
id: "google_slides_create_slide",
|
|
464
|
+
name: "Google Slides create slide",
|
|
465
|
+
description: "Create a slide in a Google Slides presentation.",
|
|
466
|
+
inputSchema: {
|
|
467
|
+
type: "object",
|
|
468
|
+
additionalProperties: false,
|
|
469
|
+
required: ["presentationId"],
|
|
470
|
+
properties: {
|
|
471
|
+
presentationId: { type: "string" },
|
|
472
|
+
objectId: { type: "string" },
|
|
473
|
+
insertionIndex: { type: "number" },
|
|
474
|
+
predefinedLayout: {
|
|
475
|
+
type: "string",
|
|
476
|
+
description: "Google Slides predefined layout. Defaults to BLANK.",
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
permissionPolicy: "on-request",
|
|
481
|
+
async executor(input) {
|
|
482
|
+
return {
|
|
483
|
+
content: JSON.stringify(await createGoogleSlide(parseSlidesCreateSlideInput(input))),
|
|
484
|
+
};
|
|
485
|
+
},
|
|
486
|
+
};
|
|
487
|
+
const slidesDeleteObjectTool = {
|
|
488
|
+
id: "google_slides_delete_object",
|
|
489
|
+
name: "Google Slides delete object",
|
|
490
|
+
description: "Delete a slide or page element from a Google Slides presentation.",
|
|
491
|
+
inputSchema: {
|
|
492
|
+
type: "object",
|
|
493
|
+
additionalProperties: false,
|
|
494
|
+
required: ["presentationId", "objectId"],
|
|
495
|
+
properties: {
|
|
496
|
+
presentationId: { type: "string" },
|
|
497
|
+
objectId: { type: "string" },
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
permissionPolicy: "on-request",
|
|
501
|
+
async executor(input) {
|
|
502
|
+
return {
|
|
503
|
+
content: JSON.stringify(await deleteGoogleSlidesObject(parseSlidesObjectInput(input, "google_slides_delete_object"))),
|
|
504
|
+
};
|
|
505
|
+
},
|
|
506
|
+
};
|
|
507
|
+
const slidesCreateTextBoxTool = {
|
|
508
|
+
id: "google_slides_create_text_box",
|
|
509
|
+
name: "Google Slides create text box",
|
|
510
|
+
description: "Create a text box on a slide and insert text.",
|
|
511
|
+
inputSchema: {
|
|
512
|
+
type: "object",
|
|
513
|
+
additionalProperties: false,
|
|
514
|
+
required: ["presentationId", "pageObjectId", "text"],
|
|
515
|
+
properties: slidesElementProperties({
|
|
516
|
+
text: { type: "string" },
|
|
517
|
+
}),
|
|
518
|
+
},
|
|
519
|
+
permissionPolicy: "on-request",
|
|
520
|
+
async executor(input) {
|
|
521
|
+
return {
|
|
522
|
+
content: JSON.stringify(await createGoogleSlidesTextBox(parseSlidesCreateTextBoxInput(input))),
|
|
523
|
+
};
|
|
524
|
+
},
|
|
525
|
+
};
|
|
526
|
+
const slidesReplaceTextTool = {
|
|
527
|
+
id: "google_slides_replace_text",
|
|
528
|
+
name: "Google Slides replace text",
|
|
529
|
+
description: "Replace matching text in a Google Slides presentation.",
|
|
530
|
+
inputSchema: {
|
|
531
|
+
type: "object",
|
|
532
|
+
additionalProperties: false,
|
|
533
|
+
required: ["presentationId", "containsText", "replaceText"],
|
|
534
|
+
properties: {
|
|
535
|
+
presentationId: { type: "string" },
|
|
536
|
+
containsText: { type: "string" },
|
|
537
|
+
replaceText: { type: "string" },
|
|
538
|
+
pageObjectIds: { type: "array", items: { type: "string" } },
|
|
539
|
+
},
|
|
540
|
+
},
|
|
541
|
+
permissionPolicy: "on-request",
|
|
542
|
+
async executor(input) {
|
|
543
|
+
return {
|
|
544
|
+
content: JSON.stringify(await replaceGoogleSlidesText(parseSlidesReplaceTextInput(input))),
|
|
545
|
+
};
|
|
546
|
+
},
|
|
547
|
+
};
|
|
548
|
+
const slidesCreateImageTool = {
|
|
549
|
+
id: "google_slides_create_image",
|
|
550
|
+
name: "Google Slides create image",
|
|
551
|
+
description: "Create an image element from a URL on a Google Slides slide.",
|
|
552
|
+
inputSchema: {
|
|
553
|
+
type: "object",
|
|
554
|
+
additionalProperties: false,
|
|
555
|
+
required: ["presentationId", "pageObjectId", "url"],
|
|
556
|
+
properties: slidesElementProperties({
|
|
557
|
+
url: { type: "string" },
|
|
558
|
+
}),
|
|
559
|
+
},
|
|
560
|
+
permissionPolicy: "on-request",
|
|
561
|
+
async executor(input) {
|
|
562
|
+
return {
|
|
563
|
+
content: JSON.stringify(await createGoogleSlidesImage(parseSlidesCreateImageInput(input))),
|
|
564
|
+
};
|
|
565
|
+
},
|
|
566
|
+
};
|
|
567
|
+
const slidesCreateShapeTool = {
|
|
568
|
+
id: "google_slides_create_shape",
|
|
569
|
+
name: "Google Slides create shape",
|
|
570
|
+
description: "Create a shape on a Google Slides slide.",
|
|
571
|
+
inputSchema: {
|
|
572
|
+
type: "object",
|
|
573
|
+
additionalProperties: false,
|
|
574
|
+
required: ["presentationId", "pageObjectId"],
|
|
575
|
+
properties: slidesElementProperties({
|
|
576
|
+
shapeType: { type: "string" },
|
|
577
|
+
}),
|
|
578
|
+
},
|
|
579
|
+
permissionPolicy: "on-request",
|
|
580
|
+
async executor(input) {
|
|
581
|
+
return {
|
|
582
|
+
content: JSON.stringify(await createGoogleSlidesShape(parseSlidesCreateShapeInput(input))),
|
|
583
|
+
};
|
|
584
|
+
},
|
|
585
|
+
};
|
|
586
|
+
const slidesCreateTableTool = {
|
|
587
|
+
id: "google_slides_create_table",
|
|
588
|
+
name: "Google Slides create table",
|
|
589
|
+
description: "Create a table on a Google Slides slide.",
|
|
590
|
+
inputSchema: {
|
|
591
|
+
type: "object",
|
|
592
|
+
additionalProperties: false,
|
|
593
|
+
required: ["presentationId", "pageObjectId", "rows", "columns"],
|
|
594
|
+
properties: slidesElementProperties({
|
|
595
|
+
rows: { type: "number" },
|
|
596
|
+
columns: { type: "number" },
|
|
597
|
+
}),
|
|
598
|
+
},
|
|
599
|
+
permissionPolicy: "on-request",
|
|
600
|
+
async executor(input) {
|
|
601
|
+
return {
|
|
602
|
+
content: JSON.stringify(await createGoogleSlidesTable(parseSlidesCreateTableInput(input))),
|
|
603
|
+
};
|
|
604
|
+
},
|
|
605
|
+
};
|
|
606
|
+
const slidesUpdateTextStyleTool = {
|
|
607
|
+
id: "google_slides_update_text_style",
|
|
608
|
+
name: "Google Slides update text style",
|
|
609
|
+
description: "Update text style fields for a Google Slides text object.",
|
|
610
|
+
inputSchema: slidesStyleInputSchema("style"),
|
|
611
|
+
permissionPolicy: "on-request",
|
|
612
|
+
async executor(input) {
|
|
613
|
+
return {
|
|
614
|
+
content: JSON.stringify(await updateGoogleSlidesTextStyle(parseSlidesStyleObjectInput(input, "google_slides_update_text_style"))),
|
|
615
|
+
};
|
|
616
|
+
},
|
|
617
|
+
};
|
|
618
|
+
const slidesUpdateShapeStyleTool = {
|
|
619
|
+
id: "google_slides_update_shape_style",
|
|
620
|
+
name: "Google Slides update shape style",
|
|
621
|
+
description: "Update shape property fields for a Google Slides shape object.",
|
|
622
|
+
inputSchema: slidesStyleInputSchema("style"),
|
|
623
|
+
permissionPolicy: "on-request",
|
|
624
|
+
async executor(input) {
|
|
625
|
+
return {
|
|
626
|
+
content: JSON.stringify(await updateGoogleSlidesShapeStyle(parseSlidesStyleObjectInput(input, "google_slides_update_shape_style"))),
|
|
627
|
+
};
|
|
628
|
+
},
|
|
629
|
+
};
|
|
630
|
+
const slidesBatchUpdateTool = {
|
|
631
|
+
id: "google_slides_batch_update",
|
|
632
|
+
name: "Google Slides batch update",
|
|
633
|
+
description: "Apply advanced Google Slides batchUpdate requests to a presentation.",
|
|
634
|
+
inputSchema: {
|
|
635
|
+
type: "object",
|
|
636
|
+
additionalProperties: false,
|
|
637
|
+
required: ["presentationId", "requests"],
|
|
638
|
+
properties: {
|
|
639
|
+
presentationId: { type: "string" },
|
|
640
|
+
requests: {
|
|
641
|
+
type: "array",
|
|
642
|
+
items: { type: "object" },
|
|
643
|
+
description: "Google Slides API batchUpdate requests. Use high-level tools when possible.",
|
|
644
|
+
},
|
|
645
|
+
},
|
|
646
|
+
},
|
|
647
|
+
permissionPolicy: "on-request",
|
|
648
|
+
async executor(input) {
|
|
649
|
+
return {
|
|
650
|
+
content: JSON.stringify(await batchUpdateGoogleSlides(parseSlidesBatchUpdateInput(input))),
|
|
651
|
+
};
|
|
652
|
+
},
|
|
653
|
+
};
|
|
654
|
+
const driveCreateFolderTool = {
|
|
655
|
+
id: "google_drive_create_folder",
|
|
656
|
+
name: "Google Drive create folder",
|
|
657
|
+
description: "Create a Google Drive folder, optionally inside a parent folder id.",
|
|
658
|
+
inputSchema: {
|
|
659
|
+
type: "object",
|
|
660
|
+
additionalProperties: false,
|
|
661
|
+
required: ["name"],
|
|
662
|
+
properties: {
|
|
663
|
+
name: {
|
|
664
|
+
type: "string",
|
|
665
|
+
description: "Folder name to create.",
|
|
666
|
+
},
|
|
667
|
+
parentId: {
|
|
668
|
+
type: "string",
|
|
669
|
+
description: "Optional parent folder id.",
|
|
670
|
+
},
|
|
671
|
+
},
|
|
672
|
+
},
|
|
673
|
+
permissionPolicy: "on-request",
|
|
674
|
+
async executor(input) {
|
|
675
|
+
return {
|
|
676
|
+
content: JSON.stringify(await createGoogleDriveFolder(parseDriveCreateFolderInput(input))),
|
|
677
|
+
};
|
|
678
|
+
},
|
|
679
|
+
};
|
|
680
|
+
const driveCreateTextFileTool = {
|
|
681
|
+
id: "google_drive_create_text_file",
|
|
682
|
+
name: "Google Drive create text file",
|
|
683
|
+
description: "Create a plain text Google Drive file, optionally inside a parent folder id.",
|
|
684
|
+
inputSchema: {
|
|
685
|
+
type: "object",
|
|
686
|
+
additionalProperties: false,
|
|
687
|
+
required: ["name", "text"],
|
|
688
|
+
properties: {
|
|
689
|
+
name: {
|
|
690
|
+
type: "string",
|
|
691
|
+
description: "File name to create.",
|
|
692
|
+
},
|
|
693
|
+
text: {
|
|
694
|
+
type: "string",
|
|
695
|
+
description: "Text content to upload.",
|
|
696
|
+
},
|
|
697
|
+
parentId: {
|
|
698
|
+
type: "string",
|
|
699
|
+
description: "Optional parent folder id.",
|
|
700
|
+
},
|
|
701
|
+
mimeType: {
|
|
702
|
+
type: "string",
|
|
703
|
+
description: "Optional text MIME type. Defaults to text/plain.",
|
|
704
|
+
},
|
|
705
|
+
},
|
|
706
|
+
},
|
|
707
|
+
permissionPolicy: "on-request",
|
|
708
|
+
async executor(input) {
|
|
709
|
+
return {
|
|
710
|
+
content: JSON.stringify(await createGoogleDriveTextFile(parseDriveCreateTextFileInput(input))),
|
|
711
|
+
};
|
|
712
|
+
},
|
|
713
|
+
};
|
|
714
|
+
const driveRenameFileTool = {
|
|
715
|
+
id: "google_drive_rename_file",
|
|
716
|
+
name: "Google Drive rename file",
|
|
717
|
+
description: "Rename a Google Drive file or folder by file id.",
|
|
718
|
+
inputSchema: {
|
|
719
|
+
type: "object",
|
|
720
|
+
additionalProperties: false,
|
|
721
|
+
required: ["fileId", "name"],
|
|
722
|
+
properties: {
|
|
723
|
+
fileId: {
|
|
724
|
+
type: "string",
|
|
725
|
+
description: "Google Drive file id to rename.",
|
|
726
|
+
},
|
|
727
|
+
name: {
|
|
728
|
+
type: "string",
|
|
729
|
+
description: "New file or folder name.",
|
|
730
|
+
},
|
|
731
|
+
},
|
|
732
|
+
},
|
|
733
|
+
permissionPolicy: "on-request",
|
|
734
|
+
async executor(input) {
|
|
735
|
+
return {
|
|
736
|
+
content: JSON.stringify(await renameGoogleDriveFile(parseDriveRenameFileInput(input))),
|
|
737
|
+
};
|
|
738
|
+
},
|
|
739
|
+
};
|
|
740
|
+
const driveMoveFileTool = {
|
|
741
|
+
id: "google_drive_move_file",
|
|
742
|
+
name: "Google Drive move file",
|
|
743
|
+
description: "Move a Google Drive file or folder into a target folder by id.",
|
|
744
|
+
inputSchema: {
|
|
745
|
+
type: "object",
|
|
746
|
+
additionalProperties: false,
|
|
747
|
+
required: ["fileId", "targetFolderId"],
|
|
748
|
+
properties: {
|
|
749
|
+
fileId: {
|
|
750
|
+
type: "string",
|
|
751
|
+
description: "Google Drive file id to move.",
|
|
752
|
+
},
|
|
753
|
+
targetFolderId: {
|
|
754
|
+
type: "string",
|
|
755
|
+
description: "Destination Google Drive folder id.",
|
|
756
|
+
},
|
|
757
|
+
},
|
|
758
|
+
},
|
|
759
|
+
permissionPolicy: "on-request",
|
|
760
|
+
async executor(input) {
|
|
761
|
+
return {
|
|
762
|
+
content: JSON.stringify(await moveGoogleDriveFile(parseDriveMoveFileInput(input))),
|
|
763
|
+
};
|
|
764
|
+
},
|
|
765
|
+
};
|
|
766
|
+
const driveTrashFileTool = {
|
|
767
|
+
id: "google_drive_trash_file",
|
|
768
|
+
name: "Google Drive trash file",
|
|
769
|
+
description: "Move a Google Drive file or folder to trash by file id. This does not permanently delete it.",
|
|
770
|
+
inputSchema: {
|
|
771
|
+
type: "object",
|
|
772
|
+
additionalProperties: false,
|
|
773
|
+
required: ["fileId"],
|
|
774
|
+
properties: {
|
|
775
|
+
fileId: {
|
|
776
|
+
type: "string",
|
|
777
|
+
description: "Google Drive file id to move to trash.",
|
|
778
|
+
},
|
|
779
|
+
},
|
|
780
|
+
},
|
|
781
|
+
permissionPolicy: "on-request",
|
|
782
|
+
async executor(input) {
|
|
783
|
+
return {
|
|
784
|
+
content: JSON.stringify(await trashGoogleDriveFile(parseDriveFileIdInput(input, "google_drive_trash_file"))),
|
|
785
|
+
};
|
|
786
|
+
},
|
|
787
|
+
};
|
|
788
|
+
const docsCreateTool = {
|
|
789
|
+
id: "google_docs_create",
|
|
790
|
+
name: "Google Docs create",
|
|
791
|
+
description: "Create a native Google Doc with an optional initial Markdown-formatted body.",
|
|
792
|
+
inputSchema: {
|
|
793
|
+
type: "object",
|
|
794
|
+
additionalProperties: false,
|
|
795
|
+
required: ["title"],
|
|
796
|
+
properties: {
|
|
797
|
+
title: {
|
|
798
|
+
type: "string",
|
|
799
|
+
description: "Google Doc title.",
|
|
800
|
+
},
|
|
801
|
+
text: {
|
|
802
|
+
type: "string",
|
|
803
|
+
description: "Optional initial document text.",
|
|
804
|
+
},
|
|
805
|
+
format: {
|
|
806
|
+
type: "string",
|
|
807
|
+
enum: ["markdown", "plain_text"],
|
|
808
|
+
description: "How to interpret text. Defaults to markdown for headings, bold, links, lists, separators, and simple tables.",
|
|
809
|
+
},
|
|
810
|
+
},
|
|
811
|
+
},
|
|
812
|
+
permissionPolicy: "on-request",
|
|
813
|
+
async executor(input) {
|
|
814
|
+
return {
|
|
815
|
+
content: JSON.stringify(await createGoogleDoc(parseDocsCreateInput(input))),
|
|
816
|
+
};
|
|
817
|
+
},
|
|
818
|
+
};
|
|
819
|
+
const docsAppendTextTool = {
|
|
820
|
+
id: "google_docs_append_text",
|
|
821
|
+
name: "Google Docs append text",
|
|
822
|
+
description: "Append Markdown-formatted text to the end of a Google Doc by document id.",
|
|
823
|
+
inputSchema: {
|
|
824
|
+
type: "object",
|
|
825
|
+
additionalProperties: false,
|
|
826
|
+
required: ["documentId", "text"],
|
|
827
|
+
properties: {
|
|
828
|
+
documentId: {
|
|
829
|
+
type: "string",
|
|
830
|
+
description: "Google Docs document id.",
|
|
831
|
+
},
|
|
832
|
+
text: {
|
|
833
|
+
type: "string",
|
|
834
|
+
description: "Text to append.",
|
|
835
|
+
},
|
|
836
|
+
format: {
|
|
837
|
+
type: "string",
|
|
838
|
+
enum: ["markdown", "plain_text"],
|
|
839
|
+
description: "How to interpret text. Defaults to markdown for headings, bold, links, lists, separators, and simple tables.",
|
|
840
|
+
},
|
|
841
|
+
},
|
|
842
|
+
},
|
|
843
|
+
permissionPolicy: "on-request",
|
|
844
|
+
async executor(input) {
|
|
845
|
+
return {
|
|
846
|
+
content: JSON.stringify(await appendGoogleDocText(parseDocsTextInput(input, "google_docs_append_text"))),
|
|
847
|
+
};
|
|
848
|
+
},
|
|
849
|
+
};
|
|
850
|
+
const docsReplaceTextTool = {
|
|
851
|
+
id: "google_docs_replace_text",
|
|
852
|
+
name: "Google Docs replace text",
|
|
853
|
+
description: "Replace the full body of a Google Doc with Markdown-formatted text by document id.",
|
|
854
|
+
inputSchema: {
|
|
855
|
+
type: "object",
|
|
856
|
+
additionalProperties: false,
|
|
857
|
+
required: ["documentId", "text"],
|
|
858
|
+
properties: {
|
|
859
|
+
documentId: {
|
|
860
|
+
type: "string",
|
|
861
|
+
description: "Google Docs document id.",
|
|
862
|
+
},
|
|
863
|
+
text: {
|
|
864
|
+
type: "string",
|
|
865
|
+
description: "Replacement text for the document body.",
|
|
866
|
+
},
|
|
867
|
+
format: {
|
|
868
|
+
type: "string",
|
|
869
|
+
enum: ["markdown", "plain_text"],
|
|
870
|
+
description: "How to interpret text. Defaults to markdown for headings, bold, links, lists, separators, and simple tables.",
|
|
871
|
+
},
|
|
872
|
+
},
|
|
873
|
+
},
|
|
874
|
+
permissionPolicy: "on-request",
|
|
875
|
+
async executor(input) {
|
|
876
|
+
return {
|
|
877
|
+
content: JSON.stringify(await replaceGoogleDocText(parseDocsTextInput(input, "google_docs_replace_text"))),
|
|
878
|
+
};
|
|
879
|
+
},
|
|
880
|
+
};
|
|
881
|
+
const tools = [
|
|
882
|
+
statusTool,
|
|
883
|
+
driveSearchTool,
|
|
884
|
+
driveExportTextTool,
|
|
885
|
+
driveMetadataTool,
|
|
886
|
+
driveCreateFolderTool,
|
|
887
|
+
driveCreateTextFileTool,
|
|
888
|
+
driveRenameFileTool,
|
|
889
|
+
driveMoveFileTool,
|
|
890
|
+
driveTrashFileTool,
|
|
891
|
+
docsCreateTool,
|
|
892
|
+
docsAppendTextTool,
|
|
893
|
+
docsReplaceTextTool,
|
|
894
|
+
sheetsMetadataTool,
|
|
895
|
+
sheetsReadRangeTool,
|
|
896
|
+
sheetsSearchValuesTool,
|
|
897
|
+
sheetsCreateTool,
|
|
898
|
+
sheetsUpdateRangeTool,
|
|
899
|
+
sheetsAppendRowsTool,
|
|
900
|
+
sheetsClearRangeTool,
|
|
901
|
+
sheetsAddSheetTool,
|
|
902
|
+
sheetsRenameSheetTool,
|
|
903
|
+
sheetsDeleteSheetTool,
|
|
904
|
+
sheetsFormatRangeTool,
|
|
905
|
+
sheetsBatchUpdateTool,
|
|
906
|
+
slidesMetadataTool,
|
|
907
|
+
slidesReadTextTool,
|
|
908
|
+
slidesCreateTool,
|
|
909
|
+
slidesCreateSlideTool,
|
|
910
|
+
slidesDeleteObjectTool,
|
|
911
|
+
slidesCreateTextBoxTool,
|
|
912
|
+
slidesReplaceTextTool,
|
|
913
|
+
slidesCreateImageTool,
|
|
914
|
+
slidesCreateShapeTool,
|
|
915
|
+
slidesCreateTableTool,
|
|
916
|
+
slidesUpdateTextStyleTool,
|
|
917
|
+
slidesUpdateShapeStyleTool,
|
|
918
|
+
slidesBatchUpdateTool,
|
|
919
|
+
];
|
|
920
|
+
return {
|
|
921
|
+
definition: {
|
|
922
|
+
id: googleWorkspaceIntegrationId,
|
|
923
|
+
kind: googleWorkspaceIntegrationConfig.kind,
|
|
924
|
+
name: googleWorkspaceIntegrationConfig.name,
|
|
925
|
+
description: googleWorkspaceIntegrationConfig.description,
|
|
926
|
+
defaultEnabled: googleWorkspaceIntegrationConfig.defaultEnabled,
|
|
927
|
+
transport: {
|
|
928
|
+
kind: "oauth_api",
|
|
929
|
+
provider: "google",
|
|
930
|
+
},
|
|
931
|
+
auth: {
|
|
932
|
+
kind: "oauth",
|
|
933
|
+
provider: "google",
|
|
934
|
+
scopes: googleWorkspaceScopes,
|
|
935
|
+
secretRefPrefix: "secret_google_workspace",
|
|
936
|
+
},
|
|
937
|
+
skills: [
|
|
938
|
+
{
|
|
939
|
+
name: "Google Workspace app connector",
|
|
940
|
+
invocationName: "google-workspace",
|
|
941
|
+
description: "Use enabled Google Workspace capabilities through typed connector tools. Do not use raw Google REST calls, shell commands, MCP-only paths, or prompt hints for built-in Google support.",
|
|
942
|
+
triggerHints: ["google drive", "google docs", "google sheets"],
|
|
943
|
+
},
|
|
944
|
+
],
|
|
945
|
+
tools: tools.map((tool) => ({
|
|
946
|
+
id: tool.id,
|
|
947
|
+
name: tool.name,
|
|
948
|
+
description: tool.description,
|
|
949
|
+
inputSchema: tool.inputSchema,
|
|
950
|
+
permissionPolicy: tool.permissionPolicy,
|
|
951
|
+
readOnly: tool.permissionPolicy !== "on-request",
|
|
952
|
+
approvalRequired: tool.permissionPolicy === "on-request",
|
|
953
|
+
})),
|
|
954
|
+
},
|
|
955
|
+
tools,
|
|
956
|
+
};
|
|
957
|
+
}
|
|
958
|
+
export async function checkGoogleWorkspaceIntegrationStatus(options) {
|
|
959
|
+
const secretStore = options?.secretStore ?? createSystemKeychainSecretStore();
|
|
960
|
+
let credential;
|
|
961
|
+
try {
|
|
962
|
+
credential = await loadGoogleOAuthCredential({
|
|
963
|
+
secretStore,
|
|
964
|
+
secretId: googleWorkspaceOAuthSecretId,
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
catch (error) {
|
|
968
|
+
if (isUnsupportedSystemKeychainError(error)) {
|
|
969
|
+
credential = undefined;
|
|
970
|
+
}
|
|
971
|
+
else {
|
|
972
|
+
throw error;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
const metadata = getGoogleOAuthMetadata(credential);
|
|
976
|
+
if (metadata.authenticated) {
|
|
977
|
+
return {
|
|
978
|
+
id: googleWorkspaceIntegrationId,
|
|
979
|
+
status: "active",
|
|
980
|
+
message: metadata.email
|
|
981
|
+
? `Google Workspace OAuth ${metadata.email}`
|
|
982
|
+
: "Google Workspace OAuth is active.",
|
|
983
|
+
};
|
|
984
|
+
}
|
|
985
|
+
return {
|
|
986
|
+
id: googleWorkspaceIntegrationId,
|
|
987
|
+
status: "setup_required",
|
|
988
|
+
message: "Google Workspace login required.",
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
function isUnsupportedSystemKeychainError(error) {
|
|
992
|
+
return (error instanceof Error &&
|
|
993
|
+
error.message.startsWith("System keychain SecretStore is not supported on "));
|
|
994
|
+
}
|
|
995
|
+
function parseDriveSearchInput(input) {
|
|
996
|
+
if (!input || typeof input !== "object" || Array.isArray(input)) {
|
|
997
|
+
return {};
|
|
998
|
+
}
|
|
999
|
+
const record = input;
|
|
1000
|
+
return {
|
|
1001
|
+
...(typeof record.query === "string" ? { query: record.query } : {}),
|
|
1002
|
+
...(typeof record.pageSize === "number" ? { pageSize: record.pageSize } : {}),
|
|
1003
|
+
...(typeof record.mimeType === "string" ? { mimeType: record.mimeType } : {}),
|
|
1004
|
+
...(isDriveScope(record.driveScope) ? { driveScope: record.driveScope } : {}),
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
function isDriveScope(value) {
|
|
1008
|
+
return (value === "all_drives" ||
|
|
1009
|
+
value === "my_drive" ||
|
|
1010
|
+
value === "shared_with_me");
|
|
1011
|
+
}
|
|
1012
|
+
function parseDriveExportTextInput(input) {
|
|
1013
|
+
return parseDriveFileIdInput(input, "google_drive_export_text");
|
|
1014
|
+
}
|
|
1015
|
+
function parseDriveFileIdInput(input, toolName) {
|
|
1016
|
+
if (!input || typeof input !== "object" || Array.isArray(input)) {
|
|
1017
|
+
throw new Error(`${toolName} requires a fileId.`);
|
|
1018
|
+
}
|
|
1019
|
+
const fileId = input.fileId;
|
|
1020
|
+
if (typeof fileId !== "string" || !fileId.trim()) {
|
|
1021
|
+
throw new Error(`${toolName} requires a fileId.`);
|
|
1022
|
+
}
|
|
1023
|
+
return { fileId: fileId.trim() };
|
|
1024
|
+
}
|
|
1025
|
+
function parseDriveCreateFolderInput(input) {
|
|
1026
|
+
const record = requireRecordInput(input, "google_drive_create_folder");
|
|
1027
|
+
return {
|
|
1028
|
+
name: requireString(record, "name", "google_drive_create_folder"),
|
|
1029
|
+
...optionalStringProperty(record, "parentId"),
|
|
1030
|
+
};
|
|
1031
|
+
}
|
|
1032
|
+
function parseDriveCreateTextFileInput(input) {
|
|
1033
|
+
const record = requireRecordInput(input, "google_drive_create_text_file");
|
|
1034
|
+
return {
|
|
1035
|
+
name: requireString(record, "name", "google_drive_create_text_file"),
|
|
1036
|
+
text: requireString(record, "text", "google_drive_create_text_file"),
|
|
1037
|
+
...optionalStringProperty(record, "parentId"),
|
|
1038
|
+
...optionalStringProperty(record, "mimeType"),
|
|
1039
|
+
};
|
|
1040
|
+
}
|
|
1041
|
+
function parseDriveRenameFileInput(input) {
|
|
1042
|
+
const record = requireRecordInput(input, "google_drive_rename_file");
|
|
1043
|
+
return {
|
|
1044
|
+
fileId: requireString(record, "fileId", "google_drive_rename_file"),
|
|
1045
|
+
name: requireString(record, "name", "google_drive_rename_file"),
|
|
1046
|
+
};
|
|
1047
|
+
}
|
|
1048
|
+
function parseDriveMoveFileInput(input) {
|
|
1049
|
+
const record = requireRecordInput(input, "google_drive_move_file");
|
|
1050
|
+
return {
|
|
1051
|
+
fileId: requireString(record, "fileId", "google_drive_move_file"),
|
|
1052
|
+
targetFolderId: requireString(record, "targetFolderId", "google_drive_move_file"),
|
|
1053
|
+
};
|
|
1054
|
+
}
|
|
1055
|
+
function parseDocsCreateInput(input) {
|
|
1056
|
+
const record = requireRecordInput(input, "google_docs_create");
|
|
1057
|
+
return {
|
|
1058
|
+
title: requireString(record, "title", "google_docs_create"),
|
|
1059
|
+
...optionalStringProperty(record, "text"),
|
|
1060
|
+
...optionalDocsFormatProperty(record),
|
|
1061
|
+
};
|
|
1062
|
+
}
|
|
1063
|
+
function parseDocsTextInput(input, toolName) {
|
|
1064
|
+
const record = requireRecordInput(input, toolName);
|
|
1065
|
+
return {
|
|
1066
|
+
documentId: requireString(record, "documentId", toolName),
|
|
1067
|
+
text: requireString(record, "text", toolName),
|
|
1068
|
+
...optionalDocsFormatProperty(record),
|
|
1069
|
+
};
|
|
1070
|
+
}
|
|
1071
|
+
function requireRecordInput(input, toolName) {
|
|
1072
|
+
if (!input || typeof input !== "object" || Array.isArray(input)) {
|
|
1073
|
+
throw new Error(`${toolName} requires an object input.`);
|
|
1074
|
+
}
|
|
1075
|
+
return input;
|
|
1076
|
+
}
|
|
1077
|
+
function requireString(record, key, toolName) {
|
|
1078
|
+
const value = record[key];
|
|
1079
|
+
if (typeof value !== "string" || !value.trim()) {
|
|
1080
|
+
throw new Error(`${toolName} requires ${key}.`);
|
|
1081
|
+
}
|
|
1082
|
+
return value.trim();
|
|
1083
|
+
}
|
|
1084
|
+
function optionalStringProperty(record, key) {
|
|
1085
|
+
const value = record[key];
|
|
1086
|
+
return typeof value === "string" && value.trim()
|
|
1087
|
+
? { [key]: value.trim() }
|
|
1088
|
+
: {};
|
|
1089
|
+
}
|
|
1090
|
+
function optionalDocsFormatProperty(record) {
|
|
1091
|
+
return record.format === "markdown" || record.format === "plain_text"
|
|
1092
|
+
? { format: record.format }
|
|
1093
|
+
: {};
|
|
1094
|
+
}
|
|
1095
|
+
function slidesElementProperties(extra) {
|
|
1096
|
+
return {
|
|
1097
|
+
presentationId: { type: "string" },
|
|
1098
|
+
objectId: { type: "string" },
|
|
1099
|
+
pageObjectId: { type: "string" },
|
|
1100
|
+
x: { type: "number" },
|
|
1101
|
+
y: { type: "number" },
|
|
1102
|
+
width: { type: "number" },
|
|
1103
|
+
height: { type: "number" },
|
|
1104
|
+
...extra,
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
function slidesStyleInputSchema(styleKey) {
|
|
1108
|
+
return {
|
|
1109
|
+
type: "object",
|
|
1110
|
+
additionalProperties: false,
|
|
1111
|
+
required: ["presentationId", "objectId", styleKey, "fields"],
|
|
1112
|
+
properties: {
|
|
1113
|
+
presentationId: { type: "string" },
|
|
1114
|
+
objectId: { type: "string" },
|
|
1115
|
+
[styleKey]: { type: "object" },
|
|
1116
|
+
fields: { type: "string" },
|
|
1117
|
+
},
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
function parseSpreadsheetIdInput(input, toolName) {
|
|
1121
|
+
if (!input || typeof input !== "object" || Array.isArray(input)) {
|
|
1122
|
+
throw new Error(`${toolName} requires a spreadsheetId.`);
|
|
1123
|
+
}
|
|
1124
|
+
const spreadsheetId = input.spreadsheetId;
|
|
1125
|
+
if (typeof spreadsheetId !== "string" || !spreadsheetId.trim()) {
|
|
1126
|
+
throw new Error(`${toolName} requires a spreadsheetId.`);
|
|
1127
|
+
}
|
|
1128
|
+
return { spreadsheetId: spreadsheetId.trim() };
|
|
1129
|
+
}
|
|
1130
|
+
function parseSheetsReadRangeInput(input) {
|
|
1131
|
+
const base = parseSpreadsheetIdInput(input, "google_sheets_read_range");
|
|
1132
|
+
const range = input.range;
|
|
1133
|
+
if (typeof range !== "string" || !range.trim()) {
|
|
1134
|
+
throw new Error("google_sheets_read_range requires a range.");
|
|
1135
|
+
}
|
|
1136
|
+
return { ...base, range: range.trim() };
|
|
1137
|
+
}
|
|
1138
|
+
function parseSheetsCreateInput(input) {
|
|
1139
|
+
const record = requireRecordInput(input, "google_sheets_create");
|
|
1140
|
+
return { title: requireString(record, "title", "google_sheets_create") };
|
|
1141
|
+
}
|
|
1142
|
+
function parseSheetsWriteRangeInput(input, toolName) {
|
|
1143
|
+
const base = parseSheetsReadRangeInput(input);
|
|
1144
|
+
const record = input;
|
|
1145
|
+
if (!Array.isArray(record.values) || !record.values.every(Array.isArray)) {
|
|
1146
|
+
throw new Error(`${toolName} requires values as an array of rows.`);
|
|
1147
|
+
}
|
|
1148
|
+
return {
|
|
1149
|
+
...base,
|
|
1150
|
+
values: record.values,
|
|
1151
|
+
...(record.valueInputOption === "RAW" ||
|
|
1152
|
+
record.valueInputOption === "USER_ENTERED"
|
|
1153
|
+
? { valueInputOption: record.valueInputOption }
|
|
1154
|
+
: {}),
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
function parseSheetsClearRangeInput(input) {
|
|
1158
|
+
const base = parseSpreadsheetIdInput(input, "google_sheets_clear_range");
|
|
1159
|
+
const range = input.range;
|
|
1160
|
+
if (typeof range !== "string" || !range.trim()) {
|
|
1161
|
+
throw new Error("google_sheets_clear_range requires a range.");
|
|
1162
|
+
}
|
|
1163
|
+
return { ...base, range: range.trim() };
|
|
1164
|
+
}
|
|
1165
|
+
function parseSheetsSheetInput(input, toolName) {
|
|
1166
|
+
const record = requireRecordInput(input, toolName);
|
|
1167
|
+
return {
|
|
1168
|
+
spreadsheetId: requireString(record, "spreadsheetId", toolName),
|
|
1169
|
+
title: requireString(record, "title", toolName),
|
|
1170
|
+
};
|
|
1171
|
+
}
|
|
1172
|
+
function parseSheetsRenameSheetInput(input) {
|
|
1173
|
+
const record = requireRecordInput(input, "google_sheets_rename_sheet");
|
|
1174
|
+
return {
|
|
1175
|
+
spreadsheetId: requireString(record, "spreadsheetId", "google_sheets_rename_sheet"),
|
|
1176
|
+
sheetId: requireNumber(record, "sheetId", "google_sheets_rename_sheet"),
|
|
1177
|
+
title: requireString(record, "title", "google_sheets_rename_sheet"),
|
|
1178
|
+
};
|
|
1179
|
+
}
|
|
1180
|
+
function parseSheetsDeleteSheetInput(input) {
|
|
1181
|
+
const record = requireRecordInput(input, "google_sheets_delete_sheet");
|
|
1182
|
+
return {
|
|
1183
|
+
spreadsheetId: requireString(record, "spreadsheetId", "google_sheets_delete_sheet"),
|
|
1184
|
+
sheetId: requireNumber(record, "sheetId", "google_sheets_delete_sheet"),
|
|
1185
|
+
};
|
|
1186
|
+
}
|
|
1187
|
+
function parseSheetsFormatRangeInput(input) {
|
|
1188
|
+
const record = requireRecordInput(input, "google_sheets_format_range");
|
|
1189
|
+
const userEnteredFormat = record.userEnteredFormat;
|
|
1190
|
+
if (!userEnteredFormat || typeof userEnteredFormat !== "object" || Array.isArray(userEnteredFormat)) {
|
|
1191
|
+
throw new Error("google_sheets_format_range requires userEnteredFormat.");
|
|
1192
|
+
}
|
|
1193
|
+
return {
|
|
1194
|
+
spreadsheetId: requireString(record, "spreadsheetId", "google_sheets_format_range"),
|
|
1195
|
+
sheetId: requireNumber(record, "sheetId", "google_sheets_format_range"),
|
|
1196
|
+
...optionalNumberProperty(record, "startRowIndex"),
|
|
1197
|
+
...optionalNumberProperty(record, "endRowIndex"),
|
|
1198
|
+
...optionalNumberProperty(record, "startColumnIndex"),
|
|
1199
|
+
...optionalNumberProperty(record, "endColumnIndex"),
|
|
1200
|
+
userEnteredFormat: userEnteredFormat,
|
|
1201
|
+
fields: requireString(record, "fields", "google_sheets_format_range"),
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
function parseSheetsBatchUpdateInput(input) {
|
|
1205
|
+
const record = requireRecordInput(input, "google_sheets_batch_update");
|
|
1206
|
+
if (!Array.isArray(record.requests) || !record.requests.every(isPlainObject)) {
|
|
1207
|
+
throw new Error("google_sheets_batch_update requires requests.");
|
|
1208
|
+
}
|
|
1209
|
+
return {
|
|
1210
|
+
spreadsheetId: requireString(record, "spreadsheetId", "google_sheets_batch_update"),
|
|
1211
|
+
requests: record.requests,
|
|
1212
|
+
};
|
|
1213
|
+
}
|
|
1214
|
+
function parseSlidesPresentationInput(input, toolName) {
|
|
1215
|
+
const record = requireRecordInput(input, toolName);
|
|
1216
|
+
return {
|
|
1217
|
+
presentationId: requireString(record, "presentationId", toolName),
|
|
1218
|
+
};
|
|
1219
|
+
}
|
|
1220
|
+
function parseSlidesCreateInput(input) {
|
|
1221
|
+
const record = requireRecordInput(input, "google_slides_create");
|
|
1222
|
+
return { title: requireString(record, "title", "google_slides_create") };
|
|
1223
|
+
}
|
|
1224
|
+
function parseSlidesCreateSlideInput(input) {
|
|
1225
|
+
const record = requireRecordInput(input, "google_slides_create_slide");
|
|
1226
|
+
return {
|
|
1227
|
+
presentationId: requireString(record, "presentationId", "google_slides_create_slide"),
|
|
1228
|
+
...optionalStringProperty(record, "objectId"),
|
|
1229
|
+
...optionalNumberProperty(record, "insertionIndex"),
|
|
1230
|
+
...optionalStringProperty(record, "predefinedLayout"),
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
function parseSlidesObjectInput(input, toolName) {
|
|
1234
|
+
const record = requireRecordInput(input, toolName);
|
|
1235
|
+
return {
|
|
1236
|
+
presentationId: requireString(record, "presentationId", toolName),
|
|
1237
|
+
objectId: requireString(record, "objectId", toolName),
|
|
1238
|
+
};
|
|
1239
|
+
}
|
|
1240
|
+
function parseSlidesCreateTextBoxInput(input) {
|
|
1241
|
+
const record = requireRecordInput(input, "google_slides_create_text_box");
|
|
1242
|
+
return {
|
|
1243
|
+
...parseSlidesElementInput(record, "google_slides_create_text_box"),
|
|
1244
|
+
text: requireString(record, "text", "google_slides_create_text_box"),
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
function parseSlidesReplaceTextInput(input) {
|
|
1248
|
+
const record = requireRecordInput(input, "google_slides_replace_text");
|
|
1249
|
+
return {
|
|
1250
|
+
presentationId: requireString(record, "presentationId", "google_slides_replace_text"),
|
|
1251
|
+
containsText: requireString(record, "containsText", "google_slides_replace_text"),
|
|
1252
|
+
replaceText: requireString(record, "replaceText", "google_slides_replace_text"),
|
|
1253
|
+
...(Array.isArray(record.pageObjectIds)
|
|
1254
|
+
? { pageObjectIds: record.pageObjectIds.filter((value) => typeof value === "string") }
|
|
1255
|
+
: {}),
|
|
1256
|
+
};
|
|
1257
|
+
}
|
|
1258
|
+
function parseSlidesCreateImageInput(input) {
|
|
1259
|
+
const record = requireRecordInput(input, "google_slides_create_image");
|
|
1260
|
+
return {
|
|
1261
|
+
...parseSlidesElementInput(record, "google_slides_create_image"),
|
|
1262
|
+
url: requireString(record, "url", "google_slides_create_image"),
|
|
1263
|
+
};
|
|
1264
|
+
}
|
|
1265
|
+
function parseSlidesCreateShapeInput(input) {
|
|
1266
|
+
const record = requireRecordInput(input, "google_slides_create_shape");
|
|
1267
|
+
return {
|
|
1268
|
+
...parseSlidesElementInput(record, "google_slides_create_shape"),
|
|
1269
|
+
...optionalStringProperty(record, "shapeType"),
|
|
1270
|
+
};
|
|
1271
|
+
}
|
|
1272
|
+
function parseSlidesCreateTableInput(input) {
|
|
1273
|
+
const record = requireRecordInput(input, "google_slides_create_table");
|
|
1274
|
+
return {
|
|
1275
|
+
...parseSlidesElementInput(record, "google_slides_create_table"),
|
|
1276
|
+
rows: requirePositiveInteger(record, "rows", "google_slides_create_table"),
|
|
1277
|
+
columns: requirePositiveInteger(record, "columns", "google_slides_create_table"),
|
|
1278
|
+
};
|
|
1279
|
+
}
|
|
1280
|
+
function parseSlidesStyleObjectInput(input, toolName) {
|
|
1281
|
+
const record = requireRecordInput(input, toolName);
|
|
1282
|
+
const style = record.style;
|
|
1283
|
+
if (!isPlainObject(style)) {
|
|
1284
|
+
throw new Error(`${toolName} requires style.`);
|
|
1285
|
+
}
|
|
1286
|
+
return {
|
|
1287
|
+
presentationId: requireString(record, "presentationId", toolName),
|
|
1288
|
+
objectId: requireString(record, "objectId", toolName),
|
|
1289
|
+
style,
|
|
1290
|
+
fields: requireString(record, "fields", toolName),
|
|
1291
|
+
};
|
|
1292
|
+
}
|
|
1293
|
+
function parseSlidesBatchUpdateInput(input) {
|
|
1294
|
+
const record = requireRecordInput(input, "google_slides_batch_update");
|
|
1295
|
+
if (!Array.isArray(record.requests) || !record.requests.every(isPlainObject)) {
|
|
1296
|
+
throw new Error("google_slides_batch_update requires requests.");
|
|
1297
|
+
}
|
|
1298
|
+
return {
|
|
1299
|
+
presentationId: requireString(record, "presentationId", "google_slides_batch_update"),
|
|
1300
|
+
requests: record.requests,
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
function parseSlidesElementInput(record, toolName) {
|
|
1304
|
+
return {
|
|
1305
|
+
presentationId: requireString(record, "presentationId", toolName),
|
|
1306
|
+
...optionalStringProperty(record, "objectId"),
|
|
1307
|
+
pageObjectId: requireString(record, "pageObjectId", toolName),
|
|
1308
|
+
...optionalNumberProperty(record, "x"),
|
|
1309
|
+
...optionalNumberProperty(record, "y"),
|
|
1310
|
+
...optionalNumberProperty(record, "width"),
|
|
1311
|
+
...optionalNumberProperty(record, "height"),
|
|
1312
|
+
};
|
|
1313
|
+
}
|
|
1314
|
+
function parseSheetsSearchValuesInput(input) {
|
|
1315
|
+
const base = parseSpreadsheetIdInput(input, "google_sheets_search_values");
|
|
1316
|
+
const record = input;
|
|
1317
|
+
const query = record.query;
|
|
1318
|
+
if (typeof query !== "string" || !query.trim()) {
|
|
1319
|
+
throw new Error("google_sheets_search_values requires a query.");
|
|
1320
|
+
}
|
|
1321
|
+
return {
|
|
1322
|
+
...base,
|
|
1323
|
+
query: query.trim(),
|
|
1324
|
+
...(Array.isArray(record.ranges)
|
|
1325
|
+
? { ranges: record.ranges.filter((value) => typeof value === "string") }
|
|
1326
|
+
: {}),
|
|
1327
|
+
...(typeof record.maxMatches === "number" ? { maxMatches: record.maxMatches } : {}),
|
|
1328
|
+
};
|
|
1329
|
+
}
|
|
1330
|
+
function requireNumber(record, key, toolName) {
|
|
1331
|
+
const value = record[key];
|
|
1332
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
1333
|
+
throw new Error(`${toolName} requires ${key}.`);
|
|
1334
|
+
}
|
|
1335
|
+
return value;
|
|
1336
|
+
}
|
|
1337
|
+
function requirePositiveInteger(record, key, toolName) {
|
|
1338
|
+
const value = requireNumber(record, key, toolName);
|
|
1339
|
+
if (!Number.isInteger(value) || value < 1) {
|
|
1340
|
+
throw new Error(`${toolName} requires ${key} to be a positive integer.`);
|
|
1341
|
+
}
|
|
1342
|
+
return value;
|
|
1343
|
+
}
|
|
1344
|
+
function optionalNumberProperty(record, key) {
|
|
1345
|
+
const value = record[key];
|
|
1346
|
+
return typeof value === "number" && Number.isFinite(value)
|
|
1347
|
+
? { [key]: value }
|
|
1348
|
+
: {};
|
|
1349
|
+
}
|
|
1350
|
+
function isPlainObject(value) {
|
|
1351
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
1352
|
+
}
|
|
1353
|
+
//# sourceMappingURL=google-workspace-integration.js.map
|