agentpack-cli 0.3.33__tar.gz → 0.3.34__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.
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/PKG-INFO +9 -9
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/README.md +8 -8
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/pyproject.toml +1 -1
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/__init__.py +1 -1
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/doctor.py +54 -5
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/hook_cmd.py +325 -11
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/install.py +29 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/mcp_cmd.py +1 -1
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/pack.py +14 -7
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/repair.py +2 -1
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/review_cmd.py +373 -39
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/citations.py +28 -4
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/command_surface.py +15 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/context_pack.py +99 -6
- agentpack_cli-0.3.34/src/agentpack/core/mcp_runtime.py +96 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/agentpack-review.md +15 -7
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/agentpack.md +1 -2
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/.codex-plugin/plugin.json +1 -1
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/skills/agentpack-pack.md +5 -11
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/skills/agentpack-review.md +15 -8
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/skills/agentpack.md +1 -2
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/installers/antigravity.py +8 -1
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/installers/claude.py +8 -1
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/installers/codex.py +8 -1
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/installers/cursor.py +7 -1
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/installers/windsurf.py +7 -1
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/renderers/markdown.py +3 -2
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/.gitignore +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/LICENSE +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/adapters/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/adapters/antigravity.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/adapters/base.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/adapters/claude.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/adapters/codex.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/adapters/cursor.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/adapters/detect.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/adapters/generic.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/adapters/windsurf.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/broad_context.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/context_intent.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/dependency_graph.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/go_imports.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/java_imports.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/js_ts_imports.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/monorepo.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/naming_signals.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/python_ast.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/python_imports.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/ranking.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/repo_map.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/role_inference.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/rust_imports.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/symbols.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/task_classifier.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/analysis/tests.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/application/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/application/pack_service.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/cli.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/_shared.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/benchmark.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/ci_cmd.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/claude_cmd.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/compress_output.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/dashboard.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/dev_check.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/diagnose_selection.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/diff.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/eval_cmd.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/explain.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/guard.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/ignore_cmd.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/init.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/learn.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/memory.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/migrate.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/monitor.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/next_cmd.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/perf.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/quickstart.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/release_check.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/release_cmd.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/retrieve.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/route.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/scan.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/skills.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/start_cmd.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/state_cmd.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/stats.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/status.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/summarize.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/task_cmd.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/threads.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/tune.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/upgrade.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/verify_wheel.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/watch.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/workflow_cmd.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/commands/wrap.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/bootstrap.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/cache.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/changed_paths.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/config.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/diff.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/e2e_benchmark.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/evals.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/execution_state.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/git.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/git_hooks.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/global_install.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/ignore.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/loop_protocol.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/merkle.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/models.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/modes.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/pack_handoff.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/pack_registry.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/redactor.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/scanner.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/snapshot.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/structured_format.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/task_freshness.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/thread_context.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/token_estimator.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/toon_parser.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/core/vscode_tasks.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/dashboard/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/dashboard/collectors.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/dashboard/models.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/dashboard/renderers.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/agentpack-learn.md +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/.codexignore +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/.github/dependabot.yml +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/.github/workflows/hol-plugin-scanner.yml +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/LICENSE +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/README.md +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/SECURITY.md +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/assets/icon.svg +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/assets/route-demo.svg +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/skills/agentpack-learn.md +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/skills/agentpack-refresh.md +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/codex_plugin/skills/agentpack-route.md +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/review/stage1-understanding.md +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/data/review/stage2-judge.md +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/installers/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/integrations/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/integrations/agents.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/integrations/git_hooks.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/integrations/global_install.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/integrations/platform.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/integrations/vscode_tasks.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/learning/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/learning/collector.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/learning/episodes.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/learning/extractor.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/learning/feedback.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/learning/lesson_ranker.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/learning/models.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/learning/provider.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/learning/quality.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/learning/renderers.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/learning/skill_map.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/mcp_server.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/output_compression/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/output_compression/core.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/renderers/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/renderers/compact.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/renderers/receipts.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/renderers/toon.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/router/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/router/discovery.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/router/models.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/router/parser.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/router/prompt_builder.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/router/scoring.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/router/service.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/router/skills_index.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/session/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/session/events.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/session/references.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/session/state.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/summaries/__init__.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/summaries/base.py +0 -0
- {agentpack_cli-0.3.33 → agentpack_cli-0.3.34}/src/agentpack/summaries/offline.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentpack-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.34
|
|
4
4
|
Summary: Local context engine for AI coding agents that ranks relevant repo files and builds compact task-focused context packs for Claude Code, Codex, Cursor, Windsurf, MCP, and CI workflows.
|
|
5
5
|
Project-URL: Homepage, https://github.com/vishal2612200/agentpack
|
|
6
6
|
Project-URL: Documentation, https://vishal2612200.github.io/agentpack/
|
|
@@ -183,14 +183,14 @@ It reuses cached file summaries and snapshot metadata so repeated packs do not s
|
|
|
183
183
|
- freshness warnings when task or git state changes
|
|
184
184
|
- local benchmark data when selected context misses real changed files
|
|
185
185
|
|
|
186
|
-
## What's Current In 0.3.
|
|
186
|
+
## What's Current In 0.3.34
|
|
187
187
|
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
-
|
|
191
|
-
-
|
|
192
|
-
-
|
|
193
|
-
-
|
|
188
|
+
- MCP setup is now checked in normal install, repair, and doctor flows, with clear separation between config registration, local runtime readiness, and live host exposure.
|
|
189
|
+
- Agent instructions now prefer MCP only after a readiness call proves live tools, then fall back to bounded diagnostics, CLI context refresh, and direct repo search when host tools are missing.
|
|
190
|
+
- Review and deployment tasks now get stronger source-of-truth routing so PR reviews stay anchored to the target diff and deploy work prioritizes rendered config plus live platform state.
|
|
191
|
+
- `agentpack pack --task "<task>"` works again as a one-command task write plus context pack path, while `--task auto` remains the default context-source mode.
|
|
192
|
+
- TOON citation validation is stricter about path tokens so prose before evidence no longer turns into a bogus file path.
|
|
193
|
+
- Hook reminders are deduplicated per task/session and explain MCP fallback without repeating on every prompt.
|
|
194
194
|
|
|
195
195
|
## Proof So Far
|
|
196
196
|
|
|
@@ -346,7 +346,7 @@ pipx ensurepath
|
|
|
346
346
|
|
|
347
347
|
## Status
|
|
348
348
|
|
|
349
|
-
Alpha: `0.3.
|
|
349
|
+
Alpha: `0.3.34`.
|
|
350
350
|
|
|
351
351
|
Works, tested, and used in real sessions. Python and JavaScript/TypeScript have strongest support. APIs may change before 1.0.
|
|
352
352
|
|
|
@@ -136,14 +136,14 @@ It reuses cached file summaries and snapshot metadata so repeated packs do not s
|
|
|
136
136
|
- freshness warnings when task or git state changes
|
|
137
137
|
- local benchmark data when selected context misses real changed files
|
|
138
138
|
|
|
139
|
-
## What's Current In 0.3.
|
|
139
|
+
## What's Current In 0.3.34
|
|
140
140
|
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
-
|
|
141
|
+
- MCP setup is now checked in normal install, repair, and doctor flows, with clear separation between config registration, local runtime readiness, and live host exposure.
|
|
142
|
+
- Agent instructions now prefer MCP only after a readiness call proves live tools, then fall back to bounded diagnostics, CLI context refresh, and direct repo search when host tools are missing.
|
|
143
|
+
- Review and deployment tasks now get stronger source-of-truth routing so PR reviews stay anchored to the target diff and deploy work prioritizes rendered config plus live platform state.
|
|
144
|
+
- `agentpack pack --task "<task>"` works again as a one-command task write plus context pack path, while `--task auto` remains the default context-source mode.
|
|
145
|
+
- TOON citation validation is stricter about path tokens so prose before evidence no longer turns into a bogus file path.
|
|
146
|
+
- Hook reminders are deduplicated per task/session and explain MCP fallback without repeating on every prompt.
|
|
147
147
|
|
|
148
148
|
## Proof So Far
|
|
149
149
|
|
|
@@ -299,7 +299,7 @@ pipx ensurepath
|
|
|
299
299
|
|
|
300
300
|
## Status
|
|
301
301
|
|
|
302
|
-
Alpha: `0.3.
|
|
302
|
+
Alpha: `0.3.34`.
|
|
303
303
|
|
|
304
304
|
Works, tested, and used in real sessions. Python and JavaScript/TypeScript have strongest support. APIs may change before 1.0.
|
|
305
305
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "agentpack-cli"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.34"
|
|
4
4
|
description = "Local context engine for AI coding agents that ranks relevant repo files and builds compact task-focused context packs for Claude Code, Codex, Cursor, Windsurf, MCP, and CI workflows."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -8,6 +8,7 @@ from collections.abc import Mapping
|
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
|
|
10
10
|
import typer
|
|
11
|
+
from rich.markup import escape
|
|
11
12
|
|
|
12
13
|
from agentpack.integrations.global_install import (
|
|
13
14
|
_GIT_TEMPLATE_DIR,
|
|
@@ -20,6 +21,7 @@ from agentpack.commands._shared import console, _root
|
|
|
20
21
|
from agentpack.core.command_surface import available_cli_commands, installed_cli_status, refresh_commands
|
|
21
22
|
from agentpack.core.context_pack import load_pack_metadata
|
|
22
23
|
from agentpack.core.ignore import agentignore_sync_status, format_import_summary
|
|
24
|
+
from agentpack.core.mcp_runtime import McpRuntimeCheck, check_mcp_runtime
|
|
23
25
|
from agentpack.core.task_freshness import task_freshness
|
|
24
26
|
from agentpack.core.thread_context import detect_conflicts, list_thread_rows
|
|
25
27
|
from agentpack.integrations.agents import SUPPORTED_AGENTS, check_agent_integration, expand_agents, install_agent_integration
|
|
@@ -249,12 +251,14 @@ def register(app: typer.Typer) -> None:
|
|
|
249
251
|
if _local_has_hooks and not _global_has_hooks:
|
|
250
252
|
console.print(" [yellow]![/] Hooks local-only — context won't auto-inject in other repos. Run: agentpack install --agent claude --global")
|
|
251
253
|
|
|
252
|
-
# --- MCP
|
|
253
|
-
console.print("\n[bold]MCP
|
|
254
|
+
# --- MCP registration ---
|
|
255
|
+
console.print("\n[bold]MCP registration[/]")
|
|
254
256
|
mcp_json = root / ".mcp.json"
|
|
255
257
|
global_claude_settings_for_mcp = Path.home() / ".claude" / "settings.json"
|
|
258
|
+
codex_config_for_mcp = Path(os.environ.get("CODEX_HOME", "~/.codex")).expanduser() / "config.toml"
|
|
256
259
|
_local_has_mcp = False
|
|
257
260
|
_global_has_mcp = False
|
|
261
|
+
_codex_has_mcp = False
|
|
258
262
|
if mcp_json.exists():
|
|
259
263
|
try:
|
|
260
264
|
mcp_data = _json.loads(mcp_json.read_text())
|
|
@@ -275,16 +279,44 @@ def register(app: typer.Typer) -> None:
|
|
|
275
279
|
_global_has_mcp = True
|
|
276
280
|
except Exception:
|
|
277
281
|
pass
|
|
278
|
-
if
|
|
282
|
+
if codex_config_for_mcp.exists():
|
|
283
|
+
try:
|
|
284
|
+
codex_text = codex_config_for_mcp.read_text(encoding="utf-8")
|
|
285
|
+
if (
|
|
286
|
+
"[mcp_servers.agentpack]" in codex_text
|
|
287
|
+
and 'command = "agentpack"' in codex_text
|
|
288
|
+
and 'args = ["mcp"]' in codex_text
|
|
289
|
+
):
|
|
290
|
+
console.print(f" [green]✓[/] MCP server registered (Codex): {codex_config_for_mcp}")
|
|
291
|
+
_codex_has_mcp = True
|
|
292
|
+
except Exception:
|
|
293
|
+
pass
|
|
294
|
+
if not _local_has_mcp and not _global_has_mcp and not _codex_has_mcp:
|
|
279
295
|
console.print(" [yellow]![/] MCP server not registered — mcp__agentpack__* tools unavailable")
|
|
280
|
-
console.print(" [yellow]![/] exact repair: agentpack install --agent claude")
|
|
296
|
+
console.print(" [yellow]![/] exact repair: agentpack install --agent codex or agentpack install --agent claude")
|
|
281
297
|
ok = False
|
|
282
298
|
else:
|
|
283
299
|
console.print(
|
|
284
300
|
" [green]✓[/] expected MCP tools: "
|
|
285
301
|
"readiness, route_task, pack_context, get_context, refresh, get_stats"
|
|
286
302
|
)
|
|
287
|
-
|
|
303
|
+
|
|
304
|
+
# --- MCP runtime ---
|
|
305
|
+
console.print("\n[bold]MCP runtime[/]")
|
|
306
|
+
mcp_runtime = check_mcp_runtime(root=root)
|
|
307
|
+
_print_mcp_runtime_doctor(mcp_runtime)
|
|
308
|
+
if not mcp_runtime.ok:
|
|
309
|
+
ok = False
|
|
310
|
+
|
|
311
|
+
# --- Live host exposure ---
|
|
312
|
+
console.print("\n[bold]Live host exposure[/]")
|
|
313
|
+
console.print(" [yellow]![/] cannot be proven from CLI")
|
|
314
|
+
console.print(" Call `agentpack_readiness()` or `mcp__agentpack__readiness()` from the agent host.")
|
|
315
|
+
if mcp_runtime.ok:
|
|
316
|
+
console.print(
|
|
317
|
+
" If readiness is absent, MCP local server is runnable but this host session has not exposed tools; "
|
|
318
|
+
"run `agentpack repair --agent <agent>` and restart the host."
|
|
319
|
+
)
|
|
288
320
|
|
|
289
321
|
# --- Agent integration matrix ---
|
|
290
322
|
console.print("\n[bold]Agent integration audit[/]")
|
|
@@ -377,6 +409,23 @@ def _safe_fix(root: Path, agent: str) -> None:
|
|
|
377
409
|
console.print(f" [green]✓[/] repaired {selected} integration")
|
|
378
410
|
|
|
379
411
|
|
|
412
|
+
def _print_mcp_runtime_doctor(check: McpRuntimeCheck) -> None:
|
|
413
|
+
if check.status == "stdio_waiting":
|
|
414
|
+
console.print(" [green]✓[/] agentpack mcp starts and waits for stdio")
|
|
415
|
+
return
|
|
416
|
+
if check.status == "ready":
|
|
417
|
+
console.print(f" [green]✓[/] {check.detail}")
|
|
418
|
+
return
|
|
419
|
+
if check.status == "missing_extra":
|
|
420
|
+
console.print(" [yellow]![/] missing MCP extra")
|
|
421
|
+
elif check.status == "command_missing":
|
|
422
|
+
console.print(" [yellow]![/] agentpack command missing")
|
|
423
|
+
else:
|
|
424
|
+
console.print(f" [yellow]![/] {check.detail}")
|
|
425
|
+
for command in check.remediation:
|
|
426
|
+
console.print(f" Fix: {escape(command)}")
|
|
427
|
+
|
|
428
|
+
|
|
380
429
|
def _thread_conflict_findings(root: Path) -> list[str]:
|
|
381
430
|
findings: list[str] = []
|
|
382
431
|
for row in list_thread_rows(root, active_only=True):
|
|
@@ -69,6 +69,87 @@ _VAGUE_TASK_REFERENCES = {
|
|
|
69
69
|
"this",
|
|
70
70
|
"those",
|
|
71
71
|
}
|
|
72
|
+
_RUNTIME_INFRA_TERMS = {
|
|
73
|
+
"alb",
|
|
74
|
+
"aws",
|
|
75
|
+
"cfn",
|
|
76
|
+
"cloud",
|
|
77
|
+
"cloudformation",
|
|
78
|
+
"cloudwatch",
|
|
79
|
+
"copilot",
|
|
80
|
+
"deploy",
|
|
81
|
+
"deployment",
|
|
82
|
+
"ecs",
|
|
83
|
+
"github",
|
|
84
|
+
"iam",
|
|
85
|
+
"infra",
|
|
86
|
+
"lambda",
|
|
87
|
+
"log",
|
|
88
|
+
"logs",
|
|
89
|
+
"otp",
|
|
90
|
+
"package",
|
|
91
|
+
"rendered",
|
|
92
|
+
"runbook",
|
|
93
|
+
"runtime",
|
|
94
|
+
"secret",
|
|
95
|
+
"service",
|
|
96
|
+
"security",
|
|
97
|
+
"ssm",
|
|
98
|
+
"waf",
|
|
99
|
+
"workflow",
|
|
100
|
+
}
|
|
101
|
+
_DEPLOY_TASK_TERMS = {
|
|
102
|
+
"aws",
|
|
103
|
+
"cfn",
|
|
104
|
+
"cloudformation",
|
|
105
|
+
"cloudwatch",
|
|
106
|
+
"copilot",
|
|
107
|
+
"deploy",
|
|
108
|
+
"deployment",
|
|
109
|
+
"ecs",
|
|
110
|
+
"iam",
|
|
111
|
+
"lambda",
|
|
112
|
+
"prod",
|
|
113
|
+
"production",
|
|
114
|
+
"release",
|
|
115
|
+
"rollback",
|
|
116
|
+
"serverless",
|
|
117
|
+
"ship",
|
|
118
|
+
}
|
|
119
|
+
_RUNTIME_INFRA_PATH_TERMS = {
|
|
120
|
+
".github/workflows",
|
|
121
|
+
"aws",
|
|
122
|
+
"cfn",
|
|
123
|
+
"cloudformation",
|
|
124
|
+
"copilot",
|
|
125
|
+
"deploy",
|
|
126
|
+
"ecs",
|
|
127
|
+
"iam",
|
|
128
|
+
"infra",
|
|
129
|
+
"lambda",
|
|
130
|
+
"manifest",
|
|
131
|
+
"override",
|
|
132
|
+
"security",
|
|
133
|
+
"serverless",
|
|
134
|
+
"waf",
|
|
135
|
+
}
|
|
136
|
+
_DEPLOY_PATH_TERMS = {
|
|
137
|
+
".github/workflows",
|
|
138
|
+
"buildspec",
|
|
139
|
+
"cfn.patches",
|
|
140
|
+
"cloudformation",
|
|
141
|
+
"copilot",
|
|
142
|
+
"deploy",
|
|
143
|
+
"deployment",
|
|
144
|
+
"dockerfile",
|
|
145
|
+
"ecs",
|
|
146
|
+
"iam",
|
|
147
|
+
"manifest",
|
|
148
|
+
"package",
|
|
149
|
+
"pipeline",
|
|
150
|
+
"rendered",
|
|
151
|
+
"serverless",
|
|
152
|
+
}
|
|
72
153
|
|
|
73
154
|
|
|
74
155
|
def register(app: typer.Typer) -> None:
|
|
@@ -144,7 +225,10 @@ def _review_preflight_note(*, review_intent: bool, context_stale: bool, has_mcp:
|
|
|
144
225
|
if not review_intent:
|
|
145
226
|
return ""
|
|
146
227
|
if has_mcp:
|
|
147
|
-
refresh =
|
|
228
|
+
refresh = (
|
|
229
|
+
f'If the AgentPack MCP tool is visible, call agentpack_pack_context(task="{task}") before PR diff/code review; '
|
|
230
|
+
f"otherwise run `{refresh_commands('auto').primary}` and use direct repo evidence."
|
|
231
|
+
)
|
|
148
232
|
else:
|
|
149
233
|
refresh = f"Run `{refresh_commands('auto').primary}` before PR diff/code review."
|
|
150
234
|
lines = [
|
|
@@ -156,6 +240,109 @@ def _review_preflight_note(*, review_intent: bool, context_stale: bool, has_mcp:
|
|
|
156
240
|
return "\n".join(lines) + "\n"
|
|
157
241
|
|
|
158
242
|
|
|
243
|
+
def _review_reminder_key(task: str, packed_root_hash: str | None, current_root_hash: str | None) -> str:
|
|
244
|
+
return json.dumps(
|
|
245
|
+
{
|
|
246
|
+
"task": task,
|
|
247
|
+
"packed_root_hash": packed_root_hash or "",
|
|
248
|
+
"current_root_hash": current_root_hash or "",
|
|
249
|
+
},
|
|
250
|
+
sort_keys=True,
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def _should_emit_review_preflight(
|
|
255
|
+
root: Path,
|
|
256
|
+
*,
|
|
257
|
+
review_intent: bool,
|
|
258
|
+
task: str,
|
|
259
|
+
packed_root_hash: str | None,
|
|
260
|
+
current_root_hash: str | None,
|
|
261
|
+
) -> bool:
|
|
262
|
+
if not review_intent:
|
|
263
|
+
return False
|
|
264
|
+
reminder_path = root / ".agentpack" / ".review_preflight_reminded"
|
|
265
|
+
key = _review_reminder_key(task, packed_root_hash, current_root_hash)
|
|
266
|
+
try:
|
|
267
|
+
if reminder_path.exists() and reminder_path.read_text(encoding="utf-8") == key:
|
|
268
|
+
return False
|
|
269
|
+
reminder_path.parent.mkdir(parents=True, exist_ok=True)
|
|
270
|
+
reminder_path.write_text(key, encoding="utf-8")
|
|
271
|
+
except OSError:
|
|
272
|
+
return True
|
|
273
|
+
return True
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
def _source_of_truth_note(task: str) -> str:
|
|
277
|
+
if _looks_like_deploy_task(task):
|
|
278
|
+
return (
|
|
279
|
+
"AgentPack: guardrail + context frame only.\n"
|
|
280
|
+
"Source of truth: GitHub PR/head, clean worktree, rendered deploy config, live AWS/ECS/CloudFormation status, and CloudWatch logs.\n"
|
|
281
|
+
)
|
|
282
|
+
if not _looks_like_runtime_infra_task(task):
|
|
283
|
+
return ""
|
|
284
|
+
return (
|
|
285
|
+
"SOURCE OF TRUTH: treat AgentPack as guardrail/orientation only. "
|
|
286
|
+
"Use direct repo search, rendered config, cloud/provider validation, and focused tests for final evidence.\n"
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
def _looks_like_runtime_infra_task(task: str) -> bool:
|
|
291
|
+
terms = _task_terms(task)
|
|
292
|
+
return bool(terms & _RUNTIME_INFRA_TERMS)
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
def _looks_like_deploy_task(task: str) -> bool:
|
|
296
|
+
terms = _task_terms(task)
|
|
297
|
+
return bool(terms & _DEPLOY_TASK_TERMS)
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
def _filter_runtime_infra_hints(task: str, hints: list[dict]) -> list[dict]:
|
|
301
|
+
if not _looks_like_runtime_infra_task(task):
|
|
302
|
+
return hints
|
|
303
|
+
task_terms = _task_terms(task)
|
|
304
|
+
if _looks_like_deploy_task(task):
|
|
305
|
+
return [hint for hint in hints if _deploy_hint_relevant(hint, task_terms)]
|
|
306
|
+
filtered = [hint for hint in hints if _runtime_infra_hint_relevant(hint, task_terms)]
|
|
307
|
+
return filtered
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
def _deploy_hint_relevant(hint: dict, task_terms: set[str]) -> bool:
|
|
311
|
+
haystack = f"{hint.get('path', '')} {hint.get('why', '')}".lower()
|
|
312
|
+
if any(term in haystack for term in _DEPLOY_PATH_TERMS):
|
|
313
|
+
return True
|
|
314
|
+
return any(term in haystack for term in task_terms if len(term) >= 4)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
def _runtime_infra_hint_relevant(hint: dict, task_terms: set[str]) -> bool:
|
|
318
|
+
haystack = f"{hint.get('path', '')} {hint.get('why', '')}".lower()
|
|
319
|
+
if any(term in haystack for term in task_terms if len(term) >= 3):
|
|
320
|
+
return True
|
|
321
|
+
return any(term in haystack for term in _RUNTIME_INFRA_PATH_TERMS)
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
def _review_stage_gate_note(root: Path, *, review_intent: bool) -> str:
|
|
325
|
+
if not review_intent:
|
|
326
|
+
return ""
|
|
327
|
+
state_path = root / ".agentpack" / "review-state.json"
|
|
328
|
+
if not state_path.exists():
|
|
329
|
+
return ""
|
|
330
|
+
try:
|
|
331
|
+
state = json.loads(state_path.read_text(encoding="utf-8"))
|
|
332
|
+
except Exception:
|
|
333
|
+
return "REVIEW STAGE BLOCK: active review state is unreadable. Run `agentpack review --check`.\n"
|
|
334
|
+
status = str(state.get("status") or "")
|
|
335
|
+
if status == "complete":
|
|
336
|
+
return ""
|
|
337
|
+
if status == "awaiting_understanding":
|
|
338
|
+
return "REVIEW STAGE BLOCK: Stage 1 understanding artifact missing. Write it, then run `agentpack review --check`.\n"
|
|
339
|
+
if status == "awaiting_findings":
|
|
340
|
+
return "REVIEW STAGE BLOCK: Stage 2 findings artifact missing. Write it, then run `agentpack review --check` before final summary.\n"
|
|
341
|
+
if status == "blocked_invalid_artifact":
|
|
342
|
+
return "REVIEW STAGE BLOCK: active review artifact invalid. Run `agentpack review --check` for exact error.\n"
|
|
343
|
+
return f"REVIEW STAGE BLOCK: active review status `{status}`. Run `agentpack review --check`.\n"
|
|
344
|
+
|
|
345
|
+
|
|
159
346
|
def _prompt_task(prompt: str) -> str:
|
|
160
347
|
if not prompt or not _looks_like_coding_prompt(prompt):
|
|
161
348
|
return ""
|
|
@@ -301,6 +488,51 @@ def _current_root_hash(root: Path) -> str | None:
|
|
|
301
488
|
return None
|
|
302
489
|
|
|
303
490
|
|
|
491
|
+
def _stale_reasons(
|
|
492
|
+
*,
|
|
493
|
+
pack_missing: bool,
|
|
494
|
+
repo_changed: bool,
|
|
495
|
+
task_switched: bool,
|
|
496
|
+
pack_task_changed: bool,
|
|
497
|
+
) -> list[str]:
|
|
498
|
+
reasons: list[str] = []
|
|
499
|
+
if pack_missing:
|
|
500
|
+
reasons.append("pack missing metadata")
|
|
501
|
+
if repo_changed:
|
|
502
|
+
reasons.append("repo snapshot changed")
|
|
503
|
+
if task_switched:
|
|
504
|
+
reasons.append("prompt switched task")
|
|
505
|
+
if pack_task_changed:
|
|
506
|
+
reasons.append("task differs from packed task")
|
|
507
|
+
return reasons
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
def _stale_note(reasons: list[str]) -> str:
|
|
511
|
+
return f"stale reason: {', '.join(reasons)}\n" if reasons else ""
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
def _mcp_status_note(root: Path, *, has_mcp: bool, task: str) -> str:
|
|
515
|
+
reminder_path = root / ".agentpack" / ".mcp_reminded"
|
|
516
|
+
key = json.dumps({"task": task, "has_mcp": has_mcp}, sort_keys=True)
|
|
517
|
+
try:
|
|
518
|
+
if reminder_path.exists() and reminder_path.read_text(encoding="utf-8") == key:
|
|
519
|
+
return ""
|
|
520
|
+
reminder_path.parent.mkdir(parents=True, exist_ok=True)
|
|
521
|
+
reminder_path.write_text(key, encoding="utf-8")
|
|
522
|
+
except OSError:
|
|
523
|
+
pass
|
|
524
|
+
if has_mcp:
|
|
525
|
+
return (
|
|
526
|
+
"MCP registration found. Live exposure must be proven by readiness(). "
|
|
527
|
+
"If readiness is absent, run one bounded `agentpack mcp` diagnostic, then use CLI/direct search fallback. "
|
|
528
|
+
"Do not keep `agentpack mcp` running manually.\n"
|
|
529
|
+
)
|
|
530
|
+
return (
|
|
531
|
+
"MCP unavailable: run `agentpack repair --agent auto`. Using CLI/direct search fallback. "
|
|
532
|
+
"A bounded `agentpack mcp` diagnostic can distinguish setup failure from host exposure failure.\n"
|
|
533
|
+
)
|
|
534
|
+
|
|
535
|
+
|
|
304
536
|
# ---------------------------------------------------------------------------
|
|
305
537
|
# Event handlers
|
|
306
538
|
# ---------------------------------------------------------------------------
|
|
@@ -311,6 +543,7 @@ def _run_session_start(root: Path) -> None:
|
|
|
311
543
|
root / ".agentpack" / ".mcp_reminded",
|
|
312
544
|
root / ".agentpack" / ".context_injected",
|
|
313
545
|
root / ".agentpack" / ".no_task_reminded",
|
|
546
|
+
root / ".agentpack" / ".review_preflight_reminded",
|
|
314
547
|
]:
|
|
315
548
|
try:
|
|
316
549
|
sentinel.unlink(missing_ok=True)
|
|
@@ -396,6 +629,12 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
396
629
|
pack_task_changed = bool(task != "auto" and packed_task and packed_task != task)
|
|
397
630
|
|
|
398
631
|
context_stale = pack_missing or repo_changed or task_switched or pack_task_changed
|
|
632
|
+
stale_reasons = _stale_reasons(
|
|
633
|
+
pack_missing=pack_missing,
|
|
634
|
+
repo_changed=repo_changed,
|
|
635
|
+
task_switched=task_switched,
|
|
636
|
+
pack_task_changed=pack_task_changed,
|
|
637
|
+
)
|
|
399
638
|
blocking_refresh = bool(cfg.hooks.blocking_task_refresh and context_stale)
|
|
400
639
|
refresh_state = "fresh"
|
|
401
640
|
refresh_error = ""
|
|
@@ -417,13 +656,26 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
417
656
|
review_intent = _looks_like_review_prompt(prompt)
|
|
418
657
|
delta = _load_delta_summary(root)
|
|
419
658
|
safe_hints = not pack_missing and not pack_task_changed and not task_switched and not repo_changed
|
|
420
|
-
|
|
659
|
+
raw_hints = _load_hints(root, n=5 if has_mcp else 8) if safe_hints else []
|
|
660
|
+
hints = _filter_runtime_infra_hints(current_task, raw_hints)
|
|
661
|
+
hints_suppressed = safe_hints and bool(raw_hints) and not hints
|
|
662
|
+
emit_review_preflight = _should_emit_review_preflight(
|
|
663
|
+
root,
|
|
664
|
+
review_intent=review_intent,
|
|
665
|
+
task=current_task,
|
|
666
|
+
packed_root_hash=packed_root_hash,
|
|
667
|
+
current_root_hash=current_hash,
|
|
668
|
+
)
|
|
421
669
|
review_note = _review_preflight_note(
|
|
422
670
|
review_intent=review_intent,
|
|
423
671
|
context_stale=context_stale,
|
|
424
672
|
has_mcp=has_mcp,
|
|
425
673
|
task=current_task,
|
|
426
|
-
)
|
|
674
|
+
) if emit_review_preflight else ""
|
|
675
|
+
review_stage_gate = _review_stage_gate_note(root, review_intent=review_intent)
|
|
676
|
+
source_note = _source_of_truth_note(current_task)
|
|
677
|
+
stale_detail = _stale_note(stale_reasons)
|
|
678
|
+
mcp_detail = _mcp_status_note(root, has_mcp=has_mcp, task=current_task)
|
|
427
679
|
|
|
428
680
|
if has_mcp:
|
|
429
681
|
if hints:
|
|
@@ -443,11 +695,16 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
443
695
|
f"AgentPack {status_note}\n"
|
|
444
696
|
f"task: {current_task}\n"
|
|
445
697
|
+ review_note
|
|
698
|
+
+ review_stage_gate
|
|
699
|
+
+ source_note
|
|
700
|
+
+ stale_detail
|
|
701
|
+
+ mcp_detail
|
|
446
702
|
+ (f"refresh error: {refresh_error}\n" if refresh_error else "")
|
|
447
703
|
+ (f"delta: {delta}\n" if delta else "")
|
|
448
704
|
+
|
|
449
705
|
f"top files:\n{files_lines}\n"
|
|
450
|
-
|
|
706
|
+
"If the AgentPack MCP tools are visible, call agentpack_get_delta_context() for delta or "
|
|
707
|
+
'agentpack_pack_context(task="...") for full ranked context; otherwise use direct repo search.'
|
|
451
708
|
)
|
|
452
709
|
elif refresh_state == "refresh pending":
|
|
453
710
|
msg = (
|
|
@@ -455,7 +712,14 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
455
712
|
f"task: {current_task}\n"
|
|
456
713
|
+ (f"packed task: {packed_task}\n" if packed_task and packed_task != current_task else "")
|
|
457
714
|
+ review_note
|
|
458
|
-
+
|
|
715
|
+
+ review_stage_gate
|
|
716
|
+
+ source_note
|
|
717
|
+
+ stale_detail
|
|
718
|
+
+ mcp_detail
|
|
719
|
+
+ (
|
|
720
|
+
"If the AgentPack MCP tool is visible, call agentpack_get_context(); "
|
|
721
|
+
f"otherwise run `{refresh_commands('auto').primary}` and use direct repo search."
|
|
722
|
+
)
|
|
459
723
|
)
|
|
460
724
|
elif refresh_state == "refresh failed":
|
|
461
725
|
msg = (
|
|
@@ -463,13 +727,39 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
463
727
|
f"task: {current_task}\n"
|
|
464
728
|
+ (f"packed task: {packed_task}\n" if packed_task and packed_task != current_task else "")
|
|
465
729
|
+ review_note
|
|
730
|
+
+ review_stage_gate
|
|
731
|
+
+ source_note
|
|
732
|
+
+ stale_detail
|
|
733
|
+
+ mcp_detail
|
|
466
734
|
+ (f"refresh error: {refresh_error}\n" if refresh_error else "")
|
|
467
|
-
+
|
|
735
|
+
+ (
|
|
736
|
+
'If the AgentPack MCP tool is visible, call agentpack_pack_context(task="..."); '
|
|
737
|
+
f"otherwise run `{refresh_commands('auto').primary}` and use direct repo search."
|
|
738
|
+
)
|
|
739
|
+
)
|
|
740
|
+
elif hints_suppressed:
|
|
741
|
+
msg = (
|
|
742
|
+
"AgentPack guardrail active. Selected-file hints suppressed because they did not match this runtime/infra task.\n"
|
|
743
|
+
f"task: {current_task}\n"
|
|
744
|
+
+ review_note
|
|
745
|
+
+ review_stage_gate
|
|
746
|
+
+ source_note
|
|
747
|
+
+ mcp_detail
|
|
748
|
+
+ (f"delta: {delta}\n" if delta else "")
|
|
749
|
+
+ (
|
|
750
|
+
"If the AgentPack MCP tools are visible, call agentpack_pack_context(task=\"...\") for a fresh pack; "
|
|
751
|
+
f"otherwise run `{refresh_commands('auto').primary}` or use direct repo search."
|
|
752
|
+
)
|
|
468
753
|
)
|
|
469
754
|
else:
|
|
470
755
|
msg = (
|
|
471
|
-
"AgentPack active. No pack yet
|
|
472
|
-
|
|
756
|
+
"AgentPack active. No pack yet.\n"
|
|
757
|
+
+ source_note
|
|
758
|
+
+ mcp_detail
|
|
759
|
+
+ (
|
|
760
|
+
'If the AgentPack MCP tool is visible, call agentpack_pack_context(task="..."); '
|
|
761
|
+
f"otherwise run `{refresh_commands('auto').primary}`."
|
|
762
|
+
)
|
|
473
763
|
)
|
|
474
764
|
else:
|
|
475
765
|
if hints:
|
|
@@ -489,6 +779,10 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
489
779
|
f"AgentPack context{changed_note}\n"
|
|
490
780
|
f"task: {current_task}\n"
|
|
491
781
|
+ review_note
|
|
782
|
+
+ review_stage_gate
|
|
783
|
+
+ source_note
|
|
784
|
+
+ stale_detail
|
|
785
|
+
+ mcp_detail
|
|
492
786
|
+ (f"refresh error: {refresh_error}\n" if refresh_error else "")
|
|
493
787
|
+ (f"delta: {delta}\n" if delta else "")
|
|
494
788
|
+
|
|
@@ -501,7 +795,11 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
501
795
|
f"task: {current_task}\n"
|
|
502
796
|
+ (f"packed task: {packed_task}\n" if packed_task and packed_task != current_task else "")
|
|
503
797
|
+ review_note
|
|
504
|
-
+
|
|
798
|
+
+ review_stage_gate
|
|
799
|
+
+ source_note
|
|
800
|
+
+ stale_detail
|
|
801
|
+
+ mcp_detail
|
|
802
|
+
+ f"Run `{refresh_commands('auto').primary}`. If tools stay unavailable, use direct repo search."
|
|
505
803
|
)
|
|
506
804
|
elif refresh_state == "refresh failed":
|
|
507
805
|
msg = (
|
|
@@ -509,13 +807,29 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
509
807
|
f"task: {current_task}\n"
|
|
510
808
|
+ (f"packed task: {packed_task}\n" if packed_task and packed_task != current_task else "")
|
|
511
809
|
+ review_note
|
|
810
|
+
+ review_stage_gate
|
|
811
|
+
+ source_note
|
|
812
|
+
+ stale_detail
|
|
813
|
+
+ mcp_detail
|
|
512
814
|
+ (f"refresh error: {refresh_error}\n" if refresh_error else "")
|
|
513
|
-
+ "Run `
|
|
815
|
+
+ f"Run `{refresh_commands('auto').primary}` to rebuild the current task pack."
|
|
816
|
+
)
|
|
817
|
+
elif hints_suppressed:
|
|
818
|
+
msg = (
|
|
819
|
+
"AgentPack guardrail active. Selected-file hints suppressed because they did not match this runtime/infra task.\n"
|
|
820
|
+
f"task: {current_task}\n"
|
|
821
|
+
+ review_note
|
|
822
|
+
+ review_stage_gate
|
|
823
|
+
+ source_note
|
|
824
|
+
+ mcp_detail
|
|
825
|
+
+ (f"delta: {delta}\n" if delta else "")
|
|
826
|
+
+ f"Run `{refresh_commands('auto').primary}` for a fresh pack, or use direct repo search."
|
|
514
827
|
)
|
|
515
828
|
else:
|
|
516
829
|
msg = (
|
|
517
830
|
"AgentPack active. Write `.agentpack/task.md`, then run `agentpack pack --task auto` to build context.\n"
|
|
518
|
-
|
|
831
|
+
+ mcp_detail
|
|
832
|
+
+ "For auto context, install MCP: agentpack install --agent claude"
|
|
519
833
|
)
|
|
520
834
|
|
|
521
835
|
if len(msg) > 3000:
|