mammoth-cli 1.0.3__tar.gz → 1.0.4__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 (151) hide show
  1. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/PKG-INFO +1 -1
  2. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/__init__.py +1 -1
  3. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/auth.py +38 -20
  4. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/pyproject.toml +1 -1
  5. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/LICENSE +0 -0
  6. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/README.md +0 -0
  7. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/__main__.py +0 -0
  8. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/app.py +0 -0
  9. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/SKILL.md +0 -0
  10. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/auth.md +0 -0
  11. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/input.md +0 -0
  12. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/jobs-drafts.md +0 -0
  13. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/machine-output.md +0 -0
  14. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/recovery.md +0 -0
  15. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/safety.md +0 -0
  16. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/__init__.py +0 -0
  17. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/activity.py +0 -0
  18. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/addon.py +0 -0
  19. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/agent.py +0 -0
  20. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/ai.py +0 -0
  21. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/annotation.py +0 -0
  22. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/automation.py +0 -0
  23. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/batch.py +0 -0
  24. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/billing.py +0 -0
  25. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/browse.py +0 -0
  26. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/capability.py +0 -0
  27. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/client_app.py +0 -0
  28. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/completion.py +0 -0
  29. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/config.py +0 -0
  30. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/connector.py +0 -0
  31. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/context.py +0 -0
  32. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/dashboard.py +0 -0
  33. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/data_app.py +0 -0
  34. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/dataset.py +0 -0
  35. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/doctor.py +0 -0
  36. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/external_key.py +0 -0
  37. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/file.py +0 -0
  38. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/folder.py +0 -0
  39. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/job.py +0 -0
  40. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/notification.py +0 -0
  41. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/parameter.py +0 -0
  42. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/project.py +0 -0
  43. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/registry.py +0 -0
  44. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/report.py +0 -0
  45. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/schedule.py +0 -0
  46. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/schema.py +0 -0
  47. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/skill.py +0 -0
  48. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/snippet.py +0 -0
  49. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/support.py +0 -0
  50. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/template.py +0 -0
  51. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/trash.py +0 -0
  52. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/upgrade.py +0 -0
  53. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/user.py +0 -0
  54. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/view.py +0 -0
  55. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/view_ops.py +0 -0
  56. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/webhook.py +0 -0
  57. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/workflow.py +0 -0
  58. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/commands/workspace.py +0 -0
  59. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/context/__init__.py +0 -0
  60. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/context/credentials.py +0 -0
  61. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/context/endpoint.py +0 -0
  62. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/context/profiles.py +0 -0
  63. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/context/resolver.py +0 -0
  64. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/contracts/__init__.py +0 -0
  65. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/contracts/auth.py +0 -0
  66. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/errors/__init__.py +0 -0
  67. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/errors/envelope.py +0 -0
  68. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/manifest/__init__.py +0 -0
  69. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/manifest/loader.py +0 -0
  70. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/messages/__init__.py +0 -0
  71. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/output/__init__.py +0 -0
  72. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/output/envelope.py +0 -0
  73. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/output/normalize.py +0 -0
  74. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/output/policy.py +0 -0
  75. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/output/render.py +0 -0
  76. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/py.typed +0 -0
  77. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/runtime/__init__.py +0 -0
  78. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/runtime/confirm.py +0 -0
  79. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/runtime/executor.py +0 -0
  80. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/runtime/input_loader.py +0 -0
  81. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/runtime/invocation.py +0 -0
  82. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/runtime/options.py +0 -0
  83. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/runtime/session.py +0 -0
  84. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/runtime/strict.py +0 -0
  85. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/runtime/validate.py +0 -0
  86. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/__init__.py +0 -0
  87. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/argspec.py +0 -0
  88. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/coerce.py +0 -0
  89. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/conditions.py +0 -0
  90. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/dispatch.py +0 -0
  91. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/factory.py +0 -0
  92. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/input_fields.py +0 -0
  93. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/mapping.py +0 -0
  94. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/openapi_types.py +0 -0
  95. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/positionals.py +0 -0
  96. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/protocol.py +0 -0
  97. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/sdk_service.py +0 -0
  98. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/testing.py +0 -0
  99. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/services/type_system.py +0 -0
  100. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/skills/__init__.py +0 -0
  101. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/skills/installer.py +0 -0
  102. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/mammoth_cli/testing.py +0 -0
  103. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/_sdk_introspection.json +0 -0
  104. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/activity.yaml +0 -0
  105. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/addon.yaml +0 -0
  106. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/agent.yaml +0 -0
  107. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/ai.yaml +0 -0
  108. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/annotation.yaml +0 -0
  109. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/auth.yaml +0 -0
  110. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/automation.yaml +0 -0
  111. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/batch.yaml +0 -0
  112. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/billing.yaml +0 -0
  113. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/browse.yaml +0 -0
  114. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/capability.yaml +0 -0
  115. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/client-app.yaml +0 -0
  116. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/completion.yaml +0 -0
  117. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/config.yaml +0 -0
  118. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/connector.yaml +0 -0
  119. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/context.yaml +0 -0
  120. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/dashboard.yaml +0 -0
  121. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/data-app.yaml +0 -0
  122. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/dataset.yaml +0 -0
  123. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/doctor.yaml +0 -0
  124. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/external-key.yaml +0 -0
  125. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/file.yaml +0 -0
  126. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/folder.yaml +0 -0
  127. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/job.yaml +0 -0
  128. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/notification.yaml +0 -0
  129. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/parameter.yaml +0 -0
  130. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/project.yaml +0 -0
  131. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/report.yaml +0 -0
  132. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/schedule.yaml +0 -0
  133. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/schema.yaml +0 -0
  134. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/skill.yaml +0 -0
  135. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/snippet.yaml +0 -0
  136. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/support.yaml +0 -0
  137. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/template.yaml +0 -0
  138. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/trash.yaml +0 -0
  139. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/upgrade.yaml +0 -0
  140. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/user.yaml +0 -0
  141. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/version.yaml +0 -0
  142. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/view.yaml +0 -0
  143. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/webhook.yaml +0 -0
  144. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/workflow.yaml +0 -0
  145. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/commands/workspace.yaml +0 -0
  146. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/openapi-operations.yaml +0 -0
  147. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/schema-v1.json +0 -0
  148. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/sdk-catalog.source.yaml +0 -0
  149. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/manifests/sdk-methods.yaml +0 -0
  150. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/openapi/metadata.json +0 -0
  151. {mammoth_cli-1.0.3 → mammoth_cli-1.0.4}/spec/openapi/openapi.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mammoth-cli
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: Command-line interface for the Mammoth Analytics platform
5
5
  License: Proprietary
6
6
  License-File: LICENSE
@@ -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__ = "1.0.3"
9
+ __version__ = "1.0.4"
10
10
 
11
11
  # The versioned machine output envelope contract.
12
12
  SCHEMA_VERSION = 1
@@ -38,7 +38,7 @@ from mammoth_cli.errors.envelope import (
38
38
  EXIT_USAGE,
39
39
  CliError,
40
40
  )
41
- from mammoth_cli.output.policy import resolve_policy
41
+ from mammoth_cli.output.policy import MACHINE_OUTPUTS
42
42
  from mammoth_cli.runtime import executor
43
43
  from mammoth_cli.runtime import options as go
44
44
  from mammoth_cli.runtime.invocation import Invocation
@@ -185,6 +185,27 @@ def _validate_login_document(document: dict[str, Any]) -> LoginRequest:
185
185
  ) from exc
186
186
 
187
187
 
188
+ def _prompt_blockers(invocation: Invocation) -> list[str]:
189
+ """Reasons this invocation cannot interactively prompt, in report order.
190
+
191
+ Mirrors the ``can_prompt`` rule used by
192
+ :func:`mammoth_cli.runtime.confirm.enforce_confirmation` — a real TTY,
193
+ without ``--no-input`` and not a machine output format. A genuine
194
+ interactive terminal is ground truth for "a human is present," so it
195
+ intentionally does NOT consult the ``CI``/``TERM=dumb`` heuristic: those
196
+ only proxy for the absence of a human, which a real TTY disproves. Returns
197
+ an empty list when prompting is possible.
198
+ """
199
+ reasons: list[str] = []
200
+ if not sys.stdin.isatty():
201
+ reasons.append("stdin is not an interactive terminal")
202
+ if invocation.no_input:
203
+ reasons.append("--no-input is set")
204
+ if invocation.output in MACHINE_OUTPUTS:
205
+ reasons.append(f"--output {invocation.output} is a machine format")
206
+ return reasons
207
+
208
+
188
209
  def _run_login(
189
210
  invocation: Invocation,
190
211
  *,
@@ -201,13 +222,7 @@ def _run_login(
201
222
  hint=f"Use one of: {', '.join(_STORAGE_MODES)}.",
202
223
  )
203
224
 
204
- policy = resolve_policy(
205
- output=invocation.output,
206
- no_input=invocation.no_input,
207
- no_progress=invocation.no_progress,
208
- is_tty=sys.stdin.isatty(),
209
- color=invocation.color,
210
- )
225
+ blockers = _prompt_blockers(invocation)
211
226
 
212
227
  effective_workspace: int | None
213
228
  if invocation.input_file is not None:
@@ -216,7 +231,7 @@ def _run_login(
216
231
  api_key, api_secret = request.api_key, request.api_secret
217
232
  effective_workspace = workspace if workspace is not None else request.workspace_id
218
233
  effective_prefix = server_prefix if server_prefix is not None else request.server_prefix
219
- elif not policy.prompts_disabled:
234
+ elif not blockers:
220
235
  api_key = typer.prompt("API key", hide_input=True)
221
236
  api_secret = typer.prompt("API secret", hide_input=True)
222
237
  effective_workspace = workspace
@@ -226,7 +241,12 @@ def _run_login(
226
241
  code="login_input_required",
227
242
  message="Non-interactive login requires --input.",
228
243
  exit_status=EXIT_USAGE,
229
- hint="Pass --input FILE|- (with --input-format for stdin), or run in a terminal.",
244
+ hint=(
245
+ "Interactive prompting is off because "
246
+ + "; ".join(blockers)
247
+ + ". Pass --input FILE|- (with --input-format for stdin), "
248
+ "or run in an interactive terminal."
249
+ ),
230
250
  )
231
251
 
232
252
  if effective_workspace is None or effective_workspace <= 0:
@@ -271,7 +291,7 @@ def _run_login(
271
291
  api_key,
272
292
  api_secret,
273
293
  storage=cast(credentials.StorageMode, storage),
274
- interactive=not policy.prompts_disabled,
294
+ interactive=not blockers,
275
295
  )
276
296
  profiles.set_selected(profile_name)
277
297
 
@@ -431,20 +451,18 @@ def _run_logout(
431
451
  exit_status=EXIT_USAGE,
432
452
  )
433
453
 
434
- policy = resolve_policy(
435
- output=invocation.output,
436
- no_input=invocation.no_input,
437
- no_progress=invocation.no_progress,
438
- is_tty=sys.stdin.isatty(),
439
- color=invocation.color,
440
- )
441
454
  if not yes:
442
- if policy.prompts_disabled:
455
+ blockers = _prompt_blockers(invocation)
456
+ if blockers:
443
457
  raise CliError(
444
458
  code=CODE_CONFIRMATION_REQUIRED,
445
459
  message="auth logout requires --yes in non-interactive mode.",
446
460
  exit_status=EXIT_USAGE,
447
- hint="Re-run with --yes.",
461
+ hint=(
462
+ "Interactive confirmation is off because "
463
+ + "; ".join(blockers)
464
+ + ". Re-run with --yes, or run in an interactive terminal."
465
+ ),
448
466
  )
449
467
  if not typer.confirm("Remove the stored credentials?", default=False):
450
468
  raise CliError(
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "mammoth-cli"
3
- version = "1.0.3"
3
+ version = "1.0.4"
4
4
  description = "Command-line interface for the Mammoth Analytics platform"
5
5
  authors = ["Mammoth Analytics <support@mammoth.io>"]
6
6
  readme = "README.md"
File without changes
File without changes