gravity-cli 0.13.5__tar.gz → 0.13.7__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 (286) hide show
  1. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/PKG-INFO +6 -5
  2. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/README.md +4 -3
  3. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/capabilities.yaml +1 -1
  4. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/gmail.yaml +60 -7
  5. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/outlook.yaml +79 -4
  6. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/core_shapes.yaml +2 -0
  7. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/pyproject.toml +1 -1
  8. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_vocabulary.py +47 -0
  9. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/pyproject.toml +2 -2
  10. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/BUILDER_GUIDE_V2.md +1 -1
  11. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/CHANGELOG.md +11 -0
  12. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/api.py +7 -4
  13. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/login.py +79 -12
  14. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/workspace.py +9 -2
  15. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_gateway_token.py +2 -2
  16. gravity_cli-0.13.7/tests/test_login.py +70 -0
  17. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_session.py +2 -2
  18. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_workspace.py +17 -1
  19. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/uv.lock +6 -6
  20. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/.env.example +0 -0
  21. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/.github/workflows/ci.yml +0 -0
  22. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/.github/workflows/composio-watch.yml +0 -0
  23. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/.github/workflows/release.yml +0 -0
  24. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/.gitignore +0 -0
  25. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/AGENT_STANDARD.md +0 -0
  26. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/AGENT_STANDARD_V2.md +0 -0
  27. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/LICENSE +0 -0
  28. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/NOTICE +0 -0
  29. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/RELEASING.md +0 -0
  30. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/TEMPLATES.md +0 -0
  31. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/LICENSE +0 -0
  32. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/NOTICE +0 -0
  33. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/README.md +0 -0
  34. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/__init__.py +0 -0
  35. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/__main__.py +0 -0
  36. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/built_ins.py +0 -0
  37. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/catalog.py +0 -0
  38. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/catalog.yaml +0 -0
  39. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/catalog_imported.yaml +0 -0
  40. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/contract.py +0 -0
  41. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/cron.py +0 -0
  42. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/describe.py +0 -0
  43. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/errors.py +0 -0
  44. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/export.py +0 -0
  45. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/gen_catalog.py +0 -0
  46. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/gen_vocabulary.py +0 -0
  47. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/instance.py +0 -0
  48. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/manifest.py +0 -0
  49. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/manifest_v2.py +0 -0
  50. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/rules.py +0 -0
  51. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/rules_cases.json +0 -0
  52. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/source_scan.py +0 -0
  53. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/specs.py +0 -0
  54. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/validation.py +0 -0
  55. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/__init__.py +0 -0
  56. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/__main__.py +0 -0
  57. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/airtable.yaml +0 -0
  58. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/asana.yaml +0 -0
  59. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/browser_tool.yaml +0 -0
  60. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/composio_search.yaml +0 -0
  61. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/dropbox.yaml +0 -0
  62. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/exa.yaml +0 -0
  63. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/excel.yaml +0 -0
  64. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/firecrawl.yaml +0 -0
  65. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/github.yaml +0 -0
  66. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/googlecalendar.yaml +0 -0
  67. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/googledocs.yaml +0 -0
  68. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/googledrive.yaml +0 -0
  69. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/googlesheets.yaml +0 -0
  70. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/googleslides.yaml +0 -0
  71. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/googletasks.yaml +0 -0
  72. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/hackernews.yaml +0 -0
  73. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/hubspot.yaml +0 -0
  74. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/instagram.yaml +0 -0
  75. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/jira.yaml +0 -0
  76. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/linear.yaml +0 -0
  77. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/linkedin.yaml +0 -0
  78. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/microsoft_teams.yaml +0 -0
  79. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/notion.yaml +0 -0
  80. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/perplexityai.yaml +0 -0
  81. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/pinterest.yaml +0 -0
  82. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/reddit.yaml +0 -0
  83. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/slack.yaml +0 -0
  84. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/tavily.yaml +0 -0
  85. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/connectors/youtube.yaml +0 -0
  86. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/generated_shapes.yaml +0 -0
  87. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/policy.yaml +0 -0
  88. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/airtable.json +0 -0
  89. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/asana.json +0 -0
  90. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/browser_tool.json +0 -0
  91. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/composio_search.json +0 -0
  92. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/dropbox.json +0 -0
  93. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/exa.json +0 -0
  94. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/excel.json +0 -0
  95. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/firecrawl.json +0 -0
  96. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/github.json +0 -0
  97. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/gmail.json +0 -0
  98. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/googlecalendar.json +0 -0
  99. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/googledocs.json +0 -0
  100. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/googledrive.json +0 -0
  101. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/googlesheets.json +0 -0
  102. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/googleslides.json +0 -0
  103. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/googletasks.json +0 -0
  104. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/hackernews.json +0 -0
  105. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/hubspot.json +0 -0
  106. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/instagram.json +0 -0
  107. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/jira.json +0 -0
  108. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/linear.json +0 -0
  109. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/linkedin.json +0 -0
  110. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/microsoft_teams.json +0 -0
  111. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/notion.json +0 -0
  112. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/outlook.json +0 -0
  113. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/perplexityai.json +0 -0
  114. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/pinterest.json +0 -0
  115. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/reddit.json +0 -0
  116. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/slack.json +0 -0
  117. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/tavily.json +0 -0
  118. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas/youtube.json +0 -0
  119. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/schemas.py +0 -0
  120. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/shapes.d/ochat.yaml +0 -0
  121. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/shapes.d/ocrm.yaml +0 -0
  122. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/shapes.d/ogh.yaml +0 -0
  123. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/shapes.d/oms.yaml +0 -0
  124. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/shapes.d/oweb.yaml +0 -0
  125. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/shapes.d/owork.yaml +0 -0
  126. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/shapes.d/shared.yaml +0 -0
  127. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/sync.py +0 -0
  128. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/verbs.d/ochat.yaml +0 -0
  129. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/verbs.d/ocrm.yaml +0 -0
  130. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/verbs.d/ogh.yaml +0 -0
  131. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/verbs.d/oms.yaml +0 -0
  132. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/verbs.d/oweb.yaml +0 -0
  133. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/verbs.d/owork.yaml +0 -0
  134. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/verbs.d/rchat.yaml +0 -0
  135. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/verbs.d/rfiles.yaml +0 -0
  136. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/verbs.d/rgh.yaml +0 -0
  137. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/verbs.d/rtrack.yaml +0 -0
  138. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/verbs.d/rwork.yaml +0 -0
  139. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/gravity_schema/vocabulary/verbs.yaml +0 -0
  140. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/schema/manifest.schema.json +0 -0
  141. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/conftest.py +0 -0
  142. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/fixtures/demo_manifests.yaml +0 -0
  143. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_accounts.py +0 -0
  144. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_actions_memory.py +0 -0
  145. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_catalog_parity.py +0 -0
  146. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_cron.py +0 -0
  147. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_describe.py +0 -0
  148. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_errors.py +0 -0
  149. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_generated_tables.py +0 -0
  150. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_instance.py +0 -0
  151. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_json_schema.py +0 -0
  152. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_kind_outputs.py +0 -0
  153. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_manifest.py +0 -0
  154. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_manifest_v2.py +0 -0
  155. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_place_maker.py +0 -0
  156. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_rules.py +0 -0
  157. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_slots.py +0 -0
  158. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_source_scan.py +0 -0
  159. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_sync.py +0 -0
  160. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/packages/gravity-schema/tests/test_validation.py +0 -0
  161. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/scripts/composio-watch.sh +0 -0
  162. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/BUILDER_GUIDE.md +0 -0
  163. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/__init__.py +0 -0
  164. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/__main__.py +0 -0
  165. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/_runner_script.py +0 -0
  166. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/changelog.py +0 -0
  167. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/cli.py +0 -0
  168. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/__init__.py +0 -0
  169. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/adapt.py +0 -0
  170. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/build.py +0 -0
  171. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/capabilities.py +0 -0
  172. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/changelog.py +0 -0
  173. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/check.py +0 -0
  174. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/connect.py +0 -0
  175. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/dev.py +0 -0
  176. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/docs.py +0 -0
  177. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/guide.py +0 -0
  178. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/help.py +0 -0
  179. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/init.py +0 -0
  180. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/memory.py +0 -0
  181. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/push.py +0 -0
  182. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/run.py +0 -0
  183. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/runs.py +0 -0
  184. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/schedule.py +0 -0
  185. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/tools.py +0 -0
  186. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/update.py +0 -0
  187. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/commands/validate.py +0 -0
  188. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/config.py +0 -0
  189. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/dev.py +0 -0
  190. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/dev_page/index.html +0 -0
  191. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/docs/Gravity.agent.md +0 -0
  192. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/docs/Gravity.getting-started.md +0 -0
  193. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/docs/problem-to-agent.md +0 -0
  194. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/inputs.py +0 -0
  195. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/localrun.py +0 -0
  196. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/manifest.py +0 -0
  197. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/project.py +0 -0
  198. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/chat/.gitignore +0 -0
  199. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/chat/manifest.yaml +0 -0
  200. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/chat/requirements.txt +0 -0
  201. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/chat/src/agent.py +0 -0
  202. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/deepagent/.gitignore +0 -0
  203. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/deepagent/manifest.yaml +0 -0
  204. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/deepagent/requirements.txt +0 -0
  205. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/deepagent/src/agent.py +0 -0
  206. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/minimal/.gitignore +0 -0
  207. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/minimal/manifest.yaml +0 -0
  208. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/minimal/requirements.txt +0 -0
  209. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/minimal/src/agent.py +0 -0
  210. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/structured/.gitignore +0 -0
  211. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/structured/manifest.yaml +0 -0
  212. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/structured/requirements.txt +0 -0
  213. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/structured/src/agent.py +0 -0
  214. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/structured/src/gateway.py +0 -0
  215. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/structured/src/nodes/agent.py +0 -0
  216. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/structured/src/prompts.py +0 -0
  217. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/structured/src/state.py +0 -0
  218. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/chat/.gitignore +0 -0
  219. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/chat/manifest.yaml +0 -0
  220. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/chat/requirements.txt +0 -0
  221. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/chat/src/agent.py +0 -0
  222. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/chat/tests/test_agent.py +0 -0
  223. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/deepagent/.gitignore +0 -0
  224. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/deepagent/manifest.yaml +0 -0
  225. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/deepagent/requirements.txt +0 -0
  226. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/deepagent/src/agent.py +0 -0
  227. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/deepagent/tests/test_agent.py +0 -0
  228. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/minimal/.gitignore +0 -0
  229. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/minimal/manifest.yaml +0 -0
  230. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/minimal/requirements.txt +0 -0
  231. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/minimal/src/agent.py +0 -0
  232. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/minimal/tests/test_agent.py +0 -0
  233. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/structured/.gitignore +0 -0
  234. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/structured/manifest.yaml +0 -0
  235. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/structured/requirements.txt +0 -0
  236. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/structured/src/__init__.py +0 -0
  237. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/structured/src/agent.py +0 -0
  238. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/structured/src/gateway.py +0 -0
  239. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/structured/src/nodes/__init__.py +0 -0
  240. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/structured/src/nodes/agent.py +0 -0
  241. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/structured/src/prompts.py +0 -0
  242. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/structured/src/state.py +0 -0
  243. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/templates/v2/structured/tests/test_agent.py +0 -0
  244. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/timeline.py +0 -0
  245. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/ui.py +0 -0
  246. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/src/gravity_cli/updater.py +0 -0
  247. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/starter/manifest.yaml +0 -0
  248. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/starter/requirements.txt +0 -0
  249. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/starter/src/agent.py +0 -0
  250. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/starter/src/summary.py +0 -0
  251. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/starter/tests/test_summary.py +0 -0
  252. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/starter-v2/manifest.yaml +0 -0
  253. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/starter-v2/requirements.txt +0 -0
  254. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/starter-v2/src/agent.py +0 -0
  255. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/starter-v2/src/summary.py +0 -0
  256. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/starter-v2/tests/test_summary.py +0 -0
  257. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/conftest.py +0 -0
  258. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_adapt.py +0 -0
  259. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_agent_guide.py +0 -0
  260. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_agents.py +0 -0
  261. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_api.py +0 -0
  262. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_build_push.py +0 -0
  263. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_changelog.py +0 -0
  264. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_check.py +0 -0
  265. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_connect.py +0 -0
  266. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_connect_v2.py +0 -0
  267. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_dev.py +0 -0
  268. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_dev_v2.py +0 -0
  269. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_inputs_memory.py +0 -0
  270. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_localrun.py +0 -0
  271. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_manifest_integration.py +0 -0
  272. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_run.py +0 -0
  273. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_run_v2.py +0 -0
  274. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_runs.py +0 -0
  275. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_schedule.py +0 -0
  276. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_schedule_v2.py +0 -0
  277. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_templates.py +0 -0
  278. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_templates_v2.py +0 -0
  279. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_timeline.py +0 -0
  280. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_tools.py +0 -0
  281. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_ui.py +0 -0
  282. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_updater.py +0 -0
  283. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_v2_cli.py +0 -0
  284. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_validate.py +0 -0
  285. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_validate_v2.py +0 -0
  286. {gravity_cli-0.13.5 → gravity_cli-0.13.7}/tests/test_welcome.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: gravity-cli
3
- Version: 0.13.5
3
+ Version: 0.13.7
4
4
  Summary: gravity cli — init, run, and push python agents to the Gravity marketplace
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
7
7
  License-File: NOTICE
8
8
  Requires-Python: >=3.12
9
- Requires-Dist: gravity-schema==0.13.5
9
+ Requires-Dist: gravity-schema==0.13.7
10
10
  Requires-Dist: httpx>=0.27.0
11
11
  Requires-Dist: keyring>=25.0.0
12
12
  Requires-Dist: python-dotenv>=1.0.0
@@ -517,10 +517,11 @@ gravity tools gmail # only tools whose name contains "gmail"
517
517
 
518
518
  ### `gravity login`
519
519
 
520
- Sign in to Gravity. It opens your browser, shows a short code to confirm, and stores the session in your operating system's keychain.
520
+ Sign in to Gravity. It opens your browser on Google's sign-in and stores the session in your operating system's keychain. The browser hands the sign-in back to the CLI on this machine (on 127.0.0.1), so there is no code to copy or compare.
521
521
 
522
522
  ```
523
523
  gravity login
524
+ gravity login --no-browser # over SSH, or with no browser here: open the link on any device and check the code
524
525
  ```
525
526
 
526
527
  ### `gravity logout`
@@ -589,7 +590,7 @@ gravity docs [--force]
589
590
  |---|---|
590
591
  | `--force` | Replace the files even where you edited them, or where a file Gravity did not write has the same name |
591
592
 
592
- You rarely need this. Every command writes the three files into the folder it runs in if they are missing (never into your home folder or a drive root; `gravity init` writes them into the new agent), and rewrites them when a newer release changes them. The first line of a file Gravity wrote names the release and a hash of the text after it: if you edit the file the hash no longer matches and Gravity leaves it alone. Your own `agent.md`, `AGENTS.md` and `CLAUDE.md` are never touched. Point your coding agent at `Gravity.agent.md` from them if it does not look there by itself. Set `GRAVITY_AGENT_DOCS=0` to stop the automatic writes.
593
+ You rarely need this. Every command run in an agent's folder (one with a `manifest.yaml`) writes the three files there if they are missing, and rewrites them when a newer release changes them; a folder that already holds them, from `gravity docs`, is kept current the same way. Anywhere else, such as a repository you sign in from, commands write nothing (`gravity init` writes them into the new agent). The first line of a file Gravity wrote names the release and a hash of the text after it: if you edit the file the hash no longer matches and Gravity leaves it alone. Your own `agent.md`, `AGENTS.md` and `CLAUDE.md` are never touched. Point your coding agent at `Gravity.agent.md` from them if it does not look there by itself. Set `GRAVITY_AGENT_DOCS=0` to stop the automatic writes.
593
594
 
594
595
  ### `gravity update`
595
596
 
@@ -673,7 +674,7 @@ Set `GRAVITY_API_URL` and `GRAVITY_GATEWAY_URL` only to work against services yo
673
674
  | `GRAVITY_API_TOKEN` | A control-plane dev token, used instead of `gravity login`. For development only. | none |
674
675
  | `GRAVITY_CONFIG_DIR` | Moves `~/.gravity` elsewhere. Useful for tests and CI. | `~/.gravity` |
675
676
  | `GRAVITY_AUTO_UPDATE` | When `0`, commands neither check for a newer release nor install one. Always off when `CI` is set. | `1` |
676
- | `GRAVITY_AGENT_DOCS` | When `0`, commands do not write `Gravity.agent.md`, `problem-to-agent.md` and `Gravity.getting-started.md` into the folder they run in. `gravity docs` still does. | `1` |
677
+ | `GRAVITY_AGENT_DOCS` | When `0`, commands do not write `Gravity.agent.md`, `problem-to-agent.md` and `Gravity.getting-started.md` into the agent's folder they run in. `gravity docs` still does. | `1` |
677
678
  | `GRAVITY_UPDATE_URL` | Where the latest version is read from, a JSON document with `info.version`. For tests and mirrors. | PyPI |
678
679
  | `GRAVITY_UNATTENDED` | When `1`, calls that need approval are rejected without asking. `gravity schedule` sets it for you. | unset |
679
680
 
@@ -500,10 +500,11 @@ gravity tools gmail # only tools whose name contains "gmail"
500
500
 
501
501
  ### `gravity login`
502
502
 
503
- Sign in to Gravity. It opens your browser, shows a short code to confirm, and stores the session in your operating system's keychain.
503
+ Sign in to Gravity. It opens your browser on Google's sign-in and stores the session in your operating system's keychain. The browser hands the sign-in back to the CLI on this machine (on 127.0.0.1), so there is no code to copy or compare.
504
504
 
505
505
  ```
506
506
  gravity login
507
+ gravity login --no-browser # over SSH, or with no browser here: open the link on any device and check the code
507
508
  ```
508
509
 
509
510
  ### `gravity logout`
@@ -572,7 +573,7 @@ gravity docs [--force]
572
573
  |---|---|
573
574
  | `--force` | Replace the files even where you edited them, or where a file Gravity did not write has the same name |
574
575
 
575
- You rarely need this. Every command writes the three files into the folder it runs in if they are missing (never into your home folder or a drive root; `gravity init` writes them into the new agent), and rewrites them when a newer release changes them. The first line of a file Gravity wrote names the release and a hash of the text after it: if you edit the file the hash no longer matches and Gravity leaves it alone. Your own `agent.md`, `AGENTS.md` and `CLAUDE.md` are never touched. Point your coding agent at `Gravity.agent.md` from them if it does not look there by itself. Set `GRAVITY_AGENT_DOCS=0` to stop the automatic writes.
576
+ You rarely need this. Every command run in an agent's folder (one with a `manifest.yaml`) writes the three files there if they are missing, and rewrites them when a newer release changes them; a folder that already holds them, from `gravity docs`, is kept current the same way. Anywhere else, such as a repository you sign in from, commands write nothing (`gravity init` writes them into the new agent). The first line of a file Gravity wrote names the release and a hash of the text after it: if you edit the file the hash no longer matches and Gravity leaves it alone. Your own `agent.md`, `AGENTS.md` and `CLAUDE.md` are never touched. Point your coding agent at `Gravity.agent.md` from them if it does not look there by itself. Set `GRAVITY_AGENT_DOCS=0` to stop the automatic writes.
576
577
 
577
578
  ### `gravity update`
578
579
 
@@ -656,7 +657,7 @@ Set `GRAVITY_API_URL` and `GRAVITY_GATEWAY_URL` only to work against services yo
656
657
  | `GRAVITY_API_TOKEN` | A control-plane dev token, used instead of `gravity login`. For development only. | none |
657
658
  | `GRAVITY_CONFIG_DIR` | Moves `~/.gravity` elsewhere. Useful for tests and CI. | `~/.gravity` |
658
659
  | `GRAVITY_AUTO_UPDATE` | When `0`, commands neither check for a newer release nor install one. Always off when `CI` is set. | `1` |
659
- | `GRAVITY_AGENT_DOCS` | When `0`, commands do not write `Gravity.agent.md`, `problem-to-agent.md` and `Gravity.getting-started.md` into the folder they run in. `gravity docs` still does. | `1` |
660
+ | `GRAVITY_AGENT_DOCS` | When `0`, commands do not write `Gravity.agent.md`, `problem-to-agent.md` and `Gravity.getting-started.md` into the agent's folder they run in. `gravity docs` still does. | `1` |
660
661
  | `GRAVITY_UPDATE_URL` | Where the latest version is read from, a JSON document with `info.version`. For tests and mirrors. | PyPI |
661
662
  | `GRAVITY_UNATTENDED` | When `1`, calls that need approval are rejected without asking. `gravity schedule` sets it for you. | unset |
662
663
 
@@ -3362,7 +3362,7 @@ message.delete:
3362
3362
  message.delete_draft:
3363
3363
  shape: message
3364
3364
  side_effect: write
3365
- apps: [gmail]
3365
+ apps: [gmail, outlook]
3366
3366
  message.delete_scheduled:
3367
3367
  shape: message
3368
3368
  side_effect: write
@@ -621,20 +621,73 @@ writes:
621
621
  args: {id: "{id}"}
622
622
  check: fields_match
623
623
  map: {name: name}
624
+ # a reply in a thread (draft.reply_to or draft.thread): unverified until a live write; a new draft as before
624
625
  message.create:
626
+ # draft: {to, subject, text | html}: a new draft. With draft.reply_to (the id of the message it answers) or
627
+ # draft.thread (a thread's id, as reads give it: its last message is the one answered), a reply DRAFT in that
628
+ # thread instead: it takes the thread's subject ("Re: ..."; Composio: a subject of its own would start a new
629
+ # thread, so draft.subject isn't sent), and goes where Gmail's Reply sends it: to the sender of the message
630
+ # answered, or, when the account wrote that message (sent, or a draft of its own), to the people it went to, as
631
+ # message.reply does (draft.to isn't used). The receipt's id is the DRAFT's (message.send_draft sends it as the
632
+ # user left it, message.update_draft changes it, message.delete_draft deletes it); extra.message_id is the message
633
+ # inside it, and thread its thread, for a follow-up later
625
634
  steps:
635
+ - &gmail_thread_last
636
+ # a thread named without a message: its last message (the thread's messages come oldest first)
637
+ action: GMAIL_FETCH_MESSAGE_BY_THREAD_ID
638
+ each: draft.thread
639
+ args: {thread_id: "{item}"}
640
+ save: {last: "data.messages[].messageId|last"}
641
+ - &gmail_answered
642
+ # the message answered: its thread, its sender, and whether the account wrote it. A thread whose messages
643
+ # weren't found is passed on as it is, so this read fails rather than a new email going out
644
+ action: GMAIL_FETCH_MESSAGE_BY_MESSAGE_ID
645
+ each: "draft.reply_to ?? last|first ?? draft.thread"
646
+ args: {message_id: "{item}"}
647
+ save: {answered: data.messageId, reply_thread: data.threadId, sender: data.sender|email_addr,
648
+ mine: "data.labelIds|str|split(SENT)|count|enum(1:,*:true) ?? data.labelIds|str|split(DRAFT)|count|enum(1:,*:true)"}
649
+ - &gmail_answered_mine
650
+ # the account's own message: read again for the people it went to (as message.reply)
651
+ action: GMAIL_FETCH_MESSAGE_BY_MESSAGE_ID
652
+ each: mine|first
653
+ args: {message_id: "{answered|first}"}
654
+ save: {sent_to: data.to|emails}
655
+ - action: GMAIL_CREATE_EMAIL_DRAFT
656
+ each: reply_thread|first
657
+ args: {thread_id: "{item}", recipient_email: "{sent_to|first|first ?? sender|first}", extra_recipients: "{sent_to|first|rest}",
658
+ body: "{draft.html ?? draft.text}", is_html: "{draft.html|present}", attachment: "{file}"}
659
+ save: {reply_id: "data.response_data.id ?? data.id", reply_message: data.message.id, replied_thread: data.message.threadId}
626
660
  - action: GMAIL_CREATE_EMAIL_DRAFT
661
+ each: "reply_thread|first|present|enum(false:new)" # no thread asked for: a new draft
627
662
  args: {recipient_email: "{draft.to|emails|first}", extra_recipients: "{draft.to|emails|rest}", subject: "{draft.subject}",
628
- body: "{draft.html ?? draft.text}", is_html: "{draft.html|present}"}
629
- save: {id: "data.response_data.id ?? data.id"}
630
- returns: {id: id, subject: draft.subject}
663
+ body: "{draft.html ?? draft.text}", is_html: "{draft.html|present}", attachment: "{file}"}
664
+ save: {id: "data.response_data.id ?? data.id", message: data.message.id, thread: data.message.threadId,
665
+ subject: "={draft.subject}"}
666
+ returns: {id: "reply_id|first ?? id|first", thread: "replied_thread|first ?? reply_thread|first ?? thread|first",
667
+ subject: subject|first, extra.message_id: "reply_message|first ?? message|first", extra.replied_to: answered|first}
668
+ # a reply in a thread (draft.reply_to or draft.thread): unverified until a live write; a new email as before
631
669
  message.send:
670
+ # draft: {to, subject, text | html}: a new email. With draft.reply_to or draft.thread (as message.create), a reply
671
+ # in that thread instead, sent at once: Gmail's send can't thread (Composio: "To reply in an existing thread, use
672
+ # GMAIL_REPLY_TO_THREAD"). It keeps the thread's subject ("Re: ...") and goes where Gmail's Reply sends it, as
673
+ # message.create says (draft.subject and draft.to aren't used). The receipt names the sent message and its thread
674
+ # either way, so a follow-up can go in the same thread
632
675
  steps:
676
+ - *gmail_thread_last
677
+ - *gmail_answered
678
+ - *gmail_answered_mine
679
+ - action: GMAIL_REPLY_TO_THREAD
680
+ each: reply_thread|first
681
+ args: {thread_id: "{item}", recipient_email: "{sent_to|first|first ?? sender|first}", extra_recipients: "{sent_to|first|rest}",
682
+ message_body: "{draft.html ?? draft.text}", is_html: "{draft.html|present}", attachment: "{file}"}
683
+ save: {reply_id: data.id, replied_thread: data.threadId}
633
684
  - action: GMAIL_SEND_EMAIL
685
+ each: "reply_thread|first|present|enum(false:new)" # no thread asked for: a new email
634
686
  args: {recipient_email: "{draft.to|emails|first}", extra_recipients: "{draft.to|emails|rest}", subject: "{draft.subject}",
635
- body: "{draft.html ?? draft.text}", is_html: "{draft.html|present}"}
636
- save: {id: "data.response_data.id ?? data.id"}
637
- returns: {id: id, subject: draft.subject}
687
+ body: "{draft.html ?? draft.text}", is_html: "{draft.html|present}", attachment: "{file}"}
688
+ save: {id: "data.response_data.id ?? data.id", thread: data.threadId, subject: "={draft.subject}"}
689
+ returns: {id: "reply_id|first ?? id|first", thread: "replied_thread|first ?? reply_thread|first ?? thread|first",
690
+ subject: subject|first, extra.replied_to: answered|first}
638
691
  # verified live 2026-10-12
639
692
  label.update:
640
693
  # draft.id names a user label (system labels can't change); only the fields given change, one call each. A color
@@ -842,7 +895,7 @@ writes:
842
895
  save: {sent_to: data.to|emails}
843
896
  - action: GMAIL_REPLY_TO_THREAD
844
897
  args: {thread_id: "{thread}", recipient_email: "{sent_to|first|first ?? sender}", extra_recipients: "{sent_to|first|rest}",
845
- message_body: "{draft.html ?? draft.text}", is_html: "{draft.html|present}"}
898
+ message_body: "{draft.html ?? draft.text}", is_html: "{draft.html|present}", attachment: "{file}"}
846
899
  save: {id: data.id, reply_thread: data.threadId}
847
900
  returns: {id: id, thread: "reply_thread ?? thread", extra.replied_to: draft.id}
848
901
  read_back:
@@ -757,6 +757,8 @@ actions:
757
757
  about: Tool to delete a category from the user's master category list
758
758
  OUTLOOK_DELETE_MESSAGE:
759
759
  capability: message.delete
760
+ also:
761
+ - message.delete_draft
760
762
  side_effect: write
761
763
  required:
762
764
  - message_id
@@ -2678,21 +2680,77 @@ reads:
2678
2680
  features: tags, extra.wheelchair: isWheelChairAccessible, extra.booking: bookingType,
2679
2681
  extra.audio: audioDeviceName, extra.video: videoDeviceName, extra.display: displayDeviceName}
2680
2682
  writes:
2683
+ # a reply in a conversation (draft.reply_to or draft.thread): unverified until a live write; a new draft as before
2681
2684
  message.create:
2685
+ # draft: {to, subject, text | html}: a new draft. With draft.reply_to (the id of the message it answers) or
2686
+ # draft.thread (a conversation's id, as reads give it: its latest message that isn't a draft is the one answered),
2687
+ # a reply DRAFT in that conversation instead: Outlook's own reply, under "RE: ...", with the text above the quoted
2688
+ # message (Outlook takes a reply's text as plain text: draft.text, else draft.html's text). It goes to the sender
2689
+ # of the message answered, or, when the account sent that message (it is in Sent Items), to the people it went to
2690
+ # (Outlook's reply would address the account itself). draft.to and draft.subject aren't used. The receipt's id is
2691
+ # the draft's (message.send_draft sends it as the user left it), and thread its conversation, for a follow-up
2682
2692
  steps:
2693
+ - &outlook_thread_last
2694
+ # a conversation named without a message: its latest one, in any folder. Outlook sorts on a field only when the
2695
+ # filter names it first
2696
+ action: OUTLOOK_LIST_MESSAGES
2697
+ each: draft.thread
2698
+ args: {folder: allfolders, top: 1, orderby: receivedDateTime desc,
2699
+ filter: "receivedDateTime ge 2000-01-01T00:00:00Z and conversationId eq '{item}' and isDraft eq false"}
2700
+ save: {last: "data.value[].id|first"}
2701
+ - &outlook_answered
2702
+ # the message answered: its conversation, its folder and who it went to. A conversation whose messages weren't
2703
+ # found is passed on as it is, so this read fails rather than a new email going out
2704
+ action: OUTLOOK_GET_MESSAGE
2705
+ each: "draft.reply_to ?? last|first ?? draft.thread"
2706
+ args: {message_id: "{item}", user_id: me}
2707
+ save: {answered: data.id, reply_thread: data.conversationId, folder: data.parentFolderId,
2708
+ sent_to: "data.toRecipients[].emailAddress.address"}
2709
+ - &outlook_sent_items
2710
+ # Sent Items, to tell whether the account sent the message answered
2711
+ action: OUTLOOK_GET_MAIL_FOLDER
2712
+ each: reply_thread|first
2713
+ args: {mail_folder_id: sentitems, user_id: me}
2714
+ save: {sent_items: data}
2715
+ - &outlook_reply_draft
2716
+ action: OUTLOOK_CREATE_DRAFT_REPLY
2717
+ each: reply_thread|first
2718
+ args: {message_id: "{answered|first}", user_id: me, comment: "{draft.text ?? draft.html|html_text}"}
2719
+ save: {reply_id: data.id, reply_link: data.webLink, replied_thread: data.conversationId}
2720
+ - &outlook_reply_to_mine
2721
+ # the account's own message (its folder is Sent Items): the reply goes to the people it went to
2722
+ action: OUTLOOK_UPDATE_EMAIL
2723
+ each: "sent_items[id={folder|first}]"
2724
+ args: {message_id: "{reply_id|first}", user_id: me, to_recipients: "{sent_to|first|wrap(address)}"}
2683
2725
  - action: OUTLOOK_CREATE_DRAFT
2726
+ each: "reply_thread|first|present|enum(false:new)" # no conversation asked for: a new draft
2684
2727
  args: {subject: "{draft.subject}", body: "{draft.html ?? draft.text}", is_html: "{draft.html|present}",
2685
2728
  to_recipients: "{draft.to|emails}"}
2686
- save: {id: data.id, link: data.webLink}
2687
- returns: {id: id, subject: draft.subject, link: link}
2729
+ save: {id: data.id, link: data.webLink, thread: data.conversationId, subject: "={draft.subject}"}
2730
+ returns: {id: "reply_id|first ?? id|first", thread: "replied_thread|first ?? reply_thread|first ?? thread|first",
2731
+ subject: subject|first, link: "reply_link|first ?? link|first", extra.replied_to: answered|first}
2732
+ # a reply in a conversation (draft.reply_to or draft.thread): unverified until a live write; a new email as before
2688
2733
  message.send:
2734
+ # draft: {to, subject, text | html}: a new email. With draft.reply_to or draft.thread, a reply in that conversation
2735
+ # instead, made as message.create makes one and then sent. Outlook's send gives back no record of what it sent: the
2736
+ # receipt names a reply's conversation (for a follow-up), and a new email's subject only (to learn a new email's
2737
+ # conversation, make it with message.create and send that with message.send_draft)
2689
2738
  steps:
2739
+ - *outlook_thread_last
2740
+ - *outlook_answered
2741
+ - *outlook_sent_items
2742
+ - *outlook_reply_draft
2743
+ - *outlook_reply_to_mine
2744
+ - action: OUTLOOK_SEND_DRAFT
2745
+ each: reply_id|first
2746
+ args: {message_id: "{item}", user_id: me}
2690
2747
  - action: OUTLOOK_SEND_EMAIL
2748
+ each: "reply_thread|first|present|enum(false:new)" # no conversation asked for: a new email
2691
2749
  # OUTLOOK_SEND_EMAIL takes one `to`: everyone else is copied, so no recipient is dropped
2692
2750
  args: {to: "{draft.to|emails|first}", cc_emails: "{draft.to|emails|rest}", subject: "{draft.subject}",
2693
2751
  body: "{draft.html ?? draft.text}", is_html: "{draft.html|present}"}
2694
- save: {status: data.status_code}
2695
- returns: {subject: draft.subject}
2752
+ save: {status: data.status_code, subject: "={draft.subject}"}
2753
+ returns: {thread: "replied_thread|first ?? reply_thread|first", subject: subject|first, extra.replied_to: answered|first}
2696
2754
  # verified live 2026-10-12 (a personal Microsoft account)
2697
2755
  message.update:
2698
2756
  # draft.id names the message; its subject, labels (Outlook categories, by name) and body change, the rest stays.
@@ -3179,6 +3237,23 @@ writes:
3179
3237
  action: OUTLOOK_GET_MESSAGE
3180
3238
  args: {message_id: "{draft.id}", user_id: me}
3181
3239
  check: gone
3240
+ # unverified until a live write
3241
+ message.delete_draft:
3242
+ # draft.id names a draft (message.create gives it); it is deleted for good, as a Gmail draft is (message.delete
3243
+ # moves a message to Deleted Items instead). Only a draft: the message is read first, and one that isn't a draft
3244
+ # is left alone, which the read-back then reports (found, not gone)
3245
+ steps:
3246
+ - action: OUTLOOK_GET_MESSAGE
3247
+ args: {message_id: "{draft.id}", user_id: me}
3248
+ save: {is_draft: "data.isDraft|enum(true:yes)"}
3249
+ - action: OUTLOOK_DELETE_MESSAGE
3250
+ each: is_draft
3251
+ args: {message_id: "{draft.id}", user_id: me}
3252
+ returns: {id: draft.id}
3253
+ read_back:
3254
+ action: OUTLOOK_GET_MESSAGE
3255
+ args: {message_id: "{draft.id}", user_id: me}
3256
+ check: gone
3182
3257
  # verified live 2026-10-12 (a personal Microsoft account)
3183
3258
  message.move:
3184
3259
  # draft: {id, folder}: the message moves to the folder draft.folder names (its id, as mail_folder.list gives it,
@@ -24,6 +24,8 @@ message:
24
24
  author: ref
25
25
  subject: text?
26
26
  thread: thread?
27
+ reply_to: message? # the message this one answers, by its id (not a Reply-To address): an email drafted or sent
28
+ # with it, or with a thread, is a reply in that thread
27
29
  channel: channel?
28
30
  to: list[ref]?
29
31
  labels: list[text]?
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gravity-schema"
3
- version = "0.13.5"
3
+ version = "0.13.7"
4
4
  description = "Gravity agent manifest contract — models, validation, and JSON Schema export"
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -161,3 +161,50 @@ def test_an_invite_gets_a_video_call_only_when_asked():
161
161
  outlook = VOCABULARY.connectors["outlook"].writes["event.create"]["steps"][0]["args"]
162
162
  assert outlook["is_online_meeting"] == "{draft.video_call|bool}"
163
163
  assert {"video_call", "video_link"} <= set(VOCABULARY.shapes["event"].fields)
164
+
165
+
166
+ @pytest.mark.parametrize("app,capability,reply", [
167
+ ("gmail", "message.send", "GMAIL_REPLY_TO_THREAD"),
168
+ ("gmail", "message.create", "GMAIL_CREATE_EMAIL_DRAFT"),
169
+ ("outlook", "message.send", "OUTLOOK_SEND_DRAFT"),
170
+ ("outlook", "message.create", "OUTLOOK_CREATE_DRAFT_REPLY"),
171
+ ])
172
+ def test_an_email_with_a_thread_or_a_message_it_answers_is_a_reply_in_that_thread(app, capability, reply):
173
+ # the engine's behaviour is tested where it runs (gravity-connect's mapping tests); here, the mapping's outline
174
+ assert VOCABULARY.shapes["message"].fields["reply_to"] == "message?" # beside thread, in every message draft
175
+ spec = VOCABULARY.connectors[app].writes[capability]
176
+ assert spec["steps"][0]["each"] == "draft.thread" # a thread: its latest message is answered
177
+ assert spec["steps"][1]["each"] == "draft.reply_to ?? last|first ?? draft.thread"
178
+ threaded = next(s for s in spec["steps"] if s["action"] == reply) # only when a thread was asked for
179
+ assert threaded["each"] in ("reply_thread|first", "reply_id|first")
180
+ new = spec["steps"][-1] # and a new one only when none was
181
+ assert new is not threaded and new["each"] == "reply_thread|first|present|enum(false:new)"
182
+ assert "subject" in new["args"] and "thread_id" not in new["args"]
183
+ if app == "gmail":
184
+ # Composio: a subject of its own starts a new thread, so a reply is sent with the thread's id and no subject
185
+ assert threaded["args"]["thread_id"] == "{item}" and "subject" not in threaded["args"]
186
+ assert "thread" in spec["returns"] and "extra.replied_to" in spec["returns"]
187
+ # the reads it makes are in the run's grant with it
188
+ assert "message.get" in VOCABULARY.uses(capability, app)
189
+
190
+
191
+ def test_a_draft_the_agent_made_can_be_sent_or_deleted_as_the_user_left_it():
192
+ for app in ("gmail", "outlook"):
193
+ for capability in ("message.send_draft", "message.delete_draft"):
194
+ assert capability in VOCABULARY.connectors[app].writes, (app, capability)
195
+ assert VOCABULARY.takes("message.send_draft") == {"id": "the draft"}
196
+ assert VOCABULARY.is_off_by_default("message.delete_draft") and not VOCABULARY.is_off_by_default("message.send_draft")
197
+ # Outlook deletes only a draft: the message is read first, and the delete runs only when it is one
198
+ steps = VOCABULARY.connectors["outlook"].writes["message.delete_draft"]["steps"]
199
+ assert [s["action"] for s in steps] == ["OUTLOOK_GET_MESSAGE", "OUTLOOK_DELETE_MESSAGE"]
200
+ assert steps[1]["each"] == "is_draft" and steps[0]["save"]["is_draft"] == "data.isDraft|enum(true:yes)"
201
+
202
+
203
+ def test_gmail_sends_drafts_and_replies_carry_the_file_an_agent_gives():
204
+ # gravity.act("send", draft={...}, file={name, data}): the engine uploads `file` for an input the action lists
205
+ # under `files` (attachment, on all three actions), so a resume can go with an application email
206
+ writes = next(c for c in VOCABULARY.connectors.values() if c.app == "gmail").writes
207
+ writing = {"GMAIL_SEND_EMAIL", "GMAIL_CREATE_EMAIL_DRAFT", "GMAIL_REPLY_TO_THREAD"}
208
+ steps = [s for cap in ("message.send", "message.create", "message.reply") for s in writes[cap]["steps"] if s["action"] in writing]
209
+ assert len(steps) == 5
210
+ assert all(s["args"].get("attachment") == "{file}" for s in steps)
@@ -1,13 +1,13 @@
1
1
  [project]
2
2
  name = "gravity-cli"
3
- version = "0.13.5"
3
+ version = "0.13.7"
4
4
  description = "gravity cli — init, run, and push python agents to the Gravity marketplace"
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
7
7
  license-files = ["LICENSE", "NOTICE"]
8
8
  requires-python = ">=3.12"
9
9
  dependencies = [
10
- "gravity-schema==0.13.5", # released in lockstep: always the same version as this package
10
+ "gravity-schema==0.13.7", # released in lockstep: always the same version as this package
11
11
  "typer>=0.15.0",
12
12
  "httpx>=0.27.0",
13
13
  "rich>=13.9.0",
@@ -208,7 +208,7 @@ async def graph():
208
208
  | Call | What it does | Returns |
209
209
  |---|---|---|
210
210
  | `gravity.read(name, text=, id=, filters=, limit=, target=)` | Reads a source by its manifest name. `text` for a search, `id` for a get, `target` only with `per_call` (§8.2). | `{"records", "complete", "warnings", "rejected", "window", "filters", ...}`: records in the shape's fields; `complete` is false if the app didn't give everything; `warnings` say what couldn't be applied (a filter this app can't do). |
211
- | `gravity.act(name, draft=...)` | Runs a write. `draft` holds the shape's fields; put an `id` in it to change a record. Tables take `rows=[...]`, files `file={name, text \| data \| url}`. | What was written (`record`: its id and link), and whether reading it back matched (`read_back.ok`). `{"rejected": True}` if the user said no to an approval. |
211
+ | `gravity.act(name, draft=...)` | Runs a write. `draft` holds the shape's fields; put an `id` in it to change a record. Tables take `rows=[...]`, files `file={name, text \| data \| url}`; on Gmail's `message.send`, `message.create` and `message.reply` the file is the email's attachment. | What was written (`record`: its id and link), and whether reading it back matched (`read_back.ok`). `{"rejected": True}` if the user said no to an approval. |
212
212
  | `gravity.built_in(name, ...)` | Calls a tool built into the gateway (§8.7). | The tool's answer. |
213
213
 
214
214
  A call that fails raises `gravity.CallFailed` with the reason, so a failure is never mistaken for an empty result.
@@ -4,6 +4,17 @@ Shown by `gravity update` and `gravity changelog`, and after an update. Each rel
4
4
  then one bullet per change: `- new|improved|fixed: A one-line headline. The detail behind it.`
5
5
  Write it for a builder, not for a maintainer. `tests/test_changelog.py` fails a release that has no entry.
6
6
 
7
+ ## 0.13.7 - 2026-11-03
8
+
9
+ - new: A v2 agent can attach a file to an email on Gmail. `gravity.act("send", draft={...}, file={name, data})` (and the same on `message.create` and `message.reply`, a reply in a thread included) carries the file as the attachment: a PDF or an image, up to 10 MB, base64 in `data`. Without `file`, nothing changes.
10
+
11
+ ## 0.13.6 - 2026-11-02
12
+
13
+ - new: Replies and follow-ups stay in their email thread. A `message.send` or `message.create` draft with `reply_to` (the id of the message it answers) or `thread` (a thread's id, from a read or an earlier receipt; its latest message is the one answered) is a reply in that thread on Gmail and Outlook, under the thread's "Re:" subject, to whom the app's Reply sends it: the sender, or the people your own message went to, so a follow-up to an unanswered email reaches them. A reply ignores `subject` and `to`. Receipts now give the `thread` to follow up in (and `extra.replied_to`). Without either field, nothing changes.
14
+ - new: Send the draft as the user left it. A `message.create` receipt's `id` is the draft's: `message.send_draft` with `{"id": ...}` sends that draft with the user's edits (Gmail and Outlook), and `message.delete_draft` deletes it, now on Outlook too (a draft only; off by default, like every delete). List `message.send_draft` under `approvals.required_for` as you do `message.send`. On Outlook, a new email sent with `message.send` still gives back no thread: make it with `message.create` and send it with `message.send_draft` to keep its `thread`.
15
+ - improved: `gravity login` is just Google. The browser opens on the sign-in, and after you pick your account it hands the session back to the CLI on this machine, so there is no code to confirm. Over SSH or without a browser, `gravity login --no-browser` prints a link and a code to use on any device.
16
+ - fixed: Commands no longer leave Gravity.agent.md, problem-to-agent.md and Gravity.getting-started.md in whatever folder you run them in. They are written in an agent's folder (one with a manifest.yaml) and kept current where they already are; `gravity docs` still writes them anywhere you ask.
17
+
7
18
  ## 0.13.5 - 2026-11-02
8
19
 
9
20
  - new: Apollo and Firecrawl as built-in tools for contract v2 agents, on Gravity's own account through Composio Instant (nothing for the user to connect): `apollo.search_people` (free), `apollo.search_companies`, `apollo.enrich_person`, `apollo.job_postings`, `firecrawl.scrape` and `firecrawl.map`. Apollo's data has no page to quote: use it to find companies and people, and confirm what you show on their own site or a register.
@@ -119,14 +119,17 @@ def service_config() -> dict:
119
119
  return _shaped(_request("GET", "/api/cli/config", auth=False, timeout=15), "/api/cli/config", "gateway_url")
120
120
 
121
121
 
122
- def device_start() -> dict:
122
+ def device_start(loopback: bool = False) -> dict:
123
+ """loopback: this CLI waits on 127.0.0.1 for the browser's hand-off (commands/login.py); else the code flow."""
123
124
  path = "/api/cli/device/start"
124
- return _shaped(_request("POST", path, auth=False, timeout=15), path, "deviceCode", "verificationUrl", "userCode")
125
+ body = {"json": {"loopback": True}} if loopback else {}
126
+ return _shaped(_request("POST", path, auth=False, timeout=15, **body), path, "deviceCode", "verificationUrl", "userCode")
125
127
 
126
128
 
127
- def device_poll(device_code: str) -> dict:
129
+ def device_poll(device_code: str, handoff: str | None = None) -> dict:
128
130
  path = "/api/cli/device/poll"
129
- result = _shaped(_request("POST", path, auth=False, timeout=15, json={"deviceCode": device_code}), path, "status")
131
+ body = {"deviceCode": device_code, **({"handoff": handoff} if handoff else {})}
132
+ result = _shaped(_request("POST", path, auth=False, timeout=15, json=body), path, "status")
130
133
  if result["status"] == "approved":
131
134
  _shaped(result.get("session"), path, "accessToken", "refreshToken")
132
135
  return result
@@ -1,39 +1,106 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import http.server
3
4
  import os
5
+ import secrets
6
+ import threading
4
7
  import time
5
8
  import webbrowser
6
9
  from datetime import UTC, datetime
7
10
  from typing import Annotated
11
+ from urllib.parse import parse_qs, urlencode, urlsplit
8
12
 
9
13
  import typer
10
14
 
11
15
  from .. import Problem, api, config, ui
12
16
 
13
17
 
14
- def login_command():
15
- """Log in with a browser device code; the token goes in the OS keychain."""
18
+ class _Callback(http.server.BaseHTTPRequestHandler):
19
+ """The sign-in page sends the browser here after Google, with the one-time hand-off the server asks for."""
20
+
21
+ def do_GET(self):
22
+ url = urlsplit(self.path)
23
+ q = parse_qs(url.query)
24
+ if url.path != "/callback" or q.get("state") != [self.server.state] or not q.get("handoff"):
25
+ self.send_error(404)
26
+ return
27
+ self.server.handoff = q["handoff"][0]
28
+ self.server.got.set()
29
+ self.send_response(302) # back to the page, which says the CLI is signed in
30
+ self.send_header("Location", f"{config.api_url()}/cli-login?signed_in=1")
31
+ self.end_headers()
32
+
33
+ def log_message(self, *args): # nothing on the terminal
34
+ pass
35
+
36
+
37
+ class _Listener(http.server.HTTPServer):
38
+ """127.0.0.1 only, on a free port, for this one sign-in. Only the browser on this machine can reach it, so a
39
+ login link someone else opens can never hand their account to this CLI, and nobody has to compare a code."""
40
+
41
+ def __init__(self):
42
+ self.state = secrets.token_urlsafe(16)
43
+ self.handoff: str | None = None
44
+ self.got = threading.Event()
45
+ super().__init__(("127.0.0.1", 0), _Callback)
46
+ threading.Thread(target=self.serve_forever, daemon=True).start()
47
+
48
+ def close(self):
49
+ self.shutdown()
50
+ self.server_close()
51
+
52
+
53
+ def _listen() -> _Listener | None:
54
+ try:
55
+ return _Listener()
56
+ except OSError: # no loopback socket here: the code flow still works
57
+ return None
58
+
59
+
60
+ def login_command(
61
+ no_browser: Annotated[bool, typer.Option("--no-browser", help="Sign in from another device with a code (SSH, or no browser here)")] = False,
62
+ ):
63
+ """Sign in with Google in your browser; the token goes in the OS keychain."""
16
64
  if os.environ.get("GRAVITY_API_TOKEN"):
17
65
  ui.warn("GRAVITY_API_TOKEN is set", "it is used instead of this sign-in", "Remove it from ~/.gravity/.env to use your account")
18
- start = api.device_start()
66
+ listener = None if no_browser else _listen()
67
+ try:
68
+ _sign_in(listener, open_browser=not no_browser)
69
+ finally:
70
+ if listener:
71
+ listener.close()
72
+
73
+
74
+ def _sign_in(listener: _Listener | None, open_browser: bool) -> None:
75
+ start = api.device_start(loopback=listener is not None)
19
76
  device_code = start["deviceCode"]
20
77
  interval = start.get("interval", 3)
21
78
  deadline = time.time() + start.get("expiresIn", 600)
22
79
 
23
80
  ui.heading("Sign in to Gravity")
24
- ui.table(["", "", ""], [
25
- ["1", "Your browser is opening", start["verificationUrl"]],
26
- ["2", "Confirm this code", start["userCode"]],
27
- ])
81
+ if listener:
82
+ url = f"{start['verificationUrl']}&{urlencode({'port': listener.server_address[1], 'state': listener.state})}"
83
+ ui.table(["", ""], [["Your browser is opening", "sign in with Google there"], ["Or open", url]])
84
+ else:
85
+ url = start["verificationUrl"]
86
+ ui.table(["", "", ""], [
87
+ ["1", "Open this page" if not open_browser else "Your browser is opening", url],
88
+ ["2", "Check it shows this code", start["userCode"]],
89
+ ])
28
90
  ui.say()
29
- webbrowser.open(start["verificationUrl"])
91
+ if open_browser:
92
+ webbrowser.open(url)
30
93
 
31
- with ui.working("Waiting for you to approve") as show:
94
+ waiting = "Waiting for you to sign in"
95
+ with ui.working(waiting) as show:
32
96
  while (left := deadline - time.time()) > 0:
33
- show(f"Waiting for you to approve {int(left) // 60}:{int(left) % 60:02d} left")
34
- time.sleep(interval)
97
+ show(f"{waiting} {int(left) // 60}:{int(left) % 60:02d} left")
98
+ if listener:
99
+ listener.got.wait(interval) # wakes as soon as the browser hands off
100
+ else:
101
+ time.sleep(interval)
35
102
  try:
36
- result = api.device_poll(device_code)
103
+ result = api.device_poll(device_code, listener.handoff if listener else None)
37
104
  except Problem as e:
38
105
  if e.title != "expired_token": # the control plane's only 400 here; anything else is its own problem
39
106
  raise
@@ -149,9 +149,16 @@ def sync(folder: Path, *, force: bool = False) -> list[Outcome]:
149
149
  return [_sync_one(folder, name, release, force) for name in FILES]
150
150
 
151
151
 
152
+ def _agent_folder(folder: Path) -> bool:
153
+ """An agent's folder, or one that already holds the files (gravity docs put them there). Anywhere else, such
154
+ as a repository someone signs in from, every command would leave ~200 KB of guides behind."""
155
+ return (folder / "manifest.yaml").exists() or any((folder / name).exists() for name in FILES)
156
+
157
+
152
158
  def refresh(folder: Path) -> None:
153
- """What every command does first: create or update the files here, and say so in one line. Never raises."""
154
- if not enabled():
159
+ """What every command does first: create or update the files in an agent's folder, and say so in one line.
160
+ Never raises."""
161
+ if not enabled() or not _agent_folder(folder):
155
162
  return
156
163
  with contextlib.suppress(Exception):
157
164
  by_status: dict[str, list[str]] = defaultdict(list)
@@ -25,8 +25,8 @@ def stored(monkeypatch):
25
25
 
26
26
 
27
27
  def _login(monkeypatch, issued):
28
- monkeypatch.setattr(login.api, "device_start", lambda: {"deviceCode": "d", "userCode": "U", "verificationUrl": "https://x", "interval": 0})
29
- monkeypatch.setattr(login.api, "device_poll", lambda code: {"status": "approved", "session": {"accessToken": "a", "refreshToken": "r"}})
28
+ monkeypatch.setattr(login.api, "device_start", lambda loopback=False: {"deviceCode": "d", "userCode": "U", "verificationUrl": "https://x", "interval": 0})
29
+ monkeypatch.setattr(login.api, "device_poll", lambda code, handoff=None: {"status": "approved", "session": {"accessToken": "a", "refreshToken": "r"}})
30
30
  monkeypatch.setattr(login.api, "gateway_token", lambda: issued)
31
31
  monkeypatch.setattr(login.webbrowser, "open", lambda url: None)
32
32
  login.login_command()