klaude-code 1.2.21__tar.gz → 1.2.23__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 (209) hide show
  1. {klaude_code-1.2.21 → klaude_code-1.2.23}/PKG-INFO +19 -13
  2. {klaude_code-1.2.21 → klaude_code-1.2.23}/README.md +17 -12
  3. {klaude_code-1.2.21 → klaude_code-1.2.23}/pyproject.toml +3 -1
  4. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/cli/debug.py +8 -10
  5. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/__init__.py +0 -3
  6. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/status_cmd.py +1 -1
  7. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/const/__init__.py +10 -7
  8. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/manager/sub_agent_manager.py +1 -1
  9. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/prompt.py +5 -2
  10. klaude_code-1.2.23/src/klaude_code/core/prompts/prompt-codex-gpt-5-2-codex.md +117 -0
  11. klaude_code-1.2.21/src/klaude_code/core/prompts/prompt-codex-gpt-5-1.md → klaude_code-1.2.23/src/klaude_code/core/prompts/prompt-codex.md +9 -42
  12. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/reminders.py +87 -2
  13. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/task.py +37 -18
  14. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/__init__.py +1 -9
  15. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/file/_utils.py +6 -0
  16. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/file/apply_patch_tool.py +30 -72
  17. klaude_code-1.2.23/src/klaude_code/core/tool/file/diff_builder.py +151 -0
  18. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/file/edit_tool.py +35 -18
  19. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/file/read_tool.py +45 -86
  20. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/file/write_tool.py +40 -30
  21. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/shell/bash_tool.py +147 -0
  22. {klaude_code-1.2.21/src/klaude_code/core/tool/memory → klaude_code-1.2.23/src/klaude_code/core/tool/skill}/skill_tool.py +16 -39
  23. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/protocol/commands.py +0 -1
  24. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/protocol/model.py +31 -11
  25. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/protocol/tools.py +1 -2
  26. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/session/export.py +76 -21
  27. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/session/store.py +4 -2
  28. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/session/templates/export_session.html +28 -0
  29. klaude_code-1.2.23/src/klaude_code/skill/__init__.py +27 -0
  30. klaude_code-1.2.23/src/klaude_code/skill/assets/deslop/SKILL.md +17 -0
  31. klaude_code-1.2.23/src/klaude_code/skill/assets/dev-docs/SKILL.md +108 -0
  32. klaude_code-1.2.23/src/klaude_code/skill/assets/handoff/SKILL.md +39 -0
  33. klaude_code-1.2.23/src/klaude_code/skill/assets/jj-workspace/SKILL.md +20 -0
  34. klaude_code-1.2.23/src/klaude_code/skill/assets/skill-creator/SKILL.md +139 -0
  35. klaude_code-1.2.21/src/klaude_code/core/tool/memory/skill_loader.py → klaude_code-1.2.23/src/klaude_code/skill/loader.py +60 -24
  36. klaude_code-1.2.23/src/klaude_code/skill/manager.py +70 -0
  37. klaude_code-1.2.23/src/klaude_code/skill/system_skills.py +192 -0
  38. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/modes/repl/completers.py +103 -3
  39. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/modes/repl/event_handler.py +7 -3
  40. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/modes/repl/input_prompt_toolkit.py +42 -3
  41. klaude_code-1.2.23/src/klaude_code/ui/renderers/__init__.py +0 -0
  42. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/renderers/assistant.py +7 -2
  43. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/renderers/common.py +26 -11
  44. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/renderers/developer.py +12 -5
  45. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/renderers/diffs.py +85 -1
  46. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/renderers/metadata.py +4 -2
  47. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/renderers/thinking.py +1 -1
  48. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/renderers/tools.py +75 -129
  49. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/renderers/user_input.py +32 -2
  50. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/rich/markdown.py +27 -12
  51. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/rich/status.py +9 -24
  52. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/rich/theme.py +17 -5
  53. klaude_code-1.2.21/src/klaude_code/command/diff_cmd.py +0 -136
  54. klaude_code-1.2.21/src/klaude_code/command/prompt-deslop.md +0 -14
  55. klaude_code-1.2.21/src/klaude_code/command/prompt-dev-docs-update.md +0 -56
  56. klaude_code-1.2.21/src/klaude_code/command/prompt-dev-docs.md +0 -46
  57. klaude_code-1.2.21/src/klaude_code/command/prompt-handoff.md +0 -33
  58. klaude_code-1.2.21/src/klaude_code/command/prompt-jj-workspace.md +0 -18
  59. klaude_code-1.2.21/src/klaude_code/core/tool/file/multi_edit_tool.md +0 -42
  60. klaude_code-1.2.21/src/klaude_code/core/tool/file/multi_edit_tool.py +0 -175
  61. klaude_code-1.2.21/src/klaude_code/core/tool/memory/__init__.py +0 -5
  62. klaude_code-1.2.21/src/klaude_code/core/tool/memory/memory_tool.md +0 -20
  63. klaude_code-1.2.21/src/klaude_code/core/tool/memory/memory_tool.py +0 -456
  64. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/__init__.py +0 -0
  65. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/auth/__init__.py +0 -0
  66. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/auth/codex/__init__.py +0 -0
  67. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/auth/codex/exceptions.py +0 -0
  68. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/auth/codex/jwt_utils.py +0 -0
  69. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/auth/codex/oauth.py +0 -0
  70. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/auth/codex/token_manager.py +0 -0
  71. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/cli/__init__.py +0 -0
  72. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/cli/auth_cmd.py +0 -0
  73. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/cli/config_cmd.py +0 -0
  74. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/cli/list_model.py +0 -0
  75. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/cli/main.py +0 -0
  76. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/cli/runtime.py +0 -0
  77. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/cli/self_update.py +0 -0
  78. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/cli/session_cmd.py +0 -0
  79. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/clear_cmd.py +0 -0
  80. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/command_abc.py +0 -0
  81. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/debug_cmd.py +0 -0
  82. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/export_cmd.py +0 -0
  83. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/export_online_cmd.py +0 -0
  84. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/help_cmd.py +0 -0
  85. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/model_cmd.py +0 -0
  86. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/prompt-init.md +0 -0
  87. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/prompt_command.py +0 -0
  88. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/refresh_cmd.py +0 -0
  89. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/registry.py +0 -0
  90. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/release_notes_cmd.py +0 -0
  91. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/terminal_setup_cmd.py +0 -0
  92. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/command/thinking_cmd.py +0 -0
  93. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/config/__init__.py +0 -0
  94. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/config/config.py +0 -0
  95. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/config/select_model.py +0 -0
  96. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/__init__.py +0 -0
  97. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/agent.py +0 -0
  98. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/executor.py +0 -0
  99. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/manager/__init__.py +0 -0
  100. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/manager/llm_clients.py +0 -0
  101. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/manager/llm_clients_builder.py +0 -0
  102. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/prompts/prompt-claude-code.md +0 -0
  103. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/prompts/prompt-codex-gpt-5-1-codex-max.md +0 -0
  104. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/prompts/prompt-gemini.md +0 -0
  105. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/prompts/prompt-minimal.md +0 -0
  106. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/prompts/prompt-sub-agent-explore.md +0 -0
  107. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/prompts/prompt-sub-agent-oracle.md +0 -0
  108. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/prompts/prompt-sub-agent-web.md +0 -0
  109. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/prompts/prompt-sub-agent.md +0 -0
  110. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/file/__init__.py +0 -0
  111. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/file/apply_patch.py +0 -0
  112. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/file/apply_patch_tool.md +0 -0
  113. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/file/edit_tool.md +0 -0
  114. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/file/read_tool.md +0 -0
  115. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/file/write_tool.md +0 -0
  116. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/report_back_tool.py +0 -0
  117. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/shell/__init__.py +0 -0
  118. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/shell/bash_tool.md +0 -0
  119. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/shell/command_safety.py +0 -0
  120. {klaude_code-1.2.21/src/klaude_code/core/tool/todo → klaude_code-1.2.23/src/klaude_code/core/tool/skill}/__init__.py +0 -0
  121. {klaude_code-1.2.21/src/klaude_code/core/tool/memory → klaude_code-1.2.23/src/klaude_code/core/tool/skill}/skill_tool.md +0 -0
  122. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/sub_agent_tool.py +0 -0
  123. {klaude_code-1.2.21/src/klaude_code/core/tool/web → klaude_code-1.2.23/src/klaude_code/core/tool/todo}/__init__.py +0 -0
  124. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/todo/todo_write_tool.md +0 -0
  125. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/todo/todo_write_tool.py +0 -0
  126. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/todo/todo_write_tool_raw.md +0 -0
  127. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/todo/update_plan_tool.md +0 -0
  128. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/todo/update_plan_tool.py +0 -0
  129. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/tool_abc.py +0 -0
  130. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/tool_context.py +0 -0
  131. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/tool_registry.py +0 -0
  132. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/tool_runner.py +0 -0
  133. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/truncation.py +0 -0
  134. {klaude_code-1.2.21/src/klaude_code/ui/renderers → klaude_code-1.2.23/src/klaude_code/core/tool/web}/__init__.py +0 -0
  135. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/web/mermaid_tool.md +0 -0
  136. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/web/mermaid_tool.py +0 -0
  137. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/web/web_fetch_tool.md +0 -0
  138. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/web/web_fetch_tool.py +0 -0
  139. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/web/web_search_tool.md +0 -0
  140. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/tool/web/web_search_tool.py +0 -0
  141. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/core/turn.py +0 -0
  142. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/__init__.py +0 -0
  143. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/anthropic/__init__.py +0 -0
  144. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/anthropic/client.py +0 -0
  145. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/anthropic/input.py +0 -0
  146. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/client.py +0 -0
  147. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/codex/__init__.py +0 -0
  148. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/codex/client.py +0 -0
  149. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/input_common.py +0 -0
  150. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/openai_compatible/__init__.py +0 -0
  151. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/openai_compatible/client.py +0 -0
  152. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/openai_compatible/input.py +0 -0
  153. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/openai_compatible/stream_processor.py +0 -0
  154. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/openai_compatible/tool_call_accumulator.py +0 -0
  155. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/openrouter/__init__.py +0 -0
  156. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/openrouter/client.py +0 -0
  157. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/openrouter/input.py +0 -0
  158. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/openrouter/reasoning_handler.py +0 -0
  159. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/registry.py +0 -0
  160. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/responses/__init__.py +0 -0
  161. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/responses/client.py +0 -0
  162. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/responses/input.py +0 -0
  163. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/llm/usage.py +0 -0
  164. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/protocol/__init__.py +0 -0
  165. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/protocol/events.py +0 -0
  166. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/protocol/llm_param.py +0 -0
  167. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/protocol/op.py +0 -0
  168. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/protocol/op_handler.py +0 -0
  169. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/protocol/sub_agent/__init__.py +0 -0
  170. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/protocol/sub_agent/explore.py +0 -0
  171. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/protocol/sub_agent/oracle.py +0 -0
  172. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/protocol/sub_agent/task.py +0 -0
  173. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/protocol/sub_agent/web.py +0 -0
  174. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/session/__init__.py +0 -0
  175. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/session/codec.py +0 -0
  176. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/session/selector.py +0 -0
  177. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/session/session.py +0 -0
  178. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/trace/__init__.py +0 -0
  179. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/trace/log.py +0 -0
  180. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/__init__.py +0 -0
  181. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/core/__init__.py +0 -0
  182. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/core/display.py +0 -0
  183. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/core/input.py +0 -0
  184. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/core/stage_manager.py +0 -0
  185. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/modes/__init__.py +0 -0
  186. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/modes/debug/__init__.py +0 -0
  187. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/modes/debug/display.py +0 -0
  188. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/modes/exec/__init__.py +0 -0
  189. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/modes/exec/display.py +0 -0
  190. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/modes/repl/__init__.py +0 -0
  191. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/modes/repl/clipboard.py +0 -0
  192. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/modes/repl/display.py +0 -0
  193. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/modes/repl/key_bindings.py +0 -0
  194. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/modes/repl/renderer.py +0 -0
  195. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/renderers/errors.py +0 -0
  196. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/renderers/sub_agent.py +0 -0
  197. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/rich/__init__.py +0 -0
  198. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/rich/cjk_wrap.py +0 -0
  199. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/rich/code_panel.py +0 -0
  200. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/rich/live.py +0 -0
  201. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/rich/quote.py +0 -0
  202. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/rich/searchable_text.py +0 -0
  203. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/terminal/__init__.py +0 -0
  204. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/terminal/color.py +0 -0
  205. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/terminal/control.py +0 -0
  206. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/terminal/notifier.py +0 -0
  207. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/terminal/progress_bar.py +0 -0
  208. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/utils/__init__.py +0 -0
  209. {klaude_code-1.2.21 → klaude_code-1.2.23}/src/klaude_code/ui/utils/common.py +0 -0
@@ -1,10 +1,11 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: klaude-code
3
- Version: 1.2.21
3
+ Version: 1.2.23
4
4
  Summary: Add your description here
5
5
  Requires-Dist: anthropic>=0.66.0
6
6
  Requires-Dist: chardet>=5.2.0
7
7
  Requires-Dist: ddgs>=9.9.3
8
+ Requires-Dist: diff-match-patch>=20241021
8
9
  Requires-Dist: openai>=1.102.0
9
10
  Requires-Dist: pillow>=12.0.0
10
11
  Requires-Dist: prompt-toolkit>=3.0.52
@@ -17,18 +18,23 @@ Requires-Dist: typer>=0.17.3
17
18
  Requires-Python: >=3.13
18
19
  Description-Content-Type: text/markdown
19
20
 
20
- # Minimal Code Agent CLI (Klaude Code)
21
-
22
- An minimal and opinionated code agent with multi-model support.
23
-
24
- ## Key Features
25
- - **Adaptive Tooling**: Model-aware toolsets (Claude Code tools for Sonnet, Codex `apply_patch` for GPT-5.1/Codex).
26
- - **Multi-Provider Support**: Compatible with `anthropic-messages-api`,`openai-responses-api`, and `openai-compatible-api`(`openrouter-api`), featuring interleaved thinking, OpenRouter's provider sorting etc.
27
- - **Structured Sub-Agent Output**: Main agent defines output JSON schema for sub-agents; sub-agents use `report_back` tool with constrained decoding to return schema-compliant structured data.
28
- - **Skill System**: Extensible support for loading Claude Skills.
29
- - **Session Management**: Robust context preservation with resumable sessions (`--continue`).
30
- - **Simple TUI**: Clean interface offering full visibility into model responses, reasoning and actions.
31
- - **Core Utilities**: Slash commands, sub-agents, image pasting, terminal notifications, file mentioning, and auto-theming.
21
+ # Klaude Code
22
+
23
+ Multi-model code agent CLI.
24
+
25
+ ## Features
26
+ - **Multi-provider**: Anthropic, OpenAI Responses API, OpenRouter
27
+ - **Keep reasoning item in context**: Interleaved thinking support
28
+ - **Model-aware tools**: Claude Code tools for Sonnet, `apply_patch` for GPT-5/Codex
29
+ - **Structured sub-agent output**: Define JSON schema, get schema-compliant responses via constrained decoding
30
+ - **Recursive `@file` mentions**: Circular dependency protection, relative path resolution
31
+ - **Reminders**: Cooldown-based todo tracking and instruction reinforcement
32
+ - **External file sync**: Monitoring for external edits (linter, manual)
33
+ - **Interrupt handling**: Ctrl+C preserves partial responses and synthesizes tool cancellation results
34
+ - **Output truncation**: Large outputs saved to file system with snapshot links
35
+ - **Skills**: Built-in + user + project Agent Skills (with implicit invocation by Skill tool or explicit invocation by typing `$`)
36
+ - **Sessions**: Resumable with `--continue`
37
+ - **Extras**: Slash commands, sub-agents, image paste, terminal notifications, auto-theming
32
38
 
33
39
  ## Installation
34
40
 
@@ -1,15 +1,20 @@
1
- # Minimal Code Agent CLI (Klaude Code)
2
-
3
- An minimal and opinionated code agent with multi-model support.
4
-
5
- ## Key Features
6
- - **Adaptive Tooling**: Model-aware toolsets (Claude Code tools for Sonnet, Codex `apply_patch` for GPT-5.1/Codex).
7
- - **Multi-Provider Support**: Compatible with `anthropic-messages-api`,`openai-responses-api`, and `openai-compatible-api`(`openrouter-api`), featuring interleaved thinking, OpenRouter's provider sorting etc.
8
- - **Structured Sub-Agent Output**: Main agent defines output JSON schema for sub-agents; sub-agents use `report_back` tool with constrained decoding to return schema-compliant structured data.
9
- - **Skill System**: Extensible support for loading Claude Skills.
10
- - **Session Management**: Robust context preservation with resumable sessions (`--continue`).
11
- - **Simple TUI**: Clean interface offering full visibility into model responses, reasoning and actions.
12
- - **Core Utilities**: Slash commands, sub-agents, image pasting, terminal notifications, file mentioning, and auto-theming.
1
+ # Klaude Code
2
+
3
+ Multi-model code agent CLI.
4
+
5
+ ## Features
6
+ - **Multi-provider**: Anthropic, OpenAI Responses API, OpenRouter
7
+ - **Keep reasoning item in context**: Interleaved thinking support
8
+ - **Model-aware tools**: Claude Code tools for Sonnet, `apply_patch` for GPT-5/Codex
9
+ - **Structured sub-agent output**: Define JSON schema, get schema-compliant responses via constrained decoding
10
+ - **Recursive `@file` mentions**: Circular dependency protection, relative path resolution
11
+ - **Reminders**: Cooldown-based todo tracking and instruction reinforcement
12
+ - **External file sync**: Monitoring for external edits (linter, manual)
13
+ - **Interrupt handling**: Ctrl+C preserves partial responses and synthesizes tool cancellation results
14
+ - **Output truncation**: Large outputs saved to file system with snapshot links
15
+ - **Skills**: Built-in + user + project Agent Skills (with implicit invocation by Skill tool or explicit invocation by typing `$`)
16
+ - **Sessions**: Resumable with `--continue`
17
+ - **Extras**: Slash commands, sub-agents, image paste, terminal notifications, auto-theming
13
18
 
14
19
  ## Installation
15
20
 
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "klaude-code"
7
- version = "1.2.21"
7
+ version = "1.2.23"
8
8
  description = "Add your description here"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.13"
@@ -12,6 +12,7 @@ dependencies = [
12
12
  "anthropic>=0.66.0",
13
13
  "chardet>=5.2.0",
14
14
  "ddgs>=9.9.3",
15
+ "diff-match-patch>=20241021",
15
16
  "openai>=1.102.0",
16
17
  "pillow>=12.0.0",
17
18
  "prompt-toolkit>=3.0.52",
@@ -80,6 +81,7 @@ layers = [
80
81
  "klaude_code.cli",
81
82
  "klaude_code.ui",
82
83
  "klaude_code.core",
84
+ "klaude_code.skill",
83
85
  "klaude_code.command",
84
86
  "klaude_code.session",
85
87
  "klaude_code.config",
@@ -1,6 +1,5 @@
1
1
  """Debug utilities for CLI."""
2
2
 
3
- import os
4
3
  import subprocess
5
4
  import sys
6
5
  from pathlib import Path
@@ -45,16 +44,15 @@ def resolve_debug_settings(flag: bool, raw_filters: str | None) -> tuple[bool, s
45
44
  def open_log_file_in_editor(path: Path) -> None:
46
45
  """Open the given log file in a text editor without blocking the CLI."""
47
46
 
48
- editor = os.environ.get("EDITOR")
47
+ editor = ""
49
48
 
50
- if not editor:
51
- for cmd in ["open", "xdg-open", "code", "TextEdit", "notepad"]:
52
- try:
53
- subprocess.run(["which", cmd], check=True, capture_output=True)
54
- editor = cmd
55
- break
56
- except (subprocess.CalledProcessError, FileNotFoundError):
57
- continue
49
+ for cmd in ["code", "TextEdit", "notepad"]:
50
+ try:
51
+ subprocess.run(["which", cmd], check=True, capture_output=True)
52
+ editor = cmd
53
+ break
54
+ except (subprocess.CalledProcessError, FileNotFoundError):
55
+ continue
58
56
 
59
57
  if not editor:
60
58
  if sys.platform == "darwin":
@@ -29,7 +29,6 @@ def ensure_commands_loaded() -> None:
29
29
  # Import and register commands in display order
30
30
  from .clear_cmd import ClearCommand
31
31
  from .debug_cmd import DebugCommand
32
- from .diff_cmd import DiffCommand
33
32
  from .export_cmd import ExportCommand
34
33
  from .export_online_cmd import ExportOnlineCommand
35
34
  from .help_cmd import HelpCommand
@@ -48,7 +47,6 @@ def ensure_commands_loaded() -> None:
48
47
  register(ModelCommand())
49
48
  load_prompt_commands()
50
49
  register(StatusCommand())
51
- register(DiffCommand())
52
50
  register(HelpCommand())
53
51
  register(ReleaseNotesCommand())
54
52
  register(TerminalSetupCommand())
@@ -63,7 +61,6 @@ def __getattr__(name: str) -> object:
63
61
  _commands_map = {
64
62
  "ClearCommand": "clear_cmd",
65
63
  "DebugCommand": "debug_cmd",
66
- "DiffCommand": "diff_cmd",
67
64
  "ExportCommand": "export_cmd",
68
65
  "ExportOnlineCommand": "export_online_cmd",
69
66
  "HelpCommand": "help_cmd",
@@ -22,7 +22,7 @@ def accumulate_session_usage(session: Session) -> AggregatedUsage:
22
22
  for item in session.conversation_history:
23
23
  if isinstance(item, model.TaskMetadataItem):
24
24
  task_count += 1
25
- all_metadata.append(item.main)
25
+ all_metadata.append(item.main_agent)
26
26
  all_metadata.extend(item.sub_agent_task_metadata)
27
27
 
28
28
  # Aggregate by model+provider
@@ -49,12 +49,9 @@ READ_CHAR_LIMIT_PER_LINE = 2000
49
49
  # Maximum number of lines to read from a file
50
50
  READ_GLOBAL_LINE_CAP = 2000
51
51
 
52
- # Maximum total characters to read
52
+ # Maximum total characters to read (truncates beyond this limit)
53
53
  READ_MAX_CHARS = 50000
54
54
 
55
- # Maximum file size in KB for text files
56
- READ_MAX_KB = 256
57
-
58
55
  # Maximum image file size in bytes (4MB)
59
56
  READ_MAX_IMAGE_BYTES = 4 * 1024 * 1024
60
57
 
@@ -93,17 +90,23 @@ INVALID_TOOL_CALL_MAX_LENGTH = 500
93
90
  TRUNCATE_DISPLAY_MAX_LINE_LENGTH = 1000
94
91
 
95
92
  # Maximum lines for truncated display output
96
- TRUNCATE_DISPLAY_MAX_LINES = 20
93
+ TRUNCATE_DISPLAY_MAX_LINES = 8
97
94
 
98
95
  # Maximum lines for sub-agent result display
99
- SUB_AGENT_RESULT_MAX_LINES = 12
96
+ SUB_AGENT_RESULT_MAX_LINES = 20
100
97
 
101
98
 
102
99
  # UI refresh rate (frames per second) for debounced content streaming
103
100
  UI_REFRESH_RATE_FPS = 20
104
101
 
105
102
  # Number of lines to keep visible at bottom of markdown streaming window
106
- MARKDOWN_STREAM_LIVE_WINDOW = 20
103
+ MARKDOWN_STREAM_LIVE_WINDOW = 6
104
+
105
+ # Left margin (columns) to reserve when rendering markdown
106
+ MARKDOWN_LEFT_MARGIN = 2
107
+
108
+ # Right margin (columns) to reserve when rendering markdown
109
+ MARKDOWN_RIGHT_MARGIN = 2
107
110
 
108
111
  # Status hint text shown after spinner status
109
112
  STATUS_HINT_TEXT = " (esc to interrupt)"
@@ -89,7 +89,7 @@ Only the content passed to `report_back` will be returned to user.\
89
89
  result = event.task_result
90
90
  # Capture TaskMetadataEvent for metadata propagation
91
91
  elif isinstance(event, events.TaskMetadataEvent):
92
- task_metadata = event.metadata.main
92
+ task_metadata = event.metadata.main_agent
93
93
  await self.emit_event(event)
94
94
  return SubAgentResult(
95
95
  task_result=result,
@@ -17,8 +17,9 @@ COMMAND_DESCRIPTIONS: dict[str, str] = {
17
17
 
18
18
  # Mapping from logical prompt keys to resource file paths under the core/prompt directory.
19
19
  PROMPT_FILES: dict[str, str] = {
20
- "main_gpt_5_1": "prompts/prompt-codex-gpt-5-1.md",
20
+ "main_codex": "prompts/prompt-codex.md",
21
21
  "main_gpt_5_1_codex_max": "prompts/prompt-codex-gpt-5-1-codex-max.md",
22
+ "main_gpt_5_2_codex": "prompts/prompt-codex-gpt-5-2-codex.md",
22
23
  "main": "prompts/prompt-claude-code.md",
23
24
  "main_gemini": "prompts/prompt-gemini.md", # https://ai.google.dev/gemini-api/docs/prompting-strategies?hl=zh-cn#agentic-si-template
24
25
  }
@@ -43,10 +44,12 @@ def _load_base_prompt(file_key: str) -> str:
43
44
  def _get_file_key(model_name: str, protocol: llm_param.LLMClientProtocol) -> str:
44
45
  """Determine which prompt file to use based on model."""
45
46
  match model_name:
47
+ case name if "gpt-5.2-codex" in name:
48
+ return "main_gpt_5_2_codex"
46
49
  case name if "gpt-5.1-codex-max" in name:
47
50
  return "main_gpt_5_1_codex_max"
48
51
  case name if "gpt-5" in name:
49
- return "main_gpt_5_1"
52
+ return "main_codex"
50
53
  case name if "gemini" in name:
51
54
  return "main_gemini"
52
55
  case _:
@@ -0,0 +1,117 @@
1
+ You are Codex, based on GPT-5. You are running as a coding agent in the Codex CLI on a user's computer.
2
+
3
+ ## General
4
+
5
+ - When searching for text or files, prefer using `rg` or `rg --files` respectively because `rg` is much faster than alternatives like `grep`. (If the `rg` command is not found, then use alternatives.)
6
+
7
+ ## Editing constraints
8
+
9
+ - Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.
10
+ - Add succinct code comments that explain what is going on if code is not self-explanatory. You should not add comments like "Assigns the value to the variable", but a brief comment might be useful ahead of a complex code block that the user would otherwise have to spend time parsing out. Usage of these comments should be rare.
11
+ - Try to use apply_patch for single file edits, but it is fine to explore other options to make the edit if it does not work well. Do not use apply_patch for changes that are auto-generated (i.e. generating package.json or running a lint or format command like gofmt) or when scripting is more efficient (such as search and replacing a string across a codebase).
12
+ - You may be in a dirty git worktree.
13
+ * NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.
14
+ * If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.
15
+ * If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.
16
+ * If the changes are in unrelated files, just ignore them and don't revert them.
17
+ - Do not amend a commit unless explicitly requested to do so.
18
+ - While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed.
19
+ - **NEVER** use destructive commands like `git reset --hard` or `git checkout --` unless specifically requested or approved by the user.
20
+
21
+ ## Plan tool
22
+
23
+ When using the planning tool:
24
+ - Skip using the planning tool for straightforward tasks (roughly the easiest 25%).
25
+ - Do not make single-step plans.
26
+ - When you made a plan, update it after having performed one of the sub-tasks that you shared on the plan.
27
+
28
+ ## Codex CLI harness, sandboxing, and approvals
29
+
30
+ The Codex CLI harness supports several different configurations for sandboxing and escalation approvals that the user can choose from.
31
+
32
+ Filesystem sandboxing defines which files can be read or written. The options for `sandbox_mode` are:
33
+ - **read-only**: The sandbox only permits reading files.
34
+ - **workspace-write**: The sandbox permits reading files, and editing files in `cwd` and `writable_roots`. Editing files in other directories requires approval.
35
+ - **danger-full-access**: No filesystem sandboxing - all commands are permitted.
36
+
37
+ Network sandboxing defines whether network can be accessed without approval. Options for `network_access` are:
38
+ - **restricted**: Requires approval
39
+ - **enabled**: No approval needed
40
+
41
+ Approvals are your mechanism to get user consent to run shell commands without the sandbox. Possible configuration options for `approval_policy` are
42
+ - **untrusted**: The harness will escalate most commands for user approval, apart from a limited allowlist of safe "read" commands.
43
+ - **on-failure**: The harness will allow all commands to run in the sandbox (if enabled), and failures will be escalated to the user for approval to run again without the sandbox.
44
+ - **on-request**: Commands will be run in the sandbox by default, and you can specify in your tool call if you want to escalate a command to run without sandboxing. (Note that this mode is not always available. If it is, you'll see parameters for it in the `shell` command description.)
45
+ - **never**: This is a non-interactive mode where you may NEVER ask the user for approval to run commands. Instead, you must always persist and work around constraints to solve the task for the user. You MUST do your utmost best to finish the task and validate your work before yielding. If this mode is paired with `danger-full-access`, take advantage of it to deliver the best outcome for the user. Further, in this mode, your default testing philosophy is overridden: Even if you don't see local patterns for testing, you may add tests and scripts to validate your work. Just remove them before yielding.
46
+
47
+ When you are running with `approval_policy == on-request`, and sandboxing enabled, here are scenarios where you'll need to request approval:
48
+ - You need to run a command that writes to a directory that requires it (e.g. running tests that write to /var)
49
+ - You need to run a GUI app (e.g., open/xdg-open/osascript) to open browsers or files.
50
+ - You are running sandboxed and need to run a command that requires network access (e.g. installing packages)
51
+ - If you run a command that is important to solving the user's query, but it fails because of sandboxing, rerun the command with approval. ALWAYS proceed to use the `sandbox_permissions` and `justification` parameters - do not message the user before requesting approval for the command.
52
+ - You are about to take a potentially destructive action such as an `rm` or `git reset` that the user did not explicitly ask for
53
+ - (for all of these, you should weigh alternative paths that do not require approval)
54
+
55
+ When `sandbox_mode` is set to read-only, you'll need to request approval for any command that isn't a read.
56
+
57
+ You will be told what filesystem sandboxing, network sandboxing, and approval mode are active in a developer or user message. If you are not told about this, assume that you are running with workspace-write, network sandboxing enabled, and approval on-failure.
58
+
59
+ Although they introduce friction to the user because your work is paused until the user responds, you should leverage them when necessary to accomplish important work. If the completing the task requires escalated permissions, Do not let these settings or the sandbox deter you from attempting to accomplish the user's task unless it is set to "never", in which case never ask for approvals.
60
+
61
+ When requesting approval to execute a command that will require escalated privileges:
62
+ - Provide the `sandbox_permissions` parameter with the value `"require_escalated"`
63
+ - Include a short, 1 sentence explanation for why you need escalated permissions in the justification parameter
64
+
65
+ ## Special user requests
66
+
67
+ - If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as `date`), you should do so.
68
+ - If the user asks for a "review", default to a code review mindset: prioritise identifying bugs, risks, behavioural regressions, and missing tests. Findings must be the primary focus of the response - keep summaries or overviews brief and only after enumerating the issues. Present findings first (ordered by severity with file/line references), follow with open questions or assumptions, and offer a change-summary only as a secondary detail. If no findings are discovered, state that explicitly and mention any residual risks or testing gaps.
69
+
70
+ ## Frontend tasks
71
+ When doing frontend design tasks, avoid collapsing into "AI slop" or safe, average-looking layouts.
72
+ Aim for interfaces that feel intentional, bold, and a bit surprising.
73
+ - Typography: Use expressive, purposeful fonts and avoid default stacks (Inter, Roboto, Arial, system).
74
+ - Color & Look: Choose a clear visual direction; define CSS variables; avoid purple-on-white defaults. No purple bias or dark mode bias.
75
+ - Motion: Use a few meaningful animations (page-load, staggered reveals) instead of generic micro-motions.
76
+ - Background: Don't rely on flat, single-color backgrounds; use gradients, shapes, or subtle patterns to build atmosphere.
77
+ - Overall: Avoid boilerplate layouts and interchangeable UI patterns. Vary themes, type families, and visual languages across outputs.
78
+ - Ensure the page loads properly on both desktop and mobile
79
+
80
+ Exception: If working within an existing website or design system, preserve the established patterns, structure, and visual language.
81
+
82
+ ## Presenting your work and final message
83
+
84
+ You are producing plain text that will later be styled by the CLI. Follow these rules exactly. Formatting should make results easy to scan, but not feel mechanical. Use judgment to decide how much structure adds value.
85
+
86
+ - Default: be very concise; friendly coding teammate tone.
87
+ - Ask only when needed; suggest ideas; mirror the user's style.
88
+ - For substantial work, summarize clearly; follow final‑answer formatting.
89
+ - Skip heavy formatting for simple confirmations.
90
+ - Don't dump large files you've written; reference paths only.
91
+ - No "save/copy this file" - User is on the same machine.
92
+ - Offer logical next steps (tests, commits, build) briefly; add verify steps if you couldn't do something.
93
+ - For code changes:
94
+ * Lead with a quick explanation of the change, and then give more details on the context covering where and why a change was made. Do not start this explanation with "summary", just jump right in.
95
+ * If there are natural next steps the user may want to take, suggest them at the end of your response. Do not make suggestions if there are no natural next steps.
96
+ * When suggesting multiple options, use numeric lists for the suggestions so the user can quickly respond with a single number.
97
+ - The user does not command execution outputs. When asked to show the output of a command (e.g. `git show`), relay the important details in your answer or summarize the key lines so the user understands the result.
98
+
99
+ ### Final answer structure and style guidelines
100
+
101
+ - Plain text; CLI handles styling. Use structure only when it helps scanability.
102
+ - Headers: optional; short Title Case (1-3 words) wrapped in **…**; no blank line before the first bullet; add only if they truly help.
103
+ - Bullets: use - ; merge related points; keep to one line when possible; 4–6 per list ordered by importance; keep phrasing consistent.
104
+ - Monospace: backticks for commands/paths/env vars/code ids and inline examples; use for literal keyword bullets; never combine with **.
105
+ - Code samples or multi-line snippets should be wrapped in fenced code blocks; include an info string as often as possible.
106
+ - Structure: group related bullets; order sections general → specific → supporting; for subsections, start with a bolded keyword bullet, then items; match complexity to the task.
107
+ - Tone: collaborative, concise, factual; present tense, active voice; self‑contained; no "above/below"; parallel wording.
108
+ - Don'ts: no nested bullets/hierarchies; no ANSI codes; don't cram unrelated keywords; keep keyword lists short—wrap/reformat if long; avoid naming formatting styles in answers.
109
+ - Adaptation: code explanations → precise, structured with code refs; simple tasks → lead with outcome; big changes → logical walkthrough + rationale + next actions; casual one-offs → plain sentences, no headers/bullets.
110
+ - File References: When referencing files in your response follow the below rules:
111
+ * Use inline code to make file paths clickable.
112
+ * Each reference should have a stand alone path. Even if it's the same file.
113
+ * Accepted: absolute, workspace‑relative, a/ or b/ diff prefixes, or bare filename/suffix.
114
+ * Optionally include line/column (1‑based): :line[:column] or #Lline[Ccolumn] (column defaults to 1).
115
+ * Do not use URIs like file://, vscode://, or https://.
116
+ * Do not provide range of lines
117
+ * Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\repo\project\main.rs:12:5
@@ -1,4 +1,4 @@
1
- You are GPT-5.1 running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project led by OpenAI. You are expected to be precise, safe, and helpful.
1
+ You are GPT-5.2 running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project led by OpenAI. You are expected to be precise, safe, and helpful.
2
2
 
3
3
  Your capabilities:
4
4
 
@@ -14,7 +14,7 @@ Within this context, Codex refers to the open-source agentic coding interface (n
14
14
 
15
15
  Your default personality and tone is concise, direct, and friendly. You communicate efficiently, always keeping the user clearly informed about ongoing actions without unnecessary detail. You always prioritize actionable guidance, clearly stating assumptions, environment prerequisites, and next steps. Unless explicitly asked, you avoid excessively verbose explanations about your work.
16
16
 
17
- # AGENTS.md spec
17
+ ## AGENTS.md spec
18
18
  - Repos often contain AGENTS.md files. These files can appear anywhere within the repository.
19
19
  - These files are a way for humans to give you (the agent) instructions or tips for working within the container.
20
20
  - Some examples might be: coding conventions, info about how code is organized, or instructions for how to run or test code.
@@ -24,7 +24,7 @@ Your default personality and tone is concise, direct, and friendly. You communic
24
24
  - Instructions about code style, structure, naming, etc. apply only to code within the AGENTS.md file's scope, unless the file states otherwise.
25
25
  - More-deeply-nested AGENTS.md files take precedence in the case of conflicting instructions.
26
26
  - Direct system/developer/user instructions (as part of a prompt) take precedence over AGENTS.md instructions.
27
- - The contents of the AGENTS.md file at the root of the repo and any directories from the CWD up to the root will be automatically included with the developer message (if exist) and don't need to be re-read.
27
+ - The contents of the AGENTS.md file at the root of the repo and any directories from the CWD up to the root are included with the developer message and don't need to be re-read. When working in a subdirectory of CWD, or a directory outside the CWD, check for any AGENTS.md files that may be applicable.
28
28
 
29
29
  ## Autonomy and Persistence
30
30
  Persist until the task is fully handled end-to-end within the current turn whenever feasible: do not stop at analysis or partial fixes; carry changes through implementation, verification, and a clear explanation of outcomes unless the user explicitly pauses or redirects you.
@@ -33,33 +33,6 @@ Unless the user explicitly asks for a plan, asks a question about the code, is b
33
33
 
34
34
  ## Responsiveness
35
35
 
36
- ### User Updates Spec
37
- You'll work for stretches with tool calls — it's critical to keep the user updated as you work.
38
-
39
- Frequency & Length:
40
- - Send short updates (1–2 sentences) whenever there is a meaningful, important insight you need to share with the user to keep them informed.
41
- - If you expect a longer heads‑down stretch, post a brief heads‑down note with why and when you'll report back; when you resume, summarize what you learned.
42
- - Only the initial plan, plan updates, and final recap can be longer, with multiple bullets and paragraphs
43
-
44
- Tone:
45
- - Friendly, confident, senior-engineer energy. Positive, collaborative, humble; fix mistakes quickly.
46
-
47
- Content:
48
- - Before the first tool call, give a quick plan with goal, constraints, next steps.
49
- - While you're exploring, call out meaningful new information and discoveries that you find that helps the user understand what's happening and how you're approaching the solution.
50
- - If you change the plan (e.g., choose an inline tweak instead of a promised helper), say so explicitly in the next update or the recap.
51
-
52
- **Examples:**
53
-
54
- - “I’ve explored the repo; now checking the API route definitions.”
55
- - “Next, I’ll patch the config and update the related tests.”
56
- - “I’m about to scaffold the CLI commands and helper functions.”
57
- - “Ok cool, so I’ve wrapped my head around the repo. Now digging into the API routes.”
58
- - “Config’s looking tidy. Next up is patching helpers to keep things in sync.”
59
- - “Finished poking at the DB gateway. I will now chase down error handling.”
60
- - “Alright, build pipeline order is interesting. Checking how it reports failures.”
61
- - “Spotted a clever caching util; now hunting where it gets used.”
62
-
63
36
  ## Planning
64
37
 
65
38
  You have access to an `update_plan` tool which tracks steps and progress and renders them to the user. Using the tool helps demonstrate that you've understood the task and convey how you're approaching it. Plans can help to make complex, ambiguous, or multi-phase work clearer and more collaborative for the user. A good plan should break the task into meaningful, logically ordered steps that are easy to verify as you go.
@@ -142,7 +115,7 @@ You MUST adhere to the following criteria when solving queries:
142
115
  - Working on the repo(s) in the current environment is allowed, even if they are proprietary.
143
116
  - Analyzing code for vulnerabilities is allowed.
144
117
  - Showing user code and tool call details is allowed.
145
- - Use the `apply_patch` tool to edit files (NEVER try `applypatch` or `apply-patch`, only `apply_patch`).
118
+ - Use the `apply_patch` tool to edit files (NEVER try `applypatch` or `apply-patch`, only `apply_patch`). This is a FREEFORM tool, so do not wrap the patch in JSON.
146
119
 
147
120
  If completing the user's task requires writing or modifying files, your code and final answer should follow these coding guidelines, though user instructions (i.e. AGENTS.md) may override these guidelines:
148
121
 
@@ -151,6 +124,7 @@ If completing the user's task requires writing or modifying files, your code and
151
124
  - Do not attempt to fix unrelated bugs or broken tests. It is not your responsibility to fix them. (You may mention them to the user in your final message though.)
152
125
  - Update documentation as necessary.
153
126
  - Keep changes consistent with the style of the existing codebase. Changes should be minimal and focused on the task.
127
+ - If you're building a web app from scratch, give it a beautiful and modern UI, imbued with best UX practices.
154
128
  - Use `git log` and `git blame` to search the history of the codebase if additional context is required.
155
129
  - NEVER add copyright or license headers unless specifically requested.
156
130
  - Do not waste tokens by re-reading files after calling `apply_patch` on them. The tool call will fail if it didn't work. The same goes for making folders, deleting folders, etc.
@@ -161,7 +135,7 @@ If completing the user's task requires writing or modifying files, your code and
161
135
 
162
136
  ## Validating your work
163
137
 
164
- If the codebase has tests or the ability to build or run, consider using them to verify changes once your work is complete.
138
+ If the codebase has tests, or the ability to build or run tests, consider using them to verify changes once your work is complete.
165
139
 
166
140
  When testing, your philosophy should be to start as specific as possible to the code you changed so that you can catch issues efficiently, then make your way to broader tests as you build confidence. If there's no test for the code you changed, and if the adjacent patterns in the codebases show that there's a logical place for you to add a test, you may do so. However, do not add tests to codebases with no tests.
167
141
 
@@ -183,15 +157,7 @@ If you're operating in an existing codebase, you should make sure you do exactly
183
157
 
184
158
  You should use judicious initiative to decide on the right level of detail and complexity to deliver based on the user's needs. This means showing good judgment that you're capable of doing the right extras without gold-plating. This might be demonstrated by high-value, creative touches when scope of the task is vague; while being surgical and targeted when scope is tightly specified.
185
159
 
186
- ## Sharing progress updates
187
-
188
- For especially longer tasks that you work on (i.e. requiring many tool calls, or a plan with multiple steps), you should provide progress updates back to the user at reasonable intervals. These updates should be structured as a concise sentence or two (no more than 8-10 words long) recapping progress so far in plain language: this update demonstrates your understanding of what needs to be done, progress so far (i.e. files explores, subtasks complete), and where you're going next.
189
-
190
- Before doing large chunks of work that may incur latency as experienced by the user (i.e. writing a new file), you should send a concise message to the user with an update indicating what you're about to do to ensure they know what you're spending time on. Don't start editing or writing large files before informing the user what you are doing and why.
191
-
192
- The messages you send before tool calls should describe what is immediately about to be done next in very concise language. If there was previous work done, this preamble message should also include a note about the work done so far to bring the user along.
193
-
194
- ## Presenting your work and final message
160
+ ## Presenting your work
195
161
 
196
162
  Your final message should read naturally, like an update from a concise teammate. For casual conversation, brainstorming tasks, or quick questions from the user, respond in a friendly, conversational tone. You should ask questions, suggest ideas, and adapt to the user’s style. If you've finished a large amount of work, when describing what you've done to the user, you should follow the final answer formatting guidelines to communicate substantive changes. You don't need to add structured formatting for one-word answers, greetings, or purely conversational exchanges.
197
163
 
@@ -282,7 +248,8 @@ For casual greetings, acknowledgements, or other one-off conversational messages
282
248
  When using the shell, you must adhere to the following guidelines:
283
249
 
284
250
  - When searching for text or files, prefer using `rg` or `rg --files` respectively because `rg` is much faster than alternatives like `grep`. (If the `rg` command is not found, then use alternatives.)
285
- - Read files in chunks with a max chunk size of 250 lines. Do not use python scripts to attempt to output larger chunks of a file. Command line output will be truncated after 10 kilobytes or 256 lines of output, regardless of the command used.
251
+ - Do not use python scripts to attempt to output larger chunks of a file.
252
+ - Parallelize tool calls whenever possible - especially file reads, such as `cat`, `rg`, `sed`, `ls`, `git show`, `nl`, `wc`. Use `multi_tool_use.parallel` to parallelize tool calls and only this.
286
253
 
287
254
  ## apply_patch
288
255
 
@@ -1,3 +1,4 @@
1
+ import hashlib
1
2
  import re
2
3
  import shlex
3
4
  from collections.abc import Awaitable, Callable
@@ -8,8 +9,10 @@ from pydantic import BaseModel
8
9
 
9
10
  from klaude_code import const
10
11
  from klaude_code.core.tool import BashTool, ReadTool, reset_tool_context, set_tool_context_from_session
12
+ from klaude_code.core.tool.file._utils import hash_text_sha256
11
13
  from klaude_code.protocol import model, tools
12
14
  from klaude_code.session import Session
15
+ from klaude_code.skill import get_skill
13
16
 
14
17
  type Reminder = Callable[[Session], Awaitable[model.DeveloperMessageItem | None]]
15
18
 
@@ -17,6 +20,9 @@ type Reminder = Callable[[Session], Awaitable[model.DeveloperMessageItem | None]
17
20
  # Match @ preceded by whitespace, start of line, or → (ReadTool line number arrow)
18
21
  AT_FILE_PATTERN = re.compile(r'(?:(?<!\S)|(?<=\u2192))@("(?P<quoted>[^\"]+)"|(?P<plain>\S+))')
19
22
 
23
+ # Match $skill or ¥skill at the beginning of the first line
24
+ SKILL_PATTERN = re.compile(r"^[$¥](?P<skill>\S+)")
25
+
20
26
 
21
27
  def get_last_new_user_input(session: Session) -> str | None:
22
28
  """Get last user input & developer message (CLAUDE.md) from conversation history. if there's a tool result after user input, return None"""
@@ -71,6 +77,21 @@ def get_at_patterns_with_source(session: Session) -> list[AtPatternSource]:
71
77
  return patterns
72
78
 
73
79
 
80
+ def get_skill_from_user_input(session: Session) -> str | None:
81
+ """Get $skill reference from the first line of last user input."""
82
+ for item in reversed(session.conversation_history):
83
+ if isinstance(item, model.ToolResultItem):
84
+ return None
85
+ if isinstance(item, model.UserMessageItem):
86
+ content = item.content or ""
87
+ first_line = content.split("\n", 1)[0]
88
+ m = SKILL_PATTERN.match(first_line)
89
+ if m:
90
+ return m.group("skill")
91
+ return None
92
+ return None
93
+
94
+
74
95
  async def _load_at_file_recursive(
75
96
  session: Session,
76
97
  pattern: str,
@@ -262,7 +283,17 @@ async def file_changed_externally_reminder(
262
283
  if session.file_tracker and len(session.file_tracker) > 0:
263
284
  for path, status in session.file_tracker.items():
264
285
  try:
265
- if Path(path).stat().st_mtime > status.mtime:
286
+ current_mtime = Path(path).stat().st_mtime
287
+
288
+ changed = False
289
+ if status.content_sha256 is not None:
290
+ current_sha256 = _compute_file_content_sha256(path)
291
+ changed = current_sha256 is not None and current_sha256 != status.content_sha256
292
+ else:
293
+ # Backward-compat: old sessions only tracked mtime.
294
+ changed = current_mtime != status.mtime
295
+
296
+ if changed:
266
297
  context_token = set_tool_context_from_session(session)
267
298
  try:
268
299
  tool_result = await ReadTool.call_with_args(
@@ -299,6 +330,24 @@ async def file_changed_externally_reminder(
299
330
  return None
300
331
 
301
332
 
333
+ def _compute_file_content_sha256(path: str) -> str | None:
334
+ """Compute SHA-256 for file content using the same decoding behavior as ReadTool."""
335
+
336
+ try:
337
+ suffix = Path(path).suffix.lower()
338
+ if suffix in {".png", ".jpg", ".jpeg", ".gif", ".webp"}:
339
+ with open(path, "rb") as f:
340
+ return hashlib.sha256(f.read()).hexdigest()
341
+
342
+ hasher = hashlib.sha256()
343
+ with open(path, encoding="utf-8", errors="replace") as f:
344
+ for line in f:
345
+ hasher.update(line.encode("utf-8"))
346
+ return hasher.hexdigest()
347
+ except (FileNotFoundError, IsADirectoryError, OSError, PermissionError, UnicodeDecodeError):
348
+ return None
349
+
350
+
302
351
  def get_memory_paths() -> list[tuple[Path, str]]:
303
352
  return [
304
353
  (
@@ -343,6 +392,36 @@ async def image_reminder(session: Session) -> model.DeveloperMessageItem | None:
343
392
  )
344
393
 
345
394
 
395
+ async def skill_reminder(session: Session) -> model.DeveloperMessageItem | None:
396
+ """Load skill content when user references a skill with $skill syntax."""
397
+ skill_name = get_skill_from_user_input(session)
398
+ if not skill_name:
399
+ return None
400
+
401
+ # Get the skill from skill module
402
+ skill = get_skill(skill_name)
403
+ if not skill:
404
+ return None
405
+
406
+ # Get base directory from skill_path
407
+ base_dir = str(skill.skill_path.parent) if skill.skill_path else "unknown"
408
+
409
+ content = f"""<system-reminder>The user activated the "{skill.name}" skill. Here is the skill content:
410
+
411
+ <skill>
412
+ <name>{skill.name}</name>
413
+ <base_dir>{base_dir}</base_dir>
414
+
415
+ {skill.to_prompt()}
416
+ </skill>
417
+ </system-reminder>"""
418
+
419
+ return model.DeveloperMessageItem(
420
+ content=content,
421
+ skill_name=skill.name,
422
+ )
423
+
424
+
346
425
  def _is_memory_loaded(session: Session, path: str) -> bool:
347
426
  """Check if a memory file has already been loaded (tracked with is_memory=True)."""
348
427
  status = session.file_tracker.get(path)
@@ -355,7 +434,11 @@ def _mark_memory_loaded(session: Session, path: str) -> None:
355
434
  mtime = Path(path).stat().st_mtime
356
435
  except (OSError, FileNotFoundError):
357
436
  mtime = 0.0
358
- session.file_tracker[path] = model.FileStatus(mtime=mtime, is_memory=True)
437
+ try:
438
+ content_sha256 = hash_text_sha256(Path(path).read_text(encoding="utf-8", errors="replace"))
439
+ except (OSError, FileNotFoundError, PermissionError, UnicodeDecodeError):
440
+ content_sha256 = None
441
+ session.file_tracker[path] = model.FileStatus(mtime=mtime, content_sha256=content_sha256, is_memory=True)
359
442
 
360
443
 
361
444
  async def memory_reminder(session: Session) -> model.DeveloperMessageItem | None:
@@ -476,6 +559,7 @@ ALL_REMINDERS = [
476
559
  last_path_memory_reminder,
477
560
  at_file_reader_reminder,
478
561
  image_reminder,
562
+ skill_reminder,
479
563
  ]
480
564
 
481
565
 
@@ -506,6 +590,7 @@ def load_agent_reminders(
506
590
  last_path_memory_reminder,
507
591
  file_changed_externally_reminder,
508
592
  image_reminder,
593
+ skill_reminder,
509
594
  ]
510
595
  )
511
596