agentpack-cli 0.3.29__tar.gz → 0.3.31__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.29 → agentpack_cli-0.3.31}/.gitignore +18 -3
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/PKG-INFO +14 -3
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/README.md +13 -2
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/pyproject.toml +1 -1
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/__init__.py +1 -1
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/application/pack_service.py +73 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/cli.py +2 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/doctor.py +2 -2
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/hook_cmd.py +85 -51
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/init.py +3 -1
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/install.py +1 -0
- agentpack_cli-0.3.31/src/agentpack/commands/review_cmd.py +446 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/config.py +17 -5
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/context_pack.py +2 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/models.py +1 -0
- agentpack_cli-0.3.31/src/agentpack/core/pack_handoff.py +169 -0
- agentpack_cli-0.3.31/src/agentpack/core/structured_format.py +47 -0
- agentpack_cli-0.3.31/src/agentpack/core/toon_parser.py +165 -0
- agentpack_cli-0.3.31/src/agentpack/data/agentpack-review.md +31 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/data/codex_plugin/.codex-plugin/plugin.json +8 -1
- agentpack_cli-0.3.31/src/agentpack/data/codex_plugin/.codexignore +3 -0
- agentpack_cli-0.3.31/src/agentpack/data/codex_plugin/LICENSE +21 -0
- agentpack_cli-0.3.31/src/agentpack/data/codex_plugin/README.md +31 -0
- agentpack_cli-0.3.31/src/agentpack/data/codex_plugin/SECURITY.md +9 -0
- agentpack_cli-0.3.31/src/agentpack/data/codex_plugin/assets/icon.svg +1 -0
- agentpack_cli-0.3.31/src/agentpack/data/codex_plugin/assets/route-demo.svg +1 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/data/codex_plugin/skills/agentpack-learn.md +8 -8
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/data/codex_plugin/skills/agentpack-refresh.md +1 -1
- agentpack_cli-0.3.31/src/agentpack/data/codex_plugin/skills/agentpack-review.md +27 -0
- agentpack_cli-0.3.31/src/agentpack/data/review/stage1-understanding.md +97 -0
- agentpack_cli-0.3.31/src/agentpack/data/review/stage2-judge.md +78 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/installers/antigravity.py +1 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/installers/claude.py +5 -4
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/installers/codex.py +82 -1
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/installers/cursor.py +1 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/installers/windsurf.py +1 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/integrations/agents.py +77 -3
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/mcp_server.py +27 -21
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/renderers/markdown.py +83 -2
- agentpack_cli-0.3.31/src/agentpack/renderers/toon.py +157 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/router/models.py +3 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/router/prompt_builder.py +6 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/router/service.py +47 -2
- agentpack_cli-0.3.29/src/agentpack/data/codex_plugin/skills/agentpack-review.md +0 -32
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/LICENSE +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/adapters/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/adapters/antigravity.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/adapters/base.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/adapters/claude.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/adapters/codex.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/adapters/cursor.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/adapters/detect.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/adapters/generic.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/adapters/windsurf.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/dependency_graph.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/go_imports.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/java_imports.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/js_ts_imports.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/monorepo.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/naming_signals.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/python_ast.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/python_imports.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/ranking.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/repo_map.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/role_inference.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/rust_imports.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/symbols.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/task_classifier.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/analysis/tests.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/application/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/_shared.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/benchmark.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/ci_cmd.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/claude_cmd.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/compress_output.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/dashboard.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/dev_check.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/diagnose_selection.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/diff.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/eval_cmd.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/explain.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/guard.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/ignore_cmd.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/learn.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/mcp_cmd.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/memory.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/migrate.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/monitor.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/next_cmd.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/pack.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/perf.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/quickstart.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/release_check.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/release_cmd.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/repair.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/retrieve.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/route.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/scan.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/skills.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/start_cmd.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/state_cmd.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/stats.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/status.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/summarize.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/task_cmd.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/threads.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/tune.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/upgrade.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/verify_wheel.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/watch.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/workflow_cmd.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/commands/wrap.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/bootstrap.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/cache.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/changed_paths.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/command_surface.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/diff.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/e2e_benchmark.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/evals.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/execution_state.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/git.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/git_hooks.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/global_install.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/ignore.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/loop_protocol.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/merkle.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/modes.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/pack_registry.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/redactor.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/scanner.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/snapshot.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/task_freshness.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/thread_context.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/token_estimator.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/core/vscode_tasks.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/dashboard/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/dashboard/collectors.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/dashboard/models.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/dashboard/renderers.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/data/agentpack-learn.md +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/data/agentpack.md +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/data/codex_plugin/skills/agentpack-pack.md +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/data/codex_plugin/skills/agentpack-route.md +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/data/codex_plugin/skills/agentpack.md +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/installers/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/integrations/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/integrations/git_hooks.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/integrations/global_install.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/integrations/platform.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/integrations/vscode_tasks.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/learning/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/learning/collector.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/learning/extractor.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/learning/feedback.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/learning/lesson_ranker.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/learning/models.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/learning/provider.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/learning/quality.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/learning/renderers.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/learning/skill_map.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/output_compression/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/output_compression/core.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/renderers/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/renderers/compact.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/renderers/receipts.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/router/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/router/discovery.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/router/parser.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/router/scoring.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/router/skills_index.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/session/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/session/events.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/session/references.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/session/state.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/summaries/__init__.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/summaries/base.py +0 -0
- {agentpack_cli-0.3.29 → agentpack_cli-0.3.31}/src/agentpack/summaries/offline.py +0 -0
|
@@ -18,17 +18,32 @@ env/
|
|
|
18
18
|
.agentpack/snapshots/
|
|
19
19
|
.agentpack/context*
|
|
20
20
|
.agentpack/metrics.jsonl
|
|
21
|
+
.agentpack/session-events.jsonl
|
|
21
22
|
.agentpack/pack_metadata.json
|
|
23
|
+
.agentpack/pack-registry.json
|
|
24
|
+
.agentpack/learning.md
|
|
25
|
+
.agentpack/daily-summary.md
|
|
26
|
+
.agentpack/skills-progress.json
|
|
27
|
+
.agentpack/agent-lessons.md
|
|
28
|
+
.agentpack/learning.prompt.md
|
|
29
|
+
.agentpack/pr-learning-comment.md
|
|
30
|
+
.agentpack/learning-dashboard.html
|
|
31
|
+
.agentpack/team-lessons.md
|
|
32
|
+
.agentpack/learning-feedback.jsonl
|
|
33
|
+
.agentpack/ranking-feedback.jsonl
|
|
34
|
+
.agentpack/learning-inputs.json
|
|
22
35
|
.agentpack/activity.log
|
|
23
36
|
.agentpack/.gitignore
|
|
24
37
|
.agentpack/.mcp_reminded
|
|
25
38
|
.agentpack/session.json
|
|
26
39
|
.agentpack/task.md
|
|
27
40
|
.agentpack/benchmark_results.jsonl
|
|
28
|
-
.
|
|
41
|
+
.agentpack/loop_state.json
|
|
42
|
+
.agentpack/progress.md
|
|
43
|
+
.agentpack/loop_events.jsonl
|
|
44
|
+
.agentpack/loop_failures.jsonl
|
|
29
45
|
.agent/skills/agentpack/
|
|
30
|
-
.
|
|
31
|
-
GEMINI.md
|
|
46
|
+
.agentignore
|
|
32
47
|
# agentpack:end
|
|
33
48
|
.pytest_cache/
|
|
34
49
|
.mypy_cache/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentpack-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.31
|
|
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/
|
|
@@ -65,6 +65,8 @@ Description-Content-Type: text/markdown
|
|
|
65
65
|
<a href="https://pepy.tech/projects/agentpack-cli"><img alt="PyPI downloads" src="https://static.pepy.tech/personalized-badge/agentpack-cli?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads"></a>
|
|
66
66
|
<a href="https://www.npmjs.com/package/@vishal2612200/agentpack"><img alt="npm version" src="https://img.shields.io/npm/v/@vishal2612200/agentpack.svg"></a>
|
|
67
67
|
<a href="https://www.npmjs.com/package/@vishal2612200/agentpack"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@vishal2612200/agentpack.svg"></a>
|
|
68
|
+
<a href="https://hol.org/registry/plugins/agentpack%2Fagentpack"><img alt="HOL trust score" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fhol.org%2Fapi%2Fregistry%2Fbadges%2Fplugin%3Fslug%3Dagentpack%252Fagentpack%26metric%3Dtrust%26style%3Dflat"></a>
|
|
69
|
+
<a href="https://hol.org/registry/plugins/agentpack%2Fagentpack"><img alt="HOL security score" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fhol.org%2Fapi%2Fregistry%2Fbadges%2Fplugin%3Fslug%3Dagentpack%252Fagentpack%26metric%3Dsecurity%26style%3Dflat"></a>
|
|
68
70
|
<a href="https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml/badge.svg"></a>
|
|
69
71
|
<a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"></a>
|
|
70
72
|
</p>
|
|
@@ -227,10 +229,19 @@ Inside Codex:
|
|
|
227
229
|
```text
|
|
228
230
|
@agentpack-route fix auth token expiry
|
|
229
231
|
@agentpack-pack fix auth token expiry
|
|
230
|
-
@agentpack-review
|
|
232
|
+
@agentpack-review focus on backward compatibility
|
|
231
233
|
```
|
|
232
234
|
|
|
233
|
-
The plugin calls the local AgentPack engine.
|
|
235
|
+
The Codex plugin calls the local AgentPack engine. Codex setup enables the
|
|
236
|
+
local `agentpack@local` bundle so commands like `@agentpack-review` match the
|
|
237
|
+
installed CLI version. Verify with `agentpack doctor --agent codex` after
|
|
238
|
+
upgrades.
|
|
239
|
+
|
|
240
|
+
The review flow prepares a local two-stage PR review bundle: preflight metadata,
|
|
241
|
+
a runbook, stage prompts, and branch-scoped understanding/findings JSON files.
|
|
242
|
+
It does not replace `gh pr view`, `git diff`, direct code reads, or tests.
|
|
243
|
+
|
|
244
|
+
AgentPack does not upload code and does not turn AgentPack into a coding agent.
|
|
234
245
|
|
|
235
246
|
See [`docs/agent-plugins.md`](docs/agent-plugins.md) and [`docs/codex-plugin.md`](docs/codex-plugin.md).
|
|
236
247
|
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
<a href="https://pepy.tech/projects/agentpack-cli"><img alt="PyPI downloads" src="https://static.pepy.tech/personalized-badge/agentpack-cli?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads"></a>
|
|
19
19
|
<a href="https://www.npmjs.com/package/@vishal2612200/agentpack"><img alt="npm version" src="https://img.shields.io/npm/v/@vishal2612200/agentpack.svg"></a>
|
|
20
20
|
<a href="https://www.npmjs.com/package/@vishal2612200/agentpack"><img alt="npm downloads" src="https://img.shields.io/npm/dm/@vishal2612200/agentpack.svg"></a>
|
|
21
|
+
<a href="https://hol.org/registry/plugins/agentpack%2Fagentpack"><img alt="HOL trust score" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fhol.org%2Fapi%2Fregistry%2Fbadges%2Fplugin%3Fslug%3Dagentpack%252Fagentpack%26metric%3Dtrust%26style%3Dflat"></a>
|
|
22
|
+
<a href="https://hol.org/registry/plugins/agentpack%2Fagentpack"><img alt="HOL security score" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fhol.org%2Fapi%2Fregistry%2Fbadges%2Fplugin%3Fslug%3Dagentpack%252Fagentpack%26metric%3Dsecurity%26style%3Dflat"></a>
|
|
21
23
|
<a href="https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml/badge.svg"></a>
|
|
22
24
|
<a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"></a>
|
|
23
25
|
</p>
|
|
@@ -180,10 +182,19 @@ Inside Codex:
|
|
|
180
182
|
```text
|
|
181
183
|
@agentpack-route fix auth token expiry
|
|
182
184
|
@agentpack-pack fix auth token expiry
|
|
183
|
-
@agentpack-review
|
|
185
|
+
@agentpack-review focus on backward compatibility
|
|
184
186
|
```
|
|
185
187
|
|
|
186
|
-
The plugin calls the local AgentPack engine.
|
|
188
|
+
The Codex plugin calls the local AgentPack engine. Codex setup enables the
|
|
189
|
+
local `agentpack@local` bundle so commands like `@agentpack-review` match the
|
|
190
|
+
installed CLI version. Verify with `agentpack doctor --agent codex` after
|
|
191
|
+
upgrades.
|
|
192
|
+
|
|
193
|
+
The review flow prepares a local two-stage PR review bundle: preflight metadata,
|
|
194
|
+
a runbook, stage prompts, and branch-scoped understanding/findings JSON files.
|
|
195
|
+
It does not replace `gh pr view`, `git diff`, direct code reads, or tests.
|
|
196
|
+
|
|
197
|
+
AgentPack does not upload code and does not turn AgentPack into a coding agent.
|
|
187
198
|
|
|
188
199
|
See [`docs/agent-plugins.md`](docs/agent-plugins.md) and [`docs/codex-plugin.md`](docs/codex-plugin.md).
|
|
189
200
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "agentpack-cli"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.31"
|
|
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"
|
|
@@ -3,6 +3,8 @@ from __future__ import annotations
|
|
|
3
3
|
import json
|
|
4
4
|
import hashlib
|
|
5
5
|
import re
|
|
6
|
+
import shutil
|
|
7
|
+
import subprocess
|
|
6
8
|
import time
|
|
7
9
|
from dataclasses import dataclass, field, replace
|
|
8
10
|
from datetime import datetime, timezone
|
|
@@ -20,6 +22,7 @@ from agentpack.core import git
|
|
|
20
22
|
from agentpack.core.command_surface import refresh_commands
|
|
21
23
|
from agentpack.core.context_pack import enrich_call_site_scores, select_files, save_pack_metadata, load_pack_metadata
|
|
22
24
|
from agentpack.core.execution_state import build_execution_state, compact_execution_state
|
|
25
|
+
from agentpack.core.pack_handoff import build_pack_handoff
|
|
23
26
|
from agentpack.core.models import (
|
|
24
27
|
ContextPack,
|
|
25
28
|
DependencyGraph,
|
|
@@ -477,6 +480,8 @@ class PackPlanner:
|
|
|
477
480
|
|
|
478
481
|
t0 = time.perf_counter()
|
|
479
482
|
changes = ChangeDetector().detect(packable, root, request.since, previous_snap=previous_snap)
|
|
483
|
+
pr_paths = _github_pr_paths(root, request.task) if _is_pr_review_task(request.task) else set()
|
|
484
|
+
changes = _apply_github_pr_changed_paths(changes, pr_paths, packable)
|
|
480
485
|
changes.current_snap["metadata"] = {
|
|
481
486
|
**scan_metadata,
|
|
482
487
|
"scan_mode": scan_result.scan_mode,
|
|
@@ -498,6 +503,8 @@ class PackPlanner:
|
|
|
498
503
|
workspace_roots=workspace_roots,
|
|
499
504
|
workspace_dependency_edges=workspace_dependency_edges,
|
|
500
505
|
)
|
|
506
|
+
if pr_paths:
|
|
507
|
+
rank_result.scored = _boost_github_pr_paths(rank_result.scored, pr_paths)
|
|
501
508
|
rank_result.scored = _apply_scope_penalties(
|
|
502
509
|
rank_result.scored,
|
|
503
510
|
request.task,
|
|
@@ -780,6 +787,7 @@ class PackService:
|
|
|
780
787
|
selected_files=plan.selected,
|
|
781
788
|
receipts=plan.receipts if cfg.context.include_receipts else [],
|
|
782
789
|
omitted_relevant_files=plan.omitted_relevant_files,
|
|
790
|
+
pack_handoff_omitted_relevant_files=plan.omitted_relevant_files,
|
|
783
791
|
redaction_warnings=all_redaction_warnings,
|
|
784
792
|
stale=False,
|
|
785
793
|
freshness=freshness,
|
|
@@ -819,6 +827,7 @@ class PackService:
|
|
|
819
827
|
freshness=pack_obj.freshness,
|
|
820
828
|
freshness_warnings=pack_obj.freshness_warnings,
|
|
821
829
|
selected_files=_selected_file_metadata(pack_obj.selected_files),
|
|
830
|
+
pack_handoff=build_pack_handoff(pack_obj),
|
|
822
831
|
execution_state=pack_obj.execution_state,
|
|
823
832
|
concurrent_context=pack_obj.concurrent_context,
|
|
824
833
|
metadata_path=scoped_paths.metadata if scoped_paths else None,
|
|
@@ -1568,6 +1577,70 @@ def _change_source(root: Path, since: str | None, snapshot_changed: set[str], gi
|
|
|
1568
1577
|
return "no live changes; ranking used task keywords and history"
|
|
1569
1578
|
|
|
1570
1579
|
|
|
1580
|
+
def _is_pr_review_task(task: str) -> bool:
|
|
1581
|
+
lower = task.lower()
|
|
1582
|
+
return any(term in lower for term in ("pr ", "pull request", "review", "diff", "review comment"))
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
def _github_pr_paths(root: Path, task: str) -> set[str]:
|
|
1586
|
+
if shutil.which("gh") is None:
|
|
1587
|
+
return set()
|
|
1588
|
+
pr_number = _pr_number(task)
|
|
1589
|
+
cmd = ["gh", "pr", "view"]
|
|
1590
|
+
if pr_number:
|
|
1591
|
+
cmd.append(pr_number)
|
|
1592
|
+
cmd += ["--json", "files", "--jq", ".files[].path"]
|
|
1593
|
+
try:
|
|
1594
|
+
result = subprocess.run(
|
|
1595
|
+
cmd,
|
|
1596
|
+
cwd=root,
|
|
1597
|
+
capture_output=True,
|
|
1598
|
+
text=True,
|
|
1599
|
+
timeout=4,
|
|
1600
|
+
)
|
|
1601
|
+
except (OSError, subprocess.TimeoutExpired):
|
|
1602
|
+
return set()
|
|
1603
|
+
if result.returncode != 0:
|
|
1604
|
+
return set()
|
|
1605
|
+
return {line.strip() for line in result.stdout.splitlines() if line.strip()}
|
|
1606
|
+
|
|
1607
|
+
|
|
1608
|
+
def _pr_number(task: str) -> str | None:
|
|
1609
|
+
match = re.search(r"(?:pr|pull request)\s*#?\s*(\d+)", task, re.IGNORECASE)
|
|
1610
|
+
return match.group(1) if match else None
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
def _apply_github_pr_changed_paths(
|
|
1614
|
+
changes: ChangeSet,
|
|
1615
|
+
pr_paths: set[str],
|
|
1616
|
+
packable: list[FileInfo],
|
|
1617
|
+
) -> ChangeSet:
|
|
1618
|
+
packable_paths = {fi.path for fi in packable}
|
|
1619
|
+
pr_packable = pr_paths & packable_paths
|
|
1620
|
+
if not pr_packable:
|
|
1621
|
+
return changes
|
|
1622
|
+
source = "GitHub PR files" if changes.source.startswith("no live changes") else f"{changes.source} + GitHub PR files"
|
|
1623
|
+
return replace(
|
|
1624
|
+
changes,
|
|
1625
|
+
all_changed=changes.all_changed | pr_packable,
|
|
1626
|
+
source=source,
|
|
1627
|
+
)
|
|
1628
|
+
|
|
1629
|
+
|
|
1630
|
+
def _boost_github_pr_paths(
|
|
1631
|
+
scored: list[tuple[Any, float, list[str]]],
|
|
1632
|
+
pr_paths: set[str],
|
|
1633
|
+
) -> list[tuple[Any, float, list[str]]]:
|
|
1634
|
+
adjusted: list[tuple[Any, float, list[str]]] = []
|
|
1635
|
+
for fi, score, reasons in scored:
|
|
1636
|
+
if fi.path in pr_paths:
|
|
1637
|
+
boosted_reasons = reasons if "GitHub PR file" in reasons else ["GitHub PR file", *reasons]
|
|
1638
|
+
adjusted.append((fi, max(score, 1000.0), boosted_reasons))
|
|
1639
|
+
continue
|
|
1640
|
+
adjusted.append((fi, score, reasons))
|
|
1641
|
+
return adjusted
|
|
1642
|
+
|
|
1643
|
+
|
|
1571
1644
|
def _task_md_body(root: Path) -> str | None:
|
|
1572
1645
|
return read_task_md(root)
|
|
1573
1646
|
|
|
@@ -27,6 +27,7 @@ from agentpack.commands import (
|
|
|
27
27
|
pack,
|
|
28
28
|
perf,
|
|
29
29
|
quickstart,
|
|
30
|
+
review_cmd,
|
|
30
31
|
release_cmd,
|
|
31
32
|
release_check,
|
|
32
33
|
retrieve,
|
|
@@ -106,6 +107,7 @@ for mod in [
|
|
|
106
107
|
mcp_cmd,
|
|
107
108
|
hook_cmd,
|
|
108
109
|
quickstart,
|
|
110
|
+
review_cmd,
|
|
109
111
|
skills,
|
|
110
112
|
release_check,
|
|
111
113
|
release_cmd,
|
|
@@ -335,8 +335,8 @@ def register(app: typer.Typer) -> None:
|
|
|
335
335
|
console.print(" [green]✓[/] npm publish token available in environment")
|
|
336
336
|
|
|
337
337
|
# --- Slash commands ---
|
|
338
|
-
console.print("\n[bold]Slash commands (/agentpack, /agentpack-learn)[/]")
|
|
339
|
-
for filename in ("agentpack.md", "agentpack-learn.md"):
|
|
338
|
+
console.print("\n[bold]Slash commands (/agentpack, /agentpack-review, /agentpack-learn)[/]")
|
|
339
|
+
for filename in ("agentpack.md", "agentpack-review.md", "agentpack-learn.md"):
|
|
340
340
|
local_cmd = root / ".claude" / "commands" / filename
|
|
341
341
|
global_cmd = Path.home() / ".claude" / "commands" / filename
|
|
342
342
|
if local_cmd.exists():
|
|
@@ -111,6 +111,15 @@ def _load_task_md(root: Path) -> str:
|
|
|
111
111
|
return (read_task_md(root) or "")[:200]
|
|
112
112
|
|
|
113
113
|
|
|
114
|
+
def _emit_additional_context(message: str) -> None:
|
|
115
|
+
print(json.dumps({
|
|
116
|
+
"hookSpecificOutput": {
|
|
117
|
+
"hookEventName": "UserPromptSubmit",
|
|
118
|
+
"additionalContext": message,
|
|
119
|
+
}
|
|
120
|
+
}))
|
|
121
|
+
|
|
122
|
+
|
|
114
123
|
def _looks_like_coding_prompt(prompt: str) -> bool:
|
|
115
124
|
"""Return True if prompt looks like a coding task (not a slash command or chat)."""
|
|
116
125
|
stripped = prompt.strip()
|
|
@@ -219,29 +228,32 @@ def _load_top_files(root: Path, n: int = 5) -> list[dict]:
|
|
|
219
228
|
return _load_hints(root, n)
|
|
220
229
|
|
|
221
230
|
|
|
222
|
-
def
|
|
231
|
+
def _load_pack_metadata(root: Path) -> dict:
|
|
223
232
|
meta_path = root / ".agentpack" / "pack_metadata.json"
|
|
224
233
|
if not meta_path.exists():
|
|
225
|
-
return
|
|
234
|
+
return {}
|
|
226
235
|
try:
|
|
227
|
-
return json.loads(meta_path.read_text(
|
|
236
|
+
return json.loads(meta_path.read_text(encoding="utf-8"))
|
|
228
237
|
except Exception:
|
|
229
|
-
return
|
|
238
|
+
return {}
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def _load_pack_task(root: Path) -> str:
|
|
242
|
+
return str(_load_pack_metadata(root).get("task", "") or "")
|
|
230
243
|
|
|
231
244
|
|
|
232
245
|
def _load_delta_summary(root: Path) -> str:
|
|
233
|
-
|
|
234
|
-
if not meta_path.exists():
|
|
235
|
-
return ""
|
|
236
|
-
try:
|
|
237
|
-
meta = json.loads(meta_path.read_text(encoding="utf-8"))
|
|
238
|
-
except Exception:
|
|
239
|
-
return ""
|
|
246
|
+
meta = _load_pack_metadata(root)
|
|
240
247
|
freshness = meta.get("freshness") or {}
|
|
241
248
|
delta = freshness.get("delta_summary", "")
|
|
242
249
|
return str(delta).splitlines()[0][:240] if delta else ""
|
|
243
250
|
|
|
244
251
|
|
|
252
|
+
def _packed_root_hash(root: Path) -> str | None:
|
|
253
|
+
value = _load_pack_metadata(root).get("snapshot_root_hash")
|
|
254
|
+
return str(value) if value else None
|
|
255
|
+
|
|
256
|
+
|
|
245
257
|
def _infer_live_task(root: Path) -> str:
|
|
246
258
|
"""Live task: git priority chain (no stale metadata). Falls back to 'unknown'."""
|
|
247
259
|
try:
|
|
@@ -270,6 +282,7 @@ def _run_session_start(root: Path) -> None:
|
|
|
270
282
|
for sentinel in [
|
|
271
283
|
root / ".agentpack" / ".mcp_reminded",
|
|
272
284
|
root / ".agentpack" / ".context_injected",
|
|
285
|
+
root / ".agentpack" / ".no_task_reminded",
|
|
273
286
|
]:
|
|
274
287
|
try:
|
|
275
288
|
sentinel.unlink(missing_ok=True)
|
|
@@ -305,8 +318,6 @@ def _run_blocking_pack(root: Path) -> tuple[bool, str]:
|
|
|
305
318
|
|
|
306
319
|
|
|
307
320
|
def _run_user_prompt_submit(root: Path) -> None:
|
|
308
|
-
snap_sentinel = root / ".agentpack" / ".mcp_reminded"
|
|
309
|
-
|
|
310
321
|
try:
|
|
311
322
|
hook_data = json.loads(sys.stdin.read())
|
|
312
323
|
prompt = hook_data.get("prompt", "")
|
|
@@ -315,6 +326,20 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
315
326
|
|
|
316
327
|
cfg = load_config(root)
|
|
317
328
|
task_md = _load_task_md(root)
|
|
329
|
+
if not task_md:
|
|
330
|
+
if _looks_like_coding_prompt(prompt):
|
|
331
|
+
reminder = root / ".agentpack" / ".no_task_reminded"
|
|
332
|
+
if not reminder.exists():
|
|
333
|
+
try:
|
|
334
|
+
reminder.write_text("1", encoding="utf-8")
|
|
335
|
+
except Exception:
|
|
336
|
+
pass
|
|
337
|
+
_emit_additional_context(
|
|
338
|
+
"AgentPack idle. No active task in `.agentpack/task.md`.\n"
|
|
339
|
+
"Run `agentpack start \"describe the task\"` to enable prompt-time hints."
|
|
340
|
+
)
|
|
341
|
+
return
|
|
342
|
+
|
|
318
343
|
task_switched = bool(
|
|
319
344
|
cfg.hooks.task_switch_detection
|
|
320
345
|
and _looks_like_task_switch(
|
|
@@ -336,43 +361,36 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
336
361
|
pass
|
|
337
362
|
|
|
338
363
|
current_hash = _current_root_hash(root)
|
|
339
|
-
reminded_hash = snap_sentinel.read_text().strip() if snap_sentinel.exists() else None
|
|
340
|
-
repo_changed = current_hash != reminded_hash
|
|
341
364
|
packed_task = _load_pack_task(root)
|
|
365
|
+
packed_root_hash = _packed_root_hash(root)
|
|
366
|
+
repo_changed = bool(current_hash and packed_root_hash and current_hash != packed_root_hash)
|
|
367
|
+
pack_missing = not packed_task or not packed_root_hash
|
|
342
368
|
pack_task_changed = bool(task != "auto" and packed_task and packed_task != task)
|
|
343
369
|
|
|
344
|
-
|
|
345
|
-
blocking_refresh = bool(
|
|
346
|
-
cfg.hooks.blocking_task_refresh and (task_switched or pack_task_changed)
|
|
347
|
-
)
|
|
370
|
+
context_stale = pack_missing or repo_changed or task_switched or pack_task_changed
|
|
371
|
+
blocking_refresh = bool(cfg.hooks.blocking_task_refresh and context_stale)
|
|
348
372
|
refresh_state = "fresh"
|
|
349
373
|
refresh_error = ""
|
|
350
374
|
|
|
351
|
-
if
|
|
352
|
-
|
|
353
|
-
try:
|
|
354
|
-
_write_task_md(root, task)
|
|
355
|
-
except Exception:
|
|
356
|
-
pass
|
|
375
|
+
if context_stale:
|
|
376
|
+
refresh_state = "refresh pending"
|
|
357
377
|
if blocking_refresh:
|
|
358
378
|
ok, detail = _run_blocking_pack(root)
|
|
359
379
|
refresh_state = "refreshed" if ok else "refresh failed"
|
|
360
380
|
refresh_error = detail
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
refresh_state = "repacking"
|
|
367
|
-
try:
|
|
368
|
-
snap_sentinel.write_text(current_hash or "1")
|
|
369
|
-
except Exception:
|
|
370
|
-
pass
|
|
381
|
+
if ok:
|
|
382
|
+
pack_missing = False
|
|
383
|
+
pack_task_changed = False
|
|
384
|
+
repo_changed = False
|
|
385
|
+
task_switched = False
|
|
371
386
|
|
|
372
387
|
has_mcp = _mcp_installed(root)
|
|
388
|
+
current_task = _load_task_md(root) or _infer_live_task(root)
|
|
389
|
+
delta = _load_delta_summary(root)
|
|
390
|
+
safe_hints = not pack_missing and not pack_task_changed and not task_switched
|
|
391
|
+
hints = _load_hints(root, n=5 if has_mcp else 8) if safe_hints else []
|
|
373
392
|
|
|
374
393
|
if has_mcp:
|
|
375
|
-
hints = _load_hints(root, n=5)
|
|
376
394
|
if hints:
|
|
377
395
|
files_lines = "\n".join(
|
|
378
396
|
f" - {h['path']}" + (f" — {h['why']}" if h.get("why") else "")
|
|
@@ -382,12 +400,10 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
382
400
|
status_note = "(refreshed for current task)"
|
|
383
401
|
elif refresh_state == "refresh failed":
|
|
384
402
|
status_note = "(refresh failed — call pack_context to retry)"
|
|
385
|
-
elif refresh_state == "
|
|
386
|
-
status_note = "(
|
|
403
|
+
elif refresh_state == "refresh pending":
|
|
404
|
+
status_note = "(refresh pending — call get_context for fresh results)"
|
|
387
405
|
else:
|
|
388
406
|
status_note = "(index fresh)"
|
|
389
|
-
current_task = _load_task_md(root) or _infer_live_task(root)
|
|
390
|
-
delta = _load_delta_summary(root)
|
|
391
407
|
msg = (
|
|
392
408
|
f"AgentPack {status_note}\n"
|
|
393
409
|
f"task: {current_task}\n"
|
|
@@ -397,16 +413,26 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
397
413
|
f"top files:\n{files_lines}\n"
|
|
398
414
|
f"Call agentpack_get_delta_context() for delta or agentpack_pack_context(task=\"...\") for full ranked context."
|
|
399
415
|
)
|
|
416
|
+
elif refresh_state == "refresh pending":
|
|
417
|
+
msg = (
|
|
418
|
+
"AgentPack active (refresh pending)\n"
|
|
419
|
+
f"task: {current_task}\n"
|
|
420
|
+
"Call agentpack_get_context() to refresh the current task pack."
|
|
421
|
+
)
|
|
422
|
+
elif refresh_state == "refresh failed":
|
|
423
|
+
msg = (
|
|
424
|
+
"AgentPack active (refresh failed)\n"
|
|
425
|
+
f"task: {current_task}\n"
|
|
426
|
+
+ (f"refresh error: {refresh_error}\n" if refresh_error else "")
|
|
427
|
+
+ "Call agentpack_pack_context(task=\"...\") to rebuild the current task pack."
|
|
428
|
+
)
|
|
400
429
|
else:
|
|
401
430
|
msg = (
|
|
402
431
|
"AgentPack active. No pack yet — call agentpack_pack_context(task=\"...\") "
|
|
403
432
|
"to build context for this task."
|
|
404
433
|
)
|
|
405
434
|
else:
|
|
406
|
-
hints = _load_hints(root, n=8)
|
|
407
|
-
current_task = _load_task_md(root) or _infer_live_task(root)
|
|
408
435
|
if hints:
|
|
409
|
-
delta = _load_delta_summary(root)
|
|
410
436
|
files_lines = "\n".join(
|
|
411
437
|
f" - {h['path']}" + (f" — {h['why']}" if h.get("why") else "")
|
|
412
438
|
for h in hints
|
|
@@ -415,8 +441,8 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
415
441
|
changed_note = " (refreshed)"
|
|
416
442
|
elif refresh_state == "refresh failed":
|
|
417
443
|
changed_note = " (refresh failed)"
|
|
418
|
-
elif refresh_state == "
|
|
419
|
-
changed_note = " (
|
|
444
|
+
elif refresh_state == "refresh pending":
|
|
445
|
+
changed_note = " (refresh pending)"
|
|
420
446
|
else:
|
|
421
447
|
changed_note = ""
|
|
422
448
|
msg = (
|
|
@@ -428,6 +454,19 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
428
454
|
f"top files:\n{files_lines}\n\n"
|
|
429
455
|
f"For richer context, install MCP: agentpack install --agent claude"
|
|
430
456
|
)
|
|
457
|
+
elif refresh_state == "refresh pending":
|
|
458
|
+
msg = (
|
|
459
|
+
"AgentPack active (refresh pending)\n"
|
|
460
|
+
f"task: {current_task}\n"
|
|
461
|
+
"Run `agentpack pack --task auto` or install MCP and call `agentpack_get_context()`."
|
|
462
|
+
)
|
|
463
|
+
elif refresh_state == "refresh failed":
|
|
464
|
+
msg = (
|
|
465
|
+
"AgentPack active (refresh failed)\n"
|
|
466
|
+
f"task: {current_task}\n"
|
|
467
|
+
+ (f"refresh error: {refresh_error}\n" if refresh_error else "")
|
|
468
|
+
+ "Run `agentpack pack --task auto` to rebuild the current task pack."
|
|
469
|
+
)
|
|
431
470
|
else:
|
|
432
471
|
msg = (
|
|
433
472
|
"AgentPack active. Write `.agentpack/task.md`, then run `agentpack pack --task auto` to build context.\n"
|
|
@@ -437,9 +476,4 @@ def _run_user_prompt_submit(root: Path) -> None:
|
|
|
437
476
|
if len(msg) > 3000:
|
|
438
477
|
msg = msg[:2970] + "\n... [truncated]"
|
|
439
478
|
|
|
440
|
-
|
|
441
|
-
"hookSpecificOutput": {
|
|
442
|
-
"hookEventName": "UserPromptSubmit",
|
|
443
|
-
"additionalContext": msg,
|
|
444
|
-
}
|
|
445
|
-
}))
|
|
479
|
+
_emit_additional_context(msg)
|
|
@@ -25,7 +25,7 @@ _INIT_AGENTS = ("auto", "claude", "cursor", "windsurf", "codex", "antigravity",
|
|
|
25
25
|
_AGENT_GITIGNORE_ENTRIES = {
|
|
26
26
|
"cursor": (".vscode/tasks.json",),
|
|
27
27
|
"windsurf": (".vscode/tasks.json",),
|
|
28
|
-
"antigravity": (".
|
|
28
|
+
"antigravity": (".vscode/tasks.json", "GEMINI.md"),
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
|
|
@@ -80,6 +80,7 @@ def _repo_gitignore_entries(share_cache: bool = False, agent: str = "generic") -
|
|
|
80
80
|
".agentpack/progress.md",
|
|
81
81
|
".agentpack/loop_events.jsonl",
|
|
82
82
|
".agentpack/loop_failures.jsonl",
|
|
83
|
+
".agent/skills/agentpack/",
|
|
83
84
|
".agentignore",
|
|
84
85
|
]
|
|
85
86
|
)
|
|
@@ -255,6 +256,7 @@ def _agent_integration_paths(agent: str) -> tuple[str, ...]:
|
|
|
255
256
|
".claude/settings.json",
|
|
256
257
|
".mcp.json",
|
|
257
258
|
".claude/commands/agentpack.md",
|
|
259
|
+
".claude/commands/agentpack-review.md",
|
|
258
260
|
".claude/commands/agentpack-learn.md",
|
|
259
261
|
)
|
|
260
262
|
if agent == "cursor":
|
|
@@ -261,6 +261,7 @@ def _install_slash_command(root: Path, global_install: bool) -> dict[str, str]:
|
|
|
261
261
|
commands_dir.mkdir(parents=True, exist_ok=True)
|
|
262
262
|
return {
|
|
263
263
|
"/agentpack": _install_slash_command_file(commands_dir, "agentpack.md"),
|
|
264
|
+
"/agentpack-review": _install_slash_command_file(commands_dir, "agentpack-review.md"),
|
|
264
265
|
"/agentpack-learn": _install_slash_command_file(commands_dir, "agentpack-learn.md"),
|
|
265
266
|
}
|
|
266
267
|
|