mammoth-cli 2.2.77__tar.gz → 2.2.79__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-2.2.77 → mammoth_cli-2.2.79}/PKG-INFO +10 -7
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/README.md +8 -5
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/__init__.py +1 -1
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/app.py +1 -1
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/capabilities.md +1 -1
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/command-index.md +5 -5
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/agent.md +31 -1
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/batch.md +1 -1
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/connector.md +10 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/context.md +10 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/view-transform.md +10 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/operations.md +8 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/database-import.md +13 -2
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/exports.md +8 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/rest-api-import.md +3 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/__init__.py +1 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/agent.py +93 -1
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/batch.py +3 -2
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/connector.py +76 -19
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/context.py +60 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/dataset.py +44 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/doctor.py +4 -1
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/help_summaries.json +8 -2
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/job.py +26 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/project.py +38 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/registry.py +14 -3
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/schema.py +37 -7
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/view.py +100 -10
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/view_ops.py +392 -7
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/errors/envelope.py +1 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/executor.py +0 -1
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/state.py +12 -3
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/strict.py +5 -1
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/updates.py +80 -77
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/verify.py +189 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/command_contract.py +6 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/input_fields.py +2 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/job_outcome.py +16 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/listing.py +52 -5
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/positionals.py +38 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/sdk_service.py +9 -1
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/pyproject.toml +2 -2
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/agent.yaml +141 -3
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/automation.yaml +3 -6
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/batch.yaml +2 -2
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/browse.yaml +1 -2
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/connector.yaml +63 -12
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/context.yaml +33 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/dashboard.yaml +11 -11
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/dataset.yaml +1 -1
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/schedule.yaml +2 -7
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/view.yaml +49 -3
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/edits-target.source.yaml +4 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/sdk-catalog.source.yaml +28 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/sdk-methods.yaml +125 -55
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/.gitignore +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/LICENSE +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/__main__.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/SKILL.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/about-mammoth.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/auth.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/capabilities-misc.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/activity.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/addon.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/ai.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/annotation.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/auth.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/automation.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/billing.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/browse.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/calc.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/capability.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/client-app.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/collection.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/completion.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/config.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/dashboard-qa.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/dashboard-style.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/dashboard-template.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/dashboard.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/data-app.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/dataset.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/doctor.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/external-key.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/file.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/folder.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/job.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/link.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/log.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/notification.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/parameter.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/project.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/report.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/resolve.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/schedule.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/schema.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/skill.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/snippet.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/support.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/template.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/token.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/trash.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/upgrade.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/user.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/version.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/view.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/webhook.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/workflow.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/commands/workspace.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/handoff.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/input.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/jobs-drafts.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/machine-output.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/auth-scope.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/build-an-agent.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/cleanup.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/dashboards.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/end-to-end.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/file-import.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/index.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/need-action.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/resources.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/scheduling.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/transforms.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recipes/typed-etl-discovery.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/recovery.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/report-checklist.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/retention.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/safety.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/bundled_skill/mammoth-cli/references/task-start.md +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/_lazy.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/activity.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/addon.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/ai.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/annotation.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/auth.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/automation.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/billing.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/browse.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/calc.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/capability.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/client_app.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/completion.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/config.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/dashboard.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/data_app.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/external_key.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/file.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/folder.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/link.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/notification.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/parameter.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/report.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/resolve.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/schedule.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/skill.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/snippet.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/support.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/template.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/trash.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/upgrade.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/user.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/view_drivers.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/view_explore.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/view_forecast.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/view_profile.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/webhook.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/workflow.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/commands/workspace.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/context/__init__.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/context/credentials.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/context/endpoint.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/context/keyring_backend.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/context/oauth.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/context/profiles.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/context/resolver.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/contracts/__init__.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/contracts/auth.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/embed.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/errors/__init__.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/manifest/__init__.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/manifest/loader.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/messages/__init__.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/output/__init__.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/output/envelope.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/output/normalize.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/output/policy.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/output/progress.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/output/render.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/py.typed +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/__init__.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/confirm.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/dataset_health.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/dryrun.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/dryrun_targets.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/embedded.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/input_loader.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/intent_only.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/invocation.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/locked_files.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/new_data.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/opens.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/options.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/parents.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/runlog.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/session.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/runtime/validate.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/__init__.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/append_blank_columns.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/argspec.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/board_values.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/coerce.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/conditional_format.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/conditions.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/dashboard_filters.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/dashboard_pages.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/dashboard_review.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/data_profile.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/data_quality.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/dispatch.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/explore_card_edit.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/explore_cards.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/explore_to_figure.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/explore_to_image.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/factory.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/folder_ids.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/local_time.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/mapping.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/openapi_types.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/period_analysis.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/protocol.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/read_queries.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/schema_diff.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/sql_check.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/stored_stats.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/testing.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/text_dates.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/type_system.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/view_analysis.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/view_variants.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/services/write_impact.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/skills/__init__.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/skills/installer.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/skills/steering.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/mammoth_cli/testing.py +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/activity.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/addon.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/ai.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/annotation.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/auth.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/billing.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/calc.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/capability.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/client-app.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/collection.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/completion.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/config.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/data-app.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/doctor.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/external-key.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/file.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/folder.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/job.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/link.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/log.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/notification.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/parameter.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/project.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/report.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/resolve.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/schema.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/skill.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/snippet.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/support.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/template.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/token.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/trash.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/upgrade.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/user.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/version.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/webhook.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/workflow.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/commands/workspace.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/openapi-operations.yaml +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/manifests/schema-v1.json +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/openapi/metadata.json +0 -0
- {mammoth_cli-2.2.77 → mammoth_cli-2.2.79}/spec/openapi/openapi.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mammoth-cli
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.79
|
|
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
|
|
@@ -18,7 +18,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
18
18
|
Requires-Python: <3.15,>=3.12
|
|
19
19
|
Requires-Dist: jsonschema>=4.20
|
|
20
20
|
Requires-Dist: keyring<26,>=25.7
|
|
21
|
-
Requires-Dist: mammoth-io<0.9,>=0.8.
|
|
21
|
+
Requires-Dist: mammoth-io<0.9,>=0.8.42
|
|
22
22
|
Requires-Dist: platformdirs<5,>=4.10
|
|
23
23
|
Requires-Dist: pydantic<3,>=2.12.5
|
|
24
24
|
Requires-Dist: pyyaml<7,>=6
|
|
@@ -243,11 +243,14 @@ mammoth skill install --input '{"agents": ["codex"], "scope": "project"}'
|
|
|
243
243
|
Use `mammoth skill update` after a CLI upgrade. It refreshes copies owned by the
|
|
244
244
|
installer and reports modified copies instead of silently replacing them.
|
|
245
245
|
|
|
246
|
-
The CLI
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
`
|
|
246
|
+
The CLI keeps itself up to date. At most once a day, after a command has
|
|
247
|
+
finished and written its output, a detached process asks PyPI and installs a
|
|
248
|
+
newer release through the same package manager as `mammoth upgrade`. It never
|
|
249
|
+
delays or fails a command, prints nothing, and writes any failure to the run
|
|
250
|
+
log. `meta.update_available` (and the stderr line in human output) appears only
|
|
251
|
+
when a newer release exists and will not be installed by itself. Set
|
|
252
|
+
`MAMMOTH_NO_AUTO_UPDATE=1` to keep the check but never install (CI, containers,
|
|
253
|
+
pinned environments), or `MAMMOTH_NO_UPDATE_CHECK=1` to turn the check off (see
|
|
251
254
|
[Upgrade](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/upgrade.md)).
|
|
252
255
|
|
|
253
256
|
## What you can do
|
|
@@ -214,11 +214,14 @@ mammoth skill install --input '{"agents": ["codex"], "scope": "project"}'
|
|
|
214
214
|
Use `mammoth skill update` after a CLI upgrade. It refreshes copies owned by the
|
|
215
215
|
installer and reports modified copies instead of silently replacing them.
|
|
216
216
|
|
|
217
|
-
The CLI
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
`
|
|
217
|
+
The CLI keeps itself up to date. At most once a day, after a command has
|
|
218
|
+
finished and written its output, a detached process asks PyPI and installs a
|
|
219
|
+
newer release through the same package manager as `mammoth upgrade`. It never
|
|
220
|
+
delays or fails a command, prints nothing, and writes any failure to the run
|
|
221
|
+
log. `meta.update_available` (and the stderr line in human output) appears only
|
|
222
|
+
when a newer release exists and will not be installed by itself. Set
|
|
223
|
+
`MAMMOTH_NO_AUTO_UPDATE=1` to keep the check but never install (CI, containers,
|
|
224
|
+
pinned environments), or `MAMMOTH_NO_UPDATE_CHECK=1` to turn the check off (see
|
|
222
225
|
[Upgrade](https://github.com/EdgeMetric/mammothsdk/blob/main/mammoth-cli/docs/upgrade.md)).
|
|
223
226
|
|
|
224
227
|
## What you can do
|
|
@@ -114,7 +114,7 @@ _AGENT_SUBGROUP_DESCRIPTIONS = {
|
|
|
114
114
|
"goldens": "Manage and run the golden cases an agent definition is proven against.",
|
|
115
115
|
"memory": "Manage the facts an agent definition has learned, per project.",
|
|
116
116
|
"message": "Correct the request kind of a reply in an agent chat.",
|
|
117
|
-
"plan": "
|
|
117
|
+
"plan": "Approve, skip or discard the plan of an agent chat, or edit its workflow proposal.",
|
|
118
118
|
"projects": "Set or clear the projects an agent definition works in.",
|
|
119
119
|
"run": "Inspect and control an agent's runs.",
|
|
120
120
|
"scratch": "Read, write and clear an agent definition's scratchpad notes per project.",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# What is proven on release
|
|
2
2
|
|
|
3
3
|
Generated from `docs/release-capability-matrix.json`; do not edit by hand.
|
|
4
|
-
The CLI publishes
|
|
4
|
+
The CLI publishes 753 commands. 516 of them bind one of the 545 API operations in the matrix; the remainder are local commands (`schema`, `auth`, `doctor`, `log`, ...) or typed variants that share an operation (`view transform *` commands submit through `view.task.add`, except `rename-columns` and `sort`, which set view display properties through `view.update`). 262 bound commands ran once successfully on release, 1 are not supported there, and the rest are untried. Untried is not broken: discover the contract with `mammoth schema get COMMAND_ID`, run it, and treat the structured error envelope as the answer. Use an untried command normally: confirm a write with the user first, check its result with a read afterwards, and never refuse a command only because it is untried.
|
|
5
5
|
|
|
6
6
|
Status meanings:
|
|
7
7
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Published CLI command catalog
|
|
2
2
|
|
|
3
|
-
This generated catalog is a lookup table for every command in the published CLI manifest, currently
|
|
3
|
+
This generated catalog is a lookup table for every command in the published CLI manifest, currently 753; each entry carries its release status line. It is a command-contract index, not an assertion that every backend/OpenAPI operation has a CLI binding. For an exact local CLI contract, run `mammoth schema get COMMAND_ID`; `mammoth capability list` is an API-binding inventory and can omit typed/local CLI routes. For focused workflows, read the [recipes index](recipes/index.md). Sensitive structured input must come from a private file or pipe; never put secrets in literal argv.
|
|
4
4
|
|
|
5
5
|
Load only the applicable domain file:
|
|
6
6
|
|
|
7
7
|
- [activity](commands/activity.md) — 2 published commands
|
|
8
8
|
- [addon](commands/addon.md) — 7 published commands
|
|
9
|
-
- [agent](commands/agent.md) —
|
|
9
|
+
- [agent](commands/agent.md) — 54 published commands
|
|
10
10
|
- [ai](commands/ai.md) — 5 published commands
|
|
11
11
|
- [annotation](commands/annotation.md) — 5 published commands
|
|
12
12
|
- [auth](commands/auth.md) — 5 published commands
|
|
@@ -20,8 +20,8 @@ Load only the applicable domain file:
|
|
|
20
20
|
- [collection](commands/collection.md) — 16 published commands
|
|
21
21
|
- [completion](commands/completion.md) — 2 published commands
|
|
22
22
|
- [config](commands/config.md) — 4 published commands
|
|
23
|
-
- [connector](commands/connector.md) —
|
|
24
|
-
- [context](commands/context.md) —
|
|
23
|
+
- [connector](commands/connector.md) — 23 published commands
|
|
24
|
+
- [context](commands/context.md) — 4 published commands
|
|
25
25
|
- [dashboard-qa](commands/dashboard-qa.md) — 14 published commands
|
|
26
26
|
- [dashboard-template](commands/dashboard-template.md) — 12 published commands
|
|
27
27
|
- [dashboard-style](commands/dashboard-style.md) — 10 published commands
|
|
@@ -51,7 +51,7 @@ Load only the applicable domain file:
|
|
|
51
51
|
- [upgrade](commands/upgrade.md) — 1 published commands
|
|
52
52
|
- [user](commands/user.md) — 8 published commands
|
|
53
53
|
- [version](commands/version.md) — 1 published commands
|
|
54
|
-
- [view-transform](commands/view-transform.md) —
|
|
54
|
+
- [view-transform](commands/view-transform.md) — 35 published commands
|
|
55
55
|
- [view](commands/view.md) — 103 published commands
|
|
56
56
|
- [webhook](commands/webhook.md) — 7 published commands
|
|
57
57
|
- [workflow](commands/workflow.md) — 20 published commands
|
|
@@ -76,7 +76,7 @@ Status on release: untried; no live run recorded.
|
|
|
76
76
|
|
|
77
77
|
Run: `mammoth agent chat`. Exact input fields: `mammoth schema get agent.chat`.
|
|
78
78
|
|
|
79
|
-
Example: `mammoth agent chat --input '{"message": "Summarize revenue by region", "scope": {"
|
|
79
|
+
Example: `mammoth agent chat --input '{"message": "Summarize revenue by region", "scope": {"type": "workspace", "workspace_id": 123}, "client_context": {"project_id": 456}}'`. Placeholders are illustrative; resolve IDs and input from observed reads.
|
|
80
80
|
|
|
81
81
|
Result: `AgentChatResult`; mutation `benign_mutation`, confirmation `none`, wait policy `not_async`.
|
|
82
82
|
|
|
@@ -232,6 +232,26 @@ Result: `AgentMessageSetRequestKindResult`; mutation `benign_mutation`, confirma
|
|
|
232
232
|
|
|
233
233
|
Status on release: untried; no live run recorded.
|
|
234
234
|
|
|
235
|
+
### `agent.plan.approve`
|
|
236
|
+
|
|
237
|
+
Run: `mammoth agent plan approve`. Exact input fields: `mammoth schema get agent.plan.approve`.
|
|
238
|
+
|
|
239
|
+
Example: `mammoth agent plan approve resource-123`. Illustrative only: append `--yes` after observing an owned target.
|
|
240
|
+
|
|
241
|
+
Result: `AgentPlanApproveResult`; mutation `benign_mutation`, confirmation `prompt_or_yes`, wait policy `not_async`.
|
|
242
|
+
|
|
243
|
+
Status on release: untried; no live run recorded.
|
|
244
|
+
|
|
245
|
+
### `agent.plan.discard`
|
|
246
|
+
|
|
247
|
+
Run: `mammoth agent plan discard`. Exact input fields: `mammoth schema get agent.plan.discard`.
|
|
248
|
+
|
|
249
|
+
Example: `mammoth agent plan discard resource-123`. Placeholders are illustrative; resolve IDs and input from observed reads.
|
|
250
|
+
|
|
251
|
+
Result: `AgentPlanDiscardResult`; mutation `benign_mutation`, confirmation `none`, wait policy `not_async`.
|
|
252
|
+
|
|
253
|
+
Status on release: untried; no live run recorded.
|
|
254
|
+
|
|
235
255
|
### `agent.plan.edit-proposal`
|
|
236
256
|
|
|
237
257
|
Run: `mammoth agent plan edit-proposal`. Exact input fields: `mammoth schema get agent.plan.edit-proposal`.
|
|
@@ -242,6 +262,16 @@ Result: `AgentPlanEditProposalResult`; mutation `benign_mutation`, confirmation
|
|
|
242
262
|
|
|
243
263
|
Status on release: untried; no live run recorded.
|
|
244
264
|
|
|
265
|
+
### `agent.plan.skip`
|
|
266
|
+
|
|
267
|
+
Run: `mammoth agent plan skip`. Exact input fields: `mammoth schema get agent.plan.skip`.
|
|
268
|
+
|
|
269
|
+
Example: `mammoth agent plan skip resource-123 123`. Placeholders are illustrative; resolve IDs and input from observed reads.
|
|
270
|
+
|
|
271
|
+
Result: `AgentPlanSkipResult`; mutation `benign_mutation`, confirmation `none`, wait policy `not_async`.
|
|
272
|
+
|
|
273
|
+
Status on release: untried; no live run recorded.
|
|
274
|
+
|
|
245
275
|
### `agent.projects.clear`
|
|
246
276
|
|
|
247
277
|
Run: `mammoth agent projects clear`. Exact input fields: `mammoth schema get agent.projects.clear`.
|
|
@@ -66,7 +66,7 @@ Status on release: ran once on CLI 2.0.21 — ergonomics sweep 2026-09-19: exit
|
|
|
66
66
|
|
|
67
67
|
Run: `mammoth batch update`. Exact input fields: `mammoth schema get batch.update`.
|
|
68
68
|
|
|
69
|
-
Example: `mammoth batch update 123 --input '{"patch":
|
|
69
|
+
Example: `mammoth batch update 123 --input '{"patch": {"sample_key": "Status"}}'`. Placeholders are illustrative; resolve IDs and input from observed reads.
|
|
70
70
|
|
|
71
71
|
Result: `BatchUpdateResult`; mutation `benign_mutation`, confirmation `none`, wait policy `returns_job`.
|
|
72
72
|
|
|
@@ -114,6 +114,16 @@ Result: `ConnectorConnectionListResult`; mutation `read`, confirmation `none`, w
|
|
|
114
114
|
|
|
115
115
|
Status on release: observed blocker — server_error: see sweep report. Re-check before relying on it.
|
|
116
116
|
|
|
117
|
+
### `connector.connection.query`
|
|
118
|
+
|
|
119
|
+
Run: `mammoth connector connection query`. Exact input fields: `mammoth schema get connector.connection.query`.
|
|
120
|
+
|
|
121
|
+
Example: `mammoth connector connection query sample sample --input '{"query": "SELECT region, SUM(revenue) FROM data GROUP BY region"}'`. Placeholders are illustrative; resolve IDs and input from observed reads.
|
|
122
|
+
|
|
123
|
+
Result: `ConnectorConnectionQueryResult`; mutation `read`, confirmation `none`, wait policy `not_async`.
|
|
124
|
+
|
|
125
|
+
Status on release: untried; no live run recorded.
|
|
126
|
+
|
|
117
127
|
### `connector.connection.update`
|
|
118
128
|
|
|
119
129
|
Run: `mammoth connector connection update`. Exact input fields: `mammoth schema get connector.connection.update`.
|
|
@@ -31,3 +31,13 @@ Example: `mammoth context project use 123`. Placeholders are illustrative; resol
|
|
|
31
31
|
Result: `ContextProjectUseResult`; mutation `benign_mutation`, confirmation `none`, wait policy `not_async`.
|
|
32
32
|
|
|
33
33
|
Status on release: untried; no live run recorded.
|
|
34
|
+
|
|
35
|
+
### `context.show`
|
|
36
|
+
|
|
37
|
+
Run: `mammoth context show`. Exact input fields: `mammoth schema get context.show`.
|
|
38
|
+
|
|
39
|
+
Example: `mammoth context show`. Placeholders are illustrative; resolve IDs and input from observed reads.
|
|
40
|
+
|
|
41
|
+
Result: `ContextShowResult`; mutation `read`, confirmation `none`, wait policy `not_async`.
|
|
42
|
+
|
|
43
|
+
Status on release: untried; no live run recorded.
|
|
@@ -32,6 +32,16 @@ Result: `ViewTransformAiResult`; mutation `reversible_pipeline`, confirmation `n
|
|
|
32
32
|
|
|
33
33
|
Status on release: ran once on CLI 2.0.40 through `view.task.add` and was read back with `view data get`; other inputs for this transform are untried.
|
|
34
34
|
|
|
35
|
+
### `view.transform.batch`
|
|
36
|
+
|
|
37
|
+
Run: `mammoth view transform batch`. Exact input fields: `mammoth schema get view.transform.batch`.
|
|
38
|
+
|
|
39
|
+
Example: `mammoth view transform batch 123 --input '{"steps": [{"op": "filter", "input": {"condition": {"column": "Cost", "operator": "GTE", "value": 20}}}, {"op": "sort", "input": {"order_by": [["Cost", "DESC"]]}}, {"op": "limit-rows", "input": {"n": 2}}], "dataset_id": 456}'`. Placeholders are illustrative; resolve IDs and input from observed reads.
|
|
40
|
+
|
|
41
|
+
Result: `ViewTransformBatchResult`; mutation `reversible_pipeline`, confirmation `none`, wait policy `always_wait`.
|
|
42
|
+
|
|
43
|
+
Status on release: untried; it submits through `view.task.add`, but this transform was not among those run.
|
|
44
|
+
|
|
35
45
|
### `view.transform.bulk-replace`
|
|
36
46
|
|
|
37
47
|
Run: `mammoth view transform bulk-replace`. Exact input fields: `mammoth schema get view.transform.bulk-replace`.
|
|
@@ -94,6 +94,14 @@ task submission does not prove that the task removed duplicates.
|
|
|
94
94
|
For deduplication, discover and use `view.transform.discard-duplicates`; see
|
|
95
95
|
recipes/transforms.md for the full procedure.
|
|
96
96
|
|
|
97
|
+
When several transforms go on the same view in a row (for example filter, sort, then
|
|
98
|
+
limit-rows), send them in one `view transform batch VIEW_ID --input '{"steps": [{"op":
|
|
99
|
+
"filter", "input": {...}}, ...]}'` instead of one command each: the pipeline runs once and
|
|
100
|
+
one verified outcome comes back (`row_check`, and `tasks` with each new task's status).
|
|
101
|
+
Each `input` is what that `view transform` command takes. A step cannot use a column an
|
|
102
|
+
earlier step of the batch creates: run those steps first. If a task fails, the batch's tasks
|
|
103
|
+
are removed and the error names `steps[i]`.
|
|
104
|
+
|
|
97
105
|
Prefer a typed `view transform <operation>` command. Its schema is the
|
|
98
106
|
discoverable request contract. A job status or pipeline/task definition only
|
|
99
107
|
proves that the task ran. For a value-changing step, the proof is the
|
|
@@ -25,8 +25,19 @@ mammoth connector connection get mssql CONNECTION_KEY # read it back; config
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
There is no table-browse command. Ask the user for the table (and schema), or
|
|
28
|
-
draft the SQL with `connector query generate`.
|
|
29
|
-
|
|
28
|
+
draft the SQL with `connector query generate`. Try the SELECT first: it shows
|
|
29
|
+
sample rows and saves nothing (no dataset, no data source), so it needs no
|
|
30
|
+
`--yes`. The CLI accepts only one SELECT (or WITH ... SELECT); the connection's
|
|
31
|
+
database user decides what the database allows, and the sample is limited to
|
|
32
|
+
the first rows, so add your own LIMIT for a large table:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
mammoth connector connection query mssql CONNECTION_KEY \
|
|
36
|
+
--input '{"query": "SELECT TOP 5 * FROM dbo.Orders"}'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Then import it as a dataset (a write: confirm first). `query` is required;
|
|
40
|
+
`validate` is on by default:
|
|
30
41
|
|
|
31
42
|
```bash
|
|
32
43
|
mammoth connector ds-config create mssql CONNECTION_KEY \
|
|
@@ -108,6 +108,14 @@ mammoth view export postgres VIEW_ID DATASET_ID --project PROJECT_ID \
|
|
|
108
108
|
mammoth view export list VIEW_ID DATASET_ID --project PROJECT_ID
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
+
The command returns after the export has run. The result carries
|
|
112
|
+
`export: {id, status, error, ran_at, result}`: `status` `ok` means the run
|
|
113
|
+
finished, so there is nothing to poll or read back to confirm it. A run that
|
|
114
|
+
failed is an `export_failed` error naming the destination's error. With
|
|
115
|
+
`"run_immediately": false` nothing runs now and `export.status` is `scheduled`.
|
|
116
|
+
`mammoth job wait JOB_ID` on the add job (`add_action`) returns the same
|
|
117
|
+
`export` block.
|
|
118
|
+
|
|
111
119
|
If the operator has not supplied such a file, stop and ask for it; do not
|
|
112
120
|
compose the body yourself from values seen in chat.
|
|
113
121
|
|
|
@@ -31,6 +31,9 @@ does not include this connector (or its paid addon is not active).
|
|
|
31
31
|
|
|
32
32
|
## 2. Try the data-source config (creates no dataset)
|
|
33
33
|
|
|
34
|
+
`mammoth connector connection query generic_rest_api CONNECTION_KEY --input
|
|
35
|
+
sample.json` runs the same sample read-only (no `--yes`, nothing saved).
|
|
36
|
+
|
|
34
37
|
`query` is a **JSON string** (not an object) of the data-source config:
|
|
35
38
|
`endpoint_path`, `http_method` (`GET|POST`), `request_body`, `query_params`,
|
|
36
39
|
`data_root_path` (JSONPath to the records; `[*]` is supported), `pagination`,
|
|
@@ -21,6 +21,7 @@ _TARGETS: dict[str, str] = {
|
|
|
21
21
|
"config.set": "mammoth_cli.commands.config:config_set",
|
|
22
22
|
"config.list": "mammoth_cli.commands.config:config_list",
|
|
23
23
|
"config.path": "mammoth_cli.commands.config:config_path",
|
|
24
|
+
"context.show": "mammoth_cli.commands.context:context_show",
|
|
24
25
|
"context.project.status": "mammoth_cli.commands.context:context_project_status",
|
|
25
26
|
"context.project.use": "mammoth_cli.commands.context:context_project_use",
|
|
26
27
|
"context.project.clear": "mammoth_cli.commands.context:context_project_clear",
|
|
@@ -15,6 +15,7 @@ from dataclasses import replace
|
|
|
15
15
|
from typing import Any
|
|
16
16
|
|
|
17
17
|
from mammoth_cli.errors.envelope import (
|
|
18
|
+
CODE_INVALID_ARGUMENT,
|
|
18
19
|
CODE_MISSING_ARGUMENT,
|
|
19
20
|
CODE_MISSING_FIELD,
|
|
20
21
|
CODE_RESOURCE_NOT_FOUND,
|
|
@@ -156,14 +157,25 @@ def _meta(invocation: Invocation, workspace_id: int, project_id: int | None) ->
|
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
|
|
160
|
+
#: Seconds ``agent chat`` waits for the reply when the input gives no ``wait``.
|
|
161
|
+
CHAT_WAIT_SECONDS = 120
|
|
162
|
+
|
|
163
|
+
|
|
159
164
|
def agent_chat(invocation: Invocation) -> HandlerResult:
|
|
160
|
-
"""Send a chat message to an agent
|
|
165
|
+
"""Send a chat message to an agent and wait for its reply.
|
|
166
|
+
|
|
167
|
+
``message``/``scope`` are required. The request key the server needs is made
|
|
168
|
+
here, never asked of the user. ``wait`` (seconds, default 120) bounds how long
|
|
169
|
+
the command waits for the reply; ``0`` returns as soon as the turn starts.
|
|
170
|
+
"""
|
|
161
171
|
document = _bound_document(invocation)
|
|
162
172
|
message = _require_field(document, "message")
|
|
163
173
|
scope = _require_field(document, "scope")
|
|
164
174
|
assert document is not None
|
|
165
175
|
kwargs: dict[str, Any] = {"message": message, "scope": scope}
|
|
166
176
|
_forward_optional(document, kwargs, ("agent_key", "session_id", "client_context", "selection"))
|
|
177
|
+
wait = document.get("wait", CHAT_WAIT_SECONDS)
|
|
178
|
+
kwargs["wait"] = wait or None
|
|
167
179
|
with open_service(invocation) as (service, auth):
|
|
168
180
|
data = service.call(_symbol(invocation), **kwargs)
|
|
169
181
|
return data, _meta(invocation, auth.workspace_id, resolved_project(invocation))
|
|
@@ -199,9 +211,31 @@ def agent_session_messages(invocation: Invocation) -> HandlerResult:
|
|
|
199
211
|
session_id = _require_string_positional(invocation, "session id")
|
|
200
212
|
with open_service(invocation) as (service, auth):
|
|
201
213
|
data = service.call(_symbol(invocation), session_id=session_id)
|
|
214
|
+
waiting = _awaiting_plan_approval(session_id, data.get("plan"))
|
|
215
|
+
if waiting is not None:
|
|
216
|
+
data = {**data, "awaiting_plan_approval": waiting}
|
|
202
217
|
return data, _meta(invocation, auth.workspace_id, resolved_project(invocation))
|
|
203
218
|
|
|
204
219
|
|
|
220
|
+
def _awaiting_plan_approval(session_id: str, plan: dict[str, Any] | None) -> dict[str, Any] | None:
|
|
221
|
+
"""The proposed steps and the commands that decide them, or None when none wait."""
|
|
222
|
+
proposed = [
|
|
223
|
+
{"n": step["n"], "title": step.get("title")}
|
|
224
|
+
for step in (plan or {}).get("steps", [])
|
|
225
|
+
if step.get("status") == "proposed"
|
|
226
|
+
]
|
|
227
|
+
if not proposed:
|
|
228
|
+
return None
|
|
229
|
+
return {
|
|
230
|
+
"plan_id": plan["plan_id"] if plan else None,
|
|
231
|
+
"proposed_steps": proposed,
|
|
232
|
+
"approve": f"mammoth agent plan approve {session_id} --yes",
|
|
233
|
+
"skip": f"mammoth agent plan skip {session_id} N",
|
|
234
|
+
"discard": f"mammoth agent plan discard {session_id}",
|
|
235
|
+
"note": "Typing 'Run it' as a chat message does not approve the plan.",
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
|
|
205
239
|
def agent_session_set_visibility(invocation: Invocation) -> HandlerResult:
|
|
206
240
|
"""Set an agent session's visibility. ``visibility`` comes from ``--input``."""
|
|
207
241
|
session_id = _require_string_positional(invocation, "session id")
|
|
@@ -363,6 +397,64 @@ def agent_plan_edit_proposal(invocation: Invocation) -> HandlerResult:
|
|
|
363
397
|
return _session_call(invocation, **kwargs)
|
|
364
398
|
|
|
365
399
|
|
|
400
|
+
def _plan_decision(invocation: Invocation, **extra: Any) -> HandlerResult:
|
|
401
|
+
"""Run an approve, skip or discard on the chat named by the positional session id.
|
|
402
|
+
|
|
403
|
+
The chat's agent, scope and project are read from the session; ``--input`` may give
|
|
404
|
+
``scope`` to override it and ``wait`` (seconds to wait for the turn, default 120, ``0``
|
|
405
|
+
returns at once).
|
|
406
|
+
"""
|
|
407
|
+
_refuse_embedded_run_control()
|
|
408
|
+
session_id = _require_string_positional(invocation, "session id")
|
|
409
|
+
document = _bound_document(invocation)
|
|
410
|
+
with open_service(invocation) as (service, auth):
|
|
411
|
+
wait = document.get("wait", CHAT_WAIT_SECONDS) or None
|
|
412
|
+
data = service.call(
|
|
413
|
+
_symbol(invocation),
|
|
414
|
+
session_id=session_id,
|
|
415
|
+
scope=document.get("scope"),
|
|
416
|
+
wait=wait,
|
|
417
|
+
**extra,
|
|
418
|
+
)
|
|
419
|
+
return data, _meta(invocation, auth.workspace_id, resolved_project(invocation))
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
def agent_plan_approve(invocation: Invocation) -> HandlerResult:
|
|
423
|
+
"""Approve (Run it) the chat's current plan. Prompt or ``--yes`` required."""
|
|
424
|
+
session_id = _require_string_positional(invocation, "session id")
|
|
425
|
+
enforce_confirmation(
|
|
426
|
+
invocation,
|
|
427
|
+
policy=POLICY_PROMPT_OR_YES,
|
|
428
|
+
action=f"approve the plan of agent session {session_id} and start the work",
|
|
429
|
+
)
|
|
430
|
+
return _plan_decision(invocation)
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
def agent_plan_skip(invocation: Invocation) -> HandlerResult:
|
|
434
|
+
"""Skip one proposed step of the chat's current plan."""
|
|
435
|
+
if len(invocation.extra_args) < 2:
|
|
436
|
+
raise CliError(
|
|
437
|
+
code=CODE_MISSING_ARGUMENT,
|
|
438
|
+
message="This command requires a step number argument.",
|
|
439
|
+
exit_status=EXIT_USAGE,
|
|
440
|
+
hint="Pass the plan step number after the session id.",
|
|
441
|
+
)
|
|
442
|
+
raw = str(invocation.extra_args[1])
|
|
443
|
+
if not raw.isdigit() or int(raw) < 1:
|
|
444
|
+
raise CliError(
|
|
445
|
+
code=CODE_INVALID_ARGUMENT,
|
|
446
|
+
message=f"The step number must be a positive whole number, got {raw!r}.",
|
|
447
|
+
exit_status=EXIT_USAGE,
|
|
448
|
+
hint="Use the n of a proposed step shown by 'mammoth agent session messages'.",
|
|
449
|
+
)
|
|
450
|
+
return _plan_decision(invocation, n=int(raw))
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
def agent_plan_discard(invocation: Invocation) -> HandlerResult:
|
|
454
|
+
"""Skip every proposed step of the chat's current plan."""
|
|
455
|
+
return _plan_decision(invocation)
|
|
456
|
+
|
|
457
|
+
|
|
366
458
|
def _definition_call(invocation: Invocation, **kwargs: Any) -> HandlerResult:
|
|
367
459
|
"""Call this command's SDK method on the agent key positional plus ``kwargs``."""
|
|
368
460
|
agent_key = _require_string_positional(invocation, "agent key")
|
|
@@ -381,8 +381,9 @@ def batch_update(invocation: Invocation) -> HandlerResult:
|
|
|
381
381
|
patch = _require_field(document, "patch")
|
|
382
382
|
# A ``remove`` op deletes batches, so gate any patch containing one behind a
|
|
383
383
|
# prompt/``--yes``; pure ``replace``/``add`` patches stay unconfirmed.
|
|
384
|
-
if isinstance(patch,
|
|
385
|
-
|
|
384
|
+
operations = [patch] if isinstance(patch, dict) else patch
|
|
385
|
+
if isinstance(operations, list) and any(
|
|
386
|
+
isinstance(op, dict) and op.get("op") == "remove" for op in operations
|
|
386
387
|
):
|
|
387
388
|
enforce_confirmation(
|
|
388
389
|
invocation,
|
|
@@ -24,6 +24,7 @@ SDK method named by the command's reviewed manifest ``sdk_symbol``.
|
|
|
24
24
|
|
|
25
25
|
from __future__ import annotations
|
|
26
26
|
|
|
27
|
+
import re
|
|
27
28
|
from typing import Any
|
|
28
29
|
|
|
29
30
|
from mammoth_cli.errors.envelope import (
|
|
@@ -46,6 +47,17 @@ from mammoth_cli.runtime.session import open_service, require_project, resolved_
|
|
|
46
47
|
HandlerResult = tuple[Any, dict[str, Any]]
|
|
47
48
|
|
|
48
49
|
_DS_CONFIG_CREATE_OPTIONAL = ("query", "file_source", "table", "profile", "validate", "data_sample")
|
|
50
|
+
_QUERY_OPTIONAL = ("table", "profile")
|
|
51
|
+
|
|
52
|
+
_SQL_STRING = re.compile(r"'(?:[^']|'')*'|\"(?:[^\"]|\"\")*\"|--[^\n]*|/\*.*?\*/", re.DOTALL)
|
|
53
|
+
_SQL_READ_START = re.compile(r"^\s*\(*\s*(select|with|show|values)\b", re.IGNORECASE)
|
|
54
|
+
_SQL_WRITE_WORD = re.compile(
|
|
55
|
+
r"\b(insert|update|delete|merge|drop|alter|truncate|create|grant|revoke|call|copy|" r"into)\b",
|
|
56
|
+
re.IGNORECASE,
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
_ACTIVE_CONNECTORS_SYMBOL = "mammoth.api.connectors.ConnectorsAPI.active_connectors"
|
|
49
61
|
|
|
50
62
|
|
|
51
63
|
def _symbol(invocation: Invocation) -> str:
|
|
@@ -307,31 +319,31 @@ def connector_connection_get(invocation: Invocation) -> HandlerResult:
|
|
|
307
319
|
return data, _meta(invocation, auth.workspace_id, project_id)
|
|
308
320
|
|
|
309
321
|
|
|
310
|
-
def _require_connector_key_for_connection_list(invocation: Invocation) -> str:
|
|
311
|
-
"""Return the connector key, or raise a usage error that says how to find one."""
|
|
312
|
-
connector_key = _string_positional_at(invocation, 0, "connector key")
|
|
313
|
-
if connector_key:
|
|
314
|
-
return connector_key
|
|
315
|
-
raise CliError(
|
|
316
|
-
code=CODE_MISSING_ARGUMENT,
|
|
317
|
-
message=(
|
|
318
|
-
"This command requires a connector key argument. "
|
|
319
|
-
"Run `mammoth connector active` to list the connectors that have saved connections."
|
|
320
|
-
),
|
|
321
|
-
exit_status=EXIT_USAGE,
|
|
322
|
-
hint="Pass the connector key as a positional argument.",
|
|
323
|
-
)
|
|
324
|
-
|
|
325
|
-
|
|
326
322
|
def connector_connection_list(invocation: Invocation) -> HandlerResult:
|
|
327
|
-
"""List connections for
|
|
323
|
+
"""List connections for one connector type, or for every connector with a saved one."""
|
|
328
324
|
project_id = require_project(invocation)
|
|
329
|
-
connector_key =
|
|
325
|
+
connector_key = _string_positional_at(invocation, 0, "connector key")
|
|
330
326
|
with open_service(invocation) as (service, auth):
|
|
331
|
-
|
|
327
|
+
if connector_key:
|
|
328
|
+
data = service.call(
|
|
329
|
+
_symbol(invocation), connector_key=connector_key, project_id=project_id
|
|
330
|
+
)
|
|
331
|
+
else:
|
|
332
|
+
data = _connections_of_every_connector(service, invocation, project_id)
|
|
332
333
|
return data, _meta(invocation, auth.workspace_id, project_id)
|
|
333
334
|
|
|
334
335
|
|
|
336
|
+
def _connections_of_every_connector(
|
|
337
|
+
service: Any, invocation: Invocation, project_id: int
|
|
338
|
+
) -> list[dict[str, Any]]:
|
|
339
|
+
"""Each active connector's connections, every row carrying its ``connector_key``."""
|
|
340
|
+
rows: list[dict[str, Any]] = []
|
|
341
|
+
for key in service.call(_ACTIVE_CONNECTORS_SYMBOL):
|
|
342
|
+
listed = service.call(_symbol(invocation), connector_key=key, project_id=project_id)
|
|
343
|
+
rows.extend({"connector_key": key, **connection} for connection in listed)
|
|
344
|
+
return rows
|
|
345
|
+
|
|
346
|
+
|
|
335
347
|
def connector_connection_update(invocation: Invocation) -> HandlerResult:
|
|
336
348
|
"""Update a connection's credentials. ``--yes`` is always required.
|
|
337
349
|
|
|
@@ -359,6 +371,51 @@ def connector_connection_update(invocation: Invocation) -> HandlerResult:
|
|
|
359
371
|
return data, _meta(invocation, auth.workspace_id, project_id)
|
|
360
372
|
|
|
361
373
|
|
|
374
|
+
def _require_read_only_sql(query: Any) -> str:
|
|
375
|
+
"""Return ``query`` when it is one SELECT-style statement, or raise usage.
|
|
376
|
+
|
|
377
|
+
A first line of defence only: Mammoth runs the SQL as the connection's
|
|
378
|
+
database user, so that user's grants are what finally stop a write.
|
|
379
|
+
"""
|
|
380
|
+
if not isinstance(query, str) or not query.strip():
|
|
381
|
+
raise CliError(
|
|
382
|
+
code=CODE_INVALID_ARGUMENT,
|
|
383
|
+
message="The 'query' input field must be a non-empty SQL string.",
|
|
384
|
+
exit_status=EXIT_USAGE,
|
|
385
|
+
)
|
|
386
|
+
bare = _SQL_STRING.sub(" ", query).strip().rstrip(";").strip()
|
|
387
|
+
if ";" in bare or not _SQL_READ_START.match(bare) or _SQL_WRITE_WORD.search(bare):
|
|
388
|
+
raise CliError(
|
|
389
|
+
code=CODE_INVALID_ARGUMENT,
|
|
390
|
+
message="connector connection query runs one read-only SELECT statement.",
|
|
391
|
+
exit_status=EXIT_USAGE,
|
|
392
|
+
hint=(
|
|
393
|
+
"Send a single SELECT (or WITH ... SELECT) without INSERT, UPDATE, DELETE or "
|
|
394
|
+
"DDL. To import rows as a dataset use 'dataset create'."
|
|
395
|
+
),
|
|
396
|
+
)
|
|
397
|
+
return query
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
def connector_connection_query(invocation: Invocation) -> HandlerResult:
|
|
401
|
+
"""Run one SELECT on a connection and return sample rows; saves nothing, no ``--yes``."""
|
|
402
|
+
project_id = require_project(invocation)
|
|
403
|
+
connector_key = _require_string_positional_at(invocation, 0, "connector key")
|
|
404
|
+
connection_key = _require_string_positional_at(invocation, 1, "connection key")
|
|
405
|
+
document = invocation.load_input()
|
|
406
|
+
kwargs: dict[str, Any] = {
|
|
407
|
+
"connector_key": connector_key,
|
|
408
|
+
"connection_key": connection_key,
|
|
409
|
+
"query": _require_read_only_sql(_require_field(document, "query")),
|
|
410
|
+
"project_id": project_id,
|
|
411
|
+
}
|
|
412
|
+
assert document is not None
|
|
413
|
+
_forward_optional(document, kwargs, _QUERY_OPTIONAL)
|
|
414
|
+
with open_service(invocation) as (service, auth):
|
|
415
|
+
data = service.call(_symbol(invocation), **kwargs)
|
|
416
|
+
return data, _meta(invocation, auth.workspace_id, project_id)
|
|
417
|
+
|
|
418
|
+
|
|
362
419
|
def connector_ds_config_create(invocation: Invocation) -> HandlerResult:
|
|
363
420
|
"""Sample a data source config; REST ``query`` is a JSON string. ``--yes`` always needed."""
|
|
364
421
|
project_id = require_project(invocation)
|