ctx-agent 2.0.0__tar.gz → 2.0.2__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 (123) hide show
  1. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/PKG-INFO +11 -14
  2. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/README.md +10 -13
  3. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/pyproject.toml +1 -1
  4. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/brand.py +1 -1
  5. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/headless.py +2 -1
  6. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/update.py +10 -10
  7. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_misc.py +1 -1
  8. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_update.py +12 -5
  9. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/.gitignore +0 -0
  10. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/CHANGELOG.md +0 -0
  11. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/docs/commands.md +0 -0
  12. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/docs/keybindings.md +0 -0
  13. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/docs/permissions.md +0 -0
  14. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/docs/skills.md +0 -0
  15. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/docs/swarm.md +0 -0
  16. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/docs/tools.md +0 -0
  17. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/pet_demo.py +0 -0
  18. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/__init__.py +0 -0
  19. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/__init__.py +0 -0
  20. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/app.py +0 -0
  21. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/atpath.py +0 -0
  22. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/attachments.py +0 -0
  23. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/builtin_skills/meta/swarm/SKILL.md +0 -0
  24. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/cli.py +0 -0
  25. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/commands/__init__.py +0 -0
  26. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/commands/agents.py +0 -0
  27. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/commands/auth.py +0 -0
  28. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/commands/base.py +0 -0
  29. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/commands/models.py +0 -0
  30. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/commands/sessions.py +0 -0
  31. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/commands/settings.py +0 -0
  32. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/commands/system.py +0 -0
  33. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/export.py +0 -0
  34. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/history.py +0 -0
  35. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/hook.py +0 -0
  36. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/jobs.py +0 -0
  37. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/notifications.py +0 -0
  38. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/permissions.py +0 -0
  39. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/pet.py +0 -0
  40. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/prefs.py +0 -0
  41. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/prompts.py +0 -0
  42. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/swarm/__init__.py +0 -0
  43. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/swarm/board.py +0 -0
  44. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/swarm/engine.py +0 -0
  45. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/swarm/mentions.py +0 -0
  46. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/titles.py +0 -0
  47. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tools/__init__.py +0 -0
  48. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tools/_tool_utils.py +0 -0
  49. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tools/apply_patch.py +0 -0
  50. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tools/ask_user.py +0 -0
  51. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tools/bash.py +0 -0
  52. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tools/read.py +0 -0
  53. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tools/search.py +0 -0
  54. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tools/skill.py +0 -0
  55. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tools/swarm.py +0 -0
  56. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tools/todo.py +0 -0
  57. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tools/web.py +0 -0
  58. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/__init__.py +0 -0
  59. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/blocks/__init__.py +0 -0
  60. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/blocks/base.py +0 -0
  61. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/blocks/diff.py +0 -0
  62. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/blocks/recap.py +0 -0
  63. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/blocks/tools.py +0 -0
  64. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/blocks/usage.py +0 -0
  65. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/footer.py +0 -0
  66. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/panels.py +0 -0
  67. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/sidebar.py +0 -0
  68. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/splash.py +0 -0
  69. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/styles.py +0 -0
  70. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/swarm.py +0 -0
  71. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/usage_stats.py +0 -0
  72. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/viewport.py +0 -0
  73. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/src/ctx/code/tui/width_policy.py +0 -0
  74. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/__init__.py +0 -0
  75. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_agent_inbox.py +0 -0
  76. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_agent_instances.py +0 -0
  77. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_agent_instances_factory.py +0 -0
  78. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_agent_pre_step.py +0 -0
  79. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_apply_patch.py +0 -0
  80. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_ask_user.py +0 -0
  81. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_atpath.py +0 -0
  82. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_attachments.py +0 -0
  83. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_bash.py +0 -0
  84. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_bash_actions.py +0 -0
  85. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_blocks.py +0 -0
  86. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_builtin_skills.py +0 -0
  87. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_compaction.py +0 -0
  88. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_context_length.py +0 -0
  89. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_finalize_compact.py +0 -0
  90. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_footer.py +0 -0
  91. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_headless.py +0 -0
  92. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_history.py +0 -0
  93. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_jobs.py +0 -0
  94. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_model_picker.py +0 -0
  95. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_panel.py +0 -0
  96. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_permission_guards.py +0 -0
  97. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_permissions.py +0 -0
  98. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_pet.py +0 -0
  99. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_prefs.py +0 -0
  100. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_prompts.py +0 -0
  101. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_provider_hooks.py +0 -0
  102. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_read.py +0 -0
  103. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_recap_digest.py +0 -0
  104. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_render_compat.py +0 -0
  105. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_sdk_transports.py +0 -0
  106. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_search_block.py +0 -0
  107. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_search_tool.py +0 -0
  108. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_search_ui.py +0 -0
  109. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_settings.py +0 -0
  110. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_sidebar.py +0 -0
  111. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_skill.py +0 -0
  112. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_sse_stream.py +0 -0
  113. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_step_compact_events.py +0 -0
  114. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_stream_patch.py +0 -0
  115. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_stream_recovery.py +0 -0
  116. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_swarm.py +0 -0
  117. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_swarm_board.py +0 -0
  118. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_titles.py +0 -0
  119. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_todo_tool.py +0 -0
  120. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_tool_pipeline_events.py +0 -0
  121. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_tool_utils.py +0 -0
  122. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_viewport.py +0 -0
  123. {ctx_agent-2.0.0 → ctx_agent-2.0.2}/tests/test_web.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ctx-agent
3
- Version: 2.0.0
3
+ Version: 2.0.2
4
4
  Summary: Minimal coding agent built on the ctx harness with its own terminal UI.
5
5
  Author: OEvortex
6
6
  License-Expression: Apache-2.0
@@ -11,26 +11,26 @@ Requires-Dist: ctx-sdk>=2.0.0
11
11
  Requires-Dist: ctx-term>=2.0.0
12
12
  Description-Content-Type: text/markdown
13
13
 
14
- # vx
14
+ # ctx-agent
15
15
 
16
- A minimal coding agent built on the [ctx](https://github.com/OEvortex/ctx-coding-agent) harness (`ctx-sdk` + `ctx-agent`) with its own terminal UI. Same agent runtime as ctx — sessions, providers, tools, permissions — in a smaller, keyboard-first package.
16
+ The coding agent built on the [ctx](https://github.com/OEvortex/ctx-coding-agent) harness (`ctx-sdk`) and the `ctx-term` toolkit: keyboard-driven TUI, headless CLI, sessions, providers, tools, and permissions.
17
17
 
18
18
  Requires Python 3.12+.
19
19
 
20
20
  ## Install and run
21
21
 
22
22
  ```bash
23
- uv tool install vx # or: pipx install vx / pip install vx
23
+ uv tool install ctx-agent # or: pipx install ctx-agent / pip install ctx-agent
24
24
 
25
- vx # terminal UI
26
- vx -p "fix the failing test" # headless: one prompt, one answer, exit
25
+ ctx # terminal UI
26
+ ctx -p "fix the failing test" # headless: one prompt, one answer, exit
27
27
  ```
28
28
 
29
- Connect a model with `--provider`/`--model`, or export a provider key (`ANTHROPIC_API_KEY`, etc.) and start. Resume work with `ctx`-style session commands inside the TUI (`/session`, `/tree`, `/handoff`).
29
+ Connect a model with `--provider`/`--model`, or export a provider key (`ANTHROPIC_API_KEY`, etc.) and start. Resume work with the session commands inside the TUI (`/session`, `/tree`, `/handoff`).
30
30
 
31
31
  ## Headless mode
32
32
 
33
- `vx -p <prompt>` (or `vx -p` / `vx -p -` to read the prompt from stdin) runs one turn without the alternate screen: the answer goes to stdout, diagnostics to stderr, so it pipes cleanly. `--verbose` prints each tool call to stderr.
33
+ `ctx -p <prompt>` (or `ctx -p` / `ctx -p -` to read the prompt from stdin) runs one turn without the alternate screen: the answer goes to stdout, diagnostics to stderr, so it pipes cleanly. `--verbose` prints each tool call to stderr.
34
34
 
35
35
  Approvals cannot be answered headlessly — every tool approval is denied and agent questions get an empty response — so run with the permission mode you intend.
36
36
 
@@ -51,20 +51,17 @@ Exit codes:
51
51
  | `VX_THEME` | Pin the TUI palette by name at startup |
52
52
  | `VX_BOOT_TRACE` | Path to a file; each boot phase appends a timestamp for startup-latency measurement |
53
53
  | `VX_DEBUG_FRAME` | Path to a file; every rendered frame is appended as JSON for debugging the TUI |
54
- | `VX_AMBIGUOUS_WIDTH` | `wide`/`narrow`: how the terminal draws East-Asian-Ambiguous glyphs (`·`, `─`, `│`, `→`, `●`), which every rule and border vx prints is made of. Normally measured at startup by asking the terminal for its cursor position around one glyph, then remembered per terminal in `vx-prefs.json` (refreshed monthly), falling back to a CJK `LC_ALL`/`LC_CTYPE`/`LANG` signal. Set it to skip all of that |
55
- | `VX_UPDATE_USE_PIP` | Set to force `/update` down the `pip install --upgrade vx` path |
54
+ | `VX_AMBIGUOUS_WIDTH` | `wide`/`narrow`: how the terminal draws East-Asian-Ambiguous glyphs (`·`, `─`, `│`, `→`, `●`), which every rule and border ctx prints is made of. Normally measured at startup by asking the terminal for its cursor position around one glyph, then remembered per terminal in `vx-prefs.json` (refreshed monthly), falling back to a CJK `LC_ALL`/`LC_CTYPE`/`LANG` signal. Set it to skip all of that |
55
+ | `VX_UPDATE_USE_PIP` | Set to force `/update` down the `pip install --upgrade ctx-agent` path |
56
56
 
57
57
  `VTX_PET_SHEET` / `VTX_PETS_DIR` configure the animated-pet graphics prototype (`pet.py`, `pet_demo.py`); they are a development demo, not shipped UI surface.
58
58
 
59
59
  ## Demos
60
60
 
61
- Each of these is a standalone program that drives one part of `ctx.code.tui` against a real terminal:
61
+ `pet_demo.py` is a standalone program that drives the graphics backends against a real terminal:
62
62
 
63
63
  | Command | What it shows |
64
64
  |---|---|
65
- | `uv run python demo.py` | the swarm board (`ctx.code.tui.swarm`) with a simulated room: live tool calls, durations, a `needs you` approval |
66
- | `uv run python html_demo.py` | the HTML/CSS renderer, page by page |
67
- | `uv run python markdown_demo.py` | the markdown renderer over a long document |
68
65
  | `uv run python pet_demo.py` | sprite-sheet animation across the cell and pixel graphics backends |
69
66
 
70
67
  ## Documentation
@@ -1,23 +1,23 @@
1
- # vx
1
+ # ctx-agent
2
2
 
3
- A minimal coding agent built on the [ctx](https://github.com/OEvortex/ctx-coding-agent) harness (`ctx-sdk` + `ctx-agent`) with its own terminal UI. Same agent runtime as ctx — sessions, providers, tools, permissions — in a smaller, keyboard-first package.
3
+ The coding agent built on the [ctx](https://github.com/OEvortex/ctx-coding-agent) harness (`ctx-sdk`) and the `ctx-term` toolkit: keyboard-driven TUI, headless CLI, sessions, providers, tools, and permissions.
4
4
 
5
5
  Requires Python 3.12+.
6
6
 
7
7
  ## Install and run
8
8
 
9
9
  ```bash
10
- uv tool install vx # or: pipx install vx / pip install vx
10
+ uv tool install ctx-agent # or: pipx install ctx-agent / pip install ctx-agent
11
11
 
12
- vx # terminal UI
13
- vx -p "fix the failing test" # headless: one prompt, one answer, exit
12
+ ctx # terminal UI
13
+ ctx -p "fix the failing test" # headless: one prompt, one answer, exit
14
14
  ```
15
15
 
16
- Connect a model with `--provider`/`--model`, or export a provider key (`ANTHROPIC_API_KEY`, etc.) and start. Resume work with `ctx`-style session commands inside the TUI (`/session`, `/tree`, `/handoff`).
16
+ Connect a model with `--provider`/`--model`, or export a provider key (`ANTHROPIC_API_KEY`, etc.) and start. Resume work with the session commands inside the TUI (`/session`, `/tree`, `/handoff`).
17
17
 
18
18
  ## Headless mode
19
19
 
20
- `vx -p <prompt>` (or `vx -p` / `vx -p -` to read the prompt from stdin) runs one turn without the alternate screen: the answer goes to stdout, diagnostics to stderr, so it pipes cleanly. `--verbose` prints each tool call to stderr.
20
+ `ctx -p <prompt>` (or `ctx -p` / `ctx -p -` to read the prompt from stdin) runs one turn without the alternate screen: the answer goes to stdout, diagnostics to stderr, so it pipes cleanly. `--verbose` prints each tool call to stderr.
21
21
 
22
22
  Approvals cannot be answered headlessly — every tool approval is denied and agent questions get an empty response — so run with the permission mode you intend.
23
23
 
@@ -38,20 +38,17 @@ Exit codes:
38
38
  | `VX_THEME` | Pin the TUI palette by name at startup |
39
39
  | `VX_BOOT_TRACE` | Path to a file; each boot phase appends a timestamp for startup-latency measurement |
40
40
  | `VX_DEBUG_FRAME` | Path to a file; every rendered frame is appended as JSON for debugging the TUI |
41
- | `VX_AMBIGUOUS_WIDTH` | `wide`/`narrow`: how the terminal draws East-Asian-Ambiguous glyphs (`·`, `─`, `│`, `→`, `●`), which every rule and border vx prints is made of. Normally measured at startup by asking the terminal for its cursor position around one glyph, then remembered per terminal in `vx-prefs.json` (refreshed monthly), falling back to a CJK `LC_ALL`/`LC_CTYPE`/`LANG` signal. Set it to skip all of that |
42
- | `VX_UPDATE_USE_PIP` | Set to force `/update` down the `pip install --upgrade vx` path |
41
+ | `VX_AMBIGUOUS_WIDTH` | `wide`/`narrow`: how the terminal draws East-Asian-Ambiguous glyphs (`·`, `─`, `│`, `→`, `●`), which every rule and border ctx prints is made of. Normally measured at startup by asking the terminal for its cursor position around one glyph, then remembered per terminal in `vx-prefs.json` (refreshed monthly), falling back to a CJK `LC_ALL`/`LC_CTYPE`/`LANG` signal. Set it to skip all of that |
42
+ | `VX_UPDATE_USE_PIP` | Set to force `/update` down the `pip install --upgrade ctx-agent` path |
43
43
 
44
44
  `VTX_PET_SHEET` / `VTX_PETS_DIR` configure the animated-pet graphics prototype (`pet.py`, `pet_demo.py`); they are a development demo, not shipped UI surface.
45
45
 
46
46
  ## Demos
47
47
 
48
- Each of these is a standalone program that drives one part of `ctx.code.tui` against a real terminal:
48
+ `pet_demo.py` is a standalone program that drives the graphics backends against a real terminal:
49
49
 
50
50
  | Command | What it shows |
51
51
  |---|---|
52
- | `uv run python demo.py` | the swarm board (`ctx.code.tui.swarm`) with a simulated room: live tool calls, durations, a `needs you` approval |
53
- | `uv run python html_demo.py` | the HTML/CSS renderer, page by page |
54
- | `uv run python markdown_demo.py` | the markdown renderer over a long document |
55
52
  | `uv run python pet_demo.py` | sprite-sheet animation across the cell and pixel graphics backends |
56
53
 
57
54
  ## Documentation
@@ -7,7 +7,7 @@ packages = ["src/ctx"]
7
7
 
8
8
  [project]
9
9
  name = "ctx-agent"
10
- version = "2.0.0"
10
+ version = "2.0.2"
11
11
  description = "Minimal coding agent built on the ctx harness with its own terminal UI."
12
12
  license = "Apache-2.0"
13
13
  authors = [
@@ -9,4 +9,4 @@ PROGRAM_NAME = "ctx-agent"
9
9
  ITALIC_BRAND = "𝒗x"
10
10
 
11
11
  #: Version string (updated in pyproject.toml; keep in sync).
12
- VERSION = "2.0.0"
12
+ VERSION = "2.0.2"
@@ -18,6 +18,7 @@ from typing import TYPE_CHECKING, TextIO
18
18
  import ctx.code.tools
19
19
  from ctx.code import prompts as vx_prompts
20
20
  from ctx.core.config import config, get_config, get_last_selected
21
+ from ctx.core.paths import get_config_dir
21
22
  from ctx.protocol.types import StopReason
22
23
 
23
24
  if TYPE_CHECKING:
@@ -191,7 +192,7 @@ async def run_headless(
191
192
  hook_bridge = HookBridge(
192
193
  bus=bus,
193
194
  project_path=Path.cwd() / ".ctx" / "hooks.yml",
194
- global_path=Path.home() / ".ctx" / "hooks.yml",
195
+ global_path=get_config_dir() / "hooks.yml",
195
196
  )
196
197
  await hook_bridge.load()
197
198
 
@@ -1,10 +1,10 @@
1
- """``/update`` for vx itself.
1
+ """``/update`` for ctx-agent itself.
2
2
 
3
- Detects how this copy of vx was installed and upgrades that one -- a source
3
+ Detects how this copy was installed and upgrades that one -- a source
4
4
  checkout is fast-forwarded with git, a tool install goes through ``uv tool`` or
5
- ``pipx``, and anything else falls back to ``pip install --upgrade vx``. The
6
- package name and the escape hatch env var are vx's, so the command never
7
- upgrades another product by accident.
5
+ ``pipx``, and anything else falls back to ``pip install --upgrade ctx-agent``.
6
+ The package name is pinned here so the command never upgrades another
7
+ product by accident.
8
8
  """
9
9
 
10
10
  from __future__ import annotations
@@ -15,7 +15,7 @@ import sys
15
15
  from pathlib import Path
16
16
  from typing import Literal
17
17
 
18
- PACKAGE = "vx"
18
+ PACKAGE = "ctx-agent"
19
19
 
20
20
  #: Set to 1 to force the pip path (mirrors the ctx/ctx-code convention).
21
21
  FORCE_PIP_ENV = "VX_UPDATE_USE_PIP"
@@ -62,10 +62,10 @@ def _is_pipx_tool(package: str) -> bool:
62
62
 
63
63
 
64
64
  def _source_checkout() -> Path | None:
65
- """The git root of a vx running from a working tree, if it is one."""
65
+ """The git root of a ctx running from a working tree, if it is one."""
66
66
  # .../packages/code/src/ctx/code/update.py -> the checkout that owns it.
67
67
  for candidate in Path(__file__).resolve().parents:
68
- if (candidate / ".git").exists() and (candidate / "packages" / "vx").is_dir():
68
+ if (candidate / ".git").exists() and (candidate / "packages" / "code").is_dir():
69
69
  return candidate
70
70
  return None
71
71
 
@@ -92,7 +92,7 @@ def self_update(package: str = PACKAGE) -> tuple[bool, str]:
92
92
  if cmd is None:
93
93
  root = _source_checkout()
94
94
  if root is None:
95
- return False, "vx is running from source, but no git checkout was found."
95
+ return False, "Running from source, but no git checkout was found."
96
96
  try:
97
97
  pull = _run(["git", "-C", str(root), "pull", "--ff-only"])
98
98
  except FileNotFoundError:
@@ -104,7 +104,7 @@ def self_update(package: str = PACKAGE) -> tuple[bool, str]:
104
104
  return False, f"git pull failed (exit {pull.returncode}): {detail}"
105
105
  if "already up to date" in (pull.stdout or "").lower():
106
106
  return True, f"Already up to date ({installer})."
107
- return True, f"Updated via {installer}. Restart vx to load the new code."
107
+ return True, f"Updated via {installer}. Restart ctx to load the new code."
108
108
 
109
109
  try:
110
110
  result = _run(cmd)
@@ -11,7 +11,7 @@ class TestBrand:
11
11
 
12
12
  def test_version_matches_pyproject(self):
13
13
  # Keep in sync with packages/code/pyproject.toml.
14
- assert brand.VERSION == "2.0.0"
14
+ assert brand.VERSION == "2.0.2"
15
15
 
16
16
  def test_italic_brand(self):
17
17
  assert brand.ITALIC_BRAND == "𝒗x"
@@ -20,7 +20,7 @@ class TestInstallChoice:
20
20
  installer, cmd = update.install_choice()
21
21
  assert installer == "pip"
22
22
  assert cmd is not None
23
- assert "pip" in cmd and "--upgrade" in cmd and "vx" in cmd
23
+ assert "pip" in cmd and "--upgrade" in cmd and "ctx-agent" in cmd
24
24
 
25
25
  def test_uv_tool_detected(self, monkeypatch, no_tools):
26
26
  monkeypatch.setattr(update, "_find_executable", lambda name: name == "uv")
@@ -38,7 +38,7 @@ class TestInstallChoice:
38
38
 
39
39
  def test_source_checkout_wins(self, monkeypatch, no_tools, tmp_path):
40
40
  root = tmp_path / "checkout"
41
- (root / "packages" / "vx").mkdir(parents=True)
41
+ (root / "packages" / "code").mkdir(parents=True)
42
42
  (root / ".git").mkdir()
43
43
  monkeypatch.setattr(update, "_source_checkout", lambda: root)
44
44
  installer, cmd = update.install_choice()
@@ -47,6 +47,7 @@ class TestInstallChoice:
47
47
 
48
48
  def test_uv_fallback(self, monkeypatch, no_tools):
49
49
  monkeypatch.setattr(update, "_find_executable", lambda name: name == "uv")
50
+ monkeypatch.setattr(update, "_is_uv_tool", lambda pkg: False)
50
51
  installer, cmd = update.install_choice()
51
52
  assert installer == "uv"
52
53
  assert cmd is not None and cmd[:3] == ["uv", "pip", "install"]
@@ -60,7 +61,9 @@ class TestInstallChoice:
60
61
  class TestSelfUpdate:
61
62
  def test_success_message(self, monkeypatch):
62
63
  monkeypatch.setattr(
63
- update, "install_choice", lambda pkg="vx": ("uv tool", ["uv", "tool", "upgrade", "vx"])
64
+ update,
65
+ "install_choice",
66
+ lambda pkg="ctx-agent": ("uv tool", ["uv", "tool", "upgrade", "ctx-agent"]),
64
67
  )
65
68
  monkeypatch.setattr(
66
69
  update,
@@ -72,7 +75,9 @@ class TestSelfUpdate:
72
75
  assert "uv tool" in msg
73
76
 
74
77
  def test_already_up_to_date(self, monkeypatch):
75
- monkeypatch.setattr(update, "install_choice", lambda pkg="vx": ("pip", ["pip", "install"]))
78
+ monkeypatch.setattr(
79
+ update, "install_choice", lambda pkg="ctx-agent": ("pip", ["pip", "install"])
80
+ )
76
81
  monkeypatch.setattr(
77
82
  update,
78
83
  "_run",
@@ -84,7 +89,9 @@ class TestSelfUpdate:
84
89
  assert ok and "up to date" in msg
85
90
 
86
91
  def test_failure_message(self, monkeypatch):
87
- monkeypatch.setattr(update, "install_choice", lambda pkg="vx": ("pip", ["pip", "install"]))
92
+ monkeypatch.setattr(
93
+ update, "install_choice", lambda pkg="ctx-agent": ("pip", ["pip", "install"])
94
+ )
88
95
  monkeypatch.setattr(
89
96
  update,
90
97
  "_run",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes