ctx-agent 0.1.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.
- {ctx_agent-0.1.0 → ctx_agent-2.0.2}/.gitignore +3 -1
- ctx_agent-2.0.2/CHANGELOG.md +97 -0
- ctx_agent-2.0.2/PKG-INFO +75 -0
- ctx_agent-2.0.2/README.md +62 -0
- ctx_agent-2.0.2/docs/commands.md +152 -0
- ctx_agent-2.0.2/docs/keybindings.md +59 -0
- ctx_agent-2.0.2/docs/permissions.md +30 -0
- ctx_agent-2.0.2/docs/skills.md +66 -0
- ctx_agent-2.0.2/docs/swarm.md +53 -0
- ctx_agent-2.0.2/docs/tools.md +22 -0
- ctx_agent-2.0.2/pet_demo.py +427 -0
- {ctx_agent-0.1.0 → ctx_agent-2.0.2}/pyproject.toml +12 -15
- ctx_agent-2.0.2/src/ctx/__init__.py +5 -0
- ctx_agent-2.0.2/src/ctx/code/__init__.py +12 -0
- ctx_agent-2.0.2/src/ctx/code/app.py +3846 -0
- ctx_agent-2.0.2/src/ctx/code/atpath.py +119 -0
- ctx_agent-2.0.2/src/ctx/code/attachments.py +167 -0
- ctx_agent-2.0.2/src/ctx/code/brand.py +12 -0
- ctx_agent-2.0.2/src/ctx/code/builtin_skills/meta/swarm/SKILL.md +238 -0
- ctx_agent-2.0.2/src/ctx/code/cli.py +289 -0
- ctx_agent-2.0.2/src/ctx/code/commands/__init__.py +305 -0
- ctx_agent-2.0.2/src/ctx/code/commands/agents.py +140 -0
- ctx_agent-2.0.2/src/ctx/code/commands/auth.py +373 -0
- ctx_agent-2.0.2/src/ctx/code/commands/base.py +195 -0
- ctx_agent-2.0.2/src/ctx/code/commands/models.py +683 -0
- ctx_agent-2.0.2/src/ctx/code/commands/sessions.py +561 -0
- ctx_agent-2.0.2/src/ctx/code/commands/settings.py +501 -0
- ctx_agent-2.0.2/src/ctx/code/commands/system.py +316 -0
- {ctx_agent-0.1.0/src/ctx/term → ctx_agent-2.0.2/src/ctx/code}/export.py +28 -51
- ctx_agent-2.0.2/src/ctx/code/headless.py +231 -0
- ctx_agent-2.0.2/src/ctx/code/history.py +55 -0
- ctx_agent-2.0.2/src/ctx/code/hook.py +50 -0
- ctx_agent-2.0.2/src/ctx/code/jobs.py +396 -0
- ctx_agent-2.0.2/src/ctx/code/notifications.py +126 -0
- ctx_agent-2.0.2/src/ctx/code/permissions.py +199 -0
- ctx_agent-2.0.2/src/ctx/code/pet.py +596 -0
- ctx_agent-2.0.2/src/ctx/code/prefs.py +186 -0
- ctx_agent-2.0.2/src/ctx/code/prompts.py +127 -0
- ctx_agent-2.0.2/src/ctx/code/swarm/__init__.py +42 -0
- ctx_agent-2.0.2/src/ctx/code/swarm/board.py +411 -0
- ctx_agent-2.0.2/src/ctx/code/swarm/engine.py +1415 -0
- ctx_agent-2.0.2/src/ctx/code/swarm/mentions.py +72 -0
- ctx_agent-2.0.2/src/ctx/code/titles.py +115 -0
- ctx_agent-2.0.2/src/ctx/code/tools/__init__.py +134 -0
- {ctx_agent-0.1.0 → ctx_agent-2.0.2}/src/ctx/code/tools/_tool_utils.py +2 -0
- ctx_agent-2.0.2/src/ctx/code/tools/apply_patch.py +359 -0
- ctx_agent-2.0.2/src/ctx/code/tools/ask_user.py +236 -0
- ctx_agent-2.0.2/src/ctx/code/tools/bash.py +730 -0
- {ctx_agent-0.1.0 → ctx_agent-2.0.2}/src/ctx/code/tools/read.py +37 -48
- ctx_agent-2.0.2/src/ctx/code/tools/search.py +1025 -0
- ctx_agent-2.0.2/src/ctx/code/tools/skill.py +103 -0
- ctx_agent-2.0.2/src/ctx/code/tools/swarm.py +347 -0
- ctx_agent-2.0.2/src/ctx/code/tools/todo.py +157 -0
- ctx_agent-2.0.2/src/ctx/code/tools/web.py +183 -0
- ctx_agent-2.0.2/src/ctx/code/tui/__init__.py +45 -0
- ctx_agent-2.0.2/src/ctx/code/tui/blocks/__init__.py +79 -0
- ctx_agent-2.0.2/src/ctx/code/tui/blocks/base.py +713 -0
- ctx_agent-2.0.2/src/ctx/code/tui/blocks/diff.py +223 -0
- ctx_agent-2.0.2/src/ctx/code/tui/blocks/recap.py +108 -0
- ctx_agent-2.0.2/src/ctx/code/tui/blocks/tools.py +767 -0
- ctx_agent-2.0.2/src/ctx/code/tui/blocks/usage.py +252 -0
- ctx_agent-2.0.2/src/ctx/code/tui/footer.py +572 -0
- ctx_agent-2.0.2/src/ctx/code/tui/panels.py +136 -0
- ctx_agent-2.0.2/src/ctx/code/tui/sidebar.py +248 -0
- ctx_agent-2.0.2/src/ctx/code/tui/splash.py +55 -0
- ctx_agent-2.0.2/src/ctx/code/tui/styles.py +489 -0
- ctx_agent-2.0.2/src/ctx/code/tui/swarm.py +1420 -0
- ctx_agent-2.0.2/src/ctx/code/tui/usage_stats.py +108 -0
- ctx_agent-2.0.2/src/ctx/code/tui/viewport.py +23 -0
- ctx_agent-2.0.2/src/ctx/code/tui/width_policy.py +42 -0
- ctx_agent-2.0.2/src/ctx/code/update.py +127 -0
- ctx_agent-2.0.2/tests/__init__.py +1 -0
- ctx_agent-2.0.2/tests/test_agent_inbox.py +112 -0
- ctx_agent-2.0.2/tests/test_agent_instances.py +77 -0
- ctx_agent-2.0.2/tests/test_agent_instances_factory.py +124 -0
- ctx_agent-2.0.2/tests/test_agent_pre_step.py +129 -0
- ctx_agent-2.0.2/tests/test_apply_patch.py +219 -0
- ctx_agent-2.0.2/tests/test_ask_user.py +481 -0
- ctx_agent-2.0.2/tests/test_atpath.py +109 -0
- ctx_agent-2.0.2/tests/test_attachments.py +89 -0
- ctx_agent-2.0.2/tests/test_bash.py +146 -0
- ctx_agent-2.0.2/tests/test_bash_actions.py +178 -0
- ctx_agent-2.0.2/tests/test_blocks.py +220 -0
- ctx_agent-2.0.2/tests/test_builtin_skills.py +140 -0
- ctx_agent-2.0.2/tests/test_compaction.py +125 -0
- ctx_agent-2.0.2/tests/test_context_length.py +64 -0
- ctx_agent-2.0.2/tests/test_finalize_compact.py +161 -0
- ctx_agent-2.0.2/tests/test_footer.py +387 -0
- ctx_agent-2.0.2/tests/test_headless.py +99 -0
- ctx_agent-2.0.2/tests/test_history.py +93 -0
- ctx_agent-2.0.2/tests/test_jobs.py +151 -0
- ctx_agent-2.0.2/tests/test_misc.py +42 -0
- ctx_agent-2.0.2/tests/test_model_picker.py +373 -0
- ctx_agent-2.0.2/tests/test_panel.py +277 -0
- ctx_agent-2.0.2/tests/test_permission_guards.py +98 -0
- ctx_agent-2.0.2/tests/test_permissions.py +96 -0
- ctx_agent-2.0.2/tests/test_pet.py +256 -0
- ctx_agent-2.0.2/tests/test_prefs.py +125 -0
- ctx_agent-2.0.2/tests/test_prompts.py +27 -0
- ctx_agent-2.0.2/tests/test_provider_hooks.py +277 -0
- ctx_agent-2.0.2/tests/test_read.py +89 -0
- ctx_agent-2.0.2/tests/test_recap_digest.py +120 -0
- ctx_agent-2.0.2/tests/test_render_compat.py +402 -0
- ctx_agent-2.0.2/tests/test_sdk_transports.py +356 -0
- ctx_agent-2.0.2/tests/test_search_block.py +249 -0
- ctx_agent-2.0.2/tests/test_search_tool.py +399 -0
- ctx_agent-2.0.2/tests/test_search_ui.py +136 -0
- ctx_agent-2.0.2/tests/test_settings.py +47 -0
- ctx_agent-2.0.2/tests/test_sidebar.py +461 -0
- ctx_agent-2.0.2/tests/test_skill.py +70 -0
- ctx_agent-2.0.2/tests/test_sse_stream.py +106 -0
- ctx_agent-2.0.2/tests/test_step_compact_events.py +86 -0
- ctx_agent-2.0.2/tests/test_stream_patch.py +229 -0
- ctx_agent-2.0.2/tests/test_stream_recovery.py +79 -0
- ctx_agent-2.0.2/tests/test_swarm.py +854 -0
- ctx_agent-2.0.2/tests/test_swarm_board.py +710 -0
- ctx_agent-2.0.2/tests/test_titles.py +136 -0
- ctx_agent-2.0.2/tests/test_todo_tool.py +81 -0
- ctx_agent-2.0.2/tests/test_tool_pipeline_events.py +236 -0
- ctx_agent-2.0.2/tests/test_tool_utils.py +63 -0
- ctx_agent-2.0.2/tests/test_update.py +116 -0
- ctx_agent-2.0.2/tests/test_viewport.py +337 -0
- ctx_agent-2.0.2/tests/test_web.py +66 -0
- ctx_agent-0.1.0/PKG-INFO +0 -77
- ctx_agent-0.1.0/README.md +0 -64
- ctx_agent-0.1.0/src/ctx/code/README.md +0 -148
- ctx_agent-0.1.0/src/ctx/code/__init__.py +0 -105
- ctx_agent-0.1.0/src/ctx/code/acp.py +0 -1364
- ctx_agent-0.1.0/src/ctx/code/builtin_rows.py +0 -60
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/google-colab/SKILL.md +0 -104
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/modal/SKILL.md +0 -217
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/modal/references/api_reference.md +0 -34
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/modal/references/examples.md +0 -426
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/modal/references/functions.md +0 -278
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/modal/references/getting-started.md +0 -94
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/modal/references/gpu.md +0 -163
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/modal/references/images.md +0 -250
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/modal/references/resources.md +0 -129
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/modal/references/scaling.md +0 -230
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/modal/references/scheduled-jobs.md +0 -299
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/modal/references/secrets.md +0 -193
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/modal/references/volumes.md +0 -300
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/cloud/modal/references/web-endpoints.md +0 -340
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/code-review/review/SKILL.md +0 -73
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/general/github/SKILL.md +0 -139
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/SKILL.md +0 -178
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/README.md +0 -57
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/agents.md +0 -574
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/cli.md +0 -374
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/codemode.md +0 -251
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/configuration.md +0 -415
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/development.md +0 -300
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/extensions.md +0 -179
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/headless.md +0 -173
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/how-ctx-works.md +0 -179
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/keybindings.md +0 -156
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/mcp.md +0 -319
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/permissions.md +0 -484
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/plugins.md +0 -381
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/providers.md +0 -368
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/quickstart.md +0 -126
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/sdk.md +0 -522
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/sessions.md +0 -508
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/skills.md +0 -179
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/slash-commands.md +0 -185
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/storage-layout.md +0 -157
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/theming.md +0 -188
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/docs/tools.md +0 -455
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/extensions.md +0 -53
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/plugin-rows.md +0 -232
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/ctx-self-extend/references/skill-authoring.md +0 -68
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/meta/skill-builder/SKILL.md +0 -133
- ctx_agent-0.1.0/src/ctx/code/builtin_skills/setup/init/SKILL.md +0 -74
- ctx_agent-0.1.0/src/ctx/code/cli.py +0 -420
- ctx_agent-0.1.0/src/ctx/code/headless.py +0 -323
- ctx_agent-0.1.0/src/ctx/code/plugin_cmd.py +0 -247
- ctx_agent-0.1.0/src/ctx/code/prompts/__init__.py +0 -65
- ctx_agent-0.1.0/src/ctx/code/prompts/identity.py +0 -137
- ctx_agent-0.1.0/src/ctx/code/prompts/ponytail.py +0 -191
- ctx_agent-0.1.0/src/ctx/code/prompts/todo.py +0 -45
- ctx_agent-0.1.0/src/ctx/code/prompts_extras.py +0 -29
- ctx_agent-0.1.0/src/ctx/code/py.typed +0 -0
- ctx_agent-0.1.0/src/ctx/code/self_update.py +0 -80
- ctx_agent-0.1.0/src/ctx/code/tools/__init__.py +0 -159
- ctx_agent-0.1.0/src/ctx/code/tools/apply_patch.py +0 -472
- ctx_agent-0.1.0/src/ctx/code/tools/ask_user.py +0 -261
- ctx_agent-0.1.0/src/ctx/code/tools/bash.py +0 -517
- ctx_agent-0.1.0/src/ctx/code/tools/codemode.py +0 -683
- ctx_agent-0.1.0/src/ctx/code/tools/find.py +0 -150
- ctx_agent-0.1.0/src/ctx/code/tools/flair.py +0 -347
- ctx_agent-0.1.0/src/ctx/code/tools/grep.py +0 -241
- ctx_agent-0.1.0/src/ctx/code/tools/skill.py +0 -342
- ctx_agent-0.1.0/src/ctx/code/tools/subagent.py +0 -283
- ctx_agent-0.1.0/src/ctx/code/tools/todo.py +0 -363
- ctx_agent-0.1.0/src/ctx/code/tools/tool_search.py +0 -280
- ctx_agent-0.1.0/src/ctx/code/tools/web.py +0 -226
- ctx_agent-0.1.0/src/ctx/code/update_check.py +0 -49
- ctx_agent-0.1.0/src/ctx/codemode/README.md +0 -210
- ctx_agent-0.1.0/src/ctx/codemode/__init__.py +0 -131
- ctx_agent-0.1.0/src/ctx/codemode/declarations.py +0 -496
- ctx_agent-0.1.0/src/ctx/codemode/errors.py +0 -241
- ctx_agent-0.1.0/src/ctx/codemode/governance.py +0 -210
- ctx_agent-0.1.0/src/ctx/codemode/host.py +0 -1088
- ctx_agent-0.1.0/src/ctx/codemode/integration.py +0 -227
- ctx_agent-0.1.0/src/ctx/codemode/jsonio.py +0 -73
- ctx_agent-0.1.0/src/ctx/codemode/plugin.py +0 -14
- ctx_agent-0.1.0/src/ctx/codemode/sandbox.py +0 -1165
- ctx_agent-0.1.0/src/ctx/codemode/source.py +0 -171
- ctx_agent-0.1.0/src/ctx/codemode/types.py +0 -230
- ctx_agent-0.1.0/src/ctx/mcp/README.md +0 -244
- ctx_agent-0.1.0/src/ctx/mcp/__init__.py +0 -163
- ctx_agent-0.1.0/src/ctx/mcp/auth.py +0 -37
- ctx_agent-0.1.0/src/ctx/mcp/client.py +0 -742
- ctx_agent-0.1.0/src/ctx/mcp/config.py +0 -413
- ctx_agent-0.1.0/src/ctx/mcp/content.py +0 -86
- ctx_agent-0.1.0/src/ctx/mcp/exposure.py +0 -172
- ctx_agent-0.1.0/src/ctx/mcp/jsonrpc.py +0 -131
- ctx_agent-0.1.0/src/ctx/mcp/manager.py +0 -673
- ctx_agent-0.1.0/src/ctx/mcp/oauth/__init__.py +0 -128
- ctx_agent-0.1.0/src/ctx/mcp/oauth/callback.py +0 -237
- ctx_agent-0.1.0/src/ctx/mcp/oauth/discovery.py +0 -296
- ctx_agent-0.1.0/src/ctx/mcp/oauth/errors.py +0 -71
- ctx_agent-0.1.0/src/ctx/mcp/oauth/flow.py +0 -539
- ctx_agent-0.1.0/src/ctx/mcp/oauth/provider.py +0 -341
- ctx_agent-0.1.0/src/ctx/mcp/oauth/types.py +0 -329
- ctx_agent-0.1.0/src/ctx/mcp/plugin.py +0 -22
- ctx_agent-0.1.0/src/ctx/mcp/resources.py +0 -472
- ctx_agent-0.1.0/src/ctx/mcp/tasks.py +0 -56
- ctx_agent-0.1.0/src/ctx/mcp/tool.py +0 -494
- ctx_agent-0.1.0/src/ctx/mcp/transport.py +0 -125
- ctx_agent-0.1.0/src/ctx/mcp/transports/__init__.py +0 -27
- ctx_agent-0.1.0/src/ctx/mcp/transports/in_memory.py +0 -73
- ctx_agent-0.1.0/src/ctx/mcp/transports/stdio.py +0 -343
- ctx_agent-0.1.0/src/ctx/mcp/transports/streamable_http.py +0 -665
- ctx_agent-0.1.0/src/ctx/mcp/types.py +0 -228
- ctx_agent-0.1.0/src/ctx/term/agent_runner.py +0 -734
- ctx_agent-0.1.0/src/ctx/term/agents_panel.py +0 -530
- ctx_agent-0.1.0/src/ctx/term/app.py +0 -1219
- ctx_agent-0.1.0/src/ctx/term/ask_user.py +0 -356
- ctx_agent-0.1.0/src/ctx/term/codemode_block.py +0 -963
- ctx_agent-0.1.0/src/ctx/term/commands/__init__.py +0 -204
- ctx_agent-0.1.0/src/ctx/term/commands/agents.py +0 -161
- ctx_agent-0.1.0/src/ctx/term/commands/auth.py +0 -609
- ctx_agent-0.1.0/src/ctx/term/commands/base.py +0 -147
- ctx_agent-0.1.0/src/ctx/term/commands/catalog.py +0 -101
- ctx_agent-0.1.0/src/ctx/term/commands/mcp.py +0 -215
- ctx_agent-0.1.0/src/ctx/term/commands/models.py +0 -399
- ctx_agent-0.1.0/src/ctx/term/commands/providers.py +0 -71
- ctx_agent-0.1.0/src/ctx/term/commands/reload.py +0 -435
- ctx_agent-0.1.0/src/ctx/term/commands/sessions.py +0 -555
- ctx_agent-0.1.0/src/ctx/term/commands/settings.py +0 -395
- ctx_agent-0.1.0/src/ctx/term/commands/switch.py +0 -20
- ctx_agent-0.1.0/src/ctx/term/commands/update.py +0 -29
- ctx_agent-0.1.0/src/ctx/term/completion_ui.py +0 -363
- ctx_agent-0.1.0/src/ctx/term/launch.py +0 -123
- ctx_agent-0.1.0/src/ctx/term/plugin_ui.py +0 -124
- ctx_agent-0.1.0/src/ctx/term/queue_ui.py +0 -142
- ctx_agent-0.1.0/src/ctx/term/recap.py +0 -218
- ctx_agent-0.1.0/src/ctx/term/session_ui.py +0 -248
- ctx_agent-0.1.0/src/ctx/term/startup.py +0 -200
- ctx_agent-0.1.0/src/ctx/term/subagents.py +0 -285
- ctx_agent-0.1.0/src/ctx/term/task_ui.py +0 -257
- ctx_agent-0.1.0/src/ctx/term/todo_block.py +0 -189
- ctx_agent-0.1.0/src/ctx/term/todo_panel.py +0 -133
- ctx_agent-0.1.0/src/ctx/term/todo_ui.py +0 -408
- ctx_agent-0.1.0/src/ctx/term/tool_blocks/__init__.py +0 -37
- ctx_agent-0.1.0/src/ctx/term/tool_blocks/ask_user.py +0 -420
- ctx_agent-0.1.0/src/ctx/term/tool_blocks/base.py +0 -39
- ctx_agent-0.1.0/src/ctx/term/tool_blocks/bash.py +0 -32
- ctx_agent-0.1.0/src/ctx/term/tool_blocks/patch.py +0 -149
- ctx_agent-0.1.0/src/ctx/term/tool_blocks/read.py +0 -114
- ctx_agent-0.1.0/src/ctx/term/tool_blocks/subagent.py +0 -279
- ctx_agent-0.1.0/src/ctx/term/tool_output.py +0 -34
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to vx are documented in this file. The format is based on
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
|
|
5
|
+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **Bash runs a fresh process again** — the kept-open pty shell, `ctx.code.terminals`,
|
|
12
|
+
the `t1` task ids and the `terminal` action are gone: every call is its own
|
|
13
|
+
process tree, killed with the call, with `wait_ms` promoting it to a job
|
|
14
|
+
(agy's `WaitMsBeforeAsync`) and `background=true` for anything that must
|
|
15
|
+
outlive one. Stdout and stderr are separate streams again, so a failure can be
|
|
16
|
+
labelled; `cd` and exports do not survive between calls, which is what a
|
|
17
|
+
command line is for.
|
|
18
|
+
- **Fewer bash fields** — `daemon` (the same thing as `background`), `sandbox_network`,
|
|
19
|
+
`timeout_notify` (a watcher nobody asked for) and `terminal` are gone.
|
|
20
|
+
- **No sandbox** — `ctx.code.sandbox`, the bwrap wrapper, `sandbox=true` and the
|
|
21
|
+
`VX_BASH_SANDBOX` default are removed. `jobs` lost its `sandbox`/`network`
|
|
22
|
+
plumbing with it.
|
|
23
|
+
- **One board tool** — `post_message`, `read_board` and `swarm_wait` are now one
|
|
24
|
+
`board{action:"post"|"read"|"wait"}` tool. They were three schemas for one
|
|
25
|
+
object, and the board is one conversation: posting, reading and parking are
|
|
26
|
+
the same thing with a different verb. `wait` still parks the turn and still
|
|
27
|
+
says so in the transcript, and it refuses to run without `since` rather than
|
|
28
|
+
returning history as if it were news. The swarm went from five tools to three
|
|
29
|
+
(`delegate_subagent`, `swarm`, `board`).
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- **Sub-agents** — the `delegate_subagent` tool runs one isolated agent (own
|
|
34
|
+
session and tools) for a self-contained side task and returns its final text,
|
|
35
|
+
in the foreground or as a background task. Dispatch machinery stays in the
|
|
36
|
+
ctx harness (`ctx.agent.subagent`).
|
|
37
|
+
- **Swarms** — `swarm` and `board` tools plus
|
|
38
|
+
`ctx.code.swarm`: several real agents working in parallel, each its own conversation,
|
|
39
|
+
coordinating through one append-only board (`board.jsonl`, `members.json`,
|
|
40
|
+
`channels.json` in `~/…/swarms/<id>/`). Members park in `board{action:"wait"}`
|
|
41
|
+
(free, no
|
|
42
|
+
polling) and wake on `@name` / `@#channel` / `@all` posts; `status` reports
|
|
43
|
+
waiting/working/stopped/killed, and `kill` is final. Workers get the coding
|
|
44
|
+
tools minus the conversation-only ones, auto-approve their own tool prompts,
|
|
45
|
+
and are capped at 8 live members.
|
|
46
|
+
- **Swarm channels** — `swarm{action:"channel"}` creates work areas
|
|
47
|
+
(create/list/subscribe/unsubscribe/archive). Everyone is in `#main`; a worker
|
|
48
|
+
follows `#main` plus its areas and only sees those, so unrelated work stops
|
|
49
|
+
waking it. `board{action:"post", channel}`, `board{action:"read", channel:"*"}` and `@#area`
|
|
50
|
+
calls complete the split.
|
|
51
|
+
- **Worker workspaces and forks** — `add{workspace:"share"|"branch"}` gives a
|
|
52
|
+
worker its own `git worktree` (share) or clone (branch), deleted by `kill`;
|
|
53
|
+
`add{fork:"<member>"|"coordinator"}` seeds it with an existing conversation's
|
|
54
|
+
words. `add{role:"verifier"}` marks report-only members, and workers can add,
|
|
55
|
+
kill and re-model their own helpers.
|
|
56
|
+
- **Swarm models** — `swarm{action:"models"}` lists what `add` accepts;
|
|
57
|
+
`swarm{action:"model"}` switches a member's model, applied at its next turn so
|
|
58
|
+
it keeps its conversation.
|
|
59
|
+
- **The swarm board** — `left` on an empty composer (or `alt+s`, or `/board`)
|
|
60
|
+
opens a page that draws the room: a header counting working/waiting/idle/killed
|
|
61
|
+
and naming the board head, a channel strip, a roster where every member is a
|
|
62
|
+
card with its model, channel, workspace and what it is doing right now, and the
|
|
63
|
+
board feed underneath, bottom-anchored and filtered by channel. `⏎` on a member
|
|
64
|
+
turns the right column into that member's own panel — its activity and its
|
|
65
|
+
posts — so "what is this one doing" never means scrolling. `ctx.code.tui.swarm` holds
|
|
66
|
+
the page; it reads a `SwarmView` snapshot, so it draws and is tested without a
|
|
67
|
+
model. An empty conversation says how to start a swarm instead of showing a
|
|
68
|
+
fake one.
|
|
69
|
+
- **Worker permissions** — with the board open, a worker's tool call is put to you
|
|
70
|
+
on the page (`◆ needs you` at the top of the roster, the exact command, and
|
|
71
|
+
`approve once / allow for this swarm / deny`), and the worker waits for the
|
|
72
|
+
answer instead of approving itself. Closing the board denies whatever it was
|
|
73
|
+
showing and hands the workers back to their own judgement; `swarm.approval_hook`
|
|
74
|
+
is the seam, and a hook that fails or answers nothing never strands a worker.
|
|
75
|
+
- **Built-in skills, shipped in the package** — `vx/builtin_skills/` is
|
|
76
|
+
registered into the harness by `register_skills_package("ctx.code")` at import, the
|
|
77
|
+
same mechanism `ctx.code` uses: ctx copies the tree into `~/.ctx/skills` for
|
|
78
|
+
reading and merges it into the prompt catalog and the `/` commands, so a skill
|
|
79
|
+
arrives with the install and a project or user skill of the same name shadows
|
|
80
|
+
it. There is no `pip`-less side door and nothing to put in a repo.
|
|
81
|
+
- **`/swarm` skill** — `builtin_skills/meta/swarm/SKILL.md` documents the
|
|
82
|
+
coordinator loop (size the swarm, brief each worker, hand out work with
|
|
83
|
+
`@name`, verify, answer `needs you`), takes the task as `$ARGUMENTS`, and
|
|
84
|
+
registers as the `/swarm` command with the blurb "run several agents at once".
|
|
85
|
+
|
|
86
|
+
## [0.1.0] - 2026-11-24
|
|
87
|
+
|
|
88
|
+
### Added
|
|
89
|
+
|
|
90
|
+
- **Initial release** — vx is a minimal branded coding agent built on the [ctx-sdk](https://pypi.org/project/ctx-sdk/) harness and [ctx-agent](https://pypi.org/project/ctx-agent/) product. It provides the `vx` console script with the same flags and behavior as `ctx`, but with its own branding and terminal UI.
|
|
91
|
+
- **`vx` CLI** — drop-in replacement for `ctx` with identical flags: `--model`, `--provider`, `--prompt`, `--api-key`, `--base-url`, `--continue`, `--resume`, `--extension`, `--agent`, `--profile`, etc.
|
|
92
|
+
- **Branding** — italic wordmark `𝒗x` and standalone program name, version, and welcome screen.
|
|
93
|
+
- **Dependencies** — depends on `ctx-sdk>=0.1.0` and `ctx-agent>=0.1.0` for the full agent harness and coding agent functionality.
|
|
94
|
+
|
|
95
|
+
### Changed
|
|
96
|
+
|
|
97
|
+
- **Monorepo split** — vx was extracted from the monolithic `vtx-coding-agent` package as a lightweight branded entry point. The heavy lifting is delegated to ctx-sdk and ctx-agent.
|
ctx_agent-2.0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: ctx-agent
|
|
3
|
+
Version: 2.0.2
|
|
4
|
+
Summary: Minimal coding agent built on the ctx harness with its own terminal UI.
|
|
5
|
+
Author: OEvortex
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Keywords: cli,coding-agent,llm,tui
|
|
8
|
+
Requires-Python: >=3.12
|
|
9
|
+
Requires-Dist: aiofiles>=25.1.0
|
|
10
|
+
Requires-Dist: ctx-sdk>=2.0.0
|
|
11
|
+
Requires-Dist: ctx-term>=2.0.0
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# ctx-agent
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
Requires Python 3.12+.
|
|
19
|
+
|
|
20
|
+
## Install and run
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
uv tool install ctx-agent # or: pipx install ctx-agent / pip install ctx-agent
|
|
24
|
+
|
|
25
|
+
ctx # terminal UI
|
|
26
|
+
ctx -p "fix the failing test" # headless: one prompt, one answer, exit
|
|
27
|
+
```
|
|
28
|
+
|
|
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
|
+
|
|
31
|
+
## Headless mode
|
|
32
|
+
|
|
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
|
+
|
|
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
|
+
|
|
37
|
+
Exit codes:
|
|
38
|
+
|
|
39
|
+
| Code | Meaning |
|
|
40
|
+
|---|---|
|
|
41
|
+
| 0 | Finished (`StopReason.STOP`) |
|
|
42
|
+
| 1 | Error, interrupted, or any other stop reason |
|
|
43
|
+
| 2 | Empty prompt, provider error, or agent init failure |
|
|
44
|
+
| 3 | Output hit the length limit (`StopReason.LENGTH`) |
|
|
45
|
+
|
|
46
|
+
## Environment variables
|
|
47
|
+
|
|
48
|
+
| Variable | Effect |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `VX_AGENT` | Active agent profile for headless runs (falls back to last selection / config default) |
|
|
51
|
+
| `VX_THEME` | Pin the TUI palette by name at startup |
|
|
52
|
+
| `VX_BOOT_TRACE` | Path to a file; each boot phase appends a timestamp for startup-latency measurement |
|
|
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 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
|
+
|
|
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
|
+
|
|
59
|
+
## Demos
|
|
60
|
+
|
|
61
|
+
`pet_demo.py` is a standalone program that drives the graphics backends against a real terminal:
|
|
62
|
+
|
|
63
|
+
| Command | What it shows |
|
|
64
|
+
|---|---|
|
|
65
|
+
| `uv run python pet_demo.py` | sprite-sheet animation across the cell and pixel graphics backends |
|
|
66
|
+
|
|
67
|
+
## Documentation
|
|
68
|
+
|
|
69
|
+
- [docs/commands.md](docs/commands.md) — every slash command, aliases, and the command router
|
|
70
|
+
- [docs/keybindings.md](docs/keybindings.md) — the composer's full key map
|
|
71
|
+
- [docs/tools.md](docs/tools.md) — the built-in tool surface
|
|
72
|
+
- [docs/swarm.md](docs/swarm.md) — parallel agents on a shared board
|
|
73
|
+
- [docs/permissions.md](docs/permissions.md) — ask/auto modes, grants, and gating
|
|
74
|
+
- [docs/skills.md](docs/skills.md) — bundled and on-disk skill discovery
|
|
75
|
+
- [CHANGELOG.md](CHANGELOG.md) — release notes
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# ctx-agent
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
Requires Python 3.12+.
|
|
6
|
+
|
|
7
|
+
## Install and run
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
uv tool install ctx-agent # or: pipx install ctx-agent / pip install ctx-agent
|
|
11
|
+
|
|
12
|
+
ctx # terminal UI
|
|
13
|
+
ctx -p "fix the failing test" # headless: one prompt, one answer, exit
|
|
14
|
+
```
|
|
15
|
+
|
|
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
|
+
|
|
18
|
+
## Headless mode
|
|
19
|
+
|
|
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
|
+
|
|
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
|
+
|
|
24
|
+
Exit codes:
|
|
25
|
+
|
|
26
|
+
| Code | Meaning |
|
|
27
|
+
|---|---|
|
|
28
|
+
| 0 | Finished (`StopReason.STOP`) |
|
|
29
|
+
| 1 | Error, interrupted, or any other stop reason |
|
|
30
|
+
| 2 | Empty prompt, provider error, or agent init failure |
|
|
31
|
+
| 3 | Output hit the length limit (`StopReason.LENGTH`) |
|
|
32
|
+
|
|
33
|
+
## Environment variables
|
|
34
|
+
|
|
35
|
+
| Variable | Effect |
|
|
36
|
+
|---|---|
|
|
37
|
+
| `VX_AGENT` | Active agent profile for headless runs (falls back to last selection / config default) |
|
|
38
|
+
| `VX_THEME` | Pin the TUI palette by name at startup |
|
|
39
|
+
| `VX_BOOT_TRACE` | Path to a file; each boot phase appends a timestamp for startup-latency measurement |
|
|
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 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
|
+
|
|
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
|
+
|
|
46
|
+
## Demos
|
|
47
|
+
|
|
48
|
+
`pet_demo.py` is a standalone program that drives the graphics backends against a real terminal:
|
|
49
|
+
|
|
50
|
+
| Command | What it shows |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `uv run python pet_demo.py` | sprite-sheet animation across the cell and pixel graphics backends |
|
|
53
|
+
|
|
54
|
+
## Documentation
|
|
55
|
+
|
|
56
|
+
- [docs/commands.md](docs/commands.md) — every slash command, aliases, and the command router
|
|
57
|
+
- [docs/keybindings.md](docs/keybindings.md) — the composer's full key map
|
|
58
|
+
- [docs/tools.md](docs/tools.md) — the built-in tool surface
|
|
59
|
+
- [docs/swarm.md](docs/swarm.md) — parallel agents on a shared board
|
|
60
|
+
- [docs/permissions.md](docs/permissions.md) — ask/auto modes, grants, and gating
|
|
61
|
+
- [docs/skills.md](docs/skills.md) — bundled and on-disk skill discovery
|
|
62
|
+
- [CHANGELOG.md](CHANGELOG.md) — release notes
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Slash Commands
|
|
2
|
+
|
|
3
|
+
Every slash command vx recognizes, what each does, its arguments, and whether it costs a model turn. The router is `CommandsMixin.handle_slash` in `packages/code/src/ctx/code/commands/__init__.py:155`.
|
|
4
|
+
|
|
5
|
+
Type `/` at the start of the input to see the command picker; it is built from `SLASH_COMMANDS` (`commands/__init__.py:33`), which lists each command's name, description, and a category shown in the picker's metadata column.
|
|
6
|
+
|
|
7
|
+
## Three kinds of command
|
|
8
|
+
|
|
9
|
+
| Kind | Where it comes from | Costs a model turn |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Built-in command | mixins in `packages/code/src/ctx/code/commands/` | No |
|
|
12
|
+
| Extension command | `all_commands` of the loaded ctx extensions | No |
|
|
13
|
+
| Skill command | `register_cmd: true` in a `SKILL.md` frontmatter | Yes |
|
|
14
|
+
|
|
15
|
+
The router tries built-ins first, then extension commands, then skill commands; an unknown name warns `unknown command: /<name>` rather than falling through to the model (`commands/__init__.py:205-213`).
|
|
16
|
+
|
|
17
|
+
Aliases in `SLASH_ALIASES` (`commands/__init__.py:97`) are resolved before dispatch: `/q` and `/exit` for `/quit`, `/effort` and `/think` for `/thinking`, `/perm` for `/permissions`, `/switch` for `/agent`, `/theme` for `/themes`, `/notification` for `/notifications`, `/ls` for `/tools`, `/commands` for `/help`.
|
|
18
|
+
|
|
19
|
+
Most commands need the agent runtime. The `NEEDS_RUNTIME` set (`commands/__init__.py:111`) is refused while the runtime is still starting with `still starting — the runtime is not ready yet`. `/help`, `/find`, `/board`, `/attach`, `/quit`, and `/update` work before it.
|
|
20
|
+
|
|
21
|
+
A command handler that raises is reported as `/<cmd> failed: <exc>` in the transcript; it never kills the app.
|
|
22
|
+
|
|
23
|
+
## General
|
|
24
|
+
|
|
25
|
+
| Command | Arguments | What it does |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `/help` | | Open the command picker with commands, categories, and key bindings. Selecting a command fills the composer with `/<name> ` |
|
|
28
|
+
| `/find` | `[query]` | Open the transcript search (same UI as ctrl+f), prefilled with the query |
|
|
29
|
+
| `/quit` | | Exit ctx.code. Aliases `/exit`, `/q` |
|
|
30
|
+
|
|
31
|
+
## Model
|
|
32
|
+
|
|
33
|
+
| Command | Arguments | What it does |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| `/model` | | Open the model picker: up to 5 recent models (marked `↻`), then the rest of the catalog sorted by provider, with provider, vision eye `◉`, and context size in the metadata column. Filterable |
|
|
36
|
+
| `/model <name>` | | Select a model by id or `provider::model`. An uncataloged `provider::model` builds an ad-hoc entry from the provider's catalog info |
|
|
37
|
+
| `/model refresh` | `[provider]` | Re-fetch the model catalog from dynamic providers, or one provider's |
|
|
38
|
+
| `/provider` | | Pick which provider `/model` shows; `All providers` clears the filter. `/provider reset`, `/provider all`, `/provider clear` clear it directly |
|
|
39
|
+
| `/thinking` | `[level]` | Set reasoning effort: `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`, `default` — whichever the active model advertises. With no argument, a picker with per-level descriptions. Aliases `/effort`, `/think` |
|
|
40
|
+
|
|
41
|
+
`/provider` persists to `ui.model_provider_filter` in the config; a scoped picker reads that provider's catalog directly instead of materializing all ~6.4k models (`commands/models.py:78-83`).
|
|
42
|
+
|
|
43
|
+
## Security
|
|
44
|
+
|
|
45
|
+
| Command | Arguments | What it does |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| `/mode` | `[ask\|auto]` | Switch vx's permission mode. With no argument opens a picker of the `BUILTIN_MODES` from `permissions.py`; also syncs the ctx config (`prompt`/`auto`) so the hint row agrees |
|
|
48
|
+
| `/permissions` | `[mode]` | Same picker when the interactive panel is unavailable; with an argument switches to an id from `BUILTIN_MODES` (`prompt` maps to `ask`) |
|
|
49
|
+
|
|
50
|
+
## Account
|
|
51
|
+
|
|
52
|
+
| Command | Arguments | What it does |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| `/login` | | Three-way picker: OAuth (GitHub Copilot, OpenAI Codex, Cline, Devin, Junie, DeepAI), API key for any keyed provider, or keyless/local providers. `/login <provider>` jumps straight to that provider's flow |
|
|
55
|
+
| `/logout` | | Picker of providers with stored credentials; `/logout <provider>` clears one directly |
|
|
56
|
+
|
|
57
|
+
OAuth providers open a browser and print the authorization URL. API keys are entered through a secret prompt; when a stored key already exists the prompt offers Update / Clear / Cancel. After any login vx refreshes that provider's model list.
|
|
58
|
+
|
|
59
|
+
## Session
|
|
60
|
+
|
|
61
|
+
| Command | Arguments | What it does |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| `/new` | | Start a fresh session, reload context, clear the transcript |
|
|
64
|
+
| `/clear` | | Clear the transcript and start a new session **under** the current one (the session tree keeps the parent) |
|
|
65
|
+
| `/session` | | Session picker: saved sessions for this directory as a tree (handoff children nested under parents), with message counts and age. Filterable |
|
|
66
|
+
| `/tree` | | In-session tree navigator: every entry of the current session as a tree, current leaf marked `✓`. Picking one calls `navigate_tree`; if the node carried editor text it lands in the composer. Up to 200 rows |
|
|
67
|
+
| `/compact` | `[focus]` | Summarize the context window now; text steers the summary |
|
|
68
|
+
| `/handoff` | `<query>` | Create a handoff session seeded with this conversation and pre-fill the composer with `<query>`; press enter to send |
|
|
69
|
+
| `/undo` | | Rewind the last turn: restores the agent's file edits and stages the boundary, reporting files with A/M/D marks |
|
|
70
|
+
| `/redo` | | Step forward again, or clear the revert at the newest turn |
|
|
71
|
+
| `/usage` | | Token usage: this session, rolling month, and lifetime over a year heatmap. Runs in a worker thread because it reads every session log |
|
|
72
|
+
| `/export` | | Write the session to an HTML file in the working directory |
|
|
73
|
+
| `/copy` | | Copy the last assistant message to the clipboard |
|
|
74
|
+
| `/recap` | | Draft a "where you left off" summary into the composer box |
|
|
75
|
+
| `/attach` | `[path]` | Attach an image to the next prompt. No argument lists pending attachments; `clear`, `none`, `off` drops them. Same list ctrl+v fills |
|
|
76
|
+
|
|
77
|
+
`/new`, `/clear`, `/tree`, `/compact`, `/undo`, `/redo`, `/session`, and `/handoff` refuse while a turn is running (`cannot <verb> while the agent is running — press esc to interrupt`).
|
|
78
|
+
|
|
79
|
+
## Agents
|
|
80
|
+
|
|
81
|
+
| Command | Arguments | What it does |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| `/agent` | | Agent picker: `(no agent)` plus every discovered agent, active one marked `●`, tools in the metadata column. Agents come from `.ctx/agent/<name>.py` and `~/.ctx/agent/<name>.py` |
|
|
84
|
+
| `/agent list`, `/agent ls` | | List agents with the active one marked |
|
|
85
|
+
| `/agent current`, `/agent status` | | Print the active agent, or `no active agent (default session profile)` |
|
|
86
|
+
| `/agent reload` | | Re-discover agents, keep the active profile if it still resolves |
|
|
87
|
+
| `/agent <name>` | | Activate an agent; `off`, `none`, `default` deactivate |
|
|
88
|
+
| `/switch` | `<name>` | Alias for `/agent <name>` |
|
|
89
|
+
|
|
90
|
+
## Swarm
|
|
91
|
+
|
|
92
|
+
| Command | Arguments | What it does |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| `/board` | | Open the swarm board page: roster of workers, the shared feed, and the "needs you" permission asks. Works with no runtime — it renders an empty page when the conversation has no swarm |
|
|
95
|
+
|
|
96
|
+
## Workspace
|
|
97
|
+
|
|
98
|
+
| Command | Arguments | What it does |
|
|
99
|
+
|---|---|---|
|
|
100
|
+
| `/skills` | | List loaded skills grouped by category, `local ·` marking project skills, plus any `skill_warnings` |
|
|
101
|
+
| `/tools` | | List loaded tools: `built-in (n)` first, then one section per MCP server as `server > tool` |
|
|
102
|
+
|
|
103
|
+
## Extensions
|
|
104
|
+
|
|
105
|
+
| Command | Arguments | What it does |
|
|
106
|
+
|---|---|---|
|
|
107
|
+
| `/mcp` | | List MCP servers with state and tool count, plus config errors and sign-in URLs. Aliases `list`, `ls` |
|
|
108
|
+
| `/mcp reload` | | Re-read `mcp.json` and reconnect every server |
|
|
109
|
+
| `/mcp reconnect` | `<name>` | Rebuild one server's connection and re-sync tools |
|
|
110
|
+
| `/mcp enable` / `/mcp disable` | `<name>` | Flip `enabled` in the server's `mcp.json` and reconnect |
|
|
111
|
+
| `/mcp signin` | `<name>` | OAuth sign-in for a remote server; prints and opens the URL. Aliases `sign-in`, `login`, `auth` |
|
|
112
|
+
| `/mcp signout` | `<name>` | Clear a server's stored credentials. Aliases `sign-out`, `logout` |
|
|
113
|
+
| `/reload` | | Re-apply config, extensions, agents, tools, skills, hooks, providers, and MCP in place, then report a before/after diff. Refuses while a turn runs |
|
|
114
|
+
| `/update` | | Self-update vx to the latest release; restart to apply |
|
|
115
|
+
|
|
116
|
+
`/mcp` servers are configured in `mcp.json` under the ctx config dir; the list view prints an example when none exist.
|
|
117
|
+
|
|
118
|
+
## Appearance (via `/settings`)
|
|
119
|
+
|
|
120
|
+
| Command | Arguments | What it does |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| `/settings` | | Settings picker: colored-tool-badge, git-context, history (scrollback), notifications, recap, recap-idle, show-shortcuts, permissions, themes, thinking, thinking-lines. Most rows toggle in place and reopen the picker |
|
|
123
|
+
| `/themes` | `[name]` | Switch palette; no argument opens the theme picker. Alias `/theme` |
|
|
124
|
+
| `/notifications` | `[on\|off]` | Toggle notification sounds. Alias `/notification` |
|
|
125
|
+
|
|
126
|
+
`recap-idle` offers 15s/30s/1m/2m/5m quiet thresholds; `history` offers unlimited or a row cap (default unlimited, 500 rows trims the tail). `git-context` only applies to new conversations or after a restart — the command says so.
|
|
127
|
+
|
|
128
|
+
## Extension commands
|
|
129
|
+
|
|
130
|
+
An extension contributes commands through ctx's plugin API (`api.register_command`). They dispatch through `_extension_command` (`commands/__init__.py:257`): the handler runs with the typed arguments, its `output` is posted as `/<name> (from <owner>): <output>`, and a raise becomes `extension command /<name> failed: <msg>`. They never cost a model turn. They are not in `SLASH_COMMANDS`, so `/help` and the `/` picker do not list them — an extension command is reachable only by typing its exact name.
|
|
131
|
+
|
|
132
|
+
## Skill commands
|
|
133
|
+
|
|
134
|
+
A skill with `register_cmd: true` is reachable as `/<skill-name> <args>` (`_skill_command`, `commands/__init__.py:234`). Unlike built-ins this **does** cost a model turn: the skill body is rendered with `render_skill_prompt` and enqueued as a normal prompt, with a `UserTurn` row showing `/<name> <args>` in the transcript. See [skills.md](skills.md).
|
|
135
|
+
|
|
136
|
+
## Key bindings listed in `/help`
|
|
137
|
+
|
|
138
|
+
`/help` also lists the composer's key bindings (`KEY_BINDINGS`, `commands/__init__.py:72`): navigation and editing (arrows, word motion, undo, kill ring), transcript search and history, `alt+enter` for a newline without sending, `ctrl+d` to exit on an empty composer, `esc` to interrupt, `ctrl+c` twice to exit, and `tab`/`shift+tab` to cycle effort and permission mode. The full map is in [keybindings.md](keybindings.md).
|
|
139
|
+
|
|
140
|
+
## Composer escapes
|
|
141
|
+
|
|
142
|
+
Two prefixes act on the composer text before it is sent:
|
|
143
|
+
|
|
144
|
+
- `!cmd` runs `cmd` as a shell command and shows the output as a transcript block (`_handle_shell`, `app.py`); `!!cmd` runs it **and** sends the output to the model as context. `ctrl+o` expands a collapsed `!` block.
|
|
145
|
+
- `@path` opens a file picker over workspace paths (`atpath.py`); picking one inserts the path, and `@"quoted path"` handles spaces. `expand_paths` resolves the mentions into the prompt text.
|
|
146
|
+
|
|
147
|
+
## See also
|
|
148
|
+
|
|
149
|
+
- [skills.md](skills.md) for `register_cmd` skills
|
|
150
|
+
- [swarm.md](swarm.md) for the `/board` page and the swarm tools
|
|
151
|
+
- [tools.md](tools.md) for the tool surface
|
|
152
|
+
- [permissions.md](permissions.md) for the modes `/mode` and `/permissions` switch
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Key bindings
|
|
2
|
+
|
|
3
|
+
The composer's full key map, as listed under the commands in `/help` (`KEY_BINDINGS` in `packages/code/src/ctx/code/commands/__init__.py`). Rows marked *Keys* in `/help` are reference only — selecting one does not fill the composer.
|
|
4
|
+
|
|
5
|
+
## Swarm board
|
|
6
|
+
|
|
7
|
+
| Keys | Action |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `left` | Open the swarm board when the composer is empty; `esc` leaves |
|
|
10
|
+
| `alt+s` | Open the swarm board from anywhere |
|
|
11
|
+
|
|
12
|
+
## Transcript and composer navigation
|
|
13
|
+
|
|
14
|
+
| Keys | Action |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `ctrl+g` | Fold the sidebar's sections |
|
|
17
|
+
| `ctrl+f` | Search the transcript |
|
|
18
|
+
| `n` / `N` | Next / previous search match |
|
|
19
|
+
| `ctrl+end` | Jump to the latest message |
|
|
20
|
+
| `pgup` / `pgdn` | Scroll the transcript — or the composer once it fills the screen |
|
|
21
|
+
| wheel | Scroll the transcript |
|
|
22
|
+
| `shift+drag` | Select text |
|
|
23
|
+
|
|
24
|
+
## Editing
|
|
25
|
+
|
|
26
|
+
| Keys | Action |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `ctrl+r` | Search prompt history |
|
|
29
|
+
| `ctrl+v` | Attach a clipboard image, or paste text |
|
|
30
|
+
| `ctrl+x` | Drop the attached images |
|
|
31
|
+
| `ctrl+z` / `ctrl+y` | Undo / redo the composer |
|
|
32
|
+
| `alt+b` / `alt+f` | Move by word |
|
|
33
|
+
| `ctrl+left` / `ctrl+right` | Move by word |
|
|
34
|
+
| `ctrl+y` | Yank the last kill |
|
|
35
|
+
| `alt+y` | Cycle the kill ring |
|
|
36
|
+
| `alt+enter` | New line without sending |
|
|
37
|
+
| `ctrl+o` | Expand a `!cmd` shell block's output |
|
|
38
|
+
|
|
39
|
+
Note the newline key is `alt+enter`: terminals send a distinct sequence for it, while `shift+enter` usually arrives as plain `enter` and would submit.
|
|
40
|
+
|
|
41
|
+
## Modes and exit
|
|
42
|
+
|
|
43
|
+
| Keys | Action |
|
|
44
|
+
|---|---|
|
|
45
|
+
| `tab` / `shift+tab` | Cycle reasoning effort / permission mode |
|
|
46
|
+
| `left` / `right` | In the `/model` picker: step the highlighted model's thinking effort down / up (per model, applied by `enter`; also `ctrl+b` / `ctrl+f`) |
|
|
47
|
+
| `esc` | Interrupt the turn, or clear the composer |
|
|
48
|
+
| `ctrl+d` | Exit when the composer is empty |
|
|
49
|
+
| `ctrl+c` twice | Exit |
|
|
50
|
+
|
|
51
|
+
The picker's arrows cycle only the levels that model can express — the catalog's
|
|
52
|
+
`thinking_level_map` intersected with the transport's effort enum — so a model
|
|
53
|
+
without a thinking surface falls through to the usual picker keys (`right`
|
|
54
|
+
confirms, `left` closes). A model that thinks but publishes no effort ladder
|
|
55
|
+
shows `effort fixed` in the cluster's column instead of an editable one — deepai's
|
|
56
|
+
own models (`deepai-cyber`, `mimo-2.6-*`, `minimax-m3`) are the shipped example,
|
|
57
|
+
since neither the provider nor models.dev lists a level for them. Each model keeps
|
|
58
|
+
its own pending level while the picker is open, the way prime-agent's selector
|
|
59
|
+
seeds `←`/`→` per catalog entry.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Permissions
|
|
2
|
+
|
|
3
|
+
How vx decides whether a tool call runs. The modes and rules live in `packages/code/src/ctx/code/permissions.py`; `/mode` and `/permissions` switch between them.
|
|
4
|
+
|
|
5
|
+
## Modes
|
|
6
|
+
|
|
7
|
+
`BUILTIN_MODES` defines two:
|
|
8
|
+
|
|
9
|
+
| Mode | Behaviour |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `ask` (display name *Ask*) | Every mutating tool call prompts for approval before it runs |
|
|
12
|
+
| `auto` (*Auto*) | Bypass all checks — everything runs freely |
|
|
13
|
+
|
|
14
|
+
`DEFAULT_MODE` is `auto`. `/mode` with no argument opens a picker over the built-in modes; `/permissions <mode>` switches by id, with `prompt` accepted as an alias for `ask`. `/mode` also syncs the ctx config so the hint row agrees.
|
|
15
|
+
|
|
16
|
+
## Session grants
|
|
17
|
+
|
|
18
|
+
A `PermissionGrant` records "this tool may touch this path for the rest of the session", so approving once does not re-ask for every edit in the same directory.
|
|
19
|
+
|
|
20
|
+
## Read-only tools
|
|
21
|
+
|
|
22
|
+
`READ_ONLY_TOOLS` — `read`, `grep`, `web`, `web_search`, `web_fetch` — never mutate state and are always allowed without a prompt, even in `ask` mode.
|
|
23
|
+
|
|
24
|
+
## Rule decisions
|
|
25
|
+
|
|
26
|
+
Each tool call is checked against the mode and the session's grants and yields one of `RuleDecision.allow`, `.deny`, or `.permission_required`; a `permission_required` result becomes the approval prompt (or, on the swarm board, a `needs you` card — see [swarm.md](swarm.md)).
|
|
27
|
+
|
|
28
|
+
## Non-interactive runs
|
|
29
|
+
|
|
30
|
+
`vx -p` has no dialog to approve with, so every `ToolApprovalEvent` is answered DENY and `AskUserEvent` gets an empty response — see the README's headless section for exit codes. There is no bypass flag; run headless with the permissions you intend.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Skills
|
|
2
|
+
|
|
3
|
+
How vx discovers and registers skills: what ships inside the package, how ctx's skill loader picks them up, and how the model loads one. The frontmatter schema and on-disk discovery rules are ctx's; this page covers only what vx adds on top.
|
|
4
|
+
|
|
5
|
+
## What vx ships
|
|
6
|
+
|
|
7
|
+
`packages/code/src/ctx/code/__init__.py` runs one line at import:
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
register_skills_package("ctx.code")
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
That tells ctx's skill system that the `vx` package owns a `builtin_skills/` directory. The call is eager on purpose: the loader builds the catalog during startup, before anything else in vx is imported, and a lazy registration would arrive after the catalog was built.
|
|
14
|
+
|
|
15
|
+
vx's bundled skills live at `packages/code/src/ctx/code/builtin_skills/<category>/<skill>/SKILL.md`. There is exactly one today:
|
|
16
|
+
|
|
17
|
+
| Skill | Category | `register_cmd` | Purpose |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| `swarm` | `meta` | `true` (`cmd_info: run several agents at once`) | The coordinator playbook for the swarm feature: how to split work, brief workers, keep the board moving, use channels, workspaces, forks, and models. See [swarm.md](swarm.md) |
|
|
20
|
+
|
|
21
|
+
Because `register_cmd: true`, typing `/swarm <task>` in vx renders the skill body through `render_skill_prompt` — `$ARGUMENTS` is replaced by the typed text — and runs it as a normal turn. The skill is also listed in `<available_skills>` so the model can load it with the `skill` tool unprompted.
|
|
22
|
+
|
|
23
|
+
## How discovery works
|
|
24
|
+
|
|
25
|
+
vx does not implement its own discovery; it rides ctx's. `register_skills_package("ctx.code")` registers the package so ctx's `load_builtin_cmd_skills` walks `builtin_skills/` two levels deep (`<category>/<skill>/SKILL.md`) and merges the result into the prompt catalog behind the on-disk skills — a project or user skill with the same name wins.
|
|
26
|
+
|
|
27
|
+
The on-disk sources are ctx's, unchanged:
|
|
28
|
+
|
|
29
|
+
1. `<cwd>/.agents/skills/`, then each ancestor up to the git root
|
|
30
|
+
2. `~/.agents/skills/`
|
|
31
|
+
3. `<ctx config dir>/skills/` (normally `~/.ctx/skills/`), marked `bundled`
|
|
32
|
+
|
|
33
|
+
`sync_builtin_skills` copies registered package skills into `~/.ctx/skills/` on context load, so vx's `swarm` skill also appears there as a synced copy.
|
|
34
|
+
|
|
35
|
+
Frontmatter is parsed by ctx's loader: `name`, `description` (required), `register_cmd` (`true`/`only`), `cmd_info`, `category`. See the repo-level `docs/skills.md` for the full schema; vx changes none of it.
|
|
36
|
+
|
|
37
|
+
`/skills` in the TUI lists whatever `runtime.context.skills` holds, grouped by category with `local ·` prefixed to non-bundled project skills, and prints any `skill_warnings` first (`commands/system.py:140`).
|
|
38
|
+
|
|
39
|
+
## The `skill` tool
|
|
40
|
+
|
|
41
|
+
vx ships its own `SkillTool` (`tools/skill.py`) rather than reusing ctx's managing version. It is deliberately smaller: **load only**.
|
|
42
|
+
|
|
43
|
+
| Parameter | Meaning |
|
|
44
|
+
|---|---|
|
|
45
|
+
| `name` | Skill name as listed in `<available_skills>` |
|
|
46
|
+
| `file` | Optional path inside the skill directory, instead of `SKILL.md` |
|
|
47
|
+
|
|
48
|
+
`find_skill` resolves a name through `load_skills(cwd)` (project + global on-disk) merged with `load_builtin_cmd_skills()` (packaged `builtin_skills/` trees, including vx's). First match wins.
|
|
49
|
+
|
|
50
|
+
The result is a `<skill_content name="...">` block containing the frontmatter-stripped body, the skill's base directory ("relative paths in this skill are relative to that directory"), and up to 10 sibling files so scripts and references are discoverable. There are no `create`/`edit`/`delete` actions — authoring a skill is a file edit, which `apply_patch` covers.
|
|
51
|
+
|
|
52
|
+
## Slash-command skills
|
|
53
|
+
|
|
54
|
+
A skill with `register_cmd: true` doubles as `/<name>`: `_skill_command` in `commands/__init__.py` matches the typed command against `context.skills`, renders the body with `render_skill_prompt`, adds a `UserTurn` row for `/<name> <args>`, and enqueues it as a prompt. This is the only skill path that costs a model turn without the model choosing it.
|
|
55
|
+
|
|
56
|
+
Skill commands are tried **after** built-ins and extension commands, so a skill can never shadow `/model`, `/board`, or an extension's command — those names are claimed first.
|
|
57
|
+
|
|
58
|
+
## Reloading
|
|
59
|
+
|
|
60
|
+
`/reload` rebuilds the context (`rt.reload_context()`), which re-runs skill discovery and re-syncs bundled skills, so adding or editing a `SKILL.md` needs no restart.
|
|
61
|
+
|
|
62
|
+
## See also
|
|
63
|
+
|
|
64
|
+
- [commands.md](commands.md) for the slash-command router
|
|
65
|
+
- [swarm.md](swarm.md) for the bundled `swarm` skill's feature
|
|
66
|
+
- `docs/skills.md` (repo level) for ctx's full skill schema and discovery
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Swarm
|
|
2
|
+
|
|
3
|
+
Several real agents working in parallel on one task, each in its own conversation, coordinating through a shared append-only board. The machinery lives in `packages/code/src/ctx/code/swarm/` (`engine.py`, `board.py`, `mentions.py`); the model reaches it through two tools, `swarm` and `board`. The coordinator playbook is the bundled `swarm` skill (`builtin_skills/meta/swarm/SKILL.md`, also `/swarm`).
|
|
4
|
+
|
|
5
|
+
## The board
|
|
6
|
+
|
|
7
|
+
One board per swarm, stored under `<ctx config dir>/swarms/<id>/` as `board.jsonl` (one JSON object per post), `members.json` (the roster), and `channels.json`. Each member keeps a cursor — the last sequence number it read — so `board{action:"read", since:N}` returns only what is new. Posts are capped at 16k characters.
|
|
8
|
+
|
|
9
|
+
`board` has three actions:
|
|
10
|
+
|
|
11
|
+
| Action | Fields | What it does |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| `post` | `text`, `channel`, `since` ignored | Append a post. `@name` wakes that member, `@#channel` wakes a channel's subscribers, `@all` wakes everyone; a post with no `@` wakes nobody. `channel:"*"`-style addressing and per-channel reads are supported |
|
|
14
|
+
| `read` | `since`, `channel`, `limit`, `mentions_only` | Newest N posts after `since`; `channel` filters to one area or `*` for all |
|
|
15
|
+
| `wait` | `since`, `timeout`, `mentions_only` | Park the turn until a post concerns you — free, unlike polling. Wakes on `@you` / `@your channel` / `@all` by default; `timeout` gives up after N seconds |
|
|
16
|
+
|
|
17
|
+
Member states are `waiting`, `working`, `stopped`, `killed`; `kill` is final.
|
|
18
|
+
|
|
19
|
+
## The `swarm` tool
|
|
20
|
+
|
|
21
|
+
`swarm{action:...}` manages the roster:
|
|
22
|
+
|
|
23
|
+
| Action | What it does |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `add` | Spawn a worker (`name`, `brief` — it sees nothing of your chat — `model`, `role`, `channels`, `workspace`, `fork`, or `tasks`/`n` for homogeneous copies) |
|
|
26
|
+
| `status` | Who is waiting, working, stopped or killed |
|
|
27
|
+
| `models` / `model` | List pinnable models / switch a member's model (applies at its next turn) |
|
|
28
|
+
| `kill` | End a member for good and clean up its workspace |
|
|
29
|
+
| `title` | Name the swarm |
|
|
30
|
+
| `channel` | `create` / `list` / `subscribe` / `unsubscribe` / `archive` a work area |
|
|
31
|
+
|
|
32
|
+
`add` options worth knowing: `role` is `worker` (default), `verifier` (reports, does not fix) or `narrator`/`monitor`; `workspace` is `inherit` (default), `share` (the worker gets its own `git worktree`) or `branch` (a clone) — `kill` deletes it; `fork` seeds the worker from an existing member's or the coordinator's conversation instead of cold; `channels` subscribes it to extra areas beyond `#main`.
|
|
33
|
+
|
|
34
|
+
In the interactive `vx` app, when every non-killed worker is waiting or stopped, the coordinator is automatically resumed with a prompt to read the board and decide what to do next. It is pinged once per idle period; a worker becoming active starts a new period.
|
|
35
|
+
|
|
36
|
+
A mention does not have to wait for a turn to end. A member that is parked in `board{action:"wait"}` gets the post as that call's result; one that is mid-turn gets it injected as a `<swarm-mention from="@who" channel="#where" seq="N">` message before its next model call, at the next tool boundary. The same goes for the coordinator: a worker naming it reaches the conversation while its own turn is still running. A worker in its very first turn is the exception — it is being briefed from the `add` post already — and a post naming nobody is left on the board to be read.
|
|
37
|
+
|
|
38
|
+
Limits: `MAX_MEMBERS = 8` live members per swarm and `MAX_TURNS = 600` turns (`swarm/engine.py`).
|
|
39
|
+
|
|
40
|
+
## Channels
|
|
41
|
+
|
|
42
|
+
`#main` always exists and cannot be archived; a member follows `#main` plus its subscribed channels and only sees those, so unrelated work stops waking it. `board{action:"post", channel:"parser"}` and `board{action:"read", channel:"*"}` complete the split.
|
|
43
|
+
|
|
44
|
+
## Worker permissions
|
|
45
|
+
|
|
46
|
+
Workers auto-approve their own tool calls — except while the swarm board page is open, where a worker's mutating call is put to you as a `needs you` card (`approve once / allow for this swarm / deny`). `swarm.approval_hook` in `app.py` is the seam; closing the board denies what it was showing.
|
|
47
|
+
|
|
48
|
+
## The board page
|
|
49
|
+
|
|
50
|
+
`/board`, `alt+s`, or `left` on an empty composer opens `ctx.code.tui.swarm`: a roster of member cards (model, channel, workspace, the tool call it is running now and how long it has held, calls made and failed), the channel strip, and an activity column. The column lists the room's own history — every tool call with its duration and result, interleaved with the board posts; `v` narrows it to posts only. `⏎` on a member shows its own panel: its stats, its tool calls, and its posts. The page renders an empty state when the conversation has no swarm.
|
|
51
|
+
|
|
52
|
+
Workers report their tool calls to the page through `Member.activity` and `Member.current` in `swarm/engine.py` (`ToolStartEvent` / `ToolEndEvent` / `ToolResultEvent`), so the roster and the activity column are live rather than a summary written after the fact. `packages/code/demo.py` drives the same page with a simulated room, which is the quickest way to see it without spending tokens.
|
|
53
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Tools
|
|
2
|
+
|
|
3
|
+
The built-in tools vx gives the model, from `DEFAULT_TOOLS` in `packages/code/src/ctx/code/tools/__init__.py`. `/tools` lists whatever is loaded, built-ins first and then one section per MCP server as `server > tool`.
|
|
4
|
+
|
|
5
|
+
| Tool | What it does |
|
|
6
|
+
|---|---|
|
|
7
|
+
| `read` | Read files (with image support) and list directories |
|
|
8
|
+
| `apply_patch` | Edit files: replace / insert / create ops on exact text |
|
|
9
|
+
| `bash` | Run shell commands; `wait_ms` and `background=true` promote long calls to jobs with `status`/`list`/`send_input`/`kill` actions |
|
|
10
|
+
| `web` | `mode="search"` queries the web; `mode="fetch"` reads a URL as markdown |
|
|
11
|
+
| `search` | Find text or files — ripgrep, falling back through `git grep` to a Python walk, so it always answers |
|
|
12
|
+
| `skill` | Load a skill's `SKILL.md` body into context by name |
|
|
13
|
+
| `ask_user` | Stop mid-turn and ask the user 1-4 questions with options |
|
|
14
|
+
| `todo` | Publish the plan the sidebar draws |
|
|
15
|
+
| `swarm` | Create and steer a swarm of parallel workers (see [swarm.md](swarm.md)) |
|
|
16
|
+
| `board` | Post to, read, or wait on the swarm's shared board |
|
|
17
|
+
|
|
18
|
+
## Parent-only tools
|
|
19
|
+
|
|
20
|
+
`swarm` and `board` are registered `parent_only` (`PARENT_ONLY` in `tools/__init__.py`): the top-level conversation gets them, but an agent vx dispatches does not, so helpers cannot start their own swarm or recurse. Swarm workers still get the ordinary coding tools.
|
|
21
|
+
|
|
22
|
+
Tools from MCP servers (`/mcp`) and from agents and extensions are added on top of this list at runtime; none of them are built in.
|