mcp-gee-sweet 0.9.2.dev377__tar.gz → 0.9.2.dev379__tar.gz

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.
Files changed (272) hide show
  1. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/PKG-INFO +1 -1
  2. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/doc-replace-backup.md +28 -0
  3. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/docs_content.md +107 -3
  4. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/roadmap.md +1 -1
  5. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/tools.md +2 -2
  6. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/content.py +108 -16
  7. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_docs_content.py +252 -1
  8. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/cleanup-worktrees.md +0 -0
  9. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/merge-pr.md +0 -0
  10. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/notify-kai.md +0 -0
  11. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/notify-partner.md +0 -0
  12. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/orchestrator.md +0 -0
  13. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/prep-for-pr.md +0 -0
  14. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/qa-kickoff.md +0 -0
  15. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/release.md +0 -0
  16. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/retro.md +0 -0
  17. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/roadmap-status.md +0 -0
  18. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/security-advisory.md +0 -0
  19. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/start-worktree.md +0 -0
  20. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/team-member.md +0 -0
  21. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/commands/verify-pr.md +0 -0
  22. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/settings.json +0 -0
  23. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/team-roles/amy.md +0 -0
  24. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/team-roles/aziz.md +0 -0
  25. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/team-roles/bob.md +0 -0
  26. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/team-roles/dev.md +0 -0
  27. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/team-roles/joy.md +0 -0
  28. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/team-roles/kai.md +0 -0
  29. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.claude/team-roles/qa.md +0 -0
  30. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.dockerignore +0 -0
  31. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  32. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  33. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  34. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.github/dependabot.yml +0 -0
  35. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.github/workflows/ci.yml +0 -0
  36. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.github/workflows/docs.yml +0 -0
  37. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.github/workflows/publish-dev.yml +0 -0
  38. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.github/workflows/release.yml +0 -0
  39. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.gitignore +0 -0
  40. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.pre-commit-config.yaml +0 -0
  41. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/.python-version +0 -0
  42. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/CHANGELOG.md +0 -0
  43. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/CLAUDE.md +0 -0
  44. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/CODE_OF_CONDUCT.md +0 -0
  45. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/CONTRIBUTING.md +0 -0
  46. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/Dockerfile +0 -0
  47. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/LICENSE +0 -0
  48. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/Makefile +0 -0
  49. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/README.md +0 -0
  50. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/SECURITY.md +0 -0
  51. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docker-compose.yml +0 -0
  52. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/assets/logo.png +0 -0
  53. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/auth.md +0 -0
  54. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/client-setup.md +0 -0
  55. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/configuration.md +0 -0
  56. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-async-tool-execution.md +0 -0
  57. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-auth-status-limitation-categories.md +0 -0
  58. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-cache-invalidation.md +0 -0
  59. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-chart-theming.md +0 -0
  60. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-comments-first-class.md +0 -0
  61. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-composite-tools.md +0 -0
  62. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-condition-type-docstring-generation.md +0 -0
  63. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-converted-doc-change-detection.md +0 -0
  64. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-dev-team.md +0 -0
  65. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-docs-formatting.md +0 -0
  66. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-fork.md +0 -0
  67. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-gmail-domain.md +0 -0
  68. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-grid-data-size-cap.md +0 -0
  69. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-impact-reach-triage.md +0 -0
  70. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-local-fs-test-harness.md +0 -0
  71. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-mcp-v2-resource-context-access.md +0 -0
  72. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-pillow-image-dependency.md +0 -0
  73. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-prompt-qa-role.md +0 -0
  74. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-publishing.md +0 -0
  75. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-release-docs-roles.md +0 -0
  76. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-repositioning.md +0 -0
  77. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-response-size-cap-generalization.md +0 -0
  78. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-response-size-cap-reevaluation-519.md +0 -0
  79. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-review-finding-ticket-bar.md +0 -0
  80. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-supports-all-drives-lint-check.md +0 -0
  81. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-sync-folder-recursion.md +0 -0
  82. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-testing.md +0 -0
  83. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/decision-tool-error-visibility.md +0 -0
  84. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/index.md +0 -0
  85. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/decisions/role-file-history.md +0 -0
  86. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/blockquote-representation.md +0 -0
  87. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/borderless-table-columns.md +0 -0
  88. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/doc-revision-export.md +0 -0
  89. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/doc-to-markdown.md +0 -0
  90. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/docs-ast-pipeline.md +0 -0
  91. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/effectiveformat-spike.md +0 -0
  92. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/heading-anchor-resolution.md +0 -0
  93. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/image-conversion.md +0 -0
  94. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/image-share-lifecycle.md +0 -0
  95. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/index.md +0 -0
  96. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/local-file-access-policy.md +0 -0
  97. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/markdown-support.md +0 -0
  98. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/module-history.md +0 -0
  99. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/oauth-reauthorize-from-tool-call.md +0 -0
  100. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/phase3-theme-system.md +0 -0
  101. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design/sse-consent-off-event-loop.md +0 -0
  102. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/design.md +0 -0
  103. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/index.md +0 -0
  104. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/known-limitations.md +0 -0
  105. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/notes-read.md +0 -0
  106. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/README.md +0 -0
  107. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/qa-fixture-pixel.png +0 -0
  108. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-d195-create-doc.md +0 -0
  109. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-d196-create-doc.html +0 -0
  110. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-d213-dollar-escape.md +0 -0
  111. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-d226-heading-table.md +0 -0
  112. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-doc102-image-conversion.html +0 -0
  113. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-doc103-image-conversion.md +0 -0
  114. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-doc104-nested-lists.html +0 -0
  115. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-doc105-nested-lists-gfm.md +0 -0
  116. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-doc106-nested-lists-4space.md +0 -0
  117. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-doc135-paragraph-boundary.md +0 -0
  118. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-doc136-interrupted-block-boundary.md +0 -0
  119. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-doc137-inline-hr-no-block-ancestor.html +0 -0
  120. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-doc138-nbsp-spacer-paragraph.md +0 -0
  121. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-doc141-mismatched-list-tags.html +0 -0
  122. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-doc142-heading-anchors.md +0 -0
  123. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-doc144-anchor-in-table-cell.md +0 -0
  124. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures/tc-doc145-anchor-on-first-element.md +0 -0
  125. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/fixtures.template.md +0 -0
  126. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/gmail-test-plan.md +0 -0
  127. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/operations.yaml +0 -0
  128. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/playwright_oauth.md +0 -0
  129. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/.gitkeep +0 -0
  130. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/2026-06-02.md +0 -0
  131. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/2026-06-14.md +0 -0
  132. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/2026-06-17.md +0 -0
  133. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/2026-06-18.md +0 -0
  134. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/2026-06-21-drive-discovery.md +0 -0
  135. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/2026-06-21-sheets-delete-clear.md +0 -0
  136. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/2026-06-28.md +0 -0
  137. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/2026-07-04-docs.md +0 -0
  138. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/2026-07-04-drive-smoke.md +0 -0
  139. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/2026-07-04-infra.md +0 -0
  140. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/2026-07-04-sheets_read.md +0 -0
  141. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/2026-07-04.md +0 -0
  142. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/results/2026-09-04.md +0 -0
  143. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/retro-v0.8.0.md +0 -0
  144. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/retro-v0.9.0.md +0 -0
  145. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/run.md +0 -0
  146. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/runs/README.md +0 -0
  147. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/runs/v0.8.0.md +0 -0
  148. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/runs/v0.8.1.md +0 -0
  149. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/runs/v0.9.0.md +0 -0
  150. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/runs/v0.9.1.md +0 -0
  151. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/setup.md +0 -0
  152. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/calendar.md +0 -0
  153. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/docs_layout.md +0 -0
  154. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/docs_style.md +0 -0
  155. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/docs_tables.md +0 -0
  156. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/drive_activity.md +0 -0
  157. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/drive_files.md +0 -0
  158. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/drive_sharing.md +0 -0
  159. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/drive_transfer.md +0 -0
  160. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/gmail.md +0 -0
  161. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/infra.md +0 -0
  162. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/sheets_charts.md +0 -0
  163. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/sheets_mgmt.md +0 -0
  164. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/sheets_read.md +0 -0
  165. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/qa/tests/sheets_write.md +0 -0
  166. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/docs/style-guide.md +0 -0
  167. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/mkdocs.yml +0 -0
  168. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/pyproject.toml +0 -0
  169. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/pyrightconfig.json +0 -0
  170. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/scripts/check_supports_all_drives.py +0 -0
  171. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/scripts/gen_tool_docs.py +0 -0
  172. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/scripts/lane_context_hook.py +0 -0
  173. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/scripts/oauth_setup.py +0 -0
  174. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/scripts/qa_cancel_insert_local_images.py +0 -0
  175. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/scripts/qa_gmail_fixtures.py +0 -0
  176. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/scripts/qa_revision_temp_doc_parent.py +0 -0
  177. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/scripts/setup_team.sh +0 -0
  178. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/scripts/write_team_mcp_configs.sh +0 -0
  179. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/server.json +0 -0
  180. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/.env.template +0 -0
  181. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/__init__.py +0 -0
  182. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/auth.py +0 -0
  183. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/cache.py +0 -0
  184. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/http_transport.py +0 -0
  185. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/local_files.py +0 -0
  186. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/reauth.py +0 -0
  187. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/server.py +0 -0
  188. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/sse_shutdown.py +0 -0
  189. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/__init__.py +0 -0
  190. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/atomic_write.py +0 -0
  191. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/cache.py +0 -0
  192. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/calendar.py +0 -0
  193. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/concurrency.py +0 -0
  194. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/__init__.py +0 -0
  195. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/anchors.py +0 -0
  196. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/ast.py +0 -0
  197. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/ast_to_markdown.py +0 -0
  198. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/comments.py +0 -0
  199. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/doc_to_ast.py +0 -0
  200. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/editing.py +0 -0
  201. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/emitter.py +0 -0
  202. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/html_parser.py +0 -0
  203. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/images.py +0 -0
  204. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/indices.py +0 -0
  205. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/layout.py +0 -0
  206. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/markdown_export.py +0 -0
  207. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/named_ranges.py +0 -0
  208. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/style.py +0 -0
  209. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/docs/tables.py +0 -0
  210. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/drive/__init__.py +0 -0
  211. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/drive/activity.py +0 -0
  212. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/drive/files.py +0 -0
  213. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/drive/sharing.py +0 -0
  214. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/drive/transfer.py +0 -0
  215. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/gmail.py +0 -0
  216. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/http_errors.py +0 -0
  217. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/mime_types.py +0 -0
  218. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/pagination.py +0 -0
  219. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/response_limits.py +0 -0
  220. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/sheets/__init__.py +0 -0
  221. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/sheets/data.py +0 -0
  222. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/sheets/helpers.py +0 -0
  223. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/src/mcp_gee_sweet/tools/sheets/structure.py +0 -0
  224. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/__init__.py +0 -0
  225. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/conftest.py +0 -0
  226. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/drive/__init__.py +0 -0
  227. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/drive/test_activity.py +0 -0
  228. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/drive/test_files.py +0 -0
  229. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/drive/test_sharing.py +0 -0
  230. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/drive/test_transfer.py +0 -0
  231. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/fakes.py +0 -0
  232. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/integration/__init__.py +0 -0
  233. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/integration/conftest.py +0 -0
  234. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/integration/test_local_fs_harness.py +0 -0
  235. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/sheets/__init__.py +0 -0
  236. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/sheets/test_data.py +0 -0
  237. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/sheets/test_helpers.py +0 -0
  238. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/sheets/test_structure.py +0 -0
  239. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_atomic_write.py +0 -0
  240. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_auth.py +0 -0
  241. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_cache.py +0 -0
  242. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_calendar.py +0 -0
  243. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_check_supports_all_drives.py +0 -0
  244. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_concurrency.py +0 -0
  245. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_docs_anchors.py +0 -0
  246. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_docs_comments.py +0 -0
  247. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_docs_core.py +0 -0
  248. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_docs_editing.py +0 -0
  249. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_docs_images.py +0 -0
  250. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_docs_indices.py +0 -0
  251. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_docs_layout.py +0 -0
  252. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_docs_markdown_export.py +0 -0
  253. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_docs_named_ranges.py +0 -0
  254. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_docs_revision_export.py +0 -0
  255. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_docs_style.py +0 -0
  256. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_docs_tables.py +0 -0
  257. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_gen_tool_docs.py +0 -0
  258. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_gmail.py +0 -0
  259. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_http_errors.py +0 -0
  260. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_http_transport.py +0 -0
  261. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_lane_context_hook.py +0 -0
  262. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_local_file_sites.py +0 -0
  263. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_local_files.py +0 -0
  264. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_mime_types.py +0 -0
  265. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_qa_gmail_fixtures.py +0 -0
  266. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_reauth.py +0 -0
  267. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_response_limits.py +0 -0
  268. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_server.py +0 -0
  269. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_server_json.py +0 -0
  270. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_sse_shutdown.py +0 -0
  271. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/tests/test_team_mcp_configs.py +0 -0
  272. {mcp_gee_sweet-0.9.2.dev377 → mcp_gee_sweet-0.9.2.dev379}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: mcp-gee-sweet
3
- Version: 0.9.2.dev377
3
+ Version: 0.9.2.dev379
4
4
  Summary: MCP server for Google Workspace — Sheets, Drive, Docs (HTML or Markdown), Calendar, and Gmail.
5
5
  Project-URL: Homepage, https://github.com/khuisman/mcp-gee-sweet
6
6
  Project-URL: Bug Tracker, https://github.com/khuisman/mcp-gee-sweet/issues
@@ -85,6 +85,34 @@ images, and tables survive, which a re-inserted snapshot wouldn't.
85
85
  after the clear, the error says the content couldn't be backed up and why. In that case the
86
86
  original content can't be recovered, since the pre-clear revision is merged away at once
87
87
  (table above).
88
+
89
+ Two more 403 reasons replace without a backup only when the caller passes
90
+ `allow_no_backup=True` (`_opt_in_no_backup_reason`; maintainer decision, 2026-10-15, #1035):
91
+ - `cannotCopyFile`. `downloadRestrictions.itemDownloadRestriction.restrictedForWriters` is
92
+ set, and the caller is a writer. The reason text names the doc's sharing settings, not an
93
+ owner: a Shared Drive doc has no `owners`, and there a manager sets the restriction (PR
94
+ #1042 QA round 1). Measured live on 2026-10-14, with or without `parents`. On
95
+ 2026-10-16 the same writer also got 403 `cannotExportFile` from `files.export`, and its
96
+ `revisions.list` entries had no `exportLinks`. Whoever set it chose to stop writers from
97
+ copying the file, so the backup is never made another way (an export or a download).
98
+ - `activeItemCreationLimitExceeded`, the account's item-creation cap (a documented reason; it
99
+ can't be produced in QA).
100
+
101
+ A reader gets `cannotCopyFile` too, when `copyRequiresWriterPermission` is set, and the flag
102
+ can't help it: the clear would fail. So for either reason the doc's `capabilities.canEdit`
103
+ is read after the copy fails (`_can_edit`). If it's false, the call refuses with an error
104
+ saying the account can't edit the doc, whatever the flag says (PR #1042 QA round 1). If it
105
+ can't be read, the call goes on by the flag; a non-editor's clear then gets a 4xx, which
106
+ still leaves the doc unchanged. The read only runs on these two reasons, so it costs
107
+ nothing on the normal path.
108
+
109
+ Without the flag the call refuses, leaving the doc unchanged. The error names the reason
110
+ and the flag, and says `export_revision` can't recover the previous content afterward. That
111
+ was measured in the same 2026-10-16 run: after the writer's clear, the revisions were `1, 4`,
112
+ and the owner's export of both was empty. The flag has no effect on #1018's reasons above,
113
+ which replace without a backup either way, or on any other copy failure, which still refuses.
114
+ With the flag, the success `warning` and the after-clear failure text are the same as for
115
+ #1018's reasons.
88
116
  - **Cancellation:** the copy is created inside a shielded scope, so its ID is always recorded (the
89
117
  PR #877 rule). The scope is bounded by `_BACKUP_COPY_TIMEOUT` (60 s, all attempts together), per
90
118
  `CLAUDE.md`'s rule that a cancel waits for shielded work; a timeout is reported like a 5xx.
@@ -4384,7 +4384,7 @@ lc = SimpleNamespace(docs_service=build('docs', 'v1', credentials=creds),
4384
4384
  drive_folder_cache=MagicMock(), folder_id=None)
4385
4385
  with patch.object(c, 'fill_tables', side_effect=RuntimeError('injected failure')):
4386
4386
  print(asyncio.run(c._replace_doc_content(lc, '{DOC_ID}', '<p>TC-DOC219 failed write</p>', 'html',
4387
- autolink_urls=True, revoke_sharing=True, auto_downscale=False)))
4387
+ autolink_urls=True, revoke_sharing=True, auto_downscale=False, allow_no_backup=False)))
4388
4388
  "
4389
4389
  ```
4390
4390
  5. `get_doc_content(file_id={BACKUP_ID})`, where `{BACKUP_ID}` is step 4's `backupId`. Part B's mock `doc_cache` leaves the server's cache stale, so call `refresh_cache(doc_id={DOC_ID})` before reading `{DOC_ID}` again.
@@ -4414,7 +4414,7 @@ async def after_commit(fn, service):
4414
4414
  return result
4415
4415
  with patch.object(c, 'execute_in_thread', after_commit):
4416
4416
  print(asyncio.run(c._replace_doc_content(lc, '{DOC_ID}', '<p>TC-DOC219 part C</p>', 'html',
4417
- autolink_urls=True, revoke_sharing=True, auto_downscale=False)))
4417
+ autolink_urls=True, revoke_sharing=True, auto_downscale=False, allow_no_backup=False)))
4418
4418
  "
4419
4419
  ```
4420
4420
 
@@ -4459,7 +4459,7 @@ def text(d):
4459
4459
  b = odocs.documents().get(documentId=d).execute()['body']['content']
4460
4460
  return ''.join(r.get('textRun', {}).get('content', '') for e in b for r in e.get('paragraph', {}).get('elements', [])).strip()
4461
4461
  def run(d, html):
4462
- return asyncio.run(c._replace_doc_content(lc, d, html, 'html', autolink_urls=True, revoke_sharing=True, auto_downscale=False))
4462
+ return asyncio.run(c._replace_doc_content(lc, d, html, 'html', autolink_urls=True, revoke_sharing=True, auto_downscale=False, allow_no_backup=False))
4463
4463
  folder = od.files().create(body={'name': 'TC-DOC224 folder', 'mimeType': 'application/vnd.google-apps.folder'}, fields='id').execute()['id']
4464
4464
  try:
4465
4465
  doc = od.files().create(body={'name': 'TC-DOC224 doc', 'mimeType': 'application/vnd.google-apps.document', 'parents': [folder]}, fields='id').execute()['id']
@@ -4561,3 +4561,107 @@ finally:
4561
4561
  **Cleanup:** unlock `{DOC_ID}` with the same script, using `body={'contentRestrictions': [{'readOnly': False}]}`. Trash both steps' `resized_file_id`, `{OVERSIZED_FILE_ID}`, `{ORIG_FOLDER_ID}`, `{PIXEL_FILE_ID}`, and `{DOC_ID}`. `rm /tmp/qa-oversized-909.png`
4562
4562
 
4563
4563
  **Result (2026-10-14) ✅ PASS — Kit, PR #1029 round 1 (`089f6ee`).** Ran in a scratch folder on the QA Shared Drive; the oversized PNG went under this job's scratch dir instead of `/tmp`, and `{DEFAULT_FOLDER_ID}` is the Shared Drive root (`DRIVE_FOLDER_ID`). Step 1's listing showed only `qa-oversized-909.png`; step 2's second listing added `qa-oversized-909.png (resized)` with ID `resized_file_id`. Step 3's listing was empty; step 4's second listing showed `{PIXEL_FILE_ID}` (`qa-fixture-pixel.png`). No `refresh_cache` anywhere. Step 5 returned the 403 "The caller does not have permission" error plus a new `resized_file_id`, different from step 2's. Cleanup done.
4564
+
4565
+ ### TC-DOC225: A writer whose sharing settings block copying is refused by default, and replaces without a backup with `allow_no_backup=True` (#1035) ⚠️ destructive ⚠️ requires-oauth
4566
+ When `downloadRestrictions.itemDownloadRestriction.restrictedForWriters` is set on a doc, a writer's backup copy gets 403 `cannotCopyFile` (measured live, 2026-10-14). Unlike #1018's reasons (TC-DOC224), this one refuses by default and replaces without a backup only when the caller passes `allow_no_backup=True` (`docs/design/doc-replace-backup.md`, "The copy fails"). The same writer also gets 403 `cannotExportFile` on an export, so no other kind of backup is possible either. Same two-identity setup as TC-DOC224: the OAuth account owns the fixture, and the service account is the caller. The script runs from the checkout under test with no MCP server involved, so it needs both `token.json` and service-account credentials in `src/mcp_gee_sweet/.env`. Here the service account is a writer on both the folder and the doc, so the folder permission isn't what stops the copy.
4567
+
4568
+ **Setup:** none. The script creates and deletes its own fixture.
4569
+
4570
+ **Steps**
4571
+ 1. Run from the checkout under test:
4572
+ ```
4573
+ uv run python -I -c "
4574
+ import asyncio, json, time, mcp_gee_sweet
4575
+ from types import SimpleNamespace
4576
+ from unittest.mock import MagicMock
4577
+ from googleapiclient.discovery import build
4578
+ from mcp_gee_sweet import auth
4579
+ from mcp_gee_sweet.tools.docs import content as c
4580
+ oauth, sa = auth._oauth_creds(), auth._service_account_creds()
4581
+ od, odocs = build('drive', 'v3', credentials=oauth), build('docs', 'v1', credentials=oauth)
4582
+ lc = SimpleNamespace(docs_service=build('docs', 'v1', credentials=sa),
4583
+ drive_service=build('drive', 'v3', credentials=sa), doc_cache=MagicMock(),
4584
+ drive_folder_cache=MagicMock(), folder_id=None)
4585
+ def text(d):
4586
+ b = odocs.documents().get(documentId=d).execute()['body']['content']
4587
+ return ''.join(r.get('textRun', {}).get('content', '') for e in b for r in e.get('paragraph', {}).get('elements', [])).strip()
4588
+ def run(d, html, allow):
4589
+ return asyncio.run(c._replace_doc_content(lc, d, html, 'html', autolink_urls=True, revoke_sharing=True, auto_downscale=False, allow_no_backup=allow))
4590
+ folder = od.files().create(body={'name': 'TC-DOC225 folder', 'mimeType': 'application/vnd.google-apps.folder'}, fields='id').execute()['id']
4591
+ try:
4592
+ doc = od.files().create(body={'name': 'TC-DOC225 doc', 'mimeType': 'application/vnd.google-apps.document', 'parents': [folder]}, fields='id').execute()['id']
4593
+ odocs.documents().batchUpdate(documentId=doc, body={'requests': [{'insertText': {'location': {'index': 1}, 'text': 'TC-DOC225 before\n'}}]}).execute()
4594
+ for fid in (folder, doc):
4595
+ od.permissions().create(fileId=fid, body={'type': 'user', 'role': 'writer', 'emailAddress': sa.service_account_email}, sendNotificationEmail=False).execute()
4596
+ od.files().update(fileId=doc, body={'downloadRestrictions': {'itemDownloadRestriction': {'restrictedForWriters': True}}}).execute()
4597
+ time.sleep(5)
4598
+ print('A', json.dumps({k: v for k, v in run(doc, '<p>TC-DOC225 refused</p>', False).items() if k != 'docId'}), repr(text(doc)))
4599
+ print('B', json.dumps({k: v for k, v in run(doc, '<p>TC-DOC225 after</p>', True).items() if k != 'docId'}), repr(text(doc)))
4600
+ print('C', [f['name'] for f in od.files().list(q=f\"'{folder}' in parents and trashed=false\", fields='files(name)').execute()['files']])
4601
+ finally:
4602
+ od.files().delete(fileId=folder).execute()
4603
+ print('cleanup done')
4604
+ "
4605
+ ```
4606
+
4607
+ **Checks**
4608
+ - Line `A`'s `error` is "Couldn't back up the document before replacing its content (the document's sharing settings don't allow this account to copy it), so it was left unchanged. To replace it without a backup, retry with allow_no_backup=True. Its previous content then can't be recovered with export_revision: Docs merges the revision from before the replace into the replace's own.", with no `backupId`. Its doc text is still `'TC-DOC225 before'`
4609
+ - Line `B` has `web_link` and `warning` "The document's previous content was replaced without a backup copy (the document's sharing settings don't allow this account to copy it).", with no `error` or `backupId`. Its doc text is `'TC-DOC225 after'`
4610
+ - Line `C` lists only `TC-DOC225 doc`: no `(backup before replace)` copy was made
4611
+ - The log shows googleapiclient's `403 … "cannotCopyFile"` before each of `A` and `B`, and `Replacing doc … without a backup: the document's sharing settings don't allow this account to copy it` before `B` only
4612
+ - `cleanup done` is printed
4613
+
4614
+ **Cleanup:** the script deletes the folder, and the doc with it. If it stopped before `cleanup done`, `search_files(query="TC-DOC225")` on the OAuth server and delete what it finds.
4615
+
4616
+ **Result (2026-10-16) ✅ PASS — Sky, PR #1042 round 1 (`4ba422c`).** Ran the script as written from this worktree. Line `A` returned the expected refusal with no `backupId`, and the doc text stayed `'TC-DOC225 before'`. Line `B` returned `web_link` and the expected `warning` with no `error` or `backupId`, and the doc text became `'TC-DOC225 after'`. Line `C` listed only `TC-DOC225 doc`. The log showed `403 … "cannotCopyFile"` before `A` and before `B`, and `Replacing doc … without a backup: the document's owner doesn't allow this account to copy it` before `B` only. `cleanup done` was printed. The case passes, but two extra probes in the same round found the refusal text wrong for callers this case doesn't cover. (1) A *reader* on a doc with `copyRequiresWriterPermission` also gets 403 `cannotCopyFile` (`capabilities.canCopy`/`canEdit` both false). It is told to retry with `allow_no_backup=True`, and that retry logs "Replacing … without a backup" and then fails at the clear with 403. (2) A writer on a Shared Drive doc with `restrictedForWriters` (the file has no `owners`) gets the same "the document's owner" wording. Both were sent back on the PR.
4617
+
4618
+ **Result (2026-10-16) ✅ PASS — Sky, PR #1042 round 2 (`9323a1b`).** Ran the script as written from this worktree. Lines `A`, `B`, and `C` matched every check with the new "the document's sharing settings don't allow this account to copy it" wording, and so did the log lines. `cleanup done` was printed. The round-1 Shared Drive probe, re-run in the QA Shared Drive (service account as Content manager, `restrictedForWriters` set, `canEdit: true`), now gets the same sharing-settings refusal without naming an owner.
4619
+
4620
+ ### TC-DOC226: A reader blocked from copying is told it can't edit the doc, with or without `allow_no_backup` (#1035) ⚠️ destructive ⚠️ requires-oauth
4621
+ With `copyRequiresWriterPermission` set, a caller with only reader access also gets 403 `cannotCopyFile` on the backup copy. `allow_no_backup=True` can't help it, since the clear would fail, so after that copy failure the doc's `capabilities.canEdit` is read. When it's false, the call refuses with an error saying the account can't edit the doc, whatever the flag says (`docs/design/doc-replace-backup.md`, "The copy fails"; PR #1042 QA round 1). Before the fix, the default call said to retry with `allow_no_backup=True`, and that retry logged `Replacing doc … without a backup` and then failed at the clear with a 403. Same two-identity setup as TC-DOC225: the OAuth account owns the fixture, and the service account is the caller, here with reader access on the doc only.
4622
+
4623
+ **Setup:** none. The script creates and deletes its own fixture.
4624
+
4625
+ **Steps**
4626
+ 1. Run from the checkout under test:
4627
+ ```
4628
+ uv run python -I -c "
4629
+ import asyncio, json, time, mcp_gee_sweet
4630
+ from types import SimpleNamespace
4631
+ from unittest.mock import MagicMock
4632
+ from googleapiclient.discovery import build
4633
+ from mcp_gee_sweet import auth
4634
+ from mcp_gee_sweet.tools.docs import content as c
4635
+ oauth, sa = auth._oauth_creds(), auth._service_account_creds()
4636
+ od, odocs = build('drive', 'v3', credentials=oauth), build('docs', 'v1', credentials=oauth)
4637
+ lc = SimpleNamespace(docs_service=build('docs', 'v1', credentials=sa),
4638
+ drive_service=build('drive', 'v3', credentials=sa), doc_cache=MagicMock(),
4639
+ drive_folder_cache=MagicMock(), folder_id=None)
4640
+ def text(d):
4641
+ b = odocs.documents().get(documentId=d).execute()['body']['content']
4642
+ return ''.join(r.get('textRun', {}).get('content', '') for e in b for r in e.get('paragraph', {}).get('elements', [])).strip()
4643
+ def run(d, html, allow):
4644
+ return asyncio.run(c._replace_doc_content(lc, d, html, 'html', autolink_urls=True, revoke_sharing=True, auto_downscale=False, allow_no_backup=allow))
4645
+ folder = od.files().create(body={'name': 'TC-DOC226 folder', 'mimeType': 'application/vnd.google-apps.folder'}, fields='id').execute()['id']
4646
+ try:
4647
+ doc = od.files().create(body={'name': 'TC-DOC226 doc', 'mimeType': 'application/vnd.google-apps.document', 'parents': [folder]}, fields='id').execute()['id']
4648
+ odocs.documents().batchUpdate(documentId=doc, body={'requests': [{'insertText': {'location': {'index': 1}, 'text': 'TC-DOC226 before\n'}}]}).execute()
4649
+ od.permissions().create(fileId=doc, body={'type': 'user', 'role': 'reader', 'emailAddress': sa.service_account_email}, sendNotificationEmail=False).execute()
4650
+ od.files().update(fileId=doc, body={'copyRequiresWriterPermission': True}).execute()
4651
+ time.sleep(5)
4652
+ print('A', json.dumps({k: v for k, v in run(doc, '<p>TC-DOC226 default</p>', False).items() if k != 'docId'}), repr(text(doc)))
4653
+ print('B', json.dumps({k: v for k, v in run(doc, '<p>TC-DOC226 flag</p>', True).items() if k != 'docId'}), repr(text(doc)))
4654
+ finally:
4655
+ od.files().delete(fileId=folder).execute()
4656
+ print('cleanup done')
4657
+ "
4658
+ ```
4659
+
4660
+ **Checks**
4661
+ - Lines `A` and `B` each have exactly one key, `error`: "This account can't edit the document, so it was left unchanged (Drive also refused the backup copy: the document's sharing settings don't allow this account to copy it)." Neither mentions `allow_no_backup`. Each line's doc text is still `'TC-DOC226 before'`
4662
+ - The log shows googleapiclient's `403 … "cannotCopyFile"` before each of `A` and `B`, and no `Replacing doc … without a backup` line anywhere
4663
+ - `cleanup done` is printed
4664
+
4665
+ **Cleanup:** the script deletes the folder, and the doc with it. If it stopped before `cleanup done`, `search_files(query="TC-DOC226")` on the OAuth server and delete what it finds.
4666
+
4667
+ **Result (2026-10-16) ✅ PASS — Sky, PR #1042 round 2 (`9323a1b`).** Ran the script as written from this worktree. Lines `A` and `B` each had only `error`, with the expected "This account can't edit the document …" text and no mention of `allow_no_backup`. The doc text stayed `'TC-DOC226 before'` after both. The log showed `403 … "cannotCopyFile"` before each line and no `Replacing doc … without a backup` line. `cleanup done` was printed.
@@ -315,7 +315,7 @@ Same shape as v0.8.1 — stabilize on defects that surfaced since v0.9.0 shipped
315
315
  - [x] Local-file read policy across local-path tools — in a remote/SSE deployment these read the server's own filesystem (token, SA key), and Gmail attachments can now mail them out. Decided 2026-10-04: `LOCAL_FILE_ACCESS=full|roots|off` (default `off` under SSE/HTTP), one shared check for every local read and write; also covers `_read_doc_source_file`'s synchronous read. Lane A after #1018, `solo-only`: lane B holds after #909 until it ships ([#796](https://github.com/khuisman/mcp-gee-sweet/issues/796)) (PR #1039)
316
316
  - [ ] Release-pass Gmail QA (`docs/qa/tests/gmail.md`, added by #786). Many cases are destructive (send/draft/trash), so they need a dedicated mailbox fixture plan — Aziz ([#803](https://github.com/khuisman/mcp-gee-sweet/issues/803))
317
317
  - [ ] Rewrite TC-GM01–22 prescriptively, add TC-GM26–44 and the Smoke rows, per `docs/qa/gmail-test-plan.md` §4. Part of #803, Aziz ([#822](https://github.com/khuisman/mcp-gee-sweet/issues/822))
318
- - [ ] README and `docs/index.md`: add Gmail coverage (recounted per-domain tool counts) and remove the comparisons with other MCP servers. Docs-only, no file overlap with PR #1039, so it runs alongside #796 despite the `solo-only` hold (user decision 2026-10-16) — lane B ([#1033](https://github.com/khuisman/mcp-gee-sweet/issues/1033))
318
+ - [x] README and `docs/index.md`: add Gmail coverage (recounted per-domain tool counts) and remove the comparisons with other MCP servers. Docs-only, no file overlap with PR #1039, so it runs alongside #796 despite the `solo-only` hold (user decision 2026-10-16) — lane B ([#1033](https://github.com/khuisman/mcp-gee-sweet/issues/1033)) (PR #1041)
319
319
 
320
320
  Tool surface (from the original v1.1+ plan):
321
321
 
@@ -132,8 +132,8 @@ Requires the `drive.activity.readonly` scope; uses the Drive Activity API v2.
132
132
  | `create_doc` | Create a new Google Doc, optionally with initial content. | `title`, `content?`, `folder_id?`, `content_format?`, `autolink_urls?`, `revoke_sharing?`, `auto_downscale?` |
133
133
  | `create_doc_from_file` | Create a Google Doc from a local .md or .html file. Not available when the server runs with LOCAL_FILE_ACCESS=off. | `local_path`, `title?`, `folder_id?`, `autolink_urls?`, `revoke_sharing?`, `auto_downscale?` |
134
134
  | `get_doc_content` | Get the plain text content of a Google Doc. | `file_id`, `local_path?` |
135
- | `write_doc_content` | Replace the full content of an existing Google Doc. | `doc_id`, `content`, `content_format?`, `autolink_urls?`, `revoke_sharing?`, `auto_downscale?` |
136
- | `update_doc_from_file` | Replace an existing Google Doc's content in place from a local .md or .html file. Not available when the server runs with LOCAL_FILE_ACCESS=off. | `doc_id`, `local_path`, `content_format?`, `autolink_urls?`, `revoke_sharing?`, `auto_downscale?` |
135
+ | `write_doc_content` | Replace the full content of an existing Google Doc. | `doc_id`, `content`, `content_format?`, `autolink_urls?`, `revoke_sharing?`, `auto_downscale?`, `allow_no_backup?` |
136
+ | `update_doc_from_file` | Replace an existing Google Doc's content in place from a local .md or .html file. Not available when the server runs with LOCAL_FILE_ACCESS=off. | `doc_id`, `local_path`, `content_format?`, `autolink_urls?`, `revoke_sharing?`, `auto_downscale?`, `allow_no_backup?` |
137
137
  | `get_doc_structure` | Return the full structural map of a Google Doc body with element indices. | `doc_id` |
138
138
  | `find_in_doc` | Search a Google Doc's text and return match locations as document character offsets. | `doc_id`, `query`, `regex?`, `case_sensitive?`, `max_results?`, `local_path?` |
139
139
  | `insert_doc_text` | Insert text at one or more positions in a Google Doc. | `doc_id`, `insertions` |
@@ -360,6 +360,40 @@ def _no_backup_reason(e: BaseException) -> str | None:
360
360
  return None
361
361
 
362
362
 
363
+ def _opt_in_no_backup_reason(e: BaseException) -> str | None:
364
+ """Why a failed backup copy lets the replace go ahead without one only when the
365
+ caller passed allow_no_backup=True, or None (#1035). cannotCopyFile is what a
366
+ writer gets when downloadRestrictions' restrictedForWriters is set (measured
367
+ live, 2026-10-14); the same writer also gets cannotExportFile, so the backup is
368
+ never made another way. It isn't worded as the owner's choice, since a Shared
369
+ Drive doc has no owner (PR #1042 QA round 1). activeItemCreationLimitExceeded is
370
+ the account's item-creation cap (a documented reason; it can't be produced in
371
+ QA)."""
372
+ if http_error_has_reason(e, 403, "cannotCopyFile"):
373
+ return "the document's sharing settings don't allow this account to copy it"
374
+ if http_error_has_reason(e, 403, "activeItemCreationLimitExceeded"):
375
+ return "this account is at its limit for creating Drive items"
376
+ return None
377
+
378
+
379
+ async def _can_edit(drive_service, doc_id: str) -> bool | None:
380
+ """The doc's capabilities.canEdit for this account, or None if it can't be
381
+ read. On None the caller goes on as if it could edit: a clear it can't make
382
+ gets a 4xx, which still leaves the doc unchanged."""
383
+ try:
384
+ file = await execute_in_thread(
385
+ drive_service.files()
386
+ .get(fileId=doc_id, fields="capabilities(canEdit)", supportsAllDrives=True)
387
+ .execute,
388
+ drive_service,
389
+ )
390
+ except Exception as e:
391
+ logger.debug("Couldn't read doc %s's capabilities: %s", doc_id, e)
392
+ return None
393
+ can_edit = file.get("capabilities", {}).get("canEdit")
394
+ return can_edit if isinstance(can_edit, bool) else None
395
+
396
+
363
397
  def _describe(e: BaseException) -> str:
364
398
  """str(e), or the exception's type name when that's empty (a TimeoutError)."""
365
399
  return str(e) or type(e).__name__
@@ -423,6 +457,7 @@ async def _replace_doc_content(
423
457
  autolink_urls: bool,
424
458
  revoke_sharing: bool,
425
459
  auto_downscale: bool,
460
+ allow_no_backup: bool,
426
461
  ) -> dict[str, Any]:
427
462
  """Shared body for write_doc_content / update_doc_from_file (#341): clears an
428
463
  existing doc's content, then replaces it via _apply_doc_content. Extracted so
@@ -430,7 +465,7 @@ async def _replace_doc_content(
430
465
  style-inheritance quirk below) has exactly one implementation instead of two
431
466
  copies that could drift out of sync.
432
467
 
433
- The three flags are keyword-only (#567), here and in _apply_doc_content: as
468
+ The flags are keyword-only (#567), here and in _apply_doc_content: as
434
469
  positional bools, swapping two at a call site would type-check and silently do
435
470
  the wrong thing.
436
471
 
@@ -443,7 +478,11 @@ async def _replace_doc_content(
443
478
  doc untouched and returns an error, except for the reasons _no_backup_reason
444
479
  accepts (storage quota, no right to add to the doc's folder, a full Shared
445
480
  Drive; #1018): a caller who can edit the doc could write it before #878, so it
446
- replaces without a backup, and both a success and a failure say so.
481
+ replaces without a backup, and both a success and a failure say so. The reasons
482
+ _opt_in_no_backup_reason accepts (sharing settings block copying, the
483
+ account's item-creation cap) do the same only with allow_no_backup=True, and
484
+ otherwise refuse with an error that names the flag (#1035). An account that
485
+ can't edit the doc is refused for that instead, whatever the flag says.
447
486
 
448
487
  The doc is unchanged, and the copy removed, only when a step before the clear
449
488
  fails or the clear gets a 4xx. A clear that fails any other way (a 5xx, a
@@ -457,6 +496,7 @@ async def _replace_doc_content(
457
496
 
458
497
  backup: dict[str, Any] = {}
459
498
  no_backup_reason: str | None = None
499
+ opt_in_reason: str | None = None
460
500
  if end_index > 2:
461
501
  backup_name = f"{doc.get('title') or doc_id} (backup before replace)"
462
502
  # Shielded, so a cancellation can't land after Drive made the copy but
@@ -467,7 +507,8 @@ async def _replace_doc_content(
467
507
  backup = await _copy_for_backup(drive_service, doc_id, backup_name)
468
508
  except Exception as e:
469
509
  no_backup_reason = _no_backup_reason(e)
470
- if no_backup_reason is None:
510
+ opt_in_reason = _opt_in_no_backup_reason(e)
511
+ if no_backup_reason is None and opt_in_reason is None:
471
512
  error = (
472
513
  f"Couldn't back up the document before replacing its content, "
473
514
  f"so it was left unchanged: {_describe(e)}"
@@ -479,7 +520,38 @@ async def _replace_doc_content(
479
520
  f"next to the document; check for it and delete it"
480
521
  )
481
522
  return {"error": error, "docId": doc_id}
482
- logger.warning("Replacing doc %s without a backup: %s", doc_id, no_backup_reason)
523
+ if no_backup_reason is not None:
524
+ logger.warning(
525
+ "Replacing doc %s without a backup: %s", doc_id, no_backup_reason
526
+ )
527
+
528
+ if opt_in_reason is not None:
529
+ # Outside the shield: nothing was created, so a cancel here loses
530
+ # nothing. A reader gets cannotCopyFile too (copyRequiresWriterPermission),
531
+ # and the flag can't help it, so it's told the real problem (PR #1042 QA
532
+ # round 1).
533
+ if await _can_edit(drive_service, doc_id) is False:
534
+ return {
535
+ "error": (
536
+ f"This account can't edit the document, so it was left unchanged "
537
+ f"(Drive also refused the backup copy: {opt_in_reason})."
538
+ ),
539
+ "docId": doc_id,
540
+ }
541
+ if not allow_no_backup:
542
+ return {
543
+ "error": (
544
+ f"Couldn't back up the document before replacing its content "
545
+ f"({opt_in_reason}), so it was left unchanged. To replace it "
546
+ f"without a backup, retry with allow_no_backup=True. Its previous "
547
+ f"content then can't be recovered with export_revision: Docs "
548
+ f"merges the revision from before the replace into the "
549
+ f"replace's own."
550
+ ),
551
+ "docId": doc_id,
552
+ }
553
+ no_backup_reason = opt_in_reason
554
+ logger.warning("Replacing doc %s without a backup: %s", doc_id, no_backup_reason)
483
555
 
484
556
  # Re-read after the copy, which takes seconds: a concurrent edit meanwhile
485
557
  # would otherwise survive the clear (the doc grew) or make it fail (it
@@ -1483,6 +1555,7 @@ def register(tool):
1483
1555
  autolink_urls: bool = True,
1484
1556
  revoke_sharing: bool = True,
1485
1557
  auto_downscale: bool = False,
1558
+ allow_no_backup: bool = False,
1486
1559
  ctx: Context = None,
1487
1560
  ) -> dict[str, Any]:
1488
1561
  """
@@ -1514,6 +1587,11 @@ def register(tool):
1514
1587
  link and is reported with already_shared: true.
1515
1588
  auto_downscale: Resize an oversized local-path/drive: image instead of
1516
1589
  failing it (default False) — see create_doc's own docstring.
1590
+ allow_no_backup: Replace the content even when Drive refuses the backup
1591
+ copy (below) because the doc's sharing settings don't allow this
1592
+ account to copy it, or the account is at its item-creation limit
1593
+ (default False: the call refuses and leaves the doc unchanged). It
1594
+ has no effect when the account can't edit the doc.
1517
1595
 
1518
1596
  Returns:
1519
1597
  Confirmation with the document ID and web link. Includes "images" (per-image
@@ -1525,12 +1603,15 @@ def register(tool):
1525
1603
  fails, nothing is changed and an error is returned, except when Drive
1526
1604
  refuses it for storage quota, because the account can't add a file to the
1527
1605
  doc's folder, or because the folder or Shared Drive is at its item limit:
1528
- the replace then goes ahead without a backup. If writing the new content
1529
- fails, returns {"error", "docId", "backupId", "images"} instead, with any
1530
- temporary image share already revoked: the doc may be empty or partly
1531
- written, and backupId is the kept copy of its previous content. When the
1532
- replace went ahead without a backup there's no backupId, and the error
1533
- says the previous content couldn't be backed up: it can't be recovered.
1606
+ the replace then goes ahead without a backup. When sharing settings
1607
+ don't allow copying or the account is at its item-creation limit, it
1608
+ goes ahead without a backup only with allow_no_backup=True. If writing the
1609
+ new content fails, returns {"error", "docId", "backupId", "images"}
1610
+ instead, with any temporary image share already revoked: the doc may be
1611
+ empty or partly written, and backupId is the kept copy of its previous
1612
+ content. When the replace went ahead without a backup there's no
1613
+ backupId, and the error says the previous content couldn't be backed
1614
+ up: it can't be recovered.
1534
1615
  """
1535
1616
  lc = ctx.request_context.lifespan_context
1536
1617
  return await _replace_doc_content(
@@ -1541,6 +1622,7 @@ def register(tool):
1541
1622
  autolink_urls=autolink_urls,
1542
1623
  revoke_sharing=revoke_sharing,
1543
1624
  auto_downscale=auto_downscale,
1625
+ allow_no_backup=allow_no_backup,
1544
1626
  )
1545
1627
 
1546
1628
  @tool(
@@ -1554,6 +1636,7 @@ def register(tool):
1554
1636
  autolink_urls: bool = True,
1555
1637
  revoke_sharing: bool = True,
1556
1638
  auto_downscale: bool = False,
1639
+ allow_no_backup: bool = False,
1557
1640
  ctx: Context = None,
1558
1641
  ) -> dict[str, Any]:
1559
1642
  """
@@ -1589,6 +1672,11 @@ def register(tool):
1589
1672
  link and is reported with already_shared: true.
1590
1673
  auto_downscale: Resize an oversized local-path/drive: image instead of
1591
1674
  failing it (default False) — see create_doc's own docstring.
1675
+ allow_no_backup: Replace the content even when Drive refuses the backup
1676
+ copy (below) because the doc's sharing settings don't allow this
1677
+ account to copy it, or the account is at its item-creation limit
1678
+ (default False: the call refuses and leaves the doc unchanged). It
1679
+ has no effect when the account can't edit the doc.
1592
1680
 
1593
1681
  Returns:
1594
1682
  Confirmation with the document ID and web link. Includes "images" (per-image
@@ -1600,12 +1688,15 @@ def register(tool):
1600
1688
  fails, nothing is changed and an error is returned, except when Drive
1601
1689
  refuses it for storage quota, because the account can't add a file to the
1602
1690
  doc's folder, or because the folder or Shared Drive is at its item limit:
1603
- the replace then goes ahead without a backup. If writing the new content
1604
- fails, returns {"error", "docId", "backupId", "images"} instead, with any
1605
- temporary image share already revoked: the doc may be empty or partly
1606
- written, and backupId is the kept copy of its previous content. When the
1607
- replace went ahead without a backup there's no backupId, and the error
1608
- says the previous content couldn't be backed up: it can't be recovered.
1691
+ the replace then goes ahead without a backup. When sharing settings
1692
+ don't allow copying or the account is at its item-creation limit, it
1693
+ goes ahead without a backup only with allow_no_backup=True. If writing the
1694
+ new content fails, returns {"error", "docId", "backupId", "images"}
1695
+ instead, with any temporary image share already revoked: the doc may be
1696
+ empty or partly written, and backupId is the kept copy of its previous
1697
+ content. When the replace went ahead without a backup there's no
1698
+ backupId, and the error says the previous content couldn't be backed
1699
+ up: it can't be recovered.
1609
1700
  """
1610
1701
  source = await asyncio.to_thread(
1611
1702
  _read_doc_source_file, local_path, content_format, format_overridable=True
@@ -1623,6 +1714,7 @@ def register(tool):
1623
1714
  autolink_urls=autolink_urls,
1624
1715
  revoke_sharing=revoke_sharing,
1625
1716
  auto_downscale=auto_downscale,
1717
+ allow_no_backup=allow_no_backup,
1626
1718
  )
1627
1719
 
1628
1720
  @tool(annotations=ToolAnnotations(title="Get Document Structure", readOnlyHint=True))