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,163 @@
|
|
|
1
|
+
"""Focused-window accessibility extraction with relevance pruning."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from collections import Counter
|
|
6
|
+
from typing import Any, Callable
|
|
7
|
+
|
|
8
|
+
MAX_SCAN_NODES = 4_000
|
|
9
|
+
# Electron embeds its web accessibility tree beneath a deep stack of generic
|
|
10
|
+
# groups; Spotify's search field, for example, sits beyond depth 16.
|
|
11
|
+
MAX_DEPTH = 32
|
|
12
|
+
|
|
13
|
+
_ROLE_SCORE = {
|
|
14
|
+
"AXButton": 80,
|
|
15
|
+
"AXCheckBox": 75,
|
|
16
|
+
"AXComboBox": 75,
|
|
17
|
+
"AXMenuItem": 75,
|
|
18
|
+
"AXPopUpButton": 75,
|
|
19
|
+
"AXRadioButton": 75,
|
|
20
|
+
"AXSearchField": 75,
|
|
21
|
+
"AXSlider": 70,
|
|
22
|
+
"AXTextArea": 70,
|
|
23
|
+
"AXTextField": 70,
|
|
24
|
+
"AXLink": 65,
|
|
25
|
+
"AXRow": 25,
|
|
26
|
+
"AXCell": 20,
|
|
27
|
+
"AXStaticText": 15,
|
|
28
|
+
"AXWindow": 10,
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _copy_actions(api: Any, element: Any) -> list[str]:
|
|
33
|
+
result = api.AXUIElementCopyActionNames(element, None)
|
|
34
|
+
if isinstance(result, tuple):
|
|
35
|
+
error, value = result
|
|
36
|
+
if error != api.kAXErrorSuccess or not value:
|
|
37
|
+
return []
|
|
38
|
+
return [str(item) for item in value]
|
|
39
|
+
return [str(item) for item in (result or [])]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _focused_root(
|
|
43
|
+
api: Any,
|
|
44
|
+
application: Any,
|
|
45
|
+
copy_attribute: Callable,
|
|
46
|
+
preferred_window_id: int | None = None,
|
|
47
|
+
):
|
|
48
|
+
if preferred_window_id is not None:
|
|
49
|
+
windows = copy_attribute(api, application, api.kAXWindowsAttribute)
|
|
50
|
+
for window in windows or []:
|
|
51
|
+
number = copy_attribute(api, window, "AXWindowNumber")
|
|
52
|
+
if number is not None and int(number) == preferred_window_id:
|
|
53
|
+
return window
|
|
54
|
+
for attribute in (
|
|
55
|
+
api.kAXFocusedWindowAttribute,
|
|
56
|
+
api.kAXMainWindowAttribute,
|
|
57
|
+
):
|
|
58
|
+
window = copy_attribute(api, application, attribute)
|
|
59
|
+
if window is not None:
|
|
60
|
+
return window
|
|
61
|
+
windows = copy_attribute(api, application, api.kAXWindowsAttribute)
|
|
62
|
+
if windows:
|
|
63
|
+
return windows[0]
|
|
64
|
+
return application
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def snapshot_tree(
|
|
68
|
+
api: Any,
|
|
69
|
+
application: Any,
|
|
70
|
+
copy_attribute: Callable,
|
|
71
|
+
max_nodes: int,
|
|
72
|
+
preferred_window_id: int | None = None,
|
|
73
|
+
) -> tuple[list[dict[str, Any]], dict[int, Any], dict[str, Any]]:
|
|
74
|
+
"""Scan broadly, then retain controls most useful for agent interaction."""
|
|
75
|
+
root = _focused_root(
|
|
76
|
+
api,
|
|
77
|
+
application,
|
|
78
|
+
copy_attribute,
|
|
79
|
+
preferred_window_id,
|
|
80
|
+
)
|
|
81
|
+
limit = max(1, min(int(max_nodes), 500))
|
|
82
|
+
scan_limit = min(MAX_SCAN_NODES, max(1_000, limit * 8))
|
|
83
|
+
candidates: list[tuple[int, int, Any, dict[str, Any]]] = []
|
|
84
|
+
seen: set[int] = set()
|
|
85
|
+
scan_stopped = False
|
|
86
|
+
|
|
87
|
+
def visit(element: Any, depth: int) -> None:
|
|
88
|
+
nonlocal scan_stopped
|
|
89
|
+
if depth > MAX_DEPTH or scan_stopped:
|
|
90
|
+
return
|
|
91
|
+
identity = id(element)
|
|
92
|
+
if identity in seen:
|
|
93
|
+
return
|
|
94
|
+
seen.add(identity)
|
|
95
|
+
if len(candidates) >= scan_limit:
|
|
96
|
+
scan_stopped = True
|
|
97
|
+
return
|
|
98
|
+
|
|
99
|
+
role = str(copy_attribute(api, element, api.kAXRoleAttribute) or "AXUnknown")
|
|
100
|
+
title = str(copy_attribute(api, element, api.kAXTitleAttribute) or "")
|
|
101
|
+
description = str(
|
|
102
|
+
copy_attribute(api, element, api.kAXDescriptionAttribute) or ""
|
|
103
|
+
)
|
|
104
|
+
value = copy_attribute(api, element, api.kAXValueAttribute)
|
|
105
|
+
enabled = copy_attribute(api, element, api.kAXEnabledAttribute)
|
|
106
|
+
focused = copy_attribute(api, element, api.kAXFocusedAttribute)
|
|
107
|
+
actions = _copy_actions(api, element)
|
|
108
|
+
order = len(candidates)
|
|
109
|
+
node = {
|
|
110
|
+
"depth": depth,
|
|
111
|
+
"source_order": order,
|
|
112
|
+
"role": role,
|
|
113
|
+
"title": title,
|
|
114
|
+
"description": description,
|
|
115
|
+
"enabled": bool(enabled) if enabled is not None else None,
|
|
116
|
+
"focused": bool(focused) if focused is not None else None,
|
|
117
|
+
"actions": actions,
|
|
118
|
+
}
|
|
119
|
+
if value is not None and "secure" not in role.casefold():
|
|
120
|
+
node["value"] = str(value)[:500]
|
|
121
|
+
|
|
122
|
+
score = _ROLE_SCORE.get(role, 0)
|
|
123
|
+
score += 60 if actions else 0
|
|
124
|
+
score += 100 if focused else 0
|
|
125
|
+
score += 12 if title or description else 0
|
|
126
|
+
semantic_text = " ".join((title, description, str(value or ""))).casefold()
|
|
127
|
+
if (
|
|
128
|
+
"now playing:" in semantic_text
|
|
129
|
+
or "what do you want to play?" in semantic_text
|
|
130
|
+
or description.casefold() in {"play", "pause"}
|
|
131
|
+
):
|
|
132
|
+
score += 120
|
|
133
|
+
score -= 50 if enabled is False else 0
|
|
134
|
+
score -= min(depth, 10)
|
|
135
|
+
candidates.append((score, order, element, node))
|
|
136
|
+
|
|
137
|
+
children = copy_attribute(api, element, api.kAXChildrenAttribute)
|
|
138
|
+
for child in children or []:
|
|
139
|
+
visit(child, depth + 1)
|
|
140
|
+
|
|
141
|
+
visit(root, 0)
|
|
142
|
+
ranked = sorted(candidates, key=lambda item: (-item[0], item[1]))
|
|
143
|
+
selected = ranked[:limit]
|
|
144
|
+
nodes = []
|
|
145
|
+
elements = {}
|
|
146
|
+
for element_id, (_, _, element, node) in enumerate(selected, start=1):
|
|
147
|
+
node["id"] = element_id
|
|
148
|
+
nodes.append(node)
|
|
149
|
+
elements[element_id] = element
|
|
150
|
+
|
|
151
|
+
excluded = ranked[limit:]
|
|
152
|
+
overflow_roles = Counter(item[3]["role"] for item in excluded)
|
|
153
|
+
metadata = {
|
|
154
|
+
"scanned_node_count": len(candidates),
|
|
155
|
+
"returned_node_count": len(nodes),
|
|
156
|
+
"truncated": bool(excluded or scan_stopped),
|
|
157
|
+
"scan_limit_reached": scan_stopped,
|
|
158
|
+
"overflow_summary": {
|
|
159
|
+
"excluded_node_count": len(excluded),
|
|
160
|
+
"roles": dict(overflow_roles.most_common(12)),
|
|
161
|
+
},
|
|
162
|
+
}
|
|
163
|
+
return nodes, elements, metadata
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""Bring the state target to the foreground before sending global input."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import time
|
|
6
|
+
|
|
7
|
+
from .backend_types import ComputerUseError
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def _workspace():
|
|
11
|
+
try:
|
|
12
|
+
from AppKit import NSWorkspace
|
|
13
|
+
except ImportError as exc:
|
|
14
|
+
raise ComputerUseError("AppKit bindings are unavailable.") from exc
|
|
15
|
+
return NSWorkspace.sharedWorkspace()
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def activate_application(pid: int, application_name: str, timeout: float = 1.0) -> None:
|
|
19
|
+
workspace = _workspace()
|
|
20
|
+
application = next(
|
|
21
|
+
(
|
|
22
|
+
app
|
|
23
|
+
for app in workspace.runningApplications()
|
|
24
|
+
if int(app.processIdentifier()) == pid
|
|
25
|
+
),
|
|
26
|
+
None,
|
|
27
|
+
)
|
|
28
|
+
if application is None or bool(application.isTerminated()):
|
|
29
|
+
raise ComputerUseError(
|
|
30
|
+
f"The target application {application_name} is no longer running."
|
|
31
|
+
)
|
|
32
|
+
# NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps.
|
|
33
|
+
if not bool(application.activateWithOptions_(3)):
|
|
34
|
+
raise ComputerUseError(
|
|
35
|
+
f"Could not activate target application {application_name}."
|
|
36
|
+
)
|
|
37
|
+
# AppKit success doesn't guarantee macOS actually changes focus. With Accessibility
|
|
38
|
+
# permission already required, explicitly foreground + raise the window via AX too.
|
|
39
|
+
try:
|
|
40
|
+
import ApplicationServices as api
|
|
41
|
+
|
|
42
|
+
ax_application = api.AXUIElementCreateApplication(pid)
|
|
43
|
+
api.AXUIElementSetAttributeValue(
|
|
44
|
+
ax_application,
|
|
45
|
+
api.kAXFrontmostAttribute,
|
|
46
|
+
True,
|
|
47
|
+
)
|
|
48
|
+
result = api.AXUIElementCopyAttributeValue(
|
|
49
|
+
ax_application,
|
|
50
|
+
api.kAXWindowsAttribute,
|
|
51
|
+
None,
|
|
52
|
+
)
|
|
53
|
+
windows = result[1] if isinstance(result, tuple) else result
|
|
54
|
+
if windows:
|
|
55
|
+
api.AXUIElementSetAttributeValue(
|
|
56
|
+
windows[0],
|
|
57
|
+
api.kAXMainAttribute,
|
|
58
|
+
True,
|
|
59
|
+
)
|
|
60
|
+
api.AXUIElementPerformAction(windows[0], api.kAXRaiseAction)
|
|
61
|
+
except ImportError:
|
|
62
|
+
pass
|
|
63
|
+
deadline = time.monotonic() + max(0.1, timeout)
|
|
64
|
+
while time.monotonic() < deadline:
|
|
65
|
+
frontmost = workspace.frontmostApplication()
|
|
66
|
+
if frontmost is not None and int(frontmost.processIdentifier()) == pid:
|
|
67
|
+
return
|
|
68
|
+
time.sleep(0.02)
|
|
69
|
+
raise ComputerUseError(
|
|
70
|
+
f"Target application {application_name} did not become frontmost."
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def activate_state(state, timeout: float = 1.0) -> None:
|
|
75
|
+
activate_application(state.pid, state.application, timeout)
|