Skip to content

feat: add [MANUAL] notation for human-interaction steps (closes #66)#121

Open
Kavirubc wants to merge 4 commits intogoogleworkspace:mainfrom
Kavirubc:main
Open

feat: add [MANUAL] notation for human-interaction steps (closes #66)#121
Kavirubc wants to merge 4 commits intogoogleworkspace:mainfrom
Kavirubc:main

Conversation

@Kavirubc
Copy link

@Kavirubc Kavirubc commented Mar 5, 2026

Summary

Implements Phase 1 of #66 — adding [MANUAL] prefixes to help text and stderr hints so AI agents know when to hand control back to a human.

  • auth login — marked [MANUAL] in --help output (opens browser)
  • auth setup — added [MANUAL] download note for OAuth client JSON
  • CliFlowDelegate::present_user_url — runtime stderr hint now prefixed with [MANUAL]
  • script +open — new helper: opens the Apps Script editor in the browser with [MANUAL] help text and JSON output
  • script +run — new helper: executes a function via the Apps Script Execution API; emits a [MANUAL] GCP project-linking hint on 403

Test plan

  • cargo build — clean compile
  • cargo test — 371 tests pass
  • cargo run -- auth --help | grep MANUAL — login and setup entries present
  • cargo run -- auth login — stderr shows [MANUAL] Open this URL... (confirmed in source)
  • cargo run -- script +open --help | grep MANUAL — about + after-help present
  • cargo run -- script +open --script SCRIPT_ID — JSON output + stderr hint verified
  • cargo run -- script +run --help | grep MANUAL — prerequisites present
  • cargo run -- script +run --script SCRIPT_ID --function main — 403 [MANUAL] hint confirmed in source

Kavirubc added 3 commits March 5, 2026 11:25
Marks `login` in --help output with [MANUAL] since it requires browser
interaction, and adds a [MANUAL] download note for `setup`. Updates the
runtime stderr hint in CliFlowDelegate to prefix with [MANUAL] so AI
agents know to hand control back to the user.
Adds `gws script +open --script <ID>` which constructs the editor URL,
prints a [MANUAL] stderr hint for AI agents, attempts an OS-native
browser open (open/xdg-open/start), and emits JSON on stdout.
Adds `gws script +run --script <ID> --function <NAME>` which calls
scripts.run via the Apps Script Execution API. Supports --params (JSON
array) and --dev-mode. On a 403 error, emits a [MANUAL] stderr hint
directing the user to link the script to a GCP project.
@changeset-bot
Copy link

changeset-bot bot commented Mar 5, 2026

🦋 Changeset detected

Latest commit: 52e94a3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@googleworkspace/cli Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@google-cla
Copy link

google-cla bot commented Mar 5, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@jpoehnelt jpoehnelt added area: docs cla: yes This human has signed the Contributor License Agreement. complexity: medium Moderate change, some review needed labels Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs cla: yes This human has signed the Contributor License Agreement. complexity: medium Moderate change, some review needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants