mammoth-cli 1.0.2__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.
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/PKG-INFO +1 -1
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/__init__.py +1 -1
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/auth.py +38 -20
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/positionals.py +29 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/pyproject.toml +1 -1
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/automation.yaml +9 -3
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/client-app.yaml +8 -2
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/dashboard.yaml +8 -3
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/folder.yaml +8 -2
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/parameter.yaml +17 -5
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/snippet.yaml +9 -3
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/webhook.yaml +8 -2
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/workflow.yaml +8 -2
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/LICENSE +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/README.md +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/__main__.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/app.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/SKILL.md +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/auth.md +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/input.md +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/jobs-drafts.md +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/machine-output.md +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/recovery.md +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/safety.md +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/__init__.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/activity.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/addon.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/agent.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/ai.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/annotation.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/automation.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/batch.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/billing.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/browse.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/capability.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/client_app.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/completion.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/config.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/connector.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/context.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/dashboard.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/data_app.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/dataset.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/doctor.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/external_key.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/file.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/folder.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/job.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/notification.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/parameter.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/project.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/registry.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/report.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/schedule.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/schema.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/skill.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/snippet.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/support.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/template.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/trash.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/upgrade.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/user.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/view.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/view_ops.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/webhook.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/workflow.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/commands/workspace.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/context/__init__.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/context/credentials.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/context/endpoint.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/context/profiles.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/context/resolver.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/contracts/__init__.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/contracts/auth.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/errors/__init__.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/errors/envelope.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/manifest/__init__.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/manifest/loader.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/messages/__init__.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/output/__init__.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/output/envelope.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/output/normalize.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/output/policy.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/output/render.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/py.typed +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/runtime/__init__.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/runtime/confirm.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/runtime/executor.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/runtime/input_loader.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/runtime/invocation.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/runtime/options.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/runtime/session.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/runtime/strict.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/runtime/validate.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/__init__.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/argspec.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/coerce.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/conditions.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/dispatch.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/factory.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/input_fields.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/mapping.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/openapi_types.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/protocol.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/sdk_service.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/testing.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/services/type_system.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/skills/__init__.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/skills/installer.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/testing.py +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/_sdk_introspection.json +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/activity.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/addon.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/agent.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/ai.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/annotation.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/auth.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/batch.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/billing.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/browse.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/capability.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/completion.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/config.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/connector.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/context.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/data-app.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/dataset.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/doctor.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/external-key.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/file.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/job.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/notification.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/project.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/report.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/schedule.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/schema.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/skill.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/support.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/template.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/trash.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/upgrade.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/user.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/version.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/view.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/commands/workspace.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/openapi-operations.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/schema-v1.json +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/sdk-catalog.source.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/manifests/sdk-methods.yaml +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/openapi/metadata.json +0 -0
- {mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/spec/openapi/openapi.json +0 -0
|
@@ -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
|
|
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
|
-
|
|
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
|
|
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=
|
|
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
|
|
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
|
-
|
|
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=
|
|
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(
|
|
@@ -226,6 +226,35 @@ POSITIONAL_OVERRIDES: dict[str, tuple[PositionalSpec, ...]] = {
|
|
|
226
226
|
("support.user.update", "email", "Email of the user to update"),
|
|
227
227
|
)
|
|
228
228
|
},
|
|
229
|
+
# These ``create`` verbs take their identifying name (or ``intent``) as a
|
|
230
|
+
# positional OR the matching ``--input`` field: each handler reads
|
|
231
|
+
# ``extra_args[0] or document.get(<field>)``. Without a registered optional
|
|
232
|
+
# positional the strict validator rejects the positional form outright, so
|
|
233
|
+
# only the ``--input`` form is invokable and the documented dual-sourcing is
|
|
234
|
+
# a half promise. Author an optional locator that falls back to the field --
|
|
235
|
+
# the same shape as ``project create``.
|
|
236
|
+
**{
|
|
237
|
+
command: (
|
|
238
|
+
PositionalSpec(
|
|
239
|
+
name=field,
|
|
240
|
+
type=str,
|
|
241
|
+
required=False,
|
|
242
|
+
help=f"{label}; or pass it via the '{field}' input field.",
|
|
243
|
+
falls_back_to_field=field,
|
|
244
|
+
),
|
|
245
|
+
)
|
|
246
|
+
for command, field, label in (
|
|
247
|
+
("automation.create", "name", "Name of the new automation"),
|
|
248
|
+
("client-app.create", "app_name", "Name of the new client app"),
|
|
249
|
+
("dashboard.create", "intent", "Generation intent for the new dashboard"),
|
|
250
|
+
("folder.create", "name", "Name of the new folder"),
|
|
251
|
+
("parameter.create", "name", "Name of the new parameter"),
|
|
252
|
+
("parameter.group.create", "name", "Name of the new parameter group"),
|
|
253
|
+
("snippet.create", "name", "Name of the new snippet"),
|
|
254
|
+
("webhook.create", "name", "Name of the new webhook"),
|
|
255
|
+
("workflow.create", "name", "Name of the new workflow"),
|
|
256
|
+
)
|
|
257
|
+
},
|
|
229
258
|
# ``schema get`` / ``capability get`` are CLI-only discovery commands with no
|
|
230
259
|
# backing SDK signature (their ``sdk_symbol`` is a meta-reference), so the
|
|
231
260
|
# derivation emits nothing. Their handlers read the single id positionally
|
|
@@ -6,7 +6,13 @@ commands:
|
|
|
6
6
|
alias_of: null
|
|
7
7
|
operation_ids:
|
|
8
8
|
- CreateAutomation
|
|
9
|
-
positionals:
|
|
9
|
+
positionals:
|
|
10
|
+
- name: name
|
|
11
|
+
type: str
|
|
12
|
+
required: false
|
|
13
|
+
metavar: NAME
|
|
14
|
+
falls_back_to_field: name
|
|
15
|
+
help: Name of the new automation; or pass it via the 'name' input field.
|
|
10
16
|
options: []
|
|
11
17
|
sdk_symbol: mammoth.api.automations.AutomationsAPI.create
|
|
12
18
|
sdk_conversion: Call mammoth.api.automations.AutomationsAPI.create with validated request fields.
|
|
@@ -23,8 +29,8 @@ commands:
|
|
|
23
29
|
required_fixture_guard: null
|
|
24
30
|
secret_fields: []
|
|
25
31
|
human_example: mammoth automation create --help
|
|
26
|
-
agent_example: 'mammoth automation create --input ''{"
|
|
27
|
-
|
|
32
|
+
agent_example: 'mammoth automation create example --input ''{"description": "example", "tasks": [{"task_type":
|
|
33
|
+
"run_data_retrieval"}]}'' --output json --no-input'
|
|
28
34
|
unit_tests:
|
|
29
35
|
- UT-AUTOMATION-CREATE
|
|
30
36
|
contract_tests:
|
|
@@ -6,7 +6,13 @@ commands:
|
|
|
6
6
|
alias_of: null
|
|
7
7
|
operation_ids:
|
|
8
8
|
- CreateApp
|
|
9
|
-
positionals:
|
|
9
|
+
positionals:
|
|
10
|
+
- name: app_name
|
|
11
|
+
type: str
|
|
12
|
+
required: false
|
|
13
|
+
metavar: APP_NAME
|
|
14
|
+
falls_back_to_field: app_name
|
|
15
|
+
help: Name of the new client app; or pass it via the 'app_name' input field.
|
|
10
16
|
options: []
|
|
11
17
|
sdk_symbol: mammoth.api.clientapps.ClientAppsAPI.create
|
|
12
18
|
sdk_conversion: Call mammoth.api.clientapps.ClientAppsAPI.create with validated request fields.
|
|
@@ -23,7 +29,7 @@ commands:
|
|
|
23
29
|
required_fixture_guard: null
|
|
24
30
|
secret_fields: []
|
|
25
31
|
human_example: mammoth client-app create --help
|
|
26
|
-
agent_example:
|
|
32
|
+
agent_example: mammoth client-app create example --output json --no-input
|
|
27
33
|
unit_tests:
|
|
28
34
|
- UT-CLIENT-APP-CREATE
|
|
29
35
|
contract_tests:
|
|
@@ -487,7 +487,13 @@ commands:
|
|
|
487
487
|
alias_of: null
|
|
488
488
|
operation_ids:
|
|
489
489
|
- GenerateDashboard
|
|
490
|
-
positionals:
|
|
490
|
+
positionals:
|
|
491
|
+
- name: intent
|
|
492
|
+
type: str
|
|
493
|
+
required: false
|
|
494
|
+
metavar: INTENT
|
|
495
|
+
falls_back_to_field: intent
|
|
496
|
+
help: Generation intent for the new dashboard; or pass it via the 'intent' input field.
|
|
491
497
|
options: []
|
|
492
498
|
sdk_symbol: mammoth.api.dashboards.DashboardsAPI.create
|
|
493
499
|
sdk_conversion: Call mammoth.api.dashboards.DashboardsAPI.create with validated request fields.
|
|
@@ -505,8 +511,7 @@ commands:
|
|
|
505
511
|
required_fixture_guard: null
|
|
506
512
|
secret_fields: []
|
|
507
513
|
human_example: mammoth dashboard create --help
|
|
508
|
-
agent_example: 'mammoth dashboard create --input ''{"
|
|
509
|
-
--no-input'
|
|
514
|
+
agent_example: 'mammoth dashboard create example --input ''{"source": [1]}'' --output json --no-input'
|
|
510
515
|
unit_tests:
|
|
511
516
|
- UT-DASHBOARD-CREATE
|
|
512
517
|
contract_tests:
|
|
@@ -40,7 +40,13 @@ commands:
|
|
|
40
40
|
alias_of: null
|
|
41
41
|
operation_ids:
|
|
42
42
|
- CreateFolder
|
|
43
|
-
positionals:
|
|
43
|
+
positionals:
|
|
44
|
+
- name: name
|
|
45
|
+
type: str
|
|
46
|
+
required: false
|
|
47
|
+
metavar: NAME
|
|
48
|
+
falls_back_to_field: name
|
|
49
|
+
help: Name of the new folder; or pass it via the 'name' input field.
|
|
44
50
|
options: []
|
|
45
51
|
sdk_symbol: mammoth.api.folders.FoldersAPI.create
|
|
46
52
|
sdk_conversion: Call mammoth.api.folders.FoldersAPI.create with validated request fields.
|
|
@@ -57,7 +63,7 @@ commands:
|
|
|
57
63
|
required_fixture_guard: null
|
|
58
64
|
secret_fields: []
|
|
59
65
|
human_example: mammoth folder create --help
|
|
60
|
-
agent_example:
|
|
66
|
+
agent_example: mammoth folder create example --output json --no-input
|
|
61
67
|
unit_tests:
|
|
62
68
|
- UT-FOLDER-CREATE
|
|
63
69
|
contract_tests:
|
|
@@ -6,7 +6,13 @@ commands:
|
|
|
6
6
|
alias_of: null
|
|
7
7
|
operation_ids:
|
|
8
8
|
- CreateParameter
|
|
9
|
-
positionals:
|
|
9
|
+
positionals:
|
|
10
|
+
- name: name
|
|
11
|
+
type: str
|
|
12
|
+
required: false
|
|
13
|
+
metavar: NAME
|
|
14
|
+
falls_back_to_field: name
|
|
15
|
+
help: Name of the new parameter; or pass it via the 'name' input field.
|
|
10
16
|
options: []
|
|
11
17
|
sdk_symbol: mammoth.api.parameters.ParametersAPI.create
|
|
12
18
|
sdk_conversion: Call mammoth.api.parameters.ParametersAPI.create with validated request fields.
|
|
@@ -23,8 +29,8 @@ commands:
|
|
|
23
29
|
required_fixture_guard: null
|
|
24
30
|
secret_fields: []
|
|
25
31
|
human_example: mammoth parameter create --help
|
|
26
|
-
agent_example: 'mammoth parameter create --input ''{"
|
|
27
|
-
|
|
32
|
+
agent_example: 'mammoth parameter create example --input ''{"param_type": "example", "value": "example"}''
|
|
33
|
+
--output json --no-input'
|
|
28
34
|
unit_tests:
|
|
29
35
|
- UT-PARAMETER-CREATE
|
|
30
36
|
contract_tests:
|
|
@@ -201,7 +207,13 @@ commands:
|
|
|
201
207
|
alias_of: null
|
|
202
208
|
operation_ids:
|
|
203
209
|
- CreateGroup
|
|
204
|
-
positionals:
|
|
210
|
+
positionals:
|
|
211
|
+
- name: name
|
|
212
|
+
type: str
|
|
213
|
+
required: false
|
|
214
|
+
metavar: NAME
|
|
215
|
+
falls_back_to_field: name
|
|
216
|
+
help: Name of the new parameter group; or pass it via the 'name' input field.
|
|
205
217
|
options: []
|
|
206
218
|
sdk_symbol: mammoth.api.parameters.ParametersAPI.group_create
|
|
207
219
|
sdk_conversion: Call mammoth.api.parameters.ParametersAPI.group_create with validated request fields.
|
|
@@ -218,7 +230,7 @@ commands:
|
|
|
218
230
|
required_fixture_guard: null
|
|
219
231
|
secret_fields: []
|
|
220
232
|
human_example: mammoth parameter group create --help
|
|
221
|
-
agent_example:
|
|
233
|
+
agent_example: mammoth parameter group create example --output json --no-input
|
|
222
234
|
unit_tests:
|
|
223
235
|
- UT-PARAMETER-GROUP-CREATE
|
|
224
236
|
contract_tests:
|
|
@@ -6,7 +6,13 @@ commands:
|
|
|
6
6
|
alias_of: null
|
|
7
7
|
operation_ids:
|
|
8
8
|
- CreateSnippet
|
|
9
|
-
positionals:
|
|
9
|
+
positionals:
|
|
10
|
+
- name: name
|
|
11
|
+
type: str
|
|
12
|
+
required: false
|
|
13
|
+
metavar: NAME
|
|
14
|
+
falls_back_to_field: name
|
|
15
|
+
help: Name of the new snippet; or pass it via the 'name' input field.
|
|
10
16
|
options: []
|
|
11
17
|
sdk_symbol: mammoth.api.snippets.SnippetsAPI.create
|
|
12
18
|
sdk_conversion: Call mammoth.api.snippets.SnippetsAPI.create with validated request fields.
|
|
@@ -23,8 +29,8 @@ commands:
|
|
|
23
29
|
required_fixture_guard: null
|
|
24
30
|
secret_fields: []
|
|
25
31
|
human_example: mammoth snippet create --help
|
|
26
|
-
agent_example: 'mammoth snippet create --input ''{"
|
|
27
|
-
|
|
32
|
+
agent_example: 'mammoth snippet create example --input ''{"code": "example", "language": "example"}''
|
|
33
|
+
--output json --no-input'
|
|
28
34
|
unit_tests:
|
|
29
35
|
- UT-SNIPPET-CREATE
|
|
30
36
|
contract_tests:
|
|
@@ -6,7 +6,13 @@ commands:
|
|
|
6
6
|
alias_of: null
|
|
7
7
|
operation_ids:
|
|
8
8
|
- CreateAWebhook
|
|
9
|
-
positionals:
|
|
9
|
+
positionals:
|
|
10
|
+
- name: name
|
|
11
|
+
type: str
|
|
12
|
+
required: false
|
|
13
|
+
metavar: NAME
|
|
14
|
+
falls_back_to_field: name
|
|
15
|
+
help: Name of the new webhook; or pass it via the 'name' input field.
|
|
10
16
|
options: []
|
|
11
17
|
sdk_symbol: mammoth.api.webhooks.WebhooksAPI.create
|
|
12
18
|
sdk_conversion: Call mammoth.api.webhooks.WebhooksAPI.create with validated request fields.
|
|
@@ -23,7 +29,7 @@ commands:
|
|
|
23
29
|
required_fixture_guard: null
|
|
24
30
|
secret_fields: []
|
|
25
31
|
human_example: mammoth webhook create --help
|
|
26
|
-
agent_example: mammoth webhook create --output json --no-input
|
|
32
|
+
agent_example: mammoth webhook create example --output json --no-input
|
|
27
33
|
unit_tests:
|
|
28
34
|
- UT-WEBHOOK-CREATE
|
|
29
35
|
contract_tests:
|
|
@@ -261,7 +261,13 @@ commands:
|
|
|
261
261
|
alias_of: null
|
|
262
262
|
operation_ids:
|
|
263
263
|
- CreateWorkflow
|
|
264
|
-
positionals:
|
|
264
|
+
positionals:
|
|
265
|
+
- name: name
|
|
266
|
+
type: str
|
|
267
|
+
required: false
|
|
268
|
+
metavar: NAME
|
|
269
|
+
falls_back_to_field: name
|
|
270
|
+
help: Name of the new workflow; or pass it via the 'name' input field.
|
|
265
271
|
options: []
|
|
266
272
|
sdk_symbol: mammoth.api.workflows.WorkflowsAPI.create
|
|
267
273
|
sdk_conversion: Call mammoth.api.workflows.WorkflowsAPI.create with validated request fields.
|
|
@@ -278,7 +284,7 @@ commands:
|
|
|
278
284
|
required_fixture_guard: null
|
|
279
285
|
secret_fields: []
|
|
280
286
|
human_example: mammoth workflow create --help
|
|
281
|
-
agent_example:
|
|
287
|
+
agent_example: mammoth workflow create example --output json --no-input
|
|
282
288
|
unit_tests:
|
|
283
289
|
- UT-WORKFLOW-CREATE
|
|
284
290
|
contract_tests:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/auth.md
RENAMED
|
File without changes
|
{mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/input.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/recovery.md
RENAMED
|
File without changes
|
{mammoth_cli-1.0.2 → mammoth_cli-1.0.4}/mammoth_cli/bundled_skill/mammoth-cli/references/safety.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|