agentpack-cli 0.3.8__tar.gz → 0.3.9__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.
Files changed (98) hide show
  1. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/PKG-INFO +25 -3
  2. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/README.md +24 -2
  3. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/pyproject.toml +1 -1
  4. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/__init__.py +1 -1
  5. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/ranking.py +559 -32
  6. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/application/pack_service.py +215 -14
  7. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/explain.py +106 -4
  8. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/install.py +42 -4
  9. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/pack.py +5 -0
  10. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/stats.py +6 -2
  11. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/context_pack.py +21 -0
  12. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/integrations/global_install.py +61 -34
  13. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/.gitignore +0 -0
  14. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/LICENSE +0 -0
  15. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/adapters/__init__.py +0 -0
  16. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/adapters/antigravity.py +0 -0
  17. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/adapters/base.py +0 -0
  18. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/adapters/claude.py +0 -0
  19. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/adapters/codex.py +0 -0
  20. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/adapters/cursor.py +0 -0
  21. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/adapters/detect.py +0 -0
  22. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/adapters/generic.py +0 -0
  23. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/adapters/windsurf.py +0 -0
  24. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/__init__.py +0 -0
  25. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/dependency_graph.py +0 -0
  26. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/go_imports.py +0 -0
  27. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/java_imports.py +0 -0
  28. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/js_ts_imports.py +0 -0
  29. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/monorepo.py +0 -0
  30. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/naming_signals.py +0 -0
  31. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/python_imports.py +0 -0
  32. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/repo_map.py +0 -0
  33. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/role_inference.py +0 -0
  34. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/rust_imports.py +0 -0
  35. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/symbols.py +0 -0
  36. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/task_classifier.py +0 -0
  37. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/analysis/tests.py +0 -0
  38. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/application/__init__.py +0 -0
  39. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/cli.py +0 -0
  40. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/__init__.py +0 -0
  41. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/_shared.py +0 -0
  42. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/benchmark.py +0 -0
  43. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/claude_cmd.py +0 -0
  44. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/diff.py +0 -0
  45. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/doctor.py +0 -0
  46. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/guard.py +0 -0
  47. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/hook_cmd.py +0 -0
  48. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/ignore_cmd.py +0 -0
  49. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/init.py +0 -0
  50. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/mcp_cmd.py +0 -0
  51. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/migrate.py +0 -0
  52. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/monitor.py +0 -0
  53. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/quickstart.py +0 -0
  54. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/repair.py +0 -0
  55. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/scan.py +0 -0
  56. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/status.py +0 -0
  57. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/summarize.py +0 -0
  58. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/tune.py +0 -0
  59. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/commands/watch.py +0 -0
  60. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/__init__.py +0 -0
  61. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/bootstrap.py +0 -0
  62. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/cache.py +0 -0
  63. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/config.py +0 -0
  64. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/diff.py +0 -0
  65. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/git.py +0 -0
  66. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/git_hooks.py +0 -0
  67. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/global_install.py +0 -0
  68. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/ignore.py +0 -0
  69. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/merkle.py +0 -0
  70. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/models.py +0 -0
  71. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/redactor.py +0 -0
  72. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/scanner.py +0 -0
  73. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/snapshot.py +0 -0
  74. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/task_freshness.py +0 -0
  75. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/token_estimator.py +0 -0
  76. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/core/vscode_tasks.py +0 -0
  77. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/data/agentpack.md +0 -0
  78. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/installers/__init__.py +0 -0
  79. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/installers/antigravity.py +0 -0
  80. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/installers/claude.py +0 -0
  81. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/installers/codex.py +0 -0
  82. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/installers/cursor.py +0 -0
  83. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/installers/windsurf.py +0 -0
  84. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/integrations/__init__.py +0 -0
  85. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/integrations/agents.py +0 -0
  86. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/integrations/git_hooks.py +0 -0
  87. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/integrations/platform.py +0 -0
  88. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/integrations/vscode_tasks.py +0 -0
  89. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/mcp_server.py +0 -0
  90. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/renderers/__init__.py +0 -0
  91. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/renderers/compact.py +0 -0
  92. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/renderers/markdown.py +0 -0
  93. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/renderers/receipts.py +0 -0
  94. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/session/__init__.py +0 -0
  95. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/session/state.py +0 -0
  96. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/summaries/__init__.py +0 -0
  97. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/src/agentpack/summaries/base.py +0 -0
  98. {agentpack_cli-0.3.8 → agentpack_cli-0.3.9}/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.8
3
+ Version: 0.3.9
4
4
  Summary: Local context engine for AI coding agents that ranks relevant files and builds task-focused context packs.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -46,7 +46,7 @@ Description-Content-Type: text/markdown
46
46
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
47
47
  [![CI](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml/badge.svg)](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml)
48
48
 
49
- > **Status: alpha (v0.3.8).** Works, tested, used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Public benchmark proof exists for the current suite, but broader repo coverage is still growing. API may change before 1.0.
49
+ > **Status: alpha (v0.3.9).** Works, tested, used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Public benchmark proof exists for the current suite, but broader repo coverage is still growing. API may change before 1.0.
50
50
  >
51
51
  > **Platform note:** macOS, Linux, and Windows are supported. Windows support targets PowerShell plus Git for Windows. `cmd.exe` and bare Git setups are not a supported path yet.
52
52
 
@@ -607,6 +607,7 @@ Command map:
607
607
  | `agentpack monitor` | Review recent pack runs and quality signals |
608
608
  | `agentpack scan` | Inspect packable, ignored, binary, and largest files |
609
609
  | `agentpack global-install` | Install opt-in global hooks for initialized repos |
610
+ | `agentpack global-repair-hooks` | Repair stale global template hooks and current repo git hooks |
610
611
 
611
612
  ### `agentpack global-install`
612
613
 
@@ -622,7 +623,7 @@ agentpack global-install --agent antigravity # Antigravity
622
623
  ```
623
624
 
624
625
  What it does:
625
- - **Git template hooks** (`~/.git-templates/hooks/`) — git copies these into every repo on `git init` / `git clone`. On `post-commit`, `post-merge`, `post-checkout`: silently repacks **only if `.agentpack/config.toml` exists** no-op in repos that haven't opted in.
626
+ - **Git template hooks** (`~/.git-templates/hooks/`) — git copies these into every repo on `git init` / `git clone`. On `post-commit`, `post-merge`, `post-checkout` they call AgentPack's cross-platform `GitAutoRepack` hook runner and always exit cleanly. Repacking still happens only in opted-in repos; fresh clones without `.agentpack/config.toml` remain a safe no-op.
626
627
  - **Shell cd hook** (`~/.zshrc`, `~/.bashrc`, or the PowerShell profile on Windows) — on `cd` or prompt refresh, repacks if stale **only in opted-in repos**. Never touches repos without `.agentpack/config.toml`. Never auto-inits.
627
628
  - **Agent config** — same agent-specific files that `agentpack init --agent <x>` or `agentpack install --agent <x>` writes for the current project.
628
629
 
@@ -644,6 +645,27 @@ Preview before committing:
644
645
  agentpack global-install --dry-run
645
646
  ```
646
647
 
648
+ If you installed an older AgentPack build and want to refresh copied git hooks after an upgrade, run:
649
+
650
+ ```bash
651
+ agentpack global-repair-hooks
652
+ ```
653
+
654
+ That repairs `~/.git-templates/hooks/`, reasserts `git config --global init.templateDir`, and updates the current repo's `.git/hooks/` to the safe `GitAutoRepack` path.
655
+
656
+ ### `agentpack global-repair-hooks`
657
+
658
+ Refresh AgentPack's global git template hooks and the current repo's local git hooks after an upgrade.
659
+
660
+ ```bash
661
+ agentpack global-repair-hooks
662
+ ```
663
+
664
+ Use this when:
665
+ - old template hooks were copied before the `GitAutoRepack` runner existed
666
+ - a stale hook script still shells out directly instead of calling `agentpack hook`
667
+ - you want new clones and the current repo to pick up the latest non-destructive hook behavior immediately
668
+
647
669
  ---
648
670
 
649
671
  ### `agentpack global-uninstall`
@@ -7,7 +7,7 @@
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
8
  [![CI](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml/badge.svg)](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml)
9
9
 
10
- > **Status: alpha (v0.3.8).** Works, tested, used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Public benchmark proof exists for the current suite, but broader repo coverage is still growing. API may change before 1.0.
10
+ > **Status: alpha (v0.3.9).** Works, tested, used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Public benchmark proof exists for the current suite, but broader repo coverage is still growing. API may change before 1.0.
11
11
  >
12
12
  > **Platform note:** macOS, Linux, and Windows are supported. Windows support targets PowerShell plus Git for Windows. `cmd.exe` and bare Git setups are not a supported path yet.
13
13
 
@@ -568,6 +568,7 @@ Command map:
568
568
  | `agentpack monitor` | Review recent pack runs and quality signals |
569
569
  | `agentpack scan` | Inspect packable, ignored, binary, and largest files |
570
570
  | `agentpack global-install` | Install opt-in global hooks for initialized repos |
571
+ | `agentpack global-repair-hooks` | Repair stale global template hooks and current repo git hooks |
571
572
 
572
573
  ### `agentpack global-install`
573
574
 
@@ -583,7 +584,7 @@ agentpack global-install --agent antigravity # Antigravity
583
584
  ```
584
585
 
585
586
  What it does:
586
- - **Git template hooks** (`~/.git-templates/hooks/`) — git copies these into every repo on `git init` / `git clone`. On `post-commit`, `post-merge`, `post-checkout`: silently repacks **only if `.agentpack/config.toml` exists** no-op in repos that haven't opted in.
587
+ - **Git template hooks** (`~/.git-templates/hooks/`) — git copies these into every repo on `git init` / `git clone`. On `post-commit`, `post-merge`, `post-checkout` they call AgentPack's cross-platform `GitAutoRepack` hook runner and always exit cleanly. Repacking still happens only in opted-in repos; fresh clones without `.agentpack/config.toml` remain a safe no-op.
587
588
  - **Shell cd hook** (`~/.zshrc`, `~/.bashrc`, or the PowerShell profile on Windows) — on `cd` or prompt refresh, repacks if stale **only in opted-in repos**. Never touches repos without `.agentpack/config.toml`. Never auto-inits.
588
589
  - **Agent config** — same agent-specific files that `agentpack init --agent <x>` or `agentpack install --agent <x>` writes for the current project.
589
590
 
@@ -605,6 +606,27 @@ Preview before committing:
605
606
  agentpack global-install --dry-run
606
607
  ```
607
608
 
609
+ If you installed an older AgentPack build and want to refresh copied git hooks after an upgrade, run:
610
+
611
+ ```bash
612
+ agentpack global-repair-hooks
613
+ ```
614
+
615
+ That repairs `~/.git-templates/hooks/`, reasserts `git config --global init.templateDir`, and updates the current repo's `.git/hooks/` to the safe `GitAutoRepack` path.
616
+
617
+ ### `agentpack global-repair-hooks`
618
+
619
+ Refresh AgentPack's global git template hooks and the current repo's local git hooks after an upgrade.
620
+
621
+ ```bash
622
+ agentpack global-repair-hooks
623
+ ```
624
+
625
+ Use this when:
626
+ - old template hooks were copied before the `GitAutoRepack` runner existed
627
+ - a stale hook script still shells out directly instead of calling `agentpack hook`
628
+ - you want new clones and the current repo to pick up the latest non-destructive hook behavior immediately
629
+
608
630
  ---
609
631
 
610
632
  ### `agentpack global-uninstall`
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentpack-cli"
3
- version = "0.3.8"
3
+ version = "0.3.9"
4
4
  description = "Local context engine for AI coding agents that ranks relevant files and builds task-focused context packs."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -1,3 +1,3 @@
1
1
  """AgentPack — task-aware context packing for AI coding agents."""
2
2
 
3
- __version__ = "0.3.8"
3
+ __version__ = "0.3.9"