mammoth-cli 2.0.35__tar.gz → 2.0.36__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 (220) hide show
  1. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/PKG-INFO +10 -9
  2. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/README.md +8 -7
  3. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/__init__.py +1 -1
  4. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/SKILL.md +2 -2
  5. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/auth.md +23 -16
  6. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/handoff.md +1 -1
  7. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/auth.py +74 -38
  8. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/doctor.py +10 -9
  9. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/context/credentials.py +77 -31
  10. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/context/endpoint.py +2 -1
  11. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/context/resolver.py +18 -13
  12. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/contracts/auth.py +2 -4
  13. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/command_contract.py +1 -2
  14. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/mapping.py +6 -1
  15. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/sdk_service.py +6 -2
  16. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/testing.py +1 -1
  17. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/pyproject.toml +2 -2
  18. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/.gitignore +0 -0
  19. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/LICENSE +0 -0
  20. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/__main__.py +0 -0
  21. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/app.py +0 -0
  22. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/capabilities-misc.md +0 -0
  23. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/capabilities.md +0 -0
  24. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/command-index.md +0 -0
  25. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/activity.md +0 -0
  26. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/addon.md +0 -0
  27. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/agent.md +0 -0
  28. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/ai.md +0 -0
  29. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/annotation.md +0 -0
  30. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/auth.md +0 -0
  31. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/automation.md +0 -0
  32. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/batch.md +0 -0
  33. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/billing.md +0 -0
  34. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/browse.md +0 -0
  35. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/capability.md +0 -0
  36. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/client-app.md +0 -0
  37. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/completion.md +0 -0
  38. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/config.md +0 -0
  39. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/connector.md +0 -0
  40. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/context.md +0 -0
  41. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/dashboard.md +0 -0
  42. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/data-app.md +0 -0
  43. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/dataset.md +0 -0
  44. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/doctor.md +0 -0
  45. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/external-key.md +0 -0
  46. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/file.md +0 -0
  47. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/folder.md +0 -0
  48. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/job.md +0 -0
  49. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/log.md +0 -0
  50. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/notification.md +0 -0
  51. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/parameter.md +0 -0
  52. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/project.md +0 -0
  53. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/report.md +0 -0
  54. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/schedule.md +0 -0
  55. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/schema.md +0 -0
  56. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/skill.md +0 -0
  57. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/snippet.md +0 -0
  58. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/support.md +0 -0
  59. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/template.md +0 -0
  60. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/trash.md +0 -0
  61. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/upgrade.md +0 -0
  62. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/user.md +0 -0
  63. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/version.md +0 -0
  64. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/view.md +0 -0
  65. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/webhook.md +0 -0
  66. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/workflow.md +0 -0
  67. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/workspace.md +0 -0
  68. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/input.md +0 -0
  69. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/jobs-drafts.md +0 -0
  70. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/machine-output.md +0 -0
  71. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/operations.md +0 -0
  72. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/auth-scope.md +0 -0
  73. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/cleanup.md +0 -0
  74. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/dashboards.md +0 -0
  75. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/end-to-end.md +0 -0
  76. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/exports.md +0 -0
  77. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/index.md +0 -0
  78. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/need-action.md +0 -0
  79. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/resources.md +0 -0
  80. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/transforms.md +0 -0
  81. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/typed-etl-discovery.md +0 -0
  82. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/recovery.md +0 -0
  83. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/report-checklist.md +0 -0
  84. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/retention.md +0 -0
  85. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/safety.md +0 -0
  86. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/bundled_skill/mammoth-cli/references/task-start.md +0 -0
  87. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/__init__.py +0 -0
  88. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/activity.py +0 -0
  89. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/addon.py +0 -0
  90. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/agent.py +0 -0
  91. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/ai.py +0 -0
  92. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/annotation.py +0 -0
  93. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/automation.py +0 -0
  94. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/batch.py +0 -0
  95. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/billing.py +0 -0
  96. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/browse.py +0 -0
  97. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/capability.py +0 -0
  98. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/client_app.py +0 -0
  99. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/completion.py +0 -0
  100. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/config.py +0 -0
  101. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/connector.py +0 -0
  102. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/context.py +0 -0
  103. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/dashboard.py +0 -0
  104. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/data_app.py +0 -0
  105. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/dataset.py +0 -0
  106. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/external_key.py +0 -0
  107. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/file.py +0 -0
  108. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/folder.py +0 -0
  109. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/job.py +0 -0
  110. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/notification.py +0 -0
  111. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/parameter.py +0 -0
  112. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/project.py +0 -0
  113. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/registry.py +0 -0
  114. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/report.py +0 -0
  115. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/schedule.py +0 -0
  116. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/schema.py +0 -0
  117. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/skill.py +0 -0
  118. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/snippet.py +0 -0
  119. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/support.py +0 -0
  120. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/template.py +0 -0
  121. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/trash.py +0 -0
  122. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/upgrade.py +0 -0
  123. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/user.py +0 -0
  124. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/view.py +0 -0
  125. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/view_ops.py +0 -0
  126. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/webhook.py +0 -0
  127. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/workflow.py +0 -0
  128. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/commands/workspace.py +0 -0
  129. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/context/__init__.py +0 -0
  130. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/context/profiles.py +0 -0
  131. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/contracts/__init__.py +0 -0
  132. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/errors/__init__.py +0 -0
  133. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/errors/envelope.py +0 -0
  134. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/manifest/__init__.py +0 -0
  135. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/manifest/loader.py +0 -0
  136. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/messages/__init__.py +0 -0
  137. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/output/__init__.py +0 -0
  138. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/output/envelope.py +0 -0
  139. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/output/normalize.py +0 -0
  140. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/output/policy.py +0 -0
  141. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/output/progress.py +0 -0
  142. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/output/render.py +0 -0
  143. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/py.typed +0 -0
  144. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/runtime/__init__.py +0 -0
  145. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/runtime/confirm.py +0 -0
  146. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/runtime/dryrun.py +0 -0
  147. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/runtime/executor.py +0 -0
  148. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/runtime/input_loader.py +0 -0
  149. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/runtime/invocation.py +0 -0
  150. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/runtime/options.py +0 -0
  151. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/runtime/parents.py +0 -0
  152. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/runtime/runlog.py +0 -0
  153. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/runtime/session.py +0 -0
  154. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/runtime/strict.py +0 -0
  155. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/runtime/updates.py +0 -0
  156. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/runtime/validate.py +0 -0
  157. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/__init__.py +0 -0
  158. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/argspec.py +0 -0
  159. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/coerce.py +0 -0
  160. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/conditions.py +0 -0
  161. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/dispatch.py +0 -0
  162. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/factory.py +0 -0
  163. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/input_fields.py +0 -0
  164. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/openapi_types.py +0 -0
  165. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/positionals.py +0 -0
  166. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/protocol.py +0 -0
  167. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/testing.py +0 -0
  168. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/services/type_system.py +0 -0
  169. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/skills/__init__.py +0 -0
  170. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/skills/installer.py +0 -0
  171. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/mammoth_cli/skills/steering.py +0 -0
  172. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/activity.yaml +0 -0
  173. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/addon.yaml +0 -0
  174. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/agent.yaml +0 -0
  175. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/ai.yaml +0 -0
  176. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/annotation.yaml +0 -0
  177. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/auth.yaml +0 -0
  178. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/automation.yaml +0 -0
  179. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/batch.yaml +0 -0
  180. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/billing.yaml +0 -0
  181. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/browse.yaml +0 -0
  182. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/capability.yaml +0 -0
  183. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/client-app.yaml +0 -0
  184. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/completion.yaml +0 -0
  185. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/config.yaml +0 -0
  186. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/connector.yaml +0 -0
  187. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/context.yaml +0 -0
  188. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/dashboard.yaml +0 -0
  189. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/data-app.yaml +0 -0
  190. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/dataset.yaml +0 -0
  191. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/doctor.yaml +0 -0
  192. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/external-key.yaml +0 -0
  193. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/file.yaml +0 -0
  194. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/folder.yaml +0 -0
  195. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/job.yaml +0 -0
  196. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/log.yaml +0 -0
  197. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/notification.yaml +0 -0
  198. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/parameter.yaml +0 -0
  199. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/project.yaml +0 -0
  200. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/report.yaml +0 -0
  201. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/schedule.yaml +0 -0
  202. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/schema.yaml +0 -0
  203. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/skill.yaml +0 -0
  204. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/snippet.yaml +0 -0
  205. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/support.yaml +0 -0
  206. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/template.yaml +0 -0
  207. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/trash.yaml +0 -0
  208. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/upgrade.yaml +0 -0
  209. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/user.yaml +0 -0
  210. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/version.yaml +0 -0
  211. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/view.yaml +0 -0
  212. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/webhook.yaml +0 -0
  213. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/workflow.yaml +0 -0
  214. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/commands/workspace.yaml +0 -0
  215. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/openapi-operations.yaml +0 -0
  216. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/schema-v1.json +0 -0
  217. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/sdk-catalog.source.yaml +0 -0
  218. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/manifests/sdk-methods.yaml +0 -0
  219. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/openapi/metadata.json +0 -0
  220. {mammoth_cli-2.0.35 → mammoth_cli-2.0.36}/spec/openapi/openapi.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mammoth-cli
3
- Version: 2.0.35
3
+ Version: 2.0.36
4
4
  Summary: Command-line interface for the Mammoth Analytics platform
5
5
  Project-URL: homepage, https://mammoth.io
6
6
  Project-URL: repository, https://github.com/EdgeMetric/mammothsdk
@@ -17,7 +17,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
17
  Requires-Python: <3.15,>=3.12
18
18
  Requires-Dist: jsonschema>=4.20
19
19
  Requires-Dist: keyring<26,>=25.7
20
- Requires-Dist: mammoth-io<0.8,>=0.7.15
20
+ Requires-Dist: mammoth-io<0.8,>=0.7.16
21
21
  Requires-Dist: platformdirs<5,>=4.10
22
22
  Requires-Dist: pydantic<3,>=2.13
23
23
  Requires-Dist: pyyaml<7,>=6
@@ -207,12 +207,13 @@ Use Mammoth Analytics only through the `mammoth` CLI in bash; run
207
207
  `export MAMMOTH_OUTPUT=json MAMMOTH_NO_INPUT=1` once. Onboard me first:
208
208
  1. If `mammoth --version` fails, install, then re-check (new shell if needed):
209
209
  curl -fsSL https://raw.githubusercontent.com/EdgeMetric/mammothsdk/main/mammoth-cli/installers/mammoth-install.sh | bash
210
- 2. Run `mammoth auth status`. If it shows no credentials, print exactly this
211
- and wait until I say done: "In the Mammoth web app open Workspace settings
212
- → API Tokens → Create token, copy the key and the secret (shown once), and
213
- note the workspace id (the number after /workspaces/ in the address bar),
214
- then run in your own terminal: mammoth auth login" — never ask for, read, or pass a key
215
- or secret yourself, and never run auth login.
210
+ 2. Run `mammoth auth status`. If it shows no credentials or a
211
+ `recommendation`, print exactly this and wait until I say done: "In the
212
+ Mammoth web app open Workspace settings → API Tokens → Create token (no
213
+ project, so I can create projects), copy the token (it starts with mm_ and
214
+ is shown once), and note the workspace id (the number after /workspaces/
215
+ in the address bar), then run in your own terminal: mammoth auth login" —
216
+ never ask for, read, or pass the token yourself, and never run auth login.
216
217
  3. Require `mammoth doctor` to pass, then run `mammoth skill show` and
217
218
  follow the guide it prints.
218
219
  Work inside `mammoth project ensure 'PROJECT NAME'` unless I name a project;
@@ -265,7 +266,7 @@ The full generated list is in [docs/reference/commands.md](https://github.com/Ed
265
266
  |---|---|
266
267
  | [Installation](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/installation.md) | Install the CLI and the agent skill. |
267
268
  | [Quick start](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/quickstart.md) | Log in and run your first commands. |
268
- | [Authentication](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/authentication.md) | Getting an API key, login, profiles, projects. |
269
+ | [Authentication](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/authentication.md) | Getting an API token, login, profiles, projects. |
269
270
  | [Agent handover and operation](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/agents.md) | Cold start, discovery, checkpoints, recovery. |
270
271
  | [Portable handoff format](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/agent-handoff.md) | Nonsecret checkpoint schema and receiving procedure. |
271
272
  | [Bundled agent skill](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/mammoth_cli/bundled_skill/mammoth-cli/SKILL.md) | Focused routing for shell-capable agents. |
@@ -179,12 +179,13 @@ Use Mammoth Analytics only through the `mammoth` CLI in bash; run
179
179
  `export MAMMOTH_OUTPUT=json MAMMOTH_NO_INPUT=1` once. Onboard me first:
180
180
  1. If `mammoth --version` fails, install, then re-check (new shell if needed):
181
181
  curl -fsSL https://raw.githubusercontent.com/EdgeMetric/mammothsdk/main/mammoth-cli/installers/mammoth-install.sh | bash
182
- 2. Run `mammoth auth status`. If it shows no credentials, print exactly this
183
- and wait until I say done: "In the Mammoth web app open Workspace settings
184
- → API Tokens → Create token, copy the key and the secret (shown once), and
185
- note the workspace id (the number after /workspaces/ in the address bar),
186
- then run in your own terminal: mammoth auth login" — never ask for, read, or pass a key
187
- or secret yourself, and never run auth login.
182
+ 2. Run `mammoth auth status`. If it shows no credentials or a
183
+ `recommendation`, print exactly this and wait until I say done: "In the
184
+ Mammoth web app open Workspace settings → API Tokens → Create token (no
185
+ project, so I can create projects), copy the token (it starts with mm_ and
186
+ is shown once), and note the workspace id (the number after /workspaces/
187
+ in the address bar), then run in your own terminal: mammoth auth login" —
188
+ never ask for, read, or pass the token yourself, and never run auth login.
188
189
  3. Require `mammoth doctor` to pass, then run `mammoth skill show` and
189
190
  follow the guide it prints.
190
191
  Work inside `mammoth project ensure 'PROJECT NAME'` unless I name a project;
@@ -237,7 +238,7 @@ The full generated list is in [docs/reference/commands.md](https://github.com/Ed
237
238
  |---|---|
238
239
  | [Installation](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/installation.md) | Install the CLI and the agent skill. |
239
240
  | [Quick start](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/quickstart.md) | Log in and run your first commands. |
240
- | [Authentication](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/authentication.md) | Getting an API key, login, profiles, projects. |
241
+ | [Authentication](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/authentication.md) | Getting an API token, login, profiles, projects. |
241
242
  | [Agent handover and operation](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/agents.md) | Cold start, discovery, checkpoints, recovery. |
242
243
  | [Portable handoff format](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/agent-handoff.md) | Nonsecret checkpoint schema and receiving procedure. |
243
244
  | [Bundled agent skill](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/mammoth_cli/bundled_skill/mammoth-cli/SKILL.md) | Focused routing for shell-capable agents. |
@@ -6,7 +6,7 @@ not implement a second HTTP client and does not call private SDK members.
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
- __version__ = "2.0.35"
9
+ __version__ = "2.0.36"
10
10
 
11
11
  # The versioned machine output envelope contract.
12
12
  SCHEMA_VERSION = 1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mammoth-cli
3
- version: 2.0.35
3
+ version: 2.0.36
4
4
  description: "Use Mammoth Analytics from a terminal: install or authenticate the CLI, discover its live command contract, and safely manage projects, data, views, pipelines, dashboards, exports, and handoffs."
5
5
  ---
6
6
 
@@ -23,7 +23,7 @@ task names it, and check `meta.profile`/`auth status` `endpoint` match the
23
23
  intended environment before doing anything. If no profile has credentials,
24
24
  tell the operator to run `mammoth auth login` in their own terminal (add
25
25
  `--profile NAME` only for a profile other than `default`; [auth](references/auth.md)
26
- says where the key and secret come from) and wait; never ask for a key or secret in chat,
26
+ says where the token comes from) and wait; never ask for the token in chat,
27
27
  never read one from a file or environment variable, never run `auth login`
28
28
  yourself. If any envelope carries `meta.update_available`, run its `command`
29
29
  before the next step.
@@ -1,7 +1,16 @@
1
1
  # Authentication and profiles
2
2
 
3
- Required: API key, API secret, workspace id. Optional: a one-label server
4
- prefix (default `app`, resolving to `https://app.mammoth.io/api/v2`).
3
+ Required: an API token (`mm_...`) and a workspace id. Optional: a one-label
4
+ server prefix (default `app`, resolving to `https://app.mammoth.io/api/v2`).
5
+ Login accepts nothing else. If `auth status` reports `credential: key_secret`
6
+ (a profile saved by an older CLI), it still works, but ask the operator to run
7
+ `mammoth auth login` again with a token.
8
+
9
+ A token may be limited to one project. It then gets HTTP 403
10
+ `authorization_required` in every other project, including a project it has
11
+ created. When that happens, stop creating projects: ask the operator which
12
+ project the token belongs to and pass `--project ID`, or ask for a token
13
+ created without a project.
5
14
 
6
15
  ## Precedence
7
16
  1. Explicit login handed to the current command (secure prompt or `--input`).
@@ -13,14 +22,14 @@ history, or unrelated files for them.
13
22
 
14
23
  ## How an agent obtains credentials
15
24
 
16
- An agent never receives the key or secret. When `auth status` reports a
25
+ An agent never receives the token. When `auth status` reports a
17
26
  missing profile or `has_credentials=false`, stop and hand the login to the
18
27
  human operator:
19
28
 
20
29
  1. Tell the operator where the credentials come from: in the Mammoth web app,
21
- **Workspace settings → API Tokens → Create token** gives a key and a secret;
22
- the web app shows the secret only once (on an existing token, **Generate new
23
- secret** replaces it). The workspace id is the number after `/workspaces/`
30
+ **Workspace settings → API Tokens → Create token** gives a token that
31
+ starts with `mm_`; the web app shows it only once (if it is lost, create a
32
+ new one). The workspace id is the number after `/workspaces/`
24
33
  in the web app's address bar. Then give the exact command to run in
25
34
  **their own** terminal. For production it is:
26
35
 
@@ -30,9 +39,9 @@ human operator:
30
39
 
31
40
  Add `--server-prefix release` only when the task names the release
32
41
  environment, and `--profile NAME` only when the operator wants a profile
33
- other than `default`. The command prompts for the key and secret with
34
- hidden input, then the workspace id, so no secret enters chat, argv, or
35
- history. Credentials are per environment: a release key never
42
+ other than `default`. The command prompts for the token with hidden
43
+ input, then the workspace id, so no secret enters chat, argv, or history.
44
+ Tokens are per environment and per workspace: a release token never
36
45
  authenticates on `app`.
37
46
  On macOS the Keychain may show a dialog about `mammoth-cli`; tell the
38
47
  operator to choose **Always Allow**. If the keychain cannot be used (for
@@ -41,12 +50,11 @@ human operator:
41
50
  2. Wait for the operator to confirm, then re-run
42
51
  `mammoth auth status --profile PROFILE` and
43
52
  `mammoth doctor --profile PROFILE`.
44
- 3. Do not ask the operator to paste the key or secret into chat. Do not run
53
+ 3. Do not ask the operator to paste the token into chat. Do not run
45
54
  `auth login` yourself, with or without `--input`, unless the operator has
46
55
  explicitly given you a protected `0600` credential file path to use.
47
56
 
48
- The only supported configuration is the API key, API secret, workspace id, and
49
- an optional one-label server prefix (default `app`). There is no base-url
57
+ The only supported configuration is the API token, the workspace id, and an optional one-label server prefix (default `app`). There is no base-url
50
58
  override.
51
59
 
52
60
  ## Cold-start sequence
@@ -107,8 +115,7 @@ authorization failure. When using the selected profile, `--profile PROFILE`
107
115
  may be omitted.
108
116
 
109
117
  For an ordinary human-operated terminal, prefer the first command: it asks
110
- for the key and secret without putting either in shell history, argv, chat, or
111
- logs. For headless POSIX work, create the JSON file outside the repository, set
118
+ for the token without putting it in shell history, argv, chat, or logs. For headless POSIX work, create the JSON file outside the repository, set
112
119
  its permissions to `0600`, and pass only its path. With a protected POSIX file,
113
120
  specify `--storage file` explicitly; `--storage auto` can require an available
114
121
  OS keyring and is not a reliable headless fallback. On Windows, do not use the
@@ -116,8 +123,8 @@ file backend as a secret store; use the OS keyring or stop and obtain a
116
123
  supported secure store. Remove any input file after the
117
124
  profile is stored.
118
125
 
119
- `creds.json` is a `0600` JSON file: `{"api_key": "...", "api_secret": "...",
120
- "workspace_id": 4, "server_prefix": "app"}` (`server_prefix` optional). You can
126
+ `creds.json` is a `0600` JSON file: `{"api_token": "mm_...", "workspace_id": 4,
127
+ "server_prefix": "app"}` (`server_prefix` optional). You can
121
128
  also pipe it with `--input - --input-format json`.
122
129
 
123
130
  Secrets live in the OS keyring (or an explicitly selected `0600` file
@@ -24,7 +24,7 @@ workspace/project scope. Then add:
24
24
  - completed actions and remaining objectives;
25
25
  - a cleanup owner plus dependency order.
26
26
 
27
- Never include API keys, API secrets, tokens, headers, credentials files, raw
27
+ Never include API tokens, headers, credentials files, raw
28
28
  secret-bearing input, or unredacted response bodies. IDs and display names are
29
29
  safe only when needed to identify the authorized task.
30
30
 
@@ -1,11 +1,10 @@
1
1
  """Bespoke `auth` command family: login, status, logout.
2
2
 
3
- Authentication has exactly three required inputs (API key, API secret,
4
- workspace id) and one optional input (server prefix, default ``app``).
5
- Authentication always requires a login; there is no environment credential
6
- path. These commands never accept a secret as an ordinary command-line value:
7
- the API key and secret come from a hidden TTY prompt or a permission-checked
8
- JSON/YAML login document read through the shared ``--input`` option.
3
+ Authentication needs an API token (``mm_...``, sent as ``Authorization:
4
+ Bearer``) and a workspace id, plus an optional server prefix (default
5
+ ``app``). There is no environment credential path. These commands never accept a secret as an
6
+ ordinary command-line value: it comes from a hidden TTY prompt or a
7
+ permission-checked JSON/YAML login document read through ``--input``.
9
8
  """
10
9
 
11
10
  from __future__ import annotations
@@ -128,6 +127,11 @@ def _validate_login_document(document: dict[str, Any]) -> LoginRequest:
128
127
  code="invalid_login_document",
129
128
  message="The login request document failed validation.",
130
129
  exit_status=EXIT_USAGE,
130
+ hint=(
131
+ 'Expected {"api_token": "mm_...", "workspace_id": N} with an optional '
132
+ '"server_prefix". API key + secret pairs are no longer accepted; create '
133
+ "a token in Workspace settings -> API Tokens."
134
+ ),
131
135
  details={"errors": errors},
132
136
  ) from exc
133
137
 
@@ -160,6 +164,38 @@ def _prompt_secret(label: str) -> str:
160
164
  return str(value)
161
165
 
162
166
 
167
+ TOKEN_PREFIX = "mm_" # noqa: S105 - a public prefix, not a credential
168
+ # A token is ``mm_`` + 43 url-safe characters. Its public id (``app_key``) is
169
+ # ``mm_`` + 16 hex characters and cannot authenticate: catch that paste early.
170
+ _APP_KEY_LENGTH = 19
171
+
172
+
173
+ def _check_token_shape(token: str) -> None:
174
+ """Reject a value that cannot be an API token before any network call."""
175
+ if not token.startswith(TOKEN_PREFIX):
176
+ raise CliError(
177
+ code="invalid_credentials",
178
+ message="That is not a Mammoth API token (tokens start with mm_).",
179
+ exit_status=EXIT_USAGE,
180
+ hint=(
181
+ "Create a token in Workspace settings -> API Tokens and paste the value "
182
+ "shown once (mm_ followed by about 43 characters). API key + secret "
183
+ "pairs are no longer accepted at login."
184
+ ),
185
+ )
186
+ if len(token) <= _APP_KEY_LENGTH:
187
+ raise CliError(
188
+ code="invalid_credentials",
189
+ message="That looks like the token's id (app key), not the token.",
190
+ exit_status=EXIT_USAGE,
191
+ hint=(
192
+ "Use the token shown once when it was created (mm_ followed by about "
193
+ "43 characters). If it is lost, create a new token in Workspace "
194
+ "settings -> API Tokens."
195
+ ),
196
+ )
197
+
198
+
163
199
  def _prompt_blockers(invocation: Invocation) -> list[str]:
164
200
  """Reasons this invocation cannot interactively prompt, in report order.
165
201
 
@@ -208,15 +244,16 @@ def _run_login(
208
244
  document = load_input_document(invocation.input_file, invocation.input_format)
209
245
  assert document is not None
210
246
  request = _validate_login_document(document)
211
- api_key, api_secret = request.api_key, request.api_secret
247
+ api_token = request.api_token.strip()
248
+ _check_token_shape(api_token)
212
249
  effective_workspace = request.workspace_id
213
250
  effective_prefix = server_prefix if server_prefix is not None else request.server_prefix
214
251
  elif not blockers:
215
- # Two flows, nothing else: a terminal prompts for everything (key,
216
- # secret, then workspace id), and non-interactive uses --input. The
217
- # workspace is asked last, after the credentials.
218
- api_key = _prompt_secret("API key")
219
- api_secret = _prompt_secret("API secret")
252
+ # Two flows, nothing else: a terminal prompts for everything (token,
253
+ # then workspace id), and non-interactive uses --input. The workspace
254
+ # is asked last, after the credential.
255
+ api_token = _prompt_secret("API token")
256
+ _check_token_shape(api_token)
220
257
  effective_workspace = typer.prompt("Workspace id", type=int)
221
258
  effective_prefix = server_prefix
222
259
  else:
@@ -238,20 +275,14 @@ def _run_login(
238
275
  message="A positive --workspace id is required.",
239
276
  exit_status=EXIT_USAGE,
240
277
  )
241
- if not api_key or not api_secret:
242
- raise CliError(
243
- code="invalid_credentials",
244
- message="The API key and secret must be non-empty.",
245
- exit_status=EXIT_USAGE,
246
- )
247
-
248
278
  resolved_base_url = resolve_base_url(effective_prefix)
249
279
 
250
280
  resolved_auth = ResolvedAuth(
251
- api_key=api_key,
252
- api_secret=api_secret,
281
+ api_key=None,
282
+ api_secret=None,
253
283
  workspace_id=effective_workspace,
254
284
  base_url=resolved_base_url,
285
+ api_token=api_token,
255
286
  )
256
287
  service = service_factory.build_service(resolved_auth, timeout=invocation.timeout)
257
288
  try:
@@ -266,20 +297,17 @@ def _run_login(
266
297
  **exc.details,
267
298
  "endpoint_base_url": resolved_base_url,
268
299
  "workspace_id": effective_workspace,
269
- # Receipts only (length and last four characters). The output
270
- # layer redacts any key that looks like a credential, so these
271
- # are named for what they are: descriptions, not values.
272
- "credential_receipt": {
273
- "key": _masked_receipt(api_key),
274
- "second_value_length": len(api_secret),
275
- },
300
+ # A receipt only (length and last four characters). The output
301
+ # layer redacts any key that looks like a credential, so this
302
+ # is named for what it is: a description, not the value.
303
+ "credential_receipt": {"type": "api token", "shape": _masked_receipt(api_token)},
276
304
  }
277
305
  exc.hint = (
278
- f"{resolved_base_url} rejected this key/secret for workspace "
279
- f"{effective_workspace}. Credentials are per environment: a key issued on "
280
- "one Mammoth server does not authenticate on another. Check the key, the "
281
- "secret, the workspace id, and that --server-prefix matches where the key "
282
- "was issued."
306
+ f"{resolved_base_url} rejected this token for workspace "
307
+ f"{effective_workspace}. Credentials are per environment and per workspace: "
308
+ "a token issued on one Mammoth server or workspace does not authenticate on "
309
+ "another. Check the token, the workspace id, and that --server-prefix "
310
+ "matches where it was issued."
283
311
  )
284
312
  raise
285
313
  finally:
@@ -300,10 +328,9 @@ def _run_login(
300
328
  profiles.save_profile(record, select=True)
301
329
  storage_used = credentials.store_credentials(
302
330
  profile_name,
303
- api_key,
304
- api_secret,
305
331
  storage=cast(credentials.StorageMode, storage),
306
332
  interactive=not blockers,
333
+ api_token=api_token,
307
334
  )
308
335
 
309
336
  data = {
@@ -311,6 +338,7 @@ def _run_login(
311
338
  "workspace_id": effective_workspace,
312
339
  "base_url": resolved_base_url,
313
340
  "storage": storage_used,
341
+ "credential": "token",
314
342
  }
315
343
  return data, {"profile": profile_name, "workspace_id": effective_workspace}
316
344
 
@@ -337,8 +365,9 @@ def auth_login(
337
365
  ) -> None:
338
366
  """Log in and store one profile's credentials.
339
367
 
340
- Prompts for the API key and secret in a terminal. For non-interactive use
341
- (agents, CI), pass ``--input FILE`` with a login document instead.
368
+ Prompts for the API token (mm_..., from Workspace settings -> API Tokens)
369
+ and the workspace id in a terminal. For non-interactive use (agents, CI), pass
370
+ ``--input FILE`` with {"api_token": ..., "workspace_id": ...} instead.
342
371
  Performs a lightweight connection check before saving anything; a failed
343
372
  check leaves existing profile state unchanged.
344
373
  """
@@ -382,7 +411,8 @@ def _run_status(invocation: Invocation, *, check: bool) -> tuple[dict[str, Any],
382
411
  """Report local (or, with `--check`, live) authentication state."""
383
412
  profile_name = invocation.profile or profiles.get_selected()
384
413
  record = profiles.get_profile(profile_name)
385
- has_creds = credentials.has_credentials(profile_name)
414
+ credential = credentials.load_credential(profile_name)
415
+ has_creds = credential is not None
386
416
 
387
417
  if record is not None:
388
418
  endpoint = resolve_base_url(record.server_prefix)
@@ -396,9 +426,15 @@ def _run_status(invocation: Invocation, *, check: bool) -> tuple[dict[str, Any],
396
426
  "workspace_id": workspace_id,
397
427
  "endpoint": endpoint,
398
428
  "has_credentials": has_creds,
429
+ "credential": credential.kind if credential is not None else None,
399
430
  "checked": False,
400
431
  "connected": None,
401
432
  }
433
+ if credential is not None and credential.kind == "key_secret":
434
+ data["recommendation"] = (
435
+ "This profile uses a legacy API key + secret. Create an API token in "
436
+ "Workspace settings -> API Tokens and run 'mammoth auth login' again."
437
+ )
402
438
 
403
439
  if check:
404
440
  auth = resolve_auth(invocation)
@@ -214,18 +214,19 @@ def doctor(invocation: Invocation) -> HandlerResult:
214
214
  )
215
215
  )
216
216
  keyring_error: str | None = None
217
+ legacy_credential = False
217
218
  try:
218
- creds_present = credentials.has_credentials(profile_name)
219
+ stored = credentials.load_credential(profile_name)
220
+ creds_present = stored is not None
221
+ legacy_credential = stored is not None and stored.kind == "key_secret"
219
222
  except CliError as error:
220
223
  creds_present = False
221
224
  keyring_error = error.code
222
- checks.append(
223
- _check(
224
- "credentials",
225
- creds_present,
226
- keyring_error or ("credentials present" if creds_present else "none stored"),
227
- )
228
- )
225
+ if legacy_credential:
226
+ creds_detail = "legacy API key + secret stored; log in again with an API token"
227
+ else:
228
+ creds_detail = "api token present" if creds_present else "none stored"
229
+ checks.append(_check("credentials", creds_present, keyring_error or creds_detail))
229
230
 
230
231
  endpoint_detail = "unresolved"
231
232
  auth_ok = False
@@ -303,7 +304,7 @@ def doctor(invocation: Invocation) -> HandlerResult:
303
304
  )
304
305
 
305
306
  recommendations: list[str] = []
306
- if record is None or not creds_present:
307
+ if record is None or not creds_present or legacy_credential:
307
308
  login_profile = f" --profile {shlex.quote(profile_name)}" if profile_name else ""
308
309
  login_storage = " --storage file" if keyring_error else ""
309
310
  recommendations.append(f"mammoth auth login{login_profile}{login_storage}")