agentpack-cli 0.1.6__tar.gz → 0.1.8__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 (85) hide show
  1. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/PKG-INFO +43 -35
  2. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/README.md +39 -34
  3. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/pyproject.toml +7 -2
  4. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/analysis/ranking.py +8 -1
  5. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/application/pack_service.py +9 -2
  6. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/cli.py +2 -2
  7. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/benchmark.py +174 -12
  8. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/explain.py +3 -2
  9. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/init.py +32 -4
  10. agentpack_cli-0.1.8/src/agentpack/commands/mcp_cmd.py +13 -0
  11. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/pack.py +21 -1
  12. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/session.py +59 -31
  13. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/watch.py +86 -36
  14. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/config.py +37 -0
  15. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/ignore.py +21 -0
  16. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/scanner.py +26 -0
  17. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/installers/claude.py +4 -1
  18. agentpack_cli-0.1.8/src/agentpack/mcp_server.py +119 -0
  19. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/.gitignore +0 -0
  20. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/LICENSE +0 -0
  21. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/__init__.py +0 -0
  22. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/adapters/__init__.py +0 -0
  23. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/adapters/antigravity.py +0 -0
  24. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/adapters/base.py +0 -0
  25. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/adapters/claude.py +0 -0
  26. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/adapters/codex.py +0 -0
  27. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/adapters/cursor.py +0 -0
  28. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/adapters/detect.py +0 -0
  29. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/adapters/generic.py +0 -0
  30. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/adapters/windsurf.py +0 -0
  31. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/analysis/__init__.py +0 -0
  32. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/analysis/dependency_graph.py +0 -0
  33. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/analysis/go_imports.py +0 -0
  34. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/analysis/java_imports.py +0 -0
  35. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/analysis/js_ts_imports.py +0 -0
  36. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/analysis/python_imports.py +0 -0
  37. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/analysis/rust_imports.py +0 -0
  38. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/analysis/symbols.py +0 -0
  39. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/analysis/tests.py +0 -0
  40. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/application/__init__.py +0 -0
  41. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/__init__.py +0 -0
  42. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/_shared.py +0 -0
  43. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/claude_cmd.py +0 -0
  44. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/diff.py +0 -0
  45. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/doctor.py +0 -0
  46. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/install.py +0 -0
  47. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/monitor.py +0 -0
  48. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/scan.py +0 -0
  49. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/stats.py +0 -0
  50. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/status.py +0 -0
  51. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/commands/summarize.py +0 -0
  52. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/__init__.py +0 -0
  53. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/bootstrap.py +0 -0
  54. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/cache.py +0 -0
  55. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/context_pack.py +0 -0
  56. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/diff.py +0 -0
  57. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/git.py +0 -0
  58. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/git_hooks.py +0 -0
  59. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/global_install.py +0 -0
  60. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/merkle.py +0 -0
  61. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/models.py +0 -0
  62. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/redactor.py +0 -0
  63. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/snapshot.py +0 -0
  64. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/token_estimator.py +0 -0
  65. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/core/vscode_tasks.py +0 -0
  66. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/data/agentpack.md +0 -0
  67. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/installers/__init__.py +0 -0
  68. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/installers/antigravity.py +0 -0
  69. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/installers/codex.py +0 -0
  70. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/installers/cursor.py +0 -0
  71. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/installers/windsurf.py +0 -0
  72. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/integrations/__init__.py +0 -0
  73. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/integrations/git_hooks.py +0 -0
  74. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/integrations/global_install.py +0 -0
  75. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/integrations/vscode_tasks.py +0 -0
  76. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/renderers/__init__.py +0 -0
  77. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/renderers/compact.py +0 -0
  78. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/renderers/markdown.py +0 -0
  79. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/renderers/receipts.py +0 -0
  80. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/session/__init__.py +0 -0
  81. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/session/state.py +0 -0
  82. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/summaries/__init__.py +0 -0
  83. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/summaries/base.py +0 -0
  84. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/src/agentpack/summaries/llm.py +0 -0
  85. {agentpack_cli-0.1.6 → agentpack_cli-0.1.8}/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.1.6
3
+ Version: 0.1.8
4
4
  Summary: Token-aware context packing for AI coding agents — Claude, Cursor, Windsurf, and Codex
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -24,6 +24,7 @@ Requires-Dist: tomli>=2.0.0; python_version < '3.11'
24
24
  Requires-Dist: typer>=0.12.0
25
25
  Provides-Extra: all
26
26
  Requires-Dist: anthropic>=0.39.0; extra == 'all'
27
+ Requires-Dist: mcp>=1.0.0; extra == 'all'
27
28
  Requires-Dist: openai>=1.0.0; extra == 'all'
28
29
  Requires-Dist: watchdog>=4.0.0; extra == 'all'
29
30
  Provides-Extra: dev
@@ -34,6 +35,8 @@ Requires-Dist: tomli>=2.0.0; (python_version < '3.11') and extra == 'dev'
34
35
  Provides-Extra: llm
35
36
  Requires-Dist: anthropic>=0.39.0; extra == 'llm'
36
37
  Requires-Dist: openai>=1.0.0; extra == 'llm'
38
+ Provides-Extra: mcp
39
+ Requires-Dist: mcp>=1.0.0; extra == 'mcp'
37
40
  Provides-Extra: watch
38
41
  Requires-Dist: watchdog>=4.0.0; extra == 'watch'
39
42
  Description-Content-Type: text/markdown
@@ -81,12 +84,13 @@ The result: your agent starts every session with a focused, accurate picture of
81
84
  ```bash
82
85
  pip install agentpack-cli
83
86
 
84
- # Session mode: start once, then work normally
87
+ # One-time setup per project
85
88
  cd your-project
86
- agentpack init
87
- agentpack install # auto-detects your IDE
88
- agentpack session start
89
- agentpack watch # in another terminal — keeps context fresh automatically
89
+ agentpack init # creates config, session, task.md — nothing else needed
90
+ agentpack install # auto-detects your IDE (optional but recommended)
91
+
92
+ # Every terminal session
93
+ agentpack watch # keeps context fresh automatically — that's it
90
94
  ```
91
95
 
92
96
  Then open Claude Code / Cursor / Windsurf / Codex / Antigravity and write your task normally. AgentPack keeps `.agentpack/context.md` current.
@@ -221,17 +225,20 @@ Requires Python 3.10+.
221
225
 
222
226
  ## Start Once, Then Work Normally
223
227
 
224
- The recommended workflow for repeated development sessions:
228
+ The full workflow:
225
229
 
226
230
  ```bash
227
- agentpack install # configure your agent (once per project)
228
- agentpack session start # create session state + generate initial context
229
- agentpack watch # in another terminal refreshes context on file/task changes
231
+ # One-time project setup
232
+ agentpack init # creates config, session, task.md
233
+ agentpack install # configure your agent (optional but recommended)
234
+
235
+ # Every terminal session — just one command
236
+ agentpack watch # auto-resumes session, refreshes context on file/task changes
230
237
  ```
231
238
 
232
239
  Then open Claude Code / Cursor / Codex and write your coding task normally.
233
240
 
234
- - AgentPack keeps `.agentpack/context.md` fresh while `watch` is running.
241
+ - AgentPack keeps `.agentpack/context.md` and `.agentpack/context.claude.md` fresh while `watch` is running.
235
242
  - To change the task: `agentpack session refresh --task "new task"` — or just tell Claude and it updates `task.md` itself.
236
243
  - Check session state: `agentpack session status`
237
244
  - Force a refresh: `agentpack session refresh`
@@ -242,11 +249,11 @@ Then open Claude Code / Cursor / Codex and write your coding task normally.
242
249
  | Agent | Automation level | Method |
243
250
  |---|---|---|
244
251
  | Claude Code (hook) | Highest | `UserPromptSubmit` hook auto-injects context |
245
- | Claude Code (session) | High | `session start` + `watch` + read `context.md` |
246
- | Codex | Medium | `AGENTS.md` + `session start` + `watch` |
247
- | Cursor | Medium | `.cursor/rules/agentpack.mdc` + `session start` + `watch` |
248
- | Windsurf | Medium | `.windsurfrules` + `session start` + `watch` |
249
- | Antigravity | Medium | `.agent/skills/agentpack/SKILL.md` + `GEMINI.md` + `session start` + `watch` |
252
+ | Claude Code (session) | High | `init` + `watch` + read `context.md` |
253
+ | Codex | Medium | `AGENTS.md` + `init` + `watch` |
254
+ | Cursor | Medium | `.cursor/rules/agentpack.mdc` + `init` + `watch` |
255
+ | Windsurf | Medium | `.windsurfrules` + `init` + `watch` |
256
+ | Antigravity | Medium | `.agent/skills/agentpack/SKILL.md` + `GEMINI.md` + `init` + `watch` |
250
257
  | Generic | Basic | `watch` mode + read `context.md` |
251
258
 
252
259
  ### Honest limitations
@@ -263,10 +270,9 @@ Then open Claude Code / Cursor / Codex and write your coding task normally.
263
270
  ```bash
264
271
  pip install agentpack-cli
265
272
  cd your-project
266
- agentpack init
273
+ agentpack init # one-time setup: config + session + task.md
267
274
  agentpack install # auto-detects your IDE (Claude Code, Cursor, Windsurf, Codex, Antigravity)
268
- agentpack session start # generate initial context
269
- agentpack watch # in another terminal — keeps context fresh
275
+ agentpack watch # in another terminal — keeps context fresh automatically
270
276
  ```
271
277
 
272
278
  Then open your agent and write your task normally.
@@ -642,22 +648,23 @@ Options:
642
648
 
643
649
  ### `agentpack session`
644
650
 
645
- Manage AgentPack sessions the "start once, work normally" workflow.
651
+ Optional session management. `agentpack init` bootstraps the session automatically — `session start` is only needed to change agent/mode after init or force a fresh pack.
646
652
 
647
653
  ```bash
648
- agentpack session start # create session, generate initial context
654
+ agentpack session start # re-run to change agent/mode or force refresh
649
655
  agentpack session start --agent claude # set agent (claude|cursor|codex|generic)
650
- agentpack session start --task "fix bug" # set initial task
656
+ agentpack session start --task "fix bug" # change task + refresh context
651
657
  agentpack session status # show session state + context size
652
658
  agentpack session refresh # regenerate context now
653
659
  agentpack session refresh --task "new task" # change task + refresh
654
660
  agentpack session stop # mark session inactive
655
661
  ```
656
662
 
657
- `session start` creates:
663
+ `agentpack init` creates (idempotently):
658
664
  - `.agentpack/session.json` — session state
659
- - `.agentpack/task.md` — current task (written by Claude or `session refresh --task`)
660
- - `.agentpack/context.md` — readable context pack
665
+ - `.agentpack/task.md` — current task (edit directly or use `session refresh --task`)
666
+ - `.agentpack/context.md` — readable context pack (updated by `watch`)
667
+ - `.agentpack/context.claude.md` — Claude Code format (always written alongside context.md)
661
668
  - `.agentpack/context.compact.md` — compact protocol format
662
669
 
663
670
  ---
@@ -688,7 +695,7 @@ Launch Claude CLI with an up-to-date context.
688
695
  agentpack claude
689
696
  ```
690
697
 
691
- Requires an active session (`agentpack session start`). Refreshes context, prints the context path, then launches `claude` if found. Transparent about what it does — no fake prompt injection.
698
+ Requires an initialized project (`agentpack init`). Refreshes context, prints the context path, then launches `claude` if found. Transparent about what it does — no fake prompt injection.
692
699
 
693
700
  ---
694
701
 
@@ -1240,13 +1247,14 @@ Add to `.github/workflows/agentpack-context.yml` — see the full example in [CI
1240
1247
  ### Session mode: keep context fresh while you work
1241
1248
 
1242
1249
  ```bash
1243
- # Terminal 1: start a session and watch for changes
1244
- agentpack session start --task "refactor auth"
1245
- agentpack watch # in a second terminal — refreshes context on every save
1250
+ # One-time project setup
1251
+ agentpack init --task "refactor auth" # or edit .agentpack/task.md directly
1252
+
1253
+ # Every terminal session — just one command
1254
+ agentpack watch # auto-resumes session, refreshes context on every save
1246
1255
 
1247
- # Terminal 2: your editor / agent
1248
- # Save a file context.md regenerates automatically
1249
- # Change task: agentpack session refresh --task "new task"
1256
+ # Change task mid-session
1257
+ agentpack session refresh --task "new task"
1250
1258
  ```
1251
1259
 
1252
1260
  ---
@@ -1316,8 +1324,8 @@ agentpack pack --task "fix bug" --budget 40000 # explicit token cap
1316
1324
  ### Watch mode for active sessions
1317
1325
 
1318
1326
  ```bash
1319
- agentpack session start --task "refactor auth"
1320
- agentpack watch # in another terminal
1327
+ agentpack init # one-time setup (creates session + task.md)
1328
+ agentpack watch # in another terminal — auto-resumes each time
1321
1329
  ```
1322
1330
 
1323
1331
  Refreshes `.agentpack/context.md` every time you save a file. Change the task with `agentpack session refresh --task "..."` — or tell Claude and it writes `task.md` itself.
@@ -1360,7 +1368,7 @@ config_file = 60 # was 25 — configs always matter here
1360
1368
  - **Local-first**: `init`, `scan`, `diff`, `pack`, `stats`, `summarize` make zero API calls by default
1361
1369
  - **Non-destructive**: never overwrites user files; config patching only touches agentpack-managed blocks
1362
1370
  - **Agent-neutral**: architecture is generic; Claude Code is the primary target (deepest integration); Cursor, Windsurf, Codex, and Antigravity are supported but less battle-tested
1363
- - **No daemons**: file watching is opt-in via `agentpack watch`; session management is opt-in via `agentpack session start`; git hooks run in the background and are opt-in via `install`
1371
+ - **No daemons**: file watching is opt-in via `agentpack watch`; git hooks run in the background and are opt-in via `install`
1364
1372
  - **Honest**: packed token count reflects real content, not raw repo size
1365
1373
 
1366
1374
  ---
@@ -41,12 +41,13 @@ The result: your agent starts every session with a focused, accurate picture of
41
41
  ```bash
42
42
  pip install agentpack-cli
43
43
 
44
- # Session mode: start once, then work normally
44
+ # One-time setup per project
45
45
  cd your-project
46
- agentpack init
47
- agentpack install # auto-detects your IDE
48
- agentpack session start
49
- agentpack watch # in another terminal — keeps context fresh automatically
46
+ agentpack init # creates config, session, task.md — nothing else needed
47
+ agentpack install # auto-detects your IDE (optional but recommended)
48
+
49
+ # Every terminal session
50
+ agentpack watch # keeps context fresh automatically — that's it
50
51
  ```
51
52
 
52
53
  Then open Claude Code / Cursor / Windsurf / Codex / Antigravity and write your task normally. AgentPack keeps `.agentpack/context.md` current.
@@ -181,17 +182,20 @@ Requires Python 3.10+.
181
182
 
182
183
  ## Start Once, Then Work Normally
183
184
 
184
- The recommended workflow for repeated development sessions:
185
+ The full workflow:
185
186
 
186
187
  ```bash
187
- agentpack install # configure your agent (once per project)
188
- agentpack session start # create session state + generate initial context
189
- agentpack watch # in another terminal refreshes context on file/task changes
188
+ # One-time project setup
189
+ agentpack init # creates config, session, task.md
190
+ agentpack install # configure your agent (optional but recommended)
191
+
192
+ # Every terminal session — just one command
193
+ agentpack watch # auto-resumes session, refreshes context on file/task changes
190
194
  ```
191
195
 
192
196
  Then open Claude Code / Cursor / Codex and write your coding task normally.
193
197
 
194
- - AgentPack keeps `.agentpack/context.md` fresh while `watch` is running.
198
+ - AgentPack keeps `.agentpack/context.md` and `.agentpack/context.claude.md` fresh while `watch` is running.
195
199
  - To change the task: `agentpack session refresh --task "new task"` — or just tell Claude and it updates `task.md` itself.
196
200
  - Check session state: `agentpack session status`
197
201
  - Force a refresh: `agentpack session refresh`
@@ -202,11 +206,11 @@ Then open Claude Code / Cursor / Codex and write your coding task normally.
202
206
  | Agent | Automation level | Method |
203
207
  |---|---|---|
204
208
  | Claude Code (hook) | Highest | `UserPromptSubmit` hook auto-injects context |
205
- | Claude Code (session) | High | `session start` + `watch` + read `context.md` |
206
- | Codex | Medium | `AGENTS.md` + `session start` + `watch` |
207
- | Cursor | Medium | `.cursor/rules/agentpack.mdc` + `session start` + `watch` |
208
- | Windsurf | Medium | `.windsurfrules` + `session start` + `watch` |
209
- | Antigravity | Medium | `.agent/skills/agentpack/SKILL.md` + `GEMINI.md` + `session start` + `watch` |
209
+ | Claude Code (session) | High | `init` + `watch` + read `context.md` |
210
+ | Codex | Medium | `AGENTS.md` + `init` + `watch` |
211
+ | Cursor | Medium | `.cursor/rules/agentpack.mdc` + `init` + `watch` |
212
+ | Windsurf | Medium | `.windsurfrules` + `init` + `watch` |
213
+ | Antigravity | Medium | `.agent/skills/agentpack/SKILL.md` + `GEMINI.md` + `init` + `watch` |
210
214
  | Generic | Basic | `watch` mode + read `context.md` |
211
215
 
212
216
  ### Honest limitations
@@ -223,10 +227,9 @@ Then open Claude Code / Cursor / Codex and write your coding task normally.
223
227
  ```bash
224
228
  pip install agentpack-cli
225
229
  cd your-project
226
- agentpack init
230
+ agentpack init # one-time setup: config + session + task.md
227
231
  agentpack install # auto-detects your IDE (Claude Code, Cursor, Windsurf, Codex, Antigravity)
228
- agentpack session start # generate initial context
229
- agentpack watch # in another terminal — keeps context fresh
232
+ agentpack watch # in another terminal — keeps context fresh automatically
230
233
  ```
231
234
 
232
235
  Then open your agent and write your task normally.
@@ -602,22 +605,23 @@ Options:
602
605
 
603
606
  ### `agentpack session`
604
607
 
605
- Manage AgentPack sessions the "start once, work normally" workflow.
608
+ Optional session management. `agentpack init` bootstraps the session automatically — `session start` is only needed to change agent/mode after init or force a fresh pack.
606
609
 
607
610
  ```bash
608
- agentpack session start # create session, generate initial context
611
+ agentpack session start # re-run to change agent/mode or force refresh
609
612
  agentpack session start --agent claude # set agent (claude|cursor|codex|generic)
610
- agentpack session start --task "fix bug" # set initial task
613
+ agentpack session start --task "fix bug" # change task + refresh context
611
614
  agentpack session status # show session state + context size
612
615
  agentpack session refresh # regenerate context now
613
616
  agentpack session refresh --task "new task" # change task + refresh
614
617
  agentpack session stop # mark session inactive
615
618
  ```
616
619
 
617
- `session start` creates:
620
+ `agentpack init` creates (idempotently):
618
621
  - `.agentpack/session.json` — session state
619
- - `.agentpack/task.md` — current task (written by Claude or `session refresh --task`)
620
- - `.agentpack/context.md` — readable context pack
622
+ - `.agentpack/task.md` — current task (edit directly or use `session refresh --task`)
623
+ - `.agentpack/context.md` — readable context pack (updated by `watch`)
624
+ - `.agentpack/context.claude.md` — Claude Code format (always written alongside context.md)
621
625
  - `.agentpack/context.compact.md` — compact protocol format
622
626
 
623
627
  ---
@@ -648,7 +652,7 @@ Launch Claude CLI with an up-to-date context.
648
652
  agentpack claude
649
653
  ```
650
654
 
651
- Requires an active session (`agentpack session start`). Refreshes context, prints the context path, then launches `claude` if found. Transparent about what it does — no fake prompt injection.
655
+ Requires an initialized project (`agentpack init`). Refreshes context, prints the context path, then launches `claude` if found. Transparent about what it does — no fake prompt injection.
652
656
 
653
657
  ---
654
658
 
@@ -1200,13 +1204,14 @@ Add to `.github/workflows/agentpack-context.yml` — see the full example in [CI
1200
1204
  ### Session mode: keep context fresh while you work
1201
1205
 
1202
1206
  ```bash
1203
- # Terminal 1: start a session and watch for changes
1204
- agentpack session start --task "refactor auth"
1205
- agentpack watch # in a second terminal — refreshes context on every save
1207
+ # One-time project setup
1208
+ agentpack init --task "refactor auth" # or edit .agentpack/task.md directly
1209
+
1210
+ # Every terminal session — just one command
1211
+ agentpack watch # auto-resumes session, refreshes context on every save
1206
1212
 
1207
- # Terminal 2: your editor / agent
1208
- # Save a file context.md regenerates automatically
1209
- # Change task: agentpack session refresh --task "new task"
1213
+ # Change task mid-session
1214
+ agentpack session refresh --task "new task"
1210
1215
  ```
1211
1216
 
1212
1217
  ---
@@ -1276,8 +1281,8 @@ agentpack pack --task "fix bug" --budget 40000 # explicit token cap
1276
1281
  ### Watch mode for active sessions
1277
1282
 
1278
1283
  ```bash
1279
- agentpack session start --task "refactor auth"
1280
- agentpack watch # in another terminal
1284
+ agentpack init # one-time setup (creates session + task.md)
1285
+ agentpack watch # in another terminal — auto-resumes each time
1281
1286
  ```
1282
1287
 
1283
1288
  Refreshes `.agentpack/context.md` every time you save a file. Change the task with `agentpack session refresh --task "..."` — or tell Claude and it writes `task.md` itself.
@@ -1320,7 +1325,7 @@ config_file = 60 # was 25 — configs always matter here
1320
1325
  - **Local-first**: `init`, `scan`, `diff`, `pack`, `stats`, `summarize` make zero API calls by default
1321
1326
  - **Non-destructive**: never overwrites user files; config patching only touches agentpack-managed blocks
1322
1327
  - **Agent-neutral**: architecture is generic; Claude Code is the primary target (deepest integration); Cursor, Windsurf, Codex, and Antigravity are supported but less battle-tested
1323
- - **No daemons**: file watching is opt-in via `agentpack watch`; session management is opt-in via `agentpack session start`; git hooks run in the background and are opt-in via `install`
1328
+ - **No daemons**: file watching is opt-in via `agentpack watch`; git hooks run in the background and are opt-in via `install`
1324
1329
  - **Honest**: packed token count reflects real content, not raw repo size
1325
1330
 
1326
1331
  ---
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentpack-cli"
3
- version = "0.1.6"
3
+ version = "0.1.8"
4
4
  description = "Token-aware context packing for AI coding agents — Claude, Cursor, Windsurf, and Codex"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -40,10 +40,15 @@ watch = [
40
40
  "watchdog>=4.0.0"
41
41
  ]
42
42
 
43
+ mcp = [
44
+ "mcp>=1.0.0"
45
+ ]
46
+
43
47
  all = [
44
48
  "anthropic>=0.39.0",
45
49
  "openai>=1.0.0",
46
- "watchdog>=4.0.0"
50
+ "watchdog>=4.0.0",
51
+ "mcp>=1.0.0"
47
52
  ]
48
53
 
49
54
  dev = [
@@ -282,6 +282,7 @@ def score_files(
282
282
  include_tests: bool = True,
283
283
  include_configs: bool = True,
284
284
  weights: ScoringWeights | None = None,
285
+ summaries: dict | None = None,
285
286
  ) -> list[tuple[FileInfo, float, list[str]]]:
286
287
  from agentpack.core.models import DependencyGraph as _DG
287
288
  if not isinstance(dep_graph, _DG):
@@ -312,7 +313,13 @@ def score_files(
312
313
  reasons.append("filename keyword match")
313
314
 
314
315
  node = dep_graph.get(fi.path)
315
- sym_names: list[str] = [] # symbols aren't stored on DependencyNode; scoring uses path/content only
316
+ sym_names: list[str] = []
317
+ if summaries and fi.path in summaries:
318
+ raw_syms = summaries[fi.path].get("symbols", [])
319
+ sym_names = [
320
+ (s["name"] if isinstance(s, dict) else s.name)
321
+ for s in raw_syms
322
+ ]
316
323
  if _symbol_matches_keywords(sym_names, keywords):
317
324
  score += w.symbol_keyword
318
325
  reasons.append("symbol keyword match")
@@ -128,6 +128,7 @@ class FileRanker:
128
128
  dep_graph: DependencyGraph,
129
129
  task: str,
130
130
  cfg: Any,
131
+ summaries: dict | None = None,
131
132
  ) -> RankResult:
132
133
  keywords = extract_keywords(task)
133
134
  keywords = enrich_keywords_from_files(keywords, changes.all_changed, packable)
@@ -147,6 +148,7 @@ class FileRanker:
147
148
  include_tests=cfg.context.include_tests,
148
149
  include_configs=cfg.context.include_configs,
149
150
  weights=cfg.scoring,
151
+ summaries=summaries,
150
152
  )
151
153
  return RankResult(keywords=keywords, scored=scored)
152
154
 
@@ -163,7 +165,12 @@ class PackPlanner:
163
165
 
164
166
  t0 = time.perf_counter()
165
167
  previous_snap = load_snapshot(root)
166
- scan_result = scan(root, ignore_spec, cfg.context.max_file_tokens, previous_snapshot=previous_snap)
168
+ scan_result = scan(
169
+ root, ignore_spec, cfg.context.max_file_tokens,
170
+ previous_snapshot=previous_snap,
171
+ include_globs=cfg.project.include_globs or None,
172
+ exclude_globs=cfg.project.exclude_globs or None,
173
+ )
167
174
  phase_times["scan"] = time.perf_counter() - t0
168
175
 
169
176
  packable = scan_result.packable
@@ -182,7 +189,7 @@ class PackPlanner:
182
189
  phase_times["changes"] = time.perf_counter() - t0
183
190
 
184
191
  t0 = time.perf_counter()
185
- rank_result = FileRanker().rank(packable, changes, dep_graph, request.task, cfg)
192
+ rank_result = FileRanker().rank(packable, changes, dep_graph, request.task, cfg, summaries=summaries)
186
193
  phase_times["rank"] = time.perf_counter() - t0
187
194
 
188
195
  t0 = time.perf_counter()
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import typer
4
- from agentpack.commands import init, scan, diff, status, stats, summarize, pack, install, monitor, explain, doctor, session, watch, claude_cmd, benchmark
4
+ from agentpack.commands import init, scan, diff, status, stats, summarize, pack, install, monitor, explain, doctor, session, watch, claude_cmd, benchmark, mcp_cmd
5
5
  from agentpack import __version__
6
6
 
7
7
 
@@ -21,7 +21,7 @@ def _main(
21
21
  pass
22
22
 
23
23
 
24
- for mod in [init, scan, diff, status, stats, summarize, pack, install, monitor, explain, doctor, session, watch, claude_cmd, benchmark]:
24
+ for mod in [init, scan, diff, status, stats, summarize, pack, install, monitor, explain, doctor, session, watch, claude_cmd, benchmark, mcp_cmd]:
25
25
  mod.register(app)
26
26
 
27
27