Add version management, metrics, and trigger code generation tools

New tools added:
- delete_script_project: Full CRUD support for script projects
- list_versions: List all versions of a script
- create_version: Create immutable version snapshots
- get_version: Get details of a specific version
- get_script_metrics: Get execution analytics (active users, executions, failures)
- generate_trigger_code: Generate Apps Script code for time-based and event triggers

Changes:
- Updated auth/scopes.py with script.metrics scope and drive.file for delete
- Updated core/tool_tiers.yaml with new tools in core and extended tiers
- Updated gappsscript/README.md with new features documentation
- Added 8 new unit tests (18 total)

This brings total Apps Script tools from 11 to 17, covering the complete REST API.
This commit is contained in:
sam-ent
2026-01-15 05:54:01 +00:00
parent 58efda24eb
commit 818efdc0b8
5 changed files with 784 additions and 8 deletions

View File

@@ -76,6 +76,7 @@ SCRIPT_DEPLOYMENTS_READONLY_SCOPE = (
SCRIPT_PROCESSES_READONLY_SCOPE = (
"https://www.googleapis.com/auth/script.processes"
)
SCRIPT_METRICS_SCOPE = "https://www.googleapis.com/auth/script.metrics"
# Base OAuth scopes required for user identification
BASE_SCOPES = [USERINFO_EMAIL_SCOPE, USERINFO_PROFILE_SCOPE, OPENID_SCOPE]
@@ -118,7 +119,8 @@ SCRIPT_SCOPES = [
SCRIPT_DEPLOYMENTS_SCOPE,
SCRIPT_DEPLOYMENTS_READONLY_SCOPE,
SCRIPT_PROCESSES_READONLY_SCOPE, # Required for list_script_processes
DRIVE_READONLY_SCOPE, # Required for list_script_projects (uses Drive API)
SCRIPT_METRICS_SCOPE, # Required for get_script_metrics
DRIVE_FILE_SCOPE, # Required for list/delete script projects (uses Drive API)
]
# Tool-to-scopes mapping