Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ updates:
include: "scope"

- package-ecosystem: "npm"
directory: "/workspace-mcp-server"
directory: "/workspace-server"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ jobs:
run: npm run lint

- name: Run type checking
run: npx tsc --noEmit --project workspace-mcp-server
run: npx tsc --noEmit --project workspace-server

- name: Run tests with coverage
run: npm run test:ci

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
directory: ./workspace-mcp-server/coverage
directory: ./workspace-server/coverage
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
uses: actions/upload-artifact@v5
with:
name: dist
path: workspace-mcp-server/dist/
path: workspace-server/dist/

security:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: npm ci

- name: Build extension
run: npm run build --workspace=workspace-mcp-server
run: npm run build --workspace=workspace-server

- name: Create release assets
run: npm run release
Expand All @@ -35,4 +35,4 @@ jobs:
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: release/workspace-mcp-server.tar.gz
files: release/google-workspace-extension.tar.gz
2 changes: 1 addition & 1 deletion GEMINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This is a Gemini extension that provides tools for interacting with Google Works
### Building and Running

* **Install dependencies:** `npm install`
* **Build the project:** `npm run build --prefix workspace-mcp-server`
* **Build the project:** `npm run build --prefix workspace-server`

### Development Conventions

Expand Down
4 changes: 2 additions & 2 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ To execute the unit test suite for the project:
npm run test
```

This will run tests located in the `workspace-mcp-server/src/__tests__` directory. Ensure tests pass before submitting any changes. For a more comprehensive check, it is recommended to run `npm run test && npm run lint`.
This will run tests located in the `workspace-server/src/__tests__` directory. Ensure tests pass before submitting any changes. For a more comprehensive check, it is recommended to run `npm run test && npm run lint`.

### Linting and Style Checks

Expand Down Expand Up @@ -102,7 +102,7 @@ npm run lint

### Project Structure

- `workspace-mcp-server/`: The main workspace for the MCP server.
- `workspace-server/`: The main workspace for the MCP server.
- `src/`: Contains the source code for the server.
- `__tests__/`: Contains all the tests.
- `auth/`: Handles authentication.
Expand Down
2 changes: 1 addition & 1 deletion docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gh release create v1.0.0 --generate-notes

1. **GitHub Actions Trigger**: The `release.yml` workflow is triggered by the new tag.
2. **Build**: The workflow builds the project using `npm run build`.
3. **Package**: It creates a `workspace-mcp-server.tar.gz` file containing the extension.
3. **Package**: It creates a `workspace-server.tar.gz` file containing the extension.
4. **Upload**: The workflow uploads the tarball to the release you just created.

## Manual Release (Alternative)
Expand Down
8 changes: 4 additions & 4 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = [
ignores: ['**/dist/', '*.js', '**/node_modules/', '**/coverage/', '!eslint.config.js'],
},
{
files: ['workspace-mcp-server/src/**/*.ts'],
files: ['workspace-server/src/**/*.ts'],
ignores: ['**/*.test.ts', '**/*.spec.ts'],
languageOptions: {
parser: tsParser,
Expand Down Expand Up @@ -44,7 +44,7 @@ module.exports = [
},
},
{
files: ['workspace-mcp-server/src/**/*.test.ts', 'workspace-mcp-server/src/**/*.spec.ts'],
files: ['workspace-server/src/**/*.test.ts', 'workspace-server/src/**/*.spec.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
Expand All @@ -71,7 +71,7 @@ module.exports = [
},
{
files: ['./**/*.{tsx,ts,js}'],
ignores: ['workspace-mcp-server/src/index.ts'], // Has shebang which conflicts with license header
ignores: ['workspace-server/src/index.ts'], // Has shebang which conflicts with license header
plugins: {
'license-header': licenseHeader,
import: importPlugin,
Expand All @@ -91,7 +91,7 @@ module.exports = [
},
},
{
files: ['workspace-mcp-server/src/index.ts'],
files: ['workspace-server/src/index.ts'],
plugins: {
import: importPlugin,
},
Expand Down
9 changes: 4 additions & 5 deletions gemini-extension.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"name": "google-workspace",
"version": "0.0.1",
"contextFileName": "workspace-mcp-server${/}WORKSPACE-Context.md",
"version": "DEV",
"contextFileName": "workspace-server${/}WORKSPACE-Context.md",
"mcpServers": {
"google-workspace": {
"program": "./workspace-server/dist/index.js",
"command": "node",
"args": [
"scripts${/}start.js"
],
"args": ["scripts${/}start.js"],
"cwd": "${extensionPath}"
}
}
Expand Down
25 changes: 13 additions & 12 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module.exports = {
testEnvironment: 'node',
projects: [
{
displayName: 'workspace-mcp-server',
testMatch: ['<rootDir>/workspace-mcp-server/src/**/*.test.ts', '<rootDir>/workspace-mcp-server/src/**/*.spec.ts'],
displayName: 'workspace-server',
testMatch: ['<rootDir>/workspace-server/src/**/*.test.ts', '<rootDir>/workspace-server/src/**/*.spec.ts'],
transform: {
'^.+\\.ts$': ['ts-jest', {
tsconfig: {
Expand All @@ -17,18 +17,19 @@ module.exports = {
'node_modules/(?!(marked)/)',
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/workspace-mcp-server/src/$1',
'\\.wasm$': '<rootDir>/workspace-mcp-server/src/__tests__/mocks/wasm.js',
'^marked$': '<rootDir>/workspace-mcp-server/src/__tests__/mocks/marked.js',
'^jsdom$': '<rootDir>/workspace-mcp-server/src/__tests__/mocks/jsdom.ts',
'^@/(.*)$': '<rootDir>/workspace-server/src/$1',
'\\.wasm$': '<rootDir>/workspace-server/src/__tests__/mocks/wasm.js',
'^marked$': '<rootDir>/workspace-server/src/__tests__/mocks/marked.js',
'^jsdom$': '<rootDir>/workspace-server/src/__tests__/mocks/jsdom.ts',
},
setupFilesAfterEnv: ['<rootDir>/workspace-mcp-server/src/__tests__/setup.ts'],
roots: ['<rootDir>/workspace-server/src'],
setupFilesAfterEnv: ['<rootDir>/workspace-server/src/__tests__/setup.ts'],
collectCoverageFrom: [
'<rootDir>/workspace-mcp-server/src/**/*.ts',
'!<rootDir>/workspace-mcp-server/src/**/*.d.ts',
'!<rootDir>/workspace-mcp-server/src/**/*.test.ts',
'!<rootDir>/workspace-mcp-server/src/**/*.spec.ts',
'!<rootDir>/workspace-mcp-server/src/index.ts',
'<rootDir>/workspace-server/src/**/*.ts',
'!<rootDir>/workspace-server/src/**/*.d.ts',
'!<rootDir>/workspace-server/src/**/*.test.ts',
'!<rootDir>/workspace-server/src/**/*.spec.ts',
'!<rootDir>/workspace-server/src/index.ts',
],
coverageDirectory: '<rootDir>/coverage',
coverageThreshold: {
Expand Down
72 changes: 32 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"gemini-workspace-server": "workspace-mcp-server/dist/index.js"
},
"workspaces": [
"workspace-mcp-server"
"workspace-server"
],
"scripts": {
"prepare": "npm run build",
Expand All @@ -17,20 +17,21 @@
"test:coverage": "npm run test:coverage --workspaces --if-present",
"test:ci": "npm run test:ci --workspaces --if-present",
"start": "npm run start --workspaces --if-present",
"auth-utils": "npm run build:auth-utils -w workspace-mcp-server && node scripts/auth-utils.js",
"clean": "rm -rf release && npm run clean --workspaces --if-present",
"auth-utils": "npm run build:auth-utils -w workspace-server && node scripts/auth-utils.js",
"clean": "npm run clean --workspaces --if-present && rm -rf release node_modules logs",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"release": "node scripts/release.js"
"release": "node scripts/release.js",
"release:dev": "npm install && npm run build && node scripts/release.js"
},
"dependencies": {
"@google-apps/chat": "^0.19.0",
"@google-apps/chat": "^0.21.0",
"@google-cloud/local-auth": "^3.0.1",
"@googleapis/docs": "^5.0.1",
"@googleapis/drive": "^15.0.0",
"@googleapis/docs": "^8.1.1",
"@googleapis/drive": "^19.2.0",
"@modelcontextprotocol/sdk": "^1.17.5",
"dompurify": "^3.1.6",
"google-auth-library": "^10.4.0",
"google-auth-library": "^10.5.0",
"googleapis": "^166.0.0",
"jsdom": "^27.2.0",
"keytar": "^7.9.0",
Expand Down
25 changes: 25 additions & 0 deletions scripts/list-deps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/

const path = require('node:path');
const { getTransitiveDependencies } = require('./utils/dependencies');

const root = path.join(__dirname, '..');
const targetPackages = process.argv.slice(2);

if (targetPackages.length === 0) {
console.log('Usage: node scripts/list-deps.js <package1> [package2...]');
process.exit(1);
}

console.log(`Analyzing dependencies for: ${targetPackages.join(', ')}`);

const allDeps = getTransitiveDependencies(root, targetPackages);

console.log('\nTransitive Dependencies:');
Array.from(allDeps).sort().forEach(dep => {
console.log(`- ${dep}`);
});
Loading