code-puppy-core-plugins 0.0.2__py3-none-any.whl
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.
- code_puppy_core_plugins/__init__.py +5 -0
- code_puppy_core_plugins/acp/README.md +266 -0
- code_puppy_core_plugins/acp/__init__.py +8 -0
- code_puppy_core_plugins/acp/agent.py +494 -0
- code_puppy_core_plugins/acp/bridge.py +309 -0
- code_puppy_core_plugins/acp/capabilities.py +73 -0
- code_puppy_core_plugins/acp/commands.py +116 -0
- code_puppy_core_plugins/acp/content.py +115 -0
- code_puppy_core_plugins/acp/io_delegation.py +231 -0
- code_puppy_core_plugins/acp/mcp_config.py +66 -0
- code_puppy_core_plugins/acp/permissions.py +159 -0
- code_puppy_core_plugins/acp/persistence.py +197 -0
- code_puppy_core_plugins/acp/register_callbacks.py +110 -0
- code_puppy_core_plugins/acp/replay.py +114 -0
- code_puppy_core_plugins/acp/session.py +329 -0
- code_puppy_core_plugins/acp/session_config.py +179 -0
- code_puppy_core_plugins/acp/state.py +135 -0
- code_puppy_core_plugins/agent_skills/__init__.py +22 -0
- code_puppy_core_plugins/agent_skills/config.py +208 -0
- code_puppy_core_plugins/agent_skills/discovery.py +337 -0
- code_puppy_core_plugins/agent_skills/downloader.py +392 -0
- code_puppy_core_plugins/agent_skills/enabled_skills.py +82 -0
- code_puppy_core_plugins/agent_skills/installer.py +22 -0
- code_puppy_core_plugins/agent_skills/metadata.py +219 -0
- code_puppy_core_plugins/agent_skills/prompt_builder.py +49 -0
- code_puppy_core_plugins/agent_skills/provider.py +52 -0
- code_puppy_core_plugins/agent_skills/register_callbacks.py +309 -0
- code_puppy_core_plugins/agent_skills/remote_catalog.py +322 -0
- code_puppy_core_plugins/agent_skills/skill_catalog.py +257 -0
- code_puppy_core_plugins/agent_skills/skill_commands.py +102 -0
- code_puppy_core_plugins/agent_skills/skills_install_menu.py +698 -0
- code_puppy_core_plugins/agent_skills/skills_menu.py +794 -0
- code_puppy_core_plugins/aws_bedrock/__init__.py +14 -0
- code_puppy_core_plugins/aws_bedrock/config.py +101 -0
- code_puppy_core_plugins/aws_bedrock/register_callbacks.py +243 -0
- code_puppy_core_plugins/aws_bedrock/utils.py +186 -0
- code_puppy_core_plugins/azure_foundry/README.md +238 -0
- code_puppy_core_plugins/azure_foundry/__init__.py +15 -0
- code_puppy_core_plugins/azure_foundry/config.py +126 -0
- code_puppy_core_plugins/azure_foundry/discovery.py +189 -0
- code_puppy_core_plugins/azure_foundry/register_callbacks.py +506 -0
- code_puppy_core_plugins/azure_foundry/token.py +182 -0
- code_puppy_core_plugins/azure_foundry/utils.py +375 -0
- code_puppy_core_plugins/btw/__init__.py +1 -0
- code_puppy_core_plugins/btw/inline_view.py +135 -0
- code_puppy_core_plugins/btw/register_callbacks.py +106 -0
- code_puppy_core_plugins/btw/side_query.py +91 -0
- code_puppy_core_plugins/chatgpt_oauth/IMAGEGEN_SKILL.md +83 -0
- code_puppy_core_plugins/chatgpt_oauth/__init__.py +8 -0
- code_puppy_core_plugins/chatgpt_oauth/config.py +52 -0
- code_puppy_core_plugins/chatgpt_oauth/image_generation.py +253 -0
- code_puppy_core_plugins/chatgpt_oauth/image_tool.py +70 -0
- code_puppy_core_plugins/chatgpt_oauth/oauth_flow.py +461 -0
- code_puppy_core_plugins/chatgpt_oauth/register_callbacks.py +288 -0
- code_puppy_core_plugins/chatgpt_oauth/test_plugin.py +663 -0
- code_puppy_core_plugins/chatgpt_oauth/usage.py +113 -0
- code_puppy_core_plugins/chatgpt_oauth/utils.py +534 -0
- code_puppy_core_plugins/claude_code_hooks/__init__.py +1 -0
- code_puppy_core_plugins/claude_code_hooks/config.py +137 -0
- code_puppy_core_plugins/claude_code_hooks/register_callbacks.py +383 -0
- code_puppy_core_plugins/claude_code_oauth/README.md +167 -0
- code_puppy_core_plugins/claude_code_oauth/SETUP.md +93 -0
- code_puppy_core_plugins/claude_code_oauth/__init__.py +25 -0
- code_puppy_core_plugins/claude_code_oauth/config.py +59 -0
- code_puppy_core_plugins/claude_code_oauth/fast_mode.py +122 -0
- code_puppy_core_plugins/claude_code_oauth/prompt_handler.py +64 -0
- code_puppy_core_plugins/claude_code_oauth/register_callbacks.py +719 -0
- code_puppy_core_plugins/claude_code_oauth/test_plugin.py +285 -0
- code_puppy_core_plugins/claude_code_oauth/token_refresh_heartbeat.py +240 -0
- code_puppy_core_plugins/claude_code_oauth/utils.py +663 -0
- code_puppy_core_plugins/code_puppy_agent/AGENTS_AND_TOOLS.md +155 -0
- code_puppy_core_plugins/code_puppy_agent/MODELS_AND_MCP.md +104 -0
- code_puppy_core_plugins/code_puppy_agent/PLUGINS_AND_CALLBACKS.md +147 -0
- code_puppy_core_plugins/code_puppy_agent/SESSIONS_AND_HISTORY.md +39 -0
- code_puppy_core_plugins/code_puppy_agent/SKILL.md +180 -0
- code_puppy_core_plugins/code_puppy_agent/SKILLS_SYSTEM.md +136 -0
- code_puppy_core_plugins/code_puppy_agent/SYSTEM_PROMPT_CONFIG_AND_I18N.md +160 -0
- code_puppy_core_plugins/code_puppy_agent/__init__.py +5 -0
- code_puppy_core_plugins/code_puppy_agent/register_callbacks.py +46 -0
- code_puppy_core_plugins/computer_use/NativeCapture.swift +123 -0
- code_puppy_core_plugins/computer_use/README.md +109 -0
- code_puppy_core_plugins/computer_use/__init__.py +1 -0
- code_puppy_core_plugins/computer_use/accessibility.py +163 -0
- code_puppy_core_plugins/computer_use/activation.py +75 -0
- code_puppy_core_plugins/computer_use/backend.py +584 -0
- code_puppy_core_plugins/computer_use/backend_types.py +5 -0
- code_puppy_core_plugins/computer_use/capture.py +110 -0
- code_puppy_core_plugins/computer_use/commands.py +62 -0
- code_puppy_core_plugins/computer_use/geometry.py +81 -0
- code_puppy_core_plugins/computer_use/inline_image.py +56 -0
- code_puppy_core_plugins/computer_use/keycodes.py +47 -0
- code_puppy_core_plugins/computer_use/policy.py +144 -0
- code_puppy_core_plugins/computer_use/register_callbacks.py +96 -0
- code_puppy_core_plugins/computer_use/safety.py +18 -0
- code_puppy_core_plugins/computer_use/settle.py +64 -0
- code_puppy_core_plugins/computer_use/state.py +86 -0
- code_puppy_core_plugins/computer_use/tools.py +469 -0
- code_puppy_core_plugins/context_indicator/__init__.py +14 -0
- code_puppy_core_plugins/context_indicator/register_callbacks.py +249 -0
- code_puppy_core_plugins/context_indicator/usage.py +40 -0
- code_puppy_core_plugins/copilot_auth/__init__.py +11 -0
- code_puppy_core_plugins/copilot_auth/config.py +93 -0
- code_puppy_core_plugins/copilot_auth/reasoning_client.py +409 -0
- code_puppy_core_plugins/copilot_auth/register_callbacks.py +460 -0
- code_puppy_core_plugins/copilot_auth/utils.py +587 -0
- code_puppy_core_plugins/customizable_commands/__init__.py +0 -0
- code_puppy_core_plugins/customizable_commands/register_callbacks.py +464 -0
- code_puppy_core_plugins/dbos_durable_exec/__init__.py +1 -0
- code_puppy_core_plugins/dbos_durable_exec/cancel.py +15 -0
- code_puppy_core_plugins/dbos_durable_exec/commands.py +31 -0
- code_puppy_core_plugins/dbos_durable_exec/config.py +31 -0
- code_puppy_core_plugins/dbos_durable_exec/lifecycle.py +83 -0
- code_puppy_core_plugins/dbos_durable_exec/register_callbacks.py +45 -0
- code_puppy_core_plugins/dbos_durable_exec/runtime.py +65 -0
- code_puppy_core_plugins/dbos_durable_exec/startup_lock.py +155 -0
- code_puppy_core_plugins/dbos_durable_exec/workflow_ids.py +16 -0
- code_puppy_core_plugins/dbos_durable_exec/wrapper.py +58 -0
- code_puppy_core_plugins/destructive_command_guard/AGENTS.md +79 -0
- code_puppy_core_plugins/destructive_command_guard/__init__.py +14 -0
- code_puppy_core_plugins/destructive_command_guard/detector.py +374 -0
- code_puppy_core_plugins/destructive_command_guard/register_callbacks.py +165 -0
- code_puppy_core_plugins/emoji_filter/__init__.py +12 -0
- code_puppy_core_plugins/emoji_filter/config.py +26 -0
- code_puppy_core_plugins/emoji_filter/register_callbacks.py +238 -0
- code_puppy_core_plugins/emoji_filter/stripper.py +45 -0
- code_puppy_core_plugins/empty_html_comment_filter/register_callbacks.py +116 -0
- code_puppy_core_plugins/example_custom_command/README.md +328 -0
- code_puppy_core_plugins/example_custom_command/register_callbacks.py +66 -0
- code_puppy_core_plugins/file_permission_handler/__init__.py +4 -0
- code_puppy_core_plugins/file_permission_handler/register_callbacks.py +575 -0
- code_puppy_core_plugins/flux_bootstrap/__init__.py +5 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/_docs/README.md +173 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/_docs/cheatsheet.md +86 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/_docs/pipeline.md +167 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/_docs/synopsis.md +392 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/about.md +51 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/address-feedback.md +129 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/ask.md +211 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/aug.md +181 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/auto-pilot.md +71 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/cheatsheet.md +16 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/commit.md +103 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/config.md +108 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/create-pr.md +195 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/exec.md +221 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/new.md +151 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/qa.md +208 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/rebase.md +180 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/review.md +304 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/split.md +120 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/squash-commits.md +179 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/status.md +46 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/tests.md +155 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/scripts/flux_about.py +154 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/scripts/flux_cheatsheet.py +248 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/scripts/flux_status.py +345 -0
- code_puppy_core_plugins/flux_bootstrap/installer.py +256 -0
- code_puppy_core_plugins/flux_bootstrap/register_callbacks.py +71 -0
- code_puppy_core_plugins/force_push_guard/__init__.py +5 -0
- code_puppy_core_plugins/force_push_guard/detector.py +96 -0
- code_puppy_core_plugins/force_push_guard/register_callbacks.py +161 -0
- code_puppy_core_plugins/fork/__init__.py +7 -0
- code_puppy_core_plugins/fork/register_callbacks.py +445 -0
- code_puppy_core_plugins/frontend_emitter/__init__.py +25 -0
- code_puppy_core_plugins/frontend_emitter/emitter.py +249 -0
- code_puppy_core_plugins/frontend_emitter/register_callbacks.py +412 -0
- code_puppy_core_plugins/frontend_emitter/session_context.py +50 -0
- code_puppy_core_plugins/grok_oauth/__init__.py +6 -0
- code_puppy_core_plugins/grok_oauth/config.py +49 -0
- code_puppy_core_plugins/grok_oauth/oauth_flow.py +213 -0
- code_puppy_core_plugins/grok_oauth/register_callbacks.py +132 -0
- code_puppy_core_plugins/grok_oauth/utils.py +195 -0
- code_puppy_core_plugins/herdr/README.md +168 -0
- code_puppy_core_plugins/herdr/__init__.py +9 -0
- code_puppy_core_plugins/herdr/client.py +339 -0
- code_puppy_core_plugins/herdr/register_callbacks.py +140 -0
- code_puppy_core_plugins/herdr/reporter.py +212 -0
- code_puppy_core_plugins/herdr/smoke.py +143 -0
- code_puppy_core_plugins/herdr/sources.py +133 -0
- code_puppy_core_plugins/hook_creator/__init__.py +1 -0
- code_puppy_core_plugins/hook_creator/register_callbacks.py +33 -0
- code_puppy_core_plugins/hook_manager/__init__.py +1 -0
- code_puppy_core_plugins/hook_manager/config.py +290 -0
- code_puppy_core_plugins/hook_manager/hooks_menu.py +571 -0
- code_puppy_core_plugins/hook_manager/register_callbacks.py +227 -0
- code_puppy_core_plugins/meta_oauth/__init__.py +1 -0
- code_puppy_core_plugins/meta_oauth/config.py +55 -0
- code_puppy_core_plugins/meta_oauth/oauth_flow.py +109 -0
- code_puppy_core_plugins/meta_oauth/register_callbacks.py +154 -0
- code_puppy_core_plugins/meta_oauth/utils.py +252 -0
- code_puppy_core_plugins/namespace_skill_search/README.md +118 -0
- code_puppy_core_plugins/namespace_skill_search/__init__.py +15 -0
- code_puppy_core_plugins/namespace_skill_search/namespaces.py +125 -0
- code_puppy_core_plugins/namespace_skill_search/register_callbacks.py +99 -0
- code_puppy_core_plugins/namespace_skill_search/search_tool.py +158 -0
- code_puppy_core_plugins/no_tools/__init__.py +0 -0
- code_puppy_core_plugins/no_tools/register_callbacks.py +42 -0
- code_puppy_core_plugins/oauth_pasteback.py +110 -0
- code_puppy_core_plugins/oauth_puppy_html.py +194 -0
- code_puppy_core_plugins/obsidian_agent/README.md +52 -0
- code_puppy_core_plugins/obsidian_agent/__init__.py +8 -0
- code_puppy_core_plugins/obsidian_agent/agent_obsidian.py +147 -0
- code_puppy_core_plugins/obsidian_agent/register_callbacks.py +13 -0
- code_puppy_core_plugins/ollama/__init__.py +1 -0
- code_puppy_core_plugins/ollama/register_callbacks.py +127 -0
- code_puppy_core_plugins/ollama_setup/__init__.py +5 -0
- code_puppy_core_plugins/ollama_setup/completer.py +38 -0
- code_puppy_core_plugins/ollama_setup/register_callbacks.py +419 -0
- code_puppy_core_plugins/plugin_list/__init__.py +0 -0
- code_puppy_core_plugins/plugin_list/plugin_contributions.py +348 -0
- code_puppy_core_plugins/plugin_list/plugin_meta.py +67 -0
- code_puppy_core_plugins/plugin_list/plugin_text_utils.py +173 -0
- code_puppy_core_plugins/plugin_list/plugins_menu.py +455 -0
- code_puppy_core_plugins/plugin_list/plugins_menu_layout.py +194 -0
- code_puppy_core_plugins/plugin_list/plugins_menu_render.py +431 -0
- code_puppy_core_plugins/plugin_list/project_trust_flow.py +162 -0
- code_puppy_core_plugins/plugin_list/register_callbacks.py +281 -0
- code_puppy_core_plugins/pop_command/__init__.py +1 -0
- code_puppy_core_plugins/pop_command/register_callbacks.py +191 -0
- code_puppy_core_plugins/prompt_newline/__init__.py +13 -0
- code_puppy_core_plugins/prompt_newline/config.py +21 -0
- code_puppy_core_plugins/prompt_newline/register_callbacks.py +163 -0
- code_puppy_core_plugins/prune/__init__.py +1 -0
- code_puppy_core_plugins/prune/prune_menu.py +308 -0
- code_puppy_core_plugins/prune/prune_model.py +517 -0
- code_puppy_core_plugins/prune/prune_render.py +354 -0
- code_puppy_core_plugins/prune/register_callbacks.py +388 -0
- code_puppy_core_plugins/puppy_kennel/README.md +203 -0
- code_puppy_core_plugins/puppy_kennel/__init__.py +6 -0
- code_puppy_core_plugins/puppy_kennel/commands.py +206 -0
- code_puppy_core_plugins/puppy_kennel/config.py +36 -0
- code_puppy_core_plugins/puppy_kennel/kennel.py +368 -0
- code_puppy_core_plugins/puppy_kennel/packer.py +152 -0
- code_puppy_core_plugins/puppy_kennel/recorder.py +83 -0
- code_puppy_core_plugins/puppy_kennel/register_callbacks.py +109 -0
- code_puppy_core_plugins/puppy_kennel/retriever.py +28 -0
- code_puppy_core_plugins/puppy_kennel/schema.py +78 -0
- code_puppy_core_plugins/puppy_kennel/state.py +68 -0
- code_puppy_core_plugins/puppy_kennel/tools.py +449 -0
- code_puppy_core_plugins/puppy_kennel/wings.py +110 -0
- code_puppy_core_plugins/puppy_spinner/README.md +93 -0
- code_puppy_core_plugins/puppy_spinner/__init__.py +11 -0
- code_puppy_core_plugins/puppy_spinner/builtin_frames.py +172 -0
- code_puppy_core_plugins/puppy_spinner/commands.py +116 -0
- code_puppy_core_plugins/puppy_spinner/picker.py +379 -0
- code_puppy_core_plugins/puppy_spinner/register_callbacks.py +193 -0
- code_puppy_core_plugins/puppy_spinner/spinners.py +444 -0
- code_puppy_core_plugins/quick_resume/__init__.py +0 -0
- code_puppy_core_plugins/quick_resume/register_callbacks.py +77 -0
- code_puppy_core_plugins/review_pr/__init__.py +1 -0
- code_puppy_core_plugins/review_pr/register_callbacks.py +162 -0
- code_puppy_core_plugins/shell_safety/__init__.py +6 -0
- code_puppy_core_plugins/shell_safety/agent_shell_safety.py +69 -0
- code_puppy_core_plugins/shell_safety/command_cache.py +156 -0
- code_puppy_core_plugins/shell_safety/register_callbacks.py +203 -0
- code_puppy_core_plugins/stack_dump/__init__.py +1 -0
- code_puppy_core_plugins/stack_dump/register_callbacks.py +79 -0
- code_puppy_core_plugins/statusline/__init__.py +14 -0
- code_puppy_core_plugins/statusline/config.py +68 -0
- code_puppy_core_plugins/statusline/payload.py +138 -0
- code_puppy_core_plugins/statusline/prompt_patch.py +76 -0
- code_puppy_core_plugins/statusline/register_callbacks.py +45 -0
- code_puppy_core_plugins/statusline/runner.py +122 -0
- code_puppy_core_plugins/statusline/statusline_command.py +197 -0
- code_puppy_core_plugins/steer_queue/__init__.py +10 -0
- code_puppy_core_plugins/steer_queue/queue_menu.py +444 -0
- code_puppy_core_plugins/steer_queue/register_callbacks.py +138 -0
- code_puppy_core_plugins/subagent_panel/README.md +102 -0
- code_puppy_core_plugins/subagent_panel/__init__.py +24 -0
- code_puppy_core_plugins/subagent_panel/coalesce_patch.py +242 -0
- code_puppy_core_plugins/subagent_panel/panel_render.py +145 -0
- code_puppy_core_plugins/subagent_panel/register_callbacks.py +535 -0
- code_puppy_core_plugins/subagent_panel/resume_repaint.py +112 -0
- code_puppy_core_plugins/subagent_panel/state.py +231 -0
- code_puppy_core_plugins/switch_agent_resume/__init__.py +5 -0
- code_puppy_core_plugins/switch_agent_resume/register_callbacks.py +314 -0
- code_puppy_core_plugins/theme/README.md +86 -0
- code_puppy_core_plugins/theme/__init__.py +14 -0
- code_puppy_core_plugins/theme/bundled_palettes.py +346 -0
- code_puppy_core_plugins/theme/content_styles.py +146 -0
- code_puppy_core_plugins/theme/osc_palette.py +178 -0
- code_puppy_core_plugins/theme/picker.py +358 -0
- code_puppy_core_plugins/theme/prompt_toolkit_theme.py +113 -0
- code_puppy_core_plugins/theme/register_callbacks.py +348 -0
- code_puppy_core_plugins/theme/rich_themes.py +202 -0
- code_puppy_core_plugins/theme/themes.py +720 -0
- code_puppy_core_plugins/timestamp_heartbeat/__init__.py +1 -0
- code_puppy_core_plugins/timestamp_heartbeat/register_callbacks.py +114 -0
- code_puppy_core_plugins/token_ratio_learner/__init__.py +5 -0
- code_puppy_core_plugins/token_ratio_learner/ratios.py +208 -0
- code_puppy_core_plugins/token_ratio_learner/register_callbacks.py +213 -0
- code_puppy_core_plugins/universal_constructor/__init__.py +13 -0
- code_puppy_core_plugins/universal_constructor/models.py +138 -0
- code_puppy_core_plugins/universal_constructor/provider.py +62 -0
- code_puppy_core_plugins/universal_constructor/register_callbacks.py +75 -0
- code_puppy_core_plugins/universal_constructor/registry.py +302 -0
- code_puppy_core_plugins/universal_constructor/sandbox.py +584 -0
- code_puppy_core_plugins/wide_completion_menu/__init__.py +6 -0
- code_puppy_core_plugins/wide_completion_menu/register_callbacks.py +165 -0
- code_puppy_core_plugins/wiggum/__init__.py +1 -0
- code_puppy_core_plugins/wiggum/goal_runs.py +91 -0
- code_puppy_core_plugins/wiggum/judge.py +299 -0
- code_puppy_core_plugins/wiggum/judge_config.py +249 -0
- code_puppy_core_plugins/wiggum/judges_menu.py +814 -0
- code_puppy_core_plugins/wiggum/register_callbacks.py +569 -0
- code_puppy_core_plugins/wiggum/state.py +89 -0
- code_puppy_core_plugins/yolo_cli/__init__.py +1 -0
- code_puppy_core_plugins/yolo_cli/register_callbacks.py +41 -0
- code_puppy_core_plugins-0.0.2.dist-info/METADATA +64 -0
- code_puppy_core_plugins-0.0.2.dist-info/RECORD +313 -0
- code_puppy_core_plugins-0.0.2.dist-info/WHEEL +4 -0
- code_puppy_core_plugins-0.0.2.dist-info/entry_points.txt +55 -0
- code_puppy_core_plugins-0.0.2.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Claude Code OAuth Plugin Setup Guide
|
|
2
|
+
|
|
3
|
+
This guide walks you through using the Claude Code OAuth plugin inside Code Puppy.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
1. Ensure the plugin files live under `code_puppy/plugins/claude_code_oauth/`
|
|
8
|
+
2. Restart Code Puppy so it loads the plugin
|
|
9
|
+
3. Run `/claude-code-auth` and follow the prompts
|
|
10
|
+
|
|
11
|
+
## Why No Client Registration?
|
|
12
|
+
|
|
13
|
+
Anthropic exposes a shared **public client** (`claude-cli`) for command-line tools. That means:
|
|
14
|
+
- No client secret is needed
|
|
15
|
+
- Everyone authenticates through Claude Console
|
|
16
|
+
- Security is enforced with PKCE and per-user tokens
|
|
17
|
+
|
|
18
|
+
## Authentication Flow
|
|
19
|
+
|
|
20
|
+
1. Call `/claude-code-auth`
|
|
21
|
+
2. Your browser opens the Claude OAuth consent flow at `https://claude.ai/oauth/authorize`
|
|
22
|
+
3. Sign in (or pick an account) and approve the "Claude CLI" access request
|
|
23
|
+
4. The browser closes automatically after the redirect is captured
|
|
24
|
+
5. Tokens are stored locally at `~/.code_puppy/claude_code_oauth.json`
|
|
25
|
+
6. Available Claude Code models are fetched and added to `extra_models.json`
|
|
26
|
+
|
|
27
|
+
## Commands Recap
|
|
28
|
+
|
|
29
|
+
- `/claude-code-auth` – Authenticate and sync models
|
|
30
|
+
- `/claude-code-status` – Show auth status, expiry, configured models
|
|
31
|
+
- `/claude-code-logout` – Remove tokens and any models added by the plugin
|
|
32
|
+
|
|
33
|
+
## Configuration Defaults
|
|
34
|
+
|
|
35
|
+
`config.py` ships with values aligned to llxprt-code:
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
CLAUDE_CODE_OAUTH_CONFIG = {
|
|
39
|
+
"auth_url": "https://claude.ai/oauth/authorize",
|
|
40
|
+
"token_url": "https://console.anthropic.com/v1/oauth/token",
|
|
41
|
+
"api_base_url": "https://api.anthropic.com",
|
|
42
|
+
"client_id": "9d1c250a-e61b-44d9-88ed-5944d1962f5e",
|
|
43
|
+
"scope": "org:create_api_key user:profile user:inference",
|
|
44
|
+
"redirect_host": "http://localhost",
|
|
45
|
+
"redirect_path": "callback",
|
|
46
|
+
"callback_port_range": (8765, 8795),
|
|
47
|
+
"callback_timeout": 180,
|
|
48
|
+
"prefix": "claude-code-",
|
|
49
|
+
"default_context_length": 200000,
|
|
50
|
+
"api_key_env_var": "CLAUDE_CODE_ACCESS_TOKEN",
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Change these only if Anthropic updates their endpoints or scopes.
|
|
55
|
+
|
|
56
|
+
## After Authentication
|
|
57
|
+
|
|
58
|
+
- Models appear in `~/.code_puppy/extra_models.json` with the `claude-code-` prefix
|
|
59
|
+
- The environment variable `CLAUDE_CODE_ACCESS_TOKEN` is used by those models
|
|
60
|
+
- `/claude-code-status` shows token expiry when the API provides it
|
|
61
|
+
|
|
62
|
+
## Troubleshooting Tips
|
|
63
|
+
|
|
64
|
+
- **Browser did not open** – Copy the displayed URL into your browser manually
|
|
65
|
+
- **Invalid code** – The code expires quickly; generate a new one in Claude Console
|
|
66
|
+
- **State mismatch** – Rare, but rerun `/claude-code-auth` if the browser reports a mismatch
|
|
67
|
+
- **No models added** – Your account might lack Claude Code access; tokens are still stored for later use
|
|
68
|
+
|
|
69
|
+
## Files Created
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
~/.code_puppy/
|
|
73
|
+
├── claude_code_oauth.json # OAuth tokens (0600 permissions)
|
|
74
|
+
└── extra_models.json # Extended model registry
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Manual Testing
|
|
78
|
+
|
|
79
|
+
Run the helper script for sanity checks:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
python code_puppy/plugins/claude_code_oauth/test_plugin.py
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
It verifies imports, configuration values, and filesystem expectations without hitting the Anthropic API.
|
|
86
|
+
|
|
87
|
+
## Security Notes
|
|
88
|
+
|
|
89
|
+
- Tokens are stored locally and never transmitted elsewhere
|
|
90
|
+
- PKCE protects the flow even without a client secret
|
|
91
|
+
- HTTPS endpoints are enforced for all requests
|
|
92
|
+
|
|
93
|
+
Enjoy hacking with Claude Code straight from Code Puppy! 🐶💻
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Claude Code OAuth Plugin for Code Puppy
|
|
3
|
+
|
|
4
|
+
This plugin provides OAuth authentication for Claude Code and automatically
|
|
5
|
+
adds available models to the extra_models.json configuration.
|
|
6
|
+
|
|
7
|
+
The plugin also includes a token refresh heartbeat for maintaining fresh
|
|
8
|
+
tokens during long-running agentic operations.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from .token_refresh_heartbeat import (
|
|
12
|
+
TokenRefreshHeartbeat,
|
|
13
|
+
force_token_refresh,
|
|
14
|
+
get_current_heartbeat,
|
|
15
|
+
is_heartbeat_running,
|
|
16
|
+
token_refresh_heartbeat_context,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
"TokenRefreshHeartbeat",
|
|
21
|
+
"token_refresh_heartbeat_context",
|
|
22
|
+
"is_heartbeat_running",
|
|
23
|
+
"get_current_heartbeat",
|
|
24
|
+
"force_token_refresh",
|
|
25
|
+
]
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from typing import Any, Dict
|
|
3
|
+
|
|
4
|
+
from code_puppy import config
|
|
5
|
+
|
|
6
|
+
# Claude Code OAuth configuration
|
|
7
|
+
CLAUDE_CODE_OAUTH_CONFIG: Dict[str, Any] = {
|
|
8
|
+
# OAuth endpoints inferred from official Claude Code OAuth flow
|
|
9
|
+
"auth_url": "https://claude.ai/oauth/authorize",
|
|
10
|
+
"token_url": "https://console.anthropic.com/v1/oauth/token",
|
|
11
|
+
"api_base_url": "https://api.anthropic.com",
|
|
12
|
+
# OAuth client configuration observed in Claude Code CLI flow
|
|
13
|
+
"client_id": "9d1c250a-e61b-44d9-88ed-5944d1962f5e",
|
|
14
|
+
"scope": "org:create_api_key user:profile user:inference",
|
|
15
|
+
# Callback handling (we host a localhost callback to capture the redirect)
|
|
16
|
+
"redirect_host": "http://localhost",
|
|
17
|
+
"redirect_path": "callback",
|
|
18
|
+
"callback_port_range": (8765, 8795),
|
|
19
|
+
"callback_timeout": 180,
|
|
20
|
+
# Console redirect fallback (for manual flows, if needed)
|
|
21
|
+
"console_redirect_uri": "https://console.anthropic.com/oauth/code/callback",
|
|
22
|
+
# Local configuration (uses XDG_DATA_HOME)
|
|
23
|
+
"token_storage": None, # Set dynamically in get_token_storage_path()
|
|
24
|
+
# Model configuration
|
|
25
|
+
"prefix": "claude-code-",
|
|
26
|
+
"default_context_length": 200000,
|
|
27
|
+
"long_context_length": 1000000,
|
|
28
|
+
"long_context_models": [
|
|
29
|
+
"claude-opus-4-6",
|
|
30
|
+
"claude-opus-4-7",
|
|
31
|
+
"claude-opus-4-8",
|
|
32
|
+
"claude-opus-5",
|
|
33
|
+
"claude-sonnet-5",
|
|
34
|
+
"claude-fable-5",
|
|
35
|
+
],
|
|
36
|
+
"api_key_env_var": "CLAUDE_CODE_ACCESS_TOKEN",
|
|
37
|
+
"anthropic_version": "2023-06-01",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def get_token_storage_path() -> Path:
|
|
42
|
+
"""Get the path for storing OAuth tokens (uses XDG_DATA_HOME)."""
|
|
43
|
+
data_dir = Path(config.DATA_DIR)
|
|
44
|
+
data_dir.mkdir(parents=True, exist_ok=True, mode=0o700)
|
|
45
|
+
return data_dir / "claude_code_oauth.json"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def get_config_dir() -> Path:
|
|
49
|
+
"""Get the Code Puppy configuration directory (uses XDG_CONFIG_HOME)."""
|
|
50
|
+
config_dir = Path(config.CONFIG_DIR)
|
|
51
|
+
config_dir.mkdir(parents=True, exist_ok=True, mode=0o700)
|
|
52
|
+
return config_dir
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def get_claude_models_path() -> Path:
|
|
56
|
+
"""Get the path to the dedicated claude_models.json file (uses XDG_DATA_HOME)."""
|
|
57
|
+
data_dir = Path(config.DATA_DIR)
|
|
58
|
+
data_dir.mkdir(parents=True, exist_ok=True, mode=0o700)
|
|
59
|
+
return data_dir / "claude_models.json"
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"""Fast mode support for Claude Code OAuth.
|
|
2
|
+
|
|
3
|
+
Fast mode adds two wire-level changes when enabled via the per-model
|
|
4
|
+
``fast`` setting:
|
|
5
|
+
|
|
6
|
+
1. ``speed: "fast"`` is injected into the ``/v1/messages`` request payload.
|
|
7
|
+
2. ``fast-mode-2026-02-01`` is appended to the ``anthropic-beta`` header.
|
|
8
|
+
|
|
9
|
+
The setting is read at request time (not model construction time) so that
|
|
10
|
+
toggling takes effect on the next call without a full agent reload for the
|
|
11
|
+
payload side. The beta header must still be present on the httpx client at
|
|
12
|
+
construction time, so we set that up once and rely on the existing
|
|
13
|
+
interleaved-thinking pattern for consistency.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
from typing import Any, Callable, Dict, MutableMapping
|
|
19
|
+
|
|
20
|
+
# Anthropic beta marker for fast mode. Keep as a module-level constant so
|
|
21
|
+
# there's one source of truth for both header setup and tests.
|
|
22
|
+
FAST_MODE_BETA = "fast-mode-2026-02-01"
|
|
23
|
+
|
|
24
|
+
# Per-model setting key, stored/read via get_all_model_settings. Deliberately NOT
|
|
25
|
+
# get_effective_model_settings: it filters through model_supports_setting(), whose
|
|
26
|
+
# claude-* allowlist lacks plugin-owned keys like ``fast``, silently dropping them.
|
|
27
|
+
FAST_SETTING_KEY = "fast"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def is_fast_mode_enabled(model_name: str) -> bool:
|
|
31
|
+
"""Return True if the ``fast`` setting is on for ``model_name``."""
|
|
32
|
+
# Imported lazily to avoid circular imports at module load.
|
|
33
|
+
from code_puppy.config import get_all_model_settings
|
|
34
|
+
|
|
35
|
+
settings = get_all_model_settings(model_name)
|
|
36
|
+
return bool(settings.get(FAST_SETTING_KEY, False))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def ensure_fast_beta_header(headers: MutableMapping[str, str], enabled: bool) -> None:
|
|
40
|
+
"""Add or remove ``fast-mode-2026-02-01`` from the anthropic-beta header.
|
|
41
|
+
|
|
42
|
+
Mutates ``headers`` in place. Mirrors the interleaved-thinking handling so
|
|
43
|
+
beta markers stay comma-separated and de-duplicated.
|
|
44
|
+
"""
|
|
45
|
+
existing = headers.get("anthropic-beta")
|
|
46
|
+
if existing:
|
|
47
|
+
parts = [p.strip() for p in existing.split(",") if p.strip()]
|
|
48
|
+
else:
|
|
49
|
+
parts = []
|
|
50
|
+
|
|
51
|
+
has_marker = FAST_MODE_BETA in parts
|
|
52
|
+
if enabled and not has_marker:
|
|
53
|
+
parts.append(FAST_MODE_BETA)
|
|
54
|
+
elif not enabled and has_marker:
|
|
55
|
+
parts = [p for p in parts if p != FAST_MODE_BETA]
|
|
56
|
+
|
|
57
|
+
if parts:
|
|
58
|
+
headers["anthropic-beta"] = ",".join(parts)
|
|
59
|
+
elif "anthropic-beta" in headers:
|
|
60
|
+
del headers["anthropic-beta"]
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def _inject_speed_in_payload(payload: Dict[str, Any]) -> None:
|
|
64
|
+
"""Inject ``speed: "fast"`` into a /v1/messages payload dict in place."""
|
|
65
|
+
if not isinstance(payload, dict):
|
|
66
|
+
return
|
|
67
|
+
# Respect an explicit speed already present (don't clobber caller intent).
|
|
68
|
+
if "speed" not in payload:
|
|
69
|
+
payload["speed"] = "fast"
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def make_fast_mode_wrapper(
|
|
73
|
+
original_create: Callable[..., Any], model_name: str
|
|
74
|
+
) -> Callable[..., Any]:
|
|
75
|
+
"""Wrap ``messages.create`` to inject ``speed: fast`` when enabled.
|
|
76
|
+
|
|
77
|
+
The setting is re-read on every call so toggling via ``/claude-code-fast``
|
|
78
|
+
takes effect on the very next request (no agent reload needed for the
|
|
79
|
+
payload side of the equation).
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
async def wrapped_create(*args: Any, **kwargs: Any):
|
|
83
|
+
if is_fast_mode_enabled(model_name):
|
|
84
|
+
if kwargs:
|
|
85
|
+
_inject_speed_in_payload(kwargs)
|
|
86
|
+
elif args:
|
|
87
|
+
maybe_payload = args[-1]
|
|
88
|
+
if isinstance(maybe_payload, dict):
|
|
89
|
+
_inject_speed_in_payload(maybe_payload)
|
|
90
|
+
|
|
91
|
+
return await original_create(*args, **kwargs)
|
|
92
|
+
|
|
93
|
+
return wrapped_create
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def patch_anthropic_client_fast_mode(client: Any, model_name: str) -> None:
|
|
97
|
+
"""Monkey-patch ``messages.create`` (and ``beta.messages.create``).
|
|
98
|
+
|
|
99
|
+
Must be called *after* ``patch_anthropic_client_messages`` so our wrapper
|
|
100
|
+
sits outside the cache-control injector — order of wrappers doesn't matter
|
|
101
|
+
for correctness here, but keeping fast-mode outermost makes it easy to
|
|
102
|
+
reason about.
|
|
103
|
+
"""
|
|
104
|
+
try:
|
|
105
|
+
messages_obj = getattr(client, "messages", None)
|
|
106
|
+
if messages_obj is not None and hasattr(messages_obj, "create"):
|
|
107
|
+
messages_obj.create = make_fast_mode_wrapper(
|
|
108
|
+
messages_obj.create, model_name
|
|
109
|
+
)
|
|
110
|
+
except Exception: # pragma: no cover - defensive
|
|
111
|
+
pass
|
|
112
|
+
|
|
113
|
+
try:
|
|
114
|
+
beta_obj = getattr(client, "beta", None)
|
|
115
|
+
if beta_obj is not None:
|
|
116
|
+
beta_messages_obj = getattr(beta_obj, "messages", None)
|
|
117
|
+
if beta_messages_obj is not None and hasattr(beta_messages_obj, "create"):
|
|
118
|
+
beta_messages_obj.create = make_fast_mode_wrapper(
|
|
119
|
+
beta_messages_obj.create, model_name
|
|
120
|
+
)
|
|
121
|
+
except Exception: # pragma: no cover - defensive
|
|
122
|
+
pass
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""Prompt preparation logic for Claude Code OAuth models.
|
|
2
|
+
|
|
3
|
+
This module owns everything that's special about preparing prompts for
|
|
4
|
+
``claude-code-*`` models:
|
|
5
|
+
|
|
6
|
+
- The fixed system-instruction string Anthropic's Claude Code CLI expects.
|
|
7
|
+
- The ``is_claude_code_model`` predicate.
|
|
8
|
+
- A callback wired into the ``prepare_model_prompt`` hook which runs inside
|
|
9
|
+
``code_puppy.model_utils.prepare_prompt_for_model``.
|
|
10
|
+
|
|
11
|
+
Keeping this here (rather than in core ``model_utils``) keeps the core
|
|
12
|
+
model-agnostic and lets the claude-code behavior ship/fail as a single
|
|
13
|
+
plugin — exactly per the Contributing guide.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
from typing import Any, Dict, Optional
|
|
19
|
+
|
|
20
|
+
# System-prompt override the Claude Code CLI expects. For OAuth claude-code models the
|
|
21
|
+
# real system prompt moves into the user turn instead (see the callback below).
|
|
22
|
+
CLAUDE_CODE_INSTRUCTIONS = "You are Claude Code, Anthropic's official CLI for Claude."
|
|
23
|
+
|
|
24
|
+
# Prefix used by every claude-code-* model (as registered by this plugin).
|
|
25
|
+
_CLAUDE_CODE_PREFIX = "claude-code"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def is_claude_code_model(model_name: str) -> bool:
|
|
29
|
+
"""Return True if ``model_name`` is a claude-code OAuth model."""
|
|
30
|
+
return model_name.startswith(_CLAUDE_CODE_PREFIX)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def get_claude_code_instructions() -> str:
|
|
34
|
+
"""Return the fixed Claude Code system instruction string."""
|
|
35
|
+
return CLAUDE_CODE_INSTRUCTIONS
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def prepare_claude_code_prompt(
|
|
39
|
+
model_name: str,
|
|
40
|
+
system_prompt: str,
|
|
41
|
+
user_prompt: str,
|
|
42
|
+
prepend_system_to_user: bool = True,
|
|
43
|
+
) -> Optional[Dict[str, Any]]:
|
|
44
|
+
"""Callback for the ``prepare_model_prompt`` hook.
|
|
45
|
+
|
|
46
|
+
For claude-code models, swap in the Anthropic-expected instruction string
|
|
47
|
+
and (optionally) fold the caller's system prompt into the user message.
|
|
48
|
+
|
|
49
|
+
Returns ``None`` for non-claude-code models so other handlers / the
|
|
50
|
+
default passthrough can take over.
|
|
51
|
+
"""
|
|
52
|
+
if not is_claude_code_model(model_name):
|
|
53
|
+
return None
|
|
54
|
+
|
|
55
|
+
modified_prompt = user_prompt
|
|
56
|
+
if prepend_system_to_user and system_prompt:
|
|
57
|
+
modified_prompt = f"{system_prompt}\n\n{user_prompt}"
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
"handled": True,
|
|
61
|
+
"instructions": CLAUDE_CODE_INSTRUCTIONS,
|
|
62
|
+
"user_prompt": modified_prompt,
|
|
63
|
+
"is_claude_code": True,
|
|
64
|
+
}
|