apm-cli 0.14.2__tar.gz → 0.16.0__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.
- {apm_cli-0.14.2/src/apm_cli.egg-info → apm_cli-0.16.0}/PKG-INFO +1 -1
- {apm_cli-0.14.2 → apm_cli-0.16.0}/pyproject.toml +2 -1
- apm_cli-0.16.0/src/apm_cli/adapters/client/_mcp_runtime_args.py +61 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/client/claude.py +22 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/client/codex.py +10 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/client/copilot.py +10 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/cache/git_cache.py +47 -12
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/cli.py +2 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/compile/cli.py +15 -7
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/compile/watcher.py +33 -4
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/config.py +158 -9
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/deps/__init__.py +2 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/deps/cli.py +4 -0
- apm_cli-0.16.0/src/apm_cli/commands/deps/why.py +247 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/install.py +59 -51
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/marketplace/__init__.py +286 -146
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/outdated.py +32 -23
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/pack.py +2 -2
- apm_cli-0.16.0/src/apm_cli/commands/publish.py +255 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/agents_compiler.py +94 -18
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/claude_formatter.py +40 -16
- apm_cli-0.16.0/src/apm_cli/config.py +467 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/experimental.py +12 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/token_manager.py +1 -1
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/artifactory_orchestrator.py +8 -3
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/git_reference_resolver.py +34 -0
- apm_cli-0.16.0/src/apm_cli/deps/git_semver_resolver.py +348 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/github_downloader.py +25 -11
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/installed_package.py +17 -1
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/lockfile.py +227 -18
- apm_cli-0.16.0/src/apm_cli/deps/outdated_row.py +17 -0
- apm_cli-0.16.0/src/apm_cli/deps/registry/__init__.py +62 -0
- apm_cli-0.16.0/src/apm_cli/deps/registry/auth.py +235 -0
- apm_cli-0.16.0/src/apm_cli/deps/registry/client.py +367 -0
- apm_cli-0.16.0/src/apm_cli/deps/registry/config_loader.py +124 -0
- apm_cli-0.16.0/src/apm_cli/deps/registry/extractor.py +277 -0
- apm_cli-0.16.0/src/apm_cli/deps/registry/feature_gate.py +29 -0
- apm_cli-0.16.0/src/apm_cli/deps/registry/outdated.py +296 -0
- apm_cli-0.16.0/src/apm_cli/deps/registry/resolver.py +426 -0
- apm_cli-0.16.0/src/apm_cli/deps/registry/semver.py +68 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/registry_proxy.py +9 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/transport_selection.py +2 -1
- apm_cli-0.16.0/src/apm_cli/deps/why_walker.py +297 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/drift.py +76 -7
- apm_cli-0.16.0/src/apm_cli/install/artifactory_resolver.py +321 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/context.py +13 -4
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/package_resolution.py +35 -5
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/download.py +10 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/integrate.py +25 -1
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/policy_gate.py +8 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/policy_target_check.py +4 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/resolve.py +379 -22
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/pipeline.py +2 -0
- apm_cli-0.16.0/src/apm_cli/install/registry_wiring.py +63 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/request.py +5 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/service.py +1 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/sources.py +145 -6
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/summary.py +9 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/validation.py +17 -6
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/agent_integrator.py +44 -75
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/hook_integrator.py +77 -21
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/instruction_integrator.py +1 -2
- apm_cli-0.16.0/src/apm_cli/integration/opencode_frontmatter.py +130 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/targets.py +5 -3
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/builder.py +133 -21
- apm_cli-0.16.0/src/apm_cli/marketplace/client.py +735 -0
- apm_cli-0.16.0/src/apm_cli/marketplace/models.py +471 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/output_mappers.py +20 -3
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/publisher.py +12 -9
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/resolver.py +151 -17
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/semver.py +15 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/yml_editor.py +9 -2
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/yml_schema.py +69 -6
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/models/apm_package.py +170 -3
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/models/dependency/reference.py +247 -2
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/__init__.py +2 -0
- apm_cli-0.16.0/src/apm_cli/policy/_constraint_pinning.py +204 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/_help_text.py +12 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/inheritance.py +6 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/install_preflight.py +8 -1
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/parser.py +14 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/policy_checks.py +149 -1
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/schema.py +22 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/registry/client.py +1 -4
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/github_host.py +94 -10
- {apm_cli-0.14.2 → apm_cli-0.16.0/src/apm_cli.egg-info}/PKG-INFO +1 -1
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli.egg-info/SOURCES.txt +19 -0
- apm_cli-0.14.2/src/apm_cli/config.py +0 -212
- apm_cli-0.14.2/src/apm_cli/marketplace/client.py +0 -448
- apm_cli-0.14.2/src/apm_cli/marketplace/models.py +0 -224
- {apm_cli-0.14.2 → apm_cli-0.16.0}/AUTHORS +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/LICENSE +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/NOTICE +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/README.md +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/setup.cfg +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/client/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/client/base.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/client/cursor.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/client/gemini.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/client/opencode.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/client/vscode.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/client/windsurf.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/package_manager/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/package_manager/base.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/adapters/package_manager/default_manager.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/bundle/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/bundle/local_bundle.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/bundle/lockfile_enrichment.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/bundle/packer.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/bundle/plugin_exporter.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/bundle/unpacker.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/cache/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/cache/http_cache.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/cache/integrity.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/cache/locking.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/cache/paths.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/cache/url_normalize.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/_apm_yml_writer.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/_helpers.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/audit.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/cache.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/compile/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/deps/_utils.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/experimental.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/init.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/list_cmd.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/marketplace/check.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/marketplace/doctor.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/marketplace/init.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/marketplace/migrate.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/marketplace/outdated.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/marketplace/plugin/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/marketplace/plugin/add.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/marketplace/plugin/remove.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/marketplace/plugin/set.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/marketplace/publish.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/marketplace/validate.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/mcp.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/plugin/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/plugin/init.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/policy.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/prune.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/run.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/runtime.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/self_update.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/targets.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/uninstall/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/uninstall/cli.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/uninstall/engine.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/update.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/commands/view.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/build_id.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/constants.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/constitution.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/constitution_block.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/context_optimizer.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/distributed_compiler.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/gemini_formatter.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/injector.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/link_resolver.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/output_writer.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/compilation/template_builder.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/constants.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/apm_yml.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/auth.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/azure_cli.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/build_orchestrator.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/command_logger.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/conflict_detector.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/docker_args.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/errors.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/null_logger.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/operations.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/safe_installer.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/scope.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/script_runner.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/core/target_detection.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/_shared.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/aggregator.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/apm_resolver.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/artifactory_entry.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/bare_cache.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/clone_engine.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/dependency_graph.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/download_strategies.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/git_auth_env.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/git_remote_ops.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/github_downloader_validation.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/host_backends.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/package_validator.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/plugin_parser.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/shared_clone_cache.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/tiered_ref_resolver.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/deps/verifier.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/factory.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/cache_pin.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/drift.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/errors.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/gitlab_resolver.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/heals/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/heals/base.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/heals/branch_ref_drift.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/heals/buggy_lockfile_recovery.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/helpers/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/helpers/security_scan.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/insecure_policy.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/local_bundle_handler.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/mcp/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/mcp/args.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/mcp/command.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/mcp/conflicts.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/mcp/entry.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/mcp/registry.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/mcp/warnings.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/mcp/writer.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/_redownload.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/cleanup.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/finalize.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/heal.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/local_content.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/lockfile.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/post_deps_local.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/phases/targets.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/plan.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/presentation/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/presentation/dry_run.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/services.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/skill_path_migration.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/install/template.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/base_integrator.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/cleanup.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/command_integrator.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/copilot_app_db.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/copilot_app_project.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/copilot_app_workflow_integrator.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/copilot_app_ws.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/copilot_cowork_paths.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/coverage.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/dispatch.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/mcp_integrator.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/mcp_integrator_install.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/prompt_integrator.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/skill_integrator.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/skill_transformer.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/integration/utils.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/_git_utils.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/_io.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/_shared.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/diagnostics.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/drift_check.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/errors.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/git_stderr.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/init_template.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/migration.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/output_profiles.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/pr_integration.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/ref_resolver.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/registry.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/shadow_detector.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/tag_pattern.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/validator.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/version_check.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/marketplace/version_pins.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/models/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/models/dependency/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/models/dependency/mcp.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/models/dependency/types.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/models/plugin.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/models/results.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/models/validation.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/output/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/output/formatters.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/output/models.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/output/script_formatters.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/_shared.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/ci_checks.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/discovery.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/matcher.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/models.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/outcome_routing.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/policy/project_config.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/primitives/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/primitives/discovery.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/primitives/models.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/primitives/parser.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/registry/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/registry/integration.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/registry/operations.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/runtime/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/runtime/base.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/runtime/codex_runtime.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/runtime/copilot_runtime.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/runtime/factory.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/runtime/llm_runtime.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/runtime/manager.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/runtime/utils.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/security/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/security/audit_report.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/security/content_scanner.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/security/file_scanner.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/security/gate.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/update_policy.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/atomic_io.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/console.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/content_hash.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/diagnostics.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/exclude.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/file_ops.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/git_env.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/git_sparse.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/guards.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/helpers.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/install_tui.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/normalization.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/path_security.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/paths.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/patterns.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/reflink.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/short_sha.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/subprocess_env.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/version_checker.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/utils/yaml_io.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/version.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/workflow/__init__.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/workflow/discovery.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/workflow/parser.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli/workflow/runner.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli.egg-info/dependency_links.txt +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli.egg-info/entry_points.txt +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli.egg-info/requires.txt +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/src/apm_cli.egg-info/top_level.txt +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_apm_package_models.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_apm_resolver.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_codex_docker_args_fix.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_codex_empty_string_and_defaults.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_collision_integration.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_console.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_distributed_compilation.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_empty_string_and_defaults.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_enhanced_discovery.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_github_downloader.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_github_downloader_token_precedence.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_lockfile.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_runnable_prompts.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_runtime_manager_token_precedence.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_token_manager.py +0 -0
- {apm_cli-0.14.2 → apm_cli-0.16.0}/tests/test_virtual_package_multi_install.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "apm-cli"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.16.0"
|
|
8
8
|
description = "MCP configuration tool"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -165,5 +165,6 @@ markers = [
|
|
|
165
165
|
"requires_runtime_copilot: requires GitHub Copilot CLI runtime installed",
|
|
166
166
|
"requires_runtime_llm: requires llm runtime installed",
|
|
167
167
|
"requires_inference: requires APM_RUN_INFERENCE_TESTS=1 + model API access",
|
|
168
|
+
"req: binds a test to one or more OpenAPM req-XXX ids (spec-conformance suite)",
|
|
168
169
|
]
|
|
169
170
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""Shared helper for MCP v0.1 runtimeArguments.variables handling.
|
|
2
|
+
|
|
3
|
+
Extracted to avoid R0801 duplicate-code violations across adapter modules
|
|
4
|
+
that each implement a ``_process_arguments`` method but share identical v0.1
|
|
5
|
+
``value_hint`` processing logic (copilot and codex).
|
|
6
|
+
|
|
7
|
+
Usage in an adapter's ``_process_arguments`` loop::
|
|
8
|
+
|
|
9
|
+
from ._mcp_runtime_args import process_v01_value_hint_arg
|
|
10
|
+
|
|
11
|
+
elif not arg_type and "value_hint" in arg:
|
|
12
|
+
value = process_v01_value_hint_arg(arg, runtime_vars)
|
|
13
|
+
if value:
|
|
14
|
+
processed.append(self._resolve_variable_placeholders(
|
|
15
|
+
value, resolved_env, runtime_vars
|
|
16
|
+
))
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def process_v01_value_hint_arg(arg: dict, runtime_vars: dict | None) -> str | None:
|
|
23
|
+
"""Process a single v0.1-format runtimeArguments entry.
|
|
24
|
+
|
|
25
|
+
A v0.1 entry has a ``value_hint`` key but no ``type`` key. An optional
|
|
26
|
+
``variables`` dict maps placeholder names to their metadata.
|
|
27
|
+
|
|
28
|
+
The ``is_required`` field on the *arg itself* controls whether the entry
|
|
29
|
+
participates in argument building. Entries with ``is_required: False``
|
|
30
|
+
are optional hints that must be skipped -- VS Code's extractor only
|
|
31
|
+
includes entries with ``is_required: True``, so including them would
|
|
32
|
+
produce extra, unintended CLI args. When ``is_required`` is absent the
|
|
33
|
+
entry is treated as required (default True).
|
|
34
|
+
|
|
35
|
+
Args:
|
|
36
|
+
arg: The argument dict to process. Must contain ``value_hint``.
|
|
37
|
+
runtime_vars: Resolved APM template variables (may be ``None`` or
|
|
38
|
+
empty).
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
The processed value string after ``{var_name}`` placeholder
|
|
42
|
+
substitution, or ``None`` if the entry should be skipped (optional
|
|
43
|
+
hint or empty value).
|
|
44
|
+
"""
|
|
45
|
+
# Skip optional legacy hints that are not required.
|
|
46
|
+
if not arg.get("is_required", True):
|
|
47
|
+
return None
|
|
48
|
+
|
|
49
|
+
value: str = arg.get("value_hint", "")
|
|
50
|
+
if not value:
|
|
51
|
+
return None
|
|
52
|
+
|
|
53
|
+
if "variables" in arg:
|
|
54
|
+
for var_name in arg["variables"]:
|
|
55
|
+
if runtime_vars and var_name in runtime_vars:
|
|
56
|
+
replacement = runtime_vars[var_name]
|
|
57
|
+
else:
|
|
58
|
+
replacement = f"${{{var_name}}}"
|
|
59
|
+
value = value.replace(f"{{{var_name}}}", replacement)
|
|
60
|
+
|
|
61
|
+
return value or None
|
|
@@ -48,6 +48,28 @@ class ClaudeClientAdapter(CopilotClientAdapter):
|
|
|
48
48
|
# See #1152 supply-chain analysis.
|
|
49
49
|
_supports_runtime_env_substitution: bool = False
|
|
50
50
|
|
|
51
|
+
# Skill packages declare self-defined MCP launchers using the cross-tool
|
|
52
|
+
# converged path ``.agents/skills/<name>/...`` (see
|
|
53
|
+
# https://microsoft.github.io/apm/reference/targets-matrix/#skills-convergence).
|
|
54
|
+
# Claude is the only target that does NOT converge to ``.agents/skills/``
|
|
55
|
+
# -- it keeps ``.claude/skills/`` (see install/skill_path_migration.py:55).
|
|
56
|
+
# Rewrite the command prefix so ``.mcp.json`` points at where the launcher
|
|
57
|
+
# actually lives after deploy.
|
|
58
|
+
_CONVERGED_SKILL_PREFIX = ".agents/skills/"
|
|
59
|
+
_CLAUDE_SKILL_PREFIX = ".claude/skills/"
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def _rewrite_self_defined_skill_command(cls, command: str) -> str:
|
|
63
|
+
if isinstance(command, str) and command.startswith(cls._CONVERGED_SKILL_PREFIX):
|
|
64
|
+
return cls._CLAUDE_SKILL_PREFIX + command[len(cls._CONVERGED_SKILL_PREFIX) :]
|
|
65
|
+
return command
|
|
66
|
+
|
|
67
|
+
def _format_server_config(self, server_info, env_overrides=None, runtime_vars=None):
|
|
68
|
+
config = super()._format_server_config(server_info, env_overrides, runtime_vars)
|
|
69
|
+
if isinstance(config, dict) and "command" in config:
|
|
70
|
+
config["command"] = self._rewrite_self_defined_skill_command(config["command"])
|
|
71
|
+
return config
|
|
72
|
+
|
|
51
73
|
@staticmethod
|
|
52
74
|
def _normalize_mcp_entry_for_claude_code(entry: dict) -> dict:
|
|
53
75
|
"""Normalize a server entry to Claude Code's on-disk shape.
|
|
@@ -10,6 +10,7 @@ import toml
|
|
|
10
10
|
from ...registry.client import SimpleRegistryClient
|
|
11
11
|
from ...registry.integration import RegistryIntegration
|
|
12
12
|
from ...utils.console import _rich_success, _rich_warning
|
|
13
|
+
from ._mcp_runtime_args import process_v01_value_hint_arg
|
|
13
14
|
from .base import MCPClientAdapter
|
|
14
15
|
|
|
15
16
|
_log = logging.getLogger(__name__)
|
|
@@ -422,6 +423,15 @@ class CodexClientAdapter(MCPClientAdapter):
|
|
|
422
423
|
str(additional_value), resolved_env, runtime_vars
|
|
423
424
|
)
|
|
424
425
|
processed.append(processed_value)
|
|
426
|
+
elif not arg_type and "value_hint" in arg:
|
|
427
|
+
# v0.1 registry format: shared helper handles is_required
|
|
428
|
+
# guard and {var_name} placeholder substitution.
|
|
429
|
+
value = process_v01_value_hint_arg(arg, runtime_vars)
|
|
430
|
+
if value:
|
|
431
|
+
processed_value = self._resolve_variable_placeholders(
|
|
432
|
+
value, resolved_env, runtime_vars
|
|
433
|
+
)
|
|
434
|
+
processed.append(processed_value)
|
|
425
435
|
elif isinstance(arg, str):
|
|
426
436
|
# Already a string, use as-is but resolve variable placeholders
|
|
427
437
|
processed_value = self._resolve_variable_placeholders(
|
|
@@ -18,6 +18,7 @@ from ...registry.client import SimpleRegistryClient
|
|
|
18
18
|
from ...registry.integration import RegistryIntegration
|
|
19
19
|
from ...utils.console import _rich_warning
|
|
20
20
|
from ...utils.github_host import is_github_hostname
|
|
21
|
+
from ._mcp_runtime_args import process_v01_value_hint_arg
|
|
21
22
|
from .base import (
|
|
22
23
|
_ENV_PLACEHOLDER_RE,
|
|
23
24
|
_ENV_VAR_RE,
|
|
@@ -982,6 +983,15 @@ class CopilotClientAdapter(MCPClientAdapter):
|
|
|
982
983
|
str(value), resolved_env, runtime_vars
|
|
983
984
|
)
|
|
984
985
|
processed.append(processed_value)
|
|
986
|
+
elif not arg_type and "value_hint" in arg:
|
|
987
|
+
# v0.1 registry format: shared helper handles is_required
|
|
988
|
+
# guard and {var_name} placeholder substitution.
|
|
989
|
+
value = process_v01_value_hint_arg(arg, runtime_vars)
|
|
990
|
+
if value:
|
|
991
|
+
processed_value = self._resolve_variable_placeholders(
|
|
992
|
+
value, resolved_env, runtime_vars
|
|
993
|
+
)
|
|
994
|
+
processed.append(processed_value)
|
|
985
995
|
elif isinstance(arg, str):
|
|
986
996
|
# Already a string, use as-is but resolve variable placeholders
|
|
987
997
|
processed_value = self._resolve_variable_placeholders(
|
|
@@ -45,6 +45,32 @@ _log = logging.getLogger(__name__)
|
|
|
45
45
|
# Full SHA pattern: 40 hex characters
|
|
46
46
|
_SHA_RE = re.compile(r"^[0-9a-f]{40}$", re.IGNORECASE)
|
|
47
47
|
|
|
48
|
+
|
|
49
|
+
def _safe_git_args() -> list[str]:
|
|
50
|
+
"""Return hardening ``-c`` args prepended to every git subprocess.
|
|
51
|
+
|
|
52
|
+
- ``core.hooksPath=/dev/null`` disables any hook script that a
|
|
53
|
+
malicious upstream might ship (``.git/hooks/post-checkout`` etc.)
|
|
54
|
+
so a clone or checkout cannot trigger arbitrary code execution.
|
|
55
|
+
- ``submodule.recurse=false`` prevents any subcommand from
|
|
56
|
+
recursing into attacker-controlled submodule URLs.
|
|
57
|
+
|
|
58
|
+
These flags are scoped per-invocation via ``-c`` and never mutate
|
|
59
|
+
the user's gitconfig. The cache layer is the single source of
|
|
60
|
+
truth for git subprocess invocation -- callers must use this
|
|
61
|
+
helper rather than ad-hoc ``git`` argv construction.
|
|
62
|
+
"""
|
|
63
|
+
from ..utils.git_env import git_long_paths_args
|
|
64
|
+
|
|
65
|
+
return [
|
|
66
|
+
*git_long_paths_args(),
|
|
67
|
+
"-c",
|
|
68
|
+
"core.hooksPath=/dev/null",
|
|
69
|
+
"-c",
|
|
70
|
+
"submodule.recurse=false",
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
|
|
48
74
|
# Partial bare-cache flavor suffix (perf #1433 follow-up).
|
|
49
75
|
# When a caller requests sparse_paths, we use a separate bare keyed at
|
|
50
76
|
# ``<shard>__p`` cloned with ``--filter=blob:none``. The partial bare
|
|
@@ -214,7 +240,7 @@ class GitCache:
|
|
|
214
240
|
# auth-delegated: cache-layer ref resolution runs after lockfile
|
|
215
241
|
# already pinned the commit; no PAT->bearer fallback applies here
|
|
216
242
|
# (env is sanitized, no embedded creds).
|
|
217
|
-
cmd = [git_exe, "ls-remote", url]
|
|
243
|
+
cmd = [git_exe, *_safe_git_args(), "ls-remote", url]
|
|
218
244
|
if ref:
|
|
219
245
|
cmd.append(ref)
|
|
220
246
|
|
|
@@ -287,7 +313,7 @@ class GitCache:
|
|
|
287
313
|
|
|
288
314
|
Returns the path to the bare repo directory.
|
|
289
315
|
"""
|
|
290
|
-
from ..utils.git_env import get_git_executable,
|
|
316
|
+
from ..utils.git_env import get_git_executable, git_subprocess_env
|
|
291
317
|
|
|
292
318
|
bare_shard = shard_key + (_PARTIAL_BARE_SUFFIX if partial else "")
|
|
293
319
|
bare_dir = self._db_root / bare_shard
|
|
@@ -318,7 +344,14 @@ class GitCache:
|
|
|
318
344
|
os.chmod(str(staged), 0o700)
|
|
319
345
|
|
|
320
346
|
subprocess_env = env if env is not None else git_subprocess_env()
|
|
321
|
-
clone_args = [
|
|
347
|
+
clone_args = [
|
|
348
|
+
git_exe,
|
|
349
|
+
*_safe_git_args(),
|
|
350
|
+
"clone",
|
|
351
|
+
"--bare",
|
|
352
|
+
"--no-tags",
|
|
353
|
+
"--no-recurse-submodules",
|
|
354
|
+
]
|
|
322
355
|
if partial:
|
|
323
356
|
# Promisor partial clone: trees + commits only. Blobs
|
|
324
357
|
# arrive lazily via the remote when the consumer needs
|
|
@@ -368,10 +401,11 @@ class GitCache:
|
|
|
368
401
|
subprocess.run(
|
|
369
402
|
[
|
|
370
403
|
git_exe,
|
|
371
|
-
*
|
|
404
|
+
*_safe_git_args(),
|
|
372
405
|
"clone",
|
|
373
406
|
"--bare",
|
|
374
407
|
"--no-tags",
|
|
408
|
+
"--no-recurse-submodules",
|
|
375
409
|
url,
|
|
376
410
|
str(staged),
|
|
377
411
|
],
|
|
@@ -456,7 +490,7 @@ class GitCache:
|
|
|
456
490
|
get the lock and return immediately. Critical for CI matrix
|
|
457
491
|
builds where multiple jobs hit the same uncached repo.
|
|
458
492
|
"""
|
|
459
|
-
from ..utils.git_env import get_git_executable,
|
|
493
|
+
from ..utils.git_env import get_git_executable, git_subprocess_env
|
|
460
494
|
|
|
461
495
|
bare_shard = shard_key + (_PARTIAL_BARE_SUFFIX if promisor_url else "")
|
|
462
496
|
bare_dir = self._db_root / bare_shard
|
|
@@ -505,11 +539,12 @@ class GitCache:
|
|
|
505
539
|
subprocess.run(
|
|
506
540
|
[
|
|
507
541
|
git_exe,
|
|
508
|
-
*
|
|
542
|
+
*_safe_git_args(),
|
|
509
543
|
"clone",
|
|
510
544
|
"--local",
|
|
511
545
|
"--shared",
|
|
512
546
|
"--no-checkout",
|
|
547
|
+
"--no-recurse-submodules",
|
|
513
548
|
str(bare_dir),
|
|
514
549
|
str(staged),
|
|
515
550
|
],
|
|
@@ -536,7 +571,7 @@ class GitCache:
|
|
|
536
571
|
subprocess.run(
|
|
537
572
|
[
|
|
538
573
|
git_exe,
|
|
539
|
-
*
|
|
574
|
+
*_safe_git_args(),
|
|
540
575
|
"-C",
|
|
541
576
|
str(staged),
|
|
542
577
|
"config",
|
|
@@ -558,13 +593,13 @@ class GitCache:
|
|
|
558
593
|
staged,
|
|
559
594
|
list(sparse_paths),
|
|
560
595
|
env=subprocess_env,
|
|
561
|
-
extra_git_args=
|
|
596
|
+
extra_git_args=_safe_git_args(),
|
|
562
597
|
)
|
|
563
598
|
# Checkout the specific SHA
|
|
564
599
|
subprocess.run(
|
|
565
600
|
[
|
|
566
601
|
git_exe,
|
|
567
|
-
*
|
|
602
|
+
*_safe_git_args(),
|
|
568
603
|
"-C",
|
|
569
604
|
str(staged),
|
|
570
605
|
"checkout",
|
|
@@ -606,7 +641,7 @@ class GitCache:
|
|
|
606
641
|
subprocess_env = env if env is not None else git_subprocess_env()
|
|
607
642
|
try:
|
|
608
643
|
result = subprocess.run(
|
|
609
|
-
[git_exe, "-C", str(bare_dir), "cat-file", "-t", sha],
|
|
644
|
+
[git_exe, *_safe_git_args(), "-C", str(bare_dir), "cat-file", "-t", sha],
|
|
610
645
|
capture_output=True,
|
|
611
646
|
text=True,
|
|
612
647
|
timeout=10,
|
|
@@ -648,7 +683,7 @@ class GitCache:
|
|
|
648
683
|
# so we don't pull all blobs reachable from the new SHA. Detected
|
|
649
684
|
# via shard-suffix naming convention (cheap, no git config probe).
|
|
650
685
|
is_partial = bare_dir.name.endswith(_PARTIAL_BARE_SUFFIX)
|
|
651
|
-
fetch_args = [git_exe, "-C", str(bare_dir), "fetch"]
|
|
686
|
+
fetch_args = [git_exe, *_safe_git_args(), "-C", str(bare_dir), "fetch"]
|
|
652
687
|
if is_partial:
|
|
653
688
|
fetch_args += ["--filter=blob:none"]
|
|
654
689
|
fetch_args += [url, sha]
|
|
@@ -664,7 +699,7 @@ class GitCache:
|
|
|
664
699
|
except subprocess.CalledProcessError:
|
|
665
700
|
# Some servers don't allow fetching by SHA -- fetch all refs
|
|
666
701
|
subprocess.run(
|
|
667
|
-
[git_exe, "-C", str(bare_dir), "fetch", "--all"],
|
|
702
|
+
[git_exe, *_safe_git_args(), "-C", str(bare_dir), "fetch", "--all"],
|
|
668
703
|
capture_output=True,
|
|
669
704
|
text=True,
|
|
670
705
|
timeout=120,
|
|
@@ -34,6 +34,7 @@ from apm_cli.commands.pack import pack_cmd, unpack_cmd
|
|
|
34
34
|
from apm_cli.commands.plugin import plugin as plugin_cmd
|
|
35
35
|
from apm_cli.commands.policy import policy
|
|
36
36
|
from apm_cli.commands.prune import prune
|
|
37
|
+
from apm_cli.commands.publish import publish_cmd
|
|
37
38
|
from apm_cli.commands.run import preview, run
|
|
38
39
|
from apm_cli.commands.runtime import runtime
|
|
39
40
|
from apm_cli.commands.self_update import self_update
|
|
@@ -87,6 +88,7 @@ cli.add_command(
|
|
|
87
88
|
)
|
|
88
89
|
cli.add_command(pack_cmd, name="pack")
|
|
89
90
|
cli.add_command(unpack_cmd, name="unpack")
|
|
91
|
+
cli.add_command(publish_cmd, name="publish")
|
|
90
92
|
cli.add_command(init)
|
|
91
93
|
cli.add_command(install)
|
|
92
94
|
cli.add_command(uninstall)
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import dataclasses
|
|
5
6
|
import sys
|
|
6
7
|
from pathlib import Path
|
|
7
8
|
from typing import TYPE_CHECKING
|
|
@@ -521,6 +522,17 @@ def compile(
|
|
|
521
522
|
|
|
522
523
|
# Watch mode
|
|
523
524
|
if watch:
|
|
525
|
+
# --clean removes orphaned outputs from a previous targets:
|
|
526
|
+
# configuration and would surprise users if run on every
|
|
527
|
+
# recompile mid-session; running it only on the initial
|
|
528
|
+
# compile would re-introduce a watcher-specific code path.
|
|
529
|
+
# Surface that --clean is ignored here so users can run
|
|
530
|
+
# `apm compile --clean` separately between watch sessions.
|
|
531
|
+
if clean:
|
|
532
|
+
logger.warning(
|
|
533
|
+
"--clean is ignored in watch mode; run 'apm compile --clean' "
|
|
534
|
+
"separately to remove orphaned outputs."
|
|
535
|
+
)
|
|
524
536
|
# Resolve the same effective target the one-shot path uses so
|
|
525
537
|
# `targets: [claude, cursor]` does not silently regress to the
|
|
526
538
|
# all-families fanout on every recompile (#1345).
|
|
@@ -534,6 +546,7 @@ def compile(
|
|
|
534
546
|
effective_target=effective_target,
|
|
535
547
|
target_label_user=target,
|
|
536
548
|
target_label_config=config_target,
|
|
549
|
+
cli_target=target,
|
|
537
550
|
)
|
|
538
551
|
return
|
|
539
552
|
|
|
@@ -775,15 +788,10 @@ def compile(
|
|
|
775
788
|
else:
|
|
776
789
|
# Traditional single-file compilation - keep existing logic
|
|
777
790
|
# Perform initial compilation in dry-run to get generated body (without constitution)
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
output_path=config.output_path,
|
|
781
|
-
chatmode=config.chatmode,
|
|
782
|
-
resolve_links=config.resolve_links,
|
|
791
|
+
intermediate_config = dataclasses.replace(
|
|
792
|
+
config,
|
|
783
793
|
dry_run=True, # force
|
|
784
|
-
with_constitution=config.with_constitution,
|
|
785
794
|
strategy="single-file",
|
|
786
|
-
target=config.target,
|
|
787
795
|
)
|
|
788
796
|
intermediate_result = compiler.compile(intermediate_config)
|
|
789
797
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import os
|
|
5
6
|
import time
|
|
6
7
|
from typing import TYPE_CHECKING, Any
|
|
7
8
|
|
|
@@ -67,6 +68,7 @@ class APMFileHandler:
|
|
|
67
68
|
dry_run: bool,
|
|
68
69
|
logger: CommandLogger,
|
|
69
70
|
effective_target: CompileTargetType | None = None,
|
|
71
|
+
cli_target: str | list[str] | None = None,
|
|
70
72
|
) -> None:
|
|
71
73
|
self.output = output
|
|
72
74
|
self.chatmode = chatmode
|
|
@@ -74,6 +76,11 @@ class APMFileHandler:
|
|
|
74
76
|
self.dry_run = dry_run
|
|
75
77
|
self.logger = logger
|
|
76
78
|
self.effective_target = effective_target
|
|
79
|
+
# Raw --target CLI argument retained so ``_recompile`` can
|
|
80
|
+
# re-run :func:`_resolve_effective_target` against the
|
|
81
|
+
# current apm.yml on every recompile, letting mid-session
|
|
82
|
+
# ``targets:`` edits take effect on the next file event.
|
|
83
|
+
self.cli_target = cli_target
|
|
77
84
|
self.last_compile = 0.0
|
|
78
85
|
self.debounce_delay = 1.0 # 1 second debounce
|
|
79
86
|
|
|
@@ -95,12 +102,28 @@ class APMFileHandler:
|
|
|
95
102
|
self.logger.progress(f"File changed: {changed_file}", symbol="eyes")
|
|
96
103
|
self.logger.progress("Recompiling...", symbol="gear")
|
|
97
104
|
|
|
105
|
+
# When apm.yml itself was the trigger, re-resolve so a
|
|
106
|
+
# mid-session edit to ``target:`` / ``targets:`` takes
|
|
107
|
+
# effect on this recompile, then persist the fresh value
|
|
108
|
+
# so subsequent instruction-file edits do not silently
|
|
109
|
+
# revert to the startup snapshot. Match on basename
|
|
110
|
+
# rather than ``endswith`` so a stray ``backup_apm.yml``
|
|
111
|
+
# cannot masquerade as the project root manifest.
|
|
112
|
+
effective_target = self.effective_target
|
|
113
|
+
if os.path.basename(changed_file) == APM_YML_FILENAME:
|
|
114
|
+
from .cli import _resolve_effective_target
|
|
115
|
+
|
|
116
|
+
effective_target, _reason, _config_target = _resolve_effective_target(
|
|
117
|
+
self.cli_target
|
|
118
|
+
)
|
|
119
|
+
self.effective_target = effective_target
|
|
120
|
+
|
|
98
121
|
config = CompilationConfig.from_apm_yml(
|
|
99
122
|
output_path=self.output if self.output != AGENTS_MD_FILENAME else None,
|
|
100
123
|
chatmode=self.chatmode,
|
|
101
124
|
resolve_links=not self.no_links if self.no_links else None,
|
|
102
125
|
dry_run=self.dry_run,
|
|
103
|
-
target=
|
|
126
|
+
target=effective_target,
|
|
104
127
|
)
|
|
105
128
|
|
|
106
129
|
compiler = AgentsCompiler(".")
|
|
@@ -129,15 +152,20 @@ def _watch_mode(
|
|
|
129
152
|
effective_target: CompileTargetType | None = None,
|
|
130
153
|
target_label_user: str | list[str] | None = None,
|
|
131
154
|
target_label_config: str | list[str] | None = None,
|
|
155
|
+
cli_target: str | list[str] | None = None,
|
|
132
156
|
) -> None:
|
|
133
157
|
"""Watch for changes in .apm/ directories and auto-recompile.
|
|
134
158
|
|
|
135
159
|
``effective_target`` is the compiler-understood target resolved by
|
|
136
160
|
:func:`apm_cli.commands.compile.cli._resolve_effective_target` (the
|
|
137
161
|
same resolver the one-shot path uses) and is forwarded as ``target=``
|
|
138
|
-
into
|
|
139
|
-
|
|
140
|
-
|
|
162
|
+
into the initial compile so the startup label matches the one-shot
|
|
163
|
+
path (#1345).
|
|
164
|
+
|
|
165
|
+
``cli_target`` is the raw ``--target`` argument; recompiles re-run
|
|
166
|
+
the resolver against the current apm.yml so mid-session edits to
|
|
167
|
+
``targets:`` take effect on the next file event without restarting
|
|
168
|
+
the watcher.
|
|
141
169
|
"""
|
|
142
170
|
logger = CommandLogger("compile-watch", verbose=verbose, dry_run=dry_run)
|
|
143
171
|
|
|
@@ -159,6 +187,7 @@ def _watch_mode(
|
|
|
159
187
|
dry_run,
|
|
160
188
|
logger,
|
|
161
189
|
effective_target=effective_target,
|
|
190
|
+
cli_target=cli_target,
|
|
162
191
|
)
|
|
163
192
|
observer = Observer()
|
|
164
193
|
|